1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[58833],{3362(i,e,t){t.d(e,{A:()=>l});var s=t(4335),n=t(6647);class l extends s.A{async init(){await (0,n.X)(),await this.initViewer()}async initViewer(){this.setReady(!1),this.canvas=this.el,this.canvas.tabIndex=0,void 0==this.dive&&(this.dive=await window.DIVEQuickViewPlugin.QuickView(this.options.modelUrl,{autoStart:!1,canvas:this.canvas})),this.$emitter.publish("Viewer/initViewer")}startRendering(){this.rendering||(this.rendering=!0,this.dive?.start(),this.canvas?.parentElement?.classList.add("spatial-canvas-rendering"),this.ready&&this.canvas?.parentElement?.classList.add("spatial-canvas-display"),this.$emitter.publish("Viewer/startRendering"))}stopRendering(){this.rendering=!1,this.dive?.stop(),this.canvas?.parentElement?.classList.remove("spatial-canvas-rendering"),this.$emitter.publish("Viewer/stopRendering")}setReady(i){this.ready!==i&&(this.ready=i,this.onReady(i))}onReady(i){void 0!=this.canvas&&(i?(this.$emitter.publish("Viewer/ready"),this.canvas.parentElement?.classList.add("spatial-canvas-ready"),this.rendering&&this.canvas.parentElement?.classList.add("spatial-canvas-display")):(this.$emitter.publish("Viewer/notReady"),this.canvas.parentElement?.classList.remove("spatial-canvas-ready"),this.canvas.parentElement?.classList.remove("spatial-canvas-display")))}constructor(...i){super(...i),this.rendering=!1,this.ready=!1}}},6647(i,e,t){t.d(e,{X:()=>s});async function s(){return(window.loadDiveUtil||(window.loadDiveUtil={promise:null}),window.DIVEClass||window.DIVEARPlugin||window.DIVEQuickViewPlugin)?Promise.resolve():(window.loadDiveUtil.promise||(window.loadDiveUtil.promise=new Promise(i=>{Promise.all([Promise.all([t.e(41359),t.e(50209)]).then(t.bind(t,209)),Promise.all([t.e(41359),t.e(12274),t.e(75197),t.e(93772)]).then(t.bind(t,3772)),Promise.all([t.e(41359),t.e(87411)]).then(t.bind(t,7411))]).then(e=>{let[t,s,n]=e;window.DIVEClass=t.DIVE,window.DIVEARPlugin=s,window.DIVEQuickViewPlugin=n,i()})})),window.loadDiveUtil.promise)}},8833(i,e,t){t.r(e),t.d(e,{default:()=>a});var s=t(3362);class n{static #i=this.options={zoomSliderPositionAttribute:"data-zoom-product-slider-position",gallerySliderSelector:".gallery-slider-row",zoomModalSelector:"[data-zoom-modal]",zoomModalActionsSelector:".zoom-modal-actions",zoomSliderDisabledClass:"gallery-slider-canvas-disabled"};constructor(i){if(this.plugin=i,!this.plugin.el)return;let e=this.plugin.el.closest(n.options.gallerySliderSelector);if(!e)return;let t=e.querySelector(n.options.zoomModalSelector);if(!t)return;this.zoomModalElement=t,this.zoomModalPlugin=window.PluginManager.getPluginInstanceFromElement(this.zoomModalElement,"ZoomModal"),this.zoomModalPlugin.$emitter.subscribe("initSlider",()=>{this.plugin.initViewer()})}initViewer(){this.sliderPlugin=this.zoomModalPlugin.gallerySliderPlugin,this.tnsSlider=this.sliderPlugin?._slider,(this.tnsSlider?.getInfo().index??0)==this.plugin.sliderIndex&&(this.changeZoomActionsVisibility(!1),this.plugin.startRendering()),this.initEventListeners()}initEventListeners(){this.tnsSlider?.events.on("indexChanged",this.indexChangedEvent.bind(this)),this.sliderPlugin?.$emitter.subscribe("rebuild",this.rebuildEvent.bind(this))}rebuildEvent(i){this.plugin.setReady(!1),this.plugin.el=i.target.querySelector(`[${n.options.zoomSliderPositionAttribute}="${this.plugin.sliderIndex}"]`),this.initViewer(),this.plugin.initViewer()}indexChangedEvent(i){this.plugin.sliderIndex==i.index?setTimeout(()=>{this.plugin.sliderIndex==this.tnsSlider.getInfo().index&&(this.changeZoomActionsVisibility(!1),this.plugin.startRendering())},500):(this.changeZoomActionsVisibility(!0),this.plugin.stopRendering())}changeZoomActionsVisibility(i){let e=document.querySelector(n.options.zoomModalActionsSelector);i?e?.classList.remove("d-none"):e?.classList.add("d-none")}removeDisabled(){this.plugin.el?.parentElement?.parentElement?.classList.remove(n.options.zoomSliderDisabledClass)}}var l=t(6647);class a extends s.A{async init(){let i=document.querySelector(".zoom-modal-wrapper"),e=i?.querySelector(".zoom-modal");e?.addEventListener("shown.bs.modal",()=>{this.dive?.start()}),e?.addEventListener("hidden.bs.modal",()=>{this.dive?.stop()}),await (0,l.X)(),this.el&&(this.sliderIndex=Number(this.options.sliderPosition),this.SpatialZoomGallerySliderRenderUtil=new n(this),this.SpatialZoomGallerySliderRenderUtil.removeDisabled(),await this.initViewer())}async initViewer(){try{await super.initViewer()}catch(i){this.el?.parentElement?.parentElement?.classList.add("gallery-slider-canvas-disabled")}finally{this.setReady(!0),this.SpatialZoomGallerySliderRenderUtil?.initViewer()}}}}}]);
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.