lunchboxjs 2.1.11 → 2.1.12

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.
@@ -1,40 +1,33 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ee=require("three");function Ce(t){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(u,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return u.default=t,Object.freeze(u)}const b=Ce(Ee),bu=["WebGLRenderer","Scene","Group","Object3D","Mesh","Sprite","BoxGeometry","BufferGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","ExtrudeGeometry","IcosahedronGeometry","InstancedBufferGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","ShapeGeometry","SphereGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","TubeGeometry","WireframeGeometry","PointsMaterial","ShaderMaterial","ShadowMaterial","SpriteMaterial","MeshToonMaterial","MeshBasicMaterial","MeshDepthMaterial","MeshPhongMaterial","LineBasicMaterial","RawShaderMaterial","MeshMatcapMaterial","MeshNormalMaterial","LineDashedMaterial","MeshLambertMaterial","MeshStandardMaterial","MeshDistanceMaterial","MeshPhysicalMaterial","Light","SpotLight","SpotLightHelper","PointLight","PointLightHelper","AmbientLight","RectAreaLight","HemisphereLight","HemisphereLightHelper","DirectionalLight","DirectionalLightHelper","CubeCamera","ArrayCamera","StereoCamera","PerspectiveCamera","OrthographicCamera","Texture","CubeTexture","DataTexture","DepthTexture","VideoTexture","CanvasTexture","CompressedTexture","CatmullRomCurve3","Points","Raycaster","CameraHelper","Color","TextureLoader"];/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ue=require("three");function He(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const f=He(Ue),Y=["WebGLRenderer","Scene","Group","Object3D","Mesh","Sprite","BoxGeometry","BufferGeometry","CircleGeometry","ConeGeometry","CylinderGeometry","DodecahedronGeometry","ExtrudeGeometry","IcosahedronGeometry","InstancedBufferGeometry","LatheGeometry","OctahedronGeometry","PlaneGeometry","PolyhedronGeometry","RingGeometry","ShapeGeometry","SphereGeometry","TetrahedronGeometry","TorusGeometry","TorusKnotGeometry","TubeGeometry","WireframeGeometry","PointsMaterial","ShaderMaterial","ShadowMaterial","SpriteMaterial","MeshToonMaterial","MeshBasicMaterial","MeshDepthMaterial","MeshPhongMaterial","LineBasicMaterial","RawShaderMaterial","MeshMatcapMaterial","MeshNormalMaterial","LineDashedMaterial","MeshLambertMaterial","MeshStandardMaterial","MeshDistanceMaterial","MeshPhysicalMaterial","Light","SpotLight","SpotLightHelper","PointLight","PointLightHelper","AmbientLight","RectAreaLight","HemisphereLight","HemisphereLightHelper","DirectionalLight","DirectionalLightHelper","CubeCamera","ArrayCamera","StereoCamera","PerspectiveCamera","OrthographicCamera","Texture","CubeTexture","DataTexture","DepthTexture","VideoTexture","CanvasTexture","CompressedTexture","CatmullRomCurve3","Points","Raycaster","CameraHelper","Color","TextureLoader"];/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const ru=globalThis,$u=ru.ShadowRoot&&(ru.ShadyCSS===void 0||ru.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_u=Symbol(),Nu=new WeakMap;let Zu=class{constructor(u,e,r){if(this._$cssResult$=!0,r!==_u)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=u,this.t=e}get styleSheet(){let u=this.o;const e=this.t;if($u&&u===void 0){const r=e!==void 0&&e.length===1;r&&(u=Nu.get(e)),u===void 0&&((this.o=u=new CSSStyleSheet).replaceSync(this.cssText),r&&Nu.set(e,u))}return u}toString(){return this.cssText}};const le=t=>new Zu(typeof t=="string"?t:t+"",void 0,_u),Fe=(t,...u)=>{const e=t.length===1?t[0]:u.reduce((r,s,i)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1],t[0]);return new Zu(e,t,_u)},de=(t,u)=>{if($u)t.adoptedStyleSheets=u.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of u){const r=document.createElement("style"),s=ru.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=e.cssText,t.appendChild(r)}},Tu=$u?t=>t:t=>t instanceof CSSStyleSheet?(u=>{let e="";for(const r of u.cssRules)e+=r.cssText;return le(e)})(t):t;/**
5
+ */const D=globalThis,X=D.ShadowRoot&&(D.ShadyCSS===void 0||D.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Q=Symbol(),ie=new WeakMap;let Ae=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==Q)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(X&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=ie.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&ie.set(t,e))}return e}toString(){return this.cssText}};const je=i=>new Ae(typeof i=="string"?i:i+"",void 0,Q),De=(i,...e)=>{const t=i.length===1?i[0]:e.reduce((s,r,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[n+1],i[0]);return new Ae(t,i,Q)},ke=(i,e)=>{if(X)i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),r=D.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=t.cssText,i.appendChild(s)}},ne=X?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return je(t)})(i):i;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:pe,defineProperty:fe,getOwnPropertyDescriptor:me,getOwnPropertyNames:Be,getOwnPropertySymbols:ye,getPrototypeOf:ge}=Object,N=globalThis,Ou=N.trustedTypes,be=Ou?Ou.emptyScript:"",Au=N.reactiveElementPolyfillSupport,W=(t,u)=>t,iu={toAttribute(t,u){switch(u){case Boolean:t=t?be:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,u){let e=t;switch(u){case Boolean:e=t!==null;break;case Number:e=t===null?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch{e=null}}return e}},vu=(t,u)=>!pe(t,u),Mu={attribute:!0,type:String,converter:iu,reflect:!1,useDefault:!1,hasChanged:vu};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),N.litPropertyMetadata??(N.litPropertyMetadata=new WeakMap);let I=class extends HTMLElement{static addInitializer(u){this._$Ei(),(this.l??(this.l=[])).push(u)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(u,e=Mu){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(u)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(u,e),!e.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(u,r,e);s!==void 0&&fe(this.prototype,u,s)}}static getPropertyDescriptor(u,e,r){const{get:s,set:i}=me(this.prototype,u)??{get(){return this[e]},set(n){this[e]=n}};return{get:s,set(n){const o=s==null?void 0:s.call(this);i==null||i.call(this,n),this.requestUpdate(u,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(u){return this.elementProperties.get(u)??Mu}static _$Ei(){if(this.hasOwnProperty(W("elementProperties")))return;const u=ge(this);u.finalize(),u.l!==void 0&&(this.l=[...u.l]),this.elementProperties=new Map(u.elementProperties)}static finalize(){if(this.hasOwnProperty(W("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(W("properties"))){const e=this.properties,r=[...Be(e),...ye(e)];for(const s of r)this.createProperty(s,e[s])}const u=this[Symbol.metadata];if(u!==null){const e=litPropertyMetadata.get(u);if(e!==void 0)for(const[r,s]of e)this.elementProperties.set(r,s)}this._$Eh=new Map;for(const[e,r]of this.elementProperties){const s=this._$Eu(e,r);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(u){const e=[];if(Array.isArray(u)){const r=new Set(u.flat(1/0).reverse());for(const s of r)e.unshift(Tu(s))}else u!==void 0&&e.push(Tu(u));return e}static _$Eu(u,e){const r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof u=="string"?u.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var u;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(u=this.constructor.l)==null||u.forEach(e=>e(this))}addController(u){var e;(this._$EO??(this._$EO=new Set)).add(u),this.renderRoot!==void 0&&this.isConnected&&((e=u.hostConnected)==null||e.call(u))}removeController(u){var e;(e=this._$EO)==null||e.delete(u)}_$E_(){const u=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(u.set(r,this[r]),delete this[r]);u.size>0&&(this._$Ep=u)}createRenderRoot(){const u=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return de(u,this.constructor.elementStyles),u}connectedCallback(){var u;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(u=this._$EO)==null||u.forEach(e=>{var r;return(r=e.hostConnected)==null?void 0:r.call(e)})}enableUpdating(u){}disconnectedCallback(){var u;(u=this._$EO)==null||u.forEach(e=>{var r;return(r=e.hostDisconnected)==null?void 0:r.call(e)})}attributeChangedCallback(u,e,r){this._$AK(u,r)}_$ET(u,e){var i;const r=this.constructor.elementProperties.get(u),s=this.constructor._$Eu(u,r);if(s!==void 0&&r.reflect===!0){const n=(((i=r.converter)==null?void 0:i.toAttribute)!==void 0?r.converter:iu).toAttribute(e,r.type);this._$Em=u,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(u,e){var i,n;const r=this.constructor,s=r._$Eh.get(u);if(s!==void 0&&this._$Em!==s){const o=r.getPropertyOptions(s),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((i=o.converter)==null?void 0:i.fromAttribute)!==void 0?o.converter:iu;this._$Em=s;const E=a.fromAttribute(e,o.type);this[s]=E??((n=this._$Ej)==null?void 0:n.get(s))??E,this._$Em=null}}requestUpdate(u,e,r,s=!1,i){var n;if(u!==void 0){const o=this.constructor;if(s===!1&&(i=this[u]),r??(r=o.getPropertyOptions(u)),!((r.hasChanged??vu)(i,e)||r.useDefault&&r.reflect&&i===((n=this._$Ej)==null?void 0:n.get(u))&&!this.hasAttribute(o._$Eu(u,r))))return;this.C(u,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(u,e,{useDefault:r,reflect:s,wrapped:i},n){r&&!(this._$Ej??(this._$Ej=new Map)).has(u)&&(this._$Ej.set(u,n??e??this[u]),i!==!0||n!==void 0)||(this._$AL.has(u)||(this.hasUpdated||r||(e=void 0),this._$AL.set(u,e)),s===!0&&this._$Em!==u&&(this._$Eq??(this._$Eq=new Set)).add(u))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const u=this.scheduleUpdate();return u!=null&&await u,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,n]of s){const{wrapped:o}=n,a=this[i];o!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,n,a)}}let u=!1;const e=this._$AL;try{u=this.shouldUpdate(e),u?(this.willUpdate(e),(r=this._$EO)==null||r.forEach(s=>{var i;return(i=s.hostUpdate)==null?void 0:i.call(s)}),this.update(e)):this._$EM()}catch(s){throw u=!1,this._$EM(),s}u&&this._$AE(e)}willUpdate(u){}_$AE(u){var e;(e=this._$EO)==null||e.forEach(r=>{var s;return(s=r.hostUpdated)==null?void 0:s.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(u)),this.updated(u)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(u){return!0}update(u){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(u){}firstUpdated(u){}};I.elementStyles=[],I.shadowRootOptions={mode:"open"},I[W("elementProperties")]=new Map,I[W("finalized")]=new Map,Au==null||Au({ReactiveElement:I}),(N.reactiveElementVersions??(N.reactiveElementVersions=[])).push("2.1.2");/**
9
+ */const{is:Ie,defineProperty:Be,getOwnPropertyDescriptor:Ge,getOwnPropertyNames:ze,getOwnPropertySymbols:qe,getPrototypeOf:Ve}=Object,g=globalThis,oe=g.trustedTypes,We=oe?oe.emptyScript:"",q=g.reactiveElementPolyfillSupport,M=(i,e)=>i,I={toAttribute(i,e){switch(e){case Boolean:i=i?We:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},ee=(i,e)=>!Ie(i,e),ae={attribute:!0,type:String,converter:I,reflect:!1,useDefault:!1,hasChanged:ee};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),g.litPropertyMetadata??(g.litPropertyMetadata=new WeakMap);let S=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ae){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(e,s,t);r!==void 0&&Be(this.prototype,e,r)}}static getPropertyDescriptor(e,t,s){const{get:r,set:n}=Ge(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:r,set(o){const a=r==null?void 0:r.call(this);n==null||n.call(this,o),this.requestUpdate(e,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ae}static _$Ei(){if(this.hasOwnProperty(M("elementProperties")))return;const e=Ve(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(M("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(M("properties"))){const t=this.properties,s=[...ze(t),...qe(t)];for(const r of s)this.createProperty(r,t[r])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,r]of t)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const r=this._$Eu(t,s);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const r of s)t.unshift(ne(r))}else e!==void 0&&t.push(ne(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ke(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var s;return(s=t.hostConnected)==null?void 0:s.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var s;return(s=t.hostDisconnected)==null?void 0:s.call(t)})}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){var n;const s=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,s);if(r!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:I).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(e,t){var n,o;const s=this.constructor,r=s._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const a=s.getPropertyOptions(r),h=typeof a.converter=="function"?{fromAttribute:a.converter}:((n=a.converter)==null?void 0:n.fromAttribute)!==void 0?a.converter:I;this._$Em=r;const c=h.fromAttribute(t,a.type);this[r]=c??((o=this._$Ej)==null?void 0:o.get(r))??c,this._$Em=null}}requestUpdate(e,t,s,r=!1,n){var o;if(e!==void 0){const a=this.constructor;if(r===!1&&(n=this[e]),s??(s=a.getPropertyOptions(e)),!((s.hasChanged??ee)(n,t)||s.useDefault&&s.reflect&&n===((o=this._$Ej)==null?void 0:o.get(e))&&!this.hasAttribute(a._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:r,wrapped:n},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,o]of r){const{wrapped:a}=o,h=this[n];a!==!0||this._$AL.has(n)||h===void 0||this.C(n,void 0,o,h)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(s=this._$EO)==null||s.forEach(r=>{var n;return(n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(s=>{var r;return(r=s.hostUpdated)==null?void 0:r.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[M("elementProperties")]=new Map,S[M("finalized")]=new Map,q==null||q({ReactiveElement:S}),(g.reactiveElementVersions??(g.reactiveElementVersions=[])).push("2.1.2");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const J=globalThis,Ru=t=>t,nu=J.trustedTypes,Lu=nu?nu.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ku="$lit$",x=`lit$${Math.random().toFixed(9).slice(2)}$`,Xu="?"+x,$e=`<${Xu}>`,j=document,K=()=>j.createComment(""),X=t=>t===null||typeof t!="object"&&typeof t!="function",wu=Array.isArray,_e=t=>wu(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Eu=`[
14
- \f\r]`,G=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Hu=/-->/g,Uu=/>/g,M=RegExp(`>|${Eu}(?:([^\\s"'>=/]+)(${Eu}*=${Eu}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ku=/'/g,ju=/"/g,Yu=/^(?:script|style|textarea|title)$/i,ve=t=>(u,...e)=>({_$litType$:t,strings:u,values:e}),Su=ve(1),V=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Iu=new WeakMap,H=j.createTreeWalker(j,129);function Qu(t,u){if(!wu(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Lu!==void 0?Lu.createHTML(u):u}const we=(t,u)=>{const e=t.length-1,r=[];let s,i=u===2?"<svg>":u===3?"<math>":"",n=G;for(let o=0;o<e;o++){const a=t[o];let E,d,C=-1,y=0;for(;y<a.length&&(n.lastIndex=y,d=n.exec(a),d!==null);)y=n.lastIndex,n===G?d[1]==="!--"?n=Hu:d[1]!==void 0?n=Uu:d[2]!==void 0?(Yu.test(d[2])&&(s=RegExp("</"+d[2],"g")),n=M):d[3]!==void 0&&(n=M):n===M?d[0]===">"?(n=s??G,C=-1):d[1]===void 0?C=-2:(C=n.lastIndex-d[2].length,E=d[1],n=d[3]===void 0?M:d[3]==='"'?ju:ku):n===ju||n===ku?n=M:n===Hu||n===Uu?n=G:(n=M,s=void 0);const v=n===M&&t[o+1].startsWith("/>")?" ":"";i+=n===G?a+$e:C>=0?(r.push(E),a.slice(0,C)+Ku+a.slice(C)+x+v):a+x+(C===-2?o:v)}return[Qu(t,i+(t[e]||"<?>")+(u===2?"</svg>":u===3?"</math>":"")),r]};class Y{constructor({strings:u,_$litType$:e},r){let s;this.parts=[];let i=0,n=0;const o=u.length-1,a=this.parts,[E,d]=we(u,e);if(this.el=Y.createElement(E,r),H.currentNode=this.el.content,e===2||e===3){const C=this.el.content.firstChild;C.replaceWith(...C.childNodes)}for(;(s=H.nextNode())!==null&&a.length<o;){if(s.nodeType===1){if(s.hasAttributes())for(const C of s.getAttributeNames())if(C.endsWith(Ku)){const y=d[n++],v=s.getAttribute(C).split(x),eu=/([.?@])?(.*)/.exec(y);a.push({type:1,index:i,name:eu[2],strings:v,ctor:eu[1]==="."?Pe:eu[1]==="?"?xe:eu[1]==="@"?Ne:cu}),s.removeAttribute(C)}else C.startsWith(x)&&(a.push({type:6,index:i}),s.removeAttribute(C));if(Yu.test(s.tagName)){const C=s.textContent.split(x),y=C.length-1;if(y>0){s.textContent=nu?nu.emptyScript:"";for(let v=0;v<y;v++)s.append(C[v],K()),H.nextNode(),a.push({type:2,index:++i});s.append(C[y],K())}}}else if(s.nodeType===8)if(s.data===Xu)a.push({type:2,index:i});else{let C=-1;for(;(C=s.data.indexOf(x,C+1))!==-1;)a.push({type:7,index:i}),C+=x.length-1}i++}}static createElement(u,e){const r=j.createElement("template");return r.innerHTML=u,r}}function z(t,u,e=t,r){var n,o;if(u===V)return u;let s=r!==void 0?(n=e._$Co)==null?void 0:n[r]:e._$Cl;const i=X(u)?void 0:u._$litDirective$;return(s==null?void 0:s.constructor)!==i&&((o=s==null?void 0:s._$AO)==null||o.call(s,!1),i===void 0?s=void 0:(s=new i(t),s._$AT(t,e,r)),r!==void 0?(e._$Co??(e._$Co=[]))[r]=s:e._$Cl=s),s!==void 0&&(u=z(t,s._$AS(t,u.values),s,r)),u}class Se{constructor(u,e){this._$AV=[],this._$AN=void 0,this._$AD=u,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(u){const{el:{content:e},parts:r}=this._$AD,s=((u==null?void 0:u.creationScope)??j).importNode(e,!0);H.currentNode=s;let i=H.nextNode(),n=0,o=0,a=r[0];for(;a!==void 0;){if(n===a.index){let E;a.type===2?E=new uu(i,i.nextSibling,this,u):a.type===1?E=new a.ctor(i,a.name,a.strings,this,u):a.type===6&&(E=new Te(i,this,u)),this._$AV.push(E),a=r[++o]}n!==(a==null?void 0:a.index)&&(i=H.nextNode(),n++)}return H.currentNode=j,s}p(u){let e=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(u,r,e),e+=r.strings.length-2):r._$AI(u[e])),e++}}class uu{get _$AU(){var u;return((u=this._$AM)==null?void 0:u._$AU)??this._$Cv}constructor(u,e,r,s){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=u,this._$AB=e,this._$AM=r,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let u=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(u==null?void 0:u.nodeType)===11&&(u=e.parentNode),u}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(u,e=this){u=z(this,u,e),X(u)?u===m||u==null||u===""?(this._$AH!==m&&this._$AR(),this._$AH=m):u!==this._$AH&&u!==V&&this._(u):u._$litType$!==void 0?this.$(u):u.nodeType!==void 0?this.T(u):_e(u)?this.k(u):this._(u)}O(u){return this._$AA.parentNode.insertBefore(u,this._$AB)}T(u){this._$AH!==u&&(this._$AR(),this._$AH=this.O(u))}_(u){this._$AH!==m&&X(this._$AH)?this._$AA.nextSibling.data=u:this.T(j.createTextNode(u)),this._$AH=u}$(u){var i;const{values:e,_$litType$:r}=u,s=typeof r=="number"?this._$AC(u):(r.el===void 0&&(r.el=Y.createElement(Qu(r.h,r.h[0]),this.options)),r);if(((i=this._$AH)==null?void 0:i._$AD)===s)this._$AH.p(e);else{const n=new Se(s,this),o=n.u(this.options);n.p(e),this.T(o),this._$AH=n}}_$AC(u){let e=Iu.get(u.strings);return e===void 0&&Iu.set(u.strings,e=new Y(u)),e}k(u){wu(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,s=0;for(const i of u)s===e.length?e.push(r=new uu(this.O(K()),this.O(K()),this,this.options)):r=e[s],r._$AI(i),s++;s<e.length&&(this._$AR(r&&r._$AB.nextSibling,s),e.length=s)}_$AR(u=this._$AA.nextSibling,e){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,e);u!==this._$AB;){const s=Ru(u).nextSibling;Ru(u).remove(),u=s}}setConnected(u){var e;this._$AM===void 0&&(this._$Cv=u,(e=this._$AP)==null||e.call(this,u))}}class cu{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(u,e,r,s,i){this.type=1,this._$AH=m,this._$AN=void 0,this.element=u,this.name=e,this._$AM=s,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=m}_$AI(u,e=this,r,s){const i=this.strings;let n=!1;if(i===void 0)u=z(this,u,e,0),n=!X(u)||u!==this._$AH&&u!==V,n&&(this._$AH=u);else{const o=u;let a,E;for(u=i[0],a=0;a<i.length-1;a++)E=z(this,o[r+a],e,a),E===V&&(E=this._$AH[a]),n||(n=!X(E)||E!==this._$AH[a]),E===m?u=m:u!==m&&(u+=(E??"")+i[a+1]),this._$AH[a]=E}n&&!s&&this.j(u)}j(u){u===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,u??"")}}class Pe extends cu{constructor(){super(...arguments),this.type=3}j(u){this.element[this.name]=u===m?void 0:u}}class xe extends cu{constructor(){super(...arguments),this.type=4}j(u){this.element.toggleAttribute(this.name,!!u&&u!==m)}}class Ne extends cu{constructor(u,e,r,s,i){super(u,e,r,s,i),this.type=5}_$AI(u,e=this){if((u=z(this,u,e,0)??m)===V)return;const r=this._$AH,s=u===m&&r!==m||u.capture!==r.capture||u.once!==r.once||u.passive!==r.passive,i=u!==m&&(r===m||s);s&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,u),this._$AH=u}handleEvent(u){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,u):this._$AH.handleEvent(u)}}class Te{constructor(u,e,r){this.element=u,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(u){z(this,u)}}const Cu=J.litHtmlPolyfillSupport;Cu==null||Cu(Y,uu),(J.litHtmlVersions??(J.litHtmlVersions=[])).push("3.3.2");const Oe=(t,u,e)=>{const r=(e==null?void 0:e.renderBefore)??u;let s=r._$litPart$;if(s===void 0){const i=(e==null?void 0:e.renderBefore)??null;r._$litPart$=s=new uu(u.insertBefore(K(),i),i,void 0,e??{})}return s._$AI(t),s};/**
13
+ */const R=globalThis,he=i=>i,B=R.trustedTypes,ce=B?B.createPolicy("lit-html",{createHTML:i=>i}):void 0,_e="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,be="?"+$,Fe=`<${be}>`,w=document,N=()=>w.createComment(""),x=i=>i===null||typeof i!="object"&&typeof i!="function",te=Array.isArray,Je=i=>te(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",V=`[
14
+ \f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,le=/-->/g,de=/>/g,_=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ue=/'/g,pe=/"/g,ve=/^(?:script|style|textarea|title)$/i,Ke=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),se=Ke(1),T=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),me=new WeakMap,b=w.createTreeWalker(w,129);function Ce(i,e){if(!te(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ce!==void 0?ce.createHTML(e):e}const Ze=(i,e)=>{const t=i.length-1,s=[];let r,n=e===2?"<svg>":e===3?"<math>":"",o=O;for(let a=0;a<t;a++){const h=i[a];let c,d,l=-1,p=0;for(;p<h.length&&(o.lastIndex=p,d=o.exec(h),d!==null);)p=o.lastIndex,o===O?d[1]==="!--"?o=le:d[1]!==void 0?o=de:d[2]!==void 0?(ve.test(d[2])&&(r=RegExp("</"+d[2],"g")),o=_):d[3]!==void 0&&(o=_):o===_?d[0]===">"?(o=r??O,l=-1):d[1]===void 0?l=-2:(l=o.lastIndex-d[2].length,c=d[1],o=d[3]===void 0?_:d[3]==='"'?pe:ue):o===pe||o===ue?o=_:o===le||o===de?o=O:(o=_,r=void 0);const E=o===_&&i[a+1].startsWith("/>")?" ":"";n+=o===O?h+Fe:l>=0?(s.push(c),h.slice(0,l)+_e+h.slice(l)+$+E):h+$+(l===-2?a:E)}return[Ce(i,n+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class L{constructor({strings:e,_$litType$:t},s){let r;this.parts=[];let n=0,o=0;const a=e.length-1,h=this.parts,[c,d]=Ze(e,t);if(this.el=L.createElement(c,s),b.currentNode=this.el.content,t===2||t===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(r=b.nextNode())!==null&&h.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const l of r.getAttributeNames())if(l.endsWith(_e)){const p=d[o++],E=r.getAttribute(l).split($),j=/([.?@])?(.*)/.exec(p);h.push({type:1,index:n,name:j[2],strings:E,ctor:j[1]==="."?Xe:j[1]==="?"?Qe:j[1]==="@"?et:z}),r.removeAttribute(l)}else l.startsWith($)&&(h.push({type:6,index:n}),r.removeAttribute(l));if(ve.test(r.tagName)){const l=r.textContent.split($),p=l.length-1;if(p>0){r.textContent=B?B.emptyScript:"";for(let E=0;E<p;E++)r.append(l[E],N()),b.nextNode(),h.push({type:2,index:++n});r.append(l[p],N())}}}else if(r.nodeType===8)if(r.data===be)h.push({type:2,index:n});else{let l=-1;for(;(l=r.data.indexOf($,l+1))!==-1;)h.push({type:7,index:n}),l+=$.length-1}n++}}static createElement(e,t){const s=w.createElement("template");return s.innerHTML=e,s}}function P(i,e,t=i,s){var o,a;if(e===T)return e;let r=s!==void 0?(o=t._$Co)==null?void 0:o[s]:t._$Cl;const n=x(e)?void 0:e._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((a=r==null?void 0:r._$AO)==null||a.call(r,!1),n===void 0?r=void 0:(r=new n(i),r._$AT(i,t,s)),s!==void 0?(t._$Co??(t._$Co=[]))[s]=r:t._$Cl=r),r!==void 0&&(e=P(i,r._$AS(i,e.values),r,s)),e}class Ye{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,r=((e==null?void 0:e.creationScope)??w).importNode(t,!0);b.currentNode=r;let n=b.nextNode(),o=0,a=0,h=s[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new H(n,n.nextSibling,this,e):h.type===1?c=new h.ctor(n,h.name,h.strings,this,e):h.type===6&&(c=new tt(n,this,e)),this._$AV.push(c),h=s[++a]}o!==(h==null?void 0:h.index)&&(n=b.nextNode(),o++)}return b.currentNode=w,r}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class H{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,t,s,r){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=P(this,e,t),x(e)?e===u||e==null||e===""?(this._$AH!==u&&this._$AR(),this._$AH=u):e!==this._$AH&&e!==T&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Je(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==u&&x(this._$AH)?this._$AA.nextSibling.data=e:this.T(w.createTextNode(e)),this._$AH=e}$(e){var n;const{values:t,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=L.createElement(Ce(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(t);else{const o=new Ye(r,this),a=o.u(this.options);o.p(t),this.T(a),this._$AH=o}}_$AC(e){let t=me.get(e.strings);return t===void 0&&me.set(e.strings,t=new L(e)),t}k(e){te(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,r=0;for(const n of e)r===t.length?t.push(s=new H(this.O(N()),this.O(N()),this,this.options)):s=t[r],s._$AI(n),r++;r<t.length&&(this._$AR(s&&s._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,t);e!==this._$AB;){const r=he(e).nextSibling;he(e).remove(),e=r}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}}class z{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,r,n){this.type=1,this._$AH=u,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(e,t=this,s,r){const n=this.strings;let o=!1;if(n===void 0)e=P(this,e,t,0),o=!x(e)||e!==this._$AH&&e!==T,o&&(this._$AH=e);else{const a=e;let h,c;for(e=n[0],h=0;h<n.length-1;h++)c=P(this,a[s+h],t,h),c===T&&(c=this._$AH[h]),o||(o=!x(c)||c!==this._$AH[h]),c===u?e=u:e!==u&&(e+=(c??"")+n[h+1]),this._$AH[h]=c}o&&!r&&this.j(e)}j(e){e===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Xe extends z{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===u?void 0:e}}class Qe extends z{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==u)}}class et extends z{constructor(e,t,s,r,n){super(e,t,s,r,n),this.type=5}_$AI(e,t=this){if((e=P(this,e,t,0)??u)===T)return;const s=this._$AH,r=e===u&&s!==u||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,n=e!==u&&(s===u||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;typeof this._$AH=="function"?this._$AH.call(((t=this.options)==null?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}}class tt{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){P(this,e)}}const W=R.litHtmlPolyfillSupport;W==null||W(L,H),(R.litHtmlVersions??(R.litHtmlVersions=[])).push("3.3.2");const st=(i,e,t)=>{const s=(t==null?void 0:t.renderBefore)??e;let r=s._$litPart$;if(r===void 0){const n=(t==null?void 0:t.renderBefore)??null;s._$litPart$=r=new H(e.insertBefore(N(),n),n,void 0,t??{})}return r._$AI(i),r};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */const U=globalThis;class k extends I{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const u=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=u.firstChild),u}update(u){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(u),this._$Do=Oe(e,this.renderRoot,this.renderOptions)}connectedCallback(){var u;super.connectedCallback(),(u=this._$Do)==null||u.setConnected(!0)}disconnectedCallback(){var u;super.disconnectedCallback(),(u=this._$Do)==null||u.setConnected(!1)}render(){return V}}var Ju;k._$litElement$=!0,k.finalized=!0,(Ju=U.litElementHydrateSupport)==null||Ju.call(U,{LitElement:k});const lu=U.litElementPolyfillSupport;lu==null||lu({LitElement:k});(U.litElementVersions??(U.litElementVersions=[])).push("4.2.2");const Me=(t,u,e)=>{if(!u)return;const r=Array.isArray(u)?u:u.match(/([^[.\]])+/g),s=r==null?void 0:r.reduce((i,n)=>i&&i[n],t);return s===void 0?e:s};function Re(t){if(!t)return!1;const u=t.constructor&&t.constructor.toString().substring(0,5)==="class";if(t.prototype===void 0)return u;const e=t.prototype.constructor&&t.prototype.constructor.toString&&t.prototype.constructor.toString().substring(0,5)==="class";return u||e}const Le=()=>{const t="[object Number]",e=Object.prototype.toString;function r(i){return!!i&&typeof i=="object"}return function(n){return typeof n=="number"||r(n)&&e.call(n)==t}},He=Le(),Ue=(t,u,e)=>{const r=Array.isArray(u)?u:u.match(/([^[.\]])+/g);r==null||r.reduce((s,i,n)=>(s[i]===void 0&&(s[i]={}),n===r.length-1&&(s[i]=e),s[i]),t)},ue="data-three-uuid",Vu=t=>{var e,r,s;let u=t.parentNode;for(;u&&!(u!=null&&u.instance)&&!((e=u==null?void 0:u.three)!=null&&e.scene);)u=(u==null?void 0:u.parentNode)||(u==null?void 0:u.host)||((s=(r=u.getRootNode)==null?void 0:r.call(u))==null?void 0:s.host);return u};function su(t,u){return t?t instanceof ShadowRoot?su(t.host,u):t instanceof HTMLElement&&(typeof u=="string"&&t.matches(u)||typeof u=="function"&&u(t))?t:su(t.parentNode,u):null}const fu=(t,u,e)=>{var i,n;const r=Me(t,u);if(He(e)&&(r!=null&&r.setScalar))r.setScalar(+e);else if(r!=null&&r.set)if(typeof e=="string"){const o=e.split(","),a=o.every(E=>!E.match(/^[^\d,]+$/));if((i=e.toLowerCase().trim().match(/^#[\dabcdef]{3,6}$/))!=null&&i.length)if(e.length===4){const E=[e[1],e[1],e[2],e[2],e[3],e[3]].join("");r.set(+`0x${E}`)}else r.set(+`0x${e.slice(1)}`);else o!=null&&o.length&&a?r.set(...o.map(E=>+E)):r.set(e)}else{const o=Array.isArray(e)?e:[e];r.set(...o)}else Ue(t,u,e);const s=t;typeof s.type=="string"&&((n=s.type)!=null&&n.toLowerCase().endsWith("material"))&&(s.needsUpdate=!0)},Fu={$scene:t=>{const u=t.closest("three-lunchbox");return u==null?void 0:u.three.scene},$camera:t=>{const u=t.closest("three-lunchbox");return u==null?void 0:u.three.camera},$renderer:t=>{const u=t.closest("three-lunchbox");return u==null?void 0:u.three.renderer},$domElement:t=>{var e;const u=t.closest("three-lunchbox");return(e=u==null?void 0:u.three.renderer)==null?void 0:e.domElement}},Du=(t,u)=>{var r;if(typeof t!="string")return t;if(t==="")return!0;const e=(r=Fu[t])==null?void 0:r.call(Fu,u);return CSS.supports("color",t)?new b.Color(t):e??t};function ke(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hu={};hu.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;hu.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;hu.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;const du=hu;var je={isSpaceSeparator(t){return typeof t=="string"&&du.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||du.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="‌"||t==="‍"||du.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}};const p=je;let mu,B,S,ou,T,$,f,Pu,Z;var Ie=function(u,e){mu=String(u),B="start",S=[],ou=0,T=1,$=0,f=void 0,Pu=void 0,Z=void 0;do f=Ve(),qe[B]();while(f.type!=="eof");return typeof e=="function"?Bu({"":Z},"",e):Z};function Bu(t,u,e){const r=t[u];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let s=0;s<r.length;s++){const i=String(s),n=Bu(r,i,e);n===void 0?delete r[i]:Object.defineProperty(r,i,{value:n,writable:!0,enumerable:!0,configurable:!0})}else for(const s in r){const i=Bu(r,s,e);i===void 0?delete r[s]:Object.defineProperty(r,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}return e.call(t,u,r)}let h,c,q,w,A;function Ve(){for(h="default",c="",q=!1,w=1;;){A=P();const t=ee[h]();if(t)return t}}function P(){if(mu[ou])return String.fromCodePoint(mu.codePointAt(ou))}function D(){const t=P();return t===`
20
- `?(T++,$=0):t?$+=t.length:$++,t&&(ou+=t.length),t}const ee={default(){switch(A){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
21
- `:case"\r":case"\u2028":case"\u2029":D();return;case"/":D(),h="comment";return;case void 0:return D(),l("eof")}if(p.isSpaceSeparator(A)){D();return}return ee[B]()},comment(){switch(A){case"*":D(),h="multiLineComment";return;case"/":D(),h="singleLineComment";return}throw F(D())},multiLineComment(){switch(A){case"*":D(),h="multiLineCommentAsterisk";return;case void 0:throw F(D())}D()},multiLineCommentAsterisk(){switch(A){case"*":D();return;case"/":D(),h="default";return;case void 0:throw F(D())}D(),h="multiLineComment"},singleLineComment(){switch(A){case`
22
- `:case"\r":case"\u2028":case"\u2029":D(),h="default";return;case void 0:return D(),l("eof")}D()},value(){switch(A){case"{":case"[":return l("punctuator",D());case"n":return D(),R("ull"),l("null",null);case"t":return D(),R("rue"),l("boolean",!0);case"f":return D(),R("alse"),l("boolean",!1);case"-":case"+":D()==="-"&&(w=-1),h="sign";return;case".":c=D(),h="decimalPointLeading";return;case"0":c=D(),h="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":c=D(),h="decimalInteger";return;case"I":return D(),R("nfinity"),l("numeric",1/0);case"N":return D(),R("aN"),l("numeric",NaN);case'"':case"'":q=D()==='"',c="",h="string";return}throw F(D())},identifierNameStartEscape(){if(A!=="u")throw F(D());D();const t=yu();switch(t){case"$":case"_":break;default:if(!p.isIdStartChar(t))throw zu();break}c+=t,h="identifierName"},identifierName(){switch(A){case"$":case"_":case"‌":case"‍":c+=D();return;case"\\":D(),h="identifierNameEscape";return}if(p.isIdContinueChar(A)){c+=D();return}return l("identifier",c)},identifierNameEscape(){if(A!=="u")throw F(D());D();const t=yu();switch(t){case"$":case"_":case"‌":case"‍":break;default:if(!p.isIdContinueChar(t))throw zu();break}c+=t,h="identifierName"},sign(){switch(A){case".":c=D(),h="decimalPointLeading";return;case"0":c=D(),h="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":c=D(),h="decimalInteger";return;case"I":return D(),R("nfinity"),l("numeric",w*(1/0));case"N":return D(),R("aN"),l("numeric",NaN)}throw F(D())},zero(){switch(A){case".":c+=D(),h="decimalPoint";return;case"e":case"E":c+=D(),h="decimalExponent";return;case"x":case"X":c+=D(),h="hexadecimal";return}return l("numeric",w*0)},decimalInteger(){switch(A){case".":c+=D(),h="decimalPoint";return;case"e":case"E":c+=D(),h="decimalExponent";return}if(p.isDigit(A)){c+=D();return}return l("numeric",w*Number(c))},decimalPointLeading(){if(p.isDigit(A)){c+=D(),h="decimalFraction";return}throw F(D())},decimalPoint(){switch(A){case"e":case"E":c+=D(),h="decimalExponent";return}if(p.isDigit(A)){c+=D(),h="decimalFraction";return}return l("numeric",w*Number(c))},decimalFraction(){switch(A){case"e":case"E":c+=D(),h="decimalExponent";return}if(p.isDigit(A)){c+=D();return}return l("numeric",w*Number(c))},decimalExponent(){switch(A){case"+":case"-":c+=D(),h="decimalExponentSign";return}if(p.isDigit(A)){c+=D(),h="decimalExponentInteger";return}throw F(D())},decimalExponentSign(){if(p.isDigit(A)){c+=D(),h="decimalExponentInteger";return}throw F(D())},decimalExponentInteger(){if(p.isDigit(A)){c+=D();return}return l("numeric",w*Number(c))},hexadecimal(){if(p.isHexDigit(A)){c+=D(),h="hexadecimalInteger";return}throw F(D())},hexadecimalInteger(){if(p.isHexDigit(A)){c+=D();return}return l("numeric",w*Number(c))},string(){switch(A){case"\\":D(),c+=ze();return;case'"':if(q)return D(),l("string",c);c+=D();return;case"'":if(!q)return D(),l("string",c);c+=D();return;case`
23
- `:case"\r":throw F(D());case"\u2028":case"\u2029":We(A);break;case void 0:throw F(D())}c+=D()},start(){switch(A){case"{":case"[":return l("punctuator",D())}h="value"},beforePropertyName(){switch(A){case"$":case"_":c=D(),h="identifierName";return;case"\\":D(),h="identifierNameStartEscape";return;case"}":return l("punctuator",D());case'"':case"'":q=D()==='"',h="string";return}if(p.isIdStartChar(A)){c+=D(),h="identifierName";return}throw F(D())},afterPropertyName(){if(A===":")return l("punctuator",D());throw F(D())},beforePropertyValue(){h="value"},afterPropertyValue(){switch(A){case",":case"}":return l("punctuator",D())}throw F(D())},beforeArrayValue(){if(A==="]")return l("punctuator",D());h="value"},afterArrayValue(){switch(A){case",":case"]":return l("punctuator",D())}throw F(D())},end(){throw F(D())}};function l(t,u){return{type:t,value:u,line:T,column:$}}function R(t){for(const u of t){if(P()!==u)throw F(D());D()}}function ze(){switch(P()){case"b":return D(),"\b";case"f":return D(),"\f";case"n":return D(),`
24
- `;case"r":return D(),"\r";case"t":return D()," ";case"v":return D(),"\v";case"0":if(D(),p.isDigit(P()))throw F(D());return"\0";case"x":return D(),Ge();case"u":return D(),yu();case`
25
- `:case"\u2028":case"\u2029":return D(),"";case"\r":return D(),P()===`
26
- `&&D(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw F(D());case void 0:throw F(D())}return D()}function Ge(){let t="",u=P();if(!p.isHexDigit(u)||(t+=D(),u=P(),!p.isHexDigit(u)))throw F(D());return t+=D(),String.fromCodePoint(parseInt(t,16))}function yu(){let t="",u=4;for(;u-- >0;){const e=P();if(!p.isHexDigit(e))throw F(D());t+=D()}return String.fromCodePoint(parseInt(t,16))}const qe={start(){if(f.type==="eof")throw L();pu()},beforePropertyName(){switch(f.type){case"identifier":case"string":Pu=f.value,B="afterPropertyName";return;case"punctuator":tu();return;case"eof":throw L()}},afterPropertyName(){if(f.type==="eof")throw L();B="beforePropertyValue"},beforePropertyValue(){if(f.type==="eof")throw L();pu()},beforeArrayValue(){if(f.type==="eof")throw L();if(f.type==="punctuator"&&f.value==="]"){tu();return}pu()},afterPropertyValue(){if(f.type==="eof")throw L();switch(f.value){case",":B="beforePropertyName";return;case"}":tu()}},afterArrayValue(){if(f.type==="eof")throw L();switch(f.value){case",":B="beforeArrayValue";return;case"]":tu()}},end(){}};function pu(){let t;switch(f.type){case"punctuator":switch(f.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=f.value;break}if(Z===void 0)Z=t;else{const u=S[S.length-1];Array.isArray(u)?u.push(t):Object.defineProperty(u,Pu,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")S.push(t),Array.isArray(t)?B="beforeArrayValue":B="beforePropertyName";else{const u=S[S.length-1];u==null?B="end":Array.isArray(u)?B="afterArrayValue":B="afterPropertyValue"}}function tu(){S.pop();const t=S[S.length-1];t==null?B="end":Array.isArray(t)?B="afterArrayValue":B="afterPropertyValue"}function F(t){return au(t===void 0?`JSON5: invalid end of input at ${T}:${$}`:`JSON5: invalid character '${te(t)}' at ${T}:${$}`)}function L(){return au(`JSON5: invalid end of input at ${T}:${$}`)}function zu(){return $-=5,au(`JSON5: invalid identifier character at ${T}:${$}`)}function We(t){console.warn(`JSON5: '${te(t)}' in strings is not valid ECMAScript; consider escaping`)}function te(t){const u={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(u[t])return u[t];if(t<" "){const e=t.charCodeAt(0).toString(16);return"\\x"+("00"+e).substring(e.length)}return t}function au(t){const u=new SyntaxError(t);return u.lineNumber=T,u.columnNumber=$,u}const re=ke(Ie);/**
19
+ */const v=globalThis;class C extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=st(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return T}}var ge;C._$litElement$=!0,C.finalized=!0,(ge=v.litElementHydrateSupport)==null||ge.call(v,{LitElement:C});const F=v.litElementPolyfillSupport;F==null||F({LitElement:C});(v.litElementVersions??(v.litElementVersions=[])).push("4.2.2");const rt=(i,e,t)=>{if(!e)return;const s=Array.isArray(e)?e:e.match(/([^[.\]])+/g),r=s==null?void 0:s.reduce((n,o)=>n&&n[o],i);return r===void 0?t:r};function it(i){if(!i)return!1;const e=i.constructor&&i.constructor.toString().substring(0,5)==="class";if(i.prototype===void 0)return e;const t=i.prototype.constructor&&i.prototype.constructor.toString&&i.prototype.constructor.toString().substring(0,5)==="class";return e||t}const nt=()=>{const i="[object Number]",t=Object.prototype.toString;function s(n){return!!n&&typeof n=="object"}return function(o){return typeof o=="number"||s(o)&&t.call(o)==i}},ot=nt(),at=(i,e,t)=>{const s=Array.isArray(e)?e:e.match(/([^[.\]])+/g);s==null||s.reduce((r,n,o)=>(r[n]===void 0&&(r[n]={}),o===s.length-1&&(r[n]=t),r[n]),i)},we="data-three-uuid",fe=i=>{var t,s,r;let e=i.parentNode;for(;e&&!(e!=null&&e.instance)&&!((t=e==null?void 0:e.three)!=null&&t.scene);)e=(e==null?void 0:e.parentNode)||(e==null?void 0:e.host)||((r=(s=e.getRootNode)==null?void 0:s.call(e))==null?void 0:r.host);return e};function k(i,e){return i?i instanceof ShadowRoot?k(i.host,e):i instanceof HTMLElement&&(typeof e=="string"&&i.matches(e)||typeof e=="function"&&e(i))?i:k(i.parentNode,e):null}const K=(i,e,t)=>{var n,o;const s=rt(i,e);if(ot(t)&&(s!=null&&s.setScalar))s.setScalar(+t);else if(s!=null&&s.set)if(typeof t=="string"){const a=t.split(","),h=a.every(c=>!c.match(/^[^\d,]+$/));if((n=t.toLowerCase().trim().match(/^#[\dabcdef]{3,6}$/))!=null&&n.length)if(t.length===4){const c=[t[1],t[1],t[2],t[2],t[3],t[3]].join("");s.set(+`0x${c}`)}else s.set(+`0x${t.slice(1)}`);else a!=null&&a.length&&h?s.set(...a.map(c=>+c)):s.set(t)}else{const a=Array.isArray(t)?t:[t];s.set(...a)}else at(i,e,t);const r=i;typeof r.type=="string"&&((o=r.type)!=null&&o.toLowerCase().endsWith("material"))&&(r.needsUpdate=!0)},J={$scene:i=>{const e=i.closest("three-lunchbox");return e==null?void 0:e.three.scene},$camera:i=>{const e=i.closest("three-lunchbox");return e==null?void 0:e.three.camera},$renderer:i=>{const e=i.closest("three-lunchbox");return e==null?void 0:e.three.renderer},$domElement:i=>{var t;const e=i.closest("three-lunchbox");return(t=e==null?void 0:e.three.renderer)==null?void 0:t.domElement}},G=(i,e)=>{var s;if(typeof i!="string")return i;if(i==="")return!0;const t=(s=J[i])==null?void 0:s.call(J,e);return CSS.supports("color",i)?new f.Color(i):t??i};/**
27
20
  * @license
28
21
  * Copyright 2017 Google LLC
29
22
  * SPDX-License-Identifier: BSD-3-Clause
30
- */const Je={attribute:!0,type:String,converter:iu,reflect:!1,hasChanged:vu},Ze=(t=Je,u,e)=>{const{kind:r,metadata:s}=e;let i=globalThis.litPropertyMetadata.get(s);if(i===void 0&&globalThis.litPropertyMetadata.set(s,i=new Map),r==="setter"&&((t=Object.create(t)).wrapped=!0),i.set(e.name,t),r==="accessor"){const{name:n}=e;return{set(o){const a=u.get.call(this);u.set.call(this,o),this.requestUpdate(n,a,t,!0,o)},init(o){return o!==void 0&&this.C(n,void 0,t,o),o}}}if(r==="setter"){const{name:n}=e;return function(o){const a=this[n];u.call(this,o),this.requestUpdate(n,a,t,!0,o)}}throw Error("Unsupported decorator location: "+r)};function _(t){return(u,e)=>typeof e=="object"?Ze(t,u,e):((r,s,i)=>{const n=s.hasOwnProperty(i);return s.constructor.createProperty(i,r),n?Object.getOwnPropertyDescriptor(s,i):void 0})(t,u,e)}/**
23
+ */const ht={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:ee},ct=(i=ht,e,t)=>{const{kind:s,metadata:r}=t;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),n.set(t.name,i),s==="accessor"){const{name:o}=t;return{set(a){const h=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,h,i,!0,a)},init(a){return a!==void 0&&this.C(o,void 0,i,a),a}}}if(s==="setter"){const{name:o}=t;return function(a){const h=this[o];e.call(this,a),this.requestUpdate(o,h,i,!0,a)}}throw Error("Unsupported decorator location: "+s)};function y(i){return(e,t)=>typeof t=="object"?ct(i,e,t):((s,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,s),o?Object.getOwnPropertyDescriptor(r,n):void 0})(i,e,t)}/**
31
24
  * @license
32
25
  * Copyright 2017 Google LLC
33
26
  * SPDX-License-Identifier: BSD-3-Clause
34
- */function Ke(t){return _({...t,state:!0,attribute:!1})}var Xe=Object.defineProperty,se=(t,u,e,r)=>{for(var s=void 0,i=t.length-1,n;i>=0;i--)(n=t[i])&&(s=n(u,e,s)||s);return s&&Xe(u,e,s),s};const gu="raycast",Gu=[gu,"args","data"],qu=t=>t.split("-");class Q extends k{constructor(u){super(),this.classSource=u,this.instance=null,this.dispose=[],this.mutationObserver=null,this.tryAddOnce=!1,this.connected=!1}observeAttributes(){this.mutationObserver=new MutationObserver(u=>{u.forEach(e=>{if(!e.attributeName)return;const r=this.attributes.getNamedItem(e.attributeName);r&&this.updateProperty(r)})}),this.mutationObserver.observe(this,{attributes:!0})}parsedArgs(){const u=this.args??this.getAttribute("args")??[];return typeof u=="string"?re(u):u}createUnderlyingThreeObject(){this.instance=new this.classSource(...this.parsedArgs().map(u=>Du(u,this)))}refreshAttributes(){this.getAttributeNames().forEach(u=>{const e=this.attributes.getNamedItem(u);e&&this.updateProperty(e)}),Array.from(this.attributes).forEach(this.updateProperty.bind(this))}async onUnderlyingThreeObjectReady(){var r,s,i,n;const u=this.instance;u.uuid&&this.setAttribute(ue,u.uuid);let e=Vu(this);for(;this!=null&&this.connected&&!this.tryAddOnce&&!e;)await new Promise(requestAnimationFrame),e=Vu(this);if(e&&e.instance||(r=e==null?void 0:e.three)!=null&&r.scene){const o=this.instance,a=this.instance,E=e.instance,d=e.instance??((s=e.three)==null?void 0:s.scene),C=this.instance;if((i=o.type)!=null&&i.toLowerCase().includes("geometry")&&E.geometry)E.geometry=o;else if((n=a.type)!=null&&n.toLowerCase().includes("material")&&E.material)E.material=a;else if(d.add)try{d.add(C),this.dispatchEvent(new CustomEvent("instanceadded",{detail:{instance:this.instance,parent:d}}))}catch{throw new Error(`Error adding ${this.tagName} to ${d}`)}const y=this.getAttribute("attach");y&&this.executeAttach(y,this.instance)}}connectedCallback(){super.connectedCallback(),this.observeAttributes.call(this),this.createUnderlyingThreeObject.call(this),this.refreshAttributes.call(this),this.dispatchEvent(new CustomEvent("instancecreated",{detail:{instance:this.instance}})),this.connected=!0,this.onUnderlyingThreeObjectReady.call(this)}updateProperty(u){const{name:e,value:r}=u;let s=e;Object.keys(this.instance??{}).forEach(o=>{o.toLowerCase()===s&&(s=o)});const i=qu(s);if(Gu.includes(s)||Gu.includes(i[0]))return;let n=Du(r,this);try{n=JSON.parse(r===""?"true":r)}catch{}this.instance&&fu(this.instance,i,n)}executeAttach(u,e){const r=this.parentElement;r.instance&&fu(r.instance,qu(u),e)}disconnectedCallback(){super.disconnectedCallback();const u=[this.instance];this.disposeThreeObjects.call(this,u),this.connected=!1}disposeThreeObjects(u){u.forEach(e=>{var i,n;if(!e)return;const r=e,s=e;(i=r.dispose)==null||i.call(r),(n=s.removeFromParent)==null||n.call(s)})}render(){return Su`<slot></slot>`}createRenderRoot(){return this}}se([_({type:Boolean,attribute:"try-add-once"})],Q.prototype,"tryAddOnce");se([Ke()],Q.prototype,"connected");const ie=t=>{const u=typeof t=="string"?b[t]:t;if(!Re(u))return null;const e=t.toString().toLowerCase().endsWith("loader");class r extends Q{constructor(){super(u)}}class s extends Q{constructor(){super(...arguments),this.loader=null}createUnderlyingThreeObject(){this.loader=new u(...this.parsedArgs().map(n=>Du(n,this)))}async onUnderlyingThreeObjectReady(){const n=this.getAttribute("src");if(!n)throw new Error("Loader requires a source.");if(!this.loader)throw new Error(`Missing loader ${this.tagName}`);this.loader.load(n,o=>{this.instance=o;const a=this.getAttribute("attach");a&&this.executeAttach(a,o),this.refreshAttributes.call(this),this.dispatchEvent(new CustomEvent("loaded",{detail:{instance:o}}))},void 0,o=>{throw new Error(`error loading: ${n}`+o)})}disconnectedCallback(){super.disconnectedCallback(),this.disposeThreeObjects.call(this,[this.loader])}}return e?s:r};var Ye=Object.defineProperty,O=(t,u,e,r)=>{for(var s=void 0,i=t.length-1,n;i>=0;i--)(n=t[i])&&(s=n(u,e,s)||s);return s&&Ye(u,e,s),s};const Qe="orthographic",Wu=1/0,xu=class xu extends k{constructor(){super(),this.scratchV2=new b.Vector2,this.three={scene:new b.Scene,camera:null,renderer:null},this.background=null,this.dpr=Wu,this.headless=!1,this.manualRender=!1,this.dispatchBeforeRender=!1,this.dispatchAfterRender=!1,this.rendererArgs=[],this.cameraArgs=[],this.raycaster=new b.Raycaster,this.raycastPool=[],this.frame=1/0,this.resizeObserver=new ResizeObserver(u=>{u.forEach(({target:e,contentRect:r})=>{var s;if(e===this&&((s=this.three.renderer)==null||s.setSize(r.width*this.dpr,r.height*this.dpr),this.three.camera)){const i=r.width/r.height;if(this.three.camera.type.toLowerCase()==="perspectivecamera")this.three.camera.aspect=i,this.three.camera.updateProjectionMatrix();else if(this.three.camera.type.toLowerCase()==="orthographiccamera"){const n=r.height/r.width,o=10;this.three.camera.top=n*o,this.three.camera.bottom=-n*o,this.three.camera.right=o,this.three.camera.left=-o,this.three.camera.updateProjectionMatrix()}this.manualRender||this.renderThree()}})})}connectedCallback(){if(super.connectedCallback(),this.dpr===Wu&&(this.dpr=window.devicePixelRatio),this.getAttribute(Qe)!==null?this.three.camera=new b.OrthographicCamera(...this.cameraArgs):this.three.camera=new b.PerspectiveCamera(...this.cameraArgs.length?this.cameraArgs:[75]),["scene","camera","renderer"].forEach(u=>{const e=this[u]??this.getAttribute(u)??{},r=typeof e=="string"?re(e):e;Object.entries(r).forEach(([s,i])=>{this.three[u]&&fu(this.three[u],s.split("-"),Du(i,this))})}),this.resizeObserver.observe(this),this.background!==null&&(this.three.scene.background=new b.Color(this.background)),!this.headless){const u=new b.WebGLRenderer(...this.rendererArgs);u.domElement.addEventListener("pointermove",this.onPointerMove.bind(this)),u.domElement.addEventListener("mousemove",this.onPointerMove.bind(this)),u.domElement.addEventListener("click",this.onClick.bind(this)),this.three.renderer=u}this.manualRender||this.updateLoop()}disconnectedCallback(){var u,e,r,s;(u=this.three.renderer)==null||u.domElement.removeEventListener("pointermove",this.onPointerMove.bind(this)),(e=this.three.renderer)==null||e.domElement.removeEventListener("mousemove",this.onPointerMove.bind(this)),(r=this.three.renderer)==null||r.domElement.removeEventListener("click",this.onClick.bind(this)),(s=this.three.renderer)==null||s.dispose(),this.resizeObserver.unobserve(this),cancelAnimationFrame(this.frame)}handleDefaultSlotChange(u){u.target.assignedElements().forEach(e=>{const r=e;r.instance instanceof b.Object3D&&e.getAttributeNames().includes(gu)&&e.getAttributeNames().includes(gu)&&this.raycastPool.push(r.instance)}),this.renderThree()}runRaycast(u){var o,a;if(!this.raycastPool.length||!this.three.camera)return[];const e=((o=this.three.renderer)==null?void 0:o.domElement.width)??0,r=((a=this.three.renderer)==null?void 0:a.domElement.height)??0,s=this.scratchV2.clone().set(u.clientX/(e/this.dpr)*2-1,-(u.clientY/(r/this.dpr))*2+1);return this.raycaster.setFromCamera(s,this.three.camera),this.raycaster.intersectObjects(this.raycastPool).map(E=>({intersect:E,element:this.querySelector(`[${ue}="${E.object.uuid}"]`)}))}onPointerMove(u){this.runRaycast.bind(this)(u).forEach(r=>{var s,i,n,o;u.type==="pointermove"?((s=r.element)==null||s.dispatchEvent(new PointerEvent("pointermove")),(i=r.element)==null||i.dispatchEvent(new CustomEvent(De,{detail:r}))):u.type==="mousemove"&&((n=r.element)==null||n.dispatchEvent(new MouseEvent("mousemove")),(o=r.element)==null||o.dispatchEvent(new CustomEvent(oe,{detail:r})))})}onClick(u){let e=[];if(u instanceof TouchEvent){const r=u.touches[0];e=this.runRaycast.bind(this)(r),e.forEach(s=>{var i;(i=s.element)==null||i.dispatchEvent(new TouchEvent("touchstart"))})}else e=this.runRaycast.bind(this)(u),e.forEach(r=>{var s;(s=r.element)==null||s.dispatchEvent(new MouseEvent("click"))});e.forEach(r=>{var s;(s=r.element)==null||s.dispatchEvent(new CustomEvent(ae,{detail:r}))})}updateLoop(){this.renderThree(),this.manualRender||(this.frame=requestAnimationFrame(this.updateLoop.bind(this)))}renderThree(u,e){var r;this.dispatchBeforeRender&&this.dispatchEvent(new CustomEvent(ce,{})),this.three.camera&&((r=this.three.renderer)==null||r.render(u??this.three.scene,e??this.three.camera),this.dispatchAfterRender&&this.dispatchEvent(new CustomEvent(he,{})))}render(){var u;return Su`
27
+ */function lt(i){return y({...i,state:!0,attribute:!1})}var dt=Object.defineProperty,Se=(i,e,t,s)=>{for(var r=void 0,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=o(e,t,r)||r);return r&&dt(e,t,r),r};const Z="raycast",ye=[Z,"args","data"],Ee=i=>i.split("-");class U extends C{constructor(e){super(),this.classSource=e,this.instance=null,this.dispose=[],this.mutationObserver=null,this.tryAddOnce=!1,this.connected=!1}observeAttributes(){this.mutationObserver=new MutationObserver(e=>{e.forEach(t=>{if(!t.attributeName)return;const s=this.attributes.getNamedItem(t.attributeName);s&&this.updateProperty(s)})}),this.mutationObserver.observe(this,{attributes:!0})}parsedArgs(){const e=this.args??this.getAttribute("args")??[];return typeof e=="string"?JSON.parse(e):e}createUnderlyingThreeObject(){this.instance=new this.classSource(...this.parsedArgs().map(e=>G(e,this)))}refreshAttributes(){this.getAttributeNames().forEach(e=>{const t=this.attributes.getNamedItem(e);t&&this.updateProperty(t)}),Array.from(this.attributes).forEach(this.updateProperty.bind(this))}async onUnderlyingThreeObjectReady(){var s,r,n,o;const e=this.instance;e.uuid&&this.setAttribute(we,e.uuid);let t=fe(this);for(;this!=null&&this.connected&&!this.tryAddOnce&&!t;)await new Promise(requestAnimationFrame),t=fe(this);if(t&&t.instance||(s=t==null?void 0:t.three)!=null&&s.scene){const a=this.instance,h=this.instance,c=t.instance,d=t.instance??((r=t.three)==null?void 0:r.scene),l=this.instance;if((n=a.type)!=null&&n.toLowerCase().includes("geometry")&&c.geometry)c.geometry=a;else if((o=h.type)!=null&&o.toLowerCase().includes("material")&&c.material)c.material=h;else if(d.add)try{d.add(l),this.dispatchEvent(new CustomEvent("instanceadded",{detail:{instance:this.instance,parent:d}}))}catch{throw new Error(`Error adding ${this.tagName} to ${d}`)}const p=this.getAttribute("attach");p&&this.executeAttach(p,this.instance)}}connectedCallback(){super.connectedCallback(),this.observeAttributes.call(this),this.createUnderlyingThreeObject.call(this),this.refreshAttributes.call(this),this.dispatchEvent(new CustomEvent("instancecreated",{detail:{instance:this.instance}})),this.connected=!0,this.onUnderlyingThreeObjectReady.call(this)}updateProperty(e){const{name:t,value:s}=e;let r=t;Object.keys(this.instance??{}).forEach(a=>{a.toLowerCase()===r&&(r=a)});const n=Ee(r);if(ye.includes(r)||ye.includes(n[0]))return;let o=G(s,this);try{o=JSON.parse(s===""?"true":s)}catch{}this.instance&&K(this.instance,n,o)}executeAttach(e,t){const s=this.parentElement;s.instance&&K(s.instance,Ee(e),t)}disconnectedCallback(){super.disconnectedCallback();const e=[this.instance];this.disposeThreeObjects.call(this,e),this.connected=!1}disposeThreeObjects(e){e.forEach(t=>{var n,o;if(!t)return;const s=t,r=t;(n=s.dispose)==null||n.call(s),(o=r.removeFromParent)==null||o.call(r)})}render(){return se`<slot></slot>`}createRenderRoot(){return this}}Se([y({type:Boolean,attribute:"try-add-once"})],U.prototype,"tryAddOnce");Se([lt()],U.prototype,"connected");const Te=i=>{const e=typeof i=="string"?f[i]:i;if(!it(e))return null;const t=i.toString().toLowerCase().endsWith("loader");class s extends U{constructor(){super(e)}}class r extends U{constructor(){super(...arguments),this.loader=null}createUnderlyingThreeObject(){this.loader=new e(...this.parsedArgs().map(o=>G(o,this)))}async onUnderlyingThreeObjectReady(){const o=this.getAttribute("src");if(!o)throw new Error("Loader requires a source.");if(!this.loader)throw new Error(`Missing loader ${this.tagName}`);this.loader.load(o,a=>{this.instance=a;const h=this.getAttribute("attach");h&&this.executeAttach(h,a),this.refreshAttributes.call(this),this.dispatchEvent(new CustomEvent("loaded",{detail:{instance:a}}))},void 0,a=>{throw new Error(`error loading: ${o}`+a)})}disconnectedCallback(){super.disconnectedCallback(),this.disposeThreeObjects.call(this,[this.loader])}}return t?r:s};var ut=Object.defineProperty,A=(i,e,t,s)=>{for(var r=void 0,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=o(e,t,r)||r);return r&&ut(e,t,r),r};const pt="orthographic",$e=1/0,re=class re extends C{constructor(){super(),this.scratchV2=new f.Vector2,this.three={scene:new f.Scene,camera:null,renderer:null},this.background=null,this.dpr=$e,this.headless=!1,this.manualRender=!1,this.dispatchBeforeRender=!1,this.dispatchAfterRender=!1,this.rendererArgs=[],this.cameraArgs=[],this.raycaster=new f.Raycaster,this.raycastPool=[],this.frame=1/0,this.resizeObserver=new ResizeObserver(e=>{e.forEach(({target:t,contentRect:s})=>{var r;if(t===this&&((r=this.three.renderer)==null||r.setSize(s.width*this.dpr,s.height*this.dpr),this.three.camera)){const n=s.width/s.height;if(this.three.camera.type.toLowerCase()==="perspectivecamera")this.three.camera.aspect=n,this.three.camera.updateProjectionMatrix();else if(this.three.camera.type.toLowerCase()==="orthographiccamera"){const o=s.height/s.width,a=10;this.three.camera.top=o*a,this.three.camera.bottom=-o*a,this.three.camera.right=a,this.three.camera.left=-a,this.three.camera.updateProjectionMatrix()}this.manualRender||this.renderThree()}})})}connectedCallback(){if(super.connectedCallback(),this.dpr===$e&&(this.dpr=window.devicePixelRatio),this.getAttribute(pt)!==null?this.three.camera=new f.OrthographicCamera(...this.cameraArgs):this.three.camera=new f.PerspectiveCamera(...this.cameraArgs.length?this.cameraArgs:[75]),["scene","camera","renderer"].forEach(e=>{const t=this[e]??this.getAttribute(e)??{},s=typeof t=="string"?JSON.parse(t):t;Object.entries(s).forEach(([r,n])=>{this.three[e]&&K(this.three[e],r.split("-"),G(n,this))})}),this.resizeObserver.observe(this),this.background!==null&&(this.three.scene.background=new f.Color(this.background)),!this.headless){const e=new f.WebGLRenderer(...this.rendererArgs);e.domElement.addEventListener("pointermove",this.onPointerMove.bind(this)),e.domElement.addEventListener("mousemove",this.onPointerMove.bind(this)),e.domElement.addEventListener("click",this.onClick.bind(this)),this.three.renderer=e}this.manualRender||this.updateLoop()}disconnectedCallback(){var e,t,s,r;(e=this.three.renderer)==null||e.domElement.removeEventListener("pointermove",this.onPointerMove.bind(this)),(t=this.three.renderer)==null||t.domElement.removeEventListener("mousemove",this.onPointerMove.bind(this)),(s=this.three.renderer)==null||s.domElement.removeEventListener("click",this.onClick.bind(this)),(r=this.three.renderer)==null||r.dispose(),this.resizeObserver.unobserve(this),cancelAnimationFrame(this.frame)}handleDefaultSlotChange(e){e.target.assignedElements().forEach(t=>{const s=t;s.instance instanceof f.Object3D&&t.getAttributeNames().includes(Z)&&t.getAttributeNames().includes(Z)&&this.raycastPool.push(s.instance)}),this.renderThree()}runRaycast(e){var a,h;if(!this.raycastPool.length||!this.three.camera)return[];const t=((a=this.three.renderer)==null?void 0:a.domElement.width)??0,s=((h=this.three.renderer)==null?void 0:h.domElement.height)??0,r=this.scratchV2.clone().set(e.clientX/(t/this.dpr)*2-1,-(e.clientY/(s/this.dpr))*2+1);return this.raycaster.setFromCamera(r,this.three.camera),this.raycaster.intersectObjects(this.raycastPool).map(c=>({intersect:c,element:this.querySelector(`[${we}="${c.object.uuid}"]`)}))}onPointerMove(e){this.runRaycast.bind(this)(e).forEach(s=>{var r,n,o,a;e.type==="pointermove"?((r=s.element)==null||r.dispatchEvent(new PointerEvent("pointermove")),(n=s.element)==null||n.dispatchEvent(new CustomEvent(Oe,{detail:s}))):e.type==="mousemove"&&((o=s.element)==null||o.dispatchEvent(new MouseEvent("mousemove")),(a=s.element)==null||a.dispatchEvent(new CustomEvent(Me,{detail:s})))})}onClick(e){let t=[];if(e instanceof TouchEvent){const s=e.touches[0];t=this.runRaycast.bind(this)(s),t.forEach(r=>{var n;(n=r.element)==null||n.dispatchEvent(new TouchEvent("touchstart"))})}else t=this.runRaycast.bind(this)(e),t.forEach(s=>{var r;(r=s.element)==null||r.dispatchEvent(new MouseEvent("click"))});t.forEach(s=>{var r;(r=s.element)==null||r.dispatchEvent(new CustomEvent(Re,{detail:s}))})}updateLoop(){this.renderThree(),this.manualRender||(this.frame=requestAnimationFrame(this.updateLoop.bind(this)))}renderThree(e,t){var s;this.dispatchBeforeRender&&this.dispatchEvent(new CustomEvent(Ne,{})),this.three.camera&&((s=this.three.renderer)==null||s.render(e??this.three.scene,t??this.three.camera),this.dispatchAfterRender&&this.dispatchEvent(new CustomEvent(xe,{})))}render(){var e;return se`
35
28
  <slot @slotchange=${this.handleDefaultSlotChange}></slot>
36
- ${(u=this.three.renderer)==null?void 0:u.domElement}
37
- `}};xu.styles=Fe`
29
+ ${(e=this.three.renderer)==null?void 0:e.domElement}
30
+ `}};re.styles=De`
38
31
  :host {
39
32
  width: 100%;
40
33
  height: 100%;
@@ -47,4 +40,4 @@
47
40
  max-width: 100%;
48
41
  max-height: 100%;
49
42
  }
50
- `;let g=xu;O([_()],g.prototype,"background");O([_()],g.prototype,"dpr");O([_()],g.prototype,"headless");O([_({attribute:"manual-render",type:Boolean})],g.prototype,"manualRender");O([_({attribute:"dispatch-before-render",type:Boolean})],g.prototype,"dispatchBeforeRender");O([_({attribute:"dispatch-after-render",type:Boolean})],g.prototype,"dispatchAfterRender");O([_({attribute:"renderer-args",type:Object})],g.prototype,"rendererArgs");O([_({attribute:"camera-args",type:Object})],g.prototype,"cameraArgs");class ne extends k{constructor(){super(...arguments),this.parentLunchbox=null,this.frame=-1,this.scratchV3=new b.Vector3}tryAttachUpdate(){var n;const u=(n=this.parentLunchbox)==null?void 0:n.instance;if(!u)return!1;if(!u.isObject3D)throw new Error("html-anchor must be the child of an Object3D");const e=su(this,o=>{var a;return!!((a=o==null?void 0:o.three)!=null&&a.renderer)});if(!e)return console.error("three-lunchbox parent required for html-anchor"),!1;const r=e.three.camera;if(!r)return console.error("camera required for html-anchor"),!1;const s=e.three.renderer;if(!(s!=null&&s.domElement))return console.error("renderer and DOM element required for html-anchor"),!1;const i=()=>{this.frame=requestAnimationFrame(i),u.getWorldPosition(this.scratchV3),this.scratchV3.project(r),this.scratchV3.multiplyScalar(.5).addScalar(.5),this.scratchV3.y=1-this.scratchV3.y;const o=this.scratchV3.clone().set(s.domElement.width,s.domElement.height,1);o.divideScalar(devicePixelRatio),this.scratchV3.multiply(o),Array.from(this.children).forEach(a=>{a.style.setProperty("--left",`${this.scratchV3.x}px`),a.style.setProperty("--top",`${this.scratchV3.y}px`)})};return i(),!0}connectedCallback(){super.connectedCallback();const u=this.parentNode;if(!u)throw new Error("html-anchor requires a 3D parent");this.parentLunchbox=u,this.tryAttachUpdate()||this.parentLunchbox.addEventListener("instanceadded",()=>{if(!this.tryAttachUpdate())throw new Error("error attaching html-anchor to Object3D")},{once:!0})}disconnectedCallback(){this.frame!==-1&&cancelAnimationFrame(this.frame)}render(){return Su`<slot></slot>`}createRenderRoot(){return this}}const ut=({prependList:t=[]}={})=>{Object.entries({"three-lunchbox":g,"html-anchor":ne}).forEach(([e,r])=>{customElements.get(e)||customElements.define(e,r)}),[...t,...bu].forEach(e=>{const r=Ae(e);if(customElements.get(r))return;const s=ie(e);s&&customElements.define(r,s)})},et=(t,u,e=window)=>{if(e.customElements.get(t)){console.log(`${t} already registered as a custom element. Try a different name if registering is still required.`);return}const r=ie(u);if(r)e.customElements.define(t,r);else throw new Error(`Could not extend ${t}. The second paramater must be a class.`)},De="threepointermove",oe="threemousemove",ae="threeclick",ce="beforerender",he="afterrender",Ae=t=>{let u=t.split(/\.?(?=[A-Z])/).join("-").toLowerCase().replace(/-g-l-/,"-gl-");return u.includes("-")||(u=`three-${u}`),u},tt=bu.map(Ae);exports.AFTER_RENDER_EVENT_NAME=he;exports.BEFORE_RENDER_EVENT_NAME=ce;exports.HtmlAnchor=ne;exports.THREE_CLICK_EVENT_NAME=ae;exports.THREE_MOUSE_MOVE_EVENT_NAME=oe;exports.THREE_POINTER_MOVE_EVENT_NAME=De;exports.ThreeBase=Q;exports.ThreeLunchbox=g;exports.autoComponents=bu;exports.extend=et;exports.initLunchbox=ut;exports.webComponentNames=tt;
43
+ `;let m=re;A([y()],m.prototype,"background");A([y()],m.prototype,"dpr");A([y()],m.prototype,"headless");A([y({attribute:"manual-render",type:Boolean})],m.prototype,"manualRender");A([y({attribute:"dispatch-before-render",type:Boolean})],m.prototype,"dispatchBeforeRender");A([y({attribute:"dispatch-after-render",type:Boolean})],m.prototype,"dispatchAfterRender");A([y({attribute:"renderer-args",type:Object})],m.prototype,"rendererArgs");A([y({attribute:"camera-args",type:Object})],m.prototype,"cameraArgs");class Pe extends C{constructor(){super(...arguments),this.parentLunchbox=null,this.frame=-1,this.scratchV3=new f.Vector3}tryAttachUpdate(){var o;const e=(o=this.parentLunchbox)==null?void 0:o.instance;if(!e)return!1;if(!e.isObject3D)throw new Error("html-anchor must be the child of an Object3D");const t=k(this,a=>{var h;return!!((h=a==null?void 0:a.three)!=null&&h.renderer)});if(!t)return console.error("three-lunchbox parent required for html-anchor"),!1;const s=t.three.camera;if(!s)return console.error("camera required for html-anchor"),!1;const r=t.three.renderer;if(!(r!=null&&r.domElement))return console.error("renderer and DOM element required for html-anchor"),!1;const n=()=>{this.frame=requestAnimationFrame(n),e.getWorldPosition(this.scratchV3),this.scratchV3.project(s),this.scratchV3.multiplyScalar(.5).addScalar(.5),this.scratchV3.y=1-this.scratchV3.y;const a=this.scratchV3.clone().set(r.domElement.width,r.domElement.height,1);a.divideScalar(devicePixelRatio),this.scratchV3.multiply(a),Array.from(this.children).forEach(h=>{h.style.setProperty("--left",`${this.scratchV3.x}px`),h.style.setProperty("--top",`${this.scratchV3.y}px`)})};return n(),!0}connectedCallback(){super.connectedCallback();const e=this.parentNode;if(!e)throw new Error("html-anchor requires a 3D parent");this.parentLunchbox=e,this.tryAttachUpdate()||this.parentLunchbox.addEventListener("instanceadded",()=>{if(!this.tryAttachUpdate())throw new Error("error attaching html-anchor to Object3D")},{once:!0})}disconnectedCallback(){this.frame!==-1&&cancelAnimationFrame(this.frame)}render(){return se`<slot></slot>`}createRenderRoot(){return this}}const mt=({prependList:i=[]}={})=>{Object.entries({"three-lunchbox":m,"html-anchor":Pe}).forEach(([t,s])=>{customElements.get(t)||customElements.define(t,s)}),[...i,...Y].forEach(t=>{const s=Le(t);if(customElements.get(s))return;const r=Te(t);r&&customElements.define(s,r)})},ft=(i,e,t=window)=>{if(t.customElements.get(i)){console.log(`${i} already registered as a custom element. Try a different name if registering is still required.`);return}const s=Te(e);if(s)t.customElements.define(i,s);else throw new Error(`Could not extend ${i}. The second paramater must be a class.`)},Oe="threepointermove",Me="threemousemove",Re="threeclick",Ne="beforerender",xe="afterrender",Le=i=>{let e=i.split(/\.?(?=[A-Z])/).join("-").toLowerCase().replace(/-g-l-/,"-gl-");return e.includes("-")||(e=`three-${e}`),e},yt=Y.map(Le);exports.AFTER_RENDER_EVENT_NAME=xe;exports.BEFORE_RENDER_EVENT_NAME=Ne;exports.HtmlAnchor=Pe;exports.THREE_CLICK_EVENT_NAME=Re;exports.THREE_MOUSE_MOVE_EVENT_NAME=Me;exports.THREE_POINTER_MOVE_EVENT_NAME=Oe;exports.ThreeBase=U;exports.ThreeLunchbox=m;exports.autoComponents=Y;exports.extend=ft;exports.initLunchbox=mt;exports.webComponentNames=yt;