@realsee/dnalogel 2.0.0-alpha.36 → 2.0.0-alpha.39

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 (118) hide show
  1. package/dist/ItemLabelPlugin/index.js +60 -36
  2. package/dist/ItemLabelPlugin/typings.d.ts +4 -0
  3. package/dist/ModelViewPlugin/Plugin.d.ts +4 -4
  4. package/dist/ModelViewPlugin/index.js +2 -3
  5. package/dist/PanoRulerProPlugin/Controller.d.ts +15 -0
  6. package/dist/PanoRulerProPlugin/index.d.ts +8 -0
  7. package/dist/PanoRulerProPlugin/index.js +1006 -0
  8. package/dist/PanoRulerProPlugin/typings.d.ts +46 -0
  9. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -1
  10. package/dist/floorplan/ModelFloorplanPlugin/index.js +8 -1
  11. package/dist/index.d.ts +2 -0
  12. package/dist/index.es.js +1036 -243
  13. package/dist/index.js +1037 -242
  14. package/dist/index.umd.js +1037 -242
  15. package/dist/shared-utils/logger.d.ts +16 -0
  16. package/docs/assets/search.js +1 -1
  17. package/docs/classes/Magnifier.html +4 -4
  18. package/docs/classes/ModelRoomLabelController.html +4 -4
  19. package/docs/enums/CameraMovementEffect.html +2 -2
  20. package/docs/enums/DIRECTION.html +1 -1
  21. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  22. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  23. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
  24. package/docs/enums/Rotation.html +2 -2
  25. package/docs/index.html +2 -2
  26. package/docs/interfaces/CSS3DRenderPluginExportType.html +2 -2
  27. package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
  28. package/docs/interfaces/FloorplanBounding.html +4 -4
  29. package/docs/interfaces/FloorplanData.html +2 -2
  30. package/docs/interfaces/FloorplanEntrance.html +7 -7
  31. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  32. package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
  33. package/docs/interfaces/FloorplanFloorData.html +2 -2
  34. package/docs/interfaces/FloorplanImagePosition.html +2 -2
  35. package/docs/interfaces/FloorplanObserver.html +2 -2
  36. package/docs/interfaces/FloorplanOutlineItem.html +2 -2
  37. package/docs/interfaces/FloorplanPosition.html +2 -2
  38. package/docs/interfaces/FloorplanRoomItem.html +6 -6
  39. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  40. package/docs/interfaces/FloorplanServerBounding.html +4 -4
  41. package/docs/interfaces/FloorplanServerComputedData.html +1 -1
  42. package/docs/interfaces/FloorplanServerData.html +2 -2
  43. package/docs/interfaces/FloorplanServerEntrance.html +7 -7
  44. package/docs/interfaces/FloorplanServerFloorData.html +2 -2
  45. package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
  46. package/docs/interfaces/FloorplanServerObserver.html +2 -2
  47. package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
  48. package/docs/interfaces/FloorplanServerPosition.html +2 -2
  49. package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
  50. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  51. package/docs/interfaces/ItemLabelPluginData.html +1 -1
  52. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
  53. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
  54. package/docs/interfaces/LineJson.html +1 -1
  55. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  56. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  57. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  58. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  59. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  60. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  61. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  62. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  63. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  64. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  65. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  66. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  67. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  68. package/docs/interfaces/OpenParameter.html +2 -2
  69. package/docs/interfaces/PanoCompassPluginData.html +1 -1
  70. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
  71. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  72. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  73. package/docs/interfaces/PanoMeasureParameterType.html +1 -1
  74. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  75. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  76. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  77. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -0
  78. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -0
  79. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -0
  80. package/docs/interfaces/PanoRulerProPluginState.html +1 -0
  81. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  82. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  83. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  84. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  85. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  86. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  87. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  88. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  89. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  90. package/docs/interfaces/Point.html +1 -1
  91. package/docs/interfaces/PointJson.html +1 -1
  92. package/docs/interfaces/Room.html +1 -1
  93. package/docs/interfaces/RoomInfo.html +1 -1
  94. package/docs/interfaces/RoomLabel.html +7 -7
  95. package/docs/interfaces/RoomRules.html +1 -1
  96. package/docs/interfaces/Rooms.html +1 -1
  97. package/docs/modules.html +19 -17
  98. package/libs/ItemLabelPlugin/ItemLabelComponent.js +34 -21
  99. package/libs/ItemLabelPlugin/Plugin.js +16 -10
  100. package/libs/ItemLabelPlugin/typings.d.ts +4 -0
  101. package/libs/ItemLabelPlugin/utils/parseData.js +1 -1
  102. package/libs/ModelViewPlugin/Plugin.d.ts +4 -4
  103. package/libs/ModelViewPlugin/Plugin.js +2 -3
  104. package/libs/PanoRulerProPlugin/Controller.d.ts +15 -0
  105. package/libs/PanoRulerProPlugin/Controller.js +110 -0
  106. package/libs/PanoRulerProPlugin/RulerItem.js +314 -0
  107. package/libs/PanoRulerProPlugin/RulerItems.js +377 -0
  108. package/libs/PanoRulerProPlugin/index.d.ts +8 -0
  109. package/libs/PanoRulerProPlugin/index.js +8 -0
  110. package/libs/PanoRulerProPlugin/typings.d.ts +46 -0
  111. package/libs/PanoRulerProPlugin/typings.js +1 -0
  112. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -1
  113. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +8 -1
  114. package/libs/index.d.ts +2 -0
  115. package/libs/index.js +3 -0
  116. package/libs/shared-utils/logger.d.ts +16 -0
  117. package/libs/shared-utils/logger.js +47 -0
  118. package/package.json +1 -1
package/dist/index.umd.js CHANGED
@@ -80,8 +80,7 @@
80
80
  };
