1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[43177],{3177(t,r,e){e.r(r),e.d(r,{default:()=>n});var o=e(4335),s=e(6647);class n extends o.A{async init(){await (0,s.X)(),this.arSystem=new window.DIVEARPlugin.ARSystem,this.modelUrl=this.options.modelUrl,this.spatialArId=this.options.spatialArId,this.modelUrl&&(this.onReady(),this.el.addEventListener("click",()=>{this.startARViewAsync()}))}async startARViewAsync(){let t=this.el.querySelector("#ar-button-text"),r=this.autostartArModalButton?.querySelector("#ar-btn-open-session-text");try{if(!this.arSystem)throw Error("ARSystem not loaded");if(this.launchingAR)return;this.launchingAR=!0,t&&(t.textContent=this.options.snippets.launchingArView),r&&(r.textContent=this.options.snippets.launchingArView),await this.arSystem.launch(this.modelUrl,{arPlacement:this.options.arPlacement??"horizontal",arScale:"auto"})}catch(t){this.handleError(this.spatialArId,t)}finally{t&&(t.textContent=this.options.snippets.openArView),r&&(r.textContent=this.options.snippets.openArView),this.launchingAR=!1}}_getLocationSearch(){return window.location.search}onReady(){this.el.classList.add("spatial-ar-ready");let t=new URLSearchParams(this._getLocationSearch());t.has("autostartAr")&&this.spatialArId&&t.get("autostartAr")===this.spatialArId&&(window.autostartingARView||(window.autostartingARView=!0,this.showARAutostartModal(this.spatialArId),this.startARViewAsync()))}handleError(t,r){if(!(r instanceof window.DIVEARPlugin.ARError)){console.error("spatial-ar-viewer-plugin.ts: Spatial AR Viewer Plugin error:",r);return}let e=this.getARUnsupportedModal(t);if(!e){console.error("spatial-ar-viewer-plugin.ts: Twig structure error: ARUnsupportedModalTemplate not found in document");return}let o=e.querySelector("#ar-qr-modal-error-reason"),s=e.querySelector("#ar-qr-modal-error-solution");o||console.error('spatial-ar-viewer-plugin.ts: Twig structure error: "#ar-qr-modal-error-reason not found in ARUnsupportedModalTemplate'),s||console.error('spatial-ar-viewer-plugin.ts: Twig structure error: "#ar-qr-modal-error-solution not found in ARUnsupportedModalTemplate'),o&&s&&(r instanceof window.DIVEARPlugin.ARDesktopPlatformError?(o.textContent=this.options.snippets.arErrors.desktopNotSupported.reason,s.textContent=this.options.snippets.arErrors.desktopNotSupported.solution,console.error("spatial-ar-viewer-plugin.ts:","ErrorType: "+r.type,"ErrorMessage: "+r.message)):r instanceof window.DIVEARPlugin.ARQuickLookNotSafariError?(o.textContent=this.options.snippets.arErrors.notSafariOnIOS.reason,s.textContent=this.options.snippets.arErrors.notSafariOnIOS.solution,console.error("spatial-ar-viewer-plugin.ts:","ErrorType: "+r.type,"ErrorMessage: "+r.message)):r instanceof window.DIVEARPlugin.ARQuickLookVersionMismatchError?(o.textContent=this.options.snippets.arErrors.IOSVersionMismatch.reason,s.textContent=this.options.snippets.arErrors.IOSVersionMismatch.solution,console.error("spatial-ar-viewer-plugin.ts:","ErrorType: "+r.type,"ErrorMessage: "+r.message)):r instanceof window.DIVEARPlugin.ARQuickLookUnknownError?(o.textContent=this.options.snippets.arErrors.unknownIOSError.reason,s.textContent=this.options.snippets.arErrors.unknownIOSError.solution,console.error("spatial-ar-viewer-plugin.ts:","ErrorType: "+r.type,"ErrorMessage: "+r.message)):(o.textContent=this.options.snippets.arErrors.unknownARError.reason,s.textContent=this.options.snippets.arErrors.unknownARError.solution,console.error("spatial-ar-viewer-plugin.ts: Unknown DIVEARPlugin error:","ErrorType: "+r.type,"ErrorMessage: "+r.message)),this.showARUnsupportedModal(e))}showARUnsupportedModal(t){window.focusHandler.saveFocusState("spatial-ar-viewer");let r=()=>{window.focusHandler.resumeFocusState("spatial-ar-viewer"),e._element.removeEventListener("hidden.bs.modal",r)},e=new bootstrap.Modal(t);e._element.addEventListener("hidden.bs.modal",r),e.show()}getARUnsupportedModal(t){let r;return r=t?document.querySelector(`.ar-qr-modal [data-ar-model-id='${t}']`)?.closest(".ar-qr-modal"):document.querySelector(".ar-qr-modal"),r?.closest("body")?.appendChild(r),r}showARAutostartModal(t){let r=document.querySelector(".ar-qr-modal-open-session");if(!r)return;let e=r.querySelector(`[data-modal-open-ar-session-autostart='${t}']`);e&&(this.autostartArModalButton=e,this.autostartArModalButton.addEventListener("click",()=>{this.startARViewAsync()}),r.closest("body")?.appendChild(r),new bootstrap.Modal(r).show())}constructor(...t){super(...t),this.autostartArModalButton=null,this.arSystem=null,this.launchingAR=!1,this.modelUrl="",this.spatialArId=""}}},6647(t,r,e){e.d(r,{X:()=>o});async function o(){return(window.loadDiveUtil||(window.loadDiveUtil={promise:null}),window.DIVEClass||window.DIVEARPlugin||window.DIVEQuickViewPlugin)?Promise.resolve():(window.loadDiveUtil.promise||(window.loadDiveUtil.promise=new Promise(t=>{Promise.all([Promise.all([e.e(41359),e.e(50209)]).then(e.bind(e,209)),Promise.all([e.e(41359),e.e(12274),e.e(75197),e.e(93772)]).then(e.bind(e,3772)),Promise.all([e.e(41359),e.e(87411)]).then(e.bind(e,7411))]).then(r=>{let[e,o,s]=r;window.DIVEClass=e.DIVE,window.DIVEARPlugin=o,window.DIVEQuickViewPlugin=s,t()})})),window.loadDiveUtil.promise)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.