@realsee/dnalogel 2.3.9-alpha.3 → 2.3.9-alpha.4

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 (239) hide show
  1. package/dist/index.cjs.js +1 -1
  2. package/dist/index.js +6 -4
  3. package/dist/index.umd.js +1 -1
  4. package/dist/shared-utils/audio.d.ts +1 -1
  5. package/docs/classes/CSS3DRender.html +31 -31
  6. package/docs/classes/CruisePluginController.html +24 -24
  7. package/docs/classes/Magnifier.html +16 -16
  8. package/docs/classes/ModelRoomLabelController.html +11 -11
  9. package/docs/classes/Object3DHelperController.html +24 -24
  10. package/docs/classes/PaintBrush.html +15 -15
  11. package/docs/classes/PanoTagPluginController.html +41 -41
  12. package/docs/classes/Util.BetterTween.html +8 -8
  13. package/docs/classes/Util.FivePointSelector.html +12 -12
  14. package/docs/classes/Util.Interval.html +12 -12
  15. package/docs/classes/Util.Magnifier.html +17 -17
  16. package/docs/classes/Util.PointDomHelper.html +11 -11
  17. package/docs/classes/Util.PointHelper.html +11 -11
  18. package/docs/classes/Util.Rectangle.html +13 -13
  19. package/docs/enums/CameraMovementEffect.html +7 -7
  20. package/docs/enums/ContentType.html +16 -16
  21. package/docs/enums/DIRECTION.html +9 -9
  22. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
  23. package/docs/enums/DimensionType.html +7 -7
  24. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
  25. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
  26. package/docs/enums/PaintBrushTypeEnum.html +8 -8
  27. package/docs/enums/PointType.html +7 -7
  28. package/docs/enums/Rotation.html +8 -8
  29. package/docs/functions/CSS3DRenderPlugin.html +4 -4
  30. package/docs/functions/CameraMovementPlugin.html +4 -4
  31. package/docs/functions/CruisePlugin.html +4 -4
  32. package/docs/functions/GuideLinePlugin.html +5 -5
  33. package/docs/functions/ItemLabelPlugin.html +4 -4
  34. package/docs/functions/MapviewFloorplanPlugin.html +4 -4
  35. package/docs/functions/ModelChassisCompassPlugin.html +4 -4
  36. package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
  37. package/docs/functions/ModelFloorplanPlugin.html +4 -4
  38. package/docs/functions/ModelItemLabelPlugin.html +4 -4
  39. package/docs/functions/ModelRoomLabelPlugin.html +4 -4
  40. package/docs/functions/ModelTVVideoPlugin.html +4 -4
  41. package/docs/functions/ModelViewPlugin.html +4 -4
  42. package/docs/functions/Object3DHelperPlugin.html +4 -4
  43. package/docs/functions/PanoCompassPlugin.html +4 -4
  44. package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
  45. package/docs/functions/PanoDoorLabelPlugin.html +4 -4
  46. package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
  47. package/docs/functions/PanoMeasurePlugin.html +4 -4
  48. package/docs/functions/PanoRulerPlugin.html +4 -4
  49. package/docs/functions/PanoRulerProPlugin.html +4 -4
  50. package/docs/functions/PanoSpatialTagPlugin.html +4 -4
  51. package/docs/functions/PanoTagPlugin.html +4 -4
  52. package/docs/functions/TopviewFloorplanPlugin.html +4 -4
  53. package/docs/functions/Util.getCoordsFromClient.html +5 -5
  54. package/docs/functions/Util.getCoordsFromElement.html +5 -5
  55. package/docs/functions/Util.getFrameTime.html +5 -5
  56. package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
  57. package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
  58. package/docs/functions/Util.isNil.html +5 -5
  59. package/docs/functions/Util.nextFrame.html +5 -5
  60. package/docs/functions/Util.notNil.html +5 -5
  61. package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
  62. package/docs/functions/Util.tweenProgress.html +5 -5
  63. package/docs/functions/pluginFlag.html +5 -5
  64. package/docs/index.html +4 -4
  65. package/docs/interfaces/AddTagConfig.html +6 -6
  66. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
  67. package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
  68. package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
  69. package/docs/interfaces/EventMap.html +15 -15
  70. package/docs/interfaces/FloorplanBounding.html +8 -8
  71. package/docs/interfaces/FloorplanData.html +10 -10
  72. package/docs/interfaces/FloorplanEntrance.html +11 -11
  73. package/docs/interfaces/FloorplanExtraObject.html +10 -10
  74. package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
  75. package/docs/interfaces/FloorplanFloorData.html +9 -9
  76. package/docs/interfaces/FloorplanImagePosition.html +7 -7
  77. package/docs/interfaces/FloorplanObserver.html +9 -9
  78. package/docs/interfaces/FloorplanOutlineItem.html +9 -9
  79. package/docs/interfaces/FloorplanPosition.html +7 -7
  80. package/docs/interfaces/FloorplanRoomItem.html +13 -13
  81. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
  82. package/docs/interfaces/FloorplanServerBounding.html +8 -8
  83. package/docs/interfaces/FloorplanServerComputedData.html +10 -10
  84. package/docs/interfaces/FloorplanServerData.html +7 -7
  85. package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
  86. package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
  87. package/docs/interfaces/FloorplanServerEntrance.html +11 -11
  88. package/docs/interfaces/FloorplanServerFloorData.html +9 -9
  89. package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
  90. package/docs/interfaces/FloorplanServerObserver.html +9 -9
  91. package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
  92. package/docs/interfaces/FloorplanServerPosition.html +7 -7
  93. package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
  94. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
  95. package/docs/interfaces/ItemLabelPluginData.html +6 -6
  96. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
  97. package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
  98. package/docs/interfaces/LineJson.html +7 -7
  99. package/docs/interfaces/MinMax.html +7 -7
  100. package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
  101. package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
  102. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
  103. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
  104. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
  105. package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
  106. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
  107. package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
  108. package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
  109. package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
  110. package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
  111. package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
  112. package/docs/interfaces/ModelViewPluginExportType.html +11 -11
  113. package/docs/interfaces/Object3DHelperState.html +8 -8
  114. package/docs/interfaces/OpenParameter.html +7 -7
  115. package/docs/interfaces/PaintBrushAction.html +12 -12
  116. package/docs/interfaces/PaintBrushConfigs.html +12 -12
  117. package/docs/interfaces/PaintBrushState.html +10 -10
  118. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
  119. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
  120. package/docs/interfaces/PanoMeasureParameterType.html +11 -11
  121. package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
  122. package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
  123. package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
  124. package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
  125. package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
  126. package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
  127. package/docs/interfaces/PanoRulerProPluginState.html +8 -8
  128. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
  129. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
  130. package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
  131. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
  132. package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
  133. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
  134. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
  135. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
  136. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
  137. package/docs/interfaces/Point.html +8 -8
  138. package/docs/interfaces/PointJson.html +8 -8
  139. package/docs/interfaces/Room.html +9 -9
  140. package/docs/interfaces/RoomInfo.html +7 -7
  141. package/docs/interfaces/RoomLabel.html +14 -14
  142. package/docs/interfaces/RoomRules.html +5 -5
  143. package/docs/interfaces/Rooms.html +5 -5
  144. package/docs/interfaces/Scissor.html +9 -9
  145. package/docs/interfaces/State.html +8 -8
  146. package/docs/interfaces/TagCache.html +10 -10
  147. package/docs/interfaces/TagConfig.html +10 -10
  148. package/docs/interfaces/TagIconUrl.html +9 -9
  149. package/docs/interfaces/Tags.html +9 -9
  150. package/docs/interfaces/TemporaryState.html +6 -6
  151. package/docs/interfaces/Util.MagnifierParameter.html +11 -11
  152. package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
  153. package/docs/modules/Util.html +5 -5
  154. package/docs/modules.html +4 -4
  155. package/docs/types/ArrayPosition.html +5 -5
  156. package/docs/types/AudioAppearance.html +5 -5
  157. package/docs/types/AudioTagTypeConfigKey.html +5 -5
  158. package/docs/types/CSS3DRenderExportType.html +5 -5
  159. package/docs/types/CSS3DRenderPluginExportType.html +5 -5
  160. package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
  161. package/docs/types/Color.html +5 -5
  162. package/docs/types/ContentTypeConfigKey.html +5 -5
  163. package/docs/types/ContentTypeConfigKeySplit.html +5 -5
  164. package/docs/types/ContentTypeMap.html +5 -5
  165. package/docs/types/Create3DDomContainerReturnType.html +5 -5
  166. package/docs/types/Create3DElementReturnType.html +5 -5
  167. package/docs/types/CruisePluginExportType.html +5 -5
  168. package/docs/types/Direction-1.html +5 -5
  169. package/docs/types/Direction4.html +5 -5
  170. package/docs/types/FloorplanRuleLabels.html +5 -5
  171. package/docs/types/FloorplanServerRuleLabels.html +5 -5
  172. package/docs/types/GuideLinePluginExportType.html +5 -5
  173. package/docs/types/HelperEventMap.html +5 -5
  174. package/docs/types/LoadTagConfig.html +5 -5
  175. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
  176. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
  177. package/docs/types/MediaData.html +5 -5
  178. package/docs/types/MediaStore.html +5 -5
  179. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
  180. package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
  181. package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
  182. package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
  183. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
  184. package/docs/types/MoveArgs.html +5 -5
  185. package/docs/types/MoveOpts.html +5 -5
  186. package/docs/types/Object3DHelperEventMap.html +5 -5
  187. package/docs/types/ObjectFit.html +5 -5
  188. package/docs/types/PaintBrushEventMap.html +5 -5
  189. package/docs/types/PanoCompassPluginData.html +5 -5
  190. package/docs/types/PanoCompassPluginExportType.html +5 -5
  191. package/docs/types/PanoCompassPluginParameterType.html +5 -5
  192. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
  193. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
  194. package/docs/types/PanoIndex.html +5 -5
  195. package/docs/types/PanoMeasurePluginEvent.html +5 -5
  196. package/docs/types/PanoMeasureReturnType.html +5 -5
  197. package/docs/types/PanoSpatialTagPluginId.html +5 -5
  198. package/docs/types/PanoTagPluginExportInterface.html +5 -5
  199. package/docs/types/PanoTagPluginParamsInterface.html +5 -5
  200. package/docs/types/PlaneTag.html +5 -5
  201. package/docs/types/PlaneTagElement.html +5 -5
  202. package/docs/types/Point2DElement.html +5 -5
  203. package/docs/types/Point2DTag.html +5 -5
  204. package/docs/types/Point3DElement.html +5 -5
  205. package/docs/types/Point3DTag.html +5 -5
  206. package/docs/types/PointTag.html +5 -5
  207. package/docs/types/PointTagElement.html +5 -5
  208. package/docs/types/Position.html +5 -5
  209. package/docs/types/RotateArgs.html +5 -5
  210. package/docs/types/RotateOpts.html +5 -5
  211. package/docs/types/RuleLabelsKey.html +5 -5
  212. package/docs/types/RuleLabelsValue.html +5 -5
  213. package/docs/types/StickType.html +5 -5
  214. package/docs/types/Tag.html +5 -5
  215. package/docs/types/Tag2D.html +5 -5
  216. package/docs/types/Tag3D.html +5 -5
  217. package/docs/types/TagContentType.html +5 -5
  218. package/docs/types/TagDimensionType.html +5 -5
  219. package/docs/types/TagElement.html +5 -5
  220. package/docs/types/TagEvents.html +5 -5
  221. package/docs/types/TagHooks.html +5 -5
  222. package/docs/types/TagIconSize.html +5 -5
  223. package/docs/types/TagId.html +5 -5
  224. package/docs/types/TagPointType.html +5 -5
  225. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
  226. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
  227. package/docs/types/WorkCode.html +5 -5
  228. package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
  229. package/docs/variables/PLUGIN.html +5 -5
  230. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
  231. package/docs/variables/ROOM_TYPE_MAP.html +5 -5
  232. package/docs/variables/VERSION.html +5 -5
  233. package/docs/variables/itemLabelPluginServerParams.html +5 -5
  234. package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
  235. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
  236. package/libs/PanoTagPlugin/controller/index.js +1 -1
  237. package/libs/shared-utils/audio.d.ts +1 -1
  238. package/libs/shared-utils/audio.js +10 -8
  239. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -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 Rg(){const i=new x.PlaneGeometry(.4,.4),t=Vg,e=new x.TextureLoader().load(t);e.encoding=x.sRGBEncoding;const n=new x.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new x.Mesh(i,n)}function Og(){const i=new x.CurvePath;i.add(new x.LineCurve3(new x.Vector3(0,0,0),new x.Vector3(0,0,.1)));const t=new x.TubeGeometry(i,8,.003),e=new x.ShaderMaterial({vertexShader:jg,fragmentShader:Qg,depthTest:!1,transparent:!0});return new x.Mesh(t,e)}function Hg(){const i=new x.SphereGeometry(.01,20,20),t=new x.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:x.DoubleSide}),e=new x.Mesh(i,t);return e.position.set(0,0,.1),e}class al extends x.Object3D{constructor(){super();m(this,"planeMesh");m(this,"lineMesh");m(this,"ballMesh");this.planeMesh=Rg(),this.lineMesh=Og(),this.ballMesh=Hg(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new x.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 ll{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=$t(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new x.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(${Wa})`,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 x.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 ao({progress:0}).to({progress:[1,0]}).duration(500).easing(ni.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class Fg{constructor(t,e){m(this,"five");m(this,"hooks",new be.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 x.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new sl(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new al:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new ll(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 Gg=Object.freeze(Object.defineProperty({__proto__:null,Interval:_i,Rectangle:Sg,Magnifier:sl,getCoordsFromClient:zg,getCoordsFromElement:rl,getRaycasterFromFivePointer:Mg,getIntersectFromRelativePosition:Bg,PointHelper:al,PointDomHelper:ll,FivePointSelector:Fg,isNil:Om,notNil:Ue,BetterTween:ao,tweenProgress:Sa,nextFrame:li,requestAnimationFrameInterval:ci,getFrameTime:rf},Symbol.toStringTag,{value:"Module"}));function Ng(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 br(i,t,e){const n=i.slice();return n[0]=t[e],n}function yr(i,t,e){const n=i.slice();return n[0]=t[e],n}function wr(i){let t,e=i[0]+"",n;return{c(){t=B("div"),n=Ce(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){M(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&ke(n,e)},d(o){o&&z(t)}}}function Cr(i){let t,e=i[0]&&wr(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),M(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=wr(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function Er(i){let t,e=i[0]+"",n;return{c(){t=B("div"),n=Ce(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){M(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&ke(n,e)},d(o){o&&z(t)}}}function Pr(i){let t,e=i[0]&&Er(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),M(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Er(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function Ir(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&kr(i);return{c(){t=B("div"),e=B("span"),o=Ce(n),s=$(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){M(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+"")&&ke(o,n),a[2].price.unit?r?r.p(a,l):(r=kr(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&z(t),r&&r.d()}}}function kr(i){let t,e=i[2].price.unit+"",n;return{c(){t=B("span"),n=Ce(e),b(t,"class","unit svelte-8mby9k")},m(o,s){M(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&ke(n,e)},d(o){o&&z(t)}}}function xr(i){let t,e=i[2].highlightText+"",n;return{c(){t=B("div"),n=Ce(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){M(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&ke(n,e)},d(o){o&&z(t)}}}function Wg(i){var X,j;let t,e,n,o,s,r,a,l,c,u,d,f,h,p,g=i[2].title+"",A,v,w,y=Ue((X=i[2].price)==null?void 0:X.value)&&((j=i[2].price)==null?void 0:j.value)!=="",I,P;e=new it({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let C=i[2].brandTags||[],L=[];for(let E=0;E<C.length;E+=1)L[E]=Cr(yr(i,C,E));let D=i[2].tags||[],V=[];for(let E=0;E<D.length;E+=1)V[E]=Pr(br(i,D,E));let W=y&&Ir(i),G=i[2].highlightText&&xr(i);return{c(){var E;t=B("div"),ee(e.$$.fragment),n=$(),o=B("div"),s=$(),r=B("div"),a=B("img"),c=$(),u=B("div");for(let R=0;R<L.length;R+=1)L[R].c();d=$();for(let R=0;R<V.length;R+=1)V[R].c();f=$(),h=B("div"),p=B("div"),A=Ce(g),v=$(),w=B("div"),W&&W.c(),I=$(),G&&G.c(),b(o,"class","line svelte-8mby9k"),T(o,"transition-delay",i[1]?Mn+"ms":Bn+Lr-Dr-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),Ne(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(u,"class","tag svelte-8mby9k"),b(p,"class","text svelte-8mby9k"),b(h,"class","title svelte-8mby9k"),b(w,"class","footer svelte-8mby9k"),T(w,"height",Ue((E=i[2].price)==null?void 0:E.value)&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),T(r,"transition-delay",i[1]?Mn+Bn+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),te(t,"unfolded",i[1]),te(t,"folded",i[3])},m(E,R){M(E,t,R),q(e,t,null),Q(t,n),Q(t,o),Q(t,s),Q(t,r),Q(r,a),Q(r,c),Q(r,u);for(let O=0;O<L.length;O+=1)L[O].m(u,null);Q(u,d);for(let O=0;O<V.length;O+=1)V[O].m(u,null);Q(r,f),Q(r,h),Q(h,p),Q(p,A),Q(r,v),Q(r,w),W&&W.m(w,null),Q(w,I),G&&G.m(w,null),P=!0},p(E,[R]){var N,J,_;const O={};if(R&2&&(O.visible=E[1]),e.$set(O),R&2&&T(o,"transition-delay",E[1]?Mn+"ms":Bn+Lr-Dr-40+"ms"),(!P||R&4&&!Ne(a.src,l=E[2].headerPictureUrl))&&b(a,"src",l),R&4){C=E[2].brandTags||[];let Z;for(Z=0;Z<C.length;Z+=1){const ue=yr(E,C,Z);L[Z]?L[Z].p(ue,R):(L[Z]=Cr(ue),L[Z].c(),L[Z].m(u,d))}for(;Z<L.length;Z+=1)L[Z].d(1);L.length=C.length}if(R&4){D=E[2].tags||[];let Z;for(Z=0;Z<D.length;Z+=1){const ue=br(E,D,Z);V[Z]?V[Z].p(ue,R):(V[Z]=Pr(ue),V[Z].c(),V[Z].m(u,null))}for(;Z<V.length;Z+=1)V[Z].d(1);V.length=D.length}(!P||R&4)&&g!==(g=E[2].title+"")&&ke(A,g),R&4&&(y=Ue((N=E[2].price)==null?void 0:N.value)&&((J=E[2].price)==null?void 0:J.value)!==""),y?W?W.p(E,R):(W=Ir(E),W.c(),W.m(w,I)):W&&(W.d(1),W=null),E[2].highlightText?G?G.p(E,R):(G=xr(E),G.c(),G.m(w,null)):G&&(G.d(1),G=null),R&4&&T(w,"height",Ue((_=E[2].price)==null?void 0:_.value)&&E[2].highlightText?void 0:"1rem"),R&2&&T(r,"transition-delay",E[1]?Mn+Bn+"ms":"0ms"),(!P||R&2)&&te(t,"unfolded",E[1]),(!P||R&8)&&te(t,"folded",E[3])},i(E){P||(k(e.$$.fragment,E),P=!0)},o(E){S(e.$$.fragment,E),P=!1},d(E){E&&z(t),K(e),ct(L,E),ct(V,E),W&&W.d(),G&&G.d()}}}const Mn=400,Dr=500,Bn=180,Lr=500;function _g(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 Xg extends oe{constructor(t){super(),ie(this,t,_g,Wg,ne,{tag:0},Ng)}}const Mt="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/EKEM1KMdVdVKM2rHV4x7HVXZvbVVKN/qq8CiV9VL9jjH/6l6qf7MBCjZmOqsAibjcP+qqqv0oxqpa/NVW286hPo1nz2L/h8+jXt//uSxCmDU2IK/ECN98KKtE5IYzNoCfbw+u9i5r8PoadUMFPKqWL4LK3T/LCraMSHGkW4bpLXR/E6LlHOVQxmslKVJ8IULktMN06N0FKCpHCoYsjC4F+Z0NVqdNFoGSTjSiyjzLdnZ2fNqTi2eHKONONKLMPMKLONKLMPQRJGlFxZRoKcJFAYEeIFiRQkUWUeYfef//Ko04soswso40UJAgMw8wosososy0EalnZyjQUGBRQGIFggOWUacWUeYmuadrZziQKKEgQsQLAhQkUJAgMQDghltLO1onp0cpkNInSFMqlYeSEJ5AHsqFdOwy1DA2sRmRJKxdKRfLhfLw5BzUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7ksRRA8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",ti=[];function Yg(i){let t=ti.find(e=>!e.realSrc||e.realSrc===Mt);return t||(t=new ho(Mt),ti.push(t)),i&&(t.src=i),t}function Ug(i){return Y(this,null,function*(){const t=(()=>i instanceof ho?i:Yg(i))(),e=yield new Promise(n=>{t.duration?t.isBlankAudio?n(0):n(t.duration):t.addEventListener("loadedmetadata",()=>{t.isBlankAudio?n(0):n(t.duration)})});return typeof i=="string"&&t.clear(),e})}function Jg(i){const t=i-ti.length;if(!(t<=0))for(let e=0;e<t;e++)ti.push(new ho(Mt))}function Zg(i){i.inited||(i.src&&(i.inited=!0,i.removeDocumentEventListener()),i.src===Mt&&i.play())}class ho extends Audio{constructor(e){super(e);m(this,"preload","metadata");m(this,"realSrc","");m(this,"inited",!1);m(this,"removeDocumentEventListener");this.realSrc=e!=null?e:"",super.addEventListener("ended",()=>{this.src=""});const n=()=>Zg(this);document.addEventListener("mousedown",n),document.addEventListener("click",n),document.addEventListener("touchstart",n),this.removeDocumentEventListener=()=>{document.removeEventListener("mousedown",n),document.removeEventListener("click",n),document.removeEventListener("touchstart",n)}}get isBlankAudio(){return this.realSrc===Mt||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e}clear(){this.src=Mt,console.log(this.realSrc===Mt)}}function qg(i){le(i,"svelte-kebunf",".audio.svelte-kebunf{pointer-events:auto;cursor:pointer;width:100%;height:100%}.children.svelte-kebunf{width:100%;height:100%}")}const Kg=i=>({currentTime:i&8,duration:i&4,playing:i&16}),Sr=i=>({currentTime:typeof i[3]=="number"&&!Number.isNaN(i[3])?i[3]:void 0,duration:typeof i[2]=="number"&&!Number.isNaN(i[2])?i[2]:void 0,playing:i[4]}),$g=i=>({playing:i&16}),Tr=i=>({playing:i[4]});function e0(i){let t,e,n,o,s,r,a;const l=i[12].audioIcon,c=We(l,i,i[11],Tr),u=i[12].currentTime,d=We(u,i,i[11],Sr),f=i[12].default,h=We(f,i,i[11],null);return{c(){t=B("div"),e=B("div"),c&&c.c(),n=$(),d&&d.c(),o=$(),h&&h.c(),b(e,"class","children svelte-kebunf"),b(e,"style",i[1]),b(t,"class","audio svelte-kebunf"),b(t,"style",i[0])},m(p,g){M(p,t,g),Q(t,e),c&&c.m(e,null),Q(e,n),d&&d.m(e,null),Q(e,o),h&&h.m(e,null),s=!0,r||(a=Te(t,"click",ma(i[5])),r=!0)},p(p,[g]){c&&c.p&&(!s||g&2064)&&Xe(c,l,p,p[11],s?_e(l,p[11],g,$g):Ye(p[11]),Tr),d&&d.p&&(!s||g&2076)&&Xe(d,u,p,p[11],s?_e(u,p[11],g,Kg):Ye(p[11]),Sr),h&&h.p&&(!s||g&2048)&&Xe(h,f,p,p[11],s?_e(f,p[11],g,null):Ye(p[11]),null),(!s||g&2)&&b(e,"style",p[1]),(!s||g&1)&&b(t,"style",p[0])},i(p){s||(k(c,p),k(d,p),k(h,p),s=!0)},o(p){S(c,p),S(d,p),S(h,p),s=!1},d(p){p&&z(t),c&&c.d(p),d&&d.d(p),h&&h.d(p),r=!1,a()}}}function t0(i,t,e){let n,{$$slots:o={},$$scope:s}=t,{url:r}=t,{paused:a=!0}=t,{style:l=""}=t,{slotWrapperStyle:c=""}=t,{hooksInfo:u}=t;const d=ut("hooks"),f=ut("mediaStore");let h,p=!0,g=null,A=null;function v(){e(9,h.onplay=y=>{d.emit("playStateChange",F({event:y,state:"playing",mediaInstance:h},u)),e(10,p=!1)},h),e(9,h.onpause=y=>{d.emit("playStateChange",F({event:y,state:"paused",mediaInstance:h},u)),e(10,p=!0)},h),e(9,h.onended=y=>{e(10,p=!0)},h),e(9,h.onloadedmetadata=y=>{e(2,g=h.duration)},h),e(9,h.ontimeupdate=y=>{e(3,A=h.currentTime)},h)}f.subscribe(({currentMediaElement:y})=>{y!==h&&(h==null||h.pause())});function w(y){!h||(d.emit("click",F({event:y,target:"AudioTagPlayIcon",audioInstance:h},u)),f.set({currentMediaElement:h}),h.paused?h.play():h.pause())}return i.$$set=y=>{"url"in y&&e(6,r=y.url),"paused"in y&&e(7,a=y.paused),"style"in y&&e(0,l=y.style),"slotWrapperStyle"in y&&e(1,c=y.slotWrapperStyle),"hooksInfo"in y&&e(8,u=y.hooksInfo),"$$scope"in y&&e(11,s=y.$$scope)},i.$$.update=()=>{i.$$.dirty&64&&(e(9,h=new Audio(r)),Ug(r).then(y=>{e(2,g=y)}),v()),i.$$.dirty&640&&(a||h==null||h.pause()),i.$$.dirty&1152&&e(4,n=!a&&!p)},[l,c,g,A,n,w,r,a,u,h,p,s,o]}class cl extends oe{constructor(t){super(),ie(this,t,t0,e0,ne,{url:6,paused:7,style:0,slotWrapperStyle:1,hooksInfo:8},qg)}}function n0(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 zr(i){let t,e;return t=new it({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function i0(i){let t,e,n,o,s,r=i[1]&&zr();return{c(){t=B("div"),r&&r.c(),e=$(),n=B("div"),o=B("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"),te(n,"playing",i[0]),b(t,"class","audio-icon__wrapper svelte-srt2pi"),b(t,"style",i[2]),T(t,"width",i[5]),T(t,"height",i[5])},m(a,l){M(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&&k(r,1):(r=zr(),r.c(),k(r,1),r.m(t,e)):r&&(se(),S(r,1,1,()=>{r=null}),re()),(!s||l&1)&&te(n,"playing",a[0]),(!s||l&4)&&b(t,"style",a[2]),l&32&&T(t,"width",a[5]),l&32&&T(t,"height",a[5])},i(a){s||(k(r),s=!0)},o(a){S(r),s=!1},d(a){a&&z(t),r&&r.d(),i[7](null),i[8](null)}}}function o0(i,t,e){let n,{playing:o}=t,{shadow:s=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function u(f){Se[f?"unshift":"push"](()=>{c=f,e(4,c)})}function d(f){Se[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"?ye(a):a)},[o,s,r,l,c,n,a,u,d]}class ul extends oe{constructor(t){super(),ie(this,t,o0,i0,ne,{playing:0,shadow:1,style:2,width:6},n0)}}function s0(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 Mr(i){var v,w;let t,e,n,o,s,r,a,l,c,u,d,f,h,p,g;e=new it({props:{visible:i[5],left:i[2]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let A=i[5]&&Br(i);return c=new tl({props:{visible:i[5],textUnfolded:i[1],content:i[4]}}),f=new fo({props:{unfolded:i[5],length:150,outDelay:i[3]+20*Math.min((w=(v=i[4])==null?void 0:v.length)!=null?w:10,15),useLinearColor:!0}}),{c(){t=B("div"),ee(e.$$.fragment),n=$(),o=B("div"),s=B("div"),r=B("div"),A&&A.c(),a=$(),l=B("div"),ee(c.$$.fragment),d=$(),ee(f.$$.fragment),b(r,"class","audio-icon svelte-1s6gk4a"),Le(()=>i[7].call(l)),T(l,"display","inline-block"),b(s,"class","wrapper svelte-1s6gk4a"),b(o,"class","content svelte-1s6gk4a"),b(t,"class","audio-tag svelte-1s6gk4a"),te(t,"unfolded",i[5])},m(y,I){M(y,t,I),q(e,t,null),Q(t,n),Q(t,o),Q(o,s),Q(s,r),A&&A.m(r,null),Q(s,a),Q(s,l),q(c,l,null),u=Et(l,i[7].bind(l)),Q(t,d),q(f,t,null),h=!0,p||(g=Te(l,"click",i[6]),p=!0)},p(y,I){var D,V;const P={};I&32&&(P.visible=y[5]),I&4&&(P.left=y[2]/2+"px"),e.$set(P),y[5]?A?(A.p(y,I),I&32&&k(A,1)):(A=Br(y),A.c(),k(A,1),A.m(r,null)):A&&(se(),S(A,1,1,()=>{A=null}),re());const C={};I&32&&(C.visible=y[5]),I&2&&(C.textUnfolded=y[1]),I&16&&(C.content=y[4]),c.$set(C);const L={};I&32&&(L.unfolded=y[5]),I&24&&(L.outDelay=y[3]+20*Math.min((V=(D=y[4])==null?void 0:D.length)!=null?V:10,15)),f.$set(L),(!h||I&32)&&te(t,"unfolded",y[5])},i(y){h||(k(e.$$.fragment,y),k(A),k(c.$$.fragment,y),k(f.$$.fragment,y),h=!0)},o(y){S(e.$$.fragment,y),S(A),S(c.$$.fragment,y),S(f.$$.fragment,y),h=!1},d(y){y&&z(t),K(e),A&&A.d(),K(c),u(),K(f),p=!1,g()}}}function Br(i){let t,e,n,o,s,r,a;return e=new it({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new cl({props:{paused:!i[5],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{audioIcon:[r0,({playing:l})=>({8:l}),({playing:l})=>l?256:0]},$$scope:{ctx:i}}}),{c(){t=B("div"),ee(e.$$.fragment),n=$(),ee(o.$$.fragment),b(t,"class","audio svelte-1s6gk4a")},m(l,c){M(l,t,c),q(e,t,null),Q(t,n),q(o,t,null),a=!0},p(l,c){i=l;const u={};c&32&&(u.paused=!i[5]),c&1&&(u.url=i[0].data.audioUrl),c&1&&(u.hooksInfo={tag:i[0]}),c&768&&(u.$$scope={dirty:c,ctx:i}),o.$set(u)},i(l){a||(k(e.$$.fragment,l),k(o.$$.fragment,l),l&&Le(()=>{r&&r.end(1),s=Ot(t,Vt,{duration:1e3,delay:0,easing:Zt}),s.start()}),a=!0)},o(l){var c,u;S(e.$$.fragment,l),S(o.$$.fragment,l),s&&s.invalidate(),l&&(r=en(t,Vt,{duration:1e3,delay:20*Math.min((u=(c=i[4])==null?void 0:c.length)!=null?u:10,15),easing:Zt})),a=!1},d(l){l&&z(t),K(e),K(o),l&&r&&r.end()}}}function r0(i){let t,e,n;return e=new ul({props:{playing:i[8]}}),{c(){t=B("div"),ee(e.$$.fragment),b(t,"slot","audioIcon"),b(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){M(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&256&&(r.playing=o[8]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),K(e)}}}function a0(i){let t,e,n=i[0].state&&Mr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=Mr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function l0(i,t,e){let n,o,s,{tag:r}=t,a=!1,l;function c(){e(1,a=!a)}function u(){l=this.clientWidth,e(2,l)}return i.$$set=d=>{"tag"in d&&e(0,r=d.tag)},i.$$.update=()=>{var d,f,h;i.$$.dirty&1&&e(5,n=!!((d=r.state)!=null&&d.unfolded)),i.$$.dirty&1&&e(4,o=(h=(f=r.data.title)!=null?f:r.data.text)!=null?h:""),i.$$.dirty&2&&e(3,s=a?450:0)},[r,a,l,s,o,n,c,u]}class c0 extends oe{constructor(t){super(),ie(this,t,l0,a0,ne,{tag:0},s0)}}function Vr(i){const t=Math.floor(i/60),e=Math.floor(i%60),n=e<10?`0${e}`:e;return`${t}'${n}''`}function u0(i){const t=document.createElement("div");t.style.color=i,document.body.appendChild(t);const e=window.getComputedStyle(t).color;document.body.removeChild(t);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 d0(i){le(i,"svelte-1fezrt1",".audio-tag__wrapper.svelte-1fezrt1{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.audio-tag.svelte-1fezrt1{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)}.currentTime.svelte-1fezrt1{font-family:TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;margin-left:0.25rem}.text.svelte-1fezrt1{font-weight:bold;font-size:0.75rem;margin-left:0.125rem}.audio-icon__wrapper.svelte-1fezrt1{position:relative;vertical-align:top;pointer-events:none;width:1.375rem;height:1.375rem}")}function jr(i){let t,e,n,o;return n=new cl({props:{paused:!i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},style:"width: max-content; height: max-content;",slotWrapperStyle:"display: flex; align-items: center; justify-content: center;",$$slots:{currentTime:[p0,({duration:s,currentTime:r,playing:a})=>({4:s,5:r,6:a}),({duration:s,currentTime:r,playing:a})=>(s?16:0)|(r?32:0)|(a?64:0)],audioIcon:[m0,({playing:s})=>({6:s}),({playing:s})=>s?64:0],default:[h0]},$$scope:{ctx:i}}}),{c(){t=B("div"),e=B("div"),ee(n.$$.fragment),b(e,"class","audio-tag svelte-1fezrt1"),T(e,"background-color",i[1]),T(e,"color",i[2]),b(t,"class","audio-tag__wrapper svelte-1fezrt1")},m(s,r){M(s,t,r),Q(t,e),q(n,e,null),o=!0},p(s,r){const a={};r&1&&(a.paused=!s[0].state.visible),r&1&&(a.url=s[0].data.audioUrl),r&1&&(a.hooksInfo={tag:s[0]}),r&248&&(a.$$scope={dirty:r,ctx:s}),n.$set(a),r&2&&T(e,"background-color",s[1]),r&4&&T(e,"color",s[2])},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&z(t),K(n)}}}function f0(i){let t;return{c(){t=Ce(i[3])},m(e,n){M(e,t,n)},p(e,n){n&8&&ke(t,e[3])},d(e){e&&z(t)}}}function h0(i){let t,e,n;return e=new Fi({props:{maxWidth:72,$$slots:{default:[f0]},$$scope:{ctx:i}}}),{c(){t=B("div"),ee(e.$$.fragment),b(t,"class","text svelte-1fezrt1")},m(o,s){M(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&136&&(r.$$scope={dirty:s,ctx:o}),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),K(e)}}}function m0(i){let t,e,n;return e=new ul({props:{playing:i[6]}}),{c(){t=B("div"),ee(e.$$.fragment),b(t,"slot","audioIcon"),b(t,"class","audio-icon__wrapper svelte-1fezrt1")},m(o,s){M(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&64&&(r.playing=o[6]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),K(e)}}}function Qr(i){let t=Vr(xe(i[6]?i[5]:i[4]))+"",e;return{c(){e=Ce(t)},m(n,o){M(n,e,o)},p(n,o){o&112&&t!==(t=Vr(xe(n[6]?n[5]:n[4]))+"")&&ke(e,t)},d(n){n&&z(e)}}}function p0(i){let t,e=typeof(i[6]?i[5]:i[4])=="number"&&Qr(i);return{c(){t=B("div"),e&&e.c(),b(t,"slot","currentTime"),b(t,"class","currentTime svelte-1fezrt1")},m(n,o){M(n,t,o),e&&e.m(t,null)},p(n,o){typeof(n[6]?n[5]:n[4])=="number"?e?e.p(n,o):(e=Qr(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},d(n){n&&z(t),e&&e.d()}}}function g0(i){let t,e,n=i[0].state&&jr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=jr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function A0(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(3,n=(l=(a=r.data.title)!=null?a:r.data.text)!=null?l:""),i.$$.dirty&1&&e(1,o=(()=>{var c;return r.data.backgroundColor==="dark"?"rgba(0, 0, 0, 0.3)":r.data.backgroundColor==="light"?"rgba(255, 255, 255, 0.3)":(c=r.data.backgroundColor)!=null?c:"rgba(0, 0, 0, 0.3)"})()),i.$$.dirty&2&&e(2,s=(()=>{const{r:c,g:u,b:d}=u0(o);return(c*299+u*587+d*114)/1e3>=128?"rgba(0, 0, 0, 0.6)":"white"})())},[r,o,s,n]}class v0 extends oe{constructor(t){super(),ie(this,t,A0,g0,ne,{tag:0},d0)}}function b0(i){let t,e;return t=new v0({props:{tag:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function y0(i){let t,e;return t=new c0({props:{tag:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function w0(i){let t,e,n,o;const s=[y0,b0],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=fe()},m(l,c){~t&&r[t].m(l,c),M(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?~t&&r[t].p(l,c):(e&&(se(),S(r[u],1,1,()=>{r[u]=null}),re()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),k(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(k(e),o=!0)},o(l){S(e),o=!1},d(l){~t&&r[t].d(l),l&&z(n)}}}function C0(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 E0 extends oe{constructor(t){super(),ie(this,t,C0,w0,ne,{tag:0})}}function P0(i){le(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function Rr(i){var o;let t,e,n;return e=new ol({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=B("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(s,r){M(s,t,r),q(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||(k(e.$$.fragment,s),n=!0)},o(s){S(e.$$.fragment,s),n=!1},d(s){s&&z(t),K(e)}}}function I0(i){let t,e,n=i[0].state&&i[5]&&Rr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&k(n,1)):(n=Rr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function k0(i,t,e){let n,o,s,r,a,l,{tag:c}=t;return i.$$set=u=>{"tag"in u&&e(0,c=u.tag)},i.$$.update=()=>{var u,d;i.$$.dirty&1&&e(6,n=c.state?c.state.unfolded:!1),i.$$.dirty&1&&e(5,o=c.data.mediaData),i.$$.dirty&1&&e(1,s=c.data.enableCarousel),i.$$.dirty&1&&e(4,r=c.data.playIcon),i.$$.dirty&3&&e(3,a=(u=c.data.autoplayConfig)!=null?u:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,l=(d=c.data.objectFit)!=null?d:(()=>c.data.adaptationMode==="stretch"?"cover":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,s,l,a,r,o,n]}class x0 extends oe{constructor(t){super(),ie(this,t,k0,I0,ne,{tag:0},P0)}}function D0(i){return Y(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 Or(i){return Y(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 D0(e),a=s/n,l=r/n,c=a/t,u=l,d=1/o*t+"s",f=a/t-a;return{url:e,keyframesWidth:a,keyframesHeight:l,wrapperWidth:c,wrapperHeight:u,steps:t,duration:d,offsetX:f,offsetY:0}})}function L0(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 Hr(i){i[4]=i[12].url,i[5]=i[12].keyframesWidth,i[6]=i[12].keyframesHeight,i[7]=i[12].wrapperWidth,i[8]=i[12].wrapperHeight,i[9]=i[12].steps,i[10]=i[12].duration,i[11]=i[12].offsetX}function Fr(i){let t,e,n,o=i[2]&&Gr();function s(l,c){return l[3]?T0:S0}let r=s(i),a=r(i);return{c(){t=B("div"),o&&o.c(),e=$(),a.c(),b(t,"class","icon"),T(t,"width",typeof i[0]=="number"?ye(i[0]):i[0])},m(l,c){M(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&&k(o,1):(o=Gr(),o.c(),k(o,1),o.m(t,e)):o&&(se(),S(o,1,1,()=>{o=null}),re()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&1&&T(t,"width",typeof l[0]=="number"?ye(l[0]):l[0])},i(l){n||(k(o),n=!0)},o(l){S(o),n=!1},d(l){l&&z(t),o&&o.d(),a.d()}}}function Gr(i){let t,e;return t=new it({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function S0(i){let t,e;return{c(){t=B("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){M(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 T0(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:B0,then:M0,catch:z0,value:12};return So(e=Or(i[1]),n),{c(){t=fe(),n.block.c()},m(o,s){M(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=Or(i[1]))&&So(e,n)||Cc(n,i,s)},d(o){o&&z(t),n.block.d(o),n.token=null,n=null}}}function z0(i){return{c:U,m:U,p:U,d:U}}function M0(i){Hr(i);let t,e,n,o=`url(${i[4]})`,s=`steps(${i[9]-1})`;return{c(){t=B("div"),e=B("div"),n=B("div"),b(n,"class","icon-keyframe svelte-mhs8j5"),T(n,"width",ye(i[5])),T(n,"height",ye(i[6])),T(n,"background-image",o),T(n,"animation-duration",i[10]),T(n,"animation-timing-function",s),T(n,"animation-delay",0),T(n,"background-size","100% 100%"),T(n,"--keyframe_offset_x",ye(i[11])),b(e,"class","icon-keyframe-wrapper svelte-mhs8j5"),T(e,"transform",typeof i[0]=="number"?`scale(${i[0]/i[7]})`:void 0),b(t,"class","icon-keyframe-container svelte-mhs8j5"),T(t,"width",typeof i[0]=="number"?ye(i[0]):ye(i[7])),T(t,"height",typeof i[0]=="number"?ye(i[8]*(i[0]/i[7])):ye(i[8]))},m(r,a){M(r,t,a),Q(t,e),Q(e,n)},p(r,a){Hr(r),a&2&&T(n,"width",ye(r[5])),a&2&&T(n,"height",ye(r[6])),a&2&&o!==(o=`url(${r[4]})`)&&T(n,"background-image",o),a&2&&T(n,"animation-duration",r[10]),a&2&&s!==(s=`steps(${r[9]-1})`)&&T(n,"animation-timing-function",s),a&2&&T(n,"--keyframe_offset_x",ye(r[11])),a&3&&T(e,"transform",typeof r[0]=="number"?`scale(${r[0]/r[7]})`:void 0),a&3&&T(t,"width",typeof r[0]=="number"?ye(r[0]):ye(r[7])),a&3&&T(t,"height",typeof r[0]=="number"?ye(r[8]*(r[0]/r[7])):ye(r[8]))},d(r){r&&z(t)}}}function B0(i){return{c:U,m:U,p:U,d:U}}function V0(i){let t,e,n=i[1]&&Fr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Fr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function j0(i,t,e){let n,{width:o=null}=t,{icon:s=null}=t,{shadow:r=!1}=t;return i.$$set=a=>{"width"in a&&e(0,o=a.width),"icon"in a&&e(1,s=a.icon),"shadow"in a&&e(2,r=a.shadow)},i.$$.update=()=>{i.$$.dirty&2&&e(3,n=(s==null?void 0:s.steps)>=2)},[o,s,r,n]}class dl extends oe{constructor(t){super(),ie(this,t,j0,V0,ne,{width:0,icon:1,shadow:2},L0)}}function Q0(i){le(i,"svelte-1lmyni6",".wrapper.svelte-1lmyni6{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-1lmyni6{position:relative;display:flex;align-items:center;justify-content:center}.text.svelte-1lmyni6{position:absolute;top:0;font-size:0.875rem;color:#ffffff;letter-spacing:0;text-align:center;max-width:8.75rem;width:-moz-max-content;width:max-content;word-break:break-all;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function Nr(i){let t,e,n,o,s,r;return e=new it({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=B("div"),ee(e.$$.fragment),n=$(),o=B("div"),s=Ce(i[1]),b(o,"class","text svelte-1lmyni6"),b(t,"class","text-wrapper svelte-1lmyni6")},m(a,l){M(a,t,l),q(e,t,null),Q(t,n),Q(t,o),Q(o,s),r=!0},p(a,l){(!r||l&2)&&ke(s,a[1])},i(a){r||(k(e.$$.fragment,a),r=!0)},o(a){S(e.$$.fragment,a),r=!1},d(a){a&&z(t),K(e)}}}function R0(i){let t,e,n,o;e=new dl({props:{icon:i[0]}});let s=i[1]&&Nr(i);return{c(){t=B("div"),ee(e.$$.fragment),n=$(),s&&s.c(),b(t,"class","wrapper svelte-1lmyni6")},m(r,a){M(r,t,a),q(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]?s?(s.p(r,a),a&2&&k(s,1)):(s=Nr(r),s.c(),k(s,1),s.m(t,null)):s&&(se(),S(s,1,1,()=>{s=null}),re())},i(r){o||(k(e.$$.fragment,r),k(s),o=!0)},o(r){S(e.$$.fragment,r),S(s),o=!1},d(r){r&&z(t),K(e),s&&s.d()}}}function O0(i,t,e){let n,o,s,r,a,l,c,{tag:u}=t;return i.$$set=d=>{"tag"in d&&e(2,u=d.tag)},i.$$.update=()=>{var d,f;i.$$.dirty&4&&e(1,n=(d=u.data.title)!=null?d:u.data.text),i.$$.dirty&4&&e(7,o=(f=u.data.icon)!=null?f:u.style.point),i.$$.dirty&128&&e(6,s=o.url),i.$$.dirty&128&&e(5,r=o.steps),i.$$.dirty&128&&e(4,a=o.fps),i.$$.dirty&128&&e(3,l=o.ratio),i.$$.dirty&120&&e(0,c={url:s,steps:r,fps:a,ratio:l})},[c,n,u,l,a,r,s,o]}class H0 extends oe{constructor(t){super(),ie(this,t,O0,R0,ne,{tag:2},Q0)}}function F0(i){le(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function Wr(i){let t,e=i[0].element+"",n;return{c(){t=new Wn(!1),n=fe(),t.a=n},m(o,s){t.m(e,o,s),M(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 G0(i){let t,e=typeof i[0].element=="string"&&Wr(i);return{c(){t=B("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){M(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=Wr(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:U,o:U,d(n){n&&z(t),e&&e.d(),i[2](null)}}}function N0(i,t,e){let{tag:n}=t,o,s;tt(()=>{if(o){if(n.element instanceof Element){const a=n.element;o.appendChild(a),s=()=>o==null?void 0:o.removeChild(a)}else if(typeof n.element=="function"){const a=n.element;s=a(o)}}}),It(()=>{s==null||s()});function r(a){Se[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class W0 extends oe{constructor(t){super(),ie(this,t,N0,G0,ne,{tag:0},F0)}}function _0(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/gApAggANAEeAFABHgBQAR4AUAIIADQCCAAuAR4AUAEeAFABfAAxAAEAAAPo/zgAAAIcACkAKQHgAAEAAAAAAAAAAAAAAAAAAABJAAMCLgGQAAUACAKKAlgAAABLAooCWAAAAV4AMgEsAAAAAAgAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFVLV04AIAAg/xsDIP84AMgD6ADIAAAAAQAAAAAB9AK8AAAAIAAAAAAAEADGAAEAAAAAAAEADAAAAAEAAAAAAAIABAAMAAEAAAAAAAMAGwAQAAEAAAAAAAQAEQArAAEAAAAAAAUAPAA8AAEAAAAAAAYAEAB4AAEAAAAAAAgADAAAAAEAAAAAAAkADAAAAAMAAQQJAAEAGACIAAMAAQQJAAIACACgAAMAAQQJAAMANgCoAAMAAQQJAAQAIgDeAAMAAQQJAAUAeAEAAAMAAQQJAAYAIAF4AAMAAQQJAAgAGACIAAMAAQQJAAkAGACIQUxJQkFCQSBGb250Qm9sZDEuMDAwO1VLV047QUxJQkFCQUZvbnQtQm9sZEFMSUJBQkEgRm9udCBCb2xkVmVyc2lvbiAxLjAwMDtQUyAwMDEuMDAwO2hvdGNvbnYgMS4wLjg4O21ha2VvdGYubGliMi41LjY0Nzc1QUxJQkFCQUZvbnQtQm9sZABBAEwASQBCAEEAQgBBACAARgBvAG4AdABCAG8AbABkADEALgAwADAAMAA7AFUASwBXAE4AOwBBAEwASQBCAEEAQgBBAEYAbwBuAHQALQBCAG8AbABkAEEATABJAEIAQQBCAEEAIABGAG8AbgB0ACAAQgBvAGwAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAMAAwADsAUABTACAAMAAwADEALgAwADAAMAA7AGgAbwB0AGMAbwBuAHYAIAAxAC4AMAAuADgAOAA7AG0AYQBrAGUAbwB0AGYALgBsAGkAYgAyAC4ANQAuADYANAA3ADcANQBBAEwASQBCAEEAQgBBAEYAbwBuAHQALQBCAG8AbABkAAAAAAADAAAAAwAAASIAAQAAAAAAHAADAAEAAAEiAAABBgAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAABCSEMANjc4OTo7PD0+PwAAAAAAAAACAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGwAAAAAAABwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAFoAAAAQABAAAwAAACAALgA5AFoAegCl/xv//wAAACAALAAwAEEAYQCl/xr////hAAAABv/B/7v/nwAAAAEAAAAOAAAAAAAAAAAACgAAAEIASABDAEYARwADAAAAAAAA/7UAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAQAEAgABAQERQUxJQkFCQUZvbnQtQm9sZAABAQEg+A8A+CAB+CEC+BgEtPtc+HT5tAX3KA/3UBGcHAZWEgAHAQENExoiKTpLbmluZS4wMDEuMDAxbW9uZXkudW5pRkYxQm5pbmUuMDAxdW5pRkYxQWNvcHlyaWdodCBtaXNzaW5nQUxJQkFCQSBGb250IEJvbGQAAAEAAQAAIhkAQhkAEQkBhwABigAADQAADwAAZAABiAABiwABiQAADgAASQIAAQCtAK4ArwCwALEAsgCzALQAtQC2ALcAuAC5ALoAuwC8AL0AvgC/AMAAwQDCAMMAxADFAMYAxwDIAMkAygDLAMwAzQDOAM8A0ADRANIA0wDUANUA1gDXANgA2QDaANsA3ADdAN4A3wDgAOEA4gFDAVoBqwIsAloCuAMcAzkDzwQ4BDoEPARRBFMEVQTNBOIE8QUEmPtc0Ky6rKKsuqzHrKPDoa2irLCspq2vraWssKzOAejVrKytrKzYA/gu+bQV+9H+fPfRBj76ORVqSWbNavs6rM2wSqwH7vsVFUXNafs68wfNaRVqZ6wG704VaklFJ6zNsEmsB/c6TxUn+zqt9xnNB6z7DhX7Bfs69wWsO++6anRpwwfv+0EV+wX7OvcFB/cZahUnXO8GrFMVamsHRVwF8Wr7OqwG0boFRawGDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OrIr5UQH3OPdUA/ebihVmaZSdbB9Mr2TL0xr3vgewlK2eqh7Kr86y1BuvrIJ5qh/HZrJIQhr7vgdngmp5bR5OZ0tkQxv46ARUX2FSH/u+B1a5YMDAs7TCHve+B8RjtVYeDnD4utkB93HzA/cL+QgVPfH8vPP5UgcOrIn5UgG++DYD+GmJFfw28wb3svfUBZ2glKSnGsNduFBWXF1UiB4ijgaMsJWsnqoIyLHMstYbsa6Ceawfy2ezSUAaVndXZ2Me+2/7jQX3pwYOrIvy92Tz90ryEr/zM/L3SvMu8hPy+B/3/xUT7LCwpMDDGq6CrHqoHsZnTK5DG2lrg3puH09pZk5EGobykAe4tba6vrViXFZiYlcedyOfBhPyxLpdUlJcW1JSXLvEH5ojfAdllGiebB5LsM5j1xuwrpSeqx/KsLPO1xrKcMNerx4OwPL1Affi8gP4dPdlFWD4fPshBvuJ/HkF+wH3ryPy87YH+8z1Ffc69+QF++QHDrb3ZNf3ZfAB9zX3YwP3nRZlaJSebB9LsGPO1xrzBlK6XMTEubrEHtcHxF26UlJcXFIeI/g0+BYh+677JAaorK2ZsBuwroJ4qx/LZrNHPxo/B2aCaHhrHktmR2NAGw6si/X3b/IBufX3b/ID95n4QBWAg4uKhh/3EfelBfsHBvtK/CMFfnCFbm0aZJVnnmoeSrLPYdobsq6Vnqwfy7K10dgasoGueKwey2RHtT4b+9YETlu7yMe8vcfHvVlPT1laTx8OmIr5UQG/+B8D93iKFfsIBvdo+OYF+6T2+B8oBg6iifL3bPX3QPEStvNB8vc/8jXxE/L4EvgHFRPss7Cnu78arYOreqgexWpNr0YbaWyDem4fUmlmTUcaXqBftGAeE/JWYmROSxpklWieax5Ksc9i2BuxrpWerB/LsbTP2BrHaMVath4T7PsN93QVu7FjXFtlZltcZbC7urGzuh8T8oX8ghVPW7zHx7q6yMa9W1BPWVpQHw6i96Tz92/0AbTz93DzA/hp+HkVsIGveKwezmNFtUAbZGeBeGofSmNiRT8aZJVnnmseSrHPYtoboAb7EvukBfcHBvdL+CEFmaySqaQa+9gWxry+yJ6dhoGcHq12oWZmGk5YW1BMXLnKHg4gCiEK+11L91IlCvdiyhWtb6hpJgoeJAoOIQogCqz3pe/3b/UBufX3bfQD+G74dxWyga94rB7NZEW0PhtlaIF4ah9KY2FFPxo7tkTPZh6MjIqKjB+TiJCIjYoIjgaCoKGHoRuanY6QoB+IgfsB+6QF9wcG9y/4IgWYppGnqhr7a/sCFVBbvMjHu7zGyLxbTk5aWk4fDvtd+AojCoz7jBUmCh8kCq1vqGkeDvtdi/cS94wjCvwKBCIKDiD3ru8BvPeuA7z4EhUn967vBw4eoDf/DAmLDAv47BT4exWcEwAHAQFBXW97ipCarPcv8+7yAfdl8gP4aPf6FfIjB+r3gwUiBi77gwWHBjH3gwUkBuP7gwUnJPcxKPsxI/cx+y/y9y/3MPP7MO4GDvtdi/cSJQr3JBZkcqOzsKSksrCkcWdlcnFmHw6up6eurm+naGhvb2hop2+uHwv3EiUK9yP4ChUiCgt3SgWxBrnmBZGVj5eZGgsB2/cSAwtobm5paqBzqoYLAAABAAAAAAAAAAAAAA==) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-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 X0(i){let t,e;return{c(){t=B("div"),b(t,"data-info","tag content is keep folded"),b(t,"data-id",e=i[1].id)},m(n,o){M(n,t,o)},p(n,o){o&2&&e!==(e=n[1].id)&&b(t,"data-id",e)},i:U,o:U,d(n){n&&z(t)}}}function Y0(i){let t,e,n,o,s,r,a,l,c;const u=[eA,$0,K0,q0,Z0,J0,U0],d=[];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"?6:-1}return~(o=f(i))&&(s=d[o]=u[o](i)),{c(){var h,p,g;t=B("div"),e=B("div"),n=B("div"),s&&s.c(),b(n,"class","content svelte-ofx2uu"),te(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),te(t,"disable",i[1].enabled===!1),te(t,"hide",!i[3].visible||!i[3].enabled||!i[4].visible||!((p=i[1].state)!=null&&p.visible)||((g=i[1].temporaryState)==null?void 0:g.visible)===!1),te(t,"withAnimation",i[0]),te(t,"unClickable",i[1].clickable===!1),T(t,"width",i[1].stickType==="Plane"?"100%":0),T(t,"height",i[1].stickType==="Plane"?"100%":0)},m(h,p){M(h,t,p),Q(t,e),Q(e,n),~o&&d[o].m(n,null),a=!0,l||(c=Te(t,"click",ma(i[12])),l=!0)},p(h,p){var A,v,w;let g=o;o=f(h),o===g?~o&&d[o].p(h,p):(s&&(se(),S(d[g],1,1,()=>{d[g]=null}),re()),~o?(s=d[o],s?s.p(h,p):(s=d[o]=u[o](h),s.c()),k(s,1),s.m(n,null)):s=null),(!a||p&2)&&te(n,"unfolded",(A=h[1].state)==null?void 0:A.unfolded),(!a||p&2&&r!==(r=h[1].id))&&b(t,"data-id",r),(!a||p&2)&&te(t,"disable",h[1].enabled===!1),(!a||p&26)&&te(t,"hide",!h[3].visible||!h[3].enabled||!h[4].visible||!((v=h[1].state)!=null&&v.visible)||((w=h[1].temporaryState)==null?void 0:w.visible)===!1),(!a||p&1)&&te(t,"withAnimation",h[0]),(!a||p&2)&&te(t,"unClickable",h[1].clickable===!1),p&2&&T(t,"width",h[1].stickType==="Plane"?"100%":0),p&2&&T(t,"height",h[1].stickType==="Plane"?"100%":0)},i(h){a||(k(s),a=!0)},o(h){S(s),a=!1},d(h){h&&z(t),~o&&d[o].d(),l=!1,c()}}}function U0(i){let t,e;return t=new x0({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function J0(i){let t,e;return t=new H0({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Z0(i){let t,e;return t=new Xg({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function q0(i){let t,e;return t=new E0({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function K0(i){let t,e;return t=new Lg({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function $0(i){let t,e;return t=new Gp({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function eA(i){let t,e;return t=new W0({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function tA(i){let t,e,n,o;const s=[Y0,X0],r=[];function a(l,c){return l[5]?0:1}return t=a(i),e=r[t]=s[t](i),{c(){e.c(),n=fe()},m(l,c){r[t].m(l,c),M(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?r[t].p(l,c):(se(),S(r[u],1,1,()=>{r[u]=null}),re(),e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),k(e,1),e.m(n.parentNode,n))},i(l){o||(k(e),o=!0)},o(l){S(e),o=!1},d(l){r[t].d(l),l&&z(n)}}}function nA(i,t,e){let n,o,s,r,a,{withAnimation:l=!1}=t,{tag:c}=t,{hooks:u}=t,{state:d}=t,{mediaStore:f}=t,{temporaryState:h}=t;Yn("hooks",u),Yn("mediaStore",f);let p,g;function A(w){w?u.emit("exposure",{id:r,type:"start"}):u.emit("exposure",{id:r,type:"end"})}const v=w=>u.emit("click",{event:w,target:"TagContent",tag:c});return i.$$set=w=>{"withAnimation"in w&&e(0,l=w.withAnimation),"tag"in w&&e(1,c=w.tag),"hooks"in w&&e(2,u=w.hooks),"state"in w&&e(3,d=w.state),"mediaStore"in w&&e(6,f=w.mediaStore),"temporaryState"in w&&e(4,h=w.temporaryState)},i.$$.update=()=>{var w,y,I,P,C,L,D,V,W,G,X;i.$$.dirty&2&&e(10,n=(w=c.state)==null?void 0:w.unfolded),i.$$.dirty&2&&e(9,o=(y=c.state)==null?void 0:y.visible),i.$$.dirty&26&&e(11,s=d.visible&&h.visible&&((I=c.state)==null?void 0:I.visible)),i.$$.dirty&2&&(r=c.id),i.$$.dirty&2048&&A(s),i.$$.dirty&1922&&c.hooks&&(n!==void 0&&n!==g&&(e(8,g=n),n?(C=(P=c.hooks).emit)==null||C.call(P,"unfolded"):(D=c==null?void 0:(L=c.hooks).emit)==null||D.call(L,"folded")),o!==void 0&&o!==p&&(e(7,p=o),o?(W=(V=c.hooks).emit)==null||W.call(V,"show"):(X=(G=c.hooks).emit)==null||X.call(G,"hide"))),i.$$.dirty&2&&e(5,a=(()=>!(typeof c.mergedConfig.unfoldedConfig=="object"&&c.mergedConfig.unfoldedConfig.keep==="folded"))())},[l,c,u,d,h,a,f,p,g,o,n,s,v]}class fl extends oe{constructor(t){super(),ie(this,t,nA,tA,ne,{withAnimation:0,tag:1,hooks:2,state:3,mediaStore:6,temporaryState:4},_0)}}function iA(i){le(i,"svelte-1m3xhhr",'@charset "UTF-8";.tag-point-click-helper.svelte-1m3xhhr.svelte-1m3xhhr{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-1m3xhhr.svelte-1m3xhhr{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);z-index:-1}.tag-folded-point.svelte-1m3xhhr.svelte-1m3xhhr,.tag-unfolded-point.svelte-1m3xhhr.svelte-1m3xhhr{transition:all 0.5s}.tag-point-wrapper.svelte-1m3xhhr .tag-unfolded-point.svelte-1m3xhhr{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-1m3xhhr .tag-unfolded-point.svelte-1m3xhhr:after{content:"";position:absolute;width:0.3125rem;height:0.3125rem;border-radius:50%;background-color:white}.tag-point-wrapper.svelte-1m3xhhr .tag-unfolded-point.svelte-1m3xhhr: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-1m3xhhr .tag-folded-point.svelte-1m3xhhr{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-1m3xhhr .tag-unfolded-point.svelte-1m3xhhr{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-1m3xhhr .tag-folded-point.svelte-1m3xhhr{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-1m3xhhr .tag-unfolded-point.svelte-1m3xhhr{opacity:1;scale:1}')}function oA(i){let t,e,n,o,s,r,a,l,c,u,d,f;return o=new it({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new dl({props:{icon:i[2],width:i[1]}}),{c(){t=B("div"),e=$(),n=B("div"),ee(o.$$.fragment),s=$(),r=B("div"),a=$(),l=B("div"),ee(c.$$.fragment),b(t,"class","tag-point-click-helper svelte-1m3xhhr"),b(r,"class","tag-unfolded-point svelte-1m3xhhr"),T(r,"transition-delay",(i[3]?i[5]:0)+"ms"),b(l,"class","tag-folded-point svelte-1m3xhhr"),T(l,"transition-delay",(i[3]?i[5]:0)+"ms"),b(n,"class","tag-point-wrapper svelte-1m3xhhr"),te(n,"unfolded",i[0]),te(n,"folded",i[3]),T(n,"width",ye(i[1])),T(n,"height",ye(i[1]))},m(h,p){M(h,t,p),M(h,e,p),M(h,n,p),q(o,n,null),Q(n,s),Q(n,r),Q(n,a),Q(n,l),q(c,l,null),u=!0,d||(f=Te(t,"click",i[4]),d=!0)},p(h,[p]){p&8&&T(r,"transition-delay",(h[3]?h[5]:0)+"ms");const g={};p&4&&(g.icon=h[2]),p&2&&(g.width=h[1]),c.$set(g),p&8&&T(l,"transition-delay",(h[3]?h[5]:0)+"ms"),(!u||p&1)&&te(n,"unfolded",h[0]),(!u||p&8)&&te(n,"folded",h[3]),p&2&&T(n,"width",ye(h[1])),p&2&&T(n,"height",ye(h[1]))},i(h){u||(k(o.$$.fragment,h),k(c.$$.fragment,h),u=!0)},o(h){S(o.$$.fragment,h),S(c.$$.fragment,h),u=!1},d(h){h&&z(t),h&&z(e),h&&z(n),K(o),K(c),d=!1,f()}}}function sA(i,t,e){let n,o,s,r;const a=ut("hooks");let{tag:l}=t,c,u=!1;const d=()=>{c!==void 0&&clearTimeout(c),u=!0,c=setTimeout(()=>{u=!1},800)},f=p=>{u||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,g,A,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=(A=(g=l.style)==null?void 0:g.point)!=null&&A.url?(v=l.style)==null?void 0:v.point:{url:pp}),i.$$.dirty&64&&e(1,r=(()=>{var y,I,P;const w=(P=(I=(y=l.style)==null?void 0:y.point)==null?void 0:I.size)!=null?P:"S";return typeof w=="number"?w:w==="S"?18:w==="M"?20:w==="L"?24:w==="XL"?28:18})())},d(),[n,r,s,o,f,h,l]}class rA extends oe{constructor(t){super(),ie(this,t,sA,oA,ne,{tag:6},iA)}}function aA(i){le(i,"svelte-bdubcv",".tag.hide.svelte-bdubcv{opacity:0;pointer-events:none}.tag.disable.svelte-bdubcv{display:none}.tag.withAnimation.svelte-bdubcv{transition:opacity 0.3s linear}.wrapper.svelte-bdubcv{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}")}function lA(i){let t;return{c(){t=B("div"),b(t,"data-info","tag content is disable")},m(e,n){M(e,t,n)},p:U,i:U,o:U,d(e){e&&z(t)}}}function cA(i){let t,e;return t=new fl({props:{mediaStore:i[2],withAnimation:i[0],tag:xe(i[1]),hooks:i[14],state:i[3],temporaryState:i[4]}}),{c(){ee(t.$$.fragment)},m(n,o){q(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=xe(n[1])),o&8&&(s.state=n[3]),o&16&&(s.temporaryState=n[4]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function uA(i){let t;return{c(){t=B("div"),b(t,"data-info","tag point is disable")},m(e,n){M(e,t,n)},p:U,i:U,o:U,d(e){e&&z(t)}}}function dA(i){let t,e;return t=new rA({props:{tag:i[1]}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=n[1]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function fA(i){let t,e,n,o,s,r,a,l,c;const u=[cA,lA],d=[];function f(A,v){return A[12]?0:1}n=f(i),o=d[n]=u[n](i);const h=[dA,uA],p=[];function g(A,v){return A[13]?0:1}return r=g(i),a=p[r]=h[r](i),{c(){t=B("div"),e=B("div"),o.c(),s=$(),a.c(),b(e,"class","wrapper svelte-bdubcv"),b(e,"data-tag-unfolded",i[8]),b(e,"data-tag-id",i[11]),b(e,"data-content-type",l=i[1].contentType),T(e,"left",i[7]),T(e,"top",i[6]),T(e,"z-index",i[5]),b(t,"class","tag svelte-bdubcv"),b(t,"data-tag-id",i[11]),te(t,"disable",i[10]),te(t,"hide",i[9]),te(t,"withAnimation",i[0])},m(A,v){M(A,t,v),Q(t,e),d[n].m(e,null),Q(e,s),p[r].m(e,null),c=!0},p(A,[v]){let w=n;n=f(A),n===w?d[n].p(A,v):(se(),S(d[w],1,1,()=>{d[w]=null}),re(),o=d[n],o?o.p(A,v):(o=d[n]=u[n](A),o.c()),k(o,1),o.m(e,s));let y=r;r=g(A),r===y?p[r].p(A,v):(se(),S(p[y],1,1,()=>{p[y]=null}),re(),a=p[r],a?a.p(A,v):(a=p[r]=h[r](A),a.c()),k(a,1),a.m(e,null)),(!c||v&256)&&b(e,"data-tag-unfolded",A[8]),(!c||v&2048)&&b(e,"data-tag-id",A[11]),(!c||v&2&&l!==(l=A[1].contentType))&&b(e,"data-content-type",l),v&128&&T(e,"left",A[7]),v&64&&T(e,"top",A[6]),v&32&&T(e,"z-index",A[5]),(!c||v&2048)&&b(t,"data-tag-id",A[11]),(!c||v&1024)&&te(t,"disable",A[10]),(!c||v&512)&&te(t,"hide",A[9]),(!c||v&1)&&te(t,"withAnimation",A[0])},i(A){c||(k(o),k(a),c=!0)},o(A){S(o),S(a),c=!1},d(A){A&&z(t),d[n].d(),p[r].d()}}}function hA(i,t,e){let n,o,s,r,a,l,c,u,d,{withAnimation:f=!1}=t,{tag:h}=t,{mediaStore:p}=t,{state:g}=t,{temporaryState:A}=t;const v=ut("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,g=w.state),"temporaryState"in w&&e(4,A=w.temporaryState)},i.$$.update=()=>{var w,y,I,P,C,L,D,V;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=!((I=h.state)!=null&&I.visible)||((P=h.temporaryState)==null?void 0:P.visible)===!1),i.$$.dirty&2&&e(8,l=(C=h.state)==null?void 0:C.unfolded),i.$$.dirty&2&&e(7,c=((L=h.pointTagStyle)==null?void 0:L.leftPercent)+"%"),i.$$.dirty&2&&e(6,u=((D=h.pointTagStyle)==null?void 0:D.topPercent)+"%"),i.$$.dirty&2&&e(5,d=(V=h.state)!=null&&V.unfolded?1:0)},[f,h,p,g,A,d,u,c,l,a,r,s,o,n,v]}class mA extends oe{constructor(t){super(),ie(this,t,hA,fA,ne,{withAnimation:0,tag:1,mediaStore:2,state:3,temporaryState:4},aA)}}function pA(i){le(i,"svelte-wqbk81",".tag--container.svelte-wqbk81{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}.withAnimation.svelte-wqbk81{transition:opacity 0.3s linear}.tag--container.hide.svelte-wqbk81{opacity:0;pointer-events:none}.tag--container.hide.svelte-wqbk81 *{pointer-events:none}")}function _r(i,t,e){const n=i.slice();return n[6]=t[e],n}function Xr(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=_r(i,s,a),c=r(l);n.set(c,e[a]=Yr(c,l))}return{c(){t=B("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-wqbk81"),te(t,"hide",!i[3].visible||!i[4].visible),te(t,"withAnimation",i[0])},m(a,l){M(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],se(),e=nt(e,l,r,1,a,s,n,t,Ht,Yr,null,_r),re()),(!o||l&24)&&te(t,"hide",!a[3].visible||!a[4].visible),(!o||l&1)&&te(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)k(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)S(e[l]);o=!1},d(a){a&&z(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Yr(i,t){let e,n,o;return n=new mA({props:{state:t[3],temporaryState:t[4],withAnimation:t[0],tag:t[6],mediaStore:t[2]}}),{key:i,first:null,c(){e=fe(),ee(n.$$.fragment),this.first=e},m(s,r){M(s,e,r),q(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||(k(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&z(e),K(n,s)}}}function gA(i){let t,e,n=i[3].enabled&&Xr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&k(n,1)):(n=Xr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function AA(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{mediaStore:r}=t,{state:a}=t,{temporaryState:l}=t;return Yn("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 vA extends oe{constructor(t){super(),ie(this,t,AA,gA,ne,{withAnimation:0,tags:1,hooks:5,mediaStore:2,state:3,temporaryState:4},pA)}}const bA={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}}}};function yA(i){return i.stickType==="2DPoint"||i.stickType==="3DPoint"}function wA(i){return i.stickType==="3DPoint"||i.stickType==="Plane"}class CA extends ai{constructor(e){super(e);m(this,"tagCacheByPanoIndex",{})}getCaches({panoIndex:e,id:n,key:o}){var c,u,d,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=`${(d=(u=s.work)==null?void 0:u.workCode)!=null?d: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={}}}class EA extends CA{constructor(e){super(e);m(this,"tags",[]);m(this,"config",bA);m(this,"raycaster",new x.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]=St.default({},this.config.contentTypeConfig[e],n):this.config.contentTypeConfig[e]=n,this.clearCache()}getVisibleByPanoIndex(e,n){var r;const o=this.getCaches({panoIndex:n,id:e.id}),s=(r=this.five.panoIndex)!=null?r:n;if(o.visible!==void 0)return o.visible;{const a=(()=>{var u,d,f;const l=(u=this.getTagConfig(e).visibleConfig)!=null?u:{},c=this.getDistance(e);if(typeof l=="function")return l(this.five,{tag:e,distance:c});if(l.keep==="hidden")return!1;if(l.keep==="visible")return!0;if(l.visiblePanoIndex!==void 0&&l.visiblePanoIndex!=="all"&&s!==void 0&&(Array.isArray(l.visiblePanoIndex)&&!l.visiblePanoIndex.includes(s)||l.visiblePanoIndex==="current"&&s!==((d=e.fiveState)==null?void 0:d.panoIndex))||l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&sn(c,l.visibleDistance)===!1)return!1;if(l.intersectRaycaster!==!1&&(typeof l.intersectRaycaster!="object"||l.intersectRaycaster.enabled!==!1)){if(s===void 0)return!1;const h=(f=this.five.work.observers[s])==null?void 0:f.position;if(h===void 0)throw new Error(`getVisible(): observerPosition is ${h}`);const p=Tn(e.position).sub(h).normalize();this.raycaster.set(h,p);const[g]=this.five.model.intersectRaycaster(this.raycaster),A=(()=>{var v;return typeof l.intersectRaycaster=="object"&&(v=l.intersectRaycaster.distanceAccuracy)!=null?v:.01})();if(g&&g.distance+A<c)return!1}return!(l.angleRange&&wA(e)&&sn(this.getAngle(e),l.angleRange)===!1)})();return o.visible=a,o.visible}}getUnfoldedByPanoIndex(e,n){if(!this.getVisibleByPanoIndex(e))return;const s=this.getCaches({panoIndex:n,id:e.id});if(s.unfolded!==void 0)return s.unfolded;{const r=this.getTagConfig(e).unfoldedConfig;if(!r)return;const a=(()=>{const c=this.getDistance(e);if(typeof r=="function")return r(this.five,{tag:e,distance:c});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.unfoldDistance&&sn(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&&sn(l.x,r.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(r.autoUnfold.strategy==="MinimumDistance"){const u=this.filterPointTag().filter(f=>this.getVisibleByPanoIndex(f)).filter(f=>{const h=this.getTagProject(f);if(!h)return!1;const{x:p,y:g,z:A}=h;return!(Math.abs(A)>1||Math.abs(p)>1||Math.abs(g)>1)}).map(f=>({tag:f,id:f.id,tagConfig:this.getTagConfig(f).unfoldedConfig})).filter(({tag:f,tagConfig:h})=>{var p,g;return!(typeof h!="object"||h.keep||h.autoUnfold===!1||((p=h.autoUnfold)==null?void 0:p.enable)===!1||((g=h.autoUnfold)==null?void 0:g.strategy)!=="MinimumDistance")}).map(f=>he(F({},f),{distance:this.getDistance(f.tag)})).filter(({distance:f,tagConfig:h})=>{var p,g;return!(f===void 0||typeof h!="object"||h.autoUnfold===!1||((p=h.autoUnfold)==null?void 0:p.enable)===!1||((g=h.autoUnfold)==null?void 0:g.strategy)!=="MinimumDistance"||h.autoUnfold.distance&&sn(f,h.autoUnfold.distance)===!1)}).sort((f,h)=>f.distance-h.distance).findIndex(f=>f.id===e.id);if(u===-1||u<=((a=r.autoUnfold.maxNumber)!=null?a:1)-1===!1)return!1}return!0}})():void 0}getDistance(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCaches({panoIndex:n,id:e.id});if(s.distance!==void 0)return s.distance;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getDistance(): observerPosition is ${c}`);const u=(()=>yA(e)?at(e==null?void 0:e.position):Tn(e.position))(),d=c.distanceTo(u);return s.distance=d,d}}getAngle(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCaches({panoIndex:n,id:e.id});if(s.angle!==void 0)return s.angle;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getAngleRange(): observerPosition is ${c}`);const u=(()=>e.stickType==="3DPoint"?fn(e.normal):$a(e.position))();if(!u)return;const d=new x.Vector3().copy(c).sub(Tn(e.position)),f=u.angleTo(d)*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",u="Any"]=l;(e.stickType===c||c==="Any")&&(e.contentType===u||u==="Any")&&(n[a]=this.config.contentTypeConfig[a])}if(l.length===3){const[c="Any",u,d]=l;if(u==="Audio"&&e.contentType==="Audio"){const f=e;(f.stickType===c||c==="Any")&&f.data.appearance===d&&(n[a]=this.config.contentTypeConfig[a])}}});const o=St.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=void 0;return}const o=this.getTagProject(n);if(!o){n.pointTagStyle=void 0;return}n.pointTagStyle={leftPercent:(o.x+1)/2*100,topPercent:(-o.y+1)/2*100}})}setVisibleByPanoIndex(){this.tags.forEach(e=>{const n=this.getVisibleByPanoIndex(e);e.state&&(e.state.visible=n)})}setUnfoldedByPanoIndex(){this.tags.forEach(e=>{const n=this.getUnfoldedByPanoIndex(e);if(!!e.state&&(n!==void 0&&(e.state.unfolded=n),n&&!e.state.visible)){const o=this.getTagConfig(e);typeof o.unfoldedConfig=="object"&&o.unfoldedConfig.autoUnfoldWhenHide!==!1&&(e.state.unfolded=!1)}})}getTagProject(e){if(!this.getVisibleByPanoIndex(e))return;const o=Tn(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")}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})}}function PA(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 hl="2.0.2",Xi=`DnalogelPlugin-PanoTagPlugin@${hl}`,IA=!1,kA=i=>`${Xi}--${i}`;class ml extends EA{constructor(e,n){super(e);m(this,"version",hl);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",to({currentMediaElement:null}));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,"disposedErrorLog",()=>{console.error(`${Xi} is disposed`)});this.params=F({debug:!1,config:this.config},n),this.debug=this.params.debug,this.config=this.params.config,Jg(1),Object.assign(window,{[`__PANOTAGPLUGIN_DEBUG_${Date.now()}__`]:this}),Object.assign(window,{__PANOTAGPLUGIN_DEBUG__:this})}load(e,n){return Y(this,null,function*(){var o,s;if(this.clearTags(),console.log(Xi," load:",{data:e}),this.config=St.default({},this.config,{globalConfig:(o=e.globalConfig)!=null?o:{},contentTypeConfig:(s=e.contentTypeConfig)!=null?s:{}}),this.debug)try{tp(this.five,this.tags)}catch(r){console.error(r)}return this.addTag(e.tagList,n)})}addTag(e,n){return Y(this,null,function*(){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r);return he(F({},r),{state:F({visible:void 0,unfolded:IA},a.initialState),hooks:new be.Subscribe,clickable:a.clickable,mergedConfig:a})}).filter(r=>r.position);return s.forEach(PA),this.tags.push(...s),np(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(),!0})})}changeConfig(e,n=!0){n?this.config=St.default({},this.config,e):this.config=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=St.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 Y(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 Y(this,null,function*(){const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({visible:!1},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("hide",{userAction:n,withAnimation:o})})}enable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!0},{userAction:n}),this.hooks.emit("enable",{userAction:n})}disable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!1},{userAction:n}),this.hooks.emit("disable",{userAction:n})}dispose(){var e,n,o,s,r,a;this.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.clearCache(),this.hooks.emit("dispose")}setState(e,n){if(this.store.disposed)return this.disposedErrorLog();const{userAction:o=!0,visibleWithAnimation:s=!1}=n,r=F({},this.state);this.state=Object.assign(this.state,e),this.store.visibleWithAnimation=s,r.visible!==this.state.visible&&(e.visible?this.handleShow():this.handleHide()),r.enabled!==this.state.enabled&&(e.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:r,userAction:o})}changeUnfoldedById(e,n){var r;const o=this.getTagById(e);if(!o)return;o.state.unfolded=n;const s=this.filterPointTag();(r=this.TagContainerSvelte)==null||r.$set({tags:s})}changeTagNormalById(e,n){const o=this.getTagById(e);!o||!o.tag3DContentSvelte||(o.tag3DContentSvelte.currentNormal=at(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=St.default({},s.data,n):s.data=F(F({},s.data),n),this.checkPanelTag(),this.updateRenderAllTags())}changeStickTypeById(e,n,o=!0){this.changeTagById(e,n,o)}changeTagById(e,n,o=!0){const s=this.getTagById(e);!n||(o?St.default(s,n):Object.assign(s,n),(s==null?void 0:s.tag3DContentSvelte)&&(n==null?void 0:n.normal)&&(s.tag3DContentSvelte.currentNormal=at(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})}setVisibleAndUnfolded(){return Y(this,arguments,function*({withAnimation:e}={withAnimation:!1}){if(!!this.isPanorama)return this.setVisibleByPanoIndex(),e?new Promise((n,o)=>{setTimeout(()=>{this.setUnfoldedByPanoIndex(),n()},10)}):(this.setUnfoldedByPanoIndex(),Promise.resolve())})}handleShow(){this.state.visible=!0,this.updateTagContainerVisible()}handleHide(){this.pauseCurrentMedia(),this.state.visible=!1,this.updateTagContainerVisible()}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.updateRenderAllTags()}handleDisable(){var e,n,o;this.pauseCurrentMedia(),this.state.enabled=!1,(n=(e=this.store).eventListenerDisposer)==null||n.call(e),(o=this.TagContainerSvelte)==null||o.$set({tags:[]}),this.filter3DTag().forEach(s=>{var r;(r=s.tag3DContentSvelte)==null||r.svelteApp.$destroy(),s.tag3DContentSvelte=void 0})}addEventListener(){const{five:e,hooks:n}=this,o=this.handleFiveWantsMoveToPano.bind(this),s=this.handleFiveModeChange.bind(this),r=this.handleFiveCameraUpdate.bind(this),a=this.handleFiveCameraUpdateDebounce(),l=this.handleFivePanoArrived.bind(this),c=this.loadVideoFirstFrame.bind(this),u=this.clickhandler.bind(this);return this.five.currentMode&&(this.isPanorama?(this.handleFivePanoArrived(),this.temporaryShow({withAnimation:!0})):this.temporaryHide()),e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),e.on("panoArrived",c),n.on("click",u),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),e.off("panoArrived",c),n.off("click",u),this.store.eventListenerDisposer=void 0}}loadVideoFirstFrame(){this.isIOSWX&&this.hooks.emit("loadVideoFirstFrame")}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(!this.store.disposed)return;const e=this.five.getElement(),n=()=>{!this.state.enabled||(this.show(),this.updateRenderAllTags())},o=()=>{!this.state.enabled||this.hide()},{observe:s,unobserve:r}=_s(op(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=_s(Ws(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){e==="Panorama"?this.five.once("panoArrived",()=>this.temporaryShow({withAnimation:!0})):this.temporaryHide()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&(n.visibleConfig.keep?e.temporaryState=he(F({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=he(F({},e.temporaryState),{visible:Boolean(n.visibleConfig.alwaysShowWhenMovePano)}))}),this.updateTagContainerVisible()}temporaryShow({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!0,this.updateTagContainerVisible()}temporaryHide({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!1,this.updateTagContainerVisible()}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.can("fold",e.tag),o=this.can("unfold",e.tag);n&&o&&(e.tag.state.unfolded=!e.tag.state.unfolded,e.tag.state.unfolded&&this.tags.forEach(s=>{s.id!==e.tag.id&&s.state&&this.can("fold",s)&&(s.state.unfolded=!1)}),this.updateRenderAllTags())}updateRenderAllTags(){this.updateRenderPointTag(),this.updateRenderPlaneTag()}updateTagContainerVisible(){var e;(e=this.TagContainerSvelte)==null||e.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation}),this.filter3DTag().forEach(n=>{var o;(o=n.tag3DContentSvelte)==null||o.svelteApp.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation})})}handleFiveCameraUpdateDebounce(){return Ws(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return Y(this,null,function*(){yield this.setVisibleAndUnfolded(),this.tags.forEach(e=>{e.temporaryState=he(F({},e.temporaryState),{visible:!0})}),this.store.visibleWithAnimation=!0,this.updateTagContainerVisible()})}setUnfoldedByCamera(){let e=!1;this.tags.forEach(n=>{const o=this.getUnfoldedByCamera(n);!n.state||o!==void 0&&(o===!0&&(e=!0),n.state.unfolded=o)}),e&&this.tags.forEach(n=>{const o=this.getTagConfig(n).unfoldedConfig;typeof o=="object"&&(o.autoUnfold||o.keep)||n.state&&(n.state.unfolded=!1)})}updateRenderPointTag(){var n;const e=this.sort(this.filterPointTag());if(this.setPointTagPosition(),this.TagContainerSvelte)this.TagContainerSvelte.$set({tags:e,state:this.state,temporaryState:this.temporaryState});else{const o=(n=this.five.getElement())==null?void 0:n.parentElement;if(!o)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new vA({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore}})}}updateRenderPlaneTag(){this.sort([...this.filterPlaneTag(),...this.filter3DPointTag()]).forEach(n=>{var o;if(n.tag3DContentSvelte){const{svelteApp:s,domContainer:r,initialNormal:a,currentNormal:l}=n.tag3DContentSvelte;if(s.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!a.equals(l)){const c=new H.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=$t(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:ip(this.five.camera.position,at(n.position),at(n.normal)),r=n.stickType==="Plane"?$a(n.position):at(n.normal),a=this.getTagConfig(n).tag3DConfig,l=this.css3DRenderPlugin.create3DDomContainer(s,a);if(!l)return;this.store.css3DRenderDisposer.set(n.id,l.dispose),n.tag3DContentSvelte={svelteApp:new fl({target:l.container,props:{tag:n,hooks:this.hooks,state:this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}}),domContainer:l,initialNormal:r,currentNormal:r}}}),this.checkPanelTag()}disposeAllCSS3DContainer(){for(const[e,n]of this.store.css3DRenderDisposer)n==null||n();this.store.css3DRenderDisposer=new Map}checkPanelTag(){this.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))}}}var pl=(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.Custom="Custom",i))(pl||{}),gl=(i=>(i.Two="2D",i.Three="3D",i))(gl||{}),Al=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(Al||{});const xA=(i,t)=>new ml(i,t);class mo extends H.Object3D{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()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}updatePosition(){this.position.copy(this.originObject3D.position)}updateQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,n){this.scale.applyMatrix4(e)}applyHelperQuaternion(e,n){this.applyQuaternion(e)}}class DA extends mo{}class LA extends mo{}class SA extends mo{}class TA extends SA{}class zA extends x.Group{constructor(e){super();m(this,"direction");this.direction=e||"x"}}class Ur extends x.Mesh{constructor(e,n,o){super(e,n);m(this,"direction");this.direction=o||"x"}}function MA(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new x.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function po(i,t,e){if(!t||!e||!i)return;const n=MA(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new x.Raycaster;return o.setFromCamera(n,i),o}function BA(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 ki extends zA{constructor(e){var u;super(e.direction);m(this,"line");m(this,"arrow");m(this,"lineHeight",.4);m(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new x.Color((u=e.color)!=null?u:16214315),o=new x.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:x.DoubleSide}),s=new x.ConeGeometry(.04,.1,32),r=new Ur(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new x.CylinderGeometry(a,a,.4,32),c=new Ur(l,o.clone(),e.direction);c.name=`line-${e.direction}`,this.line=c,this.formatArrow(),this.formatLine(),this.add(this.arrow,this.line)}formatArrow(){this.arrow.geometry.translate(0,this.lineHeight+this.arrowHeight/2,0),this.direction==="x"?(this.arrow.geometry.rotateX(Math.PI/2),this.arrow.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.arrow.geometry.rotateX(Math.PI/2)}formatLine(){this.line.geometry.translate(0,this.lineHeight/2,0),this.direction==="x"?(this.line.geometry.rotateX(Math.PI/2),this.line.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.line.geometry.rotateX(Math.PI/2)}}const xi={X:15618642,Y:4765519,Z:4227839};class rt{static get X(){return new x.Color(xi.X).convertSRGBToLinear().clone()}static get Y(){return new x.Color(xi.Y).convertSRGBToLinear().clone()}static get Z(){return new x.Color(xi.Z).convertSRGBToLinear().clone()}}class VA extends DA{constructor(e){super(e);m(this,"xArrow",new ki({direction:"x",color:rt.X}));m(this,"yArrow",new ki({direction:"y",color:rt.Y}));m(this,"zArrow",new ki({direction:"z",color:rt.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 Bt(i,t){return jA(document.createElement(t!=null?t:"div"),i)}function jA(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function QA(i){const t=Bt(F({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"9999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},i)),e=()=>{t.style.display!=="block"&&(!t.style.top||!t.style.left||(t.style.display="block"))};return{element:t,show:e,hide:()=>{t.style.display="none",t.style.top="",t.style.left=""},setLeftTop:(s,r)=>{t.style.left=s,t.style.top=r,e()}}}class RA extends LA{constructor(e,n){var o;super(e);m(this,"yzCircle",new Di({direction:"x",color:rt.X}));m(this,"xzCircle",new Di({direction:"y",color:rt.Y}));m(this,"xyCircle",new Di({direction:"z",color:rt.Z}));m(this,"xRingHelper",new Li({direction:"x"}));m(this,"yRingHelper",new Li({direction:"y"}));m(this,"zRingHelper",new Li({direction:"z"}));m(this,"xAngleHelper",new Si({direction:"x",color:rt.X}));m(this,"yAngleHelper",new Si({direction:"y",color:rt.Y}));m(this,"zAngleHelper",new Si({direction:"z",color:rt.Z}));m(this,"angleTips");m(this,"container");n&&(this.container=n==null?void 0:n.container,this.angleTips=QA({display:"none"}),(o=this.container)==null||o.appendChild(this.angleTips.element)),this.show()}updateAngleHelperQuaternion(){this.xAngleHelper.quaternion.copy(this.yzCircle.quaternion),this.yAngleHelper.quaternion.copy(this.xzCircle.quaternion),this.zAngleHelper.quaternion.copy(this.xyCircle.quaternion),this.xRingHelper.quaternion.copy(this.yzCircle.quaternion),this.yRingHelper.quaternion.copy(this.xzCircle.quaternion),this.zRingHelper.quaternion.copy(this.xyCircle.quaternion)}applyHelperQuaternion(e,n){this.yzCircle.applyQuaternion(e),this.xzCircle.applyQuaternion(e),this.xyCircle.applyQuaternion(e),this.xAngleHelper.baseAxes.applyQuaternion(e),this.yAngleHelper.baseAxes.applyQuaternion(e),this.zAngleHelper.baseAxes.applyQuaternion(e)}hide(){this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper)}show(){var e;this.add(this.xyCircle,this.xzCircle,this.yzCircle),this.remove(this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)==null||e.hide()}showDraggingHelper(e){var n;this.hide(),this.add(...this.filterRingHelper(e)),this.add(...this.filterAngleHelper(e)),(n=this.angleTips)==null||n.show()}dispose(){var e,n;this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)!=null&&e.element&&((n=this.container)==null||n.removeChild(this.angleTips.element))}filterRingHelper(e){return[this.xRingHelper,this.yRingHelper,this.zRingHelper].filter(n=>e.includes(n.direction))}filterAngleHelper(e){return[this.xAngleHelper,this.yAngleHelper,this.zAngleHelper].filter(n=>e.includes(n.direction))}}class Di extends x.Mesh{constructor(e){var n;super();m(this,"direction");m(this,"gapAngle",.02);m(this,"geometry",new x.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new x.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:x.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 Li extends x.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 x.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new x.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:x.DoubleSide}),c=new x.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 Si extends x.Mesh{constructor(e){var o;super();m(this,"direction");m(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new x.Vector3(0,0,1);break;case"y":this.baseAxes=new x.Vector3(1,0,0);break;case"z":this.baseAxes=new x.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new x.CircleGeometry(n,48,0,1e-4),this.material=new x.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:x.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function OA(){const i=Bt({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Bt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Bt({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:mt({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:mt({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:mt({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:mt({cursor:"ew-resize",right:n})},l={direction:"nesw",element:mt({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:mt({cursor:"ns-resize",top:n})},u={direction:"nwse",element:mt({cursor:"nwse-resize",left:n,top:n})},d={direction:"ew",element:mt({cursor:"ew-resize",left:n})};return new Array(s,a,c,d,o,r,l,u).forEach(h=>t.appendChild(h.element)),{container:i,squares:[o,s,r,a,l,c,u,d]}}function mt(i){const t=Bt(F({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=Bt({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=Bt({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 HA extends TA{constructor(e,n,o,s){super(e);m(this,"points",[]);m(this,"cornerPositions",[]);m(this,"css3DInstance");m(this,"plane");m(this,"css3DRenderer",new Jt);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 x.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new x.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 x.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}=OA();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)]}}new x.Vector3;function pe(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new x.Raycaster,this._selected=null,this._boundObjs={};var e=this;this._$onClick=function(){e._onClick.apply(e,arguments)},this._$onDblClick=function(){e._onDblClick.apply(e,arguments)},this._$onMouseMove=function(){e._onMouseMove.apply(e,arguments)},this._$onMouseDown=function(){e._onMouseDown.apply(e,arguments)},this._$onMouseUp=function(){e._onMouseUp.apply(e,arguments)},this._$onTouchMove=function(){e._onTouchMove.apply(e,arguments)},this._$onTouchStart=function(){e._onTouchStart.apply(e,arguments)},this._$onTouchEnd=function(){e._onTouchEnd.apply(e,arguments)},this._$onContextmenu=function(){e._onContextmenu.apply(e,arguments)},this._domElement.addEventListener("click",this._$onClick,!1),this._domElement.addEventListener("dblclick",this._$onDblClick,!1),this._domElement.addEventListener("mousemove",this._$onMouseMove,!1),this._domElement.addEventListener("mousedown",this._$onMouseDown,!1),this._domElement.addEventListener("mouseup",this._$onMouseUp,!1),this._domElement.addEventListener("touchmove",this._$onTouchMove,!1),this._domElement.addEventListener("touchstart",this._$onTouchStart,!1),this._domElement.addEventListener("touchend",this._$onTouchEnd,!1),this._domElement.addEventListener("contextmenu",this._$onContextmenu,!1)}pe.prototype.destroy=function(){this._domElement.removeEventListener("click",this._$onClick,!1),this._domElement.removeEventListener("dblclick",this._$onDblClick,!1),this._domElement.removeEventListener("mousemove",this._$onMouseMove,!1),this._domElement.removeEventListener("mousedown",this._$onMouseDown,!1),this._domElement.removeEventListener("mouseup",this._$onMouseUp,!1),this._domElement.removeEventListener("touchmove",this._$onTouchMove,!1),this._domElement.removeEventListener("touchstart",this._$onTouchStart,!1),this._domElement.removeEventListener("touchend",this._$onTouchEnd,!1),this._domElement.removeEventListener("contextmenu",this._$onContextmenu,!1)};pe.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"];pe.prototype._getRelativeMouseXY=function(i){var t=i.target||i.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},n=t,o=getComputedStyle(n,null);e.y+=parseInt(o.getPropertyValue("padding-top"),10),e.x+=parseInt(o.getPropertyValue("padding-left"),10);do e.x+=n.offsetLeft,e.y+=n.offsetTop,o=getComputedStyle(n,null),e.x+=parseInt(o.getPropertyValue("border-left-width"),10),e.y+=parseInt(o.getPropertyValue("border-top-width"),10);while(n=n.offsetParent);var s={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((i.pageX-e.x)/s.width)*2-1,y:-((i.pageY-e.y)/s.height)*2+1}};pe.prototype._objectCtxInit=function(i){i._3xDomEvent={}};pe.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent};pe.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent};pe.prototype._objectCtxGet=function(i){return i._3xDomEvent};pe.prototype.camera=function(i){return i&&(this._camera=i),this._camera};pe.prototype.bind=function(i,t,e,n){console.assert(pe.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]),o[t+"Handlers"].push({callback:e,useCapture:n}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(i)};pe.prototype.addEventListener=pe.prototype.bind;pe.prototype.unbind=function(i,t,e,n){console.assert(pe.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]);for(var s=o[t+"Handlers"],r=0;r<s.length;r++){var a=s[r];if(e==a.callback&&n==a.useCapture){s.splice(r,1);break}}var l=this._boundObjs[t].indexOf(i);console.assert(l!==-1),this._boundObjs[t].splice(l,1)};pe.prototype.removeEventListener=pe.prototype.unbind;pe.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1};pe.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new x.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o),a=this._selected;if(r.length>0){var l,c,u,d=r[0],f=d.object;this._selected=f,u=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;u&&this._notify("mousemove",f,n,d),l&&this._notify("mouseover",f,n,d),c&&this._notify("mouseout",a,n,d)}};pe.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new x.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o,!0);if(r.length!==0){for(var a=r[0],l=a.object,c=this._objectCtxGet(l),u=l.parent;typeof c=="undefined"&&u;)c=this._objectCtxGet(u),u=u.parent;!c||this._notify(i,l,n,a)}}};pe.prototype._notify=function(i,t,e,n){var o=this._objectCtxGet(t),s=o?o[i+"Handlers"]:null;if(console.assert(arguments.length===4),!o||!s||s.length===0){t.parent&&this._notify(i,t.parent,e,n);return}for(var s=o[i+"Handlers"],r=0;r<s.length;r++){var a=s[r],l=!0;a.callback({type:i,target:t,origDomEvent:e,intersect:n,stopPropagation:function(){l=!1}}),!!l&&a.useCapture===!1&&t.parent&&this._notify(i,t.parent,e,n)}};pe.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)};pe.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)};pe.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)};pe.prototype._onMouseMove=function(i){var t=this._getRelativeMouseXY(i);this._onMove("mousemove",t.x,t.y,i),this._onMove("mouseover",t.x,t.y,i),this._onMove("mouseout",t.x,t.y,i)};pe.prototype._onClick=function(i){this._onMouseEvent("click",i)};pe.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)};pe.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)};pe.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)};pe.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)};pe.prototype._onTouchMove=function(i){if(i.touches.length==1){i.preventDefault();var t=Number(i.touches[0].pageX/window.innerWidth)*2-1,e=-(i.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,i),this._onMove("mouseover",t,e,i),this._onMove("mouseout",t,e,i)}};pe.prototype._onTouchEvent=function(i,t){if(t.touches.length==1){t.preventDefault();var e=Number(t.touches[0].pageX/window.innerWidth)*2-1,n=-(t.touches[0].pageY/window.innerHeight)*2+1;this._onEvent(i,e,n,t)}};let Lt=null;class go{constructor(t,e,n,o,s,r,a){m(this,"hooks",new Kt);m(this,"helperObject3D");m(this,"originObject3D");m(this,"camera");m(this,"model");m(this,"scene");m(this,"container");m(this,"domEvents");m(this,"isDragging",!1);m(this,"onRender");m(this,"enabled",!1);m(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});this.camera=t,this.model=e,this.originObject3D=n,this.helperObject3D=o,this.container=s,this.scene=r,this.domEvents=new pe(t,s),this.onRender=a!=null?a:()=>{},this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable()}initialHelperPosition(){this.helperObject3D.updatePosition()}initialHelperQuaternion(){this.helperObject3D.updateQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.render())}disable(){!this.enabled||(this.enabled=!1,this.scene.remove(this.helperObject3D),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){this.helperObject3D.dispose(),this.scene.remove(this.helperObject3D),this.render()}setOpacity(t){this.setOriginOpacityProperty();const e=this.originObject3D;if(e instanceof x.Mesh&&(e.material.opacity=t),e.isCSS3DObjectPlus){const n=e;n.container.style.opacity=t.toString()}this.render()}restoreOpacity(){if(Lt===null)return;const t=this.originObject3D;if(t instanceof x.Mesh&&(t.material.opacity=Lt.opacity),t.isCSS3DObjectPlus){const e=t;e.container.style.opacity=Lt.opacity.toString()}this.render()}setOriginOpacityProperty(){var t,e;if(Lt===null){const n=this.originObject3D;n instanceof x.Mesh&&(Lt={opacity:n.material.opacity}),n instanceof na&&(Lt={opacity:(t=n.container.style.opacity)!=null?t:1}),n.isCSS3DObjectPlus&&(Lt={opacity:Number((e=n.container.style.opacity)!=null?e:1)})}}updateHelperPosition(){this.helperObject3D.updatePosition()}updateHelperQuaternion(){this.helperObject3D.updateQuaternion()}applyHelperMatrix4(t){this.helperObject3D.applyMatrix4(t)}applyHelperQuaternion(t,e){this.helperObject3D.applyHelperQuaternion(t,e)}applyHelperScaleMatrix4(t,e){this.helperObject3D.applyHelperScaleMatrix4(t,e)}onWantsGesture(t,e,n){if(this.isDragging)return!1}render(){this.onRender()}hoverListener(t,e=16777215,n=1){const o=(Array.isArray(t)?t:[t]).filter(Ue),s=[];for(const r of o)if(r instanceof x.Mesh||r instanceof x.Group){const a=r instanceof x.Group?r.children.filter(f=>f instanceof x.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()},u=()=>{this.isDragging||l()},d=()=>{this.isDragging||c()};for(const f of a)this.domEvents.addEventListener(f,"mouseover",u),this.domEvents.addEventListener(f,"mouseout",d),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),s.push(()=>{this.domEvents.removeEventListener(f,"mouseover",u),this.domEvents.removeEventListener(f,"mouseout",d),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c)})}return()=>s.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,n=this.helperObject3D;if(!n)return;let o;const s=t.intersectObject(n,!0)[0];if(!!s&&(o=s,o.object=n,!!o)){if(this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<o.point.distanceTo(e))return}return o.object}}}class FA extends go{constructor(...e){super(...e);m(this,"startInfo");const n=this.helperObject3D;this.hoverListener([n.xArrow,n.yArrow,n.zArrow]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();const s=new x.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new x.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new x.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(o){case"x":return s;case"y":return r;case"z":return a}})(),c=(()=>{switch(o){case"x":case"y":return a;case"z":return s}})(),u=n.point.clone(),d=new x.Plane;d.setFromNormalAndCoplanarPoint(c,u),this.startInfo={startVectorProject:u.clone().projectOnVector(l),directionVector:l,plane:d},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=po(this.camera,e,this.container);return n?(console.log("%c RotateController dragging","color: #49de1b"),this.move(n),!1):this.dragEnd()}move(e){if(!this.startInfo)return this.dragEnd();const{plane:n,directionVector:o,startVectorProject:s}=this.startInfo,r=this.originObject3D,a=e.ray.intersectPlane(n,new x.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),u=new x.Matrix4;u.setPosition(c),r.applyMatrix4(u),this.helperObject3D.applyMatrix4(u),s.copy(l),this.hooks.emit("positionUpdate",{matrix4:u})}dragEnd(){!this.isDragging||(console.log("%c MoveController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class Ti{constructor(t,e,n,o){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});const{camera:s,model:r,scene:a}=t,l=t.getElement();if(this.five=t,!s||!r||!l||!a)return;const c=()=>{t.needsRender=!0};this.helperController=new e(s,r,n,o,l,a,c),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture)}}const GA="v1.0.1",NA="Object3DHelper",Ao=`${NA}@${GA}`,WA=()=>{console.error(`${Ao} is disposed`)},_A=()=>{console.warn(`${Ao} is disabled`)},XA=()=>{console.error(`${Ao} is disabled`)};class YA{constructor(t,e){m(this,"controllers",{});m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"hooks",new Kt);m(this,"helpers");m(this,"eventListener",{});m(this,"handlePositionUpdate",(t,...e)=>{var s,r,a,l;const[n]=e,o=n==null?void 0:n.matrix4;o&&(t!==this.controllers.moveController&&((s=this.controllers.moveController)==null||s.applyHelperMatrix4(o)),t!==this.controllers.rotateController&&((r=this.controllers.rotateController)==null||r.applyHelperMatrix4(o)),t!==this.controllers.scaleController&&((a=this.controllers.scaleController)==null||a.applyHelperMatrix4(o)),(l=this.helpers.outlineHelper)==null||l.applyMatrix4(o))});m(this,"handleScaleUpdate",(t,...e)=>{var s,r;const[n]=e,o=n==null?void 0:n.matrix4;o&&((s=this.controllers.scaleController)==null||s.applyHelperScaleMatrix4(o,n),(r=this.helpers.outlineHelper)==null||r.scale.applyMatrix4(o))});m(this,"handleRotateUpdate",(t,...e)=>{var o,s,r,a;const[n]=e;if(n){const{quaternion:l,origin:c}=n;l&&(t!==this.controllers.moveController&&((o=this.controllers.moveController)==null||o.applyHelperQuaternion(l,c)),t!==this.controllers.rotateController&&((s=this.controllers.rotateController)==null||s.applyHelperQuaternion(l,c)),t!==this.controllers.scaleController&&((r=this.controllers.scaleController)==null||r.applyHelperQuaternion(l,c)),(a=this.helpers.outlineHelper)==null||a.applyQuaternion(l))}});t&&this.addControllers(t),this.helpers=e!=null?e:{},this.setState(this.state)}show(t){return Y(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return Y(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 WA();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return XA();const n=F({},this.state);this.state=F(F({},this.state),t),t.disposed!==void 0&&t.disposed!==n.disposed&&t.disposed&&this.handleDispose(),t.visible!==void 0&&this.handleVisible(t.visible),t.enabled!==void 0&&this.handleEnable(t.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:n})}addControllers(t){this.controllers=F(F({},this.controllers),t),this.addEventListener(),this.setState(this.state)}addHelpers(t){this.helpers=F(F({},this.helpers),t)}getCurrentState(){return this.state}addEventListener(){for(const t in this.controllers){if(!t)continue;const e=t;this.eventListener[e]||(this.eventListener[e]=(()=>{const n=this.controllers[e];if(!n)return;const o=()=>this.handleStart(n),s=()=>this.handleEnd(n),r=(...c)=>this.handlePositionUpdate(n,...c),a=(...c)=>this.handleRotateUpdate(n,...c),l=(...c)=>this.handleScaleUpdate(n,...c);return n.hooks.on("moveStart",o),n.hooks.on("rotateStart",o),n.hooks.on("scaleStart",o),n.hooks.on("positionUpdate",r),n.hooks.on("rotateUpdate",a),n.hooks.on("scaleUpdate",l),n.hooks.on("moveEnd",s),n.hooks.on("rotateEnd",s),n.hooks.on("scaleEnd",s),()=>{n.hooks.off("moveStart",o),n.hooks.off("rotateStart",o),n.hooks.off("scaleStart",o),n.hooks.off("positionUpdate",r),n.hooks.off("rotateUpdate",a),n.hooks.off("scaleUpdate",l),n.hooks.off("moveEnd",s),n.hooks.off("rotateEnd",s),n.hooks.off("scaleEnd",s)}})())}}handleEnd(t){t&&this.setOtherHelpersVisible(!0,t)}handleStart(t){t&&this.setOtherHelpersVisible(!1,t)}setOtherHelpersVisible(t,e){var n,o,s,r;t?((s=this.controllers.moveController)==null||s.helperObject3D.show(),(r=this.controllers.rotateController)==null||r.helperObject3D.show()):(e!==this.controllers.moveController&&((n=this.controllers.moveController)==null||n.helperObject3D.hide()),e!==this.controllers.rotateController&&((o=this.controllers.rotateController)==null||o.helperObject3D.hide()))}handleEnable(t,e=!0){t?(this.everyControllerDo(n=>{n.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(n=>{n.disable(),n.restoreOpacity()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(n=>{n.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(n=>{n.hide(),n.restoreOpacity()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:e}))),this.state.visible=t}everyControllerDo(t){Object.values(this.controllers).forEach(e=>{e&&t(e)})}handleDispose(){var t,e;Object.values(this.controllers).forEach(n=>{n==null||n.dispose(),n==null||n.restoreOpacity()});for(const n in this.controllers){if(!n)continue;const o=n;(e=(t=this.eventListener)[o])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&_A()}}class UA extends go{constructor(...e){super(...e);m(this,"startInfo");m(this,"lastRotation");m(this,"rotations",[]);m(this,"helperObject3DQuaternion",this.originObject3D.quaternion.clone());const n=this.helperObject3D;this.hoverListener([n.xyCircle,n.xzCircle,n.yzCircle]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}initialHelperQuaternion(){this.helperObject3D.updateAngleHelperQuaternion(),this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();this.helperObject3D.updateAngleHelperQuaternion();const s=n.point,r=this.originObject3D.position.clone(),a=this.getAngleHelper(o);this.setTipsAngle(0);const l=s.clone();l.y+=.2,this.setTipsPosition(l);const c=new x.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),u=new x.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),d=new x.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),f=(()=>{switch(o){case"x":return c;case"y":return u;case"z":return d}})(),h=new x.Plane().setFromNormalAndCoplanarPoint(f,s),p=new x.Vector3;h.projectPoint(s.clone(),p);const g=p.clone().sub(r),A=g.clone(),v=g.angleTo(a.baseAxes);this.setAngleHelperStart(o,v),this.setAngleHelperLength(o,0),this.rotations.push({vector:g.clone(),direction:!0}),this.startInfo={direction:o,startVector:g,staticStartVector:A,plane:h,angleHelper:a},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("rotateStart"),this.isDragging=!0,console.log(`%c RotateController dragStart ${o}`,"color: #e5af2e")}dragging(e){var o;if(!this.isDragging)return;const n=po(this.camera,e,this.container);return n?(console.log(`%c RotateController dragging ${(o=this.startInfo)==null?void 0:o.direction}`,"color: #49de1b"),this.rotate(n),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:n,plane:o,angleHelper:s,staticStartVector:r,direction:a}=this.startInfo,l=this.originObject3D,c=e.ray.intersectPlane(o,new x.Vector3);if(!c)return;const u=l.position.clone(),d=new x.Vector3;o.projectPoint(c.clone(),d);const f=d.clone().sub(u);if(n.angleTo(f)===0||(this.lastRotation===void 0&&(this.lastRotation={angle:0}),this.rotations.length===0))return;const h=(()=>{if(this.rotations.length===1)return f.angleTo(s.baseAxes)>r.angleTo(s.baseAxes);{const g=this.rotations[this.rotations.length-1],A=this.rotations[this.rotations.length-2],v=f.angleTo(A.vector),w=f.angleTo(g.vector),y=g.vector.angleTo(A.vector);if(y===0||w===0||v===0)return;if(v>w&&v>y)return g.direction;if(v<y&&w<y||v<w&&w>y)return!g.direction}})();if(h===void 0)return console.warn("rotationDirection is undefined");this.rotations.push({vector:f,direction:h}),this.rotations=this.rotations.slice(-2),this.lastRotation.angle=this.lastRotation.angle+f.angleTo(n)*(h?1:-1),this.setAngleHelperLength(a,this.lastRotation.angle),this.setTipsAngle(this.lastRotation.angle/Math.PI*180);const p=new x.Quaternion().setFromUnitVectors(n.clone().normalize(),f.clone().normalize());l.applyQuaternion(p),this.helperObject3D.applyHelperQuaternion(p),this.helperObject3DQuaternion.premultiply(p),this.hooks.emit("rotateUpdate",{quaternion:p,origin:u}),this.startInfo.startVector=f}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 x.Mesh&&o.geometry instanceof x.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new x.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 x.Mesh&&r.geometry instanceof x.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new x.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 JA extends go{constructor(...e){super(...e);m(this,"startInfo")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}getDragPlane(){const e=new x.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new H.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=po(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n),console.log("%c RectangleScaleController dragging","color: #49de1b")}scale(e){var V,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 H.Vector3);if(!a||BA(a,this.camera.position))return;const l=new H.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:u}=o,d=new H.Vector3().subVectors(r[1],r[0]),f=new H.Vector3().subVectors(r[3],r[0]),h=G=>{const X=new H.Vector3(0,0,0);if(!this.startInfo)return X;const j=(G==="ew"?d:f).clone(),E=c.clone().projectOnVector(j),R=a.clone().projectOnVector(j),O=l.clone().projectOnVector(j);if(R.equals(E))return X;if(G==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const _=new H.Vector3().subVectors(R,O),Z=_.x<0&&j.x>=0,ue=_.y<0&&j.y>=0,de=_.z<0&&j.z>=0;this.startInfo.dragPointInCenterBottom=Z||ue||de}if(G==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const _=new H.Vector3().subVectors(R,O),Z=_.x<0&&j.x>=0,ue=_.y<0&&j.y>=0,de=_.z<0&&j.z>=0;this.startInfo.dragPointInCenterLeft=Z||ue||de}const N=new H.Vector3().subVectors(R,E),J=N.length();return J>.3?(console.warn("offset.length() > 0.3, skipped",J),X):N},p=h("ew"),g=h("ns"),A=()=>{const G=p;this.helperObject3D.cornerPositions.forEach((X,j)=>{var E;(E=this.startInfo)!=null&&E.dragPointInCenterLeft?(j===0||j===3)&&X.add(G):(j===1||j===2)&&X.add(G)})},v=()=>{const G=g;this.helperObject3D.cornerPositions.forEach((X,j)=>{var E;(E=this.startInfo)!=null&&E.dragPointInCenterBottom?(j===0||j===1)&&X.add(G):(j===2||j===3)&&X.add(G)})};switch(u){case"ew":A();break;case"ns":v();break;case"nesw":case"nwse":A(),v()}const w=new H.Vector3().subVectors(r[1],r[0]).length()/d.length(),y=new H.Vector3().subVectors(r[3],r[0]).length()/f.length(),I=new H.Vector3(w,y,1),P=new x.Matrix4().scale(I);n.isCSS3DObjectPlus?n.applyScaleMatrix4(P):n.scale.applyMatrix4(P),o.position.copy(a);const C=new H.Vector3().addVectors(r[0],r[2]).divideScalar(2),L=new H.Vector3().subVectors(C,l),D=new x.Matrix4().setPosition(L);n.applyMatrix4(D),(V=this.helperObject3D.css3DInstance)==null||V.css3DObject.applyMatrix4(D),(W=this.helperObject3D.plane)==null||W.applyMatrix4(D),this.hooks.emit("scaleUpdate",{matrix4:P,helperOrigin:l}),this.hooks.emit("positionUpdate",{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 ZA extends JA{constructor(...t){super(...t),this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(t=>{if(!t)return;const e=t.point,n=r=>this.dragStart(r,t),o=this.dragging.bind(this),s=this.dragEnd.bind(this);e.addEventListener("dragstart",n),e.addEventListener("drag",o),e.addEventListener("dragend",s)})}}const vo="v1.0.0",Yi="Object3DHelperPlugin",fi=`${Yi}@${vo}`,qA=()=>{console.error(`${fi} is disposed`)},KA=()=>{console.warn(`${fi} is disabled`)},$A=()=>{console.error(`${fi} is disabled`)};class vl extends ai{constructor(e){super(e);m(this,"version",vo);m(this,"name",Yi);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 Jt(this.five.scene),console.warn("Object3DHelper: \u4F7F\u7528\u6B64\u63D2\u4EF6\u9700\u8981\u5728\u521D\u59CB\u5316five\u65F6\uFF0C\u8BBE\u7F6Efive\u53C2\u6570: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${Yi.toUpperCase()}_DEBUG__`]:this})}show(e){return Y(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Y(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 qA();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return $A();const o=F({},this.state);this.state=F(F({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:o})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,n={}){var u;if(!e)return console.error("Object3D is undefined");if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const o=new YA;this.objectHelperMap.set(e,o);const s=(u=this.five.getElement())==null?void 0:u.parentElement,r=this.five.camera,{moveHelper:a=!0,rotateHelper:l=!0,scaleHelper:c=!0}=n;if(a){const d=new VA(e),f=new Ti(this.five,FA,e,d);o.addControllers({moveController:f.helperController})}if(l){let d;s&&r&&(d={container:s});const f=new RA(e,d),h=new Ti(this.five,UA,e,f);o.addControllers({rotateController:h.helperController})}if(c&&s){const d=new HA(e,s,r,this.five.scene),f=new Ti(this.five,ZA,e,d);o.addControllers({scaleController:f.helperController})}e.isCSS3DObjectPlus&&oa(this.five).then(()=>{var d,f;if(e.isCSS3DObjectPlus){const h=e,p=(d=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?d:sa(this.five);p&&e&&(this.css3DObjectParentMap.set(h,h.parent),h.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(p),(f=this.css3DRender.getBehindCSS3DObjectGroup())==null||f.add(h),this.css3DRender.render(this.five.camera))}})}removeObject3DHelper(e){const n=this.objectHelperMap.get(e);if(!!n){if(e.isCSS3DObjectPlus){const o=e,s=this.css3DObjectParentMap.get(o);s==null||s.add(o),this.css3DRender.render(this.five.camera)}this.objectHelperMap.delete(e),n.dispose()}}handleEnable(e,n=!0){e?(this.everyHelperDo(o=>o.enable()),this.hooks.emit("enable",{userAction:n})):(this.everyHelperDo(o=>o.disable()),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){e?(this.everyHelperDo(o=>o.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.everyHelperDo(o=>o.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}handleDispose(){this.everyHelperDo(e=>e.dispose())}everyHelperDo(e){this.objectHelperMap.forEach(n=>{n&&e(n)})}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&KA()}}const ev=i=>new vl(i);exports.CSS3DRender=Jt;exports.CSS3DRenderPlugin=$t;exports.CameraMovementEffect=Ta;exports.CameraMovementPlugin=uf;exports.ContentType=pl;exports.CruisePlugin=Um;exports.CruisePluginController=uo;exports.DIRECTION=Yt;exports.DISPLAY_STRATEGY_TYPE=Tt;exports.DimensionType=gl;exports.FLOOR_PLAN_ATTACHED_TO=At;exports.FLOOR_TYPE_MAP=qd;exports.GuideLinePlugin=Za;exports.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=zt;exports.ItemLabelPlugin=bm;exports.Magnifier=Va;exports.MapviewFloorplanPlugin=Ld;exports.ModelChassisCompassPlugin=ef;exports.ModelEntryDoorGuidePlugin=of;exports.ModelFloorplanPlugin=Id;exports.ModelItemLabelPlugin=$h;exports.ModelRoomLabelPlugin=Qc;exports.ModelTVVideoPlugin=nm;exports.ModelViewPlugin=_l;exports.Object3DHelperController=vl;exports.Object3DHelperPlugin=ev;exports.PLUGIN=fi;exports.PaintBrush=Wl;exports.PaintBrushTypeEnum=st;exports.PanoCompassPlugin=Tf;exports.PanoCursorRaycasterPlugin=cc;exports.PanoDoorLabelPlugin=zm;exports.PanoFloorplanRadarPlugin=Jd;exports.PanoMeasurePlugin=xh;exports.PanoRulerPlugin=pf;exports.PanoRulerProPlugin=kf;exports.PanoSpatialTagPlugin=Gh;exports.PanoTagPlugin=xA;exports.PanoTagPluginController=ml;exports.PointType=Al;exports.ROOM_FETILE_TYPE_MAP=Zd;exports.ROOM_TYPE_MAP=Kd;exports.Rotation=qe;exports.TopviewFloorplanPlugin=Td;exports.Util=Gg;exports.VERSION=vo;exports.itemLabelPluginServerParams=ym;exports.modelItemLabelPluginServerParams=em;exports.modelRoomLabelPluginServerParams=Rc;exports.pluginFlag=kA;
559
+ `;function Rg(){const i=new x.PlaneGeometry(.4,.4),t=Vg,e=new x.TextureLoader().load(t);e.encoding=x.sRGBEncoding;const n=new x.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new x.Mesh(i,n)}function Og(){const i=new x.CurvePath;i.add(new x.LineCurve3(new x.Vector3(0,0,0),new x.Vector3(0,0,.1)));const t=new x.TubeGeometry(i,8,.003),e=new x.ShaderMaterial({vertexShader:jg,fragmentShader:Qg,depthTest:!1,transparent:!0});return new x.Mesh(t,e)}function Hg(){const i=new x.SphereGeometry(.01,20,20),t=new x.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:x.DoubleSide}),e=new x.Mesh(i,t);return e.position.set(0,0,.1),e}class al extends x.Object3D{constructor(){super();m(this,"planeMesh");m(this,"lineMesh");m(this,"ballMesh");this.planeMesh=Rg(),this.lineMesh=Og(),this.ballMesh=Hg(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new x.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 ll{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=$t(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new x.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(${Wa})`,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 x.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 ao({progress:0}).to({progress:[1,0]}).duration(500).easing(ni.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class Fg{constructor(t,e){m(this,"five");m(this,"hooks",new be.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 x.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new sl(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new al:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new ll(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 Gg=Object.freeze(Object.defineProperty({__proto__:null,Interval:_i,Rectangle:Sg,Magnifier:sl,getCoordsFromClient:zg,getCoordsFromElement:rl,getRaycasterFromFivePointer:Mg,getIntersectFromRelativePosition:Bg,PointHelper:al,PointDomHelper:ll,FivePointSelector:Fg,isNil:Om,notNil:Ue,BetterTween:ao,tweenProgress:Sa,nextFrame:li,requestAnimationFrameInterval:ci,getFrameTime:rf},Symbol.toStringTag,{value:"Module"}));function Ng(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 br(i,t,e){const n=i.slice();return n[0]=t[e],n}function yr(i,t,e){const n=i.slice();return n[0]=t[e],n}function wr(i){let t,e=i[0]+"",n;return{c(){t=B("div"),n=Ce(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){M(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&ke(n,e)},d(o){o&&z(t)}}}function Cr(i){let t,e=i[0]&&wr(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),M(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=wr(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function Er(i){let t,e=i[0]+"",n;return{c(){t=B("div"),n=Ce(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){M(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&ke(n,e)},d(o){o&&z(t)}}}function Pr(i){let t,e=i[0]&&Er(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),M(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Er(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function Ir(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&kr(i);return{c(){t=B("div"),e=B("span"),o=Ce(n),s=$(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){M(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+"")&&ke(o,n),a[2].price.unit?r?r.p(a,l):(r=kr(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&z(t),r&&r.d()}}}function kr(i){let t,e=i[2].price.unit+"",n;return{c(){t=B("span"),n=Ce(e),b(t,"class","unit svelte-8mby9k")},m(o,s){M(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&ke(n,e)},d(o){o&&z(t)}}}function xr(i){let t,e=i[2].highlightText+"",n;return{c(){t=B("div"),n=Ce(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){M(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&ke(n,e)},d(o){o&&z(t)}}}function Wg(i){var X,j;let t,e,n,o,s,r,a,l,c,u,d,f,h,p,g=i[2].title+"",A,v,w,y=Ue((X=i[2].price)==null?void 0:X.value)&&((j=i[2].price)==null?void 0:j.value)!=="",I,P;e=new it({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let C=i[2].brandTags||[],L=[];for(let E=0;E<C.length;E+=1)L[E]=Cr(yr(i,C,E));let D=i[2].tags||[],V=[];for(let E=0;E<D.length;E+=1)V[E]=Pr(br(i,D,E));let W=y&&Ir(i),G=i[2].highlightText&&xr(i);return{c(){var E;t=B("div"),ee(e.$$.fragment),n=$(),o=B("div"),s=$(),r=B("div"),a=B("img"),c=$(),u=B("div");for(let R=0;R<L.length;R+=1)L[R].c();d=$();for(let R=0;R<V.length;R+=1)V[R].c();f=$(),h=B("div"),p=B("div"),A=Ce(g),v=$(),w=B("div"),W&&W.c(),I=$(),G&&G.c(),b(o,"class","line svelte-8mby9k"),T(o,"transition-delay",i[1]?Mn+"ms":Bn+Lr-Dr-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),Ne(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(u,"class","tag svelte-8mby9k"),b(p,"class","text svelte-8mby9k"),b(h,"class","title svelte-8mby9k"),b(w,"class","footer svelte-8mby9k"),T(w,"height",Ue((E=i[2].price)==null?void 0:E.value)&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),T(r,"transition-delay",i[1]?Mn+Bn+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),te(t,"unfolded",i[1]),te(t,"folded",i[3])},m(E,R){M(E,t,R),q(e,t,null),Q(t,n),Q(t,o),Q(t,s),Q(t,r),Q(r,a),Q(r,c),Q(r,u);for(let O=0;O<L.length;O+=1)L[O].m(u,null);Q(u,d);for(let O=0;O<V.length;O+=1)V[O].m(u,null);Q(r,f),Q(r,h),Q(h,p),Q(p,A),Q(r,v),Q(r,w),W&&W.m(w,null),Q(w,I),G&&G.m(w,null),P=!0},p(E,[R]){var N,J,_;const O={};if(R&2&&(O.visible=E[1]),e.$set(O),R&2&&T(o,"transition-delay",E[1]?Mn+"ms":Bn+Lr-Dr-40+"ms"),(!P||R&4&&!Ne(a.src,l=E[2].headerPictureUrl))&&b(a,"src",l),R&4){C=E[2].brandTags||[];let Z;for(Z=0;Z<C.length;Z+=1){const ue=yr(E,C,Z);L[Z]?L[Z].p(ue,R):(L[Z]=Cr(ue),L[Z].c(),L[Z].m(u,d))}for(;Z<L.length;Z+=1)L[Z].d(1);L.length=C.length}if(R&4){D=E[2].tags||[];let Z;for(Z=0;Z<D.length;Z+=1){const ue=br(E,D,Z);V[Z]?V[Z].p(ue,R):(V[Z]=Pr(ue),V[Z].c(),V[Z].m(u,null))}for(;Z<V.length;Z+=1)V[Z].d(1);V.length=D.length}(!P||R&4)&&g!==(g=E[2].title+"")&&ke(A,g),R&4&&(y=Ue((N=E[2].price)==null?void 0:N.value)&&((J=E[2].price)==null?void 0:J.value)!==""),y?W?W.p(E,R):(W=Ir(E),W.c(),W.m(w,I)):W&&(W.d(1),W=null),E[2].highlightText?G?G.p(E,R):(G=xr(E),G.c(),G.m(w,null)):G&&(G.d(1),G=null),R&4&&T(w,"height",Ue((_=E[2].price)==null?void 0:_.value)&&E[2].highlightText?void 0:"1rem"),R&2&&T(r,"transition-delay",E[1]?Mn+Bn+"ms":"0ms"),(!P||R&2)&&te(t,"unfolded",E[1]),(!P||R&8)&&te(t,"folded",E[3])},i(E){P||(k(e.$$.fragment,E),P=!0)},o(E){S(e.$$.fragment,E),P=!1},d(E){E&&z(t),K(e),ct(L,E),ct(V,E),W&&W.d(),G&&G.d()}}}const Mn=400,Dr=500,Bn=180,Lr=500;function _g(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 Xg extends oe{constructor(t){super(),ie(this,t,_g,Wg,ne,{tag:0},Ng)}}const Mt="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/EKEM1KMdVdVKM2rHV4x7HVXZvbVVKN/qq8CiV9VL9jjH/6l6qf7MBCjZmOqsAibjcP+qqqv0oxqpa/NVW286hPo1nz2L/h8+jXt//uSxCmDU2IK/ECN98KKtE5IYzNoCfbw+u9i5r8PoadUMFPKqWL4LK3T/LCraMSHGkW4bpLXR/E6LlHOVQxmslKVJ8IULktMN06N0FKCpHCoYsjC4F+Z0NVqdNFoGSTjSiyjzLdnZ2fNqTi2eHKONONKLMPMKLONKLMPQRJGlFxZRoKcJFAYEeIFiRQkUWUeYfef//Ko04soswso40UJAgMw8wosososy0EalnZyjQUGBRQGIFggOWUacWUeYmuadrZziQKKEgQsQLAhQkUJAgMQDghltLO1onp0cpkNInSFMqlYeSEJ5AHsqFdOwy1DA2sRmRJKxdKRfLhfLw5BzUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7ksRRA8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",ti=[];function Yg(i){let t=ti.find(e=>!e.realSrc||e.realSrc===Mt);return t||(t=new ho(Mt),ti.push(t)),i&&(t.src=i),t}function Ug(i){return Y(this,null,function*(){const t=(()=>i instanceof ho?i:Yg(i))(),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 Jg(i){const t=i-ti.length;if(!(t<=0))for(let e=0;e<t;e++)ti.push(new ho(Mt))}function Zg(i){i.inited||(i.src&&(i.inited=!0,i.removeDocumentEventListener()),i.src===Mt&&i.play())}class ho 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=()=>Zg(this);document.addEventListener("mousedown",n),document.addEventListener("click",n),document.addEventListener("touchstart",n),this.removeDocumentEventListener=()=>{document.removeEventListener("mousedown",n),document.removeEventListener("click",n),document.removeEventListener("touchstart",n)}}get isBlankAudio(){return this.realSrc===Mt||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e}clear(){this.src=Mt,console.log(this.realSrc===Mt)}}function qg(i){le(i,"svelte-kebunf",".audio.svelte-kebunf{pointer-events:auto;cursor:pointer;width:100%;height:100%}.children.svelte-kebunf{width:100%;height:100%}")}const Kg=i=>({currentTime:i&8,duration:i&4,playing:i&16}),Sr=i=>({currentTime:typeof i[3]=="number"&&!Number.isNaN(i[3])?i[3]:void 0,duration:typeof i[2]=="number"&&!Number.isNaN(i[2])?i[2]:void 0,playing:i[4]}),$g=i=>({playing:i&16}),Tr=i=>({playing:i[4]});function e0(i){let t,e,n,o,s,r,a;const l=i[12].audioIcon,c=We(l,i,i[11],Tr),u=i[12].currentTime,d=We(u,i,i[11],Sr),f=i[12].default,h=We(f,i,i[11],null);return{c(){t=B("div"),e=B("div"),c&&c.c(),n=$(),d&&d.c(),o=$(),h&&h.c(),b(e,"class","children svelte-kebunf"),b(e,"style",i[1]),b(t,"class","audio svelte-kebunf"),b(t,"style",i[0])},m(p,g){M(p,t,g),Q(t,e),c&&c.m(e,null),Q(e,n),d&&d.m(e,null),Q(e,o),h&&h.m(e,null),s=!0,r||(a=Te(t,"click",ma(i[5])),r=!0)},p(p,[g]){c&&c.p&&(!s||g&2064)&&Xe(c,l,p,p[11],s?_e(l,p[11],g,$g):Ye(p[11]),Tr),d&&d.p&&(!s||g&2076)&&Xe(d,u,p,p[11],s?_e(u,p[11],g,Kg):Ye(p[11]),Sr),h&&h.p&&(!s||g&2048)&&Xe(h,f,p,p[11],s?_e(f,p[11],g,null):Ye(p[11]),null),(!s||g&2)&&b(e,"style",p[1]),(!s||g&1)&&b(t,"style",p[0])},i(p){s||(k(c,p),k(d,p),k(h,p),s=!0)},o(p){S(c,p),S(d,p),S(h,p),s=!1},d(p){p&&z(t),c&&c.d(p),d&&d.d(p),h&&h.d(p),r=!1,a()}}}function t0(i,t,e){let n,{$$slots:o={},$$scope:s}=t,{url:r}=t,{paused:a=!0}=t,{style:l=""}=t,{slotWrapperStyle:c=""}=t,{hooksInfo:u}=t;const d=ut("hooks"),f=ut("mediaStore");let h,p=!0,g=null,A=null;function v(){e(9,h.onplay=y=>{d.emit("playStateChange",F({event:y,state:"playing",mediaInstance:h},u)),e(10,p=!1)},h),e(9,h.onpause=y=>{d.emit("playStateChange",F({event:y,state:"paused",mediaInstance:h},u)),e(10,p=!0)},h),e(9,h.onended=y=>{e(10,p=!0)},h),e(9,h.onloadedmetadata=y=>{e(2,g=h.duration)},h),e(9,h.ontimeupdate=y=>{e(3,A=h.currentTime)},h)}f.subscribe(({currentMediaElement:y})=>{y!==h&&(h==null||h.pause())});function w(y){!h||(d.emit("click",F({event:y,target:"AudioTagPlayIcon",audioInstance:h},u)),f.set({currentMediaElement:h}),h.paused?h.play():h.pause())}return i.$$set=y=>{"url"in y&&e(6,r=y.url),"paused"in y&&e(7,a=y.paused),"style"in y&&e(0,l=y.style),"slotWrapperStyle"in y&&e(1,c=y.slotWrapperStyle),"hooksInfo"in y&&e(8,u=y.hooksInfo),"$$scope"in y&&e(11,s=y.$$scope)},i.$$.update=()=>{i.$$.dirty&64&&(e(9,h=new Audio(r)),Ug(r).then(y=>{e(2,g=y)}),v()),i.$$.dirty&640&&(a||h==null||h.pause()),i.$$.dirty&1152&&e(4,n=!a&&!p)},[l,c,g,A,n,w,r,a,u,h,p,s,o]}class cl extends oe{constructor(t){super(),ie(this,t,t0,e0,ne,{url:6,paused:7,style:0,slotWrapperStyle:1,hooksInfo:8},qg)}}function n0(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 zr(i){let t,e;return t=new it({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function i0(i){let t,e,n,o,s,r=i[1]&&zr();return{c(){t=B("div"),r&&r.c(),e=$(),n=B("div"),o=B("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"),te(n,"playing",i[0]),b(t,"class","audio-icon__wrapper svelte-srt2pi"),b(t,"style",i[2]),T(t,"width",i[5]),T(t,"height",i[5])},m(a,l){M(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&&k(r,1):(r=zr(),r.c(),k(r,1),r.m(t,e)):r&&(se(),S(r,1,1,()=>{r=null}),re()),(!s||l&1)&&te(n,"playing",a[0]),(!s||l&4)&&b(t,"style",a[2]),l&32&&T(t,"width",a[5]),l&32&&T(t,"height",a[5])},i(a){s||(k(r),s=!0)},o(a){S(r),s=!1},d(a){a&&z(t),r&&r.d(),i[7](null),i[8](null)}}}function o0(i,t,e){let n,{playing:o}=t,{shadow:s=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function u(f){Se[f?"unshift":"push"](()=>{c=f,e(4,c)})}function d(f){Se[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"?ye(a):a)},[o,s,r,l,c,n,a,u,d]}class ul extends oe{constructor(t){super(),ie(this,t,o0,i0,ne,{playing:0,shadow:1,style:2,width:6},n0)}}function s0(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 Mr(i){var v,w;let t,e,n,o,s,r,a,l,c,u,d,f,h,p,g;e=new it({props:{visible:i[5],left:i[2]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let A=i[5]&&Br(i);return c=new tl({props:{visible:i[5],textUnfolded:i[1],content:i[4]}}),f=new fo({props:{unfolded:i[5],length:150,outDelay:i[3]+20*Math.min((w=(v=i[4])==null?void 0:v.length)!=null?w:10,15),useLinearColor:!0}}),{c(){t=B("div"),ee(e.$$.fragment),n=$(),o=B("div"),s=B("div"),r=B("div"),A&&A.c(),a=$(),l=B("div"),ee(c.$$.fragment),d=$(),ee(f.$$.fragment),b(r,"class","audio-icon svelte-1s6gk4a"),Le(()=>i[7].call(l)),T(l,"display","inline-block"),b(s,"class","wrapper svelte-1s6gk4a"),b(o,"class","content svelte-1s6gk4a"),b(t,"class","audio-tag svelte-1s6gk4a"),te(t,"unfolded",i[5])},m(y,I){M(y,t,I),q(e,t,null),Q(t,n),Q(t,o),Q(o,s),Q(s,r),A&&A.m(r,null),Q(s,a),Q(s,l),q(c,l,null),u=Et(l,i[7].bind(l)),Q(t,d),q(f,t,null),h=!0,p||(g=Te(l,"click",i[6]),p=!0)},p(y,I){var D,V;const P={};I&32&&(P.visible=y[5]),I&4&&(P.left=y[2]/2+"px"),e.$set(P),y[5]?A?(A.p(y,I),I&32&&k(A,1)):(A=Br(y),A.c(),k(A,1),A.m(r,null)):A&&(se(),S(A,1,1,()=>{A=null}),re());const C={};I&32&&(C.visible=y[5]),I&2&&(C.textUnfolded=y[1]),I&16&&(C.content=y[4]),c.$set(C);const L={};I&32&&(L.unfolded=y[5]),I&24&&(L.outDelay=y[3]+20*Math.min((V=(D=y[4])==null?void 0:D.length)!=null?V:10,15)),f.$set(L),(!h||I&32)&&te(t,"unfolded",y[5])},i(y){h||(k(e.$$.fragment,y),k(A),k(c.$$.fragment,y),k(f.$$.fragment,y),h=!0)},o(y){S(e.$$.fragment,y),S(A),S(c.$$.fragment,y),S(f.$$.fragment,y),h=!1},d(y){y&&z(t),K(e),A&&A.d(),K(c),u(),K(f),p=!1,g()}}}function Br(i){let t,e,n,o,s,r,a;return e=new it({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new cl({props:{paused:!i[5],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{audioIcon:[r0,({playing:l})=>({8:l}),({playing:l})=>l?256:0]},$$scope:{ctx:i}}}),{c(){t=B("div"),ee(e.$$.fragment),n=$(),ee(o.$$.fragment),b(t,"class","audio svelte-1s6gk4a")},m(l,c){M(l,t,c),q(e,t,null),Q(t,n),q(o,t,null),a=!0},p(l,c){i=l;const u={};c&32&&(u.paused=!i[5]),c&1&&(u.url=i[0].data.audioUrl),c&1&&(u.hooksInfo={tag:i[0]}),c&768&&(u.$$scope={dirty:c,ctx:i}),o.$set(u)},i(l){a||(k(e.$$.fragment,l),k(o.$$.fragment,l),l&&Le(()=>{r&&r.end(1),s=Ot(t,Vt,{duration:1e3,delay:0,easing:Zt}),s.start()}),a=!0)},o(l){var c,u;S(e.$$.fragment,l),S(o.$$.fragment,l),s&&s.invalidate(),l&&(r=en(t,Vt,{duration:1e3,delay:20*Math.min((u=(c=i[4])==null?void 0:c.length)!=null?u:10,15),easing:Zt})),a=!1},d(l){l&&z(t),K(e),K(o),l&&r&&r.end()}}}function r0(i){let t,e,n;return e=new ul({props:{playing:i[8]}}),{c(){t=B("div"),ee(e.$$.fragment),b(t,"slot","audioIcon"),b(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){M(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&256&&(r.playing=o[8]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),K(e)}}}function a0(i){let t,e,n=i[0].state&&Mr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=Mr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function l0(i,t,e){let n,o,s,{tag:r}=t,a=!1,l;function c(){e(1,a=!a)}function u(){l=this.clientWidth,e(2,l)}return i.$$set=d=>{"tag"in d&&e(0,r=d.tag)},i.$$.update=()=>{var d,f,h;i.$$.dirty&1&&e(5,n=!!((d=r.state)!=null&&d.unfolded)),i.$$.dirty&1&&e(4,o=(h=(f=r.data.title)!=null?f:r.data.text)!=null?h:""),i.$$.dirty&2&&e(3,s=a?450:0)},[r,a,l,s,o,n,c,u]}class c0 extends oe{constructor(t){super(),ie(this,t,l0,a0,ne,{tag:0},s0)}}function Vr(i){const t=Math.floor(i/60),e=Math.floor(i%60),n=e<10?`0${e}`:e;return`${t}'${n}''`}function u0(i){const t=document.createElement("div");t.style.color=i,document.body.appendChild(t);const e=window.getComputedStyle(t).color;document.body.removeChild(t);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 d0(i){le(i,"svelte-1fezrt1",".audio-tag__wrapper.svelte-1fezrt1{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.audio-tag.svelte-1fezrt1{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)}.currentTime.svelte-1fezrt1{font-family:TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;margin-left:0.25rem}.text.svelte-1fezrt1{font-weight:bold;font-size:0.75rem;margin-left:0.125rem}.audio-icon__wrapper.svelte-1fezrt1{position:relative;vertical-align:top;pointer-events:none;width:1.375rem;height:1.375rem}")}function jr(i){let t,e,n,o;return n=new cl({props:{paused:!i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},style:"width: max-content; height: max-content;",slotWrapperStyle:"display: flex; align-items: center; justify-content: center;",$$slots:{currentTime:[p0,({duration:s,currentTime:r,playing:a})=>({4:s,5:r,6:a}),({duration:s,currentTime:r,playing:a})=>(s?16:0)|(r?32:0)|(a?64:0)],audioIcon:[m0,({playing:s})=>({6:s}),({playing:s})=>s?64:0],default:[h0]},$$scope:{ctx:i}}}),{c(){t=B("div"),e=B("div"),ee(n.$$.fragment),b(e,"class","audio-tag svelte-1fezrt1"),T(e,"background-color",i[1]),T(e,"color",i[2]),b(t,"class","audio-tag__wrapper svelte-1fezrt1")},m(s,r){M(s,t,r),Q(t,e),q(n,e,null),o=!0},p(s,r){const a={};r&1&&(a.paused=!s[0].state.visible),r&1&&(a.url=s[0].data.audioUrl),r&1&&(a.hooksInfo={tag:s[0]}),r&248&&(a.$$scope={dirty:r,ctx:s}),n.$set(a),r&2&&T(e,"background-color",s[1]),r&4&&T(e,"color",s[2])},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&z(t),K(n)}}}function f0(i){let t;return{c(){t=Ce(i[3])},m(e,n){M(e,t,n)},p(e,n){n&8&&ke(t,e[3])},d(e){e&&z(t)}}}function h0(i){let t,e,n;return e=new Fi({props:{maxWidth:72,$$slots:{default:[f0]},$$scope:{ctx:i}}}),{c(){t=B("div"),ee(e.$$.fragment),b(t,"class","text svelte-1fezrt1")},m(o,s){M(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&136&&(r.$$scope={dirty:s,ctx:o}),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),K(e)}}}function m0(i){let t,e,n;return e=new ul({props:{playing:i[6]}}),{c(){t=B("div"),ee(e.$$.fragment),b(t,"slot","audioIcon"),b(t,"class","audio-icon__wrapper svelte-1fezrt1")},m(o,s){M(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&64&&(r.playing=o[6]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&z(t),K(e)}}}function Qr(i){let t=Vr(xe(i[6]?i[5]:i[4]))+"",e;return{c(){e=Ce(t)},m(n,o){M(n,e,o)},p(n,o){o&112&&t!==(t=Vr(xe(n[6]?n[5]:n[4]))+"")&&ke(e,t)},d(n){n&&z(e)}}}function p0(i){let t,e=typeof(i[6]?i[5]:i[4])=="number"&&Qr(i);return{c(){t=B("div"),e&&e.c(),b(t,"slot","currentTime"),b(t,"class","currentTime svelte-1fezrt1")},m(n,o){M(n,t,o),e&&e.m(t,null)},p(n,o){typeof(n[6]?n[5]:n[4])=="number"?e?e.p(n,o):(e=Qr(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},d(n){n&&z(t),e&&e.d()}}}function g0(i){let t,e,n=i[0].state&&jr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=jr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function A0(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(3,n=(l=(a=r.data.title)!=null?a:r.data.text)!=null?l:""),i.$$.dirty&1&&e(1,o=(()=>{var c;return r.data.backgroundColor==="dark"?"rgba(0, 0, 0, 0.3)":r.data.backgroundColor==="light"?"rgba(255, 255, 255, 0.3)":(c=r.data.backgroundColor)!=null?c:"rgba(0, 0, 0, 0.3)"})()),i.$$.dirty&2&&e(2,s=(()=>{const{r:c,g:u,b:d}=u0(o);return(c*299+u*587+d*114)/1e3>=128?"rgba(0, 0, 0, 0.6)":"white"})())},[r,o,s,n]}class v0 extends oe{constructor(t){super(),ie(this,t,A0,g0,ne,{tag:0},d0)}}function b0(i){let t,e;return t=new v0({props:{tag:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function y0(i){let t,e;return t=new c0({props:{tag:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function w0(i){let t,e,n,o;const s=[y0,b0],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=fe()},m(l,c){~t&&r[t].m(l,c),M(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?~t&&r[t].p(l,c):(e&&(se(),S(r[u],1,1,()=>{r[u]=null}),re()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),k(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(k(e),o=!0)},o(l){S(e),o=!1},d(l){~t&&r[t].d(l),l&&z(n)}}}function C0(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 E0 extends oe{constructor(t){super(),ie(this,t,C0,w0,ne,{tag:0})}}function P0(i){le(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function Rr(i){var o;let t,e,n;return e=new ol({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=B("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(s,r){M(s,t,r),q(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||(k(e.$$.fragment,s),n=!0)},o(s){S(e.$$.fragment,s),n=!1},d(s){s&&z(t),K(e)}}}function I0(i){let t,e,n=i[0].state&&i[5]&&Rr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&k(n,1)):(n=Rr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function k0(i,t,e){let n,o,s,r,a,l,{tag:c}=t;return i.$$set=u=>{"tag"in u&&e(0,c=u.tag)},i.$$.update=()=>{var u,d;i.$$.dirty&1&&e(6,n=c.state?c.state.unfolded:!1),i.$$.dirty&1&&e(5,o=c.data.mediaData),i.$$.dirty&1&&e(1,s=c.data.enableCarousel),i.$$.dirty&1&&e(4,r=c.data.playIcon),i.$$.dirty&3&&e(3,a=(u=c.data.autoplayConfig)!=null?u:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,l=(d=c.data.objectFit)!=null?d:(()=>c.data.adaptationMode==="stretch"?"cover":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,s,l,a,r,o,n]}class x0 extends oe{constructor(t){super(),ie(this,t,k0,I0,ne,{tag:0},P0)}}function D0(i){return Y(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 Or(i){return Y(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 D0(e),a=s/n,l=r/n,c=a/t,u=l,d=1/o*t+"s",f=a/t-a;return{url:e,keyframesWidth:a,keyframesHeight:l,wrapperWidth:c,wrapperHeight:u,steps:t,duration:d,offsetX:f,offsetY:0}})}function L0(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 Hr(i){i[4]=i[12].url,i[5]=i[12].keyframesWidth,i[6]=i[12].keyframesHeight,i[7]=i[12].wrapperWidth,i[8]=i[12].wrapperHeight,i[9]=i[12].steps,i[10]=i[12].duration,i[11]=i[12].offsetX}function Fr(i){let t,e,n,o=i[2]&&Gr();function s(l,c){return l[3]?T0:S0}let r=s(i),a=r(i);return{c(){t=B("div"),o&&o.c(),e=$(),a.c(),b(t,"class","icon"),T(t,"width",typeof i[0]=="number"?ye(i[0]):i[0])},m(l,c){M(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&&k(o,1):(o=Gr(),o.c(),k(o,1),o.m(t,e)):o&&(se(),S(o,1,1,()=>{o=null}),re()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&1&&T(t,"width",typeof l[0]=="number"?ye(l[0]):l[0])},i(l){n||(k(o),n=!0)},o(l){S(o),n=!1},d(l){l&&z(t),o&&o.d(),a.d()}}}function Gr(i){let t,e;return t=new it({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function S0(i){let t,e;return{c(){t=B("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){M(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 T0(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:B0,then:M0,catch:z0,value:12};return So(e=Or(i[1]),n),{c(){t=fe(),n.block.c()},m(o,s){M(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=Or(i[1]))&&So(e,n)||Cc(n,i,s)},d(o){o&&z(t),n.block.d(o),n.token=null,n=null}}}function z0(i){return{c:U,m:U,p:U,d:U}}function M0(i){Hr(i);let t,e,n,o=`url(${i[4]})`,s=`steps(${i[9]-1})`;return{c(){t=B("div"),e=B("div"),n=B("div"),b(n,"class","icon-keyframe svelte-mhs8j5"),T(n,"width",ye(i[5])),T(n,"height",ye(i[6])),T(n,"background-image",o),T(n,"animation-duration",i[10]),T(n,"animation-timing-function",s),T(n,"animation-delay",0),T(n,"background-size","100% 100%"),T(n,"--keyframe_offset_x",ye(i[11])),b(e,"class","icon-keyframe-wrapper svelte-mhs8j5"),T(e,"transform",typeof i[0]=="number"?`scale(${i[0]/i[7]})`:void 0),b(t,"class","icon-keyframe-container svelte-mhs8j5"),T(t,"width",typeof i[0]=="number"?ye(i[0]):ye(i[7])),T(t,"height",typeof i[0]=="number"?ye(i[8]*(i[0]/i[7])):ye(i[8]))},m(r,a){M(r,t,a),Q(t,e),Q(e,n)},p(r,a){Hr(r),a&2&&T(n,"width",ye(r[5])),a&2&&T(n,"height",ye(r[6])),a&2&&o!==(o=`url(${r[4]})`)&&T(n,"background-image",o),a&2&&T(n,"animation-duration",r[10]),a&2&&s!==(s=`steps(${r[9]-1})`)&&T(n,"animation-timing-function",s),a&2&&T(n,"--keyframe_offset_x",ye(r[11])),a&3&&T(e,"transform",typeof r[0]=="number"?`scale(${r[0]/r[7]})`:void 0),a&3&&T(t,"width",typeof r[0]=="number"?ye(r[0]):ye(r[7])),a&3&&T(t,"height",typeof r[0]=="number"?ye(r[8]*(r[0]/r[7])):ye(r[8]))},d(r){r&&z(t)}}}function B0(i){return{c:U,m:U,p:U,d:U}}function V0(i){let t,e,n=i[1]&&Fr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Fr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function j0(i,t,e){let n,{width:o=null}=t,{icon:s=null}=t,{shadow:r=!1}=t;return i.$$set=a=>{"width"in a&&e(0,o=a.width),"icon"in a&&e(1,s=a.icon),"shadow"in a&&e(2,r=a.shadow)},i.$$.update=()=>{i.$$.dirty&2&&e(3,n=(s==null?void 0:s.steps)>=2)},[o,s,r,n]}class dl extends oe{constructor(t){super(),ie(this,t,j0,V0,ne,{width:0,icon:1,shadow:2},L0)}}function Q0(i){le(i,"svelte-1lmyni6",".wrapper.svelte-1lmyni6{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-1lmyni6{position:relative;display:flex;align-items:center;justify-content:center}.text.svelte-1lmyni6{position:absolute;top:0;font-size:0.875rem;color:#ffffff;letter-spacing:0;text-align:center;max-width:8.75rem;width:-moz-max-content;width:max-content;word-break:break-all;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function Nr(i){let t,e,n,o,s,r;return e=new it({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=B("div"),ee(e.$$.fragment),n=$(),o=B("div"),s=Ce(i[1]),b(o,"class","text svelte-1lmyni6"),b(t,"class","text-wrapper svelte-1lmyni6")},m(a,l){M(a,t,l),q(e,t,null),Q(t,n),Q(t,o),Q(o,s),r=!0},p(a,l){(!r||l&2)&&ke(s,a[1])},i(a){r||(k(e.$$.fragment,a),r=!0)},o(a){S(e.$$.fragment,a),r=!1},d(a){a&&z(t),K(e)}}}function R0(i){let t,e,n,o;e=new dl({props:{icon:i[0]}});let s=i[1]&&Nr(i);return{c(){t=B("div"),ee(e.$$.fragment),n=$(),s&&s.c(),b(t,"class","wrapper svelte-1lmyni6")},m(r,a){M(r,t,a),q(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]?s?(s.p(r,a),a&2&&k(s,1)):(s=Nr(r),s.c(),k(s,1),s.m(t,null)):s&&(se(),S(s,1,1,()=>{s=null}),re())},i(r){o||(k(e.$$.fragment,r),k(s),o=!0)},o(r){S(e.$$.fragment,r),S(s),o=!1},d(r){r&&z(t),K(e),s&&s.d()}}}function O0(i,t,e){let n,o,s,r,a,l,c,{tag:u}=t;return i.$$set=d=>{"tag"in d&&e(2,u=d.tag)},i.$$.update=()=>{var d,f;i.$$.dirty&4&&e(1,n=(d=u.data.title)!=null?d:u.data.text),i.$$.dirty&4&&e(7,o=(f=u.data.icon)!=null?f:u.style.point),i.$$.dirty&128&&e(6,s=o.url),i.$$.dirty&128&&e(5,r=o.steps),i.$$.dirty&128&&e(4,a=o.fps),i.$$.dirty&128&&e(3,l=o.ratio),i.$$.dirty&120&&e(0,c={url:s,steps:r,fps:a,ratio:l})},[c,n,u,l,a,r,s,o]}class H0 extends oe{constructor(t){super(),ie(this,t,O0,R0,ne,{tag:2},Q0)}}function F0(i){le(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function Wr(i){let t,e=i[0].element+"",n;return{c(){t=new Wn(!1),n=fe(),t.a=n},m(o,s){t.m(e,o,s),M(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 G0(i){let t,e=typeof i[0].element=="string"&&Wr(i);return{c(){t=B("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){M(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=Wr(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:U,o:U,d(n){n&&z(t),e&&e.d(),i[2](null)}}}function N0(i,t,e){let{tag:n}=t,o,s;tt(()=>{if(o){if(n.element instanceof Element){const a=n.element;o.appendChild(a),s=()=>o==null?void 0:o.removeChild(a)}else if(typeof n.element=="function"){const a=n.element;s=a(o)}}}),It(()=>{s==null||s()});function r(a){Se[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class W0 extends oe{constructor(t){super(),ie(this,t,N0,G0,ne,{tag:0},F0)}}function _0(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/gApAggANAEeAFABHgBQAR4AUAIIADQCCAAuAR4AUAEeAFABfAAxAAEAAAPo/zgAAAIcACkAKQHgAAEAAAAAAAAAAAAAAAAAAABJAAMCLgGQAAUACAKKAlgAAABLAooCWAAAAV4AMgEsAAAAAAgAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFVLV04AIAAg/xsDIP84AMgD6ADIAAAAAQAAAAAB9AK8AAAAIAAAAAAAEADGAAEAAAAAAAEADAAAAAEAAAAAAAIABAAMAAEAAAAAAAMAGwAQAAEAAAAAAAQAEQArAAEAAAAAAAUAPAA8AAEAAAAAAAYAEAB4AAEAAAAAAAgADAAAAAEAAAAAAAkADAAAAAMAAQQJAAEAGACIAAMAAQQJAAIACACgAAMAAQQJAAMANgCoAAMAAQQJAAQAIgDeAAMAAQQJAAUAeAEAAAMAAQQJAAYAIAF4AAMAAQQJAAgAGACIAAMAAQQJAAkAGACIQUxJQkFCQSBGb250Qm9sZDEuMDAwO1VLV047QUxJQkFCQUZvbnQtQm9sZEFMSUJBQkEgRm9udCBCb2xkVmVyc2lvbiAxLjAwMDtQUyAwMDEuMDAwO2hvdGNvbnYgMS4wLjg4O21ha2VvdGYubGliMi41LjY0Nzc1QUxJQkFCQUZvbnQtQm9sZABBAEwASQBCAEEAQgBBACAARgBvAG4AdABCAG8AbABkADEALgAwADAAMAA7AFUASwBXAE4AOwBBAEwASQBCAEEAQgBBAEYAbwBuAHQALQBCAG8AbABkAEEATABJAEIAQQBCAEEAIABGAG8AbgB0ACAAQgBvAGwAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAMAAwADsAUABTACAAMAAwADEALgAwADAAMAA7AGgAbwB0AGMAbwBuAHYAIAAxAC4AMAAuADgAOAA7AG0AYQBrAGUAbwB0AGYALgBsAGkAYgAyAC4ANQAuADYANAA3ADcANQBBAEwASQBCAEEAQgBBAEYAbwBuAHQALQBCAG8AbABkAAAAAAADAAAAAwAAASIAAQAAAAAAHAADAAEAAAEiAAABBgAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAABCSEMANjc4OTo7PD0+PwAAAAAAAAACAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGwAAAAAAABwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAFoAAAAQABAAAwAAACAALgA5AFoAegCl/xv//wAAACAALAAwAEEAYQCl/xr////hAAAABv/B/7v/nwAAAAEAAAAOAAAAAAAAAAAACgAAAEIASABDAEYARwADAAAAAAAA/7UAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAQAEAgABAQERQUxJQkFCQUZvbnQtQm9sZAABAQEg+A8A+CAB+CEC+BgEtPtc+HT5tAX3KA/3UBGcHAZWEgAHAQENExoiKTpLbmluZS4wMDEuMDAxbW9uZXkudW5pRkYxQm5pbmUuMDAxdW5pRkYxQWNvcHlyaWdodCBtaXNzaW5nQUxJQkFCQSBGb250IEJvbGQAAAEAAQAAIhkAQhkAEQkBhwABigAADQAADwAAZAABiAABiwABiQAADgAASQIAAQCtAK4ArwCwALEAsgCzALQAtQC2ALcAuAC5ALoAuwC8AL0AvgC/AMAAwQDCAMMAxADFAMYAxwDIAMkAygDLAMwAzQDOAM8A0ADRANIA0wDUANUA1gDXANgA2QDaANsA3ADdAN4A3wDgAOEA4gFDAVoBqwIsAloCuAMcAzkDzwQ4BDoEPARRBFMEVQTNBOIE8QUEmPtc0Ky6rKKsuqzHrKPDoa2irLCspq2vraWssKzOAejVrKytrKzYA/gu+bQV+9H+fPfRBj76ORVqSWbNavs6rM2wSqwH7vsVFUXNafs68wfNaRVqZ6wG704VaklFJ6zNsEmsB/c6TxUn+zqt9xnNB6z7DhX7Bfs69wWsO++6anRpwwfv+0EV+wX7OvcFB/cZahUnXO8GrFMVamsHRVwF8Wr7OqwG0boFRawGDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OrIr5UQH3OPdUA/ebihVmaZSdbB9Mr2TL0xr3vgewlK2eqh7Kr86y1BuvrIJ5qh/HZrJIQhr7vgdngmp5bR5OZ0tkQxv46ARUX2FSH/u+B1a5YMDAs7TCHve+B8RjtVYeDnD4utkB93HzA/cL+QgVPfH8vPP5UgcOrIn5UgG++DYD+GmJFfw28wb3svfUBZ2glKSnGsNduFBWXF1UiB4ijgaMsJWsnqoIyLHMstYbsa6Ceawfy2ezSUAaVndXZ2Me+2/7jQX3pwYOrIvy92Tz90ryEr/zM/L3SvMu8hPy+B/3/xUT7LCwpMDDGq6CrHqoHsZnTK5DG2lrg3puH09pZk5EGobykAe4tba6vrViXFZiYlcedyOfBhPyxLpdUlJcW1JSXLvEH5ojfAdllGiebB5LsM5j1xuwrpSeqx/KsLPO1xrKcMNerx4OwPL1Affi8gP4dPdlFWD4fPshBvuJ/HkF+wH3ryPy87YH+8z1Ffc69+QF++QHDrb3ZNf3ZfAB9zX3YwP3nRZlaJSebB9LsGPO1xrzBlK6XMTEubrEHtcHxF26UlJcXFIeI/g0+BYh+677JAaorK2ZsBuwroJ4qx/LZrNHPxo/B2aCaHhrHktmR2NAGw6si/X3b/IBufX3b/ID95n4QBWAg4uKhh/3EfelBfsHBvtK/CMFfnCFbm0aZJVnnmoeSrLPYdobsq6Vnqwfy7K10dgasoGueKwey2RHtT4b+9YETlu7yMe8vcfHvVlPT1laTx8OmIr5UQG/+B8D93iKFfsIBvdo+OYF+6T2+B8oBg6iifL3bPX3QPEStvNB8vc/8jXxE/L4EvgHFRPss7Cnu78arYOreqgexWpNr0YbaWyDem4fUmlmTUcaXqBftGAeE/JWYmROSxpklWieax5Ksc9i2BuxrpWerB/LsbTP2BrHaMVath4T7PsN93QVu7FjXFtlZltcZbC7urGzuh8T8oX8ghVPW7zHx7q6yMa9W1BPWVpQHw6i96Tz92/0AbTz93DzA/hp+HkVsIGveKwezmNFtUAbZGeBeGofSmNiRT8aZJVnnmseSrHPYtoboAb7EvukBfcHBvdL+CEFmaySqaQa+9gWxry+yJ6dhoGcHq12oWZmGk5YW1BMXLnKHg4gCiEK+11L91IlCvdiyhWtb6hpJgoeJAoOIQogCqz3pe/3b/UBufX3bfQD+G74dxWyga94rB7NZEW0PhtlaIF4ah9KY2FFPxo7tkTPZh6MjIqKjB+TiJCIjYoIjgaCoKGHoRuanY6QoB+IgfsB+6QF9wcG9y/4IgWYppGnqhr7a/sCFVBbvMjHu7zGyLxbTk5aWk4fDvtd+AojCoz7jBUmCh8kCq1vqGkeDvtdi/cS94wjCvwKBCIKDiD3ru8BvPeuA7z4EhUn967vBw4eoDf/DAmLDAv47BT4exWcEwAHAQFBXW97ipCarPcv8+7yAfdl8gP4aPf6FfIjB+r3gwUiBi77gwWHBjH3gwUkBuP7gwUnJPcxKPsxI/cx+y/y9y/3MPP7MO4GDvtdi/cSJQr3JBZkcqOzsKSksrCkcWdlcnFmHw6up6eurm+naGhvb2hop2+uHwv3EiUK9yP4ChUiCgt3SgWxBrnmBZGVj5eZGgsB2/cSAwtobm5paqBzqoYLAAABAAAAAAAAAAAAAA==) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-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 X0(i){let t,e;return{c(){t=B("div"),b(t,"data-info","tag content is keep folded"),b(t,"data-id",e=i[1].id)},m(n,o){M(n,t,o)},p(n,o){o&2&&e!==(e=n[1].id)&&b(t,"data-id",e)},i:U,o:U,d(n){n&&z(t)}}}function Y0(i){let t,e,n,o,s,r,a,l,c;const u=[eA,$0,K0,q0,Z0,J0,U0],d=[];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"?6:-1}return~(o=f(i))&&(s=d[o]=u[o](i)),{c(){var h,p,g;t=B("div"),e=B("div"),n=B("div"),s&&s.c(),b(n,"class","content svelte-ofx2uu"),te(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),te(t,"disable",i[1].enabled===!1),te(t,"hide",!i[3].visible||!i[3].enabled||!i[4].visible||!((p=i[1].state)!=null&&p.visible)||((g=i[1].temporaryState)==null?void 0:g.visible)===!1),te(t,"withAnimation",i[0]),te(t,"unClickable",i[1].clickable===!1),T(t,"width",i[1].stickType==="Plane"?"100%":0),T(t,"height",i[1].stickType==="Plane"?"100%":0)},m(h,p){M(h,t,p),Q(t,e),Q(e,n),~o&&d[o].m(n,null),a=!0,l||(c=Te(t,"click",ma(i[12])),l=!0)},p(h,p){var A,v,w;let g=o;o=f(h),o===g?~o&&d[o].p(h,p):(s&&(se(),S(d[g],1,1,()=>{d[g]=null}),re()),~o?(s=d[o],s?s.p(h,p):(s=d[o]=u[o](h),s.c()),k(s,1),s.m(n,null)):s=null),(!a||p&2)&&te(n,"unfolded",(A=h[1].state)==null?void 0:A.unfolded),(!a||p&2&&r!==(r=h[1].id))&&b(t,"data-id",r),(!a||p&2)&&te(t,"disable",h[1].enabled===!1),(!a||p&26)&&te(t,"hide",!h[3].visible||!h[3].enabled||!h[4].visible||!((v=h[1].state)!=null&&v.visible)||((w=h[1].temporaryState)==null?void 0:w.visible)===!1),(!a||p&1)&&te(t,"withAnimation",h[0]),(!a||p&2)&&te(t,"unClickable",h[1].clickable===!1),p&2&&T(t,"width",h[1].stickType==="Plane"?"100%":0),p&2&&T(t,"height",h[1].stickType==="Plane"?"100%":0)},i(h){a||(k(s),a=!0)},o(h){S(s),a=!1},d(h){h&&z(t),~o&&d[o].d(),l=!1,c()}}}function U0(i){let t,e;return t=new x0({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function J0(i){let t,e;return t=new H0({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Z0(i){let t,e;return t=new Xg({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function q0(i){let t,e;return t=new E0({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function K0(i){let t,e;return t=new Lg({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function $0(i){let t,e;return t=new Gp({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function eA(i){let t,e;return t=new W0({props:{tag:xe(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=xe(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function tA(i){let t,e,n,o;const s=[Y0,X0],r=[];function a(l,c){return l[5]?0:1}return t=a(i),e=r[t]=s[t](i),{c(){e.c(),n=fe()},m(l,c){r[t].m(l,c),M(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?r[t].p(l,c):(se(),S(r[u],1,1,()=>{r[u]=null}),re(),e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),k(e,1),e.m(n.parentNode,n))},i(l){o||(k(e),o=!0)},o(l){S(e),o=!1},d(l){r[t].d(l),l&&z(n)}}}function nA(i,t,e){let n,o,s,r,a,{withAnimation:l=!1}=t,{tag:c}=t,{hooks:u}=t,{state:d}=t,{mediaStore:f}=t,{temporaryState:h}=t;Yn("hooks",u),Yn("mediaStore",f);let p,g;function A(w){w?u.emit("exposure",{id:r,type:"start"}):u.emit("exposure",{id:r,type:"end"})}const v=w=>u.emit("click",{event:w,target:"TagContent",tag:c});return i.$$set=w=>{"withAnimation"in w&&e(0,l=w.withAnimation),"tag"in w&&e(1,c=w.tag),"hooks"in w&&e(2,u=w.hooks),"state"in w&&e(3,d=w.state),"mediaStore"in w&&e(6,f=w.mediaStore),"temporaryState"in w&&e(4,h=w.temporaryState)},i.$$.update=()=>{var w,y,I,P,C,L,D,V,W,G,X;i.$$.dirty&2&&e(10,n=(w=c.state)==null?void 0:w.unfolded),i.$$.dirty&2&&e(9,o=(y=c.state)==null?void 0:y.visible),i.$$.dirty&26&&e(11,s=d.visible&&h.visible&&((I=c.state)==null?void 0:I.visible)),i.$$.dirty&2&&(r=c.id),i.$$.dirty&2048&&A(s),i.$$.dirty&1922&&c.hooks&&(n!==void 0&&n!==g&&(e(8,g=n),n?(C=(P=c.hooks).emit)==null||C.call(P,"unfolded"):(D=c==null?void 0:(L=c.hooks).emit)==null||D.call(L,"folded")),o!==void 0&&o!==p&&(e(7,p=o),o?(W=(V=c.hooks).emit)==null||W.call(V,"show"):(X=(G=c.hooks).emit)==null||X.call(G,"hide"))),i.$$.dirty&2&&e(5,a=(()=>!(typeof c.mergedConfig.unfoldedConfig=="object"&&c.mergedConfig.unfoldedConfig.keep==="folded"))())},[l,c,u,d,h,a,f,p,g,o,n,s,v]}class fl extends oe{constructor(t){super(),ie(this,t,nA,tA,ne,{withAnimation:0,tag:1,hooks:2,state:3,mediaStore:6,temporaryState:4},_0)}}function iA(i){le(i,"svelte-1m3xhhr",'@charset "UTF-8";.tag-point-click-helper.svelte-1m3xhhr.svelte-1m3xhhr{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-1m3xhhr.svelte-1m3xhhr{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);z-index:-1}.tag-folded-point.svelte-1m3xhhr.svelte-1m3xhhr,.tag-unfolded-point.svelte-1m3xhhr.svelte-1m3xhhr{transition:all 0.5s}.tag-point-wrapper.svelte-1m3xhhr .tag-unfolded-point.svelte-1m3xhhr{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-1m3xhhr .tag-unfolded-point.svelte-1m3xhhr:after{content:"";position:absolute;width:0.3125rem;height:0.3125rem;border-radius:50%;background-color:white}.tag-point-wrapper.svelte-1m3xhhr .tag-unfolded-point.svelte-1m3xhhr: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-1m3xhhr .tag-folded-point.svelte-1m3xhhr{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-1m3xhhr .tag-unfolded-point.svelte-1m3xhhr{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-1m3xhhr .tag-folded-point.svelte-1m3xhhr{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-1m3xhhr .tag-unfolded-point.svelte-1m3xhhr{opacity:1;scale:1}')}function oA(i){let t,e,n,o,s,r,a,l,c,u,d,f;return o=new it({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new dl({props:{icon:i[2],width:i[1]}}),{c(){t=B("div"),e=$(),n=B("div"),ee(o.$$.fragment),s=$(),r=B("div"),a=$(),l=B("div"),ee(c.$$.fragment),b(t,"class","tag-point-click-helper svelte-1m3xhhr"),b(r,"class","tag-unfolded-point svelte-1m3xhhr"),T(r,"transition-delay",(i[3]?i[5]:0)+"ms"),b(l,"class","tag-folded-point svelte-1m3xhhr"),T(l,"transition-delay",(i[3]?i[5]:0)+"ms"),b(n,"class","tag-point-wrapper svelte-1m3xhhr"),te(n,"unfolded",i[0]),te(n,"folded",i[3]),T(n,"width",ye(i[1])),T(n,"height",ye(i[1]))},m(h,p){M(h,t,p),M(h,e,p),M(h,n,p),q(o,n,null),Q(n,s),Q(n,r),Q(n,a),Q(n,l),q(c,l,null),u=!0,d||(f=Te(t,"click",i[4]),d=!0)},p(h,[p]){p&8&&T(r,"transition-delay",(h[3]?h[5]:0)+"ms");const g={};p&4&&(g.icon=h[2]),p&2&&(g.width=h[1]),c.$set(g),p&8&&T(l,"transition-delay",(h[3]?h[5]:0)+"ms"),(!u||p&1)&&te(n,"unfolded",h[0]),(!u||p&8)&&te(n,"folded",h[3]),p&2&&T(n,"width",ye(h[1])),p&2&&T(n,"height",ye(h[1]))},i(h){u||(k(o.$$.fragment,h),k(c.$$.fragment,h),u=!0)},o(h){S(o.$$.fragment,h),S(c.$$.fragment,h),u=!1},d(h){h&&z(t),h&&z(e),h&&z(n),K(o),K(c),d=!1,f()}}}function sA(i,t,e){let n,o,s,r;const a=ut("hooks");let{tag:l}=t,c,u=!1;const d=()=>{c!==void 0&&clearTimeout(c),u=!0,c=setTimeout(()=>{u=!1},800)},f=p=>{u||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,g,A,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=(A=(g=l.style)==null?void 0:g.point)!=null&&A.url?(v=l.style)==null?void 0:v.point:{url:pp}),i.$$.dirty&64&&e(1,r=(()=>{var y,I,P;const w=(P=(I=(y=l.style)==null?void 0:y.point)==null?void 0:I.size)!=null?P:"S";return typeof w=="number"?w:w==="S"?18:w==="M"?20:w==="L"?24:w==="XL"?28:18})())},d(),[n,r,s,o,f,h,l]}class rA extends oe{constructor(t){super(),ie(this,t,sA,oA,ne,{tag:6},iA)}}function aA(i){le(i,"svelte-bdubcv",".tag.hide.svelte-bdubcv{opacity:0;pointer-events:none}.tag.disable.svelte-bdubcv{display:none}.tag.withAnimation.svelte-bdubcv{transition:opacity 0.3s linear}.wrapper.svelte-bdubcv{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}")}function lA(i){let t;return{c(){t=B("div"),b(t,"data-info","tag content is disable")},m(e,n){M(e,t,n)},p:U,i:U,o:U,d(e){e&&z(t)}}}function cA(i){let t,e;return t=new fl({props:{mediaStore:i[2],withAnimation:i[0],tag:xe(i[1]),hooks:i[14],state:i[3],temporaryState:i[4]}}),{c(){ee(t.$$.fragment)},m(n,o){q(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=xe(n[1])),o&8&&(s.state=n[3]),o&16&&(s.temporaryState=n[4]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function uA(i){let t;return{c(){t=B("div"),b(t,"data-info","tag point is disable")},m(e,n){M(e,t,n)},p:U,i:U,o:U,d(e){e&&z(t)}}}function dA(i){let t,e;return t=new rA({props:{tag:i[1]}}),{c(){ee(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=n[1]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function fA(i){let t,e,n,o,s,r,a,l,c;const u=[cA,lA],d=[];function f(A,v){return A[12]?0:1}n=f(i),o=d[n]=u[n](i);const h=[dA,uA],p=[];function g(A,v){return A[13]?0:1}return r=g(i),a=p[r]=h[r](i),{c(){t=B("div"),e=B("div"),o.c(),s=$(),a.c(),b(e,"class","wrapper svelte-bdubcv"),b(e,"data-tag-unfolded",i[8]),b(e,"data-tag-id",i[11]),b(e,"data-content-type",l=i[1].contentType),T(e,"left",i[7]),T(e,"top",i[6]),T(e,"z-index",i[5]),b(t,"class","tag svelte-bdubcv"),b(t,"data-tag-id",i[11]),te(t,"disable",i[10]),te(t,"hide",i[9]),te(t,"withAnimation",i[0])},m(A,v){M(A,t,v),Q(t,e),d[n].m(e,null),Q(e,s),p[r].m(e,null),c=!0},p(A,[v]){let w=n;n=f(A),n===w?d[n].p(A,v):(se(),S(d[w],1,1,()=>{d[w]=null}),re(),o=d[n],o?o.p(A,v):(o=d[n]=u[n](A),o.c()),k(o,1),o.m(e,s));let y=r;r=g(A),r===y?p[r].p(A,v):(se(),S(p[y],1,1,()=>{p[y]=null}),re(),a=p[r],a?a.p(A,v):(a=p[r]=h[r](A),a.c()),k(a,1),a.m(e,null)),(!c||v&256)&&b(e,"data-tag-unfolded",A[8]),(!c||v&2048)&&b(e,"data-tag-id",A[11]),(!c||v&2&&l!==(l=A[1].contentType))&&b(e,"data-content-type",l),v&128&&T(e,"left",A[7]),v&64&&T(e,"top",A[6]),v&32&&T(e,"z-index",A[5]),(!c||v&2048)&&b(t,"data-tag-id",A[11]),(!c||v&1024)&&te(t,"disable",A[10]),(!c||v&512)&&te(t,"hide",A[9]),(!c||v&1)&&te(t,"withAnimation",A[0])},i(A){c||(k(o),k(a),c=!0)},o(A){S(o),S(a),c=!1},d(A){A&&z(t),d[n].d(),p[r].d()}}}function hA(i,t,e){let n,o,s,r,a,l,c,u,d,{withAnimation:f=!1}=t,{tag:h}=t,{mediaStore:p}=t,{state:g}=t,{temporaryState:A}=t;const v=ut("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,g=w.state),"temporaryState"in w&&e(4,A=w.temporaryState)},i.$$.update=()=>{var w,y,I,P,C,L,D,V;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=!((I=h.state)!=null&&I.visible)||((P=h.temporaryState)==null?void 0:P.visible)===!1),i.$$.dirty&2&&e(8,l=(C=h.state)==null?void 0:C.unfolded),i.$$.dirty&2&&e(7,c=((L=h.pointTagStyle)==null?void 0:L.leftPercent)+"%"),i.$$.dirty&2&&e(6,u=((D=h.pointTagStyle)==null?void 0:D.topPercent)+"%"),i.$$.dirty&2&&e(5,d=(V=h.state)!=null&&V.unfolded?1:0)},[f,h,p,g,A,d,u,c,l,a,r,s,o,n,v]}class mA extends oe{constructor(t){super(),ie(this,t,hA,fA,ne,{withAnimation:0,tag:1,mediaStore:2,state:3,temporaryState:4},aA)}}function pA(i){le(i,"svelte-wqbk81",".tag--container.svelte-wqbk81{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}.withAnimation.svelte-wqbk81{transition:opacity 0.3s linear}.tag--container.hide.svelte-wqbk81{opacity:0;pointer-events:none}.tag--container.hide.svelte-wqbk81 *{pointer-events:none}")}function _r(i,t,e){const n=i.slice();return n[6]=t[e],n}function Xr(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=_r(i,s,a),c=r(l);n.set(c,e[a]=Yr(c,l))}return{c(){t=B("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-wqbk81"),te(t,"hide",!i[3].visible||!i[4].visible),te(t,"withAnimation",i[0])},m(a,l){M(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],se(),e=nt(e,l,r,1,a,s,n,t,Ht,Yr,null,_r),re()),(!o||l&24)&&te(t,"hide",!a[3].visible||!a[4].visible),(!o||l&1)&&te(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)k(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)S(e[l]);o=!1},d(a){a&&z(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Yr(i,t){let e,n,o;return n=new mA({props:{state:t[3],temporaryState:t[4],withAnimation:t[0],tag:t[6],mediaStore:t[2]}}),{key:i,first:null,c(){e=fe(),ee(n.$$.fragment),this.first=e},m(s,r){M(s,e,r),q(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||(k(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&z(e),K(n,s)}}}function gA(i){let t,e,n=i[3].enabled&&Xr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&k(n,1)):(n=Xr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function AA(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{mediaStore:r}=t,{state:a}=t,{temporaryState:l}=t;return Yn("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 vA extends oe{constructor(t){super(),ie(this,t,AA,gA,ne,{withAnimation:0,tags:1,hooks:5,mediaStore:2,state:3,temporaryState:4},pA)}}const bA={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}}}};function yA(i){return i.stickType==="2DPoint"||i.stickType==="3DPoint"}function wA(i){return i.stickType==="3DPoint"||i.stickType==="Plane"}class CA extends ai{constructor(e){super(e);m(this,"tagCacheByPanoIndex",{})}getCaches({panoIndex:e,id:n,key:o}){var c,u,d,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=`${(d=(u=s.work)==null?void 0:u.workCode)!=null?d: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={}}}class EA extends CA{constructor(e){super(e);m(this,"tags",[]);m(this,"config",bA);m(this,"raycaster",new x.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]=St.default({},this.config.contentTypeConfig[e],n):this.config.contentTypeConfig[e]=n,this.clearCache()}getVisibleByPanoIndex(e,n){var r;const o=this.getCaches({panoIndex:n,id:e.id}),s=(r=this.five.panoIndex)!=null?r:n;if(o.visible!==void 0)return o.visible;{const a=(()=>{var u,d,f;const l=(u=this.getTagConfig(e).visibleConfig)!=null?u:{},c=this.getDistance(e);if(typeof l=="function")return l(this.five,{tag:e,distance:c});if(l.keep==="hidden")return!1;if(l.keep==="visible")return!0;if(l.visiblePanoIndex!==void 0&&l.visiblePanoIndex!=="all"&&s!==void 0&&(Array.isArray(l.visiblePanoIndex)&&!l.visiblePanoIndex.includes(s)||l.visiblePanoIndex==="current"&&s!==((d=e.fiveState)==null?void 0:d.panoIndex))||l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&sn(c,l.visibleDistance)===!1)return!1;if(l.intersectRaycaster!==!1&&(typeof l.intersectRaycaster!="object"||l.intersectRaycaster.enabled!==!1)){if(s===void 0)return!1;const h=(f=this.five.work.observers[s])==null?void 0:f.position;if(h===void 0)throw new Error(`getVisible(): observerPosition is ${h}`);const p=Tn(e.position).sub(h).normalize();this.raycaster.set(h,p);const[g]=this.five.model.intersectRaycaster(this.raycaster),A=(()=>{var v;return typeof l.intersectRaycaster=="object"&&(v=l.intersectRaycaster.distanceAccuracy)!=null?v:.01})();if(g&&g.distance+A<c)return!1}return!(l.angleRange&&wA(e)&&sn(this.getAngle(e),l.angleRange)===!1)})();return o.visible=a,o.visible}}getUnfoldedByPanoIndex(e,n){if(!this.getVisibleByPanoIndex(e))return;const s=this.getCaches({panoIndex:n,id:e.id});if(s.unfolded!==void 0)return s.unfolded;{const r=this.getTagConfig(e).unfoldedConfig;if(!r)return;const a=(()=>{const c=this.getDistance(e);if(typeof r=="function")return r(this.five,{tag:e,distance:c});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.unfoldDistance&&sn(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&&sn(l.x,r.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(r.autoUnfold.strategy==="MinimumDistance"){const u=this.filterPointTag().filter(f=>this.getVisibleByPanoIndex(f)).filter(f=>{const h=this.getTagProject(f);if(!h)return!1;const{x:p,y:g,z:A}=h;return!(Math.abs(A)>1||Math.abs(p)>1||Math.abs(g)>1)}).map(f=>({tag:f,id:f.id,tagConfig:this.getTagConfig(f).unfoldedConfig})).filter(({tag:f,tagConfig:h})=>{var p,g;return!(typeof h!="object"||h.keep||h.autoUnfold===!1||((p=h.autoUnfold)==null?void 0:p.enable)===!1||((g=h.autoUnfold)==null?void 0:g.strategy)!=="MinimumDistance")}).map(f=>he(F({},f),{distance:this.getDistance(f.tag)})).filter(({distance:f,tagConfig:h})=>{var p,g;return!(f===void 0||typeof h!="object"||h.autoUnfold===!1||((p=h.autoUnfold)==null?void 0:p.enable)===!1||((g=h.autoUnfold)==null?void 0:g.strategy)!=="MinimumDistance"||h.autoUnfold.distance&&sn(f,h.autoUnfold.distance)===!1)}).sort((f,h)=>f.distance-h.distance).findIndex(f=>f.id===e.id);if(u===-1||u<=((a=r.autoUnfold.maxNumber)!=null?a:1)-1===!1)return!1}return!0}})():void 0}getDistance(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCaches({panoIndex:n,id:e.id});if(s.distance!==void 0)return s.distance;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getDistance(): observerPosition is ${c}`);const u=(()=>yA(e)?at(e==null?void 0:e.position):Tn(e.position))(),d=c.distanceTo(u);return s.distance=d,d}}getAngle(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCaches({panoIndex:n,id:e.id});if(s.angle!==void 0)return s.angle;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getAngleRange(): observerPosition is ${c}`);const u=(()=>e.stickType==="3DPoint"?fn(e.normal):$a(e.position))();if(!u)return;const d=new x.Vector3().copy(c).sub(Tn(e.position)),f=u.angleTo(d)*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",u="Any"]=l;(e.stickType===c||c==="Any")&&(e.contentType===u||u==="Any")&&(n[a]=this.config.contentTypeConfig[a])}if(l.length===3){const[c="Any",u,d]=l;if(u==="Audio"&&e.contentType==="Audio"){const f=e;(f.stickType===c||c==="Any")&&f.data.appearance===d&&(n[a]=this.config.contentTypeConfig[a])}}});const o=St.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=void 0;return}const o=this.getTagProject(n);if(!o){n.pointTagStyle=void 0;return}n.pointTagStyle={leftPercent:(o.x+1)/2*100,topPercent:(-o.y+1)/2*100}})}setVisibleByPanoIndex(){this.tags.forEach(e=>{const n=this.getVisibleByPanoIndex(e);e.state&&(e.state.visible=n)})}setUnfoldedByPanoIndex(){this.tags.forEach(e=>{const n=this.getUnfoldedByPanoIndex(e);if(!!e.state&&(n!==void 0&&(e.state.unfolded=n),n&&!e.state.visible)){const o=this.getTagConfig(e);typeof o.unfoldedConfig=="object"&&o.unfoldedConfig.autoUnfoldWhenHide!==!1&&(e.state.unfolded=!1)}})}getTagProject(e){if(!this.getVisibleByPanoIndex(e))return;const o=Tn(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")}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})}}function PA(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 hl="2.0.3",Xi=`DnalogelPlugin-PanoTagPlugin@${hl}`,IA=!1,kA=i=>`${Xi}--${i}`;class ml extends EA{constructor(e,n){super(e);m(this,"version",hl);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",to({currentMediaElement:null}));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,"disposedErrorLog",()=>{console.error(`${Xi} is disposed`)});this.params=F({debug:!1,config:this.config},n),this.debug=this.params.debug,this.config=this.params.config,Jg(1),Object.assign(window,{[`__PANOTAGPLUGIN_DEBUG_${Date.now()}__`]:this}),Object.assign(window,{__PANOTAGPLUGIN_DEBUG__:this})}load(e,n){return Y(this,null,function*(){var o,s;if(this.clearTags(),console.log(Xi," load:",{data:e}),this.config=St.default({},this.config,{globalConfig:(o=e.globalConfig)!=null?o:{},contentTypeConfig:(s=e.contentTypeConfig)!=null?s:{}}),this.debug)try{tp(this.five,this.tags)}catch(r){console.error(r)}return this.addTag(e.tagList,n)})}addTag(e,n){return Y(this,null,function*(){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r);return he(F({},r),{state:F({visible:void 0,unfolded:IA},a.initialState),hooks:new be.Subscribe,clickable:a.clickable,mergedConfig:a})}).filter(r=>r.position);return s.forEach(PA),this.tags.push(...s),np(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(),!0})})}changeConfig(e,n=!0){n?this.config=St.default({},this.config,e):this.config=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=St.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 Y(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 Y(this,null,function*(){const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({visible:!1},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("hide",{userAction:n,withAnimation:o})})}enable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!0},{userAction:n}),this.hooks.emit("enable",{userAction:n})}disable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!1},{userAction:n}),this.hooks.emit("disable",{userAction:n})}dispose(){var e,n,o,s,r,a;this.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.clearCache(),this.hooks.emit("dispose")}setState(e,n){if(this.store.disposed)return this.disposedErrorLog();const{userAction:o=!0,visibleWithAnimation:s=!1}=n,r=F({},this.state);this.state=Object.assign(this.state,e),this.store.visibleWithAnimation=s,r.visible!==this.state.visible&&(e.visible?this.handleShow():this.handleHide()),r.enabled!==this.state.enabled&&(e.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:r,userAction:o})}changeUnfoldedById(e,n){var r;const o=this.getTagById(e);if(!o)return;o.state.unfolded=n;const s=this.filterPointTag();(r=this.TagContainerSvelte)==null||r.$set({tags:s})}changeTagNormalById(e,n){const o=this.getTagById(e);!o||!o.tag3DContentSvelte||(o.tag3DContentSvelte.currentNormal=at(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=St.default({},s.data,n):s.data=F(F({},s.data),n),this.checkPanelTag(),this.updateRenderAllTags())}changeStickTypeById(e,n,o=!0){this.changeTagById(e,n,o)}changeTagById(e,n,o=!0){const s=this.getTagById(e);!n||(o?St.default(s,n):Object.assign(s,n),(s==null?void 0:s.tag3DContentSvelte)&&(n==null?void 0:n.normal)&&(s.tag3DContentSvelte.currentNormal=at(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})}setVisibleAndUnfolded(){return Y(this,arguments,function*({withAnimation:e}={withAnimation:!1}){if(!!this.isPanorama)return this.setVisibleByPanoIndex(),e?new Promise((n,o)=>{setTimeout(()=>{this.setUnfoldedByPanoIndex(),n()},10)}):(this.setUnfoldedByPanoIndex(),Promise.resolve())})}handleShow(){this.state.visible=!0,this.updateTagContainerVisible()}handleHide(){this.pauseCurrentMedia(),this.state.visible=!1,this.updateTagContainerVisible()}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.updateRenderAllTags()}handleDisable(){var e,n,o;this.pauseCurrentMedia(),this.state.enabled=!1,(n=(e=this.store).eventListenerDisposer)==null||n.call(e),(o=this.TagContainerSvelte)==null||o.$set({tags:[]}),this.filter3DTag().forEach(s=>{var r;(r=s.tag3DContentSvelte)==null||r.svelteApp.$destroy(),s.tag3DContentSvelte=void 0})}addEventListener(){const{five:e,hooks:n}=this,o=this.handleFiveWantsMoveToPano.bind(this),s=this.handleFiveModeChange.bind(this),r=this.handleFiveCameraUpdate.bind(this),a=this.handleFiveCameraUpdateDebounce(),l=this.handleFivePanoArrived.bind(this),c=this.loadVideoFirstFrame.bind(this),u=this.clickhandler.bind(this);return this.five.currentMode&&(this.isPanorama?(this.handleFivePanoArrived(),this.temporaryShow({withAnimation:!0})):this.temporaryHide()),e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),e.on("panoArrived",c),n.on("click",u),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),e.off("panoArrived",c),n.off("click",u),this.store.eventListenerDisposer=void 0}}loadVideoFirstFrame(){this.isIOSWX&&this.hooks.emit("loadVideoFirstFrame")}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(!this.store.disposed)return;const e=this.five.getElement(),n=()=>{!this.state.enabled||(this.show(),this.updateRenderAllTags())},o=()=>{!this.state.enabled||this.hide()},{observe:s,unobserve:r}=_s(op(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=_s(Ws(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){e==="Panorama"?this.five.once("panoArrived",()=>this.temporaryShow({withAnimation:!0})):this.temporaryHide()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&(n.visibleConfig.keep?e.temporaryState=he(F({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=he(F({},e.temporaryState),{visible:Boolean(n.visibleConfig.alwaysShowWhenMovePano)}))}),this.updateTagContainerVisible()}temporaryShow({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!0,this.updateTagContainerVisible()}temporaryHide({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!1,this.updateTagContainerVisible()}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.can("fold",e.tag),o=this.can("unfold",e.tag);n&&o&&(e.tag.state.unfolded=!e.tag.state.unfolded,e.tag.state.unfolded&&this.tags.forEach(s=>{s.id!==e.tag.id&&s.state&&this.can("fold",s)&&(s.state.unfolded=!1)}),this.updateRenderAllTags())}updateRenderAllTags(){this.updateRenderPointTag(),this.updateRenderPlaneTag()}updateTagContainerVisible(){var e;(e=this.TagContainerSvelte)==null||e.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation}),this.filter3DTag().forEach(n=>{var o;(o=n.tag3DContentSvelte)==null||o.svelteApp.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation})})}handleFiveCameraUpdateDebounce(){return Ws(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return Y(this,null,function*(){yield this.setVisibleAndUnfolded(),this.tags.forEach(e=>{e.temporaryState=he(F({},e.temporaryState),{visible:!0})}),this.store.visibleWithAnimation=!0,this.updateTagContainerVisible()})}setUnfoldedByCamera(){let e=!1;this.tags.forEach(n=>{const o=this.getUnfoldedByCamera(n);!n.state||o!==void 0&&(o===!0&&(e=!0),n.state.unfolded=o)}),e&&this.tags.forEach(n=>{const o=this.getTagConfig(n).unfoldedConfig;typeof o=="object"&&(o.autoUnfold||o.keep)||n.state&&(n.state.unfolded=!1)})}updateRenderPointTag(){var n;const e=this.sort(this.filterPointTag());if(this.setPointTagPosition(),this.TagContainerSvelte)this.TagContainerSvelte.$set({tags:e,state:this.state,temporaryState:this.temporaryState});else{const o=(n=this.five.getElement())==null?void 0:n.parentElement;if(!o)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new vA({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore}})}}updateRenderPlaneTag(){this.sort([...this.filterPlaneTag(),...this.filter3DPointTag()]).forEach(n=>{var o;if(n.tag3DContentSvelte){const{svelteApp:s,domContainer:r,initialNormal:a,currentNormal:l}=n.tag3DContentSvelte;if(s.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!a.equals(l)){const c=new H.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=$t(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:ip(this.five.camera.position,at(n.position),at(n.normal)),r=n.stickType==="Plane"?$a(n.position):at(n.normal),a=this.getTagConfig(n).tag3DConfig,l=this.css3DRenderPlugin.create3DDomContainer(s,a);if(!l)return;this.store.css3DRenderDisposer.set(n.id,l.dispose),n.tag3DContentSvelte={svelteApp:new fl({target:l.container,props:{tag:n,hooks:this.hooks,state:this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}}),domContainer:l,initialNormal:r,currentNormal:r}}}),this.checkPanelTag()}disposeAllCSS3DContainer(){for(const[e,n]of this.store.css3DRenderDisposer)n==null||n();this.store.css3DRenderDisposer=new Map}checkPanelTag(){this.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))}}}var pl=(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.Custom="Custom",i))(pl||{}),gl=(i=>(i.Two="2D",i.Three="3D",i))(gl||{}),Al=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(Al||{});const xA=(i,t)=>new ml(i,t);class mo extends H.Object3D{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()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}updatePosition(){this.position.copy(this.originObject3D.position)}updateQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,n){this.scale.applyMatrix4(e)}applyHelperQuaternion(e,n){this.applyQuaternion(e)}}class DA extends mo{}class LA extends mo{}class SA extends mo{}class TA extends SA{}class zA extends x.Group{constructor(e){super();m(this,"direction");this.direction=e||"x"}}class Ur extends x.Mesh{constructor(e,n,o){super(e,n);m(this,"direction");this.direction=o||"x"}}function MA(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new x.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function po(i,t,e){if(!t||!e||!i)return;const n=MA(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new x.Raycaster;return o.setFromCamera(n,i),o}function BA(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 ki extends zA{constructor(e){var u;super(e.direction);m(this,"line");m(this,"arrow");m(this,"lineHeight",.4);m(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new x.Color((u=e.color)!=null?u:16214315),o=new x.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:x.DoubleSide}),s=new x.ConeGeometry(.04,.1,32),r=new Ur(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new x.CylinderGeometry(a,a,.4,32),c=new Ur(l,o.clone(),e.direction);c.name=`line-${e.direction}`,this.line=c,this.formatArrow(),this.formatLine(),this.add(this.arrow,this.line)}formatArrow(){this.arrow.geometry.translate(0,this.lineHeight+this.arrowHeight/2,0),this.direction==="x"?(this.arrow.geometry.rotateX(Math.PI/2),this.arrow.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.arrow.geometry.rotateX(Math.PI/2)}formatLine(){this.line.geometry.translate(0,this.lineHeight/2,0),this.direction==="x"?(this.line.geometry.rotateX(Math.PI/2),this.line.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.line.geometry.rotateX(Math.PI/2)}}const xi={X:15618642,Y:4765519,Z:4227839};class rt{static get X(){return new x.Color(xi.X).convertSRGBToLinear().clone()}static get Y(){return new x.Color(xi.Y).convertSRGBToLinear().clone()}static get Z(){return new x.Color(xi.Z).convertSRGBToLinear().clone()}}class VA extends DA{constructor(e){super(e);m(this,"xArrow",new ki({direction:"x",color:rt.X}));m(this,"yArrow",new ki({direction:"y",color:rt.Y}));m(this,"zArrow",new ki({direction:"z",color:rt.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 Bt(i,t){return jA(document.createElement(t!=null?t:"div"),i)}function jA(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function QA(i){const t=Bt(F({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"9999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},i)),e=()=>{t.style.display!=="block"&&(!t.style.top||!t.style.left||(t.style.display="block"))};return{element:t,show:e,hide:()=>{t.style.display="none",t.style.top="",t.style.left=""},setLeftTop:(s,r)=>{t.style.left=s,t.style.top=r,e()}}}class RA extends LA{constructor(e,n){var o;super(e);m(this,"yzCircle",new Di({direction:"x",color:rt.X}));m(this,"xzCircle",new Di({direction:"y",color:rt.Y}));m(this,"xyCircle",new Di({direction:"z",color:rt.Z}));m(this,"xRingHelper",new Li({direction:"x"}));m(this,"yRingHelper",new Li({direction:"y"}));m(this,"zRingHelper",new Li({direction:"z"}));m(this,"xAngleHelper",new Si({direction:"x",color:rt.X}));m(this,"yAngleHelper",new Si({direction:"y",color:rt.Y}));m(this,"zAngleHelper",new Si({direction:"z",color:rt.Z}));m(this,"angleTips");m(this,"container");n&&(this.container=n==null?void 0:n.container,this.angleTips=QA({display:"none"}),(o=this.container)==null||o.appendChild(this.angleTips.element)),this.show()}updateAngleHelperQuaternion(){this.xAngleHelper.quaternion.copy(this.yzCircle.quaternion),this.yAngleHelper.quaternion.copy(this.xzCircle.quaternion),this.zAngleHelper.quaternion.copy(this.xyCircle.quaternion),this.xRingHelper.quaternion.copy(this.yzCircle.quaternion),this.yRingHelper.quaternion.copy(this.xzCircle.quaternion),this.zRingHelper.quaternion.copy(this.xyCircle.quaternion)}applyHelperQuaternion(e,n){this.yzCircle.applyQuaternion(e),this.xzCircle.applyQuaternion(e),this.xyCircle.applyQuaternion(e),this.xAngleHelper.baseAxes.applyQuaternion(e),this.yAngleHelper.baseAxes.applyQuaternion(e),this.zAngleHelper.baseAxes.applyQuaternion(e)}hide(){this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper)}show(){var e;this.add(this.xyCircle,this.xzCircle,this.yzCircle),this.remove(this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)==null||e.hide()}showDraggingHelper(e){var n;this.hide(),this.add(...this.filterRingHelper(e)),this.add(...this.filterAngleHelper(e)),(n=this.angleTips)==null||n.show()}dispose(){var e,n;this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)!=null&&e.element&&((n=this.container)==null||n.removeChild(this.angleTips.element))}filterRingHelper(e){return[this.xRingHelper,this.yRingHelper,this.zRingHelper].filter(n=>e.includes(n.direction))}filterAngleHelper(e){return[this.xAngleHelper,this.yAngleHelper,this.zAngleHelper].filter(n=>e.includes(n.direction))}}class Di extends x.Mesh{constructor(e){var n;super();m(this,"direction");m(this,"gapAngle",.02);m(this,"geometry",new x.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new x.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:x.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 Li extends x.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 x.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new x.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:x.DoubleSide}),c=new x.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 Si extends x.Mesh{constructor(e){var o;super();m(this,"direction");m(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new x.Vector3(0,0,1);break;case"y":this.baseAxes=new x.Vector3(1,0,0);break;case"z":this.baseAxes=new x.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new x.CircleGeometry(n,48,0,1e-4),this.material=new x.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:x.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function OA(){const i=Bt({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Bt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Bt({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:mt({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:mt({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:mt({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:mt({cursor:"ew-resize",right:n})},l={direction:"nesw",element:mt({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:mt({cursor:"ns-resize",top:n})},u={direction:"nwse",element:mt({cursor:"nwse-resize",left:n,top:n})},d={direction:"ew",element:mt({cursor:"ew-resize",left:n})};return new Array(s,a,c,d,o,r,l,u).forEach(h=>t.appendChild(h.element)),{container:i,squares:[o,s,r,a,l,c,u,d]}}function mt(i){const t=Bt(F({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=Bt({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=Bt({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 HA extends TA{constructor(e,n,o,s){super(e);m(this,"points",[]);m(this,"cornerPositions",[]);m(this,"css3DInstance");m(this,"plane");m(this,"css3DRenderer",new Jt);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 x.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new x.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 x.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}=OA();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)]}}new x.Vector3;function pe(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new x.Raycaster,this._selected=null,this._boundObjs={};var e=this;this._$onClick=function(){e._onClick.apply(e,arguments)},this._$onDblClick=function(){e._onDblClick.apply(e,arguments)},this._$onMouseMove=function(){e._onMouseMove.apply(e,arguments)},this._$onMouseDown=function(){e._onMouseDown.apply(e,arguments)},this._$onMouseUp=function(){e._onMouseUp.apply(e,arguments)},this._$onTouchMove=function(){e._onTouchMove.apply(e,arguments)},this._$onTouchStart=function(){e._onTouchStart.apply(e,arguments)},this._$onTouchEnd=function(){e._onTouchEnd.apply(e,arguments)},this._$onContextmenu=function(){e._onContextmenu.apply(e,arguments)},this._domElement.addEventListener("click",this._$onClick,!1),this._domElement.addEventListener("dblclick",this._$onDblClick,!1),this._domElement.addEventListener("mousemove",this._$onMouseMove,!1),this._domElement.addEventListener("mousedown",this._$onMouseDown,!1),this._domElement.addEventListener("mouseup",this._$onMouseUp,!1),this._domElement.addEventListener("touchmove",this._$onTouchMove,!1),this._domElement.addEventListener("touchstart",this._$onTouchStart,!1),this._domElement.addEventListener("touchend",this._$onTouchEnd,!1),this._domElement.addEventListener("contextmenu",this._$onContextmenu,!1)}pe.prototype.destroy=function(){this._domElement.removeEventListener("click",this._$onClick,!1),this._domElement.removeEventListener("dblclick",this._$onDblClick,!1),this._domElement.removeEventListener("mousemove",this._$onMouseMove,!1),this._domElement.removeEventListener("mousedown",this._$onMouseDown,!1),this._domElement.removeEventListener("mouseup",this._$onMouseUp,!1),this._domElement.removeEventListener("touchmove",this._$onTouchMove,!1),this._domElement.removeEventListener("touchstart",this._$onTouchStart,!1),this._domElement.removeEventListener("touchend",this._$onTouchEnd,!1),this._domElement.removeEventListener("contextmenu",this._$onContextmenu,!1)};pe.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"];pe.prototype._getRelativeMouseXY=function(i){var t=i.target||i.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},n=t,o=getComputedStyle(n,null);e.y+=parseInt(o.getPropertyValue("padding-top"),10),e.x+=parseInt(o.getPropertyValue("padding-left"),10);do e.x+=n.offsetLeft,e.y+=n.offsetTop,o=getComputedStyle(n,null),e.x+=parseInt(o.getPropertyValue("border-left-width"),10),e.y+=parseInt(o.getPropertyValue("border-top-width"),10);while(n=n.offsetParent);var s={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((i.pageX-e.x)/s.width)*2-1,y:-((i.pageY-e.y)/s.height)*2+1}};pe.prototype._objectCtxInit=function(i){i._3xDomEvent={}};pe.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent};pe.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent};pe.prototype._objectCtxGet=function(i){return i._3xDomEvent};pe.prototype.camera=function(i){return i&&(this._camera=i),this._camera};pe.prototype.bind=function(i,t,e,n){console.assert(pe.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]),o[t+"Handlers"].push({callback:e,useCapture:n}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(i)};pe.prototype.addEventListener=pe.prototype.bind;pe.prototype.unbind=function(i,t,e,n){console.assert(pe.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]);for(var s=o[t+"Handlers"],r=0;r<s.length;r++){var a=s[r];if(e==a.callback&&n==a.useCapture){s.splice(r,1);break}}var l=this._boundObjs[t].indexOf(i);console.assert(l!==-1),this._boundObjs[t].splice(l,1)};pe.prototype.removeEventListener=pe.prototype.unbind;pe.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1};pe.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new x.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o),a=this._selected;if(r.length>0){var l,c,u,d=r[0],f=d.object;this._selected=f,u=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;u&&this._notify("mousemove",f,n,d),l&&this._notify("mouseover",f,n,d),c&&this._notify("mouseout",a,n,d)}};pe.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new x.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o,!0);if(r.length!==0){for(var a=r[0],l=a.object,c=this._objectCtxGet(l),u=l.parent;typeof c=="undefined"&&u;)c=this._objectCtxGet(u),u=u.parent;!c||this._notify(i,l,n,a)}}};pe.prototype._notify=function(i,t,e,n){var o=this._objectCtxGet(t),s=o?o[i+"Handlers"]:null;if(console.assert(arguments.length===4),!o||!s||s.length===0){t.parent&&this._notify(i,t.parent,e,n);return}for(var s=o[i+"Handlers"],r=0;r<s.length;r++){var a=s[r],l=!0;a.callback({type:i,target:t,origDomEvent:e,intersect:n,stopPropagation:function(){l=!1}}),!!l&&a.useCapture===!1&&t.parent&&this._notify(i,t.parent,e,n)}};pe.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)};pe.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)};pe.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)};pe.prototype._onMouseMove=function(i){var t=this._getRelativeMouseXY(i);this._onMove("mousemove",t.x,t.y,i),this._onMove("mouseover",t.x,t.y,i),this._onMove("mouseout",t.x,t.y,i)};pe.prototype._onClick=function(i){this._onMouseEvent("click",i)};pe.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)};pe.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)};pe.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)};pe.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)};pe.prototype._onTouchMove=function(i){if(i.touches.length==1){i.preventDefault();var t=Number(i.touches[0].pageX/window.innerWidth)*2-1,e=-(i.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,i),this._onMove("mouseover",t,e,i),this._onMove("mouseout",t,e,i)}};pe.prototype._onTouchEvent=function(i,t){if(t.touches.length==1){t.preventDefault();var e=Number(t.touches[0].pageX/window.innerWidth)*2-1,n=-(t.touches[0].pageY/window.innerHeight)*2+1;this._onEvent(i,e,n,t)}};let Lt=null;class go{constructor(t,e,n,o,s,r,a){m(this,"hooks",new Kt);m(this,"helperObject3D");m(this,"originObject3D");m(this,"camera");m(this,"model");m(this,"scene");m(this,"container");m(this,"domEvents");m(this,"isDragging",!1);m(this,"onRender");m(this,"enabled",!1);m(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});this.camera=t,this.model=e,this.originObject3D=n,this.helperObject3D=o,this.container=s,this.scene=r,this.domEvents=new pe(t,s),this.onRender=a!=null?a:()=>{},this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable()}initialHelperPosition(){this.helperObject3D.updatePosition()}initialHelperQuaternion(){this.helperObject3D.updateQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.render())}disable(){!this.enabled||(this.enabled=!1,this.scene.remove(this.helperObject3D),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){this.helperObject3D.dispose(),this.scene.remove(this.helperObject3D),this.render()}setOpacity(t){this.setOriginOpacityProperty();const e=this.originObject3D;if(e instanceof x.Mesh&&(e.material.opacity=t),e.isCSS3DObjectPlus){const n=e;n.container.style.opacity=t.toString()}this.render()}restoreOpacity(){if(Lt===null)return;const t=this.originObject3D;if(t instanceof x.Mesh&&(t.material.opacity=Lt.opacity),t.isCSS3DObjectPlus){const e=t;e.container.style.opacity=Lt.opacity.toString()}this.render()}setOriginOpacityProperty(){var t,e;if(Lt===null){const n=this.originObject3D;n instanceof x.Mesh&&(Lt={opacity:n.material.opacity}),n instanceof na&&(Lt={opacity:(t=n.container.style.opacity)!=null?t:1}),n.isCSS3DObjectPlus&&(Lt={opacity:Number((e=n.container.style.opacity)!=null?e:1)})}}updateHelperPosition(){this.helperObject3D.updatePosition()}updateHelperQuaternion(){this.helperObject3D.updateQuaternion()}applyHelperMatrix4(t){this.helperObject3D.applyMatrix4(t)}applyHelperQuaternion(t,e){this.helperObject3D.applyHelperQuaternion(t,e)}applyHelperScaleMatrix4(t,e){this.helperObject3D.applyHelperScaleMatrix4(t,e)}onWantsGesture(t,e,n){if(this.isDragging)return!1}render(){this.onRender()}hoverListener(t,e=16777215,n=1){const o=(Array.isArray(t)?t:[t]).filter(Ue),s=[];for(const r of o)if(r instanceof x.Mesh||r instanceof x.Group){const a=r instanceof x.Group?r.children.filter(f=>f instanceof x.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()},u=()=>{this.isDragging||l()},d=()=>{this.isDragging||c()};for(const f of a)this.domEvents.addEventListener(f,"mouseover",u),this.domEvents.addEventListener(f,"mouseout",d),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),s.push(()=>{this.domEvents.removeEventListener(f,"mouseover",u),this.domEvents.removeEventListener(f,"mouseout",d),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c)})}return()=>s.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,n=this.helperObject3D;if(!n)return;let o;const s=t.intersectObject(n,!0)[0];if(!!s&&(o=s,o.object=n,!!o)){if(this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<o.point.distanceTo(e))return}return o.object}}}class FA extends go{constructor(...e){super(...e);m(this,"startInfo");const n=this.helperObject3D;this.hoverListener([n.xArrow,n.yArrow,n.zArrow]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();const s=new x.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new x.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new x.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(o){case"x":return s;case"y":return r;case"z":return a}})(),c=(()=>{switch(o){case"x":case"y":return a;case"z":return s}})(),u=n.point.clone(),d=new x.Plane;d.setFromNormalAndCoplanarPoint(c,u),this.startInfo={startVectorProject:u.clone().projectOnVector(l),directionVector:l,plane:d},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=po(this.camera,e,this.container);return n?(console.log("%c RotateController dragging","color: #49de1b"),this.move(n),!1):this.dragEnd()}move(e){if(!this.startInfo)return this.dragEnd();const{plane:n,directionVector:o,startVectorProject:s}=this.startInfo,r=this.originObject3D,a=e.ray.intersectPlane(n,new x.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),u=new x.Matrix4;u.setPosition(c),r.applyMatrix4(u),this.helperObject3D.applyMatrix4(u),s.copy(l),this.hooks.emit("positionUpdate",{matrix4:u})}dragEnd(){!this.isDragging||(console.log("%c MoveController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class Ti{constructor(t,e,n,o){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});const{camera:s,model:r,scene:a}=t,l=t.getElement();if(this.five=t,!s||!r||!l||!a)return;const c=()=>{t.needsRender=!0};this.helperController=new e(s,r,n,o,l,a,c),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture)}}const GA="v1.0.1",NA="Object3DHelper",Ao=`${NA}@${GA}`,WA=()=>{console.error(`${Ao} is disposed`)},_A=()=>{console.warn(`${Ao} is disabled`)},XA=()=>{console.error(`${Ao} is disabled`)};class YA{constructor(t,e){m(this,"controllers",{});m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"hooks",new Kt);m(this,"helpers");m(this,"eventListener",{});m(this,"handlePositionUpdate",(t,...e)=>{var s,r,a,l;const[n]=e,o=n==null?void 0:n.matrix4;o&&(t!==this.controllers.moveController&&((s=this.controllers.moveController)==null||s.applyHelperMatrix4(o)),t!==this.controllers.rotateController&&((r=this.controllers.rotateController)==null||r.applyHelperMatrix4(o)),t!==this.controllers.scaleController&&((a=this.controllers.scaleController)==null||a.applyHelperMatrix4(o)),(l=this.helpers.outlineHelper)==null||l.applyMatrix4(o))});m(this,"handleScaleUpdate",(t,...e)=>{var s,r;const[n]=e,o=n==null?void 0:n.matrix4;o&&((s=this.controllers.scaleController)==null||s.applyHelperScaleMatrix4(o,n),(r=this.helpers.outlineHelper)==null||r.scale.applyMatrix4(o))});m(this,"handleRotateUpdate",(t,...e)=>{var o,s,r,a;const[n]=e;if(n){const{quaternion:l,origin:c}=n;l&&(t!==this.controllers.moveController&&((o=this.controllers.moveController)==null||o.applyHelperQuaternion(l,c)),t!==this.controllers.rotateController&&((s=this.controllers.rotateController)==null||s.applyHelperQuaternion(l,c)),t!==this.controllers.scaleController&&((r=this.controllers.scaleController)==null||r.applyHelperQuaternion(l,c)),(a=this.helpers.outlineHelper)==null||a.applyQuaternion(l))}});t&&this.addControllers(t),this.helpers=e!=null?e:{},this.setState(this.state)}show(t){return Y(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return Y(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 WA();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return XA();const n=F({},this.state);this.state=F(F({},this.state),t),t.disposed!==void 0&&t.disposed!==n.disposed&&t.disposed&&this.handleDispose(),t.visible!==void 0&&this.handleVisible(t.visible),t.enabled!==void 0&&this.handleEnable(t.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:n})}addControllers(t){this.controllers=F(F({},this.controllers),t),this.addEventListener(),this.setState(this.state)}addHelpers(t){this.helpers=F(F({},this.helpers),t)}getCurrentState(){return this.state}addEventListener(){for(const t in this.controllers){if(!t)continue;const e=t;this.eventListener[e]||(this.eventListener[e]=(()=>{const n=this.controllers[e];if(!n)return;const o=()=>this.handleStart(n),s=()=>this.handleEnd(n),r=(...c)=>this.handlePositionUpdate(n,...c),a=(...c)=>this.handleRotateUpdate(n,...c),l=(...c)=>this.handleScaleUpdate(n,...c);return n.hooks.on("moveStart",o),n.hooks.on("rotateStart",o),n.hooks.on("scaleStart",o),n.hooks.on("positionUpdate",r),n.hooks.on("rotateUpdate",a),n.hooks.on("scaleUpdate",l),n.hooks.on("moveEnd",s),n.hooks.on("rotateEnd",s),n.hooks.on("scaleEnd",s),()=>{n.hooks.off("moveStart",o),n.hooks.off("rotateStart",o),n.hooks.off("scaleStart",o),n.hooks.off("positionUpdate",r),n.hooks.off("rotateUpdate",a),n.hooks.off("scaleUpdate",l),n.hooks.off("moveEnd",s),n.hooks.off("rotateEnd",s),n.hooks.off("scaleEnd",s)}})())}}handleEnd(t){t&&this.setOtherHelpersVisible(!0,t)}handleStart(t){t&&this.setOtherHelpersVisible(!1,t)}setOtherHelpersVisible(t,e){var n,o,s,r;t?((s=this.controllers.moveController)==null||s.helperObject3D.show(),(r=this.controllers.rotateController)==null||r.helperObject3D.show()):(e!==this.controllers.moveController&&((n=this.controllers.moveController)==null||n.helperObject3D.hide()),e!==this.controllers.rotateController&&((o=this.controllers.rotateController)==null||o.helperObject3D.hide()))}handleEnable(t,e=!0){t?(this.everyControllerDo(n=>{n.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(n=>{n.disable(),n.restoreOpacity()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(n=>{n.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(n=>{n.hide(),n.restoreOpacity()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:e}))),this.state.visible=t}everyControllerDo(t){Object.values(this.controllers).forEach(e=>{e&&t(e)})}handleDispose(){var t,e;Object.values(this.controllers).forEach(n=>{n==null||n.dispose(),n==null||n.restoreOpacity()});for(const n in this.controllers){if(!n)continue;const o=n;(e=(t=this.eventListener)[o])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&_A()}}class UA extends go{constructor(...e){super(...e);m(this,"startInfo");m(this,"lastRotation");m(this,"rotations",[]);m(this,"helperObject3DQuaternion",this.originObject3D.quaternion.clone());const n=this.helperObject3D;this.hoverListener([n.xyCircle,n.xzCircle,n.yzCircle]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}initialHelperQuaternion(){this.helperObject3D.updateAngleHelperQuaternion(),this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();this.helperObject3D.updateAngleHelperQuaternion();const s=n.point,r=this.originObject3D.position.clone(),a=this.getAngleHelper(o);this.setTipsAngle(0);const l=s.clone();l.y+=.2,this.setTipsPosition(l);const c=new x.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),u=new x.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),d=new x.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),f=(()=>{switch(o){case"x":return c;case"y":return u;case"z":return d}})(),h=new x.Plane().setFromNormalAndCoplanarPoint(f,s),p=new x.Vector3;h.projectPoint(s.clone(),p);const g=p.clone().sub(r),A=g.clone(),v=g.angleTo(a.baseAxes);this.setAngleHelperStart(o,v),this.setAngleHelperLength(o,0),this.rotations.push({vector:g.clone(),direction:!0}),this.startInfo={direction:o,startVector:g,staticStartVector:A,plane:h,angleHelper:a},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("rotateStart"),this.isDragging=!0,console.log(`%c RotateController dragStart ${o}`,"color: #e5af2e")}dragging(e){var o;if(!this.isDragging)return;const n=po(this.camera,e,this.container);return n?(console.log(`%c RotateController dragging ${(o=this.startInfo)==null?void 0:o.direction}`,"color: #49de1b"),this.rotate(n),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:n,plane:o,angleHelper:s,staticStartVector:r,direction:a}=this.startInfo,l=this.originObject3D,c=e.ray.intersectPlane(o,new x.Vector3);if(!c)return;const u=l.position.clone(),d=new x.Vector3;o.projectPoint(c.clone(),d);const f=d.clone().sub(u);if(n.angleTo(f)===0||(this.lastRotation===void 0&&(this.lastRotation={angle:0}),this.rotations.length===0))return;const h=(()=>{if(this.rotations.length===1)return f.angleTo(s.baseAxes)>r.angleTo(s.baseAxes);{const g=this.rotations[this.rotations.length-1],A=this.rotations[this.rotations.length-2],v=f.angleTo(A.vector),w=f.angleTo(g.vector),y=g.vector.angleTo(A.vector);if(y===0||w===0||v===0)return;if(v>w&&v>y)return g.direction;if(v<y&&w<y||v<w&&w>y)return!g.direction}})();if(h===void 0)return console.warn("rotationDirection is undefined");this.rotations.push({vector:f,direction:h}),this.rotations=this.rotations.slice(-2),this.lastRotation.angle=this.lastRotation.angle+f.angleTo(n)*(h?1:-1),this.setAngleHelperLength(a,this.lastRotation.angle),this.setTipsAngle(this.lastRotation.angle/Math.PI*180);const p=new x.Quaternion().setFromUnitVectors(n.clone().normalize(),f.clone().normalize());l.applyQuaternion(p),this.helperObject3D.applyHelperQuaternion(p),this.helperObject3DQuaternion.premultiply(p),this.hooks.emit("rotateUpdate",{quaternion:p,origin:u}),this.startInfo.startVector=f}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 x.Mesh&&o.geometry instanceof x.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new x.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 x.Mesh&&r.geometry instanceof x.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new x.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 JA extends go{constructor(...e){super(...e);m(this,"startInfo")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}getDragPlane(){const e=new x.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new H.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=po(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n),console.log("%c RectangleScaleController dragging","color: #49de1b")}scale(e){var V,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 H.Vector3);if(!a||BA(a,this.camera.position))return;const l=new H.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:u}=o,d=new H.Vector3().subVectors(r[1],r[0]),f=new H.Vector3().subVectors(r[3],r[0]),h=G=>{const X=new H.Vector3(0,0,0);if(!this.startInfo)return X;const j=(G==="ew"?d:f).clone(),E=c.clone().projectOnVector(j),R=a.clone().projectOnVector(j),O=l.clone().projectOnVector(j);if(R.equals(E))return X;if(G==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const _=new H.Vector3().subVectors(R,O),Z=_.x<0&&j.x>=0,ue=_.y<0&&j.y>=0,de=_.z<0&&j.z>=0;this.startInfo.dragPointInCenterBottom=Z||ue||de}if(G==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const _=new H.Vector3().subVectors(R,O),Z=_.x<0&&j.x>=0,ue=_.y<0&&j.y>=0,de=_.z<0&&j.z>=0;this.startInfo.dragPointInCenterLeft=Z||ue||de}const N=new H.Vector3().subVectors(R,E),J=N.length();return J>.3?(console.warn("offset.length() > 0.3, skipped",J),X):N},p=h("ew"),g=h("ns"),A=()=>{const G=p;this.helperObject3D.cornerPositions.forEach((X,j)=>{var E;(E=this.startInfo)!=null&&E.dragPointInCenterLeft?(j===0||j===3)&&X.add(G):(j===1||j===2)&&X.add(G)})},v=()=>{const G=g;this.helperObject3D.cornerPositions.forEach((X,j)=>{var E;(E=this.startInfo)!=null&&E.dragPointInCenterBottom?(j===0||j===1)&&X.add(G):(j===2||j===3)&&X.add(G)})};switch(u){case"ew":A();break;case"ns":v();break;case"nesw":case"nwse":A(),v()}const w=new H.Vector3().subVectors(r[1],r[0]).length()/d.length(),y=new H.Vector3().subVectors(r[3],r[0]).length()/f.length(),I=new H.Vector3(w,y,1),P=new x.Matrix4().scale(I);n.isCSS3DObjectPlus?n.applyScaleMatrix4(P):n.scale.applyMatrix4(P),o.position.copy(a);const C=new H.Vector3().addVectors(r[0],r[2]).divideScalar(2),L=new H.Vector3().subVectors(C,l),D=new x.Matrix4().setPosition(L);n.applyMatrix4(D),(V=this.helperObject3D.css3DInstance)==null||V.css3DObject.applyMatrix4(D),(W=this.helperObject3D.plane)==null||W.applyMatrix4(D),this.hooks.emit("scaleUpdate",{matrix4:P,helperOrigin:l}),this.hooks.emit("positionUpdate",{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 ZA extends JA{constructor(...t){super(...t),this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(t=>{if(!t)return;const e=t.point,n=r=>this.dragStart(r,t),o=this.dragging.bind(this),s=this.dragEnd.bind(this);e.addEventListener("dragstart",n),e.addEventListener("drag",o),e.addEventListener("dragend",s)})}}const vo="v1.0.0",Yi="Object3DHelperPlugin",fi=`${Yi}@${vo}`,qA=()=>{console.error(`${fi} is disposed`)},KA=()=>{console.warn(`${fi} is disabled`)},$A=()=>{console.error(`${fi} is disabled`)};class vl extends ai{constructor(e){super(e);m(this,"version",vo);m(this,"name",Yi);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 Jt(this.five.scene),console.warn("Object3DHelper: \u4F7F\u7528\u6B64\u63D2\u4EF6\u9700\u8981\u5728\u521D\u59CB\u5316five\u65F6\uFF0C\u8BBE\u7F6Efive\u53C2\u6570: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${Yi.toUpperCase()}_DEBUG__`]:this})}show(e){return Y(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Y(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 qA();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return $A();const o=F({},this.state);this.state=F(F({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:o})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,n={}){var u;if(!e)return console.error("Object3D is undefined");if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const o=new YA;this.objectHelperMap.set(e,o);const s=(u=this.five.getElement())==null?void 0:u.parentElement,r=this.five.camera,{moveHelper:a=!0,rotateHelper:l=!0,scaleHelper:c=!0}=n;if(a){const d=new VA(e),f=new Ti(this.five,FA,e,d);o.addControllers({moveController:f.helperController})}if(l){let d;s&&r&&(d={container:s});const f=new RA(e,d),h=new Ti(this.five,UA,e,f);o.addControllers({rotateController:h.helperController})}if(c&&s){const d=new HA(e,s,r,this.five.scene),f=new Ti(this.five,ZA,e,d);o.addControllers({scaleController:f.helperController})}e.isCSS3DObjectPlus&&oa(this.five).then(()=>{var d,f;if(e.isCSS3DObjectPlus){const h=e,p=(d=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?d:sa(this.five);p&&e&&(this.css3DObjectParentMap.set(h,h.parent),h.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(p),(f=this.css3DRender.getBehindCSS3DObjectGroup())==null||f.add(h),this.css3DRender.render(this.five.camera))}})}removeObject3DHelper(e){const n=this.objectHelperMap.get(e);if(!!n){if(e.isCSS3DObjectPlus){const o=e,s=this.css3DObjectParentMap.get(o);s==null||s.add(o),this.css3DRender.render(this.five.camera)}this.objectHelperMap.delete(e),n.dispose()}}handleEnable(e,n=!0){e?(this.everyHelperDo(o=>o.enable()),this.hooks.emit("enable",{userAction:n})):(this.everyHelperDo(o=>o.disable()),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){e?(this.everyHelperDo(o=>o.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.everyHelperDo(o=>o.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}handleDispose(){this.everyHelperDo(e=>e.dispose())}everyHelperDo(e){this.objectHelperMap.forEach(n=>{n&&e(n)})}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&KA()}}const ev=i=>new vl(i);exports.CSS3DRender=Jt;exports.CSS3DRenderPlugin=$t;exports.CameraMovementEffect=Ta;exports.CameraMovementPlugin=uf;exports.ContentType=pl;exports.CruisePlugin=Um;exports.CruisePluginController=uo;exports.DIRECTION=Yt;exports.DISPLAY_STRATEGY_TYPE=Tt;exports.DimensionType=gl;exports.FLOOR_PLAN_ATTACHED_TO=At;exports.FLOOR_TYPE_MAP=qd;exports.GuideLinePlugin=Za;exports.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=zt;exports.ItemLabelPlugin=bm;exports.Magnifier=Va;exports.MapviewFloorplanPlugin=Ld;exports.ModelChassisCompassPlugin=ef;exports.ModelEntryDoorGuidePlugin=of;exports.ModelFloorplanPlugin=Id;exports.ModelItemLabelPlugin=$h;exports.ModelRoomLabelPlugin=Qc;exports.ModelTVVideoPlugin=nm;exports.ModelViewPlugin=_l;exports.Object3DHelperController=vl;exports.Object3DHelperPlugin=ev;exports.PLUGIN=fi;exports.PaintBrush=Wl;exports.PaintBrushTypeEnum=st;exports.PanoCompassPlugin=Tf;exports.PanoCursorRaycasterPlugin=cc;exports.PanoDoorLabelPlugin=zm;exports.PanoFloorplanRadarPlugin=Jd;exports.PanoMeasurePlugin=xh;exports.PanoRulerPlugin=pf;exports.PanoRulerProPlugin=kf;exports.PanoSpatialTagPlugin=Gh;exports.PanoTagPlugin=xA;exports.PanoTagPluginController=ml;exports.PointType=Al;exports.ROOM_FETILE_TYPE_MAP=Zd;exports.ROOM_TYPE_MAP=Kd;exports.Rotation=qe;exports.TopviewFloorplanPlugin=Td;exports.Util=Gg;exports.VERSION=vo;exports.itemLabelPluginServerParams=ym;exports.modelItemLabelPluginServerParams=em;exports.modelRoomLabelPluginServerParams=Rc;exports.pluginFlag=kA;