@realsee/dnalogel 2.6.7-dev.0 → 2.6.7-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/dist/PanoTagPlugin/controller/TagComputer.d.ts +3 -2
  2. package/dist/PanoTagPlugin/controller/index.d.ts +1 -0
  3. package/dist/PanoTagPlugin/typings/tag/TagConfig.d.ts +2 -1
  4. package/dist/index.cjs.js +14 -14
  5. package/dist/index.js +142 -120
  6. package/dist/index.umd.js +12 -12
  7. package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
  8. package/dist/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.d.ts +2 -0
  9. package/docs/assets/search.js +1 -1
  10. package/docs/classes/CSS3DRender.html +31 -31
  11. package/docs/classes/CruisePluginController.html +24 -24
  12. package/docs/classes/Magnifier.html +20 -20
  13. package/docs/classes/ModelRoomLabelController.html +11 -11
  14. package/docs/classes/Object3DHelperController.html +24 -24
  15. package/docs/classes/PaintBrush.html +15 -15
  16. package/docs/classes/PanoMeasurePluginLine.html +23 -23
  17. package/docs/classes/PanoMeasurePluginModel.html +22 -22
  18. package/docs/classes/PanoMeasurePluginPoint.html +14 -14
  19. package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
  20. package/docs/classes/PanoTagPluginController.html +190 -44
  21. package/docs/classes/Util.BetterTween.html +8 -8
  22. package/docs/classes/Util.FivePointSelector.html +12 -12
  23. package/docs/classes/Util.Interval.html +12 -12
  24. package/docs/classes/Util.Magnifier.html +17 -17
  25. package/docs/classes/Util.PointDomHelper.html +11 -11
  26. package/docs/classes/Util.PointHelper.html +11 -11
  27. package/docs/classes/Util.Rectangle.html +13 -13
  28. package/docs/enums/CameraMovementEffect.html +7 -7
  29. package/docs/enums/ContentType.html +18 -18
  30. package/docs/enums/DIRECTION.html +9 -9
  31. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
  32. package/docs/enums/DimensionType.html +7 -7
  33. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
  34. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
  35. package/docs/enums/PaintBrushTypeEnum.html +8 -8
  36. package/docs/enums/PointType.html +7 -7
  37. package/docs/enums/Rotation.html +8 -8
  38. package/docs/functions/CSS3DRenderPlugin.html +5 -5
  39. package/docs/functions/CameraMovementPlugin.html +5 -5
  40. package/docs/functions/CruisePlugin.html +5 -5
  41. package/docs/functions/GuideLinePlugin.html +5 -5
  42. package/docs/functions/ItemLabelPlugin.html +5 -5
  43. package/docs/functions/MapviewFloorplanPlugin.html +5 -5
  44. package/docs/functions/ModelChassisCompassPlugin.html +5 -5
  45. package/docs/functions/ModelEntryDoorGuidePlugin.html +5 -5
  46. package/docs/functions/ModelFloorplanPlugin.html +5 -5
  47. package/docs/functions/ModelItemLabelPlugin.html +5 -5
  48. package/docs/functions/ModelRoomLabelPlugin.html +5 -5
  49. package/docs/functions/ModelTVVideoPlugin.html +5 -5
  50. package/docs/functions/ModelViewPlugin.html +5 -5
  51. package/docs/functions/Object3DHelperPlugin.html +5 -5
  52. package/docs/functions/PanoCompassPlugin.html +5 -5
  53. package/docs/functions/PanoCursorRaycasterPlugin.html +5 -5
  54. package/docs/functions/PanoDoorLabelPlugin.html +5 -5
  55. package/docs/functions/PanoFloorplanRadarPlugin.html +5 -5
  56. package/docs/functions/PanoMeasurePlugin.html +5 -5
  57. package/docs/functions/PanoRulerPlugin.html +5 -5
  58. package/docs/functions/PanoRulerProPlugin.html +5 -5
  59. package/docs/functions/PanoSpatialTagPlugin.html +5 -5
  60. package/docs/functions/PanoTagPlugin.html +5 -5
  61. package/docs/functions/TopviewFloorplanPlugin.html +5 -5
  62. package/docs/functions/Util.getCoordsFromClient.html +5 -5
  63. package/docs/functions/Util.getCoordsFromElement.html +5 -5
  64. package/docs/functions/Util.getFrameTime.html +5 -5
  65. package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
  66. package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
  67. package/docs/functions/Util.isNil.html +5 -5
  68. package/docs/functions/Util.nextFrame.html +5 -5
  69. package/docs/functions/Util.notNil.html +5 -5
  70. package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
  71. package/docs/functions/Util.tweenProgress.html +5 -5
  72. package/docs/functions/pluginFlag.html +5 -5
  73. package/docs/index.html +4 -4
  74. package/docs/interfaces/AddTagConfig.html +6 -6
  75. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
  76. package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
  77. package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
  78. package/docs/interfaces/EventMap.html +15 -15
  79. package/docs/interfaces/FloorplanBounding.html +8 -8
  80. package/docs/interfaces/FloorplanData.html +10 -10
  81. package/docs/interfaces/FloorplanEntrance.html +11 -11
  82. package/docs/interfaces/FloorplanExtraObject.html +10 -10
  83. package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
  84. package/docs/interfaces/FloorplanFloorData.html +9 -9
  85. package/docs/interfaces/FloorplanImagePosition.html +7 -7
  86. package/docs/interfaces/FloorplanObserver.html +9 -9
  87. package/docs/interfaces/FloorplanOutlineItem.html +9 -9
  88. package/docs/interfaces/FloorplanPosition.html +7 -7
  89. package/docs/interfaces/FloorplanRoomItem.html +13 -13
  90. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
  91. package/docs/interfaces/FloorplanServerBounding.html +8 -8
  92. package/docs/interfaces/FloorplanServerComputedData.html +10 -10
  93. package/docs/interfaces/FloorplanServerData.html +7 -7
  94. package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
  95. package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
  96. package/docs/interfaces/FloorplanServerEntrance.html +11 -11
  97. package/docs/interfaces/FloorplanServerFloorData.html +9 -9
  98. package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
  99. package/docs/interfaces/FloorplanServerObserver.html +9 -9
  100. package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
  101. package/docs/interfaces/FloorplanServerPosition.html +7 -7
  102. package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
  103. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
  104. package/docs/interfaces/HelperOffset.html +8 -8
  105. package/docs/interfaces/ItemLabelPluginData.html +6 -6
  106. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
  107. package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
  108. package/docs/interfaces/MinMax.html +7 -7
  109. package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
  110. package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
  111. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
  112. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
  113. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
  114. package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
  115. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
  116. package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
  117. package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
  118. package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
  119. package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
  120. package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
  121. package/docs/interfaces/ModelViewPluginExportType.html +11 -11
  122. package/docs/interfaces/Object3DHelperState.html +8 -8
  123. package/docs/interfaces/ObjectHelperControllers.html +9 -9
  124. package/docs/interfaces/PaintBrushAction.html +12 -12
  125. package/docs/interfaces/PaintBrushConfigs.html +12 -12
  126. package/docs/interfaces/PaintBrushState.html +10 -10
  127. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
  128. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
  129. package/docs/interfaces/PanoMeasureParameterType.html +12 -12
  130. package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -8
  131. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -7
  132. package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -7
  133. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -8
  134. package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
  135. package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
  136. package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
  137. package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
  138. package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
  139. package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
  140. package/docs/interfaces/PanoRulerProPluginState.html +8 -8
  141. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
  142. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
  143. package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
  144. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
  145. package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
  146. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
  147. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
  148. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
  149. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
  150. package/docs/interfaces/Point.html +8 -8
  151. package/docs/interfaces/Room.html +9 -9
  152. package/docs/interfaces/RoomInfo.html +7 -7
  153. package/docs/interfaces/RoomLabel.html +14 -14
  154. package/docs/interfaces/RoomRules.html +5 -5
  155. package/docs/interfaces/Rooms.html +5 -5
  156. package/docs/interfaces/Scissor.html +9 -9
  157. package/docs/interfaces/State.html +8 -8
  158. package/docs/interfaces/TagCache.html +12 -12
  159. package/docs/interfaces/TagConfig.html +11 -11
  160. package/docs/interfaces/TagIconUrl.html +9 -9
  161. package/docs/interfaces/Tags.html +9 -9
  162. package/docs/interfaces/TemporaryState.html +6 -6
  163. package/docs/interfaces/Util.MagnifierParameter.html +11 -11
  164. package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
  165. package/docs/modules/Util.html +5 -5
  166. package/docs/modules.html +4 -4
  167. package/docs/types/ArrayPosition.html +5 -5
  168. package/docs/types/AudioAppearance.html +5 -5
  169. package/docs/types/AudioTagTypeConfigKey.html +5 -5
  170. package/docs/types/CSS3DRenderExportType.html +5 -5
  171. package/docs/types/CSS3DRenderPluginExportType.html +5 -5
  172. package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
  173. package/docs/types/ClassFunctionParameters.html +5 -5
  174. package/docs/types/Color.html +5 -5
  175. package/docs/types/ContentTypeConfigKey.html +5 -5
  176. package/docs/types/ContentTypeConfigKeySplit.html +5 -5
  177. package/docs/types/ContentTypeMap.html +5 -5
  178. package/docs/types/Create3DDomContainerReturnType.html +5 -5
  179. package/docs/types/Create3DElementReturnType.html +5 -5
  180. package/docs/types/CruisePluginExportType.html +5 -5
  181. package/docs/types/Direction-1.html +5 -5
  182. package/docs/types/Direction4.html +5 -5
  183. package/docs/types/FloorplanRuleLabels.html +5 -5
  184. package/docs/types/FloorplanServerRuleLabels.html +5 -5
  185. package/docs/types/GuideLinePluginExportType.html +5 -5
  186. package/docs/types/HelperEventMap.html +5 -5
  187. package/docs/types/LoadTagConfig.html +5 -5
  188. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
  189. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
  190. package/docs/types/MediaData.html +5 -5
  191. package/docs/types/MediaStore.html +5 -5
  192. package/docs/types/ModelElement.html +5 -5
  193. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
  194. package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
  195. package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
  196. package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
  197. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
  198. package/docs/types/MoveArgs.html +5 -5
  199. package/docs/types/MoveOpts.html +5 -5
  200. package/docs/types/Object3DHelperEventMap.html +5 -5
  201. package/docs/types/ObjectFit.html +5 -5
  202. package/docs/types/PaintBrushEventMap.html +5 -5
  203. package/docs/types/PanoCompassPluginData.html +5 -5
  204. package/docs/types/PanoCompassPluginExportType.html +5 -5
  205. package/docs/types/PanoCompassPluginParameterType.html +5 -5
  206. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
  207. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
  208. package/docs/types/PanoIndex.html +5 -5
  209. package/docs/types/PanoMeasurePluginEvent.html +5 -5
  210. package/docs/types/PanoMeasureReturnType.html +5 -5
  211. package/docs/types/PanoSpatialTagPluginId.html +5 -5
  212. package/docs/types/PanoTagPluginExportInterface.html +5 -5
  213. package/docs/types/PanoTagPluginParamsInterface.html +5 -5
  214. package/docs/types/PlaneTag.html +5 -5
  215. package/docs/types/PlaneTagElement.html +5 -5
  216. package/docs/types/Point2DElement.html +5 -5
  217. package/docs/types/Point2DTag.html +5 -5
  218. package/docs/types/Point3DElement.html +5 -5
  219. package/docs/types/Point3DTag.html +5 -5
  220. package/docs/types/PointTag.html +5 -5
  221. package/docs/types/PointTagElement.html +5 -5
  222. package/docs/types/Position.html +5 -5
  223. package/docs/types/RotateArgs.html +5 -5
  224. package/docs/types/RotateOpts.html +5 -5
  225. package/docs/types/RuleLabelsKey.html +5 -5
  226. package/docs/types/RuleLabelsValue.html +5 -5
  227. package/docs/types/StickType.html +5 -5
  228. package/docs/types/Tag.html +5 -5
  229. package/docs/types/Tag2D.html +5 -5
  230. package/docs/types/Tag3D.html +5 -5
  231. package/docs/types/TagContentType.html +5 -5
  232. package/docs/types/TagDimensionType.html +5 -5
  233. package/docs/types/TagElement.html +5 -5
  234. package/docs/types/TagEvents.html +5 -5
  235. package/docs/types/TagGLTFObject.html +5 -5
  236. package/docs/types/TagHooks.html +5 -5
  237. package/docs/types/TagIconSize.html +5 -5
  238. package/docs/types/TagId.html +5 -5
  239. package/docs/types/TagPointType.html +5 -5
  240. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
  241. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
  242. package/docs/types/WorkCode.html +5 -5
  243. package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
  244. package/docs/variables/PLUGIN.html +5 -5
  245. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
  246. package/docs/variables/ROOM_TYPE_MAP.html +5 -5
  247. package/docs/variables/VERSION.html +5 -5
  248. package/docs/variables/itemLabelPluginServerParams.html +5 -5
  249. package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
  250. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
  251. package/libs/CSS3DRenderPlugin/CSS3DRender.js +60 -56
  252. package/libs/PanoTagPlugin/controller/TagComputer.d.ts +3 -2
  253. package/libs/PanoTagPlugin/controller/TagComputer.js +88 -80
  254. package/libs/PanoTagPlugin/controller/index.d.ts +1 -0
  255. package/libs/PanoTagPlugin/controller/index.js +57 -56
  256. package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +2 -1
  257. package/libs/shared-utils/Object3DHelper/Base/BaseController.js +38 -38
  258. package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
  259. package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +26 -23
  260. package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.d.ts +2 -0
  261. package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js +28 -22
  262. package/package.json +1 -1
  263. package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.d.ts +0 -4
  264. package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.js +0 -6
  265. package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.d.ts +0 -93
  266. package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.js +0 -5622
  267. package/libs/PanoTagPlugin/mocks/v1/mock-test3-realsee-cn-4zr0A5.js +0 -1325
  268. package/libs/PanoTagPlugin/mocks/v1/mock1.d.ts +0 -173
  269. package/libs/PanoTagPlugin/mocks/v1/mock1.js +0 -122
  270. package/libs/PanoTagPlugin/mocks/v1/mock2.d.ts +0 -233
  271. package/libs/PanoTagPlugin/mocks/v1/mock2.js +0 -296
  272. package/libs/PanoTagPlugin/mocks/v1/mock3.d.ts +0 -22
  273. package/libs/PanoTagPlugin/mocks/v1/mock3.js +0 -32
  274. package/libs/PanoTagPlugin/mocks/v1/mock4.d.ts +0 -56
  275. package/libs/PanoTagPlugin/mocks/v1/mock4.js +0 -60
  276. package/libs/PanoTagPlugin/mocks/v1/mock5.d.ts +0 -13
  277. package/libs/PanoTagPlugin/mocks/v1/mock5.js +0 -17
  278. package/libs/PanoTagPlugin/mocks/v1/mock6.d.ts +0 -16
  279. package/libs/PanoTagPlugin/mocks/v1/mock6.js +0 -27
  280. package/libs/PanoTagPlugin/mocks/v1/mock7.d.ts +0 -22
  281. package/libs/PanoTagPlugin/mocks/v1/mock7.js +0 -228
package/dist/index.umd.js CHANGED
@@ -98,12 +98,12 @@ transition: all 500ms;
98
98
  }
99
99
 
100
100
  </style>
101
- `;class Ql extends jl{constructor(e){super();m(this,"configs");m(this,"clientWidth");m(this,"clientHeight");m(this,"ready",!1);m(this,"uuid",He());m(this,"tween");m(this,"tweening",!1);m(this,"container");m(this,"canvas");m(this,"data",{});m(this,"tempLine",{});this.configs=e,this.clientWidth=document.body.clientWidth,this.clientHeight=document.body.clientHeight,this.container=this.ifInsertToDOM(),this.canvas={},this.initCtrl()}get color(){return this.configs.currentColor}get state(){return this.data}get dpr(){return this.configs.DPR||1}ifInsertToDOM(){if(this.container)return this.container;if(this.configs.container)this.configs.container.id="_gl_paintBrush",this.container=this.configs.container;else if(document.getElementById("_gl_paintBrush"))this.container=document.getElementById("_gl_paintBrush");else{const e=document.createElement("div");e.id="_gl_paintBrush",document.body.appendChild(e),this.container=e}return this.container.innerHTML=Vl,this.container}initCanvas(e){const n=document.createElement("canvas");n.className=e,n.width=this.clientWidth,n.height=this.clientHeight;const o=n.getContext("2d");if(!!o)return o.lineWidth=5*this.dpr,o.lineCap="round",o.lineJoin="round",this.container.appendChild(n),n}initCtrl(){const e=document.createElement("div");e.className="_paintBrush-ctrl";const n=document.createElement("div");n.className="_paintBrush-ctrlinner";const o=document.createElement("a");o.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--undo",o.addEventListener("click",a=>{var f;if(a.stopPropagation(),this.configs.onClickUndo&&this.configs.onClickUndo(),!this.canvas[this.uuid]||!this.data[this.uuid]||this.data[this.uuid].length===0)return;const l=this.data[this.uuid].pop();l&&this.emitStateChange({type:it.Undo,color:this.color,ready:this.ready,state:l,uuid:this.uuid});const c=(f=this.canvas[this.uuid])==null?void 0:f.getContext("2d");if(!this.canvas[this.uuid])return;const{width:d,height:u}=this.canvas[this.uuid];c&&c.clearRect(0,0,d,u),this.data[this.uuid].forEach(h=>this.handleDrawLine(this.uuid,h,{withUndo:!0}))});const s=document.createElement("a");return s.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--close",s.addEventListener("click",a=>{a.stopPropagation(),this.closeBrush(),this.configs.onClickClose&&this.configs.onClickClose()}),[o,s].forEach(a=>{const l=document.createElement("i");l.className="brush-icon";const c=document.createElement("span");c.className="brush-txt",c.innerText=a.className.endsWith("undo")?this.configs.onUndoText:this.configs.onExitText,a.appendChild(l),a.appendChild(c)}),n.appendChild(o),n.appendChild(s),e.appendChild(n),this.container.appendChild(e),e}openBrush(){if(this.ready)return;this.canvas[this.uuid]||(this.canvas[this.uuid]=this.initCanvas("_paintBrush-canvas")),this.container.className="brushing";const e=this.canvas[this.uuid];e.getContext("2d").clearRect(0,0,e.width,e.height),this.openBrushHandle(),this.ready=!0,this.emit("readyChange",!0)}closeBrush(){!this.ready||(this.container.className="",this.data={},this.tempLine={},Object.keys(this.canvas).forEach(e=>{this.canvas[e].ontouchstart=()=>!1,this.canvas[e].ontouchmove=()=>!1,this.canvas[e].ontouchend=()=>!1,this.canvas[e].ontouchcancel=()=>!1;const n=this.canvas[e].getContext("2d");n&&n.clearRect(0,0,this.canvas[e].width,this.canvas[e].height)}),this.ready=!1,this.emit("readyChange",!1),this.emitStateChange({type:it.Exit,color:this.color,ready:!1,uuid:this.uuid}))}updateCurrentColor(e){const n=this.canvas[this.uuid];if(!n)return;const o=n.getContext("2d");!o||(this.configs.currentColor=e,o.strokeStyle=e)}openBrushHandle(){const e=this.canvas[this.uuid];if(!e)return;const n=e.getContext("2d");if(!n)return;const o=this.color||"#6D92FF";n.strokeStyle=o;let s=null,r=[],a,l=[],c=0;const d=(u,f,h)=>{const p=this.color||"#ff0000";n.strokeStyle=p,n.beginPath(),n.moveTo(u.x,u.y),n.quadraticCurveTo(f.x,f.y,h.x,h.y),n.stroke()};e.onmousedown=u=>{u.preventDefault(),c=Date.now();const f=u.clientX,h=u.clientY;r=[],r.push({x:f,y:h}),s={x:f,y:h},a=Dn({x:f,y:h},this.clientWidth,this.clientHeight),l=[]},e.onmousemove=u=>{if(u.preventDefault(),!s)return;const f=Number(u.clientX),h=Number(u.clientY);if(Math.abs(f-s.x)<5&&Math.abs(h-s.y)<5||(r.push({x:f,y:h}),l.push(Dn({x:f,y:h},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:p,end:A}=Ln(r);!p||!A||(d(s,p,A),s=A)},e.onmouseup=u=>{if(u.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const f=Date.now()-c,h={move:Object.assign({},a),uuid:this.uuid,line:[...l],color:this.color,duration:f<1280?f:f<2e3?1280:0};this.data[this.uuid].push(h),Sn(()=>{this.emitStateChange({type:it.Drawline,color:this.color,ready:this.ready,state:h,uuid:this.uuid})})},e.ontouchstart=u=>{u.preventDefault(),c=Date.now();const f=u.touches[0].clientX,h=u.touches[0].clientY;r=[],r.push({x:f,y:h}),s={x:f,y:h},console.log("ontouchstart",f,h,s),a=Dn({x:f,y:h},this.clientWidth,this.clientHeight),l=[]},e.ontouchmove=u=>{if(u.preventDefault(),!s)return;const f=Number(u.touches[0].clientX),h=Number(u.touches[0].clientY);if(Math.abs(f-s.x)<5&&Math.abs(h-s.y)<5||(r.push({x:f,y:h}),l.push(Dn({x:f,y:h},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:p,end:A}=Ln(r);!p||!A||(d(s,p,A),s=A)},e.ontouchend=e.ontouchcancel=u=>{if(u.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const f=Date.now()-c,h={move:Object.assign({},a),line:[...l],uuid:this.uuid,color:this.color,duration:f<1280?f:f<2e3?1280:0};this.data[this.uuid].push(h),Sn(()=>{this.emitStateChange({type:it.Drawline,color:this.color,ready:this.ready,state:h,uuid:this.uuid})})}}emitStateChange(e,n=!0){if(e.type!==it.Drawline){this.emit("stateChange",e,n);return}const o=Date.now(),s=e.state;if(!s||!s.line)return;const r=Math.ceil(s.line.length/100);for(let a=0;a<r;a++){const l={uuid:this.uuid,color:this.color,ready:this.ready,type:e.type,state:{uuid:this.uuid,move:s.move,duration:s.duration,color:this.color,line:s.line.slice(a*100,(a+1)*100)},timestamp:o,end:a===r-1};Ml(a,20,()=>{this.emit("stateChange",l,n)})}}action(e){const{ready:n,type:o,uuid:s}=e;if(!n&&this.ready){this.closeBrush();return}if(n&&!this.ready){this.openBrush();return}if(!!this.ready)switch(o){case it.Drawline:const{state:r,timestamp:a,end:l}=e;if(!a||!r)return;this.tempLine[a]=[].concat(this.tempLine[a]||[],r.line),l&&(Object.assign(r,{line:this.tempLine[a]}),this.handleDrawLine(s,r,{},()=>delete this.tempLine[a]));break;case it.Undo:this.handleUndo(s);break}}handleDrawLine(e,n,{withUndo:o=!1},s=zo){!n||Object.prototype.toString.call(n)!="[object Object]"||Object.keys(n).length===0||(console.log("handleDrawLine",n,n.line),Sl(()=>new Promise(r=>{if(o||(this.canvas[e]||(this.canvas[e]=this.initCanvas("_paintBrush-canvas--sync")),this.data[e]||(this.data[e]=[]),this.data[e].push(n)),!this.canvas[e])return;const a=this.canvas[e].getContext("2d");if(!a)return;const{line:l=[],color:c="black",duration:d=0,uuid:u}=n,f=Ei(n.move||{},this.clientWidth,this.clientHeight);let h=[f];if(a.strokeStyle=c,a.beginPath(),a.moveTo(f.x,f.y),d&&!o){let p=[];const A=this;A.tween=Bl({step:0},{step:l.length-1},d).onUpdate(({step:g})=>{var w;if(A.tweening=!0,!A.ready)return a.clearRect(0,0,A.canvas[u].width,A.canvas[u].height),(w=A.tween)==null?void 0:w.stop();const v=Math.floor(g);if(!p.find(y=>y===v)){if(p.push(v),console.log("__debug__",l,l[v],v),h.push(Ei(l[v],A.clientWidth,A.clientHeight)),h.length<3)return;const{control:y,end:C}=Ln(h);if(!y||!C)return;a.quadraticCurveTo(y.x,y.y,C.x,C.y),a.stroke()}}).onComplete(g=>{A.tween=void 0,A.tweening=!1,p=[],h=[],s&&s(),r()})}else{for(let p=0;p<l.length;p++){if(h.push(Ei(l[p],this.clientWidth,this.clientHeight)),h.length<3)continue;const{control:A,end:g}=Ln(h);!A||!g||a.quadraticCurveTo(A.x,A.y,g.x,g.y)}a.stroke(),h=[],s&&s(),r()}})))}handleUndo(e){if(console.log("handleUndo",e,this.canvas[e]),!this.canvas[e]||!this.data[e]||this.data[e].length===0)return;this.data[e].pop();const n=()=>{var s;const o=(s=this.canvas[e])==null?void 0:s.getContext("2d");o&&o.clearRect(0,0,this.canvas[e].width,this.canvas[e].height),this.data[e].forEach(r=>this.handleDrawLine(e,r,{withUndo:!0}))};if(this.tween&&this.tweening){this.tween.stop(),Sn(n,60);return}n()}destroyBrush(){this.closeBrush(),this.ready=!1,this.emit("readyChange",!0)}}class Ol{constructor(t={}){m(this,"controller");const e=Object.assign({currentColor:"#f44336",onUndoText:"\u56DE\u9000",onExitText:"\u5173\u95ED"},t);this.controller=new Ql(e)}on(t,e){this.controller.on(t,e)}off(t,e){this.controller.off(t,e)}once(t,e){this.controller.once(t,e)}show(){this.controller.openBrush()}action(t){this.controller.action(t)}get state(){return this.controller.state}get configs(){return this.controller.configs}dispose(){return this.controller.destroyBrush()}setCurrentColor(t){this.controller.updateCurrentColor(t)}}const Rl=(i,t)=>{var Y,V;let e=(V=(Y=t==null?void 0:t.initialState)==null?void 0:Y.enabled)!=null?V:!0,n=!1,o=!0,s=null;const a=H(H({},{lookAtCurrentCamera:!1,lockedPanoIndex:null,lockedLatitude:null,lockedLongitude:null}),t==null?void 0:t.config),l=new k.Scene,c=new ue.Camera(60);let d=new k.Object3D,u,f;{const I=new k.DirectionalLight(16777215,.5);I.position.copy(new k.Vector3(1,1,1)),l.add(I)}{const I=new k.DirectionalLight(16777215,.3);l.add(I)}{const I=new k.AmbientLight(16777215,.3);l.add(I)}l.add(d);const h=()=>{if(n)return;u=E(i.model,c.fov,c.aspect),f=i.model.bounding.getCenter(new k.Vector3),l.remove(d),d=O(i.model),l.add(d),n=!0,L();function I(F){const N=F.clone();return N.uniforms.modelAlpha.value=1,N.uniforms.map.value&&(N.uniforms.map.value.needsUpdate=!0),N}function O(F){if(F instanceof k.Mesh){const N=F.geometry,Z=Array.isArray(F.material)?F.material.map(I):I(F.material);return new k.Mesh(N,Z)}else if(F instanceof k.Group){const N=new k.Group;return F.children.forEach(Z=>N.add(O(Z))),N}else{const N=new k.Object3D;return F.children.forEach(Z=>N.add(O(Z))),N}}},p=()=>{if(!!i.renderer)return s||(s=new k.WebGLRenderer({antialias:!1,alpha:!0}),s.setPixelRatio(i.renderer.getPixelRatio()),s.outputEncoding=k.sRGBEncoding,s.setClearColor(1579548,0),s.autoClear=!0),s},A=()=>{d.traverse(I=>{I instanceof k.Mesh&&[].concat(I.material).forEach(F=>F.dispose())}),l.remove(d),d=new k.Object3D,l.add(d),n=!1,L()},g=()=>{!e||n||h()},v=()=>{e||(e=!0,l.add(d),!n&&i.model.loaded&&h(),L())},w=()=>{!e||(l.remove(d),o=!0,D(),e=!1)},y=(I,O={})=>{const F=p();if(!F)return;I.appendChild(F.domElement),C(O);const N=window.getComputedStyle(I).position;N!=="relative"&&N!=="absolute"&&N!=="fixed"&&N!=="sticky"&&(I.style.position="relative")},C=(I={})=>{if(!s)return;const F=s.domElement.parentNode;if(F!=null&&F.nodeName){const{width:N=F.offsetWidth,height:Z=F.offsetHeight}=I;s.setSize(N,Z),c.aspect=N/Z,c.updateProjectionMatrix()}L()};function E(I,O,F){const N=I.bounding,Z=Math.pow(Math.pow(N.max.x-N.min.x+1,2)+Math.pow(N.max.y-N.min.y+1,2)+Math.pow(N.max.z-N.min.z+1,2),1/2);let _=Z/2/Math.tan(Math.PI*O/360);return F<1&&(_=_/F),isNaN(_)?Z:_}function P(I){return i.work.observers[I].standingPosition.clone()}const L=()=>{if(!e||!u||!f)return;const I=i.getPose();I.fov=c.fov,I.offset=f,I.distance=u,typeof a.lockedLatitude=="number"&&(I.latitude=a.lockedLatitude),typeof a.lockedLongitude=="number"&&(I.longitude=a.lockedLongitude),typeof a.lockedPanoIndex=="number"&&(I.offset=P(a.lockedPanoIndex)),a.lookAtCurrentCamera&&(I.offset=i.camera.position.clone().setY(i.camera.position.y+1)),c.setFromPose(I),o=!0},D=()=>{!e||o!==!0||!s||!s.domElement.parentNode||s.domElement.parentNode.offsetWidth===0||(s.render(l,c),o=!1)},T=()=>{s&&s.dispose(),s=null},W=I=>{Object.assign(a,I),L()},G=()=>({enabled:e});return Object.assign(window,{camera:c}),i.on("modelLoaded",g),i.on("modelWillLoad",A),i.on("cameraDirectionUpdate",L),i.on("dispose",T),i.on("renderFrame",D),i.on("cameraPositionUpdate",L),{appendTo:y,refresh:C,changeConfigs:W,enable:v,disable:w,getCurrentState:G}};function At(...i){const t=[];return i.forEach(e=>{e.isCSS3DObjectPlus?t.push(e):t.push(...At(...e.children))}),t}function zn(i,t){const e=Math.round(i);return e%2===0?e:e+Number(t!=null&&t.floor?-1:1)}function Fl(i,t,e=!0){if(!i)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const n=()=>{const s=zn(i.clientWidth,{floor:!0}),r=zn(i.clientHeight,{floor:!0});t(s,r)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>n(),unobserve:()=>{}};const o=new ResizeObserver(n);return e&&n(),{observe:()=>o.observe(i),unobserve:()=>o.unobserve(i)}}class Vo extends Mt.CSS3DRenderer{constructor(){super();m(this,"wrapper");m(this,"requestAnimationFrameId");m(this,"resizeDisoper");this.domElement.style.position="absolute",this.domElement.style.top="0",this.domElement.style.left="0",this.domElement.style.userSelect="none",this.domElement.style.pointerEvents="none"}setWrapper(e){if(!e)throw new Error("CSS3DRenderer: wrapper is required");if(e.contains(this.domElement))return;const n=this.wrapper;return n&&n.contains(this.domElement)&&this.domElement.remove(),this.appendToElement(e),this.wrapper=e,this}appendToElement(e){e.appendChild(this.domElement);const n=(r,a)=>this.setSize(r,a),{observe:o,unobserve:s}=Fl(e,n,!0);o(),this.resizeDisoper=s,this.wrapper=e}renderEveryFrame(e,n){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return console.warn("CSS3DRenderer: render is running");const o=()=>{this.requestAnimationFrameId=requestAnimationFrame(o),!!e.visible&&At(e).length!==0&&this.render(e,n)};o()}stopRender(){this.requestAnimationFrameId&&cancelAnimationFrame(this.requestAnimationFrameId)}dispose(){var e;this.stopRender(),(e=this.resizeDisoper)==null||e.call(this),this.domElement.remove()}}function Gl(i){return typeof Symbol=="undefined"?`$Symbol<${i}>$`:Symbol(i)}const fn=Gl("$$EVENT$$");function Bn(i){return i[fn]||(i[fn]={}),i[fn]}function Hl(i){i[fn]||delete i[fn]}class Xt{hasListener(t){const e=Bn(this);return Boolean((e==null?void 0:e[t])&&e[t].length>0)}on(t,e,n){const o=Bn(this);return o[t]||(o[t]=[]),o[t].push([e,n||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){Hl(this);return}const n=Bn(this);if(n[t]||(n[t]=[]),e===void 0){n[t].length=0;return}let o=0;for(;o<n[t].length&&n[t][o][0]!==e;o++);o<n[t].length&&n[t].splice(o,1)}emit(t,...e){let n=!1;const s=Bn(this)[t]||[];for(let r of s.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(n=!0)}return n}}function ki(...i){const t=new R.Vector3;return i.forEach(e=>{t.add(e)}),t.divideScalar(i.length),t}const Wl=({x:i,y:t,z:e})=>new R.Vector3(i,t,e),ot=i=>new R.Vector3().fromArray(i),hn=i=>i instanceof R.Vector3?i:Array.isArray(i)?ot(i):Wl(i);class Nl extends k.Mesh{constructor(e,n){const o=new k.MeshBasicMaterial({opacity:0,color:0,transparent:!1,side:k.DoubleSide}),s=new k.PlaneGeometry(e,n);super(s,o);m(this,"name","opacity-mesh")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}const Qo=1,_l=`CSS3DObjectPlus@${Qo}`,Xl=.00216,Yl=.003;class Ul extends Mt.CSS3DObject{constructor(e){var E,P,L;const n=e.container,o=e.cornerPoints,s=(E=e.ratio)!=null?E:Yl,r=(P=e.dpr)!=null?P:1,a=(L=e.pointerEvents)!=null?L:"auto",l=Math.max(Xl,s),c=o[0].distanceTo(o[1]),d=o[1].distanceTo(o[2]),u=zn(c/s*r),f=zn(d/s*r),h=ki(...o);let p;if(l===s)n.style.width=`${u}px`,n.style.height=`${f}px`,p=n;else{const D=document.createElement("div");D.style.width=`${u}px`,D.style.height=`${f}px`,D.style.pointerEvents="none";const T=s/l;n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.width=`${T*u}px`,n.style.height=`${T*f}px`,D.appendChild(n),p=D}super(p);m(this,"version",Qo);m(this,"isCSS3DObjectPlus",!0);m(this,"container");m(this,"width");m(this,"height");m(this,"domWidthPx");m(this,"domHeightPx");m(this,"cornerPoints");m(this,"centerPosition");m(this,"ratio");m(this,"mode","front");m(this,"hooks",new Xt);m(this,"opacityMesh");m(this,"selfVisible",!0);m(this,"parentVisibleListenerDisposer");m(this,"createOpacityMesh",e=>{const{domWidthPx:n,domHeightPx:o}=e,s=new Nl(n,o);return s.position.copy(e.position),s.rotation.copy(e.rotation),s.scale.copy(e.scale),s});m(this,"addParentVisibleListener",()=>{var e;if((e=this.parent)!=null&&e.isCSS3DGroup){const n=this.parent,o=s=>{this.setVisible(s&&this.selfVisible,{setSelfVisible:!1})};n.hooks.on("visibleChange",o),this.parentVisibleListenerDisposer=()=>n.hooks.off("visibleChange",o)}});m(this,"removeParentVisibleListener",()=>{var e;(e=this.parentVisibleListenerDisposer)==null||e.call(this)});if(n.style.pointerEvents=a,this.scale.set(l,l,l),this.cornerPoints=o,this.ratio=s,this.container=n,e.mode&&(this.mode=e.mode),l===s)this.width=c,this.height=d,this.domWidthPx=u,this.domHeightPx=f,this.centerPosition=h;else{const D=s/l;this.width=D*c,this.height=D*d,this.domWidthPx=D*u,this.domHeightPx=D*f,this.centerPosition=new R.Vector3().subVectors(h,o[0]).multiplyScalar(D).add(o[0])}n.classList.add(`${_l}__container`);const A=new R.Vector3().subVectors(o[1],o[0]),g=new R.Vector3().subVectors(o[3],o[0]),v=new R.Vector3().crossVectors(A,g).normalize();this.lookAt(v);const w=this.up.clone().applyQuaternion(this.quaternion),y=g.clone(),C=new R.Vector3().crossVectors(w,y).normalize();this.rotateOnWorldAxis(C,w.angleTo(y)),this.position.copy(h),this.addEventListener("added",()=>{var D;this.mode==="front"&&((D=this.opacityMesh)==null||D.removeFromParent()),this.addParentVisibleListener()}),this.addEventListener("removed",()=>{var D;(D=this.opacityMesh)==null||D.removeFromParent(),this.removeParentVisibleListener()})}setVisible(e,n={setSelfVisible:!0}){n.setSelfVisible&&(this.selfVisible=e),this.visible=e,this.opacityMesh&&(this.opacityMesh.visible=e)}removeFromParent(){var n;const e=this.parent;return e!==null&&e.remove(this),(n=this.opacityMesh)==null||n.removeFromParent(),this}removeOpacityMesh(){var e;return(e=this.opacityMesh)==null||e.removeFromParent(),this.opacityMesh=void 0,this}dispose(){var e;this.container.remove(),this.removeFromParent(),(e=this.opacityMesh)==null||e.removeFromParent()}getOpacityMesh(){if(this.opacityMesh)return this.opacityMesh;{const e=this.createOpacityMesh(this);return this.opacityMesh=e,e}}applyMatrix4(e){var n;super.applyMatrix4(e),(n=this.opacityMesh)==null||n.applyMatrix4(e)}applyQuaternion(e){var n;return super.applyQuaternion(e),(n=this.opacityMesh)==null||n.applyQuaternion(e),this}applyScaleMatrix4(e){var n;this.scale.applyMatrix4(e),(n=this.opacityMesh)==null||n.scale.applyMatrix4(e)}}class Jl extends k.Scene{constructor(){super()}add(...t){return super.add(...t),At(...t).forEach(e=>{e.mode="front"}),this}}class Zl extends k.Scene{constructor(e){super();m(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return super.add(...e),At(...e).forEach(n=>{n.mode="behind",this.scene.add(n.getOpacityMesh())}),this}remove(...e){return At(...e).forEach(n=>{var o;(o=n.opacityMesh)==null||o.removeFromParent()}),super.remove(...e),this}}class Oo extends k.Group{constructor(e){super();m(this,"isCSS3DGroup",!0);m(this,"mode");m(this,"CSS3DObjectLength",0);m(this,"hooks",new Xt);this.mode=e}add(...e){return At(...e).forEach(n=>{n.mode=this.mode}),super.add(...e),this.updateLength(),this}setVisible(e){this.visible=e,this.hooks.emit("visibleChange",e)}remove(...e){return super.remove(...e),this.updateLength(),this}updateLength(){this.CSS3DObjectLength=At(this).length}}class ql extends Oo{constructor(){super("front")}}class Kl extends Oo{constructor(e){super("behind");m(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return At(...e).forEach(n=>{this.scene.add(n.getOpacityMesh())}),super.add(...e),this}}const $l=3,xi="CSS3DRenderer",mn=`${xi}@${$l}`,Yt=()=>{console.error(`${mn} is disposed`)},De={css3DObjects:[],frontModeStore:{css3DRenderer:new Vo},behindModeStore:{css3DRenderer:new Vo}};function Ro(i){return De.css3DObjects.find(t=>t.id===i)}function ec(i){De.frontModeStore.css3DRenderer.setWrapper(i)}function tc(i){De.behindModeStore.css3DRenderer.setWrapper(i)}class Ut{constructor(t){m(this,"hooks",new Xt);m(this,"state",{enabled:!0,visible:!0,disposed:!1});m(this,"_scene");m(this,"store",{frontModeGroup:new ql});m(this,"create3DElement",(t,e,n)=>{if(this.state.disposed)return Yt();const o=(()=>{const y={ratio:.00216,devicePixelRatio:1,mode:"front",autoRender:!0,container:document.createElement("div"),pointerEvents:"none"};return Object.assign(y,n)})(),s=e.map(hn);if((s==null?void 0:s.length)<4)return console.error(`${mn}: requires 4 point but params may have fewer`);const{ratio:r,devicePixelRatio:a,mode:l,autoRender:c,container:d,pointerEvents:u}=o,f=this.createObject(s,{ratio:r,dpr:a,container:d,mode:l,pointerEvents:u});De.css3DObjects.push(f),o.scene&&this.setScene(o.scene);const h=()=>{const y=f.mode==="front"?this.getFrontCSS3DObjectGroup():this.getBehindCSS3DObjectGroup();!y||y.add(f)},p=()=>{h(),this.render(t)},A=y=>this.setVisibleById(f.id,y),g=y=>this.setEnabledById(f.id,y),v=()=>(f.removeFromParent(),!0),w=l==="front"?De.frontModeStore.css3DRenderer:De.behindModeStore.css3DRenderer;return c&&p(),{id:f.uuid,container:d,css3DObject:f,render:c?void 0:p,show:()=>A(!0),hide:()=>A(!1),setVisible:A,enable:()=>g(!0),disable:()=>g(!1),setEnabled:g,dispose:v,appendToElement:y=>w.setWrapper(y)}});m(this,"setVisibleById",(t,e)=>{var n;(n=Ro(t))==null||n.setVisible(e)});m(this,"setEnabledById",(t,e)=>{const n=Ro(t);if(!n)return;const o=n.mode==="front"?this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}):this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1});!o||(e?o.add(n):o.remove(n))});m(this,"createObject",(t,e)=>{const n=new Ul(H({cornerPoints:t},e));return n.element.classList.add(`${xi}__container`),n.element.id=`${xi}__container--${n.uuid}`,n});t&&this.setScene(t)}get scene(){return this._scene||console.error("scene doesn't exist!, please call setScene(scene) first"),this._scene}static get frontModeCSS3DRenderer(){return De.frontModeStore.css3DRenderer}static get behindModeCSS3DRenderer(){return De.behindModeStore.css3DRenderer}get frontModeCSS3DRenderer(){return De.frontModeStore.css3DRenderer}get behindModeCSS3DRenderer(){return De.behindModeStore.css3DRenderer}setScene(t){this._scene=t}getCurrentState(){return this.state}setState(t,e={userAction:!0}){if(this.state.disposed)return Yt();const n=H({},this.state);this.state=Object.assign(this.state,t),n.visible!==this.state.visible&&(t.visible?this.handleShow():this.handleHide()),n.enabled!==this.state.enabled&&(t.enabled?this.handleEnable():this.handleDisable()),n.disposed!==this.state.disposed&&this.handleDispose(),this.hooks.emit("stateChange",{state:this.state,prevState:n,userAction:e.userAction})}dispose(){this.setState({disposed:!0}),this.hooks.emit("dispose")}show(){return X(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Yt();this.setState({visible:!0},{userAction:t}),this.hooks.emit("show",{userAction:t})})}hide(){return X(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Yt();this.setState({visible:!1},{userAction:t}),this.hooks.emit("hide",{userAction:t})})}enable({userAction:t}={userAction:!0}){if(this.state.disposed)return Yt();this.setState({enabled:!0},{userAction:t}),this.hooks.emit("enable",{userAction:t})}disable({userAction:t}={userAction:!0}){if(this.state.disposed)return Yt();this.setState({enabled:!1},{userAction:t}),this.hooks.emit("disable",{userAction:t})}getFrontCSS3DScene({createSceneIfNotExists:t=!1}={}){var n;const e=(n=De.frontModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const o=new Jl;De.frontModeStore.css3DScene=o}return De.frontModeStore.css3DScene}getBehindCSS3DScene({createSceneIfNotExists:t=!1}={}){var n,o;const e=(n=De.behindModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const s=(o=De.behindModeStore.scene)!=null?o:this.scene;if(!s){console.error(`${mn}: scene is required when mode is behind`);return}const r=new Zl(s);De.behindModeStore.css3DScene=r,De.behindModeStore.scene=s}return De.behindModeStore.css3DScene}getFrontCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){const e=this.getFrontCSS3DScene({createSceneIfNotExists:t});return t&&e&&(e.getObjectById(this.store.frontModeGroup.id)||e.add(this.store.frontModeGroup)),this.store.frontModeGroup}getBehindCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){var n;const e=this.getBehindCSS3DScene({createSceneIfNotExists:t});if(t&&e&&this.scene){const o=(n=this.store.behindModeGroup)!=null?n:new Kl(this.scene);this.store.behindModeGroup=o,e.getObjectById(o.id)||e.add(o)}return this.store.behindModeGroup}render(t){var e,n;if(this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}).CSS3DObjectLength>0){const o=this.getFrontCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${mn}: css3DScene is required when mode is front`);De.frontModeStore.css3DRenderer.renderEveryFrame(o,t)}if(((n=(e=this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1}))==null?void 0:e.CSS3DObjectLength)!=null?n:0)>0){const o=this.getBehindCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${mn}: css3DScene is required when mode is behind`);De.behindModeStore.css3DRenderer.renderEveryFrame(o,t)}}handleShow(){return X(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!0),(t=this.store.behindModeGroup)==null||t.setVisible(!0)})}handleHide(){return X(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!1),(t=this.store.behindModeGroup)==null||t.setVisible(!1)})}handleEnable(){var t,e;(t=this.getFrontCSS3DScene())==null||t.add(this.store.frontModeGroup),this.store.behindModeGroup&&((e=this.getBehindCSS3DScene())==null||e.add(this.store.behindModeGroup))}handleDisable(){var t,e,n;this.store.frontModeGroup.children.forEach(o=>{o instanceof Mt.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.remove()}),(t=this.store.behindModeGroup)==null||t.children.forEach(o=>{o instanceof Mt.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.remove()}),(e=this.getFrontCSS3DScene())==null||e.remove(this.store.frontModeGroup),this.store.behindModeGroup&&((n=this.getBehindCSS3DScene())==null||n.remove(this.store.behindModeGroup))}handleDispose(){this.handleDisable()}}m(Ut,"setFrontModeContainer",ec),m(Ut,"setBehindModeContainer",tc);function Fo(i){return X(this,null,function*(){return new Promise(t=>{var e;if((e=i.model)!=null&&e.loaded){t();return}else i.once("modelLoaded",()=>t())})})}const st=document.createElement("div");st.classList.add("behindFiveElement"),st.style.position="absolute",st.style.top="0",st.style.left="0",st.style.width="100%",st.style.height="100%",st.style.pointerEvents="none";function Go(i){var e,n,o,s,r;const t=(r=(n=Di(i.getElement()))!=null?n:Di((e=i.getElement())==null?void 0:e.parentElement))!=null?r:Di((s=(o=i.getElement())==null?void 0:o.parentElement)==null?void 0:s.parentElement);if(t!=null&&t.parentElement)return t.parentElement.insertBefore(st,t),st;console.error("Can not find a valid element to insert behindFiveElement. How to fix it: https://github.com/realsee-developer/dnalogel/tree/main/plugins/src/CSS3DRenderPlugin/README.md")}function Di(i){var a;if(!i)return;const t=(a=i.style.position)!=null?a:getComputedStyle(i).position;if(t!=="fixed"&&t!=="absolute"&&t!=="relative")return;const e=getComputedStyle(i),n=e.backgroundColor,o=e.backgroundImage;if(!(n!=="transparent"&&n!=="rgba(0, 0, 0, 0)"&&n!==""||o!=="none"&&o!==""))return i}const Li="CSS3DRenderPlugin@v2.0.1";class nc extends Ut{constructor(e){super();m(this,"five");m(this,"behindFiveContainer");m(this,"staticPrefix","//vrlab-static.ljcdn.com");m(this,"create3DDomContainer",(e,n)=>{if(this.state.disposed)return;const o=(()=>{var u;(n==null?void 0:n.dpr)!==void 0&&console.warn(`${Li}: please use "config.devicePixelRatio" replace "config.dpr"`);const d={ratio:.00216,devicePixelRatio:(u=n==null?void 0:n.dpr)!=null?u:1,mode:"front",autoRender:!0};return Object.assign(d,n,(n==null?void 0:n.mode)==="behind"?{scene:this.five.scene}:void 0)})(),s=this.five.getElement();if(!s){console.error(`${Li}: five.getElement() is ${s}`);return}const{autoRender:r}=o;o.mode==="behind"&&o.behindFiveContainer&&(this.behindFiveContainer=o.behindFiveContainer);const a=this.create3DElement(this.five.camera,e,pe(H({},o),{autoRender:!1}));if(!a)return;const l=()=>{const d=a.css3DObject.mode==="front"?s.parentElement:this.getBehindFiveElement();if(!d)return console.error(`${Li}: wrapper is ${d}`);a.appendToElement(d),a.render()},c=()=>{a.css3DObject.mode==="front"&&l(),a.css3DObject.mode==="behind"&&Fo(this.five).then(()=>{l()})};return r&&c(),pe(H({},a),{render:r?void 0:c})});this.five=e}disposeAll(){return this.dispose()}setState(...e){const n=super.setState(...e);return this.five.needsRender=!0,n}getBehindFiveElement(){return this.behindFiveContainer?this.behindFiveContainer:(this.behindFiveContainer=Go(this.five),this.behindFiveContainer)}}const Jt=i=>new nc(i);function Si(i,t,e=new R.Vector3(1,1,1),n=!1){const o=new En.Line(i,t);return o.setMaterial({dashed:n,color:e,linewidth:1}),o.remove(o.points),o}const ic=i=>{const t={intersection:null,disposers:[]},e=d=>{t.intersection=d},n=()=>{t.intersection=null};i.on("modelLoaded",()=>{i.on("intersectionOnModelUpdate",e),i.on("intersectionHidden",n)}),i.on("dispose",()=>{i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)});const o=(d,u=2,f=.1)=>{const h=u/2,A=c(d,f),g=new R.Group;g.add(Si(new R.Vector3(A.x+h,A.y,A.z),new R.Vector3(A.x-h,A.y,A.z),new R.Vector3(1,0,0)),Si(new R.Vector3(A.x,A.y+h,A.z),new R.Vector3(A.x,A.y-h,A.z),new R.Vector3(0,1,0)),Si(new R.Vector3(A.x,A.y,A.z+h),new R.Vector3(A.x,A.y,A.z-h),new R.Vector3(0,0,1))),i.scene.add(g),i.needsRender=!0;const v=()=>{i.scene.remove(g)};return t.disposers.push(v),{clear:v,pointAxesHelperMesh:g}},s=(d,u=0)=>{var v,w;const f=(v=i==null?void 0:i.camera)==null?void 0:v.position;if(!f)return!1;const h=d.distanceTo(f),p=d.sub(f).normalize(),A=new R.Raycaster(f,p),g=(w=i.model.intersectRaycaster(A))==null?void 0:w[0];return!(g&&g.distance+u<h)},r=()=>t.intersection,a=()=>{var d,u;(u=(d=t.disposers)==null?void 0:d.forEach)==null||u.call(d,f=>f==null?void 0:f()),i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)},l=a,c=(d,u)=>{const f=d.clone();return i.camera.position.clone().sub(f).setLength(u).add(f)};return{intersection:r,pointAxesHelper:o,movePointTowardsCamera:c,destroy:a,dispose:l,canSeePoint:s}};function J(){}const vt=i=>i;function Ce(i,t){for(const e in t)i[e]=t[e];return i}function oc(i){return i&&typeof i=="object"&&typeof i.then=="function"}function Ho(i){return i()}function Wo(){return Object.create(null)}function Bt(i){i.forEach(Ho)}function Tn(i){return typeof i=="function"}function ie(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let jn;function Ne(i,t){return jn||(jn=document.createElement("a")),jn.href=t,i===jn.href}function sc(i){return Object.keys(i).length===0}function rt(i,t,e,n){if(i){const o=No(i,t,e,n);return i[0](o)}}function No(i,t,e,n){return i[1]&&n?Ce(e.ctx.slice(),i[1](n(t))):e.ctx}function at(i,t,e,n){if(i[2]&&n){const o=i[2](n(e));if(t.dirty===void 0)return o;if(typeof o=="object"){const s=[],r=Math.max(t.dirty.length,o.length);for(let a=0;a<r;a+=1)s[a]=t.dirty[a]|o[a];return s}return t.dirty|o}return t.dirty}function lt(i,t,e,n,o,s){if(o){const r=No(t,e,n,s);i.p(r,o)}}function ct(i){if(i.ctx.length>32){const t=[],e=i.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function _o(i){const t={};for(const e in i)e[0]!=="$"&&(t[e]=i[e]);return t}function Vn(i,t){const e={};t=new Set(t);for(const n in i)!t.has(n)&&n[0]!=="$"&&(e[n]=i[n]);return e}function Oe(i){return i==null?"":i}const Xo=typeof window!="undefined";let Yo=Xo?()=>window.performance.now():()=>Date.now(),Mi=Xo?i=>requestAnimationFrame(i):J;const Zt=new Set;function Uo(i){Zt.forEach(t=>{t.c(i)||(Zt.delete(t),t.f())}),Zt.size!==0&&Mi(Uo)}function Jo(i){let t;return Zt.size===0&&Mi(Uo),{promise:new Promise(e=>{Zt.add(t={c:i,f:e})}),abort(){Zt.delete(t)}}}function Q(i,t){i.appendChild(t)}function le(i,t,e){const n=zi(i);if(!n.getElementById(t)){const o=j("style");o.id=t,o.textContent=e,Zo(n,o)}}function zi(i){if(!i)return document;const t=i.getRootNode?i.getRootNode():i.ownerDocument;return t&&t.host?t:i.ownerDocument}function rc(i){const t=j("style");return Zo(zi(i),t),t.sheet}function Zo(i,t){return Q(i.head||i,t),t.sheet}function B(i,t,e){i.insertBefore(t,e||null)}function z(i){i.parentNode&&i.parentNode.removeChild(i)}function dt(i,t){for(let e=0;e<i.length;e+=1)i[e]&&i[e].d(t)}function j(i){return document.createElement(i)}function ve(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Ie(i){return document.createTextNode(i)}function te(){return Ie(" ")}function me(){return Ie("")}function Me(i,t,e,n){return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}function qo(i){return function(t){return t.stopPropagation(),i.call(this,t)}}function b(i,t,e){e==null?i.removeAttribute(t):i.getAttribute(t)!==e&&i.setAttribute(t,e)}function Qn(i,t){const e=Object.getOwnPropertyDescriptors(i.__proto__);for(const n in t)t[n]==null?i.removeAttribute(n):n==="style"?i.style.cssText=t[n]:n==="__value"?i.value=i[n]=t[n]:e[n]&&e[n].set?i[n]=t[n]:b(i,n,t[n])}function ac(i){return Array.from(i.childNodes)}function Le(i,t){t=""+t,i.wholeText!==t&&(i.data=t)}function M(i,t,e,n){e===null?i.style.removeProperty(t):i.style.setProperty(t,e,n?"important":"")}let On;function lc(){if(On===void 0){On=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(i){On=!0}}return On}function bt(i,t){getComputedStyle(i).position==="static"&&(i.style.position="relative");const n=j("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const o=lc();let s;return o?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=Me(window,"message",r=>{r.source===n.contentWindow&&t()})):(n.src="about:blank",n.onload=()=>{s=Me(n.contentWindow,"resize",t)}),Q(i,n),()=>{(o||s&&n.contentWindow)&&s(),z(n)}}function ne(i,t,e){i.classList[e?"add":"remove"](t)}function Ko(i,t,{bubbles:e=!1,cancelable:n=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(i,e,n,t),o}class Rn{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.is_svg?this.e=ve(e.nodeName):this.e=j(e.nodeName),this.t=e,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)B(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(z)}}const Fn=new Map;let Gn=0;function cc(i){let t=5381,e=i.length;for(;e--;)t=(t<<5)-t^i.charCodeAt(e);return t>>>0}function dc(i,t){const e={stylesheet:rc(t),rules:{}};return Fn.set(i,e),e}function $o(i,t,e,n,o,s,r,a=0){const l=16.666/n;let c=`{
101
+ `;class Ql extends jl{constructor(e){super();m(this,"configs");m(this,"clientWidth");m(this,"clientHeight");m(this,"ready",!1);m(this,"uuid",He());m(this,"tween");m(this,"tweening",!1);m(this,"container");m(this,"canvas");m(this,"data",{});m(this,"tempLine",{});this.configs=e,this.clientWidth=document.body.clientWidth,this.clientHeight=document.body.clientHeight,this.container=this.ifInsertToDOM(),this.canvas={},this.initCtrl()}get color(){return this.configs.currentColor}get state(){return this.data}get dpr(){return this.configs.DPR||1}ifInsertToDOM(){if(this.container)return this.container;if(this.configs.container)this.configs.container.id="_gl_paintBrush",this.container=this.configs.container;else if(document.getElementById("_gl_paintBrush"))this.container=document.getElementById("_gl_paintBrush");else{const e=document.createElement("div");e.id="_gl_paintBrush",document.body.appendChild(e),this.container=e}return this.container.innerHTML=Vl,this.container}initCanvas(e){const n=document.createElement("canvas");n.className=e,n.width=this.clientWidth,n.height=this.clientHeight;const o=n.getContext("2d");if(!!o)return o.lineWidth=5*this.dpr,o.lineCap="round",o.lineJoin="round",this.container.appendChild(n),n}initCtrl(){const e=document.createElement("div");e.className="_paintBrush-ctrl";const n=document.createElement("div");n.className="_paintBrush-ctrlinner";const o=document.createElement("a");o.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--undo",o.addEventListener("click",a=>{var f;if(a.stopPropagation(),this.configs.onClickUndo&&this.configs.onClickUndo(),!this.canvas[this.uuid]||!this.data[this.uuid]||this.data[this.uuid].length===0)return;const l=this.data[this.uuid].pop();l&&this.emitStateChange({type:it.Undo,color:this.color,ready:this.ready,state:l,uuid:this.uuid});const c=(f=this.canvas[this.uuid])==null?void 0:f.getContext("2d");if(!this.canvas[this.uuid])return;const{width:d,height:u}=this.canvas[this.uuid];c&&c.clearRect(0,0,d,u),this.data[this.uuid].forEach(h=>this.handleDrawLine(this.uuid,h,{withUndo:!0}))});const s=document.createElement("a");return s.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--close",s.addEventListener("click",a=>{a.stopPropagation(),this.closeBrush(),this.configs.onClickClose&&this.configs.onClickClose()}),[o,s].forEach(a=>{const l=document.createElement("i");l.className="brush-icon";const c=document.createElement("span");c.className="brush-txt",c.innerText=a.className.endsWith("undo")?this.configs.onUndoText:this.configs.onExitText,a.appendChild(l),a.appendChild(c)}),n.appendChild(o),n.appendChild(s),e.appendChild(n),this.container.appendChild(e),e}openBrush(){if(this.ready)return;this.canvas[this.uuid]||(this.canvas[this.uuid]=this.initCanvas("_paintBrush-canvas")),this.container.className="brushing";const e=this.canvas[this.uuid];e.getContext("2d").clearRect(0,0,e.width,e.height),this.openBrushHandle(),this.ready=!0,this.emit("readyChange",!0)}closeBrush(){!this.ready||(this.container.className="",this.data={},this.tempLine={},Object.keys(this.canvas).forEach(e=>{this.canvas[e].ontouchstart=()=>!1,this.canvas[e].ontouchmove=()=>!1,this.canvas[e].ontouchend=()=>!1,this.canvas[e].ontouchcancel=()=>!1;const n=this.canvas[e].getContext("2d");n&&n.clearRect(0,0,this.canvas[e].width,this.canvas[e].height)}),this.ready=!1,this.emit("readyChange",!1),this.emitStateChange({type:it.Exit,color:this.color,ready:!1,uuid:this.uuid}))}updateCurrentColor(e){const n=this.canvas[this.uuid];if(!n)return;const o=n.getContext("2d");!o||(this.configs.currentColor=e,o.strokeStyle=e)}openBrushHandle(){const e=this.canvas[this.uuid];if(!e)return;const n=e.getContext("2d");if(!n)return;const o=this.color||"#6D92FF";n.strokeStyle=o;let s=null,r=[],a,l=[],c=0;const d=(u,f,h)=>{const p=this.color||"#ff0000";n.strokeStyle=p,n.beginPath(),n.moveTo(u.x,u.y),n.quadraticCurveTo(f.x,f.y,h.x,h.y),n.stroke()};e.onmousedown=u=>{u.preventDefault(),c=Date.now();const f=u.clientX,h=u.clientY;r=[],r.push({x:f,y:h}),s={x:f,y:h},a=Dn({x:f,y:h},this.clientWidth,this.clientHeight),l=[]},e.onmousemove=u=>{if(u.preventDefault(),!s)return;const f=Number(u.clientX),h=Number(u.clientY);if(Math.abs(f-s.x)<5&&Math.abs(h-s.y)<5||(r.push({x:f,y:h}),l.push(Dn({x:f,y:h},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:p,end:A}=Ln(r);!p||!A||(d(s,p,A),s=A)},e.onmouseup=u=>{if(u.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const f=Date.now()-c,h={move:Object.assign({},a),uuid:this.uuid,line:[...l],color:this.color,duration:f<1280?f:f<2e3?1280:0};this.data[this.uuid].push(h),Sn(()=>{this.emitStateChange({type:it.Drawline,color:this.color,ready:this.ready,state:h,uuid:this.uuid})})},e.ontouchstart=u=>{u.preventDefault(),c=Date.now();const f=u.touches[0].clientX,h=u.touches[0].clientY;r=[],r.push({x:f,y:h}),s={x:f,y:h},console.log("ontouchstart",f,h,s),a=Dn({x:f,y:h},this.clientWidth,this.clientHeight),l=[]},e.ontouchmove=u=>{if(u.preventDefault(),!s)return;const f=Number(u.touches[0].clientX),h=Number(u.touches[0].clientY);if(Math.abs(f-s.x)<5&&Math.abs(h-s.y)<5||(r.push({x:f,y:h}),l.push(Dn({x:f,y:h},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:p,end:A}=Ln(r);!p||!A||(d(s,p,A),s=A)},e.ontouchend=e.ontouchcancel=u=>{if(u.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const f=Date.now()-c,h={move:Object.assign({},a),line:[...l],uuid:this.uuid,color:this.color,duration:f<1280?f:f<2e3?1280:0};this.data[this.uuid].push(h),Sn(()=>{this.emitStateChange({type:it.Drawline,color:this.color,ready:this.ready,state:h,uuid:this.uuid})})}}emitStateChange(e,n=!0){if(e.type!==it.Drawline){this.emit("stateChange",e,n);return}const o=Date.now(),s=e.state;if(!s||!s.line)return;const r=Math.ceil(s.line.length/100);for(let a=0;a<r;a++){const l={uuid:this.uuid,color:this.color,ready:this.ready,type:e.type,state:{uuid:this.uuid,move:s.move,duration:s.duration,color:this.color,line:s.line.slice(a*100,(a+1)*100)},timestamp:o,end:a===r-1};Ml(a,20,()=>{this.emit("stateChange",l,n)})}}action(e){const{ready:n,type:o,uuid:s}=e;if(!n&&this.ready){this.closeBrush();return}if(n&&!this.ready){this.openBrush();return}if(!!this.ready)switch(o){case it.Drawline:const{state:r,timestamp:a,end:l}=e;if(!a||!r)return;this.tempLine[a]=[].concat(this.tempLine[a]||[],r.line),l&&(Object.assign(r,{line:this.tempLine[a]}),this.handleDrawLine(s,r,{},()=>delete this.tempLine[a]));break;case it.Undo:this.handleUndo(s);break}}handleDrawLine(e,n,{withUndo:o=!1},s=zo){!n||Object.prototype.toString.call(n)!="[object Object]"||Object.keys(n).length===0||(console.log("handleDrawLine",n,n.line),Sl(()=>new Promise(r=>{if(o||(this.canvas[e]||(this.canvas[e]=this.initCanvas("_paintBrush-canvas--sync")),this.data[e]||(this.data[e]=[]),this.data[e].push(n)),!this.canvas[e])return;const a=this.canvas[e].getContext("2d");if(!a)return;const{line:l=[],color:c="black",duration:d=0,uuid:u}=n,f=Ei(n.move||{},this.clientWidth,this.clientHeight);let h=[f];if(a.strokeStyle=c,a.beginPath(),a.moveTo(f.x,f.y),d&&!o){let p=[];const A=this;A.tween=Bl({step:0},{step:l.length-1},d).onUpdate(({step:g})=>{var w;if(A.tweening=!0,!A.ready)return a.clearRect(0,0,A.canvas[u].width,A.canvas[u].height),(w=A.tween)==null?void 0:w.stop();const v=Math.floor(g);if(!p.find(y=>y===v)){if(p.push(v),console.log("__debug__",l,l[v],v),h.push(Ei(l[v],A.clientWidth,A.clientHeight)),h.length<3)return;const{control:y,end:C}=Ln(h);if(!y||!C)return;a.quadraticCurveTo(y.x,y.y,C.x,C.y),a.stroke()}}).onComplete(g=>{A.tween=void 0,A.tweening=!1,p=[],h=[],s&&s(),r()})}else{for(let p=0;p<l.length;p++){if(h.push(Ei(l[p],this.clientWidth,this.clientHeight)),h.length<3)continue;const{control:A,end:g}=Ln(h);!A||!g||a.quadraticCurveTo(A.x,A.y,g.x,g.y)}a.stroke(),h=[],s&&s(),r()}})))}handleUndo(e){if(console.log("handleUndo",e,this.canvas[e]),!this.canvas[e]||!this.data[e]||this.data[e].length===0)return;this.data[e].pop();const n=()=>{var s;const o=(s=this.canvas[e])==null?void 0:s.getContext("2d");o&&o.clearRect(0,0,this.canvas[e].width,this.canvas[e].height),this.data[e].forEach(r=>this.handleDrawLine(e,r,{withUndo:!0}))};if(this.tween&&this.tweening){this.tween.stop(),Sn(n,60);return}n()}destroyBrush(){this.closeBrush(),this.ready=!1,this.emit("readyChange",!0)}}class Ol{constructor(t={}){m(this,"controller");const e=Object.assign({currentColor:"#f44336",onUndoText:"\u56DE\u9000",onExitText:"\u5173\u95ED"},t);this.controller=new Ql(e)}on(t,e){this.controller.on(t,e)}off(t,e){this.controller.off(t,e)}once(t,e){this.controller.once(t,e)}show(){this.controller.openBrush()}action(t){this.controller.action(t)}get state(){return this.controller.state}get configs(){return this.controller.configs}dispose(){return this.controller.destroyBrush()}setCurrentColor(t){this.controller.updateCurrentColor(t)}}const Rl=(i,t)=>{var Y,V;let e=(V=(Y=t==null?void 0:t.initialState)==null?void 0:Y.enabled)!=null?V:!0,n=!1,o=!0,s=null;const a=H(H({},{lookAtCurrentCamera:!1,lockedPanoIndex:null,lockedLatitude:null,lockedLongitude:null}),t==null?void 0:t.config),l=new k.Scene,c=new ue.Camera(60);let d=new k.Object3D,u,f;{const I=new k.DirectionalLight(16777215,.5);I.position.copy(new k.Vector3(1,1,1)),l.add(I)}{const I=new k.DirectionalLight(16777215,.3);l.add(I)}{const I=new k.AmbientLight(16777215,.3);l.add(I)}l.add(d);const h=()=>{if(n)return;u=E(i.model,c.fov,c.aspect),f=i.model.bounding.getCenter(new k.Vector3),l.remove(d),d=O(i.model),l.add(d),n=!0,L();function I(F){const N=F.clone();return N.uniforms.modelAlpha.value=1,N.uniforms.map.value&&(N.uniforms.map.value.needsUpdate=!0),N}function O(F){if(F instanceof k.Mesh){const N=F.geometry,Z=Array.isArray(F.material)?F.material.map(I):I(F.material);return new k.Mesh(N,Z)}else if(F instanceof k.Group){const N=new k.Group;return F.children.forEach(Z=>N.add(O(Z))),N}else{const N=new k.Object3D;return F.children.forEach(Z=>N.add(O(Z))),N}}},p=()=>{if(!!i.renderer)return s||(s=new k.WebGLRenderer({antialias:!1,alpha:!0}),s.setPixelRatio(i.renderer.getPixelRatio()),s.outputEncoding=k.sRGBEncoding,s.setClearColor(1579548,0),s.autoClear=!0),s},A=()=>{d.traverse(I=>{I instanceof k.Mesh&&[].concat(I.material).forEach(F=>F.dispose())}),l.remove(d),d=new k.Object3D,l.add(d),n=!1,L()},g=()=>{!e||n||h()},v=()=>{e||(e=!0,l.add(d),!n&&i.model.loaded&&h(),L())},w=()=>{!e||(l.remove(d),o=!0,D(),e=!1)},y=(I,O={})=>{const F=p();if(!F)return;I.appendChild(F.domElement),C(O);const N=window.getComputedStyle(I).position;N!=="relative"&&N!=="absolute"&&N!=="fixed"&&N!=="sticky"&&(I.style.position="relative")},C=(I={})=>{if(!s)return;const F=s.domElement.parentNode;if(F!=null&&F.nodeName){const{width:N=F.offsetWidth,height:Z=F.offsetHeight}=I;s.setSize(N,Z),c.aspect=N/Z,c.updateProjectionMatrix()}L()};function E(I,O,F){const N=I.bounding,Z=Math.pow(Math.pow(N.max.x-N.min.x+1,2)+Math.pow(N.max.y-N.min.y+1,2)+Math.pow(N.max.z-N.min.z+1,2),1/2);let _=Z/2/Math.tan(Math.PI*O/360);return F<1&&(_=_/F),isNaN(_)?Z:_}function P(I){return i.work.observers[I].standingPosition.clone()}const L=()=>{if(!e||!u||!f)return;const I=i.getPose();I.fov=c.fov,I.offset=f,I.distance=u,typeof a.lockedLatitude=="number"&&(I.latitude=a.lockedLatitude),typeof a.lockedLongitude=="number"&&(I.longitude=a.lockedLongitude),typeof a.lockedPanoIndex=="number"&&(I.offset=P(a.lockedPanoIndex)),a.lookAtCurrentCamera&&(I.offset=i.camera.position.clone().setY(i.camera.position.y+1)),c.setFromPose(I),o=!0},D=()=>{!e||o!==!0||!s||!s.domElement.parentNode||s.domElement.parentNode.offsetWidth===0||(s.render(l,c),o=!1)},T=()=>{s&&s.dispose(),s=null},W=I=>{Object.assign(a,I),L()},G=()=>({enabled:e});return Object.assign(window,{camera:c}),i.on("modelLoaded",g),i.on("modelWillLoad",A),i.on("cameraDirectionUpdate",L),i.on("dispose",T),i.on("renderFrame",D),i.on("cameraPositionUpdate",L),{appendTo:y,refresh:C,changeConfigs:W,enable:v,disable:w,getCurrentState:G}};function At(...i){const t=[];return i.forEach(e=>{e.isCSS3DObjectPlus?t.push(e):t.push(...At(...e.children))}),t}function zn(i,t){const e=Math.round(i);return e%2===0?e:e+Number(t!=null&&t.floor?-1:1)}function Fl(i,t,e=!0){if(!i)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const n=()=>{const s=zn(i.clientWidth,{floor:!0}),r=zn(i.clientHeight,{floor:!0});t(s,r)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>n(),unobserve:()=>{}};const o=new ResizeObserver(n);return e&&n(),{observe:()=>o.observe(i),unobserve:()=>o.unobserve(i)}}class Vo extends Mt.CSS3DRenderer{constructor(){super();m(this,"wrapper");m(this,"requestAnimationFrameId");m(this,"resizeDisoper");this.domElement.style.position="absolute",this.domElement.style.top="0",this.domElement.style.left="0",this.domElement.style.userSelect="none",this.domElement.style.pointerEvents="none"}setWrapper(e){if(!e)throw new Error("CSS3DRenderer: wrapper is required");if(e.contains(this.domElement))return;const n=this.wrapper;return n&&n.contains(this.domElement)&&this.domElement.remove(),this.appendToElement(e),this.wrapper=e,this}appendToElement(e){e.appendChild(this.domElement);const n=(r,a)=>this.setSize(r,a),{observe:o,unobserve:s}=Fl(e,n,!0);o(),this.resizeDisoper=s,this.wrapper=e}renderEveryFrame(e,n){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return console.warn("CSS3DRenderer: render is running");const o=()=>{this.requestAnimationFrameId=requestAnimationFrame(o),!!e.visible&&At(e).length!==0&&this.render(e,n)};o()}stopRender(){this.requestAnimationFrameId&&cancelAnimationFrame(this.requestAnimationFrameId)}dispose(){var e;this.stopRender(),(e=this.resizeDisoper)==null||e.call(this),this.domElement.remove()}}function Gl(i){return typeof Symbol=="undefined"?`$Symbol<${i}>$`:Symbol(i)}const fn=Gl("$$EVENT$$");function Bn(i){return i[fn]||(i[fn]={}),i[fn]}function Hl(i){i[fn]||delete i[fn]}class Xt{hasListener(t){const e=Bn(this);return Boolean((e==null?void 0:e[t])&&e[t].length>0)}on(t,e,n){const o=Bn(this);return o[t]||(o[t]=[]),o[t].push([e,n||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){Hl(this);return}const n=Bn(this);if(n[t]||(n[t]=[]),e===void 0){n[t].length=0;return}let o=0;for(;o<n[t].length&&n[t][o][0]!==e;o++);o<n[t].length&&n[t].splice(o,1)}emit(t,...e){let n=!1;const s=Bn(this)[t]||[];for(let r of s.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(n=!0)}return n}}function ki(...i){const t=new R.Vector3;return i.forEach(e=>{t.add(e)}),t.divideScalar(i.length),t}const Wl=({x:i,y:t,z:e})=>new R.Vector3(i,t,e),ot=i=>new R.Vector3().fromArray(i),hn=i=>i instanceof R.Vector3?i:Array.isArray(i)?ot(i):Wl(i);class Nl extends k.Mesh{constructor(e,n){const o=new k.MeshBasicMaterial({opacity:0,color:0,transparent:!1,side:k.DoubleSide}),s=new k.PlaneGeometry(e,n);super(s,o);m(this,"name","opacity-mesh")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}const Qo=1,_l=`CSS3DObjectPlus@${Qo}`,Xl=.00216,Yl=.003;class Ul extends Mt.CSS3DObject{constructor(e){var E,P,L;const n=e.container,o=e.cornerPoints,s=(E=e.ratio)!=null?E:Yl,r=(P=e.dpr)!=null?P:1,a=(L=e.pointerEvents)!=null?L:"auto",l=Math.max(Xl,s),c=o[0].distanceTo(o[1]),d=o[1].distanceTo(o[2]),u=zn(c/s*r),f=zn(d/s*r),h=ki(...o);let p;if(l===s)n.style.width=`${u}px`,n.style.height=`${f}px`,p=n;else{const D=document.createElement("div");D.style.width=`${u}px`,D.style.height=`${f}px`,D.style.pointerEvents="none";const T=s/l;n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.width=`${T*u}px`,n.style.height=`${T*f}px`,D.appendChild(n),p=D}super(p);m(this,"version",Qo);m(this,"isCSS3DObjectPlus",!0);m(this,"container");m(this,"width");m(this,"height");m(this,"domWidthPx");m(this,"domHeightPx");m(this,"cornerPoints");m(this,"centerPosition");m(this,"ratio");m(this,"mode","front");m(this,"hooks",new Xt);m(this,"opacityMesh");m(this,"selfVisible",!0);m(this,"parentVisibleListenerDisposer");m(this,"createOpacityMesh",e=>{const{domWidthPx:n,domHeightPx:o}=e,s=new Nl(n,o);return s.position.copy(e.position),s.rotation.copy(e.rotation),s.scale.copy(e.scale),s});m(this,"addParentVisibleListener",()=>{var e;if((e=this.parent)!=null&&e.isCSS3DGroup){const n=this.parent,o=s=>{this.setVisible(s&&this.selfVisible,{setSelfVisible:!1})};n.hooks.on("visibleChange",o),this.parentVisibleListenerDisposer=()=>n.hooks.off("visibleChange",o)}});m(this,"removeParentVisibleListener",()=>{var e;(e=this.parentVisibleListenerDisposer)==null||e.call(this)});if(n.style.pointerEvents=a,this.scale.set(l,l,l),this.cornerPoints=o,this.ratio=s,this.container=n,e.mode&&(this.mode=e.mode),l===s)this.width=c,this.height=d,this.domWidthPx=u,this.domHeightPx=f,this.centerPosition=h;else{const D=s/l;this.width=D*c,this.height=D*d,this.domWidthPx=D*u,this.domHeightPx=D*f,this.centerPosition=new R.Vector3().subVectors(h,o[0]).multiplyScalar(D).add(o[0])}n.classList.add(`${_l}__container`);const A=new R.Vector3().subVectors(o[1],o[0]),g=new R.Vector3().subVectors(o[3],o[0]),v=new R.Vector3().crossVectors(A,g).normalize();this.lookAt(v);const w=this.up.clone().applyQuaternion(this.quaternion),y=g.clone(),C=new R.Vector3().crossVectors(w,y).normalize();this.rotateOnWorldAxis(C,w.angleTo(y)),this.position.copy(h),this.addEventListener("added",()=>{var D;this.mode==="front"&&((D=this.opacityMesh)==null||D.removeFromParent()),this.addParentVisibleListener()}),this.addEventListener("removed",()=>{var D;(D=this.opacityMesh)==null||D.removeFromParent(),this.removeParentVisibleListener()})}setVisible(e,n={setSelfVisible:!0}){n.setSelfVisible&&(this.selfVisible=e),this.visible=e,this.opacityMesh&&(this.opacityMesh.visible=e)}removeFromParent(){var n;const e=this.parent;return e!==null&&e.remove(this),(n=this.opacityMesh)==null||n.removeFromParent(),this}removeOpacityMesh(){var e;return(e=this.opacityMesh)==null||e.removeFromParent(),this.opacityMesh=void 0,this}dispose(){var e;this.container.remove(),this.removeFromParent(),(e=this.opacityMesh)==null||e.removeFromParent()}getOpacityMesh(){if(this.opacityMesh)return this.opacityMesh;{const e=this.createOpacityMesh(this);return this.opacityMesh=e,e}}applyMatrix4(e){var n;super.applyMatrix4(e),(n=this.opacityMesh)==null||n.applyMatrix4(e)}applyQuaternion(e){var n;return super.applyQuaternion(e),(n=this.opacityMesh)==null||n.applyQuaternion(e),this}applyScaleMatrix4(e){var n;this.scale.applyMatrix4(e),(n=this.opacityMesh)==null||n.scale.applyMatrix4(e)}}class Jl extends k.Scene{constructor(){super()}add(...t){return super.add(...t),At(...t).forEach(e=>{e.mode="front"}),this}}class Zl extends k.Scene{constructor(e){super();m(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return super.add(...e),At(...e).forEach(n=>{n.mode="behind",this.scene.add(n.getOpacityMesh())}),this}remove(...e){return At(...e).forEach(n=>{var o;(o=n.opacityMesh)==null||o.removeFromParent()}),super.remove(...e),this}}class Oo extends k.Group{constructor(e){super();m(this,"isCSS3DGroup",!0);m(this,"mode");m(this,"CSS3DObjectLength",0);m(this,"hooks",new Xt);this.mode=e}add(...e){return At(...e).forEach(n=>{n.mode=this.mode}),super.add(...e),this.updateLength(),this}setVisible(e){this.visible=e,this.hooks.emit("visibleChange",e)}remove(...e){return super.remove(...e),this.updateLength(),this}updateLength(){this.CSS3DObjectLength=At(this).length}}class ql extends Oo{constructor(){super("front")}}class Kl extends Oo{constructor(e){super("behind");m(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return At(...e).forEach(n=>{this.scene.add(n.getOpacityMesh())}),super.add(...e),this}}const $l=3,xi="CSS3DRenderer",mn=`${xi}@${$l}`,Yt=()=>{console.error(`${mn} is disposed`)},De={css3DObjects:[],frontModeStore:{css3DRenderer:new Vo},behindModeStore:{css3DRenderer:new Vo}};function Ro(i){return De.css3DObjects.find(t=>t.id===i)}function ec(i){De.frontModeStore.css3DRenderer.setWrapper(i)}function tc(i){De.behindModeStore.css3DRenderer.setWrapper(i)}class Ut{constructor(t){m(this,"hooks",new Xt);m(this,"state",{enabled:!0,visible:!0,disposed:!1});m(this,"_scene");m(this,"store",{frontModeGroup:new ql});m(this,"create3DElement",(t,e,n)=>{if(this.state.disposed)return Yt();const o=(()=>{const C={ratio:.00216,devicePixelRatio:1,mode:"front",autoRender:!0,container:document.createElement("div"),pointerEvents:"none"};return Object.assign(C,n)})(),s=e.map(hn);if((s==null?void 0:s.length)<4)return console.error(`${mn}: requires 4 point but params may have fewer`);const{ratio:r,devicePixelRatio:a,mode:l,autoRender:c,container:d,pointerEvents:u}=o;let f=!1;const h=this.createObject(s,{ratio:r,dpr:a,container:d,mode:l,pointerEvents:u});De.css3DObjects.push(h),o.scene&&this.setScene(o.scene);const p=()=>{if(f)return;const C=h.mode==="front"?this.getFrontCSS3DObjectGroup():this.getBehindCSS3DObjectGroup();!C||C.add(h)},A=()=>{f||(p(),this.render(t))},g=C=>this.setVisibleById(h.id,C),v=C=>this.setEnabledById(h.id,C),w=()=>(f=!0,h.removeFromParent(),!0),y=l==="front"?De.frontModeStore.css3DRenderer:De.behindModeStore.css3DRenderer;return c&&A(),{id:h.uuid,container:d,css3DObject:h,render:c?void 0:A,show:()=>g(!0),hide:()=>g(!1),setVisible:g,enable:()=>v(!0),disable:()=>v(!1),setEnabled:v,dispose:w,appendToElement:C=>y.setWrapper(C)}});m(this,"setVisibleById",(t,e)=>{var n;(n=Ro(t))==null||n.setVisible(e)});m(this,"setEnabledById",(t,e)=>{const n=Ro(t);if(!n)return;const o=n.mode==="front"?this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}):this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1});!o||(e?o.add(n):o.remove(n))});m(this,"createObject",(t,e)=>{const n=new Ul(H({cornerPoints:t},e));return n.element.classList.add(`${xi}__container`),n.element.id=`${xi}__container--${n.uuid}`,n});t&&this.setScene(t)}get scene(){return this._scene||console.error("scene doesn't exist!, please call setScene(scene) first"),this._scene}static get frontModeCSS3DRenderer(){return De.frontModeStore.css3DRenderer}static get behindModeCSS3DRenderer(){return De.behindModeStore.css3DRenderer}get frontModeCSS3DRenderer(){return De.frontModeStore.css3DRenderer}get behindModeCSS3DRenderer(){return De.behindModeStore.css3DRenderer}setScene(t){this._scene=t}getCurrentState(){return this.state}setState(t,e={userAction:!0}){if(this.state.disposed)return Yt();const n=H({},this.state);this.state=Object.assign(this.state,t),n.visible!==this.state.visible&&(t.visible?this.handleShow():this.handleHide()),n.enabled!==this.state.enabled&&(t.enabled?this.handleEnable():this.handleDisable()),n.disposed!==this.state.disposed&&this.handleDispose(),this.hooks.emit("stateChange",{state:this.state,prevState:n,userAction:e.userAction})}dispose(){this.setState({disposed:!0}),this.hooks.emit("dispose")}show(){return X(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Yt();this.setState({visible:!0},{userAction:t}),this.hooks.emit("show",{userAction:t})})}hide(){return X(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Yt();this.setState({visible:!1},{userAction:t}),this.hooks.emit("hide",{userAction:t})})}enable({userAction:t}={userAction:!0}){if(this.state.disposed)return Yt();this.setState({enabled:!0},{userAction:t}),this.hooks.emit("enable",{userAction:t})}disable({userAction:t}={userAction:!0}){if(this.state.disposed)return Yt();this.setState({enabled:!1},{userAction:t}),this.hooks.emit("disable",{userAction:t})}getFrontCSS3DScene({createSceneIfNotExists:t=!1}={}){var n;const e=(n=De.frontModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const o=new Jl;De.frontModeStore.css3DScene=o}return De.frontModeStore.css3DScene}getBehindCSS3DScene({createSceneIfNotExists:t=!1}={}){var n,o;const e=(n=De.behindModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const s=(o=De.behindModeStore.scene)!=null?o:this.scene;if(!s){console.error(`${mn}: scene is required when mode is behind`);return}const r=new Zl(s);De.behindModeStore.css3DScene=r,De.behindModeStore.scene=s}return De.behindModeStore.css3DScene}getFrontCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){const e=this.getFrontCSS3DScene({createSceneIfNotExists:t});return t&&e&&(e.getObjectById(this.store.frontModeGroup.id)||e.add(this.store.frontModeGroup)),this.store.frontModeGroup}getBehindCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){var n;const e=this.getBehindCSS3DScene({createSceneIfNotExists:t});if(t&&e&&this.scene){const o=(n=this.store.behindModeGroup)!=null?n:new Kl(this.scene);this.store.behindModeGroup=o,e.getObjectById(o.id)||e.add(o)}return this.store.behindModeGroup}render(t){var e,n;if(this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}).CSS3DObjectLength>0){const o=this.getFrontCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${mn}: css3DScene is required when mode is front`);De.frontModeStore.css3DRenderer.renderEveryFrame(o,t)}if(((n=(e=this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1}))==null?void 0:e.CSS3DObjectLength)!=null?n:0)>0){const o=this.getBehindCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${mn}: css3DScene is required when mode is behind`);De.behindModeStore.css3DRenderer.renderEveryFrame(o,t)}}handleShow(){return X(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!0),(t=this.store.behindModeGroup)==null||t.setVisible(!0)})}handleHide(){return X(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!1),(t=this.store.behindModeGroup)==null||t.setVisible(!1)})}handleEnable(){var t,e;(t=this.getFrontCSS3DScene())==null||t.add(this.store.frontModeGroup),this.store.behindModeGroup&&((e=this.getBehindCSS3DScene())==null||e.add(this.store.behindModeGroup))}handleDisable(){var t,e,n;this.store.frontModeGroup.children.forEach(o=>{o instanceof Mt.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.remove()}),(t=this.store.behindModeGroup)==null||t.children.forEach(o=>{o instanceof Mt.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.remove()}),(e=this.getFrontCSS3DScene())==null||e.remove(this.store.frontModeGroup),this.store.behindModeGroup&&((n=this.getBehindCSS3DScene())==null||n.remove(this.store.behindModeGroup))}handleDispose(){this.handleDisable()}}m(Ut,"setFrontModeContainer",ec),m(Ut,"setBehindModeContainer",tc);function Fo(i){return X(this,null,function*(){return new Promise(t=>{var e;if((e=i.model)!=null&&e.loaded){t();return}else i.once("modelLoaded",()=>t())})})}const st=document.createElement("div");st.classList.add("behindFiveElement"),st.style.position="absolute",st.style.top="0",st.style.left="0",st.style.width="100%",st.style.height="100%",st.style.pointerEvents="none";function Go(i){var e,n,o,s,r;const t=(r=(n=Di(i.getElement()))!=null?n:Di((e=i.getElement())==null?void 0:e.parentElement))!=null?r:Di((s=(o=i.getElement())==null?void 0:o.parentElement)==null?void 0:s.parentElement);if(t!=null&&t.parentElement)return t.parentElement.insertBefore(st,t),st;console.error("Can not find a valid element to insert behindFiveElement. How to fix it: https://github.com/realsee-developer/dnalogel/tree/main/plugins/src/CSS3DRenderPlugin/README.md")}function Di(i){var a;if(!i)return;const t=(a=i.style.position)!=null?a:getComputedStyle(i).position;if(t!=="fixed"&&t!=="absolute"&&t!=="relative")return;const e=getComputedStyle(i),n=e.backgroundColor,o=e.backgroundImage;if(!(n!=="transparent"&&n!=="rgba(0, 0, 0, 0)"&&n!==""||o!=="none"&&o!==""))return i}const Li="CSS3DRenderPlugin@v2.0.1";class nc extends Ut{constructor(e){super();m(this,"five");m(this,"behindFiveContainer");m(this,"staticPrefix","//vrlab-static.ljcdn.com");m(this,"create3DDomContainer",(e,n)=>{if(this.state.disposed)return;const o=(()=>{var u;(n==null?void 0:n.dpr)!==void 0&&console.warn(`${Li}: please use "config.devicePixelRatio" replace "config.dpr"`);const d={ratio:.00216,devicePixelRatio:(u=n==null?void 0:n.dpr)!=null?u:1,mode:"front",autoRender:!0};return Object.assign(d,n,(n==null?void 0:n.mode)==="behind"?{scene:this.five.scene}:void 0)})(),s=this.five.getElement();if(!s){console.error(`${Li}: five.getElement() is ${s}`);return}const{autoRender:r}=o;o.mode==="behind"&&o.behindFiveContainer&&(this.behindFiveContainer=o.behindFiveContainer);const a=this.create3DElement(this.five.camera,e,pe(H({},o),{autoRender:!1}));if(!a)return;const l=()=>{const d=a.css3DObject.mode==="front"?s.parentElement:this.getBehindFiveElement();if(!d)return console.error(`${Li}: wrapper is ${d}`);a.appendToElement(d),a.render()},c=()=>{a.css3DObject.mode==="front"&&l(),a.css3DObject.mode==="behind"&&Fo(this.five).then(()=>{l()})};return r&&c(),pe(H({},a),{render:r?void 0:c})});this.five=e}disposeAll(){return this.dispose()}setState(...e){const n=super.setState(...e);return this.five.needsRender=!0,n}getBehindFiveElement(){return this.behindFiveContainer?this.behindFiveContainer:(this.behindFiveContainer=Go(this.five),this.behindFiveContainer)}}const Jt=i=>new nc(i);function Si(i,t,e=new R.Vector3(1,1,1),n=!1){const o=new En.Line(i,t);return o.setMaterial({dashed:n,color:e,linewidth:1}),o.remove(o.points),o}const ic=i=>{const t={intersection:null,disposers:[]},e=d=>{t.intersection=d},n=()=>{t.intersection=null};i.on("modelLoaded",()=>{i.on("intersectionOnModelUpdate",e),i.on("intersectionHidden",n)}),i.on("dispose",()=>{i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)});const o=(d,u=2,f=.1)=>{const h=u/2,A=c(d,f),g=new R.Group;g.add(Si(new R.Vector3(A.x+h,A.y,A.z),new R.Vector3(A.x-h,A.y,A.z),new R.Vector3(1,0,0)),Si(new R.Vector3(A.x,A.y+h,A.z),new R.Vector3(A.x,A.y-h,A.z),new R.Vector3(0,1,0)),Si(new R.Vector3(A.x,A.y,A.z+h),new R.Vector3(A.x,A.y,A.z-h),new R.Vector3(0,0,1))),i.scene.add(g),i.needsRender=!0;const v=()=>{i.scene.remove(g)};return t.disposers.push(v),{clear:v,pointAxesHelperMesh:g}},s=(d,u=0)=>{var v,w;const f=(v=i==null?void 0:i.camera)==null?void 0:v.position;if(!f)return!1;const h=d.distanceTo(f),p=d.sub(f).normalize(),A=new R.Raycaster(f,p),g=(w=i.model.intersectRaycaster(A))==null?void 0:w[0];return!(g&&g.distance+u<h)},r=()=>t.intersection,a=()=>{var d,u;(u=(d=t.disposers)==null?void 0:d.forEach)==null||u.call(d,f=>f==null?void 0:f()),i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)},l=a,c=(d,u)=>{const f=d.clone();return i.camera.position.clone().sub(f).setLength(u).add(f)};return{intersection:r,pointAxesHelper:o,movePointTowardsCamera:c,destroy:a,dispose:l,canSeePoint:s}};function J(){}const vt=i=>i;function Ce(i,t){for(const e in t)i[e]=t[e];return i}function oc(i){return i&&typeof i=="object"&&typeof i.then=="function"}function Ho(i){return i()}function Wo(){return Object.create(null)}function Bt(i){i.forEach(Ho)}function Tn(i){return typeof i=="function"}function ie(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let jn;function _e(i,t){return jn||(jn=document.createElement("a")),jn.href=t,i===jn.href}function sc(i){return Object.keys(i).length===0}function rt(i,t,e,n){if(i){const o=No(i,t,e,n);return i[0](o)}}function No(i,t,e,n){return i[1]&&n?Ce(e.ctx.slice(),i[1](n(t))):e.ctx}function at(i,t,e,n){if(i[2]&&n){const o=i[2](n(e));if(t.dirty===void 0)return o;if(typeof o=="object"){const s=[],r=Math.max(t.dirty.length,o.length);for(let a=0;a<r;a+=1)s[a]=t.dirty[a]|o[a];return s}return t.dirty|o}return t.dirty}function lt(i,t,e,n,o,s){if(o){const r=No(t,e,n,s);i.p(r,o)}}function ct(i){if(i.ctx.length>32){const t=[],e=i.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function _o(i){const t={};for(const e in i)e[0]!=="$"&&(t[e]=i[e]);return t}function Vn(i,t){const e={};t=new Set(t);for(const n in i)!t.has(n)&&n[0]!=="$"&&(e[n]=i[n]);return e}function Oe(i){return i==null?"":i}const Xo=typeof window!="undefined";let Yo=Xo?()=>window.performance.now():()=>Date.now(),Mi=Xo?i=>requestAnimationFrame(i):J;const Zt=new Set;function Uo(i){Zt.forEach(t=>{t.c(i)||(Zt.delete(t),t.f())}),Zt.size!==0&&Mi(Uo)}function Jo(i){let t;return Zt.size===0&&Mi(Uo),{promise:new Promise(e=>{Zt.add(t={c:i,f:e})}),abort(){Zt.delete(t)}}}function Q(i,t){i.appendChild(t)}function le(i,t,e){const n=zi(i);if(!n.getElementById(t)){const o=j("style");o.id=t,o.textContent=e,Zo(n,o)}}function zi(i){if(!i)return document;const t=i.getRootNode?i.getRootNode():i.ownerDocument;return t&&t.host?t:i.ownerDocument}function rc(i){const t=j("style");return Zo(zi(i),t),t.sheet}function Zo(i,t){return Q(i.head||i,t),t.sheet}function B(i,t,e){i.insertBefore(t,e||null)}function z(i){i.parentNode&&i.parentNode.removeChild(i)}function dt(i,t){for(let e=0;e<i.length;e+=1)i[e]&&i[e].d(t)}function j(i){return document.createElement(i)}function ve(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Ie(i){return document.createTextNode(i)}function te(){return Ie(" ")}function me(){return Ie("")}function Me(i,t,e,n){return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}function qo(i){return function(t){return t.stopPropagation(),i.call(this,t)}}function b(i,t,e){e==null?i.removeAttribute(t):i.getAttribute(t)!==e&&i.setAttribute(t,e)}function Qn(i,t){const e=Object.getOwnPropertyDescriptors(i.__proto__);for(const n in t)t[n]==null?i.removeAttribute(n):n==="style"?i.style.cssText=t[n]:n==="__value"?i.value=i[n]=t[n]:e[n]&&e[n].set?i[n]=t[n]:b(i,n,t[n])}function ac(i){return Array.from(i.childNodes)}function Le(i,t){t=""+t,i.wholeText!==t&&(i.data=t)}function M(i,t,e,n){e===null?i.style.removeProperty(t):i.style.setProperty(t,e,n?"important":"")}let On;function lc(){if(On===void 0){On=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(i){On=!0}}return On}function bt(i,t){getComputedStyle(i).position==="static"&&(i.style.position="relative");const n=j("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const o=lc();let s;return o?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=Me(window,"message",r=>{r.source===n.contentWindow&&t()})):(n.src="about:blank",n.onload=()=>{s=Me(n.contentWindow,"resize",t)}),Q(i,n),()=>{(o||s&&n.contentWindow)&&s(),z(n)}}function ne(i,t,e){i.classList[e?"add":"remove"](t)}function Ko(i,t,{bubbles:e=!1,cancelable:n=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(i,e,n,t),o}class Rn{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.is_svg?this.e=ve(e.nodeName):this.e=j(e.nodeName),this.t=e,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)B(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(z)}}const Fn=new Map;let Gn=0;function cc(i){let t=5381,e=i.length;for(;e--;)t=(t<<5)-t^i.charCodeAt(e);return t>>>0}function dc(i,t){const e={stylesheet:rc(t),rules:{}};return Fn.set(i,e),e}function $o(i,t,e,n,o,s,r,a=0){const l=16.666/n;let c=`{
102
102
  `;for(let g=0;g<=1;g+=l){const v=t+(e-t)*s(g);c+=g*100+`%{${r(v,1-v)}}
103
103
  `}const d=c+`100% {${r(e,1-e)}}
104
104
  }`,u=`__svelte_${cc(d)}_${a}`,f=zi(i),{stylesheet:h,rules:p}=Fn.get(f)||dc(f,i);p[u]||(p[u]=!0,h.insertRule(`@keyframes ${u} ${d}`,h.cssRules.length));const A=i.style.animation||"";return i.style.animation=`${A?`${A}, `:""}${u} ${n}ms linear ${o}ms 1 both`,Gn+=1,u}function Bi(i,t){const e=(i.style.animation||"").split(", "),n=e.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),o=e.length-n.length;o&&(i.style.animation=n.join(", "),Gn-=o,Gn||uc())}function uc(){Mi(()=>{Gn||(Fn.forEach(i=>{const{ownerNode:t}=i.stylesheet;t&&z(t)}),Fn.clear())})}let pn;function ut(i){pn=i}function yt(){if(!pn)throw new Error("Function called outside component initialization");return pn}function Ti(i){yt().$$.before_update.push(i)}function Ze(i){yt().$$.on_mount.push(i)}function ji(i){yt().$$.after_update.push(i)}function wt(i){yt().$$.on_destroy.push(i)}function Hn(){const i=yt();return(t,e,{cancelable:n=!1}={})=>{const o=i.$$.callbacks[t];if(o){const s=Ko(t,e,{cancelable:n});return o.slice().forEach(r=>{r.call(i,s)}),!s.defaultPrevented}return!0}}function Wn(i,t){return yt().$$.context.set(i,t),t}function ft(i){return yt().$$.context.get(i)}function Vi(i,t){const e=i.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const gn=[],ze=[],Nn=[],es=[],ts=Promise.resolve();let Qi=!1;function ns(){Qi||(Qi=!0,ts.then(Ri))}function fc(){return ns(),ts}function Se(i){Nn.push(i)}const Oi=new Set;let _n=0;function Ri(){const i=pn;do{for(;_n<gn.length;){const t=gn[_n];_n++,ut(t),hc(t.$$)}for(ut(null),gn.length=0,_n=0;ze.length;)ze.pop()();for(let t=0;t<Nn.length;t+=1){const e=Nn[t];Oi.has(e)||(Oi.add(e),e())}Nn.length=0}while(gn.length);for(;es.length;)es.pop()();Qi=!1,Oi.clear(),ut(i)}function hc(i){if(i.fragment!==null){i.update(),Bt(i.before_update);const t=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,t),i.after_update.forEach(Se)}}let An;function is(){return An||(An=Promise.resolve(),An.then(()=>{An=null})),An}function Xn(i,t,e){i.dispatchEvent(Ko(`${t?"intro":"outro"}${e}`))}const Yn=new Set;let Ct;function re(){Ct={r:0,c:[],p:Ct}}function ae(){Ct.r||Bt(Ct.c),Ct=Ct.p}function x(i,t){i&&i.i&&(Yn.delete(i),i.i(t))}function S(i,t,e,n){if(i&&i.o){if(Yn.has(i))return;Yn.add(i),Ct.c.push(()=>{Yn.delete(i),n&&(e&&i.d(1),n())}),i.o(t)}else n&&n()}const os={duration:0};function Tt(i,t,e){let n=t(i,e),o=!1,s,r,a=0;function l(){s&&Bi(i,s)}function c(){const{delay:u=0,duration:f=300,easing:h=vt,tick:p=J,css:A}=n||os;A&&(s=$o(i,0,1,f,u,h,A,a++)),p(0,1);const g=Yo()+u,v=g+f;r&&r.abort(),o=!0,Se(()=>Xn(i,!0,"start")),r=Jo(w=>{if(o){if(w>=v)return p(1,0),Xn(i,!0,"end"),l(),o=!1;if(w>=g){const y=h((w-g)/f);p(y,1-y)}}return o})}let d=!1;return{start(){d||(d=!0,Bi(i),Tn(n)?(n=n(),is().then(c)):c())},invalidate(){d=!1},end(){o&&(l(),o=!1)}}}function qt(i,t,e){let n=t(i,e),o=!0,s;const r=Ct;r.r+=1;function a(){const{delay:l=0,duration:c=300,easing:d=vt,tick:u=J,css:f}=n||os;f&&(s=$o(i,1,0,c,l,d,f));const h=Yo()+l,p=h+c;Se(()=>Xn(i,!1,"start")),Jo(A=>{if(o){if(A>=p)return u(0,1),Xn(i,!1,"end"),--r.r||Bt(r.c),!1;if(A>=h){const g=d((A-h)/c);u(1-g,g)}}return o})}return Tn(n)?is().then(()=>{n=n(),a()}):a(),{end(l){l&&n.tick&&n.tick(1,0),o&&(s&&Bi(i,s),o=!1)}}}function ss(i,t){const e=t.token={};function n(o,s,r,a){if(t.token!==e)return;t.resolved=a;let l=t.ctx;r!==void 0&&(l=l.slice(),l[r]=a);const c=o&&(t.current=o)(l);let d=!1;t.block&&(t.blocks?t.blocks.forEach((u,f)=>{f!==s&&u&&(re(),S(u,1,1,()=>{t.blocks[f]===u&&(t.blocks[f]=null)}),ae())}):t.block.d(1),c.c(),x(c,1),c.m(t.mount(),t.anchor),d=!0),t.block=c,t.blocks&&(t.blocks[s]=c),d&&Ri()}if(oc(i)){const o=yt();if(i.then(s=>{ut(o),n(t.then,1,t.value,s),ut(null)},s=>{if(ut(o),n(t.catch,2,t.error,s),ut(null),!t.hasCatch)throw s}),t.current!==t.pending)return n(t.pending,0),!0}else{if(t.current!==t.then)return n(t.then,1,t.value,i),!0;t.resolved=i}}function mc(i,t,e){const n=t.slice(),{resolved:o}=i;i.current===i.then&&(n[i.value]=o),i.current===i.catch&&(n[i.error]=o),i.block.p(n,e)}const pc=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function Fi(i,t){i.d(1),t.delete(i.key)}function jt(i,t){S(i,1,1,()=>{t.delete(i.key)})}function qe(i,t,e,n,o,s,r,a,l,c,d,u){let f=i.length,h=s.length,p=f;const A={};for(;p--;)A[i[p].key]=p;const g=[],v=new Map,w=new Map;for(p=h;p--;){const P=u(o,s,p),L=e(P);let D=r.get(L);D?n&&D.p(P,t):(D=c(L,P),D.c()),v.set(L,g[p]=D),L in A&&w.set(L,Math.abs(p-A[L]))}const y=new Set,C=new Set;function E(P){x(P,1),P.m(a,d),r.set(P.key,P),d=P.first,h--}for(;f&&h;){const P=g[h-1],L=i[f-1],D=P.key,T=L.key;P===L?(d=P.first,f--,h--):v.has(T)?!r.has(D)||y.has(D)?E(P):C.has(T)?f--:w.get(D)>w.get(T)?(C.add(D),E(P)):(y.add(T),f--):(l(L,r),f--)}for(;f--;){const P=i[f];v.has(P.key)||l(P,r)}for(;h;)E(g[h-1]);return g}function Te(i,t){const e={},n={},o={$$scope:1};let s=i.length;for(;s--;){const r=i[s],a=t[s];if(a){for(const l in r)l in a||(n[l]=1);for(const l in a)o[l]||(e[l]=a[l],o[l]=1);i[s]=a}else for(const l in r)o[l]=1}for(const r in n)r in e||(e[r]=void 0);return e}function rs(i){return typeof i=="object"&&i!==null?i:{}}function ee(i){i&&i.c()}function K(i,t,e,n){const{fragment:o,after_update:s}=i.$$;o&&o.m(t,e),n||Se(()=>{const r=i.$$.on_mount.map(Ho).filter(Tn);i.$$.on_destroy?i.$$.on_destroy.push(...r):Bt(r),i.$$.on_mount=[]}),s.forEach(Se)}function $(i,t){const e=i.$$;e.fragment!==null&&(Bt(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function gc(i,t){i.$$.dirty[0]===-1&&(gn.push(i),ns(),i.$$.dirty.fill(0)),i.$$.dirty[t/31|0]|=1<<t%31}function oe(i,t,e,n,o,s,r,a=[-1]){const l=pn;ut(i);const c=i.$$={fragment:null,ctx:[],props:s,update:J,not_equal:o,bound:Wo(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:Wo(),dirty:a,skip_bound:!1,root:t.target||l.$$.root};r&&r(c.root);let d=!1;if(c.ctx=e?e(i,t.props||{},(u,f,...h)=>{const p=h.length?h[0]:f;return c.ctx&&o(c.ctx[u],c.ctx[u]=p)&&(!c.skip_bound&&c.bound[u]&&c.bound[u](p),d&&gc(i,u)),f}):[],c.update(),d=!0,Bt(c.before_update),c.fragment=n?n(c.ctx):!1,t.target){if(t.hydrate){const u=ac(t.target);c.fragment&&c.fragment.l(u),u.forEach(z)}else c.fragment&&c.fragment.c();t.intro&&x(i.$$.fragment),K(i,t.target,t.anchor,t.customElement),Ri()}ut(l)}class se{$destroy(){$(this,1),this.$destroy=J}$on(t,e){if(!Tn(e))return J;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const o=n.indexOf(e);o!==-1&&n.splice(o,1)}}$set(t){this.$$set&&!sc(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ac="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAYAAACZ1L+0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAYKADAAQAAAABAAAAPAAAAABU0H2EAAARRElEQVR4Ad2czY9cRZbFq1yFoQGDNCzwuAENohl54dkgdrNh34tZ8GciFi31nwEsmAEhhAWD1GMJCZgx5sMfUHN+J+NE3XfrZWWVcVVLHVLmuXG/74148V5m2bm/N8bR0dH+Bx988Po333zzbz///PONg4ODa+I9I9y/cuXKgV77h4eH+1KH3hP/yv7+vuBAsG+5UCIpCkMzDQ962Eu80Q1P/KmHT82v8IocZFL4pslDvL3fNARHoPI2wtbrV1jBIf9N8SEZ0UUP2wFHv2ocSc/2ouEz8PVooJXQ0/j10aNHoH2Idj4PHz4k1n29/k+5/u3ll1/+r7fffvtLzfGzd8ibjK6+9957f5ajf1XzH9y7d+8Xjf9FRs1SdvNBBg2SDQ1xh9ALH4yN0M2BNZrKwtFc9Fmkquuma5HJBzvLiIONBnx40B7QIzTdxCcNwj3dYlEoUmabAU+UFZDpxah22Ng2NjQXH0LrwccGwyEzXfWhWQwSYQHYuFevXj14/vnn37h79+7Nr7766gup/FX5PnAj33///f/46aef3vj444/vfPbZZz9IYGMcnDbkhEYQL001Hfsu775i+7j6LID6cDQWYo8mabGMxOr+e/ye3y7989p3/9jfvHnz2q1bt25oMb549913/3Lwzjvv/Mu3337775988smdzz///AcVQ+IecsAOp8OOHRpkiJniWQnrBJmwc7EF8atxBA2ihx/obf7Qqa+un+aDI0f7k08nU+PLj3PBR+qpcvFdd3BNP7YgI7mnHqHzBRndv1hH33///QNtlAcvvfTSq999992dQzFu/vjjj/c//fTTu1z+unT2wDFoHN13QbVg5CQS3tBfQGwHoo+chltPto4FMsR3nKCZ7a3KyDM+UOOyHzV4xxAHOTjGqfVc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uCYPD2R0f2Ilt7lB4tMGZ3i7qPqfe+65P6j3X1y5du3aZ3rSefrGjRsvkNxpI80AeTGC0NgGoakvuFYrtvDjD11okBF6m3yjdfze9eM7sbPQIC8sg8detlPdP7XCy8ASOh6IC534Qf126Au6Aq7S+0P9jOJ/f/jhh7dfeeWVN1C4c+cOv5zoxsQgKD7O/OgIT3OLgrrkLAMR9EuQYsXLlWO5ePNMJ25s7Fhv8EIraduDDOJI7kfh6FT98M6Ka/GrLbE0/131X79+/YVXX331+tNPP32b3nt1tGhXP/rooz/ruf9N/YzWQ/2e2c8Cfg7Wz8RC9WkeE8pj/rQltMRH/jXdsdreAEp04mg8u22zYhvZ9IPueLE4puMLfnjRKzKCbD4ZHv9oK/mwaPOlm/ukkbFwjKLj428j8t8DEEvN9xJoJuhsDI9lxOeHXr3zE8cGm7fpQMfNgR54ntXmYXzx1ltvbX64VUl4SH//66+/fl2/5ndLC/BHMV/Q6ypN06Bm3lgFaKMcEbj+bDHN88/curvewF4hjhNWasrwhy/0waIPjylyYjp49Ag++NhFhi7F+jeEFcc/H6w5TYbnxo2OoufXmNPcX+XWv4QLMo+taJkfeY4gvtRs/n8vzY/cssxB5CyKxi96/aB+/Y9+KfE/X3vttS8lI7e9/wfu514OAjYP0QAAAABJRU5ErkJggg==";function vc(i){le(i,"svelte-1d7uzh5",".room-label-item.svelte-1d7uzh5{position:absolute;font-size:0.5rem;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.room-label-item__text.svelte-1d7uzh5{position:absolute;left:0;top:-4rem;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:1.25rem;min-width:2rem;padding:0 0.375rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-1d7uzh5{position:absolute;top:-2.75rem;height:3rem;width:0.0625rem;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-1d7uzh5{font-size:0.625rem}")}function bc(i){let t,e,n=i[0].name+"",o,s,r,a,l;return{c(){t=j("div"),e=j("span"),o=Ie(n),s=te(),r=j("div"),b(e,"class","room-label-item__text svelte-1d7uzh5"),M(e,"background-image","url("+Ac+")"),ne(e,"wide",i[0].name.length>3),b(r,"class","room-label-item__bar svelte-1d7uzh5"),b(t,"class","room-label-item svelte-1d7uzh5"),M(t,"z-index",i[0].zIndex),M(t,"transform",i[0].transform),M(t,"opacity",i[0].visible?1:0)},m(c,d){B(c,t,d),Q(t,e),Q(e,o),Q(t,s),Q(t,r),a||(l=Me(e,"click",i[1]),a=!0)},p(c,[d]){d&1&&n!==(n=c[0].name+"")&&Le(o,n),d&1&&ne(e,"wide",c[0].name.length>3),d&1&&M(t,"z-index",c[0].zIndex),d&1&&M(t,"transform",c[0].transform),d&1&&M(t,"opacity",c[0].visible?1:0)},i:J,o:J,d(c){c&&z(t),a=!1,l()}}}function yc(i,t,e){let{five:n}=t,{roomLabel:o}=t;function s(){n.setState({panoIndex:o.panoIndex,mode:"Panorama",longitude:o.longitude})}return i.$$set=r=>{"five"in r&&e(2,n=r.five),"roomLabel"in r&&e(0,o=r.roomLabel)},[o,s,n]}class wc extends se{constructor(t){super(),oe(this,t,yc,bc,ie,{five:2,roomLabel:0},vc)}}const{Map:Cc}=pc;function Pc(i){le(i,"svelte-9eg4zi",".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}")}function as(i,t,e){const n=i.slice();return n[12]=t[e],n}function ls(i,t){let e,n,o;return n=new wc({props:{roomLabel:t[12],five:t[1]}}),{key:i,first:null,c(){e=me(),ee(n.$$.fragment),this.first=e},m(s,r){B(s,e,r),K(n,s,r),o=!0},p(s,r){t=s;const a={};r&1&&(a.roomLabel=t[12]),r&2&&(a.five=t[1]),n.$set(a)},i(s){o||(x(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&z(e),$(n,s)}}}function Ic(i){let t,e=[],n=new Cc,o,s,r=i[0];const a=l=>l[12].id;for(let l=0;l<r.length;l+=1){let c=as(i,r,l),d=a(c);n.set(d,e[l]=ls(d,c))}return{c(){t=j("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","room-labels-container svelte-9eg4zi"),Se(()=>i[6].call(t))},m(l,c){B(l,t,c);for(let d=0;d<e.length;d+=1)e[d].m(t,null);o=bt(t,i[6].bind(t)),s=!0},p(l,[c]){c&3&&(r=l[0],re(),e=qe(e,c,a,1,l,r,n,t,jt,ls,null,as),ae())},i(l){if(!s){for(let c=0;c<r.length;c+=1)x(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)S(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function Ec(i,t,e){var A;let n,{five:o}=t,{roomLabels:s}=t,r,a,l=(A=o.model.shownFloor)!=null?A:null;function c(g){if(!(l===null||g.floorIndex===l))return!1;const w=new R.Raycaster,y=o.camera.position.clone(),C=new R.Vector3(g.position.x,g.position.y,g.position.z),E=C.distanceTo(y);w.set(y.clone(),C.clone().sub(y).normalize());const[P]=o.model.intersectRaycaster(w);return!(P&&P.distance+1<E)}function d(g,v){const y=new R.Vector3(g.position.x,g.position.y,g.position.z).clone().project(o.camera),C=Math.ceil((y.x+1)/2*v.x),E=Math.ceil((-y.y+1)/2*v.y);return`translate(${C}px, ${E}px)`}function u(g){const{rendererSize:v,shownFloor:w}=g,y=new Map;function C(P){const L=y.get(P.id);if(L)return L;const{x:D,y:T,z:W}=P.position,G=new R.Vector3(D,T,W).clone().distanceTo(o.camera.position);return y.set(P.id,G),G}return s.map(P=>{const L=c(P),D=L?d(P,v):P.transform,T=C(P),G=s.filter(Y=>Y.visible&&C(Y)<T).length*10;return pe(H({},P),{visible:L,transform:D,zIndex:G})})}function f(){e(0,s=u({rendererSize:n,shownFloor:l}))}function h(g){e(4,l=g)}o.on("cameraUpdate",f),o.on("modelShownFloorChange",h),wt(()=>{o.off("cameraUpdate",f),o.off("modelShownFloorChange",h)});function p(){r=this.clientWidth,a=this.clientHeight,e(2,r),e(3,a)}return i.$$set=g=>{"five"in g&&e(1,o=g.five),"roomLabels"in g&&e(0,s=g.roomLabels)},i.$$.update=()=>{i.$$.dirty&12&&e(5,n={x:r,y:a}),i.$$.dirty&48&&e(0,s=u({rendererSize:n,shownFloor:l}))},[s,o,r,a,l,n,p]}class kc extends se{constructor(t){super(),oe(this,t,Ec,Ic,ie,{five:1,roomLabels:0},Pc)}}function xc(i){return i.model_room_labels.map(({id:t,pano_index:e,floor_index:n,name:o,position:s,longitude:r})=>({id:t,name:o,position:s,longitude:r,panoIndex:e,floorIndex:n,zIndex:0,visible:!1,transform:""}))}class Dc{constructor(t){m(this,"five");m(this,"enabled",!0);m(this,"fiveModeEnabled");m(this,"app");m(this,"wrapper");m(this,"roomLabels",[]);m(this,"container",document.createElement("div"));m(this,"onFiveModeChange",t=>{if(t!=="Floorplan"){this.fiveModeEnabled=!1,this.render();return}this.five.once("initAnimationEnded",()=>{this.fiveModeEnabled=this.five.currentMode==="Floorplan",this.render()})});this.five=t,this.fiveModeEnabled=this.five.currentMode==="Floorplan",this.container.classList.add("model-room-label-plugin-container"),this.container.style.width="100%",this.container.style.height="100%",this.container.style.position="absolute",this.container.style.pointerEvents="none",this.container.style.left="0",this.container.style.top="0",this.container.style.zIndex="5",this.five.once("dispose",()=>this.dispose()),this.five.on("modeChange",this.onFiveModeChange),this.render()}dispose(){this.five.off("modeChange",this.onFiveModeChange),this.container.remove()}load(t){this.roomLabels=xc(t),this.render()}appendTo(t){return this.wrapper=t,t.appendChild(this.container),this.render(),this}disable(){return this.enabled=!1,this.render(),this}enable(){return this.enabled=!0,this.render(),this}render(){var t;if(!!this.wrapper){if(!this.enabled||!this.fiveModeEnabled){(t=this.app)==null||t.$destroy(),this.app=void 0;return}this.app?this.app.$set({five:this.five,roomLabels:this.roomLabels}):this.app=new kc({target:this.container,props:{five:this.five,roomLabels:this.roomLabels}})}}}const Lc=i=>new Dc(i),Sc={name:"ModelRoomLabelPlugin",version:0};var Pt=(i=>(i[i.FLOOR=1]="FLOOR",i[i.CEILING=2]="CEILING",i[i.BOUNDING_CENTER=3]="BOUNDING_CENTER",i))(Pt||{});function Un(i){return X(this,null,function*(){try{return[null,yield i]}catch(t){return t instanceof Error?[t,null]:[new Error(""),null]}})}function Jn(i){return Object.prototype.toString.call(i)==="[object Object]"}function Zn(i,t){return i===t?!0:typeof i!=typeof t?!1:!!(Number.isNaN(i)&&Number.isNaN(t))}function Mc(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!Zn(i[r],t[r]))return!1}return!0}function zc(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!Zn(i[e],t[e]))return!1;return!0}function Bc(i,t){return Zn(i,t)?!0:Jn(i)&&Jn(t)?Mc(i,t):Array.isArray(i)&&Array.isArray(t)?zc(i,t):!1}function Gi(i,t){return Zn(i,t)?!0:Jn(i)&&Jn(t)?jc(i,t):Array.isArray(i)&&Array.isArray(t)?Tc(i,t):!1}function Tc(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!Gi(i[e],t[e]))return!1;return!0}function jc(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!Gi(i[r],t[r]))return!1}return!0}function Ke(i,t,e={deep:!1}){return e.deep?Gi(i,t):Bc(i,t)}function Kt(i){return i<.5?4*i*i*i:.5*Math.pow(2*i-2,3)+1}function cs(i){const t=i-1;return t*t*t+1}function Vt(i,{delay:t=0,duration:e=400,easing:n=vt}={}){const o=+getComputedStyle(i).opacity;return{delay:t,duration:e,easing:n,css:s=>`opacity: ${s*o}`}}function ds(i,{delay:t=0,duration:e=400,easing:n=cs,x:o=0,y:s=0,opacity:r=0}={}){const a=getComputedStyle(i),l=+a.opacity,c=a.transform==="none"?"":a.transform,d=l*(1-r);return{delay:t,duration:e,easing:n,css:(u,f)=>`
105
105
  transform: ${c} translate(${(1-u)*o}px, ${(1-u)*s}px);
106
- opacity: ${l-d*f}`}}function qn(i,{delay:t=0,speed:e,duration:n,easing:o=Kt}={}){let s=i.getTotalLength();const r=getComputedStyle(i);return r.strokeLinecap!=="butt"&&(s+=parseInt(r.strokeWidth)),n===void 0?e===void 0?n=800:n=s/e:typeof n=="function"&&(n=n(s)),{delay:t,duration:n,easing:o,css:(a,l)=>`stroke-dasharray: ${a*s} ${l*s}`}}const It="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAMAAAANf8AYAAAC2VBMVEUAAACCnP+Dn/+Enf+HqP+Gp/+Fof+Gpf+IrP+Lsf+Dof+Cmv+Lsv+Mtf+Eo/+Bmf+JrP+Hqf+Env+Krv+Fo/+Pu/+Ms/+Qvv+Hqf+RwP+KsP+Fpf+Mtv+Gov+Bnf+Qv/+Nt/+Krv+Ho/+Rwf+Ouv+Emv+Amv+SxP+Sw/+NuP+Mtf/G0f6huP+Ot/+JrP+Jqv+Dnv+crf6Uqv////+QvP+PvP+Ms//J0/3p9/+Ux/+Ouf+Krf+Iqf+Fpv+/zf6WsP+MpP+RqP+Uyf+Jy//V3P6Yuf+Qqf+Rqv/5/f+Sxf+Jy/////+Lx/+Ouf+Nw/+Owv+PwP+Jr/+Jq/+VvP+Vuv/c4v+Fnf+btP+InP+Blf/3+P6Txf+Jzf+Jyf+NxP+Qwf/t8/6Svv+Tvf/O1f7Czv3T2f6cu/+qvP7a4fvo7v77/v/o9//p9//0+v////+Vy//w9//k8/+B1f/v9/+D0/+UyP/u9v+D0v/i8f+F0v/g7/+G0P+KzP+Hz/////+Lx//s8/+Puf/h7P+Mxv/w9f7q8v/q8f2RwP/r8f6JrP/t8v6RvP/l6f7////j6P6VvP/f5/7q8P7a4P/U2f6au/+ZuP+ewf+auP+iu//n6f2F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DvGBA+BrGUDc3d3Xr5+SQZj0E2ERqXIjPAJYNUbD18FoWEeDbHLPzLyQ4ePjQ5i3x1RCubfmpqkjMMNo6KOJ5uqe+f58C9GoaD29XyVSYS1h4DftKeWDDN4AbACZMZAsExEKghWUNKXWhlPfA2P1qjmUT556a9jmQotWi/VOFael1lR7ep4JfRZy8nhpwtG4wMMB/gdi9/nNH+vhezsmJ+fG5quX12fomHl6J+KFy88uA2RJyJPE4wkL4wIPBfgXxO5HxGN7zNw5W2bNnLZhio+OmaR3LD6tplrLfKeYAwX7/O6Dje/2dpniwuKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==";function Vc(i){return i*180/Math.PI}function Qc(i){le(i,"svelte-17cl35n",".floorplan__camera-position.svelte-17cl35n{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17cl35n{position:absolute;background-repeat:no-repeat;background-size:100%}")}function Oc(i){let t,e;return{c(){t=j("div"),e=j("div"),b(e,"class","floorplan__camera-rotate svelte-17cl35n"),M(e,"background-image",`url(${i[0]||It})`),M(e,"width",i[4]),M(e,"height",i[4]),M(e,"left","-"+i[4]),M(e,"top","-"+i[4]),M(e,"transform",`rotate(${i[3]}deg)`),M(e,"transform-origin",`${i[4]} ${i[4]}`),b(t,"class","floorplan__camera-position svelte-17cl35n"),M(t,"left",i[1]),M(t,"top",i[2])},m(n,o){B(n,t,o),Q(t,e)},p(n,[o]){o&1&&M(e,"background-image",`url(${n[0]||It})`)},i:J,o:J,d(n){n&&z(t)}}}function Rc(i,t,e){let{panoIndex:n}=t,{floorplanData:o}=t,{lastPanoramaLongitude:s}=t,{cameraImageUrl:r}=t;const{observers:a}=o,l=a[n],c=l.positionInImage.x,d=l.positionInImage.y,u=c*100+"%",f=d*100+"%",h=-Vc(s)+45,p=document.body.clientWidth,A=document.body.clientHeight,v=`${(p<500||A<500?17:37)/16}rem`;return i.$$set=w=>{"panoIndex"in w&&e(5,n=w.panoIndex),"floorplanData"in w&&e(6,o=w.floorplanData),"lastPanoramaLongitude"in w&&e(7,s=w.lastPanoramaLongitude),"cameraImageUrl"in w&&e(0,r=w.cameraImageUrl)},[r,u,f,h,v,n,o,s]}class Fc extends se{constructor(t){super(),oe(this,t,Rc,Oc,ie,{panoIndex:5,floorplanData:6,lastPanoramaLongitude:7,cameraImageUrl:0},Qc)}}const Gc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAMAAABdA4ieAAAC91BMVEUAAACOpP/H0P+yxP/a4/+asv/W3/+/z/+cs//S3f+mu//Q2//5+v/H1P/d5f/l6//y9f++zf/i6f+ww/+ovP/7/P/u8v/N2f+Mp//q7/+4yf+uwf+Wr/+7y/+1xv+Ho//x9P+9zP+2x/+swP+gt/+Oqf/Y4v/r8P/l7P/b4//F0/+juf+Zsv+XsP+Trf/p7v97mv9wj/+kuv+ftf/x9P92lf/3+f/I1f+5yv+Eof98m//8/f/4+f90lf+9zf/j6f/T3f/L1/+Bnv/6+/+SrP/m7P/f5v/O2v/L2P/E0v/Az//+///s8P/e5v+rv/+pvv+Anv+qvv+Pqv+Kpv+CoP93l/9xlP/z9v/p7v90lf9uj//P2//v8//o7f/k6v/K1v+6yv9rjv98nv/E0v/9/v/09//h6P/X4f9pjP/9/f/N2f/K1v/C0f+Ho/99nP/1+P9sj//6+//u8/+iuP/u8//g6P/U3v+3x/+0xv+etf+Vrv9pjf/B0P9ukf+ht/+Vr/94mP/G0/+8zP+2x//+/v/09v/W4f9ojv/c5P+xxP/d5v+xw/+vwv+Jo//g6P+nvP+SrP/R3P/1+f/W3//U3//C0P+Jp/9nh/+Kpv+Fov/Y4f/J1/+Pqf+rv/+Oqv+Oqv+muv+twP/f5//t8P97mf/h5/+twP+kuf/L2P+juP+Ipf+huP+Pqf/d5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cyu1lDKj5T/fWCH4jLaUnXMbvFyrzby8xRrayqUM2+ZWqvuM1nmpgHWkl8F9z9yG7LNa5yEMa0n8yHb93Er1oXjnoMVyFn3KQVcP7VRpFn+sDiznaiuHNufsHnkIwy7aPA/r5jbFGW3m7S12ku55WPN7Li1PPIRhN6sjtBjTmm+KmYcwPEOKs9tHF1JDHCoHLZ5DQ8yPBic9DoHjAKvsb85qjbFxHOCprMZaf5qdhlorxwGeTsPIttvPlno0y3GAZfbHp6n3ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";function Hc(i){le(i,"svelte-rpkaro",".floorplan-plugin__compass.svelte-rpkaro{position:absolute;left:50%;top:-2.875rem;width:14.4375rem;height:2.5625rem;will-change:opacity;transform-origin:center 11.5rem}.floorplan-plugin__compass-image.svelte-rpkaro{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-rpkaro{position:absolute;left:50%;top:0.9375rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.625rem;color:#fff}")}function Wc(i){let t,e,n,o,s;return{c(){t=j("div"),e=j("div"),n=te(),o=j("span"),s=Ie(i[0]),b(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),M(e,"background-image",`url(${Gc})`),b(o,"class","floorplan-plugin__compass-text svelte-rpkaro"),b(t,"class","floorplan-plugin__compass svelte-rpkaro"),M(t,"transform",i[2])},m(r,a){B(r,t,a),Q(t,e),Q(t,n),Q(t,o),Q(o,s)},p(r,a){a&1&&Le(s,r[0])},d(r){r&&z(t)}}}function Nc(i){let t,e=i[1]&&Wc(i);return{c(){e&&e.c(),t=me()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[1]&&e.p(n,o)},i:J,o:J,d(n){e&&e.d(n),n&&z(t)}}}function _c(i){return i/Math.PI*180}function Xc(i,t,e){var c;let{floorplanData:n}=t,{northDesc:o}=t;const s=(c=n.entrance)==null?void 0:c.northRad,r=typeof s=="number",l=`translateX(-50%) translateZ(10px) rotate(${-(s?_c(s):0)+90}deg)`;return i.$$set=d=>{"floorplanData"in d&&e(3,n=d.floorplanData),"northDesc"in d&&e(0,o=d.northDesc)},[o,r,l,n]}class Yc extends se{constructor(t){super(),oe(this,t,Xc,Nc,ie,{floorplanData:3,northDesc:0},Hc)}}const $t=[];function Hi(i,t=J){let e;const n=new Set;function o(a){if(ie(i,a)&&(i=a,e)){const l=!$t.length;for(const c of n)c[1](),$t.push(c,i);if(l){for(let c=0;c<$t.length;c+=2)$t[c][0]($t[c+1]);$t.length=0}}}function s(a){o(a(i))}function r(a,l=J){const c=[a,l];return n.add(c),n.size===1&&(e=t(o)||J),a(i),()=>{n.delete(c),n.size===0&&(e(),e=null)}}return{set:o,update:s,subscribe:r}}function Uc(i){le(i,"svelte-1gfoniz","img.svelte-1gfoniz{width:100%;height:100%}")}function Jc(i){let t,e;return{c(){t=j("img"),Ne(t.src,e=i[0])||b(t,"src",e),b(t,"alt","floorplan iamge"),b(t,"class","svelte-1gfoniz")},m(n,o){B(n,t,o)},p(n,[o]){o&1&&!Ne(t.src,e=n[0])&&b(t,"src",e)},i:J,o:J,d(n){n&&z(t)}}}function Zc(i,t,e){let{url:n}=t;return i.$$set=o=>{"url"in o&&e(0,n=o.url)},[n]}class qc extends se{constructor(t){super(),oe(this,t,Zc,Jc,ie,{url:0},Uc)}}function Kc(i){le(i,"svelte-ub47ya",".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}")}function $c(i){let t,e,n,o;return{c(){t=j("div"),e=new Rn(!1),n=te(),o=new Rn(!1),e.a=n,o.a=null,b(t,"class","floorplan-plugin__base-image svelte-ub47ya")},m(s,r){B(s,t,r),e.m(i[1],t),Q(t,n),o.m(i[0],t)},p(s,[r]){r&1&&o.p(s[0])},i:J,o:J,d(s){s&&z(t)}}}function ed(i,t,e){let{content:n}=t;const o=`
106
+ opacity: ${l-d*f}`}}function qn(i,{delay:t=0,speed:e,duration:n,easing:o=Kt}={}){let s=i.getTotalLength();const r=getComputedStyle(i);return r.strokeLinecap!=="butt"&&(s+=parseInt(r.strokeWidth)),n===void 0?e===void 0?n=800:n=s/e:typeof n=="function"&&(n=n(s)),{delay:t,duration:n,easing:o,css:(a,l)=>`stroke-dasharray: ${a*s} ${l*s}`}}const It="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAMAAAANf8AYAAAC2VBMVEUAAACCnP+Dn/+Enf+HqP+Gp/+Fof+Gpf+IrP+Lsf+Dof+Cmv+Lsv+Mtf+Eo/+Bmf+JrP+Hqf+Env+Krv+Fo/+Pu/+Ms/+Qvv+Hqf+RwP+KsP+Fpf+Mtv+Gov+Bnf+Qv/+Nt/+Krv+Ho/+Rwf+Ouv+Emv+Amv+SxP+Sw/+NuP+Mtf/G0f6huP+Ot/+JrP+Jqv+Dnv+crf6Uqv////+QvP+PvP+Ms//J0/3p9/+Ux/+Ouf+Krf+Iqf+Fpv+/zf6WsP+MpP+RqP+Uyf+Jy//V3P6Yuf+Qqf+Rqv/5/f+Sxf+Jy/////+Lx/+Ouf+Nw/+Owv+PwP+Jr/+Jq/+VvP+Vuv/c4v+Fnf+btP+InP+Blf/3+P6Txf+Jzf+Jyf+NxP+Qwf/t8/6Svv+Tvf/O1f7Czv3T2f6cu/+qvP7a4fvo7v77/v/o9//p9//0+v////+Vy//w9//k8/+B1f/v9/+D0/+UyP/u9v+D0v/i8f+F0v/g7/+G0P+KzP+Hz/////+Lx//s8/+Puf/h7P+Mxv/w9f7q8v/q8f2RwP/r8f6JrP/t8v6RvP/l6f7////j6P6VvP/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GdoQ0iY0a6Tt+06fKUDRQzqKw8Qlxr1AXrwNqwDvGBA+BrGUDc3d3Xr5+SQZj0E2ERqXIjPAJYNUbD18FoWEeDbHLPzLyQ4ePjQ5i3x1RCubfmpqkjMMNo6KOJ5uqe+f58C9GoaD29XyVSYS1h4DftKeWDDN4AbACZMZAsExEKghWUNKXWhlPfA2P1qjmUT556a9jmQotWi/VOFael1lR7ep4JfRZy8nhpwtG4wMMB/gdi9/nNH+vhezsmJ+fG5quX12fomHl6J+KFy88uA2RJyJPE4wkL4wIPBfgXxO5HxGN7zNw5W2bNnLZhio+OmaR3LD6tplrLfKeYAwX7/O6Dje/2dpniwuKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==";function Vc(i){return i*180/Math.PI}function Qc(i){le(i,"svelte-17cl35n",".floorplan__camera-position.svelte-17cl35n{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17cl35n{position:absolute;background-repeat:no-repeat;background-size:100%}")}function Oc(i){let t,e;return{c(){t=j("div"),e=j("div"),b(e,"class","floorplan__camera-rotate svelte-17cl35n"),M(e,"background-image",`url(${i[0]||It})`),M(e,"width",i[4]),M(e,"height",i[4]),M(e,"left","-"+i[4]),M(e,"top","-"+i[4]),M(e,"transform",`rotate(${i[3]}deg)`),M(e,"transform-origin",`${i[4]} ${i[4]}`),b(t,"class","floorplan__camera-position svelte-17cl35n"),M(t,"left",i[1]),M(t,"top",i[2])},m(n,o){B(n,t,o),Q(t,e)},p(n,[o]){o&1&&M(e,"background-image",`url(${n[0]||It})`)},i:J,o:J,d(n){n&&z(t)}}}function Rc(i,t,e){let{panoIndex:n}=t,{floorplanData:o}=t,{lastPanoramaLongitude:s}=t,{cameraImageUrl:r}=t;const{observers:a}=o,l=a[n],c=l.positionInImage.x,d=l.positionInImage.y,u=c*100+"%",f=d*100+"%",h=-Vc(s)+45,p=document.body.clientWidth,A=document.body.clientHeight,v=`${(p<500||A<500?17:37)/16}rem`;return i.$$set=w=>{"panoIndex"in w&&e(5,n=w.panoIndex),"floorplanData"in w&&e(6,o=w.floorplanData),"lastPanoramaLongitude"in w&&e(7,s=w.lastPanoramaLongitude),"cameraImageUrl"in w&&e(0,r=w.cameraImageUrl)},[r,u,f,h,v,n,o,s]}class Fc extends se{constructor(t){super(),oe(this,t,Rc,Oc,ie,{panoIndex:5,floorplanData:6,lastPanoramaLongitude:7,cameraImageUrl:0},Qc)}}const Gc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAMAAABdA4ieAAAC91BMVEUAAACOpP/H0P+yxP/a4/+asv/W3/+/z/+cs//S3f+mu//Q2//5+v/H1P/d5f/l6//y9f++zf/i6f+ww/+ovP/7/P/u8v/N2f+Mp//q7/+4yf+uwf+Wr/+7y/+1xv+Ho//x9P+9zP+2x/+swP+gt/+Oqf/Y4v/r8P/l7P/b4//F0/+juf+Zsv+XsP+Trf/p7v97mv9wj/+kuv+ftf/x9P92lf/3+f/I1f+5yv+Eof98m//8/f/4+f90lf+9zf/j6f/T3f/L1/+Bnv/6+/+SrP/m7P/f5v/O2v/L2P/E0v/Az//+///s8P/e5v+rv/+pvv+Anv+qvv+Pqv+Kpv+CoP93l/9xlP/z9v/p7v90lf9uj//P2//v8//o7f/k6v/K1v+6yv9rjv98nv/E0v/9/v/09//h6P/X4f9pjP/9/f/N2f/K1v/C0f+Ho/99nP/1+P9sj//6+//u8/+iuP/u8//g6P/U3v+3x/+0xv+etf+Vrv9pjf/B0P9ukf+ht/+Vr/94mP/G0/+8zP+2x//+/v/09v/W4f9ojv/c5P+xxP/d5v+xw/+vwv+Jo//g6P+nvP+SrP/R3P/1+f/W3//U3//C0P+Jp/9nh/+Kpv+Fov/Y4f/J1/+Pqf+rv/+Oqv+Oqv+muv+twP/f5//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bSPaEDR1fP9fVt8aPai2+f2+TlWu2l0yweZHlEO5S9cyu1lDKj5T/fWCH4jLaUnXMbvFyrzby8xRrayqUM2+ZWqvuM1nmpgHWkl8F9z9yG7LNa5yEMa0n8yHb93Er1oXjnoMVyFn3KQVcP7VRpFn+sDiznaiuHNufsHnkIwy7aPA/r5jbFGW3m7S12ku55WPN7Li1PPIRhN6sjtBjTmm+KmYcwPEOKs9tHF1JDHCoHLZ5DQ8yPBic9DoHjAKvsb85qjbFxHOCprMZaf5qdhlorxwGeTsPIttvPlno0y3GAZfbHp6n3ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";function Hc(i){le(i,"svelte-rpkaro",".floorplan-plugin__compass.svelte-rpkaro{position:absolute;left:50%;top:-2.875rem;width:14.4375rem;height:2.5625rem;will-change:opacity;transform-origin:center 11.5rem}.floorplan-plugin__compass-image.svelte-rpkaro{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-rpkaro{position:absolute;left:50%;top:0.9375rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.625rem;color:#fff}")}function Wc(i){let t,e,n,o,s;return{c(){t=j("div"),e=j("div"),n=te(),o=j("span"),s=Ie(i[0]),b(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),M(e,"background-image",`url(${Gc})`),b(o,"class","floorplan-plugin__compass-text svelte-rpkaro"),b(t,"class","floorplan-plugin__compass svelte-rpkaro"),M(t,"transform",i[2])},m(r,a){B(r,t,a),Q(t,e),Q(t,n),Q(t,o),Q(o,s)},p(r,a){a&1&&Le(s,r[0])},d(r){r&&z(t)}}}function Nc(i){let t,e=i[1]&&Wc(i);return{c(){e&&e.c(),t=me()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[1]&&e.p(n,o)},i:J,o:J,d(n){e&&e.d(n),n&&z(t)}}}function _c(i){return i/Math.PI*180}function Xc(i,t,e){var c;let{floorplanData:n}=t,{northDesc:o}=t;const s=(c=n.entrance)==null?void 0:c.northRad,r=typeof s=="number",l=`translateX(-50%) translateZ(10px) rotate(${-(s?_c(s):0)+90}deg)`;return i.$$set=d=>{"floorplanData"in d&&e(3,n=d.floorplanData),"northDesc"in d&&e(0,o=d.northDesc)},[o,r,l,n]}class Yc extends se{constructor(t){super(),oe(this,t,Xc,Nc,ie,{floorplanData:3,northDesc:0},Hc)}}const $t=[];function Hi(i,t=J){let e;const n=new Set;function o(a){if(ie(i,a)&&(i=a,e)){const l=!$t.length;for(const c of n)c[1](),$t.push(c,i);if(l){for(let c=0;c<$t.length;c+=2)$t[c][0]($t[c+1]);$t.length=0}}}function s(a){o(a(i))}function r(a,l=J){const c=[a,l];return n.add(c),n.size===1&&(e=t(o)||J),a(i),()=>{n.delete(c),n.size===0&&(e(),e=null)}}return{set:o,update:s,subscribe:r}}function Uc(i){le(i,"svelte-1gfoniz","img.svelte-1gfoniz{width:100%;height:100%}")}function Jc(i){let t,e;return{c(){t=j("img"),_e(t.src,e=i[0])||b(t,"src",e),b(t,"alt","floorplan iamge"),b(t,"class","svelte-1gfoniz")},m(n,o){B(n,t,o)},p(n,[o]){o&1&&!_e(t.src,e=n[0])&&b(t,"src",e)},i:J,o:J,d(n){n&&z(t)}}}function Zc(i,t,e){let{url:n}=t;return i.$$set=o=>{"url"in o&&e(0,n=o.url)},[n]}class qc extends se{constructor(t){super(),oe(this,t,Zc,Jc,ie,{url:0},Uc)}}function Kc(i){le(i,"svelte-ub47ya",".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}")}function $c(i){let t,e,n,o;return{c(){t=j("div"),e=new Rn(!1),n=te(),o=new Rn(!1),e.a=n,o.a=null,b(t,"class","floorplan-plugin__base-image svelte-ub47ya")},m(s,r){B(s,t,r),e.m(i[1],t),Q(t,n),o.m(i[0],t)},p(s,[r]){r&1&&o.p(s[0])},i:J,o:J,d(s){s&&z(t)}}}function ed(i,t,e){let{content:n}=t;const o=`
107
107
  <style>
108
108
  svg [type='lineGroup'] path {
109
109
  fill: #ffffff;
@@ -527,21 +527,21 @@ void main() {
527
527
  width: 100%;
528
528
  height: 100%;
529
529
  z-index: 5;
530
- `,e.container.style.pointerEvents="none";const n=g=>(e.wrapper=g,g.appendChild(e.container),l(),!0),o=g=>{e.itemLabels=sm(g),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{d(),e.container.remove()},l=()=>{var g;if(!!e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(g=e.app)==null||g.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new om({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,onlyVisibleInPanorama:e.onlyVisibleInPanorama,itemLabels:e.itemLabels,wrapper:e.wrapper,hooks:e.hooks,displayStrategyType:e.displayStrategyType,maxVisibleDistance:e.maxVisibleDistance}})}},c=()=>{i.on("modeChange",u),i.once("dispose",a)},d=()=>{i.off("modeChange",u)},u=g=>{if(g!==ue.Five.Mode.Panorama){e.fiveModeEnabled=!1,r();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=!0,s()})};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},lm={name:"ItemLabelPlugin",version:0};class cm extends ei{constructor(e){super(e);m(this,"state");m(this,"container");m(this,"enabled");this.five=e,this.five.once("dispose",this.dispose),this.enabled=!0,this.state=this.initState()}enable(e){this.enabled=!0,this.updateState(pe(H({},e),{userAction:!0}))}disable(e){this.enabled=!1,this.updateState(pe(H({},e),{userAction:!0}))}show(e){if(!!this.state.enabled)return this.setState(pe(H({},this.state),{visible:!0}),e),Promise.resolve()}hide(e){if(!!this.state.enabled)return this.setState(pe(H({},this.state),{visible:!1}),e),Promise.resolve()}dispose(){this.container.remove()}setState(e,n){if(!this.enabled)return;const o=H({},this.state);this.state=H(H(H({},this.state),e),n),this.stateChangedCallback(o,n)}get visible(){return this.five.state.mode===ue.Five.Mode.Panorama}appendTo(e){!this.enabled||(this.container=e,this.render())}updateState(e){this.setState(pe(H({},this.state),{enabled:this.enabled,visible:this.visible}),e)}}function dm(i){le(i,"svelte-wpy7pz",'.plugin-DoorLabelPlugin-item.svelte-wpy7pz.svelte-wpy7pz{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-wpy7pz.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/DoorLabel-icon.de1304ae.svg") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/arrow.6e8ec00e.svg") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}')}function um(i){let t,e,n,o,s,r,a,l;return{c(){t=j("div"),e=j("div"),n=j("span"),n.textContent=`${i[8]}`,o=te(),s=j("i"),b(n,"class","plugin-DoorLabelPlugin-txt svelte-wpy7pz"),b(s,"class","plugin-DoorLabelPlugin-icon svelte-wpy7pz"),b(e,"class",r=Oe(Je.default("plugin-DoorLabelPlugin-cnt",i[0].toward))+" svelte-wpy7pz"),b(e,"style",`transform: ${i[6]||"initial"};pointer-events: ${i[5]?"auto":"none"};opacity: ${i[5]?1:0}`),b(e,"data-camera-toward",i[7]),b(t,"style",`left: ${i[3]||0}%;top: ${i[4]||0}%;opacity: ${i[5]?1:0}`),b(t,"class","plugin-DoorLabelPlugin-item svelte-wpy7pz")},m(c,d){B(c,t,d),Q(t,e),Q(e,n),Q(e,o),Q(e,s),i[10](t),a||(l=Me(e,"click",i[9]),a=!0)},p(c,[d]){d&1&&r!==(r=Oe(Je.default("plugin-DoorLabelPlugin-cnt",c[0].toward))+" svelte-wpy7pz")&&b(e,"class",r)},i:J,o:J,d(c){c&&z(t),i[10](null),a=!1,l()}}}function fm(i,t,e){let{props:n}=t,{onClick:o}=t,s,{left:r,top:a,inSight:l,transform:c,panoIndex:d,cameraToward:u,name:f}=n,h=0;const p=()=>{if(!r||!a||!l||!s)return;const v=s.current.clientWidth/window.innerWidth*100,w=s.current.clientHeight/window.innerHeight*100;if(r<=v/2||r>=100-v/2||a<=w/2||a>=100-w/2)return;d!==h&&(console.log("panoDoorLabelPlugin",d,"\u89E6\u53D1\u57CB\u70B9"),h=d)},A=v=>{o&&o()};function g(v){ze[v?"unshift":"push"](()=>{s=v,e(2,s)})}return i.$$set=v=>{"props"in v&&e(0,n=v.props),"onClick"in v&&e(1,o=v.onClick)},p(),[n,o,s,r,a,l,c,u,f,A,g]}class hm extends se{constructor(t){super(),oe(this,t,fm,um,ie,{props:0,onClick:1},dm)}}function mm(i,t){const e=Math.abs(i.top+i.height/2-t.top-t.height/2),n=Math.abs(i.left+i.width/2-t.left-t.width/2),o=(i.height+t.height)/2,s=(i.width+t.width)/2;return!(e>o&&n>s)}function pm(i){const{camera:t}=i,e=t.getWorldDirection(new R.Vector3);let n=Math.atan(e.z/e.x)*180/Math.PI,o="";return e.x<0&&(n+=180),n<0&&(n+=360),n>315||n<=45?o="right":n>45&&n<=135?o="back":n>135&&n<=225?o="left":n>225&&n<=315&&(o="forward"),o}function gm(i,t){return Math.sqrt(Math.pow(i.z-t.z,2)+Math.pow(i.x-t.x,2))}function Am(i){const t=Math.PI/4;return i>-t&&i<=t?"left":i>t*3||i<=-t*3?"right":i>-t*3&&i<=-t?"forward":i>t&&i<=t*3?"back":""}const vm={userAction:!0};class bm extends cm{constructor(e){super(e);m(this,"MinVisibledistance",1.8);m(this,"MaxVisibledistance",5);m(this,"OffsetHeight",-1.3);m(this,"rooms");m(this,"floorplanServerData");m(this,"doorLabelItems");m(this,"visibleLabelMap",new Map);m(this,"labelItems",[]);m(this,"doorLabels");m(this,"roomObservers");m(this,"loadData",(e,n)=>{n&&(this.MaxVisibledistance=n.MaxVisibledistance,this.MinVisibledistance=n.MinVisibledistance,this.OffsetHeight=n.OffsetHeight),this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(o=>{o.$destroy()}),this.labelItems=[],this.doorLabels=[],this.doorLabelItems=[],this.floorplanServerData=e,typeof this.five.ready=="function"?this.five.ready().then(()=>this.initData()):this.five.once("panoArrived",()=>{this.initData()})});m(this,"initRoomObservers",()=>{var s,r;const e=this.floorplanServerData.computed_data.floor_datas||[],o=(((r=(s=this.five)==null?void 0:s.work)==null?void 0:r.observers)||[]).map(a=>{const l=a.panoIndex,c=a.floorIndex,d=e==null?void 0:e.find(u=>u.floor_index===c);if(d){const u=d.rooms.find(f=>f.observer_indexs.includes(l));if(u)return{panoIndex:l,floorIndex:c,name:u.name}}}).filter(Boolean);this.roomObservers=o});m(this,"hideAllLabels",()=>{this.labelItems.forEach(e=>{e.visible=!1,e.inSight=!1}),this.render()});m(this,"fixDoorVisibleAndPosition",()=>{this.initRoomObservers();const{panoIndex:e}=this.five;if(!this.visible||this.five.model.empty||e===null||!this.roomObservers.find(a=>a.panoIndex===e))return;const n=this.roomObservers.find(a=>a.panoIndex===e),s=this.five.work.observers.find(a=>a.panoIndex===e).position.clone(),r=(()=>{if(this.visibleLabelMap.has(e))return this.visibleLabelMap.get(e);{const a=[];return this.doorLabels.forEach((l,c)=>{if(l.roomName===n.name)return;const d=l.position.clone(),u=d.distanceTo(s);if(u<this.MinVisibledistance||u>this.MaxVisibledistance)return;const f=new R.Raycaster,h=d.clone().sub(s).normalize();f.set(s,h);const[p]=this.five.model.intersectRaycaster(f);p&&p.distance+.1<u||a.push(c)}),this.visibleLabelMap.set(e,a),a}})();this.labelItems.forEach((a,l)=>{a.visible=r.includes(l)}),this.fixDoorPosition()});m(this,"fixDoorPosition",()=>{var d,u,f,h,p,A,g,v,w,y,C,E;const{panoIndex:e,camera:n}=this.five;if(e===null)return;if(this.five.currentMode!=="Panorama")return this.hideAllLabels();const o=this.five.getElement(),s=o.clientWidth,r=o.clientHeight,a=n.getWorldDirection(new R.Vector3),l=[],c=[...this.labelItems];if(c.forEach((P,L)=>{if(P.visible){const D=n.position.distanceTo(P.position),T=P.position.clone().add(new R.Vector3(0,this.OffsetHeight,0)),G=T.clone().sub(n.position).normalize().angleTo(a),Y=T.clone().project(n),V=(Y.x+1)/2.2*100,I=(-Y.y+1)/2.2*100,O=V>=0&&V<=100&&I>=0&&I<=100&&D>this.MinVisibledistance&&D<=this.MaxVisibledistance;P.left=V,P.top=I,P.inSight=O&&G<Math.PI/2,P.cameraToward=pm(this.five),O?l.push({disFromCameraToLabel:D,left:V,top:I,index:L}):P.transform="translate(-50%, -50%)"}else P.inSight=!1}),l.length>1){let P=0;l.sort((L,D)=>D.disFromCameraToLabel-L.disFromCameraToLabel);for(let L=1;L<l.length;L++){const{index:D,left:T,top:W}=l[L-1],{index:G,left:Y,top:V}=l[L],I=this.container.children[D],O=this.container.children[G];if(!I||!O)return;const F={left:s*T/100,top:r*W/100,width:(f=(u=(d=I.children)==null?void 0:d[0])==null?void 0:u.clientWidth)!=null?f:0,height:(A=(p=(h=I.children)==null?void 0:h[0])==null?void 0:p.clientHeight)!=null?A:0},N={left:s*Y/100,top:r*V/100,width:(w=(v=(g=O.children)==null?void 0:g[0])==null?void 0:v.clientWidth)!=null?w:0,height:(E=(C=(y=O.children)==null?void 0:y[0])==null?void 0:C.clientHeight)!=null?E:0};mm(F,N)&&(P++,c[D].transform=`translate(-50%, ${(P-1)*100-50}%)`,c[G].transform=`translate(-50%, ${P*100-50}%)`)}}this.labelItems=c,this.render()});m(this,"onClick",(e,n)=>{if(!this.roomObservers)return;const{work:o}=this.five;let s,r,a=1/0;for(const l of o.observers)if(this.roomObservers.find(d=>d.panoIndex===l.panoIndex&&d.name===e)){const d=l.standingPosition,u=n.distanceTo(d);u<a&&(s=l.panoIndex,r=d.clone().sub(n).normalize(),a=u)}if(r!==null&&s!==null){const l={};if(a>0){const d=new R.Vector3(0,0,-1),u=r.clone(),f=new R.Quaternion;f.setFromUnitVectors(d,u);const h=new R.Euler;h.setFromQuaternion(f,"YXZ"),l.longitude=h.y}this.five.emit("wantsToMoveToPano",s,{},!0)||this.five.moveToPano(s,{longitude:l.longitude})}});m(this,"initData",()=>{var s;this.doorLabels=[];const e=this.five.panoIndex,n=this.floorplanServerData.computed_data.observers[e].floor_index,o=n!==void 0&&((s=this.floorplanServerData.computed_data.floor_datas[n])==null?void 0:s.rooms);this.rooms=o,this.rooms&&this.rooms.length>0&&this.rooms.forEach(r=>{var c;const a=(c=this.floorplanServerData.computed_data.doors)==null?void 0:c.filter(d=>!!(d&&d.name===r.name)),l=this.five.work.observers.filter((d,u)=>!!r.observer_indexs.find(f=>f===u));a&&a.forEach(d=>{const u=d.position;let f=1/0,h;l.forEach(A=>{const g=A.standingPosition,v={x:g.x,y:g.y,z:g.z},w=gm(u,v);w<f&&(f=w,h=v)}),h&&(u.y=h.y+.01);const p=new R.Vector3(u.x,u.y,u.z);p.add(new R.Vector3(-.2,1.8,0).applyEuler(new R.Euler(0,d.rad,0))),this.doorLabels.push({roomName:r.name,name:d.name,position:p,toward:Am(d.rad)})})}),this.labelItems=this.doorLabels.map(r=>pe(H({},r),{left:0,top:0,visible:!1,inSight:!1,transform:"",cameraToward:""})),this.five.on("wantsToMoveToPano",this.hideAllLabels),this.five.on("modelLoaded",this.fixDoorVisibleAndPosition),this.five.on("panoArrived",this.fixDoorVisibleAndPosition),this.five.on("initAnimationEnded",this.fixDoorPosition),this.five.on("cameraUpdate",this.fixDoorPosition),this.five.on("mouseWheel",this.fixDoorPosition),this.five.on("pinchGesture",this.fixDoorPosition),this.fixDoorVisibleAndPosition()})}stateChangedCallback(e,n){if(this.hooks.hasListener("stateChange")){const o={state:this.state,prevState:e,userAction:n?n.userAction:vm.userAction};this.hooks.emit("stateChange",o)}}render(){if(!this.enabled){this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(e=>{e==null||e.$destroy()}),this.doorLabels=void 0;return}this.doorLabelItems&&this.doorLabelItems.forEach(e=>{e.$destroy()}),this.doorLabelItems=[],this.labelItems.forEach(e=>{this.doorLabelItems.push(new hm({target:this.container,props:{props:e,onClick:()=>{this.onClick(e.name,e.position)}}}))})}initState(){return{enabled:!0,visible:!0}}dispose(){this&&this.five&&(this.five.off("wantsToMoveToPano",this.hideAllLabels),this.five.off("modelLoaded",this.fixDoorVisibleAndPosition),this.five.off("panoArrived",this.fixDoorVisibleAndPosition),this.five.off("initAnimationEnded",this.fixDoorPosition),this.five.off("cameraUpdate",this.fixDoorPosition),this.five.off("mouseWheel",this.fixDoorPosition),this.five.off("pinchGesture",this.fixDoorPosition),super.dispose())}}const ym=i=>new bm(i),wm=2,Cm=3,Pm=3,Im=2;function Em(i,t){var r,a,l;if(i.length<2)return console.warn("positionList length must be greater than 1"),[];const e=(r=t==null?void 0:t.unitWidth)!=null?r:.5,n=(a=t==null?void 0:t.unitHeight)!=null?a:.5,o=(l=t==null?void 0:t.skipPanoIndexMesh)!=null?l:!1,s=new k.CatmullRomCurve3(i,!1,"catmullrom",1);if(o){const c=Math.ceil(s.getLength()/n*1.5),d=s.getPoints(c),u=[];let f=0;const h=i;return h.forEach((p,A)=>{let g=0,v=99999999;d.forEach((P,L)=>{const D=P.distanceTo(p);D<v&&(g=L,v=D)});const w=d[g+1],y=w==null?void 0:w.distanceTo(p),C=d[g-1],E=C==null?void 0:C.distanceTo(p);if(g>f&&g-f>1){let P=g;C!==void 0&&E>.8&&(P=g+1),C!==void 0&&E>.2&&E<.3?P=g:v>.2&&v<.3&&(P=g+1);let L=f;if(w!==void 0&&y>.2&&y<.3?L=f+1:v>.2&&v<.3&&(L=f),d[L]&&d[L+1]){const W=h[A-1];if(W)if(W.equals(d[L]))L+=1;else{const G=new R.Vector3().subVectors(d[L+1],d[L]),Y=new R.Vector3().subVectors(W,d[L]);G.angleTo(Y)<Math.PI/2&&(L+=1)}}if(P<L||P-L<=1)return;const D=d.slice(L,P),T=Fr(D,e,n);u.push(T),f=g}}),u}else{const c=Math.ceil(s.getLength()),d=s.getPoints(c);return[Fr(d,e,n)]}}function Fr(i,t,e){const n=t/2,o=e/t,s=i.length,r=Ll.default(i.map(v=>[v.x,v.z])),l=(i.length-1)*wm*Cm,c=2*s,d=c*Pm,u=c*Im,f=new Uint32Array(l),h=new Float32Array(d),p=new Float32Array(u);i.forEach((v,w)=>{});let A=0;for(let v=0;v<i.length;v++){const[w,y]=r[v][0],C=i[v],{x:E,y:P,z:L}=C,D=new R.Vector3(E+w*n,P+.05,L+y*n);h[v*6+0]=D.x,h[v*6+1]=D.y,h[v*6+2]=D.z;const T=new R.Vector3(E-w*n,P+.05,L-y*n);h[v*6+3]=T.x,h[v*6+4]=T.y,h[v*6+5]=T.z,A+=v>0?i[v-1].clone().sub(i[v]).length():0;const W=A/t/o;p[v*4+0]=0,p[v*4+1]=W,p[v*4+2]=1,p[v*4+3]=W,v!==i.length-1&&(f[v*6+0]=v*2+0,f[v*6+1]=v*2+2,f[v*6+2]=v*2+1,f[v*6+3]=v*2+2,f[v*6+4]=v*2+3,f[v*6+5]=v*2+1)}const g=new k.BufferGeometry;return g.setAttribute("position",new k.BufferAttribute(h,3)),g.setAttribute("uv",new k.BufferAttribute(p,2)),g.setIndex(new k.BufferAttribute(f,1)),g}function km(i){const t=new k.TextureLoader().load(i.textureUrl);return t.wrapS=t.wrapT=k.RepeatWrapping,t.encoding=k.sRGBEncoding,new k.MeshBasicMaterial({color:16777215,map:t,transparent:!0,opacity:.8})}function xm(i){return!_e(i)}function _e(i){return i!=null}const Gr="v1.1.0",Hr="GuideLinePlugin",oo=`${Hr}@${Gr}`,Wr=i=>`${oo}--${i}`;class Nr extends Qt{constructor(e,n){super(e,n);m(this,"state",{visible:!1,enabled:!0,disposed:!1});m(this,"data");m(this,"linesGroup");m(this,"disposedErrorLog",()=>{console.error(`${oo} is disposed`)});m(this,"actionWhenEnabled",e=>{if(this.state.enabled)return e()});Object.assign(window,{[`__${Hr}_DEBUG__`]:this})}load(e,n,o=!0){return X(this,null,function*(){const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.hooks.emit("dataChange",r,s),this.data=r,this.linesGroup&&this.five.scene.remove(this.linesGroup);const a=this.getLinesGroup(r.routes,r.config);!a||(this.linesGroup=a,yield this.waitFiveModelLoaded(),this.five.scene.add(a),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),n&&this.setState(n),this.five.needsRender=!0,this.hooks.emit("dataLoaded",r),console.log(`${oo} loaded`,r))})}formatData(e){return X(this,null,function*(){return typeof e=="object"&&e!==null&&e.version&&e.data?e.data:e})}show(e){return X(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return X(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return this.disposedErrorLog();const o=H({},this.state);this.state=H(H({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),Ke(o,this.state,{deep:!0})||(this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0}),this.five.needsRender=!0)}handleEnable(e,n=!0){this.linesGroup&&(e?(this.five.scene.add(this.linesGroup),this.actionWhenEnabled(()=>this.hooks.emit("enable",{userAction:n}))):(this.five.scene.remove(this.linesGroup),this.hooks.emit("disable",{userAction:n})))}handleVisible(e,n=!0){this.linesGroup&&(e?(this.linesGroup.visible=!0,this.actionWhenEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.linesGroup.visible=!1,this.actionWhenEnabled(()=>this.hooks.emit("hide",{userAction:n}))))}handleDispose(){this.linesGroup&&this.five.scene.remove(this.linesGroup),this.hooks.emit("dispose")}getLinesGroup(e,n){const o=e.map(r=>this.getLine(r,n)).filter(_e),s=new k.Group;if(s.name=Wr("route-group"),o.length!==0)return s.add(...o),s}getLine(e,n){var l,c,d,u,f,h,p,A;const o=new k.Group,s=e.panoIndexList.map(g=>{var v;return(v=this.five.work.observers[g])==null?void 0:v.standingPosition}).filter(_e),r=Em(s,{skipPanoIndexMesh:(c=(l=e.skipPanoIndexMesh)!=null?l:n==null?void 0:n.skipPanoIndexMesh)!=null?c:!0,unitWidth:(u=(d=e.unitWidth)!=null?d:n==null?void 0:n.unitWidth)!=null?u:.6,unitHeight:(h=(f=e.unitHeight)!=null?f:n==null?void 0:n.unitHeight)!=null?h:.4});if(!r)return;const a=km({textureUrl:(A=(p=e.arrowTextureUrl)!=null?p:n==null?void 0:n.arrowTextureUrl)!=null?A:this.staticPrefix+"/release/web/arrow6.b6ce0c62.png"});return r.forEach(g=>{const v=new k.Mesh(g,a);v.name=Wr("route-line-mesh"),o.add(v)}),o}waitFiveModelLoaded(){return X(this,null,function*(){return new Promise(e=>{if(this.five.model.loaded){e();return}this.five.once("modelLoaded",()=>{e()})})})}}m(Nr,"lasestVersion",Gr);const _r=(i,t)=>new Nr(i,t);function Xr(i){const t=Math.abs(Math.cos(i.latitude));return new k.Vector3(-Math.sin(i.longitude)*t,-Math.sin(i.latitude),-Math.cos(i.longitude)*t)}function Dm(i,t){const e=Xr(i),n=Xr(t);return e.angleTo(n)}const Lm=i=>X(this,null,function*(){try{i().then(()=>{},()=>{}).catch(()=>{})}catch(t){}}),mi=Math.PI*2;function Sm(i){return i>=0&&i<mi?i:(i%mi+mi)%mi}function Mm(i){return{longitude:Sm(-Math.atan2(i.x,-i.z)),latitude:-Math.asin(i.y/1)}}function zm(i,t,e,n){const o=-i/e,s=i;return o*n+s}function Bm(i){return new Promise(t=>{setTimeout(()=>{t()},i)})}const Yr="v1.0.6",Ur="CruisePlugin",pi=`${Ur}@${Yr}`,Jr=()=>{console.error(`${pi} is disposed`)},Tm=()=>{console.warn(`${pi} is disabled`)},jm=()=>{console.error(`${pi} is disabled`)},so=new Map;class ro extends Qt{constructor(e,n){super(e,n);m(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1,config:{speedConfig:{rotateSpeed:.001,rotateSpeedUnit:"rad/ms",moveSpeed:.002,moveSpeedUnit:"m/ms"}}});m(this,"data");m(this,"config");m(this,"privateState",{playing:!1,currentPlayQueue:[],currentPlayKeyframe:null,broke:!1,disposers:[],modeChanging:!1});m(this,"GuideLine");this.config=n,Object.assign(window,{[`__${Ur}_DEBUG__`]:this});const o=this.setFiveLinearUpdateCamera.bind(this),s=this.setFiveOriginUpdateCamera.bind(this);this.hooks.on("play",o),this.hooks.on("broke",s),this.hooks.on("end",s),this.hooks.on("pause",s),this.privateState.disposers.push(()=>{this.hooks.off("play",o),this.hooks.off("broke",s),this.hooks.off("end",s),this.hooks.off("pause",s)})}load(e,n,o){return X(this,null,function*(){var d,u,f,h,p;if(this.state.disposed)return Jr();this.privateState.fiveOriginGetProgress||(u=(d=this.five.controller)==null?void 0:d.cameraMotion)!=null&&u.getProgress||(yield this.waitFiveLoaded(),this.privateState.fiveOriginGetProgress=(h=(f=this.five.controller)==null?void 0:f.cameraMotion)==null?void 0:h.getProgress),this.clear();const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.data=r,this.hooks.emit("dataChange",r,s);let a=[],l;const c=this.data.keyframes.filter(A=>A.data.panoIndex!==void 0);c.filter((A,g)=>{var v;return A.data.panoIndex!==((v=c[g-1])==null?void 0:v.data.panoIndex)}).map(A=>A.data.panoIndex).forEach(A=>{var v,w;const g=(v=this.five.work.observers[A])==null?void 0:v.floorIndex;if(g!==void 0)if(l===g){const y=a.length-1;a[y]=[...(w=a[y])!=null?w:[],A]}else{l=g;const y=a.length;a[y]=[A]}}),this.GuideLine||(this.GuideLine=_r(this.five,this.config)),(p=this.GuideLine)==null||p.load({routes:a.map(A=>({panoIndexList:A})),config:r.guildPluginOptions}),this.setState({playing:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing),this.changeSpeed(this.state.speed),n&&this.setState(n,{userAction:o}),console.log(`${pi} loaded`,r),this.hooks.emit("dataLoaded",r)})}play(e){this.setState({playing:!0},e)}playFrom(e){const{index:n,id:o,userAction:s}=e;this.state.playing&&this.setState({playing:!1},{userAction:s}),this.setState({playing:!0},{userAction:s,playFromIndex:n,playFromId:o})}playFromStart(e){return this.playFrom(pe(H({},e),{index:0}))}pause(e){this.setState({playing:!1},e)}show(e){return X(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return X(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return Jr();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return jm();const o=H({},this.state);this.state=H(H({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),e.playing!==void 0&&e.playing!==o.playing&&this.changePlayState(e.playing,n),e.speed!==void 0&&e.speed!==o.speed&&this.changeSpeed(e.speed,n==null?void 0:n.userAction),Ke(o,this.state,{deep:!0})||this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0})}formatData(e){return X(this,null,function*(){this.five.work||(yield this.waitFiveLoaded());const n=this.five.work.observers,o=(()=>{const s=e;return typeof s=="object"&&s!==null&&s.version&&s.data?s.data:s})();if(o.keyframes)return{keyframesId:He(),keyframes:o.keyframes.map((s,r)=>{var c;const a=o.keyframes[r+1],l=(()=>!a||a.start===void 0||s.end===void 0?0:a.start-s.end)();return pe(H({id:(c=s.uuid)!=null?c:He(),moveIndex:r,stay:l,index:r},s),{guildPluginOptions:o.guildPluginOptions})})};if(o.panoIndexList){let s=[];const{moveEffect:r,moveToFirstPanoEffect:a,moveToFirstPanoDuration:l}=o;return this.privateState.moveToFirstPanoEffect=a,this.privateState.moveToFirstPanoDuration=l,o.panoIndexList.forEach((c,d)=>{const u=(()=>{var g,v,w,y;const f=o.panoIndexList.slice(d).find(C=>C!==c);if(f===void 0)return;const h=(g=n[c])==null?void 0:g.position,p=(v=n[f])==null?void 0:v.position;if(!p||!h||((w=n[c])==null?void 0:w.floorIndex)!==((y=n[f])==null?void 0:y.floorIndex))return;const A=new k.Vector3().subVectors(p,h);return Mm(A)})();o.moveType===void 0||o.moveType==="justMove"?s.push({moveIndex:d,stay:o.stay,data:H({effect:"Move",panoIndex:c,moveEffect:r},u!=null?u:{})}):o.moveType==="moveAndRotate"&&(s.push({moveIndex:d,stay:o.stay,data:{effect:"Move",panoIndex:c,moveEffect:r}}),u&&s.push({moveIndex:d,stay:o.stay,data:H({effect:"Rotate",panoIndex:c},u)}))}),{keyframesId:He(),keyframes:s.map((c,d)=>H({id:He(),index:d},c)),guildPluginOptions:o.guildPluginOptions}}else throw new Error("format error: data no keyframes or no panoIndexList")})}handleEnable(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.enable(),this.hooks.emit("enable",{userAction:n})):((s=this.GuideLine)==null||s.disable(),this.changePlayState(!1,{userAction:n}),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.show(),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):((s=this.GuideLine)==null||s.hide(),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}changePlayState(e,n){this.actionIfStateIsEnabled(()=>{var o;return this.hooks.emit("playStateChange",e?"playing":"pause",{userAction:(o=n==null?void 0:n.userAction)!=null?o:!0})}),e?this.handlePlay(n):this.handlePause(n),this.state.playing=e}handlePlay(e){return X(this,null,function*(){var h;const{data:n,state:o,privateState:s,hooks:r}=this;if(s.playing||!(n!=null&&n.keyframes)||(n==null?void 0:n.keyframes.length)===0)return;const a=He();s.playId=a,s.playing=!0,s.broke=!1;const l=n.keyframes,c=this.getPauseData();(e==null?void 0:e.notEmitEvent)!==!0&&r.emit("play",{userAction:(h=e==null?void 0:e.userAction)!=null?h:!0});let d=!1;const f=yield(()=>X(this,null,function*(){var p,A;if((e==null?void 0:e.playFromIndex)!==void 0)return e.playFromIndex;if((e==null?void 0:e.playFromId)!==void 0)return(p=this.data)==null?void 0:p.keyframes.findIndex(g=>g.id===e.playFromId);if(c!=null&&c.keyframeId){const g=(A=this.data)==null?void 0:A.keyframes.find(v=>v.id===c.keyframeId);if(c!=null&&c.fiveState&&(yield this.move(c.fiveState,{moveEffect:s.moveToFirstPanoEffect,duration:s.moveToFirstPanoDuration})),g){if(g.data.effect==="Move")return g.index;if(g.data.effect==="Rotate"){const v=c.duration!==void 0?c.duration*(1-c.playedProgress):void 0;return yield this.playKeyframe(g,{duration:v}),d=!0,g.index+1}}}}))();this.clearPauseData();for(const p of l){if(s.broke||!o.playing||!s.playing||a!==s.playId)return;if(!(f!==void 0&&p.index<f))try{r.emit("playIndexChange",p.index,p),yield this.playKeyframe(p,{moveEffect:d===!1?s.moveToFirstPanoEffect:void 0,duration:d===!1&&typeof s.moveToFirstPanoDuration=="number"?s.moveToFirstPanoDuration:void 0}),p.stay&&(yield Bm(p.stay)),d===!1&&(d=!0)}catch(A){return Promise.resolve("broke")}}o.playing&&a===s.playId&&(this.setState({playing:!1},{userAction:!1}),r.emit("end"),this.clearPauseData())})}handlePause(e){var r;const{state:n,privateState:o,hooks:s}=this;n.playing=!1,o.playing!==!1&&(o.playing=!1,this.setPauseData(),o.broke||this.forceInteruptUpdateCamera(),(e==null?void 0:e.notEmitEvent)!==!0&&s.emit("pause",{userAction:(r=e==null?void 0:e.userAction)!=null?r:!0}))}playKeyframe(e,n){return X(this,null,function*(){var s;const{privateState:o}=this;return((s=this.privateState.currentPlayKeyframe)==null?void 0:s.keyframe.id)!==e.id&&(this.privateState.currentPlayKeyframe={keyframe:e}),o.currentPlayQueue.push(this.getPlayPromise(e,n)),this.actionPromiseQueue()})}addInterruptListener(e){const n=()=>{this.privateState.modeChanging||e()},o=e;return this.five.once("gesture",o),this.five.once("wantsChangeMode",n),()=>{this.five.off("gesture",o),this.five.once("wantsChangeMode",n)}}getPlayPromise(o){return X(this,arguments,function*(e,n={}){var r;const s=e.data;if(n.duration=(r=n.duration)!=null?r:e.start!==void 0&&e.end!==void 0?e.end-e.start:void 0,!!s)return new Promise((a,l)=>{let c=!1;this.addInterruptListener(()=>{if(!c)return this.hooks.emit("broke"),this.privateState.broke=!0,this.setState({playing:!1}),c=!0,l(new Error("play is interupted"))});try{if(c)return;const d=()=>{a(),c=!0};switch(s.effect){case"Move":this.move(s,n).then(d);break;case"Rotate":this.rotate(s,n).then(d);break;default:this.rotate(s,n).then(d)}}catch(d){}})})}actionPromiseQueue(){return X(this,null,function*(){const{privateState:e}=this;return new Promise((n,o)=>{if(e.currentPlayQueue.length===0){n();return}const s=e.currentPlayQueue.shift();if(!s){n();return}s.then(n,o)}).then(()=>e.currentPlayQueue.length===0?Promise.resolve():this.actionPromiseQueue())})}move(e,n){return X(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode(e);else if(e.panoIndex!==this.five.panoIndex)yield this.changePano(e,n);else return Promise.resolve()})}rotate(e,n){return X(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode({mode:e.mode,panoIndex:e.panoIndex});else if(e.panoIndex&&e.panoIndex!==this.five.panoIndex)return yield this.changePano(e,n);yield this.updateCamera(e,n)})}updateCamera(o){return X(this,arguments,function*(e,n={}){const{five:s,privateState:r,state:a}=this,l=(()=>{var h,p;const u=(h=a.config)==null?void 0:h.speedConfig,f=(p=e.rotateSpeed)!=null?p:u==null?void 0:u.rotateSpeed;if((u==null?void 0:u.rotateSpeedUnit)===void 0)return f;if(f!==void 0)return u.rotateSpeedUnit==="rad/ms"?f:f/1e3})(),c=(()=>{if(n.duration)return n.duration;if(l){const u=this.five.getCurrentState();return Dm(u,e)/l}return 800})();r.currentPlayKeyframe&&(r.currentPlayKeyframe.originDuration=c);const d=this.getSpeededDuration(c);return new Promise(u=>{Lm(()=>s.updateCamera(e,d)),setTimeout(()=>u(),d)})})}changePano(e,n){return X(this,null,function*(){const{five:o,privateState:s,state:r}=this;if(typeof e.panoIndex!="number"||e.panoIndex===o.panoIndex)return;const a=o.getCurrentState().mode!=="Panorama";a&&(this.privateState.modeChanging=!0);const l=(()=>{var f,h;const d=(f=r.config)==null?void 0:f.speedConfig,u=(h=e.moveSpeed)!=null?h:d==null?void 0:d.moveSpeed;if((d==null?void 0:d.moveSpeedUnit)===void 0)return u;if(u!==void 0)return d.moveSpeedUnit==="m/ms"?u:u/1e3})(),c=(()=>{if(n!=null&&n.duration)return n.duration;if(l&&typeof o.panoIndex=="number"&&typeof e.panoIndex=="number"){const d=o.work.observers[o.panoIndex].position,u=o.work.observers[e.panoIndex].position;return d.distanceTo(u)/l}return 800})();s.currentPlayKeyframe&&(s.currentPlayKeyframe.originDuration=c),yield new Promise(d=>{var u,f,h;o.moveToPano(e.panoIndex,{latitude:e.latitude,longitude:e.longitude,fov:e.fov,duration:this.getSpeededDuration(c),effect:(h=(f=n==null?void 0:n.moveEffect)!=null?f:(u=this.state.config)==null?void 0:u.moveEffect)!=null?h:e.moveEffect,moveCancelCallback:()=>d(),moveEndCallback:()=>d()}),a&&o.once("panoArrived",()=>d())}),a&&(this.privateState.modeChanging=!1)})}changeSpeed(e,n=!0){const{state:o,privateState:s,hooks:r}=this,{currentPlayKeyframe:a}=s;if(r.emit("speedChange",e,{userAction:n}),o.playing&&a)try{const l=a.originDuration!==void 0?a.originDuration*(1-this.getProgress()):void 0,c=this.playKeyframe(a.keyframe,{duration:l});s.currentPlayQueue.push(c)}catch(l){}}getSpeededDuration(e){return e/this.state.speed}getProgress(){return this.five.controller.cameraMotion.progress}changeMode(e,n){return X(this,null,function*(){e.mode&&e.mode!==this.five.currentMode&&(this.privateState.modeChanging=!0,yield this.five.changeMode(e.mode,e,n),this.privateState.modeChanging=!1)})}forceInteruptUpdateCamera(){this.five.updateCamera({},0)}getPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return so.get((n=this.data)==null?void 0:n.keyframesId)}setPauseData(){var e,n,o,s;if((e=this.data)!=null&&e.keyframesId)return so.set((n=this.data)==null?void 0:n.keyframesId,{keyframeId:(o=this.privateState.currentPlayKeyframe)==null?void 0:o.keyframe.id,fiveState:this.five.getCurrentState(),duration:(s=this.privateState.currentPlayKeyframe)==null?void 0:s.originDuration,playedProgress:this.getProgress()})}clearPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return so.delete((n=this.data)==null?void 0:n.keyframesId)}clear(){this.clearPauseData(),this.privateState.currentPlayKeyframe=null}handleDispose(){var e,n;this.setState({playing:!1}),this.clearPauseData(),this.clear(),(e=this.GuideLine)==null||e.dispose(),this.GuideLine=void 0,(n=this.privateState.disposers)==null||n.forEach(o=>o==null?void 0:o())}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&Tm()}waitFiveLoaded(){return X(this,null,function*(){return new Promise(e=>{if(this.five.work){e();return}this.five.once("loaded",()=>{e()})})})}setFiveLinearUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=e=>{const n=this.five.controller.cameraMotion,o=e-n.startTime;return o<0?0:o>=n.duration?1:1-zm(1,n.startVelocity,n.duration,o)})}setFiveOriginUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=this.privateState.fiveOriginGetProgress)}}m(ro,"PluginVersion",Yr);const Vm=i=>new ro(i);function Qm(i){le(i,"svelte-xuejcm",".line.svelte-xuejcm{position:absolute;pointer-events:none}.line.vertical.svelte-xuejcm{transform:rotate(-90deg) translate3d(0.03125rem, 0, 0.625rem);transform-origin:0 0}.line.horizontal.svelte-xuejcm{transform:translate3d(0, -0.03125rem, 0.625rem)}.straight-line.svelte-xuejcm{display:block;width:100%;height:100%;overflow:visible}")}function Zr(i){let t,e,n,o,s,r,a,l=i[3]&&qr(i);return{c(){t=j("div"),e=ve("svg"),n=ve("defs"),o=ve("linearGradient"),s=ve("stop"),r=ve("stop"),l&&l.c(),b(s,"offset","25%"),b(s,"stop-color",i[5]),b(s,"stop-opacity","1"),b(r,"offset","100%"),b(r,"stop-color",i[5]),b(r,"stop-opacity","0.5"),b(o,"x1",.5),b(o,"y1",.5),b(o,"x2",i[8]),b(o,"y2",.5),b(o,"id",i[10]),b(o,"gradientUnits","userSpaceOnUse"),b(e,"class","straight-line svelte-xuejcm"),b(e,"viewBox",a="0 0 "+i[8]+" "+i[7]),b(e,"preserveAspectRatio","none"),b(t,"class","line svelte-xuejcm"),ne(t,"vertical",i[9]),ne(t,"horizontal",!i[9]),M(t,"width",i[8]+"px"),M(t,"height",i[7]+"px")},m(c,d){B(c,t,d),Q(t,e),Q(e,n),Q(n,o),Q(o,s),Q(o,r),l&&l.m(e,null)},p(c,d){d&32&&b(s,"stop-color",c[5]),d&32&&b(r,"stop-color",c[5]),d&256&&b(o,"x2",c[8]),c[3]?l?(l.p(c,d),d&8&&x(l,1)):(l=qr(c),l.c(),x(l,1),l.m(e,null)):l&&(re(),S(l,1,1,()=>{l=null}),ae()),d&384&&a!==(a="0 0 "+c[8]+" "+c[7])&&b(e,"viewBox",a),d&512&&ne(t,"vertical",c[9]),d&512&&ne(t,"horizontal",!c[9]),d&256&&M(t,"width",c[8]+"px"),d&128&&M(t,"height",c[7]+"px")},d(c){c&&z(t),l&&l.d()}}}function qr(i){let t,e,n,o,s;return{c(){t=ve("path"),b(t,"fill","none"),b(t,"stroke",e=i[4]?`url(#${i[10]})`:i[5]),b(t,"stroke-width",1),b(t,"d",i[6])},m(r,a){B(r,t,a),s=!0},p(r,a){i=r,(!s||a&48&&e!==(e=i[4]?`url(#${i[10]})`:i[5]))&&b(t,"stroke",e),(!s||a&64)&&b(t,"d",i[6])},i(r){s||(r&&Se(()=>{o&&o.end(1),n=Tt(t,qn,{duration:i[2],delay:i[0],easing:vt}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=qt(t,qn,{duration:i[2],delay:i[1],easing:vt})),s=!1},d(r){r&&z(t),r&&o&&o.end()}}}function Om(i){let t,e=i[8]&&Zr(i);return{c(){e&&e.c(),t=me()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[8]?e?e.p(n,o):(e=Zr(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:J,o:J,d(n){e&&e.d(n),n&&z(t)}}}function Rm(i,t,e){let n,o,s,r,{inDelay:a=0}=t,{outDelay:l=0}=t,{duration:c=1e3}=t,{unfolded:d}=t,{length:u}=t,{direction:f="horizontal"}=t,{useLinearColor:h=!1}=t,{color:p="white"}=t;const A=He();return i.$$set=g=>{"inDelay"in g&&e(0,a=g.inDelay),"outDelay"in g&&e(1,l=g.outDelay),"duration"in g&&e(2,c=g.duration),"unfolded"in g&&e(3,d=g.unfolded),"length"in g&&e(11,u=g.length),"direction"in g&&e(12,f=g.direction),"useLinearColor"in g&&e(4,h=g.useLinearColor),"color"in g&&e(5,p=g.color)},i.$$.update=()=>{i.$$.dirty&4096&&e(9,n=f==="vertical"),i.$$.dirty&2048&&e(8,o=u),i.$$.dirty&2048&&e(6,r=`M0.5 0.5 H ${u}`)},e(7,s=1),[a,l,c,d,h,p,r,s,o,n,A,u,f]}class ao extends se{constructor(t){super(),oe(this,t,Rm,Om,ie,{inDelay:0,outDelay:1,duration:2,unfolded:3,length:11,direction:12,useLinearColor:4,color:5},Qm)}}function Fm(i){le(i,"svelte-faoauy",".shadow.svelte-faoauy{position:absolute}")}function Kr(i){let t,e,n,o,s;return{c(){t=j("div"),b(t,"class","shadow svelte-faoauy"),b(t,"style",e=`
531
- left:${Xe(i[5])};
532
- bottom:${Xe(i[6])};
533
- box-shadow: 0 0 ${Xe(i[10])} ${Xe(i[11])} rgba(0, 0, 0, ${i[12]});
530
+ `,e.container.style.pointerEvents="none";const n=g=>(e.wrapper=g,g.appendChild(e.container),l(),!0),o=g=>{e.itemLabels=sm(g),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{d(),e.container.remove()},l=()=>{var g;if(!!e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(g=e.app)==null||g.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new om({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,onlyVisibleInPanorama:e.onlyVisibleInPanorama,itemLabels:e.itemLabels,wrapper:e.wrapper,hooks:e.hooks,displayStrategyType:e.displayStrategyType,maxVisibleDistance:e.maxVisibleDistance}})}},c=()=>{i.on("modeChange",u),i.once("dispose",a)},d=()=>{i.off("modeChange",u)},u=g=>{if(g!==ue.Five.Mode.Panorama){e.fiveModeEnabled=!1,r();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=!0,s()})};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},lm={name:"ItemLabelPlugin",version:0};class cm extends ei{constructor(e){super(e);m(this,"state");m(this,"container");m(this,"enabled");this.five=e,this.five.once("dispose",this.dispose),this.enabled=!0,this.state=this.initState()}enable(e){this.enabled=!0,this.updateState(pe(H({},e),{userAction:!0}))}disable(e){this.enabled=!1,this.updateState(pe(H({},e),{userAction:!0}))}show(e){if(!!this.state.enabled)return this.setState(pe(H({},this.state),{visible:!0}),e),Promise.resolve()}hide(e){if(!!this.state.enabled)return this.setState(pe(H({},this.state),{visible:!1}),e),Promise.resolve()}dispose(){this.container.remove()}setState(e,n){if(!this.enabled)return;const o=H({},this.state);this.state=H(H(H({},this.state),e),n),this.stateChangedCallback(o,n)}get visible(){return this.five.state.mode===ue.Five.Mode.Panorama}appendTo(e){!this.enabled||(this.container=e,this.render())}updateState(e){this.setState(pe(H({},this.state),{enabled:this.enabled,visible:this.visible}),e)}}function dm(i){le(i,"svelte-wpy7pz",'.plugin-DoorLabelPlugin-item.svelte-wpy7pz.svelte-wpy7pz{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-wpy7pz.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/DoorLabel-icon.de1304ae.svg") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/arrow.6e8ec00e.svg") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}')}function um(i){let t,e,n,o,s,r,a,l;return{c(){t=j("div"),e=j("div"),n=j("span"),n.textContent=`${i[8]}`,o=te(),s=j("i"),b(n,"class","plugin-DoorLabelPlugin-txt svelte-wpy7pz"),b(s,"class","plugin-DoorLabelPlugin-icon svelte-wpy7pz"),b(e,"class",r=Oe(Je.default("plugin-DoorLabelPlugin-cnt",i[0].toward))+" svelte-wpy7pz"),b(e,"style",`transform: ${i[6]||"initial"};pointer-events: ${i[5]?"auto":"none"};opacity: ${i[5]?1:0}`),b(e,"data-camera-toward",i[7]),b(t,"style",`left: ${i[3]||0}%;top: ${i[4]||0}%;opacity: ${i[5]?1:0}`),b(t,"class","plugin-DoorLabelPlugin-item svelte-wpy7pz")},m(c,d){B(c,t,d),Q(t,e),Q(e,n),Q(e,o),Q(e,s),i[10](t),a||(l=Me(e,"click",i[9]),a=!0)},p(c,[d]){d&1&&r!==(r=Oe(Je.default("plugin-DoorLabelPlugin-cnt",c[0].toward))+" svelte-wpy7pz")&&b(e,"class",r)},i:J,o:J,d(c){c&&z(t),i[10](null),a=!1,l()}}}function fm(i,t,e){let{props:n}=t,{onClick:o}=t,s,{left:r,top:a,inSight:l,transform:c,panoIndex:d,cameraToward:u,name:f}=n,h=0;const p=()=>{if(!r||!a||!l||!s)return;const v=s.current.clientWidth/window.innerWidth*100,w=s.current.clientHeight/window.innerHeight*100;if(r<=v/2||r>=100-v/2||a<=w/2||a>=100-w/2)return;d!==h&&(console.log("panoDoorLabelPlugin",d,"\u89E6\u53D1\u57CB\u70B9"),h=d)},A=v=>{o&&o()};function g(v){ze[v?"unshift":"push"](()=>{s=v,e(2,s)})}return i.$$set=v=>{"props"in v&&e(0,n=v.props),"onClick"in v&&e(1,o=v.onClick)},p(),[n,o,s,r,a,l,c,u,f,A,g]}class hm extends se{constructor(t){super(),oe(this,t,fm,um,ie,{props:0,onClick:1},dm)}}function mm(i,t){const e=Math.abs(i.top+i.height/2-t.top-t.height/2),n=Math.abs(i.left+i.width/2-t.left-t.width/2),o=(i.height+t.height)/2,s=(i.width+t.width)/2;return!(e>o&&n>s)}function pm(i){const{camera:t}=i,e=t.getWorldDirection(new R.Vector3);let n=Math.atan(e.z/e.x)*180/Math.PI,o="";return e.x<0&&(n+=180),n<0&&(n+=360),n>315||n<=45?o="right":n>45&&n<=135?o="back":n>135&&n<=225?o="left":n>225&&n<=315&&(o="forward"),o}function gm(i,t){return Math.sqrt(Math.pow(i.z-t.z,2)+Math.pow(i.x-t.x,2))}function Am(i){const t=Math.PI/4;return i>-t&&i<=t?"left":i>t*3||i<=-t*3?"right":i>-t*3&&i<=-t?"forward":i>t&&i<=t*3?"back":""}const vm={userAction:!0};class bm extends cm{constructor(e){super(e);m(this,"MinVisibledistance",1.8);m(this,"MaxVisibledistance",5);m(this,"OffsetHeight",-1.3);m(this,"rooms");m(this,"floorplanServerData");m(this,"doorLabelItems");m(this,"visibleLabelMap",new Map);m(this,"labelItems",[]);m(this,"doorLabels");m(this,"roomObservers");m(this,"loadData",(e,n)=>{n&&(this.MaxVisibledistance=n.MaxVisibledistance,this.MinVisibledistance=n.MinVisibledistance,this.OffsetHeight=n.OffsetHeight),this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(o=>{o.$destroy()}),this.labelItems=[],this.doorLabels=[],this.doorLabelItems=[],this.floorplanServerData=e,typeof this.five.ready=="function"?this.five.ready().then(()=>this.initData()):this.five.once("panoArrived",()=>{this.initData()})});m(this,"initRoomObservers",()=>{var s,r;const e=this.floorplanServerData.computed_data.floor_datas||[],o=(((r=(s=this.five)==null?void 0:s.work)==null?void 0:r.observers)||[]).map(a=>{const l=a.panoIndex,c=a.floorIndex,d=e==null?void 0:e.find(u=>u.floor_index===c);if(d){const u=d.rooms.find(f=>f.observer_indexs.includes(l));if(u)return{panoIndex:l,floorIndex:c,name:u.name}}}).filter(Boolean);this.roomObservers=o});m(this,"hideAllLabels",()=>{this.labelItems.forEach(e=>{e.visible=!1,e.inSight=!1}),this.render()});m(this,"fixDoorVisibleAndPosition",()=>{this.initRoomObservers();const{panoIndex:e}=this.five;if(!this.visible||this.five.model.empty||e===null||!this.roomObservers.find(a=>a.panoIndex===e))return;const n=this.roomObservers.find(a=>a.panoIndex===e),s=this.five.work.observers.find(a=>a.panoIndex===e).position.clone(),r=(()=>{if(this.visibleLabelMap.has(e))return this.visibleLabelMap.get(e);{const a=[];return this.doorLabels.forEach((l,c)=>{if(l.roomName===n.name)return;const d=l.position.clone(),u=d.distanceTo(s);if(u<this.MinVisibledistance||u>this.MaxVisibledistance)return;const f=new R.Raycaster,h=d.clone().sub(s).normalize();f.set(s,h);const[p]=this.five.model.intersectRaycaster(f);p&&p.distance+.1<u||a.push(c)}),this.visibleLabelMap.set(e,a),a}})();this.labelItems.forEach((a,l)=>{a.visible=r.includes(l)}),this.fixDoorPosition()});m(this,"fixDoorPosition",()=>{var d,u,f,h,p,A,g,v,w,y,C,E;const{panoIndex:e,camera:n}=this.five;if(e===null)return;if(this.five.currentMode!=="Panorama")return this.hideAllLabels();const o=this.five.getElement(),s=o.clientWidth,r=o.clientHeight,a=n.getWorldDirection(new R.Vector3),l=[],c=[...this.labelItems];if(c.forEach((P,L)=>{if(P.visible){const D=n.position.distanceTo(P.position),T=P.position.clone().add(new R.Vector3(0,this.OffsetHeight,0)),G=T.clone().sub(n.position).normalize().angleTo(a),Y=T.clone().project(n),V=(Y.x+1)/2.2*100,I=(-Y.y+1)/2.2*100,O=V>=0&&V<=100&&I>=0&&I<=100&&D>this.MinVisibledistance&&D<=this.MaxVisibledistance;P.left=V,P.top=I,P.inSight=O&&G<Math.PI/2,P.cameraToward=pm(this.five),O?l.push({disFromCameraToLabel:D,left:V,top:I,index:L}):P.transform="translate(-50%, -50%)"}else P.inSight=!1}),l.length>1){let P=0;l.sort((L,D)=>D.disFromCameraToLabel-L.disFromCameraToLabel);for(let L=1;L<l.length;L++){const{index:D,left:T,top:W}=l[L-1],{index:G,left:Y,top:V}=l[L],I=this.container.children[D],O=this.container.children[G];if(!I||!O)return;const F={left:s*T/100,top:r*W/100,width:(f=(u=(d=I.children)==null?void 0:d[0])==null?void 0:u.clientWidth)!=null?f:0,height:(A=(p=(h=I.children)==null?void 0:h[0])==null?void 0:p.clientHeight)!=null?A:0},N={left:s*Y/100,top:r*V/100,width:(w=(v=(g=O.children)==null?void 0:g[0])==null?void 0:v.clientWidth)!=null?w:0,height:(E=(C=(y=O.children)==null?void 0:y[0])==null?void 0:C.clientHeight)!=null?E:0};mm(F,N)&&(P++,c[D].transform=`translate(-50%, ${(P-1)*100-50}%)`,c[G].transform=`translate(-50%, ${P*100-50}%)`)}}this.labelItems=c,this.render()});m(this,"onClick",(e,n)=>{if(!this.roomObservers)return;const{work:o}=this.five;let s,r,a=1/0;for(const l of o.observers)if(this.roomObservers.find(d=>d.panoIndex===l.panoIndex&&d.name===e)){const d=l.standingPosition,u=n.distanceTo(d);u<a&&(s=l.panoIndex,r=d.clone().sub(n).normalize(),a=u)}if(r!==null&&s!==null){const l={};if(a>0){const d=new R.Vector3(0,0,-1),u=r.clone(),f=new R.Quaternion;f.setFromUnitVectors(d,u);const h=new R.Euler;h.setFromQuaternion(f,"YXZ"),l.longitude=h.y}this.five.emit("wantsToMoveToPano",s,{},!0)||this.five.moveToPano(s,{longitude:l.longitude})}});m(this,"initData",()=>{var s;this.doorLabels=[];const e=this.five.panoIndex,n=this.floorplanServerData.computed_data.observers[e].floor_index,o=n!==void 0&&((s=this.floorplanServerData.computed_data.floor_datas[n])==null?void 0:s.rooms);this.rooms=o,this.rooms&&this.rooms.length>0&&this.rooms.forEach(r=>{var c;const a=(c=this.floorplanServerData.computed_data.doors)==null?void 0:c.filter(d=>!!(d&&d.name===r.name)),l=this.five.work.observers.filter((d,u)=>!!r.observer_indexs.find(f=>f===u));a&&a.forEach(d=>{const u=d.position;let f=1/0,h;l.forEach(A=>{const g=A.standingPosition,v={x:g.x,y:g.y,z:g.z},w=gm(u,v);w<f&&(f=w,h=v)}),h&&(u.y=h.y+.01);const p=new R.Vector3(u.x,u.y,u.z);p.add(new R.Vector3(-.2,1.8,0).applyEuler(new R.Euler(0,d.rad,0))),this.doorLabels.push({roomName:r.name,name:d.name,position:p,toward:Am(d.rad)})})}),this.labelItems=this.doorLabels.map(r=>pe(H({},r),{left:0,top:0,visible:!1,inSight:!1,transform:"",cameraToward:""})),this.five.on("wantsToMoveToPano",this.hideAllLabels),this.five.on("modelLoaded",this.fixDoorVisibleAndPosition),this.five.on("panoArrived",this.fixDoorVisibleAndPosition),this.five.on("initAnimationEnded",this.fixDoorPosition),this.five.on("cameraUpdate",this.fixDoorPosition),this.five.on("mouseWheel",this.fixDoorPosition),this.five.on("pinchGesture",this.fixDoorPosition),this.fixDoorVisibleAndPosition()})}stateChangedCallback(e,n){if(this.hooks.hasListener("stateChange")){const o={state:this.state,prevState:e,userAction:n?n.userAction:vm.userAction};this.hooks.emit("stateChange",o)}}render(){if(!this.enabled){this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(e=>{e==null||e.$destroy()}),this.doorLabels=void 0;return}this.doorLabelItems&&this.doorLabelItems.forEach(e=>{e.$destroy()}),this.doorLabelItems=[],this.labelItems.forEach(e=>{this.doorLabelItems.push(new hm({target:this.container,props:{props:e,onClick:()=>{this.onClick(e.name,e.position)}}}))})}initState(){return{enabled:!0,visible:!0}}dispose(){this&&this.five&&(this.five.off("wantsToMoveToPano",this.hideAllLabels),this.five.off("modelLoaded",this.fixDoorVisibleAndPosition),this.five.off("panoArrived",this.fixDoorVisibleAndPosition),this.five.off("initAnimationEnded",this.fixDoorPosition),this.five.off("cameraUpdate",this.fixDoorPosition),this.five.off("mouseWheel",this.fixDoorPosition),this.five.off("pinchGesture",this.fixDoorPosition),super.dispose())}}const ym=i=>new bm(i),wm=2,Cm=3,Pm=3,Im=2;function Em(i,t){var r,a,l;if(i.length<2)return console.warn("positionList length must be greater than 1"),[];const e=(r=t==null?void 0:t.unitWidth)!=null?r:.5,n=(a=t==null?void 0:t.unitHeight)!=null?a:.5,o=(l=t==null?void 0:t.skipPanoIndexMesh)!=null?l:!1,s=new k.CatmullRomCurve3(i,!1,"catmullrom",1);if(o){const c=Math.ceil(s.getLength()/n*1.5),d=s.getPoints(c),u=[];let f=0;const h=i;return h.forEach((p,A)=>{let g=0,v=99999999;d.forEach((P,L)=>{const D=P.distanceTo(p);D<v&&(g=L,v=D)});const w=d[g+1],y=w==null?void 0:w.distanceTo(p),C=d[g-1],E=C==null?void 0:C.distanceTo(p);if(g>f&&g-f>1){let P=g;C!==void 0&&E>.8&&(P=g+1),C!==void 0&&E>.2&&E<.3?P=g:v>.2&&v<.3&&(P=g+1);let L=f;if(w!==void 0&&y>.2&&y<.3?L=f+1:v>.2&&v<.3&&(L=f),d[L]&&d[L+1]){const W=h[A-1];if(W)if(W.equals(d[L]))L+=1;else{const G=new R.Vector3().subVectors(d[L+1],d[L]),Y=new R.Vector3().subVectors(W,d[L]);G.angleTo(Y)<Math.PI/2&&(L+=1)}}if(P<L||P-L<=1)return;const D=d.slice(L,P),T=Fr(D,e,n);u.push(T),f=g}}),u}else{const c=Math.ceil(s.getLength()),d=s.getPoints(c);return[Fr(d,e,n)]}}function Fr(i,t,e){const n=t/2,o=e/t,s=i.length,r=Ll.default(i.map(v=>[v.x,v.z])),l=(i.length-1)*wm*Cm,c=2*s,d=c*Pm,u=c*Im,f=new Uint32Array(l),h=new Float32Array(d),p=new Float32Array(u);i.forEach((v,w)=>{});let A=0;for(let v=0;v<i.length;v++){const[w,y]=r[v][0],C=i[v],{x:E,y:P,z:L}=C,D=new R.Vector3(E+w*n,P+.05,L+y*n);h[v*6+0]=D.x,h[v*6+1]=D.y,h[v*6+2]=D.z;const T=new R.Vector3(E-w*n,P+.05,L-y*n);h[v*6+3]=T.x,h[v*6+4]=T.y,h[v*6+5]=T.z,A+=v>0?i[v-1].clone().sub(i[v]).length():0;const W=A/t/o;p[v*4+0]=0,p[v*4+1]=W,p[v*4+2]=1,p[v*4+3]=W,v!==i.length-1&&(f[v*6+0]=v*2+0,f[v*6+1]=v*2+2,f[v*6+2]=v*2+1,f[v*6+3]=v*2+2,f[v*6+4]=v*2+3,f[v*6+5]=v*2+1)}const g=new k.BufferGeometry;return g.setAttribute("position",new k.BufferAttribute(h,3)),g.setAttribute("uv",new k.BufferAttribute(p,2)),g.setIndex(new k.BufferAttribute(f,1)),g}function km(i){const t=new k.TextureLoader().load(i.textureUrl);return t.wrapS=t.wrapT=k.RepeatWrapping,t.encoding=k.sRGBEncoding,new k.MeshBasicMaterial({color:16777215,map:t,transparent:!0,opacity:.8})}function xm(i){return!Xe(i)}function Xe(i){return i!=null}const Gr="v1.1.0",Hr="GuideLinePlugin",oo=`${Hr}@${Gr}`,Wr=i=>`${oo}--${i}`;class Nr extends Qt{constructor(e,n){super(e,n);m(this,"state",{visible:!1,enabled:!0,disposed:!1});m(this,"data");m(this,"linesGroup");m(this,"disposedErrorLog",()=>{console.error(`${oo} is disposed`)});m(this,"actionWhenEnabled",e=>{if(this.state.enabled)return e()});Object.assign(window,{[`__${Hr}_DEBUG__`]:this})}load(e,n,o=!0){return X(this,null,function*(){const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.hooks.emit("dataChange",r,s),this.data=r,this.linesGroup&&this.five.scene.remove(this.linesGroup);const a=this.getLinesGroup(r.routes,r.config);!a||(this.linesGroup=a,yield this.waitFiveModelLoaded(),this.five.scene.add(a),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),n&&this.setState(n),this.five.needsRender=!0,this.hooks.emit("dataLoaded",r),console.log(`${oo} loaded`,r))})}formatData(e){return X(this,null,function*(){return typeof e=="object"&&e!==null&&e.version&&e.data?e.data:e})}show(e){return X(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return X(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return this.disposedErrorLog();const o=H({},this.state);this.state=H(H({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),Ke(o,this.state,{deep:!0})||(this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0}),this.five.needsRender=!0)}handleEnable(e,n=!0){this.linesGroup&&(e?(this.five.scene.add(this.linesGroup),this.actionWhenEnabled(()=>this.hooks.emit("enable",{userAction:n}))):(this.five.scene.remove(this.linesGroup),this.hooks.emit("disable",{userAction:n})))}handleVisible(e,n=!0){this.linesGroup&&(e?(this.linesGroup.visible=!0,this.actionWhenEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.linesGroup.visible=!1,this.actionWhenEnabled(()=>this.hooks.emit("hide",{userAction:n}))))}handleDispose(){this.linesGroup&&this.five.scene.remove(this.linesGroup),this.hooks.emit("dispose")}getLinesGroup(e,n){const o=e.map(r=>this.getLine(r,n)).filter(Xe),s=new k.Group;if(s.name=Wr("route-group"),o.length!==0)return s.add(...o),s}getLine(e,n){var l,c,d,u,f,h,p,A;const o=new k.Group,s=e.panoIndexList.map(g=>{var v;return(v=this.five.work.observers[g])==null?void 0:v.standingPosition}).filter(Xe),r=Em(s,{skipPanoIndexMesh:(c=(l=e.skipPanoIndexMesh)!=null?l:n==null?void 0:n.skipPanoIndexMesh)!=null?c:!0,unitWidth:(u=(d=e.unitWidth)!=null?d:n==null?void 0:n.unitWidth)!=null?u:.6,unitHeight:(h=(f=e.unitHeight)!=null?f:n==null?void 0:n.unitHeight)!=null?h:.4});if(!r)return;const a=km({textureUrl:(A=(p=e.arrowTextureUrl)!=null?p:n==null?void 0:n.arrowTextureUrl)!=null?A:this.staticPrefix+"/release/web/arrow6.b6ce0c62.png"});return r.forEach(g=>{const v=new k.Mesh(g,a);v.name=Wr("route-line-mesh"),o.add(v)}),o}waitFiveModelLoaded(){return X(this,null,function*(){return new Promise(e=>{if(this.five.model.loaded){e();return}this.five.once("modelLoaded",()=>{e()})})})}}m(Nr,"lasestVersion",Gr);const _r=(i,t)=>new Nr(i,t);function Xr(i){const t=Math.abs(Math.cos(i.latitude));return new k.Vector3(-Math.sin(i.longitude)*t,-Math.sin(i.latitude),-Math.cos(i.longitude)*t)}function Dm(i,t){const e=Xr(i),n=Xr(t);return e.angleTo(n)}const Lm=i=>X(this,null,function*(){try{i().then(()=>{},()=>{}).catch(()=>{})}catch(t){}}),mi=Math.PI*2;function Sm(i){return i>=0&&i<mi?i:(i%mi+mi)%mi}function Mm(i){return{longitude:Sm(-Math.atan2(i.x,-i.z)),latitude:-Math.asin(i.y/1)}}function zm(i,t,e,n){const o=-i/e,s=i;return o*n+s}function Bm(i){return new Promise(t=>{setTimeout(()=>{t()},i)})}const Yr="v1.0.6",Ur="CruisePlugin",pi=`${Ur}@${Yr}`,Jr=()=>{console.error(`${pi} is disposed`)},Tm=()=>{console.warn(`${pi} is disabled`)},jm=()=>{console.error(`${pi} is disabled`)},so=new Map;class ro extends Qt{constructor(e,n){super(e,n);m(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1,config:{speedConfig:{rotateSpeed:.001,rotateSpeedUnit:"rad/ms",moveSpeed:.002,moveSpeedUnit:"m/ms"}}});m(this,"data");m(this,"config");m(this,"privateState",{playing:!1,currentPlayQueue:[],currentPlayKeyframe:null,broke:!1,disposers:[],modeChanging:!1});m(this,"GuideLine");this.config=n,Object.assign(window,{[`__${Ur}_DEBUG__`]:this});const o=this.setFiveLinearUpdateCamera.bind(this),s=this.setFiveOriginUpdateCamera.bind(this);this.hooks.on("play",o),this.hooks.on("broke",s),this.hooks.on("end",s),this.hooks.on("pause",s),this.privateState.disposers.push(()=>{this.hooks.off("play",o),this.hooks.off("broke",s),this.hooks.off("end",s),this.hooks.off("pause",s)})}load(e,n,o){return X(this,null,function*(){var d,u,f,h,p;if(this.state.disposed)return Jr();this.privateState.fiveOriginGetProgress||(u=(d=this.five.controller)==null?void 0:d.cameraMotion)!=null&&u.getProgress||(yield this.waitFiveLoaded(),this.privateState.fiveOriginGetProgress=(h=(f=this.five.controller)==null?void 0:f.cameraMotion)==null?void 0:h.getProgress),this.clear();const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.data=r,this.hooks.emit("dataChange",r,s);let a=[],l;const c=this.data.keyframes.filter(A=>A.data.panoIndex!==void 0);c.filter((A,g)=>{var v;return A.data.panoIndex!==((v=c[g-1])==null?void 0:v.data.panoIndex)}).map(A=>A.data.panoIndex).forEach(A=>{var v,w;const g=(v=this.five.work.observers[A])==null?void 0:v.floorIndex;if(g!==void 0)if(l===g){const y=a.length-1;a[y]=[...(w=a[y])!=null?w:[],A]}else{l=g;const y=a.length;a[y]=[A]}}),this.GuideLine||(this.GuideLine=_r(this.five,this.config)),(p=this.GuideLine)==null||p.load({routes:a.map(A=>({panoIndexList:A})),config:r.guildPluginOptions}),this.setState({playing:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing),this.changeSpeed(this.state.speed),n&&this.setState(n,{userAction:o}),console.log(`${pi} loaded`,r),this.hooks.emit("dataLoaded",r)})}play(e){this.setState({playing:!0},e)}playFrom(e){const{index:n,id:o,userAction:s}=e;this.state.playing&&this.setState({playing:!1},{userAction:s}),this.setState({playing:!0},{userAction:s,playFromIndex:n,playFromId:o})}playFromStart(e){return this.playFrom(pe(H({},e),{index:0}))}pause(e){this.setState({playing:!1},e)}show(e){return X(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return X(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return Jr();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return jm();const o=H({},this.state);this.state=H(H({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),e.playing!==void 0&&e.playing!==o.playing&&this.changePlayState(e.playing,n),e.speed!==void 0&&e.speed!==o.speed&&this.changeSpeed(e.speed,n==null?void 0:n.userAction),Ke(o,this.state,{deep:!0})||this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0})}formatData(e){return X(this,null,function*(){this.five.work||(yield this.waitFiveLoaded());const n=this.five.work.observers,o=(()=>{const s=e;return typeof s=="object"&&s!==null&&s.version&&s.data?s.data:s})();if(o.keyframes)return{keyframesId:He(),keyframes:o.keyframes.map((s,r)=>{var c;const a=o.keyframes[r+1],l=(()=>!a||a.start===void 0||s.end===void 0?0:a.start-s.end)();return pe(H({id:(c=s.uuid)!=null?c:He(),moveIndex:r,stay:l,index:r},s),{guildPluginOptions:o.guildPluginOptions})})};if(o.panoIndexList){let s=[];const{moveEffect:r,moveToFirstPanoEffect:a,moveToFirstPanoDuration:l}=o;return this.privateState.moveToFirstPanoEffect=a,this.privateState.moveToFirstPanoDuration=l,o.panoIndexList.forEach((c,d)=>{const u=(()=>{var g,v,w,y;const f=o.panoIndexList.slice(d).find(C=>C!==c);if(f===void 0)return;const h=(g=n[c])==null?void 0:g.position,p=(v=n[f])==null?void 0:v.position;if(!p||!h||((w=n[c])==null?void 0:w.floorIndex)!==((y=n[f])==null?void 0:y.floorIndex))return;const A=new k.Vector3().subVectors(p,h);return Mm(A)})();o.moveType===void 0||o.moveType==="justMove"?s.push({moveIndex:d,stay:o.stay,data:H({effect:"Move",panoIndex:c,moveEffect:r},u!=null?u:{})}):o.moveType==="moveAndRotate"&&(s.push({moveIndex:d,stay:o.stay,data:{effect:"Move",panoIndex:c,moveEffect:r}}),u&&s.push({moveIndex:d,stay:o.stay,data:H({effect:"Rotate",panoIndex:c},u)}))}),{keyframesId:He(),keyframes:s.map((c,d)=>H({id:He(),index:d},c)),guildPluginOptions:o.guildPluginOptions}}else throw new Error("format error: data no keyframes or no panoIndexList")})}handleEnable(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.enable(),this.hooks.emit("enable",{userAction:n})):((s=this.GuideLine)==null||s.disable(),this.changePlayState(!1,{userAction:n}),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.show(),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):((s=this.GuideLine)==null||s.hide(),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}changePlayState(e,n){this.actionIfStateIsEnabled(()=>{var o;return this.hooks.emit("playStateChange",e?"playing":"pause",{userAction:(o=n==null?void 0:n.userAction)!=null?o:!0})}),e?this.handlePlay(n):this.handlePause(n),this.state.playing=e}handlePlay(e){return X(this,null,function*(){var h;const{data:n,state:o,privateState:s,hooks:r}=this;if(s.playing||!(n!=null&&n.keyframes)||(n==null?void 0:n.keyframes.length)===0)return;const a=He();s.playId=a,s.playing=!0,s.broke=!1;const l=n.keyframes,c=this.getPauseData();(e==null?void 0:e.notEmitEvent)!==!0&&r.emit("play",{userAction:(h=e==null?void 0:e.userAction)!=null?h:!0});let d=!1;const f=yield(()=>X(this,null,function*(){var p,A;if((e==null?void 0:e.playFromIndex)!==void 0)return e.playFromIndex;if((e==null?void 0:e.playFromId)!==void 0)return(p=this.data)==null?void 0:p.keyframes.findIndex(g=>g.id===e.playFromId);if(c!=null&&c.keyframeId){const g=(A=this.data)==null?void 0:A.keyframes.find(v=>v.id===c.keyframeId);if(c!=null&&c.fiveState&&(yield this.move(c.fiveState,{moveEffect:s.moveToFirstPanoEffect,duration:s.moveToFirstPanoDuration})),g){if(g.data.effect==="Move")return g.index;if(g.data.effect==="Rotate"){const v=c.duration!==void 0?c.duration*(1-c.playedProgress):void 0;return yield this.playKeyframe(g,{duration:v}),d=!0,g.index+1}}}}))();this.clearPauseData();for(const p of l){if(s.broke||!o.playing||!s.playing||a!==s.playId)return;if(!(f!==void 0&&p.index<f))try{r.emit("playIndexChange",p.index,p),yield this.playKeyframe(p,{moveEffect:d===!1?s.moveToFirstPanoEffect:void 0,duration:d===!1&&typeof s.moveToFirstPanoDuration=="number"?s.moveToFirstPanoDuration:void 0}),p.stay&&(yield Bm(p.stay)),d===!1&&(d=!0)}catch(A){return Promise.resolve("broke")}}o.playing&&a===s.playId&&(this.setState({playing:!1},{userAction:!1}),r.emit("end"),this.clearPauseData())})}handlePause(e){var r;const{state:n,privateState:o,hooks:s}=this;n.playing=!1,o.playing!==!1&&(o.playing=!1,this.setPauseData(),o.broke||this.forceInteruptUpdateCamera(),(e==null?void 0:e.notEmitEvent)!==!0&&s.emit("pause",{userAction:(r=e==null?void 0:e.userAction)!=null?r:!0}))}playKeyframe(e,n){return X(this,null,function*(){var s;const{privateState:o}=this;return((s=this.privateState.currentPlayKeyframe)==null?void 0:s.keyframe.id)!==e.id&&(this.privateState.currentPlayKeyframe={keyframe:e}),o.currentPlayQueue.push(this.getPlayPromise(e,n)),this.actionPromiseQueue()})}addInterruptListener(e){const n=()=>{this.privateState.modeChanging||e()},o=e;return this.five.once("gesture",o),this.five.once("wantsChangeMode",n),()=>{this.five.off("gesture",o),this.five.once("wantsChangeMode",n)}}getPlayPromise(o){return X(this,arguments,function*(e,n={}){var r;const s=e.data;if(n.duration=(r=n.duration)!=null?r:e.start!==void 0&&e.end!==void 0?e.end-e.start:void 0,!!s)return new Promise((a,l)=>{let c=!1;this.addInterruptListener(()=>{if(!c)return this.hooks.emit("broke"),this.privateState.broke=!0,this.setState({playing:!1}),c=!0,l(new Error("play is interupted"))});try{if(c)return;const d=()=>{a(),c=!0};switch(s.effect){case"Move":this.move(s,n).then(d);break;case"Rotate":this.rotate(s,n).then(d);break;default:this.rotate(s,n).then(d)}}catch(d){}})})}actionPromiseQueue(){return X(this,null,function*(){const{privateState:e}=this;return new Promise((n,o)=>{if(e.currentPlayQueue.length===0){n();return}const s=e.currentPlayQueue.shift();if(!s){n();return}s.then(n,o)}).then(()=>e.currentPlayQueue.length===0?Promise.resolve():this.actionPromiseQueue())})}move(e,n){return X(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode(e);else if(e.panoIndex!==this.five.panoIndex)yield this.changePano(e,n);else return Promise.resolve()})}rotate(e,n){return X(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode({mode:e.mode,panoIndex:e.panoIndex});else if(e.panoIndex&&e.panoIndex!==this.five.panoIndex)return yield this.changePano(e,n);yield this.updateCamera(e,n)})}updateCamera(o){return X(this,arguments,function*(e,n={}){const{five:s,privateState:r,state:a}=this,l=(()=>{var h,p;const u=(h=a.config)==null?void 0:h.speedConfig,f=(p=e.rotateSpeed)!=null?p:u==null?void 0:u.rotateSpeed;if((u==null?void 0:u.rotateSpeedUnit)===void 0)return f;if(f!==void 0)return u.rotateSpeedUnit==="rad/ms"?f:f/1e3})(),c=(()=>{if(n.duration)return n.duration;if(l){const u=this.five.getCurrentState();return Dm(u,e)/l}return 800})();r.currentPlayKeyframe&&(r.currentPlayKeyframe.originDuration=c);const d=this.getSpeededDuration(c);return new Promise(u=>{Lm(()=>s.updateCamera(e,d)),setTimeout(()=>u(),d)})})}changePano(e,n){return X(this,null,function*(){const{five:o,privateState:s,state:r}=this;if(typeof e.panoIndex!="number"||e.panoIndex===o.panoIndex)return;const a=o.getCurrentState().mode!=="Panorama";a&&(this.privateState.modeChanging=!0);const l=(()=>{var f,h;const d=(f=r.config)==null?void 0:f.speedConfig,u=(h=e.moveSpeed)!=null?h:d==null?void 0:d.moveSpeed;if((d==null?void 0:d.moveSpeedUnit)===void 0)return u;if(u!==void 0)return d.moveSpeedUnit==="m/ms"?u:u/1e3})(),c=(()=>{if(n!=null&&n.duration)return n.duration;if(l&&typeof o.panoIndex=="number"&&typeof e.panoIndex=="number"){const d=o.work.observers[o.panoIndex].position,u=o.work.observers[e.panoIndex].position;return d.distanceTo(u)/l}return 800})();s.currentPlayKeyframe&&(s.currentPlayKeyframe.originDuration=c),yield new Promise(d=>{var u,f,h;o.moveToPano(e.panoIndex,{latitude:e.latitude,longitude:e.longitude,fov:e.fov,duration:this.getSpeededDuration(c),effect:(h=(f=n==null?void 0:n.moveEffect)!=null?f:(u=this.state.config)==null?void 0:u.moveEffect)!=null?h:e.moveEffect,moveCancelCallback:()=>d(),moveEndCallback:()=>d()}),a&&o.once("panoArrived",()=>d())}),a&&(this.privateState.modeChanging=!1)})}changeSpeed(e,n=!0){const{state:o,privateState:s,hooks:r}=this,{currentPlayKeyframe:a}=s;if(r.emit("speedChange",e,{userAction:n}),o.playing&&a)try{const l=a.originDuration!==void 0?a.originDuration*(1-this.getProgress()):void 0,c=this.playKeyframe(a.keyframe,{duration:l});s.currentPlayQueue.push(c)}catch(l){}}getSpeededDuration(e){return e/this.state.speed}getProgress(){return this.five.controller.cameraMotion.progress}changeMode(e,n){return X(this,null,function*(){e.mode&&e.mode!==this.five.currentMode&&(this.privateState.modeChanging=!0,yield this.five.changeMode(e.mode,e,n),this.privateState.modeChanging=!1)})}forceInteruptUpdateCamera(){this.five.updateCamera({},0)}getPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return so.get((n=this.data)==null?void 0:n.keyframesId)}setPauseData(){var e,n,o,s;if((e=this.data)!=null&&e.keyframesId)return so.set((n=this.data)==null?void 0:n.keyframesId,{keyframeId:(o=this.privateState.currentPlayKeyframe)==null?void 0:o.keyframe.id,fiveState:this.five.getCurrentState(),duration:(s=this.privateState.currentPlayKeyframe)==null?void 0:s.originDuration,playedProgress:this.getProgress()})}clearPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return so.delete((n=this.data)==null?void 0:n.keyframesId)}clear(){this.clearPauseData(),this.privateState.currentPlayKeyframe=null}handleDispose(){var e,n;this.setState({playing:!1}),this.clearPauseData(),this.clear(),(e=this.GuideLine)==null||e.dispose(),this.GuideLine=void 0,(n=this.privateState.disposers)==null||n.forEach(o=>o==null?void 0:o())}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&Tm()}waitFiveLoaded(){return X(this,null,function*(){return new Promise(e=>{if(this.five.work){e();return}this.five.once("loaded",()=>{e()})})})}setFiveLinearUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=e=>{const n=this.five.controller.cameraMotion,o=e-n.startTime;return o<0?0:o>=n.duration?1:1-zm(1,n.startVelocity,n.duration,o)})}setFiveOriginUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=this.privateState.fiveOriginGetProgress)}}m(ro,"PluginVersion",Yr);const Vm=i=>new ro(i);function Qm(i){le(i,"svelte-xuejcm",".line.svelte-xuejcm{position:absolute;pointer-events:none}.line.vertical.svelte-xuejcm{transform:rotate(-90deg) translate3d(0.03125rem, 0, 0.625rem);transform-origin:0 0}.line.horizontal.svelte-xuejcm{transform:translate3d(0, -0.03125rem, 0.625rem)}.straight-line.svelte-xuejcm{display:block;width:100%;height:100%;overflow:visible}")}function Zr(i){let t,e,n,o,s,r,a,l=i[3]&&qr(i);return{c(){t=j("div"),e=ve("svg"),n=ve("defs"),o=ve("linearGradient"),s=ve("stop"),r=ve("stop"),l&&l.c(),b(s,"offset","25%"),b(s,"stop-color",i[5]),b(s,"stop-opacity","1"),b(r,"offset","100%"),b(r,"stop-color",i[5]),b(r,"stop-opacity","0.5"),b(o,"x1",.5),b(o,"y1",.5),b(o,"x2",i[8]),b(o,"y2",.5),b(o,"id",i[10]),b(o,"gradientUnits","userSpaceOnUse"),b(e,"class","straight-line svelte-xuejcm"),b(e,"viewBox",a="0 0 "+i[8]+" "+i[7]),b(e,"preserveAspectRatio","none"),b(t,"class","line svelte-xuejcm"),ne(t,"vertical",i[9]),ne(t,"horizontal",!i[9]),M(t,"width",i[8]+"px"),M(t,"height",i[7]+"px")},m(c,d){B(c,t,d),Q(t,e),Q(e,n),Q(n,o),Q(o,s),Q(o,r),l&&l.m(e,null)},p(c,d){d&32&&b(s,"stop-color",c[5]),d&32&&b(r,"stop-color",c[5]),d&256&&b(o,"x2",c[8]),c[3]?l?(l.p(c,d),d&8&&x(l,1)):(l=qr(c),l.c(),x(l,1),l.m(e,null)):l&&(re(),S(l,1,1,()=>{l=null}),ae()),d&384&&a!==(a="0 0 "+c[8]+" "+c[7])&&b(e,"viewBox",a),d&512&&ne(t,"vertical",c[9]),d&512&&ne(t,"horizontal",!c[9]),d&256&&M(t,"width",c[8]+"px"),d&128&&M(t,"height",c[7]+"px")},d(c){c&&z(t),l&&l.d()}}}function qr(i){let t,e,n,o,s;return{c(){t=ve("path"),b(t,"fill","none"),b(t,"stroke",e=i[4]?`url(#${i[10]})`:i[5]),b(t,"stroke-width",1),b(t,"d",i[6])},m(r,a){B(r,t,a),s=!0},p(r,a){i=r,(!s||a&48&&e!==(e=i[4]?`url(#${i[10]})`:i[5]))&&b(t,"stroke",e),(!s||a&64)&&b(t,"d",i[6])},i(r){s||(r&&Se(()=>{o&&o.end(1),n=Tt(t,qn,{duration:i[2],delay:i[0],easing:vt}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=qt(t,qn,{duration:i[2],delay:i[1],easing:vt})),s=!1},d(r){r&&z(t),r&&o&&o.end()}}}function Om(i){let t,e=i[8]&&Zr(i);return{c(){e&&e.c(),t=me()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[8]?e?e.p(n,o):(e=Zr(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:J,o:J,d(n){e&&e.d(n),n&&z(t)}}}function Rm(i,t,e){let n,o,s,r,{inDelay:a=0}=t,{outDelay:l=0}=t,{duration:c=1e3}=t,{unfolded:d}=t,{length:u}=t,{direction:f="horizontal"}=t,{useLinearColor:h=!1}=t,{color:p="white"}=t;const A=He();return i.$$set=g=>{"inDelay"in g&&e(0,a=g.inDelay),"outDelay"in g&&e(1,l=g.outDelay),"duration"in g&&e(2,c=g.duration),"unfolded"in g&&e(3,d=g.unfolded),"length"in g&&e(11,u=g.length),"direction"in g&&e(12,f=g.direction),"useLinearColor"in g&&e(4,h=g.useLinearColor),"color"in g&&e(5,p=g.color)},i.$$.update=()=>{i.$$.dirty&4096&&e(9,n=f==="vertical"),i.$$.dirty&2048&&e(8,o=u),i.$$.dirty&2048&&e(6,r=`M0.5 0.5 H ${u}`)},e(7,s=1),[a,l,c,d,h,p,r,s,o,n,A,u,f]}class ao extends se{constructor(t){super(),oe(this,t,Rm,Om,ie,{inDelay:0,outDelay:1,duration:2,unfolded:3,length:11,direction:12,useLinearColor:4,color:5},Qm)}}function Fm(i){le(i,"svelte-faoauy",".shadow.svelte-faoauy{position:absolute}")}function Kr(i){let t,e,n,o,s;return{c(){t=j("div"),b(t,"class","shadow svelte-faoauy"),b(t,"style",e=`
531
+ left:${Ye(i[5])};
532
+ bottom:${Ye(i[6])};
533
+ box-shadow: 0 0 ${Ye(i[10])} ${Ye(i[11])} rgba(0, 0, 0, ${i[12]});
534
534
  ${i[8]?"transform: translateX(-50%); left: 50%":""}
535
535
  ${i[9]?"transform: translateX(-50%); top: 50%":""}
536
536
  ${i[7]?"transform: translate(-50%, -50%); left: 50%; top: 50%;":""}
537
- `),M(t,"width",Xe(i[3])),M(t,"height",Xe(i[4])),M(t,"z-index",i[13])},m(r,a){B(r,t,a),s=!0},p(r,a){i=r,(!s||a&8160&&e!==(e=`
538
- left:${Xe(i[5])};
539
- bottom:${Xe(i[6])};
540
- box-shadow: 0 0 ${Xe(i[10])} ${Xe(i[11])} rgba(0, 0, 0, ${i[12]});
537
+ `),M(t,"width",Ye(i[3])),M(t,"height",Ye(i[4])),M(t,"z-index",i[13])},m(r,a){B(r,t,a),s=!0},p(r,a){i=r,(!s||a&8160&&e!==(e=`
538
+ left:${Ye(i[5])};
539
+ bottom:${Ye(i[6])};
540
+ box-shadow: 0 0 ${Ye(i[10])} ${Ye(i[11])} rgba(0, 0, 0, ${i[12]});
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&&M(t,"width",Xe(i[3])),a&16&&M(t,"height",Xe(i[4])),a&8192&&M(t,"z-index",i[13])},i(r){s||(r&&Se(()=>{o&&o.end(1),n=Tt(t,Vt,{duration:i[0]}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=qt(t,Vt,{duration:i[1]})),s=!1},d(r){r&&z(t),r&&o&&o.end()}}}function Gm(i){let t,e=i[2]&&Kr(i);return{c(){e&&e.c(),t=me()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&x(e,1)):(e=Kr(n),e.c(),x(e,1),e.m(t.parentNode,t)):e&&(re(),S(e,1,1,()=>{e=null}),ae())},i(n){x(e)},o(n){S(e)},d(n){e&&e.d(n),n&&z(t)}}}function Xe(i){return typeof i=="number"?i/16+"rem":i}function Hm(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:d=!1}=t,{horizontalCenter:u=!1}=t,{verticalCenter:f=!1}=t,{blurRadius:h}=t,{spreadRadius:p}=t,{opacity:A=.15}=t,{zIndex:g=-1}=t;return i.$$set=v=>{"inDelay"in v&&e(0,n=v.inDelay),"outDelay"in v&&e(1,o=v.outDelay),"visible"in v&&e(2,s=v.visible),"width"in v&&e(3,r=v.width),"height"in v&&e(4,a=v.height),"left"in v&&e(5,l=v.left),"bottom"in v&&e(6,c=v.bottom),"center"in v&&e(7,d=v.center),"horizontalCenter"in v&&e(8,u=v.horizontalCenter),"verticalCenter"in v&&e(9,f=v.verticalCenter),"blurRadius"in v&&e(10,h=v.blurRadius),"spreadRadius"in v&&e(11,p=v.spreadRadius),"opacity"in v&&e(12,A=v.opacity),"zIndex"in v&&e(13,g=v.zIndex)},[n,o,s,r,a,l,c,d,u,f,h,p,A,g]}class et extends se{constructor(t){super(),oe(this,t,Hm,Gm,ie,{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},Fm)}}function Wm(i,t){t.forEach(e=>{const n=new k.SphereGeometry(.02,16,16),o=[],s=[new k.MeshBasicMaterial({color:16776960}),new k.MeshBasicMaterial({color:16711935}),new k.MeshBasicMaterial({color:16711680}),new k.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new k.Mesh(n,l);c.position.copy(ot(r)),o.push(c)});else{const r=s[0],a=new k.Mesh(n,r);a.position.copy(ot(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const Be=i=>i;function lo(i){if(i.length<3)return;const t=i.map(hn),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}var $r=(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))($r||{}),ea=(i=>(i.Two="2D",i.Three="3D",i))(ea||{}),ta=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(ta||{});function Nm(i){return i.stickType==="2DPoint"||i.stickType==="3DPoint"}function _m(i){return i.stickType==="3DPoint"||i.stickType==="Plane"}function Ye(i){return i.stickType==="Model"&&i.contentType==="MediaModel"}function co(i){if(Array.isArray(i)&&i.length===4){const e=i.map(hn);return ki(e[0],e[2])}else return hn(i)}function na(i){if(Nm(i))return ot(i==null?void 0:i.position);if(Ye(i)&&i.matrix){const t=new R.Matrix4().fromArray(i.matrix),e=i.data.mediaPosition.map(n=>new R.Vector3().fromArray(n).applyMatrix4(t));return ki(e[0],e[2])}else return co(i.position)}function yn(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 Xm(i){return new Promise(t=>{i.model.loaded?t():i.once("modelLoaded",()=>t())})}function Ym(i,t,e){const o=new k.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new k.Vector3(0,1,0)).setLength(.01),r=new k.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 k.Vector3))}const ia=(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 Um(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function Jm(i,t){const[e,n]=t;if(e>=n||n<=1||e<=1)return-1;const o={},s=r=>(o[r]||(o[r]=i(r)),o[r]);for(let r=e;r<n;r++){const a=s(r),l=s(r-1);if(a<l)return r}return-1}function oa(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 Zm(){return Math.random().toString(36).slice(-6)}const uo=Zm();function qm(i){le(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function sa(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 Km(i){let t,e=i[0]+"",n,o=i[20];const s=()=>i[9](t,o),r=()=>i[9](null,o);return{c(){t=j("span"),n=Ie(e),b(t,"class","text-char svelte-1b2n9wi")},m(a,l){B(a,t,l),Q(t,n),s()},p(a,l){i=a,l&4&&e!==(e=i[0]+"")&&Le(n,e),o!==i[20]&&(r(),o=i[20],s())},d(a){a&&z(t),r()}}}function $m(i){let t,e=i[20];const n=()=>i[8](t,e),o=()=>i[8](null,e);return{c(){t=j("span"),t.textContent="\xA0",b(t,"class","text-char svelte-1b2n9wi")},m(s,r){B(s,t,r),n()},p(s,r){i=s,e!==i[20]&&(o(),e=i[20],n())},d(s){s&&z(t),o()}}}function ra(i,t){let e,n;function o(a,l){return a[0]===a[3]?$m:Km}let s=o(t),r=s(t);return{key:i,first:null,c(){e=me(),r.c(),n=me(),this.first=e},m(a,l){B(a,e,l),r.m(a,l),B(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&&z(e),r.d(a),a&&z(n)}}}function ep(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=sa(i,o,r),l=s(a);e.set(l,t[r]=ra(l,a))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();n=me()},m(r,a){for(let l=0;l<t.length;l+=1)t[l].m(r,a);B(r,n,a)},p(r,[a]){a&14&&(o=r[2],t=qe(t,a,s,1,r,o,e,n.parentNode,Fi,ra,n,sa))},i:J,o:J,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&z(n)}}}function tp(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_${uo}__`,d=`__EMOJI_${uo}__`,u=`__SPACE_${uo}__`;let f,h,p=[];function A(E){const P=[],L=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 E.slice().replace(L,D=>`${c}${d}${D}${c}`).split(c).forEach(D=>D.startsWith(d)?P.push({id:He(),content:D.slice(d.length)}):P.push(...D.split("").map(T=>T===" "?u:T).map(T=>({id:He(),content:T})))),P}function g(){if(!h)return;const E=!a;h.reversed!==E&&h.reverse(),h.play()}function v(E){if(l){e(4,l=!1);return}clearTimeout(f),f=setTimeout(g,E?o:s)}function w(E){const P=function(){const L=Jm(D=>E[D].getBoundingClientRect().x,[Math.min(E.length-1,10),Math.min(E.length-1,30)]);if(L>0)return L}();h=Mo.default({targets:E.slice(0,P).filter(_e),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:Mo.default.stagger(50),easing:"easeInOutCubic"}),a&&h.seek(h.duration)}function y(E,P){ze[E?"unshift":"push"](()=>{p[P]=E,e(1,p)})}function C(E,P){ze[E?"unshift":"push"](()=>{p[P]=E,e(1,p)})}return i.$$set=E=>{"inDelay"in E&&e(5,o=E.inDelay),"outDelay"in E&&e(6,s=E.outDelay),"content"in E&&e(0,r=E.content),"unfolded"in E&&e(7,a=E.unfolded),"isFistUnfoldedUpdate"in E&&e(4,l=E.isFistUnfoldedUpdate)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=A(r)),i.$$.dirty&128&&v(a),i.$$.dirty&2&&w(p.filter(E=>!!E))},[r,p,n,u,l,o,s,a,y,C]}class aa extends se{constructor(t){super(),oe(this,t,tp,ep,ie,{inDelay:5,outDelay:6,content:0,unfolded:7,isFistUnfoldedUpdate:4},qm)}}const np="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcUNSe2/Z9yISiSGxRkUAy4BGZSVX168gistraYsQKxArECsQKxApYqkDyU5lmsznMM+ZgAGpQhaUkSRbINgLJCXiCBtSgAkVYtGGIBTKj8AgKSVahDNvQa0IUkUG4Bx91BpLdBTOS/cgUIB3a+gMwI9mFzE3a0I3z5B4r292JzGVA8tSSZILMcUDyzIykthOZvYDk+V9Ktmz4yGzhOhV4/+5YU4N/hzqo0StX3Fg5TcnNlYvgs8bPsM4hkScHoyO46haRnGEYktQVI+4ypUYKyXtxyUu27JCceAMJvjo0HoM5CEZ7cPX7i013q3IWVV5r2aw/2TK+svWbPGU68KQCa6pYeus1V0X99quSfvtVSc39lmfz2mdbz32tg1dAJ0421AVs9E7/FxBSezrMmjI/gm5/nYmMkBq+TqBs7LNgTlZH6EnWlPmORdk+pHQipUNfTxtg7p3NIXWRMvXfoqusmXsNhpC6crIS1Zf9C6yAOdlxpK5BW18CiT7A/G93gE+P0FY/RoO+RWqS62YhB2r4YhlixArECsQKxArECvzjCnwAOr0wF44ggHAAAAAASUVORK5CYII=",ip="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAACoCAMAAAD6pITnAAABQVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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cBj9ihKo9o+l1euiWGxSE5eun3na6jxQk3joEgdQ7TR+FWutE43lhQpph3sQvISAVRa9ppRzipY4gZqdw8/WigIWDWt1gD8EIsqSLlT/KPUVlKSAujs2XTLYeRHiIlA2DVi1qkRtK8PSULaEDF+Ue7ashwkTlf8DQc/cITdx9+UAAAAASUVORK5CYII=",sp="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+ekHVxbWhnRC8nDLc9s8oAAAOGSURBVEjHpdd3X9pAGAfwkBBDAoQmBJmWvUWWiIDIHoJb66x7a4d78Op7pBQ1J5DY33987vnyXEIu3CGy/0hvnDthM+l0hj3JScSudDKOdhNPpl1i8Ut624Gi6+trI3zW1tcdqGM7/SIC5/ZRR2SNJEm7JkHt7FAJjR18WIs40P3cAFxIOaIRna6ZOHxGunk+TDR1ukjUkSr0w86bcKShiz1OI4JMP8YAD9+4emM2Gm407IfIhzm0NxrhKNsLH4SvQ+RktyvUfZIMXYcPPsSFCcvY6EYW6ZPsxuiYZaLwAW5bDY70Da5paxjvm8d+UcjAUL/GzPtCnDF/mwFWhJ75Zs68x05gxxFRGQfa+RYXokHVCC4O4yOqYLTwBjNB+ncWEZnsbzrIvOLz4CW9g4jODn0ZPO/iZN0UmhaPp0Omq+Q/nLu6NO0hErJnurjKdTBzEdAhkqILXDAdbFkJ7EnDe4EVy198srpiwhE4X1RKDFOqviBwcNPK6gmPmeWlGDz+VdHqRPEVHo0tLTM8RpcX4G+flLe6kU/Cs1pYRnm8uriQhfoC+0ZDvbMLi6ttfO5fDCDCKFrvooAKAov+c4BZvy8EzaolCHRdIZ+fBThl9G0Ih1RCrBJWbPiMKYAZ409oMSqFWAktzJ9GBuDvRoVGOIQJMSas0CiM39u45v0M9tbaeLc6F5M+7dhcbRfgg+pcU/oNa85VDwDOzBtmpP9UKsN8BuCzeb1P+kPi08+fASyr6fVPUh/PJ72+xj/bZk5PSV0YlJ4z83iC4EipS5LkiAkeHxGcQerLwMARRzyW+QklhUgKpST8nXfYg+fHkjS89MPz0MFnhKdCSWpc8RBnPAZB3RUvLt7i3oob7f5juDzuikY81tjcHlcHg9xabdyUWDvF2ay3slecr1ptimNx9lhhs1bzXQxy5NZa6VMx9pS2Wt1H77cVjFartYvBdlDICDc0cbVa3Twd2NcOyuLwVqo+K1ebjgdcr0k+O1uXwThfl8vlhqm+99kASup5GINsYhhmG8d7UXzcBgo2e21cd9WlUll5/7G958ql8uxu7y0zS5SGSkOGBA51TRiGQAi232Y9v4kVQZGavpt6c6l3tLpNsc38gGOC01IeLg4Xi8NaLz1KkqO0VzvcTrFscYo4oLjiRAsKEXeJPRqxW0bsFWLGLVbiocyZSm5vbW0nU9BsIfyp/AGqAvfOkBaFawAAAABJRU5ErkJggg==";function rp(i){le(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 la(i){let t,e,n,o,s,r,a,l,c,d;return e=new et({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=j("div"),ee(e.$$.fragment),n=te(),o=j("div"),b(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),M(o,"background-image","url("+np+")"),b(t,"class","arrow-wrapper svelte-1ogmlqq")},m(u,f){B(u,t,f),K(e,t,null),Q(t,n),Q(t,o),l=!0,c||(d=Me(o,"click",i[5]),c=!0)},p(u,f){i=u,(!l||f&1&&s!==(s="arrow "+i[0]+" svelte-1ogmlqq"))&&b(o,"class",s)},i(u){l||(x(e.$$.fragment,u),u&&Se(()=>{a&&a.end(1),r=Tt(o,Vt,{duration:i[2],delay:i[3],easing:Kt}),r.start()}),l=!0)},o(u){S(e.$$.fragment,u),r&&r.invalidate(),u&&(a=qt(o,Vt,{duration:i[2],delay:i[4],easing:Kt})),l=!1},d(u){u&&z(t),$(e),u&&a&&a.end(),c=!1,d()}}}function ap(i){let t,e,n=i[1]&&la(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=la(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function lp(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){Vi.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 cp extends se{constructor(t){super(),oe(this,t,lp,ap,ie,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},rp)}}function dp(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 up(i){le(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 ca(i){let t,e,n;return e=new aa({props:{unfolded:i[0],content:i[1],inDelay:500,outDelay:i[5]}}),{c(){t=j("div"),ee(e.$$.fragment),b(t,"class","text svelte-1fuzm7v"),M(t,"transform",i[7])},m(o,s){B(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&&M(t,"transform",o[7])},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e),i[10](null)}}}function da(i){let t,e,n;return e=new cp({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=j("div"),ee(e.$$.fragment),b(t,"class","arrow svelte-1fuzm7v")},m(o,s){B(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||(x(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function fp(i){let t,e,n,o=i[1]&&ca(i),s=i[3]<i[4]&&da(i);return{c(){o&&o.c(),t=te(),s&&s.c(),e=me()},m(r,a){o&&o.m(r,a),B(r,t,a),s&&s.m(r,a),B(r,e,a),n=!0},p(r,[a]){r[1]?o?(o.p(r,a),a&2&&x(o,1)):(o=ca(r),o.c(),x(o,1),o.m(t.parentNode,t)):o&&(re(),S(o,1,1,()=>{o=null}),ae()),r[3]<r[4]?s?(s.p(r,a),a&24&&x(s,1)):(s=da(r),s.c(),x(s,1),s.m(e.parentNode,e)):s&&(re(),S(s,1,1,()=>{s=null}),ae())},i(r){n||(x(o),x(s),n=!0)},o(r){S(o),S(s),n=!1},d(r){o&&o.d(r),r&&z(t),s&&s.d(r),r&&z(e)}}}function hp(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,d=0,u=0,f=0;function h(p){ze[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,f=c.offsetHeight),dp(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,f=c.offsetHeight)}),e(3,u=Number(p.replace("px","")))}i.$$.dirty&280&&e(9,d=a?u-f:0),i.$$.dirty&512&&e(7,n=`translateY(${d}px)`),i.$$.dirty&256&&e(6,o=a?"left":"right"),i.$$.dirty&256&&e(5,s=a?450:0)},[r,l,c,u,f,s,o,n,a,d,h]}class ua extends se{constructor(t){super(),oe(this,t,hp,fp,ie,{visible:0,textUnfolded:8,content:1},up)}}function mp(i){le(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 fa(i){var u,f;let t,e,n,o,s,r,a,l,c,d;return t=new et({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),n=new ao({props:{unfolded:i[2],length:i[3],outDelay:i[4]+40*Math.min((f=(u=i[6][0])==null?void 0:u.content.length)!=null?f:10,15),useLinearColor:!0}}),r=new ua({props:{visible:i[2],textUnfolded:i[1],content:i[5]}}),{c(){ee(t.$$.fragment),e=te(),ee(n.$$.fragment),o=te(),s=j("div"),ee(r.$$.fragment),b(s,"class","content svelte-nlvd3x"),Se(()=>i[8].call(s))},m(h,p){K(t,h,p),B(h,e,p),K(n,h,p),B(h,o,p),B(h,s,p),K(r,s,null),a=bt(s,i[8].bind(s)),l=!0,c||(d=Me(s,"click",i[7]),c=!0)},p(h,p){var w,y;const A={};p&4&&(A.visible=h[2]),p&8&&(A.left=h[3]/2+"px"),t.$set(A);const g={};p&4&&(g.unfolded=h[2]),p&8&&(g.length=h[3]),p&16&&(g.outDelay=h[4]+40*Math.min((y=(w=h[6][0])==null?void 0:w.content.length)!=null?y:10,15)),n.$set(g);const v={};p&4&&(v.visible=h[2]),p&2&&(v.textUnfolded=h[1]),p&32&&(v.content=h[5]),r.$set(v)},i(h){l||(x(t.$$.fragment,h),x(n.$$.fragment,h),x(r.$$.fragment,h),l=!0)},o(h){S(t.$$.fragment,h),S(n.$$.fragment,h),S(r.$$.fragment,h),l=!1},d(h){$(t,h),h&&z(e),$(n,h),h&&z(o),h&&z(s),$(r),a(),c=!1,d()}}}function pp(i){let t,e,n=i[0].state&&fa(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=fa(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function gp(i,t,e){let n,o,s,{tag:r}=t,a,l=!1,c=[];function d(){e(1,l=!l)}function u(){a=this.clientWidth,e(3,a)}return i.$$set=f=>{"tag"in f&&e(0,r=f.tag)},i.$$.update=()=>{var f,h,p;i.$$.dirty&1&&e(2,n=!!((f=r.state)!=null&&f.unfolded)),i.$$.dirty&1&&e(5,o=(p=(h=r.data.title)!=null?h: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,d,u]}class Ap extends se{constructor(t){super(),oe(this,t,gp,pp,ie,{tag:0},mp)}}function Pe(i){return i/16+"rem"}function vp(i){le(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 bp(i){let t;const e=i[6].default,n=rt(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)&&lt(n,e,o,o[5],t?at(e,o[5],s,null):ct(o[5]),null)},i(o){t||(x(n,o),t=!0)},o(o){S(n,o),t=!1},d(o){n&&n.d(o)}}}function yp(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)&&ma(i);return{c(){n&&n.c(),t=te(),o&&o.c(),e=me()},m(a,l){n&&n.m(a,l),B(a,t,l),o&&o.m(a,l),B(a,e,l)},p(a,l){var c,d;(c=a[3])!=null&&c.inputting?n||(n=ha(),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),(d=a[3])!=null&&d.placeholder?o?o.p(a,l):(o=ma(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:J,o:J,d(a){n&&n.d(a),a&&z(t),o&&o.d(a),a&&z(e)}}}function wp(i){let t;return{c(){t=Ie(i[2])},m(e,n){B(e,t,n)},p(e,n){n&4&&Le(t,e[2])},i:J,o:J,d(e){e&&z(t)}}}function ha(i){let t;return{c(){t=j("div"),b(t,"class","caret svelte-i9wdo4")},m(e,n){B(e,t,n)},d(e){e&&z(t)}}}function ma(i){let t,e=i[3].placeholder+"",n;return{c(){t=j("span"),n=Ie(e),b(t,"class","placeholder svelte-i9wdo4")},m(o,s){B(o,t,s),Q(t,n)},p(o,s){s&8&&e!==(e=o[3].placeholder+"")&&Le(n,e)},d(o){o&&z(t)}}}function Cp(i){let t,e,n,o;const s=[wp,yp,bp],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=j("div"),n.c(),b(t,"class","text svelte-i9wdo4"),M(t,"max-width",typeof i[1]=="number"?Pe(i[1]):i[1]),M(t,"-webkit-line-clamp",i[0])},m(l,c){B(l,t,c),r[e].m(t,null),o=!0},p(l,[c]){let d=e;e=a(l),e===d?r[e].p(l,c):(re(),S(r[d],1,1,()=>{r[d]=null}),ae(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),x(n,1),n.m(t,null)),c&2&&M(t,"max-width",typeof l[1]=="number"?Pe(l[1]):l[1]),c&1&&M(t,"-webkit-line-clamp",l[0])},i(l){o||(x(n),o=!0)},o(l){S(n),o=!1},d(l){l&&z(t),r[e].d()}}}function Pp(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=d=>{"maxLine"in d&&e(0,r=d.maxLine),"maxWidth"in d&&e(1,a=d.maxWidth),"text"in d&&e(2,l=d.text),"edit"in d&&e(3,c=d.edit),"$$scope"in d&&e(5,s=d.$$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 fo extends se{constructor(t){super(),oe(this,t,Pp,Cp,ie,{maxLine:0,maxWidth:1,text:2,edit:3},vp)}}function Ip(i){le(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 pa(i){var u,f;let t,e,n,o,s,r,a,l,c;t=new ao({props:{unfolded:i[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new fo({props:{text:i[2],edit:(u=i[0].data.edit)==null?void 0:u.title}});let d=(i[0].data.description||((f=i[0].data.edit)==null?void 0:f.description))&&ga(i);return{c(){ee(t.$$.fragment),e=te(),n=j("div"),o=j("div"),s=j("div"),r=j("div"),ee(a.$$.fragment),l=te(),d&&d.c(),b(r,"class","title svelte-1oxrkr1"),b(s,"class","plane svelte-1oxrkr1"),b(o,"class","plane__wrapper svelte-1oxrkr1"),M(o,"transform",i[1]?"translateY(-15px)":"translateY(0)"),b(n,"class","plane__container svelte-1oxrkr1"),ne(n,"unfolded",i[1]),ne(n,"folded",i[3])},m(h,p){K(t,h,p),B(h,e,p),B(h,n,p),Q(n,o),Q(o,s),Q(s,r),K(a,r,null),Q(s,l),d&&d.m(s,null),c=!0},p(h,p){var v,w;const A={};p&2&&(A.unfolded=h[1]),t.$set(A);const g={};p&4&&(g.text=h[2]),p&1&&(g.edit=(v=h[0].data.edit)==null?void 0:v.title),a.$set(g),h[0].data.description||((w=h[0].data.edit)==null?void 0:w.description)?d?(d.p(h,p),p&1&&x(d,1)):(d=ga(h),d.c(),x(d,1),d.m(s,null)):d&&(re(),S(d,1,1,()=>{d=null}),ae()),p&2&&M(o,"transform",h[1]?"translateY(-15px)":"translateY(0)"),(!c||p&2)&&ne(n,"unfolded",h[1]),(!c||p&8)&&ne(n,"folded",h[3])},i(h){c||(x(t.$$.fragment,h),x(a.$$.fragment,h),x(d),c=!0)},o(h){S(t.$$.fragment,h),S(a.$$.fragment,h),S(d),c=!1},d(h){$(t,h),h&&z(e),h&&z(n),$(a),d&&d.d()}}}function ga(i){var o;let t,e,n;return e=new fo({props:{text:i[0].data.description,edit:(o=i[0].data.edit)==null?void 0:o.description,maxLine:3}}),{c(){t=j("div"),ee(e.$$.fragment),b(t,"class","description svelte-1oxrkr1")},m(s,r){B(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||(x(e.$$.fragment,s),n=!0)},o(s){S(e.$$.fragment,s),n=!1},d(s){s&&z(t),$(e)}}}function Ep(i){let t,e,n=i[0].state&&pa(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=pa(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function kp(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 xp extends se{constructor(t){super(),oe(this,t,kp,Ep,ie,{tag:0},Ip)}}function Dp(i){let t,e;return t=new xp({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||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Lp(i){let t,e;return t=new Ap({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||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Sp(i){let t,e,n,o;const s=[Lp,Dp],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=me()},m(l,c){~t&&r[t].m(l,c),B(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(re(),S(r[d],1,1,()=>{r[d]=null}),ae()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),x(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(x(e),o=!0)},o(l){S(e),o=!1},d(l){~t&&r[t].d(l),l&&z(n)}}}function Mp(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 zp extends se{constructor(t){super(),oe(this,t,Mp,Sp,ie,{tag:0})}}function Bp(i){le(i,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function Aa(i){let t,e,n,o;return{c(){t=ve("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){B(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&Se(()=>{n&&n.end(1),e=Tt(t,qn,{duration:i[1],delay:i[0],easing:cs}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=qt(t,qn,{duration:i[1],delay:i[2],easing:Kt})),o=!1},d(s){s&&z(t),s&&n&&n.end()}}}function Tp(i){let t,e,n,o,s,r=i[3]&&Aa(i);return{c(){t=ve("svg"),e=ve("defs"),n=ve("linearGradient"),o=ve("stop"),s=ve("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){B(a,t,l),Q(t,e),Q(e,n),Q(n,o),Q(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&x(r,1)):(r=Aa(a),r.c(),x(r,1),r.m(t,null)):r&&(re(),S(r,1,1,()=>{r=null}),ae())},i(a){x(r)},o(a){S(r)},d(a){a&&z(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=He();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class Vp extends se{constructor(t){super(),oe(this,t,jp,Tp,ie,{inDelay:0,duration:1,outDelay:2,unfolded:3},Bp)}}function Gt(i){return typeof i=="object"&&i!==null&&i.constructor&&Object.prototype.toString.call(i).slice(8,-1)==="Object"}function xt(i,t){const e=["__proto__","constructor","prototype"];Object.keys(t).filter(n=>e.indexOf(n)<0).forEach(n=>{typeof i[n]=="undefined"?i[n]=t[n]:Gt(t[n])&&Gt(i[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?i[n]=t[n]:xt(i[n],t[n]):i[n]=t[n]})}function ho(i={}){return i.navigation&&typeof i.navigation.nextEl=="undefined"&&typeof i.navigation.prevEl=="undefined"}function mo(i={}){return i.pagination&&typeof i.pagination.el=="undefined"}function po(i={}){return i.scrollbar&&typeof i.scrollbar.el=="undefined"}function gi(i=""){const t=i.split(" ").map(n=>n.trim()).filter(n=>!!n),e=[];return t.forEach(n=>{e.indexOf(n)<0&&e.push(n)}),e.join(" ")}const va=["modules","init","_direction","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_preloadImages","updateOnImagesReady","_loop","_loopAdditionalSlides","_loopedSlides","_loopedSlidesLimit","_loopFillGroupWithBlank","loopPreventsSlide","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideBlankClass","slideActiveClass","slideDuplicateActiveClass","slideVisibleClass","slideDuplicateClass","slideNextClass","slideDuplicateNextClass","slidePrevClass","slideDuplicatePrevClass","wrapperClass","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","lazy","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom"];function Qp(i={},t=!0){const e={on:{}},n={},o={};xt(e,Ii.default.defaults),xt(e,Ii.default.extendedDefaults),e._emitClasses=!0,e.init=!1;const s={},r=va.map(l=>l.replace(/_/,"")),a=Object.assign({},i);return Object.keys(a).forEach(l=>{typeof i[l]!="undefined"&&(r.indexOf(l)>=0?Gt(i[l])?(e[l]={},o[l]={},xt(e[l],i[l]),xt(o[l],i[l])):(e[l]=i[l],o[l]=i[l]):l.search(/on[A-Z]/)===0&&typeof i[l]=="function"?t?n[`${l[2].toLowerCase()}${l.substr(3)}`]=i[l]:e.on[`${l[2].toLowerCase()}${l.substr(3)}`]=i[l]:s[l]=i[l])}),["navigation","pagination","scrollbar"].forEach(l=>{e[l]===!0&&(e[l]={}),e[l]===!1&&delete e[l]}),{params:e,passedParams:o,rest:s,events:n}}function Op({el:i,nextEl:t,prevEl:e,paginationEl:n,scrollbarEl:o,swiper:s},r){ho(r)&&t&&e&&(s.params.navigation.nextEl=t,s.originalParams.navigation.nextEl=t,s.params.navigation.prevEl=e,s.originalParams.navigation.prevEl=e),mo(r)&&n&&(s.params.pagination.el=n,s.originalParams.pagination.el=n),po(r)&&o&&(s.params.scrollbar.el=o,s.originalParams.scrollbar.el=o),s.init(i)}function Rp(i,t,e,n,o){const s=[];if(!t)return s;const r=l=>{s.indexOf(l)<0&&s.push(l)};if(e&&n){const l=n.map(o),c=e.map(o);l.join("")!==c.join("")&&r("children"),n.length!==e.length&&r("children")}return va.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in i&&l in t)if(Gt(i[l])&&Gt(t[l])){const c=Object.keys(i[l]),d=Object.keys(t[l]);c.length!==d.length?r(l):(c.forEach(u=>{i[l][u]!==t[l][u]&&r(l)}),d.forEach(u=>{i[l][u]!==t[l][u]&&r(l)}))}else i[l]!==t[l]&&r(l)}),s}function Fp({swiper:i,slides:t,passedParams:e,changedParams:n,nextEl:o,prevEl:s,scrollbarEl:r,paginationEl:a}){const l=n.filter(E=>E!=="children"&&E!=="direction"),{params:c,pagination:d,navigation:u,scrollbar:f,virtual:h,thumbs:p}=i;let A,g,v,w,y;n.includes("thumbs")&&e.thumbs&&e.thumbs.swiper&&c.thumbs&&!c.thumbs.swiper&&(A=!0),n.includes("controller")&&e.controller&&e.controller.control&&c.controller&&!c.controller.control&&(g=!0),n.includes("pagination")&&e.pagination&&(e.pagination.el||a)&&(c.pagination||c.pagination===!1)&&d&&!d.el&&(v=!0),n.includes("scrollbar")&&e.scrollbar&&(e.scrollbar.el||r)&&(c.scrollbar||c.scrollbar===!1)&&f&&!f.el&&(w=!0),n.includes("navigation")&&e.navigation&&(e.navigation.prevEl||s)&&(e.navigation.nextEl||o)&&(c.navigation||c.navigation===!1)&&u&&!u.prevEl&&!u.nextEl&&(y=!0);const C=E=>{!i[E]||(i[E].destroy(),E==="navigation"?(c[E].prevEl=void 0,c[E].nextEl=void 0,i[E].prevEl=void 0,i[E].nextEl=void 0):(c[E].el=void 0,i[E].el=void 0))};l.forEach(E=>{if(Gt(c[E])&&Gt(e[E]))xt(c[E],e[E]);else{const P=e[E];(P===!0||P===!1)&&(E==="navigation"||E==="pagination"||E==="scrollbar")?P===!1&&C(E):c[E]=e[E]}}),l.includes("controller")&&!g&&i.controller&&i.controller.control&&c.controller&&c.controller.control&&(i.controller.control=c.controller.control),n.includes("children")&&t&&h&&c.virtual.enabled?(h.slides=t,h.update(!0)):n.includes("children")&&i.lazy&&i.params.lazy.enabled&&i.lazy.load(),A&&p.init()&&p.update(!0),g&&(i.controller.control=c.controller.control),v&&(a&&(c.pagination.el=a),d.init(),d.render(),d.update()),w&&(r&&(c.scrollbar.el=r),f.init(),f.updateSize(),f.setTranslate()),y&&(o&&(c.navigation.nextEl=o),s&&(c.navigation.prevEl=s),u.init(),u.update()),n.includes("allowSlideNext")&&(i.allowSlideNext=e.allowSlideNext),n.includes("allowSlidePrev")&&(i.allowSlidePrev=e.allowSlidePrev),n.includes("direction")&&i.changeDirection(e.direction,!1),i.update()}const Gp=i=>({virtualData:i&512}),ba=i=>({virtualData:i[9]}),Hp=i=>({virtualData:i&512}),ya=i=>({virtualData:i[9]}),Wp=i=>({virtualData:i&512}),wa=i=>({virtualData:i[9]}),Np=i=>({virtualData:i&512}),Ca=i=>({virtualData:i[9]}),_p=i=>({virtualData:i&512}),Pa=i=>({virtualData:i[9]});function Ia(i){let t,e,n;return{c(){t=j("div"),e=te(),n=j("div"),b(t,"class","swiper-button-prev"),b(n,"class","swiper-button-next")},m(o,s){B(o,t,s),i[13](t),B(o,e,s),B(o,n,s),i[14](n)},p:J,d(o){o&&z(t),i[13](null),o&&z(e),o&&z(n),i[14](null)}}}function Ea(i){let t;return{c(){t=j("div"),b(t,"class","swiper-scrollbar")},m(e,n){B(e,t,n),i[15](t)},p:J,d(e){e&&z(t),i[15](null)}}}function ka(i){let t;return{c(){t=j("div"),b(t,"class","swiper-pagination")},m(e,n){B(e,t,n),i[16](t)},p:J,d(e){e&&z(t),i[16](null)}}}function Xp(i){let t,e,n,o,s,r,a=ho(i[2]),l,c=po(i[2]),d,u=mo(i[2]),f,h,p;const A=i[12]["container-start"],g=rt(A,i,i[11],Pa),v=i[12]["wrapper-start"],w=rt(v,i,i[11],Ca),y=i[12].default,C=rt(y,i,i[11],wa),E=i[12]["wrapper-end"],P=rt(E,i,i[11],ya);let L=a&&Ia(i),D=c&&Ea(i),T=u&&ka(i);const W=i[12]["container-end"],G=rt(W,i,i[11],ba);let Y=[{class:h=gi(`${i[1]}${i[0]?` ${i[0]}`:""}`)},i[3]],V={};for(let I=0;I<Y.length;I+=1)V=Ce(V,Y[I]);return{c(){t=j("div"),g&&g.c(),e=te(),n=j("div"),w&&w.c(),o=te(),C&&C.c(),s=te(),P&&P.c(),r=te(),L&&L.c(),l=te(),D&&D.c(),d=te(),T&&T.c(),f=te(),G&&G.c(),b(n,"class","swiper-wrapper"),Qn(t,V)},m(I,O){B(I,t,O),g&&g.m(t,null),Q(t,e),Q(t,n),w&&w.m(n,null),Q(n,o),C&&C.m(n,null),Q(n,s),P&&P.m(n,null),Q(t,r),L&&L.m(t,null),Q(t,l),D&&D.m(t,null),Q(t,d),T&&T.m(t,null),Q(t,f),G&&G.m(t,null),i[17](t),p=!0},p(I,[O]){g&&g.p&&(!p||O&2560)&&lt(g,A,I,I[11],p?at(A,I[11],O,_p):ct(I[11]),Pa),w&&w.p&&(!p||O&2560)&&lt(w,v,I,I[11],p?at(v,I[11],O,Np):ct(I[11]),Ca),C&&C.p&&(!p||O&2560)&&lt(C,y,I,I[11],p?at(y,I[11],O,Wp):ct(I[11]),wa),P&&P.p&&(!p||O&2560)&&lt(P,E,I,I[11],p?at(E,I[11],O,Hp):ct(I[11]),ya),O&4&&(a=ho(I[2])),a?L?L.p(I,O):(L=Ia(I),L.c(),L.m(t,l)):L&&(L.d(1),L=null),O&4&&(c=po(I[2])),c?D?D.p(I,O):(D=Ea(I),D.c(),D.m(t,d)):D&&(D.d(1),D=null),O&4&&(u=mo(I[2])),u?T?T.p(I,O):(T=ka(I),T.c(),T.m(t,f)):T&&(T.d(1),T=null),G&&G.p&&(!p||O&2560)&&lt(G,W,I,I[11],p?at(W,I[11],O,Gp):ct(I[11]),ba),Qn(t,V=Te(Y,[(!p||O&3&&h!==(h=gi(`${I[1]}${I[0]?` ${I[0]}`:""}`)))&&{class:h},O&8&&I[3]]))},i(I){p||(x(g,I),x(w,I),x(C,I),x(P,I),x(G,I),p=!0)},o(I){S(g,I),S(w,I),S(C,I),S(P,I),S(G,I),p=!1},d(I){I&&z(t),g&&g.d(I),w&&w.d(I),C&&C.d(I),P&&P.d(I),L&&L.d(),D&&D.d(),T&&T.d(),G&&G.d(I),i[17](null)}}}function Yp(i,t,e){const n=["class","swiper"];let o=Vn(t,n),{$$slots:s={},$$scope:r}=t;const a=Hn();let{class:l=void 0}=t,c="swiper",d=!1,u=null,f=null,h,p,A,g,v=null,w=null,y=null,C=null,E=null,P={slides:[]};function L(){return u}const D=F=>{e(9,P=F),fc().then(()=>{u.$wrapperEl.children(".swiper-slide").each(N=>{N.onSwiper&&N.onSwiper(u)}),u.updateSlides(),u.updateProgress(),u.updateSlidesClasses(),u.lazy&&u.params.lazy.enabled&&u.lazy.load()})},T=()=>{h=Qp(o),e(2,p=h.params),A=h.passedParams,e(3,g=h.rest)};T(),f=A;const W=()=>{d=!0};if(p.onAny=(F,...N)=>{a(F,N)},Object.assign(p.on,{_beforeBreakpoint:W,_containerClasses(F,N){e(1,c=N)}}),u=new Ii.default(p),Wn("swiper",u),u.virtual&&u.params.virtual.enabled){const F={cache:!1,renderExternal:N=>{D(N),p.virtual&&p.virtual.renderExternal&&p.virtual.renderExternal(N)},renderExternalUpdate:!1};xt(u.params.virtual,F),xt(u.originalParams.virtual,F)}Ze(()=>{!v||(Op({el:v,nextEl:y,prevEl:w,paginationEl:E,scrollbarEl:C,swiper:u},p),a("swiper",[u]),!p.virtual&&u.slides.each(F=>{F.onSwiper&&F.onSwiper(u)}))}),ji(()=>{if(!u)return;T();const F=Rp(A,f);(F.length||d)&&u&&!u.destroyed&&Fp({swiper:u,passedParams:A,changedParams:F,nextEl:y,prevEl:w,scrollbarEl:C,paginationEl:E}),d=!1,f=A}),wt(()=>{typeof window!="undefined"&&u&&!u.destroyed&&u.destroy(!0,!1)});function G(F){ze[F?"unshift":"push"](()=>{w=F,e(5,w)})}function Y(F){ze[F?"unshift":"push"](()=>{y=F,e(6,y)})}function V(F){ze[F?"unshift":"push"](()=>{C=F,e(7,C)})}function I(F){ze[F?"unshift":"push"](()=>{E=F,e(8,E)})}function O(F){ze[F?"unshift":"push"](()=>{v=F,e(4,v)})}return i.$$set=F=>{t=Ce(Ce({},t),_o(F)),e(27,o=Vn(t,n)),"class"in F&&e(0,l=F.class),"$$scope"in F&&e(11,r=F.$$scope)},[l,c,p,g,v,w,y,C,E,P,L,r,s,G,Y,V,I,O]}class Up extends se{constructor(t){super(),oe(this,t,Yp,Xp,ie,{class:0,swiper:10})}get swiper(){return this.$$.ctx[10]}}const Jp=i=>({data:i&32}),xa=i=>({data:i[5]}),Zp=i=>({data:i&32}),Da=i=>({data:i[5]});function qp(i){let t;const e=i[8].default,n=rt(e,i,i[7],xa);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&160)&&lt(n,e,o,o[7],t?at(e,o[7],s,Jp):ct(o[7]),xa)},i(o){t||(x(n,o),t=!0)},o(o){S(n,o),t=!1},d(o){n&&n.d(o)}}}function Kp(i){let t,e,n;const o=i[8].default,s=rt(o,i,i[7],Da);return{c(){t=j("div"),s&&s.c(),b(t,"class","swiper-zoom-container"),b(t,"data-swiper-zoom",e=typeof i[0]=="number"?i[0]:void 0)},m(r,a){B(r,t,a),s&&s.m(t,null),n=!0},p(r,a){s&&s.p&&(!n||a&160)&&lt(s,o,r,r[7],n?at(o,r[7],a,Zp):ct(r[7]),Da),(!n||a&1&&e!==(e=typeof r[0]=="number"?r[0]:void 0))&&b(t,"data-swiper-zoom",e)},i(r){n||(x(s,r),n=!0)},o(r){S(s,r),n=!1},d(r){r&&z(t),s&&s.d(r)}}}function $p(i){let t,e,n,o,s;const r=[Kp,qp],a=[];function l(u,f){return u[0]?0:1}e=l(i),n=a[e]=r[e](i);let c=[{class:o=gi(`${i[3]}${i[2]?` ${i[2]}`:""}`)},{"data-swiper-slide-index":i[1]},i[6]],d={};for(let u=0;u<c.length;u+=1)d=Ce(d,c[u]);return{c(){t=j("div"),n.c(),Qn(t,d)},m(u,f){B(u,t,f),a[e].m(t,null),i[9](t),s=!0},p(u,[f]){let h=e;e=l(u),e===h?a[e].p(u,f):(re(),S(a[h],1,1,()=>{a[h]=null}),ae(),n=a[e],n?n.p(u,f):(n=a[e]=r[e](u),n.c()),x(n,1),n.m(t,null)),Qn(t,d=Te(c,[(!s||f&12&&o!==(o=gi(`${u[3]}${u[2]?` ${u[2]}`:""}`)))&&{class:o},(!s||f&2)&&{"data-swiper-slide-index":u[1]},f&64&&u[6]]))},i(u){s||(x(n),s=!0)},o(u){S(n),s=!1},d(u){u&&z(t),a[e].d(),i[9](null)}}}function eg(i,t,e){let n;const o=["zoom","virtualIndex","class"];let s=Vn(t,o),{$$slots:r={},$$scope:a}=t,{zoom:l=void 0}=t,{virtualIndex:c=void 0}=t,{class:d=void 0}=t,u=null,f="swiper-slide",h=ft("swiper"),p=!1;const A=(y,C,E)=>{C===u&&e(3,f=E)},g=()=>{!h||p||(h.on("_slideClass",A),p=!0)},v=()=>{!h||(h.off("_slideClass",A),p=!1)};Ze(()=>{typeof c!="undefined"&&(e(4,u.onSwiper=y=>{h=y,g()},u),g())}),ji(()=>{if(!(!u||!h)){if(h.destroyed){f!=="swiper-slide"&&e(3,f="swiper-slide");return}g()}}),Ti(()=>{g()}),wt(()=>{!h||v()});function w(y){ze[y?"unshift":"push"](()=>{u=y,e(4,u)})}return i.$$set=y=>{t=Ce(Ce({},t),_o(y)),e(6,s=Vn(t,o)),"zoom"in y&&e(0,l=y.zoom),"virtualIndex"in y&&e(1,c=y.virtualIndex),"class"in y&&e(2,d=y.class),"$$scope"in y&&e(7,a=y.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(5,n={isActive:f.indexOf("swiper-slide-active")>=0||f.indexOf("swiper-slide-duplicate-active")>=0,isVisible:f.indexOf("swiper-slide-visible")>=0,isDuplicate:f.indexOf("swiper-slide-duplicate")>=0,isPrev:f.indexOf("swiper-slide-prev")>=0||f.indexOf("swiper-slide-duplicate-prev")>=0,isNext:f.indexOf("swiper-slide-next")>=0||f.indexOf("swiper-slide-duplicate-next")>=0})},[l,c,d,f,u,n,s,a,r,w]}class tg extends se{constructor(t){super(),oe(this,t,eg,$p,ie,{zoom:0,virtualIndex:1,class:2})}}function ng(i){le(i,"svelte-q6hk4f",".media-item.svelte-q6hk4f.svelte-q6hk4f{height:100%}.media-content.svelte-q6hk4f.svelte-q6hk4f{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.video-icon.svelte-q6hk4f.svelte-q6hk4f{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-q6hk4f.svelte-q6hk4f{display:none;pointer-events:auto;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-q6hk4f.svelte-q6hk4f{display:block}.video-icon.large.svelte-q6hk4f.svelte-q6hk4f{width:12.5rem;height:6.25rem}.video-icon.small.svelte-q6hk4f.svelte-q6hk4f{width:1.75rem;height:1.75rem}.video-icon.svelte-q6hk4f .video-icon-img.svelte-q6hk4f{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-q6hk4f .video-icon-img.canPlay.svelte-q6hk4f{cursor:pointer}")}function La(i){let t;function e(s,r){if(s[1].type==="Image")return og;if(s[1].type==="Video")return ig}let n=e(i),o=n&&n(i);return{c(){t=j("div"),o&&o.c(),b(t,"class","media-item svelte-q6hk4f")},m(s,r){B(s,t,r),o&&o.m(t,null)},p(s,r){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null)))},d(s){s&&z(t),o&&o.d()}}}function ig(i){let t,e,n,o,s,r;function a(d,u){return d[6]&&d[1].videoCoverUrl?rg:sg}let l=a(i),c=l(i);return{c(){c.c(),t=te(),e=j("div"),n=j("div"),o=j("div"),b(o,"class","video-icon-img svelte-q6hk4f"),M(o,"background-image","url("+i[14]()+")"),ne(o,"canPlay",i[4]),b(n,"class","video-icon svelte-q6hk4f"),ne(n,"large",i[3]==="large"),ne(n,"small",i[3]==="small"),b(e,"class","video-play-button-container svelte-q6hk4f"),ne(e,"showPlayButton",i[8])},m(d,u){c.m(d,u),B(d,t,u),B(d,e,u),Q(e,n),Q(n,o),s||(r=Me(o,"click",i[15]),s=!0)},p(d,u){l===(l=a(d))&&c?c.p(d,u):(c.d(1),c=l(d),c&&(c.c(),c.m(t.parentNode,t))),u&4&&M(o,"background-image","url("+d[14]()+")"),u&16&&ne(o,"canPlay",d[4]),u&8&&ne(n,"large",d[3]==="large"),u&8&&ne(n,"small",d[3]==="small"),u&256&&ne(e,"showPlayButton",d[8])},d(d){c.d(d),d&&z(t),d&&z(e),s=!1,r()}}}function og(i){let t,e,n,o;return{c(){t=j("img"),b(t,"class","media-content svelte-q6hk4f"),b(t,"style",e=`object-fit: ${i[5]};`),Ne(t.src,n=i[1].url)||b(t,"src",n),b(t,"alt",o=i[1].name)},m(s,r){B(s,t,r)},p(s,r){r&32&&e!==(e=`object-fit: ${s[5]};`)&&b(t,"style",e),r&2&&!Ne(t.src,n=s[1].url)&&b(t,"src",n),r&2&&o!==(o=s[1].name)&&b(t,"alt",o)},d(s){s&&z(t)}}}function sg(i){let t,e,n,o,s,r,a;return{c(){t=j("video"),b(t,"class","media-content svelte-q6hk4f"),b(t,"style",e=`object-fit: ${i[5]};`),Ne(t.src,n=i[1].videoCoverUrl?i[1].url:i[1].url+"#t=0.1")||b(t,"src",n),b(t,"poster",o=i[1].videoCoverUrl),b(t,"preload",s=i[1].videoCoverUrl?"none":"auto"),b(t,"disablepictureinpicture",""),t.playsInline=!0,b(t,"paused",""),t.muted=!0,t.loop=!1,b(t,"crossorigin",""),t.controls=!1,ne(t,"showPlayButton",i[8]),M(t,"position","relative")},m(l,c){B(l,t,c),i[13](t),r||(a=Me(t,"click",i[12]),r=!0)},p(l,c){c&32&&e!==(e=`object-fit: ${l[5]};`)&&b(t,"style",e),c&2&&!Ne(t.src,n=l[1].videoCoverUrl?l[1].url:l[1].url+"#t=0.1")&&b(t,"src",n),c&2&&o!==(o=l[1].videoCoverUrl)&&b(t,"poster",o),c&2&&s!==(s=l[1].videoCoverUrl?"none":"auto")&&b(t,"preload",s),c&256&&ne(t,"showPlayButton",l[8])},d(l){l&&z(t),i[13](null),r=!1,a()}}}function rg(i){let t,e,n,o;return{c(){t=j("img"),b(t,"class","media-content svelte-q6hk4f"),b(t,"style",e=`object-fit: ${i[5]};`),Ne(t.src,n=i[1].videoCoverUrl)||b(t,"src",n),b(t,"alt",o=i[1].name)},m(s,r){B(s,t,r)},p(s,r){r&32&&e!==(e=`object-fit: ${s[5]};`)&&b(t,"style",e),r&2&&!Ne(t.src,n=s[1].videoCoverUrl)&&b(t,"src",n),r&2&&o!==(o=s[1].name)&&b(t,"alt",o)},d(s){s&&z(t)}}}function ag(i){let t,e=i[1]&&La(i);return{c(){e&&e.c(),t=me()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[1]?e?e.p(n,o):(e=La(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:J,o:J,d(n){e&&e.d(n),n&&z(t)}}}function lg(i,t,e){let{tag:n}=t,{media:o}=t,{playButtonIfNeed:s="withoutText"}=t,{playButtonSizeIfNeed:r="small"}=t,{canPlay:a=!0}=t,{objectFit:l="cover"}=t,{disableVideoIfHavePoster:c=!1}=t,d=(o==null?void 0:o.type)==="Video"&&Boolean(o==null?void 0:o.videoCoverUrl),u,f=!1;const h=ft("mediaStore"),p=ft("hooks"),A=()=>{d||(u==null||u.play(),u==null||u.pause(),e(11,d=!0))};p.on("loadVideoFirstFrame",A);const g=C=>{u&&(u.pause(),p.emit("playStateChange",{event:C,state:"paused",tag:n,mediaInstance:u}))};function v(C){ze[C?"unshift":"push"](()=>{u=C,e(7,u)})}const w=()=>s==="withText"?ip:s==="withoutText"?op:s,y=C=>{!a||u&&(e(7,u.muted=!1,u),u.play(),h.set({currentMediaElement:u}),p.emit("playStateChange",{event:C,state:"playing",tag:n,mediaInstance:u}))};return i.$$set=C=>{"tag"in C&&e(0,n=C.tag),"media"in C&&e(1,o=C.media),"playButtonIfNeed"in C&&e(2,s=C.playButtonIfNeed),"playButtonSizeIfNeed"in C&&e(3,r=C.playButtonSizeIfNeed),"canPlay"in C&&e(4,a=C.canPlay),"objectFit"in C&&e(5,l=C.objectFit),"disableVideoIfHavePoster"in C&&e(6,c=C.disableVideoIfHavePoster)},i.$$.update=()=>{if(i.$$.dirty&128&&u&&(e(8,f=u.paused),u.addEventListener("play",()=>{e(8,f=!1)}),u.addEventListener("pause",()=>{e(8,f=!0)}),h.subscribe(({currentMediaElement:C})=>{C!==u&&(u==null||u.pause())})),i.$$.dirty&2178&&(o==null?void 0:o.type)==="Video"&&!d){const C=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,P=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&C;u&&P&&u.paused&&(document.removeEventListener("WeixinJSBridgeReady",A),document.removeEventListener("touchstart",A),document.removeEventListener("click",A),document.addEventListener("WeixinJSBridgeReady",A),document.addEventListener("touchstart",A),document.addEventListener("click",A))}},[n,o,s,r,a,l,c,u,f,h,p,d,g,v,w,y]}class Sa extends se{constructor(t){super(),oe(this,t,lg,ag,ie,{tag:0,media:1,playButtonIfNeed:2,playButtonSizeIfNeed:3,canPlay:4,objectFit:5,disableVideoIfHavePoster:6},ng)}}function cg(i){le(i,"svelte-ai0lv9",".media.svelte-ai0lv9{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}")}function Ma(i,t,e){const n=i.slice();return n[22]=t[e],n}function za(i){let t,e,n,o,s,r;const a=[ug,dg],l=[];function c(d,u){return d[12]?0:1}return e=c(i),n=l[e]=a[e](i),{c(){t=j("div"),n.c(),b(t,"class","media svelte-ai0lv9"),ne(t,"unfolded",i[5])},m(d,u){B(d,t,u),l[e].m(t,null),r=!0},p(d,u){i=d;let f=e;e=c(i),e===f?l[e].p(i,u):(re(),S(l[f],1,1,()=>{l[f]=null}),ae(),n=l[e],n?n.p(i,u):(n=l[e]=a[e](i),n.c()),x(n,1),n.m(t,null)),(!r||u&32)&&ne(t,"unfolded",i[5])},i(d){r||(x(n),d&&Se(()=>{s&&s.end(1),o=Tt(t,ds,i[6]?{y:4,duration:i[4],delay:i[2],easing:vt}:void 0),o.start()}),r=!0)},o(d){S(n),o&&o.invalidate(),d&&(s=qt(t,ds,i[6]?{y:4,duration:i[4],delay:i[3],easing:vt}:void 0)),r=!1},d(d){d&&z(t),l[e].d(),d&&s&&s.end()}}}function dg(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=Ce(o,n[s]);return t=new Sa({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&131?Te(n,[r&2&&{media:s[1][0]},r&128&&rs(s[7]),r&1&&{tag:s[0]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){S(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function ug(i){let t,e;return t=new Up({props:{style:"height: 100%",modules:[Lo.Autoplay],spaceBetween:30,autoplay:i[13]?Be({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1,loop:!0,$$slots:{default:[hg]},$$scope:{ctx:i}}}),t.$on("init",i[20]),t.$on("slideChange",i[21]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&8192&&(s.autoplay=n[13]?Be({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1),o&33555585&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function fg(i){let t,e,n;const o=[i[7],{media:i[22]},{tag:i[0]}];let s={};for(let r=0;r<o.length;r+=1)s=Ce(s,o[r]);return t=new Sa({props:s}),{c(){ee(t.$$.fragment),e=te()},m(r,a){K(t,r,a),B(r,e,a),n=!0},p(r,a){const l=a&1153?Te(o,[a&128&&rs(r[7]),a&1024&&{media:r[22]},a&1&&{tag:r[0]}]):{};t.$set(l)},i(r){n||(x(t.$$.fragment,r),n=!0)},o(r){S(t.$$.fragment,r),n=!1},d(r){$(t,r),r&&z(e)}}}function Ba(i){let t,e;return t=new i[14]({props:{$$slots:{default:[fg]},$$scope:{ctx:i}}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&33555585&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function hg(i){let t,e,n=i[10],o=[];for(let r=0;r<n.length;r+=1)o[r]=Ba(Ma(i,n,r));const s=r=>S(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=me()},m(r,a){for(let l=0;l<o.length;l+=1)o[l].m(r,a);B(r,t,a),e=!0},p(r,a){if(a&1153){n=r[10];let l;for(l=0;l<n.length;l+=1){const c=Ma(r,n,l);o[l]?(o[l].p(c,a),x(o[l],1)):(o[l]=Ba(c),o[l].c(),x(o[l],1),o[l].m(t.parentNode,t))}for(re(),l=n.length;l<o.length;l+=1)s(l);ae()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)x(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)S(o[a]);e=!1},d(r){dt(o,r),r&&z(t)}}}function mg(i){let t,e,n=i[5]&&za(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[5]?n?(n.p(o,s),s&32&&x(n,1)):(n=za(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function pg(i,t,e){let n,o,s;const r=Be(tg);let{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:d=0}=t,{duration:u=0}=t,{unfolded:f=!0}=t,{animation:h=!0}=t,{mediaItemConfig:p}=t,{enableCarousel:A=!0}=t,{autoplayConfig:g={autoplay:!0,autoplayVideo:!1}}=t;const v=ft("mediaStore"),w=ft("hooks");let y;function C(T){!n||!y||(v.set({currentMediaElement:this}),w.emit("playStateChange",{event:T,state:"playing",tag:a,mediaInstance:this}),y.autoplay.stop())}function E(T){!n||!y||(w.emit("playStateChange",{event:T,state:"paused",tag:a,mediaInstance:this}),y.autoplay.running||y.autoplay.start())}let P=null;const L=T=>{e(9,y=T.detail[0])},D=T=>X(this,null,function*(){var O,F,N;if(!s||!g.autoplayVideo)return;const W=T.detail[0];if(!W)return;const G=W.realIndex;if(G===P)return;e(11,P=G);const Y=o[G];if(!Y||Y.type!=="Video")return;W.autoplay.stop(),W.slides.map(Z=>Z.querySelector("video")).filter(_e).forEach(Z=>Z.pause());const I=(O=W.slides[W.activeIndex])==null?void 0:O.querySelector("video");if(I&&(I.removeEventListener("play",C),I.removeEventListener("pause",E),I.addEventListener("play",C),I.addEventListener("pause",E)),I){I.addEventListener("click",()=>I.pause());const Z=(N=(F=I.parentElement)==null?void 0:F.getElementsByClassName("video-play-button-container"))==null?void 0:N[0];I.addEventListener("play",()=>Z==null?void 0:Z.classList.remove("showPlayButton")),I.addEventListener("pause",()=>Z==null?void 0:Z.classList.add("showPlayButton")),Z&&(I.paused?Z.classList.add("showPlayButton"):Z.classList.remove("showPlayButton"),Z.addEventListener("click",_=>{I.muted=!1,I.play(),v.set({currentMediaElement:I}),w.emit("playStateChange",{event:_,state:"playing",tag:a,mediaInstance:I})}))}});return i.$$set=T=>{"tag"in T&&e(0,a=T.tag),"mediaData"in T&&e(1,l=T.mediaData),"inDelay"in T&&e(2,c=T.inDelay),"outDelay"in T&&e(3,d=T.outDelay),"duration"in T&&e(4,u=T.duration),"unfolded"in T&&e(5,f=T.unfolded),"animation"in T&&e(6,h=T.animation),"mediaItemConfig"in T&&e(7,p=T.mediaItemConfig),"enableCarousel"in T&&e(19,A=T.enableCarousel),"autoplayConfig"in T&&e(8,g=T.autoplayConfig)},i.$$.update=()=>{i.$$.dirty&524290&&e(12,n=A&&(l==null?void 0:l.length)>1),i.$$.dirty&2&&e(10,o=l),i.$$.dirty&1280&&e(13,s=o.length>1&&g.autoplay),i.$$.dirty&512&&y&&y.slides.forEach(T=>{const W=T.querySelector("video");W&&v.subscribe(({currentMediaElement:G})=>{G!==W&&W.pause()})})},[a,l,c,d,u,f,h,p,g,y,o,P,n,s,r,v,w,C,E,A,L,D]}class Ta extends se{constructor(t){super(),oe(this,t,pg,mg,ie,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:19,autoplayConfig:8},cg)}}function gg(i){le(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 ja(i){let t,e,n,o,s,r,a,l;t=new et({props:{visible:i[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new Vp({props:{unfolded:i[3],outDelay:400}});let c=i[2]&&Va(i),d=i[1]&&Qa(i);return{c(){ee(t.$$.fragment),e=te(),n=j("div"),ee(o.$$.fragment),s=te(),c&&c.c(),r=te(),d&&d.c(),a=me(),b(n,"class","line svelte-1f7m1lj")},m(u,f){K(t,u,f),B(u,e,f),B(u,n,f),K(o,n,null),B(u,s,f),c&&c.m(u,f),B(u,r,f),d&&d.m(u,f),B(u,a,f),l=!0},p(u,f){const h={};f&8&&(h.visible=u[3]),t.$set(h);const p={};f&8&&(p.unfolded=u[3]),o.$set(p),u[2]?c?(c.p(u,f),f&4&&x(c,1)):(c=Va(u),c.c(),x(c,1),c.m(r.parentNode,r)):c&&(re(),S(c,1,1,()=>{c=null}),ae()),u[1]?d?(d.p(u,f),f&2&&x(d,1)):(d=Qa(u),d.c(),x(d,1),d.m(a.parentNode,a)):d&&(re(),S(d,1,1,()=>{d=null}),ae())},i(u){l||(x(t.$$.fragment,u),x(o.$$.fragment,u),x(c),x(d),l=!0)},o(u){S(t.$$.fragment,u),S(o.$$.fragment,u),S(c),S(d),l=!1},d(u){$(t,u),u&&z(e),u&&z(n),$(o),u&&z(s),c&&c.d(u),u&&z(r),d&&d.d(u),u&&z(a)}}}function Va(i){let t,e,n;return e=new aa({props:{unfolded:i[3],content:i[2],inDelay:500}}),{c(){t=j("div"),ee(e.$$.fragment),b(t,"class","text svelte-1f7m1lj")},m(o,s){B(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||(x(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function Qa(i){let t,e,n;return e=new Ta({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=j("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){B(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||(x(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function Ag(i){let t,e,n=i[0].state&&ja(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=ja(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function vg(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,d;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=((d=o.length)!=null?d:0)>7?o.substring(0,6)+"...":o),i.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,s,n,o]}class bg extends se{constructor(t){super(),oe(this,t,vg,Ag,ie,{tag:0},gg)}}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 yg{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 wg(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 Oa{constructor(t,e){m(this,"width");m(this,"height");m(this,"containerDom");m(this,"hooks",new ue.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 k.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 dn.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 k.Vector2),a=1,l=n/t,c=o/t,d=a*t,u=(s.x+1)/2*r.x,f=(s.y+1)/2*r.y,h=this.five.getPixels(u-l/2,f-l/2,l,c,d),p=Math.floor(n*a),A=Math.floor(o*a);wg(h,p,A);const g=new ImageData(p,A);g.data.set(h),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 Cg(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new k.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function Ra(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new k.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function Pg(i,t){const e=i.getElement();if(!e)return;const n=Ra(t,e),o=new k.Raycaster;return o.setFromCamera(n,i.camera),o}function Ig(i,t){const{x:e,y:n}=t,o=e*2-1,s=n*2-1,r=new k.Vector2().fromArray([o,s]),a=new k.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const Eg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCAB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JCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",kg=`
544
+ `))&&b(t,"style",e),a&8&&M(t,"width",Ye(i[3])),a&16&&M(t,"height",Ye(i[4])),a&8192&&M(t,"z-index",i[13])},i(r){s||(r&&Se(()=>{o&&o.end(1),n=Tt(t,Vt,{duration:i[0]}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=qt(t,Vt,{duration:i[1]})),s=!1},d(r){r&&z(t),r&&o&&o.end()}}}function Gm(i){let t,e=i[2]&&Kr(i);return{c(){e&&e.c(),t=me()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&x(e,1)):(e=Kr(n),e.c(),x(e,1),e.m(t.parentNode,t)):e&&(re(),S(e,1,1,()=>{e=null}),ae())},i(n){x(e)},o(n){S(e)},d(n){e&&e.d(n),n&&z(t)}}}function Ye(i){return typeof i=="number"?i/16+"rem":i}function Hm(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:d=!1}=t,{horizontalCenter:u=!1}=t,{verticalCenter:f=!1}=t,{blurRadius:h}=t,{spreadRadius:p}=t,{opacity:A=.15}=t,{zIndex:g=-1}=t;return i.$$set=v=>{"inDelay"in v&&e(0,n=v.inDelay),"outDelay"in v&&e(1,o=v.outDelay),"visible"in v&&e(2,s=v.visible),"width"in v&&e(3,r=v.width),"height"in v&&e(4,a=v.height),"left"in v&&e(5,l=v.left),"bottom"in v&&e(6,c=v.bottom),"center"in v&&e(7,d=v.center),"horizontalCenter"in v&&e(8,u=v.horizontalCenter),"verticalCenter"in v&&e(9,f=v.verticalCenter),"blurRadius"in v&&e(10,h=v.blurRadius),"spreadRadius"in v&&e(11,p=v.spreadRadius),"opacity"in v&&e(12,A=v.opacity),"zIndex"in v&&e(13,g=v.zIndex)},[n,o,s,r,a,l,c,d,u,f,h,p,A,g]}class et extends se{constructor(t){super(),oe(this,t,Hm,Gm,ie,{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},Fm)}}function Wm(i,t){t.forEach(e=>{const n=new k.SphereGeometry(.02,16,16),o=[],s=[new k.MeshBasicMaterial({color:16776960}),new k.MeshBasicMaterial({color:16711935}),new k.MeshBasicMaterial({color:16711680}),new k.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new k.Mesh(n,l);c.position.copy(ot(r)),o.push(c)});else{const r=s[0],a=new k.Mesh(n,r);a.position.copy(ot(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const Be=i=>i;function lo(i){if(i.length<3)return;const t=i.map(hn),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}var $r=(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))($r||{}),ea=(i=>(i.Two="2D",i.Three="3D",i))(ea||{}),ta=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(ta||{});function Nm(i){return i.stickType==="2DPoint"||i.stickType==="3DPoint"}function _m(i){return i.stickType==="3DPoint"||i.stickType==="Plane"}function Ne(i){return i.stickType==="Model"&&i.contentType==="MediaModel"}function co(i){if(Array.isArray(i)&&i.length===4){const e=i.map(hn);return ki(e[0],e[2])}else return hn(i)}function na(i){if(Nm(i))return ot(i==null?void 0:i.position);if(Ne(i)&&i.matrix){const t=new R.Matrix4().fromArray(i.matrix),e=i.data.mediaPosition.map(n=>new R.Vector3().fromArray(n).applyMatrix4(t));return ki(e[0],e[2])}else return co(i.position)}function yn(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 Xm(i){return new Promise(t=>{i.model.loaded?t():i.once("modelLoaded",()=>t())})}function Ym(i,t,e){const o=new k.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new k.Vector3(0,1,0)).setLength(.01),r=new k.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 k.Vector3))}const ia=(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 Um(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function Jm(i,t){const[e,n]=t;if(e>=n||n<=1||e<=1)return-1;const o={},s=r=>(o[r]||(o[r]=i(r)),o[r]);for(let r=e;r<n;r++){const a=s(r),l=s(r-1);if(a<l)return r}return-1}function oa(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 Zm(){return Math.random().toString(36).slice(-6)}const uo=Zm();function qm(i){le(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function sa(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 Km(i){let t,e=i[0]+"",n,o=i[20];const s=()=>i[9](t,o),r=()=>i[9](null,o);return{c(){t=j("span"),n=Ie(e),b(t,"class","text-char svelte-1b2n9wi")},m(a,l){B(a,t,l),Q(t,n),s()},p(a,l){i=a,l&4&&e!==(e=i[0]+"")&&Le(n,e),o!==i[20]&&(r(),o=i[20],s())},d(a){a&&z(t),r()}}}function $m(i){let t,e=i[20];const n=()=>i[8](t,e),o=()=>i[8](null,e);return{c(){t=j("span"),t.textContent="\xA0",b(t,"class","text-char svelte-1b2n9wi")},m(s,r){B(s,t,r),n()},p(s,r){i=s,e!==i[20]&&(o(),e=i[20],n())},d(s){s&&z(t),o()}}}function ra(i,t){let e,n;function o(a,l){return a[0]===a[3]?$m:Km}let s=o(t),r=s(t);return{key:i,first:null,c(){e=me(),r.c(),n=me(),this.first=e},m(a,l){B(a,e,l),r.m(a,l),B(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&&z(e),r.d(a),a&&z(n)}}}function ep(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=sa(i,o,r),l=s(a);e.set(l,t[r]=ra(l,a))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();n=me()},m(r,a){for(let l=0;l<t.length;l+=1)t[l].m(r,a);B(r,n,a)},p(r,[a]){a&14&&(o=r[2],t=qe(t,a,s,1,r,o,e,n.parentNode,Fi,ra,n,sa))},i:J,o:J,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&z(n)}}}function tp(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_${uo}__`,d=`__EMOJI_${uo}__`,u=`__SPACE_${uo}__`;let f,h,p=[];function A(E){const P=[],L=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 E.slice().replace(L,D=>`${c}${d}${D}${c}`).split(c).forEach(D=>D.startsWith(d)?P.push({id:He(),content:D.slice(d.length)}):P.push(...D.split("").map(T=>T===" "?u:T).map(T=>({id:He(),content:T})))),P}function g(){if(!h)return;const E=!a;h.reversed!==E&&h.reverse(),h.play()}function v(E){if(l){e(4,l=!1);return}clearTimeout(f),f=setTimeout(g,E?o:s)}function w(E){const P=function(){const L=Jm(D=>E[D].getBoundingClientRect().x,[Math.min(E.length-1,10),Math.min(E.length-1,30)]);if(L>0)return L}();h=Mo.default({targets:E.slice(0,P).filter(Xe),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:Mo.default.stagger(50),easing:"easeInOutCubic"}),a&&h.seek(h.duration)}function y(E,P){ze[E?"unshift":"push"](()=>{p[P]=E,e(1,p)})}function C(E,P){ze[E?"unshift":"push"](()=>{p[P]=E,e(1,p)})}return i.$$set=E=>{"inDelay"in E&&e(5,o=E.inDelay),"outDelay"in E&&e(6,s=E.outDelay),"content"in E&&e(0,r=E.content),"unfolded"in E&&e(7,a=E.unfolded),"isFistUnfoldedUpdate"in E&&e(4,l=E.isFistUnfoldedUpdate)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=A(r)),i.$$.dirty&128&&v(a),i.$$.dirty&2&&w(p.filter(E=>!!E))},[r,p,n,u,l,o,s,a,y,C]}class aa extends se{constructor(t){super(),oe(this,t,tp,ep,ie,{inDelay:5,outDelay:6,content:0,unfolded:7,isFistUnfoldedUpdate:4},qm)}}const np="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcUNSe2/Z9yISiSGxRkUAy4BGZSVX168gistraYsQKxArECsQKxApYqkDyU5lmsznMM+ZgAGpQhaUkSRbINgLJCXiCBtSgAkVYtGGIBTKj8AgKSVahDNvQa0IUkUG4Bx91BpLdBTOS/cgUIB3a+gMwI9mFzE3a0I3z5B4r292JzGVA8tSSZILMcUDyzIykthOZvYDk+V9Ktmz4yGzhOhV4/+5YU4N/hzqo0StX3Fg5TcnNlYvgs8bPsM4hkScHoyO46haRnGEYktQVI+4ypUYKyXtxyUu27JCceAMJvjo0HoM5CEZ7cPX7i013q3IWVV5r2aw/2TK+svWbPGU68KQCa6pYeus1V0X99quSfvtVSc39lmfz2mdbz32tg1dAJ0421AVs9E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nsjF/ls0r980YRQDlAqBylIqylcCzf4lHecB5veigSfmYoBycaxN2SHgT8e7pWKZwCzqzZpigUr9DlRuoIxXn8pIZJgHtkwpa8togHIiw587LeNx9mc2ZwIK5DOlXJaMFqhWwoMp/Ax+1W+ToOXTHGKNrDMLLo38LmKsQKmbdSrWil+N82UJaS40YTuJv/RdtAdpzet+aJDzvMpQV71oo2gYX5RXG2HnYZXtouzNRzXE3R0KE6jWjZU2iaZ9u8pqpU3UfvwrYSgSBVDtGDurBlHn/zj0QMIh7qlDNOfmcBj9ihKo9o+l1euiWGxSE5eun3na6jxQk3joEgdQ7TR+FWutE43lhQpph3sQvISAVRa9ppRzipY4gZqdw8/WigIWDWt1gD8EIsqSLlT/KPUVlKSAujs2XTLYeRHiIlA2DVi1qkRtK8PSULaEDF+Ue7ashwkTlf8DQc/cITdx9+UAAAAASUVORK5CYII=",sp="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+ekHVxbWhnRC8nDLc9s8oAAAOGSURBVEjHp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v4kVQZGavpt6c6l3tLpNsc38gGOC01IeLg4Xi8NaLz1KkqO0VzvcTrFscYo4oLjiRAsKEXeJPRqxW0bsFWLGLVbiocyZSm5vbW0nU9BsIfyp/AGqAvfOkBaFawAAAABJRU5ErkJggg==";function rp(i){le(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 la(i){let t,e,n,o,s,r,a,l,c,d;return e=new et({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=j("div"),ee(e.$$.fragment),n=te(),o=j("div"),b(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),M(o,"background-image","url("+np+")"),b(t,"class","arrow-wrapper svelte-1ogmlqq")},m(u,f){B(u,t,f),K(e,t,null),Q(t,n),Q(t,o),l=!0,c||(d=Me(o,"click",i[5]),c=!0)},p(u,f){i=u,(!l||f&1&&s!==(s="arrow "+i[0]+" svelte-1ogmlqq"))&&b(o,"class",s)},i(u){l||(x(e.$$.fragment,u),u&&Se(()=>{a&&a.end(1),r=Tt(o,Vt,{duration:i[2],delay:i[3],easing:Kt}),r.start()}),l=!0)},o(u){S(e.$$.fragment,u),r&&r.invalidate(),u&&(a=qt(o,Vt,{duration:i[2],delay:i[4],easing:Kt})),l=!1},d(u){u&&z(t),$(e),u&&a&&a.end(),c=!1,d()}}}function ap(i){let t,e,n=i[1]&&la(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=la(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function lp(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){Vi.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 cp extends se{constructor(t){super(),oe(this,t,lp,ap,ie,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},rp)}}function dp(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 up(i){le(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 ca(i){let t,e,n;return e=new aa({props:{unfolded:i[0],content:i[1],inDelay:500,outDelay:i[5]}}),{c(){t=j("div"),ee(e.$$.fragment),b(t,"class","text svelte-1fuzm7v"),M(t,"transform",i[7])},m(o,s){B(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&&M(t,"transform",o[7])},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e),i[10](null)}}}function da(i){let t,e,n;return e=new cp({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=j("div"),ee(e.$$.fragment),b(t,"class","arrow svelte-1fuzm7v")},m(o,s){B(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||(x(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function fp(i){let t,e,n,o=i[1]&&ca(i),s=i[3]<i[4]&&da(i);return{c(){o&&o.c(),t=te(),s&&s.c(),e=me()},m(r,a){o&&o.m(r,a),B(r,t,a),s&&s.m(r,a),B(r,e,a),n=!0},p(r,[a]){r[1]?o?(o.p(r,a),a&2&&x(o,1)):(o=ca(r),o.c(),x(o,1),o.m(t.parentNode,t)):o&&(re(),S(o,1,1,()=>{o=null}),ae()),r[3]<r[4]?s?(s.p(r,a),a&24&&x(s,1)):(s=da(r),s.c(),x(s,1),s.m(e.parentNode,e)):s&&(re(),S(s,1,1,()=>{s=null}),ae())},i(r){n||(x(o),x(s),n=!0)},o(r){S(o),S(s),n=!1},d(r){o&&o.d(r),r&&z(t),s&&s.d(r),r&&z(e)}}}function hp(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,d=0,u=0,f=0;function h(p){ze[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,f=c.offsetHeight),dp(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,f=c.offsetHeight)}),e(3,u=Number(p.replace("px","")))}i.$$.dirty&280&&e(9,d=a?u-f:0),i.$$.dirty&512&&e(7,n=`translateY(${d}px)`),i.$$.dirty&256&&e(6,o=a?"left":"right"),i.$$.dirty&256&&e(5,s=a?450:0)},[r,l,c,u,f,s,o,n,a,d,h]}class ua extends se{constructor(t){super(),oe(this,t,hp,fp,ie,{visible:0,textUnfolded:8,content:1},up)}}function mp(i){le(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 fa(i){var u,f;let t,e,n,o,s,r,a,l,c,d;return t=new et({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),n=new ao({props:{unfolded:i[2],length:i[3],outDelay:i[4]+40*Math.min((f=(u=i[6][0])==null?void 0:u.content.length)!=null?f:10,15),useLinearColor:!0}}),r=new ua({props:{visible:i[2],textUnfolded:i[1],content:i[5]}}),{c(){ee(t.$$.fragment),e=te(),ee(n.$$.fragment),o=te(),s=j("div"),ee(r.$$.fragment),b(s,"class","content svelte-nlvd3x"),Se(()=>i[8].call(s))},m(h,p){K(t,h,p),B(h,e,p),K(n,h,p),B(h,o,p),B(h,s,p),K(r,s,null),a=bt(s,i[8].bind(s)),l=!0,c||(d=Me(s,"click",i[7]),c=!0)},p(h,p){var w,y;const A={};p&4&&(A.visible=h[2]),p&8&&(A.left=h[3]/2+"px"),t.$set(A);const g={};p&4&&(g.unfolded=h[2]),p&8&&(g.length=h[3]),p&16&&(g.outDelay=h[4]+40*Math.min((y=(w=h[6][0])==null?void 0:w.content.length)!=null?y:10,15)),n.$set(g);const v={};p&4&&(v.visible=h[2]),p&2&&(v.textUnfolded=h[1]),p&32&&(v.content=h[5]),r.$set(v)},i(h){l||(x(t.$$.fragment,h),x(n.$$.fragment,h),x(r.$$.fragment,h),l=!0)},o(h){S(t.$$.fragment,h),S(n.$$.fragment,h),S(r.$$.fragment,h),l=!1},d(h){$(t,h),h&&z(e),$(n,h),h&&z(o),h&&z(s),$(r),a(),c=!1,d()}}}function pp(i){let t,e,n=i[0].state&&fa(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=fa(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function gp(i,t,e){let n,o,s,{tag:r}=t,a,l=!1,c=[];function d(){e(1,l=!l)}function u(){a=this.clientWidth,e(3,a)}return i.$$set=f=>{"tag"in f&&e(0,r=f.tag)},i.$$.update=()=>{var f,h,p;i.$$.dirty&1&&e(2,n=!!((f=r.state)!=null&&f.unfolded)),i.$$.dirty&1&&e(5,o=(p=(h=r.data.title)!=null?h: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,d,u]}class Ap extends se{constructor(t){super(),oe(this,t,gp,pp,ie,{tag:0},mp)}}function Pe(i){return i/16+"rem"}function vp(i){le(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 bp(i){let t;const e=i[6].default,n=rt(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)&&lt(n,e,o,o[5],t?at(e,o[5],s,null):ct(o[5]),null)},i(o){t||(x(n,o),t=!0)},o(o){S(n,o),t=!1},d(o){n&&n.d(o)}}}function yp(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)&&ma(i);return{c(){n&&n.c(),t=te(),o&&o.c(),e=me()},m(a,l){n&&n.m(a,l),B(a,t,l),o&&o.m(a,l),B(a,e,l)},p(a,l){var c,d;(c=a[3])!=null&&c.inputting?n||(n=ha(),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),(d=a[3])!=null&&d.placeholder?o?o.p(a,l):(o=ma(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:J,o:J,d(a){n&&n.d(a),a&&z(t),o&&o.d(a),a&&z(e)}}}function wp(i){let t;return{c(){t=Ie(i[2])},m(e,n){B(e,t,n)},p(e,n){n&4&&Le(t,e[2])},i:J,o:J,d(e){e&&z(t)}}}function ha(i){let t;return{c(){t=j("div"),b(t,"class","caret svelte-i9wdo4")},m(e,n){B(e,t,n)},d(e){e&&z(t)}}}function ma(i){let t,e=i[3].placeholder+"",n;return{c(){t=j("span"),n=Ie(e),b(t,"class","placeholder svelte-i9wdo4")},m(o,s){B(o,t,s),Q(t,n)},p(o,s){s&8&&e!==(e=o[3].placeholder+"")&&Le(n,e)},d(o){o&&z(t)}}}function Cp(i){let t,e,n,o;const s=[wp,yp,bp],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=j("div"),n.c(),b(t,"class","text svelte-i9wdo4"),M(t,"max-width",typeof i[1]=="number"?Pe(i[1]):i[1]),M(t,"-webkit-line-clamp",i[0])},m(l,c){B(l,t,c),r[e].m(t,null),o=!0},p(l,[c]){let d=e;e=a(l),e===d?r[e].p(l,c):(re(),S(r[d],1,1,()=>{r[d]=null}),ae(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),x(n,1),n.m(t,null)),c&2&&M(t,"max-width",typeof l[1]=="number"?Pe(l[1]):l[1]),c&1&&M(t,"-webkit-line-clamp",l[0])},i(l){o||(x(n),o=!0)},o(l){S(n),o=!1},d(l){l&&z(t),r[e].d()}}}function Pp(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=d=>{"maxLine"in d&&e(0,r=d.maxLine),"maxWidth"in d&&e(1,a=d.maxWidth),"text"in d&&e(2,l=d.text),"edit"in d&&e(3,c=d.edit),"$$scope"in d&&e(5,s=d.$$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 fo extends se{constructor(t){super(),oe(this,t,Pp,Cp,ie,{maxLine:0,maxWidth:1,text:2,edit:3},vp)}}function Ip(i){le(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 pa(i){var u,f;let t,e,n,o,s,r,a,l,c;t=new ao({props:{unfolded:i[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new fo({props:{text:i[2],edit:(u=i[0].data.edit)==null?void 0:u.title}});let d=(i[0].data.description||((f=i[0].data.edit)==null?void 0:f.description))&&ga(i);return{c(){ee(t.$$.fragment),e=te(),n=j("div"),o=j("div"),s=j("div"),r=j("div"),ee(a.$$.fragment),l=te(),d&&d.c(),b(r,"class","title svelte-1oxrkr1"),b(s,"class","plane svelte-1oxrkr1"),b(o,"class","plane__wrapper svelte-1oxrkr1"),M(o,"transform",i[1]?"translateY(-15px)":"translateY(0)"),b(n,"class","plane__container svelte-1oxrkr1"),ne(n,"unfolded",i[1]),ne(n,"folded",i[3])},m(h,p){K(t,h,p),B(h,e,p),B(h,n,p),Q(n,o),Q(o,s),Q(s,r),K(a,r,null),Q(s,l),d&&d.m(s,null),c=!0},p(h,p){var v,w;const A={};p&2&&(A.unfolded=h[1]),t.$set(A);const g={};p&4&&(g.text=h[2]),p&1&&(g.edit=(v=h[0].data.edit)==null?void 0:v.title),a.$set(g),h[0].data.description||((w=h[0].data.edit)==null?void 0:w.description)?d?(d.p(h,p),p&1&&x(d,1)):(d=ga(h),d.c(),x(d,1),d.m(s,null)):d&&(re(),S(d,1,1,()=>{d=null}),ae()),p&2&&M(o,"transform",h[1]?"translateY(-15px)":"translateY(0)"),(!c||p&2)&&ne(n,"unfolded",h[1]),(!c||p&8)&&ne(n,"folded",h[3])},i(h){c||(x(t.$$.fragment,h),x(a.$$.fragment,h),x(d),c=!0)},o(h){S(t.$$.fragment,h),S(a.$$.fragment,h),S(d),c=!1},d(h){$(t,h),h&&z(e),h&&z(n),$(a),d&&d.d()}}}function ga(i){var o;let t,e,n;return e=new fo({props:{text:i[0].data.description,edit:(o=i[0].data.edit)==null?void 0:o.description,maxLine:3}}),{c(){t=j("div"),ee(e.$$.fragment),b(t,"class","description svelte-1oxrkr1")},m(s,r){B(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||(x(e.$$.fragment,s),n=!0)},o(s){S(e.$$.fragment,s),n=!1},d(s){s&&z(t),$(e)}}}function Ep(i){let t,e,n=i[0].state&&pa(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=pa(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function kp(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 xp extends se{constructor(t){super(),oe(this,t,kp,Ep,ie,{tag:0},Ip)}}function Dp(i){let t,e;return t=new xp({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||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Lp(i){let t,e;return t=new Ap({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||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Sp(i){let t,e,n,o;const s=[Lp,Dp],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=me()},m(l,c){~t&&r[t].m(l,c),B(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(re(),S(r[d],1,1,()=>{r[d]=null}),ae()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),x(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(x(e),o=!0)},o(l){S(e),o=!1},d(l){~t&&r[t].d(l),l&&z(n)}}}function Mp(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 zp extends se{constructor(t){super(),oe(this,t,Mp,Sp,ie,{tag:0})}}function Bp(i){le(i,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function Aa(i){let t,e,n,o;return{c(){t=ve("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){B(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&Se(()=>{n&&n.end(1),e=Tt(t,qn,{duration:i[1],delay:i[0],easing:cs}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=qt(t,qn,{duration:i[1],delay:i[2],easing:Kt})),o=!1},d(s){s&&z(t),s&&n&&n.end()}}}function Tp(i){let t,e,n,o,s,r=i[3]&&Aa(i);return{c(){t=ve("svg"),e=ve("defs"),n=ve("linearGradient"),o=ve("stop"),s=ve("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){B(a,t,l),Q(t,e),Q(e,n),Q(n,o),Q(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&x(r,1)):(r=Aa(a),r.c(),x(r,1),r.m(t,null)):r&&(re(),S(r,1,1,()=>{r=null}),ae())},i(a){x(r)},o(a){S(r)},d(a){a&&z(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=He();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class Vp extends se{constructor(t){super(),oe(this,t,jp,Tp,ie,{inDelay:0,duration:1,outDelay:2,unfolded:3},Bp)}}function Gt(i){return typeof i=="object"&&i!==null&&i.constructor&&Object.prototype.toString.call(i).slice(8,-1)==="Object"}function xt(i,t){const e=["__proto__","constructor","prototype"];Object.keys(t).filter(n=>e.indexOf(n)<0).forEach(n=>{typeof i[n]=="undefined"?i[n]=t[n]:Gt(t[n])&&Gt(i[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?i[n]=t[n]:xt(i[n],t[n]):i[n]=t[n]})}function ho(i={}){return i.navigation&&typeof i.navigation.nextEl=="undefined"&&typeof i.navigation.prevEl=="undefined"}function mo(i={}){return i.pagination&&typeof i.pagination.el=="undefined"}function po(i={}){return i.scrollbar&&typeof i.scrollbar.el=="undefined"}function gi(i=""){const t=i.split(" ").map(n=>n.trim()).filter(n=>!!n),e=[];return t.forEach(n=>{e.indexOf(n)<0&&e.push(n)}),e.join(" ")}const va=["modules","init","_direction","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_preloadImages","updateOnImagesReady","_loop","_loopAdditionalSlides","_loopedSlides","_loopedSlidesLimit","_loopFillGroupWithBlank","loopPreventsSlide","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideBlankClass","slideActiveClass","slideDuplicateActiveClass","slideVisibleClass","slideDuplicateClass","slideNextClass","slideDuplicateNextClass","slidePrevClass","slideDuplicatePrevClass","wrapperClass","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","lazy","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom"];function Qp(i={},t=!0){const e={on:{}},n={},o={};xt(e,Ii.default.defaults),xt(e,Ii.default.extendedDefaults),e._emitClasses=!0,e.init=!1;const s={},r=va.map(l=>l.replace(/_/,"")),a=Object.assign({},i);return Object.keys(a).forEach(l=>{typeof i[l]!="undefined"&&(r.indexOf(l)>=0?Gt(i[l])?(e[l]={},o[l]={},xt(e[l],i[l]),xt(o[l],i[l])):(e[l]=i[l],o[l]=i[l]):l.search(/on[A-Z]/)===0&&typeof i[l]=="function"?t?n[`${l[2].toLowerCase()}${l.substr(3)}`]=i[l]:e.on[`${l[2].toLowerCase()}${l.substr(3)}`]=i[l]:s[l]=i[l])}),["navigation","pagination","scrollbar"].forEach(l=>{e[l]===!0&&(e[l]={}),e[l]===!1&&delete e[l]}),{params:e,passedParams:o,rest:s,events:n}}function Op({el:i,nextEl:t,prevEl:e,paginationEl:n,scrollbarEl:o,swiper:s},r){ho(r)&&t&&e&&(s.params.navigation.nextEl=t,s.originalParams.navigation.nextEl=t,s.params.navigation.prevEl=e,s.originalParams.navigation.prevEl=e),mo(r)&&n&&(s.params.pagination.el=n,s.originalParams.pagination.el=n),po(r)&&o&&(s.params.scrollbar.el=o,s.originalParams.scrollbar.el=o),s.init(i)}function Rp(i,t,e,n,o){const s=[];if(!t)return s;const r=l=>{s.indexOf(l)<0&&s.push(l)};if(e&&n){const l=n.map(o),c=e.map(o);l.join("")!==c.join("")&&r("children"),n.length!==e.length&&r("children")}return va.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in i&&l in t)if(Gt(i[l])&&Gt(t[l])){const c=Object.keys(i[l]),d=Object.keys(t[l]);c.length!==d.length?r(l):(c.forEach(u=>{i[l][u]!==t[l][u]&&r(l)}),d.forEach(u=>{i[l][u]!==t[l][u]&&r(l)}))}else i[l]!==t[l]&&r(l)}),s}function Fp({swiper:i,slides:t,passedParams:e,changedParams:n,nextEl:o,prevEl:s,scrollbarEl:r,paginationEl:a}){const l=n.filter(E=>E!=="children"&&E!=="direction"),{params:c,pagination:d,navigation:u,scrollbar:f,virtual:h,thumbs:p}=i;let A,g,v,w,y;n.includes("thumbs")&&e.thumbs&&e.thumbs.swiper&&c.thumbs&&!c.thumbs.swiper&&(A=!0),n.includes("controller")&&e.controller&&e.controller.control&&c.controller&&!c.controller.control&&(g=!0),n.includes("pagination")&&e.pagination&&(e.pagination.el||a)&&(c.pagination||c.pagination===!1)&&d&&!d.el&&(v=!0),n.includes("scrollbar")&&e.scrollbar&&(e.scrollbar.el||r)&&(c.scrollbar||c.scrollbar===!1)&&f&&!f.el&&(w=!0),n.includes("navigation")&&e.navigation&&(e.navigation.prevEl||s)&&(e.navigation.nextEl||o)&&(c.navigation||c.navigation===!1)&&u&&!u.prevEl&&!u.nextEl&&(y=!0);const C=E=>{!i[E]||(i[E].destroy(),E==="navigation"?(c[E].prevEl=void 0,c[E].nextEl=void 0,i[E].prevEl=void 0,i[E].nextEl=void 0):(c[E].el=void 0,i[E].el=void 0))};l.forEach(E=>{if(Gt(c[E])&&Gt(e[E]))xt(c[E],e[E]);else{const P=e[E];(P===!0||P===!1)&&(E==="navigation"||E==="pagination"||E==="scrollbar")?P===!1&&C(E):c[E]=e[E]}}),l.includes("controller")&&!g&&i.controller&&i.controller.control&&c.controller&&c.controller.control&&(i.controller.control=c.controller.control),n.includes("children")&&t&&h&&c.virtual.enabled?(h.slides=t,h.update(!0)):n.includes("children")&&i.lazy&&i.params.lazy.enabled&&i.lazy.load(),A&&p.init()&&p.update(!0),g&&(i.controller.control=c.controller.control),v&&(a&&(c.pagination.el=a),d.init(),d.render(),d.update()),w&&(r&&(c.scrollbar.el=r),f.init(),f.updateSize(),f.setTranslate()),y&&(o&&(c.navigation.nextEl=o),s&&(c.navigation.prevEl=s),u.init(),u.update()),n.includes("allowSlideNext")&&(i.allowSlideNext=e.allowSlideNext),n.includes("allowSlidePrev")&&(i.allowSlidePrev=e.allowSlidePrev),n.includes("direction")&&i.changeDirection(e.direction,!1),i.update()}const Gp=i=>({virtualData:i&512}),ba=i=>({virtualData:i[9]}),Hp=i=>({virtualData:i&512}),ya=i=>({virtualData:i[9]}),Wp=i=>({virtualData:i&512}),wa=i=>({virtualData:i[9]}),Np=i=>({virtualData:i&512}),Ca=i=>({virtualData:i[9]}),_p=i=>({virtualData:i&512}),Pa=i=>({virtualData:i[9]});function Ia(i){let t,e,n;return{c(){t=j("div"),e=te(),n=j("div"),b(t,"class","swiper-button-prev"),b(n,"class","swiper-button-next")},m(o,s){B(o,t,s),i[13](t),B(o,e,s),B(o,n,s),i[14](n)},p:J,d(o){o&&z(t),i[13](null),o&&z(e),o&&z(n),i[14](null)}}}function Ea(i){let t;return{c(){t=j("div"),b(t,"class","swiper-scrollbar")},m(e,n){B(e,t,n),i[15](t)},p:J,d(e){e&&z(t),i[15](null)}}}function ka(i){let t;return{c(){t=j("div"),b(t,"class","swiper-pagination")},m(e,n){B(e,t,n),i[16](t)},p:J,d(e){e&&z(t),i[16](null)}}}function Xp(i){let t,e,n,o,s,r,a=ho(i[2]),l,c=po(i[2]),d,u=mo(i[2]),f,h,p;const A=i[12]["container-start"],g=rt(A,i,i[11],Pa),v=i[12]["wrapper-start"],w=rt(v,i,i[11],Ca),y=i[12].default,C=rt(y,i,i[11],wa),E=i[12]["wrapper-end"],P=rt(E,i,i[11],ya);let L=a&&Ia(i),D=c&&Ea(i),T=u&&ka(i);const W=i[12]["container-end"],G=rt(W,i,i[11],ba);let Y=[{class:h=gi(`${i[1]}${i[0]?` ${i[0]}`:""}`)},i[3]],V={};for(let I=0;I<Y.length;I+=1)V=Ce(V,Y[I]);return{c(){t=j("div"),g&&g.c(),e=te(),n=j("div"),w&&w.c(),o=te(),C&&C.c(),s=te(),P&&P.c(),r=te(),L&&L.c(),l=te(),D&&D.c(),d=te(),T&&T.c(),f=te(),G&&G.c(),b(n,"class","swiper-wrapper"),Qn(t,V)},m(I,O){B(I,t,O),g&&g.m(t,null),Q(t,e),Q(t,n),w&&w.m(n,null),Q(n,o),C&&C.m(n,null),Q(n,s),P&&P.m(n,null),Q(t,r),L&&L.m(t,null),Q(t,l),D&&D.m(t,null),Q(t,d),T&&T.m(t,null),Q(t,f),G&&G.m(t,null),i[17](t),p=!0},p(I,[O]){g&&g.p&&(!p||O&2560)&&lt(g,A,I,I[11],p?at(A,I[11],O,_p):ct(I[11]),Pa),w&&w.p&&(!p||O&2560)&&lt(w,v,I,I[11],p?at(v,I[11],O,Np):ct(I[11]),Ca),C&&C.p&&(!p||O&2560)&&lt(C,y,I,I[11],p?at(y,I[11],O,Wp):ct(I[11]),wa),P&&P.p&&(!p||O&2560)&&lt(P,E,I,I[11],p?at(E,I[11],O,Hp):ct(I[11]),ya),O&4&&(a=ho(I[2])),a?L?L.p(I,O):(L=Ia(I),L.c(),L.m(t,l)):L&&(L.d(1),L=null),O&4&&(c=po(I[2])),c?D?D.p(I,O):(D=Ea(I),D.c(),D.m(t,d)):D&&(D.d(1),D=null),O&4&&(u=mo(I[2])),u?T?T.p(I,O):(T=ka(I),T.c(),T.m(t,f)):T&&(T.d(1),T=null),G&&G.p&&(!p||O&2560)&&lt(G,W,I,I[11],p?at(W,I[11],O,Gp):ct(I[11]),ba),Qn(t,V=Te(Y,[(!p||O&3&&h!==(h=gi(`${I[1]}${I[0]?` ${I[0]}`:""}`)))&&{class:h},O&8&&I[3]]))},i(I){p||(x(g,I),x(w,I),x(C,I),x(P,I),x(G,I),p=!0)},o(I){S(g,I),S(w,I),S(C,I),S(P,I),S(G,I),p=!1},d(I){I&&z(t),g&&g.d(I),w&&w.d(I),C&&C.d(I),P&&P.d(I),L&&L.d(),D&&D.d(),T&&T.d(),G&&G.d(I),i[17](null)}}}function Yp(i,t,e){const n=["class","swiper"];let o=Vn(t,n),{$$slots:s={},$$scope:r}=t;const a=Hn();let{class:l=void 0}=t,c="swiper",d=!1,u=null,f=null,h,p,A,g,v=null,w=null,y=null,C=null,E=null,P={slides:[]};function L(){return u}const D=F=>{e(9,P=F),fc().then(()=>{u.$wrapperEl.children(".swiper-slide").each(N=>{N.onSwiper&&N.onSwiper(u)}),u.updateSlides(),u.updateProgress(),u.updateSlidesClasses(),u.lazy&&u.params.lazy.enabled&&u.lazy.load()})},T=()=>{h=Qp(o),e(2,p=h.params),A=h.passedParams,e(3,g=h.rest)};T(),f=A;const W=()=>{d=!0};if(p.onAny=(F,...N)=>{a(F,N)},Object.assign(p.on,{_beforeBreakpoint:W,_containerClasses(F,N){e(1,c=N)}}),u=new Ii.default(p),Wn("swiper",u),u.virtual&&u.params.virtual.enabled){const F={cache:!1,renderExternal:N=>{D(N),p.virtual&&p.virtual.renderExternal&&p.virtual.renderExternal(N)},renderExternalUpdate:!1};xt(u.params.virtual,F),xt(u.originalParams.virtual,F)}Ze(()=>{!v||(Op({el:v,nextEl:y,prevEl:w,paginationEl:E,scrollbarEl:C,swiper:u},p),a("swiper",[u]),!p.virtual&&u.slides.each(F=>{F.onSwiper&&F.onSwiper(u)}))}),ji(()=>{if(!u)return;T();const F=Rp(A,f);(F.length||d)&&u&&!u.destroyed&&Fp({swiper:u,passedParams:A,changedParams:F,nextEl:y,prevEl:w,scrollbarEl:C,paginationEl:E}),d=!1,f=A}),wt(()=>{typeof window!="undefined"&&u&&!u.destroyed&&u.destroy(!0,!1)});function G(F){ze[F?"unshift":"push"](()=>{w=F,e(5,w)})}function Y(F){ze[F?"unshift":"push"](()=>{y=F,e(6,y)})}function V(F){ze[F?"unshift":"push"](()=>{C=F,e(7,C)})}function I(F){ze[F?"unshift":"push"](()=>{E=F,e(8,E)})}function O(F){ze[F?"unshift":"push"](()=>{v=F,e(4,v)})}return i.$$set=F=>{t=Ce(Ce({},t),_o(F)),e(27,o=Vn(t,n)),"class"in F&&e(0,l=F.class),"$$scope"in F&&e(11,r=F.$$scope)},[l,c,p,g,v,w,y,C,E,P,L,r,s,G,Y,V,I,O]}class Up extends se{constructor(t){super(),oe(this,t,Yp,Xp,ie,{class:0,swiper:10})}get swiper(){return this.$$.ctx[10]}}const Jp=i=>({data:i&32}),xa=i=>({data:i[5]}),Zp=i=>({data:i&32}),Da=i=>({data:i[5]});function qp(i){let t;const e=i[8].default,n=rt(e,i,i[7],xa);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&160)&&lt(n,e,o,o[7],t?at(e,o[7],s,Jp):ct(o[7]),xa)},i(o){t||(x(n,o),t=!0)},o(o){S(n,o),t=!1},d(o){n&&n.d(o)}}}function Kp(i){let t,e,n;const o=i[8].default,s=rt(o,i,i[7],Da);return{c(){t=j("div"),s&&s.c(),b(t,"class","swiper-zoom-container"),b(t,"data-swiper-zoom",e=typeof i[0]=="number"?i[0]:void 0)},m(r,a){B(r,t,a),s&&s.m(t,null),n=!0},p(r,a){s&&s.p&&(!n||a&160)&&lt(s,o,r,r[7],n?at(o,r[7],a,Zp):ct(r[7]),Da),(!n||a&1&&e!==(e=typeof r[0]=="number"?r[0]:void 0))&&b(t,"data-swiper-zoom",e)},i(r){n||(x(s,r),n=!0)},o(r){S(s,r),n=!1},d(r){r&&z(t),s&&s.d(r)}}}function $p(i){let t,e,n,o,s;const r=[Kp,qp],a=[];function l(u,f){return u[0]?0:1}e=l(i),n=a[e]=r[e](i);let c=[{class:o=gi(`${i[3]}${i[2]?` ${i[2]}`:""}`)},{"data-swiper-slide-index":i[1]},i[6]],d={};for(let u=0;u<c.length;u+=1)d=Ce(d,c[u]);return{c(){t=j("div"),n.c(),Qn(t,d)},m(u,f){B(u,t,f),a[e].m(t,null),i[9](t),s=!0},p(u,[f]){let h=e;e=l(u),e===h?a[e].p(u,f):(re(),S(a[h],1,1,()=>{a[h]=null}),ae(),n=a[e],n?n.p(u,f):(n=a[e]=r[e](u),n.c()),x(n,1),n.m(t,null)),Qn(t,d=Te(c,[(!s||f&12&&o!==(o=gi(`${u[3]}${u[2]?` ${u[2]}`:""}`)))&&{class:o},(!s||f&2)&&{"data-swiper-slide-index":u[1]},f&64&&u[6]]))},i(u){s||(x(n),s=!0)},o(u){S(n),s=!1},d(u){u&&z(t),a[e].d(),i[9](null)}}}function eg(i,t,e){let n;const o=["zoom","virtualIndex","class"];let s=Vn(t,o),{$$slots:r={},$$scope:a}=t,{zoom:l=void 0}=t,{virtualIndex:c=void 0}=t,{class:d=void 0}=t,u=null,f="swiper-slide",h=ft("swiper"),p=!1;const A=(y,C,E)=>{C===u&&e(3,f=E)},g=()=>{!h||p||(h.on("_slideClass",A),p=!0)},v=()=>{!h||(h.off("_slideClass",A),p=!1)};Ze(()=>{typeof c!="undefined"&&(e(4,u.onSwiper=y=>{h=y,g()},u),g())}),ji(()=>{if(!(!u||!h)){if(h.destroyed){f!=="swiper-slide"&&e(3,f="swiper-slide");return}g()}}),Ti(()=>{g()}),wt(()=>{!h||v()});function w(y){ze[y?"unshift":"push"](()=>{u=y,e(4,u)})}return i.$$set=y=>{t=Ce(Ce({},t),_o(y)),e(6,s=Vn(t,o)),"zoom"in y&&e(0,l=y.zoom),"virtualIndex"in y&&e(1,c=y.virtualIndex),"class"in y&&e(2,d=y.class),"$$scope"in y&&e(7,a=y.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(5,n={isActive:f.indexOf("swiper-slide-active")>=0||f.indexOf("swiper-slide-duplicate-active")>=0,isVisible:f.indexOf("swiper-slide-visible")>=0,isDuplicate:f.indexOf("swiper-slide-duplicate")>=0,isPrev:f.indexOf("swiper-slide-prev")>=0||f.indexOf("swiper-slide-duplicate-prev")>=0,isNext:f.indexOf("swiper-slide-next")>=0||f.indexOf("swiper-slide-duplicate-next")>=0})},[l,c,d,f,u,n,s,a,r,w]}class tg extends se{constructor(t){super(),oe(this,t,eg,$p,ie,{zoom:0,virtualIndex:1,class:2})}}function ng(i){le(i,"svelte-q6hk4f",".media-item.svelte-q6hk4f.svelte-q6hk4f{height:100%}.media-content.svelte-q6hk4f.svelte-q6hk4f{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.video-icon.svelte-q6hk4f.svelte-q6hk4f{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-q6hk4f.svelte-q6hk4f{display:none;pointer-events:auto;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-q6hk4f.svelte-q6hk4f{display:block}.video-icon.large.svelte-q6hk4f.svelte-q6hk4f{width:12.5rem;height:6.25rem}.video-icon.small.svelte-q6hk4f.svelte-q6hk4f{width:1.75rem;height:1.75rem}.video-icon.svelte-q6hk4f .video-icon-img.svelte-q6hk4f{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-q6hk4f .video-icon-img.canPlay.svelte-q6hk4f{cursor:pointer}")}function La(i){let t;function e(s,r){if(s[1].type==="Image")return og;if(s[1].type==="Video")return ig}let n=e(i),o=n&&n(i);return{c(){t=j("div"),o&&o.c(),b(t,"class","media-item svelte-q6hk4f")},m(s,r){B(s,t,r),o&&o.m(t,null)},p(s,r){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null)))},d(s){s&&z(t),o&&o.d()}}}function ig(i){let t,e,n,o,s,r;function a(d,u){return d[6]&&d[1].videoCoverUrl?rg:sg}let l=a(i),c=l(i);return{c(){c.c(),t=te(),e=j("div"),n=j("div"),o=j("div"),b(o,"class","video-icon-img svelte-q6hk4f"),M(o,"background-image","url("+i[14]()+")"),ne(o,"canPlay",i[4]),b(n,"class","video-icon svelte-q6hk4f"),ne(n,"large",i[3]==="large"),ne(n,"small",i[3]==="small"),b(e,"class","video-play-button-container svelte-q6hk4f"),ne(e,"showPlayButton",i[8])},m(d,u){c.m(d,u),B(d,t,u),B(d,e,u),Q(e,n),Q(n,o),s||(r=Me(o,"click",i[15]),s=!0)},p(d,u){l===(l=a(d))&&c?c.p(d,u):(c.d(1),c=l(d),c&&(c.c(),c.m(t.parentNode,t))),u&4&&M(o,"background-image","url("+d[14]()+")"),u&16&&ne(o,"canPlay",d[4]),u&8&&ne(n,"large",d[3]==="large"),u&8&&ne(n,"small",d[3]==="small"),u&256&&ne(e,"showPlayButton",d[8])},d(d){c.d(d),d&&z(t),d&&z(e),s=!1,r()}}}function og(i){let t,e,n,o;return{c(){t=j("img"),b(t,"class","media-content svelte-q6hk4f"),b(t,"style",e=`object-fit: ${i[5]};`),_e(t.src,n=i[1].url)||b(t,"src",n),b(t,"alt",o=i[1].name)},m(s,r){B(s,t,r)},p(s,r){r&32&&e!==(e=`object-fit: ${s[5]};`)&&b(t,"style",e),r&2&&!_e(t.src,n=s[1].url)&&b(t,"src",n),r&2&&o!==(o=s[1].name)&&b(t,"alt",o)},d(s){s&&z(t)}}}function sg(i){let t,e,n,o,s,r,a;return{c(){t=j("video"),b(t,"class","media-content svelte-q6hk4f"),b(t,"style",e=`object-fit: ${i[5]};`),_e(t.src,n=i[1].videoCoverUrl?i[1].url:i[1].url+"#t=0.1")||b(t,"src",n),b(t,"poster",o=i[1].videoCoverUrl),b(t,"preload",s=i[1].videoCoverUrl?"none":"auto"),b(t,"disablepictureinpicture",""),t.playsInline=!0,b(t,"paused",""),t.muted=!0,t.loop=!1,b(t,"crossorigin",""),t.controls=!1,ne(t,"showPlayButton",i[8]),M(t,"position","relative")},m(l,c){B(l,t,c),i[13](t),r||(a=Me(t,"click",i[12]),r=!0)},p(l,c){c&32&&e!==(e=`object-fit: ${l[5]};`)&&b(t,"style",e),c&2&&!_e(t.src,n=l[1].videoCoverUrl?l[1].url:l[1].url+"#t=0.1")&&b(t,"src",n),c&2&&o!==(o=l[1].videoCoverUrl)&&b(t,"poster",o),c&2&&s!==(s=l[1].videoCoverUrl?"none":"auto")&&b(t,"preload",s),c&256&&ne(t,"showPlayButton",l[8])},d(l){l&&z(t),i[13](null),r=!1,a()}}}function rg(i){let t,e,n,o;return{c(){t=j("img"),b(t,"class","media-content svelte-q6hk4f"),b(t,"style",e=`object-fit: ${i[5]};`),_e(t.src,n=i[1].videoCoverUrl)||b(t,"src",n),b(t,"alt",o=i[1].name)},m(s,r){B(s,t,r)},p(s,r){r&32&&e!==(e=`object-fit: ${s[5]};`)&&b(t,"style",e),r&2&&!_e(t.src,n=s[1].videoCoverUrl)&&b(t,"src",n),r&2&&o!==(o=s[1].name)&&b(t,"alt",o)},d(s){s&&z(t)}}}function ag(i){let t,e=i[1]&&La(i);return{c(){e&&e.c(),t=me()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[1]?e?e.p(n,o):(e=La(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:J,o:J,d(n){e&&e.d(n),n&&z(t)}}}function lg(i,t,e){let{tag:n}=t,{media:o}=t,{playButtonIfNeed:s="withoutText"}=t,{playButtonSizeIfNeed:r="small"}=t,{canPlay:a=!0}=t,{objectFit:l="cover"}=t,{disableVideoIfHavePoster:c=!1}=t,d=(o==null?void 0:o.type)==="Video"&&Boolean(o==null?void 0:o.videoCoverUrl),u,f=!1;const h=ft("mediaStore"),p=ft("hooks"),A=()=>{d||(u==null||u.play(),u==null||u.pause(),e(11,d=!0))};p.on("loadVideoFirstFrame",A);const g=C=>{u&&(u.pause(),p.emit("playStateChange",{event:C,state:"paused",tag:n,mediaInstance:u}))};function v(C){ze[C?"unshift":"push"](()=>{u=C,e(7,u)})}const w=()=>s==="withText"?ip:s==="withoutText"?op:s,y=C=>{!a||u&&(e(7,u.muted=!1,u),u.play(),h.set({currentMediaElement:u}),p.emit("playStateChange",{event:C,state:"playing",tag:n,mediaInstance:u}))};return i.$$set=C=>{"tag"in C&&e(0,n=C.tag),"media"in C&&e(1,o=C.media),"playButtonIfNeed"in C&&e(2,s=C.playButtonIfNeed),"playButtonSizeIfNeed"in C&&e(3,r=C.playButtonSizeIfNeed),"canPlay"in C&&e(4,a=C.canPlay),"objectFit"in C&&e(5,l=C.objectFit),"disableVideoIfHavePoster"in C&&e(6,c=C.disableVideoIfHavePoster)},i.$$.update=()=>{if(i.$$.dirty&128&&u&&(e(8,f=u.paused),u.addEventListener("play",()=>{e(8,f=!1)}),u.addEventListener("pause",()=>{e(8,f=!0)}),h.subscribe(({currentMediaElement:C})=>{C!==u&&(u==null||u.pause())})),i.$$.dirty&2178&&(o==null?void 0:o.type)==="Video"&&!d){const C=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,P=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&C;u&&P&&u.paused&&(document.removeEventListener("WeixinJSBridgeReady",A),document.removeEventListener("touchstart",A),document.removeEventListener("click",A),document.addEventListener("WeixinJSBridgeReady",A),document.addEventListener("touchstart",A),document.addEventListener("click",A))}},[n,o,s,r,a,l,c,u,f,h,p,d,g,v,w,y]}class Sa extends se{constructor(t){super(),oe(this,t,lg,ag,ie,{tag:0,media:1,playButtonIfNeed:2,playButtonSizeIfNeed:3,canPlay:4,objectFit:5,disableVideoIfHavePoster:6},ng)}}function cg(i){le(i,"svelte-ai0lv9",".media.svelte-ai0lv9{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}")}function Ma(i,t,e){const n=i.slice();return n[22]=t[e],n}function za(i){let t,e,n,o,s,r;const a=[ug,dg],l=[];function c(d,u){return d[12]?0:1}return e=c(i),n=l[e]=a[e](i),{c(){t=j("div"),n.c(),b(t,"class","media svelte-ai0lv9"),ne(t,"unfolded",i[5])},m(d,u){B(d,t,u),l[e].m(t,null),r=!0},p(d,u){i=d;let f=e;e=c(i),e===f?l[e].p(i,u):(re(),S(l[f],1,1,()=>{l[f]=null}),ae(),n=l[e],n?n.p(i,u):(n=l[e]=a[e](i),n.c()),x(n,1),n.m(t,null)),(!r||u&32)&&ne(t,"unfolded",i[5])},i(d){r||(x(n),d&&Se(()=>{s&&s.end(1),o=Tt(t,ds,i[6]?{y:4,duration:i[4],delay:i[2],easing:vt}:void 0),o.start()}),r=!0)},o(d){S(n),o&&o.invalidate(),d&&(s=qt(t,ds,i[6]?{y:4,duration:i[4],delay:i[3],easing:vt}:void 0)),r=!1},d(d){d&&z(t),l[e].d(),d&&s&&s.end()}}}function dg(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=Ce(o,n[s]);return t=new Sa({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&131?Te(n,[r&2&&{media:s[1][0]},r&128&&rs(s[7]),r&1&&{tag:s[0]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){S(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function ug(i){let t,e;return t=new Up({props:{style:"height: 100%",modules:[Lo.Autoplay],spaceBetween:30,autoplay:i[13]?Be({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1,loop:!0,$$slots:{default:[hg]},$$scope:{ctx:i}}}),t.$on("init",i[20]),t.$on("slideChange",i[21]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&8192&&(s.autoplay=n[13]?Be({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1),o&33555585&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function fg(i){let t,e,n;const o=[i[7],{media:i[22]},{tag:i[0]}];let s={};for(let r=0;r<o.length;r+=1)s=Ce(s,o[r]);return t=new Sa({props:s}),{c(){ee(t.$$.fragment),e=te()},m(r,a){K(t,r,a),B(r,e,a),n=!0},p(r,a){const l=a&1153?Te(o,[a&128&&rs(r[7]),a&1024&&{media:r[22]},a&1&&{tag:r[0]}]):{};t.$set(l)},i(r){n||(x(t.$$.fragment,r),n=!0)},o(r){S(t.$$.fragment,r),n=!1},d(r){$(t,r),r&&z(e)}}}function Ba(i){let t,e;return t=new i[14]({props:{$$slots:{default:[fg]},$$scope:{ctx:i}}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&33555585&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function hg(i){let t,e,n=i[10],o=[];for(let r=0;r<n.length;r+=1)o[r]=Ba(Ma(i,n,r));const s=r=>S(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=me()},m(r,a){for(let l=0;l<o.length;l+=1)o[l].m(r,a);B(r,t,a),e=!0},p(r,a){if(a&1153){n=r[10];let l;for(l=0;l<n.length;l+=1){const c=Ma(r,n,l);o[l]?(o[l].p(c,a),x(o[l],1)):(o[l]=Ba(c),o[l].c(),x(o[l],1),o[l].m(t.parentNode,t))}for(re(),l=n.length;l<o.length;l+=1)s(l);ae()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)x(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)S(o[a]);e=!1},d(r){dt(o,r),r&&z(t)}}}function mg(i){let t,e,n=i[5]&&za(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[5]?n?(n.p(o,s),s&32&&x(n,1)):(n=za(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function pg(i,t,e){let n,o,s;const r=Be(tg);let{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:d=0}=t,{duration:u=0}=t,{unfolded:f=!0}=t,{animation:h=!0}=t,{mediaItemConfig:p}=t,{enableCarousel:A=!0}=t,{autoplayConfig:g={autoplay:!0,autoplayVideo:!1}}=t;const v=ft("mediaStore"),w=ft("hooks");let y;function C(T){!n||!y||(v.set({currentMediaElement:this}),w.emit("playStateChange",{event:T,state:"playing",tag:a,mediaInstance:this}),y.autoplay.stop())}function E(T){!n||!y||(w.emit("playStateChange",{event:T,state:"paused",tag:a,mediaInstance:this}),y.autoplay.running||y.autoplay.start())}let P=null;const L=T=>{e(9,y=T.detail[0])},D=T=>X(this,null,function*(){var O,F,N;if(!s||!g.autoplayVideo)return;const W=T.detail[0];if(!W)return;const G=W.realIndex;if(G===P)return;e(11,P=G);const Y=o[G];if(!Y||Y.type!=="Video")return;W.autoplay.stop(),W.slides.map(Z=>Z.querySelector("video")).filter(Xe).forEach(Z=>Z.pause());const I=(O=W.slides[W.activeIndex])==null?void 0:O.querySelector("video");if(I&&(I.removeEventListener("play",C),I.removeEventListener("pause",E),I.addEventListener("play",C),I.addEventListener("pause",E)),I){I.addEventListener("click",()=>I.pause());const Z=(N=(F=I.parentElement)==null?void 0:F.getElementsByClassName("video-play-button-container"))==null?void 0:N[0];I.addEventListener("play",()=>Z==null?void 0:Z.classList.remove("showPlayButton")),I.addEventListener("pause",()=>Z==null?void 0:Z.classList.add("showPlayButton")),Z&&(I.paused?Z.classList.add("showPlayButton"):Z.classList.remove("showPlayButton"),Z.addEventListener("click",_=>{I.muted=!1,I.play(),v.set({currentMediaElement:I}),w.emit("playStateChange",{event:_,state:"playing",tag:a,mediaInstance:I})}))}});return i.$$set=T=>{"tag"in T&&e(0,a=T.tag),"mediaData"in T&&e(1,l=T.mediaData),"inDelay"in T&&e(2,c=T.inDelay),"outDelay"in T&&e(3,d=T.outDelay),"duration"in T&&e(4,u=T.duration),"unfolded"in T&&e(5,f=T.unfolded),"animation"in T&&e(6,h=T.animation),"mediaItemConfig"in T&&e(7,p=T.mediaItemConfig),"enableCarousel"in T&&e(19,A=T.enableCarousel),"autoplayConfig"in T&&e(8,g=T.autoplayConfig)},i.$$.update=()=>{i.$$.dirty&524290&&e(12,n=A&&(l==null?void 0:l.length)>1),i.$$.dirty&2&&e(10,o=l),i.$$.dirty&1280&&e(13,s=o.length>1&&g.autoplay),i.$$.dirty&512&&y&&y.slides.forEach(T=>{const W=T.querySelector("video");W&&v.subscribe(({currentMediaElement:G})=>{G!==W&&W.pause()})})},[a,l,c,d,u,f,h,p,g,y,o,P,n,s,r,v,w,C,E,A,L,D]}class Ta extends se{constructor(t){super(),oe(this,t,pg,mg,ie,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:19,autoplayConfig:8},cg)}}function gg(i){le(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 ja(i){let t,e,n,o,s,r,a,l;t=new et({props:{visible:i[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new Vp({props:{unfolded:i[3],outDelay:400}});let c=i[2]&&Va(i),d=i[1]&&Qa(i);return{c(){ee(t.$$.fragment),e=te(),n=j("div"),ee(o.$$.fragment),s=te(),c&&c.c(),r=te(),d&&d.c(),a=me(),b(n,"class","line svelte-1f7m1lj")},m(u,f){K(t,u,f),B(u,e,f),B(u,n,f),K(o,n,null),B(u,s,f),c&&c.m(u,f),B(u,r,f),d&&d.m(u,f),B(u,a,f),l=!0},p(u,f){const h={};f&8&&(h.visible=u[3]),t.$set(h);const p={};f&8&&(p.unfolded=u[3]),o.$set(p),u[2]?c?(c.p(u,f),f&4&&x(c,1)):(c=Va(u),c.c(),x(c,1),c.m(r.parentNode,r)):c&&(re(),S(c,1,1,()=>{c=null}),ae()),u[1]?d?(d.p(u,f),f&2&&x(d,1)):(d=Qa(u),d.c(),x(d,1),d.m(a.parentNode,a)):d&&(re(),S(d,1,1,()=>{d=null}),ae())},i(u){l||(x(t.$$.fragment,u),x(o.$$.fragment,u),x(c),x(d),l=!0)},o(u){S(t.$$.fragment,u),S(o.$$.fragment,u),S(c),S(d),l=!1},d(u){$(t,u),u&&z(e),u&&z(n),$(o),u&&z(s),c&&c.d(u),u&&z(r),d&&d.d(u),u&&z(a)}}}function Va(i){let t,e,n;return e=new aa({props:{unfolded:i[3],content:i[2],inDelay:500}}),{c(){t=j("div"),ee(e.$$.fragment),b(t,"class","text svelte-1f7m1lj")},m(o,s){B(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||(x(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function Qa(i){let t,e,n;return e=new Ta({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=j("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){B(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||(x(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function Ag(i){let t,e,n=i[0].state&&ja(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=ja(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function vg(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,d;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=((d=o.length)!=null?d:0)>7?o.substring(0,6)+"...":o),i.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,s,n,o]}class bg extends se{constructor(t){super(),oe(this,t,vg,Ag,ie,{tag:0},gg)}}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 yg{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 wg(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 Oa{constructor(t,e){m(this,"width");m(this,"height");m(this,"containerDom");m(this,"hooks",new ue.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 k.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 dn.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 k.Vector2),a=1,l=n/t,c=o/t,d=a*t,u=(s.x+1)/2*r.x,f=(s.y+1)/2*r.y,h=this.five.getPixels(u-l/2,f-l/2,l,c,d),p=Math.floor(n*a),A=Math.floor(o*a);wg(h,p,A);const g=new ImageData(p,A);g.data.set(h),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 Cg(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new k.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function Ra(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new k.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function Pg(i,t){const e=i.getElement();if(!e)return;const n=Ra(t,e),o=new k.Raycaster;return o.setFromCamera(n,i.camera),o}function Ig(i,t){const{x:e,y:n}=t,o=e*2-1,s=n*2-1,r=new k.Vector2().fromArray([o,s]),a=new k.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const Eg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhK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VvH3EaSUggQECCtsAREtI4JVAC1u/p7YCemtvjXUtAQn8JAGF7SeBGS6BNwjkW0f+/rof8boaVx3dVZw+CUjgnQQUtneCM00CFwS6Y7vY/uqyY/uKwokE5gkobPNMrXguAd43i23x6u5t3TuXllcugU0EFLZNYC17JIGIVosbEPD1evWxp5WABJ4koLA9CdB0CRQBhI1u7apTq3CnEpDADgIK2w6q1jyVQH8wJKLGunnYqTUN5xLYQEBh2wDVkscSaNF6mf/xxx9fbuNm7vZYMl64BCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",kg=`
545
545
  varying vec2 vUv;
546
546
  void main() {
547
547
  vUv = uv;
@@ -556,4 +556,4 @@ void main() {
556
556
  float match = 1.0 - uv.x;
557
557
  gl_FragColor = vec4(1.0,1.0,1.0,match);
558
558
  }
559
- `;function Dg(){const i=new k.PlaneGeometry(.4,.4),t=Eg,e=new k.TextureLoader().load(t);e.encoding=k.sRGBEncoding;const n=new k.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new k.Mesh(i,n)}function Lg(){const i=new k.CurvePath;i.add(new k.LineCurve3(new k.Vector3(0,0,0),new k.Vector3(0,0,.1)));const t=new k.TubeGeometry(i,8,.003),e=new k.ShaderMaterial({vertexShader:kg,fragmentShader:xg,depthTest:!1,transparent:!0});return new k.Mesh(t,e)}function Sg(){const i=new k.SphereGeometry(.01,20,20),t=new k.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:k.DoubleSide}),e=new k.Mesh(i,t);return e.position.set(0,0,.1),e}class Fa extends k.Object3D{constructor(){super();m(this,"planeMesh");m(this,"lineMesh");m(this,"ballMesh");this.planeMesh=Dg(),this.lineMesh=Lg(),this.ballMesh=Sg(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new k.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 Ga{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=Jt(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new k.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(${mr})`,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 k.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 qi({progress:0}).to({progress:[1,0]}).duration(500).easing(xn.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class Mg{constructor(t,e){m(this,"five");m(this,"hooks",new ue.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 k.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new Oa(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new Fa:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new Ga(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 zg=Object.freeze(Object.defineProperty({__proto__:null,Interval:go,Rectangle:yg,Magnifier:Oa,getCoordsFromClient:Cg,getCoordsFromElement:Ra,getRaycasterFromFivePointer:Pg,getIntersectFromRelativePosition:Ig,PointHelper:Fa,PointDomHelper:Ga,FivePointSelector:Mg,isNil:xm,notNil:_e,BetterTween:qi,tweenProgress:Xs,nextFrame:ti,requestAnimationFrameInterval:ni,getFrameTime:qu},Symbol.toStringTag,{value:"Module"}));function Bg(i){le(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 Ha(i,t,e){const n=i.slice();return n[0]=t[e],n}function Wa(i,t,e){const n=i.slice();return n[0]=t[e],n}function Na(i){let t,e=i[0]+"",n;return{c(){t=j("div"),n=Ie(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){B(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Le(n,e)},d(o){o&&z(t)}}}function _a(i){let t,e=i[0]&&Na(i);return{c(){e&&e.c(),t=me()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Na(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function Xa(i){let t,e=i[0]+"",n;return{c(){t=j("div"),n=Ie(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){B(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Le(n,e)},d(o){o&&z(t)}}}function Ya(i){let t,e=i[0]&&Xa(i);return{c(){e&&e.c(),t=me()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Xa(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function Ua(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&Ja(i);return{c(){t=j("div"),e=j("span"),o=Ie(n),s=te(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){B(a,t,l),Q(t,e),Q(e,o),Q(t,s),r&&r.m(t,null)},p(a,l){l&4&&n!==(n=a[2].price.value+"")&&Le(o,n),a[2].price.unit?r?r.p(a,l):(r=Ja(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&z(t),r&&r.d()}}}function Ja(i){let t,e=i[2].price.unit+"",n;return{c(){t=j("span"),n=Ie(e),b(t,"class","unit svelte-8mby9k")},m(o,s){B(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&Le(n,e)},d(o){o&&z(t)}}}function Za(i){let t,e=i[2].highlightText+"",n;return{c(){t=j("div"),n=Ie(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){B(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&Le(n,e)},d(o){o&&z(t)}}}function Tg(i){var Y,V;let t,e,n,o,s,r,a,l,c,d,u,f,h,p,A=i[2].title+"",g,v,w,y=_e((Y=i[2].price)==null?void 0:Y.value)&&((V=i[2].price)==null?void 0:V.value)!=="",C,E;e=new et({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let P=i[2].brandTags||[],L=[];for(let I=0;I<P.length;I+=1)L[I]=_a(Wa(i,P,I));let D=i[2].tags||[],T=[];for(let I=0;I<D.length;I+=1)T[I]=Ya(Ha(i,D,I));let W=y&&Ua(i),G=i[2].highlightText&&Za(i);return{c(){var I;t=j("div"),ee(e.$$.fragment),n=te(),o=j("div"),s=te(),r=j("div"),a=j("img"),c=te(),d=j("div");for(let O=0;O<L.length;O+=1)L[O].c();u=te();for(let O=0;O<T.length;O+=1)T[O].c();f=te(),h=j("div"),p=j("div"),g=Ie(A),v=te(),w=j("div"),W&&W.c(),C=te(),G&&G.c(),b(o,"class","line svelte-8mby9k"),M(o,"transition-delay",i[1]?vi+"ms":bi+Ka-qa-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),Ne(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(d,"class","tag svelte-8mby9k"),b(p,"class","text svelte-8mby9k"),b(h,"class","title svelte-8mby9k"),b(w,"class","footer svelte-8mby9k"),M(w,"height",_e((I=i[2].price)==null?void 0:I.value)&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),M(r,"transition-delay",i[1]?vi+bi+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),ne(t,"unfolded",i[1]),ne(t,"folded",i[3])},m(I,O){B(I,t,O),K(e,t,null),Q(t,n),Q(t,o),Q(t,s),Q(t,r),Q(r,a),Q(r,c),Q(r,d);for(let F=0;F<L.length;F+=1)L[F].m(d,null);Q(d,u);for(let F=0;F<T.length;F+=1)T[F].m(d,null);Q(r,f),Q(r,h),Q(h,p),Q(p,g),Q(r,v),Q(r,w),W&&W.m(w,null),Q(w,C),G&&G.m(w,null),E=!0},p(I,[O]){var N,Z,_;const F={};if(O&2&&(F.visible=I[1]),e.$set(F),O&2&&M(o,"transition-delay",I[1]?vi+"ms":bi+Ka-qa-40+"ms"),(!E||O&4&&!Ne(a.src,l=I[2].headerPictureUrl))&&b(a,"src",l),O&4){P=I[2].brandTags||[];let q;for(q=0;q<P.length;q+=1){const fe=Wa(I,P,q);L[q]?L[q].p(fe,O):(L[q]=_a(fe),L[q].c(),L[q].m(d,u))}for(;q<L.length;q+=1)L[q].d(1);L.length=P.length}if(O&4){D=I[2].tags||[];let q;for(q=0;q<D.length;q+=1){const fe=Ha(I,D,q);T[q]?T[q].p(fe,O):(T[q]=Ya(fe),T[q].c(),T[q].m(d,null))}for(;q<T.length;q+=1)T[q].d(1);T.length=D.length}(!E||O&4)&&A!==(A=I[2].title+"")&&Le(g,A),O&4&&(y=_e((N=I[2].price)==null?void 0:N.value)&&((Z=I[2].price)==null?void 0:Z.value)!==""),y?W?W.p(I,O):(W=Ua(I),W.c(),W.m(w,C)):W&&(W.d(1),W=null),I[2].highlightText?G?G.p(I,O):(G=Za(I),G.c(),G.m(w,null)):G&&(G.d(1),G=null),O&4&&M(w,"height",_e((_=I[2].price)==null?void 0:_.value)&&I[2].highlightText?void 0:"1rem"),O&2&&M(r,"transition-delay",I[1]?vi+bi+"ms":"0ms"),(!E||O&2)&&ne(t,"unfolded",I[1]),(!E||O&8)&&ne(t,"folded",I[3])},i(I){E||(x(e.$$.fragment,I),E=!0)},o(I){S(e.$$.fragment,I),E=!1},d(I){I&&z(t),$(e),dt(L,I),dt(T,I),W&&W.d(),G&&G.d()}}}const vi=400,qa=500,bi=180,Ka=500;function jg(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 Vg extends se{constructor(t){super(),oe(this,t,jg,Tg,ie,{tag:0},Bg)}}const sn="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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VVVVVVVVVVVVVUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7ksRRA8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",wn={};var yi=(i=>(i.Default="default",i.GetAudioDuration="getAudioDuration",i.PlayAudio="playAudio",i))(yi||{});function $a(i,t){const e=(t==null?void 0:t.namespace)||"default",n=wn[e]||(wn[e]=[]);let o=n.find(s=>!s.realSrc||s.realSrc===sn);return o||(console.warn("\u672A\u627E\u5230\u7F13\u5B58\u97F3\u9891\uFF0C\u5DF2\u65B0\u5EFA",wn),o=new Ao(sn),n.push(o)),i&&(o.src=i),o}function Qg(i){return X(this,null,function*(){const t=(()=>i instanceof Ao?i:$a(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 el(i,t){const e=(t==null?void 0:t.namespace)||"default",n=wn[e]||(wn[e]=[]),o=i-n.length;if(!(o<=0))for(let s=0;s<o;s++)n.push(new Ao(sn))}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=()=>Og(this);document.addEventListener("click",n),document.addEventListener("touchend",n),this.removeDocumentEventListener=()=>{document.removeEventListener("click",n),document.removeEventListener("touchend",n)}}get isBlankAudio(){return this.realSrc===sn||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e}clear(){this.src=sn,this.currentTime=0}}function Og(i){!i||i.inited||(i.src&&(i.inited=!0,i.removeDocumentEventListener()),i.src===sn&&i.play())}class Rg 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 X(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=$a(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=f=>{var h;this.sharedAudioCurrentTime=e.currentTime,(h=this.ontimeupdate)==null||h.call(this,f)},o=f=>{var h;return(h=this.onplay)==null?void 0:h.call(this,f)},s=f=>{var h;(h=this.onpause)==null||h.call(this,f),this.clear()},r=f=>{var h;(h=this.onended)==null||h.call(this,f),this.sharedAudioCurrentTime=0},a=f=>{var h;return(h=this.onerror)==null?void 0:h.call(this,f)},l=f=>{var h;return(h=this.oncanplay)==null?void 0:h.call(this,f)},c=f=>{var h;return(h=this.oncanplaythrough)==null?void 0:h.call(this,f)},d=f=>{var h;return(h=this.onloadeddata)==null?void 0:h.call(this,f)},u=f=>{var h;return(h=this.onloadedmetadata)==null?void 0:h.call(this,f)};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",d),e.addEventListener("loadedmetadata",u),()=>{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",d),e.removeEventListener("loadedmetadata",u)}}}function Fg(i){le(i,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function Gg(i){let t,e,n,o;const s=i[8].default,r=rt(s,i,i[7],null);return{c(){t=j("div"),r&&r.c(),b(t,"class","audio svelte-13e7hxv"),b(t,"style",i[0])},m(a,l){B(a,t,l),r&&r.m(t,null),e=!0,n||(o=Me(t,"click",qo(i[1])),n=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&lt(r,s,a,a[7],e?at(s,a[7],l,null):ct(a[7]),null),(!e||l&1)&&b(t,"style",a[0])},i(a){e||(x(r,a),e=!0)},o(a){S(r,a),e=!1},d(a){a&&z(t),r&&r.d(a),n=!1,o()}}}function Hg(i,t,e){let{$$slots:n={},$$scope:o}=t,{url:s}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=Hn(),d=ft("hooks"),u=ft("mediaStore");let f,h=!0;function p(){e(5,f.onplay=g=>{d.emit("playStateChange",H({event:g,state:"playing",mediaInstance:f},l)),c("play"),e(6,h=!1)},f),e(5,f.onpause=g=>{d.emit("playStateChange",H({event:g,state:"paused",mediaInstance:f},l)),c("pause"),e(6,h=!0)},f),e(5,f.onloadedmetadata=g=>{typeof f.duration=="number"&&!Number.isNaN(f.duration)&&c("duration",f.duration)},f),e(5,f.ontimeupdate=g=>{c("timeupdate",f.currentTime)},f)}u.subscribe(({currentMediaElement:g})=>{g!==f&&(h||f==null||f.pause())});function A(g){!f||(d.emit("click",H({event:g,target:"AudioTagPlayIcon",audioInstance:f},l)),u.set({currentMediaElement:f}),d.emit("playStateChange",H({event:g,state:f.paused?"playing":"paused",mediaInstance:f},l)),f.paused?f.play():f.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&&(f==null||f.dispose(),e(5,f=new Rg(s)),c("audioRef",f),setTimeout(()=>c("audioRef",f),200),Qg(s).then(g=>c("duration",g)),p()),i.$$.dirty&40&&(r||f==null||f.pause()),i.$$.dirty&72&&c(r&&!h?"play":"pause")},[a,A,s,r,l,f,h,o,n]}class tl extends se{constructor(t){super(),oe(this,t,Hg,Gg,ie,{url:2,enable:3,style:0,hooksInfo:4},Fg)}}function Wg(i){le(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 nl(i){let t,e;return t=new et({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Ng(i){let t,e,n,o,s,r=i[1]&&nl();return{c(){t=j("div"),r&&r.c(),e=te(),n=j("div"),o=j("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"),ne(n,"playing",i[0]),b(t,"class","audio-icon__wrapper svelte-srt2pi"),b(t,"style",i[2]),M(t,"width",i[5]),M(t,"height",i[5])},m(a,l){B(a,t,l),r&&r.m(t,null),Q(t,e),Q(t,n),Q(n,o),i[7](o),i[8](t),s=!0},p(a,[l]){a[1]?r?l&2&&x(r,1):(r=nl(),r.c(),x(r,1),r.m(t,e)):r&&(re(),S(r,1,1,()=>{r=null}),ae()),(!s||l&1)&&ne(n,"playing",a[0]),(!s||l&4)&&b(t,"style",a[2]),l&32&&M(t,"width",a[5]),l&32&&M(t,"height",a[5])},i(a){s||(x(r),s=!0)},o(a){S(r),s=!1},d(a){a&&z(t),r&&r.d(),i[7](null),i[8](null)}}}function _g(i,t,e){let n,{playing:o}=t,{shadow:s=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function d(f){ze[f?"unshift":"push"](()=>{c=f,e(4,c)})}function u(f){ze[f?"unshift":"push"](()=>{l=f,e(3,l)})}return i.$$set=f=>{"playing"in f&&e(0,o=f.playing),"shadow"in f&&e(1,s=f.shadow),"style"in f&&e(2,r=f.style),"width"in f&&e(6,a=f.width)},i.$$.update=()=>{i.$$.dirty&64&&e(5,n=typeof a=="number"?Pe(a):a)},[o,s,r,l,c,n,a,d,u]}class il extends se{constructor(t){super(),oe(this,t,_g,Ng,ie,{playing:0,shadow:1,style:2,width:6},Wg)}}function Xg(i){le(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 ol(i){var v,w;let t,e,n,o,s,r,a,l,c,d,u,f,h,p,A;e=new et({props:{visible:i[6],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let g=i[6]&&sl(i);return c=new ua({props:{visible:i[6],textUnfolded:i[1],content:i[5]}}),f=new ao({props:{unfolded:i[6],length:i[3],outDelay:i[4]+20*Math.min((w=(v=i[5])==null?void 0:v.length)!=null?w:10,15),useLinearColor:!0}}),{c(){t=j("div"),ee(e.$$.fragment),n=te(),o=j("div"),s=j("div"),r=j("div"),g&&g.c(),a=te(),l=j("div"),ee(c.$$.fragment),u=te(),ee(f.$$.fragment),b(r,"class","audio-icon svelte-1s6gk4a"),Se(()=>i[11].call(l)),M(l,"display","inline-block"),b(s,"class","wrapper svelte-1s6gk4a"),b(o,"class","content svelte-1s6gk4a"),b(t,"class","audio-tag svelte-1s6gk4a"),ne(t,"unfolded",i[6])},m(y,C){B(y,t,C),K(e,t,null),Q(t,n),Q(t,o),Q(o,s),Q(s,r),g&&g.m(r,null),Q(s,a),Q(s,l),K(c,l,null),d=bt(l,i[11].bind(l)),Q(t,u),K(f,t,null),h=!0,p||(A=Me(l,"click",i[7]),p=!0)},p(y,C){var D,T;const E={};C&64&&(E.visible=y[6]),C&8&&(E.left=y[3]/2+"px"),e.$set(E),y[6]?g?(g.p(y,C),C&64&&x(g,1)):(g=sl(y),g.c(),x(g,1),g.m(r,null)):g&&(re(),S(g,1,1,()=>{g=null}),ae());const P={};C&64&&(P.visible=y[6]),C&2&&(P.textUnfolded=y[1]),C&32&&(P.content=y[5]),c.$set(P);const L={};C&64&&(L.unfolded=y[6]),C&8&&(L.length=y[3]),C&48&&(L.outDelay=y[4]+20*Math.min((T=(D=y[5])==null?void 0:D.length)!=null?T:10,15)),f.$set(L),(!h||C&64)&&ne(t,"unfolded",y[6])},i(y){h||(x(e.$$.fragment,y),x(g),x(c.$$.fragment,y),x(f.$$.fragment,y),h=!0)},o(y){S(e.$$.fragment,y),S(g),S(c.$$.fragment,y),S(f.$$.fragment,y),h=!1},d(y){y&&z(t),$(e),g&&g.d(),$(c),d(),$(f),p=!1,A()}}}function sl(i){let t,e,n,o,s,r,a;return e=new et({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new tl({props:{enable:i[6],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[Yg]},$$scope:{ctx:i}}}),o.$on("play",i[8]),o.$on("pause",i[9]),o.$on("audioRef",i[10]),{c(){t=j("div"),ee(e.$$.fragment),n=te(),ee(o.$$.fragment),b(t,"class","audio svelte-1s6gk4a")},m(l,c){B(l,t,c),K(e,t,null),Q(t,n),K(o,t,null),a=!0},p(l,c){i=l;const d={};c&64&&(d.enable=i[6]),c&1&&(d.url=i[0].data.audioUrl),c&1&&(d.hooksInfo={tag:i[0]}),c&4100&&(d.$$scope={dirty:c,ctx:i}),o.$set(d)},i(l){a||(x(e.$$.fragment,l),x(o.$$.fragment,l),l&&Se(()=>{r&&r.end(1),s=Tt(t,Vt,{duration:1e3,delay:0,easing:Kt}),s.start()}),a=!0)},o(l){var c,d;S(e.$$.fragment,l),S(o.$$.fragment,l),s&&s.invalidate(),l&&(r=qt(t,Vt,{duration:1e3,delay:20*Math.min((d=(c=i[5])==null?void 0:c.length)!=null?d:10,15),easing:Kt})),a=!1},d(l){l&&z(t),$(e),$(o),l&&r&&r.end()}}}function Yg(i){let t,e,n;return e=new il({props:{playing:i[2]}}),{c(){t=j("div"),ee(e.$$.fragment),b(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){B(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||(x(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function Ug(i){let t,e,n=i[0].state&&ol(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=ol(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Jg(i,t,e){let n,o,s,{tag:r}=t,a=!1,l=!1,c;function d(){e(1,a=!a)}const u=()=>{e(2,l=!0)},f=()=>{e(2,l=!1)};function h(A){Vi.call(this,i,A)}function p(){c=this.clientWidth,e(3,c)}return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,g,v;i.$$.dirty&1&&e(6,n=!!((A=r.state)!=null&&A.unfolded)),i.$$.dirty&1&&e(5,o=(v=(g=r.data.title)!=null?g:r.data.text)!=null?v:""),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,o,n,d,u,f,h,p]}class Zg extends se{constructor(t){super(),oe(this,t,Jg,Ug,ie,{tag:0},Xg)}}function qg(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 Kg(i){le(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 rl(i){let t,e,n,o;return n=new tl({props:{style:"width: max-content; height: max-content;",enable:i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[e0]},$$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=j("div"),e=j("div"),ee(n.$$.fragment),b(e,"class","audio-tag svelte-58hfjf"),M(e,"background-color",i[1]),M(e,"color",i[5]),b(t,"class","audio-tag__wrapper svelte-58hfjf")},m(s,r){B(s,t,r),Q(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&&M(e,"background-color",s[1]),r&32&&M(e,"color",s[5])},i(s){o||(x(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&z(t),$(n)}}}function $g(i){let t;return{c(){t=Ie(i[6])},m(e,n){B(e,t,n)},p(e,n){n&64&&Le(t,e[6])},d(e){e&&z(t)}}}function e0(i){let t,e,n,o,s,r,a;return n=new il({props:{playing:i[2]}}),r=new fo({props:{maxWidth:72,$$slots:{default:[$g]},$$scope:{ctx:i}}}),{c(){t=j("div"),e=j("div"),ee(n.$$.fragment),o=te(),s=j("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){B(l,t,c),Q(t,e),K(n,e,null),Q(t,o),Q(t,s),K(r,s,null),a=!0},p(l,c){const d={};c&4&&(d.playing=l[2]),n.$set(d);const u={};c&8256&&(u.$$scope={dirty:c,ctx:l}),r.$set(u)},i(l){a||(x(n.$$.fragment,l),x(r.$$.fragment,l),a=!0)},o(l){S(n.$$.fragment,l),S(r.$$.fragment,l),a=!1},d(l){l&&z(t),$(n),$(r)}}}function t0(i){let t,e,n=i[0].state&&rl(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=rl(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function n0(i,t,e){let n,o,s,{tag:r}=t;Hn();let a=!1,l=0,c=0;const d=()=>{e(2,a=!0)},u=()=>{e(2,a=!1)},f=A=>{e(3,l=A.detail)},h=A=>{e(4,c=A.detail)};function p(A){Vi.call(this,i,A)}return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,g;i.$$.dirty&1&&e(6,n=(g=(A=r.data.title)!=null?A:r.data.text)!=null?g:""),i.$$.dirty&1&&e(1,o=(()=>{var v;return r.data.backgroundColor==="dark"?"rgba(0, 0, 0, 0.3)":r.data.backgroundColor==="light"?"rgba(255, 255, 255, 0.3)":(v=r.data.backgroundColor)!=null?v:"rgba(0, 0, 0, 0.3)"})()),i.$$.dirty&2&&e(5,s=(()=>{const{r:v,g:w,b:y}=qg(o);return(v*299+w*587+y*114)/1e3>=128?"rgba(0, 0, 0, 0.6)":"white"})())},[r,o,a,l,c,s,n,d,u,f,h,p]}class i0 extends se{constructor(t){super(),oe(this,t,n0,t0,ie,{tag:0},Kg)}}function o0(i){let t,e;return t=new i0({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||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function s0(i){let t,e;return t=new Zg({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||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function r0(i){let t,e,n,o;const s=[s0,o0],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=me()},m(l,c){~t&&r[t].m(l,c),B(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(re(),S(r[d],1,1,()=>{r[d]=null}),ae()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),x(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(x(e),o=!0)},o(l){S(e),o=!1},d(l){~t&&r[t].d(l),l&&z(n)}}}function a0(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 l0 extends se{constructor(t){super(),oe(this,t,a0,r0,ie,{tag:0})}}function c0(i){le(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function al(i){var o;let t,e,n;return e=new Ta({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=j("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(s,r){B(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||(x(e.$$.fragment,s),n=!0)},o(s){S(e.$$.fragment,s),n=!1},d(s){s&&z(t),$(e)}}}function d0(i){let t,e,n=i[0].state&&i[5]&&al(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&x(n,1)):(n=al(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function u0(i,t,e){let n,o,s,r,a,l,{tag:c}=t;return i.$$set=d=>{"tag"in d&&e(0,c=d.tag)},i.$$.update=()=>{var d,u;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=(d=c.data.autoplayConfig)!=null?d:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,l=(u=c.data.objectFit)!=null?u:(()=>c.data.adaptationMode==="stretch"?"cover":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,s,l,a,r,o,n]}class f0 extends se{constructor(t){super(),oe(this,t,u0,d0,ie,{tag:0},c0)}}function h0(i){return X(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 m0(i){return X(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 h0(e),a=s/n,l=r/n,c=a/t,d=l,u=1/o*t+"s",f=a/t-a;return{url:e,keyframesWidth:a,keyframesHeight:l,wrapperWidth:c,wrapperHeight:d,steps:t,duration:u,offsetX:f,offsetY:0}})}function p0(i){le(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 ll(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 cl(i){let t,e,n,o=i[2]&&dl();function s(l,c){return l[3]?A0:g0}let r=s(i),a=r(i);return{c(){t=j("div"),o&&o.c(),e=te(),a.c(),b(t,"class","icon"),M(t,"width",typeof i[0]=="number"?Pe(i[0]):i[0])},m(l,c){B(l,t,c),o&&o.m(t,null),Q(t,e),a.m(t,null),n=!0},p(l,c){l[2]?o?c&4&&x(o,1):(o=dl(),o.c(),x(o,1),o.m(t,e)):o&&(re(),S(o,1,1,()=>{o=null}),ae()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&1&&M(t,"width",typeof l[0]=="number"?Pe(l[0]):l[0])},i(l){n||(x(o),n=!0)},o(l){S(o),n=!1},d(l){l&&z(t),o&&o.d(),a.d()}}}function dl(i){let t,e;return t=new et({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function g0(i){let t,e;return{c(){t=j("img"),b(t,"class","icon-image svelte-mhs8j5"),Ne(t.src,e=i[1].url)||b(t,"src",e),b(t,"alt","icon")},m(n,o){B(n,t,o)},p(n,o){o&2&&!Ne(t.src,e=n[1].url)&&b(t,"src",e)},d(n){n&&z(t)}}}function A0(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:y0,then:b0,catch:v0,value:14};return ss(e=i[4](i[1]),n),{c(){t=me(),n.block.c()},m(o,s){B(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]))&&ss(e,n)||mc(n,i,s)},d(o){o&&z(t),n.block.d(o),n.token=null,n=null}}}function v0(i){return{c:J,m:J,p:J,d:J}}function b0(i){ll(i);let t,e,n,o=`url(${i[6]})`,s=`steps(${i[11]-1})`;return{c(){t=j("div"),e=j("div"),n=j("div"),b(n,"class","icon-keyframe svelte-mhs8j5"),M(n,"width",Pe(i[7])),M(n,"height",Pe(i[8])),M(n,"background-image",o),M(n,"animation-duration",i[12]),M(n,"animation-timing-function",s),M(n,"animation-delay",0),M(n,"background-size","100% 100%"),M(n,"--keyframe_offset_x",Pe(i[13])),b(e,"class","icon-keyframe-wrapper svelte-mhs8j5"),M(e,"transform",typeof i[0]=="number"?`scale(${i[0]/i[9]})`:void 0),b(t,"class","icon-keyframe-container svelte-mhs8j5"),M(t,"width",typeof i[0]=="number"?Pe(i[0]):Pe(i[9])),M(t,"height",typeof i[0]=="number"?Pe(i[10]*(i[0]/i[9])):Pe(i[10]))},m(r,a){B(r,t,a),Q(t,e),Q(e,n)},p(r,a){ll(r),a&2&&M(n,"width",Pe(r[7])),a&2&&M(n,"height",Pe(r[8])),a&2&&o!==(o=`url(${r[6]})`)&&M(n,"background-image",o),a&2&&M(n,"animation-duration",r[12]),a&2&&s!==(s=`steps(${r[11]-1})`)&&M(n,"animation-timing-function",s),a&2&&M(n,"--keyframe_offset_x",Pe(r[13])),a&3&&M(e,"transform",typeof r[0]=="number"?`scale(${r[0]/r[9]})`:void 0),a&3&&M(t,"width",typeof r[0]=="number"?Pe(r[0]):Pe(r[9])),a&3&&M(t,"height",typeof r[0]=="number"?Pe(r[10]*(r[0]/r[9])):Pe(r[10]))},d(r){r&&z(t)}}}function y0(i){return{c:J,m:J,p:J,d:J}}function w0(i){let t,e,n=i[1]&&cl(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=cl(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function C0(i,t,e){let n,{width:o=null}=t,{icon:s=null}=t,{shadow:r=!1}=t;const a=Hn();function l(c){return X(this,null,function*(){const d=yield m0(c);return a("iconLoaded"),d})}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 ul extends se{constructor(t){super(),oe(this,t,C0,w0,ie,{width:0,icon:1,shadow:2},p0)}}function P0(i){le(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 fl(i){let t,e,n,o,s,r;return e=new et({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=j("div"),ee(e.$$.fragment),n=te(),o=j("div"),s=Ie(i[1]),b(o,"class","text svelte-e58ijk"),b(t,"class","text-wrapper svelte-e58ijk")},m(a,l){B(a,t,l),K(e,t,null),Q(t,n),Q(t,o),Q(o,s),r=!0},p(a,l){(!r||l&2)&&Le(s,a[1])},i(a){r||(x(e.$$.fragment,a),r=!0)},o(a){S(e.$$.fragment,a),r=!1},d(a){a&&z(t),$(e)}}}function I0(i){let t,e,n,o;e=new ul({props:{icon:i[0],shadow:!0}}),e.$on("iconLoaded",i[9]);let s=i[1]&&i[2]&&fl(i);return{c(){t=j("div"),ee(e.$$.fragment),n=te(),s&&s.c(),b(t,"class","wrapper svelte-e58ijk")},m(r,a){B(r,t,a),K(e,t,null),Q(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&&x(s,1)):(s=fl(r),s.c(),x(s,1),s.m(t,null)):s&&(re(),S(s,1,1,()=>{s=null}),ae())},i(r){o||(x(e.$$.fragment,r),x(s),o=!0)},o(r){S(e.$$.fragment,r),S(s),o=!1},d(r){r&&z(t),$(e),s&&s.d()}}}function E0(i,t,e){let n,o,s,r,a,l,c,d,{tag:u}=t;const f=()=>{e(2,n=!0)};return i.$$set=h=>{"tag"in h&&e(3,u=h.tag)},i.$$.update=()=>{var h,p;i.$$.dirty&8&&e(1,o=(h=u.data.title)!=null?h:u.data.text),i.$$.dirty&8&&e(8,s=(p=u.data.icon)!=null?p:u.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,d={url:r,steps:a,fps:l,ratio:c})},e(2,n=!1),[d,o,n,u,c,l,a,r,s,f]}class k0 extends se{constructor(t){super(),oe(this,t,E0,I0,ie,{tag:3},P0)}}function x0(i){le(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function hl(i){let t,e=i[0].element+"",n;return{c(){t=new Rn(!1),n=me(),t.a=n},m(o,s){t.m(e,o,s),B(o,n,s)},p(o,s){s&1&&e!==(e=o[0].element+"")&&t.p(e)},d(o){o&&z(n),o&&t.d()}}}function D0(i){let t,e=typeof i[0].element=="string"&&hl(i);return{c(){t=j("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){B(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=hl(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:J,o:J,d(n){n&&z(t),e&&e.d(),i[2](null)}}}function L0(i,t,e){let{tag:n}=t,o,s;Ze(()=>{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){ze[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class S0 extends se{constructor(t){super(),oe(this,t,L0,D0,ie,{tag:0},x0)}}function M0(i){le(i,"svelte-ofx2uu",'@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,T1RUTwAKAIAAAwAgQ0ZGINFD4C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vPeuA7z4EhUn967vBw4eoDf/DAmLDAv47BT4exWcEwAHAQFBXW97ipCarPcv8+7yAfdl8gP4aPf6FfIjB+r3gwUiBi77gwWHBjH3gwUkBuP7gwUnJPcxKPsxI/cx+y/y9y/3MPP7MO4GDvtdi/cSJQr3JBZkcqOzsKSksrCkcWdlcnFmHw6up6eurm+naGhvb2hop2+uHwv3EiUK9yP4ChUiCgt3SgWxBrnmBZGVj5eZGgsB2/cSAwtobm5paqBzqoYLAAABAAAAAAAAAAAAAA==) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-ofx2uu{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.withAnimation.svelte-ofx2uu{transition:opacity 0.3s linear}.content__container.unClickable.svelte-ofx2uu{pointer-events:none !important}.content__container.unClickable.svelte-ofx2uu *{pointer-events:none !important}.content__wrapper.svelte-ofx2uu{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-ofx2uu{opacity:0;pointer-events:none}.content__container.hide.svelte-ofx2uu *{pointer-events:none !important}.content__container.disable.svelte-ofx2uu{display:none}.content.svelte-ofx2uu{position:relative;width:100%;height:100%;font-size:0.75rem;line-height:1.125rem;color:#fff}.content.svelte-ofx2uu:not(.unfolded){pointer-events:none}.content.svelte-ofx2uu:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-ofx2uu{pointer-events:auto}')}function z0(i){let t,e;return{c(){t=j("div"),b(t,"data-info","tag content is keep folded"),b(t,"data-id",e=i[1].id)},m(n,o){B(n,t,o)},p(n,o){o&2&&e!==(e=n[1].id)&&b(t,"data-id",e)},i:J,o:J,d(n){n&&z(t)}}}function B0(i){let t,e,n,o,s,r,a,l,c;const d=[F0,R0,O0,Q0,V0,j0,T0],u=[];function f(h,p){return h[1].element?0:h[1].contentType==="Text"?1:h[1].contentType==="ImageText"||h[1].contentType==="Image"||h[1].contentType==="Video"?2:h[1].contentType==="Audio"?3:h[1].contentType==="Marketing"?4:h[1].contentType==="Link"||h[1].contentType==="VRLink"||h[1].contentType==="PanoLink"?5:h[1].contentType==="MediaPlane"||h[1].contentType==="MediaModel"?6:-1}return~(o=f(i))&&(s=u[o]=d[o](i)),{c(){var h;t=j("div"),e=j("div"),n=j("div"),s&&s.c(),b(n,"class","content svelte-ofx2uu"),ne(n,"unfolded",(h=i[1].state)==null?void 0:h.unfolded),b(e,"class","content__wrapper svelte-ofx2uu"),b(t,"class","content__container svelte-ofx2uu"),b(t,"data-id",r=i[1].id),ne(t,"disable",i[1].enabled===!1),ne(t,"hide",i[4]),ne(t,"withAnimation",i[0]),ne(t,"unClickable",i[1].clickable===!1),M(t,"width",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0),M(t,"height",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0)},m(h,p){B(h,t,p),Q(t,e),Q(e,n),~o&&u[o].m(n,null),a=!0,l||(c=Me(t,"click",qo(i[13])),l=!0)},p(h,p){var g;let A=o;o=f(h),o===A?~o&&u[o].p(h,p):(s&&(re(),S(u[A],1,1,()=>{u[A]=null}),ae()),~o?(s=u[o],s?s.p(h,p):(s=u[o]=d[o](h),s.c()),x(s,1),s.m(n,null)):s=null),(!a||p&2)&&ne(n,"unfolded",(g=h[1].state)==null?void 0:g.unfolded),(!a||p&2&&r!==(r=h[1].id))&&b(t,"data-id",r),(!a||p&2)&&ne(t,"disable",h[1].enabled===!1),(!a||p&16)&&ne(t,"hide",h[4]),(!a||p&1)&&ne(t,"withAnimation",h[0]),(!a||p&2)&&ne(t,"unClickable",h[1].clickable===!1),p&2&&M(t,"width",h[1].stickType==="Plane"||h[1].contentType==="MediaModel"?"100%":0),p&2&&M(t,"height",h[1].stickType==="Plane"||h[1].contentType==="MediaModel"?"100%":0)},i(h){a||(x(s),a=!0)},o(h){S(s),a=!1},d(h){h&&z(t),~o&&u[o].d(),l=!1,c()}}}function T0(i){let t,e;return t=new f0({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function j0(i){let t,e;return t=new k0({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function V0(i){let t,e;return t=new Vg({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Q0(i){let t,e;return t=new l0({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function O0(i){let t,e;return t=new bg({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function R0(i){let t,e;return t=new zp({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function F0(i){let t,e;return t=new S0({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function G0(i){let t,e,n,o;const s=[B0,z0],r=[];function a(l,c){return l[3]?0:1}return t=a(i),e=r[t]=s[t](i),{c(){e.c(),n=me()},m(l,c){r[t].m(l,c),B(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?r[t].p(l,c):(re(),S(r[d],1,1,()=>{r[d]=null}),ae(),e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),x(e,1),e.m(n.parentNode,n))},i(l){o||(x(e),o=!0)},o(l){S(e),o=!1},d(l){r[t].d(l),l&&z(n)}}}function H0(i,t,e){let n,o,s,r,a,l,{withAnimation:c=!1}=t,{tag:d}=t,{hooks:u}=t,{state:f}=t,{mediaStore:h}=t,{temporaryState:p}=t;Wn("hooks",u),Wn("mediaStore",h);let A,g;function v(C){C?u.emit("exposure",{id:r,type:"start"}):u.emit("exposure",{id:r,type:"end"})}function w(C,E,P){var L,D;return!(!E.visible||!E.enabled||!P.visible||!((L=C.state)!=null&&L.visible)||((D=C.temporaryState)==null?void 0:D.visible)===!1||Ye(C)&&C.mediaVisible===!1)}const y=C=>u.emit("click",{event:C,target:"TagContent",tag:d});return i.$$set=C=>{"withAnimation"in C&&e(0,c=C.withAnimation),"tag"in C&&e(1,d=C.tag),"hooks"in C&&e(2,u=C.hooks),"state"in C&&e(5,f=C.state),"mediaStore"in C&&e(6,h=C.mediaStore),"temporaryState"in C&&e(7,p=C.temporaryState)},i.$$.update=()=>{var C,E,P,L,D,T,W,G,Y,V,I;i.$$.dirty&2&&e(11,n=(C=d.state)==null?void 0:C.unfolded),i.$$.dirty&2&&e(10,o=(E=d.state)==null?void 0:E.visible),i.$$.dirty&162&&e(12,s=f.visible&&p.visible&&((P=d.state)==null?void 0:P.visible)),i.$$.dirty&2&&(r=d.id),i.$$.dirty&162&&e(4,a=!w(d,f,p)),i.$$.dirty&4096&&v(s),i.$$.dirty&3842&&d.hooks&&(n!==void 0&&n!==g&&(e(9,g=n),n?(D=(L=d.hooks).emit)==null||D.call(L,"unfolded"):(W=d==null?void 0:(T=d.hooks).emit)==null||W.call(T,"folded")),o!==void 0&&o!==A&&(e(8,A=o),o?(Y=(G=d.hooks).emit)==null||Y.call(G,"show"):(I=(V=d.hooks).emit)==null||I.call(V,"hide"))),i.$$.dirty&2&&e(3,l=(()=>!(typeof d.mergedConfig.unfoldedConfig=="object"&&d.mergedConfig.unfoldedConfig.keep==="folded"))())},[c,d,u,l,a,f,h,p,A,g,o,n,s,y]}class ml extends se{constructor(t){super(),oe(this,t,H0,G0,ie,{withAnimation:0,tag:1,hooks:2,state:5,mediaStore:6,temporaryState:7},M0)}}function W0(i){le(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 N0(i){let t,e,n,o,s,r,a,l,c,d,u,f;return o=new et({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new ul({props:{icon:i[2],width:i[1]}}),{c(){t=j("div"),e=te(),n=j("div"),ee(o.$$.fragment),s=te(),r=j("div"),a=te(),l=j("div"),ee(c.$$.fragment),b(t,"class","tag-point-click-helper svelte-yex9rb"),b(r,"class","tag-unfolded-point svelte-yex9rb"),M(r,"transition-delay",(i[3]?i[5]:0)+"ms"),b(l,"class","tag-folded-point svelte-yex9rb"),M(l,"transition-delay",(i[3]?i[5]:0)+"ms"),b(n,"class","tag-point-wrapper svelte-yex9rb"),ne(n,"unfolded",i[0]),ne(n,"folded",i[3]),M(n,"width",Pe(i[1])),M(n,"height",Pe(i[1]))},m(h,p){B(h,t,p),B(h,e,p),B(h,n,p),K(o,n,null),Q(n,s),Q(n,r),Q(n,a),Q(n,l),K(c,l,null),d=!0,u||(f=Me(t,"click",i[4]),u=!0)},p(h,[p]){p&8&&M(r,"transition-delay",(h[3]?h[5]:0)+"ms");const A={};p&4&&(A.icon=h[2]),p&2&&(A.width=h[1]),c.$set(A),p&8&&M(l,"transition-delay",(h[3]?h[5]:0)+"ms"),(!d||p&1)&&ne(n,"unfolded",h[0]),(!d||p&8)&&ne(n,"folded",h[3]),p&2&&M(n,"width",Pe(h[1])),p&2&&M(n,"height",Pe(h[1]))},i(h){d||(x(o.$$.fragment,h),x(c.$$.fragment,h),d=!0)},o(h){S(o.$$.fragment,h),S(c.$$.fragment,h),d=!1},d(h){h&&z(t),h&&z(e),h&&z(n),$(o),$(c),u=!1,f()}}}function _0(i,t,e){let n,o,s,r;const a=ft("hooks");let{tag:l}=t,c,d=!1;const u=()=>{c!==void 0&&clearTimeout(c),d=!0,c=setTimeout(()=>{d=!1},800)},f=p=>{d||a.emit("click",{event:p,target:"TagPoint",tag:l})},h=(()=>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,A,g,v;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=(A=l.style)==null?void 0:A.point)!=null&&g.url?(v=l.style)==null?void 0:v.point:{url:sp}),i.$$.dirty&64&&e(1,r=(()=>{var y,C,E;const w=(E=(C=(y=l.style)==null?void 0:y.point)==null?void 0:C.size)!=null?E:"S";return typeof w=="number"?w:w==="S"?18:w==="M"?20:w==="L"?24:w==="XL"?28:18})())},u(),[n,r,s,o,f,h,l]}class X0 extends se{constructor(t){super(),oe(this,t,_0,N0,ie,{tag:6},W0)}}function Y0(i){le(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 U0(i){let t;return{c(){t=j("div"),b(t,"data-info","tag content is disable")},m(e,n){B(e,t,n)},p:J,i:J,o:J,d(e){e&&z(t)}}}function J0(i){let t,e;return t=new ml({props:{mediaStore:i[2],withAnimation:i[0],tag:Be(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=Be(n[1])),o&8&&(s.state=n[3]),o&16&&(s.temporaryState=n[4]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Z0(i){let t;return{c(){t=j("div"),b(t,"data-info","tag point is disable")},m(e,n){B(e,t,n)},p:J,i:J,o:J,d(e){e&&z(t)}}}function q0(i){let t,e;return t=new X0({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||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function K0(i){let t,e,n,o,s,r,a,l,c;const d=[J0,U0],u=[];function f(g,v){return g[12]?0:1}n=f(i),o=u[n]=d[n](i);const h=[q0,Z0],p=[];function A(g,v){return g[13]?0:1}return r=A(i),a=p[r]=h[r](i),{c(){t=j("div"),e=j("div"),o.c(),s=te(),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),M(e,"left",i[7]),M(e,"top",i[6]),M(e,"z-index",i[5]),b(t,"class","tag svelte-pzwdws"),b(t,"data-tag-id",i[11]),ne(t,"unClickable",i[1].clickable===!1),ne(t,"disable",i[10]),ne(t,"hide",i[9]),ne(t,"withAnimation",i[0])},m(g,v){B(g,t,v),Q(t,e),u[n].m(e,null),Q(e,s),p[r].m(e,null),c=!0},p(g,[v]){let w=n;n=f(g),n===w?u[n].p(g,v):(re(),S(u[w],1,1,()=>{u[w]=null}),ae(),o=u[n],o?o.p(g,v):(o=u[n]=d[n](g),o.c()),x(o,1),o.m(e,s));let y=r;r=A(g),r===y?p[r].p(g,v):(re(),S(p[y],1,1,()=>{p[y]=null}),ae(),a=p[r],a?a.p(g,v):(a=p[r]=h[r](g),a.c()),x(a,1),a.m(e,null)),(!c||v&256)&&b(e,"data-tag-unfolded",g[8]),(!c||v&2048)&&b(e,"data-tag-id",g[11]),(!c||v&2&&l!==(l=g[1].contentType))&&b(e,"data-content-type",l),v&128&&M(e,"left",g[7]),v&64&&M(e,"top",g[6]),v&32&&M(e,"z-index",g[5]),(!c||v&2048)&&b(t,"data-tag-id",g[11]),(!c||v&2)&&ne(t,"unClickable",g[1].clickable===!1),(!c||v&1024)&&ne(t,"disable",g[10]),(!c||v&512)&&ne(t,"hide",g[9]),(!c||v&1)&&ne(t,"withAnimation",g[0])},i(g){c||(x(o),x(a),c=!0)},o(g){S(o),S(a),c=!1},d(g){g&&z(t),u[n].d(),p[r].d()}}}function $0(i,t,e){let n,o,s,r,a,l,c,d,u,{withAnimation:f=!1}=t,{tag:h}=t,{mediaStore:p}=t,{state:A}=t,{temporaryState:g}=t;const v=ft("hooks");return i.$$set=w=>{"withAnimation"in w&&e(0,f=w.withAnimation),"tag"in w&&e(1,h=w.tag),"mediaStore"in w&&e(2,p=w.mediaStore),"state"in w&&e(3,A=w.state),"temporaryState"in w&&e(4,g=w.temporaryState)},i.$$.update=()=>{var w,y,C,E,P,L,D,T;i.$$.dirty&2&&e(13,n=(()=>!(h.contentType==="Link"||h.contentType==="VRLink"||h.contentType==="PanoLink"||h.contentType==="Audio"&&h.data.appearance==="plane"))()),i.$$.dirty&2&&e(12,o=(()=>h.stickType==="2DPoint")()),i.$$.dirty&2&&e(11,s=h.id),i.$$.dirty&2&&e(10,r=!((w=h.pointTagStyle)!=null&&w.leftPercent)||!((y=h.pointTagStyle)!=null&&y.topPercent)||h.enabled===!1||!h.state),i.$$.dirty&2&&e(9,a=!((C=h.state)!=null&&C.visible)||((E=h.temporaryState)==null?void 0:E.visible)===!1),i.$$.dirty&2&&e(8,l=(P=h.state)==null?void 0:P.unfolded),i.$$.dirty&2&&e(7,c=((L=h.pointTagStyle)==null?void 0:L.leftPercent)+"%"),i.$$.dirty&2&&e(6,d=((D=h.pointTagStyle)==null?void 0:D.topPercent)+"%"),i.$$.dirty&2&&e(5,u=(T=h.state)!=null&&T.unfolded?1:0)},[f,h,p,A,g,u,d,c,l,a,r,s,o,n,v]}class eA extends se{constructor(t){super(),oe(this,t,$0,K0,ie,{withAnimation:0,tag:1,mediaStore:2,state:3,temporaryState:4},Y0)}}function tA(i){le(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 pl(i,t,e){const n=i.slice();return n[6]=t[e],n}function gl(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=pl(i,s,a),c=r(l);n.set(c,e[a]=Al(c,l))}return{c(){t=j("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-uq11d5"),ne(t,"hide",!i[3].visible||!i[4].visible),ne(t,"withAnimation",i[0])},m(a,l){B(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],re(),e=qe(e,l,r,1,a,s,n,t,jt,Al,null,pl),ae()),(!o||l&24)&&ne(t,"hide",!a[3].visible||!a[4].visible),(!o||l&1)&&ne(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)x(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)S(e[l]);o=!1},d(a){a&&z(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Al(i,t){let e,n,o;return n=new eA({props:{state:t[3],temporaryState:t[4],withAnimation:t[0],tag:t[6],mediaStore:t[2]}}),{key:i,first:null,c(){e=me(),ee(n.$$.fragment),this.first=e},m(s,r){B(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||(x(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&z(e),$(n,s)}}}function nA(i){let t,e,n=i[3].enabled&&gl(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&x(n,1)):(n=gl(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function iA(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{mediaStore:r}=t,{state:a}=t,{temporaryState:l}=t;return Wn("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 oA extends se{constructor(t){super(),oe(this,t,iA,nA,ie,{withAnimation:0,tags:1,hooks:5,mediaStore:2,state:3,temporaryState:4},tA)}}const sA={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",alwaysShowWhenMovePano:!0}}}};class rA extends ei{constructor(e){super(e);m(this,"tagCacheByPanoIndex",{})}getCache({panoIndex:e,id:n,key:o}){var c,d,u,f;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=`${(u=(d=s.work)==null?void 0:d.workCode)!=null?u: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 h=l.get(n);return h||(l.set(n,{}),l.get(n))}return(f=l.get(n))==null?void 0:f[o]}clearCache(){this.tagCacheByPanoIndex={}}removeCache(){}}class aA extends rA{constructor(e){super(e);m(this,"tags",[]);m(this,"config",sA);m(this,"raycaster",new k.Raycaster)}get isPanorama(){return this.five.currentMode==="Panorama"}getTagById(e){const n=this.tags.find(o=>o.id===e);if(!n){console.error(`getTagById(): tag is ${n}, id is ${e}`);return}return n}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(Ye(e))return!0;if(o.visible!==void 0)return o.visible;{const a=(()=>{var d,u,f;const l=(d=this.getTagConfig(e).visibleConfig)!=null?d:{},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!==((u=e.fiveState)==null?void 0:u.panoIndex))return{value:!1,reason:`current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(f=e.fiveState)==null?void 0:f.panoIndex}`}}if(l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&yn(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 h=this.getRaycasterFromPanoIndex(e,s),p=this.getTagEnableByIntersect(e,h);if(p.value===!1)return p}if(l.angleRange&&_m(e)){const h=this.getAngle(e);if(yn(h,l.angleRange)===!1)return{value:!1,reason:`angle is not in angleRange. angle: ${h}, angleRange: ${l.angleRange}`}}return{value:!0,reason:"all check passed"}})();return o.visible=a.value,o.__debug_visible_reason__=a,o.visible}}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&&yn(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&&yn(l.x,r.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(r.autoUnfold.strategy==="MinimumDistance"){const d=this.filterPointTag().filter(f=>this.getVisibleByPanoIndex(f)).filter(f=>{const h=this.getTagProject(f);if(!h)return!1;const{x:p,y:A,z:g}=h;return!(Math.abs(g)>1||Math.abs(p)>1||Math.abs(A)>1)}).map(f=>({tag:f,id:f.id,tagConfig:this.getTagConfig(f).unfoldedConfig})).filter(({tag:f,tagConfig:h})=>{var p,A;return!(typeof h!="object"||h.keep||h.autoUnfold===!1||((p=h.autoUnfold)==null?void 0:p.enable)===!1||((A=h.autoUnfold)==null?void 0:A.strategy)!=="MinimumDistance")}).map(f=>pe(H({},f),{distance:this.getDistance(f.tag)})).filter(({distance:f,tagConfig:h})=>{var p,A;return!(f===void 0||typeof h!="object"||h.autoUnfold===!1||((p=h.autoUnfold)==null?void 0:p.enable)===!1||((A=h.autoUnfold)==null?void 0:A.strategy)!=="MinimumDistance"||h.autoUnfold.distance&&yn(f,h.autoUnfold.distance)===!1)}).sort((f,h)=>f.distance-h.distance).findIndex(f=>f.id===e.id);if(d===-1||d<=((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 d=na(e),u=c.distanceTo(d);return s.distance=u,u}}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 d=(()=>e.stickType==="3DPoint"?hn(e.normal):lo(e.position))();if(!d)return;const u=new k.Vector3().copy(c).sub(co(e.position)),f=d.angleTo(u)*180/Math.PI;return s.angle=f,s.angle}}getTagConfig(e){var s;if(!e)return(s=this.config.globalConfig)!=null?s:{};const n={};this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(r=>{const a=r;if(n[a])return;const l=a.split("-");if(l.length===1){const[c]=l;e.contentType===c&&(n[a]=this.config.contentTypeConfig[a])}if(l.length===2){const[c="Any",d="Any"]=l;(e.stickType===c||c==="Any")&&(e.contentType===d||d==="Any")&&(n[a]=this.config.contentTypeConfig[a])}if(l.length===3){const[c="Any",d,u]=l;if(d==="Audio"&&e.contentType==="Audio"){const f=e;(f.stickType===c||c==="Any")&&f.data.appearance===u&&(n[a]=this.config.contentTypeConfig[a])}}});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}),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(!Ye(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=co(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 d,u,f;const o=(d=this.getTagConfig(e).visibleConfig)!=null?d:{},s=this.getDistance(e),[r]=this.five.model.intersectRaycaster(n),a=(()=>{if(!Ye(e))return;const h=this.tags.filter(Ye).map(A=>{var g;return(g=A.model)==null?void 0:g.object}).filter(_e);return n.intersectObjects(h,!0)[0]})(),l=(()=>{var h;return typeof o=="object"&&typeof o.intersectRaycaster=="object"&&(h=o.intersectRaycaster.distanceAccuracy)!=null?h:.01})();return Math.min((u=r==null?void 0:r.distance)!=null?u:1/0,(f=a==null?void 0:a.distance)!=null?f:1/0)+l<s?{value:!1,reason:`intersectRaycaster check failed: distance is ${s}, intersection.point is ${r.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=na(e).sub(o).normalize();return this.raycaster.set(o,s),this.raycaster}checkFloorIndex(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}changeTagMode(e,n){var o,s,r,a,l;(o=e.config)!=null&&o.tag3DConfig?e.config.tag3DConfig.mode=n:e.config?e.config.tag3DConfig={mode:n}:e.config={tag3DConfig:{mode:n}},(r=(s=e.tag3DContentSvelte)==null?void 0:s.domContainer)==null||r.dispose(),(l=(a=e.tag3DContentSvelte)==null?void 0:a.svelteApp)==null||l.$destroy(),e.tag3DContentSvelte=void 0}}function lA(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 cA=new Dl.GLTFLoader;function dA(i){return new Promise((t,e)=>{function n(s){t(s)}function o(s){e(s)}cA.load(i,n,void 0,o)})}function uA(i){if(!i.matrix)return;const t=new R.Matrix4().fromArray(i.matrix),{mediaPosition:e}=i.data;return e.map(o=>new R.Vector3().fromArray(o).add(new R.Vector3(0,0,5e-4)).applyMatrix4(t).toArray())}const vl="2.0.10",vo=`DnalogelPlugin-PanoTagPlugin@${vl}`,fA=!1,hA=i=>`${vo}--${i}`;class bl extends aA{constructor(e,n){super(e);m(this,"version",vl);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",Hi({currentMediaElement:null}));m(this,"group",new R.Group);m(this,"gltfObjectGroup",new R.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)=>X(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",()=>{this.five.getCurrentState().mode==="Panorama"&&this.tags.forEach(e=>{e.temporaryState=pe(H({},e.temporaryState),{visible:!0})})});m(this,"handleFiveModelShownFloorChange",()=>{this.tags.forEach(e=>{!Ye(e)||(e.state.visible=this.checkFloorIndex(e))}),this.updateRenderAllTags()});m(this,"loadModel",e=>X(this,null,function*(){var l;const n=e.data.modelUrl;if(console.log("\u{1F436} ==> url:",n),!n)return;const o=dA(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 R.Matrix4().fromArray(e.matrix).decompose(s.position,s.quaternion,s.scale),this.checkFloorIndex(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=H({debug:!1,config:this.config},n),this.debug=this.params.debug,this.config=this.params.config,el(1,{namespace:yi.GetAudioDuration}),el(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 X(this,null,function*(){var s,r;this.clearTags(),console.log(vo," load:",{data: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{Wm(this.five,this.tags)}catch(a){console.error(a)}return o})}addTag(e,n){return X(this,null,function*(){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r),l=pe(H({},r),{state:H({visible:void 0,unfolded:fA},a.initialState),hooks:new ue.Subscribe,clickable:a.clickable,mergedConfig:a});return Ye(r)&&(l.temporaryState={visible:!1}),l}).filter(r=>r.position);return s.forEach(lA),this.tags.push(...s),Xm(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(),console.log("\u{1F436} ==> waitFiveModelLoaded:"),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.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}show(e){return X(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 X(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=H({},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=ot(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=pt.default({},s.data,n):s.data=H(H({},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=ot(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 A,g,v,w;const o=(v=(g=(A=e.mergedConfig)==null?void 0:A.tag3DConfig)==null?void 0:g.ratio)!=null?v:.00216,s=(w=e.tag3DContentSvelte)==null?void 0:w.domContainer.css3DObject;if(!s)return;const r=Ye(e)?e.data.mediaPosition:e.position;n.updateWorldMatrix(!1,!1);const a=n.matrixWorld,l=new R.Vector3().fromArray(r[0]),c=new R.Vector3().fromArray(r[2]),d=new R.Vector3().lerpVectors(l,c,.5).add(new R.Vector3(0,0,5e-4)),u=new R.Matrix4().setPosition(d),f=new R.Matrix4().makeScale(o,o,o),h=new R.Matrix4().multiply(a).multiply(u).multiply(f);h.decompose(s.position,s.quaternion,s.scale);const p=s.opacityMesh;!p||h.decompose(p.position,p.quaternion,p.scale)}setVisibleAndUnfolded(){return X(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),d=this.clickhandler.bind(this),u=this.five.currentMode;return this.handleFiveModeChange(u),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",d),()=>{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",d),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}=oa(Um(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=oa(ia(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){this.tags.forEach(n=>{if(Ye(n)){e!=="Panorama"&&(n.mediaVisible=this.checkFloorIndex(n)),this.changeTagMode(n,e==="Panorama"?"front":"behind"),this.updateRenderAllTags();return}e!=="Panorama"&&(n.temporaryState=pe(H({},n.temporaryState),{visible:!1}))}),this.updateRenderAllTags()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&(n.visibleConfig.keep?e.temporaryState=pe(H({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=pe(H({},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 ia(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return X(this,null,function*(){yield this.setVisibleAndUnfolded(),this.setModelMedialVisibleByPanoIndex(),this.tags.forEach(e=>{e.temporaryState=pe(H({},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 oA({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 o;if(n.tag3DContentSvelte){const{svelteApp:s,domContainer:r,initialNormal:a,currentNormal:l}=n.tag3DContentSvelte;if(s.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!a.equals(l)){const c=new R.Quaternion().setFromUnitVectors(a,l);r.css3DObject.setRotationFromQuaternion(c)}}else{if(((o=n.state)==null?void 0:o.visible)===!1)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=Jt(this.five)),n.stickType==="3DPoint"&&!n.normal)return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");const s=(()=>n.stickType==="Plane"?n.position:n.stickType==="Model"&&n.contentType==="MediaModel"?uA(n):Ym(this.five.camera.position,ot(n.position),ot(n.normal)))();if(!s)return;const r=function(){if(n.normal)return ot(n.normal);if(n.stickType==="Plane")return lo(n.position);if(n.contentType==="MediaModel")return lo(s)}();if(!r)return;const a=this.getTagConfig(n).tag3DConfig,l=this.css3DRenderPlugin.create3DDomContainer(s,a);if(!l)return;this.store.css3DRenderDisposer.set(n.id,l.dispose),n.tag3DContentSvelte={svelteApp:new ml({target:l.container,props:{tag:n,hooks:this.hooks,state:n.contentType==="MediaModel"?pe(H({},this.state),{visible:!1}):this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}}),domContainer:l,initialNormal:r,currentNormal:r}}}),this.checkPanelTag()}updateRenderModelTag(){const e=o=>!this.enabledModelTagSet.has(o.customID);this.gltfObjectGroup.remove(...this.gltfObjectGroup.children.filter(e)),this.tags.filter(Ye).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 X(this,null,function*(){const n=e.filter(Ye).map(this.loadModel);yield Promise.all(n),this.five.getCurrentState().mode==="Panorama"&&this.setModelMedialVisibleByPanoIndex(),this.updateRenderAllTags()})}}const mA=(i,t)=>new bl(i,t);function ge(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new k.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)}ge.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)},ge.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"],ge.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}},ge.prototype._objectCtxInit=function(i){i._3xDomEvent={}},ge.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent},ge.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent},ge.prototype._objectCtxGet=function(i){return i._3xDomEvent},ge.prototype.camera=function(i){return i&&(this._camera=i),this._camera},ge.prototype.bind=function(i,t,e,n){console.assert(ge.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)},ge.prototype.addEventListener=ge.prototype.bind,ge.prototype.unbind=function(i,t,e,n){console.assert(ge.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)},ge.prototype.removeEventListener=ge.prototype.unbind,ge.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1},ge.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new k.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,d,u=r[0],f=u.object;this._selected=f,d=this._bound("mousemove",f),a!=f&&(l=this._bound("mouseover",f),c=a&&this._bound("mouseout",a))}else c=a&&this._bound("mouseout",a),this._selected=null;d&&this._notify("mousemove",f,n,u),l&&this._notify("mouseover",f,n,u),c&&this._notify("mouseout",a,n,u)}},ge.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new k.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),d=l.parent;typeof c=="undefined"&&d;)c=this._objectCtxGet(d),d=d.parent;!c||this._notify(i,l,n,a)}}},ge.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)}},ge.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)},ge.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)},ge.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)},ge.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)},ge.prototype._onClick=function(i){this._onMouseEvent("click",i)},ge.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)},ge.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)},ge.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)},ge.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)},ge.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)}},ge.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 yl(i){const t=new k.Box3,e=new k.Vector3;if(i.updateMatrixWorld(!1),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.matrixWorld),t.expandByPoint(e)}else o.vertices.forEach(r=>{const a=r.clone().applyMatrix4(n.matrixWorld);t.expandByPoint(a)})}),!t.isEmpty())return t.translate(i.position.clone().negate()),t}class Cn{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,d;this.hooks=(c=t.sharedHooks)!=null?c:new Xt,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 ge(t.camera,t.container),this.onRender=(d=t.onRender)!=null?d:()=>{},this.offset=e==null?void 0:e.offset,this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable();const n=(...u)=>this.onSetOriginObjectScale(...u),o=(...u)=>this.onSetOriginObjectRotate(...u),s=(...u)=>this.onSetOriginObjectPosition(...u),r=(...u)=>this.onApplyOriginObjectScale(...u),a=(...u)=>this.onApplyOriginObjectRotate(...u),l=(...u)=>this.onApplyOriginObjectPosition(...u);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 k.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),o=new k.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(_e),s=[];for(const r of o)if(r instanceof k.Mesh||r instanceof k.Group){const a=r instanceof k.Group?r.children.filter(f=>f instanceof k.Mesh):[r];a.forEach(f=>{f.__originalColor__=f.material.color.clone(),f.__originalOpacity__=f.material.opacity});const l=()=>{a.forEach(f=>{f.material.color.set(e),f.material.opacity=n}),this.render()},c=()=>{a.forEach(f=>{f.material.color.copy(f.__originalColor__),f.material.opacity=f.__originalOpacity__}),this.render()},d=()=>{this.isDragging||l()},u=()=>{this.isDragging||c()};for(const f of a)this.domEvents.addEventListener(f,"mouseover",d),this.domEvents.addEventListener(f,"mouseout",u),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),s.push(()=>{this.domEvents.removeEventListener(f,"mouseover",d),this.domEvents.removeEventListener(f,"mouseout",u),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c)})}return()=>s.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,n=this.helperObject3D;if(!n)return;let o;const s=t.intersectObject(n,!0)[0];if(!!s&&(o=s,o.object=n,!!o)){if(this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<o.point.distanceTo(e))return}return o.object}}calculateOffset(t,e){const n=this.originObject3D,o=new k.Vector3(0,0,0);if(!t)return o;const s=()=>e||(this.boundingBox?this.boundingBox:(this.boundingBox=yl(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 pA extends Cn{constructor(...e){super(...e);m(this,"name","ScaleController")}setScale(e){var l,c,d;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=(d=e.z)!=null?d:1);const r=new k.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 gA extends R.Object3D{constructor(){super()}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}}class wi extends gA{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()}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 R.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 R.Vector3().subVectors(this.position,n).applyQuaternion(e).add(n);this.position.copy(o)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class AA extends wi{}class vA extends wi{}class bA extends wi{}class wl extends wi{}class yA extends wl{}class wA extends k.Group{constructor(e){super();m(this,"direction");this.direction=e||"x"}}class Cl extends k.Mesh{constructor(e,n,o){super(e,n);m(this,"direction");this.direction=o||"x"}}function CA(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new k.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=CA(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new k.Raycaster;return o.setFromCamera(n,i),o}function PA(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 wA{constructor(e){var d;super(e.direction);m(this,"line");m(this,"arrow");m(this,"lineHeight",.4);m(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new k.Color((d=e.color)!=null?d:16214315),o=new k.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:k.DoubleSide}),s=new k.ConeGeometry(.04,.1,32),r=new Cl(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new k.CylinderGeometry(a,a,.4,32),c=new Cl(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 ht{static get X(){return new k.Color(wo.X).convertSRGBToLinear().clone()}static get Y(){return new k.Color(wo.Y).convertSRGBToLinear().clone()}static get Z(){return new k.Color(wo.Z).convertSRGBToLinear().clone()}}class IA extends AA{constructor(e){super(e);m(this,"xArrow",new yo({direction:"x",color:ht.X}));m(this,"yArrow",new yo({direction:"y",color:ht.Y}));m(this,"zArrow",new yo({direction:"z",color:ht.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 Ht(i,t){return EA(document.createElement(t!=null?t:"div"),i)}function EA(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function kA(i){const t=Ht(H({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 xA extends bA{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:ht.X}),this.xRingHelper=new Po({direction:"x"}),this.xAngleHelper=new Io({direction:"x",color:ht.X})),(n==null?void 0:n.xzCircleEnable)!==!1&&(this.xzCircle=new Co({direction:"y",color:ht.Y}),this.yRingHelper=new Po({direction:"y"}),this.yAngleHelper=new Io({direction:"y",color:ht.Y})),(n==null?void 0:n.xyCircleEnable)!==!1&&(this.xyCircle=new Co({direction:"z",color:ht.Z}),this.zRingHelper=new Po({direction:"z"}),this.zAngleHelper=new Io({direction:"z",color:ht.Z})),n!=null&&n.container&&(this.container=n==null?void 0:n.container,this.angleTips=kA({display:"none"}),(o=this.container)==null||o.appendChild(this.angleTips.element)),this.show()}updateAngleHelperQuaternion(){var e,n,o,s,r,a,l,c,d,u,f,h;(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),(u=this.yRingHelper)==null||u.quaternion.copy((d=this.xzCircle)==null?void 0:d.quaternion),(h=this.zRingHelper)==null||h.quaternion.copy((f=this.xyCircle)==null?void 0:f.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(){console.log("hide"),this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper)}show(){var e;console.log("show"),this.add(...[this.xyCircle,this.xzCircle,this.yzCircle].filter(Boolean)),this.remove(...[this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper].filter(Boolean)),(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 k.Mesh{constructor(e){var n;super();m(this,"direction");m(this,"gapAngle",.02);m(this,"geometry",new k.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new k.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:k.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 k.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 k.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new k.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:k.DoubleSide}),c=new k.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 k.Mesh{constructor(e){var o;super();m(this,"direction");m(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new k.Vector3(0,0,1);break;case"y":this.baseAxes=new k.Vector3(1,0,0);break;case"z":this.baseAxes=new k.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new k.CircleGeometry(n,48,0,1e-4),this.material=new k.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:k.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function DA(){const i=Ht({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Ht({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Ht({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});i.appendChild(t),t.appendChild(e);const n="-4px",o={direction:"nesw",element:Dt({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:Dt({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:Dt({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:Dt({cursor:"ew-resize",right:n})},l={direction:"nesw",element:Dt({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:Dt({cursor:"ns-resize",top:n})},d={direction:"nwse",element:Dt({cursor:"nwse-resize",left:n,top:n})},u={direction:"ew",element:Dt({cursor:"ew-resize",left:n})};return new Array(s,a,c,u,o,r,l,d).forEach(h=>t.appendChild(h.element)),{container:i,squares:[o,s,r,a,l,c,d,u]}}function Dt(i){const t=Ht(H({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=Ht({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=Ht({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 LA extends yA{constructor(e,n,o,s){super(e);m(this,"points",[]);m(this,"cornerPositions",[]);m(this,"css3DInstance");m(this,"plane");m(this,"css3DRenderer",new Ut);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 k.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new k.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 k.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}=DA();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 SA extends vA{constructor(e){super(e);m(this,"box");m(this,"outline");m(this,"originObject");m(this,"positionAttribute");this.originObject=e,this.positionAttribute=new k.BufferAttribute(new Float32Array(8*3),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}update(){const e=yl(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 k.BufferGeometry;n.setIndex(new k.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new k.LineBasicMaterial({color:64767,linewidth:1,opacity:1,depthTest:!1,transparent:!0,toneMapped:!1}),s=new k.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 k.BufferGeometry;n.setIndex(new k.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new k.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new k.Mesh(n,o)}}class MA extends Cn{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 k.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new k.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new k.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}})(),d=n.point.clone(),u=new k.Plane;u.setFromNormalAndCoplanarPoint(c,d),this.startInfo={startVectorProject:d.clone().projectOnVector(l),directionVector:l,plane:u},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 k.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),d=new k.Matrix4;d.setPosition(c);const u=r.position.clone().applyMatrix4(d);this.hooks.emit("wantToMove",u)||(r.applyMatrix4(d),s.copy(l),this.hooks.emit("applyObjectPosition",{matrix4:d}),this.hooks.emit("move",u))}dragEnd(){!this.isDragging||(console.log("%c MoveController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class Pn{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,d=t.getElement();if(this.five=t,!a||!l||!d||!c)return;const u=()=>{t.needsRender=!0};this.helperController=new e({camera:a,model:l,originObject3D:n,helperObject3D:o,container:d,scene:c,onRender:u,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",zA=()=>{console.error(`${Eo} is disposed`)},BA=()=>{console.warn(`${Eo} is disabled`)},TA=()=>{console.error(`${Eo} is disabled`)};class jA{constructor(t){m(this,"controllers",{});m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"hooks",new Xt);m(this,"eventListener",{});t&&this.addControllers(t),this.setState(this.state)}show(t){return X(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return X(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 zA();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return TA();const n=H({},this.state);this.state=H(H({},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=H(H({},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&&BA()}}class VA extends Cn{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 k.Euler(Math.PI*n/180,Math.PI*o/180,Math.PI*s/180),a=new k.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:d}=this;if(d){const u=new k.Vector3().subVectors(c.position,d).applyQuaternion(a).add(d);c.position.copy(u)}c.quaternion.copy(a),this.helperObject3DQuaternion.copy(a),this.hooks.emit("setObjectRotate",a,d),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 k.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),c=new k.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),d=new k.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),u=(()=>{switch(o){case"x":return l;case"y":return c;case"z":return d}})(),f=new k.Plane().setFromNormalAndCoplanarPoint(u,s),h=new k.Vector3;f.projectPoint(s.clone(),h);const p=h.clone().sub(this.rotateCenter),A=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:A,plane:f,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 k.Vector3);if(!l)return;const c=this.rotateCenter,d=new k.Vector3;o.projectPoint(l.clone(),d);const u=d.clone().sub(c);if(n.angleTo(u)===0||(this.lastRotation===void 0&&(this.lastRotation={angle:0}),this.rotations.length===0))return;const f=(()=>{if(this.rotations.length===1)return u.angleTo(s.baseAxes)>r.angleTo(s.baseAxes);{const v=this.rotations[this.rotations.length-1],w=this.rotations[this.rotations.length-2],y=u.angleTo(w.vector),C=u.angleTo(v.vector),E=v.vector.angleTo(w.vector);if(E===0||C===0||y===0)return;if(y>C&&y>E)return v.direction;if(y<E&&C<E||y<C&&C>E)return!v.direction}})();if(f===void 0)return console.warn("rotationDirection is undefined");const h=new k.Quaternion().setFromUnitVectors(n.clone().normalize(),u.clone().normalize()),{originObject3D:p}=this,A=p.quaternion.clone().premultiply(h);if(!this.hooks.emit("wantToRotate",A)){if(this.rotations.push({vector:u,direction:f}),this.rotations=this.rotations.slice(-2),this.lastRotation.angle=this.lastRotation.angle+u.angleTo(n)*(f?1:-1),this.setAngleHelperLength(a,this.lastRotation.angle),this.setTipsAngle(this.lastRotation.angle/Math.PI*180),c){const v=new k.Vector3().subVectors(p.position,c).applyQuaternion(h).add(c);p.position.copy(v)}p.applyQuaternion(h),this.helperObject3DQuaternion.premultiply(h),this.hooks.emit("applyObjectRotate",{quaternion:h,origin:c}),this.hooks.emit("rotate",p.quaternion),this.startInfo.startVector=u}}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 k.Mesh&&o.geometry instanceof k.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new k.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 k.Mesh&&r.geometry instanceof k.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new k.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 QA extends Cn{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 k.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new R.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 T,W;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 R.Vector3);if(!a||PA(a,this.camera.position))return;const l=new R.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:d}=o,u=new R.Vector3().subVectors(r[1],r[0]),f=new R.Vector3().subVectors(r[3],r[0]),h=G=>{const Y=new R.Vector3(0,0,0);if(!this.startInfo)return Y;const V=(G==="ew"?u:f).clone(),I=c.clone().projectOnVector(V),O=a.clone().projectOnVector(V),F=l.clone().projectOnVector(V);if(O.equals(I))return Y;if(G==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const _=new R.Vector3().subVectors(O,F),q=_.x<0&&V.x>=0,fe=_.y<0&&V.y>=0,he=_.z<0&&V.z>=0;this.startInfo.dragPointInCenterBottom=q||fe||he}if(G==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const _=new R.Vector3().subVectors(O,F),q=_.x<0&&V.x>=0,fe=_.y<0&&V.y>=0,he=_.z<0&&V.z>=0;this.startInfo.dragPointInCenterLeft=q||fe||he}const N=new R.Vector3().subVectors(O,I),Z=N.length();return Z>.3?(console.warn("offset.length() > 0.3, skipped",Z),Y):N},p=h("ew"),A=h("ns"),g=()=>{const G=p;this.helperObject3D.cornerPositions.forEach((Y,V)=>{var I;(I=this.startInfo)!=null&&I.dragPointInCenterLeft?(V===0||V===3)&&Y.add(G):(V===1||V===2)&&Y.add(G)})},v=()=>{const G=A;this.helperObject3D.cornerPositions.forEach((Y,V)=>{var I;(I=this.startInfo)!=null&&I.dragPointInCenterBottom?(V===0||V===1)&&Y.add(G):(V===2||V===3)&&Y.add(G)})};switch(d){case"ew":g();break;case"ns":v();break;case"nesw":case"nwse":g(),v()}const w=new R.Vector3().subVectors(r[1],r[0]).length()/u.length(),y=new R.Vector3().subVectors(r[3],r[0]).length()/f.length(),C=new R.Vector3(w,y,1),E=new k.Matrix4().scale(C);n.isCSS3DObjectPlus?n.applyScaleMatrix4(E):n.scale.applyMatrix4(E),o.position.copy(a);const P=new R.Vector3().addVectors(r[0],r[2]).divideScalar(2),L=new R.Vector3().subVectors(P,l),D=new k.Matrix4().setPosition(L);n.applyMatrix4(D),(T=this.helperObject3D.css3DInstance)==null||T.css3DObject.applyMatrix4(D),(W=this.helperObject3D.plane)==null||W.applyMatrix4(D),this.hooks.emit("applyObjectScale",{matrix4:E}),this.hooks.emit("applyObjectPosition",{matrix4:D}),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 OA extends QA{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 RA extends Cn{constructor(...e){super(...e);m(this,"name","BoundingBoxController")}}class FA extends wl{constructor(t){super(t)}}const ko="v1.0.0",xo="Object3DHelperPlugin",Ci=`${xo}@${ko}`,GA=()=>{console.error(`${Ci} is disposed`)},HA=()=>{console.warn(`${Ci} is disabled`)},WA=()=>{console.error(`${Ci} is disabled`)};class Pl extends ei{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 Ut(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 X(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return X(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 GA();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return WA();const o=H({},this.state);this.state=H(H({},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 h;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 jA,s=[],r=(h=this.five.getElement())==null?void 0:h.parentElement,a=this.five.camera,{moveHelper:l=!0,rotateHelper:c=!0,scaleHelper:d=!0,boundingBoxHelper:u=!1}=n,f=new ue.Subscribe;if(l){const p=new IA(e),A=this.getConfig(n.moveHelper),g=new Pn(this.five,MA,e,p,A,f);o.addControllers({moveController:g.helperController}),s.push(()=>g.dispose())}if(c){const p=this.getConfig(n.rotateHelper),A=new xA(e,H({container:r},p)),g=new Pn(this.five,VA,e,A,p,f);o.addControllers({rotateController:g.helperController}),s.push(()=>g.dispose())}if(u){const p=new SA(e),A=new Pn(this.five,RA,e,p,void 0,f);o.addControllers({boundingBoxController:A.helperController})}if(d)if(e.isCSS3DObjectPlus&&r){const p=new LA(e,r,a,this.five.scene),A=new Pn(this.five,OA,e,p,void 0,f);o.addControllers({scaleController:A.helperController}),s.push(()=>A.dispose()),Fo(this.five).then(()=>{var g,v;if(e.isCSS3DObjectPlus){const w=e;if(!w||w.mode!=="front")return;const y=(g=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?g:Go(this.five);y&&(this.css3DObjectParentMap.set(w,w.parent),w.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(y),(v=this.css3DRender.getBehindCSS3DObjectGroup())==null||v.add(w),this.css3DRender.render(this.five.camera))}})}else{const p=new FA(e),A=new Pn(this.five,pA,e,p,void 0,f);o.addControllers({scaleController:A.helperController}),s.push(()=>A.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&&HA()}getConfig(e){if(!!e&&typeof e!="boolean"&&e.enable)return e}}const NA=i=>new Pl(i);U.CSS3DRender=Ut,U.CSS3DRenderPlugin=Jt,U.CameraMovementEffect=Ys,U.CameraMovementPlugin=tf,U.ContentType=$r,U.CruisePlugin=Vm,U.CruisePluginController=ro,U.DIRECTION=on,U.DISPLAY_STRATEGY_TYPE=Rt,U.DimensionType=ea,U.FLOOR_PLAN_ATTACHED_TO=Pt,U.FLOOR_TYPE_MAP=Wu,U.GuideLinePlugin=_r,U.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=Ft,U.ItemLabelPlugin=am,U.Magnifier=sr,U.MapviewFloorplanPlugin=wu,U.ModelChassisCompassPlugin=Xu,U.ModelEntryDoorGuidePlugin=Ju,U.ModelFloorplanPlugin=Au,U.ModelItemLabelPlugin=Gh,U.ModelRoomLabelPlugin=Lc,U.ModelTVVideoPlugin=Nh,U.ModelViewPlugin=Rl,U.Object3DHelperController=Pl,U.Object3DHelperPlugin=NA,U.PLUGIN=Ci,U.PaintBrush=Ol,U.PaintBrushTypeEnum=it,U.PanoCompassPlugin=Pf,U.PanoCursorRaycasterPlugin=ic,U.PanoDoorLabelPlugin=ym,U.PanoFloorplanRadarPlugin=Gu,U.PanoMeasurePlugin=ph,U.PanoMeasurePluginLine=Ot,U.PanoMeasurePluginModel=di,U.PanoMeasurePluginPoint=Ue,U.PanoMeasurePluginPolyline=ci,U.PanoRulerPlugin=af,U.PanoRulerProPlugin=vf,U.PanoSpatialTagPlugin=Sh,U.PanoTagPlugin=mA,U.PanoTagPluginController=bl,U.PointType=ta,U.ROOM_FETILE_TYPE_MAP=Hu,U.ROOM_TYPE_MAP=Nu,U.Rotation=$e,U.TopviewFloorplanPlugin=Pu,U.Util=zg,U.VERSION=ko,U.itemLabelPluginServerParams=lm,U.modelItemLabelPluginServerParams=Hh,U.modelRoomLabelPluginServerParams=Sc,U.pluginFlag=hA,Object.defineProperties(U,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
559
+ `;function Dg(){const i=new k.PlaneGeometry(.4,.4),t=Eg,e=new k.TextureLoader().load(t);e.encoding=k.sRGBEncoding;const n=new k.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new k.Mesh(i,n)}function Lg(){const i=new k.CurvePath;i.add(new k.LineCurve3(new k.Vector3(0,0,0),new k.Vector3(0,0,.1)));const t=new k.TubeGeometry(i,8,.003),e=new k.ShaderMaterial({vertexShader:kg,fragmentShader:xg,depthTest:!1,transparent:!0});return new k.Mesh(t,e)}function Sg(){const i=new k.SphereGeometry(.01,20,20),t=new k.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:k.DoubleSide}),e=new k.Mesh(i,t);return e.position.set(0,0,.1),e}class Fa extends k.Object3D{constructor(){super();m(this,"planeMesh");m(this,"lineMesh");m(this,"ballMesh");this.planeMesh=Dg(),this.lineMesh=Lg(),this.ballMesh=Sg(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new k.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 Ga{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=Jt(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new k.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(${mr})`,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 k.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 qi({progress:0}).to({progress:[1,0]}).duration(500).easing(xn.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class Mg{constructor(t,e){m(this,"five");m(this,"hooks",new ue.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 k.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new Oa(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new Fa:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new Ga(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 zg=Object.freeze(Object.defineProperty({__proto__:null,Interval:go,Rectangle:yg,Magnifier:Oa,getCoordsFromClient:Cg,getCoordsFromElement:Ra,getRaycasterFromFivePointer:Pg,getIntersectFromRelativePosition:Ig,PointHelper:Fa,PointDomHelper:Ga,FivePointSelector:Mg,isNil:xm,notNil:Xe,BetterTween:qi,tweenProgress:Xs,nextFrame:ti,requestAnimationFrameInterval:ni,getFrameTime:qu},Symbol.toStringTag,{value:"Module"}));function Bg(i){le(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 Ha(i,t,e){const n=i.slice();return n[0]=t[e],n}function Wa(i,t,e){const n=i.slice();return n[0]=t[e],n}function Na(i){let t,e=i[0]+"",n;return{c(){t=j("div"),n=Ie(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){B(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Le(n,e)},d(o){o&&z(t)}}}function _a(i){let t,e=i[0]&&Na(i);return{c(){e&&e.c(),t=me()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Na(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function Xa(i){let t,e=i[0]+"",n;return{c(){t=j("div"),n=Ie(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){B(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Le(n,e)},d(o){o&&z(t)}}}function Ya(i){let t,e=i[0]&&Xa(i);return{c(){e&&e.c(),t=me()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Xa(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function Ua(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&Ja(i);return{c(){t=j("div"),e=j("span"),o=Ie(n),s=te(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){B(a,t,l),Q(t,e),Q(e,o),Q(t,s),r&&r.m(t,null)},p(a,l){l&4&&n!==(n=a[2].price.value+"")&&Le(o,n),a[2].price.unit?r?r.p(a,l):(r=Ja(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&z(t),r&&r.d()}}}function Ja(i){let t,e=i[2].price.unit+"",n;return{c(){t=j("span"),n=Ie(e),b(t,"class","unit svelte-8mby9k")},m(o,s){B(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&Le(n,e)},d(o){o&&z(t)}}}function Za(i){let t,e=i[2].highlightText+"",n;return{c(){t=j("div"),n=Ie(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){B(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&Le(n,e)},d(o){o&&z(t)}}}function Tg(i){var Y,V;let t,e,n,o,s,r,a,l,c,d,u,f,h,p,A=i[2].title+"",g,v,w,y=Xe((Y=i[2].price)==null?void 0:Y.value)&&((V=i[2].price)==null?void 0:V.value)!=="",C,E;e=new et({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let P=i[2].brandTags||[],L=[];for(let I=0;I<P.length;I+=1)L[I]=_a(Wa(i,P,I));let D=i[2].tags||[],T=[];for(let I=0;I<D.length;I+=1)T[I]=Ya(Ha(i,D,I));let W=y&&Ua(i),G=i[2].highlightText&&Za(i);return{c(){var I;t=j("div"),ee(e.$$.fragment),n=te(),o=j("div"),s=te(),r=j("div"),a=j("img"),c=te(),d=j("div");for(let O=0;O<L.length;O+=1)L[O].c();u=te();for(let O=0;O<T.length;O+=1)T[O].c();f=te(),h=j("div"),p=j("div"),g=Ie(A),v=te(),w=j("div"),W&&W.c(),C=te(),G&&G.c(),b(o,"class","line svelte-8mby9k"),M(o,"transition-delay",i[1]?vi+"ms":bi+Ka-qa-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),_e(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(d,"class","tag svelte-8mby9k"),b(p,"class","text svelte-8mby9k"),b(h,"class","title svelte-8mby9k"),b(w,"class","footer svelte-8mby9k"),M(w,"height",Xe((I=i[2].price)==null?void 0:I.value)&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),M(r,"transition-delay",i[1]?vi+bi+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),ne(t,"unfolded",i[1]),ne(t,"folded",i[3])},m(I,O){B(I,t,O),K(e,t,null),Q(t,n),Q(t,o),Q(t,s),Q(t,r),Q(r,a),Q(r,c),Q(r,d);for(let F=0;F<L.length;F+=1)L[F].m(d,null);Q(d,u);for(let F=0;F<T.length;F+=1)T[F].m(d,null);Q(r,f),Q(r,h),Q(h,p),Q(p,g),Q(r,v),Q(r,w),W&&W.m(w,null),Q(w,C),G&&G.m(w,null),E=!0},p(I,[O]){var N,Z,_;const F={};if(O&2&&(F.visible=I[1]),e.$set(F),O&2&&M(o,"transition-delay",I[1]?vi+"ms":bi+Ka-qa-40+"ms"),(!E||O&4&&!_e(a.src,l=I[2].headerPictureUrl))&&b(a,"src",l),O&4){P=I[2].brandTags||[];let q;for(q=0;q<P.length;q+=1){const fe=Wa(I,P,q);L[q]?L[q].p(fe,O):(L[q]=_a(fe),L[q].c(),L[q].m(d,u))}for(;q<L.length;q+=1)L[q].d(1);L.length=P.length}if(O&4){D=I[2].tags||[];let q;for(q=0;q<D.length;q+=1){const fe=Ha(I,D,q);T[q]?T[q].p(fe,O):(T[q]=Ya(fe),T[q].c(),T[q].m(d,null))}for(;q<T.length;q+=1)T[q].d(1);T.length=D.length}(!E||O&4)&&A!==(A=I[2].title+"")&&Le(g,A),O&4&&(y=Xe((N=I[2].price)==null?void 0:N.value)&&((Z=I[2].price)==null?void 0:Z.value)!==""),y?W?W.p(I,O):(W=Ua(I),W.c(),W.m(w,C)):W&&(W.d(1),W=null),I[2].highlightText?G?G.p(I,O):(G=Za(I),G.c(),G.m(w,null)):G&&(G.d(1),G=null),O&4&&M(w,"height",Xe((_=I[2].price)==null?void 0:_.value)&&I[2].highlightText?void 0:"1rem"),O&2&&M(r,"transition-delay",I[1]?vi+bi+"ms":"0ms"),(!E||O&2)&&ne(t,"unfolded",I[1]),(!E||O&8)&&ne(t,"folded",I[3])},i(I){E||(x(e.$$.fragment,I),E=!0)},o(I){S(e.$$.fragment,I),E=!1},d(I){I&&z(t),$(e),dt(L,I),dt(T,I),W&&W.d(),G&&G.d()}}}const vi=400,qa=500,bi=180,Ka=500;function jg(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 Vg extends se{constructor(t){super(),oe(this,t,jg,Tg,ie,{tag:0},Bg)}}const sn="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uQxAACFEII9ACZ/sJZwWEoEb8w/////N//////JcxjHjf+7/v/H2PzCCFAiDtGeyBCIx7bJJ1mmEEMy6g8mm2c8nrGABB4h2Mkmn//4z/73u773R5qHHu/j/w7Kxkzh5lWRWdsifCkNAnY9Zc1HvDAhjhSHdFkHFzLmabt/AQxSg2wwzLhHIJOBnAWwVY4zrhIYhhc2kvhYDfQ4hDi2Gmh5KyFn8EcGIrHAngNgIwVIEMf5bzbAiTRoAD///8z/KVhkkWEle6IX+d/z4fvH3BShK1e5kmjkCMoxVmXhd4ROlTKo3iipasvTilY21q19ta30/v/0/idPX1v8PNxJL6ramnOVsdvMv2akO0iSYIzdJFirtzWXCZicS9vHqvSKyqm5XJBdqBwPxyfJdykhWTZ0G0ZyTZGpLKxsNwwoRhsx3tZfhwmeOBVISm3impAC/IT/8hP/EKEM1KMdVdVKM2rHV4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VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",wn={};var yi=(i=>(i.Default="default",i.GetAudioDuration="getAudioDuration",i.PlayAudio="playAudio",i))(yi||{});function $a(i,t){const e=(t==null?void 0:t.namespace)||"default",n=wn[e]||(wn[e]=[]);let o=n.find(s=>!s.realSrc||s.realSrc===sn);return o||(console.warn("\u672A\u627E\u5230\u7F13\u5B58\u97F3\u9891\uFF0C\u5DF2\u65B0\u5EFA",wn),o=new Ao(sn),n.push(o)),i&&(o.src=i),o}function Qg(i){return X(this,null,function*(){const t=(()=>i instanceof Ao?i:$a(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 el(i,t){const e=(t==null?void 0:t.namespace)||"default",n=wn[e]||(wn[e]=[]),o=i-n.length;if(!(o<=0))for(let s=0;s<o;s++)n.push(new Ao(sn))}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=()=>Og(this);document.addEventListener("click",n),document.addEventListener("touchend",n),this.removeDocumentEventListener=()=>{document.removeEventListener("click",n),document.removeEventListener("touchend",n)}}get isBlankAudio(){return this.realSrc===sn||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e}clear(){this.src=sn,this.currentTime=0}}function Og(i){!i||i.inited||(i.src&&(i.inited=!0,i.removeDocumentEventListener()),i.src===sn&&i.play())}class Rg 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 X(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=$a(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=f=>{var h;this.sharedAudioCurrentTime=e.currentTime,(h=this.ontimeupdate)==null||h.call(this,f)},o=f=>{var h;return(h=this.onplay)==null?void 0:h.call(this,f)},s=f=>{var h;(h=this.onpause)==null||h.call(this,f),this.clear()},r=f=>{var h;(h=this.onended)==null||h.call(this,f),this.sharedAudioCurrentTime=0},a=f=>{var h;return(h=this.onerror)==null?void 0:h.call(this,f)},l=f=>{var h;return(h=this.oncanplay)==null?void 0:h.call(this,f)},c=f=>{var h;return(h=this.oncanplaythrough)==null?void 0:h.call(this,f)},d=f=>{var h;return(h=this.onloadeddata)==null?void 0:h.call(this,f)},u=f=>{var h;return(h=this.onloadedmetadata)==null?void 0:h.call(this,f)};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",d),e.addEventListener("loadedmetadata",u),()=>{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",d),e.removeEventListener("loadedmetadata",u)}}}function Fg(i){le(i,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function Gg(i){let t,e,n,o;const s=i[8].default,r=rt(s,i,i[7],null);return{c(){t=j("div"),r&&r.c(),b(t,"class","audio svelte-13e7hxv"),b(t,"style",i[0])},m(a,l){B(a,t,l),r&&r.m(t,null),e=!0,n||(o=Me(t,"click",qo(i[1])),n=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&lt(r,s,a,a[7],e?at(s,a[7],l,null):ct(a[7]),null),(!e||l&1)&&b(t,"style",a[0])},i(a){e||(x(r,a),e=!0)},o(a){S(r,a),e=!1},d(a){a&&z(t),r&&r.d(a),n=!1,o()}}}function Hg(i,t,e){let{$$slots:n={},$$scope:o}=t,{url:s}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=Hn(),d=ft("hooks"),u=ft("mediaStore");let f,h=!0;function p(){e(5,f.onplay=g=>{d.emit("playStateChange",H({event:g,state:"playing",mediaInstance:f},l)),c("play"),e(6,h=!1)},f),e(5,f.onpause=g=>{d.emit("playStateChange",H({event:g,state:"paused",mediaInstance:f},l)),c("pause"),e(6,h=!0)},f),e(5,f.onloadedmetadata=g=>{typeof f.duration=="number"&&!Number.isNaN(f.duration)&&c("duration",f.duration)},f),e(5,f.ontimeupdate=g=>{c("timeupdate",f.currentTime)},f)}u.subscribe(({currentMediaElement:g})=>{g!==f&&(h||f==null||f.pause())});function A(g){!f||(d.emit("click",H({event:g,target:"AudioTagPlayIcon",audioInstance:f},l)),u.set({currentMediaElement:f}),d.emit("playStateChange",H({event:g,state:f.paused?"playing":"paused",mediaInstance:f},l)),f.paused?f.play():f.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&&(f==null||f.dispose(),e(5,f=new Rg(s)),c("audioRef",f),setTimeout(()=>c("audioRef",f),200),Qg(s).then(g=>c("duration",g)),p()),i.$$.dirty&40&&(r||f==null||f.pause()),i.$$.dirty&72&&c(r&&!h?"play":"pause")},[a,A,s,r,l,f,h,o,n]}class tl extends se{constructor(t){super(),oe(this,t,Hg,Gg,ie,{url:2,enable:3,style:0,hooksInfo:4},Fg)}}function Wg(i){le(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 nl(i){let t,e;return t=new et({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Ng(i){let t,e,n,o,s,r=i[1]&&nl();return{c(){t=j("div"),r&&r.c(),e=te(),n=j("div"),o=j("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"),ne(n,"playing",i[0]),b(t,"class","audio-icon__wrapper svelte-srt2pi"),b(t,"style",i[2]),M(t,"width",i[5]),M(t,"height",i[5])},m(a,l){B(a,t,l),r&&r.m(t,null),Q(t,e),Q(t,n),Q(n,o),i[7](o),i[8](t),s=!0},p(a,[l]){a[1]?r?l&2&&x(r,1):(r=nl(),r.c(),x(r,1),r.m(t,e)):r&&(re(),S(r,1,1,()=>{r=null}),ae()),(!s||l&1)&&ne(n,"playing",a[0]),(!s||l&4)&&b(t,"style",a[2]),l&32&&M(t,"width",a[5]),l&32&&M(t,"height",a[5])},i(a){s||(x(r),s=!0)},o(a){S(r),s=!1},d(a){a&&z(t),r&&r.d(),i[7](null),i[8](null)}}}function _g(i,t,e){let n,{playing:o}=t,{shadow:s=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function d(f){ze[f?"unshift":"push"](()=>{c=f,e(4,c)})}function u(f){ze[f?"unshift":"push"](()=>{l=f,e(3,l)})}return i.$$set=f=>{"playing"in f&&e(0,o=f.playing),"shadow"in f&&e(1,s=f.shadow),"style"in f&&e(2,r=f.style),"width"in f&&e(6,a=f.width)},i.$$.update=()=>{i.$$.dirty&64&&e(5,n=typeof a=="number"?Pe(a):a)},[o,s,r,l,c,n,a,d,u]}class il extends se{constructor(t){super(),oe(this,t,_g,Ng,ie,{playing:0,shadow:1,style:2,width:6},Wg)}}function Xg(i){le(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 ol(i){var v,w;let t,e,n,o,s,r,a,l,c,d,u,f,h,p,A;e=new et({props:{visible:i[6],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let g=i[6]&&sl(i);return c=new ua({props:{visible:i[6],textUnfolded:i[1],content:i[5]}}),f=new ao({props:{unfolded:i[6],length:i[3],outDelay:i[4]+20*Math.min((w=(v=i[5])==null?void 0:v.length)!=null?w:10,15),useLinearColor:!0}}),{c(){t=j("div"),ee(e.$$.fragment),n=te(),o=j("div"),s=j("div"),r=j("div"),g&&g.c(),a=te(),l=j("div"),ee(c.$$.fragment),u=te(),ee(f.$$.fragment),b(r,"class","audio-icon svelte-1s6gk4a"),Se(()=>i[11].call(l)),M(l,"display","inline-block"),b(s,"class","wrapper svelte-1s6gk4a"),b(o,"class","content svelte-1s6gk4a"),b(t,"class","audio-tag svelte-1s6gk4a"),ne(t,"unfolded",i[6])},m(y,C){B(y,t,C),K(e,t,null),Q(t,n),Q(t,o),Q(o,s),Q(s,r),g&&g.m(r,null),Q(s,a),Q(s,l),K(c,l,null),d=bt(l,i[11].bind(l)),Q(t,u),K(f,t,null),h=!0,p||(A=Me(l,"click",i[7]),p=!0)},p(y,C){var D,T;const E={};C&64&&(E.visible=y[6]),C&8&&(E.left=y[3]/2+"px"),e.$set(E),y[6]?g?(g.p(y,C),C&64&&x(g,1)):(g=sl(y),g.c(),x(g,1),g.m(r,null)):g&&(re(),S(g,1,1,()=>{g=null}),ae());const P={};C&64&&(P.visible=y[6]),C&2&&(P.textUnfolded=y[1]),C&32&&(P.content=y[5]),c.$set(P);const L={};C&64&&(L.unfolded=y[6]),C&8&&(L.length=y[3]),C&48&&(L.outDelay=y[4]+20*Math.min((T=(D=y[5])==null?void 0:D.length)!=null?T:10,15)),f.$set(L),(!h||C&64)&&ne(t,"unfolded",y[6])},i(y){h||(x(e.$$.fragment,y),x(g),x(c.$$.fragment,y),x(f.$$.fragment,y),h=!0)},o(y){S(e.$$.fragment,y),S(g),S(c.$$.fragment,y),S(f.$$.fragment,y),h=!1},d(y){y&&z(t),$(e),g&&g.d(),$(c),d(),$(f),p=!1,A()}}}function sl(i){let t,e,n,o,s,r,a;return e=new et({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new tl({props:{enable:i[6],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[Yg]},$$scope:{ctx:i}}}),o.$on("play",i[8]),o.$on("pause",i[9]),o.$on("audioRef",i[10]),{c(){t=j("div"),ee(e.$$.fragment),n=te(),ee(o.$$.fragment),b(t,"class","audio svelte-1s6gk4a")},m(l,c){B(l,t,c),K(e,t,null),Q(t,n),K(o,t,null),a=!0},p(l,c){i=l;const d={};c&64&&(d.enable=i[6]),c&1&&(d.url=i[0].data.audioUrl),c&1&&(d.hooksInfo={tag:i[0]}),c&4100&&(d.$$scope={dirty:c,ctx:i}),o.$set(d)},i(l){a||(x(e.$$.fragment,l),x(o.$$.fragment,l),l&&Se(()=>{r&&r.end(1),s=Tt(t,Vt,{duration:1e3,delay:0,easing:Kt}),s.start()}),a=!0)},o(l){var c,d;S(e.$$.fragment,l),S(o.$$.fragment,l),s&&s.invalidate(),l&&(r=qt(t,Vt,{duration:1e3,delay:20*Math.min((d=(c=i[5])==null?void 0:c.length)!=null?d:10,15),easing:Kt})),a=!1},d(l){l&&z(t),$(e),$(o),l&&r&&r.end()}}}function Yg(i){let t,e,n;return e=new il({props:{playing:i[2]}}),{c(){t=j("div"),ee(e.$$.fragment),b(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){B(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||(x(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function Ug(i){let t,e,n=i[0].state&&ol(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=ol(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Jg(i,t,e){let n,o,s,{tag:r}=t,a=!1,l=!1,c;function d(){e(1,a=!a)}const u=()=>{e(2,l=!0)},f=()=>{e(2,l=!1)};function h(A){Vi.call(this,i,A)}function p(){c=this.clientWidth,e(3,c)}return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,g,v;i.$$.dirty&1&&e(6,n=!!((A=r.state)!=null&&A.unfolded)),i.$$.dirty&1&&e(5,o=(v=(g=r.data.title)!=null?g:r.data.text)!=null?v:""),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,o,n,d,u,f,h,p]}class Zg extends se{constructor(t){super(),oe(this,t,Jg,Ug,ie,{tag:0},Xg)}}function qg(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 Kg(i){le(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 rl(i){let t,e,n,o;return n=new tl({props:{style:"width: max-content; height: max-content;",enable:i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[e0]},$$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=j("div"),e=j("div"),ee(n.$$.fragment),b(e,"class","audio-tag svelte-58hfjf"),M(e,"background-color",i[1]),M(e,"color",i[5]),b(t,"class","audio-tag__wrapper svelte-58hfjf")},m(s,r){B(s,t,r),Q(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&&M(e,"background-color",s[1]),r&32&&M(e,"color",s[5])},i(s){o||(x(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&z(t),$(n)}}}function $g(i){let t;return{c(){t=Ie(i[6])},m(e,n){B(e,t,n)},p(e,n){n&64&&Le(t,e[6])},d(e){e&&z(t)}}}function e0(i){let t,e,n,o,s,r,a;return n=new il({props:{playing:i[2]}}),r=new fo({props:{maxWidth:72,$$slots:{default:[$g]},$$scope:{ctx:i}}}),{c(){t=j("div"),e=j("div"),ee(n.$$.fragment),o=te(),s=j("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){B(l,t,c),Q(t,e),K(n,e,null),Q(t,o),Q(t,s),K(r,s,null),a=!0},p(l,c){const d={};c&4&&(d.playing=l[2]),n.$set(d);const u={};c&8256&&(u.$$scope={dirty:c,ctx:l}),r.$set(u)},i(l){a||(x(n.$$.fragment,l),x(r.$$.fragment,l),a=!0)},o(l){S(n.$$.fragment,l),S(r.$$.fragment,l),a=!1},d(l){l&&z(t),$(n),$(r)}}}function t0(i){let t,e,n=i[0].state&&rl(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=rl(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function n0(i,t,e){let n,o,s,{tag:r}=t;Hn();let a=!1,l=0,c=0;const d=()=>{e(2,a=!0)},u=()=>{e(2,a=!1)},f=A=>{e(3,l=A.detail)},h=A=>{e(4,c=A.detail)};function p(A){Vi.call(this,i,A)}return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,g;i.$$.dirty&1&&e(6,n=(g=(A=r.data.title)!=null?A:r.data.text)!=null?g:""),i.$$.dirty&1&&e(1,o=(()=>{var v;return r.data.backgroundColor==="dark"?"rgba(0, 0, 0, 0.3)":r.data.backgroundColor==="light"?"rgba(255, 255, 255, 0.3)":(v=r.data.backgroundColor)!=null?v:"rgba(0, 0, 0, 0.3)"})()),i.$$.dirty&2&&e(5,s=(()=>{const{r:v,g:w,b:y}=qg(o);return(v*299+w*587+y*114)/1e3>=128?"rgba(0, 0, 0, 0.6)":"white"})())},[r,o,a,l,c,s,n,d,u,f,h,p]}class i0 extends se{constructor(t){super(),oe(this,t,n0,t0,ie,{tag:0},Kg)}}function o0(i){let t,e;return t=new i0({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||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function s0(i){let t,e;return t=new Zg({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||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function r0(i){let t,e,n,o;const s=[s0,o0],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=me()},m(l,c){~t&&r[t].m(l,c),B(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(re(),S(r[d],1,1,()=>{r[d]=null}),ae()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),x(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(x(e),o=!0)},o(l){S(e),o=!1},d(l){~t&&r[t].d(l),l&&z(n)}}}function a0(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 l0 extends se{constructor(t){super(),oe(this,t,a0,r0,ie,{tag:0})}}function c0(i){le(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function al(i){var o;let t,e,n;return e=new Ta({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=j("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(s,r){B(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||(x(e.$$.fragment,s),n=!0)},o(s){S(e.$$.fragment,s),n=!1},d(s){s&&z(t),$(e)}}}function d0(i){let t,e,n=i[0].state&&i[5]&&al(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&x(n,1)):(n=al(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function u0(i,t,e){let n,o,s,r,a,l,{tag:c}=t;return i.$$set=d=>{"tag"in d&&e(0,c=d.tag)},i.$$.update=()=>{var d,u;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=(d=c.data.autoplayConfig)!=null?d:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,l=(u=c.data.objectFit)!=null?u:(()=>c.data.adaptationMode==="stretch"?"cover":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,s,l,a,r,o,n]}class f0 extends se{constructor(t){super(),oe(this,t,u0,d0,ie,{tag:0},c0)}}function h0(i){return X(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 m0(i){return X(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 h0(e),a=s/n,l=r/n,c=a/t,d=l,u=1/o*t+"s",f=a/t-a;return{url:e,keyframesWidth:a,keyframesHeight:l,wrapperWidth:c,wrapperHeight:d,steps:t,duration:u,offsetX:f,offsetY:0}})}function p0(i){le(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 ll(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 cl(i){let t,e,n,o=i[2]&&dl();function s(l,c){return l[3]?A0:g0}let r=s(i),a=r(i);return{c(){t=j("div"),o&&o.c(),e=te(),a.c(),b(t,"class","icon"),M(t,"width",typeof i[0]=="number"?Pe(i[0]):i[0])},m(l,c){B(l,t,c),o&&o.m(t,null),Q(t,e),a.m(t,null),n=!0},p(l,c){l[2]?o?c&4&&x(o,1):(o=dl(),o.c(),x(o,1),o.m(t,e)):o&&(re(),S(o,1,1,()=>{o=null}),ae()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&1&&M(t,"width",typeof l[0]=="number"?Pe(l[0]):l[0])},i(l){n||(x(o),n=!0)},o(l){S(o),n=!1},d(l){l&&z(t),o&&o.d(),a.d()}}}function dl(i){let t,e;return t=new et({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function g0(i){let t,e;return{c(){t=j("img"),b(t,"class","icon-image svelte-mhs8j5"),_e(t.src,e=i[1].url)||b(t,"src",e),b(t,"alt","icon")},m(n,o){B(n,t,o)},p(n,o){o&2&&!_e(t.src,e=n[1].url)&&b(t,"src",e)},d(n){n&&z(t)}}}function A0(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:y0,then:b0,catch:v0,value:14};return ss(e=i[4](i[1]),n),{c(){t=me(),n.block.c()},m(o,s){B(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]))&&ss(e,n)||mc(n,i,s)},d(o){o&&z(t),n.block.d(o),n.token=null,n=null}}}function v0(i){return{c:J,m:J,p:J,d:J}}function b0(i){ll(i);let t,e,n,o=`url(${i[6]})`,s=`steps(${i[11]-1})`;return{c(){t=j("div"),e=j("div"),n=j("div"),b(n,"class","icon-keyframe svelte-mhs8j5"),M(n,"width",Pe(i[7])),M(n,"height",Pe(i[8])),M(n,"background-image",o),M(n,"animation-duration",i[12]),M(n,"animation-timing-function",s),M(n,"animation-delay",0),M(n,"background-size","100% 100%"),M(n,"--keyframe_offset_x",Pe(i[13])),b(e,"class","icon-keyframe-wrapper svelte-mhs8j5"),M(e,"transform",typeof i[0]=="number"?`scale(${i[0]/i[9]})`:void 0),b(t,"class","icon-keyframe-container svelte-mhs8j5"),M(t,"width",typeof i[0]=="number"?Pe(i[0]):Pe(i[9])),M(t,"height",typeof i[0]=="number"?Pe(i[10]*(i[0]/i[9])):Pe(i[10]))},m(r,a){B(r,t,a),Q(t,e),Q(e,n)},p(r,a){ll(r),a&2&&M(n,"width",Pe(r[7])),a&2&&M(n,"height",Pe(r[8])),a&2&&o!==(o=`url(${r[6]})`)&&M(n,"background-image",o),a&2&&M(n,"animation-duration",r[12]),a&2&&s!==(s=`steps(${r[11]-1})`)&&M(n,"animation-timing-function",s),a&2&&M(n,"--keyframe_offset_x",Pe(r[13])),a&3&&M(e,"transform",typeof r[0]=="number"?`scale(${r[0]/r[9]})`:void 0),a&3&&M(t,"width",typeof r[0]=="number"?Pe(r[0]):Pe(r[9])),a&3&&M(t,"height",typeof r[0]=="number"?Pe(r[10]*(r[0]/r[9])):Pe(r[10]))},d(r){r&&z(t)}}}function y0(i){return{c:J,m:J,p:J,d:J}}function w0(i){let t,e,n=i[1]&&cl(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=cl(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function C0(i,t,e){let n,{width:o=null}=t,{icon:s=null}=t,{shadow:r=!1}=t;const a=Hn();function l(c){return X(this,null,function*(){const d=yield m0(c);return a("iconLoaded"),d})}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 ul extends se{constructor(t){super(),oe(this,t,C0,w0,ie,{width:0,icon:1,shadow:2},p0)}}function P0(i){le(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 fl(i){let t,e,n,o,s,r;return e=new et({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=j("div"),ee(e.$$.fragment),n=te(),o=j("div"),s=Ie(i[1]),b(o,"class","text svelte-e58ijk"),b(t,"class","text-wrapper svelte-e58ijk")},m(a,l){B(a,t,l),K(e,t,null),Q(t,n),Q(t,o),Q(o,s),r=!0},p(a,l){(!r||l&2)&&Le(s,a[1])},i(a){r||(x(e.$$.fragment,a),r=!0)},o(a){S(e.$$.fragment,a),r=!1},d(a){a&&z(t),$(e)}}}function I0(i){let t,e,n,o;e=new ul({props:{icon:i[0],shadow:!0}}),e.$on("iconLoaded",i[9]);let s=i[1]&&i[2]&&fl(i);return{c(){t=j("div"),ee(e.$$.fragment),n=te(),s&&s.c(),b(t,"class","wrapper svelte-e58ijk")},m(r,a){B(r,t,a),K(e,t,null),Q(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&&x(s,1)):(s=fl(r),s.c(),x(s,1),s.m(t,null)):s&&(re(),S(s,1,1,()=>{s=null}),ae())},i(r){o||(x(e.$$.fragment,r),x(s),o=!0)},o(r){S(e.$$.fragment,r),S(s),o=!1},d(r){r&&z(t),$(e),s&&s.d()}}}function E0(i,t,e){let n,o,s,r,a,l,c,d,{tag:u}=t;const f=()=>{e(2,n=!0)};return i.$$set=h=>{"tag"in h&&e(3,u=h.tag)},i.$$.update=()=>{var h,p;i.$$.dirty&8&&e(1,o=(h=u.data.title)!=null?h:u.data.text),i.$$.dirty&8&&e(8,s=(p=u.data.icon)!=null?p:u.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,d={url:r,steps:a,fps:l,ratio:c})},e(2,n=!1),[d,o,n,u,c,l,a,r,s,f]}class k0 extends se{constructor(t){super(),oe(this,t,E0,I0,ie,{tag:3},P0)}}function x0(i){le(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function hl(i){let t,e=i[0].element+"",n;return{c(){t=new Rn(!1),n=me(),t.a=n},m(o,s){t.m(e,o,s),B(o,n,s)},p(o,s){s&1&&e!==(e=o[0].element+"")&&t.p(e)},d(o){o&&z(n),o&&t.d()}}}function D0(i){let t,e=typeof i[0].element=="string"&&hl(i);return{c(){t=j("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){B(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=hl(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:J,o:J,d(n){n&&z(t),e&&e.d(),i[2](null)}}}function L0(i,t,e){let{tag:n}=t,o,s;Ze(()=>{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){ze[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class S0 extends se{constructor(t){super(),oe(this,t,L0,D0,ie,{tag:0},x0)}}function M0(i){le(i,"svelte-ofx2uu",'@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/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACCAA7AcwAdwIIADMCCAA0AhwAMwISADkCCAAuAfQANAH+ACsB/gAp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2BrHaMVath4T7PsN93QVu7FjXFtlZltcZbC7urGzuh8T8oX8ghVPW7zHx7q6yMa9W1BPWVpQHw6i96Tz92/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-ofx2uu{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.withAnimation.svelte-ofx2uu{transition:opacity 0.3s linear}.content__container.unClickable.svelte-ofx2uu{pointer-events:none !important}.content__container.unClickable.svelte-ofx2uu *{pointer-events:none !important}.content__wrapper.svelte-ofx2uu{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-ofx2uu{opacity:0;pointer-events:none}.content__container.hide.svelte-ofx2uu *{pointer-events:none !important}.content__container.disable.svelte-ofx2uu{display:none}.content.svelte-ofx2uu{position:relative;width:100%;height:100%;font-size:0.75rem;line-height:1.125rem;color:#fff}.content.svelte-ofx2uu:not(.unfolded){pointer-events:none}.content.svelte-ofx2uu:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-ofx2uu{pointer-events:auto}')}function z0(i){let t,e;return{c(){t=j("div"),b(t,"data-info","tag content is keep folded"),b(t,"data-id",e=i[1].id)},m(n,o){B(n,t,o)},p(n,o){o&2&&e!==(e=n[1].id)&&b(t,"data-id",e)},i:J,o:J,d(n){n&&z(t)}}}function B0(i){let t,e,n,o,s,r,a,l,c;const d=[F0,R0,O0,Q0,V0,j0,T0],u=[];function f(h,p){return h[1].element?0:h[1].contentType==="Text"?1:h[1].contentType==="ImageText"||h[1].contentType==="Image"||h[1].contentType==="Video"?2:h[1].contentType==="Audio"?3:h[1].contentType==="Marketing"?4:h[1].contentType==="Link"||h[1].contentType==="VRLink"||h[1].contentType==="PanoLink"?5:h[1].contentType==="MediaPlane"||h[1].contentType==="MediaModel"?6:-1}return~(o=f(i))&&(s=u[o]=d[o](i)),{c(){var h;t=j("div"),e=j("div"),n=j("div"),s&&s.c(),b(n,"class","content svelte-ofx2uu"),ne(n,"unfolded",(h=i[1].state)==null?void 0:h.unfolded),b(e,"class","content__wrapper svelte-ofx2uu"),b(t,"class","content__container svelte-ofx2uu"),b(t,"data-id",r=i[1].id),ne(t,"disable",i[1].enabled===!1),ne(t,"hide",i[4]),ne(t,"withAnimation",i[0]),ne(t,"unClickable",i[1].clickable===!1),M(t,"width",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0),M(t,"height",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0)},m(h,p){B(h,t,p),Q(t,e),Q(e,n),~o&&u[o].m(n,null),a=!0,l||(c=Me(t,"click",qo(i[13])),l=!0)},p(h,p){var g;let A=o;o=f(h),o===A?~o&&u[o].p(h,p):(s&&(re(),S(u[A],1,1,()=>{u[A]=null}),ae()),~o?(s=u[o],s?s.p(h,p):(s=u[o]=d[o](h),s.c()),x(s,1),s.m(n,null)):s=null),(!a||p&2)&&ne(n,"unfolded",(g=h[1].state)==null?void 0:g.unfolded),(!a||p&2&&r!==(r=h[1].id))&&b(t,"data-id",r),(!a||p&2)&&ne(t,"disable",h[1].enabled===!1),(!a||p&16)&&ne(t,"hide",h[4]),(!a||p&1)&&ne(t,"withAnimation",h[0]),(!a||p&2)&&ne(t,"unClickable",h[1].clickable===!1),p&2&&M(t,"width",h[1].stickType==="Plane"||h[1].contentType==="MediaModel"?"100%":0),p&2&&M(t,"height",h[1].stickType==="Plane"||h[1].contentType==="MediaModel"?"100%":0)},i(h){a||(x(s),a=!0)},o(h){S(s),a=!1},d(h){h&&z(t),~o&&u[o].d(),l=!1,c()}}}function T0(i){let t,e;return t=new f0({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function j0(i){let t,e;return t=new k0({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function V0(i){let t,e;return t=new Vg({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Q0(i){let t,e;return t=new l0({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function O0(i){let t,e;return t=new bg({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function R0(i){let t,e;return t=new zp({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function F0(i){let t,e;return t=new S0({props:{tag:Be(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Be(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function G0(i){let t,e,n,o;const s=[B0,z0],r=[];function a(l,c){return l[3]?0:1}return t=a(i),e=r[t]=s[t](i),{c(){e.c(),n=me()},m(l,c){r[t].m(l,c),B(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?r[t].p(l,c):(re(),S(r[d],1,1,()=>{r[d]=null}),ae(),e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),x(e,1),e.m(n.parentNode,n))},i(l){o||(x(e),o=!0)},o(l){S(e),o=!1},d(l){r[t].d(l),l&&z(n)}}}function H0(i,t,e){let n,o,s,r,a,l,{withAnimation:c=!1}=t,{tag:d}=t,{hooks:u}=t,{state:f}=t,{mediaStore:h}=t,{temporaryState:p}=t;Wn("hooks",u),Wn("mediaStore",h);let A,g;function v(C){C?u.emit("exposure",{id:r,type:"start"}):u.emit("exposure",{id:r,type:"end"})}function w(C,E,P){var L,D;return!(!E.visible||!E.enabled||!P.visible||!((L=C.state)!=null&&L.visible)||((D=C.temporaryState)==null?void 0:D.visible)===!1||Ne(C)&&C.mediaVisible===!1)}const y=C=>u.emit("click",{event:C,target:"TagContent",tag:d});return i.$$set=C=>{"withAnimation"in C&&e(0,c=C.withAnimation),"tag"in C&&e(1,d=C.tag),"hooks"in C&&e(2,u=C.hooks),"state"in C&&e(5,f=C.state),"mediaStore"in C&&e(6,h=C.mediaStore),"temporaryState"in C&&e(7,p=C.temporaryState)},i.$$.update=()=>{var C,E,P,L,D,T,W,G,Y,V,I;i.$$.dirty&2&&e(11,n=(C=d.state)==null?void 0:C.unfolded),i.$$.dirty&2&&e(10,o=(E=d.state)==null?void 0:E.visible),i.$$.dirty&162&&e(12,s=f.visible&&p.visible&&((P=d.state)==null?void 0:P.visible)),i.$$.dirty&2&&(r=d.id),i.$$.dirty&162&&e(4,a=!w(d,f,p)),i.$$.dirty&4096&&v(s),i.$$.dirty&3842&&d.hooks&&(n!==void 0&&n!==g&&(e(9,g=n),n?(D=(L=d.hooks).emit)==null||D.call(L,"unfolded"):(W=d==null?void 0:(T=d.hooks).emit)==null||W.call(T,"folded")),o!==void 0&&o!==A&&(e(8,A=o),o?(Y=(G=d.hooks).emit)==null||Y.call(G,"show"):(I=(V=d.hooks).emit)==null||I.call(V,"hide"))),i.$$.dirty&2&&e(3,l=(()=>!(typeof d.mergedConfig.unfoldedConfig=="object"&&d.mergedConfig.unfoldedConfig.keep==="folded"))())},[c,d,u,l,a,f,h,p,A,g,o,n,s,y]}class ml extends se{constructor(t){super(),oe(this,t,H0,G0,ie,{withAnimation:0,tag:1,hooks:2,state:5,mediaStore:6,temporaryState:7},M0)}}function W0(i){le(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 N0(i){let t,e,n,o,s,r,a,l,c,d,u,f;return o=new et({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new ul({props:{icon:i[2],width:i[1]}}),{c(){t=j("div"),e=te(),n=j("div"),ee(o.$$.fragment),s=te(),r=j("div"),a=te(),l=j("div"),ee(c.$$.fragment),b(t,"class","tag-point-click-helper svelte-yex9rb"),b(r,"class","tag-unfolded-point svelte-yex9rb"),M(r,"transition-delay",(i[3]?i[5]:0)+"ms"),b(l,"class","tag-folded-point svelte-yex9rb"),M(l,"transition-delay",(i[3]?i[5]:0)+"ms"),b(n,"class","tag-point-wrapper svelte-yex9rb"),ne(n,"unfolded",i[0]),ne(n,"folded",i[3]),M(n,"width",Pe(i[1])),M(n,"height",Pe(i[1]))},m(h,p){B(h,t,p),B(h,e,p),B(h,n,p),K(o,n,null),Q(n,s),Q(n,r),Q(n,a),Q(n,l),K(c,l,null),d=!0,u||(f=Me(t,"click",i[4]),u=!0)},p(h,[p]){p&8&&M(r,"transition-delay",(h[3]?h[5]:0)+"ms");const A={};p&4&&(A.icon=h[2]),p&2&&(A.width=h[1]),c.$set(A),p&8&&M(l,"transition-delay",(h[3]?h[5]:0)+"ms"),(!d||p&1)&&ne(n,"unfolded",h[0]),(!d||p&8)&&ne(n,"folded",h[3]),p&2&&M(n,"width",Pe(h[1])),p&2&&M(n,"height",Pe(h[1]))},i(h){d||(x(o.$$.fragment,h),x(c.$$.fragment,h),d=!0)},o(h){S(o.$$.fragment,h),S(c.$$.fragment,h),d=!1},d(h){h&&z(t),h&&z(e),h&&z(n),$(o),$(c),u=!1,f()}}}function _0(i,t,e){let n,o,s,r;const a=ft("hooks");let{tag:l}=t,c,d=!1;const u=()=>{c!==void 0&&clearTimeout(c),d=!0,c=setTimeout(()=>{d=!1},800)},f=p=>{d||a.emit("click",{event:p,target:"TagPoint",tag:l})},h=(()=>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,A,g,v;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=(A=l.style)==null?void 0:A.point)!=null&&g.url?(v=l.style)==null?void 0:v.point:{url:sp}),i.$$.dirty&64&&e(1,r=(()=>{var y,C,E;const w=(E=(C=(y=l.style)==null?void 0:y.point)==null?void 0:C.size)!=null?E:"S";return typeof w=="number"?w:w==="S"?18:w==="M"?20:w==="L"?24:w==="XL"?28:18})())},u(),[n,r,s,o,f,h,l]}class X0 extends se{constructor(t){super(),oe(this,t,_0,N0,ie,{tag:6},W0)}}function Y0(i){le(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 U0(i){let t;return{c(){t=j("div"),b(t,"data-info","tag content is disable")},m(e,n){B(e,t,n)},p:J,i:J,o:J,d(e){e&&z(t)}}}function J0(i){let t,e;return t=new ml({props:{mediaStore:i[2],withAnimation:i[0],tag:Be(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=Be(n[1])),o&8&&(s.state=n[3]),o&16&&(s.temporaryState=n[4]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Z0(i){let t;return{c(){t=j("div"),b(t,"data-info","tag point is disable")},m(e,n){B(e,t,n)},p:J,i:J,o:J,d(e){e&&z(t)}}}function q0(i){let t,e;return t=new X0({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||(x(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function K0(i){let t,e,n,o,s,r,a,l,c;const d=[J0,U0],u=[];function f(g,v){return g[12]?0:1}n=f(i),o=u[n]=d[n](i);const h=[q0,Z0],p=[];function A(g,v){return g[13]?0:1}return r=A(i),a=p[r]=h[r](i),{c(){t=j("div"),e=j("div"),o.c(),s=te(),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),M(e,"left",i[7]),M(e,"top",i[6]),M(e,"z-index",i[5]),b(t,"class","tag svelte-pzwdws"),b(t,"data-tag-id",i[11]),ne(t,"unClickable",i[1].clickable===!1),ne(t,"disable",i[10]),ne(t,"hide",i[9]),ne(t,"withAnimation",i[0])},m(g,v){B(g,t,v),Q(t,e),u[n].m(e,null),Q(e,s),p[r].m(e,null),c=!0},p(g,[v]){let w=n;n=f(g),n===w?u[n].p(g,v):(re(),S(u[w],1,1,()=>{u[w]=null}),ae(),o=u[n],o?o.p(g,v):(o=u[n]=d[n](g),o.c()),x(o,1),o.m(e,s));let y=r;r=A(g),r===y?p[r].p(g,v):(re(),S(p[y],1,1,()=>{p[y]=null}),ae(),a=p[r],a?a.p(g,v):(a=p[r]=h[r](g),a.c()),x(a,1),a.m(e,null)),(!c||v&256)&&b(e,"data-tag-unfolded",g[8]),(!c||v&2048)&&b(e,"data-tag-id",g[11]),(!c||v&2&&l!==(l=g[1].contentType))&&b(e,"data-content-type",l),v&128&&M(e,"left",g[7]),v&64&&M(e,"top",g[6]),v&32&&M(e,"z-index",g[5]),(!c||v&2048)&&b(t,"data-tag-id",g[11]),(!c||v&2)&&ne(t,"unClickable",g[1].clickable===!1),(!c||v&1024)&&ne(t,"disable",g[10]),(!c||v&512)&&ne(t,"hide",g[9]),(!c||v&1)&&ne(t,"withAnimation",g[0])},i(g){c||(x(o),x(a),c=!0)},o(g){S(o),S(a),c=!1},d(g){g&&z(t),u[n].d(),p[r].d()}}}function $0(i,t,e){let n,o,s,r,a,l,c,d,u,{withAnimation:f=!1}=t,{tag:h}=t,{mediaStore:p}=t,{state:A}=t,{temporaryState:g}=t;const v=ft("hooks");return i.$$set=w=>{"withAnimation"in w&&e(0,f=w.withAnimation),"tag"in w&&e(1,h=w.tag),"mediaStore"in w&&e(2,p=w.mediaStore),"state"in w&&e(3,A=w.state),"temporaryState"in w&&e(4,g=w.temporaryState)},i.$$.update=()=>{var w,y,C,E,P,L,D,T;i.$$.dirty&2&&e(13,n=(()=>!(h.contentType==="Link"||h.contentType==="VRLink"||h.contentType==="PanoLink"||h.contentType==="Audio"&&h.data.appearance==="plane"))()),i.$$.dirty&2&&e(12,o=(()=>h.stickType==="2DPoint")()),i.$$.dirty&2&&e(11,s=h.id),i.$$.dirty&2&&e(10,r=!((w=h.pointTagStyle)!=null&&w.leftPercent)||!((y=h.pointTagStyle)!=null&&y.topPercent)||h.enabled===!1||!h.state),i.$$.dirty&2&&e(9,a=!((C=h.state)!=null&&C.visible)||((E=h.temporaryState)==null?void 0:E.visible)===!1),i.$$.dirty&2&&e(8,l=(P=h.state)==null?void 0:P.unfolded),i.$$.dirty&2&&e(7,c=((L=h.pointTagStyle)==null?void 0:L.leftPercent)+"%"),i.$$.dirty&2&&e(6,d=((D=h.pointTagStyle)==null?void 0:D.topPercent)+"%"),i.$$.dirty&2&&e(5,u=(T=h.state)!=null&&T.unfolded?1:0)},[f,h,p,A,g,u,d,c,l,a,r,s,o,n,v]}class eA extends se{constructor(t){super(),oe(this,t,$0,K0,ie,{withAnimation:0,tag:1,mediaStore:2,state:3,temporaryState:4},Y0)}}function tA(i){le(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 pl(i,t,e){const n=i.slice();return n[6]=t[e],n}function gl(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=pl(i,s,a),c=r(l);n.set(c,e[a]=Al(c,l))}return{c(){t=j("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-uq11d5"),ne(t,"hide",!i[3].visible||!i[4].visible),ne(t,"withAnimation",i[0])},m(a,l){B(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],re(),e=qe(e,l,r,1,a,s,n,t,jt,Al,null,pl),ae()),(!o||l&24)&&ne(t,"hide",!a[3].visible||!a[4].visible),(!o||l&1)&&ne(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)x(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)S(e[l]);o=!1},d(a){a&&z(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Al(i,t){let e,n,o;return n=new eA({props:{state:t[3],temporaryState:t[4],withAnimation:t[0],tag:t[6],mediaStore:t[2]}}),{key:i,first:null,c(){e=me(),ee(n.$$.fragment),this.first=e},m(s,r){B(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||(x(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&z(e),$(n,s)}}}function nA(i){let t,e,n=i[3].enabled&&gl(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&x(n,1)):(n=gl(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(re(),S(n,1,1,()=>{n=null}),ae())},i(o){e||(x(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function iA(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{mediaStore:r}=t,{state:a}=t,{temporaryState:l}=t;return Wn("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 oA extends se{constructor(t){super(),oe(this,t,iA,nA,ie,{withAnimation:0,tags:1,hooks:5,mediaStore:2,state:3,temporaryState:4},tA)}}const sA={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",alwaysShowWhenMovePano:!0}}}};class rA extends ei{constructor(e){super(e);m(this,"tagCacheByPanoIndex",{})}getCache({panoIndex:e,id:n,key:o}){var c,d,u,f;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=`${(u=(d=s.work)==null?void 0:d.workCode)!=null?u: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 h=l.get(n);return h||(l.set(n,{}),l.get(n))}return(f=l.get(n))==null?void 0:f[o]}clearCache(){this.tagCacheByPanoIndex={}}removeCache(){}}class aA extends rA{constructor(e){super(e);m(this,"tags",[]);m(this,"config",sA);m(this,"raycaster",new k.Raycaster)}get isPanorama(){return this.five.currentMode==="Panorama"}getTagById(e){const n=this.tags.find(o=>o.id===e);if(!n){console.error(`getTagById(): tag is ${n}, id is ${e}`);return}return n}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(Ne(e))return!0;if(o.visible!==void 0)return o.visible;{const a=(()=>{var d,u,f;const l=(d=this.getTagConfig(e).visibleConfig)!=null?d:{},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!==((u=e.fiveState)==null?void 0:u.panoIndex))return{value:!1,reason:`current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(f=e.fiveState)==null?void 0:f.panoIndex}`}}if(l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&yn(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 h=this.getRaycasterFromPanoIndex(e,s),p=this.getTagEnableByIntersect(e,h);if(p.value===!1)return p}if(l.angleRange&&_m(e)){const h=this.getAngle(e);if(yn(h,l.angleRange)===!1)return{value:!1,reason:`angle is not in angleRange. angle: ${h}, 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"}getVisible(e){const n=this.five.getCurrentState(),o=this.getVisibleByFiveMode(e,n.mode),s=n.mode==="Panorama"?this.getVisibleByPanoIndex(e,n.panoIndex):!0;return o&&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&&yn(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&&yn(l.x,r.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(r.autoUnfold.strategy==="MinimumDistance"){const d=this.filterPointTag().filter(f=>this.getVisibleByPanoIndex(f)).filter(f=>{const h=this.getTagProject(f);if(!h)return!1;const{x:p,y:A,z:g}=h;return!(Math.abs(g)>1||Math.abs(p)>1||Math.abs(A)>1)}).map(f=>({tag:f,id:f.id,tagConfig:this.getTagConfig(f).unfoldedConfig})).filter(({tag:f,tagConfig:h})=>{var p,A;return!(typeof h!="object"||h.keep||h.autoUnfold===!1||((p=h.autoUnfold)==null?void 0:p.enable)===!1||((A=h.autoUnfold)==null?void 0:A.strategy)!=="MinimumDistance")}).map(f=>pe(H({},f),{distance:this.getDistance(f.tag)})).filter(({distance:f,tagConfig:h})=>{var p,A;return!(f===void 0||typeof h!="object"||h.autoUnfold===!1||((p=h.autoUnfold)==null?void 0:p.enable)===!1||((A=h.autoUnfold)==null?void 0:A.strategy)!=="MinimumDistance"||h.autoUnfold.distance&&yn(f,h.autoUnfold.distance)===!1)}).sort((f,h)=>f.distance-h.distance).findIndex(f=>f.id===e.id);if(d===-1||d<=((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 d=na(e),u=c.distanceTo(d);return s.distance=u,u}}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 d=(()=>e.stickType==="3DPoint"?hn(e.normal):lo(e.position))();if(!d)return;const u=new k.Vector3().copy(c).sub(co(e.position)),f=d.angleTo(u)*180/Math.PI;return s.angle=f,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[d]=c;e.contentType===d&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===2){const[d="Any",u="Any"]=c;(e.stickType===d||d==="Any")&&(e.contentType===u||u==="Any")&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===3){const[d="Any",u,f]=c;if(u==="Audio"&&e.contentType==="Audio"){const h=e;(h.stickType===d||d==="Any")&&h.data.appearance===f&&(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(!Ne(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=co(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 d,u,f;const o=(d=this.getTagConfig(e).visibleConfig)!=null?d:{},s=this.getDistance(e),[r]=this.five.model.intersectRaycaster(n),a=(()=>{if(!Ne(e))return;const h=this.tags.filter(Ne).map(A=>{var g;return(g=A.model)==null?void 0:g.object}).filter(Xe);return n.intersectObjects(h,!0)[0]})(),l=(()=>{var h;return typeof o=="object"&&typeof o.intersectRaycaster=="object"&&(h=o.intersectRaycaster.distanceAccuracy)!=null?h:.01})();return Math.min((u=r==null?void 0:r.distance)!=null?u:1/0,(f=a==null?void 0:a.distance)!=null?f:1/0)+l<s?{value:!1,reason:`intersectRaycaster check failed: distance is ${s}, intersection.point is ${r.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=na(e).sub(o).normalize();return this.raycaster.set(o,s),this.raycaster}checkFloorIndex(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}}function lA(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 cA=new Dl.GLTFLoader;function dA(i){return new Promise((t,e)=>{function n(s){t(s)}function o(s){e(s)}cA.load(i,n,void 0,o)})}function uA(i){if(!i.matrix)return;const t=new R.Matrix4().fromArray(i.matrix),{mediaPosition:e}=i.data;return e.map(o=>new R.Vector3().fromArray(o).add(new R.Vector3(0,0,5e-4)).applyMatrix4(t).toArray())}const vl="2.0.10",vo=`DnalogelPlugin-PanoTagPlugin@${vl}`,fA=!1,hA=i=>`${vo}--${i}`;class bl extends aA{constructor(e,n){super(e);m(this,"version",vl);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",Hi({currentMediaElement:null}));m(this,"group",new R.Group);m(this,"gltfObjectGroup",new R.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)=>X(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=>{n.state.visible=this.getVisible(n),Ne(n)&&e==="Panorama"&&this.changeTagMode(n,"front")}),this.updateRenderAllTags(),this.updateRenderAllTags()});m(this,"handleFiveModelShownFloorChange",()=>{this.tags.forEach(e=>{!Ne(e)||(e.state.visible=this.checkFloorIndex(e))}),this.updateRenderAllTags()});m(this,"loadModel",e=>X(this,null,function*(){var l;const n=e.data.modelUrl;if(console.log("\u{1F436} ==> url:",n),!n)return;const o=dA(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 R.Matrix4().fromArray(e.matrix).decompose(s.position,s.quaternion,s.scale),this.checkFloorIndex(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=H({debug:!1,config:this.config},n),this.debug=this.params.debug,this.config=this.params.config,el(1,{namespace:yi.GetAudioDuration}),el(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 X(this,null,function*(){var s,r;this.clearTags(),console.log(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{Wm(this.five,this.tags)}catch(a){console.error(a)}return o})}addTag(e,n){return X(this,null,function*(){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r),l=pe(H({},r),{state:H({visible:void 0,unfolded:fA},a.initialState),hooks:new ue.Subscribe,clickable:a.clickable,mergedConfig:a});return Ne(r)&&(l.temporaryState={visible:!1}),l}).filter(r=>r.position);return s.forEach(lA),this.tags.push(...s),Xm(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(),console.log("\u{1F436} ==> waitFiveModelLoaded:"),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 X(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 X(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=H({},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=ot(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=pt.default({},s.data,n):s.data=H(H({},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=ot(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 A,g,v,w;const o=(v=(g=(A=e.mergedConfig)==null?void 0:A.tag3DConfig)==null?void 0:g.ratio)!=null?v:.00216,s=(w=e.tag3DContentSvelte)==null?void 0:w.domContainer.css3DObject;if(!s)return;const r=Ne(e)?e.data.mediaPosition:e.position;n.updateWorldMatrix(!1,!1);const a=n.matrixWorld,l=new R.Vector3().fromArray(r[0]),c=new R.Vector3().fromArray(r[2]),d=new R.Vector3().lerpVectors(l,c,.5).add(new R.Vector3(0,0,5e-4)),u=new R.Matrix4().setPosition(d),f=new R.Matrix4().makeScale(o,o,o),h=new R.Matrix4().multiply(a).multiply(u).multiply(f);h.decompose(s.position,s.quaternion,s.scale);const p=s.opacityMesh;!p||h.decompose(p.position,p.quaternion,p.scale)}setVisibleAndUnfolded(){return X(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),d=this.clickhandler.bind(this),u=this.five.currentMode;return this.handleFiveModeChange(u),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",d),()=>{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",d),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}=oa(Um(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=oa(ia(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){this.tags.forEach(n=>{n.state.visible=this.getVisible(n),Ne(n)&&e!=="Panorama"&&this.changeTagMode(n,"behind")}),this.updateRenderAllTags(),this.updateRenderAllTags()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&(n.visibleConfig.keep?e.temporaryState=pe(H({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=pe(H({},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 ia(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return X(this,null,function*(){yield this.setVisibleAndUnfolded(),this.setModelMedialVisibleByPanoIndex(),this.tags.forEach(e=>{e.temporaryState=pe(H({},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 oA({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 o;if(n.tag3DContentSvelte){const{svelteApp:s,domContainer:r,initialNormal:a,currentNormal:l}=n.tag3DContentSvelte;if(s.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!a.equals(l)){const c=new R.Quaternion().setFromUnitVectors(a,l);r.css3DObject.setRotationFromQuaternion(c)}}else{if(((o=n.state)==null?void 0:o.visible)===!1)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=Jt(this.five)),n.stickType==="3DPoint"&&!n.normal)return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");const s=(()=>n.stickType==="Plane"?n.position:n.stickType==="Model"&&n.contentType==="MediaModel"?uA(n):Ym(this.five.camera.position,ot(n.position),ot(n.normal)))();if(!s)return;const r=function(){if(n.normal)return ot(n.normal);if(n.stickType==="Plane")return lo(n.position);if(n.contentType==="MediaModel")return lo(s)}();if(!r)return;const a=this.getTagConfig(n).tag3DConfig,l=this.css3DRenderPlugin.create3DDomContainer(s,a);if(!l)return;this.store.css3DRenderDisposer.set(n.id,l.dispose),n.tag3DContentSvelte={svelteApp:new ml({target:l.container,props:{tag:n,hooks:this.hooks,state:n.contentType==="MediaModel"?pe(H({},this.state),{visible:!1}):this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}}),domContainer:l,initialNormal:r,currentNormal:r}}}),this.checkPanelTag()}updateRenderModelTag(){const e=o=>!this.enabledModelTagSet.has(o.customID);this.gltfObjectGroup.remove(...this.gltfObjectGroup.children.filter(e)),this.tags.filter(Ne).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 X(this,null,function*(){const n=e.filter(Ne).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 mA=(i,t)=>new bl(i,t);function ge(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new k.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)}ge.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)},ge.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"],ge.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}},ge.prototype._objectCtxInit=function(i){i._3xDomEvent={}},ge.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent},ge.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent},ge.prototype._objectCtxGet=function(i){return i._3xDomEvent},ge.prototype.camera=function(i){return i&&(this._camera=i),this._camera},ge.prototype.bind=function(i,t,e,n){console.assert(ge.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)},ge.prototype.addEventListener=ge.prototype.bind,ge.prototype.unbind=function(i,t,e,n){console.assert(ge.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)},ge.prototype.removeEventListener=ge.prototype.unbind,ge.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1},ge.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new k.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,d,u=r[0],f=u.object;this._selected=f,d=this._bound("mousemove",f),a!=f&&(l=this._bound("mouseover",f),c=a&&this._bound("mouseout",a))}else c=a&&this._bound("mouseout",a),this._selected=null;d&&this._notify("mousemove",f,n,u),l&&this._notify("mouseover",f,n,u),c&&this._notify("mouseout",a,n,u)}},ge.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new k.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),d=l.parent;typeof c=="undefined"&&d;)c=this._objectCtxGet(d),d=d.parent;!c||this._notify(i,l,n,a)}}},ge.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)}},ge.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)},ge.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)},ge.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)},ge.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)},ge.prototype._onClick=function(i){this._onMouseEvent("click",i)},ge.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)},ge.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)},ge.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)},ge.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)},ge.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)}},ge.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 yl(i){const t=new k.Box3,e=new k.Vector3;if(i.updateMatrixWorld(!1),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.matrixWorld),t.expandByPoint(e)}else o.vertices.forEach(r=>{const a=r.clone().applyMatrix4(n.matrixWorld);t.expandByPoint(a)})}),!t.isEmpty())return t.translate(i.position.clone().negate()),t}class Cn{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,d;this.hooks=(c=t.sharedHooks)!=null?c:new Xt,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 ge(t.camera,t.container),this.onRender=(d=t.onRender)!=null?d:()=>{},this.offset=e==null?void 0:e.offset,this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable();const n=(...u)=>this.onSetOriginObjectScale(...u),o=(...u)=>this.onSetOriginObjectRotate(...u),s=(...u)=>this.onSetOriginObjectPosition(...u),r=(...u)=>this.onApplyOriginObjectScale(...u),a=(...u)=>this.onApplyOriginObjectRotate(...u),l=(...u)=>this.onApplyOriginObjectPosition(...u);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 k.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),o=new k.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(Xe),s=[];for(const r of o)if(r instanceof k.Mesh||r instanceof k.Group){const a=r instanceof k.Group?r.children.filter(f=>f instanceof k.Mesh):[r];a.forEach(f=>{f.__originalColor__=f.material.color.clone(),f.__originalOpacity__=f.material.opacity});const l=()=>{a.forEach(f=>{f.material.color.set(e),f.material.opacity=n}),this.render()},c=()=>{a.forEach(f=>{f.material.color.copy(f.__originalColor__),f.material.opacity=f.__originalOpacity__}),this.render()},d=()=>{this.isDragging||l()},u=()=>{this.isDragging||c()};for(const f of a)this.domEvents.addEventListener(f,"mouseover",d),this.domEvents.addEventListener(f,"mouseout",u),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),s.push(()=>{this.domEvents.removeEventListener(f,"mouseover",d),this.domEvents.removeEventListener(f,"mouseout",u),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 k.Vector3(0,0,0);if(!t)return o;const s=()=>e||(this.boundingBox?this.boundingBox:(this.boundingBox=yl(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 pA extends Cn{constructor(...e){super(...e);m(this,"name","ScaleController")}setScale(e){var l,c,d;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=(d=e.z)!=null?d:1);const r=new k.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 gA extends R.Object3D{constructor(){super()}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}}class wi extends gA{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 R.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 R.Vector3().subVectors(this.position,n).applyQuaternion(e).add(n);this.position.copy(o)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class AA extends wi{}class vA extends wi{}class bA extends wi{}class wl extends wi{}class yA extends wl{}class wA extends k.Group{constructor(e){super();m(this,"direction");this.direction=e||"x"}}class Cl extends k.Mesh{constructor(e,n,o){super(e,n);m(this,"direction");this.direction=o||"x"}}function CA(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new k.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=CA(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new k.Raycaster;return o.setFromCamera(n,i),o}function PA(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 wA{constructor(e){var d;super(e.direction);m(this,"line");m(this,"arrow");m(this,"lineHeight",.4);m(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new k.Color((d=e.color)!=null?d:16214315),o=new k.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:k.DoubleSide}),s=new k.ConeGeometry(.04,.1,32),r=new Cl(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new k.CylinderGeometry(a,a,.4,32),c=new Cl(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 ht{static get X(){return new k.Color(wo.X).convertSRGBToLinear().clone()}static get Y(){return new k.Color(wo.Y).convertSRGBToLinear().clone()}static get Z(){return new k.Color(wo.Z).convertSRGBToLinear().clone()}}class IA extends AA{constructor(e){super(e);m(this,"xArrow",new yo({direction:"x",color:ht.X}));m(this,"yArrow",new yo({direction:"y",color:ht.Y}));m(this,"zArrow",new yo({direction:"z",color:ht.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 Ht(i,t){return EA(document.createElement(t!=null?t:"div"),i)}function EA(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function kA(i){const t=Ht(H({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 xA extends bA{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:ht.X}),this.xRingHelper=new Po({direction:"x"}),this.xAngleHelper=new Io({direction:"x",color:ht.X})),(n==null?void 0:n.xzCircleEnable)!==!1&&(this.xzCircle=new Co({direction:"y",color:ht.Y}),this.yRingHelper=new Po({direction:"y"}),this.yAngleHelper=new Io({direction:"y",color:ht.Y})),(n==null?void 0:n.xyCircleEnable)!==!1&&(this.xyCircle=new Co({direction:"z",color:ht.Z}),this.zRingHelper=new Po({direction:"z"}),this.zAngleHelper=new Io({direction:"z",color:ht.Z})),n!=null&&n.container&&(this.container=n==null?void 0:n.container,this.angleTips=kA({display:"none"}),(o=this.container)==null||o.appendChild(this.angleTips.element)),this.show()}updateAngleHelperQuaternion(){var e,n,o,s,r,a,l,c,d,u,f,h;(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),(u=this.yRingHelper)==null||u.quaternion.copy((d=this.xzCircle)==null?void 0:d.quaternion),(h=this.zRingHelper)==null||h.quaternion.copy((f=this.xyCircle)==null?void 0:f.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(){console.log("hide"),this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper)}show(){var e;console.log("show"),this.add(...[this.xyCircle,this.xzCircle,this.yzCircle].filter(Boolean)),this.remove(...[this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper].filter(Boolean)),(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 k.Mesh{constructor(e){var n;super();m(this,"direction");m(this,"gapAngle",.02);m(this,"geometry",new k.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new k.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:k.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 k.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 k.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new k.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:k.DoubleSide}),c=new k.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 k.Mesh{constructor(e){var o;super();m(this,"direction");m(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new k.Vector3(0,0,1);break;case"y":this.baseAxes=new k.Vector3(1,0,0);break;case"z":this.baseAxes=new k.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new k.CircleGeometry(n,48,0,1e-4),this.material=new k.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:k.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function DA(){const i=Ht({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Ht({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Ht({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});i.appendChild(t),t.appendChild(e);const n="-4px",o={direction:"nesw",element:Dt({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:Dt({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:Dt({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:Dt({cursor:"ew-resize",right:n})},l={direction:"nesw",element:Dt({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:Dt({cursor:"ns-resize",top:n})},d={direction:"nwse",element:Dt({cursor:"nwse-resize",left:n,top:n})},u={direction:"ew",element:Dt({cursor:"ew-resize",left:n})};return new Array(s,a,c,u,o,r,l,d).forEach(h=>t.appendChild(h.element)),{container:i,squares:[o,s,r,a,l,c,d,u]}}function Dt(i){const t=Ht(H({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=Ht({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=Ht({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 LA extends yA{constructor(e,n,o,s){super(e);m(this,"points",[]);m(this,"cornerPositions",[]);m(this,"css3DInstance");m(this,"plane");m(this,"css3DRenderer",new Ut);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 k.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new k.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 k.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}=DA();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 SA extends vA{constructor(e){super(e);m(this,"box");m(this,"outline");m(this,"originObject");m(this,"positionAttribute");this.originObject=e,this.positionAttribute=new k.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=yl(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 k.BufferGeometry;n.setIndex(new k.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new k.LineBasicMaterial({color:64767,linewidth:1,opacity:1,depthTest:!1,transparent:!0,toneMapped:!1}),s=new k.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 k.BufferGeometry;n.setIndex(new k.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new k.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new k.Mesh(n,o)}}class MA extends Cn{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 k.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new k.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new k.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}})(),d=n.point.clone(),u=new k.Plane;u.setFromNormalAndCoplanarPoint(c,d),this.startInfo={startVectorProject:d.clone().projectOnVector(l),directionVector:l,plane:u},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 k.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),d=new k.Matrix4;d.setPosition(c);const u=r.position.clone().applyMatrix4(d);this.hooks.emit("wantToMove",u)||(r.applyMatrix4(d),s.copy(l),this.hooks.emit("applyObjectPosition",{matrix4:d}),this.hooks.emit("move",u))}dragEnd(){!this.isDragging||(console.log("%c MoveController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class Pn{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,d=t.getElement();if(this.five=t,!a||!l||!d||!c)return;const u=()=>{t.needsRender=!0};this.helperController=new e({camera:a,model:l,originObject3D:n,helperObject3D:o,container:d,scene:c,onRender:u,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",zA=()=>{console.error(`${Eo} is disposed`)},BA=()=>{console.warn(`${Eo} is disabled`)},TA=()=>{console.error(`${Eo} is disabled`)};class jA{constructor(t){m(this,"controllers",{});m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"hooks",new Xt);m(this,"eventListener",{});t&&this.addControllers(t),this.setState(this.state)}show(t){return X(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return X(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 zA();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return TA();const n=H({},this.state);this.state=H(H({},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=H(H({},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&&BA()}}class VA extends Cn{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 k.Euler(Math.PI*n/180,Math.PI*o/180,Math.PI*s/180),a=new k.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:d}=this;if(d){const u=new k.Vector3().subVectors(c.position,d).applyQuaternion(a).add(d);c.position.copy(u)}c.quaternion.copy(a),this.helperObject3DQuaternion.copy(a),this.hooks.emit("setObjectRotate",a,d),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 k.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),c=new k.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),d=new k.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),u=(()=>{switch(o){case"x":return l;case"y":return c;case"z":return d}})(),f=new k.Plane().setFromNormalAndCoplanarPoint(u,s),h=new k.Vector3;f.projectPoint(s.clone(),h);const p=h.clone().sub(this.rotateCenter),A=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:A,plane:f,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 k.Vector3);if(!l)return;const c=this.rotateCenter,d=new k.Vector3;o.projectPoint(l.clone(),d);const u=d.clone().sub(c);if(n.angleTo(u)===0||(this.lastRotation===void 0&&(this.lastRotation={angle:0}),this.rotations.length===0))return;const f=(()=>{if(this.rotations.length===1)return u.angleTo(s.baseAxes)>r.angleTo(s.baseAxes);{const v=this.rotations[this.rotations.length-1],w=this.rotations[this.rotations.length-2],y=u.angleTo(w.vector),C=u.angleTo(v.vector),E=v.vector.angleTo(w.vector);if(E===0||C===0||y===0)return;if(y>C&&y>E)return v.direction;if(y<E&&C<E||y<C&&C>E)return!v.direction}})();if(f===void 0)return console.warn("rotationDirection is undefined");const h=new k.Quaternion().setFromUnitVectors(n.clone().normalize(),u.clone().normalize()),{originObject3D:p}=this,A=p.quaternion.clone().premultiply(h);if(!this.hooks.emit("wantToRotate",A)){if(this.rotations.push({vector:u,direction:f}),this.rotations=this.rotations.slice(-2),this.lastRotation.angle=this.lastRotation.angle+u.angleTo(n)*(f?1:-1),this.setAngleHelperLength(a,this.lastRotation.angle),this.setTipsAngle(this.lastRotation.angle/Math.PI*180),c){const v=new k.Vector3().subVectors(p.position,c).applyQuaternion(h).add(c);p.position.copy(v)}p.applyQuaternion(h),this.helperObject3DQuaternion.premultiply(h),this.hooks.emit("applyObjectRotate",{quaternion:h,origin:c}),this.hooks.emit("rotate",p.quaternion),this.startInfo.startVector=u}}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 k.Mesh&&o.geometry instanceof k.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new k.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 k.Mesh&&r.geometry instanceof k.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new k.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 QA extends Cn{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 k.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new R.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 T,W;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 R.Vector3);if(!a||PA(a,this.camera.position))return;const l=new R.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:d}=o,u=new R.Vector3().subVectors(r[1],r[0]),f=new R.Vector3().subVectors(r[3],r[0]),h=G=>{const Y=new R.Vector3(0,0,0);if(!this.startInfo)return Y;const V=(G==="ew"?u:f).clone(),I=c.clone().projectOnVector(V),O=a.clone().projectOnVector(V),F=l.clone().projectOnVector(V);if(O.equals(I))return Y;if(G==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const _=new R.Vector3().subVectors(O,F),q=_.x<0&&V.x>=0,fe=_.y<0&&V.y>=0,he=_.z<0&&V.z>=0;this.startInfo.dragPointInCenterBottom=q||fe||he}if(G==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const _=new R.Vector3().subVectors(O,F),q=_.x<0&&V.x>=0,fe=_.y<0&&V.y>=0,he=_.z<0&&V.z>=0;this.startInfo.dragPointInCenterLeft=q||fe||he}const N=new R.Vector3().subVectors(O,I),Z=N.length();return Z>.3?(console.warn("offset.length() > 0.3, skipped",Z),Y):N},p=h("ew"),A=h("ns"),g=()=>{const G=p;this.helperObject3D.cornerPositions.forEach((Y,V)=>{var I;(I=this.startInfo)!=null&&I.dragPointInCenterLeft?(V===0||V===3)&&Y.add(G):(V===1||V===2)&&Y.add(G)})},v=()=>{const G=A;this.helperObject3D.cornerPositions.forEach((Y,V)=>{var I;(I=this.startInfo)!=null&&I.dragPointInCenterBottom?(V===0||V===1)&&Y.add(G):(V===2||V===3)&&Y.add(G)})};switch(d){case"ew":g();break;case"ns":v();break;case"nesw":case"nwse":g(),v()}const w=new R.Vector3().subVectors(r[1],r[0]).length()/u.length(),y=new R.Vector3().subVectors(r[3],r[0]).length()/f.length(),C=new R.Vector3(w,y,1),E=new k.Matrix4().scale(C);n.isCSS3DObjectPlus?n.applyScaleMatrix4(E):n.scale.applyMatrix4(E),o.position.copy(a);const P=new R.Vector3().addVectors(r[0],r[2]).divideScalar(2),L=new R.Vector3().subVectors(P,l),D=new k.Matrix4().setPosition(L);n.applyMatrix4(D),(T=this.helperObject3D.css3DInstance)==null||T.css3DObject.applyMatrix4(D),(W=this.helperObject3D.plane)==null||W.applyMatrix4(D),this.hooks.emit("applyObjectScale",{matrix4:E}),this.hooks.emit("applyObjectPosition",{matrix4:D}),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 OA extends QA{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 RA extends Cn{constructor(...e){super(...e);m(this,"name","BoundingBoxController")}}class FA extends wl{constructor(t){super(t)}}const ko="v1.0.0",xo="Object3DHelperPlugin",Ci=`${xo}@${ko}`,GA=()=>{console.error(`${Ci} is disposed`)},HA=()=>{console.warn(`${Ci} is disabled`)},WA=()=>{console.error(`${Ci} is disabled`)};class Pl extends ei{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 Ut(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 X(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return X(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 GA();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return WA();const o=H({},this.state);this.state=H(H({},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 h;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 jA,s=[],r=(h=this.five.getElement())==null?void 0:h.parentElement,a=this.five.camera,{moveHelper:l=!0,rotateHelper:c=!0,scaleHelper:d=!0,boundingBoxHelper:u=!1}=n,f=new ue.Subscribe;if(l){const p=new IA(e),A=this.getConfig(n.moveHelper),g=new Pn(this.five,MA,e,p,A,f);o.addControllers({moveController:g.helperController}),s.push(()=>g.dispose())}if(c){const p=this.getConfig(n.rotateHelper),A=new xA(e,H({container:r},p)),g=new Pn(this.five,VA,e,A,p,f);o.addControllers({rotateController:g.helperController}),s.push(()=>g.dispose())}if(u){const p=new SA(e),A=new Pn(this.five,RA,e,p,void 0,f);o.addControllers({boundingBoxController:A.helperController})}if(d)if(e.isCSS3DObjectPlus&&r){const p=new LA(e,r,a,this.five.scene),A=new Pn(this.five,OA,e,p,void 0,f);o.addControllers({scaleController:A.helperController}),s.push(()=>A.dispose()),Fo(this.five).then(()=>{var g,v;if(e.isCSS3DObjectPlus){const w=e;if(!w||w.mode!=="front")return;const y=(g=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?g:Go(this.five);y&&(this.css3DObjectParentMap.set(w,w.parent),w.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(y),(v=this.css3DRender.getBehindCSS3DObjectGroup())==null||v.add(w),this.css3DRender.render(this.five.camera))}})}else{const p=new FA(e),A=new Pn(this.five,pA,e,p,void 0,f);o.addControllers({scaleController:A.helperController}),s.push(()=>A.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&&HA()}getConfig(e){if(!!e&&typeof e!="boolean"&&e.enable)return e}}const NA=i=>new Pl(i);U.CSS3DRender=Ut,U.CSS3DRenderPlugin=Jt,U.CameraMovementEffect=Ys,U.CameraMovementPlugin=tf,U.ContentType=$r,U.CruisePlugin=Vm,U.CruisePluginController=ro,U.DIRECTION=on,U.DISPLAY_STRATEGY_TYPE=Rt,U.DimensionType=ea,U.FLOOR_PLAN_ATTACHED_TO=Pt,U.FLOOR_TYPE_MAP=Wu,U.GuideLinePlugin=_r,U.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=Ft,U.ItemLabelPlugin=am,U.Magnifier=sr,U.MapviewFloorplanPlugin=wu,U.ModelChassisCompassPlugin=Xu,U.ModelEntryDoorGuidePlugin=Ju,U.ModelFloorplanPlugin=Au,U.ModelItemLabelPlugin=Gh,U.ModelRoomLabelPlugin=Lc,U.ModelTVVideoPlugin=Nh,U.ModelViewPlugin=Rl,U.Object3DHelperController=Pl,U.Object3DHelperPlugin=NA,U.PLUGIN=Ci,U.PaintBrush=Ol,U.PaintBrushTypeEnum=it,U.PanoCompassPlugin=Pf,U.PanoCursorRaycasterPlugin=ic,U.PanoDoorLabelPlugin=ym,U.PanoFloorplanRadarPlugin=Gu,U.PanoMeasurePlugin=ph,U.PanoMeasurePluginLine=Ot,U.PanoMeasurePluginModel=di,U.PanoMeasurePluginPoint=Ue,U.PanoMeasurePluginPolyline=ci,U.PanoRulerPlugin=af,U.PanoRulerProPlugin=vf,U.PanoSpatialTagPlugin=Sh,U.PanoTagPlugin=mA,U.PanoTagPluginController=bl,U.PointType=ta,U.ROOM_FETILE_TYPE_MAP=Hu,U.ROOM_TYPE_MAP=Nu,U.Rotation=$e,U.TopviewFloorplanPlugin=Pu,U.Util=zg,U.VERSION=ko,U.itemLabelPluginServerParams=lm,U.modelItemLabelPluginServerParams=Hh,U.modelRoomLabelPluginServerParams=Sc,U.pluginFlag=hA,Object.defineProperties(U,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});