shop-components 0.0.19 → 0.0.20

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.
@@ -23,7 +23,7 @@ export declare class DeviceViewer extends LitElement {
23
23
  lineWrapper: HTMLDivElement | undefined;
24
24
  fit: () => void;
25
25
  generateBVH: () => void;
26
- download: () => void;
26
+ download: () => string;
27
27
  clearAMR: () => void;
28
28
  exportAMR: () => Promise<void>;
29
29
  addAMR: () => void;
@@ -94,7 +94,7 @@ export declare class Scene3D {
94
94
  private _initEvents;
95
95
  changeLogo(logo: Logo, url: string): void;
96
96
  generateBVH(): Promise<void>;
97
- download(): void;
97
+ download(): string;
98
98
  clearAMR(): void;
99
99
  exportAMR(): Promise<ArrayBuffer | {
100
100
  [key: string]: any;
@@ -30440,8 +30440,7 @@ class Dz {
30440
30440
  a.textures.setTextures(this.renderer, 1024 * l, 1024 * l, i), a.materials.updateFrom(n, i), a.lights.updateFrom(r), a.lightCount = r.length, this.ptRenderer.material.materials.updateFrom(this.sceneInfo.materials, this.sceneInfo.textures), this.ptRenderer.reset(), this.sampleCount = 0, e.dispose(), this.usePathTracing = !0;
30441
30441
  }
30442
30442
  download() {
30443
- const e = this.renderer.domElement.toDataURL("image/png"), t = document.createElement("a");
30444
- t.href = e, t.download = "transparent-background-object.png", document.body.appendChild(t), t.click(), document.body.removeChild(t);
30443
+ return this.renderer.domElement.toDataURL("image/png");
30445
30444
  }
30446
30445
  clearAMR() {
30447
30446
  Ih(this._container), this._slots = [], this._logos = [], this._skins = [], this._materialsCache.clear(), this.opacityCache = void 0, this.usePathTracing = !1, this.lines.clear();
@@ -8039,7 +8039,7 @@ d="${this.getPath(e)}"></path>`)}
8039
8039
  color *= newPeak * invPeak;
8040
8040
  float g = 1. - 3. / (desaturation * extraBrightness + 3.);
8041
8041
  return mix(color, vec3(1, 1, 1), g);
8042
- }`),this.camera.position.set(10,0,-10),this.camera.lookAt(new A),this.ptRenderer=new P2(this.renderer),this.ptRenderer.camera=this.camera,this.ptRenderer.material=new OG,this.ptRenderer.tiles.set(1,1),this.ptRenderer.material.filterGlossyFactor=.6,this.ptRenderer.material.environmentIntensity=this.renderer.toneMappingExposure,this.ptRenderer.material.backgroundAlpha=0,this.ptRenderer.material.environmentBlur=0,this.ptRenderer.material.bounces=6,this.ptRenderer.material.transmissiveBounces=8,this.ptRenderer.alpha=!0,this.fsQuad=new ns(new Tn({map:this.ptRenderer.target.texture,blending:km})),this.controls.addEventListener("change",()=>{this.sampleCount=0,this.ptRenderer.reset()}),this._composer=new XG(this.renderer),this._composer.setPixelRatio(window.devicePixelRatio),this._composer.addPass(new v2(this.scene,this.camera)),this._composer.addPass(new T2),this._outlinePass=new ss(new me(window.innerWidth,window.innerHeight),this.scene,this.camera),this._outlinePass.visibleEdgeColor.set(26367),this._outlinePass.edgeThickness=.5,this._outlinePass.hiddenEdgeColor.set(26367),this._outlinePass.edgeStrength=3,this._outlinePass.edgeGlow=0,this._composer.addPass(this._outlinePass),this._outlinePassError=new ss(new me(window.innerWidth,window.innerHeight),this.scene,this.camera),this._outlinePassError.visibleEdgeColor.set(16711680),this._outlinePassError.edgeThickness=.5,this._outlinePassError.hiddenEdgeColor.set(16711680),this._outlinePassError.edgeStrength=3,this._outlinePassError.edgeGlow=0,this._composer.addPass(this._outlinePassError),this._composer.renderTarget1.texture.colorSpace=gt,this._composer.renderTarget2.texture.colorSpace=gt,this._fxaaPass=new m0(b2),this._composer.addPass(this._fxaaPass),this.scene.add(this._container),this.ticker(),this._loadEnv(),this._initEvents()}get usePathTracing(){return this._usePathTracing}set usePathTracing(e){e?(this.bodyOpacity=1,this.slots.forEach(t=>t.hide()),this.lines.hide()):(this.slots.forEach(t=>t.show()),this.lines.show(),this.opacityCache!==void 0?(this.bodyOpacity=this.opacityCache,this.opacityCache=void 0):this.bodyOpacity=1),this._usePathTracing=e,this.controls.dampingFactor=e?1:ub,this.sampleCount=0}get slots(){return this._slots}get logos(){return this._logos}get skins(){return this._skins}get fpsAverage(){return Lv(this._fpsCache)}set bodyOpacity(e){this._bodyOpacity=e,e<1?this._materialsCache.forEach(t=>{t.mat.transparent=!0,t.mat.opacity=e,t.mat.metalness=0,t.mat.roughness=1,t.mat.color=new Ke("#3859be")}):this._materialsCache.forEach(t=>{t.mat.transparent=t.transparent,t.mat.opacity=t.opacity,t.mat.metalness=t.metalness,t.mat.roughness=t.roughness,t.mat.color=t.color})}get bodyOpacity(){return this._bodyOpacity}changeSkin(e,t){var n;if(!e)return;const i=e.target.name;this.usePathTracing?((n=this.sceneInfo.materials.find(r=>r.name===i))==null||n.color.set(t),this.ptRenderer.material.materials.updateFrom(this.sceneInfo.materials,this.sceneInfo.textures),this.sampleCount=0,this.ptRenderer.reset()):e.target.color.set(t)}showState(){this.stats.dom.style.display="block"}hideState(){this.stats.dom.style.display="none"}_loadEnv(){new f2(new r0).load(KE,t=>{t.mapping=ql,t.minFilter=at,t.magFilter=at,t.colorSpace=gt,t.needsUpdate=!0,this._usePathTracing||(this.scene.environment=t),this.ptRenderer.material.envMapInfo.updateFrom(t),this.ptRenderer.reset()},()=>{},()=>{})}_initEvents(){document.addEventListener("wheel",this._detectTrackpad),this.renderer.domElement.addEventListener("pointermove",this._pointermove),this.renderer.domElement.addEventListener("pointerdown",this._pointerdown)}changeLogo(e,t){var r;const i=OE.load(t);i.flipY=!1,i.colorSpace=gt;const n=e.target;n.material&&(Array.isArray(n.material)?n.material.forEach(o=>{var a;(a=o.map)==null||a.dispose(),o.map=i}):((r=n.material.map)==null||r.dispose(),n.material.map=i))}async generateBVH(){this.slots.forEach(h=>h.hide()),this.lines.hide(),this.opacityCache=this.bodyOpacity,this.bodyOpacity=1;const e=new QG;this._container.updateMatrixWorld();const{bvh:t,textures:i,materials:n,lights:r}=await e.generate(this._container);this.sceneInfo={materials:n,textures:i};const o=t.geometry,a=this.ptRenderer.material;a.bvh.updateFrom(t),a.attributesArray.updateFrom(o.attributes.normal,o.attributes.tangent,o.attributes.uv,o.attributes.color),a.materialIndexAttribute.updateFrom(o.attributes.materialIndex);const l=window.devicePixelRatio||1;a.textures.setTextures(this.renderer,1024*l,1024*l,i),a.materials.updateFrom(n,i),a.lights.updateFrom(r),a.lightCount=r.length,this.ptRenderer.material.materials.updateFrom(this.sceneInfo.materials,this.sceneInfo.textures),this.ptRenderer.reset(),this.sampleCount=0,e.dispose(),this.usePathTracing=!0}download(){const e=this.renderer.domElement.toDataURL("image/png"),t=document.createElement("a");t.href=e,t.download="transparent-background-object.png",document.body.appendChild(t),t.click(),document.body.removeChild(t)}clearAMR(){th(this._container),this._slots=[],this._logos=[],this._skins=[],this._materialsCache.clear(),this.opacityCache=void 0,this.usePathTracing=!1,this.lines.clear()}async exportAMR(){const e=this._container.clone(!0);return e.traverse(t=>{t.dispose&&(t.dispose(),t.removeFromParent())}),await Wv.parseAsync(e,{onlyVisible:!0,binary:!0})}async addAMR(e){!e.startsWith("blob")&&e.endsWith(".sglb");let t;if(e.endsWith(".glb")){console.log(e);let{scene:a}=await il.loadAsync(e);console.log(a),t=a}else{const l=await new Lp({useCache:!0}).loadAsync(e);if(!l.glb)return;t=l.glb}const i=t.clone(!0);i.traverse(a=>{if(a instanceof jt&&(a.material&&(Array.isArray(a.material)?a.material.forEach(l=>{l.userData.changeColor&&this._skins.push({name:l.userData.name,target:l})}):a.material.userData.changeColor&&this._skins.push({name:a.material.userData.name,target:a.material})),a.userData.isLOGO&&(a.material.transparent=!0,this._logos.push({name:a.userData.name,target:a}))),a.name.startsWith("Slot")){const l=a.userData.name;if(l&&a.userData.isSlot){const h=new Tp({name:l,slot:a});h.addEventListener(un.ON_DROP,d=>{this.props.useSound&&this._sound.play()}),h.addEventListener(un.ON_BEFORE_SELECTED,d=>{this.slots.forEach(c=>{c.selected&&(c.selected=!1)})}),h.addEventListener(un.ON_ERROR_STATE_CHANGE,d=>{if(this._outlinePassError.selectedObjects=this._outlinePassError.selectedObjects.filter(c=>!!c.parent),d){if(h.device){if(this._outlinePassError.selectedObjects.find(u=>{var p;return u.parent==((p=h.device)==null?void 0:p.parent)}))return;this._outlinePassError.selectedObjects=[h.device,...this._outlinePassError.selectedObjects]}}else h.device&&(this._outlinePassError.selectedObjects=this._outlinePassError.selectedObjects.filter(c=>{var u;return c.parent!=((u=h.device)==null?void 0:u.parent)}))}),this.slots.push(h),a.add(h)}}}),i.traverse(a=>{if(a instanceof jt&&a.material)if(Array.isArray(a.material))a.material.forEach(h=>{this._materialsCache.set(h.uuid,{opacity:h.opacity,transparent:h.transparent,roughness:h.roughness,metalness:h.metalness,color:h.color,mat:h})});else{const l=a.material;this._materialsCache.set(l.uuid,{opacity:l.opacity,transparent:l.transparent,roughness:l.roughness,metalness:l.metalness,color:l.color,mat:l})}}),i.updateMatrixWorld(!0),this._container.updateMatrixWorld(),this.add(i);const n=new Gt;n.setFromObject(this._container);const r=new A;n.getSize(r);const o=Math.max(r.x,r.y,r.z);this.controls.minDistance=o*2/3,this.controls.maxDistance=o*2}select(e){typeof e=="string"||(Array.isArray(e)?this._outlinePass.selectedObjects=[...e]:this._outlinePass.selectedObjects=[e])}appendTo(e){e.append(this.renderer.domElement),e.append(this.stats.dom),e.append(this.lines),e.append(this.css2dRenderer.domElement),this.stats.dom.style.bottom="0",this.stats.dom.style.top="auto",this.resize(),this._resizeObserver=new ResizeObserver(this.resize),this._resizeObserver.observe(e)}add(e){this._container.add(e)}updatePosition(){this.lines.forceUpdate()}destroy(){var t,i;this.stats.dom.remove(),this._emitter.removeAllListeners(),(t=this._fitAnimation)==null||t.stop(),document.removeEventListener("wheel",this._detectTrackpad),this.renderer.domElement.removeEventListener("pointermove",this._pointermove);const e=this.renderer.domElement.parentElement;e&&((i=this._resizeObserver)==null||i.unobserve(e)),this.controls.dispose(),this.renderer.dispose(),this._composer.dispose(),this.scene.traverse(n=>{n instanceof jt?(n.geometry.dispose(),Array.isArray(n.material)?n.material.forEach(r=>r.dispose()):n.material&&n.material.dispose()):n instanceof Tp&&n.dispose(),n.removeFromParent()})}}var vr=(s=>(s[s.WEBGL_LEGACY=0]="WEBGL_LEGACY",s[s.WEBGL=1]="WEBGL",s[s.WEBGL2=2]="WEBGL2",s))(vr||{}),db=(s=>(s[s.UNKNOWN=0]="UNKNOWN",s[s.WEBGL=1]="WEBGL",s[s.CANVAS=2]="CANVAS",s))(db||{}),Op=(s=>(s[s.COLOR=16384]="COLOR",s[s.DEPTH=256]="DEPTH",s[s.STENCIL=1024]="STENCIL",s))(Op||{}),He=(s=>(s[s.NORMAL=0]="NORMAL",s[s.ADD=1]="ADD",s[s.MULTIPLY=2]="MULTIPLY",s[s.SCREEN=3]="SCREEN",s[s.OVERLAY=4]="OVERLAY",s[s.DARKEN=5]="DARKEN",s[s.LIGHTEN=6]="LIGHTEN",s[s.COLOR_DODGE=7]="COLOR_DODGE",s[s.COLOR_BURN=8]="COLOR_BURN",s[s.HARD_LIGHT=9]="HARD_LIGHT",s[s.SOFT_LIGHT=10]="SOFT_LIGHT",s[s.DIFFERENCE=11]="DIFFERENCE",s[s.EXCLUSION=12]="EXCLUSION",s[s.HUE=13]="HUE",s[s.SATURATION=14]="SATURATION",s[s.COLOR=15]="COLOR",s[s.LUMINOSITY=16]="LUMINOSITY",s[s.NORMAL_NPM=17]="NORMAL_NPM",s[s.ADD_NPM=18]="ADD_NPM",s[s.SCREEN_NPM=19]="SCREEN_NPM",s[s.NONE=20]="NONE",s[s.SRC_OVER=0]="SRC_OVER",s[s.SRC_IN=21]="SRC_IN",s[s.SRC_OUT=22]="SRC_OUT",s[s.SRC_ATOP=23]="SRC_ATOP",s[s.DST_OVER=24]="DST_OVER",s[s.DST_IN=25]="DST_IN",s[s.DST_OUT=26]="DST_OUT",s[s.DST_ATOP=27]="DST_ATOP",s[s.ERASE=26]="ERASE",s[s.SUBTRACT=28]="SUBTRACT",s[s.XOR=29]="XOR",s))(He||{}),Pn=(s=>(s[s.POINTS=0]="POINTS",s[s.LINES=1]="LINES",s[s.LINE_LOOP=2]="LINE_LOOP",s[s.LINE_STRIP=3]="LINE_STRIP",s[s.TRIANGLES=4]="TRIANGLES",s[s.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",s[s.TRIANGLE_FAN=6]="TRIANGLE_FAN",s))(Pn||{}),se=(s=>(s[s.RGBA=6408]="RGBA",s[s.RGB=6407]="RGB",s[s.RG=33319]="RG",s[s.RED=6403]="RED",s[s.RGBA_INTEGER=36249]="RGBA_INTEGER",s[s.RGB_INTEGER=36248]="RGB_INTEGER",s[s.RG_INTEGER=33320]="RG_INTEGER",s[s.RED_INTEGER=36244]="RED_INTEGER",s[s.ALPHA=6406]="ALPHA",s[s.LUMINANCE=6409]="LUMINANCE",s[s.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",s[s.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",s[s.DEPTH_STENCIL=34041]="DEPTH_STENCIL",s))(se||{}),Jo=(s=>(s[s.TEXTURE_2D=3553]="TEXTURE_2D",s[s.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",s[s.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",s[s.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",s[s.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",s[s.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",s[s.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",s))(Jo||{}),Ae=(s=>(s[s.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",s[s.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",s[s.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",s[s.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",s[s.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",s[s.UNSIGNED_INT=5125]="UNSIGNED_INT",s[s.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",s[s.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",s[s.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",s[s.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",s[s.BYTE=5120]="BYTE",s[s.SHORT=5122]="SHORT",s[s.INT=5124]="INT",s[s.FLOAT=5126]="FLOAT",s[s.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",s[s.HALF_FLOAT=36193]="HALF_FLOAT",s))(Ae||{}),ve=(s=>(s[s.FLOAT=0]="FLOAT",s[s.INT=1]="INT",s[s.UINT=2]="UINT",s))(ve||{}),ls=(s=>(s[s.NEAREST=0]="NEAREST",s[s.LINEAR=1]="LINEAR",s))(ls||{}),Rs=(s=>(s[s.CLAMP=33071]="CLAMP",s[s.REPEAT=10497]="REPEAT",s[s.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",s))(Rs||{}),En=(s=>(s[s.OFF=0]="OFF",s[s.POW2=1]="POW2",s[s.ON=2]="ON",s[s.ON_MANUAL=3]="ON_MANUAL",s))(En||{}),Gi=(s=>(s[s.NPM=0]="NPM",s[s.UNPACK=1]="UNPACK",s[s.PMA=2]="PMA",s[s.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",s[s.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",s[s.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",s))(Gi||{}),An=(s=>(s[s.NO=0]="NO",s[s.YES=1]="YES",s[s.AUTO=2]="AUTO",s[s.BLEND=0]="BLEND",s[s.CLEAR=1]="CLEAR",s[s.BLIT=2]="BLIT",s))(An||{}),qp=(s=>(s[s.AUTO=0]="AUTO",s[s.MANUAL=1]="MANUAL",s))(qp||{}),Vi=(s=>(s.LOW="lowp",s.MEDIUM="mediump",s.HIGH="highp",s))(Vi||{}),Jt=(s=>(s[s.NONE=0]="NONE",s[s.SCISSOR=1]="SCISSOR",s[s.STENCIL=2]="STENCIL",s[s.SPRITE=3]="SPRITE",s[s.COLOR=4]="COLOR",s))(Jt||{}),Zt=(s=>(s[s.NONE=0]="NONE",s[s.LOW=2]="LOW",s[s.MEDIUM=4]="MEDIUM",s[s.HIGH=8]="HIGH",s))(Zt||{}),Rn=(s=>(s[s.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",s[s.ARRAY_BUFFER=34962]="ARRAY_BUFFER",s[s.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",s))(Rn||{});const be={ADAPTER:{createCanvas:(s,e)=>{const t=document.createElement("canvas");return t.width=s,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(s,e)=>fetch(s,e),parseXML:s=>new DOMParser().parseFromString(s,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var Xp=/iPhone/i,pb=/iPod/i,fb=/iPad/i,mb=/\biOS-universal(?:.+)Mac\b/i,zp=/\bAndroid(?:.+)Mobile\b/i,gb=/Android/i,Vo=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ch=/Silk/i,cs=/Windows Phone/i,yb=/\bWindows(?:.+)ARM\b/i,vb=/BlackBerry/i,bb=/BB10/i,xb=/Opera Mini/i,Sb=/\b(CriOS|Chrome)(?:.+)Mobile/i,Lb=/Mobile(?:.+)Firefox\b/i,Tb=function(s){return typeof s<"u"&&s.platform==="MacIntel"&&typeof s.maxTouchPoints=="number"&&s.maxTouchPoints>1&&typeof MSStream>"u"};function zE(s){return function(e){return e.test(s)}}function Cb(s){var e={userAgent:"",platform:"",maxTouchPoints:0};!s&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof s=="string"?e.userAgent=s:s&&s.userAgent&&(e={userAgent:s.userAgent,platform:s.platform,maxTouchPoints:s.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var n=zE(t),r={apple:{phone:n(Xp)&&!n(cs),ipod:n(pb),tablet:!n(Xp)&&(n(fb)||Tb(e))&&!n(cs),universal:n(mb),device:(n(Xp)||n(pb)||n(fb)||n(mb)||Tb(e))&&!n(cs)},amazon:{phone:n(Vo),tablet:!n(Vo)&&n(ch),device:n(Vo)||n(ch)},android:{phone:!n(cs)&&n(Vo)||!n(cs)&&n(zp),tablet:!n(cs)&&!n(Vo)&&!n(zp)&&(n(ch)||n(gb)),device:!n(cs)&&(n(Vo)||n(ch)||n(zp)||n(gb))||n(/\bokhttp\b/i)},windows:{phone:n(cs),tablet:n(yb),device:n(cs)||n(yb)},other:{blackberry:n(vb),blackberry10:n(bb),opera:n(xb),firefox:n(Lb),chrome:n(Sb),device:n(vb)||n(bb)||n(xb)||n(Lb)||n(Sb)},any:!1,phone:!1,tablet:!1};return r.any=r.apple.device||r.android.device||r.windows.device||r.other.device,r.phone=r.apple.phone||r.android.phone||r.windows.phone,r.tablet=r.apple.tablet||r.android.tablet||r.windows.tablet,r}const WE=Cb.default??Cb,hs=WE(globalThis.navigator);be.RETINA_PREFIX=/@([0-9\.]+)x/,be.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Mb={exports:{}};(function(s){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function n(l,h,d){this.fn=l,this.context=h,this.once=d||!1}function r(l,h,d,c,u){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new n(d,c||l,u),f=t?t+h:h;return l._events[f]?l._events[f].fn?l._events[f]=[l._events[f],p]:l._events[f].push(p):(l._events[f]=p,l._eventsCount++),l}function o(l,h){--l._eventsCount===0?l._events=new i:delete l._events[h]}function a(){this._events=new i,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],d,c;if(this._eventsCount===0)return h;for(c in d=this._events)e.call(d,c)&&h.push(t?c.slice(1):c);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(d)):h},a.prototype.listeners=function(h){var d=t?t+h:h,c=this._events[d];if(!c)return[];if(c.fn)return[c.fn];for(var u=0,p=c.length,f=new Array(p);u<p;u++)f[u]=c[u].fn;return f},a.prototype.listenerCount=function(h){var d=t?t+h:h,c=this._events[d];return c?c.fn?1:c.length:0},a.prototype.emit=function(h,d,c,u,p,f){var y=t?t+h:h;if(!this._events[y])return!1;var m=this._events[y],g=arguments.length,v,b;if(m.fn){switch(m.once&&this.removeListener(h,m.fn,void 0,!0),g){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,d),!0;case 3:return m.fn.call(m.context,d,c),!0;case 4:return m.fn.call(m.context,d,c,u),!0;case 5:return m.fn.call(m.context,d,c,u,p),!0;case 6:return m.fn.call(m.context,d,c,u,p,f),!0}for(b=1,v=new Array(g-1);b<g;b++)v[b-1]=arguments[b];m.fn.apply(m.context,v)}else{var x=m.length,S;for(b=0;b<x;b++)switch(m[b].once&&this.removeListener(h,m[b].fn,void 0,!0),g){case 1:m[b].fn.call(m[b].context);break;case 2:m[b].fn.call(m[b].context,d);break;case 3:m[b].fn.call(m[b].context,d,c);break;case 4:m[b].fn.call(m[b].context,d,c,u);break;default:if(!v)for(S=1,v=new Array(g-1);S<g;S++)v[S-1]=arguments[S];m[b].fn.apply(m[b].context,v)}}return!0},a.prototype.on=function(h,d,c){return r(this,h,d,c,!1)},a.prototype.once=function(h,d,c){return r(this,h,d,c,!0)},a.prototype.removeListener=function(h,d,c,u){var p=t?t+h:h;if(!this._events[p])return this;if(!d)return o(this,p),this;var f=this._events[p];if(f.fn)f.fn===d&&(!u||f.once)&&(!c||f.context===c)&&o(this,p);else{for(var y=0,m=[],g=f.length;y<g;y++)(f[y].fn!==d||u&&!f[y].once||c&&f[y].context!==c)&&m.push(f[y]);m.length?this._events[p]=m.length===1?m[0]:m:o(this,p)}return this},a.prototype.removeAllListeners=function(h){var d;return h?(d=t?t+h:h,this._events[d]&&o(this,d)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,s.exports=a})(Mb);var NE=Mb.exports;const ll=cp(NE);var Wp={exports:{}};Wp.exports=hh,Wp.exports.default=hh;function hh(s,e,t){t=t||2;var i=e&&e.length,n=i?e[0]*t:s.length,r=Ib(s,0,n,t,!0),o=[];if(!r||r.next===r.prev)return o;var a,l,h,d,c,u,p;if(i&&(r=DE(s,e,r,t)),s.length>80*t){a=h=s[0],l=d=s[1];for(var f=t;f<n;f+=t)c=s[f],u=s[f+1],c<a&&(a=c),u<l&&(l=u),c>h&&(h=c),u>d&&(d=u);p=Math.max(h-a,d-l),p=p!==0?32767/p:0}return cl(r,o,t,a,l,p,0),o}function Ib(s,e,t,i,n){var r,o;if(n===Hp(s,e,t,i)>0)for(r=e;r<t;r+=i)o=Gb(r,s[r],s[r+1],o);else for(r=t-i;r>=e;r-=i)o=Gb(r,s[r],s[r+1],o);return o&&uh(o,o.next)&&(ul(o),o=o.next),o}function br(s,e){if(!s)return s;e||(e=s);var t=s,i;do if(i=!1,!t.steiner&&(uh(t,t.next)||Et(t.prev,t,t.next)===0)){if(ul(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function cl(s,e,t,i,n,r,o){if(s){!o&&r&&VE(s,i,n,r);for(var a=s,l,h;s.prev!==s.next;){if(l=s.prev,h=s.next,r?HE(s,i,n,r):kE(s)){e.push(l.i/t|0),e.push(s.i/t|0),e.push(h.i/t|0),ul(s),s=h.next,a=h.next;continue}if(s=h,s===a){o?o===1?(s=ZE(br(s),e,t),cl(s,e,t,i,n,r,2)):o===2&&YE(s,e,t,i,n,r):cl(br(s),e,t,i,n,r,1);break}}}}function kE(s){var e=s.prev,t=s,i=s.next;if(Et(e,t,i)>=0)return!1;for(var n=e.x,r=t.x,o=i.x,a=e.y,l=t.y,h=i.y,d=n<r?n<o?n:o:r<o?r:o,c=a<l?a<h?a:h:l<h?l:h,u=n>r?n>o?n:o:r>o?r:o,p=a>l?a>h?a:h:l>h?l:h,f=i.next;f!==e;){if(f.x>=d&&f.x<=u&&f.y>=c&&f.y<=p&&Uo(n,a,r,l,o,h,f.x,f.y)&&Et(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function HE(s,e,t,i){var n=s.prev,r=s,o=s.next;if(Et(n,r,o)>=0)return!1;for(var a=n.x,l=r.x,h=o.x,d=n.y,c=r.y,u=o.y,p=a<l?a<h?a:h:l<h?l:h,f=d<c?d<u?d:u:c<u?c:u,y=a>l?a>h?a:h:l>h?l:h,m=d>c?d>u?d:u:c>u?c:u,g=Np(p,f,e,t,i),v=Np(y,m,e,t,i),b=s.prevZ,x=s.nextZ;b&&b.z>=g&&x&&x.z<=v;){if(b.x>=p&&b.x<=y&&b.y>=f&&b.y<=m&&b!==n&&b!==o&&Uo(a,d,l,c,h,u,b.x,b.y)&&Et(b.prev,b,b.next)>=0||(b=b.prevZ,x.x>=p&&x.x<=y&&x.y>=f&&x.y<=m&&x!==n&&x!==o&&Uo(a,d,l,c,h,u,x.x,x.y)&&Et(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;b&&b.z>=g;){if(b.x>=p&&b.x<=y&&b.y>=f&&b.y<=m&&b!==n&&b!==o&&Uo(a,d,l,c,h,u,b.x,b.y)&&Et(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;x&&x.z<=v;){if(x.x>=p&&x.x<=y&&x.y>=f&&x.y<=m&&x!==n&&x!==o&&Uo(a,d,l,c,h,u,x.x,x.y)&&Et(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function ZE(s,e,t){var i=s;do{var n=i.prev,r=i.next.next;!uh(n,r)&&wb(n,i,i.next,r)&&hl(n,r)&&hl(r,n)&&(e.push(n.i/t|0),e.push(i.i/t|0),e.push(r.i/t|0),ul(i),ul(i.next),i=s=r),i=i.next}while(i!==s);return br(i)}function YE(s,e,t,i,n,r){var o=s;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&$E(o,a)){var l=_b(o,a);o=br(o,o.next),l=br(l,l.next),cl(o,e,t,i,n,r,0),cl(l,e,t,i,n,r,0);return}a=a.next}o=o.next}while(o!==s)}function DE(s,e,t,i){var n=[],r,o,a,l,h;for(r=0,o=e.length;r<o;r++)a=e[r]*i,l=r<o-1?e[r+1]*i:s.length,h=Ib(s,a,l,i,!1),h===h.next&&(h.steiner=!0),n.push(QE(h));for(n.sort(jE),r=0;r<n.length;r++)t=FE(n[r],t);return t}function jE(s,e){return s.x-e.x}function FE(s,e){var t=BE(s,e);if(!t)return e;var i=_b(t,s);return br(i,i.next),br(t,t.next)}function BE(s,e){var t=e,i=s.x,n=s.y,r=-1/0,o;do{if(n<=t.y&&n>=t.next.y&&t.next.y!==t.y){var a=t.x+(n-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(a<=i&&a>r&&(r=a,o=t.x<t.next.x?t:t.next,a===i))return o}t=t.next}while(t!==e);if(!o)return null;var l=o,h=o.x,d=o.y,c=1/0,u;t=o;do i>=t.x&&t.x>=h&&i!==t.x&&Uo(n<d?i:r,n,h,d,n<d?r:i,n,t.x,t.y)&&(u=Math.abs(n-t.y)/(i-t.x),hl(t,s)&&(u<c||u===c&&(t.x>o.x||t.x===o.x&&JE(o,t)))&&(o=t,c=u)),t=t.next;while(t!==l);return o}function JE(s,e){return Et(s.prev,s,e.prev)<0&&Et(e.next,s,s.next)<0}function VE(s,e,t,i){var n=s;do n.z===0&&(n.z=Np(n.x,n.y,e,t,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==s);n.prevZ.nextZ=null,n.prevZ=null,UE(n)}function UE(s){var e,t,i,n,r,o,a,l,h=1;do{for(t=s,s=null,r=null,o=0;t;){for(o++,i=t,a=0,e=0;e<h&&(a++,i=i.nextZ,!!i);e++);for(l=h;a>0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(n=t,t=t.nextZ,a--):(n=i,i=i.nextZ,l--),r?r.nextZ=n:s=n,n.prevZ=r,r=n;t=i}r.nextZ=null,h*=2}while(o>1);return s}function Np(s,e,t,i,n){return s=(s-t)*n|0,e=(e-i)*n|0,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,s|e<<1}function QE(s){var e=s,t=s;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==s);return t}function Uo(s,e,t,i,n,r,o,a){return(n-o)*(e-a)>=(s-o)*(r-a)&&(s-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(r-a)>=(n-o)*(i-a)}function $E(s,e){return s.next.i!==e.i&&s.prev.i!==e.i&&!eA(s,e)&&(hl(s,e)&&hl(e,s)&&tA(s,e)&&(Et(s.prev,s,e.prev)||Et(s,e.prev,e))||uh(s,e)&&Et(s.prev,s,s.next)>0&&Et(e.prev,e,e.next)>0)}function Et(s,e,t){return(e.y-s.y)*(t.x-e.x)-(e.x-s.x)*(t.y-e.y)}function uh(s,e){return s.x===e.x&&s.y===e.y}function wb(s,e,t,i){var n=ph(Et(s,e,t)),r=ph(Et(s,e,i)),o=ph(Et(t,i,s)),a=ph(Et(t,i,e));return!!(n!==r&&o!==a||n===0&&dh(s,t,e)||r===0&&dh(s,i,e)||o===0&&dh(t,s,i)||a===0&&dh(t,e,i))}function dh(s,e,t){return e.x<=Math.max(s.x,t.x)&&e.x>=Math.min(s.x,t.x)&&e.y<=Math.max(s.y,t.y)&&e.y>=Math.min(s.y,t.y)}function ph(s){return s>0?1:s<0?-1:0}function eA(s,e){var t=s;do{if(t.i!==s.i&&t.next.i!==s.i&&t.i!==e.i&&t.next.i!==e.i&&wb(t,t.next,s,e))return!0;t=t.next}while(t!==s);return!1}function hl(s,e){return Et(s.prev,s,s.next)<0?Et(s,e,s.next)>=0&&Et(s,s.prev,e)>=0:Et(s,e,s.prev)<0||Et(s,s.next,e)<0}function tA(s,e){var t=s,i=!1,n=(s.x+e.x)/2,r=(s.y+e.y)/2;do t.y>r!=t.next.y>r&&t.next.y!==t.y&&n<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==s);return i}function _b(s,e){var t=new kp(s.i,s.x,s.y),i=new kp(e.i,e.x,e.y),n=s.next,r=e.prev;return s.next=e,e.prev=s,t.next=n,n.prev=t,i.next=t,t.prev=i,r.next=i,i.prev=r,i}function Gb(s,e,t,i){var n=new kp(s,e,t);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function ul(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function kp(s,e,t){this.i=s,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}hh.deviation=function(s,e,t,i){var n=e&&e.length,r=n?e[0]*t:s.length,o=Math.abs(Hp(s,0,r,t));if(n)for(var a=0,l=e.length;a<l;a++){var h=e[a]*t,d=a<l-1?e[a+1]*t:s.length;o-=Math.abs(Hp(s,h,d,t))}var c=0;for(a=0;a<i.length;a+=3){var u=i[a]*t,p=i[a+1]*t,f=i[a+2]*t;c+=Math.abs((s[u]-s[f])*(s[p+1]-s[u+1])-(s[u]-s[p])*(s[f+1]-s[u+1]))}return o===0&&c===0?0:Math.abs((c-o)/o)};function Hp(s,e,t,i){for(var n=0,r=e,o=t-i;r<t;r+=i)n+=(s[o]-s[r])*(s[r+1]+s[o+1]),o=r;return n}hh.flatten=function(s){for(var e=s[0][0].length,t={vertices:[],holes:[],dimensions:e},i=0,n=0;n<s.length;n++){for(var r=0;r<s[n].length;r++)for(var o=0;o<e;o++)t.vertices.push(s[n][r][o]);n>0&&(i+=s[n-1].length,t.holes.push(i))}return t};var iA=Wp.exports;const nA=cp(iA);var fh={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */fh.exports,function(s,e){(function(t){var i=e&&!e.nodeType&&e,n=s&&!s.nodeType&&s,r=typeof as=="object"&&as;(r.global===r||r.window===r||r.self===r)&&(t=r);var o,a=2147483647,l=36,h=1,d=26,c=38,u=700,p=72,f=128,y="-",m=/^xn--/,g=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=l-h,S=Math.floor,T=String.fromCharCode,C;function I(N){throw new RangeError(b[N])}function L(N,H){for(var ee=N.length,Y=[];ee--;)Y[ee]=H(N[ee]);return Y}function M(N,H){var ee=N.split("@"),Y="";ee.length>1&&(Y=ee[0]+"@",N=ee[1]),N=N.replace(v,".");var U=N.split("."),re=L(U,H).join(".");return Y+re}function K(N){for(var H=[],ee=0,Y=N.length,U,re;ee<Y;)U=N.charCodeAt(ee++),U>=55296&&U<=56319&&ee<Y?(re=N.charCodeAt(ee++),(re&64512)==56320?H.push(((U&1023)<<10)+(re&1023)+65536):(H.push(U),ee--)):H.push(U);return H}function P(N){return L(N,function(H){var ee="";return H>65535&&(H-=65536,ee+=T(H>>>10&1023|55296),H=56320|H&1023),ee+=T(H),ee}).join("")}function G(N){return N-48<10?N-22:N-65<26?N-65:N-97<26?N-97:l}function w(N,H){return N+22+75*(N<26)-((H!=0)<<5)}function R(N,H,ee){var Y=0;for(N=ee?S(N/u):N>>1,N+=S(N/H);N>x*d>>1;Y+=l)N=S(N/x);return S(Y+(x+1)*N/(N+c))}function X(N){var H=[],ee=N.length,Y,U=0,re=f,pe=p,ge,we,Pe,Le,Se,k,it,Te,ke;for(ge=N.lastIndexOf(y),ge<0&&(ge=0),we=0;we<ge;++we)N.charCodeAt(we)>=128&&I("not-basic"),H.push(N.charCodeAt(we));for(Pe=ge>0?ge+1:0;Pe<ee;){for(Le=U,Se=1,k=l;Pe>=ee&&I("invalid-input"),it=G(N.charCodeAt(Pe++)),(it>=l||it>S((a-U)/Se))&&I("overflow"),U+=it*Se,Te=k<=pe?h:k>=pe+d?d:k-pe,!(it<Te);k+=l)ke=l-Te,Se>S(a/ke)&&I("overflow"),Se*=ke;Y=H.length+1,pe=R(U-Le,Y,Le==0),S(U/Y)>a-re&&I("overflow"),re+=S(U/Y),U%=Y,H.splice(U++,0,re)}return P(H)}function z(N){var H,ee,Y,U,re,pe,ge,we,Pe,Le,Se,k=[],it,Te,ke,Xe;for(N=K(N),it=N.length,H=f,ee=0,re=p,pe=0;pe<it;++pe)Se=N[pe],Se<128&&k.push(T(Se));for(Y=U=k.length,U&&k.push(y);Y<it;){for(ge=a,pe=0;pe<it;++pe)Se=N[pe],Se>=H&&Se<ge&&(ge=Se);for(Te=Y+1,ge-H>S((a-ee)/Te)&&I("overflow"),ee+=(ge-H)*Te,H=ge,pe=0;pe<it;++pe)if(Se=N[pe],Se<H&&++ee>a&&I("overflow"),Se==H){for(we=ee,Pe=l;Le=Pe<=re?h:Pe>=re+d?d:Pe-re,!(we<Le);Pe+=l)Xe=we-Le,ke=l-Le,k.push(T(w(Le+Xe%ke,0))),we=S(Xe/ke);k.push(T(w(we,0))),re=R(ee,Te,Y==U),ee=0,++Y}++ee,++H}return k.join("")}function J(N){return M(N,function(H){return m.test(H)?X(H.slice(4).toLowerCase()):H})}function D(N){return M(N,function(H){return g.test(H)?"xn--"+z(H):H})}if(o={version:"1.4.1",ucs2:{decode:K,encode:P},decode:X,encode:z,toASCII:D,toUnicode:J},i&&n)if(s.exports==i)n.exports=o;else for(C in o)o.hasOwnProperty(C)&&(i[C]=o[C]);else t.punycode=o})(as)}(fh,fh.exports);var sA=fh.exports,rA=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var r=Object.getOwnPropertySymbols(e);if(r.length!==1||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0},Pb=typeof Symbol<"u"&&Symbol,oA=rA,aA=function(){return typeof Pb!="function"||typeof Symbol!="function"||typeof Pb("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:oA()},Eb={foo:{}},lA=Object,cA=function(){return{__proto__:Eb}.foo===Eb.foo&&!({__proto__:null}instanceof lA)},hA="Function.prototype.bind called on incompatible ",uA=Object.prototype.toString,dA=Math.max,pA="[object Function]",Ab=function(e,t){for(var i=[],n=0;n<e.length;n+=1)i[n]=e[n];for(var r=0;r<t.length;r+=1)i[r+e.length]=t[r];return i},fA=function(e,t){for(var i=[],n=t||0,r=0;n<e.length;n+=1,r+=1)i[r]=e[n];return i},mA=function(s,e){for(var t="",i=0;i<s.length;i+=1)t+=s[i],i+1<s.length&&(t+=e);return t},gA=function(e){var t=this;if(typeof t!="function"||uA.apply(t)!==pA)throw new TypeError(hA+t);for(var i=fA(arguments,1),n,r=function(){if(this instanceof n){var d=t.apply(this,Ab(i,arguments));return Object(d)===d?d:this}return t.apply(e,Ab(i,arguments))},o=dA(0,t.length-i.length),a=[],l=0;l<o;l++)a[l]="$"+l;if(n=Function("binder","return function ("+mA(a,",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var h=function(){};h.prototype=t.prototype,n.prototype=new h,h.prototype=null}return n},yA=gA,Zp=Function.prototype.bind||yA,vA=Function.prototype.call,bA=Object.prototype.hasOwnProperty,xA=Zp,SA=xA.call(vA,bA),ht,Qo=SyntaxError,Rb=Function,$o=TypeError,Yp=function(s){try{return Rb('"use strict"; return ('+s+").constructor;")()}catch{}},xr=Object.getOwnPropertyDescriptor;if(xr)try{xr({},"")}catch{xr=null}var Dp=function(){throw new $o},LA=xr?function(){try{return arguments.callee,Dp}catch{try{return xr(arguments,"callee").get}catch{return Dp}}}():Dp,ea=aA(),TA=cA(),ti=Object.getPrototypeOf||(TA?function(s){return s.__proto__}:null),ta={},CA=typeof Uint8Array>"u"||!ti?ht:ti(Uint8Array),Sr={"%AggregateError%":typeof AggregateError>"u"?ht:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ht:ArrayBuffer,"%ArrayIteratorPrototype%":ea&&ti?ti([][Symbol.iterator]()):ht,"%AsyncFromSyncIteratorPrototype%":ht,"%AsyncFunction%":ta,"%AsyncGenerator%":ta,"%AsyncGeneratorFunction%":ta,"%AsyncIteratorPrototype%":ta,"%Atomics%":typeof Atomics>"u"?ht:Atomics,"%BigInt%":typeof BigInt>"u"?ht:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ht:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ht:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ht:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ht:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ht:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ht:FinalizationRegistry,"%Function%":Rb,"%GeneratorFunction%":ta,"%Int8Array%":typeof Int8Array>"u"?ht:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ht:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ht:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ea&&ti?ti(ti([][Symbol.iterator]())):ht,"%JSON%":typeof JSON=="object"?JSON:ht,"%Map%":typeof Map>"u"?ht:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ea||!ti?ht:ti(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ht:Promise,"%Proxy%":typeof Proxy>"u"?ht:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ht:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ht:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ea||!ti?ht:ti(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ht:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ea&&ti?ti(""[Symbol.iterator]()):ht,"%Symbol%":ea?Symbol:ht,"%SyntaxError%":Qo,"%ThrowTypeError%":LA,"%TypedArray%":CA,"%TypeError%":$o,"%Uint8Array%":typeof Uint8Array>"u"?ht:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ht:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ht:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ht:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ht:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ht:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ht:WeakSet};if(ti)try{null.error}catch(s){var MA=ti(ti(s));Sr["%Error.prototype%"]=MA}var IA=function s(e){var t;if(e==="%AsyncFunction%")t=Yp("async function () {}");else if(e==="%GeneratorFunction%")t=Yp("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Yp("async function* () {}");else if(e==="%AsyncGenerator%"){var i=s("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=s("%AsyncGenerator%");n&&ti&&(t=ti(n.prototype))}return Sr[e]=t,t},Kb={"%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"]},dl=Zp,mh=SA,wA=dl.call(Function.call,Array.prototype.concat),_A=dl.call(Function.apply,Array.prototype.splice),Ob=dl.call(Function.call,String.prototype.replace),gh=dl.call(Function.call,String.prototype.slice),GA=dl.call(Function.call,RegExp.prototype.exec),PA=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,EA=/\\(\\)?/g,AA=function(e){var t=gh(e,0,1),i=gh(e,-1);if(t==="%"&&i!=="%")throw new Qo("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new Qo("invalid intrinsic syntax, expected opening `%`");var n=[];return Ob(e,PA,function(r,o,a,l){n[n.length]=a?Ob(l,EA,"$1"):o||r}),n},RA=function(e,t){var i=e,n;if(mh(Kb,i)&&(n=Kb[i],i="%"+n[0]+"%"),mh(Sr,i)){var r=Sr[i];if(r===ta&&(r=IA(i)),typeof r>"u"&&!t)throw new $o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:r}}throw new Qo("intrinsic "+e+" does not exist!")},Lr=function(e,t){if(typeof e!="string"||e.length===0)throw new $o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new $o('"allowMissing" argument must be a boolean');if(GA(/^%?[^%]*%?$/,e)===null)throw new Qo("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=AA(e),n=i.length>0?i[0]:"",r=RA("%"+n+"%",t),o=r.name,a=r.value,l=!1,h=r.alias;h&&(n=h[0],_A(i,wA([0,1],h)));for(var d=1,c=!0;d<i.length;d+=1){var u=i[d],p=gh(u,0,1),f=gh(u,-1);if((p==='"'||p==="'"||p==="`"||f==='"'||f==="'"||f==="`")&&p!==f)throw new Qo("property names with quotes must have matching quotes");if((u==="constructor"||!c)&&(l=!0),n+="."+u,o="%"+n+"%",mh(Sr,o))a=Sr[o];else if(a!=null){if(!(u in a)){if(!t)throw new $o("base intrinsic for "+e+" exists, but the property is not available.");return}if(xr&&d+1>=i.length){var y=xr(a,u);c=!!y,c&&"get"in y&&!("originalValue"in y.get)?a=y.get:a=a[u]}else c=mh(a,u),a=a[u];c&&!l&&(Sr[o]=a)}}return a},qb={exports:{}},KA=Lr,jp=KA("%Object.defineProperty%",!0),Fp=function(){if(jp)try{return jp({},"a",{value:1}),!0}catch{return!1}return!1};Fp.hasArrayLengthDefineBug=function(){if(!Fp())return null;try{return jp([],"length",{value:1}).length!==1}catch{return!0}};var Xb=Fp,OA=Lr,yh=OA("%Object.getOwnPropertyDescriptor%",!0);if(yh)try{yh([],"length")}catch{yh=null}var zb=yh,qA=Xb(),Bp=Lr,pl=qA&&Bp("%Object.defineProperty%",!0);if(pl)try{pl({},"a",{value:1})}catch{pl=!1}var XA=Bp("%SyntaxError%"),ia=Bp("%TypeError%"),Wb=zb,zA=function(e,t,i){if(!e||typeof e!="object"&&typeof e!="function")throw new ia("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new ia("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ia("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ia("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ia("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ia("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Wb&&Wb(e,t);if(pl)pl(e,t,{configurable:o===null&&l?l.configurable:!o,enumerable:n===null&&l?l.enumerable:!n,value:i,writable:r===null&&l?l.writable:!r});else if(a||!n&&!r&&!o)e[t]=i;else throw new XA("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Nb=Lr,kb=zA,WA=Xb(),Hb=zb,Zb=Nb("%TypeError%"),NA=Nb("%Math.floor%"),kA=function(e,t){if(typeof e!="function")throw new Zb("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||NA(t)!==t)throw new Zb("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,r=!0;if("length"in e&&Hb){var o=Hb(e,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(r=!1)}return(n||r||!i)&&(WA?kb(e,"length",t,!0,!0):kb(e,"length",t)),e};(function(s){var e=Zp,t=Lr,i=kA,n=t("%TypeError%"),r=t("%Function.prototype.apply%"),o=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(o,r),l=t("%Object.defineProperty%",!0),h=t("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}s.exports=function(u){if(typeof u!="function")throw new n("a function is required");var p=a(e,o,arguments);return i(p,1+h(0,u.length-(arguments.length-1)),!0)};var d=function(){return a(e,r,arguments)};l?l(s.exports,"apply",{value:d}):s.exports.apply=d})(qb);var HA=qb.exports,Yb=Lr,Db=HA,ZA=Db(Yb("String.prototype.indexOf")),YA=function(e,t){var i=Yb(e,!!t);return typeof i=="function"&&ZA(e,".prototype.")>-1?Db(i):i};const DA=FG(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Jp=typeof Map=="function"&&Map.prototype,Vp=Object.getOwnPropertyDescriptor&&Jp?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,vh=Jp&&Vp&&typeof Vp.get=="function"?Vp.get:null,jb=Jp&&Map.prototype.forEach,Up=typeof Set=="function"&&Set.prototype,Qp=Object.getOwnPropertyDescriptor&&Up?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,bh=Up&&Qp&&typeof Qp.get=="function"?Qp.get:null,Fb=Up&&Set.prototype.forEach,jA=typeof WeakMap=="function"&&WeakMap.prototype,fl=jA?WeakMap.prototype.has:null,FA=typeof WeakSet=="function"&&WeakSet.prototype,ml=FA?WeakSet.prototype.has:null,BA=typeof WeakRef=="function"&&WeakRef.prototype,Bb=BA?WeakRef.prototype.deref:null,JA=Boolean.prototype.valueOf,VA=Object.prototype.toString,UA=Function.prototype.toString,QA=String.prototype.match,$p=String.prototype.slice,Ks=String.prototype.replace,$A=String.prototype.toUpperCase,Jb=String.prototype.toLowerCase,Vb=RegExp.prototype.test,Ub=Array.prototype.concat,Kn=Array.prototype.join,eR=Array.prototype.slice,Qb=Math.floor,ef=typeof BigInt=="function"?BigInt.prototype.valueOf:null,tf=Object.getOwnPropertySymbols,nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,na=typeof Symbol=="function"&&typeof Symbol.iterator=="object",gi=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===na||!0)?Symbol.toStringTag:null,$b=Object.prototype.propertyIsEnumerable,ex=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(s){return s.__proto__}:null);function tx(s,e){if(s===1/0||s===-1/0||s!==s||s&&s>-1e3&&s<1e3||Vb.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof s=="number"){var i=s<0?-Qb(-s):Qb(s);if(i!==s){var n=String(i),r=$p.call(e,n.length+1);return Ks.call(n,t,"$&_")+"."+Ks.call(Ks.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ks.call(e,t,"$&_")}var sf=DA,ix=sf.custom,nx=ox(ix)?ix:null,tR=function s(e,t,i,n){var r=t||{};if(Os(r,"quoteStyle")&&r.quoteStyle!=="single"&&r.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Os(r,"maxStringLength")&&(typeof r.maxStringLength=="number"?r.maxStringLength<0&&r.maxStringLength!==1/0:r.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Os(r,"customInspect")?r.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Os(r,"indent")&&r.indent!==null&&r.indent!==" "&&!(parseInt(r.indent,10)===r.indent&&r.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Os(r,"numericSeparator")&&typeof r.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=r.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return lx(e,r);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?tx(e,l):l}if(typeof e=="bigint"){var h=String(e)+"n";return a?tx(e,h):h}var d=typeof r.depth>"u"?5:r.depth;if(typeof i>"u"&&(i=0),i>=d&&d>0&&typeof e=="object")return rf(e)?"[Array]":"[Object]";var c=bR(r,i);if(typeof n>"u")n=[];else if(ax(n,e)>=0)return"[Circular]";function u(G,w,R){if(w&&(n=eR.call(n),n.push(w)),R){var X={depth:r.depth};return Os(r,"quoteStyle")&&(X.quoteStyle=r.quoteStyle),s(G,X,i+1,n)}return s(G,r,i+1,n)}if(typeof e=="function"&&!rx(e)){var p=hR(e),f=xh(e,u);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(f.length>0?" { "+Kn.call(f,", ")+" }":"")}if(ox(e)){var y=na?Ks.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):nf.call(e);return typeof e=="object"&&!na?gl(y):y}if(gR(e)){for(var m="<"+Jb.call(String(e.nodeName)),g=e.attributes||[],v=0;v<g.length;v++)m+=" "+g[v].name+"="+sx(iR(g[v].value),"double",r);return m+=">",e.childNodes&&e.childNodes.length&&(m+="..."),m+="</"+Jb.call(String(e.nodeName))+">",m}if(rf(e)){if(e.length===0)return"[]";var b=xh(e,u);return c&&!vR(b)?"["+af(b,c)+"]":"[ "+Kn.call(b,", ")+" ]"}if(sR(e)){var x=xh(e,u);return!("cause"in Error.prototype)&&"cause"in e&&!$b.call(e,"cause")?"{ ["+String(e)+"] "+Kn.call(Ub.call("[cause]: "+u(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Kn.call(x,", ")+" }"}if(typeof e=="object"&&o){if(nx&&typeof e[nx]=="function"&&sf)return sf(e,{depth:d-i});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(uR(e)){var S=[];return jb&&jb.call(e,function(G,w){S.push(u(w,e,!0)+" => "+u(G,e))}),cx("Map",vh.call(e),S,c)}if(fR(e)){var T=[];return Fb&&Fb.call(e,function(G){T.push(u(G,e))}),cx("Set",bh.call(e),T,c)}if(dR(e))return of("WeakMap");if(mR(e))return of("WeakSet");if(pR(e))return of("WeakRef");if(oR(e))return gl(u(Number(e)));if(lR(e))return gl(u(ef.call(e)));if(aR(e))return gl(JA.call(e));if(rR(e))return gl(u(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===as)return"{ [object globalThis] }";if(!nR(e)&&!rx(e)){var C=xh(e,u),I=ex?ex(e)===Object.prototype:e instanceof Object||e.constructor===Object,L=e instanceof Object?"":"null prototype",M=!I&&gi&&Object(e)===e&&gi in e?$p.call(qs(e),8,-1):L?"Object":"",K=I||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",P=K+(M||L?"["+Kn.call(Ub.call([],M||[],L||[]),": ")+"] ":"");return C.length===0?P+"{}":c?P+"{"+af(C,c)+"}":P+"{ "+Kn.call(C,", ")+" }"}return String(e)};function sx(s,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+s+i}function iR(s){return Ks.call(String(s),/"/g,"&quot;")}function rf(s){return qs(s)==="[object Array]"&&(!gi||!(typeof s=="object"&&gi in s))}function nR(s){return qs(s)==="[object Date]"&&(!gi||!(typeof s=="object"&&gi in s))}function rx(s){return qs(s)==="[object RegExp]"&&(!gi||!(typeof s=="object"&&gi in s))}function sR(s){return qs(s)==="[object Error]"&&(!gi||!(typeof s=="object"&&gi in s))}function rR(s){return qs(s)==="[object String]"&&(!gi||!(typeof s=="object"&&gi in s))}function oR(s){return qs(s)==="[object Number]"&&(!gi||!(typeof s=="object"&&gi in s))}function aR(s){return qs(s)==="[object Boolean]"&&(!gi||!(typeof s=="object"&&gi in s))}function ox(s){if(na)return s&&typeof s=="object"&&s instanceof Symbol;if(typeof s=="symbol")return!0;if(!s||typeof s!="object"||!nf)return!1;try{return nf.call(s),!0}catch{}return!1}function lR(s){if(!s||typeof s!="object"||!ef)return!1;try{return ef.call(s),!0}catch{}return!1}var cR=Object.prototype.hasOwnProperty||function(s){return s in this};function Os(s,e){return cR.call(s,e)}function qs(s){return VA.call(s)}function hR(s){if(s.name)return s.name;var e=QA.call(UA.call(s),/^function\s*([\w$]+)/);return e?e[1]:null}function ax(s,e){if(s.indexOf)return s.indexOf(e);for(var t=0,i=s.length;t<i;t++)if(s[t]===e)return t;return-1}function uR(s){if(!vh||!s||typeof s!="object")return!1;try{vh.call(s);try{bh.call(s)}catch{return!0}return s instanceof Map}catch{}return!1}function dR(s){if(!fl||!s||typeof s!="object")return!1;try{fl.call(s,fl);try{ml.call(s,ml)}catch{return!0}return s instanceof WeakMap}catch{}return!1}function pR(s){if(!Bb||!s||typeof s!="object")return!1;try{return Bb.call(s),!0}catch{}return!1}function fR(s){if(!bh||!s||typeof s!="object")return!1;try{bh.call(s);try{vh.call(s)}catch{return!0}return s instanceof Set}catch{}return!1}function mR(s){if(!ml||!s||typeof s!="object")return!1;try{ml.call(s,ml);try{fl.call(s,fl)}catch{return!0}return s instanceof WeakSet}catch{}return!1}function gR(s){return!s||typeof s!="object"?!1:typeof HTMLElement<"u"&&s instanceof HTMLElement?!0:typeof s.nodeName=="string"&&typeof s.getAttribute=="function"}function lx(s,e){if(s.length>e.maxStringLength){var t=s.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return lx($p.call(s,0,e.maxStringLength),e)+i}var n=Ks.call(Ks.call(s,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,yR);return sx(n,"single",e)}function yR(s){var e=s.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+$A.call(e.toString(16))}function gl(s){return"Object("+s+")"}function of(s){return s+" { ? }"}function cx(s,e,t,i){var n=i?af(t,i):Kn.call(t,", ");return s+" ("+e+") {"+n+"}"}function vR(s){for(var e=0;e<s.length;e++)if(ax(s[e],`
8042
+ }`),this.camera.position.set(10,0,-10),this.camera.lookAt(new A),this.ptRenderer=new P2(this.renderer),this.ptRenderer.camera=this.camera,this.ptRenderer.material=new OG,this.ptRenderer.tiles.set(1,1),this.ptRenderer.material.filterGlossyFactor=.6,this.ptRenderer.material.environmentIntensity=this.renderer.toneMappingExposure,this.ptRenderer.material.backgroundAlpha=0,this.ptRenderer.material.environmentBlur=0,this.ptRenderer.material.bounces=6,this.ptRenderer.material.transmissiveBounces=8,this.ptRenderer.alpha=!0,this.fsQuad=new ns(new Tn({map:this.ptRenderer.target.texture,blending:km})),this.controls.addEventListener("change",()=>{this.sampleCount=0,this.ptRenderer.reset()}),this._composer=new XG(this.renderer),this._composer.setPixelRatio(window.devicePixelRatio),this._composer.addPass(new v2(this.scene,this.camera)),this._composer.addPass(new T2),this._outlinePass=new ss(new me(window.innerWidth,window.innerHeight),this.scene,this.camera),this._outlinePass.visibleEdgeColor.set(26367),this._outlinePass.edgeThickness=.5,this._outlinePass.hiddenEdgeColor.set(26367),this._outlinePass.edgeStrength=3,this._outlinePass.edgeGlow=0,this._composer.addPass(this._outlinePass),this._outlinePassError=new ss(new me(window.innerWidth,window.innerHeight),this.scene,this.camera),this._outlinePassError.visibleEdgeColor.set(16711680),this._outlinePassError.edgeThickness=.5,this._outlinePassError.hiddenEdgeColor.set(16711680),this._outlinePassError.edgeStrength=3,this._outlinePassError.edgeGlow=0,this._composer.addPass(this._outlinePassError),this._composer.renderTarget1.texture.colorSpace=gt,this._composer.renderTarget2.texture.colorSpace=gt,this._fxaaPass=new m0(b2),this._composer.addPass(this._fxaaPass),this.scene.add(this._container),this.ticker(),this._loadEnv(),this._initEvents()}get usePathTracing(){return this._usePathTracing}set usePathTracing(e){e?(this.bodyOpacity=1,this.slots.forEach(t=>t.hide()),this.lines.hide()):(this.slots.forEach(t=>t.show()),this.lines.show(),this.opacityCache!==void 0?(this.bodyOpacity=this.opacityCache,this.opacityCache=void 0):this.bodyOpacity=1),this._usePathTracing=e,this.controls.dampingFactor=e?1:ub,this.sampleCount=0}get slots(){return this._slots}get logos(){return this._logos}get skins(){return this._skins}get fpsAverage(){return Lv(this._fpsCache)}set bodyOpacity(e){this._bodyOpacity=e,e<1?this._materialsCache.forEach(t=>{t.mat.transparent=!0,t.mat.opacity=e,t.mat.metalness=0,t.mat.roughness=1,t.mat.color=new Ke("#3859be")}):this._materialsCache.forEach(t=>{t.mat.transparent=t.transparent,t.mat.opacity=t.opacity,t.mat.metalness=t.metalness,t.mat.roughness=t.roughness,t.mat.color=t.color})}get bodyOpacity(){return this._bodyOpacity}changeSkin(e,t){var n;if(!e)return;const i=e.target.name;this.usePathTracing?((n=this.sceneInfo.materials.find(r=>r.name===i))==null||n.color.set(t),this.ptRenderer.material.materials.updateFrom(this.sceneInfo.materials,this.sceneInfo.textures),this.sampleCount=0,this.ptRenderer.reset()):e.target.color.set(t)}showState(){this.stats.dom.style.display="block"}hideState(){this.stats.dom.style.display="none"}_loadEnv(){new f2(new r0).load(KE,t=>{t.mapping=ql,t.minFilter=at,t.magFilter=at,t.colorSpace=gt,t.needsUpdate=!0,this._usePathTracing||(this.scene.environment=t),this.ptRenderer.material.envMapInfo.updateFrom(t),this.ptRenderer.reset()},()=>{},()=>{})}_initEvents(){document.addEventListener("wheel",this._detectTrackpad),this.renderer.domElement.addEventListener("pointermove",this._pointermove),this.renderer.domElement.addEventListener("pointerdown",this._pointerdown)}changeLogo(e,t){var r;const i=OE.load(t);i.flipY=!1,i.colorSpace=gt;const n=e.target;n.material&&(Array.isArray(n.material)?n.material.forEach(o=>{var a;(a=o.map)==null||a.dispose(),o.map=i}):((r=n.material.map)==null||r.dispose(),n.material.map=i))}async generateBVH(){this.slots.forEach(h=>h.hide()),this.lines.hide(),this.opacityCache=this.bodyOpacity,this.bodyOpacity=1;const e=new QG;this._container.updateMatrixWorld();const{bvh:t,textures:i,materials:n,lights:r}=await e.generate(this._container);this.sceneInfo={materials:n,textures:i};const o=t.geometry,a=this.ptRenderer.material;a.bvh.updateFrom(t),a.attributesArray.updateFrom(o.attributes.normal,o.attributes.tangent,o.attributes.uv,o.attributes.color),a.materialIndexAttribute.updateFrom(o.attributes.materialIndex);const l=window.devicePixelRatio||1;a.textures.setTextures(this.renderer,1024*l,1024*l,i),a.materials.updateFrom(n,i),a.lights.updateFrom(r),a.lightCount=r.length,this.ptRenderer.material.materials.updateFrom(this.sceneInfo.materials,this.sceneInfo.textures),this.ptRenderer.reset(),this.sampleCount=0,e.dispose(),this.usePathTracing=!0}download(){return this.renderer.domElement.toDataURL("image/png")}clearAMR(){th(this._container),this._slots=[],this._logos=[],this._skins=[],this._materialsCache.clear(),this.opacityCache=void 0,this.usePathTracing=!1,this.lines.clear()}async exportAMR(){const e=this._container.clone(!0);return e.traverse(t=>{t.dispose&&(t.dispose(),t.removeFromParent())}),await Wv.parseAsync(e,{onlyVisible:!0,binary:!0})}async addAMR(e){!e.startsWith("blob")&&e.endsWith(".sglb");let t;if(e.endsWith(".glb")){console.log(e);let{scene:a}=await il.loadAsync(e);console.log(a),t=a}else{const l=await new Lp({useCache:!0}).loadAsync(e);if(!l.glb)return;t=l.glb}const i=t.clone(!0);i.traverse(a=>{if(a instanceof jt&&(a.material&&(Array.isArray(a.material)?a.material.forEach(l=>{l.userData.changeColor&&this._skins.push({name:l.userData.name,target:l})}):a.material.userData.changeColor&&this._skins.push({name:a.material.userData.name,target:a.material})),a.userData.isLOGO&&(a.material.transparent=!0,this._logos.push({name:a.userData.name,target:a}))),a.name.startsWith("Slot")){const l=a.userData.name;if(l&&a.userData.isSlot){const h=new Tp({name:l,slot:a});h.addEventListener(un.ON_DROP,d=>{this.props.useSound&&this._sound.play()}),h.addEventListener(un.ON_BEFORE_SELECTED,d=>{this.slots.forEach(c=>{c.selected&&(c.selected=!1)})}),h.addEventListener(un.ON_ERROR_STATE_CHANGE,d=>{if(this._outlinePassError.selectedObjects=this._outlinePassError.selectedObjects.filter(c=>!!c.parent),d){if(h.device){if(this._outlinePassError.selectedObjects.find(u=>{var p;return u.parent==((p=h.device)==null?void 0:p.parent)}))return;this._outlinePassError.selectedObjects=[h.device,...this._outlinePassError.selectedObjects]}}else h.device&&(this._outlinePassError.selectedObjects=this._outlinePassError.selectedObjects.filter(c=>{var u;return c.parent!=((u=h.device)==null?void 0:u.parent)}))}),this.slots.push(h),a.add(h)}}}),i.traverse(a=>{if(a instanceof jt&&a.material)if(Array.isArray(a.material))a.material.forEach(h=>{this._materialsCache.set(h.uuid,{opacity:h.opacity,transparent:h.transparent,roughness:h.roughness,metalness:h.metalness,color:h.color,mat:h})});else{const l=a.material;this._materialsCache.set(l.uuid,{opacity:l.opacity,transparent:l.transparent,roughness:l.roughness,metalness:l.metalness,color:l.color,mat:l})}}),i.updateMatrixWorld(!0),this._container.updateMatrixWorld(),this.add(i);const n=new Gt;n.setFromObject(this._container);const r=new A;n.getSize(r);const o=Math.max(r.x,r.y,r.z);this.controls.minDistance=o*2/3,this.controls.maxDistance=o*2}select(e){typeof e=="string"||(Array.isArray(e)?this._outlinePass.selectedObjects=[...e]:this._outlinePass.selectedObjects=[e])}appendTo(e){e.append(this.renderer.domElement),e.append(this.stats.dom),e.append(this.lines),e.append(this.css2dRenderer.domElement),this.stats.dom.style.bottom="0",this.stats.dom.style.top="auto",this.resize(),this._resizeObserver=new ResizeObserver(this.resize),this._resizeObserver.observe(e)}add(e){this._container.add(e)}updatePosition(){this.lines.forceUpdate()}destroy(){var t,i;this.stats.dom.remove(),this._emitter.removeAllListeners(),(t=this._fitAnimation)==null||t.stop(),document.removeEventListener("wheel",this._detectTrackpad),this.renderer.domElement.removeEventListener("pointermove",this._pointermove);const e=this.renderer.domElement.parentElement;e&&((i=this._resizeObserver)==null||i.unobserve(e)),this.controls.dispose(),this.renderer.dispose(),this._composer.dispose(),this.scene.traverse(n=>{n instanceof jt?(n.geometry.dispose(),Array.isArray(n.material)?n.material.forEach(r=>r.dispose()):n.material&&n.material.dispose()):n instanceof Tp&&n.dispose(),n.removeFromParent()})}}var vr=(s=>(s[s.WEBGL_LEGACY=0]="WEBGL_LEGACY",s[s.WEBGL=1]="WEBGL",s[s.WEBGL2=2]="WEBGL2",s))(vr||{}),db=(s=>(s[s.UNKNOWN=0]="UNKNOWN",s[s.WEBGL=1]="WEBGL",s[s.CANVAS=2]="CANVAS",s))(db||{}),Op=(s=>(s[s.COLOR=16384]="COLOR",s[s.DEPTH=256]="DEPTH",s[s.STENCIL=1024]="STENCIL",s))(Op||{}),He=(s=>(s[s.NORMAL=0]="NORMAL",s[s.ADD=1]="ADD",s[s.MULTIPLY=2]="MULTIPLY",s[s.SCREEN=3]="SCREEN",s[s.OVERLAY=4]="OVERLAY",s[s.DARKEN=5]="DARKEN",s[s.LIGHTEN=6]="LIGHTEN",s[s.COLOR_DODGE=7]="COLOR_DODGE",s[s.COLOR_BURN=8]="COLOR_BURN",s[s.HARD_LIGHT=9]="HARD_LIGHT",s[s.SOFT_LIGHT=10]="SOFT_LIGHT",s[s.DIFFERENCE=11]="DIFFERENCE",s[s.EXCLUSION=12]="EXCLUSION",s[s.HUE=13]="HUE",s[s.SATURATION=14]="SATURATION",s[s.COLOR=15]="COLOR",s[s.LUMINOSITY=16]="LUMINOSITY",s[s.NORMAL_NPM=17]="NORMAL_NPM",s[s.ADD_NPM=18]="ADD_NPM",s[s.SCREEN_NPM=19]="SCREEN_NPM",s[s.NONE=20]="NONE",s[s.SRC_OVER=0]="SRC_OVER",s[s.SRC_IN=21]="SRC_IN",s[s.SRC_OUT=22]="SRC_OUT",s[s.SRC_ATOP=23]="SRC_ATOP",s[s.DST_OVER=24]="DST_OVER",s[s.DST_IN=25]="DST_IN",s[s.DST_OUT=26]="DST_OUT",s[s.DST_ATOP=27]="DST_ATOP",s[s.ERASE=26]="ERASE",s[s.SUBTRACT=28]="SUBTRACT",s[s.XOR=29]="XOR",s))(He||{}),Pn=(s=>(s[s.POINTS=0]="POINTS",s[s.LINES=1]="LINES",s[s.LINE_LOOP=2]="LINE_LOOP",s[s.LINE_STRIP=3]="LINE_STRIP",s[s.TRIANGLES=4]="TRIANGLES",s[s.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",s[s.TRIANGLE_FAN=6]="TRIANGLE_FAN",s))(Pn||{}),se=(s=>(s[s.RGBA=6408]="RGBA",s[s.RGB=6407]="RGB",s[s.RG=33319]="RG",s[s.RED=6403]="RED",s[s.RGBA_INTEGER=36249]="RGBA_INTEGER",s[s.RGB_INTEGER=36248]="RGB_INTEGER",s[s.RG_INTEGER=33320]="RG_INTEGER",s[s.RED_INTEGER=36244]="RED_INTEGER",s[s.ALPHA=6406]="ALPHA",s[s.LUMINANCE=6409]="LUMINANCE",s[s.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",s[s.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",s[s.DEPTH_STENCIL=34041]="DEPTH_STENCIL",s))(se||{}),Jo=(s=>(s[s.TEXTURE_2D=3553]="TEXTURE_2D",s[s.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",s[s.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",s[s.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",s[s.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",s[s.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",s[s.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",s))(Jo||{}),Ae=(s=>(s[s.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",s[s.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",s[s.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",s[s.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",s[s.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",s[s.UNSIGNED_INT=5125]="UNSIGNED_INT",s[s.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",s[s.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",s[s.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",s[s.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",s[s.BYTE=5120]="BYTE",s[s.SHORT=5122]="SHORT",s[s.INT=5124]="INT",s[s.FLOAT=5126]="FLOAT",s[s.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",s[s.HALF_FLOAT=36193]="HALF_FLOAT",s))(Ae||{}),ve=(s=>(s[s.FLOAT=0]="FLOAT",s[s.INT=1]="INT",s[s.UINT=2]="UINT",s))(ve||{}),ls=(s=>(s[s.NEAREST=0]="NEAREST",s[s.LINEAR=1]="LINEAR",s))(ls||{}),Rs=(s=>(s[s.CLAMP=33071]="CLAMP",s[s.REPEAT=10497]="REPEAT",s[s.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",s))(Rs||{}),En=(s=>(s[s.OFF=0]="OFF",s[s.POW2=1]="POW2",s[s.ON=2]="ON",s[s.ON_MANUAL=3]="ON_MANUAL",s))(En||{}),Gi=(s=>(s[s.NPM=0]="NPM",s[s.UNPACK=1]="UNPACK",s[s.PMA=2]="PMA",s[s.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",s[s.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",s[s.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",s))(Gi||{}),An=(s=>(s[s.NO=0]="NO",s[s.YES=1]="YES",s[s.AUTO=2]="AUTO",s[s.BLEND=0]="BLEND",s[s.CLEAR=1]="CLEAR",s[s.BLIT=2]="BLIT",s))(An||{}),qp=(s=>(s[s.AUTO=0]="AUTO",s[s.MANUAL=1]="MANUAL",s))(qp||{}),Vi=(s=>(s.LOW="lowp",s.MEDIUM="mediump",s.HIGH="highp",s))(Vi||{}),Jt=(s=>(s[s.NONE=0]="NONE",s[s.SCISSOR=1]="SCISSOR",s[s.STENCIL=2]="STENCIL",s[s.SPRITE=3]="SPRITE",s[s.COLOR=4]="COLOR",s))(Jt||{}),Zt=(s=>(s[s.NONE=0]="NONE",s[s.LOW=2]="LOW",s[s.MEDIUM=4]="MEDIUM",s[s.HIGH=8]="HIGH",s))(Zt||{}),Rn=(s=>(s[s.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",s[s.ARRAY_BUFFER=34962]="ARRAY_BUFFER",s[s.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",s))(Rn||{});const be={ADAPTER:{createCanvas:(s,e)=>{const t=document.createElement("canvas");return t.width=s,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(s,e)=>fetch(s,e),parseXML:s=>new DOMParser().parseFromString(s,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var Xp=/iPhone/i,pb=/iPod/i,fb=/iPad/i,mb=/\biOS-universal(?:.+)Mac\b/i,zp=/\bAndroid(?:.+)Mobile\b/i,gb=/Android/i,Vo=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ch=/Silk/i,cs=/Windows Phone/i,yb=/\bWindows(?:.+)ARM\b/i,vb=/BlackBerry/i,bb=/BB10/i,xb=/Opera Mini/i,Sb=/\b(CriOS|Chrome)(?:.+)Mobile/i,Lb=/Mobile(?:.+)Firefox\b/i,Tb=function(s){return typeof s<"u"&&s.platform==="MacIntel"&&typeof s.maxTouchPoints=="number"&&s.maxTouchPoints>1&&typeof MSStream>"u"};function zE(s){return function(e){return e.test(s)}}function Cb(s){var e={userAgent:"",platform:"",maxTouchPoints:0};!s&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof s=="string"?e.userAgent=s:s&&s.userAgent&&(e={userAgent:s.userAgent,platform:s.platform,maxTouchPoints:s.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var n=zE(t),r={apple:{phone:n(Xp)&&!n(cs),ipod:n(pb),tablet:!n(Xp)&&(n(fb)||Tb(e))&&!n(cs),universal:n(mb),device:(n(Xp)||n(pb)||n(fb)||n(mb)||Tb(e))&&!n(cs)},amazon:{phone:n(Vo),tablet:!n(Vo)&&n(ch),device:n(Vo)||n(ch)},android:{phone:!n(cs)&&n(Vo)||!n(cs)&&n(zp),tablet:!n(cs)&&!n(Vo)&&!n(zp)&&(n(ch)||n(gb)),device:!n(cs)&&(n(Vo)||n(ch)||n(zp)||n(gb))||n(/\bokhttp\b/i)},windows:{phone:n(cs),tablet:n(yb),device:n(cs)||n(yb)},other:{blackberry:n(vb),blackberry10:n(bb),opera:n(xb),firefox:n(Lb),chrome:n(Sb),device:n(vb)||n(bb)||n(xb)||n(Lb)||n(Sb)},any:!1,phone:!1,tablet:!1};return r.any=r.apple.device||r.android.device||r.windows.device||r.other.device,r.phone=r.apple.phone||r.android.phone||r.windows.phone,r.tablet=r.apple.tablet||r.android.tablet||r.windows.tablet,r}const WE=Cb.default??Cb,hs=WE(globalThis.navigator);be.RETINA_PREFIX=/@([0-9\.]+)x/,be.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Mb={exports:{}};(function(s){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function n(l,h,d){this.fn=l,this.context=h,this.once=d||!1}function r(l,h,d,c,u){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new n(d,c||l,u),f=t?t+h:h;return l._events[f]?l._events[f].fn?l._events[f]=[l._events[f],p]:l._events[f].push(p):(l._events[f]=p,l._eventsCount++),l}function o(l,h){--l._eventsCount===0?l._events=new i:delete l._events[h]}function a(){this._events=new i,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],d,c;if(this._eventsCount===0)return h;for(c in d=this._events)e.call(d,c)&&h.push(t?c.slice(1):c);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(d)):h},a.prototype.listeners=function(h){var d=t?t+h:h,c=this._events[d];if(!c)return[];if(c.fn)return[c.fn];for(var u=0,p=c.length,f=new Array(p);u<p;u++)f[u]=c[u].fn;return f},a.prototype.listenerCount=function(h){var d=t?t+h:h,c=this._events[d];return c?c.fn?1:c.length:0},a.prototype.emit=function(h,d,c,u,p,f){var y=t?t+h:h;if(!this._events[y])return!1;var m=this._events[y],g=arguments.length,v,b;if(m.fn){switch(m.once&&this.removeListener(h,m.fn,void 0,!0),g){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,d),!0;case 3:return m.fn.call(m.context,d,c),!0;case 4:return m.fn.call(m.context,d,c,u),!0;case 5:return m.fn.call(m.context,d,c,u,p),!0;case 6:return m.fn.call(m.context,d,c,u,p,f),!0}for(b=1,v=new Array(g-1);b<g;b++)v[b-1]=arguments[b];m.fn.apply(m.context,v)}else{var x=m.length,S;for(b=0;b<x;b++)switch(m[b].once&&this.removeListener(h,m[b].fn,void 0,!0),g){case 1:m[b].fn.call(m[b].context);break;case 2:m[b].fn.call(m[b].context,d);break;case 3:m[b].fn.call(m[b].context,d,c);break;case 4:m[b].fn.call(m[b].context,d,c,u);break;default:if(!v)for(S=1,v=new Array(g-1);S<g;S++)v[S-1]=arguments[S];m[b].fn.apply(m[b].context,v)}}return!0},a.prototype.on=function(h,d,c){return r(this,h,d,c,!1)},a.prototype.once=function(h,d,c){return r(this,h,d,c,!0)},a.prototype.removeListener=function(h,d,c,u){var p=t?t+h:h;if(!this._events[p])return this;if(!d)return o(this,p),this;var f=this._events[p];if(f.fn)f.fn===d&&(!u||f.once)&&(!c||f.context===c)&&o(this,p);else{for(var y=0,m=[],g=f.length;y<g;y++)(f[y].fn!==d||u&&!f[y].once||c&&f[y].context!==c)&&m.push(f[y]);m.length?this._events[p]=m.length===1?m[0]:m:o(this,p)}return this},a.prototype.removeAllListeners=function(h){var d;return h?(d=t?t+h:h,this._events[d]&&o(this,d)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,s.exports=a})(Mb);var NE=Mb.exports;const ll=cp(NE);var Wp={exports:{}};Wp.exports=hh,Wp.exports.default=hh;function hh(s,e,t){t=t||2;var i=e&&e.length,n=i?e[0]*t:s.length,r=Ib(s,0,n,t,!0),o=[];if(!r||r.next===r.prev)return o;var a,l,h,d,c,u,p;if(i&&(r=DE(s,e,r,t)),s.length>80*t){a=h=s[0],l=d=s[1];for(var f=t;f<n;f+=t)c=s[f],u=s[f+1],c<a&&(a=c),u<l&&(l=u),c>h&&(h=c),u>d&&(d=u);p=Math.max(h-a,d-l),p=p!==0?32767/p:0}return cl(r,o,t,a,l,p,0),o}function Ib(s,e,t,i,n){var r,o;if(n===Hp(s,e,t,i)>0)for(r=e;r<t;r+=i)o=Gb(r,s[r],s[r+1],o);else for(r=t-i;r>=e;r-=i)o=Gb(r,s[r],s[r+1],o);return o&&uh(o,o.next)&&(ul(o),o=o.next),o}function br(s,e){if(!s)return s;e||(e=s);var t=s,i;do if(i=!1,!t.steiner&&(uh(t,t.next)||Et(t.prev,t,t.next)===0)){if(ul(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function cl(s,e,t,i,n,r,o){if(s){!o&&r&&VE(s,i,n,r);for(var a=s,l,h;s.prev!==s.next;){if(l=s.prev,h=s.next,r?HE(s,i,n,r):kE(s)){e.push(l.i/t|0),e.push(s.i/t|0),e.push(h.i/t|0),ul(s),s=h.next,a=h.next;continue}if(s=h,s===a){o?o===1?(s=ZE(br(s),e,t),cl(s,e,t,i,n,r,2)):o===2&&YE(s,e,t,i,n,r):cl(br(s),e,t,i,n,r,1);break}}}}function kE(s){var e=s.prev,t=s,i=s.next;if(Et(e,t,i)>=0)return!1;for(var n=e.x,r=t.x,o=i.x,a=e.y,l=t.y,h=i.y,d=n<r?n<o?n:o:r<o?r:o,c=a<l?a<h?a:h:l<h?l:h,u=n>r?n>o?n:o:r>o?r:o,p=a>l?a>h?a:h:l>h?l:h,f=i.next;f!==e;){if(f.x>=d&&f.x<=u&&f.y>=c&&f.y<=p&&Uo(n,a,r,l,o,h,f.x,f.y)&&Et(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function HE(s,e,t,i){var n=s.prev,r=s,o=s.next;if(Et(n,r,o)>=0)return!1;for(var a=n.x,l=r.x,h=o.x,d=n.y,c=r.y,u=o.y,p=a<l?a<h?a:h:l<h?l:h,f=d<c?d<u?d:u:c<u?c:u,y=a>l?a>h?a:h:l>h?l:h,m=d>c?d>u?d:u:c>u?c:u,g=Np(p,f,e,t,i),v=Np(y,m,e,t,i),b=s.prevZ,x=s.nextZ;b&&b.z>=g&&x&&x.z<=v;){if(b.x>=p&&b.x<=y&&b.y>=f&&b.y<=m&&b!==n&&b!==o&&Uo(a,d,l,c,h,u,b.x,b.y)&&Et(b.prev,b,b.next)>=0||(b=b.prevZ,x.x>=p&&x.x<=y&&x.y>=f&&x.y<=m&&x!==n&&x!==o&&Uo(a,d,l,c,h,u,x.x,x.y)&&Et(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;b&&b.z>=g;){if(b.x>=p&&b.x<=y&&b.y>=f&&b.y<=m&&b!==n&&b!==o&&Uo(a,d,l,c,h,u,b.x,b.y)&&Et(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;x&&x.z<=v;){if(x.x>=p&&x.x<=y&&x.y>=f&&x.y<=m&&x!==n&&x!==o&&Uo(a,d,l,c,h,u,x.x,x.y)&&Et(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function ZE(s,e,t){var i=s;do{var n=i.prev,r=i.next.next;!uh(n,r)&&wb(n,i,i.next,r)&&hl(n,r)&&hl(r,n)&&(e.push(n.i/t|0),e.push(i.i/t|0),e.push(r.i/t|0),ul(i),ul(i.next),i=s=r),i=i.next}while(i!==s);return br(i)}function YE(s,e,t,i,n,r){var o=s;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&$E(o,a)){var l=_b(o,a);o=br(o,o.next),l=br(l,l.next),cl(o,e,t,i,n,r,0),cl(l,e,t,i,n,r,0);return}a=a.next}o=o.next}while(o!==s)}function DE(s,e,t,i){var n=[],r,o,a,l,h;for(r=0,o=e.length;r<o;r++)a=e[r]*i,l=r<o-1?e[r+1]*i:s.length,h=Ib(s,a,l,i,!1),h===h.next&&(h.steiner=!0),n.push(QE(h));for(n.sort(jE),r=0;r<n.length;r++)t=FE(n[r],t);return t}function jE(s,e){return s.x-e.x}function FE(s,e){var t=BE(s,e);if(!t)return e;var i=_b(t,s);return br(i,i.next),br(t,t.next)}function BE(s,e){var t=e,i=s.x,n=s.y,r=-1/0,o;do{if(n<=t.y&&n>=t.next.y&&t.next.y!==t.y){var a=t.x+(n-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(a<=i&&a>r&&(r=a,o=t.x<t.next.x?t:t.next,a===i))return o}t=t.next}while(t!==e);if(!o)return null;var l=o,h=o.x,d=o.y,c=1/0,u;t=o;do i>=t.x&&t.x>=h&&i!==t.x&&Uo(n<d?i:r,n,h,d,n<d?r:i,n,t.x,t.y)&&(u=Math.abs(n-t.y)/(i-t.x),hl(t,s)&&(u<c||u===c&&(t.x>o.x||t.x===o.x&&JE(o,t)))&&(o=t,c=u)),t=t.next;while(t!==l);return o}function JE(s,e){return Et(s.prev,s,e.prev)<0&&Et(e.next,s,s.next)<0}function VE(s,e,t,i){var n=s;do n.z===0&&(n.z=Np(n.x,n.y,e,t,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==s);n.prevZ.nextZ=null,n.prevZ=null,UE(n)}function UE(s){var e,t,i,n,r,o,a,l,h=1;do{for(t=s,s=null,r=null,o=0;t;){for(o++,i=t,a=0,e=0;e<h&&(a++,i=i.nextZ,!!i);e++);for(l=h;a>0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(n=t,t=t.nextZ,a--):(n=i,i=i.nextZ,l--),r?r.nextZ=n:s=n,n.prevZ=r,r=n;t=i}r.nextZ=null,h*=2}while(o>1);return s}function Np(s,e,t,i,n){return s=(s-t)*n|0,e=(e-i)*n|0,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,s|e<<1}function QE(s){var e=s,t=s;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==s);return t}function Uo(s,e,t,i,n,r,o,a){return(n-o)*(e-a)>=(s-o)*(r-a)&&(s-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(r-a)>=(n-o)*(i-a)}function $E(s,e){return s.next.i!==e.i&&s.prev.i!==e.i&&!eA(s,e)&&(hl(s,e)&&hl(e,s)&&tA(s,e)&&(Et(s.prev,s,e.prev)||Et(s,e.prev,e))||uh(s,e)&&Et(s.prev,s,s.next)>0&&Et(e.prev,e,e.next)>0)}function Et(s,e,t){return(e.y-s.y)*(t.x-e.x)-(e.x-s.x)*(t.y-e.y)}function uh(s,e){return s.x===e.x&&s.y===e.y}function wb(s,e,t,i){var n=ph(Et(s,e,t)),r=ph(Et(s,e,i)),o=ph(Et(t,i,s)),a=ph(Et(t,i,e));return!!(n!==r&&o!==a||n===0&&dh(s,t,e)||r===0&&dh(s,i,e)||o===0&&dh(t,s,i)||a===0&&dh(t,e,i))}function dh(s,e,t){return e.x<=Math.max(s.x,t.x)&&e.x>=Math.min(s.x,t.x)&&e.y<=Math.max(s.y,t.y)&&e.y>=Math.min(s.y,t.y)}function ph(s){return s>0?1:s<0?-1:0}function eA(s,e){var t=s;do{if(t.i!==s.i&&t.next.i!==s.i&&t.i!==e.i&&t.next.i!==e.i&&wb(t,t.next,s,e))return!0;t=t.next}while(t!==s);return!1}function hl(s,e){return Et(s.prev,s,s.next)<0?Et(s,e,s.next)>=0&&Et(s,s.prev,e)>=0:Et(s,e,s.prev)<0||Et(s,s.next,e)<0}function tA(s,e){var t=s,i=!1,n=(s.x+e.x)/2,r=(s.y+e.y)/2;do t.y>r!=t.next.y>r&&t.next.y!==t.y&&n<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==s);return i}function _b(s,e){var t=new kp(s.i,s.x,s.y),i=new kp(e.i,e.x,e.y),n=s.next,r=e.prev;return s.next=e,e.prev=s,t.next=n,n.prev=t,i.next=t,t.prev=i,r.next=i,i.prev=r,i}function Gb(s,e,t,i){var n=new kp(s,e,t);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function ul(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function kp(s,e,t){this.i=s,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}hh.deviation=function(s,e,t,i){var n=e&&e.length,r=n?e[0]*t:s.length,o=Math.abs(Hp(s,0,r,t));if(n)for(var a=0,l=e.length;a<l;a++){var h=e[a]*t,d=a<l-1?e[a+1]*t:s.length;o-=Math.abs(Hp(s,h,d,t))}var c=0;for(a=0;a<i.length;a+=3){var u=i[a]*t,p=i[a+1]*t,f=i[a+2]*t;c+=Math.abs((s[u]-s[f])*(s[p+1]-s[u+1])-(s[u]-s[p])*(s[f+1]-s[u+1]))}return o===0&&c===0?0:Math.abs((c-o)/o)};function Hp(s,e,t,i){for(var n=0,r=e,o=t-i;r<t;r+=i)n+=(s[o]-s[r])*(s[r+1]+s[o+1]),o=r;return n}hh.flatten=function(s){for(var e=s[0][0].length,t={vertices:[],holes:[],dimensions:e},i=0,n=0;n<s.length;n++){for(var r=0;r<s[n].length;r++)for(var o=0;o<e;o++)t.vertices.push(s[n][r][o]);n>0&&(i+=s[n-1].length,t.holes.push(i))}return t};var iA=Wp.exports;const nA=cp(iA);var fh={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */fh.exports,function(s,e){(function(t){var i=e&&!e.nodeType&&e,n=s&&!s.nodeType&&s,r=typeof as=="object"&&as;(r.global===r||r.window===r||r.self===r)&&(t=r);var o,a=2147483647,l=36,h=1,d=26,c=38,u=700,p=72,f=128,y="-",m=/^xn--/,g=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=l-h,S=Math.floor,T=String.fromCharCode,C;function I(N){throw new RangeError(b[N])}function L(N,H){for(var ee=N.length,Y=[];ee--;)Y[ee]=H(N[ee]);return Y}function M(N,H){var ee=N.split("@"),Y="";ee.length>1&&(Y=ee[0]+"@",N=ee[1]),N=N.replace(v,".");var U=N.split("."),re=L(U,H).join(".");return Y+re}function K(N){for(var H=[],ee=0,Y=N.length,U,re;ee<Y;)U=N.charCodeAt(ee++),U>=55296&&U<=56319&&ee<Y?(re=N.charCodeAt(ee++),(re&64512)==56320?H.push(((U&1023)<<10)+(re&1023)+65536):(H.push(U),ee--)):H.push(U);return H}function P(N){return L(N,function(H){var ee="";return H>65535&&(H-=65536,ee+=T(H>>>10&1023|55296),H=56320|H&1023),ee+=T(H),ee}).join("")}function G(N){return N-48<10?N-22:N-65<26?N-65:N-97<26?N-97:l}function w(N,H){return N+22+75*(N<26)-((H!=0)<<5)}function R(N,H,ee){var Y=0;for(N=ee?S(N/u):N>>1,N+=S(N/H);N>x*d>>1;Y+=l)N=S(N/x);return S(Y+(x+1)*N/(N+c))}function X(N){var H=[],ee=N.length,Y,U=0,re=f,pe=p,ge,we,Pe,Le,Se,k,it,Te,ke;for(ge=N.lastIndexOf(y),ge<0&&(ge=0),we=0;we<ge;++we)N.charCodeAt(we)>=128&&I("not-basic"),H.push(N.charCodeAt(we));for(Pe=ge>0?ge+1:0;Pe<ee;){for(Le=U,Se=1,k=l;Pe>=ee&&I("invalid-input"),it=G(N.charCodeAt(Pe++)),(it>=l||it>S((a-U)/Se))&&I("overflow"),U+=it*Se,Te=k<=pe?h:k>=pe+d?d:k-pe,!(it<Te);k+=l)ke=l-Te,Se>S(a/ke)&&I("overflow"),Se*=ke;Y=H.length+1,pe=R(U-Le,Y,Le==0),S(U/Y)>a-re&&I("overflow"),re+=S(U/Y),U%=Y,H.splice(U++,0,re)}return P(H)}function z(N){var H,ee,Y,U,re,pe,ge,we,Pe,Le,Se,k=[],it,Te,ke,Xe;for(N=K(N),it=N.length,H=f,ee=0,re=p,pe=0;pe<it;++pe)Se=N[pe],Se<128&&k.push(T(Se));for(Y=U=k.length,U&&k.push(y);Y<it;){for(ge=a,pe=0;pe<it;++pe)Se=N[pe],Se>=H&&Se<ge&&(ge=Se);for(Te=Y+1,ge-H>S((a-ee)/Te)&&I("overflow"),ee+=(ge-H)*Te,H=ge,pe=0;pe<it;++pe)if(Se=N[pe],Se<H&&++ee>a&&I("overflow"),Se==H){for(we=ee,Pe=l;Le=Pe<=re?h:Pe>=re+d?d:Pe-re,!(we<Le);Pe+=l)Xe=we-Le,ke=l-Le,k.push(T(w(Le+Xe%ke,0))),we=S(Xe/ke);k.push(T(w(we,0))),re=R(ee,Te,Y==U),ee=0,++Y}++ee,++H}return k.join("")}function J(N){return M(N,function(H){return m.test(H)?X(H.slice(4).toLowerCase()):H})}function D(N){return M(N,function(H){return g.test(H)?"xn--"+z(H):H})}if(o={version:"1.4.1",ucs2:{decode:K,encode:P},decode:X,encode:z,toASCII:D,toUnicode:J},i&&n)if(s.exports==i)n.exports=o;else for(C in o)o.hasOwnProperty(C)&&(i[C]=o[C]);else t.punycode=o})(as)}(fh,fh.exports);var sA=fh.exports,rA=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var r=Object.getOwnPropertySymbols(e);if(r.length!==1||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0},Pb=typeof Symbol<"u"&&Symbol,oA=rA,aA=function(){return typeof Pb!="function"||typeof Symbol!="function"||typeof Pb("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:oA()},Eb={foo:{}},lA=Object,cA=function(){return{__proto__:Eb}.foo===Eb.foo&&!({__proto__:null}instanceof lA)},hA="Function.prototype.bind called on incompatible ",uA=Object.prototype.toString,dA=Math.max,pA="[object Function]",Ab=function(e,t){for(var i=[],n=0;n<e.length;n+=1)i[n]=e[n];for(var r=0;r<t.length;r+=1)i[r+e.length]=t[r];return i},fA=function(e,t){for(var i=[],n=t||0,r=0;n<e.length;n+=1,r+=1)i[r]=e[n];return i},mA=function(s,e){for(var t="",i=0;i<s.length;i+=1)t+=s[i],i+1<s.length&&(t+=e);return t},gA=function(e){var t=this;if(typeof t!="function"||uA.apply(t)!==pA)throw new TypeError(hA+t);for(var i=fA(arguments,1),n,r=function(){if(this instanceof n){var d=t.apply(this,Ab(i,arguments));return Object(d)===d?d:this}return t.apply(e,Ab(i,arguments))},o=dA(0,t.length-i.length),a=[],l=0;l<o;l++)a[l]="$"+l;if(n=Function("binder","return function ("+mA(a,",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var h=function(){};h.prototype=t.prototype,n.prototype=new h,h.prototype=null}return n},yA=gA,Zp=Function.prototype.bind||yA,vA=Function.prototype.call,bA=Object.prototype.hasOwnProperty,xA=Zp,SA=xA.call(vA,bA),ht,Qo=SyntaxError,Rb=Function,$o=TypeError,Yp=function(s){try{return Rb('"use strict"; return ('+s+").constructor;")()}catch{}},xr=Object.getOwnPropertyDescriptor;if(xr)try{xr({},"")}catch{xr=null}var Dp=function(){throw new $o},LA=xr?function(){try{return arguments.callee,Dp}catch{try{return xr(arguments,"callee").get}catch{return Dp}}}():Dp,ea=aA(),TA=cA(),ti=Object.getPrototypeOf||(TA?function(s){return s.__proto__}:null),ta={},CA=typeof Uint8Array>"u"||!ti?ht:ti(Uint8Array),Sr={"%AggregateError%":typeof AggregateError>"u"?ht:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ht:ArrayBuffer,"%ArrayIteratorPrototype%":ea&&ti?ti([][Symbol.iterator]()):ht,"%AsyncFromSyncIteratorPrototype%":ht,"%AsyncFunction%":ta,"%AsyncGenerator%":ta,"%AsyncGeneratorFunction%":ta,"%AsyncIteratorPrototype%":ta,"%Atomics%":typeof Atomics>"u"?ht:Atomics,"%BigInt%":typeof BigInt>"u"?ht:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ht:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ht:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ht:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ht:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ht:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ht:FinalizationRegistry,"%Function%":Rb,"%GeneratorFunction%":ta,"%Int8Array%":typeof Int8Array>"u"?ht:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ht:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ht:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ea&&ti?ti(ti([][Symbol.iterator]())):ht,"%JSON%":typeof JSON=="object"?JSON:ht,"%Map%":typeof Map>"u"?ht:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ea||!ti?ht:ti(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ht:Promise,"%Proxy%":typeof Proxy>"u"?ht:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ht:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ht:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ea||!ti?ht:ti(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ht:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ea&&ti?ti(""[Symbol.iterator]()):ht,"%Symbol%":ea?Symbol:ht,"%SyntaxError%":Qo,"%ThrowTypeError%":LA,"%TypedArray%":CA,"%TypeError%":$o,"%Uint8Array%":typeof Uint8Array>"u"?ht:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ht:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ht:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ht:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ht:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ht:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ht:WeakSet};if(ti)try{null.error}catch(s){var MA=ti(ti(s));Sr["%Error.prototype%"]=MA}var IA=function s(e){var t;if(e==="%AsyncFunction%")t=Yp("async function () {}");else if(e==="%GeneratorFunction%")t=Yp("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Yp("async function* () {}");else if(e==="%AsyncGenerator%"){var i=s("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=s("%AsyncGenerator%");n&&ti&&(t=ti(n.prototype))}return Sr[e]=t,t},Kb={"%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"]},dl=Zp,mh=SA,wA=dl.call(Function.call,Array.prototype.concat),_A=dl.call(Function.apply,Array.prototype.splice),Ob=dl.call(Function.call,String.prototype.replace),gh=dl.call(Function.call,String.prototype.slice),GA=dl.call(Function.call,RegExp.prototype.exec),PA=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,EA=/\\(\\)?/g,AA=function(e){var t=gh(e,0,1),i=gh(e,-1);if(t==="%"&&i!=="%")throw new Qo("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new Qo("invalid intrinsic syntax, expected opening `%`");var n=[];return Ob(e,PA,function(r,o,a,l){n[n.length]=a?Ob(l,EA,"$1"):o||r}),n},RA=function(e,t){var i=e,n;if(mh(Kb,i)&&(n=Kb[i],i="%"+n[0]+"%"),mh(Sr,i)){var r=Sr[i];if(r===ta&&(r=IA(i)),typeof r>"u"&&!t)throw new $o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:r}}throw new Qo("intrinsic "+e+" does not exist!")},Lr=function(e,t){if(typeof e!="string"||e.length===0)throw new $o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new $o('"allowMissing" argument must be a boolean');if(GA(/^%?[^%]*%?$/,e)===null)throw new Qo("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=AA(e),n=i.length>0?i[0]:"",r=RA("%"+n+"%",t),o=r.name,a=r.value,l=!1,h=r.alias;h&&(n=h[0],_A(i,wA([0,1],h)));for(var d=1,c=!0;d<i.length;d+=1){var u=i[d],p=gh(u,0,1),f=gh(u,-1);if((p==='"'||p==="'"||p==="`"||f==='"'||f==="'"||f==="`")&&p!==f)throw new Qo("property names with quotes must have matching quotes");if((u==="constructor"||!c)&&(l=!0),n+="."+u,o="%"+n+"%",mh(Sr,o))a=Sr[o];else if(a!=null){if(!(u in a)){if(!t)throw new $o("base intrinsic for "+e+" exists, but the property is not available.");return}if(xr&&d+1>=i.length){var y=xr(a,u);c=!!y,c&&"get"in y&&!("originalValue"in y.get)?a=y.get:a=a[u]}else c=mh(a,u),a=a[u];c&&!l&&(Sr[o]=a)}}return a},qb={exports:{}},KA=Lr,jp=KA("%Object.defineProperty%",!0),Fp=function(){if(jp)try{return jp({},"a",{value:1}),!0}catch{return!1}return!1};Fp.hasArrayLengthDefineBug=function(){if(!Fp())return null;try{return jp([],"length",{value:1}).length!==1}catch{return!0}};var Xb=Fp,OA=Lr,yh=OA("%Object.getOwnPropertyDescriptor%",!0);if(yh)try{yh([],"length")}catch{yh=null}var zb=yh,qA=Xb(),Bp=Lr,pl=qA&&Bp("%Object.defineProperty%",!0);if(pl)try{pl({},"a",{value:1})}catch{pl=!1}var XA=Bp("%SyntaxError%"),ia=Bp("%TypeError%"),Wb=zb,zA=function(e,t,i){if(!e||typeof e!="object"&&typeof e!="function")throw new ia("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new ia("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ia("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ia("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ia("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ia("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Wb&&Wb(e,t);if(pl)pl(e,t,{configurable:o===null&&l?l.configurable:!o,enumerable:n===null&&l?l.enumerable:!n,value:i,writable:r===null&&l?l.writable:!r});else if(a||!n&&!r&&!o)e[t]=i;else throw new XA("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Nb=Lr,kb=zA,WA=Xb(),Hb=zb,Zb=Nb("%TypeError%"),NA=Nb("%Math.floor%"),kA=function(e,t){if(typeof e!="function")throw new Zb("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||NA(t)!==t)throw new Zb("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,r=!0;if("length"in e&&Hb){var o=Hb(e,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(r=!1)}return(n||r||!i)&&(WA?kb(e,"length",t,!0,!0):kb(e,"length",t)),e};(function(s){var e=Zp,t=Lr,i=kA,n=t("%TypeError%"),r=t("%Function.prototype.apply%"),o=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(o,r),l=t("%Object.defineProperty%",!0),h=t("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}s.exports=function(u){if(typeof u!="function")throw new n("a function is required");var p=a(e,o,arguments);return i(p,1+h(0,u.length-(arguments.length-1)),!0)};var d=function(){return a(e,r,arguments)};l?l(s.exports,"apply",{value:d}):s.exports.apply=d})(qb);var HA=qb.exports,Yb=Lr,Db=HA,ZA=Db(Yb("String.prototype.indexOf")),YA=function(e,t){var i=Yb(e,!!t);return typeof i=="function"&&ZA(e,".prototype.")>-1?Db(i):i};const DA=FG(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Jp=typeof Map=="function"&&Map.prototype,Vp=Object.getOwnPropertyDescriptor&&Jp?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,vh=Jp&&Vp&&typeof Vp.get=="function"?Vp.get:null,jb=Jp&&Map.prototype.forEach,Up=typeof Set=="function"&&Set.prototype,Qp=Object.getOwnPropertyDescriptor&&Up?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,bh=Up&&Qp&&typeof Qp.get=="function"?Qp.get:null,Fb=Up&&Set.prototype.forEach,jA=typeof WeakMap=="function"&&WeakMap.prototype,fl=jA?WeakMap.prototype.has:null,FA=typeof WeakSet=="function"&&WeakSet.prototype,ml=FA?WeakSet.prototype.has:null,BA=typeof WeakRef=="function"&&WeakRef.prototype,Bb=BA?WeakRef.prototype.deref:null,JA=Boolean.prototype.valueOf,VA=Object.prototype.toString,UA=Function.prototype.toString,QA=String.prototype.match,$p=String.prototype.slice,Ks=String.prototype.replace,$A=String.prototype.toUpperCase,Jb=String.prototype.toLowerCase,Vb=RegExp.prototype.test,Ub=Array.prototype.concat,Kn=Array.prototype.join,eR=Array.prototype.slice,Qb=Math.floor,ef=typeof BigInt=="function"?BigInt.prototype.valueOf:null,tf=Object.getOwnPropertySymbols,nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,na=typeof Symbol=="function"&&typeof Symbol.iterator=="object",gi=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===na||!0)?Symbol.toStringTag:null,$b=Object.prototype.propertyIsEnumerable,ex=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(s){return s.__proto__}:null);function tx(s,e){if(s===1/0||s===-1/0||s!==s||s&&s>-1e3&&s<1e3||Vb.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof s=="number"){var i=s<0?-Qb(-s):Qb(s);if(i!==s){var n=String(i),r=$p.call(e,n.length+1);return Ks.call(n,t,"$&_")+"."+Ks.call(Ks.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ks.call(e,t,"$&_")}var sf=DA,ix=sf.custom,nx=ox(ix)?ix:null,tR=function s(e,t,i,n){var r=t||{};if(Os(r,"quoteStyle")&&r.quoteStyle!=="single"&&r.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Os(r,"maxStringLength")&&(typeof r.maxStringLength=="number"?r.maxStringLength<0&&r.maxStringLength!==1/0:r.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Os(r,"customInspect")?r.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Os(r,"indent")&&r.indent!==null&&r.indent!==" "&&!(parseInt(r.indent,10)===r.indent&&r.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Os(r,"numericSeparator")&&typeof r.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=r.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return lx(e,r);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?tx(e,l):l}if(typeof e=="bigint"){var h=String(e)+"n";return a?tx(e,h):h}var d=typeof r.depth>"u"?5:r.depth;if(typeof i>"u"&&(i=0),i>=d&&d>0&&typeof e=="object")return rf(e)?"[Array]":"[Object]";var c=bR(r,i);if(typeof n>"u")n=[];else if(ax(n,e)>=0)return"[Circular]";function u(G,w,R){if(w&&(n=eR.call(n),n.push(w)),R){var X={depth:r.depth};return Os(r,"quoteStyle")&&(X.quoteStyle=r.quoteStyle),s(G,X,i+1,n)}return s(G,r,i+1,n)}if(typeof e=="function"&&!rx(e)){var p=hR(e),f=xh(e,u);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(f.length>0?" { "+Kn.call(f,", ")+" }":"")}if(ox(e)){var y=na?Ks.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):nf.call(e);return typeof e=="object"&&!na?gl(y):y}if(gR(e)){for(var m="<"+Jb.call(String(e.nodeName)),g=e.attributes||[],v=0;v<g.length;v++)m+=" "+g[v].name+"="+sx(iR(g[v].value),"double",r);return m+=">",e.childNodes&&e.childNodes.length&&(m+="..."),m+="</"+Jb.call(String(e.nodeName))+">",m}if(rf(e)){if(e.length===0)return"[]";var b=xh(e,u);return c&&!vR(b)?"["+af(b,c)+"]":"[ "+Kn.call(b,", ")+" ]"}if(sR(e)){var x=xh(e,u);return!("cause"in Error.prototype)&&"cause"in e&&!$b.call(e,"cause")?"{ ["+String(e)+"] "+Kn.call(Ub.call("[cause]: "+u(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Kn.call(x,", ")+" }"}if(typeof e=="object"&&o){if(nx&&typeof e[nx]=="function"&&sf)return sf(e,{depth:d-i});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(uR(e)){var S=[];return jb&&jb.call(e,function(G,w){S.push(u(w,e,!0)+" => "+u(G,e))}),cx("Map",vh.call(e),S,c)}if(fR(e)){var T=[];return Fb&&Fb.call(e,function(G){T.push(u(G,e))}),cx("Set",bh.call(e),T,c)}if(dR(e))return of("WeakMap");if(mR(e))return of("WeakSet");if(pR(e))return of("WeakRef");if(oR(e))return gl(u(Number(e)));if(lR(e))return gl(u(ef.call(e)));if(aR(e))return gl(JA.call(e));if(rR(e))return gl(u(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===as)return"{ [object globalThis] }";if(!nR(e)&&!rx(e)){var C=xh(e,u),I=ex?ex(e)===Object.prototype:e instanceof Object||e.constructor===Object,L=e instanceof Object?"":"null prototype",M=!I&&gi&&Object(e)===e&&gi in e?$p.call(qs(e),8,-1):L?"Object":"",K=I||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",P=K+(M||L?"["+Kn.call(Ub.call([],M||[],L||[]),": ")+"] ":"");return C.length===0?P+"{}":c?P+"{"+af(C,c)+"}":P+"{ "+Kn.call(C,", ")+" }"}return String(e)};function sx(s,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+s+i}function iR(s){return Ks.call(String(s),/"/g,"&quot;")}function rf(s){return qs(s)==="[object Array]"&&(!gi||!(typeof s=="object"&&gi in s))}function nR(s){return qs(s)==="[object Date]"&&(!gi||!(typeof s=="object"&&gi in s))}function rx(s){return qs(s)==="[object RegExp]"&&(!gi||!(typeof s=="object"&&gi in s))}function sR(s){return qs(s)==="[object Error]"&&(!gi||!(typeof s=="object"&&gi in s))}function rR(s){return qs(s)==="[object String]"&&(!gi||!(typeof s=="object"&&gi in s))}function oR(s){return qs(s)==="[object Number]"&&(!gi||!(typeof s=="object"&&gi in s))}function aR(s){return qs(s)==="[object Boolean]"&&(!gi||!(typeof s=="object"&&gi in s))}function ox(s){if(na)return s&&typeof s=="object"&&s instanceof Symbol;if(typeof s=="symbol")return!0;if(!s||typeof s!="object"||!nf)return!1;try{return nf.call(s),!0}catch{}return!1}function lR(s){if(!s||typeof s!="object"||!ef)return!1;try{return ef.call(s),!0}catch{}return!1}var cR=Object.prototype.hasOwnProperty||function(s){return s in this};function Os(s,e){return cR.call(s,e)}function qs(s){return VA.call(s)}function hR(s){if(s.name)return s.name;var e=QA.call(UA.call(s),/^function\s*([\w$]+)/);return e?e[1]:null}function ax(s,e){if(s.indexOf)return s.indexOf(e);for(var t=0,i=s.length;t<i;t++)if(s[t]===e)return t;return-1}function uR(s){if(!vh||!s||typeof s!="object")return!1;try{vh.call(s);try{bh.call(s)}catch{return!0}return s instanceof Map}catch{}return!1}function dR(s){if(!fl||!s||typeof s!="object")return!1;try{fl.call(s,fl);try{ml.call(s,ml)}catch{return!0}return s instanceof WeakMap}catch{}return!1}function pR(s){if(!Bb||!s||typeof s!="object")return!1;try{return Bb.call(s),!0}catch{}return!1}function fR(s){if(!bh||!s||typeof s!="object")return!1;try{bh.call(s);try{vh.call(s)}catch{return!0}return s instanceof Set}catch{}return!1}function mR(s){if(!ml||!s||typeof s!="object")return!1;try{ml.call(s,ml);try{fl.call(s,fl)}catch{return!0}return s instanceof WeakSet}catch{}return!1}function gR(s){return!s||typeof s!="object"?!1:typeof HTMLElement<"u"&&s instanceof HTMLElement?!0:typeof s.nodeName=="string"&&typeof s.getAttribute=="function"}function lx(s,e){if(s.length>e.maxStringLength){var t=s.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return lx($p.call(s,0,e.maxStringLength),e)+i}var n=Ks.call(Ks.call(s,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,yR);return sx(n,"single",e)}function yR(s){var e=s.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+$A.call(e.toString(16))}function gl(s){return"Object("+s+")"}function of(s){return s+" { ? }"}function cx(s,e,t,i){var n=i?af(t,i):Kn.call(t,", ");return s+" ("+e+") {"+n+"}"}function vR(s){for(var e=0;e<s.length;e++)if(ax(s[e],`
8043
8043
  `)>=0)return!1;return!0}function bR(s,e){var t;if(s.indent===" ")t=" ";else if(typeof s.indent=="number"&&s.indent>0)t=Kn.call(Array(s.indent+1)," ");else return null;return{base:t,prev:Kn.call(Array(e+1),t)}}function af(s,e){if(s.length===0)return"";var t=`
8044
8044
  `+e.prev+e.base;return t+Kn.call(s,","+t)+`
8045
8045
  `+e.prev}function xh(s,e){var t=rf(s),i=[];if(t){i.length=s.length;for(var n=0;n<s.length;n++)i[n]=Os(s,n)?e(s[n],s):""}var r=typeof tf=="function"?tf(s):[],o;if(na){o={};for(var a=0;a<r.length;a++)o["$"+r[a]]=r[a]}for(var l in s)Os(s,l)&&(t&&String(Number(l))===l&&l<s.length||na&&o["$"+l]instanceof Symbol||(Vb.call(/[^\w$]/,l)?i.push(e(l,s)+": "+e(s[l],s)):i.push(l+": "+e(s[l],s))));if(typeof tf=="function")for(var h=0;h<r.length;h++)$b.call(s,r[h])&&i.push("["+e(r[h])+"]: "+e(s[r[h]],s));return i}var lf=Lr,sa=YA,xR=tR,SR=lf("%TypeError%"),Sh=lf("%WeakMap%",!0),Lh=lf("%Map%",!0),LR=sa("WeakMap.prototype.get",!0),TR=sa("WeakMap.prototype.set",!0),CR=sa("WeakMap.prototype.has",!0),MR=sa("Map.prototype.get",!0),IR=sa("Map.prototype.set",!0),wR=sa("Map.prototype.has",!0),cf=function(s,e){for(var t=s,i;(i=t.next)!==null;t=i)if(i.key===e)return t.next=i.next,i.next=s.next,s.next=i,i},_R=function(s,e){var t=cf(s,e);return t&&t.value},GR=function(s,e,t){var i=cf(s,e);i?i.value=t:s.next={key:e,next:s.next,value:t}},PR=function(s,e){return!!cf(s,e)},ER=function(){var e,t,i,n={assert:function(r){if(!n.has(r))throw new SR("Side channel does not contain "+xR(r))},get:function(r){if(Sh&&r&&(typeof r=="object"||typeof r=="function")){if(e)return LR(e,r)}else if(Lh){if(t)return MR(t,r)}else if(i)return _R(i,r)},has:function(r){if(Sh&&r&&(typeof r=="object"||typeof r=="function")){if(e)return CR(e,r)}else if(Lh){if(t)return wR(t,r)}else if(i)return PR(i,r);return!1},set:function(r,o){Sh&&r&&(typeof r=="object"||typeof r=="function")?(e||(e=new Sh),TR(e,r,o)):Lh?(t||(t=new Lh),IR(t,r,o)):(i||(i={key:{},next:null}),GR(i,r,o))}};return n},AR=String.prototype.replace,RR=/%20/g,hf={RFC1738:"RFC1738",RFC3986:"RFC3986"},uf={default:hf.RFC3986,formatters:{RFC1738:function(s){return AR.call(s,RR,"+")},RFC3986:function(s){return String(s)}},RFC1738:hf.RFC1738,RFC3986:hf.RFC3986},KR=uf,df=Object.prototype.hasOwnProperty,Tr=Array.isArray,On=function(){for(var s=[],e=0;e<256;++e)s.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return s}(),OR=function(e){for(;e.length>1;){var t=e.pop(),i=t.obj[t.prop];if(Tr(i)){for(var n=[],r=0;r<i.length;++r)typeof i[r]<"u"&&n.push(i[r]);t.obj[t.prop]=n}}},hx=function(e,t){for(var i=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)typeof e[n]<"u"&&(i[n]=e[n]);return i},qR=function s(e,t,i){if(!t)return e;if(typeof t!="object"){if(Tr(e))e.push(t);else if(e&&typeof e=="object")(i&&(i.plainObjects||i.allowPrototypes)||!df.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var n=e;return Tr(e)&&!Tr(t)&&(n=hx(e,i)),Tr(e)&&Tr(t)?(t.forEach(function(r,o){if(df.call(e,o)){var a=e[o];a&&typeof a=="object"&&r&&typeof r=="object"?e[o]=s(a,r,i):e.push(r)}else e[o]=r}),e):Object.keys(t).reduce(function(r,o){var a=t[o];return df.call(r,o)?r[o]=s(r[o],a,i):r[o]=a,r},n)},XR=function(e,t){return Object.keys(t).reduce(function(i,n){return i[n]=t[n],i},e)},zR=function(s,e,t){var i=s.replace(/\+/g," ");if(t==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},WR=function(e,t,i,n,r){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),i==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",l=0;l<o.length;++l){var h=o.charCodeAt(l);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||r===KR.RFC1738&&(h===40||h===41)){a+=o.charAt(l);continue}if(h<128){a=a+On[h];continue}if(h<2048){a=a+(On[192|h>>6]+On[128|h&63]);continue}if(h<55296||h>=57344){a=a+(On[224|h>>12]+On[128|h>>6&63]+On[128|h&63]);continue}l+=1,h=65536+((h&1023)<<10|o.charCodeAt(l)&1023),a+=On[240|h>>18]+On[128|h>>12&63]+On[128|h>>6&63]+On[128|h&63]}return a},NR=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],n=0;n<t.length;++n)for(var r=t[n],o=r.obj[r.prop],a=Object.keys(o),l=0;l<a.length;++l){var h=a[l],d=o[h];typeof d=="object"&&d!==null&&i.indexOf(d)===-1&&(t.push({obj:o,prop:h}),i.push(d))}return OR(t),e},kR=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},HR=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},ZR=function(e,t){return[].concat(e,t)},YR=function(e,t){if(Tr(e)){for(var i=[],n=0;n<e.length;n+=1)i.push(t(e[n]));return i}return t(e)},ux={arrayToObject:hx,assign:XR,combine:ZR,compact:NR,decode:zR,encode:WR,isBuffer:HR,isRegExp:kR,maybeMap:YR,merge:qR},dx=ER,Th=ux,yl=uf,DR=Object.prototype.hasOwnProperty,px={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},us=Array.isArray,jR=Array.prototype.push,fx=function(s,e){jR.apply(s,us(e)?e:[e])},FR=Date.prototype.toISOString,mx=yl.default,yi={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Th.encode,encodeValuesOnly:!1,format:mx,formatter:yl.formatters[mx],indices:!1,serializeDate:function(e){return FR.call(e)},skipNulls:!1,strictNullHandling:!1},BR=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},pf={},JR=function s(e,t,i,n,r,o,a,l,h,d,c,u,p,f,y,m){for(var g=e,v=m,b=0,x=!1;(v=v.get(pf))!==void 0&&!x;){var S=v.get(e);if(b+=1,typeof S<"u"){if(S===b)throw new RangeError("Cyclic object value");x=!0}typeof v.get(pf)>"u"&&(b=0)}if(typeof l=="function"?g=l(t,g):g instanceof Date?g=c(g):i==="comma"&&us(g)&&(g=Th.maybeMap(g,function(X){return X instanceof Date?c(X):X})),g===null){if(r)return a&&!f?a(t,yi.encoder,y,"key",u):t;g=""}if(BR(g)||Th.isBuffer(g)){if(a){var T=f?t:a(t,yi.encoder,y,"key",u);return[p(T)+"="+p(a(g,yi.encoder,y,"value",u))]}return[p(t)+"="+p(String(g))]}var C=[];if(typeof g>"u")return C;var I;if(i==="comma"&&us(g))f&&a&&(g=Th.maybeMap(g,a)),I=[{value:g.length>0?g.join(",")||null:void 0}];else if(us(l))I=l;else{var L=Object.keys(g);I=h?L.sort(h):L}for(var M=n&&us(g)&&g.length===1?t+"[]":t,K=0;K<I.length;++K){var P=I[K],G=typeof P=="object"&&typeof P.value<"u"?P.value:g[P];if(!(o&&G===null)){var w=us(g)?typeof i=="function"?i(M,P):M:M+(d?"."+P:"["+P+"]");m.set(e,b);var R=dx();R.set(pf,m),fx(C,s(G,w,i,n,r,o,i==="comma"&&f&&us(g)?null:a,l,h,d,c,u,p,f,y,R))}}return C},VR=function(e){if(!e)return yi;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||yi.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=yl.default;if(typeof e.format<"u"){if(!DR.call(yl.formatters,e.format))throw new TypeError("Unknown format option provided.");i=e.format}var n=yl.formatters[i],r=yi.filter;return(typeof e.filter=="function"||us(e.filter))&&(r=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:yi.addQueryPrefix,allowDots:typeof e.allowDots>"u"?yi.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:yi.charsetSentinel,delimiter:typeof e.delimiter>"u"?yi.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:yi.encode,encoder:typeof e.encoder=="function"?e.encoder:yi.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:yi.encodeValuesOnly,filter:r,format:i,formatter:n,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:yi.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:yi.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:yi.strictNullHandling}},UR=function(s,e){var t=s,i=VR(e),n,r;typeof i.filter=="function"?(r=i.filter,t=r("",t)):us(i.filter)&&(r=i.filter,n=r);var o=[];if(typeof t!="object"||t===null)return"";var a;e&&e.arrayFormat in px?a=e.arrayFormat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var l=px[a];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=l==="comma"&&e&&e.commaRoundTrip;n||(n=Object.keys(t)),i.sort&&n.sort(i.sort);for(var d=dx(),c=0;c<n.length;++c){var u=n[c];i.skipNulls&&t[u]===null||fx(o,JR(t[u],u,l,h,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,d))}var p=o.join(i.delimiter),f=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),p.length>0?f+p:""},ra=ux,ff=Object.prototype.hasOwnProperty,QR=Array.isArray,ii={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ra.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},$R=function(s){return s.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},gx=function(s,e){return s&&typeof s=="string"&&e.comma&&s.indexOf(",")>-1?s.split(","):s},e5="utf8=%26%2310003%3B",t5="utf8=%E2%9C%93",i5=function(e,t){var i={__proto__:null},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,r=t.parameterLimit===1/0?void 0:t.parameterLimit,o=n.split(t.delimiter,r),a=-1,l,h=t.charset;if(t.charsetSentinel)for(l=0;l<o.length;++l)o[l].indexOf("utf8=")===0&&(o[l]===t5?h="utf-8":o[l]===e5&&(h="iso-8859-1"),a=l,l=o.length);for(l=0;l<o.length;++l)if(l!==a){var d=o[l],c=d.indexOf("]="),u=c===-1?d.indexOf("="):c+1,p,f;u===-1?(p=t.decoder(d,ii.decoder,h,"key"),f=t.strictNullHandling?null:""):(p=t.decoder(d.slice(0,u),ii.decoder,h,"key"),f=ra.maybeMap(gx(d.slice(u+1),t),function(y){return t.decoder(y,ii.decoder,h,"value")})),f&&t.interpretNumericEntities&&h==="iso-8859-1"&&(f=$R(f)),d.indexOf("[]=")>-1&&(f=QR(f)?[f]:f),ff.call(i,p)?i[p]=ra.combine(i[p],f):i[p]=f}return i},n5=function(s,e,t,i){for(var n=i?e:gx(e,t),r=s.length-1;r>=0;--r){var o,a=s[r];if(a==="[]"&&t.parseArrays)o=[].concat(n);else{o=t.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,h=parseInt(l,10);!t.parseArrays&&l===""?o={0:n}:!isNaN(h)&&a!==l&&String(h)===l&&h>=0&&t.parseArrays&&h<=t.arrayLimit?(o=[],o[h]=n):l!=="__proto__"&&(o[l]=n)}n=o}return n},s5=function(e,t,i,n){if(e){var r=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=i.depth>0&&o.exec(r),h=l?r.slice(0,l.index):r,d=[];if(h){if(!i.plainObjects&&ff.call(Object.prototype,h)&&!i.allowPrototypes)return;d.push(h)}for(var c=0;i.depth>0&&(l=a.exec(r))!==null&&c<i.depth;){if(c+=1,!i.plainObjects&&ff.call(Object.prototype,l[1].slice(1,-1))&&!i.allowPrototypes)return;d.push(l[1])}return l&&d.push("["+r.slice(l.index)+"]"),n5(d,t,i,n)}},r5=function(e){if(!e)return ii;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?ii.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?ii.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:ii.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:ii.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:ii.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:ii.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:ii.comma,decoder:typeof e.decoder=="function"?e.decoder:ii.decoder,delimiter:typeof e.delimiter=="string"||ra.isRegExp(e.delimiter)?e.delimiter:ii.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:ii.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:ii.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:ii.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:ii.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:ii.strictNullHandling}},o5=function(s,e){var t=r5(e);if(s===""||s===null||typeof s>"u")return t.plainObjects?Object.create(null):{};for(var i=typeof s=="string"?i5(s,t):s,n=t.plainObjects?Object.create(null):{},r=Object.keys(i),o=0;o<r.length;++o){var a=r[o],l=s5(a,i[a],t,typeof s=="string");n=ra.merge(n,l,t)}return t.allowSparse===!0?n:ra.compact(n)},a5=UR,l5=o5,c5=uf,h5={formats:c5,parse:l5,stringify:a5},u5=sA;function ds(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var d5=/^([a-z0-9.+-]+:)/i,p5=/:[0-9]*$/,f5=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,m5=["<",">",'"',"`"," ","\r",`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shop-components",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "Shop components",
5
5
  "main": "dist/shop-components.umd.js",
6
6
  "module": "dist/shop-components.mjs",