@realsee/dnalogel 2.3.0 → 2.3.2
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.
- package/dist/index.cjs.js +14 -14
- package/dist/index.js +118 -117
- package/dist/index.umd.js +14 -14
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +16 -16
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoTagPluginController.html +39 -39
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +12 -12
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/LinkType.html +7 -7
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +4 -4
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/ContentTypeMap.html +12 -12
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/LineJson.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +8 -8
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/OpenParameter.html +7 -7
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
- package/docs/interfaces/PanoMeasureParameterType.html +11 -11
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/PointJson.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeyArray.html +5 -5
- package/docs/types/Create3DDomContainerReturnType.html +5 -5
- package/docs/types/Create3DElementReturnType.html +5 -5
- package/docs/types/CruisePluginExportType.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/HelperEventMap.html +5 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.html +5 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
- package/docs/types/MoveArgs.html +5 -5
- package/docs/types/MoveOpts.html +5 -5
- package/docs/types/Object3DHelperEventMap.html +5 -5
- package/docs/types/ObjectFit.html +5 -5
- package/docs/types/PaintBrushEventMap.html +5 -5
- package/docs/types/PanoCompassPluginData.html +5 -5
- package/docs/types/PanoCompassPluginExportType.html +5 -5
- package/docs/types/PanoCompassPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
- package/docs/types/PanoMeasurePluginEvent.html +5 -5
- package/docs/types/PanoMeasureReturnType.html +5 -5
- package/docs/types/PanoSpatialTagPluginId.html +5 -5
- package/docs/types/PanoTagPluginExportInterface.html +5 -5
- package/docs/types/PanoTagPluginParamsInterface.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/Position.html +5 -5
- package/docs/types/RotateArgs.html +5 -5
- package/docs/types/RotateOpts.html +5 -5
- package/docs/types/RuleLabelsKey.html +5 -5
- package/docs/types/RuleLabelsValue.html +5 -5
- package/docs/types/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
- package/docs/variables/PLUGIN.html +5 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
- package/docs/variables/ROOM_TYPE_MAP.html +5 -5
- package/docs/variables/VERSION.html +5 -5
- package/docs/variables/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/CSS3DRenderPlugin/utils/generateBehindFiveElement.js +1 -0
- package/libs/PanoDoorLabelPlugin/Controller.js +1 -1
- package/package.json +14 -15
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var cl=Object.defineProperty,ul=Object.defineProperties;var dl=Object.getOwnPropertyDescriptors;var go=Object.getOwnPropertySymbols;var fl=Object.prototype.hasOwnProperty,hl=Object.prototype.propertyIsEnumerable;var hi=(i,t,e)=>t in i?cl(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,N=(i,t)=>{for(var e in t||(t={}))fl.call(t,e)&&hi(i,e,t[e]);if(go)for(var e of go(t))hl.call(t,e)&&hi(i,e,t[e]);return i},fe=(i,t)=>ul(i,dl(t));var h=(i,t,e)=>(hi(i,typeof t!="symbol"?t+"":t,e),e);var J=(i,t,e)=>new Promise((n,o)=>{var s=l=>{try{a(e.next(l))}catch(c){o(c)}},r=l=>{try{a(e.throw(l))}catch(c){o(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,r);a((e=e.apply(i,t)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Gn=require("@tweenjs/tween.js"),be=require("@realsee/five"),F=require("three"),un=require("three/examples/jsm/renderers/CSS3DRenderer"),Or=require("@realsee/five/line"),Hr=require("three/examples/jsm/loaders/FBXLoader"),ml=require("hammerjs"),pl=require("classnames"),gl=require("polyline-normals"),Al=require("object-assign-deep"),vl=require("animejs"),Fr=require("swiper");require("swiper/css");require("swiper/css/autoplay");const Qt=i=>i&&typeof i=="object"&&"default"in i?i:{default:i};function Gr(i){if(i&&i.__esModule)return i;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const dn=Qt(Gn),ni=Gr(Gn),E=Gr(F),gn=Qt(ml),Ze=Qt(pl),bl=Qt(gl),
|
|
1
|
+
"use strict";var cl=Object.defineProperty,ul=Object.defineProperties;var dl=Object.getOwnPropertyDescriptors;var go=Object.getOwnPropertySymbols;var fl=Object.prototype.hasOwnProperty,hl=Object.prototype.propertyIsEnumerable;var hi=(i,t,e)=>t in i?cl(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,N=(i,t)=>{for(var e in t||(t={}))fl.call(t,e)&&hi(i,e,t[e]);if(go)for(var e of go(t))hl.call(t,e)&&hi(i,e,t[e]);return i},fe=(i,t)=>ul(i,dl(t));var h=(i,t,e)=>(hi(i,typeof t!="symbol"?t+"":t,e),e);var J=(i,t,e)=>new Promise((n,o)=>{var s=l=>{try{a(e.next(l))}catch(c){o(c)}},r=l=>{try{a(e.throw(l))}catch(c){o(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,r);a((e=e.apply(i,t)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Gn=require("@tweenjs/tween.js"),be=require("@realsee/five"),F=require("three"),un=require("three/examples/jsm/renderers/CSS3DRenderer"),Or=require("@realsee/five/line"),Hr=require("three/examples/jsm/loaders/FBXLoader"),ml=require("hammerjs"),pl=require("classnames"),gl=require("polyline-normals"),Al=require("object-assign-deep"),vl=require("animejs"),Fr=require("swiper");require("swiper/css");require("swiper/css/autoplay");const Qt=i=>i&&typeof i=="object"&&"default"in i?i:{default:i};function Gr(i){if(i&&i.__esModule)return i;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const dn=Qt(Gn),ni=Gr(Gn),E=Gr(F),gn=Qt(ml),Ze=Qt(pl),bl=Qt(gl),Lt=Qt(Al),Ao=Qt(vl),zi=Qt(Fr);function Nr(){}const vo=()=>Promise.resolve(),bo={__queue:Promise.resolve()};function yl(i=vo){bo.__queue=bo.__queue.then(i).catch(vo)}function vn(i,t,e){const n=i.x,o=i.y,s=Math.floor(n/t*1e4)/1e4,r=Math.floor(o/e*1e4)/1e4;return{x:s,y:r}}function mi(i,t,e){const{x:n,y:o}=i,s=n*t,r=o*e;return{x:s,y:r}}function bn(i){if(i.length<2)return{};const t=i.slice(-2),e=t[0],n={x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2};return{control:e,end:n}}function wl(i,t,e=Nr){new Promise(n=>{setTimeout(()=>{e(),n(!0)},t*i)})}const Cl=window,yo=window.requestAnimationFrame||Cl.webkitRequestAnimationFrame||(i=>setTimeout(i,16));function Rn(i,t=0){t<=0?yo(i):yo(()=>Rn(i,t-1))}function El(i,t,e,n=Gn.Easing.Linear.None){const o=new Gn.Tween(i).to(t,e).easing(n).start();function s(r){!o.update(r)||requestAnimationFrame(s)}return requestAnimationFrame(s),o}var it=(i=>(i.Drawline="Drawline",i.Undo="Undo",i.Exit="Exit",i))(it||{});const an=Symbol("$$PAINT_BRUSH_EVENT$$");function yn(i){return i[an]||(i[an]={}),i[an]}function Pl(i){i[an]||delete i[an]}class Il{hasListener(t){const e=yn(this);return e&&e[t]&&e[t].length>0}on(t,e,n){const o=yn(this);return o[t]||(o[t]=[]),o[t].push([e,n||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){Pl(this);return}const n=yn(this);if(n[t]||(n[t]=[]),e===void 0){n[t].length=0;return}let o=0;for(;o<n[t].length&&n[t][o][0]!==e;o++);o<n[t].length&&n[t].splice(o,1)}emit(t,...e){let n=!1;const s=yn(this)[t]||[];for(let r of s.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(n=!0)}return n}}function ut(){return((1+Math.random())*65536|0).toString(16).substring(1)}function He(){return(ut()+ut()+"-"+ut()+"-4"+ut().substr(0,3)+"-"+ut()+"-"+ut()+ut()+ut()).toLowerCase()}const xl=`
|
|
2
2
|
<style type="text/css">
|
|
3
3
|
|
|
4
4
|
#_gl_paintBrush {
|
|
@@ -98,12 +98,12 @@ transition: all 500ms;
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
</style>
|
|
101
|
-
`;class kl extends Il{constructor(e){super();h(this,"configs");h(this,"clientWidth");h(this,"clientHeight");h(this,"ready",!1);h(this,"uuid",He());h(this,"tween");h(this,"tweening",!1);h(this,"container");h(this,"canvas");h(this,"data",{});h(this,"tempLine",{});this.configs=e,this.clientWidth=document.body.clientWidth,this.clientHeight=document.body.clientHeight,this.container=this.ifInsertToDOM(),this.canvas={},this.initCtrl()}get color(){return this.configs.currentColor}get state(){return this.data}get dpr(){return this.configs.DPR||1}ifInsertToDOM(){if(this.container)return this.container;if(this.configs.container)this.configs.container.id="_gl_paintBrush",this.container=this.configs.container;else if(document.getElementById("_gl_paintBrush"))this.container=document.getElementById("_gl_paintBrush");else{const e=document.createElement("div");e.id="_gl_paintBrush",document.body.appendChild(e),this.container=e}return this.container.innerHTML=xl,this.container}initCanvas(e){const n=document.createElement("canvas");n.className=e,n.width=this.clientWidth,n.height=this.clientHeight;const o=n.getContext("2d");if(!!o)return o.lineWidth=5*this.dpr,o.lineCap="round",o.lineJoin="round",this.container.appendChild(n),n}initCtrl(){const e=document.createElement("div");e.className="_paintBrush-ctrl";const n=document.createElement("div");n.className="_paintBrush-ctrlinner";const o=document.createElement("a");o.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--undo",o.addEventListener("click",a=>{var d;if(a.stopPropagation(),this.configs.onClickUndo&&this.configs.onClickUndo(),!this.canvas[this.uuid]||!this.data[this.uuid]||this.data[this.uuid].length===0)return;const l=this.data[this.uuid].pop();l&&this.emitStateChange({type:it.Undo,color:this.color,ready:this.ready,state:l,uuid:this.uuid});const c=(d=this.canvas[this.uuid])==null?void 0:d.getContext("2d");if(!this.canvas[this.uuid])return;const{width:u,height:f}=this.canvas[this.uuid];c&&c.clearRect(0,0,u,f),this.data[this.uuid].forEach(p=>this.handleDrawLine(this.uuid,p,{withUndo:!0}))});const s=document.createElement("a");return s.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--close",s.addEventListener("click",a=>{a.stopPropagation(),this.closeBrush(),this.configs.onClickClose&&this.configs.onClickClose()}),[o,s].forEach(a=>{const l=document.createElement("i");l.className="brush-icon";const c=document.createElement("span");c.className="brush-txt",c.innerText=a.className.endsWith("undo")?this.configs.onUndoText:this.configs.onExitText,a.appendChild(l),a.appendChild(c)}),n.appendChild(o),n.appendChild(s),e.appendChild(n),this.container.appendChild(e),e}openBrush(){if(this.ready)return;this.canvas[this.uuid]||(this.canvas[this.uuid]=this.initCanvas("_paintBrush-canvas")),this.container.className="brushing";const e=this.canvas[this.uuid];e.getContext("2d").clearRect(0,0,e.width,e.height),this.openBrushHandle(),this.ready=!0,this.emit("readyChange",!0)}closeBrush(){!this.ready||(this.container.className="",this.data={},this.tempLine={},Object.keys(this.canvas).forEach(e=>{this.canvas[e].ontouchstart=()=>!1,this.canvas[e].ontouchmove=()=>!1,this.canvas[e].ontouchend=()=>!1,this.canvas[e].ontouchcancel=()=>!1;const n=this.canvas[e].getContext("2d");n&&n.clearRect(0,0,this.canvas[e].width,this.canvas[e].height)}),this.ready=!1,this.emit("readyChange",!1),this.emitStateChange({type:it.Exit,color:this.color,ready:!1,uuid:this.uuid}))}updateCurrentColor(e){const n=this.canvas[this.uuid];if(!n)return;const o=n.getContext("2d");!o||(this.configs.currentColor=e,o.strokeStyle=e)}openBrushHandle(){const e=this.canvas[this.uuid];if(!e)return;const n=e.getContext("2d");if(!n)return;const o=this.color||"#6D92FF";n.strokeStyle=o;let s=null,r=[],a,l=[],c=0;const u=(f,d,p)=>{const m=this.color||"#ff0000";n.strokeStyle=m,n.beginPath(),n.moveTo(f.x,f.y),n.quadraticCurveTo(d.x,d.y,p.x,p.y),n.stroke()};e.onmousedown=f=>{f.preventDefault(),c=Date.now();const d=f.clientX,p=f.clientY;r=[],r.push({x:d,y:p}),s={x:d,y:p},a=vn({x:d,y:p},this.clientWidth,this.clientHeight),l=[]},e.onmousemove=f=>{if(f.preventDefault(),!s)return;const d=Number(f.clientX),p=Number(f.clientY);if(Math.abs(d-s.x)<5&&Math.abs(p-s.y)<5||(r.push({x:d,y:p}),l.push(vn({x:d,y:p},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:m,end:g}=bn(r);!m||!g||(u(s,m,g),s=g)},e.onmouseup=f=>{if(f.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const d=Date.now()-c,p={move:Object.assign({},a),uuid:this.uuid,line:[...l],color:this.color,duration:d<1280?d:d<2e3?1280:0};this.data[this.uuid].push(p),Rn(()=>{this.emitStateChange({type:it.Drawline,color:this.color,ready:this.ready,state:p,uuid:this.uuid})})},e.ontouchstart=f=>{f.preventDefault(),c=Date.now();const d=f.touches[0].clientX,p=f.touches[0].clientY;r=[],r.push({x:d,y:p}),s={x:d,y:p},console.log("ontouchstart",d,p,s),a=vn({x:d,y:p},this.clientWidth,this.clientHeight),l=[]},e.ontouchmove=f=>{if(f.preventDefault(),!s)return;const d=Number(f.touches[0].clientX),p=Number(f.touches[0].clientY);if(Math.abs(d-s.x)<5&&Math.abs(p-s.y)<5||(r.push({x:d,y:p}),l.push(vn({x:d,y:p},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:m,end:g}=bn(r);!m||!g||(u(s,m,g),s=g)},e.ontouchend=e.ontouchcancel=f=>{if(f.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const d=Date.now()-c,p={move:Object.assign({},a),line:[...l],uuid:this.uuid,color:this.color,duration:d<1280?d:d<2e3?1280:0};this.data[this.uuid].push(p),Rn(()=>{this.emitStateChange({type:it.Drawline,color:this.color,ready:this.ready,state:p,uuid:this.uuid})})}}emitStateChange(e,n=!0){if(e.type!==it.Drawline){this.emit("stateChange",e,n);return}const o=Date.now(),s=e.state;if(!s||!s.line)return;const r=Math.ceil(s.line.length/100);for(let a=0;a<r;a++){const l={uuid:this.uuid,color:this.color,ready:this.ready,type:e.type,state:{uuid:this.uuid,move:s.move,duration:s.duration,color:this.color,line:s.line.slice(a*100,(a+1)*100)},timestamp:o,end:a===r-1};wl(a,20,()=>{this.emit("stateChange",l,n)})}}action(e){const{ready:n,type:o,uuid:s}=e;if(!n&&this.ready){this.closeBrush();return}if(n&&!this.ready){this.openBrush();return}if(!!this.ready)switch(o){case it.Drawline:const{state:r,timestamp:a,end:l}=e;if(!a||!r)return;this.tempLine[a]=[].concat(this.tempLine[a]||[],r.line),l&&(Object.assign(r,{line:this.tempLine[a]}),this.handleDrawLine(s,r,{},()=>delete this.tempLine[a]));break;case it.Undo:this.handleUndo(s);break}}handleDrawLine(e,n,{withUndo:o=!1},s=Nr){!n||Object.prototype.toString.call(n)!="[object Object]"||Object.keys(n).length===0||(console.log("handleDrawLine",n,n.line),yl(()=>new Promise(r=>{if(o||(this.canvas[e]||(this.canvas[e]=this.initCanvas("_paintBrush-canvas--sync")),this.data[e]||(this.data[e]=[]),this.data[e].push(n)),!this.canvas[e])return;const a=this.canvas[e].getContext("2d");if(!a)return;const{line:l=[],color:c="black",duration:u=0,uuid:f}=n,d=mi(n.move||{},this.clientWidth,this.clientHeight);let p=[d];if(a.strokeStyle=c,a.beginPath(),a.moveTo(d.x,d.y),u&&!o){let m=[];const g=this;g.tween=El({step:0},{step:l.length-1},u).onUpdate(({step:A})=>{var C;if(g.tweening=!0,!g.ready)return a.clearRect(0,0,g.canvas[f].width,g.canvas[f].height),(C=g.tween)==null?void 0:C.stop();const v=Math.floor(A);if(!m.find(w=>w===v)){if(m.push(v),console.log("__debug__",l,l[v],v),p.push(mi(l[v],g.clientWidth,g.clientHeight)),p.length<3)return;const{control:w,end:x}=bn(p);if(!w||!x)return;a.quadraticCurveTo(w.x,w.y,x.x,x.y),a.stroke()}}).onComplete(A=>{g.tween=void 0,g.tweening=!1,m=[],p=[],s&&s(),r()})}else{for(let m=0;m<l.length;m++){if(p.push(mi(l[m],this.clientWidth,this.clientHeight)),p.length<3)continue;const{control:g,end:A}=bn(p);!g||!A||a.quadraticCurveTo(g.x,g.y,A.x,A.y)}a.stroke(),p=[],s&&s(),r()}})))}handleUndo(e){if(console.log("handleUndo",e,this.canvas[e]),!this.canvas[e]||!this.data[e]||this.data[e].length===0)return;this.data[e].pop();const n=()=>{var s;const o=(s=this.canvas[e])==null?void 0:s.getContext("2d");o&&o.clearRect(0,0,this.canvas[e].width,this.canvas[e].height),this.data[e].forEach(r=>this.handleDrawLine(e,r,{withUndo:!0}))};if(this.tween&&this.tweening){this.tween.stop(),Rn(n,60);return}n()}destroyBrush(){this.closeBrush(),this.ready=!1,this.emit("readyChange",!0)}}class Dl{constructor(t={}){h(this,"controller");const e=Object.assign({currentColor:"#f44336",onUndoText:"\u56DE\u9000",onExitText:"\u5173\u95ED"},t);this.controller=new kl(e)}on(t,e){this.controller.on(t,e)}off(t,e){this.controller.off(t,e)}once(t,e){this.controller.once(t,e)}show(){this.controller.openBrush()}action(t){this.controller.action(t)}get state(){return this.controller.state}get configs(){return this.controller.configs}dispose(){return this.controller.destroyBrush()}setCurrentColor(t){this.controller.updateCurrentColor(t)}}const Ll=(i,t)=>{let e=!0,n=null;const s=N(N({},{lookAtCurrentCamera:!1,lockedPanoIndex:null,lockedLatitude:null,lockedLongitude:null}),t==null?void 0:t.config),r=new E.Scene,a=new be.Camera(60);let l=new E.Object3D,c,u;{const y=new E.DirectionalLight(16777215,.5);y.position.copy(new E.Vector3(1,1,1)),r.add(y)}{const y=new E.DirectionalLight(16777215,.3);r.add(y)}{const y=new E.AmbientLight(16777215,.3);r.add(y)}r.add(l);const f=()=>{if(!!i.renderer)return n||(n=new E.WebGLRenderer({antialias:!1,alpha:!0}),n.setPixelRatio(i.renderer.getPixelRatio()),n.outputEncoding=E.sRGBEncoding,n.setClearColor(1579548,0),n.autoClear=!0),n},d=()=>{l.traverse(y=>{y instanceof E.Mesh&&[].concat(y.material).forEach(P=>P.dispose())}),r.remove(l),l=new E.Object3D,r.add(l),C()},p=()=>{c=A(i.model,a.fov,a.aspect),u=i.model.bounding.getCenter(new E.Vector3);function y(P){const j=P.clone();return j.uniforms.modelAlpha.value=1,j.uniforms.map.value&&(j.uniforms.map.value.needsUpdate=!0),j}function L(P){if(P instanceof E.Mesh){const j=P.geometry,B=Array.isArray(P.material)?P.material.map(y):y(P.material);return new E.Mesh(j,B)}else if(P instanceof E.Group){const j=new E.Group;return P.children.forEach(B=>j.add(L(B))),j}else{const j=new E.Object3D;return P.children.forEach(B=>j.add(L(B))),j}}r.remove(l),l=L(i.model),r.add(l),C()},m=(y,L={})=>{const P=f();if(!P)return;y.appendChild(P.domElement),g(L);const j=window.getComputedStyle(y).position;j!=="relative"&&j!=="absolute"&&j!=="fixed"&&j!=="sticky"&&(y.style.position="relative")},g=(y={})=>{if(!n)return;const P=n.domElement.parentNode;if(P!=null&&P.nodeName){const{width:j=P.offsetWidth,height:B=P.offsetHeight}=y;n.setSize(j,B),a.aspect=j/B,a.updateProjectionMatrix()}C()};function A(y,L,P){const j=y.bounding,B=Math.pow(Math.pow(j.max.x-j.min.x+1,2)+Math.pow(j.max.y-j.min.y+1,2)+Math.pow(j.max.z-j.min.z+1,2),1/2);let G=B/2/Math.tan(Math.PI*L/360);return P<1&&(G=G/P),isNaN(G)?B:G}function v(y){return i.work.observers[y].standingPosition.clone()}const C=()=>{if(!c||!u)return;const y=i.getPose();y.fov=a.fov,y.offset=u,y.distance=c,typeof s.lockedLatitude=="number"&&(y.latitude=s.lockedLatitude),typeof s.lockedLongitude=="number"&&(y.longitude=s.lockedLongitude),typeof s.lockedPanoIndex=="number"&&(y.offset=v(s.lockedPanoIndex)),s.lookAtCurrentCamera&&(y.offset=i.camera.position.clone().setY(i.camera.position.y+1)),a.setFromPose(y),e=!0},w=()=>{e!==!0||!n||!n.domElement.parentNode||n.domElement.parentNode.offsetWidth===0||(n.render(r,a),e=!1)},x=()=>{n&&n.dispose(),n=null},D=y=>{Object.assign(s,y),C()};return Object.assign(window,{camera:a}),i.on("modelLoaded",p),i.on("modelWillLoad",d),i.on("cameraDirectionUpdate",C),i.on("dispose",x),i.on("renderFrame",w),i.on("cameraPositionUpdate",C),{appendTo:m,refresh:g,changeConfigs:D}};function pt(...i){const t=[];return i.forEach(e=>{e.isCSS3DObjectPlus?t.push(e):t.push(...pt(...e.children))}),t}function Nn(i,t){const e=Math.round(i);return e%2===0?e:e+Number(t!=null&&t.floor?-1:1)}function Sl(i,t,e=!0){if(!i)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const n=()=>{const s=Nn(i.clientWidth,{floor:!0}),r=Nn(i.clientHeight,{floor:!0});t(s,r)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>n(),unobserve:()=>{}};const o=new ResizeObserver(n);return e&&n(),{observe:()=>o.observe(i),unobserve:()=>o.unobserve(i)}}class wo extends un.CSS3DRenderer{constructor(){super();h(this,"wrapper");h(this,"requestAnimationFrameId");h(this,"resizeDisoper");this.domElement.style.position="absolute",this.domElement.style.top="0",this.domElement.style.left="0",this.domElement.style.userSelect="none",this.domElement.style.pointerEvents="none"}setWrapper(e){if(!e)throw new Error("CSS3DRenderer: wrapper is required");if(e.contains(this.domElement))return;const n=this.wrapper;return n&&n.contains(this.domElement)&&this.domElement.remove(),this.appendToElement(e),this.wrapper=e,this}appendToElement(e){e.appendChild(this.domElement);const n=(r,a)=>this.setSize(r,a),{observe:o,unobserve:s}=Sl(e,n,!0);o(),this.resizeDisoper=s,this.wrapper=e}renderEveryFrame(e,n){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return console.warn("CSS3DRenderer: render is running");const o=()=>{this.requestAnimationFrameId=requestAnimationFrame(o),!!e.visible&&pt(e).length!==0&&this.render(e,n)};o()}stopRender(){this.requestAnimationFrameId&&cancelAnimationFrame(this.requestAnimationFrameId)}dispose(){var e;this.stopRender(),(e=this.resizeDisoper)==null||e.call(this),this.domElement.remove()}}function zl(i){return typeof Symbol=="undefined"?`$Symbol<${i}>$`:Symbol(i)}const ln=zl("$$EVENT$$");function wn(i){return i[ln]||(i[ln]={}),i[ln]}function Ml(i){i[ln]||delete i[ln]}class qt{hasListener(t){const e=wn(this);return Boolean((e==null?void 0:e[t])&&e[t].length>0)}on(t,e,n){const o=wn(this);return o[t]||(o[t]=[]),o[t].push([e,n||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){Ml(this);return}const n=wn(this);if(n[t]||(n[t]=[]),e===void 0){n[t].length=0;return}let o=0;for(;o<n[t].length&&n[t][o][0]!==e;o++);o<n[t].length&&n[t].splice(o,1)}emit(t,...e){let n=!1;const s=wn(this)[t]||[];for(let r of s.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(n=!0)}return n}}function Wr(...i){const t=new F.Vector3;return i.forEach(e=>{t.add(e)}),t.divideScalar(i.length),t}const Tl=({x:i,y:t,z:e})=>new F.Vector3(i,t,e),st=([i,t,e])=>new F.Vector3(i,t,e),fn=i=>i instanceof F.Vector3?i:Array.isArray(i)?st(i):Tl(i);class Bl extends E.Mesh{constructor(e,n){const o=new E.MeshBasicMaterial({opacity:0,color:0,transparent:!1,side:E.DoubleSide}),s=new E.PlaneGeometry(e,n);super(s,o);h(this,"name","opacity-mesh")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}const Xr=1,jl=`CSS3DObjectPlus@${Xr}`,Ql=.00216,Rl=.003;class Yr extends un.CSS3DObject{constructor(e){var D,y,L;const n=e.container,o=e.cornerPoints,s=(D=e.ratio)!=null?D:Rl,r=(y=e.dpr)!=null?y:1,a=(L=e.pointerEvents)!=null?L:"auto",l=Math.max(Ql,s),c=o[0].distanceTo(o[1]),u=o[1].distanceTo(o[2]),f=Nn(c/s*r),d=Nn(u/s*r),p=Wr(...o);let m;if(l===s)n.style.width=`${f}px`,n.style.height=`${d}px`,m=n;else{const P=document.createElement("div");P.style.width=`${f}px`,P.style.height=`${d}px`,P.style.pointerEvents="none";const j=s/l;n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.width=`${j*f}px`,n.style.height=`${j*d}px`,P.appendChild(n),m=P}super(m);h(this,"version",Xr);h(this,"isCSS3DObjectPlus",!0);h(this,"container");h(this,"width");h(this,"height");h(this,"domWidthPx");h(this,"domHeightPx");h(this,"cornerPoints");h(this,"centerPosition");h(this,"ratio");h(this,"mode","front");h(this,"hooks",new qt);h(this,"opacityMesh");h(this,"selfVisible",!0);h(this,"parentVisibleListenerDisposer");h(this,"createOpacityMesh",e=>{const{domWidthPx:n,domHeightPx:o}=e,s=new Bl(n,o);return s.position.copy(e.position),s.rotation.copy(e.rotation),s.scale.copy(e.scale),s});h(this,"addParentVisibleListener",()=>{var e;if((e=this.parent)!=null&&e.isCSS3DGroup){const n=this.parent,o=s=>{this.setVisible(s&&this.selfVisible,{setSelfVisible:!1})};n.hooks.on("visibleChange",o),this.parentVisibleListenerDisposer=()=>n.hooks.off("visibleChange",o)}});h(this,"removeParentVisibleListener",()=>{var e;(e=this.parentVisibleListenerDisposer)==null||e.call(this)});if(n.style.pointerEvents=a,this.scale.set(l,l,l),this.cornerPoints=o,this.ratio=s,this.container=n,e.mode&&(this.mode=e.mode),l===s)this.width=c,this.height=u,this.domWidthPx=f,this.domHeightPx=d,this.centerPosition=p;else{const P=s/l;this.width=P*c,this.height=P*u,this.domWidthPx=P*f,this.domHeightPx=P*d,this.centerPosition=new F.Vector3().subVectors(p,o[0]).multiplyScalar(P).add(o[0])}n.classList.add(`${jl}__container`);const g=new F.Vector3().subVectors(o[1],o[0]),A=new F.Vector3().subVectors(o[3],o[0]),v=new F.Vector3().crossVectors(g,A).normalize();this.lookAt(v);const C=this.up.clone().applyQuaternion(this.quaternion),w=A.clone(),x=new F.Vector3().crossVectors(C,w).normalize();this.rotateOnWorldAxis(x,C.angleTo(w)),this.position.copy(p),this.addEventListener("added",()=>{var P;this.mode==="front"&&((P=this.opacityMesh)==null||P.removeFromParent()),this.addParentVisibleListener()}),this.addEventListener("removed",()=>{var P;(P=this.opacityMesh)==null||P.removeFromParent(),this.removeParentVisibleListener()})}setVisible(e,n={setSelfVisible:!0}){n.setSelfVisible&&(this.selfVisible=e),this.visible=e,this.opacityMesh&&(this.opacityMesh.visible=e)}removeFromParent(){var n;const e=this.parent;return e!==null&&e.remove(this),(n=this.opacityMesh)==null||n.removeFromParent(),this}removeOpacityMesh(){var e;return(e=this.opacityMesh)==null||e.removeFromParent(),this.opacityMesh=void 0,this}dispose(){var e;this.container.remove(),this.removeFromParent(),(e=this.opacityMesh)==null||e.removeFromParent()}getOpacityMesh(){if(this.opacityMesh)return this.opacityMesh;{const e=this.createOpacityMesh(this);return this.opacityMesh=e,e}}applyMatrix4(e){var n;super.applyMatrix4(e),(n=this.opacityMesh)==null||n.applyMatrix4(e)}applyQuaternion(e){var n;return super.applyQuaternion(e),(n=this.opacityMesh)==null||n.applyQuaternion(e),this}applyScaleMatrix4(e){var n;this.scale.applyMatrix4(e),(n=this.opacityMesh)==null||n.scale.applyMatrix4(e)}}class Ol extends E.Scene{constructor(){super()}add(...t){return super.add(...t),pt(...t).forEach(e=>{e.mode="front"}),this}}class Hl extends E.Scene{constructor(e){super();h(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return super.add(...e),pt(...e).forEach(n=>{n.mode="behind",this.scene.add(n.getOpacityMesh())}),this}remove(...e){return pt(...e).forEach(n=>{var o;(o=n.opacityMesh)==null||o.removeFromParent()}),super.remove(...e),this}}class Ur extends E.Group{constructor(e){super();h(this,"isCSS3DGroup",!0);h(this,"mode");h(this,"CSS3DObjectLength",0);h(this,"hooks",new qt);this.mode=e}add(...e){return pt(...e).forEach(n=>{n.mode=this.mode}),super.add(...e),this.updateLength(),this}setVisible(e){this.visible=e,this.hooks.emit("visibleChange",e)}remove(...e){return super.remove(...e),this.updateLength(),this}updateLength(){this.CSS3DObjectLength=pt(this).length}}class Fl extends Ur{constructor(){super("front")}}class Gl extends Ur{constructor(e){super("behind");h(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return pt(...e).forEach(n=>{this.scene.add(n.getOpacityMesh())}),super.add(...e),this}}const Nl=3,Mi="CSS3DRenderer",on=`${Mi}@${Nl}`,Gt=()=>{console.error(`${on} is disposed`)},Ie={css3DObjects:[],frontModeStore:{css3DRenderer:new wo},behindModeStore:{css3DRenderer:new wo}};function Co(i){return Ie.css3DObjects.find(t=>t.id===i)}function Wl(i){Ie.frontModeStore.css3DRenderer.setWrapper(i)}function Xl(i){Ie.behindModeStore.css3DRenderer.setWrapper(i)}class Vt{constructor(t){h(this,"hooks",new qt);h(this,"state",{enabled:!0,visible:!0,disposed:!1});h(this,"_scene");h(this,"store",{frontModeGroup:new Fl});h(this,"create3DElement",(t,e,n)=>{if(this.state.disposed)return Gt();const o=(()=>{const w={ratio:.00216,devicePixelRatio:1,mode:"front",autoRender:!0,container:document.createElement("div"),pointerEvents:"none"};return Object.assign(w,n)})(),s=e.map(fn);if((s==null?void 0:s.length)<4)return console.error(`${on}: requires 4 point but params may have fewer`);const{ratio:r,devicePixelRatio:a,mode:l,autoRender:c,container:u,pointerEvents:f}=o,d=this.createObject(s,{ratio:r,dpr:a,container:u,mode:l,pointerEvents:f});Ie.css3DObjects.push(d),o.scene&&this.setScene(o.scene);const p=()=>{const w=d.mode==="front"?this.getFrontCSS3DObjectGroup():this.getBehindCSS3DObjectGroup();!w||w.add(d)},m=()=>{p(),this.render(t)},g=w=>this.setVisibleById(d.id,w),A=w=>this.setEnabledById(d.id,w),v=()=>(d.removeFromParent(),!0),C=l==="front"?Ie.frontModeStore.css3DRenderer:Ie.behindModeStore.css3DRenderer;return c&&m(),{id:d.uuid,container:u,css3DObject:d,render:c?void 0:m,show:()=>g(!0),hide:()=>g(!1),setVisible:g,enable:()=>A(!0),disable:()=>A(!1),setEnabled:A,dispose:v,appendToElement:w=>C.setWrapper(w)}});h(this,"setVisibleById",(t,e)=>{var n;(n=Co(t))==null||n.setVisible(e)});h(this,"setEnabledById",(t,e)=>{const n=Co(t);if(!n)return;const o=n.mode==="front"?this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}):this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1});!o||(e?o.add(n):o.remove(n))});h(this,"createObject",(t,e)=>{const n=new Yr(N({cornerPoints:t},e));return n.element.classList.add(`${Mi}__container`),n.element.id=`${Mi}__container--${n.uuid}`,n});t&&this.setScene(t)}get scene(){return this._scene||console.error("scene doesn't exist!, please call setScene(scene) first"),this._scene}static get frontModeCSS3DRenderer(){return Ie.frontModeStore.css3DRenderer}static get behindModeCSS3DRenderer(){return Ie.behindModeStore.css3DRenderer}get frontModeCSS3DRenderer(){return Ie.frontModeStore.css3DRenderer}get behindModeCSS3DRenderer(){return Ie.behindModeStore.css3DRenderer}setScene(t){this._scene=t}getCurrentState(){return this.state}setState(t,e={userAction:!0}){if(this.state.disposed)return Gt();const n=N({},this.state);this.state=Object.assign(this.state,t),n.visible!==this.state.visible&&(t.visible?this.handleShow():this.handleHide()),n.enabled!==this.state.enabled&&(t.enabled?this.handleEnable():this.handleDisable()),n.disposed!==this.state.disposed&&this.handleDispose(),this.hooks.emit("stateChange",{state:this.state,prevState:n,userAction:e.userAction})}dispose(){this.setState({disposed:!0}),this.hooks.emit("dispose")}show(){return J(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Gt();this.setState({visible:!0},{userAction:t}),this.hooks.emit("show",{userAction:t})})}hide(){return J(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Gt();this.setState({visible:!1},{userAction:t}),this.hooks.emit("hide",{userAction:t})})}enable({userAction:t}={userAction:!0}){if(this.state.disposed)return Gt();this.setState({enabled:!0},{userAction:t}),this.hooks.emit("enable",{userAction:t})}disable({userAction:t}={userAction:!0}){if(this.state.disposed)return Gt();this.setState({enabled:!1},{userAction:t}),this.hooks.emit("disable",{userAction:t})}getFrontCSS3DScene({createSceneIfNotExists:t=!1}={}){var n;const e=(n=Ie.frontModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const o=new Ol;Ie.frontModeStore.css3DScene=o}return Ie.frontModeStore.css3DScene}getBehindCSS3DScene({createSceneIfNotExists:t=!1}={}){var n,o;const e=(n=Ie.behindModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const s=(o=Ie.behindModeStore.scene)!=null?o:this.scene;if(!s){console.error(`${on}: scene is required when mode is behind`);return}const r=new Hl(s);Ie.behindModeStore.css3DScene=r,Ie.behindModeStore.scene=s}return Ie.behindModeStore.css3DScene}getFrontCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){const e=this.getFrontCSS3DScene({createSceneIfNotExists:t});return t&&e&&(e.getObjectById(this.store.frontModeGroup.id)||e.add(this.store.frontModeGroup)),this.store.frontModeGroup}getBehindCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){var n;const e=this.getBehindCSS3DScene({createSceneIfNotExists:t});if(t&&e&&this.scene){const o=(n=this.store.behindModeGroup)!=null?n:new Gl(this.scene);this.store.behindModeGroup=o,e.getObjectById(o.id)||e.add(o)}return this.store.behindModeGroup}render(t){var e,n;if(this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}).CSS3DObjectLength>0){const o=this.getFrontCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${on}: css3DScene is required when mode is front`);Ie.frontModeStore.css3DRenderer.renderEveryFrame(o,t)}if(((n=(e=this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1}))==null?void 0:e.CSS3DObjectLength)!=null?n:0)>0){const o=this.getBehindCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${on}: css3DScene is required when mode is behind`);Ie.behindModeStore.css3DRenderer.renderEveryFrame(o,t)}}handleShow(){return J(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!0),(t=this.store.behindModeGroup)==null||t.setVisible(!0)})}handleHide(){return J(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!1),(t=this.store.behindModeGroup)==null||t.setVisible(!1)})}handleEnable(){var t,e;(t=this.getFrontCSS3DScene())==null||t.add(this.store.frontModeGroup),this.store.behindModeGroup&&((e=this.getBehindCSS3DScene())==null||e.add(this.store.behindModeGroup))}handleDisable(){var t,e,n;this.store.frontModeGroup.children.forEach(o=>{o instanceof un.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)}),(t=this.store.behindModeGroup)==null||t.children.forEach(o=>{o instanceof un.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)}),(e=this.getFrontCSS3DScene())==null||e.remove(this.store.frontModeGroup),this.store.behindModeGroup&&((n=this.getBehindCSS3DScene())==null||n.remove(this.store.behindModeGroup))}handleDispose(){this.handleDisable()}}h(Vt,"setFrontModeContainer",Wl),h(Vt,"setBehindModeContainer",Xl);function Vr(i){return J(this,null,function*(){return new Promise(t=>{var e;if((e=i.model)!=null&&e.loaded){t();return}else i.once("modelLoaded",()=>t())})})}const Mt=document.createElement("div");Mt.style.position="absolute";Mt.style.top="0";Mt.style.left="0";Mt.style.width="100%";Mt.style.height="100%";function Jr(i){var e,n;const t=(n=Eo(i.getElement()))!=null?n:Eo((e=i.getElement())==null?void 0:e.parentElement);if(t!=null&&t.parentElement)return t.parentElement.insertBefore(Mt,t),Mt;console.error("Can not find a valid element to insert behindFiveElement. How to fix it: https://github.com/realsee-developer/dnalogel/blob/main/plugins/src/PanoTagPlugin/README.md")}function Eo(i){var o;if(!i)return;const t=(o=i.style.position)!=null?o:getComputedStyle(i).position;if(t!=="fixed"&&t!=="absolute"&&t!=="relative")return;const e=getComputedStyle(i).backgroundColor;if(!(e!=="transparent"&&e!=="rgba(0, 0, 0, 0)"))return i}const Yl="v2.0.1",pi=`CSS3DRenderPlugin@${Yl}`;class Ul extends Vt{constructor(e){super();h(this,"five");h(this,"behindFiveContainer");h(this,"staticPrefix","//vrlab-static.ljcdn.com");h(this,"create3DDomContainer",(e,n)=>{if(this.state.disposed)return;const o=(()=>{var f;(n==null?void 0:n.dpr)!==void 0&&console.warn(`${pi}: please use "config.devicePixelRatio" replace "config.dpr"`);const u={ratio:.00216,devicePixelRatio:(f=n==null?void 0:n.dpr)!=null?f:1,mode:"front",autoRender:!0};return Object.assign(u,n,(n==null?void 0:n.mode)==="behind"?{scene:this.five.scene}:void 0)})(),s=this.five.getElement();if(!s){console.error(`${pi}: five.getElement() is ${s}`);return}const{autoRender:r}=o;o.mode==="behind"&&o.behindFiveContainer&&(this.behindFiveContainer=o.behindFiveContainer);const a=this.create3DElement(this.five.camera,e,fe(N({},o),{autoRender:!1}));if(!a)return;const l=()=>{const u=a.css3DObject.mode==="front"?s.parentElement:this.getBehindFiveElement();if(!u)return console.error(`${pi}: wrapper is ${u}`);a.appendToElement(u),a.render()},c=()=>{a.css3DObject.mode==="front"&&l(),a.css3DObject.mode==="behind"&&Vr(this.five).then(()=>{l()})};return r&&c(),fe(N({},a),{render:r?void 0:c})});this.five=e}disposeAll(){return this.dispose()}setState(...e){const n=super.setState(...e);return this.five.needsRender=!0,n}getBehindFiveElement(){return this.behindFiveContainer?this.behindFiveContainer:(this.behindFiveContainer=Jr(this.five),this.behindFiveContainer)}}const Kt=i=>new Ul(i);function gi(i,t,e=new F.Vector3(1,1,1),n=!1){const o=new Or.Line(i,t);return o.setMaterial({dashed:n,color:e,linewidth:1}),o.remove(o.points),o}const Vl=i=>{const t={intersection:null,disposers:[]},e=u=>{t.intersection=u},n=()=>{t.intersection=null};i.on("modelLoaded",()=>{i.on("intersectionOnModelUpdate",e),i.on("intersectionHidden",n)}),i.on("dispose",()=>{i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)});const o=(u,f=2,d=.1)=>{const p=f/2,g=c(u,d),A=new F.Group;A.add(gi(new F.Vector3(g.x+p,g.y,g.z),new F.Vector3(g.x-p,g.y,g.z),new F.Vector3(1,0,0)),gi(new F.Vector3(g.x,g.y+p,g.z),new F.Vector3(g.x,g.y-p,g.z),new F.Vector3(0,1,0)),gi(new F.Vector3(g.x,g.y,g.z+p),new F.Vector3(g.x,g.y,g.z-p),new F.Vector3(0,0,1))),i.scene.add(A),i.needsRender=!0;const v=()=>{i.scene.remove(A)};return t.disposers.push(v),{clear:v,pointAxesHelperMesh:A}},s=(u,f=0)=>{var v,C;const d=(v=i==null?void 0:i.camera)==null?void 0:v.position;if(!d)return!1;const p=u.distanceTo(d),m=u.sub(d).normalize(),g=new F.Raycaster(d,m),A=(C=i.model.intersectRaycaster(g))==null?void 0:C[0];return!(A&&A.distance+f<p)},r=()=>t.intersection,a=()=>{var u,f;(f=(u=t.disposers)==null?void 0:u.forEach)==null||f.call(u,d=>d==null?void 0:d()),i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)},l=a,c=(u,f)=>{const d=u.clone();return i.camera.position.clone().sub(d).setLength(f).add(d)};return{intersection:r,pointAxesHelper:o,movePointTowardsCamera:c,destroy:a,dispose:l,canSeePoint:s}};function ee(){}const Jt=i=>i;function we(i,t){for(const e in t)i[e]=t[e];return i}function Zr(i){return i()}function Po(){return Object.create(null)}function rt(i){i.forEach(Zr)}function ii(i){return typeof i=="function"}function te(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let Cn;function et(i,t){return Cn||(Cn=document.createElement("a")),Cn.href=t,i===Cn.href}function Jl(i){return Object.keys(i).length===0}function Pt(i,t,e,n){if(i){const o=_r(i,t,e,n);return i[0](o)}}function _r(i,t,e,n){return i[1]&&n?we(e.ctx.slice(),i[1](n(t))):e.ctx}function It(i,t,e,n){if(i[2]&&n){const o=i[2](n(e));if(t.dirty===void 0)return o;if(typeof o=="object"){const s=[],r=Math.max(t.dirty.length,o.length);for(let a=0;a<r;a+=1)s[a]=t.dirty[a]|o[a];return s}return t.dirty|o}return t.dirty}function xt(i,t,e,n,o,s){if(o){const r=_r(t,e,n,s);i.p(r,o)}}function kt(i){if(i.ctx.length>32){const t=[],e=i.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function qr(i){const t={};for(const e in i)e[0]!=="$"&&(t[e]=i[e]);return t}function Wn(i,t){const e={};t=new Set(t);for(const n in i)!t.has(n)&&n[0]!=="$"&&(e[n]=i[n]);return e}function je(i){return i==null?"":i}const Kr=typeof window!="undefined";let $r=Kr?()=>window.performance.now():()=>Date.now(),Vi=Kr?i=>requestAnimationFrame(i):ee;const Ut=new Set;function ea(i){Ut.forEach(t=>{t.c(i)||(Ut.delete(t),t.f())}),Ut.size!==0&&Vi(ea)}function ta(i){let t;return Ut.size===0&&Vi(ea),{promise:new Promise(e=>{Ut.add(t={c:i,f:e})}),abort(){Ut.delete(t)}}}function O(i,t){i.appendChild(t)}function ae(i,t,e){const n=Ji(i);if(!n.getElementById(t)){const o=Q("style");o.id=t,o.textContent=e,na(n,o)}}function Ji(i){if(!i)return document;const t=i.getRootNode?i.getRootNode():i.ownerDocument;return t&&t.host?t:i.ownerDocument}function Zl(i){const t=Q("style");return na(Ji(i),t),t.sheet}function na(i,t){return O(i.head||i,t),t.sheet}function T(i,t,e){i.insertBefore(t,e||null)}function z(i){i.parentNode&&i.parentNode.removeChild(i)}function tt(i,t){for(let e=0;e<i.length;e+=1)i[e]&&i[e].d(t)}function Q(i){return document.createElement(i)}function Ae(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function ke(i){return document.createTextNode(i)}function Z(){return ke(" ")}function he(){return ke("")}function Pe(i,t,e,n){return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}function Zi(i){return function(t){return t.stopPropagation(),i.call(this,t)}}function b(i,t,e){e==null?i.removeAttribute(t):i.getAttribute(t)!==e&&i.setAttribute(t,e)}function Xn(i,t){const e=Object.getOwnPropertyDescriptors(i.__proto__);for(const n in t)t[n]==null?i.removeAttribute(n):n==="style"?i.style.cssText=t[n]:n==="__value"?i.value=i[n]=t[n]:e[n]&&e[n].set?i[n]=t[n]:b(i,n,t[n])}function _l(i){return Array.from(i.childNodes)}function Te(i,t){t=""+t,i.wholeText!==t&&(i.data=t)}function H(i,t,e,n){e===null?i.style.removeProperty(t):i.style.setProperty(t,e,n?"important":"")}let En;function ql(){if(En===void 0){En=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(i){En=!0}}return En}function vt(i,t){getComputedStyle(i).position==="static"&&(i.style.position="relative");const n=Q("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const o=ql();let s;return o?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=Pe(window,"message",r=>{r.source===n.contentWindow&&t()})):(n.src="about:blank",n.onload=()=>{s=Pe(n.contentWindow,"resize",t)}),O(i,n),()=>{(o||s&&n.contentWindow)&&s(),z(n)}}function _(i,t,e){i.classList[e?"add":"remove"](t)}function ia(i,t,{bubbles:e=!1,cancelable:n=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(i,e,n,t),o}class Yn{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.is_svg?this.e=Ae(e.nodeName):this.e=Q(e.nodeName),this.t=e,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)T(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(z)}}const Un=new Map;let Vn=0;function Kl(i){let t=5381,e=i.length;for(;e--;)t=(t<<5)-t^i.charCodeAt(e);return t>>>0}function $l(i,t){const e={stylesheet:Zl(t),rules:{}};return Un.set(i,e),e}function oa(i,t,e,n,o,s,r,a=0){const l=16.666/n;let c=`{
|
|
101
|
+
`;class kl extends Il{constructor(e){super();h(this,"configs");h(this,"clientWidth");h(this,"clientHeight");h(this,"ready",!1);h(this,"uuid",He());h(this,"tween");h(this,"tweening",!1);h(this,"container");h(this,"canvas");h(this,"data",{});h(this,"tempLine",{});this.configs=e,this.clientWidth=document.body.clientWidth,this.clientHeight=document.body.clientHeight,this.container=this.ifInsertToDOM(),this.canvas={},this.initCtrl()}get color(){return this.configs.currentColor}get state(){return this.data}get dpr(){return this.configs.DPR||1}ifInsertToDOM(){if(this.container)return this.container;if(this.configs.container)this.configs.container.id="_gl_paintBrush",this.container=this.configs.container;else if(document.getElementById("_gl_paintBrush"))this.container=document.getElementById("_gl_paintBrush");else{const e=document.createElement("div");e.id="_gl_paintBrush",document.body.appendChild(e),this.container=e}return this.container.innerHTML=xl,this.container}initCanvas(e){const n=document.createElement("canvas");n.className=e,n.width=this.clientWidth,n.height=this.clientHeight;const o=n.getContext("2d");if(!!o)return o.lineWidth=5*this.dpr,o.lineCap="round",o.lineJoin="round",this.container.appendChild(n),n}initCtrl(){const e=document.createElement("div");e.className="_paintBrush-ctrl";const n=document.createElement("div");n.className="_paintBrush-ctrlinner";const o=document.createElement("a");o.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--undo",o.addEventListener("click",a=>{var d;if(a.stopPropagation(),this.configs.onClickUndo&&this.configs.onClickUndo(),!this.canvas[this.uuid]||!this.data[this.uuid]||this.data[this.uuid].length===0)return;const l=this.data[this.uuid].pop();l&&this.emitStateChange({type:it.Undo,color:this.color,ready:this.ready,state:l,uuid:this.uuid});const c=(d=this.canvas[this.uuid])==null?void 0:d.getContext("2d");if(!this.canvas[this.uuid])return;const{width:u,height:f}=this.canvas[this.uuid];c&&c.clearRect(0,0,u,f),this.data[this.uuid].forEach(p=>this.handleDrawLine(this.uuid,p,{withUndo:!0}))});const s=document.createElement("a");return s.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--close",s.addEventListener("click",a=>{a.stopPropagation(),this.closeBrush(),this.configs.onClickClose&&this.configs.onClickClose()}),[o,s].forEach(a=>{const l=document.createElement("i");l.className="brush-icon";const c=document.createElement("span");c.className="brush-txt",c.innerText=a.className.endsWith("undo")?this.configs.onUndoText:this.configs.onExitText,a.appendChild(l),a.appendChild(c)}),n.appendChild(o),n.appendChild(s),e.appendChild(n),this.container.appendChild(e),e}openBrush(){if(this.ready)return;this.canvas[this.uuid]||(this.canvas[this.uuid]=this.initCanvas("_paintBrush-canvas")),this.container.className="brushing";const e=this.canvas[this.uuid];e.getContext("2d").clearRect(0,0,e.width,e.height),this.openBrushHandle(),this.ready=!0,this.emit("readyChange",!0)}closeBrush(){!this.ready||(this.container.className="",this.data={},this.tempLine={},Object.keys(this.canvas).forEach(e=>{this.canvas[e].ontouchstart=()=>!1,this.canvas[e].ontouchmove=()=>!1,this.canvas[e].ontouchend=()=>!1,this.canvas[e].ontouchcancel=()=>!1;const n=this.canvas[e].getContext("2d");n&&n.clearRect(0,0,this.canvas[e].width,this.canvas[e].height)}),this.ready=!1,this.emit("readyChange",!1),this.emitStateChange({type:it.Exit,color:this.color,ready:!1,uuid:this.uuid}))}updateCurrentColor(e){const n=this.canvas[this.uuid];if(!n)return;const o=n.getContext("2d");!o||(this.configs.currentColor=e,o.strokeStyle=e)}openBrushHandle(){const e=this.canvas[this.uuid];if(!e)return;const n=e.getContext("2d");if(!n)return;const o=this.color||"#6D92FF";n.strokeStyle=o;let s=null,r=[],a,l=[],c=0;const u=(f,d,p)=>{const m=this.color||"#ff0000";n.strokeStyle=m,n.beginPath(),n.moveTo(f.x,f.y),n.quadraticCurveTo(d.x,d.y,p.x,p.y),n.stroke()};e.onmousedown=f=>{f.preventDefault(),c=Date.now();const d=f.clientX,p=f.clientY;r=[],r.push({x:d,y:p}),s={x:d,y:p},a=vn({x:d,y:p},this.clientWidth,this.clientHeight),l=[]},e.onmousemove=f=>{if(f.preventDefault(),!s)return;const d=Number(f.clientX),p=Number(f.clientY);if(Math.abs(d-s.x)<5&&Math.abs(p-s.y)<5||(r.push({x:d,y:p}),l.push(vn({x:d,y:p},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:m,end:g}=bn(r);!m||!g||(u(s,m,g),s=g)},e.onmouseup=f=>{if(f.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const d=Date.now()-c,p={move:Object.assign({},a),uuid:this.uuid,line:[...l],color:this.color,duration:d<1280?d:d<2e3?1280:0};this.data[this.uuid].push(p),Rn(()=>{this.emitStateChange({type:it.Drawline,color:this.color,ready:this.ready,state:p,uuid:this.uuid})})},e.ontouchstart=f=>{f.preventDefault(),c=Date.now();const d=f.touches[0].clientX,p=f.touches[0].clientY;r=[],r.push({x:d,y:p}),s={x:d,y:p},console.log("ontouchstart",d,p,s),a=vn({x:d,y:p},this.clientWidth,this.clientHeight),l=[]},e.ontouchmove=f=>{if(f.preventDefault(),!s)return;const d=Number(f.touches[0].clientX),p=Number(f.touches[0].clientY);if(Math.abs(d-s.x)<5&&Math.abs(p-s.y)<5||(r.push({x:d,y:p}),l.push(vn({x:d,y:p},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:m,end:g}=bn(r);!m||!g||(u(s,m,g),s=g)},e.ontouchend=e.ontouchcancel=f=>{if(f.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const d=Date.now()-c,p={move:Object.assign({},a),line:[...l],uuid:this.uuid,color:this.color,duration:d<1280?d:d<2e3?1280:0};this.data[this.uuid].push(p),Rn(()=>{this.emitStateChange({type:it.Drawline,color:this.color,ready:this.ready,state:p,uuid:this.uuid})})}}emitStateChange(e,n=!0){if(e.type!==it.Drawline){this.emit("stateChange",e,n);return}const o=Date.now(),s=e.state;if(!s||!s.line)return;const r=Math.ceil(s.line.length/100);for(let a=0;a<r;a++){const l={uuid:this.uuid,color:this.color,ready:this.ready,type:e.type,state:{uuid:this.uuid,move:s.move,duration:s.duration,color:this.color,line:s.line.slice(a*100,(a+1)*100)},timestamp:o,end:a===r-1};wl(a,20,()=>{this.emit("stateChange",l,n)})}}action(e){const{ready:n,type:o,uuid:s}=e;if(!n&&this.ready){this.closeBrush();return}if(n&&!this.ready){this.openBrush();return}if(!!this.ready)switch(o){case it.Drawline:const{state:r,timestamp:a,end:l}=e;if(!a||!r)return;this.tempLine[a]=[].concat(this.tempLine[a]||[],r.line),l&&(Object.assign(r,{line:this.tempLine[a]}),this.handleDrawLine(s,r,{},()=>delete this.tempLine[a]));break;case it.Undo:this.handleUndo(s);break}}handleDrawLine(e,n,{withUndo:o=!1},s=Nr){!n||Object.prototype.toString.call(n)!="[object Object]"||Object.keys(n).length===0||(console.log("handleDrawLine",n,n.line),yl(()=>new Promise(r=>{if(o||(this.canvas[e]||(this.canvas[e]=this.initCanvas("_paintBrush-canvas--sync")),this.data[e]||(this.data[e]=[]),this.data[e].push(n)),!this.canvas[e])return;const a=this.canvas[e].getContext("2d");if(!a)return;const{line:l=[],color:c="black",duration:u=0,uuid:f}=n,d=mi(n.move||{},this.clientWidth,this.clientHeight);let p=[d];if(a.strokeStyle=c,a.beginPath(),a.moveTo(d.x,d.y),u&&!o){let m=[];const g=this;g.tween=El({step:0},{step:l.length-1},u).onUpdate(({step:A})=>{var C;if(g.tweening=!0,!g.ready)return a.clearRect(0,0,g.canvas[f].width,g.canvas[f].height),(C=g.tween)==null?void 0:C.stop();const v=Math.floor(A);if(!m.find(w=>w===v)){if(m.push(v),console.log("__debug__",l,l[v],v),p.push(mi(l[v],g.clientWidth,g.clientHeight)),p.length<3)return;const{control:w,end:x}=bn(p);if(!w||!x)return;a.quadraticCurveTo(w.x,w.y,x.x,x.y),a.stroke()}}).onComplete(A=>{g.tween=void 0,g.tweening=!1,m=[],p=[],s&&s(),r()})}else{for(let m=0;m<l.length;m++){if(p.push(mi(l[m],this.clientWidth,this.clientHeight)),p.length<3)continue;const{control:g,end:A}=bn(p);!g||!A||a.quadraticCurveTo(g.x,g.y,A.x,A.y)}a.stroke(),p=[],s&&s(),r()}})))}handleUndo(e){if(console.log("handleUndo",e,this.canvas[e]),!this.canvas[e]||!this.data[e]||this.data[e].length===0)return;this.data[e].pop();const n=()=>{var s;const o=(s=this.canvas[e])==null?void 0:s.getContext("2d");o&&o.clearRect(0,0,this.canvas[e].width,this.canvas[e].height),this.data[e].forEach(r=>this.handleDrawLine(e,r,{withUndo:!0}))};if(this.tween&&this.tweening){this.tween.stop(),Rn(n,60);return}n()}destroyBrush(){this.closeBrush(),this.ready=!1,this.emit("readyChange",!0)}}class Dl{constructor(t={}){h(this,"controller");const e=Object.assign({currentColor:"#f44336",onUndoText:"\u56DE\u9000",onExitText:"\u5173\u95ED"},t);this.controller=new kl(e)}on(t,e){this.controller.on(t,e)}off(t,e){this.controller.off(t,e)}once(t,e){this.controller.once(t,e)}show(){this.controller.openBrush()}action(t){this.controller.action(t)}get state(){return this.controller.state}get configs(){return this.controller.configs}dispose(){return this.controller.destroyBrush()}setCurrentColor(t){this.controller.updateCurrentColor(t)}}const Ll=(i,t)=>{let e=!0,n=null;const s=N(N({},{lookAtCurrentCamera:!1,lockedPanoIndex:null,lockedLatitude:null,lockedLongitude:null}),t==null?void 0:t.config),r=new E.Scene,a=new be.Camera(60);let l=new E.Object3D,c,u;{const y=new E.DirectionalLight(16777215,.5);y.position.copy(new E.Vector3(1,1,1)),r.add(y)}{const y=new E.DirectionalLight(16777215,.3);r.add(y)}{const y=new E.AmbientLight(16777215,.3);r.add(y)}r.add(l);const f=()=>{if(!!i.renderer)return n||(n=new E.WebGLRenderer({antialias:!1,alpha:!0}),n.setPixelRatio(i.renderer.getPixelRatio()),n.outputEncoding=E.sRGBEncoding,n.setClearColor(1579548,0),n.autoClear=!0),n},d=()=>{l.traverse(y=>{y instanceof E.Mesh&&[].concat(y.material).forEach(P=>P.dispose())}),r.remove(l),l=new E.Object3D,r.add(l),C()},p=()=>{c=A(i.model,a.fov,a.aspect),u=i.model.bounding.getCenter(new E.Vector3);function y(P){const j=P.clone();return j.uniforms.modelAlpha.value=1,j.uniforms.map.value&&(j.uniforms.map.value.needsUpdate=!0),j}function L(P){if(P instanceof E.Mesh){const j=P.geometry,B=Array.isArray(P.material)?P.material.map(y):y(P.material);return new E.Mesh(j,B)}else if(P instanceof E.Group){const j=new E.Group;return P.children.forEach(B=>j.add(L(B))),j}else{const j=new E.Object3D;return P.children.forEach(B=>j.add(L(B))),j}}r.remove(l),l=L(i.model),r.add(l),C()},m=(y,L={})=>{const P=f();if(!P)return;y.appendChild(P.domElement),g(L);const j=window.getComputedStyle(y).position;j!=="relative"&&j!=="absolute"&&j!=="fixed"&&j!=="sticky"&&(y.style.position="relative")},g=(y={})=>{if(!n)return;const P=n.domElement.parentNode;if(P!=null&&P.nodeName){const{width:j=P.offsetWidth,height:B=P.offsetHeight}=y;n.setSize(j,B),a.aspect=j/B,a.updateProjectionMatrix()}C()};function A(y,L,P){const j=y.bounding,B=Math.pow(Math.pow(j.max.x-j.min.x+1,2)+Math.pow(j.max.y-j.min.y+1,2)+Math.pow(j.max.z-j.min.z+1,2),1/2);let G=B/2/Math.tan(Math.PI*L/360);return P<1&&(G=G/P),isNaN(G)?B:G}function v(y){return i.work.observers[y].standingPosition.clone()}const C=()=>{if(!c||!u)return;const y=i.getPose();y.fov=a.fov,y.offset=u,y.distance=c,typeof s.lockedLatitude=="number"&&(y.latitude=s.lockedLatitude),typeof s.lockedLongitude=="number"&&(y.longitude=s.lockedLongitude),typeof s.lockedPanoIndex=="number"&&(y.offset=v(s.lockedPanoIndex)),s.lookAtCurrentCamera&&(y.offset=i.camera.position.clone().setY(i.camera.position.y+1)),a.setFromPose(y),e=!0},w=()=>{e!==!0||!n||!n.domElement.parentNode||n.domElement.parentNode.offsetWidth===0||(n.render(r,a),e=!1)},x=()=>{n&&n.dispose(),n=null},D=y=>{Object.assign(s,y),C()};return Object.assign(window,{camera:a}),i.on("modelLoaded",p),i.on("modelWillLoad",d),i.on("cameraDirectionUpdate",C),i.on("dispose",x),i.on("renderFrame",w),i.on("cameraPositionUpdate",C),{appendTo:m,refresh:g,changeConfigs:D}};function pt(...i){const t=[];return i.forEach(e=>{e.isCSS3DObjectPlus?t.push(e):t.push(...pt(...e.children))}),t}function Nn(i,t){const e=Math.round(i);return e%2===0?e:e+Number(t!=null&&t.floor?-1:1)}function Sl(i,t,e=!0){if(!i)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const n=()=>{const s=Nn(i.clientWidth,{floor:!0}),r=Nn(i.clientHeight,{floor:!0});t(s,r)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>n(),unobserve:()=>{}};const o=new ResizeObserver(n);return e&&n(),{observe:()=>o.observe(i),unobserve:()=>o.unobserve(i)}}class wo extends un.CSS3DRenderer{constructor(){super();h(this,"wrapper");h(this,"requestAnimationFrameId");h(this,"resizeDisoper");this.domElement.style.position="absolute",this.domElement.style.top="0",this.domElement.style.left="0",this.domElement.style.userSelect="none",this.domElement.style.pointerEvents="none"}setWrapper(e){if(!e)throw new Error("CSS3DRenderer: wrapper is required");if(e.contains(this.domElement))return;const n=this.wrapper;return n&&n.contains(this.domElement)&&this.domElement.remove(),this.appendToElement(e),this.wrapper=e,this}appendToElement(e){e.appendChild(this.domElement);const n=(r,a)=>this.setSize(r,a),{observe:o,unobserve:s}=Sl(e,n,!0);o(),this.resizeDisoper=s,this.wrapper=e}renderEveryFrame(e,n){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return console.warn("CSS3DRenderer: render is running");const o=()=>{this.requestAnimationFrameId=requestAnimationFrame(o),!!e.visible&&pt(e).length!==0&&this.render(e,n)};o()}stopRender(){this.requestAnimationFrameId&&cancelAnimationFrame(this.requestAnimationFrameId)}dispose(){var e;this.stopRender(),(e=this.resizeDisoper)==null||e.call(this),this.domElement.remove()}}function zl(i){return typeof Symbol=="undefined"?`$Symbol<${i}>$`:Symbol(i)}const ln=zl("$$EVENT$$");function wn(i){return i[ln]||(i[ln]={}),i[ln]}function Ml(i){i[ln]||delete i[ln]}class qt{hasListener(t){const e=wn(this);return Boolean((e==null?void 0:e[t])&&e[t].length>0)}on(t,e,n){const o=wn(this);return o[t]||(o[t]=[]),o[t].push([e,n||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){Ml(this);return}const n=wn(this);if(n[t]||(n[t]=[]),e===void 0){n[t].length=0;return}let o=0;for(;o<n[t].length&&n[t][o][0]!==e;o++);o<n[t].length&&n[t].splice(o,1)}emit(t,...e){let n=!1;const s=wn(this)[t]||[];for(let r of s.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(n=!0)}return n}}function Wr(...i){const t=new F.Vector3;return i.forEach(e=>{t.add(e)}),t.divideScalar(i.length),t}const Tl=({x:i,y:t,z:e})=>new F.Vector3(i,t,e),st=([i,t,e])=>new F.Vector3(i,t,e),fn=i=>i instanceof F.Vector3?i:Array.isArray(i)?st(i):Tl(i);class Bl extends E.Mesh{constructor(e,n){const o=new E.MeshBasicMaterial({opacity:0,color:0,transparent:!1,side:E.DoubleSide}),s=new E.PlaneGeometry(e,n);super(s,o);h(this,"name","opacity-mesh")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}const Xr=1,jl=`CSS3DObjectPlus@${Xr}`,Ql=.00216,Rl=.003;class Yr extends un.CSS3DObject{constructor(e){var D,y,L;const n=e.container,o=e.cornerPoints,s=(D=e.ratio)!=null?D:Rl,r=(y=e.dpr)!=null?y:1,a=(L=e.pointerEvents)!=null?L:"auto",l=Math.max(Ql,s),c=o[0].distanceTo(o[1]),u=o[1].distanceTo(o[2]),f=Nn(c/s*r),d=Nn(u/s*r),p=Wr(...o);let m;if(l===s)n.style.width=`${f}px`,n.style.height=`${d}px`,m=n;else{const P=document.createElement("div");P.style.width=`${f}px`,P.style.height=`${d}px`,P.style.pointerEvents="none";const j=s/l;n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.width=`${j*f}px`,n.style.height=`${j*d}px`,P.appendChild(n),m=P}super(m);h(this,"version",Xr);h(this,"isCSS3DObjectPlus",!0);h(this,"container");h(this,"width");h(this,"height");h(this,"domWidthPx");h(this,"domHeightPx");h(this,"cornerPoints");h(this,"centerPosition");h(this,"ratio");h(this,"mode","front");h(this,"hooks",new qt);h(this,"opacityMesh");h(this,"selfVisible",!0);h(this,"parentVisibleListenerDisposer");h(this,"createOpacityMesh",e=>{const{domWidthPx:n,domHeightPx:o}=e,s=new Bl(n,o);return s.position.copy(e.position),s.rotation.copy(e.rotation),s.scale.copy(e.scale),s});h(this,"addParentVisibleListener",()=>{var e;if((e=this.parent)!=null&&e.isCSS3DGroup){const n=this.parent,o=s=>{this.setVisible(s&&this.selfVisible,{setSelfVisible:!1})};n.hooks.on("visibleChange",o),this.parentVisibleListenerDisposer=()=>n.hooks.off("visibleChange",o)}});h(this,"removeParentVisibleListener",()=>{var e;(e=this.parentVisibleListenerDisposer)==null||e.call(this)});if(n.style.pointerEvents=a,this.scale.set(l,l,l),this.cornerPoints=o,this.ratio=s,this.container=n,e.mode&&(this.mode=e.mode),l===s)this.width=c,this.height=u,this.domWidthPx=f,this.domHeightPx=d,this.centerPosition=p;else{const P=s/l;this.width=P*c,this.height=P*u,this.domWidthPx=P*f,this.domHeightPx=P*d,this.centerPosition=new F.Vector3().subVectors(p,o[0]).multiplyScalar(P).add(o[0])}n.classList.add(`${jl}__container`);const g=new F.Vector3().subVectors(o[1],o[0]),A=new F.Vector3().subVectors(o[3],o[0]),v=new F.Vector3().crossVectors(g,A).normalize();this.lookAt(v);const C=this.up.clone().applyQuaternion(this.quaternion),w=A.clone(),x=new F.Vector3().crossVectors(C,w).normalize();this.rotateOnWorldAxis(x,C.angleTo(w)),this.position.copy(p),this.addEventListener("added",()=>{var P;this.mode==="front"&&((P=this.opacityMesh)==null||P.removeFromParent()),this.addParentVisibleListener()}),this.addEventListener("removed",()=>{var P;(P=this.opacityMesh)==null||P.removeFromParent(),this.removeParentVisibleListener()})}setVisible(e,n={setSelfVisible:!0}){n.setSelfVisible&&(this.selfVisible=e),this.visible=e,this.opacityMesh&&(this.opacityMesh.visible=e)}removeFromParent(){var n;const e=this.parent;return e!==null&&e.remove(this),(n=this.opacityMesh)==null||n.removeFromParent(),this}removeOpacityMesh(){var e;return(e=this.opacityMesh)==null||e.removeFromParent(),this.opacityMesh=void 0,this}dispose(){var e;this.container.remove(),this.removeFromParent(),(e=this.opacityMesh)==null||e.removeFromParent()}getOpacityMesh(){if(this.opacityMesh)return this.opacityMesh;{const e=this.createOpacityMesh(this);return this.opacityMesh=e,e}}applyMatrix4(e){var n;super.applyMatrix4(e),(n=this.opacityMesh)==null||n.applyMatrix4(e)}applyQuaternion(e){var n;return super.applyQuaternion(e),(n=this.opacityMesh)==null||n.applyQuaternion(e),this}applyScaleMatrix4(e){var n;this.scale.applyMatrix4(e),(n=this.opacityMesh)==null||n.scale.applyMatrix4(e)}}class Ol extends E.Scene{constructor(){super()}add(...t){return super.add(...t),pt(...t).forEach(e=>{e.mode="front"}),this}}class Hl extends E.Scene{constructor(e){super();h(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return super.add(...e),pt(...e).forEach(n=>{n.mode="behind",this.scene.add(n.getOpacityMesh())}),this}remove(...e){return pt(...e).forEach(n=>{var o;(o=n.opacityMesh)==null||o.removeFromParent()}),super.remove(...e),this}}class Ur extends E.Group{constructor(e){super();h(this,"isCSS3DGroup",!0);h(this,"mode");h(this,"CSS3DObjectLength",0);h(this,"hooks",new qt);this.mode=e}add(...e){return pt(...e).forEach(n=>{n.mode=this.mode}),super.add(...e),this.updateLength(),this}setVisible(e){this.visible=e,this.hooks.emit("visibleChange",e)}remove(...e){return super.remove(...e),this.updateLength(),this}updateLength(){this.CSS3DObjectLength=pt(this).length}}class Fl extends Ur{constructor(){super("front")}}class Gl extends Ur{constructor(e){super("behind");h(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return pt(...e).forEach(n=>{this.scene.add(n.getOpacityMesh())}),super.add(...e),this}}const Nl=3,Mi="CSS3DRenderer",on=`${Mi}@${Nl}`,Gt=()=>{console.error(`${on} is disposed`)},Ie={css3DObjects:[],frontModeStore:{css3DRenderer:new wo},behindModeStore:{css3DRenderer:new wo}};function Co(i){return Ie.css3DObjects.find(t=>t.id===i)}function Wl(i){Ie.frontModeStore.css3DRenderer.setWrapper(i)}function Xl(i){Ie.behindModeStore.css3DRenderer.setWrapper(i)}class Vt{constructor(t){h(this,"hooks",new qt);h(this,"state",{enabled:!0,visible:!0,disposed:!1});h(this,"_scene");h(this,"store",{frontModeGroup:new Fl});h(this,"create3DElement",(t,e,n)=>{if(this.state.disposed)return Gt();const o=(()=>{const w={ratio:.00216,devicePixelRatio:1,mode:"front",autoRender:!0,container:document.createElement("div"),pointerEvents:"none"};return Object.assign(w,n)})(),s=e.map(fn);if((s==null?void 0:s.length)<4)return console.error(`${on}: requires 4 point but params may have fewer`);const{ratio:r,devicePixelRatio:a,mode:l,autoRender:c,container:u,pointerEvents:f}=o,d=this.createObject(s,{ratio:r,dpr:a,container:u,mode:l,pointerEvents:f});Ie.css3DObjects.push(d),o.scene&&this.setScene(o.scene);const p=()=>{const w=d.mode==="front"?this.getFrontCSS3DObjectGroup():this.getBehindCSS3DObjectGroup();!w||w.add(d)},m=()=>{p(),this.render(t)},g=w=>this.setVisibleById(d.id,w),A=w=>this.setEnabledById(d.id,w),v=()=>(d.removeFromParent(),!0),C=l==="front"?Ie.frontModeStore.css3DRenderer:Ie.behindModeStore.css3DRenderer;return c&&m(),{id:d.uuid,container:u,css3DObject:d,render:c?void 0:m,show:()=>g(!0),hide:()=>g(!1),setVisible:g,enable:()=>A(!0),disable:()=>A(!1),setEnabled:A,dispose:v,appendToElement:w=>C.setWrapper(w)}});h(this,"setVisibleById",(t,e)=>{var n;(n=Co(t))==null||n.setVisible(e)});h(this,"setEnabledById",(t,e)=>{const n=Co(t);if(!n)return;const o=n.mode==="front"?this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}):this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1});!o||(e?o.add(n):o.remove(n))});h(this,"createObject",(t,e)=>{const n=new Yr(N({cornerPoints:t},e));return n.element.classList.add(`${Mi}__container`),n.element.id=`${Mi}__container--${n.uuid}`,n});t&&this.setScene(t)}get scene(){return this._scene||console.error("scene doesn't exist!, please call setScene(scene) first"),this._scene}static get frontModeCSS3DRenderer(){return Ie.frontModeStore.css3DRenderer}static get behindModeCSS3DRenderer(){return Ie.behindModeStore.css3DRenderer}get frontModeCSS3DRenderer(){return Ie.frontModeStore.css3DRenderer}get behindModeCSS3DRenderer(){return Ie.behindModeStore.css3DRenderer}setScene(t){this._scene=t}getCurrentState(){return this.state}setState(t,e={userAction:!0}){if(this.state.disposed)return Gt();const n=N({},this.state);this.state=Object.assign(this.state,t),n.visible!==this.state.visible&&(t.visible?this.handleShow():this.handleHide()),n.enabled!==this.state.enabled&&(t.enabled?this.handleEnable():this.handleDisable()),n.disposed!==this.state.disposed&&this.handleDispose(),this.hooks.emit("stateChange",{state:this.state,prevState:n,userAction:e.userAction})}dispose(){this.setState({disposed:!0}),this.hooks.emit("dispose")}show(){return J(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Gt();this.setState({visible:!0},{userAction:t}),this.hooks.emit("show",{userAction:t})})}hide(){return J(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Gt();this.setState({visible:!1},{userAction:t}),this.hooks.emit("hide",{userAction:t})})}enable({userAction:t}={userAction:!0}){if(this.state.disposed)return Gt();this.setState({enabled:!0},{userAction:t}),this.hooks.emit("enable",{userAction:t})}disable({userAction:t}={userAction:!0}){if(this.state.disposed)return Gt();this.setState({enabled:!1},{userAction:t}),this.hooks.emit("disable",{userAction:t})}getFrontCSS3DScene({createSceneIfNotExists:t=!1}={}){var n;const e=(n=Ie.frontModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const o=new Ol;Ie.frontModeStore.css3DScene=o}return Ie.frontModeStore.css3DScene}getBehindCSS3DScene({createSceneIfNotExists:t=!1}={}){var n,o;const e=(n=Ie.behindModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const s=(o=Ie.behindModeStore.scene)!=null?o:this.scene;if(!s){console.error(`${on}: scene is required when mode is behind`);return}const r=new Hl(s);Ie.behindModeStore.css3DScene=r,Ie.behindModeStore.scene=s}return Ie.behindModeStore.css3DScene}getFrontCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){const e=this.getFrontCSS3DScene({createSceneIfNotExists:t});return t&&e&&(e.getObjectById(this.store.frontModeGroup.id)||e.add(this.store.frontModeGroup)),this.store.frontModeGroup}getBehindCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){var n;const e=this.getBehindCSS3DScene({createSceneIfNotExists:t});if(t&&e&&this.scene){const o=(n=this.store.behindModeGroup)!=null?n:new Gl(this.scene);this.store.behindModeGroup=o,e.getObjectById(o.id)||e.add(o)}return this.store.behindModeGroup}render(t){var e,n;if(this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}).CSS3DObjectLength>0){const o=this.getFrontCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${on}: css3DScene is required when mode is front`);Ie.frontModeStore.css3DRenderer.renderEveryFrame(o,t)}if(((n=(e=this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1}))==null?void 0:e.CSS3DObjectLength)!=null?n:0)>0){const o=this.getBehindCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${on}: css3DScene is required when mode is behind`);Ie.behindModeStore.css3DRenderer.renderEveryFrame(o,t)}}handleShow(){return J(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!0),(t=this.store.behindModeGroup)==null||t.setVisible(!0)})}handleHide(){return J(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!1),(t=this.store.behindModeGroup)==null||t.setVisible(!1)})}handleEnable(){var t,e;(t=this.getFrontCSS3DScene())==null||t.add(this.store.frontModeGroup),this.store.behindModeGroup&&((e=this.getBehindCSS3DScene())==null||e.add(this.store.behindModeGroup))}handleDisable(){var t,e,n;this.store.frontModeGroup.children.forEach(o=>{o instanceof un.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)}),(t=this.store.behindModeGroup)==null||t.children.forEach(o=>{o instanceof un.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)}),(e=this.getFrontCSS3DScene())==null||e.remove(this.store.frontModeGroup),this.store.behindModeGroup&&((n=this.getBehindCSS3DScene())==null||n.remove(this.store.behindModeGroup))}handleDispose(){this.handleDisable()}}h(Vt,"setFrontModeContainer",Wl),h(Vt,"setBehindModeContainer",Xl);function Vr(i){return J(this,null,function*(){return new Promise(t=>{var e;if((e=i.model)!=null&&e.loaded){t();return}else i.once("modelLoaded",()=>t())})})}const gt=document.createElement("div");gt.style.position="absolute";gt.style.top="0";gt.style.left="0";gt.style.width="100%";gt.style.height="100%";gt.style.pointerEvents="none";function Jr(i){var e,n;const t=(n=Eo(i.getElement()))!=null?n:Eo((e=i.getElement())==null?void 0:e.parentElement);if(t!=null&&t.parentElement)return t.parentElement.insertBefore(gt,t),gt;console.error("Can not find a valid element to insert behindFiveElement. How to fix it: https://github.com/realsee-developer/dnalogel/blob/main/plugins/src/PanoTagPlugin/README.md")}function Eo(i){var o;if(!i)return;const t=(o=i.style.position)!=null?o:getComputedStyle(i).position;if(t!=="fixed"&&t!=="absolute"&&t!=="relative")return;const e=getComputedStyle(i).backgroundColor;if(!(e!=="transparent"&&e!=="rgba(0, 0, 0, 0)"))return i}const Yl="v2.0.1",pi=`CSS3DRenderPlugin@${Yl}`;class Ul extends Vt{constructor(e){super();h(this,"five");h(this,"behindFiveContainer");h(this,"staticPrefix","//vrlab-static.ljcdn.com");h(this,"create3DDomContainer",(e,n)=>{if(this.state.disposed)return;const o=(()=>{var f;(n==null?void 0:n.dpr)!==void 0&&console.warn(`${pi}: please use "config.devicePixelRatio" replace "config.dpr"`);const u={ratio:.00216,devicePixelRatio:(f=n==null?void 0:n.dpr)!=null?f:1,mode:"front",autoRender:!0};return Object.assign(u,n,(n==null?void 0:n.mode)==="behind"?{scene:this.five.scene}:void 0)})(),s=this.five.getElement();if(!s){console.error(`${pi}: five.getElement() is ${s}`);return}const{autoRender:r}=o;o.mode==="behind"&&o.behindFiveContainer&&(this.behindFiveContainer=o.behindFiveContainer);const a=this.create3DElement(this.five.camera,e,fe(N({},o),{autoRender:!1}));if(!a)return;const l=()=>{const u=a.css3DObject.mode==="front"?s.parentElement:this.getBehindFiveElement();if(!u)return console.error(`${pi}: wrapper is ${u}`);a.appendToElement(u),a.render()},c=()=>{a.css3DObject.mode==="front"&&l(),a.css3DObject.mode==="behind"&&Vr(this.five).then(()=>{l()})};return r&&c(),fe(N({},a),{render:r?void 0:c})});this.five=e}disposeAll(){return this.dispose()}setState(...e){const n=super.setState(...e);return this.five.needsRender=!0,n}getBehindFiveElement(){return this.behindFiveContainer?this.behindFiveContainer:(this.behindFiveContainer=Jr(this.five),this.behindFiveContainer)}}const Kt=i=>new Ul(i);function gi(i,t,e=new F.Vector3(1,1,1),n=!1){const o=new Or.Line(i,t);return o.setMaterial({dashed:n,color:e,linewidth:1}),o.remove(o.points),o}const Vl=i=>{const t={intersection:null,disposers:[]},e=u=>{t.intersection=u},n=()=>{t.intersection=null};i.on("modelLoaded",()=>{i.on("intersectionOnModelUpdate",e),i.on("intersectionHidden",n)}),i.on("dispose",()=>{i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)});const o=(u,f=2,d=.1)=>{const p=f/2,g=c(u,d),A=new F.Group;A.add(gi(new F.Vector3(g.x+p,g.y,g.z),new F.Vector3(g.x-p,g.y,g.z),new F.Vector3(1,0,0)),gi(new F.Vector3(g.x,g.y+p,g.z),new F.Vector3(g.x,g.y-p,g.z),new F.Vector3(0,1,0)),gi(new F.Vector3(g.x,g.y,g.z+p),new F.Vector3(g.x,g.y,g.z-p),new F.Vector3(0,0,1))),i.scene.add(A),i.needsRender=!0;const v=()=>{i.scene.remove(A)};return t.disposers.push(v),{clear:v,pointAxesHelperMesh:A}},s=(u,f=0)=>{var v,C;const d=(v=i==null?void 0:i.camera)==null?void 0:v.position;if(!d)return!1;const p=u.distanceTo(d),m=u.sub(d).normalize(),g=new F.Raycaster(d,m),A=(C=i.model.intersectRaycaster(g))==null?void 0:C[0];return!(A&&A.distance+f<p)},r=()=>t.intersection,a=()=>{var u,f;(f=(u=t.disposers)==null?void 0:u.forEach)==null||f.call(u,d=>d==null?void 0:d()),i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)},l=a,c=(u,f)=>{const d=u.clone();return i.camera.position.clone().sub(d).setLength(f).add(d)};return{intersection:r,pointAxesHelper:o,movePointTowardsCamera:c,destroy:a,dispose:l,canSeePoint:s}};function ee(){}const Jt=i=>i;function we(i,t){for(const e in t)i[e]=t[e];return i}function Zr(i){return i()}function Po(){return Object.create(null)}function rt(i){i.forEach(Zr)}function ii(i){return typeof i=="function"}function te(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let Cn;function et(i,t){return Cn||(Cn=document.createElement("a")),Cn.href=t,i===Cn.href}function Jl(i){return Object.keys(i).length===0}function It(i,t,e,n){if(i){const o=_r(i,t,e,n);return i[0](o)}}function _r(i,t,e,n){return i[1]&&n?we(e.ctx.slice(),i[1](n(t))):e.ctx}function xt(i,t,e,n){if(i[2]&&n){const o=i[2](n(e));if(t.dirty===void 0)return o;if(typeof o=="object"){const s=[],r=Math.max(t.dirty.length,o.length);for(let a=0;a<r;a+=1)s[a]=t.dirty[a]|o[a];return s}return t.dirty|o}return t.dirty}function kt(i,t,e,n,o,s){if(o){const r=_r(t,e,n,s);i.p(r,o)}}function Dt(i){if(i.ctx.length>32){const t=[],e=i.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function qr(i){const t={};for(const e in i)e[0]!=="$"&&(t[e]=i[e]);return t}function Wn(i,t){const e={};t=new Set(t);for(const n in i)!t.has(n)&&n[0]!=="$"&&(e[n]=i[n]);return e}function je(i){return i==null?"":i}const Kr=typeof window!="undefined";let $r=Kr?()=>window.performance.now():()=>Date.now(),Vi=Kr?i=>requestAnimationFrame(i):ee;const Ut=new Set;function ea(i){Ut.forEach(t=>{t.c(i)||(Ut.delete(t),t.f())}),Ut.size!==0&&Vi(ea)}function ta(i){let t;return Ut.size===0&&Vi(ea),{promise:new Promise(e=>{Ut.add(t={c:i,f:e})}),abort(){Ut.delete(t)}}}function O(i,t){i.appendChild(t)}function ae(i,t,e){const n=Ji(i);if(!n.getElementById(t)){const o=Q("style");o.id=t,o.textContent=e,na(n,o)}}function Ji(i){if(!i)return document;const t=i.getRootNode?i.getRootNode():i.ownerDocument;return t&&t.host?t:i.ownerDocument}function Zl(i){const t=Q("style");return na(Ji(i),t),t.sheet}function na(i,t){return O(i.head||i,t),t.sheet}function T(i,t,e){i.insertBefore(t,e||null)}function z(i){i.parentNode&&i.parentNode.removeChild(i)}function tt(i,t){for(let e=0;e<i.length;e+=1)i[e]&&i[e].d(t)}function Q(i){return document.createElement(i)}function Ae(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function ke(i){return document.createTextNode(i)}function Z(){return ke(" ")}function he(){return ke("")}function Pe(i,t,e,n){return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}function Zi(i){return function(t){return t.stopPropagation(),i.call(this,t)}}function b(i,t,e){e==null?i.removeAttribute(t):i.getAttribute(t)!==e&&i.setAttribute(t,e)}function Xn(i,t){const e=Object.getOwnPropertyDescriptors(i.__proto__);for(const n in t)t[n]==null?i.removeAttribute(n):n==="style"?i.style.cssText=t[n]:n==="__value"?i.value=i[n]=t[n]:e[n]&&e[n].set?i[n]=t[n]:b(i,n,t[n])}function _l(i){return Array.from(i.childNodes)}function Te(i,t){t=""+t,i.wholeText!==t&&(i.data=t)}function H(i,t,e,n){e===null?i.style.removeProperty(t):i.style.setProperty(t,e,n?"important":"")}let En;function ql(){if(En===void 0){En=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(i){En=!0}}return En}function bt(i,t){getComputedStyle(i).position==="static"&&(i.style.position="relative");const n=Q("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const o=ql();let s;return o?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=Pe(window,"message",r=>{r.source===n.contentWindow&&t()})):(n.src="about:blank",n.onload=()=>{s=Pe(n.contentWindow,"resize",t)}),O(i,n),()=>{(o||s&&n.contentWindow)&&s(),z(n)}}function _(i,t,e){i.classList[e?"add":"remove"](t)}function ia(i,t,{bubbles:e=!1,cancelable:n=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(i,e,n,t),o}class Yn{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.is_svg?this.e=Ae(e.nodeName):this.e=Q(e.nodeName),this.t=e,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)T(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(z)}}const Un=new Map;let Vn=0;function Kl(i){let t=5381,e=i.length;for(;e--;)t=(t<<5)-t^i.charCodeAt(e);return t>>>0}function $l(i,t){const e={stylesheet:Zl(t),rules:{}};return Un.set(i,e),e}function oa(i,t,e,n,o,s,r,a=0){const l=16.666/n;let c=`{
|
|
102
102
|
`;for(let A=0;A<=1;A+=l){const v=t+(e-t)*s(A);c+=A*100+`%{${r(v,1-v)}}
|
|
103
103
|
`}const u=c+`100% {${r(e,1-e)}}
|
|
104
|
-
}`,f=`__svelte_${Kl(u)}_${a}`,d=Ji(i),{stylesheet:p,rules:m}=Un.get(d)||$l(d,i);m[f]||(m[f]=!0,p.insertRule(`@keyframes ${f} ${u}`,p.cssRules.length));const g=i.style.animation||"";return i.style.animation=`${g?`${g}, `:""}${f} ${n}ms linear ${o}ms 1 both`,Vn+=1,f}function Ti(i,t){const e=(i.style.animation||"").split(", "),n=e.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),o=e.length-n.length;o&&(i.style.animation=n.join(", "),Vn-=o,Vn||ec())}function ec(){Vi(()=>{Vn||(Un.forEach(i=>{const{ownerNode:t}=i.stylesheet;t&&z(t)}),Un.clear())})}let hn;function cn(i){hn=i}function Rt(){if(!hn)throw new Error("Function called outside component initialization");return hn}function _i(i){Rt().$$.before_update.push(i)}function Ye(i){Rt().$$.on_mount.push(i)}function qi(i){Rt().$$.after_update.push(i)}function bt(i){Rt().$$.on_destroy.push(i)}function tc(){const i=Rt();return(t,e,{cancelable:n=!1}={})=>{const o=i.$$.callbacks[t];if(o){const s=ia(t,e,{cancelable:n});return o.slice().forEach(r=>{r.call(i,s)}),!s.defaultPrevented}return!0}}function Bi(i,t){return Rt().$$.context.set(i,t),t}function mn(i){return Rt().$$.context.get(i)}function nc(i,t){const e=i.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const sn=[],Me=[],On=[],Io=[],sa=Promise.resolve();let ji=!1;function ra(){ji||(ji=!0,sa.then(aa))}function ic(){return ra(),sa}function xe(i){On.push(i)}const Ai=new Set;let Pn=0;function aa(){const i=hn;do{for(;Pn<sn.length;){const t=sn[Pn];Pn++,cn(t),oc(t.$$)}for(cn(null),sn.length=0,Pn=0;Me.length;)Me.pop()();for(let t=0;t<On.length;t+=1){const e=On[t];Ai.has(e)||(Ai.add(e),e())}On.length=0}while(sn.length);for(;Io.length;)Io.pop()();ji=!1,Ai.clear(),cn(i)}function oc(i){if(i.fragment!==null){i.update(),rt(i.before_update);const t=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,t),i.after_update.forEach(xe)}}let nn;function la(){return nn||(nn=Promise.resolve(),nn.then(()=>{nn=null})),nn}function Jn(i,t,e){i.dispatchEvent(ia(`${t?"intro":"outro"}${e}`))}const Hn=new Set;let ft;function le(){ft={r:0,c:[],p:ft}}function ce(){ft.r||rt(ft.c),ft=ft.p}function k(i,t){i&&i.i&&(Hn.delete(i),i.i(t))}function M(i,t,e,n){if(i&&i.o){if(Hn.has(i))return;Hn.add(i),ft.c.push(()=>{Hn.delete(i),n&&(e&&i.d(1),n())}),i.o(t)}else n&&n()}const ca={duration:0};function Ot(i,t,e){let n=t(i,e),o=!1,s,r,a=0;function l(){s&&Ti(i,s)}function c(){const{delay:f=0,duration:d=300,easing:p=Jt,tick:m=ee,css:g}=n||ca;g&&(s=oa(i,0,1,d,f,p,g,a++)),m(0,1);const A=$r()+f,v=A+d;r&&r.abort(),o=!0,xe(()=>Jn(i,!0,"start")),r=ta(C=>{if(o){if(C>=v)return m(1,0),Jn(i,!0,"end"),l(),o=!1;if(C>=A){const w=p((C-A)/d);m(w,1-w)}}return o})}let u=!1;return{start(){u||(u=!0,Ti(i),ii(n)?(n=n(),la().then(c)):c())},invalidate(){u=!1},end(){o&&(l(),o=!1)}}}function $t(i,t,e){let n=t(i,e),o=!0,s;const r=ft;r.r+=1;function a(){const{delay:l=0,duration:c=300,easing:u=Jt,tick:f=ee,css:d}=n||ca;d&&(s=oa(i,1,0,c,l,u,d));const p=$r()+l,m=p+c;xe(()=>Jn(i,!1,"start")),ta(g=>{if(o){if(g>=m)return f(0,1),Jn(i,!1,"end"),--r.r||rt(r.c),!1;if(g>=p){const A=u((g-p)/c);f(1-A,A)}}return o})}return ii(n)?la().then(()=>{n=n(),a()}):a(),{end(l){l&&n.tick&&n.tick(1,0),o&&(s&&Ti(i,s),o=!1)}}}const sc=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function ua(i,t){i.d(1),t.delete(i.key)}function at(i,t){M(i,1,1,()=>{t.delete(i.key)})}function Ue(i,t,e,n,o,s,r,a,l,c,u,f){let d=i.length,p=s.length,m=d;const g={};for(;m--;)g[i[m].key]=m;const A=[],v=new Map,C=new Map;for(m=p;m--;){const y=f(o,s,m),L=e(y);let P=r.get(L);P?n&&P.p(y,t):(P=c(L,y),P.c()),v.set(L,A[m]=P),L in g&&C.set(L,Math.abs(m-g[L]))}const w=new Set,x=new Set;function D(y){k(y,1),y.m(a,u),r.set(y.key,y),u=y.first,p--}for(;d&&p;){const y=A[p-1],L=i[d-1],P=y.key,j=L.key;y===L?(u=y.first,d--,p--):v.has(j)?!r.has(P)||w.has(P)?D(y):x.has(j)?d--:C.get(P)>C.get(j)?(x.add(P),D(y)):(w.add(j),d--):(l(L,r),d--)}for(;d--;){const y=i[d];v.has(y.key)||l(y,r)}for(;p;)D(A[p-1]);return A}function Be(i,t){const e={},n={},o={$$scope:1};let s=i.length;for(;s--;){const r=i[s],a=t[s];if(a){for(const l in r)l in a||(n[l]=1);for(const l in a)o[l]||(e[l]=a[l],o[l]=1);i[s]=a}else for(const l in r)o[l]=1}for(const r in n)r in e||(e[r]=void 0);return e}function $(i){i&&i.c()}function q(i,t,e,n){const{fragment:o,after_update:s}=i.$$;o&&o.m(t,e),n||xe(()=>{const r=i.$$.on_mount.map(Zr).filter(ii);i.$$.on_destroy?i.$$.on_destroy.push(...r):rt(r),i.$$.on_mount=[]}),s.forEach(xe)}function K(i,t){const e=i.$$;e.fragment!==null&&(rt(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function rc(i,t){i.$$.dirty[0]===-1&&(sn.push(i),ra(),i.$$.dirty.fill(0)),i.$$.dirty[t/31|0]|=1<<t%31}function ie(i,t,e,n,o,s,r,a=[-1]){const l=hn;cn(i);const c=i.$$={fragment:null,ctx:[],props:s,update:ee,not_equal:o,bound:Po(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:Po(),dirty:a,skip_bound:!1,root:t.target||l.$$.root};r&&r(c.root);let u=!1;if(c.ctx=e?e(i,t.props||{},(f,d,...p)=>{const m=p.length?p[0]:d;return c.ctx&&o(c.ctx[f],c.ctx[f]=m)&&(!c.skip_bound&&c.bound[f]&&c.bound[f](m),u&&rc(i,f)),d}):[],c.update(),u=!0,rt(c.before_update),c.fragment=n?n(c.ctx):!1,t.target){if(t.hydrate){const f=_l(t.target);c.fragment&&c.fragment.l(f),f.forEach(z)}else c.fragment&&c.fragment.c();t.intro&&k(i.$$.fragment),q(i,t.target,t.anchor,t.customElement),aa()}cn(l)}class oe{$destroy(){K(this,1),this.$destroy=ee}$on(t,e){if(!ii(e))return ee;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const o=n.indexOf(e);o!==-1&&n.splice(o,1)}}$set(t){this.$$set&&!Jl(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ac="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAYAAACZ1L+0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAYKADAAQAAAABAAAAPAAAAABU0H2EAAARRElEQVR4Ad2czY9cRZbFq1yFoQGDNCzwuAENohl54dkgdrNh34tZ8GciFi31nwEsmAEhhAWD1GMJCZgx5sMfUHN+J+NE3XfrZWWVcVVLHVLmuXG/74148V5m2bm/N8bR0dH+Bx988Po333zzbz///PONg4ODa+I9I9y/cuXKgV77h4eH+1KH3hP/yv7+vuBAsG+5UCIpCkMzDQ962Eu80Q1P/KmHT82v8IocZFL4pslDvL3fNARHoPI2wtbrV1jBIf9N8SEZ0UUP2wFHv2ocSc/2ouEz8PVooJXQ0/j10aNHoH2Idj4PHz4k1n29/k+5/u3ll1/+r7fffvtLzfGzd8ibjK6+9957f5ajf1XzH9y7d+8Xjf9FRs1SdvNBBg2SDQ1xh9ALH4yN0M2BNZrKwtFc9Fmkquuma5HJBzvLiIONBnx40B7QIzTdxCcNwj3dYlEoUmabAU+UFZDpxah22Ng2NjQXH0LrwccGwyEzXfWhWQwSYQHYuFevXj14/vnn37h79+7Nr7766gup/FX5PnAj33///f/46aef3vj444/vfPbZZz9IYGMcnDbkhEYQL001Hfsu775i+7j6LID6cDQWYo8mabGMxOr+e/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n2uKDEd9BM8tbzxe98IraJJM7CBP98JjHFmR+3vqxOXzmmWceaKU337CxGhqCTUVolIGMabAnhGgUb71iahI7fFf7FIFCb3j/18voiuemdd/Mu/+uE1sQWfeX3MBuyzx5B39P/fRcr4dcAT9p5bxl4zhIgNqgnlRkILKuf1654tIUCk2oLJYbQpr0ZqRrGt30C1tk4FnyQYccray31B3s9UQviG104IUGmZ8mH5v+3qF2w51nn332TzHCsI7KJzEVm6akEVuPhLWGhUeM0CAjvkHmxCM+uCYPD2R0f2Ilt7lB4tMGZ3i7qPqfe+65P6j3X1y5du3aZ3rSefrGjRsvkNxpI80AeTGC0NgGoakvuFYrtvDjD11okBF6m3yjdfze9eM7sbPQIC8sg8detlPdP7XCy8ASOh6IC534Qf126Au6Aq7S+0P9jOJ/f/jhh7dfeeWVN1C4c+cOv5zoxsQgKD7O/OgIT3OLgrrkLAMR9EuQYsXLlWO5ePNMJ25s7Fhv8EIraduDDOJI7kfh6FT98M6Ka/GrLbE0/131X79+/YVXX331+tNPP32b3nt1tGhXP/rooz/ruf9N/YzWQ/2e2c8Cfg7Wz8RC9WkeE8pj/rQltMRH/jXdsdreAEp04mg8u22zYhvZ9IPueLE4puMLfnjRKzKCbD4ZHv9oK/mwaPOlm/ukkbFwjKLj428j8t8DEEvN9xJoJuhsDI9lxOeHXr3zE8cGm7fpQMfNgR54ntXmYXzx1ltvbX64VUl4SH//66+/fl2/5ndLC/BHMV/Q6ypN06Bm3lgFaKMcEbj+bDHN88/curvewF4hjhNWasrwhy/0waIPjylyYjp49Ag++NhFhi7F+jeEFcc/H6w5TYbnxo2OoufXmNPcX+XWv4QLMo+taJkfeY4gvtRs/n8vzY/cssxB5CyKxi96/aB+/Y9+KfE/X3vttS8lI7e9/wfu514OAjYP0QAAAABJRU5ErkJggg==";function lc(i){ae(i,"svelte-1d7uzh5",".room-label-item.svelte-1d7uzh5{position:absolute;font-size:0.5rem;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.room-label-item__text.svelte-1d7uzh5{position:absolute;left:0;top:-4rem;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:1.25rem;min-width:2rem;padding:0 0.375rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-1d7uzh5{position:absolute;top:-2.75rem;height:3rem;width:0.0625rem;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-1d7uzh5{font-size:0.625rem}")}function cc(i){let t,e,n=i[0].name+"",o,s,r,a,l;return{c(){t=Q("div"),e=Q("span"),o=ke(n),s=Z(),r=Q("div"),b(e,"class","room-label-item__text svelte-1d7uzh5"),H(e,"background-image","url("+ac+")"),_(e,"wide",i[0].name.length>3),b(r,"class","room-label-item__bar svelte-1d7uzh5"),b(t,"class","room-label-item svelte-1d7uzh5"),H(t,"z-index",i[0].zIndex),H(t,"transform",i[0].transform),H(t,"opacity",i[0].visible?1:0)},m(c,u){T(c,t,u),O(t,e),O(e,o),O(t,s),O(t,r),a||(l=Pe(e,"click",i[1]),a=!0)},p(c,[u]){u&1&&n!==(n=c[0].name+"")&&Te(o,n),u&1&&_(e,"wide",c[0].name.length>3),u&1&&H(t,"z-index",c[0].zIndex),u&1&&H(t,"transform",c[0].transform),u&1&&H(t,"opacity",c[0].visible?1:0)},i:ee,o:ee,d(c){c&&z(t),a=!1,l()}}}function uc(i,t,e){let{five:n}=t,{roomLabel:o}=t;function s(){n.setState({panoIndex:o.panoIndex,mode:"Panorama",longitude:o.longitude})}return i.$$set=r=>{"five"in r&&e(2,n=r.five),"roomLabel"in r&&e(0,o=r.roomLabel)},[o,s,n]}class dc extends oe{constructor(t){super(),ie(this,t,uc,cc,te,{five:2,roomLabel:0},lc)}}const{Map:fc}=sc;function hc(i){ae(i,"svelte-9eg4zi",".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}")}function xo(i,t,e){const n=i.slice();return n[12]=t[e],n}function ko(i,t){let e,n,o;return n=new dc({props:{roomLabel:t[12],five:t[1]}}),{key:i,first:null,c(){e=he(),$(n.$$.fragment),this.first=e},m(s,r){T(s,e,r),q(n,s,r),o=!0},p(s,r){t=s;const a={};r&1&&(a.roomLabel=t[12]),r&2&&(a.five=t[1]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),K(n,s)}}}function mc(i){let t,e=[],n=new fc,o,s,r=i[0];const a=l=>l[12].id;for(let l=0;l<r.length;l+=1){let c=xo(i,r,l),u=a(c);n.set(u,e[l]=ko(u,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","room-labels-container svelte-9eg4zi"),xe(()=>i[6].call(t))},m(l,c){T(l,t,c);for(let u=0;u<e.length;u+=1)e[u].m(t,null);o=vt(t,i[6].bind(t)),s=!0},p(l,[c]){c&3&&(r=l[0],le(),e=Ue(e,c,a,1,l,r,n,t,at,ko,null,xo),ce())},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)M(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function pc(i,t,e){var g;let n,{five:o}=t,{roomLabels:s}=t,r,a,l=(g=o.model.shownFloor)!=null?g:null;function c(A){if(!(l===null||A.floorIndex===l))return!1;const C=new F.Raycaster,w=o.camera.position.clone(),x=new F.Vector3(A.position.x,A.position.y,A.position.z),D=x.distanceTo(w);C.set(w.clone(),x.clone().sub(w).normalize());const[y]=o.model.intersectRaycaster(C);return!(y&&y.distance+1<D)}function u(A,v){const w=new F.Vector3(A.position.x,A.position.y,A.position.z).clone().project(o.camera),x=Math.ceil((w.x+1)/2*v.x),D=Math.ceil((-w.y+1)/2*v.y);return`translate(${x}px, ${D}px)`}function f(A){const{rendererSize:v,shownFloor:C}=A,w=new Map;function x(y){const L=w.get(y.id);if(L)return L;const{x:P,y:j,z:B}=y.position,G=new F.Vector3(P,j,B).clone().distanceTo(o.camera.position);return w.set(y.id,G),G}return s.map(y=>{const L=c(y),P=L?u(y,v):y.transform,j=x(y),G=s.filter(U=>U.visible&&x(U)<j).length*10;return fe(N({},y),{visible:L,transform:P,zIndex:G})})}function d(){e(0,s=f({rendererSize:n,shownFloor:l}))}function p(A){e(4,l=A)}o.on("cameraUpdate",d),o.on("modelShownFloorChange",p),bt(()=>{o.off("cameraUpdate",d),o.off("modelShownFloorChange",p)});function m(){r=this.clientWidth,a=this.clientHeight,e(2,r),e(3,a)}return i.$$set=A=>{"five"in A&&e(1,o=A.five),"roomLabels"in A&&e(0,s=A.roomLabels)},i.$$.update=()=>{i.$$.dirty&12&&e(5,n={x:r,y:a}),i.$$.dirty&48&&e(0,s=f({rendererSize:n,shownFloor:l}))},[s,o,r,a,l,n,m]}class gc extends oe{constructor(t){super(),ie(this,t,pc,mc,te,{five:1,roomLabels:0},hc)}}function Ac(i){return i.model_room_labels.map(({id:t,pano_index:e,floor_index:n,name:o,position:s,longitude:r})=>({id:t,name:o,position:s,longitude:r,panoIndex:e,floorIndex:n,zIndex:0,visible:!1,transform:""}))}class vc{constructor(t){h(this,"five");h(this,"enabled",!0);h(this,"fiveModeEnabled");h(this,"app");h(this,"wrapper");h(this,"roomLabels",[]);h(this,"container",document.createElement("div"));h(this,"onFiveModeChange",t=>{if(t!=="Floorplan"){this.fiveModeEnabled=!1,this.render();return}this.five.once("initAnimationEnded",()=>{this.fiveModeEnabled=this.five.currentMode==="Floorplan",this.render()})});this.five=t,this.fiveModeEnabled=this.five.currentMode==="Floorplan",this.container.classList.add("model-room-label-plugin-container"),this.container.style.width="100%",this.container.style.height="100%",this.container.style.position="absolute",this.container.style.pointerEvents="none",this.container.style.left="0",this.container.style.top="0",this.container.style.zIndex="5",this.five.once("dispose",()=>this.dispose()),this.five.on("modeChange",this.onFiveModeChange),this.render()}dispose(){this.five.off("modeChange",this.onFiveModeChange),this.container.remove()}load(t){this.roomLabels=Ac(t),this.render()}appendTo(t){return this.wrapper=t,t.appendChild(this.container),this.render(),this}disable(){return this.enabled=!1,this.render(),this}enable(){return this.enabled=!0,this.render(),this}render(){var t;if(!!this.wrapper){if(!this.enabled||!this.fiveModeEnabled){(t=this.app)==null||t.$destroy(),this.app=void 0;return}this.app?this.app.$set({five:this.five,roomLabels:this.roomLabels}):this.app=new gc({target:this.container,props:{five:this.five,roomLabels:this.roomLabels}})}}}const bc=i=>new vc(i),yc={name:"ModelRoomLabelPlugin",version:0};var mt=(i=>(i[i.FLOOR=1]="FLOOR",i[i.CEILING=2]="CEILING",i[i.BOUNDING_CENTER=3]="BOUNDING_CENTER",i))(mt||{});function Zn(i){return J(this,null,function*(){try{return[null,yield i]}catch(t){return t instanceof Error?[t,null]:[new Error(""),null]}})}function _n(i){return Object.prototype.toString.call(i)==="[object Object]"}function oi(i,t){return i===t?!0:typeof i!=typeof t?!1:!!(Number.isNaN(i)&&Number.isNaN(t))}function wc(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!oi(i[r],t[r]))return!1}return!0}function Cc(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!oi(i[e],t[e]))return!1;return!0}function Ec(i,t){return oi(i,t)?!0:_n(i)&&_n(t)?wc(i,t):Array.isArray(i)&&Array.isArray(t)?Cc(i,t):!1}function Ki(i,t){return oi(i,t)?!0:_n(i)&&_n(t)?Ic(i,t):Array.isArray(i)&&Array.isArray(t)?Pc(i,t):!1}function Pc(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!Ki(i[e],t[e]))return!1;return!0}function Ic(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!Ki(i[r],t[r]))return!1}return!0}function qe(i,t,e={deep:!1}){return e.deep?Ki(i,t):Ec(i,t)}function Zt(i){return i<.5?4*i*i*i:.5*Math.pow(2*i-2,3)+1}function da(i){const t=i-1;return t*t*t+1}function Tt(i,{delay:t=0,duration:e=400,easing:n=Jt}={}){const o=+getComputedStyle(i).opacity;return{delay:t,duration:e,easing:n,css:s=>`opacity: ${s*o}`}}function Do(i,{delay:t=0,duration:e=400,easing:n=da,x:o=0,y:s=0,opacity:r=0}={}){const a=getComputedStyle(i),l=+a.opacity,c=a.transform==="none"?"":a.transform,u=l*(1-r);return{delay:t,duration:e,easing:n,css:(f,d)=>`
|
|
104
|
+
}`,f=`__svelte_${Kl(u)}_${a}`,d=Ji(i),{stylesheet:p,rules:m}=Un.get(d)||$l(d,i);m[f]||(m[f]=!0,p.insertRule(`@keyframes ${f} ${u}`,p.cssRules.length));const g=i.style.animation||"";return i.style.animation=`${g?`${g}, `:""}${f} ${n}ms linear ${o}ms 1 both`,Vn+=1,f}function Ti(i,t){const e=(i.style.animation||"").split(", "),n=e.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),o=e.length-n.length;o&&(i.style.animation=n.join(", "),Vn-=o,Vn||ec())}function ec(){Vi(()=>{Vn||(Un.forEach(i=>{const{ownerNode:t}=i.stylesheet;t&&z(t)}),Un.clear())})}let hn;function cn(i){hn=i}function Rt(){if(!hn)throw new Error("Function called outside component initialization");return hn}function _i(i){Rt().$$.before_update.push(i)}function Ye(i){Rt().$$.on_mount.push(i)}function qi(i){Rt().$$.after_update.push(i)}function yt(i){Rt().$$.on_destroy.push(i)}function tc(){const i=Rt();return(t,e,{cancelable:n=!1}={})=>{const o=i.$$.callbacks[t];if(o){const s=ia(t,e,{cancelable:n});return o.slice().forEach(r=>{r.call(i,s)}),!s.defaultPrevented}return!0}}function Bi(i,t){return Rt().$$.context.set(i,t),t}function mn(i){return Rt().$$.context.get(i)}function nc(i,t){const e=i.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const sn=[],Me=[],On=[],Io=[],sa=Promise.resolve();let ji=!1;function ra(){ji||(ji=!0,sa.then(aa))}function ic(){return ra(),sa}function xe(i){On.push(i)}const Ai=new Set;let Pn=0;function aa(){const i=hn;do{for(;Pn<sn.length;){const t=sn[Pn];Pn++,cn(t),oc(t.$$)}for(cn(null),sn.length=0,Pn=0;Me.length;)Me.pop()();for(let t=0;t<On.length;t+=1){const e=On[t];Ai.has(e)||(Ai.add(e),e())}On.length=0}while(sn.length);for(;Io.length;)Io.pop()();ji=!1,Ai.clear(),cn(i)}function oc(i){if(i.fragment!==null){i.update(),rt(i.before_update);const t=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,t),i.after_update.forEach(xe)}}let nn;function la(){return nn||(nn=Promise.resolve(),nn.then(()=>{nn=null})),nn}function Jn(i,t,e){i.dispatchEvent(ia(`${t?"intro":"outro"}${e}`))}const Hn=new Set;let ft;function le(){ft={r:0,c:[],p:ft}}function ce(){ft.r||rt(ft.c),ft=ft.p}function k(i,t){i&&i.i&&(Hn.delete(i),i.i(t))}function M(i,t,e,n){if(i&&i.o){if(Hn.has(i))return;Hn.add(i),ft.c.push(()=>{Hn.delete(i),n&&(e&&i.d(1),n())}),i.o(t)}else n&&n()}const ca={duration:0};function Ot(i,t,e){let n=t(i,e),o=!1,s,r,a=0;function l(){s&&Ti(i,s)}function c(){const{delay:f=0,duration:d=300,easing:p=Jt,tick:m=ee,css:g}=n||ca;g&&(s=oa(i,0,1,d,f,p,g,a++)),m(0,1);const A=$r()+f,v=A+d;r&&r.abort(),o=!0,xe(()=>Jn(i,!0,"start")),r=ta(C=>{if(o){if(C>=v)return m(1,0),Jn(i,!0,"end"),l(),o=!1;if(C>=A){const w=p((C-A)/d);m(w,1-w)}}return o})}let u=!1;return{start(){u||(u=!0,Ti(i),ii(n)?(n=n(),la().then(c)):c())},invalidate(){u=!1},end(){o&&(l(),o=!1)}}}function $t(i,t,e){let n=t(i,e),o=!0,s;const r=ft;r.r+=1;function a(){const{delay:l=0,duration:c=300,easing:u=Jt,tick:f=ee,css:d}=n||ca;d&&(s=oa(i,1,0,c,l,u,d));const p=$r()+l,m=p+c;xe(()=>Jn(i,!1,"start")),ta(g=>{if(o){if(g>=m)return f(0,1),Jn(i,!1,"end"),--r.r||rt(r.c),!1;if(g>=p){const A=u((g-p)/c);f(1-A,A)}}return o})}return ii(n)?la().then(()=>{n=n(),a()}):a(),{end(l){l&&n.tick&&n.tick(1,0),o&&(s&&Ti(i,s),o=!1)}}}const sc=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function ua(i,t){i.d(1),t.delete(i.key)}function at(i,t){M(i,1,1,()=>{t.delete(i.key)})}function Ue(i,t,e,n,o,s,r,a,l,c,u,f){let d=i.length,p=s.length,m=d;const g={};for(;m--;)g[i[m].key]=m;const A=[],v=new Map,C=new Map;for(m=p;m--;){const y=f(o,s,m),L=e(y);let P=r.get(L);P?n&&P.p(y,t):(P=c(L,y),P.c()),v.set(L,A[m]=P),L in g&&C.set(L,Math.abs(m-g[L]))}const w=new Set,x=new Set;function D(y){k(y,1),y.m(a,u),r.set(y.key,y),u=y.first,p--}for(;d&&p;){const y=A[p-1],L=i[d-1],P=y.key,j=L.key;y===L?(u=y.first,d--,p--):v.has(j)?!r.has(P)||w.has(P)?D(y):x.has(j)?d--:C.get(P)>C.get(j)?(x.add(P),D(y)):(w.add(j),d--):(l(L,r),d--)}for(;d--;){const y=i[d];v.has(y.key)||l(y,r)}for(;p;)D(A[p-1]);return A}function Be(i,t){const e={},n={},o={$$scope:1};let s=i.length;for(;s--;){const r=i[s],a=t[s];if(a){for(const l in r)l in a||(n[l]=1);for(const l in a)o[l]||(e[l]=a[l],o[l]=1);i[s]=a}else for(const l in r)o[l]=1}for(const r in n)r in e||(e[r]=void 0);return e}function $(i){i&&i.c()}function q(i,t,e,n){const{fragment:o,after_update:s}=i.$$;o&&o.m(t,e),n||xe(()=>{const r=i.$$.on_mount.map(Zr).filter(ii);i.$$.on_destroy?i.$$.on_destroy.push(...r):rt(r),i.$$.on_mount=[]}),s.forEach(xe)}function K(i,t){const e=i.$$;e.fragment!==null&&(rt(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function rc(i,t){i.$$.dirty[0]===-1&&(sn.push(i),ra(),i.$$.dirty.fill(0)),i.$$.dirty[t/31|0]|=1<<t%31}function ie(i,t,e,n,o,s,r,a=[-1]){const l=hn;cn(i);const c=i.$$={fragment:null,ctx:[],props:s,update:ee,not_equal:o,bound:Po(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:Po(),dirty:a,skip_bound:!1,root:t.target||l.$$.root};r&&r(c.root);let u=!1;if(c.ctx=e?e(i,t.props||{},(f,d,...p)=>{const m=p.length?p[0]:d;return c.ctx&&o(c.ctx[f],c.ctx[f]=m)&&(!c.skip_bound&&c.bound[f]&&c.bound[f](m),u&&rc(i,f)),d}):[],c.update(),u=!0,rt(c.before_update),c.fragment=n?n(c.ctx):!1,t.target){if(t.hydrate){const f=_l(t.target);c.fragment&&c.fragment.l(f),f.forEach(z)}else c.fragment&&c.fragment.c();t.intro&&k(i.$$.fragment),q(i,t.target,t.anchor,t.customElement),aa()}cn(l)}class oe{$destroy(){K(this,1),this.$destroy=ee}$on(t,e){if(!ii(e))return ee;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const o=n.indexOf(e);o!==-1&&n.splice(o,1)}}$set(t){this.$$set&&!Jl(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ac="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAYAAACZ1L+0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAYKADAAQAAAABAAAAPAAAAABU0H2EAAARRElEQVR4Ad2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ePNMJ25s7Fhv8EIraduDDOJI7kfh6FT98M6Ka/GrLbE0/131X79+/YVXX331+tNPP32b3nt1tGhXP/rooz/ruf9N/YzWQ/2e2c8Cfg7Wz8RC9WkeE8pj/rQltMRH/jXdsdreAEp04mg8u22zYhvZ9IPueLE4puMLfnjRKzKCbD4ZHv9oK/mwaPOlm/ukkbFwjKLj428j8t8DEEvN9xJoJuhsDI9lxOeHXr3zE8cGm7fpQMfNgR54ntXmYXzx1ltvbX64VUl4SH//66+/fl2/5ndLC/BHMV/Q6ypN06Bm3lgFaKMcEbj+bDHN88/curvewF4hjhNWasrwhy/0waIPjylyYjp49Ag++NhFhi7F+jeEFcc/H6w5TYbnxo2OoufXmNPcX+XWv4QLMo+taJkfeY4gvtRs/n8vzY/cssxB5CyKxi96/aB+/Y9+KfE/X3vttS8lI7e9/wfu514OAjYP0QAAAABJRU5ErkJggg==";function lc(i){ae(i,"svelte-1d7uzh5",".room-label-item.svelte-1d7uzh5{position:absolute;font-size:0.5rem;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.room-label-item__text.svelte-1d7uzh5{position:absolute;left:0;top:-4rem;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:1.25rem;min-width:2rem;padding:0 0.375rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-1d7uzh5{position:absolute;top:-2.75rem;height:3rem;width:0.0625rem;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-1d7uzh5{font-size:0.625rem}")}function cc(i){let t,e,n=i[0].name+"",o,s,r,a,l;return{c(){t=Q("div"),e=Q("span"),o=ke(n),s=Z(),r=Q("div"),b(e,"class","room-label-item__text svelte-1d7uzh5"),H(e,"background-image","url("+ac+")"),_(e,"wide",i[0].name.length>3),b(r,"class","room-label-item__bar svelte-1d7uzh5"),b(t,"class","room-label-item svelte-1d7uzh5"),H(t,"z-index",i[0].zIndex),H(t,"transform",i[0].transform),H(t,"opacity",i[0].visible?1:0)},m(c,u){T(c,t,u),O(t,e),O(e,o),O(t,s),O(t,r),a||(l=Pe(e,"click",i[1]),a=!0)},p(c,[u]){u&1&&n!==(n=c[0].name+"")&&Te(o,n),u&1&&_(e,"wide",c[0].name.length>3),u&1&&H(t,"z-index",c[0].zIndex),u&1&&H(t,"transform",c[0].transform),u&1&&H(t,"opacity",c[0].visible?1:0)},i:ee,o:ee,d(c){c&&z(t),a=!1,l()}}}function uc(i,t,e){let{five:n}=t,{roomLabel:o}=t;function s(){n.setState({panoIndex:o.panoIndex,mode:"Panorama",longitude:o.longitude})}return i.$$set=r=>{"five"in r&&e(2,n=r.five),"roomLabel"in r&&e(0,o=r.roomLabel)},[o,s,n]}class dc extends oe{constructor(t){super(),ie(this,t,uc,cc,te,{five:2,roomLabel:0},lc)}}const{Map:fc}=sc;function hc(i){ae(i,"svelte-9eg4zi",".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}")}function xo(i,t,e){const n=i.slice();return n[12]=t[e],n}function ko(i,t){let e,n,o;return n=new dc({props:{roomLabel:t[12],five:t[1]}}),{key:i,first:null,c(){e=he(),$(n.$$.fragment),this.first=e},m(s,r){T(s,e,r),q(n,s,r),o=!0},p(s,r){t=s;const a={};r&1&&(a.roomLabel=t[12]),r&2&&(a.five=t[1]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),K(n,s)}}}function mc(i){let t,e=[],n=new fc,o,s,r=i[0];const a=l=>l[12].id;for(let l=0;l<r.length;l+=1){let c=xo(i,r,l),u=a(c);n.set(u,e[l]=ko(u,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","room-labels-container svelte-9eg4zi"),xe(()=>i[6].call(t))},m(l,c){T(l,t,c);for(let u=0;u<e.length;u+=1)e[u].m(t,null);o=bt(t,i[6].bind(t)),s=!0},p(l,[c]){c&3&&(r=l[0],le(),e=Ue(e,c,a,1,l,r,n,t,at,ko,null,xo),ce())},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)M(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function pc(i,t,e){var g;let n,{five:o}=t,{roomLabels:s}=t,r,a,l=(g=o.model.shownFloor)!=null?g:null;function c(A){if(!(l===null||A.floorIndex===l))return!1;const C=new F.Raycaster,w=o.camera.position.clone(),x=new F.Vector3(A.position.x,A.position.y,A.position.z),D=x.distanceTo(w);C.set(w.clone(),x.clone().sub(w).normalize());const[y]=o.model.intersectRaycaster(C);return!(y&&y.distance+1<D)}function u(A,v){const w=new F.Vector3(A.position.x,A.position.y,A.position.z).clone().project(o.camera),x=Math.ceil((w.x+1)/2*v.x),D=Math.ceil((-w.y+1)/2*v.y);return`translate(${x}px, ${D}px)`}function f(A){const{rendererSize:v,shownFloor:C}=A,w=new Map;function x(y){const L=w.get(y.id);if(L)return L;const{x:P,y:j,z:B}=y.position,G=new F.Vector3(P,j,B).clone().distanceTo(o.camera.position);return w.set(y.id,G),G}return s.map(y=>{const L=c(y),P=L?u(y,v):y.transform,j=x(y),G=s.filter(U=>U.visible&&x(U)<j).length*10;return fe(N({},y),{visible:L,transform:P,zIndex:G})})}function d(){e(0,s=f({rendererSize:n,shownFloor:l}))}function p(A){e(4,l=A)}o.on("cameraUpdate",d),o.on("modelShownFloorChange",p),yt(()=>{o.off("cameraUpdate",d),o.off("modelShownFloorChange",p)});function m(){r=this.clientWidth,a=this.clientHeight,e(2,r),e(3,a)}return i.$$set=A=>{"five"in A&&e(1,o=A.five),"roomLabels"in A&&e(0,s=A.roomLabels)},i.$$.update=()=>{i.$$.dirty&12&&e(5,n={x:r,y:a}),i.$$.dirty&48&&e(0,s=f({rendererSize:n,shownFloor:l}))},[s,o,r,a,l,n,m]}class gc extends oe{constructor(t){super(),ie(this,t,pc,mc,te,{five:1,roomLabels:0},hc)}}function Ac(i){return i.model_room_labels.map(({id:t,pano_index:e,floor_index:n,name:o,position:s,longitude:r})=>({id:t,name:o,position:s,longitude:r,panoIndex:e,floorIndex:n,zIndex:0,visible:!1,transform:""}))}class vc{constructor(t){h(this,"five");h(this,"enabled",!0);h(this,"fiveModeEnabled");h(this,"app");h(this,"wrapper");h(this,"roomLabels",[]);h(this,"container",document.createElement("div"));h(this,"onFiveModeChange",t=>{if(t!=="Floorplan"){this.fiveModeEnabled=!1,this.render();return}this.five.once("initAnimationEnded",()=>{this.fiveModeEnabled=this.five.currentMode==="Floorplan",this.render()})});this.five=t,this.fiveModeEnabled=this.five.currentMode==="Floorplan",this.container.classList.add("model-room-label-plugin-container"),this.container.style.width="100%",this.container.style.height="100%",this.container.style.position="absolute",this.container.style.pointerEvents="none",this.container.style.left="0",this.container.style.top="0",this.container.style.zIndex="5",this.five.once("dispose",()=>this.dispose()),this.five.on("modeChange",this.onFiveModeChange),this.render()}dispose(){this.five.off("modeChange",this.onFiveModeChange),this.container.remove()}load(t){this.roomLabels=Ac(t),this.render()}appendTo(t){return this.wrapper=t,t.appendChild(this.container),this.render(),this}disable(){return this.enabled=!1,this.render(),this}enable(){return this.enabled=!0,this.render(),this}render(){var t;if(!!this.wrapper){if(!this.enabled||!this.fiveModeEnabled){(t=this.app)==null||t.$destroy(),this.app=void 0;return}this.app?this.app.$set({five:this.five,roomLabels:this.roomLabels}):this.app=new gc({target:this.container,props:{five:this.five,roomLabels:this.roomLabels}})}}}const bc=i=>new vc(i),yc={name:"ModelRoomLabelPlugin",version:0};var mt=(i=>(i[i.FLOOR=1]="FLOOR",i[i.CEILING=2]="CEILING",i[i.BOUNDING_CENTER=3]="BOUNDING_CENTER",i))(mt||{});function Zn(i){return J(this,null,function*(){try{return[null,yield i]}catch(t){return t instanceof Error?[t,null]:[new Error(""),null]}})}function _n(i){return Object.prototype.toString.call(i)==="[object Object]"}function oi(i,t){return i===t?!0:typeof i!=typeof t?!1:!!(Number.isNaN(i)&&Number.isNaN(t))}function wc(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!oi(i[r],t[r]))return!1}return!0}function Cc(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!oi(i[e],t[e]))return!1;return!0}function Ec(i,t){return oi(i,t)?!0:_n(i)&&_n(t)?wc(i,t):Array.isArray(i)&&Array.isArray(t)?Cc(i,t):!1}function Ki(i,t){return oi(i,t)?!0:_n(i)&&_n(t)?Ic(i,t):Array.isArray(i)&&Array.isArray(t)?Pc(i,t):!1}function Pc(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!Ki(i[e],t[e]))return!1;return!0}function Ic(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!Ki(i[r],t[r]))return!1}return!0}function qe(i,t,e={deep:!1}){return e.deep?Ki(i,t):Ec(i,t)}function Zt(i){return i<.5?4*i*i*i:.5*Math.pow(2*i-2,3)+1}function da(i){const t=i-1;return t*t*t+1}function Tt(i,{delay:t=0,duration:e=400,easing:n=Jt}={}){const o=+getComputedStyle(i).opacity;return{delay:t,duration:e,easing:n,css:s=>`opacity: ${s*o}`}}function Do(i,{delay:t=0,duration:e=400,easing:n=da,x:o=0,y:s=0,opacity:r=0}={}){const a=getComputedStyle(i),l=+a.opacity,c=a.transform==="none"?"":a.transform,u=l*(1-r);return{delay:t,duration:e,easing:n,css:(f,d)=>`
|
|
105
105
|
transform: ${c} translate(${(1-f)*o}px, ${(1-f)*s}px);
|
|
106
|
-
opacity: ${l-u*d}`}}function qn(i,{delay:t=0,speed:e,duration:n,easing:o=Zt}={}){let s=i.getTotalLength();const r=getComputedStyle(i);return r.strokeLinecap!=="butt"&&(s+=parseIn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6J+KFy88uA2RJyJPE4wkL4wIPBfgXxO5HxGN7zNw5W2bNnLZhio+OmaR3LD6tplrLfKeYAwX7/O6Dje/2dpniwuKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==";function xc(i){return i*180/Math.PI}function kc(i){ae(i,"svelte-17cl35n",".floorplan__camera-position.svelte-17cl35n{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17cl35n{position:absolute;background-repeat:no-repeat;background-size:100%}")}function Dc(i){let t,e;return{c(){t=Q("div"),e=Q("div"),b(e,"class","floorplan__camera-rotate svelte-17cl35n"),H(e,"background-image",`url(${i[0]||gt})`),H(e,"width",i[4]),H(e,"height",i[4]),H(e,"left","-"+i[4]),H(e,"top","-"+i[4]),H(e,"transform",`rotate(${i[3]}deg)`),H(e,"transform-origin",`${i[4]} ${i[4]}`),b(t,"class","floorplan__camera-position svelte-17cl35n"),H(t,"left",i[1]),H(t,"top",i[2])},m(n,o){T(n,t,o),O(t,e)},p(n,[o]){o&1&&H(e,"background-image",`url(${n[0]||gt})`)},i:ee,o:ee,d(n){n&&z(t)}}}function Lc(i,t,e){let{panoIndex:n}=t,{floorplanData:o}=t,{lastPanoramaLongitude:s}=t,{cameraImageUrl:r}=t;const{observers:a}=o,l=a[n],c=l.positionInImage.x,u=l.positionInImage.y,f=c*100+"%",d=u*100+"%",p=-xc(s)+45,m=document.body.clientWidth,g=document.body.clientHeight,v=`${(m<500||g<500?17:37)/16}rem`;return i.$$set=C=>{"panoIndex"in C&&e(5,n=C.panoIndex),"floorplanData"in C&&e(6,o=C.floorplanData),"lastPanoramaLongitude"in C&&e(7,s=C.lastPanoramaLongitude),"cameraImageUrl"in C&&e(0,r=C.cameraImageUrl)},[r,f,d,p,v,n,o,s]}class Sc ext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HOCprMZaf5qdhlorxwGeTsPIttvPlno0y3GAZfbHp6n3ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";function Mc(i){ae(i,"svelte-rpkaro",".floorplan-plugin__compass.svelte-rpkaro{position:absolute;left:50%;top:-2.875rem;width:14.4375rem;height:2.5625rem;will-change:opacity;transform-origin:center 11.5rem}.floorplan-plugin__compass-image.svelte-rpkaro{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-rpkaro{position:absolute;left:50%;top:0.9375rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.625rem;color:#fff}")}function Tc(i){let t,e,n,o,s;return{c(){t=Q("div"),e=Q("div"),n=Z(),o=Q("span"),s=ke(i[0]),b(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),H(e,"background-image",`url(${zc})`),b(o,"class","floorplan-plugin__compass-text svelte-rpkaro"),b(t,"class","floorplan-plugin__compass svelte-rpkaro"),H(t,"transform",i[2])},m(r,a){T(r,t,a),O(t,e),O(t,n),O(t,o),O(o,s)},p(r,a){a&1&&Te(s,r[0])},d(r){r&&z(t)}}}function Bc(i){let t,e=i[1]&&Tc(i);return{c(){e&&e.c(),t=he()},m(n,o){e&&e.m(n,o),T(n,t,o)},p(n,[o]){n[1]&&e.p(n,o)},i:ee,o:ee,d(n){e&&e.d(n),n&&z(t)}}}function jc(i){return i/Math.PI*180}function Qc(i,t,e){var c;let{floorplanData:n}=t,{northDesc:o}=t;const s=(c=n.entrance)==null?void 0:c.northRad,r=typeof s=="number",l=`translateX(-50%) translateZ(10px) rotate(${-(s?jc(s):0)+90}deg)`;return i.$$set=u=>{"floorplanData"in u&&e(3,n=u.floorplanData),"northDesc"in u&&e(0,o=u.northDesc)},[o,r,l,n]}class Rc extends oe{constructor(t){super(),ie(this,t,Qc,Bc,te,{floorplanData:3,northDesc:0},Mc)}}const Nt=[];function $i(i,t=ee){let e;const n=new Set;function o(a){if(te(i,a)&&(i=a,e)){const l=!Nt.length;for(const c of n)c[1](),Nt.push(c,i);if(l){for(let c=0;c<Nt.length;c+=2)Nt[c][0](Nt[c+1]);Nt.length=0}}}function s(a){o(a(i))}function r(a,l=ee){const c=[a,l];return n.add(c),n.size===1&&(e=t(o)||ee),a(i),()=>{n.delete(c),n.size===0&&(e(),e=null)}}return{set:o,update:s,subscribe:r}}function Oc(i){ae(i,"svelte-1gfoniz","img.svelte-1gfoniz{width:100%;height:100%}")}function Hc(i){let t,e;return{c(){t=Q("img"),et(t.src,e=i[0])||b(t,"src",e),b(t,"alt","floorplan iamge"),b(t,"class","svelte-1gfoniz")},m(n,o){T(n,t,o)},p(n,[o]){o&1&&!et(t.src,e=n[0])&&b(t,"src",e)},i:ee,o:ee,d(n){n&&z(t)}}}function Fc(i,t,e){let{url:n}=t;return i.$$set=o=>{"url"in o&&e(0,n=o.url)},[n]}class Gc extends oe{constructor(t){super(),ie(this,t,Fc,Hc,te,{url:0},Oc)}}function Nc(i){ae(i,"svelte-ub47ya",".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}")}function Wc(i){let t,e,n,o;return{c(){t=Q("div"),e=new Yn(!1),n=Z(),o=new Yn(!1),e.a=n,o.a=null,b(t,"class","floorplan-plugin__base-image svelte-ub47ya")},m(s,r){T(s,t,r),e.m(i[1],t),O(t,n),o.m(i[0],t)},p(s,[r]){r&1&&o.p(s[0])},i:ee,o:ee,d(s){s&&z(t)}}}function Xc(i,t,e){let{content:n}=t;const o=`
|
|
106
|
+
opacity: ${l-u*d}`}}function qn(i,{delay:t=0,speed:e,duration:n,easing:o=Zt}={}){let s=i.getTotalLength();const r=getComputedStyle(i);return r.strokeLinecap!=="butt"&&(s+=parseInt(r.strokeWidth)),n===void 0?e===void 0?n=800:n=s/e:typeof n=="function"&&(n=n(s)),{delay:t,duration:n,easing:o,css:(a,l)=>`stroke-dasharray: ${a*s} ${l*s}`}}const At="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAMAAAANf8AYAAAC2VBMVEUAAACCnP+Dn/+Enf+HqP+Gp/+Fof+Gpf+IrP+Lsf+Dof+Cmv+Lsv+Mtf+Eo/+Bmf+JrP+Hqf+Env+Krv+Fo/+Pu/+Ms/+Qvv+Hqf+RwP+KsP+Fpf+Mtv+Gov+Bnf+Qv/+Nt/+Krv+Ho/+Rwf+Ouv+Emv+Amv+SxP+Sw/+NuP+Mtf/G0f6huP+Ot/+JrP+Jqv+Dnv+crf6Uqv////+QvP+PvP+Ms//J0/3p9/+Ux/+Ouf+Krf+Iqf+Fpv+/zf6WsP+MpP+RqP+Uyf+Jy//V3P6Yuf+Qqf+Rqv/5/f+Sxf+Jy/////+Lx/+Ouf+Nw/+Owv+PwP+Jr/+Jq/+VvP+Vuv/c4v+Fnf+btP+InP+Blf/3+P6Txf+Jzf+Jyf+NxP+Qwf/t8/6Svv+Tvf/O1f7Czv3T2f6cu/+qvP7a4fvo7v77/v/o9//p9//0+v////+Vy//w9//k8/+B1f/v9/+D0/+UyP/u9v+D0v/i8f+F0v/g7/+G0P+KzP+Hz/////+Lx//s8/+Puf/h7P+Mxv/w9f7q8v/q8f2RwP/r8f6JrP/t8v6RvP/l6f7////j6P6VvP/f5/7q8P7a4P/U2f6au/+ZuP+ewf+auP+iu//n6f2Fn//j6P/h4fn9/v/4/P/3/P/o9v/l9P+F1P+B1f/i8v+UyP+J0f+E0f/h7//r8v6Izf/g7v/q8v6Pv//f7P7f7f/g7f+Lxf+MyP+Mw//k7v6Ow/+Ov//v8/2Pu//t8f+Tvv/p8P6Uu//q7v/i6P2Xvf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jmQotWi/VOFael1lR7ep4JfRZy8nhpwtG4wMMB/gdi9/nNH+vhezsmJ+fG5quX12fomHl6J+KFy88uA2RJyJPE4wkL4wIPBfgXxO5HxGN7zNw5W2bNnLZhio+OmaR3LD6tplrLfKeYAwX7/O6Dje/2dpniwuKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==";function xc(i){return i*180/Math.PI}function kc(i){ae(i,"svelte-17cl35n",".floorplan__camera-position.svelte-17cl35n{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17cl35n{position:absolute;background-repeat:no-repeat;background-size:100%}")}function Dc(i){let t,e;return{c(){t=Q("div"),e=Q("div"),b(e,"class","floorplan__camera-rotate svelte-17cl35n"),H(e,"background-image",`url(${i[0]||At})`),H(e,"width",i[4]),H(e,"height",i[4]),H(e,"left","-"+i[4]),H(e,"top","-"+i[4]),H(e,"transform",`rotate(${i[3]}deg)`),H(e,"transform-origin",`${i[4]} ${i[4]}`),b(t,"class","floorplan__camera-position svelte-17cl35n"),H(t,"left",i[1]),H(t,"top",i[2])},m(n,o){T(n,t,o),O(t,e)},p(n,[o]){o&1&&H(e,"background-image",`url(${n[0]||At})`)},i:ee,o:ee,d(n){n&&z(t)}}}function Lc(i,t,e){let{panoIndex:n}=t,{floorplanData:o}=t,{lastPanoramaLongitude:s}=t,{cameraImageUrl:r}=t;const{observers:a}=o,l=a[n],c=l.positionInImage.x,u=l.positionInImage.y,f=c*100+"%",d=u*100+"%",p=-xc(s)+45,m=document.body.clientWidth,g=document.body.clientHeight,v=`${(m<500||g<500?17:37)/16}rem`;return i.$$set=C=>{"panoIndex"in C&&e(5,n=C.panoIndex),"floorplanData"in C&&e(6,o=C.floorplanData),"lastPanoramaLongitude"in C&&e(7,s=C.lastPanoramaLongitude),"cameraImageUrl"in C&&e(0,r=C.cameraImageUrl)},[r,f,d,p,v,n,o,s]}class Sc extends oe{constructor(t){super(),ie(this,t,Lc,Dc,te,{panoIndex:5,floorplanData:6,lastPanoramaLongitude:7,cameraImageUrl:0},kc)}}const zc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAMAAABdA4ieAAAC91BMVEUAAACOpP/H0P+yxP/a4/+asv/W3/+/z/+cs//S3f+mu//Q2//5+v/H1P/d5f/l6//y9f++zf/i6f+ww/+ovP/7/P/u8v/N2f+Mp//q7/+4yf+uwf+Wr/+7y/+1xv+Ho//x9P+9zP+2x/+swP+gt/+Oqf/Y4v/r8P/l7P/b4//F0/+juf+Zsv+XsP+Trf/p7v97mv9wj/+kuv+ftf/x9P92lf/3+f/I1f+5yv+Eof98m//8/f/4+f90lf+9zf/j6f/T3f/L1/+Bnv/6+/+SrP/m7P/f5v/O2v/L2P/E0v/Az//+///s8P/e5v+rv/+pvv+Anv+qvv+Pqv+Kpv+CoP93l/9xlP/z9v/p7v90lf9uj//P2//v8//o7f/k6v/K1v+6yv9rjv98nv/E0v/9/v/09//h6P/X4f9pjP/9/f/N2f/K1v/C0f+Ho/99nP/1+P9sj//6+//u8/+iuP/u8//g6P/U3v+3x/+0xv+etf+Vrv9pjf/B0P9ukf+ht/+Vr/94mP/G0/+8zP+2x//+/v/09v/W4f9ojv/c5P+xxP/d5v+xw/+vwv+Jo//g6P+nvP+SrP/R3P/1+f/W3//U3//C0P+Jp/9nh/+Kpv+Fov/Y4f/J1/+Pqf+rv/+Oqv+Oqv+muv+twP/f5//t8P97mf/h5/+twP+kuf/L2P+juP+Ipf+huP+Pqf/d5v+zxf+cs/+Zsf+wwv/V3v+8zP+Go/+zxP+GpP/T3f/r8P/u8v/o7f/d5P/m7P/H1P/w9P/D0f+uwf/Z4v/F0v/09//D0v/v8//s8v/d5P/Y4f/s8P+etv/X4f+gt/+ovf+bsv+xw/+Vr//j6v+1x//J1v+4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hN6sjtBjTmm+KmYcwPEOKs9tHF1JDHCoHLZ5DQ8yPBic9DoHjAKvsb85qjbFxHOCprMZaf5qdhlorxwGeTsPIttvPlno0y3GAZfbHp6n3ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";function Mc(i){ae(i,"svelte-rpkaro",".floorplan-plugin__compass.svelte-rpkaro{position:absolute;left:50%;top:-2.875rem;width:14.4375rem;height:2.5625rem;will-change:opacity;transform-origin:center 11.5rem}.floorplan-plugin__compass-image.svelte-rpkaro{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-rpkaro{position:absolute;left:50%;top:0.9375rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.625rem;color:#fff}")}function Tc(i){let t,e,n,o,s;return{c(){t=Q("div"),e=Q("div"),n=Z(),o=Q("span"),s=ke(i[0]),b(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),H(e,"background-image",`url(${zc})`),b(o,"class","floorplan-plugin__compass-text svelte-rpkaro"),b(t,"class","floorplan-plugin__compass svelte-rpkaro"),H(t,"transform",i[2])},m(r,a){T(r,t,a),O(t,e),O(t,n),O(t,o),O(o,s)},p(r,a){a&1&&Te(s,r[0])},d(r){r&&z(t)}}}function Bc(i){let t,e=i[1]&&Tc(i);return{c(){e&&e.c(),t=he()},m(n,o){e&&e.m(n,o),T(n,t,o)},p(n,[o]){n[1]&&e.p(n,o)},i:ee,o:ee,d(n){e&&e.d(n),n&&z(t)}}}function jc(i){return i/Math.PI*180}function Qc(i,t,e){var c;let{floorplanData:n}=t,{northDesc:o}=t;const s=(c=n.entrance)==null?void 0:c.northRad,r=typeof s=="number",l=`translateX(-50%) translateZ(10px) rotate(${-(s?jc(s):0)+90}deg)`;return i.$$set=u=>{"floorplanData"in u&&e(3,n=u.floorplanData),"northDesc"in u&&e(0,o=u.northDesc)},[o,r,l,n]}class Rc extends oe{constructor(t){super(),ie(this,t,Qc,Bc,te,{floorplanData:3,northDesc:0},Mc)}}const Nt=[];function $i(i,t=ee){let e;const n=new Set;function o(a){if(te(i,a)&&(i=a,e)){const l=!Nt.length;for(const c of n)c[1](),Nt.push(c,i);if(l){for(let c=0;c<Nt.length;c+=2)Nt[c][0](Nt[c+1]);Nt.length=0}}}function s(a){o(a(i))}function r(a,l=ee){const c=[a,l];return n.add(c),n.size===1&&(e=t(o)||ee),a(i),()=>{n.delete(c),n.size===0&&(e(),e=null)}}return{set:o,update:s,subscribe:r}}function Oc(i){ae(i,"svelte-1gfoniz","img.svelte-1gfoniz{width:100%;height:100%}")}function Hc(i){let t,e;return{c(){t=Q("img"),et(t.src,e=i[0])||b(t,"src",e),b(t,"alt","floorplan iamge"),b(t,"class","svelte-1gfoniz")},m(n,o){T(n,t,o)},p(n,[o]){o&1&&!et(t.src,e=n[0])&&b(t,"src",e)},i:ee,o:ee,d(n){n&&z(t)}}}function Fc(i,t,e){let{url:n}=t;return i.$$set=o=>{"url"in o&&e(0,n=o.url)},[n]}class Gc extends oe{constructor(t){super(),ie(this,t,Fc,Hc,te,{url:0},Oc)}}function Nc(i){ae(i,"svelte-ub47ya",".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}")}function Wc(i){let t,e,n,o;return{c(){t=Q("div"),e=new Yn(!1),n=Z(),o=new Yn(!1),e.a=n,o.a=null,b(t,"class","floorplan-plugin__base-image svelte-ub47ya")},m(s,r){T(s,t,r),e.m(i[1],t),O(t,n),o.m(i[0],t)},p(s,[r]){r&1&&o.p(s[0])},i:ee,o:ee,d(s){s&&z(t)}}}function Xc(i,t,e){let{content:n}=t;const o=`
|
|
107
107
|
<style>
|
|
108
108
|
svg [type='lineGroup'] path {
|
|
109
109
|
fill: #ffffff;
|
|
@@ -112,7 +112,7 @@ transition: all 500ms;
|
|
|
112
112
|
svg [type='lineItemGroup'] g g g g {
|
|
113
113
|
stroke: #ffffff;
|
|
114
114
|
}</style>
|
|
115
|
-
`;return i.$$set=s=>{"content"in s&&e(0,n=s.content)},[n,o]}class Yc extends oe{constructor(t){super(),ie(this,t,Xc,Wc,te,{content:0},Nc)}}function Uc(i){ae(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function Vc(i){let t,e;return t=new Gc({props:{url:i[1].url}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.url=n[1].url),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Jc(i){let t,e;return t=new Yc({props:{content:i[0]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.content=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Zc(i){let t,e,n,o;const s=[Jc,Vc],r=[];function a(l,c){return l[0]?0:l[1]?1:-1}return~(e=a(i))&&(n=r[e]=s[e](i)),{c(){t=Q("div"),n&&n.c(),b(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){T(l,t,c),~e&&r[e].m(t,null),o=!0},p(l,[c]){let u=e;e=a(l),e===u?~e&&r[e].p(l,c):(n&&(le(),M(r[u],1,1,()=>{r[u]=null}),ce()),~e?(n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),k(n,1),n.m(t,null)):n=null)},i(l){o||(k(n),o=!0)},o(l){M(n),o=!1},d(l){l&&z(t),~e&&r[e].d()}}}function _c(i,t,e){let n,o,{floorIndex:s}=t,{floorplanData:r}=t;return i.$$set=a=>{"floorIndex"in a&&e(2,s=a.floorIndex),"floorplanData"in a&&e(3,r=a.floorplanData)},i.$$.update=()=>{var a,l;i.$$.dirty&12&&e(1,n=r.outlines[s]),i.$$.dirty&12&&e(0,o=(l=(a=r.outlines)==null?void 0:a[s])==null?void 0:l.svgContent)},[o,n,s,r]}class fa extends oe{constructor(t){super(),ie(this,t,_c,Zc,te,{floorIndex:2,floorplanData:3},Uc)}}function qc(i){ae(i,"svelte-12pzct5",".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}")}function Kc(i){let t,e=i[4].outerHTML+"",n;return{c(){t=new Yn(!1),n=he(),t.a=n},m(o,s){t.m(e,o,s),T(o,n,s)},p(o,s){s&16&&e!==(e=o[4].outerHTML+"")&&t.p(e)},d(o){o&&z(n),o&&t.d()}}}function $c(i){let t,e=i[0].name+"",n,o,s,r;return{c(){t=Q("span"),n=ke(e),o=Z(),s=Q("span"),r=ke(i[5]),b(t,"class","floorplan-plugin__room-name"),b(s,"class","floorplan-plugin__room-size svelte-12pzct5")},m(a,l){T(a,t,l),O(t,n),T(a,o,l),T(a,s,l),O(s,r)},p(a,l){l&1&&e!==(e=a[0].name+"")&&Te(n,e),l&32&&Te(r,a[5])},d(a){a&&z(t),a&&z(o),a&&z(s)}}}function eu(i){let t;function e(s,r){if(s[1]===void 0)return $c;if(s[4])return Kc}let n=e(i),o=n&&n(i);return{c(){t=Q("div"),o&&o.c(),b(t,"class","floorplan-plugin__room-label-item svelte-12pzct5"),H(t,"left",i[6]),H(t,"top",i[7]),H(t,"font-size",i[8]),H(t,"opacity",i[3]?"1":"0")},m(s,r){T(s,t,r),o&&o.m(t,null),i[16](t)},p(s,[r]){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null))),r&8&&H(t,"opacity",s[3]?"1":"0")},i:ee,o:ee,d(s){s&&z(t),o&&o.d(),i[16](null)}}}function tu(i,t){const e=i[0],n=i[1];let o=!1;for(let s=0,r=t.length-1;s<t.length;r=s++){const a=t[s][0],l=t[s][1],c=t[r][0],u=t[r][1];l>n!=u>n&&e<(c-a)*(n-l)/(u-l)+a&&(o=!o)}return o}function nu(i,t,e){let n,o,s,r,{pxmm:a}=t,{room:l}=t,{hoveredRoom:c}=t,{getRoomAreaText:u}=t,{getLabelElement:f}=t,{adaptiveRoomLabelVisibleEnable:d}=t;function p(P,j){if(j.width===0||j.height===0)return()=>!1;const B=P.path.map(({x:ne,y:X})=>[ne,X]),G=P.roomLabel.position,{x:U,y:I}=G,{width:S,height:R}=j,W=S/2,Y=R/2;return function(X){const V=U*X,ue=I*X,de=B.map(([Ce,De])=>[Ce*X,De*X]);return[[V+W,ue-Y],[V-W,ue-Y],[V-W,ue+Y],[V+W,ue+Y]].every(Ce=>tu(Ce,de))}}const m=document.body.clientWidth,g=document.body.clientHeight,A=l.roomLabel,v=A.positionInImage.x*100+"%",C=A.positionInImage.y*100+"%",w=(m<500||g<500?10:14)/16+"rem";let x=!1,D,y;c.subscribe(function(j){e(13,x=!!j&&j.id===l.id)}),Ye(()=>{const P=D==null?void 0:D.getClientRects()[0];e(14,y={width:P.width,height:P.height})});function L(P){Me[P?"unshift":"push"](()=>{D=P,e(2,D)})}return i.$$set=P=>{"pxmm"in P&&e(9,a=P.pxmm),"room"in P&&e(0,l=P.room),"hoveredRoom"in P&&e(10,c=P.hoveredRoom),"getRoomAreaText"in P&&e(11,u=P.getRoomAreaText),"getLabelElement"in P&&e(1,f=P.getLabelElement),"adaptiveRoomLabelVisibleEnable"in P&&e(12,d=P.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{i.$$.dirty&2049&&e(5,n=l.size?u(l.size):""),i.$$.dirty&16385&&e(15,o=y?p(l,y):void 0),i.$$.dirty&3&&e(4,s=f==null?void 0:f(l)),i.$$.dirty&45568&&e(3,r=d?x?!0:!!(o!=null&&o(a)):!0)},[l,f,D,r,s,n,v,C,w,a,c,u,d,x,y,o,L]}class iu extends oe{constructor(t){super(),ie(this,t,nu,eu,te,{pxmm:9,room:0,hoveredRoom:10,getRoomAreaText:11,getLabelElement:1,adaptiveRoomLabelVisibleEnable:12},qc)}}function ou(i){ae(i,"svelte-13xux0b",".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}")}function Lo(i,t,e){const n=i.slice();return n[10]=t[e],n}function So(i){let t,e=[],n=new Map,o,s,r=i[6];const a=l=>l[10].id;for(let l=0;l<r.length;l+=1){let c=Lo(i,r,l),u=a(c);n.set(u,e[l]=zo(u,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","floorplan-plugin__room-labels svelte-13xux0b"),xe(()=>i[9].call(t))},m(l,c){T(l,t,c);for(let u=0;u<e.length;u+=1)e[u].m(t,null);o=vt(t,i[9].bind(t)),s=!0},p(l,c){c&111&&(r=l[6],le(),e=Ue(e,c,a,1,l,r,n,t,at,zo,null,Lo),ce())},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)M(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function zo(i,t){let e,n,o;const s=[{pxmm:t[5],room:t[10],getLabelElement:t[2],getRoomAreaText:t[1],hoveredRoom:t[0],adaptiveRoomLabelVisibleEnable:t[3]}];let r={};for(let a=0;a<s.length;a+=1)r=we(r,s[a]);return n=new iu({props:r}),{key:i,first:null,c(){e=he(),$(n.$$.fragment),this.first=e},m(a,l){T(a,e,l),q(n,a,l),o=!0},p(a,l){t=a;const c=l&111?Be(s,[{pxmm:t[5],room:t[10],getLabelElement:t[2],getRoomAreaText:t[1],hoveredRoom:t[0],adaptiveRoomLabelVisibleEnable:t[3]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){M(n.$$.fragment,a),o=!1},d(a){a&&z(e),K(n,a)}}}function su(i){let t,e,n=i[6]&&So(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[6]?n?(n.p(o,s),s&64&&k(n,1)):(n=So(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function ru(i,t,e){let n,{floorIndex:o}=t,{floorplanData:s}=t,{hoveredRoom:r}=t,{getRoomAreaText:a}=t,{getLabelElement:l}=t,{adaptiveRoomLabelVisibleEnable:c}=t,u=0,f=0;function d(){u=this.clientWidth,e(4,u)}return i.$$set=p=>{"floorIndex"in p&&e(7,o=p.floorIndex),"floorplanData"in p&&e(8,s=p.floorplanData),"hoveredRoom"in p&&e(0,r=p.hoveredRoom),"getRoomAreaText"in p&&e(1,a=p.getRoomAreaText),"getLabelElement"in p&&e(2,l=p.getLabelElement),"adaptiveRoomLabelVisibleEnable"in p&&e(3,c=p.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{if(i.$$.dirty&384&&e(6,n=s.floorDatas[o].rooms),i.$$.dirty&272){const{max:p,min:m}=s.bounding,g=p.x-m.x;e(5,f=u/g)}},[r,a,l,c,u,f,n,o,s,d]}class au extends oe{constructor(t){super(),ie(this,t,ru,su,te,{floorIndex:7,floorplanData:8,hoveredRoom:0,getRoomAreaText:1,getLabelElement:2,adaptiveRoomLabelVisibleEnable:3},ou)}}function lu(i){ae(i,"svelte-djlmk4",".floorplan-plugin__rule-labels.svelte-djlmk4.svelte-djlmk4{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-djlmk4.svelte-djlmk4{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4.svelte-djlmk4{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4.svelte-djlmk4{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4.svelte-djlmk4{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-djlmk4.svelte-djlmk4{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale-wrapper.svelte-djlmk4{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-djlmk4.svelte-djlmk4{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale.svelte-djlmk4{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute}.floorplan-plugin__rule-labels--top.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-djlmk4.svelte-djlmk4{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-text-item.svelte-djlmk4{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-djlmk4.svelte-djlmk4{width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}")}function Mo(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function To(i,t,e){const n=i.slice();return n[14]=t[e],n}function Bo(i){let t;return{c(){t=Q("div"),b(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),H(t,"left",i[14].left*100+"%"),H(t,"bottom",i[14].bottom*100+"%")},m(e,n){T(e,t,n)},p:ee,d(e){e&&z(t)}}}function jo(i,t){let e,n,o=t[1](t[11].distance)+"",s,r;return{key:i,first:null,c(){e=Q("div"),n=Q("div"),s=ke(o),r=Z(),b(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),_(n,"is-row",t[2]),b(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),H(e,"left",t[11].left*100+"%"),H(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){T(a,e,l),O(e,n),O(n,s),O(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&Te(s,o)},d(a){a&&z(e)}}}function cu(i){let t,e,n,o,s,r,a=[],l=new Map,c,u=i[3],f=[];for(let m=0;m<u.length;m+=1)f[m]=Bo(To(i,u,m));let d=i[4];const p=m=>m[13];for(let m=0;m<d.length;m+=1){let g=Mo(i,d,m),A=p(g);l.set(A,a[m]=jo(A,g))}return{c(){t=Q("div"),e=Q("div"),n=Z(),o=Q("div");for(let m=0;m<f.length;m+=1)f[m].c();s=Z(),r=Q("div");for(let m=0;m<a.length;m+=1)a[m].c();b(e,"class","floorplan-plugin__rule-line svelte-djlmk4"),b(o,"class","floorplan-plugin__rule-scale-wrapper svelte-djlmk4"),_(o,"is-row",i[2]),b(r,"class","floorplan-plugin__rule-text-wrapper svelte-djlmk4"),b(t,"class",c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+i[0]+" svelte-djlmk4"),_(t,"is-row",i[2]),H(t,"width",i[2]?"100%":1/16+"rem"),H(t,"height",i[2]?1/16+"rem":"100%")},m(m,g){T(m,t,g),O(t,e),O(t,n),O(t,o);for(let A=0;A<f.length;A+=1)f[A].m(o,null);O(t,s),O(t,r);for(let A=0;A<a.length;A+=1)a[A].m(r,null)},p(m,[g]){if(g&8){u=m[3];let A;for(A=0;A<u.length;A+=1){const v=To(m,u,A);f[A]?f[A].p(v,g):(f[A]=Bo(v),f[A].c(),f[A].m(o,null))}for(;A<f.length;A+=1)f[A].d(1);f.length=u.length}g&22&&(d=m[4],a=Ue(a,g,p,1,m,d,l,r,ua,jo,null,Mo)),g&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+m[0]+" svelte-djlmk4")&&b(t,"class",c),g&5&&_(t,"is-row",m[2])},i:ee,o:ee,d(m){m&&z(t),tt(f,m);for(let g=0;g<a.length;g+=1)a[g].d()}}}const Wt=1e3,Xt=180;function uu(i,t,e){let{type:n}=t,{data:o}=t,{bounding:s}=t,{getRuleDistanceText:r}=t;const a=n==="top"||n==="bottom",l=s.max.x-s.min.x-(Wt-Xt)*2,c=s.max.y-s.min.y-(Wt-Xt)*2,u=o.map(([m,g])=>a?[m.x,g.x]:[m.y,g.y]).flat().sort().filter((m,g,A)=>g===0?!0:m!==A[g-1]),f=u.map(m=>{const g=a?(m-s.min.x-Wt+Xt)/l:0,A=a?0:(m-s.min.y-Wt+Xt)/c;return{left:g,bottom:A}});f.unshift({left:0,bottom:0}),f.push(a?{left:1,bottom:0}:{left:0,bottom:1});const d=u[u.length-1]-u[0],p=u.map((m,g,A)=>{const v=g===0?0:m-A[g-1],C=g===0?0:(m+A[g-1])/2,w=a?(C-s.min.x-Wt+Xt)/l:0,x=a?0:(C-s.min.y-Wt+Xt)/c;return{left:w,bottom:x,distance:v}}).filter(({distance:m})=>m/d>.1);return i.$$set=m=>{"type"in m&&e(0,n=m.type),"data"in m&&e(5,o=m.data),"bounding"in m&&e(6,s=m.bounding),"getRuleDistanceText"in m&&e(1,r=m.getRuleDistanceText)},[n,r,a,f,p,o,s]}class du extends oe{constructor(t){super(),ie(this,t,uu,cu,te,{type:0,data:5,bounding:6,getRuleDistanceText:1},lu)}}function fu(i){ae(i,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function Qo(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function Ro(i,t){let e,n,o;const s=[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}];let r={};for(let a=0;a<s.length;a+=1)r=we(r,s[a]);return n=new du({props:r}),{key:i,first:null,c(){e=he(),$(n.$$.fragment),this.first=e},m(a,l){T(a,e,l),q(n,a,l),o=!0},p(a,l){t=a;const c=l&19?Be(s,[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){M(n.$$.fragment,a),o=!1},d(a){a&&z(e),K(n,a)}}}function hu(i){let t,e=[],n=new Map,o,s=i[4];const r=a=>a[13];for(let a=0;a<s.length;a+=1){let l=Qo(i,s,a),c=r(l);n.set(c,e[a]=Ro(c,l))}return{c(){t=Q("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),H(t,"width",i[3]),H(t,"height",i[2])},m(a,l){T(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,[l]){l&19&&(s=a[4],le(),e=Ue(e,l,r,1,a,s,n,t,at,Ro,null,Qo),ce()),l&8&&H(t,"width",a[3]),l&4&&H(t,"height",a[2])},i(a){if(!o){for(let l=0;l<s.length;l+=1)k(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)M(e[l]);o=!1},d(a){a&&z(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const Oo=1e3,Ho=180;function mu(i,t,e){let n,o,s,r,a,l,c,u,f,d,{floorIndex:p}=t,{floorplanData:m}=t,{getRuleDistanceText:g}=t;return i.$$set=A=>{"floorIndex"in A&&e(5,p=A.floorIndex),"floorplanData"in A&&e(6,m=A.floorplanData),"getRuleDistanceText"in A&&e(0,g=A.getRuleDistanceText)},i.$$.update=()=>{i.$$.dirty&64&&e(1,n=m.bounding),i.$$.dirty&96&&e(11,o=m.floorDatas[p].rules),i.$$.dirty&2048&&e(12,s=Object.keys(o)),i.$$.dirty&6144&&e(4,r=s.map(A=>[A,o[A]])),i.$$.dirty&2&&e(9,a=n.max.x-n.min.x),i.$$.dirty&2&&e(7,l=n.max.y-n.min.y),i.$$.dirty&2&&e(10,c=n.max.x-n.min.x-(Oo-Ho)*2),i.$$.dirty&2&&e(8,u=n.max.y-n.min.y-(Oo-Ho)*2),i.$$.dirty&1536&&e(3,f=c/a*100+"%"),i.$$.dirty&384&&e(2,d=u/l*100+"%")},[g,n,d,f,r,p,m,l,u,a,c,o,s]}class pu extends oe{constructor(t){super(),ie(this,t,mu,hu,te,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},fu)}}function si(i,t={}){let e="";const{needZ:n,needA:o}=t;return(n?i.slice().concat(i[0]):i.slice()).forEach((r,a)=>{const{x:l,y:c}=t.format?t.format(r):r,u=l+","+c;return a===0?(e+="M"+u,e):o!=null&&o[a]?(e+="A"+o[a]+","+u,e):(e+="L"+u,e)}),e+(n?"Z":"")}function ha({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function gu(i,t){const e=i.x*1e3+t.bounding.origin.x,n=-i.z*1e3+t.bounding.origin.y;return{x:e,y:n}}function Au(i,t){const e=t.bounding,n=e.max.x-e.min.x,o=e.max.y-e.min.y;return{x:(i.x-e.min.x)/n,y:(e.max.y-i.y)/o}}function vu(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function bu(i){let t;return{c(){t=Ae("path"),b(t,"d",i[0]),b(t,"fill","#2F313A")},m(e,n){T(e,t,n)},p(e,[n]){n&1&&b(t,"d",e[0])},i:ee,o:ee,d(e){e&&z(t)}}}function yu(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=si(o,{needZ:!0}))},[n,o]}class wu extends oe{constructor(t){super(),ie(this,t,yu,bu,te,{path:1})}}function Cu(i){let t,e,n,o,s,r;return{c(){t=Ae("defs"),e=Ae("pattern"),n=Ae("rect"),o=Ae("path"),s=Z(),r=Ae("path"),b(n,"x","0"),b(n,"y","0"),b(n,"width",i[1]),b(n,"height",i[1]),b(n,"fill","#323747"),b(o,"d",i[2]),b(o,"stroke","#ffffff"),b(o,"stroke-opacity","0.06"),b(o,"stroke-width","0.5"),b(o,"fill","none"),b(e,"id","fpm-room-pattern-0"),b(e,"x","0"),b(e,"y","0"),b(e,"width",i[1]),b(e,"height",i[1]),b(e,"patternUnits","userSpaceOnUse"),b(e,"patternTransform","scale(50 50)"),b(r,"d",i[0]),b(r,"fill","url(#fpm-room-pattern-0)")},m(a,l){T(a,t,l),O(t,e),O(e,n),O(e,o),T(a,s,l),T(a,r,l)},p(a,[l]){l&1&&b(r,"d",a[0])},i:ee,o:ee,d(a){a&&z(t),a&&z(s),a&&z(r)}}}const vi=6;function Eu(i,t,e){let n,{path:o}=t;const s=vi*2,r=`M0 ${vi} h ${s} M${vi} 0 v ${s}`;return i.$$set=a=>{"path"in a&&e(3,o=a.path)},i.$$.update=()=>{i.$$.dirty&8&&e(0,n=si(o,{needZ:!0}))},[n,s,r,o]}class Pu extends oe{constructor(t){super(),ie(this,t,Eu,Cu,te,{path:3})}}function Iu(i){let t,e,n,o,s,r,a,l,c,u,f;return{c(){t=Ae("defs"),e=Ae("pattern"),n=Ae("rect"),o=Ae("pattern"),s=Ae("rect"),r=Z(),a=Ae("path"),l=Z(),c=Ae("path"),u=Z(),f=Ae("path"),b(n,"x","0"),b(n,"y","0"),b(n,"width","6"),b(n,"height","50"),b(n,"fill","none"),b(n,"stroke","#4B4B57"),b(n,"stroke-width","0.5"),b(e,"id","room-material-pattern-1"),b(e,"x","0"),b(e,"y","0"),b(e,"width","12"),b(e,"height","50"),b(e,"patternUnits","userSpaceOnUse"),b(e,"patternTransform","scale(50 50)"),b(s,"x","0"),b(s,"y","0"),b(s,"width","6"),b(s,"height","50"),b(s,"fill","none"),b(s,"stroke","#4B4B57"),b(s,"stroke-width","0.5"),b(o,"id","room-material-pattern-2"),b(o,"x","6"),b(o,"y","25"),b(o,"width","12"),b(o,"height","50"),b(o,"patternUnits","userSpaceOnUse"),b(o,"patternTransform","scale(50 50)"),b(a,"d",i[0]),b(a,"fill","#43434D"),b(c,"d",i[0]),b(c,"fill","url(#room-material-pattern-1)"),b(f,"d",i[0]),b(f,"fill","url(#room-material-pattern-2)")},m(d,p){T(d,t,p),O(t,e),O(e,n),O(t,o),O(o,s),T(d,r,p),T(d,a,p),T(d,l,p),T(d,c,p),T(d,u,p),T(d,f,p)},p(d,[p]){p&1&&b(a,"d",d[0]),p&1&&b(c,"d",d[0]),p&1&&b(f,"d",d[0])},i:ee,o:ee,d(d){d&&z(t),d&&z(r),d&&z(a),d&&z(l),d&&z(c),d&&z(u),d&&z(f)}}}function xu(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=si(o,{needZ:!0}))},[n,o]}class ku extends oe{constructor(t){super(),ie(this,t,xu,Iu,te,{path:1})}}function Du(i){ae(i,"svelte-1dykexu",".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}")}function Fo(i,t,e){const n=i.slice();return n[5]=t[e],n}function Lu(i){let t,e;return t=new Pu({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Su(i){let t,e;return t=new ku({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function zu(i){let t,e;return t=new wu({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Go(i){let t,e,n,o;const s=[zu,Su,Lu],r=[];function a(l,c){return l[5].floorType===1?0:l[5].floorType===0?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=Ae("svg"),n.c(),b(t,"width","100%"),b(t,"height","100%"),b(t,"viewBox",`0 0 ${i[1]} ${i[2]}`),b(t,"class","svelte-1dykexu")},m(l,c){T(l,t,c),r[e].m(t,null),o=!0},p(l,c){let u=e;e=a(l),e===u?r[e].p(l,c):(le(),M(r[u],1,1,()=>{r[u]=null}),ce(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),k(n,1),n.m(t,null))},i(l){o||(k(n),o=!0)},o(l){M(n),o=!1},d(l){l&&z(t),r[e].d()}}}function Mu(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=Go(Fo(i,n,r));const s=r=>M(o[r],1,1,()=>{o[r]=null});return{c(){t=Q("div");for(let r=0;r<o.length;r+=1)o[r].c();b(t,"class","floorplan-plugin__room-material svelte-1dykexu")},m(r,a){T(r,t,a);for(let l=0;l<o.length;l+=1)o[l].m(t,null);e=!0},p(r,[a]){if(a&7){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=Fo(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=Go(c),o[l].c(),k(o[l],1),o[l].m(t,null))}for(le(),l=n.length;l<o.length;l+=1)s(l);ce()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)k(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)M(o[a]);e=!1},d(r){r&&z(t),tt(o,r)}}}function Tu(i,t,e){let n,{floorIndex:o}=t,{floorplanData:s}=t;const r=s.bounding.max.x-s.bounding.min.x,a=s.bounding.max.y-s.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(3,o=l.floorIndex),"floorplanData"in l&&e(4,s=l.floorplanData)},i.$$.update=()=>{i.$$.dirty&24&&e(0,n=s.floorDatas[o].rooms.map(l=>fe(N({},l),{path:l.path.map(c=>ha(c,s.bounding))})))},[n,r,a,o,s]}class Bu extends oe{constructor(t){super(),ie(this,t,Tu,Mu,te,{floorIndex:3,floorplanData:4},Du)}}function ju(i){ae(i,"svelte-19uvvss","path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}")}function Qu(i){let t,e,n;return{c(){t=Ae("path"),b(t,"d",i[2]),b(t,"fill","#fff"),b(t,"class","svelte-19uvvss")},m(o,s){T(o,t,s),e||(n=[Pe(t,"mouseenter",i[0]),Pe(t,"mouseleave",i[1])],e=!0)},p:ee,i:ee,o:ee,d(o){o&&z(t),e=!1,rt(n)}}}function Ru(i,t,e){let{room:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t;function r(){s.set(n)}function a(){s.set(void 0)}const{bounding:l}=o,c=si(n.path,{needZ:!0,format:u=>ha(u,l)});return i.$$set=u=>{"room"in u&&e(3,n=u.room),"floorplanData"in u&&e(4,o=u.floorplanData),"hoveredRoom"in u&&e(5,s=u.hoveredRoom)},[r,a,c,n,o,s]}class Ou extends oe{constructor(t){super(),ie(this,t,Ru,Qu,te,{room:3,floorplanData:4,hoveredRoom:5},ju)}}function Hu(i){ae(i,"svelte-1kqo6e4",".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}")}function No(i,t,e){const n=i.slice();return n[5]=t[e],n}function Wo(i,t){let e,n,o;const s=[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}];let r={};for(let a=0;a<s.length;a+=1)r=we(r,s[a]);return n=new Ou({props:r}),{key:i,first:null,c(){e=he(),$(n.$$.fragment),this.first=e},m(a,l){T(a,e,l),q(n,a,l),o=!0},p(a,l){t=a;const c=l&7?Be(s,[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){M(n.$$.fragment,a),o=!1},d(a){a&&z(e),K(n,a)}}}function Fu(i){let t,e,n=[],o=new Map,s,r=i[1].floorDatas[i[0]].rooms;const a=l=>l[5].id;for(let l=0;l<r.length;l+=1){let c=No(i,r,l),u=a(c);o.set(u,n[l]=Wo(u,c))}return{c(){t=Q("div"),e=Ae("svg");for(let l=0;l<n.length;l+=1)n[l].c();b(e,"width","100%"),b(e,"height","100%"),b(e,"viewBox",`0 0 ${i[3]} ${i[4]}`),b(e,"class","svelte-1kqo6e4"),b(t,"class","floorplan-plugin__room-highlight svelte-1kqo6e4")},m(l,c){T(l,t,c),O(t,e);for(let u=0;u<n.length;u+=1)n[u].m(e,null);s=!0},p(l,[c]){c&7&&(r=l[1].floorDatas[l[0]].rooms,le(),n=Ue(n,c,a,1,l,r,o,e,at,Wo,null,No),ce())},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(n[c]);s=!0}},o(l){for(let c=0;c<n.length;c+=1)M(n[c]);s=!1},d(l){l&&z(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function Gu(i,t,e){let{floorIndex:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t;const r=o.bounding.max.x-o.bounding.min.x,a=o.bounding.max.y-o.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(0,n=l.floorIndex),"floorplanData"in l&&e(1,o=l.floorplanData),"hoveredRoom"in l&&e(2,s=l.hoveredRoom)},[n,o,s,r,a]}class ma extends oe{constructor(t){super(),ie(this,t,Gu,Fu,te,{floorIndex:0,floorplanData:1,hoveredRoom:2},Hu)}}function Nu(i){ae(i,"svelte-bl8zrz",".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}")}function Xo(i){let t,e;const n=[{floorIndex:i[1],floorplanData:i[5],hoveredRoom:i[10]}];let o={};for(let s=0;s<n.length;s+=1)o=we(o,n[s]);return t=new ma({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&1058?Be(n,[{floorIndex:s[1],floorplanData:s[5],hoveredRoom:s[10]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Yo(i){let t,e;const n=[{floorplanData:i[5],floorIndex:i[1],getRoomAreaText:i[6],getLabelElement:i[7],hoveredRoom:i[10],adaptiveRoomLabelVisibleEnable:i[9]}];let o={};for(let s=0;s<n.length;s+=1)o=we(o,n[s]);return t=new au({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&1762?Be(n,[{floorplanData:s[5],floorIndex:s[1],getRoomAreaText:s[6],getLabelElement:s[7],hoveredRoom:s[10],adaptiveRoomLabelVisibleEnable:s[9]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Uo(i){let t,e;const n=[{floorplanData:i[5],floorIndex:i[1],getRuleDistanceText:i[8]}];let o={};for(let s=0;s<n.length;s+=1)o=we(o,n[s]);return t=new pu({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&290?Be(n,[{floorplanData:s[5],floorIndex:s[1],getRuleDistanceText:s[8]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Wu(i){let t,e,n,o,s,r,a,l,c;const u=[{floorIndex:i[1],floorplanData:i[5]}];let f={};for(let v=0;v<u.length;v+=1)f=we(f,u[v]);e=new Bu({props:f});let d=i[2]&&Xo(i);const p=[{floorplanData:i[5],floorIndex:i[1]}];let m={};for(let v=0;v<p.length;v+=1)m=we(m,p[v]);s=new fa({props:m});let g=i[3]&&Yo(i),A=i[4]&&Uo(i);return{c(){t=Q("div"),$(e.$$.fragment),n=Z(),d&&d.c(),o=Z(),$(s.$$.fragment),r=Z(),g&&g.c(),a=Z(),A&&A.c(),b(t,"class",l=je(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(v,C){T(v,t,C),q(e,t,null),O(t,n),d&&d.m(t,null),O(t,o),q(s,t,null),O(t,r),g&&g.m(t,null),O(t,a),A&&A.m(t,null),c=!0},p(v,[C]){const w=C&34?Be(u,[{floorIndex:v[1],floorplanData:v[5]}]):{};e.$set(w),v[2]?d?(d.p(v,C),C&4&&k(d,1)):(d=Xo(v),d.c(),k(d,1),d.m(t,o)):d&&(le(),M(d,1,1,()=>{d=null}),ce());const x=C&34?Be(p,[{floorplanData:v[5],floorIndex:v[1]}]):{};s.$set(x),v[3]?g?(g.p(v,C),C&8&&k(g,1)):(g=Yo(v),g.c(),k(g,1),g.m(t,a)):g&&(le(),M(g,1,1,()=>{g=null}),ce()),v[4]?A?(A.p(v,C),C&16&&k(A,1)):(A=Uo(v),A.c(),k(A,1),A.m(t,null)):A&&(le(),M(A,1,1,()=>{A=null}),ce()),(!c||C&1&&l!==(l=je(`floorplan-plugin__floor${v[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&b(t,"class",l)},i(v){c||(k(e.$$.fragment,v),k(d),k(s.$$.fragment,v),k(g),k(A),c=!0)},o(v){M(e.$$.fragment,v),M(d),M(s.$$.fragment,v),M(g),M(A),c=!1},d(v){v&&z(t),K(e),d&&d.d(),K(s),g&&g.d(),A&&A.d()}}}function Xu(i,t,e){let{isCurrent:n}=t,{floorIndex:o}=t,{hoverEnable:s}=t,{roomLabelsEnable:r}=t,{ruleLabelsEnable:a}=t,{floorplanData:l}=t,{getRoomAreaText:c}=t,{getLabelElement:u}=t,{getRuleDistanceText:f}=t,{adaptiveRoomLabelVisibleEnable:d}=t;const p=$i(void 0);return i.$$set=m=>{"isCurrent"in m&&e(0,n=m.isCurrent),"floorIndex"in m&&e(1,o=m.floorIndex),"hoverEnable"in m&&e(2,s=m.hoverEnable),"roomLabelsEnable"in m&&e(3,r=m.roomLabelsEnable),"ruleLabelsEnable"in m&&e(4,a=m.ruleLabelsEnable),"floorplanData"in m&&e(5,l=m.floorplanData),"getRoomAreaText"in m&&e(6,c=m.getRoomAreaText),"getLabelElement"in m&&e(7,u=m.getLabelElement),"getRuleDistanceText"in m&&e(8,f=m.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in m&&e(9,d=m.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,u,f,d,p]}class Yu extends oe{constructor(t){super(),ie(this,t,Xu,Wu,te,{isCurrent:0,floorIndex:1,hoverEnable:2,roomLabelsEnable:3,ruleLabelsEnable:4,floorplanData:5,getRoomAreaText:6,getLabelElement:7,getRuleDistanceText:8,adaptiveRoomLabelVisibleEnable:9},Nu)}}function Uu(i){ae(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function Vo(i,t,e){const n=i.slice();return n[16]=t[e],n}function Jo(i){let t,e,n,o,s,r,a=i[9].floorDatas,l=[];for(let p=0;p<a.length;p+=1)l[p]=Zo(Vo(i,a,p));const c=p=>M(l[p],1,1,()=>{l[p]=null}),u=[{panoIndex:i[3],floorplanData:i[9],lastPanoramaLongitude:i[10],cameraImageUrl:i[11]}];let f={};for(let p=0;p<u.length;p+=1)f=we(f,u[p]);n=new Sc({props:f});let d=i[6]&&_o(i);return{c(){t=Q("div");for(let p=0;p<l.length;p+=1)l[p].c();e=Z(),$(n.$$.fragment),o=Z(),d&&d.c(),b(t,"class","floorplan-main svelte-86bqav")},m(p,m){T(p,t,m);for(let g=0;g<l.length;g+=1)l[g].m(t,null);O(t,e),q(n,t,null),O(t,o),d&&d.m(t,null),r=!0},p(p,m){if(i=p,m&62384){a=i[9].floorDatas;let A;for(A=0;A<a.length;A+=1){const v=Vo(i,a,A);l[A]?(l[A].p(v,m),k(l[A],1)):(l[A]=Zo(v),l[A].c(),k(l[A],1),l[A].m(t,e))}for(le(),A=a.length;A<l.length;A+=1)c(A);ce()}const g=m&3592?Be(u,[{panoIndex:i[3],floorplanData:i[9],lastPanoramaLongitude:i[10],cameraImageUrl:i[11]}]):{};n.$set(g),i[6]?d?(d.p(i,m),m&64&&k(d,1)):(d=_o(i),d.c(),k(d,1),d.m(t,null)):d&&(le(),M(d,1,1,()=>{d=null}),ce())},i(p){if(!r){for(let m=0;m<a.length;m+=1)k(l[m]);k(n.$$.fragment,p),k(d),s||xe(()=>{s=Ot(t,Tt,{duration:i[0],easing:Jt}),s.start()}),r=!0}},o(p){l=l.filter(Boolean);for(let m=0;m<l.length;m+=1)M(l[m]);M(n.$$.fragment,p),M(d),r=!1},d(p){p&&z(t),tt(l,p),K(n),d&&d.d()}}}function Zo(i){let t,e;const n=[{hoverEnable:i[5],floorplanData:i[9],getRoomAreaText:i[12],getLabelElement:i[13],getRuleDistanceText:i[14],roomLabelsEnable:i[7],ruleLabelsEnable:i[8],adaptiveRoomLabelVisibleEnable:i[15]},{floorIndex:i[16].floorIndex},{isCurrent:i[16].floorIndex===i[4]}];let o={};for(let s=0;s<n.length;s+=1)o=we(o,n[s]);return t=new Yu({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&62384?Be(n,[r&62368&&{hoverEnable:s[5],floorplanData:s[9],getRoomAreaText:s[12],getLabelElement:s[13],getRuleDistanceText:s[14],roomLabelsEnable:s[7],ruleLabelsEnable:s[8],adaptiveRoomLabelVisibleEnable:s[15]},r&512&&{floorIndex:s[16].floorIndex},r&528&&{isCurrent:s[16].floorIndex===s[4]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function _o(i){let t,e;return t=new Rc({props:{floorplanData:i[9],northDesc:i[2]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&512&&(s.floorplanData=n[9]),o&4&&(s.northDesc=n[2]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Vu(i){let t,e,n=i[1]&&Jo(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Jo(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Ju(i,t,e){let{duration:n=0}=t,{visible:o}=t,{northDesc:s}=t,{panoIndex:r}=t,{floorIndex:a}=t,{hoverEnable:l}=t,{compassEnable:c}=t,{roomLabelsEnable:u}=t,{ruleLabelsEnable:f}=t,{floorplanData:d}=t,{lastPanoramaLongitude:p}=t,{cameraImageUrl:m}=t,{getRoomAreaText:g}=t,{getLabelElement:A}=t,{getRuleDistanceText:v}=t,{adaptiveRoomLabelVisibleEnable:C}=t;return i.$$set=w=>{"duration"in w&&e(0,n=w.duration),"visible"in w&&e(1,o=w.visible),"northDesc"in w&&e(2,s=w.northDesc),"panoIndex"in w&&e(3,r=w.panoIndex),"floorIndex"in w&&e(4,a=w.floorIndex),"hoverEnable"in w&&e(5,l=w.hoverEnable),"compassEnable"in w&&e(6,c=w.compassEnable),"roomLabelsEnable"in w&&e(7,u=w.roomLabelsEnable),"ruleLabelsEnable"in w&&e(8,f=w.ruleLabelsEnable),"floorplanData"in w&&e(9,d=w.floorplanData),"lastPanoramaLongitude"in w&&e(10,p=w.lastPanoramaLongitude),"cameraImageUrl"in w&&e(11,m=w.cameraImageUrl),"getRoomAreaText"in w&&e(12,g=w.getRoomAreaText),"getLabelElement"in w&&e(13,A=w.getLabelElement),"getRuleDistanceText"in w&&e(14,v=w.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in w&&e(15,C=w.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,u,f,d,p,m,g,A,v,C]}class eo extends oe{constructor(t){super(),ie(this,t,Ju,Vu,te,{duration:0,visible:1,northDesc:2,panoIndex:3,floorIndex:4,hoverEnable:5,compassEnable:6,roomLabelsEnable:7,ruleLabelsEnable:8,floorplanData:9,lastPanoramaLongitude:10,cameraImageUrl:11,getRoomAreaText:12,getLabelElement:13,getRuleDistanceText:14,adaptiveRoomLabelVisibleEnable:15},Uu)}}const Zu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdL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s0ZoABAAAAAElFTkSuQmCC";function _u(i){return J(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(o){return J(this,null,function*(){const s={index:o.index,url:o.url,svgUrl:o.svg_url};if(o.svg_url){const r=yield fetch(o.svg_url,{headers:t}).then(a=>a.text());s.svgContent=r}return s})};return yield Promise.all(i.map(e))})}function qu(i){return{id:i.id,size:i.size,name:i.name,path:i.path,roomType:i.room_type,floorType:i.floor_type,roomLabel:{position:i.room_label.position,positionInImage:i.room_label.position_in_image},observerIndexs:i.observer_indexs}}function Ku(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(qu),rules:i.rules}}function $u(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function ed(i){return{rad:i.rad,position:i.position,positionInImage:i.position_in_image,northRad:i.north_rad,roomId:i.room_id,floorIndex:i.floor_index}}function At(i){return J(this,null,function*(){const t=yield _u(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(Ku),o=i.computed_data.entrance?ed(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map($u)}})}function td(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:Zu,width:45,height:48},a=vu(s,t),l=gu(s,e),c=Au(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function nd(i,t){return t(i),i}function ri(i,t){return nd({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function qo(i,t){const e=Math.max(...i.work.observers.map(n=>n.floorIndex));return t>e?i.model.bounding.max.y:Math.max(...i.work.observers.filter(n=>n.floorIndex===t).map(n=>n.standingPosition.y))}function to(i,t,e=mt.BOUNDING_CENTER){const n=qo(i,t),o=qo(i,t+1);return e===mt.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===mt.CEILING?o:n}function no(i,t,e,n){const o=to(i,e,n==null?void 0:n.attachedTo),s=new E.Vector3(0,o,0),r=new E.Vector3(1,o,0),a=s.clone().project(i.camera),l=r.clone().project(i.camera);return Math.abs((l.x-a.x)/1e3)*(t.getBoundingClientRect().width/2)}class ai{constructor(t,e){h(this,"five");h(this,"hooks",new qt);h(this,"staticPrefix","//vrlab-static.ljcdn.com");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}}class Ht extends ai{}var Fe=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(Fe||{});const pa=500,id=80;function Qi(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function ga(i,t){return J(this,null,function*(){yield new Promise((e,n)=>{i.changeMode(...t).catch(o=>n(o)),i.once("initAnimationEnded",()=>{const o=i.getCurrentState(),s=t[0];o.mode!==s&&n(new Error("mode \u4E0E\u9884\u671F\u4E0D\u7B26")),(()=>{const l=t[1];return l?Object.keys(l).every(c=>{const u=o[c];if(u===void 0)return!0;const f=l[c];return typeof u=="number"&&typeof f=="number"?Qi(u,f,2):u===f}):!0})()||n(new Error("five pose \u4E0E\u9884\u671F\u4E0D\u7B26")),e()})})})}function io(i,t){if(i.currentMode!==t.mode)return!1;const{latitude:e,longitude:n,fov:o}=t,{latitude:s,longitude:r}=i.getCurrentState(),a=i.camera.fov;return!(!Qi(e,s,2)||!Qi(n,r,2)||o!==a)}function Aa(i,t,e=!0){return J(this,null,function*(){if(io(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[u]=yield Zn(ga(i,[t.mode,t,void 0,e]));if(u)throw new Error(Fe.ChangeModeError);return}const{latitude:s,longitude:r,fov:a}=o,l=Math.min(1e3,Math.max(200,Math.abs(s-Math.PI/2)*1e3,(r>Math.PI?2*Math.PI-r:r)*500,Math.abs(a-t.fov)*10)),[c]=yield Zn(i.updateCamera(t,l,e));if(c)throw new Error(Fe.UpdateCameraError)})}function _t(i,t,e=300){const n=i.getElement();!n||(n.style.opacity=t+"",n.style.transition=e===0?"none":`opacity ${e}ms linear`,e!==0&&Promise.race([new Promise(o=>n.addEventListener("transitionend",o,{once:!0})),new Promise(o=>setTimeout(o,e))]).then(()=>{n.style.transition="none"}))}function od(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function sd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}class rd extends Ht{constructor(e,n){var a;super(e);h(this,"name","modelFloorplanPlugin");h(this,"state");h(this,"data");h(this,"showState");h(this,"showPromise");h(this,"app");h(this,"panoIndex",0);h(this,"floorIndex",0);h(this,"selector");h(this,"showRejection");h(this,"wrapper");h(this,"container",document.createElement("div"));h(this,"lastPanoramaLongitude",0);h(this,"size",{width:0,height:0});h(this,"hasAddedEventListener",!1);h(this,"isHiddenByHideFunc",!1);h(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});h(this,"show",(...n)=>J(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));h(this,"hide",(...n)=>J(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));h(this,"updateSize",()=>{if(!this.data||!io(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=no(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});h(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Fe.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});h(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});h(this,"_show",e=>J(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Fe.ModelNotLoaded);if(!this.data)throw new Error(Fe.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=N(N({},n),e),s=()=>J(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=d=>{a=!0,l=d};const[c]=yield Zn(Aa(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Fe.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const u=o.modelOpacity,f=o.immediately?0:pa;_t(this.five,u,f),this.render(f)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));h(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Fe.BreakOffByHide),this.showPromise=void 0;const o=N(N({},{userAction:!0,isAutoHide:!1}),e);_t(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});h(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});h(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});h(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});h(this,"onFiveInteriaPan",(e,n)=>{if(!n||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();o.mode==="Floorplan"&&(this.state.visible||sd(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});h(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});h(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();od(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n,isAutoHide:!0}))});h(this,"onFiveWantsGesture",(e,n)=>{if(!!this.state.visible&&(n.length>1||e==="mouseWheel"))return!1});h(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode==="Floorplan"&&this.state.config.autoShowEnable!==!1&&n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1});h(this,"onFiveWantsTapGesture",()=>this.handleClick());h(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});h(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Floorplan",longitude:0,latitude:Math.PI/2,fov:id/((a=n==null?void 0:n.scale)!=null?a:1)};const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,adaptiveRoomLabelVisibleEnable:!0,cameraImageUrl:gt,attachedTo:mt.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:l=>l.toString()},s=n?ri(n,["selector","scale"]):{},r=N(N({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return J(this,null,function*(){function s(u){return Object.prototype.hasOwnProperty.apply(u,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield At(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}this.render()}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return J(this,null,function*(){return yield At(e.data)})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=fe(N(N({},this.state),e),{config:s}),!qe(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("interiaPan",this.onFiveInteriaPan),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("interiaPan",this.onFiveInteriaPan),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=fe(N({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new eo({target:this.container,intro:!0,props:n})}}const ad=(i,t)=>new rd(i,t);function ld(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function cd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}class ud extends Ht{constructor(e,n){super(e);h(this,"name","modelFloorplanPlugin");h(this,"state");h(this,"data");h(this,"showState");h(this,"showPromise");h(this,"app");h(this,"panoIndex",0);h(this,"floorIndex",0);h(this,"selector");h(this,"showRejection");h(this,"wrapper");h(this,"container",document.createElement("div"));h(this,"lastPanoramaLongitude",0);h(this,"size",{width:0,height:0});h(this,"hasAddedEventListener",!1);h(this,"isHiddenByHideFunc",!1);h(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});h(this,"show",(...n)=>J(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));h(this,"hide",(...n)=>J(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));h(this,"updateSize",()=>{if(!this.data||!io(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=no(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});h(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Fe.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});h(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});h(this,"_show",e=>J(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Fe.ModelNotLoaded);if(!this.data)throw new Error(Fe.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=N(N({},n),e),s=()=>J(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=d=>{a=!0,l=d};const[c]=yield Zn(Aa(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Fe.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const u=o.modelOpacity,f=o.immediately?0:pa;_t(this.five,u,f),this.render(f)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));h(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Fe.BreakOffByHide),this.showPromise=void 0;const o=N(N({},{userAction:!0,isAutoHide:!1}),e);_t(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});h(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});h(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});h(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});h(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});h(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();this.updatePosition(),this.updateSize(),ld(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});h(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1){if(n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1;if(n&&!this.state.visible){if(this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();return o.mode!==this.showState.mode||this.state.visible?void 0:(cd(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})),!1)}}});h(this,"onFiveWantsTapGesture",()=>this.handleClick());h(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});h(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Mapview",longitude:0,latitude:Math.PI/2,fov:90};const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,cameraImageUrl:gt,attachedTo:mt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?ri(n,["selector","scale"]):{},r=N(N({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return J(this,null,function*(){function s(u){return Object.prototype.hasOwnProperty.apply(u,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield At(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}updatePosition(){var a;const e=to(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new E.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}formatData(e){return J(this,null,function*(){return yield At(e.data)})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=fe(N(N({},this.state),e),{config:s}),!qe(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=fe(N({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new eo({target:this.container,intro:!0,props:n})}}const dd=(i,t)=>new ud(i,t);class fd extends Ht{constructor(e,n){super(e);h(this,"name","topviewFloorplanPlugin");h(this,"state");h(this,"data");h(this,"app");h(this,"selector");h(this,"panoIndex",0);h(this,"floorIndex",0);h(this,"wrapper");h(this,"container",document.createElement("div"));h(this,"lastPanoramaLongitude",0);h(this,"size",{width:0,height:0});h(this,"hasAddedEventListener",!1);h(this,"isHiddenByHideFunc",!1);h(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=no(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});h(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});h(this,"_disable",e=>{var o,s;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,(s=this.container)==null||s.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:n})});h(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});h(this,"onFiveModeChange",(...[e,,,,n])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});h(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});h(this,"onFiveCameraUpdate",(e,n)=>{!this.state.visible||(this.updatePosition(),this.updateSize())});h(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});h(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});h(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:n}=this.five.getCurrentState();n==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});h(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"));const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,cameraImageUrl:gt,attachedTo:mt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?ri(n,["selector","scale"]):{},r=N(N({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return J(this,null,function*(){function s(u){return Object.prototype.hasOwnProperty.apply(u,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield At(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}updatePosition(){var a;const e=to(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new E.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}show(){return J(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return J(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return J(this,null,function*(){return yield At(e.data)})}_show(e){return J(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:n}=e;this.hooks.emit("show",{userAction:n,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield ga(this.five,["Topview",void 0,void 0,n])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const o=500,s=this.state.config.modelOpacity;_t(this.five,s,o),this.hooks.emit("showAnimationEnded",{userAction:n,auto:!1}),this.render()})}_hide(e){return J(this,null,function*(){if(!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n,auto:!1});const o=1,s=0;_t(this.five,o,s),this.render()})}_enable(e){const{userAction:n}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=fe(N(N({},this.state),e),{config:s}),!qe(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsMoveToPano",this.onFiveWantsMoveToPano),e.on("initAnimationEnded",this.onFiveInitAnimationEnded),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsMoveToPano",this.onFiveWantsMoveToPano),e.off("initAnimationEnded",this.onFiveInitAnimationEnded),e.off("modelShownFloorChange",this.onModelShownFloorChange)}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate3d(-50%, -50%, 10px)",zIndex:10,pointerEvents:"none","will-change":"width, height"}),this.five.addExtraElement(this.container)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=fe(N({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new eo({target:this.container,intro:!0,props:n})}}const hd=(i,t)=>new fd(i,t);function oo(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function md(i){ae(i,"svelte-1nqrlxd",".plugin-radar__camera-wrapper.svelte-1nqrlxd{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1nqrlxd{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1nqrlxd{position:absolute;left:-0.9375rem;top:-0.9375rem;width:1.0625rem;height:1.0625rem;transform-origin:0.9375rem 0.9375rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}")}function pd(i){let t,e,n;return{c(){t=Q("div"),e=Q("div"),n=Q("div"),b(n,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),H(n,"background-image","url("+(i[0]||gt)+")"),H(n,"transform",i[1]),b(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),H(e,"transform",i[2]),b(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){T(o,t,s),O(t,e),O(e,n)},p(o,[s]){s&1&&H(n,"background-image","url("+(o[0]||gt)+")"),s&2&&H(n,"transform",o[1]),s&4&&H(e,"transform",o[2])},i:ee,o:ee,d(o){o&&z(t)}}}function gd(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function Ad(i,t,e){let n,o,{five:s}=t,{pxmm:r}=t,{floorplanData:a}=t,{cameraImageUrl:l}=t,c=s.getCurrentState().panoIndex,u=s.getCurrentState().longitude;function f(m,g){const A=m.bounding,v=m.observers[g];if(!v)return"";const C=(A.max.x-A.min.x)*r,w=(A.max.y-A.min.y)*r,x=Math.floor(v.positionInImage.x*C),D=Math.floor(v.positionInImage.y*w);return`translate(${x}px, ${D}px)`}function d(m){e(6,c=m)}const p=oo(m=>{e(7,u=m.longitude)},1e3/60);return Ye(()=>(s.on("panoWillArrive",d),s.on("cameraDirectionUpdate",p),function(){s.off("panoWillArrive",d),s.off("cameraDirectionUpdate",p)})),i.$$set=m=>{"five"in m&&e(3,s=m.five),"pxmm"in m&&e(4,r=m.pxmm),"floorplanData"in m&&e(5,a=m.floorplanData),"cameraImageUrl"in m&&e(0,l=m.cameraImageUrl)},i.$$.update=()=>{i.$$.dirty&96&&e(2,n=f(a,c)),i.$$.dirty&128&&e(1,o=gd(u))},[l,o,n,s,r,a,c,u]}class vd extends oe{constructor(t){super(),ie(this,t,Ad,pd,te,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},md)}}function bd(i){ae(i,"svelte-1i87fz7",".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}")}function Ko(i,t,e){const n=i.slice();return n[1]=t[e],n}function $o(i,t){let e,n,o=`${t[1].icon.width/16}rem`,s=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:i,first:null,c(){e=Q("div"),n=Q("div"),r=Z(),b(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),H(n,"background-image",`url(${t[1].icon.url})`),H(n,"width",o),H(n,"height",s),b(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),H(e,"top",a),H(e,"left",l),this.first=e},m(c,u){T(c,e,u),O(e,n),O(e,r)},p(c,u){t=c,u&1&&H(n,"background-image",`url(${t[1].icon.url})`),u&1&&o!==(o=`${t[1].icon.width/16}rem`)&&H(n,"width",o),u&1&&s!==(s=`${t[1].icon.height/16}rem`)&&H(n,"height",s),u&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&H(e,"top",a),u&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&H(e,"left",l)},d(c){c&&z(e)}}}function yd(i){let t,e=[],n=new Map,o=i[0];const s=r=>r[1].id;for(let r=0;r<o.length;r+=1){let a=Ko(i,o,r),l=s(a);n.set(l,e[r]=$o(l,a))}return{c(){t=Q("div");for(let r=0;r<e.length;r+=1)e[r].c();b(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){T(r,t,a);for(let l=0;l<e.length;l+=1)e[l].m(t,null)},p(r,[a]){a&1&&(o=r[0],e=Ue(e,a,s,1,r,o,n,t,ua,$o,null,Ko))},i:ee,o:ee,d(r){r&&z(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function wd(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class Cd extends oe{constructor(t){super(),ie(this,t,wd,yd,te,{extraObjects:0},bd)}}function es(i){let t,e;const n=[{five:i[0],pxmm:i[1],floorIndex:i[2],floorplanData:i[4],onRoomHeightClick:i[6]}];let o={};for(let s=0;s<n.length;s+=1)o=we(o,n[s]);return t=new ma({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&87?Be(n,[{five:s[0],pxmm:s[1],floorIndex:s[2],floorplanData:s[4],onRoomHeightClick:s[6]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Ed(i){let t,e,n,o,s,r;const a=[{floorIndex:i[2],floorplanData:i[4]}];let l={};for(let u=0;u<a.length;u+=1)l=we(l,a[u]);t=new fa({props:l}),n=new Cd({props:{extraObjects:i[5]}});let c=i[3]&&es(i);return{c(){$(t.$$.fragment),e=Z(),$(n.$$.fragment),o=Z(),c&&c.c(),s=he()},m(u,f){q(t,u,f),T(u,e,f),q(n,u,f),T(u,o,f),c&&c.m(u,f),T(u,s,f),r=!0},p(u,[f]){const d=f&20?Be(a,[{floorIndex:u[2],floorplanData:u[4]}]):{};t.$set(d);const p={};f&32&&(p.extraObjects=u[5]),n.$set(p),u[3]?c?(c.p(u,f),f&8&&k(c,1)):(c=es(u),c.c(),k(c,1),c.m(s.parentNode,s)):c&&(le(),M(c,1,1,()=>{c=null}),ce())},i(u){r||(k(t.$$.fragment,u),k(n.$$.fragment,u),k(c),r=!0)},o(u){M(t.$$.fragment,u),M(n.$$.fragment,u),M(c),r=!1},d(u){K(t,u),u&&z(e),K(n,u),u&&z(o),c&&c.d(u),u&&z(s)}}}function Pd(i,t,e){let n,{five:o}=t,{pxmm:s}=t,{floorIndex:r}=t,{hoverEnable:a}=t,{floorplanData:l}=t,{extraObjects:c=[]}=t;const u=void 0;return i.$$set=f=>{"five"in f&&e(0,o=f.five),"pxmm"in f&&e(1,s=f.pxmm),"floorIndex"in f&&e(2,r=f.floorIndex),"hoverEnable"in f&&e(3,a=f.hoverEnable),"floorplanData"in f&&e(4,l=f.floorplanData),"extraObjects"in f&&e(7,c=f.extraObjects)},i.$$.update=()=>{i.$$.dirty&132&&e(5,n=c==null?void 0:c.filter(f=>f.floorIndex===r))},[o,s,r,a,l,n,u,c]}class Id extends oe{constructor(t){super(),ie(this,t,Pd,Ed,te,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:7})}}function xd(i){ae(i,"svelte-1mvqyqq",".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}")}function ts(i){let t,e,n,o=i[6]!==0&&ns(i);return{c(){t=Q("div"),o&&o.c(),b(t,"class","plugin-floorplan-radar svelte-1mvqyqq"),xe(()=>i[12].call(t))},m(s,r){T(s,t,r),o&&o.m(t,null),e=vt(t,i[12].bind(t)),n=!0},p(s,r){s[6]!==0?o?(o.p(s,r),r&64&&k(o,1)):(o=ns(s),o.c(),k(o,1),o.m(t,null)):o&&(le(),M(o,1,1,()=>{o=null}),ce())},i(s){n||(k(o),n=!0)},o(s){M(o),n=!1},d(s){s&&z(t),o&&o.d(),e()}}}function ns(i){let t,e,n,o,s=`${i[8]}px`,r=`${i[11]}px`,a;const l=[{five:i[0],pxmm:i[9],floorIndex:i[10],floorplanData:i[3],hoverEnable:i[2],extraObjects:i[5]}];let c={};for(let d=0;d<l.length;d+=1)c=we(c,l[d]);e=new Id({props:c});const u=[{pxmm:i[9],five:i[0],floorplanData:i[3],cameraImageUrl:i[4]}];let f={};for(let d=0;d<u.length;d+=1)f=we(f,u[d]);return o=new vd({props:f}),{c(){t=Q("div"),$(e.$$.fragment),n=Z(),$(o.$$.fragment),b(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),H(t,"width",s),H(t,"height",r)},m(d,p){T(d,t,p),q(e,t,null),O(t,n),q(o,t,null),a=!0},p(d,p){const m=p&1581?Be(l,[{five:d[0],pxmm:d[9],floorIndex:d[10],floorplanData:d[3],hoverEnable:d[2],extraObjects:d[5]}]):{};e.$set(m);const g=p&537?Be(u,[{pxmm:d[9],five:d[0],floorplanData:d[3],cameraImageUrl:d[4]}]):{};o.$set(g),p&256&&s!==(s=`${d[8]}px`)&&H(t,"width",s),p&2048&&r!==(r=`${d[11]}px`)&&H(t,"height",r)},i(d){a||(k(e.$$.fragment,d),k(o.$$.fragment,d),a=!0)},o(d){M(e.$$.fragment,d),M(o.$$.fragment,d),a=!1},d(d){d&&z(t),K(e),K(o)}}}function kd(i){let t,e,n=i[1]&&ts(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=ts(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Dd(i,t,e){var v,C;let{five:n}=t,{visible:o}=t,{hoverEnable:s}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,c=0,u=(C=(v=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:v.floorIndex)!=null?C:0,f=0,d=0,p=0,m=0;function g(w){e(10,u=n.work.observers[w].floorIndex)}Ye(()=>(n.on("panoArrived",g),()=>{n.off("panoArrived",g)}));function A(){f=this.clientWidth,d=this.clientHeight,e(6,f),e(7,d)}return i.$$set=w=>{"five"in w&&e(0,n=w.five),"visible"in w&&e(1,o=w.visible),"hoverEnable"in w&&e(2,s=w.hoverEnable),"floorplanData"in w&&e(3,r=w.floorplanData),"cameraImageUrl"in w&&e(4,a=w.cameraImageUrl),"extraObjects"in w&&e(5,l=w.extraObjects)},i.$$.update=()=>{if(i.$$.dirty&456){const w=Math.min(f,d),{max:x,min:D}=r.bounding,y=x.x-D.x,L=x.y-D.y,P=function(){return y>L?[w,w/y*L]:[w/L*y,w]}();e(8,p=P[0]),e(11,m=P[1]),e(9,c=p/y)}},[n,o,s,r,a,l,f,d,p,c,u,m,A]}class Ld extends oe{constructor(t){super(),ie(this,t,Dd,kd,te,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5},xd)}}class Sd extends Ht{constructor(e,n){super(e);h(this,"name","panoFloorplanRadarPlugin");h(this,"state");h(this,"data");h(this,"app");h(this,"wrapperSelector","");h(this,"wrapper",null);h(this,"disposed",!1);h(this,"extraObjects",[]);h(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});h(this,"_disable",e=>{var o;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:n})});this.five=e;const o={hoverEnable:!1,cameraImageUrl:gt},s=n!=null&&n.configs?n.configs:{},r=N(N({},o),s);this.state={enabled:!0,visible:!0,config:r},n!=null&&n.wrapper&&console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"),typeof(n==null?void 0:n.wrapper)=="string"?this.wrapperSelector=n.wrapper:(n==null?void 0:n.wrapper)instanceof Element&&(this.wrapper=n.wrapper),e.once("dispose",this.dispose)}load(e,n,o=!0){return J(this,null,function*(){function s(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=s(r)?r.data:r,l=this.data;this.data=yield At(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),n&&this.updateState(n,o),this.render()})}show(){return J(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return J(this,arguments,function*(e={}){if(!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper=e,this.render()}changeConfigs(e,n=!0){this.setState({config:e},{userAction:n}),this.render()}setExtraObjectsWith3DPositions(e){!this.data||(this.extraObjects=td(e,this.five,this.data),this.render())}formatData(e){return J(this,null,function*(){return yield At(e.data)})}_enable(e){const{userAction:n}=e;this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("show",{userAction:n}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n}),this.render()}updateState(e,n){const o=this.state;this.state=N(N({},this.state),e),!qe(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const n=document.querySelector(this.wrapperSelector);this.wrapper=n}if(!this.data||!this.wrapper)return;const e=fe(N({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects});this.app?this.app.$set(e):this.app=new Ld({target:this.wrapper,props:e})}}const zd=(i,t)=>new Sd(i,t),Md=[{type:0,floorType:1,roomType:"100900000012",name:"\u5176\u4ED6"},{type:1,floorType:1,roomType:"100900000002",name:"\u5BA2\u5385"},{type:2,floorType:1,roomType:"100900000002",name:"\u9910\u5385"},{type:3,floorType:0,roomType:"100900000001",name:"\u5367\u5BA4"},{type:4,floorType:0,roomType:"100900000001",name:"\u4E66\u623F"},{type:5,floorType:3,roomType:"100900000004",name:"\u536B\u751F\u95F4"},{type:6,floorType:3,roomType:"100900000004",name:"\u6DCB\u6D74\u95F4"},{type:7,floorType:3,roomType:"100900000004",name:"\u6D17\u624B\u95F4"},{type:8,floorType:3,roomType:"100900000003",name:"\u53A8\u623F"},{type:9,floorType:1,roomType:"100900000003",name:"\u5F00\u653E\u53A8\u623F",onlySubArea:!0},{type:10,floorType:0,roomType:"100900000001",name:"\u591A\u529F\u80FD\u95F4"},{type:11,floorType:0,roomType:"100900000009",name:"\u4FDD\u59C6\u95F4"},{type:12,floorType:4,roomType:"100900000005",name:"\u9633\u53F0"},{type:13,floorType:4,roomType:"100900000006",name:"\u9732\u53F0"},{type:14,floorType:0,roomType:"100900000008",name:"\u50A8\u7269\u95F4"},{type:15,floorType:0,roomType:"100900000013",name:"\u8863\u5E3D\u95F4"},{type:16,floorType:0,roomType:"100900000011",name:"\u9601\u697C"},{type:17,floorType:2,roomType:"100900000007",name:"\u82B1\u56ED"},{type:18,floorType:5,roomType:"100900000010",name:"\u8F66\u5E93"},{type:19,floorType:1,roomType:"100900000012",name:"\u7535\u68AF"},{type:20,floorType:1,roomType:"100900000012",name:"\u5730\u4E0B\u5BA4"},{type:21,floorType:1,roomType:"100900000012",name:"\u5929\u4E95"},{type:22,floorType:1,roomType:"100900000012",name:"\u9633\u5149\u623F"},{type:23,floorType:1,roomType:"100900000012",name:"\u8FC7\u9053"},{type:24,floorType:1,roomType:"100900000012",name:"\u697C\u68AF\u95F4"},{type:25,floorType:1,roomType:"100900000012",name:"\u95E8\u5385"},{type:26,floorType:2,roomType:"100900000012",name:"\u5165\u6237\u82B1\u56ED"},{type:27,floorType:1,roomType:"100900000012",name:"\u7384\u5173"},{type:28,floorType:1,roomType:"100900000012",name:"\u6311\u7A7A"},{type:29,floorType:4,roomType:"100900000012",name:"\u667E\u6652\u533A"},{type:30,floorType:4,roomType:"100900000012",name:"\u6D17\u8863\u623F"},{type:31,floorType:0,roomType:"100900000012",name:"\u5A31\u4E50\u533A"},{type:32,floorType:0,roomType:"100900000012",name:"\u5065\u8EAB\u533A"},{type:33,floorType:0,roomType:"100900000012",name:"\u63A5\u5F85\u533A"},{type:34,floorType:0,roomType:"100900000012",name:"\u5F71\u97F3\u533A"},{type:35,floorType:1,roomType:"100900000012",name:"\u9910\u996E\u533A"},{type:36,floorType:1,roomType:"100900000012",name:"\u5176\u4ED6",onlySubArea:!0},{type:37,floorType:1,roomType:"100900000002",name:"\u8D77\u5C45\u5BA4"},{type:38,floorType:0,roomType:"100900000001",name:"\u4E3B\u5367"},{type:39,floorType:0,roomType:"100900000001",name:"\u6B21\u5367"},{type:40,floorType:0,roomType:"100900000001",name:"\u4F18\u5316\u95F4"},{type:41,floorType:0,roomType:"100900000001",name:"\u529E\u516C\u5BA4"},{type:42,floorType:0,roomType:"100900000001",name:"\u4F1A\u8BAE\u5BA4"},{type:43,floorType:0,roomType:"100900000001",name:"\u6D3D\u8C08\u95F4"},{type:44,floorType:1,roomType:"100900000002",name:"\u5171\u4EAB\u5927\u5385"},{type:45,floorType:1,roomType:"100900000012",name:"\u6C34\u5427"},{type:46,floorType:0,roomType:"100900000015",name:"\u51FA\u5165\u53E3"},{type:47,floorType:0,roomType:"100900000015",name:"\u5927\u5385"},{type:48,floorType:0,roomType:"100900000015",name:"\u5305\u53A2"},{type:49,floorType:0,roomType:"100900000015",name:"\u5176\u4ED6"},{type:50,floorType:0,roomType:"100900000016",name:"\u51FA\u5165\u53E3"},{type:51,floorType:0,roomType:"100900000016",name:"\u529E\u516C\u533A"},{type:52,floorType:0,roomType:"100900000016",name:"\u8001\u677F\u95F4"},{type:53,floorType:0,roomType:"100900000016",name:"\u4F1A\u8BAE\u5BA4"},{type:54,floorType:0,roomType:"100900000016",name:"\u4F11\u606F\u533A/\u6C34\u5427"},{type:55,floorType:0,roomType:"100900000016",name:"\u5176\u4ED6"},{type:56,floorType:2,roomType:"100900000012",name:"\u7A7A\u4E2D\u82B1\u56ED"},{type:57,floorType:0,roomType:"100900000001",name:"\u6D0B\u5BA4"},{type:58,floorType:0,roomType:"100900000001",name:"\u548C\u5BA4"}],Td=[{type:0,description:"\u6728\u8D28\u5730\u677F"},{type:1,description:"\u74F7\u7816\u5730\u9762"},{type:2,description:"\u6237\u5916\u5730\u9762"},{type:3,description:"\u536B\u751F\u95F4\u5730\u9762"},{type:4,description:"\u9633\u53F0\u5730\u9762"},{type:5,description:"\u8F66\u5E93\u5730\u9762"}],Bd=[{roomType:"100900000001",description:"\u5BA4"},{roomType:"100900000002",description:"\u5385"},{roomType:"100900000003",description:"\u53A8"},{roomType:"100900000004",description:"\u536B"},{roomType:"100900000005",description:"\u9633\u53F0"},{roomType:"100900000006",description:"\u9732\u53F0"},{roomType:"100900000007",description:"\u82B1\u56ED"},{roomType:"100900000008",description:"\u50A8"},{roomType:"100900000009",description:"\u4FDD\u59C6\u95F4"},{roomType:"100900000010",description:"\u8F66\u5E93"},{roomType:"100900000011",description:"\u9601\u697C"},{roomType:"100900000012",description:"\u5176\u4ED6"},{roomType:"100900000013",description:"\u8863"},{roomType:"100900000015",description:"\u5546\u94FA"},{roomType:"100900000016",description:"\u5199\u5B57\u697C"}],bi=(i,t,e)=>{const n=new E.Matrix4,o=new E.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},jd=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(bi(o,0,0)),s&&i.applyMatrix4(bi(0,s,0)),r&&i.applyMatrix4(bi(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function va(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=N({map:o.material.map||{}},t);o.material=new F.MeshBasicMaterial(s),o.renderOrder=1,((n=e.parent)==null?void 0:n.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const Qd=(i,t)=>{var u;const e=t.fbx_url||"//vrlab-static.ljcdn.com/release/web/v3/dipan3/dipan.FBX",n=(u=t.north_rad)!=null?u:void 0,o={},s=f=>J(exports,null,function*(){var U;const d=(f==null?void 0:f.fbx_url)||e,p=(U=f==null?void 0:f.north_rad)!=null?U:n;if(typeof p!="number")throw new Error('"northRad"\u914D\u7F6E\u53C2\u6570\u7F3A\u5931\uFF1A\u672A\u914D\u7F6E\u6307\u5357\u9488\u6307\u5411\uFF01');const m=i.model.bounding,g=m.max.x-m.min.x,A=m.max.z-m.min.z,v=Math.max(g,A),w=yield new Hr.FBXLoader().loadAsync(d);va(w,{transparent:!0,side:E.DoubleSide,blending:E.AdditiveBlending});const x=[0,p-Math.PI/2,0],{model:{bounding:{max:{x:D,z:y},min:{x:L,y:P,z:j}}}}=i;o.yBase=P;const B={x:(D+L)/2,y:P-1.6,z:(y+j)/2},G=.0045*v;return jd(w,{position:B,rotation:x,scale:G}),o.object=w,!0}),r=({latitude:f})=>{if(!o.object)return;const d=a(f);d&&(o.object.position.y=d)},a=f=>{if(o.yBase===void 0)return;const d=.6;if(f>=Math.PI/4)return o.yBase-(d+1.6);const p=f*(4/Math.PI);return o.yBase-(d*p+1.6)};return{load:s,disable:()=>{!o.object||(i.scene.remove(o.object),i.needsRender=!0,i.off("cameraDirectionUpdate",r))},enable:()=>{if(!o.object)return;const f=a(i.getPose().latitude);f&&(o.object.position.y=f),i.scene.add(o.object),i.needsRender=!0,i.on("cameraDirectionUpdate",r)}}};function Rd(i,t){var c,u,f,d,p;const e=(c=t==null?void 0:t.size)!=null?c:512,n=(u=t==null?void 0:t.fontSize)!=null?u:e*(35/256)*1.2,o=(f=t==null?void 0:t.backgroundColor)!=null?f:"rgba(0,0,0,0)",s=(d=t==null?void 0:t.fontColor)!=null?d:"#fff",r=(p=t==null?void 0:t.textAlign)!=null?p:"center",a=document.createElement("canvas");a.setAttribute("width",e+""),a.setAttribute("height",e+"");const l=a.getContext("2d");return l.fillStyle=o,l.fillRect(0,0,e,e),l.font=`${n}px "\u5FAE\u8F6F\u96C5\u9ED1"`,l.textAlign=r,l.fillStyle=s,l.fillText(i,e/2,e*.7),new F.CanvasTexture(a)}const Od=({x:i,y:t,z:e})=>new F.Vector3(i,t,e),Hd=(i,t)=>{var g,A,v;const e={},n=(g=t.animationEnabled)!=null?g:!0,o=(A=t.position)!=null?A:void 0,s=(v=t.rad)!=null?v:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=C=>J(exports,null,function*(){var B,G,U,I,S,R,W,Y;const w=(B=C==null?void 0:C.position)!=null?B:o;if(!w)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const x=Od(w),D=(G=C==null?void 0:C.rad)!=null?G:s,y=(U=C==null?void 0:C.fbx_url)!=null?U:r;if(e.rad=D,D===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${D}`));const L=yield new Hr.FBXLoader().loadAsync(y);L.position.copy(x),L.rotation.z=D,L.scale.set(.8,.8,.8),va(L,{transparent:!0,side:E.DoubleSide});const P=(W=(R=(S=(I=L.children)==null?void 0:I[0])==null?void 0:S.children)==null?void 0:R[3])==null?void 0:W.clone();if(!P)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${P}`));const j=(Y=t.name)!=null?Y:"\u5165\u6237\u95E8";return P.material=new F.MeshBasicMaterial({transparent:!0,map:Rd(j)}),P.renderOrder=3,L.children[0].add(P),e.object=L,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const C=1,w=new F.AnimationMixer(e.object);a.push(w);const x=w.clipAction(e.object.animations[0]);x.timeScale=C;let D;const y=()=>{let B=0,G=0;const U=1e3/30,I=S=>{B=requestAnimationFrame(I);const R=S-G;R<U||(G=S,a.forEach(W=>W.update(R/1e3)),i.needsRender=!0)};return B=requestAnimationFrame(I),()=>{cancelAnimationFrame(B)}},j={play:()=>{D||(x.play(),D=y(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{x.stop(),D==null||D(),D=void 0}};e.animation=j},u=C=>{var x;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((x=C==null?void 0:C.animationEnable)!=null?x:n)&&(e.animation||c(),e.animation.play()),i.scene.add(e.object),i.needsRender=!0},f=()=>{!e.object||(e.animation&&e.animation.stop(),i.scene.remove(e.object),i.needsRender=!0)},d=C=>C==="Floorplan"?u():f();return{load:l,enable:C=>(e.enabled||(e.enabled=!0,d(i.currentMode),i.on("modeChange",d),u(C)),!0),disable:()=>(e.enabled&&(e.enabled=!1,f(),i.off("modeChange",d)),!0)}};class so extends dn.default.Tween{constructor(){super(...arguments);h(this,"disposeMethods",[]);h(this,"animationFrameDisposer");h(this,"onDispose",e=>(this.disposeMethods.push(e),this));h(this,"play",()=>(this.start(0),this.animationFrameDisposer=ci(e=>this.update(e)),this));h(this,"dispose",()=>{var e;this.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this.disposeMethods.forEach(n=>n()),this.disposeMethods=[],dn.default.remove(this)})}}function ba(i,t=dn.default.Easing.Linear.None){const e=new so({progress:0}).to({progress:1});return i!==void 0&&e.duration(i),t!==void 0&&e.easing(t),e}const pn=window.requestAnimationFrame||(i=>setTimeout(i,16)),Fd=window.cancelAnimationFrame||clearTimeout;function li(i,t=0){t<=0?pn(i):pn(()=>li(i,t-1))}function ci(i,t=60){let e=-1,n=0,o=-1;const s=1e3/t;function r(a){o===-1&&(o=a),e=pn(r),!(a-n<s)&&(n=a,i&&i(a-o))}return e=pn(r),function(){Fd(e)}}function Gd(){const i=Date.now();return new Promise(t=>{pn(()=>{t(Date.now()-i)})})}const Nd=ni.Easing;function Wd(i,t,e,n=Nd.Linear.None){const o=new ni.Tween(i).to(t,e).easing(n);li(()=>o.start(0));const s=ci(a=>{o.update(a)===!1&&s()}),r=[];return o.onDestroy=a=>(r.push(a),o),o.destroy=function(){this.stop(),Object.assign(o,{_onStartCallback:null,_onUpdateCallback:null,_onCompleteCallback:null,_onStopCallbackL:null});let a;for(;a=r.shift();)a();s()},o}function Xd(i,t){return Wd({progress:0},{progress:1},i,t)}var ya=(i=>(i.Move="Move",i.Rotate="Rotate",i))(ya||{}),_e=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(_e||{});const Fn=Math.PI*2;function is(i){return(i%Fn+Fn)%Fn}function os(i){return i%Fn}function yi(i,t,e){return i+(t-i)*e}const Ri=(i,t,e)=>{const n=Math.PI,o=n*2;return i=is(i),t=is(t),e===_e.Anticlockwise&&i<t&&(i+=o),e===_e.Clockwise&&t<i&&(t+=o),e===_e.Loop&&t-i>n?Ri(i,t,_e.Anticlockwise):e===_e.Loop&&i-t>n?Ri(i,t,_e.Clockwise):{from:i,to:t}},Yd=i=>{const t={},e=(l,c,...u)=>J(exports,[l,c,...u],function*(s,r,a={preload:!0}){return t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),s.mode&&s.mode!==i.currentMode&&(yield i.changeMode(s.mode)),a.preload&&s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(yield i.preloadPano(s.panoIndex)),a.asyncEndCallback&&(yield a.asyncEndCallback()),s.panoIndex===void 0&&s.fov===void 0&&s.latitude===void 0&&s.longitude===void 0?!0:yield new Promise((f,d)=>{const p=s.panoIndex!==void 0?s.panoIndex:i.panoIndex;p!==void 0?i.moveToPano(p,Object.assign({duration:r,moveEndCallback:()=>f(!0),moveCancelCallback:()=>d(!1)},s)):d(!1)})}),n=s=>{const r=i.state,a=os(r.latitude),l=os(s.latitude),{from:c,to:u}=Ri(r.longitude,s.longitude,s.rotation||_e.Loop),f=r.fov,d=s.fov;return{from:{latitude:a,longitude:c,fov:f},to:{latitude:l,longitude:u,fov:d}}};return{move:e,rotate:(l,c,...u)=>J(exports,[l,c,...u],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==be.Five.Mode.Panorama&&(yield i.changeMode(be.Five.Mode.Panorama)),s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(a.preload&&(yield i.preloadPano(s.panoIndex)),yield new Promise((p,m)=>{if(!s.panoIndex){p(!0);return}i.moveToPano(s.panoIndex,{moveEndCallback:()=>p(!0),moveCancelCallback:()=>m(!1)})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:f,to:d}=n(s);return yield new Promise(p=>{const m=({progress:w})=>{const x={};x.longitude=yi(f.longitude,d.longitude,w),x.latitude=yi(f.latitude,d.latitude,w),x.fov=yi(f.fov,d.fov,w),i.setState(x,!0)},g=()=>{p(!0)},A=()=>{p(!1)},v=s.rotateSpeed?Math.ceil(Math.abs(d.longitude-f.longitude)/s.rotateSpeed*1e3):r,C=Xd(v,ni.Easing.Linear.None).onUpdate(m).onComplete(g).onDestroy(A);s.rotation===_e.Loop&&C.repeat(1/0).yoyo(!0),t.interruptCallback=(w=!0)=>{C.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),p(w)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function ss(i,t){return i.x===t.x&&i.y===t.y}function wa(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function Kn(i,t){return(t.y-i.y)/(t.x-i.x)}function Ca(i,t,e){const n=Kn(i[1],i[0]),o=Kn(t[1],t[0]);if(isNaN(n)||isNaN(o)||wa(n,o))return!1;if(In(i[0],t))return i[0];if(In(i[1],t))return i[1];if(In(t[0],i))return t[0];if(In(t[1],i))return t[1];if(e&&!Ud(i,t))return!1;const s=i[0],r=t[0];if(Math.abs(n)===1/0)return{x:s.x,y:t[1].y-(t[1].x-s.x)*o};if(Math.abs(o)===1/0)return{x:r.x,y:i[1].y-(i[1].x-r.x)*n};const a=(r.y-s.y+n*s.x-o*r.x)/(n-o),l=n*a-n*s.x+s.y;return{x:a,y:l}}function In(i,t){return ss(i,t[0])||ss(i,t[1])?!0:(t[0].x-i.x)*(i.x-t[1].x)>=0&&(t[0].y-i.y)*(i.y-t[1].y)>=0&&wa(Kn(t[0],i),Kn(i,t[1]))}function xn(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function Ud(i,t){return Math.max(i[0].x,i[1].x)>=Math.min(t[0].x,t[1].x)&&Math.max(t[0].x,t[1].x)>=Math.min(i[0].x,i[1].x)&&Math.max(i[0].y,i[1].y)>=Math.min(t[0].y,t[1].y)&&xn(t[0],i[1],i[0])*xn(i[1],t[1],i[0])>0&&xn(i[0],t[1],t[0])*xn(t[1],i[1],t[0])>0?1:0}function Ea(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>Ea(i,t-1))}const Vd=`<style type="text/css">
|
|
115
|
+
`;return i.$$set=s=>{"content"in s&&e(0,n=s.content)},[n,o]}class Yc extends oe{constructor(t){super(),ie(this,t,Xc,Wc,te,{content:0},Nc)}}function Uc(i){ae(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function Vc(i){let t,e;return t=new Gc({props:{url:i[1].url}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.url=n[1].url),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Jc(i){let t,e;return t=new Yc({props:{content:i[0]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.content=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Zc(i){let t,e,n,o;const s=[Jc,Vc],r=[];function a(l,c){return l[0]?0:l[1]?1:-1}return~(e=a(i))&&(n=r[e]=s[e](i)),{c(){t=Q("div"),n&&n.c(),b(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){T(l,t,c),~e&&r[e].m(t,null),o=!0},p(l,[c]){let u=e;e=a(l),e===u?~e&&r[e].p(l,c):(n&&(le(),M(r[u],1,1,()=>{r[u]=null}),ce()),~e?(n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),k(n,1),n.m(t,null)):n=null)},i(l){o||(k(n),o=!0)},o(l){M(n),o=!1},d(l){l&&z(t),~e&&r[e].d()}}}function _c(i,t,e){let n,o,{floorIndex:s}=t,{floorplanData:r}=t;return i.$$set=a=>{"floorIndex"in a&&e(2,s=a.floorIndex),"floorplanData"in a&&e(3,r=a.floorplanData)},i.$$.update=()=>{var a,l;i.$$.dirty&12&&e(1,n=r.outlines[s]),i.$$.dirty&12&&e(0,o=(l=(a=r.outlines)==null?void 0:a[s])==null?void 0:l.svgContent)},[o,n,s,r]}class fa extends oe{constructor(t){super(),ie(this,t,_c,Zc,te,{floorIndex:2,floorplanData:3},Uc)}}function qc(i){ae(i,"svelte-12pzct5",".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}")}function Kc(i){let t,e=i[4].outerHTML+"",n;return{c(){t=new Yn(!1),n=he(),t.a=n},m(o,s){t.m(e,o,s),T(o,n,s)},p(o,s){s&16&&e!==(e=o[4].outerHTML+"")&&t.p(e)},d(o){o&&z(n),o&&t.d()}}}function $c(i){let t,e=i[0].name+"",n,o,s,r;return{c(){t=Q("span"),n=ke(e),o=Z(),s=Q("span"),r=ke(i[5]),b(t,"class","floorplan-plugin__room-name"),b(s,"class","floorplan-plugin__room-size svelte-12pzct5")},m(a,l){T(a,t,l),O(t,n),T(a,o,l),T(a,s,l),O(s,r)},p(a,l){l&1&&e!==(e=a[0].name+"")&&Te(n,e),l&32&&Te(r,a[5])},d(a){a&&z(t),a&&z(o),a&&z(s)}}}function eu(i){let t;function e(s,r){if(s[1]===void 0)return $c;if(s[4])return Kc}let n=e(i),o=n&&n(i);return{c(){t=Q("div"),o&&o.c(),b(t,"class","floorplan-plugin__room-label-item svelte-12pzct5"),H(t,"left",i[6]),H(t,"top",i[7]),H(t,"font-size",i[8]),H(t,"opacity",i[3]?"1":"0")},m(s,r){T(s,t,r),o&&o.m(t,null),i[16](t)},p(s,[r]){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null))),r&8&&H(t,"opacity",s[3]?"1":"0")},i:ee,o:ee,d(s){s&&z(t),o&&o.d(),i[16](null)}}}function tu(i,t){const e=i[0],n=i[1];let o=!1;for(let s=0,r=t.length-1;s<t.length;r=s++){const a=t[s][0],l=t[s][1],c=t[r][0],u=t[r][1];l>n!=u>n&&e<(c-a)*(n-l)/(u-l)+a&&(o=!o)}return o}function nu(i,t,e){let n,o,s,r,{pxmm:a}=t,{room:l}=t,{hoveredRoom:c}=t,{getRoomAreaText:u}=t,{getLabelElement:f}=t,{adaptiveRoomLabelVisibleEnable:d}=t;function p(P,j){if(j.width===0||j.height===0)return()=>!1;const B=P.path.map(({x:ne,y:X})=>[ne,X]),G=P.roomLabel.position,{x:U,y:I}=G,{width:S,height:R}=j,W=S/2,Y=R/2;return function(X){const V=U*X,ue=I*X,de=B.map(([Ce,De])=>[Ce*X,De*X]);return[[V+W,ue-Y],[V-W,ue-Y],[V-W,ue+Y],[V+W,ue+Y]].every(Ce=>tu(Ce,de))}}const m=document.body.clientWidth,g=document.body.clientHeight,A=l.roomLabel,v=A.positionInImage.x*100+"%",C=A.positionInImage.y*100+"%",w=(m<500||g<500?10:14)/16+"rem";let x=!1,D,y;c.subscribe(function(j){e(13,x=!!j&&j.id===l.id)}),Ye(()=>{const P=D==null?void 0:D.getClientRects()[0];e(14,y={width:P.width,height:P.height})});function L(P){Me[P?"unshift":"push"](()=>{D=P,e(2,D)})}return i.$$set=P=>{"pxmm"in P&&e(9,a=P.pxmm),"room"in P&&e(0,l=P.room),"hoveredRoom"in P&&e(10,c=P.hoveredRoom),"getRoomAreaText"in P&&e(11,u=P.getRoomAreaText),"getLabelElement"in P&&e(1,f=P.getLabelElement),"adaptiveRoomLabelVisibleEnable"in P&&e(12,d=P.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{i.$$.dirty&2049&&e(5,n=l.size?u(l.size):""),i.$$.dirty&16385&&e(15,o=y?p(l,y):void 0),i.$$.dirty&3&&e(4,s=f==null?void 0:f(l)),i.$$.dirty&45568&&e(3,r=d?x?!0:!!(o!=null&&o(a)):!0)},[l,f,D,r,s,n,v,C,w,a,c,u,d,x,y,o,L]}class iu extends oe{constructor(t){super(),ie(this,t,nu,eu,te,{pxmm:9,room:0,hoveredRoom:10,getRoomAreaText:11,getLabelElement:1,adaptiveRoomLabelVisibleEnable:12},qc)}}function ou(i){ae(i,"svelte-13xux0b",".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}")}function Lo(i,t,e){const n=i.slice();return n[10]=t[e],n}function So(i){let t,e=[],n=new Map,o,s,r=i[6];const a=l=>l[10].id;for(let l=0;l<r.length;l+=1){let c=Lo(i,r,l),u=a(c);n.set(u,e[l]=zo(u,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","floorplan-plugin__room-labels svelte-13xux0b"),xe(()=>i[9].call(t))},m(l,c){T(l,t,c);for(let u=0;u<e.length;u+=1)e[u].m(t,null);o=bt(t,i[9].bind(t)),s=!0},p(l,c){c&111&&(r=l[6],le(),e=Ue(e,c,a,1,l,r,n,t,at,zo,null,Lo),ce())},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)M(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function zo(i,t){let e,n,o;const s=[{pxmm:t[5],room:t[10],getLabelElement:t[2],getRoomAreaText:t[1],hoveredRoom:t[0],adaptiveRoomLabelVisibleEnable:t[3]}];let r={};for(let a=0;a<s.length;a+=1)r=we(r,s[a]);return n=new iu({props:r}),{key:i,first:null,c(){e=he(),$(n.$$.fragment),this.first=e},m(a,l){T(a,e,l),q(n,a,l),o=!0},p(a,l){t=a;const c=l&111?Be(s,[{pxmm:t[5],room:t[10],getLabelElement:t[2],getRoomAreaText:t[1],hoveredRoom:t[0],adaptiveRoomLabelVisibleEnable:t[3]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){M(n.$$.fragment,a),o=!1},d(a){a&&z(e),K(n,a)}}}function su(i){let t,e,n=i[6]&&So(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[6]?n?(n.p(o,s),s&64&&k(n,1)):(n=So(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function ru(i,t,e){let n,{floorIndex:o}=t,{floorplanData:s}=t,{hoveredRoom:r}=t,{getRoomAreaText:a}=t,{getLabelElement:l}=t,{adaptiveRoomLabelVisibleEnable:c}=t,u=0,f=0;function d(){u=this.clientWidth,e(4,u)}return i.$$set=p=>{"floorIndex"in p&&e(7,o=p.floorIndex),"floorplanData"in p&&e(8,s=p.floorplanData),"hoveredRoom"in p&&e(0,r=p.hoveredRoom),"getRoomAreaText"in p&&e(1,a=p.getRoomAreaText),"getLabelElement"in p&&e(2,l=p.getLabelElement),"adaptiveRoomLabelVisibleEnable"in p&&e(3,c=p.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{if(i.$$.dirty&384&&e(6,n=s.floorDatas[o].rooms),i.$$.dirty&272){const{max:p,min:m}=s.bounding,g=p.x-m.x;e(5,f=u/g)}},[r,a,l,c,u,f,n,o,s,d]}class au extends oe{constructor(t){super(),ie(this,t,ru,su,te,{floorIndex:7,floorplanData:8,hoveredRoom:0,getRoomAreaText:1,getLabelElement:2,adaptiveRoomLabelVisibleEnable:3},ou)}}function lu(i){ae(i,"svelte-djlmk4",".floorplan-plugin__rule-labels.svelte-djlmk4.svelte-djlmk4{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-djlmk4.svelte-djlmk4{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4.svelte-djlmk4{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4.svelte-djlmk4{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4.svelte-djlmk4{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-djlmk4.svelte-djlmk4{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale-wrapper.svelte-djlmk4{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-djlmk4.svelte-djlmk4{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale.svelte-djlmk4{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute}.floorplan-plugin__rule-labels--top.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-djlmk4.svelte-djlmk4{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-text-item.svelte-djlmk4{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-djlmk4.svelte-djlmk4{width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}")}function Mo(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function To(i,t,e){const n=i.slice();return n[14]=t[e],n}function Bo(i){let t;return{c(){t=Q("div"),b(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),H(t,"left",i[14].left*100+"%"),H(t,"bottom",i[14].bottom*100+"%")},m(e,n){T(e,t,n)},p:ee,d(e){e&&z(t)}}}function jo(i,t){let e,n,o=t[1](t[11].distance)+"",s,r;return{key:i,first:null,c(){e=Q("div"),n=Q("div"),s=ke(o),r=Z(),b(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),_(n,"is-row",t[2]),b(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),H(e,"left",t[11].left*100+"%"),H(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){T(a,e,l),O(e,n),O(n,s),O(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&Te(s,o)},d(a){a&&z(e)}}}function cu(i){let t,e,n,o,s,r,a=[],l=new Map,c,u=i[3],f=[];for(let m=0;m<u.length;m+=1)f[m]=Bo(To(i,u,m));let d=i[4];const p=m=>m[13];for(let m=0;m<d.length;m+=1){let g=Mo(i,d,m),A=p(g);l.set(A,a[m]=jo(A,g))}return{c(){t=Q("div"),e=Q("div"),n=Z(),o=Q("div");for(let m=0;m<f.length;m+=1)f[m].c();s=Z(),r=Q("div");for(let m=0;m<a.length;m+=1)a[m].c();b(e,"class","floorplan-plugin__rule-line svelte-djlmk4"),b(o,"class","floorplan-plugin__rule-scale-wrapper svelte-djlmk4"),_(o,"is-row",i[2]),b(r,"class","floorplan-plugin__rule-text-wrapper svelte-djlmk4"),b(t,"class",c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+i[0]+" svelte-djlmk4"),_(t,"is-row",i[2]),H(t,"width",i[2]?"100%":1/16+"rem"),H(t,"height",i[2]?1/16+"rem":"100%")},m(m,g){T(m,t,g),O(t,e),O(t,n),O(t,o);for(let A=0;A<f.length;A+=1)f[A].m(o,null);O(t,s),O(t,r);for(let A=0;A<a.length;A+=1)a[A].m(r,null)},p(m,[g]){if(g&8){u=m[3];let A;for(A=0;A<u.length;A+=1){const v=To(m,u,A);f[A]?f[A].p(v,g):(f[A]=Bo(v),f[A].c(),f[A].m(o,null))}for(;A<f.length;A+=1)f[A].d(1);f.length=u.length}g&22&&(d=m[4],a=Ue(a,g,p,1,m,d,l,r,ua,jo,null,Mo)),g&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+m[0]+" svelte-djlmk4")&&b(t,"class",c),g&5&&_(t,"is-row",m[2])},i:ee,o:ee,d(m){m&&z(t),tt(f,m);for(let g=0;g<a.length;g+=1)a[g].d()}}}const Wt=1e3,Xt=180;function uu(i,t,e){let{type:n}=t,{data:o}=t,{bounding:s}=t,{getRuleDistanceText:r}=t;const a=n==="top"||n==="bottom",l=s.max.x-s.min.x-(Wt-Xt)*2,c=s.max.y-s.min.y-(Wt-Xt)*2,u=o.map(([m,g])=>a?[m.x,g.x]:[m.y,g.y]).flat().sort().filter((m,g,A)=>g===0?!0:m!==A[g-1]),f=u.map(m=>{const g=a?(m-s.min.x-Wt+Xt)/l:0,A=a?0:(m-s.min.y-Wt+Xt)/c;return{left:g,bottom:A}});f.unshift({left:0,bottom:0}),f.push(a?{left:1,bottom:0}:{left:0,bottom:1});const d=u[u.length-1]-u[0],p=u.map((m,g,A)=>{const v=g===0?0:m-A[g-1],C=g===0?0:(m+A[g-1])/2,w=a?(C-s.min.x-Wt+Xt)/l:0,x=a?0:(C-s.min.y-Wt+Xt)/c;return{left:w,bottom:x,distance:v}}).filter(({distance:m})=>m/d>.1);return i.$$set=m=>{"type"in m&&e(0,n=m.type),"data"in m&&e(5,o=m.data),"bounding"in m&&e(6,s=m.bounding),"getRuleDistanceText"in m&&e(1,r=m.getRuleDistanceText)},[n,r,a,f,p,o,s]}class du extends oe{constructor(t){super(),ie(this,t,uu,cu,te,{type:0,data:5,bounding:6,getRuleDistanceText:1},lu)}}function fu(i){ae(i,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function Qo(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function Ro(i,t){let e,n,o;const s=[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}];let r={};for(let a=0;a<s.length;a+=1)r=we(r,s[a]);return n=new du({props:r}),{key:i,first:null,c(){e=he(),$(n.$$.fragment),this.first=e},m(a,l){T(a,e,l),q(n,a,l),o=!0},p(a,l){t=a;const c=l&19?Be(s,[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){M(n.$$.fragment,a),o=!1},d(a){a&&z(e),K(n,a)}}}function hu(i){let t,e=[],n=new Map,o,s=i[4];const r=a=>a[13];for(let a=0;a<s.length;a+=1){let l=Qo(i,s,a),c=r(l);n.set(c,e[a]=Ro(c,l))}return{c(){t=Q("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),H(t,"width",i[3]),H(t,"height",i[2])},m(a,l){T(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,[l]){l&19&&(s=a[4],le(),e=Ue(e,l,r,1,a,s,n,t,at,Ro,null,Qo),ce()),l&8&&H(t,"width",a[3]),l&4&&H(t,"height",a[2])},i(a){if(!o){for(let l=0;l<s.length;l+=1)k(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)M(e[l]);o=!1},d(a){a&&z(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const Oo=1e3,Ho=180;function mu(i,t,e){let n,o,s,r,a,l,c,u,f,d,{floorIndex:p}=t,{floorplanData:m}=t,{getRuleDistanceText:g}=t;return i.$$set=A=>{"floorIndex"in A&&e(5,p=A.floorIndex),"floorplanData"in A&&e(6,m=A.floorplanData),"getRuleDistanceText"in A&&e(0,g=A.getRuleDistanceText)},i.$$.update=()=>{i.$$.dirty&64&&e(1,n=m.bounding),i.$$.dirty&96&&e(11,o=m.floorDatas[p].rules),i.$$.dirty&2048&&e(12,s=Object.keys(o)),i.$$.dirty&6144&&e(4,r=s.map(A=>[A,o[A]])),i.$$.dirty&2&&e(9,a=n.max.x-n.min.x),i.$$.dirty&2&&e(7,l=n.max.y-n.min.y),i.$$.dirty&2&&e(10,c=n.max.x-n.min.x-(Oo-Ho)*2),i.$$.dirty&2&&e(8,u=n.max.y-n.min.y-(Oo-Ho)*2),i.$$.dirty&1536&&e(3,f=c/a*100+"%"),i.$$.dirty&384&&e(2,d=u/l*100+"%")},[g,n,d,f,r,p,m,l,u,a,c,o,s]}class pu extends oe{constructor(t){super(),ie(this,t,mu,hu,te,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},fu)}}function si(i,t={}){let e="";const{needZ:n,needA:o}=t;return(n?i.slice().concat(i[0]):i.slice()).forEach((r,a)=>{const{x:l,y:c}=t.format?t.format(r):r,u=l+","+c;return a===0?(e+="M"+u,e):o!=null&&o[a]?(e+="A"+o[a]+","+u,e):(e+="L"+u,e)}),e+(n?"Z":"")}function ha({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function gu(i,t){const e=i.x*1e3+t.bounding.origin.x,n=-i.z*1e3+t.bounding.origin.y;return{x:e,y:n}}function Au(i,t){const e=t.bounding,n=e.max.x-e.min.x,o=e.max.y-e.min.y;return{x:(i.x-e.min.x)/n,y:(e.max.y-i.y)/o}}function vu(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function bu(i){let t;return{c(){t=Ae("path"),b(t,"d",i[0]),b(t,"fill","#2F313A")},m(e,n){T(e,t,n)},p(e,[n]){n&1&&b(t,"d",e[0])},i:ee,o:ee,d(e){e&&z(t)}}}function yu(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=si(o,{needZ:!0}))},[n,o]}class wu extends oe{constructor(t){super(),ie(this,t,yu,bu,te,{path:1})}}function Cu(i){let t,e,n,o,s,r;return{c(){t=Ae("defs"),e=Ae("pattern"),n=Ae("rect"),o=Ae("path"),s=Z(),r=Ae("path"),b(n,"x","0"),b(n,"y","0"),b(n,"width",i[1]),b(n,"height",i[1]),b(n,"fill","#323747"),b(o,"d",i[2]),b(o,"stroke","#ffffff"),b(o,"stroke-opacity","0.06"),b(o,"stroke-width","0.5"),b(o,"fill","none"),b(e,"id","fpm-room-pattern-0"),b(e,"x","0"),b(e,"y","0"),b(e,"width",i[1]),b(e,"height",i[1]),b(e,"patternUnits","userSpaceOnUse"),b(e,"patternTransform","scale(50 50)"),b(r,"d",i[0]),b(r,"fill","url(#fpm-room-pattern-0)")},m(a,l){T(a,t,l),O(t,e),O(e,n),O(e,o),T(a,s,l),T(a,r,l)},p(a,[l]){l&1&&b(r,"d",a[0])},i:ee,o:ee,d(a){a&&z(t),a&&z(s),a&&z(r)}}}const vi=6;function Eu(i,t,e){let n,{path:o}=t;const s=vi*2,r=`M0 ${vi} h ${s} M${vi} 0 v ${s}`;return i.$$set=a=>{"path"in a&&e(3,o=a.path)},i.$$.update=()=>{i.$$.dirty&8&&e(0,n=si(o,{needZ:!0}))},[n,s,r,o]}class Pu extends oe{constructor(t){super(),ie(this,t,Eu,Cu,te,{path:3})}}function Iu(i){let t,e,n,o,s,r,a,l,c,u,f;return{c(){t=Ae("defs"),e=Ae("pattern"),n=Ae("rect"),o=Ae("pattern"),s=Ae("rect"),r=Z(),a=Ae("path"),l=Z(),c=Ae("path"),u=Z(),f=Ae("path"),b(n,"x","0"),b(n,"y","0"),b(n,"width","6"),b(n,"height","50"),b(n,"fill","none"),b(n,"stroke","#4B4B57"),b(n,"stroke-width","0.5"),b(e,"id","room-material-pattern-1"),b(e,"x","0"),b(e,"y","0"),b(e,"width","12"),b(e,"height","50"),b(e,"patternUnits","userSpaceOnUse"),b(e,"patternTransform","scale(50 50)"),b(s,"x","0"),b(s,"y","0"),b(s,"width","6"),b(s,"height","50"),b(s,"fill","none"),b(s,"stroke","#4B4B57"),b(s,"stroke-width","0.5"),b(o,"id","room-material-pattern-2"),b(o,"x","6"),b(o,"y","25"),b(o,"width","12"),b(o,"height","50"),b(o,"patternUnits","userSpaceOnUse"),b(o,"patternTransform","scale(50 50)"),b(a,"d",i[0]),b(a,"fill","#43434D"),b(c,"d",i[0]),b(c,"fill","url(#room-material-pattern-1)"),b(f,"d",i[0]),b(f,"fill","url(#room-material-pattern-2)")},m(d,p){T(d,t,p),O(t,e),O(e,n),O(t,o),O(o,s),T(d,r,p),T(d,a,p),T(d,l,p),T(d,c,p),T(d,u,p),T(d,f,p)},p(d,[p]){p&1&&b(a,"d",d[0]),p&1&&b(c,"d",d[0]),p&1&&b(f,"d",d[0])},i:ee,o:ee,d(d){d&&z(t),d&&z(r),d&&z(a),d&&z(l),d&&z(c),d&&z(u),d&&z(f)}}}function xu(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=si(o,{needZ:!0}))},[n,o]}class ku extends oe{constructor(t){super(),ie(this,t,xu,Iu,te,{path:1})}}function Du(i){ae(i,"svelte-1dykexu",".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}")}function Fo(i,t,e){const n=i.slice();return n[5]=t[e],n}function Lu(i){let t,e;return t=new Pu({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Su(i){let t,e;return t=new ku({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function zu(i){let t,e;return t=new wu({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Go(i){let t,e,n,o;const s=[zu,Su,Lu],r=[];function a(l,c){return l[5].floorType===1?0:l[5].floorType===0?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=Ae("svg"),n.c(),b(t,"width","100%"),b(t,"height","100%"),b(t,"viewBox",`0 0 ${i[1]} ${i[2]}`),b(t,"class","svelte-1dykexu")},m(l,c){T(l,t,c),r[e].m(t,null),o=!0},p(l,c){let u=e;e=a(l),e===u?r[e].p(l,c):(le(),M(r[u],1,1,()=>{r[u]=null}),ce(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),k(n,1),n.m(t,null))},i(l){o||(k(n),o=!0)},o(l){M(n),o=!1},d(l){l&&z(t),r[e].d()}}}function Mu(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=Go(Fo(i,n,r));const s=r=>M(o[r],1,1,()=>{o[r]=null});return{c(){t=Q("div");for(let r=0;r<o.length;r+=1)o[r].c();b(t,"class","floorplan-plugin__room-material svelte-1dykexu")},m(r,a){T(r,t,a);for(let l=0;l<o.length;l+=1)o[l].m(t,null);e=!0},p(r,[a]){if(a&7){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=Fo(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=Go(c),o[l].c(),k(o[l],1),o[l].m(t,null))}for(le(),l=n.length;l<o.length;l+=1)s(l);ce()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)k(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)M(o[a]);e=!1},d(r){r&&z(t),tt(o,r)}}}function Tu(i,t,e){let n,{floorIndex:o}=t,{floorplanData:s}=t;const r=s.bounding.max.x-s.bounding.min.x,a=s.bounding.max.y-s.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(3,o=l.floorIndex),"floorplanData"in l&&e(4,s=l.floorplanData)},i.$$.update=()=>{i.$$.dirty&24&&e(0,n=s.floorDatas[o].rooms.map(l=>fe(N({},l),{path:l.path.map(c=>ha(c,s.bounding))})))},[n,r,a,o,s]}class Bu extends oe{constructor(t){super(),ie(this,t,Tu,Mu,te,{floorIndex:3,floorplanData:4},Du)}}function ju(i){ae(i,"svelte-19uvvss","path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}")}function Qu(i){let t,e,n;return{c(){t=Ae("path"),b(t,"d",i[2]),b(t,"fill","#fff"),b(t,"class","svelte-19uvvss")},m(o,s){T(o,t,s),e||(n=[Pe(t,"mouseenter",i[0]),Pe(t,"mouseleave",i[1])],e=!0)},p:ee,i:ee,o:ee,d(o){o&&z(t),e=!1,rt(n)}}}function Ru(i,t,e){let{room:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t;function r(){s.set(n)}function a(){s.set(void 0)}const{bounding:l}=o,c=si(n.path,{needZ:!0,format:u=>ha(u,l)});return i.$$set=u=>{"room"in u&&e(3,n=u.room),"floorplanData"in u&&e(4,o=u.floorplanData),"hoveredRoom"in u&&e(5,s=u.hoveredRoom)},[r,a,c,n,o,s]}class Ou extends oe{constructor(t){super(),ie(this,t,Ru,Qu,te,{room:3,floorplanData:4,hoveredRoom:5},ju)}}function Hu(i){ae(i,"svelte-1kqo6e4",".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}")}function No(i,t,e){const n=i.slice();return n[5]=t[e],n}function Wo(i,t){let e,n,o;const s=[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}];let r={};for(let a=0;a<s.length;a+=1)r=we(r,s[a]);return n=new Ou({props:r}),{key:i,first:null,c(){e=he(),$(n.$$.fragment),this.first=e},m(a,l){T(a,e,l),q(n,a,l),o=!0},p(a,l){t=a;const c=l&7?Be(s,[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){M(n.$$.fragment,a),o=!1},d(a){a&&z(e),K(n,a)}}}function Fu(i){let t,e,n=[],o=new Map,s,r=i[1].floorDatas[i[0]].rooms;const a=l=>l[5].id;for(let l=0;l<r.length;l+=1){let c=No(i,r,l),u=a(c);o.set(u,n[l]=Wo(u,c))}return{c(){t=Q("div"),e=Ae("svg");for(let l=0;l<n.length;l+=1)n[l].c();b(e,"width","100%"),b(e,"height","100%"),b(e,"viewBox",`0 0 ${i[3]} ${i[4]}`),b(e,"class","svelte-1kqo6e4"),b(t,"class","floorplan-plugin__room-highlight svelte-1kqo6e4")},m(l,c){T(l,t,c),O(t,e);for(let u=0;u<n.length;u+=1)n[u].m(e,null);s=!0},p(l,[c]){c&7&&(r=l[1].floorDatas[l[0]].rooms,le(),n=Ue(n,c,a,1,l,r,o,e,at,Wo,null,No),ce())},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(n[c]);s=!0}},o(l){for(let c=0;c<n.length;c+=1)M(n[c]);s=!1},d(l){l&&z(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function Gu(i,t,e){let{floorIndex:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t;const r=o.bounding.max.x-o.bounding.min.x,a=o.bounding.max.y-o.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(0,n=l.floorIndex),"floorplanData"in l&&e(1,o=l.floorplanData),"hoveredRoom"in l&&e(2,s=l.hoveredRoom)},[n,o,s,r,a]}class ma extends oe{constructor(t){super(),ie(this,t,Gu,Fu,te,{floorIndex:0,floorplanData:1,hoveredRoom:2},Hu)}}function Nu(i){ae(i,"svelte-bl8zrz",".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}")}function Xo(i){let t,e;const n=[{floorIndex:i[1],floorplanData:i[5],hoveredRoom:i[10]}];let o={};for(let s=0;s<n.length;s+=1)o=we(o,n[s]);return t=new ma({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&1058?Be(n,[{floorIndex:s[1],floorplanData:s[5],hoveredRoom:s[10]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Yo(i){let t,e;const n=[{floorplanData:i[5],floorIndex:i[1],getRoomAreaText:i[6],getLabelElement:i[7],hoveredRoom:i[10],adaptiveRoomLabelVisibleEnable:i[9]}];let o={};for(let s=0;s<n.length;s+=1)o=we(o,n[s]);return t=new au({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&1762?Be(n,[{floorplanData:s[5],floorIndex:s[1],getRoomAreaText:s[6],getLabelElement:s[7],hoveredRoom:s[10],adaptiveRoomLabelVisibleEnable:s[9]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Uo(i){let t,e;const n=[{floorplanData:i[5],floorIndex:i[1],getRuleDistanceText:i[8]}];let o={};for(let s=0;s<n.length;s+=1)o=we(o,n[s]);return t=new pu({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&290?Be(n,[{floorplanData:s[5],floorIndex:s[1],getRuleDistanceText:s[8]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Wu(i){let t,e,n,o,s,r,a,l,c;const u=[{floorIndex:i[1],floorplanData:i[5]}];let f={};for(let v=0;v<u.length;v+=1)f=we(f,u[v]);e=new Bu({props:f});let d=i[2]&&Xo(i);const p=[{floorplanData:i[5],floorIndex:i[1]}];let m={};for(let v=0;v<p.length;v+=1)m=we(m,p[v]);s=new fa({props:m});let g=i[3]&&Yo(i),A=i[4]&&Uo(i);return{c(){t=Q("div"),$(e.$$.fragment),n=Z(),d&&d.c(),o=Z(),$(s.$$.fragment),r=Z(),g&&g.c(),a=Z(),A&&A.c(),b(t,"class",l=je(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(v,C){T(v,t,C),q(e,t,null),O(t,n),d&&d.m(t,null),O(t,o),q(s,t,null),O(t,r),g&&g.m(t,null),O(t,a),A&&A.m(t,null),c=!0},p(v,[C]){const w=C&34?Be(u,[{floorIndex:v[1],floorplanData:v[5]}]):{};e.$set(w),v[2]?d?(d.p(v,C),C&4&&k(d,1)):(d=Xo(v),d.c(),k(d,1),d.m(t,o)):d&&(le(),M(d,1,1,()=>{d=null}),ce());const x=C&34?Be(p,[{floorplanData:v[5],floorIndex:v[1]}]):{};s.$set(x),v[3]?g?(g.p(v,C),C&8&&k(g,1)):(g=Yo(v),g.c(),k(g,1),g.m(t,a)):g&&(le(),M(g,1,1,()=>{g=null}),ce()),v[4]?A?(A.p(v,C),C&16&&k(A,1)):(A=Uo(v),A.c(),k(A,1),A.m(t,null)):A&&(le(),M(A,1,1,()=>{A=null}),ce()),(!c||C&1&&l!==(l=je(`floorplan-plugin__floor${v[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&b(t,"class",l)},i(v){c||(k(e.$$.fragment,v),k(d),k(s.$$.fragment,v),k(g),k(A),c=!0)},o(v){M(e.$$.fragment,v),M(d),M(s.$$.fragment,v),M(g),M(A),c=!1},d(v){v&&z(t),K(e),d&&d.d(),K(s),g&&g.d(),A&&A.d()}}}function Xu(i,t,e){let{isCurrent:n}=t,{floorIndex:o}=t,{hoverEnable:s}=t,{roomLabelsEnable:r}=t,{ruleLabelsEnable:a}=t,{floorplanData:l}=t,{getRoomAreaText:c}=t,{getLabelElement:u}=t,{getRuleDistanceText:f}=t,{adaptiveRoomLabelVisibleEnable:d}=t;const p=$i(void 0);return i.$$set=m=>{"isCurrent"in m&&e(0,n=m.isCurrent),"floorIndex"in m&&e(1,o=m.floorIndex),"hoverEnable"in m&&e(2,s=m.hoverEnable),"roomLabelsEnable"in m&&e(3,r=m.roomLabelsEnable),"ruleLabelsEnable"in m&&e(4,a=m.ruleLabelsEnable),"floorplanData"in m&&e(5,l=m.floorplanData),"getRoomAreaText"in m&&e(6,c=m.getRoomAreaText),"getLabelElement"in m&&e(7,u=m.getLabelElement),"getRuleDistanceText"in m&&e(8,f=m.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in m&&e(9,d=m.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,u,f,d,p]}class Yu extends oe{constructor(t){super(),ie(this,t,Xu,Wu,te,{isCurrent:0,floorIndex:1,hoverEnable:2,roomLabelsEnable:3,ruleLabelsEnable:4,floorplanData:5,getRoomAreaText:6,getLabelElement:7,getRuleDistanceText:8,adaptiveRoomLabelVisibleEnable:9},Nu)}}function Uu(i){ae(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function Vo(i,t,e){const n=i.slice();return n[16]=t[e],n}function Jo(i){let t,e,n,o,s,r,a=i[9].floorDatas,l=[];for(let p=0;p<a.length;p+=1)l[p]=Zo(Vo(i,a,p));const c=p=>M(l[p],1,1,()=>{l[p]=null}),u=[{panoIndex:i[3],floorplanData:i[9],lastPanoramaLongitude:i[10],cameraImageUrl:i[11]}];let f={};for(let p=0;p<u.length;p+=1)f=we(f,u[p]);n=new Sc({props:f});let d=i[6]&&_o(i);return{c(){t=Q("div");for(let p=0;p<l.length;p+=1)l[p].c();e=Z(),$(n.$$.fragment),o=Z(),d&&d.c(),b(t,"class","floorplan-main svelte-86bqav")},m(p,m){T(p,t,m);for(let g=0;g<l.length;g+=1)l[g].m(t,null);O(t,e),q(n,t,null),O(t,o),d&&d.m(t,null),r=!0},p(p,m){if(i=p,m&62384){a=i[9].floorDatas;let A;for(A=0;A<a.length;A+=1){const v=Vo(i,a,A);l[A]?(l[A].p(v,m),k(l[A],1)):(l[A]=Zo(v),l[A].c(),k(l[A],1),l[A].m(t,e))}for(le(),A=a.length;A<l.length;A+=1)c(A);ce()}const g=m&3592?Be(u,[{panoIndex:i[3],floorplanData:i[9],lastPanoramaLongitude:i[10],cameraImageUrl:i[11]}]):{};n.$set(g),i[6]?d?(d.p(i,m),m&64&&k(d,1)):(d=_o(i),d.c(),k(d,1),d.m(t,null)):d&&(le(),M(d,1,1,()=>{d=null}),ce())},i(p){if(!r){for(let m=0;m<a.length;m+=1)k(l[m]);k(n.$$.fragment,p),k(d),s||xe(()=>{s=Ot(t,Tt,{duration:i[0],easing:Jt}),s.start()}),r=!0}},o(p){l=l.filter(Boolean);for(let m=0;m<l.length;m+=1)M(l[m]);M(n.$$.fragment,p),M(d),r=!1},d(p){p&&z(t),tt(l,p),K(n),d&&d.d()}}}function Zo(i){let t,e;const n=[{hoverEnable:i[5],floorplanData:i[9],getRoomAreaText:i[12],getLabelElement:i[13],getRuleDistanceText:i[14],roomLabelsEnable:i[7],ruleLabelsEnable:i[8],adaptiveRoomLabelVisibleEnable:i[15]},{floorIndex:i[16].floorIndex},{isCurrent:i[16].floorIndex===i[4]}];let o={};for(let s=0;s<n.length;s+=1)o=we(o,n[s]);return t=new Yu({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&62384?Be(n,[r&62368&&{hoverEnable:s[5],floorplanData:s[9],getRoomAreaText:s[12],getLabelElement:s[13],getRuleDistanceText:s[14],roomLabelsEnable:s[7],ruleLabelsEnable:s[8],adaptiveRoomLabelVisibleEnable:s[15]},r&512&&{floorIndex:s[16].floorIndex},r&528&&{isCurrent:s[16].floorIndex===s[4]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function _o(i){let t,e;return t=new Rc({props:{floorplanData:i[9],northDesc:i[2]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&512&&(s.floorplanData=n[9]),o&4&&(s.northDesc=n[2]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Vu(i){let t,e,n=i[1]&&Jo(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Jo(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Ju(i,t,e){let{duration:n=0}=t,{visible:o}=t,{northDesc:s}=t,{panoIndex:r}=t,{floorIndex:a}=t,{hoverEnable:l}=t,{compassEnable:c}=t,{roomLabelsEnable:u}=t,{ruleLabelsEnable:f}=t,{floorplanData:d}=t,{lastPanoramaLongitude:p}=t,{cameraImageUrl:m}=t,{getRoomAreaText:g}=t,{getLabelElement:A}=t,{getRuleDistanceText:v}=t,{adaptiveRoomLabelVisibleEnable:C}=t;return i.$$set=w=>{"duration"in w&&e(0,n=w.duration),"visible"in w&&e(1,o=w.visible),"northDesc"in w&&e(2,s=w.northDesc),"panoIndex"in w&&e(3,r=w.panoIndex),"floorIndex"in w&&e(4,a=w.floorIndex),"hoverEnable"in w&&e(5,l=w.hoverEnable),"compassEnable"in w&&e(6,c=w.compassEnable),"roomLabelsEnable"in w&&e(7,u=w.roomLabelsEnable),"ruleLabelsEnable"in w&&e(8,f=w.ruleLabelsEnable),"floorplanData"in w&&e(9,d=w.floorplanData),"lastPanoramaLongitude"in w&&e(10,p=w.lastPanoramaLongitude),"cameraImageUrl"in w&&e(11,m=w.cameraImageUrl),"getRoomAreaText"in w&&e(12,g=w.getRoomAreaText),"getLabelElement"in w&&e(13,A=w.getLabelElement),"getRuleDistanceText"in w&&e(14,v=w.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in w&&e(15,C=w.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,u,f,d,p,m,g,A,v,C]}class eo extends oe{constructor(t){super(),ie(this,t,Ju,Vu,te,{duration:0,visible:1,northDesc:2,panoIndex:3,floorIndex:4,hoverEnable:5,compassEnable:6,roomLabelsEnable:7,ruleLabelsEnable:8,floorplanData:9,lastPanoramaLongitude:10,cameraImageUrl:11,getRoomAreaText:12,getLabelElement:13,getRuleDistanceText:14,adaptiveRoomLabelVisibleEnable:15},Uu)}}const Zu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3Etc9xywvnMf80wG8HmQainw0RxSGrnmeBp+8k5/j9S0HbvXb5io0Lz880/0wPHV1NlhLd316He+4xOCv5ragF7L9PrH1qBJyB0626x/lC+qrSvH5r/W+n1WpxUM5nMY4GPeH8lHJaPgfeAFQHCL+ntkXT+vnUc3W6pvTIwC0wy3rA4dwLmK2avZ7Eo9uKBuYJfgJscbs8dLCxDMt+EOEPBEZNEWyBYHqTz6bPXrzUnNrSShxHIsYiOL69zrCGLLcLqJP68tB+9w5wj+YhWDafQ2s61wNqxjZhmrQ2pvMFCEvXuCUZ7wqH794ZWs28LJqlTXSUyuksF2M/yOwqgkx2c1ADa4wLAQRk2sAGQQakhN6yFC2hltfz5kSY44NKQeeh+vtI/SSzWhg2CzCgmWISmKUGmaYFBDfCSymnfxJ6/+ospVcWOLLp5DGP/y0P/Rp66O99DQNq7Po3Ds0a0wY+My2QSv2N2mO/OyxR2o6UQk+Lv7yJ06JYSnnolZVU9cUn2O9SmaMWGFBqYXRwbqAJWIi94TX5biotpcGl1DXZ6LnqIbNDTnmUgi52Mv5l5ysMxIcZcGjy2DTK4ZHlcBC14zeSge4qphICjj3bS0A7o9nSp2TOkm7aZ8bGZy/jxhO87V91G0+dfY/Z7BWIIK9KYUi5qy/Hf8YfBG3sqJTHiQWhmTVkbip+wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC";function _u(i){return J(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(o){return J(this,null,function*(){const s={index:o.index,url:o.url,svgUrl:o.svg_url};if(o.svg_url){const r=yield fetch(o.svg_url,{headers:t}).then(a=>a.text());s.svgContent=r}return s})};return yield Promise.all(i.map(e))})}function qu(i){return{id:i.id,size:i.size,name:i.name,path:i.path,roomType:i.room_type,floorType:i.floor_type,roomLabel:{position:i.room_label.position,positionInImage:i.room_label.position_in_image},observerIndexs:i.observer_indexs}}function Ku(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(qu),rules:i.rules}}function $u(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function ed(i){return{rad:i.rad,position:i.position,positionInImage:i.position_in_image,northRad:i.north_rad,roomId:i.room_id,floorIndex:i.floor_index}}function vt(i){return J(this,null,function*(){const t=yield _u(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(Ku),o=i.computed_data.entrance?ed(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map($u)}})}function td(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:Zu,width:45,height:48},a=vu(s,t),l=gu(s,e),c=Au(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function nd(i,t){return t(i),i}function ri(i,t){return nd({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function qo(i,t){const e=Math.max(...i.work.observers.map(n=>n.floorIndex));return t>e?i.model.bounding.max.y:Math.max(...i.work.observers.filter(n=>n.floorIndex===t).map(n=>n.standingPosition.y))}function to(i,t,e=mt.BOUNDING_CENTER){const n=qo(i,t),o=qo(i,t+1);return e===mt.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===mt.CEILING?o:n}function no(i,t,e,n){const o=to(i,e,n==null?void 0:n.attachedTo),s=new E.Vector3(0,o,0),r=new E.Vector3(1,o,0),a=s.clone().project(i.camera),l=r.clone().project(i.camera);return Math.abs((l.x-a.x)/1e3)*(t.getBoundingClientRect().width/2)}class ai{constructor(t,e){h(this,"five");h(this,"hooks",new qt);h(this,"staticPrefix","//vrlab-static.ljcdn.com");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}}class Ht extends ai{}var Fe=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(Fe||{});const pa=500,id=80;function Qi(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function ga(i,t){return J(this,null,function*(){yield new Promise((e,n)=>{i.changeMode(...t).catch(o=>n(o)),i.once("initAnimationEnded",()=>{const o=i.getCurrentState(),s=t[0];o.mode!==s&&n(new Error("mode \u4E0E\u9884\u671F\u4E0D\u7B26")),(()=>{const l=t[1];return l?Object.keys(l).every(c=>{const u=o[c];if(u===void 0)return!0;const f=l[c];return typeof u=="number"&&typeof f=="number"?Qi(u,f,2):u===f}):!0})()||n(new Error("five pose \u4E0E\u9884\u671F\u4E0D\u7B26")),e()})})})}function io(i,t){if(i.currentMode!==t.mode)return!1;const{latitude:e,longitude:n,fov:o}=t,{latitude:s,longitude:r}=i.getCurrentState(),a=i.camera.fov;return!(!Qi(e,s,2)||!Qi(n,r,2)||o!==a)}function Aa(i,t,e=!0){return J(this,null,function*(){if(io(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[u]=yield Zn(ga(i,[t.mode,t,void 0,e]));if(u)throw new Error(Fe.ChangeModeError);return}const{latitude:s,longitude:r,fov:a}=o,l=Math.min(1e3,Math.max(200,Math.abs(s-Math.PI/2)*1e3,(r>Math.PI?2*Math.PI-r:r)*500,Math.abs(a-t.fov)*10)),[c]=yield Zn(i.updateCamera(t,l,e));if(c)throw new Error(Fe.UpdateCameraError)})}function _t(i,t,e=300){const n=i.getElement();!n||(n.style.opacity=t+"",n.style.transition=e===0?"none":`opacity ${e}ms linear`,e!==0&&Promise.race([new Promise(o=>n.addEventListener("transitionend",o,{once:!0})),new Promise(o=>setTimeout(o,e))]).then(()=>{n.style.transition="none"}))}function od(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function sd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}class rd extends Ht{constructor(e,n){var a;super(e);h(this,"name","modelFloorplanPlugin");h(this,"state");h(this,"data");h(this,"showState");h(this,"showPromise");h(this,"app");h(this,"panoIndex",0);h(this,"floorIndex",0);h(this,"selector");h(this,"showRejection");h(this,"wrapper");h(this,"container",document.createElement("div"));h(this,"lastPanoramaLongitude",0);h(this,"size",{width:0,height:0});h(this,"hasAddedEventListener",!1);h(this,"isHiddenByHideFunc",!1);h(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});h(this,"show",(...n)=>J(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));h(this,"hide",(...n)=>J(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));h(this,"updateSize",()=>{if(!this.data||!io(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=no(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});h(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Fe.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});h(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});h(this,"_show",e=>J(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Fe.ModelNotLoaded);if(!this.data)throw new Error(Fe.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=N(N({},n),e),s=()=>J(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=d=>{a=!0,l=d};const[c]=yield Zn(Aa(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Fe.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const u=o.modelOpacity,f=o.immediately?0:pa;_t(this.five,u,f),this.render(f)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));h(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Fe.BreakOffByHide),this.showPromise=void 0;const o=N(N({},{userAction:!0,isAutoHide:!1}),e);_t(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});h(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});h(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});h(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});h(this,"onFiveInteriaPan",(e,n)=>{if(!n||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();o.mode==="Floorplan"&&(this.state.visible||sd(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});h(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});h(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();od(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n,isAutoHide:!0}))});h(this,"onFiveWantsGesture",(e,n)=>{if(!!this.state.visible&&(n.length>1||e==="mouseWheel"))return!1});h(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode==="Floorplan"&&this.state.config.autoShowEnable!==!1&&n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1});h(this,"onFiveWantsTapGesture",()=>this.handleClick());h(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});h(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Floorplan",longitude:0,latitude:Math.PI/2,fov:id/((a=n==null?void 0:n.scale)!=null?a:1)};const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,adaptiveRoomLabelVisibleEnable:!0,cameraImageUrl:At,attachedTo:mt.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:l=>l.toString()},s=n?ri(n,["selector","scale"]):{},r=N(N({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return J(this,null,function*(){function s(u){return Object.prototype.hasOwnProperty.apply(u,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield vt(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}this.render()}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return J(this,null,function*(){return yield vt(e.data)})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=fe(N(N({},this.state),e),{config:s}),!qe(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("interiaPan",this.onFiveInteriaPan),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("interiaPan",this.onFiveInteriaPan),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=fe(N({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new eo({target:this.container,intro:!0,props:n})}}const ad=(i,t)=>new rd(i,t);function ld(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function cd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}class ud extends Ht{constructor(e,n){super(e);h(this,"name","modelFloorplanPlugin");h(this,"state");h(this,"data");h(this,"showState");h(this,"showPromise");h(this,"app");h(this,"panoIndex",0);h(this,"floorIndex",0);h(this,"selector");h(this,"showRejection");h(this,"wrapper");h(this,"container",document.createElement("div"));h(this,"lastPanoramaLongitude",0);h(this,"size",{width:0,height:0});h(this,"hasAddedEventListener",!1);h(this,"isHiddenByHideFunc",!1);h(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});h(this,"show",(...n)=>J(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));h(this,"hide",(...n)=>J(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));h(this,"updateSize",()=>{if(!this.data||!io(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=no(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});h(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Fe.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});h(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});h(this,"_show",e=>J(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Fe.ModelNotLoaded);if(!this.data)throw new Error(Fe.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=N(N({},n),e),s=()=>J(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=d=>{a=!0,l=d};const[c]=yield Zn(Aa(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Fe.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const u=o.modelOpacity,f=o.immediately?0:pa;_t(this.five,u,f),this.render(f)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));h(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Fe.BreakOffByHide),this.showPromise=void 0;const o=N(N({},{userAction:!0,isAutoHide:!1}),e);_t(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});h(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});h(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});h(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});h(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});h(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();this.updatePosition(),this.updateSize(),ld(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});h(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1){if(n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1;if(n&&!this.state.visible){if(this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();return o.mode!==this.showState.mode||this.state.visible?void 0:(cd(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})),!1)}}});h(this,"onFiveWantsTapGesture",()=>this.handleClick());h(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});h(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Mapview",longitude:0,latitude:Math.PI/2,fov:90};const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,cameraImageUrl:At,attachedTo:mt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?ri(n,["selector","scale"]):{},r=N(N({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return J(this,null,function*(){function s(u){return Object.prototype.hasOwnProperty.apply(u,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield vt(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}updatePosition(){var a;const e=to(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new E.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}formatData(e){return J(this,null,function*(){return yield vt(e.data)})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=fe(N(N({},this.state),e),{config:s}),!qe(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=fe(N({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new eo({target:this.container,intro:!0,props:n})}}const dd=(i,t)=>new ud(i,t);class fd extends Ht{constructor(e,n){super(e);h(this,"name","topviewFloorplanPlugin");h(this,"state");h(this,"data");h(this,"app");h(this,"selector");h(this,"panoIndex",0);h(this,"floorIndex",0);h(this,"wrapper");h(this,"container",document.createElement("div"));h(this,"lastPanoramaLongitude",0);h(this,"size",{width:0,height:0});h(this,"hasAddedEventListener",!1);h(this,"isHiddenByHideFunc",!1);h(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=no(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});h(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});h(this,"_disable",e=>{var o,s;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,(s=this.container)==null||s.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:n})});h(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});h(this,"onFiveModeChange",(...[e,,,,n])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});h(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});h(this,"onFiveCameraUpdate",(e,n)=>{!this.state.visible||(this.updatePosition(),this.updateSize())});h(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});h(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});h(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:n}=this.five.getCurrentState();n==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});h(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"));const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,cameraImageUrl:At,attachedTo:mt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?ri(n,["selector","scale"]):{},r=N(N({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return J(this,null,function*(){function s(u){return Object.prototype.hasOwnProperty.apply(u,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield vt(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}updatePosition(){var a;const e=to(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new E.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}show(){return J(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return J(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return J(this,null,function*(){return yield vt(e.data)})}_show(e){return J(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:n}=e;this.hooks.emit("show",{userAction:n,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield ga(this.five,["Topview",void 0,void 0,n])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const o=500,s=this.state.config.modelOpacity;_t(this.five,s,o),this.hooks.emit("showAnimationEnded",{userAction:n,auto:!1}),this.render()})}_hide(e){return J(this,null,function*(){if(!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n,auto:!1});const o=1,s=0;_t(this.five,o,s),this.render()})}_enable(e){const{userAction:n}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=fe(N(N({},this.state),e),{config:s}),!qe(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsMoveToPano",this.onFiveWantsMoveToPano),e.on("initAnimationEnded",this.onFiveInitAnimationEnded),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsMoveToPano",this.onFiveWantsMoveToPano),e.off("initAnimationEnded",this.onFiveInitAnimationEnded),e.off("modelShownFloorChange",this.onModelShownFloorChange)}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate3d(-50%, -50%, 10px)",zIndex:10,pointerEvents:"none","will-change":"width, height"}),this.five.addExtraElement(this.container)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=fe(N({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new eo({target:this.container,intro:!0,props:n})}}const hd=(i,t)=>new fd(i,t);function oo(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function md(i){ae(i,"svelte-1nqrlxd",".plugin-radar__camera-wrapper.svelte-1nqrlxd{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1nqrlxd{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1nqrlxd{position:absolute;left:-0.9375rem;top:-0.9375rem;width:1.0625rem;height:1.0625rem;transform-origin:0.9375rem 0.9375rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}")}function pd(i){let t,e,n;return{c(){t=Q("div"),e=Q("div"),n=Q("div"),b(n,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),H(n,"background-image","url("+(i[0]||At)+")"),H(n,"transform",i[1]),b(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),H(e,"transform",i[2]),b(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){T(o,t,s),O(t,e),O(e,n)},p(o,[s]){s&1&&H(n,"background-image","url("+(o[0]||At)+")"),s&2&&H(n,"transform",o[1]),s&4&&H(e,"transform",o[2])},i:ee,o:ee,d(o){o&&z(t)}}}function gd(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function Ad(i,t,e){let n,o,{five:s}=t,{pxmm:r}=t,{floorplanData:a}=t,{cameraImageUrl:l}=t,c=s.getCurrentState().panoIndex,u=s.getCurrentState().longitude;function f(m,g){const A=m.bounding,v=m.observers[g];if(!v)return"";const C=(A.max.x-A.min.x)*r,w=(A.max.y-A.min.y)*r,x=Math.floor(v.positionInImage.x*C),D=Math.floor(v.positionInImage.y*w);return`translate(${x}px, ${D}px)`}function d(m){e(6,c=m)}const p=oo(m=>{e(7,u=m.longitude)},1e3/60);return Ye(()=>(s.on("panoWillArrive",d),s.on("cameraDirectionUpdate",p),function(){s.off("panoWillArrive",d),s.off("cameraDirectionUpdate",p)})),i.$$set=m=>{"five"in m&&e(3,s=m.five),"pxmm"in m&&e(4,r=m.pxmm),"floorplanData"in m&&e(5,a=m.floorplanData),"cameraImageUrl"in m&&e(0,l=m.cameraImageUrl)},i.$$.update=()=>{i.$$.dirty&96&&e(2,n=f(a,c)),i.$$.dirty&128&&e(1,o=gd(u))},[l,o,n,s,r,a,c,u]}class vd extends oe{constructor(t){super(),ie(this,t,Ad,pd,te,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},md)}}function bd(i){ae(i,"svelte-1i87fz7",".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}")}function Ko(i,t,e){const n=i.slice();return n[1]=t[e],n}function $o(i,t){let e,n,o=`${t[1].icon.width/16}rem`,s=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:i,first:null,c(){e=Q("div"),n=Q("div"),r=Z(),b(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),H(n,"background-image",`url(${t[1].icon.url})`),H(n,"width",o),H(n,"height",s),b(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),H(e,"top",a),H(e,"left",l),this.first=e},m(c,u){T(c,e,u),O(e,n),O(e,r)},p(c,u){t=c,u&1&&H(n,"background-image",`url(${t[1].icon.url})`),u&1&&o!==(o=`${t[1].icon.width/16}rem`)&&H(n,"width",o),u&1&&s!==(s=`${t[1].icon.height/16}rem`)&&H(n,"height",s),u&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&H(e,"top",a),u&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&H(e,"left",l)},d(c){c&&z(e)}}}function yd(i){let t,e=[],n=new Map,o=i[0];const s=r=>r[1].id;for(let r=0;r<o.length;r+=1){let a=Ko(i,o,r),l=s(a);n.set(l,e[r]=$o(l,a))}return{c(){t=Q("div");for(let r=0;r<e.length;r+=1)e[r].c();b(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){T(r,t,a);for(let l=0;l<e.length;l+=1)e[l].m(t,null)},p(r,[a]){a&1&&(o=r[0],e=Ue(e,a,s,1,r,o,n,t,ua,$o,null,Ko))},i:ee,o:ee,d(r){r&&z(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function wd(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class Cd extends oe{constructor(t){super(),ie(this,t,wd,yd,te,{extraObjects:0},bd)}}function es(i){let t,e;const n=[{five:i[0],pxmm:i[1],floorIndex:i[2],floorplanData:i[4],onRoomHeightClick:i[6]}];let o={};for(let s=0;s<n.length;s+=1)o=we(o,n[s]);return t=new ma({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&87?Be(n,[{five:s[0],pxmm:s[1],floorIndex:s[2],floorplanData:s[4],onRoomHeightClick:s[6]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Ed(i){let t,e,n,o,s,r;const a=[{floorIndex:i[2],floorplanData:i[4]}];let l={};for(let u=0;u<a.length;u+=1)l=we(l,a[u]);t=new fa({props:l}),n=new Cd({props:{extraObjects:i[5]}});let c=i[3]&&es(i);return{c(){$(t.$$.fragment),e=Z(),$(n.$$.fragment),o=Z(),c&&c.c(),s=he()},m(u,f){q(t,u,f),T(u,e,f),q(n,u,f),T(u,o,f),c&&c.m(u,f),T(u,s,f),r=!0},p(u,[f]){const d=f&20?Be(a,[{floorIndex:u[2],floorplanData:u[4]}]):{};t.$set(d);const p={};f&32&&(p.extraObjects=u[5]),n.$set(p),u[3]?c?(c.p(u,f),f&8&&k(c,1)):(c=es(u),c.c(),k(c,1),c.m(s.parentNode,s)):c&&(le(),M(c,1,1,()=>{c=null}),ce())},i(u){r||(k(t.$$.fragment,u),k(n.$$.fragment,u),k(c),r=!0)},o(u){M(t.$$.fragment,u),M(n.$$.fragment,u),M(c),r=!1},d(u){K(t,u),u&&z(e),K(n,u),u&&z(o),c&&c.d(u),u&&z(s)}}}function Pd(i,t,e){let n,{five:o}=t,{pxmm:s}=t,{floorIndex:r}=t,{hoverEnable:a}=t,{floorplanData:l}=t,{extraObjects:c=[]}=t;const u=void 0;return i.$$set=f=>{"five"in f&&e(0,o=f.five),"pxmm"in f&&e(1,s=f.pxmm),"floorIndex"in f&&e(2,r=f.floorIndex),"hoverEnable"in f&&e(3,a=f.hoverEnable),"floorplanData"in f&&e(4,l=f.floorplanData),"extraObjects"in f&&e(7,c=f.extraObjects)},i.$$.update=()=>{i.$$.dirty&132&&e(5,n=c==null?void 0:c.filter(f=>f.floorIndex===r))},[o,s,r,a,l,n,u,c]}class Id extends oe{constructor(t){super(),ie(this,t,Pd,Ed,te,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:7})}}function xd(i){ae(i,"svelte-1mvqyqq",".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}")}function ts(i){let t,e,n,o=i[6]!==0&&ns(i);return{c(){t=Q("div"),o&&o.c(),b(t,"class","plugin-floorplan-radar svelte-1mvqyqq"),xe(()=>i[12].call(t))},m(s,r){T(s,t,r),o&&o.m(t,null),e=bt(t,i[12].bind(t)),n=!0},p(s,r){s[6]!==0?o?(o.p(s,r),r&64&&k(o,1)):(o=ns(s),o.c(),k(o,1),o.m(t,null)):o&&(le(),M(o,1,1,()=>{o=null}),ce())},i(s){n||(k(o),n=!0)},o(s){M(o),n=!1},d(s){s&&z(t),o&&o.d(),e()}}}function ns(i){let t,e,n,o,s=`${i[8]}px`,r=`${i[11]}px`,a;const l=[{five:i[0],pxmm:i[9],floorIndex:i[10],floorplanData:i[3],hoverEnable:i[2],extraObjects:i[5]}];let c={};for(let d=0;d<l.length;d+=1)c=we(c,l[d]);e=new Id({props:c});const u=[{pxmm:i[9],five:i[0],floorplanData:i[3],cameraImageUrl:i[4]}];let f={};for(let d=0;d<u.length;d+=1)f=we(f,u[d]);return o=new vd({props:f}),{c(){t=Q("div"),$(e.$$.fragment),n=Z(),$(o.$$.fragment),b(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),H(t,"width",s),H(t,"height",r)},m(d,p){T(d,t,p),q(e,t,null),O(t,n),q(o,t,null),a=!0},p(d,p){const m=p&1581?Be(l,[{five:d[0],pxmm:d[9],floorIndex:d[10],floorplanData:d[3],hoverEnable:d[2],extraObjects:d[5]}]):{};e.$set(m);const g=p&537?Be(u,[{pxmm:d[9],five:d[0],floorplanData:d[3],cameraImageUrl:d[4]}]):{};o.$set(g),p&256&&s!==(s=`${d[8]}px`)&&H(t,"width",s),p&2048&&r!==(r=`${d[11]}px`)&&H(t,"height",r)},i(d){a||(k(e.$$.fragment,d),k(o.$$.fragment,d),a=!0)},o(d){M(e.$$.fragment,d),M(o.$$.fragment,d),a=!1},d(d){d&&z(t),K(e),K(o)}}}function kd(i){let t,e,n=i[1]&&ts(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=ts(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Dd(i,t,e){var v,C;let{five:n}=t,{visible:o}=t,{hoverEnable:s}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,c=0,u=(C=(v=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:v.floorIndex)!=null?C:0,f=0,d=0,p=0,m=0;function g(w){e(10,u=n.work.observers[w].floorIndex)}Ye(()=>(n.on("panoArrived",g),()=>{n.off("panoArrived",g)}));function A(){f=this.clientWidth,d=this.clientHeight,e(6,f),e(7,d)}return i.$$set=w=>{"five"in w&&e(0,n=w.five),"visible"in w&&e(1,o=w.visible),"hoverEnable"in w&&e(2,s=w.hoverEnable),"floorplanData"in w&&e(3,r=w.floorplanData),"cameraImageUrl"in w&&e(4,a=w.cameraImageUrl),"extraObjects"in w&&e(5,l=w.extraObjects)},i.$$.update=()=>{if(i.$$.dirty&456){const w=Math.min(f,d),{max:x,min:D}=r.bounding,y=x.x-D.x,L=x.y-D.y,P=function(){return y>L?[w,w/y*L]:[w/L*y,w]}();e(8,p=P[0]),e(11,m=P[1]),e(9,c=p/y)}},[n,o,s,r,a,l,f,d,p,c,u,m,A]}class Ld extends oe{constructor(t){super(),ie(this,t,Dd,kd,te,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5},xd)}}class Sd extends Ht{constructor(e,n){super(e);h(this,"name","panoFloorplanRadarPlugin");h(this,"state");h(this,"data");h(this,"app");h(this,"wrapperSelector","");h(this,"wrapper",null);h(this,"disposed",!1);h(this,"extraObjects",[]);h(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});h(this,"_disable",e=>{var o;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:n})});this.five=e;const o={hoverEnable:!1,cameraImageUrl:At},s=n!=null&&n.configs?n.configs:{},r=N(N({},o),s);this.state={enabled:!0,visible:!0,config:r},n!=null&&n.wrapper&&console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"),typeof(n==null?void 0:n.wrapper)=="string"?this.wrapperSelector=n.wrapper:(n==null?void 0:n.wrapper)instanceof Element&&(this.wrapper=n.wrapper),e.once("dispose",this.dispose)}load(e,n,o=!0){return J(this,null,function*(){function s(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=s(r)?r.data:r,l=this.data;this.data=yield vt(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),n&&this.updateState(n,o),this.render()})}show(){return J(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return J(this,arguments,function*(e={}){if(!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper=e,this.render()}changeConfigs(e,n=!0){this.setState({config:e},{userAction:n}),this.render()}setExtraObjectsWith3DPositions(e){!this.data||(this.extraObjects=td(e,this.five,this.data),this.render())}formatData(e){return J(this,null,function*(){return yield vt(e.data)})}_enable(e){const{userAction:n}=e;this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("show",{userAction:n}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n}),this.render()}updateState(e,n){const o=this.state;this.state=N(N({},this.state),e),!qe(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const n=document.querySelector(this.wrapperSelector);this.wrapper=n}if(!this.data||!this.wrapper)return;const e=fe(N({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects});this.app?this.app.$set(e):this.app=new Ld({target:this.wrapper,props:e})}}const zd=(i,t)=>new Sd(i,t),Md=[{type:0,floorType:1,roomType:"100900000012",name:"\u5176\u4ED6"},{type:1,floorType:1,roomType:"100900000002",name:"\u5BA2\u5385"},{type:2,floorType:1,roomType:"100900000002",name:"\u9910\u5385"},{type:3,floorType:0,roomType:"100900000001",name:"\u5367\u5BA4"},{type:4,floorType:0,roomType:"100900000001",name:"\u4E66\u623F"},{type:5,floorType:3,roomType:"100900000004",name:"\u536B\u751F\u95F4"},{type:6,floorType:3,roomType:"100900000004",name:"\u6DCB\u6D74\u95F4"},{type:7,floorType:3,roomType:"100900000004",name:"\u6D17\u624B\u95F4"},{type:8,floorType:3,roomType:"100900000003",name:"\u53A8\u623F"},{type:9,floorType:1,roomType:"100900000003",name:"\u5F00\u653E\u53A8\u623F",onlySubArea:!0},{type:10,floorType:0,roomType:"100900000001",name:"\u591A\u529F\u80FD\u95F4"},{type:11,floorType:0,roomType:"100900000009",name:"\u4FDD\u59C6\u95F4"},{type:12,floorType:4,roomType:"100900000005",name:"\u9633\u53F0"},{type:13,floorType:4,roomType:"100900000006",name:"\u9732\u53F0"},{type:14,floorType:0,roomType:"100900000008",name:"\u50A8\u7269\u95F4"},{type:15,floorType:0,roomType:"100900000013",name:"\u8863\u5E3D\u95F4"},{type:16,floorType:0,roomType:"100900000011",name:"\u9601\u697C"},{type:17,floorType:2,roomType:"100900000007",name:"\u82B1\u56ED"},{type:18,floorType:5,roomType:"100900000010",name:"\u8F66\u5E93"},{type:19,floorType:1,roomType:"100900000012",name:"\u7535\u68AF"},{type:20,floorType:1,roomType:"100900000012",name:"\u5730\u4E0B\u5BA4"},{type:21,floorType:1,roomType:"100900000012",name:"\u5929\u4E95"},{type:22,floorType:1,roomType:"100900000012",name:"\u9633\u5149\u623F"},{type:23,floorType:1,roomType:"100900000012",name:"\u8FC7\u9053"},{type:24,floorType:1,roomType:"100900000012",name:"\u697C\u68AF\u95F4"},{type:25,floorType:1,roomType:"100900000012",name:"\u95E8\u5385"},{type:26,floorType:2,roomType:"100900000012",name:"\u5165\u6237\u82B1\u56ED"},{type:27,floorType:1,roomType:"100900000012",name:"\u7384\u5173"},{type:28,floorType:1,roomType:"100900000012",name:"\u6311\u7A7A"},{type:29,floorType:4,roomType:"100900000012",name:"\u667E\u6652\u533A"},{type:30,floorType:4,roomType:"100900000012",name:"\u6D17\u8863\u623F"},{type:31,floorType:0,roomType:"100900000012",name:"\u5A31\u4E50\u533A"},{type:32,floorType:0,roomType:"100900000012",name:"\u5065\u8EAB\u533A"},{type:33,floorType:0,roomType:"100900000012",name:"\u63A5\u5F85\u533A"},{type:34,floorType:0,roomType:"100900000012",name:"\u5F71\u97F3\u533A"},{type:35,floorType:1,roomType:"100900000012",name:"\u9910\u996E\u533A"},{type:36,floorType:1,roomType:"100900000012",name:"\u5176\u4ED6",onlySubArea:!0},{type:37,floorType:1,roomType:"100900000002",name:"\u8D77\u5C45\u5BA4"},{type:38,floorType:0,roomType:"100900000001",name:"\u4E3B\u5367"},{type:39,floorType:0,roomType:"100900000001",name:"\u6B21\u5367"},{type:40,floorType:0,roomType:"100900000001",name:"\u4F18\u5316\u95F4"},{type:41,floorType:0,roomType:"100900000001",name:"\u529E\u516C\u5BA4"},{type:42,floorType:0,roomType:"100900000001",name:"\u4F1A\u8BAE\u5BA4"},{type:43,floorType:0,roomType:"100900000001",name:"\u6D3D\u8C08\u95F4"},{type:44,floorType:1,roomType:"100900000002",name:"\u5171\u4EAB\u5927\u5385"},{type:45,floorType:1,roomType:"100900000012",name:"\u6C34\u5427"},{type:46,floorType:0,roomType:"100900000015",name:"\u51FA\u5165\u53E3"},{type:47,floorType:0,roomType:"100900000015",name:"\u5927\u5385"},{type:48,floorType:0,roomType:"100900000015",name:"\u5305\u53A2"},{type:49,floorType:0,roomType:"100900000015",name:"\u5176\u4ED6"},{type:50,floorType:0,roomType:"100900000016",name:"\u51FA\u5165\u53E3"},{type:51,floorType:0,roomType:"100900000016",name:"\u529E\u516C\u533A"},{type:52,floorType:0,roomType:"100900000016",name:"\u8001\u677F\u95F4"},{type:53,floorType:0,roomType:"100900000016",name:"\u4F1A\u8BAE\u5BA4"},{type:54,floorType:0,roomType:"100900000016",name:"\u4F11\u606F\u533A/\u6C34\u5427"},{type:55,floorType:0,roomType:"100900000016",name:"\u5176\u4ED6"},{type:56,floorType:2,roomType:"100900000012",name:"\u7A7A\u4E2D\u82B1\u56ED"},{type:57,floorType:0,roomType:"100900000001",name:"\u6D0B\u5BA4"},{type:58,floorType:0,roomType:"100900000001",name:"\u548C\u5BA4"}],Td=[{type:0,description:"\u6728\u8D28\u5730\u677F"},{type:1,description:"\u74F7\u7816\u5730\u9762"},{type:2,description:"\u6237\u5916\u5730\u9762"},{type:3,description:"\u536B\u751F\u95F4\u5730\u9762"},{type:4,description:"\u9633\u53F0\u5730\u9762"},{type:5,description:"\u8F66\u5E93\u5730\u9762"}],Bd=[{roomType:"100900000001",description:"\u5BA4"},{roomType:"100900000002",description:"\u5385"},{roomType:"100900000003",description:"\u53A8"},{roomType:"100900000004",description:"\u536B"},{roomType:"100900000005",description:"\u9633\u53F0"},{roomType:"100900000006",description:"\u9732\u53F0"},{roomType:"100900000007",description:"\u82B1\u56ED"},{roomType:"100900000008",description:"\u50A8"},{roomType:"100900000009",description:"\u4FDD\u59C6\u95F4"},{roomType:"100900000010",description:"\u8F66\u5E93"},{roomType:"100900000011",description:"\u9601\u697C"},{roomType:"100900000012",description:"\u5176\u4ED6"},{roomType:"100900000013",description:"\u8863"},{roomType:"100900000015",description:"\u5546\u94FA"},{roomType:"100900000016",description:"\u5199\u5B57\u697C"}],bi=(i,t,e)=>{const n=new E.Matrix4,o=new E.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},jd=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(bi(o,0,0)),s&&i.applyMatrix4(bi(0,s,0)),r&&i.applyMatrix4(bi(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function va(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=N({map:o.material.map||{}},t);o.material=new F.MeshBasicMaterial(s),o.renderOrder=1,((n=e.parent)==null?void 0:n.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const Qd=(i,t)=>{var u;const e=t.fbx_url||"//vrlab-static.ljcdn.com/release/web/v3/dipan3/dipan.FBX",n=(u=t.north_rad)!=null?u:void 0,o={},s=f=>J(exports,null,function*(){var U;const d=(f==null?void 0:f.fbx_url)||e,p=(U=f==null?void 0:f.north_rad)!=null?U:n;if(typeof p!="number")throw new Error('"northRad"\u914D\u7F6E\u53C2\u6570\u7F3A\u5931\uFF1A\u672A\u914D\u7F6E\u6307\u5357\u9488\u6307\u5411\uFF01');const m=i.model.bounding,g=m.max.x-m.min.x,A=m.max.z-m.min.z,v=Math.max(g,A),w=yield new Hr.FBXLoader().loadAsync(d);va(w,{transparent:!0,side:E.DoubleSide,blending:E.AdditiveBlending});const x=[0,p-Math.PI/2,0],{model:{bounding:{max:{x:D,z:y},min:{x:L,y:P,z:j}}}}=i;o.yBase=P;const B={x:(D+L)/2,y:P-1.6,z:(y+j)/2},G=.0045*v;return jd(w,{position:B,rotation:x,scale:G}),o.object=w,!0}),r=({latitude:f})=>{if(!o.object)return;const d=a(f);d&&(o.object.position.y=d)},a=f=>{if(o.yBase===void 0)return;const d=.6;if(f>=Math.PI/4)return o.yBase-(d+1.6);const p=f*(4/Math.PI);return o.yBase-(d*p+1.6)};return{load:s,disable:()=>{!o.object||(i.scene.remove(o.object),i.needsRender=!0,i.off("cameraDirectionUpdate",r))},enable:()=>{if(!o.object)return;const f=a(i.getPose().latitude);f&&(o.object.position.y=f),i.scene.add(o.object),i.needsRender=!0,i.on("cameraDirectionUpdate",r)}}};function Rd(i,t){var c,u,f,d,p;const e=(c=t==null?void 0:t.size)!=null?c:512,n=(u=t==null?void 0:t.fontSize)!=null?u:e*(35/256)*1.2,o=(f=t==null?void 0:t.backgroundColor)!=null?f:"rgba(0,0,0,0)",s=(d=t==null?void 0:t.fontColor)!=null?d:"#fff",r=(p=t==null?void 0:t.textAlign)!=null?p:"center",a=document.createElement("canvas");a.setAttribute("width",e+""),a.setAttribute("height",e+"");const l=a.getContext("2d");return l.fillStyle=o,l.fillRect(0,0,e,e),l.font=`${n}px "\u5FAE\u8F6F\u96C5\u9ED1"`,l.textAlign=r,l.fillStyle=s,l.fillText(i,e/2,e*.7),new F.CanvasTexture(a)}const Od=({x:i,y:t,z:e})=>new F.Vector3(i,t,e),Hd=(i,t)=>{var g,A,v;const e={},n=(g=t.animationEnabled)!=null?g:!0,o=(A=t.position)!=null?A:void 0,s=(v=t.rad)!=null?v:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=C=>J(exports,null,function*(){var B,G,U,I,S,R,W,Y;const w=(B=C==null?void 0:C.position)!=null?B:o;if(!w)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const x=Od(w),D=(G=C==null?void 0:C.rad)!=null?G:s,y=(U=C==null?void 0:C.fbx_url)!=null?U:r;if(e.rad=D,D===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${D}`));const L=yield new Hr.FBXLoader().loadAsync(y);L.position.copy(x),L.rotation.z=D,L.scale.set(.8,.8,.8),va(L,{transparent:!0,side:E.DoubleSide});const P=(W=(R=(S=(I=L.children)==null?void 0:I[0])==null?void 0:S.children)==null?void 0:R[3])==null?void 0:W.clone();if(!P)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${P}`));const j=(Y=t.name)!=null?Y:"\u5165\u6237\u95E8";return P.material=new F.MeshBasicMaterial({transparent:!0,map:Rd(j)}),P.renderOrder=3,L.children[0].add(P),e.object=L,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const C=1,w=new F.AnimationMixer(e.object);a.push(w);const x=w.clipAction(e.object.animations[0]);x.timeScale=C;let D;const y=()=>{let B=0,G=0;const U=1e3/30,I=S=>{B=requestAnimationFrame(I);const R=S-G;R<U||(G=S,a.forEach(W=>W.update(R/1e3)),i.needsRender=!0)};return B=requestAnimationFrame(I),()=>{cancelAnimationFrame(B)}},j={play:()=>{D||(x.play(),D=y(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{x.stop(),D==null||D(),D=void 0}};e.animation=j},u=C=>{var x;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((x=C==null?void 0:C.animationEnable)!=null?x:n)&&(e.animation||c(),e.animation.play()),i.scene.add(e.object),i.needsRender=!0},f=()=>{!e.object||(e.animation&&e.animation.stop(),i.scene.remove(e.object),i.needsRender=!0)},d=C=>C==="Floorplan"?u():f();return{load:l,enable:C=>(e.enabled||(e.enabled=!0,d(i.currentMode),i.on("modeChange",d),u(C)),!0),disable:()=>(e.enabled&&(e.enabled=!1,f(),i.off("modeChange",d)),!0)}};class so extends dn.default.Tween{constructor(){super(...arguments);h(this,"disposeMethods",[]);h(this,"animationFrameDisposer");h(this,"onDispose",e=>(this.disposeMethods.push(e),this));h(this,"play",()=>(this.start(0),this.animationFrameDisposer=ci(e=>this.update(e)),this));h(this,"dispose",()=>{var e;this.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this.disposeMethods.forEach(n=>n()),this.disposeMethods=[],dn.default.remove(this)})}}function ba(i,t=dn.default.Easing.Linear.None){const e=new so({progress:0}).to({progress:1});return i!==void 0&&e.duration(i),t!==void 0&&e.easing(t),e}const pn=window.requestAnimationFrame||(i=>setTimeout(i,16)),Fd=window.cancelAnimationFrame||clearTimeout;function li(i,t=0){t<=0?pn(i):pn(()=>li(i,t-1))}function ci(i,t=60){let e=-1,n=0,o=-1;const s=1e3/t;function r(a){o===-1&&(o=a),e=pn(r),!(a-n<s)&&(n=a,i&&i(a-o))}return e=pn(r),function(){Fd(e)}}function Gd(){const i=Date.now();return new Promise(t=>{pn(()=>{t(Date.now()-i)})})}const Nd=ni.Easing;function Wd(i,t,e,n=Nd.Linear.None){const o=new ni.Tween(i).to(t,e).easing(n);li(()=>o.start(0));const s=ci(a=>{o.update(a)===!1&&s()}),r=[];return o.onDestroy=a=>(r.push(a),o),o.destroy=function(){this.stop(),Object.assign(o,{_onStartCallback:null,_onUpdateCallback:null,_onCompleteCallback:null,_onStopCallbackL:null});let a;for(;a=r.shift();)a();s()},o}function Xd(i,t){return Wd({progress:0},{progress:1},i,t)}var ya=(i=>(i.Move="Move",i.Rotate="Rotate",i))(ya||{}),_e=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(_e||{});const Fn=Math.PI*2;function is(i){return(i%Fn+Fn)%Fn}function os(i){return i%Fn}function yi(i,t,e){return i+(t-i)*e}const Ri=(i,t,e)=>{const n=Math.PI,o=n*2;return i=is(i),t=is(t),e===_e.Anticlockwise&&i<t&&(i+=o),e===_e.Clockwise&&t<i&&(t+=o),e===_e.Loop&&t-i>n?Ri(i,t,_e.Anticlockwise):e===_e.Loop&&i-t>n?Ri(i,t,_e.Clockwise):{from:i,to:t}},Yd=i=>{const t={},e=(l,c,...u)=>J(exports,[l,c,...u],function*(s,r,a={preload:!0}){return t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),s.mode&&s.mode!==i.currentMode&&(yield i.changeMode(s.mode)),a.preload&&s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(yield i.preloadPano(s.panoIndex)),a.asyncEndCallback&&(yield a.asyncEndCallback()),s.panoIndex===void 0&&s.fov===void 0&&s.latitude===void 0&&s.longitude===void 0?!0:yield new Promise((f,d)=>{const p=s.panoIndex!==void 0?s.panoIndex:i.panoIndex;p!==void 0?i.moveToPano(p,Object.assign({duration:r,moveEndCallback:()=>f(!0),moveCancelCallback:()=>d(!1)},s)):d(!1)})}),n=s=>{const r=i.state,a=os(r.latitude),l=os(s.latitude),{from:c,to:u}=Ri(r.longitude,s.longitude,s.rotation||_e.Loop),f=r.fov,d=s.fov;return{from:{latitude:a,longitude:c,fov:f},to:{latitude:l,longitude:u,fov:d}}};return{move:e,rotate:(l,c,...u)=>J(exports,[l,c,...u],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==be.Five.Mode.Panorama&&(yield i.changeMode(be.Five.Mode.Panorama)),s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(a.preload&&(yield i.preloadPano(s.panoIndex)),yield new Promise((p,m)=>{if(!s.panoIndex){p(!0);return}i.moveToPano(s.panoIndex,{moveEndCallback:()=>p(!0),moveCancelCallback:()=>m(!1)})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:f,to:d}=n(s);return yield new Promise(p=>{const m=({progress:w})=>{const x={};x.longitude=yi(f.longitude,d.longitude,w),x.latitude=yi(f.latitude,d.latitude,w),x.fov=yi(f.fov,d.fov,w),i.setState(x,!0)},g=()=>{p(!0)},A=()=>{p(!1)},v=s.rotateSpeed?Math.ceil(Math.abs(d.longitude-f.longitude)/s.rotateSpeed*1e3):r,C=Xd(v,ni.Easing.Linear.None).onUpdate(m).onComplete(g).onDestroy(A);s.rotation===_e.Loop&&C.repeat(1/0).yoyo(!0),t.interruptCallback=(w=!0)=>{C.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),p(w)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function ss(i,t){return i.x===t.x&&i.y===t.y}function wa(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function Kn(i,t){return(t.y-i.y)/(t.x-i.x)}function Ca(i,t,e){const n=Kn(i[1],i[0]),o=Kn(t[1],t[0]);if(isNaN(n)||isNaN(o)||wa(n,o))return!1;if(In(i[0],t))return i[0];if(In(i[1],t))return i[1];if(In(t[0],i))return t[0];if(In(t[1],i))return t[1];if(e&&!Ud(i,t))return!1;const s=i[0],r=t[0];if(Math.abs(n)===1/0)return{x:s.x,y:t[1].y-(t[1].x-s.x)*o};if(Math.abs(o)===1/0)return{x:r.x,y:i[1].y-(i[1].x-r.x)*n};const a=(r.y-s.y+n*s.x-o*r.x)/(n-o),l=n*a-n*s.x+s.y;return{x:a,y:l}}function In(i,t){return ss(i,t[0])||ss(i,t[1])?!0:(t[0].x-i.x)*(i.x-t[1].x)>=0&&(t[0].y-i.y)*(i.y-t[1].y)>=0&&wa(Kn(t[0],i),Kn(i,t[1]))}function xn(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function Ud(i,t){return Math.max(i[0].x,i[1].x)>=Math.min(t[0].x,t[1].x)&&Math.max(t[0].x,t[1].x)>=Math.min(i[0].x,i[1].x)&&Math.max(i[0].y,i[1].y)>=Math.min(t[0].y,t[1].y)&&xn(t[0],i[1],i[0])*xn(i[1],t[1],i[0])>0&&xn(i[0],t[1],t[0])*xn(t[1],i[1],t[0])>0?1:0}function Ea(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>Ea(i,t-1))}const Vd=`<style type="text/css">
|
|
116
116
|
.PanoRulerPlugin-rule-line {
|
|
117
117
|
position: absolute;
|
|
118
118
|
transform-origin: left center;
|
|
@@ -205,7 +205,7 @@ transition: all 500ms;
|
|
|
205
205
|
<div class="PanoRulerPlugin-rule-label-name">${e.options.distanceText(A)}</div>
|
|
206
206
|
</div>
|
|
207
207
|
</div>
|
|
208
|
-
`,C=document.createElement("div");return C.setAttribute("class","PanoRulerPlugin-rule"),C.setAttribute("data-name",g),C.setAttribute("style","display: none"),C.innerHTML=v,C},o=document.createElement("div");o.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;");const s=document.createElement("div");s.innerHTML=Vd,o.appendChild(s);const r={},a=(g,A)=>{if(e.loaded)throw new Error("\u6807\u5C3A\u88AB\u91CD\u590D\u521D\u59CB\u5316\uFF01");const v=Zd(g,i),C=i.work;if(!C)return!1;for(const w in A){const x=A[w],{standingPosition:D}=C.observers[0],y=x.map(({x:L,z:P,observers:j})=>{const B=j.length>0?g.rooms[g.observers[j[0]]].name:"",G=v[B]?v[B].floor:null;let U=1/0,I={index:0,x:D.x,y:D.y,z:D.z};j.forEach(X=>{if(!C.observers[X])return;const{standingPosition:V}=C.observers[X],ue={index:X,x:V.x,y:V.y,z:V.z},de=Jd({x:L,z:P},ue);G?de<U&&Math.abs(ue.y-G)<.3&&(U=de,I=ue):de<U&&(U=de,I=ue)});const S=new F.Vector3(L,I.y,P);Object.assign(S,{observers:j});const R=v[B]?v[B].roof:null,W=R?new F.Vector3(L,R,P):null;return W&&Object.assign(W,{observers:j}),{origin:S,vertical:W}});r[w]={origins:y.map(L=>L.origin),rules:[]};for(const{origin:L,vertical:P}of y){if(!P)continue;const j=n(w,L.distanceTo(P));o.append(j),r[w].rules.push({vertical:!0,rule:[L,P],$element:j})}for(let L=0;L<y.length;L++){let P=L+1;P>=y.length&&(P=0);const{origin:j}=y[L],{origin:B}=y[P],G=n(w,j.distanceTo(B));o.append(G),r[w].rules.push({vertical:!1,rule:[j,B],$element:G})}}return e.loaded=!0,!0},l=(g,A,v)=>J(exports,null,function*(){const C=g||t.roomInfo,w=A||t.roomRules;if(!C||!w)throw new Error("\u6807\u5C3A\u6570\u636E\u4F9D\u8D56\u4E0D\u9F50\u5168\uFF01");return e.loaded=!1,e.options=N(N({},e.options),v||{}),i.model.loaded?a(C,w):yield new Promise(x=>i.once("modelLoaded",()=>x(a(C,w))))});t.roomInfo&&t.roomRules&&l(t.roomInfo,t.roomRules);const c=(g,A,v,C)=>{const w=[[{x:0,y:0},{x:v,y:0}],[{x:0,y:0},{x:0,y:C}],[{x:v,y:0},{x:v,y:C}],[{x:0,y:C},{x:v,y:C}]],x=[];for(let D=0;D<w.length;D++){const y=Ca([g,A],[w[D][0],w[D][1]],!0);y&&x.push(y)}return x.length===0?!1:x},u=()=>{var j;const g=(j=i.getElement())==null?void 0:j.parentElement;if(!g||!e.loaded||Object.keys(r).length<=0)return;const{panoIndex:A,camera:v,currentMode:C}=i;if(A===void 0)return;let w;for(const B in r)B.split(",").indexOf(A.toString())>=0&&(w=B);if(!w){for(const B in r)for(const{$element:G}of r[B].rules)G.style.display="none";return}const x=v.position,D=v.getWorldDirection(new F.Vector3),y=g.clientWidth,L=g.clientHeight;if(C!==be.Five.Mode.Panorama){for(const B in r)for(const{$element:G}of r[B].rules)G.style.display="none";return}for(const B in r)for(const{$element:G}of r[B].rules)G.style.display=B===w?"block":"none";const[P]=r[w].origins.slice().filter(B=>B.observers.indexOf(A)>=0).sort((B,G)=>{const U=B.clone().setY(0).sub(x).normalize().angleTo(D.clone().setY(0)),I=G.clone().setY(0).sub(x).normalize().angleTo(D.clone().setY(0));return U-I});for(const{rule:B,vertical:G,$element:U}of r[w].rules){const[I,S]=B,R=U.querySelector(".PanoRulerPlugin-rule-line");if(!R)return;if(!P){U.style.display="none";continue}if(I!==P&&S!==P){U.style.display="none";continue}if(I.distanceTo(S)<.3){U.style.display="none";continue}if(I.observers.indexOf(A)===-1||S.observers.indexOf(A)===-1){U.style.display="none";continue}if(I.clone().sub(x).normalize().angleTo(D)>Math.PI/2){U.style.display="none";continue}if(S.clone().sub(x).normalize().angleTo(D)>Math.PI/2){U.style.display="none";continue}const ne=I.distanceTo(S);if(S.clone().sub(S.clone().sub(I).divide(new F.Vector3(2,2,2))).distanceTo(x)/ne>8){U.style.display="none";continue}const ue=I.clone().project(v),de=(ue.x+1)/2*y,me=(-ue.y+1)/2*L,Ce=S.clone().project(v),De=(Ce.x+1)/2*y,Re=(-Ce.y+1)/2*L,se=Math.sqrt(Math.pow(De-de,2)+Math.pow(Re-me,2));let ve=se,ye=50;const re=c({x:~~de,y:~~me},{x:~~De,y:~~Re},y,L);if(re&&re.length===1&&(P===I?(ve=Math.sqrt(Math.pow(re[0].x-de,2)+Math.pow(re[0].y-me,2)),ye=ve/se*50):P===S&&(ve=Math.sqrt(Math.pow(re[0].x-De,2)+Math.pow(re[0].y-Re,2)),ye=100-ve/se*50)),re&&re.length===2){const ct={x:(re[0].x+re[1].x)/2,y:(re[0].y+re[1].y)/2};ye=Math.sqrt(Math.pow(ct.x-de,2)+Math.pow(ct.y-me,2))/se*100}const yt=(Math.PI/2-Math.atan2(De-de,me-Re))/Math.PI*180,ge=R.querySelector(".PanoRulerPlugin-rule-label"),lt=ge.children[0].clientWidth;lt>=se||lt/2>=ye/100*se||lt/2>=(1-ye/100)*se?R.style.display="none":(R.style.display="block",R.style.width=se+"px",R.style.left=de+"px",R.style.top=me+"px",R.style.transform=`rotate(${-yt}deg)`,ge.style.left=`${ye}%`)}},f=()=>Ea(u),d=()=>{var g,A;return e.loaded?(e.enable||(o.setAttribute("class","PanoRulerPlugin"+(e.options.className?" "+e.options.className:"")),(A=(g=i.getElement())==null?void 0:g.parentElement)==null||A.append(o),u(),i.on("modeChange",u),i.on("cameraUpdate",f),e.enable=!0),!0):!1},p=()=>(e.enable&&(i.off("modeChange",u),i.off("cameraUpdate",f),o&&o.remove(),e.enable=!1),!0);function m(g){if(g.distanceText&&g.distanceText!==e.options.distanceText){const A=g.distanceText;e.options.distanceText=A,Object.values(r).forEach(v=>{v.rules.forEach(C=>{const[w,x]=C.rule,D=w.distanceTo(x),y=C.$element.querySelector(".PanoRulerPlugin-rule-label-name");!y||(y.innerText=A(D))})})}}return{enable:d,disable:p,load:l,state:e,changeConfigs:m}};function qd(i){ae(i,"svelte-1h27ktp",".PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp{position:absolute;transform-origin:left 0.0625rem;width:0;height:0.125rem;pointer-events:none}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::after{content:'';position:absolute;left:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::before{content:'';position:absolute;right:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1.5s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp em.svelte-1h27ktp{display:block;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;box-shadow:0 0 0.25rem rgb(0 0 0 / 40%);position:relative}.rule-mixed-line.svelte-1h27ktp.svelte-1h27ktp{display:flex;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;align-items:center}.em-solid.svelte-1h27ktp.svelte-1h27ktp{height:100%;background:#ffffff}.em-dotted.svelte-1h27ktp.svelte-1h27ktp{height:0.125rem;background:var(--background-image);background-position:center;background-repeat:repeat}.PanoRulerPlugin-rule-label.svelte-1h27ktp.svelte-1h27ktp{position:absolute;width:0;height:0;top:0.0625rem;pointer-events:none}.PanoRulerPlugin-rule-label-name.svelte-1h27ktp.svelte-1h27ktp{position:absolute;padding:0.1875rem 0.375rem;background:rgba(195, 195, 195, 0.3);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem);border-radius:6.25rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);white-space:nowrap;overflow:hidden;color:#ffffff;font-weight:500;font-size:0.75rem;line-height:1;animation:svelte-1h27ktp-viewport-rule-label 0.25s ease 1s;animation-fill-mode:both;box-shadow:inset 0 0 0.625rem 0 rgba(255, 255, 255, 0.3)}@keyframes svelte-1h27ktp-viewport-rule-line{0%{width:0%}100%{width:100%}}@keyframes svelte-1h27ktp-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@keyframes svelte-1h27ktp-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}")}function rs(i,t,e){const n=i.slice();return n[6]=t[e],n}function Kd(i){let t,e=i[0].children,n=[];for(let o=0;o<e.length;o+=1)n[o]=as(rs(i,e,o));return{c(){t=Q("div");for(let o=0;o<n.length;o+=1)n[o].c();b(t,"class","rule-mixed-line svelte-1h27ktp")},m(o,s){T(o,t,s);for(let r=0;r<n.length;r+=1)n[r].m(t,null)},p(o,s){if(s&9){e=o[0].children;let r;for(r=0;r<e.length;r+=1){const a=rs(o,e,r);n[r]?n[r].p(a,s):(n[r]=as(a),n[r].c(),n[r].m(t,null))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},d(o){o&&z(t),tt(n,o)}}}function $d(i){let t,e;return{c(){t=Q("em"),b(t,"class",e=je(i[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),b(t,"style",i[3])},m(n,o){T(n,t,o)},p(n,o){o&1&&e!==(e=je(n[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&b(t,"class",e),o&8&&b(t,"style",n[3])},d(n){n&&z(t)}}}function as(i){let t,e,n=`${i[6].width}px`;return{c(){t=Q("div"),b(t,"class",e=je(i[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),b(t,"style",i[3]),H(t,"width",n)},m(o,s){T(o,t,s)},p(o,s){s&1&&e!==(e=je(o[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&b(t,"class",e),s&8&&b(t,"style",o[3]),s&1&&n!==(n=`${o[6].width}px`)&&H(t,"width",n)},d(o){o&&z(t)}}}function ef(i){let t,e,n,o,s=i[0].labelElement+"",r,a,l=`${i[0].labelOffset}%`,c=`${i[0].width}px`,u=`${i[0].left}px`,f=`${i[0].top}px`,d=`rotate(${i[0].rotateDeg}deg)`;function p(A,v){return A[0].children.length===0?$d:Kd}let m=p(i),g=m(i);return{c(){t=Q("div"),g.c(),e=Z(),n=Q("div"),o=Q("div"),r=ke(s),b(o,"class","PanoRulerPlugin-rule-label-name svelte-1h27ktp"),xe(()=>i[4].call(o)),b(n,"class","PanoRulerPlugin-rule-label svelte-1h27ktp"),H(n,"left",l),b(t,"class","PanoRulerPlugin-rule-line svelte-1h27ktp"),H(t,"width",c),H(t,"left",u),H(t,"top",f),H(t,"transform",d),H(t,"display",i[0].visible&&i[2]?"block":"none")},m(A,v){T(A,t,v),g.m(t,null),O(t,e),O(t,n),O(n,o),O(o,r),a=vt(o,i[4].bind(o))},p(A,[v]){m===(m=p(A))&&g?g.p(A,v):(g.d(1),g=m(A),g&&(g.c(),g.m(t,e))),v&1&&s!==(s=A[0].labelElement+"")&&Te(r,s),v&1&&l!==(l=`${A[0].labelOffset}%`)&&H(n,"left",l),v&1&&c!==(c=`${A[0].width}px`)&&H(t,"width",c),v&1&&u!==(u=`${A[0].left}px`)&&H(t,"left",u),v&1&&f!==(f=`${A[0].top}px`)&&H(t,"top",f),v&1&&d!==(d=`rotate(${A[0].rotateDeg}deg)`)&&H(t,"transform",d),v&5&&H(t,"display",A[0].visible&&A[2]?"block":"none")},i:ee,o:ee,d(A){A&&z(t),g.d(),a()}}}function tf(i,t,e){let n,{rulerItemProp:o}=t,s=!0,r,a="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcu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BzdHJva2U9IiNmZmYiIHN0cm9rZS1vcGFjaXR5PSIuNCIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjwvZz48L3N2Zz4=";function l(){r=this.offsetWidth,e(1,r)}return i.$$set=c=>{"rulerItemProp"in c&&e(0,o=c.rulerItemProp)},i.$$.update=()=>{i.$$.dirty&3&&(r>=o.width||r/2>=o.labelOffset/100*o.width||r/2>=(1-o.labelOffset/100)*o.width?e(2,s=!1):e(2,s=!0))},e(3,n=`--background-image: url(${a})`),[o,r,s,n,l]}class nf extends oe{constructor(t){super(),ie(this,t,tf,ef,te,{rulerItemProp:0},qd)}}function ls(i,t,e){const n=i.slice();return n[12]=t[e],n}function cs(i){let t,e;return t=new nf({props:{rulerItemProp:i[12]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.rulerItemProp=n[12]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function of(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=cs(ls(i,n,r));const s=r=>M(o[r],1,1,()=>{o[r]=null});return{c(){t=Q("div");for(let r=0;r<o.length;r+=1)o[r].c()},m(r,a){T(r,t,a);for(let l=0;l<o.length;l+=1)o[l].m(t,null);e=!0},p(r,[a]){if(a&1){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=ls(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=cs(c),o[l].c(),k(o[l],1),o[l].m(t,null))}for(le(),l=n.length;l<o.length;l+=1)s(l);ce()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)k(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)M(o[a]);e=!1},d(r){r&&z(t),tt(o,r)}}}function sf(i,t,e){var g,A,v,C;let{five:n}=t,{rulerDatas:o}=t,{options:s}=t,r=[];const a=((A=(g=n.getElement())==null?void 0:g.parentElement)==null?void 0:A.clientWidth)||0,l=((C=(v=n.getElement())==null?void 0:v.parentElement)==null?void 0:C.clientHeight)||0,c=(w,x)=>{const D=[[{x:0,y:0},{x:a,y:0}],[{x:0,y:0},{x:0,y:l}],[{x:a,y:0},{x:a,y:l}],[{x:0,y:l},{x:a,y:l}]],y=[];for(let L=0;L<D.length;L++){const P=Ca([w,x],[D[L][0],D[L][1]],!0);P&&y.push(P)}return y.length===0?!1:y},u=(w,x)=>{const D=w.clone().project(n.camera),y=(D.x+1)/2*a,L=(-D.y+1)/2*l,P=x.clone().project(n.camera),j=(P.x+1)/2*a,B=(-P.y+1)/2*l,G=Math.sqrt(Math.pow(j-y,2)+Math.pow(B-L,2));return{startLeft:y,startTop:L,endLeft:j,endTop:B,distance:G}},f=(w,x,D)=>{const y=n.camera.position,L=n.camera.getWorldDirection(new F.Vector3),P=w.clone().sub(y).normalize().angleTo(L),j=x.clone().sub(y).normalize().angleTo(L),B=w.distanceTo(x),U=x.clone().sub(x.clone().sub(w).divide(new F.Vector3(2,2,2))).distanceTo(y),{startLeft:I,startTop:S,endLeft:R,endTop:W,distance:Y}=u(w,x),X=-((Math.PI/2-Math.atan2(R-I,S-W))/Math.PI)*180;let V=!0;D||(V=!1),!qe(w,D)&&!qe(x,D)&&(V=!1),B<.3&&(V=!1),P>Math.PI/2&&(V=!1),j>Math.PI/2&&(V=!1),U/B>8&&(V=!1);let ue=50,de=Y;const me=c({x:~~I,y:~~S},{x:~~R,y:~~W});if(me&&me.length===1&&(qe(w,D)?(de=Math.sqrt(Math.pow(me[0].x-I,2)+Math.pow(me[0].y-S,2)),ue=de/Y*50):qe(x,D)&&(de=Math.sqrt(Math.pow(me[0].x-R,2)+Math.pow(me[0].y-W,2)),ue=100-de/Y*50)),me&&me.length===2){const Ce={x:(me[0].x+me[1].x)/2,y:(me[0].y+me[1].y)/2};ue=Math.sqrt(Math.pow(Ce.x-I,2)+Math.pow(Ce.y-S,2))/Y*100}return{startLeft:I,startTop:S,distance:Y,deg:X,visible:V,labelOffset:ue,ruleLength:B}},d=()=>{const w=n.panoIndex,x=o.find(G=>G.panoIndex===w);if(!x)return e(0,r=[]);if(n.currentMode!==be.Five.Mode.Panorama)return e(0,r=[]);const D=n.camera.position,y=n.camera.getWorldDirection(new F.Vector3),L=x.lines.map(G=>new F.Vector3(G.start[0],-G.start[1],-G.start[2])),P=x.lines.map(G=>new F.Vector3(G.end[0],-G.end[1],-G.end[2])),[j]=L.concat(P).sort((G,U)=>{const I=G.clone().setY(0).sub(D).normalize().angleTo(y.clone().setY(0)),S=U.clone().setY(0).sub(D).normalize().angleTo(y.clone().setY(0));return I-S}),B=x.lines.map(G=>{var de,me;const U=G.start,I=G.end,{startLeft:S,startTop:R,distance:W,deg:Y,visible:ne,labelOffset:X,ruleLength:V}=f(new F.Vector3(U[0],-U[1],-U[2]),new F.Vector3(I[0],-I[1],-I[2]),j),ue=[];return G.children&&((de=G.children)==null?void 0:de.length)>0&&((me=G.children)==null||me.forEach(Ce=>{const De=Ce.start,Re=Ce.end,{distance:se}=u(new F.Vector3(De[0],-De[1],-De[2]),new F.Vector3(Re[0],-Re[1],-Re[2]));ue.push({width:se,state:Ce.state})})),{width:W,left:S,top:R,rotateDeg:Y,state:G.state,children:ue,labelOffset:X,visible:ne,labelElement:s.distanceText(V)}});e(0,r=B)},p=()=>li(d),m=oo(d,80);return Ye(()=>{d(),n.on("panoArrived",d),n.on("modeChange",d),n.on("cameraDirectionUpdate",p),n.on("movingToPano",p),n.on("mouseWheel",()=>m()),n.on("pinchGesture",()=>m())}),bt(()=>{n.off("panoArrived",d),n.off("modeChange",d),n.off("cameraDirectionUpdate",p),n.off("movingToPano",p),n.off("mouseWheel",()=>m()),n.off("pinchGesture",()=>m())}),i.$$set=w=>{"five"in w&&e(1,n=w.five),"rulerDatas"in w&&e(2,o=w.rulerDatas),"options"in w&&e(3,s=w.options)},[r,n,o,s]}class rf extends oe{constructor(t){super(),ie(this,t,sf,of,te,{five:1,rulerDatas:2,options:3})}}class af{constructor(t,e){h(this,"five");h(this,"container",document.createElement("div"));h(this,"panoRulerProData");h(this,"rulerItems");h(this,"state",{enabled:!1,loaded:!1,options:{className:"",distanceText:t=>`${t.toFixed(1)}m`}});var n,o;this.five=t,this.container.classList.add("panoRulerProPlugin-container"),this.container.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;"),e&&(e.data&&this.load(e.data),this.state.options=N(N({},this.state.options),e.options||{}),(n=e.options)!=null&&n.className&&this.container.classList.add((o=e.options)==null?void 0:o.className)),this.five.once("modelLoaded",()=>J(this,null,function*(){var s,r;(r=(s=this.five.getElement())==null?void 0:s.parentNode)==null||r.append(this.container)})),this.five.once("dispose",()=>this.dispose())}load(t){return J(this,null,function*(){if(!this.five.work)return;const e=t.data;if(!e)throw new Error("\u6807\u5C3A\u6570\u636E\u4F9D\u8D56\u4E0D\u9F50\u5168\uFF01");this.panoRulerProData=e,this.state.loaded=!0})}enable(){return this.state.loaded?(this.state.enabled||(this.state.enabled=!0,this.render()),!0):!1}disable(){return this.state.enabled&&(this.state.enabled=!1,this.render()),!0}render(){return J(this,null,function*(){var t;if(this.state.enabled){if(!this.panoRulerProData||!this.container)return;this.rulerItems=new rf({target:this.container,props:{five:this.five,rulerDatas:this.panoRulerProData,options:this.state.options}})}else(t=this.rulerItems)==null||t.$destroy(),this.rulerItems=void 0})}dispose(){this.container&&(this.rulerItems.$destroy(),this.rulerItems=void 0),this.container.remove()}}const lf=(i,t)=>new af(i,t),cf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6t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2StcheRB4VQSkyzgD2PQppwBH4MaEMpBFRSDcqCYQx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC";function uf(){const i=document.createElement("div"),t=document.createElement("i"),e=document.createElement("span");return i.appendChild(t),i.appendChild(e),i.style.position="relative",i.style.width="100%",i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.style.marginTop=`${150/16}rem`,i.style.opacity="0",i.style.transition="opacity 1000ms linear",t.style.display="block",t.style.width=`${134/16}rem`,t.style.height=`${22/16}rem`,t.style.backgroundSize="100%",t.style.backgroundRepeat="no-repeat",t.style.backgroundImage=`url(${cf})`,e.style.marginTop=`${10/16}rem`,e.style.fontSize=`${16/16}rem`,e.style.color="#fff",e.style.opacity="0.7",e.style.textShadow="0 2px 16px rgb(22 34 83 / 24%)",e.style.fontWeight="bold",{appendTo(n){n.appendChild(i)},dispose(){i.remove()},setRoom(n){e.innerHTML=n.name+" "+Math.floor(n.size/1e6)+"\u33A1"},show(){i.style.opacity="1"},hide(){i.style.opacity="0"}}}const df=new E.TextureLoader;function us(i){return J(this,null,function*(){return new Promise((t,e)=>{df.load(i,t,void 0,e)}).then(t=>(t.encoding=E.sRGBEncoding,t))})}const kn={userAction:!0};class ff extends Ht{constructor(e,n){super(e);h(this,"state",{visible:!0,enabled:!0,config:{compassImageUrl:"//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png",entryDoorImageUrl:"//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png"}});h(this,"data");h(this,"group",new E.Group);h(this,"roomInfoInstance");h(this,"roomInfoWrapperInstance");h(this,"compassMeshTween");h(this,"compassMesh");h(this,"entryDoorMesh");h(this,"dispose",()=>{var e,n,o,s;this.five.scene.remove(this.group),this.group.remove(...this.group.children),(n=(e=this.compassMesh)==null?void 0:e.material.map)==null||n.dispose(),(s=(o=this.entryDoorMesh)==null?void 0:o.material.map)==null||s.dispose(),this.five.off("dispose",this.dispose),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});h(this,"_addEventListener",()=>{this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive),this.five.on("modeChange",this.onFiveModeChange),this.five.on("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});h(this,"_removeEventListener",()=>{this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("modeChange",this.onFiveModeChange),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});h(this,"_enable",()=>{this.five.scene.add(this.group),this.init(),this.onFivePanoArrived(this.five.panoIndex||0),this._addEventListener()});h(this,"_disable",()=>{this._clearCompassIfNeed(),this._clearEntryDoorIfNeed(),this.five.scene.remove(this.group),this._removeEventListener()});h(this,"_toggleVisible",()=>{this.group.visible=this.state.visible,this.five.needsRender=!0});h(this,"_clearCompassIfNeed",()=>{var e;this.compassMesh&&(this.group.remove(this.compassMesh),(e=this.compassMesh.material.map)==null||e.dispose(),this.compassMesh=null)});h(this,"_clearEntryDoorIfNeed",()=>{var e;this.entryDoorMesh&&(this.group.remove(this.entryDoorMesh),(e=this.entryDoorMesh.material.map)==null||e.dispose(),this.entryDoorMesh=null),this.roomInfoInstance&&(this.roomInfoInstance.dispose(),this.roomInfoInstance=null),this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.dispose(),this.roomInfoWrapperInstance=null)});h(this,"onFivePanoWillArrive",e=>{var n,o;e!==this.five.panoIndex&&((n=this.compassMeshTween)==null||n.dispose(),(o=this.compassMesh)==null||o.material.setValues({opacity:0}))});h(this,"onFivePanoArrived",e=>{var o,s,r,a,l,c,u;const n=(r=(s=(o=this.five.work)==null?void 0:o.observers)==null?void 0:s[e])==null?void 0:r.standingPosition;if(this.compassMesh&&(this.compassMesh.position.copy(n.clone().setY(n.y+.01)),this.compassMesh.material.opacity===0&&((a=this.compassMeshTween)==null||a.dispose(),this.compassMeshTween=ba(1e3).onUpdate(({progress:f})=>{var d;(d=this.compassMesh)==null||d.material.setValues({opacity:f}),this.five.needsRender=!0}).play())),this.entryDoorMesh){const d=new E.Vector3(this.data.entrance.position.x,this.data.entrance.position.y,this.data.entrance.position.z).clone().setY(n.y).sub(n).normalize(),p=n.clone().add(d.clone().multiplyScalar(.7)).setY(n.y+.01);this.entryDoorMesh.rotation.z=new E.Vector3(0,0,-1).angleTo(d),this.entryDoorMesh.position.copy(p),((l=this.data)==null?void 0:l.room_observers[e].room.type)===1?(c=this.entryDoorMesh)==null||c.material.setValues({opacity:1}):(u=this.entryDoorMesh)==null||u.material.setValues({opacity:0})}this.roomInfoInstance&&this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.position.copy(n.clone().setY(n.y+.01)),this.roomInfoInstance.setRoom(this.data.room_observers[e].room)),this.five.needsRender=!0});h(this,"onFiveCameraDirectionUpdate",({longitude:e,latitude:n})=>{var o,s;!this.roomInfoWrapperInstance||(this.roomInfoWrapperInstance.css3DObject.rotation.z=e,n>.66&&this.five.getCurrentState().mode==="Panorama"?(o=this.roomInfoInstance)==null||o.show():(s=this.roomInfoInstance)==null||s.hide())});h(this,"onFiveModeChange",(e,n,o,s,r)=>{e!==n&&this.setState({visible:e===be.Five.Mode.Panorama},{userAction:r})});this.five.scene.add(this.group),this.five.once("dispose",this.dispose),this.setState({visible:!0,enabled:!0,config:N(N({},this.state.config),n||{})})}enable(e=kn){this.setState({enabled:!0},e)}disable(e=kn){this.setState({enabled:!1},e)}show(e=kn){if(!!this.state.enabled)return this.setState({visible:!0},e),Promise.resolve()}hide(e=kn){if(!!this.state.enabled)return this.setState({visible:!1},e),Promise.resolve()}setState(e,n={userAction:!0}){var s,r;const o=JSON.parse(JSON.stringify(this.state));this.state={visible:(s=e.visible)!=null?s:o.visible,enabled:(r=e.enabled)!=null?r:o.enabled,config:N(N({},o.config),e.config||{})},this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n.userAction}),e.enabled===!0&&(this._enable(),this.hooks.emit("enable",n)),e.enabled===!1&&(this._disable(),this.hooks.emit("disable",n)),e.visible===!1&&(this._toggleVisible(),this.hooks.emit("hide",n)),e.visible===!0&&(this._toggleVisible(),this.hooks.emit("show",n)),e.config&&this.init()}load(e,n,o=!0){return J(this,null,function*(){const s=yield this.formatData(e);JSON.stringify(this.data)!==JSON.stringify(s)&&(this.hooks.emit("dataChange",s,this.data),this.data=N({},s),this.init(),n&&this.setState(n,{userAction:o}),this.hooks.emit("dataLoaded",this.data))})}formatData(e){return e.version&&e.data?Promise.resolve(e.data):Promise.resolve(e)}init(){return J(this,null,function*(){var o,s,r,a;const e=(s=(o=this.data)==null?void 0:o.north_rad)!=null?s:null;this._clearCompassIfNeed(),e!==null&&(this.compassMesh=yield this.loadCompassMesh(),this.compassMesh.rotateX(-Math.PI/2),this.compassMesh.rotateZ(e-Math.PI/2),this.group.add(this.compassMesh));const n=(a=(r=this.data)==null?void 0:r.entrance)!=null?a:null;this._clearEntryDoorIfNeed(),n!==null&&(this.entryDoorMesh=yield this.loadEntryDoorMesh(),this.roomInfoWrapperInstance=this.loadRoomInfo(),this.roomInfoInstance=uf(),this.entryDoorMesh.rotateX(-Math.PI/2),this.roomInfoWrapperInstance&&this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container),this.group.add(this.entryDoorMesh)),this.onFivePanoArrived(this.five.panoIndex||0),this.five.needsRender=!0})}loadCompassMesh(){return J(this,null,function*(){const e=this.state.config.compassImageUrl,n=yield us(e),o=new E.CircleGeometry(.7,32),s=new E.MeshBasicMaterial({map:n,transparent:!0,opacity:0,depthTest:!1}),r=new E.Mesh(o,s);return r.name="pano-compass-mesh",r})}loadEntryDoorMesh(){return J(this,null,function*(){const e=this.state.config.entryDoorImageUrl,n=yield us(e),o=new E.PlaneGeometry(.2,.16),s=new E.MeshBasicMaterial({map:n,transparent:!0,opacity:.8,depthTest:!1}),r=new E.Mesh(o,s);return r.name="pano-compass-entry-door",r})}loadRoomInfo(){const e=[new E.Vector3(-.7,0,-.7),new E.Vector3(.7,0,-.7),new E.Vector3(.7,0,.7),new E.Vector3(-.7,0,.7)];return Kt(this.five).create3DDomContainer(e)}}const hf=(i,t)=>new ff(i,t);function Dn(i,t,e){const n=i[t];i[t]=i[e],i[e]=n}function mf(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;Dn(i,a*4+0,l*4+0),Dn(i,a*4+1,l*4+1),Dn(i,a*4+2,l*4+2),Dn(i,a*4+3,l*4+3)}}}class Pa{constructor(t,e){h(this,"width");h(this,"height");h(this,"visible",!1);h(this,"hooks",new be.Subscribe);h(this,"contentDom",document.createElement("canvas"));h(this,"five");h(this,"scale");h(this,"wrapper");h(this,"config");h(this,"offset",{x:0,y:0});h(this,"canvas",this.contentDom);h(this,"context");h(this,"renderCenter",new E.Vector3);h(this,"lastPanEvent");h(this,"hammer");h(this,"onPan",t=>{var c,u,f,d;if(!this.wrapper)return;const e=(u=(c=this.lastPanEvent)==null?void 0:c.deltaX)!=null?u:0,n=(d=(f=this.lastPanEvent)==null?void 0:f.deltaY)!=null?d:0,o=t.deltaX-e,s=t.deltaY-n;if(this.lastPanEvent=t,this.hooks.emit("wantsPanGesture",{srcEvent:t,deltaX:o,deltaY:s}))return;const a=this.offset.x+o,l=this.offset.y+s;this.contentDom.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${a}px, ${l}px, 100px)`,this.offset={x:a,y:l}});h(this,"onPanEnd",t=>{this.lastPanEvent=void 0,this.contentDom.style.boxShadow="none"});var o,s,r;if(!t.renderer)throw new Error("Five Render \u672A\u521D\u59CB\u5316");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new gn.default(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd))}dispose(){var t;this.clear(),this.remove(),(t=this.hammer)==null||t.destroy()}remove(){this.canvas.remove(),this.visible=!1}clear(){this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}appendTo(t){this.wrapper=t,this.initStyle(),t.append(this.canvas),this.visible=!0}renderWithPoint(t){!this.wrapper||(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}autoFixPCPosition(){if(!this.wrapper)return;const{width:t,height:e}=this,n=this.renderCenter.clone().project(this.five.camera),o=(n.x+1)/2*this.wrapper.clientWidth,s=-(n.x-1)/2*this.wrapper.clientWidth,r=-(n.y-1)/2*this.wrapper.clientHeight;o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=90+"px"):r<183?(this.canvas.style.top=90+"px",this.canvas.style.left=-t/2+"px"):s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${r}px, 10px)`,this.offset={x:o,y:r}}render(){if(!this.five.renderer||!this.wrapper)return;const{scale:t,context:e,width:n,height:o}=this,s=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new E.Vector2),a=1,l=n/t,c=o/t,u=a*t,f=(s.x+1)/2*r.x,d=(s.y+1)/2*r.y,p=this.five.getPixels(f-l/2,d-l/2,l,c,u),m=Math.floor(n*a),g=Math.floor(o*a);mf(p,m,g);const A=new ImageData(m,g);A.data.set(p),e.putImageData(A,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}}class pf{constructor(t){h(this,"edges",[]);h(this,"five");h(this,"onModelLoaded",()=>{!this.five.model||(this.edges=this.five.model.getEdges())});this.five=t,this.five.model.loaded?this.onModelLoaded():this.five.on("modelLoaded",this.onModelLoaded)}dispose(){}getAdsorbentPoint(t){if(this.edges.length===0)return null;let e=1/0,n;return this.edges.forEach(o=>{const s=o.closestPointToPoint(t.point,!0,new F.Vector3),r=s.distanceTo(t.point);r<e&&(n=s,e=r)}),e>.1?null:n||null}}class Oi{constructor(){h(this,"id",He());h(this,"points",[]);h(this,"lines",[])}push(t){const e=this.getNext(t);if(!e)throw new Error("\u5F53\u524D\u7EBF\u6BB5\u4E8E\u4E0A\u4E00\u6761\u7EBF\u6BB5\u65E0\u6CD5\u6784\u6210\u6298\u7EBF");return this.lines.push(e.line),this.points.push(...e.points),this.lines.length}pop(){const t=this.lines.pop();return this.lines.length===0?this.points.slice(0,this.points.length):this.points.pop(),t}getNext(t){const e=this.points.slice(-1)[0];if(!e)return{line:t,points:t.points};if(!t.points.includes(e))return null;const n=t.points.find(o=>o!==e);return n?{line:t,points:[n]}:null}toJson(){return{id:this.id,lines:this.lines.map(t=>t.id),points:this.points.map(t=>t.id)}}toCompletelyJson(){return{id:this.id,points:this.points.map(t=>t.toJson()),lines:this.lines.map(t=>t.toCompletelyJson())}}}const gf=1,Af=3,vf=new F.Color(16777215),bf=new F.Color(6522623),yf=new F.Color(16777215),wf=new F.Color(6522623),Cf=6,Ef=8,Pf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAG/Py2baba05un7UgfgAAAHJJREFUKM9joBpgLHVSCRdA4metAoJlCJHmVWBgAeNzroKCCVCBLpjACqgJVjCBxRBT2FbBQQJYQAohsBAsUIUQWA4WiEIILAULeCEEloAFtBACizAEMLRgGIphLabDMJ2O6TlM72MGECIIMQIZIxqoBQCPvpJ/e9FaAAAAAABJRU5ErkJggg==",Ia=new F.TextureLoader().load(Pf),xa={pointTexture:Ia,pointSize:Cf,lineWidth:gf,lineColor:vf,pointColor:yf,lineRenderOrder:20,pointsRenderOrder:20};fe(N({},xa),{dashed:!0});const If={pointTexture:Ia,pointSize:Ef,lineWidth:Af,lineColor:bf,pointColor:wf,lineRenderOrder:10,pointsRenderOrder:10};function xf(i,t,e){var u,f,d,p,m;const n=(u=e==null?void 0:e.lineWidth)!=null?u:2,o=(f=e==null?void 0:e.lineColor)!=null?f:new F.Color(16777215),s=(d=e==null?void 0:e.pointSize)!=null?d:5,r=(p=e==null?void 0:e.lineRenderOrder)!=null?p:10,a=(m=e==null?void 0:e.lineRenderOrder)!=null?m:20,l=new Or.Line(i,t);l.setMaterial({linewidth:n,color:o}),l.line.material.depthTest=!1,l.line.material.transparent=!0,l.line.renderOrder=r,l.points.renderOrder=a;const c=l.points.material;return c.depthTest=!1,c.size=s,e!=null&&e.pointColor&&c.color.set(e.pointColor).convertSRGBToLinear(),e!=null&&e.pointTexture&&(c.map=e.pointTexture),l}function ds(i,t){const[e,n]=i.points,o=t==="light"?If:xa,s=xf(e.position,n.position,o);return s.name="normalLine_"+i.id,s}function Ke(i){const{x:t,y:e,z:n}=i;return!(Math.abs(t)>1||Math.abs(e)>1||Math.abs(n)>1)}function kf(){const i=document.createElement("div");return i.setAttribute("style","backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);"),i.style.padding="3px 6px",i.style.lineHeight="1",i.style.textAlign="center",i.style.transform="translate(-50%, -50%)",i.style.borderRadius="100px",i.style.fontSize="14px",i.style.color="#fff",i.style.background="rgba(195,195,195,0.70)",i.style.border="0.5px solid rgba(255,255,255,0.6)",i.style.pointerEvents="all",i.style.cursor="pointer",i}function Df(i){const t=document.createElement("div");return t.id="distance_"+i.id,t.classList.add("five-plugin-measure__distance"),t.style.opacity="0",t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.transform="translate3d(0, 0, 0)",t.style.transformOrigin="left top",t}function Lf(i){function t(){var m;(m=i.clickCallback)==null||m.call(i,p)}function e(){if(f)return f.highlight();c.style.border="0.5px solid #95AEFF",c.style.background="linear-gradient(90deg, #95AEFF 0%, #6386FF 100%)"}function n(){if(f)return f.unHighlight();c.style.border="0.5px solid rgba(255,255,255,0.6)",c.style.background="rgba(195,195,195,0.70)"}function o(m){const g=m.getElement();if(!g)return;const A=g.clientWidth,v=g.clientHeight;if(a.points.length<2)return;const[C,w]=a.points,x=C.position.clone().project(m.camera),D=w.position.clone().project(m.camera),y=x.clone().lerp(D,.5),L=new F.Vector2(x.x*A,x.y*v),P=new F.Vector2(D.x*A,D.y*v);if((()=>!(Math.abs(x.z)>1||Math.abs(D.z)>1||!Ke(x)&&!Ke(D)||!Ke(y)||L.distanceTo(P)<20))()===!1){u.style.opacity="0",u.style.pointerEvents="none";return}const B=(y.x+1)/2*A,G=-(y.y-1)/2*v,I=-(Math.atan((L.y-P.y)/(L.x-P.x))*180)/Math.PI;u.style.transform=`translate(${B}px, ${G}px) rotate(${I}deg)`,u.style.opacity="1",u.style.pointerEvents="all",f&&f.update({line:a.toCompletelyJson(),polyline:a.getPolyline().toCompletelyJson()});const S=C.position.clone().distanceTo(w.position),R=i.line.model.params.getDistanceText(S);c.innerText!==R&&(c.innerText=R)}function s(m){m.appendChild(u),u.addEventListener("click",t)}function r(){c.removeEventListener("click",t),u.remove()}const{line:a}=i,l=a.id,c=kf(),u=Df(a),f=i.userDistanceItem,d=new F.Vector3(0,0,0),p={lineID:l,ndcPosition:d,update:o,appendTo:s,remove:r,highlight:e,unHighlight:n};return f!=null&&f.element?u.appendChild(f.element):u.appendChild(c),p}class en{constructor(t,e,n){h(this,"id");h(this,"selected",!1);h(this,"type","line");h(this,"model");h(this,"mesh");h(this,"points");h(this,"lightMesh");h(this,"hook");h(this,"distanceItem");h(this,"polyline");if(this.id=He(),this.model=n,t.id===e.id)throw new Error("\u65E0\u6548\u7684\u7EBF\u6BB5, \u4E00\u4E2A\u70B9\u65E0\u6CD5\u6784\u6210\u7EBF\u6BB5");this.hook=new be.Subscribe,this.points=[t,e],this.mesh=ds(this,"normal"),this.lightMesh=ds(this,"light"),this.distanceItem=Lf({line:this,clickCallback:()=>this.hook.emit("selected",this),userDistanceItem:this.model.params.userDistanceItemCreator?this.model.params.userDistanceItemCreator():void 0}),t.lines.push(this),e.lines.push(this)}clear(){this.selected=!1,this.polyline=void 0}getPolyline(){if(this.polyline)return this.polyline;const t=this.model.polylines.find(n=>n.lines.includes(this));if(this.polyline=t,t)return t;const e=new Oi;return e.push(this),e}findAnotherPoint(t){return this.points.find(({id:e})=>e!==t.id)}toJson(){return{id:this.id,points:this.points.map(({id:t})=>t)}}toCompletelyJson(){return{id:this.id,points:this.points.map(t=>t.toJson())}}clone(){return new en(this.points[0].clone(),this.points[1].clone(),this.model)}}function rn(i,t){for(let e=0,n=t.length;e<n;e++)if(i===t[e])return t.splice(e,1)[0]}class $e{constructor(t){h(this,"id");h(this,"lines");h(this,"position");h(this,"type","point");this.id=He(),this.lines=[],this.position=new F.Vector3,t instanceof F.Vector3?this.position.copy(t):this.position.fromArray(t)}toJson(){return{id:this.id,lines:this.lines.map(({id:t})=>t),position:this.position.toArray()}}addLine(t){this.lines.push(t)}removeLine(t){rn(t,this.lines)}clone(){return new $e(this.position)}}class ro{constructor(t){h(this,"lines",[]);h(this,"points",[]);h(this,"params");h(this,"polylines",[]);h(this,"hook",new be.Subscribe);this.params=t}addLine(t){const[e,n]=t.points;if(!e||!n)return this;this.includes(e)||this.points.push(e),this.includes(n)||this.points.push(n),this.lines.push(t);const o=this.polylines.find(s=>!!s.getNext(t));if(o)o.push(t);else{const s=new Oi;s.push(t),this.polylines.push(s)}this.hook.emit("lineAdded",t)}removeLineByID(t){const e=this.getLineByID(t);e&&this.removeLine(e)}removeLine(t){const e=this.polylines.find(s=>s.lines.includes(t));if(e){if(e.lines.slice(-1)[0]!==t)throw new Error("\u4E0D\u80FD\u4ECE\u4E2D\u95F4\u5220\u9664\u7EBF\u6BB5");e.pop(),e.lines.length===0&&rn(e,this.polylines)}const[n,o]=t.points;return n.lines.length===0&&rn(n,this.points),o.lines.length===0&&rn(o,this.points),rn(t,this.lines),t.clear(),this.hook.emit("lineRemoved",t),this}mergeModel(t){t.lines.forEach(e=>this.addLine(e))}includes(t){if(t.type==="point")return this.points.find(({id:e})=>e===t.id)!==void 0;if(t.type==="line")return this.lines.find(({id:e})=>e===t.id)!==void 0}getPointByID(t){return this.points.find(({id:e})=>e===t)}getLineByID(t){return this.lines.find(({id:e})=>e===t)}getClosestPoint(){}parse(t){const e=t.points.map(({id:s,position:r})=>{const a=new $e(r);return a.id=s,a}),n=t.lines.map(s=>{const[r,a]=s.points,l=this.getPointByID.call({points:e},r),c=this.getPointByID.call({points:e},a);if(!l||!c)throw new Error("\u7EBF\u4E0A\u7684\u70B9\u4E0D\u5B58\u5728");const u=new en(l,c,this);return u.id=s.id,u}),o=t.polylines.map(s=>{const r=new Oi;return s.lines.forEach(a=>{const l=n.find(({id:c})=>c===a);l&&r.push(l)}),r});return this.points.splice(0,this.points.length,...e),this.lines.splice(0,this.lines.length,...n),this.polylines.splice(0,this.polylines.length,...o),this}toJson(){return{points:this.points.map(t=>t.toJson()),lines:this.lines.map(t=>t.toJson()),polylines:this.polylines.map(t=>t.toJson()).filter(t=>t.lines.length>0)}}}const Ln=i=>i.preventDefault();class ui{constructor(t){h(this,"model");h(this,"five");h(this,"group");h(this,"config");h(this,"dashed");h(this,"disposed",!1);h(this,"isMobile");h(this,"mouseGroup");h(this,"container");h(this,"fiveHelper");h(this,"hook");h(this,"magnifier");h(this,"userDistanceItemCreator");h(this,"updateDistanceUI",()=>{this.dashed.distanceItem.update(this.five),this.model.lines.forEach(t=>t.distanceItem.update(this.five))});var n,o;this.five=t.five,this.hook=t.hook,this.model=t.model,this.config=t.config,this.magnifier=t.magnifier,this.container=t.container,this.fiveHelper=t.fiveHelper,this.isMobile=(o=(n=t.openParams)==null?void 0:n.isMobile)!=null?o:!1,this.userDistanceItemCreator=t.userDistanceItemCreator,this.group=t.group,this.mouseGroup=t.mouseGroup,this.dashed=new en(new $e([0,0,0]),new $e([0,0,0]),this.model),this.dashed.mesh.setMaterial({dashed:!0,dashScale:100}),this.dashed.mesh.name="dashLine";const e=this.five.getElement();e&&(e.addEventListener("touchstart",Ln),e.addEventListener("contextmenu",Ln))}removeLine(t){this.group.remove(t.mesh,t.lightMesh),t.distanceItem.remove(),this.five.needsRender=!0}updateMouseGroup(t,e){if(!t)return this.mouseGroup;const n=this.fiveHelper.getAdsorbentPoint(t),o=n||t.point;if(this.mouseGroup.position.copy(o),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const r=t.face.normal.clone().multiplyScalar(.05),l=t.point.clone().add(r).clone().add(r);this.mouseGroup.lookAt(l)}return this.mouseGroup}dispose(){this.disposed=!0,this.magnifier.remove(),this.model.lines.forEach(e=>this.removeLine(e));const t=this.five.getElement();t&&(t.removeEventListener("touchstart",Ln),t.removeEventListener("contextmenu",Ln))}}function Hi(i){const{x:t,y:e}=i.center,{clientWidth:n,clientHeight:o}=i.target,s=i.target.getBoundingClientRect(),r=new F.Vector2(t,e).sub(new F.Vector2(s.left,s.top)),a=new F.Vector2(r.x/n*2-1,-(r.y/o)*2+1);return{point:r,ndcPoint:a}}function wi(i,t){const e=Hi(t).ndcPoint,n=new F.Raycaster;return n.setFromCamera(e,i.camera),i.model.intersectRaycaster(n)}class Sn extends ui{constructor(e){var o;super(e);h(this,"type","edit");h(this,"pressPoint");h(this,"hasAppendDashed",!1);h(this,"hasAppendMouseGroup",!1);h(this,"fiveElement");h(this,"lastPoint",null);h(this,"hammer");h(this,"onIntersectionUpdate",oo((e,n)=>{var s;this.hasAppendMouseGroup===!1&&(this.group.add(this.mouseGroup),this.magnifier.appendTo(this.container),this.hasAppendMouseGroup=!0);const o=this.updateMouseGroup(e,n).position;(s=this.pressPoint)==null||s.position.copy(o),this.updateDashed(),requestAnimationFrame(()=>this.magnifier.renderWithPoint(this.mouseGroup.position)),this.five.needsRender=!0},20));h(this,"revoke",()=>{if(this.model.lines.length===0&&this.lastPoint){this.lastPoint=null,this.hasAppendDashed=!1,this.dashed.distanceItem.remove(),this.group.remove(this.dashed.mesh),this.hook.emit("anchorChange",null),this.five.needsRender=!0;return}if(this.model.lines.length===0&&!this.lastPoint||!this.lastPoint)return;const e=this.model.lines[this.model.lines.length-1],n=e.findAnotherPoint(this.lastPoint);!n||(this.lastPoint=n,this.hook.emit("anchorChange",n.position),this.group.remove(e.mesh),this.model.removeLine(e),this.hasAppendMouseGroup=!1,this.mouseGroup.position.copy(this.lastPoint.position),this.group.remove(this.mouseGroup),e.distanceItem.remove(),this.updateDashed(),this.magnifier.remove(),this.five.needsRender=!0)});h(this,"onMouseLeave",()=>{this.magnifier.remove(),this.group.remove(this.mouseGroup),this.hasAppendMouseGroup=!1,this.lastPoint&&(this.mouseGroup.position.copy(this.lastPoint.position),this.updateDashed())});h(this,"onLineChanged",()=>{this.hook.emit("editedLineChange",this.model.lines.map(e=>e.toCompletelyJson()))});h(this,"onPress",e=>{const[n]=wi(this.five,e);if(!n||!n.face)return;const o=new $e(n.point);this.pressPoint=o,this.onIntersectionUpdate(n)});h(this,"onPan",e=>{if(!this.pressPoint)return;const[n]=wi(this.five,e);!n||!n.face||this.onIntersectionUpdate(n)});h(this,"onPanEnd",e=>{!this.pressPoint||this.onTap(e)});h(this,"onTap",e=>{this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh)),this.hasAppendDashed=!0;const[n]=wi(this.five,e);this.updateMouseGroup(n);const o=new $e(this.mouseGroup.position),s=this.lastPoint;if(o&&(this.lastPoint=o),o&&s){const r=new en(s,o,this.model);r.distanceItem.appendTo(this.container),this.model.addLine(r),this.group.add(r.mesh),r.distanceItem.update(this.five)}this.pressPoint=void 0,this.hasAppendMouseGroup=!1,this.magnifier.remove(),this.group.remove(this.mouseGroup),this.updateDashed(),this.five.needsRender=!0,this.hook.emit("anchorChange",o.position)});h(this,"onWantsTapGesture",()=>!1);h(this,"onWantsToMoveToPano",()=>!1);h(this,"onWantsPanGesture",()=>this.pressPoint?!1:void 0);h(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});h(this,"updateDashed",()=>{!this.lastPoint||(this.dashed.points[0].position.copy(this.lastPoint.position),this.dashed.points[1].position.copy(this.mouseGroup.position),this.dashed.mesh.setPoints(this.lastPoint.position,this.mouseGroup.position),this.dashed.distanceItem.update(this.five))});this.model=new ro(this.config),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsPanGesture",this.onWantsPanGesture),this.five.on("wantsTapGesture",this.onWantsTapGesture),this.five.on("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.on("intersectionOnModelUpdate",this.onIntersectionUpdate),this.model.hook.on("lineAdded",this.onLineChanged),this.model.hook.on("lineRemoved",this.onLineChanged);const n=this.five.getElement();if(n){this.fiveElement=n;const s=new gn.default(n);this.hammer=s,s.on("tap",this.onTap),s.on("pan",this.onPan),s.on("press",this.onPress),s.on("panend",this.onPanEnd)}(o=this.fiveElement)==null||o.addEventListener("mouseleave",this.onMouseLeave),this.hook.emit("anchorChange",null),this.five.refresh()}dispose(){var e,n;super.dispose(),this.group.remove(this.mouseGroup,this.dashed.mesh),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsPanGesture",this.onWantsPanGesture),this.five.off("wantsTapGesture",this.onWantsTapGesture),this.five.off("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.off("intersectionOnModelUpdate",this.onIntersectionUpdate),this.model.hook.off("lineAdded",this.onLineChanged),this.model.hook.off("lineRemoved",this.onLineChanged),(e=this.hammer)==null||e.destroy(),(n=this.fiveElement)==null||n.removeEventListener("mouseleave",this.onMouseLeave),this.magnifier.dispose(),this.dashed.distanceItem.remove(),this.five.needsRender=!0}getEditingLines(){return this.model.lines}}function ao(i,t){const e=i.x-t[0].x,n=i.y-t[0].y,o=t[1].x-t[0].x,s=t[1].y-t[0].y,r=e*o+n*s,a=o*o+s*s,l=r/a;let c,u;return l<0||Sf(t[0],t[1])?(c=t[0].x,u=t[0].y):l>1?(c=t[1].x,u=t[1].y):(c=t[0].x+l*o,u=t[0].y+l*s),new F.Vector2(c,u)}function Sf(i,t){return i.x===t.x&&i.y===t.y}function $n(i){const t=(s,r,a)=>{const l=s.lines.find(u=>u.points.findIndex(({id:d})=>d===s.id)!==r);if(!l)return a;const c=l.points[r];return c?t(c,r,a.concat(l)):a},e=t(i.points[0],1,[]),n=t(i.points[0],0,[]);return e.concat(n)}class zf extends ui{constructor(e){super(e);h(this,"type","view");h(this,"highlightedLines",[]);h(this,"hammer");h(this,"wantsTapGesture",e=>{if(this.model.lines.length===0)return;const[n]=this.five.model.intersectRaycaster(e);if(!n)return;const o=this.five.camera,s=n.point.clone().project(o),r=this.container.clientWidth,a=this.container.clientHeight,l=new F.Vector2(s.x*r,s.y*a),c=this.model.lines.map(p=>{const[m,g]=p.points,A=m.position.clone().project(o),v=g.position.clone().project(o);if(!Ke(A)&&!Ke(v))return null;const C=new F.Vector2(A.x*r,A.y*a),w=new F.Vector2(v.x*r,v.y*a);return{id:p.id,points:[C,w]}}).filter(p=>!!p);if(c.length===0)return;const f=c.map(p=>{const m=ao(l,p.points);return{id:p.id,distance:m.distanceTo(l)}}).sort((p,m)=>p.distance-m.distance)[0],d=f.distance>20?void 0:this.model.lines.find(({id:p})=>p===f.id);if(this.highlightedLines.length>0&&!d)return this.clearHighlightLines(),!1;if(d)return this.chooseLine(d),!1});h(this,"chooseLine",e=>{const n=$n(e);this.highlightLines(n),this.five.needsRender=!0,this.hook.emit("selectedChange",n.map(o=>o.toCompletelyJson()))});h(this,"lineRemoved",e=>{this.removeLine(e),this.hook.emit("selectedChange",this.model.lines.filter(n=>n.selected).map(n=>n.toCompletelyJson()))});h(this,"onCameraUpdate",()=>{this.updateDistanceUI()});this.model.lines.forEach(o=>{o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),o.hook.on("selected",this.chooseLine),this.group.add(o.mesh)});const n=this.five.getElement();if(n){const o=new gn.default(n);this.hammer=o}this.model.hook.on("lineRemoved",this.lineRemoved),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsTapGesture",this.wantsTapGesture),this.five.needsRender=!0}dispose(){var e;super.dispose(),this.model.hook.off("lineRemoved",this.lineRemoved),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsTapGesture",this.wantsTapGesture),this.five.needsRender=!0,this.hook.emit("selectedChange",[]),(e=this.hammer)==null||e.destroy()}highlightLine(e){e.selected||(e.selected=!0,this.group.add(e.lightMesh),e.distanceItem.highlight(),this.five.needsRender=!0)}clearHighlightLines(){this.group.children.length!==0&&(this.model.lines.forEach(e=>{e.selected=!1,e.distanceItem.unHighlight(),this.group.remove(e.lightMesh)}),this.highlightedLines=[],this.five.needsRender=!0)}highlightLines(e){this.clearHighlightLines(),this.highlightedLines=e,e.forEach(n=>this.highlightLine(n))}}const Mf=`
|
|
208
|
+
`,C=document.createElement("div");return C.setAttribute("class","PanoRulerPlugin-rule"),C.setAttribute("data-name",g),C.setAttribute("style","display: none"),C.innerHTML=v,C},o=document.createElement("div");o.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;");const s=document.createElement("div");s.innerHTML=Vd,o.appendChild(s);const r={},a=(g,A)=>{if(e.loaded)throw new Error("\u6807\u5C3A\u88AB\u91CD\u590D\u521D\u59CB\u5316\uFF01");const v=Zd(g,i),C=i.work;if(!C)return!1;for(const w in A){const x=A[w],{standingPosition:D}=C.observers[0],y=x.map(({x:L,z:P,observers:j})=>{const B=j.length>0?g.rooms[g.observers[j[0]]].name:"",G=v[B]?v[B].floor:null;let U=1/0,I={index:0,x:D.x,y:D.y,z:D.z};j.forEach(X=>{if(!C.observers[X])return;const{standingPosition:V}=C.observers[X],ue={index:X,x:V.x,y:V.y,z:V.z},de=Jd({x:L,z:P},ue);G?de<U&&Math.abs(ue.y-G)<.3&&(U=de,I=ue):de<U&&(U=de,I=ue)});const S=new F.Vector3(L,I.y,P);Object.assign(S,{observers:j});const R=v[B]?v[B].roof:null,W=R?new F.Vector3(L,R,P):null;return W&&Object.assign(W,{observers:j}),{origin:S,vertical:W}});r[w]={origins:y.map(L=>L.origin),rules:[]};for(const{origin:L,vertical:P}of y){if(!P)continue;const j=n(w,L.distanceTo(P));o.append(j),r[w].rules.push({vertical:!0,rule:[L,P],$element:j})}for(let L=0;L<y.length;L++){let P=L+1;P>=y.length&&(P=0);const{origin:j}=y[L],{origin:B}=y[P],G=n(w,j.distanceTo(B));o.append(G),r[w].rules.push({vertical:!1,rule:[j,B],$element:G})}}return e.loaded=!0,!0},l=(g,A,v)=>J(exports,null,function*(){const C=g||t.roomInfo,w=A||t.roomRules;if(!C||!w)throw new Error("\u6807\u5C3A\u6570\u636E\u4F9D\u8D56\u4E0D\u9F50\u5168\uFF01");return e.loaded=!1,e.options=N(N({},e.options),v||{}),i.model.loaded?a(C,w):yield new Promise(x=>i.once("modelLoaded",()=>x(a(C,w))))});t.roomInfo&&t.roomRules&&l(t.roomInfo,t.roomRules);const c=(g,A,v,C)=>{const w=[[{x:0,y:0},{x:v,y:0}],[{x:0,y:0},{x:0,y:C}],[{x:v,y:0},{x:v,y:C}],[{x:0,y:C},{x:v,y:C}]],x=[];for(let D=0;D<w.length;D++){const y=Ca([g,A],[w[D][0],w[D][1]],!0);y&&x.push(y)}return x.length===0?!1:x},u=()=>{var j;const g=(j=i.getElement())==null?void 0:j.parentElement;if(!g||!e.loaded||Object.keys(r).length<=0)return;const{panoIndex:A,camera:v,currentMode:C}=i;if(A===void 0)return;let w;for(const B in r)B.split(",").indexOf(A.toString())>=0&&(w=B);if(!w){for(const B in r)for(const{$element:G}of r[B].rules)G.style.display="none";return}const x=v.position,D=v.getWorldDirection(new F.Vector3),y=g.clientWidth,L=g.clientHeight;if(C!==be.Five.Mode.Panorama){for(const B in r)for(const{$element:G}of r[B].rules)G.style.display="none";return}for(const B in r)for(const{$element:G}of r[B].rules)G.style.display=B===w?"block":"none";const[P]=r[w].origins.slice().filter(B=>B.observers.indexOf(A)>=0).sort((B,G)=>{const U=B.clone().setY(0).sub(x).normalize().angleTo(D.clone().setY(0)),I=G.clone().setY(0).sub(x).normalize().angleTo(D.clone().setY(0));return U-I});for(const{rule:B,vertical:G,$element:U}of r[w].rules){const[I,S]=B,R=U.querySelector(".PanoRulerPlugin-rule-line");if(!R)return;if(!P){U.style.display="none";continue}if(I!==P&&S!==P){U.style.display="none";continue}if(I.distanceTo(S)<.3){U.style.display="none";continue}if(I.observers.indexOf(A)===-1||S.observers.indexOf(A)===-1){U.style.display="none";continue}if(I.clone().sub(x).normalize().angleTo(D)>Math.PI/2){U.style.display="none";continue}if(S.clone().sub(x).normalize().angleTo(D)>Math.PI/2){U.style.display="none";continue}const ne=I.distanceTo(S);if(S.clone().sub(S.clone().sub(I).divide(new F.Vector3(2,2,2))).distanceTo(x)/ne>8){U.style.display="none";continue}const ue=I.clone().project(v),de=(ue.x+1)/2*y,me=(-ue.y+1)/2*L,Ce=S.clone().project(v),De=(Ce.x+1)/2*y,Re=(-Ce.y+1)/2*L,se=Math.sqrt(Math.pow(De-de,2)+Math.pow(Re-me,2));let ve=se,ye=50;const re=c({x:~~de,y:~~me},{x:~~De,y:~~Re},y,L);if(re&&re.length===1&&(P===I?(ve=Math.sqrt(Math.pow(re[0].x-de,2)+Math.pow(re[0].y-me,2)),ye=ve/se*50):P===S&&(ve=Math.sqrt(Math.pow(re[0].x-De,2)+Math.pow(re[0].y-Re,2)),ye=100-ve/se*50)),re&&re.length===2){const ct={x:(re[0].x+re[1].x)/2,y:(re[0].y+re[1].y)/2};ye=Math.sqrt(Math.pow(ct.x-de,2)+Math.pow(ct.y-me,2))/se*100}const wt=(Math.PI/2-Math.atan2(De-de,me-Re))/Math.PI*180,ge=R.querySelector(".PanoRulerPlugin-rule-label"),lt=ge.children[0].clientWidth;lt>=se||lt/2>=ye/100*se||lt/2>=(1-ye/100)*se?R.style.display="none":(R.style.display="block",R.style.width=se+"px",R.style.left=de+"px",R.style.top=me+"px",R.style.transform=`rotate(${-wt}deg)`,ge.style.left=`${ye}%`)}},f=()=>Ea(u),d=()=>{var g,A;return e.loaded?(e.enable||(o.setAttribute("class","PanoRulerPlugin"+(e.options.className?" "+e.options.className:"")),(A=(g=i.getElement())==null?void 0:g.parentElement)==null||A.append(o),u(),i.on("modeChange",u),i.on("cameraUpdate",f),e.enable=!0),!0):!1},p=()=>(e.enable&&(i.off("modeChange",u),i.off("cameraUpdate",f),o&&o.remove(),e.enable=!1),!0);function m(g){if(g.distanceText&&g.distanceText!==e.options.distanceText){const A=g.distanceText;e.options.distanceText=A,Object.values(r).forEach(v=>{v.rules.forEach(C=>{const[w,x]=C.rule,D=w.distanceTo(x),y=C.$element.querySelector(".PanoRulerPlugin-rule-label-name");!y||(y.innerText=A(D))})})}}return{enable:d,disable:p,load:l,state:e,changeConfigs:m}};function qd(i){ae(i,"svelte-1h27ktp",".PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp{position:absolute;transform-origin:left 0.0625rem;width:0;height:0.125rem;pointer-events:none}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::after{content:'';position:absolute;left:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::before{content:'';position:absolute;right:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1.5s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp em.svelte-1h27ktp{display:block;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;box-shadow:0 0 0.25rem rgb(0 0 0 / 40%);position:relative}.rule-mixed-line.svelte-1h27ktp.svelte-1h27ktp{display:flex;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;align-items:center}.em-solid.svelte-1h27ktp.svelte-1h27ktp{height:100%;background:#ffffff}.em-dotted.svelte-1h27ktp.svelte-1h27ktp{height:0.125rem;background:var(--background-image);background-position:center;background-repeat:repeat}.PanoRulerPlugin-rule-label.svelte-1h27ktp.svelte-1h27ktp{position:absolute;width:0;height:0;top:0.0625rem;pointer-events:none}.PanoRulerPlugin-rule-label-name.svelte-1h27ktp.svelte-1h27ktp{position:absolute;padding:0.1875rem 0.375rem;background:rgba(195, 195, 195, 0.3);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem);border-radius:6.25rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);white-space:nowrap;overflow:hidden;color:#ffffff;font-weight:500;font-size:0.75rem;line-height:1;animation:svelte-1h27ktp-viewport-rule-label 0.25s ease 1s;animation-fill-mode:both;box-shadow:inset 0 0 0.625rem 0 rgba(255, 255, 255, 0.3)}@keyframes svelte-1h27ktp-viewport-rule-line{0%{width:0%}100%{width:100%}}@keyframes svelte-1h27ktp-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@keyframes svelte-1h27ktp-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}")}function rs(i,t,e){const n=i.slice();return n[6]=t[e],n}function Kd(i){let t,e=i[0].children,n=[];for(let o=0;o<e.length;o+=1)n[o]=as(rs(i,e,o));return{c(){t=Q("div");for(let o=0;o<n.length;o+=1)n[o].c();b(t,"class","rule-mixed-line svelte-1h27ktp")},m(o,s){T(o,t,s);for(let r=0;r<n.length;r+=1)n[r].m(t,null)},p(o,s){if(s&9){e=o[0].children;let r;for(r=0;r<e.length;r+=1){const a=rs(o,e,r);n[r]?n[r].p(a,s):(n[r]=as(a),n[r].c(),n[r].m(t,null))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},d(o){o&&z(t),tt(n,o)}}}function $d(i){let t,e;return{c(){t=Q("em"),b(t,"class",e=je(i[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),b(t,"style",i[3])},m(n,o){T(n,t,o)},p(n,o){o&1&&e!==(e=je(n[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&b(t,"class",e),o&8&&b(t,"style",n[3])},d(n){n&&z(t)}}}function as(i){let t,e,n=`${i[6].width}px`;return{c(){t=Q("div"),b(t,"class",e=je(i[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),b(t,"style",i[3]),H(t,"width",n)},m(o,s){T(o,t,s)},p(o,s){s&1&&e!==(e=je(o[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&b(t,"class",e),s&8&&b(t,"style",o[3]),s&1&&n!==(n=`${o[6].width}px`)&&H(t,"width",n)},d(o){o&&z(t)}}}function ef(i){let t,e,n,o,s=i[0].labelElement+"",r,a,l=`${i[0].labelOffset}%`,c=`${i[0].width}px`,u=`${i[0].left}px`,f=`${i[0].top}px`,d=`rotate(${i[0].rotateDeg}deg)`;function p(A,v){return A[0].children.length===0?$d:Kd}let m=p(i),g=m(i);return{c(){t=Q("div"),g.c(),e=Z(),n=Q("div"),o=Q("div"),r=ke(s),b(o,"class","PanoRulerPlugin-rule-label-name svelte-1h27ktp"),xe(()=>i[4].call(o)),b(n,"class","PanoRulerPlugin-rule-label svelte-1h27ktp"),H(n,"left",l),b(t,"class","PanoRulerPlugin-rule-line svelte-1h27ktp"),H(t,"width",c),H(t,"left",u),H(t,"top",f),H(t,"transform",d),H(t,"display",i[0].visible&&i[2]?"block":"none")},m(A,v){T(A,t,v),g.m(t,null),O(t,e),O(t,n),O(n,o),O(o,r),a=bt(o,i[4].bind(o))},p(A,[v]){m===(m=p(A))&&g?g.p(A,v):(g.d(1),g=m(A),g&&(g.c(),g.m(t,e))),v&1&&s!==(s=A[0].labelElement+"")&&Te(r,s),v&1&&l!==(l=`${A[0].labelOffset}%`)&&H(n,"left",l),v&1&&c!==(c=`${A[0].width}px`)&&H(t,"width",c),v&1&&u!==(u=`${A[0].left}px`)&&H(t,"left",u),v&1&&f!==(f=`${A[0].top}px`)&&H(t,"top",f),v&1&&d!==(d=`rotate(${A[0].rotateDeg}deg)`)&&H(t,"transform",d),v&5&&H(t,"display",A[0].visible&&A[2]?"block":"none")},i:ee,o:ee,d(A){A&&z(t),g.d(),a()}}}function tf(i,t,e){let n,{rulerItemProp:o}=t,s=!0,r,a="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcuNCUiIHg9Ii0xOC43JSIgeT0iLTE1MCUiPjxmZ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PSIuNCIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjwvZz48L3N2Zz4=";function l(){r=this.offsetWidth,e(1,r)}return i.$$set=c=>{"rulerItemProp"in c&&e(0,o=c.rulerItemProp)},i.$$.update=()=>{i.$$.dirty&3&&(r>=o.width||r/2>=o.labelOffset/100*o.width||r/2>=(1-o.labelOffset/100)*o.width?e(2,s=!1):e(2,s=!0))},e(3,n=`--background-image: url(${a})`),[o,r,s,n,l]}class nf extends oe{constructor(t){super(),ie(this,t,tf,ef,te,{rulerItemProp:0},qd)}}function ls(i,t,e){const n=i.slice();return n[12]=t[e],n}function cs(i){let t,e;return t=new nf({props:{rulerItemProp:i[12]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.rulerItemProp=n[12]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function of(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=cs(ls(i,n,r));const s=r=>M(o[r],1,1,()=>{o[r]=null});return{c(){t=Q("div");for(let r=0;r<o.length;r+=1)o[r].c()},m(r,a){T(r,t,a);for(let l=0;l<o.length;l+=1)o[l].m(t,null);e=!0},p(r,[a]){if(a&1){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=ls(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=cs(c),o[l].c(),k(o[l],1),o[l].m(t,null))}for(le(),l=n.length;l<o.length;l+=1)s(l);ce()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)k(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)M(o[a]);e=!1},d(r){r&&z(t),tt(o,r)}}}function sf(i,t,e){var g,A,v,C;let{five:n}=t,{rulerDatas:o}=t,{options:s}=t,r=[];const a=((A=(g=n.getElement())==null?void 0:g.parentElement)==null?void 0:A.clientWidth)||0,l=((C=(v=n.getElement())==null?void 0:v.parentElement)==null?void 0:C.clientHeight)||0,c=(w,x)=>{const D=[[{x:0,y:0},{x:a,y:0}],[{x:0,y:0},{x:0,y:l}],[{x:a,y:0},{x:a,y:l}],[{x:0,y:l},{x:a,y:l}]],y=[];for(let L=0;L<D.length;L++){const P=Ca([w,x],[D[L][0],D[L][1]],!0);P&&y.push(P)}return y.length===0?!1:y},u=(w,x)=>{const D=w.clone().project(n.camera),y=(D.x+1)/2*a,L=(-D.y+1)/2*l,P=x.clone().project(n.camera),j=(P.x+1)/2*a,B=(-P.y+1)/2*l,G=Math.sqrt(Math.pow(j-y,2)+Math.pow(B-L,2));return{startLeft:y,startTop:L,endLeft:j,endTop:B,distance:G}},f=(w,x,D)=>{const y=n.camera.position,L=n.camera.getWorldDirection(new F.Vector3),P=w.clone().sub(y).normalize().angleTo(L),j=x.clone().sub(y).normalize().angleTo(L),B=w.distanceTo(x),U=x.clone().sub(x.clone().sub(w).divide(new F.Vector3(2,2,2))).distanceTo(y),{startLeft:I,startTop:S,endLeft:R,endTop:W,distance:Y}=u(w,x),X=-((Math.PI/2-Math.atan2(R-I,S-W))/Math.PI)*180;let V=!0;D||(V=!1),!qe(w,D)&&!qe(x,D)&&(V=!1),B<.3&&(V=!1),P>Math.PI/2&&(V=!1),j>Math.PI/2&&(V=!1),U/B>8&&(V=!1);let ue=50,de=Y;const me=c({x:~~I,y:~~S},{x:~~R,y:~~W});if(me&&me.length===1&&(qe(w,D)?(de=Math.sqrt(Math.pow(me[0].x-I,2)+Math.pow(me[0].y-S,2)),ue=de/Y*50):qe(x,D)&&(de=Math.sqrt(Math.pow(me[0].x-R,2)+Math.pow(me[0].y-W,2)),ue=100-de/Y*50)),me&&me.length===2){const Ce={x:(me[0].x+me[1].x)/2,y:(me[0].y+me[1].y)/2};ue=Math.sqrt(Math.pow(Ce.x-I,2)+Math.pow(Ce.y-S,2))/Y*100}return{startLeft:I,startTop:S,distance:Y,deg:X,visible:V,labelOffset:ue,ruleLength:B}},d=()=>{const w=n.panoIndex,x=o.find(G=>G.panoIndex===w);if(!x)return e(0,r=[]);if(n.currentMode!==be.Five.Mode.Panorama)return e(0,r=[]);const D=n.camera.position,y=n.camera.getWorldDirection(new F.Vector3),L=x.lines.map(G=>new F.Vector3(G.start[0],-G.start[1],-G.start[2])),P=x.lines.map(G=>new F.Vector3(G.end[0],-G.end[1],-G.end[2])),[j]=L.concat(P).sort((G,U)=>{const I=G.clone().setY(0).sub(D).normalize().angleTo(y.clone().setY(0)),S=U.clone().setY(0).sub(D).normalize().angleTo(y.clone().setY(0));return I-S}),B=x.lines.map(G=>{var de,me;const U=G.start,I=G.end,{startLeft:S,startTop:R,distance:W,deg:Y,visible:ne,labelOffset:X,ruleLength:V}=f(new F.Vector3(U[0],-U[1],-U[2]),new F.Vector3(I[0],-I[1],-I[2]),j),ue=[];return G.children&&((de=G.children)==null?void 0:de.length)>0&&((me=G.children)==null||me.forEach(Ce=>{const De=Ce.start,Re=Ce.end,{distance:se}=u(new F.Vector3(De[0],-De[1],-De[2]),new F.Vector3(Re[0],-Re[1],-Re[2]));ue.push({width:se,state:Ce.state})})),{width:W,left:S,top:R,rotateDeg:Y,state:G.state,children:ue,labelOffset:X,visible:ne,labelElement:s.distanceText(V)}});e(0,r=B)},p=()=>li(d),m=oo(d,80);return Ye(()=>{d(),n.on("panoArrived",d),n.on("modeChange",d),n.on("cameraDirectionUpdate",p),n.on("movingToPano",p),n.on("mouseWheel",()=>m()),n.on("pinchGesture",()=>m())}),yt(()=>{n.off("panoArrived",d),n.off("modeChange",d),n.off("cameraDirectionUpdate",p),n.off("movingToPano",p),n.off("mouseWheel",()=>m()),n.off("pinchGesture",()=>m())}),i.$$set=w=>{"five"in w&&e(1,n=w.five),"rulerDatas"in w&&e(2,o=w.rulerDatas),"options"in w&&e(3,s=w.options)},[r,n,o,s]}class rf extends oe{constructor(t){super(),ie(this,t,sf,of,te,{five:1,rulerDatas:2,options:3})}}class af{constructor(t,e){h(this,"five");h(this,"container",document.createElement("div"));h(this,"panoRulerProData");h(this,"rulerItems");h(this,"state",{enabled:!1,loaded:!1,options:{className:"",distanceText:t=>`${t.toFixed(1)}m`}});var n,o;this.five=t,this.container.classList.add("panoRulerProPlugin-container"),this.container.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;"),e&&(e.data&&this.load(e.data),this.state.options=N(N({},this.state.options),e.options||{}),(n=e.options)!=null&&n.className&&this.container.classList.add((o=e.options)==null?void 0:o.className)),this.five.once("modelLoaded",()=>J(this,null,function*(){var s,r;(r=(s=this.five.getElement())==null?void 0:s.parentNode)==null||r.append(this.container)})),this.five.once("dispose",()=>this.dispose())}load(t){return J(this,null,function*(){if(!this.five.work)return;const e=t.data;if(!e)throw new Error("\u6807\u5C3A\u6570\u636E\u4F9D\u8D56\u4E0D\u9F50\u5168\uFF01");this.panoRulerProData=e,this.state.loaded=!0})}enable(){return this.state.loaded?(this.state.enabled||(this.state.enabled=!0,this.render()),!0):!1}disable(){return this.state.enabled&&(this.state.enabled=!1,this.render()),!0}render(){return J(this,null,function*(){var t;if(this.state.enabled){if(!this.panoRulerProData||!this.container)return;this.rulerItems=new rf({target:this.container,props:{five:this.five,rulerDatas:this.panoRulerProData,options:this.state.options}})}else(t=this.rulerItems)==null||t.$destroy(),this.rulerItems=void 0})}dispose(){this.container&&(this.rulerItems.$destroy(),this.rulerItems=void 0),this.container.remove()}}const lf=(i,t)=>new af(i,t),cf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8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Qx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC";function uf(){const i=document.createElement("div"),t=document.createElement("i"),e=document.createElement("span");return i.appendChild(t),i.appendChild(e),i.style.position="relative",i.style.width="100%",i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.style.marginTop=`${150/16}rem`,i.style.opacity="0",i.style.transition="opacity 1000ms linear",t.style.display="block",t.style.width=`${134/16}rem`,t.style.height=`${22/16}rem`,t.style.backgroundSize="100%",t.style.backgroundRepeat="no-repeat",t.style.backgroundImage=`url(${cf})`,e.style.marginTop=`${10/16}rem`,e.style.fontSize=`${16/16}rem`,e.style.color="#fff",e.style.opacity="0.7",e.style.textShadow="0 2px 16px rgb(22 34 83 / 24%)",e.style.fontWeight="bold",{appendTo(n){n.appendChild(i)},dispose(){i.remove()},setRoom(n){e.innerHTML=n.name+" "+Math.floor(n.size/1e6)+"\u33A1"},show(){i.style.opacity="1"},hide(){i.style.opacity="0"}}}const df=new E.TextureLoader;function us(i){return J(this,null,function*(){return new Promise((t,e)=>{df.load(i,t,void 0,e)}).then(t=>(t.encoding=E.sRGBEncoding,t))})}const kn={userAction:!0};class ff extends Ht{constructor(e,n){super(e);h(this,"state",{visible:!0,enabled:!0,config:{compassImageUrl:"//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png",entryDoorImageUrl:"//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png"}});h(this,"data");h(this,"group",new E.Group);h(this,"roomInfoInstance");h(this,"roomInfoWrapperInstance");h(this,"compassMeshTween");h(this,"compassMesh");h(this,"entryDoorMesh");h(this,"dispose",()=>{var e,n,o,s;this.five.scene.remove(this.group),this.group.remove(...this.group.children),(n=(e=this.compassMesh)==null?void 0:e.material.map)==null||n.dispose(),(s=(o=this.entryDoorMesh)==null?void 0:o.material.map)==null||s.dispose(),this.five.off("dispose",this.dispose),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});h(this,"_addEventListener",()=>{this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive),this.five.on("modeChange",this.onFiveModeChange),this.five.on("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});h(this,"_removeEventListener",()=>{this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("modeChange",this.onFiveModeChange),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});h(this,"_enable",()=>{this.five.scene.add(this.group),this.init(),this.onFivePanoArrived(this.five.panoIndex||0),this._addEventListener()});h(this,"_disable",()=>{this._clearCompassIfNeed(),this._clearEntryDoorIfNeed(),this.five.scene.remove(this.group),this._removeEventListener()});h(this,"_toggleVisible",()=>{this.group.visible=this.state.visible,this.five.needsRender=!0});h(this,"_clearCompassIfNeed",()=>{var e;this.compassMesh&&(this.group.remove(this.compassMesh),(e=this.compassMesh.material.map)==null||e.dispose(),this.compassMesh=null)});h(this,"_clearEntryDoorIfNeed",()=>{var e;this.entryDoorMesh&&(this.group.remove(this.entryDoorMesh),(e=this.entryDoorMesh.material.map)==null||e.dispose(),this.entryDoorMesh=null),this.roomInfoInstance&&(this.roomInfoInstance.dispose(),this.roomInfoInstance=null),this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.dispose(),this.roomInfoWrapperInstance=null)});h(this,"onFivePanoWillArrive",e=>{var n,o;e!==this.five.panoIndex&&((n=this.compassMeshTween)==null||n.dispose(),(o=this.compassMesh)==null||o.material.setValues({opacity:0}))});h(this,"onFivePanoArrived",e=>{var o,s,r,a,l,c,u;const n=(r=(s=(o=this.five.work)==null?void 0:o.observers)==null?void 0:s[e])==null?void 0:r.standingPosition;if(this.compassMesh&&(this.compassMesh.position.copy(n.clone().setY(n.y+.01)),this.compassMesh.material.opacity===0&&((a=this.compassMeshTween)==null||a.dispose(),this.compassMeshTween=ba(1e3).onUpdate(({progress:f})=>{var d;(d=this.compassMesh)==null||d.material.setValues({opacity:f}),this.five.needsRender=!0}).play())),this.entryDoorMesh){const d=new E.Vector3(this.data.entrance.position.x,this.data.entrance.position.y,this.data.entrance.position.z).clone().setY(n.y).sub(n).normalize(),p=n.clone().add(d.clone().multiplyScalar(.7)).setY(n.y+.01);this.entryDoorMesh.rotation.z=new E.Vector3(0,0,-1).angleTo(d),this.entryDoorMesh.position.copy(p),((l=this.data)==null?void 0:l.room_observers[e].room.type)===1?(c=this.entryDoorMesh)==null||c.material.setValues({opacity:1}):(u=this.entryDoorMesh)==null||u.material.setValues({opacity:0})}this.roomInfoInstance&&this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.position.copy(n.clone().setY(n.y+.01)),this.roomInfoInstance.setRoom(this.data.room_observers[e].room)),this.five.needsRender=!0});h(this,"onFiveCameraDirectionUpdate",({longitude:e,latitude:n})=>{var o,s;!this.roomInfoWrapperInstance||(this.roomInfoWrapperInstance.css3DObject.rotation.z=e,n>.66&&this.five.getCurrentState().mode==="Panorama"?(o=this.roomInfoInstance)==null||o.show():(s=this.roomInfoInstance)==null||s.hide())});h(this,"onFiveModeChange",(e,n,o,s,r)=>{e!==n&&this.setState({visible:e===be.Five.Mode.Panorama},{userAction:r})});this.five.scene.add(this.group),this.five.once("dispose",this.dispose),this.setState({visible:!0,enabled:!0,config:N(N({},this.state.config),n||{})})}enable(e=kn){this.setState({enabled:!0},e)}disable(e=kn){this.setState({enabled:!1},e)}show(e=kn){if(!!this.state.enabled)return this.setState({visible:!0},e),Promise.resolve()}hide(e=kn){if(!!this.state.enabled)return this.setState({visible:!1},e),Promise.resolve()}setState(e,n={userAction:!0}){var s,r;const o=JSON.parse(JSON.stringify(this.state));this.state={visible:(s=e.visible)!=null?s:o.visible,enabled:(r=e.enabled)!=null?r:o.enabled,config:N(N({},o.config),e.config||{})},this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n.userAction}),e.enabled===!0&&(this._enable(),this.hooks.emit("enable",n)),e.enabled===!1&&(this._disable(),this.hooks.emit("disable",n)),e.visible===!1&&(this._toggleVisible(),this.hooks.emit("hide",n)),e.visible===!0&&(this._toggleVisible(),this.hooks.emit("show",n)),e.config&&this.init()}load(e,n,o=!0){return J(this,null,function*(){const s=yield this.formatData(e);JSON.stringify(this.data)!==JSON.stringify(s)&&(this.hooks.emit("dataChange",s,this.data),this.data=N({},s),this.init(),n&&this.setState(n,{userAction:o}),this.hooks.emit("dataLoaded",this.data))})}formatData(e){return e.version&&e.data?Promise.resolve(e.data):Promise.resolve(e)}init(){return J(this,null,function*(){var o,s,r,a;const e=(s=(o=this.data)==null?void 0:o.north_rad)!=null?s:null;this._clearCompassIfNeed(),e!==null&&(this.compassMesh=yield this.loadCompassMesh(),this.compassMesh.rotateX(-Math.PI/2),this.compassMesh.rotateZ(e-Math.PI/2),this.group.add(this.compassMesh));const n=(a=(r=this.data)==null?void 0:r.entrance)!=null?a:null;this._clearEntryDoorIfNeed(),n!==null&&(this.entryDoorMesh=yield this.loadEntryDoorMesh(),this.roomInfoWrapperInstance=this.loadRoomInfo(),this.roomInfoInstance=uf(),this.entryDoorMesh.rotateX(-Math.PI/2),this.roomInfoWrapperInstance&&this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container),this.group.add(this.entryDoorMesh)),this.onFivePanoArrived(this.five.panoIndex||0),this.five.needsRender=!0})}loadCompassMesh(){return J(this,null,function*(){const e=this.state.config.compassImageUrl,n=yield us(e),o=new E.CircleGeometry(.7,32),s=new E.MeshBasicMaterial({map:n,transparent:!0,opacity:0,depthTest:!1}),r=new E.Mesh(o,s);return r.name="pano-compass-mesh",r})}loadEntryDoorMesh(){return J(this,null,function*(){const e=this.state.config.entryDoorImageUrl,n=yield us(e),o=new E.PlaneGeometry(.2,.16),s=new E.MeshBasicMaterial({map:n,transparent:!0,opacity:.8,depthTest:!1}),r=new E.Mesh(o,s);return r.name="pano-compass-entry-door",r})}loadRoomInfo(){const e=[new E.Vector3(-.7,0,-.7),new E.Vector3(.7,0,-.7),new E.Vector3(.7,0,.7),new E.Vector3(-.7,0,.7)];return Kt(this.five).create3DDomContainer(e)}}const hf=(i,t)=>new ff(i,t);function Dn(i,t,e){const n=i[t];i[t]=i[e],i[e]=n}function mf(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;Dn(i,a*4+0,l*4+0),Dn(i,a*4+1,l*4+1),Dn(i,a*4+2,l*4+2),Dn(i,a*4+3,l*4+3)}}}class Pa{constructor(t,e){h(this,"width");h(this,"height");h(this,"visible",!1);h(this,"hooks",new be.Subscribe);h(this,"contentDom",document.createElement("canvas"));h(this,"five");h(this,"scale");h(this,"wrapper");h(this,"config");h(this,"offset",{x:0,y:0});h(this,"canvas",this.contentDom);h(this,"context");h(this,"renderCenter",new E.Vector3);h(this,"lastPanEvent");h(this,"hammer");h(this,"onPan",t=>{var c,u,f,d;if(!this.wrapper)return;const e=(u=(c=this.lastPanEvent)==null?void 0:c.deltaX)!=null?u:0,n=(d=(f=this.lastPanEvent)==null?void 0:f.deltaY)!=null?d:0,o=t.deltaX-e,s=t.deltaY-n;if(this.lastPanEvent=t,this.hooks.emit("wantsPanGesture",{srcEvent:t,deltaX:o,deltaY:s}))return;const a=this.offset.x+o,l=this.offset.y+s;this.contentDom.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${a}px, ${l}px, 100px)`,this.offset={x:a,y:l}});h(this,"onPanEnd",t=>{this.lastPanEvent=void 0,this.contentDom.style.boxShadow="none"});var o,s,r;if(!t.renderer)throw new Error("Five Render \u672A\u521D\u59CB\u5316");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new gn.default(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd))}dispose(){var t;this.clear(),this.remove(),(t=this.hammer)==null||t.destroy()}remove(){this.canvas.remove(),this.visible=!1}clear(){this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}appendTo(t){this.wrapper=t,this.initStyle(),t.append(this.canvas),this.visible=!0}renderWithPoint(t){!this.wrapper||(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}autoFixPCPosition(){if(!this.wrapper)return;const{width:t,height:e}=this,n=this.renderCenter.clone().project(this.five.camera),o=(n.x+1)/2*this.wrapper.clientWidth,s=-(n.x-1)/2*this.wrapper.clientWidth,r=-(n.y-1)/2*this.wrapper.clientHeight;o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=90+"px"):r<183?(this.canvas.style.top=90+"px",this.canvas.style.left=-t/2+"px"):s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${r}px, 10px)`,this.offset={x:o,y:r}}render(){if(!this.five.renderer||!this.wrapper)return;const{scale:t,context:e,width:n,height:o}=this,s=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new E.Vector2),a=1,l=n/t,c=o/t,u=a*t,f=(s.x+1)/2*r.x,d=(s.y+1)/2*r.y,p=this.five.getPixels(f-l/2,d-l/2,l,c,u),m=Math.floor(n*a),g=Math.floor(o*a);mf(p,m,g);const A=new ImageData(m,g);A.data.set(p),e.putImageData(A,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}}class pf{constructor(t){h(this,"edges",[]);h(this,"five");h(this,"onModelLoaded",()=>{!this.five.model||(this.edges=this.five.model.getEdges())});this.five=t,this.five.model.loaded?this.onModelLoaded():this.five.on("modelLoaded",this.onModelLoaded)}dispose(){}getAdsorbentPoint(t){if(this.edges.length===0)return null;let e=1/0,n;return this.edges.forEach(o=>{const s=o.closestPointToPoint(t.point,!0,new F.Vector3),r=s.distanceTo(t.point);r<e&&(n=s,e=r)}),e>.1?null:n||null}}class Oi{constructor(){h(this,"id",He());h(this,"points",[]);h(this,"lines",[])}push(t){const e=this.getNext(t);if(!e)throw new Error("\u5F53\u524D\u7EBF\u6BB5\u4E8E\u4E0A\u4E00\u6761\u7EBF\u6BB5\u65E0\u6CD5\u6784\u6210\u6298\u7EBF");return this.lines.push(e.line),this.points.push(...e.points),this.lines.length}pop(){const t=this.lines.pop();return this.lines.length===0?this.points.slice(0,this.points.length):this.points.pop(),t}getNext(t){const e=this.points.slice(-1)[0];if(!e)return{line:t,points:t.points};if(!t.points.includes(e))return null;const n=t.points.find(o=>o!==e);return n?{line:t,points:[n]}:null}toJson(){return{id:this.id,lines:this.lines.map(t=>t.id),points:this.points.map(t=>t.id)}}toCompletelyJson(){return{id:this.id,points:this.points.map(t=>t.toJson()),lines:this.lines.map(t=>t.toCompletelyJson())}}}const gf=1,Af=3,vf=new F.Color(16777215),bf=new F.Color(6522623),yf=new F.Color(16777215),wf=new F.Color(6522623),Cf=6,Ef=8,Pf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAG/Py2baba05un7UgfgAAAHJJREFUKM9joBpgLHVSCRdA4metAoJlCJHmVWBgAeNzroKCCVCBLpjACqgJVjCBxRBT2FbBQQJYQAohsBAsUIUQWA4WiEIILAULeCEEloAFtBACizAEMLRgGIphLabDMJ2O6TlM72MGECIIMQIZIxqoBQCPvpJ/e9FaAAAAAABJRU5ErkJggg==",Ia=new F.TextureLoader().load(Pf),xa={pointTexture:Ia,pointSize:Cf,lineWidth:gf,lineColor:vf,pointColor:yf,lineRenderOrder:20,pointsRenderOrder:20};fe(N({},xa),{dashed:!0});const If={pointTexture:Ia,pointSize:Ef,lineWidth:Af,lineColor:bf,pointColor:wf,lineRenderOrder:10,pointsRenderOrder:10};function xf(i,t,e){var u,f,d,p,m;const n=(u=e==null?void 0:e.lineWidth)!=null?u:2,o=(f=e==null?void 0:e.lineColor)!=null?f:new F.Color(16777215),s=(d=e==null?void 0:e.pointSize)!=null?d:5,r=(p=e==null?void 0:e.lineRenderOrder)!=null?p:10,a=(m=e==null?void 0:e.lineRenderOrder)!=null?m:20,l=new Or.Line(i,t);l.setMaterial({linewidth:n,color:o}),l.line.material.depthTest=!1,l.line.material.transparent=!0,l.line.renderOrder=r,l.points.renderOrder=a;const c=l.points.material;return c.depthTest=!1,c.size=s,e!=null&&e.pointColor&&c.color.set(e.pointColor).convertSRGBToLinear(),e!=null&&e.pointTexture&&(c.map=e.pointTexture),l}function ds(i,t){const[e,n]=i.points,o=t==="light"?If:xa,s=xf(e.position,n.position,o);return s.name="normalLine_"+i.id,s}function Ke(i){const{x:t,y:e,z:n}=i;return!(Math.abs(t)>1||Math.abs(e)>1||Math.abs(n)>1)}function kf(){const i=document.createElement("div");return i.setAttribute("style","backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);"),i.style.padding="3px 6px",i.style.lineHeight="1",i.style.textAlign="center",i.style.transform="translate(-50%, -50%)",i.style.borderRadius="100px",i.style.fontSize="14px",i.style.color="#fff",i.style.background="rgba(195,195,195,0.70)",i.style.border="0.5px solid rgba(255,255,255,0.6)",i.style.pointerEvents="all",i.style.cursor="pointer",i}function Df(i){const t=document.createElement("div");return t.id="distance_"+i.id,t.classList.add("five-plugin-measure__distance"),t.style.opacity="0",t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.transform="translate3d(0, 0, 0)",t.style.transformOrigin="left top",t}function Lf(i){function t(){var m;(m=i.clickCallback)==null||m.call(i,p)}function e(){if(f)return f.highlight();c.style.border="0.5px solid #95AEFF",c.style.background="linear-gradient(90deg, #95AEFF 0%, #6386FF 100%)"}function n(){if(f)return f.unHighlight();c.style.border="0.5px solid rgba(255,255,255,0.6)",c.style.background="rgba(195,195,195,0.70)"}function o(m){const g=m.getElement();if(!g)return;const A=g.clientWidth,v=g.clientHeight;if(a.points.length<2)return;const[C,w]=a.points,x=C.position.clone().project(m.camera),D=w.position.clone().project(m.camera),y=x.clone().lerp(D,.5),L=new F.Vector2(x.x*A,x.y*v),P=new F.Vector2(D.x*A,D.y*v);if((()=>!(Math.abs(x.z)>1||Math.abs(D.z)>1||!Ke(x)&&!Ke(D)||!Ke(y)||L.distanceTo(P)<20))()===!1){u.style.opacity="0",u.style.pointerEvents="none";return}const B=(y.x+1)/2*A,G=-(y.y-1)/2*v,I=-(Math.atan((L.y-P.y)/(L.x-P.x))*180)/Math.PI;u.style.transform=`translate(${B}px, ${G}px) rotate(${I}deg)`,u.style.opacity="1",u.style.pointerEvents="all",f&&f.update({line:a.toCompletelyJson(),polyline:a.getPolyline().toCompletelyJson()});const S=C.position.clone().distanceTo(w.position),R=i.line.model.params.getDistanceText(S);c.innerText!==R&&(c.innerText=R)}function s(m){m.appendChild(u),u.addEventListener("click",t)}function r(){c.removeEventListener("click",t),u.remove()}const{line:a}=i,l=a.id,c=kf(),u=Df(a),f=i.userDistanceItem,d=new F.Vector3(0,0,0),p={lineID:l,ndcPosition:d,update:o,appendTo:s,remove:r,highlight:e,unHighlight:n};return f!=null&&f.element?u.appendChild(f.element):u.appendChild(c),p}class en{constructor(t,e,n){h(this,"id");h(this,"selected",!1);h(this,"type","line");h(this,"model");h(this,"mesh");h(this,"points");h(this,"lightMesh");h(this,"hook");h(this,"distanceItem");h(this,"polyline");if(this.id=He(),this.model=n,t.id===e.id)throw new Error("\u65E0\u6548\u7684\u7EBF\u6BB5, \u4E00\u4E2A\u70B9\u65E0\u6CD5\u6784\u6210\u7EBF\u6BB5");this.hook=new be.Subscribe,this.points=[t,e],this.mesh=ds(this,"normal"),this.lightMesh=ds(this,"light"),this.distanceItem=Lf({line:this,clickCallback:()=>this.hook.emit("selected",this),userDistanceItem:this.model.params.userDistanceItemCreator?this.model.params.userDistanceItemCreator():void 0}),t.lines.push(this),e.lines.push(this)}clear(){this.selected=!1,this.polyline=void 0}getPolyline(){if(this.polyline)return this.polyline;const t=this.model.polylines.find(n=>n.lines.includes(this));if(this.polyline=t,t)return t;const e=new Oi;return e.push(this),e}findAnotherPoint(t){return this.points.find(({id:e})=>e!==t.id)}toJson(){return{id:this.id,points:this.points.map(({id:t})=>t)}}toCompletelyJson(){return{id:this.id,points:this.points.map(t=>t.toJson())}}clone(){return new en(this.points[0].clone(),this.points[1].clone(),this.model)}}function rn(i,t){for(let e=0,n=t.length;e<n;e++)if(i===t[e])return t.splice(e,1)[0]}class $e{constructor(t){h(this,"id");h(this,"lines");h(this,"position");h(this,"type","point");this.id=He(),this.lines=[],this.position=new F.Vector3,t instanceof F.Vector3?this.position.copy(t):this.position.fromArray(t)}toJson(){return{id:this.id,lines:this.lines.map(({id:t})=>t),position:this.position.toArray()}}addLine(t){this.lines.push(t)}removeLine(t){rn(t,this.lines)}clone(){return new $e(this.position)}}class ro{constructor(t){h(this,"lines",[]);h(this,"points",[]);h(this,"params");h(this,"polylines",[]);h(this,"hook",new be.Subscribe);this.params=t}addLine(t){const[e,n]=t.points;if(!e||!n)return this;this.includes(e)||this.points.push(e),this.includes(n)||this.points.push(n),this.lines.push(t);const o=this.polylines.find(s=>!!s.getNext(t));if(o)o.push(t);else{const s=new Oi;s.push(t),this.polylines.push(s)}this.hook.emit("lineAdded",t)}removeLineByID(t){const e=this.getLineByID(t);e&&this.removeLine(e)}removeLine(t){const e=this.polylines.find(s=>s.lines.includes(t));if(e){if(e.lines.slice(-1)[0]!==t)throw new Error("\u4E0D\u80FD\u4ECE\u4E2D\u95F4\u5220\u9664\u7EBF\u6BB5");e.pop(),e.lines.length===0&&rn(e,this.polylines)}const[n,o]=t.points;return n.lines.length===0&&rn(n,this.points),o.lines.length===0&&rn(o,this.points),rn(t,this.lines),t.clear(),this.hook.emit("lineRemoved",t),this}mergeModel(t){t.lines.forEach(e=>this.addLine(e))}includes(t){if(t.type==="point")return this.points.find(({id:e})=>e===t.id)!==void 0;if(t.type==="line")return this.lines.find(({id:e})=>e===t.id)!==void 0}getPointByID(t){return this.points.find(({id:e})=>e===t)}getLineByID(t){return this.lines.find(({id:e})=>e===t)}getClosestPoint(){}parse(t){const e=t.points.map(({id:s,position:r})=>{const a=new $e(r);return a.id=s,a}),n=t.lines.map(s=>{const[r,a]=s.points,l=this.getPointByID.call({points:e},r),c=this.getPointByID.call({points:e},a);if(!l||!c)throw new Error("\u7EBF\u4E0A\u7684\u70B9\u4E0D\u5B58\u5728");const u=new en(l,c,this);return u.id=s.id,u}),o=t.polylines.map(s=>{const r=new Oi;return s.lines.forEach(a=>{const l=n.find(({id:c})=>c===a);l&&r.push(l)}),r});return this.points.splice(0,this.points.length,...e),this.lines.splice(0,this.lines.length,...n),this.polylines.splice(0,this.polylines.length,...o),this}toJson(){return{points:this.points.map(t=>t.toJson()),lines:this.lines.map(t=>t.toJson()),polylines:this.polylines.map(t=>t.toJson()).filter(t=>t.lines.length>0)}}}const Ln=i=>i.preventDefault();class ui{constructor(t){h(this,"model");h(this,"five");h(this,"group");h(this,"config");h(this,"dashed");h(this,"disposed",!1);h(this,"isMobile");h(this,"mouseGroup");h(this,"container");h(this,"fiveHelper");h(this,"hook");h(this,"magnifier");h(this,"userDistanceItemCreator");h(this,"updateDistanceUI",()=>{this.dashed.distanceItem.update(this.five),this.model.lines.forEach(t=>t.distanceItem.update(this.five))});var n,o;this.five=t.five,this.hook=t.hook,this.model=t.model,this.config=t.config,this.magnifier=t.magnifier,this.container=t.container,this.fiveHelper=t.fiveHelper,this.isMobile=(o=(n=t.openParams)==null?void 0:n.isMobile)!=null?o:!1,this.userDistanceItemCreator=t.userDistanceItemCreator,this.group=t.group,this.mouseGroup=t.mouseGroup,this.dashed=new en(new $e([0,0,0]),new $e([0,0,0]),this.model),this.dashed.mesh.setMaterial({dashed:!0,dashScale:100}),this.dashed.mesh.name="dashLine";const e=this.five.getElement();e&&(e.addEventListener("touchstart",Ln),e.addEventListener("contextmenu",Ln))}removeLine(t){this.group.remove(t.mesh,t.lightMesh),t.distanceItem.remove(),this.five.needsRender=!0}updateMouseGroup(t,e){if(!t)return this.mouseGroup;const n=this.fiveHelper.getAdsorbentPoint(t),o=n||t.point;if(this.mouseGroup.position.copy(o),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const r=t.face.normal.clone().multiplyScalar(.05),l=t.point.clone().add(r).clone().add(r);this.mouseGroup.lookAt(l)}return this.mouseGroup}dispose(){this.disposed=!0,this.magnifier.remove(),this.model.lines.forEach(e=>this.removeLine(e));const t=this.five.getElement();t&&(t.removeEventListener("touchstart",Ln),t.removeEventListener("contextmenu",Ln))}}function Hi(i){const{x:t,y:e}=i.center,{clientWidth:n,clientHeight:o}=i.target,s=i.target.getBoundingClientRect(),r=new F.Vector2(t,e).sub(new F.Vector2(s.left,s.top)),a=new F.Vector2(r.x/n*2-1,-(r.y/o)*2+1);return{point:r,ndcPoint:a}}function wi(i,t){const e=Hi(t).ndcPoint,n=new F.Raycaster;return n.setFromCamera(e,i.camera),i.model.intersectRaycaster(n)}class Sn extends ui{constructor(e){var o;super(e);h(this,"type","edit");h(this,"pressPoint");h(this,"hasAppendDashed",!1);h(this,"hasAppendMouseGroup",!1);h(this,"fiveElement");h(this,"lastPoint",null);h(this,"hammer");h(this,"onIntersectionUpdate",oo((e,n)=>{var s;this.hasAppendMouseGroup===!1&&(this.group.add(this.mouseGroup),this.magnifier.appendTo(this.container),this.hasAppendMouseGroup=!0);const o=this.updateMouseGroup(e,n).position;(s=this.pressPoint)==null||s.position.copy(o),this.updateDashed(),requestAnimationFrame(()=>this.magnifier.renderWithPoint(this.mouseGroup.position)),this.five.needsRender=!0},20));h(this,"revoke",()=>{if(this.model.lines.length===0&&this.lastPoint){this.lastPoint=null,this.hasAppendDashed=!1,this.dashed.distanceItem.remove(),this.group.remove(this.dashed.mesh),this.hook.emit("anchorChange",null),this.five.needsRender=!0;return}if(this.model.lines.length===0&&!this.lastPoint||!this.lastPoint)return;const e=this.model.lines[this.model.lines.length-1],n=e.findAnotherPoint(this.lastPoint);!n||(this.lastPoint=n,this.hook.emit("anchorChange",n.position),this.group.remove(e.mesh),this.model.removeLine(e),this.hasAppendMouseGroup=!1,this.mouseGroup.position.copy(this.lastPoint.position),this.group.remove(this.mouseGroup),e.distanceItem.remove(),this.updateDashed(),this.magnifier.remove(),this.five.needsRender=!0)});h(this,"onMouseLeave",()=>{this.magnifier.remove(),this.group.remove(this.mouseGroup),this.hasAppendMouseGroup=!1,this.lastPoint&&(this.mouseGroup.position.copy(this.lastPoint.position),this.updateDashed())});h(this,"onLineChanged",()=>{this.hook.emit("editedLineChange",this.model.lines.map(e=>e.toCompletelyJson()))});h(this,"onPress",e=>{const[n]=wi(this.five,e);if(!n||!n.face)return;const o=new $e(n.point);this.pressPoint=o,this.onIntersectionUpdate(n)});h(this,"onPan",e=>{if(!this.pressPoint)return;const[n]=wi(this.five,e);!n||!n.face||this.onIntersectionUpdate(n)});h(this,"onPanEnd",e=>{!this.pressPoint||this.onTap(e)});h(this,"onTap",e=>{this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh)),this.hasAppendDashed=!0;const[n]=wi(this.five,e);this.updateMouseGroup(n);const o=new $e(this.mouseGroup.position),s=this.lastPoint;if(o&&(this.lastPoint=o),o&&s){const r=new en(s,o,this.model);r.distanceItem.appendTo(this.container),this.model.addLine(r),this.group.add(r.mesh),r.distanceItem.update(this.five)}this.pressPoint=void 0,this.hasAppendMouseGroup=!1,this.magnifier.remove(),this.group.remove(this.mouseGroup),this.updateDashed(),this.five.needsRender=!0,this.hook.emit("anchorChange",o.position)});h(this,"onWantsTapGesture",()=>!1);h(this,"onWantsToMoveToPano",()=>!1);h(this,"onWantsPanGesture",()=>this.pressPoint?!1:void 0);h(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});h(this,"updateDashed",()=>{!this.lastPoint||(this.dashed.points[0].position.copy(this.lastPoint.position),this.dashed.points[1].position.copy(this.mouseGroup.position),this.dashed.mesh.setPoints(this.lastPoint.position,this.mouseGroup.position),this.dashed.distanceItem.update(this.five))});this.model=new ro(this.config),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsPanGesture",this.onWantsPanGesture),this.five.on("wantsTapGesture",this.onWantsTapGesture),this.five.on("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.on("intersectionOnModelUpdate",this.onIntersectionUpdate),this.model.hook.on("lineAdded",this.onLineChanged),this.model.hook.on("lineRemoved",this.onLineChanged);const n=this.five.getElement();if(n){this.fiveElement=n;const s=new gn.default(n);this.hammer=s,s.on("tap",this.onTap),s.on("pan",this.onPan),s.on("press",this.onPress),s.on("panend",this.onPanEnd)}(o=this.fiveElement)==null||o.addEventListener("mouseleave",this.onMouseLeave),this.hook.emit("anchorChange",null),this.five.refresh()}dispose(){var e,n;super.dispose(),this.group.remove(this.mouseGroup,this.dashed.mesh),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsPanGesture",this.onWantsPanGesture),this.five.off("wantsTapGesture",this.onWantsTapGesture),this.five.off("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.off("intersectionOnModelUpdate",this.onIntersectionUpdate),this.model.hook.off("lineAdded",this.onLineChanged),this.model.hook.off("lineRemoved",this.onLineChanged),(e=this.hammer)==null||e.destroy(),(n=this.fiveElement)==null||n.removeEventListener("mouseleave",this.onMouseLeave),this.magnifier.dispose(),this.dashed.distanceItem.remove(),this.five.needsRender=!0}getEditingLines(){return this.model.lines}}function ao(i,t){const e=i.x-t[0].x,n=i.y-t[0].y,o=t[1].x-t[0].x,s=t[1].y-t[0].y,r=e*o+n*s,a=o*o+s*s,l=r/a;let c,u;return l<0||Sf(t[0],t[1])?(c=t[0].x,u=t[0].y):l>1?(c=t[1].x,u=t[1].y):(c=t[0].x+l*o,u=t[0].y+l*s),new F.Vector2(c,u)}function Sf(i,t){return i.x===t.x&&i.y===t.y}function $n(i){const t=(s,r,a)=>{const l=s.lines.find(u=>u.points.findIndex(({id:d})=>d===s.id)!==r);if(!l)return a;const c=l.points[r];return c?t(c,r,a.concat(l)):a},e=t(i.points[0],1,[]),n=t(i.points[0],0,[]);return e.concat(n)}class zf extends ui{constructor(e){super(e);h(this,"type","view");h(this,"highlightedLines",[]);h(this,"hammer");h(this,"wantsTapGesture",e=>{if(this.model.lines.length===0)return;const[n]=this.five.model.intersectRaycaster(e);if(!n)return;const o=this.five.camera,s=n.point.clone().project(o),r=this.container.clientWidth,a=this.container.clientHeight,l=new F.Vector2(s.x*r,s.y*a),c=this.model.lines.map(p=>{const[m,g]=p.points,A=m.position.clone().project(o),v=g.position.clone().project(o);if(!Ke(A)&&!Ke(v))return null;const C=new F.Vector2(A.x*r,A.y*a),w=new F.Vector2(v.x*r,v.y*a);return{id:p.id,points:[C,w]}}).filter(p=>!!p);if(c.length===0)return;const f=c.map(p=>{const m=ao(l,p.points);return{id:p.id,distance:m.distanceTo(l)}}).sort((p,m)=>p.distance-m.distance)[0],d=f.distance>20?void 0:this.model.lines.find(({id:p})=>p===f.id);if(this.highlightedLines.length>0&&!d)return this.clearHighlightLines(),!1;if(d)return this.chooseLine(d),!1});h(this,"chooseLine",e=>{const n=$n(e);this.highlightLines(n),this.five.needsRender=!0,this.hook.emit("selectedChange",n.map(o=>o.toCompletelyJson()))});h(this,"lineRemoved",e=>{this.removeLine(e),this.hook.emit("selectedChange",this.model.lines.filter(n=>n.selected).map(n=>n.toCompletelyJson()))});h(this,"onCameraUpdate",()=>{this.updateDistanceUI()});this.model.lines.forEach(o=>{o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),o.hook.on("selected",this.chooseLine),this.group.add(o.mesh)});const n=this.five.getElement();if(n){const o=new gn.default(n);this.hammer=o}this.model.hook.on("lineRemoved",this.lineRemoved),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsTapGesture",this.wantsTapGesture),this.five.needsRender=!0}dispose(){var e;super.dispose(),this.model.hook.off("lineRemoved",this.lineRemoved),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsTapGesture",this.wantsTapGesture),this.five.needsRender=!0,this.hook.emit("selectedChange",[]),(e=this.hammer)==null||e.destroy()}highlightLine(e){e.selected||(e.selected=!0,this.group.add(e.lightMesh),e.distanceItem.highlight(),this.five.needsRender=!0)}clearHighlightLines(){this.group.children.length!==0&&(this.model.lines.forEach(e=>{e.selected=!1,e.distanceItem.unHighlight(),this.group.remove(e.lightMesh)}),this.highlightedLines=[],this.five.needsRender=!0)}highlightLines(e){this.clearHighlightLines(),this.highlightedLines=e,e.forEach(n=>this.highlightLine(n))}}const Mf=`
|
|
209
209
|
<svg class="fpm__delete-icon" width="16px" height="17px" viewBox="0 0 16 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
210
210
|
<defs>
|
|
211
211
|
<linearGradient x1="22.185491%" y1="100%" x2="66.8316686%" y2="6.67239121%" id="linearGradient-1">
|
|
@@ -494,7 +494,7 @@ void main() {
|
|
|
494
494
|
<div class='range-piece__content'></div>
|
|
495
495
|
<div class="range-piece__aim"></div>
|
|
496
496
|
</div>
|
|
497
|
-
`;function oh(){}const{Vector2:sh}=E;function rh(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new sh,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}class ah{constructor(t){h(this,"container",document.createElement("div"));h(this,"five");h(this,"group");h(this,"mouseGroup");h(this,"hasAppendMouseGroup",!1);h(this,"fiveHelper");h(this,"hook");h(this,"content");h(this,"intersectMesh");h(this,"centerMouseXY");h(this,"raycaster",new F.Raycaster);h(this,"pieceStyl",{matrix3d:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],scale:1,opacity:.4});h(this,"onCameraDirectionUpdate",()=>{const t=this.getIntersection();if(t){this.pieceChange(t),this.updateMouseGroup(t);const e=new $e(this.mouseGroup.position);this.hook.emit("nowPointChange",e)}});h(this,"onWillChangeState",(t,e)=>{var o;this.dotAnimation();const n=(o=this.getIntersection())==null?void 0:o.point;!n||(e==="editing"?this.hook.emit("getStartPoint",new $e(n)):this.hook.emit("getEndPoint",new $e(n)))});h(this,"computedCenterMouseXY",()=>{const t=this.container.querySelector(".range-piece__aim");if(!t)return null;const{left:e,top:n,width:o,height:s}=t.getBoundingClientRect(),r=Math.round(e+o/2),a=Math.round(n+s/2),c=rh({x:r,y:a},this.five.getElement());this.centerMouseXY=c});h(this,"getIntersection",()=>{if(!this.centerMouseXY)return null;this.raycaster.setFromCamera(this.centerMouseXY,this.five.camera);const t=this.five.model.intersectRaycaster(this.raycaster)[0];return t||null});this.five=t.five,this.hook=t.hook,this.group=t.group,this.mouseGroup=Da(N({isMobile:!0},t.openParams.crossHairParameter)),this.fiveHelper=t.fiveHelper,this.container.innerHTML=ih,this.container.classList.add("range-piece-controller"),this.content=this.container.querySelector(".range-piece__content"),this.content&&(this.content.style.transform=`matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`,this.content.style.opacity=`${this.pieceStyl.opacity}`),t.container.append(this.container),this.intersectMesh=new F.Mesh(new F.RingGeometry(.04,.08,32),new F.MeshBasicMaterial({color:1245179,opacity:0,side:F.DoubleSide,transparent:!0})),this.container.addEventListener("animationend",this.computedCenterMouseXY),this.five.on("cameraUpdate",this.onCameraDirectionUpdate),this.hook.on("willChangeState",this.onWillChangeState)}dispose(){this.container.removeEventListener("animationend",this.computedCenterMouseXY),this.five.off("cameraUpdate",this.onCameraDirectionUpdate),this.hook.off("willChangeState",this.onWillChangeState),this.container.remove(),this.group.remove(this.mouseGroup),this.mouseGroup.remove(),this.hasAppendMouseGroup=!1,this.five.scene.remove(this.intersectMesh)}pieceChange(t){const e=t.face,n=t.point;if(e&&n){const s=e.normal.clone().clone().multiplyScalar(.05),r=n.clone().add(s);this.intersectMesh.position.copy(r);const a=r.clone().add(s);this.intersectMesh.lookAt(a),this.five.scene.add(this.intersectMesh);const l=this.intersectMesh.modelViewMatrix.clone().toArray();this.changePieceStyl("matrix3d",l);const c=this.calculateSize(n);this.changePieceStyl("scale",c)}}calculateSize(t){if(!t)return;const e=this.five.camera.position;let n=t.distanceTo(e);const o=4,s=1;return n>o&&(n=o),n<s&&(n=s),-.51/(o-s)*n+1}dotAnimation(){const t=dn.default.Easing.Quadratic.InOut,e={opacity:.4,scale:this.pieceStyl.scale},n={opacity:[1,.4],scale:[this.pieceStyl.scale*.8,this.pieceStyl.scale]};let o=oh;const s=new dn.default.Tween(e).to(n,500).easing(t).start(0).onUpdate(({opacity:r,scale:a})=>{this.changePieceStyl("scale",a),this.changePieceStyl("opacity",r)}).onComplete(()=>{o()});o=ci(r=>{s.update(r)})}changePieceStyl(t,e){!this.content||(this.pieceStyl[t]=e,this.content.style.transform=`matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`,this.content.style.opacity=`${this.pieceStyl.opacity}`)}updateMouseGroup(t,e){if(!this.hasAppendMouseGroup){this.group.add(this.mouseGroup),this.hasAppendMouseGroup=!0;const n=this.container.querySelector(".range-piece__aim");n&&(n.style.opacity="0")}if(!t)return this.mouseGroup;if(this.mouseGroup.position.copy(t.point),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const o=t.face.normal.clone().multiplyScalar(.05),r=t.point.clone().add(o).clone().add(o);this.mouseGroup.lookAt(r)}return this.mouseGroup}}class lh{constructor(t,e){h(this,"hasOpen",!1);h(this,"hook",new be.Subscribe);h(this,"magnifier");h(this,"five");h(this,"model");h(this,"group");h(this,"config");h(this,"fiveHelper");h(this,"useUIController");h(this,"params");h(this,"useGuideController");h(this,"rangePieceController");h(this,"container",document.createElement("div"));h(this,"shortcutKeyController");h(this,"controller",null);h(this,"controllerParams");h(this,"getCurrentMode",()=>this.controller instanceof Sn?"Edit":this.controller instanceof Ci?"Watch":this.controller instanceof hs?"Mixed":null);h(this,"changeMode",t=>{var n;if(!this.hasOpen||this.getCurrentMode()===t)return;if(this.getCurrentMode()==="Mixed"||t==="Mixed")return new Error("\u4E0D\u652F\u6301\u5207\u6362\u7684Mode");(n=this.controller)==null||n.dispose();const e={View:zf,Watch:Ci,Edit:Sn};if(!e[t])throw new Error("\u4E0D\u5B58\u5728\u7684 Mode");this.controller=new e[t](this.controllerParams),this.hook.emit("modeChange",t)});var s,r;this.five=t,this.params=e;const n={userDistanceItemCreator:void 0,getDistanceText(a){return a.toFixed(2)+"m"}};this.config=N(N({},n),ri(e,["openParams","magnifierParams"])),this.model=new ro(this.config),this.fiveHelper=new pf(t),this.magnifier=new Pa(t,(s=e.magnifierParams)!=null?s:{width:190,height:190,scale:2}),this.group=new F.Group,this.group.name="plugin-measure-group",this.container.classList.add("five-plugin-measure-container"),this.container.style.position="absolute",this.container.style.left="0",this.container.style.top="0",this.container.style.pointerEvents="none",this.container.style.width="100%",this.container.style.height="100%",this.container.style.opacity="0",this.container.style.background="rgba(0, 0, 0, 0.15)";const o=(r=this.params.openParams)!=null?r:{};this.controllerParams={five:this.five,hook:this.hook,group:this.group,model:this.model,config:this.config,magnifier:this.magnifier,container:this.container,fiveHelper:this.fiveHelper,openParams:o,mouseGroup:Da(N({},o.crossHairParameter)),userDistanceItemCreator:this.params.userDistanceItemCreator},this.params.useUIController!==!1&&(this.useUIController=new ms(this,this.controllerParams)),this.params.useGuideController!==!1&&(this.useGuideController=new eh(this,this.controllerParams))}appendTo(t){t.append(this.container)}dispose(){var t,e;this.disable(),(t=this.useUIController)==null||t.dispose(),(e=this.magnifier)==null||e.dispose(),this.five.needsRender=!0}load(t){this.model.parse(t),this.save()}enable(){var t,e,n;this.hasOpen||(this.hasOpen=!0,this.five.scene.add(this.group),this.container.style.opacity="1",(t=this.params.openParams)!=null&&t.isMobile?(this.controller=new hs(this.controllerParams),this.rangePieceController=new ah(this.controllerParams)):(this.five.helperVisible=!1,this.controller=new Ci(this.controllerParams)),(e=this.useUIController)==null||e.show(),(n=this.useGuideController)==null||n.show(),this.shortcutKeyController=new th(this,this.five),this.hook.emit("enable",!0))}disable(){var t,e,n,o,s;this.hasOpen=!1,this.container.style.opacity="0",(t=this.controller)==null||t.dispose(),(e=this.rangePieceController)==null||e.dispose(),(n=this.useUIController)==null||n.hide(),(o=this.useGuideController)==null||o.hide(),(s=this.shortcutKeyController)==null||s.dispose(),this.controller=null,this.five.helperVisible=!0,this.five.scene.remove(this.group),this.five.needsRender=!0,this.hook.emit("disable",!0)}revoke(){this.controller instanceof Sn&&this.controller.revoke()}removeLineByID(t){this.model.removeLineByID(t)}highlightLine(t){if(this.getCurrentMode()!=="Watch")return!1;const e=this.model.getLineByID(t);return e?(this.controller.highlightLine(e),!0):!1}clearHighlightLines(){return this.getCurrentMode()!=="Watch"?!1:(this.controller.clearHighlightLines(),!0)}save(){return this.controller instanceof Sn?(this.model.mergeModel(this.controller.model),this):this}toJson(){return this.model.toJson()}changeIsMobile(t){var e,n;((e=this.controllerParams.openParams)==null?void 0:e.isMobile)===void 0&&(this.controllerParams.openParams.isMobile=t),this.controllerParams.openParams.isMobile!==t&&(this.controllerParams.openParams.isMobile=t,this.params.useUIController!==!1&&((n=this.useUIController)==null||n.dispose()),this.useUIController=new ms(this,this.controllerParams))}changeConfigs(t){var e;if(t.getDistanceText&&t.getDistanceText!==this.config.getDistanceText){const n=t.getDistanceText;this.config.getDistanceText=n,(e=this.controller)==null||e.updateDistanceUI()}}}const ch=function(t,e){return new lh(t,e)},Ba=$i(null);function uh(i){ae(i,"svelte-19zi46m",".PanoSpatialTagPlugin__tag-origin.svelte-19zi46m{position:absolute;width:0.5rem;height:0.5rem;border-radius:50%;background:#fff;box-shadow:0 0 .6rem #fff;transform:translate(-50%, -50%) scale(1);transform-origin:center center;animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin 1.2s forwards;pointer-events:auto}.PanoSpatialTagPlugin__tag-origin.svelte-19zi46m:after{content:'';position:absolute;top:50%;height:50%;width:2rem;height:2rem;transform:translate(-50%, -50%)}.PanoSpatialTagPlugin__tag-origin-destroy.svelte-19zi46m{transform:translate(-50%, -50%) scale(0.6);animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}")}function ps(i,t,e){const n=i.slice();return n[3]=t[e],n}function gs(i){let t,e=`${i[3].top}%`,n=`${i[3].left}%`,o,s;function r(){return i[2](i[3])}return{c(){t=Q("i"),b(t,"class","svelte-19zi46m"),_(t,"PanoSpatialTagPlugin__tag-origin",!0),_(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),H(t,"top",e),H(t,"left",n),H(t,"visibility",i[3].front?"visible":"hidden")},m(a,l){T(a,t,l),o||(s=Pe(t,"click",r),o=!0)},p(a,l){i=a,l&1&&_(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),l&1&&e!==(e=`${i[3].top}%`)&&H(t,"top",e),l&1&&n!==(n=`${i[3].left}%`)&&H(t,"left",n),l&1&&H(t,"visibility",i[3].front?"visible":"hidden")},d(a){a&&z(t),o=!1,s()}}}function dh(i){let t,e=i[0],n=[];for(let o=0;o<e.length;o+=1)n[o]=gs(ps(i,e,o));return{c(){for(let o=0;o<n.length;o+=1)n[o].c();t=he()},m(o,s){for(let r=0;r<n.length;r+=1)n[r].m(o,s);T(o,t,s)},p(o,[s]){if(s&3){e=o[0];let r;for(r=0;r<e.length;r+=1){const a=ps(o,e,r);n[r]?n[r].p(a,s):(n[r]=gs(a),n[r].c(),n[r].m(t.parentNode,t))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},i:ee,o:ee,d(o){tt(n,o),o&&z(t)}}}function fh(i,t,e){let{origins:n}=t;const o=r=>{Ba.update(()=>`${r}-PanoSpatialTagPlugin-${Date.now()}`)},s=r=>o(r.id);return i.$$set=r=>{"origins"in r&&e(0,n=r.origins)},[n,o,s]}class hh extends oe{constructor(t){super(),ie(this,t,fh,dh,te,{origins:0},uh)}}function mh(i){ae(i,"svelte-1i5h9zh",".PanoSpatialTagPlugin__tag-x.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#FFF;transform:translate(0, -100%);transition:height .5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh.svelte-1i5h9zh{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity .8s .6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, .1));box-shadow:0 .1rem .5rem rgba(0, 0, 0, .2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .4s cubic-bezier(.44,.44,.74,.98) , opacity .4s cubic-bezier(.44,.44,.74,.98), width .5s linear, height .5s linear ;transform-origin:center bottom}.PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0.3rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0.5rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh{animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh{animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh.svelte-1i5h9zh{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line.svelte-1i5h9zh{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-1i5h9zh.svelte-1i5h9zh{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform .5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-animate.svelte-1i5h9zh{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;display:inline-block;transform:translate(-100%, 0);transition:transform .9s cubic-bezier(0,.65,.16,1.08) .6s;padding-left:.5rem;font-size:1rem}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{opacity:.32}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .5s .55s, opacity .4s .55s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{opacity:0;transition:opacity .8s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{transform:translate(-100%, 0);transition:transform .6s cubic-bezier(.53,.06,.88,.59)}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content .svelte-1i5h9zh{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh{opacity:0.5;transform:translate(-50%, 0) scaleY(0);animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}")}function ph(i){let t,e,n,o,s,r,a,l,c,u,f,d,p,m,g;return{c(){t=Q("div"),e=Q("div"),n=Z(),o=Q("div"),s=Q("i"),r=Z(),a=Q("i"),l=Z(),c=Q("i"),u=Z(),f=Q("div"),d=Q("div"),b(e,"class","PanoSpatialTagPlugin__tag-shadow svelte-1i5h9zh"),H(e,"transform","translate("+i[7]/2*i[3]*3+"px, "+i[8]/2*(i[1]?-1:1)*i[3]*3+"px) scale("+1/i[3]+")"),b(s,"class","PanoSpatialTagPlugin__tag-flagpole svelte-1i5h9zh"),H(s,"width",i[4]+"rem"),b(a,"class","PanoSpatialTagPlugin__tag-line1 svelte-1i5h9zh"),b(c,"class","PanoSpatialTagPlugin__tag-line2 svelte-1i5h9zh"),b(o,"class","PanoSpatialTagPlugin__tag-line svelte-1i5h9zh"),b(d,"class","PanoSpatialTagPlugin__tag-content svelte-1i5h9zh"),b(f,"class","PanoSpatialTagPlugin__tag-animate svelte-1i5h9zh"),H(f,"transform","scale("+i[3]*3+")"),b(t,"id",p="PanoSpatialTagPlugin__"+i[0]),H(t,"height",20*i[5]+"rem"),b(t,"class","svelte-1i5h9zh"),_(t,"PanoSpatialTagPlugin__tag-x",!0),_(t,"PanoSpatialTagPlugin__tag-upside-down",i[1]),_(t,"PanoSpatialTagPlugin__tag-show",i[10]),_(t,"PanoSpatialTagPlugin__tag-hide",i[10]===!1||i[6])},m(A,v){T(A,t,v),O(t,e),O(t,n),O(t,o),O(o,s),O(o,r),O(o,a),O(o,l),O(o,c),O(t,u),O(t,f),O(f,d),d.innerHTML=i[2],i[16](d),m||(g=Pe(d,"click",i[11]),m=!0)},p(A,[v]){v&394&&H(e,"transform","translate("+A[7]/2*A[3]*3+"px, "+A[8]/2*(A[1]?-1:1)*A[3]*3+"px) scale("+1/A[3]+")"),v&16&&H(s,"width",A[4]+"rem"),v&4&&(d.innerHTML=A[2]),v&8&&H(f,"transform","scale("+A[3]*3+")"),v&1&&p!==(p="PanoSpatialTagPlugin__"+A[0])&&b(t,"id",p),v&32&&H(t,"height",20*A[5]+"rem"),v&2&&_(t,"PanoSpatialTagPlugin__tag-upside-down",A[1]),v&1024&&_(t,"PanoSpatialTagPlugin__tag-show",A[10]),v&1088&&_(t,"PanoSpatialTagPlugin__tag-hide",A[10]===!1||A[6])},i:ee,o:ee,d(A){A&&z(t),i[16](null),m=!1,g()}}}function gh(i,t,e){let{id:n}=t,{upsideDown:o}=t,{content:s}=t,{contentZoom:r}=t,{lineWidthZoom:a}=t,{lineHeightZoom:l}=t,{destroying:c=!1}=t,{folded:u}=t,{dispose:f}=t,{events:d}=t,{hooks:p}=t,m=0,g=0,A,v,C=setTimeout(()=>{u||e(10,v=!0),C=void 0},100);const w=y=>{const L=Object.keys(d);let P=y.target;for(;P;){const j=P.getAttribute("class");if(!j){P=P.parentNode;continue}if(j.includes("PanoSpatialTagPlugin__tag-content")){P=null;break}L.forEach(B=>{j.includes(B)&&d[B](n)}),P=P.parentNode}};Ye(()=>{p.emit("initTag",{id:n})});const x=Ba.subscribe(y=>{if(y===null)return;const[L,P]=y.split("-PanoSpatialTagPlugin-");n===L&&(p.emit("clickOrigin",{id:n,show:v}),C||(e(10,v=u),e(12,u=!u),C=setTimeout(()=>{C=void 0},1500)))});qi(()=>{e(7,m=A.offsetWidth),e(8,g=A.offsetHeight),!C&&e(10,v=!u)}),bt(()=>{p.emit("destroyTag",{id:n}),x(),f()});function D(y){Me[y?"unshift":"push"](()=>{A=y,e(9,A)})}return i.$$set=y=>{"id"in y&&e(0,n=y.id),"upsideDown"in y&&e(1,o=y.upsideDown),"content"in y&&e(2,s=y.content),"contentZoom"in y&&e(3,r=y.contentZoom),"lineWidthZoom"in y&&e(4,a=y.lineWidthZoom),"lineHeightZoom"in y&&e(5,l=y.lineHeightZoom),"destroying"in y&&e(6,c=y.destroying),"folded"in y&&e(12,u=y.folded),"dispose"in y&&e(13,f=y.dispose),"events"in y&&e(14,d=y.events),"hooks"in y&&e(15,p=y.hooks)},[n,o,s,r,a,l,c,m,g,A,v,w,u,f,d,p,D]}class Ah extends oe{constructor(t){super(),ie(this,t,gh,ph,te,{id:0,upsideDown:1,content:2,contentZoom:3,lineWidthZoom:4,lineHeightZoom:5,destroying:6,folded:12,dispose:13,events:14,hooks:15},mh)}}const vh={position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",pointerEvents:"none"},As="<",vs=">",bs="%",ys="locals",bh="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",yh={"&":"&","<":"<",">":">",'"':""","'":"'"},Qe={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};function ws(i){return i.replace(/;(\s*$)/,"$1")}function wh(i,t){return new Ch(i).compileFunction()(t)}class Ch{constructor(t){h(this,"templateText");h(this,"mode",null);h(this,"truncate",!1);h(this,"currentLine",1);h(this,"source","");h(this,"regex",new RegExp(bh));this.templateText=t}compileFunction(){let t;const e=` var __output = "";
|
|
497
|
+
`;function oh(){}const{Vector2:sh}=E;function rh(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new sh,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}class ah{constructor(t){h(this,"container",document.createElement("div"));h(this,"five");h(this,"group");h(this,"mouseGroup");h(this,"hasAppendMouseGroup",!1);h(this,"fiveHelper");h(this,"hook");h(this,"content");h(this,"intersectMesh");h(this,"centerMouseXY");h(this,"raycaster",new F.Raycaster);h(this,"pieceStyl",{matrix3d:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],scale:1,opacity:.4});h(this,"onCameraDirectionUpdate",()=>{const t=this.getIntersection();if(t){this.pieceChange(t),this.updateMouseGroup(t);const e=new $e(this.mouseGroup.position);this.hook.emit("nowPointChange",e)}});h(this,"onWillChangeState",(t,e)=>{var o;this.dotAnimation();const n=(o=this.getIntersection())==null?void 0:o.point;!n||(e==="editing"?this.hook.emit("getStartPoint",new $e(n)):this.hook.emit("getEndPoint",new $e(n)))});h(this,"computedCenterMouseXY",()=>{const t=this.container.querySelector(".range-piece__aim");if(!t)return null;const{left:e,top:n,width:o,height:s}=t.getBoundingClientRect(),r=Math.round(e+o/2),a=Math.round(n+s/2),c=rh({x:r,y:a},this.five.getElement());this.centerMouseXY=c});h(this,"getIntersection",()=>{if(!this.centerMouseXY)return null;this.raycaster.setFromCamera(this.centerMouseXY,this.five.camera);const t=this.five.model.intersectRaycaster(this.raycaster)[0];return t||null});this.five=t.five,this.hook=t.hook,this.group=t.group,this.mouseGroup=Da(N({isMobile:!0},t.openParams.crossHairParameter)),this.fiveHelper=t.fiveHelper,this.container.innerHTML=ih,this.container.classList.add("range-piece-controller"),this.content=this.container.querySelector(".range-piece__content"),this.content&&(this.content.style.transform=`matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`,this.content.style.opacity=`${this.pieceStyl.opacity}`),t.container.append(this.container),this.intersectMesh=new F.Mesh(new F.RingGeometry(.04,.08,32),new F.MeshBasicMaterial({color:1245179,opacity:0,side:F.DoubleSide,transparent:!0})),this.container.addEventListener("animationend",this.computedCenterMouseXY),this.five.on("cameraUpdate",this.onCameraDirectionUpdate),this.hook.on("willChangeState",this.onWillChangeState)}dispose(){this.container.removeEventListener("animationend",this.computedCenterMouseXY),this.five.off("cameraUpdate",this.onCameraDirectionUpdate),this.hook.off("willChangeState",this.onWillChangeState),this.container.remove(),this.group.remove(this.mouseGroup),this.mouseGroup.remove(),this.hasAppendMouseGroup=!1,this.five.scene.remove(this.intersectMesh)}pieceChange(t){const e=t.face,n=t.point;if(e&&n){const s=e.normal.clone().clone().multiplyScalar(.05),r=n.clone().add(s);this.intersectMesh.position.copy(r);const a=r.clone().add(s);this.intersectMesh.lookAt(a),this.five.scene.add(this.intersectMesh);const l=this.intersectMesh.modelViewMatrix.clone().toArray();this.changePieceStyl("matrix3d",l);const c=this.calculateSize(n);this.changePieceStyl("scale",c)}}calculateSize(t){if(!t)return;const e=this.five.camera.position;let n=t.distanceTo(e);const o=4,s=1;return n>o&&(n=o),n<s&&(n=s),-.51/(o-s)*n+1}dotAnimation(){const t=dn.default.Easing.Quadratic.InOut,e={opacity:.4,scale:this.pieceStyl.scale},n={opacity:[1,.4],scale:[this.pieceStyl.scale*.8,this.pieceStyl.scale]};let o=oh;const s=new dn.default.Tween(e).to(n,500).easing(t).start(0).onUpdate(({opacity:r,scale:a})=>{this.changePieceStyl("scale",a),this.changePieceStyl("opacity",r)}).onComplete(()=>{o()});o=ci(r=>{s.update(r)})}changePieceStyl(t,e){!this.content||(this.pieceStyl[t]=e,this.content.style.transform=`matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`,this.content.style.opacity=`${this.pieceStyl.opacity}`)}updateMouseGroup(t,e){if(!this.hasAppendMouseGroup){this.group.add(this.mouseGroup),this.hasAppendMouseGroup=!0;const n=this.container.querySelector(".range-piece__aim");n&&(n.style.opacity="0")}if(!t)return this.mouseGroup;if(this.mouseGroup.position.copy(t.point),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const o=t.face.normal.clone().multiplyScalar(.05),r=t.point.clone().add(o).clone().add(o);this.mouseGroup.lookAt(r)}return this.mouseGroup}}class lh{constructor(t,e){h(this,"hasOpen",!1);h(this,"hook",new be.Subscribe);h(this,"magnifier");h(this,"five");h(this,"model");h(this,"group");h(this,"config");h(this,"fiveHelper");h(this,"useUIController");h(this,"params");h(this,"useGuideController");h(this,"rangePieceController");h(this,"container",document.createElement("div"));h(this,"shortcutKeyController");h(this,"controller",null);h(this,"controllerParams");h(this,"getCurrentMode",()=>this.controller instanceof Sn?"Edit":this.controller instanceof Ci?"Watch":this.controller instanceof hs?"Mixed":null);h(this,"changeMode",t=>{var n;if(!this.hasOpen||this.getCurrentMode()===t)return;if(this.getCurrentMode()==="Mixed"||t==="Mixed")return new Error("\u4E0D\u652F\u6301\u5207\u6362\u7684Mode");(n=this.controller)==null||n.dispose();const e={View:zf,Watch:Ci,Edit:Sn};if(!e[t])throw new Error("\u4E0D\u5B58\u5728\u7684 Mode");this.controller=new e[t](this.controllerParams),this.hook.emit("modeChange",t)});var s,r;this.five=t,this.params=e;const n={userDistanceItemCreator:void 0,getDistanceText(a){return a.toFixed(2)+"m"}};this.config=N(N({},n),ri(e,["openParams","magnifierParams"])),this.model=new ro(this.config),this.fiveHelper=new pf(t),this.magnifier=new Pa(t,(s=e.magnifierParams)!=null?s:{width:190,height:190,scale:2}),this.group=new F.Group,this.group.name="plugin-measure-group",this.container.classList.add("five-plugin-measure-container"),this.container.style.position="absolute",this.container.style.left="0",this.container.style.top="0",this.container.style.pointerEvents="none",this.container.style.width="100%",this.container.style.height="100%",this.container.style.opacity="0",this.container.style.background="rgba(0, 0, 0, 0.15)";const o=(r=this.params.openParams)!=null?r:{};this.controllerParams={five:this.five,hook:this.hook,group:this.group,model:this.model,config:this.config,magnifier:this.magnifier,container:this.container,fiveHelper:this.fiveHelper,openParams:o,mouseGroup:Da(N({},o.crossHairParameter)),userDistanceItemCreator:this.params.userDistanceItemCreator},this.params.useUIController!==!1&&(this.useUIController=new ms(this,this.controllerParams)),this.params.useGuideController!==!1&&(this.useGuideController=new eh(this,this.controllerParams))}appendTo(t){t.append(this.container)}dispose(){var t,e;this.disable(),(t=this.useUIController)==null||t.dispose(),(e=this.magnifier)==null||e.dispose(),this.five.needsRender=!0}load(t){this.model.parse(t),this.save()}enable(){var t,e,n;this.hasOpen||(this.hasOpen=!0,this.five.scene.add(this.group),this.container.style.opacity="1",(t=this.params.openParams)!=null&&t.isMobile?(this.controller=new hs(this.controllerParams),this.rangePieceController=new ah(this.controllerParams)):(this.five.helperVisible=!1,this.controller=new Ci(this.controllerParams)),(e=this.useUIController)==null||e.show(),(n=this.useGuideController)==null||n.show(),this.shortcutKeyController=new th(this,this.five),this.hook.emit("enable",!0))}disable(){var t,e,n,o,s;this.hasOpen=!1,this.container.style.opacity="0",(t=this.controller)==null||t.dispose(),(e=this.rangePieceController)==null||e.dispose(),(n=this.useUIController)==null||n.hide(),(o=this.useGuideController)==null||o.hide(),(s=this.shortcutKeyController)==null||s.dispose(),this.controller=null,this.five.helperVisible=!0,this.five.scene.remove(this.group),this.five.needsRender=!0,this.hook.emit("disable",!0)}revoke(){this.controller instanceof Sn&&this.controller.revoke()}removeLineByID(t){this.model.removeLineByID(t)}highlightLine(t){if(this.getCurrentMode()!=="Watch")return!1;const e=this.model.getLineByID(t);return e?(this.controller.highlightLine(e),!0):!1}clearHighlightLines(){return this.getCurrentMode()!=="Watch"?!1:(this.controller.clearHighlightLines(),!0)}save(){return this.controller instanceof Sn?(this.model.mergeModel(this.controller.model),this):this}toJson(){return this.model.toJson()}changeIsMobile(t){var e,n;((e=this.controllerParams.openParams)==null?void 0:e.isMobile)===void 0&&(this.controllerParams.openParams.isMobile=t),this.controllerParams.openParams.isMobile!==t&&(this.controllerParams.openParams.isMobile=t,this.params.useUIController!==!1&&((n=this.useUIController)==null||n.dispose()),this.useUIController=new ms(this,this.controllerParams))}changeConfigs(t){var e;if(t.getDistanceText&&t.getDistanceText!==this.config.getDistanceText){const n=t.getDistanceText;this.config.getDistanceText=n,(e=this.controller)==null||e.updateDistanceUI()}}}const ch=function(t,e){return new lh(t,e)},Ba=$i(null);function uh(i){ae(i,"svelte-19zi46m",".PanoSpatialTagPlugin__tag-origin.svelte-19zi46m{position:absolute;width:0.5rem;height:0.5rem;border-radius:50%;background:#fff;box-shadow:0 0 .6rem #fff;transform:translate(-50%, -50%) scale(1);transform-origin:center center;animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin 1.2s forwards;pointer-events:auto}.PanoSpatialTagPlugin__tag-origin.svelte-19zi46m:after{content:'';position:absolute;top:50%;height:50%;width:2rem;height:2rem;transform:translate(-50%, -50%)}.PanoSpatialTagPlugin__tag-origin-destroy.svelte-19zi46m{transform:translate(-50%, -50%) scale(0.6);animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}")}function ps(i,t,e){const n=i.slice();return n[3]=t[e],n}function gs(i){let t,e=`${i[3].top}%`,n=`${i[3].left}%`,o,s;function r(){return i[2](i[3])}return{c(){t=Q("i"),b(t,"class","svelte-19zi46m"),_(t,"PanoSpatialTagPlugin__tag-origin",!0),_(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),H(t,"top",e),H(t,"left",n),H(t,"visibility",i[3].front?"visible":"hidden")},m(a,l){T(a,t,l),o||(s=Pe(t,"click",r),o=!0)},p(a,l){i=a,l&1&&_(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),l&1&&e!==(e=`${i[3].top}%`)&&H(t,"top",e),l&1&&n!==(n=`${i[3].left}%`)&&H(t,"left",n),l&1&&H(t,"visibility",i[3].front?"visible":"hidden")},d(a){a&&z(t),o=!1,s()}}}function dh(i){let t,e=i[0],n=[];for(let o=0;o<e.length;o+=1)n[o]=gs(ps(i,e,o));return{c(){for(let o=0;o<n.length;o+=1)n[o].c();t=he()},m(o,s){for(let r=0;r<n.length;r+=1)n[r].m(o,s);T(o,t,s)},p(o,[s]){if(s&3){e=o[0];let r;for(r=0;r<e.length;r+=1){const a=ps(o,e,r);n[r]?n[r].p(a,s):(n[r]=gs(a),n[r].c(),n[r].m(t.parentNode,t))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},i:ee,o:ee,d(o){tt(n,o),o&&z(t)}}}function fh(i,t,e){let{origins:n}=t;const o=r=>{Ba.update(()=>`${r}-PanoSpatialTagPlugin-${Date.now()}`)},s=r=>o(r.id);return i.$$set=r=>{"origins"in r&&e(0,n=r.origins)},[n,o,s]}class hh extends oe{constructor(t){super(),ie(this,t,fh,dh,te,{origins:0},uh)}}function mh(i){ae(i,"svelte-1i5h9zh",".PanoSpatialTagPlugin__tag-x.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#FFF;transform:translate(0, -100%);transition:height .5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh.svelte-1i5h9zh{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity .8s .6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, .1));box-shadow:0 .1rem .5rem rgba(0, 0, 0, .2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .4s cubic-bezier(.44,.44,.74,.98) , opacity .4s cubic-bezier(.44,.44,.74,.98), width .5s linear, height .5s linear ;transform-origin:center bottom}.PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0.3rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0.5rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh{animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh{animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh.svelte-1i5h9zh{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line.svelte-1i5h9zh{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-1i5h9zh.svelte-1i5h9zh{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform .5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-animate.svelte-1i5h9zh{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;display:inline-block;transform:translate(-100%, 0);transition:transform .9s cubic-bezier(0,.65,.16,1.08) .6s;padding-left:.5rem;font-size:1rem}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{opacity:.32}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .5s .55s, opacity .4s .55s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{opacity:0;transition:opacity .8s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{transform:translate(-100%, 0);transition:transform .6s cubic-bezier(.53,.06,.88,.59)}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content .svelte-1i5h9zh{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh{opacity:0.5;transform:translate(-50%, 0) scaleY(0);animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}")}function ph(i){let t,e,n,o,s,r,a,l,c,u,f,d,p,m,g;return{c(){t=Q("div"),e=Q("div"),n=Z(),o=Q("div"),s=Q("i"),r=Z(),a=Q("i"),l=Z(),c=Q("i"),u=Z(),f=Q("div"),d=Q("div"),b(e,"class","PanoSpatialTagPlugin__tag-shadow svelte-1i5h9zh"),H(e,"transform","translate("+i[7]/2*i[3]*3+"px, "+i[8]/2*(i[1]?-1:1)*i[3]*3+"px) scale("+1/i[3]+")"),b(s,"class","PanoSpatialTagPlugin__tag-flagpole svelte-1i5h9zh"),H(s,"width",i[4]+"rem"),b(a,"class","PanoSpatialTagPlugin__tag-line1 svelte-1i5h9zh"),b(c,"class","PanoSpatialTagPlugin__tag-line2 svelte-1i5h9zh"),b(o,"class","PanoSpatialTagPlugin__tag-line svelte-1i5h9zh"),b(d,"class","PanoSpatialTagPlugin__tag-content svelte-1i5h9zh"),b(f,"class","PanoSpatialTagPlugin__tag-animate svelte-1i5h9zh"),H(f,"transform","scale("+i[3]*3+")"),b(t,"id",p="PanoSpatialTagPlugin__"+i[0]),H(t,"height",20*i[5]+"rem"),b(t,"class","svelte-1i5h9zh"),_(t,"PanoSpatialTagPlugin__tag-x",!0),_(t,"PanoSpatialTagPlugin__tag-upside-down",i[1]),_(t,"PanoSpatialTagPlugin__tag-show",i[10]),_(t,"PanoSpatialTagPlugin__tag-hide",i[10]===!1||i[6])},m(A,v){T(A,t,v),O(t,e),O(t,n),O(t,o),O(o,s),O(o,r),O(o,a),O(o,l),O(o,c),O(t,u),O(t,f),O(f,d),d.innerHTML=i[2],i[16](d),m||(g=Pe(d,"click",i[11]),m=!0)},p(A,[v]){v&394&&H(e,"transform","translate("+A[7]/2*A[3]*3+"px, "+A[8]/2*(A[1]?-1:1)*A[3]*3+"px) scale("+1/A[3]+")"),v&16&&H(s,"width",A[4]+"rem"),v&4&&(d.innerHTML=A[2]),v&8&&H(f,"transform","scale("+A[3]*3+")"),v&1&&p!==(p="PanoSpatialTagPlugin__"+A[0])&&b(t,"id",p),v&32&&H(t,"height",20*A[5]+"rem"),v&2&&_(t,"PanoSpatialTagPlugin__tag-upside-down",A[1]),v&1024&&_(t,"PanoSpatialTagPlugin__tag-show",A[10]),v&1088&&_(t,"PanoSpatialTagPlugin__tag-hide",A[10]===!1||A[6])},i:ee,o:ee,d(A){A&&z(t),i[16](null),m=!1,g()}}}function gh(i,t,e){let{id:n}=t,{upsideDown:o}=t,{content:s}=t,{contentZoom:r}=t,{lineWidthZoom:a}=t,{lineHeightZoom:l}=t,{destroying:c=!1}=t,{folded:u}=t,{dispose:f}=t,{events:d}=t,{hooks:p}=t,m=0,g=0,A,v,C=setTimeout(()=>{u||e(10,v=!0),C=void 0},100);const w=y=>{const L=Object.keys(d);let P=y.target;for(;P;){const j=P.getAttribute("class");if(!j){P=P.parentNode;continue}if(j.includes("PanoSpatialTagPlugin__tag-content")){P=null;break}L.forEach(B=>{j.includes(B)&&d[B](n)}),P=P.parentNode}};Ye(()=>{p.emit("initTag",{id:n})});const x=Ba.subscribe(y=>{if(y===null)return;const[L,P]=y.split("-PanoSpatialTagPlugin-");n===L&&(p.emit("clickOrigin",{id:n,show:v}),C||(e(10,v=u),e(12,u=!u),C=setTimeout(()=>{C=void 0},1500)))});qi(()=>{e(7,m=A.offsetWidth),e(8,g=A.offsetHeight),!C&&e(10,v=!u)}),yt(()=>{p.emit("destroyTag",{id:n}),x(),f()});function D(y){Me[y?"unshift":"push"](()=>{A=y,e(9,A)})}return i.$$set=y=>{"id"in y&&e(0,n=y.id),"upsideDown"in y&&e(1,o=y.upsideDown),"content"in y&&e(2,s=y.content),"contentZoom"in y&&e(3,r=y.contentZoom),"lineWidthZoom"in y&&e(4,a=y.lineWidthZoom),"lineHeightZoom"in y&&e(5,l=y.lineHeightZoom),"destroying"in y&&e(6,c=y.destroying),"folded"in y&&e(12,u=y.folded),"dispose"in y&&e(13,f=y.dispose),"events"in y&&e(14,d=y.events),"hooks"in y&&e(15,p=y.hooks)},[n,o,s,r,a,l,c,m,g,A,v,w,u,f,d,p,D]}class Ah extends oe{constructor(t){super(),ie(this,t,gh,ph,te,{id:0,upsideDown:1,content:2,contentZoom:3,lineWidthZoom:4,lineHeightZoom:5,destroying:6,folded:12,dispose:13,events:14,hooks:15},mh)}}const vh={position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",pointerEvents:"none"},As="<",vs=">",bs="%",ys="locals",bh="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",yh={"&":"&","<":"<",">":">",'"':""","'":"'"},Qe={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};function ws(i){return i.replace(/;(\s*$)/,"$1")}function wh(i,t){return new Ch(i).compileFunction()(t)}class Ch{constructor(t){h(this,"templateText");h(this,"mode",null);h(this,"truncate",!1);h(this,"currentLine",1);h(this,"source","");h(this,"regex",new RegExp(bh));this.templateText=t}compileFunction(){let t;const e=` var __output = "";
|
|
498
498
|
function __append(s) { if (s !== undefined && s !== null) __output += s }
|
|
499
499
|
with (`+ys+` || {}) {
|
|
500
500
|
`,n=` }
|
|
@@ -509,9 +509,9 @@ void main() {
|
|
|
509
509
|
`)}switch(this.mode){case Qe.EVAL:this.source+=" ; "+t+`
|
|
510
510
|
`;break;case Qe.ESCAPED:this.source+=" ; __append(escapeFn("+ws(t)+`))
|
|
511
511
|
`;break;case Qe.RAW:this.source+=" ; __append("+ws(t)+`)
|
|
512
|
-
`;break;case Qe.COMMENT:break;case Qe.LITERAL:this._addOutput(t);break}}else this._addOutput(t)}}}const Ei=.001,Cs=.01,Eh="https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png",Ph=(i,t)=>{var X,V,ue,de,me,Ce,De,Re;let e=t==null?void 0:t.container,n=1.4;const o=(X=t==null?void 0:t.wait)!=null?X:200,s=(V=t==null?void 0:t.maxNumberOnScreen)!=null?V:3,r=(ue=t==null?void 0:t.minRad)!=null?ue:Math.PI/4,a=(de=t==null?void 0:t.nearTolerance)!=null?de:100,l=(me=t==null?void 0:t.upsideHeight)!=null?me:1.6,c=(Ce=t==null?void 0:t.minDistance)!=null?Ce:1.2,u=(De=t==null?void 0:t.maxDistance)!=null?De:3.5,f=Kt(i),d=document.createElement("div");d.classList.add("PanoSpatialTagPlugin"),Object.assign(d.style,vh);const p=new be.Subscribe;let m=new Image;m.src=Eh;const g={points:[],origins:[],tags:[],template:"",events:{},render:wh,folded:!1,enabled:!0,forbidden:!0},A=new hh({target:d,props:{origins:g.origins}}),v=(se,ve)=>{D(),ve&&y()},C=()=>{g.forbidden&&(g.forbidden=!1,y())},w=(se,ve)=>{if(g.tags.length===0)return;const ye=ve.longitude-i.state.longitude,re=i.camera.clone();re.position.copy(ve.offset),re.rotateOnWorldAxis(new E.Vector3(0,1,0),ye),re.updateProjectionMatrix(),re.updateMatrixWorld(!0);const nt=new E.Frustum,
|
|
512
|
+
`;break;case Qe.COMMENT:break;case Qe.LITERAL:this._addOutput(t);break}}else this._addOutput(t)}}}const Ei=.001,Cs=.01,Eh="https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png",Ph=(i,t)=>{var X,V,ue,de,me,Ce,De,Re;let e=t==null?void 0:t.container,n=1.4;const o=(X=t==null?void 0:t.wait)!=null?X:200,s=(V=t==null?void 0:t.maxNumberOnScreen)!=null?V:3,r=(ue=t==null?void 0:t.minRad)!=null?ue:Math.PI/4,a=(de=t==null?void 0:t.nearTolerance)!=null?de:100,l=(me=t==null?void 0:t.upsideHeight)!=null?me:1.6,c=(Ce=t==null?void 0:t.minDistance)!=null?Ce:1.2,u=(De=t==null?void 0:t.maxDistance)!=null?De:3.5,f=Kt(i),d=document.createElement("div");d.classList.add("PanoSpatialTagPlugin"),Object.assign(d.style,vh);const p=new be.Subscribe;let m=new Image;m.src=Eh;const g={points:[],origins:[],tags:[],template:"",events:{},render:wh,folded:!1,enabled:!0,forbidden:!0},A=new hh({target:d,props:{origins:g.origins}}),v=(se,ve)=>{D(),ve&&y()},C=()=>{g.forbidden&&(g.forbidden=!1,y())},w=(se,ve)=>{if(g.tags.length===0)return;const ye=ve.longitude-i.state.longitude,re=i.camera.clone();re.position.copy(ve.offset),re.rotateOnWorldAxis(new E.Vector3(0,1,0),ye),re.updateProjectionMatrix(),re.updateMatrixWorld(!0);const nt=new E.Frustum,wt=new E.Matrix4;wt.multiplyMatrices(re.projectionMatrix,re.matrixWorldInverse),nt.setFromProjectionMatrix(wt),g.tags.forEach(ge=>{const lt=re.position.clone().setY(n).distanceTo(ge.position);if(lt<c||lt>u||!nt.containsPoint(ge.position))return ge.destroying=!0;const ct=ge.position.clone().sub(re.position).setY(0);if(ct.angleTo(ge.normal)>Math.PI/2-r&&ct.angleTo(ge.normal)<Math.PI/2+r)return ge.destroying=!0}),g.tags.forEach(ge=>{ge.destroying?ge.app.$set({contentZoom:.1+re.position.distanceTo(ge.position)/u,lineWidthZoom:.38*(.01+re.position.distanceTo(ge.position)/u),destroying:ge.destroying}):ge.app.$set({lineWidthZoom:.38*(.01+re.position.distanceTo(ge.position)/u),lineHeightZoom:.4+(re.position.distanceTo(ge.position)-c)/u*.6,contentZoom:.1+re.position.distanceTo(ge.position)/u})}),setTimeout(()=>{g.tags.forEach(ge=>{ge.destroying&&(ge.app.$destroy(),ge=null)}),g.tags=g.tags.filter(ge=>!ge.destroying),D()},1900)},x=se=>{se!==be.Five.Mode.Panorama&&!g.forbidden&&(A.$set({origins:[]}),g.tags.forEach(ve=>{ve.app.$destroy(),ve=null}),g.origins=[],g.tags=[],g.forbidden=!0)},D=()=>{if(g.forbidden||!g.enabled)return;const se=i.camera,ve=se.getWorldDirection(new E.Vector3);g.origins=g.tags.map(ye=>{const re=ye.position.clone().project(se),nt=ye.position.clone().sub(se.position).setY(0).angleTo(ve.setY(0))<Math.PI/2;return{id:ye.id,front:nt,left:(re.x+1)/2*100,top:(-re.y+1)/2*100,destroying:ye.destroying}}),A.$set({origins:g.origins})},y=()=>{g.forbidden||!g.enabled||(g.timeoutId&&clearTimeout(g.timeoutId),g.timeoutId=setTimeout(()=>{g.timeoutId=void 0;const se=L();se.length&&(g.tags=g.tags.concat(se),D())},o))},L=()=>{const{clientWidth:se,clientHeight:ve}=i.getElement(),ye=[],re=i.camera,nt=new E.Frustum,wt=new E.Matrix4,ge=re.getWorldDirection(new E.Vector3);wt.multiplyMatrices(re.projectionMatrix,re.matrixWorldInverse),nt.setFromProjectionMatrix(wt);const lt=g.tags.filter(Le=>nt.containsPoint(Le.position)&&!Le.destroying).length,ct=g.points.reduce((Le,Oe)=>{if(g.tags.find(ze=>Oe.id===ze.id&&!ze.destroying))return Le;const Je=re.position.clone().setY(n).distanceTo(Oe.position);if(Je<c||Je>u||!nt.containsPoint(Oe.position))return Le;const tn=Oe.position.clone().sub(re.position).setY(0);if(tn.angleTo(Oe.normal)>Math.PI/2-r&&tn.angleTo(Oe.normal)<Math.PI/2+r)return Le;const Ft=Oe.position.clone().project(re);if(!g.tags.every(ze=>{if(ze.position.clone().sub(re.position).setY(0).angleTo(ge.setY(0))>Math.PI/2)return!0;const Et=ze.position.clone().project(re);return Math.sqrt(Math.pow((Ft.x-Et.x)/2*se,2)+Math.pow((Ft.y-Et.y)/2*ve,2))>a}))return Le;const Ct={id:Oe.id,position:Oe.position,normal:Oe.normal,replacement:Oe.replacement,weight:Oe.weight,distance:Je};let Ee;for(let ze=0,Et=Le.length;ze<Et;ze++){const An=Le[ze];if(Ct.weight>An.weight){Ee=ze;break}if(Ct.distance<An.distance){Ee=ze;break}}return Ee!==void 0?Le.splice(Ee,0,Ct):Le.push(Ct),Le},[]);for(let Le=0,Oe=ct.length;Le<Oe&&!(lt+ye.length>=s);Le++){const Je=ct[Le];if(ye.find(Ee=>Je.id===Ee.id))continue;const tn=Je.position.clone().project(re);if(!g.tags.concat(ye).every(Ee=>{if(Ee.position.clone().sub(re.position).setY(0).angleTo(ge.setY(0))>Math.PI/2)return!0;const ze=Ee.position.clone().project(re);return Math.sqrt(Math.pow((tn.x-ze.x)/2*se,2)+Math.pow((tn.y-ze.y)/2*ve,2))>a}))continue;const Ft=new E.Raycaster(re.position.clone().setY(n),Je.position.clone().sub(re.position.clone().setY(n)).normalize(),0,Je.distance+Cs),[Ct]=g.intersectObjects?Ft.intersectObjects(g.intersectObjects,!0):i.model.bvhs.loaded?i.model.intersectRaycaster(Ft):Ft.intersectObjects(i.model.children,!0);if(!!Ct&&Je.distance-Ct.distance<Cs){const{position:Ee,normal:ze,id:Et,replacement:An}=Je,il=new E.Plane().setFromNormalAndCoplanarPoint(ze,Ee),po=Ee.clone().sub(re.position).cross(new E.Vector3(0,1,0)).setLength(Ei),ol=[Ee.clone(),Ee.clone().add(po),Ee.clone().add(new E.Vector3(0,Ei,0)).add(po),Ee.clone().add(new E.Vector3(0,Ei,0))].map(ll=>il.projectPoint(ll,new E.Vector3)),{container:sl,dispose:rl}=f.create3DDomContainer(ol)||{},al=new Ah({target:sl,props:{id:Et,content:g.render(g.template,An),lineWidthZoom:.38*(.01+re.position.distanceTo(Ee)/u),lineHeightZoom:.4+(re.position.distanceTo(Ee)-c)/u*.6,contentZoom:.1+re.position.distanceTo(Ee)/u,upsideDown:Ee.y>l,folded:g.folded,events:g.events,hooks:p,dispose:rl}});ye.push({position:Ee,normal:ze,id:Et,app:al})}}return ye},P=se=>{g.points=se.points.map(ve=>{var ye,re;return{id:ve.id,position:new E.Vector3().fromArray(ve.position),normal:new E.Vector3().fromArray(ve.normal),replacement:(ye=ve.replacement)!=null?ye:{},weight:(re=ve.weight)!=null?re:-1}}),se.render&&(g.render=se.render),se.template&&(g.template=se.template),se.events&&(g.events=se.events),se.enabled===!1&&(g.enabled=se.enabled),se.folded===!0&&(g.folded=se.folded)},j=se=>{g.intersectObjects=se,y()},B=()=>{g.enabled=!0,y()},G=()=>{g.enabled=!1,A.$set({origins:[]}),g.tags.forEach(se=>{se.app.$destroy(),se=null}),g.origins=[],g.tags=[]},U=()=>{g.folded=!1,g.tags.forEach(se=>{se.app.$set({folded:g.folded})})},I=()=>{g.folded=!0,g.tags.forEach(se=>{se.app.$set({folded:g.folded})})},S=se=>{g.tags.forEach(ve=>{ve.id===se&&ve.app.$set({folded:!1})})},R=se=>{g.tags.forEach(ve=>{ve.id===se&&ve.app.$set({folded:!0})})},W=()=>{i.once("renderFrame",D)},Y=()=>{e||(e=i.getElement().parentElement),e&&e.appendChild(d),g.forbidden=!1,n=i.model.bounding.getCenter(new E.Vector3).y,y(),i.on("panoWillArrive",w),i.on("panoArrived",C),i.on("modeChange",x),i.on("cameraUpdate",v)},ne=()=>{m=null,f.disposeAll(),A.$destroy(),g.tags.forEach(se=>{se.app.$destroy(),se=null}),g.origins=[],g.tags=[],i.off("modelLoaded",Y),i.off("renderFrame",D),i.off("panoWillArrive",w),i.off("panoArrived",C),i.off("modeChange",x),i.off("cameraUpdate",v),i.off("dispose",ne),window.removeEventListener("resize",W,!1)};return window.addEventListener("resize",W,!1),(Re=i==null?void 0:i.model)!=null&&Re.loaded?Y():i.once("modelLoaded",Y),i.on("dispose",ne),{load:P,setIntersectObjects:j,unfoldAll:U,foldAll:I,unfold:S,fold:R,enable:B,disable:G,hooks:p,dispose:ne}};var St=(i=>(i.SMALL="small",i.MIDLLE="middle",i.LARGE="large",i.EXTRA_LARGE="x-large",i))(St||{});function Ih(i){ae(i,"svelte-1ir3cyd",`.item-label-item.svelte-1ir3cyd{position:absolute;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:0}.item-label-item.visible.svelte-1ir3cyd{opacity:1;animation:svelte-1ir3cyd-fadeIn .3s ease-in}.item-label-item__text-wrap.svelte-1ir3cyd::before{content:'';position:absolute;width:100%;height:100%;background-color:rgba(0, 0, 0, .3);filter:blur(1rem);z-index:-1}.item-label-item__text-wrap.svelte-1ir3cyd{padding:0.375rem 0.375rem 0;position:absolute;height:1.25rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap;line-height:0.625rem;font-size:0.6875rem;font-weight:bold;color:#FFEAC0;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center}.item-label-item__text.svelte-1ir3cyd{padding-bottom:0.25rem;border-top:0 solid;border-left:0 solid;border-right:0 solid;border-bottom:0.0625rem solid;-o-border-image:linear-gradient(to right, rgba(234, 208, 154, 0), rgba(234, 208, 154, 100), rgba(234, 208, 154, 0)) 4.5 1 4.5;border-image:linear-gradient(to right, rgba(234, 208, 154, 0), rgba(234, 208, 154, 100), rgba(234, 208, 154, 0)) 4.5 1 4.5}.item-label-item__bar.svelte-1ir3cyd{position:absolute;bottom:0;width:0.0625rem;background-image:linear-gradient(to bottom, rgba(234, 208, 154, 0), rgba(234, 208, 154, 1))}@keyframes svelte-1ir3cyd-fadeIn{from{opacity:0
|
|
513
513
|
}to{opacity:1
|
|
514
|
-
}}`)}function xh(i){let t,e,n,o=(i[0].name.length>6?`${i[0].name.slice(0,6)}...`:i[0].name)+"",s,r,a,l,c,u;return{c(){t=Q("div"),e=Q("div"),n=Q("span"),s=ke(o),r=Z(),a=Q("div"),b(n,"class","item-label-item__text svelte-1ir3cyd"),b(e,"class","item-label-item__text-wrap svelte-1ir3cyd"),H(e,"top",`-${i[0].strokeLength+26}px`),b(a,"class","item-label-item__bar svelte-1ir3cyd"),H(a,"height",`${i[0].strokeLength}px`),b(t,"class",l=je(Ze.default("item-label-item",{visible:i[0].visible}))+" svelte-1ir3cyd"),H(t,"z-index",i[0].zIndex),H(t,"transform",i[0].transform)},m(f,d){T(f,t,d),O(t,e),O(e,n),O(n,s),O(t,r),O(t,a),c||(u=Pe(n,"click",i[1]),c=!0)},p(f,[d]){d&1&&o!==(o=(f[0].name.length>6?`${f[0].name.slice(0,6)}...`:f[0].name)+"")&&Te(s,o),d&1&&H(e,"top",`-${f[0].strokeLength+26}px`),d&1&&H(a,"height",`${f[0].strokeLength}px`),d&1&&l!==(l=je(Ze.default("item-label-item",{visible:f[0].visible}))+" svelte-1ir3cyd")&&b(t,"class",l),d&1&&H(t,"z-index",f[0].zIndex),d&1&&H(t,"transform",f[0].transform)},i:ee,o:ee,d(f){f&&z(t),c=!1,u()}}}function kh(i,t,e){let{itemLabel:n}=t,{hooks:o}=t;function s(){console.log("__onclick___: ",n),o.emit("onLabelClick",n)}return i.$$set=r=>{"itemLabel"in r&&e(0,n=r.itemLabel),"hooks"in r&&e(2,o=r.hooks)},[n,s,o]}class Dh extends oe{constructor(t){super(),ie(this,t,kh,xh,te,{itemLabel:0,hooks:2},Ih)}}function ja(i,t=200){let e;return function(...n){clearTimeout(e),e=setTimeout(()=>{i(...n)},t)}}function Lh(i){ae(i,"svelte-gk8s47",".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}")}function Es(i,t,e){const n=i.slice();return n[26]=t[e],n}function Ps(i,t){let e,n,o;return n=new Dh({props:{itemLabel:t[26],hooks:t[0]}}),{key:i,first:null,c(){e=he(),$(n.$$.fragment),this.first=e},m(s,r){T(s,e,r),q(n,s,r),o=!0},p(s,r){t=s;const a={};r&2&&(a.itemLabel=t[26]),r&1&&(a.hooks=t[0]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),K(n,s)}}}function Sh(i){let t,e=[],n=new Map,o,s,r=i[1];const a=l=>l[26].id;for(let l=0;l<r.length;l+=1){let c=Es(i,r,l),u=a(c);n.set(u,e[l]=Ps(u,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","item-labels-container svelte-gk8s47"),xe(()=>i[9].call(t)),H(t,"opacity",i[4]?1:0)},m(l,c){T(l,t,c);for(let u=0;u<e.length;u+=1)e[u].m(t,null);o=
|
|
514
|
+
}}`)}function xh(i){let t,e,n,o=(i[0].name.length>6?`${i[0].name.slice(0,6)}...`:i[0].name)+"",s,r,a,l,c,u;return{c(){t=Q("div"),e=Q("div"),n=Q("span"),s=ke(o),r=Z(),a=Q("div"),b(n,"class","item-label-item__text svelte-1ir3cyd"),b(e,"class","item-label-item__text-wrap svelte-1ir3cyd"),H(e,"top",`-${i[0].strokeLength+26}px`),b(a,"class","item-label-item__bar svelte-1ir3cyd"),H(a,"height",`${i[0].strokeLength}px`),b(t,"class",l=je(Ze.default("item-label-item",{visible:i[0].visible}))+" svelte-1ir3cyd"),H(t,"z-index",i[0].zIndex),H(t,"transform",i[0].transform)},m(f,d){T(f,t,d),O(t,e),O(e,n),O(n,s),O(t,r),O(t,a),c||(u=Pe(n,"click",i[1]),c=!0)},p(f,[d]){d&1&&o!==(o=(f[0].name.length>6?`${f[0].name.slice(0,6)}...`:f[0].name)+"")&&Te(s,o),d&1&&H(e,"top",`-${f[0].strokeLength+26}px`),d&1&&H(a,"height",`${f[0].strokeLength}px`),d&1&&l!==(l=je(Ze.default("item-label-item",{visible:f[0].visible}))+" svelte-1ir3cyd")&&b(t,"class",l),d&1&&H(t,"z-index",f[0].zIndex),d&1&&H(t,"transform",f[0].transform)},i:ee,o:ee,d(f){f&&z(t),c=!1,u()}}}function kh(i,t,e){let{itemLabel:n}=t,{hooks:o}=t;function s(){console.log("__onclick___: ",n),o.emit("onLabelClick",n)}return i.$$set=r=>{"itemLabel"in r&&e(0,n=r.itemLabel),"hooks"in r&&e(2,o=r.hooks)},[n,s,o]}class Dh extends oe{constructor(t){super(),ie(this,t,kh,xh,te,{itemLabel:0,hooks:2},Ih)}}function ja(i,t=200){let e;return function(...n){clearTimeout(e),e=setTimeout(()=>{i(...n)},t)}}function Lh(i){ae(i,"svelte-gk8s47",".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}")}function Es(i,t,e){const n=i.slice();return n[26]=t[e],n}function Ps(i,t){let e,n,o;return n=new Dh({props:{itemLabel:t[26],hooks:t[0]}}),{key:i,first:null,c(){e=he(),$(n.$$.fragment),this.first=e},m(s,r){T(s,e,r),q(n,s,r),o=!0},p(s,r){t=s;const a={};r&2&&(a.itemLabel=t[26]),r&1&&(a.hooks=t[0]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),K(n,s)}}}function Sh(i){let t,e=[],n=new Map,o,s,r=i[1];const a=l=>l[26].id;for(let l=0;l<r.length;l+=1){let c=Es(i,r,l),u=a(c);n.set(u,e[l]=Ps(u,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","item-labels-container svelte-gk8s47"),xe(()=>i[9].call(t)),H(t,"opacity",i[4]?1:0)},m(l,c){T(l,t,c);for(let u=0;u<e.length;u+=1)e[u].m(t,null);o=bt(t,i[9].bind(t)),s=!0},p(l,[c]){c&3&&(r=l[1],le(),e=Ue(e,c,a,1,l,r,n,t,at,Ps,null,Es),ce()),c&16&&H(t,"opacity",l[4]?1:0)},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)M(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}let Is=26,zh=11;function Mh(i,t,e){const{Raycaster:n,Vector3:o}=E;let{five:s}=t,{modelOcclusionEnable:r}=t,{itemLabels:a}=t,{hooks:l}=t,{displayStrategyType:c}=t,u=null,f=null,d,p,m=[],g=!0;const A=(I,S)=>{const R=new n,W=I.camera.position.clone(),Y=new o().fromArray(S.modelPosition),ne=Y.distanceTo(W);R.set(W.clone(),Y.clone().sub(W).normalize());const[X]=I.model.intersectRaycaster(R);return!(X&&X.distance+1<ne)},v=(I,S)=>{const R=new o(S.modelPosition[0],S.modelPosition[1],S.modelPosition[2]),W=I.project2d(R),Y=W==null?void 0:W.x,ne=W==null?void 0:W.y;return[Y,ne]},C=I=>`translate(${I[0]}px, ${I[1]}px)`,w=(I,S)=>m.length===0?!1:!!m.find(W=>I[0]>=W[0]-S&&I[0]<=W[0]+S||I[1]>=W[1]-Is&&I[1]<=W[1]+Is);function x(I,S){switch(S){case St.SMALL:return Math.ceil(-27.78*I+85);case St.MIDLLE:return Math.ceil(-38.9*I+130);case St.LARGE:return Math.ceil(-44.44*I+140);case St.EXTRA_LARGE:return Math.ceil(-92.59*I+300)}}const D=(I,S)=>{const R=S.map(Y=>{const ne=v(I,Y),X=Y.name.length*zh,V=x(Y.modelPosition[1],c),de=(r?A(I,Y):!0)&&!w([ne[0],ne[1]+V],X);if(!de)return fe(N({},Y),{visible:de});m.push(ne);const me=C(ne);return fe(N({},Y),{visible:de,transform:me,strokeLength:V})}),W=R.filter(({visible:Y})=>Y).map(Y=>({itemLabelItem:Y,distance:new o(Y.modelPosition[0],Y.modelPosition[1],Y.modelPosition[2]).clone().distanceTo(I.camera.position)})).sort((Y,ne)=>Y.distance-ne.distance);return R.map(Y=>{const ne=W.findIndex(X=>X.itemLabelItem.id===Y.id);return ne!==void 0?fe(N({},Y),{zIndex:ne*10}):Y})},y=()=>{m=[],e(1,f=D(s,f))};_i(()=>{B()});const L=()=>{e(4,g=!1),P()};Ye(()=>{e(1,f=a),u=a,y(),j(),s.on("cameraUpdate",L)});const P=ja(()=>{e(4,g=!0),y()},300),j=()=>{window.addEventListener("resize",G,!1)},B=()=>{u!==a&&(e(1,f=a),u=a,y())},G=()=>{s.once("renderFrame",y)};yt(()=>{s.off("cameraUpdate",L),window.removeEventListener("resize",G,!1)});function U(){d=this.clientWidth,p=this.clientHeight,e(2,d),e(3,p)}return i.$$set=I=>{"five"in I&&e(5,s=I.five),"modelOcclusionEnable"in I&&e(6,r=I.modelOcclusionEnable),"itemLabels"in I&&e(7,a=I.itemLabels),"hooks"in I&&e(0,l=I.hooks),"displayStrategyType"in I&&e(8,c=I.displayStrategyType)},[l,f,d,p,g,s,r,a,c,U]}class Th extends oe{constructor(t){super(),ie(this,t,Mh,Sh,te,{five:5,modelOcclusionEnable:6,itemLabels:7,hooks:0,displayStrategyType:8},Lh)}}function Bh(i){return i.model_item_labels.map(t=>N({modelPosition:[t.position[0],t.position[1]+t.size[1],t.position[2]]},t))}const jh=(i,t)=>{var d,p;const e={container:document.createElement("div"),data:null,enabled:!0,fiveModeEnabled:void 0,itemLabels:[],wrapper:null,app:void 0,hooks:new be.Subscribe,modelOcclusionEnable:(d=t==null?void 0:t.modelOcclusionEnable)!=null?d:!0,displayStrategyType:(p=t==null?void 0:t.displayStrategyType)!=null?p:St.SMALL};e.container.setAttribute("class","model-item-label-plugin-container"),e.container.style.cssText=`
|
|
515
515
|
position: absolute;
|
|
516
516
|
left: 0;
|
|
517
517
|
top: 0;
|
|
@@ -520,14 +520,14 @@ void main() {
|
|
|
520
520
|
z-index: 5;
|
|
521
521
|
`,e.container.style.pointerEvents="none";const n=m=>(e.wrapper=m,m.appendChild(e.container),l(),!0),o=m=>{e.itemLabels=Bh(m),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{u(),e.container.remove()},l=()=>{var m;if(!!e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(m=e.app)==null||m.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new Th({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,itemLabels:e.itemLabels,wrapper:e.wrapper,hooks:e.hooks,displayStrategyType:e.displayStrategyType}})}},c=()=>{i.on("modeChange",f),i.once("dispose",a)},u=()=>{i.off("modeChange",f)},f=m=>{if(!!e.enabled){if(m!==be.Five.Mode.Floorplan){e.fiveModeEnabled=!1,l();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=i.currentMode===be.Five.Mode.Floorplan,l()})}};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},Qh={name:"ModelItemLabelPlugin",version:0};var Yt=(i=>(i.TOP_LEFT="topLeft",i.TOP_RIGHT="topRight",i.BOTTOM_LEFT="bottomLeft",i.BOTTOM_RIGHT="bottomRight",i))(Yt||{});function Rh(i){if(i.length===0)return[];if(Array.isArray(i[0]))return i;let t=[];return i.forEach(e=>{const n=[e[Yt.TOP_LEFT],e[Yt.BOTTOM_LEFT],e[Yt.BOTTOM_RIGHT],e[Yt.TOP_RIGHT]];t.push(n)}),t}const Oh=(i,{videoElement:t})=>{const e={videoMeshes:[],videoTextureEnabled:!1,videoSource:"",rectPoints:[],enabled:!1,videoElement:t},n=Kt(i),o=new Map,s=v=>{e.videoTexture&&(e.videoTexture.image.muted=v)},r=()=>e.videoTexture?e.videoTexture.image.muted:!0,a=()=>{if(e.enabled||!e.videoTexture)return;e.enabled=!0,e.videoMeshes=c(),e.videoMeshes.forEach(C=>i.scene.add(C));const v=()=>{if(!e.videoTexture)return;const C=()=>{var w;!e.videoTexture||((w=e.videoTexture)==null||w.image.removeEventListener("timeupdate",C),e.videoTextureEnabled=!0,e.videoMeshes.forEach(x=>{x.material.map!==e.videoTexture&&(x.material.map=e.videoTexture)}),i.needsRender=!0)};e.videoTexture.image.addEventListener("timeupdate",C),e.videoTexture&&e.videoMeshes.length&&(e.videoTexture.image.play(),e.videoTexture.image.onplay=()=>{n.hide()},e.videoTexture.image.onpause=()=>{n.show()},e.videoTexture.image.onclick=()=>{e.videoTexture.image.muted=!1,e.videoTexture.image.play()})};if(i.model.loaded)v();else return i.once("modelLoaded",()=>v())},l=()=>{!e.enabled||(e.enabled=!1,e.videoMeshes.forEach(v=>{v.geometry.dispose(),v.material.dispose(),i.scene.remove(v),e.videoTexture&&e.videoTexture.image.pause()}),e.videoMeshes=[],i.needsRender=!0)},c=()=>e.rectPoints.map((v,C)=>{const w=new E.BufferGeometry,x=128,D=[];D.push(...v[0].toArray());for(let I=1;I<x;I++)D.push(v[0].x+(v[1].x-v[0].x)*I/x,v[0].y+(v[1].y-v[0].y)*I/x,v[0].z+(v[1].z-v[0].z)*I/x);D.push(...v[1].toArray()),D.push(...v[2].toArray());for(let I=1;I<x;I++)D.push(v[2].x+(v[3].x-v[2].x)*I/x,v[2].y+(v[3].y-v[2].y)*I/x,v[2].z+(v[3].z-v[2].z)*I/x);D.push(...v[3].toArray());const y=[];y.push(0,1);for(let I=1;I<x;I++)y.push(0,1-I/x);y.push(0,0),y.push(1,0);for(let I=1;I<x;I++)y.push(1,I/x);y.push(1,1);const L=[];for(let I=0;I<x;I++)L.push(I,I+1,x*2-I,I,x*2-I,x*2+1-I);w.setAttribute("position",new E.BufferAttribute(new Float32Array(D),3)),w.setAttribute("uv",new E.BufferAttribute(new Float32Array(y),2)),w.setIndex(new E.BufferAttribute(new Uint32Array(L),1));const P=new E.AxesHelper(10);i.scene.add(P);const j=new E.MeshBasicMaterial({map:e.videoTextureEnabled?e.videoTexture:e.imageTexture,side:E.DoubleSide}),B=new E.Mesh(w,j);B.renderOrder=1,B.name=`ModelTVVideoPlugin-${C}-${performance.now()}`;const G=[v[1],v[2],v[3],v[0]],U=n.create3DDomContainer(G);if(U!=null&&U.container){const I=document.createElement("div");I.classList.add("play-icon"),I.style.width="100%",I.style.height="100%",I.style.display="flex",I.style.justifyContent="center",I.style.alignItems="center",I.style.pointerEvents="none",U.container.appendChild(I);const S=document.createElement("img");S.src="//vrlab-static.ljcdn.com/release/web/play.2ada5b6f.png",S.style.width="200px",S.style.pointerEvents="auto",S.onclick=()=>{e.videoTexture.image.muted=!1,e.videoTexture.image.play()},I.appendChild(S),o.set(B,U)}return B}),u=v=>{const C=new E.TextureLoader().load(v);return C.minFilter=E.LinearFilter,C.magFilter=E.LinearFilter,C.format=E.RGBFormat,C},f=(v,C)=>new Promise((w,x)=>{const D=new XMLHttpRequest;D.onreadystatechange=()=>{if(D.readyState==4)if(D.status==200){const y=window.URL||window.webkitURL;C=C||document.createElement("video"),C.crossOrigin="anonymous",C.muted=!0,C.loop=!0,C.playsInline=!0,C.src=y.createObjectURL(D.response);const L=new E.VideoTexture(C);L.minFilter=E.LinearFilter,L.magFilter=E.LinearFilter,L.format=E.RGBFormat,w(Object.assign(L,{videoSource:v}))}else x(new Error("Video download Error: "+D.status))},D.onerror=y=>x(y),D.open("GET",v),D.responseType="blob",D.send()}),d=(v,C)=>J(exports,null,function*(){const{video_src:w,video_poster_src:x,points:D}=v;e.videoSource=w,e.rectPoints=Rh(D).map(y=>y.map(({x:L,y:P,z:j})=>new E.Vector3(L,P,j))),e.imageTexture=u(x),C&&(e.videoElement=C),e.videoTexture=yield f(e.videoSource,e.videoElement),e.enabled=!!v.enable,e.enabled&&a()}),p=v=>{if(!e.enabled)return;const C=e.videoMeshes;if(!(!C||v.intersectObjects(C).length===0))return e.videoTexture&&(e.videoTexture.image.paused||e.videoTexture.image.pause()),!1},m=v=>{v==="Floorplan"?n.hide():n.show()},g=()=>{if(!e.enabled)return;const v=i.camera.position;if(o.forEach((C,w)=>{const x=C.css3DObject.position.clone(),D=x.clone().sub(v).normalize(),y=new E.Raycaster(v,D),L=i.model.intersectRaycaster(y)[0],P=x.distanceTo(v),j=.01;L&&L.distance+j<P?C.hide():C.show()}),!r()){const C=e.rectPoints.find(w=>{const x=w[0].clone().add(w[1]).add(w[2]).add(w[3]).divideScalar(4);return w.map(D=>D.clone().add(x).divideScalar(2)).filter(D=>{const y=D.distanceTo(v),L=new E.Raycaster(v,D.clone().sub(v).normalize()),P=i.model.intersectRaycaster(L)[0],j=.01;return!(P&&P.distance+j<y)}).length>=2});(!C||C.length===0)&&s(!0)}},A=()=>{l(),e.videoTexture=void 0,i.off("modeChange",m),i.off("wantsTapGesture",p),i.off("panoArrived",g),i.off("renderFrame",()=>{e.videoMeshes.forEach(v=>{v&&(v.needsRender=!0)})})};return i.on("modeChange",m),i.on("wantsTapGesture",p),i.on("panoArrived",g),i.on("renderFrame",()=>{e.videoMeshes.forEach(v=>{v&&(v.needsRender=!0)})}),{enable:a,disable:l,load:d,dispose:A,state:e,css3DRenderPlugin:n}};function Hh(i){ae(i,"svelte-gduhqw",`.item-label-item.svelte-gduhqw.svelte-gduhqw{position:absolute;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;animation:svelte-gduhqw-fadeIn .3s ease-in}.item-label-item.fold.svelte-gduhqw>.item-label-item__text-wrap.svelte-gduhqw{visibility:hidden}.item-label-item.fold.svelte-gduhqw>.item-label-item__bar.anchor.svelte-gduhqw{visibility:hidden}.item-label-item.fold.svelte-gduhqw>.item-label-item__bar.anchor.svelte-gduhqw:after{visibility:visible}.item-label-item__text-wrap.svelte-gduhqw.svelte-gduhqw{height:-moz-fit-content;height:fit-content;padding:0.75rem 1.25rem 0.75rem 0.75rem;position:absolute;width:-moz-max-content;width:max-content;max-width:29.5625rem;min-height:5.75rem;background-image:linear-gradient(269deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.60) 49%, rgba(31, 38, 46, 0.70) 100%);border:0.09375rem solid rgba(255, 255, 255, .65);border-radius:0.1875rem;color:white;transform:translate(-50%, 0);display:flex;justify-content:flex-start;align-items:center;box-sizing:border-box;overflow:hidden;pointer-events:all}.item-label-item__custom.svelte-gduhqw.svelte-gduhqw{padding:0;max-width:unset;min-height:unset;background-image:unset;border:0;border-radius:0}.icon-wrap.svelte-gduhqw.svelte-gduhqw{width:4.25rem;height:100%;display:flex;justify-content:center;align-content:center}.icon.svelte-gduhqw.svelte-gduhqw{width:4.25rem;height:4.25rem;background-repeat:no-repeat;background-size:contain;background-position:center}.item-label-text.svelte-gduhqw.svelte-gduhqw{margin-left:0.75rem;padding-left:0.75rem;min-height:4.25rem;height:auto;display:flex;flex-flow:column;justify-content:space-around;align-content:flex-start;border-left:solid rgba(255, 255, 255, .2) 0.0625rem;border-top:solid rgba(255, 255, 255, .2) 0;border-right:solid rgba(255, 255, 255, .2) 0;border-bottom:solid rgba(255, 255, 255, .2) 0;pointer-events:auto}.item-model.svelte-gduhqw.svelte-gduhqw{white-space:nowrap;font-size:1.375rem;font-weight:bold;line-height:1.875rem}.item-name.svelte-gduhqw.svelte-gduhqw{height:auto;word-wrap:break-word;word-break:break-all;font-size:1.25rem;line-height:1.75rem}.item-label-item__bar.svelte-gduhqw.svelte-gduhqw{position:absolute;bottom:0;width:0.1875rem;background-image:linear-gradient(to bottom, white, rgba(255, 255, 255, 0));box-shadow:0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.20);pointer-events:none}.item-label-item__bar.anchor.svelte-gduhqw.svelte-gduhqw:after{content:'';position:absolute;bottom:0;width:1.5rem;height:1.5rem;background-image:url("//vrlab-public.ljcdn.com/common/file/web/67e7a198-28c9-47dc-879b-507bd3ae600c.png ");background-position:center;background-size:contain;transform:translate(-0.65625rem, 50%)}@keyframes svelte-gduhqw-fadeIn{from{opacity:0
|
|
522
522
|
}to{opacity:1
|
|
523
|
-
}}`)}function Fh(i){let t,e,n,o=(i[0].code||i[0].id)+"",s,r,a,l=i[0].name+"",c,u=i[0].icon&&xs(i);return{c(){u&&u.c(),t=Z(),e=Q("div"),n=Q("span"),s=ke(o),r=Z(),a=Q("span"),c=ke(l),b(n,"class","item-model svelte-gduhqw"),b(a,"class","item-name svelte-gduhqw"),b(e,"class","item-label-text svelte-gduhqw")},m(f,d){u&&u.m(f,d),T(f,t,d),T(f,e,d),O(e,n),O(n,s),O(e,r),O(e,a),O(a,c)},p(f,d){f[0].icon?u?u.p(f,d):(u=xs(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null),d&1&&o!==(o=(f[0].code||f[0].id)+"")&&Te(s,o),d&1&&l!==(l=f[0].name+"")&&Te(c,l)},d(f){u&&u.d(f),f&&z(t),f&&z(e)}}}function Gh(i){let t;return{c(){t=Q("div")},m(e,n){T(e,t,n),i[6](t)},p:ee,d(e){e&&z(t),i[6](null)}}}function xs(i){let t,e,n,o,s;return{c(){t=Q("div"),e=Q("div"),b(e,"class","icon svelte-gduhqw"),b(e,"style",n=`background-image: url(${i[0].icon})`),b(t,"class","icon-wrap svelte-gduhqw")},m(r,a){T(r,t,a),O(t,e),o||(s=Pe(t,"click",i[7]),o=!0)},p(r,a){a&1&&n!==(n=`background-image: url(${r[0].icon})`)&&b(e,"style",n)},d(r){r&&z(t),o=!1,s()}}}function Nh(i){let t,e,n,o,s,r,a,l,c,u;function f(m,g){return g&1&&(n=null),n==null&&(n=!!Boolean(typeof m[0].render=="function")),n?Gh:Fh}let d=f(i,-1),p=d(i);return{c(){t=Q("div"),e=Q("div"),p.c(),s=Z(),r=Q("div"),b(e,"class",o=je(Ze.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof i[0].render=="function")}))+" svelte-gduhqw"),H(e,"bottom",`${i[0].strokeLength}px`),b(r,"class",a=je(Ze.default("item-label-item__bar",{anchor:i[1]}))+" svelte-gduhqw"),H(r,"height",`${i[0].strokeLength}px`),b(t,"class",l=je(Ze.default("item-label-item",{fold:i[0].isFold}))+" svelte-gduhqw"),H(t,"z-index",i[0].zIndex),H(t,"transform",i[0].transform)},m(m,g){T(m,t,g),O(t,e),p.m(e,null),O(t,s),O(t,r),c||(u=Pe(e,"click",i[4]),c=!0)},p(m,[g]){d===(d=f(m,g))&&p?p.p(m,g):(p.d(1),p=d(m),p&&(p.c(),p.m(e,null))),g&1&&o!==(o=je(Ze.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof m[0].render=="function")}))+" svelte-gduhqw")&&b(e,"class",o),g&1&&H(e,"bottom",`${m[0].strokeLength}px`),g&2&&a!==(a=je(Ze.default("item-label-item__bar",{anchor:m[1]}))+" svelte-gduhqw")&&b(r,"class",a),g&1&&H(r,"height",`${m[0].strokeLength}px`),g&1&&l!==(l=je(Ze.default("item-label-item",{fold:m[0].isFold}))+" svelte-gduhqw")&&b(t,"class",l),g&1&&H(t,"z-index",m[0].zIndex),g&1&&H(t,"transform",m[0].transform)},i:ee,o:ee,d(m){m&&z(t),p.d(),c=!1,u()}}}function Wh(i,t,e){let{itemLabel:n}=t,{hooks:o}=t,{anchorEnabled:s}=t,{onIconClick:r}=t;function a(){o.emit("onLabelClick",n)}let l;function c(f){Me[f?"unshift":"push"](()=>{l=f,e(3,l)})}const u=f=>r(n);return i.$$set=f=>{"itemLabel"in f&&e(0,n=f.itemLabel),"hooks"in f&&e(5,o=f.hooks),"anchorEnabled"in f&&e(1,s=f.anchorEnabled),"onIconClick"in f&&e(2,r=f.onIconClick)},i.$$.update=()=>{if(i.$$.dirty&9&&typeof n.render=="function"&&l&&l.children.length===0){const f=n.render(n);f&&l.appendChild(f)}},[n,s,r,l,a,o,c,u]}class Xh extends oe{constructor(t){super(),ie(this,t,Wh,Nh,te,{itemLabel:0,hooks:5,anchorEnabled:1,onIconClick:2},Hh)}}const{Raycaster:Yh,Vector3:G0}=E,ks=(i,t,e,n)=>{const o=t.clone().sub(e).normalize(),s=new Yh;s.set(e,o);const[r]=i.model.intersectRaycaster(s);return r&&r.distance+.01<n};var
|
|
523
|
+
}}`)}function Fh(i){let t,e,n,o=(i[0].code||i[0].id)+"",s,r,a,l=i[0].name+"",c,u=i[0].icon&&xs(i);return{c(){u&&u.c(),t=Z(),e=Q("div"),n=Q("span"),s=ke(o),r=Z(),a=Q("span"),c=ke(l),b(n,"class","item-model svelte-gduhqw"),b(a,"class","item-name svelte-gduhqw"),b(e,"class","item-label-text svelte-gduhqw")},m(f,d){u&&u.m(f,d),T(f,t,d),T(f,e,d),O(e,n),O(n,s),O(e,r),O(e,a),O(a,c)},p(f,d){f[0].icon?u?u.p(f,d):(u=xs(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null),d&1&&o!==(o=(f[0].code||f[0].id)+"")&&Te(s,o),d&1&&l!==(l=f[0].name+"")&&Te(c,l)},d(f){u&&u.d(f),f&&z(t),f&&z(e)}}}function Gh(i){let t;return{c(){t=Q("div")},m(e,n){T(e,t,n),i[6](t)},p:ee,d(e){e&&z(t),i[6](null)}}}function xs(i){let t,e,n,o,s;return{c(){t=Q("div"),e=Q("div"),b(e,"class","icon svelte-gduhqw"),b(e,"style",n=`background-image: url(${i[0].icon})`),b(t,"class","icon-wrap svelte-gduhqw")},m(r,a){T(r,t,a),O(t,e),o||(s=Pe(t,"click",i[7]),o=!0)},p(r,a){a&1&&n!==(n=`background-image: url(${r[0].icon})`)&&b(e,"style",n)},d(r){r&&z(t),o=!1,s()}}}function Nh(i){let t,e,n,o,s,r,a,l,c,u;function f(m,g){return g&1&&(n=null),n==null&&(n=!!Boolean(typeof m[0].render=="function")),n?Gh:Fh}let d=f(i,-1),p=d(i);return{c(){t=Q("div"),e=Q("div"),p.c(),s=Z(),r=Q("div"),b(e,"class",o=je(Ze.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof i[0].render=="function")}))+" svelte-gduhqw"),H(e,"bottom",`${i[0].strokeLength}px`),b(r,"class",a=je(Ze.default("item-label-item__bar",{anchor:i[1]}))+" svelte-gduhqw"),H(r,"height",`${i[0].strokeLength}px`),b(t,"class",l=je(Ze.default("item-label-item",{fold:i[0].isFold}))+" svelte-gduhqw"),H(t,"z-index",i[0].zIndex),H(t,"transform",i[0].transform)},m(m,g){T(m,t,g),O(t,e),p.m(e,null),O(t,s),O(t,r),c||(u=Pe(e,"click",i[4]),c=!0)},p(m,[g]){d===(d=f(m,g))&&p?p.p(m,g):(p.d(1),p=d(m),p&&(p.c(),p.m(e,null))),g&1&&o!==(o=je(Ze.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof m[0].render=="function")}))+" svelte-gduhqw")&&b(e,"class",o),g&1&&H(e,"bottom",`${m[0].strokeLength}px`),g&2&&a!==(a=je(Ze.default("item-label-item__bar",{anchor:m[1]}))+" svelte-gduhqw")&&b(r,"class",a),g&1&&H(r,"height",`${m[0].strokeLength}px`),g&1&&l!==(l=je(Ze.default("item-label-item",{fold:m[0].isFold}))+" svelte-gduhqw")&&b(t,"class",l),g&1&&H(t,"z-index",m[0].zIndex),g&1&&H(t,"transform",m[0].transform)},i:ee,o:ee,d(m){m&&z(t),p.d(),c=!1,u()}}}function Wh(i,t,e){let{itemLabel:n}=t,{hooks:o}=t,{anchorEnabled:s}=t,{onIconClick:r}=t;function a(){o.emit("onLabelClick",n)}let l;function c(f){Me[f?"unshift":"push"](()=>{l=f,e(3,l)})}const u=f=>r(n);return i.$$set=f=>{"itemLabel"in f&&e(0,n=f.itemLabel),"hooks"in f&&e(5,o=f.hooks),"anchorEnabled"in f&&e(1,s=f.anchorEnabled),"onIconClick"in f&&e(2,r=f.onIconClick)},i.$$.update=()=>{if(i.$$.dirty&9&&typeof n.render=="function"&&l&&l.children.length===0){const f=n.render(n);f&&l.appendChild(f)}},[n,s,r,l,a,o,c,u]}class Xh extends oe{constructor(t){super(),ie(this,t,Wh,Nh,te,{itemLabel:0,hooks:5,anchorEnabled:1,onIconClick:2},Hh)}}const{Raycaster:Yh,Vector3:G0}=E,ks=(i,t,e,n)=>{const o=t.clone().sub(e).normalize(),s=new Yh;s.set(e,o);const[r]=i.model.intersectRaycaster(s);return r&&r.distance+.01<n};var zt=(i=>(i.SMALL="small",i.MIDLLE="middle",i.LARGE="large",i.EXTRA_LARGE="x-large",i))(zt||{});const Uh=(i,t)=>{switch(t){case zt.SMALL:return Math.ceil(-27.78*i+85);case zt.MIDLLE:return Math.ceil(-38.9*i+130);case zt.LARGE:return Math.ceil(-44.44*i+140);case zt.EXTRA_LARGE:return Math.ceil(-92.59*i+300)}},Vh=i=>`translate(${i[0]}px, ${i[1]}px)`;function Ds(i){return i.map(t=>N({observerIndex:void 0,visible:!1,isFold:!1},t))}function Jh(i){ae(i,"svelte-gk8s47",".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}")}function Ls(i,t,e){const n=i.slice();return n[30]=t[e],n}function Ss(i){let t,e;return t=new Xh({props:{itemLabel:i[30],hooks:i[0],anchorEnabled:i[2],onIconClick:i[6]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o[0]&2&&(s.itemLabel=n[30]),o[0]&1&&(s.hooks=n[0]),o[0]&4&&(s.anchorEnabled=n[2]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function zs(i,t){let e,n,o,s=t[30].visible&&Ss(t);return{key:i,first:null,c(){e=he(),s&&s.c(),n=he(),this.first=e},m(r,a){T(r,e,a),s&&s.m(r,a),T(r,n,a),o=!0},p(r,a){t=r,t[30].visible?s?(s.p(t,a),a[0]&2&&k(s,1)):(s=Ss(t),s.c(),k(s,1),s.m(n.parentNode,n)):s&&(le(),M(s,1,1,()=>{s=null}),ce())},i(r){o||(k(s),o=!0)},o(r){M(s),o=!1},d(r){r&&z(e),s&&s.d(r),r&&z(n)}}}function Zh(i){let t,e=[],n=new Map,o,s,r=i[1];const a=l=>l[30].id;for(let l=0;l<r.length;l+=1){let c=Ls(i,r,l),u=a(c);n.set(u,e[l]=zs(u,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","item-labels-container svelte-gk8s47"),xe(()=>i[12].call(t)),H(t,"opacity",i[5]?1:0)},m(l,c){T(l,t,c);for(let u=0;u<e.length;u+=1)e[u].m(t,null);o=bt(t,i[12].bind(t)),s=!0},p(l,c){c[0]&71&&(r=l[1],le(),e=Ue(e,c,a,1,l,r,n,t,at,zs,null,Ls),ce()),c[0]&32&&H(t,"opacity",l[5]?1:0)},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)M(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}let _h=11;function qh(i,t,e){const{Raycaster:n,Vector3:o}=E;let{five:s}=t,{modelOcclusionEnable:r}=t,{itemLabels:a}=t,{hooks:l}=t,{displayStrategyType:c}=t,{maxVisibleDistance:u}=t,f=null,d=null,p=(s==null?void 0:s.currentMode)===be.Five.Mode.Panorama,m,g,A=[],v=!0;const C=(R,W)=>{const Y=R.camera.position.clone(),ne=new o(W.modelPosition[0],W.modelPosition[1],W.modelPosition[2]),X=ne.distanceTo(Y);return u!==void 0&&R.state.mode===be.Five.Mode.Panorama&&X>u?!1:ks(R,ne.clone().sub(Y).normalize(),Y,X)},w=R=>{const{camera:W,model:Y}=s,{x:ne,y:X,z:V}=R.clone().project(W),ue=(ne+1)/2,de=(2-(X+1))/2,De=Math.abs(V)<1&&[ue,de].every(Re=>Re<1&&Re>=0);return Boolean(De)},x=(R,W)=>{const Y=new o(W.modelPosition[0],W.modelPosition[1],W.modelPosition[2]),ne=R.project2d(Y),X=ne==null?void 0:ne.x,V=ne==null?void 0:ne.y;return[X,V]},D=(R,W)=>{const Y=W.map(X=>{if(R.state.panoIndex!==X.panoIndex)return fe(N({},X),{visible:!1});const V=x(R,X);X.name.length*_h;const ue=Uh(X.modelPosition[1],c),de=R.currentMode===be.Five.Mode.Panorama?w(new o(X.position[0],X.position[1],X.position[2])):!0,me=r?C(R,X):!1,Ce=de&&!me;if(!Ce)return fe(N({},X),{visible:Ce});A.push(V);const De=Vh(V);return fe(N({},X),{visible:Ce,transform:De,strokeLength:ue})}),ne=Y.filter(({visible:X})=>X).map(X=>({itemLabelItem:X,distance:new o(X.modelPosition[0],X.modelPosition[1],X.modelPosition[2]).clone().distanceTo(R.camera.position)})).sort((X,V)=>X.distance-V.distance);return Y.map(X=>{const V=ne.findIndex(ue=>ue.itemLabelItem.id===X.id);return V!==void 0?fe(N({},X),{zIndex:V*10}):X})},y=()=>{A=[],e(1,d=D(s,d))},L=()=>{e(5,v=!1),P()},P=ja(()=>{e(5,v=!0),y()},300),j=()=>{s.once("renderFrame",y)},B=()=>{window.addEventListener("resize",j,!1)},G=()=>{f!==a&&(e(1,d=Ds(a)),f=a,y())},U=(R,W)=>{let Y=[];for(let X=0;X<W.length;X++){const{position:V,panoIndex:ue}=W[X],de=R.distanceTo(V);(u===void 0||de<=u||s.state.mode!==be.Five.Mode.Panorama)&&Y.push({panoIndex:ue,obVector:V,distance:de})}Y=Y.sort((X,V)=>X.distance-V.distance);let ne;for(let X=0;X<Y.length;X++){const{obVector:V,distance:ue,panoIndex:de}=Y[X];if(!ks(s,R,V,ue)){ne=de;break}}return typeof ne=="number"?W[ne]:void 0},I=R=>{if(s.state.mode===be.Five.Mode.Panorama)return;const W=s.work.observers,Y=new o().fromArray(R.position),ne=U(Y,W);if(ne&&(R.observerIndex=ne.panoIndex),typeof R.observerIndex=="number"){const X=W[R.observerIndex],V=Y.clone().sub(X.position).normalize(),ue={longitude:Math.PI+Math.atan2(V.x,V.z),latitude:Math.acos(V.y/V.length())-Math.PI/2};s.setState(fe(N({},ue),{mode:be.Five.Mode.Panorama,panoIndex:R.observerIndex})),s.once("initAnimationEnded",()=>{e(1,d=d.map(de=>fe(N({},de),{isFold:de.id!==R.id}))),s.once("cameraUpdate",()=>{e(1,d=d.map(de=>fe(N({},de),{isFold:!1})))})})}};_i(()=>{G()}),Ye(()=>{e(1,d=Ds(a)),f=a,y(),B(),s.on("cameraUpdate",L)}),yt(()=>{s.off("cameraUpdate",L),window.removeEventListener("resize",j,!1)});function S(){m=this.clientWidth,g=this.clientHeight,e(3,m),e(4,g)}return i.$$set=R=>{"five"in R&&e(7,s=R.five),"modelOcclusionEnable"in R&&e(8,r=R.modelOcclusionEnable),"itemLabels"in R&&e(9,a=R.itemLabels),"hooks"in R&&e(0,l=R.hooks),"displayStrategyType"in R&&e(10,c=R.displayStrategyType),"maxVisibleDistance"in R&&e(11,u=R.maxVisibleDistance)},[l,d,p,m,g,v,I,s,r,a,c,u,S]}class Kh extends oe{constructor(t){super(),ie(this,t,qh,Zh,te,{five:7,modelOcclusionEnable:8,itemLabels:9,hooks:0,displayStrategyType:10,maxVisibleDistance:11},Jh,[-1,-1])}}function $h(i){return i.item_labels.map(t=>fe(N({},t),{modelPosition:[t.position[0],t.position[1],t.position[2]],observerIndex:void 0}))}const em=void 0,tm=(i,t)=>{var d,p,m,g;const e={container:document.createElement("div"),data:null,enabled:!0,fiveModeEnabled:!0,itemLabels:[],wrapper:null,app:void 0,hooks:new be.Subscribe,modelOcclusionEnable:(d=t==null?void 0:t.modelOcclusionEnable)!=null?d:!0,onlyVisibleInPanorama:(p=t==null?void 0:t.onlyVisibleInPanorama)!=null?p:!0,displayStrategyType:(m=t==null?void 0:t.displayStrategyType)!=null?m:zt.SMALL,maxVisibleDistance:(g=t==null?void 0:t.maxVisibleDistance)!=null?g:em};e.container.setAttribute("class","item-label-plugin-container"),e.container.style.cssText=`
|
|
524
524
|
position: absolute;
|
|
525
525
|
left: 0;
|
|
526
526
|
top: 0;
|
|
527
527
|
width: 100%;
|
|
528
528
|
height: 100%;
|
|
529
529
|
z-index: 5;
|
|
530
|
-
`,e.container.style.pointerEvents="none";const n=A=>(e.wrapper=A,A.appendChild(e.container),l(),!0),o=A=>{e.itemLabels=$h(A),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{u(),e.container.remove()},l=()=>{var A;if(!!e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(A=e.app)==null||A.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new Kh({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,onlyVisibleInPanorama:e.onlyVisibleInPanorama,itemLabels:e.itemLabels,wrapper:e.wrapper,hooks:e.hooks,displayStrategyType:e.displayStrategyType,maxVisibleDistance:e.maxVisibleDistance}})}},c=()=>{i.on("modeChange",f),i.once("dispose",a)},u=()=>{i.off("modeChange",f)},f=A=>{if(A!==be.Five.Mode.Panorama){e.fiveModeEnabled=!1,r();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=!0,s()})};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},nm={name:"ItemLabelPlugin",version:0};class im extends ai{constructor(e){super(e);h(this,"state");h(this,"container");h(this,"enabled");this.five=e,this.five.once("dispose",this.dispose),this.enabled=!0,this.state=this.initState()}enable(e){this.enabled=!0,this.updateState(fe(N({},e),{userAction:!0}))}disable(e){this.enabled=!1,this.updateState(fe(N({},e),{userAction:!0}))}show(e){if(!!this.state.enabled)return this.setState(fe(N({},this.state),{visible:!0}),e),Promise.resolve()}hide(e){if(!!this.state.enabled)return this.setState(fe(N({},this.state),{visible:!1}),e),Promise.resolve()}dispose(){this.container.remove()}setState(e,n){if(!this.enabled)return;const o=N({},this.state);this.state=N(N(N({},this.state),e),n),this.stateChangedCallback(o,n)}get visible(){return this.five.state.mode===be.Five.Mode.Panorama}appendTo(e){!this.enabled||(this.container=e,this.render())}updateState(e){this.setState(fe(N({},this.state),{enabled:this.enabled,visible:this.visible}),e)}}function om(i){ae(i,"svelte-wpy7pz",'.plugin-DoorLabelPlugin-item.svelte-wpy7pz.svelte-wpy7pz{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-wpy7pz.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/DoorLabel-icon.de1304ae.svg") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/arrow.6e8ec00e.svg") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}')}function sm(i){let t,e,n,o,s,r,a,l;return{c(){t=Q("div"),e=Q("div"),n=Q("span"),n.textContent=`${i[8]}`,o=Z(),s=Q("i"),b(n,"class","plugin-DoorLabelPlugin-txt svelte-wpy7pz"),b(s,"class","plugin-DoorLabelPlugin-icon svelte-wpy7pz"),b(e,"class",r=je(Ze.default("plugin-DoorLabelPlugin-cnt",i[0].toward))+" svelte-wpy7pz"),b(e,"style",`transform: ${i[6]||"initial"};pointer-events: ${i[5]?"auto":"none"};opacity: ${i[5]?1:0}`),b(e,"data-camera-toward",i[7]),b(t,"style",`left: ${i[3]||0}%;top: ${i[4]||0}%;opacity: ${i[5]?1:0}`),b(t,"class","plugin-DoorLabelPlugin-item svelte-wpy7pz")},m(c,u){T(c,t,u),O(t,e),O(e,n),O(e,o),O(e,s),i[10](t),a||(l=Pe(e,"click",i[9]),a=!0)},p(c,[u]){u&1&&r!==(r=je(Ze.default("plugin-DoorLabelPlugin-cnt",c[0].toward))+" svelte-wpy7pz")&&b(e,"class",r)},i:ee,o:ee,d(c){c&&z(t),i[10](null),a=!1,l()}}}function rm(i,t,e){let{props:n}=t,{onClick:o}=t,s,{left:r,top:a,inSight:l,transform:c,panoIndex:u,cameraToward:f,name:d}=n,p=0;const m=()=>{if(!r||!a||!l||!s)return;const v=s.current.clientWidth/window.innerWidth*100,C=s.current.clientHeight/window.innerHeight*100;if(r<=v/2||r>=100-v/2||a<=C/2||a>=100-C/2)return;u!==p&&(console.log("panoDoorLabelPlugin",u,"\u89E6\u53D1\u57CB\u70B9"),p=u)},g=v=>{o&&o()};function A(v){Me[v?"unshift":"push"](()=>{s=v,e(2,s)})}return i.$$set=v=>{"props"in v&&e(0,n=v.props),"onClick"in v&&e(1,o=v.onClick)},m(),[n,o,s,r,a,l,c,f,d,g,A]}class am extends oe{constructor(t){super(),ie(this,t,rm,sm,te,{props:0,onClick:1},om)}}function lm(i,t){const e=Math.abs(i.top+i.height/2-t.top-t.height/2),n=Math.abs(i.left+i.width/2-t.left-t.width/2),o=(i.height+t.height)/2,s=(i.width+t.width)/2;return!(e>o&&n>s)}function cm(i){const{camera:t}=i,e=t.getWorldDirection(new F.Vector3);let n=Math.atan(e.z/e.x)*180/Math.PI,o="";return e.x<0&&(n+=180),n<0&&(n+=360),n>315||n<=45?o="right":n>45&&n<=135?o="back":n>135&&n<=225?o="left":n>225&&n<=315&&(o="forward"),o}function um(i,t){return Math.sqrt(Math.pow(i.z-t.z,2)+Math.pow(i.x-t.x,2))}function dm(i){const t=Math.PI/4;return i>-t&&i<=t?"left":i>t*3||i<=-t*3?"right":i>-t*3&&i<=-t?"forward":i>t&&i<=t*3?"back":""}const fm={userAction:!0};class hm extends im{constructor(e){super(e);h(this,"MinVisibledistance",1.8);h(this,"MaxVisibledistance",5);h(this,"OffsetHeight",-1.3);h(this,"rooms");h(this,"floorplanServerData");h(this,"doorLabelItems");h(this,"visibleLabelMap",new Map);h(this,"labelItems",[]);h(this,"doorLabels");h(this,"roomObservers");h(this,"loadData",(e,n)=>{n&&(this.MaxVisibledistance=n.MaxVisibledistance,this.MinVisibledistance=n.MinVisibledistance,this.OffsetHeight=n.OffsetHeight),this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(o=>{o.$destroy()}),this.labelItems=[],this.doorLabels=[],this.doorLabelItems=[],this.floorplanServerData=e,typeof this.five.ready=="function"?this.five.ready().then(()=>this.initData()):this.five.once("panoArrived",()=>{this.initData()})});h(this,"initRoomObservers",()=>{var s,r;const e=this.floorplanServerData.computed_data.floor_datas||[],o=(((r=(s=this.five)==null?void 0:s.work)==null?void 0:r.observers)||[]).map(a=>{const l=a.panoIndex,c=a.floorIndex,u=e==null?void 0:e.find(f=>f.floor_index===c);if(u){const f=u.rooms.find(d=>d.observer_indexs.includes(l));if(f)return{panoIndex:l,floorIndex:c,name:f.name}}}).filter(Boolean);this.roomObservers=o});h(this,"hideAllLabels",()=>{this.labelItems.forEach(e=>{e.visible=!1,e.inSight=!1}),this.render()});h(this,"fixDoorVisibleAndPosition",()=>{this.initRoomObservers();const{panoIndex:e}=this.five;if(!this.visible||this.five.model.empty||e===null||!this.roomObservers.find(a=>a.panoIndex===e))return;const n=this.roomObservers.find(a=>a.panoIndex===e),s=this.five.work.observers.find(a=>a.panoIndex===e).position.clone(),r=(()=>{if(this.visibleLabelMap.has(e))return this.visibleLabelMap.get(e);{const a=[];return this.doorLabels.forEach((l,c)=>{if(l.roomName===n.name)return;const u=l.position.clone(),f=u.distanceTo(s);if(f<this.MinVisibledistance||f>this.MaxVisibledistance)return;const d=new F.Raycaster,p=u.clone().sub(s).normalize();d.set(s,p);const[m]=this.five.model.intersectRaycaster(d);m&&m.distance+.1<f||a.push(c)}),this.visibleLabelMap.set(e,a),a}})();this.labelItems.forEach((a,l)=>{a.visible=r.includes(l)}),this.fixDoorPosition()});h(this,"fixDoorPosition",()=>{var u,f,d,p,m,g,A,v,C,w,x,D;const{panoIndex:e,camera:n}=this.five;if(e===null)return;if(this.five.currentMode!=="Panorama")return this.hideAllLabels();const o=this.five.getElement(),s=o.clientWidth,r=o.clientHeight,a=n.getWorldDirection(new F.Vector3),l=[],c=[...this.labelItems];if(c.forEach((y,L)=>{if(y.visible){const P=n.position.distanceTo(y.position),j=y.position.clone().add(new F.Vector3(0,this.OffsetHeight,0)),G=j.clone().sub(n.position).normalize().angleTo(a),U=j.clone().project(n),I=(U.x+1)/2.2*100,S=(-U.y+1)/2.2*100,R=I>=0&&I<=100&&S>=0&&S<=100&&P>this.MinVisibledistance&&P<=this.MaxVisibledistance;y.left=I,y.top=S,y.inSight=R&&G<Math.PI/2,y.cameraToward=cm(this.five),R?l.push({disFromCameraToLabel:P,left:I,top:S,index:L}):y.transform="translate(-50%, -50%)"}else y.inSight=!1}),l.length>1){let y=0;l.sort((L,P)=>P.disFromCameraToLabel-L.disFromCameraToLabel);for(let L=1;L<l.length;L++){const{index:P,left:j,top:B}=l[L-1],{index:G,left:U,top:I}=l[L],S=this.container.children[P],R=this.container.children[G];if(!S||!R)return;const W={left:s*j/100,top:r*B/100,width:(d=(f=(u=S.children)==null?void 0:u[0])==null?void 0:f.clientWidth)!=null?d:0,height:(g=(m=(p=S.children)==null?void 0:p[0])==null?void 0:m.clientHeight)!=null?g:0},Y={left:s*U/100,top:r*I/100,width:(C=(v=(A=R.children)==null?void 0:A[0])==null?void 0:v.clientWidth)!=null?C:0,height:(D=(x=(w=R.children)==null?void 0:w[0])==null?void 0:x.clientHeight)!=null?D:0};lm(W,Y)&&(y++,c[P].transform=`translate(-50%, ${(y-1)*100-50}%)`,c[G].transform=`translate(-50%, ${y*100-50}%)`)}}this.labelItems=c,this.render()});h(this,"onClick",(e,n)=>{if(!this.roomObservers)return;const{work:o}=this.five;let s,r,a=1/0;for(const l of o.observers)if(this.roomObservers.find(u=>u.panoIndex===l.panoIndex&&u.name===e)){const u=l.standingPosition,f=n.distanceTo(u);f<a&&(s=l.panoIndex,r=u.clone().sub(n).normalize(),a=f)}if(r!==null&&s!==null){const l={};if(a>0){const u=new F.Vector3(0,0,-1),f=r.clone(),d=new F.Quaternion;d.setFromUnitVectors(u,f);const p=new F.Euler;p.setFromQuaternion(d,"YXZ"),l.longitude=p.y}this.five.emit("wantsToMoveToPano",s,{},!0)||this.five.moveToPano(s,{longitude:l.longitude})}});h(this,"initData",()=>{var s;this.doorLabels=[];const e=this.five.panoIndex,n=this.floorplanServerData.computed_data.observers[e].floor_index,o=n!==void 0&&((s=this.floorplanServerData.computed_data.floor_datas[n])==null?void 0:s.rooms);this.rooms=o,this.rooms&&this.rooms.length>0&&this.rooms.forEach(r=>{var c;const a=(c=this.floorplanServerData.computed_data.doors)==null?void 0:c.filter(u=>!!(u&&u.name===r.name)),l=this.five.work.observers.filter((u,f)=>!!r.observer_indexs.find(d=>d===f));a&&a.forEach(u=>{const f=u.position;let d=1/0,p;l.forEach(g=>{const A=g.standingPosition,v={x:A.x,y:A.y,z:A.z},C=um(f,v);C<d&&(d=C,p=v)}),p&&(f.y=p.y+.01);const m=new F.Vector3(f.x,f.y,f.z);m.add(new F.Vector3(-.2,1.8,0).applyEuler(new F.Euler(0,u.rad,0))),this.doorLabels.push({roomName:r.name,name:u.name,position:m,toward:dm(u.rad)})})}),this.labelItems=this.doorLabels.map(r=>fe(N({},r),{left:0,top:0,visible:!1,inSight:!1,transform:"",cameraToward:""})),this.five.on("wantsToMoveToPano",this.hideAllLabels),this.five.on("modelLoaded",this.fixDoorVisibleAndPosition),this.five.on("panoArrived",this.fixDoorVisibleAndPosition),this.five.on("initAnimationEnded",this.fixDoorPosition),this.five.on("cameraUpdate",this.fixDoorPosition),this.five.on("mouseWheel",this.fixDoorPosition),this.five.on("pinchGesture",this.fixDoorPosition),this.fixDoorVisibleAndPosition()})}stateChangedCallback(e,n){if(this.hooks.hasListener("stateChange")){const o={state:this.state,prevState:e,userAction:n?n.userAction:fm.userAction};this.hooks.emit("stateChange",o)}}render(){if(!this.enabled){this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(e=>{e==null||e.$destroy()}),this.doorLabels=void 0;return}this.doorLabelItems&&this.doorLabelItems.forEach(e=>{e.$destroy()}),this.doorLabelItems=[],this.labelItems.forEach(e=>{this.doorLabelItems.push(new am({target:this.container,props:{props:e,onClick:()=>{this.onClick(e.name,e.position)}}}))})}initState(){return{enabled:!0,visible:!0}}dispose(){this.five&&(this.five.off("wantsToMoveToPano",this.hideAllLabels),this.five.off("modelLoaded",this.fixDoorVisibleAndPosition),this.five.off("panoArrived",this.fixDoorVisibleAndPosition),this.five.off("initAnimationEnded",this.fixDoorPosition),this.five.off("cameraUpdate",this.fixDoorPosition),this.five.off("mouseWheel",this.fixDoorPosition),this.five.off("pinchGesture",this.fixDoorPosition),super.dispose())}}const mm=i=>new hm(i),pm=2,gm=3,Am=3,vm=2;function bm(i,t){var r,a,l;if(i.length<2)return console.warn("positionList length must be greater than 1"),[];const e=(r=t==null?void 0:t.unitWidth)!=null?r:.5,n=(a=t==null?void 0:t.unitHeight)!=null?a:.5,o=(l=t==null?void 0:t.skipPanoIndexMesh)!=null?l:!1,s=new E.CatmullRomCurve3(i,!1,"catmullrom",1);if(o){const c=Math.ceil(s.getLength()/n*1.5),u=s.getPoints(c),f=[];let d=0;const p=i;return p.forEach((m,g)=>{let A=0,v=99999999;u.forEach((y,L)=>{const P=y.distanceTo(m);P<v&&(A=L,v=P)});const C=u[A+1],w=C==null?void 0:C.distanceTo(m),x=u[A-1],D=x==null?void 0:x.distanceTo(m);if(A>d&&A-d>1){let y=A;x!==void 0&&D>.8&&(y=A+1),x!==void 0&&D>.2&&D<.3?y=A:v>.2&&v<.3&&(y=A+1);let L=d;if(C!==void 0&&w>.2&&w<.3?L=d+1:v>.2&&v<.3&&(L=d),u[L]&&u[L+1]){const B=p[g-1];if(B)if(B.equals(u[L]))L+=1;else{const G=new F.Vector3().subVectors(u[L+1],u[L]),U=new F.Vector3().subVectors(B,u[L]);G.angleTo(U)<Math.PI/2&&(L+=1)}}if(y<L||y-L<=1)return;const P=u.slice(L,y),j=Ms(P,e,n);f.push(j),d=A}}),f}else{const c=Math.ceil(s.getLength()),u=s.getPoints(c);return[Ms(u,e,n)]}}function Ms(i,t,e){const n=t/2,o=e/t,s=i.length,r=bl.default(i.map(v=>[v.x,v.z])),l=(i.length-1)*pm*gm,c=2*s,u=c*Am,f=c*vm,d=new Uint32Array(l),p=new Float32Array(u),m=new Float32Array(f);i.forEach((v,C)=>{});let g=0;for(let v=0;v<i.length;v++){const[C,w]=r[v][0],x=i[v],{x:D,y,z:L}=x,P=new F.Vector3(D+C*n,y+.05,L+w*n);p[v*6+0]=P.x,p[v*6+1]=P.y,p[v*6+2]=P.z;const j=new F.Vector3(D-C*n,y+.05,L-w*n);p[v*6+3]=j.x,p[v*6+4]=j.y,p[v*6+5]=j.z,g+=v>0?i[v-1].clone().sub(i[v]).length():0;const B=g/t/o;m[v*4+0]=0,m[v*4+1]=B,m[v*4+2]=1,m[v*4+3]=B,v!==i.length-1&&(d[v*6+0]=v*2+0,d[v*6+1]=v*2+2,d[v*6+2]=v*2+1,d[v*6+3]=v*2+2,d[v*6+4]=v*2+3,d[v*6+5]=v*2+1)}const A=new E.BufferGeometry;return A.setAttribute("position",new E.BufferAttribute(p,3)),A.setAttribute("uv",new E.BufferAttribute(m,2)),A.setIndex(new E.BufferAttribute(d,1)),A}function ym(i){const t=new E.TextureLoader().load(i.textureUrl);return t.wrapS=t.wrapT=E.RepeatWrapping,t.encoding=E.sRGBEncoding,new E.MeshBasicMaterial({color:16777215,map:t,transparent:!0,opacity:.8})}function wm(i){return!Bt(i)}function Bt(i){return i!=null}const Qa="v1.0.1",Ra="GuideLinePlugin",Fi=`${Ra}@${Qa}`,Ts=i=>`${Fi}--${i}`;class Oa extends Ht{constructor(e,n){super(e,n);h(this,"state",{visible:!1,enabled:!0,disposed:!1});h(this,"data");h(this,"linesGroup");h(this,"disposedErrorLog",()=>{console.error(`${Fi} is disposed`)});h(this,"actionWhenEnabled",e=>{if(this.state.enabled)return e()});Object.assign(window,{[`__${Ra}_DEBUG__`]:this})}load(e,n,o=!0){return J(this,null,function*(){const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.hooks.emit("dataChange",r,s),this.data=r,this.linesGroup&&this.five.scene.remove(this.linesGroup);const a=this.getLinesGroup(r.routes);!a||(this.linesGroup=a,yield this.waitFiveModelLoaded(),this.five.scene.add(a),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),n&&this.setState(n),this.five.needsRender=!0,this.hooks.emit("dataLoaded",r),console.log(`${Fi} loaded`,r))})}formatData(e){return J(this,null,function*(){return typeof e=="object"&&e!==null&&e.version&&e.data?e.data:e})}show(e){return J(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return J(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return this.disposedErrorLog();const o=N({},this.state);this.state=N(N({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),qe(o,this.state,{deep:!0})||(this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0}),this.five.needsRender=!0)}handleEnable(e,n=!0){this.linesGroup&&(e?(this.five.scene.add(this.linesGroup),this.actionWhenEnabled(()=>this.hooks.emit("enable",{userAction:n}))):(this.five.scene.remove(this.linesGroup),this.hooks.emit("disable",{userAction:n})))}handleVisible(e,n=!0){this.linesGroup&&(e?(this.linesGroup.visible=!0,this.actionWhenEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.linesGroup.visible=!1,this.actionWhenEnabled(()=>this.hooks.emit("hide",{userAction:n}))))}handleDispose(){this.linesGroup&&this.five.scene.add(this.linesGroup)}getLinesGroup(e){const n=e.map(this.getLine.bind(this)).filter(Bt),o=new E.Group;if(o.name=Ts("route-group"),n.length!==0)return o.add(...n),o}getLine(e){var a,l,c,u;const n=new E.Group,o=e.panoIndexList.map(f=>{var d;return(d=this.five.work.observers[f])==null?void 0:d.standingPosition}).filter(Bt),s=bm(o,{skipPanoIndexMesh:(a=e.skipPanoIndexMesh)!=null?a:!0,unitWidth:(l=e.unitWidth)!=null?l:.6,unitHeight:(c=e.unitHeight)!=null?c:.4});if(!s)return;const r=ym({textureUrl:(u=e.arrowTextureUrl)!=null?u:this.staticPrefix+"/release/web/arrow6.b6ce0c62.png"});return s.forEach(f=>{const d=new E.Mesh(f,r);d.name=Ts("route-line-mesh"),n.add(d)}),n}waitFiveModelLoaded(){return J(this,null,function*(){return new Promise(e=>{if(this.five.model.loaded){e();return}this.five.once("modelLoaded",()=>{e()})})})}}h(Oa,"lasestVersion",Qa);const Ha=(i,t)=>new Oa(i,t);function Bs(i){const t=Math.abs(Math.cos(i.latitude));return new E.Vector3(-Math.sin(i.longitude)*t,-Math.sin(i.latitude),-Math.cos(i.longitude)*t)}function Cm(i,t){const e=Bs(i),n=Bs(t);return e.angleTo(n)}const Em=i=>J(exports,null,function*(){try{i().then(()=>{},()=>{}).catch(()=>{})}catch(t){}}),zn=Math.PI*2;function Pm(i){return i>=0&&i<zn?i:(i%zn+zn)%zn}function Im(i){return{longitude:Pm(-Math.atan2(i.x,-i.z)),latitude:-Math.asin(i.y/1)}}function xm(i,t,e,n){const o=-i/e,s=i;return o*n+s}function km(i){return new Promise(t=>{setTimeout(()=>{t()},i)})}const Fa="v1.0.6",Ga="CruisePlugin",di=`${Ga}@${Fa}`,js=()=>{console.error(`${di} is disposed`)},Dm=()=>{console.warn(`${di} is disabled`)},Lm=()=>{console.error(`${di} is disabled`)},Pi=new Map;class lo extends Ht{constructor(e,n){super(e,n);h(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1,config:{speedConfig:{rotateSpeed:.001,rotateSpeedUnit:"rad/ms",moveSpeed:.002,moveSpeedUnit:"m/ms"}}});h(this,"data");h(this,"config");h(this,"privateState",{playing:!1,currentPlayQueue:[],currentPlayKeyframe:null,broke:!1,disposers:[],modeChanging:!1});h(this,"GuideLine");this.config=n,Object.assign(window,{[`__${Ga}_DEBUG__`]:this});const o=this.setFiveLinearUpdateCamera.bind(this),s=this.setFiveOriginUpdateCamera.bind(this);this.hooks.on("play",o),this.hooks.on("broke",s),this.hooks.on("end",s),this.hooks.on("pause",s),this.privateState.disposers.push(()=>{this.hooks.off("play",o),this.hooks.off("broke",s),this.hooks.off("end",s),this.hooks.off("pause",s)})}load(e,n,o){return J(this,null,function*(){var u,f,d,p,m;if(this.state.disposed)return js();this.privateState.fiveOriginGetProgress||(f=(u=this.five.controller)==null?void 0:u.cameraMotion)!=null&&f.getProgress||(yield this.waitFiveLoaded(),this.privateState.fiveOriginGetProgress=(p=(d=this.five.controller)==null?void 0:d.cameraMotion)==null?void 0:p.getProgress),this.clear();const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.data=r,this.hooks.emit("dataChange",r,s);let a=[],l;const c=this.data.keyframes.filter(g=>g.data.panoIndex!==void 0);c.filter((g,A)=>{var v;return g.data.panoIndex!==((v=c[A-1])==null?void 0:v.data.panoIndex)}).map(g=>g.data.panoIndex).forEach(g=>{var v,C;const A=(v=this.five.work.observers[g])==null?void 0:v.floorIndex;if(A!==void 0)if(l===A){const w=a.length-1;a[w]=[...(C=a[w])!=null?C:[],g]}else{l=A;const w=a.length;a[w]=[g]}}),this.GuideLine||(this.GuideLine=Ha(this.five,this.config)),(m=this.GuideLine)==null||m.load({routes:a.map(g=>({panoIndexList:g}))}),this.setState({playing:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing),this.changeSpeed(this.state.speed),n&&this.setState(n,{userAction:o}),console.log(`${di} loaded`,r),this.hooks.emit("dataLoaded",r)})}play(e){this.setState({playing:!0},e)}playFrom(e){const{index:n,id:o,userAction:s}=e;this.state.playing&&this.setState({playing:!1},{userAction:s}),this.setState({playing:!0},{userAction:s,playFromIndex:n,playFromId:o})}playFromStart(e){return this.playFrom(fe(N({},e),{index:0}))}pause(e){this.setState({playing:!1},e)}show(e){return J(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return J(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return js();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return Lm();const o=N({},this.state);this.state=N(N({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),e.playing!==void 0&&e.playing!==o.playing&&this.changePlayState(e.playing,n),e.speed!==void 0&&e.speed!==o.speed&&this.changeSpeed(e.speed,n==null?void 0:n.userAction),qe(o,this.state,{deep:!0})||this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0})}formatData(e){return J(this,null,function*(){this.five.work||(yield this.waitFiveLoaded());const n=this.five.work.observers,o=(()=>{const s=e;return typeof s=="object"&&s!==null&&s.version&&s.data?s.data:s})();if(o.keyframes)return{keyframesId:He(),keyframes:o.keyframes.map((s,r)=>{var c;const a=o.keyframes[r+1],l=(()=>!a||a.start===void 0||s.end===void 0?0:a.start-s.end)();return N({id:(c=s.uuid)!=null?c:He(),moveIndex:r,stay:l,index:r},s)})};if(o.panoIndexList){let s=[];const{moveEffect:r,moveToFirstPanoEffect:a}=o;return this.privateState.moveToFirstPanoEffect=a,o.panoIndexList.forEach((l,c)=>{const u=(()=>{var g,A,v,C;const f=o.panoIndexList.slice(c).find(w=>w!==l);if(f===void 0)return;const d=(g=n[l])==null?void 0:g.position,p=(A=n[f])==null?void 0:A.position;if(!p||!d||((v=n[l])==null?void 0:v.floorIndex)!==((C=n[f])==null?void 0:C.floorIndex))return;const m=new E.Vector3().subVectors(p,d);return Im(m)})();o.moveType===void 0||o.moveType==="justMove"?s.push({moveIndex:c,stay:o.stay,data:N({effect:"Move",panoIndex:l,moveEffect:r},u!=null?u:{})}):o.moveType==="moveAndRotate"&&(s.push({moveIndex:c,stay:o.stay,data:{effect:"Move",panoIndex:l,moveEffect:r}}),u&&s.push({moveIndex:c,stay:o.stay,data:N({effect:"Rotate",panoIndex:l},u)}))}),{keyframesId:He(),keyframes:s.map((l,c)=>N({id:He(),index:c},l))}}else throw new Error("format error: data no keyframes or no panoIndexList")})}handleEnable(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.enable(),this.hooks.emit("enable",{userAction:n})):((s=this.GuideLine)==null||s.disable(),this.changePlayState(!1,{userAction:n}),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.show(),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):((s=this.GuideLine)==null||s.hide(),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}changePlayState(e,n){this.actionIfStateIsEnabled(()=>{var o;return this.hooks.emit("playStateChange",e?"playing":"pause",{userAction:(o=n==null?void 0:n.userAction)!=null?o:!0})}),e?this.handlePlay(n):this.handlePause(n),this.state.playing=e}handlePlay(e){return J(this,null,function*(){var p;const{data:n,state:o,privateState:s,hooks:r}=this;if(s.playing||!(n!=null&&n.keyframes)||(n==null?void 0:n.keyframes.length)===0)return;const a=He();s.playId=a,s.playing=!0,s.broke=!1;const l=n.keyframes,c=this.getPauseData();(e==null?void 0:e.notEmitEvent)!==!0&&r.emit("play",{userAction:(p=e==null?void 0:e.userAction)!=null?p:!0});let u=!1;const d=yield(()=>J(this,null,function*(){var m,g;if((e==null?void 0:e.playFromIndex)!==void 0)return e.playFromIndex;if((e==null?void 0:e.playFromId)!==void 0)return(m=this.data)==null?void 0:m.keyframes.findIndex(A=>A.id===e.playFromId);if(c!=null&&c.keyframeId){const A=(g=this.data)==null?void 0:g.keyframes.find(v=>v.id===c.keyframeId);if(c!=null&&c.fiveState&&(yield this.move(c.fiveState,{moveEffect:s.moveToFirstPanoEffect})),A){if(A.data.effect==="Move")return A.index;if(A.data.effect==="Rotate"){const v=c.duration!==void 0?c.duration*(1-c.playedProgress):void 0;return yield this.playKeyframe(A,{duration:v}),u=!0,A.index+1}}}}))();this.clearPauseData();for(const m of l){if(s.broke||!o.playing||!s.playing||a!==s.playId)return;if(!(d!==void 0&&m.index<d))try{r.emit("playIndexChange",m.index,m),yield this.playKeyframe(m,{moveEffect:u===!1?s.moveToFirstPanoEffect:void 0,duration:800}),m.stay&&(yield km(m.stay)),u===!1&&(u=!0)}catch(g){return Promise.resolve("broke")}}o.playing&&a===s.playId&&(this.setState({playing:!1},{userAction:!1}),r.emit("end"),this.clearPauseData())})}handlePause(e){var r;const{state:n,privateState:o,hooks:s}=this;n.playing=!1,o.playing!==!1&&(o.playing=!1,this.setPauseData(),o.broke||this.forceInteruptUpdateCamera(),(e==null?void 0:e.notEmitEvent)!==!0&&s.emit("pause",{userAction:(r=e==null?void 0:e.userAction)!=null?r:!0}))}playKeyframe(e,n){return J(this,null,function*(){var s;const{privateState:o}=this;return((s=this.privateState.currentPlayKeyframe)==null?void 0:s.keyframe.id)!==e.id&&(this.privateState.currentPlayKeyframe={keyframe:e}),o.currentPlayQueue.push(this.getPlayPromise(e,n)),this.actionPromiseQueue()})}addInterruptListener(e){const n=()=>{this.privateState.modeChanging||e()},o=e;return this.five.once("gesture",o),this.five.once("wantsChangeMode",n),()=>{this.five.off("gesture",o),this.five.once("wantsChangeMode",n)}}getPlayPromise(e,n){return J(this,null,function*(){var s;const o=e.data;if((s=n==null?void 0:n.duration)!=null||e.start!==void 0&&e.end!==void 0&&e.end-e.start,!!o)return new Promise((r,a)=>{let l=!1;this.addInterruptListener(()=>{if(!l)return this.hooks.emit("broke"),this.privateState.broke=!0,this.setState({playing:!1}),l=!0,a(new Error("play is interupted"))});try{if(l)return;const c=()=>{r(),l=!0};switch(o.effect){case"Move":this.move(o,n).then(c);break;case"Rotate":this.rotate(o,n).then(c);break;default:this.rotate(o,n).then(c)}}catch(c){}})})}actionPromiseQueue(){return J(this,null,function*(){const{privateState:e}=this;return new Promise((n,o)=>{if(e.currentPlayQueue.length===0){n();return}const s=e.currentPlayQueue.shift();if(!s){n();return}s.then(n,o)}).then(()=>e.currentPlayQueue.length===0?Promise.resolve():this.actionPromiseQueue())})}move(e,n){return J(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode(e);else if(e.panoIndex!==this.five.panoIndex)yield this.changePano(e,n);else return Promise.resolve()})}rotate(e,n){return J(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode({mode:e.mode,panoIndex:e.panoIndex});else if(e.panoIndex&&e.panoIndex!==this.five.panoIndex)return yield this.changePano(e,n);yield this.updateCamera(e,n==null?void 0:n.duration)})}updateCamera(e,n=800){return J(this,null,function*(){const{five:o,privateState:s,state:r}=this;let a=n;const l=(()=>{var d,p;const u=(d=r.config)==null?void 0:d.speedConfig,f=(p=e.rotateSpeed)!=null?p:u==null?void 0:u.rotateSpeed;if((u==null?void 0:u.rotateSpeedUnit)===void 0)return f;if(f!==void 0)return u.rotateSpeedUnit==="rad/ms"?f:f/1e3})();if(l){const u=this.five.getCurrentState();a=Cm(u,e)/l}s.currentPlayKeyframe&&(s.currentPlayKeyframe.originDuration=a);const c=this.getSpeededDuration(a);return new Promise(u=>{Em(()=>o.updateCamera(e,c)),setTimeout(()=>u(),c)})})}changePano(e,n){return J(this,null,function*(){var f;const{five:o,privateState:s,state:r}=this;if(typeof e.panoIndex!="number"||e.panoIndex===o.panoIndex)return;o.getCurrentState().mode;const a=o.getCurrentState().mode!=="Panorama";a&&(this.privateState.modeChanging=!0);let l=(f=n==null?void 0:n.duration)!=null?f:800;const c=(()=>{var m,g;const d=(m=r.config)==null?void 0:m.speedConfig,p=(g=e.moveSpeed)!=null?g:d==null?void 0:d.moveSpeed;if((d==null?void 0:d.moveSpeedUnit)===void 0)return p;if(p!==void 0)return d.moveSpeedUnit==="m/ms"?p:p/1e3})();if(c&&typeof o.panoIndex=="number"&&typeof e.panoIndex=="number"){const d=o.work.observers[o.panoIndex].position,p=o.work.observers[e.panoIndex].position;l=d.distanceTo(p)/c}s.currentPlayKeyframe&&(s.currentPlayKeyframe.originDuration=l);const u=this.getSpeededDuration(l);yield new Promise(d=>{var p,m,g;o.moveToPano(e.panoIndex,{latitude:e.latitude,longitude:e.longitude,fov:e.fov,duration:u,effect:(g=(m=n==null?void 0:n.moveEffect)!=null?m:(p=this.state.config)==null?void 0:p.moveEffect)!=null?g:e.moveEffect,moveCancelCallback:()=>d(),moveEndCallback:()=>d()}),a&&o.once("panoArrived",()=>d())}),a&&(this.privateState.modeChanging=!1)})}changeSpeed(e,n=!0){const{state:o,privateState:s,hooks:r}=this,{currentPlayKeyframe:a}=s;if(r.emit("speedChange",e,{userAction:n}),o.playing&&a)try{const l=a.originDuration!==void 0?a.originDuration*(1-this.getProgress()):void 0,c=this.playKeyframe(a.keyframe,{duration:l});s.currentPlayQueue.push(c)}catch(l){}}getSpeededDuration(e){return e/this.state.speed}getProgress(){return this.five.controller.cameraMotion.progress}changeMode(e,n){return J(this,null,function*(){e.mode&&e.mode!==this.five.currentMode&&(this.privateState.modeChanging=!0,yield this.five.changeMode(e.mode,e,n),this.privateState.modeChanging=!1)})}forceInteruptUpdateCamera(){this.five.updateCamera({},0)}getPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return Pi.get((n=this.data)==null?void 0:n.keyframesId)}setPauseData(){var e,n,o,s;if((e=this.data)!=null&&e.keyframesId)return Pi.set((n=this.data)==null?void 0:n.keyframesId,{keyframeId:(o=this.privateState.currentPlayKeyframe)==null?void 0:o.keyframe.id,fiveState:this.five.getCurrentState(),duration:(s=this.privateState.currentPlayKeyframe)==null?void 0:s.originDuration,playedProgress:this.getProgress()})}clearPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return Pi.delete((n=this.data)==null?void 0:n.keyframesId)}clear(){this.clearPauseData(),this.privateState.currentPlayKeyframe=null}handleDispose(){var e,n;this.setState({playing:!1}),this.clearPauseData(),this.clear(),(e=this.GuideLine)==null||e.dispose(),this.GuideLine=void 0,(n=this.privateState.disposers)==null||n.forEach(o=>o==null?void 0:o())}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&Dm()}waitFiveLoaded(){return J(this,null,function*(){return new Promise(e=>{if(this.five.work){e();return}this.five.once("loaded",()=>{e()})})})}setFiveLinearUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=e=>{const n=this.five.controller.cameraMotion,o=e-n.startTime;return o<0?0:o>=n.duration?1:1-xm(1,n.startVelocity,n.duration,o)})}setFiveOriginUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=this.privateState.fiveOriginGetProgress)}}h(lo,"PluginVersion",Fa);const Sm=i=>new lo(i);function zm(i,t){t.forEach(e=>{const n=new E.SphereGeometry(.02,16,16),o=[],s=[new E.MeshBasicMaterial({color:16776960}),new E.MeshBasicMaterial({color:16711935}),new E.MeshBasicMaterial({color:16711680}),new E.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new E.Mesh(n,l);c.position.copy(st(r)),o.push(c)});else{const r=s[0],a=new E.Mesh(n,r);a.position.copy(st(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const Se=i=>i;function Na(i){if(i.length<3)return;const t=i.map(fn),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}function Mn(i){if(Array.isArray(i)&&i.length===4){const t=i.map(fn);return Wr(t[0],t[2])}else return fn(i)}function Tn(i,t){if(i===void 0)return;const{min:e,max:n}=t!=null?t:{};if(!(e===void 0&&n===void 0))return!(typeof n=="number"&&n<i||typeof e=="number"&&e>i)}function Mm(i,t){i.model.loaded?t():i.once("modelLoaded",()=>t())}function Tm(i,t,e){const o=new E.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new E.Vector3(0,1,0)).setLength(.01),r=new E.Vector3(0,.01,0);return[t.clone().sub(s).sub(r),t.clone().add(s).sub(r),t.clone().add(s).add(r),t.clone().sub(s).add(r)].map(l=>o.projectPoint(l,new E.Vector3))}const Qs=(i,t=1e3/60)=>{let e=null;const n=i;return(...s)=>{e&&clearTimeout(e),e=setTimeout(()=>{n==null||n(...s),e&&clearTimeout(e),e=null},t)}};function Bm(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function jm(i,t){const[e,n]=t;if(e>=n||n<=1||e<=1)return-1;const o={},s=r=>(o[r]||(o[r]=i(r)),o[r]);for(let r=e;r<n;r++){const a=s(r),l=s(r-1);if(a<l)return r}return-1}function Rs(i,t){if(!t||typeof ResizeObserver=="undefined"||!ResizeObserver)return{observe:()=>window.addEventListener("resize",i),unobserve:()=>window.removeEventListener("resize",i)};{const e=new ResizeObserver(i);return{observe:()=>e.observe(t),unobserve:()=>e.unobserve(t)}}}var Xe=(i=>(i.Two="2D",i.Three="3D",i))(Xe||{}),Ge=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(Ge||{}),We=(i=>(i.Audio="Audio",i.Text="Text",i.ImageText="ImageText",i.Link="Link",i.Marketing="Marketing",i.MediaPlane="MediaPlane",i.Custom="Custom",i))(We||{}),ei=(i=>(i.VrLink="vr",i.NormalLink="normal",i))(ei||{});function Qm(i){ae(i,"svelte-1omzoh4",".straight-line.svelte-1omzoh4{display:block;width:100%;height:100%;overflow:visible}")}function Os(i){let t,e,n,o;return{c(){t=Ae("path"),b(t,"fill","none"),b(t,"stroke","url(#"+i[4]+")"),b(t,"stroke-width","1"),b(t,"d","M0 0.5 L 148 0.5")},m(s,r){T(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&xe(()=>{n&&n.end(1),e=Ot(t,qn,{duration:i[1],delay:i[0]}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=$t(t,qn,{duration:i[1],delay:i[2]})),o=!1},d(s){s&&z(t),s&&n&&n.end()}}}function Rm(i){let t,e,n,o,s,r=i[3]&&Os(i);return{c(){t=Ae("svg"),e=Ae("defs"),n=Ae("linearGradient"),o=Ae("stop"),s=Ae("stop"),r&&r.c(),b(o,"offset","25%"),b(o,"stop-color","white"),b(o,"stop-opacity","1"),b(s,"offset","100%"),b(s,"stop-color","white"),b(s,"stop-opacity","0.5"),b(n,"id",i[4]),b(n,"gradientUnits","userSpaceOnUse"),b(t,"class","straight-line svelte-1omzoh4"),b(t,"viewBox","0 0 148 1"),b(t,"preserveAspectRatio","none")},m(a,l){T(a,t,l),O(t,e),O(e,n),O(n,o),O(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&k(r,1)):(r=Os(a),r.c(),k(r,1),r.m(t,null)):r&&(le(),M(r,1,1,()=>{r=null}),ce())},i(a){k(r)},o(a){M(r)},d(a){a&&z(t),r&&r.d()}}}function Om(i,t,e){let{inDelay:n=0}=t,{duration:o=0}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=He();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class Wa extends oe{constructor(t){super(),ie(this,t,Om,Rm,te,{inDelay:0,duration:1,outDelay:2,unfolded:3},Qm)}}function Hm(i){ae(i,"svelte-faoauy",".shadow.svelte-faoauy{position:absolute}")}function Hs(i){let t,e,n,o,s;return{c(){t=Q("div"),b(t,"class","shadow svelte-faoauy"),b(t,"style",e=`
|
|
530
|
+
`,e.container.style.pointerEvents="none";const n=A=>(e.wrapper=A,A.appendChild(e.container),l(),!0),o=A=>{e.itemLabels=$h(A),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{u(),e.container.remove()},l=()=>{var A;if(!!e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(A=e.app)==null||A.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new Kh({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,onlyVisibleInPanorama:e.onlyVisibleInPanorama,itemLabels:e.itemLabels,wrapper:e.wrapper,hooks:e.hooks,displayStrategyType:e.displayStrategyType,maxVisibleDistance:e.maxVisibleDistance}})}},c=()=>{i.on("modeChange",f),i.once("dispose",a)},u=()=>{i.off("modeChange",f)},f=A=>{if(A!==be.Five.Mode.Panorama){e.fiveModeEnabled=!1,r();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=!0,s()})};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},nm={name:"ItemLabelPlugin",version:0};class im extends ai{constructor(e){super(e);h(this,"state");h(this,"container");h(this,"enabled");this.five=e,this.five.once("dispose",this.dispose),this.enabled=!0,this.state=this.initState()}enable(e){this.enabled=!0,this.updateState(fe(N({},e),{userAction:!0}))}disable(e){this.enabled=!1,this.updateState(fe(N({},e),{userAction:!0}))}show(e){if(!!this.state.enabled)return this.setState(fe(N({},this.state),{visible:!0}),e),Promise.resolve()}hide(e){if(!!this.state.enabled)return this.setState(fe(N({},this.state),{visible:!1}),e),Promise.resolve()}dispose(){this.container.remove()}setState(e,n){if(!this.enabled)return;const o=N({},this.state);this.state=N(N(N({},this.state),e),n),this.stateChangedCallback(o,n)}get visible(){return this.five.state.mode===be.Five.Mode.Panorama}appendTo(e){!this.enabled||(this.container=e,this.render())}updateState(e){this.setState(fe(N({},this.state),{enabled:this.enabled,visible:this.visible}),e)}}function om(i){ae(i,"svelte-wpy7pz",'.plugin-DoorLabelPlugin-item.svelte-wpy7pz.svelte-wpy7pz{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-wpy7pz.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/DoorLabel-icon.de1304ae.svg") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/arrow.6e8ec00e.svg") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}')}function sm(i){let t,e,n,o,s,r,a,l;return{c(){t=Q("div"),e=Q("div"),n=Q("span"),n.textContent=`${i[8]}`,o=Z(),s=Q("i"),b(n,"class","plugin-DoorLabelPlugin-txt svelte-wpy7pz"),b(s,"class","plugin-DoorLabelPlugin-icon svelte-wpy7pz"),b(e,"class",r=je(Ze.default("plugin-DoorLabelPlugin-cnt",i[0].toward))+" svelte-wpy7pz"),b(e,"style",`transform: ${i[6]||"initial"};pointer-events: ${i[5]?"auto":"none"};opacity: ${i[5]?1:0}`),b(e,"data-camera-toward",i[7]),b(t,"style",`left: ${i[3]||0}%;top: ${i[4]||0}%;opacity: ${i[5]?1:0}`),b(t,"class","plugin-DoorLabelPlugin-item svelte-wpy7pz")},m(c,u){T(c,t,u),O(t,e),O(e,n),O(e,o),O(e,s),i[10](t),a||(l=Pe(e,"click",i[9]),a=!0)},p(c,[u]){u&1&&r!==(r=je(Ze.default("plugin-DoorLabelPlugin-cnt",c[0].toward))+" svelte-wpy7pz")&&b(e,"class",r)},i:ee,o:ee,d(c){c&&z(t),i[10](null),a=!1,l()}}}function rm(i,t,e){let{props:n}=t,{onClick:o}=t,s,{left:r,top:a,inSight:l,transform:c,panoIndex:u,cameraToward:f,name:d}=n,p=0;const m=()=>{if(!r||!a||!l||!s)return;const v=s.current.clientWidth/window.innerWidth*100,C=s.current.clientHeight/window.innerHeight*100;if(r<=v/2||r>=100-v/2||a<=C/2||a>=100-C/2)return;u!==p&&(console.log("panoDoorLabelPlugin",u,"\u89E6\u53D1\u57CB\u70B9"),p=u)},g=v=>{o&&o()};function A(v){Me[v?"unshift":"push"](()=>{s=v,e(2,s)})}return i.$$set=v=>{"props"in v&&e(0,n=v.props),"onClick"in v&&e(1,o=v.onClick)},m(),[n,o,s,r,a,l,c,f,d,g,A]}class am extends oe{constructor(t){super(),ie(this,t,rm,sm,te,{props:0,onClick:1},om)}}function lm(i,t){const e=Math.abs(i.top+i.height/2-t.top-t.height/2),n=Math.abs(i.left+i.width/2-t.left-t.width/2),o=(i.height+t.height)/2,s=(i.width+t.width)/2;return!(e>o&&n>s)}function cm(i){const{camera:t}=i,e=t.getWorldDirection(new F.Vector3);let n=Math.atan(e.z/e.x)*180/Math.PI,o="";return e.x<0&&(n+=180),n<0&&(n+=360),n>315||n<=45?o="right":n>45&&n<=135?o="back":n>135&&n<=225?o="left":n>225&&n<=315&&(o="forward"),o}function um(i,t){return Math.sqrt(Math.pow(i.z-t.z,2)+Math.pow(i.x-t.x,2))}function dm(i){const t=Math.PI/4;return i>-t&&i<=t?"left":i>t*3||i<=-t*3?"right":i>-t*3&&i<=-t?"forward":i>t&&i<=t*3?"back":""}const fm={userAction:!0};class hm extends im{constructor(e){super(e);h(this,"MinVisibledistance",1.8);h(this,"MaxVisibledistance",5);h(this,"OffsetHeight",-1.3);h(this,"rooms");h(this,"floorplanServerData");h(this,"doorLabelItems");h(this,"visibleLabelMap",new Map);h(this,"labelItems",[]);h(this,"doorLabels");h(this,"roomObservers");h(this,"loadData",(e,n)=>{n&&(this.MaxVisibledistance=n.MaxVisibledistance,this.MinVisibledistance=n.MinVisibledistance,this.OffsetHeight=n.OffsetHeight),this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(o=>{o.$destroy()}),this.labelItems=[],this.doorLabels=[],this.doorLabelItems=[],this.floorplanServerData=e,typeof this.five.ready=="function"?this.five.ready().then(()=>this.initData()):this.five.once("panoArrived",()=>{this.initData()})});h(this,"initRoomObservers",()=>{var s,r;const e=this.floorplanServerData.computed_data.floor_datas||[],o=(((r=(s=this.five)==null?void 0:s.work)==null?void 0:r.observers)||[]).map(a=>{const l=a.panoIndex,c=a.floorIndex,u=e==null?void 0:e.find(f=>f.floor_index===c);if(u){const f=u.rooms.find(d=>d.observer_indexs.includes(l));if(f)return{panoIndex:l,floorIndex:c,name:f.name}}}).filter(Boolean);this.roomObservers=o});h(this,"hideAllLabels",()=>{this.labelItems.forEach(e=>{e.visible=!1,e.inSight=!1}),this.render()});h(this,"fixDoorVisibleAndPosition",()=>{this.initRoomObservers();const{panoIndex:e}=this.five;if(!this.visible||this.five.model.empty||e===null||!this.roomObservers.find(a=>a.panoIndex===e))return;const n=this.roomObservers.find(a=>a.panoIndex===e),s=this.five.work.observers.find(a=>a.panoIndex===e).position.clone(),r=(()=>{if(this.visibleLabelMap.has(e))return this.visibleLabelMap.get(e);{const a=[];return this.doorLabels.forEach((l,c)=>{if(l.roomName===n.name)return;const u=l.position.clone(),f=u.distanceTo(s);if(f<this.MinVisibledistance||f>this.MaxVisibledistance)return;const d=new F.Raycaster,p=u.clone().sub(s).normalize();d.set(s,p);const[m]=this.five.model.intersectRaycaster(d);m&&m.distance+.1<f||a.push(c)}),this.visibleLabelMap.set(e,a),a}})();this.labelItems.forEach((a,l)=>{a.visible=r.includes(l)}),this.fixDoorPosition()});h(this,"fixDoorPosition",()=>{var u,f,d,p,m,g,A,v,C,w,x,D;const{panoIndex:e,camera:n}=this.five;if(e===null)return;if(this.five.currentMode!=="Panorama")return this.hideAllLabels();const o=this.five.getElement(),s=o.clientWidth,r=o.clientHeight,a=n.getWorldDirection(new F.Vector3),l=[],c=[...this.labelItems];if(c.forEach((y,L)=>{if(y.visible){const P=n.position.distanceTo(y.position),j=y.position.clone().add(new F.Vector3(0,this.OffsetHeight,0)),G=j.clone().sub(n.position).normalize().angleTo(a),U=j.clone().project(n),I=(U.x+1)/2.2*100,S=(-U.y+1)/2.2*100,R=I>=0&&I<=100&&S>=0&&S<=100&&P>this.MinVisibledistance&&P<=this.MaxVisibledistance;y.left=I,y.top=S,y.inSight=R&&G<Math.PI/2,y.cameraToward=cm(this.five),R?l.push({disFromCameraToLabel:P,left:I,top:S,index:L}):y.transform="translate(-50%, -50%)"}else y.inSight=!1}),l.length>1){let y=0;l.sort((L,P)=>P.disFromCameraToLabel-L.disFromCameraToLabel);for(let L=1;L<l.length;L++){const{index:P,left:j,top:B}=l[L-1],{index:G,left:U,top:I}=l[L],S=this.container.children[P],R=this.container.children[G];if(!S||!R)return;const W={left:s*j/100,top:r*B/100,width:(d=(f=(u=S.children)==null?void 0:u[0])==null?void 0:f.clientWidth)!=null?d:0,height:(g=(m=(p=S.children)==null?void 0:p[0])==null?void 0:m.clientHeight)!=null?g:0},Y={left:s*U/100,top:r*I/100,width:(C=(v=(A=R.children)==null?void 0:A[0])==null?void 0:v.clientWidth)!=null?C:0,height:(D=(x=(w=R.children)==null?void 0:w[0])==null?void 0:x.clientHeight)!=null?D:0};lm(W,Y)&&(y++,c[P].transform=`translate(-50%, ${(y-1)*100-50}%)`,c[G].transform=`translate(-50%, ${y*100-50}%)`)}}this.labelItems=c,this.render()});h(this,"onClick",(e,n)=>{if(!this.roomObservers)return;const{work:o}=this.five;let s,r,a=1/0;for(const l of o.observers)if(this.roomObservers.find(u=>u.panoIndex===l.panoIndex&&u.name===e)){const u=l.standingPosition,f=n.distanceTo(u);f<a&&(s=l.panoIndex,r=u.clone().sub(n).normalize(),a=f)}if(r!==null&&s!==null){const l={};if(a>0){const u=new F.Vector3(0,0,-1),f=r.clone(),d=new F.Quaternion;d.setFromUnitVectors(u,f);const p=new F.Euler;p.setFromQuaternion(d,"YXZ"),l.longitude=p.y}this.five.emit("wantsToMoveToPano",s,{},!0)||this.five.moveToPano(s,{longitude:l.longitude})}});h(this,"initData",()=>{var s;this.doorLabels=[];const e=this.five.panoIndex,n=this.floorplanServerData.computed_data.observers[e].floor_index,o=n!==void 0&&((s=this.floorplanServerData.computed_data.floor_datas[n])==null?void 0:s.rooms);this.rooms=o,this.rooms&&this.rooms.length>0&&this.rooms.forEach(r=>{var c;const a=(c=this.floorplanServerData.computed_data.doors)==null?void 0:c.filter(u=>!!(u&&u.name===r.name)),l=this.five.work.observers.filter((u,f)=>!!r.observer_indexs.find(d=>d===f));a&&a.forEach(u=>{const f=u.position;let d=1/0,p;l.forEach(g=>{const A=g.standingPosition,v={x:A.x,y:A.y,z:A.z},C=um(f,v);C<d&&(d=C,p=v)}),p&&(f.y=p.y+.01);const m=new F.Vector3(f.x,f.y,f.z);m.add(new F.Vector3(-.2,1.8,0).applyEuler(new F.Euler(0,u.rad,0))),this.doorLabels.push({roomName:r.name,name:u.name,position:m,toward:dm(u.rad)})})}),this.labelItems=this.doorLabels.map(r=>fe(N({},r),{left:0,top:0,visible:!1,inSight:!1,transform:"",cameraToward:""})),this.five.on("wantsToMoveToPano",this.hideAllLabels),this.five.on("modelLoaded",this.fixDoorVisibleAndPosition),this.five.on("panoArrived",this.fixDoorVisibleAndPosition),this.five.on("initAnimationEnded",this.fixDoorPosition),this.five.on("cameraUpdate",this.fixDoorPosition),this.five.on("mouseWheel",this.fixDoorPosition),this.five.on("pinchGesture",this.fixDoorPosition),this.fixDoorVisibleAndPosition()})}stateChangedCallback(e,n){if(this.hooks.hasListener("stateChange")){const o={state:this.state,prevState:e,userAction:n?n.userAction:fm.userAction};this.hooks.emit("stateChange",o)}}render(){if(!this.enabled){this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(e=>{e==null||e.$destroy()}),this.doorLabels=void 0;return}this.doorLabelItems&&this.doorLabelItems.forEach(e=>{e.$destroy()}),this.doorLabelItems=[],this.labelItems.forEach(e=>{this.doorLabelItems.push(new am({target:this.container,props:{props:e,onClick:()=>{this.onClick(e.name,e.position)}}}))})}initState(){return{enabled:!0,visible:!0}}dispose(){this&&this.five&&(this.five.off("wantsToMoveToPano",this.hideAllLabels),this.five.off("modelLoaded",this.fixDoorVisibleAndPosition),this.five.off("panoArrived",this.fixDoorVisibleAndPosition),this.five.off("initAnimationEnded",this.fixDoorPosition),this.five.off("cameraUpdate",this.fixDoorPosition),this.five.off("mouseWheel",this.fixDoorPosition),this.five.off("pinchGesture",this.fixDoorPosition),super.dispose())}}const mm=i=>new hm(i),pm=2,gm=3,Am=3,vm=2;function bm(i,t){var r,a,l;if(i.length<2)return console.warn("positionList length must be greater than 1"),[];const e=(r=t==null?void 0:t.unitWidth)!=null?r:.5,n=(a=t==null?void 0:t.unitHeight)!=null?a:.5,o=(l=t==null?void 0:t.skipPanoIndexMesh)!=null?l:!1,s=new E.CatmullRomCurve3(i,!1,"catmullrom",1);if(o){const c=Math.ceil(s.getLength()/n*1.5),u=s.getPoints(c),f=[];let d=0;const p=i;return p.forEach((m,g)=>{let A=0,v=99999999;u.forEach((y,L)=>{const P=y.distanceTo(m);P<v&&(A=L,v=P)});const C=u[A+1],w=C==null?void 0:C.distanceTo(m),x=u[A-1],D=x==null?void 0:x.distanceTo(m);if(A>d&&A-d>1){let y=A;x!==void 0&&D>.8&&(y=A+1),x!==void 0&&D>.2&&D<.3?y=A:v>.2&&v<.3&&(y=A+1);let L=d;if(C!==void 0&&w>.2&&w<.3?L=d+1:v>.2&&v<.3&&(L=d),u[L]&&u[L+1]){const B=p[g-1];if(B)if(B.equals(u[L]))L+=1;else{const G=new F.Vector3().subVectors(u[L+1],u[L]),U=new F.Vector3().subVectors(B,u[L]);G.angleTo(U)<Math.PI/2&&(L+=1)}}if(y<L||y-L<=1)return;const P=u.slice(L,y),j=Ms(P,e,n);f.push(j),d=A}}),f}else{const c=Math.ceil(s.getLength()),u=s.getPoints(c);return[Ms(u,e,n)]}}function Ms(i,t,e){const n=t/2,o=e/t,s=i.length,r=bl.default(i.map(v=>[v.x,v.z])),l=(i.length-1)*pm*gm,c=2*s,u=c*Am,f=c*vm,d=new Uint32Array(l),p=new Float32Array(u),m=new Float32Array(f);i.forEach((v,C)=>{});let g=0;for(let v=0;v<i.length;v++){const[C,w]=r[v][0],x=i[v],{x:D,y,z:L}=x,P=new F.Vector3(D+C*n,y+.05,L+w*n);p[v*6+0]=P.x,p[v*6+1]=P.y,p[v*6+2]=P.z;const j=new F.Vector3(D-C*n,y+.05,L-w*n);p[v*6+3]=j.x,p[v*6+4]=j.y,p[v*6+5]=j.z,g+=v>0?i[v-1].clone().sub(i[v]).length():0;const B=g/t/o;m[v*4+0]=0,m[v*4+1]=B,m[v*4+2]=1,m[v*4+3]=B,v!==i.length-1&&(d[v*6+0]=v*2+0,d[v*6+1]=v*2+2,d[v*6+2]=v*2+1,d[v*6+3]=v*2+2,d[v*6+4]=v*2+3,d[v*6+5]=v*2+1)}const A=new E.BufferGeometry;return A.setAttribute("position",new E.BufferAttribute(p,3)),A.setAttribute("uv",new E.BufferAttribute(m,2)),A.setIndex(new E.BufferAttribute(d,1)),A}function ym(i){const t=new E.TextureLoader().load(i.textureUrl);return t.wrapS=t.wrapT=E.RepeatWrapping,t.encoding=E.sRGBEncoding,new E.MeshBasicMaterial({color:16777215,map:t,transparent:!0,opacity:.8})}function wm(i){return!Bt(i)}function Bt(i){return i!=null}const Qa="v1.0.1",Ra="GuideLinePlugin",Fi=`${Ra}@${Qa}`,Ts=i=>`${Fi}--${i}`;class Oa extends Ht{constructor(e,n){super(e,n);h(this,"state",{visible:!1,enabled:!0,disposed:!1});h(this,"data");h(this,"linesGroup");h(this,"disposedErrorLog",()=>{console.error(`${Fi} is disposed`)});h(this,"actionWhenEnabled",e=>{if(this.state.enabled)return e()});Object.assign(window,{[`__${Ra}_DEBUG__`]:this})}load(e,n,o=!0){return J(this,null,function*(){const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.hooks.emit("dataChange",r,s),this.data=r,this.linesGroup&&this.five.scene.remove(this.linesGroup);const a=this.getLinesGroup(r.routes);!a||(this.linesGroup=a,yield this.waitFiveModelLoaded(),this.five.scene.add(a),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),n&&this.setState(n),this.five.needsRender=!0,this.hooks.emit("dataLoaded",r),console.log(`${Fi} loaded`,r))})}formatData(e){return J(this,null,function*(){return typeof e=="object"&&e!==null&&e.version&&e.data?e.data:e})}show(e){return J(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return J(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return this.disposedErrorLog();const o=N({},this.state);this.state=N(N({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),qe(o,this.state,{deep:!0})||(this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0}),this.five.needsRender=!0)}handleEnable(e,n=!0){this.linesGroup&&(e?(this.five.scene.add(this.linesGroup),this.actionWhenEnabled(()=>this.hooks.emit("enable",{userAction:n}))):(this.five.scene.remove(this.linesGroup),this.hooks.emit("disable",{userAction:n})))}handleVisible(e,n=!0){this.linesGroup&&(e?(this.linesGroup.visible=!0,this.actionWhenEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.linesGroup.visible=!1,this.actionWhenEnabled(()=>this.hooks.emit("hide",{userAction:n}))))}handleDispose(){this.linesGroup&&this.five.scene.add(this.linesGroup)}getLinesGroup(e){const n=e.map(this.getLine.bind(this)).filter(Bt),o=new E.Group;if(o.name=Ts("route-group"),n.length!==0)return o.add(...n),o}getLine(e){var a,l,c,u;const n=new E.Group,o=e.panoIndexList.map(f=>{var d;return(d=this.five.work.observers[f])==null?void 0:d.standingPosition}).filter(Bt),s=bm(o,{skipPanoIndexMesh:(a=e.skipPanoIndexMesh)!=null?a:!0,unitWidth:(l=e.unitWidth)!=null?l:.6,unitHeight:(c=e.unitHeight)!=null?c:.4});if(!s)return;const r=ym({textureUrl:(u=e.arrowTextureUrl)!=null?u:this.staticPrefix+"/release/web/arrow6.b6ce0c62.png"});return s.forEach(f=>{const d=new E.Mesh(f,r);d.name=Ts("route-line-mesh"),n.add(d)}),n}waitFiveModelLoaded(){return J(this,null,function*(){return new Promise(e=>{if(this.five.model.loaded){e();return}this.five.once("modelLoaded",()=>{e()})})})}}h(Oa,"lasestVersion",Qa);const Ha=(i,t)=>new Oa(i,t);function Bs(i){const t=Math.abs(Math.cos(i.latitude));return new E.Vector3(-Math.sin(i.longitude)*t,-Math.sin(i.latitude),-Math.cos(i.longitude)*t)}function Cm(i,t){const e=Bs(i),n=Bs(t);return e.angleTo(n)}const Em=i=>J(exports,null,function*(){try{i().then(()=>{},()=>{}).catch(()=>{})}catch(t){}}),zn=Math.PI*2;function Pm(i){return i>=0&&i<zn?i:(i%zn+zn)%zn}function Im(i){return{longitude:Pm(-Math.atan2(i.x,-i.z)),latitude:-Math.asin(i.y/1)}}function xm(i,t,e,n){const o=-i/e,s=i;return o*n+s}function km(i){return new Promise(t=>{setTimeout(()=>{t()},i)})}const Fa="v1.0.6",Ga="CruisePlugin",di=`${Ga}@${Fa}`,js=()=>{console.error(`${di} is disposed`)},Dm=()=>{console.warn(`${di} is disabled`)},Lm=()=>{console.error(`${di} is disabled`)},Pi=new Map;class lo extends Ht{constructor(e,n){super(e,n);h(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1,config:{speedConfig:{rotateSpeed:.001,rotateSpeedUnit:"rad/ms",moveSpeed:.002,moveSpeedUnit:"m/ms"}}});h(this,"data");h(this,"config");h(this,"privateState",{playing:!1,currentPlayQueue:[],currentPlayKeyframe:null,broke:!1,disposers:[],modeChanging:!1});h(this,"GuideLine");this.config=n,Object.assign(window,{[`__${Ga}_DEBUG__`]:this});const o=this.setFiveLinearUpdateCamera.bind(this),s=this.setFiveOriginUpdateCamera.bind(this);this.hooks.on("play",o),this.hooks.on("broke",s),this.hooks.on("end",s),this.hooks.on("pause",s),this.privateState.disposers.push(()=>{this.hooks.off("play",o),this.hooks.off("broke",s),this.hooks.off("end",s),this.hooks.off("pause",s)})}load(e,n,o){return J(this,null,function*(){var u,f,d,p,m;if(this.state.disposed)return js();this.privateState.fiveOriginGetProgress||(f=(u=this.five.controller)==null?void 0:u.cameraMotion)!=null&&f.getProgress||(yield this.waitFiveLoaded(),this.privateState.fiveOriginGetProgress=(p=(d=this.five.controller)==null?void 0:d.cameraMotion)==null?void 0:p.getProgress),this.clear();const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.data=r,this.hooks.emit("dataChange",r,s);let a=[],l;const c=this.data.keyframes.filter(g=>g.data.panoIndex!==void 0);c.filter((g,A)=>{var v;return g.data.panoIndex!==((v=c[A-1])==null?void 0:v.data.panoIndex)}).map(g=>g.data.panoIndex).forEach(g=>{var v,C;const A=(v=this.five.work.observers[g])==null?void 0:v.floorIndex;if(A!==void 0)if(l===A){const w=a.length-1;a[w]=[...(C=a[w])!=null?C:[],g]}else{l=A;const w=a.length;a[w]=[g]}}),this.GuideLine||(this.GuideLine=Ha(this.five,this.config)),(m=this.GuideLine)==null||m.load({routes:a.map(g=>({panoIndexList:g}))}),this.setState({playing:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing),this.changeSpeed(this.state.speed),n&&this.setState(n,{userAction:o}),console.log(`${di} loaded`,r),this.hooks.emit("dataLoaded",r)})}play(e){this.setState({playing:!0},e)}playFrom(e){const{index:n,id:o,userAction:s}=e;this.state.playing&&this.setState({playing:!1},{userAction:s}),this.setState({playing:!0},{userAction:s,playFromIndex:n,playFromId:o})}playFromStart(e){return this.playFrom(fe(N({},e),{index:0}))}pause(e){this.setState({playing:!1},e)}show(e){return J(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return J(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return js();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return Lm();const o=N({},this.state);this.state=N(N({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),e.playing!==void 0&&e.playing!==o.playing&&this.changePlayState(e.playing,n),e.speed!==void 0&&e.speed!==o.speed&&this.changeSpeed(e.speed,n==null?void 0:n.userAction),qe(o,this.state,{deep:!0})||this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0})}formatData(e){return J(this,null,function*(){this.five.work||(yield this.waitFiveLoaded());const n=this.five.work.observers,o=(()=>{const s=e;return typeof s=="object"&&s!==null&&s.version&&s.data?s.data:s})();if(o.keyframes)return{keyframesId:He(),keyframes:o.keyframes.map((s,r)=>{var c;const a=o.keyframes[r+1],l=(()=>!a||a.start===void 0||s.end===void 0?0:a.start-s.end)();return N({id:(c=s.uuid)!=null?c:He(),moveIndex:r,stay:l,index:r},s)})};if(o.panoIndexList){let s=[];const{moveEffect:r,moveToFirstPanoEffect:a}=o;return this.privateState.moveToFirstPanoEffect=a,o.panoIndexList.forEach((l,c)=>{const u=(()=>{var g,A,v,C;const f=o.panoIndexList.slice(c).find(w=>w!==l);if(f===void 0)return;const d=(g=n[l])==null?void 0:g.position,p=(A=n[f])==null?void 0:A.position;if(!p||!d||((v=n[l])==null?void 0:v.floorIndex)!==((C=n[f])==null?void 0:C.floorIndex))return;const m=new E.Vector3().subVectors(p,d);return Im(m)})();o.moveType===void 0||o.moveType==="justMove"?s.push({moveIndex:c,stay:o.stay,data:N({effect:"Move",panoIndex:l,moveEffect:r},u!=null?u:{})}):o.moveType==="moveAndRotate"&&(s.push({moveIndex:c,stay:o.stay,data:{effect:"Move",panoIndex:l,moveEffect:r}}),u&&s.push({moveIndex:c,stay:o.stay,data:N({effect:"Rotate",panoIndex:l},u)}))}),{keyframesId:He(),keyframes:s.map((l,c)=>N({id:He(),index:c},l))}}else throw new Error("format error: data no keyframes or no panoIndexList")})}handleEnable(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.enable(),this.hooks.emit("enable",{userAction:n})):((s=this.GuideLine)==null||s.disable(),this.changePlayState(!1,{userAction:n}),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.show(),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):((s=this.GuideLine)==null||s.hide(),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}changePlayState(e,n){this.actionIfStateIsEnabled(()=>{var o;return this.hooks.emit("playStateChange",e?"playing":"pause",{userAction:(o=n==null?void 0:n.userAction)!=null?o:!0})}),e?this.handlePlay(n):this.handlePause(n),this.state.playing=e}handlePlay(e){return J(this,null,function*(){var p;const{data:n,state:o,privateState:s,hooks:r}=this;if(s.playing||!(n!=null&&n.keyframes)||(n==null?void 0:n.keyframes.length)===0)return;const a=He();s.playId=a,s.playing=!0,s.broke=!1;const l=n.keyframes,c=this.getPauseData();(e==null?void 0:e.notEmitEvent)!==!0&&r.emit("play",{userAction:(p=e==null?void 0:e.userAction)!=null?p:!0});let u=!1;const d=yield(()=>J(this,null,function*(){var m,g;if((e==null?void 0:e.playFromIndex)!==void 0)return e.playFromIndex;if((e==null?void 0:e.playFromId)!==void 0)return(m=this.data)==null?void 0:m.keyframes.findIndex(A=>A.id===e.playFromId);if(c!=null&&c.keyframeId){const A=(g=this.data)==null?void 0:g.keyframes.find(v=>v.id===c.keyframeId);if(c!=null&&c.fiveState&&(yield this.move(c.fiveState,{moveEffect:s.moveToFirstPanoEffect})),A){if(A.data.effect==="Move")return A.index;if(A.data.effect==="Rotate"){const v=c.duration!==void 0?c.duration*(1-c.playedProgress):void 0;return yield this.playKeyframe(A,{duration:v}),u=!0,A.index+1}}}}))();this.clearPauseData();for(const m of l){if(s.broke||!o.playing||!s.playing||a!==s.playId)return;if(!(d!==void 0&&m.index<d))try{r.emit("playIndexChange",m.index,m),yield this.playKeyframe(m,{moveEffect:u===!1?s.moveToFirstPanoEffect:void 0,duration:800}),m.stay&&(yield km(m.stay)),u===!1&&(u=!0)}catch(g){return Promise.resolve("broke")}}o.playing&&a===s.playId&&(this.setState({playing:!1},{userAction:!1}),r.emit("end"),this.clearPauseData())})}handlePause(e){var r;const{state:n,privateState:o,hooks:s}=this;n.playing=!1,o.playing!==!1&&(o.playing=!1,this.setPauseData(),o.broke||this.forceInteruptUpdateCamera(),(e==null?void 0:e.notEmitEvent)!==!0&&s.emit("pause",{userAction:(r=e==null?void 0:e.userAction)!=null?r:!0}))}playKeyframe(e,n){return J(this,null,function*(){var s;const{privateState:o}=this;return((s=this.privateState.currentPlayKeyframe)==null?void 0:s.keyframe.id)!==e.id&&(this.privateState.currentPlayKeyframe={keyframe:e}),o.currentPlayQueue.push(this.getPlayPromise(e,n)),this.actionPromiseQueue()})}addInterruptListener(e){const n=()=>{this.privateState.modeChanging||e()},o=e;return this.five.once("gesture",o),this.five.once("wantsChangeMode",n),()=>{this.five.off("gesture",o),this.five.once("wantsChangeMode",n)}}getPlayPromise(e,n){return J(this,null,function*(){var s;const o=e.data;if((s=n==null?void 0:n.duration)!=null||e.start!==void 0&&e.end!==void 0&&e.end-e.start,!!o)return new Promise((r,a)=>{let l=!1;this.addInterruptListener(()=>{if(!l)return this.hooks.emit("broke"),this.privateState.broke=!0,this.setState({playing:!1}),l=!0,a(new Error("play is interupted"))});try{if(l)return;const c=()=>{r(),l=!0};switch(o.effect){case"Move":this.move(o,n).then(c);break;case"Rotate":this.rotate(o,n).then(c);break;default:this.rotate(o,n).then(c)}}catch(c){}})})}actionPromiseQueue(){return J(this,null,function*(){const{privateState:e}=this;return new Promise((n,o)=>{if(e.currentPlayQueue.length===0){n();return}const s=e.currentPlayQueue.shift();if(!s){n();return}s.then(n,o)}).then(()=>e.currentPlayQueue.length===0?Promise.resolve():this.actionPromiseQueue())})}move(e,n){return J(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode(e);else if(e.panoIndex!==this.five.panoIndex)yield this.changePano(e,n);else return Promise.resolve()})}rotate(e,n){return J(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode({mode:e.mode,panoIndex:e.panoIndex});else if(e.panoIndex&&e.panoIndex!==this.five.panoIndex)return yield this.changePano(e,n);yield this.updateCamera(e,n==null?void 0:n.duration)})}updateCamera(e,n=800){return J(this,null,function*(){const{five:o,privateState:s,state:r}=this;let a=n;const l=(()=>{var d,p;const u=(d=r.config)==null?void 0:d.speedConfig,f=(p=e.rotateSpeed)!=null?p:u==null?void 0:u.rotateSpeed;if((u==null?void 0:u.rotateSpeedUnit)===void 0)return f;if(f!==void 0)return u.rotateSpeedUnit==="rad/ms"?f:f/1e3})();if(l){const u=this.five.getCurrentState();a=Cm(u,e)/l}s.currentPlayKeyframe&&(s.currentPlayKeyframe.originDuration=a);const c=this.getSpeededDuration(a);return new Promise(u=>{Em(()=>o.updateCamera(e,c)),setTimeout(()=>u(),c)})})}changePano(e,n){return J(this,null,function*(){var f;const{five:o,privateState:s,state:r}=this;if(typeof e.panoIndex!="number"||e.panoIndex===o.panoIndex)return;o.getCurrentState().mode;const a=o.getCurrentState().mode!=="Panorama";a&&(this.privateState.modeChanging=!0);let l=(f=n==null?void 0:n.duration)!=null?f:800;const c=(()=>{var m,g;const d=(m=r.config)==null?void 0:m.speedConfig,p=(g=e.moveSpeed)!=null?g:d==null?void 0:d.moveSpeed;if((d==null?void 0:d.moveSpeedUnit)===void 0)return p;if(p!==void 0)return d.moveSpeedUnit==="m/ms"?p:p/1e3})();if(c&&typeof o.panoIndex=="number"&&typeof e.panoIndex=="number"){const d=o.work.observers[o.panoIndex].position,p=o.work.observers[e.panoIndex].position;l=d.distanceTo(p)/c}s.currentPlayKeyframe&&(s.currentPlayKeyframe.originDuration=l);const u=this.getSpeededDuration(l);yield new Promise(d=>{var p,m,g;o.moveToPano(e.panoIndex,{latitude:e.latitude,longitude:e.longitude,fov:e.fov,duration:u,effect:(g=(m=n==null?void 0:n.moveEffect)!=null?m:(p=this.state.config)==null?void 0:p.moveEffect)!=null?g:e.moveEffect,moveCancelCallback:()=>d(),moveEndCallback:()=>d()}),a&&o.once("panoArrived",()=>d())}),a&&(this.privateState.modeChanging=!1)})}changeSpeed(e,n=!0){const{state:o,privateState:s,hooks:r}=this,{currentPlayKeyframe:a}=s;if(r.emit("speedChange",e,{userAction:n}),o.playing&&a)try{const l=a.originDuration!==void 0?a.originDuration*(1-this.getProgress()):void 0,c=this.playKeyframe(a.keyframe,{duration:l});s.currentPlayQueue.push(c)}catch(l){}}getSpeededDuration(e){return e/this.state.speed}getProgress(){return this.five.controller.cameraMotion.progress}changeMode(e,n){return J(this,null,function*(){e.mode&&e.mode!==this.five.currentMode&&(this.privateState.modeChanging=!0,yield this.five.changeMode(e.mode,e,n),this.privateState.modeChanging=!1)})}forceInteruptUpdateCamera(){this.five.updateCamera({},0)}getPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return Pi.get((n=this.data)==null?void 0:n.keyframesId)}setPauseData(){var e,n,o,s;if((e=this.data)!=null&&e.keyframesId)return Pi.set((n=this.data)==null?void 0:n.keyframesId,{keyframeId:(o=this.privateState.currentPlayKeyframe)==null?void 0:o.keyframe.id,fiveState:this.five.getCurrentState(),duration:(s=this.privateState.currentPlayKeyframe)==null?void 0:s.originDuration,playedProgress:this.getProgress()})}clearPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return Pi.delete((n=this.data)==null?void 0:n.keyframesId)}clear(){this.clearPauseData(),this.privateState.currentPlayKeyframe=null}handleDispose(){var e,n;this.setState({playing:!1}),this.clearPauseData(),this.clear(),(e=this.GuideLine)==null||e.dispose(),this.GuideLine=void 0,(n=this.privateState.disposers)==null||n.forEach(o=>o==null?void 0:o())}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&Dm()}waitFiveLoaded(){return J(this,null,function*(){return new Promise(e=>{if(this.five.work){e();return}this.five.once("loaded",()=>{e()})})})}setFiveLinearUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=e=>{const n=this.five.controller.cameraMotion,o=e-n.startTime;return o<0?0:o>=n.duration?1:1-xm(1,n.startVelocity,n.duration,o)})}setFiveOriginUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=this.privateState.fiveOriginGetProgress)}}h(lo,"PluginVersion",Fa);const Sm=i=>new lo(i);function zm(i,t){t.forEach(e=>{const n=new E.SphereGeometry(.02,16,16),o=[],s=[new E.MeshBasicMaterial({color:16776960}),new E.MeshBasicMaterial({color:16711935}),new E.MeshBasicMaterial({color:16711680}),new E.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new E.Mesh(n,l);c.position.copy(st(r)),o.push(c)});else{const r=s[0],a=new E.Mesh(n,r);a.position.copy(st(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const Se=i=>i;function Na(i){if(i.length<3)return;const t=i.map(fn),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}function Mn(i){if(Array.isArray(i)&&i.length===4){const t=i.map(fn);return Wr(t[0],t[2])}else return fn(i)}function Tn(i,t){if(i===void 0)return;const{min:e,max:n}=t!=null?t:{};if(!(e===void 0&&n===void 0))return!(typeof n=="number"&&n<i||typeof e=="number"&&e>i)}function Mm(i,t){i.model.loaded?t():i.once("modelLoaded",()=>t())}function Tm(i,t,e){const o=new E.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new E.Vector3(0,1,0)).setLength(.01),r=new E.Vector3(0,.01,0);return[t.clone().sub(s).sub(r),t.clone().add(s).sub(r),t.clone().add(s).add(r),t.clone().sub(s).add(r)].map(l=>o.projectPoint(l,new E.Vector3))}const Qs=(i,t=1e3/60)=>{let e=null;const n=i;return(...s)=>{e&&clearTimeout(e),e=setTimeout(()=>{n==null||n(...s),e&&clearTimeout(e),e=null},t)}};function Bm(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function jm(i,t){const[e,n]=t;if(e>=n||n<=1||e<=1)return-1;const o={},s=r=>(o[r]||(o[r]=i(r)),o[r]);for(let r=e;r<n;r++){const a=s(r),l=s(r-1);if(a<l)return r}return-1}function Rs(i,t){if(!t||typeof ResizeObserver=="undefined"||!ResizeObserver)return{observe:()=>window.addEventListener("resize",i),unobserve:()=>window.removeEventListener("resize",i)};{const e=new ResizeObserver(i);return{observe:()=>e.observe(t),unobserve:()=>e.unobserve(t)}}}var Xe=(i=>(i.Two="2D",i.Three="3D",i))(Xe||{}),Ge=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(Ge||{}),We=(i=>(i.Audio="Audio",i.Text="Text",i.ImageText="ImageText",i.Link="Link",i.Marketing="Marketing",i.MediaPlane="MediaPlane",i.Custom="Custom",i))(We||{}),ei=(i=>(i.VrLink="vr",i.NormalLink="normal",i))(ei||{});function Qm(i){ae(i,"svelte-1omzoh4",".straight-line.svelte-1omzoh4{display:block;width:100%;height:100%;overflow:visible}")}function Os(i){let t,e,n,o;return{c(){t=Ae("path"),b(t,"fill","none"),b(t,"stroke","url(#"+i[4]+")"),b(t,"stroke-width","1"),b(t,"d","M0 0.5 L 148 0.5")},m(s,r){T(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&xe(()=>{n&&n.end(1),e=Ot(t,qn,{duration:i[1],delay:i[0]}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=$t(t,qn,{duration:i[1],delay:i[2]})),o=!1},d(s){s&&z(t),s&&n&&n.end()}}}function Rm(i){let t,e,n,o,s,r=i[3]&&Os(i);return{c(){t=Ae("svg"),e=Ae("defs"),n=Ae("linearGradient"),o=Ae("stop"),s=Ae("stop"),r&&r.c(),b(o,"offset","25%"),b(o,"stop-color","white"),b(o,"stop-opacity","1"),b(s,"offset","100%"),b(s,"stop-color","white"),b(s,"stop-opacity","0.5"),b(n,"id",i[4]),b(n,"gradientUnits","userSpaceOnUse"),b(t,"class","straight-line svelte-1omzoh4"),b(t,"viewBox","0 0 148 1"),b(t,"preserveAspectRatio","none")},m(a,l){T(a,t,l),O(t,e),O(e,n),O(n,o),O(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&k(r,1)):(r=Os(a),r.c(),k(r,1),r.m(t,null)):r&&(le(),M(r,1,1,()=>{r=null}),ce())},i(a){k(r)},o(a){M(r)},d(a){a&&z(t),r&&r.d()}}}function Om(i,t,e){let{inDelay:n=0}=t,{duration:o=0}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=He();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class Wa extends oe{constructor(t){super(),ie(this,t,Om,Rm,te,{inDelay:0,duration:1,outDelay:2,unfolded:3},Qm)}}function Hm(i){ae(i,"svelte-faoauy",".shadow.svelte-faoauy{position:absolute}")}function Hs(i){let t,e,n,o,s;return{c(){t=Q("div"),b(t,"class","shadow svelte-faoauy"),b(t,"style",e=`
|
|
531
531
|
left:${Ne(i[5])};
|
|
532
532
|
bottom:${Ne(i[6])};
|
|
533
533
|
box-shadow: 0 0 ${Ne(i[10])} ${Ne(i[11])} rgba(0, 0, 0, ${i[12]});
|
|
@@ -541,9 +541,9 @@ void main() {
|
|
|
541
541
|
${i[8]?"transform: translateX(-50%); left: 50%":""}
|
|
542
542
|
${i[9]?"transform: translateX(-50%); top: 50%":""}
|
|
543
543
|
${i[7]?"transform: translate(-50%, -50%); left: 50%; top: 50%;":""}
|
|
544
|
-
`))&&b(t,"style",e),a&8&&H(t,"width",Ne(i[3])),a&16&&H(t,"height",Ne(i[4])),a&8192&&H(t,"z-index",i[13])},i(r){s||(r&&xe(()=>{o&&o.end(1),n=Ot(t,Tt,{duration:i[0]}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=$t(t,Tt,{duration:i[1]})),s=!1},d(r){r&&z(t),r&&o&&o.end()}}}function Fm(i){let t,e=i[2]&&Hs(i);return{c(){e&&e.c(),t=he()},m(n,o){e&&e.m(n,o),T(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&k(e,1)):(e=Hs(n),e.c(),k(e,1),e.m(t.parentNode,t)):e&&(le(),M(e,1,1,()=>{e=null}),ce())},i(n){k(e)},o(n){M(e)},d(n){e&&e.d(n),n&&z(t)}}}function Ne(i){return typeof i=="number"?i/16+"rem":i}function Gm(i,t,e){let{inDelay:n=1e3}=t,{outDelay:o=1e3}=t,{visible:s=!0}=t,{width:r=0}=t,{height:a=0}=t,{left:l=0}=t,{bottom:c=0}=t,{center:u=!1}=t,{horizontalCenter:f=!1}=t,{verticalCenter:d=!1}=t,{blurRadius:p}=t,{spreadRadius:m}=t,{opacity:g=.15}=t,{zIndex:A=void 0}=t;return i.$$set=v=>{"inDelay"in v&&e(0,n=v.inDelay),"outDelay"in v&&e(1,o=v.outDelay),"visible"in v&&e(2,s=v.visible),"width"in v&&e(3,r=v.width),"height"in v&&e(4,a=v.height),"left"in v&&e(5,l=v.left),"bottom"in v&&e(6,c=v.bottom),"center"in v&&e(7,u=v.center),"horizontalCenter"in v&&e(8,f=v.horizontalCenter),"verticalCenter"in v&&e(9,d=v.verticalCenter),"blurRadius"in v&&e(10,p=v.blurRadius),"spreadRadius"in v&&e(11,m=v.spreadRadius),"opacity"in v&&e(12,g=v.opacity),"zIndex"in v&&e(13,A=v.zIndex)},[n,o,s,r,a,l,c,u,f,d,p,m,g,A]}class Ve extends oe{constructor(t){super(),ie(this,t,Gm,Fm,te,{inDelay:0,outDelay:1,visible:2,width:3,height:4,left:5,bottom:6,center:7,horizontalCenter:8,verticalCenter:9,blurRadius:10,spreadRadius:11,opacity:12,zIndex:13},Hm)}}function Nm(){return Math.random().toString(36).slice(-6)}const Fs=Nm();function Wm(i){ae(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function Gs(i,t,e){const n=i.slice();return n[10]=t[e],n[11]=t,n[12]=e,n}function Ns(i){let t,e=i[10]+"",n,o=i[12];const s=()=>i[6](t,o),r=()=>i[6](null,o);return{c(){t=Q("span"),n=ke(e),b(t,"class","text-char svelte-1b2n9wi")},m(a,l){T(a,t,l),O(t,n),s()},p(a,l){i=a,l&2&&e!==(e=i[10]+"")&&Te(n,e),o!==i[12]&&(r(),o=i[12],s())},d(a){a&&z(t),r()}}}function Xm(i){let t,e=i[1],n=[];for(let o=0;o<e.length;o+=1)n[o]=Ns(Gs(i,e,o));return{c(){for(let o=0;o<n.length;o+=1)n[o].c();t=he()},m(o,s){for(let r=0;r<n.length;r+=1)n[r].m(o,s);T(o,t,s)},p(o,[s]){if(s&3){e=o[1];let r;for(r=0;r<e.length;r+=1){const a=Gs(o,e,r);n[r]?n[r].p(a,s):(n[r]=Ns(a),n[r].c(),n[r].m(t.parentNode,t))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},i:ee,o:ee,d(o){tt(n,o),o&&z(t)}}}function Ym(i,t,e){let n,{inDelay:o=0}=t,{outDelay:s=0}=t,{content:r}=t,{unfolded:a}=t,l,c=[],u;function f(p){clearTimeout(l),l=setTimeout(function(){!u||(p&&u.reversed||!p&&!u.reversed)&&(u.reverse(),u.play())},p?o:s)}Ye(function(){const p=(()=>{const m=jm(g=>c[g].getBoundingClientRect().x,[Math.min(c.length-1,10),Math.min(c.length-1,30)]);if(m>0)return m})();u=Ao.default({targets:c.filter(Bt).slice(0,p),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:Ao.default.stagger(50),easing:"easeInOutCubic"}),a&&u.seek(u.duration)});function d(p,m){Me[p?"unshift":"push"](()=>{c[m]=p,e(0,c)})}return i.$$set=p=>{"inDelay"in p&&e(2,o=p.inDelay),"outDelay"in p&&e(3,s=p.outDelay),"content"in p&&e(4,r=p.content),"unfolded"in p&&e(5,a=p.unfolded)},i.$$.update=()=>{i.$$.dirty&16&&e(1,n=(()=>{const p=[],m=new RegExp(new RegExp("\\p{Regional_Indicator}\\p{Regional_Indicator}|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?(\\u200D\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?)+|\\p{Emoji_Presentation}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)","gu")),g=`__EMOJI_SPLIT_${Fs}__`,A=`__EMOJI_${Fs}__`;return r.slice().replace(m,v=>`${g}${A}${v}${g}`).split(g).forEach(v=>v.startsWith(A)?p.push(v.slice(A.length)):p.push(...v.split(""))),p.filter(Boolean)})()),i.$$.dirty&32&&f(a)},[c,n,o,s,r,a,d]}class Xa extends oe{constructor(t){super(),ie(this,t,Ym,Xm,te,{inDelay:2,outDelay:3,content:4,unfolded:5},Wm)}}const Um="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcUNSe2/Z9yISiSGxRkUAy4BGZSVX168gistraYsQKxArECsQKxApYqkDyU5lmsznMM+ZgAGpQhaUkSRbINgLJCXiCBtSgAkVYtGGIBTKj8AgKSVahDNvQa0IUkUG4Bx91BpLdBTOS/cgUIB3a+gMwI9mFzE3a0I3z5B4r292JzGVA8tSSZILMcUDyzIykthOZvYDk+V9Ktmz4yGzhOhV4/+5YU4N/hzqo0StX3Fg5TcnNlYvgs8bPsM4hkScHoyO46haRnGEYktQVI+4ypUYKyXtxyUu27JCceAMJvjo0HoM5CEZ7cPX7i013q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C4akfiEJAOZdFKzsq/nNjIssdufjbhQAEAUodOGDWp4m8S0oHEhb+YexGkD4EBUpdVMrfl/E/RhNJnsjF/ls0r980YRQDlAqBylIqylcCzf4lHecB5veigSfmYoBycaxN2SHgT8e7pWKZwCzqzZpigUr9DlRuoIxXn8pIZJgHtkwpa8togHIiw587LeNx9mc2ZwIK5DOlXJaMFqhWwoMp/Ax+1W+ToOXTHGKNrDMLLo38LmKsQKmbdSrWil+N82UJaS40YTuJv/RdtAdpzet+aJDzvMpQV71oo2gYX5RXG2HnYZXtouzNRzXE3R0KE6jWjZU2iaZ9u8pqpU3UfvwrYSgSBVDtGDurBlHn/zj0QMIh7qlDNOfmcBj9ihKo9o+l1euiWGxSE5eun3na6jxQk3joEgdQ7TR+FWutE43lhQpph3sQvISAVRa9ppRzipY4gZqdw8/WigIWDWt1gD8EIsqSLlT/KPUVlKSAujs2XTLYeRHiIlA2DVi1qkRtK8PSULaEDF+Ue7ashwkTlf8DQc/cITdx9+UAAAAASUVORK5CYII=";function Vm(i){ae(i,"svelte-1ogmlqq",".arrow.svelte-1ogmlqq{width:100%;height:100%;background-size:100%;transition:transform 400ms ease-in-out;cursor:pointer;pointer-events:auto}.arrow-wrapper.svelte-1ogmlqq{position:relative;width:100%;height:100%}.arrow.left.svelte-1ogmlqq{transform:rotate(0deg)}.arrow.right.svelte-1ogmlqq{transform:rotate(-180deg)}.arrow.top.svelte-1ogmlqq{transform:rotate(90deg)}.arrow.bottom.svelte-1ogmlqq{transform:rotate(-90deg)}")}function Ys(i){let t,e,n,o,s,r,a,l,c,u;return e=new Ve({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=Q("div"),$(e.$$.fragment),n=Z(),o=Q("div"),b(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),H(o,"background-image","url("+Um+")"),b(t,"class","arrow-wrapper svelte-1ogmlqq")},m(f,d){T(f,t,d),q(e,t,null),O(t,n),O(t,o),l=!0,c||(u=Pe(o,"click",i[5]),c=!0)},p(f,d){i=f,(!l||d&1&&s!==(s="arrow "+i[0]+" svelte-1ogmlqq"))&&b(o,"class",s)},i(f){l||(k(e.$$.fragment,f),f&&xe(()=>{a&&a.end(1),r=Ot(o,Tt,{duration:i[2],delay:i[3],easing:Zt}),r.start()}),l=!0)},o(f){M(e.$$.fragment,f),r&&r.invalidate(),f&&(a=$t(o,Tt,{duration:i[2],delay:i[4],easing:Zt})),l=!1},d(f){f&&z(t),K(e),f&&a&&a.end(),c=!1,u()}}}function Jm(i){let t,e,n=i[1]&&Ys(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Ys(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Zm(i,t,e){let{direction:n="right"}=t,{visible:o=!0}=t,{duration:s=0}=t,{inDelay:r=0}=t,{outDelay:a=0}=t;function l(c){nc.call(this,i,c)}return i.$$set=c=>{"direction"in c&&e(0,n=c.direction),"visible"in c&&e(1,o=c.visible),"duration"in c&&e(2,s=c.duration),"inDelay"in c&&e(3,r=c.inDelay),"outDelay"in c&&e(4,a=c.outDelay)},[n,o,s,r,a,l]}class _m extends oe{constructor(t){super(),ie(this,t,Zm,Jm,te,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},Vm)}}function qm(i,t,e=20,n=5){return new Promise((o,s)=>{let r=0;const a=setInterval(()=>{const l=i();t(l)?(clearInterval(a),o(l)):r>=n&&(clearInterval(a),s(l)),r++},e)})}function Km(i){ae(i,"svelte-1fuzm7v",".text.svelte-1fuzm7v{pointer-events:auto;box-sizing:border-box;display:inline-block;max-width:7.5rem;transition:transform 400ms ease-in-out;font-size:0.75rem;line-height:1.125rem;white-space:initial;cursor:pointer}.arrow.svelte-1fuzm7v{pointer-events:auto;display:inline-block;vertical-align:top;width:0.875rem;height:0.875rem;margin-left:0.125rem;margin-top:0.125rem}")}function Us(i,t,e){const n=i.slice();return n[11]=t[e].id,n[12]=t[e].content,n}function Vs(i,t){let e,n,o;return n=new Xa({props:{unfolded:t[0],content:t[12],inDelay:500,outDelay:t[5]}}),{key:i,first:null,c(){e=Q("div"),$(n.$$.fragment),b(e,"class","text svelte-1fuzm7v"),H(e,"transform",t[7]),this.first=e},m(s,r){T(s,e,r),q(n,e,null),t[10](e),o=!0},p(s,r){t=s;const a={};r&1&&(a.unfolded=t[0]),r&2&&(a.content=t[12]),r&32&&(a.outDelay=t[5]),n.$set(a),r&128&&H(e,"transform",t[7])},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),K(n),t[10](null)}}}function Js(i){let t,e,n;return e=new _m({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=Q("div"),$(e.$$.fragment),b(t,"class","arrow svelte-1fuzm7v")},m(o,s){T(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&64&&(r.direction=o[6]),s&1&&(r.visible=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){M(e.$$.fragment,o),n=!1},d(o){o&&z(t),K(e)}}}function $m(i){let t=[],e=new Map,n,o,s,r=i[1];const a=c=>c[11];for(let c=0;c<r.length;c+=1){let u=Us(i,r,c),f=a(u);e.set(f,t[c]=Vs(f,u))}let l=i[3]<i[4]&&Js(i);return{c(){for(let c=0;c<t.length;c+=1)t[c].c();n=Z(),l&&l.c(),o=he()},m(c,u){for(let f=0;f<t.length;f+=1)t[f].m(c,u);T(c,n,u),l&&l.m(c,u),T(c,o,u),s=!0},p(c,[u]){u&167&&(r=c[1],le(),t=Ue(t,u,a,1,c,r,e,n.parentNode,at,Vs,n,Us),ce()),c[3]<c[4]?l?(l.p(c,u),u&24&&k(l,1)):(l=Js(c),l.c(),k(l,1),l.m(o.parentNode,o)):l&&(le(),M(l,1,1,()=>{l=null}),ce())},i(c){if(!s){for(let u=0;u<r.length;u+=1)k(t[u]);k(l),s=!0}},o(c){for(let u=0;u<t.length;u+=1)M(t[u]);M(l),s=!1},d(c){for(let u=0;u<t.length;u+=1)t[u].d(c);c&&z(n),l&&l.d(c),c&&z(o)}}}function ep(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{textItems:l}=t,c,u=0,f=0,d=0;function p(m){Me[m?"unshift":"push"](()=>{c=m,e(2,c)})}return i.$$set=m=>{"visible"in m&&e(0,r=m.visible),"textUnfolded"in m&&e(8,a=m.textUnfolded),"textItems"in m&&e(1,l=m.textItems)},i.$$.update=()=>{if(i.$$.dirty&5&&c&&r){const{lineHeight:m}=getComputedStyle(c);e(4,d=c.offsetHeight),qm(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,d=c.offsetHeight)}),e(3,f=Number(m.replace("px","")))}i.$$.dirty&280&&e(9,u=a?f-d:0),i.$$.dirty&512&&e(7,n=`translateY(${u}px)`),i.$$.dirty&256&&e(6,o=a?"left":"right"),i.$$.dirty&256&&e(5,s=a?450:0)},[r,l,c,f,d,s,o,n,a,u,p]}class Ya extends oe{constructor(t){super(),ie(this,t,ep,$m,te,{visible:0,textUnfolded:8,textItems:1},Km)}}function tp(i){ae(i,"svelte-18yy5x8",".line.svelte-18yy5x8{position:absolute;top:0;left:0;width:10.125rem;height:0.0625rem;transform:translate3d(0, -50%, 0.625rem)}.content.svelte-18yy5x8{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0;overflow:hidden;box-sizing:border-box;font-size:0;pointer-events:none;white-space:nowrap;font-weight:600}")}function Zs(i){var d,p;let t,e,n,o,s,r,a,l,c,u,f;return t=new Ve({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),o=new Wa({props:{unfolded:i[2],duration:1e3,outDelay:i[5]+40*Math.min((p=(d=i[4][0])==null?void 0:d.content.length)!=null?p:10,15)}}),a=new Ya({props:{visible:i[2],textUnfolded:i[1],textItems:i[4]}}),{c(){$(t.$$.fragment),e=Z(),n=Q("div"),$(o.$$.fragment),s=Z(),r=Q("div"),$(a.$$.fragment),b(n,"class","line svelte-18yy5x8"),H(n,"width",i[3]+"px"),b(r,"class","content svelte-18yy5x8"),xe(()=>i[8].call(r))},m(m,g){q(t,m,g),T(m,e,g),T(m,n,g),q(o,n,null),T(m,s,g),T(m,r,g),q(a,r,null),l=vt(r,i[8].bind(r)),c=!0,u||(f=Pe(r,"click",i[6]),u=!0)},p(m,g){var w,x;const A={};g&4&&(A.visible=m[2]),g&8&&(A.left=m[3]/2+"px"),t.$set(A);const v={};g&4&&(v.unfolded=m[2]),g&48&&(v.outDelay=m[5]+40*Math.min((x=(w=m[4][0])==null?void 0:w.content.length)!=null?x:10,15)),o.$set(v),g&8&&H(n,"width",m[3]+"px");const C={};g&4&&(C.visible=m[2]),g&2&&(C.textUnfolded=m[1]),g&16&&(C.textItems=m[4]),a.$set(C)},i(m){c||(k(t.$$.fragment,m),k(o.$$.fragment,m),k(a.$$.fragment,m),c=!0)},o(m){M(t.$$.fragment,m),M(o.$$.fragment,m),M(a.$$.fragment,m),c=!1},d(m){K(t,m),m&&z(e),m&&z(n),K(o),m&&z(s),m&&z(r),K(a),l(),u=!1,f()}}}function np(i){let t,e,n=i[0].state&&Zs(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=Zs(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function ip(i,t,e){let n,o,s,{tag:r}=t,a,l=!1,c=[];function u(){e(1,l=!l)}function f(){a=this.clientWidth,e(3,a)}return i.$$set=d=>{"tag"in d&&e(0,r=d.tag)},i.$$.update=()=>{var d;i.$$.dirty&1&&e(2,n=!!((d=r.state)!=null&&d.unfolded)),i.$$.dirty&1&&e(7,o=r.data.text),i.$$.dirty&128&&e(4,c=[{id:He(),content:o}]),i.$$.dirty&4&&(n||setTimeout(()=>{e(1,l=!1)},20)),i.$$.dirty&2&&e(5,s=l?450:0)},[r,l,n,a,c,s,u,o,f]}class op extends oe{constructor(t){super(),ie(this,t,ip,np,te,{tag:0},tp)}}function sp(i){ae(i,"svelte-e72ouh",".line.svelte-e72ouh{width:100%;height:100%;overflow:visible}")}function _s(i){let t,e,n,o;return{c(){t=Ae("path"),b(t,"fill","none"),b(t,"stroke","url(#"+i[4]+")"),b(t,"stroke-width","1"),b(t,"d","M0 21 L14 0.5 L105 0.5")},m(s,r){T(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&xe(()=>{n&&n.end(1),e=Ot(t,qn,{duration:i[1],delay:i[0],easing:da}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=$t(t,qn,{duration:i[1],delay:i[2],easing:Zt})),o=!1},d(s){s&&z(t),s&&n&&n.end()}}}function rp(i){let t,e,n,o,s,r=i[3]&&_s(i);return{c(){t=Ae("svg"),e=Ae("defs"),n=Ae("linearGradient"),o=Ae("stop"),s=Ae("stop"),r&&r.c(),b(o,"offset","25%"),b(o,"stop-color","white"),b(o,"stop-opacity","1"),b(s,"offset","100%"),b(s,"stop-color","white"),b(s,"stop-opacity","0.5"),b(n,"id",i[4]),b(n,"gradientUnits","userSpaceOnUse"),b(t,"class","line svelte-e72ouh"),b(t,"viewBox","0 0 105 21")},m(a,l){T(a,t,l),O(t,e),O(e,n),O(n,o),O(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&k(r,1)):(r=_s(a),r.c(),k(r,1),r.m(t,null)):r&&(le(),M(r,1,1,()=>{r=null}),ce())},i(a){k(r)},o(a){M(r)},d(a){a&&z(t),r&&r.d()}}}function ap(i,t,e){let{inDelay:n=0}=t,{duration:o=0}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=He();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class lp extends oe{constructor(t){super(),ie(this,t,ap,rp,te,{inDelay:0,duration:1,outDelay:2,unfolded:3},sp)}}function jt(i){return typeof i=="object"&&i!==null&&i.constructor&&Object.prototype.toString.call(i).slice(8,-1)==="Object"}function ht(i,t){const e=["__proto__","constructor","prototype"];Object.keys(t).filter(n=>e.indexOf(n)<0).forEach(n=>{typeof i[n]=="undefined"?i[n]=t[n]:jt(t[n])&&jt(i[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?i[n]=t[n]:ht(i[n],t[n]):i[n]=t[n]})}function Gi(i={}){return i.navigation&&typeof i.navigation.nextEl=="undefined"&&typeof i.navigation.prevEl=="undefined"}function Ni(i={}){return i.pagination&&typeof i.pagination.el=="undefined"}function Wi(i={}){return i.scrollbar&&typeof i.scrollbar.el=="undefined"}function ti(i=""){const t=i.split(" ").map(n=>n.trim()).filter(n=>!!n),e=[];return t.forEach(n=>{e.indexOf(n)<0&&e.push(n)}),e.join(" ")}const Ua=["modules","init","_direction","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_preloadImages","updateOnImagesReady","_loop","_loopAdditionalSlides","_loopedSlides","_loopedSlidesLimit","_loopFillGroupWithBlank","loopPreventsSlide","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideBlankClass","slideActiveClass","slideDuplicateActiveClass","slideVisibleClass","slideDuplicateClass","slideNextClass","slideDuplicateNextClass","slidePrevClass","slideDuplicatePrevClass","wrapperClass","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","lazy","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom"];function cp(i={},t=!0){const e={on:{}},n={},o={};ht(e,zi.default.defaults),ht(e,zi.default.extendedDefaults),e._emitClasses=!0,e.init=!1;const s={},r=Ua.map(l=>l.replace(/_/,"")),a=Object.assign({},i);return Object.keys(a).forEach(l=>{typeof i[l]!="undefined"&&(r.indexOf(l)>=0?jt(i[l])?(e[l]={},o[l]={},ht(e[l],i[l]),ht(o[l],i[l])):(e[l]=i[l],o[l]=i[l]):l.search(/on[A-Z]/)===0&&typeof i[l]=="function"?t?n[`${l[2].toLowerCase()}${l.substr(3)}`]=i[l]:e.on[`${l[2].toLowerCase()}${l.substr(3)}`]=i[l]:s[l]=i[l])}),["navigation","pagination","scrollbar"].forEach(l=>{e[l]===!0&&(e[l]={}),e[l]===!1&&delete e[l]}),{params:e,passedParams:o,rest:s,events:n}}function up({el:i,nextEl:t,prevEl:e,paginationEl:n,scrollbarEl:o,swiper:s},r){Gi(r)&&t&&e&&(s.params.navigation.nextEl=t,s.originalParams.navigation.nextEl=t,s.params.navigation.prevEl=e,s.originalParams.navigation.prevEl=e),Ni(r)&&n&&(s.params.pagination.el=n,s.originalParams.pagination.el=n),Wi(r)&&o&&(s.params.scrollbar.el=o,s.originalParams.scrollbar.el=o),s.init(i)}function dp(i,t,e,n,o){const s=[];if(!t)return s;const r=l=>{s.indexOf(l)<0&&s.push(l)};if(e&&n){const l=n.map(o),c=e.map(o);l.join("")!==c.join("")&&r("children"),n.length!==e.length&&r("children")}return Ua.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in i&&l in t)if(jt(i[l])&&jt(t[l])){const c=Object.keys(i[l]),u=Object.keys(t[l]);c.length!==u.length?r(l):(c.forEach(f=>{i[l][f]!==t[l][f]&&r(l)}),u.forEach(f=>{i[l][f]!==t[l][f]&&r(l)}))}else i[l]!==t[l]&&r(l)}),s}function fp({swiper:i,slides:t,passedParams:e,changedParams:n,nextEl:o,prevEl:s,scrollbarEl:r,paginationEl:a}){const l=n.filter(D=>D!=="children"&&D!=="direction"),{params:c,pagination:u,navigation:f,scrollbar:d,virtual:p,thumbs:m}=i;let g,A,v,C,w;n.includes("thumbs")&&e.thumbs&&e.thumbs.swiper&&c.thumbs&&!c.thumbs.swiper&&(g=!0),n.includes("controller")&&e.controller&&e.controller.control&&c.controller&&!c.controller.control&&(A=!0),n.includes("pagination")&&e.pagination&&(e.pagination.el||a)&&(c.pagination||c.pagination===!1)&&u&&!u.el&&(v=!0),n.includes("scrollbar")&&e.scrollbar&&(e.scrollbar.el||r)&&(c.scrollbar||c.scrollbar===!1)&&d&&!d.el&&(C=!0),n.includes("navigation")&&e.navigation&&(e.navigation.prevEl||s)&&(e.navigation.nextEl||o)&&(c.navigation||c.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(w=!0);const x=D=>{!i[D]||(i[D].destroy(),D==="navigation"?(c[D].prevEl=void 0,c[D].nextEl=void 0,i[D].prevEl=void 0,i[D].nextEl=void 0):(c[D].el=void 0,i[D].el=void 0))};l.forEach(D=>{if(jt(c[D])&&jt(e[D]))ht(c[D],e[D]);else{const y=e[D];(y===!0||y===!1)&&(D==="navigation"||D==="pagination"||D==="scrollbar")?y===!1&&x(D):c[D]=e[D]}}),l.includes("controller")&&!A&&i.controller&&i.controller.control&&c.controller&&c.controller.control&&(i.controller.control=c.controller.control),n.includes("children")&&t&&p&&c.virtual.enabled?(p.slides=t,p.update(!0)):n.includes("children")&&i.lazy&&i.params.lazy.enabled&&i.lazy.load(),g&&m.init()&&m.update(!0),A&&(i.controller.control=c.controller.control),v&&(a&&(c.pagination.el=a),u.init(),u.render(),u.update()),C&&(r&&(c.scrollbar.el=r),d.init(),d.updateSize(),d.setTranslate()),w&&(o&&(c.navigation.nextEl=o),s&&(c.navigation.prevEl=s),f.init(),f.update()),n.includes("allowSlideNext")&&(i.allowSlideNext=e.allowSlideNext),n.includes("allowSlidePrev")&&(i.allowSlidePrev=e.allowSlidePrev),n.includes("direction")&&i.changeDirection(e.direction,!1),i.update()}const hp=i=>({virtualData:i&512}),qs=i=>({virtualData:i[9]}),mp=i=>({virtualData:i&512}),Ks=i=>({virtualData:i[9]}),pp=i=>({virtualData:i&512}),$s=i=>({virtualData:i[9]}),gp=i=>({virtualData:i&512}),er=i=>({virtualData:i[9]}),Ap=i=>({virtualData:i&512}),tr=i=>({virtualData:i[9]});function nr(i){let t,e,n;return{c(){t=Q("div"),e=Z(),n=Q("div"),b(t,"class","swiper-button-prev"),b(n,"class","swiper-button-next")},m(o,s){T(o,t,s),i[13](t),T(o,e,s),T(o,n,s),i[14](n)},p:ee,d(o){o&&z(t),i[13](null),o&&z(e),o&&z(n),i[14](null)}}}function ir(i){let t;return{c(){t=Q("div"),b(t,"class","swiper-scrollbar")},m(e,n){T(e,t,n),i[15](t)},p:ee,d(e){e&&z(t),i[15](null)}}}function or(i){let t;return{c(){t=Q("div"),b(t,"class","swiper-pagination")},m(e,n){T(e,t,n),i[16](t)},p:ee,d(e){e&&z(t),i[16](null)}}}function vp(i){let t,e,n,o,s,r,a=Gi(i[2]),l,c=Wi(i[2]),u,f=Ni(i[2]),d,p,m;const g=i[12]["container-start"],A=Pt(g,i,i[11],tr),v=i[12]["wrapper-start"],C=Pt(v,i,i[11],er),w=i[12].default,x=Pt(w,i,i[11],$s),D=i[12]["wrapper-end"],y=Pt(D,i,i[11],Ks);let L=a&&nr(i),P=c&&ir(i),j=f&&or(i);const B=i[12]["container-end"],G=Pt(B,i,i[11],qs);let U=[{class:p=ti(`${i[1]}${i[0]?` ${i[0]}`:""}`)},i[3]],I={};for(let S=0;S<U.length;S+=1)I=we(I,U[S]);return{c(){t=Q("div"),A&&A.c(),e=Z(),n=Q("div"),C&&C.c(),o=Z(),x&&x.c(),s=Z(),y&&y.c(),r=Z(),L&&L.c(),l=Z(),P&&P.c(),u=Z(),j&&j.c(),d=Z(),G&&G.c(),b(n,"class","swiper-wrapper"),Xn(t,I)},m(S,R){T(S,t,R),A&&A.m(t,null),O(t,e),O(t,n),C&&C.m(n,null),O(n,o),x&&x.m(n,null),O(n,s),y&&y.m(n,null),O(t,r),L&&L.m(t,null),O(t,l),P&&P.m(t,null),O(t,u),j&&j.m(t,null),O(t,d),G&&G.m(t,null),i[17](t),m=!0},p(S,[R]){A&&A.p&&(!m||R&2560)&&xt(A,g,S,S[11],m?It(g,S[11],R,Ap):kt(S[11]),tr),C&&C.p&&(!m||R&2560)&&xt(C,v,S,S[11],m?It(v,S[11],R,gp):kt(S[11]),er),x&&x.p&&(!m||R&2560)&&xt(x,w,S,S[11],m?It(w,S[11],R,pp):kt(S[11]),$s),y&&y.p&&(!m||R&2560)&&xt(y,D,S,S[11],m?It(D,S[11],R,mp):kt(S[11]),Ks),R&4&&(a=Gi(S[2])),a?L?L.p(S,R):(L=nr(S),L.c(),L.m(t,l)):L&&(L.d(1),L=null),R&4&&(c=Wi(S[2])),c?P?P.p(S,R):(P=ir(S),P.c(),P.m(t,u)):P&&(P.d(1),P=null),R&4&&(f=Ni(S[2])),f?j?j.p(S,R):(j=or(S),j.c(),j.m(t,d)):j&&(j.d(1),j=null),G&&G.p&&(!m||R&2560)&&xt(G,B,S,S[11],m?It(B,S[11],R,hp):kt(S[11]),qs),Xn(t,I=Be(U,[(!m||R&3&&p!==(p=ti(`${S[1]}${S[0]?` ${S[0]}`:""}`)))&&{class:p},R&8&&S[3]]))},i(S){m||(k(A,S),k(C,S),k(x,S),k(y,S),k(G,S),m=!0)},o(S){M(A,S),M(C,S),M(x,S),M(y,S),M(G,S),m=!1},d(S){S&&z(t),A&&A.d(S),C&&C.d(S),x&&x.d(S),y&&y.d(S),L&&L.d(),P&&P.d(),j&&j.d(),G&&G.d(S),i[17](null)}}}function bp(i,t,e){const n=["class","swiper"];let o=Wn(t,n),{$$slots:s={},$$scope:r}=t;const a=tc();let{class:l=void 0}=t,c="swiper",u=!1,f=null,d=null,p,m,g,A,v=null,C=null,w=null,x=null,D=null,y={slides:[]};function L(){return f}const P=W=>{e(9,y=W),ic().then(()=>{f.$wrapperEl.children(".swiper-slide").each(Y=>{Y.onSwiper&&Y.onSwiper(f)}),f.updateSlides(),f.updateProgress(),f.updateSlidesClasses(),f.lazy&&f.params.lazy.enabled&&f.lazy.load()})},j=()=>{p=cp(o),e(2,m=p.params),g=p.passedParams,e(3,A=p.rest)};j(),d=g;const B=()=>{u=!0};if(m.onAny=(W,...Y)=>{a(W,Y)},Object.assign(m.on,{_beforeBreakpoint:B,_containerClasses(W,Y){e(1,c=Y)}}),f=new zi.default(m),Bi("swiper",f),f.virtual&&f.params.virtual.enabled){const W={cache:!1,renderExternal:Y=>{P(Y),m.virtual&&m.virtual.renderExternal&&m.virtual.renderExternal(Y)},renderExternalUpdate:!1};ht(f.params.virtual,W),ht(f.originalParams.virtual,W)}Ye(()=>{!v||(up({el:v,nextEl:w,prevEl:C,paginationEl:D,scrollbarEl:x,swiper:f},m),a("swiper",[f]),!m.virtual&&f.slides.each(W=>{W.onSwiper&&W.onSwiper(f)}))}),qi(()=>{if(!f)return;j();const W=dp(g,d);(W.length||u)&&f&&!f.destroyed&&fp({swiper:f,passedParams:g,changedParams:W,nextEl:w,prevEl:C,scrollbarEl:x,paginationEl:D}),u=!1,d=g}),bt(()=>{typeof window!="undefined"&&f&&!f.destroyed&&f.destroy(!0,!1)});function G(W){Me[W?"unshift":"push"](()=>{C=W,e(5,C)})}function U(W){Me[W?"unshift":"push"](()=>{w=W,e(6,w)})}function I(W){Me[W?"unshift":"push"](()=>{x=W,e(7,x)})}function S(W){Me[W?"unshift":"push"](()=>{D=W,e(8,D)})}function R(W){Me[W?"unshift":"push"](()=>{v=W,e(4,v)})}return i.$$set=W=>{t=we(we({},t),qr(W)),e(27,o=Wn(t,n)),"class"in W&&e(0,l=W.class),"$$scope"in W&&e(11,r=W.$$scope)},[l,c,m,A,v,C,w,x,D,y,L,r,s,G,U,I,S,R]}class yp extends oe{constructor(t){super(),ie(this,t,bp,vp,te,{class:0,swiper:10})}get swiper(){return this.$$.ctx[10]}}const wp=i=>({data:i&32}),sr=i=>({data:i[5]}),Cp=i=>({data:i&32}),rr=i=>({data:i[5]});function Ep(i){let t;const e=i[8].default,n=Pt(e,i,i[7],sr);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&160)&&xt(n,e,o,o[7],t?It(e,o[7],s,wp):kt(o[7]),sr)},i(o){t||(k(n,o),t=!0)},o(o){M(n,o),t=!1},d(o){n&&n.d(o)}}}function Pp(i){let t,e,n;const o=i[8].default,s=Pt(o,i,i[7],rr);return{c(){t=Q("div"),s&&s.c(),b(t,"class","swiper-zoom-container"),b(t,"data-swiper-zoom",e=typeof i[0]=="number"?i[0]:void 0)},m(r,a){T(r,t,a),s&&s.m(t,null),n=!0},p(r,a){s&&s.p&&(!n||a&160)&&xt(s,o,r,r[7],n?It(o,r[7],a,Cp):kt(r[7]),rr),(!n||a&1&&e!==(e=typeof r[0]=="number"?r[0]:void 0))&&b(t,"data-swiper-zoom",e)},i(r){n||(k(s,r),n=!0)},o(r){M(s,r),n=!1},d(r){r&&z(t),s&&s.d(r)}}}function Ip(i){let t,e,n,o,s;const r=[Pp,Ep],a=[];function l(f,d){return f[0]?0:1}e=l(i),n=a[e]=r[e](i);let c=[{class:o=ti(`${i[3]}${i[2]?` ${i[2]}`:""}`)},{"data-swiper-slide-index":i[1]},i[6]],u={};for(let f=0;f<c.length;f+=1)u=we(u,c[f]);return{c(){t=Q("div"),n.c(),Xn(t,u)},m(f,d){T(f,t,d),a[e].m(t,null),i[9](t),s=!0},p(f,[d]){let p=e;e=l(f),e===p?a[e].p(f,d):(le(),M(a[p],1,1,()=>{a[p]=null}),ce(),n=a[e],n?n.p(f,d):(n=a[e]=r[e](f),n.c()),k(n,1),n.m(t,null)),Xn(t,u=Be(c,[(!s||d&12&&o!==(o=ti(`${f[3]}${f[2]?` ${f[2]}`:""}`)))&&{class:o},(!s||d&2)&&{"data-swiper-slide-index":f[1]},d&64&&f[6]]))},i(f){s||(k(n),s=!0)},o(f){M(n),s=!1},d(f){f&&z(t),a[e].d(),i[9](null)}}}function xp(i,t,e){let n;const o=["zoom","virtualIndex","class"];let s=Wn(t,o),{$$slots:r={},$$scope:a}=t,{zoom:l=void 0}=t,{virtualIndex:c=void 0}=t,{class:u=void 0}=t,f=null,d="swiper-slide",p=mn("swiper"),m=!1;const g=(w,x,D)=>{x===f&&e(3,d=D)},A=()=>{!p||m||(p.on("_slideClass",g),m=!0)},v=()=>{!p||(p.off("_slideClass",g),m=!1)};Ye(()=>{typeof c!="undefined"&&(e(4,f.onSwiper=w=>{p=w,A()},f),A())}),qi(()=>{if(!(!f||!p)){if(p.destroyed){d!=="swiper-slide"&&e(3,d="swiper-slide");return}A()}}),_i(()=>{A()}),bt(()=>{!p||v()});function C(w){Me[w?"unshift":"push"](()=>{f=w,e(4,f)})}return i.$$set=w=>{t=we(we({},t),qr(w)),e(6,s=Wn(t,o)),"zoom"in w&&e(0,l=w.zoom),"virtualIndex"in w&&e(1,c=w.virtualIndex),"class"in w&&e(2,u=w.class),"$$scope"in w&&e(7,a=w.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(5,n={isActive:d.indexOf("swiper-slide-active")>=0||d.indexOf("swiper-slide-duplicate-active")>=0,isVisible:d.indexOf("swiper-slide-visible")>=0,isDuplicate:d.indexOf("swiper-slide-duplicate")>=0,isPrev:d.indexOf("swiper-slide-prev")>=0||d.indexOf("swiper-slide-duplicate-prev")>=0,isNext:d.indexOf("swiper-slide-next")>=0||d.indexOf("swiper-slide-duplicate-next")>=0})},[l,c,u,d,f,n,s,a,r,C]}class kp extends oe{constructor(t){super(),ie(this,t,xp,Ip,te,{zoom:0,virtualIndex:1,class:2})}}function Dp(i){ae(i,"svelte-cwtvzu",".media-item.svelte-cwtvzu.svelte-cwtvzu{height:100%}.media-content.svelte-cwtvzu.svelte-cwtvzu{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.video-icon.svelte-cwtvzu.svelte-cwtvzu{width:12.5rem;height:6.25rem;max-width:60%;max-height:60%;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.video-play-button-container.svelte-cwtvzu.svelte-cwtvzu{display:none;pointer-events:auto;position:absolute;width:100%;height:100%;top:0;left:0}.video-play-button-container.showPlayButton.svelte-cwtvzu.svelte-cwtvzu{display:block}.video-icon.large.svelte-cwtvzu.svelte-cwtvzu{width:12.5rem;height:6.25rem}.video-icon.small.svelte-cwtvzu.svelte-cwtvzu{width:1.75rem;height:1.75rem}.video-icon.svelte-cwtvzu .video-icon-img.svelte-cwtvzu{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-cwtvzu .video-icon-img.canPlay.svelte-cwtvzu{cursor:pointer}")}function ar(i){let t;function e(s,r){if(s[0].type==="Image")return Sp;if(s[0].type==="Video")return Lp}let n=e(i),o=n&&n(i);return{c(){t=Q("div"),o&&o.c(),b(t,"class","media-item svelte-cwtvzu")},m(s,r){T(s,t,r),o&&o.m(t,null)},p(s,r){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null)))},d(s){s&&z(t),o&&o.d()}}}function Lp(i){let t,e,n,o,s,r,a,l,c,u,f;return{c(){var d;t=Q("video"),r=Z(),a=Q("div"),l=Q("div"),c=Q("div"),b(t,"class","media-content svelte-cwtvzu"),b(t,"style",e=`object-fit: ${i[3]};`),et(t.src,n=i[0].url+"#t=0.1")||b(t,"src",n),b(t,"poster",o=(d=i[0].videoCoverUrl)!=null?d:void 0),b(t,"preload",s=i[0].videoCoverUrl?void 0:"auto"),t.playsInline=!0,b(t,"paused",""),t.loop=!1,b(t,"crossorigin",""),t.controls=!1,_(t,"showPlayButton",i[5]),b(c,"class","video-icon-img svelte-cwtvzu"),H(c,"background-image","url("+(i[1]==="large"?Ws:Xs)+")"),_(c,"canPlay",i[2]),b(l,"class","video-icon svelte-cwtvzu"),_(l,"large",i[1]==="large"),_(l,"small",i[1]==="small"),b(a,"class","video-play-button-container svelte-cwtvzu"),_(a,"showPlayButton",i[5])},m(d,p){T(d,t,p),i[7](t),T(d,r,p),T(d,a,p),O(a,l),O(l,c),u||(f=[Pe(t,"click",i[6]),Pe(c,"click",i[8])],u=!0)},p(d,p){var m;p&8&&e!==(e=`object-fit: ${d[3]};`)&&b(t,"style",e),p&1&&!et(t.src,n=d[0].url+"#t=0.1")&&b(t,"src",n),p&1&&o!==(o=(m=d[0].videoCoverUrl)!=null?m:void 0)&&b(t,"poster",o),p&1&&s!==(s=d[0].videoCoverUrl?void 0:"auto")&&b(t,"preload",s),p&32&&_(t,"showPlayButton",d[5]),p&2&&H(c,"background-image","url("+(d[1]==="large"?Ws:Xs)+")"),p&4&&_(c,"canPlay",d[2]),p&2&&_(l,"large",d[1]==="large"),p&2&&_(l,"small",d[1]==="small"),p&32&&_(a,"showPlayButton",d[5])},d(d){d&&z(t),i[7](null),d&&z(r),d&&z(a),u=!1,rt(f)}}}function Sp(i){let t,e,n,o;return{c(){t=Q("img"),b(t,"class","media-content svelte-cwtvzu"),b(t,"style",e=`object-fit: ${i[3]};`),et(t.src,n=i[0].url)||b(t,"src",n),b(t,"alt",o=i[0].name)},m(s,r){T(s,t,r)},p(s,r){r&8&&e!==(e=`object-fit: ${s[3]};`)&&b(t,"style",e),r&1&&!et(t.src,n=s[0].url)&&b(t,"src",n),r&1&&o!==(o=s[0].name)&&b(t,"alt",o)},d(s){s&&z(t)}}}function zp(i){let t,e=i[0]&&ar(i);return{c(){e&&e.c(),t=he()},m(n,o){e&&e.m(n,o),T(n,t,o)},p(n,[o]){n[0]?e?e.p(n,o):(e=ar(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:ee,o:ee,d(n){e&&e.d(n),n&&z(t)}}}function Mp(i,t,e){let{media:n}=t,{playButtonIfNeed:o="small"}=t,{canPlay:s=!0}=t,{objectFit:r="cover"}=t,a,l=!1;const c=()=>a==null?void 0:a.pause();function u(d){Me[d?"unshift":"push"](()=>{a=d,e(4,a)})}const f=()=>{!s||a&&a.play()};return i.$$set=d=>{"media"in d&&e(0,n=d.media),"playButtonIfNeed"in d&&e(1,o=d.playButtonIfNeed),"canPlay"in d&&e(2,s=d.canPlay),"objectFit"in d&&e(3,r=d.objectFit)},i.$$.update=()=>{i.$$.dirty&16&&a&&(e(5,l=a.paused),a.addEventListener("play",()=>{e(5,l=!1)}),a.addEventListener("pause",()=>{e(5,l=!0)}))},[n,o,s,r,a,l,c,u,f]}class Va extends oe{constructor(t){super(),ie(this,t,Mp,zp,te,{media:0,playButtonIfNeed:1,canPlay:2,objectFit:3},Dp)}}function Tp(i){ae(i,"svelte-ai0lv9",".media.svelte-ai0lv9{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}")}function lr(i,t,e){const n=i.slice();return n[23]=t[e],n}function cr(i){let t,e,n,o,s,r;const a=[jp,Bp],l=[];function c(u,f){return u[13]?0:1}return e=c(i),n=l[e]=a[e](i),{c(){t=Q("div"),n.c(),b(t,"class","media svelte-ai0lv9"),_(t,"unfolded",i[4])},m(u,f){T(u,t,f),l[e].m(t,null),r=!0},p(u,f){i=u;let d=e;e=c(i),e===d?l[e].p(i,f):(le(),M(l[d],1,1,()=>{l[d]=null}),ce(),n=l[e],n?n.p(i,f):(n=l[e]=a[e](i),n.c()),k(n,1),n.m(t,null)),(!r||f&16)&&_(t,"unfolded",i[4])},i(u){r||(k(n),u&&xe(()=>{s&&s.end(1),o=Ot(t,Do,i[5]?{y:4,duration:i[3],delay:i[1],easing:Jt}:void 0),o.start()}),r=!0)},o(u){M(n),o&&o.invalidate(),u&&(s=$t(t,Do,i[5]?{y:4,duration:i[3],delay:i[2],easing:Jt}:void 0)),r=!1},d(u){u&&z(t),l[e].d(),u&&s&&s.end()}}}function Bp(i){let t,e;return t=new Va({props:{media:i[0][0],objectFit:i[8],playButtonIfNeed:i[6],canPlay:i[7]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.media=n[0][0]),o&256&&(s.objectFit=n[8]),o&64&&(s.playButtonIfNeed=n[6]),o&128&&(s.canPlay=n[7]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function jp(i){let t,e;return t=new yp({props:{style:"height: 100%",modules:[Fr.Autoplay],spaceBetween:30,autoplay:i[14]?Se({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1,loop:!0,$$slots:{default:[Rp]},$$scope:{ctx:i}}}),t.$on("init",i[19]),t.$on("slideChange",i[20]),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&16384&&(s.autoplay=n[14]?Se({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1),o&67111360&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Qp(i){let t,e,n;return t=new Va({props:{media:i[23],objectFit:i[8],playButtonIfNeed:i[6],canPlay:i[7]}}),{c(){$(t.$$.fragment),e=Z()},m(o,s){q(t,o,s),T(o,e,s),n=!0},p(o,s){const r={};s&2048&&(r.media=o[23]),s&256&&(r.objectFit=o[8]),s&64&&(r.playButtonIfNeed=o[6]),s&128&&(r.canPlay=o[7]),t.$set(r)},i(o){n||(k(t.$$.fragment,o),n=!0)},o(o){M(t.$$.fragment,o),n=!1},d(o){K(t,o),o&&z(e)}}}function ur(i){let t,e;return t=new kp({props:{$$slots:{default:[Qp]},$$scope:{ctx:i}}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&67111360&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Rp(i){let t,e,n=i[11],o=[];for(let r=0;r<n.length;r+=1)o[r]=ur(lr(i,n,r));const s=r=>M(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=he()},m(r,a){for(let l=0;l<o.length;l+=1)o[l].m(r,a);T(r,t,a),e=!0},p(r,a){if(a&2496){n=r[11];let l;for(l=0;l<n.length;l+=1){const c=lr(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=ur(c),o[l].c(),k(o[l],1),o[l].m(t.parentNode,t))}for(le(),l=n.length;l<o.length;l+=1)s(l);ce()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)k(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)M(o[a]);e=!1},d(r){tt(o,r),r&&z(t)}}}function Op(i){let t,e,n=i[4]&&cr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[4]?n?(n.p(o,s),s&16&&k(n,1)):(n=cr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Hp(i,t,e){let n,o,s,{tag:r}=t,{mediaData:a}=t,{inDelay:l=0}=t,{outDelay:c=0}=t,{duration:u=0}=t,{unfolded:f=!0}=t,{animation:d=!0}=t,{playButtonIfNeed:p="small"}=t,{canPlay:m=!0}=t,{objectFit:g="cover"}=t,{enableCarousel:A=!0}=t,{autoplayConfig:v={autoplay:!0,autoplayVideo:!1}}=t;const C=mn("mediaStore"),w=mn("hooks");let x;function D(B){!n||!x||(C.set({currentMediaUrl:this.src}),w.emit("playStateChange",{event:B,state:"playing",tag:r,mediaInstance:this}),x.autoplay.stop())}function y(B){!n||!x||(w.emit("playStateChange",{event:B,state:"paused",tag:r,mediaInstance:this}),x.autoplay.running||x.autoplay.start())}let L=null;const P=B=>{e(10,x=B.detail[0])},j=B=>J(this,null,function*(){var W,Y,ne;if(!s||!v.autoplayVideo)return;const G=B.detail[0];if(!G)return;const U=G.realIndex;if(U===L)return;e(12,L=U);const I=o[U];if(!I||I.type!=="Video")return;G.autoplay.stop(),G.slides.map(X=>X.querySelector("video")).filter(Bt).forEach(X=>X.pause());const R=(W=G.slides[G.activeIndex])==null?void 0:W.querySelector("video");if(R&&(R.removeEventListener("play",D),R.removeEventListener("pause",y),R.addEventListener("play",D),R.addEventListener("pause",y)),R){R.addEventListener("click",()=>R.pause());const X=(ne=(Y=R.parentElement)==null?void 0:Y.getElementsByClassName("video-play-button-container"))==null?void 0:ne[0];R.addEventListener("play",()=>X==null?void 0:X.classList.remove("showPlayButton")),R.addEventListener("pause",()=>X==null?void 0:X.classList.add("showPlayButton")),X&&(R.paused?X.classList.add("showPlayButton"):X.classList.remove("showPlayButton"),X.addEventListener("click",()=>R.play()))}});return i.$$set=B=>{"tag"in B&&e(17,r=B.tag),"mediaData"in B&&e(0,a=B.mediaData),"inDelay"in B&&e(1,l=B.inDelay),"outDelay"in B&&e(2,c=B.outDelay),"duration"in B&&e(3,u=B.duration),"unfolded"in B&&e(4,f=B.unfolded),"animation"in B&&e(5,d=B.animation),"playButtonIfNeed"in B&&e(6,p=B.playButtonIfNeed),"canPlay"in B&&e(7,m=B.canPlay),"objectFit"in B&&e(8,g=B.objectFit),"enableCarousel"in B&&e(18,A=B.enableCarousel),"autoplayConfig"in B&&e(9,v=B.autoplayConfig)},i.$$.update=()=>{i.$$.dirty&262145&&e(13,n=A&&(a==null?void 0:a.length)>1),i.$$.dirty&1&&e(11,o=a),i.$$.dirty&2560&&e(14,s=o.length>1&&v.autoplay),i.$$.dirty&1024&&x&&x.slides.forEach(B=>{const G=B.querySelector("video");G&&C.subscribe(({currentMediaUrl:U})=>{U!==G.src&&G.pause()})})},[a,l,c,u,f,d,p,m,g,v,x,o,L,n,s,D,y,r,A,P,j]}class Ja extends oe{constructor(t){super(),ie(this,t,Hp,Op,te,{tag:17,mediaData:0,inDelay:1,outDelay:2,duration:3,unfolded:4,animation:5,playButtonIfNeed:6,canPlay:7,objectFit:8,enableCarousel:18,autoplayConfig:9},Tp)}}function Fp(i){ae(i,"svelte-1f7m1lj",".line.svelte-1f7m1lj{position:absolute;width:6.5625rem;height:1.3125rem;transform:translateY(-100%)}.text.svelte-1f7m1lj{position:absolute;width:6.25rem;left:1rem;bottom:0.0625rem;font-weight:600}.media-wrapper.svelte-1f7m1lj{position:absolute;left:0.875rem;top:-5.3125rem;width:5.625rem;height:3.75rem;font-weight:600}")}function dr(i,t,e){const n=i.slice();return n[5]=t[e].id,n[1]=t[e].content,n}function fr(i){let t,e,n,o,s,r=[],a=new Map,l,c,u;t=new Ve({props:{visible:i[4],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new lp({props:{unfolded:i[4],duration:1e3,outDelay:400}});let f=i[2];const d=m=>m[5];for(let m=0;m<f.length;m+=1){let g=dr(i,f,m),A=d(g);a.set(A,r[m]=hr(A,g))}let p=i[3]&&mr(i);return{c(){$(t.$$.fragment),e=Z(),n=Q("div"),$(o.$$.fragment),s=Z();for(let m=0;m<r.length;m+=1)r[m].c();l=Z(),p&&p.c(),c=he(),b(n,"class","line svelte-1f7m1lj")},m(m,g){q(t,m,g),T(m,e,g),T(m,n,g),q(o,n,null),T(m,s,g);for(let A=0;A<r.length;A+=1)r[A].m(m,g);T(m,l,g),p&&p.m(m,g),T(m,c,g),u=!0},p(m,g){const A={};g&16&&(A.visible=m[4]),t.$set(A);const v={};g&16&&(v.unfolded=m[4]),o.$set(v),g&20&&(f=m[2],le(),r=Ue(r,g,d,1,m,f,a,l.parentNode,at,hr,l,dr),ce()),m[3]?p?(p.p(m,g),g&8&&k(p,1)):(p=mr(m),p.c(),k(p,1),p.m(c.parentNode,c)):p&&(le(),M(p,1,1,()=>{p=null}),ce())},i(m){if(!u){k(t.$$.fragment,m),k(o.$$.fragment,m);for(let g=0;g<f.length;g+=1)k(r[g]);k(p),u=!0}},o(m){M(t.$$.fragment,m),M(o.$$.fragment,m);for(let g=0;g<r.length;g+=1)M(r[g]);M(p),u=!1},d(m){K(t,m),m&&z(e),m&&z(n),K(o),m&&z(s);for(let g=0;g<r.length;g+=1)r[g].d(m);m&&z(l),p&&p.d(m),m&&z(c)}}}function hr(i,t){let e,n,o;return n=new Xa({props:{unfolded:t[4],content:t[1],inDelay:500}}),{key:i,first:null,c(){e=Q("div"),$(n.$$.fragment),b(e,"class","text svelte-1f7m1lj"),this.first=e},m(s,r){T(s,e,r),q(n,e,null),o=!0},p(s,r){t=s;const a={};r&16&&(a.unfolded=t[4]),r&4&&(a.content=t[1]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),K(n)}}}function mr(i){let t,e,n;return e=new Ja({props:{autoplayConfig:{autoplay:!1},unfolded:i[4],mediaData:i[3],tag:i[0],enableCarousel:!1,canPlay:!1,playButtonIfNeed:"small",inDelay:500,duration:500}}),{c(){t=Q("div"),$(e.$$.fragment),b(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){T(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&16&&(r.unfolded=o[4]),s&8&&(r.mediaData=o[3]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){M(e.$$.fragment,o),n=!1},d(o){o&&z(t),K(e)}}}function Gp(i){let t,e,n=i[0].state&&fr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=fr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Np(i,t,e){let n,o,s,{tag:r}=t,a;return i.$$set=l=>{"tag"in l&&e(0,r=l.tag)},i.$$.update=()=>{var l,c,u;i.$$.dirty&1&&e(4,n=r.state?r.state.unfolded:!1),i.$$.dirty&1&&e(1,o=((c=(l=r.data.text)==null?void 0:l.length)!=null?c:0)>7?((u=r.data.text)==null?void 0:u.substring(0,6))+"...":r.data.text),i.$$.dirty&1&&e(3,s=r.data.mediaData),i.$$.dirty&2&&e(2,a=o?[{id:He(),content:o}]:[])},[r,o,a,s,n]}class Wp extends oe{constructor(t){super(),ie(this,t,Np,Gp,te,{tag:0},Fp)}}function Xp(i){ae(i,"svelte-8mby9k",".svelte-8mby9k.svelte-8mby9k{box-sizing:border-box}.marketing.svelte-8mby9k.svelte-8mby9k{transform:translateY(-100%)}.content.svelte-8mby9k .headerImage.svelte-8mby9k{position:absolute;width:100%;top:0.25rem;transform:translateY(-100%);border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.line.svelte-8mby9k.svelte-8mby9k{position:absolute;height:2.0625rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.content.svelte-8mby9k.svelte-8mby9k{background-color:white;position:relative;display:flex;flex-direction:column;min-width:11.125rem;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;border-radius:0.25rem;top:-1.875rem;left:-1rem;padding:0.5rem 0rem 0.5625rem;transition:all 500ms}.title.svelte-8mby9k.svelte-8mby9k{position:absolute;background-color:white;border-radius:0.25rem;width:100%;top:0.5rem;padding-left:0.75rem;padding-right:0.75rem}.title.svelte-8mby9k .text.svelte-8mby9k{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.75rem;font-weight:bold;line-height:1.125rem;color:#000}.footer.svelte-8mby9k.svelte-8mby9k{position:relative;padding-left:0.75rem;padding-right:0.75rem;width:100%;height:1.375rem;display:flex;align-items:center}.footer.svelte-8mby9k .goto-button.svelte-8mby9k{flex-shrink:0;white-space:nowrap;background-image:linear-gradient(to right, rgba(87, 144, 253, 1) 0, rgba(42, 114, 254, 1) 100%);color:#fff;font-size:0.625rem;border-radius:0.875rem;font-weight:bold;padding-left:0.5rem;padding-right:0.5rem;height:1.25rem;margin-left:auto;display:flex;align-items:center}.footer.svelte-8mby9k .goto-icon.svelte-8mby9k::after{content:'';display:inline-block;width:0.75rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMAFNO2pYt4bErz8uP6ysawgVtBPDcR5C4s2L6ZmJBzZGJXUyEeDws/0G2zAAAAkklEQVQ4y+3TRw6DMBAF0OAeJ3QCpCe0uf8NwRILLBYfiS1/aT3JoymnI+sERZ5VCH0iVto3QDfBLmeSSMUTogRV9bBEpJAKaYpGijn13aTSLeraeG9D0NZFZv4/rRL5FDHnITlllqjv6tykWsmX4JHr05y7j6oFKq2P8He48B0tAM0EY0EDxquClw6vLz6EI35GmwwSZpe+WOgAAAAASUVORK5CYII=);background-size:100% auto;background-repeat:no-repeat}.price.svelte-8mby9k.svelte-8mby9k{flex-shrink:0;margin-right:0.75rem;white-space:nowrap;color:#ff6600;display:flex;align-items:baseline}.price.svelte-8mby9k .value.svelte-8mby9k{position:relative;top:0.0625rem;font-size:1.125rem;line-height:1.375rem;font-family:TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0rem}.price.svelte-8mby9k .unit.svelte-8mby9k{padding-left:0.125rem;font-size:0.625rem}.tag.svelte-8mby9k.svelte-8mby9k{position:relative;background-color:white;display:flex;width:-moz-max-content;width:max-content;padding-left:0.75rem;padding-right:0.75rem;min-height:1.75rem}.tag.svelte-8mby9k .base-tag.svelte-8mby9k{height:1rem;margin-top:1.375rem;margin-bottom:0.5rem;margin-right:0.25rem;font-size:0.625rem;line-height:0.875rem;padding:0.0625rem 0.25rem;border-radius:0.125rem;overflow:hidden}.tag.svelte-8mby9k .primary-tag.svelte-8mby9k{background:#e5eefe;color:#0055ff}.tag.svelte-8mby9k .secondary-tag.svelte-8mby9k{background:rgba(255, 102, 0, 0.08);color:rgba(255, 102, 0, 1)}.unfolded.svelte-8mby9k .line.svelte-8mby9k{transform:translateX(-50%) scale(1, 1)}.folded.svelte-8mby9k .line.svelte-8mby9k{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.unfolded.svelte-8mby9k .content.svelte-8mby9k{opacity:1}.folded.svelte-8mby9k .content.svelte-8mby9k{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}")}function pr(i,t,e){const n=i.slice();return n[0]=t[e],n}function gr(i,t,e){const n=i.slice();return n[0]=t[e],n}function Ar(i){let t,e=i[0]+"",n;return{c(){t=Q("div"),n=ke(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){T(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Te(n,e)},d(o){o&&z(t)}}}function vr(i){let t,e=i[0]&&Ar(i);return{c(){e&&e.c(),t=he()},m(n,o){e&&e.m(n,o),T(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Ar(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function br(i){let t,e=i[0]+"",n;return{c(){t=Q("div"),n=ke(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){T(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Te(n,e)},d(o){o&&z(t)}}}function yr(i){let t,e=i[0]&&br(i);return{c(){e&&e.c(),t=he()},m(n,o){e&&e.m(n,o),T(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=br(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function wr(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&Cr(i);return{c(){t=Q("div"),e=Q("span"),o=ke(n),s=Z(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){T(a,t,l),O(t,e),O(e,o),O(t,s),r&&r.m(t,null)},p(a,l){l&4&&n!==(n=a[2].price.value+"")&&Te(o,n),a[2].price.unit?r?r.p(a,l):(r=Cr(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&z(t),r&&r.d()}}}function Cr(i){let t,e=i[2].price.unit+"",n;return{c(){t=Q("span"),n=ke(e),b(t,"class","unit svelte-8mby9k")},m(o,s){T(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&Te(n,e)},d(o){o&&z(t)}}}function Er(i){let t,e=i[2].highlightText+"",n;return{c(){t=Q("div"),n=ke(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){T(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&Te(n,e)},d(o){o&&z(t)}}}function Yp(i){var G,U;let t,e,n,o,s,r,a,l,c,u,f,d,p,m,g=i[2].title+"",A,v,C,w,x;e=new Ve({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let D=i[2].brandTags||[],y=[];for(let I=0;I<D.length;I+=1)y[I]=vr(gr(i,D,I));let L=i[2].tags||[],P=[];for(let I=0;I<L.length;I+=1)P[I]=yr(pr(i,L,I));let j=((G=i[2].price)==null?void 0:G.value)!==void 0&&((U=i[2].price)==null?void 0:U.value)!==null&&wr(i),B=i[2].highlightText&&Er(i);return{c(){var I,S;t=Q("div"),$(e.$$.fragment),n=Z(),o=Q("div"),s=Z(),r=Q("div"),a=Q("img"),c=Z(),u=Q("div");for(let R=0;R<y.length;R+=1)y[R].c();f=Z();for(let R=0;R<P.length;R+=1)P[R].c();d=Z(),p=Q("div"),m=Q("div"),A=ke(g),v=Z(),C=Q("div"),j&&j.c(),w=Z(),B&&B.c(),b(o,"class","line svelte-8mby9k"),H(o,"transition-delay",i[1]?Bn+"ms":jn+Ir-Pr-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),et(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(u,"class","tag svelte-8mby9k"),b(m,"class","text svelte-8mby9k"),b(p,"class","title svelte-8mby9k"),b(C,"class","footer svelte-8mby9k"),H(C,"height",((I=i[2].price)==null?void 0:I.value)!==void 0&&((S=i[2].price)==null?void 0:S.value)!==null&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),H(r,"transition-delay",i[1]?Bn+jn+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),_(t,"unfolded",i[1]),_(t,"folded",i[3])},m(I,S){T(I,t,S),q(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),O(r,a),O(r,c),O(r,u);for(let R=0;R<y.length;R+=1)y[R].m(u,null);O(u,f);for(let R=0;R<P.length;R+=1)P[R].m(u,null);O(r,d),O(r,p),O(p,m),O(m,A),O(r,v),O(r,C),j&&j.m(C,null),O(C,w),B&&B.m(C,null),x=!0},p(I,[S]){var W,Y,ne,X;const R={};if(S&2&&(R.visible=I[1]),e.$set(R),S&2&&H(o,"transition-delay",I[1]?Bn+"ms":jn+Ir-Pr-40+"ms"),(!x||S&4&&!et(a.src,l=I[2].headerPictureUrl))&&b(a,"src",l),S&4){D=I[2].brandTags||[];let V;for(V=0;V<D.length;V+=1){const ue=gr(I,D,V);y[V]?y[V].p(ue,S):(y[V]=vr(ue),y[V].c(),y[V].m(u,f))}for(;V<y.length;V+=1)y[V].d(1);y.length=D.length}if(S&4){L=I[2].tags||[];let V;for(V=0;V<L.length;V+=1){const ue=pr(I,L,V);P[V]?P[V].p(ue,S):(P[V]=yr(ue),P[V].c(),P[V].m(u,null))}for(;V<P.length;V+=1)P[V].d(1);P.length=L.length}(!x||S&4)&&g!==(g=I[2].title+"")&&Te(A,g),((W=I[2].price)==null?void 0:W.value)!==void 0&&((Y=I[2].price)==null?void 0:Y.value)!==null?j?j.p(I,S):(j=wr(I),j.c(),j.m(C,w)):j&&(j.d(1),j=null),I[2].highlightText?B?B.p(I,S):(B=Er(I),B.c(),B.m(C,null)):B&&(B.d(1),B=null),S&4&&H(C,"height",((ne=I[2].price)==null?void 0:ne.value)!==void 0&&((X=I[2].price)==null?void 0:X.value)!==null&&I[2].highlightText?void 0:"1rem"),S&2&&H(r,"transition-delay",I[1]?Bn+jn+"ms":"0ms"),(!x||S&2)&&_(t,"unfolded",I[1]),(!x||S&8)&&_(t,"folded",I[3])},i(I){x||(k(e.$$.fragment,I),x=!0)},o(I){M(e.$$.fragment,I),x=!1},d(I){I&&z(t),K(e),tt(y,I),tt(P,I),j&&j.d(),B&&B.d()}}}const Bn=400,Pr=500,jn=180,Ir=500;function Up(i,t,e){let n,o,s,{tag:r}=t;return i.$$set=a=>{"tag"in a&&e(0,r=a.tag)},i.$$.update=()=>{var a,l;i.$$.dirty&1&&e(1,n=(l=(a=r.state)==null?void 0:a.unfolded)!=null?l:!1),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=r.data)},[r,n,s,o]}class Vp extends oe{constructor(t){super(),ie(this,t,Up,Yp,te,{tag:0},Xp)}}function Jp(i){ae(i,"svelte-1ku3wt4",`.audio.svelte-1ku3wt4.svelte-1ku3wt4{position:relative;width:100%;height:100%;cursor:pointer}@keyframes svelte-1ku3wt4-playing{25%{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='9' cy='9' r='8' transform='translate(-1 -1)' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}50%{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM5.533 6.685L4.169 8.049l1.414 1.413a2.078 2.078 0 0 0-.05-2.777z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}75%{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm-.656 4.874l-.906.905A3.35 3.35 0 0 1 7.369 8.1c0 .875-.333 1.67-.88 2.268l.906.906A4.628 4.628 0 0 0 8.65 8.101a4.627 4.627 0 0 0-1.306-3.227zm-1.811 1.81L4.169 8.05l1.414 1.413a2.078 2.078 0 0 0-.05-2.777z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}}.paused.svelte-1ku3wt4 .audio-icon.svelte-1ku3wt4{animation:none}.audio-icon.svelte-1ku3wt4.svelte-1ku3wt4{width:100%;height:100%;border-radius:50%;background-size:100%;animation:svelte-1ku3wt4-playing 2s steps(1) infinite;background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm1.428 2.79l-.953.952a6.222 6.222 0 0 1 1.775 4.36c0 1.571-.58 3.006-1.538 4.103l-.184.202.793.794a7.344 7.344 0 0 0 2.21-5.26A7.341 7.341 0 0 0 9.428 2.79zM7.344 4.873l-.906.905A3.35 3.35 0 0 1 7.369 8.1c0 .802-.28 1.537-.748 2.115l-.132.153.906.906A4.628 4.628 0 0 0 8.65 8.101a4.627 4.627 0 0 0-1.306-3.227zm-1.811 1.81L4.169 8.05l1.414 1.413a2.078 2.078 0 0 0-.05-2.777z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}`)}function xr(i){let t,e,n,o,s,r,a,l=!0,c,u,f,d,p;return e=new Ve({props:{center:!0,blurRadius:15,spreadRadius:6}}),{c(){t=Q("div"),$(e.$$.fragment),n=Z(),o=Q("div"),s=Z(),r=Q("audio"),b(o,"class","audio-icon svelte-1ku3wt4"),r.controls=!1,b(r,"playsinline",""),et(r.src,a=i[3])||b(r,"src",a),b(t,"class","audio svelte-1ku3wt4"),_(t,"paused",i[6])},m(m,g){T(m,t,g),q(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),i[9](r),f=!0,d||(p=[Pe(r,"play",i[10]),Pe(r,"pause",i[10]),Pe(t,"click",Zi(i[7]))],d=!0)},p(m,g){i=m,(!f||g&8&&!et(r.src,a=i[3]))&&b(r,"src",a),g&64&&l!==(l=i[6])&&r[l?"pause":"play"](),(!f||g&64)&&_(t,"paused",i[6])},i(m){f||(k(e.$$.fragment,m),m&&xe(()=>{u&&u.end(1),c=Ot(t,Tt,{duration:i[2],delay:i[0],easing:Zt}),c.start()}),f=!0)},o(m){M(e.$$.fragment,m),c&&c.invalidate(),m&&(u=$t(t,Tt,{duration:i[2],delay:i[1],easing:Zt})),f=!1},d(m){m&&z(t),K(e),i[9](null),m&&u&&u.end(),d=!1,rt(p)}}}function Zp(i){let t,e,n=i[4]&&xr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[4]?n?(n.p(o,s),s&16&&k(n,1)):(n=xr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function _p(i,t,e){let{inDelay:n=0}=t,{outDelay:o=0}=t,{duration:s=0}=t,{url:r}=t,{unfolded:a}=t,{hooksInfo:l={}}=t;const c=mn("hooks"),u=mn("mediaStore");let f,d=!0;u.subscribe(({currentMediaUrl:A})=>{A!==r&&(f==null||f.pause())});function p(A){u.set({currentMediaUrl:r}),f&&(c.emit("click",N({event:A,target:"AudioTagPlayIcon",audioInstance:f},l)),f.paused?f.play():f.pause(),e(5,f.onplay=v=>c.emit("playStateChange",N({event:v,state:"playing",mediaInstance:f},l)),f),e(5,f.onpause=v=>c.emit("playStateChange",N({event:v,state:"paused",mediaInstance:f},l)),f))}function m(A){Me[A?"unshift":"push"](()=>{f=A,e(5,f)})}function g(){d=this.paused,e(6,d)}return i.$$set=A=>{"inDelay"in A&&e(0,n=A.inDelay),"outDelay"in A&&e(1,o=A.outDelay),"duration"in A&&e(2,s=A.duration),"url"in A&&e(3,r=A.url),"unfolded"in A&&e(4,a=A.unfolded),"hooksInfo"in A&&e(8,l=A.hooksInfo)},i.$$.update=()=>{i.$$.dirty&48&&(a||f==null||f.pause())},[n,o,s,r,a,f,d,p,l,m,g]}class qp extends oe{constructor(t){super(),ie(this,t,_p,Zp,te,{inDelay:0,outDelay:1,duration:2,url:3,unfolded:4,hooksInfo:8},Jp)}}function Kp(i){ae(i,"svelte-4r8s18",".audio-tag.svelte-4r8s18.svelte-4r8s18{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.line.svelte-4r8s18.svelte-4r8s18{display:flex;position:absolute;top:0;left:0;width:10.125rem;height:0.0625rem;transform:translate3d(0, -50%, 0.625rem)}.content.svelte-4r8s18.svelte-4r8s18{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0.125rem;overflow:hidden;box-sizing:border-box;font-size:0;white-space:nowrap;font-weight:600}.wrapper.svelte-4r8s18.svelte-4r8s18{position:relative;width:100%;height:100%}.audio-icon.svelte-4r8s18.svelte-4r8s18{vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.unfolded.svelte-4r8s18 .audio-icon.svelte-4r8s18{pointer-events:auto}")}function kr(i){var C,w,x,D;let t,e,n,o,s,r,a,l,c,u,f,d,p,m,g,A,v;return e=new Ve({props:{visible:i[5],left:i[2]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),s=new Wa({props:{unfolded:i[5],duration:1e3,outDelay:i[4]+20*Math.min((w=(C=i[3][0])==null?void 0:C.content.length)!=null?w:10,15)}}),u=new qp({props:{unfolded:i[5],url:i[0].data.audioUrl,duration:1e3,outDelay:20*Math.min((D=(x=i[3][0])==null?void 0:x.content.length)!=null?D:10,15),hooksInfo:{tag:i[0]}}}),p=new Ya({props:{visible:i[5],textUnfolded:i[1],textItems:i[3]}}),{c(){t=Q("div"),$(e.$$.fragment),n=Z(),o=Q("div"),$(s.$$.fragment),r=Z(),a=Q("div"),l=Q("div"),c=Q("div"),$(u.$$.fragment),f=Z(),d=Q("div"),$(p.$$.fragment),b(o,"class","line svelte-4r8s18"),H(o,"width",i[2]+"px"),b(c,"class","audio-icon svelte-4r8s18"),H(d,"display","inline-block"),b(l,"class","wrapper svelte-4r8s18"),b(a,"class","content svelte-4r8s18"),xe(()=>i[8].call(a)),b(t,"class","audio-tag svelte-4r8s18"),_(t,"unfolded",i[5])},m(y,L){T(y,t,L),q(e,t,null),O(t,n),O(t,o),q(s,o,null),O(t,r),O(t,a),O(a,l),O(l,c),q(u,c,null),O(l,f),O(l,d),q(p,d,null),m=vt(a,i[8].bind(a)),g=!0,A||(v=Pe(d,"click",i[6]),A=!0)},p(y,L){var U,I,S,R;const P={};L&32&&(P.visible=y[5]),L&4&&(P.left=y[2]/2+"px"),e.$set(P);const j={};L&32&&(j.unfolded=y[5]),L&24&&(j.outDelay=y[4]+20*Math.min((I=(U=y[3][0])==null?void 0:U.content.length)!=null?I:10,15)),s.$set(j),L&4&&H(o,"width",y[2]+"px");const B={};L&32&&(B.unfolded=y[5]),L&1&&(B.url=y[0].data.audioUrl),L&8&&(B.outDelay=20*Math.min((R=(S=y[3][0])==null?void 0:S.content.length)!=null?R:10,15)),L&1&&(B.hooksInfo={tag:y[0]}),u.$set(B);const G={};L&32&&(G.visible=y[5]),L&2&&(G.textUnfolded=y[1]),L&8&&(G.textItems=y[3]),p.$set(G),(!g||L&32)&&_(t,"unfolded",y[5])},i(y){g||(k(e.$$.fragment,y),k(s.$$.fragment,y),k(u.$$.fragment,y),k(p.$$.fragment,y),g=!0)},o(y){M(e.$$.fragment,y),M(s.$$.fragment,y),M(u.$$.fragment,y),M(p.$$.fragment,y),g=!1},d(y){y&&z(t),K(e),K(s),K(u),K(p),m(),A=!1,v()}}}function $p(i){let t,e,n=i[0].state&&kr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=kr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function eg(i,t,e){let n,o,s,{tag:r}=t,a=!1,l,c=[];function u(){e(1,a=!a)}function f(){l=this.clientWidth,e(2,l)}return i.$$set=d=>{"tag"in d&&e(0,r=d.tag)},i.$$.update=()=>{var d;i.$$.dirty&1&&e(5,n=!!((d=r.state)!=null&&d.unfolded)),i.$$.dirty&1&&e(7,o=r.data.text),i.$$.dirty&128&&e(3,c=[{id:He(),content:o}]),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,n,u,o,f]}class tg extends oe{constructor(t){super(),ie(this,t,eg,$p,te,{tag:0},Kp)}}function ng(i){ae(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function Dr(i){let t,e,n;return e=new Ja({props:{unfolded:i[5],mediaData:i[4],objectFit:i[2],enableCarousel:i[1],autoplayConfig:i[3],tag:i[0],canPlay:!0,playButtonIfNeed:"large",inDelay:500,duration:500}}),{c(){t=Q("div"),$(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(o,s){T(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&32&&(r.unfolded=o[5]),s&16&&(r.mediaData=o[4]),s&4&&(r.objectFit=o[2]),s&2&&(r.enableCarousel=o[1]),s&8&&(r.autoplayConfig=o[3]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){M(e.$$.fragment,o),n=!1},d(o){o&&z(t),K(e)}}}function ig(i){let t,e,n=i[0].state&&i[4]&&Dr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[0].state&&o[4]?n?(n.p(o,s),s&17&&k(n,1)):(n=Dr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function og(i,t,e){let n,o,s,r,a,{tag:l}=t;return i.$$set=c=>{"tag"in c&&e(0,l=c.tag)},i.$$.update=()=>{var c,u;i.$$.dirty&1&&e(5,n=l.state?l.state.unfolded:!1),i.$$.dirty&1&&e(4,o=l.data.mediaData),i.$$.dirty&1&&e(1,s=l.data.enableCarousel),i.$$.dirty&3&&e(3,r=(c=l.data.autoplayConfig)!=null?c:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,a=(u=l.data.objectFit)!=null?u:(()=>l.data.adaptationMode==="stretch"?"cover":l.data.adaptationMode==="proportional"?"contain":void 0)())},[l,s,a,r,o,n]}class sg extends oe{constructor(t){super(),ie(this,t,og,ig,te,{tag:0},ng)}}function rg(i){ae(i,"svelte-7x7u86",".wrapper.svelte-7x7u86{font-weight:600;cursor:pointer;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:auto}.text-wrapper.svelte-7x7u86{position:relative;display:flex;align-items:center;justify-content:center}.icon.svelte-7x7u86{position:relative;margin-bottom:0.6875rem}.arrow0.svelte-7x7u86,.arrow1.svelte-7x7u86,.arrow2.svelte-7x7u86{position:absolute;width:1.625rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAAkCAYAAAAnxQwhAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAATqADAAQAAAABAAAAJAAAAABrx2urAAAGm0lEQVRoBd2ZXbCVUxjH26QSfSCS0JwoFNEZ0cc45iSmUUaqC+KCwUUXxYUZw4yrLhozLlDDRWa6oW5yOFTT0IcyKn1JnIjDKelLPipJcXT8fttaZ95qd+yzv+uZ+e211rvfd61n/ddaz1rv3qkOFWgtLS3n4Vb34NqhVCr1d6W5mao0hxBNwfrCOcG346S7Ee9gKFdEUjHCIZi+XA69E8p4rQVM98EeBLRcdqsI4RCtI0r0h4uCIvo1BZx1b4GzTjsA3yFec7pUxo+yC4doXen/IDg/6GB5GlSH8mbSWXA4lI+SNiDekVAuS1JW4RCtF72+EWI8c6k+A6ZJc5m+BHvCxX9ItyLe/lAueVIW4UI8u4beDkj02FnnTOuUuJbM/kVhNjQkLjaSbyxH3Cu5cIjmUWMoOKti+2PIT4JsrI6blkKMe87GTYhX0iNLdDwbh/O+B9G6UclIMNWcXQ/CrRbaYRu5dz44C7XfYTXimZbESiYconk2GwGdwSOF4j0JV0AuZrybA4plfYq4BvF2kRbdSiIcog2hJ+6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AtmOF3Pyoz5srJ8bCZaw68M95NJU4GshlNf1dAf4i+15F/Bb9b416rGDRuPHsRHCHN2PEz3GahDXMq/wR9wfgTGyObFnE56ULwDxW/K5rRB/tTDa4YY2Imf3Zx/TIwFLVl6/iyF8SNxxX0LH1Ix720cDRoTJgNcbT2hwdUPZPZeCNYsc9EQazPEV4NTm9/zjlKWnKjT11otBYUcRS4AuKgmjrYToxrwUHPZN9z0Ql0afhyL+k0+rQtRQOu/3qIAhjIB0IPSJrrvwEcARvTko44896DhXFUvKESjD66msbD/eBMSw60eQVygAfDyXH8INe2gZPLiaF4ExTucTLPg2aMGg7uVpqzZwu4tm8Ad7UoFtn0q4ti1SHWt16odKO/A/DxAZgAcYVFt+3nV2AcHAIdQTsOa6Ea7P9MhZtB5jHQmsDltwMM8qrszFPpaEfILIYF4H+ZVnrGGf12coyEyXAvdIU4KUydaa4+r/cDl3UVaHMVzun7erp4+g/FWQWK5a6oeGeNoYHijAVFrIG44shmtKkK52x6FSZluMW4pVjvIJbHibPe0MPl61JWxEEZOvw216a3LkEeGMGFO0D1d8KqMyVu4WtRDE2Mh85Az6Wuso/RZA1ph38BBMvNbHuq7kAAAAAASUVORK5CYII=);background-repeat:no-repeat;background-size:contain;animation-fill-mode:backwards;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.2s}.arrow1.svelte-7x7u86{position:relative}.arrow0.svelte-7x7u86{top:-0.75rem;animation-name:svelte-7x7u86-up0}.arrow1.svelte-7x7u86{animation-name:svelte-7x7u86-up1}.arrow2.svelte-7x7u86{top:0.75rem;animation-name:svelte-7x7u86-up2}.text.svelte-7x7u86{position:absolute;top:0;font-size:0.875rem;color:#ffffff;letter-spacing:0;text-align:center;max-width:8.75rem;width:-moz-max-content;width:max-content;word-break:break-all;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}@keyframes svelte-7x7u86-up0{0%{opacity:0.8;transform:translate3d(0, 0, 0) scale(0.84)}33.33%,100%{opacity:0;transform:translate3d(0, -0.75rem, 0) scale(0.84)}}@keyframes svelte-7x7u86-up1{0%{opacity:1;transform:translate3d(0, 0, 0) scale(1)}33.33%,100%{opacity:0.8;transform:translate3d(0, -0.75rem, 0) scale(0.84)}}@keyframes svelte-7x7u86-up2{0%{opacity:0}33.33%,100%{opacity:1;transform:translate3d(0, -0.75rem, 0)}}.link.svelte-7x7u86{position:relative;width:1.75rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAkCAMAAAAgl+0yAAAAnFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+TINBkAAAAM3RSTlMAjLy6ILM2Fi+Zng3BrPvao4VC9ceneQfKkmNdV1AbEeLOsHA77ujUtn5JLnRraSUUjVLj/+RVAAABhElEQVRIx63V2W6CQBiGYUBUQGDYdwTZQZZa7v/eimik/ket/7yZ4yeTTCYf8+dOX8etxGVoxAvCVbguR3g0uRTMA0w4odGi+CbzFnGKosCqrmHc5rdEwzCwqtGFJlC7DqtOcTxANY67BHnVKOpVoEZRjFPdLgxbqIZhhFTjINChGgThF06NhpGd35OGMcCppyDPfajm+YhUR8cRoeo4+RGlJnnbalBt2x6nHh1dt4Gq6bqDU886y2ZQZVn9jFJ51vcbqPo+Up18UeSgKoo3nHqVJEkGqi1JPk49aLZmQdW2xXf1zP+vUFHsC1QVReK33xdk+w9SaqAq+732UvvdZ2UEqrud8lR5Wc4a7pO8GaoL9VBjy7rMlMosq1lV43LhZlrtF+yuJlbtEXpqXXP3NYwI8VJqakOIziw5aepV1FQuTdfhvlWVZdJCrao6MPe0spRpqV5ZFivqNqYpq3RQ2TST5/h4quoRCmwqq6rymol6plV53IZSomTKE/MroWfxDevL/wAEdPq1eGDh4AAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-size:contain;animation-iteration-count:infinite;animation-timing-function:linear;animation-duration:1.2s;animation-name:svelte-7x7u86-left-right}@keyframes svelte-7x7u86-left-right{0%,100%{opacity:0.8;transform:translateX(-0.3125rem)}50%{opacity:1;transform:translateX(0)}}")}function ag(i){let t,e,n,o;return t=new Ve({props:{visible:!0,outDelay:0,inDelay:0,width:1.4,left:13,bottom:"auto",blurRadius:50,spreadRadius:18}}),{c(){$(t.$$.fragment),e=Z(),n=Q("div"),b(n,"class","link svelte-7x7u86")},m(s,r){q(t,s,r),T(s,e,r),T(s,n,r),o=!0},i(s){o||(k(t.$$.fragment,s),o=!0)},o(s){M(t.$$.fragment,s),o=!1},d(s){K(t,s),s&&z(e),s&&z(n)}}}function lg(i){let t,e,n,o,s,r,a,l;return t=new Ve({props:{visible:!0,outDelay:0,inDelay:0,height:1.2,left:13,bottom:12,blurRadius:50,spreadRadius:18}}),{c(){$(t.$$.fragment),e=Z(),n=Q("div"),o=Z(),s=Q("div"),r=Z(),a=Q("div"),b(n,"class","arrow0 svelte-7x7u86"),b(s,"class","arrow1 svelte-7x7u86"),b(a,"class","arrow2 svelte-7x7u86")},m(c,u){q(t,c,u),T(c,e,u),T(c,n,u),T(c,o,u),T(c,s,u),T(c,r,u),T(c,a,u),l=!0},i(c){l||(k(t.$$.fragment,c),l=!0)},o(c){M(t.$$.fragment,c),l=!1},d(c){K(t,c),c&&z(e),c&&z(n),c&&z(o),c&&z(s),c&&z(r),c&&z(a)}}}function cg(i){let t,e,n,o,s,r,a,l,c,u=i[0].text+"",f,d;const p=[lg,ag],m=[];function g(A,v){return A[0].linkType===ei.VrLink?0:A[0].linkType===ei.NormalLink?1:-1}return~(n=g(i))&&(o=m[n]=p[n](i)),a=new Ve({props:{visible:!0,outDelay:0,inDelay:0,left:"auto",bottom:"auto",width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=Q("div"),e=Q("div"),o&&o.c(),s=Z(),r=Q("div"),$(a.$$.fragment),l=Z(),c=Q("div"),f=ke(u),b(e,"class","icon svelte-7x7u86"),b(c,"class","text svelte-7x7u86"),b(r,"class","text-wrapper svelte-7x7u86"),b(t,"class","wrapper svelte-7x7u86")},m(A,v){T(A,t,v),O(t,e),~n&&m[n].m(e,null),O(t,s),O(t,r),q(a,r,null),O(r,l),O(r,c),O(c,f),d=!0},p(A,[v]){let C=n;n=g(A),n!==C&&(o&&(le(),M(m[C],1,1,()=>{m[C]=null}),ce()),~n?(o=m[n],o||(o=m[n]=p[n](A),o.c()),k(o,1),o.m(e,null)):o=null),(!d||v&1)&&u!==(u=A[0].text+"")&&Te(f,u)},i(A){d||(k(o),k(a.$$.fragment,A),d=!0)},o(A){M(o),M(a.$$.fragment,A),d=!1},d(A){A&&z(t),~n&&m[n].d(),K(a)}}}function ug(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(1,o=s.tag)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=o.data)},[n,o]}class dg extends oe{constructor(t){super(),ie(this,t,ug,cg,te,{tag:1},rg)}}function fg(i){ae(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function Lr(i){let t,e=i[0].element+"",n;return{c(){t=new Yn(!1),n=he(),t.a=n},m(o,s){t.m(e,o,s),T(o,n,s)},p(o,s){s&1&&e!==(e=o[0].element+"")&&t.p(e)},d(o){o&&z(n),o&&t.d()}}}function hg(i){let t,e=typeof i[0].element=="string"&&Lr(i);return{c(){t=Q("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){T(n,t,o),e&&e.m(t,null),i[2](t)},p(n,[o]){typeof n[0].element=="string"?e?e.p(n,o):(e=Lr(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:ee,o:ee,d(n){n&&z(t),e&&e.d(),i[2](null)}}}function mg(i,t,e){let{tag:n}=t,o,s;Ye(()=>{if(o){if(n.element instanceof Element){const a=n.element;o.appendChild(a),s=()=>o==null?void 0:o.removeChild(a)}else if(typeof n.element=="function"){const a=n.element;s=a(o)}}}),bt(()=>{s==null||s()});function r(a){Me[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class pg extends oe{constructor(t){super(),ie(this,t,mg,hg,te,{tag:0},fg)}}function gg(i){ae(i,"svelte-95x526",`@font-face{font-family:'TG-TYPE';font-style:normal;font-weight:400;src:local('TG-TYPE-Bold'),
|
|
544
|
+
`))&&b(t,"style",e),a&8&&H(t,"width",Ne(i[3])),a&16&&H(t,"height",Ne(i[4])),a&8192&&H(t,"z-index",i[13])},i(r){s||(r&&xe(()=>{o&&o.end(1),n=Ot(t,Tt,{duration:i[0]}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=$t(t,Tt,{duration:i[1]})),s=!1},d(r){r&&z(t),r&&o&&o.end()}}}function Fm(i){let t,e=i[2]&&Hs(i);return{c(){e&&e.c(),t=he()},m(n,o){e&&e.m(n,o),T(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&k(e,1)):(e=Hs(n),e.c(),k(e,1),e.m(t.parentNode,t)):e&&(le(),M(e,1,1,()=>{e=null}),ce())},i(n){k(e)},o(n){M(e)},d(n){e&&e.d(n),n&&z(t)}}}function Ne(i){return typeof i=="number"?i/16+"rem":i}function Gm(i,t,e){let{inDelay:n=1e3}=t,{outDelay:o=1e3}=t,{visible:s=!0}=t,{width:r=0}=t,{height:a=0}=t,{left:l=0}=t,{bottom:c=0}=t,{center:u=!1}=t,{horizontalCenter:f=!1}=t,{verticalCenter:d=!1}=t,{blurRadius:p}=t,{spreadRadius:m}=t,{opacity:g=.15}=t,{zIndex:A=void 0}=t;return i.$$set=v=>{"inDelay"in v&&e(0,n=v.inDelay),"outDelay"in v&&e(1,o=v.outDelay),"visible"in v&&e(2,s=v.visible),"width"in v&&e(3,r=v.width),"height"in v&&e(4,a=v.height),"left"in v&&e(5,l=v.left),"bottom"in v&&e(6,c=v.bottom),"center"in v&&e(7,u=v.center),"horizontalCenter"in v&&e(8,f=v.horizontalCenter),"verticalCenter"in v&&e(9,d=v.verticalCenter),"blurRadius"in v&&e(10,p=v.blurRadius),"spreadRadius"in v&&e(11,m=v.spreadRadius),"opacity"in v&&e(12,g=v.opacity),"zIndex"in v&&e(13,A=v.zIndex)},[n,o,s,r,a,l,c,u,f,d,p,m,g,A]}class Ve extends oe{constructor(t){super(),ie(this,t,Gm,Fm,te,{inDelay:0,outDelay:1,visible:2,width:3,height:4,left:5,bottom:6,center:7,horizontalCenter:8,verticalCenter:9,blurRadius:10,spreadRadius:11,opacity:12,zIndex:13},Hm)}}function Nm(){return Math.random().toString(36).slice(-6)}const Fs=Nm();function Wm(i){ae(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function Gs(i,t,e){const n=i.slice();return n[10]=t[e],n[11]=t,n[12]=e,n}function Ns(i){let t,e=i[10]+"",n,o=i[12];const s=()=>i[6](t,o),r=()=>i[6](null,o);return{c(){t=Q("span"),n=ke(e),b(t,"class","text-char svelte-1b2n9wi")},m(a,l){T(a,t,l),O(t,n),s()},p(a,l){i=a,l&2&&e!==(e=i[10]+"")&&Te(n,e),o!==i[12]&&(r(),o=i[12],s())},d(a){a&&z(t),r()}}}function Xm(i){let t,e=i[1],n=[];for(let o=0;o<e.length;o+=1)n[o]=Ns(Gs(i,e,o));return{c(){for(let o=0;o<n.length;o+=1)n[o].c();t=he()},m(o,s){for(let r=0;r<n.length;r+=1)n[r].m(o,s);T(o,t,s)},p(o,[s]){if(s&3){e=o[1];let r;for(r=0;r<e.length;r+=1){const a=Gs(o,e,r);n[r]?n[r].p(a,s):(n[r]=Ns(a),n[r].c(),n[r].m(t.parentNode,t))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},i:ee,o:ee,d(o){tt(n,o),o&&z(t)}}}function Ym(i,t,e){let n,{inDelay:o=0}=t,{outDelay:s=0}=t,{content:r}=t,{unfolded:a}=t,l,c=[],u;function f(p){clearTimeout(l),l=setTimeout(function(){!u||(p&&u.reversed||!p&&!u.reversed)&&(u.reverse(),u.play())},p?o:s)}Ye(function(){const p=(()=>{const m=jm(g=>c[g].getBoundingClientRect().x,[Math.min(c.length-1,10),Math.min(c.length-1,30)]);if(m>0)return m})();u=Ao.default({targets:c.filter(Bt).slice(0,p),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:Ao.default.stagger(50),easing:"easeInOutCubic"}),a&&u.seek(u.duration)});function d(p,m){Me[p?"unshift":"push"](()=>{c[m]=p,e(0,c)})}return i.$$set=p=>{"inDelay"in p&&e(2,o=p.inDelay),"outDelay"in p&&e(3,s=p.outDelay),"content"in p&&e(4,r=p.content),"unfolded"in p&&e(5,a=p.unfolded)},i.$$.update=()=>{i.$$.dirty&16&&e(1,n=(()=>{const p=[],m=new RegExp(new RegExp("\\p{Regional_Indicator}\\p{Regional_Indicator}|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?(\\u200D\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?)+|\\p{Emoji_Presentation}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)","gu")),g=`__EMOJI_SPLIT_${Fs}__`,A=`__EMOJI_${Fs}__`;return r.slice().replace(m,v=>`${g}${A}${v}${g}`).split(g).forEach(v=>v.startsWith(A)?p.push(v.slice(A.length)):p.push(...v.split(""))),p.filter(Boolean)})()),i.$$.dirty&32&&f(a)},[c,n,o,s,r,a,d]}class Xa extends oe{constructor(t){super(),ie(this,t,Ym,Xm,te,{inDelay:2,outDelay:3,content:4,unfolded:5},Wm)}}const Um="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADA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yQYqD9ku7969e9O8efPSNOmY3TXjMHN+tmhaKDdJ+JFo5C/cdnV1ddIjrJGdkoKUx8HsdP60atWqf3C8RARmzg2m4UXfSM9jeSW8rq6u8vr163+TV8JfyQx3e9LZuHHjoQsXLvSMdKckYt9KL53tu/sBHXeeeJMk0rdJ5P2kQXkvqXXOnDnlEr8pTyUPrVmz5qvOzs7/lQTCkU4y1LtGkjIfmIlMnJ+K/MojfzIrl8B3kpU1osxJSYtTAL8wKf4EYJQFk+JeQMlvE3UcLRmTkkUANm1ZOZmE24dqGU5gOfCyZkyGWQT+IykW8zmSz0IpiLNN8t5iTmdTkgGTrInI7JcfULaH10Qnh/4IMVjAxNk6jxwajuUb8lqOZRT3S/lx06RY1g8C4akfiEJAOZdFKzsq/nNjIssdufjbhQAEAUodOGDWp4m8S0oHEhb+YexGkD4EBUpdVMrfl/E/RhNJnsjF/ls0r980YRQDlAqBylIqylcCzf4lHecB5veigSfmYoBycaxN2SHgT8e7pWKZwCzqzZpigUr9DlRuoIxXn8pIZJgHtkwpa8togHIiw587LeNx9mc2ZwIK5DOlXJaMFqhWwoMp/Ax+1W+ToOXTHGKNrDMLLo38LmKsQKmbdSrWil+N82UJaS40YTuJv/RdtAdpzet+aJDzvMpQV71oo2gYX5RXG2HnYZXtouzNRzXE3R0KE6jWjZU2iaZ9u8pqpU3UfvwrYSgSBVDtGDurBlHn/zj0QMIh7qlDNOfmcBj9ihKo9o+l1euiWGxSE5eun3na6jxQk3joEgdQ7TR+FWutE43lhQpph3sQvISAVRa9ppRzipY4gZqdw8/WigIWDWt1gD8EIsqSLlT/KPUVlKSAujs2XTLYeRHiIlA2DVi1qkRtK8PSULaEDF+Ue7ashwkTlf8DQc/cITdx9+UAAAAASUVORK5CYII=";function Vm(i){ae(i,"svelte-1ogmlqq",".arrow.svelte-1ogmlqq{width:100%;height:100%;background-size:100%;transition:transform 400ms ease-in-out;cursor:pointer;pointer-events:auto}.arrow-wrapper.svelte-1ogmlqq{position:relative;width:100%;height:100%}.arrow.left.svelte-1ogmlqq{transform:rotate(0deg)}.arrow.right.svelte-1ogmlqq{transform:rotate(-180deg)}.arrow.top.svelte-1ogmlqq{transform:rotate(90deg)}.arrow.bottom.svelte-1ogmlqq{transform:rotate(-90deg)}")}function Ys(i){let t,e,n,o,s,r,a,l,c,u;return e=new Ve({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=Q("div"),$(e.$$.fragment),n=Z(),o=Q("div"),b(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),H(o,"background-image","url("+Um+")"),b(t,"class","arrow-wrapper svelte-1ogmlqq")},m(f,d){T(f,t,d),q(e,t,null),O(t,n),O(t,o),l=!0,c||(u=Pe(o,"click",i[5]),c=!0)},p(f,d){i=f,(!l||d&1&&s!==(s="arrow "+i[0]+" svelte-1ogmlqq"))&&b(o,"class",s)},i(f){l||(k(e.$$.fragment,f),f&&xe(()=>{a&&a.end(1),r=Ot(o,Tt,{duration:i[2],delay:i[3],easing:Zt}),r.start()}),l=!0)},o(f){M(e.$$.fragment,f),r&&r.invalidate(),f&&(a=$t(o,Tt,{duration:i[2],delay:i[4],easing:Zt})),l=!1},d(f){f&&z(t),K(e),f&&a&&a.end(),c=!1,u()}}}function Jm(i){let t,e,n=i[1]&&Ys(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Ys(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Zm(i,t,e){let{direction:n="right"}=t,{visible:o=!0}=t,{duration:s=0}=t,{inDelay:r=0}=t,{outDelay:a=0}=t;function l(c){nc.call(this,i,c)}return i.$$set=c=>{"direction"in c&&e(0,n=c.direction),"visible"in c&&e(1,o=c.visible),"duration"in c&&e(2,s=c.duration),"inDelay"in c&&e(3,r=c.inDelay),"outDelay"in c&&e(4,a=c.outDelay)},[n,o,s,r,a,l]}class _m extends oe{constructor(t){super(),ie(this,t,Zm,Jm,te,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},Vm)}}function qm(i,t,e=20,n=5){return new Promise((o,s)=>{let r=0;const a=setInterval(()=>{const l=i();t(l)?(clearInterval(a),o(l)):r>=n&&(clearInterval(a),s(l)),r++},e)})}function Km(i){ae(i,"svelte-1fuzm7v",".text.svelte-1fuzm7v{pointer-events:auto;box-sizing:border-box;display:inline-block;max-width:7.5rem;transition:transform 400ms ease-in-out;font-size:0.75rem;line-height:1.125rem;white-space:initial;cursor:pointer}.arrow.svelte-1fuzm7v{pointer-events:auto;display:inline-block;vertical-align:top;width:0.875rem;height:0.875rem;margin-left:0.125rem;margin-top:0.125rem}")}function Us(i,t,e){const n=i.slice();return n[11]=t[e].id,n[12]=t[e].content,n}function Vs(i,t){let e,n,o;return n=new Xa({props:{unfolded:t[0],content:t[12],inDelay:500,outDelay:t[5]}}),{key:i,first:null,c(){e=Q("div"),$(n.$$.fragment),b(e,"class","text svelte-1fuzm7v"),H(e,"transform",t[7]),this.first=e},m(s,r){T(s,e,r),q(n,e,null),t[10](e),o=!0},p(s,r){t=s;const a={};r&1&&(a.unfolded=t[0]),r&2&&(a.content=t[12]),r&32&&(a.outDelay=t[5]),n.$set(a),r&128&&H(e,"transform",t[7])},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),K(n),t[10](null)}}}function Js(i){let t,e,n;return e=new _m({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=Q("div"),$(e.$$.fragment),b(t,"class","arrow svelte-1fuzm7v")},m(o,s){T(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&64&&(r.direction=o[6]),s&1&&(r.visible=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){M(e.$$.fragment,o),n=!1},d(o){o&&z(t),K(e)}}}function $m(i){let t=[],e=new Map,n,o,s,r=i[1];const a=c=>c[11];for(let c=0;c<r.length;c+=1){let u=Us(i,r,c),f=a(u);e.set(f,t[c]=Vs(f,u))}let l=i[3]<i[4]&&Js(i);return{c(){for(let c=0;c<t.length;c+=1)t[c].c();n=Z(),l&&l.c(),o=he()},m(c,u){for(let f=0;f<t.length;f+=1)t[f].m(c,u);T(c,n,u),l&&l.m(c,u),T(c,o,u),s=!0},p(c,[u]){u&167&&(r=c[1],le(),t=Ue(t,u,a,1,c,r,e,n.parentNode,at,Vs,n,Us),ce()),c[3]<c[4]?l?(l.p(c,u),u&24&&k(l,1)):(l=Js(c),l.c(),k(l,1),l.m(o.parentNode,o)):l&&(le(),M(l,1,1,()=>{l=null}),ce())},i(c){if(!s){for(let u=0;u<r.length;u+=1)k(t[u]);k(l),s=!0}},o(c){for(let u=0;u<t.length;u+=1)M(t[u]);M(l),s=!1},d(c){for(let u=0;u<t.length;u+=1)t[u].d(c);c&&z(n),l&&l.d(c),c&&z(o)}}}function ep(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{textItems:l}=t,c,u=0,f=0,d=0;function p(m){Me[m?"unshift":"push"](()=>{c=m,e(2,c)})}return i.$$set=m=>{"visible"in m&&e(0,r=m.visible),"textUnfolded"in m&&e(8,a=m.textUnfolded),"textItems"in m&&e(1,l=m.textItems)},i.$$.update=()=>{if(i.$$.dirty&5&&c&&r){const{lineHeight:m}=getComputedStyle(c);e(4,d=c.offsetHeight),qm(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,d=c.offsetHeight)}),e(3,f=Number(m.replace("px","")))}i.$$.dirty&280&&e(9,u=a?f-d:0),i.$$.dirty&512&&e(7,n=`translateY(${u}px)`),i.$$.dirty&256&&e(6,o=a?"left":"right"),i.$$.dirty&256&&e(5,s=a?450:0)},[r,l,c,f,d,s,o,n,a,u,p]}class Ya extends oe{constructor(t){super(),ie(this,t,ep,$m,te,{visible:0,textUnfolded:8,textItems:1},Km)}}function tp(i){ae(i,"svelte-18yy5x8",".line.svelte-18yy5x8{position:absolute;top:0;left:0;width:10.125rem;height:0.0625rem;transform:translate3d(0, -50%, 0.625rem)}.content.svelte-18yy5x8{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0;overflow:hidden;box-sizing:border-box;font-size:0;pointer-events:none;white-space:nowrap;font-weight:600}")}function Zs(i){var d,p;let t,e,n,o,s,r,a,l,c,u,f;return t=new Ve({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),o=new Wa({props:{unfolded:i[2],duration:1e3,outDelay:i[5]+40*Math.min((p=(d=i[4][0])==null?void 0:d.content.length)!=null?p:10,15)}}),a=new Ya({props:{visible:i[2],textUnfolded:i[1],textItems:i[4]}}),{c(){$(t.$$.fragment),e=Z(),n=Q("div"),$(o.$$.fragment),s=Z(),r=Q("div"),$(a.$$.fragment),b(n,"class","line svelte-18yy5x8"),H(n,"width",i[3]+"px"),b(r,"class","content svelte-18yy5x8"),xe(()=>i[8].call(r))},m(m,g){q(t,m,g),T(m,e,g),T(m,n,g),q(o,n,null),T(m,s,g),T(m,r,g),q(a,r,null),l=bt(r,i[8].bind(r)),c=!0,u||(f=Pe(r,"click",i[6]),u=!0)},p(m,g){var w,x;const A={};g&4&&(A.visible=m[2]),g&8&&(A.left=m[3]/2+"px"),t.$set(A);const v={};g&4&&(v.unfolded=m[2]),g&48&&(v.outDelay=m[5]+40*Math.min((x=(w=m[4][0])==null?void 0:w.content.length)!=null?x:10,15)),o.$set(v),g&8&&H(n,"width",m[3]+"px");const C={};g&4&&(C.visible=m[2]),g&2&&(C.textUnfolded=m[1]),g&16&&(C.textItems=m[4]),a.$set(C)},i(m){c||(k(t.$$.fragment,m),k(o.$$.fragment,m),k(a.$$.fragment,m),c=!0)},o(m){M(t.$$.fragment,m),M(o.$$.fragment,m),M(a.$$.fragment,m),c=!1},d(m){K(t,m),m&&z(e),m&&z(n),K(o),m&&z(s),m&&z(r),K(a),l(),u=!1,f()}}}function np(i){let t,e,n=i[0].state&&Zs(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=Zs(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function ip(i,t,e){let n,o,s,{tag:r}=t,a,l=!1,c=[];function u(){e(1,l=!l)}function f(){a=this.clientWidth,e(3,a)}return i.$$set=d=>{"tag"in d&&e(0,r=d.tag)},i.$$.update=()=>{var d;i.$$.dirty&1&&e(2,n=!!((d=r.state)!=null&&d.unfolded)),i.$$.dirty&1&&e(7,o=r.data.text),i.$$.dirty&128&&e(4,c=[{id:He(),content:o}]),i.$$.dirty&4&&(n||setTimeout(()=>{e(1,l=!1)},20)),i.$$.dirty&2&&e(5,s=l?450:0)},[r,l,n,a,c,s,u,o,f]}class op extends oe{constructor(t){super(),ie(this,t,ip,np,te,{tag:0},tp)}}function sp(i){ae(i,"svelte-e72ouh",".line.svelte-e72ouh{width:100%;height:100%;overflow:visible}")}function _s(i){let t,e,n,o;return{c(){t=Ae("path"),b(t,"fill","none"),b(t,"stroke","url(#"+i[4]+")"),b(t,"stroke-width","1"),b(t,"d","M0 21 L14 0.5 L105 0.5")},m(s,r){T(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&xe(()=>{n&&n.end(1),e=Ot(t,qn,{duration:i[1],delay:i[0],easing:da}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=$t(t,qn,{duration:i[1],delay:i[2],easing:Zt})),o=!1},d(s){s&&z(t),s&&n&&n.end()}}}function rp(i){let t,e,n,o,s,r=i[3]&&_s(i);return{c(){t=Ae("svg"),e=Ae("defs"),n=Ae("linearGradient"),o=Ae("stop"),s=Ae("stop"),r&&r.c(),b(o,"offset","25%"),b(o,"stop-color","white"),b(o,"stop-opacity","1"),b(s,"offset","100%"),b(s,"stop-color","white"),b(s,"stop-opacity","0.5"),b(n,"id",i[4]),b(n,"gradientUnits","userSpaceOnUse"),b(t,"class","line svelte-e72ouh"),b(t,"viewBox","0 0 105 21")},m(a,l){T(a,t,l),O(t,e),O(e,n),O(n,o),O(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&k(r,1)):(r=_s(a),r.c(),k(r,1),r.m(t,null)):r&&(le(),M(r,1,1,()=>{r=null}),ce())},i(a){k(r)},o(a){M(r)},d(a){a&&z(t),r&&r.d()}}}function ap(i,t,e){let{inDelay:n=0}=t,{duration:o=0}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=He();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class lp extends oe{constructor(t){super(),ie(this,t,ap,rp,te,{inDelay:0,duration:1,outDelay:2,unfolded:3},sp)}}function jt(i){return typeof i=="object"&&i!==null&&i.constructor&&Object.prototype.toString.call(i).slice(8,-1)==="Object"}function ht(i,t){const e=["__proto__","constructor","prototype"];Object.keys(t).filter(n=>e.indexOf(n)<0).forEach(n=>{typeof i[n]=="undefined"?i[n]=t[n]:jt(t[n])&&jt(i[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?i[n]=t[n]:ht(i[n],t[n]):i[n]=t[n]})}function Gi(i={}){return i.navigation&&typeof i.navigation.nextEl=="undefined"&&typeof i.navigation.prevEl=="undefined"}function Ni(i={}){return i.pagination&&typeof i.pagination.el=="undefined"}function Wi(i={}){return i.scrollbar&&typeof i.scrollbar.el=="undefined"}function ti(i=""){const t=i.split(" ").map(n=>n.trim()).filter(n=>!!n),e=[];return t.forEach(n=>{e.indexOf(n)<0&&e.push(n)}),e.join(" ")}const Ua=["modules","init","_direction","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_preloadImages","updateOnImagesReady","_loop","_loopAdditionalSlides","_loopedSlides","_loopedSlidesLimit","_loopFillGroupWithBlank","loopPreventsSlide","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideBlankClass","slideActiveClass","slideDuplicateActiveClass","slideVisibleClass","slideDuplicateClass","slideNextClass","slideDuplicateNextClass","slidePrevClass","slideDuplicatePrevClass","wrapperClass","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","lazy","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom"];function cp(i={},t=!0){const e={on:{}},n={},o={};ht(e,zi.default.defaults),ht(e,zi.default.extendedDefaults),e._emitClasses=!0,e.init=!1;const s={},r=Ua.map(l=>l.replace(/_/,"")),a=Object.assign({},i);return Object.keys(a).forEach(l=>{typeof i[l]!="undefined"&&(r.indexOf(l)>=0?jt(i[l])?(e[l]={},o[l]={},ht(e[l],i[l]),ht(o[l],i[l])):(e[l]=i[l],o[l]=i[l]):l.search(/on[A-Z]/)===0&&typeof i[l]=="function"?t?n[`${l[2].toLowerCase()}${l.substr(3)}`]=i[l]:e.on[`${l[2].toLowerCase()}${l.substr(3)}`]=i[l]:s[l]=i[l])}),["navigation","pagination","scrollbar"].forEach(l=>{e[l]===!0&&(e[l]={}),e[l]===!1&&delete e[l]}),{params:e,passedParams:o,rest:s,events:n}}function up({el:i,nextEl:t,prevEl:e,paginationEl:n,scrollbarEl:o,swiper:s},r){Gi(r)&&t&&e&&(s.params.navigation.nextEl=t,s.originalParams.navigation.nextEl=t,s.params.navigation.prevEl=e,s.originalParams.navigation.prevEl=e),Ni(r)&&n&&(s.params.pagination.el=n,s.originalParams.pagination.el=n),Wi(r)&&o&&(s.params.scrollbar.el=o,s.originalParams.scrollbar.el=o),s.init(i)}function dp(i,t,e,n,o){const s=[];if(!t)return s;const r=l=>{s.indexOf(l)<0&&s.push(l)};if(e&&n){const l=n.map(o),c=e.map(o);l.join("")!==c.join("")&&r("children"),n.length!==e.length&&r("children")}return Ua.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in i&&l in t)if(jt(i[l])&&jt(t[l])){const c=Object.keys(i[l]),u=Object.keys(t[l]);c.length!==u.length?r(l):(c.forEach(f=>{i[l][f]!==t[l][f]&&r(l)}),u.forEach(f=>{i[l][f]!==t[l][f]&&r(l)}))}else i[l]!==t[l]&&r(l)}),s}function fp({swiper:i,slides:t,passedParams:e,changedParams:n,nextEl:o,prevEl:s,scrollbarEl:r,paginationEl:a}){const l=n.filter(D=>D!=="children"&&D!=="direction"),{params:c,pagination:u,navigation:f,scrollbar:d,virtual:p,thumbs:m}=i;let g,A,v,C,w;n.includes("thumbs")&&e.thumbs&&e.thumbs.swiper&&c.thumbs&&!c.thumbs.swiper&&(g=!0),n.includes("controller")&&e.controller&&e.controller.control&&c.controller&&!c.controller.control&&(A=!0),n.includes("pagination")&&e.pagination&&(e.pagination.el||a)&&(c.pagination||c.pagination===!1)&&u&&!u.el&&(v=!0),n.includes("scrollbar")&&e.scrollbar&&(e.scrollbar.el||r)&&(c.scrollbar||c.scrollbar===!1)&&d&&!d.el&&(C=!0),n.includes("navigation")&&e.navigation&&(e.navigation.prevEl||s)&&(e.navigation.nextEl||o)&&(c.navigation||c.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(w=!0);const x=D=>{!i[D]||(i[D].destroy(),D==="navigation"?(c[D].prevEl=void 0,c[D].nextEl=void 0,i[D].prevEl=void 0,i[D].nextEl=void 0):(c[D].el=void 0,i[D].el=void 0))};l.forEach(D=>{if(jt(c[D])&&jt(e[D]))ht(c[D],e[D]);else{const y=e[D];(y===!0||y===!1)&&(D==="navigation"||D==="pagination"||D==="scrollbar")?y===!1&&x(D):c[D]=e[D]}}),l.includes("controller")&&!A&&i.controller&&i.controller.control&&c.controller&&c.controller.control&&(i.controller.control=c.controller.control),n.includes("children")&&t&&p&&c.virtual.enabled?(p.slides=t,p.update(!0)):n.includes("children")&&i.lazy&&i.params.lazy.enabled&&i.lazy.load(),g&&m.init()&&m.update(!0),A&&(i.controller.control=c.controller.control),v&&(a&&(c.pagination.el=a),u.init(),u.render(),u.update()),C&&(r&&(c.scrollbar.el=r),d.init(),d.updateSize(),d.setTranslate()),w&&(o&&(c.navigation.nextEl=o),s&&(c.navigation.prevEl=s),f.init(),f.update()),n.includes("allowSlideNext")&&(i.allowSlideNext=e.allowSlideNext),n.includes("allowSlidePrev")&&(i.allowSlidePrev=e.allowSlidePrev),n.includes("direction")&&i.changeDirection(e.direction,!1),i.update()}const hp=i=>({virtualData:i&512}),qs=i=>({virtualData:i[9]}),mp=i=>({virtualData:i&512}),Ks=i=>({virtualData:i[9]}),pp=i=>({virtualData:i&512}),$s=i=>({virtualData:i[9]}),gp=i=>({virtualData:i&512}),er=i=>({virtualData:i[9]}),Ap=i=>({virtualData:i&512}),tr=i=>({virtualData:i[9]});function nr(i){let t,e,n;return{c(){t=Q("div"),e=Z(),n=Q("div"),b(t,"class","swiper-button-prev"),b(n,"class","swiper-button-next")},m(o,s){T(o,t,s),i[13](t),T(o,e,s),T(o,n,s),i[14](n)},p:ee,d(o){o&&z(t),i[13](null),o&&z(e),o&&z(n),i[14](null)}}}function ir(i){let t;return{c(){t=Q("div"),b(t,"class","swiper-scrollbar")},m(e,n){T(e,t,n),i[15](t)},p:ee,d(e){e&&z(t),i[15](null)}}}function or(i){let t;return{c(){t=Q("div"),b(t,"class","swiper-pagination")},m(e,n){T(e,t,n),i[16](t)},p:ee,d(e){e&&z(t),i[16](null)}}}function vp(i){let t,e,n,o,s,r,a=Gi(i[2]),l,c=Wi(i[2]),u,f=Ni(i[2]),d,p,m;const g=i[12]["container-start"],A=It(g,i,i[11],tr),v=i[12]["wrapper-start"],C=It(v,i,i[11],er),w=i[12].default,x=It(w,i,i[11],$s),D=i[12]["wrapper-end"],y=It(D,i,i[11],Ks);let L=a&&nr(i),P=c&&ir(i),j=f&&or(i);const B=i[12]["container-end"],G=It(B,i,i[11],qs);let U=[{class:p=ti(`${i[1]}${i[0]?` ${i[0]}`:""}`)},i[3]],I={};for(let S=0;S<U.length;S+=1)I=we(I,U[S]);return{c(){t=Q("div"),A&&A.c(),e=Z(),n=Q("div"),C&&C.c(),o=Z(),x&&x.c(),s=Z(),y&&y.c(),r=Z(),L&&L.c(),l=Z(),P&&P.c(),u=Z(),j&&j.c(),d=Z(),G&&G.c(),b(n,"class","swiper-wrapper"),Xn(t,I)},m(S,R){T(S,t,R),A&&A.m(t,null),O(t,e),O(t,n),C&&C.m(n,null),O(n,o),x&&x.m(n,null),O(n,s),y&&y.m(n,null),O(t,r),L&&L.m(t,null),O(t,l),P&&P.m(t,null),O(t,u),j&&j.m(t,null),O(t,d),G&&G.m(t,null),i[17](t),m=!0},p(S,[R]){A&&A.p&&(!m||R&2560)&&kt(A,g,S,S[11],m?xt(g,S[11],R,Ap):Dt(S[11]),tr),C&&C.p&&(!m||R&2560)&&kt(C,v,S,S[11],m?xt(v,S[11],R,gp):Dt(S[11]),er),x&&x.p&&(!m||R&2560)&&kt(x,w,S,S[11],m?xt(w,S[11],R,pp):Dt(S[11]),$s),y&&y.p&&(!m||R&2560)&&kt(y,D,S,S[11],m?xt(D,S[11],R,mp):Dt(S[11]),Ks),R&4&&(a=Gi(S[2])),a?L?L.p(S,R):(L=nr(S),L.c(),L.m(t,l)):L&&(L.d(1),L=null),R&4&&(c=Wi(S[2])),c?P?P.p(S,R):(P=ir(S),P.c(),P.m(t,u)):P&&(P.d(1),P=null),R&4&&(f=Ni(S[2])),f?j?j.p(S,R):(j=or(S),j.c(),j.m(t,d)):j&&(j.d(1),j=null),G&&G.p&&(!m||R&2560)&&kt(G,B,S,S[11],m?xt(B,S[11],R,hp):Dt(S[11]),qs),Xn(t,I=Be(U,[(!m||R&3&&p!==(p=ti(`${S[1]}${S[0]?` ${S[0]}`:""}`)))&&{class:p},R&8&&S[3]]))},i(S){m||(k(A,S),k(C,S),k(x,S),k(y,S),k(G,S),m=!0)},o(S){M(A,S),M(C,S),M(x,S),M(y,S),M(G,S),m=!1},d(S){S&&z(t),A&&A.d(S),C&&C.d(S),x&&x.d(S),y&&y.d(S),L&&L.d(),P&&P.d(),j&&j.d(),G&&G.d(S),i[17](null)}}}function bp(i,t,e){const n=["class","swiper"];let o=Wn(t,n),{$$slots:s={},$$scope:r}=t;const a=tc();let{class:l=void 0}=t,c="swiper",u=!1,f=null,d=null,p,m,g,A,v=null,C=null,w=null,x=null,D=null,y={slides:[]};function L(){return f}const P=W=>{e(9,y=W),ic().then(()=>{f.$wrapperEl.children(".swiper-slide").each(Y=>{Y.onSwiper&&Y.onSwiper(f)}),f.updateSlides(),f.updateProgress(),f.updateSlidesClasses(),f.lazy&&f.params.lazy.enabled&&f.lazy.load()})},j=()=>{p=cp(o),e(2,m=p.params),g=p.passedParams,e(3,A=p.rest)};j(),d=g;const B=()=>{u=!0};if(m.onAny=(W,...Y)=>{a(W,Y)},Object.assign(m.on,{_beforeBreakpoint:B,_containerClasses(W,Y){e(1,c=Y)}}),f=new zi.default(m),Bi("swiper",f),f.virtual&&f.params.virtual.enabled){const W={cache:!1,renderExternal:Y=>{P(Y),m.virtual&&m.virtual.renderExternal&&m.virtual.renderExternal(Y)},renderExternalUpdate:!1};ht(f.params.virtual,W),ht(f.originalParams.virtual,W)}Ye(()=>{!v||(up({el:v,nextEl:w,prevEl:C,paginationEl:D,scrollbarEl:x,swiper:f},m),a("swiper",[f]),!m.virtual&&f.slides.each(W=>{W.onSwiper&&W.onSwiper(f)}))}),qi(()=>{if(!f)return;j();const W=dp(g,d);(W.length||u)&&f&&!f.destroyed&&fp({swiper:f,passedParams:g,changedParams:W,nextEl:w,prevEl:C,scrollbarEl:x,paginationEl:D}),u=!1,d=g}),yt(()=>{typeof window!="undefined"&&f&&!f.destroyed&&f.destroy(!0,!1)});function G(W){Me[W?"unshift":"push"](()=>{C=W,e(5,C)})}function U(W){Me[W?"unshift":"push"](()=>{w=W,e(6,w)})}function I(W){Me[W?"unshift":"push"](()=>{x=W,e(7,x)})}function S(W){Me[W?"unshift":"push"](()=>{D=W,e(8,D)})}function R(W){Me[W?"unshift":"push"](()=>{v=W,e(4,v)})}return i.$$set=W=>{t=we(we({},t),qr(W)),e(27,o=Wn(t,n)),"class"in W&&e(0,l=W.class),"$$scope"in W&&e(11,r=W.$$scope)},[l,c,m,A,v,C,w,x,D,y,L,r,s,G,U,I,S,R]}class yp extends oe{constructor(t){super(),ie(this,t,bp,vp,te,{class:0,swiper:10})}get swiper(){return this.$$.ctx[10]}}const wp=i=>({data:i&32}),sr=i=>({data:i[5]}),Cp=i=>({data:i&32}),rr=i=>({data:i[5]});function Ep(i){let t;const e=i[8].default,n=It(e,i,i[7],sr);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&160)&&kt(n,e,o,o[7],t?xt(e,o[7],s,wp):Dt(o[7]),sr)},i(o){t||(k(n,o),t=!0)},o(o){M(n,o),t=!1},d(o){n&&n.d(o)}}}function Pp(i){let t,e,n;const o=i[8].default,s=It(o,i,i[7],rr);return{c(){t=Q("div"),s&&s.c(),b(t,"class","swiper-zoom-container"),b(t,"data-swiper-zoom",e=typeof i[0]=="number"?i[0]:void 0)},m(r,a){T(r,t,a),s&&s.m(t,null),n=!0},p(r,a){s&&s.p&&(!n||a&160)&&kt(s,o,r,r[7],n?xt(o,r[7],a,Cp):Dt(r[7]),rr),(!n||a&1&&e!==(e=typeof r[0]=="number"?r[0]:void 0))&&b(t,"data-swiper-zoom",e)},i(r){n||(k(s,r),n=!0)},o(r){M(s,r),n=!1},d(r){r&&z(t),s&&s.d(r)}}}function Ip(i){let t,e,n,o,s;const r=[Pp,Ep],a=[];function l(f,d){return f[0]?0:1}e=l(i),n=a[e]=r[e](i);let c=[{class:o=ti(`${i[3]}${i[2]?` ${i[2]}`:""}`)},{"data-swiper-slide-index":i[1]},i[6]],u={};for(let f=0;f<c.length;f+=1)u=we(u,c[f]);return{c(){t=Q("div"),n.c(),Xn(t,u)},m(f,d){T(f,t,d),a[e].m(t,null),i[9](t),s=!0},p(f,[d]){let p=e;e=l(f),e===p?a[e].p(f,d):(le(),M(a[p],1,1,()=>{a[p]=null}),ce(),n=a[e],n?n.p(f,d):(n=a[e]=r[e](f),n.c()),k(n,1),n.m(t,null)),Xn(t,u=Be(c,[(!s||d&12&&o!==(o=ti(`${f[3]}${f[2]?` ${f[2]}`:""}`)))&&{class:o},(!s||d&2)&&{"data-swiper-slide-index":f[1]},d&64&&f[6]]))},i(f){s||(k(n),s=!0)},o(f){M(n),s=!1},d(f){f&&z(t),a[e].d(),i[9](null)}}}function xp(i,t,e){let n;const o=["zoom","virtualIndex","class"];let s=Wn(t,o),{$$slots:r={},$$scope:a}=t,{zoom:l=void 0}=t,{virtualIndex:c=void 0}=t,{class:u=void 0}=t,f=null,d="swiper-slide",p=mn("swiper"),m=!1;const g=(w,x,D)=>{x===f&&e(3,d=D)},A=()=>{!p||m||(p.on("_slideClass",g),m=!0)},v=()=>{!p||(p.off("_slideClass",g),m=!1)};Ye(()=>{typeof c!="undefined"&&(e(4,f.onSwiper=w=>{p=w,A()},f),A())}),qi(()=>{if(!(!f||!p)){if(p.destroyed){d!=="swiper-slide"&&e(3,d="swiper-slide");return}A()}}),_i(()=>{A()}),yt(()=>{!p||v()});function C(w){Me[w?"unshift":"push"](()=>{f=w,e(4,f)})}return i.$$set=w=>{t=we(we({},t),qr(w)),e(6,s=Wn(t,o)),"zoom"in w&&e(0,l=w.zoom),"virtualIndex"in w&&e(1,c=w.virtualIndex),"class"in w&&e(2,u=w.class),"$$scope"in w&&e(7,a=w.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(5,n={isActive:d.indexOf("swiper-slide-active")>=0||d.indexOf("swiper-slide-duplicate-active")>=0,isVisible:d.indexOf("swiper-slide-visible")>=0,isDuplicate:d.indexOf("swiper-slide-duplicate")>=0,isPrev:d.indexOf("swiper-slide-prev")>=0||d.indexOf("swiper-slide-duplicate-prev")>=0,isNext:d.indexOf("swiper-slide-next")>=0||d.indexOf("swiper-slide-duplicate-next")>=0})},[l,c,u,d,f,n,s,a,r,C]}class kp extends oe{constructor(t){super(),ie(this,t,xp,Ip,te,{zoom:0,virtualIndex:1,class:2})}}function Dp(i){ae(i,"svelte-cwtvzu",".media-item.svelte-cwtvzu.svelte-cwtvzu{height:100%}.media-content.svelte-cwtvzu.svelte-cwtvzu{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.video-icon.svelte-cwtvzu.svelte-cwtvzu{width:12.5rem;height:6.25rem;max-width:60%;max-height:60%;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.video-play-button-container.svelte-cwtvzu.svelte-cwtvzu{display:none;pointer-events:auto;position:absolute;width:100%;height:100%;top:0;left:0}.video-play-button-container.showPlayButton.svelte-cwtvzu.svelte-cwtvzu{display:block}.video-icon.large.svelte-cwtvzu.svelte-cwtvzu{width:12.5rem;height:6.25rem}.video-icon.small.svelte-cwtvzu.svelte-cwtvzu{width:1.75rem;height:1.75rem}.video-icon.svelte-cwtvzu .video-icon-img.svelte-cwtvzu{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-cwtvzu .video-icon-img.canPlay.svelte-cwtvzu{cursor:pointer}")}function ar(i){let t;function e(s,r){if(s[0].type==="Image")return Sp;if(s[0].type==="Video")return Lp}let n=e(i),o=n&&n(i);return{c(){t=Q("div"),o&&o.c(),b(t,"class","media-item svelte-cwtvzu")},m(s,r){T(s,t,r),o&&o.m(t,null)},p(s,r){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null)))},d(s){s&&z(t),o&&o.d()}}}function Lp(i){let t,e,n,o,s,r,a,l,c,u,f;return{c(){var d;t=Q("video"),r=Z(),a=Q("div"),l=Q("div"),c=Q("div"),b(t,"class","media-content svelte-cwtvzu"),b(t,"style",e=`object-fit: ${i[3]};`),et(t.src,n=i[0].url+"#t=0.1")||b(t,"src",n),b(t,"poster",o=(d=i[0].videoCoverUrl)!=null?d:void 0),b(t,"preload",s=i[0].videoCoverUrl?void 0:"auto"),t.playsInline=!0,b(t,"paused",""),t.loop=!1,b(t,"crossorigin",""),t.controls=!1,_(t,"showPlayButton",i[5]),b(c,"class","video-icon-img svelte-cwtvzu"),H(c,"background-image","url("+(i[1]==="large"?Ws:Xs)+")"),_(c,"canPlay",i[2]),b(l,"class","video-icon svelte-cwtvzu"),_(l,"large",i[1]==="large"),_(l,"small",i[1]==="small"),b(a,"class","video-play-button-container svelte-cwtvzu"),_(a,"showPlayButton",i[5])},m(d,p){T(d,t,p),i[7](t),T(d,r,p),T(d,a,p),O(a,l),O(l,c),u||(f=[Pe(t,"click",i[6]),Pe(c,"click",i[8])],u=!0)},p(d,p){var m;p&8&&e!==(e=`object-fit: ${d[3]};`)&&b(t,"style",e),p&1&&!et(t.src,n=d[0].url+"#t=0.1")&&b(t,"src",n),p&1&&o!==(o=(m=d[0].videoCoverUrl)!=null?m:void 0)&&b(t,"poster",o),p&1&&s!==(s=d[0].videoCoverUrl?void 0:"auto")&&b(t,"preload",s),p&32&&_(t,"showPlayButton",d[5]),p&2&&H(c,"background-image","url("+(d[1]==="large"?Ws:Xs)+")"),p&4&&_(c,"canPlay",d[2]),p&2&&_(l,"large",d[1]==="large"),p&2&&_(l,"small",d[1]==="small"),p&32&&_(a,"showPlayButton",d[5])},d(d){d&&z(t),i[7](null),d&&z(r),d&&z(a),u=!1,rt(f)}}}function Sp(i){let t,e,n,o;return{c(){t=Q("img"),b(t,"class","media-content svelte-cwtvzu"),b(t,"style",e=`object-fit: ${i[3]};`),et(t.src,n=i[0].url)||b(t,"src",n),b(t,"alt",o=i[0].name)},m(s,r){T(s,t,r)},p(s,r){r&8&&e!==(e=`object-fit: ${s[3]};`)&&b(t,"style",e),r&1&&!et(t.src,n=s[0].url)&&b(t,"src",n),r&1&&o!==(o=s[0].name)&&b(t,"alt",o)},d(s){s&&z(t)}}}function zp(i){let t,e=i[0]&&ar(i);return{c(){e&&e.c(),t=he()},m(n,o){e&&e.m(n,o),T(n,t,o)},p(n,[o]){n[0]?e?e.p(n,o):(e=ar(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:ee,o:ee,d(n){e&&e.d(n),n&&z(t)}}}function Mp(i,t,e){let{media:n}=t,{playButtonIfNeed:o="small"}=t,{canPlay:s=!0}=t,{objectFit:r="cover"}=t,a,l=!1;const c=()=>a==null?void 0:a.pause();function u(d){Me[d?"unshift":"push"](()=>{a=d,e(4,a)})}const f=()=>{!s||a&&a.play()};return i.$$set=d=>{"media"in d&&e(0,n=d.media),"playButtonIfNeed"in d&&e(1,o=d.playButtonIfNeed),"canPlay"in d&&e(2,s=d.canPlay),"objectFit"in d&&e(3,r=d.objectFit)},i.$$.update=()=>{i.$$.dirty&16&&a&&(e(5,l=a.paused),a.addEventListener("play",()=>{e(5,l=!1)}),a.addEventListener("pause",()=>{e(5,l=!0)}))},[n,o,s,r,a,l,c,u,f]}class Va extends oe{constructor(t){super(),ie(this,t,Mp,zp,te,{media:0,playButtonIfNeed:1,canPlay:2,objectFit:3},Dp)}}function Tp(i){ae(i,"svelte-ai0lv9",".media.svelte-ai0lv9{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}")}function lr(i,t,e){const n=i.slice();return n[23]=t[e],n}function cr(i){let t,e,n,o,s,r;const a=[jp,Bp],l=[];function c(u,f){return u[13]?0:1}return e=c(i),n=l[e]=a[e](i),{c(){t=Q("div"),n.c(),b(t,"class","media svelte-ai0lv9"),_(t,"unfolded",i[4])},m(u,f){T(u,t,f),l[e].m(t,null),r=!0},p(u,f){i=u;let d=e;e=c(i),e===d?l[e].p(i,f):(le(),M(l[d],1,1,()=>{l[d]=null}),ce(),n=l[e],n?n.p(i,f):(n=l[e]=a[e](i),n.c()),k(n,1),n.m(t,null)),(!r||f&16)&&_(t,"unfolded",i[4])},i(u){r||(k(n),u&&xe(()=>{s&&s.end(1),o=Ot(t,Do,i[5]?{y:4,duration:i[3],delay:i[1],easing:Jt}:void 0),o.start()}),r=!0)},o(u){M(n),o&&o.invalidate(),u&&(s=$t(t,Do,i[5]?{y:4,duration:i[3],delay:i[2],easing:Jt}:void 0)),r=!1},d(u){u&&z(t),l[e].d(),u&&s&&s.end()}}}function Bp(i){let t,e;return t=new Va({props:{media:i[0][0],objectFit:i[8],playButtonIfNeed:i[6],canPlay:i[7]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.media=n[0][0]),o&256&&(s.objectFit=n[8]),o&64&&(s.playButtonIfNeed=n[6]),o&128&&(s.canPlay=n[7]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function jp(i){let t,e;return t=new yp({props:{style:"height: 100%",modules:[Fr.Autoplay],spaceBetween:30,autoplay:i[14]?Se({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1,loop:!0,$$slots:{default:[Rp]},$$scope:{ctx:i}}}),t.$on("init",i[19]),t.$on("slideChange",i[20]),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&16384&&(s.autoplay=n[14]?Se({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1),o&67111360&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Qp(i){let t,e,n;return t=new Va({props:{media:i[23],objectFit:i[8],playButtonIfNeed:i[6],canPlay:i[7]}}),{c(){$(t.$$.fragment),e=Z()},m(o,s){q(t,o,s),T(o,e,s),n=!0},p(o,s){const r={};s&2048&&(r.media=o[23]),s&256&&(r.objectFit=o[8]),s&64&&(r.playButtonIfNeed=o[6]),s&128&&(r.canPlay=o[7]),t.$set(r)},i(o){n||(k(t.$$.fragment,o),n=!0)},o(o){M(t.$$.fragment,o),n=!1},d(o){K(t,o),o&&z(e)}}}function ur(i){let t,e;return t=new kp({props:{$$slots:{default:[Qp]},$$scope:{ctx:i}}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&67111360&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Rp(i){let t,e,n=i[11],o=[];for(let r=0;r<n.length;r+=1)o[r]=ur(lr(i,n,r));const s=r=>M(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=he()},m(r,a){for(let l=0;l<o.length;l+=1)o[l].m(r,a);T(r,t,a),e=!0},p(r,a){if(a&2496){n=r[11];let l;for(l=0;l<n.length;l+=1){const c=lr(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=ur(c),o[l].c(),k(o[l],1),o[l].m(t.parentNode,t))}for(le(),l=n.length;l<o.length;l+=1)s(l);ce()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)k(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)M(o[a]);e=!1},d(r){tt(o,r),r&&z(t)}}}function Op(i){let t,e,n=i[4]&&cr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[4]?n?(n.p(o,s),s&16&&k(n,1)):(n=cr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Hp(i,t,e){let n,o,s,{tag:r}=t,{mediaData:a}=t,{inDelay:l=0}=t,{outDelay:c=0}=t,{duration:u=0}=t,{unfolded:f=!0}=t,{animation:d=!0}=t,{playButtonIfNeed:p="small"}=t,{canPlay:m=!0}=t,{objectFit:g="cover"}=t,{enableCarousel:A=!0}=t,{autoplayConfig:v={autoplay:!0,autoplayVideo:!1}}=t;const C=mn("mediaStore"),w=mn("hooks");let x;function D(B){!n||!x||(C.set({currentMediaUrl:this.src}),w.emit("playStateChange",{event:B,state:"playing",tag:r,mediaInstance:this}),x.autoplay.stop())}function y(B){!n||!x||(w.emit("playStateChange",{event:B,state:"paused",tag:r,mediaInstance:this}),x.autoplay.running||x.autoplay.start())}let L=null;const P=B=>{e(10,x=B.detail[0])},j=B=>J(this,null,function*(){var W,Y,ne;if(!s||!v.autoplayVideo)return;const G=B.detail[0];if(!G)return;const U=G.realIndex;if(U===L)return;e(12,L=U);const I=o[U];if(!I||I.type!=="Video")return;G.autoplay.stop(),G.slides.map(X=>X.querySelector("video")).filter(Bt).forEach(X=>X.pause());const R=(W=G.slides[G.activeIndex])==null?void 0:W.querySelector("video");if(R&&(R.removeEventListener("play",D),R.removeEventListener("pause",y),R.addEventListener("play",D),R.addEventListener("pause",y)),R){R.addEventListener("click",()=>R.pause());const X=(ne=(Y=R.parentElement)==null?void 0:Y.getElementsByClassName("video-play-button-container"))==null?void 0:ne[0];R.addEventListener("play",()=>X==null?void 0:X.classList.remove("showPlayButton")),R.addEventListener("pause",()=>X==null?void 0:X.classList.add("showPlayButton")),X&&(R.paused?X.classList.add("showPlayButton"):X.classList.remove("showPlayButton"),X.addEventListener("click",()=>R.play()))}});return i.$$set=B=>{"tag"in B&&e(17,r=B.tag),"mediaData"in B&&e(0,a=B.mediaData),"inDelay"in B&&e(1,l=B.inDelay),"outDelay"in B&&e(2,c=B.outDelay),"duration"in B&&e(3,u=B.duration),"unfolded"in B&&e(4,f=B.unfolded),"animation"in B&&e(5,d=B.animation),"playButtonIfNeed"in B&&e(6,p=B.playButtonIfNeed),"canPlay"in B&&e(7,m=B.canPlay),"objectFit"in B&&e(8,g=B.objectFit),"enableCarousel"in B&&e(18,A=B.enableCarousel),"autoplayConfig"in B&&e(9,v=B.autoplayConfig)},i.$$.update=()=>{i.$$.dirty&262145&&e(13,n=A&&(a==null?void 0:a.length)>1),i.$$.dirty&1&&e(11,o=a),i.$$.dirty&2560&&e(14,s=o.length>1&&v.autoplay),i.$$.dirty&1024&&x&&x.slides.forEach(B=>{const G=B.querySelector("video");G&&C.subscribe(({currentMediaUrl:U})=>{U!==G.src&&G.pause()})})},[a,l,c,u,f,d,p,m,g,v,x,o,L,n,s,D,y,r,A,P,j]}class Ja extends oe{constructor(t){super(),ie(this,t,Hp,Op,te,{tag:17,mediaData:0,inDelay:1,outDelay:2,duration:3,unfolded:4,animation:5,playButtonIfNeed:6,canPlay:7,objectFit:8,enableCarousel:18,autoplayConfig:9},Tp)}}function Fp(i){ae(i,"svelte-1f7m1lj",".line.svelte-1f7m1lj{position:absolute;width:6.5625rem;height:1.3125rem;transform:translateY(-100%)}.text.svelte-1f7m1lj{position:absolute;width:6.25rem;left:1rem;bottom:0.0625rem;font-weight:600}.media-wrapper.svelte-1f7m1lj{position:absolute;left:0.875rem;top:-5.3125rem;width:5.625rem;height:3.75rem;font-weight:600}")}function dr(i,t,e){const n=i.slice();return n[5]=t[e].id,n[1]=t[e].content,n}function fr(i){let t,e,n,o,s,r=[],a=new Map,l,c,u;t=new Ve({props:{visible:i[4],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new lp({props:{unfolded:i[4],duration:1e3,outDelay:400}});let f=i[2];const d=m=>m[5];for(let m=0;m<f.length;m+=1){let g=dr(i,f,m),A=d(g);a.set(A,r[m]=hr(A,g))}let p=i[3]&&mr(i);return{c(){$(t.$$.fragment),e=Z(),n=Q("div"),$(o.$$.fragment),s=Z();for(let m=0;m<r.length;m+=1)r[m].c();l=Z(),p&&p.c(),c=he(),b(n,"class","line svelte-1f7m1lj")},m(m,g){q(t,m,g),T(m,e,g),T(m,n,g),q(o,n,null),T(m,s,g);for(let A=0;A<r.length;A+=1)r[A].m(m,g);T(m,l,g),p&&p.m(m,g),T(m,c,g),u=!0},p(m,g){const A={};g&16&&(A.visible=m[4]),t.$set(A);const v={};g&16&&(v.unfolded=m[4]),o.$set(v),g&20&&(f=m[2],le(),r=Ue(r,g,d,1,m,f,a,l.parentNode,at,hr,l,dr),ce()),m[3]?p?(p.p(m,g),g&8&&k(p,1)):(p=mr(m),p.c(),k(p,1),p.m(c.parentNode,c)):p&&(le(),M(p,1,1,()=>{p=null}),ce())},i(m){if(!u){k(t.$$.fragment,m),k(o.$$.fragment,m);for(let g=0;g<f.length;g+=1)k(r[g]);k(p),u=!0}},o(m){M(t.$$.fragment,m),M(o.$$.fragment,m);for(let g=0;g<r.length;g+=1)M(r[g]);M(p),u=!1},d(m){K(t,m),m&&z(e),m&&z(n),K(o),m&&z(s);for(let g=0;g<r.length;g+=1)r[g].d(m);m&&z(l),p&&p.d(m),m&&z(c)}}}function hr(i,t){let e,n,o;return n=new Xa({props:{unfolded:t[4],content:t[1],inDelay:500}}),{key:i,first:null,c(){e=Q("div"),$(n.$$.fragment),b(e,"class","text svelte-1f7m1lj"),this.first=e},m(s,r){T(s,e,r),q(n,e,null),o=!0},p(s,r){t=s;const a={};r&16&&(a.unfolded=t[4]),r&4&&(a.content=t[1]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),K(n)}}}function mr(i){let t,e,n;return e=new Ja({props:{autoplayConfig:{autoplay:!1},unfolded:i[4],mediaData:i[3],tag:i[0],enableCarousel:!1,canPlay:!1,playButtonIfNeed:"small",inDelay:500,duration:500}}),{c(){t=Q("div"),$(e.$$.fragment),b(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){T(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&16&&(r.unfolded=o[4]),s&8&&(r.mediaData=o[3]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){M(e.$$.fragment,o),n=!1},d(o){o&&z(t),K(e)}}}function Gp(i){let t,e,n=i[0].state&&fr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=fr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Np(i,t,e){let n,o,s,{tag:r}=t,a;return i.$$set=l=>{"tag"in l&&e(0,r=l.tag)},i.$$.update=()=>{var l,c,u;i.$$.dirty&1&&e(4,n=r.state?r.state.unfolded:!1),i.$$.dirty&1&&e(1,o=((c=(l=r.data.text)==null?void 0:l.length)!=null?c:0)>7?((u=r.data.text)==null?void 0:u.substring(0,6))+"...":r.data.text),i.$$.dirty&1&&e(3,s=r.data.mediaData),i.$$.dirty&2&&e(2,a=o?[{id:He(),content:o}]:[])},[r,o,a,s,n]}class Wp extends oe{constructor(t){super(),ie(this,t,Np,Gp,te,{tag:0},Fp)}}function Xp(i){ae(i,"svelte-8mby9k",".svelte-8mby9k.svelte-8mby9k{box-sizing:border-box}.marketing.svelte-8mby9k.svelte-8mby9k{transform:translateY(-100%)}.content.svelte-8mby9k .headerImage.svelte-8mby9k{position:absolute;width:100%;top:0.25rem;transform:translateY(-100%);border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.line.svelte-8mby9k.svelte-8mby9k{position:absolute;height:2.0625rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.content.svelte-8mby9k.svelte-8mby9k{background-color:white;position:relative;display:flex;flex-direction:column;min-width:11.125rem;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;border-radius:0.25rem;top:-1.875rem;left:-1rem;padding:0.5rem 0rem 0.5625rem;transition:all 500ms}.title.svelte-8mby9k.svelte-8mby9k{position:absolute;background-color:white;border-radius:0.25rem;width:100%;top:0.5rem;padding-left:0.75rem;padding-right:0.75rem}.title.svelte-8mby9k .text.svelte-8mby9k{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.75rem;font-weight:bold;line-height:1.125rem;color:#000}.footer.svelte-8mby9k.svelte-8mby9k{position:relative;padding-left:0.75rem;padding-right:0.75rem;width:100%;height:1.375rem;display:flex;align-items:center}.footer.svelte-8mby9k .goto-button.svelte-8mby9k{flex-shrink:0;white-space:nowrap;background-image:linear-gradient(to right, rgba(87, 144, 253, 1) 0, rgba(42, 114, 254, 1) 100%);color:#fff;font-size:0.625rem;border-radius:0.875rem;font-weight:bold;padding-left:0.5rem;padding-right:0.5rem;height:1.25rem;margin-left:auto;display:flex;align-items:center}.footer.svelte-8mby9k .goto-icon.svelte-8mby9k::after{content:'';display:inline-block;width:0.75rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMAFNO2pYt4bErz8uP6ysawgVtBPDcR5C4s2L6ZmJBzZGJXUyEeDws/0G2zAAAAkklEQVQ4y+3TRw6DMBAF0OAeJ3QCpCe0uf8NwRILLBYfiS1/aT3JoymnI+sERZ5VCH0iVto3QDfBLmeSSMUTogRV9bBEpJAKaYpGijn13aTSLeraeG9D0NZFZv4/rRL5FDHnITlllqjv6tykWsmX4JHr05y7j6oFKq2P8He48B0tAM0EY0EDxquClw6vLz6EI35GmwwSZpe+WOgAAAAASUVORK5CYII=);background-size:100% auto;background-repeat:no-repeat}.price.svelte-8mby9k.svelte-8mby9k{flex-shrink:0;margin-right:0.75rem;white-space:nowrap;color:#ff6600;display:flex;align-items:baseline}.price.svelte-8mby9k .value.svelte-8mby9k{position:relative;top:0.0625rem;font-size:1.125rem;line-height:1.375rem;font-family:TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0rem}.price.svelte-8mby9k .unit.svelte-8mby9k{padding-left:0.125rem;font-size:0.625rem}.tag.svelte-8mby9k.svelte-8mby9k{position:relative;background-color:white;display:flex;width:-moz-max-content;width:max-content;padding-left:0.75rem;padding-right:0.75rem;min-height:1.75rem}.tag.svelte-8mby9k .base-tag.svelte-8mby9k{height:1rem;margin-top:1.375rem;margin-bottom:0.5rem;margin-right:0.25rem;font-size:0.625rem;line-height:0.875rem;padding:0.0625rem 0.25rem;border-radius:0.125rem;overflow:hidden}.tag.svelte-8mby9k .primary-tag.svelte-8mby9k{background:#e5eefe;color:#0055ff}.tag.svelte-8mby9k .secondary-tag.svelte-8mby9k{background:rgba(255, 102, 0, 0.08);color:rgba(255, 102, 0, 1)}.unfolded.svelte-8mby9k .line.svelte-8mby9k{transform:translateX(-50%) scale(1, 1)}.folded.svelte-8mby9k .line.svelte-8mby9k{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.unfolded.svelte-8mby9k .content.svelte-8mby9k{opacity:1}.folded.svelte-8mby9k .content.svelte-8mby9k{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}")}function pr(i,t,e){const n=i.slice();return n[0]=t[e],n}function gr(i,t,e){const n=i.slice();return n[0]=t[e],n}function Ar(i){let t,e=i[0]+"",n;return{c(){t=Q("div"),n=ke(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){T(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Te(n,e)},d(o){o&&z(t)}}}function vr(i){let t,e=i[0]&&Ar(i);return{c(){e&&e.c(),t=he()},m(n,o){e&&e.m(n,o),T(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Ar(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function br(i){let t,e=i[0]+"",n;return{c(){t=Q("div"),n=ke(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){T(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Te(n,e)},d(o){o&&z(t)}}}function yr(i){let t,e=i[0]&&br(i);return{c(){e&&e.c(),t=he()},m(n,o){e&&e.m(n,o),T(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=br(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function wr(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&Cr(i);return{c(){t=Q("div"),e=Q("span"),o=ke(n),s=Z(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){T(a,t,l),O(t,e),O(e,o),O(t,s),r&&r.m(t,null)},p(a,l){l&4&&n!==(n=a[2].price.value+"")&&Te(o,n),a[2].price.unit?r?r.p(a,l):(r=Cr(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&z(t),r&&r.d()}}}function Cr(i){let t,e=i[2].price.unit+"",n;return{c(){t=Q("span"),n=ke(e),b(t,"class","unit svelte-8mby9k")},m(o,s){T(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&Te(n,e)},d(o){o&&z(t)}}}function Er(i){let t,e=i[2].highlightText+"",n;return{c(){t=Q("div"),n=ke(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){T(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&Te(n,e)},d(o){o&&z(t)}}}function Yp(i){var G,U;let t,e,n,o,s,r,a,l,c,u,f,d,p,m,g=i[2].title+"",A,v,C,w,x;e=new Ve({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let D=i[2].brandTags||[],y=[];for(let I=0;I<D.length;I+=1)y[I]=vr(gr(i,D,I));let L=i[2].tags||[],P=[];for(let I=0;I<L.length;I+=1)P[I]=yr(pr(i,L,I));let j=((G=i[2].price)==null?void 0:G.value)!==void 0&&((U=i[2].price)==null?void 0:U.value)!==null&&wr(i),B=i[2].highlightText&&Er(i);return{c(){var I,S;t=Q("div"),$(e.$$.fragment),n=Z(),o=Q("div"),s=Z(),r=Q("div"),a=Q("img"),c=Z(),u=Q("div");for(let R=0;R<y.length;R+=1)y[R].c();f=Z();for(let R=0;R<P.length;R+=1)P[R].c();d=Z(),p=Q("div"),m=Q("div"),A=ke(g),v=Z(),C=Q("div"),j&&j.c(),w=Z(),B&&B.c(),b(o,"class","line svelte-8mby9k"),H(o,"transition-delay",i[1]?Bn+"ms":jn+Ir-Pr-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),et(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(u,"class","tag svelte-8mby9k"),b(m,"class","text svelte-8mby9k"),b(p,"class","title svelte-8mby9k"),b(C,"class","footer svelte-8mby9k"),H(C,"height",((I=i[2].price)==null?void 0:I.value)!==void 0&&((S=i[2].price)==null?void 0:S.value)!==null&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),H(r,"transition-delay",i[1]?Bn+jn+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),_(t,"unfolded",i[1]),_(t,"folded",i[3])},m(I,S){T(I,t,S),q(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),O(r,a),O(r,c),O(r,u);for(let R=0;R<y.length;R+=1)y[R].m(u,null);O(u,f);for(let R=0;R<P.length;R+=1)P[R].m(u,null);O(r,d),O(r,p),O(p,m),O(m,A),O(r,v),O(r,C),j&&j.m(C,null),O(C,w),B&&B.m(C,null),x=!0},p(I,[S]){var W,Y,ne,X;const R={};if(S&2&&(R.visible=I[1]),e.$set(R),S&2&&H(o,"transition-delay",I[1]?Bn+"ms":jn+Ir-Pr-40+"ms"),(!x||S&4&&!et(a.src,l=I[2].headerPictureUrl))&&b(a,"src",l),S&4){D=I[2].brandTags||[];let V;for(V=0;V<D.length;V+=1){const ue=gr(I,D,V);y[V]?y[V].p(ue,S):(y[V]=vr(ue),y[V].c(),y[V].m(u,f))}for(;V<y.length;V+=1)y[V].d(1);y.length=D.length}if(S&4){L=I[2].tags||[];let V;for(V=0;V<L.length;V+=1){const ue=pr(I,L,V);P[V]?P[V].p(ue,S):(P[V]=yr(ue),P[V].c(),P[V].m(u,null))}for(;V<P.length;V+=1)P[V].d(1);P.length=L.length}(!x||S&4)&&g!==(g=I[2].title+"")&&Te(A,g),((W=I[2].price)==null?void 0:W.value)!==void 0&&((Y=I[2].price)==null?void 0:Y.value)!==null?j?j.p(I,S):(j=wr(I),j.c(),j.m(C,w)):j&&(j.d(1),j=null),I[2].highlightText?B?B.p(I,S):(B=Er(I),B.c(),B.m(C,null)):B&&(B.d(1),B=null),S&4&&H(C,"height",((ne=I[2].price)==null?void 0:ne.value)!==void 0&&((X=I[2].price)==null?void 0:X.value)!==null&&I[2].highlightText?void 0:"1rem"),S&2&&H(r,"transition-delay",I[1]?Bn+jn+"ms":"0ms"),(!x||S&2)&&_(t,"unfolded",I[1]),(!x||S&8)&&_(t,"folded",I[3])},i(I){x||(k(e.$$.fragment,I),x=!0)},o(I){M(e.$$.fragment,I),x=!1},d(I){I&&z(t),K(e),tt(y,I),tt(P,I),j&&j.d(),B&&B.d()}}}const Bn=400,Pr=500,jn=180,Ir=500;function Up(i,t,e){let n,o,s,{tag:r}=t;return i.$$set=a=>{"tag"in a&&e(0,r=a.tag)},i.$$.update=()=>{var a,l;i.$$.dirty&1&&e(1,n=(l=(a=r.state)==null?void 0:a.unfolded)!=null?l:!1),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=r.data)},[r,n,s,o]}class Vp extends oe{constructor(t){super(),ie(this,t,Up,Yp,te,{tag:0},Xp)}}function Jp(i){ae(i,"svelte-1ku3wt4",`.audio.svelte-1ku3wt4.svelte-1ku3wt4{position:relative;width:100%;height:100%;cursor:pointer}@keyframes svelte-1ku3wt4-playing{25%{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='9' cy='9' r='8' transform='translate(-1 -1)' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}50%{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM5.533 6.685L4.169 8.049l1.414 1.413a2.078 2.078 0 0 0-.05-2.777z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}75%{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm-.656 4.874l-.906.905A3.35 3.35 0 0 1 7.369 8.1c0 .875-.333 1.67-.88 2.268l.906.906A4.628 4.628 0 0 0 8.65 8.101a4.627 4.627 0 0 0-1.306-3.227zm-1.811 1.81L4.169 8.05l1.414 1.413a2.078 2.078 0 0 0-.05-2.777z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}}.paused.svelte-1ku3wt4 .audio-icon.svelte-1ku3wt4{animation:none}.audio-icon.svelte-1ku3wt4.svelte-1ku3wt4{width:100%;height:100%;border-radius:50%;background-size:100%;animation:svelte-1ku3wt4-playing 2s steps(1) infinite;background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm1.428 2.79l-.953.952a6.222 6.222 0 0 1 1.775 4.36c0 1.571-.58 3.006-1.538 4.103l-.184.202.793.794a7.344 7.344 0 0 0 2.21-5.26A7.341 7.341 0 0 0 9.428 2.79zM7.344 4.873l-.906.905A3.35 3.35 0 0 1 7.369 8.1c0 .802-.28 1.537-.748 2.115l-.132.153.906.906A4.628 4.628 0 0 0 8.65 8.101a4.627 4.627 0 0 0-1.306-3.227zm-1.811 1.81L4.169 8.05l1.414 1.413a2.078 2.078 0 0 0-.05-2.777z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}`)}function xr(i){let t,e,n,o,s,r,a,l=!0,c,u,f,d,p;return e=new Ve({props:{center:!0,blurRadius:15,spreadRadius:6}}),{c(){t=Q("div"),$(e.$$.fragment),n=Z(),o=Q("div"),s=Z(),r=Q("audio"),b(o,"class","audio-icon svelte-1ku3wt4"),r.controls=!1,b(r,"playsinline",""),et(r.src,a=i[3])||b(r,"src",a),b(t,"class","audio svelte-1ku3wt4"),_(t,"paused",i[6])},m(m,g){T(m,t,g),q(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),i[9](r),f=!0,d||(p=[Pe(r,"play",i[10]),Pe(r,"pause",i[10]),Pe(t,"click",Zi(i[7]))],d=!0)},p(m,g){i=m,(!f||g&8&&!et(r.src,a=i[3]))&&b(r,"src",a),g&64&&l!==(l=i[6])&&r[l?"pause":"play"](),(!f||g&64)&&_(t,"paused",i[6])},i(m){f||(k(e.$$.fragment,m),m&&xe(()=>{u&&u.end(1),c=Ot(t,Tt,{duration:i[2],delay:i[0],easing:Zt}),c.start()}),f=!0)},o(m){M(e.$$.fragment,m),c&&c.invalidate(),m&&(u=$t(t,Tt,{duration:i[2],delay:i[1],easing:Zt})),f=!1},d(m){m&&z(t),K(e),i[9](null),m&&u&&u.end(),d=!1,rt(p)}}}function Zp(i){let t,e,n=i[4]&&xr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[4]?n?(n.p(o,s),s&16&&k(n,1)):(n=xr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function _p(i,t,e){let{inDelay:n=0}=t,{outDelay:o=0}=t,{duration:s=0}=t,{url:r}=t,{unfolded:a}=t,{hooksInfo:l={}}=t;const c=mn("hooks"),u=mn("mediaStore");let f,d=!0;u.subscribe(({currentMediaUrl:A})=>{A!==r&&(f==null||f.pause())});function p(A){u.set({currentMediaUrl:r}),f&&(c.emit("click",N({event:A,target:"AudioTagPlayIcon",audioInstance:f},l)),f.paused?f.play():f.pause(),e(5,f.onplay=v=>c.emit("playStateChange",N({event:v,state:"playing",mediaInstance:f},l)),f),e(5,f.onpause=v=>c.emit("playStateChange",N({event:v,state:"paused",mediaInstance:f},l)),f))}function m(A){Me[A?"unshift":"push"](()=>{f=A,e(5,f)})}function g(){d=this.paused,e(6,d)}return i.$$set=A=>{"inDelay"in A&&e(0,n=A.inDelay),"outDelay"in A&&e(1,o=A.outDelay),"duration"in A&&e(2,s=A.duration),"url"in A&&e(3,r=A.url),"unfolded"in A&&e(4,a=A.unfolded),"hooksInfo"in A&&e(8,l=A.hooksInfo)},i.$$.update=()=>{i.$$.dirty&48&&(a||f==null||f.pause())},[n,o,s,r,a,f,d,p,l,m,g]}class qp extends oe{constructor(t){super(),ie(this,t,_p,Zp,te,{inDelay:0,outDelay:1,duration:2,url:3,unfolded:4,hooksInfo:8},Jp)}}function Kp(i){ae(i,"svelte-4r8s18",".audio-tag.svelte-4r8s18.svelte-4r8s18{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.line.svelte-4r8s18.svelte-4r8s18{display:flex;position:absolute;top:0;left:0;width:10.125rem;height:0.0625rem;transform:translate3d(0, -50%, 0.625rem)}.content.svelte-4r8s18.svelte-4r8s18{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0.125rem;overflow:hidden;box-sizing:border-box;font-size:0;white-space:nowrap;font-weight:600}.wrapper.svelte-4r8s18.svelte-4r8s18{position:relative;width:100%;height:100%}.audio-icon.svelte-4r8s18.svelte-4r8s18{vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.unfolded.svelte-4r8s18 .audio-icon.svelte-4r8s18{pointer-events:auto}")}function kr(i){var C,w,x,D;let t,e,n,o,s,r,a,l,c,u,f,d,p,m,g,A,v;return e=new Ve({props:{visible:i[5],left:i[2]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),s=new Wa({props:{unfolded:i[5],duration:1e3,outDelay:i[4]+20*Math.min((w=(C=i[3][0])==null?void 0:C.content.length)!=null?w:10,15)}}),u=new qp({props:{unfolded:i[5],url:i[0].data.audioUrl,duration:1e3,outDelay:20*Math.min((D=(x=i[3][0])==null?void 0:x.content.length)!=null?D:10,15),hooksInfo:{tag:i[0]}}}),p=new Ya({props:{visible:i[5],textUnfolded:i[1],textItems:i[3]}}),{c(){t=Q("div"),$(e.$$.fragment),n=Z(),o=Q("div"),$(s.$$.fragment),r=Z(),a=Q("div"),l=Q("div"),c=Q("div"),$(u.$$.fragment),f=Z(),d=Q("div"),$(p.$$.fragment),b(o,"class","line svelte-4r8s18"),H(o,"width",i[2]+"px"),b(c,"class","audio-icon svelte-4r8s18"),H(d,"display","inline-block"),b(l,"class","wrapper svelte-4r8s18"),b(a,"class","content svelte-4r8s18"),xe(()=>i[8].call(a)),b(t,"class","audio-tag svelte-4r8s18"),_(t,"unfolded",i[5])},m(y,L){T(y,t,L),q(e,t,null),O(t,n),O(t,o),q(s,o,null),O(t,r),O(t,a),O(a,l),O(l,c),q(u,c,null),O(l,f),O(l,d),q(p,d,null),m=bt(a,i[8].bind(a)),g=!0,A||(v=Pe(d,"click",i[6]),A=!0)},p(y,L){var U,I,S,R;const P={};L&32&&(P.visible=y[5]),L&4&&(P.left=y[2]/2+"px"),e.$set(P);const j={};L&32&&(j.unfolded=y[5]),L&24&&(j.outDelay=y[4]+20*Math.min((I=(U=y[3][0])==null?void 0:U.content.length)!=null?I:10,15)),s.$set(j),L&4&&H(o,"width",y[2]+"px");const B={};L&32&&(B.unfolded=y[5]),L&1&&(B.url=y[0].data.audioUrl),L&8&&(B.outDelay=20*Math.min((R=(S=y[3][0])==null?void 0:S.content.length)!=null?R:10,15)),L&1&&(B.hooksInfo={tag:y[0]}),u.$set(B);const G={};L&32&&(G.visible=y[5]),L&2&&(G.textUnfolded=y[1]),L&8&&(G.textItems=y[3]),p.$set(G),(!g||L&32)&&_(t,"unfolded",y[5])},i(y){g||(k(e.$$.fragment,y),k(s.$$.fragment,y),k(u.$$.fragment,y),k(p.$$.fragment,y),g=!0)},o(y){M(e.$$.fragment,y),M(s.$$.fragment,y),M(u.$$.fragment,y),M(p.$$.fragment,y),g=!1},d(y){y&&z(t),K(e),K(s),K(u),K(p),m(),A=!1,v()}}}function $p(i){let t,e,n=i[0].state&&kr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=kr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function eg(i,t,e){let n,o,s,{tag:r}=t,a=!1,l,c=[];function u(){e(1,a=!a)}function f(){l=this.clientWidth,e(2,l)}return i.$$set=d=>{"tag"in d&&e(0,r=d.tag)},i.$$.update=()=>{var d;i.$$.dirty&1&&e(5,n=!!((d=r.state)!=null&&d.unfolded)),i.$$.dirty&1&&e(7,o=r.data.text),i.$$.dirty&128&&e(3,c=[{id:He(),content:o}]),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,n,u,o,f]}class tg extends oe{constructor(t){super(),ie(this,t,eg,$p,te,{tag:0},Kp)}}function ng(i){ae(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function Dr(i){let t,e,n;return e=new Ja({props:{unfolded:i[5],mediaData:i[4],objectFit:i[2],enableCarousel:i[1],autoplayConfig:i[3],tag:i[0],canPlay:!0,playButtonIfNeed:"large",inDelay:500,duration:500}}),{c(){t=Q("div"),$(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(o,s){T(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&32&&(r.unfolded=o[5]),s&16&&(r.mediaData=o[4]),s&4&&(r.objectFit=o[2]),s&2&&(r.enableCarousel=o[1]),s&8&&(r.autoplayConfig=o[3]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){M(e.$$.fragment,o),n=!1},d(o){o&&z(t),K(e)}}}function ig(i){let t,e,n=i[0].state&&i[4]&&Dr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[0].state&&o[4]?n?(n.p(o,s),s&17&&k(n,1)):(n=Dr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function og(i,t,e){let n,o,s,r,a,{tag:l}=t;return i.$$set=c=>{"tag"in c&&e(0,l=c.tag)},i.$$.update=()=>{var c,u;i.$$.dirty&1&&e(5,n=l.state?l.state.unfolded:!1),i.$$.dirty&1&&e(4,o=l.data.mediaData),i.$$.dirty&1&&e(1,s=l.data.enableCarousel),i.$$.dirty&3&&e(3,r=(c=l.data.autoplayConfig)!=null?c:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,a=(u=l.data.objectFit)!=null?u:(()=>l.data.adaptationMode==="stretch"?"cover":l.data.adaptationMode==="proportional"?"contain":void 0)())},[l,s,a,r,o,n]}class sg extends oe{constructor(t){super(),ie(this,t,og,ig,te,{tag:0},ng)}}function rg(i){ae(i,"svelte-7x7u86",".wrapper.svelte-7x7u86{font-weight:600;cursor:pointer;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:auto}.text-wrapper.svelte-7x7u86{position:relative;display:flex;align-items:center;justify-content:center}.icon.svelte-7x7u86{position:relative;margin-bottom:0.6875rem}.arrow0.svelte-7x7u86,.arrow1.svelte-7x7u86,.arrow2.svelte-7x7u86{position:absolute;width:1.625rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAAkCAYAAAAnxQwhAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAATqADAAQAAAABAAAAJAAAAABrx2urAAAGm0lEQVRoBd2ZXbCVUxjH26QSfSCS0JwoFNEZ0cc45iSmUUaqC+KCwUUXxYUZw4yrLhozLlDDRWa6oW5yOFTT0IcyKn1JnIjDKelLPipJcXT8fttaZ95qd+yzv+uZ+e211rvfd61n/ddaz1rv3qkOFWg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ckzU56pFC8augMudoSHoziWcdSmIOA8e3Da6dYm8Ihmu+Zz8H14ckYWHONZ19Qz4+go53A9qNYLvtPYBlON5C2Gn4MpuDsHgVxecXvHQQH8krw7JiLuUnohz5pX8NM/PB9N6OdVjicNaa8AHFJROeqMtZ0+ovGk2/AI0o3iGKRTcey9aSO8locbXN3wyc75k4+BoaBYSNZ3yHKHj2ug6uhPdbEzQ6qK0ARXQ0z8MmYe4plFA4Hx3Hn0xB3Hiv0V9qTYxCXMpoie2LX+vyXnPDpiH4Ay3HMe9tt+NiTh0bDPRBXRLIed07tZvDebEzhN4CzV3O5voyPi9KlxMcJwuGMQj0FE8M9Ku9I1MIJ94bvk4mNGORdcr41GLd8xjpM94HxZAmO7CAtmOF3Pyoz5srJ8bCZaw68M95NJU4GshlNf1dAf4i+15F/Bb9b416rGDRuPHsRHCHN2PEz3GahDXMq/wR9wfgTGyObFnE56ULwDxW/K5rRB/tTDa4YY2Imf3Zx/TIwFLVl6/iyF8SNxxX0LH1Ix720cDRoTJgNcbT2hwdUPZPZeCNYsc9EQazPEV4NTm9/zjlKWnKjT11otBYUcRS4AuKgmjrYToxrwUHPZN9z0Ql0afhyL+k0+rQtRQOu/3qIAhjIB0IPSJrrvwEcARvTko44896DhXFUvKESjD66msbD/eBMSw60eQVygAfDyXH8INe2gZPLiaF4ExTucTLPg2aMGg7uVpqzZwu4tm8Ad7UoFtn0q4ti1SHWt16odKO/A/DxAZgAcYVFt+3nV2AcHAIdQTsOa6Ea7P9MhZtB5jHQmsDltwMM8qrszFPpaEfILIYF4H+ZVnrGGf12coyEyXAvdIU4KUydaa4+r/cDl3UVaHMVzun7erp4+g/FWQWK5a6oeGeNoYHijAVFrIG44shmtKkK52x6FSZluMW4pVjvIJbHibPe0MPl61JWxEEZOvw216a3LkEeGMGFO0D1d8KqMyVu4WtRDE2Mh85Az6Wuso/RZA1ph38BBMvNbHuq7kAAAAAASUVORK5CYII=);background-repeat:no-repeat;background-size:contain;animation-fill-mode:backwards;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.2s}.arrow1.svelte-7x7u86{position:relative}.arrow0.svelte-7x7u86{top:-0.75rem;animation-name:svelte-7x7u86-up0}.arrow1.svelte-7x7u86{animation-name:svelte-7x7u86-up1}.arrow2.svelte-7x7u86{top:0.75rem;animation-name:svelte-7x7u86-up2}.text.svelte-7x7u86{position:absolute;top:0;font-size:0.875rem;color:#ffffff;letter-spacing:0;text-align:center;max-width:8.75rem;width:-moz-max-content;width:max-content;word-break:break-all;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}@keyframes svelte-7x7u86-up0{0%{opacity:0.8;transform:translate3d(0, 0, 0) scale(0.84)}33.33%,100%{opacity:0;transform:translate3d(0, -0.75rem, 0) scale(0.84)}}@keyframes svelte-7x7u86-up1{0%{opacity:1;transform:translate3d(0, 0, 0) scale(1)}33.33%,100%{opacity:0.8;transform:translate3d(0, -0.75rem, 0) scale(0.84)}}@keyframes svelte-7x7u86-up2{0%{opacity:0}33.33%,100%{opacity:1;transform:translate3d(0, -0.75rem, 0)}}.link.svelte-7x7u86{position:relative;width:1.75rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAkCAMAAAAgl+0yAAAAnFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+TINBkAAAAM3RSTlMAjLy6ILM2Fi+Zng3BrPvao4VC9ceneQfKkmNdV1AbEeLOsHA77ujUtn5JLnRraSUUjVLj/+RVAAABhElEQVRIx63V2W6CQBiGYUBUQGDYdwTZQZZa7v/eimik/ket/7yZ4yeTTCYf8+dOX8etxGVoxAvCVbguR3g0uRTMA0w4odGi+CbzFnGKosCqrmHc5rdEwzCwqtGFJlC7DqtOcTxANY67BHnVKOpVoEZRjFPdLgxbqIZhhFTjINChGgThF06NhpGd35OGMcCppyDPfajm+YhUR8cRoeo4+RGlJnnbalBt2x6nHh1dt4Gq6bqDU886y2ZQZVn9jFJ51vcbqPo+Up18UeSgKoo3nHqVJEkGqi1JPk49aLZmQdW2xXf1zP+vUFHsC1QVReK33xdk+w9SaqAq+732UvvdZ2UEqrud8lR5Wc4a7pO8GaoL9VBjy7rMlMosq1lV43LhZlrtF+yuJlbtEXpqXXP3NYwI8VJqakOIziw5aepV1FQuTdfhvlWVZdJCrao6MPe0spRpqV5ZFivqNqYpq3RQ2TST5/h4quoRCmwqq6rymol6plV53IZSomTKE/MroWfxDevL/wAEdPq1eGDh4AAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-size:contain;animation-iteration-count:infinite;animation-timing-function:linear;animation-duration:1.2s;animation-name:svelte-7x7u86-left-right}@keyframes svelte-7x7u86-left-right{0%,100%{opacity:0.8;transform:translateX(-0.3125rem)}50%{opacity:1;transform:translateX(0)}}")}function ag(i){let t,e,n,o;return t=new Ve({props:{visible:!0,outDelay:0,inDelay:0,width:1.4,left:13,bottom:"auto",blurRadius:50,spreadRadius:18}}),{c(){$(t.$$.fragment),e=Z(),n=Q("div"),b(n,"class","link svelte-7x7u86")},m(s,r){q(t,s,r),T(s,e,r),T(s,n,r),o=!0},i(s){o||(k(t.$$.fragment,s),o=!0)},o(s){M(t.$$.fragment,s),o=!1},d(s){K(t,s),s&&z(e),s&&z(n)}}}function lg(i){let t,e,n,o,s,r,a,l;return t=new Ve({props:{visible:!0,outDelay:0,inDelay:0,height:1.2,left:13,bottom:12,blurRadius:50,spreadRadius:18}}),{c(){$(t.$$.fragment),e=Z(),n=Q("div"),o=Z(),s=Q("div"),r=Z(),a=Q("div"),b(n,"class","arrow0 svelte-7x7u86"),b(s,"class","arrow1 svelte-7x7u86"),b(a,"class","arrow2 svelte-7x7u86")},m(c,u){q(t,c,u),T(c,e,u),T(c,n,u),T(c,o,u),T(c,s,u),T(c,r,u),T(c,a,u),l=!0},i(c){l||(k(t.$$.fragment,c),l=!0)},o(c){M(t.$$.fragment,c),l=!1},d(c){K(t,c),c&&z(e),c&&z(n),c&&z(o),c&&z(s),c&&z(r),c&&z(a)}}}function cg(i){let t,e,n,o,s,r,a,l,c,u=i[0].text+"",f,d;const p=[lg,ag],m=[];function g(A,v){return A[0].linkType===ei.VrLink?0:A[0].linkType===ei.NormalLink?1:-1}return~(n=g(i))&&(o=m[n]=p[n](i)),a=new Ve({props:{visible:!0,outDelay:0,inDelay:0,left:"auto",bottom:"auto",width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=Q("div"),e=Q("div"),o&&o.c(),s=Z(),r=Q("div"),$(a.$$.fragment),l=Z(),c=Q("div"),f=ke(u),b(e,"class","icon svelte-7x7u86"),b(c,"class","text svelte-7x7u86"),b(r,"class","text-wrapper svelte-7x7u86"),b(t,"class","wrapper svelte-7x7u86")},m(A,v){T(A,t,v),O(t,e),~n&&m[n].m(e,null),O(t,s),O(t,r),q(a,r,null),O(r,l),O(r,c),O(c,f),d=!0},p(A,[v]){let C=n;n=g(A),n!==C&&(o&&(le(),M(m[C],1,1,()=>{m[C]=null}),ce()),~n?(o=m[n],o||(o=m[n]=p[n](A),o.c()),k(o,1),o.m(e,null)):o=null),(!d||v&1)&&u!==(u=A[0].text+"")&&Te(f,u)},i(A){d||(k(o),k(a.$$.fragment,A),d=!0)},o(A){M(o),M(a.$$.fragment,A),d=!1},d(A){A&&z(t),~n&&m[n].d(),K(a)}}}function ug(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(1,o=s.tag)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=o.data)},[n,o]}class dg extends oe{constructor(t){super(),ie(this,t,ug,cg,te,{tag:1},rg)}}function fg(i){ae(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function Lr(i){let t,e=i[0].element+"",n;return{c(){t=new Yn(!1),n=he(),t.a=n},m(o,s){t.m(e,o,s),T(o,n,s)},p(o,s){s&1&&e!==(e=o[0].element+"")&&t.p(e)},d(o){o&&z(n),o&&t.d()}}}function hg(i){let t,e=typeof i[0].element=="string"&&Lr(i);return{c(){t=Q("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){T(n,t,o),e&&e.m(t,null),i[2](t)},p(n,[o]){typeof n[0].element=="string"?e?e.p(n,o):(e=Lr(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:ee,o:ee,d(n){n&&z(t),e&&e.d(),i[2](null)}}}function mg(i,t,e){let{tag:n}=t,o,s;Ye(()=>{if(o){if(n.element instanceof Element){const a=n.element;o.appendChild(a),s=()=>o==null?void 0:o.removeChild(a)}else if(typeof n.element=="function"){const a=n.element;s=a(o)}}}),yt(()=>{s==null||s()});function r(a){Me[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class pg extends oe{constructor(t){super(),ie(this,t,mg,hg,te,{tag:0},fg)}}function gg(i){ae(i,"svelte-95x526",`@font-face{font-family:'TG-TYPE';font-style:normal;font-weight:400;src:local('TG-TYPE-Bold'),
|
|
545
545
|
url(data:application/font-woff2;charset=utf-8;base64,T1RUTwAKAIAAAwAgQ0ZGINFD4CEAAAaQAAAHC0dTVUIAAQAAAAANnAAAAApPUy8yaB5pEwAAAjQAAABgY21hcEItjGUAAAT0AAABfGhlYWQS1WWOAAAAtAAAADZoaGVhBfMBxwAAAhAAAAAkaG10eJ9gBO8AAADsAAABJG1heHAASVAAAAAArAAAAAZuYW1lqczkZQAAApQAAAJecG9zdP+4ADIAAAZwAAAAIAAAUAAASQAAAAEAAAABAADkeHeyXw889QADA+gAAAAA2NoRKwAAAADY2hErACn/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJY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Tx8OmIr5UQG/+B8D93iKFfsIBvdo+OYF+6T2+B8oBg6iifL3bPX3QPEStvNB8vc/8jXxE/L4EvgHFRPss7Cnu78arYOreqgexWpNr0YbaWyDem4fUmlmTUcaXqBftGAeE/JWYmROSxpklWieax5Ksc9i2BuxrpWerB/LsbTP2BrHaMVath4T7PsN93QVu7FjXFtlZltcZbC7urGzuh8T8oX8ghVPW7zHx7q6yMa9W1BPWVpQHw6i96Tz92/0AbTz93DzA/hp+HkVsIGveKwezmNFtUAbZGeBeGofSmNiRT8aZJVnnmseSrHPYtoboAb7EvukBfcHBvdL+CEFmaySqaQa+9gWxry+yJ6dhoGcHq12oWZmGk5YW1BMXLnKHg4gCiEK+11L91IlCvdiyhWtb6hpJgoeJAoOIQogCqz3pe/3b/UBufX3bfQD+G74dxWyga94rB7NZEW0PhtlaIF4ah9KY2FFPxo7tkTPZh6MjIqKjB+TiJCIjYoIjgaCoKGHoRuanY6QoB+IgfsB+6QF9wcG9y/4IgWYppGnqhr7a/sCFVBbvMjHu7zGyLxbTk5aWk4fDvtd+AojCoz7jBUmCh8kCq1vqGkeDvtdi/cS94wjCvwKBCIKDiD3ru8BvPeuA7z4EhUn967vBw4eoDf/DAmLDAv47BT4exWcEwAHAQFBXW97ipCarPcv8+7yAfdl8gP4aPf6FfIjB+r3gwUiBi77gwWHBjH3gwUkBuP7gwUnJPcxKPsxI/cx+y/y9y/3MPP7MO4GDvtdi/cSJQr3JBZkcqOzsKSksrCkcWdlcnFmHw6up6eurm+naGhvb2hop2+uHwv3EiUK9yP4ChUiCgt3SgWxBrnmBZGVj5eZGgsB2/cSAwtobm5paqBzqoYLAAABAAAAAAAAAAAAAA==)
|
|
546
|
-
format('woff2')}.content__container.svelte-95x526{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.unClickable.svelte-95x526{pointer-events:none !important}.content__container.unClickable.svelte-95x526 *{pointer-events:none !important}*{-webkit-tap-highlight-color:transparent}.content__wrapper.svelte-95x526{pointer-events:none;width:100%;height:100%}.withAnimation.svelte-95x526{transition:opacity 0.3s linear}.content__container.hide.svelte-95x526{opacity:0;pointer-events:none}.content__container.hide.svelte-95x526 *{pointer-events:none !important}.content__container.disable.svelte-95x526{display:none}.content__container.hide.svelte-95x526 *{pointer-events:none}.content.svelte-95x526{position:relative;width:100%;height:100%;font-size:0.75rem;line-height:1.125rem;color:#fff}.content.svelte-95x526:not(.unfolded){pointer-events:none}.content.svelte-95x526:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-95x526{pointer-events:auto}`)}function Ag(i){let t,e;return t=new sg({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function vg(i){let t,e;return t=new dg({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function bg(i){let t,e;return t=new Vp({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function yg(i){let t,e;return t=new tg({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function wg(i){let t,e;return t=new Wp({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Cg(i){let t,e;return t=new op({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Eg(i){let t,e;return t=new pg({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Pg(i){let t,e,n,o,s,r,a,l,c;const u=[Eg,Cg,wg,yg,bg,vg,Ag],f=[];function d(p,m){return p[1].element?0:p[1].contentType===We.Text?1:p[1].contentType===We.ImageText?2:p[1].contentType===We.Audio?3:p[1].contentType===We.Marketing?4:p[1].contentType===We.Link?5:p[1].contentType===We.MediaPlane?6:-1}return~(o=d(i))&&(s=f[o]=u[o](i)),{c(){var p,m,g;t=Q("div"),e=Q("div"),n=Q("div"),s&&s.c(),b(n,"class","content svelte-95x526"),_(n,"unfolded",(p=i[1].state)==null?void 0:p.unfolded),b(e,"class","content__wrapper svelte-95x526"),b(t,"class","content__container svelte-95x526"),b(t,"data-id",r=i[1].id),_(t,"disable",i[1].enabled===!1||((m=i[1].temporaryState)==null?void 0:m.visible)===!1),_(t,"hide",!i[3].visible||!i[3].enabled||!i[4].visible||!((g=i[1].state)!=null&&g.visible)),_(t,"withAnimation",i[0]),_(t,"unClickable",i[1].clickable===!1),H(t,"width",i[1].pointType==="PointTag"?0:"100%"),H(t,"height",i[1].pointType==="PointTag"?0:"100%")},m(p,m){T(p,t,m),O(t,e),O(e,n),~o&&f[o].m(n,null),a=!0,l||(c=Pe(t,"click",Zi(i[11])),l=!0)},p(p,[m]){var A,v,C;let g=o;o=d(p),o===g?~o&&f[o].p(p,m):(s&&(le(),M(f[g],1,1,()=>{f[g]=null}),ce()),~o?(s=f[o],s?s.p(p,m):(s=f[o]=u[o](p),s.c()),k(s,1),s.m(n,null)):s=null),(!a||m&2)&&_(n,"unfolded",(A=p[1].state)==null?void 0:A.unfolded),(!a||m&2&&r!==(r=p[1].id))&&b(t,"data-id",r),(!a||m&2)&&_(t,"disable",p[1].enabled===!1||((v=p[1].temporaryState)==null?void 0:v.visible)===!1),(!a||m&26)&&_(t,"hide",!p[3].visible||!p[3].enabled||!p[4].visible||!((C=p[1].state)!=null&&C.visible)),(!a||m&1)&&_(t,"withAnimation",p[0]),(!a||m&2)&&_(t,"unClickable",p[1].clickable===!1),m&2&&H(t,"width",p[1].pointType==="PointTag"?0:"100%"),m&2&&H(t,"height",p[1].pointType==="PointTag"?0:"100%")},i(p){a||(k(s),a=!0)},o(p){M(s),a=!1},d(p){p&&z(t),~o&&f[o].d(),l=!1,c()}}}function Ig(i,t,e){let n,o,s,r,{withAnimation:a=!1}=t,{tag:l}=t,{hooks:c}=t,{state:u}=t,{mediaStore:f}=t,{temporaryState:d}=t;Bi("hooks",c),Bi("mediaStore",f);let p,m;function g(v){v?c.emit("exposure",{id:r,type:"start"}):c.emit("exposure",{id:r,type:"end"})}const A=v=>c.emit("click",{event:v,target:"TagContent",tag:l});return i.$$set=v=>{"withAnimation"in v&&e(0,a=v.withAnimation),"tag"in v&&e(1,l=v.tag),"hooks"in v&&e(2,c=v.hooks),"state"in v&&e(3,u=v.state),"mediaStore"in v&&e(5,f=v.mediaStore),"temporaryState"in v&&e(4,d=v.temporaryState)},i.$$.update=()=>{var v,C;i.$$.dirty&2&&e(9,n=(v=l.state)==null?void 0:v.unfolded),i.$$.dirty&2&&e(8,o=(C=l.state)==null?void 0:C.visible),i.$$.dirty&280&&e(10,s=u.visible&&d.visible&&o),i.$$.dirty&2&&(r=l.id),i.$$.dirty&1024&&g(s),i.$$.dirty&962&&l.hooks&&(n!==void 0&&n!==m&&(e(7,m=n),n?l.hooks.emit("unfolded"):l.hooks.emit("folded")),o!==void 0&&o!==p&&(e(6,p=o),o?l.hooks.emit("show"):l.hooks.emit("hide")))},[a,l,c,u,d,f,p,m,o,n,s,A]}class Za extends oe{constructor(t){super(),ie(this,t,Ig,Pg,te,{withAnimation:0,tag:1,hooks:2,state:3,mediaStore:5,temporaryState:4},gg)}}function xg(i){ae(i,"svelte-fuismw",".point.svelte-fuismw.svelte-fuismw{pointer-events:none;width:1.5rem;height:1.5rem}.small-point.svelte-fuismw.svelte-fuismw,.big-point.svelte-fuismw.svelte-fuismw{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all 500ms}.big-point.svelte-fuismw.svelte-fuismw{background-color:rgba(0, 0, 0, 0.1)}.folded.point.svelte-fuismw.svelte-fuismw{animation:svelte-fuismw-breathing 2s linear infinite}.big-point.svelte-fuismw.svelte-fuismw::before,.big-point.svelte-fuismw.svelte-fuismw::after{content:'';display:block;position:absolute;background-size:contain;background-repeat:no-repeat;pointer-events:none}.big-point.svelte-fuismw.svelte-fuismw::before{width:100%;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAAAqFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8j1z1tAAAAOHRSTlMABgoNFBsYIhEmHyksMoJ6RZ5aXzpnU03AtqaZjLuGN+zcifnW0cjEqnA+lOZzbWLhkH6i8rGuagnOwPMAAAQOSURBVFjDrZiHctpAEIYXYzvGOvXeUe+IYuD93ywrJAIhFJX8M8zoBHzz757utHvwTETJHJPfGQZfWJXILWCMPuqNbuu6vj+khrHjed40TWvFfQ2jvCl8nGha6lQCl7s07UqcUlfOZrOxVtKsN2a+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ZgR6H/agF8C3KNqCeHLIIRR7oEr0XXsixy9P1jH/doJLF2nPXbIlw5y1aC6t4eROW1pduaLs/7b6NEqFiWrWpBzaXuaOy4Nfe6bRfqGwzSXBJZhnF8y9oUhcnzOyM9pI7wCWP0LSkyy1iFWWwsFp8LeKLfd4doRyTLRacAAAAASUVORK5CYII=)}.folded.svelte-fuismw .big-point.svelte-fuismw::before{animation:svelte-fuismw-rotate 2s linear infinite}.big-point.svelte-fuismw.svelte-fuismw::after{position:absolute;width:1rem;height:1rem;background-image:var(--iconUrl)}.small-point.svelte-fuismw.svelte-fuismw::before{content:'';display:block;position:absolute;pointer-events:none;width:0.25rem;height:0.25rem;border-radius:100%;background-color:white}.folded.svelte-fuismw .big-point.svelte-fuismw{opacity:1;scale:1}.unfolded.svelte-fuismw .big-point.svelte-fuismw{opacity:0;scale:0}.folded.svelte-fuismw .small-point.svelte-fuismw{opacity:0;scale:6}.unfolded.svelte-fuismw .small-point.svelte-fuismw{opacity:1;scale:1}@keyframes svelte-fuismw-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes svelte-fuismw-breathing{0%{transform:scale(1)}25%{transform:scale(0.9)}50%{transform:scale(1)}}")}function kg(i){let t,e,n,o,s,r,a;return e=new Ve({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){t=Q("div"),$(e.$$.fragment),n=Z(),o=Q("div"),s=Z(),r=Q("div"),b(o,"class","small-point svelte-fuismw"),H(o,"transition-delay",i[3]?i[2]+"ms":"0ms"),b(r,"class","big-point svelte-fuismw"),H(r,"--iconUrl","url("+i[1]+")"),H(r,"transition-delay",i[3]?i[2]+"ms":"0ms"),b(t,"class","point svelte-fuismw"),_(t,"folded",i[3]),_(t,"unfolded",i[0])},m(l,c){T(l,t,c),q(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),a=!0},p(l,[c]){c&12&&H(o,"transition-delay",l[3]?l[2]+"ms":"0ms"),(!a||c&2)&&H(r,"--iconUrl","url("+l[1]+")"),c&12&&H(r,"transition-delay",l[3]?l[2]+"ms":"0ms"),(!a||c&8)&&_(t,"folded",l[3]),(!a||c&1)&&_(t,"unfolded",l[0])},i(l){a||(k(e.$$.fragment,l),a=!0)},o(l){M(e.$$.fragment,l),a=!1},d(l){l&&z(t),K(e)}}}function Dg(i,t,e){let n,{unfolded:o}=t,{iconUrl:s}=t,{foldDelay:r=800}=t;return i.$$set=a=>{"unfolded"in a&&e(0,o=a.unfolded),"iconUrl"in a&&e(1,s=a.iconUrl),"foldDelay"in a&&e(2,r=a.foldDelay)},i.$$.update=()=>{i.$$.dirty&1&&e(3,n=!o)},[o,s,r,n]}class Lg extends oe{constructor(t){super(),ie(this,t,Dg,kg,te,{unfolded:0,iconUrl:1,foldDelay:2},xg)}}function Sg(i){ae(i,"svelte-jzvcn0",".point.svelte-jzvcn0.svelte-jzvcn0{pointer-events:none;width:1rem;height:1rem}.small-point.svelte-jzvcn0.svelte-jzvcn0,.big-point.svelte-jzvcn0.svelte-jzvcn0{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all 500ms}.big-point.svelte-jzvcn0.svelte-jzvcn0::before,.big-point.svelte-jzvcn0.svelte-jzvcn0::after{content:'';display:block;position:absolute;background-size:contain;background-repeat:no-repeat;pointer-events:none}.big-point.svelte-jzvcn0.svelte-jzvcn0::before{width:100%;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAAAqFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8j1z1tAAAAOHRSTlMABgoNFBsYIhEmHyksMoJ6RZ5aXzpnU03AtqaZjLuGN+zcifnW0cjEqnA+lOZzbWLhkH6i8rGuagnOwPMAAAQOSURBVFjDrZiHctpAEIYXYzvGOvXeUe+IYuD93ywrJAIhFJX8M8zoBHzz757utHvwTETJHJPfGQZfWJXILWCMPuqNbuu6vj+khrHjed40TWv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ufZbLUr11XEi/k4KHexUxWSY8DBCby7AU8E3eUhfzVkYZgR6H/agF8C3KNqCeHLIIRR7oEr0XXsixy9P1jH/doJLF2nPXbIlw5y1aC6t4eROW1pduaLs/7b6NEqFiWrWpBzaXuaOy4Nfe6bRfqGwzSXBJZhnF8y9oUhcnzOyM9pI7wCWP0LSkyy1iFWWwsFp8LeKLfd4doRyTLRacAAAAASUVORK5CYII=);background-size:contain;background-repeat:no-repeat}.small-point.svelte-jzvcn0.svelte-jzvcn0::before{content:'';display:block;position:absolute;pointer-events:none;width:0.375rem;height:0.375rem;border-radius:100%;background-color:white}.unfolded.svelte-jzvcn0 .big-point.svelte-jzvcn0{opacity:0;transform:scale(0)}.folded.svelte-jzvcn0 .big-point.svelte-jzvcn0{opacity:1;transform:scale(1)}.unfolded.svelte-jzvcn0 .small-point.svelte-jzvcn0{transform:scale(0.6)}.folded.svelte-jzvcn0 .small-point.svelte-jzvcn0{transform:scale(1)}")}function zg(i){let t,e,n,o,s,r,a;return e=new Ve({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){t=Q("div"),$(e.$$.fragment),n=Z(),o=Q("div"),s=Z(),r=Q("div"),b(o,"class","small-point svelte-jzvcn0"),H(o,"transition-delay",i[2]?i[1]+"ms":"0ms"),b(r,"class","big-point svelte-jzvcn0"),H(r,"transition-delay",i[2]?i[1]+"ms":"0ms"),b(t,"class","point svelte-jzvcn0"),_(t,"unfolded",i[0]),_(t,"folded",i[2])},m(l,c){T(l,t,c),q(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),a=!0},p(l,[c]){c&6&&H(o,"transition-delay",l[2]?l[1]+"ms":"0ms"),c&6&&H(r,"transition-delay",l[2]?l[1]+"ms":"0ms"),(!a||c&1)&&_(t,"unfolded",l[0]),(!a||c&4)&&_(t,"folded",l[2])},i(l){a||(k(e.$$.fragment,l),a=!0)},o(l){M(e.$$.fragment,l),a=!1},d(l){l&&z(t),K(e)}}}function Mg(i,t,e){let n,{unfolded:o}=t,{foldDelay:s=800}=t;return i.$$set=r=>{"unfolded"in r&&e(0,o=r.unfolded),"foldDelay"in r&&e(1,s=r.foldDelay)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=!o)},[o,s,n]}class Tg extends oe{constructor(t){super(),ie(this,t,Mg,zg,te,{unfolded:0,foldDelay:1},Sg)}}function Bg(i){ae(i,"svelte-8en2lj",".point-click-helper.svelte-8en2lj{position:absolute;width:2.5rem;height:2.5rem;left:50%;top:50%;transform:translate(-50%, -50%)}")}function Sr(i){let t,e,n=i[0].contentType!==We.Link&&zr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,s){o[0].contentType!==We.Link?n?(n.p(o,s),s&1&&k(n,1)):(n=zr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function zr(i){let t,e,n,o,s,r;const a=[Qg,jg],l=[];function c(u,f){var d,p,m,g;return((p=(d=u[0].style)==null?void 0:d.point)==null?void 0:p.style)==="CustomIcon"&&((g=(m=u[0].style)==null?void 0:m.point)==null?void 0:g.iconUrl)?0:1}return n=c(i),o=l[n]=a[n](i),{c(){t=Q("div"),e=Z(),o.c(),s=he(),b(t,"class","point-click-helper svelte-8en2lj")},m(u,f){T(u,t,f),T(u,e,f),l[n].m(u,f),T(u,s,f),r=!0},p(u,f){let d=n;n=c(u),n===d?l[n].p(u,f):(le(),M(l[d],1,1,()=>{l[d]=null}),ce(),o=l[n],o?o.p(u,f):(o=l[n]=a[n](u),o.c()),k(o,1),o.m(s.parentNode,s))},i(u){r||(k(o),r=!0)},o(u){M(o),r=!1},d(u){u&&z(t),u&&z(e),l[n].d(u),u&&z(s)}}}function jg(i){let t,e;return t=new Tg({props:{unfolded:i[0].state.unfolded,foldDelay:i[1]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.unfolded=n[0].state.unfolded),o&2&&(s.foldDelay=n[1]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Qg(i){let t,e;return t=new Lg({props:{iconUrl:i[0].style.point.iconUrl,unfolded:i[0].state.unfolded,foldDelay:i[1]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.iconUrl=n[0].style.point.iconUrl),o&1&&(s.unfolded=n[0].state.unfolded),o&2&&(s.foldDelay=n[1]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Rg(i){var o,s,r;let t,e,n=((o=i[0].pointTagStyle)==null?void 0:o.leftPercent)&&((s=i[0].pointTagStyle)==null?void 0:s.topPercent)&&i[0].enabled!==!1&&i[0].state&&((r=i[0].temporaryState)==null?void 0:r.visible)!==!1&&Sr(i);return{c(){n&&n.c(),t=he()},m(a,l){n&&n.m(a,l),T(a,t,l),e=!0},p(a,[l]){var c,u,f;((c=a[0].pointTagStyle)==null?void 0:c.leftPercent)&&((u=a[0].pointTagStyle)==null?void 0:u.topPercent)&&a[0].enabled!==!1&&a[0].state&&((f=a[0].temporaryState)==null?void 0:f.visible)!==!1?n?(n.p(a,l),l&1&&k(n,1)):(n=Sr(a),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(a){e||(k(n),e=!0)},o(a){M(n),e=!1},d(a){n&&n.d(a),a&&z(t)}}}function Og(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(0,o=s.tag)},i.$$.update=()=>{var s,r;i.$$.dirty&1&&e(1,n=(r=(s=o.style)==null?void 0:s.foldedPointDelay)!=null?r:o.contentType===We.Marketing?600:void 0)},[o,n]}class Hg extends oe{constructor(t){super(),ie(this,t,Og,Rg,te,{tag:0},Bg)}}function Fg(i){ae(i,"svelte-1vzhbu2",".wrapper.svelte-1vzhbu2{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}.point.svelte-1vzhbu2{-webkit-tap-highlight-color:transparent;position:absolute;transform:translate(-50%, -50%);left:50%;top:50%}")}function Mr(i){let t,e;return t=new Za({props:{mediaStore:i[4],withAnimation:i[0],tag:Se(i[1]),hooks:i[2],state:i[3],temporaryState:i[5]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&16&&(s.mediaStore=n[4]),o&1&&(s.withAnimation=n[0]),o&2&&(s.tag=Se(n[1])),o&4&&(s.hooks=n[2]),o&8&&(s.state=n[3]),o&32&&(s.temporaryState=n[5]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Tr(i){let t,e,n,o,s;return e=new Hg({props:{tag:i[1]}}),{c(){t=Q("div"),$(e.$$.fragment),b(t,"class","point svelte-1vzhbu2")},m(r,a){T(r,t,a),q(e,t,null),n=!0,o||(s=Pe(t,"click",Zi(i[11])),o=!0)},p(r,a){const l={};a&2&&(l.tag=r[1]),e.$set(l)},i(r){n||(k(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){r&&z(t),K(e),o=!1,s()}}}function Gg(i){var a,l;let t,e,n,o,s=i[1].dimensionType===Xe.Two&&Mr(i),r=i[1].pointType===Ge.PointTag&&((l=(a=i[1].style)==null?void 0:a.point)==null?void 0:l.style)!=="noPoint"&&Tr(i);return{c(){t=Q("div"),s&&s.c(),e=Z(),r&&r.c(),b(t,"class","wrapper svelte-1vzhbu2"),b(t,"data-id",n=i[1].id),_(t,"hide",i[10]),_(t,"unfolded",i[6]),H(t,"left",i[9]),H(t,"top",i[8]),H(t,"z-index",i[7])},m(c,u){T(c,t,u),s&&s.m(t,null),O(t,e),r&&r.m(t,null),o=!0},p(c,[u]){var f,d;c[1].dimensionType===Xe.Two?s?(s.p(c,u),u&2&&k(s,1)):(s=Mr(c),s.c(),k(s,1),s.m(t,e)):s&&(le(),M(s,1,1,()=>{s=null}),ce()),c[1].pointType===Ge.PointTag&&((d=(f=c[1].style)==null?void 0:f.point)==null?void 0:d.style)!=="noPoint"?r?(r.p(c,u),u&2&&k(r,1)):(r=Tr(c),r.c(),k(r,1),r.m(t,null)):r&&(le(),M(r,1,1,()=>{r=null}),ce()),(!o||u&2&&n!==(n=c[1].id))&&b(t,"data-id",n),(!o||u&1024)&&_(t,"hide",c[10]),(!o||u&64)&&_(t,"unfolded",c[6]),u&512&&H(t,"left",c[9]),u&256&&H(t,"top",c[8]),u&128&&H(t,"z-index",c[7])},i(c){o||(k(s),k(r),o=!0)},o(c){M(s),M(r),o=!1},d(c){c&&z(t),s&&s.d(),r&&r.d()}}}function Ng(i,t,e){let n,o,s,r,a,l,{withAnimation:c=!1}=t,{tag:u}=t,{hooks:f}=t,{state:d}=t,{mediaStore:p}=t,{temporaryState:m}=t,g,A=!1;function v(w){g!==void 0&&clearTimeout(g),A=!0,g=setTimeout(()=>{A=!1},800)}const C=w=>{A||f.emit("click",{event:w,target:"TagPoint",tag:u})};return i.$$set=w=>{"withAnimation"in w&&e(0,c=w.withAnimation),"tag"in w&&e(1,u=w.tag),"hooks"in w&&e(2,f=w.hooks),"state"in w&&e(3,d=w.state),"mediaStore"in w&&e(4,p=w.mediaStore),"temporaryState"in w&&e(5,m=w.temporaryState)},i.$$.update=()=>{var w,x,D,y;i.$$.dirty&2&&e(12,n=(w=u.state)==null?void 0:w.visible),i.$$.dirty&4096&&e(10,o=!n),i.$$.dirty&2&&e(6,s=(x=u.state)==null?void 0:x.unfolded),i.$$.dirty&2&&e(9,r=((D=u.pointTagStyle)==null?void 0:D.leftPercent)+"%"),i.$$.dirty&2&&e(8,a=((y=u.pointTagStyle)==null?void 0:y.topPercent)+"%"),i.$$.dirty&2&&e(7,l=u.contentType===We.Link?1:0),i.$$.dirty&64&&v()},[c,u,f,d,p,m,s,l,a,r,o,C,n]}class Wg extends oe{constructor(t){super(),ie(this,t,Ng,Gg,te,{withAnimation:0,tag:1,hooks:2,state:3,mediaStore:4,temporaryState:5},Fg)}}function Xg(i){ae(i,"svelte-1eci49s",".tag--container.svelte-1eci49s{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;opacity:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tag.hide.svelte-1eci49s{display:none}.withAnimation.svelte-1eci49s{transition:opacity 0.3s linear}.tag--container.hide.svelte-1eci49s{opacity:0;pointer-events:none}.tag--container.hide.svelte-1eci49s *{pointer-events:none}")}function Br(i,t,e){const n=i.slice();return n[6]=t[e],n}function jr(i){let t,e=[],n=new Map,o,s=i[1];const r=a=>a[6].id;for(let a=0;a<s.length;a+=1){let l=Br(i,s,a),c=r(l);n.set(c,e[a]=Qr(c,l))}return{c(){t=Q("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-1eci49s"),_(t,"hide",!i[3].visible||!i[5].visible),_(t,"withAnimation",i[0])},m(a,l){T(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,l){l&63&&(s=a[1],le(),e=Ue(e,l,r,1,a,s,n,t,at,Qr,null,Br),ce()),(!o||l&40)&&_(t,"hide",!a[3].visible||!a[5].visible),(!o||l&1)&&_(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)k(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)M(e[l]);o=!1},d(a){a&&z(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Qr(i,t){let e,n,o,s;const r=[{tag:t[6],hooks:t[2],state:t[3],mediaStore:t[4],temporaryState:t[5],withAnimation:t[0]}];let a={};for(let l=0;l<r.length;l+=1)a=we(a,r[l]);return n=new Wg({props:a}),{key:i,first:null,c(){var l,c,u;e=Q("div"),$(n.$$.fragment),o=Z(),b(e,"class","tag svelte-1eci49s"),_(e,"hide",!((l=t[6].pointTagStyle)!=null&&l.leftPercent)||!((c=t[6].pointTagStyle)!=null&&c.topPercent)||t[6].enabled===!1||!t[6].state||((u=t[6].temporaryState)==null?void 0:u.visible)===!1),this.first=e},m(l,c){T(l,e,c),q(n,e,null),O(e,o),s=!0},p(l,c){var f,d,p;t=l;const u=c&63?Be(r,[{tag:t[6],hooks:t[2],state:t[3],mediaStore:t[4],temporaryState:t[5],withAnimation:t[0]}]):{};n.$set(u),(!s||c&2)&&_(e,"hide",!((f=t[6].pointTagStyle)!=null&&f.leftPercent)||!((d=t[6].pointTagStyle)!=null&&d.topPercent)||t[6].enabled===!1||!t[6].state||((p=t[6].temporaryState)==null?void 0:p.visible)===!1)},i(l){s||(k(n.$$.fragment,l),s=!0)},o(l){M(n.$$.fragment,l),s=!1},d(l){l&&z(e),K(n)}}}function Yg(i){let t,e,n=i[3].enabled&&jr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&k(n,1)):(n=jr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Ug(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{state:r}=t,{mediaStore:a}=t,{temporaryState:l}=t;return i.$$set=c=>{"withAnimation"in c&&e(0,n=c.withAnimation),"tags"in c&&e(1,o=c.tags),"hooks"in c&&e(2,s=c.hooks),"state"in c&&e(3,r=c.state),"mediaStore"in c&&e(4,a=c.mediaStore),"temporaryState"in c&&e(5,l=c.temporaryState)},[n,o,s,r,a,l]}class Vg extends oe{constructor(t){super(),ie(this,t,Ug,Yg,te,{withAnimation:0,tags:1,hooks:2,state:3,mediaStore:4,temporaryState:5},Xg)}}const Jg={globalConfig:{initialState:{},visibleConfig:{visibleDistance:{max:5},angleRange:{min:-45,max:45}},unfoldedConfig:{autoUnfold:{strategy:"MinimumDistance"}},tag3DConfig:{ratio:.0035}},contentTypeConfig:{"Any-Link-Any":{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},"Any-Marketing-Any":{unfoldedConfig:void 0},"3D-MediaPlane-PlaneTag":{unfoldedConfig:{keep:"unfolded"},visibleConfig:{alwaysShowWhenMovePano:!0,angleRange:void 0,visibleDistance:void 0}}}};class Zg extends ai{constructor(e){super(e);h(this,"tagCacheByPanoIndex",{})}getCaches({panoIndex:e,id:n,key:o}){var c,u,f,d;const{five:s}=this,r=(c=s.panoIndex)!=null?c:e;if(r===void 0)throw new Error(`TagCacheController getCache(): fivePanoIndex is ${r}`);const a=`${(f=(u=s.work)==null?void 0:u.workCode)!=null?f:s.model.uuid}-${r}`;let l=this.tagCacheByPanoIndex[a];if(l||(l=new Map,this.tagCacheByPanoIndex[a]=l),n===void 0)return l;if(o===void 0){const p=l.get(n);return p||(l.set(n,{}),l.get(n))}return(d=l.get(n))==null?void 0:d[o]}clearCache(){this.tagCacheByPanoIndex={}}}class _g extends Zg{constructor(e){super(e);h(this,"tags",[]);h(this,"config",Jg);h(this,"raycaster",new E.Raycaster)}getTagById(e){const n=this.tags.find(o=>o.id===e);if(!n){console.error(`getTagById(): tag is ${n}, id is ${e}`);return}return n}changeConfig(e,n=!0){n?this.config=Dt.default({},this.config,e):this.config=e,this.clearCache()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=Dt.default({},this.config.globalConfig,e):this.config.globalConfig=e,this.clearCache()}changeContentTypeConfig(e,n,o=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),o?this.config.contentTypeConfig[e]=Dt.default({},this.config.contentTypeConfig[e],n):this.config.contentTypeConfig[e]=n,this.clearCache()}getVisibleByPanoIndex(e,n){var r;const o=this.getCaches({panoIndex:n,id:e.id}),s=(r=this.five.panoIndex)!=null?r:n;if(o.visible!==void 0)return o.visible;{const a=(()=>{var u,f,d,p,m;const l=(u=this.getTagConfig(e).visibleConfig)!=null?u:{},c=this.getDistance(e);if(typeof l=="function")return l(this.five,{tag:e,distance:c});if(l.keep==="hidden")return!1;if(l.keep==="visible")return!0;if(l.visiblePanoIndex!==void 0&&(s===void 0||!l.visiblePanoIndex.includes(s))||l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&Tn(c,l.visibleDistance)===!1)return!1;if(((f=l.intersectRaycaster)==null?void 0:f.enabled)!==!1){if(s===void 0)return!1;const g=(d=this.five.work.observers[s])==null?void 0:d.position;if(g===void 0)throw new Error(`getVisible(): observerPosition is ${g}`);const A=Mn(e.position).sub(g).normalize();this.raycaster.set(g,A);const[v]=this.five.model.intersectRaycaster(this.raycaster),C=(m=(p=l.intersectRaycaster)==null?void 0:p.distanceAccuracy)!=null?m:.01;if(v&&v.distance+C<c)return!1}return!(l.angleRange&&e.dimensionType===Xe.Three&&Tn(this.getAngle(e),l.angleRange)===!1)})();return o.visible=a,o.visible}}getUnfoldedByPanoIndex(e,n){if(!this.getVisibleByPanoIndex(e))return;const s=this.getCaches({panoIndex:n,id:e.id});if(s.unfolded!==void 0)return s.unfolded;{const r=this.getTagConfig(e).unfoldedConfig;if(!r)return;const a=(()=>{const c=this.getDistance(e);if(typeof r=="function")return r(this.five,{tag:e,distance:c});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.disableUnfold===!0)return!1;if(r.disableFold===!0)return!0;if(r.unfoldDistance&&Tn(c,r.unfoldDistance)===!1)return!1})();s.unfolded=a;const l=this.getUnfoldedByCamera(e);return l!==void 0?l:s.unfolded}}getUnfoldedByCamera(e){return this.getVisibleByPanoIndex(e)?(()=>{var a;const s=this.getDistance(e),r=this.getTagConfig(e).unfoldedConfig;if(!!r){if(typeof r=="function")return r(this.five,{tag:e,distance:s});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.disableUnfold===!0)return!1;if(r.disableFold===!0)return!0;if(r.autoUnfold===void 0)return;if(r.autoUnfold.strategy==="ScreenPostion"){const l=this.getTagProject(e);if(l&&Tn(l.x,r.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(r.autoUnfold.strategy==="MinimumDistance"){const u=this.filterPointTag().filter(d=>this.getVisibleByPanoIndex(d)).filter(d=>{const p=this.getTagProject(d);if(!p)return!1;const{x:m,y:g,z:A}=p;return!(Math.abs(A)>1||Math.abs(m)>1||Math.abs(g)>1)}).filter(d=>{var m;const p=this.getTagConfig(d).unfoldedConfig;return typeof p=="object"&&((m=p.autoUnfold)==null?void 0:m.strategy)==="MinimumDistance"}).map(d=>({id:d.id,distance:this.getDistance(d)})).filter(d=>d.distance!==void 0).sort((d,p)=>d.distance-p.distance).findIndex(d=>d.id===e.id);if(u===-1||u<=((a=r.autoUnfold.maxNumber)!=null?a:1)-1===!1)return!1}return!0}})():void 0}getDistance(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCaches({panoIndex:n,id:e.id});if(s.distance!==void 0)return s.distance;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getDistance(): observerPosition is ${c}`);const u=(()=>e.pointType===Ge.PointTag?st(e==null?void 0:e.position):Mn(e.position))(),f=c.distanceTo(u);return s.distance=f,f}}getAngle(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCaches({panoIndex:n,id:e.id});if(s.angle!==void 0)return s.angle;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getAngleRange(): observerPosition is ${c}`);const u=(()=>e.pointType===Ge.PointTag?fn(e.normal):Na(e.position))();if(!u)return;const f=new E.Vector3().copy(c).sub(Mn(e.position)),d=u.angleTo(f)*180/Math.PI;return s.angle=d,s.angle}}getTagConfig(e){var s;if(!e)return(s=this.config.globalConfig)!=null?s:{};const n={};return this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(r=>{const a=r;if(n[a])return;const l=a.split("-"),[c="Any",u="Any",f="Any"]=l||[];(e.dimensionType===c||c==="Any")&&(e.contentType===u||u==="Any")&&(e.pointType===f||f==="Any")&&(n[a]=this.config.contentTypeConfig[a])}),Dt.default({},this.config.globalConfig,...Object.values(n),e.config)}canBe(e,n){const o=this.getTagConfig(n);if(!o||typeof o!="object")return!0;if(e==="show"||e==="hide"){if(!o.visibleConfig||typeof o.visibleConfig!="object")return!0;if(e==="show"&&o.visibleConfig.keep==="hidden"||e==="hide"&&(o.visibleConfig.keep==="visible"||o.visibleConfig.alwaysShowWhenMovePano))return!1}if(e==="fold"||e==="unfold"){if(!o.unfoldedConfig||typeof o.unfoldedConfig!="object")return!0;if(e==="fold"&&(o.unfoldedConfig.disableFold||o.unfoldedConfig.keep==="unfolded")||e==="unfold"&&(o.unfoldedConfig.disableUnfold||o.unfoldedConfig.keep==="folded"))return!1}return!0}setPointTagPosition(){const e=this.filterPointTag();e.length!==0&&e.forEach(n=>{var s;if(!((s=n.state)!=null&&s.visible)){n.pointTagStyle=void 0;return}const o=this.getTagProject(n);if(!o){n.pointTagStyle=void 0;return}n.pointTagStyle={leftPercent:(o.x+1)/2*100,topPercent:(-o.y+1)/2*100}})}setVisibleByPanoIndex(){this.tags.forEach(e=>{const n=this.getVisibleByPanoIndex(e);e.state&&(e.state.visible=n)})}setUnfoldedByPanoIndex(){this.tags.forEach(e=>{const n=this.getUnfoldedByPanoIndex(e);if(!!e.state&&(n!==void 0&&(e.state.unfolded=n),n&&!e.state.visible)){const o=this.getTagConfig(e);typeof o.unfoldedConfig=="object"&&o.unfoldedConfig.autoUnfoldWhenHide!==!1&&(e.state.unfolded=!1)}})}getTagProject(e){if(!this.getVisibleByPanoIndex(e))return;const o=Mn(e.position),{x:s,y:r,z:a}=o.project(this.five.camera);if(!(a>1))return{x:s,y:r,z:a}}filterPointTag(){return this.tags.filter(e=>e.pointType===Ge.PointTag)}filterTag2D(){return this.tags.filter(e=>e.dimensionType===Xe.Two)}filter3DPointTag(){return this.tags.filter(e=>e.dimensionType===Xe.Three&&e.pointType===Ge.PointTag)}filter3DTag(){return this.tags.filter(e=>e.dimensionType===Xe.Three)}filterPlaneTag(){return this.tags.filter(e=>e.dimensionType===Xe.Three&&e.pointType===Ge.PlaneTag)}}const _a="1.2.6",Xi=`DnalogelPlugin-PanoTagPlugin@${_a}`,qg=!1,Kg=i=>`${Xi}--${i}`;class qa extends _g{constructor(e,n){super(e);h(this,"version",_a);h(this,"state",{enabled:!0,visible:!0});h(this,"params");h(this,"debug");h(this,"css3DRenderPlugin");h(this,"TagContainerSvelte");h(this,"temporaryState",{visible:!0});h(this,"mediaStore",$i({currentMediaUrl:""}));h(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});h(this,"staticUrl");h(this,"disposedErrorLog",()=>{console.error(`${Xi} is disposed`)});this.params=N({debug:!1,mergePluginDefaultConfigToLoadDataConfig:!1,config:this.config,staticConfig:{host:"vrlab-static.ljcdn.com"}},n),this.debug=this.params.debug,this.config=this.params.config,this.staticUrl=(()=>{var s;const o=this.params.staticConfig;if(typeof o=="string")return o;{const r=o.protocol?o.protocol+":":"",a=(s=o.host)!=null?s:"vrlab-static.ljcdn.com",l=o.port?":"+o.port:"";return`${r}//${a}${l}`}})(),Object.assign(window,{__PANOTAGPLUGIN_DEBUG__:this})}load(e,n){var o,s;this.clearTags(),console.log(Xi,"load:",{data:e}),this.params.mergePluginDefaultConfigToLoadDataConfig?this.config=Dt.default({},this.config,{globalConfig:(o=e.globalConfig)!=null?o:{},contentTypeConfig:(s=e.contentTypeConfig)!=null?s:{}}):(e.globalConfig&&(this.config.globalConfig=e.globalConfig),e.contentTypeConfig&&(this.config.contentTypeConfig=e.contentTypeConfig)),this.addTag(e.tagList,n),this.debug&&zm(this.five,this.tags)}addTag(e,n){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r);return fe(N({},r),{state:N({visible:void 0,unfolded:qg},a.initialState),hooks:new be.Subscribe,clickable:a.clickable})}).filter(r=>r.position);this.tags.push(...s),Mm(this.five,()=>{var r,a,l;this.store.eventListenerDisposer&&((a=(r=this.store).eventListenerDisposer)==null||a.call(r)),this.state.enabled&&(this.store.eventListenerDisposer=this.addEventListener()),this.addResizeListener(),this.checkPanelTag(),this.setVisibleAndUnfolded({withAnimation:(l=n==null?void 0:n.withAnimation)!=null?l:!0}).then(()=>this.updateRenderAllTags()),this.updateRenderAllTags()})}clearTags(){this.tags=[],this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}show(e){return J(this,null,function*(){const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({visible:!0},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("show",{userAction:n,withAnimation:o})})}hide(e){return J(this,null,function*(){const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({visible:!1},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("hide",{userAction:n,withAnimation:o})})}enable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!0},{userAction:n}),this.hooks.emit("enable",{userAction:n})}disable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!1},{userAction:n}),this.hooks.emit("disable",{userAction:n})}dispose(){var e,n,o,s,r,a;this.disposeAllCSS3DContainer(),(e=this.TagContainerSvelte)==null||e.$destroy(),this.filter3DTag().forEach(l=>{var c;return(c=l.tag3DContentSvelte)==null?void 0:c.svelteApp.$destroy()}),this.tags=[],(n=this.store.disposers)==null||n.forEach(l=>l==null?void 0:l()),this.store.disposers=[],this.store.disposed=!0,(s=(o=this.store).eventListenerDisposer)==null||s.call(o),this.store.eventListenerDisposer=void 0,(a=(r=this.store).resizeObserverDisposer)==null||a.call(r),this.store.resizeObserverDisposer=void 0,this.store.resizeObserverDisposerAdding=!1,this.clearCache(),this.hooks.emit("dispose")}setState(e,n){if(this.store.disposed)return this.disposedErrorLog();const{userAction:o=!0,visibleWithAnimation:s=!1}=n,r=N({},this.state);this.state=Object.assign(this.state,e),this.store.visibleWithAnimation=s,r.visible!==this.state.visible&&(e.visible?this.handleShow():this.handleHide()),r.enabled!==this.state.enabled&&(e.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:r,userAction:o})}changeTagNormalById(e,n){const o=this.getTagById(e);!o||!o.tag3DContentSvelte||(o.tag3DContentSvelte.currentNormal=st(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=Dt.default({},s.data,n):Object.assign(s.data,n),this.checkPanelTag(),this.updateRenderAllTags())}changeTagById(e,n,o=!0){const s=this.getTagById(e);!n||(o?Dt.default(s,n):Object.assign(s,n),(s==null?void 0:s.tag3DContentSvelte)&&(n==null?void 0:n.normal)&&(s.tag3DContentSvelte.currentNormal=st(n.normal)),this.updateRenderAllTags(),this.checkPanelTag())}destroyTagById(e){(Array.isArray(e)?e:[e]).forEach(o=>{const s=this.tags.findIndex(r=>r.id===o);s!==-1&&this.tags.splice(s,1)}),this.updateRenderAllTags()}pauseCurrentMedia(){this.mediaStore.set({currentMediaUrl:""})}setVisibleAndUnfolded(){return J(this,arguments,function*({withAnimation:e}={withAnimation:!1}){return this.setVisibleByPanoIndex(),e?new Promise((n,o)=>{setTimeout(()=>{this.setUnfoldedByPanoIndex(),n()},10)}):(this.setUnfoldedByPanoIndex(),Promise.resolve())})}handleShow(){this.state.visible=!0,this.updateTagContainerVisible()}handleHide(){this.state.visible=!1,this.updateTagContainerVisible()}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.updateRenderAllTags()}handleDisable(){var e,n,o;this.state.enabled=!1,(n=(e=this.store).eventListenerDisposer)==null||n.call(e),(o=this.TagContainerSvelte)==null||o.$set({tags:[]}),this.filter3DTag().forEach(s=>{var r;(r=s.tag3DContentSvelte)==null||r.svelteApp.$destroy(),s.tag3DContentSvelte=void 0})}addEventListener(){const{five:e,hooks:n}=this,o=this.handleFiveWantsMoveToPano.bind(this),s=this.handleFiveModeChange.bind(this),r=this.handleFiveCameraUpdate.bind(this),a=this.handleFiveCameraUpdateDebounce(),l=this.handleFivePanoArrived.bind(this),c=this.clickhandler.bind(this);return e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),n.on("click",c),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),n.off("click",c),this.store.eventListenerDisposer=void 0}}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(!this.store.disposed)return;const e=this.five.getElement(),n=()=>{!this.state.enabled||(this.show(),this.updateRenderAllTags())},o=()=>{!this.state.enabled||this.hide()},{observe:s,unobserve:r}=Rs(Bm(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=Rs(Qs(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){e==="Panorama"?this.five.once("panoArrived",()=>this.temporaryShow()):this.temporaryHide()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&n.visibleConfig.keep?e.temporaryState=fe(N({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):typeof n.visibleConfig=="object"&&n.visibleConfig.alwaysShowWhenMovePano?e.temporaryState=fe(N({},e.temporaryState),{visible:!0}):e.temporaryState=fe(N({},e.temporaryState),{visible:!1})}),this.updateRenderAllTags()}temporaryShow(){this.temporaryState.visible=!0}temporaryHide(){this.temporaryState.visible=!1}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.canBe("fold",e.tag),o=this.canBe("unfold",e.tag);n&&o&&(e.tag.state.unfolded=!e.tag.state.unfolded,e.tag.state.unfolded&&this.tags.forEach(s=>{s.id!==e.tag.id&&s.state&&this.canBe("fold",s)&&(s.state.unfolded=!1)}),this.updateRenderAllTags())}updateRenderAllTags(){this.updateRenderPointTag(),this.updateRenderPlaneTag()}updateTagContainerVisible(){var e;(e=this.TagContainerSvelte)==null||e.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation}),this.filter3DTag().forEach(n=>{var o;(o=n.tag3DContentSvelte)==null||o.svelteApp.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation})})}handleFiveCameraUpdateDebounce(){return Qs(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return J(this,null,function*(){yield this.setVisibleAndUnfolded(),this.tags.forEach(e=>{e.temporaryState=fe(N({},e.temporaryState),{visible:!0})}),this.updateRenderAllTags()})}setUnfoldedByCamera(){let e=!1;this.tags.forEach(n=>{const o=this.getUnfoldedByCamera(n);!n.state||o!==void 0&&(o===!0&&(e=!0),n.state.unfolded=o)}),e&&this.tags.forEach(n=>{const o=this.getTagConfig(n).unfoldedConfig;typeof o=="object"&&(o.autoUnfold||o.disableFold||o.keep)||n.state&&(n.state.unfolded=!1)})}updateRenderPointTag(){var n;const e=this.filterPointTag();if(this.setPointTagPosition(),this.TagContainerSvelte)this.TagContainerSvelte.$set({tags:e,state:this.state,temporaryState:this.temporaryState});else{const o=(n=this.five.getElement())==null?void 0:n.parentElement;if(!o)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new Vg({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore}})}}updateRenderPlaneTag(){[...this.filterPlaneTag(),...this.filter3DPointTag()].forEach(n=>{var o;if(n.tag3DContentSvelte){const{svelteApp:s,domContainer:r,initialNormal:a,currentNormal:l}=n.tag3DContentSvelte;if(s.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!a.equals(l)){const c=new F.Quaternion().setFromUnitVectors(a,l);r.css3DObject.setRotationFromQuaternion(c)}}else{if(((o=n.state)==null?void 0:o.visible)===!1)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=Kt(this.five)),n.pointType===Ge.PointTag&&!n.normal)return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");const s=n.pointType===Ge.PlaneTag?n.position:Tm(this.five.camera.position,st(n.position),st(n.normal)),r=n.pointType===Ge.PlaneTag?Na(n.position):st(n.normal),a=this.getTagConfig(n).tag3DConfig,l=this.css3DRenderPlugin.create3DDomContainer(s,a);if(!l)return;this.store.css3DRenderDisposer.set(n.id,l.dispose),n.tag3DContentSvelte={svelteApp:new Za({target:l.container,props:{tag:n,hooks:this.hooks,state:this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}}),domContainer:l,initialNormal:r,currentNormal:r}}}),this.checkPanelTag()}disposeAllCSS3DContainer(){for(const[e,n]of this.store.css3DRenderDisposer)n==null||n();this.store.css3DRenderDisposer=new Map}checkPanelTag(){this.tags.forEach(e=>{var n;e.dimensionType===Xe.Two&&e.pointType===Ge.PointTag&&((n=e.tag3DContentSvelte)==null||n.domContainer.dispose(),e.tag3DContentSvelte=void 0)});for(const[e,n]of this.store.css3DRenderDisposer){const o=this.getTagById(e);(!o||o.dimensionType!==Xe.Three)&&(n==null||n(),this.store.css3DRenderDisposer.delete(e))}}}const $g=(i,t)=>new qa(i,t);class co extends F.Object3D{constructor(e,n){var o;super();h(this,"originObject3D");h(this,"onRender");this.originObject3D=e,this.onRender=(o=n==null?void 0:n.onRender)!=null?o:()=>{}}get helperObject(){return this}render(){this.onRender()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}updatePosition(){this.position.copy(this.originObject3D.position)}updateQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,n){this.scale.applyMatrix4(e)}applyHelperQuaternion(e,n){this.applyQuaternion(e)}}class e0 extends co{}class t0 extends co{}class n0 extends co{}class i0 extends n0{}class o0 extends E.Group{constructor(e){super();h(this,"direction");this.direction=e||"x"}}class Rr extends E.Mesh{constructor(e,n,o){super(e,n);h(this,"direction");this.direction=o||"x"}}function s0(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new E.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function uo(i,t,e){if(!t||!e||!i)return;const n=s0(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new E.Raycaster;return o.setFromCamera(n,i),o}function r0(i,t){return!(Math.abs(i.x-t.x)>1e-5||Math.abs(i.y-t.y)>1e-5||Math.abs(i.z-t.z)>1e-5)}class Ii extends o0{constructor(e){var u;super(e.direction);h(this,"line");h(this,"arrow");h(this,"lineHeight",.4);h(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new E.Color((u=e.color)!=null?u:16214315),o=new E.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:E.DoubleSide}),s=new E.ConeGeometry(.04,.1,32),r=new Rr(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new E.CylinderGeometry(a,a,.4,32),c=new Rr(l,o.clone(),e.direction);c.name=`line-${e.direction}`,this.line=c,this.formatArrow(),this.formatLine(),this.add(this.arrow,this.line)}formatArrow(){this.arrow.geometry.translate(0,this.lineHeight+this.arrowHeight/2,0),this.direction==="x"?(this.arrow.geometry.rotateX(Math.PI/2),this.arrow.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.arrow.geometry.rotateX(Math.PI/2)}formatLine(){this.line.geometry.translate(0,this.lineHeight/2,0),this.direction==="x"?(this.line.geometry.rotateX(Math.PI/2),this.line.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.line.geometry.rotateX(Math.PI/2)}}const xi={X:15618642,Y:4765519,Z:4227839};class ot{static get X(){return new E.Color(xi.X).convertSRGBToLinear().clone()}static get Y(){return new E.Color(xi.Y).convertSRGBToLinear().clone()}static get Z(){return new E.Color(xi.Z).convertSRGBToLinear().clone()}}class a0 extends e0{constructor(e){super(e);h(this,"xArrow",new Ii({direction:"x",color:ot.X}));h(this,"yArrow",new Ii({direction:"y",color:ot.Y}));h(this,"zArrow",new Ii({direction:"z",color:ot.Z}));this.add(this.xArrow),this.add(this.yArrow),this.add(this.zArrow)}show(){super.show(),this.xArrow.visible=!0,this.yArrow.visible=!0,this.zArrow.visible=!0}showDraggingHelper(e){this.xArrow.visible=e.includes("x"),this.yArrow.visible=e.includes("y"),this.zArrow.visible=e.includes("z")}dispose(){this.remove(this.xArrow,this.yArrow,this.zArrow)}}function zt(i,t){return l0(document.createElement(t!=null?t:"div"),i)}function l0(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function c0(i){const t=zt(N({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"9999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},i)),e=()=>{t.style.display!=="block"&&(!t.style.top||!t.style.left||(t.style.display="block"))};return{element:t,show:e,hide:()=>{t.style.display="none",t.style.top="",t.style.left=""},setLeftTop:(s,r)=>{t.style.left=s,t.style.top=r,e()}}}class u0 extends t0{constructor(e,n){var o;super(e);h(this,"yzCircle",new ki({direction:"x",color:ot.X}));h(this,"xzCircle",new ki({direction:"y",color:ot.Y}));h(this,"xyCircle",new ki({direction:"z",color:ot.Z}));h(this,"xRingHelper",new Di({direction:"x"}));h(this,"yRingHelper",new Di({direction:"y"}));h(this,"zRingHelper",new Di({direction:"z"}));h(this,"xAngleHelper",new Li({direction:"x",color:ot.X}));h(this,"yAngleHelper",new Li({direction:"y",color:ot.Y}));h(this,"zAngleHelper",new Li({direction:"z",color:ot.Z}));h(this,"angleTips");h(this,"container");n&&(this.container=n==null?void 0:n.container,this.angleTips=c0({display:"none"}),(o=this.container)==null||o.appendChild(this.angleTips.element)),this.show()}updateAngleHelperQuaternion(){this.xAngleHelper.quaternion.copy(this.yzCircle.quaternion),this.yAngleHelper.quaternion.copy(this.xzCircle.quaternion),this.zAngleHelper.quaternion.copy(this.xyCircle.quaternion),this.xRingHelper.quaternion.copy(this.yzCircle.quaternion),this.yRingHelper.quaternion.copy(this.xzCircle.quaternion),this.zRingHelper.quaternion.copy(this.xyCircle.quaternion)}applyHelperQuaternion(e,n){this.yzCircle.applyQuaternion(e),this.xzCircle.applyQuaternion(e),this.xyCircle.applyQuaternion(e),this.xAngleHelper.baseAxes.applyQuaternion(e),this.yAngleHelper.baseAxes.applyQuaternion(e),this.zAngleHelper.baseAxes.applyQuaternion(e)}hide(){this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper)}show(){var e;this.add(this.xyCircle,this.xzCircle,this.yzCircle),this.remove(this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)==null||e.hide()}showDraggingHelper(e){var n;this.hide(),this.add(...this.filterRingHelper(e)),this.add(...this.filterAngleHelper(e)),(n=this.angleTips)==null||n.show()}dispose(){var e,n;this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)!=null&&e.element&&((n=this.container)==null||n.removeChild(this.angleTips.element))}filterRingHelper(e){return[this.xRingHelper,this.yRingHelper,this.zRingHelper].filter(n=>e.includes(n.direction))}filterAngleHelper(e){return[this.xAngleHelper,this.yAngleHelper,this.zAngleHelper].filter(n=>e.includes(n.direction))}}class ki extends E.Mesh{constructor(e){var n;super();h(this,"direction");h(this,"gapAngle",.02);h(this,"geometry",new E.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new E.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:E.DoubleSide,depthTest:!1}),this.direction=e.direction,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}class Di extends E.Group{constructor(e){super();h(this,"direction");this.direction=e.direction;const n=.015,o=new Array(8).fill(null).map((s,r)=>{const a=new E.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new E.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:E.DoubleSide}),c=new E.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...o),this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}class Li extends E.Mesh{constructor(e){var o;super();h(this,"direction");h(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new E.Vector3(0,0,1);break;case"y":this.baseAxes=new E.Vector3(1,0,0);break;case"z":this.baseAxes=new E.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new E.CircleGeometry(n,48,0,1e-4),this.material=new E.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:E.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function d0(){const i=zt({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=zt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=zt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});i.appendChild(t),t.appendChild(e);const n="-4px",o={direction:"nesw",element:dt({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:dt({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:dt({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:dt({cursor:"ew-resize",right:n})},l={direction:"nesw",element:dt({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:dt({cursor:"ns-resize",top:n})},u={direction:"nwse",element:dt({cursor:"nwse-resize",left:n,top:n})},f={direction:"ew",element:dt({cursor:"ew-resize",left:n})};return new Array(s,a,c,f,o,r,l,u).forEach(p=>t.appendChild(p.element)),{container:i,squares:[o,s,r,a,l,c,u,f]}}function dt(i){const t=zt(N({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=zt({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=zt({width:"15px",height:"15px",cursor:i==null?void 0:i.cursor,pointerEvents:"auto",background:"transparent"});return n.draggable=!0,e.appendChild(n),t.appendChild(e),t}class f0 extends i0{constructor(e,n,o,s){super(e);h(this,"points",[]);h(this,"cornerPositions",[]);h(this,"css3DInstance");h(this,"plane");h(this,"css3DRenderer",new Vt);h(this,"camera");h(this,"scene");h(this,"container");h(this,"enabled",!1);this.camera=o,this.scene=s,this.container=n,this.initRectangleScaleHelper()}get helperObject(){var e;if(!((e=this.css3DInstance)!=null&&e.css3DObject))throw new Error("css3DInstance is not initialized");return this.css3DInstance.css3DObject}updatePosition(){var e;this.helperObject.position.copy(this.originObject3D.position),(e=this.plane)==null||e.position.copy(this.originObject3D.position)}updateQuaternion(){var e;(e=this.plane)==null||e.quaternion.copy(this.originObject3D.quaternion)}applyMatrix4(e){var n;super.applyMatrix4(e),this.helperObject.applyMatrix4(e),(n=this.plane)==null||n.applyMatrix4(e),this.cornerPositions.forEach(o=>o.applyMatrix4(e))}showDraggingHelper(){}applyHelperScaleMatrix4(e,n){var o;(o=this.plane)==null||o.scale.applyMatrix4(e),this.helperObject.applyScaleMatrix4(e)}updatePoints(){const e=this.calculatePointPosition(this.cornerPositions);this.points.forEach((n,o)=>{n.position.copy(e[o])})}applyHelperQuaternion(e,n){var s;const o=(s=this.css3DInstance)==null?void 0:s.css3DObject;if(o){const r=new E.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new E.Vector3().subVectors(this.plane.position,n).applyQuaternion(e).add(n);this.plane.position.copy(r),this.plane.applyQuaternion(e)}this.cornerPositions.forEach(r=>{const a=new E.Vector3().subVectors(r,n).applyQuaternion(e).add(n);r.copy(a)})}enable(){var e;this.enabled||(this.enabled=!0,(e=this.css3DInstance)==null||e.enable(),this.plane&&this.scene.add(this.plane))}disable(){var e;!this.enabled||(this.enabled=!1,(e=this.css3DInstance)==null||e.disable(),this.plane&&this.scene.remove(this.plane))}show(){var e;(e=this.css3DInstance)==null||e.show(),this.plane&&(this.plane.visible=!0)}hide(){var e;(e=this.css3DInstance)==null||e.hide(),this.plane&&(this.plane.visible=!1)}dispose(){this.disable(),this.css3DRenderer.dispose()}initRectangleScaleHelper(){var u;const e=this.getCornerPositions();if(!e)return;this.cornerPositions=e;const n=this.css3DRenderer.create3DElement(this.camera,e,{ratio:.003});if(!n)return;this.css3DInstance=n,n.appendToElement(this.container);const o=n.css3DObject.container,{container:s,squares:r}=d0();this.points=r.map((f,d)=>({direction:f.direction,point:f.element,position:this.calculatePointPosition(e)[d]})),o.insertBefore(s,(u=o.children[0])!=null?u:null);const a=new E.PlaneGeometry(n.css3DObject.width,n.css3DObject.height),l=new E.MeshBasicMaterial({color:0,opacity:.15,transparent:!0,side:E.DoubleSide}),c=new E.Mesh(a,l);this.scene.add(c),this.updatePosition()}getCornerPositions(){const{originObject3D:e}=this;if(e instanceof un.CSS3DObject){if(e.isCSS3DObjectPlus)return e.cornerPoints;console.error("\u6682\u65F6\u53EA\u652F\u6301 CSS3DRenderPlugin \u751F\u6210\u7684\u7269\u4F53")}else console.error("\u5F53\u524D\u7269\u4F53\u6682\u65F6\u4E0D\u652F\u6301 ScaleHelper")}calculatePointPosition(e){return[e[0].clone(),e[0].clone().add(e[1]).divideScalar(2),e[1].clone(),e[1].clone().add(e[2]).divideScalar(2),e[2].clone(),e[2].clone().add(e[3]).divideScalar(2),e[3].clone(),e[3].clone().add(e[0]).divideScalar(2)]}}new E.Vector3;function pe(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new E.Raycaster,this._selected=null,this._boundObjs={};var e=this;this._$onClick=function(){e._onClick.apply(e,arguments)},this._$onDblClick=function(){e._onDblClick.apply(e,arguments)},this._$onMouseMove=function(){e._onMouseMove.apply(e,arguments)},this._$onMouseDown=function(){e._onMouseDown.apply(e,arguments)},this._$onMouseUp=function(){e._onMouseUp.apply(e,arguments)},this._$onTouchMove=function(){e._onTouchMove.apply(e,arguments)},this._$onTouchStart=function(){e._onTouchStart.apply(e,arguments)},this._$onTouchEnd=function(){e._onTouchEnd.apply(e,arguments)},this._$onContextmenu=function(){e._onContextmenu.apply(e,arguments)},this._domElement.addEventListener("click",this._$onClick,!1),this._domElement.addEventListener("dblclick",this._$onDblClick,!1),this._domElement.addEventListener("mousemove",this._$onMouseMove,!1),this._domElement.addEventListener("mousedown",this._$onMouseDown,!1),this._domElement.addEventListener("mouseup",this._$onMouseUp,!1),this._domElement.addEventListener("touchmove",this._$onTouchMove,!1),this._domElement.addEventListener("touchstart",this._$onTouchStart,!1),this._domElement.addEventListener("touchend",this._$onTouchEnd,!1),this._domElement.addEventListener("contextmenu",this._$onContextmenu,!1)}pe.prototype.destroy=function(){this._domElement.removeEventListener("click",this._$onClick,!1),this._domElement.removeEventListener("dblclick",this._$onDblClick,!1),this._domElement.removeEventListener("mousemove",this._$onMouseMove,!1),this._domElement.removeEventListener("mousedown",this._$onMouseDown,!1),this._domElement.removeEventListener("mouseup",this._$onMouseUp,!1),this._domElement.removeEventListener("touchmove",this._$onTouchMove,!1),this._domElement.removeEventListener("touchstart",this._$onTouchStart,!1),this._domElement.removeEventListener("touchend",this._$onTouchEnd,!1),this._domElement.removeEventListener("contextmenu",this._$onContextmenu,!1)};pe.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"];pe.prototype._getRelativeMouseXY=function(i){var t=i.target||i.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},n=t,o=getComputedStyle(n,null);e.y+=parseInt(o.getPropertyValue("padding-top"),10),e.x+=parseInt(o.getPropertyValue("padding-left"),10);do e.x+=n.offsetLeft,e.y+=n.offsetTop,o=getComputedStyle(n,null),e.x+=parseInt(o.getPropertyValue("border-left-width"),10),e.y+=parseInt(o.getPropertyValue("border-top-width"),10);while(n=n.offsetParent);var s={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((i.pageX-e.x)/s.width)*2-1,y:-((i.pageY-e.y)/s.height)*2+1}};pe.prototype._objectCtxInit=function(i){i._3xDomEvent={}};pe.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent};pe.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent};pe.prototype._objectCtxGet=function(i){return i._3xDomEvent};pe.prototype.camera=function(i){return i&&(this._camera=i),this._camera};pe.prototype.bind=function(i,t,e,n){console.assert(pe.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]),o[t+"Handlers"].push({callback:e,useCapture:n}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(i)};pe.prototype.addEventListener=pe.prototype.bind;pe.prototype.unbind=function(i,t,e,n){console.assert(pe.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]);for(var s=o[t+"Handlers"],r=0;r<s.length;r++){var a=s[r];if(e==a.callback&&n==a.useCapture){s.splice(r,1);break}}var l=this._boundObjs[t].indexOf(i);console.assert(l!==-1),this._boundObjs[t].splice(l,1)};pe.prototype.removeEventListener=pe.prototype.unbind;pe.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1};pe.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new E.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o),a=this._selected;if(r.length>0){var l,c,u,f=r[0],d=f.object;this._selected=d,u=this._bound("mousemove",d),a!=d&&(l=this._bound("mouseover",d),c=a&&this._bound("mouseout",a))}else c=a&&this._bound("mouseout",a),this._selected=null;u&&this._notify("mousemove",d,n,f),l&&this._notify("mouseover",d,n,f),c&&this._notify("mouseout",a,n,f)}};pe.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new E.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o,!0);if(r.length!==0){for(var a=r[0],l=a.object,c=this._objectCtxGet(l),u=l.parent;typeof c=="undefined"&&u;)c=this._objectCtxGet(u),u=u.parent;!c||this._notify(i,l,n,a)}}};pe.prototype._notify=function(i,t,e,n){var o=this._objectCtxGet(t),s=o?o[i+"Handlers"]:null;if(console.assert(arguments.length===4),!o||!s||s.length===0){t.parent&&this._notify(i,t.parent,e,n);return}for(var s=o[i+"Handlers"],r=0;r<s.length;r++){var a=s[r],l=!0;a.callback({type:i,target:t,origDomEvent:e,intersect:n,stopPropagation:function(){l=!1}}),!!l&&a.useCapture===!1&&t.parent&&this._notify(i,t.parent,e,n)}};pe.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)};pe.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)};pe.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)};pe.prototype._onMouseMove=function(i){var t=this._getRelativeMouseXY(i);this._onMove("mousemove",t.x,t.y,i),this._onMove("mouseover",t.x,t.y,i),this._onMove("mouseout",t.x,t.y,i)};pe.prototype._onClick=function(i){this._onMouseEvent("click",i)};pe.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)};pe.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)};pe.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)};pe.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)};pe.prototype._onTouchMove=function(i){if(i.touches.length==1){i.preventDefault();var t=Number(i.touches[0].pageX/window.innerWidth)*2-1,e=-(i.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,i),this._onMove("mouseover",t,e,i),this._onMove("mouseout",t,e,i)}};pe.prototype._onTouchEvent=function(i,t){if(t.touches.length==1){t.preventDefault();var e=Number(t.touches[0].pageX/window.innerWidth)*2-1,n=-(t.touches[0].pageY/window.innerHeight)*2+1;this._onEvent(i,e,n,t)}};let Et=null;class fo{constructor(t,e,n,o,s,r,a){h(this,"hooks",new qt);h(this,"helperObject3D");h(this,"originObject3D");h(this,"camera");h(this,"model");h(this,"scene");h(this,"container");h(this,"domEvents");h(this,"isDragging",!1);h(this,"onRender");h(this,"enabled",!1);h(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});this.camera=t,this.model=e,this.originObject3D=n,this.helperObject3D=o,this.container=s,this.scene=r,this.domEvents=new pe(t,s),this.onRender=a!=null?a:()=>{},this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable()}initialHelperPosition(){this.helperObject3D.updatePosition()}initialHelperQuaternion(){this.helperObject3D.updateQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.render())}disable(){!this.enabled||(this.enabled=!1,this.scene.remove(this.helperObject3D),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){this.helperObject3D.dispose(),this.scene.remove(this.helperObject3D),this.render()}setOpacity(t){this.setOriginOpacityProperty();const e=this.originObject3D;if(e instanceof E.Mesh&&(e.material.opacity=t),e.isCSS3DObjectPlus){const n=e;n.container.style.opacity=t.toString()}this.render()}restoreOpacity(){if(Et===null)return;const t=this.originObject3D;if(t instanceof E.Mesh&&(t.material.opacity=Et.opacity),t.isCSS3DObjectPlus){const e=t;e.container.style.opacity=Et.opacity.toString()}this.render()}setOriginOpacityProperty(){var t,e;if(Et===null){const n=this.originObject3D;n instanceof E.Mesh&&(Et={opacity:n.material.opacity}),n instanceof Yr&&(Et={opacity:(t=n.container.style.opacity)!=null?t:1}),n.isCSS3DObjectPlus&&(Et={opacity:Number((e=n.container.style.opacity)!=null?e:1)})}}updateHelperPosition(){this.helperObject3D.updatePosition()}updateHelperQuaternion(){this.helperObject3D.updateQuaternion()}applyHelperMatrix4(t){this.helperObject3D.applyMatrix4(t)}applyHelperQuaternion(t,e){this.helperObject3D.applyHelperQuaternion(t,e)}applyHelperScaleMatrix4(t,e){this.helperObject3D.applyHelperScaleMatrix4(t,e)}onWantsGesture(t,e,n){if(this.isDragging)return!1}render(){this.onRender()}hoverListener(t,e=16777215,n=1){const o=(Array.isArray(t)?t:[t]).filter(Bt),s=[];for(const r of o)if(r instanceof E.Mesh||r instanceof E.Group){const a=r instanceof E.Group?r.children.filter(d=>d instanceof E.Mesh):[r];a.forEach(d=>{d.__originalColor__=d.material.color.clone(),d.__originalOpacity__=d.material.opacity});const l=()=>{a.forEach(d=>{d.material.color.set(e),d.material.opacity=n}),this.render()},c=()=>{a.forEach(d=>{d.material.color.copy(d.__originalColor__),d.material.opacity=d.__originalOpacity__}),this.render()},u=()=>{this.isDragging||l()},f=()=>{this.isDragging||c()};for(const d of a)this.domEvents.addEventListener(d,"mouseover",u),this.domEvents.addEventListener(d,"mouseout",f),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),s.push(()=>{this.domEvents.removeEventListener(d,"mouseover",u),this.domEvents.removeEventListener(d,"mouseout",f),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c)})}return()=>s.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,n=this.helperObject3D;if(!n)return;let o;const s=t.intersectObject(n,!0)[0];if(!!s&&(o=s,o.object=n,!!o)){if(this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<o.point.distanceTo(e))return}return o.object}}}class h0 extends fo{constructor(...e){super(...e);h(this,"startInfo");const n=this.helperObject3D;this.hoverListener([n.xArrow,n.yArrow,n.zArrow]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();const s=new E.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new E.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new E.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(o){case"x":return s;case"y":return r;case"z":return a}})(),c=(()=>{switch(o){case"x":case"y":return a;case"z":return s}})(),u=n.point.clone(),f=new E.Plane;f.setFromNormalAndCoplanarPoint(c,u),this.startInfo={startVectorProject:u.clone().projectOnVector(l),directionVector:l,plane:f},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("moveStart"),this.isDragging=!0,console.log("%c MoveController dragStart","color: #e5af2e")}dragging(e){if(!this.isDragging||!this.startInfo)return;const n=uo(this.camera,e,this.container);return n?(console.log("%c RotateController dragging","color: #49de1b"),this.move(n),!1):this.dragEnd()}move(e){if(!this.startInfo)return this.dragEnd();const{plane:n,directionVector:o,startVectorProject:s}=this.startInfo,r=this.originObject3D,a=e.ray.intersectPlane(n,new E.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),u=new E.Matrix4;u.setPosition(c),r.applyMatrix4(u),this.helperObject3D.applyMatrix4(u),s.copy(l),this.hooks.emit("positionUpdate",{matrix4:u})}dragEnd(){!this.isDragging||(console.log("%c MoveController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class Si{constructor(t,e,n,o){h(this,"helperController");h(this,"five");h(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});h(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});const{camera:s,model:r,scene:a}=t,l=t.getElement();if(this.five=t,!s||!r||!l||!a)return;const c=()=>{t.needsRender=!0};this.helperController=new e(s,r,n,o,l,a,c),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture)}}const m0="v1.0.1",p0="Object3DHelper",ho=`${p0}@${m0}`,g0=()=>{console.error(`${ho} is disposed`)},A0=()=>{console.warn(`${ho} is disabled`)},v0=()=>{console.error(`${ho} is disabled`)};class b0{constructor(t,e){h(this,"controllers",{});h(this,"state",{visible:!0,enabled:!0,disposed:!1});h(this,"hooks",new qt);h(this,"helpers");h(this,"eventListener",{});h(this,"handlePositionUpdate",(t,...e)=>{var s,r,a,l;const[n]=e,o=n==null?void 0:n.matrix4;o&&(t!==this.controllers.moveController&&((s=this.controllers.moveController)==null||s.applyHelperMatrix4(o)),t!==this.controllers.rotateController&&((r=this.controllers.rotateController)==null||r.applyHelperMatrix4(o)),t!==this.controllers.scaleController&&((a=this.controllers.scaleController)==null||a.applyHelperMatrix4(o)),(l=this.helpers.outlineHelper)==null||l.applyMatrix4(o))});h(this,"handleScaleUpdate",(t,...e)=>{var s,r;const[n]=e,o=n==null?void 0:n.matrix4;o&&((s=this.controllers.scaleController)==null||s.applyHelperScaleMatrix4(o,n),(r=this.helpers.outlineHelper)==null||r.scale.applyMatrix4(o))});h(this,"handleRotateUpdate",(t,...e)=>{var o,s,r,a;const[n]=e;if(n){const{quaternion:l,origin:c}=n;l&&(t!==this.controllers.moveController&&((o=this.controllers.moveController)==null||o.applyHelperQuaternion(l,c)),t!==this.controllers.rotateController&&((s=this.controllers.rotateController)==null||s.applyHelperQuaternion(l,c)),t!==this.controllers.scaleController&&((r=this.controllers.scaleController)==null||r.applyHelperQuaternion(l,c)),(a=this.helpers.outlineHelper)==null||a.applyQuaternion(l))}});t&&this.addControllers(t),this.helpers=e!=null?e:{},this.setState(this.state)}show(t){return J(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return J(this,null,function*(){this.setState({visible:!1},t)})}enable(t){this.setState({enabled:!0},t)}disable(t){this.setState({enabled:!1},t)}dispose(){this.setState({disposed:!0})}setState(t,e){if(this.state.disposed)return g0();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return v0();const n=N({},this.state);this.state=N(N({},this.state),t),t.disposed!==void 0&&t.disposed!==n.disposed&&t.disposed&&this.handleDispose(),t.visible!==void 0&&this.handleVisible(t.visible),t.enabled!==void 0&&this.handleEnable(t.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:n})}addControllers(t){this.controllers=N(N({},this.controllers),t),this.addEventListener(),this.setState(this.state)}addHelpers(t){this.helpers=N(N({},this.helpers),t)}getCurrentState(){return this.state}addEventListener(){for(const t in this.controllers){if(!t)continue;const e=t;this.eventListener[e]||(this.eventListener[e]=(()=>{const n=this.controllers[e];if(!n)return;const o=()=>this.handleStart(n),s=()=>this.handleEnd(n),r=(...c)=>this.handlePositionUpdate(n,...c),a=(...c)=>this.handleRotateUpdate(n,...c),l=(...c)=>this.handleScaleUpdate(n,...c);return n.hooks.on("moveStart",o),n.hooks.on("rotateStart",o),n.hooks.on("scaleStart",o),n.hooks.on("positionUpdate",r),n.hooks.on("rotateUpdate",a),n.hooks.on("scaleUpdate",l),n.hooks.on("moveEnd",s),n.hooks.on("rotateEnd",s),n.hooks.on("scaleEnd",s),()=>{n.hooks.off("moveStart",o),n.hooks.off("rotateStart",o),n.hooks.off("scaleStart",o),n.hooks.off("positionUpdate",r),n.hooks.off("rotateUpdate",a),n.hooks.off("scaleUpdate",l),n.hooks.off("moveEnd",s),n.hooks.off("rotateEnd",s),n.hooks.off("scaleEnd",s)}})())}}handleEnd(t){t&&this.setOtherHelpersVisible(!0,t)}handleStart(t){t&&this.setOtherHelpersVisible(!1,t)}setOtherHelpersVisible(t,e){var n,o,s,r;t?((s=this.controllers.moveController)==null||s.helperObject3D.show(),(r=this.controllers.rotateController)==null||r.helperObject3D.show()):(e!==this.controllers.moveController&&((n=this.controllers.moveController)==null||n.helperObject3D.hide()),e!==this.controllers.rotateController&&((o=this.controllers.rotateController)==null||o.helperObject3D.hide()))}handleEnable(t,e=!0){t?(this.everyControllerDo(n=>{n.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(n=>{n.disable(),n.restoreOpacity()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(n=>{n.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(n=>{n.hide(),n.restoreOpacity()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:e}))),this.state.visible=t}everyControllerDo(t){Object.values(this.controllers).forEach(e=>{e&&t(e)})}handleDispose(){var t,e;Object.values(this.controllers).forEach(n=>{n==null||n.dispose(),n==null||n.restoreOpacity()});for(const n in this.controllers){if(!n)continue;const o=n;(e=(t=this.eventListener)[o])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&A0()}}class y0 extends fo{constructor(...e){super(...e);h(this,"startInfo");h(this,"lastRotation");h(this,"rotations",[]);h(this,"helperObject3DQuaternion",this.originObject3D.quaternion.clone());const n=this.helperObject3D;this.hoverListener([n.xyCircle,n.xzCircle,n.yzCircle]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}initialHelperQuaternion(){this.helperObject3D.updateAngleHelperQuaternion(),this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();this.helperObject3D.updateAngleHelperQuaternion();const s=n.point,r=this.originObject3D.position.clone(),a=this.getAngleHelper(o);this.setTipsAngle(0);const l=s.clone();l.y+=.2,this.setTipsPosition(l);const c=new E.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),u=new E.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),f=new E.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),d=(()=>{switch(o){case"x":return c;case"y":return u;case"z":return f}})(),p=new E.Plane().setFromNormalAndCoplanarPoint(d,s),m=new E.Vector3;p.projectPoint(s.clone(),m);const g=m.clone().sub(r),A=g.clone(),v=g.angleTo(a.baseAxes);this.setAngleHelperStart(o,v),this.setAngleHelperLength(o,0),this.rotations.push({vector:g.clone(),direction:!0}),this.startInfo={direction:o,startVector:g,staticStartVector:A,plane:p,angleHelper:a},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("rotateStart"),this.isDragging=!0,console.log(`%c RotateController dragStart ${o}`,"color: #e5af2e")}dragging(e){var o;if(!this.isDragging)return;const n=uo(this.camera,e,this.container);return n?(console.log(`%c RotateController dragging ${(o=this.startInfo)==null?void 0:o.direction}`,"color: #49de1b"),this.rotate(n),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:n,plane:o,angleHelper:s,staticStartVector:r,direction:a}=this.startInfo,l=this.originObject3D,c=e.ray.intersectPlane(o,new E.Vector3);if(!c)return;const u=l.position.clone(),f=new E.Vector3;o.projectPoint(c.clone(),f);const d=f.clone().sub(u);if(n.angleTo(d)===0||(this.lastRotation===void 0&&(this.lastRotation={angle:0}),this.rotations.length===0))return;const p=(()=>{if(this.rotations.length===1)return d.angleTo(s.baseAxes)>r.angleTo(s.baseAxes);{const g=this.rotations[this.rotations.length-1],A=this.rotations[this.rotations.length-2],v=d.angleTo(A.vector),C=d.angleTo(g.vector),w=g.vector.angleTo(A.vector);if(w===0||C===0||v===0)return;if(v>C&&v>w)return g.direction;if(v<w&&C<w||v<C&&C>w)return!g.direction}})();if(p===void 0)return console.warn("rotationDirection is undefined");this.rotations.push({vector:d,direction:p}),this.rotations=this.rotations.slice(-2),this.lastRotation.angle=this.lastRotation.angle+d.angleTo(n)*(p?1:-1),this.setAngleHelperLength(a,this.lastRotation.angle),this.setTipsAngle(this.lastRotation.angle/Math.PI*180);const m=new E.Quaternion().setFromUnitVectors(n.clone().normalize(),d.clone().normalize());l.applyQuaternion(m),this.helperObject3D.applyHelperQuaternion(m),this.helperObject3DQuaternion.premultiply(m),this.hooks.emit("rotateUpdate",{quaternion:m,origin:u}),this.startInfo.startVector=d}dragEnd(){!this.isDragging||(console.log("%c RotateController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.lastRotation=void 0,this.rotations=[],this.helperObject3D.show(),this.hooks.emit("rotateEnd"))}getAngleHelper(e){switch(e){case"x":return this.helperObject3D.xAngleHelper;case"y":return this.helperObject3D.yAngleHelper;case"z":return this.helperObject3D.zAngleHelper}}setAngleHelperStart(e,n){const o=this.getAngleHelper(e);if(o instanceof E.Mesh&&o.geometry instanceof E.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new E.CircleGeometry(s,r,n,a)}else console.warn("only support THREE.CircleGeometry")}setAngleHelperLength(e,n){const s=n>=0?Math.max(n,.001):Math.min(n,-.001),r=this.getAngleHelper(e);if(r instanceof E.Mesh&&r.geometry instanceof E.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new E.CircleGeometry(a,c,l,s)}else console.warn("only support THREE.CircleGeometry")}setTipsAngle(e){var o;const n=(o=this.helperObject3D.angleTips)==null?void 0:o.element;!n||(n.innerText=`${e.toFixed(0)}\xB0`)}setTipsPosition(e){const n=this.helperObject3D.angleTips;if(!n)return;const o=e.project(this.camera),{x:s,y:r,z:a}=o;if(a>1)return;const l=(s+1)/2*100+"%",c=(-r+1)/2*100+"%";n.setLeftTop(l,c)}}class w0 extends fo{constructor(...e){super(...e);h(this,"startInfo")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}getDragPlane(){const e=new E.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new F.Vector3),n[0]):e.setFromCoplanarPoints(n[0],n[1],n[2]),e}dragStart(e,n){var s,r;(r=(s=this.helperObject3D).updatePoints)==null||r.call(s);const o=this.getDragPlane();if(!o)return this.dragEnd();this.startInfo={startPoint:{position:n.position.clone(),direction:n.direction},plane:o},this.hooks.emit("scaleStart"),this.render(),this.isDragging=!0,console.log("%c RectangleScaleController dragStart","color: #e5af2e")}dragging(e){if(!this.isDragging)return;const n=uo(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n),console.log("%c RectangleScaleController dragging","color: #49de1b")}scale(e){var j,B;if(!this.startInfo)return;const n=this.originObject3D,{startPoint:o,plane:s}=this.startInfo,r=this.helperObject3D.cornerPositions;if(r.length<4)return this.dragEnd();const a=e.ray.intersectPlane(s,new F.Vector3);if(!a||r0(a,this.camera.position))return;const l=new F.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:u}=o,f=new F.Vector3().subVectors(r[1],r[0]),d=new F.Vector3().subVectors(r[3],r[0]),p=G=>{const U=new F.Vector3(0,0,0);if(!this.startInfo)return U;const I=(G==="ew"?f:d).clone(),S=c.clone().projectOnVector(I),R=a.clone().projectOnVector(I),W=l.clone().projectOnVector(I);if(R.equals(S))return U;if(G==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const X=new F.Vector3().subVectors(R,W),V=X.x<0&&I.x>=0,ue=X.y<0&&I.y>=0,de=X.z<0&&I.z>=0;this.startInfo.dragPointInCenterBottom=V||ue||de}if(G==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const X=new F.Vector3().subVectors(R,W),V=X.x<0&&I.x>=0,ue=X.y<0&&I.y>=0,de=X.z<0&&I.z>=0;this.startInfo.dragPointInCenterLeft=V||ue||de}const Y=new F.Vector3().subVectors(R,S),ne=Y.length();return ne>.3?(console.warn("offset.length() > 0.3, skipped",ne),U):Y},m=p("ew"),g=p("ns"),A=()=>{const G=m;this.helperObject3D.cornerPositions.forEach((U,I)=>{var S;(S=this.startInfo)!=null&&S.dragPointInCenterLeft?(I===0||I===3)&&U.add(G):(I===1||I===2)&&U.add(G)})},v=()=>{const G=g;this.helperObject3D.cornerPositions.forEach((U,I)=>{var S;(S=this.startInfo)!=null&&S.dragPointInCenterBottom?(I===0||I===1)&&U.add(G):(I===2||I===3)&&U.add(G)})};switch(u){case"ew":A();break;case"ns":v();break;case"nesw":case"nwse":A(),v()}const C=new F.Vector3().subVectors(r[1],r[0]).length()/f.length(),w=new F.Vector3().subVectors(r[3],r[0]).length()/d.length(),x=new F.Vector3(C,w,1),D=new E.Matrix4().scale(x);n.isCSS3DObjectPlus?n.applyScaleMatrix4(D):n.scale.applyMatrix4(D),o.position.copy(a);const y=new F.Vector3().addVectors(r[0],r[2]).divideScalar(2),L=new F.Vector3().subVectors(y,l),P=new E.Matrix4().setPosition(L);n.applyMatrix4(P),(j=this.helperObject3D.css3DInstance)==null||j.css3DObject.applyMatrix4(P),(B=this.helperObject3D.plane)==null||B.applyMatrix4(P),this.hooks.emit("scaleUpdate",{matrix4:D,helperOrigin:l}),this.hooks.emit("positionUpdate",{matrix4:P}),this.render()}dragEnd(){!this.isDragging||(this.startInfo=void 0,this.isDragging=!1,this.hooks.emit("scaleEnd"),this.render(),console.log("%c RectangleScaleController dragEnd","color: #e94e4e"))}}class C0 extends w0{constructor(...t){super(...t),this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(t=>{if(!t)return;const e=t.point,n=r=>this.dragStart(r,t),o=this.dragging.bind(this),s=this.dragEnd.bind(this);e.addEventListener("dragstart",n),e.addEventListener("drag",o),e.addEventListener("dragend",s)})}}const mo="v1.0.0",Yi="Object3DHelperPlugin",fi=`${Yi}@${mo}`,E0=()=>{console.error(`${fi} is disposed`)},P0=()=>{console.warn(`${fi} is disabled`)},I0=()=>{console.error(`${fi} is disabled`)};class Ka extends ai{constructor(e){super(e);h(this,"version",mo);h(this,"name",Yi);h(this,"state",{visible:!0,enabled:!0,disposed:!1});h(this,"objectHelperMap",new Map);h(this,"css3DObjectParentMap",new Map);h(this,"css3DRender");this.five=e,this.css3DRender=new Vt(this.five.scene),console.warn("Object3DHelper: \u4F7F\u7528\u6B64\u63D2\u4EF6\u9700\u8981\u5728\u521D\u59CB\u5316five\u65F6\uFF0C\u8BBE\u7F6Efive\u53C2\u6570: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${Yi.toUpperCase()}_DEBUG__`]:this})}show(e){return J(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return J(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){if(this.state.disposed)return E0();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return I0();const o=N({},this.state);this.state=N(N({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:o})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,n={}){var u;if(!e)return console.error("Object3D is undefined");if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const o=new b0;this.objectHelperMap.set(e,o);const s=(u=this.five.getElement())==null?void 0:u.parentElement,r=this.five.camera,{moveHelper:a=!0,rotateHelper:l=!0,scaleHelper:c=!0}=n;if(a){const f=new a0(e),d=new Si(this.five,h0,e,f);o.addControllers({moveController:d.helperController})}if(l){let f;s&&r&&(f={container:s});const d=new u0(e,f),p=new Si(this.five,y0,e,d);o.addControllers({rotateController:p.helperController})}if(c&&s){const f=new f0(e,s,r,this.five.scene),d=new Si(this.five,C0,e,f);o.addControllers({scaleController:d.helperController})}e.isCSS3DObjectPlus&&Vr(this.five).then(()=>{var p,m;const f=e,d=(p=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?p:Jr(this.five);d&&(this.css3DObjectParentMap.set(f,f.parent),f.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(d),(m=this.css3DRender.getBehindCSS3DObjectGroup())==null||m.add(f),this.css3DRender.render(this.five.camera))})}removeObject3DHelper(e){const n=this.objectHelperMap.get(e);if(!!n){if(e.isCSS3DObjectPlus){const o=e,s=this.css3DObjectParentMap.get(o);s==null||s.add(o),this.css3DRender.render(this.five.camera)}this.objectHelperMap.delete(e),n.dispose()}}handleEnable(e,n=!0){e?(this.everyHelperDo(o=>o.enable()),this.hooks.emit("enable",{userAction:n})):(this.everyHelperDo(o=>o.disable()),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){e?(this.everyHelperDo(o=>o.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.everyHelperDo(o=>o.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}handleDispose(){this.everyHelperDo(e=>e.dispose())}everyHelperDo(e){this.objectHelperMap.forEach(n=>{n&&e(n)})}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&P0()}}const x0=i=>new Ka(i);class Ui{constructor(t=0,e=0){h(this,"min");h(this,"max");h(this,"isInterval",!0);this.min=t,this.max=e}fromArray(t){return this.min=t[0],this.max=t[1],this}isOverlap(t){return Math.min(this.max,t.max)<Math.max(this.min,t.min)}contains(t){return this.min<t.min&&this.max>t.max}}class k0{constructor(t,e){h(this,"min");h(this,"max");h(this,"xInterval");h(this,"yInterval");h(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new Ui(this.min.x,this.max.x),this.yInterval=new Ui(this.min.y,this.max.y)}isOverlapWithRectangle(t){return!this.xInterval.isOverlap(t.xInterval)&&!this.yInterval.isOverlap(t.yInterval)}containsRect(t){return this.xInterval.contains(t.xInterval)&&this.yInterval.contains(t.yInterval)}}function Qn(i,t,e){const n=i[t],o=i[e];!n||!o||(i[t]=o,i[e]=n)}function D0(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;Qn(i,a*4+0,l*4+0),Qn(i,a*4+1,l*4+1),Qn(i,a*4+2,l*4+2),Qn(i,a*4+3,l*4+3)}}}class $a{constructor(t,e){h(this,"width");h(this,"height");h(this,"containerDom");h(this,"hooks",new be.Subscribe);h(this,"canvas",document.createElement("canvas"));h(this,"five");h(this,"scale");h(this,"config");h(this,"offset",{x:0,y:0});h(this,"context");h(this,"renderCenter",new E.Vector3);h(this,"hammer");h(this,"state",{enabled:!1});h(this,"onPan",t=>{if(!this.containerDom||this.hooks.emit("wantsPanGesture",t))return;const n=this.offset.x+t.deltaX,o=this.offset.y+t.deltaY;this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${n}px, ${o}px, 100px)`});h(this,"onPanEnd",t=>{this.offset={x:this.offset.x+t.deltaX,y:this.offset.y+t.deltaY},this.canvas.style.boxShadow="none"});var o,s,r;if(!t.renderer)throw new Error("Five Render \u672A\u521D\u59CB\u5316");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new gn.default(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){var t;if(!this.state.enabled)return this.state.enabled=!0,(t=this.containerDom)==null||t.append(this.canvas),this}disable(){if(!!this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){var e;return this.containerDom&&((e=this.containerDom)==null||e.removeChild(this.canvas)),this.containerDom=t,this.state.enabled&&t.append(this.canvas),this}clear(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this}renderWithPoint(t){!this.containerDom||!this.state.enabled||(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,n=this.renderCenter.clone().project(this.five.camera),o=(n.x+1)/2*this.containerDom.clientWidth,s=-(n.x-1)/2*this.containerDom.clientWidth,r=-(n.y-1)/2*this.containerDom.clientHeight;o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=90+"px"):r<183?(this.canvas.style.top=90+"px",this.canvas.style.left=-t/2+"px"):s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${r}px, 10px)`,this.offset={x:o,y:r}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:n,height:o}=this,s=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new E.Vector2),a=1,l=n/t,c=o/t,u=a*t,f=(s.x+1)/2*r.x,d=(s.y+1)/2*r.y,p=this.five.getPixels(f-l/2,d-l/2,l,c,u),m=Math.floor(n*a),g=Math.floor(o*a);D0(p,m,g);const A=new ImageData(m,g);A.data.set(p),e.putImageData(A,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}}function L0(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new E.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function el(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new E.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function S0(i,t){const e=i.getElement();if(!e)return;const n=el(t,e),o=new E.Raycaster;return o.setFromCamera(n,i.camera),o}function z0(i,t){const{x:e,y:n}=t,o=e*2-1,s=n*2-1,r=new E.Vector2().fromArray([o,s]),a=new E.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const M0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkMEbgj7FKFpLA4QS+fPnyx23czJc//V498h2O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UhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",T0=`
|
|
546
|
+
format('woff2')}.content__container.svelte-95x526{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.unClickable.svelte-95x526{pointer-events:none !important}.content__container.unClickable.svelte-95x526 *{pointer-events:none !important}*{-webkit-tap-highlight-color:transparent}.content__wrapper.svelte-95x526{pointer-events:none;width:100%;height:100%}.withAnimation.svelte-95x526{transition:opacity 0.3s linear}.content__container.hide.svelte-95x526{opacity:0;pointer-events:none}.content__container.hide.svelte-95x526 *{pointer-events:none !important}.content__container.disable.svelte-95x526{display:none}.content__container.hide.svelte-95x526 *{pointer-events:none}.content.svelte-95x526{position:relative;width:100%;height:100%;font-size:0.75rem;line-height:1.125rem;color:#fff}.content.svelte-95x526:not(.unfolded){pointer-events:none}.content.svelte-95x526:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-95x526{pointer-events:auto}`)}function Ag(i){let t,e;return t=new sg({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function vg(i){let t,e;return t=new dg({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function bg(i){let t,e;return t=new Vp({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function yg(i){let t,e;return t=new tg({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function wg(i){let t,e;return t=new Wp({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Cg(i){let t,e;return t=new op({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Eg(i){let t,e;return t=new pg({props:{tag:Se(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Pg(i){let t,e,n,o,s,r,a,l,c;const u=[Eg,Cg,wg,yg,bg,vg,Ag],f=[];function d(p,m){return p[1].element?0:p[1].contentType===We.Text?1:p[1].contentType===We.ImageText?2:p[1].contentType===We.Audio?3:p[1].contentType===We.Marketing?4:p[1].contentType===We.Link?5:p[1].contentType===We.MediaPlane?6:-1}return~(o=d(i))&&(s=f[o]=u[o](i)),{c(){var p,m,g;t=Q("div"),e=Q("div"),n=Q("div"),s&&s.c(),b(n,"class","content svelte-95x526"),_(n,"unfolded",(p=i[1].state)==null?void 0:p.unfolded),b(e,"class","content__wrapper svelte-95x526"),b(t,"class","content__container svelte-95x526"),b(t,"data-id",r=i[1].id),_(t,"disable",i[1].enabled===!1||((m=i[1].temporaryState)==null?void 0:m.visible)===!1),_(t,"hide",!i[3].visible||!i[3].enabled||!i[4].visible||!((g=i[1].state)!=null&&g.visible)),_(t,"withAnimation",i[0]),_(t,"unClickable",i[1].clickable===!1),H(t,"width",i[1].pointType==="PointTag"?0:"100%"),H(t,"height",i[1].pointType==="PointTag"?0:"100%")},m(p,m){T(p,t,m),O(t,e),O(e,n),~o&&f[o].m(n,null),a=!0,l||(c=Pe(t,"click",Zi(i[11])),l=!0)},p(p,[m]){var A,v,C;let g=o;o=d(p),o===g?~o&&f[o].p(p,m):(s&&(le(),M(f[g],1,1,()=>{f[g]=null}),ce()),~o?(s=f[o],s?s.p(p,m):(s=f[o]=u[o](p),s.c()),k(s,1),s.m(n,null)):s=null),(!a||m&2)&&_(n,"unfolded",(A=p[1].state)==null?void 0:A.unfolded),(!a||m&2&&r!==(r=p[1].id))&&b(t,"data-id",r),(!a||m&2)&&_(t,"disable",p[1].enabled===!1||((v=p[1].temporaryState)==null?void 0:v.visible)===!1),(!a||m&26)&&_(t,"hide",!p[3].visible||!p[3].enabled||!p[4].visible||!((C=p[1].state)!=null&&C.visible)),(!a||m&1)&&_(t,"withAnimation",p[0]),(!a||m&2)&&_(t,"unClickable",p[1].clickable===!1),m&2&&H(t,"width",p[1].pointType==="PointTag"?0:"100%"),m&2&&H(t,"height",p[1].pointType==="PointTag"?0:"100%")},i(p){a||(k(s),a=!0)},o(p){M(s),a=!1},d(p){p&&z(t),~o&&f[o].d(),l=!1,c()}}}function Ig(i,t,e){let n,o,s,r,{withAnimation:a=!1}=t,{tag:l}=t,{hooks:c}=t,{state:u}=t,{mediaStore:f}=t,{temporaryState:d}=t;Bi("hooks",c),Bi("mediaStore",f);let p,m;function g(v){v?c.emit("exposure",{id:r,type:"start"}):c.emit("exposure",{id:r,type:"end"})}const A=v=>c.emit("click",{event:v,target:"TagContent",tag:l});return i.$$set=v=>{"withAnimation"in v&&e(0,a=v.withAnimation),"tag"in v&&e(1,l=v.tag),"hooks"in v&&e(2,c=v.hooks),"state"in v&&e(3,u=v.state),"mediaStore"in v&&e(5,f=v.mediaStore),"temporaryState"in v&&e(4,d=v.temporaryState)},i.$$.update=()=>{var v,C;i.$$.dirty&2&&e(9,n=(v=l.state)==null?void 0:v.unfolded),i.$$.dirty&2&&e(8,o=(C=l.state)==null?void 0:C.visible),i.$$.dirty&280&&e(10,s=u.visible&&d.visible&&o),i.$$.dirty&2&&(r=l.id),i.$$.dirty&1024&&g(s),i.$$.dirty&962&&l.hooks&&(n!==void 0&&n!==m&&(e(7,m=n),n?l.hooks.emit("unfolded"):l.hooks.emit("folded")),o!==void 0&&o!==p&&(e(6,p=o),o?l.hooks.emit("show"):l.hooks.emit("hide")))},[a,l,c,u,d,f,p,m,o,n,s,A]}class Za extends oe{constructor(t){super(),ie(this,t,Ig,Pg,te,{withAnimation:0,tag:1,hooks:2,state:3,mediaStore:5,temporaryState:4},gg)}}function xg(i){ae(i,"svelte-fuismw",".point.svelte-fuismw.svelte-fuismw{pointer-events:none;width:1.5rem;height:1.5rem}.small-point.svelte-fuismw.svelte-fuismw,.big-point.svelte-fuismw.svelte-fuismw{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all 500ms}.big-point.svelte-fuismw.svelte-fuismw{background-color:rgba(0, 0, 0, 0.1)}.folded.point.svelte-fuismw.svelte-fuismw{animation:svelte-fuismw-breathing 2s linear infinite}.big-point.svelte-fuismw.svelte-fuismw::before,.big-point.svelte-fuismw.svelte-fuismw::after{content:'';display:block;position:absolute;background-size:contain;background-repeat:no-repeat;pointer-events:none}.big-point.svelte-fuismw.svelte-fuismw::before{width:100%;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAAAqFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8j1z1tAAAAOHRSTlMABgoNFBsYIhEmHyksMoJ6RZ5aXzpnU03AtqaZjLuGN+zcifnW0cjEqnA+lOZzbWLhkH6i8rGuagnOwPMAAAQOSURBVFjDrZiHctpAEIYXYzvGOvXeUe+IYuD93ywrJAIhFJX8M8zoBHzz757utHvwTETJHJPfGQZfWJXILWCMPuqNbuu6vj+khrHjed40TWvFfQ2jvCl8nGha6lQCl7s07UqcUlfOZrOxVtKsN2a+0uJYK+ScEIqiFifhBSGSsnJ8f8u99cLMVnEUHTKXIOMX6vuk5gpphFYyhmHzHpzcDqNUJGgEER+oz5OaK8ShNcIdt+zx1ys7lhdqiDlRkPF+JaSdWIhasaz6lLPQ1qFDIwYpDeTr62veCS8bGLIQRSsVK78/5nDeOlYIYhovHeOtU0dDXw2KSGiKesQRyjJ10Q66QcyZMTvpTEMUumpMieyWvs9ZLZcmodAOYlorsysBflpjiEJTFBEY5+7sicul34T1iak5U25momN9Ya4wPCT57r8cteW0dk4YuKMTqjXVkgjciFr+8B3ngnmM6kii5X/efB0F+jUHnuiatLJY+Et84EnUNacfiaKZjQhX4oJAwPlqOB3mJaoh4dxxG5Nc3Q8DkywunP6kBalN53J7G3g0JqiNC3qpjQ7TRPvmn2U3L3/kU4JaTn/SKU0qb76dDf0kGNjHJbD+wX1gcMxO6fZVrzXUcQaROkvt3+pljIYugQ0LDi1ZBgeN9JK9MjTCkmgwgPou19I5QzBI5yy5RvqOw6xMMbKzoeGWmnQfBBwa6woj6wyNsYSx7R0chWuOwsjOqR6aboyNyvcpgOsl3ZzNhoNm3bztdAK1x5NuzmCwunkjjq4AEzKXFI1NUmVnwIfydJBoW7CPVAR1uR6XbVwlmgF2xF1yPTbbubYHLZamgyTNhiSmp4PoJIEk+R+gOAFb+x+hxRoctHw6iItsMLT/Mf3RHixbnP5AyhEPmZ1NB+E6A0V3pi9aPqyB6Pz0bSTxXID0kE/d2DgvxBFzEKdutdXawJGSMlM3/3Sd4fA93bnTXkfSuvwGFGOI016QbKm3VdbOn/bKjpd1e6Pg1SlFhPzjdXWNwjNTyprkhz33i4Wpji600FA5h05q4Ywv/bxge7mNRe7YYtQMwqt/kMLixpXHQhBwcCXBYukxBbvkBTv4S5V/HNNC6EF089tPxxGHNzV8sKTgRhSzVYa2Wf5yeadHphlWGdb4IUeEO5K2SHrUiqJuW9GiLFdwVzRbCXTf5tg11mvhYdufZbLUr11XEi/k4KHexUxWSY8DBCby7AU8E3eUhfzVkYZgR6H/agF8C3KNqCeHLIIRR7oEr0XXsixy9P1jH/doJLF2nPXbIlw5y1aC6t4eROW1pduaLs/7b6NEqFiWrWpBzaXuaOy4Nfe6bRfqGwzSXBJZhnF8y9oUhcnzOyM9pI7wCWP0LSkyy1iFWWwsFp8LeKLfd4doRyTLRacAAAAASUVORK5CYII=)}.folded.svelte-fuismw .big-point.svelte-fuismw::before{animation:svelte-fuismw-rotate 2s linear infinite}.big-point.svelte-fuismw.svelte-fuismw::after{position:absolute;width:1rem;height:1rem;background-image:var(--iconUrl)}.small-point.svelte-fuismw.svelte-fuismw::before{content:'';display:block;position:absolute;pointer-events:none;width:0.25rem;height:0.25rem;border-radius:100%;background-color:white}.folded.svelte-fuismw .big-point.svelte-fuismw{opacity:1;scale:1}.unfolded.svelte-fuismw .big-point.svelte-fuismw{opacity:0;scale:0}.folded.svelte-fuismw .small-point.svelte-fuismw{opacity:0;scale:6}.unfolded.svelte-fuismw .small-point.svelte-fuismw{opacity:1;scale:1}@keyframes svelte-fuismw-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes svelte-fuismw-breathing{0%{transform:scale(1)}25%{transform:scale(0.9)}50%{transform:scale(1)}}")}function kg(i){let t,e,n,o,s,r,a;return e=new Ve({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){t=Q("div"),$(e.$$.fragment),n=Z(),o=Q("div"),s=Z(),r=Q("div"),b(o,"class","small-point svelte-fuismw"),H(o,"transition-delay",i[3]?i[2]+"ms":"0ms"),b(r,"class","big-point svelte-fuismw"),H(r,"--iconUrl","url("+i[1]+")"),H(r,"transition-delay",i[3]?i[2]+"ms":"0ms"),b(t,"class","point svelte-fuismw"),_(t,"folded",i[3]),_(t,"unfolded",i[0])},m(l,c){T(l,t,c),q(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),a=!0},p(l,[c]){c&12&&H(o,"transition-delay",l[3]?l[2]+"ms":"0ms"),(!a||c&2)&&H(r,"--iconUrl","url("+l[1]+")"),c&12&&H(r,"transition-delay",l[3]?l[2]+"ms":"0ms"),(!a||c&8)&&_(t,"folded",l[3]),(!a||c&1)&&_(t,"unfolded",l[0])},i(l){a||(k(e.$$.fragment,l),a=!0)},o(l){M(e.$$.fragment,l),a=!1},d(l){l&&z(t),K(e)}}}function Dg(i,t,e){let n,{unfolded:o}=t,{iconUrl:s}=t,{foldDelay:r=800}=t;return i.$$set=a=>{"unfolded"in a&&e(0,o=a.unfolded),"iconUrl"in a&&e(1,s=a.iconUrl),"foldDelay"in a&&e(2,r=a.foldDelay)},i.$$.update=()=>{i.$$.dirty&1&&e(3,n=!o)},[o,s,r,n]}class Lg extends oe{constructor(t){super(),ie(this,t,Dg,kg,te,{unfolded:0,iconUrl:1,foldDelay:2},xg)}}function Sg(i){ae(i,"svelte-jzvcn0",".point.svelte-jzvcn0.svelte-jzvcn0{pointer-events:none;width:1rem;height:1rem}.small-point.svelte-jzvcn0.svelte-jzvcn0,.big-point.svelte-jzvcn0.svelte-jzvcn0{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all 500ms}.big-point.svelte-jzvcn0.svelte-jzvcn0::before,.big-point.svelte-jzvcn0.svelte-jzvcn0::after{content:'';display:block;position:absolute;background-size:contain;background-repeat:no-repeat;pointer-events:none}.big-point.svelte-jzvcn0.svelte-jzvcn0::before{width:100%;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAAAqFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8j1z1tAAAAOHRSTlMABgoNFBsYIhEmHyksMoJ6RZ5aXzpnU03AtqaZjLuGN+zcifnW0cjEqnA+lOZzbWLhkH6i8rGuagnOwPMAAAQOSURBVFjDrZiHctpAEIYXYzvGOvXeUe+IYuD93ywrJAIhFJX8M8zoBHzz757utHvwTETJHJPfGQZfWJXILWCMPuqNbuu6vj+khrHjed40TWvFfQ2jvCl8nGha6lQCl7s07UqcUlfOZrOxVtKsN2a+0uJYK+ScEIqiFifhBSGSsnJ8f8u99cLMVnEUHTKXIOMX6vuk5gpphFYyhmHzHpzcDqNUJGgEER+oz5OaK8ShNcIdt+zx1ys7lhdqiDlRkPF+JaSdWIhasaz6lLPQ1qFDIwYpDeTr62veCS8bGLIQRSsVK78/5nDeOlYIYhovHeOtU0dDXw2KSGiKesQRyjJ10Q66QcyZMTvpTEMUumpMieyWvs9ZLZcmodAOYlorsysBflpjiEJTFBEY5+7sicul34T1iak5U25momN9Ya4wPCT57r8cteW0dk4YuKMTqjXVkgjciFr+8B3ngnmM6kii5X/efB0F+jUHnuiatLJY+Et84EnUNacfiaKZjQhX4oJAwPlqOB3mJaoh4dxxG5Nc3Q8DkywunP6kBalN53J7G3g0JqiNC3qpjQ7TRPvmn2U3L3/kU4JaTn/SKU0qb76dDf0kGNjHJbD+wX1gcMxO6fZVrzXUcQaROkvt3+pljIYugQ0LDi1ZBgeN9JK9MjTCkmgwgPou19I5QzBI5yy5RvqOw6xMMbKzoeGWmnQfBBwa6woj6wyNsYSx7R0chWuOwsjOqR6aboyNyvcpgOsl3ZzNhoNm3bztdAK1x5NuzmCwunkjjq4AEzKXFI1NUmVnwIfydJBoW7CPVAR1uR6XbVwlmgF2xF1yPTbbubYHLZamgyTNhiSmp4PoJIEk+R+gOAFb+x+hxRoctHw6iItsMLT/Mf3RHixbnP5AyhEPmZ1NB+E6A0V3pi9aPqyB6Pz0bSTxXID0kE/d2DgvxBFzEKdutdXawJGSMlM3/3Sd4fA93bnTXkfSuvwGFGOI016QbKm3VdbOn/bKjpd1e6Pg1SlFhPzjdXWNwjNTyprkhz33i4Wpji600FA5h05q4Ywv/bxge7mNRe7YYtQMwqt/kMLixpXHQhBwcCXBYukxBbvkBTv4S5V/HNNC6EF089tPxxGHNzV8sKTgRhSzVYa2Wf5yeadHphlWGdb4IUeEO5K2SHrUiqJuW9GiLFdwVzRbCXTf5tg11mvhYdufZbLUr11XEi/k4KHexUxWSY8DBCby7AU8E3eUhfzVkYZgR6H/agF8C3KNqCeHLIIRR7oEr0XXsixy9P1jH/doJLF2nPXbIlw5y1aC6t4eROW1pduaLs/7b6NEqFiWrWpBzaXuaOy4Nfe6bRfqGwzSXBJZhnF8y9oUhcnzOyM9pI7wCWP0LSkyy1iFWWwsFp8LeKLfd4doRyTLRacAAAAASUVORK5CYII=);background-size:contain;background-repeat:no-repeat}.small-point.svelte-jzvcn0.svelte-jzvcn0::before{content:'';display:block;position:absolute;pointer-events:none;width:0.375rem;height:0.375rem;border-radius:100%;background-color:white}.unfolded.svelte-jzvcn0 .big-point.svelte-jzvcn0{opacity:0;transform:scale(0)}.folded.svelte-jzvcn0 .big-point.svelte-jzvcn0{opacity:1;transform:scale(1)}.unfolded.svelte-jzvcn0 .small-point.svelte-jzvcn0{transform:scale(0.6)}.folded.svelte-jzvcn0 .small-point.svelte-jzvcn0{transform:scale(1)}")}function zg(i){let t,e,n,o,s,r,a;return e=new Ve({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){t=Q("div"),$(e.$$.fragment),n=Z(),o=Q("div"),s=Z(),r=Q("div"),b(o,"class","small-point svelte-jzvcn0"),H(o,"transition-delay",i[2]?i[1]+"ms":"0ms"),b(r,"class","big-point svelte-jzvcn0"),H(r,"transition-delay",i[2]?i[1]+"ms":"0ms"),b(t,"class","point svelte-jzvcn0"),_(t,"unfolded",i[0]),_(t,"folded",i[2])},m(l,c){T(l,t,c),q(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),a=!0},p(l,[c]){c&6&&H(o,"transition-delay",l[2]?l[1]+"ms":"0ms"),c&6&&H(r,"transition-delay",l[2]?l[1]+"ms":"0ms"),(!a||c&1)&&_(t,"unfolded",l[0]),(!a||c&4)&&_(t,"folded",l[2])},i(l){a||(k(e.$$.fragment,l),a=!0)},o(l){M(e.$$.fragment,l),a=!1},d(l){l&&z(t),K(e)}}}function Mg(i,t,e){let n,{unfolded:o}=t,{foldDelay:s=800}=t;return i.$$set=r=>{"unfolded"in r&&e(0,o=r.unfolded),"foldDelay"in r&&e(1,s=r.foldDelay)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=!o)},[o,s,n]}class Tg extends oe{constructor(t){super(),ie(this,t,Mg,zg,te,{unfolded:0,foldDelay:1},Sg)}}function Bg(i){ae(i,"svelte-8en2lj",".point-click-helper.svelte-8en2lj{position:absolute;width:2.5rem;height:2.5rem;left:50%;top:50%;transform:translate(-50%, -50%)}")}function Sr(i){let t,e,n=i[0].contentType!==We.Link&&zr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,s){o[0].contentType!==We.Link?n?(n.p(o,s),s&1&&k(n,1)):(n=zr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function zr(i){let t,e,n,o,s,r;const a=[Qg,jg],l=[];function c(u,f){var d,p,m,g;return((p=(d=u[0].style)==null?void 0:d.point)==null?void 0:p.style)==="CustomIcon"&&((g=(m=u[0].style)==null?void 0:m.point)==null?void 0:g.iconUrl)?0:1}return n=c(i),o=l[n]=a[n](i),{c(){t=Q("div"),e=Z(),o.c(),s=he(),b(t,"class","point-click-helper svelte-8en2lj")},m(u,f){T(u,t,f),T(u,e,f),l[n].m(u,f),T(u,s,f),r=!0},p(u,f){let d=n;n=c(u),n===d?l[n].p(u,f):(le(),M(l[d],1,1,()=>{l[d]=null}),ce(),o=l[n],o?o.p(u,f):(o=l[n]=a[n](u),o.c()),k(o,1),o.m(s.parentNode,s))},i(u){r||(k(o),r=!0)},o(u){M(o),r=!1},d(u){u&&z(t),u&&z(e),l[n].d(u),u&&z(s)}}}function jg(i){let t,e;return t=new Tg({props:{unfolded:i[0].state.unfolded,foldDelay:i[1]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.unfolded=n[0].state.unfolded),o&2&&(s.foldDelay=n[1]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Qg(i){let t,e;return t=new Lg({props:{iconUrl:i[0].style.point.iconUrl,unfolded:i[0].state.unfolded,foldDelay:i[1]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.iconUrl=n[0].style.point.iconUrl),o&1&&(s.unfolded=n[0].state.unfolded),o&2&&(s.foldDelay=n[1]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Rg(i){var o,s,r;let t,e,n=((o=i[0].pointTagStyle)==null?void 0:o.leftPercent)&&((s=i[0].pointTagStyle)==null?void 0:s.topPercent)&&i[0].enabled!==!1&&i[0].state&&((r=i[0].temporaryState)==null?void 0:r.visible)!==!1&&Sr(i);return{c(){n&&n.c(),t=he()},m(a,l){n&&n.m(a,l),T(a,t,l),e=!0},p(a,[l]){var c,u,f;((c=a[0].pointTagStyle)==null?void 0:c.leftPercent)&&((u=a[0].pointTagStyle)==null?void 0:u.topPercent)&&a[0].enabled!==!1&&a[0].state&&((f=a[0].temporaryState)==null?void 0:f.visible)!==!1?n?(n.p(a,l),l&1&&k(n,1)):(n=Sr(a),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(a){e||(k(n),e=!0)},o(a){M(n),e=!1},d(a){n&&n.d(a),a&&z(t)}}}function Og(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(0,o=s.tag)},i.$$.update=()=>{var s,r;i.$$.dirty&1&&e(1,n=(r=(s=o.style)==null?void 0:s.foldedPointDelay)!=null?r:o.contentType===We.Marketing?600:void 0)},[o,n]}class Hg extends oe{constructor(t){super(),ie(this,t,Og,Rg,te,{tag:0},Bg)}}function Fg(i){ae(i,"svelte-1vzhbu2",".wrapper.svelte-1vzhbu2{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}.point.svelte-1vzhbu2{-webkit-tap-highlight-color:transparent;position:absolute;transform:translate(-50%, -50%);left:50%;top:50%}")}function Mr(i){let t,e;return t=new Za({props:{mediaStore:i[4],withAnimation:i[0],tag:Se(i[1]),hooks:i[2],state:i[3],temporaryState:i[5]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&16&&(s.mediaStore=n[4]),o&1&&(s.withAnimation=n[0]),o&2&&(s.tag=Se(n[1])),o&4&&(s.hooks=n[2]),o&8&&(s.state=n[3]),o&32&&(s.temporaryState=n[5]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Tr(i){let t,e,n,o,s;return e=new Hg({props:{tag:i[1]}}),{c(){t=Q("div"),$(e.$$.fragment),b(t,"class","point svelte-1vzhbu2")},m(r,a){T(r,t,a),q(e,t,null),n=!0,o||(s=Pe(t,"click",Zi(i[11])),o=!0)},p(r,a){const l={};a&2&&(l.tag=r[1]),e.$set(l)},i(r){n||(k(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){r&&z(t),K(e),o=!1,s()}}}function Gg(i){var a,l;let t,e,n,o,s=i[1].dimensionType===Xe.Two&&Mr(i),r=i[1].pointType===Ge.PointTag&&((l=(a=i[1].style)==null?void 0:a.point)==null?void 0:l.style)!=="noPoint"&&Tr(i);return{c(){t=Q("div"),s&&s.c(),e=Z(),r&&r.c(),b(t,"class","wrapper svelte-1vzhbu2"),b(t,"data-id",n=i[1].id),_(t,"hide",i[10]),_(t,"unfolded",i[6]),H(t,"left",i[9]),H(t,"top",i[8]),H(t,"z-index",i[7])},m(c,u){T(c,t,u),s&&s.m(t,null),O(t,e),r&&r.m(t,null),o=!0},p(c,[u]){var f,d;c[1].dimensionType===Xe.Two?s?(s.p(c,u),u&2&&k(s,1)):(s=Mr(c),s.c(),k(s,1),s.m(t,e)):s&&(le(),M(s,1,1,()=>{s=null}),ce()),c[1].pointType===Ge.PointTag&&((d=(f=c[1].style)==null?void 0:f.point)==null?void 0:d.style)!=="noPoint"?r?(r.p(c,u),u&2&&k(r,1)):(r=Tr(c),r.c(),k(r,1),r.m(t,null)):r&&(le(),M(r,1,1,()=>{r=null}),ce()),(!o||u&2&&n!==(n=c[1].id))&&b(t,"data-id",n),(!o||u&1024)&&_(t,"hide",c[10]),(!o||u&64)&&_(t,"unfolded",c[6]),u&512&&H(t,"left",c[9]),u&256&&H(t,"top",c[8]),u&128&&H(t,"z-index",c[7])},i(c){o||(k(s),k(r),o=!0)},o(c){M(s),M(r),o=!1},d(c){c&&z(t),s&&s.d(),r&&r.d()}}}function Ng(i,t,e){let n,o,s,r,a,l,{withAnimation:c=!1}=t,{tag:u}=t,{hooks:f}=t,{state:d}=t,{mediaStore:p}=t,{temporaryState:m}=t,g,A=!1;function v(w){g!==void 0&&clearTimeout(g),A=!0,g=setTimeout(()=>{A=!1},800)}const C=w=>{A||f.emit("click",{event:w,target:"TagPoint",tag:u})};return i.$$set=w=>{"withAnimation"in w&&e(0,c=w.withAnimation),"tag"in w&&e(1,u=w.tag),"hooks"in w&&e(2,f=w.hooks),"state"in w&&e(3,d=w.state),"mediaStore"in w&&e(4,p=w.mediaStore),"temporaryState"in w&&e(5,m=w.temporaryState)},i.$$.update=()=>{var w,x,D,y;i.$$.dirty&2&&e(12,n=(w=u.state)==null?void 0:w.visible),i.$$.dirty&4096&&e(10,o=!n),i.$$.dirty&2&&e(6,s=(x=u.state)==null?void 0:x.unfolded),i.$$.dirty&2&&e(9,r=((D=u.pointTagStyle)==null?void 0:D.leftPercent)+"%"),i.$$.dirty&2&&e(8,a=((y=u.pointTagStyle)==null?void 0:y.topPercent)+"%"),i.$$.dirty&2&&e(7,l=u.contentType===We.Link?1:0),i.$$.dirty&64&&v()},[c,u,f,d,p,m,s,l,a,r,o,C,n]}class Wg extends oe{constructor(t){super(),ie(this,t,Ng,Gg,te,{withAnimation:0,tag:1,hooks:2,state:3,mediaStore:4,temporaryState:5},Fg)}}function Xg(i){ae(i,"svelte-1eci49s",".tag--container.svelte-1eci49s{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;opacity:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tag.hide.svelte-1eci49s{display:none}.withAnimation.svelte-1eci49s{transition:opacity 0.3s linear}.tag--container.hide.svelte-1eci49s{opacity:0;pointer-events:none}.tag--container.hide.svelte-1eci49s *{pointer-events:none}")}function Br(i,t,e){const n=i.slice();return n[6]=t[e],n}function jr(i){let t,e=[],n=new Map,o,s=i[1];const r=a=>a[6].id;for(let a=0;a<s.length;a+=1){let l=Br(i,s,a),c=r(l);n.set(c,e[a]=Qr(c,l))}return{c(){t=Q("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-1eci49s"),_(t,"hide",!i[3].visible||!i[5].visible),_(t,"withAnimation",i[0])},m(a,l){T(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,l){l&63&&(s=a[1],le(),e=Ue(e,l,r,1,a,s,n,t,at,Qr,null,Br),ce()),(!o||l&40)&&_(t,"hide",!a[3].visible||!a[5].visible),(!o||l&1)&&_(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)k(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)M(e[l]);o=!1},d(a){a&&z(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Qr(i,t){let e,n,o,s;const r=[{tag:t[6],hooks:t[2],state:t[3],mediaStore:t[4],temporaryState:t[5],withAnimation:t[0]}];let a={};for(let l=0;l<r.length;l+=1)a=we(a,r[l]);return n=new Wg({props:a}),{key:i,first:null,c(){var l,c,u;e=Q("div"),$(n.$$.fragment),o=Z(),b(e,"class","tag svelte-1eci49s"),_(e,"hide",!((l=t[6].pointTagStyle)!=null&&l.leftPercent)||!((c=t[6].pointTagStyle)!=null&&c.topPercent)||t[6].enabled===!1||!t[6].state||((u=t[6].temporaryState)==null?void 0:u.visible)===!1),this.first=e},m(l,c){T(l,e,c),q(n,e,null),O(e,o),s=!0},p(l,c){var f,d,p;t=l;const u=c&63?Be(r,[{tag:t[6],hooks:t[2],state:t[3],mediaStore:t[4],temporaryState:t[5],withAnimation:t[0]}]):{};n.$set(u),(!s||c&2)&&_(e,"hide",!((f=t[6].pointTagStyle)!=null&&f.leftPercent)||!((d=t[6].pointTagStyle)!=null&&d.topPercent)||t[6].enabled===!1||!t[6].state||((p=t[6].temporaryState)==null?void 0:p.visible)===!1)},i(l){s||(k(n.$$.fragment,l),s=!0)},o(l){M(n.$$.fragment,l),s=!1},d(l){l&&z(e),K(n)}}}function Yg(i){let t,e,n=i[3].enabled&&jr(i);return{c(){n&&n.c(),t=he()},m(o,s){n&&n.m(o,s),T(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&k(n,1)):(n=jr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(le(),M(n,1,1,()=>{n=null}),ce())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Ug(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{state:r}=t,{mediaStore:a}=t,{temporaryState:l}=t;return i.$$set=c=>{"withAnimation"in c&&e(0,n=c.withAnimation),"tags"in c&&e(1,o=c.tags),"hooks"in c&&e(2,s=c.hooks),"state"in c&&e(3,r=c.state),"mediaStore"in c&&e(4,a=c.mediaStore),"temporaryState"in c&&e(5,l=c.temporaryState)},[n,o,s,r,a,l]}class Vg extends oe{constructor(t){super(),ie(this,t,Ug,Yg,te,{withAnimation:0,tags:1,hooks:2,state:3,mediaStore:4,temporaryState:5},Xg)}}const Jg={globalConfig:{initialState:{},visibleConfig:{visibleDistance:{max:5},angleRange:{min:-45,max:45}},unfoldedConfig:{autoUnfold:{strategy:"MinimumDistance"}},tag3DConfig:{ratio:.0035}},contentTypeConfig:{"Any-Link-Any":{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},"Any-Marketing-Any":{unfoldedConfig:void 0},"3D-MediaPlane-PlaneTag":{unfoldedConfig:{keep:"unfolded"},visibleConfig:{alwaysShowWhenMovePano:!0,angleRange:void 0,visibleDistance:void 0}}}};class Zg extends ai{constructor(e){super(e);h(this,"tagCacheByPanoIndex",{})}getCaches({panoIndex:e,id:n,key:o}){var c,u,f,d;const{five:s}=this,r=(c=s.panoIndex)!=null?c:e;if(r===void 0)throw new Error(`TagCacheController getCache(): fivePanoIndex is ${r}`);const a=`${(f=(u=s.work)==null?void 0:u.workCode)!=null?f:s.model.uuid}-${r}`;let l=this.tagCacheByPanoIndex[a];if(l||(l=new Map,this.tagCacheByPanoIndex[a]=l),n===void 0)return l;if(o===void 0){const p=l.get(n);return p||(l.set(n,{}),l.get(n))}return(d=l.get(n))==null?void 0:d[o]}clearCache(){this.tagCacheByPanoIndex={}}}class _g extends Zg{constructor(e){super(e);h(this,"tags",[]);h(this,"config",Jg);h(this,"raycaster",new E.Raycaster)}getTagById(e){const n=this.tags.find(o=>o.id===e);if(!n){console.error(`getTagById(): tag is ${n}, id is ${e}`);return}return n}changeConfig(e,n=!0){n?this.config=Lt.default({},this.config,e):this.config=e,this.clearCache()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=Lt.default({},this.config.globalConfig,e):this.config.globalConfig=e,this.clearCache()}changeContentTypeConfig(e,n,o=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),o?this.config.contentTypeConfig[e]=Lt.default({},this.config.contentTypeConfig[e],n):this.config.contentTypeConfig[e]=n,this.clearCache()}getVisibleByPanoIndex(e,n){var r;const o=this.getCaches({panoIndex:n,id:e.id}),s=(r=this.five.panoIndex)!=null?r:n;if(o.visible!==void 0)return o.visible;{const a=(()=>{var u,f,d,p,m;const l=(u=this.getTagConfig(e).visibleConfig)!=null?u:{},c=this.getDistance(e);if(typeof l=="function")return l(this.five,{tag:e,distance:c});if(l.keep==="hidden")return!1;if(l.keep==="visible")return!0;if(l.visiblePanoIndex!==void 0&&(s===void 0||!l.visiblePanoIndex.includes(s))||l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&Tn(c,l.visibleDistance)===!1)return!1;if(((f=l.intersectRaycaster)==null?void 0:f.enabled)!==!1){if(s===void 0)return!1;const g=(d=this.five.work.observers[s])==null?void 0:d.position;if(g===void 0)throw new Error(`getVisible(): observerPosition is ${g}`);const A=Mn(e.position).sub(g).normalize();this.raycaster.set(g,A);const[v]=this.five.model.intersectRaycaster(this.raycaster),C=(m=(p=l.intersectRaycaster)==null?void 0:p.distanceAccuracy)!=null?m:.01;if(v&&v.distance+C<c)return!1}return!(l.angleRange&&e.dimensionType===Xe.Three&&Tn(this.getAngle(e),l.angleRange)===!1)})();return o.visible=a,o.visible}}getUnfoldedByPanoIndex(e,n){if(!this.getVisibleByPanoIndex(e))return;const s=this.getCaches({panoIndex:n,id:e.id});if(s.unfolded!==void 0)return s.unfolded;{const r=this.getTagConfig(e).unfoldedConfig;if(!r)return;const a=(()=>{const c=this.getDistance(e);if(typeof r=="function")return r(this.five,{tag:e,distance:c});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.disableUnfold===!0)return!1;if(r.disableFold===!0)return!0;if(r.unfoldDistance&&Tn(c,r.unfoldDistance)===!1)return!1})();s.unfolded=a;const l=this.getUnfoldedByCamera(e);return l!==void 0?l:s.unfolded}}getUnfoldedByCamera(e){return this.getVisibleByPanoIndex(e)?(()=>{var a;const s=this.getDistance(e),r=this.getTagConfig(e).unfoldedConfig;if(!!r){if(typeof r=="function")return r(this.five,{tag:e,distance:s});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.disableUnfold===!0)return!1;if(r.disableFold===!0)return!0;if(r.autoUnfold===void 0)return;if(r.autoUnfold.strategy==="ScreenPostion"){const l=this.getTagProject(e);if(l&&Tn(l.x,r.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(r.autoUnfold.strategy==="MinimumDistance"){const u=this.filterPointTag().filter(d=>this.getVisibleByPanoIndex(d)).filter(d=>{const p=this.getTagProject(d);if(!p)return!1;const{x:m,y:g,z:A}=p;return!(Math.abs(A)>1||Math.abs(m)>1||Math.abs(g)>1)}).filter(d=>{var m;const p=this.getTagConfig(d).unfoldedConfig;return typeof p=="object"&&((m=p.autoUnfold)==null?void 0:m.strategy)==="MinimumDistance"}).map(d=>({id:d.id,distance:this.getDistance(d)})).filter(d=>d.distance!==void 0).sort((d,p)=>d.distance-p.distance).findIndex(d=>d.id===e.id);if(u===-1||u<=((a=r.autoUnfold.maxNumber)!=null?a:1)-1===!1)return!1}return!0}})():void 0}getDistance(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCaches({panoIndex:n,id:e.id});if(s.distance!==void 0)return s.distance;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getDistance(): observerPosition is ${c}`);const u=(()=>e.pointType===Ge.PointTag?st(e==null?void 0:e.position):Mn(e.position))(),f=c.distanceTo(u);return s.distance=f,f}}getAngle(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCaches({panoIndex:n,id:e.id});if(s.angle!==void 0)return s.angle;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getAngleRange(): observerPosition is ${c}`);const u=(()=>e.pointType===Ge.PointTag?fn(e.normal):Na(e.position))();if(!u)return;const f=new E.Vector3().copy(c).sub(Mn(e.position)),d=u.angleTo(f)*180/Math.PI;return s.angle=d,s.angle}}getTagConfig(e){var s;if(!e)return(s=this.config.globalConfig)!=null?s:{};const n={};return this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(r=>{const a=r;if(n[a])return;const l=a.split("-"),[c="Any",u="Any",f="Any"]=l||[];(e.dimensionType===c||c==="Any")&&(e.contentType===u||u==="Any")&&(e.pointType===f||f==="Any")&&(n[a]=this.config.contentTypeConfig[a])}),Lt.default({},this.config.globalConfig,...Object.values(n),e.config)}canBe(e,n){const o=this.getTagConfig(n);if(!o||typeof o!="object")return!0;if(e==="show"||e==="hide"){if(!o.visibleConfig||typeof o.visibleConfig!="object")return!0;if(e==="show"&&o.visibleConfig.keep==="hidden"||e==="hide"&&(o.visibleConfig.keep==="visible"||o.visibleConfig.alwaysShowWhenMovePano))return!1}if(e==="fold"||e==="unfold"){if(!o.unfoldedConfig||typeof o.unfoldedConfig!="object")return!0;if(e==="fold"&&(o.unfoldedConfig.disableFold||o.unfoldedConfig.keep==="unfolded")||e==="unfold"&&(o.unfoldedConfig.disableUnfold||o.unfoldedConfig.keep==="folded"))return!1}return!0}setPointTagPosition(){const e=this.filterPointTag();e.length!==0&&e.forEach(n=>{var s;if(!((s=n.state)!=null&&s.visible)){n.pointTagStyle=void 0;return}const o=this.getTagProject(n);if(!o){n.pointTagStyle=void 0;return}n.pointTagStyle={leftPercent:(o.x+1)/2*100,topPercent:(-o.y+1)/2*100}})}setVisibleByPanoIndex(){this.tags.forEach(e=>{const n=this.getVisibleByPanoIndex(e);e.state&&(e.state.visible=n)})}setUnfoldedByPanoIndex(){this.tags.forEach(e=>{const n=this.getUnfoldedByPanoIndex(e);if(!!e.state&&(n!==void 0&&(e.state.unfolded=n),n&&!e.state.visible)){const o=this.getTagConfig(e);typeof o.unfoldedConfig=="object"&&o.unfoldedConfig.autoUnfoldWhenHide!==!1&&(e.state.unfolded=!1)}})}getTagProject(e){if(!this.getVisibleByPanoIndex(e))return;const o=Mn(e.position),{x:s,y:r,z:a}=o.project(this.five.camera);if(!(a>1))return{x:s,y:r,z:a}}filterPointTag(){return this.tags.filter(e=>e.pointType===Ge.PointTag)}filterTag2D(){return this.tags.filter(e=>e.dimensionType===Xe.Two)}filter3DPointTag(){return this.tags.filter(e=>e.dimensionType===Xe.Three&&e.pointType===Ge.PointTag)}filter3DTag(){return this.tags.filter(e=>e.dimensionType===Xe.Three)}filterPlaneTag(){return this.tags.filter(e=>e.dimensionType===Xe.Three&&e.pointType===Ge.PlaneTag)}}const _a="1.2.6",Xi=`DnalogelPlugin-PanoTagPlugin@${_a}`,qg=!1,Kg=i=>`${Xi}--${i}`;class qa extends _g{constructor(e,n){super(e);h(this,"version",_a);h(this,"state",{enabled:!0,visible:!0});h(this,"params");h(this,"debug");h(this,"css3DRenderPlugin");h(this,"TagContainerSvelte");h(this,"temporaryState",{visible:!0});h(this,"mediaStore",$i({currentMediaUrl:""}));h(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});h(this,"staticUrl");h(this,"disposedErrorLog",()=>{console.error(`${Xi} is disposed`)});this.params=N({debug:!1,mergePluginDefaultConfigToLoadDataConfig:!1,config:this.config,staticConfig:{host:"vrlab-static.ljcdn.com"}},n),this.debug=this.params.debug,this.config=this.params.config,this.staticUrl=(()=>{var s;const o=this.params.staticConfig;if(typeof o=="string")return o;{const r=o.protocol?o.protocol+":":"",a=(s=o.host)!=null?s:"vrlab-static.ljcdn.com",l=o.port?":"+o.port:"";return`${r}//${a}${l}`}})(),Object.assign(window,{__PANOTAGPLUGIN_DEBUG__:this})}load(e,n){var o,s;this.clearTags(),console.log(Xi,"load:",{data:e}),this.params.mergePluginDefaultConfigToLoadDataConfig?this.config=Lt.default({},this.config,{globalConfig:(o=e.globalConfig)!=null?o:{},contentTypeConfig:(s=e.contentTypeConfig)!=null?s:{}}):(e.globalConfig&&(this.config.globalConfig=e.globalConfig),e.contentTypeConfig&&(this.config.contentTypeConfig=e.contentTypeConfig)),this.addTag(e.tagList,n),this.debug&&zm(this.five,this.tags)}addTag(e,n){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r);return fe(N({},r),{state:N({visible:void 0,unfolded:qg},a.initialState),hooks:new be.Subscribe,clickable:a.clickable})}).filter(r=>r.position);this.tags.push(...s),Mm(this.five,()=>{var r,a,l;this.store.eventListenerDisposer&&((a=(r=this.store).eventListenerDisposer)==null||a.call(r)),this.state.enabled&&(this.store.eventListenerDisposer=this.addEventListener()),this.addResizeListener(),this.checkPanelTag(),this.setVisibleAndUnfolded({withAnimation:(l=n==null?void 0:n.withAnimation)!=null?l:!0}).then(()=>this.updateRenderAllTags()),this.updateRenderAllTags()})}clearTags(){this.tags=[],this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}show(e){return J(this,null,function*(){const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({visible:!0},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("show",{userAction:n,withAnimation:o})})}hide(e){return J(this,null,function*(){const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({visible:!1},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("hide",{userAction:n,withAnimation:o})})}enable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!0},{userAction:n}),this.hooks.emit("enable",{userAction:n})}disable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!1},{userAction:n}),this.hooks.emit("disable",{userAction:n})}dispose(){var e,n,o,s,r,a;this.disposeAllCSS3DContainer(),(e=this.TagContainerSvelte)==null||e.$destroy(),this.filter3DTag().forEach(l=>{var c;return(c=l.tag3DContentSvelte)==null?void 0:c.svelteApp.$destroy()}),this.tags=[],(n=this.store.disposers)==null||n.forEach(l=>l==null?void 0:l()),this.store.disposers=[],this.store.disposed=!0,(s=(o=this.store).eventListenerDisposer)==null||s.call(o),this.store.eventListenerDisposer=void 0,(a=(r=this.store).resizeObserverDisposer)==null||a.call(r),this.store.resizeObserverDisposer=void 0,this.store.resizeObserverDisposerAdding=!1,this.clearCache(),this.hooks.emit("dispose")}setState(e,n){if(this.store.disposed)return this.disposedErrorLog();const{userAction:o=!0,visibleWithAnimation:s=!1}=n,r=N({},this.state);this.state=Object.assign(this.state,e),this.store.visibleWithAnimation=s,r.visible!==this.state.visible&&(e.visible?this.handleShow():this.handleHide()),r.enabled!==this.state.enabled&&(e.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:r,userAction:o})}changeTagNormalById(e,n){const o=this.getTagById(e);!o||!o.tag3DContentSvelte||(o.tag3DContentSvelte.currentNormal=st(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=Lt.default({},s.data,n):Object.assign(s.data,n),this.checkPanelTag(),this.updateRenderAllTags())}changeTagById(e,n,o=!0){const s=this.getTagById(e);!n||(o?Lt.default(s,n):Object.assign(s,n),(s==null?void 0:s.tag3DContentSvelte)&&(n==null?void 0:n.normal)&&(s.tag3DContentSvelte.currentNormal=st(n.normal)),this.updateRenderAllTags(),this.checkPanelTag())}destroyTagById(e){(Array.isArray(e)?e:[e]).forEach(o=>{const s=this.tags.findIndex(r=>r.id===o);s!==-1&&this.tags.splice(s,1)}),this.updateRenderAllTags()}pauseCurrentMedia(){this.mediaStore.set({currentMediaUrl:""})}setVisibleAndUnfolded(){return J(this,arguments,function*({withAnimation:e}={withAnimation:!1}){return this.setVisibleByPanoIndex(),e?new Promise((n,o)=>{setTimeout(()=>{this.setUnfoldedByPanoIndex(),n()},10)}):(this.setUnfoldedByPanoIndex(),Promise.resolve())})}handleShow(){this.state.visible=!0,this.updateTagContainerVisible()}handleHide(){this.state.visible=!1,this.updateTagContainerVisible()}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.updateRenderAllTags()}handleDisable(){var e,n,o;this.state.enabled=!1,(n=(e=this.store).eventListenerDisposer)==null||n.call(e),(o=this.TagContainerSvelte)==null||o.$set({tags:[]}),this.filter3DTag().forEach(s=>{var r;(r=s.tag3DContentSvelte)==null||r.svelteApp.$destroy(),s.tag3DContentSvelte=void 0})}addEventListener(){const{five:e,hooks:n}=this,o=this.handleFiveWantsMoveToPano.bind(this),s=this.handleFiveModeChange.bind(this),r=this.handleFiveCameraUpdate.bind(this),a=this.handleFiveCameraUpdateDebounce(),l=this.handleFivePanoArrived.bind(this),c=this.clickhandler.bind(this);return e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),n.on("click",c),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),n.off("click",c),this.store.eventListenerDisposer=void 0}}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(!this.store.disposed)return;const e=this.five.getElement(),n=()=>{!this.state.enabled||(this.show(),this.updateRenderAllTags())},o=()=>{!this.state.enabled||this.hide()},{observe:s,unobserve:r}=Rs(Bm(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=Rs(Qs(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){e==="Panorama"?this.five.once("panoArrived",()=>this.temporaryShow()):this.temporaryHide()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&n.visibleConfig.keep?e.temporaryState=fe(N({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):typeof n.visibleConfig=="object"&&n.visibleConfig.alwaysShowWhenMovePano?e.temporaryState=fe(N({},e.temporaryState),{visible:!0}):e.temporaryState=fe(N({},e.temporaryState),{visible:!1})}),this.updateRenderAllTags()}temporaryShow(){this.temporaryState.visible=!0}temporaryHide(){this.temporaryState.visible=!1}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.canBe("fold",e.tag),o=this.canBe("unfold",e.tag);n&&o&&(e.tag.state.unfolded=!e.tag.state.unfolded,e.tag.state.unfolded&&this.tags.forEach(s=>{s.id!==e.tag.id&&s.state&&this.canBe("fold",s)&&(s.state.unfolded=!1)}),this.updateRenderAllTags())}updateRenderAllTags(){this.updateRenderPointTag(),this.updateRenderPlaneTag()}updateTagContainerVisible(){var e;(e=this.TagContainerSvelte)==null||e.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation}),this.filter3DTag().forEach(n=>{var o;(o=n.tag3DContentSvelte)==null||o.svelteApp.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation})})}handleFiveCameraUpdateDebounce(){return Qs(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return J(this,null,function*(){yield this.setVisibleAndUnfolded(),this.tags.forEach(e=>{e.temporaryState=fe(N({},e.temporaryState),{visible:!0})}),this.updateRenderAllTags()})}setUnfoldedByCamera(){let e=!1;this.tags.forEach(n=>{const o=this.getUnfoldedByCamera(n);!n.state||o!==void 0&&(o===!0&&(e=!0),n.state.unfolded=o)}),e&&this.tags.forEach(n=>{const o=this.getTagConfig(n).unfoldedConfig;typeof o=="object"&&(o.autoUnfold||o.disableFold||o.keep)||n.state&&(n.state.unfolded=!1)})}updateRenderPointTag(){var n;const e=this.filterPointTag();if(this.setPointTagPosition(),this.TagContainerSvelte)this.TagContainerSvelte.$set({tags:e,state:this.state,temporaryState:this.temporaryState});else{const o=(n=this.five.getElement())==null?void 0:n.parentElement;if(!o)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new Vg({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore}})}}updateRenderPlaneTag(){[...this.filterPlaneTag(),...this.filter3DPointTag()].forEach(n=>{var o;if(n.tag3DContentSvelte){const{svelteApp:s,domContainer:r,initialNormal:a,currentNormal:l}=n.tag3DContentSvelte;if(s.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!a.equals(l)){const c=new F.Quaternion().setFromUnitVectors(a,l);r.css3DObject.setRotationFromQuaternion(c)}}else{if(((o=n.state)==null?void 0:o.visible)===!1)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=Kt(this.five)),n.pointType===Ge.PointTag&&!n.normal)return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");const s=n.pointType===Ge.PlaneTag?n.position:Tm(this.five.camera.position,st(n.position),st(n.normal)),r=n.pointType===Ge.PlaneTag?Na(n.position):st(n.normal),a=this.getTagConfig(n).tag3DConfig,l=this.css3DRenderPlugin.create3DDomContainer(s,a);if(!l)return;this.store.css3DRenderDisposer.set(n.id,l.dispose),n.tag3DContentSvelte={svelteApp:new Za({target:l.container,props:{tag:n,hooks:this.hooks,state:this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}}),domContainer:l,initialNormal:r,currentNormal:r}}}),this.checkPanelTag()}disposeAllCSS3DContainer(){for(const[e,n]of this.store.css3DRenderDisposer)n==null||n();this.store.css3DRenderDisposer=new Map}checkPanelTag(){this.tags.forEach(e=>{var n;e.dimensionType===Xe.Two&&e.pointType===Ge.PointTag&&((n=e.tag3DContentSvelte)==null||n.domContainer.dispose(),e.tag3DContentSvelte=void 0)});for(const[e,n]of this.store.css3DRenderDisposer){const o=this.getTagById(e);(!o||o.dimensionType!==Xe.Three)&&(n==null||n(),this.store.css3DRenderDisposer.delete(e))}}}const $g=(i,t)=>new qa(i,t);class co extends F.Object3D{constructor(e,n){var o;super();h(this,"originObject3D");h(this,"onRender");this.originObject3D=e,this.onRender=(o=n==null?void 0:n.onRender)!=null?o:()=>{}}get helperObject(){return this}render(){this.onRender()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}updatePosition(){this.position.copy(this.originObject3D.position)}updateQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,n){this.scale.applyMatrix4(e)}applyHelperQuaternion(e,n){this.applyQuaternion(e)}}class e0 extends co{}class t0 extends co{}class n0 extends co{}class i0 extends n0{}class o0 extends E.Group{constructor(e){super();h(this,"direction");this.direction=e||"x"}}class Rr extends E.Mesh{constructor(e,n,o){super(e,n);h(this,"direction");this.direction=o||"x"}}function s0(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new E.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function uo(i,t,e){if(!t||!e||!i)return;const n=s0(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new E.Raycaster;return o.setFromCamera(n,i),o}function r0(i,t){return!(Math.abs(i.x-t.x)>1e-5||Math.abs(i.y-t.y)>1e-5||Math.abs(i.z-t.z)>1e-5)}class Ii extends o0{constructor(e){var u;super(e.direction);h(this,"line");h(this,"arrow");h(this,"lineHeight",.4);h(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new E.Color((u=e.color)!=null?u:16214315),o=new E.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:E.DoubleSide}),s=new E.ConeGeometry(.04,.1,32),r=new Rr(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new E.CylinderGeometry(a,a,.4,32),c=new Rr(l,o.clone(),e.direction);c.name=`line-${e.direction}`,this.line=c,this.formatArrow(),this.formatLine(),this.add(this.arrow,this.line)}formatArrow(){this.arrow.geometry.translate(0,this.lineHeight+this.arrowHeight/2,0),this.direction==="x"?(this.arrow.geometry.rotateX(Math.PI/2),this.arrow.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.arrow.geometry.rotateX(Math.PI/2)}formatLine(){this.line.geometry.translate(0,this.lineHeight/2,0),this.direction==="x"?(this.line.geometry.rotateX(Math.PI/2),this.line.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.line.geometry.rotateX(Math.PI/2)}}const xi={X:15618642,Y:4765519,Z:4227839};class ot{static get X(){return new E.Color(xi.X).convertSRGBToLinear().clone()}static get Y(){return new E.Color(xi.Y).convertSRGBToLinear().clone()}static get Z(){return new E.Color(xi.Z).convertSRGBToLinear().clone()}}class a0 extends e0{constructor(e){super(e);h(this,"xArrow",new Ii({direction:"x",color:ot.X}));h(this,"yArrow",new Ii({direction:"y",color:ot.Y}));h(this,"zArrow",new Ii({direction:"z",color:ot.Z}));this.add(this.xArrow),this.add(this.yArrow),this.add(this.zArrow)}show(){super.show(),this.xArrow.visible=!0,this.yArrow.visible=!0,this.zArrow.visible=!0}showDraggingHelper(e){this.xArrow.visible=e.includes("x"),this.yArrow.visible=e.includes("y"),this.zArrow.visible=e.includes("z")}dispose(){this.remove(this.xArrow,this.yArrow,this.zArrow)}}function Mt(i,t){return l0(document.createElement(t!=null?t:"div"),i)}function l0(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function c0(i){const t=Mt(N({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"9999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},i)),e=()=>{t.style.display!=="block"&&(!t.style.top||!t.style.left||(t.style.display="block"))};return{element:t,show:e,hide:()=>{t.style.display="none",t.style.top="",t.style.left=""},setLeftTop:(s,r)=>{t.style.left=s,t.style.top=r,e()}}}class u0 extends t0{constructor(e,n){var o;super(e);h(this,"yzCircle",new ki({direction:"x",color:ot.X}));h(this,"xzCircle",new ki({direction:"y",color:ot.Y}));h(this,"xyCircle",new ki({direction:"z",color:ot.Z}));h(this,"xRingHelper",new Di({direction:"x"}));h(this,"yRingHelper",new Di({direction:"y"}));h(this,"zRingHelper",new Di({direction:"z"}));h(this,"xAngleHelper",new Li({direction:"x",color:ot.X}));h(this,"yAngleHelper",new Li({direction:"y",color:ot.Y}));h(this,"zAngleHelper",new Li({direction:"z",color:ot.Z}));h(this,"angleTips");h(this,"container");n&&(this.container=n==null?void 0:n.container,this.angleTips=c0({display:"none"}),(o=this.container)==null||o.appendChild(this.angleTips.element)),this.show()}updateAngleHelperQuaternion(){this.xAngleHelper.quaternion.copy(this.yzCircle.quaternion),this.yAngleHelper.quaternion.copy(this.xzCircle.quaternion),this.zAngleHelper.quaternion.copy(this.xyCircle.quaternion),this.xRingHelper.quaternion.copy(this.yzCircle.quaternion),this.yRingHelper.quaternion.copy(this.xzCircle.quaternion),this.zRingHelper.quaternion.copy(this.xyCircle.quaternion)}applyHelperQuaternion(e,n){this.yzCircle.applyQuaternion(e),this.xzCircle.applyQuaternion(e),this.xyCircle.applyQuaternion(e),this.xAngleHelper.baseAxes.applyQuaternion(e),this.yAngleHelper.baseAxes.applyQuaternion(e),this.zAngleHelper.baseAxes.applyQuaternion(e)}hide(){this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper)}show(){var e;this.add(this.xyCircle,this.xzCircle,this.yzCircle),this.remove(this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)==null||e.hide()}showDraggingHelper(e){var n;this.hide(),this.add(...this.filterRingHelper(e)),this.add(...this.filterAngleHelper(e)),(n=this.angleTips)==null||n.show()}dispose(){var e,n;this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)!=null&&e.element&&((n=this.container)==null||n.removeChild(this.angleTips.element))}filterRingHelper(e){return[this.xRingHelper,this.yRingHelper,this.zRingHelper].filter(n=>e.includes(n.direction))}filterAngleHelper(e){return[this.xAngleHelper,this.yAngleHelper,this.zAngleHelper].filter(n=>e.includes(n.direction))}}class ki extends E.Mesh{constructor(e){var n;super();h(this,"direction");h(this,"gapAngle",.02);h(this,"geometry",new E.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new E.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:E.DoubleSide,depthTest:!1}),this.direction=e.direction,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}class Di extends E.Group{constructor(e){super();h(this,"direction");this.direction=e.direction;const n=.015,o=new Array(8).fill(null).map((s,r)=>{const a=new E.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new E.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:E.DoubleSide}),c=new E.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...o),this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}class Li extends E.Mesh{constructor(e){var o;super();h(this,"direction");h(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new E.Vector3(0,0,1);break;case"y":this.baseAxes=new E.Vector3(1,0,0);break;case"z":this.baseAxes=new E.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new E.CircleGeometry(n,48,0,1e-4),this.material=new E.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:E.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function d0(){const i=Mt({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Mt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Mt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});i.appendChild(t),t.appendChild(e);const n="-4px",o={direction:"nesw",element:dt({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:dt({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:dt({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:dt({cursor:"ew-resize",right:n})},l={direction:"nesw",element:dt({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:dt({cursor:"ns-resize",top:n})},u={direction:"nwse",element:dt({cursor:"nwse-resize",left:n,top:n})},f={direction:"ew",element:dt({cursor:"ew-resize",left:n})};return new Array(s,a,c,f,o,r,l,u).forEach(p=>t.appendChild(p.element)),{container:i,squares:[o,s,r,a,l,c,u,f]}}function dt(i){const t=Mt(N({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=Mt({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=Mt({width:"15px",height:"15px",cursor:i==null?void 0:i.cursor,pointerEvents:"auto",background:"transparent"});return n.draggable=!0,e.appendChild(n),t.appendChild(e),t}class f0 extends i0{constructor(e,n,o,s){super(e);h(this,"points",[]);h(this,"cornerPositions",[]);h(this,"css3DInstance");h(this,"plane");h(this,"css3DRenderer",new Vt);h(this,"camera");h(this,"scene");h(this,"container");h(this,"enabled",!1);this.camera=o,this.scene=s,this.container=n,this.initRectangleScaleHelper()}get helperObject(){var e;if(!((e=this.css3DInstance)!=null&&e.css3DObject))throw new Error("css3DInstance is not initialized");return this.css3DInstance.css3DObject}updatePosition(){var e;this.helperObject.position.copy(this.originObject3D.position),(e=this.plane)==null||e.position.copy(this.originObject3D.position)}updateQuaternion(){var e;(e=this.plane)==null||e.quaternion.copy(this.originObject3D.quaternion)}applyMatrix4(e){var n;super.applyMatrix4(e),this.helperObject.applyMatrix4(e),(n=this.plane)==null||n.applyMatrix4(e),this.cornerPositions.forEach(o=>o.applyMatrix4(e))}showDraggingHelper(){}applyHelperScaleMatrix4(e,n){var o;(o=this.plane)==null||o.scale.applyMatrix4(e),this.helperObject.applyScaleMatrix4(e)}updatePoints(){const e=this.calculatePointPosition(this.cornerPositions);this.points.forEach((n,o)=>{n.position.copy(e[o])})}applyHelperQuaternion(e,n){var s;const o=(s=this.css3DInstance)==null?void 0:s.css3DObject;if(o){const r=new E.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new E.Vector3().subVectors(this.plane.position,n).applyQuaternion(e).add(n);this.plane.position.copy(r),this.plane.applyQuaternion(e)}this.cornerPositions.forEach(r=>{const a=new E.Vector3().subVectors(r,n).applyQuaternion(e).add(n);r.copy(a)})}enable(){var e;this.enabled||(this.enabled=!0,(e=this.css3DInstance)==null||e.enable(),this.plane&&this.scene.add(this.plane))}disable(){var e;!this.enabled||(this.enabled=!1,(e=this.css3DInstance)==null||e.disable(),this.plane&&this.scene.remove(this.plane))}show(){var e;(e=this.css3DInstance)==null||e.show(),this.plane&&(this.plane.visible=!0)}hide(){var e;(e=this.css3DInstance)==null||e.hide(),this.plane&&(this.plane.visible=!1)}dispose(){this.disable(),this.css3DRenderer.dispose()}initRectangleScaleHelper(){var u;const e=this.getCornerPositions();if(!e)return;this.cornerPositions=e;const n=this.css3DRenderer.create3DElement(this.camera,e,{ratio:.003});if(!n)return;this.css3DInstance=n,n.appendToElement(this.container);const o=n.css3DObject.container,{container:s,squares:r}=d0();this.points=r.map((f,d)=>({direction:f.direction,point:f.element,position:this.calculatePointPosition(e)[d]})),o.insertBefore(s,(u=o.children[0])!=null?u:null);const a=new E.PlaneGeometry(n.css3DObject.width,n.css3DObject.height),l=new E.MeshBasicMaterial({color:0,opacity:.15,transparent:!0,side:E.DoubleSide}),c=new E.Mesh(a,l);this.scene.add(c),this.updatePosition()}getCornerPositions(){const{originObject3D:e}=this;if(e instanceof un.CSS3DObject){if(e.isCSS3DObjectPlus)return e.cornerPoints;console.error("\u6682\u65F6\u53EA\u652F\u6301 CSS3DRenderPlugin \u751F\u6210\u7684\u7269\u4F53")}else console.error("\u5F53\u524D\u7269\u4F53\u6682\u65F6\u4E0D\u652F\u6301 ScaleHelper")}calculatePointPosition(e){return[e[0].clone(),e[0].clone().add(e[1]).divideScalar(2),e[1].clone(),e[1].clone().add(e[2]).divideScalar(2),e[2].clone(),e[2].clone().add(e[3]).divideScalar(2),e[3].clone(),e[3].clone().add(e[0]).divideScalar(2)]}}new E.Vector3;function pe(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new E.Raycaster,this._selected=null,this._boundObjs={};var e=this;this._$onClick=function(){e._onClick.apply(e,arguments)},this._$onDblClick=function(){e._onDblClick.apply(e,arguments)},this._$onMouseMove=function(){e._onMouseMove.apply(e,arguments)},this._$onMouseDown=function(){e._onMouseDown.apply(e,arguments)},this._$onMouseUp=function(){e._onMouseUp.apply(e,arguments)},this._$onTouchMove=function(){e._onTouchMove.apply(e,arguments)},this._$onTouchStart=function(){e._onTouchStart.apply(e,arguments)},this._$onTouchEnd=function(){e._onTouchEnd.apply(e,arguments)},this._$onContextmenu=function(){e._onContextmenu.apply(e,arguments)},this._domElement.addEventListener("click",this._$onClick,!1),this._domElement.addEventListener("dblclick",this._$onDblClick,!1),this._domElement.addEventListener("mousemove",this._$onMouseMove,!1),this._domElement.addEventListener("mousedown",this._$onMouseDown,!1),this._domElement.addEventListener("mouseup",this._$onMouseUp,!1),this._domElement.addEventListener("touchmove",this._$onTouchMove,!1),this._domElement.addEventListener("touchstart",this._$onTouchStart,!1),this._domElement.addEventListener("touchend",this._$onTouchEnd,!1),this._domElement.addEventListener("contextmenu",this._$onContextmenu,!1)}pe.prototype.destroy=function(){this._domElement.removeEventListener("click",this._$onClick,!1),this._domElement.removeEventListener("dblclick",this._$onDblClick,!1),this._domElement.removeEventListener("mousemove",this._$onMouseMove,!1),this._domElement.removeEventListener("mousedown",this._$onMouseDown,!1),this._domElement.removeEventListener("mouseup",this._$onMouseUp,!1),this._domElement.removeEventListener("touchmove",this._$onTouchMove,!1),this._domElement.removeEventListener("touchstart",this._$onTouchStart,!1),this._domElement.removeEventListener("touchend",this._$onTouchEnd,!1),this._domElement.removeEventListener("contextmenu",this._$onContextmenu,!1)};pe.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"];pe.prototype._getRelativeMouseXY=function(i){var t=i.target||i.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},n=t,o=getComputedStyle(n,null);e.y+=parseInt(o.getPropertyValue("padding-top"),10),e.x+=parseInt(o.getPropertyValue("padding-left"),10);do e.x+=n.offsetLeft,e.y+=n.offsetTop,o=getComputedStyle(n,null),e.x+=parseInt(o.getPropertyValue("border-left-width"),10),e.y+=parseInt(o.getPropertyValue("border-top-width"),10);while(n=n.offsetParent);var s={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((i.pageX-e.x)/s.width)*2-1,y:-((i.pageY-e.y)/s.height)*2+1}};pe.prototype._objectCtxInit=function(i){i._3xDomEvent={}};pe.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent};pe.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent};pe.prototype._objectCtxGet=function(i){return i._3xDomEvent};pe.prototype.camera=function(i){return i&&(this._camera=i),this._camera};pe.prototype.bind=function(i,t,e,n){console.assert(pe.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]),o[t+"Handlers"].push({callback:e,useCapture:n}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(i)};pe.prototype.addEventListener=pe.prototype.bind;pe.prototype.unbind=function(i,t,e,n){console.assert(pe.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]);for(var s=o[t+"Handlers"],r=0;r<s.length;r++){var a=s[r];if(e==a.callback&&n==a.useCapture){s.splice(r,1);break}}var l=this._boundObjs[t].indexOf(i);console.assert(l!==-1),this._boundObjs[t].splice(l,1)};pe.prototype.removeEventListener=pe.prototype.unbind;pe.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1};pe.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new E.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o),a=this._selected;if(r.length>0){var l,c,u,f=r[0],d=f.object;this._selected=d,u=this._bound("mousemove",d),a!=d&&(l=this._bound("mouseover",d),c=a&&this._bound("mouseout",a))}else c=a&&this._bound("mouseout",a),this._selected=null;u&&this._notify("mousemove",d,n,f),l&&this._notify("mouseover",d,n,f),c&&this._notify("mouseout",a,n,f)}};pe.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new E.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o,!0);if(r.length!==0){for(var a=r[0],l=a.object,c=this._objectCtxGet(l),u=l.parent;typeof c=="undefined"&&u;)c=this._objectCtxGet(u),u=u.parent;!c||this._notify(i,l,n,a)}}};pe.prototype._notify=function(i,t,e,n){var o=this._objectCtxGet(t),s=o?o[i+"Handlers"]:null;if(console.assert(arguments.length===4),!o||!s||s.length===0){t.parent&&this._notify(i,t.parent,e,n);return}for(var s=o[i+"Handlers"],r=0;r<s.length;r++){var a=s[r],l=!0;a.callback({type:i,target:t,origDomEvent:e,intersect:n,stopPropagation:function(){l=!1}}),!!l&&a.useCapture===!1&&t.parent&&this._notify(i,t.parent,e,n)}};pe.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)};pe.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)};pe.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)};pe.prototype._onMouseMove=function(i){var t=this._getRelativeMouseXY(i);this._onMove("mousemove",t.x,t.y,i),this._onMove("mouseover",t.x,t.y,i),this._onMove("mouseout",t.x,t.y,i)};pe.prototype._onClick=function(i){this._onMouseEvent("click",i)};pe.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)};pe.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)};pe.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)};pe.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)};pe.prototype._onTouchMove=function(i){if(i.touches.length==1){i.preventDefault();var t=Number(i.touches[0].pageX/window.innerWidth)*2-1,e=-(i.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,i),this._onMove("mouseover",t,e,i),this._onMove("mouseout",t,e,i)}};pe.prototype._onTouchEvent=function(i,t){if(t.touches.length==1){t.preventDefault();var e=Number(t.touches[0].pageX/window.innerWidth)*2-1,n=-(t.touches[0].pageY/window.innerHeight)*2+1;this._onEvent(i,e,n,t)}};let Pt=null;class fo{constructor(t,e,n,o,s,r,a){h(this,"hooks",new qt);h(this,"helperObject3D");h(this,"originObject3D");h(this,"camera");h(this,"model");h(this,"scene");h(this,"container");h(this,"domEvents");h(this,"isDragging",!1);h(this,"onRender");h(this,"enabled",!1);h(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});this.camera=t,this.model=e,this.originObject3D=n,this.helperObject3D=o,this.container=s,this.scene=r,this.domEvents=new pe(t,s),this.onRender=a!=null?a:()=>{},this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable()}initialHelperPosition(){this.helperObject3D.updatePosition()}initialHelperQuaternion(){this.helperObject3D.updateQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.render())}disable(){!this.enabled||(this.enabled=!1,this.scene.remove(this.helperObject3D),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){this.helperObject3D.dispose(),this.scene.remove(this.helperObject3D),this.render()}setOpacity(t){this.setOriginOpacityProperty();const e=this.originObject3D;if(e instanceof E.Mesh&&(e.material.opacity=t),e.isCSS3DObjectPlus){const n=e;n.container.style.opacity=t.toString()}this.render()}restoreOpacity(){if(Pt===null)return;const t=this.originObject3D;if(t instanceof E.Mesh&&(t.material.opacity=Pt.opacity),t.isCSS3DObjectPlus){const e=t;e.container.style.opacity=Pt.opacity.toString()}this.render()}setOriginOpacityProperty(){var t,e;if(Pt===null){const n=this.originObject3D;n instanceof E.Mesh&&(Pt={opacity:n.material.opacity}),n instanceof Yr&&(Pt={opacity:(t=n.container.style.opacity)!=null?t:1}),n.isCSS3DObjectPlus&&(Pt={opacity:Number((e=n.container.style.opacity)!=null?e:1)})}}updateHelperPosition(){this.helperObject3D.updatePosition()}updateHelperQuaternion(){this.helperObject3D.updateQuaternion()}applyHelperMatrix4(t){this.helperObject3D.applyMatrix4(t)}applyHelperQuaternion(t,e){this.helperObject3D.applyHelperQuaternion(t,e)}applyHelperScaleMatrix4(t,e){this.helperObject3D.applyHelperScaleMatrix4(t,e)}onWantsGesture(t,e,n){if(this.isDragging)return!1}render(){this.onRender()}hoverListener(t,e=16777215,n=1){const o=(Array.isArray(t)?t:[t]).filter(Bt),s=[];for(const r of o)if(r instanceof E.Mesh||r instanceof E.Group){const a=r instanceof E.Group?r.children.filter(d=>d instanceof E.Mesh):[r];a.forEach(d=>{d.__originalColor__=d.material.color.clone(),d.__originalOpacity__=d.material.opacity});const l=()=>{a.forEach(d=>{d.material.color.set(e),d.material.opacity=n}),this.render()},c=()=>{a.forEach(d=>{d.material.color.copy(d.__originalColor__),d.material.opacity=d.__originalOpacity__}),this.render()},u=()=>{this.isDragging||l()},f=()=>{this.isDragging||c()};for(const d of a)this.domEvents.addEventListener(d,"mouseover",u),this.domEvents.addEventListener(d,"mouseout",f),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),s.push(()=>{this.domEvents.removeEventListener(d,"mouseover",u),this.domEvents.removeEventListener(d,"mouseout",f),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c)})}return()=>s.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,n=this.helperObject3D;if(!n)return;let o;const s=t.intersectObject(n,!0)[0];if(!!s&&(o=s,o.object=n,!!o)){if(this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<o.point.distanceTo(e))return}return o.object}}}class h0 extends fo{constructor(...e){super(...e);h(this,"startInfo");const n=this.helperObject3D;this.hoverListener([n.xArrow,n.yArrow,n.zArrow]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();const s=new E.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new E.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new E.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(o){case"x":return s;case"y":return r;case"z":return a}})(),c=(()=>{switch(o){case"x":case"y":return a;case"z":return s}})(),u=n.point.clone(),f=new E.Plane;f.setFromNormalAndCoplanarPoint(c,u),this.startInfo={startVectorProject:u.clone().projectOnVector(l),directionVector:l,plane:f},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("moveStart"),this.isDragging=!0,console.log("%c MoveController dragStart","color: #e5af2e")}dragging(e){if(!this.isDragging||!this.startInfo)return;const n=uo(this.camera,e,this.container);return n?(console.log("%c RotateController dragging","color: #49de1b"),this.move(n),!1):this.dragEnd()}move(e){if(!this.startInfo)return this.dragEnd();const{plane:n,directionVector:o,startVectorProject:s}=this.startInfo,r=this.originObject3D,a=e.ray.intersectPlane(n,new E.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),u=new E.Matrix4;u.setPosition(c),r.applyMatrix4(u),this.helperObject3D.applyMatrix4(u),s.copy(l),this.hooks.emit("positionUpdate",{matrix4:u})}dragEnd(){!this.isDragging||(console.log("%c MoveController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class Si{constructor(t,e,n,o){h(this,"helperController");h(this,"five");h(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});h(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});const{camera:s,model:r,scene:a}=t,l=t.getElement();if(this.five=t,!s||!r||!l||!a)return;const c=()=>{t.needsRender=!0};this.helperController=new e(s,r,n,o,l,a,c),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture)}}const m0="v1.0.1",p0="Object3DHelper",ho=`${p0}@${m0}`,g0=()=>{console.error(`${ho} is disposed`)},A0=()=>{console.warn(`${ho} is disabled`)},v0=()=>{console.error(`${ho} is disabled`)};class b0{constructor(t,e){h(this,"controllers",{});h(this,"state",{visible:!0,enabled:!0,disposed:!1});h(this,"hooks",new qt);h(this,"helpers");h(this,"eventListener",{});h(this,"handlePositionUpdate",(t,...e)=>{var s,r,a,l;const[n]=e,o=n==null?void 0:n.matrix4;o&&(t!==this.controllers.moveController&&((s=this.controllers.moveController)==null||s.applyHelperMatrix4(o)),t!==this.controllers.rotateController&&((r=this.controllers.rotateController)==null||r.applyHelperMatrix4(o)),t!==this.controllers.scaleController&&((a=this.controllers.scaleController)==null||a.applyHelperMatrix4(o)),(l=this.helpers.outlineHelper)==null||l.applyMatrix4(o))});h(this,"handleScaleUpdate",(t,...e)=>{var s,r;const[n]=e,o=n==null?void 0:n.matrix4;o&&((s=this.controllers.scaleController)==null||s.applyHelperScaleMatrix4(o,n),(r=this.helpers.outlineHelper)==null||r.scale.applyMatrix4(o))});h(this,"handleRotateUpdate",(t,...e)=>{var o,s,r,a;const[n]=e;if(n){const{quaternion:l,origin:c}=n;l&&(t!==this.controllers.moveController&&((o=this.controllers.moveController)==null||o.applyHelperQuaternion(l,c)),t!==this.controllers.rotateController&&((s=this.controllers.rotateController)==null||s.applyHelperQuaternion(l,c)),t!==this.controllers.scaleController&&((r=this.controllers.scaleController)==null||r.applyHelperQuaternion(l,c)),(a=this.helpers.outlineHelper)==null||a.applyQuaternion(l))}});t&&this.addControllers(t),this.helpers=e!=null?e:{},this.setState(this.state)}show(t){return J(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return J(this,null,function*(){this.setState({visible:!1},t)})}enable(t){this.setState({enabled:!0},t)}disable(t){this.setState({enabled:!1},t)}dispose(){this.setState({disposed:!0})}setState(t,e){if(this.state.disposed)return g0();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return v0();const n=N({},this.state);this.state=N(N({},this.state),t),t.disposed!==void 0&&t.disposed!==n.disposed&&t.disposed&&this.handleDispose(),t.visible!==void 0&&this.handleVisible(t.visible),t.enabled!==void 0&&this.handleEnable(t.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:n})}addControllers(t){this.controllers=N(N({},this.controllers),t),this.addEventListener(),this.setState(this.state)}addHelpers(t){this.helpers=N(N({},this.helpers),t)}getCurrentState(){return this.state}addEventListener(){for(const t in this.controllers){if(!t)continue;const e=t;this.eventListener[e]||(this.eventListener[e]=(()=>{const n=this.controllers[e];if(!n)return;const o=()=>this.handleStart(n),s=()=>this.handleEnd(n),r=(...c)=>this.handlePositionUpdate(n,...c),a=(...c)=>this.handleRotateUpdate(n,...c),l=(...c)=>this.handleScaleUpdate(n,...c);return n.hooks.on("moveStart",o),n.hooks.on("rotateStart",o),n.hooks.on("scaleStart",o),n.hooks.on("positionUpdate",r),n.hooks.on("rotateUpdate",a),n.hooks.on("scaleUpdate",l),n.hooks.on("moveEnd",s),n.hooks.on("rotateEnd",s),n.hooks.on("scaleEnd",s),()=>{n.hooks.off("moveStart",o),n.hooks.off("rotateStart",o),n.hooks.off("scaleStart",o),n.hooks.off("positionUpdate",r),n.hooks.off("rotateUpdate",a),n.hooks.off("scaleUpdate",l),n.hooks.off("moveEnd",s),n.hooks.off("rotateEnd",s),n.hooks.off("scaleEnd",s)}})())}}handleEnd(t){t&&this.setOtherHelpersVisible(!0,t)}handleStart(t){t&&this.setOtherHelpersVisible(!1,t)}setOtherHelpersVisible(t,e){var n,o,s,r;t?((s=this.controllers.moveController)==null||s.helperObject3D.show(),(r=this.controllers.rotateController)==null||r.helperObject3D.show()):(e!==this.controllers.moveController&&((n=this.controllers.moveController)==null||n.helperObject3D.hide()),e!==this.controllers.rotateController&&((o=this.controllers.rotateController)==null||o.helperObject3D.hide()))}handleEnable(t,e=!0){t?(this.everyControllerDo(n=>{n.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(n=>{n.disable(),n.restoreOpacity()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(n=>{n.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(n=>{n.hide(),n.restoreOpacity()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:e}))),this.state.visible=t}everyControllerDo(t){Object.values(this.controllers).forEach(e=>{e&&t(e)})}handleDispose(){var t,e;Object.values(this.controllers).forEach(n=>{n==null||n.dispose(),n==null||n.restoreOpacity()});for(const n in this.controllers){if(!n)continue;const o=n;(e=(t=this.eventListener)[o])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&A0()}}class y0 extends fo{constructor(...e){super(...e);h(this,"startInfo");h(this,"lastRotation");h(this,"rotations",[]);h(this,"helperObject3DQuaternion",this.originObject3D.quaternion.clone());const n=this.helperObject3D;this.hoverListener([n.xyCircle,n.xzCircle,n.yzCircle]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}initialHelperQuaternion(){this.helperObject3D.updateAngleHelperQuaternion(),this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();this.helperObject3D.updateAngleHelperQuaternion();const s=n.point,r=this.originObject3D.position.clone(),a=this.getAngleHelper(o);this.setTipsAngle(0);const l=s.clone();l.y+=.2,this.setTipsPosition(l);const c=new E.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),u=new E.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),f=new E.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),d=(()=>{switch(o){case"x":return c;case"y":return u;case"z":return f}})(),p=new E.Plane().setFromNormalAndCoplanarPoint(d,s),m=new E.Vector3;p.projectPoint(s.clone(),m);const g=m.clone().sub(r),A=g.clone(),v=g.angleTo(a.baseAxes);this.setAngleHelperStart(o,v),this.setAngleHelperLength(o,0),this.rotations.push({vector:g.clone(),direction:!0}),this.startInfo={direction:o,startVector:g,staticStartVector:A,plane:p,angleHelper:a},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("rotateStart"),this.isDragging=!0,console.log(`%c RotateController dragStart ${o}`,"color: #e5af2e")}dragging(e){var o;if(!this.isDragging)return;const n=uo(this.camera,e,this.container);return n?(console.log(`%c RotateController dragging ${(o=this.startInfo)==null?void 0:o.direction}`,"color: #49de1b"),this.rotate(n),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:n,plane:o,angleHelper:s,staticStartVector:r,direction:a}=this.startInfo,l=this.originObject3D,c=e.ray.intersectPlane(o,new E.Vector3);if(!c)return;const u=l.position.clone(),f=new E.Vector3;o.projectPoint(c.clone(),f);const d=f.clone().sub(u);if(n.angleTo(d)===0||(this.lastRotation===void 0&&(this.lastRotation={angle:0}),this.rotations.length===0))return;const p=(()=>{if(this.rotations.length===1)return d.angleTo(s.baseAxes)>r.angleTo(s.baseAxes);{const g=this.rotations[this.rotations.length-1],A=this.rotations[this.rotations.length-2],v=d.angleTo(A.vector),C=d.angleTo(g.vector),w=g.vector.angleTo(A.vector);if(w===0||C===0||v===0)return;if(v>C&&v>w)return g.direction;if(v<w&&C<w||v<C&&C>w)return!g.direction}})();if(p===void 0)return console.warn("rotationDirection is undefined");this.rotations.push({vector:d,direction:p}),this.rotations=this.rotations.slice(-2),this.lastRotation.angle=this.lastRotation.angle+d.angleTo(n)*(p?1:-1),this.setAngleHelperLength(a,this.lastRotation.angle),this.setTipsAngle(this.lastRotation.angle/Math.PI*180);const m=new E.Quaternion().setFromUnitVectors(n.clone().normalize(),d.clone().normalize());l.applyQuaternion(m),this.helperObject3D.applyHelperQuaternion(m),this.helperObject3DQuaternion.premultiply(m),this.hooks.emit("rotateUpdate",{quaternion:m,origin:u}),this.startInfo.startVector=d}dragEnd(){!this.isDragging||(console.log("%c RotateController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.lastRotation=void 0,this.rotations=[],this.helperObject3D.show(),this.hooks.emit("rotateEnd"))}getAngleHelper(e){switch(e){case"x":return this.helperObject3D.xAngleHelper;case"y":return this.helperObject3D.yAngleHelper;case"z":return this.helperObject3D.zAngleHelper}}setAngleHelperStart(e,n){const o=this.getAngleHelper(e);if(o instanceof E.Mesh&&o.geometry instanceof E.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new E.CircleGeometry(s,r,n,a)}else console.warn("only support THREE.CircleGeometry")}setAngleHelperLength(e,n){const s=n>=0?Math.max(n,.001):Math.min(n,-.001),r=this.getAngleHelper(e);if(r instanceof E.Mesh&&r.geometry instanceof E.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new E.CircleGeometry(a,c,l,s)}else console.warn("only support THREE.CircleGeometry")}setTipsAngle(e){var o;const n=(o=this.helperObject3D.angleTips)==null?void 0:o.element;!n||(n.innerText=`${e.toFixed(0)}\xB0`)}setTipsPosition(e){const n=this.helperObject3D.angleTips;if(!n)return;const o=e.project(this.camera),{x:s,y:r,z:a}=o;if(a>1)return;const l=(s+1)/2*100+"%",c=(-r+1)/2*100+"%";n.setLeftTop(l,c)}}class w0 extends fo{constructor(...e){super(...e);h(this,"startInfo")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}getDragPlane(){const e=new E.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new F.Vector3),n[0]):e.setFromCoplanarPoints(n[0],n[1],n[2]),e}dragStart(e,n){var s,r;(r=(s=this.helperObject3D).updatePoints)==null||r.call(s);const o=this.getDragPlane();if(!o)return this.dragEnd();this.startInfo={startPoint:{position:n.position.clone(),direction:n.direction},plane:o},this.hooks.emit("scaleStart"),this.render(),this.isDragging=!0,console.log("%c RectangleScaleController dragStart","color: #e5af2e")}dragging(e){if(!this.isDragging)return;const n=uo(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n),console.log("%c RectangleScaleController dragging","color: #49de1b")}scale(e){var j,B;if(!this.startInfo)return;const n=this.originObject3D,{startPoint:o,plane:s}=this.startInfo,r=this.helperObject3D.cornerPositions;if(r.length<4)return this.dragEnd();const a=e.ray.intersectPlane(s,new F.Vector3);if(!a||r0(a,this.camera.position))return;const l=new F.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:u}=o,f=new F.Vector3().subVectors(r[1],r[0]),d=new F.Vector3().subVectors(r[3],r[0]),p=G=>{const U=new F.Vector3(0,0,0);if(!this.startInfo)return U;const I=(G==="ew"?f:d).clone(),S=c.clone().projectOnVector(I),R=a.clone().projectOnVector(I),W=l.clone().projectOnVector(I);if(R.equals(S))return U;if(G==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const X=new F.Vector3().subVectors(R,W),V=X.x<0&&I.x>=0,ue=X.y<0&&I.y>=0,de=X.z<0&&I.z>=0;this.startInfo.dragPointInCenterBottom=V||ue||de}if(G==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const X=new F.Vector3().subVectors(R,W),V=X.x<0&&I.x>=0,ue=X.y<0&&I.y>=0,de=X.z<0&&I.z>=0;this.startInfo.dragPointInCenterLeft=V||ue||de}const Y=new F.Vector3().subVectors(R,S),ne=Y.length();return ne>.3?(console.warn("offset.length() > 0.3, skipped",ne),U):Y},m=p("ew"),g=p("ns"),A=()=>{const G=m;this.helperObject3D.cornerPositions.forEach((U,I)=>{var S;(S=this.startInfo)!=null&&S.dragPointInCenterLeft?(I===0||I===3)&&U.add(G):(I===1||I===2)&&U.add(G)})},v=()=>{const G=g;this.helperObject3D.cornerPositions.forEach((U,I)=>{var S;(S=this.startInfo)!=null&&S.dragPointInCenterBottom?(I===0||I===1)&&U.add(G):(I===2||I===3)&&U.add(G)})};switch(u){case"ew":A();break;case"ns":v();break;case"nesw":case"nwse":A(),v()}const C=new F.Vector3().subVectors(r[1],r[0]).length()/f.length(),w=new F.Vector3().subVectors(r[3],r[0]).length()/d.length(),x=new F.Vector3(C,w,1),D=new E.Matrix4().scale(x);n.isCSS3DObjectPlus?n.applyScaleMatrix4(D):n.scale.applyMatrix4(D),o.position.copy(a);const y=new F.Vector3().addVectors(r[0],r[2]).divideScalar(2),L=new F.Vector3().subVectors(y,l),P=new E.Matrix4().setPosition(L);n.applyMatrix4(P),(j=this.helperObject3D.css3DInstance)==null||j.css3DObject.applyMatrix4(P),(B=this.helperObject3D.plane)==null||B.applyMatrix4(P),this.hooks.emit("scaleUpdate",{matrix4:D,helperOrigin:l}),this.hooks.emit("positionUpdate",{matrix4:P}),this.render()}dragEnd(){!this.isDragging||(this.startInfo=void 0,this.isDragging=!1,this.hooks.emit("scaleEnd"),this.render(),console.log("%c RectangleScaleController dragEnd","color: #e94e4e"))}}class C0 extends w0{constructor(...t){super(...t),this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(t=>{if(!t)return;const e=t.point,n=r=>this.dragStart(r,t),o=this.dragging.bind(this),s=this.dragEnd.bind(this);e.addEventListener("dragstart",n),e.addEventListener("drag",o),e.addEventListener("dragend",s)})}}const mo="v1.0.0",Yi="Object3DHelperPlugin",fi=`${Yi}@${mo}`,E0=()=>{console.error(`${fi} is disposed`)},P0=()=>{console.warn(`${fi} is disabled`)},I0=()=>{console.error(`${fi} is disabled`)};class Ka extends ai{constructor(e){super(e);h(this,"version",mo);h(this,"name",Yi);h(this,"state",{visible:!0,enabled:!0,disposed:!1});h(this,"objectHelperMap",new Map);h(this,"css3DObjectParentMap",new Map);h(this,"css3DRender");this.five=e,this.css3DRender=new Vt(this.five.scene),console.warn("Object3DHelper: \u4F7F\u7528\u6B64\u63D2\u4EF6\u9700\u8981\u5728\u521D\u59CB\u5316five\u65F6\uFF0C\u8BBE\u7F6Efive\u53C2\u6570: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${Yi.toUpperCase()}_DEBUG__`]:this})}show(e){return J(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return J(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){if(this.state.disposed)return E0();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return I0();const o=N({},this.state);this.state=N(N({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:o})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,n={}){var u;if(!e)return console.error("Object3D is undefined");if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const o=new b0;this.objectHelperMap.set(e,o);const s=(u=this.five.getElement())==null?void 0:u.parentElement,r=this.five.camera,{moveHelper:a=!0,rotateHelper:l=!0,scaleHelper:c=!0}=n;if(a){const f=new a0(e),d=new Si(this.five,h0,e,f);o.addControllers({moveController:d.helperController})}if(l){let f;s&&r&&(f={container:s});const d=new u0(e,f),p=new Si(this.five,y0,e,d);o.addControllers({rotateController:p.helperController})}if(c&&s){const f=new f0(e,s,r,this.five.scene),d=new Si(this.five,C0,e,f);o.addControllers({scaleController:d.helperController})}e.isCSS3DObjectPlus&&Vr(this.five).then(()=>{var p,m;const f=e,d=(p=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?p:Jr(this.five);d&&(this.css3DObjectParentMap.set(f,f.parent),f.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(d),(m=this.css3DRender.getBehindCSS3DObjectGroup())==null||m.add(f),this.css3DRender.render(this.five.camera))})}removeObject3DHelper(e){const n=this.objectHelperMap.get(e);if(!!n){if(e.isCSS3DObjectPlus){const o=e,s=this.css3DObjectParentMap.get(o);s==null||s.add(o),this.css3DRender.render(this.five.camera)}this.objectHelperMap.delete(e),n.dispose()}}handleEnable(e,n=!0){e?(this.everyHelperDo(o=>o.enable()),this.hooks.emit("enable",{userAction:n})):(this.everyHelperDo(o=>o.disable()),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){e?(this.everyHelperDo(o=>o.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.everyHelperDo(o=>o.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}handleDispose(){this.everyHelperDo(e=>e.dispose())}everyHelperDo(e){this.objectHelperMap.forEach(n=>{n&&e(n)})}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&P0()}}const x0=i=>new Ka(i);class Ui{constructor(t=0,e=0){h(this,"min");h(this,"max");h(this,"isInterval",!0);this.min=t,this.max=e}fromArray(t){return this.min=t[0],this.max=t[1],this}isOverlap(t){return Math.min(this.max,t.max)<Math.max(this.min,t.min)}contains(t){return this.min<t.min&&this.max>t.max}}class k0{constructor(t,e){h(this,"min");h(this,"max");h(this,"xInterval");h(this,"yInterval");h(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new Ui(this.min.x,this.max.x),this.yInterval=new Ui(this.min.y,this.max.y)}isOverlapWithRectangle(t){return!this.xInterval.isOverlap(t.xInterval)&&!this.yInterval.isOverlap(t.yInterval)}containsRect(t){return this.xInterval.contains(t.xInterval)&&this.yInterval.contains(t.yInterval)}}function Qn(i,t,e){const n=i[t],o=i[e];!n||!o||(i[t]=o,i[e]=n)}function D0(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;Qn(i,a*4+0,l*4+0),Qn(i,a*4+1,l*4+1),Qn(i,a*4+2,l*4+2),Qn(i,a*4+3,l*4+3)}}}class $a{constructor(t,e){h(this,"width");h(this,"height");h(this,"containerDom");h(this,"hooks",new be.Subscribe);h(this,"canvas",document.createElement("canvas"));h(this,"five");h(this,"scale");h(this,"config");h(this,"offset",{x:0,y:0});h(this,"context");h(this,"renderCenter",new E.Vector3);h(this,"hammer");h(this,"state",{enabled:!1});h(this,"onPan",t=>{if(!this.containerDom||this.hooks.emit("wantsPanGesture",t))return;const n=this.offset.x+t.deltaX,o=this.offset.y+t.deltaY;this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${n}px, ${o}px, 100px)`});h(this,"onPanEnd",t=>{this.offset={x:this.offset.x+t.deltaX,y:this.offset.y+t.deltaY},this.canvas.style.boxShadow="none"});var o,s,r;if(!t.renderer)throw new Error("Five Render \u672A\u521D\u59CB\u5316");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new gn.default(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){var t;if(!this.state.enabled)return this.state.enabled=!0,(t=this.containerDom)==null||t.append(this.canvas),this}disable(){if(!!this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){var e;return this.containerDom&&((e=this.containerDom)==null||e.removeChild(this.canvas)),this.containerDom=t,this.state.enabled&&t.append(this.canvas),this}clear(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this}renderWithPoint(t){!this.containerDom||!this.state.enabled||(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,n=this.renderCenter.clone().project(this.five.camera),o=(n.x+1)/2*this.containerDom.clientWidth,s=-(n.x-1)/2*this.containerDom.clientWidth,r=-(n.y-1)/2*this.containerDom.clientHeight;o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=90+"px"):r<183?(this.canvas.style.top=90+"px",this.canvas.style.left=-t/2+"px"):s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${r}px, 10px)`,this.offset={x:o,y:r}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:n,height:o}=this,s=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new E.Vector2),a=1,l=n/t,c=o/t,u=a*t,f=(s.x+1)/2*r.x,d=(s.y+1)/2*r.y,p=this.five.getPixels(f-l/2,d-l/2,l,c,u),m=Math.floor(n*a),g=Math.floor(o*a);D0(p,m,g);const A=new ImageData(m,g);A.data.set(p),e.putImageData(A,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}}function L0(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new E.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function el(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new E.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function S0(i,t){const e=i.getElement();if(!e)return;const n=el(t,e),o=new E.Raycaster;return o.setFromCamera(n,i.camera),o}function z0(i,t){const{x:e,y:n}=t,o=e*2-1,s=n*2-1,r=new E.Vector2().fromArray([o,s]),a=new E.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const M0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAti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CQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",T0=`
|
|
547
547
|
varying vec2 vUv;
|
|
548
548
|
void main() {
|
|
549
549
|
vUv = uv;
|
|
@@ -558,4 +558,4 @@ void main() {
|
|
|
558
558
|
float match = 1.0 - uv.x;
|
|
559
559
|
gl_FragColor = vec4(1.0,1.0,1.0,match);
|
|
560
560
|
}
|
|
561
|
-
`;function j0(){const i=new E.PlaneGeometry(.4,.4),t=M0,e=new E.TextureLoader().load(t);e.encoding=E.sRGBEncoding;const n=new E.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new E.Mesh(i,n)}function Q0(){const i=new E.CurvePath;i.add(new E.LineCurve3(new E.Vector3(0,0,0),new E.Vector3(0,0,.1)));const t=new E.TubeGeometry(i,8,.003),e=new E.ShaderMaterial({vertexShader:T0,fragmentShader:B0,depthTest:!1,transparent:!0});return new E.Mesh(t,e)}function R0(){const i=new E.SphereGeometry(.01,20,20),t=new E.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:E.DoubleSide}),e=new E.Mesh(i,t);return e.position.set(0,0,.1),e}class tl extends E.Object3D{constructor(){super();h(this,"planeMesh");h(this,"lineMesh");h(this,"ballMesh");this.planeMesh=j0(),this.lineMesh=Q0(),this.ballMesh=R0(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new E.Vector3().addVectors(e.point,e.face.normal);this.position.copy(e.point),this.lookAt(n)}dispose(){var e;(e=this.planeMesh.material.map)==null||e.dispose()}}class nl{constructor(t){h(this,"five");h(this,"contentElement",document.createElement("div"));h(this,"animeIns");h(this,"container");h(this,"css3DObject");h(this,"disposeCss3DObject");h(this,"state",{enabled:!1});this.five=t;const n=.4/2,s=Kt(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new E.Vector3().fromArray(r)));if(s){const{container:r,dispose:a,css3DObject:l}=s;this.container=r,this.css3DObject=l,this.disposeCss3DObject=a}this.contentElement.style.width="100%",this.contentElement.style.height="100%",this.contentElement.style.backgroundImage=`url(${Ta})`,this.contentElement.style.backgroundSize="100%",this.contentElement.style.backgroundRepeat="no-repeat"}enable(){var t;this.state.enabled||(this.state.enabled=!0,(t=this.container)==null||t.appendChild(this.contentElement))}disable(){!this.state.enabled||(this.state.enabled=!1,this.contentElement.remove())}updateWithIntersect(t){if(!t.face||!this.css3DObject)return;const e=new E.Vector3().addVectors(t.point,t.face.normal);this.css3DObject.position.copy(t.point),this.css3DObject.lookAt(e),this.five.needsRender=!0}doAnimation(){var t;(t=this.animeIns)==null||t.dispose(),new so({progress:0}).to({progress:[1,0]}).duration(500).easing(ni.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class O0{constructor(t,e){h(this,"five");h(this,"hooks",new be.Subscribe);h(this,"magnifier",null);h(this,"pointHelper",null);h(this,"pointDomHelper",null);h(this,"contentDom",document.createElement("div"));h(this,"state",{enabled:!1});h(this,"group",new E.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new $a(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new tl:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new nl(t):null,this.group.name="five-point-selector",this.five.scene.add(this.group),this.contentDom.classList.add("five-point-selector-content"),this.contentDom.style.position="absolute",this.contentDom.style.top="0",this.contentDom.style.left="0",this.contentDom.style.width="100%",this.contentDom.style.height="100%",this.contentDom.style.pointerEvents="none"}enable(){var t,e;this.state.enabled||(this.state.enabled=!0,this.pointHelper&&this.group.add(this.pointHelper),(t=this.magnifier)==null||t.enable(),(e=this.pointDomHelper)==null||e.enable(),this.five.needsRender=!0,this.hooks.emit("enabled"))}disable(){var t,e;!this.state.enabled||(this.state.enabled=!1,this.pointHelper&&this.group.remove(this.pointHelper),(t=this.magnifier)==null||t.disable(),(e=this.pointDomHelper)==null||e.disable(),this.hooks.emit("disabled"))}dispose(){this.hooks.off(),this.disable(),this.magnifier=null,this.pointHelper=null,this.pointDomHelper=null}updateWithIntersect(t){var s;this.hooks.emit("pointChanged",{panoIndex:this.five.getCurrentState().panoIndex,position:t.point.toArray(),normal:(s=t.face)==null?void 0:s.normal.toArray()});const e=this.magnifier;e&&e.renderWithPoint(t.point);const n=this.pointHelper;n&&n.updateWithIntersect(t);const o=this.pointDomHelper;o&&o.updateWithIntersect(t),this.five.needsRender=!0}}const H0=Object.freeze(Object.defineProperty({__proto__:null,Interval:Ui,Rectangle:k0,Magnifier:$a,getCoordsFromClient:L0,getCoordsFromElement:el,getRaycasterFromFivePointer:S0,getIntersectFromRelativePosition:z0,PointHelper:tl,PointDomHelper:nl,FivePointSelector:O0,isNil:wm,notNil:Bt,BetterTween:so,tweenProgress:ba,nextFrame:li,requestAnimationFrameInterval:ci,getFrameTime:Gd},Symbol.toStringTag,{value:"Module"}));exports.CSS3DRender=Vt;exports.CSS3DRenderPlugin=Kt;exports.CameraMovementEffect=ya;exports.CameraMovementPlugin=Yd;exports.ContentType=We;exports.CruisePlugin=Sm;exports.CruisePluginController=lo;exports.DIRECTION=Yt;exports.DISPLAY_STRATEGY_TYPE=
|
|
561
|
+
`;function j0(){const i=new E.PlaneGeometry(.4,.4),t=M0,e=new E.TextureLoader().load(t);e.encoding=E.sRGBEncoding;const n=new E.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new E.Mesh(i,n)}function Q0(){const i=new E.CurvePath;i.add(new E.LineCurve3(new E.Vector3(0,0,0),new E.Vector3(0,0,.1)));const t=new E.TubeGeometry(i,8,.003),e=new E.ShaderMaterial({vertexShader:T0,fragmentShader:B0,depthTest:!1,transparent:!0});return new E.Mesh(t,e)}function R0(){const i=new E.SphereGeometry(.01,20,20),t=new E.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:E.DoubleSide}),e=new E.Mesh(i,t);return e.position.set(0,0,.1),e}class tl extends E.Object3D{constructor(){super();h(this,"planeMesh");h(this,"lineMesh");h(this,"ballMesh");this.planeMesh=j0(),this.lineMesh=Q0(),this.ballMesh=R0(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new E.Vector3().addVectors(e.point,e.face.normal);this.position.copy(e.point),this.lookAt(n)}dispose(){var e;(e=this.planeMesh.material.map)==null||e.dispose()}}class nl{constructor(t){h(this,"five");h(this,"contentElement",document.createElement("div"));h(this,"animeIns");h(this,"container");h(this,"css3DObject");h(this,"disposeCss3DObject");h(this,"state",{enabled:!1});this.five=t;const n=.4/2,s=Kt(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new E.Vector3().fromArray(r)));if(s){const{container:r,dispose:a,css3DObject:l}=s;this.container=r,this.css3DObject=l,this.disposeCss3DObject=a}this.contentElement.style.width="100%",this.contentElement.style.height="100%",this.contentElement.style.backgroundImage=`url(${Ta})`,this.contentElement.style.backgroundSize="100%",this.contentElement.style.backgroundRepeat="no-repeat"}enable(){var t;this.state.enabled||(this.state.enabled=!0,(t=this.container)==null||t.appendChild(this.contentElement))}disable(){!this.state.enabled||(this.state.enabled=!1,this.contentElement.remove())}updateWithIntersect(t){if(!t.face||!this.css3DObject)return;const e=new E.Vector3().addVectors(t.point,t.face.normal);this.css3DObject.position.copy(t.point),this.css3DObject.lookAt(e),this.five.needsRender=!0}doAnimation(){var t;(t=this.animeIns)==null||t.dispose(),new so({progress:0}).to({progress:[1,0]}).duration(500).easing(ni.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class O0{constructor(t,e){h(this,"five");h(this,"hooks",new be.Subscribe);h(this,"magnifier",null);h(this,"pointHelper",null);h(this,"pointDomHelper",null);h(this,"contentDom",document.createElement("div"));h(this,"state",{enabled:!1});h(this,"group",new E.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new $a(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new tl:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new nl(t):null,this.group.name="five-point-selector",this.five.scene.add(this.group),this.contentDom.classList.add("five-point-selector-content"),this.contentDom.style.position="absolute",this.contentDom.style.top="0",this.contentDom.style.left="0",this.contentDom.style.width="100%",this.contentDom.style.height="100%",this.contentDom.style.pointerEvents="none"}enable(){var t,e;this.state.enabled||(this.state.enabled=!0,this.pointHelper&&this.group.add(this.pointHelper),(t=this.magnifier)==null||t.enable(),(e=this.pointDomHelper)==null||e.enable(),this.five.needsRender=!0,this.hooks.emit("enabled"))}disable(){var t,e;!this.state.enabled||(this.state.enabled=!1,this.pointHelper&&this.group.remove(this.pointHelper),(t=this.magnifier)==null||t.disable(),(e=this.pointDomHelper)==null||e.disable(),this.hooks.emit("disabled"))}dispose(){this.hooks.off(),this.disable(),this.magnifier=null,this.pointHelper=null,this.pointDomHelper=null}updateWithIntersect(t){var s;this.hooks.emit("pointChanged",{panoIndex:this.five.getCurrentState().panoIndex,position:t.point.toArray(),normal:(s=t.face)==null?void 0:s.normal.toArray()});const e=this.magnifier;e&&e.renderWithPoint(t.point);const n=this.pointHelper;n&&n.updateWithIntersect(t);const o=this.pointDomHelper;o&&o.updateWithIntersect(t),this.five.needsRender=!0}}const H0=Object.freeze(Object.defineProperty({__proto__:null,Interval:Ui,Rectangle:k0,Magnifier:$a,getCoordsFromClient:L0,getCoordsFromElement:el,getRaycasterFromFivePointer:S0,getIntersectFromRelativePosition:z0,PointHelper:tl,PointDomHelper:nl,FivePointSelector:O0,isNil:wm,notNil:Bt,BetterTween:so,tweenProgress:ba,nextFrame:li,requestAnimationFrameInterval:ci,getFrameTime:Gd},Symbol.toStringTag,{value:"Module"}));exports.CSS3DRender=Vt;exports.CSS3DRenderPlugin=Kt;exports.CameraMovementEffect=ya;exports.CameraMovementPlugin=Yd;exports.ContentType=We;exports.CruisePlugin=Sm;exports.CruisePluginController=lo;exports.DIRECTION=Yt;exports.DISPLAY_STRATEGY_TYPE=St;exports.DimensionType=Xe;exports.FLOOR_PLAN_ATTACHED_TO=mt;exports.FLOOR_TYPE_MAP=Td;exports.GuideLinePlugin=Ha;exports.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=zt;exports.ItemLabelPlugin=tm;exports.LinkType=ei;exports.Magnifier=Pa;exports.MapviewFloorplanPlugin=dd;exports.ModelChassisCompassPlugin=Qd;exports.ModelEntryDoorGuidePlugin=Hd;exports.ModelFloorplanPlugin=ad;exports.ModelItemLabelPlugin=jh;exports.ModelRoomLabelPlugin=bc;exports.ModelTVVideoPlugin=Oh;exports.ModelViewPlugin=Ll;exports.Object3DHelperController=Ka;exports.Object3DHelperPlugin=x0;exports.PLUGIN=fi;exports.PaintBrush=Dl;exports.PaintBrushTypeEnum=it;exports.PanoCompassPlugin=hf;exports.PanoCursorRaycasterPlugin=Vl;exports.PanoDoorLabelPlugin=mm;exports.PanoFloorplanRadarPlugin=zd;exports.PanoMeasurePlugin=ch;exports.PanoRulerPlugin=_d;exports.PanoRulerProPlugin=lf;exports.PanoSpatialTagPlugin=Ph;exports.PanoTagPlugin=$g;exports.PanoTagPluginController=qa;exports.PointType=Ge;exports.ROOM_FETILE_TYPE_MAP=Md;exports.ROOM_TYPE_MAP=Bd;exports.Rotation=_e;exports.TopviewFloorplanPlugin=hd;exports.Util=H0;exports.VERSION=mo;exports.itemLabelPluginServerParams=nm;exports.modelItemLabelPluginServerParams=Qh;exports.modelRoomLabelPluginServerParams=yc;exports.pluginFlag=Kg;
|