@realsee/dnalogel 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +19 -19
- package/dist/index.js +102 -102
- 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 +20 -20
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoMeasurePluginLine.html +23 -23
- package/docs/classes/PanoMeasurePluginModel.html +22 -22
- package/docs/classes/PanoMeasurePluginPoint.html +14 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
- package/docs/classes/PanoTagPluginController.html +47 -47
- 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 +18 -18
- 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/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/AddTagConfig.html +6 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/EventMap.html +15 -15
- 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/HelperOffset.html +8 -8
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/MinMax.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 +11 -11
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/ObjectHelperControllers.html +9 -9
- 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 +12 -12
- package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -8
- 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/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/State.html +8 -8
- package/docs/interfaces/TagCache.html +12 -12
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/TagIconUrl.html +9 -9
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/TemporaryState.html +6 -6
- 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/AudioAppearance.html +5 -5
- package/docs/types/AudioTagTypeConfigKey.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/ClassFunctionParameters.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeySplit.html +5 -5
- package/docs/types/ContentTypeMap.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/LoadTagConfig.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/MediaStore.html +5 -5
- package/docs/types/ModelElement.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/PanoIndex.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/PlaneTagElement.html +5 -5
- package/docs/types/Point2DElement.html +5 -5
- package/docs/types/Point2DTag.html +5 -5
- package/docs/types/Point3DElement.html +5 -5
- package/docs/types/Point3DTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/PointTagElement.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/StickType.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/TagContentType.html +5 -5
- package/docs/types/TagDimensionType.html +5 -5
- package/docs/types/TagElement.html +5 -5
- package/docs/types/TagEvents.html +5 -5
- package/docs/types/TagGLTFObject.html +5 -5
- package/docs/types/TagHooks.html +5 -5
- package/docs/types/TagIconSize.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TagPointType.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/WorkCode.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/PanoTagPlugin/controller/index.js +67 -67
- package/package.json +1 -1
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.d.ts +0 -4
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.js +0 -6
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.d.ts +0 -93
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.js +0 -5622
- package/libs/PanoTagPlugin/mocks/v1/mock-test3-realsee-cn-4zr0A5.js +0 -1325
- package/libs/PanoTagPlugin/mocks/v1/mock1.d.ts +0 -173
- package/libs/PanoTagPlugin/mocks/v1/mock1.js +0 -122
- package/libs/PanoTagPlugin/mocks/v1/mock2.d.ts +0 -233
- package/libs/PanoTagPlugin/mocks/v1/mock2.js +0 -296
- package/libs/PanoTagPlugin/mocks/v1/mock3.d.ts +0 -22
- package/libs/PanoTagPlugin/mocks/v1/mock3.js +0 -32
- package/libs/PanoTagPlugin/mocks/v1/mock4.d.ts +0 -56
- package/libs/PanoTagPlugin/mocks/v1/mock4.js +0 -60
- package/libs/PanoTagPlugin/mocks/v1/mock5.d.ts +0 -13
- package/libs/PanoTagPlugin/mocks/v1/mock5.js +0 -17
- package/libs/PanoTagPlugin/mocks/v1/mock6.d.ts +0 -16
- package/libs/PanoTagPlugin/mocks/v1/mock6.js +0 -27
- package/libs/PanoTagPlugin/mocks/v1/mock7.d.ts +0 -22
- package/libs/PanoTagPlugin/mocks/v1/mock7.js +0 -228
package/dist/index.umd.js
CHANGED
|
@@ -205,7 +205,7 @@ transition: all 500ms;
|
|
|
205
205
|
<div class="PanoRulerPlugin-rule-label-name">${e.options.distanceText(g)}</div>
|
|
206
206
|
</div>
|
|
207
207
|
</div>
|
|
208
|
-
`,y=document.createElement("div");return y.setAttribute("class","PanoRulerPlugin-rule"),y.setAttribute("data-name",v),y.setAttribute("style","display: none"),y.innerHTML=A,y},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=Ah,o.appendChild(s);const r={},a=(v,g)=>{if(e.loaded)throw new Error("\u6807\u5C3A\u88AB\u91CD\u590D\u521D\u59CB\u5316\uFF01");const A=bh(v,i),y=i.work;if(!y)return!1;for(const w in g){const C=g[w],{standingPosition:x}=y.observers[0],E=C.map(({x:S,z:k,observers:j})=>{const _=j.length>0?v.rooms[v.observers[j[0]]].name:"",G=A[_]?A[_].floor:null;let Z=1/0,Q={index:0,x:x.x,y:x.y,z:x.z};j.forEach(X=>{if(!y.observers[X])return;const{standingPosition:J}=y.observers[X],he={index:X,x:J.x,y:J.y,z:J.z},fe=vh({x:S,z:k},he);G?fe<Z&&Math.abs(he.y-G)<.3&&(Z=fe,Q=he):fe<Z&&(Z=fe,Q=he)});const B=new O.Vector3(S,Q.y,k);Object.assign(B,{observers:j});const R=A[_]?A[_].roof:null,W=R?new O.Vector3(S,R,k):null;return W&&Object.assign(W,{observers:j}),{origin:B,vertical:W}});r[w]={origins:E.map(S=>S.origin),rules:[]};for(const{origin:S,vertical:k}of E){if(!k)continue;const j=n(w,S.distanceTo(k));o.append(j),r[w].rules.push({vertical:!0,rule:[S,k],$element:j})}for(let S=0;S<E.length;S++){let k=S+1;k>=E.length&&(k=0);const{origin:j}=E[S],{origin:_}=E[k],G=n(w,j.distanceTo(_));o.append(G),r[w].rules.push({vertical:!1,rule:[j,_],$element:G})}}return e.loaded=!0,!0},l=(v,g,A)=>N(this,null,function*(){const y=v||t.roomInfo,w=g||t.roomRules;if(!y||!w)throw new Error("\u6807\u5C3A\u6570\u636E\u4F9D\u8D56\u4E0D\u9F50\u5168\uFF01");return e.loaded=!1,e.options=F(F({},e.options),A||{}),i.model.loaded?a(y,w):yield new Promise(C=>i.once("modelLoaded",()=>C(a(y,w))))});t.roomInfo&&t.roomRules&&l(t.roomInfo,t.roomRules);const c=(v,g,A,y)=>{const w=[[{x:0,y:0},{x:A,y:0}],[{x:0,y:0},{x:0,y}],[{x:A,y:0},{x:A,y}],[{x:0,y},{x:A,y}]],C=[];for(let x=0;x<w.length;x++){const E=qs([v,g],[w[x][0],w[x][1]],!0);E&&C.push(E)}return C.length===0?!1:C},u=()=>{var j;const v=(j=i.getElement())==null?void 0:j.parentElement;if(!v||!e.loaded||Object.keys(r).length<=0)return;const{panoIndex:g,camera:A,currentMode:y}=i;if(g===void 0)return;let w;for(const _ in r)_.split(",").indexOf(g.toString())>=0&&(w=_);if(!w){for(const _ in r)for(const{$element:G}of r[_].rules)G.style.display="none";return}const C=A.position,x=A.getWorldDirection(new O.Vector3),E=v.clientWidth,S=v.clientHeight;if(y!==me.Five.Mode.Panorama){for(const _ in r)for(const{$element:G}of r[_].rules)G.style.display="none";return}for(const _ in r)for(const{$element:G}of r[_].rules)G.style.display=_===w?"block":"none";const[k]=r[w].origins.slice().filter(_=>_.observers.indexOf(g)>=0).sort((_,G)=>{const Z=_.clone().setY(0).sub(C).normalize().angleTo(x.clone().setY(0)),Q=G.clone().setY(0).sub(C).normalize().angleTo(x.clone().setY(0));return Z-Q});for(const{rule:_,vertical:G,$element:Z}of r[w].rules){const[Q,B]=_,R=Z.querySelector(".PanoRulerPlugin-rule-line");if(!R)return;if(!k){Z.style.display="none";continue}if(Q!==k&&B!==k){Z.style.display="none";continue}if(Q.distanceTo(B)<.3){Z.style.display="none";continue}if(Q.observers.indexOf(g)===-1||B.observers.indexOf(g)===-1){Z.style.display="none";continue}if(Q.clone().sub(C).normalize().angleTo(x)>Math.PI/2){Z.style.display="none";continue}if(B.clone().sub(C).normalize().angleTo(x)>Math.PI/2){Z.style.display="none";continue}const te=Q.distanceTo(B);if(B.clone().sub(B.clone().sub(Q).divide(new O.Vector3(2,2,2))).distanceTo(C)/te>8){Z.style.display="none";continue}const he=Q.clone().project(A),fe=(he.x+1)/2*E,Ae=(-he.y+1)/2*S,xe=B.clone().project(A),Te=(xe.x+1)/2*E,Ge=(-xe.y+1)/2*S,ue=Math.sqrt(Math.pow(Te-fe,2)+Math.pow(Ge-Ae,2));let we=ue,Ee=50;const de=c({x:~~fe,y:~~Ae},{x:~~Te,y:~~Ge},E,S);if(de&&de.length===1&&(k===Q?(we=Math.sqrt(Math.pow(de[0].x-fe,2)+Math.pow(de[0].y-Ae,2)),Ee=we/ue*50):k===B&&(we=Math.sqrt(Math.pow(de[0].x-Te,2)+Math.pow(de[0].y-Ge,2)),Ee=100-we/ue*50)),de&&de.length===2){const ie={x:(de[0].x+de[1].x)/2,y:(de[0].y+de[1].y)/2};Ee=Math.sqrt(Math.pow(ie.x-fe,2)+Math.pow(ie.y-Ae,2))/ue*100}const mt=(Math.PI/2-Math.atan2(Te-fe,Ae-Ge))/Math.PI*180,ye=R.querySelector(".PanoRulerPlugin-rule-label"),it=ye.children[0].clientWidth;it>=ue||it/2>=Ee/100*ue||it/2>=(1-Ee/100)*ue?R.style.display="none":(R.style.display="block",R.style.width=ue+"px",R.style.left=fe+"px",R.style.top=Ae+"px",R.style.transform=`rotate(${-mt}deg)`,ye.style.left=`${Ee}%`)}},h=()=>Ks(u),d=()=>{var v,g;return e.loaded?(e.enable||(o.setAttribute("class","PanoRulerPlugin"+(e.options.className?" "+e.options.className:"")),(g=(v=i.getElement())==null?void 0:v.parentElement)==null||g.append(o),u(),i.on("modeChange",u),i.on("cameraUpdate",h),e.enable=!0),!0):!1},f=()=>(e.enable&&(i.off("modeChange",u),i.off("cameraUpdate",h),o&&o.remove(),e.enable=!1),!0);function p(v){if(v.distanceText&&v.distanceText!==e.options.distanceText){const g=v.distanceText;e.options.distanceText=g,Object.values(r).forEach(A=>{A.rules.forEach(y=>{const[w,C]=y.rule,x=w.distanceTo(C),E=y.$element.querySelector(".PanoRulerPlugin-rule-label-name");!E||(E.innerText=g(x))})})}}return{enable:d,disable:f,load:l,state:e,changeConfigs:p}};function wh(i){ce(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 $s(i,t,e){const n=i.slice();return n[6]=t[e],n}function Ch(i){let t,e=i[0].children,n=[];for(let o=0;o<e.length;o+=1)n[o]=er($s(i,e,o));return{c(){t=T("div");for(let o=0;o<n.length;o+=1)n[o].c();b(t,"class","rule-mixed-line svelte-1h27ktp")},m(o,s){z(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=$s(o,e,r);n[r]?n[r].p(a,s):(n[r]=er(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&&M(t),dt(n,o)}}}function Ph(i){let t,e;return{c(){t=T("em"),b(t,"class",e=Qe(i[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),b(t,"style",i[3])},m(n,o){z(n,t,o)},p(n,o){o&1&&e!==(e=Qe(n[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&b(t,"class",e),o&8&&b(t,"style",n[3])},d(n){n&&M(t)}}}function er(i){let t,e,n=`${i[6].width}px`;return{c(){t=T("div"),b(t,"class",e=Qe(i[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),b(t,"style",i[3]),L(t,"width",n)},m(o,s){z(o,t,s)},p(o,s){s&1&&e!==(e=Qe(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`)&&L(t,"width",n)},d(o){o&&M(t)}}}function Ih(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`,h=`${i[0].top}px`,d=`rotate(${i[0].rotateDeg}deg)`;function f(g,A){return g[0].children.length===0?Ph:Ch}let p=f(i),v=p(i);return{c(){t=T("div"),v.c(),e=ne(),n=T("div"),o=T("div"),r=De(s),b(o,"class","PanoRulerPlugin-rule-label-name svelte-1h27ktp"),ze(()=>i[4].call(o)),b(n,"class","PanoRulerPlugin-rule-label svelte-1h27ktp"),L(n,"left",l),b(t,"class","PanoRulerPlugin-rule-line svelte-1h27ktp"),L(t,"width",c),L(t,"left",u),L(t,"top",h),L(t,"transform",d),L(t,"display",i[0].visible&&i[2]?"block":"none")},m(g,A){z(g,t,A),v.m(t,null),V(t,e),V(t,n),V(n,o),V(o,r),a=bt(o,i[4].bind(o))},p(g,[A]){p===(p=f(g))&&v?v.p(g,A):(v.d(1),v=p(g),v&&(v.c(),v.m(t,e))),A&1&&s!==(s=g[0].labelElement+"")&&Me(r,s),A&1&&l!==(l=`${g[0].labelOffset}%`)&&L(n,"left",l),A&1&&c!==(c=`${g[0].width}px`)&&L(t,"width",c),A&1&&u!==(u=`${g[0].left}px`)&&L(t,"left",u),A&1&&h!==(h=`${g[0].top}px`)&&L(t,"top",h),A&1&&d!==(d=`rotate(${g[0].rotateDeg}deg)`)&&L(t,"transform",d),A&5&&L(t,"display",g[0].visible&&g[2]?"block":"none")},i:U,o:U,d(g){g&&M(t),v.d(),a()}}}function Eh(i,t,e){let n,{rulerItemProp:o}=t,s=!0,r,a="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcuNCUiIHg9Ii0xOC43JSIgeT0iLTE1MCUiPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiBvcGVyYXRvcj0iZGlsYXRlIiByYWRpdXM9Ii41IiByZXN1bHQ9InNoYWRvd1NwcmVhZE91dGVyMSIvPjxmZU9mZnNldCBpbj0ic2hhZG93U3ByZWFkT3V0ZXIxIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByYWRpdXM9IjEiIHJlc3VsdD0ic2hhZG93SW5uZXIiLz48ZmVPZmZzZXQgaW49InNoYWRvd0lubmVyIiByZXN1bHQ9InNoYWRvd0lubmVyIi8+PGZlQ29tcG9zaXRlIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIGluMj0ic2hhZG93SW5uZXIiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93T2Zmc2V0T3V0ZXIxIi8+PGZlR2F1c3NpYW5CbHVyIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIgc3RkRGV2aWF0aW9uPSIuNSIvPjxmZUNvbG9yTWF0cml4IGluPSJzaGFkb3dCbHVyT3V0ZXIxIiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMiAwIi8+PC9maWx0ZXI+PHBhdGggaWQ9InByZWZpeF9fYiIgZD0iTS44ODkgMkgxMS41OCIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1kYXNoYXJyYXk9IjUgNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48dXNlIGZpbGw9IiMwMDAiIGZpbHRlcj0idXJsKCNwcmVmaXhfX2EpIiB4bGluazpocmVmPSIjcHJlZml4X19iIi8+PHVzZSBzdHJva2U9IiNmZmYiIHN0cm9rZS1vcGFjaXR5PSIuNCIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjwvZz48L3N2Zz4=";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 kh extends re{constructor(t){super(),se(this,t,Eh,Ih,oe,{rulerItemProp:0},wh)}}function tr(i,t,e){const n=i.slice();return n[12]=t[e],n}function nr(i){let t,e;return t=new kh({props:{rulerItemProp:i[12]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.rulerItemProp=n[12]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function xh(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=nr(tr(i,n,r));const s=r=>D(o[r],1,1,()=>{o[r]=null});return{c(){t=T("div");for(let r=0;r<o.length;r+=1)o[r].c()},m(r,a){z(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=tr(r,n,l);o[l]?(o[l].p(c,a),P(o[l],1)):(o[l]=nr(c),o[l].c(),P(o[l],1),o[l].m(t,null))}for(ae(),l=n.length;l<o.length;l+=1)s(l);le()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)P(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)D(o[a]);e=!1},d(r){r&&M(t),dt(o,r)}}}function Dh(i,t,e){var v,g,A,y;let{five:n}=t,{rulerDatas:o}=t,{options:s}=t,r=[];const a=((g=(v=n.getElement())==null?void 0:v.parentElement)==null?void 0:g.clientWidth)||0,l=((y=(A=n.getElement())==null?void 0:A.parentElement)==null?void 0:y.clientHeight)||0,c=(w,C)=>{const x=[[{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}]],E=[];for(let S=0;S<x.length;S++){const k=qs([w,C],[x[S][0],x[S][1]],!0);k&&E.push(k)}return E.length===0?!1:E},u=(w,C)=>{const x=w.clone().project(n.camera),E=(x.x+1)/2*a,S=(-x.y+1)/2*l,k=C.clone().project(n.camera),j=(k.x+1)/2*a,_=(-k.y+1)/2*l,G=Math.sqrt(Math.pow(j-E,2)+Math.pow(_-S,2));return{startLeft:E,startTop:S,endLeft:j,endTop:_,distance:G}},h=(w,C,x)=>{const E=n.camera.position,S=n.camera.getWorldDirection(new O.Vector3),k=w.clone().sub(E).normalize().angleTo(S),j=C.clone().sub(E).normalize().angleTo(S),_=w.distanceTo(C),Z=C.clone().sub(C.clone().sub(w).divide(new O.Vector3(2,2,2))).distanceTo(E),{startLeft:Q,startTop:B,endLeft:R,endTop:W,distance:H}=u(w,C),X=-((Math.PI/2-Math.atan2(R-Q,B-W))/Math.PI)*180;let J=!0;x||(J=!1),!et(w,x)&&!et(C,x)&&(J=!1),_<.3&&(J=!1),k>Math.PI/2&&(J=!1),j>Math.PI/2&&(J=!1),Z/_>8&&(J=!1);let he=50,fe=H;const Ae=c({x:~~Q,y:~~B},{x:~~R,y:~~W});if(Ae&&Ae.length===1&&(et(w,x)?(fe=Math.sqrt(Math.pow(Ae[0].x-Q,2)+Math.pow(Ae[0].y-B,2)),he=fe/H*50):et(C,x)&&(fe=Math.sqrt(Math.pow(Ae[0].x-R,2)+Math.pow(Ae[0].y-W,2)),he=100-fe/H*50)),Ae&&Ae.length===2){const xe={x:(Ae[0].x+Ae[1].x)/2,y:(Ae[0].y+Ae[1].y)/2};he=Math.sqrt(Math.pow(xe.x-Q,2)+Math.pow(xe.y-B,2))/H*100}return{startLeft:Q,startTop:B,distance:H,deg:X,visible:J,labelOffset:he,ruleLength:_}},d=()=>{const w=n.panoIndex,C=o.find(G=>G.panoIndex===w);if(!C)return e(0,r=[]);if(n.currentMode!==me.Five.Mode.Panorama)return e(0,r=[]);const x=n.camera.position,E=n.camera.getWorldDirection(new O.Vector3),S=C.lines.map(G=>new O.Vector3(G.start[0],-G.start[1],-G.start[2])),k=C.lines.map(G=>new O.Vector3(G.end[0],-G.end[1],-G.end[2])),[j]=S.concat(k).sort((G,Z)=>{const Q=G.clone().setY(0).sub(x).normalize().angleTo(E.clone().setY(0)),B=Z.clone().setY(0).sub(x).normalize().angleTo(E.clone().setY(0));return Q-B}),_=C.lines.map(G=>{var fe,Ae;const Z=G.start,Q=G.end,{startLeft:B,startTop:R,distance:W,deg:H,visible:te,labelOffset:X,ruleLength:J}=h(new O.Vector3(Z[0],-Z[1],-Z[2]),new O.Vector3(Q[0],-Q[1],-Q[2]),j),he=[];return G.children&&((fe=G.children)==null?void 0:fe.length)>0&&((Ae=G.children)==null||Ae.forEach(xe=>{const Te=xe.start,Ge=xe.end,{distance:ue}=u(new O.Vector3(Te[0],-Te[1],-Te[2]),new O.Vector3(Ge[0],-Ge[1],-Ge[2]));he.push({width:ue,state:xe.state})})),{width:W,left:B,top:R,rotateDeg:H,state:G.state,children:he,labelOffset:X,visible:te,labelElement:s.distanceText(J)}});e(0,r=_)},f=()=>ni(d),p=Ui(d,80);return Ue(()=>{d(),n.on("panoArrived",d),n.on("modeChange",d),n.on("cameraDirectionUpdate",f),n.on("movingToPano",f),n.on("mouseWheel",()=>p()),n.on("pinchGesture",()=>p())}),wt(()=>{n.off("panoArrived",d),n.off("modeChange",d),n.off("cameraDirectionUpdate",f),n.off("movingToPano",f),n.off("mouseWheel",()=>p()),n.off("pinchGesture",()=>p())}),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 Lh extends re{constructor(t){super(),se(this,t,Dh,xh,oe,{five:1,rulerDatas:2,options:3})}}class Sh{constructor(t,e){m(this,"five");m(this,"container",document.createElement("div"));m(this,"panoRulerProData");m(this,"rulerItems");m(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=F(F({},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",()=>N(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 N(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 N(this,null,function*(){var t;if(this.state.enabled){if(!this.panoRulerProData||!this.container)return;this.rulerItems=new Lh({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 Mh=(i,t)=>new Sh(i,t),zh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaAiGS1nok9WkFAUJb8Upa6Y3Uo2kEQiRNd08qd0YEQiJnBD+37guBEElf/ZXang6BEMnpsM6dOkcgRNJ5B66x+nrjLmsTX1J6bSJHZ7+o9HklynWaOse1eKcc+XVlvxYFEnlfaThWfb7mcs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QDi+ngdAGTWVfGKsHOB+GBCV1dgycE5EZDufs/31+D9r8vJg8BSCFT2kojN3K4vvBQm3E3Zy0WIRICwVRcwSFPbdu194LKt+kEdtT/SIQLS4Tddbenohy4nDwKnQGAPG4rdZALehA09KpGo8bhou9iUbbs0/jMNTscBdRgJAm0hIF1+wzWSrt52OXkQOCUC0kNsNNuHsatz24iHqI709GxLAjcmktJQEwj5WPA+aCiuWB4YHKOT4yYRkF7zUNkg0lueSI4EgbMiIJ1kZyshL9LUOjNEwkT9sXT2pBP1VyaSQiCse9Coqa27LApBIPE+BEKkLwSk32zRHESDkp0zkSDQBALF9uKdYHunnkthwo7tfXQqQjmYSNQImBACIU2xIuGreB8CIdIvAtJzNogMosHI4mYkCDSHgPTUXspU2ItoEIvzEArlxWRvIlGFWTSnsnWF+b1dKAhk8QrrHpEgsDgC0ndi0oNoEBIuiASBZhGQvnqCz/KCJ/jYZtto7DPRoUU2N11LJIXxqNyUC0VFqeCTpRlP94gEgZMhIL0nbDCIdJswQSQINI9AIRRsNRP+KfvOkgNrKEddr5660YUqw3k8EAhkbvsuCztPVSF7JDqMBIF1IKAxcOl5S8eZLEWCQDcIFBtO2Kv2UOr645lAKkex4VeIpLo5jHbls1KD4eYaWIu4R+UeyYLA2RHQWGAADiJ9P9u2StcheRB4VQSkyzgD2PQppwBH4MaEMpBFRSDcqCYQx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC";function Th(){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(${zh})`,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 Bh=new I.TextureLoader;function ir(i){return N(this,null,function*(){return new Promise((t,e)=>{Bh.load(i,t,void 0,e)}).then(t=>(t.encoding=I.sRGBEncoding,t))})}const li={userAction:!0};class jh extends Bt{constructor(e,n){super(e);m(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"}});m(this,"data");m(this,"group",new I.Group);m(this,"roomInfoInstance");m(this,"roomInfoWrapperInstance");m(this,"compassMeshTween");m(this,"compassMesh");m(this,"entryDoorMesh");m(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)});m(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)});m(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)});m(this,"_enable",()=>{this.five.scene.add(this.group),this.init(),this.onFivePanoArrived(this.five.panoIndex||0),this._addEventListener()});m(this,"_disable",()=>{this._clearCompassIfNeed(),this._clearEntryDoorIfNeed(),this.five.scene.remove(this.group),this._removeEventListener()});m(this,"_toggleVisible",()=>{this.group.visible=this.state.visible,this.five.needsRender=!0});m(this,"_clearCompassIfNeed",()=>{var e;this.compassMesh&&(this.group.remove(this.compassMesh),(e=this.compassMesh.material.map)==null||e.dispose(),this.compassMesh=null)});m(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)});m(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}))});m(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=_s(1e3).onUpdate(({progress:h})=>{var d;(d=this.compassMesh)==null||d.material.setValues({opacity:h}),this.five.needsRender=!0}).play())),this.entryDoorMesh){const d=new I.Vector3(this.data.entrance.position.x,this.data.entrance.position.y,this.data.entrance.position.z).clone().setY(n.y).sub(n).normalize(),f=n.clone().add(d.clone().multiplyScalar(.7)).setY(n.y+.01);this.entryDoorMesh.rotation.z=new I.Vector3(0,0,-1).angleTo(d),this.entryDoorMesh.position.copy(f),((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});m(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())});m(this,"onFiveModeChange",(e,n,o,s,r)=>{e!==n&&this.setState({visible:e===me.Five.Mode.Panorama},{userAction:r})});this.five.scene.add(this.group),this.five.once("dispose",this.dispose),this.setState({visible:!0,enabled:!0,config:F(F({},this.state.config),n||{})})}enable(e=li){this.setState({enabled:!0},e)}disable(e=li){this.setState({enabled:!1},e)}show(e=li){if(!!this.state.enabled)return this.setState({visible:!0},e),Promise.resolve()}hide(e=li){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:F(F({},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 N(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=F({},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 N(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=Th(),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 N(this,null,function*(){const e=this.state.config.compassImageUrl,n=yield ir(e),o=new I.CircleGeometry(.7,32),s=new I.MeshBasicMaterial({map:n,transparent:!0,opacity:0,depthTest:!1}),r=new I.Mesh(o,s);return r.name="pano-compass-mesh",r})}loadEntryDoorMesh(){return N(this,null,function*(){const e=this.state.config.entryDoorImageUrl,n=yield ir(e),o=new I.PlaneGeometry(.2,.16),s=new I.MeshBasicMaterial({map:n,transparent:!0,opacity:.8,depthTest:!1}),r=new I.Mesh(o,s);return r.name="pano-compass-entry-door",r})}loadRoomInfo(){const e=[new I.Vector3(-.7,0,-.7),new I.Vector3(.7,0,-.7),new I.Vector3(.7,0,.7),new I.Vector3(-.7,0,.7)];return Nt(this.five).create3DDomContainer(e)}}const Vh=(i,t)=>new jh(i,t);function ci(i,t,e){const n=i[t],o=i[e];n===void 0||o===void 0||(i[t]=o,i[e]=n)}function Qh(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;ci(i,a*4+0,l*4+0),ci(i,a*4+1,l*4+1),ci(i,a*4+2,l*4+2),ci(i,a*4+3,l*4+3)}}}class or{constructor(t,e){m(this,"width");m(this,"height");m(this,"containerDom");m(this,"hooks",new me.Subscribe);m(this,"canvas",document.createElement("canvas"));m(this,"five");m(this,"scale");m(this,"config");m(this,"offset",{x:0,y:0});m(this,"context");m(this,"renderCenter",new I.Vector3);m(this,"hammer");m(this,"state",{enabled:!1});m(this,"offsetRange");m(this,"isPanning",!1);m(this,"onPanstart",()=>{this.isPanning=!0,this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)"});m(this,"onPan",t=>{if(!this.isPanning||!this.offsetRange||this.hooks.emit("wantsPanGesture",t))return;const{translateX:n,translateY:o}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${n}px, ${o}px, 100px)`});m(this,"onPanend",t=>{if(this.isPanning=!1,this.canvas.style.boxShadow="none",!this.offsetRange)return;const{translateX:e,translateY:n}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${e}px, ${n}px, 100px)`,this.offset={x:e,y:n}});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 hn.default(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panstart",this.onPanstart),this.hammer.on("panend",this.onPanend)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){if(!this.state.enabled)return this.state.enabled=!0,this.containerDom&&this._appendTo(this.containerDom),this}disable(){if(!!this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){return this.containerDom=t,this.state.enabled&&this._appendTo(t),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())}renderWithScreenPoint(t){!this.containerDom||!this.state.enabled||(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}resetOffset(){this.offset={x:0,y:0},this.canvas.style.transform=`translate3d(${0}px, ${0}px, 100px)`}getCurrentState(){return{enabled:this.state.enabled}}getRenderCenter(){return this.renderCenter}_appendTo(t){if(this.resetOffset(),t.appendChild(this.canvas),!this.offsetRange){const e=this.canvas.getBoundingClientRect(),n=t.getBoundingClientRect(),o=n.right-e.right,s=n.bottom-e.bottom,r=n.left-e.left,a=n.top-e.top;this.offsetRange={min:{x:r,y:a},max:{x:o,y:s}}}}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,[n,o,s]=(()=>{if(this.renderCenter instanceof I.Vector3){const r=this.renderCenter.clone().project(this.five.camera);return[(r.x+1)/2*this.containerDom.clientWidth,-(r.x-1)/2*this.containerDom.clientWidth,-(r.y-1)/2*this.containerDom.clientHeight]}else return[this.renderCenter.x,this.containerDom.clientWidth-this.renderCenter.x,this.renderCenter.y]})();n<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=90+"px"):s<183?(this.canvas.style.top=90+"px",this.canvas.style.left=-t/2+"px"):o<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(${n}px, ${s}px, 10px)`,this.offset={x:n,y:s}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:n,height:o}=this,s=this.five.renderer.getSize(new I.Vector2),[r,a]=(()=>{if(this.renderCenter instanceof I.Vector3){const g=this.renderCenter.clone().project(this.five.camera);return[(g.x+1)/2*s.x,(g.y+1)/2*s.y]}else return[this.renderCenter.x,s.y-this.renderCenter.y]})(),l=1,c=n/t,u=o/t,h=l*t,d=this.five.getPixels(r-c/2,a-c/2,c,u,h),f=Math.floor(n*l),p=Math.floor(o*l);Qh(d,f,p);const v=new ImageData(f,p);v.data.set(d),e.putImageData(v,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")}getPanOffset(t,e){const{min:{x:n,y:o},max:{x:s,y:r}}=e,a=this.offset.x+t.deltaX,l=this.offset.y+t.deltaY,c=Math.min(Math.max(a,n),s),u=Math.min(Math.max(l,o),r);return{translateX:c,translateY:u}}}class Oh{constructor(t){m(this,"edges",[]);m(this,"five");m(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 O.Vector3),r=s.distanceTo(t.point);r<e&&(n=s,e=r)}),e>.1?null:n||null}}function Rh(i,t){for(let e=0,n=t.length;e<n;e++)if(i===t[e])return t.splice(e,1)[0]}class Ze{constructor(t){m(this,"id");m(this,"lines");m(this,"position");m(this,"type","point");this.id=Ne(),this.lines=[],this.position=new O.Vector3,t instanceof O.Vector3?this.position.copy(t):this.position.fromArray(t)}toJson(){return{id:this.id,position:this.position.toArray()}}addLine(t){this.lines.push(t)}removeLine(t){Rh(t,this.lines)}clone(){return new Ze(this.position)}}class ui{constructor(t){m(this,"id",Ne());m(this,"lines",[]);m(this,"points",[]);m(this,"visiblePanoIndexes");m(this,"model");m(this,"type","polyline");m(this,"hook",new me.Subscribe);this.model=t.model}addLine(t){if(this.includes(t)){console.error(new Error("\u4E0D\u80FD\u91CD\u590D\u6DFB\u52A0\u7EBF\u6BB5"));return}const e=this.getLastPoint(),n=e&&t.findAnotherPoint(e);e?e&&n?(this.lines.push(t),this.points.push(...t.points),this.hook.emit("lineAdded",t)):console.error(new Error("\u4F20\u5165\u7EBF\u6BB5\u65E0\u6CD5\u4E0E\u5F53\u524D\u6298\u7EBF\u8FDB\u884C\u8FDE\u63A5")):(this.lines.push(t),this.points.push(...t.points),this.hook.emit("lineAdded",t))}removeLine(t){if(this.lines.length!==0){if(!this.isLastLine(t)){console.error(new Error("\u4F20\u5165\u7EBF\u6BB5\u4E0D\u662F\u5F53\u524D\u6298\u7EBF\u7684\u6700\u540E\u4E00\u6BB5"));return}this.lines.pop(),this.lines.length===0?this.points.slice(0,this.points.length):this.points.pop(),this.hook.emit("lineRemoved",t)}}isLastLine(t){const e=this.getLastLine();return e?t.id===e.id:!1}getLastLine(){return this.lines.slice(-1)[0]}clear(){this.lines.slice(0,this.lines.length),this.points.slice(0,this.points.length)}overlapWith(t){return t.type==="point"?this.includes(t):t.type==="line"?t.points.some(e=>this.includes(e)):t.type==="polyline"?t.points.some(e=>this.includes(e)):!0}includes(t){return t.type==="point"?this.points.find(({id:e})=>e===t.id)!==void 0:t.type==="line"?this.lines.find(({id:e})=>e===t.id)!==void 0:!1}isEmpty(){return this.points.length===0}getLastPoint(){return this.points.slice(-1)[0]}toJson(){return{id:this.id,lines:this.lines.map(t=>t.toJson()),visiblePanoIndexes:this.visiblePanoIndexes}}getPointByID(t){return this.points.find(({id:e})=>e===t)}fromJson(t){this.clear(),this.id=t.id;const{getPoint:e,getAllPoints:n}=r(),o=t.lines.map(a=>{const[l,c]=a.points,u=e(l),h=e(c);if(!u||!h)throw new Error("\u7EBF\u4E0A\u7684\u70B9\u4E0D\u5B58\u5728");const d=new jt(u,h,this.model);return d.id=a.id,d.text=a.text,d}),s=n();this.points.push(...s),this.lines.push(...o),this.visiblePanoIndexes=t.visiblePanoIndexes;function r(){const a=new Map;function l(u){const h=a.get(u.id);if(h)return h;const d=new Ze(u.position);return d.id=u.id,a.set(u.id,d),d}function c(){return Array.from(a.values())}return{getPoint:l,getAllPoints:c}}return this}replace(t){this.id=t.id,this.clear(),this.lines.push(...t.lines),this.points.push(...t.points)}}const Fh=1,Gh=3,Hh=new O.Color(16777215),Wh=new O.Color(6522623),Nh=new O.Color(16777215),_h=new O.Color(6522623),Xh=6,Yh=8,Uh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAG/Py2baba05un7UgfgAAAHJJREFUKM9joBpgLHVSCRdA4metAoJlCJHmVWBgAeNzroKCCVCBLpjACqgJVjCBxRBT2FbBQQJYQAohsBAsUIUQWA4WiEIILAULeCEEloAFtBACizAEMLRgGIphLabDMJ2O6TlM72MGECIIMQIZIxqoBQCPvpJ/e9FaAAAAAABJRU5ErkJggg==",sr=new O.TextureLoader().load(Uh),rr={pointTexture:sr,pointSize:Xh,lineWidth:Fh,lineColor:Hh,pointColor:Nh,lineRenderOrder:20,pointsRenderOrder:20};ge(F({},rr),{dashed:!0});const Jh={pointTexture:sr,pointSize:Yh,lineWidth:Gh,lineColor:Wh,pointColor:_h,lineRenderOrder:10,pointsRenderOrder:10};function Zh(i,t,e){var u,h,d,f,p;const n=(u=e==null?void 0:e.lineWidth)!=null?u:2,o=(h=e==null?void 0:e.lineColor)!=null?h:new O.Color(16777215),s=(d=e==null?void 0:e.pointSize)!=null?d:5,r=(f=e==null?void 0:e.lineRenderOrder)!=null?f:10,a=(p=e==null?void 0:e.lineRenderOrder)!=null?p:20,l=new Sn.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 ar(i,t){const[e,n]=i.points,o=t==="light"?Jh:rr,s=Zh(e.position,n.position,o);return s.name="normalLine_"+i.id,s}function xt(i){const{x:t,y:e,z:n}=i;return!(Math.abs(t)>1||Math.abs(e)>1||Math.abs(n)>1)}function qh(){const i=document.createElement("div");return i.setAttribute("style","backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);-webkit-tap-highlight-color: rgba(0,0,0,0);"),i.style.width="max-content",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.cursor="pointer",i}function Kh(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.width="0",t.style.height="0",t.style.transform="translate3d(0, 0, 0)",t.style.transformOrigin="left top",t}function $h(i){let t=!0;const{line:e}=i,n=e.id,o=qh(),s=Kh(e),r=i.userDistanceItem,a=new O.Vector3(0,0,0),l={lineID:n,ndcPosition:a,update:d,appendTo:f,remove:p,highlight:u,unHighlight:h,getCurrentContent:v,setItemSelectable:g};s.style.pointerEvents=t?"all":"none",r!=null&&r.element?s.appendChild(r.element):s.appendChild(o);function c(){var A;(A=i.clickCallback)==null||A.call(i,l)}function u(){if(r)return r.highlight();o.style.border="0.5px solid #95AEFF",o.style.background="linear-gradient(90deg, #95AEFF 0%, #6386FF 100%)"}function h(){if(r)return r.unHighlight();o.style.border="0.5px solid rgba(255,255,255,0.6)",o.style.background="rgba(195,195,195,0.70)"}function d(A){if(e.mesh.visible===!1){s.style.opacity="0",s.style.pointerEvents="none";return}const y=A.getElement();if(!y)return;const w=y.clientWidth,C=y.clientHeight,x=w/2,E=C/2;if(e.points.length<2)return;const[S,k]=e.points,j=S.position.clone().project(A.camera),_=k.position.clone().project(A.camera),G=j.clone().lerp(_,.5),Z=new O.Vector2(j.x*x,j.y*E),Q=new O.Vector2(_.x*x,_.y*E),B=Z.distanceTo(Q);if((()=>!(Math.abs(j.z)>1||Math.abs(_.z)>1||!xt(j)&&!xt(_)||!xt(G)||B===0))()===!1){s.style.opacity="0",s.style.pointerEvents="none";return}const W=(G.x+1)/2*w,H=-(G.y-1)/2*C,X=-(Math.atan((Z.y-Q.y)/(Z.x-Q.x))*180)/Math.PI,J=s.parentElement&&o.clientWidth>B?-20:0;s.style.transform=`translate(${W}px, ${H}px) rotate(${X}deg) translateY(${J}px)`,s.style.opacity="1",s.style.pointerEvents=t?"all":"none",r&&r.update({line:e,polyline:e.getPolyline()});const he=v();o.innerText=he}function f(A){A.appendChild(s),s.addEventListener("click",c)}function p(){o.removeEventListener("click",c),s.remove()}function v(){var S,k,j;if(e.points.length<2)return"";const[A,y]=e.points,w=A.position.clone().distanceTo(y.position),C=(S=i.line.text)!=null?S:i.line.model.config.defaultText,x=(j=(k=i.line.model.config)==null?void 0:k.getDistanceText)==null?void 0:j.call(k,w),E=C!=null?C:x;return E!=null?E:w.toFixed(2)+"m"}function g(A){t=A}return l}class jt{constructor(t,e,n){m(this,"id");m(this,"selected",!1);m(this,"text");m(this,"type","line");m(this,"model");m(this,"mesh");m(this,"points");m(this,"lightMesh");m(this,"hook");m(this,"distanceItem");m(this,"polyline");var o;if(this.id=Ne(),this.model=n,t.id===e.id)throw new Error("\u65E0\u6548\u7684\u7EBF\u6BB5, \u4E00\u4E2A\u70B9\u65E0\u6CD5\u6784\u6210\u7EBF\u6BB5");typeof n.config.defaultText=="string"&&(this.text=n.config.defaultText),this.hook=new me.Subscribe,this.points=[t,e],this.mesh=ar(this,"normal"),this.lightMesh=ar(this,"light"),this.distanceItem=$h({line:this,clickCallback:()=>this.hook.emit("selected",this),userDistanceItem:(o=this.model.config)!=null&&o.userDistanceItemCreator?this.model.config.userDistanceItemCreator():void 0}),t.lines.push(this),e.lines.push(this)}clear(){this.selected=!1,this.polyline=void 0}isEmpty(){return this.points.length===0}getPolyline(){if(this.polyline)return this.polyline;const t=this.model.polylines.find(e=>e.lines.includes(this));if(t)return this.polyline=t,t}findAnotherPoint(t){return this.points.find(({id:e})=>e!==t.id)}setText(t){this.text=t,this.hook.emit("textChanged",t)}toJson(){return{id:this.id,points:this.points.map(t=>t.toJson()),text:this.text}}clone(){const t=new jt(this.points[0].clone(),this.points[1].clone(),this.model);return t.text=this.text,t}}class di{constructor(t){m(this,"config");m(this,"polylines",[]);m(this,"hook",new me.Subscribe);this.config=t}addPolyline(t){if(this.includes(t)){console.error(new Error("\u4E0D\u80FD\u91CD\u590D\u6DFB\u52A0 polyline"));return}this.polylines.push(t),this.hook.emit("polylineAdded",t)}replacePolylineByID(t,e){const n=this.getPolylineByID(t);n==null||n.replace(e)}removePolyline(t){const e=this.polylines.findIndex(({id:n})=>n===t.id);if(e===-1){console.error(new Error("polyline \u4E0D\u5B58\u5728"));return}this.polylines.splice(e,1),this.hook.emit("polylineRemoved",t)}getPolylineByID(t){return this.polylines.find(e=>e.id===t)}getPolylineByLine(t){return this.polylines.find(e=>e.includes(t))}getLineByID(t){return this.getAllLines().find(e=>e.id===t)}getAllLines(){return this.polylines.map(t=>t.lines).flat(1)}getAllPoints(){return this.polylines.map(t=>t.points).flat(1)}includes(t){return this.polylines.find(({id:e})=>e===t.id)!==void 0}clear(){this.polylines.forEach(t=>this.hook.emit("polylineRemoved",t)),this.polylines.splice(0,this.polylines.length)}getClosestPoint(){}parse(t){this.clear(),this.polylines.push(...t.polylines.map(e=>new ui({model:this}).fromJson(e))),this.polylines.forEach(e=>this.hook.emit("polylineAdded",e))}toJson(){return{polylines:this.polylines.map(t=>t.toJson()).filter(t=>t.lines.length>0)}}}const hi=i=>i.preventDefault();class fi{constructor(t){m(this,"model");m(this,"five");m(this,"group");m(this,"config");m(this,"dashed");m(this,"disposed",!1);m(this,"isMobile");m(this,"mouseGroup");m(this,"container");m(this,"fiveHelper");m(this,"hook");m(this,"magnifier");m(this,"userDistanceItemCreator");m(this,"updateDistanceUI",()=>{this.dashed.distanceItem.update(this.five),this.model.getAllLines().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 jt(new Ze([0,0,0]),new Ze([0,0,0]),this.model),this.dashed.distanceItem.setItemSelectable(!1),this.dashed.mesh.setMaterial({dashed:!0,dashScale:100}),this.dashed.mesh.name="dashLine";const e=this.five.getElement();e&&(e.addEventListener("touchstart",hi),e.addEventListener("contextmenu",hi))}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.disable(),this.model.getAllLines().forEach(e=>this.removeLine(e));const t=this.five.getElement();t&&(t.removeEventListener("touchstart",hi),t.removeEventListener("contextmenu",hi))}}function $i(i){const{x:t,y:e}=i.center,{clientWidth:n,clientHeight:o}=i.target,s=i.target.getBoundingClientRect(),r=new O.Vector2(t,e).sub(new O.Vector2(s.left,s.top)),a=new O.Vector2(r.x/n*2-1,-(r.y/o)*2+1);return{point:r,ndcPoint:a}}function eo(i,t){const e=$i(t).ndcPoint,n=new O.Raycaster;return n.setFromCamera(e,i.camera),i.model.intersectRaycaster(n)}class mi extends fi{constructor(e){var o;super(e);m(this,"type","edit");m(this,"polyline");m(this,"pressPoint");m(this,"hasAppendDashed",!1);m(this,"hasAppendMouseGroup",!1);m(this,"fiveElement");m(this,"lastPoint",null);m(this,"hammer");m(this,"onIntersectionUpdate",Ui((e,n)=>{var s;this.hasAppendMouseGroup===!1&&(this.group.add(this.mouseGroup),this.magnifier.appendTo(this.container),this.magnifier.enable(),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));m(this,"revoke",()=>{if(this.polyline.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.hook.emit("editedDashedLineChange",null),this.five.needsRender=!0;return}if(this.polyline.lines.length===0&&!this.lastPoint||!this.lastPoint)return;const e=this.polyline.lines[this.polyline.lines.length-1],n=e.findAnotherPoint(this.lastPoint);!n||(this.lastPoint=n,this.hook.emit("anchorChange",n.position),this.group.remove(e.mesh),this.polyline.removeLine(e),this.hasAppendMouseGroup=!1,this.mouseGroup.position.copy(this.lastPoint.position),this.group.remove(this.mouseGroup),e.distanceItem.remove(),this.updateDashed(),this.magnifier.disable(),this.five.needsRender=!0)});m(this,"onMouseLeave",()=>{this.magnifier.disable(),this.group.remove(this.mouseGroup),this.hasAppendMouseGroup=!1,this.lastPoint&&(this.mouseGroup.position.copy(this.lastPoint.position),this.updateDashed())});m(this,"onLineChanged",()=>{this.hook.emit("editedPolylineChange",this.polyline)});m(this,"onPress",e=>{const[n]=eo(this.five,e);if(!(n!=null&&n.face))return;const o=new Ze(n.point);this.pressPoint=o,this.onIntersectionUpdate(n)});m(this,"onPan",e=>{if(!this.pressPoint)return;const[n]=eo(this.five,e);!(n!=null&&n.face)||this.onIntersectionUpdate(n)});m(this,"onPanEnd",e=>{!this.pressPoint||this.onTap(e)});m(this,"onTap",e=>{this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh)),this.hasAppendDashed=!0;const[n]=eo(this.five,e);this.updateMouseGroup(n);const o=new Ze(this.mouseGroup.position),s=this.lastPoint;if(o&&(this.lastPoint=o),o&&s){const r=new jt(s,o,this.model);r.distanceItem.setItemSelectable(!1),r.distanceItem.appendTo(this.container),this.polyline.addLine(r),this.group.add(r.mesh),r.distanceItem.update(this.five)}this.pressPoint=void 0,this.hasAppendMouseGroup=!1,this.magnifier.disable(),this.group.remove(this.mouseGroup),this.updateDashed(),this.five.needsRender=!0,this.hook.emit("anchorChange",o.position)});m(this,"onWantsTapGesture",()=>!1);m(this,"onWantsToMoveToPano",()=>!1);m(this,"onWantsPanGesture",()=>this.pressPoint?!1:void 0);m(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});m(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.hook.emit("editedDashedLineChange",this.dashed))});this.model=new di(this.config),this.polyline=new ui({model:this.model}),this.model.addPolyline(this.polyline),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.polyline.hook.on("lineAdded",this.onLineChanged),this.polyline.hook.on("lineRemoved",this.onLineChanged);const n=this.five.getElement();if(n){this.fiveElement=n;const s=new hn.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)}this.five.helperVisible=!1,(o=this.fiveElement)==null||o.addEventListener("mouseleave",this.onMouseLeave),this.hook.emit("anchorChange",null),this.hook.emit("editedDashedLineChange",null),this.five.refresh()}dispose(){var e,n;super.dispose(),this.five.helperVisible=!0,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.polyline.hook.off("lineAdded",this.onLineChanged),this.polyline.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.polyline.lines}}class lr extends fi{constructor(e){super(e);m(this,"type","view");m(this,"hammer");m(this,"polylineRemoved",e=>{e.lines.forEach(n=>this.removeLine(n)),this.hook.emit("selectedChange",this.model.getAllLines().filter(n=>n.selected).map(n=>n))});m(this,"polylineAdded",e=>{const n=this.five.getCurrentState().panoIndex;e.lines.forEach(o=>{e.visiblePanoIndexes&&!e.visiblePanoIndexes.includes(n)&&(o.mesh.visible=!1),o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),this.group.add(o.mesh)})});m(this,"onCameraUpdate",()=>{this.updateDistanceUI()});m(this,"onFivePanoWillArrive",e=>{this.model.polylines.forEach(n=>{!n.visiblePanoIndexes||n.visiblePanoIndexes.includes(e)||n.lines.forEach(o=>{o.mesh.visible=!1,o.distanceItem.update(this.five)})})});m(this,"onFivePanoArrived",e=>{this.model.polylines.forEach(n=>{!n.visiblePanoIndexes||n.visiblePanoIndexes.includes(e)&&n.lines.forEach(o=>{o.mesh.visible=!0,o.distanceItem.update(this.five)})})});this.model.getAllLines().forEach(o=>{o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),this.group.add(o.mesh)});const n=this.five.getElement();if(n){const o=new hn.default(n);this.hammer=o}this.onFivePanoWillArrive(this.five.getCurrentState().panoIndex),this.onFivePanoArrived(this.five.getCurrentState().panoIndex),this.updateDistanceUI(),this.five.needsRender=!0,this.model.hook.on("polylineAdded",this.polylineAdded),this.model.hook.on("polylineRemoved",this.polylineRemoved),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive)}dispose(){var e;super.dispose(),this.model.hook.off("polylineAdded",this.polylineAdded),this.model.hook.off("polylineRemoved",this.polylineRemoved),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.needsRender=!0,this.hook.emit("selectedChange",[]),(e=this.hammer)==null||e.destroy()}}const ef=`
|
|
208
|
+
`,y=document.createElement("div");return y.setAttribute("class","PanoRulerPlugin-rule"),y.setAttribute("data-name",v),y.setAttribute("style","display: none"),y.innerHTML=A,y},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=Ah,o.appendChild(s);const r={},a=(v,g)=>{if(e.loaded)throw new Error("\u6807\u5C3A\u88AB\u91CD\u590D\u521D\u59CB\u5316\uFF01");const A=bh(v,i),y=i.work;if(!y)return!1;for(const w in g){const C=g[w],{standingPosition:x}=y.observers[0],E=C.map(({x:S,z:k,observers:j})=>{const _=j.length>0?v.rooms[v.observers[j[0]]].name:"",G=A[_]?A[_].floor:null;let Z=1/0,Q={index:0,x:x.x,y:x.y,z:x.z};j.forEach(X=>{if(!y.observers[X])return;const{standingPosition:J}=y.observers[X],he={index:X,x:J.x,y:J.y,z:J.z},fe=vh({x:S,z:k},he);G?fe<Z&&Math.abs(he.y-G)<.3&&(Z=fe,Q=he):fe<Z&&(Z=fe,Q=he)});const B=new O.Vector3(S,Q.y,k);Object.assign(B,{observers:j});const R=A[_]?A[_].roof:null,W=R?new O.Vector3(S,R,k):null;return W&&Object.assign(W,{observers:j}),{origin:B,vertical:W}});r[w]={origins:E.map(S=>S.origin),rules:[]};for(const{origin:S,vertical:k}of E){if(!k)continue;const j=n(w,S.distanceTo(k));o.append(j),r[w].rules.push({vertical:!0,rule:[S,k],$element:j})}for(let S=0;S<E.length;S++){let k=S+1;k>=E.length&&(k=0);const{origin:j}=E[S],{origin:_}=E[k],G=n(w,j.distanceTo(_));o.append(G),r[w].rules.push({vertical:!1,rule:[j,_],$element:G})}}return e.loaded=!0,!0},l=(v,g,A)=>N(this,null,function*(){const y=v||t.roomInfo,w=g||t.roomRules;if(!y||!w)throw new Error("\u6807\u5C3A\u6570\u636E\u4F9D\u8D56\u4E0D\u9F50\u5168\uFF01");return e.loaded=!1,e.options=F(F({},e.options),A||{}),i.model.loaded?a(y,w):yield new Promise(C=>i.once("modelLoaded",()=>C(a(y,w))))});t.roomInfo&&t.roomRules&&l(t.roomInfo,t.roomRules);const c=(v,g,A,y)=>{const w=[[{x:0,y:0},{x:A,y:0}],[{x:0,y:0},{x:0,y}],[{x:A,y:0},{x:A,y}],[{x:0,y},{x:A,y}]],C=[];for(let x=0;x<w.length;x++){const E=qs([v,g],[w[x][0],w[x][1]],!0);E&&C.push(E)}return C.length===0?!1:C},u=()=>{var j;const v=(j=i.getElement())==null?void 0:j.parentElement;if(!v||!e.loaded||Object.keys(r).length<=0)return;const{panoIndex:g,camera:A,currentMode:y}=i;if(g===void 0)return;let w;for(const _ in r)_.split(",").indexOf(g.toString())>=0&&(w=_);if(!w){for(const _ in r)for(const{$element:G}of r[_].rules)G.style.display="none";return}const C=A.position,x=A.getWorldDirection(new O.Vector3),E=v.clientWidth,S=v.clientHeight;if(y!==me.Five.Mode.Panorama){for(const _ in r)for(const{$element:G}of r[_].rules)G.style.display="none";return}for(const _ in r)for(const{$element:G}of r[_].rules)G.style.display=_===w?"block":"none";const[k]=r[w].origins.slice().filter(_=>_.observers.indexOf(g)>=0).sort((_,G)=>{const Z=_.clone().setY(0).sub(C).normalize().angleTo(x.clone().setY(0)),Q=G.clone().setY(0).sub(C).normalize().angleTo(x.clone().setY(0));return Z-Q});for(const{rule:_,vertical:G,$element:Z}of r[w].rules){const[Q,B]=_,R=Z.querySelector(".PanoRulerPlugin-rule-line");if(!R)return;if(!k){Z.style.display="none";continue}if(Q!==k&&B!==k){Z.style.display="none";continue}if(Q.distanceTo(B)<.3){Z.style.display="none";continue}if(Q.observers.indexOf(g)===-1||B.observers.indexOf(g)===-1){Z.style.display="none";continue}if(Q.clone().sub(C).normalize().angleTo(x)>Math.PI/2){Z.style.display="none";continue}if(B.clone().sub(C).normalize().angleTo(x)>Math.PI/2){Z.style.display="none";continue}const te=Q.distanceTo(B);if(B.clone().sub(B.clone().sub(Q).divide(new O.Vector3(2,2,2))).distanceTo(C)/te>8){Z.style.display="none";continue}const he=Q.clone().project(A),fe=(he.x+1)/2*E,Ae=(-he.y+1)/2*S,xe=B.clone().project(A),Te=(xe.x+1)/2*E,Fe=(-xe.y+1)/2*S,ue=Math.sqrt(Math.pow(Te-fe,2)+Math.pow(Fe-Ae,2));let we=ue,Ee=50;const de=c({x:~~fe,y:~~Ae},{x:~~Te,y:~~Fe},E,S);if(de&&de.length===1&&(k===Q?(we=Math.sqrt(Math.pow(de[0].x-fe,2)+Math.pow(de[0].y-Ae,2)),Ee=we/ue*50):k===B&&(we=Math.sqrt(Math.pow(de[0].x-Te,2)+Math.pow(de[0].y-Fe,2)),Ee=100-we/ue*50)),de&&de.length===2){const ie={x:(de[0].x+de[1].x)/2,y:(de[0].y+de[1].y)/2};Ee=Math.sqrt(Math.pow(ie.x-fe,2)+Math.pow(ie.y-Ae,2))/ue*100}const mt=(Math.PI/2-Math.atan2(Te-fe,Ae-Fe))/Math.PI*180,ye=R.querySelector(".PanoRulerPlugin-rule-label"),it=ye.children[0].clientWidth;it>=ue||it/2>=Ee/100*ue||it/2>=(1-Ee/100)*ue?R.style.display="none":(R.style.display="block",R.style.width=ue+"px",R.style.left=fe+"px",R.style.top=Ae+"px",R.style.transform=`rotate(${-mt}deg)`,ye.style.left=`${Ee}%`)}},h=()=>Ks(u),d=()=>{var v,g;return e.loaded?(e.enable||(o.setAttribute("class","PanoRulerPlugin"+(e.options.className?" "+e.options.className:"")),(g=(v=i.getElement())==null?void 0:v.parentElement)==null||g.append(o),u(),i.on("modeChange",u),i.on("cameraUpdate",h),e.enable=!0),!0):!1},f=()=>(e.enable&&(i.off("modeChange",u),i.off("cameraUpdate",h),o&&o.remove(),e.enable=!1),!0);function p(v){if(v.distanceText&&v.distanceText!==e.options.distanceText){const g=v.distanceText;e.options.distanceText=g,Object.values(r).forEach(A=>{A.rules.forEach(y=>{const[w,C]=y.rule,x=w.distanceTo(C),E=y.$element.querySelector(".PanoRulerPlugin-rule-label-name");!E||(E.innerText=g(x))})})}}return{enable:d,disable:f,load:l,state:e,changeConfigs:p}};function wh(i){ce(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 $s(i,t,e){const n=i.slice();return n[6]=t[e],n}function Ch(i){let t,e=i[0].children,n=[];for(let o=0;o<e.length;o+=1)n[o]=er($s(i,e,o));return{c(){t=T("div");for(let o=0;o<n.length;o+=1)n[o].c();b(t,"class","rule-mixed-line svelte-1h27ktp")},m(o,s){z(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=$s(o,e,r);n[r]?n[r].p(a,s):(n[r]=er(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&&M(t),dt(n,o)}}}function Ph(i){let t,e;return{c(){t=T("em"),b(t,"class",e=Qe(i[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),b(t,"style",i[3])},m(n,o){z(n,t,o)},p(n,o){o&1&&e!==(e=Qe(n[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&b(t,"class",e),o&8&&b(t,"style",n[3])},d(n){n&&M(t)}}}function er(i){let t,e,n=`${i[6].width}px`;return{c(){t=T("div"),b(t,"class",e=Qe(i[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),b(t,"style",i[3]),L(t,"width",n)},m(o,s){z(o,t,s)},p(o,s){s&1&&e!==(e=Qe(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`)&&L(t,"width",n)},d(o){o&&M(t)}}}function Ih(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`,h=`${i[0].top}px`,d=`rotate(${i[0].rotateDeg}deg)`;function f(g,A){return g[0].children.length===0?Ph:Ch}let p=f(i),v=p(i);return{c(){t=T("div"),v.c(),e=ne(),n=T("div"),o=T("div"),r=De(s),b(o,"class","PanoRulerPlugin-rule-label-name svelte-1h27ktp"),ze(()=>i[4].call(o)),b(n,"class","PanoRulerPlugin-rule-label svelte-1h27ktp"),L(n,"left",l),b(t,"class","PanoRulerPlugin-rule-line svelte-1h27ktp"),L(t,"width",c),L(t,"left",u),L(t,"top",h),L(t,"transform",d),L(t,"display",i[0].visible&&i[2]?"block":"none")},m(g,A){z(g,t,A),v.m(t,null),V(t,e),V(t,n),V(n,o),V(o,r),a=bt(o,i[4].bind(o))},p(g,[A]){p===(p=f(g))&&v?v.p(g,A):(v.d(1),v=p(g),v&&(v.c(),v.m(t,e))),A&1&&s!==(s=g[0].labelElement+"")&&Me(r,s),A&1&&l!==(l=`${g[0].labelOffset}%`)&&L(n,"left",l),A&1&&c!==(c=`${g[0].width}px`)&&L(t,"width",c),A&1&&u!==(u=`${g[0].left}px`)&&L(t,"left",u),A&1&&h!==(h=`${g[0].top}px`)&&L(t,"top",h),A&1&&d!==(d=`rotate(${g[0].rotateDeg}deg)`)&&L(t,"transform",d),A&5&&L(t,"display",g[0].visible&&g[2]?"block":"none")},i:U,o:U,d(g){g&&M(t),v.d(),a()}}}function Eh(i,t,e){let n,{rulerItemProp:o}=t,s=!0,r,a="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcuNCUiIHg9Ii0xOC43JSIgeT0iLTE1MCUiPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiBvcGVyYXRvcj0iZGlsYXRlIiByYWRpdXM9Ii41IiByZXN1bHQ9InNoYWRvd1NwcmVhZE91dGVyMSIvPjxmZU9mZnNldCBpbj0ic2hhZG93U3ByZWFkT3V0ZXIxIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByYWRpdXM9IjEiIHJlc3VsdD0ic2hhZG93SW5uZXIiLz48ZmVPZmZzZXQgaW49InNoYWRvd0lubmVyIiByZXN1bHQ9InNoYWRvd0lubmVyIi8+PGZlQ29tcG9zaXRlIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIGluMj0ic2hhZG93SW5uZXIiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93T2Zmc2V0T3V0ZXIxIi8+PGZlR2F1c3NpYW5CbHVyIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIgc3RkRGV2aWF0aW9uPSIuNSIvPjxmZUNvbG9yTWF0cml4IGluPSJzaGFkb3dCbHVyT3V0ZXIxIiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMiAwIi8+PC9maWx0ZXI+PHBhdGggaWQ9InByZWZpeF9fYiIgZD0iTS44ODkgMkgxMS41OCIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1kYXNoYXJyYXk9IjUgNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48dXNlIGZpbGw9IiMwMDAiIGZpbHRlcj0idXJsKCNwcmVmaXhfX2EpIiB4bGluazpocmVmPSIjcHJlZml4X19iIi8+PHVzZSBzdHJva2U9IiNmZmYiIHN0cm9rZS1vcGFjaXR5PSIuNCIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjwvZz48L3N2Zz4=";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 kh extends re{constructor(t){super(),se(this,t,Eh,Ih,oe,{rulerItemProp:0},wh)}}function tr(i,t,e){const n=i.slice();return n[12]=t[e],n}function nr(i){let t,e;return t=new kh({props:{rulerItemProp:i[12]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.rulerItemProp=n[12]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function xh(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=nr(tr(i,n,r));const s=r=>D(o[r],1,1,()=>{o[r]=null});return{c(){t=T("div");for(let r=0;r<o.length;r+=1)o[r].c()},m(r,a){z(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=tr(r,n,l);o[l]?(o[l].p(c,a),P(o[l],1)):(o[l]=nr(c),o[l].c(),P(o[l],1),o[l].m(t,null))}for(ae(),l=n.length;l<o.length;l+=1)s(l);le()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)P(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)D(o[a]);e=!1},d(r){r&&M(t),dt(o,r)}}}function Dh(i,t,e){var v,g,A,y;let{five:n}=t,{rulerDatas:o}=t,{options:s}=t,r=[];const a=((g=(v=n.getElement())==null?void 0:v.parentElement)==null?void 0:g.clientWidth)||0,l=((y=(A=n.getElement())==null?void 0:A.parentElement)==null?void 0:y.clientHeight)||0,c=(w,C)=>{const x=[[{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}]],E=[];for(let S=0;S<x.length;S++){const k=qs([w,C],[x[S][0],x[S][1]],!0);k&&E.push(k)}return E.length===0?!1:E},u=(w,C)=>{const x=w.clone().project(n.camera),E=(x.x+1)/2*a,S=(-x.y+1)/2*l,k=C.clone().project(n.camera),j=(k.x+1)/2*a,_=(-k.y+1)/2*l,G=Math.sqrt(Math.pow(j-E,2)+Math.pow(_-S,2));return{startLeft:E,startTop:S,endLeft:j,endTop:_,distance:G}},h=(w,C,x)=>{const E=n.camera.position,S=n.camera.getWorldDirection(new O.Vector3),k=w.clone().sub(E).normalize().angleTo(S),j=C.clone().sub(E).normalize().angleTo(S),_=w.distanceTo(C),Z=C.clone().sub(C.clone().sub(w).divide(new O.Vector3(2,2,2))).distanceTo(E),{startLeft:Q,startTop:B,endLeft:R,endTop:W,distance:H}=u(w,C),X=-((Math.PI/2-Math.atan2(R-Q,B-W))/Math.PI)*180;let J=!0;x||(J=!1),!et(w,x)&&!et(C,x)&&(J=!1),_<.3&&(J=!1),k>Math.PI/2&&(J=!1),j>Math.PI/2&&(J=!1),Z/_>8&&(J=!1);let he=50,fe=H;const Ae=c({x:~~Q,y:~~B},{x:~~R,y:~~W});if(Ae&&Ae.length===1&&(et(w,x)?(fe=Math.sqrt(Math.pow(Ae[0].x-Q,2)+Math.pow(Ae[0].y-B,2)),he=fe/H*50):et(C,x)&&(fe=Math.sqrt(Math.pow(Ae[0].x-R,2)+Math.pow(Ae[0].y-W,2)),he=100-fe/H*50)),Ae&&Ae.length===2){const xe={x:(Ae[0].x+Ae[1].x)/2,y:(Ae[0].y+Ae[1].y)/2};he=Math.sqrt(Math.pow(xe.x-Q,2)+Math.pow(xe.y-B,2))/H*100}return{startLeft:Q,startTop:B,distance:H,deg:X,visible:J,labelOffset:he,ruleLength:_}},d=()=>{const w=n.panoIndex,C=o.find(G=>G.panoIndex===w);if(!C)return e(0,r=[]);if(n.currentMode!==me.Five.Mode.Panorama)return e(0,r=[]);const x=n.camera.position,E=n.camera.getWorldDirection(new O.Vector3),S=C.lines.map(G=>new O.Vector3(G.start[0],-G.start[1],-G.start[2])),k=C.lines.map(G=>new O.Vector3(G.end[0],-G.end[1],-G.end[2])),[j]=S.concat(k).sort((G,Z)=>{const Q=G.clone().setY(0).sub(x).normalize().angleTo(E.clone().setY(0)),B=Z.clone().setY(0).sub(x).normalize().angleTo(E.clone().setY(0));return Q-B}),_=C.lines.map(G=>{var fe,Ae;const Z=G.start,Q=G.end,{startLeft:B,startTop:R,distance:W,deg:H,visible:te,labelOffset:X,ruleLength:J}=h(new O.Vector3(Z[0],-Z[1],-Z[2]),new O.Vector3(Q[0],-Q[1],-Q[2]),j),he=[];return G.children&&((fe=G.children)==null?void 0:fe.length)>0&&((Ae=G.children)==null||Ae.forEach(xe=>{const Te=xe.start,Fe=xe.end,{distance:ue}=u(new O.Vector3(Te[0],-Te[1],-Te[2]),new O.Vector3(Fe[0],-Fe[1],-Fe[2]));he.push({width:ue,state:xe.state})})),{width:W,left:B,top:R,rotateDeg:H,state:G.state,children:he,labelOffset:X,visible:te,labelElement:s.distanceText(J)}});e(0,r=_)},f=()=>ni(d),p=Ui(d,80);return Ue(()=>{d(),n.on("panoArrived",d),n.on("modeChange",d),n.on("cameraDirectionUpdate",f),n.on("movingToPano",f),n.on("mouseWheel",()=>p()),n.on("pinchGesture",()=>p())}),wt(()=>{n.off("panoArrived",d),n.off("modeChange",d),n.off("cameraDirectionUpdate",f),n.off("movingToPano",f),n.off("mouseWheel",()=>p()),n.off("pinchGesture",()=>p())}),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 Lh extends re{constructor(t){super(),se(this,t,Dh,xh,oe,{five:1,rulerDatas:2,options:3})}}class Sh{constructor(t,e){m(this,"five");m(this,"container",document.createElement("div"));m(this,"panoRulerProData");m(this,"rulerItems");m(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=F(F({},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",()=>N(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 N(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 N(this,null,function*(){var t;if(this.state.enabled){if(!this.panoRulerProData||!this.container)return;this.rulerItems=new Lh({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 Mh=(i,t)=>new Sh(i,t),zh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/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MMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC";function Th(){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(${zh})`,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 Bh=new I.TextureLoader;function ir(i){return N(this,null,function*(){return new Promise((t,e)=>{Bh.load(i,t,void 0,e)}).then(t=>(t.encoding=I.sRGBEncoding,t))})}const li={userAction:!0};class jh extends Bt{constructor(e,n){super(e);m(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"}});m(this,"data");m(this,"group",new I.Group);m(this,"roomInfoInstance");m(this,"roomInfoWrapperInstance");m(this,"compassMeshTween");m(this,"compassMesh");m(this,"entryDoorMesh");m(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)});m(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)});m(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)});m(this,"_enable",()=>{this.five.scene.add(this.group),this.init(),this.onFivePanoArrived(this.five.panoIndex||0),this._addEventListener()});m(this,"_disable",()=>{this._clearCompassIfNeed(),this._clearEntryDoorIfNeed(),this.five.scene.remove(this.group),this._removeEventListener()});m(this,"_toggleVisible",()=>{this.group.visible=this.state.visible,this.five.needsRender=!0});m(this,"_clearCompassIfNeed",()=>{var e;this.compassMesh&&(this.group.remove(this.compassMesh),(e=this.compassMesh.material.map)==null||e.dispose(),this.compassMesh=null)});m(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)});m(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}))});m(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=_s(1e3).onUpdate(({progress:h})=>{var d;(d=this.compassMesh)==null||d.material.setValues({opacity:h}),this.five.needsRender=!0}).play())),this.entryDoorMesh){const d=new I.Vector3(this.data.entrance.position.x,this.data.entrance.position.y,this.data.entrance.position.z).clone().setY(n.y).sub(n).normalize(),f=n.clone().add(d.clone().multiplyScalar(.7)).setY(n.y+.01);this.entryDoorMesh.rotation.z=new I.Vector3(0,0,-1).angleTo(d),this.entryDoorMesh.position.copy(f),((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});m(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())});m(this,"onFiveModeChange",(e,n,o,s,r)=>{e!==n&&this.setState({visible:e===me.Five.Mode.Panorama},{userAction:r})});this.five.scene.add(this.group),this.five.once("dispose",this.dispose),this.setState({visible:!0,enabled:!0,config:F(F({},this.state.config),n||{})})}enable(e=li){this.setState({enabled:!0},e)}disable(e=li){this.setState({enabled:!1},e)}show(e=li){if(!!this.state.enabled)return this.setState({visible:!0},e),Promise.resolve()}hide(e=li){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:F(F({},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 N(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=F({},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 N(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=Th(),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 N(this,null,function*(){const e=this.state.config.compassImageUrl,n=yield ir(e),o=new I.CircleGeometry(.7,32),s=new I.MeshBasicMaterial({map:n,transparent:!0,opacity:0,depthTest:!1}),r=new I.Mesh(o,s);return r.name="pano-compass-mesh",r})}loadEntryDoorMesh(){return N(this,null,function*(){const e=this.state.config.entryDoorImageUrl,n=yield ir(e),o=new I.PlaneGeometry(.2,.16),s=new I.MeshBasicMaterial({map:n,transparent:!0,opacity:.8,depthTest:!1}),r=new I.Mesh(o,s);return r.name="pano-compass-entry-door",r})}loadRoomInfo(){const e=[new I.Vector3(-.7,0,-.7),new I.Vector3(.7,0,-.7),new I.Vector3(.7,0,.7),new I.Vector3(-.7,0,.7)];return Nt(this.five).create3DDomContainer(e)}}const Vh=(i,t)=>new jh(i,t);function ci(i,t,e){const n=i[t],o=i[e];n===void 0||o===void 0||(i[t]=o,i[e]=n)}function Qh(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;ci(i,a*4+0,l*4+0),ci(i,a*4+1,l*4+1),ci(i,a*4+2,l*4+2),ci(i,a*4+3,l*4+3)}}}class or{constructor(t,e){m(this,"width");m(this,"height");m(this,"containerDom");m(this,"hooks",new me.Subscribe);m(this,"canvas",document.createElement("canvas"));m(this,"five");m(this,"scale");m(this,"config");m(this,"offset",{x:0,y:0});m(this,"context");m(this,"renderCenter",new I.Vector3);m(this,"hammer");m(this,"state",{enabled:!1});m(this,"offsetRange");m(this,"isPanning",!1);m(this,"onPanstart",()=>{this.isPanning=!0,this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)"});m(this,"onPan",t=>{if(!this.isPanning||!this.offsetRange||this.hooks.emit("wantsPanGesture",t))return;const{translateX:n,translateY:o}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${n}px, ${o}px, 100px)`});m(this,"onPanend",t=>{if(this.isPanning=!1,this.canvas.style.boxShadow="none",!this.offsetRange)return;const{translateX:e,translateY:n}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${e}px, ${n}px, 100px)`,this.offset={x:e,y:n}});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 hn.default(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panstart",this.onPanstart),this.hammer.on("panend",this.onPanend)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){if(!this.state.enabled)return this.state.enabled=!0,this.containerDom&&this._appendTo(this.containerDom),this}disable(){if(!!this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){return this.containerDom=t,this.state.enabled&&this._appendTo(t),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())}renderWithScreenPoint(t){!this.containerDom||!this.state.enabled||(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}resetOffset(){this.offset={x:0,y:0},this.canvas.style.transform=`translate3d(${0}px, ${0}px, 100px)`}getCurrentState(){return{enabled:this.state.enabled}}getRenderCenter(){return this.renderCenter}_appendTo(t){if(this.resetOffset(),t.appendChild(this.canvas),!this.offsetRange){const e=this.canvas.getBoundingClientRect(),n=t.getBoundingClientRect(),o=n.right-e.right,s=n.bottom-e.bottom,r=n.left-e.left,a=n.top-e.top;this.offsetRange={min:{x:r,y:a},max:{x:o,y:s}}}}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,[n,o,s]=(()=>{if(this.renderCenter instanceof I.Vector3){const r=this.renderCenter.clone().project(this.five.camera);return[(r.x+1)/2*this.containerDom.clientWidth,-(r.x-1)/2*this.containerDom.clientWidth,-(r.y-1)/2*this.containerDom.clientHeight]}else return[this.renderCenter.x,this.containerDom.clientWidth-this.renderCenter.x,this.renderCenter.y]})();n<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=90+"px"):s<183?(this.canvas.style.top=90+"px",this.canvas.style.left=-t/2+"px"):o<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(${n}px, ${s}px, 10px)`,this.offset={x:n,y:s}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:n,height:o}=this,s=this.five.renderer.getSize(new I.Vector2),[r,a]=(()=>{if(this.renderCenter instanceof I.Vector3){const g=this.renderCenter.clone().project(this.five.camera);return[(g.x+1)/2*s.x,(g.y+1)/2*s.y]}else return[this.renderCenter.x,s.y-this.renderCenter.y]})(),l=1,c=n/t,u=o/t,h=l*t,d=this.five.getPixels(r-c/2,a-c/2,c,u,h),f=Math.floor(n*l),p=Math.floor(o*l);Qh(d,f,p);const v=new ImageData(f,p);v.data.set(d),e.putImageData(v,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")}getPanOffset(t,e){const{min:{x:n,y:o},max:{x:s,y:r}}=e,a=this.offset.x+t.deltaX,l=this.offset.y+t.deltaY,c=Math.min(Math.max(a,n),s),u=Math.min(Math.max(l,o),r);return{translateX:c,translateY:u}}}class Oh{constructor(t){m(this,"edges",[]);m(this,"five");m(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 O.Vector3),r=s.distanceTo(t.point);r<e&&(n=s,e=r)}),e>.1?null:n||null}}function Rh(i,t){for(let e=0,n=t.length;e<n;e++)if(i===t[e])return t.splice(e,1)[0]}class Ze{constructor(t){m(this,"id");m(this,"lines");m(this,"position");m(this,"type","point");this.id=Ne(),this.lines=[],this.position=new O.Vector3,t instanceof O.Vector3?this.position.copy(t):this.position.fromArray(t)}toJson(){return{id:this.id,position:this.position.toArray()}}addLine(t){this.lines.push(t)}removeLine(t){Rh(t,this.lines)}clone(){return new Ze(this.position)}}class ui{constructor(t){m(this,"id",Ne());m(this,"lines",[]);m(this,"points",[]);m(this,"visiblePanoIndexes");m(this,"model");m(this,"type","polyline");m(this,"hook",new me.Subscribe);this.model=t.model}addLine(t){if(this.includes(t)){console.error(new Error("\u4E0D\u80FD\u91CD\u590D\u6DFB\u52A0\u7EBF\u6BB5"));return}const e=this.getLastPoint(),n=e&&t.findAnotherPoint(e);e?e&&n?(this.lines.push(t),this.points.push(...t.points),this.hook.emit("lineAdded",t)):console.error(new Error("\u4F20\u5165\u7EBF\u6BB5\u65E0\u6CD5\u4E0E\u5F53\u524D\u6298\u7EBF\u8FDB\u884C\u8FDE\u63A5")):(this.lines.push(t),this.points.push(...t.points),this.hook.emit("lineAdded",t))}removeLine(t){if(this.lines.length!==0){if(!this.isLastLine(t)){console.error(new Error("\u4F20\u5165\u7EBF\u6BB5\u4E0D\u662F\u5F53\u524D\u6298\u7EBF\u7684\u6700\u540E\u4E00\u6BB5"));return}this.lines.pop(),this.lines.length===0?this.points.slice(0,this.points.length):this.points.pop(),this.hook.emit("lineRemoved",t)}}isLastLine(t){const e=this.getLastLine();return e?t.id===e.id:!1}getLastLine(){return this.lines.slice(-1)[0]}clear(){this.lines.slice(0,this.lines.length),this.points.slice(0,this.points.length)}overlapWith(t){return t.type==="point"?this.includes(t):t.type==="line"?t.points.some(e=>this.includes(e)):t.type==="polyline"?t.points.some(e=>this.includes(e)):!0}includes(t){return t.type==="point"?this.points.find(({id:e})=>e===t.id)!==void 0:t.type==="line"?this.lines.find(({id:e})=>e===t.id)!==void 0:!1}isEmpty(){return this.points.length===0}getLastPoint(){return this.points.slice(-1)[0]}toJson(){return{id:this.id,lines:this.lines.map(t=>t.toJson()),visiblePanoIndexes:this.visiblePanoIndexes}}getPointByID(t){return this.points.find(({id:e})=>e===t)}fromJson(t){this.clear(),this.id=t.id;const{getPoint:e,getAllPoints:n}=r(),o=t.lines.map(a=>{const[l,c]=a.points,u=e(l),h=e(c);if(!u||!h)throw new Error("\u7EBF\u4E0A\u7684\u70B9\u4E0D\u5B58\u5728");const d=new jt(u,h,this.model);return d.id=a.id,d.text=a.text,d}),s=n();this.points.push(...s),this.lines.push(...o),this.visiblePanoIndexes=t.visiblePanoIndexes;function r(){const a=new Map;function l(u){const h=a.get(u.id);if(h)return h;const d=new Ze(u.position);return d.id=u.id,a.set(u.id,d),d}function c(){return Array.from(a.values())}return{getPoint:l,getAllPoints:c}}return this}replace(t){this.id=t.id,this.clear(),this.lines.push(...t.lines),this.points.push(...t.points)}}const Fh=1,Gh=3,Hh=new O.Color(16777215),Wh=new O.Color(6522623),Nh=new O.Color(16777215),_h=new O.Color(6522623),Xh=6,Yh=8,Uh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAG/Py2baba05un7UgfgAAAHJJREFUKM9joBpgLHVSCRdA4metAoJlCJHmVWBgAeNzroKCCVCBLpjACqgJVjCBxRBT2FbBQQJYQAohsBAsUIUQWA4WiEIILAULeCEEloAFtBACizAEMLRgGIphLabDMJ2O6TlM72MGECIIMQIZIxqoBQCPvpJ/e9FaAAAAAABJRU5ErkJggg==",sr=new O.TextureLoader().load(Uh),rr={pointTexture:sr,pointSize:Xh,lineWidth:Fh,lineColor:Hh,pointColor:Nh,lineRenderOrder:20,pointsRenderOrder:20};ge(F({},rr),{dashed:!0});const Jh={pointTexture:sr,pointSize:Yh,lineWidth:Gh,lineColor:Wh,pointColor:_h,lineRenderOrder:10,pointsRenderOrder:10};function Zh(i,t,e){var u,h,d,f,p;const n=(u=e==null?void 0:e.lineWidth)!=null?u:2,o=(h=e==null?void 0:e.lineColor)!=null?h:new O.Color(16777215),s=(d=e==null?void 0:e.pointSize)!=null?d:5,r=(f=e==null?void 0:e.lineRenderOrder)!=null?f:10,a=(p=e==null?void 0:e.lineRenderOrder)!=null?p:20,l=new Sn.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 ar(i,t){const[e,n]=i.points,o=t==="light"?Jh:rr,s=Zh(e.position,n.position,o);return s.name="normalLine_"+i.id,s}function xt(i){const{x:t,y:e,z:n}=i;return!(Math.abs(t)>1||Math.abs(e)>1||Math.abs(n)>1)}function qh(){const i=document.createElement("div");return i.setAttribute("style","backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);-webkit-tap-highlight-color: rgba(0,0,0,0);"),i.style.width="max-content",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.cursor="pointer",i}function Kh(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.width="0",t.style.height="0",t.style.transform="translate3d(0, 0, 0)",t.style.transformOrigin="left top",t}function $h(i){let t=!0;const{line:e}=i,n=e.id,o=qh(),s=Kh(e),r=i.userDistanceItem,a=new O.Vector3(0,0,0),l={lineID:n,ndcPosition:a,update:d,appendTo:f,remove:p,highlight:u,unHighlight:h,getCurrentContent:v,setItemSelectable:g};s.style.pointerEvents=t?"all":"none",r!=null&&r.element?s.appendChild(r.element):s.appendChild(o);function c(){var A;(A=i.clickCallback)==null||A.call(i,l)}function u(){if(r)return r.highlight();o.style.border="0.5px solid #95AEFF",o.style.background="linear-gradient(90deg, #95AEFF 0%, #6386FF 100%)"}function h(){if(r)return r.unHighlight();o.style.border="0.5px solid rgba(255,255,255,0.6)",o.style.background="rgba(195,195,195,0.70)"}function d(A){if(e.mesh.visible===!1){s.style.opacity="0",s.style.pointerEvents="none";return}const y=A.getElement();if(!y)return;const w=y.clientWidth,C=y.clientHeight,x=w/2,E=C/2;if(e.points.length<2)return;const[S,k]=e.points,j=S.position.clone().project(A.camera),_=k.position.clone().project(A.camera),G=j.clone().lerp(_,.5),Z=new O.Vector2(j.x*x,j.y*E),Q=new O.Vector2(_.x*x,_.y*E),B=Z.distanceTo(Q);if((()=>!(Math.abs(j.z)>1||Math.abs(_.z)>1||!xt(j)&&!xt(_)||!xt(G)||B===0))()===!1){s.style.opacity="0",s.style.pointerEvents="none";return}const W=(G.x+1)/2*w,H=-(G.y-1)/2*C,X=-(Math.atan((Z.y-Q.y)/(Z.x-Q.x))*180)/Math.PI,J=s.parentElement&&o.clientWidth>B?-20:0;s.style.transform=`translate(${W}px, ${H}px) rotate(${X}deg) translateY(${J}px)`,s.style.opacity="1",s.style.pointerEvents=t?"all":"none",r&&r.update({line:e,polyline:e.getPolyline()});const he=v();o.innerText=he}function f(A){A.appendChild(s),s.addEventListener("click",c)}function p(){o.removeEventListener("click",c),s.remove()}function v(){var S,k,j;if(e.points.length<2)return"";const[A,y]=e.points,w=A.position.clone().distanceTo(y.position),C=(S=i.line.text)!=null?S:i.line.model.config.defaultText,x=(j=(k=i.line.model.config)==null?void 0:k.getDistanceText)==null?void 0:j.call(k,w),E=C!=null?C:x;return E!=null?E:w.toFixed(2)+"m"}function g(A){t=A}return l}class jt{constructor(t,e,n){m(this,"id");m(this,"selected",!1);m(this,"text");m(this,"type","line");m(this,"model");m(this,"mesh");m(this,"points");m(this,"lightMesh");m(this,"hook");m(this,"distanceItem");m(this,"polyline");var o;if(this.id=Ne(),this.model=n,t.id===e.id)throw new Error("\u65E0\u6548\u7684\u7EBF\u6BB5, \u4E00\u4E2A\u70B9\u65E0\u6CD5\u6784\u6210\u7EBF\u6BB5");typeof n.config.defaultText=="string"&&(this.text=n.config.defaultText),this.hook=new me.Subscribe,this.points=[t,e],this.mesh=ar(this,"normal"),this.lightMesh=ar(this,"light"),this.distanceItem=$h({line:this,clickCallback:()=>this.hook.emit("selected",this),userDistanceItem:(o=this.model.config)!=null&&o.userDistanceItemCreator?this.model.config.userDistanceItemCreator():void 0}),t.lines.push(this),e.lines.push(this)}clear(){this.selected=!1,this.polyline=void 0}isEmpty(){return this.points.length===0}getPolyline(){if(this.polyline)return this.polyline;const t=this.model.polylines.find(e=>e.lines.includes(this));if(t)return this.polyline=t,t}findAnotherPoint(t){return this.points.find(({id:e})=>e!==t.id)}setText(t){this.text=t,this.hook.emit("textChanged",t)}toJson(){return{id:this.id,points:this.points.map(t=>t.toJson()),text:this.text}}clone(){const t=new jt(this.points[0].clone(),this.points[1].clone(),this.model);return t.text=this.text,t}}class di{constructor(t){m(this,"config");m(this,"polylines",[]);m(this,"hook",new me.Subscribe);this.config=t}addPolyline(t){if(this.includes(t)){console.error(new Error("\u4E0D\u80FD\u91CD\u590D\u6DFB\u52A0 polyline"));return}this.polylines.push(t),this.hook.emit("polylineAdded",t)}replacePolylineByID(t,e){const n=this.getPolylineByID(t);n==null||n.replace(e)}removePolyline(t){const e=this.polylines.findIndex(({id:n})=>n===t.id);if(e===-1){console.error(new Error("polyline \u4E0D\u5B58\u5728"));return}this.polylines.splice(e,1),this.hook.emit("polylineRemoved",t)}getPolylineByID(t){return this.polylines.find(e=>e.id===t)}getPolylineByLine(t){return this.polylines.find(e=>e.includes(t))}getLineByID(t){return this.getAllLines().find(e=>e.id===t)}getAllLines(){return this.polylines.map(t=>t.lines).flat(1)}getAllPoints(){return this.polylines.map(t=>t.points).flat(1)}includes(t){return this.polylines.find(({id:e})=>e===t.id)!==void 0}clear(){this.polylines.forEach(t=>this.hook.emit("polylineRemoved",t)),this.polylines.splice(0,this.polylines.length)}getClosestPoint(){}parse(t){this.clear(),this.polylines.push(...t.polylines.map(e=>new ui({model:this}).fromJson(e))),this.polylines.forEach(e=>this.hook.emit("polylineAdded",e))}toJson(){return{polylines:this.polylines.map(t=>t.toJson()).filter(t=>t.lines.length>0)}}}const hi=i=>i.preventDefault();class fi{constructor(t){m(this,"model");m(this,"five");m(this,"group");m(this,"config");m(this,"dashed");m(this,"disposed",!1);m(this,"isMobile");m(this,"mouseGroup");m(this,"container");m(this,"fiveHelper");m(this,"hook");m(this,"magnifier");m(this,"userDistanceItemCreator");m(this,"updateDistanceUI",()=>{this.dashed.distanceItem.update(this.five),this.model.getAllLines().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 jt(new Ze([0,0,0]),new Ze([0,0,0]),this.model),this.dashed.distanceItem.setItemSelectable(!1),this.dashed.mesh.setMaterial({dashed:!0,dashScale:100}),this.dashed.mesh.name="dashLine";const e=this.five.getElement();e&&(e.addEventListener("touchstart",hi),e.addEventListener("contextmenu",hi))}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.disable(),this.model.getAllLines().forEach(e=>this.removeLine(e));const t=this.five.getElement();t&&(t.removeEventListener("touchstart",hi),t.removeEventListener("contextmenu",hi))}}function $i(i){const{x:t,y:e}=i.center,{clientWidth:n,clientHeight:o}=i.target,s=i.target.getBoundingClientRect(),r=new O.Vector2(t,e).sub(new O.Vector2(s.left,s.top)),a=new O.Vector2(r.x/n*2-1,-(r.y/o)*2+1);return{point:r,ndcPoint:a}}function eo(i,t){const e=$i(t).ndcPoint,n=new O.Raycaster;return n.setFromCamera(e,i.camera),i.model.intersectRaycaster(n)}class mi extends fi{constructor(e){var o;super(e);m(this,"type","edit");m(this,"polyline");m(this,"pressPoint");m(this,"hasAppendDashed",!1);m(this,"hasAppendMouseGroup",!1);m(this,"fiveElement");m(this,"lastPoint",null);m(this,"hammer");m(this,"onIntersectionUpdate",Ui((e,n)=>{var s;this.hasAppendMouseGroup===!1&&(this.group.add(this.mouseGroup),this.magnifier.appendTo(this.container),this.magnifier.enable(),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));m(this,"revoke",()=>{if(this.polyline.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.hook.emit("editedDashedLineChange",null),this.five.needsRender=!0;return}if(this.polyline.lines.length===0&&!this.lastPoint||!this.lastPoint)return;const e=this.polyline.lines[this.polyline.lines.length-1],n=e.findAnotherPoint(this.lastPoint);!n||(this.lastPoint=n,this.hook.emit("anchorChange",n.position),this.group.remove(e.mesh),this.polyline.removeLine(e),this.hasAppendMouseGroup=!1,this.mouseGroup.position.copy(this.lastPoint.position),this.group.remove(this.mouseGroup),e.distanceItem.remove(),this.updateDashed(),this.magnifier.disable(),this.five.needsRender=!0)});m(this,"onMouseLeave",()=>{this.magnifier.disable(),this.group.remove(this.mouseGroup),this.hasAppendMouseGroup=!1,this.lastPoint&&(this.mouseGroup.position.copy(this.lastPoint.position),this.updateDashed())});m(this,"onLineChanged",()=>{this.hook.emit("editedPolylineChange",this.polyline)});m(this,"onPress",e=>{const[n]=eo(this.five,e);if(!(n!=null&&n.face))return;const o=new Ze(n.point);this.pressPoint=o,this.onIntersectionUpdate(n)});m(this,"onPan",e=>{if(!this.pressPoint)return;const[n]=eo(this.five,e);!(n!=null&&n.face)||this.onIntersectionUpdate(n)});m(this,"onPanEnd",e=>{!this.pressPoint||this.onTap(e)});m(this,"onTap",e=>{this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh)),this.hasAppendDashed=!0;const[n]=eo(this.five,e);this.updateMouseGroup(n);const o=new Ze(this.mouseGroup.position),s=this.lastPoint;if(o&&(this.lastPoint=o),o&&s){const r=new jt(s,o,this.model);r.distanceItem.setItemSelectable(!1),r.distanceItem.appendTo(this.container),this.polyline.addLine(r),this.group.add(r.mesh),r.distanceItem.update(this.five)}this.pressPoint=void 0,this.hasAppendMouseGroup=!1,this.magnifier.disable(),this.group.remove(this.mouseGroup),this.updateDashed(),this.five.needsRender=!0,this.hook.emit("anchorChange",o.position)});m(this,"onWantsTapGesture",()=>!1);m(this,"onWantsToMoveToPano",()=>!1);m(this,"onWantsPanGesture",()=>this.pressPoint?!1:void 0);m(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});m(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.hook.emit("editedDashedLineChange",this.dashed))});this.model=new di(this.config),this.polyline=new ui({model:this.model}),this.model.addPolyline(this.polyline),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.polyline.hook.on("lineAdded",this.onLineChanged),this.polyline.hook.on("lineRemoved",this.onLineChanged);const n=this.five.getElement();if(n){this.fiveElement=n;const s=new hn.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)}this.five.helperVisible=!1,(o=this.fiveElement)==null||o.addEventListener("mouseleave",this.onMouseLeave),this.hook.emit("anchorChange",null),this.hook.emit("editedDashedLineChange",null),this.five.refresh()}dispose(){var e,n;super.dispose(),this.five.helperVisible=!0,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.polyline.hook.off("lineAdded",this.onLineChanged),this.polyline.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.polyline.lines}}class lr extends fi{constructor(e){super(e);m(this,"type","view");m(this,"hammer");m(this,"polylineRemoved",e=>{e.lines.forEach(n=>this.removeLine(n)),this.hook.emit("selectedChange",this.model.getAllLines().filter(n=>n.selected).map(n=>n))});m(this,"polylineAdded",e=>{const n=this.five.getCurrentState().panoIndex;e.lines.forEach(o=>{e.visiblePanoIndexes&&!e.visiblePanoIndexes.includes(n)&&(o.mesh.visible=!1),o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),this.group.add(o.mesh)})});m(this,"onCameraUpdate",()=>{this.updateDistanceUI()});m(this,"onFivePanoWillArrive",e=>{this.model.polylines.forEach(n=>{!n.visiblePanoIndexes||n.visiblePanoIndexes.includes(e)||n.lines.forEach(o=>{o.mesh.visible=!1,o.distanceItem.update(this.five)})})});m(this,"onFivePanoArrived",e=>{this.model.polylines.forEach(n=>{!n.visiblePanoIndexes||n.visiblePanoIndexes.includes(e)&&n.lines.forEach(o=>{o.mesh.visible=!0,o.distanceItem.update(this.five)})})});this.model.getAllLines().forEach(o=>{o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),this.group.add(o.mesh)});const n=this.five.getElement();if(n){const o=new hn.default(n);this.hammer=o}this.onFivePanoWillArrive(this.five.getCurrentState().panoIndex),this.onFivePanoArrived(this.five.getCurrentState().panoIndex),this.updateDistanceUI(),this.five.needsRender=!0,this.model.hook.on("polylineAdded",this.polylineAdded),this.model.hook.on("polylineRemoved",this.polylineRemoved),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive)}dispose(){var e;super.dispose(),this.model.hook.off("polylineAdded",this.polylineAdded),this.model.hook.off("polylineRemoved",this.polylineRemoved),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.needsRender=!0,this.hook.emit("selectedChange",[]),(e=this.hammer)==null||e.destroy()}}const ef=`
|
|
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>
|
|
495
495
|
</div>
|
|
496
496
|
</div>
|
|
497
|
-
`,Af={display:"none",position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:"0",transform:"translate(0, 10px)",transition:"opacity 500ms ease-in-out, transform 500ms ease-in-out"},vf={position:"absolute",left:"50%",bottom:"32px",transform:"translateX(-50%)",height:"89px",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"14px",pointerEvents:"all",color:"#fff",zIndex:"10"},bf={position:"absolute",bottom:"0",left:"0",opacity:"0.5",width:"100%",height:"184px",background:"linear-gradient(180deg, rgba(0,0,0,0.00) 0%, #000000 100%)",zIndex:"0"},Ar={margin:"0 64px"},yf={opacity:"0.85"},vr={width:"72px",height:"72px",backgroundSize:"100%",cursor:"pointer",transition:"all 200ms ease-in-out"},wf={width:"24px",height:"24px",marginRight:"4px",backgroundSize:"100%",cursor:"pointer"},Cf={userSelect:"none",pointerEvents:"none"};class Pf{constructor(t,e,n){m(this,"container");m(this,"measureController");m(this,"mainElement");m(this,"_params");m(this,"_btnTexts",{start:"\u5F00\u59CB",end:"\u7ED3\u675F",revoke:"\u64A4\u9500",exit:"\u9000\u51FA"});m(this,"onMouseEnter",()=>{const{mainItem:t}=this.mainElement;t.style.opacity="1"});m(this,"onMouseLeave",()=>{const{mainItem:t}=this.mainElement;t.style.opacity="0.85"});m(this,"onClick",()=>{this.measureController.getCurrentMode()!=="Edit"?this.measureController.changeMode("Edit"):this.measureController.save().changeMode("Watch")});m(this,"modeChangeHandler",t=>{t==="Edit"?this.change2Done():this.change2Add()});var r,a,l,c;this._params=n,this._btnTexts={start:(r=this._params.startButtonText)!=null?r:this._btnTexts.start,end:(a=this._params.endButtonText)!=null?a:this._btnTexts.end,revoke:(l=this._params.revokeButtonText)!=null?l:this._btnTexts.revoke,exit:(c=this._params.exitButtonText)!=null?c:this._btnTexts.exit},this.measureController=t,this.container=e,this.mainElement=this.getMainElement(),Object.assign(this.mainElement.mainIcon.style,vr),Object.assign(this.mainElement.mainItem.style,Ar);const{revokeTextDom:o,exitTextDom:s}=this._getTextElement();o&&(o.innerText=this._btnTexts.revoke),s&&(s.innerText=this._btnTexts.exit),this.change2Add(),this.measureController.hook.on("modeChange",this.modeChangeHandler),this.mainElement.mainItem.addEventListener("click",this.onClick),this.mainElement.mainItem.addEventListener("mouseenter",this.onMouseEnter),this.mainElement.mainItem.addEventListener("mouseleave",this.onMouseLeave)}dispose(){this.measureController.hook.off("modeChange",this.modeChangeHandler),this.mainElement.mainItem.removeEventListener("click",this.onClick),this.mainElement.mainItem.removeEventListener("mouseenter",this.onMouseEnter),this.mainElement.mainItem.removeEventListener("mouseleave",this.onMouseLeave)}getMainElement(){const t=this.container.querySelector(".fpm__main-text"),e=this.container.querySelector(".fpm__main"),n=this.container.querySelector(".fpm__main-icon");if(!e||!t||!n)throw new Error("cannot find dom");return{mainTextDom:t,mainItem:e,mainIcon:n}}_getTextElement(){const t=this.container.querySelector(".fpm__revoke-text"),e=this.container.querySelector(".fpm__exit-text");return{revokeTextDom:t,exitTextDom:e}}change2Add(){const{mainIcon:t,mainTextDom:e}=this.mainElement;if(t.className.includes("fpm__main__start")){e.innerText=this._btnTexts.start;return}t.className.includes("fpm__main__end")&&(t.style.transform="scale(0.8)",e.className.includes("fpm__main-text__show")?e.classList.replace("fpm__main-text__show","fpm__main-text__hide"):e.classList.add("fpm__main-text__hide"),setTimeout(()=>{t.classList.replace("fpm__main__end","fpm__main__start"),t.style.transform="scale(1)",e.innerText=this._btnTexts.start,e.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200))}change2Done(){const{mainTextDom:t,mainIcon:e}=this.getMainElement();t.innerText!==this._btnTexts.end&&(e.className.includes("fpm__main__end")||e.className.includes("fpm__main__start")&&(e.style.transform="scale(0.8)",t.className.includes("fpm__main-text__show")?t.classList.replace("fpm__main-text__show","fpm__main-text__hide"):t.classList.add("fpm__main-text__hide"),setTimeout(()=>{e.classList.replace("fpm__main__start","fpm__main__end"),e.style.transform="scale(1)",t.innerText=this._btnTexts.end,t.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200)))}}class If{constructor(t,e,n){m(this,"container");m(this,"measureController");m(this,"mainElement");m(this,"_params");m(this,"_btnTexts",{start:"\u5F00\u59CB",end:"\u7ED3\u675F"});m(this,"onClick",()=>{var t;this.mainElement.mainTextDom.innerText===((t=this._params.startButtonText)!=null?t:"\u5F00\u59CB")?(this.measureController.hook.emit("willChangeState","watching","editing"),this.change2Done()):(this.measureController.hook.emit("willChangeState","editing","watching"),this.change2Add())});var o,s;this._params=n,this._btnTexts={start:(o=this._params.startButtonText)!=null?o:this._btnTexts.start,end:(s=this._params.endButtonText)!=null?s:this._btnTexts.end},this.measureController=t,this.container=e,this.mainElement=this.getMainElement(),this.mainElement.mainIcon.setAttribute("style","-webkit-tap-highlight-color: rgba(0,0,0,0);"),Object.assign(this.mainElement.mainIcon.style,vr),Object.assign(this.mainElement.mainItem.style,Ar),this.change2Add(),this.mainElement.mainItem.addEventListener("click",this.onClick)}dispose(){this.mainElement.mainItem.removeEventListener("click",this.onClick)}getMainElement(){const t=this.container.querySelector(".fpm__main-text"),e=this.container.querySelector(".fpm__main"),n=this.container.querySelector(".fpm__main-icon");if(!e||!t||!n)throw new Error("cannot find dom");return{mainTextDom:t,mainItem:e,mainIcon:n}}change2Add(){const{mainIcon:t,mainTextDom:e}=this.mainElement;if(t.className.includes("fpm__main__start")){e.innerText=this._btnTexts.start;return}t.className.includes("fpm__main__end")&&(t.style.transform="scale(0.8)",e.className.includes("fpm__main-text__show")?e.classList.replace("fpm__main-text__show","fpm__main-text__hide"):e.classList.add("fpm__main-text__hide"),setTimeout(()=>{t.classList.replace("fpm__main__end","fpm__main__start"),t.style.transform="scale(1)",e.innerText=this._btnTexts.start,e.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200))}change2Done(){const{mainTextDom:t,mainIcon:e}=this.mainElement;t.innerText!==this._btnTexts.end&&(e.className.includes("fpm__main__end")||e.className.includes("fpm__main__start")&&(e.style.transform="scale(0.8)",t.className.includes("fpm__main-text__show")?t.classList.replace("fpm__main-text__show","fpm__main-text__hide"):t.classList.add("fpm__main-text__hide"),setTimeout(()=>{e.classList.replace("fpm__main__start","fpm__main__end"),e.style.transform="scale(1)",t.innerText=this._btnTexts.end,t.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200)))}}class Ef{constructor(t,e){m(this,"container");m(this,"revokeIcon");m(this,"revokeItem");m(this,"measureController");m(this,"onClick",()=>{this.measureController.revoke()});m(this,"onModeChange",t=>{if(t!=="Edit"&&this.revokeItem.className.includes("enabled")){this.revokeItem.classList.remove("enabled"),this.measureController.hook.off("anchorChange",this.onAnchorChange);return}this.measureController.hook.on("anchorChange",this.onAnchorChange)});m(this,"onAnchorChange",t=>{t&&this.revokeItem.classList.add("enabled")});this.measureController=t,this.container=e;const n=this.container.querySelector(".fpm__revoke-icon"),o=this.container.querySelector(".fpm__revoke");if(!n||!o)throw new Error("\u4E0D\u6B63\u786E\u7684\u9009\u62E9\u5668");this.revokeIcon=n,this.revokeItem=o,this.revokeItem.addEventListener("click",this.onClick),t.hook.on("modeChange",this.onModeChange)}dispose(){this.revokeItem.removeEventListener("click",this.onClick),this.measureController.hook.off("modeChange",this.onModeChange)}}class br{constructor(t,e){m(this,"revoke");m(this,"container");m(this,"mainController");m(this,"disposers",[]);m(this,"measureController");m(this,"mode");m(this,"_params");m(this,"handleExit",()=>{const t=this.container.querySelector(".fpm__exit-icon"),e=this.container.querySelector(".fpm__exit");if(!e||!t)throw new Error("cannot find dom");this.mode==="pc"&&(Object.assign(e.style,yf),Object.assign(t==null?void 0:t.style,wf));const n=()=>{e.style.opacity="1"},o=()=>{e.style.opacity="0.85"},s=()=>{this.measureController.disable()};return e.addEventListener("click",s),e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",o),()=>{e.removeEventListener("click",s),e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",o)}});var r;this._params=e,this.measureController=t,this.mode=(r=e.mode)!=null?r:"pc",this.container=document.createElement("div"),this.container.innerHTML=this.mode==="mobile"?pf:gf,this.container.classList.add("fpm__ui-controller",this.mode),this.container.style.background="rgba(0, 0, 0, 0.15)",e.container.appendChild(this.container);const n=this.container.querySelectorAll(".fpm__text"),o=this.container.querySelector(".fpm_ui-bg"),s=this.container.querySelector(".fpm_operating-space");Object.assign(o==null?void 0:o.style,bf),Object.assign(s==null?void 0:s.style,vf),Object.assign(this.container.style,Af),n.forEach(a=>Object.assign(a.style,Cf))}dispose(){this.hide(),this.container.remove()}show(){return this.container.style.display="block",this.container.style.opacity="1",this.container.style.transform="translate(0, 0)",this.mode==="pc"?(this.revoke=new Ef(this.measureController,this.container),this.mainController=new Pf(this.measureController,this.container,this._params)):this.mainController=new If(this.measureController,this.container,this._params),this.disposers.push(this.handleExit()),this}hide(){var t,e;return this.container.style.display="none",this.container.style.opacity="0",this.container.style.transform="translate(0, 10px)",this.mode==="pc"&&((t=this.revoke)==null||t.dispose()),(e=this.mainController)==null||e.dispose(),this.disposers.forEach(n=>n()),this.disposers=[],this}}class kf{constructor(t,e){m(this,"measureController");m(this,"textDom",document.createElement("span"));m(this,"container",document.createElement("div"));m(this,"hasAnchor",!1);m(this,"hasChangedToWatch",!1);m(this,"_params");m(this,"onModelChange",t=>{var e;if(t==="View"){this.hide();return}if(t==="Watch"){this.hasChangedToWatch?(this.textDom.innerText="",this.hide()):(this.show(),this.hasChangedToWatch=!0);return}t==="Edit"&&(this.textDom.innerText=(e=this._params.firstPointTip)!=null?e:"\u8BF7\u9009\u62E9\u7B2C\u4E00\u4E2A\u6D4B\u91CF\u70B9\uFF0CEsc\u6216\u5355\u51FB\u9F20\u6807\u53F3\u952E\u53EF\u53D6\u6D88\u9009\u62E9",this.show())});m(this,"anchorChange",t=>{var e,n;!this.hasAnchor&&!!t?(this.hasAnchor=!0,this.textDom.innerText=(e=this._params.nextPointTip)!=null?e:"\u9009\u62E9\u4E0B\u4E00\u4E2A\u6D4B\u91CF\u70B9\uFF0CEsc\u6216\u5355\u51FB\u9F20\u6807\u53F3\u952E\u53D6\u6D88\u9009\u62E9"):t||(this.hasAnchor=!1,this.textDom.innerText=(n=this._params.firstPointTip)!=null?n:"\u8BF7\u9009\u62E9\u7B2C\u4E00\u4E2A\u6D4B\u91CF\u70B9\uFF0CEsc\u6216\u5355\u51FB\u9F20\u6807\u53F3\u952E\u53EF\u53D6\u6D88\u9009\u62E9")});m(this,"onEditedLineChange",t=>{var e;t.lines.length===1&&(this.textDom.innerText=(e=this._params.endTip)!=null?e:"\u53EF\u4EE5\u8FDE\u7EED\u9009\u62E9\u6D4B\u91CF\u70B9\uFF0C\u6216\u70B9\u51FB\u4E0B\u65B9\u201C\u7ED3\u675F\u201D\u6309\u94AE\u5B8C\u6210\u6D4B\u91CF\uFF08Esc\u53D6\u6D88\uFF0CCommand+S\u4FDD\u5B58\uFF09")});this._params=e,this.initDom(),e.container.append(this.container),this.measureController=t,t.hook.on("modeChange",this.onModelChange),t.hook.on("anchorChange",this.anchorChange),t.hook.on("editedPolylineChange",this.onEditedLineChange)}dispose(){this.hide(),this.container.remove()}show(){return this.container.style.opacity="1",this.container.style.transform="translate(0, 0)",this}hide(){return this.container.style.opacity="0",this.container.style.transform="translate(0, -10px)",this.measureController.hook.off("modeChange",this.onModelChange),this.measureController.hook.off("anchorChange",this.anchorChange),this.measureController.hook.off("editedPolylineChange",this.onEditedLineChange),this}initDom(){var n;const t=this.container,e=this.textDom;t.classList.add("fpm__guide-container"),t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.width="100%",t.style.height="110px",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.transform="translate(0, -10px)",t.style.background="linear-gradient(180deg, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.00) 100%)",t.style.transition="opacity 500ms ease-in-out, transform 500ms ease-in-out",t.style.opacity="0",e.classList.add("fpm__guide-text"),e.style.color="#fff",e.style.fontSize="20px",e.innerText=(n=this._params.startTip)!=null?n:"\u70B9\u51FB\u4E0B\u65B9\u201C\u5F00\u59CB\u201D\u6309\u94AE\u5F00\u59CB\u6D4B\u8DDD",t.appendChild(e)}}class xf{constructor(t,e){m(this,"five");m(this,"measureController");m(this,"onKeyDown",t=>{if(t.metaKey&&t.code==="KeyS"){this.measureController.save().changeMode("Watch"),t.preventDefault();return}if(t.code==="Escape")return this.escape()});m(this,"onMouseDown",t=>{t.button===2&&(t.preventDefault(),this.escape())});this.five=e,this.measureController=t;const n=this.five.getElement();!n||(document.body.addEventListener("keydown",this.onKeyDown),n.addEventListener("mousedown",this.onMouseDown))}dispose(){const t=this.five.getElement();!t||(document.body.removeEventListener("keydown",this.onKeyDown),t.removeEventListener("mousedown",this.onMouseDown))}escape(){return this.measureController.getCurrentMode()==="Watch"?this.measureController.disable():this.measureController.changeMode("Watch")}}class Df{constructor(t,e){m(this,"hasOpen",!1);m(this,"hook",new me.Subscribe);m(this,"magnifier");m(this,"five");m(this,"model");m(this,"group");m(this,"config");m(this,"isMobile");m(this,"fiveHelper");m(this,"useUIController");m(this,"params");m(this,"useGuideController");m(this,"container",document.createElement("div"));m(this,"shortcutKeyController");m(this,"controller",null);m(this,"getCurrentMode",()=>this.controller instanceof mi?"Edit":this.controller instanceof hr?"Watch":this.controller instanceof Pn?"Mixed":this.controller instanceof lr?"View":null);m(this,"changeMode",t=>{var o;if(!this.hasOpen||this.getCurrentMode()===t)return;(o=this.controller)==null||o.dispose();const e={View:lr,Watch:hr,Edit:mi,Mixed:Pn};if(!e[t])throw new Error("\u4E0D\u5B58\u5728\u7684 Mode");const n=this.createControllerParams();this.controller=new e[t](n),this.hook.emit("modeChange",t)});var o,s,r,a;this.five=t,this.params=e,this.config=ei(e,["openParams","magnifierParams"]),this.model=new di(this.config),this.fiveHelper=new Oh(t),this.isMobile=(s=(o=e==null?void 0:e.openParams)==null?void 0:o.isMobile)!=null?s:!1,this.magnifier=new or(t,(r=e.magnifierParams)!=null?r:{width:190,height:190,scale:2}),this.group=new O.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";const n=(a=this.params.openParams)!=null?a:{};if(this.params.useUIController!==!1){const l=F({container:this.container,openParams:n},typeof this.params.useUIController=="object"?this.params.useUIController:{});this.useUIController=new br(this,l)}if(this.params.useGuideController!==!1){const l=F({container:this.container},typeof this.params.useGuideController=="object"?this.params.useGuideController:{});this.useGuideController=new kf(this,l)}}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(t){var e;this.hasOpen||(this.hasOpen=!0,this.five.scene.add(this.group),this.container.style.opacity="1",t!=null&&t.mode?this.changeMode(t.mode):this.isMobile?this.changeMode("Mixed"):this.changeMode("Watch"),(e=this.useUIController)==null||e.show(),this.shortcutKeyController=new xf(this,this.five),this.hook.emit("enable",!0))}disable(){var t,e,n,o;this.hasOpen=!1,this.container.style.opacity="0",(t=this.controller)==null||t.dispose(),(e=this.useUIController)==null||e.hide(),(n=this.useGuideController)==null||n.hide(),(o=this.shortcutKeyController)==null||o.dispose(),this.controller=null,this.five.helperVisible=!0,this.five.scene.remove(this.group),this.five.needsRender=!0,this.hook.emit("disable",!0)}edit(){const t=this.isMobile?"Mixed":"Edit";this.changeMode(t)}revoke(){this.controller instanceof mi&&this.controller.revoke()}removePolyline(t){this.model.removePolyline(t)}removePolylineByID(t){const e=this.model.getPolylineByID(t);e&&this.model.removePolyline(e)}getPolylineByID(t){return this.model.getPolylineByID(t)}getEditedPolyline(){}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(t){var o;if(!(this.controller instanceof mi)&&!(this.controller instanceof Pn))return this;const e=(o=t==null?void 0:t.mode)!=null?o:"View",n=this.controller.polyline;return this.model.addPolyline(n),this.changeMode(e),this}addStartPoint(){this.controller instanceof Pn&&this.hook.emit("willChangeState","watching","editing")}addEndPoint(){this.controller instanceof Pn&&this.hook.emit("willChangeState","editing","watching")}toJson(){return this.model.toJson()}changeIsMobile(t){var e;if(this.isMobile=t,this.params.useUIController!==!1){(e=this.useUIController)==null||e.dispose();const n=F({container:this.container,mode:this.isMobile?"mobile":"pc"},typeof this.params.useUIController=="object"?this.params.useUIController:{});this.useUIController=new br(this,n)}}changeConfigs(t){var e;Object.assign(this.config,t),(e=this.controller)==null||e.updateDistanceUI()}setCustomText(t,e){var o;const n=this.model.getLineByID(t);if(!n)throw new Error("\u4E0D\u5B58\u5728\u7684\u7EBF\u6BB5");n.setText(e),(o=this.controller)==null||o.updateDistanceUI()}createControllerParams(){var e;const t=(e=this.params.openParams)!=null?e:{};return t.isMobile=this.isMobile,{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:t,mouseGroup:mr(F({},t.crossHairParameter)),userDistanceItemCreator:this.params.userDistanceItemCreator}}}const Lf=function(t,e){return new Df(t,e)},yr=Gi(null);function Sf(i){ce(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 wr(i,t,e){const n=i.slice();return n[3]=t[e],n}function Cr(i){let t,e=`${i[3].top}%`,n=`${i[3].left}%`,o,s;function r(){return i[2](i[3])}return{c(){t=T("i"),b(t,"class","svelte-19zi46m"),q(t,"PanoSpatialTagPlugin__tag-origin",!0),q(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),L(t,"top",e),L(t,"left",n),L(t,"visibility",i[3].front?"visible":"hidden")},m(a,l){z(a,t,l),o||(s=Pe(t,"click",r),o=!0)},p(a,l){i=a,l&1&&q(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),l&1&&e!==(e=`${i[3].top}%`)&&L(t,"top",e),l&1&&n!==(n=`${i[3].left}%`)&&L(t,"left",n),l&1&&L(t,"visibility",i[3].front?"visible":"hidden")},d(a){a&&M(t),o=!1,s()}}}function Mf(i){let t,e=i[0],n=[];for(let o=0;o<e.length;o+=1)n[o]=Cr(wr(i,e,o));return{c(){for(let o=0;o<n.length;o+=1)n[o].c();t=pe()},m(o,s){for(let r=0;r<n.length;r+=1)n[r].m(o,s);z(o,t,s)},p(o,[s]){if(s&3){e=o[0];let r;for(r=0;r<e.length;r+=1){const a=wr(o,e,r);n[r]?n[r].p(a,s):(n[r]=Cr(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:U,o:U,d(o){dt(n,o),o&&M(t)}}}function zf(i,t,e){let{origins:n}=t;const o=r=>{yr.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 Tf extends re{constructor(t){super(),se(this,t,zf,Mf,oe,{origins:0},Sf)}}function Bf(i){ce(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 jf(i){let t,e,n,o,s,r,a,l,c,u,h,d,f,p,v;return{c(){t=T("div"),e=T("div"),n=ne(),o=T("div"),s=T("i"),r=ne(),a=T("i"),l=ne(),c=T("i"),u=ne(),h=T("div"),d=T("div"),b(e,"class","PanoSpatialTagPlugin__tag-shadow svelte-1i5h9zh"),L(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"),L(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(h,"class","PanoSpatialTagPlugin__tag-animate svelte-1i5h9zh"),L(h,"transform","scale("+i[3]*3+")"),b(t,"id",f="PanoSpatialTagPlugin__"+i[0]),L(t,"height",20*i[5]+"rem"),b(t,"class","svelte-1i5h9zh"),q(t,"PanoSpatialTagPlugin__tag-x",!0),q(t,"PanoSpatialTagPlugin__tag-upside-down",i[1]),q(t,"PanoSpatialTagPlugin__tag-show",i[10]),q(t,"PanoSpatialTagPlugin__tag-hide",i[10]===!1||i[6])},m(g,A){z(g,t,A),V(t,e),V(t,n),V(t,o),V(o,s),V(o,r),V(o,a),V(o,l),V(o,c),V(t,u),V(t,h),V(h,d),d.innerHTML=i[2],i[16](d),p||(v=Pe(d,"click",i[11]),p=!0)},p(g,[A]){A&394&&L(e,"transform","translate("+g[7]/2*g[3]*3+"px, "+g[8]/2*(g[1]?-1:1)*g[3]*3+"px) scale("+1/g[3]+")"),A&16&&L(s,"width",g[4]+"rem"),A&4&&(d.innerHTML=g[2]),A&8&&L(h,"transform","scale("+g[3]*3+")"),A&1&&f!==(f="PanoSpatialTagPlugin__"+g[0])&&b(t,"id",f),A&32&&L(t,"height",20*g[5]+"rem"),A&2&&q(t,"PanoSpatialTagPlugin__tag-upside-down",g[1]),A&1024&&q(t,"PanoSpatialTagPlugin__tag-show",g[10]),A&1088&&q(t,"PanoSpatialTagPlugin__tag-hide",g[10]===!1||g[6])},i:U,o:U,d(g){g&&M(t),i[16](null),p=!1,v()}}}function Vf(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:h}=t,{events:d}=t,{hooks:f}=t,p=0,v=0,g,A,y=setTimeout(()=>{u||e(10,A=!0),y=void 0},100);const w=E=>{const S=Object.keys(d);let k=E.target;for(;k;){const j=k.getAttribute("class");if(!j){k=k.parentNode;continue}if(j.includes("PanoSpatialTagPlugin__tag-content")){k=null;break}S.forEach(_=>{j.includes(_)&&d[_](n)}),k=k.parentNode}};Ue(()=>{f.emit("initTag",{id:n})});const C=yr.subscribe(E=>{if(E===null)return;const[S,k]=E.split("-PanoSpatialTagPlugin-");n===S&&(f.emit("clickOrigin",{id:n,show:A}),y||(e(10,A=u),e(12,u=!u),y=setTimeout(()=>{y=void 0},1500)))});Ic(()=>{e(7,p=g.offsetWidth),e(8,v=g.offsetHeight),!y&&e(10,A=!u)}),wt(()=>{f.emit("destroyTag",{id:n}),C(),h()});function x(E){je[E?"unshift":"push"](()=>{g=E,e(9,g)})}return i.$$set=E=>{"id"in E&&e(0,n=E.id),"upsideDown"in E&&e(1,o=E.upsideDown),"content"in E&&e(2,s=E.content),"contentZoom"in E&&e(3,r=E.contentZoom),"lineWidthZoom"in E&&e(4,a=E.lineWidthZoom),"lineHeightZoom"in E&&e(5,l=E.lineHeightZoom),"destroying"in E&&e(6,c=E.destroying),"folded"in E&&e(12,u=E.folded),"dispose"in E&&e(13,h=E.dispose),"events"in E&&e(14,d=E.events),"hooks"in E&&e(15,f=E.hooks)},[n,o,s,r,a,l,c,p,v,g,A,w,u,h,d,f,x]}class Qf extends re{constructor(t){super(),se(this,t,Vf,jf,oe,{id:0,upsideDown:1,content:2,contentZoom:3,lineWidthZoom:4,lineHeightZoom:5,destroying:6,folded:12,dispose:13,events:14,hooks:15},Bf)}}const Of={position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",pointerEvents:"none"},Pr="<",Ir=">",Er="%",kr="locals",Rf="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",Ff={"&":"&","<":"<",">":">",'"':""","'":"'"},We={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};function xr(i){return i.replace(/;(\s*$)/,"$1")}function Gf(i,t){return new Hf(i).compileFunction()(t)}class Hf{constructor(t){m(this,"templateText");m(this,"mode",null);m(this,"truncate",!1);m(this,"currentLine",1);m(this,"source","");m(this,"regex",new RegExp(Rf));this.templateText=t}compileFunction(){let t;const e=` var __output = "";
|
|
497
|
+
`,Af={display:"none",position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:"0",transform:"translate(0, 10px)",transition:"opacity 500ms ease-in-out, transform 500ms ease-in-out"},vf={position:"absolute",left:"50%",bottom:"32px",transform:"translateX(-50%)",height:"89px",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"14px",pointerEvents:"all",color:"#fff",zIndex:"10"},bf={position:"absolute",bottom:"0",left:"0",opacity:"0.5",width:"100%",height:"184px",background:"linear-gradient(180deg, rgba(0,0,0,0.00) 0%, #000000 100%)",zIndex:"0"},Ar={margin:"0 64px"},yf={opacity:"0.85"},vr={width:"72px",height:"72px",backgroundSize:"100%",cursor:"pointer",transition:"all 200ms ease-in-out"},wf={width:"24px",height:"24px",marginRight:"4px",backgroundSize:"100%",cursor:"pointer"},Cf={userSelect:"none",pointerEvents:"none"};class Pf{constructor(t,e,n){m(this,"container");m(this,"measureController");m(this,"mainElement");m(this,"_params");m(this,"_btnTexts",{start:"\u5F00\u59CB",end:"\u7ED3\u675F",revoke:"\u64A4\u9500",exit:"\u9000\u51FA"});m(this,"onMouseEnter",()=>{const{mainItem:t}=this.mainElement;t.style.opacity="1"});m(this,"onMouseLeave",()=>{const{mainItem:t}=this.mainElement;t.style.opacity="0.85"});m(this,"onClick",()=>{this.measureController.getCurrentMode()!=="Edit"?this.measureController.changeMode("Edit"):this.measureController.save().changeMode("Watch")});m(this,"modeChangeHandler",t=>{t==="Edit"?this.change2Done():this.change2Add()});var r,a,l,c;this._params=n,this._btnTexts={start:(r=this._params.startButtonText)!=null?r:this._btnTexts.start,end:(a=this._params.endButtonText)!=null?a:this._btnTexts.end,revoke:(l=this._params.revokeButtonText)!=null?l:this._btnTexts.revoke,exit:(c=this._params.exitButtonText)!=null?c:this._btnTexts.exit},this.measureController=t,this.container=e,this.mainElement=this.getMainElement(),Object.assign(this.mainElement.mainIcon.style,vr),Object.assign(this.mainElement.mainItem.style,Ar);const{revokeTextDom:o,exitTextDom:s}=this._getTextElement();o&&(o.innerText=this._btnTexts.revoke),s&&(s.innerText=this._btnTexts.exit),this.change2Add(),this.measureController.hook.on("modeChange",this.modeChangeHandler),this.mainElement.mainItem.addEventListener("click",this.onClick),this.mainElement.mainItem.addEventListener("mouseenter",this.onMouseEnter),this.mainElement.mainItem.addEventListener("mouseleave",this.onMouseLeave)}dispose(){this.measureController.hook.off("modeChange",this.modeChangeHandler),this.mainElement.mainItem.removeEventListener("click",this.onClick),this.mainElement.mainItem.removeEventListener("mouseenter",this.onMouseEnter),this.mainElement.mainItem.removeEventListener("mouseleave",this.onMouseLeave)}getMainElement(){const t=this.container.querySelector(".fpm__main-text"),e=this.container.querySelector(".fpm__main"),n=this.container.querySelector(".fpm__main-icon");if(!e||!t||!n)throw new Error("cannot find dom");return{mainTextDom:t,mainItem:e,mainIcon:n}}_getTextElement(){const t=this.container.querySelector(".fpm__revoke-text"),e=this.container.querySelector(".fpm__exit-text");return{revokeTextDom:t,exitTextDom:e}}change2Add(){const{mainIcon:t,mainTextDom:e}=this.mainElement;if(t.className.includes("fpm__main__start")){e.innerText=this._btnTexts.start;return}t.className.includes("fpm__main__end")&&(t.style.transform="scale(0.8)",e.className.includes("fpm__main-text__show")?e.classList.replace("fpm__main-text__show","fpm__main-text__hide"):e.classList.add("fpm__main-text__hide"),setTimeout(()=>{t.classList.replace("fpm__main__end","fpm__main__start"),t.style.transform="scale(1)",e.innerText=this._btnTexts.start,e.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200))}change2Done(){const{mainTextDom:t,mainIcon:e}=this.getMainElement();t.innerText!==this._btnTexts.end&&(e.className.includes("fpm__main__end")||e.className.includes("fpm__main__start")&&(e.style.transform="scale(0.8)",t.className.includes("fpm__main-text__show")?t.classList.replace("fpm__main-text__show","fpm__main-text__hide"):t.classList.add("fpm__main-text__hide"),setTimeout(()=>{e.classList.replace("fpm__main__start","fpm__main__end"),e.style.transform="scale(1)",t.innerText=this._btnTexts.end,t.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200)))}}class If{constructor(t,e,n){m(this,"container");m(this,"measureController");m(this,"mainElement");m(this,"_params");m(this,"_btnTexts",{start:"\u5F00\u59CB",end:"\u7ED3\u675F"});m(this,"onClick",()=>{var t;this.mainElement.mainTextDom.innerText===((t=this._params.startButtonText)!=null?t:"\u5F00\u59CB")?(this.measureController.hook.emit("willChangeState","watching","editing"),this.change2Done()):(this.measureController.hook.emit("willChangeState","editing","watching"),this.change2Add())});var o,s;this._params=n,this._btnTexts={start:(o=this._params.startButtonText)!=null?o:this._btnTexts.start,end:(s=this._params.endButtonText)!=null?s:this._btnTexts.end},this.measureController=t,this.container=e,this.mainElement=this.getMainElement(),this.mainElement.mainIcon.setAttribute("style","-webkit-tap-highlight-color: rgba(0,0,0,0);"),Object.assign(this.mainElement.mainIcon.style,vr),Object.assign(this.mainElement.mainItem.style,Ar),this.change2Add(),this.mainElement.mainItem.addEventListener("click",this.onClick)}dispose(){this.mainElement.mainItem.removeEventListener("click",this.onClick)}getMainElement(){const t=this.container.querySelector(".fpm__main-text"),e=this.container.querySelector(".fpm__main"),n=this.container.querySelector(".fpm__main-icon");if(!e||!t||!n)throw new Error("cannot find dom");return{mainTextDom:t,mainItem:e,mainIcon:n}}change2Add(){const{mainIcon:t,mainTextDom:e}=this.mainElement;if(t.className.includes("fpm__main__start")){e.innerText=this._btnTexts.start;return}t.className.includes("fpm__main__end")&&(t.style.transform="scale(0.8)",e.className.includes("fpm__main-text__show")?e.classList.replace("fpm__main-text__show","fpm__main-text__hide"):e.classList.add("fpm__main-text__hide"),setTimeout(()=>{t.classList.replace("fpm__main__end","fpm__main__start"),t.style.transform="scale(1)",e.innerText=this._btnTexts.start,e.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200))}change2Done(){const{mainTextDom:t,mainIcon:e}=this.mainElement;t.innerText!==this._btnTexts.end&&(e.className.includes("fpm__main__end")||e.className.includes("fpm__main__start")&&(e.style.transform="scale(0.8)",t.className.includes("fpm__main-text__show")?t.classList.replace("fpm__main-text__show","fpm__main-text__hide"):t.classList.add("fpm__main-text__hide"),setTimeout(()=>{e.classList.replace("fpm__main__start","fpm__main__end"),e.style.transform="scale(1)",t.innerText=this._btnTexts.end,t.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200)))}}class Ef{constructor(t,e){m(this,"container");m(this,"revokeIcon");m(this,"revokeItem");m(this,"measureController");m(this,"onClick",()=>{this.measureController.revoke()});m(this,"onModeChange",t=>{if(t!=="Edit"&&this.revokeItem.className.includes("enabled")){this.revokeItem.classList.remove("enabled"),this.measureController.hook.off("anchorChange",this.onAnchorChange);return}this.measureController.hook.on("anchorChange",this.onAnchorChange)});m(this,"onAnchorChange",t=>{t&&this.revokeItem.classList.add("enabled")});this.measureController=t,this.container=e;const n=this.container.querySelector(".fpm__revoke-icon"),o=this.container.querySelector(".fpm__revoke");if(!n||!o)throw new Error("\u4E0D\u6B63\u786E\u7684\u9009\u62E9\u5668");this.revokeIcon=n,this.revokeItem=o,this.revokeItem.addEventListener("click",this.onClick),t.hook.on("modeChange",this.onModeChange)}dispose(){this.revokeItem.removeEventListener("click",this.onClick),this.measureController.hook.off("modeChange",this.onModeChange)}}class br{constructor(t,e){m(this,"revoke");m(this,"container");m(this,"mainController");m(this,"disposers",[]);m(this,"measureController");m(this,"mode");m(this,"_params");m(this,"handleExit",()=>{const t=this.container.querySelector(".fpm__exit-icon"),e=this.container.querySelector(".fpm__exit");if(!e||!t)throw new Error("cannot find dom");this.mode==="pc"&&(Object.assign(e.style,yf),Object.assign(t==null?void 0:t.style,wf));const n=()=>{e.style.opacity="1"},o=()=>{e.style.opacity="0.85"},s=()=>{this.measureController.disable()};return e.addEventListener("click",s),e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",o),()=>{e.removeEventListener("click",s),e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",o)}});var r;this._params=e,this.measureController=t,this.mode=(r=e.mode)!=null?r:"pc",this.container=document.createElement("div"),this.container.innerHTML=this.mode==="mobile"?pf:gf,this.container.classList.add("fpm__ui-controller",this.mode),this.container.style.background="rgba(0, 0, 0, 0.15)",e.container.appendChild(this.container);const n=this.container.querySelectorAll(".fpm__text"),o=this.container.querySelector(".fpm_ui-bg"),s=this.container.querySelector(".fpm_operating-space");Object.assign(o==null?void 0:o.style,bf),Object.assign(s==null?void 0:s.style,vf),Object.assign(this.container.style,Af),n.forEach(a=>Object.assign(a.style,Cf))}dispose(){this.hide(),this.container.remove()}show(){return this.container.style.display="block",this.container.style.opacity="1",this.container.style.transform="translate(0, 0)",this.mode==="pc"?(this.revoke=new Ef(this.measureController,this.container),this.mainController=new Pf(this.measureController,this.container,this._params)):this.mainController=new If(this.measureController,this.container,this._params),this.disposers.push(this.handleExit()),this}hide(){var t,e;return this.container.style.display="none",this.container.style.opacity="0",this.container.style.transform="translate(0, 10px)",this.mode==="pc"&&((t=this.revoke)==null||t.dispose()),(e=this.mainController)==null||e.dispose(),this.disposers.forEach(n=>n()),this.disposers=[],this}}class kf{constructor(t,e){m(this,"measureController");m(this,"textDom",document.createElement("span"));m(this,"container",document.createElement("div"));m(this,"hasAnchor",!1);m(this,"hasChangedToWatch",!1);m(this,"_params");m(this,"onModelChange",t=>{var e;if(t==="View"){this.hide();return}if(t==="Watch"){this.hasChangedToWatch?(this.textDom.innerText="",this.hide()):(this.show(),this.hasChangedToWatch=!0);return}t==="Edit"&&(this.textDom.innerText=(e=this._params.firstPointTip)!=null?e:"\u8BF7\u9009\u62E9\u7B2C\u4E00\u4E2A\u6D4B\u91CF\u70B9\uFF0CEsc\u6216\u5355\u51FB\u9F20\u6807\u53F3\u952E\u53EF\u53D6\u6D88\u9009\u62E9",this.show())});m(this,"anchorChange",t=>{var e,n;!this.hasAnchor&&!!t?(this.hasAnchor=!0,this.textDom.innerText=(e=this._params.nextPointTip)!=null?e:"\u9009\u62E9\u4E0B\u4E00\u4E2A\u6D4B\u91CF\u70B9\uFF0CEsc\u6216\u5355\u51FB\u9F20\u6807\u53F3\u952E\u53D6\u6D88\u9009\u62E9"):t||(this.hasAnchor=!1,this.textDom.innerText=(n=this._params.firstPointTip)!=null?n:"\u8BF7\u9009\u62E9\u7B2C\u4E00\u4E2A\u6D4B\u91CF\u70B9\uFF0CEsc\u6216\u5355\u51FB\u9F20\u6807\u53F3\u952E\u53EF\u53D6\u6D88\u9009\u62E9")});m(this,"onEditedLineChange",t=>{var e;t.lines.length===1&&(this.textDom.innerText=(e=this._params.endTip)!=null?e:"\u53EF\u4EE5\u8FDE\u7EED\u9009\u62E9\u6D4B\u91CF\u70B9\uFF0C\u6216\u70B9\u51FB\u4E0B\u65B9\u201C\u7ED3\u675F\u201D\u6309\u94AE\u5B8C\u6210\u6D4B\u91CF\uFF08Esc\u53D6\u6D88\uFF0CCommand+S\u4FDD\u5B58\uFF09")});this._params=e,this.initDom(),e.container.append(this.container),this.measureController=t,t.hook.on("modeChange",this.onModelChange),t.hook.on("anchorChange",this.anchorChange),t.hook.on("editedPolylineChange",this.onEditedLineChange)}dispose(){this.hide(),this.container.remove()}show(){return this.container.style.opacity="1",this.container.style.transform="translate(0, 0)",this}hide(){return this.container.style.opacity="0",this.container.style.transform="translate(0, -10px)",this.measureController.hook.off("modeChange",this.onModelChange),this.measureController.hook.off("anchorChange",this.anchorChange),this.measureController.hook.off("editedPolylineChange",this.onEditedLineChange),this}initDom(){var n;const t=this.container,e=this.textDom;t.classList.add("fpm__guide-container"),t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.width="100%",t.style.height="110px",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.transform="translate(0, -10px)",t.style.background="linear-gradient(180deg, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.00) 100%)",t.style.transition="opacity 500ms ease-in-out, transform 500ms ease-in-out",t.style.opacity="0",e.classList.add("fpm__guide-text"),e.style.color="#fff",e.style.fontSize="20px",e.innerText=(n=this._params.startTip)!=null?n:"\u70B9\u51FB\u4E0B\u65B9\u201C\u5F00\u59CB\u201D\u6309\u94AE\u5F00\u59CB\u6D4B\u8DDD",t.appendChild(e)}}class xf{constructor(t,e){m(this,"five");m(this,"measureController");m(this,"onKeyDown",t=>{if(t.metaKey&&t.code==="KeyS"){this.measureController.save().changeMode("Watch"),t.preventDefault();return}if(t.code==="Escape")return this.escape()});m(this,"onMouseDown",t=>{t.button===2&&(t.preventDefault(),this.escape())});this.five=e,this.measureController=t;const n=this.five.getElement();!n||(document.body.addEventListener("keydown",this.onKeyDown),n.addEventListener("mousedown",this.onMouseDown))}dispose(){const t=this.five.getElement();!t||(document.body.removeEventListener("keydown",this.onKeyDown),t.removeEventListener("mousedown",this.onMouseDown))}escape(){return this.measureController.getCurrentMode()==="Watch"?this.measureController.disable():this.measureController.changeMode("Watch")}}class Df{constructor(t,e){m(this,"hasOpen",!1);m(this,"hook",new me.Subscribe);m(this,"magnifier");m(this,"five");m(this,"model");m(this,"group");m(this,"config");m(this,"isMobile");m(this,"fiveHelper");m(this,"useUIController");m(this,"params");m(this,"useGuideController");m(this,"container",document.createElement("div"));m(this,"shortcutKeyController");m(this,"controller",null);m(this,"getCurrentMode",()=>this.controller instanceof mi?"Edit":this.controller instanceof hr?"Watch":this.controller instanceof Pn?"Mixed":this.controller instanceof lr?"View":null);m(this,"changeMode",t=>{var o;if(!this.hasOpen||this.getCurrentMode()===t)return;(o=this.controller)==null||o.dispose();const e={View:lr,Watch:hr,Edit:mi,Mixed:Pn};if(!e[t])throw new Error("\u4E0D\u5B58\u5728\u7684 Mode");const n=this.createControllerParams();this.controller=new e[t](n),this.hook.emit("modeChange",t)});var o,s,r,a;this.five=t,this.params=e,this.config=ei(e,["openParams","magnifierParams"]),this.model=new di(this.config),this.fiveHelper=new Oh(t),this.isMobile=(s=(o=e==null?void 0:e.openParams)==null?void 0:o.isMobile)!=null?s:!1,this.magnifier=new or(t,(r=e.magnifierParams)!=null?r:{width:190,height:190,scale:2}),this.group=new O.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";const n=(a=this.params.openParams)!=null?a:{};if(this.params.useUIController!==!1){const l=F({container:this.container,openParams:n},typeof this.params.useUIController=="object"?this.params.useUIController:{});this.useUIController=new br(this,l)}if(this.params.useGuideController!==!1){const l=F({container:this.container},typeof this.params.useGuideController=="object"?this.params.useGuideController:{});this.useGuideController=new kf(this,l)}}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(t){var e;this.hasOpen||(this.hasOpen=!0,this.five.scene.add(this.group),this.container.style.opacity="1",t!=null&&t.mode?this.changeMode(t.mode):this.isMobile?this.changeMode("Mixed"):this.changeMode("Watch"),(e=this.useUIController)==null||e.show(),this.shortcutKeyController=new xf(this,this.five),this.hook.emit("enable",!0))}disable(){var t,e,n,o;this.hasOpen=!1,this.container.style.opacity="0",(t=this.controller)==null||t.dispose(),(e=this.useUIController)==null||e.hide(),(n=this.useGuideController)==null||n.hide(),(o=this.shortcutKeyController)==null||o.dispose(),this.controller=null,this.five.helperVisible=!0,this.five.scene.remove(this.group),this.five.needsRender=!0,this.hook.emit("disable",!0)}edit(){const t=this.isMobile?"Mixed":"Edit";this.changeMode(t)}revoke(){this.controller instanceof mi&&this.controller.revoke()}removePolyline(t){this.model.removePolyline(t)}removePolylineByID(t){const e=this.model.getPolylineByID(t);e&&this.model.removePolyline(e)}getPolylineByID(t){return this.model.getPolylineByID(t)}getEditedPolyline(){}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(t){var o;if(!(this.controller instanceof mi)&&!(this.controller instanceof Pn))return this;const e=(o=t==null?void 0:t.mode)!=null?o:"View",n=this.controller.polyline;return this.model.addPolyline(n),this.changeMode(e),this}addStartPoint(){this.controller instanceof Pn&&this.hook.emit("willChangeState","watching","editing")}addEndPoint(){this.controller instanceof Pn&&this.hook.emit("willChangeState","editing","watching")}toJson(){return this.model.toJson()}changeIsMobile(t){var e;if(this.isMobile=t,this.params.useUIController!==!1){(e=this.useUIController)==null||e.dispose();const n=F({container:this.container,mode:this.isMobile?"mobile":"pc"},typeof this.params.useUIController=="object"?this.params.useUIController:{});this.useUIController=new br(this,n)}}changeConfigs(t){var e;Object.assign(this.config,t),(e=this.controller)==null||e.updateDistanceUI()}setCustomText(t,e){var o;const n=this.model.getLineByID(t);if(!n)throw new Error("\u4E0D\u5B58\u5728\u7684\u7EBF\u6BB5");n.setText(e),(o=this.controller)==null||o.updateDistanceUI()}createControllerParams(){var e;const t=(e=this.params.openParams)!=null?e:{};return t.isMobile=this.isMobile,{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:t,mouseGroup:mr(F({},t.crossHairParameter)),userDistanceItemCreator:this.params.userDistanceItemCreator}}}const Lf=function(t,e){return new Df(t,e)},yr=Gi(null);function Sf(i){ce(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 wr(i,t,e){const n=i.slice();return n[3]=t[e],n}function Cr(i){let t,e=`${i[3].top}%`,n=`${i[3].left}%`,o,s;function r(){return i[2](i[3])}return{c(){t=T("i"),b(t,"class","svelte-19zi46m"),q(t,"PanoSpatialTagPlugin__tag-origin",!0),q(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),L(t,"top",e),L(t,"left",n),L(t,"visibility",i[3].front?"visible":"hidden")},m(a,l){z(a,t,l),o||(s=Pe(t,"click",r),o=!0)},p(a,l){i=a,l&1&&q(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),l&1&&e!==(e=`${i[3].top}%`)&&L(t,"top",e),l&1&&n!==(n=`${i[3].left}%`)&&L(t,"left",n),l&1&&L(t,"visibility",i[3].front?"visible":"hidden")},d(a){a&&M(t),o=!1,s()}}}function Mf(i){let t,e=i[0],n=[];for(let o=0;o<e.length;o+=1)n[o]=Cr(wr(i,e,o));return{c(){for(let o=0;o<n.length;o+=1)n[o].c();t=pe()},m(o,s){for(let r=0;r<n.length;r+=1)n[r].m(o,s);z(o,t,s)},p(o,[s]){if(s&3){e=o[0];let r;for(r=0;r<e.length;r+=1){const a=wr(o,e,r);n[r]?n[r].p(a,s):(n[r]=Cr(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:U,o:U,d(o){dt(n,o),o&&M(t)}}}function zf(i,t,e){let{origins:n}=t;const o=r=>{yr.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 Tf extends re{constructor(t){super(),se(this,t,zf,Mf,oe,{origins:0},Sf)}}function Bf(i){ce(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 jf(i){let t,e,n,o,s,r,a,l,c,u,h,d,f,p,v;return{c(){t=T("div"),e=T("div"),n=ne(),o=T("div"),s=T("i"),r=ne(),a=T("i"),l=ne(),c=T("i"),u=ne(),h=T("div"),d=T("div"),b(e,"class","PanoSpatialTagPlugin__tag-shadow svelte-1i5h9zh"),L(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"),L(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(h,"class","PanoSpatialTagPlugin__tag-animate svelte-1i5h9zh"),L(h,"transform","scale("+i[3]*3+")"),b(t,"id",f="PanoSpatialTagPlugin__"+i[0]),L(t,"height",20*i[5]+"rem"),b(t,"class","svelte-1i5h9zh"),q(t,"PanoSpatialTagPlugin__tag-x",!0),q(t,"PanoSpatialTagPlugin__tag-upside-down",i[1]),q(t,"PanoSpatialTagPlugin__tag-show",i[10]),q(t,"PanoSpatialTagPlugin__tag-hide",i[10]===!1||i[6])},m(g,A){z(g,t,A),V(t,e),V(t,n),V(t,o),V(o,s),V(o,r),V(o,a),V(o,l),V(o,c),V(t,u),V(t,h),V(h,d),d.innerHTML=i[2],i[16](d),p||(v=Pe(d,"click",i[11]),p=!0)},p(g,[A]){A&394&&L(e,"transform","translate("+g[7]/2*g[3]*3+"px, "+g[8]/2*(g[1]?-1:1)*g[3]*3+"px) scale("+1/g[3]+")"),A&16&&L(s,"width",g[4]+"rem"),A&4&&(d.innerHTML=g[2]),A&8&&L(h,"transform","scale("+g[3]*3+")"),A&1&&f!==(f="PanoSpatialTagPlugin__"+g[0])&&b(t,"id",f),A&32&&L(t,"height",20*g[5]+"rem"),A&2&&q(t,"PanoSpatialTagPlugin__tag-upside-down",g[1]),A&1024&&q(t,"PanoSpatialTagPlugin__tag-show",g[10]),A&1088&&q(t,"PanoSpatialTagPlugin__tag-hide",g[10]===!1||g[6])},i:U,o:U,d(g){g&&M(t),i[16](null),p=!1,v()}}}function Vf(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:h}=t,{events:d}=t,{hooks:f}=t,p=0,v=0,g,A,y=setTimeout(()=>{u||e(10,A=!0),y=void 0},100);const w=E=>{const S=Object.keys(d);let k=E.target;for(;k;){const j=k.getAttribute("class");if(!j){k=k.parentNode;continue}if(j.includes("PanoSpatialTagPlugin__tag-content")){k=null;break}S.forEach(_=>{j.includes(_)&&d[_](n)}),k=k.parentNode}};Ue(()=>{f.emit("initTag",{id:n})});const C=yr.subscribe(E=>{if(E===null)return;const[S,k]=E.split("-PanoSpatialTagPlugin-");n===S&&(f.emit("clickOrigin",{id:n,show:A}),y||(e(10,A=u),e(12,u=!u),y=setTimeout(()=>{y=void 0},1500)))});Ic(()=>{e(7,p=g.offsetWidth),e(8,v=g.offsetHeight),!y&&e(10,A=!u)}),wt(()=>{f.emit("destroyTag",{id:n}),C(),h()});function x(E){je[E?"unshift":"push"](()=>{g=E,e(9,g)})}return i.$$set=E=>{"id"in E&&e(0,n=E.id),"upsideDown"in E&&e(1,o=E.upsideDown),"content"in E&&e(2,s=E.content),"contentZoom"in E&&e(3,r=E.contentZoom),"lineWidthZoom"in E&&e(4,a=E.lineWidthZoom),"lineHeightZoom"in E&&e(5,l=E.lineHeightZoom),"destroying"in E&&e(6,c=E.destroying),"folded"in E&&e(12,u=E.folded),"dispose"in E&&e(13,h=E.dispose),"events"in E&&e(14,d=E.events),"hooks"in E&&e(15,f=E.hooks)},[n,o,s,r,a,l,c,p,v,g,A,w,u,h,d,f,x]}class Qf extends re{constructor(t){super(),se(this,t,Vf,jf,oe,{id:0,upsideDown:1,content:2,contentZoom:3,lineWidthZoom:4,lineHeightZoom:5,destroying:6,folded:12,dispose:13,events:14,hooks:15},Bf)}}const Of={position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",pointerEvents:"none"},Pr="<",Ir=">",Er="%",kr="locals",Rf="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",Ff={"&":"&","<":"<",">":">",'"':""","'":"'"},He={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};function xr(i){return i.replace(/;(\s*$)/,"$1")}function Gf(i,t){return new Hf(i).compileFunction()(t)}class Hf{constructor(t){m(this,"templateText");m(this,"mode",null);m(this,"truncate",!1);m(this,"currentLine",1);m(this,"source","");m(this,"regex",new RegExp(Rf));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 (`+kr+` || {}) {
|
|
500
500
|
`,n=` }
|
|
@@ -502,14 +502,14 @@ void main() {
|
|
|
502
502
|
`,o=function(s){return s==null?"":String(s).replace(/[&<>'"]/g,function(r){return Ff[r]||r})};return this._generateSource(),this.source=e+this.source+n,t=this.source,t="escapeFn = escapeFn || "+o.toString()+`;
|
|
503
503
|
`+t,new Function(kr+", escapeFn",t)}_generateSource(){this.templateText=this.templateText.replace(/[ \t]*<%_/gm,"<%_").replace(/_%>[ \t]*/gm,"_%>");const t=this._parseTemplateText(),e=Er,n=Pr,o=Ir;t&&t.length&&t.forEach((s,r)=>{let a;if(s.indexOf(n+e)===0&&s.indexOf(n+e+e)!==0&&(a=t[r+2],!(a==e+o||a=="-"+e+o||a=="_"+e+o)))throw new Error('Could not find matching close tag for "'+s+'".');this._scanLine(s)})}_parseTemplateText(){let t=this.templateText;const e=this.regex;let n=e.exec(t);const o=[];let s;for(;n;)s=n.index,s!==0&&(o.push(t.substring(0,s)),t=t.slice(s)),o.push(n[0]),t=t.slice(n[0].length),n=e.exec(t);return t&&o.push(t),o}_addOutput(t){if(this.truncate&&(t=t.replace(/^(?:\r\n|\r|\n)/,""),this.truncate=!1),!t)return t;t=t.replace(/\\/g,"\\\\"),t=t.replace(/\n/g,"\\n"),t=t.replace(/\r/g,"\\r"),t=t.replace(/"/g,'\\"'),this.source+=' ; __append("'+t+`")
|
|
504
504
|
`}_scanLine(t){const e=Er,n=Pr,o=Ir;switch(t.split(`
|
|
505
|
-
`).length-1,t){case n+e:case n+e+"_":this.mode=
|
|
506
|
-
`;break;case e+e+o:this.mode=
|
|
507
|
-
`;break;case e+o:case"-"+e+o:case"_"+e+o:this.mode==
|
|
505
|
+
`).length-1,t){case n+e:case n+e+"_":this.mode=He.EVAL;break;case n+e+"=":this.mode=He.ESCAPED;break;case n+e+"-":this.mode=He.RAW;break;case n+e+"#":this.mode=He.COMMENT;break;case n+e+e:this.mode=He.LITERAL,this.source+=' ; __append("'+t.replace(n+e+e,n+e)+`")
|
|
506
|
+
`;break;case e+e+o:this.mode=He.LITERAL,this.source+=' ; __append("'+t.replace(e+e+o,e+o)+`")
|
|
507
|
+
`;break;case e+o:case"-"+e+o:case"_"+e+o:this.mode==He.LITERAL&&this._addOutput(t),this.mode=null,this.truncate=t.indexOf("-")===0||t.indexOf("_")===0;break;default:if(this.mode){switch(this.mode){case He.EVAL:case He.ESCAPED:case He.RAW:t.lastIndexOf("//")>t.lastIndexOf(`
|
|
508
508
|
`)&&(t+=`
|
|
509
|
-
`)}switch(this.mode){case
|
|
510
|
-
`;break;case
|
|
511
|
-
`;break;case
|
|
512
|
-
`;break;case
|
|
509
|
+
`)}switch(this.mode){case He.EVAL:this.source+=" ; "+t+`
|
|
510
|
+
`;break;case He.ESCAPED:this.source+=" ; __append(escapeFn("+xr(t)+`))
|
|
511
|
+
`;break;case He.RAW:this.source+=" ; __append("+xr(t)+`)
|
|
512
|
+
`;break;case He.COMMENT:break;case He.LITERAL:this._addOutput(t);break}}else this._addOutput(t)}}}const no=.001,Dr=.01,Wf="https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png",Nf=(i,t)=>{var X,J,he,fe,Ae,xe,Te,Fe;let e=t==null?void 0:t.container,n=1.4;const o=(X=t==null?void 0:t.wait)!=null?X:200,s=(J=t==null?void 0:t.maxNumberOnScreen)!=null?J:3,r=(he=t==null?void 0:t.minRad)!=null?he:Math.PI/4,a=(fe=t==null?void 0:t.nearTolerance)!=null?fe:100,l=(Ae=t==null?void 0:t.upsideHeight)!=null?Ae:1.6,c=(xe=t==null?void 0:t.minDistance)!=null?xe:1.2,u=(Te=t==null?void 0:t.maxDistance)!=null?Te:3.5,h=Nt(i),d=document.createElement("div");d.classList.add("PanoSpatialTagPlugin"),Object.assign(d.style,Of);const f=new me.Subscribe;let p=new Image;p.src=Wf;const v={points:[],origins:[],tags:[],template:"",events:{},render:Gf,folded:!1,enabled:!0,forbidden:!0},g=new Tf({target:d,props:{origins:v.origins}}),A=(ue,we)=>{x(),we&&E()},y=()=>{v.forbidden&&(v.forbidden=!1,E())},w=(ue,we)=>{if(v.tags.length===0)return;const Ee=we.longitude-i.state.longitude,de=i.camera.clone();de.position.copy(we.offset),de.rotateOnWorldAxis(new I.Vector3(0,1,0),Ee),de.updateProjectionMatrix(),de.updateMatrixWorld(!0);const Ke=new I.Frustum,mt=new I.Matrix4;mt.multiplyMatrices(de.projectionMatrix,de.matrixWorldInverse),Ke.setFromProjectionMatrix(mt),v.tags.forEach(ye=>{const it=de.position.clone().setY(n).distanceTo(ye.position);if(it<c||it>u||!Ke.containsPoint(ye.position))return ye.destroying=!0;const ie=ye.position.clone().sub(de.position).setY(0);if(ie.angleTo(ye.normal)>Math.PI/2-r&&ie.angleTo(ye.normal)<Math.PI/2+r)return ye.destroying=!0}),v.tags.forEach(ye=>{ye.destroying?ye.app.$set({contentZoom:.1+de.position.distanceTo(ye.position)/u,lineWidthZoom:.38*(.01+de.position.distanceTo(ye.position)/u),destroying:ye.destroying}):ye.app.$set({lineWidthZoom:.38*(.01+de.position.distanceTo(ye.position)/u),lineHeightZoom:.4+(de.position.distanceTo(ye.position)-c)/u*.6,contentZoom:.1+de.position.distanceTo(ye.position)/u})}),setTimeout(()=>{v.tags.forEach(ye=>{ye.destroying&&(ye.app.$destroy(),ye=null)}),v.tags=v.tags.filter(ye=>!ye.destroying),x()},1900)},C=ue=>{ue!==me.Five.Mode.Panorama&&!v.forbidden&&(g.$set({origins:[]}),v.tags.forEach(we=>{we.app.$destroy(),we=null}),v.origins=[],v.tags=[],v.forbidden=!0)},x=()=>{if(v.forbidden||!v.enabled)return;const ue=i.camera,we=ue.getWorldDirection(new I.Vector3);v.origins=v.tags.map(Ee=>{const de=Ee.position.clone().project(ue),Ke=Ee.position.clone().sub(ue.position).setY(0).angleTo(we.setY(0))<Math.PI/2;return{id:Ee.id,front:Ke,left:(de.x+1)/2*100,top:(-de.y+1)/2*100,destroying:Ee.destroying}}),g.$set({origins:v.origins})},E=()=>{v.forbidden||!v.enabled||(v.timeoutId&&clearTimeout(v.timeoutId),v.timeoutId=setTimeout(()=>{v.timeoutId=void 0;const ue=S();ue.length&&(v.tags=v.tags.concat(ue),x())},o))},S=()=>{const{clientWidth:ue,clientHeight:we}=i.getElement(),Ee=[],de=i.camera,Ke=new I.Frustum,mt=new I.Matrix4,ye=de.getWorldDirection(new I.Vector3);mt.multiplyMatrices(de.projectionMatrix,de.matrixWorldInverse),Ke.setFromProjectionMatrix(mt);const it=v.tags.filter(ve=>Ke.containsPoint(ve.position)&&!ve.destroying).length,ie=v.points.reduce((ve,Ge)=>{if(v.tags.find(Ve=>Ge.id===Ve.id&&!Ve.destroying))return ve;const ot=de.position.clone().setY(n).distanceTo(Ge.position);if(ot<c||ot>u||!Ke.containsPoint(Ge.position))return ve;const Ln=Ge.position.clone().sub(de.position).setY(0);if(Ln.angleTo(Ge.normal)>Math.PI/2-r&&Ln.angleTo(Ge.normal)<Math.PI/2+r)return ve;const ln=Ge.position.clone().project(de);if(!v.tags.every(Ve=>{if(Ve.position.clone().sub(de.position).setY(0).angleTo(ye.setY(0))>Math.PI/2)return!0;const Ft=Ve.position.clone().project(de);return Math.sqrt(Math.pow((ln.x-Ft.x)/2*ue,2)+Math.pow((ln.y-Ft.y)/2*we,2))>a}))return ve;const Rt={id:Ge.id,position:Ge.position,normal:Ge.normal,replacement:Ge.replacement,weight:Ge.weight,distance:ot};let Le;for(let Ve=0,Ft=ve.length;Ve<Ft;Ve++){const Pi=ve[Ve];if(Rt.weight>Pi.weight){Le=Ve;break}if(Rt.distance<Pi.distance){Le=Ve;break}}return Le!==void 0?ve.splice(Le,0,Rt):ve.push(Rt),ve},[]);for(let ve=0,Ge=ie.length;ve<Ge&&!(it+Ee.length>=s);ve++){const ot=ie[ve];if(Ee.find(Le=>ot.id===Le.id))continue;const Ln=ot.position.clone().project(de);if(!v.tags.concat(Ee).every(Le=>{if(Le.position.clone().sub(de.position).setY(0).angleTo(ye.setY(0))>Math.PI/2)return!0;const Ve=Le.position.clone().project(de);return Math.sqrt(Math.pow((Ln.x-Ve.x)/2*ue,2)+Math.pow((Ln.y-Ve.y)/2*we,2))>a}))continue;const ln=new I.Raycaster(de.position.clone().setY(n),ot.position.clone().sub(de.position.clone().setY(n)).normalize(),0,ot.distance+Dr),[Rt]=v.intersectObjects?ln.intersectObjects(v.intersectObjects,!0):i.model.bvhs.loaded?i.model.intersectRaycaster(ln):ln.intersectObjects(i.model.children,!0);if(!!Rt&&ot.distance-Rt.distance<Dr){const{position:Le,normal:Ve,id:Ft,replacement:Pi}=ot,Kv=new I.Plane().setFromNormalAndCoplanarPoint(Ve,Le),Ml=Le.clone().sub(de.position).cross(new I.Vector3(0,1,0)).setLength(no),$v=[Le.clone(),Le.clone().add(Ml),Le.clone().add(new I.Vector3(0,no,0)).add(Ml),Le.clone().add(new I.Vector3(0,no,0))].map(ib=>Kv.projectPoint(ib,new I.Vector3)),{container:eb,dispose:tb}=h.create3DDomContainer($v)||{},nb=new Qf({target:eb,props:{id:Ft,content:v.render(v.template,Pi),lineWidthZoom:.38*(.01+de.position.distanceTo(Le)/u),lineHeightZoom:.4+(de.position.distanceTo(Le)-c)/u*.6,contentZoom:.1+de.position.distanceTo(Le)/u,upsideDown:Le.y>l,folded:v.folded,events:v.events,hooks:f,dispose:tb}});Ee.push({position:Le,normal:Ve,id:Ft,app:nb})}}return Ee},k=ue=>{v.points=ue.points.map(we=>{var Ee,de;return{id:we.id,position:new I.Vector3().fromArray(we.position),normal:new I.Vector3().fromArray(we.normal),replacement:(Ee=we.replacement)!=null?Ee:{},weight:(de=we.weight)!=null?de:-1}}),ue.render&&(v.render=ue.render),ue.template&&(v.template=ue.template),ue.events&&(v.events=ue.events),ue.enabled===!1&&(v.enabled=ue.enabled),ue.folded===!0&&(v.folded=ue.folded)},j=ue=>{v.intersectObjects=ue,E()},_=()=>{v.enabled=!0,E()},G=()=>{v.enabled=!1,g.$set({origins:[]}),v.tags.forEach(ue=>{ue.app.$destroy(),ue=null}),v.origins=[],v.tags=[]},Z=()=>{v.folded=!1,v.tags.forEach(ue=>{ue.app.$set({folded:v.folded})})},Q=()=>{v.folded=!0,v.tags.forEach(ue=>{ue.app.$set({folded:v.folded})})},B=ue=>{v.tags.forEach(we=>{we.id===ue&&we.app.$set({folded:!1})})},R=ue=>{v.tags.forEach(we=>{we.id===ue&&we.app.$set({folded:!0})})},W=()=>{i.once("renderFrame",x)},H=()=>{e||(e=i.getElement().parentElement),e&&e.appendChild(d),v.forbidden=!1,n=i.model.bounding.getCenter(new I.Vector3).y,E(),i.on("panoWillArrive",w),i.on("panoArrived",y),i.on("modeChange",C),i.on("cameraUpdate",A)},te=()=>{p=null,h.disposeAll(),g.$destroy(),v.tags.forEach(ue=>{ue.app.$destroy(),ue=null}),v.origins=[],v.tags=[],i.off("modelLoaded",H),i.off("renderFrame",x),i.off("panoWillArrive",w),i.off("panoArrived",y),i.off("modeChange",C),i.off("cameraUpdate",A),i.off("dispose",te),window.removeEventListener("resize",W,!1)};return window.addEventListener("resize",W,!1),(Fe=i==null?void 0:i.model)!=null&&Fe.loaded?H():i.once("modelLoaded",H),i.on("dispose",te),{load:k,setIntersectObjects:j,unfoldAll:Z,foldAll:Q,unfold:B,fold:R,enable:_,disable:G,hooks:f,dispose:te}};var Vt=(i=>(i.SMALL="small",i.MIDLLE="middle",i.LARGE="large",i.EXTRA_LARGE="x-large",i))(Vt||{});function _f(i){ce(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
514
|
}}`)}function Xf(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=T("div"),e=T("div"),n=T("span"),s=De(o),r=ne(),a=T("div"),b(n,"class","item-label-item__text svelte-1ir3cyd"),b(e,"class","item-label-item__text-wrap svelte-1ir3cyd"),L(e,"top",`-${i[0].strokeLength+26}px`),b(a,"class","item-label-item__bar svelte-1ir3cyd"),L(a,"height",`${i[0].strokeLength}px`),b(t,"class",l=Qe($e.default("item-label-item",{visible:i[0].visible}))+" svelte-1ir3cyd"),L(t,"z-index",i[0].zIndex),L(t,"transform",i[0].transform)},m(h,d){z(h,t,d),V(t,e),V(e,n),V(n,s),V(t,r),V(t,a),c||(u=Pe(n,"click",i[1]),c=!0)},p(h,[d]){d&1&&o!==(o=(h[0].name.length>6?`${h[0].name.slice(0,6)}...`:h[0].name)+"")&&Me(s,o),d&1&&L(e,"top",`-${h[0].strokeLength+26}px`),d&1&&L(a,"height",`${h[0].strokeLength}px`),d&1&&l!==(l=Qe($e.default("item-label-item",{visible:h[0].visible}))+" svelte-1ir3cyd")&&b(t,"class",l),d&1&&L(t,"z-index",h[0].zIndex),d&1&&L(t,"transform",h[0].transform)},i:U,o:U,d(h){h&&M(t),c=!1,u()}}}function Yf(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 Uf extends re{constructor(t){super(),se(this,t,Yf,Xf,oe,{itemLabel:0,hooks:2},_f)}}function Lr(i,t=200){let e;return function(...n){clearTimeout(e),e=setTimeout(()=>{i(...n)},t)}}function Jf(i){ce(i,"svelte-gk8s47",".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}")}function Sr(i,t,e){const n=i.slice();return n[26]=t[e],n}function Mr(i,t){let e,n,o;return n=new Uf({props:{itemLabel:t[26],hooks:t[0]}}),{key:i,first:null,c(){e=pe(),ee(n.$$.fragment),this.first=e},m(s,r){z(s,e,r),K(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||(P(n.$$.fragment,s),o=!0)},o(s){D(n.$$.fragment,s),o=!1},d(s){s&&M(e),$(n,s)}}}function Zf(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=Sr(i,r,l),u=a(c);n.set(u,e[l]=Mr(u,c))}return{c(){t=T("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","item-labels-container svelte-gk8s47"),ze(()=>i[9].call(t)),L(t,"opacity",i[4]?1:0)},m(l,c){z(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],ae(),e=Je(e,c,a,1,l,r,n,t,Pt,Mr,null,Sr),le()),c&16&&L(t,"opacity",l[4]?1:0)},i(l){if(!s){for(let c=0;c<r.length;c+=1)P(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)D(e[c]);s=!1},d(l){l&&M(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}let zr=26,qf=11;function Kf(i,t,e){const{Raycaster:n,Vector3:o}=I;let{five:s}=t,{modelOcclusionEnable:r}=t,{itemLabels:a}=t,{hooks:l}=t,{displayStrategyType:c}=t,u=null,h=null,d,f,p=[],v=!0;const g=(Q,B)=>{const R=new n,W=Q.camera.position.clone(),H=new o().fromArray(B.modelPosition),te=H.distanceTo(W);R.set(W.clone(),H.clone().sub(W).normalize());const[X]=Q.model.intersectRaycaster(R);return!(X&&X.distance+1<te)},A=(Q,B)=>{const R=new o(B.modelPosition[0],B.modelPosition[1],B.modelPosition[2]),W=Q.project2d(R),H=W==null?void 0:W.x,te=W==null?void 0:W.y;return[H,te]},y=Q=>`translate(${Q[0]}px, ${Q[1]}px)`,w=(Q,B)=>p.length===0?!1:!!p.find(W=>Q[0]>=W[0]-B&&Q[0]<=W[0]+B||Q[1]>=W[1]-zr&&Q[1]<=W[1]+zr);function C(Q,B){switch(B){case Vt.SMALL:return Math.ceil(-27.78*Q+85);case Vt.MIDLLE:return Math.ceil(-38.9*Q+130);case Vt.LARGE:return Math.ceil(-44.44*Q+140);case Vt.EXTRA_LARGE:return Math.ceil(-92.59*Q+300)}}const x=(Q,B)=>{const R=B.map(H=>{const te=A(Q,H),X=H.name.length*qf,J=C(H.modelPosition[1],c),fe=(r?g(Q,H):!0)&&!w([te[0],te[1]+J],X);if(!fe)return ge(F({},H),{visible:fe});p.push(te);const Ae=y(te);return ge(F({},H),{visible:fe,transform:Ae,strokeLength:J})}),W=R.filter(({visible:H})=>H).map(H=>({itemLabelItem:H,distance:new o(H.modelPosition[0],H.modelPosition[1],H.modelPosition[2]).clone().distanceTo(Q.camera.position)})).sort((H,te)=>H.distance-te.distance);return R.map(H=>{const te=W.findIndex(X=>X.itemLabelItem.id===H.id);return te!==void 0?ge(F({},H),{zIndex:te*10}):H})},E=()=>{p=[],e(1,h=x(s,h))};Ko(()=>{_()});const S=()=>{e(4,v=!1),k()};Ue(()=>{e(1,h=a),u=a,E(),j(),s.on("cameraUpdate",S)});const k=Lr(()=>{e(4,v=!0),E()},300),j=()=>{window.addEventListener("resize",G,!1)},_=()=>{u!==a&&(e(1,h=a),u=a,E())},G=()=>{s.once("renderFrame",E)};wt(()=>{s.off("cameraUpdate",S),window.removeEventListener("resize",G,!1)});function Z(){d=this.clientWidth,f=this.clientHeight,e(2,d),e(3,f)}return i.$$set=Q=>{"five"in Q&&e(5,s=Q.five),"modelOcclusionEnable"in Q&&e(6,r=Q.modelOcclusionEnable),"itemLabels"in Q&&e(7,a=Q.itemLabels),"hooks"in Q&&e(0,l=Q.hooks),"displayStrategyType"in Q&&e(8,c=Q.displayStrategyType)},[l,h,d,f,v,s,r,a,c,Z]}class $f extends re{constructor(t){super(),se(this,t,Kf,Zf,oe,{five:5,modelOcclusionEnable:6,itemLabels:7,hooks:0,displayStrategyType:8},Jf)}}function em(i){return i.model_item_labels.map(t=>F({modelPosition:[t.position[0],t.position[1]+t.size[1],t.position[2]]},t))}const tm=(i,t)=>{var d,f;const e={container:document.createElement("div"),data:null,enabled:!0,fiveModeEnabled:void 0,itemLabels:[],wrapper:null,app:void 0,hooks:new me.Subscribe,modelOcclusionEnable:(d=t==null?void 0:t.modelOcclusionEnable)!=null?d:!0,displayStrategyType:(f=t==null?void 0:t.displayStrategyType)!=null?f:Vt.SMALL};e.container.setAttribute("class","model-item-label-plugin-container"),e.container.style.cssText=`
|
|
515
515
|
position: absolute;
|
|
@@ -520,7 +520,7 @@ void main() {
|
|
|
520
520
|
z-index: 5;
|
|
521
521
|
`,e.container.style.pointerEvents="none";const n=p=>(e.wrapper=p,p.appendChild(e.container),l(),!0),o=p=>{e.itemLabels=em(p),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{u(),e.container.remove()},l=()=>{var p;if(!!e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(p=e.app)==null||p.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new $f({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",h),i.once("dispose",a)},u=()=>{i.off("modeChange",h)},h=p=>{if(!!e.enabled){if(p!==me.Five.Mode.Floorplan){e.fiveModeEnabled=!1,l();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=i.currentMode===me.Five.Mode.Floorplan,l()})}};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},nm={name:"ModelItemLabelPlugin",version:0};var on=(i=>(i.TOP_LEFT="topLeft",i.TOP_RIGHT="topRight",i.BOTTOM_LEFT="bottomLeft",i.BOTTOM_RIGHT="bottomRight",i))(on||{});function im(i){if(i.length===0)return[];if(Array.isArray(i[0]))return i;let t=[];return i.forEach(e=>{const n=[e[on.TOP_LEFT],e[on.BOTTOM_LEFT],e[on.BOTTOM_RIGHT],e[on.TOP_RIGHT]];t.push(n)}),t}const om=(i,{videoElement:t})=>{const e={videoMeshes:[],videoTextureEnabled:!1,videoSource:"",rectPoints:[],enabled:!1,videoElement:t},n=Nt(i),o=new Map,s=A=>{e.videoTexture&&(e.videoTexture.image.muted=A)},r=()=>e.videoTexture?e.videoTexture.image.muted:!0,a=()=>{if(e.enabled||!e.videoTexture)return;e.enabled=!0,e.videoMeshes=c(),e.videoMeshes.forEach(y=>i.scene.add(y));const A=()=>{if(!e.videoTexture)return;const y=()=>{var w;!e.videoTexture||((w=e.videoTexture)==null||w.image.removeEventListener("timeupdate",y),e.videoTextureEnabled=!0,e.videoMeshes.forEach(C=>{C.material.map!==e.videoTexture&&(C.material.map=e.videoTexture)}),i.needsRender=!0)};e.videoTexture.image.addEventListener("timeupdate",y),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)A();else return i.once("modelLoaded",()=>A())},l=()=>{!e.enabled||(e.enabled=!1,e.videoMeshes.forEach(A=>{A.geometry.dispose(),A.material.dispose(),i.scene.remove(A),e.videoTexture&&e.videoTexture.image.pause()}),e.videoMeshes=[],i.needsRender=!0)},c=()=>e.rectPoints.map((A,y)=>{const w=new I.BufferGeometry,C=128,x=[];x.push(...A[0].toArray());for(let Q=1;Q<C;Q++)x.push(A[0].x+(A[1].x-A[0].x)*Q/C,A[0].y+(A[1].y-A[0].y)*Q/C,A[0].z+(A[1].z-A[0].z)*Q/C);x.push(...A[1].toArray()),x.push(...A[2].toArray());for(let Q=1;Q<C;Q++)x.push(A[2].x+(A[3].x-A[2].x)*Q/C,A[2].y+(A[3].y-A[2].y)*Q/C,A[2].z+(A[3].z-A[2].z)*Q/C);x.push(...A[3].toArray());const E=[];E.push(0,1);for(let Q=1;Q<C;Q++)E.push(0,1-Q/C);E.push(0,0),E.push(1,0);for(let Q=1;Q<C;Q++)E.push(1,Q/C);E.push(1,1);const S=[];for(let Q=0;Q<C;Q++)S.push(Q,Q+1,C*2-Q,Q,C*2-Q,C*2+1-Q);w.setAttribute("position",new I.BufferAttribute(new Float32Array(x),3)),w.setAttribute("uv",new I.BufferAttribute(new Float32Array(E),2)),w.setIndex(new I.BufferAttribute(new Uint32Array(S),1));const k=new I.AxesHelper(10);i.scene.add(k);const j=new I.MeshBasicMaterial({map:e.videoTextureEnabled?e.videoTexture:e.imageTexture,side:I.DoubleSide}),_=new I.Mesh(w,j);_.renderOrder=1,_.name=`ModelTVVideoPlugin-${y}-${performance.now()}`;const G=[A[1],A[2],A[3],A[0]],Z=n.create3DDomContainer(G);if(Z!=null&&Z.container){const Q=document.createElement("div");Q.classList.add("play-icon"),Q.style.width="100%",Q.style.height="100%",Q.style.display="flex",Q.style.justifyContent="center",Q.style.alignItems="center",Q.style.pointerEvents="none",Z.container.appendChild(Q);const B=document.createElement("img");B.src="//vrlab-static.ljcdn.com/release/web/play.2ada5b6f.png",B.style.width="200px",B.style.pointerEvents="auto",B.onclick=()=>{e.videoTexture.image.muted=!1,e.videoTexture.image.play()},Q.appendChild(B),o.set(_,Z)}return _}),u=A=>{const y=new I.TextureLoader().load(A);return y.minFilter=I.LinearFilter,y.magFilter=I.LinearFilter,y.format=I.RGBFormat,y},h=(A,y)=>new Promise((w,C)=>{const x=new XMLHttpRequest;x.onreadystatechange=()=>{if(x.readyState==4)if(x.status==200){const E=window.URL||window.webkitURL;y=y||document.createElement("video"),y.crossOrigin="anonymous",y.muted=!0,y.loop=!0,y.playsInline=!0,y.src=E.createObjectURL(x.response);const S=new I.VideoTexture(y);S.minFilter=I.LinearFilter,S.magFilter=I.LinearFilter,S.format=I.RGBFormat,w(Object.assign(S,{videoSource:A}))}else C(new Error("Video download Error: "+x.status))},x.onerror=E=>C(E),x.open("GET",A),x.responseType="blob",x.send()}),d=(A,y)=>N(this,null,function*(){const{video_src:w,video_poster_src:C,points:x}=A;e.videoSource=w,e.rectPoints=im(x).map(E=>E.map(({x:S,y:k,z:j})=>new I.Vector3(S,k,j))),e.imageTexture=u(C),y&&(e.videoElement=y),e.videoTexture=yield h(e.videoSource,e.videoElement),e.enabled=!!A.enable,e.enabled&&a()}),f=A=>{if(!e.enabled)return;const y=e.videoMeshes;if(!(!y||A.intersectObjects(y).length===0))return e.videoTexture&&(e.videoTexture.image.paused||e.videoTexture.image.pause()),!1},p=A=>{A==="Floorplan"?n.hide():n.show()},v=()=>{if(!e.enabled)return;const A=i.camera.position;if(o.forEach((y,w)=>{const C=y.css3DObject.position.clone(),x=C.clone().sub(A).normalize(),E=new I.Raycaster(A,x),S=i.model.intersectRaycaster(E)[0],k=C.distanceTo(A),j=.01;S&&S.distance+j<k?y.hide():y.show()}),!r()){const y=e.rectPoints.find(w=>{const C=w[0].clone().add(w[1]).add(w[2]).add(w[3]).divideScalar(4);return w.map(x=>x.clone().add(C).divideScalar(2)).filter(x=>{const E=x.distanceTo(A),S=new I.Raycaster(A,x.clone().sub(A).normalize()),k=i.model.intersectRaycaster(S)[0],j=.01;return!(k&&k.distance+j<E)}).length>=2});(!y||y.length===0)&&s(!0)}},g=()=>{l(),e.videoTexture=void 0,i.off("modeChange",p),i.off("wantsTapGesture",f),i.off("panoArrived",v),i.off("renderFrame",()=>{e.videoMeshes.forEach(A=>{A&&(A.needsRender=!0)})})};return i.on("modeChange",p),i.on("wantsTapGesture",f),i.on("panoArrived",v),i.on("renderFrame",()=>{e.videoMeshes.forEach(A=>{A&&(A.needsRender=!0)})}),{enable:a,disable:l,load:d,dispose:g,state:e,css3DRenderPlugin:n}};function sm(i){ce(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 rm(i){let t,e,n,o=(i[0].code||i[0].id)+"",s,r,a,l=i[0].name+"",c,u=i[0].icon&&Tr(i);return{c(){u&&u.c(),t=ne(),e=T("div"),n=T("span"),s=De(o),r=ne(),a=T("span"),c=De(l),b(n,"class","item-model svelte-gduhqw"),b(a,"class","item-name svelte-gduhqw"),b(e,"class","item-label-text svelte-gduhqw")},m(h,d){u&&u.m(h,d),z(h,t,d),z(h,e,d),V(e,n),V(n,s),V(e,r),V(e,a),V(a,c)},p(h,d){h[0].icon?u?u.p(h,d):(u=Tr(h),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null),d&1&&o!==(o=(h[0].code||h[0].id)+"")&&Me(s,o),d&1&&l!==(l=h[0].name+"")&&Me(c,l)},d(h){u&&u.d(h),h&&M(t),h&&M(e)}}}function am(i){let t;return{c(){t=T("div")},m(e,n){z(e,t,n),i[6](t)},p:U,d(e){e&&M(t),i[6](null)}}}function Tr(i){let t,e,n,o,s;return{c(){t=T("div"),e=T("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){z(r,t,a),V(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&&M(t),o=!1,s()}}}function lm(i){let t,e,n,o,s,r,a,l,c,u;function h(p,v){return v&1&&(n=null),n==null&&(n=!!Boolean(typeof p[0].render=="function")),n?am:rm}let d=h(i,-1),f=d(i);return{c(){t=T("div"),e=T("div"),f.c(),s=ne(),r=T("div"),b(e,"class",o=Qe($e.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof i[0].render=="function")}))+" svelte-gduhqw"),L(e,"bottom",`${i[0].strokeLength}px`),b(r,"class",a=Qe($e.default("item-label-item__bar",{anchor:i[1]}))+" svelte-gduhqw"),L(r,"height",`${i[0].strokeLength}px`),b(t,"class",l=Qe($e.default("item-label-item",{fold:i[0].isFold}))+" svelte-gduhqw"),L(t,"z-index",i[0].zIndex),L(t,"transform",i[0].transform)},m(p,v){z(p,t,v),V(t,e),f.m(e,null),V(t,s),V(t,r),c||(u=Pe(e,"click",i[4]),c=!0)},p(p,[v]){d===(d=h(p,v))&&f?f.p(p,v):(f.d(1),f=d(p),f&&(f.c(),f.m(e,null))),v&1&&o!==(o=Qe($e.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof p[0].render=="function")}))+" svelte-gduhqw")&&b(e,"class",o),v&1&&L(e,"bottom",`${p[0].strokeLength}px`),v&2&&a!==(a=Qe($e.default("item-label-item__bar",{anchor:p[1]}))+" svelte-gduhqw")&&b(r,"class",a),v&1&&L(r,"height",`${p[0].strokeLength}px`),v&1&&l!==(l=Qe($e.default("item-label-item",{fold:p[0].isFold}))+" svelte-gduhqw")&&b(t,"class",l),v&1&&L(t,"z-index",p[0].zIndex),v&1&&L(t,"transform",p[0].transform)},i:U,o:U,d(p){p&&M(t),f.d(),c=!1,u()}}}function cm(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(h){je[h?"unshift":"push"](()=>{l=h,e(3,l)})}const u=h=>r(n);return i.$$set=h=>{"itemLabel"in h&&e(0,n=h.itemLabel),"hooks"in h&&e(5,o=h.hooks),"anchorEnabled"in h&&e(1,s=h.anchorEnabled),"onIconClick"in h&&e(2,r=h.onIconClick)},i.$$.update=()=>{if(i.$$.dirty&9&&typeof n.render=="function"&&l&&l.children.length===0){const h=n.render(n);h&&l.appendChild(h)}},[n,s,r,l,a,o,c,u]}class um extends re{constructor(t){super(),se(this,t,cm,lm,oe,{itemLabel:0,hooks:5,anchorEnabled:1,onIconClick:2},sm)}}const{Raycaster:dm,Vector3:mb}=I,Br=(i,t,e,n)=>{const o=t.clone().sub(e).normalize(),s=new dm;s.set(e,o);const[r]=i.model.intersectRaycaster(s);return r&&r.distance+.01<n};var Qt=(i=>(i.SMALL="small",i.MIDLLE="middle",i.LARGE="large",i.EXTRA_LARGE="x-large",i))(Qt||{});const hm=(i,t)=>{switch(t){case Qt.SMALL:return Math.ceil(-27.78*i+85);case Qt.MIDLLE:return Math.ceil(-38.9*i+130);case Qt.LARGE:return Math.ceil(-44.44*i+140);case Qt.EXTRA_LARGE:return Math.ceil(-92.59*i+300)}},fm=i=>`translate(${i[0]}px, ${i[1]}px)`;function jr(i){return i.map(t=>F({observerIndex:void 0,visible:!1,isFold:!1},t))}function mm(i){ce(i,"svelte-gk8s47",".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}")}function Vr(i,t,e){const n=i.slice();return n[30]=t[e],n}function Qr(i){let t,e;return t=new um({props:{itemLabel:i[30],hooks:i[0],anchorEnabled:i[2],onIconClick:i[6]}}),{c(){ee(t.$$.fragment)},m(n,o){K(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||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Or(i,t){let e,n,o,s=t[30].visible&&Qr(t);return{key:i,first:null,c(){e=pe(),s&&s.c(),n=pe(),this.first=e},m(r,a){z(r,e,a),s&&s.m(r,a),z(r,n,a),o=!0},p(r,a){t=r,t[30].visible?s?(s.p(t,a),a[0]&2&&P(s,1)):(s=Qr(t),s.c(),P(s,1),s.m(n.parentNode,n)):s&&(ae(),D(s,1,1,()=>{s=null}),le())},i(r){o||(P(s),o=!0)},o(r){D(s),o=!1},d(r){r&&M(e),s&&s.d(r),r&&M(n)}}}function pm(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=Vr(i,r,l),u=a(c);n.set(u,e[l]=Or(u,c))}return{c(){t=T("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","item-labels-container svelte-gk8s47"),ze(()=>i[12].call(t)),L(t,"opacity",i[5]?1:0)},m(l,c){z(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],ae(),e=Je(e,c,a,1,l,r,n,t,Pt,Or,null,Vr),le()),c[0]&32&&L(t,"opacity",l[5]?1:0)},i(l){if(!s){for(let c=0;c<r.length;c+=1)P(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)D(e[c]);s=!1},d(l){l&&M(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}let gm=11;function Am(i,t,e){const{Raycaster:n,Vector3:o}=I;let{five:s}=t,{modelOcclusionEnable:r}=t,{itemLabels:a}=t,{hooks:l}=t,{displayStrategyType:c}=t,{maxVisibleDistance:u}=t,h=null,d=null,f=(s==null?void 0:s.currentMode)===me.Five.Mode.Panorama,p,v,g=[],A=!0;const y=(R,W)=>{const H=R.camera.position.clone(),te=new o(W.modelPosition[0],W.modelPosition[1],W.modelPosition[2]),X=te.distanceTo(H);return u!==void 0&&R.state.mode===me.Five.Mode.Panorama&&X>u?!1:Br(R,te.clone().sub(H).normalize(),H,X)},w=R=>{const{camera:W,model:H}=s,{x:te,y:X,z:J}=R.clone().project(W),he=(te+1)/2,fe=(2-(X+1))/2,Te=Math.abs(J)<1&&[he,fe].every(
|
|
523
|
+
}}`)}function rm(i){let t,e,n,o=(i[0].code||i[0].id)+"",s,r,a,l=i[0].name+"",c,u=i[0].icon&&Tr(i);return{c(){u&&u.c(),t=ne(),e=T("div"),n=T("span"),s=De(o),r=ne(),a=T("span"),c=De(l),b(n,"class","item-model svelte-gduhqw"),b(a,"class","item-name svelte-gduhqw"),b(e,"class","item-label-text svelte-gduhqw")},m(h,d){u&&u.m(h,d),z(h,t,d),z(h,e,d),V(e,n),V(n,s),V(e,r),V(e,a),V(a,c)},p(h,d){h[0].icon?u?u.p(h,d):(u=Tr(h),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null),d&1&&o!==(o=(h[0].code||h[0].id)+"")&&Me(s,o),d&1&&l!==(l=h[0].name+"")&&Me(c,l)},d(h){u&&u.d(h),h&&M(t),h&&M(e)}}}function am(i){let t;return{c(){t=T("div")},m(e,n){z(e,t,n),i[6](t)},p:U,d(e){e&&M(t),i[6](null)}}}function Tr(i){let t,e,n,o,s;return{c(){t=T("div"),e=T("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){z(r,t,a),V(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&&M(t),o=!1,s()}}}function lm(i){let t,e,n,o,s,r,a,l,c,u;function h(p,v){return v&1&&(n=null),n==null&&(n=!!Boolean(typeof p[0].render=="function")),n?am:rm}let d=h(i,-1),f=d(i);return{c(){t=T("div"),e=T("div"),f.c(),s=ne(),r=T("div"),b(e,"class",o=Qe($e.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof i[0].render=="function")}))+" svelte-gduhqw"),L(e,"bottom",`${i[0].strokeLength}px`),b(r,"class",a=Qe($e.default("item-label-item__bar",{anchor:i[1]}))+" svelte-gduhqw"),L(r,"height",`${i[0].strokeLength}px`),b(t,"class",l=Qe($e.default("item-label-item",{fold:i[0].isFold}))+" svelte-gduhqw"),L(t,"z-index",i[0].zIndex),L(t,"transform",i[0].transform)},m(p,v){z(p,t,v),V(t,e),f.m(e,null),V(t,s),V(t,r),c||(u=Pe(e,"click",i[4]),c=!0)},p(p,[v]){d===(d=h(p,v))&&f?f.p(p,v):(f.d(1),f=d(p),f&&(f.c(),f.m(e,null))),v&1&&o!==(o=Qe($e.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof p[0].render=="function")}))+" svelte-gduhqw")&&b(e,"class",o),v&1&&L(e,"bottom",`${p[0].strokeLength}px`),v&2&&a!==(a=Qe($e.default("item-label-item__bar",{anchor:p[1]}))+" svelte-gduhqw")&&b(r,"class",a),v&1&&L(r,"height",`${p[0].strokeLength}px`),v&1&&l!==(l=Qe($e.default("item-label-item",{fold:p[0].isFold}))+" svelte-gduhqw")&&b(t,"class",l),v&1&&L(t,"z-index",p[0].zIndex),v&1&&L(t,"transform",p[0].transform)},i:U,o:U,d(p){p&&M(t),f.d(),c=!1,u()}}}function cm(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(h){je[h?"unshift":"push"](()=>{l=h,e(3,l)})}const u=h=>r(n);return i.$$set=h=>{"itemLabel"in h&&e(0,n=h.itemLabel),"hooks"in h&&e(5,o=h.hooks),"anchorEnabled"in h&&e(1,s=h.anchorEnabled),"onIconClick"in h&&e(2,r=h.onIconClick)},i.$$.update=()=>{if(i.$$.dirty&9&&typeof n.render=="function"&&l&&l.children.length===0){const h=n.render(n);h&&l.appendChild(h)}},[n,s,r,l,a,o,c,u]}class um extends re{constructor(t){super(),se(this,t,cm,lm,oe,{itemLabel:0,hooks:5,anchorEnabled:1,onIconClick:2},sm)}}const{Raycaster:dm,Vector3:mb}=I,Br=(i,t,e,n)=>{const o=t.clone().sub(e).normalize(),s=new dm;s.set(e,o);const[r]=i.model.intersectRaycaster(s);return r&&r.distance+.01<n};var Qt=(i=>(i.SMALL="small",i.MIDLLE="middle",i.LARGE="large",i.EXTRA_LARGE="x-large",i))(Qt||{});const hm=(i,t)=>{switch(t){case Qt.SMALL:return Math.ceil(-27.78*i+85);case Qt.MIDLLE:return Math.ceil(-38.9*i+130);case Qt.LARGE:return Math.ceil(-44.44*i+140);case Qt.EXTRA_LARGE:return Math.ceil(-92.59*i+300)}},fm=i=>`translate(${i[0]}px, ${i[1]}px)`;function jr(i){return i.map(t=>F({observerIndex:void 0,visible:!1,isFold:!1},t))}function mm(i){ce(i,"svelte-gk8s47",".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}")}function Vr(i,t,e){const n=i.slice();return n[30]=t[e],n}function Qr(i){let t,e;return t=new um({props:{itemLabel:i[30],hooks:i[0],anchorEnabled:i[2],onIconClick:i[6]}}),{c(){ee(t.$$.fragment)},m(n,o){K(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||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Or(i,t){let e,n,o,s=t[30].visible&&Qr(t);return{key:i,first:null,c(){e=pe(),s&&s.c(),n=pe(),this.first=e},m(r,a){z(r,e,a),s&&s.m(r,a),z(r,n,a),o=!0},p(r,a){t=r,t[30].visible?s?(s.p(t,a),a[0]&2&&P(s,1)):(s=Qr(t),s.c(),P(s,1),s.m(n.parentNode,n)):s&&(ae(),D(s,1,1,()=>{s=null}),le())},i(r){o||(P(s),o=!0)},o(r){D(s),o=!1},d(r){r&&M(e),s&&s.d(r),r&&M(n)}}}function pm(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=Vr(i,r,l),u=a(c);n.set(u,e[l]=Or(u,c))}return{c(){t=T("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","item-labels-container svelte-gk8s47"),ze(()=>i[12].call(t)),L(t,"opacity",i[5]?1:0)},m(l,c){z(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],ae(),e=Je(e,c,a,1,l,r,n,t,Pt,Or,null,Vr),le()),c[0]&32&&L(t,"opacity",l[5]?1:0)},i(l){if(!s){for(let c=0;c<r.length;c+=1)P(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)D(e[c]);s=!1},d(l){l&&M(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}let gm=11;function Am(i,t,e){const{Raycaster:n,Vector3:o}=I;let{five:s}=t,{modelOcclusionEnable:r}=t,{itemLabels:a}=t,{hooks:l}=t,{displayStrategyType:c}=t,{maxVisibleDistance:u}=t,h=null,d=null,f=(s==null?void 0:s.currentMode)===me.Five.Mode.Panorama,p,v,g=[],A=!0;const y=(R,W)=>{const H=R.camera.position.clone(),te=new o(W.modelPosition[0],W.modelPosition[1],W.modelPosition[2]),X=te.distanceTo(H);return u!==void 0&&R.state.mode===me.Five.Mode.Panorama&&X>u?!1:Br(R,te.clone().sub(H).normalize(),H,X)},w=R=>{const{camera:W,model:H}=s,{x:te,y:X,z:J}=R.clone().project(W),he=(te+1)/2,fe=(2-(X+1))/2,Te=Math.abs(J)<1&&[he,fe].every(Fe=>Fe<1&&Fe>=0);return Boolean(Te)},C=(R,W)=>{const H=new o(W.modelPosition[0],W.modelPosition[1],W.modelPosition[2]),te=R.project2d(H),X=te==null?void 0:te.x,J=te==null?void 0:te.y;return[X,J]},x=(R,W)=>{const H=W.map(X=>{if(R.state.panoIndex!==X.panoIndex)return ge(F({},X),{visible:!1});const J=C(R,X);X.name.length*gm;const he=hm(X.modelPosition[1],c),fe=R.currentMode===me.Five.Mode.Panorama?w(new o(X.position[0],X.position[1],X.position[2])):!0,Ae=r?y(R,X):!1,xe=fe&&!Ae;if(!xe)return ge(F({},X),{visible:xe});g.push(J);const Te=fm(J);return ge(F({},X),{visible:xe,transform:Te,strokeLength:he})}),te=H.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,J)=>X.distance-J.distance);return H.map(X=>{const J=te.findIndex(he=>he.itemLabelItem.id===X.id);return J!==void 0?ge(F({},X),{zIndex:J*10}):X})},E=()=>{g=[],e(1,d=x(s,d))},S=()=>{e(5,A=!1),k()},k=Lr(()=>{e(5,A=!0),E()},300),j=()=>{s.once("renderFrame",E)},_=()=>{window.addEventListener("resize",j,!1)},G=()=>{h!==a&&(e(1,d=jr(a)),h=a,E())},Z=(R,W)=>{let H=[];for(let X=0;X<W.length;X++){const{position:J,panoIndex:he}=W[X],fe=R.distanceTo(J);(u===void 0||fe<=u||s.state.mode!==me.Five.Mode.Panorama)&&H.push({panoIndex:he,obVector:J,distance:fe})}H=H.sort((X,J)=>X.distance-J.distance);let te;for(let X=0;X<H.length;X++){const{obVector:J,distance:he,panoIndex:fe}=H[X];if(!Br(s,R,J,he)){te=fe;break}}return typeof te=="number"?W[te]:void 0},Q=R=>{if(s.state.mode===me.Five.Mode.Panorama)return;const W=s.work.observers,H=new o().fromArray(R.position),te=Z(H,W);if(te&&(R.observerIndex=te.panoIndex),typeof R.observerIndex=="number"){const X=W[R.observerIndex],J=H.clone().sub(X.position).normalize(),he={longitude:Math.PI+Math.atan2(J.x,J.z),latitude:Math.acos(J.y/J.length())-Math.PI/2};s.setState(ge(F({},he),{mode:me.Five.Mode.Panorama,panoIndex:R.observerIndex})),s.once("initAnimationEnded",()=>{e(1,d=d.map(fe=>ge(F({},fe),{isFold:fe.id!==R.id}))),s.once("cameraUpdate",()=>{e(1,d=d.map(fe=>ge(F({},fe),{isFold:!1})))})})}};Ko(()=>{G()}),Ue(()=>{e(1,d=jr(a)),h=a,E(),_(),s.on("cameraUpdate",S)}),wt(()=>{s.off("cameraUpdate",S),window.removeEventListener("resize",j,!1)});function B(){p=this.clientWidth,v=this.clientHeight,e(3,p),e(4,v)}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,f,p,v,A,Q,s,r,a,c,u,B]}class vm extends re{constructor(t){super(),se(this,t,Am,pm,oe,{five:7,modelOcclusionEnable:8,itemLabels:9,hooks:0,displayStrategyType:10,maxVisibleDistance:11},mm,[-1,-1])}}function bm(i){return i.item_labels.map(t=>ge(F({},t),{modelPosition:[t.position[0],t.position[1],t.position[2]],observerIndex:void 0}))}const ym=void 0,wm=(i,t)=>{var d,f,p,v;const e={container:document.createElement("div"),data:null,enabled:!0,fiveModeEnabled:!0,itemLabels:[],wrapper:null,app:void 0,hooks:new me.Subscribe,modelOcclusionEnable:(d=t==null?void 0:t.modelOcclusionEnable)!=null?d:!0,onlyVisibleInPanorama:(f=t==null?void 0:t.onlyVisibleInPanorama)!=null?f:!0,displayStrategyType:(p=t==null?void 0:t.displayStrategyType)!=null?p:Qt.SMALL,maxVisibleDistance:(v=t==null?void 0:t.maxVisibleDistance)!=null?v:ym};e.container.setAttribute("class","item-label-plugin-container"),e.container.style.cssText=`
|
|
524
524
|
position: absolute;
|
|
525
525
|
left: 0;
|
|
526
526
|
top: 0;
|
|
@@ -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&&L(t,"width",Ye(i[3])),a&16&&L(t,"height",Ye(i[4])),a&8192&&L(t,"z-index",i[13])},i(r){s||(r&&ze(()=>{o&&o.end(1),n=zt(t,Tt,{duration:i[0]}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=qt(t,Tt,{duration:i[1]})),s=!1},d(r){r&&M(t),r&&o&&o.end()}}}function tp(i){let t,e=i[2]&&qr(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&P(e,1)):(e=qr(n),e.c(),P(e,1),e.m(t.parentNode,t)):e&&(ae(),D(e,1,1,()=>{e=null}),le())},i(n){P(e)},o(n){D(e)},d(n){e&&e.d(n),n&&M(t)}}}function Ye(i){return typeof i=="number"?i/16+"rem":i}function np(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:h=!1}=t,{verticalCenter:d=!1}=t,{blurRadius:f}=t,{spreadRadius:p}=t,{opacity:v=.15}=t,{zIndex:g=-1}=t;return i.$$set=A=>{"inDelay"in A&&e(0,n=A.inDelay),"outDelay"in A&&e(1,o=A.outDelay),"visible"in A&&e(2,s=A.visible),"width"in A&&e(3,r=A.width),"height"in A&&e(4,a=A.height),"left"in A&&e(5,l=A.left),"bottom"in A&&e(6,c=A.bottom),"center"in A&&e(7,u=A.center),"horizontalCenter"in A&&e(8,h=A.horizontalCenter),"verticalCenter"in A&&e(9,d=A.verticalCenter),"blurRadius"in A&&e(10,f=A.blurRadius),"spreadRadius"in A&&e(11,p=A.spreadRadius),"opacity"in A&&e(12,v=A.opacity),"zIndex"in A&&e(13,g=A.zIndex)},[n,o,s,r,a,l,c,u,h,d,f,p,v,g]}class nt extends re{constructor(t){super(),se(this,t,np,tp,oe,{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},ep)}}function ip(i,t){t.forEach(e=>{const n=new I.SphereGeometry(.02,16,16),o=[],s=[new I.MeshBasicMaterial({color:16776960}),new I.MeshBasicMaterial({color:16711935}),new I.MeshBasicMaterial({color:16711680}),new I.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new I.Mesh(n,l);c.position.copy(lt(r)),o.push(c)});else{const r=s[0],a=new I.Mesh(n,r);a.position.copy(lt(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const Re=i=>i;function ao(i){if(i.length<3)return;const t=i.map(pn),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}var Kr=(i=>(i.Audio="Audio",i.Text="Text",i.ImageText="ImageText",i.Image="Image",i.Video="Video",i.Link="Link",i.VRLink="VRLink",i.PanoLink="PanoLink",i.Marketing="Marketing",i.MediaPlane="MediaPlane",i.MediaModel="MediaModel",i.Custom="Custom",i.Unknown="Unknown",i))(Kr||{}),$r=(i=>(i.Two="2D",i.Three="3D",i))($r||{}),ea=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(ea||{});function op(i){return i.stickType==="2DPoint"||i.stickType==="3DPoint"}function sp(i){return i.stickType==="3DPoint"||i.stickType==="Plane"}function Fe(i){return i.stickType==="Model"&&i.contentType==="MediaModel"}function lo(i){if(Array.isArray(i)&&i.length===4){const e=i.map(pn);return Ei(e[0],e[2])}else return pn(i)}function ta(i){if(op(i))return lt(i==null?void 0:i.position);if(Fe(i)&&i.matrix){const t=new O.Matrix4().fromArray(i.matrix),e=i.data.mediaPosition.map(n=>new O.Vector3().fromArray(n).applyMatrix4(t));return Ei(e[0],e[2])}else return lo(i.position)}function In(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 rp(i){return new Promise(t=>{i.model.loaded?t():i.once("modelLoaded",()=>t())})}function ap(i,t,e){const o=new I.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new I.Vector3(0,1,0)).setLength(.01),r=new I.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 I.Vector3))}const na=(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 lp(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function cp(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 ia(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)}}}function up(){return Math.random().toString(36).slice(-6)}const co=up();function dp(i){ce(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function oa(i,t,e){const n=i.slice();return n[18]=t[e].id,n[0]=t[e].content,n[19]=t,n[20]=e,n}function hp(i){let t,e=i[0]+"",n,o=i[20];const s=()=>i[9](t,o),r=()=>i[9](null,o);return{c(){t=T("span"),n=De(e),b(t,"class","text-char svelte-1b2n9wi")},m(a,l){z(a,t,l),V(t,n),s()},p(a,l){i=a,l&4&&e!==(e=i[0]+"")&&Me(n,e),o!==i[20]&&(r(),o=i[20],s())},d(a){a&&M(t),r()}}}function fp(i){let t,e=i[20];const n=()=>i[8](t,e),o=()=>i[8](null,e);return{c(){t=T("span"),t.textContent="\xA0",b(t,"class","text-char svelte-1b2n9wi")},m(s,r){z(s,t,r),n()},p(s,r){i=s,e!==i[20]&&(o(),e=i[20],n())},d(s){s&&M(t),o()}}}function sa(i,t){let e,n;function o(a,l){return a[0]===a[3]?fp:hp}let s=o(t),r=s(t);return{key:i,first:null,c(){e=pe(),r.c(),n=pe(),this.first=e},m(a,l){z(a,e,l),r.m(a,l),z(a,n,l)},p(a,l){t=a,s===(s=o(t))&&r?r.p(t,l):(r.d(1),r=s(t),r&&(r.c(),r.m(n.parentNode,n)))},d(a){a&&M(e),r.d(a),a&&M(n)}}}function mp(i){let t=[],e=new Map,n,o=i[2];const s=r=>r[18];for(let r=0;r<o.length;r+=1){let a=oa(i,o,r),l=s(a);e.set(l,t[r]=sa(l,a))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();n=pe()},m(r,a){for(let l=0;l<t.length;l+=1)t[l].m(r,a);z(r,n,a)},p(r,[a]){a&14&&(o=r[2],t=Je(t,a,s,1,r,o,e,n.parentNode,Ri,sa,n,oa))},i:U,o:U,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&M(n)}}}function pp(i,t,e){let n,{inDelay:o=0}=t,{outDelay:s=0}=t,{content:r}=t,{unfolded:a}=t,{isFistUnfoldedUpdate:l=!0}=t;const c=`__EMOJI_SPLIT_${co}__`,u=`__EMOJI_${co}__`,h=`__SPACE_${co}__`;let d,f,p=[];function v(x){const E=[],S=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"));return x.slice().replace(S,k=>`${c}${u}${k}${c}`).split(c).forEach(k=>k.startsWith(u)?E.push({id:Ne(),content:k.slice(u.length)}):E.push(...k.split("").map(j=>j===" "?h:j).map(j=>({id:Ne(),content:j})))),E}function g(){if(!f)return;const x=!a;f.reversed!==x&&f.reverse(),f.play()}function A(x){if(l){e(4,l=!1);return}clearTimeout(d),d=setTimeout(g,x?o:s)}function y(x){const E=function(){const S=cp(k=>x[k].getBoundingClientRect().x,[Math.min(x.length-1,10),Math.min(x.length-1,30)]);if(S>0)return S}();f=So.default({targets:x.slice(0,E).filter(qe),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:So.default.stagger(50),easing:"easeInOutCubic"}),a&&f.seek(f.duration)}function w(x,E){je[x?"unshift":"push"](()=>{p[E]=x,e(1,p)})}function C(x,E){je[x?"unshift":"push"](()=>{p[E]=x,e(1,p)})}return i.$$set=x=>{"inDelay"in x&&e(5,o=x.inDelay),"outDelay"in x&&e(6,s=x.outDelay),"content"in x&&e(0,r=x.content),"unfolded"in x&&e(7,a=x.unfolded),"isFistUnfoldedUpdate"in x&&e(4,l=x.isFistUnfoldedUpdate)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=v(r)),i.$$.dirty&128&&A(a),i.$$.dirty&2&&y(p.filter(x=>!!x))},[r,p,n,h,l,o,s,a,w,C]}class ra extends re{constructor(t){super(),se(this,t,pp,mp,oe,{inDelay:5,outDelay:6,content:0,unfolded:7,isFistUnfoldedUpdate:4},dp)}}const gp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcUNSe2/Z9yISiSGxRkUAy4BGZSVX168gistraYsQKxArECsQKxApYqkDyU5lmsznMM+ZgAGpQhaUkSRbINgLJCXiCBtSgAkVYtGGIBTKj8AgKSVahDNvQa0IUkUG4Bx91BpLdBTOS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MnJ+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=",bp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAABcVBMVEUAAAAAAAD////////+/v45OTn////////39/fp6enPz8/7+/vw8PD+/v7x8fHc3NzHx8f////////+/v77+/vr6+v////7+/v5+fn////z8/P////////q6uqgoKD+/v79/f3m5ub+/v7////////////////39/f39/f////z8/P////t7e3s7Oz29vb////5+fn////h4eH////g4ODV1dX////////BwcH///////////+Ojo5zc3MlJSX////////////////////////7+/v////////////v7+/u7u7n5+f////39/f////09PT6+vr09PT+/v76+vr////5+fnv7+/09PTk5OT////////////////Jycn///++vr7///////+0tLT///9TU1P///8SEhL////////+/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MPz0MFnhKdCSWpc8RBnPAZB3RUvLt7i3oob7f5juDzuikY81tjcHlcHg9xabdyUWDvF2ay3slecr1ptimNx9lhhs1bzXQxy5NZa6VMx9pS2Wt1H77cVjFartYvBdlDICDc0cbVa3Twd2NcOyuLwVqo+K1ebjgdcr0k+O1uXwThfl8vlhqm+99kASup5GINsYhhmG8d7UXzcBgo2e21cd9WlUll5/7G958ql8uxu7y0zS5SGSkOGBA51TRiGQAi232Y9v4kVQZGavpt6c6l3tLpNsc38gGOC01IeLg4Xi8NaLz1KkqO0VzvcTrFscYo4oLjiRAsKEXeJPRqxW0bsFWLGLVbiocyZSm5vbW0nU9BsIfyp/AGqAvfOkBaFawAAAABJRU5ErkJggg==";function yp(i){ce(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 aa(i){let t,e,n,o,s,r,a,l,c,u;return e=new nt({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),b(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),L(o,"background-image","url("+gp+")"),b(t,"class","arrow-wrapper svelte-1ogmlqq")},m(h,d){z(h,t,d),K(e,t,null),V(t,n),V(t,o),l=!0,c||(u=Pe(o,"click",i[5]),c=!0)},p(h,d){i=h,(!l||d&1&&s!==(s="arrow "+i[0]+" svelte-1ogmlqq"))&&b(o,"class",s)},i(h){l||(P(e.$$.fragment,h),h&&ze(()=>{a&&a.end(1),r=zt(o,Tt,{duration:i[2],delay:i[3],easing:Kt}),r.start()}),l=!0)},o(h){D(e.$$.fragment,h),r&&r.invalidate(),h&&(a=qt(o,Tt,{duration:i[2],delay:i[4],easing:Kt})),l=!1},d(h){h&&M(t),$(e),h&&a&&a.end(),c=!1,u()}}}function wp(i){let t,e,n=i[1]&&aa(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&P(n,1)):(n=aa(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Cp(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){bn.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 Pp extends re{constructor(t){super(),se(this,t,Cp,wp,oe,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},yp)}}function Ip(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 Ep(i){ce(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 la(i){let t,e,n;return e=new ra({props:{unfolded:i[0],content:i[1],inDelay:500,outDelay:i[5]}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","text svelte-1fuzm7v"),L(t,"transform",i[7])},m(o,s){z(o,t,s),K(e,t,null),i[10](t),n=!0},p(o,s){const r={};s&1&&(r.unfolded=o[0]),s&2&&(r.content=o[1]),s&32&&(r.outDelay=o[5]),e.$set(r),s&128&&L(t,"transform",o[7])},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e),i[10](null)}}}function ca(i){let t,e,n;return e=new Pp({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","arrow svelte-1fuzm7v")},m(o,s){z(o,t,s),K(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||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function kp(i){let t,e,n,o=i[1]&&la(i),s=i[3]<i[4]&&ca(i);return{c(){o&&o.c(),t=ne(),s&&s.c(),e=pe()},m(r,a){o&&o.m(r,a),z(r,t,a),s&&s.m(r,a),z(r,e,a),n=!0},p(r,[a]){r[1]?o?(o.p(r,a),a&2&&P(o,1)):(o=la(r),o.c(),P(o,1),o.m(t.parentNode,t)):o&&(ae(),D(o,1,1,()=>{o=null}),le()),r[3]<r[4]?s?(s.p(r,a),a&24&&P(s,1)):(s=ca(r),s.c(),P(s,1),s.m(e.parentNode,e)):s&&(ae(),D(s,1,1,()=>{s=null}),le())},i(r){n||(P(o),P(s),n=!0)},o(r){D(o),D(s),n=!1},d(r){o&&o.d(r),r&&M(t),s&&s.d(r),r&&M(e)}}}function xp(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,u=0,h=0,d=0;function f(p){je[p?"unshift":"push"](()=>{c=p,e(2,c)})}return i.$$set=p=>{"visible"in p&&e(0,r=p.visible),"textUnfolded"in p&&e(8,a=p.textUnfolded),"content"in p&&e(1,l=p.content)},i.$$.update=()=>{if(i.$$.dirty&7&&c&&r&&l){const{lineHeight:p}=getComputedStyle(c);e(4,d=c.offsetHeight),Ip(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,d=c.offsetHeight)}),e(3,h=Number(p.replace("px","")))}i.$$.dirty&280&&e(9,u=a?h-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,h,d,s,o,n,a,u,f]}class ua extends re{constructor(t){super(),se(this,t,xp,kp,oe,{visible:0,textUnfolded:8,content:1},Ep)}}function Dp(i){ce(i,"svelte-nlvd3x",".content.svelte-nlvd3x{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 da(i){var h,d;let t,e,n,o,s,r,a,l,c,u;return t=new nt({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),n=new ro({props:{unfolded:i[2],length:i[3],outDelay:i[4]+40*Math.min((d=(h=i[6][0])==null?void 0:h.content.length)!=null?d:10,15),useLinearColor:!0}}),r=new ua({props:{visible:i[2],textUnfolded:i[1],content:i[5]}}),{c(){ee(t.$$.fragment),e=ne(),ee(n.$$.fragment),o=ne(),s=T("div"),ee(r.$$.fragment),b(s,"class","content svelte-nlvd3x"),ze(()=>i[8].call(s))},m(f,p){K(t,f,p),z(f,e,p),K(n,f,p),z(f,o,p),z(f,s,p),K(r,s,null),a=bt(s,i[8].bind(s)),l=!0,c||(u=Pe(s,"click",i[7]),c=!0)},p(f,p){var y,w;const v={};p&4&&(v.visible=f[2]),p&8&&(v.left=f[3]/2+"px"),t.$set(v);const g={};p&4&&(g.unfolded=f[2]),p&8&&(g.length=f[3]),p&16&&(g.outDelay=f[4]+40*Math.min((w=(y=f[6][0])==null?void 0:y.content.length)!=null?w:10,15)),n.$set(g);const A={};p&4&&(A.visible=f[2]),p&2&&(A.textUnfolded=f[1]),p&32&&(A.content=f[5]),r.$set(A)},i(f){l||(P(t.$$.fragment,f),P(n.$$.fragment,f),P(r.$$.fragment,f),l=!0)},o(f){D(t.$$.fragment,f),D(n.$$.fragment,f),D(r.$$.fragment,f),l=!1},d(f){$(t,f),f&&M(e),$(n,f),f&&M(o),f&&M(s),$(r),a(),c=!1,u()}}}function Lp(i){let t,e,n=i[0].state&&da(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&P(n,1)):(n=da(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Sp(i,t,e){let n,o,s,{tag:r}=t,a,l=!1,c=[];function u(){e(1,l=!l)}function h(){a=this.clientWidth,e(3,a)}return i.$$set=d=>{"tag"in d&&e(0,r=d.tag)},i.$$.update=()=>{var d,f,p;i.$$.dirty&1&&e(2,n=!!((d=r.state)!=null&&d.unfolded)),i.$$.dirty&1&&e(5,o=(p=(f=r.data.title)!=null?f:r.data.text)!=null?p:""),i.$$.dirty&4&&(n||setTimeout(()=>{e(1,l=!1)},20)),i.$$.dirty&2&&e(4,s=l?450:0)},[r,l,n,a,s,o,c,u,h]}class Mp extends re{constructor(t){super(),se(this,t,Sp,Lp,oe,{tag:0},Dp)}}function ke(i){return i/16+"rem"}function zp(i){ce(i,"svelte-i9wdo4",".text.svelte-i9wdo4{display:-webkit-box;display:-ms-box;display:-moz-box;position:relative;width:-moz-max-content;width:max-content;max-width:100%;-webkit-box-orient:vertical;-ms-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@keyframes svelte-i9wdo4-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.caret.svelte-i9wdo4{position:absolute;width:0.0625rem;height:100%;background-color:#fff;animation:svelte-i9wdo4-blink 1.2s infinite}.placeholder.svelte-i9wdo4{opacity:0.5}")}function Tp(i){let t;const e=i[6].default,n=Xt(e,i,i[5],null);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&32)&&Ut(n,e,o,o[5],t?Yt(e,o[5],s,null):Jt(o[5]),null)},i(o){t||(P(n,o),t=!0)},o(o){D(n,o),t=!1},d(o){n&&n.d(o)}}}function Bp(i){var s,r;let t,e,n=((s=i[3])==null?void 0:s.inputting)&&ha(),o=((r=i[3])==null?void 0:r.placeholder)&&fa(i);return{c(){n&&n.c(),t=ne(),o&&o.c(),e=pe()},m(a,l){n&&n.m(a,l),z(a,t,l),o&&o.m(a,l),z(a,e,l)},p(a,l){var c,u;(c=a[3])!=null&&c.inputting?n||(n=ha(),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),(u=a[3])!=null&&u.placeholder?o?o.p(a,l):(o=fa(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:U,o:U,d(a){n&&n.d(a),a&&M(t),o&&o.d(a),a&&M(e)}}}function jp(i){let t;return{c(){t=De(i[2])},m(e,n){z(e,t,n)},p(e,n){n&4&&Me(t,e[2])},i:U,o:U,d(e){e&&M(t)}}}function ha(i){let t;return{c(){t=T("div"),b(t,"class","caret svelte-i9wdo4")},m(e,n){z(e,t,n)},d(e){e&&M(t)}}}function fa(i){let t,e=i[3].placeholder+"",n;return{c(){t=T("span"),n=De(e),b(t,"class","placeholder svelte-i9wdo4")},m(o,s){z(o,t,s),V(t,n)},p(o,s){s&8&&e!==(e=o[3].placeholder+"")&&Me(n,e)},d(o){o&&M(t)}}}function Vp(i){let t,e,n,o;const s=[jp,Bp,Tp],r=[];function a(l,c){return l[2]?0:l[4]?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=T("div"),n.c(),b(t,"class","text svelte-i9wdo4"),L(t,"max-width",typeof i[1]=="number"?ke(i[1]):i[1]),L(t,"-webkit-line-clamp",i[0])},m(l,c){z(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):(ae(),D(r[u],1,1,()=>{r[u]=null}),le(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),P(n,1),n.m(t,null)),c&2&&L(t,"max-width",typeof l[1]=="number"?ke(l[1]):l[1]),c&1&&L(t,"-webkit-line-clamp",l[0])},i(l){o||(P(n),o=!0)},o(l){D(n),o=!1},d(l){l&&M(t),r[e].d()}}}function Qp(i,t,e){let n,{$$slots:o={},$$scope:s}=t,{maxLine:r=1}=t,{maxWidth:a=null}=t,{text:l=null}=t,{edit:c=null}=t;return i.$$set=u=>{"maxLine"in u&&e(0,r=u.maxLine),"maxWidth"in u&&e(1,a=u.maxWidth),"text"in u&&e(2,l=u.text),"edit"in u&&e(3,c=u.edit),"$$scope"in u&&e(5,s=u.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(4,n=(c==null?void 0:c.placeholder)||(c==null?void 0:c.inputting))},[r,a,l,c,n,s,o]}class uo extends re{constructor(t){super(),se(this,t,Qp,Vp,oe,{maxLine:0,maxWidth:1,text:2,edit:3},zp)}}function Op(i){ce(i,"svelte-1oxrkr1",".plane__container.svelte-1oxrkr1.svelte-1oxrkr1{position:absolute;left:50%;transform:translate(-50%, -100%);width:-moz-max-content;width:max-content}.plane__wrapper.svelte-1oxrkr1.svelte-1oxrkr1{transition:transform 500ms linear, opacity 200ms linear;padding:0.625rem;background-color:rgba(0, 0, 0, 0.5);border:0.03125rem solid rgba(255, 255, 255, 0.3);border-radius:0.25rem}.unfolded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{transition-delay:200ms, 500ms;opacity:1}.folded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{opacity:0}.plane.svelte-1oxrkr1.svelte-1oxrkr1{max-width:11.75rem}.title.svelte-1oxrkr1.svelte-1oxrkr1{white-space:pre-wrap;font-weight:bold;font-size:0.75rem;line-height:1.125rem}.description.svelte-1oxrkr1.svelte-1oxrkr1{margin-top:0.25rem;white-space:pre-wrap;font-size:0.6875rem;line-height:1rem}")}function ma(i){var h,d;let t,e,n,o,s,r,a,l,c;t=new ro({props:{unfolded:i[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new uo({props:{text:i[2],edit:(h=i[0].data.edit)==null?void 0:h.title}});let u=(i[0].data.description||((d=i[0].data.edit)==null?void 0:d.description))&&pa(i);return{c(){ee(t.$$.fragment),e=ne(),n=T("div"),o=T("div"),s=T("div"),r=T("div"),ee(a.$$.fragment),l=ne(),u&&u.c(),b(r,"class","title svelte-1oxrkr1"),b(s,"class","plane svelte-1oxrkr1"),b(o,"class","plane__wrapper svelte-1oxrkr1"),L(o,"transform",i[1]?"translateY(-15px)":"translateY(0)"),b(n,"class","plane__container svelte-1oxrkr1"),q(n,"unfolded",i[1]),q(n,"folded",i[3])},m(f,p){K(t,f,p),z(f,e,p),z(f,n,p),V(n,o),V(o,s),V(s,r),K(a,r,null),V(s,l),u&&u.m(s,null),c=!0},p(f,p){var A,y;const v={};p&2&&(v.unfolded=f[1]),t.$set(v);const g={};p&4&&(g.text=f[2]),p&1&&(g.edit=(A=f[0].data.edit)==null?void 0:A.title),a.$set(g),f[0].data.description||((y=f[0].data.edit)==null?void 0:y.description)?u?(u.p(f,p),p&1&&P(u,1)):(u=pa(f),u.c(),P(u,1),u.m(s,null)):u&&(ae(),D(u,1,1,()=>{u=null}),le()),p&2&&L(o,"transform",f[1]?"translateY(-15px)":"translateY(0)"),(!c||p&2)&&q(n,"unfolded",f[1]),(!c||p&8)&&q(n,"folded",f[3])},i(f){c||(P(t.$$.fragment,f),P(a.$$.fragment,f),P(u),c=!0)},o(f){D(t.$$.fragment,f),D(a.$$.fragment,f),D(u),c=!1},d(f){$(t,f),f&&M(e),f&&M(n),$(a),u&&u.d()}}}function pa(i){var o;let t,e,n;return e=new uo({props:{text:i[0].data.description,edit:(o=i[0].data.edit)==null?void 0:o.description,maxLine:3}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","description svelte-1oxrkr1")},m(s,r){z(s,t,r),K(e,t,null),n=!0},p(s,r){var l;const a={};r&1&&(a.text=s[0].data.description),r&1&&(a.edit=(l=s[0].data.edit)==null?void 0:l.description),e.$set(a)},i(s){n||(P(e.$$.fragment,s),n=!0)},o(s){D(e.$$.fragment,s),n=!1},d(s){s&&M(t),$(e)}}}function Rp(i){let t,e,n=i[0].state&&ma(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&P(n,1)):(n=ma(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Fp(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,c;i.$$.dirty&1&&e(1,n=!!((a=r.state)!=null&&a.unfolded)),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=(c=(l=r.data.title)!=null?l:r.data.text)!=null?c:"")},[r,n,s,o]}class Gp extends re{constructor(t){super(),se(this,t,Fp,Rp,oe,{tag:0},Op)}}function Hp(i){let t,e;return t=new Gp({props:{tag:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Wp(i){let t,e;return t=new Mp({props:{tag:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Np(i){let t,e,n,o;const s=[Wp,Hp],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=pe()},m(l,c){~t&&r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?~t&&r[t].p(l,c):(e&&(ae(),D(r[u],1,1,()=>{r[u]=null}),le()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),P(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(P(e),o=!0)},o(l){D(e),o=!1},d(l){~t&&r[t].d(l),l&&M(n)}}}function _p(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(0,o=s.tag)},i.$$.update=()=>{var s;i.$$.dirty&1&&e(1,n=(s=o.data.appearance)!=null?s:"line")},[o,n]}class Xp extends re{constructor(t){super(),se(this,t,_p,Np,oe,{tag:0})}}function Yp(i){ce(i,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function ga(i){let t,e,n,o;return{c(){t=Ce("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){z(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&ze(()=>{n&&n.end(1),e=zt(t,Kn,{duration:i[1],delay:i[0],easing:ls}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=qt(t,Kn,{duration:i[1],delay:i[2],easing:Kt})),o=!1},d(s){s&&M(t),s&&n&&n.end()}}}function Up(i){let t,e,n,o,s,r=i[3]&&ga(i);return{c(){t=Ce("svg"),e=Ce("defs"),n=Ce("linearGradient"),o=Ce("stop"),s=Ce("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-blgtit"),b(t,"viewBox","0 0 105 21")},m(a,l){z(a,t,l),V(t,e),V(e,n),V(n,o),V(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&P(r,1)):(r=ga(a),r.c(),P(r,1),r.m(t,null)):r&&(ae(),D(r,1,1,()=>{r=null}),le())},i(a){P(r)},o(a){D(r)},d(a){a&&M(t),r&&r.d()}}}function Jp(i,t,e){let{inDelay:n=0}=t,{duration:o=1e3}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=Ne();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 Zp extends re{constructor(t){super(),se(this,t,Jp,Up,oe,{inDelay:0,duration:1,outDelay:2,unfolded:3},Yp)}}function qp(i){ce(i,"svelte-1mgyhhn",`:root{--sc-dot-size:6px;--sc-active-dot-size:8px;--sc-dot-size-animation-time:250ms}.sc-carousel-dot__dot.svelte-1mgyhhn{background-color:var(--sc-color-rgb-light);border-radius:50%;display:inline-block;opacity:0.5;transition:opacity 100ms ease,\r
|
|
544
|
+
`))&&b(t,"style",e),a&8&&L(t,"width",Ye(i[3])),a&16&&L(t,"height",Ye(i[4])),a&8192&&L(t,"z-index",i[13])},i(r){s||(r&&ze(()=>{o&&o.end(1),n=zt(t,Tt,{duration:i[0]}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=qt(t,Tt,{duration:i[1]})),s=!1},d(r){r&&M(t),r&&o&&o.end()}}}function tp(i){let t,e=i[2]&&qr(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&P(e,1)):(e=qr(n),e.c(),P(e,1),e.m(t.parentNode,t)):e&&(ae(),D(e,1,1,()=>{e=null}),le())},i(n){P(e)},o(n){D(e)},d(n){e&&e.d(n),n&&M(t)}}}function Ye(i){return typeof i=="number"?i/16+"rem":i}function np(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:h=!1}=t,{verticalCenter:d=!1}=t,{blurRadius:f}=t,{spreadRadius:p}=t,{opacity:v=.15}=t,{zIndex:g=-1}=t;return i.$$set=A=>{"inDelay"in A&&e(0,n=A.inDelay),"outDelay"in A&&e(1,o=A.outDelay),"visible"in A&&e(2,s=A.visible),"width"in A&&e(3,r=A.width),"height"in A&&e(4,a=A.height),"left"in A&&e(5,l=A.left),"bottom"in A&&e(6,c=A.bottom),"center"in A&&e(7,u=A.center),"horizontalCenter"in A&&e(8,h=A.horizontalCenter),"verticalCenter"in A&&e(9,d=A.verticalCenter),"blurRadius"in A&&e(10,f=A.blurRadius),"spreadRadius"in A&&e(11,p=A.spreadRadius),"opacity"in A&&e(12,v=A.opacity),"zIndex"in A&&e(13,g=A.zIndex)},[n,o,s,r,a,l,c,u,h,d,f,p,v,g]}class nt extends re{constructor(t){super(),se(this,t,np,tp,oe,{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},ep)}}function ip(i,t){t.forEach(e=>{const n=new I.SphereGeometry(.02,16,16),o=[],s=[new I.MeshBasicMaterial({color:16776960}),new I.MeshBasicMaterial({color:16711935}),new I.MeshBasicMaterial({color:16711680}),new I.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new I.Mesh(n,l);c.position.copy(lt(r)),o.push(c)});else{const r=s[0],a=new I.Mesh(n,r);a.position.copy(lt(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const Re=i=>i;function ao(i){if(i.length<3)return;const t=i.map(pn),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}var Kr=(i=>(i.Audio="Audio",i.Text="Text",i.ImageText="ImageText",i.Image="Image",i.Video="Video",i.Link="Link",i.VRLink="VRLink",i.PanoLink="PanoLink",i.Marketing="Marketing",i.MediaPlane="MediaPlane",i.MediaModel="MediaModel",i.Custom="Custom",i.Unknown="Unknown",i))(Kr||{}),$r=(i=>(i.Two="2D",i.Three="3D",i))($r||{}),ea=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(ea||{});function op(i){return i.stickType==="2DPoint"||i.stickType==="3DPoint"}function sp(i){return i.stickType==="3DPoint"||i.stickType==="Plane"}function We(i){return i.stickType==="Model"&&i.contentType==="MediaModel"}function lo(i){if(Array.isArray(i)&&i.length===4){const e=i.map(pn);return Ei(e[0],e[2])}else return pn(i)}function ta(i){if(op(i))return lt(i==null?void 0:i.position);if(We(i)&&i.matrix){const t=new O.Matrix4().fromArray(i.matrix),e=i.data.mediaPosition.map(n=>new O.Vector3().fromArray(n).applyMatrix4(t));return Ei(e[0],e[2])}else return lo(i.position)}function In(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 rp(i){return new Promise(t=>{i.model.loaded?t():i.once("modelLoaded",()=>t())})}function ap(i,t,e){const o=new I.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new I.Vector3(0,1,0)).setLength(.01),r=new I.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 I.Vector3))}const na=(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 lp(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function cp(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 ia(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)}}}function up(){return Math.random().toString(36).slice(-6)}const co=up();function dp(i){ce(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function oa(i,t,e){const n=i.slice();return n[18]=t[e].id,n[0]=t[e].content,n[19]=t,n[20]=e,n}function hp(i){let t,e=i[0]+"",n,o=i[20];const s=()=>i[9](t,o),r=()=>i[9](null,o);return{c(){t=T("span"),n=De(e),b(t,"class","text-char svelte-1b2n9wi")},m(a,l){z(a,t,l),V(t,n),s()},p(a,l){i=a,l&4&&e!==(e=i[0]+"")&&Me(n,e),o!==i[20]&&(r(),o=i[20],s())},d(a){a&&M(t),r()}}}function fp(i){let t,e=i[20];const n=()=>i[8](t,e),o=()=>i[8](null,e);return{c(){t=T("span"),t.textContent="\xA0",b(t,"class","text-char svelte-1b2n9wi")},m(s,r){z(s,t,r),n()},p(s,r){i=s,e!==i[20]&&(o(),e=i[20],n())},d(s){s&&M(t),o()}}}function sa(i,t){let e,n;function o(a,l){return a[0]===a[3]?fp:hp}let s=o(t),r=s(t);return{key:i,first:null,c(){e=pe(),r.c(),n=pe(),this.first=e},m(a,l){z(a,e,l),r.m(a,l),z(a,n,l)},p(a,l){t=a,s===(s=o(t))&&r?r.p(t,l):(r.d(1),r=s(t),r&&(r.c(),r.m(n.parentNode,n)))},d(a){a&&M(e),r.d(a),a&&M(n)}}}function mp(i){let t=[],e=new Map,n,o=i[2];const s=r=>r[18];for(let r=0;r<o.length;r+=1){let a=oa(i,o,r),l=s(a);e.set(l,t[r]=sa(l,a))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();n=pe()},m(r,a){for(let l=0;l<t.length;l+=1)t[l].m(r,a);z(r,n,a)},p(r,[a]){a&14&&(o=r[2],t=Je(t,a,s,1,r,o,e,n.parentNode,Ri,sa,n,oa))},i:U,o:U,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&M(n)}}}function pp(i,t,e){let n,{inDelay:o=0}=t,{outDelay:s=0}=t,{content:r}=t,{unfolded:a}=t,{isFistUnfoldedUpdate:l=!0}=t;const c=`__EMOJI_SPLIT_${co}__`,u=`__EMOJI_${co}__`,h=`__SPACE_${co}__`;let d,f,p=[];function v(x){const E=[],S=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"));return x.slice().replace(S,k=>`${c}${u}${k}${c}`).split(c).forEach(k=>k.startsWith(u)?E.push({id:Ne(),content:k.slice(u.length)}):E.push(...k.split("").map(j=>j===" "?h:j).map(j=>({id:Ne(),content:j})))),E}function g(){if(!f)return;const x=!a;f.reversed!==x&&f.reverse(),f.play()}function A(x){if(l){e(4,l=!1);return}clearTimeout(d),d=setTimeout(g,x?o:s)}function y(x){const E=function(){const S=cp(k=>x[k].getBoundingClientRect().x,[Math.min(x.length-1,10),Math.min(x.length-1,30)]);if(S>0)return S}();f=So.default({targets:x.slice(0,E).filter(qe),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:So.default.stagger(50),easing:"easeInOutCubic"}),a&&f.seek(f.duration)}function w(x,E){je[x?"unshift":"push"](()=>{p[E]=x,e(1,p)})}function C(x,E){je[x?"unshift":"push"](()=>{p[E]=x,e(1,p)})}return i.$$set=x=>{"inDelay"in x&&e(5,o=x.inDelay),"outDelay"in x&&e(6,s=x.outDelay),"content"in x&&e(0,r=x.content),"unfolded"in x&&e(7,a=x.unfolded),"isFistUnfoldedUpdate"in x&&e(4,l=x.isFistUnfoldedUpdate)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=v(r)),i.$$.dirty&128&&A(a),i.$$.dirty&2&&y(p.filter(x=>!!x))},[r,p,n,h,l,o,s,a,w,C]}class ra extends re{constructor(t){super(),se(this,t,pp,mp,oe,{inDelay:5,outDelay:6,content:0,unfolded:7,isFistUnfoldedUpdate:4},dp)}}const gp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcUNSe2/Z9yISiSGxRkUAy4BGZSVX168gistraYsQKxArECsQKxApYqkDyU5lmsznMM+ZgAGpQhaUkSRbINgLJCXiCBtSgAkVYtGGIBTKj8AgKSVahDNvQa0IUkUG4Bx91BpLdBTOS/cgUIB3a+gMwI9mFzE3a0I3z5B4r292JzGVA8tSSZILMcUDyzIykthOZvYDk+V9Ktmz4yGzhOhV4/+5YU4N/hzqo0StX3Fg5TcnNlYvgs8bPsM4hkScHoyO46haRnGEYktQVI+4ypUYKyXtxyUu27JCceAMJvjo0HoM5CEZ7cPX7i013q3IWVV5r2aw/2TK+svWbPGU68KQCa6pYeus1V0X99quSfvtVSc39lmfz2mdbz32tg1dAJ0421AVs9E7/FxBSezrMmjI/gm5/nYmMkBq+TqBs7LNgTlZH6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mYoBycaxN2SHgT8e7pWKZwCzqzZpigUr9DlRuoIxXn8pIZJgHtkwpa8togHIiw587LeNx9mc2ZwIK5DOlXJaMFqhWwoMp/Ax+1W+ToOXTHGKNrDMLLo38LmKsQKmbdSrWil+N82UJaS40YTuJv/RdtAdpzet+aJDzvMpQV71oo2gYX5RXG2HnYZXtouzNRzXE3R0KE6jWjZU2iaZ9u8pqpU3UfvwrYSgSBVDtGDurBlHn/zj0QMIh7qlDNOfmcBj9ihKo9o+l1euiWGxSE5eun3na6jxQk3joEgdQ7TR+FWutE43lhQpph3sQvISAVRa9ppRzipY4gZqdw8/WigIWDWt1gD8EIsqSLlT/KPUVlKSAujs2XTLYeRHiIlA2DVi1qkRtK8PSULaEDF+Ue7ashwkTlf8DQc/cITdx9+UAAAAASUVORK5CYII=",bp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAABcVBMVEUAAAAAAAD////////+/v45OTn////////39/fp6enPz8/7+/vw8PD+/v7x8fHc3NzHx8f////////+/v77+/vr6+v////7+/v5+fn////z8/P////////q6uqgoKD+/v79/f3m5ub+/v7////////////////39/f39/f////z8/P////t7e3s7Oz29vb////5+fn////h4eH////g4ODV1dX////////BwcH///////////+Ojo5zc3MlJSX////////////////////////7+/v////////////v7+/u7u7n5+f////39/f////09PT6+vr09PT+/v76+vr////5+fnv7+/09PTk5OT////////////////Jycn///++vr7///////+0tLT///9TU1P///8SEhL////////+/v76+vr////8/Pz39/ft7e3t7e36+vr////////X19fV1dX///+xsbF9fX1iYmL///////+K8mOEAAAAenRSTlMaAIDy8CD41cWRX9uk7Kl1VVEw6dWT/M/NvKyVkY475eWIgx0Z39rHv7axnZyZmIuKhn56emZjX1FEPTU0Kx4PCAX69fTgxcKkopWL7crJuri2sa6rnIyHhX54bVtZVU9NSUcsJSIcFROno6Hcwp+ekHVxbWhnRC8nDLc9s8oAAAOGSURBVEjHpdd3X9pAGAfwkBBDAoQmBJmWvUWWiIDIHoJb66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NaLz1KkqO0VzvcTrFscYo4oLjiRAsKEXeJPRqxW0bsFWLGLVbiocyZSm5vbW0nU9BsIfyp/AGqAvfOkBaFawAAAABJRU5ErkJggg==";function yp(i){ce(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 aa(i){let t,e,n,o,s,r,a,l,c,u;return e=new nt({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),b(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),L(o,"background-image","url("+gp+")"),b(t,"class","arrow-wrapper svelte-1ogmlqq")},m(h,d){z(h,t,d),K(e,t,null),V(t,n),V(t,o),l=!0,c||(u=Pe(o,"click",i[5]),c=!0)},p(h,d){i=h,(!l||d&1&&s!==(s="arrow "+i[0]+" svelte-1ogmlqq"))&&b(o,"class",s)},i(h){l||(P(e.$$.fragment,h),h&&ze(()=>{a&&a.end(1),r=zt(o,Tt,{duration:i[2],delay:i[3],easing:Kt}),r.start()}),l=!0)},o(h){D(e.$$.fragment,h),r&&r.invalidate(),h&&(a=qt(o,Tt,{duration:i[2],delay:i[4],easing:Kt})),l=!1},d(h){h&&M(t),$(e),h&&a&&a.end(),c=!1,u()}}}function wp(i){let t,e,n=i[1]&&aa(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&P(n,1)):(n=aa(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Cp(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){bn.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 Pp extends re{constructor(t){super(),se(this,t,Cp,wp,oe,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},yp)}}function Ip(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 Ep(i){ce(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 la(i){let t,e,n;return e=new ra({props:{unfolded:i[0],content:i[1],inDelay:500,outDelay:i[5]}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","text svelte-1fuzm7v"),L(t,"transform",i[7])},m(o,s){z(o,t,s),K(e,t,null),i[10](t),n=!0},p(o,s){const r={};s&1&&(r.unfolded=o[0]),s&2&&(r.content=o[1]),s&32&&(r.outDelay=o[5]),e.$set(r),s&128&&L(t,"transform",o[7])},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e),i[10](null)}}}function ca(i){let t,e,n;return e=new Pp({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","arrow svelte-1fuzm7v")},m(o,s){z(o,t,s),K(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||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function kp(i){let t,e,n,o=i[1]&&la(i),s=i[3]<i[4]&&ca(i);return{c(){o&&o.c(),t=ne(),s&&s.c(),e=pe()},m(r,a){o&&o.m(r,a),z(r,t,a),s&&s.m(r,a),z(r,e,a),n=!0},p(r,[a]){r[1]?o?(o.p(r,a),a&2&&P(o,1)):(o=la(r),o.c(),P(o,1),o.m(t.parentNode,t)):o&&(ae(),D(o,1,1,()=>{o=null}),le()),r[3]<r[4]?s?(s.p(r,a),a&24&&P(s,1)):(s=ca(r),s.c(),P(s,1),s.m(e.parentNode,e)):s&&(ae(),D(s,1,1,()=>{s=null}),le())},i(r){n||(P(o),P(s),n=!0)},o(r){D(o),D(s),n=!1},d(r){o&&o.d(r),r&&M(t),s&&s.d(r),r&&M(e)}}}function xp(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,u=0,h=0,d=0;function f(p){je[p?"unshift":"push"](()=>{c=p,e(2,c)})}return i.$$set=p=>{"visible"in p&&e(0,r=p.visible),"textUnfolded"in p&&e(8,a=p.textUnfolded),"content"in p&&e(1,l=p.content)},i.$$.update=()=>{if(i.$$.dirty&7&&c&&r&&l){const{lineHeight:p}=getComputedStyle(c);e(4,d=c.offsetHeight),Ip(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,d=c.offsetHeight)}),e(3,h=Number(p.replace("px","")))}i.$$.dirty&280&&e(9,u=a?h-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,h,d,s,o,n,a,u,f]}class ua extends re{constructor(t){super(),se(this,t,xp,kp,oe,{visible:0,textUnfolded:8,content:1},Ep)}}function Dp(i){ce(i,"svelte-nlvd3x",".content.svelte-nlvd3x{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 da(i){var h,d;let t,e,n,o,s,r,a,l,c,u;return t=new nt({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),n=new ro({props:{unfolded:i[2],length:i[3],outDelay:i[4]+40*Math.min((d=(h=i[6][0])==null?void 0:h.content.length)!=null?d:10,15),useLinearColor:!0}}),r=new ua({props:{visible:i[2],textUnfolded:i[1],content:i[5]}}),{c(){ee(t.$$.fragment),e=ne(),ee(n.$$.fragment),o=ne(),s=T("div"),ee(r.$$.fragment),b(s,"class","content svelte-nlvd3x"),ze(()=>i[8].call(s))},m(f,p){K(t,f,p),z(f,e,p),K(n,f,p),z(f,o,p),z(f,s,p),K(r,s,null),a=bt(s,i[8].bind(s)),l=!0,c||(u=Pe(s,"click",i[7]),c=!0)},p(f,p){var y,w;const v={};p&4&&(v.visible=f[2]),p&8&&(v.left=f[3]/2+"px"),t.$set(v);const g={};p&4&&(g.unfolded=f[2]),p&8&&(g.length=f[3]),p&16&&(g.outDelay=f[4]+40*Math.min((w=(y=f[6][0])==null?void 0:y.content.length)!=null?w:10,15)),n.$set(g);const A={};p&4&&(A.visible=f[2]),p&2&&(A.textUnfolded=f[1]),p&32&&(A.content=f[5]),r.$set(A)},i(f){l||(P(t.$$.fragment,f),P(n.$$.fragment,f),P(r.$$.fragment,f),l=!0)},o(f){D(t.$$.fragment,f),D(n.$$.fragment,f),D(r.$$.fragment,f),l=!1},d(f){$(t,f),f&&M(e),$(n,f),f&&M(o),f&&M(s),$(r),a(),c=!1,u()}}}function Lp(i){let t,e,n=i[0].state&&da(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&P(n,1)):(n=da(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Sp(i,t,e){let n,o,s,{tag:r}=t,a,l=!1,c=[];function u(){e(1,l=!l)}function h(){a=this.clientWidth,e(3,a)}return i.$$set=d=>{"tag"in d&&e(0,r=d.tag)},i.$$.update=()=>{var d,f,p;i.$$.dirty&1&&e(2,n=!!((d=r.state)!=null&&d.unfolded)),i.$$.dirty&1&&e(5,o=(p=(f=r.data.title)!=null?f:r.data.text)!=null?p:""),i.$$.dirty&4&&(n||setTimeout(()=>{e(1,l=!1)},20)),i.$$.dirty&2&&e(4,s=l?450:0)},[r,l,n,a,s,o,c,u,h]}class Mp extends re{constructor(t){super(),se(this,t,Sp,Lp,oe,{tag:0},Dp)}}function ke(i){return i/16+"rem"}function zp(i){ce(i,"svelte-i9wdo4",".text.svelte-i9wdo4{display:-webkit-box;display:-ms-box;display:-moz-box;position:relative;width:-moz-max-content;width:max-content;max-width:100%;-webkit-box-orient:vertical;-ms-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@keyframes svelte-i9wdo4-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.caret.svelte-i9wdo4{position:absolute;width:0.0625rem;height:100%;background-color:#fff;animation:svelte-i9wdo4-blink 1.2s infinite}.placeholder.svelte-i9wdo4{opacity:0.5}")}function Tp(i){let t;const e=i[6].default,n=Xt(e,i,i[5],null);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&32)&&Ut(n,e,o,o[5],t?Yt(e,o[5],s,null):Jt(o[5]),null)},i(o){t||(P(n,o),t=!0)},o(o){D(n,o),t=!1},d(o){n&&n.d(o)}}}function Bp(i){var s,r;let t,e,n=((s=i[3])==null?void 0:s.inputting)&&ha(),o=((r=i[3])==null?void 0:r.placeholder)&&fa(i);return{c(){n&&n.c(),t=ne(),o&&o.c(),e=pe()},m(a,l){n&&n.m(a,l),z(a,t,l),o&&o.m(a,l),z(a,e,l)},p(a,l){var c,u;(c=a[3])!=null&&c.inputting?n||(n=ha(),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),(u=a[3])!=null&&u.placeholder?o?o.p(a,l):(o=fa(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:U,o:U,d(a){n&&n.d(a),a&&M(t),o&&o.d(a),a&&M(e)}}}function jp(i){let t;return{c(){t=De(i[2])},m(e,n){z(e,t,n)},p(e,n){n&4&&Me(t,e[2])},i:U,o:U,d(e){e&&M(t)}}}function ha(i){let t;return{c(){t=T("div"),b(t,"class","caret svelte-i9wdo4")},m(e,n){z(e,t,n)},d(e){e&&M(t)}}}function fa(i){let t,e=i[3].placeholder+"",n;return{c(){t=T("span"),n=De(e),b(t,"class","placeholder svelte-i9wdo4")},m(o,s){z(o,t,s),V(t,n)},p(o,s){s&8&&e!==(e=o[3].placeholder+"")&&Me(n,e)},d(o){o&&M(t)}}}function Vp(i){let t,e,n,o;const s=[jp,Bp,Tp],r=[];function a(l,c){return l[2]?0:l[4]?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=T("div"),n.c(),b(t,"class","text svelte-i9wdo4"),L(t,"max-width",typeof i[1]=="number"?ke(i[1]):i[1]),L(t,"-webkit-line-clamp",i[0])},m(l,c){z(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):(ae(),D(r[u],1,1,()=>{r[u]=null}),le(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),P(n,1),n.m(t,null)),c&2&&L(t,"max-width",typeof l[1]=="number"?ke(l[1]):l[1]),c&1&&L(t,"-webkit-line-clamp",l[0])},i(l){o||(P(n),o=!0)},o(l){D(n),o=!1},d(l){l&&M(t),r[e].d()}}}function Qp(i,t,e){let n,{$$slots:o={},$$scope:s}=t,{maxLine:r=1}=t,{maxWidth:a=null}=t,{text:l=null}=t,{edit:c=null}=t;return i.$$set=u=>{"maxLine"in u&&e(0,r=u.maxLine),"maxWidth"in u&&e(1,a=u.maxWidth),"text"in u&&e(2,l=u.text),"edit"in u&&e(3,c=u.edit),"$$scope"in u&&e(5,s=u.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(4,n=(c==null?void 0:c.placeholder)||(c==null?void 0:c.inputting))},[r,a,l,c,n,s,o]}class uo extends re{constructor(t){super(),se(this,t,Qp,Vp,oe,{maxLine:0,maxWidth:1,text:2,edit:3},zp)}}function Op(i){ce(i,"svelte-1oxrkr1",".plane__container.svelte-1oxrkr1.svelte-1oxrkr1{position:absolute;left:50%;transform:translate(-50%, -100%);width:-moz-max-content;width:max-content}.plane__wrapper.svelte-1oxrkr1.svelte-1oxrkr1{transition:transform 500ms linear, opacity 200ms linear;padding:0.625rem;background-color:rgba(0, 0, 0, 0.5);border:0.03125rem solid rgba(255, 255, 255, 0.3);border-radius:0.25rem}.unfolded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{transition-delay:200ms, 500ms;opacity:1}.folded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{opacity:0}.plane.svelte-1oxrkr1.svelte-1oxrkr1{max-width:11.75rem}.title.svelte-1oxrkr1.svelte-1oxrkr1{white-space:pre-wrap;font-weight:bold;font-size:0.75rem;line-height:1.125rem}.description.svelte-1oxrkr1.svelte-1oxrkr1{margin-top:0.25rem;white-space:pre-wrap;font-size:0.6875rem;line-height:1rem}")}function ma(i){var h,d;let t,e,n,o,s,r,a,l,c;t=new ro({props:{unfolded:i[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new uo({props:{text:i[2],edit:(h=i[0].data.edit)==null?void 0:h.title}});let u=(i[0].data.description||((d=i[0].data.edit)==null?void 0:d.description))&&pa(i);return{c(){ee(t.$$.fragment),e=ne(),n=T("div"),o=T("div"),s=T("div"),r=T("div"),ee(a.$$.fragment),l=ne(),u&&u.c(),b(r,"class","title svelte-1oxrkr1"),b(s,"class","plane svelte-1oxrkr1"),b(o,"class","plane__wrapper svelte-1oxrkr1"),L(o,"transform",i[1]?"translateY(-15px)":"translateY(0)"),b(n,"class","plane__container svelte-1oxrkr1"),q(n,"unfolded",i[1]),q(n,"folded",i[3])},m(f,p){K(t,f,p),z(f,e,p),z(f,n,p),V(n,o),V(o,s),V(s,r),K(a,r,null),V(s,l),u&&u.m(s,null),c=!0},p(f,p){var A,y;const v={};p&2&&(v.unfolded=f[1]),t.$set(v);const g={};p&4&&(g.text=f[2]),p&1&&(g.edit=(A=f[0].data.edit)==null?void 0:A.title),a.$set(g),f[0].data.description||((y=f[0].data.edit)==null?void 0:y.description)?u?(u.p(f,p),p&1&&P(u,1)):(u=pa(f),u.c(),P(u,1),u.m(s,null)):u&&(ae(),D(u,1,1,()=>{u=null}),le()),p&2&&L(o,"transform",f[1]?"translateY(-15px)":"translateY(0)"),(!c||p&2)&&q(n,"unfolded",f[1]),(!c||p&8)&&q(n,"folded",f[3])},i(f){c||(P(t.$$.fragment,f),P(a.$$.fragment,f),P(u),c=!0)},o(f){D(t.$$.fragment,f),D(a.$$.fragment,f),D(u),c=!1},d(f){$(t,f),f&&M(e),f&&M(n),$(a),u&&u.d()}}}function pa(i){var o;let t,e,n;return e=new uo({props:{text:i[0].data.description,edit:(o=i[0].data.edit)==null?void 0:o.description,maxLine:3}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","description svelte-1oxrkr1")},m(s,r){z(s,t,r),K(e,t,null),n=!0},p(s,r){var l;const a={};r&1&&(a.text=s[0].data.description),r&1&&(a.edit=(l=s[0].data.edit)==null?void 0:l.description),e.$set(a)},i(s){n||(P(e.$$.fragment,s),n=!0)},o(s){D(e.$$.fragment,s),n=!1},d(s){s&&M(t),$(e)}}}function Rp(i){let t,e,n=i[0].state&&ma(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&P(n,1)):(n=ma(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Fp(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,c;i.$$.dirty&1&&e(1,n=!!((a=r.state)!=null&&a.unfolded)),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=(c=(l=r.data.title)!=null?l:r.data.text)!=null?c:"")},[r,n,s,o]}class Gp extends re{constructor(t){super(),se(this,t,Fp,Rp,oe,{tag:0},Op)}}function Hp(i){let t,e;return t=new Gp({props:{tag:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Wp(i){let t,e;return t=new Mp({props:{tag:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Np(i){let t,e,n,o;const s=[Wp,Hp],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=pe()},m(l,c){~t&&r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?~t&&r[t].p(l,c):(e&&(ae(),D(r[u],1,1,()=>{r[u]=null}),le()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),P(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(P(e),o=!0)},o(l){D(e),o=!1},d(l){~t&&r[t].d(l),l&&M(n)}}}function _p(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(0,o=s.tag)},i.$$.update=()=>{var s;i.$$.dirty&1&&e(1,n=(s=o.data.appearance)!=null?s:"line")},[o,n]}class Xp extends re{constructor(t){super(),se(this,t,_p,Np,oe,{tag:0})}}function Yp(i){ce(i,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function ga(i){let t,e,n,o;return{c(){t=Ce("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){z(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&ze(()=>{n&&n.end(1),e=zt(t,Kn,{duration:i[1],delay:i[0],easing:ls}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=qt(t,Kn,{duration:i[1],delay:i[2],easing:Kt})),o=!1},d(s){s&&M(t),s&&n&&n.end()}}}function Up(i){let t,e,n,o,s,r=i[3]&&ga(i);return{c(){t=Ce("svg"),e=Ce("defs"),n=Ce("linearGradient"),o=Ce("stop"),s=Ce("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-blgtit"),b(t,"viewBox","0 0 105 21")},m(a,l){z(a,t,l),V(t,e),V(e,n),V(n,o),V(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&P(r,1)):(r=ga(a),r.c(),P(r,1),r.m(t,null)):r&&(ae(),D(r,1,1,()=>{r=null}),le())},i(a){P(r)},o(a){D(r)},d(a){a&&M(t),r&&r.d()}}}function Jp(i,t,e){let{inDelay:n=0}=t,{duration:o=1e3}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=Ne();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 Zp extends re{constructor(t){super(),se(this,t,Jp,Up,oe,{inDelay:0,duration:1,outDelay:2,unfolded:3},Yp)}}function qp(i){ce(i,"svelte-1mgyhhn",`:root{--sc-dot-size:6px;--sc-active-dot-size:8px;--sc-dot-size-animation-time:250ms}.sc-carousel-dot__dot.svelte-1mgyhhn{background-color:var(--sc-color-rgb-light);border-radius:50%;display:inline-block;opacity:0.5;transition:opacity 100ms ease,\r
|
|
545
545
|
height var(--sc-dot-size-animation-time) ease,\r
|
|
546
|
-
width var(--sc-dot-size-animation-time) ease;cursor:pointer;-webkit-tap-highlight-color:transparent;height:var(--sc-dot-size);width:var(--sc-dot-size)}.sc-carousel-dot__dot.svelte-1mgyhhn:hover{opacity:0.9}.sc-carousel-dot__dot_active.svelte-1mgyhhn{opacity:0.7;height:var(--sc-active-dot-size);width:var(--sc-active-dot-size)}`)}function Kp(i){let t,e,n;return{c(){t=T("button"),b(t,"class","sc-carousel-button sc-carousel-dot__dot svelte-1mgyhhn"),q(t,"sc-carousel-dot__dot_active",i[0])},m(o,s){z(o,t,s),e||(n=Pe(t,"click",i[1]),e=!0)},p(o,[s]){s&1&&q(t,"sc-carousel-dot__dot_active",o[0])},i:U,o:U,d(o){o&&M(t),e=!1,n()}}}function $p(i,t,e){let{active:n=!1}=t;function o(s){bn.call(this,i,s)}return i.$$set=s=>{"active"in s&&e(0,n=s.active)},[n,o]}class eg extends re{constructor(t){super(),se(this,t,$p,Kp,oe,{active:0},qp)}}function tg(i){ce(i,"svelte-670fde",".sc-carousel-dots__container.svelte-670fde{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;padding:0 30px}.sc-carousel-dots__dot-container.svelte-670fde{height:calc(var(--sc-dot-size) + 14px);width:calc(var(--sc-dot-size) + 10px);display:flex;align-items:center;justify-content:center}")}function Aa(i,t,e){const n=i.slice();return n[5]=t[e],n[7]=e,n}function va(i,t){let e,n,o,s;function r(){return t[3](t[7])}return n=new eg({props:{active:t[1]===t[7]}}),n.$on("click",r),{key:i,first:null,c(){e=T("div"),ee(n.$$.fragment),o=ne(),b(e,"class","sc-carousel-dots__dot-container svelte-670fde"),this.first=e},m(a,l){z(a,e,l),K(n,e,null),V(e,o),s=!0},p(a,l){t=a;const c={};l&3&&(c.active=t[1]===t[7]),n.$set(c)},i(a){s||(P(n.$$.fragment,a),s=!0)},o(a){D(n.$$.fragment,a),s=!1},d(a){a&&M(e),$(n)}}}function ng(i){let t,e=[],n=new Map,o,s=Array(i[0]);const r=a=>a[7];for(let a=0;a<s.length;a+=1){let l=Aa(i,s,a),c=r(l);n.set(c,e[a]=va(c,l))}return{c(){t=T("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","sc-carousel-dots__container svelte-670fde")},m(a,l){z(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,[l]){l&7&&(s=Array(a[0]),ae(),e=Je(e,l,r,1,a,s,n,t,Pt,va,null,Aa),le())},i(a){if(!o){for(let l=0;l<s.length;l+=1)P(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)D(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function ig(i,t,e){const n=vn();let{pagesCount:o=1}=t,{currentPageIndex:s=0}=t;function r(l){n("pageChange",l)}const a=l=>r(l);return i.$$set=l=>{"pagesCount"in l&&e(0,o=l.pagesCount),"currentPageIndex"in l&&e(1,s=l.currentPageIndex)},[o,s,r,a]}class og extends re{constructor(t){super(),se(this,t,ig,ng,oe,{pagesCount:0,currentPageIndex:1},tg)}}const sn="prev",Dt="next";function sg(i){ce(i,"svelte-1bftafx",":root{--sc-arrow-size:2px}.sc-carousel-arrow__circle.svelte-1bftafx{width:20px;height:20px;border-radius:50%;background-color:var(--sc-color-rgb-light-50p);display:flex;align-items:center;justify-content:center;transition:opacity 100ms ease;cursor:pointer;-webkit-tap-highlight-color:transparent}.sc-carousel-arrow__circle.svelte-1bftafx:hover{opacity:0.9}.sc-carousel-arrow__arrow.svelte-1bftafx{border:solid var(--sc-color-hex-dark);border-width:0 var(--sc-arrow-size) var(--sc-arrow-size) 0;padding:var(--sc-arrow-size);position:relative}.sc-carousel-arrow__arrow-next.svelte-1bftafx{transform:rotate(-45deg);left:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__arrow-prev.svelte-1bftafx{transform:rotate(135deg);right:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__circle_disabled.svelte-1bftafx,.sc-carousel-arrow__circle_disabled.svelte-1bftafx:hover{opacity:0.5}")}function rg(i){let t,e,n,o;return{c(){t=T("button"),e=T("i"),b(e,"class","sc-carousel-arrow__arrow svelte-1bftafx"),q(e,"sc-carousel-arrow__arrow-next",i[0]===Dt),q(e,"sc-carousel-arrow__arrow-prev",i[0]===sn),b(t,"class","sc-carousel-button sc-carousel-arrow__circle svelte-1bftafx"),q(t,"sc-carousel-arrow__circle_disabled",i[1])},m(s,r){z(s,t,r),V(t,e),n||(o=Pe(t,"click",i[2]),n=!0)},p(s,[r]){r&1&&q(e,"sc-carousel-arrow__arrow-next",s[0]===Dt),r&1&&q(e,"sc-carousel-arrow__arrow-prev",s[0]===sn),r&2&&q(t,"sc-carousel-arrow__circle_disabled",s[1])},i:U,o:U,d(s){s&&M(t),n=!1,o()}}}function ag(i,t,e){let{direction:n=Dt}=t,{disabled:o=!1}=t;function s(r){bn.call(this,i,r)}return i.$$set=r=>{"direction"in r&&e(0,n=r.direction),"disabled"in r&&e(1,o=r.disabled)},[n,o,s]}class ba extends re{constructor(t){super(),se(this,t,ag,rg,oe,{direction:0,disabled:1},sg)}}function lg(i){ce(i,"svelte-i7yfid",".sc-carousel-progress__indicator.svelte-i7yfid{height:100%;background-color:var(--sc-color-hex-dark-50p)}")}function cg(i){let t;return{c(){t=T("div"),b(t,"class","sc-carousel-progress__indicator svelte-i7yfid"),L(t,"width",i[0]+"%")},m(e,n){z(e,t,n)},p(e,[n]){n&1&&L(t,"width",e[0]+"%")},i:U,o:U,d(e){e&&M(t)}}}const ya=100;function ug(i,t,e){let n,{value:o=0}=t;return i.$$set=s=>{"value"in s&&e(1,o=s.value)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=Math.min(Math.max(o*ya,0),ya))},[n,o]}class dg extends re{constructor(t){super(),se(this,t,ug,cg,oe,{value:1},lg)}}function hg(i,t){i.addEventListener("mousedown",t),i.addEventListener("touchstart",t,{passive:!0})}function fg(i,t){i.removeEventListener("mousedown",t),i.removeEventListener("touchstart",t)}function mg(i,t){i.addEventListener("mouseup",t),i.addEventListener("touchend",t)}function wa(i,t){i.removeEventListener("mouseup",t),i.removeEventListener("touchend",t)}function pg(i,t){i.addEventListener("mousemove",t),i.addEventListener("touchmove",t)}function Ca(i,t){i.removeEventListener("mousemove",t),i.removeEventListener("touchmove",t)}function ho(i){return function(t,e){i.dispatchEvent(new CustomEvent(t,{detail:e}))}}const gg=110,Ag=9,vg=111,bg=20;function fo(i){if("TouchEvent"in window&&i instanceof TouchEvent){const t=i.touches[0];return{x:t?t.clientX:0,y:t?t.clientY:0}}return{x:i.clientX,y:i.clientY}}function yg(i,{thresholdProvider:t}){const e=ho(i);let n,o,s=0,r,a=!1;function l(){return Date.now()-r>=vg&&Math.abs(s)>=bg}function c(d){r=Date.now(),s=0,a=!0;const f=fo(d);n=f.x,o=f.y,e("swipeStart",{x:n,y:o}),pg(window,u),mg(window,h)}function u(d){if(!a)return;const f=fo(d),p=f.x-n,v=f.y-o;n=f.x,o=f.y,e("swipeMove",{x:n,y:o,dx:p,dy:v}),p!==0&&Math.sign(p)!==Math.sign(s)&&(s=0),s+=p,Math.abs(s)>t()&&(e("swipeThresholdReached",{direction:s>0?sn:Dt}),wa(window,h),Ca(window,u))}function h(d){if(wa(window,h),Ca(window,u),a=!1,!l()){e("swipeFailed");return}const f=fo(d);e("swipeEnd",{x:f.x,y:f.y})}return hg(i,c),{destroy(){fg(i,c)}}}function wg(i,t){i.addEventListener("mouseenter",t)}function Cg(i,t){i.removeEventListener("mouseenter",t)}function Pg(i,t){i.addEventListener("mouseleave",t)}function Pa(i,t){i.removeEventListener("mouseleave",t)}function Ig(i){const t=ho(i);function e(){Pg(i,n),t("hovered",{value:!0})}function n(){t("hovered",{value:!1}),Pa(i,n)}return wg(i,e),{destroy(){Cg(i,e),Pa(i,n)}}}const Eg=(i,t)=>{const e=t.x-i.x,n=t.y-i.y;return Math.sqrt(e*e+n*n)};function rn(i,t,e){return Math.max(i,Math.min(t,e))}function kg(i,t){i.addEventListener("touchstart",t,{passive:!0})}function xg(i,t){i.removeEventListener("touchstart",t)}function Dg(i,t){i.addEventListener("touchend",t)}function Ia(i,t){i.removeEventListener("touchend",t)}function Lg(i){const t=ho(i);let e=0,n={x:0,y:0};function o({tapEndedAt:a,tapEndedPos:l}){const c=a-e,u=Eg(n,l);return c<=gg&&u<=Ag}function s(a){e=Date.now();const l=a.touches[0];n={x:l.clientX,y:l.clientY},Dg(i,r)}function r(a){Ia(i,r);const l=a.changedTouches[0];o({tapEndedAt:Date.now(),tapEndedPos:{x:l.clientX,y:l.clientY}})&&t("tapped")}return kg(i,s),{destroy(){xg(i,s),Ia(i,r)}}}function Sg({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:o}){return i===t-e?0:i===0?Ea({particlesCountWithoutClones:t-n,particlesToScroll:o})-1:Math.floor((i-e)/o)}function Mg({currentParticleIndex:i,particlesToScroll:t}){return Math.ceil(i/t)}function zg({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,infinite:o,particlesToScroll:s}){return o?Sg({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:s}):Mg({currentParticleIndex:i,particlesToScroll:s})}function Ea({particlesCountWithoutClones:i,particlesToScroll:t}){return Math.ceil(i/t)}function Tg({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e}){const n=ka({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e});return Math.ceil(i/t)-n}function Bg({infinite:i,particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n}){return i?Ea({particlesCountWithoutClones:t,particlesToScroll:e}):Tg({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n})}function jg({pageIndex:i,clonesCountHead:t,clonesCountTail:e,particlesToScroll:n,particlesCount:o}){return rn(0,Math.min(t+i*n,o-e),o-1)}function Vg({pageIndex:i,particlesToScroll:t,particlesCount:e,particlesToShow:n}){return rn(0,Math.min(i*t,e-n),e-1)}function mo({infinite:i,pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s,particlesToShow:r}){return i?jg({pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s}):Vg({pageIndex:t,particlesToScroll:o,particlesCount:s,particlesToShow:r})}function Qg({particlesContainerChildren:i,particleWidth:t}){for(let e=0;e<i.length;e++)i[e].style.minWidth=`${t}px`,i[e].style.maxWidth=`${t}px`}function ka({particlesToScroll:i,particlesToShow:t,particlesCountWithoutClones:e}){const n=i-t;let o=t;for(;;){const s=e-o-n;if(s<t)return Math.max(s,0);o+=t+n}}function Og(i){return new ResizeObserver(t=>{i({width:t[0].contentRect.width})})}function Rg({clonesCountHead:i,clonesCountTail:t,particlesContainerChildren:e}){const n=[];for(let r=0;r<t;r++)n.push(e[r].cloneNode(!0));const o=[],s=e.length;for(let r=s-1;r>s-1-i;r--)o.push(e[r].cloneNode(!0));return{clonesToAppend:n,clonesToPrepend:o}}function Fg({particlesContainer:i,clonesToAppend:t,clonesToPrepend:e}){for(let n=0;n<t.length;n++)i.append(t[n]);for(let n=0;n<e.length;n++)i.prepend(e[n])}function Gg({infinite:i,particlesToShow:t,partialPageSize:e}){const n=i?{head:Math.ceil(e||t),tail:Math.ceil(t)}:{head:0,tail:0};return ge(F({},n),{total:n.head+n.tail})}const En=(i,t,e)=>{if(i&&i.hasOwnProperty(t))return i[t];if(e===void 0)throw new Error(`Required arg "${t}" was not provided`);return e},po=i=>t=>{i[t]&&i[t]()},Hg=(i,t)=>Gl.default(i,t),Wg=i=>Object.keys(i||{}),Ng=(i,t)=>{const e={};return i.forEach(n=>{e[n]=t[n]}),e},_g=()=>{const i={},t=(e,n)=>{const{watcherName:o,fn:s}=e,{prop:r,value:a}=n;i[o]||(i[o]={deps:{},fn:s}),i[o].deps[r]=a};return{subscribers:i,subscribe(e,n){e&&t(e,n)},notify(e,n){Object.entries(i).forEach(([o,{deps:s,fn:r}])=>{const a=Wg(s);if(a.includes(n)){const l=Ng(a,e);Hg(s,l)||(i[o].deps=l,r())}})}}},Xg=()=>{let i=null;return{targetWatcher(t,e){i={watcherName:t,fn:e},i.fn(),i=null},getTarget(){return i}}};function Yg(i,t){const e=Tn.default(i,"data",{}),n=Tn.default(i,"watch",{}),o=Tn.default(i,"methods",{}),s=Tn.default(t,"onChange",()=>{}),{subscribe:r,notify:a,subscribers:l}=_g(),{targetWatcher:c,getTarget:u}=Xg();let h;const d={},f=()=>({data:h,methods:d});let p=!1;const v=A=>(...y)=>{p=!0;const w=A(...y);return p=!1,w};Object.entries(o).forEach(([A,y])=>{d[A]=v((...w)=>y(f(),...w)),Object.defineProperty(d[A],"name",{value:A})}),h=new Proxy(Fl.default(e),{get(A,y){return u()&&!p&&r(u(),{prop:y,value:A[y]}),Reflect.get(...arguments)},set(A,y,w){return A[y]===w||(Reflect.set(...arguments),u()||(s&&s(y,w),a(h,y))),!0}}),Object.entries(n).forEach(([A,y])=>{c(A,()=>{y(f())})});const g=[h,d];return g._internal={_getSubscribers(){return l}},g}function Ug({pageIndex:i,particlesToShow:t,particlesToScroll:e,particlesCount:n}){const o=i===0?0:t-e,s=i*t-i*o,r=s+Math.max(t,e)-1,a=[];for(let l=s;l<=Math.min(n-1,r);l++)a.push(l);return a}function Jg({infinite:i,pageIndex:t,pagesCount:e,particlesCount:n,particlesToShow:o,particlesToScroll:s}){const r=rn(0,t,e-1);let a=r-1,l=r+1;a=i?a<0?e-1:a:Math.max(0,a),l=i?l>e-1?0:l:Math.min(e-1,l);const c=[...new Set([a,r,l,0,e-1])].sort((h,d)=>h-d),u=c.flatMap(h=>Ug({pageIndex:h,particlesToShow:o,particlesToScroll:s,particlesCount:n}));return{pageIndexes:c,particleIndexes:[...new Set(u)].sort((h,d)=>h-d)}}const Zg=(i,t)=>(i(),setInterval(i,t)),qg=35,xa=1;class Kg{constructor({onProgressValueChange:t}){this._onProgressValueChange=t,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(t){this._autoplayDuration=t}start(t){return new Promise(e=>{this.reset();const n=Math.min(qg,Math.max(this._autoplayDuration,1));let o=-n;this._interval=Zg(()=>N(this,null,function*(){if(this._paused)return;o+=n;const s=o/this._autoplayDuration;this._onProgressValueChange(s),s>xa&&(this.reset(),yield t(),e())}),n)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(xa)}}function $g(i){const t=new Kg({onProgressValueChange:r=>{i("progressValue",1-r)}}),e=Yg({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:r}){r.loaded=Jg({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=zg({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=ka({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:a,tail:l}=Gg({infinite:r.infinite,particlesToShow:r.particlesToShow,partialPageSize:r.partialPageSize});r.clonesCountHead=a,r.clonesCountTail=l,r.clonesCountTotal=a+l},setProgressManagerAutoplayDuration({data:r}){t.setAutoplayDuration(r.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:r,focused:a}}){r&&(a?t.pause():t.resume())},initDuration({data:r}){r.durationMs=r.durationMsInit},applyAutoplay({data:r,methods:{_applyAutoplayIfNeeded:a}}){r.autoplay&&a(r.autoplay)},setPagesCount({data:r}){r.pagesCount=Bg({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=rn(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=rn(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=mo({infinite:r.infinite,pageIndex:r.currentPageIndex-1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_next({data:r}){r.currentParticleIndex=mo({infinite:r.infinite,pageIndex:r.currentPageIndex+1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_moveToParticle({data:r},a){r.currentParticleIndex=rn(0,a,r.particlesCount-1)},toggleFocused({data:r}){r.focused=!r.focused},_applyAutoplayIfNeeded(l){return N(this,arguments,function*({data:r,methods:a}){if(!r.infinite&&(r.autoplayDirection===Dt&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===sn&&r.currentParticleIndex===0)){t.reset();return}if(r.autoplay){const c=()=>po({[Dt]:()=>N(this,null,function*(){return a.showNextPage()}),[sn]:()=>N(this,null,function*(){return a.showPrevPage()})})(r.autoplayDirection);yield t.start(c)}})},_jumpIfNeeded(l){return N(this,arguments,function*({data:r,methods:a}){let c=!1;return r.infinite&&(r.currentParticleIndex===0?(yield a.showParticle(r.particlesCount-r.clonesCountTotal,{animated:!1}),c=!0):r.currentParticleIndex===r.particlesCount-r.clonesCountTail&&(yield a.showParticle(r.clonesCountHead,{animated:!1}),c=!0)),c})},changePage(u,h,d){return N(this,arguments,function*({data:r,methods:a},l,c){if(t.reset(),r.disabled)return;r.disabled=!0,l(),yield a.offsetPage({animated:En(c,"animated",!0)}),r.disabled=!1,!(yield a._jumpIfNeeded())&&a._applyAutoplayIfNeeded()})},showNextPage(c,u){return N(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._next,l))})},showPrevPage(c,u){return N(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._prev,l))})},showParticle(c,u,h){return N(this,arguments,function*({methods:r},a,l){yield r.changePage(()=>r._moveToParticle(a),l)})},_getParticleIndexByPageIndex({data:r},a){return mo({infinite:r.infinite,pageIndex:a,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},showPage(c,u,h){return N(this,arguments,function*({methods:r},a,l){const d=r._getParticleIndexByPageIndex(a);yield r.showParticle(d,l)})},offsetPage({data:r},a){const l=En(a,"animated",!0);return new Promise(c=>{r.durationMs=l?r.durationMsInit:0,r.offset=-r.currentParticleIndex*r.particleWidth,setTimeout(()=>{c()},r.durationMs)})}}},{onChange:i}),[n,o]=e;return[{data:n,progressManager:t},o,e._internal]}function e0(i){ce(i,"svelte-sme1z4",":root{--sc-color-rgb-light-50p:rgba(93, 93, 93, 0.5);--sc-color-rgb-light:#5d5d5d;--sc-color-hex-dark-50p:rgba(30, 30, 30, 0.5);--sc-color-hex-dark:#1e1e1e}.sc-carousel__carousel-container.svelte-sme1z4{display:flex;width:100%;flex-direction:column;align-items:center}.sc-carousel__content-container.svelte-sme1z4{position:relative;display:flex;width:100%}.sc-carousel__pages-window.svelte-sme1z4{flex:1;display:flex;overflow:hidden;box-sizing:border-box;position:relative}.sc-carousel__pages-container.svelte-sme1z4{width:100%;display:flex;transition-property:transform}.sc-carousel__arrow-container.svelte-sme1z4{padding:5px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.sc-carousel-progress__container.svelte-sme1z4{width:100%;height:5px;background-color:var(--sc-color-rgb-light-50p);position:absolute;bottom:0}.sc-carousel-button{all:unset;cursor:pointer}.sc-carousel-button:focus{outline:5px auto}")}const t0=i=>({currentPageIndex:i[0]&32,pagesCount:i[0]&1024,loaded:i[0]&64}),Da=i=>({currentPageIndex:i[5],pagesCount:i[10],showPage:i[15],loaded:i[6]}),n0=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),La=i=>({showNextPage:i[14].showNextPage,loaded:i[6],currentPageIndex:i[5]}),i0=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),Sa=i=>({loaded:i[6],currentPageIndex:i[5]}),o0=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),Ma=i=>({showPrevPage:i[14].showPrevPage,loaded:i[6],currentPageIndex:i[5]});function za(i){let t;const e=i[37].prev,n=Xt(e,i,i[36],Ma),o=n||s0(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&96|r[1]&32)&&Ut(n,e,s,s[36],t?Yt(e,s[36],r,o0):Jt(s[36]),Ma):o&&o.p&&(!t||r[0]&36)&&o.p(s,t?r:[-1,-1])},i(s){t||(P(o,s),t=!0)},o(s){D(o,s),t=!1},d(s){o&&o.d(s)}}}function s0(i){let t,e,n;return e=new ba({props:{direction:"prev",disabled:!i[2]&&i[5]===0}}),e.$on("click",i[23]),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s[0]&36&&(r.disabled=!o[2]&&o[5]===0),e.$set(r)},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function Ta(i){let t,e,n;return e=new dg({props:{value:i[7]}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","sc-carousel-progress__container svelte-sme1z4")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s[0]&128&&(r.value=o[7]),e.$set(r)},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function Ba(i){let t;const e=i[37].next,n=Xt(e,i,i[36],La),o=n||r0(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&96|r[1]&32)&&Ut(n,e,s,s[36],t?Yt(e,s[36],r,n0):Jt(s[36]),La):o&&o.p&&(!t||r[0]&1060)&&o.p(s,t?r:[-1,-1])},i(s){t||(P(o,s),t=!0)},o(s){D(o,s),t=!1},d(s){o&&o.d(s)}}}function r0(i){let t,e,n;return e=new ba({props:{direction:"next",disabled:!i[2]&&i[5]===i[10]-1}}),e.$on("click",i[14].showNextPage),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s[0]&1060&&(r.disabled=!o[2]&&o[5]===o[10]-1),e.$set(r)},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function ja(i){let t;const e=i[37].dots,n=Xt(e,i,i[36],Da),o=n||a0(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&1120|r[1]&32)&&Ut(n,e,s,s[36],t?Yt(e,s[36],r,t0):Jt(s[36]),Da):o&&o.p&&(!t||r[0]&1056)&&o.p(s,t?r:[-1,-1])},i(s){t||(P(o,s),t=!0)},o(s){D(o,s),t=!1},d(s){o&&o.d(s)}}}function a0(i){let t,e;return t=new og({props:{pagesCount:i[10],currentPageIndex:i[5]}}),t.$on("pageChange",i[41]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o[0]&1024&&(s.pagesCount=n[10]),o[0]&32&&(s.currentPageIndex=n[5]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function l0(i){let t,e,n,o,s,r,a,l,c,u,h,d,f=i[1]&&za(i);const p=i[37].default,v=Xt(p,i,i[36],Sa);let g=i[3]&&Ta(i),A=i[1]&&Ba(i),y=i[4]&&ja(i);return{c(){t=T("div"),e=T("div"),f&&f.c(),n=ne(),o=T("div"),s=T("div"),v&&v.c(),a=ne(),g&&g.c(),l=ne(),A&&A.c(),c=ne(),y&&y.c(),b(s,"class","sc-carousel__pages-container svelte-sme1z4"),L(s,"transform","translateX("+i[8]+"px)"),L(s,"transition-duration",i[9]+"ms"),L(s,"transition-timing-function",i[0]),b(o,"class","sc-carousel__pages-window svelte-sme1z4"),b(e,"class","sc-carousel__content-container svelte-sme1z4"),b(t,"class","sc-carousel__carousel-container svelte-sme1z4")},m(w,C){z(w,t,C),V(t,e),f&&f.m(e,null),V(e,n),V(e,o),V(o,s),v&&v.m(s,null),i[39](s),V(o,a),g&&g.m(o,null),i[40](o),V(e,l),A&&A.m(e,null),V(t,c),y&&y.m(t,null),u=!0,h||(d=[Si(r=yg.call(null,s,{thresholdProvider:i[38]})),Pe(s,"swipeStart",i[16]),Pe(s,"swipeMove",i[18]),Pe(s,"swipeEnd",i[19]),Pe(s,"swipeFailed",i[20]),Pe(s,"swipeThresholdReached",i[17]),Si(Ig.call(null,o)),Pe(o,"hovered",i[21]),Si(Lg.call(null,o)),Pe(o,"tapped",i[22])],h=!0)},p(w,C){w[1]?f?(f.p(w,C),C[0]&2&&P(f,1)):(f=za(w),f.c(),P(f,1),f.m(e,n)):f&&(ae(),D(f,1,1,()=>{f=null}),le()),v&&v.p&&(!u||C[0]&96|C[1]&32)&&Ut(v,p,w,w[36],u?Yt(p,w[36],C,i0):Jt(w[36]),Sa),(!u||C[0]&256)&&L(s,"transform","translateX("+w[8]+"px)"),(!u||C[0]&512)&&L(s,"transition-duration",w[9]+"ms"),(!u||C[0]&1)&&L(s,"transition-timing-function",w[0]),r&&_t(r.update)&&C[0]&2048&&r.update.call(null,{thresholdProvider:w[38]}),w[3]?g?(g.p(w,C),C[0]&8&&P(g,1)):(g=Ta(w),g.c(),P(g,1),g.m(o,null)):g&&(ae(),D(g,1,1,()=>{g=null}),le()),w[1]?A?(A.p(w,C),C[0]&2&&P(A,1)):(A=Ba(w),A.c(),P(A,1),A.m(e,null)):A&&(ae(),D(A,1,1,()=>{A=null}),le()),w[4]?y?(y.p(w,C),C[0]&16&&P(y,1)):(y=ja(w),y.c(),P(y,1),y.m(t,null)):y&&(ae(),D(y,1,1,()=>{y=null}),le())},i(w){u||(P(f),P(v,w),P(g),P(A),P(y),u=!0)},o(w){D(f),D(v,w),D(g),D(A),D(y),u=!1},d(w){w&&M(t),f&&f.d(),v&&v.d(w),i[39](null),g&&g.d(),i[40](null),A&&A.d(),y&&y.d(),h=!1,ut(d)}}}function c0(i,t,e){let{$$slots:n={},$$scope:o}=t,s=[],r,a,l=0,c=0,u=1;const[{data:h,progressManager:d},f,p]=$g((ie,ve)=>{po({currentPageIndex:()=>e(5,r=ve),progressValue:()=>e(7,a=ve),offset:()=>e(8,l=ve),durationMs:()=>e(9,c=ve),pagesCount:()=>e(10,u=ve),loaded:()=>e(6,s=ve)})(ie)}),v=vn();let{timingFunction:g="ease-in-out"}=t,{arrows:A=!0}=t,{infinite:y=!0}=t,{initialPageIndex:w=0}=t,{duration:C=500}=t,{autoplay:x=!1}=t,{autoplayDuration:E=3e3}=t,{autoplayDirection:S=Dt}=t,{pauseOnFocus:k=!1}=t,{autoplayProgressVisible:j=!1}=t,{dots:_=!0}=t,{swiping:G=!0}=t,{particlesToShow:Z=1}=t,{particlesToScroll:Q=1}=t;function B(ie,ve){return N(this,null,function*(){const He=En(ve,"animated",!0);if(typeof ie!="number")throw new Error("pageIndex should be a number");yield f.showPage(ie,{animated:He})})}function R(ie){return N(this,null,function*(){const ve=En(ie,"animated",!0);yield f.showPrevPage({animated:ve})})}function W(ie){return N(this,null,function*(){const ve=En(ie,"animated",!0);yield f.showNextPage({animated:ve})})}let H=0,te,X;const J=Og(({width:ie})=>{e(11,H=ie),h.particleWidth=H/h.particlesToShow,Qg({particlesContainerChildren:X.children,particleWidth:h.particleWidth}),f.offsetPage({animated:!1})});function he(){const{clonesToAppend:ie,clonesToPrepend:ve}=Rg({clonesCountHead:h.clonesCountHead,clonesCountTail:h.clonesCountTail,particlesContainerChildren:X.children});Fg({particlesContainer:X,clonesToAppend:ie,clonesToPrepend:ve})}Ue(()=>{N(this,null,function*(){yield ts(),X&&te&&(h.particlesCountWithoutClones=X.children.length,yield ts(),h.infinite&&he(),h.particlesCount=X.children.length,f.showPage(w,{animated:!1}),J.observe(te))})}),wt(()=>{J.disconnect(),d.reset()});function fe(ie){return N(this,null,function*(){yield f.showPage(ie,{animated:!0})})}function Ae(){!G||(h.durationMs=0)}function xe(ie){return N(this,null,function*(){!G||(yield po({[Dt]:f.showNextPage,[sn]:f.showPrevPage})(ie.detail.direction))})}function Te(ie){!G||(h.offset+=ie.detail.dx)}function Ge(){!G||f.showParticle(h.currentParticleIndex)}function ue(){return N(this,null,function*(){!G||(yield f.offsetPage({animated:!0}))})}function we(ie){h.focused=ie.detail.value}function Ee(){f.toggleFocused()}function de(){f.showPrevPage()}const Ke=()=>H/3;function mt(ie){je[ie?"unshift":"push"](()=>{X=ie,e(13,X)})}function ye(ie){je[ie?"unshift":"push"](()=>{te=ie,e(12,te)})}const it=ie=>fe(ie.detail);return i.$$set=ie=>{"timingFunction"in ie&&e(0,g=ie.timingFunction),"arrows"in ie&&e(1,A=ie.arrows),"infinite"in ie&&e(2,y=ie.infinite),"initialPageIndex"in ie&&e(24,w=ie.initialPageIndex),"duration"in ie&&e(25,C=ie.duration),"autoplay"in ie&&e(26,x=ie.autoplay),"autoplayDuration"in ie&&e(27,E=ie.autoplayDuration),"autoplayDirection"in ie&&e(28,S=ie.autoplayDirection),"pauseOnFocus"in ie&&e(29,k=ie.pauseOnFocus),"autoplayProgressVisible"in ie&&e(3,j=ie.autoplayProgressVisible),"dots"in ie&&e(4,_=ie.dots),"swiping"in ie&&e(30,G=ie.swiping),"particlesToShow"in ie&&e(31,Z=ie.particlesToShow),"particlesToScroll"in ie&&e(32,Q=ie.particlesToScroll),"$$scope"in ie&&e(36,o=ie.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&32&&v("pageChange",r),i.$$.dirty[0]&4&&(h.infinite=y),i.$$.dirty[0]&33554432&&(h.durationMsInit=C),i.$$.dirty[0]&67108864&&(h.autoplay=x),i.$$.dirty[0]&134217728&&(h.autoplayDuration=E),i.$$.dirty[0]&268435456&&(h.autoplayDirection=S),i.$$.dirty[0]&536870912&&(h.pauseOnFocus=k),i.$$.dirty[1]&1&&(h.particlesToShowInit=Z),i.$$.dirty[1]&2&&(h.particlesToScrollInit=Q)},[g,A,y,j,_,r,s,a,l,c,u,H,te,X,f,fe,Ae,xe,Te,Ge,ue,we,Ee,de,w,C,x,E,S,k,G,Z,Q,B,R,W,o,n,Ke,mt,ye,it]}class u0 extends re{constructor(t){super(),se(this,t,c0,l0,oe,{timingFunction:0,arrows:1,infinite:2,initialPageIndex:24,duration:25,autoplay:26,autoplayDuration:27,autoplayDirection:28,pauseOnFocus:29,autoplayProgressVisible:3,dots:4,swiping:30,particlesToShow:31,particlesToScroll:32,goTo:33,goToPrev:34,goToNext:35},e0,[-1,-1])}get goTo(){return this.$$.ctx[33]}get goToPrev(){return this.$$.ctx[34]}get goToNext(){return this.$$.ctx[35]}}function d0(i){ce(i,"svelte-159ski6",".media-item.svelte-159ski6.svelte-159ski6{position:relative;height:100%}.media-content.svelte-159ski6.svelte-159ski6{position:relative;pointer-events:auto;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.media-content.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none}.video-icon.svelte-159ski6.svelte-159ski6{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-159ski6.svelte-159ski6{display:none;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none;display:block}.video-icon.svelte-159ski6.svelte-159ski6{pointer-events:auto}.video-icon.large.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem}.video-icon.small.svelte-159ski6.svelte-159ski6{width:1.75rem;height:1.75rem}.video-icon.svelte-159ski6 .video-icon-img.svelte-159ski6{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-159ski6 .video-icon-img.canPlay.svelte-159ski6{cursor:pointer}")}function Va(i){let t;function e(s,r){if(s[2].type==="Image")return f0;if(s[2].type==="Video")return h0}let n=e(i),o=n&&n(i);return{c(){t=T("div"),o&&o.c(),b(t,"class","media-item svelte-159ski6"),b(t,"draggable","false")},m(s,r){z(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&&M(t),o&&o.d()}}}function h0(i){let t,e,n,o,s,r;function a(u,h){return u[7]&&u[2].videoCoverUrl?p0:m0}let l=a(i),c=l(i);return{c(){c.c(),t=ne(),e=T("div"),n=T("div"),o=T("div"),b(o,"class","video-icon-img svelte-159ski6"),L(o,"background-image","url("+i[18]()+")"),q(o,"canPlay",i[5]),b(n,"class","video-icon svelte-159ski6"),q(n,"large",i[4]==="large"),q(n,"small",i[4]==="small"),b(e,"class","video-play-button-container svelte-159ski6"),q(e,"showPlayButton",i[9])},m(u,h){c.m(u,h),z(u,t,h),z(u,e,h),V(e,n),V(n,o),s||(r=Pe(o,"click",i[19]),s=!0)},p(u,h){l===(l=a(u))&&c?c.p(u,h):(c.d(1),c=l(u),c&&(c.c(),c.m(t.parentNode,t))),h&8&&L(o,"background-image","url("+u[18]()+")"),h&32&&q(o,"canPlay",u[5]),h&16&&q(n,"large",u[4]==="large"),h&16&&q(n,"small",u[4]==="small"),h&512&&q(e,"showPlayButton",u[9])},d(u){c.d(u),u&&M(t),u&&M(e),s=!1,r()}}}function f0(i){let t,e,n,o;return{c(){t=T("img"),b(t,"class","media-content svelte-159ski6"),b(t,"style",e=`object-fit: ${i[6]};`),Xe(t.src,n=i[2].url)||b(t,"src",n),b(t,"alt",o=i[2].name),b(t,"draggable",!1)},m(s,r){z(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&b(t,"style",e),r&4&&!Xe(t.src,n=s[2].url)&&b(t,"src",n),r&4&&o!==(o=s[2].name)&&b(t,"alt",o)},d(s){s&&M(t)}}}function m0(i){let t,e,n,o,s,r,a;return{c(){t=T("video"),b(t,"class","media-content svelte-159ski6"),b(t,"style",e=`object-fit: ${i[6]};`),Xe(t.src,n=i[2].videoCoverUrl?i[2].url:i[2].url+"#t=0.1")||b(t,"src",n),b(t,"poster",o=i[2].videoCoverUrl),b(t,"preload",s=i[2].videoCoverUrl?"none":"auto"),b(t,"disablepictureinpicture",""),t.playsInline=!0,b(t,"paused",""),t.muted=!0,b(t,"draggable",!1),t.loop=!1,b(t,"crossorigin",""),t.controls=!1,q(t,"showPlayButton",i[9])},m(l,c){z(l,t,c),i[17](t),r||(a=[Pe(t,"play",i[14]),Pe(t,"pause",i[15]),Pe(t,"click",i[16])],r=!0)},p(l,c){c&64&&e!==(e=`object-fit: ${l[6]};`)&&b(t,"style",e),c&4&&!Xe(t.src,n=l[2].videoCoverUrl?l[2].url:l[2].url+"#t=0.1")&&b(t,"src",n),c&4&&o!==(o=l[2].videoCoverUrl)&&b(t,"poster",o),c&4&&s!==(s=l[2].videoCoverUrl?"none":"auto")&&b(t,"preload",s),c&512&&q(t,"showPlayButton",l[9])},d(l){l&&M(t),i[17](null),r=!1,ut(a)}}}function p0(i){let t,e,n,o;return{c(){t=T("img"),b(t,"class","media-content svelte-159ski6"),b(t,"style",e=`object-fit: ${i[6]};`),Xe(t.src,n=i[2].videoCoverUrl)||b(t,"src",n),b(t,"alt",o=i[2].name),b(t,"draggable",!1)},m(s,r){z(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&b(t,"style",e),r&4&&!Xe(t.src,n=s[2].videoCoverUrl)&&b(t,"src",n),r&4&&o!==(o=s[2].name)&&b(t,"alt",o)},d(s){s&&M(t)}}}function g0(i){let t,e=i[2]&&Va(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[2]?e?e.p(n,o):(e=Va(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:U,o:U,d(n){e&&e.d(n),n&&M(t)}}}function A0(i,t,e){let n,{mediaInstance:o={paused:!0}}=t,{tag:s}=t,{media:r}=t,{playButtonIfNeed:a="withoutText"}=t,{playButtonSizeIfNeed:l="small"}=t,{canPlay:c=!0}=t,{objectFit:u="fill"}=t,{disableVideoIfHavePoster:h=!1}=t,d,f=!0,p=!1;function v(){e(12,p=(r==null?void 0:r.type)==="Video"&&Boolean(r.videoCoverUrl))}const g=Mt("mediaStore"),A=Mt("hooks"),y=()=>{p||(d==null||d.play(),d==null||d.pause(),e(12,p=!0))};A.on("loadVideoFirstFrame",y),Ue(()=>{g.subscribe(({currentMediaElement:j})=>{j!==d&&(d==null||d.pause())})});const w=j=>{e(9,f=!1),e(0,o.paused=!1,o),g.set({currentMediaElement:d}),A.emit("playStateChange",{event:j,state:"playing",tag:s,mediaInstance:d})},C=j=>{e(9,f=!0),e(0,o.paused=!0,o),A.emit("playStateChange",{event:j,state:"paused",tag:s,mediaInstance:d})},x=j=>{d&&d.pause()};function E(j){je[j?"unshift":"push"](()=>{d=j,e(8,d)})}const S=()=>a==="withText"?Ap:a==="withoutText"?vp:a,k=j=>{!c||d&&(e(8,d.muted=!1,d),d.play())};return i.$$set=j=>{"mediaInstance"in j&&e(0,o=j.mediaInstance),"tag"in j&&e(1,s=j.tag),"media"in j&&e(2,r=j.media),"playButtonIfNeed"in j&&e(3,a=j.playButtonIfNeed),"playButtonSizeIfNeed"in j&&e(4,l=j.playButtonSizeIfNeed),"canPlay"in j&&e(5,c=j.canPlay),"objectFit"in j&&e(6,u=j.objectFit),"disableVideoIfHavePoster"in j&&e(7,h=j.disableVideoIfHavePoster)},i.$$.update=()=>{if(i.$$.dirty&4&&e(13,n=r==null?void 0:r.url),i.$$.dirty&8192&&Boolean(n)&&v(),i.$$.dirty&256&&d&&e(9,f=d.paused),i.$$.dirty&4356&&(r==null?void 0:r.type)==="Video"&&!p){const j=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,G=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&j;d&&G&&d.paused&&(document.removeEventListener("WeixinJSBridgeReady",y),document.removeEventListener("touchstart",y),document.removeEventListener("click",y),document.addEventListener("WeixinJSBridgeReady",y),document.addEventListener("touchstart",y),document.addEventListener("click",y))}},[o,s,r,a,l,c,u,h,d,f,g,A,p,n,w,C,x,E,S,k]}class Qa extends re{constructor(t){super(),se(this,t,A0,g0,oe,{mediaInstance:0,tag:1,media:2,playButtonIfNeed:3,playButtonSizeIfNeed:4,canPlay:5,objectFit:6,disableVideoIfHavePoster:7},d0)}}function v0(i){ce(i,"svelte-1mrbqlg",".media-list-wrapper.svelte-1mrbqlg.svelte-1mrbqlg{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg{position:relative;pointer-events:auto;height:100%;left:50%;top:50%;transform:translate(-50%, -50%)}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__carousel-container,.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__content-container{height:100%}")}function Oa(i,t,e){const n=i.slice();return n[21]=t[e],n[22]=t,n[23]=e,n}function Ra(i){let t,e,n,o,s,r,a;const l=[y0,b0],c=[];function u(h,d){return h[12]?0:1}return n=u(i),o=c[n]=l[n](i),{c(){t=T("div"),e=T("div"),o.c(),b(e,"class","media-list svelte-1mrbqlg"),q(e,"carouselEnabled",i[12]),b(t,"class","media-list-wrapper svelte-1mrbqlg"),q(t,"unfolded",i[5])},m(h,d){z(h,t,d),V(t,e),c[n].m(e,null),a=!0},p(h,d){i=h;let f=n;n=u(i),n===f?c[n].p(i,d):(ae(),D(c[f],1,1,()=>{c[f]=null}),le(),o=c[n],o?o.p(i,d):(o=c[n]=l[n](i),o.c()),P(o,1),o.m(e,null)),(!a||d&4096)&&q(e,"carouselEnabled",i[12]),(!a||d&32)&&q(t,"unfolded",i[5])},i(h){a||(P(o),h&&ze(()=>{r&&r.end(1),s=zt(t,cs,i[6]?{y:4,duration:i[4],delay:i[2],easing:vt}:void 0),s.start()}),a=!0)},o(h){D(o),s&&s.invalidate(),h&&(r=qt(t,cs,i[6]?{y:4,duration:i[4],delay:i[3],easing:vt}:void 0)),a=!1},d(h){h&&M(t),c[n].d(),h&&r&&r.end()}}}function b0(i){let t,e;const n=[{media:i[1][0]},i[7],{tag:i[0]}];let o={};for(let s=0;s<n.length;s+=1)o=Be(o,n[s]);return t=new Qa({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&131?Oe(n,[r&2&&{media:s[1][0]},r&128&&ss(s[7]),r&1&&{tag:s[0]}]):{};t.$set(a)},i(s){e||(P(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function y0(i){let t,e,n={dots:!1,arrows:!1,$$slots:{default:[w0]},$$scope:{ctx:i}};return t=new u0({props:n}),i[17](t),t.$on("pageChange",i[18]),{c(){ee(t.$$.fragment)},m(o,s){K(t,o,s),e=!0},p(o,s){const r={};s&16778625&&(r.$$scope={dirty:s,ctx:o}),t.$set(r)},i(o){e||(P(t.$$.fragment,o),e=!0)},o(o){D(t.$$.fragment,o),e=!1},d(o){i[17](null),$(t,o)}}}function Fa(i){let t,e,n;const o=[i[7],{media:i[21]},{tag:i[0]}];function s(a){i[16](a,i[23])}let r={};for(let a=0;a<o.length;a+=1)r=Be(r,o[a]);return i[8][i[23]]!==void 0&&(r.mediaInstance=i[8][i[23]]),t=new Qa({props:r}),je.push(()=>Lc(t,"mediaInstance",s)),{c(){ee(t.$$.fragment)},m(a,l){K(t,a,l),n=!0},p(a,l){i=a;const c=l&1153?Oe(o,[l&128&&ss(i[7]),l&1024&&{media:i[21]},l&1&&{tag:i[0]}]):{};!e&&l&256&&(e=!0,c.mediaInstance=i[8][i[23]],Ec(()=>e=!1)),t.$set(c)},i(a){n||(P(t.$$.fragment,a),n=!0)},o(a){D(t.$$.fragment,a),n=!1},d(a){$(t,a)}}}function w0(i){let t,e,n=i[10],o=[];for(let r=0;r<n.length;r+=1)o[r]=Fa(Oa(i,n,r));const s=r=>D(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=pe()},m(r,a){for(let l=0;l<o.length;l+=1)o[l].m(r,a);z(r,t,a),e=!0},p(r,a){if(a&1409){n=r[10];let l;for(l=0;l<n.length;l+=1){const c=Oa(r,n,l);o[l]?(o[l].p(c,a),P(o[l],1)):(o[l]=Fa(c),o[l].c(),P(o[l],1),o[l].m(t.parentNode,t))}for(ae(),l=n.length;l<o.length;l+=1)s(l);le()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)P(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)D(o[a]);e=!1},d(r){dt(o,r),r&&M(t)}}}function C0(i){let t,e,n=i[5]&&Ra(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[5]?n?(n.p(o,s),s&32&&P(n,1)):(n=Ra(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function P0(i,t,e){let n,o,s,r,{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:u=0}=t,{duration:h=0}=t,{unfolded:d=!0}=t,{animation:f=!0}=t,{mediaItemConfig:p}=t,{enableCarousel:v=!0}=t,{autoplayConfig:g={autoplay:!0,autoplayVideo:!1}}=t,A=[],y,w=null;const C=Mt("mediaStore");Ue(()=>{w=setInterval(()=>{r&&(y==null||y.goToNext())},3e3)}),wt(()=>{clearInterval(w)});function x(k,j){i.$$.not_equal(A[j],k)&&(A[j]=k,e(8,A))}function E(k){je[k?"unshift":"push"](()=>{y=k,e(11,y)})}const S=k=>{n||C.set({currentMediaElement:null})};return i.$$set=k=>{"tag"in k&&e(0,a=k.tag),"mediaData"in k&&e(1,l=k.mediaData),"inDelay"in k&&e(2,c=k.inDelay),"outDelay"in k&&e(3,u=k.outDelay),"duration"in k&&e(4,h=k.duration),"unfolded"in k&&e(5,d=k.unfolded),"animation"in k&&e(6,f=k.animation),"mediaItemConfig"in k&&e(7,p=k.mediaItemConfig),"enableCarousel"in k&&e(14,v=k.enableCarousel),"autoplayConfig"in k&&e(15,g=k.autoplayConfig)},i.$$.update=()=>{i.$$.dirty&256&&e(9,n=A.every(k=>k.paused)),i.$$.dirty&16386&&e(12,o=v&&(l==null?void 0:l.length)>1),i.$$.dirty&2&&e(10,s=l),i.$$.dirty&34304&&(r=s.length>1&&g.autoplay&&n)},[a,l,c,u,h,d,f,p,A,n,s,y,o,C,v,g,x,E,S]}class Ga extends re{constructor(t){super(),se(this,t,P0,C0,oe,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:14,autoplayConfig:15},v0)}}function I0(i){ce(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 Ha(i){let t,e,n,o,s,r,a,l;t=new nt({props:{visible:i[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new Zp({props:{unfolded:i[3],outDelay:400}});let c=i[2]&&Wa(i),u=i[1]&&Na(i);return{c(){ee(t.$$.fragment),e=ne(),n=T("div"),ee(o.$$.fragment),s=ne(),c&&c.c(),r=ne(),u&&u.c(),a=pe(),b(n,"class","line svelte-1f7m1lj")},m(h,d){K(t,h,d),z(h,e,d),z(h,n,d),K(o,n,null),z(h,s,d),c&&c.m(h,d),z(h,r,d),u&&u.m(h,d),z(h,a,d),l=!0},p(h,d){const f={};d&8&&(f.visible=h[3]),t.$set(f);const p={};d&8&&(p.unfolded=h[3]),o.$set(p),h[2]?c?(c.p(h,d),d&4&&P(c,1)):(c=Wa(h),c.c(),P(c,1),c.m(r.parentNode,r)):c&&(ae(),D(c,1,1,()=>{c=null}),le()),h[1]?u?(u.p(h,d),d&2&&P(u,1)):(u=Na(h),u.c(),P(u,1),u.m(a.parentNode,a)):u&&(ae(),D(u,1,1,()=>{u=null}),le())},i(h){l||(P(t.$$.fragment,h),P(o.$$.fragment,h),P(c),P(u),l=!0)},o(h){D(t.$$.fragment,h),D(o.$$.fragment,h),D(c),D(u),l=!1},d(h){$(t,h),h&&M(e),h&&M(n),$(o),h&&M(s),c&&c.d(h),h&&M(r),u&&u.d(h),h&&M(a)}}}function Wa(i){let t,e,n;return e=new ra({props:{unfolded:i[3],content:i[2],inDelay:500}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","text svelte-1f7m1lj")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&4&&(r.content=o[2]),e.$set(r)},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function Na(i){let t,e,n;return e=new Ga({props:{autoplayConfig:{autoplay:!1},unfolded:i[3],mediaData:i[1],tag:i[0],enableCarousel:!1,mediaItemConfig:{canPlay:!1,playButtonSizeIfNeed:"small",disableVideoIfHavePoster:!0},inDelay:500,duration:500}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&2&&(r.mediaData=o[1]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function E0(i){let t,e,n=i[0].state&&Ha(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&P(n,1)):(n=Ha(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function k0(i,t,e){let n,o,s,r,{tag:a}=t;return i.$$set=l=>{"tag"in l&&e(0,a=l.tag)},i.$$.update=()=>{var l,c,u;i.$$.dirty&1&&e(3,n=a.state?a.state.unfolded:!1),i.$$.dirty&1&&e(4,o=(c=(l=a.data.title)!=null?l:a.data.text)!=null?c:""),i.$$.dirty&16&&e(2,s=((u=o.length)!=null?u:0)>7?o.substring(0,6)+"...":o),i.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,s,n,o]}class x0 extends re{constructor(t){super(),se(this,t,k0,E0,oe,{tag:0},I0)}}class go{constructor(t=0,e=0){m(this,"min");m(this,"max");m(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 D0{constructor(t,e){m(this,"min");m(this,"max");m(this,"xInterval");m(this,"yInterval");m(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new go(this.min.x,this.max.x),this.yInterval=new go(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 Ai(i,t,e){const n=i[t],o=i[e];!n||!o||(i[t]=o,i[e]=n)}function L0(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;Ai(i,a*4+0,l*4+0),Ai(i,a*4+1,l*4+1),Ai(i,a*4+2,l*4+2),Ai(i,a*4+3,l*4+3)}}}class _a{constructor(t,e){m(this,"width");m(this,"height");m(this,"containerDom");m(this,"hooks",new me.Subscribe);m(this,"canvas",document.createElement("canvas"));m(this,"five");m(this,"scale");m(this,"config");m(this,"offset",{x:0,y:0});m(this,"context");m(this,"renderCenter",new I.Vector3);m(this,"hammer");m(this,"state",{enabled:!1});m(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)`});m(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 hn.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 I.Vector2),a=1,l=n/t,c=o/t,u=a*t,h=(s.x+1)/2*r.x,d=(s.y+1)/2*r.y,f=this.five.getPixels(h-l/2,d-l/2,l,c,u),p=Math.floor(n*a),v=Math.floor(o*a);L0(f,p,v);const g=new ImageData(p,v);g.data.set(f),e.putImageData(g,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 S0(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new I.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function Xa(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new I.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function M0(i,t){const e=i.getElement();if(!e)return;const n=Xa(t,e),o=new I.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 I.Vector2().fromArray([o,s]),a=new I.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const T0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkMEbgj7FKFpLA4QS+fPnyx23czJc//V498h2Oy8uXwDYCf/oF3HYWC0vgAAI3QfuP22V+uR35vYplrOsX/03w/kWAVgISmCPwX+ZKWUkCErgR+PvtiKjF9uj/iMx+C1/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QgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",B0=`
|
|
546
|
+
width var(--sc-dot-size-animation-time) ease;cursor:pointer;-webkit-tap-highlight-color:transparent;height:var(--sc-dot-size);width:var(--sc-dot-size)}.sc-carousel-dot__dot.svelte-1mgyhhn:hover{opacity:0.9}.sc-carousel-dot__dot_active.svelte-1mgyhhn{opacity:0.7;height:var(--sc-active-dot-size);width:var(--sc-active-dot-size)}`)}function Kp(i){let t,e,n;return{c(){t=T("button"),b(t,"class","sc-carousel-button sc-carousel-dot__dot svelte-1mgyhhn"),q(t,"sc-carousel-dot__dot_active",i[0])},m(o,s){z(o,t,s),e||(n=Pe(t,"click",i[1]),e=!0)},p(o,[s]){s&1&&q(t,"sc-carousel-dot__dot_active",o[0])},i:U,o:U,d(o){o&&M(t),e=!1,n()}}}function $p(i,t,e){let{active:n=!1}=t;function o(s){bn.call(this,i,s)}return i.$$set=s=>{"active"in s&&e(0,n=s.active)},[n,o]}class eg extends re{constructor(t){super(),se(this,t,$p,Kp,oe,{active:0},qp)}}function tg(i){ce(i,"svelte-670fde",".sc-carousel-dots__container.svelte-670fde{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;padding:0 30px}.sc-carousel-dots__dot-container.svelte-670fde{height:calc(var(--sc-dot-size) + 14px);width:calc(var(--sc-dot-size) + 10px);display:flex;align-items:center;justify-content:center}")}function Aa(i,t,e){const n=i.slice();return n[5]=t[e],n[7]=e,n}function va(i,t){let e,n,o,s;function r(){return t[3](t[7])}return n=new eg({props:{active:t[1]===t[7]}}),n.$on("click",r),{key:i,first:null,c(){e=T("div"),ee(n.$$.fragment),o=ne(),b(e,"class","sc-carousel-dots__dot-container svelte-670fde"),this.first=e},m(a,l){z(a,e,l),K(n,e,null),V(e,o),s=!0},p(a,l){t=a;const c={};l&3&&(c.active=t[1]===t[7]),n.$set(c)},i(a){s||(P(n.$$.fragment,a),s=!0)},o(a){D(n.$$.fragment,a),s=!1},d(a){a&&M(e),$(n)}}}function ng(i){let t,e=[],n=new Map,o,s=Array(i[0]);const r=a=>a[7];for(let a=0;a<s.length;a+=1){let l=Aa(i,s,a),c=r(l);n.set(c,e[a]=va(c,l))}return{c(){t=T("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","sc-carousel-dots__container svelte-670fde")},m(a,l){z(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,[l]){l&7&&(s=Array(a[0]),ae(),e=Je(e,l,r,1,a,s,n,t,Pt,va,null,Aa),le())},i(a){if(!o){for(let l=0;l<s.length;l+=1)P(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)D(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function ig(i,t,e){const n=vn();let{pagesCount:o=1}=t,{currentPageIndex:s=0}=t;function r(l){n("pageChange",l)}const a=l=>r(l);return i.$$set=l=>{"pagesCount"in l&&e(0,o=l.pagesCount),"currentPageIndex"in l&&e(1,s=l.currentPageIndex)},[o,s,r,a]}class og extends re{constructor(t){super(),se(this,t,ig,ng,oe,{pagesCount:0,currentPageIndex:1},tg)}}const sn="prev",Dt="next";function sg(i){ce(i,"svelte-1bftafx",":root{--sc-arrow-size:2px}.sc-carousel-arrow__circle.svelte-1bftafx{width:20px;height:20px;border-radius:50%;background-color:var(--sc-color-rgb-light-50p);display:flex;align-items:center;justify-content:center;transition:opacity 100ms ease;cursor:pointer;-webkit-tap-highlight-color:transparent}.sc-carousel-arrow__circle.svelte-1bftafx:hover{opacity:0.9}.sc-carousel-arrow__arrow.svelte-1bftafx{border:solid var(--sc-color-hex-dark);border-width:0 var(--sc-arrow-size) var(--sc-arrow-size) 0;padding:var(--sc-arrow-size);position:relative}.sc-carousel-arrow__arrow-next.svelte-1bftafx{transform:rotate(-45deg);left:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__arrow-prev.svelte-1bftafx{transform:rotate(135deg);right:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__circle_disabled.svelte-1bftafx,.sc-carousel-arrow__circle_disabled.svelte-1bftafx:hover{opacity:0.5}")}function rg(i){let t,e,n,o;return{c(){t=T("button"),e=T("i"),b(e,"class","sc-carousel-arrow__arrow svelte-1bftafx"),q(e,"sc-carousel-arrow__arrow-next",i[0]===Dt),q(e,"sc-carousel-arrow__arrow-prev",i[0]===sn),b(t,"class","sc-carousel-button sc-carousel-arrow__circle svelte-1bftafx"),q(t,"sc-carousel-arrow__circle_disabled",i[1])},m(s,r){z(s,t,r),V(t,e),n||(o=Pe(t,"click",i[2]),n=!0)},p(s,[r]){r&1&&q(e,"sc-carousel-arrow__arrow-next",s[0]===Dt),r&1&&q(e,"sc-carousel-arrow__arrow-prev",s[0]===sn),r&2&&q(t,"sc-carousel-arrow__circle_disabled",s[1])},i:U,o:U,d(s){s&&M(t),n=!1,o()}}}function ag(i,t,e){let{direction:n=Dt}=t,{disabled:o=!1}=t;function s(r){bn.call(this,i,r)}return i.$$set=r=>{"direction"in r&&e(0,n=r.direction),"disabled"in r&&e(1,o=r.disabled)},[n,o,s]}class ba extends re{constructor(t){super(),se(this,t,ag,rg,oe,{direction:0,disabled:1},sg)}}function lg(i){ce(i,"svelte-i7yfid",".sc-carousel-progress__indicator.svelte-i7yfid{height:100%;background-color:var(--sc-color-hex-dark-50p)}")}function cg(i){let t;return{c(){t=T("div"),b(t,"class","sc-carousel-progress__indicator svelte-i7yfid"),L(t,"width",i[0]+"%")},m(e,n){z(e,t,n)},p(e,[n]){n&1&&L(t,"width",e[0]+"%")},i:U,o:U,d(e){e&&M(t)}}}const ya=100;function ug(i,t,e){let n,{value:o=0}=t;return i.$$set=s=>{"value"in s&&e(1,o=s.value)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=Math.min(Math.max(o*ya,0),ya))},[n,o]}class dg extends re{constructor(t){super(),se(this,t,ug,cg,oe,{value:1},lg)}}function hg(i,t){i.addEventListener("mousedown",t),i.addEventListener("touchstart",t,{passive:!0})}function fg(i,t){i.removeEventListener("mousedown",t),i.removeEventListener("touchstart",t)}function mg(i,t){i.addEventListener("mouseup",t),i.addEventListener("touchend",t)}function wa(i,t){i.removeEventListener("mouseup",t),i.removeEventListener("touchend",t)}function pg(i,t){i.addEventListener("mousemove",t),i.addEventListener("touchmove",t)}function Ca(i,t){i.removeEventListener("mousemove",t),i.removeEventListener("touchmove",t)}function ho(i){return function(t,e){i.dispatchEvent(new CustomEvent(t,{detail:e}))}}const gg=110,Ag=9,vg=111,bg=20;function fo(i){if("TouchEvent"in window&&i instanceof TouchEvent){const t=i.touches[0];return{x:t?t.clientX:0,y:t?t.clientY:0}}return{x:i.clientX,y:i.clientY}}function yg(i,{thresholdProvider:t}){const e=ho(i);let n,o,s=0,r,a=!1;function l(){return Date.now()-r>=vg&&Math.abs(s)>=bg}function c(d){r=Date.now(),s=0,a=!0;const f=fo(d);n=f.x,o=f.y,e("swipeStart",{x:n,y:o}),pg(window,u),mg(window,h)}function u(d){if(!a)return;const f=fo(d),p=f.x-n,v=f.y-o;n=f.x,o=f.y,e("swipeMove",{x:n,y:o,dx:p,dy:v}),p!==0&&Math.sign(p)!==Math.sign(s)&&(s=0),s+=p,Math.abs(s)>t()&&(e("swipeThresholdReached",{direction:s>0?sn:Dt}),wa(window,h),Ca(window,u))}function h(d){if(wa(window,h),Ca(window,u),a=!1,!l()){e("swipeFailed");return}const f=fo(d);e("swipeEnd",{x:f.x,y:f.y})}return hg(i,c),{destroy(){fg(i,c)}}}function wg(i,t){i.addEventListener("mouseenter",t)}function Cg(i,t){i.removeEventListener("mouseenter",t)}function Pg(i,t){i.addEventListener("mouseleave",t)}function Pa(i,t){i.removeEventListener("mouseleave",t)}function Ig(i){const t=ho(i);function e(){Pg(i,n),t("hovered",{value:!0})}function n(){t("hovered",{value:!1}),Pa(i,n)}return wg(i,e),{destroy(){Cg(i,e),Pa(i,n)}}}const Eg=(i,t)=>{const e=t.x-i.x,n=t.y-i.y;return Math.sqrt(e*e+n*n)};function rn(i,t,e){return Math.max(i,Math.min(t,e))}function kg(i,t){i.addEventListener("touchstart",t,{passive:!0})}function xg(i,t){i.removeEventListener("touchstart",t)}function Dg(i,t){i.addEventListener("touchend",t)}function Ia(i,t){i.removeEventListener("touchend",t)}function Lg(i){const t=ho(i);let e=0,n={x:0,y:0};function o({tapEndedAt:a,tapEndedPos:l}){const c=a-e,u=Eg(n,l);return c<=gg&&u<=Ag}function s(a){e=Date.now();const l=a.touches[0];n={x:l.clientX,y:l.clientY},Dg(i,r)}function r(a){Ia(i,r);const l=a.changedTouches[0];o({tapEndedAt:Date.now(),tapEndedPos:{x:l.clientX,y:l.clientY}})&&t("tapped")}return kg(i,s),{destroy(){xg(i,s),Ia(i,r)}}}function Sg({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:o}){return i===t-e?0:i===0?Ea({particlesCountWithoutClones:t-n,particlesToScroll:o})-1:Math.floor((i-e)/o)}function Mg({currentParticleIndex:i,particlesToScroll:t}){return Math.ceil(i/t)}function zg({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,infinite:o,particlesToScroll:s}){return o?Sg({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:s}):Mg({currentParticleIndex:i,particlesToScroll:s})}function Ea({particlesCountWithoutClones:i,particlesToScroll:t}){return Math.ceil(i/t)}function Tg({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e}){const n=ka({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e});return Math.ceil(i/t)-n}function Bg({infinite:i,particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n}){return i?Ea({particlesCountWithoutClones:t,particlesToScroll:e}):Tg({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n})}function jg({pageIndex:i,clonesCountHead:t,clonesCountTail:e,particlesToScroll:n,particlesCount:o}){return rn(0,Math.min(t+i*n,o-e),o-1)}function Vg({pageIndex:i,particlesToScroll:t,particlesCount:e,particlesToShow:n}){return rn(0,Math.min(i*t,e-n),e-1)}function mo({infinite:i,pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s,particlesToShow:r}){return i?jg({pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s}):Vg({pageIndex:t,particlesToScroll:o,particlesCount:s,particlesToShow:r})}function Qg({particlesContainerChildren:i,particleWidth:t}){for(let e=0;e<i.length;e++)i[e].style.minWidth=`${t}px`,i[e].style.maxWidth=`${t}px`}function ka({particlesToScroll:i,particlesToShow:t,particlesCountWithoutClones:e}){const n=i-t;let o=t;for(;;){const s=e-o-n;if(s<t)return Math.max(s,0);o+=t+n}}function Og(i){return new ResizeObserver(t=>{i({width:t[0].contentRect.width})})}function Rg({clonesCountHead:i,clonesCountTail:t,particlesContainerChildren:e}){const n=[];for(let r=0;r<t;r++)n.push(e[r].cloneNode(!0));const o=[],s=e.length;for(let r=s-1;r>s-1-i;r--)o.push(e[r].cloneNode(!0));return{clonesToAppend:n,clonesToPrepend:o}}function Fg({particlesContainer:i,clonesToAppend:t,clonesToPrepend:e}){for(let n=0;n<t.length;n++)i.append(t[n]);for(let n=0;n<e.length;n++)i.prepend(e[n])}function Gg({infinite:i,particlesToShow:t,partialPageSize:e}){const n=i?{head:Math.ceil(e||t),tail:Math.ceil(t)}:{head:0,tail:0};return ge(F({},n),{total:n.head+n.tail})}const En=(i,t,e)=>{if(i&&i.hasOwnProperty(t))return i[t];if(e===void 0)throw new Error(`Required arg "${t}" was not provided`);return e},po=i=>t=>{i[t]&&i[t]()},Hg=(i,t)=>Gl.default(i,t),Wg=i=>Object.keys(i||{}),Ng=(i,t)=>{const e={};return i.forEach(n=>{e[n]=t[n]}),e},_g=()=>{const i={},t=(e,n)=>{const{watcherName:o,fn:s}=e,{prop:r,value:a}=n;i[o]||(i[o]={deps:{},fn:s}),i[o].deps[r]=a};return{subscribers:i,subscribe(e,n){e&&t(e,n)},notify(e,n){Object.entries(i).forEach(([o,{deps:s,fn:r}])=>{const a=Wg(s);if(a.includes(n)){const l=Ng(a,e);Hg(s,l)||(i[o].deps=l,r())}})}}},Xg=()=>{let i=null;return{targetWatcher(t,e){i={watcherName:t,fn:e},i.fn(),i=null},getTarget(){return i}}};function Yg(i,t){const e=Tn.default(i,"data",{}),n=Tn.default(i,"watch",{}),o=Tn.default(i,"methods",{}),s=Tn.default(t,"onChange",()=>{}),{subscribe:r,notify:a,subscribers:l}=_g(),{targetWatcher:c,getTarget:u}=Xg();let h;const d={},f=()=>({data:h,methods:d});let p=!1;const v=A=>(...y)=>{p=!0;const w=A(...y);return p=!1,w};Object.entries(o).forEach(([A,y])=>{d[A]=v((...w)=>y(f(),...w)),Object.defineProperty(d[A],"name",{value:A})}),h=new Proxy(Fl.default(e),{get(A,y){return u()&&!p&&r(u(),{prop:y,value:A[y]}),Reflect.get(...arguments)},set(A,y,w){return A[y]===w||(Reflect.set(...arguments),u()||(s&&s(y,w),a(h,y))),!0}}),Object.entries(n).forEach(([A,y])=>{c(A,()=>{y(f())})});const g=[h,d];return g._internal={_getSubscribers(){return l}},g}function Ug({pageIndex:i,particlesToShow:t,particlesToScroll:e,particlesCount:n}){const o=i===0?0:t-e,s=i*t-i*o,r=s+Math.max(t,e)-1,a=[];for(let l=s;l<=Math.min(n-1,r);l++)a.push(l);return a}function Jg({infinite:i,pageIndex:t,pagesCount:e,particlesCount:n,particlesToShow:o,particlesToScroll:s}){const r=rn(0,t,e-1);let a=r-1,l=r+1;a=i?a<0?e-1:a:Math.max(0,a),l=i?l>e-1?0:l:Math.min(e-1,l);const c=[...new Set([a,r,l,0,e-1])].sort((h,d)=>h-d),u=c.flatMap(h=>Ug({pageIndex:h,particlesToShow:o,particlesToScroll:s,particlesCount:n}));return{pageIndexes:c,particleIndexes:[...new Set(u)].sort((h,d)=>h-d)}}const Zg=(i,t)=>(i(),setInterval(i,t)),qg=35,xa=1;class Kg{constructor({onProgressValueChange:t}){this._onProgressValueChange=t,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(t){this._autoplayDuration=t}start(t){return new Promise(e=>{this.reset();const n=Math.min(qg,Math.max(this._autoplayDuration,1));let o=-n;this._interval=Zg(()=>N(this,null,function*(){if(this._paused)return;o+=n;const s=o/this._autoplayDuration;this._onProgressValueChange(s),s>xa&&(this.reset(),yield t(),e())}),n)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(xa)}}function $g(i){const t=new Kg({onProgressValueChange:r=>{i("progressValue",1-r)}}),e=Yg({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:r}){r.loaded=Jg({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=zg({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=ka({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:a,tail:l}=Gg({infinite:r.infinite,particlesToShow:r.particlesToShow,partialPageSize:r.partialPageSize});r.clonesCountHead=a,r.clonesCountTail=l,r.clonesCountTotal=a+l},setProgressManagerAutoplayDuration({data:r}){t.setAutoplayDuration(r.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:r,focused:a}}){r&&(a?t.pause():t.resume())},initDuration({data:r}){r.durationMs=r.durationMsInit},applyAutoplay({data:r,methods:{_applyAutoplayIfNeeded:a}}){r.autoplay&&a(r.autoplay)},setPagesCount({data:r}){r.pagesCount=Bg({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=rn(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=rn(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=mo({infinite:r.infinite,pageIndex:r.currentPageIndex-1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_next({data:r}){r.currentParticleIndex=mo({infinite:r.infinite,pageIndex:r.currentPageIndex+1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_moveToParticle({data:r},a){r.currentParticleIndex=rn(0,a,r.particlesCount-1)},toggleFocused({data:r}){r.focused=!r.focused},_applyAutoplayIfNeeded(l){return N(this,arguments,function*({data:r,methods:a}){if(!r.infinite&&(r.autoplayDirection===Dt&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===sn&&r.currentParticleIndex===0)){t.reset();return}if(r.autoplay){const c=()=>po({[Dt]:()=>N(this,null,function*(){return a.showNextPage()}),[sn]:()=>N(this,null,function*(){return a.showPrevPage()})})(r.autoplayDirection);yield t.start(c)}})},_jumpIfNeeded(l){return N(this,arguments,function*({data:r,methods:a}){let c=!1;return r.infinite&&(r.currentParticleIndex===0?(yield a.showParticle(r.particlesCount-r.clonesCountTotal,{animated:!1}),c=!0):r.currentParticleIndex===r.particlesCount-r.clonesCountTail&&(yield a.showParticle(r.clonesCountHead,{animated:!1}),c=!0)),c})},changePage(u,h,d){return N(this,arguments,function*({data:r,methods:a},l,c){if(t.reset(),r.disabled)return;r.disabled=!0,l(),yield a.offsetPage({animated:En(c,"animated",!0)}),r.disabled=!1,!(yield a._jumpIfNeeded())&&a._applyAutoplayIfNeeded()})},showNextPage(c,u){return N(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._next,l))})},showPrevPage(c,u){return N(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._prev,l))})},showParticle(c,u,h){return N(this,arguments,function*({methods:r},a,l){yield r.changePage(()=>r._moveToParticle(a),l)})},_getParticleIndexByPageIndex({data:r},a){return mo({infinite:r.infinite,pageIndex:a,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},showPage(c,u,h){return N(this,arguments,function*({methods:r},a,l){const d=r._getParticleIndexByPageIndex(a);yield r.showParticle(d,l)})},offsetPage({data:r},a){const l=En(a,"animated",!0);return new Promise(c=>{r.durationMs=l?r.durationMsInit:0,r.offset=-r.currentParticleIndex*r.particleWidth,setTimeout(()=>{c()},r.durationMs)})}}},{onChange:i}),[n,o]=e;return[{data:n,progressManager:t},o,e._internal]}function e0(i){ce(i,"svelte-sme1z4",":root{--sc-color-rgb-light-50p:rgba(93, 93, 93, 0.5);--sc-color-rgb-light:#5d5d5d;--sc-color-hex-dark-50p:rgba(30, 30, 30, 0.5);--sc-color-hex-dark:#1e1e1e}.sc-carousel__carousel-container.svelte-sme1z4{display:flex;width:100%;flex-direction:column;align-items:center}.sc-carousel__content-container.svelte-sme1z4{position:relative;display:flex;width:100%}.sc-carousel__pages-window.svelte-sme1z4{flex:1;display:flex;overflow:hidden;box-sizing:border-box;position:relative}.sc-carousel__pages-container.svelte-sme1z4{width:100%;display:flex;transition-property:transform}.sc-carousel__arrow-container.svelte-sme1z4{padding:5px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.sc-carousel-progress__container.svelte-sme1z4{width:100%;height:5px;background-color:var(--sc-color-rgb-light-50p);position:absolute;bottom:0}.sc-carousel-button{all:unset;cursor:pointer}.sc-carousel-button:focus{outline:5px auto}")}const t0=i=>({currentPageIndex:i[0]&32,pagesCount:i[0]&1024,loaded:i[0]&64}),Da=i=>({currentPageIndex:i[5],pagesCount:i[10],showPage:i[15],loaded:i[6]}),n0=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),La=i=>({showNextPage:i[14].showNextPage,loaded:i[6],currentPageIndex:i[5]}),i0=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),Sa=i=>({loaded:i[6],currentPageIndex:i[5]}),o0=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),Ma=i=>({showPrevPage:i[14].showPrevPage,loaded:i[6],currentPageIndex:i[5]});function za(i){let t;const e=i[37].prev,n=Xt(e,i,i[36],Ma),o=n||s0(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&96|r[1]&32)&&Ut(n,e,s,s[36],t?Yt(e,s[36],r,o0):Jt(s[36]),Ma):o&&o.p&&(!t||r[0]&36)&&o.p(s,t?r:[-1,-1])},i(s){t||(P(o,s),t=!0)},o(s){D(o,s),t=!1},d(s){o&&o.d(s)}}}function s0(i){let t,e,n;return e=new ba({props:{direction:"prev",disabled:!i[2]&&i[5]===0}}),e.$on("click",i[23]),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s[0]&36&&(r.disabled=!o[2]&&o[5]===0),e.$set(r)},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function Ta(i){let t,e,n;return e=new dg({props:{value:i[7]}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","sc-carousel-progress__container svelte-sme1z4")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s[0]&128&&(r.value=o[7]),e.$set(r)},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function Ba(i){let t;const e=i[37].next,n=Xt(e,i,i[36],La),o=n||r0(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&96|r[1]&32)&&Ut(n,e,s,s[36],t?Yt(e,s[36],r,n0):Jt(s[36]),La):o&&o.p&&(!t||r[0]&1060)&&o.p(s,t?r:[-1,-1])},i(s){t||(P(o,s),t=!0)},o(s){D(o,s),t=!1},d(s){o&&o.d(s)}}}function r0(i){let t,e,n;return e=new ba({props:{direction:"next",disabled:!i[2]&&i[5]===i[10]-1}}),e.$on("click",i[14].showNextPage),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s[0]&1060&&(r.disabled=!o[2]&&o[5]===o[10]-1),e.$set(r)},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function ja(i){let t;const e=i[37].dots,n=Xt(e,i,i[36],Da),o=n||a0(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&1120|r[1]&32)&&Ut(n,e,s,s[36],t?Yt(e,s[36],r,t0):Jt(s[36]),Da):o&&o.p&&(!t||r[0]&1056)&&o.p(s,t?r:[-1,-1])},i(s){t||(P(o,s),t=!0)},o(s){D(o,s),t=!1},d(s){o&&o.d(s)}}}function a0(i){let t,e;return t=new og({props:{pagesCount:i[10],currentPageIndex:i[5]}}),t.$on("pageChange",i[41]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o[0]&1024&&(s.pagesCount=n[10]),o[0]&32&&(s.currentPageIndex=n[5]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function l0(i){let t,e,n,o,s,r,a,l,c,u,h,d,f=i[1]&&za(i);const p=i[37].default,v=Xt(p,i,i[36],Sa);let g=i[3]&&Ta(i),A=i[1]&&Ba(i),y=i[4]&&ja(i);return{c(){t=T("div"),e=T("div"),f&&f.c(),n=ne(),o=T("div"),s=T("div"),v&&v.c(),a=ne(),g&&g.c(),l=ne(),A&&A.c(),c=ne(),y&&y.c(),b(s,"class","sc-carousel__pages-container svelte-sme1z4"),L(s,"transform","translateX("+i[8]+"px)"),L(s,"transition-duration",i[9]+"ms"),L(s,"transition-timing-function",i[0]),b(o,"class","sc-carousel__pages-window svelte-sme1z4"),b(e,"class","sc-carousel__content-container svelte-sme1z4"),b(t,"class","sc-carousel__carousel-container svelte-sme1z4")},m(w,C){z(w,t,C),V(t,e),f&&f.m(e,null),V(e,n),V(e,o),V(o,s),v&&v.m(s,null),i[39](s),V(o,a),g&&g.m(o,null),i[40](o),V(e,l),A&&A.m(e,null),V(t,c),y&&y.m(t,null),u=!0,h||(d=[Si(r=yg.call(null,s,{thresholdProvider:i[38]})),Pe(s,"swipeStart",i[16]),Pe(s,"swipeMove",i[18]),Pe(s,"swipeEnd",i[19]),Pe(s,"swipeFailed",i[20]),Pe(s,"swipeThresholdReached",i[17]),Si(Ig.call(null,o)),Pe(o,"hovered",i[21]),Si(Lg.call(null,o)),Pe(o,"tapped",i[22])],h=!0)},p(w,C){w[1]?f?(f.p(w,C),C[0]&2&&P(f,1)):(f=za(w),f.c(),P(f,1),f.m(e,n)):f&&(ae(),D(f,1,1,()=>{f=null}),le()),v&&v.p&&(!u||C[0]&96|C[1]&32)&&Ut(v,p,w,w[36],u?Yt(p,w[36],C,i0):Jt(w[36]),Sa),(!u||C[0]&256)&&L(s,"transform","translateX("+w[8]+"px)"),(!u||C[0]&512)&&L(s,"transition-duration",w[9]+"ms"),(!u||C[0]&1)&&L(s,"transition-timing-function",w[0]),r&&_t(r.update)&&C[0]&2048&&r.update.call(null,{thresholdProvider:w[38]}),w[3]?g?(g.p(w,C),C[0]&8&&P(g,1)):(g=Ta(w),g.c(),P(g,1),g.m(o,null)):g&&(ae(),D(g,1,1,()=>{g=null}),le()),w[1]?A?(A.p(w,C),C[0]&2&&P(A,1)):(A=Ba(w),A.c(),P(A,1),A.m(e,null)):A&&(ae(),D(A,1,1,()=>{A=null}),le()),w[4]?y?(y.p(w,C),C[0]&16&&P(y,1)):(y=ja(w),y.c(),P(y,1),y.m(t,null)):y&&(ae(),D(y,1,1,()=>{y=null}),le())},i(w){u||(P(f),P(v,w),P(g),P(A),P(y),u=!0)},o(w){D(f),D(v,w),D(g),D(A),D(y),u=!1},d(w){w&&M(t),f&&f.d(),v&&v.d(w),i[39](null),g&&g.d(),i[40](null),A&&A.d(),y&&y.d(),h=!1,ut(d)}}}function c0(i,t,e){let{$$slots:n={},$$scope:o}=t,s=[],r,a,l=0,c=0,u=1;const[{data:h,progressManager:d},f,p]=$g((ie,ve)=>{po({currentPageIndex:()=>e(5,r=ve),progressValue:()=>e(7,a=ve),offset:()=>e(8,l=ve),durationMs:()=>e(9,c=ve),pagesCount:()=>e(10,u=ve),loaded:()=>e(6,s=ve)})(ie)}),v=vn();let{timingFunction:g="ease-in-out"}=t,{arrows:A=!0}=t,{infinite:y=!0}=t,{initialPageIndex:w=0}=t,{duration:C=500}=t,{autoplay:x=!1}=t,{autoplayDuration:E=3e3}=t,{autoplayDirection:S=Dt}=t,{pauseOnFocus:k=!1}=t,{autoplayProgressVisible:j=!1}=t,{dots:_=!0}=t,{swiping:G=!0}=t,{particlesToShow:Z=1}=t,{particlesToScroll:Q=1}=t;function B(ie,ve){return N(this,null,function*(){const Ge=En(ve,"animated",!0);if(typeof ie!="number")throw new Error("pageIndex should be a number");yield f.showPage(ie,{animated:Ge})})}function R(ie){return N(this,null,function*(){const ve=En(ie,"animated",!0);yield f.showPrevPage({animated:ve})})}function W(ie){return N(this,null,function*(){const ve=En(ie,"animated",!0);yield f.showNextPage({animated:ve})})}let H=0,te,X;const J=Og(({width:ie})=>{e(11,H=ie),h.particleWidth=H/h.particlesToShow,Qg({particlesContainerChildren:X.children,particleWidth:h.particleWidth}),f.offsetPage({animated:!1})});function he(){const{clonesToAppend:ie,clonesToPrepend:ve}=Rg({clonesCountHead:h.clonesCountHead,clonesCountTail:h.clonesCountTail,particlesContainerChildren:X.children});Fg({particlesContainer:X,clonesToAppend:ie,clonesToPrepend:ve})}Ue(()=>{N(this,null,function*(){yield ts(),X&&te&&(h.particlesCountWithoutClones=X.children.length,yield ts(),h.infinite&&he(),h.particlesCount=X.children.length,f.showPage(w,{animated:!1}),J.observe(te))})}),wt(()=>{J.disconnect(),d.reset()});function fe(ie){return N(this,null,function*(){yield f.showPage(ie,{animated:!0})})}function Ae(){!G||(h.durationMs=0)}function xe(ie){return N(this,null,function*(){!G||(yield po({[Dt]:f.showNextPage,[sn]:f.showPrevPage})(ie.detail.direction))})}function Te(ie){!G||(h.offset+=ie.detail.dx)}function Fe(){!G||f.showParticle(h.currentParticleIndex)}function ue(){return N(this,null,function*(){!G||(yield f.offsetPage({animated:!0}))})}function we(ie){h.focused=ie.detail.value}function Ee(){f.toggleFocused()}function de(){f.showPrevPage()}const Ke=()=>H/3;function mt(ie){je[ie?"unshift":"push"](()=>{X=ie,e(13,X)})}function ye(ie){je[ie?"unshift":"push"](()=>{te=ie,e(12,te)})}const it=ie=>fe(ie.detail);return i.$$set=ie=>{"timingFunction"in ie&&e(0,g=ie.timingFunction),"arrows"in ie&&e(1,A=ie.arrows),"infinite"in ie&&e(2,y=ie.infinite),"initialPageIndex"in ie&&e(24,w=ie.initialPageIndex),"duration"in ie&&e(25,C=ie.duration),"autoplay"in ie&&e(26,x=ie.autoplay),"autoplayDuration"in ie&&e(27,E=ie.autoplayDuration),"autoplayDirection"in ie&&e(28,S=ie.autoplayDirection),"pauseOnFocus"in ie&&e(29,k=ie.pauseOnFocus),"autoplayProgressVisible"in ie&&e(3,j=ie.autoplayProgressVisible),"dots"in ie&&e(4,_=ie.dots),"swiping"in ie&&e(30,G=ie.swiping),"particlesToShow"in ie&&e(31,Z=ie.particlesToShow),"particlesToScroll"in ie&&e(32,Q=ie.particlesToScroll),"$$scope"in ie&&e(36,o=ie.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&32&&v("pageChange",r),i.$$.dirty[0]&4&&(h.infinite=y),i.$$.dirty[0]&33554432&&(h.durationMsInit=C),i.$$.dirty[0]&67108864&&(h.autoplay=x),i.$$.dirty[0]&134217728&&(h.autoplayDuration=E),i.$$.dirty[0]&268435456&&(h.autoplayDirection=S),i.$$.dirty[0]&536870912&&(h.pauseOnFocus=k),i.$$.dirty[1]&1&&(h.particlesToShowInit=Z),i.$$.dirty[1]&2&&(h.particlesToScrollInit=Q)},[g,A,y,j,_,r,s,a,l,c,u,H,te,X,f,fe,Ae,xe,Te,Fe,ue,we,Ee,de,w,C,x,E,S,k,G,Z,Q,B,R,W,o,n,Ke,mt,ye,it]}class u0 extends re{constructor(t){super(),se(this,t,c0,l0,oe,{timingFunction:0,arrows:1,infinite:2,initialPageIndex:24,duration:25,autoplay:26,autoplayDuration:27,autoplayDirection:28,pauseOnFocus:29,autoplayProgressVisible:3,dots:4,swiping:30,particlesToShow:31,particlesToScroll:32,goTo:33,goToPrev:34,goToNext:35},e0,[-1,-1])}get goTo(){return this.$$.ctx[33]}get goToPrev(){return this.$$.ctx[34]}get goToNext(){return this.$$.ctx[35]}}function d0(i){ce(i,"svelte-159ski6",".media-item.svelte-159ski6.svelte-159ski6{position:relative;height:100%}.media-content.svelte-159ski6.svelte-159ski6{position:relative;pointer-events:auto;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.media-content.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none}.video-icon.svelte-159ski6.svelte-159ski6{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-159ski6.svelte-159ski6{display:none;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none;display:block}.video-icon.svelte-159ski6.svelte-159ski6{pointer-events:auto}.video-icon.large.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem}.video-icon.small.svelte-159ski6.svelte-159ski6{width:1.75rem;height:1.75rem}.video-icon.svelte-159ski6 .video-icon-img.svelte-159ski6{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-159ski6 .video-icon-img.canPlay.svelte-159ski6{cursor:pointer}")}function Va(i){let t;function e(s,r){if(s[2].type==="Image")return f0;if(s[2].type==="Video")return h0}let n=e(i),o=n&&n(i);return{c(){t=T("div"),o&&o.c(),b(t,"class","media-item svelte-159ski6"),b(t,"draggable","false")},m(s,r){z(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&&M(t),o&&o.d()}}}function h0(i){let t,e,n,o,s,r;function a(u,h){return u[7]&&u[2].videoCoverUrl?p0:m0}let l=a(i),c=l(i);return{c(){c.c(),t=ne(),e=T("div"),n=T("div"),o=T("div"),b(o,"class","video-icon-img svelte-159ski6"),L(o,"background-image","url("+i[18]()+")"),q(o,"canPlay",i[5]),b(n,"class","video-icon svelte-159ski6"),q(n,"large",i[4]==="large"),q(n,"small",i[4]==="small"),b(e,"class","video-play-button-container svelte-159ski6"),q(e,"showPlayButton",i[9])},m(u,h){c.m(u,h),z(u,t,h),z(u,e,h),V(e,n),V(n,o),s||(r=Pe(o,"click",i[19]),s=!0)},p(u,h){l===(l=a(u))&&c?c.p(u,h):(c.d(1),c=l(u),c&&(c.c(),c.m(t.parentNode,t))),h&8&&L(o,"background-image","url("+u[18]()+")"),h&32&&q(o,"canPlay",u[5]),h&16&&q(n,"large",u[4]==="large"),h&16&&q(n,"small",u[4]==="small"),h&512&&q(e,"showPlayButton",u[9])},d(u){c.d(u),u&&M(t),u&&M(e),s=!1,r()}}}function f0(i){let t,e,n,o;return{c(){t=T("img"),b(t,"class","media-content svelte-159ski6"),b(t,"style",e=`object-fit: ${i[6]};`),Xe(t.src,n=i[2].url)||b(t,"src",n),b(t,"alt",o=i[2].name),b(t,"draggable",!1)},m(s,r){z(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&b(t,"style",e),r&4&&!Xe(t.src,n=s[2].url)&&b(t,"src",n),r&4&&o!==(o=s[2].name)&&b(t,"alt",o)},d(s){s&&M(t)}}}function m0(i){let t,e,n,o,s,r,a;return{c(){t=T("video"),b(t,"class","media-content svelte-159ski6"),b(t,"style",e=`object-fit: ${i[6]};`),Xe(t.src,n=i[2].videoCoverUrl?i[2].url:i[2].url+"#t=0.1")||b(t,"src",n),b(t,"poster",o=i[2].videoCoverUrl),b(t,"preload",s=i[2].videoCoverUrl?"none":"auto"),b(t,"disablepictureinpicture",""),t.playsInline=!0,b(t,"paused",""),t.muted=!0,b(t,"draggable",!1),t.loop=!1,b(t,"crossorigin",""),t.controls=!1,q(t,"showPlayButton",i[9])},m(l,c){z(l,t,c),i[17](t),r||(a=[Pe(t,"play",i[14]),Pe(t,"pause",i[15]),Pe(t,"click",i[16])],r=!0)},p(l,c){c&64&&e!==(e=`object-fit: ${l[6]};`)&&b(t,"style",e),c&4&&!Xe(t.src,n=l[2].videoCoverUrl?l[2].url:l[2].url+"#t=0.1")&&b(t,"src",n),c&4&&o!==(o=l[2].videoCoverUrl)&&b(t,"poster",o),c&4&&s!==(s=l[2].videoCoverUrl?"none":"auto")&&b(t,"preload",s),c&512&&q(t,"showPlayButton",l[9])},d(l){l&&M(t),i[17](null),r=!1,ut(a)}}}function p0(i){let t,e,n,o;return{c(){t=T("img"),b(t,"class","media-content svelte-159ski6"),b(t,"style",e=`object-fit: ${i[6]};`),Xe(t.src,n=i[2].videoCoverUrl)||b(t,"src",n),b(t,"alt",o=i[2].name),b(t,"draggable",!1)},m(s,r){z(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&b(t,"style",e),r&4&&!Xe(t.src,n=s[2].videoCoverUrl)&&b(t,"src",n),r&4&&o!==(o=s[2].name)&&b(t,"alt",o)},d(s){s&&M(t)}}}function g0(i){let t,e=i[2]&&Va(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[2]?e?e.p(n,o):(e=Va(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:U,o:U,d(n){e&&e.d(n),n&&M(t)}}}function A0(i,t,e){let n,{mediaInstance:o={paused:!0}}=t,{tag:s}=t,{media:r}=t,{playButtonIfNeed:a="withoutText"}=t,{playButtonSizeIfNeed:l="small"}=t,{canPlay:c=!0}=t,{objectFit:u="fill"}=t,{disableVideoIfHavePoster:h=!1}=t,d,f=!0,p=!1;function v(){e(12,p=(r==null?void 0:r.type)==="Video"&&Boolean(r.videoCoverUrl))}const g=Mt("mediaStore"),A=Mt("hooks"),y=()=>{p||(d==null||d.play(),d==null||d.pause(),e(12,p=!0))};A.on("loadVideoFirstFrame",y),Ue(()=>{g.subscribe(({currentMediaElement:j})=>{j!==d&&(d==null||d.pause())})});const w=j=>{e(9,f=!1),e(0,o.paused=!1,o),g.set({currentMediaElement:d}),A.emit("playStateChange",{event:j,state:"playing",tag:s,mediaInstance:d})},C=j=>{e(9,f=!0),e(0,o.paused=!0,o),A.emit("playStateChange",{event:j,state:"paused",tag:s,mediaInstance:d})},x=j=>{d&&d.pause()};function E(j){je[j?"unshift":"push"](()=>{d=j,e(8,d)})}const S=()=>a==="withText"?Ap:a==="withoutText"?vp:a,k=j=>{!c||d&&(e(8,d.muted=!1,d),d.play())};return i.$$set=j=>{"mediaInstance"in j&&e(0,o=j.mediaInstance),"tag"in j&&e(1,s=j.tag),"media"in j&&e(2,r=j.media),"playButtonIfNeed"in j&&e(3,a=j.playButtonIfNeed),"playButtonSizeIfNeed"in j&&e(4,l=j.playButtonSizeIfNeed),"canPlay"in j&&e(5,c=j.canPlay),"objectFit"in j&&e(6,u=j.objectFit),"disableVideoIfHavePoster"in j&&e(7,h=j.disableVideoIfHavePoster)},i.$$.update=()=>{if(i.$$.dirty&4&&e(13,n=r==null?void 0:r.url),i.$$.dirty&8192&&Boolean(n)&&v(),i.$$.dirty&256&&d&&e(9,f=d.paused),i.$$.dirty&4356&&(r==null?void 0:r.type)==="Video"&&!p){const j=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,G=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&j;d&&G&&d.paused&&(document.removeEventListener("WeixinJSBridgeReady",y),document.removeEventListener("touchstart",y),document.removeEventListener("click",y),document.addEventListener("WeixinJSBridgeReady",y),document.addEventListener("touchstart",y),document.addEventListener("click",y))}},[o,s,r,a,l,c,u,h,d,f,g,A,p,n,w,C,x,E,S,k]}class Qa extends re{constructor(t){super(),se(this,t,A0,g0,oe,{mediaInstance:0,tag:1,media:2,playButtonIfNeed:3,playButtonSizeIfNeed:4,canPlay:5,objectFit:6,disableVideoIfHavePoster:7},d0)}}function v0(i){ce(i,"svelte-1mrbqlg",".media-list-wrapper.svelte-1mrbqlg.svelte-1mrbqlg{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg{position:relative;pointer-events:auto;height:100%;left:50%;top:50%;transform:translate(-50%, -50%)}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__carousel-container,.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__content-container{height:100%}")}function Oa(i,t,e){const n=i.slice();return n[21]=t[e],n[22]=t,n[23]=e,n}function Ra(i){let t,e,n,o,s,r,a;const l=[y0,b0],c=[];function u(h,d){return h[12]?0:1}return n=u(i),o=c[n]=l[n](i),{c(){t=T("div"),e=T("div"),o.c(),b(e,"class","media-list svelte-1mrbqlg"),q(e,"carouselEnabled",i[12]),b(t,"class","media-list-wrapper svelte-1mrbqlg"),q(t,"unfolded",i[5])},m(h,d){z(h,t,d),V(t,e),c[n].m(e,null),a=!0},p(h,d){i=h;let f=n;n=u(i),n===f?c[n].p(i,d):(ae(),D(c[f],1,1,()=>{c[f]=null}),le(),o=c[n],o?o.p(i,d):(o=c[n]=l[n](i),o.c()),P(o,1),o.m(e,null)),(!a||d&4096)&&q(e,"carouselEnabled",i[12]),(!a||d&32)&&q(t,"unfolded",i[5])},i(h){a||(P(o),h&&ze(()=>{r&&r.end(1),s=zt(t,cs,i[6]?{y:4,duration:i[4],delay:i[2],easing:vt}:void 0),s.start()}),a=!0)},o(h){D(o),s&&s.invalidate(),h&&(r=qt(t,cs,i[6]?{y:4,duration:i[4],delay:i[3],easing:vt}:void 0)),a=!1},d(h){h&&M(t),c[n].d(),h&&r&&r.end()}}}function b0(i){let t,e;const n=[{media:i[1][0]},i[7],{tag:i[0]}];let o={};for(let s=0;s<n.length;s+=1)o=Be(o,n[s]);return t=new Qa({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&131?Oe(n,[r&2&&{media:s[1][0]},r&128&&ss(s[7]),r&1&&{tag:s[0]}]):{};t.$set(a)},i(s){e||(P(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function y0(i){let t,e,n={dots:!1,arrows:!1,$$slots:{default:[w0]},$$scope:{ctx:i}};return t=new u0({props:n}),i[17](t),t.$on("pageChange",i[18]),{c(){ee(t.$$.fragment)},m(o,s){K(t,o,s),e=!0},p(o,s){const r={};s&16778625&&(r.$$scope={dirty:s,ctx:o}),t.$set(r)},i(o){e||(P(t.$$.fragment,o),e=!0)},o(o){D(t.$$.fragment,o),e=!1},d(o){i[17](null),$(t,o)}}}function Fa(i){let t,e,n;const o=[i[7],{media:i[21]},{tag:i[0]}];function s(a){i[16](a,i[23])}let r={};for(let a=0;a<o.length;a+=1)r=Be(r,o[a]);return i[8][i[23]]!==void 0&&(r.mediaInstance=i[8][i[23]]),t=new Qa({props:r}),je.push(()=>Lc(t,"mediaInstance",s)),{c(){ee(t.$$.fragment)},m(a,l){K(t,a,l),n=!0},p(a,l){i=a;const c=l&1153?Oe(o,[l&128&&ss(i[7]),l&1024&&{media:i[21]},l&1&&{tag:i[0]}]):{};!e&&l&256&&(e=!0,c.mediaInstance=i[8][i[23]],Ec(()=>e=!1)),t.$set(c)},i(a){n||(P(t.$$.fragment,a),n=!0)},o(a){D(t.$$.fragment,a),n=!1},d(a){$(t,a)}}}function w0(i){let t,e,n=i[10],o=[];for(let r=0;r<n.length;r+=1)o[r]=Fa(Oa(i,n,r));const s=r=>D(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=pe()},m(r,a){for(let l=0;l<o.length;l+=1)o[l].m(r,a);z(r,t,a),e=!0},p(r,a){if(a&1409){n=r[10];let l;for(l=0;l<n.length;l+=1){const c=Oa(r,n,l);o[l]?(o[l].p(c,a),P(o[l],1)):(o[l]=Fa(c),o[l].c(),P(o[l],1),o[l].m(t.parentNode,t))}for(ae(),l=n.length;l<o.length;l+=1)s(l);le()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)P(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)D(o[a]);e=!1},d(r){dt(o,r),r&&M(t)}}}function C0(i){let t,e,n=i[5]&&Ra(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[5]?n?(n.p(o,s),s&32&&P(n,1)):(n=Ra(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function P0(i,t,e){let n,o,s,r,{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:u=0}=t,{duration:h=0}=t,{unfolded:d=!0}=t,{animation:f=!0}=t,{mediaItemConfig:p}=t,{enableCarousel:v=!0}=t,{autoplayConfig:g={autoplay:!0,autoplayVideo:!1}}=t,A=[],y,w=null;const C=Mt("mediaStore");Ue(()=>{w=setInterval(()=>{r&&(y==null||y.goToNext())},3e3)}),wt(()=>{clearInterval(w)});function x(k,j){i.$$.not_equal(A[j],k)&&(A[j]=k,e(8,A))}function E(k){je[k?"unshift":"push"](()=>{y=k,e(11,y)})}const S=k=>{n||C.set({currentMediaElement:null})};return i.$$set=k=>{"tag"in k&&e(0,a=k.tag),"mediaData"in k&&e(1,l=k.mediaData),"inDelay"in k&&e(2,c=k.inDelay),"outDelay"in k&&e(3,u=k.outDelay),"duration"in k&&e(4,h=k.duration),"unfolded"in k&&e(5,d=k.unfolded),"animation"in k&&e(6,f=k.animation),"mediaItemConfig"in k&&e(7,p=k.mediaItemConfig),"enableCarousel"in k&&e(14,v=k.enableCarousel),"autoplayConfig"in k&&e(15,g=k.autoplayConfig)},i.$$.update=()=>{i.$$.dirty&256&&e(9,n=A.every(k=>k.paused)),i.$$.dirty&16386&&e(12,o=v&&(l==null?void 0:l.length)>1),i.$$.dirty&2&&e(10,s=l),i.$$.dirty&34304&&(r=s.length>1&&g.autoplay&&n)},[a,l,c,u,h,d,f,p,A,n,s,y,o,C,v,g,x,E,S]}class Ga extends re{constructor(t){super(),se(this,t,P0,C0,oe,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:14,autoplayConfig:15},v0)}}function I0(i){ce(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 Ha(i){let t,e,n,o,s,r,a,l;t=new nt({props:{visible:i[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new Zp({props:{unfolded:i[3],outDelay:400}});let c=i[2]&&Wa(i),u=i[1]&&Na(i);return{c(){ee(t.$$.fragment),e=ne(),n=T("div"),ee(o.$$.fragment),s=ne(),c&&c.c(),r=ne(),u&&u.c(),a=pe(),b(n,"class","line svelte-1f7m1lj")},m(h,d){K(t,h,d),z(h,e,d),z(h,n,d),K(o,n,null),z(h,s,d),c&&c.m(h,d),z(h,r,d),u&&u.m(h,d),z(h,a,d),l=!0},p(h,d){const f={};d&8&&(f.visible=h[3]),t.$set(f);const p={};d&8&&(p.unfolded=h[3]),o.$set(p),h[2]?c?(c.p(h,d),d&4&&P(c,1)):(c=Wa(h),c.c(),P(c,1),c.m(r.parentNode,r)):c&&(ae(),D(c,1,1,()=>{c=null}),le()),h[1]?u?(u.p(h,d),d&2&&P(u,1)):(u=Na(h),u.c(),P(u,1),u.m(a.parentNode,a)):u&&(ae(),D(u,1,1,()=>{u=null}),le())},i(h){l||(P(t.$$.fragment,h),P(o.$$.fragment,h),P(c),P(u),l=!0)},o(h){D(t.$$.fragment,h),D(o.$$.fragment,h),D(c),D(u),l=!1},d(h){$(t,h),h&&M(e),h&&M(n),$(o),h&&M(s),c&&c.d(h),h&&M(r),u&&u.d(h),h&&M(a)}}}function Wa(i){let t,e,n;return e=new ra({props:{unfolded:i[3],content:i[2],inDelay:500}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","text svelte-1f7m1lj")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&4&&(r.content=o[2]),e.$set(r)},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function Na(i){let t,e,n;return e=new Ga({props:{autoplayConfig:{autoplay:!1},unfolded:i[3],mediaData:i[1],tag:i[0],enableCarousel:!1,mediaItemConfig:{canPlay:!1,playButtonSizeIfNeed:"small",disableVideoIfHavePoster:!0},inDelay:500,duration:500}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&2&&(r.mediaData=o[1]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function E0(i){let t,e,n=i[0].state&&Ha(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&P(n,1)):(n=Ha(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function k0(i,t,e){let n,o,s,r,{tag:a}=t;return i.$$set=l=>{"tag"in l&&e(0,a=l.tag)},i.$$.update=()=>{var l,c,u;i.$$.dirty&1&&e(3,n=a.state?a.state.unfolded:!1),i.$$.dirty&1&&e(4,o=(c=(l=a.data.title)!=null?l:a.data.text)!=null?c:""),i.$$.dirty&16&&e(2,s=((u=o.length)!=null?u:0)>7?o.substring(0,6)+"...":o),i.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,s,n,o]}class x0 extends re{constructor(t){super(),se(this,t,k0,E0,oe,{tag:0},I0)}}class go{constructor(t=0,e=0){m(this,"min");m(this,"max");m(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 D0{constructor(t,e){m(this,"min");m(this,"max");m(this,"xInterval");m(this,"yInterval");m(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new go(this.min.x,this.max.x),this.yInterval=new go(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 Ai(i,t,e){const n=i[t],o=i[e];!n||!o||(i[t]=o,i[e]=n)}function L0(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;Ai(i,a*4+0,l*4+0),Ai(i,a*4+1,l*4+1),Ai(i,a*4+2,l*4+2),Ai(i,a*4+3,l*4+3)}}}class _a{constructor(t,e){m(this,"width");m(this,"height");m(this,"containerDom");m(this,"hooks",new me.Subscribe);m(this,"canvas",document.createElement("canvas"));m(this,"five");m(this,"scale");m(this,"config");m(this,"offset",{x:0,y:0});m(this,"context");m(this,"renderCenter",new I.Vector3);m(this,"hammer");m(this,"state",{enabled:!1});m(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)`});m(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 hn.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 I.Vector2),a=1,l=n/t,c=o/t,u=a*t,h=(s.x+1)/2*r.x,d=(s.y+1)/2*r.y,f=this.five.getPixels(h-l/2,d-l/2,l,c,u),p=Math.floor(n*a),v=Math.floor(o*a);L0(f,p,v);const g=new ImageData(p,v);g.data.set(f),e.putImageData(g,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 S0(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new I.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function Xa(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new I.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function M0(i,t){const e=i.getElement();if(!e)return;const n=Xa(t,e),o=new I.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 I.Vector2().fromArray([o,s]),a=new I.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const T0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkMEbgj7FKFpLA4QS+fPnyx23czJc//V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EJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",B0=`
|
|
547
547
|
varying vec2 vUv;
|
|
548
548
|
void main() {
|
|
549
549
|
vUv = uv;
|
|
@@ -558,5 +558,5 @@ 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 V0(){const i=new I.PlaneGeometry(.4,.4),t=T0,e=new I.TextureLoader().load(t);e.encoding=I.sRGBEncoding;const n=new I.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new I.Mesh(i,n)}function Q0(){const i=new I.CurvePath;i.add(new I.LineCurve3(new I.Vector3(0,0,0),new I.Vector3(0,0,.1)));const t=new I.TubeGeometry(i,8,.003),e=new I.ShaderMaterial({vertexShader:B0,fragmentShader:j0,depthTest:!1,transparent:!0});return new I.Mesh(t,e)}function O0(){const i=new I.SphereGeometry(.01,20,20),t=new I.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:I.DoubleSide}),e=new I.Mesh(i,t);return e.position.set(0,0,.1),e}class Ya extends I.Object3D{constructor(){super();m(this,"planeMesh");m(this,"lineMesh");m(this,"ballMesh");this.planeMesh=V0(),this.lineMesh=Q0(),this.ballMesh=O0(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new I.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 Ua{constructor(t){m(this,"five");m(this,"contentElement",document.createElement("div"));m(this,"animeIns");m(this,"container");m(this,"css3DObject");m(this,"disposeCss3DObject");m(this,"state",{enabled:!1});this.five=t;const n=.4/2,s=Nt(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new I.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(${fr})`,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 I.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 Zi({progress:0}).to({progress:[1,0]}).duration(500).easing(zn.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class R0{constructor(t,e){m(this,"five");m(this,"hooks",new me.Subscribe);m(this,"magnifier",null);m(this,"pointHelper",null);m(this,"pointDomHelper",null);m(this,"contentDom",document.createElement("div"));m(this,"state",{enabled:!1});m(this,"group",new I.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 Ya:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new Ua(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 F0=Object.freeze(Object.defineProperty({__proto__:null,Interval:go,Rectangle:D0,Magnifier:_a,getCoordsFromClient:S0,getCoordsFromElement:Xa,getRaycasterFromFivePointer:M0,getIntersectFromRelativePosition:z0,PointHelper:Ya,PointDomHelper:Ua,FivePointSelector:R0,isNil:Gm,notNil:qe,BetterTween:Zi,tweenProgress:_s,nextFrame:ni,requestAnimationFrameInterval:ii,getFrameTime:dh},Symbol.toStringTag,{value:"Module"}));function G0(i){ce(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 Ja(i,t,e){const n=i.slice();return n[0]=t[e],n}function Za(i,t,e){const n=i.slice();return n[0]=t[e],n}function qa(i){let t,e=i[0]+"",n;return{c(){t=T("div"),n=De(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){z(o,t,s),V(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Me(n,e)},d(o){o&&M(t)}}}function Ka(i){let t,e=i[0]&&qa(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=qa(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&M(t)}}}function $a(i){let t,e=i[0]+"",n;return{c(){t=T("div"),n=De(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){z(o,t,s),V(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Me(n,e)},d(o){o&&M(t)}}}function el(i){let t,e=i[0]&&$a(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=$a(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&M(t)}}}function tl(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&nl(i);return{c(){t=T("div"),e=T("span"),o=De(n),s=ne(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){z(a,t,l),V(t,e),V(e,o),V(t,s),r&&r.m(t,null)},p(a,l){l&4&&n!==(n=a[2].price.value+"")&&Me(o,n),a[2].price.unit?r?r.p(a,l):(r=nl(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&M(t),r&&r.d()}}}function nl(i){let t,e=i[2].price.unit+"",n;return{c(){t=T("span"),n=De(e),b(t,"class","unit svelte-8mby9k")},m(o,s){z(o,t,s),V(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&Me(n,e)},d(o){o&&M(t)}}}function il(i){let t,e=i[2].highlightText+"",n;return{c(){t=T("div"),n=De(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){z(o,t,s),V(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&Me(n,e)},d(o){o&&M(t)}}}function H0(i){var Z,Q;let t,e,n,o,s,r,a,l,c,u,h,d,f,p,v=i[2].title+"",g,A,y,w=qe((Z=i[2].price)==null?void 0:Z.value)&&((Q=i[2].price)==null?void 0:Q.value)!=="",C,x;e=new nt({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let E=i[2].brandTags||[],S=[];for(let B=0;B<E.length;B+=1)S[B]=Ka(Za(i,E,B));let k=i[2].tags||[],j=[];for(let B=0;B<k.length;B+=1)j[B]=el(Ja(i,k,B));let _=w&&tl(i),G=i[2].highlightText&&il(i);return{c(){var B;t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),s=ne(),r=T("div"),a=T("img"),c=ne(),u=T("div");for(let R=0;R<S.length;R+=1)S[R].c();h=ne();for(let R=0;R<j.length;R+=1)j[R].c();d=ne(),f=T("div"),p=T("div"),g=De(v),A=ne(),y=T("div"),_&&_.c(),C=ne(),G&&G.c(),b(o,"class","line svelte-8mby9k"),L(o,"transition-delay",i[1]?vi+"ms":bi+sl-ol-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),Xe(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(u,"class","tag svelte-8mby9k"),b(p,"class","text svelte-8mby9k"),b(f,"class","title svelte-8mby9k"),b(y,"class","footer svelte-8mby9k"),L(y,"height",qe((B=i[2].price)==null?void 0:B.value)&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),L(r,"transition-delay",i[1]?vi+bi+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),q(t,"unfolded",i[1]),q(t,"folded",i[3])},m(B,R){z(B,t,R),K(e,t,null),V(t,n),V(t,o),V(t,s),V(t,r),V(r,a),V(r,c),V(r,u);for(let W=0;W<S.length;W+=1)S[W].m(u,null);V(u,h);for(let W=0;W<j.length;W+=1)j[W].m(u,null);V(r,d),V(r,f),V(f,p),V(p,g),V(r,A),V(r,y),_&&_.m(y,null),V(y,C),G&&G.m(y,null),x=!0},p(B,[R]){var H,te,X;const W={};if(R&2&&(W.visible=B[1]),e.$set(W),R&2&&L(o,"transition-delay",B[1]?vi+"ms":bi+sl-ol-40+"ms"),(!x||R&4&&!Xe(a.src,l=B[2].headerPictureUrl))&&b(a,"src",l),R&4){E=B[2].brandTags||[];let J;for(J=0;J<E.length;J+=1){const he=Za(B,E,J);S[J]?S[J].p(he,R):(S[J]=Ka(he),S[J].c(),S[J].m(u,h))}for(;J<S.length;J+=1)S[J].d(1);S.length=E.length}if(R&4){k=B[2].tags||[];let J;for(J=0;J<k.length;J+=1){const he=Ja(B,k,J);j[J]?j[J].p(he,R):(j[J]=el(he),j[J].c(),j[J].m(u,null))}for(;J<j.length;J+=1)j[J].d(1);j.length=k.length}(!x||R&4)&&v!==(v=B[2].title+"")&&Me(g,v),R&4&&(w=qe((H=B[2].price)==null?void 0:H.value)&&((te=B[2].price)==null?void 0:te.value)!==""),w?_?_.p(B,R):(_=tl(B),_.c(),_.m(y,C)):_&&(_.d(1),_=null),B[2].highlightText?G?G.p(B,R):(G=il(B),G.c(),G.m(y,null)):G&&(G.d(1),G=null),R&4&&L(y,"height",qe((X=B[2].price)==null?void 0:X.value)&&B[2].highlightText?void 0:"1rem"),R&2&&L(r,"transition-delay",B[1]?vi+bi+"ms":"0ms"),(!x||R&2)&&q(t,"unfolded",B[1]),(!x||R&8)&&q(t,"folded",B[3])},i(B){x||(P(e.$$.fragment,B),x=!0)},o(B){D(e.$$.fragment,B),x=!1},d(B){B&&M(t),$(e),dt(S,B),dt(j,B),_&&_.d(),G&&G.d()}}}const vi=400,ol=500,bi=180,sl=500;function W0(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 N0 extends re{constructor(t){super(),se(this,t,W0,H0,oe,{tag:0},G0)}}const an="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uQxAACFEII9ACZ/sJZwWEoEb8w/////N//////JcxjHjf+7/v/H2PzCCFAiDtGeyBCIx7bJJ1mmEEMy6g8mm2c8nrGABB4h2Mkmn//4z/73u773R5qHHu/j/w7Kxkzh5lWRWdsifCkNAnY9Zc1HvDAhjhSHdFkHFzLmabt/AQxSg2wwzLhHIJOBnAWwVY4zrhIYhhc2kvhYDfQ4hDi2Gmh5KyFn8EcGIrHAngNgIwVIEMf5bzbAiTRoAD///8z/KV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VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",kn={};var yi=(i=>(i.Default="default",i.GetAudioDuration="getAudioDuration",i.PlayAudio="playAudio",i))(yi||{});function rl(i,t){const e=(t==null?void 0:t.namespace)||"default",n=kn[e]||(kn[e]=[]);let o=n.find(s=>!s.realSrc||s.realSrc===an);return o||(console.warn("\u672A\u627E\u5230\u7F13\u5B58\u97F3\u9891\uFF0C\u5DF2\u65B0\u5EFA",kn),o=new Ao(an),n.push(o)),i&&(o.src=i),o}function _0(i){return N(this,null,function*(){const t=(()=>i instanceof Ao?i:rl(i,{namespace:"getAudioDuration"}))(),e=yield new Promise(n=>{t.duration?t.isBlankAudio?n(0):n(t.duration):(t.addEventListener("loadedmetadata",()=>{t.isBlankAudio?n(0):n(t.duration)}),t.addEventListener("canplaythrough",()=>{t.isBlankAudio?n(0):n(t.duration)}))});return typeof i=="string"&&t.clear(),e})}function al(i,t){const e=(t==null?void 0:t.namespace)||"default",n=kn[e]||(kn[e]=[]),o=i-n.length;if(!(o<=0))for(let s=0;s<o;s++)n.push(new Ao(an))}class Ao extends Audio{constructor(e){super(e);m(this,"preload","auto");m(this,"realSrc","");m(this,"inited",!1);m(this,"removeDocumentEventListener");this.realSrc=e!=null?e:"",super.addEventListener("ended",()=>{this.src=""});const n=()=>X0(this);document.addEventListener("click",n),document.addEventListener("touchend",n),this.removeDocumentEventListener=()=>{document.removeEventListener("click",n),document.removeEventListener("touchend",n)}}get isBlankAudio(){return this.realSrc===an||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e}clear(){this.src=an,this.currentTime=0}}function X0(i){!i||i.inited||(i.src&&(i.inited=!0,i.removeDocumentEventListener()),i.src===an&&i.play())}class Y0 extends Audio{constructor(e){super();m(this,"sharedAudioSrc");m(this,"sharedAudioPaused",!0);m(this,"sharedAudioCurrentTime",0);m(this,"tryplaying",!1);m(this,"audioInstance");m(this,"eventListenerDisposer");this.sharedAudioSrc=e}get paused(){var e;return(e=this.sharedAudioPaused)!=null?e:!0}get currentTime(){return this.sharedAudioCurrentTime}play(){return N(this,null,function*(){var e,n,o;this.tryplaying||(this.tryplaying=!0,(!this.audioInstance||((e=this.audioInstance)==null?void 0:e.realSrc)!==this.sharedAudioSrc)&&(this.audioInstance=rl(this.sharedAudioSrc,{namespace:yi.PlayAudio})),this.audioInstance.currentTime=(n=this.currentTime)!=null?n:0,(o=this.eventListenerDisposer)==null||o.call(this),this.eventListenerDisposer=this.addEventListeners(),this.audioInstance.play().then(()=>{this.sharedAudioPaused=!1}).catch(s=>{this.pause(),console.warn(s)}).finally(()=>{this.tryplaying=!1}))})}pause(){!this.audioInstance||this.paused||(this.sharedAudioPaused=!0,this.audioInstance.addEventListener("pause",()=>{var e;(e=this.eventListenerDisposer)==null||e.call(this)},{once:!0}),this.audioInstance.pause())}dispose(){this.clear(),this.audioInstance=void 0}clear(){var e;(e=this.audioInstance)==null||e.clear()}addEventListeners(){const e=this.audioInstance;if(!e)return;const n=d=>{var f;this.sharedAudioCurrentTime=e.currentTime,(f=this.ontimeupdate)==null||f.call(this,d)},o=d=>{var f;return(f=this.onplay)==null?void 0:f.call(this,d)},s=d=>{var f;(f=this.onpause)==null||f.call(this,d),this.clear()},r=d=>{var f;(f=this.onended)==null||f.call(this,d),this.sharedAudioCurrentTime=0},a=d=>{var f;return(f=this.onerror)==null?void 0:f.call(this,d)},l=d=>{var f;return(f=this.oncanplay)==null?void 0:f.call(this,d)},c=d=>{var f;return(f=this.oncanplaythrough)==null?void 0:f.call(this,d)},u=d=>{var f;return(f=this.onloadeddata)==null?void 0:f.call(this,d)},h=d=>{var f;return(f=this.onloadedmetadata)==null?void 0:f.call(this,d)};return e.addEventListener("timeupdate",n),e.addEventListener("play",o),e.addEventListener("pause",s),e.addEventListener("ended",r),e.addEventListener("error",a),e.addEventListener("canplay",l),e.addEventListener("canplaythrough",c),e.addEventListener("loadeddata",u),e.addEventListener("loadedmetadata",h),()=>{e.removeEventListener("timeupdate",n),e.removeEventListener("play",o),e.removeEventListener("pause",s),e.removeEventListener("ended",r),e.removeEventListener("error",a),e.removeEventListener("canplay",l),e.removeEventListener("canplaythrough",c),e.removeEventListener("loadeddata",u),e.removeEventListener("loadedmetadata",h)}}}function U0(i){ce(i,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function J0(i){let t,e,n,o;const s=i[8].default,r=Xt(s,i,i[7],null);return{c(){t=T("div"),r&&r.c(),b(t,"class","audio svelte-13e7hxv"),b(t,"style",i[0])},m(a,l){z(a,t,l),r&&r.m(t,null),e=!0,n||(o=Pe(t,"click",Jo(i[1])),n=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&Ut(r,s,a,a[7],e?Yt(s,a[7],l,null):Jt(a[7]),null),(!e||l&1)&&b(t,"style",a[0])},i(a){e||(P(r,a),e=!0)},o(a){D(r,a),e=!1},d(a){a&&M(t),r&&r.d(a),n=!1,o()}}}function Z0(i,t,e){let{$$slots:n={},$$scope:o}=t,{url:s}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=vn(),u=Mt("hooks"),h=Mt("mediaStore");let d,f=!0;function p(){e(5,d.onplay=g=>{u.emit("playStateChange",F({event:g,state:"playing",mediaInstance:d},l)),c("play"),e(6,f=!1)},d),e(5,d.onpause=g=>{u.emit("playStateChange",F({event:g,state:"paused",mediaInstance:d},l)),c("pause"),e(6,f=!0)},d),e(5,d.onloadedmetadata=g=>{typeof d.duration=="number"&&!Number.isNaN(d.duration)&&c("duration",d.duration)},d),e(5,d.ontimeupdate=g=>{c("timeupdate",d.currentTime)},d)}h.subscribe(({currentMediaElement:g})=>{g!==d&&(f||d==null||d.pause())});function v(g){!d||(u.emit("click",F({event:g,target:"AudioTagPlayIcon",audioInstance:d},l)),h.set({currentMediaElement:d}),u.emit("playStateChange",F({event:g,state:d.paused?"playing":"paused",mediaInstance:d},l)),d.paused?d.play():d.pause())}return i.$$set=g=>{"url"in g&&e(2,s=g.url),"enable"in g&&e(3,r=g.enable),"style"in g&&e(0,a=g.style),"hooksInfo"in g&&e(4,l=g.hooksInfo),"$$scope"in g&&e(7,o=g.$$scope)},i.$$.update=()=>{i.$$.dirty&4&&(s||c("duration",0)),i.$$.dirty&36&&(d==null||d.dispose(),e(5,d=new Y0(s)),c("audioRef",d),setTimeout(()=>c("audioRef",d),200),_0(s).then(g=>c("duration",g)),p()),i.$$.dirty&40&&(r||d==null||d.pause()),i.$$.dirty&72&&c(r&&!f?"play":"pause")},[a,v,s,r,l,d,f,o,n]}class ll extends re{constructor(t){super(),se(this,t,Z0,J0,oe,{url:2,enable:3,style:0,hooksInfo:4},U0)}}function q0(i){ce(i,"svelte-srt2pi",".audio-icon__wrapper.svelte-srt2pi.svelte-srt2pi{display:inline-block}.audio-icon.svelte-srt2pi.svelte-srt2pi{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:50%;background-color:rgba(255, 255, 255, 0.8)}.audio-icon.svelte-srt2pi .sound-wave__container.svelte-srt2pi{position:absolute;pointer-events:none;width:60%;height:60%}.sound-wave.svelte-srt2pi.svelte-srt2pi{animation-duration:2s;animation-iteration-count:infinite;animation-play-state:paused;transition:opacity 0}.playing.svelte-srt2pi .sound-wave.svelte-srt2pi{animation-play-state:running}.playing.svelte-srt2pi .sound-wave-1.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_1_animation}.playing.svelte-srt2pi .sound-wave-2.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_2_animation}.playing.svelte-srt2pi .sound-wave-3.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_3_animation}@keyframes svelte-srt2pi-sound_wave_1_animation{0%,10%{opacity:0}25%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_2_animation{0%,35%{opacity:0}50%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_3_animation{0%,60%{opacity:0}75%,100%{opacity:1}}")}function cl(i){let t,e;return t=new nt({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function K0(i){let t,e,n,o,s,r=i[1]&&cl();return{c(){t=T("div"),r&&r.c(),e=ne(),n=T("div"),o=T("div"),o.innerHTML='<svg width="100%" height="100%" viewBox="0 0 128 128"><g transform="rotate(-45 12 64) translate(12 64)" fill="black" stroke="black" fill-opacity="0.6" stroke-opacity="0.6"><path stroke="none" class="sound-wave sound-wave-1 svelte-srt2pi" d="M0,23 A23,23 0 0,0 23,0 L0,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-2 svelte-srt2pi" d="M0,46 A46,46 0 0,0 46,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-3 svelte-srt2pi" d="M0,80 A80,80 0 0,0 80,0"></path></g></svg>',b(o,"class","sound-wave__container svelte-srt2pi"),b(n,"class","audio-icon svelte-srt2pi"),q(n,"playing",i[0]),b(t,"class","audio-icon__wrapper svelte-srt2pi"),b(t,"style",i[2]),L(t,"width",i[5]),L(t,"height",i[5])},m(a,l){z(a,t,l),r&&r.m(t,null),V(t,e),V(t,n),V(n,o),i[7](o),i[8](t),s=!0},p(a,[l]){a[1]?r?l&2&&P(r,1):(r=cl(),r.c(),P(r,1),r.m(t,e)):r&&(ae(),D(r,1,1,()=>{r=null}),le()),(!s||l&1)&&q(n,"playing",a[0]),(!s||l&4)&&b(t,"style",a[2]),l&32&&L(t,"width",a[5]),l&32&&L(t,"height",a[5])},i(a){s||(P(r),s=!0)},o(a){D(r),s=!1},d(a){a&&M(t),r&&r.d(),i[7](null),i[8](null)}}}function $0(i,t,e){let n,{playing:o}=t,{shadow:s=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function u(d){je[d?"unshift":"push"](()=>{c=d,e(4,c)})}function h(d){je[d?"unshift":"push"](()=>{l=d,e(3,l)})}return i.$$set=d=>{"playing"in d&&e(0,o=d.playing),"shadow"in d&&e(1,s=d.shadow),"style"in d&&e(2,r=d.style),"width"in d&&e(6,a=d.width)},i.$$.update=()=>{i.$$.dirty&64&&e(5,n=typeof a=="number"?ke(a):a)},[o,s,r,l,c,n,a,u,h]}class ul extends re{constructor(t){super(),se(this,t,$0,K0,oe,{playing:0,shadow:1,style:2,width:6},q0)}}function eA(i){ce(i,"svelte-1s6gk4a",".audio-tag.svelte-1s6gk4a{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.audio-icon__wrapper.svelte-1s6gk4a{position:relative;vertical-align:top;width:100%;height:100%}.content.svelte-1s6gk4a{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-1s6gk4a{position:relative;width:100%;height:100%}.audio-icon.svelte-1s6gk4a{pointer-events:none;vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.audio.svelte-1s6gk4a{position:relative;width:100%;height:100%}")}function dl(i){var A,y;let t,e,n,o,s,r,a,l,c,u,h,d,f,p,v;e=new nt({props:{visible:i[6],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let g=i[6]&&hl(i);return c=new ua({props:{visible:i[6],textUnfolded:i[1],content:i[5]}}),d=new ro({props:{unfolded:i[6],length:i[3],outDelay:i[4]+20*Math.min((y=(A=i[5])==null?void 0:A.length)!=null?y:10,15),useLinearColor:!0}}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),s=T("div"),r=T("div"),g&&g.c(),a=ne(),l=T("div"),ee(c.$$.fragment),h=ne(),ee(d.$$.fragment),b(r,"class","audio-icon svelte-1s6gk4a"),ze(()=>i[11].call(l)),L(l,"display","inline-block"),b(s,"class","wrapper svelte-1s6gk4a"),b(o,"class","content svelte-1s6gk4a"),b(t,"class","audio-tag svelte-1s6gk4a"),q(t,"unfolded",i[6])},m(w,C){z(w,t,C),K(e,t,null),V(t,n),V(t,o),V(o,s),V(s,r),g&&g.m(r,null),V(s,a),V(s,l),K(c,l,null),u=bt(l,i[11].bind(l)),V(t,h),K(d,t,null),f=!0,p||(v=Pe(l,"click",i[7]),p=!0)},p(w,C){var k,j;const x={};C&64&&(x.visible=w[6]),C&8&&(x.left=w[3]/2+"px"),e.$set(x),w[6]?g?(g.p(w,C),C&64&&P(g,1)):(g=hl(w),g.c(),P(g,1),g.m(r,null)):g&&(ae(),D(g,1,1,()=>{g=null}),le());const E={};C&64&&(E.visible=w[6]),C&2&&(E.textUnfolded=w[1]),C&32&&(E.content=w[5]),c.$set(E);const S={};C&64&&(S.unfolded=w[6]),C&8&&(S.length=w[3]),C&48&&(S.outDelay=w[4]+20*Math.min((j=(k=w[5])==null?void 0:k.length)!=null?j:10,15)),d.$set(S),(!f||C&64)&&q(t,"unfolded",w[6])},i(w){f||(P(e.$$.fragment,w),P(g),P(c.$$.fragment,w),P(d.$$.fragment,w),f=!0)},o(w){D(e.$$.fragment,w),D(g),D(c.$$.fragment,w),D(d.$$.fragment,w),f=!1},d(w){w&&M(t),$(e),g&&g.d(),$(c),u(),$(d),p=!1,v()}}}function hl(i){let t,e,n,o,s,r,a;return e=new nt({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new ll({props:{enable:i[6],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[tA]},$$scope:{ctx:i}}}),o.$on("play",i[8]),o.$on("pause",i[9]),o.$on("audioRef",i[10]),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),ee(o.$$.fragment),b(t,"class","audio svelte-1s6gk4a")},m(l,c){z(l,t,c),K(e,t,null),V(t,n),K(o,t,null),a=!0},p(l,c){i=l;const u={};c&64&&(u.enable=i[6]),c&1&&(u.url=i[0].data.audioUrl),c&1&&(u.hooksInfo={tag:i[0]}),c&4100&&(u.$$scope={dirty:c,ctx:i}),o.$set(u)},i(l){a||(P(e.$$.fragment,l),P(o.$$.fragment,l),l&&ze(()=>{r&&r.end(1),s=zt(t,Tt,{duration:1e3,delay:0,easing:Kt}),s.start()}),a=!0)},o(l){var c,u;D(e.$$.fragment,l),D(o.$$.fragment,l),s&&s.invalidate(),l&&(r=qt(t,Tt,{duration:1e3,delay:20*Math.min((u=(c=i[5])==null?void 0:c.length)!=null?u:10,15),easing:Kt})),a=!1},d(l){l&&M(t),$(e),$(o),l&&r&&r.end()}}}function tA(i){let t,e,n;return e=new ul({props:{playing:i[2]}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&4&&(r.playing=o[2]),e.$set(r)},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function nA(i){let t,e,n=i[0].state&&dl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&P(n,1)):(n=dl(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function iA(i,t,e){let n,o,s,{tag:r}=t,a=!1,l=!1,c;function u(){e(1,a=!a)}const h=()=>{e(2,l=!0)},d=()=>{e(2,l=!1)};function f(v){bn.call(this,i,v)}function p(){c=this.clientWidth,e(3,c)}return i.$$set=v=>{"tag"in v&&e(0,r=v.tag)},i.$$.update=()=>{var v,g,A;i.$$.dirty&1&&e(6,n=!!((v=r.state)!=null&&v.unfolded)),i.$$.dirty&1&&e(5,o=(A=(g=r.data.title)!=null?g:r.data.text)!=null?A:""),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,o,n,u,h,d,f,p]}class oA extends re{constructor(t){super(),se(this,t,iA,nA,oe,{tag:0},eA)}}function sA(i){const t=document.createElement("div");t.style.color=i,document.body.appendChild(t);const e=window.getComputedStyle(t).color;t.remove();const n=(()=>e.search("rgba")===-1?e.replace("rgb","rgba").replace(")",", 1)"):e)(),o=n.replace("rgba","").replace("(","").replace(")","").split(",").map(s=>Number(s.trim()));return{rgba:n,r:o[0],g:o[1],b:o[2],a:o[3]}}function rA(i){ce(i,"svelte-58hfjf",".audio-tag__wrapper.svelte-58hfjf{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.audio-tag.svelte-58hfjf{position:relative;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:0.1875rem;padding-right:0.625rem;border-radius:624999.9375rem;border:0.03125rem solid rgba(255, 255, 255, 0.2)}.audio__inner.svelte-58hfjf{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.text.svelte-58hfjf{font-weight:bold;font-size:0.75rem;margin-left:0.25rem}.audio-icon__wrapper.svelte-58hfjf{position:relative;vertical-align:top;pointer-events:none;width:1.375rem;height:1.375rem}")}function fl(i){let t,e,n,o;return n=new ll({props:{style:"width: max-content; height: max-content;",enable:i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[lA]},$$scope:{ctx:i}}}),n.$on("play",i[7]),n.$on("pause",i[8]),n.$on("timeupdate",i[9]),n.$on("duration",i[10]),n.$on("audioRef",i[11]),{c(){t=T("div"),e=T("div"),ee(n.$$.fragment),b(e,"class","audio-tag svelte-58hfjf"),L(e,"background-color",i[1]),L(e,"color",i[5]),b(t,"class","audio-tag__wrapper svelte-58hfjf")},m(s,r){z(s,t,r),V(t,e),K(n,e,null),o=!0},p(s,r){const a={};r&1&&(a.enable=s[0].state.visible),r&1&&(a.url=s[0].data.audioUrl),r&1&&(a.hooksInfo={tag:s[0]}),r&8260&&(a.$$scope={dirty:r,ctx:s}),n.$set(a),r&2&&L(e,"background-color",s[1]),r&32&&L(e,"color",s[5])},i(s){o||(P(n.$$.fragment,s),o=!0)},o(s){D(n.$$.fragment,s),o=!1},d(s){s&&M(t),$(n)}}}function aA(i){let t;return{c(){t=De(i[6])},m(e,n){z(e,t,n)},p(e,n){n&64&&Me(t,e[6])},d(e){e&&M(t)}}}function lA(i){let t,e,n,o,s,r,a;return n=new ul({props:{playing:i[2]}}),r=new uo({props:{maxWidth:72,$$slots:{default:[aA]},$$scope:{ctx:i}}}),{c(){t=T("div"),e=T("div"),ee(n.$$.fragment),o=ne(),s=T("div"),ee(r.$$.fragment),b(e,"class","audio-icon__wrapper svelte-58hfjf"),b(s,"class","text svelte-58hfjf"),b(t,"class","audio__inner svelte-58hfjf")},m(l,c){z(l,t,c),V(t,e),K(n,e,null),V(t,o),V(t,s),K(r,s,null),a=!0},p(l,c){const u={};c&4&&(u.playing=l[2]),n.$set(u);const h={};c&8256&&(h.$$scope={dirty:c,ctx:l}),r.$set(h)},i(l){a||(P(n.$$.fragment,l),P(r.$$.fragment,l),a=!0)},o(l){D(n.$$.fragment,l),D(r.$$.fragment,l),a=!1},d(l){l&&M(t),$(n),$(r)}}}function cA(i){let t,e,n=i[0].state&&fl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&P(n,1)):(n=fl(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function uA(i,t,e){let n,o,s,{tag:r}=t;vn();let a=!1,l=0,c=0;const u=()=>{e(2,a=!0)},h=()=>{e(2,a=!1)},d=v=>{e(3,l=v.detail)},f=v=>{e(4,c=v.detail)};function p(v){bn.call(this,i,v)}return i.$$set=v=>{"tag"in v&&e(0,r=v.tag)},i.$$.update=()=>{var v,g;i.$$.dirty&1&&e(6,n=(g=(v=r.data.title)!=null?v:r.data.text)!=null?g:""),i.$$.dirty&1&&e(1,o=(()=>{var A;return r.data.backgroundColor==="dark"?"rgba(0, 0, 0, 0.3)":r.data.backgroundColor==="light"?"rgba(255, 255, 255, 0.3)":(A=r.data.backgroundColor)!=null?A:"rgba(0, 0, 0, 0.3)"})()),i.$$.dirty&2&&e(5,s=(()=>{const{r:A,g:y,b:w}=sA(o);return(A*299+y*587+w*114)/1e3>=128?"rgba(0, 0, 0, 0.6)":"white"})())},[r,o,a,l,c,s,n,u,h,d,f,p]}class dA extends re{constructor(t){super(),se(this,t,uA,cA,oe,{tag:0},rA)}}function hA(i){let t,e;return t=new dA({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function fA(i){let t,e;return t=new oA({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function mA(i){let t,e,n,o;const s=[fA,hA],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=pe()},m(l,c){~t&&r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?~t&&r[t].p(l,c):(e&&(ae(),D(r[u],1,1,()=>{r[u]=null}),le()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),P(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(P(e),o=!0)},o(l){D(e),o=!1},d(l){~t&&r[t].d(l),l&&M(n)}}}function pA(i,t,e){let n,{tag:o}=t,s;function r(a){s=a.detail}return o.play=()=>s.play(),o.pause=()=>s.pause(),i.$$set=a=>{"tag"in a&&e(0,o=a.tag)},i.$$.update=()=>{var a;i.$$.dirty&1&&e(1,n=(a=o.data.appearance)!=null?a:"line")},[o,n,r]}class gA extends re{constructor(t){super(),se(this,t,pA,mA,oe,{tag:0})}}function AA(i){ce(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function ml(i){var o;let t,e,n;return e=new Ga({props:{mediaItemConfig:{canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(o=i[4])!=null?o:"withText",disableVideoIfHavePoster:!1,objectFit:i[2]},unfolded:i[6],mediaData:i[5],enableCarousel:i[1],autoplayConfig:i[3],tag:i[0],inDelay:500,duration:500}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(s,r){z(s,t,r),K(e,t,null),n=!0},p(s,r){var l;const a={};r&20&&(a.mediaItemConfig={canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(l=s[4])!=null?l:"withText",disableVideoIfHavePoster:!1,objectFit:s[2]}),r&64&&(a.unfolded=s[6]),r&32&&(a.mediaData=s[5]),r&2&&(a.enableCarousel=s[1]),r&8&&(a.autoplayConfig=s[3]),r&1&&(a.tag=s[0]),e.$set(a)},i(s){n||(P(e.$$.fragment,s),n=!0)},o(s){D(e.$$.fragment,s),n=!1},d(s){s&&M(t),$(e)}}}function vA(i){let t,e,n=i[0].state&&i[5]&&ml(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&P(n,1)):(n=ml(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function bA(i,t,e){let n,o,s,r,a,l,{tag:c}=t;return i.$$set=u=>{"tag"in u&&e(0,c=u.tag)},i.$$.update=()=>{var u,h;i.$$.dirty&1&&e(6,n=c.state?c.state.unfolded:!1),i.$$.dirty&1&&e(5,o=c.data.mediaData),i.$$.dirty&1&&e(1,s=c.data.enableCarousel),i.$$.dirty&1&&e(4,r=c.data.playIcon),i.$$.dirty&3&&e(3,a=(u=c.data.autoplayConfig)!=null?u:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,l=(h=c.data.objectFit)!=null?h:(()=>c.data.adaptationMode==="stretch"?"fill":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,s,l,a,r,o,n]}class yA extends re{constructor(t){super(),se(this,t,bA,vA,oe,{tag:0},AA)}}function wA(i){return N(this,null,function*(){return new Promise((t,e)=>{if(!i){e(Error("url is empty"));return}const n=new Image;n.src=i,n.onload=()=>t({width:n.width,height:n.height}),n.onerror=e})})}function CA(i){return N(this,null,function*(){const{steps:t,url:e,ratio:n=3,fps:o=24}=i;if(!t)throw new Error("KeyframeIcon requires steps");const{width:s,height:r}=yield wA(e),a=s/n,l=r/n,c=a/t,u=l,h=1/o*t+"s",d=a/t-a;return{url:e,keyframesWidth:a,keyframesHeight:l,wrapperWidth:c,wrapperHeight:u,steps:t,duration:h,offsetX:d,offsetY:0}})}function PA(i){ce(i,"svelte-mhs8j5","@keyframes svelte-mhs8j5-sprites-animation{0%{background-position:0 0}100%{background-position:var(--keyframe_offset_x) 0}}.icon-image.svelte-mhs8j5{display:block;width:100%}.icon-keyframe-container.svelte-mhs8j5{overflow:hidden}.icon-keyframe-wrapper.svelte-mhs8j5{transform-origin:0 0}.icon-keyframe.svelte-mhs8j5{background-repeat:no-repeat;animation-direction:normal;animation-iteration-count:infinite;animation-name:svelte-mhs8j5-sprites-animation}")}function pl(i){i[6]=i[14].url,i[7]=i[14].keyframesWidth,i[8]=i[14].keyframesHeight,i[9]=i[14].wrapperWidth,i[10]=i[14].wrapperHeight,i[11]=i[14].steps,i[12]=i[14].duration,i[13]=i[14].offsetX}function gl(i){let t,e,n,o=i[2]&&Al();function s(l,c){return l[3]?EA:IA}let r=s(i),a=r(i);return{c(){t=T("div"),o&&o.c(),e=ne(),a.c(),b(t,"class","icon"),L(t,"width",typeof i[0]=="number"?ke(i[0]):i[0])},m(l,c){z(l,t,c),o&&o.m(t,null),V(t,e),a.m(t,null),n=!0},p(l,c){l[2]?o?c&4&&P(o,1):(o=Al(),o.c(),P(o,1),o.m(t,e)):o&&(ae(),D(o,1,1,()=>{o=null}),le()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&1&&L(t,"width",typeof l[0]=="number"?ke(l[0]):l[0])},i(l){n||(P(o),n=!0)},o(l){D(o),n=!1},d(l){l&&M(t),o&&o.d(),a.d()}}}function Al(i){let t,e;return t=new nt({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function IA(i){let t,e;return{c(){t=T("img"),b(t,"class","icon-image svelte-mhs8j5"),Xe(t.src,e=i[1].url)||b(t,"src",e),b(t,"alt","icon")},m(n,o){z(n,t,o)},p(n,o){o&2&&!Xe(t.src,e=n[1].url)&&b(t,"src",e)},d(n){n&&M(t)}}}function EA(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:DA,then:xA,catch:kA,value:14};return os(e=i[4](i[1]),n),{c(){t=pe(),n.block.c()},m(o,s){z(o,t,s),n.block.m(o,n.anchor=s),n.mount=()=>t.parentNode,n.anchor=t},p(o,s){i=o,n.ctx=i,s&2&&e!==(e=i[4](i[1]))&&os(e,n)||xc(n,i,s)},d(o){o&&M(t),n.block.d(o),n.token=null,n=null}}}function kA(i){return{c:U,m:U,p:U,d:U}}function xA(i){pl(i);let t,e,n,o=`url(${i[6]})`,s=`steps(${i[11]-1})`;return{c(){t=T("div"),e=T("div"),n=T("div"),b(n,"class","icon-keyframe svelte-mhs8j5"),L(n,"width",ke(i[7])),L(n,"height",ke(i[8])),L(n,"background-image",o),L(n,"animation-duration",i[12]),L(n,"animation-timing-function",s),L(n,"animation-delay",0),L(n,"background-size","100% 100%"),L(n,"--keyframe_offset_x",ke(i[13])),b(e,"class","icon-keyframe-wrapper svelte-mhs8j5"),L(e,"transform",typeof i[0]=="number"?`scale(${i[0]/i[9]})`:void 0),b(t,"class","icon-keyframe-container svelte-mhs8j5"),L(t,"width",typeof i[0]=="number"?ke(i[0]):ke(i[9])),L(t,"height",typeof i[0]=="number"?ke(i[10]*(i[0]/i[9])):ke(i[10]))},m(r,a){z(r,t,a),V(t,e),V(e,n)},p(r,a){pl(r),a&2&&L(n,"width",ke(r[7])),a&2&&L(n,"height",ke(r[8])),a&2&&o!==(o=`url(${r[6]})`)&&L(n,"background-image",o),a&2&&L(n,"animation-duration",r[12]),a&2&&s!==(s=`steps(${r[11]-1})`)&&L(n,"animation-timing-function",s),a&2&&L(n,"--keyframe_offset_x",ke(r[13])),a&3&&L(e,"transform",typeof r[0]=="number"?`scale(${r[0]/r[9]})`:void 0),a&3&&L(t,"width",typeof r[0]=="number"?ke(r[0]):ke(r[9])),a&3&&L(t,"height",typeof r[0]=="number"?ke(r[10]*(r[0]/r[9])):ke(r[10]))},d(r){r&&M(t)}}}function DA(i){return{c:U,m:U,p:U,d:U}}function LA(i){let t,e,n=i[1]&&gl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&P(n,1)):(n=gl(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function SA(i,t,e){let n,{width:o=null}=t,{icon:s=null}=t,{shadow:r=!1}=t;const a=vn();function l(c){return N(this,null,function*(){const u=yield CA(c);return a("iconLoaded"),u})}return i.$$set=c=>{"width"in c&&e(0,o=c.width),"icon"in c&&e(1,s=c.icon),"shadow"in c&&e(2,r=c.shadow)},i.$$.update=()=>{i.$$.dirty&2&&e(3,n=(s==null?void 0:s.steps)>=2),i.$$.dirty&8&&!n&&a("iconLoaded")},[o,s,r,n,l]}class vl extends re{constructor(t){super(),se(this,t,SA,LA,oe,{width:0,icon:1,shadow:2},PA)}}function MA(i){ce(i,"svelte-e58ijk",".wrapper.svelte-e58ijk{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-e58ijk{position:relative;display:flex;align-items:center;justify-content:center}.text.svelte-e58ijk{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;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function bl(i){let t,e,n,o,s,r;return e=new nt({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),s=De(i[1]),b(o,"class","text svelte-e58ijk"),b(t,"class","text-wrapper svelte-e58ijk")},m(a,l){z(a,t,l),K(e,t,null),V(t,n),V(t,o),V(o,s),r=!0},p(a,l){(!r||l&2)&&Me(s,a[1])},i(a){r||(P(e.$$.fragment,a),r=!0)},o(a){D(e.$$.fragment,a),r=!1},d(a){a&&M(t),$(e)}}}function zA(i){let t,e,n,o;e=new vl({props:{icon:i[0],shadow:!0}}),e.$on("iconLoaded",i[9]);let s=i[1]&&i[2]&&bl(i);return{c(){t=T("div"),ee(e.$$.fragment),n=ne(),s&&s.c(),b(t,"class","wrapper svelte-e58ijk")},m(r,a){z(r,t,a),K(e,t,null),V(t,n),s&&s.m(t,null),o=!0},p(r,[a]){const l={};a&1&&(l.icon=r[0]),e.$set(l),r[1]&&r[2]?s?(s.p(r,a),a&6&&P(s,1)):(s=bl(r),s.c(),P(s,1),s.m(t,null)):s&&(ae(),D(s,1,1,()=>{s=null}),le())},i(r){o||(P(e.$$.fragment,r),P(s),o=!0)},o(r){D(e.$$.fragment,r),D(s),o=!1},d(r){r&&M(t),$(e),s&&s.d()}}}function TA(i,t,e){let n,o,s,r,a,l,c,u,{tag:h}=t;const d=()=>{e(2,n=!0)};return i.$$set=f=>{"tag"in f&&e(3,h=f.tag)},i.$$.update=()=>{var f,p;i.$$.dirty&8&&e(1,o=(f=h.data.title)!=null?f:h.data.text),i.$$.dirty&8&&e(8,s=(p=h.data.icon)!=null?p:h.style.point),i.$$.dirty&256&&e(7,r=s.url),i.$$.dirty&256&&e(6,a=s.steps),i.$$.dirty&256&&e(5,l=s.fps),i.$$.dirty&256&&e(4,c=s.ratio),i.$$.dirty&240&&e(0,u={url:r,steps:a,fps:l,ratio:c})},e(2,n=!1),[u,o,n,h,c,l,a,r,s,d]}class BA extends re{constructor(t){super(),se(this,t,TA,zA,oe,{tag:3},MA)}}function jA(i){ce(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function yl(i){let t,e=i[0].element+"",n;return{c(){t=new Hn(!1),n=pe(),t.a=n},m(o,s){t.m(e,o,s),z(o,n,s)},p(o,s){s&1&&e!==(e=o[0].element+"")&&t.p(e)},d(o){o&&M(n),o&&t.d()}}}function VA(i){let t,e=typeof i[0].element=="string"&&yl(i);return{c(){t=T("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){z(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=yl(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:U,o:U,d(n){n&&M(t),e&&e.d(),i[2](null)}}}function QA(i,t,e){let{tag:n}=t,o,s;Ue(()=>{if(o){if(n.element instanceof Element){const a=n.element;o.appendChild(a),s=()=>a.remove()}else if(typeof n.element=="function"){const a=n.element;s=a(o)}}}),wt(()=>{s==null||s()});function r(a){je[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class OA extends re{constructor(t){super(),se(this,t,QA,VA,oe,{tag:0},jA)}}function RA(i){ce(i,"svelte-1pomljv",'@font-face{font-family:"TG-TYPE";font-style:normal;font-weight:400;src:local("TG-TYPE-Bold"), url(data:application/font-woff2;charset=utf-8;base64,T1RUTwAKAIAAAwAgQ0ZGINFD4CEAAAaQAAAHC0dTVUIAAQAAAAANnAAAAApPUy8yaB5pEwAAAjQAAABgY21hcEItjGUAAAT0AAABfGhlYWQS1WWOAAAAtAAAADZoaGVhBfMBxwAAAhAAAAAkaG10eJ9gBO8AAADsAAABJG1heHAASVAAAAAArAAAAAZuYW1lqczkZQAAApQAAAJecG9zdP+4ADIAAAZwAAAAIAAAUAAASQAAAAEAAAABAADkeHeyXw889QADA+gAAAAA2NoRKwAAAADY2hErACn/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAA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r5UQG/+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==) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-1pomljv{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.withAnimation.svelte-1pomljv{transition:opacity 0.3s linear}.content__container.unClickable.svelte-1pomljv{pointer-events:none !important}.content__container.unClickable.svelte-1pomljv *{pointer-events:none !important}.content__wrapper.svelte-1pomljv{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-1pomljv{opacity:0;pointer-events:none}.content__container.hide.svelte-1pomljv *{pointer-events:none !important}.content__container.disable.svelte-1pomljv{display:none}.content.svelte-1pomljv{position:relative;width:100%;height:100%;font-size:0.75rem;line-height:1.125rem;color:#fff}.content.svelte-1pomljv:not(.unfolded){pointer-events:none}.content.svelte-1pomljv:not(.unfolded) *{pointer-events:none !important}')}function FA(i){let t,e;return{c(){t=T("div"),b(t,"data-info","tag content is keep folded"),b(t,"data-id",e=i[1].id)},m(n,o){z(n,t,o)},p(n,o){o&2&&e!==(e=n[1].id)&&b(t,"data-id",e)},i:U,o:U,d(n){n&&M(t)}}}function GA(i){let t,e,n,o,s,r,a,l,c;const u=[UA,YA,XA,_A,NA,WA,HA],h=[];function d(f,p){return f[1].element?0:f[1].contentType==="Text"?1:f[1].contentType==="ImageText"||f[1].contentType==="Image"||f[1].contentType==="Video"?2:f[1].contentType==="Audio"?3:f[1].contentType==="Marketing"?4:f[1].contentType==="Link"||f[1].contentType==="VRLink"||f[1].contentType==="PanoLink"?5:f[1].contentType==="MediaPlane"||f[1].contentType==="MediaModel"?6:-1}return~(o=d(i))&&(s=h[o]=u[o](i)),{c(){var f;t=T("div"),e=T("div"),n=T("div"),s&&s.c(),b(n,"class","content svelte-1pomljv"),q(n,"unfolded",(f=i[1].state)==null?void 0:f.unfolded),b(e,"class","content__wrapper svelte-1pomljv"),b(t,"class","content__container svelte-1pomljv"),b(t,"data-id",r=i[1].id),q(t,"disable",i[1].enabled===!1),q(t,"hide",i[4]),q(t,"withAnimation",i[0]),q(t,"unClickable",i[1].clickable===!1),L(t,"width",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0),L(t,"height",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0)},m(f,p){z(f,t,p),V(t,e),V(e,n),~o&&h[o].m(n,null),a=!0,l||(c=Pe(t,"click",Jo(i[13])),l=!0)},p(f,p){var g;let v=o;o=d(f),o===v?~o&&h[o].p(f,p):(s&&(ae(),D(h[v],1,1,()=>{h[v]=null}),le()),~o?(s=h[o],s?s.p(f,p):(s=h[o]=u[o](f),s.c()),P(s,1),s.m(n,null)):s=null),(!a||p&2)&&q(n,"unfolded",(g=f[1].state)==null?void 0:g.unfolded),(!a||p&2&&r!==(r=f[1].id))&&b(t,"data-id",r),(!a||p&2)&&q(t,"disable",f[1].enabled===!1),(!a||p&16)&&q(t,"hide",f[4]),(!a||p&1)&&q(t,"withAnimation",f[0]),(!a||p&2)&&q(t,"unClickable",f[1].clickable===!1),p&2&&L(t,"width",f[1].stickType==="Plane"||f[1].contentType==="MediaModel"?"100%":0),p&2&&L(t,"height",f[1].stickType==="Plane"||f[1].contentType==="MediaModel"?"100%":0)},i(f){a||(P(s),a=!0)},o(f){D(s),a=!1},d(f){f&&M(t),~o&&h[o].d(),l=!1,c()}}}function HA(i){let t,e;return t=new yA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function WA(i){let t,e;return t=new BA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function NA(i){let t,e;return t=new N0({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function _A(i){let t,e;return t=new gA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function XA(i){let t,e;return t=new x0({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function YA(i){let t,e;return t=new Xp({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function UA(i){let t,e;return t=new OA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function JA(i){let t,e,n,o;const s=[GA,FA],r=[];function a(l,c){return l[3]?0:1}return t=a(i),e=r[t]=s[t](i),{c(){e.c(),n=pe()},m(l,c){r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?r[t].p(l,c):(ae(),D(r[u],1,1,()=>{r[u]=null}),le(),e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),P(e,1),e.m(n.parentNode,n))},i(l){o||(P(e),o=!0)},o(l){D(e),o=!1},d(l){r[t].d(l),l&&M(n)}}}function ZA(i,t,e){let n,o,s,r,a,l,{withAnimation:c=!1}=t,{tag:u}=t,{hooks:h}=t,{state:d}=t,{mediaStore:f}=t,{temporaryState:p}=t;Bi("hooks",h),Bi("mediaStore",f);let v,g;function A(C){C?h.emit("exposure",{id:r,type:"start"}):h.emit("exposure",{id:r,type:"end"})}function y(C,x,E){var S,k;return!(!x.visible||!x.enabled||!E.visible||!((S=C.state)!=null&&S.visible)||((k=C.temporaryState)==null?void 0:k.visible)===!1||Fe(C)&&C.mediaVisible===!1)}const w=C=>h.emit("click",{event:C,target:"TagContent",tag:u});return i.$$set=C=>{"withAnimation"in C&&e(0,c=C.withAnimation),"tag"in C&&e(1,u=C.tag),"hooks"in C&&e(2,h=C.hooks),"state"in C&&e(5,d=C.state),"mediaStore"in C&&e(6,f=C.mediaStore),"temporaryState"in C&&e(7,p=C.temporaryState)},i.$$.update=()=>{var C,x,E,S,k,j,_,G,Z,Q,B;i.$$.dirty&2&&e(11,n=(C=u.state)==null?void 0:C.unfolded),i.$$.dirty&2&&e(10,o=(x=u.state)==null?void 0:x.visible),i.$$.dirty&162&&e(12,s=d.visible&&p.visible&&((E=u.state)==null?void 0:E.visible)),i.$$.dirty&2&&(r=u.id),i.$$.dirty&162&&e(4,a=!y(u,d,p)),i.$$.dirty&4096&&A(s),i.$$.dirty&3842&&u.hooks&&(n!==void 0&&n!==g&&(e(9,g=n),n?(k=(S=u.hooks).emit)==null||k.call(S,"unfolded"):(_=u==null?void 0:(j=u.hooks).emit)==null||_.call(j,"folded")),o!==void 0&&o!==v&&(e(8,v=o),o?(Z=(G=u.hooks).emit)==null||Z.call(G,"show"):(B=(Q=u.hooks).emit)==null||B.call(Q,"hide"))),i.$$.dirty&2&&e(3,l=(()=>!(typeof u.mergedConfig.unfoldedConfig=="object"&&u.mergedConfig.unfoldedConfig.keep==="folded"))())},[c,u,h,l,a,d,f,p,v,g,o,n,s,w]}class wl extends re{constructor(t){super(),se(this,t,ZA,JA,oe,{withAnimation:0,tag:1,hooks:2,state:5,mediaStore:6,temporaryState:7},RA)}}function qA(i){ce(i,"svelte-yex9rb",'@charset "UTF-8";.tag-point-click-helper.svelte-yex9rb.svelte-yex9rb{position:absolute;pointer-events:auto;cursor:pointer;width:2.5rem;height:2.5rem;left:50%;top:50%;transform:translate(-50%, -50%)}.tag-point-wrapper.svelte-yex9rb.svelte-yex9rb{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);z-index:-1}.tag-folded-point.svelte-yex9rb.svelte-yex9rb,.tag-unfolded-point.svelte-yex9rb.svelte-yex9rb{transition:all 0.5s}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.3125rem;height:0.3125rem;border-radius:50%;background-color:white}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb:before{content:"";position:absolute;width:0.875rem;height:0.875rem;border-radius:50%;background-color:rgba(0, 0, 0, 0.2)}.tag-point-wrapper.folded.svelte-yex9rb .tag-folded-point.svelte-yex9rb{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-yex9rb .tag-folded-point.svelte-yex9rb{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{opacity:1;scale:1}')}function KA(i){let t,e,n,o,s,r,a,l,c,u,h,d;return o=new nt({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new vl({props:{icon:i[2],width:i[1]}}),{c(){t=T("div"),e=ne(),n=T("div"),ee(o.$$.fragment),s=ne(),r=T("div"),a=ne(),l=T("div"),ee(c.$$.fragment),b(t,"class","tag-point-click-helper svelte-yex9rb"),b(r,"class","tag-unfolded-point svelte-yex9rb"),L(r,"transition-delay",(i[3]?i[5]:0)+"ms"),b(l,"class","tag-folded-point svelte-yex9rb"),L(l,"transition-delay",(i[3]?i[5]:0)+"ms"),b(n,"class","tag-point-wrapper svelte-yex9rb"),q(n,"unfolded",i[0]),q(n,"folded",i[3]),L(n,"width",ke(i[1])),L(n,"height",ke(i[1]))},m(f,p){z(f,t,p),z(f,e,p),z(f,n,p),K(o,n,null),V(n,s),V(n,r),V(n,a),V(n,l),K(c,l,null),u=!0,h||(d=Pe(t,"click",i[4]),h=!0)},p(f,[p]){p&8&&L(r,"transition-delay",(f[3]?f[5]:0)+"ms");const v={};p&4&&(v.icon=f[2]),p&2&&(v.width=f[1]),c.$set(v),p&8&&L(l,"transition-delay",(f[3]?f[5]:0)+"ms"),(!u||p&1)&&q(n,"unfolded",f[0]),(!u||p&8)&&q(n,"folded",f[3]),p&2&&L(n,"width",ke(f[1])),p&2&&L(n,"height",ke(f[1]))},i(f){u||(P(o.$$.fragment,f),P(c.$$.fragment,f),u=!0)},o(f){D(o.$$.fragment,f),D(c.$$.fragment,f),u=!1},d(f){f&&M(t),f&&M(e),f&&M(n),$(o),$(c),h=!1,d()}}}function $A(i,t,e){let n,o,s,r;const a=Mt("hooks");let{tag:l}=t,c,u=!1;const h=()=>{c!==void 0&&clearTimeout(c),u=!0,c=setTimeout(()=>{u=!1},800)},d=p=>{u||a.emit("click",{event:p,target:"TagPoint",tag:l})},f=(()=>l.contentType==="Text"&&l.data.appearance==="plane"?500:800)();return i.$$set=p=>{"tag"in p&&e(6,l=p.tag)},i.$$.update=()=>{var p,v,g,A;i.$$.dirty&64&&e(0,n=(p=l.state)==null?void 0:p.unfolded),i.$$.dirty&1&&e(3,o=!n),i.$$.dirty&64&&e(2,s=(g=(v=l.style)==null?void 0:v.point)!=null&&g.url?(A=l.style)==null?void 0:A.point:{url:bp}),i.$$.dirty&64&&e(1,r=(()=>{var w,C,x;const y=(x=(C=(w=l.style)==null?void 0:w.point)==null?void 0:C.size)!=null?x:"S";return typeof y=="number"?y:y==="S"?18:y==="M"?20:y==="L"?24:y==="XL"?28:18})())},h(),[n,r,s,o,d,f,l]}class ev extends re{constructor(t){super(),se(this,t,$A,KA,oe,{tag:6},qA)}}function tv(i){ce(i,"svelte-pzwdws",".tag.withAnimation.svelte-pzwdws{transition:opacity 0.3s linear}.tag.hide.svelte-pzwdws{opacity:0;pointer-events:none}.tag.hide.svelte-pzwdws *{pointer-events:none !important}.tag.unClickable.svelte-pzwdws{pointer-events:none !important}.tag.unClickable.svelte-pzwdws *{pointer-events:none !important}.tag.disable.svelte-pzwdws{display:none}.wrapper.svelte-pzwdws{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}")}function nv(i){let t;return{c(){t=T("div"),b(t,"data-info","tag content is disable")},m(e,n){z(e,t,n)},p:U,i:U,o:U,d(e){e&&M(t)}}}function iv(i){let t,e;return t=new wl({props:{mediaStore:i[2],withAnimation:i[0],tag:Re(i[1]),hooks:i[14],state:i[3],temporaryState:i[4]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&4&&(s.mediaStore=n[2]),o&1&&(s.withAnimation=n[0]),o&2&&(s.tag=Re(n[1])),o&8&&(s.state=n[3]),o&16&&(s.temporaryState=n[4]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function ov(i){let t;return{c(){t=T("div"),b(t,"data-info","tag point is disable")},m(e,n){z(e,t,n)},p:U,i:U,o:U,d(e){e&&M(t)}}}function sv(i){let t,e;return t=new ev({props:{tag:i[1]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=n[1]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function rv(i){let t,e,n,o,s,r,a,l,c;const u=[iv,nv],h=[];function d(g,A){return g[12]?0:1}n=d(i),o=h[n]=u[n](i);const f=[sv,ov],p=[];function v(g,A){return g[13]?0:1}return r=v(i),a=p[r]=f[r](i),{c(){t=T("div"),e=T("div"),o.c(),s=ne(),a.c(),b(e,"class","wrapper svelte-pzwdws"),b(e,"data-tag-unfolded",i[8]),b(e,"data-tag-id",i[11]),b(e,"data-content-type",l=i[1].contentType),L(e,"left",i[7]),L(e,"top",i[6]),L(e,"z-index",i[5]),b(t,"class","tag svelte-pzwdws"),b(t,"data-tag-id",i[11]),q(t,"unClickable",i[1].clickable===!1),q(t,"disable",i[10]),q(t,"hide",i[9]),q(t,"withAnimation",i[0])},m(g,A){z(g,t,A),V(t,e),h[n].m(e,null),V(e,s),p[r].m(e,null),c=!0},p(g,[A]){let y=n;n=d(g),n===y?h[n].p(g,A):(ae(),D(h[y],1,1,()=>{h[y]=null}),le(),o=h[n],o?o.p(g,A):(o=h[n]=u[n](g),o.c()),P(o,1),o.m(e,s));let w=r;r=v(g),r===w?p[r].p(g,A):(ae(),D(p[w],1,1,()=>{p[w]=null}),le(),a=p[r],a?a.p(g,A):(a=p[r]=f[r](g),a.c()),P(a,1),a.m(e,null)),(!c||A&256)&&b(e,"data-tag-unfolded",g[8]),(!c||A&2048)&&b(e,"data-tag-id",g[11]),(!c||A&2&&l!==(l=g[1].contentType))&&b(e,"data-content-type",l),A&128&&L(e,"left",g[7]),A&64&&L(e,"top",g[6]),A&32&&L(e,"z-index",g[5]),(!c||A&2048)&&b(t,"data-tag-id",g[11]),(!c||A&2)&&q(t,"unClickable",g[1].clickable===!1),(!c||A&1024)&&q(t,"disable",g[10]),(!c||A&512)&&q(t,"hide",g[9]),(!c||A&1)&&q(t,"withAnimation",g[0])},i(g){c||(P(o),P(a),c=!0)},o(g){D(o),D(a),c=!1},d(g){g&&M(t),h[n].d(),p[r].d()}}}function av(i,t,e){let n,o,s,r,a,l,c,u,h,{withAnimation:d=!1}=t,{tag:f}=t,{mediaStore:p}=t,{state:v}=t,{temporaryState:g}=t;const A=Mt("hooks");return i.$$set=y=>{"withAnimation"in y&&e(0,d=y.withAnimation),"tag"in y&&e(1,f=y.tag),"mediaStore"in y&&e(2,p=y.mediaStore),"state"in y&&e(3,v=y.state),"temporaryState"in y&&e(4,g=y.temporaryState)},i.$$.update=()=>{var y,w,C,x,E,S,k,j;i.$$.dirty&2&&e(13,n=(()=>!(f.contentType==="Link"||f.contentType==="VRLink"||f.contentType==="PanoLink"||f.contentType==="Audio"&&f.data.appearance==="plane"))()),i.$$.dirty&2&&e(12,o=(()=>f.stickType==="2DPoint")()),i.$$.dirty&2&&e(11,s=f.id),i.$$.dirty&2&&e(10,r=!((y=f.pointTagStyle)!=null&&y.leftPercent)||!((w=f.pointTagStyle)!=null&&w.topPercent)||f.enabled===!1||!f.state),i.$$.dirty&2&&e(9,a=!((C=f.state)!=null&&C.visible)||((x=f.temporaryState)==null?void 0:x.visible)===!1),i.$$.dirty&2&&e(8,l=(E=f.state)==null?void 0:E.unfolded),i.$$.dirty&2&&e(7,c=((S=f.pointTagStyle)==null?void 0:S.leftPercent)+"%"),i.$$.dirty&2&&e(6,u=((k=f.pointTagStyle)==null?void 0:k.topPercent)+"%"),i.$$.dirty&2&&e(5,h=(j=f.state)!=null&&j.unfolded?1:0)},[d,f,p,v,g,h,u,c,l,a,r,s,o,n,A]}class lv extends re{constructor(t){super(),se(this,t,av,rv,oe,{withAnimation:0,tag:1,mediaStore:2,state:3,temporaryState:4},tv)}}function cv(i){ce(i,"svelte-uq11d5",".tag--container.svelte-uq11d5{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;transform:translate3d(0, 0, 0)}.withAnimation.svelte-uq11d5{transition:opacity 0.3s linear}.tag--container.hide.svelte-uq11d5{opacity:0;pointer-events:none}.tag--container.hide.svelte-uq11d5 *{pointer-events:none !important}")}function Cl(i,t,e){const n=i.slice();return n[6]=t[e],n}function Pl(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=Cl(i,s,a),c=r(l);n.set(c,e[a]=Il(c,l))}return{c(){t=T("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-uq11d5"),q(t,"hide",!i[3].visible||!i[4].visible),q(t,"withAnimation",i[0])},m(a,l){z(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,l){l&31&&(s=a[1],ae(),e=Je(e,l,r,1,a,s,n,t,Pt,Il,null,Cl),le()),(!o||l&24)&&q(t,"hide",!a[3].visible||!a[4].visible),(!o||l&1)&&q(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)P(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)D(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Il(i,t){let e,n,o;return n=new lv({props:{state:t[3],temporaryState:t[4],withAnimation:t[0],tag:t[6],mediaStore:t[2]}}),{key:i,first:null,c(){e=pe(),ee(n.$$.fragment),this.first=e},m(s,r){z(s,e,r),K(n,s,r),o=!0},p(s,r){t=s;const a={};r&8&&(a.state=t[3]),r&16&&(a.temporaryState=t[4]),r&1&&(a.withAnimation=t[0]),r&2&&(a.tag=t[6]),r&4&&(a.mediaStore=t[2]),n.$set(a)},i(s){o||(P(n.$$.fragment,s),o=!0)},o(s){D(n.$$.fragment,s),o=!1},d(s){s&&M(e),$(n,s)}}}function uv(i){let t,e,n=i[3].enabled&&Pl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&P(n,1)):(n=Pl(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function dv(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{mediaStore:r}=t,{state:a}=t,{temporaryState:l}=t;return Bi("hooks",s),i.$$set=c=>{"withAnimation"in c&&e(0,n=c.withAnimation),"tags"in c&&e(1,o=c.tags),"hooks"in c&&e(5,s=c.hooks),"mediaStore"in c&&e(2,r=c.mediaStore),"state"in c&&e(3,a=c.state),"temporaryState"in c&&e(4,l=c.temporaryState)},[n,o,r,a,l,s]}class hv extends re{constructor(t){super(),se(this,t,dv,uv,oe,{withAnimation:0,tags:1,hooks:5,mediaStore:2,state:3,temporaryState:4},cv)}}const fv={globalConfig:{unfoldedConfig:{autoUnfold:{strategy:"MinimumDistance",distance:{max:5}}},tag3DConfig:{ratio:.0035}},contentTypeConfig:{"Any-Audio-plane":{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},Link:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},VRLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},PanoLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},MediaPlane:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{alwaysShowWhenMovePano:!0}},MediaModel:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{keep:"visible",visibleFiveMode:["Panorama","Floorplan","Model","Mapview"],alwaysShowWhenMovePano:!0}}}};class mv extends ti{constructor(e){super(e);m(this,"tagCacheByPanoIndex",{})}getCache({panoIndex:e,id:n,key:o}){var c,u,h,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=`${(h=(u=s.work)==null?void 0:u.workCode)!=null?h: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 f=l.get(n);return f||(l.set(n,{}),l.get(n))}return(d=l.get(n))==null?void 0:d[o]}clearCache(){this.tagCacheByPanoIndex={}}removeCache(){}}class pv extends mv{constructor(e){super(e);m(this,"tags",[]);m(this,"config",fv);m(this,"raycaster",new I.Raycaster)}get isPanorama(){return this.five.currentMode==="Panorama"}getTagById(e){const n=this.tags.find(o=>o.id===e);if(!n){console.warn(`error: can not find tag id ${e} by getTagById()`);return}return n}changeContentTypeConfig(e,n,o=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),o?this.config.contentTypeConfig[e]=pt.default({},this.config.contentTypeConfig[e],n):this.config.contentTypeConfig[e]=n,this.clearCache()}getVisibleByPanoIndex(e,n){var r;const o=this.getCache({panoIndex:n,id:e.id}),s=(r=this.five.panoIndex)!=null?r:n;if(Fe(e))return!0;if(o.visible!==void 0)return o.visible;{const a=(()=>{var u,h,d;const l=(u=this.getTagConfig(e).visibleConfig)!=null?u:{},c=this.getDistance(e);if(typeof l=="function")return{value:l(this.five,{tag:e,distance:c}),reason:"config function result"};if(l.keep==="hidden")return{value:!1,reason:"config.keep is hidden"};if(l.keep==="visible")return{value:!0,reason:"config.keep is visible"};if(l.visiblePanoIndex!==void 0&&l.visiblePanoIndex!=="all"&&s!==void 0){if(Array.isArray(l.visiblePanoIndex)&&!l.visiblePanoIndex.includes(s))return{value:!1,reason:`current panoIndex is not included in visiblePano. currentPanoIndex: ${s}, visiblePanoIndex: ${l.visiblePanoIndex}`};if(l.visiblePanoIndex==="current"&&s!==((h=e.fiveState)==null?void 0:h.panoIndex))return{value:!1,reason:`current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(d=e.fiveState)==null?void 0:d.panoIndex}`}}if(l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&In(c,l.visibleDistance)===!1)return{value:!1,reason:`distance is not in visibleDistance. distance: ${c}, visibleDistance: ${l.visibleDistance}`};if(l.intersectRaycaster!==!1&&(typeof l.intersectRaycaster!="object"||l.intersectRaycaster.enabled!==!1)){if(s===void 0)return{value:!1,reason:`intersectRaycaster check failed: fivePanoIndex is ${s}`};const f=this.getRaycasterFromPanoIndex(e,s),p=this.getTagEnableByIntersect(e,f);if(p.value===!1)return p}if(l.angleRange&&sp(e)){const f=this.getAngle(e);if(In(f,l.angleRange)===!1)return{value:!1,reason:`angle is not in angleRange. angle: ${f}, angleRange: ${l.angleRange}`}}return{value:!0,reason:"all check passed"}})();return o.visible=a.value,o.__debug_visible_reason__=a,o.visible}}getVisibleByFiveMode(e,n){var r;const o=(r=this.getTagConfig(e).visibleConfig)!=null?r:{};if(typeof o=="function")return n==="Panorama";const s=o==null?void 0:o.visibleFiveMode;return s?s.includes(n):n==="Panorama"}getVisibleByFloorIndex(e){var a;const n=e.fiveState;if(!n)return!0;const o=n.panoIndex,s=(a=this.five.work.observers[o])==null?void 0:a.floorIndex,r=this.five.model.shownFloor;return r===null||r===s}getVisible(e){const n=this.five.getCurrentState(),o=this.getVisibleByFiveMode(e,n.mode),s=Fe(e)?this.getVisibleByFloorIndex(e):!0,r=n.mode==="Panorama"?this.getVisibleByPanoIndex(e,n.panoIndex):!0;return o&&r&&s}getModelMedialVisibleByPanoIndex(e){const n=this.five.getCurrentState().panoIndex,o=this.getCache({panoIndex:n,id:e.id});if(o.modelMedialVisible!==void 0)return o.modelMedialVisible;const s=this.getRaycasterFromPanoIndex(e,n),r=this.getTagEnableByIntersect(e,s);return o.modelMedialVisible=r.value,o.__debug_visible_reason__=r,r.value!==!1}getUnfoldedByPanoIndex(e,n){if(!this.getVisibleByPanoIndex(e))return;const s=this.getCache({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.unfoldDistance&&In(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.autoUnfold===void 0||r.autoUnfold===!1||r.autoUnfold.enable===!1)return;if(r.autoUnfold.strategy==="ScreenPostion"){const l=this.getTagProject(e);if(l&&In(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 f=this.getTagProject(d);if(!f)return!1;const{x:p,y:v,z:g}=f;return!(Math.abs(g)>1||Math.abs(p)>1||Math.abs(v)>1)}).map(d=>({tag:d,id:d.id,tagConfig:this.getTagConfig(d).unfoldedConfig})).filter(({tag:d,tagConfig:f})=>{var p,v;return!(typeof f!="object"||f.keep||f.autoUnfold===!1||((p=f.autoUnfold)==null?void 0:p.enable)===!1||((v=f.autoUnfold)==null?void 0:v.strategy)!=="MinimumDistance")}).map(d=>ge(F({},d),{distance:this.getDistance(d.tag)})).filter(({distance:d,tagConfig:f})=>{var p,v;return!(d===void 0||typeof f!="object"||f.autoUnfold===!1||((p=f.autoUnfold)==null?void 0:p.enable)===!1||((v=f.autoUnfold)==null?void 0:v.strategy)!=="MinimumDistance"||f.autoUnfold.distance&&In(d,f.autoUnfold.distance)===!1)}).sort((d,f)=>d.distance-f.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.getCache({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=ta(e),h=c.distanceTo(u);return s.distance=h,h}}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.getCache({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.stickType==="3DPoint"?pn(e.normal):ao(e.position))();if(!u)return;const h=new I.Vector3().copy(c).sub(lo(e.position)),d=u.angleTo(h)*180/Math.PI;return s.angle=d,s.angle}}getTagConfig(e){var s,r;if(!e)return(s=this.config.globalConfig)!=null?s:{};const n={};this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(a=>{const l=a;if(n[l])return;const c=l.split("-");if(c.length===1){const[u]=c;e.contentType===u&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===2){const[u="Any",h="Any"]=c;(e.stickType===u||u==="Any")&&(e.contentType===h||h==="Any")&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===3){const[u="Any",h,d]=c;if(h==="Audio"&&e.contentType==="Audio"){const f=e;(f.stickType===u||u==="Any")&&f.data.appearance===d&&(n[l]=this.config.contentTypeConfig[l])}}});const o=pt.default({},this.config.globalConfig,...Object.values(n),e.config);return typeof o.unfoldedConfig=="object"&&(o.unfoldedConfig.disableFold&&(o.unfoldedConfig={keep:"unfolded"}),o.unfoldedConfig.disableUnfold&&(o.unfoldedConfig={keep:"folded"}),o.unfoldedConfig.keep&&(o.unfoldedConfig={keep:o.unfoldedConfig.keep})),typeof o.visibleConfig=="object"&&o.visibleConfig.keep&&(o.visibleConfig={keep:o.visibleConfig.keep,visibleFiveMode:(r=o.visibleConfig)==null?void 0:r.visibleFiveMode}),o}can(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.keep==="unfolded"||e==="unfold"&&o.unfoldedConfig.keep==="folded")return!1}return!0}sort(e){return e.sort((n,o)=>{const s=this.getDistance(n),r=this.getDistance(o);return s===void 0||r===void 0?0:r-s})}setPointTagPosition(){const e=this.filterPointTag();e.length!==0&&e.forEach(n=>{var s;if(!((s=n.state)!=null&&s.visible)){n.pointTagStyle=null;return}const o=this.getTagProject(n);if(!o){n.pointTagStyle=null;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)})}setModelMedialVisibleByPanoIndex(){this.tags.forEach(e=>{if(!Fe(e))return;const n=this.getModelMedialVisibleByPanoIndex(e);e.mediaVisible=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=lo(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.stickType==="2DPoint"||e.stickType==="3DPoint")}filter2DPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint")}filter3DPointTag(){return this.tags.filter(e=>e.stickType==="3DPoint")}filterModelTag(){return this.tags.filter(e=>e.stickType==="Model")}filter3DTag(){return this.tags.filter(e=>e.stickType==="3DPoint"||e.stickType==="Plane")}filterPlaneTag(){return this.tags.filter(e=>e.stickType==="Plane")}updateTagConfig(e){e!=null&&e.force&&this.clearCache(),this.tags.forEach(n=>{const o=this.getTagConfig(n);n.mergedConfig=o})}getTagEnableByIntersect(e,n){var u,h,d;const o=(u=this.getTagConfig(e).visibleConfig)!=null?u:{},s=this.getDistance(e),[r]=this.five.model.intersectRaycaster(n),a=(()=>{if(!Fe(e))return;const f=this.tags.filter(Fe).map(v=>{var g;return(g=v.model)==null?void 0:g.object}).filter(qe);return n.intersectObjects(f,!0)[0]})(),l=(()=>{var f;return typeof o=="object"&&typeof o.intersectRaycaster=="object"&&(f=o.intersectRaycaster.distanceAccuracy)!=null?f:.01})();return Math.min((h=r==null?void 0:r.distance)!=null?h:1/0,(d=a==null?void 0:a.distance)!=null?d:1/0)+l<s?{value:!1,reason:`intersectRaycaster check failed: distance is ${s}, intersection.point is ${r.point.toArray()},
|
|
562
|
-
customModelIntersection.point is ${a==null?void 0:a.point.toArray()} distanceError is ${l}`}:{value:!0,reason:""}}getRaycasterFromPanoIndex(e,n){var r;const o=(r=this.five.work.observers[n])==null?void 0:r.position;if(o===void 0)throw new Error(`getVisible(): observerPosition is ${o}`);const s=ta(e).sub(o).normalize();return this.raycaster.set(o,s),this.raycaster}}function gv(i){var t,e,n,o;if(!i.stickType){const s=(()=>i.pointType==="PointTag"&&i.dimensionType==="3D"?"3DPoint":i.pointType==="PlaneTag"?"Plane":"2DPoint")();i.stickType=s}if(i.contentType==="VRLink"||i.contentType==="PanoLink"||i.contentType==="Link"){const s=i;!((e=(t=s.data)==null?void 0:t.icon)!=null&&e.url)&&!((o=(n=s.style)==null?void 0:n.point)!=null&&o.url)&&(s.data.icon={url:"//vrlab-static.ljcdn.com/release/web/test.09dee741.png",steps:28})}return i}const Av=new jl.GLTFLoader;function vv(i){return new Promise((t,e)=>{function n(s){t(s)}function o(s){e(s)}Av.load(i,n,void 0,o)})}const El="2.0.10",vo=`DnalogelPlugin-PanoTagPlugin@${El}`,bv=!1,yv=i=>`${vo}--${i}`;class kl extends pv{constructor(e,n){super(e);m(this,"version",El);m(this,"state",{enabled:!0,visible:!0});m(this,"params");m(this,"debug");m(this,"css3DRenderPlugin");m(this,"TagContainerSvelte");m(this,"temporaryState",{visible:!0});m(this,"mediaStore",Gi({currentMediaElement:null}));m(this,"group",new O.Group);m(this,"gltfObjectGroup",new O.Group);m(this,"isIOSWX",navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1&&navigator.userAgent.toLowerCase().indexOf("iphone")!==-1);m(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});m(this,"enabledModelTagSet",new Set);m(this,"changeTagModel",(e,n)=>N(this,null,function*(){e.data=pt.default({},e.data,n),yield this.loadModel(e),this.updateRenderAllTags()}));m(this,"disposedErrorLog",()=>{console.error(`${vo} is disposed`)});m(this,"handleFiveInitAnimationEnded",()=>{const e=this.five.getCurrentState().mode;this.tags.forEach(n=>{Fe(n)&&e==="Panorama"&&this.changeTagMode(n,"front"),n.state.visible=this.getVisible(n)}),this.updateRenderAllTags(),this.updateRenderAllTags()});m(this,"handleFiveModelShownFloorChange",()=>{this.tags.forEach(e=>{!Fe(e)||(e.state.visible=this.getVisible(e))}),this.updateRenderAllTags()});m(this,"loadModel",e=>N(this,null,function*(){var l;const n=e.data.modelUrl;if(!n)return;const o=vv(n).then(c=>Object.assign(c.scene,{customID:e.id,isTagModel:!0}));e.model={promise:o};const s=yield o;if(((l=e.model)==null?void 0:l.promise)!==o||(e.model.object=s,!this.tags.includes(e)))return;s.visible=e.state.visible,new O.Matrix4().fromArray(e.matrix).decompose(s.position,s.quaternion,s.scale),s.updateWorldMatrix(!0,!0),this.getVisibleByFloorIndex(e)||(s.visible=!1);const a=this.gltfObjectGroup.children.find(c=>c.customID===e.id);return a&&this.gltfObjectGroup.remove(a),this.gltfObjectGroup.add(s),this.updateTagCss3DObjectMatrix(e,s),s}));this.group.name="PanoTagPluginModelGroup",this.gltfObjectGroup.name="PanoTagPluginGLTFObjectGroup",this.group.add(this.gltfObjectGroup),this.params=F({debug:!1,config:this.config},n),this.debug=this.params.debug,this.config=this.params.config,al(1,{namespace:yi.GetAudioDuration}),al(1,{namespace:yi.PlayAudio}),Object.assign(window,{[`__PANOTAGPLUGIN_DEBUG_${Date.now()}__`]:this}),Object.assign(window,{__PANOTAGPLUGIN_DEBUG__:this}),this.state.enabled&&this.five.scene.add(this.group)}load(e,n){return N(this,null,function*(){var s,r;this.clearTags(),console.info(vo," load:",{data:JSON.parse(JSON.stringify(e))}),this.config=pt.default({},this.config,{globalConfig:(s=e.globalConfig)!=null?s:{},contentTypeConfig:(r=e.contentTypeConfig)!=null?r:{}});const o=yield this.addTag(e.tagList,n);if(this.debug)try{ip(this.five,this.tags)}catch(a){console.error(a)}return o})}addTag(e,n){return N(this,null,function*(){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r),l=ge(F({},r),{state:F({visible:void 0,unfolded:bv},a.initialState),hooks:new me.Subscribe,clickable:a.clickable,mergedConfig:a});return Fe(r)&&(l.temporaryState={visible:!1}),l}).filter(r=>r.position);return s.forEach(gv),this.tags.push(...s),rp(this.five).then(()=>{var r,a,l;return 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(),this.addMediaModelTag(s)})})}changeConfig(e,n=!0){n?this.config=pt.default({},this.config,e):this.config=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=pt.default({},this.config.globalConfig,e):this.config.globalConfig=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}clearTags(){this.tags=[],this.enabledModelTagSet.clear(),this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}show(e){return N(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 N(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.five.scene.children.includes(this.group)||this.five.scene.add(this.group),this.setState({enabled:!0},{userAction:n}),this.hooks.emit("enable",{userAction:n}),this.five.needsRender=!0}disable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!1},{userAction:n}),this.five.scene.remove(this.group),this.hooks.emit("disable",{userAction:n}),this.five.needsRender=!0}dispose(){var e,n,o,s,r,a;this.pauseCurrentMedia(),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.five.scene.remove(this.group),this.group.remove(...this.group.children),this.gltfObjectGroup.remove(...this.gltfObjectGroup.children),this.clearCache(),this.five.needsRender=!0,this.hooks.emit("dispose")}setState(e,n){if(this.store.disposed)return this.disposedErrorLog();const{userAction:o=!0,visibleWithAnimation:s=!1}=n,r=F({},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})}changeUnfoldedById(e,n){var r;const o=this.getTagById(e);if(!o)return;o.state.unfolded=n;const s=this.filterPointTag();(r=this.TagContainerSvelte)==null||r.$set({tags:s})}changeTagNormalById(e,n){const o=this.getTagById(e);!o||!o.tag3DContentSvelte||(o.tag3DContentSvelte.currentNormal=lt(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=pt.default({},s.data,n):s.data=F(F({},s.data),n),this.checkPanelTag(),this.updateRenderAllTags())}changeStickTypeById(e,n,o=!0){this.changeTagById(e,n,o)}changeTagById(e,n,o=!0){const s=this.getTagById(e);!n||(o?pt.default(s,n):Object.assign(s,n),(s==null?void 0:s.tag3DContentSvelte)&&(n==null?void 0:n.normal)&&(s.tag3DContentSvelte.currentNormal=lt(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({currentMediaElement:null})}updateTagCss3DObjectMatrix(e,n){var v,g,A,y;const o=(A=(g=(v=e.mergedConfig)==null?void 0:v.tag3DConfig)==null?void 0:g.ratio)!=null?A:.00216,s=(y=e.tag3DContentSvelte)==null?void 0:y.domContainer.css3DObject;if(!s)return;const r=Fe(e)?e.data.mediaPosition:e.position;n.updateWorldMatrix(!1,!1);const a=n.matrixWorld,l=new O.Vector3().fromArray(r[0]),c=new O.Vector3().fromArray(r[2]),u=new O.Vector3().lerpVectors(l,c,.5).add(new O.Vector3(0,0,5e-4)),h=new O.Matrix4().setPosition(u),d=new O.Matrix4().makeScale(o,o,o),f=new O.Matrix4().multiply(a).multiply(h).multiply(d);f.decompose(s.position,s.quaternion,s.scale);const p=s.opacityMesh;!p||f.decompose(p.position,p.quaternion,p.scale)}updateTagCss3DObjectVisible(e){var s,r,a,l,c;const n=(s=e.tag3DContentSvelte)==null?void 0:s.domContainer.css3DObject;if(!n)return;n.visible=(a=(r=e.state)==null?void 0:r.visible)!=null?a:!0;const o=n.opacityMesh;!o||(o.visible=(c=(l=e.state)==null?void 0:l.visible)!=null?c:!0)}setVisibleAndUnfolded(){return N(this,arguments,function*({withAnimation:e}={withAnimation:!1}){if(!!this.isPanorama)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.pauseCurrentMedia(),this.state.visible=!1,this.updateTagContainerVisible()}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.updateRenderAllTags()}handleDisable(){var e,n,o;this.pauseCurrentMedia(),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.loadVideoFirstFrame.bind(this),u=this.clickhandler.bind(this),h=this.five.currentMode;return this.handleFiveModeChange(h),this.handleFivePanoArrived(),e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("initAnimationEnded",this.handleFiveInitAnimationEnded),e.on("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),e.on("panoArrived",c),n.on("click",u),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("initAnimationEnded",this.handleFiveInitAnimationEnded),e.off("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),e.off("panoArrived",c),n.off("click",u),this.store.eventListenerDisposer=void 0}}loadVideoFirstFrame(){this.isIOSWX&&this.hooks.emit("loadVideoFirstFrame")}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}=ia(lp(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=ia(na(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){this.tags.forEach(n=>{Fe(n)&&e!=="Panorama"&&this.changeTagMode(n,"behind"),n.state.visible=this.getVisible(n)}),this.updateRenderAllTags(),this.updateRenderAllTags()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&(n.visibleConfig.keep?e.temporaryState=ge(F({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=ge(F({},e.temporaryState),{visible:Boolean(n.visibleConfig.alwaysShowWhenMovePano)}))}),this.updateTagContainerVisible()}temporaryShow({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!0,this.updateTagContainerVisible()}temporaryHide({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!1,this.updateTagContainerVisible()}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.can("fold",e.tag),o=this.can("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.can("fold",s)&&(s.state.unfolded=!1)}),this.updateRenderAllTags())}updateRenderAllTags(){this.enabledModelTagSet.clear(),this.tags.forEach(e=>e.stickType==="Model"&&this.enabledModelTagSet.add(e.id)),this.updateRenderPointTag(),this.updateRenderPlaneTag(),this.updateRenderModelTag()}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 na(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return N(this,null,function*(){yield this.setVisibleAndUnfolded(),this.setModelMedialVisibleByPanoIndex(),this.tags.forEach(e=>{e.temporaryState=ge(F({},e.temporaryState),{visible:!0})}),this.store.visibleWithAnimation=!0,this.updateTagContainerVisible()})}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.keep)||n.state&&(n.state.unfolded=!1)})}updateRenderPointTag(){var n;const e=this.sort(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 hv({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore}})}}updateRenderPlaneTag(){this.sort([...this.filterPlaneTag(),...this.filter3DPointTag(),...this.filterModelTag()]).forEach(n=>{var l,c,u;if(n.tag3DContentSvelte){const{svelteApp:h,domContainer:d,initialNormal:f,currentNormal:p}=n.tag3DContentSvelte;if(this.updateTagCss3DObjectVisible(n),h.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!f.equals(p)){const v=new O.Quaternion().setFromUnitVectors(f,p);d.css3DObject.setRotationFromQuaternion(v)}return}if(((l=n.state)==null?void 0:l.visible)===!1)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=Nt(this.five)),n.stickType==="3DPoint"&&!n.normal)return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");const o=(()=>n.stickType==="Plane"?n.position:Fe(n)?n.data.mediaPosition:ap(this.five.camera.position,lt(n.position),lt(n.normal)))();if(!o)return;const s=function(){if(n.normal)return lt(n.normal);if(n.stickType==="Plane")return ao(n.position);if(n.contentType==="MediaModel")return ao(o)}();if(!s)return;const r=this.getTagConfig(n).tag3DConfig,a=this.css3DRenderPlugin.create3DDomContainer(o,r);!a||(this.updateTagCss3DObjectVisible(n),this.store.css3DRenderDisposer.set(n.id,a.dispose),n.tag3DContentSvelte={svelteApp:new wl({target:a.container,props:{tag:n,hooks:this.hooks,state:n.contentType==="MediaModel"?ge(F({},this.state),{visible:!1}):this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}}),domContainer:a,initialNormal:s,currentNormal:s},Fe(n)&&((c=n.model)==null?void 0:c.object)&&this.updateTagCss3DObjectMatrix(n,(u=n.model)==null?void 0:u.object))}),this.checkPanelTag()}updateRenderModelTag(){const e=o=>!this.enabledModelTagSet.has(o.customID);this.gltfObjectGroup.remove(...this.gltfObjectGroup.children.filter(e)),this.tags.filter(Fe).forEach(o=>{var s;(s=o.model)==null||s.promise.then(r=>{r.visible=o.state.visible})})}disposeAllCSS3DContainer(){for(const[e,n]of this.store.css3DRenderDisposer)n==null||n();this.store.css3DRenderDisposer=new Map}checkPanelTag(){this.filter2DPointTag().forEach(e=>{var n;(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.stickType==="2DPoint")&&(n==null||n(),this.store.css3DRenderDisposer.delete(e))}}addMediaModelTag(e){return N(this,null,function*(){const n=e.filter(Fe).map(this.loadModel);yield Promise.all(n),this.five.getCurrentState().mode==="Panorama"&&this.setModelMedialVisibleByPanoIndex(),this.updateRenderAllTags()})}changeTagMode(e,n){var o,s,r,a,l;((r=(s=(o=e.tag3DContentSvelte)==null?void 0:o.domContainer)==null?void 0:s.css3DObject)==null?void 0:r.mode)!==n&&((a=e.config)!=null&&a.tag3DConfig?e.config.tag3DConfig.mode=n:e.config?e.config.tag3DConfig={mode:n}:e.config={tag3DConfig:{mode:n}},(l=this.store.css3DRenderDisposer.get(e.id))==null||l(),e.tag3DContentSvelte=void 0)}}const wv=(i,t)=>new kl(i,t);function be(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new I.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)}be.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)},be.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"],be.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}},be.prototype._objectCtxInit=function(i){i._3xDomEvent={}},be.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent},be.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent},be.prototype._objectCtxGet=function(i){return i._3xDomEvent},be.prototype.camera=function(i){return i&&(this._camera=i),this._camera},be.prototype.bind=function(i,t,e,n){console.assert(be.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)},be.prototype.addEventListener=be.prototype.bind,be.prototype.unbind=function(i,t,e,n){console.assert(be.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);this._boundObjs[t].splice(l,1)},be.prototype.removeEventListener=be.prototype.unbind,be.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1},be.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.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,h=r[0],d=h.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,h),l&&this._notify("mouseover",d,n,h),c&&this._notify("mouseout",a,n,h)}},be.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.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)}}},be.prototype._notify=function(i,t,e,n){var o=this._objectCtxGet(t),s=o?o[i+"Handlers"]:null;if(!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)}},be.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)},be.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)},be.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)},be.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)},be.prototype._onClick=function(i){this._onMouseEvent("click",i)},be.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)},be.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)},be.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)},be.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)},be.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)}},be.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)}};function xl(i){const t=new I.Box3,e=new I.Vector3;if(i.traverse(n=>{var s;if(n.name==="shadow")return;const o=n.geometry;if(o!==void 0)if((s=o==null?void 0:o.attributes)!=null&&s.position){const r=o.attributes.position;for(let a=0,l=r.count;a<l;a++)e.fromBufferAttribute(r,a).applyMatrix4(n.matrix),t.expandByPoint(e)}else o.vertices.forEach(r=>{const a=r.clone().applyMatrix4(n.matrix);t.expandByPoint(a)})}),!t.isEmpty())return t}class xn{constructor(t,e){m(this,"originObject3D");m(this,"hooks");m(this,"disposers",[]);m(this,"helperObject3D");m(this,"camera");m(this,"model");m(this,"scene");m(this,"container");m(this,"domEvents");m(this,"isDragging",!1);m(this,"enabled",!1);m(this,"name","BaseController");m(this,"boundingBox");m(this,"offset");m(this,"onRender");m(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});var c,u;this.hooks=(c=t.sharedHooks)!=null?c:new Gt,this.camera=t.camera,this.model=t.model,this.originObject3D=t.originObject3D,this.helperObject3D=t.helperObject3D,this.container=t.container,this.scene=t.scene,this.domEvents=new be(t.camera,t.container),this.onRender=(u=t.onRender)!=null?u:()=>{},this.offset=e==null?void 0:e.offset,this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable();const n=(...h)=>this.onSetOriginObjectScale(...h),o=(...h)=>this.onSetOriginObjectRotate(...h),s=(...h)=>this.onSetOriginObjectPosition(...h),r=(...h)=>this.onApplyOriginObjectScale(...h),a=(...h)=>this.onApplyOriginObjectRotate(...h),l=(...h)=>this.onApplyOriginObjectPosition(...h);this.hooks.on("setObjectScale",n),this.hooks.on("setObjectRotate",o),this.hooks.on("setObjectPosition",s),this.hooks.on("applyObjectPosition",l),this.hooks.on("applyObjectRotate",a),this.hooks.on("applyObjectScale",r),this.disposers.push(()=>{this.hooks.off("setObjectScale",n),this.hooks.off("setObjectRotate",o),this.hooks.off("setObjectPosition",s),this.hooks.off("applyObjectPosition",l),this.hooks.off("applyObjectRotate",a),this.hooks.off("applyObjectScale",r)})}initialHelperPosition(){this.helperObject3D.position.add(this.calculateOffset(this.offset)),this.helperObject3D.initialPosition()}initialHelperQuaternion(){this.helperObject3D.initQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.helperObject3D.enable(),this.render())}disable(){!this.enabled||(this.enabled=!1,this.helperObject3D.disable(),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){var t;(t=this.disposers)==null||t.forEach(e=>e==null?void 0:e()),this.helperObject3D.dispose(),this.render()}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}onIntersectionOnModelUpdate(t){}onApplyOriginObjectScale(t){this.applyHelperScaleMatrix4(t.matrix4,t.origin)}onApplyOriginObjectRotate(t){this.applyHelperQuaternion(t.quaternion,t.origin)}onApplyOriginObjectPosition(t){this.applyHelperMatrix4(t.matrix4)}onSetOriginObjectScale(t){this.helperObject3D.scale.copy(t),this.updateOffsetByScale(t)}onSetOriginObjectRotate(t,e){this.helperObject3D.quaternion.copy(t)}onSetOriginObjectPosition(t){this.helperObject3D.position.copy(t.clone().add(this.calculateOffset(this.offset)))}render(){this.onRender()}updateOffsetByScale(t){if(this.boundingBox&&this.offset){const e=this.originObject3D.position,n=new I.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),o=new I.Vector3().subVectors(this.boundingBox.min,e).multiply(t).add(e),s=this.calculateOffset(this.offset,{min:o,max:n});this.helperObject3D.position.copy(s),this.helperObject3D.initialPosition()}}hoverListener(t,e=16777215,n=1){const o=(Array.isArray(t)?t:[t]).filter(qe),s=[];for(const r of o)if(r instanceof I.Mesh||r instanceof I.Group){const a=r instanceof I.Group?r.children.filter(d=>d instanceof I.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()},h=()=>{this.isDragging||c()};for(const d of a)this.domEvents.addEventListener(d,"mouseover",u),this.domEvents.addEventListener(d,"mouseout",h),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",h),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;const o=this.helperObject3D.raycasterIntersectObject(t)[0];if(!o)return;const s=o;if(s.object=n,this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<s.point.distanceTo(e))return}return s.object}calculateOffset(t,e){const n=this.originObject3D,o=new I.Vector3(0,0,0);if(!t)return o;const s=()=>e||(this.boundingBox?this.boundingBox:(this.boundingBox=xl(n),this.boundingBox));if(typeof t.x=="number")o.setX(t.x);else if(typeof t.x=="object"){const r=s();o.setX((r.max.x-r.min.x)*t.x.percents)}if(typeof t.y=="number")o.setY(t.y);else if(typeof t.y=="object"){const r=s();o.setY((r.max.y-r.min.y)*t.y.percents)}if(typeof t.z=="number")o.setZ(t.z);else if(typeof t.z=="object"){const r=s();o.setZ((r.max.z-r.min.z)*t.z.percents)}return o}}class Cv extends xn{constructor(...e){super(...e);m(this,"name","ScaleController")}setScale(e){var l,c,u;let n=1,o=1,s=1;typeof e=="number"?(n=e,o=e,s=e):typeof e=="object"&&(n=(l=e.x)!=null?l:1,o=(c=e.y)!=null?c:1,s=(u=e.z)!=null?u:1);const r=new I.Vector3(n,o,s);this.hooks.emit("wantToScale",r)||(this.originObject3D.scale.copy(r),this.hooks.emit("setObjectScale",r),this.hooks.emit("scale",r),this.render())}}class Pv extends O.Object3D{constructor(){super()}add(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.add(...e)}remove(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.remove(...e)}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}}class wi extends Pv{constructor(e,n){var o;super();m(this,"originObject3D");m(this,"onRender");this.originObject3D=e,this.onRender=(o=n==null?void 0:n.onRender)!=null?o:()=>{}}get helperObject(){return this}render(){this.onRender()}enable(){this.parent.children.includes(this)||this.parent.add(this)}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(e,n=[]){return e.intersectObject(this,!0,n)}initialPosition(){this.position.add(this.originObject3D.position)}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,n){this.scale.applyMatrix4(e)}setHelperQuaternion(e,n){if(n){const o=new O.Vector3().subVectors(this.position,n).applyQuaternion(e).add(n);this.position.copy(o)}this.quaternion.copy(e)}applyHelperQuaternion(e,n){if(n){const o=new O.Vector3().subVectors(this.position,n).applyQuaternion(e).add(n);this.position.copy(o)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class Iv extends wi{}class Ev extends wi{}class kv extends wi{}class Dl extends wi{}class xv extends Dl{}class Dv extends I.Group{constructor(e){super();m(this,"direction");this.direction=e||"x"}}class Ll extends I.Mesh{constructor(e,n,o){super(e,n);m(this,"direction");this.direction=o||"x"}}function Lv(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new I.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function bo(i,t,e){if(!t||!e||!i)return;const n=Lv(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new I.Raycaster;return o.setFromCamera(n,i),o}function Sv(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 yo extends Dv{constructor(e){var u;super(e.direction);m(this,"line");m(this,"arrow");m(this,"lineHeight",.4);m(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new I.Color((u=e.color)!=null?u:16214315),o=new I.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:I.DoubleSide}),s=new I.ConeGeometry(.04,.1,32),r=new Ll(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new I.CylinderGeometry(a,a,.4,32),c=new Ll(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 wo={X:15618642,Y:4765519,Z:4227839};class ft{static get X(){return new I.Color(wo.X).convertSRGBToLinear().clone()}static get Y(){return new I.Color(wo.Y).convertSRGBToLinear().clone()}static get Z(){return new I.Color(wo.Z).convertSRGBToLinear().clone()}}class Mv extends Iv{constructor(e){super(e);m(this,"xArrow",new yo({direction:"x",color:ft.X}));m(this,"yArrow",new yo({direction:"y",color:ft.Y}));m(this,"zArrow",new yo({direction:"z",color:ft.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 Ot(i,t){return zv(document.createElement(t!=null?t:"div"),i)}function zv(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function Tv(i){const t=Ot(F({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 Bv extends kv{constructor(e,n){var o;super(e);m(this,"yzCircle");m(this,"xzCircle");m(this,"xyCircle");m(this,"xRingHelper");m(this,"yRingHelper");m(this,"zRingHelper");m(this,"xAngleHelper");m(this,"yAngleHelper");m(this,"zAngleHelper");m(this,"angleTips");m(this,"container");(n==null?void 0:n.yzCircleEnable)!==!1&&(this.yzCircle=new Co({direction:"x",color:ft.X}),this.xRingHelper=new Po({direction:"x"}),this.xAngleHelper=new Io({direction:"x",color:ft.X})),(n==null?void 0:n.xzCircleEnable)!==!1&&(this.xzCircle=new Co({direction:"y",color:ft.Y}),this.yRingHelper=new Po({direction:"y"}),this.yAngleHelper=new Io({direction:"y",color:ft.Y})),(n==null?void 0:n.xyCircleEnable)!==!1&&(this.xyCircle=new Co({direction:"z",color:ft.Z}),this.zRingHelper=new Po({direction:"z"}),this.zAngleHelper=new Io({direction:"z",color:ft.Z})),n!=null&&n.container&&(this.container=n==null?void 0:n.container,this.angleTips=Tv({display:"none"}),(o=this.container)==null||o.appendChild(this.angleTips.element)),this.show()}updateAngleHelperQuaternion(){var e,n,o,s,r,a,l,c,u,h,d,f;(n=this.xAngleHelper)==null||n.quaternion.copy((e=this.yzCircle)==null?void 0:e.quaternion),(s=this.yAngleHelper)==null||s.quaternion.copy((o=this.xzCircle)==null?void 0:o.quaternion),(a=this.zAngleHelper)==null||a.quaternion.copy((r=this.xyCircle)==null?void 0:r.quaternion),(c=this.xRingHelper)==null||c.quaternion.copy((l=this.yzCircle)==null?void 0:l.quaternion),(h=this.yRingHelper)==null||h.quaternion.copy((u=this.xzCircle)==null?void 0:u.quaternion),(f=this.zRingHelper)==null||f.quaternion.copy((d=this.xyCircle)==null?void 0:d.quaternion)}applyHelperQuaternion(e,n){var o,s,r,a,l,c;(o=this.yzCircle)==null||o.applyQuaternion(e),(s=this.xzCircle)==null||s.applyQuaternion(e),(r=this.xyCircle)==null||r.applyQuaternion(e),(a=this.xAngleHelper)==null||a.baseAxes.applyQuaternion(e),(l=this.yAngleHelper)==null||l.baseAxes.applyQuaternion(e),(c=this.zAngleHelper)==null||c.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].filter(Boolean)),(n=(e=this.angleTips)==null?void 0:e.element)==null||n.remove()}filterRingHelper(e){return[this.xRingHelper,this.yRingHelper,this.zRingHelper].filter(n=>e.includes(n==null?void 0:n.direction)).filter(Boolean)}filterAngleHelper(e){return[this.xAngleHelper,this.yAngleHelper,this.zAngleHelper].filter(n=>e.includes(n==null?void 0:n.direction)).filter(Boolean)}}class Co extends I.Mesh{constructor(e){var n;super();m(this,"direction");m(this,"gapAngle",.02);m(this,"geometry",new I.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new I.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:I.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 Po extends I.Group{constructor(e){super();m(this,"direction");this.direction=e.direction;const n=.015,o=new Array(8).fill(null).map((s,r)=>{const a=new I.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new I.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),c=new I.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 Io extends I.Mesh{constructor(e){var o;super();m(this,"direction");m(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new I.Vector3(0,0,1);break;case"y":this.baseAxes=new I.Vector3(1,0,0);break;case"z":this.baseAxes=new I.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new I.CircleGeometry(n,48,0,1e-4),this.material=new I.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function jv(){const i=Ot({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Ot({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Ot({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:Lt({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:Lt({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:Lt({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:Lt({cursor:"ew-resize",right:n})},l={direction:"nesw",element:Lt({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:Lt({cursor:"ns-resize",top:n})},u={direction:"nwse",element:Lt({cursor:"nwse-resize",left:n,top:n})},h={direction:"ew",element:Lt({cursor:"ew-resize",left:n})};return new Array(s,a,c,h,o,r,l,u).forEach(f=>t.appendChild(f.element)),{container:i,squares:[o,s,r,a,l,c,u,h]}}function Lt(i){const t=Ot(F({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=Ot({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=Ot({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 Vv extends xv{constructor(e,n,o,s){super(e);m(this,"points",[]);m(this,"cornerPositions",[]);m(this,"css3DInstance");m(this,"plane");m(this,"css3DRenderer",new Wt);m(this,"camera");m(this,"scene");m(this,"container");m(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 I.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new I.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 I.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 a;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}=jv();this.points=r.map((l,c)=>({direction:l.direction,point:l.element,position:this.calculatePointPosition(e)[c]})),o.insertBefore(s,(a=o.children[0])!=null?a:null),this.updatePosition()}getCornerPositions(){const{originObject3D:e}=this;if(e.isCSS3DObjectPlus)return e.cornerPoints;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)]}}class Qv extends Ev{constructor(e){super(e);m(this,"box");m(this,"outline");m(this,"originObject");m(this,"positionAttribute");this.originObject=e,this.positionAttribute=new I.BufferAttribute(new Float32Array(8*3),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}raycasterIntersectObject(e,n){return e.intersectObject(this,!1,n)}raycast(e,n){this.box.raycast(e,n)}update(){const e=xl(this.originObject);if(!e)return;const{min:n,max:o}=e;this.positionAttribute.setXYZ(0,o.x,o.y,o.z),this.positionAttribute.setXYZ(1,n.x,o.y,o.z),this.positionAttribute.setXYZ(2,n.x,n.y,o.z),this.positionAttribute.setXYZ(3,o.x,n.y,o.z),this.positionAttribute.setXYZ(4,o.x,o.y,n.z),this.positionAttribute.setXYZ(5,n.x,o.y,n.z),this.positionAttribute.setXYZ(6,n.x,n.y,n.z),this.positionAttribute.setXYZ(7,o.x,n.y,n.z),this.positionAttribute.needsUpdate=!0}createOutline(){const e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new I.BufferGeometry;n.setIndex(new I.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new I.LineBasicMaterial({color:64767,linewidth:1,opacity:1,depthTest:!1,transparent:!0,toneMapped:!1}),s=new I.LineSegments(n,o);return s.matrixAutoUpdate=!1,s}createBox(){const e=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),n=new I.BufferGeometry;n.setIndex(new I.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new I.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new I.Mesh(n,o)}}class Ov extends xn{constructor(...e){super(...e);m(this,"name","MoveController");m(this,"startInfo");m(this,"_moveByMouseEnable",!1);m(this,"mouseInfo");m(this,"mousedownEventListenerDisposer");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),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r),this.hooks.on("rotateStart",l),this.hooks.on("rotateEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",o),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r),this.hooks.off("rotateStart",l),this.hooks.off("rotateEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}),this.moveByMouseEnable&&this.moveByMouse()}get moveByMouseEnable(){return this._moveByMouseEnable}dispose(){var e;super.dispose(),(e=this.disposers)==null||e.forEach(n=>n==null?void 0:n())}moveByMouse(){this._moveByMouseEnable=!0;const e=this.handleMouseDown.bind(this),n=this.handleMouseUp.bind(this);this.hooks.emit("moveByMouseEnable"),setTimeout(()=>{this.container.addEventListener("mousedown",e),this.container.addEventListener("mouseup",n)}),this.mousedownEventListenerDisposer=()=>{this.container.removeEventListener("mousedown",e),this.container.removeEventListener("mouseup",n)}}disableMoveByMouse(){var e;this._moveByMouseEnable=!1,this.hooks.emit("moveByMouseDisable"),(e=this.mousedownEventListenerDisposer)==null||e.call(this)}onIntersectionOnModelUpdate(e){!this.moveByMouseEnable||this.hooks.emit("wantToMove",e.point)||(this.originObject3D.position.copy(e.point),this.hooks.emit("setObjectPosition",e.point),this.hooks.emit("move",e.point))}onApplyOriginObjectScale(e){}handleMouseDown(e){const{x:n,y:o}=e;this.mouseInfo={x:n,y:o,mouseDownTimestamp:Date.now()}}handleMouseUp(e){if(!this.mouseInfo)return;const{x:n,y:o}=e;this.mouseInfo.x===n&&this.mouseInfo.y===o&&Date.now()-this.mouseInfo.mouseDownTimestamp<500&&(this.disableMoveByMouse(),this.mouseInfo=void 0)}dragStart(e){if(this._moveByMouseEnable||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 I.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new I.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new I.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(),h=new I.Plane;h.setFromNormalAndCoplanarPoint(c,u),this.startInfo={startVectorProject:u.clone().projectOnVector(l),directionVector:l,plane:h},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=bo(this.camera,e,this.container);return n?(console.log("%c MoveController 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 I.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),u=new I.Matrix4;u.setPosition(c);const h=r.position.clone().applyMatrix4(u);this.hooks.emit("wantToMove",h)||(r.applyMatrix4(u),s.copy(l),this.hooks.emit("applyObjectPosition",{matrix4:u}),this.hooks.emit("move",h))}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 Dn{constructor(t,e,n,o,s,r){m(this,"helperController");m(this,"five");m(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});m(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});m(this,"onFiveIntersectionOnModelUpdate",(...t)=>{!this.helperController||this.helperController.onIntersectionOnModelUpdate(...t)});const{camera:a,model:l,scene:c}=t,u=t.getElement();if(this.five=t,!a||!l||!u||!c)return;const h=()=>{t.needsRender=!0};this.helperController=new e({camera:a,model:l,originObject3D:n,helperObject3D:o,container:u,scene:c,onRender:h,sharedHooks:r},s),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture),t.on("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate)}dispose(){var t;this.five.off("wantsTapGesture",this.onFiveWantsTapGesture),this.five.off("wantsGesture",this.onFiveWantsGesture),this.five.off("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate),(t=this.helperController)==null||t.dispose()}}const Eo="Object3DHelper@v1.0.1",Rv=()=>{console.error(`${Eo} is disposed`)},Fv=()=>{console.warn(`${Eo} is disabled`)},Gv=()=>{console.error(`${Eo} is disabled`)};class Hv{constructor(t){m(this,"controllers",{});m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"hooks",new Gt);m(this,"eventListener",{});t&&this.addControllers(t),this.setState(this.state)}show(t){return N(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return N(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 Rv();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return Gv();const n=F({},this.state);this.state=F(F({},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=F(F({},this.controllers),t),this.setState(this.state)}getCurrentState(){return this.state}handleEnable(t,e=!0){t?(this.everyControllerDo(n=>{n.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(n=>{n.disable()}),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()}),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()});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&&Fv()}}class Wv extends xn{constructor(...e){super(...e);m(this,"name","RotateController");m(this,"startInfo");m(this,"lastRotation");m(this,"rotations",[]);m(this,"helperObject3DQuaternion",this.originObject3D.quaternion.clone());m(this,"removeListener");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),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.removeListener=()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",o),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}}get rotateCenter(){return this.helperObject3D.position.clone()}initialHelperQuaternion(){this.helperObject3D.updateAngleHelperQuaternion(),this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}setRotateAngle(e){const{x:n=0,y:o=0,z:s=0}=e,r=new I.Euler(Math.PI*n/180,Math.PI*o/180,Math.PI*s/180),a=new I.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:u}=this;if(u){const h=new I.Vector3().subVectors(c.position,u).applyQuaternion(a).add(u);c.position.copy(h)}c.quaternion.copy(a),this.helperObject3DQuaternion.copy(a),this.hooks.emit("setObjectRotate",a,u),this.hooks.emit("rotate",a),this.render()}dispose(){this.removeListener(),super.dispose()}onApplyOriginObjectScale(e){}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.getAngleHelper(o);this.setTipsAngle(0);const a=s.clone();a.y+=.2,this.setTipsPosition(a);const l=new I.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),c=new I.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),u=new I.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),h=(()=>{switch(o){case"x":return l;case"y":return c;case"z":return u}})(),d=new I.Plane().setFromNormalAndCoplanarPoint(h,s),f=new I.Vector3;d.projectPoint(s.clone(),f);const p=f.clone().sub(this.rotateCenter),v=p.clone(),g=p.angleTo(r.baseAxes);this.setAngleHelperStart(o,g),this.setAngleHelperLength(o,0),this.rotations.push({vector:p.clone(),direction:!0}),this.startInfo={direction:o,startVector:p,staticStartVector:v,plane:d,angleHelper:r},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=bo(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=e.ray.intersectPlane(o,new I.Vector3);if(!l)return;const c=this.rotateCenter,u=new I.Vector3;o.projectPoint(l.clone(),u);const h=u.clone().sub(c);if(n.angleTo(h)===0||(this.lastRotation===void 0&&(this.lastRotation={angle:0}),this.rotations.length===0))return;const d=(()=>{if(this.rotations.length===1)return h.angleTo(s.baseAxes)>r.angleTo(s.baseAxes);{const A=this.rotations[this.rotations.length-1],y=this.rotations[this.rotations.length-2],w=h.angleTo(y.vector),C=h.angleTo(A.vector),x=A.vector.angleTo(y.vector);if(x===0||C===0||w===0)return;if(w>C&&w>x)return A.direction;if(w<x&&C<x||w<C&&C>x)return!A.direction}})();if(d===void 0)return console.warn("rotationDirection is undefined");const f=new I.Quaternion().setFromUnitVectors(n.clone().normalize(),h.clone().normalize()),{originObject3D:p}=this,v=p.quaternion.clone().premultiply(f);if(!this.hooks.emit("wantToRotate",v)){if(this.rotations.push({vector:h,direction:d}),this.rotations=this.rotations.slice(-2),this.lastRotation.angle=this.lastRotation.angle+h.angleTo(n)*(d?1:-1),this.setAngleHelperLength(a,this.lastRotation.angle),this.setTipsAngle(this.lastRotation.angle/Math.PI*180),c){const A=new I.Vector3().subVectors(p.position,c).applyQuaternion(f).add(c);p.position.copy(A)}p.applyQuaternion(f),this.helperObject3DQuaternion.premultiply(f),this.hooks.emit("applyObjectRotate",{quaternion:f,origin:c}),this.hooks.emit("rotate",p.quaternion),this.startInfo.startVector=h}}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 I.Mesh&&o.geometry instanceof I.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new I.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 I.Mesh&&r.geometry instanceof I.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new I.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 Nv extends xn{constructor(...e){super(...e);m(this,"startInfo");m(this,"name","RectangleScaleController")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}onApplyOriginObjectScale(e){}getDragPlane(){const e=new I.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new O.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=bo(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n),console.log("%c RectangleScaleController dragging","color: #49de1b")}scale(e){var j,_;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 O.Vector3);if(!a||Sv(a,this.camera.position))return;const l=new O.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:u}=o,h=new O.Vector3().subVectors(r[1],r[0]),d=new O.Vector3().subVectors(r[3],r[0]),f=G=>{const Z=new O.Vector3(0,0,0);if(!this.startInfo)return Z;const Q=(G==="ew"?h:d).clone(),B=c.clone().projectOnVector(Q),R=a.clone().projectOnVector(Q),W=l.clone().projectOnVector(Q);if(R.equals(B))return Z;if(G==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const X=new O.Vector3().subVectors(R,W),J=X.x<0&&Q.x>=0,he=X.y<0&&Q.y>=0,fe=X.z<0&&Q.z>=0;this.startInfo.dragPointInCenterBottom=J||he||fe}if(G==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const X=new O.Vector3().subVectors(R,W),J=X.x<0&&Q.x>=0,he=X.y<0&&Q.y>=0,fe=X.z<0&&Q.z>=0;this.startInfo.dragPointInCenterLeft=J||he||fe}const H=new O.Vector3().subVectors(R,B),te=H.length();return te>.3?(console.warn("offset.length() > 0.3, skipped",te),Z):H},p=f("ew"),v=f("ns"),g=()=>{const G=p;this.helperObject3D.cornerPositions.forEach((Z,Q)=>{var B;(B=this.startInfo)!=null&&B.dragPointInCenterLeft?(Q===0||Q===3)&&Z.add(G):(Q===1||Q===2)&&Z.add(G)})},A=()=>{const G=v;this.helperObject3D.cornerPositions.forEach((Z,Q)=>{var B;(B=this.startInfo)!=null&&B.dragPointInCenterBottom?(Q===0||Q===1)&&Z.add(G):(Q===2||Q===3)&&Z.add(G)})};switch(u){case"ew":g();break;case"ns":A();break;case"nesw":case"nwse":g(),A()}const y=new O.Vector3().subVectors(r[1],r[0]).length()/h.length(),w=new O.Vector3().subVectors(r[3],r[0]).length()/d.length(),C=new O.Vector3(y,w,1),x=new I.Matrix4().scale(C);n.isCSS3DObjectPlus?n.applyScaleMatrix4(x):n.scale.applyMatrix4(x),o.position.copy(a);const E=new O.Vector3().addVectors(r[0],r[2]).divideScalar(2),S=new O.Vector3().subVectors(E,l),k=new I.Matrix4().setPosition(S);n.applyMatrix4(k),(j=this.helperObject3D.css3DInstance)==null||j.css3DObject.applyMatrix4(k),(_=this.helperObject3D.plane)==null||_.applyMatrix4(k),this.hooks.emit("applyObjectScale",{matrix4:x}),this.hooks.emit("applyObjectPosition",{matrix4:k}),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 _v extends Nv{constructor(...e){super(...e);m(this,"name","CSS3DScaleController");this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(e=>{if(!e)return;const n=e.point,o=a=>this.dragStart(a,e),s=this.dragging.bind(this),r=this.dragEnd.bind(this);n.addEventListener("dragstart",o),n.addEventListener("drag",s),n.addEventListener("dragend",r)})}}class Xv extends xn{constructor(...e){super(...e);m(this,"name","BoundingBoxController")}}class Yv extends Dl{constructor(t){super(t)}}const ko="v1.0.0",xo="Object3DHelperPlugin",Ci=`${xo}@${ko}`,Uv=()=>{console.error(`${Ci} is disposed`)},Jv=()=>{console.warn(`${Ci} is disabled`)},Zv=()=>{console.error(`${Ci} is disabled`)};class Sl extends ti{constructor(e){super(e);m(this,"version",ko);m(this,"name",xo);m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"objectHelperMap",new Map);m(this,"css3DObjectParentMap",new Map);m(this,"css3DRender");this.five=e,this.css3DRender=new Wt(this.five.scene),console.warn("Object3DHelper: \u4F7F\u7528\u6B64\u63D2\u4EF6\uFF0C\u9700\u8981\u5728\u521D\u59CB\u5316five\u65F6\uFF0C\u8BBE\u7F6Efive\u53C2\u6570: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${xo.toUpperCase()}_DEBUG__`]:this})}show(e){return N(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return N(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 Uv();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return Zv();const o=F({},this.state);this.state=F(F({},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 f;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 Hv,s=[],r=(f=this.five.getElement())==null?void 0:f.parentElement,a=this.five.camera,{moveHelper:l=!0,rotateHelper:c=!0,scaleHelper:u=!0,boundingBoxHelper:h=!1}=n,d=new me.Subscribe;if(l){const p=new Mv(e),v=this.getConfig(n.moveHelper),g=new Dn(this.five,Ov,e,p,v,d);o.addControllers({moveController:g.helperController}),s.push(()=>g.dispose())}if(c){const p=this.getConfig(n.rotateHelper),v=new Bv(e,F({container:r},p)),g=new Dn(this.five,Wv,e,v,p,d);o.addControllers({rotateController:g.helperController}),s.push(()=>g.dispose())}if(h){const p=new Qv(e),v=new Dn(this.five,Xv,e,p,void 0,d);o.addControllers({boundingBoxController:v.helperController})}if(u)if(e.isCSS3DObjectPlus&&r){const p=new Vv(e,r,a,this.five.scene),v=new Dn(this.five,_v,e,p,void 0,d);o.addControllers({scaleController:v.helperController}),s.push(()=>v.dispose()),Ro(this.five).then(()=>{var g,A;if(e.isCSS3DObjectPlus){const y=e;if(!y||y.mode!=="front")return;const w=(g=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?g:Fo(this.five);w&&(this.css3DObjectParentMap.set(y,y.parent),y.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(w),(A=this.css3DRender.getBehindCSS3DObjectGroup())==null||A.add(y),this.css3DRender.render(this.five.camera))}})}else{const p=new Yv(e),v=new Dn(this.five,Cv,e,p,void 0,d);o.addControllers({scaleController:v.helperController}),s.push(()=>v.dispose())}return this.objectHelperMap.set(e,{helper:o,disposers:s}),o.controllers}removeObject3DHelper(e){if(!this.objectHelperMap.has(e))return;const{helper:n,disposers:o}=this.objectHelperMap.get(e);if(!!n){if(e.isCSS3DObjectPlus){const s=e,r=this.css3DObjectParentMap.get(s);r&&r.add(s),this.css3DRender.render(this.five.camera)}this.objectHelperMap.delete(e),n.dispose(),o==null||o.forEach(s=>s==null?void 0:s())}}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.objectHelperMap.forEach(({helper:e,disposers:n})=>{e.dispose(),n==null||n.forEach(o=>o==null?void 0:o())})}everyHelperDo(e){this.objectHelperMap.forEach(({helper:n,disposers:o})=>{n&&e(n)})}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&Jv()}getConfig(e){if(!!e&&typeof e!="boolean"&&e.enable)return e}}const qv=i=>new Sl(i);Y.CSS3DRender=Wt,Y.CSS3DRenderPlugin=Nt,Y.CameraMovementEffect=Xs,Y.CameraMovementPlugin=ph,Y.ContentType=Kr,Y.CruisePlugin=Zm,Y.CruisePluginController=so,Y.DIRECTION=on,Y.DISPLAY_STRATEGY_TYPE=Vt,Y.DimensionType=$r,Y.FLOOR_PLAN_ATTACHED_TO=It,Y.FLOOR_TYPE_MAP=ih,Y.GuideLinePlugin=Nr,Y.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=Qt,Y.ItemLabelPlugin=wm,Y.Magnifier=or,Y.MapviewFloorplanPlugin=jd,Y.ModelChassisCompassPlugin=rh,Y.ModelEntryDoorGuidePlugin=ch,Y.ModelFloorplanPlugin=Md,Y.ModelItemLabelPlugin=tm,Y.ModelRoomLabelPlugin=Wc,Y.ModelTVVideoPlugin=om,Y.ModelViewPlugin=ql,Y.Object3DHelperController=Sl,Y.Object3DHelperPlugin=qv,Y.PLUGIN=Ci,Y.PaintBrush=Zl,Y.PaintBrushTypeEnum=at,Y.PanoCompassPlugin=Vh,Y.PanoCursorRaycasterPlugin=pc,Y.PanoDoorLabelPlugin=Bm,Y.PanoFloorplanRadarPlugin=th,Y.PanoMeasurePlugin=Lf,Y.PanoMeasurePluginLine=jt,Y.PanoMeasurePluginModel=di,Y.PanoMeasurePluginPoint=Ze,Y.PanoMeasurePluginPolyline=ui,Y.PanoRulerPlugin=yh,Y.PanoRulerProPlugin=Mh,Y.PanoSpatialTagPlugin=Nf,Y.PanoTagPlugin=wv,Y.PanoTagPluginController=kl,Y.PointType=ea,Y.ROOM_FETILE_TYPE_MAP=nh,Y.ROOM_TYPE_MAP=oh,Y.Rotation=tt,Y.TopviewFloorplanPlugin=Qd,Y.Util=F0,Y.VERSION=ko,Y.itemLabelPluginServerParams=Cm,Y.modelItemLabelPluginServerParams=nm,Y.modelRoomLabelPluginServerParams=Nc,Y.pluginFlag=yv,Object.defineProperties(Y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
561
|
+
`;function V0(){const i=new I.PlaneGeometry(.4,.4),t=T0,e=new I.TextureLoader().load(t);e.encoding=I.sRGBEncoding;const n=new I.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new I.Mesh(i,n)}function Q0(){const i=new I.CurvePath;i.add(new I.LineCurve3(new I.Vector3(0,0,0),new I.Vector3(0,0,.1)));const t=new I.TubeGeometry(i,8,.003),e=new I.ShaderMaterial({vertexShader:B0,fragmentShader:j0,depthTest:!1,transparent:!0});return new I.Mesh(t,e)}function O0(){const i=new I.SphereGeometry(.01,20,20),t=new I.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:I.DoubleSide}),e=new I.Mesh(i,t);return e.position.set(0,0,.1),e}class Ya extends I.Object3D{constructor(){super();m(this,"planeMesh");m(this,"lineMesh");m(this,"ballMesh");this.planeMesh=V0(),this.lineMesh=Q0(),this.ballMesh=O0(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new I.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 Ua{constructor(t){m(this,"five");m(this,"contentElement",document.createElement("div"));m(this,"animeIns");m(this,"container");m(this,"css3DObject");m(this,"disposeCss3DObject");m(this,"state",{enabled:!1});this.five=t;const n=.4/2,s=Nt(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new I.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(${fr})`,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 I.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 Zi({progress:0}).to({progress:[1,0]}).duration(500).easing(zn.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class R0{constructor(t,e){m(this,"five");m(this,"hooks",new me.Subscribe);m(this,"magnifier",null);m(this,"pointHelper",null);m(this,"pointDomHelper",null);m(this,"contentDom",document.createElement("div"));m(this,"state",{enabled:!1});m(this,"group",new I.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 Ya:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new Ua(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 F0=Object.freeze(Object.defineProperty({__proto__:null,Interval:go,Rectangle:D0,Magnifier:_a,getCoordsFromClient:S0,getCoordsFromElement:Xa,getRaycasterFromFivePointer:M0,getIntersectFromRelativePosition:z0,PointHelper:Ya,PointDomHelper:Ua,FivePointSelector:R0,isNil:Gm,notNil:qe,BetterTween:Zi,tweenProgress:_s,nextFrame:ni,requestAnimationFrameInterval:ii,getFrameTime:dh},Symbol.toStringTag,{value:"Module"}));function G0(i){ce(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 Ja(i,t,e){const n=i.slice();return n[0]=t[e],n}function Za(i,t,e){const n=i.slice();return n[0]=t[e],n}function qa(i){let t,e=i[0]+"",n;return{c(){t=T("div"),n=De(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){z(o,t,s),V(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Me(n,e)},d(o){o&&M(t)}}}function Ka(i){let t,e=i[0]&&qa(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=qa(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&M(t)}}}function $a(i){let t,e=i[0]+"",n;return{c(){t=T("div"),n=De(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){z(o,t,s),V(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Me(n,e)},d(o){o&&M(t)}}}function el(i){let t,e=i[0]&&$a(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=$a(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&M(t)}}}function tl(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&nl(i);return{c(){t=T("div"),e=T("span"),o=De(n),s=ne(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){z(a,t,l),V(t,e),V(e,o),V(t,s),r&&r.m(t,null)},p(a,l){l&4&&n!==(n=a[2].price.value+"")&&Me(o,n),a[2].price.unit?r?r.p(a,l):(r=nl(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&M(t),r&&r.d()}}}function nl(i){let t,e=i[2].price.unit+"",n;return{c(){t=T("span"),n=De(e),b(t,"class","unit svelte-8mby9k")},m(o,s){z(o,t,s),V(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&Me(n,e)},d(o){o&&M(t)}}}function il(i){let t,e=i[2].highlightText+"",n;return{c(){t=T("div"),n=De(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){z(o,t,s),V(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&Me(n,e)},d(o){o&&M(t)}}}function H0(i){var Z,Q;let t,e,n,o,s,r,a,l,c,u,h,d,f,p,v=i[2].title+"",g,A,y,w=qe((Z=i[2].price)==null?void 0:Z.value)&&((Q=i[2].price)==null?void 0:Q.value)!=="",C,x;e=new nt({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let E=i[2].brandTags||[],S=[];for(let B=0;B<E.length;B+=1)S[B]=Ka(Za(i,E,B));let k=i[2].tags||[],j=[];for(let B=0;B<k.length;B+=1)j[B]=el(Ja(i,k,B));let _=w&&tl(i),G=i[2].highlightText&&il(i);return{c(){var B;t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),s=ne(),r=T("div"),a=T("img"),c=ne(),u=T("div");for(let R=0;R<S.length;R+=1)S[R].c();h=ne();for(let R=0;R<j.length;R+=1)j[R].c();d=ne(),f=T("div"),p=T("div"),g=De(v),A=ne(),y=T("div"),_&&_.c(),C=ne(),G&&G.c(),b(o,"class","line svelte-8mby9k"),L(o,"transition-delay",i[1]?vi+"ms":bi+sl-ol-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),Xe(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(u,"class","tag svelte-8mby9k"),b(p,"class","text svelte-8mby9k"),b(f,"class","title svelte-8mby9k"),b(y,"class","footer svelte-8mby9k"),L(y,"height",qe((B=i[2].price)==null?void 0:B.value)&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),L(r,"transition-delay",i[1]?vi+bi+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),q(t,"unfolded",i[1]),q(t,"folded",i[3])},m(B,R){z(B,t,R),K(e,t,null),V(t,n),V(t,o),V(t,s),V(t,r),V(r,a),V(r,c),V(r,u);for(let W=0;W<S.length;W+=1)S[W].m(u,null);V(u,h);for(let W=0;W<j.length;W+=1)j[W].m(u,null);V(r,d),V(r,f),V(f,p),V(p,g),V(r,A),V(r,y),_&&_.m(y,null),V(y,C),G&&G.m(y,null),x=!0},p(B,[R]){var H,te,X;const W={};if(R&2&&(W.visible=B[1]),e.$set(W),R&2&&L(o,"transition-delay",B[1]?vi+"ms":bi+sl-ol-40+"ms"),(!x||R&4&&!Xe(a.src,l=B[2].headerPictureUrl))&&b(a,"src",l),R&4){E=B[2].brandTags||[];let J;for(J=0;J<E.length;J+=1){const he=Za(B,E,J);S[J]?S[J].p(he,R):(S[J]=Ka(he),S[J].c(),S[J].m(u,h))}for(;J<S.length;J+=1)S[J].d(1);S.length=E.length}if(R&4){k=B[2].tags||[];let J;for(J=0;J<k.length;J+=1){const he=Ja(B,k,J);j[J]?j[J].p(he,R):(j[J]=el(he),j[J].c(),j[J].m(u,null))}for(;J<j.length;J+=1)j[J].d(1);j.length=k.length}(!x||R&4)&&v!==(v=B[2].title+"")&&Me(g,v),R&4&&(w=qe((H=B[2].price)==null?void 0:H.value)&&((te=B[2].price)==null?void 0:te.value)!==""),w?_?_.p(B,R):(_=tl(B),_.c(),_.m(y,C)):_&&(_.d(1),_=null),B[2].highlightText?G?G.p(B,R):(G=il(B),G.c(),G.m(y,null)):G&&(G.d(1),G=null),R&4&&L(y,"height",qe((X=B[2].price)==null?void 0:X.value)&&B[2].highlightText?void 0:"1rem"),R&2&&L(r,"transition-delay",B[1]?vi+bi+"ms":"0ms"),(!x||R&2)&&q(t,"unfolded",B[1]),(!x||R&8)&&q(t,"folded",B[3])},i(B){x||(P(e.$$.fragment,B),x=!0)},o(B){D(e.$$.fragment,B),x=!1},d(B){B&&M(t),$(e),dt(S,B),dt(j,B),_&&_.d(),G&&G.d()}}}const vi=400,ol=500,bi=180,sl=500;function W0(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 N0 extends re{constructor(t){super(),se(this,t,W0,H0,oe,{tag:0},G0)}}const an="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uQxAACFEII9ACZ/sJZwWEoEb8w/////N//////JcxjHjf+7/v/H2PzCCFAiDtGeyBCIx7bJJ1mmEEMy6g8mm2c8nrGABB4h2Mkmn//4z/73u773R5qHHu/j/w7Kxkzh5lWRWdsifCkNAnY9Zc1HvDAhjhSHdFkHFzLmabt/AQxSg2wwzLhHIJOBnAWwVY4zrhIYhhc2kvhYDfQ4hDi2Gmh5KyFn8EcGIrHAngNgIwVIEMf5bzbAiTRoAD///8z/KVhkkWEle6IX+d/z4fvH3BShK1e5kmjkCMoxVmXhd4ROlTKo3iipasvTilY21q19ta30/v/0/idPX1v8PNxJL6ramnOVsdvMv2akO0iSYIzdJFirtzWXCZicS9vHqvSKyqm5XJBdqBwPxyfJd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VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",kn={};var yi=(i=>(i.Default="default",i.GetAudioDuration="getAudioDuration",i.PlayAudio="playAudio",i))(yi||{});function rl(i,t){const e=(t==null?void 0:t.namespace)||"default",n=kn[e]||(kn[e]=[]);let o=n.find(s=>!s.realSrc||s.realSrc===an);return o||(console.warn("\u672A\u627E\u5230\u7F13\u5B58\u97F3\u9891\uFF0C\u5DF2\u65B0\u5EFA",kn),o=new Ao(an),n.push(o)),i&&(o.src=i),o}function _0(i){return N(this,null,function*(){const t=(()=>i instanceof Ao?i:rl(i,{namespace:"getAudioDuration"}))(),e=yield new Promise(n=>{t.duration?t.isBlankAudio?n(0):n(t.duration):(t.addEventListener("loadedmetadata",()=>{t.isBlankAudio?n(0):n(t.duration)}),t.addEventListener("canplaythrough",()=>{t.isBlankAudio?n(0):n(t.duration)}))});return typeof i=="string"&&t.clear(),e})}function al(i,t){const e=(t==null?void 0:t.namespace)||"default",n=kn[e]||(kn[e]=[]),o=i-n.length;if(!(o<=0))for(let s=0;s<o;s++)n.push(new Ao(an))}class Ao extends Audio{constructor(e){super(e);m(this,"preload","auto");m(this,"realSrc","");m(this,"inited",!1);m(this,"removeDocumentEventListener");this.realSrc=e!=null?e:"",super.addEventListener("ended",()=>{this.src=""});const n=()=>X0(this);document.addEventListener("click",n),document.addEventListener("touchend",n),this.removeDocumentEventListener=()=>{document.removeEventListener("click",n),document.removeEventListener("touchend",n)}}get isBlankAudio(){return this.realSrc===an||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e}clear(){this.src=an,this.currentTime=0}}function X0(i){!i||i.inited||(i.src&&(i.inited=!0,i.removeDocumentEventListener()),i.src===an&&i.play())}class Y0 extends Audio{constructor(e){super();m(this,"sharedAudioSrc");m(this,"sharedAudioPaused",!0);m(this,"sharedAudioCurrentTime",0);m(this,"tryplaying",!1);m(this,"audioInstance");m(this,"eventListenerDisposer");this.sharedAudioSrc=e}get paused(){var e;return(e=this.sharedAudioPaused)!=null?e:!0}get currentTime(){return this.sharedAudioCurrentTime}play(){return N(this,null,function*(){var e,n,o;this.tryplaying||(this.tryplaying=!0,(!this.audioInstance||((e=this.audioInstance)==null?void 0:e.realSrc)!==this.sharedAudioSrc)&&(this.audioInstance=rl(this.sharedAudioSrc,{namespace:yi.PlayAudio})),this.audioInstance.currentTime=(n=this.currentTime)!=null?n:0,(o=this.eventListenerDisposer)==null||o.call(this),this.eventListenerDisposer=this.addEventListeners(),this.audioInstance.play().then(()=>{this.sharedAudioPaused=!1}).catch(s=>{this.pause(),console.warn(s)}).finally(()=>{this.tryplaying=!1}))})}pause(){!this.audioInstance||this.paused||(this.sharedAudioPaused=!0,this.audioInstance.addEventListener("pause",()=>{var e;(e=this.eventListenerDisposer)==null||e.call(this)},{once:!0}),this.audioInstance.pause())}dispose(){this.clear(),this.audioInstance=void 0}clear(){var e;(e=this.audioInstance)==null||e.clear()}addEventListeners(){const e=this.audioInstance;if(!e)return;const n=d=>{var f;this.sharedAudioCurrentTime=e.currentTime,(f=this.ontimeupdate)==null||f.call(this,d)},o=d=>{var f;return(f=this.onplay)==null?void 0:f.call(this,d)},s=d=>{var f;(f=this.onpause)==null||f.call(this,d),this.clear()},r=d=>{var f;(f=this.onended)==null||f.call(this,d),this.sharedAudioCurrentTime=0},a=d=>{var f;return(f=this.onerror)==null?void 0:f.call(this,d)},l=d=>{var f;return(f=this.oncanplay)==null?void 0:f.call(this,d)},c=d=>{var f;return(f=this.oncanplaythrough)==null?void 0:f.call(this,d)},u=d=>{var f;return(f=this.onloadeddata)==null?void 0:f.call(this,d)},h=d=>{var f;return(f=this.onloadedmetadata)==null?void 0:f.call(this,d)};return e.addEventListener("timeupdate",n),e.addEventListener("play",o),e.addEventListener("pause",s),e.addEventListener("ended",r),e.addEventListener("error",a),e.addEventListener("canplay",l),e.addEventListener("canplaythrough",c),e.addEventListener("loadeddata",u),e.addEventListener("loadedmetadata",h),()=>{e.removeEventListener("timeupdate",n),e.removeEventListener("play",o),e.removeEventListener("pause",s),e.removeEventListener("ended",r),e.removeEventListener("error",a),e.removeEventListener("canplay",l),e.removeEventListener("canplaythrough",c),e.removeEventListener("loadeddata",u),e.removeEventListener("loadedmetadata",h)}}}function U0(i){ce(i,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function J0(i){let t,e,n,o;const s=i[8].default,r=Xt(s,i,i[7],null);return{c(){t=T("div"),r&&r.c(),b(t,"class","audio svelte-13e7hxv"),b(t,"style",i[0])},m(a,l){z(a,t,l),r&&r.m(t,null),e=!0,n||(o=Pe(t,"click",Jo(i[1])),n=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&Ut(r,s,a,a[7],e?Yt(s,a[7],l,null):Jt(a[7]),null),(!e||l&1)&&b(t,"style",a[0])},i(a){e||(P(r,a),e=!0)},o(a){D(r,a),e=!1},d(a){a&&M(t),r&&r.d(a),n=!1,o()}}}function Z0(i,t,e){let{$$slots:n={},$$scope:o}=t,{url:s}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=vn(),u=Mt("hooks"),h=Mt("mediaStore");let d,f=!0;function p(){e(5,d.onplay=g=>{u.emit("playStateChange",F({event:g,state:"playing",mediaInstance:d},l)),c("play"),e(6,f=!1)},d),e(5,d.onpause=g=>{u.emit("playStateChange",F({event:g,state:"paused",mediaInstance:d},l)),c("pause"),e(6,f=!0)},d),e(5,d.onloadedmetadata=g=>{typeof d.duration=="number"&&!Number.isNaN(d.duration)&&c("duration",d.duration)},d),e(5,d.ontimeupdate=g=>{c("timeupdate",d.currentTime)},d)}h.subscribe(({currentMediaElement:g})=>{g!==d&&(f||d==null||d.pause())});function v(g){!d||(u.emit("click",F({event:g,target:"AudioTagPlayIcon",audioInstance:d},l)),h.set({currentMediaElement:d}),u.emit("playStateChange",F({event:g,state:d.paused?"playing":"paused",mediaInstance:d},l)),d.paused?d.play():d.pause())}return i.$$set=g=>{"url"in g&&e(2,s=g.url),"enable"in g&&e(3,r=g.enable),"style"in g&&e(0,a=g.style),"hooksInfo"in g&&e(4,l=g.hooksInfo),"$$scope"in g&&e(7,o=g.$$scope)},i.$$.update=()=>{i.$$.dirty&4&&(s||c("duration",0)),i.$$.dirty&36&&(d==null||d.dispose(),e(5,d=new Y0(s)),c("audioRef",d),setTimeout(()=>c("audioRef",d),200),_0(s).then(g=>c("duration",g)),p()),i.$$.dirty&40&&(r||d==null||d.pause()),i.$$.dirty&72&&c(r&&!f?"play":"pause")},[a,v,s,r,l,d,f,o,n]}class ll extends re{constructor(t){super(),se(this,t,Z0,J0,oe,{url:2,enable:3,style:0,hooksInfo:4},U0)}}function q0(i){ce(i,"svelte-srt2pi",".audio-icon__wrapper.svelte-srt2pi.svelte-srt2pi{display:inline-block}.audio-icon.svelte-srt2pi.svelte-srt2pi{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:50%;background-color:rgba(255, 255, 255, 0.8)}.audio-icon.svelte-srt2pi .sound-wave__container.svelte-srt2pi{position:absolute;pointer-events:none;width:60%;height:60%}.sound-wave.svelte-srt2pi.svelte-srt2pi{animation-duration:2s;animation-iteration-count:infinite;animation-play-state:paused;transition:opacity 0}.playing.svelte-srt2pi .sound-wave.svelte-srt2pi{animation-play-state:running}.playing.svelte-srt2pi .sound-wave-1.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_1_animation}.playing.svelte-srt2pi .sound-wave-2.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_2_animation}.playing.svelte-srt2pi .sound-wave-3.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_3_animation}@keyframes svelte-srt2pi-sound_wave_1_animation{0%,10%{opacity:0}25%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_2_animation{0%,35%{opacity:0}50%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_3_animation{0%,60%{opacity:0}75%,100%{opacity:1}}")}function cl(i){let t,e;return t=new nt({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function K0(i){let t,e,n,o,s,r=i[1]&&cl();return{c(){t=T("div"),r&&r.c(),e=ne(),n=T("div"),o=T("div"),o.innerHTML='<svg width="100%" height="100%" viewBox="0 0 128 128"><g transform="rotate(-45 12 64) translate(12 64)" fill="black" stroke="black" fill-opacity="0.6" stroke-opacity="0.6"><path stroke="none" class="sound-wave sound-wave-1 svelte-srt2pi" d="M0,23 A23,23 0 0,0 23,0 L0,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-2 svelte-srt2pi" d="M0,46 A46,46 0 0,0 46,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-3 svelte-srt2pi" d="M0,80 A80,80 0 0,0 80,0"></path></g></svg>',b(o,"class","sound-wave__container svelte-srt2pi"),b(n,"class","audio-icon svelte-srt2pi"),q(n,"playing",i[0]),b(t,"class","audio-icon__wrapper svelte-srt2pi"),b(t,"style",i[2]),L(t,"width",i[5]),L(t,"height",i[5])},m(a,l){z(a,t,l),r&&r.m(t,null),V(t,e),V(t,n),V(n,o),i[7](o),i[8](t),s=!0},p(a,[l]){a[1]?r?l&2&&P(r,1):(r=cl(),r.c(),P(r,1),r.m(t,e)):r&&(ae(),D(r,1,1,()=>{r=null}),le()),(!s||l&1)&&q(n,"playing",a[0]),(!s||l&4)&&b(t,"style",a[2]),l&32&&L(t,"width",a[5]),l&32&&L(t,"height",a[5])},i(a){s||(P(r),s=!0)},o(a){D(r),s=!1},d(a){a&&M(t),r&&r.d(),i[7](null),i[8](null)}}}function $0(i,t,e){let n,{playing:o}=t,{shadow:s=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function u(d){je[d?"unshift":"push"](()=>{c=d,e(4,c)})}function h(d){je[d?"unshift":"push"](()=>{l=d,e(3,l)})}return i.$$set=d=>{"playing"in d&&e(0,o=d.playing),"shadow"in d&&e(1,s=d.shadow),"style"in d&&e(2,r=d.style),"width"in d&&e(6,a=d.width)},i.$$.update=()=>{i.$$.dirty&64&&e(5,n=typeof a=="number"?ke(a):a)},[o,s,r,l,c,n,a,u,h]}class ul extends re{constructor(t){super(),se(this,t,$0,K0,oe,{playing:0,shadow:1,style:2,width:6},q0)}}function eA(i){ce(i,"svelte-1s6gk4a",".audio-tag.svelte-1s6gk4a{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.audio-icon__wrapper.svelte-1s6gk4a{position:relative;vertical-align:top;width:100%;height:100%}.content.svelte-1s6gk4a{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-1s6gk4a{position:relative;width:100%;height:100%}.audio-icon.svelte-1s6gk4a{pointer-events:none;vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.audio.svelte-1s6gk4a{position:relative;width:100%;height:100%}")}function dl(i){var A,y;let t,e,n,o,s,r,a,l,c,u,h,d,f,p,v;e=new nt({props:{visible:i[6],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let g=i[6]&&hl(i);return c=new ua({props:{visible:i[6],textUnfolded:i[1],content:i[5]}}),d=new ro({props:{unfolded:i[6],length:i[3],outDelay:i[4]+20*Math.min((y=(A=i[5])==null?void 0:A.length)!=null?y:10,15),useLinearColor:!0}}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),s=T("div"),r=T("div"),g&&g.c(),a=ne(),l=T("div"),ee(c.$$.fragment),h=ne(),ee(d.$$.fragment),b(r,"class","audio-icon svelte-1s6gk4a"),ze(()=>i[11].call(l)),L(l,"display","inline-block"),b(s,"class","wrapper svelte-1s6gk4a"),b(o,"class","content svelte-1s6gk4a"),b(t,"class","audio-tag svelte-1s6gk4a"),q(t,"unfolded",i[6])},m(w,C){z(w,t,C),K(e,t,null),V(t,n),V(t,o),V(o,s),V(s,r),g&&g.m(r,null),V(s,a),V(s,l),K(c,l,null),u=bt(l,i[11].bind(l)),V(t,h),K(d,t,null),f=!0,p||(v=Pe(l,"click",i[7]),p=!0)},p(w,C){var k,j;const x={};C&64&&(x.visible=w[6]),C&8&&(x.left=w[3]/2+"px"),e.$set(x),w[6]?g?(g.p(w,C),C&64&&P(g,1)):(g=hl(w),g.c(),P(g,1),g.m(r,null)):g&&(ae(),D(g,1,1,()=>{g=null}),le());const E={};C&64&&(E.visible=w[6]),C&2&&(E.textUnfolded=w[1]),C&32&&(E.content=w[5]),c.$set(E);const S={};C&64&&(S.unfolded=w[6]),C&8&&(S.length=w[3]),C&48&&(S.outDelay=w[4]+20*Math.min((j=(k=w[5])==null?void 0:k.length)!=null?j:10,15)),d.$set(S),(!f||C&64)&&q(t,"unfolded",w[6])},i(w){f||(P(e.$$.fragment,w),P(g),P(c.$$.fragment,w),P(d.$$.fragment,w),f=!0)},o(w){D(e.$$.fragment,w),D(g),D(c.$$.fragment,w),D(d.$$.fragment,w),f=!1},d(w){w&&M(t),$(e),g&&g.d(),$(c),u(),$(d),p=!1,v()}}}function hl(i){let t,e,n,o,s,r,a;return e=new nt({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new ll({props:{enable:i[6],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[tA]},$$scope:{ctx:i}}}),o.$on("play",i[8]),o.$on("pause",i[9]),o.$on("audioRef",i[10]),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),ee(o.$$.fragment),b(t,"class","audio svelte-1s6gk4a")},m(l,c){z(l,t,c),K(e,t,null),V(t,n),K(o,t,null),a=!0},p(l,c){i=l;const u={};c&64&&(u.enable=i[6]),c&1&&(u.url=i[0].data.audioUrl),c&1&&(u.hooksInfo={tag:i[0]}),c&4100&&(u.$$scope={dirty:c,ctx:i}),o.$set(u)},i(l){a||(P(e.$$.fragment,l),P(o.$$.fragment,l),l&&ze(()=>{r&&r.end(1),s=zt(t,Tt,{duration:1e3,delay:0,easing:Kt}),s.start()}),a=!0)},o(l){var c,u;D(e.$$.fragment,l),D(o.$$.fragment,l),s&&s.invalidate(),l&&(r=qt(t,Tt,{duration:1e3,delay:20*Math.min((u=(c=i[5])==null?void 0:c.length)!=null?u:10,15),easing:Kt})),a=!1},d(l){l&&M(t),$(e),$(o),l&&r&&r.end()}}}function tA(i){let t,e,n;return e=new ul({props:{playing:i[2]}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&4&&(r.playing=o[2]),e.$set(r)},i(o){n||(P(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function nA(i){let t,e,n=i[0].state&&dl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&P(n,1)):(n=dl(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function iA(i,t,e){let n,o,s,{tag:r}=t,a=!1,l=!1,c;function u(){e(1,a=!a)}const h=()=>{e(2,l=!0)},d=()=>{e(2,l=!1)};function f(v){bn.call(this,i,v)}function p(){c=this.clientWidth,e(3,c)}return i.$$set=v=>{"tag"in v&&e(0,r=v.tag)},i.$$.update=()=>{var v,g,A;i.$$.dirty&1&&e(6,n=!!((v=r.state)!=null&&v.unfolded)),i.$$.dirty&1&&e(5,o=(A=(g=r.data.title)!=null?g:r.data.text)!=null?A:""),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,o,n,u,h,d,f,p]}class oA extends re{constructor(t){super(),se(this,t,iA,nA,oe,{tag:0},eA)}}function sA(i){const t=document.createElement("div");t.style.color=i,document.body.appendChild(t);const e=window.getComputedStyle(t).color;t.remove();const n=(()=>e.search("rgba")===-1?e.replace("rgb","rgba").replace(")",", 1)"):e)(),o=n.replace("rgba","").replace("(","").replace(")","").split(",").map(s=>Number(s.trim()));return{rgba:n,r:o[0],g:o[1],b:o[2],a:o[3]}}function rA(i){ce(i,"svelte-58hfjf",".audio-tag__wrapper.svelte-58hfjf{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.audio-tag.svelte-58hfjf{position:relative;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:0.1875rem;padding-right:0.625rem;border-radius:624999.9375rem;border:0.03125rem solid rgba(255, 255, 255, 0.2)}.audio__inner.svelte-58hfjf{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.text.svelte-58hfjf{font-weight:bold;font-size:0.75rem;margin-left:0.25rem}.audio-icon__wrapper.svelte-58hfjf{position:relative;vertical-align:top;pointer-events:none;width:1.375rem;height:1.375rem}")}function fl(i){let t,e,n,o;return n=new ll({props:{style:"width: max-content; height: max-content;",enable:i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[lA]},$$scope:{ctx:i}}}),n.$on("play",i[7]),n.$on("pause",i[8]),n.$on("timeupdate",i[9]),n.$on("duration",i[10]),n.$on("audioRef",i[11]),{c(){t=T("div"),e=T("div"),ee(n.$$.fragment),b(e,"class","audio-tag svelte-58hfjf"),L(e,"background-color",i[1]),L(e,"color",i[5]),b(t,"class","audio-tag__wrapper svelte-58hfjf")},m(s,r){z(s,t,r),V(t,e),K(n,e,null),o=!0},p(s,r){const a={};r&1&&(a.enable=s[0].state.visible),r&1&&(a.url=s[0].data.audioUrl),r&1&&(a.hooksInfo={tag:s[0]}),r&8260&&(a.$$scope={dirty:r,ctx:s}),n.$set(a),r&2&&L(e,"background-color",s[1]),r&32&&L(e,"color",s[5])},i(s){o||(P(n.$$.fragment,s),o=!0)},o(s){D(n.$$.fragment,s),o=!1},d(s){s&&M(t),$(n)}}}function aA(i){let t;return{c(){t=De(i[6])},m(e,n){z(e,t,n)},p(e,n){n&64&&Me(t,e[6])},d(e){e&&M(t)}}}function lA(i){let t,e,n,o,s,r,a;return n=new ul({props:{playing:i[2]}}),r=new uo({props:{maxWidth:72,$$slots:{default:[aA]},$$scope:{ctx:i}}}),{c(){t=T("div"),e=T("div"),ee(n.$$.fragment),o=ne(),s=T("div"),ee(r.$$.fragment),b(e,"class","audio-icon__wrapper svelte-58hfjf"),b(s,"class","text svelte-58hfjf"),b(t,"class","audio__inner svelte-58hfjf")},m(l,c){z(l,t,c),V(t,e),K(n,e,null),V(t,o),V(t,s),K(r,s,null),a=!0},p(l,c){const u={};c&4&&(u.playing=l[2]),n.$set(u);const h={};c&8256&&(h.$$scope={dirty:c,ctx:l}),r.$set(h)},i(l){a||(P(n.$$.fragment,l),P(r.$$.fragment,l),a=!0)},o(l){D(n.$$.fragment,l),D(r.$$.fragment,l),a=!1},d(l){l&&M(t),$(n),$(r)}}}function cA(i){let t,e,n=i[0].state&&fl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&P(n,1)):(n=fl(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function uA(i,t,e){let n,o,s,{tag:r}=t;vn();let a=!1,l=0,c=0;const u=()=>{e(2,a=!0)},h=()=>{e(2,a=!1)},d=v=>{e(3,l=v.detail)},f=v=>{e(4,c=v.detail)};function p(v){bn.call(this,i,v)}return i.$$set=v=>{"tag"in v&&e(0,r=v.tag)},i.$$.update=()=>{var v,g;i.$$.dirty&1&&e(6,n=(g=(v=r.data.title)!=null?v:r.data.text)!=null?g:""),i.$$.dirty&1&&e(1,o=(()=>{var A;return r.data.backgroundColor==="dark"?"rgba(0, 0, 0, 0.3)":r.data.backgroundColor==="light"?"rgba(255, 255, 255, 0.3)":(A=r.data.backgroundColor)!=null?A:"rgba(0, 0, 0, 0.3)"})()),i.$$.dirty&2&&e(5,s=(()=>{const{r:A,g:y,b:w}=sA(o);return(A*299+y*587+w*114)/1e3>=128?"rgba(0, 0, 0, 0.6)":"white"})())},[r,o,a,l,c,s,n,u,h,d,f,p]}class dA extends re{constructor(t){super(),se(this,t,uA,cA,oe,{tag:0},rA)}}function hA(i){let t,e;return t=new dA({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function fA(i){let t,e;return t=new oA({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function mA(i){let t,e,n,o;const s=[fA,hA],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=pe()},m(l,c){~t&&r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?~t&&r[t].p(l,c):(e&&(ae(),D(r[u],1,1,()=>{r[u]=null}),le()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),P(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(P(e),o=!0)},o(l){D(e),o=!1},d(l){~t&&r[t].d(l),l&&M(n)}}}function pA(i,t,e){let n,{tag:o}=t,s;function r(a){s=a.detail}return o.play=()=>s.play(),o.pause=()=>s.pause(),i.$$set=a=>{"tag"in a&&e(0,o=a.tag)},i.$$.update=()=>{var a;i.$$.dirty&1&&e(1,n=(a=o.data.appearance)!=null?a:"line")},[o,n,r]}class gA extends re{constructor(t){super(),se(this,t,pA,mA,oe,{tag:0})}}function AA(i){ce(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function ml(i){var o;let t,e,n;return e=new Ga({props:{mediaItemConfig:{canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(o=i[4])!=null?o:"withText",disableVideoIfHavePoster:!1,objectFit:i[2]},unfolded:i[6],mediaData:i[5],enableCarousel:i[1],autoplayConfig:i[3],tag:i[0],inDelay:500,duration:500}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(s,r){z(s,t,r),K(e,t,null),n=!0},p(s,r){var l;const a={};r&20&&(a.mediaItemConfig={canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(l=s[4])!=null?l:"withText",disableVideoIfHavePoster:!1,objectFit:s[2]}),r&64&&(a.unfolded=s[6]),r&32&&(a.mediaData=s[5]),r&2&&(a.enableCarousel=s[1]),r&8&&(a.autoplayConfig=s[3]),r&1&&(a.tag=s[0]),e.$set(a)},i(s){n||(P(e.$$.fragment,s),n=!0)},o(s){D(e.$$.fragment,s),n=!1},d(s){s&&M(t),$(e)}}}function vA(i){let t,e,n=i[0].state&&i[5]&&ml(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&P(n,1)):(n=ml(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function bA(i,t,e){let n,o,s,r,a,l,{tag:c}=t;return i.$$set=u=>{"tag"in u&&e(0,c=u.tag)},i.$$.update=()=>{var u,h;i.$$.dirty&1&&e(6,n=c.state?c.state.unfolded:!1),i.$$.dirty&1&&e(5,o=c.data.mediaData),i.$$.dirty&1&&e(1,s=c.data.enableCarousel),i.$$.dirty&1&&e(4,r=c.data.playIcon),i.$$.dirty&3&&e(3,a=(u=c.data.autoplayConfig)!=null?u:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,l=(h=c.data.objectFit)!=null?h:(()=>c.data.adaptationMode==="stretch"?"fill":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,s,l,a,r,o,n]}class yA extends re{constructor(t){super(),se(this,t,bA,vA,oe,{tag:0},AA)}}function wA(i){return N(this,null,function*(){return new Promise((t,e)=>{if(!i){e(Error("url is empty"));return}const n=new Image;n.src=i,n.onload=()=>t({width:n.width,height:n.height}),n.onerror=e})})}function CA(i){return N(this,null,function*(){const{steps:t,url:e,ratio:n=3,fps:o=24}=i;if(!t)throw new Error("KeyframeIcon requires steps");const{width:s,height:r}=yield wA(e),a=s/n,l=r/n,c=a/t,u=l,h=1/o*t+"s",d=a/t-a;return{url:e,keyframesWidth:a,keyframesHeight:l,wrapperWidth:c,wrapperHeight:u,steps:t,duration:h,offsetX:d,offsetY:0}})}function PA(i){ce(i,"svelte-mhs8j5","@keyframes svelte-mhs8j5-sprites-animation{0%{background-position:0 0}100%{background-position:var(--keyframe_offset_x) 0}}.icon-image.svelte-mhs8j5{display:block;width:100%}.icon-keyframe-container.svelte-mhs8j5{overflow:hidden}.icon-keyframe-wrapper.svelte-mhs8j5{transform-origin:0 0}.icon-keyframe.svelte-mhs8j5{background-repeat:no-repeat;animation-direction:normal;animation-iteration-count:infinite;animation-name:svelte-mhs8j5-sprites-animation}")}function pl(i){i[6]=i[14].url,i[7]=i[14].keyframesWidth,i[8]=i[14].keyframesHeight,i[9]=i[14].wrapperWidth,i[10]=i[14].wrapperHeight,i[11]=i[14].steps,i[12]=i[14].duration,i[13]=i[14].offsetX}function gl(i){let t,e,n,o=i[2]&&Al();function s(l,c){return l[3]?EA:IA}let r=s(i),a=r(i);return{c(){t=T("div"),o&&o.c(),e=ne(),a.c(),b(t,"class","icon"),L(t,"width",typeof i[0]=="number"?ke(i[0]):i[0])},m(l,c){z(l,t,c),o&&o.m(t,null),V(t,e),a.m(t,null),n=!0},p(l,c){l[2]?o?c&4&&P(o,1):(o=Al(),o.c(),P(o,1),o.m(t,e)):o&&(ae(),D(o,1,1,()=>{o=null}),le()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&1&&L(t,"width",typeof l[0]=="number"?ke(l[0]):l[0])},i(l){n||(P(o),n=!0)},o(l){D(o),n=!1},d(l){l&&M(t),o&&o.d(),a.d()}}}function Al(i){let t,e;return t=new nt({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function IA(i){let t,e;return{c(){t=T("img"),b(t,"class","icon-image svelte-mhs8j5"),Xe(t.src,e=i[1].url)||b(t,"src",e),b(t,"alt","icon")},m(n,o){z(n,t,o)},p(n,o){o&2&&!Xe(t.src,e=n[1].url)&&b(t,"src",e)},d(n){n&&M(t)}}}function EA(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:DA,then:xA,catch:kA,value:14};return os(e=i[4](i[1]),n),{c(){t=pe(),n.block.c()},m(o,s){z(o,t,s),n.block.m(o,n.anchor=s),n.mount=()=>t.parentNode,n.anchor=t},p(o,s){i=o,n.ctx=i,s&2&&e!==(e=i[4](i[1]))&&os(e,n)||xc(n,i,s)},d(o){o&&M(t),n.block.d(o),n.token=null,n=null}}}function kA(i){return{c:U,m:U,p:U,d:U}}function xA(i){pl(i);let t,e,n,o=`url(${i[6]})`,s=`steps(${i[11]-1})`;return{c(){t=T("div"),e=T("div"),n=T("div"),b(n,"class","icon-keyframe svelte-mhs8j5"),L(n,"width",ke(i[7])),L(n,"height",ke(i[8])),L(n,"background-image",o),L(n,"animation-duration",i[12]),L(n,"animation-timing-function",s),L(n,"animation-delay",0),L(n,"background-size","100% 100%"),L(n,"--keyframe_offset_x",ke(i[13])),b(e,"class","icon-keyframe-wrapper svelte-mhs8j5"),L(e,"transform",typeof i[0]=="number"?`scale(${i[0]/i[9]})`:void 0),b(t,"class","icon-keyframe-container svelte-mhs8j5"),L(t,"width",typeof i[0]=="number"?ke(i[0]):ke(i[9])),L(t,"height",typeof i[0]=="number"?ke(i[10]*(i[0]/i[9])):ke(i[10]))},m(r,a){z(r,t,a),V(t,e),V(e,n)},p(r,a){pl(r),a&2&&L(n,"width",ke(r[7])),a&2&&L(n,"height",ke(r[8])),a&2&&o!==(o=`url(${r[6]})`)&&L(n,"background-image",o),a&2&&L(n,"animation-duration",r[12]),a&2&&s!==(s=`steps(${r[11]-1})`)&&L(n,"animation-timing-function",s),a&2&&L(n,"--keyframe_offset_x",ke(r[13])),a&3&&L(e,"transform",typeof r[0]=="number"?`scale(${r[0]/r[9]})`:void 0),a&3&&L(t,"width",typeof r[0]=="number"?ke(r[0]):ke(r[9])),a&3&&L(t,"height",typeof r[0]=="number"?ke(r[10]*(r[0]/r[9])):ke(r[10]))},d(r){r&&M(t)}}}function DA(i){return{c:U,m:U,p:U,d:U}}function LA(i){let t,e,n=i[1]&&gl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&P(n,1)):(n=gl(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function SA(i,t,e){let n,{width:o=null}=t,{icon:s=null}=t,{shadow:r=!1}=t;const a=vn();function l(c){return N(this,null,function*(){const u=yield CA(c);return a("iconLoaded"),u})}return i.$$set=c=>{"width"in c&&e(0,o=c.width),"icon"in c&&e(1,s=c.icon),"shadow"in c&&e(2,r=c.shadow)},i.$$.update=()=>{i.$$.dirty&2&&e(3,n=(s==null?void 0:s.steps)>=2),i.$$.dirty&8&&!n&&a("iconLoaded")},[o,s,r,n,l]}class vl extends re{constructor(t){super(),se(this,t,SA,LA,oe,{width:0,icon:1,shadow:2},PA)}}function MA(i){ce(i,"svelte-e58ijk",".wrapper.svelte-e58ijk{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-e58ijk{position:relative;display:flex;align-items:center;justify-content:center}.text.svelte-e58ijk{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;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function bl(i){let t,e,n,o,s,r;return e=new nt({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),s=De(i[1]),b(o,"class","text svelte-e58ijk"),b(t,"class","text-wrapper svelte-e58ijk")},m(a,l){z(a,t,l),K(e,t,null),V(t,n),V(t,o),V(o,s),r=!0},p(a,l){(!r||l&2)&&Me(s,a[1])},i(a){r||(P(e.$$.fragment,a),r=!0)},o(a){D(e.$$.fragment,a),r=!1},d(a){a&&M(t),$(e)}}}function zA(i){let t,e,n,o;e=new vl({props:{icon:i[0],shadow:!0}}),e.$on("iconLoaded",i[9]);let s=i[1]&&i[2]&&bl(i);return{c(){t=T("div"),ee(e.$$.fragment),n=ne(),s&&s.c(),b(t,"class","wrapper svelte-e58ijk")},m(r,a){z(r,t,a),K(e,t,null),V(t,n),s&&s.m(t,null),o=!0},p(r,[a]){const l={};a&1&&(l.icon=r[0]),e.$set(l),r[1]&&r[2]?s?(s.p(r,a),a&6&&P(s,1)):(s=bl(r),s.c(),P(s,1),s.m(t,null)):s&&(ae(),D(s,1,1,()=>{s=null}),le())},i(r){o||(P(e.$$.fragment,r),P(s),o=!0)},o(r){D(e.$$.fragment,r),D(s),o=!1},d(r){r&&M(t),$(e),s&&s.d()}}}function TA(i,t,e){let n,o,s,r,a,l,c,u,{tag:h}=t;const d=()=>{e(2,n=!0)};return i.$$set=f=>{"tag"in f&&e(3,h=f.tag)},i.$$.update=()=>{var f,p;i.$$.dirty&8&&e(1,o=(f=h.data.title)!=null?f:h.data.text),i.$$.dirty&8&&e(8,s=(p=h.data.icon)!=null?p:h.style.point),i.$$.dirty&256&&e(7,r=s.url),i.$$.dirty&256&&e(6,a=s.steps),i.$$.dirty&256&&e(5,l=s.fps),i.$$.dirty&256&&e(4,c=s.ratio),i.$$.dirty&240&&e(0,u={url:r,steps:a,fps:l,ratio:c})},e(2,n=!1),[u,o,n,h,c,l,a,r,s,d]}class BA extends re{constructor(t){super(),se(this,t,TA,zA,oe,{tag:3},MA)}}function jA(i){ce(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function yl(i){let t,e=i[0].element+"",n;return{c(){t=new Hn(!1),n=pe(),t.a=n},m(o,s){t.m(e,o,s),z(o,n,s)},p(o,s){s&1&&e!==(e=o[0].element+"")&&t.p(e)},d(o){o&&M(n),o&&t.d()}}}function VA(i){let t,e=typeof i[0].element=="string"&&yl(i);return{c(){t=T("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){z(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=yl(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:U,o:U,d(n){n&&M(t),e&&e.d(),i[2](null)}}}function QA(i,t,e){let{tag:n}=t,o,s;Ue(()=>{if(o){if(n.element instanceof Element){const a=n.element;o.appendChild(a),s=()=>a.remove()}else if(typeof n.element=="function"){const a=n.element;s=a(o)}}}),wt(()=>{s==null||s()});function r(a){je[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class OA extends re{constructor(t){super(),se(this,t,QA,VA,oe,{tag:0},jA)}}function RA(i){ce(i,"svelte-1pomljv",'@font-face{font-family:"TG-TYPE";font-style:normal;font-weight:400;src:local("TG-TYPE-Bold"), url(data:application/font-woff2;charset=utf-8;base64,T1RUTwAKAIAAAwAgQ0ZGINFD4CEAAAaQAAAHC0dTVUIAAQAAAAANnAAAAApPUy8yaB5pEwAAAjQAAABgY21hcEItjGUAAAT0AAABfGhlYWQS1WWOAAAAtAAAADZoaGVhBfMBxwAAAhAAAAAkaG10eJ9gBO8AAADsAAABJG1heHAASVAAAAAArAAAAAZuYW1lqczkZQAAApQAAAJecG9zdP+4ADIAAAZwAAAAIAAAUAAASQAAAAEAAAABAADkeHeyXw889QADA+gAAAAA2NoRKwAAAADY2hErACn/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACCAA7AcwAdwIIADMCCAA0AhwAMwISADk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ksc9i2BuxrpWerB/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==) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-1pomljv{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.withAnimation.svelte-1pomljv{transition:opacity 0.3s linear}.content__container.unClickable.svelte-1pomljv{pointer-events:none !important}.content__container.unClickable.svelte-1pomljv *{pointer-events:none !important}.content__wrapper.svelte-1pomljv{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-1pomljv{opacity:0;pointer-events:none}.content__container.hide.svelte-1pomljv *{pointer-events:none !important}.content__container.disable.svelte-1pomljv{display:none}.content.svelte-1pomljv{position:relative;width:100%;height:100%;font-size:0.75rem;line-height:1.125rem;color:#fff}.content.svelte-1pomljv:not(.unfolded){pointer-events:none}.content.svelte-1pomljv:not(.unfolded) *{pointer-events:none !important}')}function FA(i){let t,e;return{c(){t=T("div"),b(t,"data-info","tag content is keep folded"),b(t,"data-id",e=i[1].id)},m(n,o){z(n,t,o)},p(n,o){o&2&&e!==(e=n[1].id)&&b(t,"data-id",e)},i:U,o:U,d(n){n&&M(t)}}}function GA(i){let t,e,n,o,s,r,a,l,c;const u=[UA,YA,XA,_A,NA,WA,HA],h=[];function d(f,p){return f[1].element?0:f[1].contentType==="Text"?1:f[1].contentType==="ImageText"||f[1].contentType==="Image"||f[1].contentType==="Video"?2:f[1].contentType==="Audio"?3:f[1].contentType==="Marketing"?4:f[1].contentType==="Link"||f[1].contentType==="VRLink"||f[1].contentType==="PanoLink"?5:f[1].contentType==="MediaPlane"||f[1].contentType==="MediaModel"?6:-1}return~(o=d(i))&&(s=h[o]=u[o](i)),{c(){var f;t=T("div"),e=T("div"),n=T("div"),s&&s.c(),b(n,"class","content svelte-1pomljv"),q(n,"unfolded",(f=i[1].state)==null?void 0:f.unfolded),b(e,"class","content__wrapper svelte-1pomljv"),b(t,"class","content__container svelte-1pomljv"),b(t,"data-id",r=i[1].id),q(t,"disable",i[1].enabled===!1),q(t,"hide",i[4]),q(t,"withAnimation",i[0]),q(t,"unClickable",i[1].clickable===!1),L(t,"width",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0),L(t,"height",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0)},m(f,p){z(f,t,p),V(t,e),V(e,n),~o&&h[o].m(n,null),a=!0,l||(c=Pe(t,"click",Jo(i[13])),l=!0)},p(f,p){var g;let v=o;o=d(f),o===v?~o&&h[o].p(f,p):(s&&(ae(),D(h[v],1,1,()=>{h[v]=null}),le()),~o?(s=h[o],s?s.p(f,p):(s=h[o]=u[o](f),s.c()),P(s,1),s.m(n,null)):s=null),(!a||p&2)&&q(n,"unfolded",(g=f[1].state)==null?void 0:g.unfolded),(!a||p&2&&r!==(r=f[1].id))&&b(t,"data-id",r),(!a||p&2)&&q(t,"disable",f[1].enabled===!1),(!a||p&16)&&q(t,"hide",f[4]),(!a||p&1)&&q(t,"withAnimation",f[0]),(!a||p&2)&&q(t,"unClickable",f[1].clickable===!1),p&2&&L(t,"width",f[1].stickType==="Plane"||f[1].contentType==="MediaModel"?"100%":0),p&2&&L(t,"height",f[1].stickType==="Plane"||f[1].contentType==="MediaModel"?"100%":0)},i(f){a||(P(s),a=!0)},o(f){D(s),a=!1},d(f){f&&M(t),~o&&h[o].d(),l=!1,c()}}}function HA(i){let t,e;return t=new yA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function WA(i){let t,e;return t=new BA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function NA(i){let t,e;return t=new N0({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function _A(i){let t,e;return t=new gA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function XA(i){let t,e;return t=new x0({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function YA(i){let t,e;return t=new Xp({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function UA(i){let t,e;return t=new OA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function JA(i){let t,e,n,o;const s=[GA,FA],r=[];function a(l,c){return l[3]?0:1}return t=a(i),e=r[t]=s[t](i),{c(){e.c(),n=pe()},m(l,c){r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?r[t].p(l,c):(ae(),D(r[u],1,1,()=>{r[u]=null}),le(),e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),P(e,1),e.m(n.parentNode,n))},i(l){o||(P(e),o=!0)},o(l){D(e),o=!1},d(l){r[t].d(l),l&&M(n)}}}function ZA(i,t,e){let n,o,s,r,a,l,{withAnimation:c=!1}=t,{tag:u}=t,{hooks:h}=t,{state:d}=t,{mediaStore:f}=t,{temporaryState:p}=t;Bi("hooks",h),Bi("mediaStore",f);let v,g;function A(C){C?h.emit("exposure",{id:r,type:"start"}):h.emit("exposure",{id:r,type:"end"})}function y(C,x,E){var S,k;return!(!x.visible||!x.enabled||!E.visible||!((S=C.state)!=null&&S.visible)||((k=C.temporaryState)==null?void 0:k.visible)===!1||We(C)&&C.mediaVisible===!1)}const w=C=>h.emit("click",{event:C,target:"TagContent",tag:u});return i.$$set=C=>{"withAnimation"in C&&e(0,c=C.withAnimation),"tag"in C&&e(1,u=C.tag),"hooks"in C&&e(2,h=C.hooks),"state"in C&&e(5,d=C.state),"mediaStore"in C&&e(6,f=C.mediaStore),"temporaryState"in C&&e(7,p=C.temporaryState)},i.$$.update=()=>{var C,x,E,S,k,j,_,G,Z,Q,B;i.$$.dirty&2&&e(11,n=(C=u.state)==null?void 0:C.unfolded),i.$$.dirty&2&&e(10,o=(x=u.state)==null?void 0:x.visible),i.$$.dirty&162&&e(12,s=d.visible&&p.visible&&((E=u.state)==null?void 0:E.visible)),i.$$.dirty&2&&(r=u.id),i.$$.dirty&162&&e(4,a=!y(u,d,p)),i.$$.dirty&4096&&A(s),i.$$.dirty&3842&&u.hooks&&(n!==void 0&&n!==g&&(e(9,g=n),n?(k=(S=u.hooks).emit)==null||k.call(S,"unfolded"):(_=u==null?void 0:(j=u.hooks).emit)==null||_.call(j,"folded")),o!==void 0&&o!==v&&(e(8,v=o),o?(Z=(G=u.hooks).emit)==null||Z.call(G,"show"):(B=(Q=u.hooks).emit)==null||B.call(Q,"hide"))),i.$$.dirty&2&&e(3,l=(()=>!(typeof u.mergedConfig.unfoldedConfig=="object"&&u.mergedConfig.unfoldedConfig.keep==="folded"))())},[c,u,h,l,a,d,f,p,v,g,o,n,s,w]}class wl extends re{constructor(t){super(),se(this,t,ZA,JA,oe,{withAnimation:0,tag:1,hooks:2,state:5,mediaStore:6,temporaryState:7},RA)}}function qA(i){ce(i,"svelte-yex9rb",'@charset "UTF-8";.tag-point-click-helper.svelte-yex9rb.svelte-yex9rb{position:absolute;pointer-events:auto;cursor:pointer;width:2.5rem;height:2.5rem;left:50%;top:50%;transform:translate(-50%, -50%)}.tag-point-wrapper.svelte-yex9rb.svelte-yex9rb{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);z-index:-1}.tag-folded-point.svelte-yex9rb.svelte-yex9rb,.tag-unfolded-point.svelte-yex9rb.svelte-yex9rb{transition:all 0.5s}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.3125rem;height:0.3125rem;border-radius:50%;background-color:white}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb:before{content:"";position:absolute;width:0.875rem;height:0.875rem;border-radius:50%;background-color:rgba(0, 0, 0, 0.2)}.tag-point-wrapper.folded.svelte-yex9rb .tag-folded-point.svelte-yex9rb{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-yex9rb .tag-folded-point.svelte-yex9rb{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{opacity:1;scale:1}')}function KA(i){let t,e,n,o,s,r,a,l,c,u,h,d;return o=new nt({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new vl({props:{icon:i[2],width:i[1]}}),{c(){t=T("div"),e=ne(),n=T("div"),ee(o.$$.fragment),s=ne(),r=T("div"),a=ne(),l=T("div"),ee(c.$$.fragment),b(t,"class","tag-point-click-helper svelte-yex9rb"),b(r,"class","tag-unfolded-point svelte-yex9rb"),L(r,"transition-delay",(i[3]?i[5]:0)+"ms"),b(l,"class","tag-folded-point svelte-yex9rb"),L(l,"transition-delay",(i[3]?i[5]:0)+"ms"),b(n,"class","tag-point-wrapper svelte-yex9rb"),q(n,"unfolded",i[0]),q(n,"folded",i[3]),L(n,"width",ke(i[1])),L(n,"height",ke(i[1]))},m(f,p){z(f,t,p),z(f,e,p),z(f,n,p),K(o,n,null),V(n,s),V(n,r),V(n,a),V(n,l),K(c,l,null),u=!0,h||(d=Pe(t,"click",i[4]),h=!0)},p(f,[p]){p&8&&L(r,"transition-delay",(f[3]?f[5]:0)+"ms");const v={};p&4&&(v.icon=f[2]),p&2&&(v.width=f[1]),c.$set(v),p&8&&L(l,"transition-delay",(f[3]?f[5]:0)+"ms"),(!u||p&1)&&q(n,"unfolded",f[0]),(!u||p&8)&&q(n,"folded",f[3]),p&2&&L(n,"width",ke(f[1])),p&2&&L(n,"height",ke(f[1]))},i(f){u||(P(o.$$.fragment,f),P(c.$$.fragment,f),u=!0)},o(f){D(o.$$.fragment,f),D(c.$$.fragment,f),u=!1},d(f){f&&M(t),f&&M(e),f&&M(n),$(o),$(c),h=!1,d()}}}function $A(i,t,e){let n,o,s,r;const a=Mt("hooks");let{tag:l}=t,c,u=!1;const h=()=>{c!==void 0&&clearTimeout(c),u=!0,c=setTimeout(()=>{u=!1},800)},d=p=>{u||a.emit("click",{event:p,target:"TagPoint",tag:l})},f=(()=>l.contentType==="Text"&&l.data.appearance==="plane"?500:800)();return i.$$set=p=>{"tag"in p&&e(6,l=p.tag)},i.$$.update=()=>{var p,v,g,A;i.$$.dirty&64&&e(0,n=(p=l.state)==null?void 0:p.unfolded),i.$$.dirty&1&&e(3,o=!n),i.$$.dirty&64&&e(2,s=(g=(v=l.style)==null?void 0:v.point)!=null&&g.url?(A=l.style)==null?void 0:A.point:{url:bp}),i.$$.dirty&64&&e(1,r=(()=>{var w,C,x;const y=(x=(C=(w=l.style)==null?void 0:w.point)==null?void 0:C.size)!=null?x:"S";return typeof y=="number"?y:y==="S"?18:y==="M"?20:y==="L"?24:y==="XL"?28:18})())},h(),[n,r,s,o,d,f,l]}class ev extends re{constructor(t){super(),se(this,t,$A,KA,oe,{tag:6},qA)}}function tv(i){ce(i,"svelte-pzwdws",".tag.withAnimation.svelte-pzwdws{transition:opacity 0.3s linear}.tag.hide.svelte-pzwdws{opacity:0;pointer-events:none}.tag.hide.svelte-pzwdws *{pointer-events:none !important}.tag.unClickable.svelte-pzwdws{pointer-events:none !important}.tag.unClickable.svelte-pzwdws *{pointer-events:none !important}.tag.disable.svelte-pzwdws{display:none}.wrapper.svelte-pzwdws{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}")}function nv(i){let t;return{c(){t=T("div"),b(t,"data-info","tag content is disable")},m(e,n){z(e,t,n)},p:U,i:U,o:U,d(e){e&&M(t)}}}function iv(i){let t,e;return t=new wl({props:{mediaStore:i[2],withAnimation:i[0],tag:Re(i[1]),hooks:i[14],state:i[3],temporaryState:i[4]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&4&&(s.mediaStore=n[2]),o&1&&(s.withAnimation=n[0]),o&2&&(s.tag=Re(n[1])),o&8&&(s.state=n[3]),o&16&&(s.temporaryState=n[4]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function ov(i){let t;return{c(){t=T("div"),b(t,"data-info","tag point is disable")},m(e,n){z(e,t,n)},p:U,i:U,o:U,d(e){e&&M(t)}}}function sv(i){let t,e;return t=new ev({props:{tag:i[1]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=n[1]),t.$set(s)},i(n){e||(P(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function rv(i){let t,e,n,o,s,r,a,l,c;const u=[iv,nv],h=[];function d(g,A){return g[12]?0:1}n=d(i),o=h[n]=u[n](i);const f=[sv,ov],p=[];function v(g,A){return g[13]?0:1}return r=v(i),a=p[r]=f[r](i),{c(){t=T("div"),e=T("div"),o.c(),s=ne(),a.c(),b(e,"class","wrapper svelte-pzwdws"),b(e,"data-tag-unfolded",i[8]),b(e,"data-tag-id",i[11]),b(e,"data-content-type",l=i[1].contentType),L(e,"left",i[7]),L(e,"top",i[6]),L(e,"z-index",i[5]),b(t,"class","tag svelte-pzwdws"),b(t,"data-tag-id",i[11]),q(t,"unClickable",i[1].clickable===!1),q(t,"disable",i[10]),q(t,"hide",i[9]),q(t,"withAnimation",i[0])},m(g,A){z(g,t,A),V(t,e),h[n].m(e,null),V(e,s),p[r].m(e,null),c=!0},p(g,[A]){let y=n;n=d(g),n===y?h[n].p(g,A):(ae(),D(h[y],1,1,()=>{h[y]=null}),le(),o=h[n],o?o.p(g,A):(o=h[n]=u[n](g),o.c()),P(o,1),o.m(e,s));let w=r;r=v(g),r===w?p[r].p(g,A):(ae(),D(p[w],1,1,()=>{p[w]=null}),le(),a=p[r],a?a.p(g,A):(a=p[r]=f[r](g),a.c()),P(a,1),a.m(e,null)),(!c||A&256)&&b(e,"data-tag-unfolded",g[8]),(!c||A&2048)&&b(e,"data-tag-id",g[11]),(!c||A&2&&l!==(l=g[1].contentType))&&b(e,"data-content-type",l),A&128&&L(e,"left",g[7]),A&64&&L(e,"top",g[6]),A&32&&L(e,"z-index",g[5]),(!c||A&2048)&&b(t,"data-tag-id",g[11]),(!c||A&2)&&q(t,"unClickable",g[1].clickable===!1),(!c||A&1024)&&q(t,"disable",g[10]),(!c||A&512)&&q(t,"hide",g[9]),(!c||A&1)&&q(t,"withAnimation",g[0])},i(g){c||(P(o),P(a),c=!0)},o(g){D(o),D(a),c=!1},d(g){g&&M(t),h[n].d(),p[r].d()}}}function av(i,t,e){let n,o,s,r,a,l,c,u,h,{withAnimation:d=!1}=t,{tag:f}=t,{mediaStore:p}=t,{state:v}=t,{temporaryState:g}=t;const A=Mt("hooks");return i.$$set=y=>{"withAnimation"in y&&e(0,d=y.withAnimation),"tag"in y&&e(1,f=y.tag),"mediaStore"in y&&e(2,p=y.mediaStore),"state"in y&&e(3,v=y.state),"temporaryState"in y&&e(4,g=y.temporaryState)},i.$$.update=()=>{var y,w,C,x,E,S,k,j;i.$$.dirty&2&&e(13,n=(()=>!(f.contentType==="Link"||f.contentType==="VRLink"||f.contentType==="PanoLink"||f.contentType==="Audio"&&f.data.appearance==="plane"))()),i.$$.dirty&2&&e(12,o=(()=>f.stickType==="2DPoint")()),i.$$.dirty&2&&e(11,s=f.id),i.$$.dirty&2&&e(10,r=!((y=f.pointTagStyle)!=null&&y.leftPercent)||!((w=f.pointTagStyle)!=null&&w.topPercent)||f.enabled===!1||!f.state),i.$$.dirty&2&&e(9,a=!((C=f.state)!=null&&C.visible)||((x=f.temporaryState)==null?void 0:x.visible)===!1),i.$$.dirty&2&&e(8,l=(E=f.state)==null?void 0:E.unfolded),i.$$.dirty&2&&e(7,c=((S=f.pointTagStyle)==null?void 0:S.leftPercent)+"%"),i.$$.dirty&2&&e(6,u=((k=f.pointTagStyle)==null?void 0:k.topPercent)+"%"),i.$$.dirty&2&&e(5,h=(j=f.state)!=null&&j.unfolded?1:0)},[d,f,p,v,g,h,u,c,l,a,r,s,o,n,A]}class lv extends re{constructor(t){super(),se(this,t,av,rv,oe,{withAnimation:0,tag:1,mediaStore:2,state:3,temporaryState:4},tv)}}function cv(i){ce(i,"svelte-uq11d5",".tag--container.svelte-uq11d5{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;transform:translate3d(0, 0, 0)}.withAnimation.svelte-uq11d5{transition:opacity 0.3s linear}.tag--container.hide.svelte-uq11d5{opacity:0;pointer-events:none}.tag--container.hide.svelte-uq11d5 *{pointer-events:none !important}")}function Cl(i,t,e){const n=i.slice();return n[6]=t[e],n}function Pl(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=Cl(i,s,a),c=r(l);n.set(c,e[a]=Il(c,l))}return{c(){t=T("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-uq11d5"),q(t,"hide",!i[3].visible||!i[4].visible),q(t,"withAnimation",i[0])},m(a,l){z(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,l){l&31&&(s=a[1],ae(),e=Je(e,l,r,1,a,s,n,t,Pt,Il,null,Cl),le()),(!o||l&24)&&q(t,"hide",!a[3].visible||!a[4].visible),(!o||l&1)&&q(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)P(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)D(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Il(i,t){let e,n,o;return n=new lv({props:{state:t[3],temporaryState:t[4],withAnimation:t[0],tag:t[6],mediaStore:t[2]}}),{key:i,first:null,c(){e=pe(),ee(n.$$.fragment),this.first=e},m(s,r){z(s,e,r),K(n,s,r),o=!0},p(s,r){t=s;const a={};r&8&&(a.state=t[3]),r&16&&(a.temporaryState=t[4]),r&1&&(a.withAnimation=t[0]),r&2&&(a.tag=t[6]),r&4&&(a.mediaStore=t[2]),n.$set(a)},i(s){o||(P(n.$$.fragment,s),o=!0)},o(s){D(n.$$.fragment,s),o=!1},d(s){s&&M(e),$(n,s)}}}function uv(i){let t,e,n=i[3].enabled&&Pl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&P(n,1)):(n=Pl(o),n.c(),P(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(P(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function dv(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{mediaStore:r}=t,{state:a}=t,{temporaryState:l}=t;return Bi("hooks",s),i.$$set=c=>{"withAnimation"in c&&e(0,n=c.withAnimation),"tags"in c&&e(1,o=c.tags),"hooks"in c&&e(5,s=c.hooks),"mediaStore"in c&&e(2,r=c.mediaStore),"state"in c&&e(3,a=c.state),"temporaryState"in c&&e(4,l=c.temporaryState)},[n,o,r,a,l,s]}class hv extends re{constructor(t){super(),se(this,t,dv,uv,oe,{withAnimation:0,tags:1,hooks:5,mediaStore:2,state:3,temporaryState:4},cv)}}const fv={globalConfig:{unfoldedConfig:{autoUnfold:{strategy:"MinimumDistance",distance:{max:5}}},tag3DConfig:{ratio:.0035}},contentTypeConfig:{"Any-Audio-plane":{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},Link:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},VRLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},PanoLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},MediaPlane:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{alwaysShowWhenMovePano:!0}},MediaModel:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{keep:"visible",visibleFiveMode:["Panorama","Floorplan","Model","Mapview"],alwaysShowWhenMovePano:!0}}}};class mv extends ti{constructor(e){super(e);m(this,"tagCacheByPanoIndex",{})}getCache({panoIndex:e,id:n,key:o}){var c,u,h,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=`${(h=(u=s.work)==null?void 0:u.workCode)!=null?h: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 f=l.get(n);return f||(l.set(n,{}),l.get(n))}return(d=l.get(n))==null?void 0:d[o]}clearCache(){this.tagCacheByPanoIndex={}}removeCache(){}}class pv extends mv{constructor(e){super(e);m(this,"tags",[]);m(this,"config",fv);m(this,"raycaster",new I.Raycaster)}get isPanorama(){return this.five.currentMode==="Panorama"}getTagById(e){const n=this.tags.find(o=>o.id===e);if(!n){console.warn(`error: can not find tag id ${e} by getTagById()`);return}return n}changeContentTypeConfig(e,n,o=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),o?this.config.contentTypeConfig[e]=pt.default({},this.config.contentTypeConfig[e],n):this.config.contentTypeConfig[e]=n,this.clearCache()}getVisibleByPanoIndex(e,n){var r;const o=this.getCache({panoIndex:n,id:e.id}),s=(r=this.five.panoIndex)!=null?r:n;if(We(e))return!0;if(o.visible!==void 0)return o.visible;{const a=(()=>{var u,h,d;const l=(u=this.getTagConfig(e).visibleConfig)!=null?u:{},c=this.getDistance(e);if(typeof l=="function")return{value:l(this.five,{tag:e,distance:c}),reason:"config function result"};if(l.keep==="hidden")return{value:!1,reason:"config.keep is hidden"};if(l.keep==="visible")return{value:!0,reason:"config.keep is visible"};if(l.visiblePanoIndex!==void 0&&l.visiblePanoIndex!=="all"&&s!==void 0){if(Array.isArray(l.visiblePanoIndex)&&!l.visiblePanoIndex.includes(s))return{value:!1,reason:`current panoIndex is not included in visiblePano. currentPanoIndex: ${s}, visiblePanoIndex: ${l.visiblePanoIndex}`};if(l.visiblePanoIndex==="current"&&s!==((h=e.fiveState)==null?void 0:h.panoIndex))return{value:!1,reason:`current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(d=e.fiveState)==null?void 0:d.panoIndex}`}}if(l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&In(c,l.visibleDistance)===!1)return{value:!1,reason:`distance is not in visibleDistance. distance: ${c}, visibleDistance: ${l.visibleDistance}`};if(l.intersectRaycaster!==!1&&(typeof l.intersectRaycaster!="object"||l.intersectRaycaster.enabled!==!1)){if(s===void 0)return{value:!1,reason:`intersectRaycaster check failed: fivePanoIndex is ${s}`};const f=this.getRaycasterFromPanoIndex(e,s),p=this.getTagEnableByIntersect(e,f);if(p.value===!1)return p}if(l.angleRange&&sp(e)){const f=this.getAngle(e);if(In(f,l.angleRange)===!1)return{value:!1,reason:`angle is not in angleRange. angle: ${f}, angleRange: ${l.angleRange}`}}return{value:!0,reason:"all check passed"}})();return o.visible=a.value,o.__debug_visible_reason__=a,o.visible}}getVisibleByFiveMode(e,n){var r;const o=(r=this.getTagConfig(e).visibleConfig)!=null?r:{};if(typeof o=="function")return n==="Panorama";const s=o==null?void 0:o.visibleFiveMode;return s?s.includes(n):n==="Panorama"}getVisibleByFloorIndex(e){var a;const n=e.fiveState;if(!n)return!0;const o=n.panoIndex,s=(a=this.five.work.observers[o])==null?void 0:a.floorIndex,r=this.five.model.shownFloor;return r===null||r===s}getVisible(e){const n=this.five.getCurrentState(),o=this.getVisibleByFiveMode(e,n.mode),s=We(e)?this.getVisibleByFloorIndex(e):!0,r=n.mode==="Panorama"?this.getVisibleByPanoIndex(e,n.panoIndex):!0;return o&&r&&s}getModelMedialVisibleByPanoIndex(e){const n=this.five.getCurrentState().panoIndex,o=this.getCache({panoIndex:n,id:e.id});if(o.modelMedialVisible!==void 0)return o.modelMedialVisible;const s=this.getRaycasterFromPanoIndex(e,n),r=this.getTagEnableByIntersect(e,s);return o.modelMedialVisible=r.value,o.__debug_visible_reason__=r,r.value!==!1}getUnfoldedByPanoIndex(e,n){if(!this.getVisibleByPanoIndex(e))return;const s=this.getCache({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.unfoldDistance&&In(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.autoUnfold===void 0||r.autoUnfold===!1||r.autoUnfold.enable===!1)return;if(r.autoUnfold.strategy==="ScreenPostion"){const l=this.getTagProject(e);if(l&&In(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 f=this.getTagProject(d);if(!f)return!1;const{x:p,y:v,z:g}=f;return!(Math.abs(g)>1||Math.abs(p)>1||Math.abs(v)>1)}).map(d=>({tag:d,id:d.id,tagConfig:this.getTagConfig(d).unfoldedConfig})).filter(({tag:d,tagConfig:f})=>{var p,v;return!(typeof f!="object"||f.keep||f.autoUnfold===!1||((p=f.autoUnfold)==null?void 0:p.enable)===!1||((v=f.autoUnfold)==null?void 0:v.strategy)!=="MinimumDistance")}).map(d=>ge(F({},d),{distance:this.getDistance(d.tag)})).filter(({distance:d,tagConfig:f})=>{var p,v;return!(d===void 0||typeof f!="object"||f.autoUnfold===!1||((p=f.autoUnfold)==null?void 0:p.enable)===!1||((v=f.autoUnfold)==null?void 0:v.strategy)!=="MinimumDistance"||f.autoUnfold.distance&&In(d,f.autoUnfold.distance)===!1)}).sort((d,f)=>d.distance-f.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.getCache({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=ta(e),h=c.distanceTo(u);return s.distance=h,h}}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.getCache({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.stickType==="3DPoint"?pn(e.normal):ao(e.position))();if(!u)return;const h=new I.Vector3().copy(c).sub(lo(e.position)),d=u.angleTo(h)*180/Math.PI;return s.angle=d,s.angle}}getTagConfig(e){var s,r;if(!e)return(s=this.config.globalConfig)!=null?s:{};const n={};this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(a=>{const l=a;if(n[l])return;const c=l.split("-");if(c.length===1){const[u]=c;e.contentType===u&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===2){const[u="Any",h="Any"]=c;(e.stickType===u||u==="Any")&&(e.contentType===h||h==="Any")&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===3){const[u="Any",h,d]=c;if(h==="Audio"&&e.contentType==="Audio"){const f=e;(f.stickType===u||u==="Any")&&f.data.appearance===d&&(n[l]=this.config.contentTypeConfig[l])}}});const o=pt.default({},this.config.globalConfig,...Object.values(n),e.config);return typeof o.unfoldedConfig=="object"&&(o.unfoldedConfig.disableFold&&(o.unfoldedConfig={keep:"unfolded"}),o.unfoldedConfig.disableUnfold&&(o.unfoldedConfig={keep:"folded"}),o.unfoldedConfig.keep&&(o.unfoldedConfig={keep:o.unfoldedConfig.keep})),typeof o.visibleConfig=="object"&&o.visibleConfig.keep&&(o.visibleConfig={keep:o.visibleConfig.keep,visibleFiveMode:(r=o.visibleConfig)==null?void 0:r.visibleFiveMode}),o}can(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.keep==="unfolded"||e==="unfold"&&o.unfoldedConfig.keep==="folded")return!1}return!0}sort(e){return e.sort((n,o)=>{const s=this.getDistance(n),r=this.getDistance(o);return s===void 0||r===void 0?0:r-s})}setPointTagPosition(){const e=this.filterPointTag();e.length!==0&&e.forEach(n=>{var s;if(!((s=n.state)!=null&&s.visible)){n.pointTagStyle=null;return}const o=this.getTagProject(n);if(!o){n.pointTagStyle=null;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)})}setModelMedialVisibleByPanoIndex(){this.tags.forEach(e=>{if(!We(e))return;const n=this.getModelMedialVisibleByPanoIndex(e);e.mediaVisible=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=lo(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.stickType==="2DPoint"||e.stickType==="3DPoint")}filter2DPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint")}filter3DPointTag(){return this.tags.filter(e=>e.stickType==="3DPoint")}filterModelTag(){return this.tags.filter(e=>e.stickType==="Model")}filter3DTag(){return this.tags.filter(e=>e.stickType==="3DPoint"||e.stickType==="Plane")}filterPlaneTag(){return this.tags.filter(e=>e.stickType==="Plane")}updateTagConfig(e){e!=null&&e.force&&this.clearCache(),this.tags.forEach(n=>{const o=this.getTagConfig(n);n.mergedConfig=o})}getTagEnableByIntersect(e,n){var u,h,d;const o=(u=this.getTagConfig(e).visibleConfig)!=null?u:{},s=this.getDistance(e),[r]=this.five.model.intersectRaycaster(n),a=(()=>{if(!We(e))return;const f=this.tags.filter(We).map(v=>{var g;return(g=v.model)==null?void 0:g.object}).filter(qe);return n.intersectObjects(f,!0)[0]})(),l=(()=>{var f;return typeof o=="object"&&typeof o.intersectRaycaster=="object"&&(f=o.intersectRaycaster.distanceAccuracy)!=null?f:.01})();return Math.min((h=r==null?void 0:r.distance)!=null?h:1/0,(d=a==null?void 0:a.distance)!=null?d:1/0)+l<s?{value:!1,reason:`intersectRaycaster check failed: distance is ${s}, intersection.point is ${r.point.toArray()},
|
|
562
|
+
customModelIntersection.point is ${a==null?void 0:a.point.toArray()} distanceError is ${l}`}:{value:!0,reason:""}}getRaycasterFromPanoIndex(e,n){var r;const o=(r=this.five.work.observers[n])==null?void 0:r.position;if(o===void 0)throw new Error(`getVisible(): observerPosition is ${o}`);const s=ta(e).sub(o).normalize();return this.raycaster.set(o,s),this.raycaster}}function gv(i){var t,e,n,o;if(!i.stickType){const s=(()=>i.pointType==="PointTag"&&i.dimensionType==="3D"?"3DPoint":i.pointType==="PlaneTag"?"Plane":"2DPoint")();i.stickType=s}if(i.contentType==="VRLink"||i.contentType==="PanoLink"||i.contentType==="Link"){const s=i;!((e=(t=s.data)==null?void 0:t.icon)!=null&&e.url)&&!((o=(n=s.style)==null?void 0:n.point)!=null&&o.url)&&(s.data.icon={url:"//vrlab-static.ljcdn.com/release/web/test.09dee741.png",steps:28})}return i}const Av=new jl.GLTFLoader;function vv(i){return new Promise((t,e)=>{function n(s){t(s)}function o(s){e(s)}Av.load(i,n,void 0,o)})}const El="2.0.10",vo=`DnalogelPlugin-PanoTagPlugin@${El}`,bv=!1,yv=i=>`${vo}--${i}`;class kl extends pv{constructor(e,n){super(e);m(this,"version",El);m(this,"state",{enabled:!0,visible:!0});m(this,"params");m(this,"debug");m(this,"css3DRenderPlugin");m(this,"TagContainerSvelte");m(this,"temporaryState",{visible:!0});m(this,"mediaStore",Gi({currentMediaElement:null}));m(this,"group",new O.Group);m(this,"gltfObjectGroup",new O.Group);m(this,"isIOSWX",navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1&&navigator.userAgent.toLowerCase().indexOf("iphone")!==-1);m(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});m(this,"enabledModelTagSet",new Set);m(this,"changeTagModel",(e,n)=>N(this,null,function*(){e.data=pt.default({},e.data,n),yield this.loadModel(e),this.updateRenderAllTags()}));m(this,"disposedErrorLog",()=>{console.error(`${vo} is disposed`)});m(this,"handleFiveInitAnimationEnded",()=>{const e=this.five.getCurrentState().mode;this.tags.forEach(n=>{We(n)&&e==="Panorama"&&this.changeTagMode(n,"front"),n.state.visible=this.getVisible(n)}),this.updateRenderAllTags(),this.updateRenderAllTags()});m(this,"handleFiveModelShownFloorChange",()=>{this.tags.forEach(e=>{!We(e)||(e.state.visible=this.getVisible(e))}),this.updateRenderAllTags()});m(this,"loadModel",e=>N(this,null,function*(){var l;const n=e.data.modelUrl;if(!n)return;const o=vv(n).then(c=>Object.assign(c.scene,{customID:e.id,isTagModel:!0}));e.model={promise:o};const s=yield o;if(((l=e.model)==null?void 0:l.promise)!==o||(e.model.object=s,!this.tags.includes(e)))return;s.visible=e.state.visible,new O.Matrix4().fromArray(e.matrix).decompose(s.position,s.quaternion,s.scale),s.updateWorldMatrix(!0,!0),this.getVisibleByFloorIndex(e)||(s.visible=!1);const a=this.gltfObjectGroup.children.find(c=>c.customID===e.id);return a&&this.gltfObjectGroup.remove(a),this.gltfObjectGroup.add(s),this.updateTagCss3DObjectMatrix(e,s),s}));this.group.name="PanoTagPluginModelGroup",this.gltfObjectGroup.name="PanoTagPluginGLTFObjectGroup",this.group.add(this.gltfObjectGroup),this.params=F({debug:!1,config:this.config},n),this.debug=this.params.debug,this.config=this.params.config,al(1,{namespace:yi.GetAudioDuration}),al(1,{namespace:yi.PlayAudio}),Object.assign(window,{[`__PANOTAGPLUGIN_DEBUG_${Date.now()}__`]:this}),Object.assign(window,{__PANOTAGPLUGIN_DEBUG__:this}),this.state.enabled&&this.five.scene.add(this.group)}load(e,n){return N(this,null,function*(){var s,r;this.clearTags(),console.info(vo," load:",{data:JSON.parse(JSON.stringify(e))}),this.config=pt.default({},this.config,{globalConfig:(s=e.globalConfig)!=null?s:{},contentTypeConfig:(r=e.contentTypeConfig)!=null?r:{}});const o=yield this.addTag(e.tagList,n);if(this.debug)try{ip(this.five,this.tags)}catch(a){console.error(a)}return o})}addTag(e,n){return N(this,null,function*(){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r);return ge(F({},r),{state:F({visible:void 0,unfolded:bv},a.initialState),hooks:new me.Subscribe,clickable:a.clickable,mergedConfig:a})}).filter(r=>r.position);return s.forEach(gv),this.tags.push(...s),rp(this.five).then(()=>{var r,a,l;return 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(),this.addMediaModelTag(s)})})}changeConfig(e,n=!0){n?this.config=pt.default({},this.config,e):this.config=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=pt.default({},this.config.globalConfig,e):this.config.globalConfig=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}clearTags(){this.tags=[],this.enabledModelTagSet.clear(),this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}show(e){return N(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 N(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.five.scene.children.includes(this.group)||this.five.scene.add(this.group),this.setState({enabled:!0},{userAction:n}),this.hooks.emit("enable",{userAction:n}),this.five.needsRender=!0}disable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!1},{userAction:n}),this.five.scene.remove(this.group),this.hooks.emit("disable",{userAction:n}),this.five.needsRender=!0}dispose(){var e,n,o,s,r,a;this.pauseCurrentMedia(),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.five.scene.remove(this.group),this.group.remove(...this.group.children),this.gltfObjectGroup.remove(...this.gltfObjectGroup.children),this.clearCache(),this.five.needsRender=!0,this.hooks.emit("dispose")}setState(e,n){if(this.store.disposed)return this.disposedErrorLog();const{userAction:o=!0,visibleWithAnimation:s=!1}=n,r=F({},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})}changeUnfoldedById(e,n){var r;const o=this.getTagById(e);if(!o)return;o.state.unfolded=n;const s=this.filterPointTag();(r=this.TagContainerSvelte)==null||r.$set({tags:s})}changeTagNormalById(e,n){const o=this.getTagById(e);!o||!o.tag3DContentSvelte||(o.tag3DContentSvelte.currentNormal=lt(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=pt.default({},s.data,n):s.data=F(F({},s.data),n),this.checkPanelTag(),this.updateRenderAllTags())}changeStickTypeById(e,n,o=!0){this.changeTagById(e,n,o)}changeTagById(e,n,o=!0){const s=this.getTagById(e);!n||(o?pt.default(s,n):Object.assign(s,n),(s==null?void 0:s.tag3DContentSvelte)&&(n==null?void 0:n.normal)&&(s.tag3DContentSvelte.currentNormal=lt(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({currentMediaElement:null})}updateTagCss3DObjectMatrix(e,n){var v,g,A,y;const o=(A=(g=(v=e.mergedConfig)==null?void 0:v.tag3DConfig)==null?void 0:g.ratio)!=null?A:.00216,s=(y=e.tag3DContentSvelte)==null?void 0:y.domContainer.css3DObject;if(!s)return;const r=We(e)?e.data.mediaPosition:e.position;n.updateWorldMatrix(!1,!1);const a=n.matrixWorld,l=new O.Vector3().fromArray(r[0]),c=new O.Vector3().fromArray(r[2]),u=new O.Vector3().lerpVectors(l,c,.5).add(new O.Vector3(0,0,5e-4)),h=new O.Matrix4().setPosition(u),d=new O.Matrix4().makeScale(o,o,o),f=new O.Matrix4().multiply(a).multiply(h).multiply(d);f.decompose(s.position,s.quaternion,s.scale);const p=s.opacityMesh;!p||f.decompose(p.position,p.quaternion,p.scale)}updateTagCss3DObjectVisible(e){var s,r,a,l,c;const n=(s=e.tag3DContentSvelte)==null?void 0:s.domContainer.css3DObject;if(!n)return;n.visible=(a=(r=e.state)==null?void 0:r.visible)!=null?a:!0;const o=n.opacityMesh;!o||(o.visible=(c=(l=e.state)==null?void 0:l.visible)!=null?c:!0)}setVisibleAndUnfolded(){return N(this,arguments,function*({withAnimation:e}={withAnimation:!1}){if(!!this.isPanorama)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.pauseCurrentMedia(),this.state.visible=!1,this.updateTagContainerVisible()}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.updateRenderAllTags()}handleDisable(){var e,n,o;this.pauseCurrentMedia(),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.loadVideoFirstFrame.bind(this),u=this.clickhandler.bind(this),h=this.five.currentMode;return this.handleFiveModeChange(h),this.handleFivePanoArrived(),e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("initAnimationEnded",this.handleFiveInitAnimationEnded),e.on("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),e.on("panoArrived",c),n.on("click",u),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("initAnimationEnded",this.handleFiveInitAnimationEnded),e.off("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),e.off("panoArrived",c),n.off("click",u),this.store.eventListenerDisposer=void 0}}loadVideoFirstFrame(){this.isIOSWX&&this.hooks.emit("loadVideoFirstFrame")}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}=ia(lp(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=ia(na(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){this.tags.forEach(n=>{We(n)&&e!=="Panorama"&&this.changeTagMode(n,"behind"),n.state.visible=this.getVisible(n)}),this.updateRenderAllTags(),this.updateRenderAllTags()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&(n.visibleConfig.keep?e.temporaryState=ge(F({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=ge(F({},e.temporaryState),{visible:Boolean(n.visibleConfig.alwaysShowWhenMovePano)}))}),this.updateTagContainerVisible()}temporaryShow({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!0,this.updateTagContainerVisible()}temporaryHide({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!1,this.updateTagContainerVisible()}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.can("fold",e.tag),o=this.can("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.can("fold",s)&&(s.state.unfolded=!1)}),this.updateRenderAllTags())}updateRenderAllTags(){this.enabledModelTagSet.clear(),this.tags.forEach(e=>e.stickType==="Model"&&this.enabledModelTagSet.add(e.id)),this.updateRenderPointTag(),this.updateRenderPlaneTag(),this.updateRenderModelTag()}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 na(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return N(this,null,function*(){yield this.setVisibleAndUnfolded(),this.setModelMedialVisibleByPanoIndex(),this.tags.forEach(e=>{e.temporaryState=ge(F({},e.temporaryState),{visible:!0})}),this.store.visibleWithAnimation=!0,this.updateTagContainerVisible()})}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.keep)||n.state&&(n.state.unfolded=!1)})}updateRenderPointTag(){var n;const e=this.sort(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 hv({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore}})}}updateRenderPlaneTag(){this.sort([...this.filterPlaneTag(),...this.filter3DPointTag(),...this.filterModelTag()]).forEach(n=>{var l,c,u;if(We(n)&&((l=n.model)==null?void 0:l.object)&&this.updateTagCss3DObjectMatrix(n,(c=n.model)==null?void 0:c.object),n.tag3DContentSvelte){const{svelteApp:h,domContainer:d,initialNormal:f,currentNormal:p}=n.tag3DContentSvelte;if(this.updateTagCss3DObjectVisible(n),h.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!f.equals(p)){const v=new O.Quaternion().setFromUnitVectors(f,p);d.css3DObject.setRotationFromQuaternion(v)}return}if(((u=n.state)==null?void 0:u.visible)===!1)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=Nt(this.five)),n.stickType==="3DPoint"&&!n.normal)return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");const o=(()=>n.stickType==="Plane"?n.position:We(n)?n.data.mediaPosition:ap(this.five.camera.position,lt(n.position),lt(n.normal)))();if(!o)return;const s=function(){if(n.normal)return lt(n.normal);if(n.stickType==="Plane")return ao(n.position);if(n.contentType==="MediaModel")return ao(o)}();if(!s)return;const r=this.getTagConfig(n).tag3DConfig,a=this.css3DRenderPlugin.create3DDomContainer(o,r);!a||(this.updateTagCss3DObjectVisible(n),this.store.css3DRenderDisposer.set(n.id,a.dispose),n.tag3DContentSvelte={svelteApp:new wl({target:a.container,props:{tag:n,hooks:this.hooks,state:this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}}),domContainer:a,initialNormal:s,currentNormal:s})}),this.checkPanelTag()}updateRenderModelTag(){const e=o=>!this.enabledModelTagSet.has(o.customID);this.gltfObjectGroup.remove(...this.gltfObjectGroup.children.filter(e)),this.tags.filter(We).forEach(o=>{var s;(s=o.model)==null||s.promise.then(r=>{r.visible=o.state.visible})})}disposeAllCSS3DContainer(){for(const[e,n]of this.store.css3DRenderDisposer)n==null||n();this.store.css3DRenderDisposer=new Map}checkPanelTag(){this.filter2DPointTag().forEach(e=>{var n;(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.stickType==="2DPoint")&&(n==null||n(),this.store.css3DRenderDisposer.delete(e))}}addMediaModelTag(e){return N(this,null,function*(){const n=e.filter(We).map(this.loadModel);yield Promise.all(n),this.five.getCurrentState().mode==="Panorama"&&this.setModelMedialVisibleByPanoIndex(),this.updateRenderAllTags()})}changeTagMode(e,n){var o,s,r,a,l;((r=(s=(o=e.tag3DContentSvelte)==null?void 0:o.domContainer)==null?void 0:s.css3DObject)==null?void 0:r.mode)!==n&&((a=e.config)!=null&&a.tag3DConfig?e.config.tag3DConfig.mode=n:e.config?e.config.tag3DConfig={mode:n}:e.config={tag3DConfig:{mode:n}},(l=this.store.css3DRenderDisposer.get(e.id))==null||l(),e.tag3DContentSvelte=void 0)}}const wv=(i,t)=>new kl(i,t);function be(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new I.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)}be.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)},be.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"],be.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}},be.prototype._objectCtxInit=function(i){i._3xDomEvent={}},be.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent},be.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent},be.prototype._objectCtxGet=function(i){return i._3xDomEvent},be.prototype.camera=function(i){return i&&(this._camera=i),this._camera},be.prototype.bind=function(i,t,e,n){console.assert(be.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)},be.prototype.addEventListener=be.prototype.bind,be.prototype.unbind=function(i,t,e,n){console.assert(be.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);this._boundObjs[t].splice(l,1)},be.prototype.removeEventListener=be.prototype.unbind,be.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1},be.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.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,h=r[0],d=h.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,h),l&&this._notify("mouseover",d,n,h),c&&this._notify("mouseout",a,n,h)}},be.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.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)}}},be.prototype._notify=function(i,t,e,n){var o=this._objectCtxGet(t),s=o?o[i+"Handlers"]:null;if(!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)}},be.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)},be.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)},be.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)},be.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)},be.prototype._onClick=function(i){this._onMouseEvent("click",i)},be.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)},be.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)},be.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)},be.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)},be.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)}},be.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)}};function xl(i){const t=new I.Box3,e=new I.Vector3;if(i.traverse(n=>{var s;if(n.name==="shadow")return;const o=n.geometry;if(o!==void 0)if((s=o==null?void 0:o.attributes)!=null&&s.position){const r=o.attributes.position;for(let a=0,l=r.count;a<l;a++)e.fromBufferAttribute(r,a).applyMatrix4(n.matrix),t.expandByPoint(e)}else o.vertices.forEach(r=>{const a=r.clone().applyMatrix4(n.matrix);t.expandByPoint(a)})}),!t.isEmpty())return t}class xn{constructor(t,e){m(this,"originObject3D");m(this,"hooks");m(this,"disposers",[]);m(this,"helperObject3D");m(this,"camera");m(this,"model");m(this,"scene");m(this,"container");m(this,"domEvents");m(this,"isDragging",!1);m(this,"enabled",!1);m(this,"name","BaseController");m(this,"boundingBox");m(this,"offset");m(this,"onRender");m(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});var c,u;this.hooks=(c=t.sharedHooks)!=null?c:new Gt,this.camera=t.camera,this.model=t.model,this.originObject3D=t.originObject3D,this.helperObject3D=t.helperObject3D,this.container=t.container,this.scene=t.scene,this.domEvents=new be(t.camera,t.container),this.onRender=(u=t.onRender)!=null?u:()=>{},this.offset=e==null?void 0:e.offset,this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable();const n=(...h)=>this.onSetOriginObjectScale(...h),o=(...h)=>this.onSetOriginObjectRotate(...h),s=(...h)=>this.onSetOriginObjectPosition(...h),r=(...h)=>this.onApplyOriginObjectScale(...h),a=(...h)=>this.onApplyOriginObjectRotate(...h),l=(...h)=>this.onApplyOriginObjectPosition(...h);this.hooks.on("setObjectScale",n),this.hooks.on("setObjectRotate",o),this.hooks.on("setObjectPosition",s),this.hooks.on("applyObjectPosition",l),this.hooks.on("applyObjectRotate",a),this.hooks.on("applyObjectScale",r),this.disposers.push(()=>{this.hooks.off("setObjectScale",n),this.hooks.off("setObjectRotate",o),this.hooks.off("setObjectPosition",s),this.hooks.off("applyObjectPosition",l),this.hooks.off("applyObjectRotate",a),this.hooks.off("applyObjectScale",r)})}initialHelperPosition(){this.helperObject3D.position.add(this.calculateOffset(this.offset)),this.helperObject3D.initialPosition()}initialHelperQuaternion(){this.helperObject3D.initQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.helperObject3D.enable(),this.render())}disable(){!this.enabled||(this.enabled=!1,this.helperObject3D.disable(),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){var t;(t=this.disposers)==null||t.forEach(e=>e==null?void 0:e()),this.helperObject3D.dispose(),this.render()}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}onIntersectionOnModelUpdate(t){}onApplyOriginObjectScale(t){this.applyHelperScaleMatrix4(t.matrix4,t.origin)}onApplyOriginObjectRotate(t){this.applyHelperQuaternion(t.quaternion,t.origin)}onApplyOriginObjectPosition(t){this.applyHelperMatrix4(t.matrix4)}onSetOriginObjectScale(t){this.helperObject3D.scale.copy(t),this.updateOffsetByScale(t)}onSetOriginObjectRotate(t,e){this.helperObject3D.quaternion.copy(t)}onSetOriginObjectPosition(t){this.helperObject3D.position.copy(t.clone().add(this.calculateOffset(this.offset)))}render(){this.onRender()}updateOffsetByScale(t){if(this.boundingBox&&this.offset){const e=this.originObject3D.position,n=new I.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),o=new I.Vector3().subVectors(this.boundingBox.min,e).multiply(t).add(e),s=this.calculateOffset(this.offset,{min:o,max:n});this.helperObject3D.position.copy(s),this.helperObject3D.initialPosition()}}hoverListener(t,e=16777215,n=1){const o=(Array.isArray(t)?t:[t]).filter(qe),s=[];for(const r of o)if(r instanceof I.Mesh||r instanceof I.Group){const a=r instanceof I.Group?r.children.filter(d=>d instanceof I.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()},h=()=>{this.isDragging||c()};for(const d of a)this.domEvents.addEventListener(d,"mouseover",u),this.domEvents.addEventListener(d,"mouseout",h),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",h),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;const o=this.helperObject3D.raycasterIntersectObject(t)[0];if(!o)return;const s=o;if(s.object=n,this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<s.point.distanceTo(e))return}return s.object}calculateOffset(t,e){const n=this.originObject3D,o=new I.Vector3(0,0,0);if(!t)return o;const s=()=>e||(this.boundingBox?this.boundingBox:(this.boundingBox=xl(n),this.boundingBox));if(typeof t.x=="number")o.setX(t.x);else if(typeof t.x=="object"){const r=s();o.setX((r.max.x-r.min.x)*t.x.percents)}if(typeof t.y=="number")o.setY(t.y);else if(typeof t.y=="object"){const r=s();o.setY((r.max.y-r.min.y)*t.y.percents)}if(typeof t.z=="number")o.setZ(t.z);else if(typeof t.z=="object"){const r=s();o.setZ((r.max.z-r.min.z)*t.z.percents)}return o}}class Cv extends xn{constructor(...e){super(...e);m(this,"name","ScaleController")}setScale(e){var l,c,u;let n=1,o=1,s=1;typeof e=="number"?(n=e,o=e,s=e):typeof e=="object"&&(n=(l=e.x)!=null?l:1,o=(c=e.y)!=null?c:1,s=(u=e.z)!=null?u:1);const r=new I.Vector3(n,o,s);this.hooks.emit("wantToScale",r)||(this.originObject3D.scale.copy(r),this.hooks.emit("setObjectScale",r),this.hooks.emit("scale",r),this.render())}}class Pv extends O.Object3D{constructor(){super()}add(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.add(...e)}remove(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.remove(...e)}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}}class wi extends Pv{constructor(e,n){var o;super();m(this,"originObject3D");m(this,"onRender");this.originObject3D=e,this.onRender=(o=n==null?void 0:n.onRender)!=null?o:()=>{}}get helperObject(){return this}render(){this.onRender()}enable(){this.parent.children.includes(this)||this.parent.add(this)}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(e,n=[]){return e.intersectObject(this,!0,n)}initialPosition(){this.position.add(this.originObject3D.position)}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,n){this.scale.applyMatrix4(e)}setHelperQuaternion(e,n){if(n){const o=new O.Vector3().subVectors(this.position,n).applyQuaternion(e).add(n);this.position.copy(o)}this.quaternion.copy(e)}applyHelperQuaternion(e,n){if(n){const o=new O.Vector3().subVectors(this.position,n).applyQuaternion(e).add(n);this.position.copy(o)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class Iv extends wi{}class Ev extends wi{}class kv extends wi{}class Dl extends wi{}class xv extends Dl{}class Dv extends I.Group{constructor(e){super();m(this,"direction");this.direction=e||"x"}}class Ll extends I.Mesh{constructor(e,n,o){super(e,n);m(this,"direction");this.direction=o||"x"}}function Lv(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new I.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function bo(i,t,e){if(!t||!e||!i)return;const n=Lv(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new I.Raycaster;return o.setFromCamera(n,i),o}function Sv(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 yo extends Dv{constructor(e){var u;super(e.direction);m(this,"line");m(this,"arrow");m(this,"lineHeight",.4);m(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new I.Color((u=e.color)!=null?u:16214315),o=new I.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:I.DoubleSide}),s=new I.ConeGeometry(.04,.1,32),r=new Ll(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new I.CylinderGeometry(a,a,.4,32),c=new Ll(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 wo={X:15618642,Y:4765519,Z:4227839};class ft{static get X(){return new I.Color(wo.X).convertSRGBToLinear().clone()}static get Y(){return new I.Color(wo.Y).convertSRGBToLinear().clone()}static get Z(){return new I.Color(wo.Z).convertSRGBToLinear().clone()}}class Mv extends Iv{constructor(e){super(e);m(this,"xArrow",new yo({direction:"x",color:ft.X}));m(this,"yArrow",new yo({direction:"y",color:ft.Y}));m(this,"zArrow",new yo({direction:"z",color:ft.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 Ot(i,t){return zv(document.createElement(t!=null?t:"div"),i)}function zv(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function Tv(i){const t=Ot(F({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 Bv extends kv{constructor(e,n){var o;super(e);m(this,"yzCircle");m(this,"xzCircle");m(this,"xyCircle");m(this,"xRingHelper");m(this,"yRingHelper");m(this,"zRingHelper");m(this,"xAngleHelper");m(this,"yAngleHelper");m(this,"zAngleHelper");m(this,"angleTips");m(this,"container");(n==null?void 0:n.yzCircleEnable)!==!1&&(this.yzCircle=new Co({direction:"x",color:ft.X}),this.xRingHelper=new Po({direction:"x"}),this.xAngleHelper=new Io({direction:"x",color:ft.X})),(n==null?void 0:n.xzCircleEnable)!==!1&&(this.xzCircle=new Co({direction:"y",color:ft.Y}),this.yRingHelper=new Po({direction:"y"}),this.yAngleHelper=new Io({direction:"y",color:ft.Y})),(n==null?void 0:n.xyCircleEnable)!==!1&&(this.xyCircle=new Co({direction:"z",color:ft.Z}),this.zRingHelper=new Po({direction:"z"}),this.zAngleHelper=new Io({direction:"z",color:ft.Z})),n!=null&&n.container&&(this.container=n==null?void 0:n.container,this.angleTips=Tv({display:"none"}),(o=this.container)==null||o.appendChild(this.angleTips.element)),this.show()}updateAngleHelperQuaternion(){var e,n,o,s,r,a,l,c,u,h,d,f;(n=this.xAngleHelper)==null||n.quaternion.copy((e=this.yzCircle)==null?void 0:e.quaternion),(s=this.yAngleHelper)==null||s.quaternion.copy((o=this.xzCircle)==null?void 0:o.quaternion),(a=this.zAngleHelper)==null||a.quaternion.copy((r=this.xyCircle)==null?void 0:r.quaternion),(c=this.xRingHelper)==null||c.quaternion.copy((l=this.yzCircle)==null?void 0:l.quaternion),(h=this.yRingHelper)==null||h.quaternion.copy((u=this.xzCircle)==null?void 0:u.quaternion),(f=this.zRingHelper)==null||f.quaternion.copy((d=this.xyCircle)==null?void 0:d.quaternion)}applyHelperQuaternion(e,n){var o,s,r,a,l,c;(o=this.yzCircle)==null||o.applyQuaternion(e),(s=this.xzCircle)==null||s.applyQuaternion(e),(r=this.xyCircle)==null||r.applyQuaternion(e),(a=this.xAngleHelper)==null||a.baseAxes.applyQuaternion(e),(l=this.yAngleHelper)==null||l.baseAxes.applyQuaternion(e),(c=this.zAngleHelper)==null||c.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].filter(Boolean)),(n=(e=this.angleTips)==null?void 0:e.element)==null||n.remove()}filterRingHelper(e){return[this.xRingHelper,this.yRingHelper,this.zRingHelper].filter(n=>e.includes(n==null?void 0:n.direction)).filter(Boolean)}filterAngleHelper(e){return[this.xAngleHelper,this.yAngleHelper,this.zAngleHelper].filter(n=>e.includes(n==null?void 0:n.direction)).filter(Boolean)}}class Co extends I.Mesh{constructor(e){var n;super();m(this,"direction");m(this,"gapAngle",.02);m(this,"geometry",new I.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new I.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:I.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 Po extends I.Group{constructor(e){super();m(this,"direction");this.direction=e.direction;const n=.015,o=new Array(8).fill(null).map((s,r)=>{const a=new I.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new I.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),c=new I.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 Io extends I.Mesh{constructor(e){var o;super();m(this,"direction");m(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new I.Vector3(0,0,1);break;case"y":this.baseAxes=new I.Vector3(1,0,0);break;case"z":this.baseAxes=new I.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new I.CircleGeometry(n,48,0,1e-4),this.material=new I.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function jv(){const i=Ot({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Ot({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Ot({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:Lt({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:Lt({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:Lt({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:Lt({cursor:"ew-resize",right:n})},l={direction:"nesw",element:Lt({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:Lt({cursor:"ns-resize",top:n})},u={direction:"nwse",element:Lt({cursor:"nwse-resize",left:n,top:n})},h={direction:"ew",element:Lt({cursor:"ew-resize",left:n})};return new Array(s,a,c,h,o,r,l,u).forEach(f=>t.appendChild(f.element)),{container:i,squares:[o,s,r,a,l,c,u,h]}}function Lt(i){const t=Ot(F({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=Ot({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=Ot({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 Vv extends xv{constructor(e,n,o,s){super(e);m(this,"points",[]);m(this,"cornerPositions",[]);m(this,"css3DInstance");m(this,"plane");m(this,"css3DRenderer",new Wt);m(this,"camera");m(this,"scene");m(this,"container");m(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 I.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new I.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 I.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 a;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}=jv();this.points=r.map((l,c)=>({direction:l.direction,point:l.element,position:this.calculatePointPosition(e)[c]})),o.insertBefore(s,(a=o.children[0])!=null?a:null),this.updatePosition()}getCornerPositions(){const{originObject3D:e}=this;if(e.isCSS3DObjectPlus)return e.cornerPoints;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)]}}class Qv extends Ev{constructor(e){super(e);m(this,"box");m(this,"outline");m(this,"originObject");m(this,"positionAttribute");this.originObject=e,this.positionAttribute=new I.BufferAttribute(new Float32Array(8*3),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}raycasterIntersectObject(e,n){return e.intersectObject(this,!1,n)}raycast(e,n){this.box.raycast(e,n)}update(){const e=xl(this.originObject);if(!e)return;const{min:n,max:o}=e;this.positionAttribute.setXYZ(0,o.x,o.y,o.z),this.positionAttribute.setXYZ(1,n.x,o.y,o.z),this.positionAttribute.setXYZ(2,n.x,n.y,o.z),this.positionAttribute.setXYZ(3,o.x,n.y,o.z),this.positionAttribute.setXYZ(4,o.x,o.y,n.z),this.positionAttribute.setXYZ(5,n.x,o.y,n.z),this.positionAttribute.setXYZ(6,n.x,n.y,n.z),this.positionAttribute.setXYZ(7,o.x,n.y,n.z),this.positionAttribute.needsUpdate=!0}createOutline(){const e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new I.BufferGeometry;n.setIndex(new I.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new I.LineBasicMaterial({color:64767,linewidth:1,opacity:1,depthTest:!1,transparent:!0,toneMapped:!1}),s=new I.LineSegments(n,o);return s.matrixAutoUpdate=!1,s}createBox(){const e=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),n=new I.BufferGeometry;n.setIndex(new I.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new I.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new I.Mesh(n,o)}}class Ov extends xn{constructor(...e){super(...e);m(this,"name","MoveController");m(this,"startInfo");m(this,"_moveByMouseEnable",!1);m(this,"mouseInfo");m(this,"mousedownEventListenerDisposer");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),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r),this.hooks.on("rotateStart",l),this.hooks.on("rotateEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",o),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r),this.hooks.off("rotateStart",l),this.hooks.off("rotateEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}),this.moveByMouseEnable&&this.moveByMouse()}get moveByMouseEnable(){return this._moveByMouseEnable}dispose(){var e;super.dispose(),(e=this.disposers)==null||e.forEach(n=>n==null?void 0:n())}moveByMouse(){this._moveByMouseEnable=!0;const e=this.handleMouseDown.bind(this),n=this.handleMouseUp.bind(this);this.hooks.emit("moveByMouseEnable"),setTimeout(()=>{this.container.addEventListener("mousedown",e),this.container.addEventListener("mouseup",n)}),this.mousedownEventListenerDisposer=()=>{this.container.removeEventListener("mousedown",e),this.container.removeEventListener("mouseup",n)}}disableMoveByMouse(){var e;this._moveByMouseEnable=!1,this.hooks.emit("moveByMouseDisable"),(e=this.mousedownEventListenerDisposer)==null||e.call(this)}onIntersectionOnModelUpdate(e){!this.moveByMouseEnable||this.hooks.emit("wantToMove",e.point)||(this.originObject3D.position.copy(e.point),this.hooks.emit("setObjectPosition",e.point),this.hooks.emit("move",e.point))}onApplyOriginObjectScale(e){}handleMouseDown(e){const{x:n,y:o}=e;this.mouseInfo={x:n,y:o,mouseDownTimestamp:Date.now()}}handleMouseUp(e){if(!this.mouseInfo)return;const{x:n,y:o}=e;this.mouseInfo.x===n&&this.mouseInfo.y===o&&Date.now()-this.mouseInfo.mouseDownTimestamp<500&&(this.disableMoveByMouse(),this.mouseInfo=void 0)}dragStart(e){if(this._moveByMouseEnable||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 I.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new I.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new I.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(),h=new I.Plane;h.setFromNormalAndCoplanarPoint(c,u),this.startInfo={startVectorProject:u.clone().projectOnVector(l),directionVector:l,plane:h},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=bo(this.camera,e,this.container);return n?(console.log("%c MoveController 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 I.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),u=new I.Matrix4;u.setPosition(c);const h=r.position.clone().applyMatrix4(u);this.hooks.emit("wantToMove",h)||(r.applyMatrix4(u),s.copy(l),this.hooks.emit("applyObjectPosition",{matrix4:u}),this.hooks.emit("move",h))}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 Dn{constructor(t,e,n,o,s,r){m(this,"helperController");m(this,"five");m(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});m(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});m(this,"onFiveIntersectionOnModelUpdate",(...t)=>{!this.helperController||this.helperController.onIntersectionOnModelUpdate(...t)});const{camera:a,model:l,scene:c}=t,u=t.getElement();if(this.five=t,!a||!l||!u||!c)return;const h=()=>{t.needsRender=!0};this.helperController=new e({camera:a,model:l,originObject3D:n,helperObject3D:o,container:u,scene:c,onRender:h,sharedHooks:r},s),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture),t.on("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate)}dispose(){var t;this.five.off("wantsTapGesture",this.onFiveWantsTapGesture),this.five.off("wantsGesture",this.onFiveWantsGesture),this.five.off("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate),(t=this.helperController)==null||t.dispose()}}const Eo="Object3DHelper@v1.0.1",Rv=()=>{console.error(`${Eo} is disposed`)},Fv=()=>{console.warn(`${Eo} is disabled`)},Gv=()=>{console.error(`${Eo} is disabled`)};class Hv{constructor(t){m(this,"controllers",{});m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"hooks",new Gt);m(this,"eventListener",{});t&&this.addControllers(t),this.setState(this.state)}show(t){return N(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return N(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 Rv();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return Gv();const n=F({},this.state);this.state=F(F({},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=F(F({},this.controllers),t),this.setState(this.state)}getCurrentState(){return this.state}handleEnable(t,e=!0){t?(this.everyControllerDo(n=>{n.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(n=>{n.disable()}),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()}),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()});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&&Fv()}}class Wv extends xn{constructor(...e){super(...e);m(this,"name","RotateController");m(this,"startInfo");m(this,"lastRotation");m(this,"rotations",[]);m(this,"helperObject3DQuaternion",this.originObject3D.quaternion.clone());m(this,"removeListener");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),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.removeListener=()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",o),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}}get rotateCenter(){return this.helperObject3D.position.clone()}initialHelperQuaternion(){this.helperObject3D.updateAngleHelperQuaternion(),this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}setRotateAngle(e){const{x:n=0,y:o=0,z:s=0}=e,r=new I.Euler(Math.PI*n/180,Math.PI*o/180,Math.PI*s/180),a=new I.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:u}=this;if(u){const h=new I.Vector3().subVectors(c.position,u).applyQuaternion(a).add(u);c.position.copy(h)}c.quaternion.copy(a),this.helperObject3DQuaternion.copy(a),this.hooks.emit("setObjectRotate",a,u),this.hooks.emit("rotate",a),this.render()}dispose(){this.removeListener(),super.dispose()}onApplyOriginObjectScale(e){}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.getAngleHelper(o);this.setTipsAngle(0);const a=s.clone();a.y+=.2,this.setTipsPosition(a);const l=new I.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),c=new I.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),u=new I.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),h=(()=>{switch(o){case"x":return l;case"y":return c;case"z":return u}})(),d=new I.Plane().setFromNormalAndCoplanarPoint(h,s),f=new I.Vector3;d.projectPoint(s.clone(),f);const p=f.clone().sub(this.rotateCenter),v=p.clone(),g=p.angleTo(r.baseAxes);this.setAngleHelperStart(o,g),this.setAngleHelperLength(o,0),this.rotations.push({vector:p.clone(),direction:!0}),this.startInfo={direction:o,startVector:p,staticStartVector:v,plane:d,angleHelper:r},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=bo(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=e.ray.intersectPlane(o,new I.Vector3);if(!l)return;const c=this.rotateCenter,u=new I.Vector3;o.projectPoint(l.clone(),u);const h=u.clone().sub(c);if(n.angleTo(h)===0||(this.lastRotation===void 0&&(this.lastRotation={angle:0}),this.rotations.length===0))return;const d=(()=>{if(this.rotations.length===1)return h.angleTo(s.baseAxes)>r.angleTo(s.baseAxes);{const A=this.rotations[this.rotations.length-1],y=this.rotations[this.rotations.length-2],w=h.angleTo(y.vector),C=h.angleTo(A.vector),x=A.vector.angleTo(y.vector);if(x===0||C===0||w===0)return;if(w>C&&w>x)return A.direction;if(w<x&&C<x||w<C&&C>x)return!A.direction}})();if(d===void 0)return console.warn("rotationDirection is undefined");const f=new I.Quaternion().setFromUnitVectors(n.clone().normalize(),h.clone().normalize()),{originObject3D:p}=this,v=p.quaternion.clone().premultiply(f);if(!this.hooks.emit("wantToRotate",v)){if(this.rotations.push({vector:h,direction:d}),this.rotations=this.rotations.slice(-2),this.lastRotation.angle=this.lastRotation.angle+h.angleTo(n)*(d?1:-1),this.setAngleHelperLength(a,this.lastRotation.angle),this.setTipsAngle(this.lastRotation.angle/Math.PI*180),c){const A=new I.Vector3().subVectors(p.position,c).applyQuaternion(f).add(c);p.position.copy(A)}p.applyQuaternion(f),this.helperObject3DQuaternion.premultiply(f),this.hooks.emit("applyObjectRotate",{quaternion:f,origin:c}),this.hooks.emit("rotate",p.quaternion),this.startInfo.startVector=h}}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 I.Mesh&&o.geometry instanceof I.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new I.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 I.Mesh&&r.geometry instanceof I.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new I.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 Nv extends xn{constructor(...e){super(...e);m(this,"startInfo");m(this,"name","RectangleScaleController")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}onApplyOriginObjectScale(e){}getDragPlane(){const e=new I.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new O.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=bo(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n),console.log("%c RectangleScaleController dragging","color: #49de1b")}scale(e){var j,_;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 O.Vector3);if(!a||Sv(a,this.camera.position))return;const l=new O.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:u}=o,h=new O.Vector3().subVectors(r[1],r[0]),d=new O.Vector3().subVectors(r[3],r[0]),f=G=>{const Z=new O.Vector3(0,0,0);if(!this.startInfo)return Z;const Q=(G==="ew"?h:d).clone(),B=c.clone().projectOnVector(Q),R=a.clone().projectOnVector(Q),W=l.clone().projectOnVector(Q);if(R.equals(B))return Z;if(G==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const X=new O.Vector3().subVectors(R,W),J=X.x<0&&Q.x>=0,he=X.y<0&&Q.y>=0,fe=X.z<0&&Q.z>=0;this.startInfo.dragPointInCenterBottom=J||he||fe}if(G==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const X=new O.Vector3().subVectors(R,W),J=X.x<0&&Q.x>=0,he=X.y<0&&Q.y>=0,fe=X.z<0&&Q.z>=0;this.startInfo.dragPointInCenterLeft=J||he||fe}const H=new O.Vector3().subVectors(R,B),te=H.length();return te>.3?(console.warn("offset.length() > 0.3, skipped",te),Z):H},p=f("ew"),v=f("ns"),g=()=>{const G=p;this.helperObject3D.cornerPositions.forEach((Z,Q)=>{var B;(B=this.startInfo)!=null&&B.dragPointInCenterLeft?(Q===0||Q===3)&&Z.add(G):(Q===1||Q===2)&&Z.add(G)})},A=()=>{const G=v;this.helperObject3D.cornerPositions.forEach((Z,Q)=>{var B;(B=this.startInfo)!=null&&B.dragPointInCenterBottom?(Q===0||Q===1)&&Z.add(G):(Q===2||Q===3)&&Z.add(G)})};switch(u){case"ew":g();break;case"ns":A();break;case"nesw":case"nwse":g(),A()}const y=new O.Vector3().subVectors(r[1],r[0]).length()/h.length(),w=new O.Vector3().subVectors(r[3],r[0]).length()/d.length(),C=new O.Vector3(y,w,1),x=new I.Matrix4().scale(C);n.isCSS3DObjectPlus?n.applyScaleMatrix4(x):n.scale.applyMatrix4(x),o.position.copy(a);const E=new O.Vector3().addVectors(r[0],r[2]).divideScalar(2),S=new O.Vector3().subVectors(E,l),k=new I.Matrix4().setPosition(S);n.applyMatrix4(k),(j=this.helperObject3D.css3DInstance)==null||j.css3DObject.applyMatrix4(k),(_=this.helperObject3D.plane)==null||_.applyMatrix4(k),this.hooks.emit("applyObjectScale",{matrix4:x}),this.hooks.emit("applyObjectPosition",{matrix4:k}),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 _v extends Nv{constructor(...e){super(...e);m(this,"name","CSS3DScaleController");this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(e=>{if(!e)return;const n=e.point,o=a=>this.dragStart(a,e),s=this.dragging.bind(this),r=this.dragEnd.bind(this);n.addEventListener("dragstart",o),n.addEventListener("drag",s),n.addEventListener("dragend",r)})}}class Xv extends xn{constructor(...e){super(...e);m(this,"name","BoundingBoxController")}}class Yv extends Dl{constructor(t){super(t)}}const ko="v1.0.0",xo="Object3DHelperPlugin",Ci=`${xo}@${ko}`,Uv=()=>{console.error(`${Ci} is disposed`)},Jv=()=>{console.warn(`${Ci} is disabled`)},Zv=()=>{console.error(`${Ci} is disabled`)};class Sl extends ti{constructor(e){super(e);m(this,"version",ko);m(this,"name",xo);m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"objectHelperMap",new Map);m(this,"css3DObjectParentMap",new Map);m(this,"css3DRender");this.five=e,this.css3DRender=new Wt(this.five.scene),console.warn("Object3DHelper: \u4F7F\u7528\u6B64\u63D2\u4EF6\uFF0C\u9700\u8981\u5728\u521D\u59CB\u5316five\u65F6\uFF0C\u8BBE\u7F6Efive\u53C2\u6570: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${xo.toUpperCase()}_DEBUG__`]:this})}show(e){return N(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return N(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 Uv();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return Zv();const o=F({},this.state);this.state=F(F({},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 f;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 Hv,s=[],r=(f=this.five.getElement())==null?void 0:f.parentElement,a=this.five.camera,{moveHelper:l=!0,rotateHelper:c=!0,scaleHelper:u=!0,boundingBoxHelper:h=!1}=n,d=new me.Subscribe;if(l){const p=new Mv(e),v=this.getConfig(n.moveHelper),g=new Dn(this.five,Ov,e,p,v,d);o.addControllers({moveController:g.helperController}),s.push(()=>g.dispose())}if(c){const p=this.getConfig(n.rotateHelper),v=new Bv(e,F({container:r},p)),g=new Dn(this.five,Wv,e,v,p,d);o.addControllers({rotateController:g.helperController}),s.push(()=>g.dispose())}if(h){const p=new Qv(e),v=new Dn(this.five,Xv,e,p,void 0,d);o.addControllers({boundingBoxController:v.helperController})}if(u)if(e.isCSS3DObjectPlus&&r){const p=new Vv(e,r,a,this.five.scene),v=new Dn(this.five,_v,e,p,void 0,d);o.addControllers({scaleController:v.helperController}),s.push(()=>v.dispose()),Ro(this.five).then(()=>{var g,A;if(e.isCSS3DObjectPlus){const y=e;if(!y||y.mode!=="front")return;const w=(g=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?g:Fo(this.five);w&&(this.css3DObjectParentMap.set(y,y.parent),y.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(w),(A=this.css3DRender.getBehindCSS3DObjectGroup())==null||A.add(y),this.css3DRender.render(this.five.camera))}})}else{const p=new Yv(e),v=new Dn(this.five,Cv,e,p,void 0,d);o.addControllers({scaleController:v.helperController}),s.push(()=>v.dispose())}return this.objectHelperMap.set(e,{helper:o,disposers:s}),o.controllers}removeObject3DHelper(e){if(!this.objectHelperMap.has(e))return;const{helper:n,disposers:o}=this.objectHelperMap.get(e);if(!!n){if(e.isCSS3DObjectPlus){const s=e,r=this.css3DObjectParentMap.get(s);r&&r.add(s),this.css3DRender.render(this.five.camera)}this.objectHelperMap.delete(e),n.dispose(),o==null||o.forEach(s=>s==null?void 0:s())}}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.objectHelperMap.forEach(({helper:e,disposers:n})=>{e.dispose(),n==null||n.forEach(o=>o==null?void 0:o())})}everyHelperDo(e){this.objectHelperMap.forEach(({helper:n,disposers:o})=>{n&&e(n)})}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&Jv()}getConfig(e){if(!!e&&typeof e!="boolean"&&e.enable)return e}}const qv=i=>new Sl(i);Y.CSS3DRender=Wt,Y.CSS3DRenderPlugin=Nt,Y.CameraMovementEffect=Xs,Y.CameraMovementPlugin=ph,Y.ContentType=Kr,Y.CruisePlugin=Zm,Y.CruisePluginController=so,Y.DIRECTION=on,Y.DISPLAY_STRATEGY_TYPE=Vt,Y.DimensionType=$r,Y.FLOOR_PLAN_ATTACHED_TO=It,Y.FLOOR_TYPE_MAP=ih,Y.GuideLinePlugin=Nr,Y.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=Qt,Y.ItemLabelPlugin=wm,Y.Magnifier=or,Y.MapviewFloorplanPlugin=jd,Y.ModelChassisCompassPlugin=rh,Y.ModelEntryDoorGuidePlugin=ch,Y.ModelFloorplanPlugin=Md,Y.ModelItemLabelPlugin=tm,Y.ModelRoomLabelPlugin=Wc,Y.ModelTVVideoPlugin=om,Y.ModelViewPlugin=ql,Y.Object3DHelperController=Sl,Y.Object3DHelperPlugin=qv,Y.PLUGIN=Ci,Y.PaintBrush=Zl,Y.PaintBrushTypeEnum=at,Y.PanoCompassPlugin=Vh,Y.PanoCursorRaycasterPlugin=pc,Y.PanoDoorLabelPlugin=Bm,Y.PanoFloorplanRadarPlugin=th,Y.PanoMeasurePlugin=Lf,Y.PanoMeasurePluginLine=jt,Y.PanoMeasurePluginModel=di,Y.PanoMeasurePluginPoint=Ze,Y.PanoMeasurePluginPolyline=ui,Y.PanoRulerPlugin=yh,Y.PanoRulerProPlugin=Mh,Y.PanoSpatialTagPlugin=Nf,Y.PanoTagPlugin=wv,Y.PanoTagPluginController=kl,Y.PointType=ea,Y.ROOM_FETILE_TYPE_MAP=nh,Y.ROOM_TYPE_MAP=oh,Y.Rotation=tt,Y.TopviewFloorplanPlugin=Qd,Y.Util=F0,Y.VERSION=ko,Y.itemLabelPluginServerParams=Cm,Y.modelItemLabelPluginServerParams=nm,Y.modelRoomLabelPluginServerParams=Nc,Y.pluginFlag=yv,Object.defineProperties(Y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|