81
81
  const handleModelLoaded = () => {
82
82
  function cloneMaterial(material) {
83
- material = material.clone();
84
- material.uniforms.modelAlpha.value = 1;
83
+ material.clone().uniforms.modelAlpha.value = 1;
85
84
  if (material.uniforms.map.value) {
86
85
  material.uniforms.map.value.needsUpdate = true;
87
86
  }
@@ -129,7 +128,7 @@
129
128
  return;
130
129
  const element = renderer.domElement;
131
130
  const container = element.parentNode;
132
- if (container && container.nodeName) {
131
+ if (container === null || container === void 0 ? void 0 : container.nodeName) {
133
132
  const { width = container.offsetWidth, height = container.offsetHeight } = size;
134
133
  renderer.setSize(width, height);
135
134
  // 修改摄像机 aspect 比值
@@ -479,11 +478,11 @@
479
478
 
480
479
  /* src/ModelRoomLabelPlugin/RoomLabelItem.svelte generated by Svelte v3.47.0 */
481
480
 
482
- function add_css$o(target) {
481
+ function add_css$p(target) {
483
482
  internal.append_styles(target, "svelte-1ak9fbs", ".room-label-item.svelte-1ak9fbs{position:absolute;font-size:0.41667rem;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.room-label-item__text.svelte-1ak9fbs{position:absolute;left:0;top:-3.33333rem;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:1.04167rem;min-width:1.66667rem;padding:0 0.3125rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-1ak9fbs{position:absolute;top:-2.29167rem;height:2.5rem;width:1px;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-1ak9fbs{font-size:0.52083rem}");
484
483
  }
485
484
 
486
- function create_fragment$s(ctx) {
485
+ function create_fragment$u(ctx) {
487
486
  let div1;
488
487
  let span;
489
488
  let t0_value = /*roomLabel*/ ctx[0].name + "";
@@ -550,7 +549,7 @@
550
549
  };
551
550
  }
552
551
 
553
- function instance$s($$self, $$props, $$invalidate) {
552
+ function instance$u($$self, $$props, $$invalidate) {
554
553
  let { five } = $$props;
555
554
  let { roomLabel } = $$props;
556
555
 
@@ -573,7 +572,7 @@
573
572
  class RoomLabelItem extends internal.SvelteComponent {
574
573
  constructor(options) {
575
574
  super();
576
- internal.init(this, options, instance$s, create_fragment$s, internal.safe_not_equal, { five: 2, roomLabel: 0 }, add_css$o);
575
+ internal.init(this, options, instance$u, create_fragment$u, internal.safe_not_equal, { five: 2, roomLabel: 0 }, add_css$p);
577
576
  }
578
577
  }
579
578
 
@@ -581,18 +580,18 @@
581
580
 
582
581
  const { Map: Map_1 } = internal.globals;
583
582
 
584
- function add_css$n(target) {
583
+ function add_css$o(target) {
585
584
  internal.append_styles(target, "svelte-9eg4zi", ".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}");
586
585
  }
587
586
 
588
- function get_each_context$a(ctx, list, i) {
587
+ function get_each_context$c(ctx, list, i) {
589
588
  const child_ctx = ctx.slice();
590
589
  child_ctx[12] = list[i];
591
590
  return child_ctx;
592
591
  }
593
592
 
594
593
  // (82:2) {#each roomLabels as roomLableItem (roomLableItem.id)}
595
- function create_each_block$a(key_1, ctx) {
594
+ function create_each_block$c(key_1, ctx) {
596
595
  let first;
597
596
  let roomlabelitem;
598
597
  let current;
@@ -640,7 +639,7 @@
640
639
  };
641
640
  }
642
641
 
643
- function create_fragment$r(ctx) {
642
+ function create_fragment$t(ctx) {
644
643
  let div;
645
644
  let each_blocks = [];
646
645
  let each_1_lookup = new Map_1();
@@ -650,9 +649,9 @@
650
649
  const get_key = ctx => /*roomLableItem*/ ctx[12].id;
651
650
 
652
651
  for (let i = 0; i < each_value.length; i += 1) {
653
- let child_ctx = get_each_context$a(ctx, each_value, i);
652
+ let child_ctx = get_each_context$c(ctx, each_value, i);
654
653
  let key = get_key(child_ctx);
655
- each_1_lookup.set(key, each_blocks[i] = create_each_block$a(key, child_ctx));
654
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$c(key, child_ctx));
656
655
  }
657
656
 
658
657
  return {
@@ -680,7 +679,7 @@
680
679
  if (dirty & /*roomLabels, five*/ 3) {
681
680
  each_value = /*roomLabels*/ ctx[0];
682
681
  internal.group_outros();
683
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$a, null, get_each_context$a);
682
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$c, null, get_each_context$c);
684
683
  internal.check_outros();
685
684
  }
686
685
  },
@@ -712,7 +711,7 @@
712
711
  };
713
712
  }
714
713
 
715
- function instance$r($$self, $$props, $$invalidate) {
714
+ function instance$t($$self, $$props, $$invalidate) {
716
715
  let rendererSize;
717
716
  let { five } = $$props;
718
717
  let { roomLabels } = $$props;
@@ -837,7 +836,7 @@
837
836
  class RoomLabelItems extends internal.SvelteComponent {
838
837
  constructor(options) {
839
838
  super();
840
- internal.init(this, options, instance$r, create_fragment$r, internal.safe_not_equal, { five: 1, roomLabels: 0 }, add_css$n);
839
+ internal.init(this, options, instance$t, create_fragment$t, internal.safe_not_equal, { five: 1, roomLabels: 0 }, add_css$o);
841
840
  }
842
841
  }
843
842
 
@@ -1125,11 +1124,11 @@
1125
1124
 
1126
1125
  /* src/floorplan/Components/Camera.svelte generated by Svelte v3.47.0 */
1127
1126
 
1128
- function add_css$m(target) {
1127
+ function add_css$n(target) {
1129
1128
  internal.append_styles(target, "svelte-17cl35n", ".floorplan__camera-position.svelte-17cl35n{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17cl35n{position:absolute;background-repeat:no-repeat;background-size:100%}");
1130
1129
  }
1131
1130
 
1132
- function create_fragment$q(ctx) {
1131
+ function create_fragment$s(ctx) {
1133
1132
  let div1;
1134
1133
  let div0;
1135
1134
 
@@ -1166,7 +1165,7 @@
1166
1165
  };
1167
1166
  }
1168
1167
 
1169
- function instance$q($$self, $$props, $$invalidate) {
1168
+ function instance$s($$self, $$props, $$invalidate) {
1170
1169
  let { panoIndex } = $$props;
1171
1170
  let { floorplanData } = $$props;
1172
1171
  let { lastPanoramaLongitude } = $$props;
@@ -1212,8 +1211,8 @@
1212
1211
  internal.init(
1213
1212
  this,
1214
1213
  options,
1215
- instance$q,
1216
- create_fragment$q,
1214
+ instance$s,
1215
+ create_fragment$s,
1217
1216
  internal.safe_not_equal,
1218
1217
  {
1219
1218
  panoIndex: 5,
@@ -1221,7 +1220,7 @@
1221
1220
  lastPanoramaLongitude: 7,
1222
1221
  cameraImageUrl: 0
1223
1222
  },
1224
- add_css$m
1223
+ add_css$n
1225
1224
  );
1226
1225
  }
1227
1226
  }
@@ -1230,12 +1229,12 @@
1230
1229
 
1231
1230
  /* src/floorplan/Components/Compass.svelte generated by Svelte v3.47.0 */
1232
1231
 
1233
- function add_css$l(target) {
1232
+ function add_css$m(target) {
1234
1233
  internal.append_styles(target, "svelte-z9kwkx", ".floorplan-plugin__compass.svelte-z9kwkx{position:absolute;left:50%;top:-2.39583rem;width:12.03125rem;height:2.13542rem;will-change:opacity;transform-origin:center 9.58333rem}.floorplan-plugin__compass-image.svelte-z9kwkx{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-z9kwkx{position:absolute;left:50%;top:0.78125rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.52083rem;color:#fff}");
1235
1234
  }
1236
1235
 
1237
1236
  // (14:0) {#if canCompassShow}
1238
- function create_if_block$a(ctx) {
1237
+ function create_if_block$b(ctx) {
1239
1238
  let div1;
1240
1239
  let div0;
1241
1240
  let t0;
@@ -1271,9 +1270,9 @@
1271
1270
  };
1272
1271
  }
1273
1272
 
1274
- function create_fragment$p(ctx) {
1273
+ function create_fragment$r(ctx) {
1275
1274
  let if_block_anchor;
1276
- let if_block = /*canCompassShow*/ ctx[1] && create_if_block$a(ctx);
1275
+ let if_block = /*canCompassShow*/ ctx[1] && create_if_block$b(ctx);
1277
1276
 
1278
1277
  return {
1279
1278
  c() {
@@ -1300,7 +1299,7 @@
1300
1299
  return rad / Math.PI * 180;
1301
1300
  }
1302
1301
 
1303
- function instance$p($$self, $$props, $$invalidate) {
1302
+ function instance$r($$self, $$props, $$invalidate) {
1304
1303
  var _a;
1305
1304
  let { floorplanData } = $$props;
1306
1305
  let { northDesc } = $$props;
@@ -1324,17 +1323,17 @@
1324
1323
  class Compass extends internal.SvelteComponent {
1325
1324
  constructor(options) {
1326
1325
  super();
1327
- internal.init(this, options, instance$p, create_fragment$p, internal.safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$l);
1326
+ internal.init(this, options, instance$r, create_fragment$r, internal.safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$m);
1328
1327
  }
1329
1328
  }
1330
1329
 
1331
1330
  /* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.47.0 */
1332
1331
 
1333
- function add_css$k(target) {
1332
+ function add_css$l(target) {
1334
1333
  internal.append_styles(target, "svelte-1gfoniz", "img.svelte-1gfoniz{width:100%;height:100%}");
1335
1334
  }
1336
1335
 
1337
- function create_fragment$o(ctx) {
1336
+ function create_fragment$q(ctx) {
1338
1337
  let img;
1339
1338
  let img_src_value;
1340
1339
 
@@ -1361,7 +1360,7 @@
1361
1360
  };
1362
1361
  }
1363
1362
 
1364
- function instance$o($$self, $$props, $$invalidate) {
1363
+ function instance$q($$self, $$props, $$invalidate) {
1365
1364
  let { url } = $$props;
1366
1365
 
1367
1366
  $$self.$$set = $$props => {
@@ -1374,17 +1373,17 @@
1374
1373
  class Normalmage extends internal.SvelteComponent {
1375
1374
  constructor(options) {
1376
1375
  super();
1377
- internal.init(this, options, instance$o, create_fragment$o, internal.safe_not_equal, { url: 0 }, add_css$k);
1376
+ internal.init(this, options, instance$q, create_fragment$q, internal.safe_not_equal, { url: 0 }, add_css$l);
1378
1377
  }
1379
1378
  }
1380
1379
 
1381
1380
  /* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.47.0 */
1382
1381
 
1383
- function add_css$j(target) {
1382
+ function add_css$k(target) {
1384
1383
  internal.append_styles(target, "svelte-ub47ya", ".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}");
1385
1384
  }
1386
1385
 
1387
- function create_fragment$n(ctx) {
1386
+ function create_fragment$p(ctx) {
1388
1387
  let div;
1389
1388
  let html_tag;
1390
1389
  let t;
@@ -1417,7 +1416,7 @@
1417
1416
  };
1418
1417
  }
1419
1418
 
1420
- function instance$n($$self, $$props, $$invalidate) {
1419
+ function instance$p($$self, $$props, $$invalidate) {
1421
1420
  let { content } = $$props;
1422
1421
 
1423
1422
  const svgStyle = `
@@ -1441,13 +1440,13 @@
1441
1440
  class SvgImage extends internal.SvelteComponent {
1442
1441
  constructor(options) {
1443
1442
  super();
1444
- internal.init(this, options, instance$n, create_fragment$n, internal.safe_not_equal, { content: 0 }, add_css$j);
1443
+ internal.init(this, options, instance$p, create_fragment$p, internal.safe_not_equal, { content: 0 }, add_css$k);
1445
1444
  }
1446
1445
  }
1447
1446
 
1448
1447
  /* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.47.0 */
1449
1448
 
1450
- function add_css$i(target) {
1449
+ function add_css$j(target) {
1451
1450
  internal.append_styles(target, "svelte-ozpg4a", ".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
1452
1451
  }
1453
1452
 
@@ -1486,7 +1485,7 @@
1486
1485
  }
1487
1486
 
1488
1487
  // (11:2) {#if svgContent}
1489
- function create_if_block$9(ctx) {
1488
+ function create_if_block$a(ctx) {
1490
1489
  let svgimage;
1491
1490
  let current;
1492
1491
 
@@ -1522,12 +1521,12 @@
1522
1521
  };
1523
1522
  }
1524
1523
 
1525
- function create_fragment$m(ctx) {
1524
+ function create_fragment$o(ctx) {
1526
1525
  let div;
1527
1526
  let current_block_type_index;
1528
1527
  let if_block;
1529
1528
  let current;
1530
- const if_block_creators = [create_if_block$9, create_if_block_1$5];
1529
+ const if_block_creators = [create_if_block$a, create_if_block_1$5];
1531
1530
  const if_blocks = [];
1532
1531
 
1533
1532
  function select_block_type(ctx, dirty) {
@@ -1610,7 +1609,7 @@
1610
1609
  };
1611
1610
  }
1612
1611
 
1613
- function instance$m($$self, $$props, $$invalidate) {
1612
+ function instance$o($$self, $$props, $$invalidate) {
1614
1613
  let imageData;
1615
1614
  let svgContent;
1616
1615
  var _a, _b;
@@ -1642,13 +1641,13 @@
1642
1641
  class BaseImage extends internal.SvelteComponent {
1643
1642
  constructor(options) {
1644
1643
  super();
1645
- internal.init(this, options, instance$m, create_fragment$m, internal.safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$i);
1644
+ internal.init(this, options, instance$o, create_fragment$o, internal.safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$j);
1646
1645
  }
1647
1646
  }
1648
1647
 
1649
1648
  /* src/floorplan/Components/RoomLabels/RoomLabel.svelte generated by Svelte v3.47.0 */
1650
1649
 
1651
- function add_css$h(target) {
1650
+ function add_css$i(target) {
1652
1651
  internal.append_styles(target, "svelte-12pzct5", ".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}");
1653
1652
  }
1654
1653
 
@@ -1679,7 +1678,7 @@
1679
1678
  }
1680
1679
 
1681
1680
  // (89:2) {#if getLabelElement === undefined}
1682
- function create_if_block$8(ctx) {
1681
+ function create_if_block$9(ctx) {
1683
1682
  let span0;
1684
1683
  let t0_value = /*room*/ ctx[0].name + "";
1685
1684
  let t0;
@@ -1713,11 +1712,11 @@
1713
1712
  };
1714
1713
  }
1715
1714
 
1716
- function create_fragment$l(ctx) {
1715
+ function create_fragment$n(ctx) {
1717
1716
  let div;
1718
1717
 
1719
1718
  function select_block_type(ctx, dirty) {
1720
- if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$8;
1719
+ if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$9;
1721
1720
  if (/*userConfigElement*/ ctx[4]) return create_if_block_1$4;
1722
1721
  }
1723
1722
 
@@ -1787,7 +1786,7 @@
1787
1786
  return inside;
1788
1787
  }
1789
1788
 
1790
- function instance$l($$self, $$props, $$invalidate) {
1789
+ function instance$n($$self, $$props, $$invalidate) {
1791
1790
  let isLabelInRoom;
1792
1791
  let userConfigElement;
1793
1792
  let labelVisible;
@@ -1931,8 +1930,8 @@
1931
1930
  internal.init(
1932
1931
  this,
1933
1932
  options,
1934
- instance$l,
1935
- create_fragment$l,
1933
+ instance$n,
1934
+ create_fragment$n,
1936
1935
  internal.safe_not_equal,
1937
1936
  {
1938
1937
  pxmm: 9,
@@ -1941,25 +1940,25 @@
1941
1940
  getLabelElement: 1,
1942
1941
  adaptiveRoomLabelVisibleEnable: 11
1943
1942
  },
1944
- add_css$h
1943
+ add_css$i
1945
1944
  );
1946
1945
  }
1947
1946
  }
1948
1947
 
1949
1948
  /* src/floorplan/Components/RoomLabels/RoomLabels.svelte generated by Svelte v3.47.0 */
1950
1949
 
1951
- function add_css$g(target) {
1950
+ function add_css$h(target) {
1952
1951
  internal.append_styles(target, "svelte-13xux0b", ".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}");
1953
1952
  }
1954
1953
 
1955
- function get_each_context$9(ctx, list, i) {
1954
+ function get_each_context$b(ctx, list, i) {
1956
1955
  const child_ctx = ctx.slice();
1957
1956
  child_ctx[9] = list[i];
1958
1957
  return child_ctx;
1959
1958
  }
1960
1959
 
1961
1960
  // (17:0) {#if rooms}
1962
- function create_if_block$7(ctx) {
1961
+ function create_if_block$8(ctx) {
1963
1962
  let div;
1964
1963
  let each_blocks = [];
1965
1964
  let each_1_lookup = new Map();
@@ -1969,9 +1968,9 @@
1969
1968
  const get_key = ctx => /*room*/ ctx[9].id;
1970
1969
 
1971
1970
  for (let i = 0; i < each_value.length; i += 1) {
1972
- let child_ctx = get_each_context$9(ctx, each_value, i);
1971
+ let child_ctx = get_each_context$b(ctx, each_value, i);
1973
1972
  let key = get_key(child_ctx);
1974
- each_1_lookup.set(key, each_blocks[i] = create_each_block$9(key, child_ctx));
1973
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$b(key, child_ctx));
1975
1974
  }
1976
1975
 
1977
1976
  return {
@@ -1999,7 +1998,7 @@
1999
1998
  if (dirty & /*pxmm, rooms, getLabelElement, hoveredRoom, adaptiveRoomLabelVisibleEnable*/ 55) {
2000
1999
  each_value = /*rooms*/ ctx[5];
2001
2000
  internal.group_outros();
2002
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$9, null, get_each_context$9);
2001
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$b, null, get_each_context$b);
2003
2002
  internal.check_outros();
2004
2003
  }
2005
2004
  },
@@ -2032,7 +2031,7 @@
2032
2031
  }
2033
2032
 
2034
2033
  // (19:4) {#each rooms as room (room.id)}
2035
- function create_each_block$9(key_1, ctx) {
2034
+ function create_each_block$b(key_1, ctx) {
2036
2035
  let first;
2037
2036
  let roomlabel;
2038
2037
  let current;
@@ -2101,10 +2100,10 @@
2101
2100
  };
2102
2101
  }
2103
2102
 
2104
- function create_fragment$k(ctx) {
2103
+ function create_fragment$m(ctx) {
2105
2104
  let if_block_anchor;
2106
2105
  let current;
2107
- let if_block = /*rooms*/ ctx[5] && create_if_block$7(ctx);
2106
+ let if_block = /*rooms*/ ctx[5] && create_if_block$8(ctx);
2108
2107
 
2109
2108
  return {
2110
2109
  c() {
@@ -2125,7 +2124,7 @@
2125
2124
  internal.transition_in(if_block, 1);
2126
2125
  }
2127
2126
  } else {
2128
- if_block = create_if_block$7(ctx);
2127
+ if_block = create_if_block$8(ctx);
2129
2128
  if_block.c();
2130
2129
  internal.transition_in(if_block, 1);
2131
2130
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -2156,7 +2155,7 @@
2156
2155
  };
2157
2156
  }
2158
2157
 
2159
- function instance$k($$self, $$props, $$invalidate) {
2158
+ function instance$m($$self, $$props, $$invalidate) {
2160
2159
  let rooms;
2161
2160
  let { floorIndex } = $$props;
2162
2161
  let { floorplanData } = $$props;
@@ -2213,8 +2212,8 @@
2213
2212
  internal.init(
2214
2213
  this,
2215
2214
  options,
2216
- instance$k,
2217
- create_fragment$k,
2215
+ instance$m,
2216
+ create_fragment$m,
2218
2217
  internal.safe_not_equal,
2219
2218
  {
2220
2219
  floorIndex: 6,
@@ -2223,18 +2222,18 @@
2223
2222
  getLabelElement: 1,
2224
2223
  adaptiveRoomLabelVisibleEnable: 2
2225
2224
  },
2226
- add_css$g
2225
+ add_css$h
2227
2226
  );
2228
2227
  }
2229
2228
  }
2230
2229
 
2231
2230
  /* src/floorplan/Components/RuleLabels/RuleItem.svelte generated by Svelte v3.47.0 */
2232
2231
 
2233
- function add_css$f(target) {
2232
+ function add_css$g(target) {
2234
2233
  internal.append_styles(target, "svelte-xt7p1v", ".floorplan-plugin__rule-labels.svelte-xt7p1v.svelte-xt7p1v{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-xt7p1v.svelte-xt7p1v{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-xt7p1v.svelte-xt7p1v{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-xt7p1v.svelte-xt7p1v{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-xt7p1v.svelte-xt7p1v{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-xt7p1v.svelte-xt7p1v{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-xt7p1v.svelte-xt7p1v{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-scale-wrapper.svelte-xt7p1v{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-xt7p1v.svelte-xt7p1v{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-scale.svelte-xt7p1v{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-xt7p1v.svelte-xt7p1v{position:absolute}.floorplan-plugin__rule-labels--top.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-xt7p1v.svelte-xt7p1v{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-text-item.svelte-xt7p1v{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-xt7p1v.svelte-xt7p1v{width:-webkit-max-content;width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}");
2235
2234
  }
2236
2235
 
2237
- function get_each_context$8(ctx, list, i) {
2236
+ function get_each_context$a(ctx, list, i) {
2238
2237
  const child_ctx = ctx.slice();
2239
2238
  child_ctx[10] = list[i];
2240
2239
  child_ctx[12] = i;
@@ -2269,7 +2268,7 @@
2269
2268
  }
2270
2269
 
2271
2270
  // (56:4) {#each rulerTexts as textItem, textItemIndex (textItemIndex)}
2272
- function create_each_block$8(key_1, ctx) {
2271
+ function create_each_block$a(key_1, ctx) {
2273
2272
  let div1;
2274
2273
  let div0;
2275
2274
  let t0_value = /*textItem*/ ctx[10].distance + "";
@@ -2306,7 +2305,7 @@
2306
2305
  };
2307
2306
  }
2308
2307
 
2309
- function create_fragment$j(ctx) {
2308
+ function create_fragment$l(ctx) {
2310
2309
  let div3;
2311
2310
  let div0;
2312
2311
  let t0;
@@ -2327,9 +2326,9 @@
2327
2326
  const get_key = ctx => /*textItemIndex*/ ctx[12];
2328
2327
 
2329
2328
  for (let i = 0; i < each_value.length; i += 1) {
2330
- let child_ctx = get_each_context$8(ctx, each_value, i);
2329
+ let child_ctx = get_each_context$a(ctx, each_value, i);
2331
2330
  let key = get_key(child_ctx);
2332
- each1_lookup.set(key, each_blocks[i] = create_each_block$8(key, child_ctx));
2331
+ each1_lookup.set(key, each_blocks[i] = create_each_block$a(key, child_ctx));
2333
2332
  }
2334
2333
 
2335
2334
  return {
@@ -2402,7 +2401,7 @@
2402
2401
 
2403
2402
  if (dirty & /*rulerTexts, isRow*/ 10) {
2404
2403
  each_value = /*rulerTexts*/ ctx[3];
2405
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div2, internal.destroy_block, create_each_block$8, null, get_each_context$8);
2404
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div2, internal.destroy_block, create_each_block$a, null, get_each_context$a);
2406
2405
  }
2407
2406
 
2408
2407
  if (dirty & /*type*/ 1 && div3_class_value !== (div3_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels--" + /*type*/ ctx[0] + " svelte-xt7p1v")) {
@@ -2429,7 +2428,7 @@
2429
2428
  const padding$1 = 1000;
2430
2429
  const exteriorWallOffset$1 = 180;
2431
2430
 
2432
- function instance$j($$self, $$props, $$invalidate) {
2431
+ function instance$l($$self, $$props, $$invalidate) {
2433
2432
  let { type } = $$props;
2434
2433
  let { data } = $$props;
2435
2434
  let { bounding } = $$props;
@@ -2488,17 +2487,17 @@
2488
2487
  class RuleItem extends internal.SvelteComponent {
2489
2488
  constructor(options) {
2490
2489
  super();
2491
- internal.init(this, options, instance$j, create_fragment$j, internal.safe_not_equal, { type: 0, data: 4, bounding: 5 }, add_css$f);
2490
+ internal.init(this, options, instance$l, create_fragment$l, internal.safe_not_equal, { type: 0, data: 4, bounding: 5 }, add_css$g);
2492
2491
  }
2493
2492
  }
2494
2493
 
2495
2494
  /* src/floorplan/Components/RuleLabels/RuleLabels.svelte generated by Svelte v3.47.0 */
2496
2495
 
2497
- function add_css$e(target) {
2496
+ function add_css$f(target) {
2498
2497
  internal.append_styles(target, "svelte-1mzj9p3", ".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}");
2499
2498
  }
2500
2499
 
2501
- function get_each_context$7(ctx, list, i) {
2500
+ function get_each_context$9(ctx, list, i) {
2502
2501
  const child_ctx = ctx.slice();
2503
2502
  child_ctx[12] = list[i][0];
2504
2503
  child_ctx[13] = list[i][1];
@@ -2506,7 +2505,7 @@
2506
2505
  }
2507
2506
 
2508
2507
  // (19:2) {#each ruleLabelArray as [type, data] (type)}
2509
- function create_each_block$7(key_1, ctx) {
2508
+ function create_each_block$9(key_1, ctx) {
2510
2509
  let first;
2511
2510
  let ruleitem;
2512
2511
  let current;
@@ -2571,7 +2570,7 @@
2571
2570
  };
2572
2571
  }
2573
2572
 
2574
- function create_fragment$i(ctx) {
2573
+ function create_fragment$k(ctx) {
2575
2574
  let div;
2576
2575
  let each_blocks = [];
2577
2576
  let each_1_lookup = new Map();
@@ -2580,9 +2579,9 @@
2580
2579
  const get_key = ctx => /*type*/ ctx[12];
2581
2580
 
2582
2581
  for (let i = 0; i < each_value.length; i += 1) {
2583
- let child_ctx = get_each_context$7(ctx, each_value, i);
2582
+ let child_ctx = get_each_context$9(ctx, each_value, i);
2584
2583
  let key = get_key(child_ctx);
2585
- each_1_lookup.set(key, each_blocks[i] = create_each_block$7(key, child_ctx));
2584
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$9(key, child_ctx));
2586
2585
  }
2587
2586
 
2588
2587
  return {
@@ -2610,7 +2609,7 @@
2610
2609
  if (dirty & /*ruleLabelArray, bounding*/ 9) {
2611
2610
  each_value = /*ruleLabelArray*/ ctx[3];
2612
2611
  internal.group_outros();
2613
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$7, null, get_each_context$7);
2612
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$9, null, get_each_context$9);
2614
2613
  internal.check_outros();
2615
2614
  }
2616
2615
 
@@ -2651,7 +2650,7 @@
2651
2650
  const padding = 1000;
2652
2651
  const exteriorWallOffset = 180;
2653
2652
 
2654
- function instance$i($$self, $$props, $$invalidate) {
2653
+ function instance$k($$self, $$props, $$invalidate) {
2655
2654
  let bounding;
2656
2655
  let ruleLabelData;
2657
2656
  let ruleLabelDataKeys;
@@ -2731,7 +2730,7 @@
2731
2730
  class RuleLabels extends internal.SvelteComponent {
2732
2731
  constructor(options) {
2733
2732
  super();
2734
- internal.init(this, options, instance$i, create_fragment$i, internal.safe_not_equal, { floorIndex: 4, floorplanData: 5 }, add_css$e);
2733
+ internal.init(this, options, instance$k, create_fragment$k, internal.safe_not_equal, { floorIndex: 4, floorplanData: 5 }, add_css$f);
2735
2734
  }
2736
2735
  }
2737
2736
 
@@ -2788,7 +2787,7 @@
2788
2787
 
2789
2788
  /* src/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte generated by Svelte v3.47.0 */
2790
2789
 
2791
- function create_fragment$h(ctx) {
2790
+ function create_fragment$j(ctx) {
2792
2791
  let path_1;
2793
2792
 
2794
2793
  return {
@@ -2813,7 +2812,7 @@
2813
2812
  };
2814
2813
  }
2815
2814
 
2816
- function instance$h($$self, $$props, $$invalidate) {
2815
+ function instance$j($$self, $$props, $$invalidate) {
2817
2816
  let d;
2818
2817
  let { path } = $$props;
2819
2818
 
@@ -2833,13 +2832,13 @@
2833
2832
  class RoomMaterial_0 extends internal.SvelteComponent {
2834
2833
  constructor(options) {
2835
2834
  super();
2836
- internal.init(this, options, instance$h, create_fragment$h, internal.safe_not_equal, { path: 1 });
2835
+ internal.init(this, options, instance$j, create_fragment$j, internal.safe_not_equal, { path: 1 });
2837
2836
  }
2838
2837
  }
2839
2838
 
2840
2839
  /* src/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte generated by Svelte v3.47.0 */
2841
2840
 
2842
- function create_fragment$g(ctx) {
2841
+ function create_fragment$i(ctx) {
2843
2842
  let defs;
2844
2843
  let pattern;
2845
2844
  let rect;
@@ -2900,7 +2899,7 @@
2900
2899
 
2901
2900
  const halfWidth = 6;
2902
2901
 
2903
- function instance$g($$self, $$props, $$invalidate) {
2902
+ function instance$i($$self, $$props, $$invalidate) {
2904
2903
  let d;
2905
2904
  let { path } = $$props;
2906
2905
  const width = halfWidth * 2;
@@ -2922,13 +2921,13 @@
2922
2921
  class RoomMaterial_1 extends internal.SvelteComponent {
2923
2922
  constructor(options) {
2924
2923
  super();
2925
- internal.init(this, options, instance$g, create_fragment$g, internal.safe_not_equal, { path: 3 });
2924
+ internal.init(this, options, instance$i, create_fragment$i, internal.safe_not_equal, { path: 3 });
2926
2925
  }
2927
2926
  }
2928
2927
 
2929
2928
  /* src/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte generated by Svelte v3.47.0 */
2930
2929
 
2931
- function create_fragment$f(ctx) {
2930
+ function create_fragment$h(ctx) {
2932
2931
  let defs;
2933
2932
  let pattern0;
2934
2933
  let rect0;
@@ -3029,7 +3028,7 @@
3029
3028
  };
3030
3029
  }
3031
3030
 
3032
- function instance$f($$self, $$props, $$invalidate) {
3031
+ function instance$h($$self, $$props, $$invalidate) {
3033
3032
  let d;
3034
3033
  let { path } = $$props;
3035
3034
 
@@ -3049,24 +3048,24 @@
3049
3048
  class RoomMaterial_2 extends internal.SvelteComponent {
3050
3049
  constructor(options) {
3051
3050
  super();
3052
- internal.init(this, options, instance$f, create_fragment$f, internal.safe_not_equal, { path: 1 });
3051
+ internal.init(this, options, instance$h, create_fragment$h, internal.safe_not_equal, { path: 1 });
3053
3052
  }
3054
3053
  }
3055
3054
 
3056
3055
  /* src/floorplan/Components/RoomMaterials/RoomMaterial.svelte generated by Svelte v3.47.0 */
3057
3056
 
3058
- function add_css$d(target) {
3057
+ function add_css$e(target) {
3059
3058
  internal.append_styles(target, "svelte-1dykexu", ".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}");
3060
3059
  }
3061
3060
 
3062
- function get_each_context$6(ctx, list, i) {
3061
+ function get_each_context$8(ctx, list, i) {
3063
3062
  const child_ctx = ctx.slice();
3064
3063
  child_ctx[5] = list[i];
3065
3064
  return child_ctx;
3066
3065
  }
3067
3066
 
3068
3067
  // (19:6) {:else}
3069
- function create_else_block(ctx) {
3068
+ function create_else_block$1(ctx) {
3070
3069
  let roommaterial_1;
3071
3070
  let current;
3072
3071
  roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[5].path } });
@@ -3134,7 +3133,7 @@
3134
3133
  }
3135
3134
 
3136
3135
  // (15:6) {#if room.floorType === 1}
3137
- function create_if_block$6(ctx) {
3136
+ function create_if_block$7(ctx) {
3138
3137
  let roommaterial_0;
3139
3138
  let current;
3140
3139
  roommaterial_0 = new RoomMaterial_0({ props: { path: /*room*/ ctx[5].path } });
@@ -3168,13 +3167,13 @@
3168
3167
  }
3169
3168
 
3170
3169
  // (13:2) {#each rooms as room}
3171
- function create_each_block$6(ctx) {
3170
+ function create_each_block$8(ctx) {
3172
3171
  let svg;
3173
3172
  let current_block_type_index;
3174
3173
  let if_block;
3175
3174
  let svg_viewBox_value;
3176
3175
  let current;
3177
- const if_block_creators = [create_if_block$6, create_if_block_1$3, create_else_block];
3176
+ const if_block_creators = [create_if_block$7, create_if_block_1$3, create_else_block$1];
3178
3177
  const if_blocks = [];
3179
3178
 
3180
3179
  function select_block_type(ctx, dirty) {
@@ -3243,14 +3242,14 @@
3243
3242
  };
3244
3243
  }
3245
3244
 
3246
- function create_fragment$e(ctx) {
3245
+ function create_fragment$g(ctx) {
3247
3246
  let div;
3248
3247
  let current;
3249
3248
  let each_value = /*rooms*/ ctx[0];
3250
3249
  let each_blocks = [];
3251
3250
 
3252
3251
  for (let i = 0; i < each_value.length; i += 1) {
3253
- each_blocks[i] = create_each_block$6(get_each_context$6(ctx, each_value, i));
3252
+ each_blocks[i] = create_each_block$8(get_each_context$8(ctx, each_value, i));
3254
3253
  }
3255
3254
 
3256
3255
  const out = i => internal.transition_out(each_blocks[i], 1, 1, () => {
@@ -3282,13 +3281,13 @@
3282
3281
  let i;
3283
3282
 
3284
3283
  for (i = 0; i < each_value.length; i += 1) {
3285
- const child_ctx = get_each_context$6(ctx, each_value, i);
3284
+ const child_ctx = get_each_context$8(ctx, each_value, i);
3286
3285
 
3287
3286
  if (each_blocks[i]) {
3288
3287
  each_blocks[i].p(child_ctx, dirty);
3289
3288
  internal.transition_in(each_blocks[i], 1);
3290
3289
  } else {
3291
- each_blocks[i] = create_each_block$6(child_ctx);
3290
+ each_blocks[i] = create_each_block$8(child_ctx);
3292
3291
  each_blocks[i].c();
3293
3292
  internal.transition_in(each_blocks[i], 1);
3294
3293
  each_blocks[i].m(div, null);
@@ -3329,7 +3328,7 @@
3329
3328
  };
3330
3329
  }
3331
3330
 
3332
- function instance$e($$self, $$props, $$invalidate) {
3331
+ function instance$g($$self, $$props, $$invalidate) {
3333
3332
  let rooms;
3334
3333
  let { floorIndex } = $$props;
3335
3334
  let { floorplanData } = $$props;
@@ -3355,17 +3354,17 @@
3355
3354
  class RoomMaterial extends internal.SvelteComponent {
3356
3355
  constructor(options) {
3357
3356
  super();
3358
- internal.init(this, options, instance$e, create_fragment$e, internal.safe_not_equal, { floorIndex: 3, floorplanData: 4 }, add_css$d);
3357
+ internal.init(this, options, instance$g, create_fragment$g, internal.safe_not_equal, { floorIndex: 3, floorplanData: 4 }, add_css$e);
3359
3358
  }
3360
3359
  }
3361
3360
 
3362
3361
  /* src/floorplan/Components/RoomHighlight/Room.svelte generated by Svelte v3.47.0 */
3363
3362
 
3364
- function add_css$c(target) {
3363
+ function add_css$d(target) {
3365
3364
  internal.append_styles(target, "svelte-19uvvss", "path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}");
3366
3365
  }
3367
3366
 
3368
- function create_fragment$d(ctx) {
3367
+ function create_fragment$f(ctx) {
3369
3368
  let path;
3370
3369
  let mounted;
3371
3370
  let dispose;
@@ -3400,7 +3399,7 @@
3400
3399
  };
3401
3400
  }
3402
3401
 
3403
- function instance$d($$self, $$props, $$invalidate) {
3402
+ function instance$f($$self, $$props, $$invalidate) {
3404
3403
  let { room } = $$props;
3405
3404
  let { floorplanData } = $$props;
3406
3405
  let { hoveredRoom } = $$props;
@@ -3436,33 +3435,33 @@
3436
3435
  internal.init(
3437
3436
  this,
3438
3437
  options,
3439
- instance$d,
3440
- create_fragment$d,
3438
+ instance$f,
3439
+ create_fragment$f,
3441
3440
  internal.safe_not_equal,
3442
3441
  {
3443
3442
  room: 3,
3444
3443
  floorplanData: 4,
3445
3444
  hoveredRoom: 5
3446
3445
  },
3447
- add_css$c
3446
+ add_css$d
3448
3447
  );
3449
3448
  }
3450
3449
  }
3451
3450
 
3452
3451
  /* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.47.0 */
3453
3452
 
3454
- function add_css$b(target) {
3453
+ function add_css$c(target) {
3455
3454
  internal.append_styles(target, "svelte-1kqo6e4", ".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}");
3456
3455
  }
3457
3456
 
3458
- function get_each_context$5(ctx, list, i) {
3457
+ function get_each_context$7(ctx, list, i) {
3459
3458
  const child_ctx = ctx.slice();
3460
3459
  child_ctx[5] = list[i];
3461
3460
  return child_ctx;
3462
3461
  }
3463
3462
 
3464
3463
  // (11:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
3465
- function create_each_block$5(key_1, ctx) {
3464
+ function create_each_block$7(key_1, ctx) {
3466
3465
  let first;
3467
3466
  let room;
3468
3467
  let current;
@@ -3527,7 +3526,7 @@
3527
3526
  };
3528
3527
  }
3529
3528
 
3530
- function create_fragment$c(ctx) {
3529
+ function create_fragment$e(ctx) {
3531
3530
  let div;
3532
3531
  let svg;
3533
3532
  let each_blocks = [];
@@ -3537,9 +3536,9 @@
3537
3536
  const get_key = ctx => /*room*/ ctx[5].id;
3538
3537
 
3539
3538
  for (let i = 0; i < each_value.length; i += 1) {
3540
- let child_ctx = get_each_context$5(ctx, each_value, i);
3539
+ let child_ctx = get_each_context$7(ctx, each_value, i);
3541
3540
  let key = get_key(child_ctx);
3542
- each_1_lookup.set(key, each_blocks[i] = create_each_block$5(key, child_ctx));
3541
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$7(key, child_ctx));
3543
3542
  }
3544
3543
 
3545
3544
  return {
@@ -3571,7 +3570,7 @@
3571
3570
  if (dirty & /*floorplanData, floorIndex, hoveredRoom*/ 7) {
3572
3571
  each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
3573
3572
  internal.group_outros();
3574
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, internal.outro_and_destroy_block, create_each_block$5, null, get_each_context$5);
3573
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, internal.outro_and_destroy_block, create_each_block$7, null, get_each_context$7);
3575
3574
  internal.check_outros();
3576
3575
  }
3577
3576
  },
@@ -3601,7 +3600,7 @@
3601
3600
  };
3602
3601
  }
3603
3602
 
3604
- function instance$c($$self, $$props, $$invalidate) {
3603
+ function instance$e($$self, $$props, $$invalidate) {
3605
3604
  let { floorIndex } = $$props;
3606
3605
  let { floorplanData } = $$props;
3607
3606
  let { hoveredRoom } = $$props;
@@ -3624,22 +3623,22 @@
3624
3623
  internal.init(
3625
3624
  this,
3626
3625
  options,
3627
- instance$c,
3628
- create_fragment$c,
3626
+ instance$e,
3627
+ create_fragment$e,
3629
3628
  internal.safe_not_equal,
3630
3629
  {
3631
3630
  floorIndex: 0,
3632
3631
  floorplanData: 1,
3633
3632
  hoveredRoom: 2
3634
3633
  },
3635
- add_css$b
3634
+ add_css$c
3636
3635
  );
3637
3636
  }
3638
3637
  }
3639
3638
 
3640
3639
  /* src/floorplan/Components/CurrentFloor.svelte generated by Svelte v3.47.0 */
3641
3640
 
3642
- function add_css$a(target) {
3641
+ function add_css$b(target) {
3643
3642
  internal.append_styles(target, "svelte-bl8zrz", ".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}");
3644
3643
  }
3645
3644
 
@@ -3762,7 +3761,7 @@
3762
3761
  }
3763
3762
 
3764
3763
  // (27:2) {#if ruleLabelsEnable}
3765
- function create_if_block$5(ctx) {
3764
+ function create_if_block$6(ctx) {
3766
3765
  let rulelabels;
3767
3766
  let current;
3768
3767
 
@@ -3816,7 +3815,7 @@
3816
3815
  };
3817
3816
  }
3818
3817
 
3819
- function create_fragment$b(ctx) {
3818
+ function create_fragment$d(ctx) {
3820
3819
  let div;
3821
3820
  let roommaterial;
3822
3821
  let t0;
@@ -3858,7 +3857,7 @@
3858
3857
 
3859
3858
  baseimage = new BaseImage({ props: baseimage_props });
3860
3859
  let if_block1 = /*roomLabelsEnable*/ ctx[3] && create_if_block_1$2(ctx);
3861
- let if_block2 = /*ruleLabelsEnable*/ ctx[4] && create_if_block$5(ctx);
3860
+ let if_block2 = /*ruleLabelsEnable*/ ctx[4] && create_if_block$6(ctx);
3862
3861
 
3863
3862
  return {
3864
3863
  c() {
@@ -3967,7 +3966,7 @@
3967
3966
  internal.transition_in(if_block2, 1);
3968
3967
  }
3969
3968
  } else {
3970
- if_block2 = create_if_block$5(ctx);
3969
+ if_block2 = create_if_block$6(ctx);
3971
3970
  if_block2.c();
3972
3971
  internal.transition_in(if_block2, 1);
3973
3972
  if_block2.m(div, null);
@@ -4016,7 +4015,7 @@
4016
4015
  };
4017
4016
  }
4018
4017
 
4019
- function instance$b($$self, $$props, $$invalidate) {
4018
+ function instance$d($$self, $$props, $$invalidate) {
4020
4019
  let { isCurrent } = $$props;
4021
4020
  let { floorIndex } = $$props;
4022
4021
  let { hoverEnable } = $$props;
@@ -4058,8 +4057,8 @@
4058
4057
  internal.init(
4059
4058
  this,
4060
4059
  options,
4061
- instance$b,
4062
- create_fragment$b,
4060
+ instance$d,
4061
+ create_fragment$d,
4063
4062
  internal.safe_not_equal,
4064
4063
  {
4065
4064
  isCurrent: 0,
@@ -4071,25 +4070,25 @@
4071
4070
  getLabelElement: 6,
4072
4071
  adaptiveRoomLabelVisibleEnable: 7
4073
4072
  },
4074
- add_css$a
4073
+ add_css$b
4075
4074
  );
4076
4075
  }
4077
4076
  }
4078
4077
 
4079
4078
  /* src/floorplan/Components/Main.svelte generated by Svelte v3.47.0 */
4080
4079
 
4081
- function add_css$9(target) {
4080
+ function add_css$a(target) {
4082
4081
  internal.append_styles(target, "svelte-86bqav", ".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}");
4083
4082
  }
4084
4083
 
4085
- function get_each_context$4(ctx, list, i) {
4084
+ function get_each_context$6(ctx, list, i) {
4086
4085
  const child_ctx = ctx.slice();
4087
4086
  child_ctx[14] = list[i];
4088
4087
  return child_ctx;
4089
4088
  }
4090
4089
 
4091
4090
  // (22:0) {#if visible}
4092
- function create_if_block$4(ctx) {
4091
+ function create_if_block$5(ctx) {
4093
4092
  let div;
4094
4093
  let t0;
4095
4094
  let camera;
@@ -4100,7 +4099,7 @@
4100
4099
  let each_blocks = [];
4101
4100
 
4102
4101
  for (let i = 0; i < each_value.length; i += 1) {
4103
- each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i));
4102
+ each_blocks[i] = create_each_block$6(get_each_context$6(ctx, each_value, i));
4104
4103
  }
4105
4104
 
4106
4105
  const out = i => internal.transition_out(each_blocks[i], 1, 1, () => {
@@ -4160,13 +4159,13 @@
4160
4159
  let i;
4161
4160
 
4162
4161
  for (i = 0; i < each_value.length; i += 1) {
4163
- const child_ctx = get_each_context$4(ctx, each_value, i);
4162
+ const child_ctx = get_each_context$6(ctx, each_value, i);
4164
4163
 
4165
4164
  if (each_blocks[i]) {
4166
4165
  each_blocks[i].p(child_ctx, dirty);
4167
4166
  internal.transition_in(each_blocks[i], 1);
4168
4167
  } else {
4169
- each_blocks[i] = create_each_block$4(child_ctx);
4168
+ each_blocks[i] = create_each_block$6(child_ctx);
4170
4169
  each_blocks[i].c();
4171
4170
  internal.transition_in(each_blocks[i], 1);
4172
4171
  each_blocks[i].m(div, t0);
@@ -4262,7 +4261,7 @@
4262
4261
  }
4263
4262
 
4264
4263
  // (24:4) {#each floorplanData.floorDatas as floorData}
4265
- function create_each_block$4(ctx) {
4264
+ function create_each_block$6(ctx) {
4266
4265
  let currentfloor;
4267
4266
  let current;
4268
4267
 
@@ -4377,10 +4376,10 @@
4377
4376
  };
4378
4377
  }
4379
4378
 
4380
- function create_fragment$a(ctx) {
4379
+ function create_fragment$c(ctx) {
4381
4380
  let if_block_anchor;
4382
4381
  let current;
4383
- let if_block = /*visible*/ ctx[1] && create_if_block$4(ctx);
4382
+ let if_block = /*visible*/ ctx[1] && create_if_block$5(ctx);
4384
4383
 
4385
4384
  return {
4386
4385
  c() {
@@ -4401,7 +4400,7 @@
4401
4400
  internal.transition_in(if_block, 1);
4402
4401
  }
4403
4402
  } else {
4404
- if_block = create_if_block$4(ctx);
4403
+ if_block = create_if_block$5(ctx);
4405
4404
  if_block.c();
4406
4405
  internal.transition_in(if_block, 1);
4407
4406
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -4432,7 +4431,7 @@
4432
4431
  };
4433
4432
  }
4434
4433
 
4435
- function instance$a($$self, $$props, $$invalidate) {
4434
+ function instance$c($$self, $$props, $$invalidate) {
4436
4435
  let { duration = 0 } = $$props;
4437
4436
  let { visible } = $$props;
4438
4437
  let { northDesc } = $$props;
@@ -4490,8 +4489,8 @@
4490
4489
  internal.init(
4491
4490
  this,
4492
4491
  options,
4493
- instance$a,
4494
- create_fragment$a,
4492
+ instance$c,
4493
+ create_fragment$c,
4495
4494
  internal.safe_not_equal,
4496
4495
  {
4497
4496
  duration: 0,
@@ -4509,7 +4508,7 @@
4509
4508
  getLabelElement: 12,
4510
4509
  adaptiveRoomLabelVisibleEnable: 13
4511
4510
  },
4512
- add_css$9
4511
+ add_css$a
4513
4512
  );
4514
4513
  }
4515
4514
  }
@@ -4641,7 +4640,7 @@
4641
4640
  /**
4642
4641
  * plugin 的基本控制器
4643
4642
  */
4644
- class Controller$4 {
4643
+ class Controller$5 {
4645
4644
  constructor(five$1) {
4646
4645
  Object.defineProperty(this, "five", {
4647
4646
  enumerable: true,
@@ -4668,7 +4667,7 @@
4668
4667
  }
4669
4668
  }
4670
4669
 
4671
- class Controller$3 extends Controller$4 {
4670
+ class Controller$4 extends Controller$5 {
4672
4671
  }
4673
4672
 
4674
4673
  /**
@@ -4771,7 +4770,7 @@
4771
4770
  });
4772
4771
  }
4773
4772
 
4774
- class Controller$2 extends Controller$3 {
4773
+ class Controller$3 extends Controller$4 {
4775
4774
  constructor(five, params) {
4776
4775
  super(five);
4777
4776
  // =============== public properties =================
@@ -5248,7 +5247,7 @@
5248
5247
  }
5249
5248
 
5250
5249
  const TopviewFloorplanPlugin = (five, params) => {
5251
- return new Controller$2(five, params);
5250
+ return new Controller$3(five, params);
5252
5251
  };
5253
5252
 
5254
5253
  /**
@@ -5272,11 +5271,11 @@
5272
5271
 
5273
5272
  /* src/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte generated by Svelte v3.47.0 */
5274
5273
 
5275
- function add_css$8(target) {
5274
+ function add_css$9(target) {
5276
5275
  internal.append_styles(target, "svelte-1ty3s4p", ".plugin-radar__camera-wrapper.svelte-1ty3s4p{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1ty3s4p{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1ty3s4p{position:absolute;left:-0.78125rem;top:-0.78125rem;width:0.88542rem;height:0.88542rem;transform-origin:0.78125rem 0.78125rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}");
5277
5276
  }
5278
5277
 
5279
- function create_fragment$9(ctx) {
5278
+ function create_fragment$b(ctx) {
5280
5279
  let div2;
5281
5280
  let div1;
5282
5281
  let div0;
@@ -5326,7 +5325,7 @@
5326
5325
  return `rotate(${rotate}deg)`;
5327
5326
  }
5328
5327
 
5329
- function instance$9($$self, $$props, $$invalidate) {
5328
+ function instance$b($$self, $$props, $$invalidate) {
5330
5329
  let positionTransform;
5331
5330
  let rotateTransform;
5332
5331
  let { five } = $$props;
@@ -5406,8 +5405,8 @@
5406
5405
  internal.init(
5407
5406
  this,
5408
5407
  options,
5409
- instance$9,
5410
- create_fragment$9,
5408
+ instance$b,
5409
+ create_fragment$b,
5411
5410
  internal.safe_not_equal,
5412
5411
  {
5413
5412
  five: 3,
@@ -5415,25 +5414,25 @@
5415
5414
  floorplanData: 5,
5416
5415
  cameraImageUrl: 0
5417
5416
  },
5418
- add_css$8
5417
+ add_css$9
5419
5418
  );
5420
5419
  }
5421
5420
  }
5422
5421
 
5423
5422
  /* src/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte generated by Svelte v3.47.0 */
5424
5423
 
5425
- function add_css$7(target) {
5424
+ function add_css$8(target) {
5426
5425
  internal.append_styles(target, "svelte-1i87fz7", ".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}");
5427
5426
  }
5428
5427
 
5429
- function get_each_context$3(ctx, list, i) {
5428
+ function get_each_context$5(ctx, list, i) {
5430
5429
  const child_ctx = ctx.slice();
5431
5430
  child_ctx[1] = list[i];
5432
5431
  return child_ctx;
5433
5432
  }
5434
5433
 
5435
5434
  // (5:2) {#each extraObjects as extraObject (extraObject.id)}
5436
- function create_each_block$3(key_1, ctx) {
5435
+ function create_each_block$5(key_1, ctx) {
5437
5436
  let div1;
5438
5437
  let div0;
5439
5438
  let style_width = `${/*extraObject*/ ctx[1].icon.width / 16}rem`;
@@ -5492,7 +5491,7 @@
5492
5491
  };
5493
5492
  }
5494
5493
 
5495
- function create_fragment$8(ctx) {
5494
+ function create_fragment$a(ctx) {
5496
5495
  let div;
5497
5496
  let each_blocks = [];
5498
5497
  let each_1_lookup = new Map();
@@ -5500,9 +5499,9 @@
5500
5499
  const get_key = ctx => /*extraObject*/ ctx[1].id;
5501
5500
 
5502
5501
  for (let i = 0; i < each_value.length; i += 1) {
5503
- let child_ctx = get_each_context$3(ctx, each_value, i);
5502
+ let child_ctx = get_each_context$5(ctx, each_value, i);
5504
5503
  let key = get_key(child_ctx);
5505
- each_1_lookup.set(key, each_blocks[i] = create_each_block$3(key, child_ctx));
5504
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$5(key, child_ctx));
5506
5505
  }
5507
5506
 
5508
5507
  return {
@@ -5525,7 +5524,7 @@
5525
5524
  p(ctx, [dirty]) {
5526
5525
  if (dirty & /*extraObjects*/ 1) {
5527
5526
  each_value = /*extraObjects*/ ctx[0];
5528
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.destroy_block, create_each_block$3, null, get_each_context$3);
5527
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.destroy_block, create_each_block$5, null, get_each_context$5);
5529
5528
  }
5530
5529
  },
5531
5530
  i: internal.noop,
@@ -5540,7 +5539,7 @@
5540
5539
  };
5541
5540
  }
5542
5541
 
5543
- function instance$8($$self, $$props, $$invalidate) {
5542
+ function instance$a($$self, $$props, $$invalidate) {
5544
5543
  let { extraObjects = [] } = $$props;
5545
5544
 
5546
5545
  $$self.$$set = $$props => {
@@ -5553,13 +5552,13 @@
5553
5552
  class ExtraObjects extends internal.SvelteComponent {
5554
5553
  constructor(options) {
5555
5554
  super();
5556
- internal.init(this, options, instance$8, create_fragment$8, internal.safe_not_equal, { extraObjects: 0 }, add_css$7);
5555
+ internal.init(this, options, instance$a, create_fragment$a, internal.safe_not_equal, { extraObjects: 0 }, add_css$8);
5557
5556
  }
5558
5557
  }
5559
5558
 
5560
5559
  /* src/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte generated by Svelte v3.47.0 */
5561
5560
 
5562
- function create_if_block$3(ctx) {
5561
+ function create_if_block$4(ctx) {
5563
5562
  let highlight;
5564
5563
  let current;
5565
5564
 
@@ -5619,7 +5618,7 @@
5619
5618
  };
5620
5619
  }
5621
5620
 
5622
- function create_fragment$7(ctx) {
5621
+ function create_fragment$9(ctx) {
5623
5622
  let baseimage;
5624
5623
  let t0;
5625
5624
  let extraobjects;
@@ -5648,7 +5647,7 @@
5648
5647
  }
5649
5648
  });
5650
5649
 
5651
- let if_block = /*hoverEnable*/ ctx[3] && create_if_block$3(ctx);
5650
+ let if_block = /*hoverEnable*/ ctx[3] && create_if_block$4(ctx);
5652
5651
 
5653
5652
  return {
5654
5653
  c() {
@@ -5691,7 +5690,7 @@
5691
5690
  internal.transition_in(if_block, 1);
5692
5691
  }
5693
5692
  } else {
5694
- if_block = create_if_block$3(ctx);
5693
+ if_block = create_if_block$4(ctx);
5695
5694
  if_block.c();
5696
5695
  internal.transition_in(if_block, 1);
5697
5696
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -5730,7 +5729,7 @@
5730
5729
  };
5731
5730
  }
5732
5731
 
5733
- function instance$7($$self, $$props, $$invalidate) {
5732
+ function instance$9($$self, $$props, $$invalidate) {
5734
5733
  let currentFloorExtraObjects;
5735
5734
  let { five } = $$props;
5736
5735
  let { pxmm } = $$props;
@@ -5773,7 +5772,7 @@
5773
5772
  constructor(options) {
5774
5773
  super();
5775
5774
 
5776
- internal.init(this, options, instance$7, create_fragment$7, internal.safe_not_equal, {
5775
+ internal.init(this, options, instance$9, create_fragment$9, internal.safe_not_equal, {
5777
5776
  five: 0,
5778
5777
  pxmm: 1,
5779
5778
  floorIndex: 2,
@@ -5786,12 +5785,12 @@
5786
5785
 
5787
5786
  /* src/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte generated by Svelte v3.47.0 */
5788
5787
 
5789
- function add_css$6(target) {
5788
+ function add_css$7(target) {
5790
5789
  internal.append_styles(target, "svelte-1mvqyqq", ".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}");
5791
5790
  }
5792
5791
 
5793
5792
  // (41:0) {#if visible}
5794
- function create_if_block$2(ctx) {
5793
+ function create_if_block$3(ctx) {
5795
5794
  let div;
5796
5795
  let div_resize_listener;
5797
5796
  let current;
@@ -5970,10 +5969,10 @@
5970
5969
  };
5971
5970
  }
5972
5971
 
5973
- function create_fragment$6(ctx) {
5972
+ function create_fragment$8(ctx) {
5974
5973
  let if_block_anchor;
5975
5974
  let current;
5976
- let if_block = /*visible*/ ctx[1] && create_if_block$2(ctx);
5975
+ let if_block = /*visible*/ ctx[1] && create_if_block$3(ctx);
5977
5976
 
5978
5977
  return {
5979
5978
  c() {
@@ -5994,7 +5993,7 @@
5994
5993
  internal.transition_in(if_block, 1);
5995
5994
  }
5996
5995
  } else {
5997
- if_block = create_if_block$2(ctx);
5996
+ if_block = create_if_block$3(ctx);
5998
5997
  if_block.c();
5999
5998
  internal.transition_in(if_block, 1);
6000
5999
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -6025,7 +6024,7 @@
6025
6024
  };
6026
6025
  }
6027
6026
 
6028
- function instance$6($$self, $$props, $$invalidate) {
6027
+ function instance$8($$self, $$props, $$invalidate) {
6029
6028
  let { five } = $$props;
6030
6029
  let { visible } = $$props;
6031
6030
  let { hoverEnable } = $$props;
@@ -6111,8 +6110,8 @@
6111
6110
  internal.init(
6112
6111
  this,
6113
6112
  options,
6114
- instance$6,
6115
- create_fragment$6,
6113
+ instance$8,
6114
+ create_fragment$8,
6116
6115
  internal.safe_not_equal,
6117
6116
  {
6118
6117
  five: 0,
@@ -6122,12 +6121,12 @@
6122
6121
  cameraImageUrl: 4,
6123
6122
  extraObjects: 5
6124
6123
  },
6125
- add_css$6
6124
+ add_css$7
6126
6125
  );
6127
6126
  }
6128
6127
  }
6129
6128
 
6130
- class Controller$1 extends Controller$3 {
6129
+ class Controller$2 extends Controller$4 {
6131
6130
  constructor(five, params) {
6132
6131
  super(five);
6133
6132
  // =============== public properties =================
@@ -6364,7 +6363,7 @@
6364
6363
  }
6365
6364
 
6366
6365
  const PanoFloorplanRadarPlugin = (five, params) => {
6367
- return new Controller$1(five, params);
6366
+ return new Controller$2(five, params);
6368
6367
  };
6369
6368
 
6370
6369
  /**
@@ -6472,7 +6471,7 @@
6472
6471
  const longitudeVisible = longitude < 30 * (Math.PI / 180) || longitude > 330 * (Math.PI / 180);
6473
6472
  return latitudeVisible && longitudeVisible;
6474
6473
  }
6475
- class Controller extends Controller$3 {
6474
+ class Controller$1 extends Controller$4 {
6476
6475
  constructor(five, params) {
6477
6476
  var _a;
6478
6477
  super(five);
@@ -6889,7 +6888,7 @@
6889
6888
  const fiveCurrentState = this.five.getCurrentState();
6890
6889
  if (shouldFloorplanHideWithPose(fiveCurrentState)) {
6891
6890
  this.updateState({ visible: false }, userAction);
6892
- this._hide({ userAction });
6891
+ this._hide({ userAction, isAutoHide: true });
6893
6892
  }
6894
6893
  }
6895
6894
  });
@@ -7062,6 +7061,13 @@
7062
7061
  state.visible ? this._show(options) : this._hide(options);
7063
7062
  }
7064
7063
  }
7064
+ changeConfigs(_config, userAction = true) {
7065
+ const config = Object.assign(Object.assign({}, this.state.config), _config);
7066
+ this.updateState({ config }, userAction);
7067
+ if (!this.container)
7068
+ return;
7069
+ this.render();
7070
+ }
7065
7071
  async formatData(serverData) {
7066
7072
  return await formatData(serverData.data);
7067
7073
  }
@@ -7134,7 +7140,7 @@
7134
7140
  }
7135
7141
 
7136
7142
  const ModelFloorplanPlugin = (five, params) => {
7137
- return new Controller(five, params);
7143
+ return new Controller$1(five, params);
7138
7144
  };
7139
7145
 
7140
7146
  /** 房屋数据映射表 */
@@ -8360,31 +8366,792 @@
8360
8366
  };
8361
8367
  };
8362
8368
 
8363
- const roomInfoIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaAiGS1nok9WkFAUJb8Upa6Y3Uo2kEQiRNd08qd0YEQiJnBD+37guBEElf/ZXang6BEMnpsM6dOkcgRNJ5B66x+nrjLmsTX1J6bSJHZ7+o9HklynWaOse1eKcc+XVlvxYFEnlfaThWfb7mcsn5nPRM6WmVU55KfO+J0mdKj8f5rVu3skNMoET6RSBE0m/fdVNzGWII4StKXy65y18t58aEAVGcUjDkGH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RICwVRcwSFPbdu194LKt+kEdtT/SIQLS4Tddbenohy4nDwKnQGAPG4rdZALehA09KpGo8bhou9iUbbs0/jMNTscBdRgJAm0hIF1+wzWSrt52OXkQOCUC0kNsNNuHsatz24iHqI709GxLAjcmktJQEwj5WPA+aCiuWB4YHKOT4yYRkF7zUNkg0lueSI4EgbMiIJ1kZyshL9LUOjNEwkT9sXT2pBP1VyaSQiCse9Coqa27LApBIPE+BEKkLwSk32zRHESDkp0zkSDQBALF9uKdYHunnkthwo7tfXQqQjmYSNQImBACIU2xIuGreB8CIdIvAtJzNogMosHI4mYkCDSHgPTUXspU2ItoEIvzEArlxWRvIlGFWTSnsnWF+b1dKAhk8QrrHpEgsDgC0ndi0oNoEBIuiASBZhGQvnqCz/KCJ/jYZtto7DPRoUU2N11LJIXxqNyUC0VFqeCTpRlP94gEgZMhIL0nbDCIdJswQSQINI9AIRRsNRP+KfvOkgNrKEddr5660YUqw3k8EAhkbvsuCztPVSF7JDqMBIF1IKAxcOl5S8eZLEWCQDcIFBtO2Kv2UOr645lAKkex4VeIpLo5jHbls1KD4eYaWIu4R+UeyYLA2RHQWGAADiJ9P9u2StcheRB4VQSkyzgD2PQppwBH4MaEMpBFRSDcqCYQx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC';
8369
+ /* src/PanoRulerProPlugin/RulerItem.svelte generated by Svelte v3.47.0 */
8364
8370
 
8365
- function getRoomInfoInstance() {
8366
- const infoDom = document.createElement('div');
8367
- const iconDom = document.createElement('i');
8368
- const textDom = document.createElement('span');
8369
- infoDom.appendChild(iconDom);
8370
- infoDom.appendChild(textDom);
8371
- // infoDom style
8372
- infoDom.style.position = 'relative';
8373
- infoDom.style.width = '100%';
8374
- infoDom.style.display = 'flex';
8375
- infoDom.style.flexDirection = 'column';
8376
- infoDom.style.alignItems = 'center';
8377
- infoDom.style.marginTop = `${150 / 16}rem`;
8378
- infoDom.style.opacity = '0';
8379
- infoDom.style.transition = 'opacity 1000ms linear';
8380
- // iconDom style
8381
- iconDom.style.display = 'block';
8382
- iconDom.style.width = `${134 / 16}rem`;
8383
- iconDom.style.height = `${22 / 16}rem`;
8384
- iconDom.style.backgroundSize = '100%';
8385
- iconDom.style.backgroundRepeat = 'no-repeat';
8386
- iconDom.style.backgroundImage = `url(${roomInfoIcon})`;
8387
- textDom.style.marginTop = `${10 / 16}rem`;
8371
+ function add_css$6(target) {
8372
+ internal.append_styles(target, "svelte-qy4ud2", ".PanoRulerPlugin-rule-line.svelte-qy4ud2.svelte-qy4ud2{position:absolute;transform-origin:left 0.0625rem;width:0;height:0.125rem;pointer-events:none}.PanoRulerPlugin-rule-line.svelte-qy4ud2.svelte-qy4ud2::after{content:'';position:absolute;left:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;-webkit-animation:svelte-qy4ud2-viewport-rule-point 0.1s 1s;animation:svelte-qy4ud2-viewport-rule-point 0.1s 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-qy4ud2.svelte-qy4ud2::before{content:'';position:absolute;right:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;-webkit-animation:svelte-qy4ud2-viewport-rule-point 0.1s 1.5s;animation:svelte-qy4ud2-viewport-rule-point 0.1s 1.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-qy4ud2 em.svelte-qy4ud2{display:block;height:0.0625rem;-webkit-animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;box-shadow:0 0 0.25rem rgb(0 0 0 / 40%);position:relative}.rule-mixed-line.svelte-qy4ud2.svelte-qy4ud2{display:flex;height:0.0625rem;-webkit-animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;align-items:center}.em-solid.svelte-qy4ud2.svelte-qy4ud2{height:100%;background:#ffffff}.em-dotted.svelte-qy4ud2.svelte-qy4ud2{height:0.125rem;background:var(--background-image);background-position:center;background-repeat:repeat}.PanoRulerPlugin-rule-label.svelte-qy4ud2.svelte-qy4ud2{position:absolute;width:0;height:0;top:0.0625rem;pointer-events:none}.PanoRulerPlugin-rule-label-name.svelte-qy4ud2.svelte-qy4ud2{position:absolute;padding:0.1875rem 0.375rem;background:rgba(195, 195, 195, 0.3);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem);border-radius:6.25rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);white-space:nowrap;overflow:hidden;color:#ffffff;font-weight:500;font-size:0.75rem;line-height:1;-webkit-animation:svelte-qy4ud2-viewport-rule-label 0.25s ease 1s;animation:svelte-qy4ud2-viewport-rule-label 0.25s ease 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;box-shadow:inset 0 0 0.625rem 0 rgba(255, 255, 255, 0.3)}@-webkit-keyframes svelte-qy4ud2-viewport-rule-line{0%{width:0%}100%{width:100%}}@keyframes svelte-qy4ud2-viewport-rule-line{0%{width:0%}100%{width:100%}}@-webkit-keyframes svelte-qy4ud2-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@keyframes svelte-qy4ud2-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@-webkit-keyframes svelte-qy4ud2-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}@keyframes svelte-qy4ud2-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}");
8373
+ }
8374
+
8375
+ function get_each_context$4(ctx, list, i) {
8376
+ const child_ctx = ctx.slice();
8377
+ child_ctx[6] = list[i];
8378
+ return child_ctx;
8379
+ }
8380
+
8381
+ // (28:2) {:else}
8382
+ function create_else_block(ctx) {
8383
+ let div;
8384
+ let each_value = /*rulerItemProp*/ ctx[0].children;
8385
+ let each_blocks = [];
8386
+
8387
+ for (let i = 0; i < each_value.length; i += 1) {
8388
+ each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i));
8389
+ }
8390
+
8391
+ return {
8392
+ c() {
8393
+ div = internal.element("div");
8394
+
8395
+ for (let i = 0; i < each_blocks.length; i += 1) {
8396
+ each_blocks[i].c();
8397
+ }
8398
+
8399
+ internal.attr(div, "class", "rule-mixed-line svelte-qy4ud2");
8400
+ },
8401
+ m(target, anchor) {
8402
+ internal.insert(target, div, anchor);
8403
+
8404
+ for (let i = 0; i < each_blocks.length; i += 1) {
8405
+ each_blocks[i].m(div, null);
8406
+ }
8407
+ },
8408
+ p(ctx, dirty) {
8409
+ if (dirty & /*rulerItemProp, vars*/ 9) {
8410
+ each_value = /*rulerItemProp*/ ctx[0].children;
8411
+ let i;
8412
+
8413
+ for (i = 0; i < each_value.length; i += 1) {
8414
+ const child_ctx = get_each_context$4(ctx, each_value, i);
8415
+
8416
+ if (each_blocks[i]) {
8417
+ each_blocks[i].p(child_ctx, dirty);
8418
+ } else {
8419
+ each_blocks[i] = create_each_block$4(child_ctx);
8420
+ each_blocks[i].c();
8421
+ each_blocks[i].m(div, null);
8422
+ }
8423
+ }
8424
+
8425
+ for (; i < each_blocks.length; i += 1) {
8426
+ each_blocks[i].d(1);
8427
+ }
8428
+
8429
+ each_blocks.length = each_value.length;
8430
+ }
8431
+ },
8432
+ d(detaching) {
8433
+ if (detaching) internal.detach(div);
8434
+ internal.destroy_each(each_blocks, detaching);
8435
+ }
8436
+ };
8437
+ }
8438
+
8439
+ // (26:2) {#if rulerItemProp.children.length === 0}
8440
+ function create_if_block$2(ctx) {
8441
+ let em;
8442
+ let em_class_value;
8443
+
8444
+ return {
8445
+ c() {
8446
+ em = internal.element("em");
8447
+
8448
+ internal.attr(em, "class", em_class_value = "" + (internal.null_to_empty(/*rulerItemProp*/ ctx[0].state
8449
+ ? 'em-solid'
8450
+ : 'em-dotted') + " svelte-qy4ud2"));
8451
+
8452
+ internal.attr(em, "style", /*vars*/ ctx[3]);
8453
+ },
8454
+ m(target, anchor) {
8455
+ internal.insert(target, em, anchor);
8456
+ },
8457
+ p(ctx, dirty) {
8458
+ if (dirty & /*rulerItemProp*/ 1 && em_class_value !== (em_class_value = "" + (internal.null_to_empty(/*rulerItemProp*/ ctx[0].state
8459
+ ? 'em-solid'
8460
+ : 'em-dotted') + " svelte-qy4ud2"))) {
8461
+ internal.attr(em, "class", em_class_value);
8462
+ }
8463
+
8464
+ if (dirty & /*vars*/ 8) {
8465
+ internal.attr(em, "style", /*vars*/ ctx[3]);
8466
+ }
8467
+ },
8468
+ d(detaching) {
8469
+ if (detaching) internal.detach(em);
8470
+ }
8471
+ };
8472
+ }
8473
+
8474
+ // (30:6) {#each rulerItemProp.children as child}
8475
+ function create_each_block$4(ctx) {
8476
+ let div;
8477
+ let div_class_value;
8478
+ let style_width = `${/*child*/ ctx[6].width}px`;
8479
+
8480
+ return {
8481
+ c() {
8482
+ div = internal.element("div");
8483
+ internal.attr(div, "class", div_class_value = "" + (internal.null_to_empty(/*child*/ ctx[6].state ? 'em-solid' : 'em-dotted') + " svelte-qy4ud2"));
8484
+ internal.attr(div, "style", /*vars*/ ctx[3]);
8485
+ internal.set_style(div, "width", style_width, false);
8486
+ },
8487
+ m(target, anchor) {
8488
+ internal.insert(target, div, anchor);
8489
+ },
8490
+ p(ctx, dirty) {
8491
+ if (dirty & /*rulerItemProp*/ 1 && div_class_value !== (div_class_value = "" + (internal.null_to_empty(/*child*/ ctx[6].state ? 'em-solid' : 'em-dotted') + " svelte-qy4ud2"))) {
8492
+ internal.attr(div, "class", div_class_value);
8493
+ }
8494
+
8495
+ if (dirty & /*vars*/ 8) {
8496
+ internal.attr(div, "style", /*vars*/ ctx[3]);
8497
+ }
8498
+
8499
+ if (dirty & /*rulerItemProp*/ 1 && style_width !== (style_width = `${/*child*/ ctx[6].width}px`)) {
8500
+ internal.set_style(div, "width", style_width, false);
8501
+ }
8502
+ },
8503
+ d(detaching) {
8504
+ if (detaching) internal.detach(div);
8505
+ }
8506
+ };
8507
+ }
8508
+
8509
+ function create_fragment$7(ctx) {
8510
+ let div2;
8511
+ let t0;
8512
+ let div1;
8513
+ let div0;
8514
+ let t1_value = /*rulerItemProp*/ ctx[0].labelElement + "";
8515
+ let t1;
8516
+ let div0_resize_listener;
8517
+ let style_left = `${/*rulerItemProp*/ ctx[0].labelOffset}%`;
8518
+ let style_width = `${/*rulerItemProp*/ ctx[0].width}px`;
8519
+ let style_left_1 = `${/*rulerItemProp*/ ctx[0].left}px`;
8520
+ let style_top = `${/*rulerItemProp*/ ctx[0].top}px`;
8521
+ let style_transform = `rotate(${/*rulerItemProp*/ ctx[0].rotateDeg}deg)`;
8522
+
8523
+ function select_block_type(ctx, dirty) {
8524
+ if (/*rulerItemProp*/ ctx[0].children.length === 0) return create_if_block$2;
8525
+ return create_else_block;
8526
+ }
8527
+
8528
+ let current_block_type = select_block_type(ctx);
8529
+ let if_block = current_block_type(ctx);
8530
+
8531
+ return {
8532
+ c() {
8533
+ div2 = internal.element("div");
8534
+ if_block.c();
8535
+ t0 = internal.space();
8536
+ div1 = internal.element("div");
8537
+ div0 = internal.element("div");
8538
+ t1 = internal.text(t1_value);
8539
+ internal.attr(div0, "class", "PanoRulerPlugin-rule-label-name svelte-qy4ud2");
8540
+ internal.add_render_callback(() => /*div0_elementresize_handler*/ ctx[4].call(div0));
8541
+ internal.attr(div1, "class", "PanoRulerPlugin-rule-label svelte-qy4ud2");
8542
+ internal.set_style(div1, "left", style_left, false);
8543
+ internal.attr(div2, "class", "PanoRulerPlugin-rule-line svelte-qy4ud2");
8544
+ internal.set_style(div2, "width", style_width, false);
8545
+ internal.set_style(div2, "left", style_left_1, false);
8546
+ internal.set_style(div2, "top", style_top, false);
8547
+ internal.set_style(div2, "transform", style_transform, false);
8548
+
8549
+ internal.set_style(
8550
+ div2,
8551
+ "display",
8552
+ /*rulerItemProp*/ ctx[0].visible && /*_visible*/ ctx[2]
8553
+ ? 'block'
8554
+ : 'none',
8555
+ false
8556
+ );
8557
+ },
8558
+ m(target, anchor) {
8559
+ internal.insert(target, div2, anchor);
8560
+ if_block.m(div2, null);
8561
+ internal.append(div2, t0);
8562
+ internal.append(div2, div1);
8563
+ internal.append(div1, div0);
8564
+ internal.append(div0, t1);
8565
+ div0_resize_listener = internal.add_resize_listener(div0, /*div0_elementresize_handler*/ ctx[4].bind(div0));
8566
+ },
8567
+ p(ctx, [dirty]) {
8568
+ if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
8569
+ if_block.p(ctx, dirty);
8570
+ } else {
8571
+ if_block.d(1);
8572
+ if_block = current_block_type(ctx);
8573
+
8574
+ if (if_block) {
8575
+ if_block.c();
8576
+ if_block.m(div2, t0);
8577
+ }
8578
+ }
8579
+
8580
+ if (dirty & /*rulerItemProp*/ 1 && t1_value !== (t1_value = /*rulerItemProp*/ ctx[0].labelElement + "")) internal.set_data(t1, t1_value);
8581
+
8582
+ if (dirty & /*rulerItemProp*/ 1 && style_left !== (style_left = `${/*rulerItemProp*/ ctx[0].labelOffset}%`)) {
8583
+ internal.set_style(div1, "left", style_left, false);
8584
+ }
8585
+
8586
+ if (dirty & /*rulerItemProp*/ 1 && style_width !== (style_width = `${/*rulerItemProp*/ ctx[0].width}px`)) {
8587
+ internal.set_style(div2, "width", style_width, false);
8588
+ }
8589
+
8590
+ if (dirty & /*rulerItemProp*/ 1 && style_left_1 !== (style_left_1 = `${/*rulerItemProp*/ ctx[0].left}px`)) {
8591
+ internal.set_style(div2, "left", style_left_1, false);
8592
+ }
8593
+
8594
+ if (dirty & /*rulerItemProp*/ 1 && style_top !== (style_top = `${/*rulerItemProp*/ ctx[0].top}px`)) {
8595
+ internal.set_style(div2, "top", style_top, false);
8596
+ }
8597
+
8598
+ if (dirty & /*rulerItemProp*/ 1 && style_transform !== (style_transform = `rotate(${/*rulerItemProp*/ ctx[0].rotateDeg}deg)`)) {
8599
+ internal.set_style(div2, "transform", style_transform, false);
8600
+ }
8601
+
8602
+ if (dirty & /*rulerItemProp, _visible*/ 5) {
8603
+ internal.set_style(
8604
+ div2,
8605
+ "display",
8606
+ /*rulerItemProp*/ ctx[0].visible && /*_visible*/ ctx[2]
8607
+ ? 'block'
8608
+ : 'none',
8609
+ false
8610
+ );
8611
+ }
8612
+ },
8613
+ i: internal.noop,
8614
+ o: internal.noop,
8615
+ d(detaching) {
8616
+ if (detaching) internal.detach(div2);
8617
+ if_block.d();
8618
+ div0_resize_listener();
8619
+ }
8620
+ };
8621
+ }
8622
+
8623
+ function instance$7($$self, $$props, $$invalidate) {
8624
+ let vars;
8625
+ let { rulerItemProp } = $$props;
8626
+ let _visible = true;
8627
+ let labelWidth;
8628
+ let EM_DOTTED_BG = `data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcuNCUiIHg9Ii0xOC43JSIgeT0iLTE1MCUiPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiBvcGVyYXRvcj0iZGlsYXRlIiByYWRpdXM9Ii41Ii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resize_handler() {
8631
+ labelWidth = this.offsetWidth;
8632
+ $$invalidate(1, labelWidth);
8633
+ }
8634
+
8635
+ $$self.$$set = $$props => {
8636
+ if ('rulerItemProp' in $$props) $$invalidate(0, rulerItemProp = $$props.rulerItemProp);
8637
+ };
8638
+
8639
+ $$self.$$.update = () => {
8640
+ if ($$self.$$.dirty & /*labelWidth, rulerItemProp*/ 3) {
8641
+ {
8642
+ if (labelWidth >= rulerItemProp.width || labelWidth / 2 >= rulerItemProp.labelOffset / 100 * rulerItemProp.width || labelWidth / 2 >= (1 - rulerItemProp.labelOffset / 100) * rulerItemProp.width) {
8643
+ $$invalidate(2, _visible = false);
8644
+ } else {
8645
+ $$invalidate(2, _visible = true);
8646
+ }
8647
+ }
8648
+ }
8649
+ };
8650
+
8651
+ $$invalidate(3, vars = `--background-image: url(${EM_DOTTED_BG})`);
8652
+ return [rulerItemProp, labelWidth, _visible, vars, div0_elementresize_handler];
8653
+ }
8654
+
8655
+ class RulerItem extends internal.SvelteComponent {
8656
+ constructor(options) {
8657
+ super();
8658
+ internal.init(this, options, instance$7, create_fragment$7, internal.safe_not_equal, { rulerItemProp: 0 }, add_css$6);
8659
+ }
8660
+ }
8661
+
8662
+ /* src/PanoRulerProPlugin/RulerItems.svelte generated by Svelte v3.47.0 */
8663
+
8664
+ function get_each_context$3(ctx, list, i) {
8665
+ const child_ctx = ctx.slice();
8666
+ child_ctx[16] = list[i];
8667
+ return child_ctx;
8668
+ }
8669
+
8670
+ // (206:2) {#each rulerItemProp as itemData}
8671
+ function create_each_block$3(ctx) {
8672
+ let ruleritem;
8673
+ let current;
8674
+
8675
+ ruleritem = new RulerItem({
8676
+ props: { rulerItemProp: /*itemData*/ ctx[16] }
8677
+ });
8678
+
8679
+ return {
8680
+ c() {
8681
+ internal.create_component(ruleritem.$$.fragment);
8682
+ },
8683
+ m(target, anchor) {
8684
+ internal.mount_component(ruleritem, target, anchor);
8685
+ current = true;
8686
+ },
8687
+ p(ctx, dirty) {
8688
+ const ruleritem_changes = {};
8689
+ if (dirty & /*rulerItemProp*/ 1) ruleritem_changes.rulerItemProp = /*itemData*/ ctx[16];
8690
+ ruleritem.$set(ruleritem_changes);
8691
+ },
8692
+ i(local) {
8693
+ if (current) return;
8694
+ internal.transition_in(ruleritem.$$.fragment, local);
8695
+ current = true;
8696
+ },
8697
+ o(local) {
8698
+ internal.transition_out(ruleritem.$$.fragment, local);
8699
+ current = false;
8700
+ },
8701
+ d(detaching) {
8702
+ internal.destroy_component(ruleritem, detaching);
8703
+ }
8704
+ };
8705
+ }
8706
+
8707
+ function create_fragment$6(ctx) {
8708
+ let div;
8709
+ let current;
8710
+ let each_value = /*rulerItemProp*/ ctx[0];
8711
+ let each_blocks = [];
8712
+
8713
+ for (let i = 0; i < each_value.length; i += 1) {
8714
+ each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i));
8715
+ }
8716
+
8717
+ const out = i => internal.transition_out(each_blocks[i], 1, 1, () => {
8718
+ each_blocks[i] = null;
8719
+ });
8720
+
8721
+ return {
8722
+ c() {
8723
+ div = internal.element("div");
8724
+
8725
+ for (let i = 0; i < each_blocks.length; i += 1) {
8726
+ each_blocks[i].c();
8727
+ }
8728
+ },
8729
+ m(target, anchor) {
8730
+ internal.insert(target, div, anchor);
8731
+
8732
+ for (let i = 0; i < each_blocks.length; i += 1) {
8733
+ each_blocks[i].m(div, null);
8734
+ }
8735
+
8736
+ current = true;
8737
+ },
8738
+ p(ctx, [dirty]) {
8739
+ if (dirty & /*rulerItemProp*/ 1) {
8740
+ each_value = /*rulerItemProp*/ ctx[0];
8741
+ let i;
8742
+
8743
+ for (i = 0; i < each_value.length; i += 1) {
8744
+ const child_ctx = get_each_context$3(ctx, each_value, i);
8745
+
8746
+ if (each_blocks[i]) {
8747
+ each_blocks[i].p(child_ctx, dirty);
8748
+ internal.transition_in(each_blocks[i], 1);
8749
+ } else {
8750
+ each_blocks[i] = create_each_block$3(child_ctx);
8751
+ each_blocks[i].c();
8752
+ internal.transition_in(each_blocks[i], 1);
8753
+ each_blocks[i].m(div, null);
8754
+ }
8755
+ }
8756
+
8757
+ internal.group_outros();
8758
+
8759
+ for (i = each_value.length; i < each_blocks.length; i += 1) {
8760
+ out(i);
8761
+ }
8762
+
8763
+ internal.check_outros();
8764
+ }
8765
+ },
8766
+ i(local) {
8767
+ if (current) return;
8768
+
8769
+ for (let i = 0; i < each_value.length; i += 1) {
8770
+ internal.transition_in(each_blocks[i]);
8771
+ }
8772
+
8773
+ current = true;
8774
+ },
8775
+ o(local) {
8776
+ each_blocks = each_blocks.filter(Boolean);
8777
+
8778
+ for (let i = 0; i < each_blocks.length; i += 1) {
8779
+ internal.transition_out(each_blocks[i]);
8780
+ }
8781
+
8782
+ current = false;
8783
+ },
8784
+ d(detaching) {
8785
+ if (detaching) internal.detach(div);
8786
+ internal.destroy_each(each_blocks, detaching);
8787
+ }
8788
+ };
8789
+ }
8790
+
8791
+ function instance$6($$self, $$props, $$invalidate) {
8792
+ var _a, _b, _c, _d;
8793
+ let { five: five$1 } = $$props;
8794
+ let { rulerDatas } = $$props;
8795
+ let { options } = $$props;
8796
+ let rulerItemProp = [];
8797
+
8798
+ const canvasWidth = ((_b = (_a = five$1.getElement()) === null || _a === void 0
8799
+ ? void 0
8800
+ : _a.parentElement) === null || _b === void 0
8801
+ ? void 0
8802
+ : _b.clientWidth) || 0;
8803
+
8804
+ const canvasHeight = ((_d = (_c = five$1.getElement()) === null || _c === void 0
8805
+ ? void 0
8806
+ : _c.parentElement) === null || _d === void 0
8807
+ ? void 0
8808
+ : _d.clientHeight) || 0;
8809
+
8810
+ const getRuleScreenIntr = (startPoint, endPoint) => {
8811
+ const screenLines = [
8812
+ [{ x: 0, y: 0 }, { x: canvasWidth, y: 0 }],
8813
+ [{ x: 0, y: 0 }, { x: 0, y: canvasHeight }],
8814
+ [{ x: canvasWidth, y: 0 }, { x: canvasWidth, y: canvasHeight }],
8815
+ [{ x: 0, y: canvasHeight }, { x: canvasWidth, y: canvasHeight }]
8816
+ ];
8817
+
8818
+ const intr = [];
8819
+
8820
+ for (let i = 0; i < screenLines.length; i++) {
8821
+ const result = intersectionOfLine([startPoint, endPoint], [screenLines[i][0], screenLines[i][1]], true);
8822
+ if (result) intr.push(result);
8823
+ }
8824
+
8825
+ if (intr.length === 0) return false; else {
8826
+ return intr;
8827
+ }
8828
+ };
8829
+
8830
+ const getPosition = (start, end) => {
8831
+ const startPoint = start.clone().project(five$1.camera);
8832
+ const startLeft = (startPoint.x + 1) / 2 * canvasWidth;
8833
+ const startTop = (-startPoint.y + 1) / 2 * canvasHeight;
8834
+ const endPoint = end.clone().project(five$1.camera);
8835
+ const endLeft = (endPoint.x + 1) / 2 * canvasWidth;
8836
+ const endTop = (-endPoint.y + 1) / 2 * canvasHeight;
8837
+ const distance = Math.sqrt(Math.pow(endLeft - startLeft, 2) + Math.pow(endTop - startTop, 2));
8838
+
8839
+ return {
8840
+ startLeft,
8841
+ startTop,
8842
+ endLeft,
8843
+ endTop,
8844
+ distance
8845
+ };
8846
+ };
8847
+
8848
+ const getPositionAndVisible = (start, end, visibleOrigin) => {
8849
+ const cameraPosition = five$1.camera.position;
8850
+ const cameraDirection = five$1.camera.getWorldDirection(new THREE.Vector3());
8851
+ const startAngle = start.clone().sub(cameraPosition).normalize().angleTo(cameraDirection);
8852
+ const endAngle = end.clone().sub(cameraPosition).normalize().angleTo(cameraDirection);
8853
+ const ruleLength = start.distanceTo(end);
8854
+ const midPoint = end.clone().sub(end.clone().sub(start).divide(new THREE.Vector3(2, 2, 2)));
8855
+ const disFromCameraToMid = midPoint.distanceTo(cameraPosition);
8856
+ const { startLeft, startTop, endLeft, endTop, distance } = getPosition(start, end);
8857
+ const rad = Math.PI / 2 - Math.atan2(endLeft - startLeft, startTop - endTop);
8858
+ const deg = -(rad / Math.PI) * 180;
8859
+ let visible = true;
8860
+ if (!visibleOrigin) visible = false;
8861
+
8862
+ // 只显示拐点相连的线
8863
+ if (!equal(start, visibleOrigin) && !equal(end, visibleOrigin)) {
8864
+ visible = false;
8865
+ }
8866
+
8867
+ // 线小于0.3m隐藏
8868
+ if (ruleLength < 0.3) {
8869
+ visible = false;
8870
+ }
8871
+
8872
+ if (startAngle > Math.PI / 2) {
8873
+ visible = false;
8874
+ }
8875
+
8876
+ if (endAngle > Math.PI / 2) {
8877
+ visible = false;
8878
+ }
8879
+
8880
+ if (disFromCameraToMid / ruleLength > 8) {
8881
+ visible = false;
8882
+ }
8883
+
8884
+ let labelOffset = 50;
8885
+ let visibleLength = distance;
8886
+ const intr = getRuleScreenIntr({ x: ~~startLeft, y: ~~startTop }, { x: ~~endLeft, y: ~~endTop });
8887
+
8888
+ if (intr && intr.length === 1) {
8889
+ if (equal(start, visibleOrigin)) {
8890
+ visibleLength = Math.sqrt(Math.pow(intr[0].x - startLeft, 2) + Math.pow(intr[0].y - startTop, 2));
8891
+ labelOffset = visibleLength / distance * 50;
8892
+ } else if (equal(end, visibleOrigin)) {
8893
+ visibleLength = Math.sqrt(Math.pow(intr[0].x - endLeft, 2) + Math.pow(intr[0].y - endTop, 2));
8894
+ labelOffset = 100 - visibleLength / distance * 50;
8895
+ }
8896
+ }
8897
+
8898
+ if (intr && intr.length === 2) {
8899
+ const middlePoint = {
8900
+ x: (intr[0].x + intr[1].x) / 2,
8901
+ y: (intr[0].y + intr[1].y) / 2
8902
+ };
8903
+
8904
+ const distanceFromStart = Math.sqrt(Math.pow(middlePoint.x - startLeft, 2) + Math.pow(middlePoint.y - startTop, 2));
8905
+ labelOffset = distanceFromStart / distance * 100;
8906
+ }
8907
+
8908
+ return {
8909
+ startLeft,
8910
+ startTop,
8911
+ distance,
8912
+ deg,
8913
+ visible,
8914
+ labelOffset,
8915
+ ruleLength
8916
+ };
8917
+ };
8918
+
8919
+ const updatePanoRulerData = () => {
8920
+ const panoIndex = five$1.panoIndex;
8921
+ const rulerData = rulerDatas.find(data => data.panoIndex === panoIndex);
8922
+ if (!rulerData) return $$invalidate(0, rulerItemProp = []);
8923
+
8924
+ // 非全景模式下隐藏所有标尺
8925
+ if (five$1.currentMode !== five.Five.Mode.Panorama) return $$invalidate(0, rulerItemProp = []);
8926
+
8927
+ const cameraPosition = five$1.camera.position;
8928
+ const cameraDirection = five$1.camera.getWorldDirection(new THREE.Vector3());
8929
+ const startPoints = rulerData.lines.map(v => new THREE.Vector3(v.start[0], -v.start[1], -v.start[2]));
8930
+ const endPoints = rulerData.lines.map(v => new THREE.Vector3(v.end[0], -v.end[1], -v.end[2]));
8931
+
8932
+ // 可以看到的角度最小的拐点
8933
+ const [visibleOrigin] = startPoints.concat(endPoints).sort((pointA, pointB) => {
8934
+ const angleA = pointA.clone().setY(0).sub(cameraPosition).normalize().angleTo(cameraDirection.clone().setY(0));
8935
+ const angleB = pointB.clone().setY(0).sub(cameraPosition).normalize().angleTo(cameraDirection.clone().setY(0));
8936
+ return angleA - angleB;
8937
+ });
8938
+
8939
+ const data = rulerData.lines.map(line => {
8940
+ var _a, _b;
8941
+ const start = line.start;
8942
+ const end = line.end;
8943
+ const { startLeft, startTop, distance, deg, visible, labelOffset, ruleLength } = getPositionAndVisible(new THREE.Vector3(start[0], -start[1], -start[2]), new THREE.Vector3(end[0], -end[1], -end[2]), visibleOrigin);
8944
+ const children = [];
8945
+
8946
+ if (line.children && ((_a = line.children) === null || _a === void 0
8947
+ ? void 0
8948
+ : _a.length) > 0) {
8949
+ (_b = line.children) === null || _b === void 0
8950
+ ? void 0
8951
+ : _b.forEach(l => {
8952
+ const start = l.start;
8953
+ const end = l.end;
8954
+ const { distance } = getPosition(new THREE.Vector3(start[0], -start[1], -start[2]), new THREE.Vector3(end[0], -end[1], -end[2]));
8955
+ children.push({ width: distance, state: l.state });
8956
+ });
8957
+ }
8958
+
8959
+ return {
8960
+ width: distance,
8961
+ left: startLeft,
8962
+ top: startTop,
8963
+ rotateDeg: deg,
8964
+ state: line.state,
8965
+ children,
8966
+ labelOffset,
8967
+ visible,
8968
+ labelElement: options.distanceText(ruleLength)
8969
+ };
8970
+ });
8971
+
8972
+ $$invalidate(0, rulerItemProp = data);
8973
+ };
8974
+
8975
+ const nextFrameFreshRule = () => nextFrame$1(updatePanoRulerData);
8976
+ const throttleFreshRule = throttle(updatePanoRulerData, 80);
8977
+
8978
+ svelte.onMount(() => {
8979
+ updatePanoRulerData();
8980
+ five$1.on('panoArrived', updatePanoRulerData);
8981
+ five$1.on('modeChange', updatePanoRulerData);
8982
+ five$1.on('cameraDirectionUpdate', nextFrameFreshRule);
8983
+ five$1.on('movingToPano', nextFrameFreshRule);
8984
+ five$1.on('mouseWheel', () => throttleFreshRule());
8985
+ five$1.on('pinchGesture', () => throttleFreshRule());
8986
+ });
8987
+
8988
+ svelte.onDestroy(() => {
8989
+ five$1.off('panoArrived', updatePanoRulerData);
8990
+ five$1.off('modeChange', updatePanoRulerData);
8991
+ five$1.off('cameraDirectionUpdate', nextFrameFreshRule);
8992
+ five$1.off('movingToPano', nextFrameFreshRule);
8993
+ five$1.off('mouseWheel', () => throttleFreshRule());
8994
+ five$1.off('pinchGesture', () => throttleFreshRule());
8995
+ });
8996
+
8997
+ $$self.$$set = $$props => {
8998
+ if ('five' in $$props) $$invalidate(1, five$1 = $$props.five);
8999
+ if ('rulerDatas' in $$props) $$invalidate(2, rulerDatas = $$props.rulerDatas);
9000
+ if ('options' in $$props) $$invalidate(3, options = $$props.options);
9001
+ };
9002
+
9003
+ return [rulerItemProp, five$1, rulerDatas, options];
9004
+ }
9005
+
9006
+ class RulerItems extends internal.SvelteComponent {
9007
+ constructor(options) {
9008
+ super();
9009
+ internal.init(this, options, instance$6, create_fragment$6, internal.safe_not_equal, { five: 1, rulerDatas: 2, options: 3 });
9010
+ }
9011
+ }
9012
+
9013
+ class Controller {
9014
+ constructor(five, params) {
9015
+ var _a, _b;
9016
+ Object.defineProperty(this, "five", {
9017
+ enumerable: true,
9018
+ configurable: true,
9019
+ writable: true,
9020
+ value: void 0
9021
+ });
9022
+ Object.defineProperty(this, "container", {
9023
+ enumerable: true,
9024
+ configurable: true,
9025
+ writable: true,
9026
+ value: document.createElement('div')
9027
+ });
9028
+ Object.defineProperty(this, "panoRulerProData", {
9029
+ enumerable: true,
9030
+ configurable: true,
9031
+ writable: true,
9032
+ value: void 0
9033
+ });
9034
+ Object.defineProperty(this, "rulerItems", {
9035
+ enumerable: true,
9036
+ configurable: true,
9037
+ writable: true,
9038
+ value: void 0
9039
+ });
9040
+ Object.defineProperty(this, "state", {
9041
+ enumerable: true,
9042
+ configurable: true,
9043
+ writable: true,
9044
+ value: {
9045
+ enabled: false,
9046
+ loaded: false,
9047
+ options: {
9048
+ className: '',
9049
+ distanceText: (distance) => `${distance.toFixed(1)}m`,
9050
+ },
9051
+ }
9052
+ });
9053
+ this.five = five;
9054
+ this.container.classList.add('panoRulerProPlugin-container');
9055
+ this.container.setAttribute('style', `position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;`);
9056
+ if (params) {
9057
+ if (params.data) {
9058
+ this.load(params.data);
9059
+ }
9060
+ this.state.options = Object.assign(Object.assign({}, this.state.options), (params.options || {}));
9061
+ if ((_a = params.options) === null || _a === void 0 ? void 0 : _a.className)
9062
+ this.container.classList.add((_b = params.options) === null || _b === void 0 ? void 0 : _b.className);
9063
+ }
9064
+ this.five.once('modelLoaded', async () => {
9065
+ var _a, _b;
9066
+ (_b = (_a = this.five.getElement()) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.append(this.container);
9067
+ });
9068
+ this.five.once('dispose', () => this.dispose());
9069
+ }
9070
+ async load(serverData) {
9071
+ if (!this.five.work)
9072
+ return;
9073
+ const data = serverData.data;
9074
+ if (!data)
9075
+ throw new Error('标尺数据依赖不齐全!');
9076
+ this.panoRulerProData = data;
9077
+ this.state.loaded = true;
9078
+ }
9079
+ enable() {
9080
+ if (!this.state.loaded)
9081
+ return false;
9082
+ if (this.state.enabled)
9083
+ return true;
9084
+ this.state.enabled = true;
9085
+ this.render();
9086
+ return true;
9087
+ }
9088
+ disable() {
9089
+ if (!this.state.enabled)
9090
+ return true;
9091
+ this.state.enabled = false;
9092
+ this.render();
9093
+ return true;
9094
+ }
9095
+ async render() {
9096
+ var _a;
9097
+ if (this.state.enabled) {
9098
+ if (!this.panoRulerProData || !this.container)
9099
+ return;
9100
+ this.rulerItems = new RulerItems({
9101
+ target: this.container,
9102
+ props: {
9103
+ five: this.five,
9104
+ rulerDatas: this.panoRulerProData,
9105
+ options: this.state.options,
9106
+ },
9107
+ });
9108
+ }
9109
+ else {
9110
+ (_a = this.rulerItems) === null || _a === void 0 ? void 0 : _a.$destroy();
9111
+ this.rulerItems = undefined;
9112
+ }
9113
+ }
9114
+ dispose() {
9115
+ if (this.container) {
9116
+ this.rulerItems.$destroy();
9117
+ this.rulerItems = undefined;
9118
+ }
9119
+ this.container.remove();
9120
+ }
9121
+ }
9122
+
9123
+ /**
9124
+ * 全景标尺插件
9125
+ */
9126
+ const PanoRulerProPlugin = (five, params) => {
9127
+ return new Controller(five, params);
9128
+ };
9129
+
9130
+ const roomInfoIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaAiGS1nok9WkFAUJb8Upa6Y3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gEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC';
9131
+
9132
+ function getRoomInfoInstance() {
9133
+ const infoDom = document.createElement('div');
9134
+ const iconDom = document.createElement('i');
9135
+ const textDom = document.createElement('span');
9136
+ infoDom.appendChild(iconDom);
9137
+ infoDom.appendChild(textDom);
9138
+ // infoDom style
9139
+ infoDom.style.position = 'relative';
9140
+ infoDom.style.width = '100%';
9141
+ infoDom.style.display = 'flex';
9142
+ infoDom.style.flexDirection = 'column';
9143
+ infoDom.style.alignItems = 'center';
9144
+ infoDom.style.marginTop = `${150 / 16}rem`;
9145
+ infoDom.style.opacity = '0';
9146
+ infoDom.style.transition = 'opacity 1000ms linear';
9147
+ // iconDom style
9148
+ iconDom.style.display = 'block';
9149
+ iconDom.style.width = `${134 / 16}rem`;
9150
+ iconDom.style.height = `${22 / 16}rem`;
9151
+ iconDom.style.backgroundSize = '100%';
9152
+ iconDom.style.backgroundRepeat = 'no-repeat';
9153
+ iconDom.style.backgroundImage = `url(${roomInfoIcon})`;
9154
+ textDom.style.marginTop = `${10 / 16}rem`;
8388
9155
  // textDom style
8389
9156
  textDom.style.fontSize = `${16 / 16}rem`;
8390
9157
  textDom.style.color = '#fff';
@@ -14822,18 +15589,18 @@ void main() {
14822
15589
 
14823
15590
  function get_each_context(ctx, list, i) {
14824
15591
  const child_ctx = ctx.slice();
14825
- child_ctx[30] = list[i];
15592
+ child_ctx[31] = list[i];
14826
15593
  return child_ctx;
14827
15594
  }
14828
15595
 
14829
- // (229:2) {#if itemLabelItem.visible}
15596
+ // (235:2) {#if itemLabelItem.visible}
14830
15597
  function create_if_block(ctx) {
14831
15598
  let itemlabelitem;
14832
15599
  let current;
14833
15600
 
14834
15601
  itemlabelitem = new ItemLabelItem({
14835
15602
  props: {
14836
- itemLabel: /*itemLabelItem*/ ctx[30],
15603
+ itemLabel: /*itemLabelItem*/ ctx[31],
14837
15604
  hooks: /*hooks*/ ctx[0],
14838
15605
  anchorEnabled: /*anchorEnabled*/ ctx[2],
14839
15606
  onIconClick: /*onIconClick*/ ctx[6]
@@ -14850,7 +15617,7 @@ void main() {
14850
15617
  },
14851
15618
  p(ctx, dirty) {
14852
15619
  const itemlabelitem_changes = {};
14853
- if (dirty[0] & /*renderItemLabels*/ 2) itemlabelitem_changes.itemLabel = /*itemLabelItem*/ ctx[30];
15620
+ if (dirty[0] & /*renderItemLabels*/ 2) itemlabelitem_changes.itemLabel = /*itemLabelItem*/ ctx[31];
14854
15621
  if (dirty[0] & /*hooks*/ 1) itemlabelitem_changes.hooks = /*hooks*/ ctx[0];
14855
15622
  if (dirty[0] & /*anchorEnabled*/ 4) itemlabelitem_changes.anchorEnabled = /*anchorEnabled*/ ctx[2];
14856
15623
  itemlabelitem.$set(itemlabelitem_changes);
@@ -14870,12 +15637,12 @@ void main() {
14870
15637
  };
14871
15638
  }
14872
15639
 
14873
- // (228:1) {#each renderItemLabels as itemLabelItem (itemLabelItem.id)}
15640
+ // (234:1) {#each renderItemLabels as itemLabelItem (itemLabelItem.id)}
14874
15641
  function create_each_block(key_1, ctx) {
14875
15642
  let first;
14876
15643
  let if_block_anchor;
14877
15644
  let current;
14878
- let if_block = /*itemLabelItem*/ ctx[30].visible && create_if_block(ctx);
15645
+ let if_block = /*itemLabelItem*/ ctx[31].visible && create_if_block(ctx);
14879
15646
 
14880
15647
  return {
14881
15648
  key: key_1,
@@ -14895,7 +15662,7 @@ void main() {
14895
15662
  p(new_ctx, dirty) {
14896
15663
  ctx = new_ctx;
14897
15664
 
14898
- if (/*itemLabelItem*/ ctx[30].visible) {
15665
+ if (/*itemLabelItem*/ ctx[31].visible) {
14899
15666
  if (if_block) {
14900
15667
  if_block.p(ctx, dirty);
14901
15668
 
@@ -14942,7 +15709,7 @@ void main() {
14942
15709
  let div_resize_listener;
14943
15710
  let current;
14944
15711
  let each_value = /*renderItemLabels*/ ctx[1];
14945
- const get_key = ctx => /*itemLabelItem*/ ctx[30].id;
15712
+ const get_key = ctx => /*itemLabelItem*/ ctx[31].id;
14946
15713
 
14947
15714
  for (let i = 0; i < each_value.length; i += 1) {
14948
15715
  let child_ctx = get_each_context(ctx, each_value, i);
@@ -14959,7 +15726,7 @@ void main() {
14959
15726
  }
14960
15727
 
14961
15728
  internal.attr(div, "class", "item-labels-container svelte-gk8s47");
14962
- internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[12].call(div));
15729
+ internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[13].call(div));
14963
15730
  internal.set_style(div, "opacity", /*itemsVisible*/ ctx[5] ? 1 : 0, false);
14964
15731
  },
14965
15732
  m(target, anchor) {
@@ -14969,7 +15736,7 @@ void main() {
14969
15736
  each_blocks[i].m(div, null);
14970
15737
  }
14971
15738
 
14972
- div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[12].bind(div));
15739
+ div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[13].bind(div));
14973
15740
  current = true;
14974
15741
  },
14975
15742
  p(ctx, dirty) {
@@ -15017,6 +15784,7 @@ void main() {
15017
15784
  const { Raycaster, Vector3 } = THREE__namespace;
15018
15785
  let { five: five$1 } = $$props;
15019
15786
  let { modelOcclusionEnable } = $$props;
15787
+ let { onlyVisibleInPanorama } = $$props;
15020
15788
  let { itemLabels } = $$props;
15021
15789
  let { hooks } = $$props;
15022
15790
  let { displayStrategyType } = $$props;
@@ -15068,7 +15836,10 @@ void main() {
15068
15836
  const ratioFromTop = (2 - (offsetYFromCenter + 1)) / 2;
15069
15837
  const isFront = Math.abs(offsetZFromCenter) < 1;
15070
15838
  const cssOffset = [ratioFromLeft, ratioFromTop];
15839
+
15840
+ // 只计算在前面就行
15071
15841
  const isInViewport = isFront && cssOffset.every(ratio => ratio < 1 && ratio >= 0);
15842
+
15072
15843
  return Boolean(isInViewport);
15073
15844
  };
15074
15845
 
@@ -15089,8 +15860,15 @@ void main() {
15089
15860
  };
15090
15861
 
15091
15862
  const getFormatedItemLabels = (five$1, labels) => {
15863
+ console.log(labels);
15864
+
15092
15865
  // 计算位置 & 可见性
15093
15866
  const newLabels = labels.map(label => {
15867
+ // 不在绑定点位则直接不可见
15868
+ if (five$1.state.panoIndex !== label.panoIndex) {
15869
+ return Object.assign(Object.assign({}, label), { visible: false });
15870
+ }
15871
+
15094
15872
  const cssOffset = getLabelCssOffset(five$1, label);
15095
15873
  label.name.length * basicWidth;
15096
15874
  const strokeLength = getStrokeLength(label.modelPosition[1], displayStrategyType);
@@ -15143,16 +15921,6 @@ void main() {
15143
15921
  handleCameraUpdate();
15144
15922
  };
15145
15923
 
15146
- const onFiveModeChange = mode => {
15147
- $$invalidate(5, itemsVisible = false);
15148
-
15149
- five$1.once('initAnimationEnded', (panoIndex, pose, userAction) => {
15150
- $$invalidate(2, anchorEnabled = mode === five.Five.Mode.Panorama);
15151
- $$invalidate(5, itemsVisible = true);
15152
- if (!userAction) return; else onItemLabelUpdate();
15153
- });
15154
- };
15155
-
15156
15924
  const handleCameraUpdate = debounce(
15157
15925
  () => {
15158
15926
  $$invalidate(5, itemsVisible = true);
@@ -15210,11 +15978,10 @@ void main() {
15210
15978
  const onIconClick = itemLabel => {
15211
15979
  if (five$1.state.mode === five.Five.Mode.Panorama) return;
15212
15980
  const observers = five$1.work.observers;
15213
- const fromPositionVector = new Vector3(itemLabel.position[0], itemLabel.position[1], itemLabel.position[2]);
15981
+ const fromPositionVector = new Vector3().fromArray(itemLabel.position);
15214
15982
  const observer = getNearObserverPano(fromPositionVector, observers);
15215
15983
 
15216
15984
  if (observer) {
15217
- console.log('--has observer--');
15218
15985
  itemLabel.observerIndex = observer.panoIndex;
15219
15986
  }
15220
15987
 
@@ -15257,12 +16024,12 @@ void main() {
15257
16024
  onItemLabelUpdate();
15258
16025
  addResizeListener();
15259
16026
  five$1.on('cameraUpdate', handleCameraUpdateCallback);
15260
- five$1.on('modeChange', onFiveModeChange);
15261
- });
16027
+ }); // five.on('modeChange', onFiveModeChange)
15262
16028
 
15263
16029
  svelte.onDestroy(() => {
15264
16030
  five$1.off('cameraUpdate', handleCameraUpdateCallback);
15265
- five$1.off('modeChange', onFiveModeChange);
16031
+
16032
+ // five.off('modeChange', onFiveModeChange)
15266
16033
  window.removeEventListener('resize', onResize, false);
15267
16034
  });
15268
16035
 
@@ -15276,10 +16043,11 @@ void main() {
15276
16043
  $$self.$$set = $$props => {
15277
16044
  if ('five' in $$props) $$invalidate(7, five$1 = $$props.five);
15278
16045
  if ('modelOcclusionEnable' in $$props) $$invalidate(8, modelOcclusionEnable = $$props.modelOcclusionEnable);
15279
- if ('itemLabels' in $$props) $$invalidate(9, itemLabels = $$props.itemLabels);
16046
+ if ('onlyVisibleInPanorama' in $$props) $$invalidate(9, onlyVisibleInPanorama = $$props.onlyVisibleInPanorama);
16047
+ if ('itemLabels' in $$props) $$invalidate(10, itemLabels = $$props.itemLabels);
15280
16048
  if ('hooks' in $$props) $$invalidate(0, hooks = $$props.hooks);
15281
- if ('displayStrategyType' in $$props) $$invalidate(10, displayStrategyType = $$props.displayStrategyType);
15282
- if ('maxVisibleDistance' in $$props) $$invalidate(11, maxVisibleDistance = $$props.maxVisibleDistance);
16049
+ if ('displayStrategyType' in $$props) $$invalidate(11, displayStrategyType = $$props.displayStrategyType);
16050
+ if ('maxVisibleDistance' in $$props) $$invalidate(12, maxVisibleDistance = $$props.maxVisibleDistance);
15283
16051
  };
15284
16052
 
15285
16053
  return [
@@ -15292,6 +16060,7 @@ void main() {
15292
16060
  onIconClick,
15293
16061
  five$1,
15294
16062
  modelOcclusionEnable,
16063
+ onlyVisibleInPanorama,
15295
16064
  itemLabels,
15296
16065
  displayStrategyType,
15297
16066
  maxVisibleDistance,
@@ -15312,10 +16081,11 @@ void main() {
15312
16081
  {
15313
16082
  five: 7,
15314
16083
  modelOcclusionEnable: 8,
15315
- itemLabels: 9,
16084
+ onlyVisibleInPanorama: 9,
16085
+ itemLabels: 10,
15316
16086
  hooks: 0,
15317
- displayStrategyType: 10,
15318
- maxVisibleDistance: 11
16087
+ displayStrategyType: 11,
16088
+ maxVisibleDistance: 12
15319
16089
  },
15320
16090
  add_css,
15321
16091
  [-1, -1]
@@ -15325,12 +16095,12 @@ void main() {
15325
16095
 
15326
16096
  /** @description 转成内部所需数据 */
15327
16097
  function parseItemLabelPluginData(data) {
15328
- return data.item_labels.map(label => (Object.assign({ modelPosition: [label.position[0], label.position[1], label.position[2]], observerIndex: undefined }, label)));
16098
+ return data.item_labels.map(label => (Object.assign(Object.assign({}, label), { modelPosition: [label.position[0], label.position[1], label.position[2]], observerIndex: undefined })));
15329
16099
  }
15330
16100
 
15331
16101
  const defaultMaxVisibleDistance = undefined;
15332
16102
  const Plugin = (five$1, params) => {
15333
- var _a, _b, _c;
16103
+ var _a, _b, _c, _d;
15334
16104
  const pluginState = {
15335
16105
  container: document.createElement('div'),
15336
16106
  data: null,
@@ -15341,8 +16111,9 @@ void main() {
15341
16111
  app: undefined,
15342
16112
  hooks: new five.Subscribe(),
15343
16113
  modelOcclusionEnable: (_a = params === null || params === void 0 ? void 0 : params.modelOcclusionEnable) !== null && _a !== void 0 ? _a : true,
15344
- displayStrategyType: (_b = params === null || params === void 0 ? void 0 : params.displayStrategyType) !== null && _b !== void 0 ? _b : exports.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.SMALL,
15345
- maxVisibleDistance: (_c = params === null || params === void 0 ? void 0 : params.maxVisibleDistance) !== null && _c !== void 0 ? _c : defaultMaxVisibleDistance,
16114
+ onlyVisibleInPanorama: (_b = params === null || params === void 0 ? void 0 : params.onlyVisibleInPanorama) !== null && _b !== void 0 ? _b : true,
16115
+ displayStrategyType: (_c = params === null || params === void 0 ? void 0 : params.displayStrategyType) !== null && _c !== void 0 ? _c : exports.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.SMALL,
16116
+ maxVisibleDistance: (_d = params === null || params === void 0 ? void 0 : params.maxVisibleDistance) !== null && _d !== void 0 ? _d : defaultMaxVisibleDistance,
15346
16117
  };
15347
16118
  pluginState.container.setAttribute('class', 'item-label-plugin-container');
15348
16119
  pluginState.container.style.cssText = `
@@ -15379,6 +16150,7 @@ void main() {
15379
16150
  return true;
15380
16151
  };
15381
16152
  const dispose = () => {
16153
+ removeListener4Five();
15382
16154
  pluginState.container.remove();
15383
16155
  };
15384
16156
  const render = () => {
@@ -15398,6 +16170,7 @@ void main() {
15398
16170
  props: {
15399
16171
  five: five$1,
15400
16172
  modelOcclusionEnable: pluginState.modelOcclusionEnable,
16173
+ onlyVisibleInPanorama: pluginState.onlyVisibleInPanorama,
15401
16174
  itemLabels: pluginState.itemLabels,
15402
16175
  wrapper: pluginState.wrapper,
15403
16176
  hooks: pluginState.hooks,
@@ -15415,9 +16188,27 @@ void main() {
15415
16188
  };
15416
16189
  // 添加 five 监听
15417
16190
  const addListener4Five = () => {
15418
- // five.on('modeChange', onFiveModeChange)
16191
+ five$1.on('modeChange', onFiveModeChange);
15419
16192
  five$1.once('dispose', dispose);
15420
16193
  };
16194
+ // 取消 five 监听
16195
+ const removeListener4Five = () => {
16196
+ five$1.off('modeChange', onFiveModeChange);
16197
+ };
16198
+ const onFiveModeChange = (mode) => {
16199
+ // if (!pluginState.enabled) return
16200
+ if (mode !== five.Five.Mode.Panorama) {
16201
+ pluginState.fiveModeEnabled = false;
16202
+ disable();
16203
+ return;
16204
+ }
16205
+ // pluginState.fiveModeEnabled = false
16206
+ // render()
16207
+ five$1.once('initAnimationEnded', () => {
16208
+ pluginState.fiveModeEnabled = true;
16209
+ enable();
16210
+ });
16211
+ };
15421
16212
  addListener4Five();
15422
16213
  return {
15423
16214
  appendTo,
@@ -15434,8 +16225,11 @@ void main() {
15434
16225
  version: 0,
15435
16226
  };
15436
16227
 
16228
+ const DnalogelVersion = '2.0.0-alpha.38';
16229
+
15437
16230
  exports.CSS3DRenderPlugin = CSS3DRenderPlugin;
15438
16231
  exports.CameraMovementPlugin = CameraMovementPlugin;
16232
+ exports.DnalogelVersion = DnalogelVersion;
15439
16233
  exports.FLOOR_TYPE_MAP = FLOOR_TYPE_MAP;
15440
16234
  exports.ItemLabelPlugin = Plugin;
15441
16235
  exports.Magnifier = Magnifier;
@@ -15451,6 +16245,7 @@ void main() {
15451
16245
  exports.PanoFloorplanRadarPlugin = PanoFloorplanRadarPlugin;
15452
16246
  exports.PanoMeasurePlugin = PanoMeasurePlugin;
15453
16247
  exports.PanoRulerPlugin = PanoRulerPlugin;
16248
+ exports.PanoRulerProPlugin = PanoRulerProPlugin;
15454
16249
  exports.PanoSpatialTagPlugin = PanoSpatialTagPlugin;
15455
16250
  exports.ROOM_FETILE_TYPE_MAP = ROOM_FETILE_TYPE_MAP;
15456
16251
  exports.ROOM_TYPE_MAP = ROOM_TYPE_MAP;