@epigraph/solutions 1.0.14-alpha → 1.0.14-alpha.1

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.
@@ -4187,7 +4187,7 @@ ${l.join(`
4187
4187
  `+l.fragmentShader.slice(u-1,-1)+`
4188
4188
  vec3 texelOld = texture2D(previousShadowMap, vUv).rgb;
4189
4189
  gl_FragColor.rgb = mix(texelOld, gl_FragColor.rgb, 1.0/ averagingWindow);
4190
- }`,l.uniforms.previousShadowMap=this.previousShadowMap,l.uniforms.averagingWindow=this.averagingWindow}}clear(){this.renderer.getClearColor(this.clearColor),this.clearAlpha=this.renderer.getClearAlpha(),this.renderer.setClearColor("black",1),this.renderer.setRenderTarget(this.progressiveLightMap1),this.renderer.clear(),this.renderer.setRenderTarget(this.progressiveLightMap2),this.renderer.clear(),this.renderer.setRenderTarget(null),this.renderer.setClearColor(this.clearColor,this.clearAlpha),this.lights=[],this.meshes=[],this.scene.traverse(e=>{X$(e)?this.meshes.push({object:e,material:e.material}):Y$(e)&&this.lights.push({object:e,intensity:e.intensity})})}prepare(){this.lights.forEach(e=>e.object.intensity=0),this.meshes.forEach(e=>e.object.material=this.discardMat)}finish(){this.lights.forEach(e=>e.object.intensity=e.intensity),this.meshes.forEach(e=>e.object.material=e.material)}configure(e){this.object=e}update(e,t=100){if(!this.object)return;this.averagingWindow.value=t,this.object.material=this.targetMat;const i=this.buffer1Active?this.progressiveLightMap1:this.progressiveLightMap2,s=this.buffer1Active?this.progressiveLightMap2:this.progressiveLightMap1,l=this.scene.background;this.scene.background=null,this.renderer.setRenderTarget(i),this.previousShadowMap.value=s.texture,this.buffer1Active=!this.buffer1Active,this.renderer.render(this.scene,e),this.renderer.setRenderTarget(null),this.scene.background=l}}class Z${constructor({scene:e,targetRenderer:t,settings:i,appWcRef:s}){this.enabled=!0,this.__settings={},this.__shadowParams={temporal:!1,limit:1/0},this.__lightParams={amount:8,intensity:parseInt(Ec.replace(/\D+/g,""))>=155?Math.PI:1,bias:.001,mapSize:1024,size:8,near:.5,far:200},this.api={count:0},this.__gLights=new fi,this.__scene=e,this.__targetRenderer=t,this.__settings=i,this.__appWcRef=s,this.setup()}get camera(){return this.__camera}set camera(e){this.__camera=e}enable(){window.epigraph.logger.info({title:"Enabling Accumulative Shadows!"}),this.enabled=!0,this.__groundPlane.visible=!0}disable(){window.epigraph.logger.info({title:"Disabling Accumulative Shadows!"}),this.enabled=!1,this.__groundPlane.visible=!1}reset(){this.__progressiveLightMap.clear(),this.__shadowMaterial.opacity=0,this.__shadowMaterial.alphaTest=0,this.api.count=0,!this.__shadowParams.temporal&&this.__settings.shadowParams.frames!==1/0&&this.reCalculate(this.__settings.shadowParams.frames)}__setupEventListeners(){this.__appWcRef.addEventListener(this.__appWcRef.eventsManager.structureChangedEvent.name,this.reset.bind(this)),this.__appWcRef.addEventListener(this.__appWcRef.eventsManager.productSettingUpdatedEvent.name,()=>{const e=this.__appWcRef.productSettings.shadows.accumulativeShadows;this.__settings=e,this.reset()})}get groundPlane(){return this.__groundPlane}setup(){this.__progressiveLightMap=new J$(this.__targetRenderer,this.__scene,1024),this.__shadowMaterial=new K$({map:this.__progressiveLightMap.progressiveLightMap2.texture,transparent:!0,depthWrite:!1,toneMapped:!0,blend:this.__settings.shadowMaterial.blend,alphaTest:0,color:new je(this.__settings.shadowMaterial.color)}),this.__groundPlane=new lt(new Ps(1,1).rotateX(-Math.PI/2),this.__shadowMaterial),this.__groundPlane.name="ACCUMULATIVE_SHADOW_GROUND_PLANE",this.__groundPlane.scale.setScalar(this.__settings.shadowParams.scale),this.__groundPlane.receiveShadow=!0,this.__scene.add(this.__groundPlane),this.__progressiveLightMap.configure(this.__groundPlane);for(let e=0;e<this.__lightParams.amount;e++){const t=new Z0(16777215,this.__lightParams.intensity/this.__lightParams.amount);t.name="dir_light_"+e,t.castShadow=!0,t.shadow.bias=this.__lightParams.bias,t.shadow.camera.near=this.__lightParams.near,t.shadow.camera.far=this.__lightParams.far,t.shadow.camera.right=this.__lightParams.size/2,t.shadow.camera.left=-this.__lightParams.size/2,t.shadow.camera.top=this.__lightParams.size/2,t.shadow.camera.bottom=-this.__lightParams.size/2,t.shadow.mapSize.width=this.__lightParams.mapSize,t.shadow.mapSize.height=this.__lightParams.mapSize,this.__gLights.add(t)}this.__setupEventListeners()}temporalUpdate(){this.enabled!==!1&&(this.__shadowParams.temporal||this.__settings.shadowParams.frames===1/0)&&this.api.count<this.__settings.shadowParams.frames&&this.api.count<this.__shadowParams.limit&&(this.reCalculate(),this.api.count++)}__randomiseLightPositions(){const e=Object.keys(this.__settings.light.direction).length;for(let t=0;t<this.__gLights.children.length;t++){const i=this.__gLights.children[t];if(Math.random()>this.__settings.shadowParams.ambient)i.position.set(this.__settings.light.direction.x+Hs.randFloatSpread(this.__settings.shadowParams.radius),this.__settings.light.direction.y+Hs.randFloatSpread(this.__settings.shadowParams.radius),this.__settings.light.direction.z+Hs.randFloatSpread(this.__settings.shadowParams.radius));else{const s=Math.acos(2*Math.random()-1)-Math.PI/2,l=2*Math.PI*Math.random();i.position.set(Math.cos(s)*Math.cos(l)*e,Math.abs(Math.cos(s)*Math.sin(l)*e),Math.sin(s)*e)}}}reCalculate(e=1){if(this.__camera){this.__settings.shadowMaterial.blend=Math.max(2,this.__settings.shadowParams.frames===1/0?this.__settings.shadowMaterial.blend:this.__settings.shadowParams.frames),this.__shadowParams.temporal?(this.__shadowMaterial.opacity=Math.min(this.__settings.shadowMaterial.opacity,this.__shadowMaterial.opacity+this.__settings.shadowMaterial.opacity/this.__settings.shadowMaterial.blend),this.__shadowMaterial.alphaTest=Math.min(this.__settings.shadowMaterial.alphaTest,this.__shadowMaterial.alphaTest+this.__settings.shadowMaterial.alphaTest/this.__settings.shadowMaterial.blend)):(this.__shadowMaterial.opacity=this.__settings.shadowMaterial.opacity,this.__shadowMaterial.alphaTest=this.__settings.shadowMaterial.alphaTest),this.__scene.add(this.__gLights),this.__progressiveLightMap.prepare();for(let t=0;t<e;t++)this.__randomiseLightPositions(),this.__progressiveLightMap.update(this.__camera,this.__settings.shadowMaterial.blend);this.__scene.remove(this.__gLights),this.__progressiveLightMap.finish()}}}class ez{constructor(){this.textureUtils=null}setTextureUtils(e){this.textureUtils=e}parse(e,t,i,s){this.parseAsync(e,s).then(t).catch(i)}async parseAsync(e,t={}){t=Object.assign({ar:{anchoring:{type:"plane"},planeAnchoring:{alignment:"horizontal"}},includeAnchoringProperties:!0,quickLookCompatible:!1,maxTextureSize:1024},t);const i={},s="model.usda";i[s]=null;let l=sI();l+=iz(t);const u={},d={};e.traverseVisible(g=>{if(g.isMesh){const m=g.geometry,_=g.material;if(_.isMeshStandardMaterial){const y="geometries/Geometry_"+m.id+".usda";if(!(y in i)){const v=az(m);i[y]=sz(v)}_.uuid in u||(u[_.uuid]=_),l+=rz(g,m,_)}else console.warn("THREE.USDZExporter: Unsupported material type (USDZ only supports MeshStandardMaterial)",g)}else g.isCamera&&(l+=gz(g))}),l+=nz(),l+=dz(u,d,t.quickLookCompatible),i[s]=pc(l),l=null;for(const g in d){let m=d[g];if(m.isCompressedTexture===!0){if(this.textureUtils===null)throw new Error("THREE.USDZExporter: setTextureUtils() must be called to process compressed textures.");m=await this.textureUtils.decompress(m)}const _=tz(m.image,m.flipY,t.maxTextureSize),y=await new Promise(v=>_.toBlob(v,"image/png",1));i[`textures/Texture_${g}.png`]=new Uint8Array(await y.arrayBuffer())}let f=0;for(const g in i){const m=i[g],_=34+g.length;f+=_;const y=f&63;if(y!==4){const v=64-y,E=new Uint8Array(v);i[g]=[m,{extra:{12345:E}}]}f=m.length}return E1(i,{level:0})}}function tz(o,e,t){if(typeof HTMLImageElement<"u"&&o instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&o instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&o instanceof OffscreenCanvas||typeof ImageBitmap<"u"&&o instanceof ImageBitmap){const i=t/Math.max(o.width,o.height),s=document.createElement("canvas");s.width=o.width*Math.min(1,i),s.height=o.height*Math.min(1,i);const l=s.getContext("2d");return e===!0&&(l.translate(0,s.height),l.scale(1,-1)),l.drawImage(o,0,0,s.width,s.height),s}else throw new Error("THREE.USDZExporter: No valid image data found. Unable to process texture.")}const nn=7;function sI(){return`#usda 1.0
4190
+ }`,l.uniforms.previousShadowMap=this.previousShadowMap,l.uniforms.averagingWindow=this.averagingWindow}}clear(){this.renderer.getClearColor(this.clearColor),this.clearAlpha=this.renderer.getClearAlpha(),this.renderer.setClearColor("black",1),this.renderer.setRenderTarget(this.progressiveLightMap1),this.renderer.clear(),this.renderer.setRenderTarget(this.progressiveLightMap2),this.renderer.clear(),this.renderer.setRenderTarget(null),this.renderer.setClearColor(this.clearColor,this.clearAlpha),this.lights=[],this.meshes=[],this.scene.traverse(e=>{X$(e)?this.meshes.push({object:e,material:e.material}):Y$(e)&&this.lights.push({object:e,intensity:e.intensity})})}prepare(){this.lights.forEach(e=>e.object.intensity=0),this.meshes.forEach(e=>e.object.material=this.discardMat)}finish(){this.lights.forEach(e=>e.object.intensity=e.intensity),this.meshes.forEach(e=>e.object.material=e.material)}configure(e){this.object=e}update(e,t=100){if(!this.object)return;this.averagingWindow.value=t,this.object.material=this.targetMat;const i=this.buffer1Active?this.progressiveLightMap1:this.progressiveLightMap2,s=this.buffer1Active?this.progressiveLightMap2:this.progressiveLightMap1,l=this.scene.background;this.scene.background=null,this.renderer.setRenderTarget(i),this.previousShadowMap.value=s.texture,this.buffer1Active=!this.buffer1Active,this.renderer.render(this.scene,e),this.renderer.setRenderTarget(null),this.scene.background=l}}class Z${constructor({scene:e,targetRenderer:t,settings:i,appWcRef:s}){this.enabled=!0,this.__settings={},this.__shadowParams={temporal:!1,limit:1/0},this.__lightParams={amount:8,intensity:parseInt(Ec.replace(/\D+/g,""))>=155?Math.PI:1,bias:.001,mapSize:1024,size:8,near:.5,far:200},this.api={count:0},this.__gLights=new fi,this.__scene=e,this.__targetRenderer=t,this.__settings=i,this.__appWcRef=s,this.setup()}get camera(){return this.__camera}set camera(e){this.__camera=e}enable(){window.epigraph.logger.info({title:"Enabling Accumulative Shadows!"}),this.enabled=!0,this.__groundPlane.visible=!0}disable(){window.epigraph.logger.info({title:"Disabling Accumulative Shadows!"}),this.enabled=!1,this.__groundPlane.visible=!1}reset(){this.__progressiveLightMap.clear(),this.__shadowMaterial.opacity=0,this.__shadowMaterial.alphaTest=0,this.api.count=0,!this.__shadowParams.temporal&&this.__settings.shadowParams.frames!==1/0&&this.reCalculate(this.__settings.shadowParams.frames)}__setupEventListeners(){this.__appWcRef.addEventListener(this.__appWcRef.eventsManager.structureChangedEvent.name,this.reset.bind(this)),this.__appWcRef.addEventListener(this.__appWcRef.eventsManager.productSettingUpdatedEvent.name,()=>{const e=this.__appWcRef.productSettings.shadows.accumulativeShadows;this.__settings=e,this.reset()})}get groundPlane(){return this.__groundPlane}setup(){this.__progressiveLightMap=new J$(this.__targetRenderer,this.__scene,1024),this.__shadowMaterial=new K$({map:this.__progressiveLightMap.progressiveLightMap2.texture,transparent:!0,depthWrite:!1,toneMapped:!0,blend:this.__settings.shadowMaterial.blend,alphaTest:0,color:new je(this.__settings.shadowMaterial.color)}),this.__groundPlane=new lt(new Ps(1,1).rotateX(-Math.PI/2),this.__shadowMaterial),this.__groundPlane.name="ACCUMULATIVE_SHADOW_GROUND_PLANE",this.__groundPlane.scale.setScalar(this.__settings.shadowParams.scale),this.__groundPlane.receiveShadow=!0,this.__scene.add(this.__groundPlane),this.__progressiveLightMap.configure(this.__groundPlane);for(let e=0;e<this.__lightParams.amount;e++){const t=new Z0(16777215,this.__lightParams.intensity/this.__lightParams.amount);t.name="dir_light_"+e,t.castShadow=!0,t.shadow.bias=this.__lightParams.bias,t.shadow.camera.near=this.__lightParams.near,t.shadow.camera.far=this.__lightParams.far,t.shadow.camera.right=this.__lightParams.size/2,t.shadow.camera.left=-this.__lightParams.size/2,t.shadow.camera.top=this.__lightParams.size/2,t.shadow.camera.bottom=-this.__lightParams.size/2,t.shadow.mapSize.width=this.__lightParams.mapSize,t.shadow.mapSize.height=this.__lightParams.mapSize,this.__gLights.add(t)}this.__setupEventListeners()}temporalUpdate(){this.enabled!==!1&&(this.__shadowParams.temporal||this.__settings.shadowParams.frames===1/0)&&this.api.count<this.__settings.shadowParams.frames&&this.api.count<this.__shadowParams.limit&&(this.reCalculate(),this.api.count++)}__randomiseLightPositions(){const e=Object.keys(this.__settings.light.direction).length;for(let t=0;t<this.__gLights.children.length;t++){const i=this.__gLights.children[t];if(Math.random()>this.__settings.shadowParams.ambient)i.position.set(this.__settings.light.direction.x+Hs.randFloatSpread(this.__settings.shadowParams.radius),this.__settings.light.direction.y+Hs.randFloatSpread(this.__settings.shadowParams.radius),this.__settings.light.direction.z+Hs.randFloatSpread(this.__settings.shadowParams.radius));else{const s=Math.acos(2*Math.random()-1)-Math.PI/2,l=2*Math.PI*Math.random();i.position.set(Math.cos(s)*Math.cos(l)*e,Math.abs(Math.cos(s)*Math.sin(l)*e),Math.sin(s)*e)}}}reCalculate(e=1){if(this.__camera){this.__settings.shadowMaterial.blend=Math.max(2,this.__settings.shadowParams.frames===1/0?this.__settings.shadowMaterial.blend:this.__settings.shadowParams.frames),this.__shadowParams.temporal?(this.__shadowMaterial.opacity=Math.min(this.__settings.shadowMaterial.opacity,this.__shadowMaterial.opacity+this.__settings.shadowMaterial.opacity/this.__settings.shadowMaterial.blend),this.__shadowMaterial.alphaTest=Math.min(this.__settings.shadowMaterial.alphaTest,this.__shadowMaterial.alphaTest+this.__settings.shadowMaterial.alphaTest/this.__settings.shadowMaterial.blend),this.__shadowMaterial.color.set(this.__settings.shadowMaterial.color)):(this.__shadowMaterial.opacity=this.__settings.shadowMaterial.opacity,this.__shadowMaterial.color.set(this.__settings.shadowMaterial.color),this.__shadowMaterial.alphaTest=this.__settings.shadowMaterial.alphaTest),this.__scene.add(this.__gLights),this.__progressiveLightMap.prepare();for(let t=0;t<e;t++)this.__randomiseLightPositions(),this.__progressiveLightMap.update(this.__camera,this.__settings.shadowMaterial.blend);this.__scene.remove(this.__gLights),this.__progressiveLightMap.finish()}}}class ez{constructor(){this.textureUtils=null}setTextureUtils(e){this.textureUtils=e}parse(e,t,i,s){this.parseAsync(e,s).then(t).catch(i)}async parseAsync(e,t={}){t=Object.assign({ar:{anchoring:{type:"plane"},planeAnchoring:{alignment:"horizontal"}},includeAnchoringProperties:!0,quickLookCompatible:!1,maxTextureSize:1024},t);const i={},s="model.usda";i[s]=null;let l=sI();l+=iz(t);const u={},d={};e.traverseVisible(g=>{if(g.isMesh){const m=g.geometry,_=g.material;if(_.isMeshStandardMaterial){const y="geometries/Geometry_"+m.id+".usda";if(!(y in i)){const v=az(m);i[y]=sz(v)}_.uuid in u||(u[_.uuid]=_),l+=rz(g,m,_)}else console.warn("THREE.USDZExporter: Unsupported material type (USDZ only supports MeshStandardMaterial)",g)}else g.isCamera&&(l+=gz(g))}),l+=nz(),l+=dz(u,d,t.quickLookCompatible),i[s]=pc(l),l=null;for(const g in d){let m=d[g];if(m.isCompressedTexture===!0){if(this.textureUtils===null)throw new Error("THREE.USDZExporter: setTextureUtils() must be called to process compressed textures.");m=await this.textureUtils.decompress(m)}const _=tz(m.image,m.flipY,t.maxTextureSize),y=await new Promise(v=>_.toBlob(v,"image/png",1));i[`textures/Texture_${g}.png`]=new Uint8Array(await y.arrayBuffer())}let f=0;for(const g in i){const m=i[g],_=34+g.length;f+=_;const y=f&63;if(y!==4){const v=64-y,E=new Uint8Array(v);i[g]=[m,{extra:{12345:E}}]}f=m.length}return E1(i,{level:0})}}function tz(o,e,t){if(typeof HTMLImageElement<"u"&&o instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&o instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&o instanceof OffscreenCanvas||typeof ImageBitmap<"u"&&o instanceof ImageBitmap){const i=t/Math.max(o.width,o.height),s=document.createElement("canvas");s.width=o.width*Math.min(1,i),s.height=o.height*Math.min(1,i);const l=s.getContext("2d");return e===!0&&(l.translate(0,s.height),l.scale(1,-1)),l.drawImage(o,0,0,s.width,s.height),s}else throw new Error("THREE.USDZExporter: No valid image data found. Unable to process texture.")}const nn=7;function sI(){return`#usda 1.0
4191
4191
  (
4192
4192
  customLayerData = {
4193
4193
  string creator = "Three.js USDZExporter"
@@ -8497,7 +8497,7 @@ void main() {
8497
8497
  `:xe`
8498
8498
  ${super.render()}
8499
8499
  ${this.__renderQrModal()}
8500
- `}};Go([Ut("#modelViewer")],Na.prototype,"modelViewerElem");Go([Ut("#arModal")],Na.prototype,"arModalElem");Go([Ut("#qrModal")],Na.prototype,"qrModalElem");Go([ue({attribute:!1})],Na.prototype,"appWcRef");Go([ue({type:String,attribute:"glb-src"})],Na.prototype,"glbSrc");Go([ue({type:String,attribute:"usdz-src"})],Na.prototype,"usdzSrc");Go([ue({type:Boolean,attribute:"debug"})],Na.prototype,"debug");let UQ=Na;class _t{constructor(e,t,i=""){this.__name="app:generic:event",this.__eventsManager=e,this.__name=t,this.__detail=i}get name(){return this.__name}get detail(){return this.__detail}fire(e){const t=new CustomEvent(this.__name,{detail:e??this.__detail});this.__eventsManager.eventHubRef.dispatchEvent(t)}}class FQ extends EventTarget{constructor(e){super(),this._loggerContext="EVENTS MANAGER",window.epigraph.logger.info({title:"Initializing...",contextOverride:this._loggerContext}),e?this.eventHubRef=e:this.eventHubRef=this,this.assetLoadProgress=new _t(this,"assetLoadProgress",""),this.experienceUpdatedEvent=new _t(this,"experienceUpdated",""),this.productSettingUpdatedEvent=new _t(this,"productSettingUpdatedEvent",""),this.productSettingsShadowTypeUpdatedEvent=new _t(this,"productSettingsShadowTypeUpdatedEvent",""),this.productSettingsSavedEvent=new _t(this,"productsettingssavedevent",""),this.appReadyEvent=new _t(this,"appReady",""),this.appFailedEvent=new _t(this,"appFailed",""),this.productClassChangedEvent=new _t(this,"productClassChanged",""),this.productChangedEvent=new _t(this,"productChanged",""),this.variantChangedEvent=new _t(this,"variantChanged",""),this.structureNodeAddedEvent=new _t(this,"structureNodeAdded",""),this.structureNodeRemovedEvent=new _t(this,"structureNodeRemoved",""),this.structureChangedEvent=new _t(this,"structureChanged",""),this.showNodeLoadingIcon=new _t(this,"nodeLoadingShow",""),this.hideNodeLoadingIcon=new _t(this,"nodeLoadingHide",""),this.cameraFitEvent=new _t(this,"cameraFit",""),this.hotspotsUpdatedEvent=new _t(this,"hotspotsUpdated",""),this.hotspotsVisibilityChanged=new _t(this,"hotspotsVisibilityChanged",""),this.hotspotClickedEvent=new _t(this,"hotspotClicked",""),this.hotspotOpenEvent=new _t(this,"hotspotOpen",""),this.hotspotClosedEvent=new _t(this,"hotspotClosed",""),this.hotspotNextEvent=new _t(this,"hotspotNext",""),this.hotspotPreviousEvent=new _t(this,"hotspotPrevious",""),this.sceneBoundsChanged=new _t(this,"sceneBoundsChanged",""),this.dimensionsPositionChanged=new _t(this,"dimensionsPositionChanged",""),this.dimensionsValueChanged=new _t(this,"dimensionsValueChanged",""),this.dimensionsVisibilityChanged=new _t(this,"dimensionsVisibilityChanged",""),this.arModelReadyEvent=new _t(this,"arGlbReady",""),this.cartChangedEvent=new _t(this,"cartChanged",""),this.sceneRestartedEvent=new _t(this,"sceneRestarted",""),this.pickerFoundPosition=new _t(this,"pickerFoundPosition",""),this.frameUpdated=new _t(this,"frameUpdated",""),this.cameraControlsStart=new _t(this,"cameraControlsStart",""),this.inputStart=new _t(this,"inputStart",""),this.inputMove=new _t(this,"inputMove",""),this.inputEnd=new _t(this,"inputEnd",""),this.cameraMoveToTransform=new _t(this,"cameraMoveToTransform",""),this.debugChanged=new _t(this,"debugChanged","")}}class $Q{constructor(e,t){this.__assets=new Map,this.__appWcRef=t,this.__config=e}async initialize(){for(const e in this.__config){const t=new eI(this.__config[e],this.__appWcRef);await t.load(),this.__assets.set(e,t)}}async loadAllProxies(){for(const e of this.__assets.values())await e.loadProxyGltf()}async loadAllRenderAssets(){for(const e of this.__assets.values())await e.loadRenderGltf(!0)}getAssetByName(e){return this.__assets.get(e)}getFirstAsset(){return this.__assets.values().next().value}}class zQ{constructor(e){this.__assetClass=e.assetClass,this.__asset=e.asset,this.__assetId=e.assetId,this.__finish=e.finish,this.__productOptionValue=e.productOptionValue}get assetClass(){return this.__assetClass}get asset(){return this.__asset}get assetId(){return this.__assetId}get finish(){return this.__finish}get productOptionValue(){return this.__productOptionValue}}class GQ{constructor(e,t){this.__productParts=[],this.__id=e.id,this.__name=e.name,this.__productId=t,this.__sku=e.sku,this.__upc=e.upc,this.__asin=e.asin,this.__shopifyVariantId=e.shopifyVariantId,this.__uuid=e.uuid,this.parseProductParts(e.productParts)}get id(){return this.__id}get name(){return this.__name}get productId(){return this.__productId}get sku(){return this.__sku}get upc(){return this.__upc}get asin(){return this.__asin}get shopifyVariantId(){return this.__shopifyVariantId}get uuid(){return this.__uuid}get productParts(){return this.__productParts}parseProductParts(e){for(const t of e){const i=new zQ(t);this.__productParts.push(i)}}}class HQ{constructor(e,t){this.__productVariants=new Map,this.__productVariantNames=new Map,this.__productVariantSkus=new Map,this.__productVariantUpcs=new Map,this.__productVariantAsins=new Map,this.__productVariantShopifyVariantIds=new Map,this.__productVariantUuids=new Map,this.__productId=t;for(const i of e){const s=new GQ(i,this.__productId);s&&this.addProductVariant(s)}}addProductVariant(e){this.__productVariants.set(e.id,e),this.__productVariantNames.set(e.name,e),e.sku&&this.__productVariantSkus.set(e.sku,e),e.upc&&this.__productVariantUpcs.set(e.upc,e),e.asin&&this.__productVariantAsins.set(e.asin,e),e.shopifyVariantId&&this.__productVariantShopifyVariantIds.set(e.shopifyVariantId,e),e.uuid&&this.__productVariantUuids.set(e.uuid,e)}removeProductVariant(e){e.sku&&this.__productVariantSkus.delete(e.sku),e.upc&&this.__productVariantUpcs.delete(e.upc),e.asin&&this.__productVariantAsins.delete(e.asin),e.shopifyVariantId&&this.__productVariantShopifyVariantIds.delete(e.shopifyVariantId),this.__productVariantNames.delete(e.name),this.__productVariants.delete(e.id)}getAllProductVariants(){return Array.from(this.__productVariants.values())}getAllProductVariantIds(){return Array.from(this.__productVariants.keys())}getAllProductVariantNames(){return Array.from(this.__productVariantNames.keys())}getProductVariantById(e){return this.__productVariants.get(e)}getProductVariantByName(e){return this.__productVariantNames.get(e)}getProductVariantBySku(e){return this.__productVariantSkus.get(e)}getProductVariantByUpc(e){return this.__productVariantUpcs.get(e)}getProductVariantByAsin(e){return this.__productVariantAsins.get(e)}getProductVariantByShopifyVariantId(e){return this.__productVariantShopifyVariantIds.get(e)}getProductVariantByUuid(e){return this.__productVariantUuids.get(e)}getProductVariantByIdentifierAndType(e,t){switch(t){case ao.SKU:return this.getProductVariantBySku(e);case ao.SHOPIFY_VARIANT_ID:return this.getProductVariantByShopifyVariantId(e);case ao.ASIN:return this.getProductVariantByAsin(e);case ao.UPC:return this.getProductVariantByUpc(e);case ao.EXPERIENCE_ID:return;case ao.PRODUCT_VARIANT_UUID:return this.getProductVariantByUuid(e);default:return}}}class VQ extends Z1{constructor(e){super(e)}}class QQ{constructor(e){this.__appWcRef=e,this.__materialLibraries=new Map}get materialLibraries(){return this.__materialLibraries}makeEmpty(){this.__materialLibraries.clear()}async addMaterialLibrary(e,t){const i=new VQ({id:e,uri:t,preload:!1,appWcRef:this.__appWcRef});return this.__materialLibraries.set(i.id,i),i}}class jQ{constructor(){this.__defaultValues={postEffect:{ao:!1},render:{envMap:"https://asset.myepigraph.com/configurator-assets/epigraph-solution-assets/env-maps/neutral.hdr"},camera:{initial:null,backgroundColor:"#ffffff",backgroundAlpha:1,focalLength:35,nearClip:.01,farClip:1e3,canPan:!0,canZoom:!0,minDistance:2,maxDistance:8,infinitePolarAngle:!0,minPolarAngle:0,maxPolarAngle:6.25,infiniteAzimuthAngle:!0,minAzimuthAngle:0,maxAzimuthAngle:6.25},renderQuality:{antiAlias:!0},screenshots:{enabled:!1},shadows:{shadowType:lh.ACCUMULATIVE,accumulativeShadows:{shadowMaterial:{opacity:.8,alphaTest:.75,color:"#000000",blend:1},shadowParams:{frames:30,scale:10,radius:.8,ambient:.5},light:{direction:{x:3,y:5,z:3}}},contactShadows:{planeLength:3,planeWidth:3,cameraHeight:1,intensity:1,softness:1}},hotspots:{showNavigationButtons:!0}},this.deepCopyProductSettings(this.__defaultValues)}asJson(){return this.__values}deepCopyProductSettings(e){this.__values=JSON.parse(JSON.stringify(this.__defaultValues)),e.render&&e.render.envMap&&(this.__values.render.envMap=e.render.envMap),e.camera&&(e.camera.initial&&(this.__values.camera.initial=e.camera.initial),e.camera.backgroundColor&&(this.__values.camera.backgroundColor=e.camera.backgroundColor),e.camera.backgroundAlpha&&(this.__values.camera.backgroundAlpha=e.camera.backgroundAlpha),e.camera.focalLength&&(this.__values.camera.focalLength=e.camera.focalLength),e.camera.canPan!==void 0&&(this.__values.camera.canPan=e.camera.canPan),e.camera.canZoom!==void 0&&(this.__values.camera.canZoom=e.camera.canZoom),e.camera.minDistance&&(this.__values.camera.minDistance=e.camera.minDistance),e.camera.maxDistance&&(this.__values.camera.maxDistance=e.camera.maxDistance),e.camera.minPolarAngle&&(this.__values.camera.minPolarAngle=e.camera.minPolarAngle),e.camera.maxPolarAngle&&(this.__values.camera.maxPolarAngle=e.camera.maxPolarAngle),e.camera.minAzimuthAngle&&(this.__values.camera.minAzimuthAngle=e.camera.minAzimuthAngle),e.camera.maxAzimuthAngle&&(this.__values.camera.maxAzimuthAngle=e.camera.maxAzimuthAngle)),e.postEffect&&(this.__values.postEffect=e.postEffect),e.renderQuality&&(this.__values.renderQuality=e.renderQuality),e.screenshots&&(this.__values.screenshots=e.screenshots),e.shadows?.shadowType&&(this.__values.shadows.shadowType=e.shadows.shadowType),e.shadows?.accumulativeShadows&&(this.__values.shadows.accumulativeShadows=e.shadows.accumulativeShadows),e.shadows?.contactShadows&&(e.shadows.contactShadows.cameraHeight&&(this.__values.shadows.contactShadows.cameraHeight=e.shadows.contactShadows.cameraHeight),e.shadows.contactShadows.intensity&&(this.__values.shadows.contactShadows.intensity=e.shadows.contactShadows.intensity),e.shadows.contactShadows.planeLength&&(this.__values.shadows.contactShadows.planeLength=e.shadows.contactShadows.planeLength),e.shadows.contactShadows.planeWidth&&(this.__values.shadows.contactShadows.planeWidth=e.shadows.contactShadows.planeWidth),e.shadows.contactShadows.softness&&(this.__values.shadows.contactShadows.softness=e.shadows.contactShadows.softness)),e.hotspots?.showNavigationButtons!==void 0&&(this.__values.hotspots.showNavigationButtons=e.hotspots.showNavigationButtons)}get postEffect(){return this.__values.postEffect}get render(){return this.__values.render}get camera(){return this.__values.camera}get renderQuality(){return this.__values.renderQuality}get screenshots(){return this.__values.screenshots}get shadows(){return this.__values.shadows}get hotspots(){return this.__values.camera}}class qQ{constructor({nexusApiResultPayload:e,appWcRef:t}){this.__needsRootPlug=!1,window.epigraph.logger.info({title:"nexusApiPayload",details:e}),this._appWcRef=t,this._data=e,this.__materialLibraryCollection=new QQ(this._appWcRef),this._data.product_data.settings&&this._appWcRef.productSettings.deepCopyProductSettings(this._data.product_data.settings);const i=this._data.product_data.assets;if(Object.values(i).length===1){const s=Object.values(i)[0];s?.proxyGeo?window.epigraph.logger.warn({title:"Single asset experience detected and a proxy was provided. Please ensure that the proxy provided has a root plug in it. Expand for the asset config used...",details:s,contextOverride:"ASSET COLLECTION"}):(s.proxyGeo="https://asset.myepigraph.com/configurator-assets/epigraph-solution-assets/staging-assets/pipeline-assets/3d-assets/proxies/null-proxy.glb",this.__needsRootPlug=!0,s.autoGenerateProxyEntity=!0)}}get materialLibraryCollection(){return this.__materialLibraryCollection}get settings(){return this._data.settings}get productSettings(){return this._data.product_data.settings}get channelName(){return this._data.settings.channel.name}get channelSettings(){return this._data.settings.channel.channel_settings}async __parseMaterialLibraries(){this.__materialLibraryCollection.makeEmpty();const e=this._data?.brand?.material_libraries;if(e)for(const[t,i]of Object.entries(e))await this.__materialLibraryCollection.addMaterialLibrary(t,i.url)}async __parseAssets(){return this.__assetCollection=new $Q(this._data.product_data.assets,this._appWcRef),await this.__assetCollection.initialize(),this.__needsRootPlug&&this.__assetCollection.getFirstAsset()?.proxyGltf?.plugs.push(new Ba({name:"root@plug",isPrimary:!0,connectionId:"root",position:new se,rotation:new Rn})),this.__assetCollection}getAssetCollection(){return this.__assetCollection}__parseProductVariants(){this.__productVariantCollection=new HQ(this._data.product_data.product.productVariants,this._data.product_data.product.id)}get productVariantCollection(){return this.__productVariantCollection}async initialize(){await this.__parseMaterialLibraries(),await this.__parseAssets(),await this.__parseProductVariants()}}var dh=function(){var o=0,e=document.createElement("div");e.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",e.addEventListener("click",function(m){m.preventDefault(),i(++o%e.children.length)},!1);function t(m){return e.appendChild(m.dom),m}function i(m){for(var _=0;_<e.children.length;_++)e.children[_].style.display=_===m?"block":"none";o=m}var s=(performance||Date).now(),l=s,u=0,d=t(new dh.Panel("FPS","#0ff","#002")),f=t(new dh.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var g=t(new dh.Panel("MB","#f08","#201"));return i(0),{REVISION:16,dom:e,addPanel:t,showPanel:i,begin:function(){s=(performance||Date).now()},end:function(){u++;var m=(performance||Date).now();if(f.update(m-s,200),m>=l+1e3&&(d.update(u*1e3/(m-l),100),l=m,u=0,g)){var _=performance.memory;g.update(_.usedJSHeapSize/1048576,_.jsHeapSizeLimit/1048576)}return m},update:function(){s=this.end()},domElement:e,setMode:i}};dh.Panel=function(o,e,t){var i=1/0,s=0,l=Math.round,u=l(window.devicePixelRatio||1),d=80*u,f=48*u,g=3*u,m=2*u,_=3*u,y=15*u,v=74*u,E=30*u,T=document.createElement("canvas");T.width=d,T.height=f,T.style.cssText="width:80px;height:48px";var C=T.getContext("2d");return C.font="bold "+9*u+"px Helvetica,Arial,sans-serif",C.textBaseline="top",C.fillStyle=t,C.fillRect(0,0,d,f),C.fillStyle=e,C.fillText(o,g,m),C.fillRect(_,y,v,E),C.fillStyle=t,C.globalAlpha=.9,C.fillRect(_,y,v,E),{dom:T,update:function(x,P){i=Math.min(i,x),s=Math.max(s,x),C.fillStyle=t,C.globalAlpha=1,C.fillRect(0,0,d,y),C.fillStyle=e,C.fillText(l(x)+" "+o+" ("+l(i)+"-"+l(s)+")",g,m),C.drawImage(T,_+u,y,v-u,E,_,y,v-u,E),C.fillRect(_+v-u,y,u,E),C.fillStyle=t,C.globalAlpha=.9,C.fillRect(_+v-u,y,u,l((1-x/P)*E))}}};class ws extends Gh{constructor(){super(),this._loggerContext="DEBUG MANAGER",this.stats=new dh}static{this.webComponentName="debug-manager"}static setupWebComponent(){window.customElements.get(ws.webComponentName)||window.customElements.define(ws.webComponentName,ws)}static{this.styles=ut`
8500
+ `}};Go([Ut("#modelViewer")],Na.prototype,"modelViewerElem");Go([Ut("#arModal")],Na.prototype,"arModalElem");Go([Ut("#qrModal")],Na.prototype,"qrModalElem");Go([ue({attribute:!1})],Na.prototype,"appWcRef");Go([ue({type:String,attribute:"glb-src"})],Na.prototype,"glbSrc");Go([ue({type:String,attribute:"usdz-src"})],Na.prototype,"usdzSrc");Go([ue({type:Boolean,attribute:"debug"})],Na.prototype,"debug");let UQ=Na;class _t{constructor(e,t,i=""){this.__name="app:generic:event",this.__eventsManager=e,this.__name=t,this.__detail=i}get name(){return this.__name}get detail(){return this.__detail}fire(e){const t=new CustomEvent(this.__name,{detail:e??this.__detail});this.__eventsManager.eventHubRef.dispatchEvent(t)}}class FQ extends EventTarget{constructor(e){super(),this._loggerContext="EVENTS MANAGER",window.epigraph.logger.info({title:"Initializing...",contextOverride:this._loggerContext}),e?this.eventHubRef=e:this.eventHubRef=this,this.assetLoadProgress=new _t(this,"assetLoadProgress",""),this.experienceUpdatedEvent=new _t(this,"experienceUpdated",""),this.productSettingUpdatedEvent=new _t(this,"productSettingUpdatedEvent",""),this.productSettingsShadowTypeUpdatedEvent=new _t(this,"productSettingsShadowTypeUpdatedEvent",""),this.productSettingsSavedEvent=new _t(this,"productsettingssavedevent",""),this.appReadyEvent=new _t(this,"appReady",""),this.appFailedEvent=new _t(this,"appFailed",""),this.productClassChangedEvent=new _t(this,"productClassChanged",""),this.productChangedEvent=new _t(this,"productChanged",""),this.variantChangedEvent=new _t(this,"variantChanged",""),this.structureNodeAddedEvent=new _t(this,"structureNodeAdded",""),this.structureNodeRemovedEvent=new _t(this,"structureNodeRemoved",""),this.structureChangedEvent=new _t(this,"structureChanged",""),this.showNodeLoadingIcon=new _t(this,"nodeLoadingShow",""),this.hideNodeLoadingIcon=new _t(this,"nodeLoadingHide",""),this.cameraFitEvent=new _t(this,"cameraFit",""),this.hotspotsUpdatedEvent=new _t(this,"hotspotsUpdated",""),this.hotspotsVisibilityChanged=new _t(this,"hotspotsVisibilityChanged",""),this.hotspotClickedEvent=new _t(this,"hotspotClicked",""),this.hotspotOpenEvent=new _t(this,"hotspotOpen",""),this.hotspotClosedEvent=new _t(this,"hotspotClosed",""),this.hotspotNextEvent=new _t(this,"hotspotNext",""),this.hotspotPreviousEvent=new _t(this,"hotspotPrevious",""),this.sceneBoundsChanged=new _t(this,"sceneBoundsChanged",""),this.dimensionsPositionChanged=new _t(this,"dimensionsPositionChanged",""),this.dimensionsValueChanged=new _t(this,"dimensionsValueChanged",""),this.dimensionsVisibilityChanged=new _t(this,"dimensionsVisibilityChanged",""),this.arModelReadyEvent=new _t(this,"arGlbReady",""),this.cartChangedEvent=new _t(this,"cartChanged",""),this.sceneRestartedEvent=new _t(this,"sceneRestarted",""),this.pickerFoundPosition=new _t(this,"pickerFoundPosition",""),this.frameUpdated=new _t(this,"frameUpdated",""),this.cameraControlsStart=new _t(this,"cameraControlsStart",""),this.inputStart=new _t(this,"inputStart",""),this.inputMove=new _t(this,"inputMove",""),this.inputEnd=new _t(this,"inputEnd",""),this.cameraMoveToTransform=new _t(this,"cameraMoveToTransform",""),this.debugChanged=new _t(this,"debugChanged","")}}class $Q{constructor(e,t){this.__assets=new Map,this.__appWcRef=t,this.__config=e}async initialize(){for(const e in this.__config){const t=new eI(this.__config[e],this.__appWcRef);await t.load(),this.__assets.set(e,t)}}async loadAllProxies(){for(const e of this.__assets.values())await e.loadProxyGltf()}async loadAllRenderAssets(){for(const e of this.__assets.values())await e.loadRenderGltf(!0)}getAssetByName(e){return this.__assets.get(e)}getFirstAsset(){return this.__assets.values().next().value}}class zQ{constructor(e){this.__assetClass=e.assetClass,this.__asset=e.asset,this.__assetId=e.assetId,this.__finish=e.finish,this.__productOptionValue=e.productOptionValue}get assetClass(){return this.__assetClass}get asset(){return this.__asset}get assetId(){return this.__assetId}get finish(){return this.__finish}get productOptionValue(){return this.__productOptionValue}}class GQ{constructor(e,t){this.__productParts=[],this.__id=e.id,this.__name=e.name,this.__productId=t,this.__sku=e.sku,this.__upc=e.upc,this.__asin=e.asin,this.__shopifyVariantId=e.shopifyVariantId,this.__uuid=e.uuid,this.parseProductParts(e.productParts)}get id(){return this.__id}get name(){return this.__name}get productId(){return this.__productId}get sku(){return this.__sku}get upc(){return this.__upc}get asin(){return this.__asin}get shopifyVariantId(){return this.__shopifyVariantId}get uuid(){return this.__uuid}get productParts(){return this.__productParts}parseProductParts(e){for(const t of e){const i=new zQ(t);this.__productParts.push(i)}}}class HQ{constructor(e,t){this.__productVariants=new Map,this.__productVariantNames=new Map,this.__productVariantSkus=new Map,this.__productVariantUpcs=new Map,this.__productVariantAsins=new Map,this.__productVariantShopifyVariantIds=new Map,this.__productVariantUuids=new Map,this.__productId=t;for(const i of e){const s=new GQ(i,this.__productId);s&&this.addProductVariant(s)}}addProductVariant(e){this.__productVariants.set(e.id,e),this.__productVariantNames.set(e.name,e),e.sku&&this.__productVariantSkus.set(e.sku,e),e.upc&&this.__productVariantUpcs.set(e.upc,e),e.asin&&this.__productVariantAsins.set(e.asin,e),e.shopifyVariantId&&this.__productVariantShopifyVariantIds.set(e.shopifyVariantId,e),e.uuid&&this.__productVariantUuids.set(e.uuid,e)}removeProductVariant(e){e.sku&&this.__productVariantSkus.delete(e.sku),e.upc&&this.__productVariantUpcs.delete(e.upc),e.asin&&this.__productVariantAsins.delete(e.asin),e.shopifyVariantId&&this.__productVariantShopifyVariantIds.delete(e.shopifyVariantId),this.__productVariantNames.delete(e.name),this.__productVariants.delete(e.id)}getAllProductVariants(){return Array.from(this.__productVariants.values())}getAllProductVariantIds(){return Array.from(this.__productVariants.keys())}getAllProductVariantNames(){return Array.from(this.__productVariantNames.keys())}getProductVariantById(e){return this.__productVariants.get(e)}getProductVariantByName(e){return this.__productVariantNames.get(e)}getProductVariantBySku(e){return this.__productVariantSkus.get(e)}getProductVariantByUpc(e){return this.__productVariantUpcs.get(e)}getProductVariantByAsin(e){return this.__productVariantAsins.get(e)}getProductVariantByShopifyVariantId(e){return this.__productVariantShopifyVariantIds.get(e)}getProductVariantByUuid(e){return this.__productVariantUuids.get(e)}getProductVariantByIdentifierAndType(e,t){switch(t){case ao.SKU:return this.getProductVariantBySku(e);case ao.SHOPIFY_VARIANT_ID:return this.getProductVariantByShopifyVariantId(e);case ao.ASIN:return this.getProductVariantByAsin(e);case ao.UPC:return this.getProductVariantByUpc(e);case ao.EXPERIENCE_ID:return;case ao.PRODUCT_VARIANT_UUID:return this.getProductVariantByUuid(e);default:return}}}class VQ extends Z1{constructor(e){super(e)}}class QQ{constructor(e){this.__appWcRef=e,this.__materialLibraries=new Map}get materialLibraries(){return this.__materialLibraries}makeEmpty(){this.__materialLibraries.clear()}async addMaterialLibrary(e,t){const i=new VQ({id:e,uri:t,preload:!1,appWcRef:this.__appWcRef});return this.__materialLibraries.set(i.id,i),i}}class jQ{constructor(){this.__defaultValues={postEffect:{ao:!1},render:{envMap:"https://asset.myepigraph.com/configurator-assets/epigraph-solution-assets/env-maps/neutral.hdr"},camera:{initial:null,backgroundColor:"#ffffff",backgroundAlpha:1,focalLength:35,nearClip:.01,farClip:1e3,canPan:!0,canZoom:!0,minDistance:2,maxDistance:8,infinitePolarAngle:!0,minPolarAngle:0,maxPolarAngle:6.25,infiniteAzimuthAngle:!0,minAzimuthAngle:0,maxAzimuthAngle:6.25},renderQuality:{antiAlias:!0},screenshots:{enabled:!1},shadows:{shadowType:lh.ACCUMULATIVE,accumulativeShadows:{shadowMaterial:{opacity:.8,alphaTest:.75,color:"#000000",blend:1},shadowParams:{frames:30,scale:10,radius:.8,ambient:.5},light:{direction:{x:3,y:5,z:3}}},contactShadows:{planeLength:3,planeWidth:3,cameraHeight:1,intensity:1,softness:1}},hotspots:{showNavigationButtons:!0}},this.deepCopyProductSettings(this.__defaultValues)}asJson(){return this.__values}deepCopyProductSettings(e){this.__values=JSON.parse(JSON.stringify(this.__defaultValues)),e.render&&e.render.envMap&&(this.__values.render.envMap=e.render.envMap),e.camera&&(e.camera.initial&&(this.__values.camera.initial=e.camera.initial),e.camera.backgroundColor&&(this.__values.camera.backgroundColor=e.camera.backgroundColor),e.camera.backgroundAlpha&&(this.__values.camera.backgroundAlpha=e.camera.backgroundAlpha),e.camera.focalLength&&(this.__values.camera.focalLength=e.camera.focalLength),e.camera.canPan!==void 0&&(this.__values.camera.canPan=e.camera.canPan),e.camera.canZoom!==void 0&&(this.__values.camera.canZoom=e.camera.canZoom),e.camera.minDistance&&(this.__values.camera.minDistance=e.camera.minDistance),e.camera.maxDistance&&(this.__values.camera.maxDistance=e.camera.maxDistance),e.camera.minPolarAngle&&(this.__values.camera.minPolarAngle=e.camera.minPolarAngle),e.camera.maxPolarAngle&&(this.__values.camera.maxPolarAngle=e.camera.maxPolarAngle),e.camera.minAzimuthAngle&&(this.__values.camera.minAzimuthAngle=e.camera.minAzimuthAngle),e.camera.maxAzimuthAngle&&(this.__values.camera.maxAzimuthAngle=e.camera.maxAzimuthAngle)),e.postEffect&&(this.__values.postEffect=e.postEffect),e.renderQuality&&(this.__values.renderQuality=e.renderQuality),e.screenshots&&(this.__values.screenshots=e.screenshots),e.shadows?.shadowType&&(this.__values.shadows.shadowType=e.shadows.shadowType),e.shadows?.accumulativeShadows&&(this.__values.shadows.accumulativeShadows=e.shadows.accumulativeShadows),e.shadows?.contactShadows&&(e.shadows.contactShadows.cameraHeight&&(this.__values.shadows.contactShadows.cameraHeight=e.shadows.contactShadows.cameraHeight),e.shadows.contactShadows.intensity&&(this.__values.shadows.contactShadows.intensity=e.shadows.contactShadows.intensity),e.shadows.contactShadows.planeLength&&(this.__values.shadows.contactShadows.planeLength=e.shadows.contactShadows.planeLength),e.shadows.contactShadows.planeWidth&&(this.__values.shadows.contactShadows.planeWidth=e.shadows.contactShadows.planeWidth),e.shadows.contactShadows.softness&&(this.__values.shadows.contactShadows.softness=e.shadows.contactShadows.softness)),e.hotspots?.showNavigationButtons!==void 0&&(this.__values.hotspots.showNavigationButtons=e.hotspots.showNavigationButtons)}get postEffect(){return this.__values.postEffect}get render(){return this.__values.render}get camera(){return this.__values.camera}get renderQuality(){return this.__values.renderQuality}get screenshots(){return this.__values.screenshots}get shadows(){return this.__values.shadows}get hotspots(){return this.__values.camera}}class qQ{constructor({nexusApiResultPayload:e,appWcRef:t}){this.__needsRootPlug=!1,window.epigraph.logger.info({title:"nexusApiPayload",details:e}),this._appWcRef=t,this._data=e,this.__materialLibraryCollection=new QQ(this._appWcRef),this._data.product_data.settings&&(this._appWcRef.productSettings.deepCopyProductSettings(this._data.product_data.settings),this._appWcRef.eventsManager.productSettingUpdatedEvent.fire());const i=this._data.product_data.assets;if(Object.values(i).length===1){const s=Object.values(i)[0];s?.proxyGeo?window.epigraph.logger.warn({title:"Single asset experience detected and a proxy was provided. Please ensure that the proxy provided has a root plug in it. Expand for the asset config used...",details:s,contextOverride:"ASSET COLLECTION"}):(s.proxyGeo="https://asset.myepigraph.com/configurator-assets/epigraph-solution-assets/staging-assets/pipeline-assets/3d-assets/proxies/null-proxy.glb",this.__needsRootPlug=!0,s.autoGenerateProxyEntity=!0)}}get materialLibraryCollection(){return this.__materialLibraryCollection}get settings(){return this._data.settings}get productSettings(){return this._data.product_data.settings}get channelName(){return this._data.settings.channel.name}get channelSettings(){return this._data.settings.channel.channel_settings}async __parseMaterialLibraries(){this.__materialLibraryCollection.makeEmpty();const e=this._data?.brand?.material_libraries;if(e)for(const[t,i]of Object.entries(e))await this.__materialLibraryCollection.addMaterialLibrary(t,i.url)}async __parseAssets(){return this.__assetCollection=new $Q(this._data.product_data.assets,this._appWcRef),await this.__assetCollection.initialize(),this.__needsRootPlug&&this.__assetCollection.getFirstAsset()?.proxyGltf?.plugs.push(new Ba({name:"root@plug",isPrimary:!0,connectionId:"root",position:new se,rotation:new Rn})),this.__assetCollection}getAssetCollection(){return this.__assetCollection}__parseProductVariants(){this.__productVariantCollection=new HQ(this._data.product_data.product.productVariants,this._data.product_data.product.id)}get productVariantCollection(){return this.__productVariantCollection}async initialize(){await this.__parseMaterialLibraries(),await this.__parseAssets(),await this.__parseProductVariants()}}var dh=function(){var o=0,e=document.createElement("div");e.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",e.addEventListener("click",function(m){m.preventDefault(),i(++o%e.children.length)},!1);function t(m){return e.appendChild(m.dom),m}function i(m){for(var _=0;_<e.children.length;_++)e.children[_].style.display=_===m?"block":"none";o=m}var s=(performance||Date).now(),l=s,u=0,d=t(new dh.Panel("FPS","#0ff","#002")),f=t(new dh.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var g=t(new dh.Panel("MB","#f08","#201"));return i(0),{REVISION:16,dom:e,addPanel:t,showPanel:i,begin:function(){s=(performance||Date).now()},end:function(){u++;var m=(performance||Date).now();if(f.update(m-s,200),m>=l+1e3&&(d.update(u*1e3/(m-l),100),l=m,u=0,g)){var _=performance.memory;g.update(_.usedJSHeapSize/1048576,_.jsHeapSizeLimit/1048576)}return m},update:function(){s=this.end()},domElement:e,setMode:i}};dh.Panel=function(o,e,t){var i=1/0,s=0,l=Math.round,u=l(window.devicePixelRatio||1),d=80*u,f=48*u,g=3*u,m=2*u,_=3*u,y=15*u,v=74*u,E=30*u,T=document.createElement("canvas");T.width=d,T.height=f,T.style.cssText="width:80px;height:48px";var C=T.getContext("2d");return C.font="bold "+9*u+"px Helvetica,Arial,sans-serif",C.textBaseline="top",C.fillStyle=t,C.fillRect(0,0,d,f),C.fillStyle=e,C.fillText(o,g,m),C.fillRect(_,y,v,E),C.fillStyle=t,C.globalAlpha=.9,C.fillRect(_,y,v,E),{dom:T,update:function(x,P){i=Math.min(i,x),s=Math.max(s,x),C.fillStyle=t,C.globalAlpha=1,C.fillRect(0,0,d,y),C.fillStyle=e,C.fillText(l(x)+" "+o+" ("+l(i)+"-"+l(s)+")",g,m),C.drawImage(T,_+u,y,v-u,E,_,y,v-u,E),C.fillRect(_+v-u,y,u,E),C.fillStyle=t,C.globalAlpha=.9,C.fillRect(_+v-u,y,u,l((1-x/P)*E))}}};class ws extends Gh{constructor(){super(),this._loggerContext="DEBUG MANAGER",this.stats=new dh}static{this.webComponentName="debug-manager"}static setupWebComponent(){window.customElements.get(ws.webComponentName)||window.customElements.define(ws.webComponentName,ws)}static{this.styles=ut`
8501
8501
  .debug-label {
8502
8502
  position: absolute;
8503
8503
  top: 0%;
@@ -8518,7 +8518,7 @@ void main() {
8518
8518
  */class js{constructor(e,t,i,s,l="div"){this.parent=e,this.object=t,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement("div"),this.domElement.classList.add("controller"),this.domElement.classList.add(s),this.$name=document.createElement("div"),this.$name.classList.add("name"),js.nextNameID=js.nextNameID||0,this.$name.id="lil-gui-name-"+ ++js.nextNameID,this.$widget=document.createElement(l),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(e){return this._name=e,this.$name.innerHTML=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled||(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e)),this}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){const t=this.parent.add(this.object,this.property,e);return t.name(this._name),this.destroy(),t}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.object[this.property]=e,this._callOnChange(),this.updateDisplay(),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class WQ extends js{constructor(e,t,i){super(e,t,i,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function f0(o){let e,t;return(e=o.match(/(#|0x)?([a-f0-9]{6})/i))?t=e[2]:(e=o.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?t=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=o.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),!!t&&"#"+t}const YQ={isPrimitive:!0,match:o=>typeof o=="string",fromHexString:f0,toHexString:f0},Nh={isPrimitive:!0,match:o=>typeof o=="number",fromHexString:o=>parseInt(o.substring(1),16),toHexString:o=>"#"+o.toString(16).padStart(6,0)},XQ={isPrimitive:!1,match:Array.isArray,fromHexString(o,e,t=1){const i=Nh.fromHexString(o);e[0]=(i>>16&255)/255*t,e[1]=(i>>8&255)/255*t,e[2]=(255&i)/255*t},toHexString:([o,e,t],i=1)=>Nh.toHexString(o*(i=255/i)<<16^e*i<<8^t*i<<0)},KQ={isPrimitive:!1,match:o=>Object(o)===o,fromHexString(o,e,t=1){const i=Nh.fromHexString(o);e.r=(i>>16&255)/255*t,e.g=(i>>8&255)/255*t,e.b=(255&i)/255*t},toHexString:({r:o,g:e,b:t},i=1)=>Nh.toHexString(o*(i=255/i)<<16^e*i<<8^t*i<<0)},JQ=[YQ,Nh,XQ,KQ];class ZQ extends js{constructor(e,t,i,s){var l;super(e,t,i,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=(l=this.initialValue,JQ.find(u=>u.match(l))),this._rgbScale=s,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{const u=f0(this.$text.value);u&&this._setValueFromHexString(u)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){const t=this._format.fromHexString(e);this.setValue(t)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class FA extends js{constructor(e,t,i){super(e,t,i,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",s=>{s.preventDefault(),this.getValue().call(this.object)}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class e8 extends js{constructor(e,t,i,s,l,u){super(e,t,i,"number"),this._initInput(),this.min(s),this.max(l);const d=u!==void 0;this.step(d?u:this._getImplicitStep(),d),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,t=!0){return this._step=e,this._stepExplicit=t,this}updateDisplay(){const e=this.getValue();if(this._hasSlider){let t=(e-this._min)/(this._max-this._min);t=Math.max(0,Math.min(t,1)),this.$fill.style.width=100*t+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$disable=this.$input;const e=m=>{const _=parseFloat(this.$input.value);isNaN(_)||(this._snapClampSetValue(_+m),this.$input.value=this.getValue())};let t,i,s,l,u,d=!1;const f=m=>{if(d){const _=m.clientX-t,y=m.clientY-i;Math.abs(y)>5?(m.preventDefault(),this.$input.blur(),d=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(_)>5&&g()}if(!d){const _=m.clientY-s;u-=_*this._step*this._arrowKeyMultiplier(m),l+u>this._max?u=this._max-l:l+u<this._min&&(u=this._min-l),this._snapClampSetValue(l+u)}s=m.clientY},g=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",g)};this.$input.addEventListener("input",()=>{let m=parseFloat(this.$input.value);isNaN(m)||(this._stepExplicit&&(m=this._snap(m)),this.setValue(this._clamp(m)))}),this.$input.addEventListener("keydown",m=>{m.code==="Enter"&&this.$input.blur(),m.code==="ArrowUp"&&(m.preventDefault(),e(this._step*this._arrowKeyMultiplier(m))),m.code==="ArrowDown"&&(m.preventDefault(),e(this._step*this._arrowKeyMultiplier(m)*-1))}),this.$input.addEventListener("wheel",m=>{this._inputFocused&&(m.preventDefault(),e(this._step*this._normalizeMouseWheel(m)))},{passive:!1}),this.$input.addEventListener("mousedown",m=>{t=m.clientX,i=s=m.clientY,d=!0,l=this.getValue(),u=0,window.addEventListener("mousemove",f),window.addEventListener("mouseup",g)}),this.$input.addEventListener("focus",()=>{this._inputFocused=!0}),this.$input.addEventListener("blur",()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()})}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const e=y=>{const v=this.$slider.getBoundingClientRect();let E=(T=y,C=v.left,x=v.right,P=this._min,M=this._max,(T-C)/(x-C)*(M-P)+P);var T,C,x,P,M;this._snapClampSetValue(E)},t=y=>{e(y.clientX)},i=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",i)};let s,l,u=!1;const d=y=>{y.preventDefault(),this._setDraggingStyle(!0),e(y.touches[0].clientX),u=!1},f=y=>{if(u){const v=y.touches[0].clientX-s,E=y.touches[0].clientY-l;Math.abs(v)>Math.abs(E)?d(y):(window.removeEventListener("touchmove",f),window.removeEventListener("touchend",g))}else y.preventDefault(),e(y.touches[0].clientX)},g=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",f),window.removeEventListener("touchend",g)},m=this._callOnFinishChange.bind(this);let _;this.$slider.addEventListener("mousedown",y=>{this._setDraggingStyle(!0),e(y.clientX),window.addEventListener("mousemove",t),window.addEventListener("mouseup",i)}),this.$slider.addEventListener("touchstart",y=>{y.touches.length>1||(this._hasScrollBar?(s=y.touches[0].clientX,l=y.touches[0].clientY,u=!0):d(y),window.addEventListener("touchmove",f,{passive:!1}),window.addEventListener("touchend",g))},{passive:!1}),this.$slider.addEventListener("wheel",y=>{if(Math.abs(y.deltaX)<Math.abs(y.deltaY)&&this._hasScrollBar)return;y.preventDefault();const v=this._normalizeMouseWheel(y)*this._step;this._snapClampSetValue(this.getValue()+v),this.$input.value=this.getValue(),clearTimeout(_),_=setTimeout(m,400)},{passive:!1})}_setDraggingStyle(e,t="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-"+t,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:t,deltaY:i}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(t=0,i=-e.wheelDelta/120,i*=this._stepExplicit?1:10),t+-i}_arrowKeyMultiplier(e){let t=this._stepExplicit?1:10;return e.shiftKey?t*=10:e.altKey&&(t/=10),t}_snap(e){const t=Math.round(e/this._step)*this._step;return parseFloat(t.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){const e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}}class t8 extends js{constructor(e,t,i,s){super(e,t,i,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this._values=Array.isArray(s)?s:Object.values(s),this._names=Array.isArray(s)?s:Object.keys(s),this._names.forEach(l=>{const u=document.createElement("option");u.innerHTML=l,this.$select.appendChild(u)}),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.updateDisplay()}updateDisplay(){const e=this.getValue(),t=this._values.indexOf(e);return this.$select.selectedIndex=t,this.$display.innerHTML=t===-1?e:this._names[t],this}}class i8 extends js{constructor(e,t,i){super(e,t,i,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",s=>{s.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let oT=!1;class Ly{constructor({parent:e,autoPlace:t=e===void 0,container:i,width:s,title:l="Controls",injectStyles:u=!0,touchStyles:d=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",f=>{f.code!=="Enter"&&f.code!=="Space"||(f.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(l),d&&this.domElement.classList.add("allow-touch-styles"),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),!oT&&u&&((function(f){const g=document.createElement("style");g.innerHTML=f;const m=document.querySelector("head link[rel=stylesheet], head style");m?document.head.insertBefore(g,m):document.head.appendChild(g)})('.lil-gui{--background-color:#1f1f1f;--text-color:#ebebeb;--title-background-color:#111;--title-text-color:#ebebeb;--widget-color:#424242;--hover-color:#4f4f4f;--focus-color:#595959;--number-color:#2cc9ff;--string-color:#a2db3c;--font-size:11px;--input-font-size:11px;--font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;--font-family-mono:Menlo,Monaco,Consolas,"Droid Sans Mono",monospace;--padding:4px;--spacing:4px;--widget-height:20px;--name-width:45%;--slider-knob-width:2px;--slider-input-width:27%;--color-input-width:27%;--slider-input-min-width:45px;--color-input-min-width:45px;--folder-indent:7px;--widget-padding:0 0 0 3px;--widget-border-radius:2px;--checkbox-size:calc(var(--widget-height)*0.75);--scrollbar-width:5px;background-color:var(--background-color);color:var(--text-color);font-family:var(--font-family);font-size:var(--font-size);font-style:normal;font-weight:400;line-height:1;text-align:left;touch-action:manipulation;user-select:none;-webkit-user-select:none}.lil-gui,.lil-gui *{box-sizing:border-box;margin:0;padding:0}.lil-gui.root{display:flex;flex-direction:column;width:var(--width,245px)}.lil-gui.root>.title{background:var(--title-background-color);color:var(--title-text-color)}.lil-gui.root>.children{overflow-x:hidden;overflow-y:auto}.lil-gui.root>.children::-webkit-scrollbar{background:var(--background-color);height:var(--scrollbar-width);width:var(--scrollbar-width)}.lil-gui.root>.children::-webkit-scrollbar-thumb{background:var(--focus-color);border-radius:var(--scrollbar-width)}.lil-gui.force-touch-styles{--widget-height:28px;--padding:6px;--spacing:6px;--font-size:13px;--input-font-size:16px;--folder-indent:10px;--scrollbar-width:7px;--slider-input-min-width:50px;--color-input-min-width:65px}.lil-gui.autoPlace{max-height:100%;position:fixed;right:15px;top:0;z-index:1001}.lil-gui .controller{align-items:center;display:flex;margin:var(--spacing) 0;padding:0 var(--padding)}.lil-gui .controller.disabled{opacity:.5}.lil-gui .controller.disabled,.lil-gui .controller.disabled *{pointer-events:none!important}.lil-gui .controller>.name{flex-shrink:0;line-height:var(--widget-height);min-width:var(--name-width);padding-right:var(--spacing);white-space:pre}.lil-gui .controller .widget{align-items:center;display:flex;min-height:var(--widget-height);position:relative;width:100%}.lil-gui .controller.string input{color:var(--string-color)}.lil-gui .controller.boolean .widget{cursor:pointer}.lil-gui .controller.color .display{border-radius:var(--widget-border-radius);height:var(--widget-height);position:relative;width:100%}.lil-gui .controller.color input[type=color]{cursor:pointer;height:100%;opacity:0;width:100%}.lil-gui .controller.color input[type=text]{flex-shrink:0;font-family:var(--font-family-mono);margin-left:var(--spacing);min-width:var(--color-input-min-width);width:var(--color-input-width)}.lil-gui .controller.option select{max-width:100%;opacity:0;position:absolute;width:100%}.lil-gui .controller.option .display{background:var(--widget-color);border-radius:var(--widget-border-radius);height:var(--widget-height);line-height:var(--widget-height);max-width:100%;overflow:hidden;padding-left:.55em;padding-right:1.75em;pointer-events:none;position:relative;word-break:break-all}.lil-gui .controller.option .display.active{background:var(--focus-color)}.lil-gui .controller.option .display:after{bottom:0;content:"↕";font-family:lil-gui;padding-right:.375em;position:absolute;right:0;top:0}.lil-gui .controller.option .widget,.lil-gui .controller.option select{cursor:pointer}.lil-gui .controller.number input{color:var(--number-color)}.lil-gui .controller.number.hasSlider input{flex-shrink:0;margin-left:var(--spacing);min-width:var(--slider-input-min-width);width:var(--slider-input-width)}.lil-gui .controller.number .slider{background-color:var(--widget-color);border-radius:var(--widget-border-radius);cursor:ew-resize;height:var(--widget-height);overflow:hidden;padding-right:var(--slider-knob-width);touch-action:pan-y;width:100%}.lil-gui .controller.number .slider.active{background-color:var(--focus-color)}.lil-gui .controller.number .slider.active .fill{opacity:.95}.lil-gui .controller.number .fill{border-right:var(--slider-knob-width) solid var(--number-color);box-sizing:content-box;height:100%}.lil-gui-dragging .lil-gui{--hover-color:var(--widget-color)}.lil-gui-dragging *{cursor:ew-resize!important}.lil-gui-dragging.lil-gui-vertical *{cursor:ns-resize!important}.lil-gui .title{--title-height:calc(var(--widget-height) + var(--spacing)*1.25);-webkit-tap-highlight-color:transparent;text-decoration-skip:objects;cursor:pointer;font-weight:600;height:var(--title-height);line-height:calc(var(--title-height) - 4px);outline:none;padding:0 var(--padding)}.lil-gui .title:before{content:"▾";display:inline-block;font-family:lil-gui;padding-right:2px}.lil-gui .title:active{background:var(--title-background-color);opacity:.75}.lil-gui.root>.title:focus{text-decoration:none!important}.lil-gui.closed>.title:before{content:"▸"}.lil-gui.closed>.children{opacity:0;transform:translateY(-7px)}.lil-gui.closed:not(.transition)>.children{display:none}.lil-gui.transition>.children{overflow:hidden;pointer-events:none;transition-duration:.3s;transition-property:height,opacity,transform;transition-timing-function:cubic-bezier(.2,.6,.35,1)}.lil-gui .children:empty:before{content:"Empty";display:block;font-style:italic;height:var(--widget-height);line-height:var(--widget-height);margin:var(--spacing) 0;opacity:.5;padding:0 var(--padding)}.lil-gui.root>.children>.lil-gui>.title{border-width:0;border-bottom:1px solid var(--widget-color);border-left:0 solid var(--widget-color);border-right:0 solid var(--widget-color);border-top:1px solid var(--widget-color);transition:border-color .3s}.lil-gui.root>.children>.lil-gui.closed>.title{border-bottom-color:transparent}.lil-gui+.controller{border-top:1px solid var(--widget-color);margin-top:0;padding-top:var(--spacing)}.lil-gui .lil-gui .lil-gui>.title{border:none}.lil-gui .lil-gui .lil-gui>.children{border:none;border-left:2px solid var(--widget-color);margin-left:var(--folder-indent)}.lil-gui .lil-gui .controller{border:none}.lil-gui input{-webkit-tap-highlight-color:transparent;background:var(--widget-color);border:0;border-radius:var(--widget-border-radius);color:var(--text-color);font-family:var(--font-family);font-size:var(--input-font-size);height:var(--widget-height);outline:none;width:100%}.lil-gui input:disabled{opacity:1}.lil-gui input[type=number],.lil-gui input[type=text]{padding:var(--widget-padding)}.lil-gui input[type=number]:focus,.lil-gui input[type=text]:focus{background:var(--focus-color)}.lil-gui input::-webkit-inner-spin-button,.lil-gui input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.lil-gui input[type=number]{-moz-appearance:textfield}.lil-gui input[type=checkbox]{appearance:none;-webkit-appearance:none;border-radius:var(--widget-border-radius);cursor:pointer;height:var(--checkbox-size);text-align:center;width:var(--checkbox-size)}.lil-gui input[type=checkbox]:checked:before{content:"✓";font-family:lil-gui;font-size:var(--checkbox-size);line-height:var(--checkbox-size)}.lil-gui button{-webkit-tap-highlight-color:transparent;background:var(--widget-color);border:1px solid var(--widget-color);border-radius:var(--widget-border-radius);color:var(--text-color);cursor:pointer;font-family:var(--font-family);font-size:var(--font-size);height:var(--widget-height);line-height:calc(var(--widget-height) - 4px);outline:none;text-align:center;text-transform:none;width:100%}.lil-gui button:active{background:var(--focus-color)}@font-face{font-family:lil-gui;src:url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff")}@media (pointer:coarse){.lil-gui.allow-touch-styles{--widget-height:28px;--padding:6px;--spacing:6px;--font-size:13px;--input-font-size:16px;--folder-indent:10px;--scrollbar-width:7px;--slider-input-min-width:50px;--color-input-min-width:65px}}@media (hover:hover){.lil-gui .controller.color .display:hover:before{border:1px solid #fff9;border-radius:var(--widget-border-radius);bottom:0;content:" ";display:block;left:0;position:absolute;right:0;top:0}.lil-gui .controller.option .display.focus{background:var(--focus-color)}.lil-gui .controller.option .widget:hover .display{background:var(--hover-color)}.lil-gui .controller.number .slider:hover{background-color:var(--hover-color)}body:not(.lil-gui-dragging) .lil-gui .title:hover{background:var(--title-background-color);opacity:.85}.lil-gui .title:focus{text-decoration:underline var(--focus-color)}.lil-gui input:hover{background:var(--hover-color)}.lil-gui input:active{background:var(--focus-color)}.lil-gui input[type=checkbox]:focus{box-shadow:inset 0 0 0 1px var(--focus-color)}.lil-gui button:hover{background:var(--hover-color);border-color:var(--hover-color)}.lil-gui button:focus{border-color:var(--focus-color)}}'),oT=!0),i?i.appendChild(this.domElement):t&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),s&&this.domElement.style.setProperty("--width",s+"px"),this.domElement.addEventListener("keydown",f=>f.stopPropagation()),this.domElement.addEventListener("keyup",f=>f.stopPropagation())}add(e,t,i,s,l){if(Object(i)===i)return new t8(this,e,t,i);const u=e[t];switch(typeof u){case"number":return new e8(this,e,t,i,s,l);case"boolean":return new WQ(this,e,t);case"string":return new i8(this,e,t);case"function":return new FA(this,e,t)}console.error(`gui.add failed
8519
8519
  property:`,t,`
8520
8520
  object:`,e,`
8521
- value:`,u)}addColor(e,t,i=1){return new ZQ(this,e,t,i)}addFolder(e){return new Ly({parent:this,title:e})}load(e,t=!0){return e.controllers&&this.controllers.forEach(i=>{i instanceof FA||i._name in e.controllers&&i.load(e.controllers[i._name])}),t&&e.folders&&this.folders.forEach(i=>{i._title in e.folders&&i.load(e.folders[i._title])}),this}save(e=!0){const t={controllers:{},folders:{}};return this.controllers.forEach(i=>{if(!(i instanceof FA)){if(i._name in t.controllers)throw new Error(`Cannot save GUI with duplicate property "${i._name}"`);t.controllers[i._name]=i.save()}}),e&&this.folders.forEach(i=>{if(i._title in t.folders)throw new Error(`Cannot save GUI with duplicate folder "${i._title}"`);t.folders[i._title]=i.save()}),t}open(e=!0){return this._closed=!e,this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._closed=!e,this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{const t=this.$children.clientHeight;this.$children.style.height=t+"px",this.domElement.classList.add("transition");const i=l=>{l.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",i))};this.$children.addEventListener("transitionend",i);const s=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=s+"px"})}),this}title(e){return this._title=e,this.$title.innerHTML=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(t=>{e=e.concat(t.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(t=>{e=e.concat(t.foldersRecursive())}),e}}class fh extends Gh{constructor(){super(),this._loggerContext="SETTINGS MANAGER"}static{this.webComponentName="settings-manager"}static setupWebComponent(){window.customElements.get(fh.webComponentName)||window.customElements.define(fh.webComponentName,fh)}static{this.styles=ut``}firstUpdated(){this.__addGui()}get events(){return this.appWcRef.eventsManager}get productSettings(){return this.appWcRef.productSettings}__addCameraSettingsGui(e){const t=this.productSettings.camera;e.addColor(t,"backgroundColor").name("Background Color").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"backgroundAlpha",0,1).name("Background Alpha").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"focalLength",10,300).name("Focal Length").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"nearClip",0,3).name("Near Clip").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"farClip",0,1e4).name("Far Clip").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"canPan").name("Can Pan").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"canZoom").name("Can Zoom").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"minDistance",0,100).name("Min Distance").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"maxDistance",0,100).name("Max Distance").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"infinitePolarAngle").name("Infinite Polar Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"minPolarAngle",0,6.25).step(.01).name("Min Polar Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"maxPolarAngle",0,6.25).step(.01).name("Max Polar Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"infiniteAzimuthAngle").name("Infinite Azimuth Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"minAzimuthAngle",0,6.25).name("Min Azimuth Angle").step(.01).onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"maxAzimuthAngle",0,6.25).name("Max Azimuth Angle").step(.01).onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(this,"setCurrentCameraAsInitial").name("Set Current Camera As Initial")}__addShadowTypeSettingsGui(e){e.add(this.productSettings.shadows,"shadowType",[lh.NONE,lh.ACCUMULATIVE,lh.CONTACT]).name("Shadow Type").onFinishChange(t=>{this.events.productSettingsShadowTypeUpdatedEvent.fire({shadowType:t})})}__addAcuumulativeShadowSettingsGui(e){const t=e.addFolder("Accumulative Shadow Settings"),i=this.productSettings.shadows.accumulativeShadows,s=i.shadowMaterial;t.add(s,"opacity",0,1).name("Opacity").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.add(s,"alphaTest",0,1).name("Alpha Test").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.addColor(s,"color").name("Color").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.add(s,"blend",0,1).name("Blend").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.add(i.shadowParams,"frames",2,100,1).name("Frames").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.add(i.shadowParams,"scale",.5,30).name("Scale").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.add(i.shadowParams,"radius",.1,5).name("Radius").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.add(i.shadowParams,"ambient",0,1).name("Ambient").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire());const l=t.addFolder("Light Direction").close();l.add(i.light.direction,"x",-5,5).name("X").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),l.add(i.light.direction,"y",1,5).name("Y").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),l.add(i.light.direction,"z",-5,5).name("Z").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.close()}__addContactShadowSettingsGui(e){const t=e.addFolder("Contact Shadow Settings"),i=this.productSettings.shadows.contactShadows;t.add(i,"planeLength",0,20).name("Plane Length").onFinishChange(s=>{i.planeLength=s,this.events.productSettingUpdatedEvent.fire()}),t.add(i,"planeWidth",0,20).name("Plane Width").onFinishChange(s=>{i.planeWidth=s,this.events.productSettingUpdatedEvent.fire()}),t.add(i,"cameraHeight",0,20).name("Camera Height").onFinishChange(s=>{i.cameraHeight=s,this.events.productSettingUpdatedEvent.fire()}),t.add(i,"intensity",0,3).name("Intensity").onFinishChange(s=>{i.intensity=s,this.events.productSettingUpdatedEvent.fire()}),t.add(i,"softness",0,3).name("Softness").onFinishChange(s=>{i.softness=s,this.events.productSettingUpdatedEvent.fire()}),t.close()}__addGui(){this.gui=new Ly({autoPlace:!1,container:this.appWcRef.appUiContainerElemRef,injectStyles:!1,title:"Experience Settings"}),this.gui.add(this,"saveSettings").name("Save Settings").$widget.classList.add("save-settings-button");const e=this.gui.addFolder("Camera");this.__addCameraSettingsGui(e),e.close();const t=this.gui.addFolder("Shadows");this.__addShadowTypeSettingsGui(t),this.__addAcuumulativeShadowSettingsGui(t),this.__addContactShadowSettingsGui(t),t.close()}setCurrentCameraAsInitial(){this.productSettings.camera.initial=this.appWcRef.cameraManager.getCurrentCameraTransforms()}saveSettings(){this.events.productSettingsSavedEvent.fire({updatedSettings:this.productSettings.asJson()})}show(){this.gui?.show()}hide(){this.gui?.hide()}connectedCallback(){super.connectedCallback(),this.show()}disconnectedCallback(){this.hide(),super.disconnectedCallback()}}var n8=Object.defineProperty,dt=(o,e,t,i)=>{for(var s=void 0,l=o.length-1,u;l>=0;l--)(u=o[l])&&(s=u(e,t,s)||s);return s&&n8(e,t,s),s},ao=(o=>(o.NONE="",o.SKU="sku",o.SHOPIFY_VARIANT_ID="shopify_variant_id",o.ASIN="asin",o.UPC="upc",o.EXPERIENCE_ID="experience_id",o.PRODUCT_VARIANT_UUID="product_variant_uuid",o))(ao||{});const ht=class qu extends tR{constructor(){super(window.__APP_VERSION__,Yu.DEVELOPMENT),this.epigraphWebsiteRedirectUrls={icon:"https://www.epigraph.us",modal:"https://www.epigraph.us"},this.sessionState="default",this.isAppReady=!1,this.sku=Jt.sku.defaultValue.toString(),this.shopify_variant_id=Jt.shopifyVariantId.defaultValue.toString(),this.upc=Jt.upc.defaultValue.toString(),this.asin=Jt.asin.defaultValue.toString(),this.experience_id=Jt.experienceId.defaultValue.toString(),this.product_variant_uuid=Jt.productVariantUuid.defaultValue.toString(),this.customVersionId="",this.gaMeasurementId="",this.modalView=!1,this.hide=!1,this.isLoading=!0,this.apiMode="production",this.debug=!1,this.showSettings=!1,this.dimensionsUnit=Jt.dimensionsUnit.defaultValue.toString(),this.dimensionsUnitSymbol=Jt.dimensionsUnitSymbol.defaultValue.toString(),this.areDimensionsActive=!1,this.areHotspotsActive=!1,this.isHelpVisible=!1,this.baseUrlOverride=Jt.baseUrlOverride.defaultValue.toString(),this.isPortraitOrientation=!1,this.didARAutoLaunch=!1,this.transparentBackground=!1,this.hideUi=!1,this.playInteractionPrompt=!1,this.featuresToEnable={viewer:!0,hotspots:!0,dimensions:!0,viewInYourSpace:!0,help:!0,sceneManager:!0},this._hasActiveHotspot=!1,this._isToolsetLargerThanTheLeftBottomQuadrant=!1,this._loadingProgress=0,this._loadTimeBegin=performance.now(),this._loggerContext="EPIGRAPH THREED CODE",this._epigraphAnalytics=new uR(null,null),this._identifier="",this._identifierType="",this._isDevEnv=!1,this._isStagingEnv=!1,this._productSettings=new jQ,this._boundingSphereCenter=new se,this._loaders=new hh,this._activeAnimations=new Map,this._animationFadeDurationInMiliseconds=1e3,this._isSceneInteractedWith=!1,this.__glbBlobUrl="",this.__usdzBlobUrl="",this.__hasSceneChanged=!1,this.__canvasSize={width:0,height:0},this.__viewStateGrid=new lC(40,190,0,12829635)}static{this.webComponentName="epigraph-threed-core"}static setupWebComponent(){window.customElements.get(qu.webComponentName)||window.customElements.define(qu.webComponentName,qu)}static{this.styles=[ut`
8521
+ value:`,u)}addColor(e,t,i=1){return new ZQ(this,e,t,i)}addFolder(e){return new Ly({parent:this,title:e})}load(e,t=!0){return e.controllers&&this.controllers.forEach(i=>{i instanceof FA||i._name in e.controllers&&i.load(e.controllers[i._name])}),t&&e.folders&&this.folders.forEach(i=>{i._title in e.folders&&i.load(e.folders[i._title])}),this}save(e=!0){const t={controllers:{},folders:{}};return this.controllers.forEach(i=>{if(!(i instanceof FA)){if(i._name in t.controllers)throw new Error(`Cannot save GUI with duplicate property "${i._name}"`);t.controllers[i._name]=i.save()}}),e&&this.folders.forEach(i=>{if(i._title in t.folders)throw new Error(`Cannot save GUI with duplicate folder "${i._title}"`);t.folders[i._title]=i.save()}),t}open(e=!0){return this._closed=!e,this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._closed=!e,this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{const t=this.$children.clientHeight;this.$children.style.height=t+"px",this.domElement.classList.add("transition");const i=l=>{l.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",i))};this.$children.addEventListener("transitionend",i);const s=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=s+"px"})}),this}title(e){return this._title=e,this.$title.innerHTML=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(t=>{e=e.concat(t.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(t=>{e=e.concat(t.foldersRecursive())}),e}}class fh extends Gh{constructor(){super(),this._loggerContext="SETTINGS MANAGER"}static{this.webComponentName="settings-manager"}static setupWebComponent(){window.customElements.get(fh.webComponentName)||window.customElements.define(fh.webComponentName,fh)}static{this.styles=ut``}firstUpdated(){this.__addGui()}get events(){return this.appWcRef.eventsManager}get productSettings(){return this.appWcRef.productSettings}__addCameraSettingsGui(e){const t=this.productSettings.camera;e.addColor(t,"backgroundColor").name("Background Color").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"backgroundAlpha",0,1).name("Background Alpha").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"focalLength",10,300).name("Focal Length").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"nearClip",0,3).name("Near Clip").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"farClip",0,1e4).name("Far Clip").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"canPan").name("Can Pan").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"canZoom").name("Can Zoom").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"minDistance",0,100).name("Min Distance").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"maxDistance",0,100).name("Max Distance").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"infinitePolarAngle").name("Infinite Polar Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"minPolarAngle",0,6.25).step(.01).name("Min Polar Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"maxPolarAngle",0,6.25).step(.01).name("Max Polar Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"infiniteAzimuthAngle").name("Infinite Azimuth Angle").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"minAzimuthAngle",0,6.25).name("Min Azimuth Angle").step(.01).onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(t,"maxAzimuthAngle",0,6.25).name("Max Azimuth Angle").step(.01).onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),e.add(this,"setCurrentCameraAsInitial").name("Set Current Camera As Initial")}__addShadowTypeSettingsGui(e){e.add(this.productSettings.shadows,"shadowType",[lh.NONE,lh.ACCUMULATIVE,lh.CONTACT]).name("Shadow Type").onFinishChange(t=>{this.events.productSettingsShadowTypeUpdatedEvent.fire({shadowType:t})})}__addAcuumulativeShadowSettingsGui(e){const t=e.addFolder("Accumulative Shadow Settings"),i=this.productSettings.shadows.accumulativeShadows,s=i.shadowMaterial;t.add(s,"opacity",0,1).name("Opacity").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.add(s,"alphaTest",0,1).name("Alpha Test").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.addColor(s,"color").name("Color").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.add(s,"blend",0,40).name("Blend").onFinishChange(()=>{this.events.productSettingUpdatedEvent.fire()}),t.add(i.shadowParams,"frames",2,100,1).name("Frames").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.add(i.shadowParams,"scale",.5,30).name("Scale").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.add(i.shadowParams,"radius",.1,5).name("Radius").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.add(i.shadowParams,"ambient",0,1).name("Ambient").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire());const l=t.addFolder("Light Direction");l.add(i.light.direction,"x",-10,10).name("X").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),l.add(i.light.direction,"y",-10,10).name("Y").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),l.add(i.light.direction,"z",-10,10).name("Z").onFinishChange(()=>this.events.productSettingUpdatedEvent.fire()),t.close()}__addContactShadowSettingsGui(e){const t=e.addFolder("Contact Shadow Settings"),i=this.productSettings.shadows.contactShadows;t.add(i,"planeLength",0,20).name("Plane Length").onFinishChange(s=>{i.planeLength=s,this.events.productSettingUpdatedEvent.fire()}),t.add(i,"planeWidth",0,20).name("Plane Width").onFinishChange(s=>{i.planeWidth=s,this.events.productSettingUpdatedEvent.fire()}),t.add(i,"cameraHeight",0,20).name("Camera Height").onFinishChange(s=>{i.cameraHeight=s,this.events.productSettingUpdatedEvent.fire()}),t.add(i,"intensity",0,3).name("Intensity").onFinishChange(s=>{i.intensity=s,this.events.productSettingUpdatedEvent.fire()}),t.add(i,"softness",0,3).name("Softness").onFinishChange(s=>{i.softness=s,this.events.productSettingUpdatedEvent.fire()}),t.close()}__addGui(){this.gui=new Ly({autoPlace:!1,container:this.appWcRef.appUiContainerElemRef,injectStyles:!1,title:"Experience Settings"}),this.gui.add(this,"saveSettings").name("Save Settings").$widget.classList.add("save-settings-button");const e=this.gui.addFolder("Camera");this.__addCameraSettingsGui(e),e.close();const t=this.gui.addFolder("Shadows");this.__addShadowTypeSettingsGui(t),this.__addAcuumulativeShadowSettingsGui(t),this.__addContactShadowSettingsGui(t),t.close()}setCurrentCameraAsInitial(){this.productSettings.camera.initial=this.appWcRef.cameraManager.getCurrentCameraTransforms()}saveSettings(){this.events.productSettingsSavedEvent.fire({updatedSettings:this.productSettings.asJson()})}show(){this.gui?.show()}hide(){this.gui?.hide()}connectedCallback(){super.connectedCallback(),this.show()}disconnectedCallback(){this.hide(),super.disconnectedCallback()}}var n8=Object.defineProperty,dt=(o,e,t,i)=>{for(var s=void 0,l=o.length-1,u;l>=0;l--)(u=o[l])&&(s=u(e,t,s)||s);return s&&n8(e,t,s),s},ao=(o=>(o.NONE="",o.SKU="sku",o.SHOPIFY_VARIANT_ID="shopify_variant_id",o.ASIN="asin",o.UPC="upc",o.EXPERIENCE_ID="experience_id",o.PRODUCT_VARIANT_UUID="product_variant_uuid",o))(ao||{});const ht=class qu extends tR{constructor(){super(window.__APP_VERSION__,Yu.DEVELOPMENT),this.epigraphWebsiteRedirectUrls={icon:"https://www.epigraph.us",modal:"https://www.epigraph.us"},this.sessionState="default",this.isAppReady=!1,this.sku=Jt.sku.defaultValue.toString(),this.shopify_variant_id=Jt.shopifyVariantId.defaultValue.toString(),this.upc=Jt.upc.defaultValue.toString(),this.asin=Jt.asin.defaultValue.toString(),this.experience_id=Jt.experienceId.defaultValue.toString(),this.product_variant_uuid=Jt.productVariantUuid.defaultValue.toString(),this.customVersionId="",this.gaMeasurementId="",this.modalView=!1,this.hide=!1,this.isLoading=!0,this.apiMode="production",this.debug=!1,this.showSettings=!1,this.dimensionsUnit=Jt.dimensionsUnit.defaultValue.toString(),this.dimensionsUnitSymbol=Jt.dimensionsUnitSymbol.defaultValue.toString(),this.areDimensionsActive=!1,this.areHotspotsActive=!1,this.isHelpVisible=!1,this.baseUrlOverride=Jt.baseUrlOverride.defaultValue.toString(),this.isPortraitOrientation=!1,this.didARAutoLaunch=!1,this.transparentBackground=!1,this.hideUi=!1,this.playInteractionPrompt=!1,this.featuresToEnable={viewer:!0,hotspots:!0,dimensions:!0,viewInYourSpace:!0,help:!0,sceneManager:!0},this._hasActiveHotspot=!1,this._isToolsetLargerThanTheLeftBottomQuadrant=!1,this._loadingProgress=0,this._loadTimeBegin=performance.now(),this._loggerContext="EPIGRAPH THREED CODE",this._epigraphAnalytics=new uR(null,null),this._identifier="",this._identifierType="",this._isDevEnv=!1,this._isStagingEnv=!1,this._productSettings=new jQ,this._boundingSphereCenter=new se,this._loaders=new hh,this._activeAnimations=new Map,this._animationFadeDurationInMiliseconds=1e3,this._isSceneInteractedWith=!1,this.__glbBlobUrl="",this.__usdzBlobUrl="",this.__hasSceneChanged=!1,this.__canvasSize={width:0,height:0},this.__viewStateGrid=new lC(40,190,0,12829635)}static{this.webComponentName="epigraph-threed-core"}static setupWebComponent(){window.customElements.get(qu.webComponentName)||window.customElements.define(qu.webComponentName,qu)}static{this.styles=[ut`
8522
8522
  :host {
8523
8523
  all: initial;
8524
8524
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epigraph/solutions",
3
- "version": "1.0.14-alpha",
3
+ "version": "1.0.14-alpha.1",
4
4
  "type": "module",
5
5
  "main": "./dist/epigraph-solutions.js",
6
6
  "files": [