@mappedin/mappedin-js 6.0.1-alpha.2 → 6.0.1-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.css CHANGED
@@ -1 +1 @@
1
- .mMapviewHoverLabel{background:rgba(255,255,255,.9);color:#333;padding:10px;font-size:14px;font-weight:700;transition:opacity .3s;font-family:sans-serif}.mappedin-map{position:relative;overflow:hidden}.mappedin__floating-label{position:absolute;top:0;left:0;opacity:0;width:200px;height:200px;will-change:transform;transition:opacity .3s linear}.mappedin__floating-label__icon{position:absolute;top:0;left:0;width:16px;height:16px}.mappedin__floating-label__icon>svg{position:absolute;top:-50%;left:-50%}.mappedin__floating-label__text_holder{font-family:InterUI-Regular,Helvetica,Arial,sans-serif;font-weight:400;font-weight:500;position:absolute;pointer-events:none;word-break:keep-all}.mappedin__floating-label__text_legacy{text-shadow:1px 1px 0px #ffffff,-1px -1px 0px #ffffff,1px -1px 0px #ffffff,-1px 1px 0px #ffffff}.mappedin__floating-label__text_back{-webkit-text-stroke:4px white;color:#fff}.mappedin__floating-label__text_front{color:#000;position:absolute;display:block;width:100%;height:100%;top:0;left:0}.mappedin-tooltip__wrapper{display:flex;width:1px;height:1px;align-items:center;justify-content:center;z-index:1}.mappedin-tooltip{font-family:InterUI-Regular,Helvetica,Arial,sans-serif;font-weight:400;top:0;transition:transform .3s linear;font-weight:700;color:#000;position:absolute;z-index:1;transition:opacity .3s;display:flex;flex-direction:row;will-change:transform,opacity;justify-content:center}.mappedin-tooltip>div{z-index:2;flex-shrink:0;max-width:500px;background:white;border-radius:20px;box-shadow:0 2px 11px #0003}.mappedin-tooltip:before{content:"";width:0;height:0;top:calc(50% - 10px);left:-10px;z-index:1;position:absolute;border-bottom:10px solid transparent;border-top:10px solid transparent}.mappedin-tooltip.tooltip--anchor-top{left:0;top:0}.mappedin-tooltip.tooltip--anchor-top:before{left:calc(50% - 10px);top:calc(100% - 5px);right:auto;border-bottom:10px solid transparent;border-top:10px solid white;border-left:10px solid transparent;border-right:10px solid transparent}.mappedin-tooltip.tooltip--anchor-bottom{left:0;top:0}.mappedin-tooltip.tooltip--anchor-bottom:before{left:calc(50% - 10px);top:-15px;right:auto;border-bottom:10px solid white;border-top:10px solid transparent;border-left:10px solid transparent;border-right:10px solid transparent}.mappedin-tooltip.tooltip--anchor-right{justify-content:flex-start;left:0;top:0}.mappedin-tooltip.tooltip--anchor-right:before{left:-5px;right:auto;border-right:10px solid white}.mappedin-tooltip.tooltip--anchor-left{left:0;top:0}.mappedin-tooltip.tooltip--anchor-left:before{left:auto;right:-5px;border-left:10px solid white}.mappedin-tooltip.tooltip--anchor-top-left{left:7px;top:7px}.mappedin-tooltip.tooltip--anchor-top-left:before{left:auto;right:-7px;top:calc(100% - 13px);border-bottom:10px solid transparent;border-top:10px solid white;border-left:10px solid transparent;border-right:10px solid transparent;transform:rotate(-45deg)}.mappedin-tooltip.tooltip--anchor-top-right{left:-6px;top:7px}.mappedin-tooltip.tooltip--anchor-top-right:before{left:-7px;right:auto;top:calc(100% - 13px);border-bottom:10px solid transparent;border-top:10px solid white;border-left:10px solid transparent;border-right:10px solid transparent;transform:rotate(45deg)}.mappedin-tooltip.tooltip--anchor-bottom-left{left:7px;top:-6px}.mappedin-tooltip.tooltip--anchor-bottom-left:before{left:auto;right:-7px;top:-7px;border-bottom:10px solid white;border-top:10px solid transparent;border-left:10px solid transparent;border-right:10px solid transparent;transform:rotate(45deg)}.mappedin-tooltip.tooltip--anchor-bottom-right{left:-6px;top:-6px}.mappedin-tooltip.tooltip--anchor-bottom-right:before{left:-7px;right:auto;top:-7px;border-bottom:10px solid white;border-top:10px solid transparent;border-left:10px solid transparent;border-right:10px solid transparent;transform:rotate(-45deg)}.mappedin-tooltip.tooltip--visible{opacity:1}.mappedin-tooltip.pointer-events-none{pointer-events:none}.mappedin-tooltip.pointer-events-auto{pointer-events:auto}.mappedin-marker{font-family:InterUI-Regular,Helvetica,Arial,sans-serif;font-weight:400;pointer-events:none;top:0;transition:transform .3s linear;position:absolute;font-weight:700;color:#000;z-index:1;transition:opacity .3s;display:flex;flex-direction:row;will-change:opacity;justify-content:center}.mappedin__smart-collision-engine__container{position:absolute;left:0;top:0;bottom:0;right:0;pointer-events:none;transform-style:preserve-3d;z-index:1;font-family:InterUI-Regular,Helvetica,Arial,sans-serif}.mappedin__smart-collision-engine-debug__container{position:absolute;left:0;top:0;bottom:0;right:0;transition:opacity .3s ease-in-out;pointer-events:none;will-change:opacity}.mappedin__smart-collision-engine-debug__container.interacting{opacity:.2}.outdoor-ctrl-attrib{display:block;position:absolute;visibility:visible;pointer-events:auto;font:9px/11px InterUI-Regular,Helvetica,Arial,sans-serif;transform:translate(0);padding:3px 20px 1px 5px;background-color:#ffffff80;margin:0;min-width:11px;min-height:11px}.outdoor-ctrl-attrib.outdoor-ctrl-attrib-hide{display:none}.outdoor-ctrl-attrib-top-left{top:0;left:1px;float:left;border-bottom-right-radius:4px}.outdoor-ctrl-attrib-top-right{top:0;right:1px;float:right;border-bottom-left-radius:4px}.outdoor-ctrl-attrib-bottom-left{bottom:0;left:1px;float:left;border-top-right-radius:4px}.outdoor-ctrl-attrib-bottom-right{right:0;bottom:1px;float:right;border-top-left-radius:4px}.outdoor-ctrl-attrib-bottom-left,.outdoor-ctrl-attrib-top-left{padding:3px 5px 1px 20px}.outdoor-ctrl-attrib.outdoor-compact{background-color:transparent}.outdoor-ctrl-attrib.outdoor-compact-show{min-width:15px;min-height:15px;box-sizing:border-box;background-color:#ffffff80}.outdoor-ctrl-attrib-inner,.outdoor-ctrl-attrib-inner a{color:#000000bf;text-decoration:none}.outdoor-ctrl-attrib-inner a:hover{color:#017ef1;text-decoration:underline;cursor:pointer}.outdoor-ctrl-attrib.outdoor-compact .outdoor-ctrl-attrib-inner{display:none}.outdoor-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'><circle cx='10' cy='10' r='5.9' style='fill:rgba(255,255,255,1);'/><path style='fill:rgba(0,0,0,0.7);' d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/></svg>");background-size:15px;width:15px;height:15px;box-sizing:border-box;border-radius:50%;outline:none;top:0;right:2px;border:1px}.outdoor-ctrl-attrib summary.outdoor-ctrl-attrib-button{-webkit-appearance:none;appearance:none;list-style:none}.outdoor-ctrl-attrib summary.outdoor-ctrl-attrib-button::-webkit-details-marker{display:none}.outdoor-ctrl-attrib-top-left .outdoor-ctrl-attrib-button,.outdoor-ctrl-attrib-bottom-left .outdoor-ctrl-attrib-button{left:2px}.outdoor-ctrl-attrib.outdoor-compact .outdoor-ctrl-attrib-button,.outdoor-ctrl-attrib.outdoor-compact-show .outdoor-ctrl-attrib-inner{display:block}:root{--pin-shadow-hover-scale: .9;--pin-shadow-width: 12px;--pin-shadow-height: 5px;--pin-shadow-opacity: .35;--pin-drop-animation-duration-ms: .25s}@keyframes drop-pin{0%{transform:translateY(-200%)}to{transform:translateY(0)}}@keyframes pin-shadow{0%{transform:scale(var(--pin-shadow-hover-scale))}to{transform:scale(1)}}.mappedin-dropped-pin-wrapper{position:relative;width:fit-content;height:fit-content;width:36px;height:42px}.mappedin-dropped-pin-wrapper svg{position:absolute;left:calc(50% - var(--pin-shadow-width));animation:drop-pin var(--pin-drop-animation-duration-ms) ease-in}.mappedin-dropped-pin-wrapper>.pin-shadow{position:absolute;left:calc(50% - (var(--pin-shadow-width) / 2));bottom:0;height:var(--pin-shadow-height);width:var(--pin-shadow-width);border-radius:100%;opacity:var(--pin-shadow-opacity);animation:pin-shadow .25s ease-in}@keyframes bounce{0%{transform:translateY(-10px);opacity:0}12.5%{transform:translateY(0);opacity:1}25%{transform:translateY(0)}37.5%{transform:translateY(-10px)}50%{transform:translateY(0)}62.5%{transform:translateY(-10px)}75%{transform:translateY(0)}87.5%{transform:translateY(-10px)}to{transform:translateY(0)}}.mappedin-connection-marker .bouncey{animation:bounce 2.5s linear}.mappedin-connection-marker .arrow--down{transform:rotate(180deg)}.mappedin-connection-marker .connection-circle{display:flex;justify-content:center;align-items:center;border-radius:50%;border:2px solid white;box-shadow:0 2px 8px #00000026}
1
+ .mMapviewHoverLabel{background:rgba(255,255,255,.9);color:#333;padding:10px;font-size:14px;font-weight:700;transition:opacity .3s;font-family:sans-serif}.mappedin-map{position:relative;overflow:hidden}.mappedin__floating-label{position:absolute;top:0;left:0;opacity:0;width:200px;height:200px;will-change:transform;transition:opacity .3s linear}.mappedin__floating-label__icon{position:absolute;top:0;left:0;width:16px;height:16px}.mappedin__floating-label__icon>svg{position:absolute;top:-50%;left:-50%}.mappedin__floating-label__text_holder{font-family:InterUI-Regular,Helvetica,Arial,sans-serif;font-weight:400;font-weight:500;position:absolute;pointer-events:none;word-break:keep-all}.mappedin__floating-label__text_legacy{text-shadow:1px 1px 0px #ffffff,-1px -1px 0px #ffffff,1px -1px 0px #ffffff,-1px 1px 0px #ffffff}.mappedin__floating-label__text_back{-webkit-text-stroke:4px white;color:#fff}.mappedin__floating-label__text_front{color:#000;position:absolute;display:block;width:100%;height:100%;top:0;left:0}.mappedin-tooltip__wrapper{display:flex;width:1px;height:1px;align-items:center;justify-content:center;z-index:1}.mappedin-tooltip{font-family:InterUI-Regular,Helvetica,Arial,sans-serif;font-weight:400;top:0;transition:transform .3s linear;font-weight:700;color:#000;position:absolute;z-index:1;transition:opacity .3s;display:flex;flex-direction:row;will-change:transform,opacity;justify-content:center}.mappedin-tooltip>div{z-index:2;flex-shrink:0;max-width:500px;background:white;border-radius:20px;box-shadow:0 2px 11px #0003}.mappedin-tooltip:before{content:"";width:0;height:0;top:calc(50% - 10px);left:-10px;z-index:1;position:absolute;border-bottom:10px solid transparent;border-top:10px solid transparent}.mappedin-tooltip.tooltip--anchor-top{left:0;top:0}.mappedin-tooltip.tooltip--anchor-top:before{left:calc(50% - 10px);top:calc(100% - 5px);right:auto;border-bottom:10px solid transparent;border-top:10px solid white;border-left:10px solid transparent;border-right:10px solid transparent}.mappedin-tooltip.tooltip--anchor-bottom{left:0;top:0}.mappedin-tooltip.tooltip--anchor-bottom:before{left:calc(50% - 10px);top:-15px;right:auto;border-bottom:10px solid white;border-top:10px solid transparent;border-left:10px solid transparent;border-right:10px solid transparent}.mappedin-tooltip.tooltip--anchor-right{justify-content:flex-start;left:0;top:0}.mappedin-tooltip.tooltip--anchor-right:before{left:-5px;right:auto;border-right:10px solid white}.mappedin-tooltip.tooltip--anchor-left{left:0;top:0}.mappedin-tooltip.tooltip--anchor-left:before{left:auto;right:-5px;border-left:10px solid white}.mappedin-tooltip.tooltip--anchor-top-left{left:7px;top:7px}.mappedin-tooltip.tooltip--anchor-top-left:before{left:auto;right:-7px;top:calc(100% - 13px);border-bottom:10px solid transparent;border-top:10px solid white;border-left:10px solid transparent;border-right:10px solid transparent;transform:rotate(-45deg)}.mappedin-tooltip.tooltip--anchor-top-right{left:-6px;top:7px}.mappedin-tooltip.tooltip--anchor-top-right:before{left:-7px;right:auto;top:calc(100% - 13px);border-bottom:10px solid transparent;border-top:10px solid white;border-left:10px solid transparent;border-right:10px solid transparent;transform:rotate(45deg)}.mappedin-tooltip.tooltip--anchor-bottom-left{left:7px;top:-6px}.mappedin-tooltip.tooltip--anchor-bottom-left:before{left:auto;right:-7px;top:-7px;border-bottom:10px solid white;border-top:10px solid transparent;border-left:10px solid transparent;border-right:10px solid transparent;transform:rotate(45deg)}.mappedin-tooltip.tooltip--anchor-bottom-right{left:-6px;top:-6px}.mappedin-tooltip.tooltip--anchor-bottom-right:before{left:-7px;right:auto;top:-7px;border-bottom:10px solid white;border-top:10px solid transparent;border-left:10px solid transparent;border-right:10px solid transparent;transform:rotate(-45deg)}.mappedin-tooltip.tooltip--visible{opacity:1}.mappedin-tooltip.pointer-events-none{pointer-events:none}.mappedin-tooltip.pointer-events-auto{pointer-events:auto}.outdoor-ctrl-attrib{display:block;position:absolute;visibility:visible;pointer-events:auto;font:9px/11px InterUI-Regular,Helvetica,Arial,sans-serif;transform:translate(0);padding:3px 20px 1px 5px;background-color:#ffffff80;margin:0;min-width:11px;min-height:11px}.outdoor-ctrl-attrib.outdoor-ctrl-attrib-hide{display:none}.outdoor-ctrl-attrib-top-left{top:0;left:1px;float:left;border-bottom-right-radius:4px}.outdoor-ctrl-attrib-top-right{top:0;right:1px;float:right;border-bottom-left-radius:4px}.outdoor-ctrl-attrib-bottom-left{bottom:0;left:1px;float:left;border-top-right-radius:4px}.outdoor-ctrl-attrib-bottom-right{right:0;bottom:1px;float:right;border-top-left-radius:4px}.outdoor-ctrl-attrib-bottom-left,.outdoor-ctrl-attrib-top-left{padding:3px 5px 1px 20px}.outdoor-ctrl-attrib.outdoor-compact{background-color:transparent}.outdoor-ctrl-attrib.outdoor-compact-show{min-width:15px;min-height:15px;box-sizing:border-box;background-color:#ffffff80}.outdoor-ctrl-attrib-inner,.outdoor-ctrl-attrib-inner a{color:#000000bf;text-decoration:none}.outdoor-ctrl-attrib-inner a:hover{color:#017ef1;text-decoration:underline;cursor:pointer}.outdoor-ctrl-attrib.outdoor-compact .outdoor-ctrl-attrib-inner{display:none}.outdoor-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'><circle cx='10' cy='10' r='5.9' style='fill:rgba(255,255,255,1);'/><path style='fill:rgba(0,0,0,0.7);' d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/></svg>");background-size:15px;width:15px;height:15px;box-sizing:border-box;border-radius:50%;outline:none;top:0;right:2px;border:1px}.outdoor-ctrl-attrib summary.outdoor-ctrl-attrib-button{-webkit-appearance:none;appearance:none;list-style:none}.outdoor-ctrl-attrib summary.outdoor-ctrl-attrib-button::-webkit-details-marker{display:none}.outdoor-ctrl-attrib-top-left .outdoor-ctrl-attrib-button,.outdoor-ctrl-attrib-bottom-left .outdoor-ctrl-attrib-button{left:2px}.outdoor-ctrl-attrib.outdoor-compact .outdoor-ctrl-attrib-button,.outdoor-ctrl-attrib.outdoor-compact-show .outdoor-ctrl-attrib-inner{display:block}:root{--pin-shadow-hover-scale: .9;--pin-shadow-width: 12px;--pin-shadow-height: 5px;--pin-shadow-opacity: .35;--pin-drop-animation-duration-ms: .25s}@keyframes drop-pin{0%{transform:translateY(-200%)}to{transform:translateY(0)}}@keyframes pin-shadow{0%{transform:scale(var(--pin-shadow-hover-scale))}to{transform:scale(1)}}.mappedin-dropped-pin-wrapper{position:relative;width:fit-content;height:fit-content;width:36px;height:42px}.mappedin-dropped-pin-wrapper svg{position:absolute;left:calc(50% - var(--pin-shadow-width));animation:drop-pin var(--pin-drop-animation-duration-ms) ease-in}.mappedin-dropped-pin-wrapper>.pin-shadow{position:absolute;left:calc(50% - (var(--pin-shadow-width) / 2));bottom:0;height:var(--pin-shadow-height);width:var(--pin-shadow-width);border-radius:100%;opacity:var(--pin-shadow-opacity);animation:pin-shadow .25s ease-in}@keyframes bounce{0%{transform:translateY(-10px);opacity:0}12.5%{transform:translateY(0);opacity:1}25%{transform:translateY(0)}37.5%{transform:translateY(-10px)}50%{transform:translateY(0)}62.5%{transform:translateY(-10px)}75%{transform:translateY(0)}87.5%{transform:translateY(-10px)}to{transform:translateY(0)}}.mappedin-connection-marker .bouncey{animation:bounce 2.5s linear}.mappedin-connection-marker .arrow--down{transform:rotate(180deg)}.mappedin-connection-marker .connection-circle{display:flex;justify-content:center;align-items:center;border-radius:50%;border:2px solid white;box-shadow:0 2px 8px #00000026}.mappedin__smart-collision-engine__container{position:absolute;left:0;top:0;bottom:0;right:0;pointer-events:none;transform-style:preserve-3d;z-index:1;font-family:InterUI-Regular,Helvetica,Arial,sans-serif}.mappedin__smart-collision-engine-debug__container{position:absolute;left:0;top:0;bottom:0;right:0;transition:opacity .3s ease-in-out;pointer-events:none;will-change:opacity}.mappedin__smart-collision-engine-debug__container.interacting{opacity:.2}.mappedin-marker{font-family:InterUI-Regular,Helvetica,Arial,sans-serif;font-weight:400;pointer-events:none;top:0;transition:transform .3s linear;position:absolute;font-weight:700;color:#000;z-index:1;transition:opacity .3s;display:flex;flex-direction:row;will-change:opacity;justify-content:center}p{color:red}.list-items{max-height:600px;overflow-y:scroll;scroll-behavior:smooth}.children:focus{border:1px solid blue}#interactionPanel{position:absolute;right:0}#mainPanel{position:absolute;left:0}.title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/mappedin-js",
3
- "version": "6.0.1-alpha.2",
3
+ "version": "6.0.1-alpha.21",
4
4
  "private": false,
5
5
  "main": "lib/esm/index.js",
6
6
  "module": "lib/esm/index.js",
@@ -18,20 +18,27 @@
18
18
  "scripts": {
19
19
  "rel:patch": "node scripts/release.mjs patch",
20
20
  "start": "yarn build && concurrently \"node scripts/build.mjs --watchChanges\" \"node scripts/start.mjs\"",
21
- "build": "yarn clean && tsc -b && node scripts/build.mjs && yarn copy-styles",
21
+ "start:geojson": "SDK_EXAMPLE_BUILD=true SDK_CORE=geojson NODE_ENV=dev yarn start",
22
+ "start:ngaf": "yarn clean && node scripts/build.mjs && yarn copy-styles && concurrently \"node scripts/build.mjs --watchChanges\" \"node scripts/start.mjs\"",
23
+ "build:geojson": "SDK_CORE=geojson SDK_EXAMPLE_BUILD=true yarn build && yalc push",
24
+ "build": "yarn clean && yarn types && node scripts/build.mjs && yarn copy-styles",
22
25
  "build:prod": "cross-env NODE_ENV=production yarn build",
23
- "build:examples": "cross-env NODE_ENV=production yarn build && node scripts/build-examples.mjs",
24
- "types": "tsc -b src",
26
+ "build:examples": "cross-env SDK_CORE=geojson NODE_ENV=production yarn build && NODE_ENV=production SDK_CORE=geojson SDK_EXAMPLE_BUILD=true node scripts/build-examples.mjs",
27
+ "types": "tsc -b ./tsconfig.build.json",
28
+ "test": "NODE_ENV=test jest",
29
+ "test:cov": "NODE_ENV=test jest --coverage",
25
30
  "typecheck": "tsc --noEmit",
26
31
  "copy-styles": "cp lib/esm/index.css lib/index.css",
27
32
  "clean": "rm -rf lib/** && rm -rf examples/dist/**",
28
33
  "docs": "yarn build && typedoc"
29
34
  },
35
+ "dependencies": {},
30
36
  "devDependencies": {
37
+ "@swc/jest": "^0.2.36",
31
38
  "@types/offscreencanvas": "^2019.6.3",
32
39
  "archiver": "^5.3.1",
33
- "jest-fetch-mock": "^3.0.3",
34
- "jest-three": "^1.3.1"
40
+ "jest": "29.7.0",
41
+ "jest-environment-jsdom": "29.7.0"
35
42
  },
36
43
  "volta": {
37
44
  "extends": "../../package.json"
package/CHANGELOG.md DELETED
@@ -1,54 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [6.0.1-alpha.2](https://github.com/MappedIn/mappedin-core-sdk/compare/@mappedin/maker-sdk@6.0.1-alpha.1...@mappedin/maker-sdk@6.0.1-alpha.2) (2024-02-27)
7
-
8
- **Note:** Version bump only for package @mappedin/maker-sdk
9
-
10
- ## [6.0.1-alpha.1](https://github.com/MappedIn/mappedin-core-sdk/compare/@mappedin/maker-sdk@6.0.1-alpha.0...@mappedin/maker-sdk@6.0.1-alpha.1) (2024-02-26)
11
-
12
- **Note:** Version bump only for package @mappedin/maker-sdk
13
-
14
- # [6.1.0](https://github.com/MappedIn/mappedin-core-sdk/compare/@mappedin/maker-sdk@6.1.0-alpha.0...@mappedin/maker-sdk@6.1.0) (2024-02-21)
15
-
16
- **Note:** Version bump only for package @mappedin/maker-sdk
17
-
18
- # 6.1.0-alpha.0 (2024-02-21)
19
-
20
- ### Bug Fixes
21
-
22
- - **MKR-755:** prevent creating canvas right away ([43842f0](https://github.com/MappedIn/mappedin-core-sdk/commit/43842f00b16cb16b0245909a8d2a1dab202e803c))
23
- - **MKR-755:** remove console log and fix map object center ([5f36ab4](https://github.com/MappedIn/mappedin-core-sdk/commit/5f36ab454915a4f88a84921458d574003afde806))
24
- - **MKR-755:** update focus on targets to include door ([f82f57d](https://github.com/MappedIn/mappedin-core-sdk/commit/f82f57dff421fe58f73dcb9a20375ecbfe9f4e49))
25
- - **SDKS-1397:** current floor getter ([0bd0ac2](https://github.com/MappedIn/mappedin-core-sdk/commit/0bd0ac24e112f3e64c30b46535a54122f9f43787))
26
- - **SDKS-1406:** fix the direction instruction distance ([146f2da](https://github.com/MappedIn/mappedin-core-sdk/commit/146f2da2d8a763e5f3689b924401c64f9628a7a9))
27
- - **SDKS-1420:** export CameraTransform ([868a56a](https://github.com/MappedIn/mappedin-core-sdk/commit/868a56a740aaf3df0875d7e58ceef660313e1447))
28
- - **SDKS-1423:** v6 navigation animateDrawing ([8c7848e](https://github.com/MappedIn/mappedin-core-sdk/commit/8c7848ea97b1a886d5730b53aeafcfbe1ab59da0))
29
- - **SDKS-1450:** fix camera.set drift issue ([036d25f](https://github.com/MappedIn/mappedin-core-sdk/commit/036d25fc171ba7b7e5a51a3b28c04151d258a4e9))
30
- - **SDKS-1499:** make TShow3DMapOptions.ambientOcclusion optional ([0b26885](https://github.com/MappedIn/mappedin-core-sdk/commit/0b268854dfe48799fcdc1a709057feacb344db38))
31
-
32
- ### Features
33
-
34
- - **MKR-755:** editor beta integration changes ([f188a47](https://github.com/MappedIn/mappedin-core-sdk/commit/f188a47196704e7ed362c58d6286df76c68bc50a))
35
- - **SDKS-1351:** add SDK version to DOM element ([005b462](https://github.com/MappedIn/mappedin-core-sdk/commit/005b46231a6da9a962d2a0f53a17c33880e471e0))
36
- - **SDKS-1397:** add set level to maker sdk ([59d2e44](https://github.com/MappedIn/mappedin-core-sdk/commit/59d2e4427cd09d5cac2b8d910bb51a890dd32407))
37
- - **SDKS-1414:** enable path smoothing for directions ([342ecf9](https://github.com/MappedIn/mappedin-core-sdk/commit/342ecf9ce3d61b99c5f9ba2432a71cc2904af828))
38
- - **SDKS-1417:** expose Label's text, long, and lat properties ([e2150da](https://github.com/MappedIn/mappedin-core-sdk/commit/e2150daceba1389066f6519b7ef7e2794ac6c6d8))
39
-
40
- ## 6.0.3-alpha.2 (2024-02-13)
41
-
42
- **Note:** Version bump only for package @mappedin/maker-sdk
43
-
44
- ## 6.0.3-alpha.1 (2024-02-13)
45
-
46
- **Note:** Version bump only for package @mappedin/maker-sdk
47
-
48
- ## [6.0.2-alpha.2](https://github.com/MappedIn/mappedin-core-sdk/compare/@mappedin/maker-sdk@6.0.2-alpha.1...@mappedin/maker-sdk@6.0.2-alpha.2) (2024-02-09)
49
-
50
- **Note:** Version bump only for package @mappedin/maker-sdk
51
-
52
- ## [6.0.2-alpha.1](https://github.com/MappedIn/mappedin-core-sdk/compare/@mappedin/maker-sdk@6.0.2-alpha.0...@mappedin/maker-sdk@6.0.2-alpha.1) (2024-02-09)
53
-
54
- **Note:** Version bump only for package @mappedin/maker-sdk
@@ -1 +0,0 @@
1
- import{A as Re,B as Ne,C as be,D as Se,N as z,P as _e,Qa as v,V as k,Y as Ue,aa as Le,ca as O,e as de,j as ge,k as xe,l as me,m as Te,n as ye,o as we,p as Me,q as Ie,r as Ae,ra as F,x as Ee}from"./chunk-SVP2SCIT.js";import{a as pe}from"./chunk-VSBVGSLC.js";import{a as T}from"./chunk-J5IUISYU.js";pe();var Ce={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]},ee=class ee{constructor(){this.pluginCallbacks=[],this.register(function(e){return new Y(e)}),this.register(function(e){return new j(e)}),this.register(function(e){return new W(e)}),this.register(function(e){return new X(e)}),this.register(function(e){return new J(e)}),this.register(function(e){return new Z(e)}),this.register(function(e){return new K(e)}),this.register(function(e){return new q(e)}),this.register(function(e){return new Q(e)}),this.register(function(e){return new $(e)})}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,s,n,t){let r=new G,i=[];for(let o=0,a=this.pluginCallbacks.length;o<a;o++)i.push(this.pluginCallbacks[o](r));r.setPlugins(i),r.write(e,s,t).catch(n)}parseAsync(e,s){let n=this;return new Promise(function(t,r){n.parse(e,t,r,s)})}};T(ee,"GLTFExporter");var P=ee,g={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,REPEAT:10497},H="KHR_mesh_quantization",N={};N[Te]=g.NEAREST;N[ye]=g.NEAREST_MIPMAP_NEAREST;N[we]=g.NEAREST_MIPMAP_LINEAR;N[Me]=g.LINEAR;N[Ie]=g.LINEAR_MIPMAP_NEAREST;N[Ae]=g.LINEAR_MIPMAP_LINEAR;N[xe]=g.CLAMP_TO_EDGE;N[ge]=g.REPEAT;N[me]=g.MIRRORED_REPEAT;var Oe={scale:"scale",position:"translation",quaternion:"rotation",morphTargetInfluences:"weights"},Fe=new Le,ve=12,He=1179937895,Ve=2,De=8,Ge=1313821514,Ye=5130562;function D(c,e){return c.length===e.length&&c.every(function(s,n){return s===e[n]})}T(D,"equalArray");function je(c){return new TextEncoder().encode(c).buffer}T(je,"stringToArrayBuffer");function Ke(c){return D(c.elements,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}T(Ke,"isIdentityMatrix");function qe(c,e,s){let n={min:new Array(c.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(c.itemSize).fill(Number.NEGATIVE_INFINITY)};for(let t=e;t<e+s;t++)for(let r=0;r<c.itemSize;r++){let i;c.itemSize>4?i=c.array[t*c.itemSize+r]:(r===0?i=c.getX(t):r===1?i=c.getY(t):r===2?i=c.getZ(t):r===3&&(i=c.getW(t)),c.normalized===!0&&(i=z.normalize(i,c.array))),n.min[r]=Math.min(n.min[r],i),n.max[r]=Math.max(n.max[r],i)}return n}T(qe,"getMinMax");function Be(c){return Math.ceil(c/4)*4}T(Be,"getPaddedBufferSize");function V(c,e=0){let s=Be(c.byteLength);if(s!==c.byteLength){let n=new Uint8Array(s);if(n.set(new Uint8Array(c)),e!==0)for(let t=c.byteLength;t<s;t++)n[t]=e;return n.buffer}return c}T(V,"getPaddedArrayBuffer");function ze(){return typeof document>"u"&&typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}T(ze,"getCanvas");function Pe(c,e){if(c.toBlob!==void 0)return new Promise(n=>c.toBlob(n,e));let s;return e==="image/jpeg"?s=.92:e==="image/webp"&&(s=.8),c.convertToBlob({type:e,quality:s})}T(Pe,"getToBlobPromise");var se=class se{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,s,n={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},n),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);let t=this,r=t.buffers,i=t.json;n=t.options;let o=t.extensionsUsed,a=t.extensionsRequired,u=new Blob(r,{type:"application/octet-stream"}),d=Object.keys(o),l=Object.keys(a);if(d.length>0&&(i.extensionsUsed=d),l.length>0&&(i.extensionsRequired=l),i.buffers&&i.buffers.length>0&&(i.buffers[0].byteLength=u.size),n.binary===!0){let m=new FileReader;m.readAsArrayBuffer(u),m.onloadend=function(){let f=V(m.result),p=new DataView(new ArrayBuffer(De));p.setUint32(0,f.byteLength,!0),p.setUint32(4,Ye,!0);let h=V(je(JSON.stringify(i)),32),w=new DataView(new ArrayBuffer(De));w.setUint32(0,h.byteLength,!0),w.setUint32(4,Ge,!0);let y=new ArrayBuffer(ve),S=new DataView(y);S.setUint32(0,He,!0),S.setUint32(4,Ve,!0);let x=ve+w.byteLength+h.byteLength+p.byteLength+f.byteLength;S.setUint32(8,x,!0);let M=new Blob([y,w,h,p,f],{type:"application/octet-stream"}),I=new FileReader;I.readAsArrayBuffer(M),I.onloadend=function(){s(I.result)}}}else if(i.buffers&&i.buffers.length>0){let m=new FileReader;m.readAsDataURL(u),m.onloadend=function(){let f=m.result;i.buffers[0].uri=f,s(i)}}else s(i)}serializeUserData(e,s){if(Object.keys(e.userData).length===0)return;let n=this.options,t=this.extensionsUsed;try{let r=JSON.parse(JSON.stringify(e.userData));if(n.includeCustomExtensions&&r.gltfExtensions){s.extensions===void 0&&(s.extensions={});for(let i in r.gltfExtensions)s.extensions[i]=r.gltfExtensions[i],t[i]=!0;delete r.gltfExtensions}Object.keys(r).length>0&&(s.extras=r)}catch(r){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+r.message)}}getUID(e,s=!1){if(this.uids.has(e)===!1){let t=new Map;t.set(!0,this.uid++),t.set(!1,this.uid++),this.uids.set(e,t)}return this.uids.get(e).get(s)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;let n=new k;for(let t=0,r=e.count;t<r;t++)if(Math.abs(n.fromBufferAttribute(e,t).length()-1)>5e-4)return!1;return!0}createNormalizedNormalAttribute(e){let s=this.cache;if(s.attributesNormalized.has(e))return s.attributesNormalized.get(e);let n=e.clone(),t=new k;for(let r=0,i=n.count;r<i;r++)t.fromBufferAttribute(n,r),t.x===0&&t.y===0&&t.z===0?t.setX(1):t.normalize(),n.setXYZ(r,t.x,t.y,t.z);return s.attributesNormalized.set(e,n),n}applyTextureTransform(e,s){let n=!1,t={};(s.offset.x!==0||s.offset.y!==0)&&(t.offset=s.offset.toArray(),n=!0),s.rotation!==0&&(t.rotation=s.rotation,n=!0),(s.repeat.x!==1||s.repeat.y!==1)&&(t.scale=s.repeat.toArray(),n=!0),n&&(e.extensions=e.extensions||{},e.extensions.KHR_texture_transform=t,this.extensionsUsed.KHR_texture_transform=!0)}buildMetalRoughTexture(e,s){if(e===s)return e;function n(f){return f.encoding===Se?T(function(h){return h<.04045?h*.0773993808:Math.pow(h*.9478672986+.0521327014,2.4)},"SRGBToLinear"):T(function(h){return h},"LinearToLinear")}T(n,"getEncodingConversion"),console.warn("THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures.");let t=e?e.image:null,r=s?s.image:null,i=Math.max(t?t.width:0,r?r.width:0),o=Math.max(t?t.height:0,r?r.height:0),a=ze();a.width=i,a.height=o;let u=a.getContext("2d");u.fillStyle="#00ffff",u.fillRect(0,0,i,o);let d=u.getImageData(0,0,i,o);if(t){u.drawImage(t,0,0,i,o);let f=n(e),p=u.getImageData(0,0,i,o).data;for(let h=2;h<p.length;h+=4)d.data[h]=f(p[h]/256)*256}if(r){u.drawImage(r,0,0,i,o);let f=n(s),p=u.getImageData(0,0,i,o).data;for(let h=1;h<p.length;h+=4)d.data[h]=f(p[h]/256)*256}u.putImageData(d,0,0);let m=(e||s).clone();return m.source=new _e(a),m.encoding=be,m}processBuffer(e){let s=this.json,n=this.buffers;return s.buffers||(s.buffers=[{byteLength:0}]),n.push(e),0}processBufferView(e,s,n,t,r){let i=this.json;i.bufferViews||(i.bufferViews=[]);let o;switch(s){case g.BYTE:case g.UNSIGNED_BYTE:o=1;break;case g.SHORT:case g.UNSIGNED_SHORT:o=2;break;default:o=4}let a=Be(t*e.itemSize*o),u=new DataView(new ArrayBuffer(a)),d=0;for(let f=n;f<n+t;f++)for(let p=0;p<e.itemSize;p++){let h;e.itemSize>4?h=e.array[f*e.itemSize+p]:(p===0?h=e.getX(f):p===1?h=e.getY(f):p===2?h=e.getZ(f):p===3&&(h=e.getW(f)),e.normalized===!0&&(h=z.normalize(h,e.array))),s===g.FLOAT?u.setFloat32(d,h,!0):s===g.INT?u.setInt32(d,h,!0):s===g.UNSIGNED_INT?u.setUint32(d,h,!0):s===g.SHORT?u.setInt16(d,h,!0):s===g.UNSIGNED_SHORT?u.setUint16(d,h,!0):s===g.BYTE?u.setInt8(d,h):s===g.UNSIGNED_BYTE&&u.setUint8(d,h),d+=o}let l={buffer:this.processBuffer(u.buffer),byteOffset:this.byteOffset,byteLength:a};return r!==void 0&&(l.target=r),r===g.ARRAY_BUFFER&&(l.byteStride=e.itemSize*o),this.byteOffset+=a,i.bufferViews.push(l),{id:i.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){let s=this,n=s.json;return n.bufferViews||(n.bufferViews=[]),new Promise(function(t){let r=new FileReader;r.readAsArrayBuffer(e),r.onloadend=function(){let i=V(r.result),o={buffer:s.processBuffer(i),byteOffset:s.byteOffset,byteLength:i.byteLength};s.byteOffset+=i.byteLength,t(n.bufferViews.push(o)-1)}})}processAccessor(e,s,n,t){let r=this.json,i={1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"},o;if(e.array.constructor===Float32Array)o=g.FLOAT;else if(e.array.constructor===Int32Array)o=g.INT;else if(e.array.constructor===Uint32Array)o=g.UNSIGNED_INT;else if(e.array.constructor===Int16Array)o=g.SHORT;else if(e.array.constructor===Uint16Array)o=g.UNSIGNED_SHORT;else if(e.array.constructor===Int8Array)o=g.BYTE;else if(e.array.constructor===Uint8Array)o=g.UNSIGNED_BYTE;else throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type.");if(n===void 0&&(n=0),t===void 0&&(t=e.count),t===0)return null;let a=qe(e,n,t),u;s!==void 0&&(u=e===s.index?g.ELEMENT_ARRAY_BUFFER:g.ARRAY_BUFFER);let d=this.processBufferView(e,o,n,t,u),l={bufferView:d.id,byteOffset:d.byteOffset,componentType:o,count:t,max:a.max,min:a.min,type:i[e.itemSize]};return e.normalized===!0&&(l.normalized=!0),r.accessors||(r.accessors=[]),r.accessors.push(l)-1}processImage(e,s,n,t="image/png"){if(e!==null){let r=this,i=r.cache,o=r.json,a=r.options,u=r.pending;i.images.has(e)||i.images.set(e,{});let d=i.images.get(e),l=t+":flipY/"+n.toString();if(d[l]!==void 0)return d[l];o.images||(o.images=[]);let m={mimeType:t},f=ze();f.width=Math.min(e.width,a.maxTextureSize),f.height=Math.min(e.height,a.maxTextureSize);let p=f.getContext("2d");if(n===!0&&(p.translate(0,f.height),p.scale(1,-1)),e.data!==void 0){s!==Ee&&console.error("GLTFExporter: Only RGBAFormat is supported."),(e.width>a.maxTextureSize||e.height>a.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);let w=new Uint8ClampedArray(e.height*e.width*4);for(let y=0;y<w.length;y+=4)w[y+0]=e.data[y+0],w[y+1]=e.data[y+1],w[y+2]=e.data[y+2],w[y+3]=e.data[y+3];p.putImageData(new ImageData(w,e.width,e.height),0,0)}else p.drawImage(e,0,0,f.width,f.height);a.binary===!0?u.push(Pe(f,t).then(w=>r.processBufferViewImage(w)).then(w=>{m.bufferView=w})):f.toDataURL!==void 0?m.uri=f.toDataURL(t):u.push(Pe(f,t).then(w=>new FileReader().readAsDataURL(w)).then(w=>{m.uri=w}));let h=o.images.push(m)-1;return d[l]=h,h}else throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){let s=this.json;s.samplers||(s.samplers=[]);let n={magFilter:N[e.magFilter],minFilter:N[e.minFilter],wrapS:N[e.wrapS],wrapT:N[e.wrapT]};return s.samplers.push(n)-1}processTexture(e){let s=this.cache,n=this.json;if(s.textures.has(e))return s.textures.get(e);n.textures||(n.textures=[]);let t=e.userData.mimeType;t==="image/webp"&&(t="image/png");let r={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,t)};e.name&&(r.name=e.name),this._invokeAll(function(o){o.writeTexture&&o.writeTexture(e,r)});let i=n.textures.push(r)-1;return s.textures.set(e,i),i}processMaterial(e){let s=this.cache,n=this.json;if(s.materials.has(e))return s.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;n.materials||(n.materials=[]);let t={pbrMetallicRoughness:{}};e.isMeshStandardMaterial!==!0&&e.isMeshBasicMaterial!==!0&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");let r=e.color.toArray().concat([e.opacity]);if(D(r,[1,1,1,1])||(t.pbrMetallicRoughness.baseColorFactor=r),e.isMeshStandardMaterial?(t.pbrMetallicRoughness.metallicFactor=e.metalness,t.pbrMetallicRoughness.roughnessFactor=e.roughness):(t.pbrMetallicRoughness.metallicFactor=.5,t.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){let o=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),a={index:this.processTexture(o)};this.applyTextureTransform(a,o),t.pbrMetallicRoughness.metallicRoughnessTexture=a}if(e.map){let o={index:this.processTexture(e.map)};this.applyTextureTransform(o,e.map),t.pbrMetallicRoughness.baseColorTexture=o}if(e.emissive){let o=e.emissive;if(Math.max(o.r,o.g,o.b)>0&&(t.emissiveFactor=e.emissive.toArray()),e.emissiveMap){let u={index:this.processTexture(e.emissiveMap)};this.applyTextureTransform(u,e.emissiveMap),t.emissiveTexture=u}}if(e.normalMap){let o={index:this.processTexture(e.normalMap)};e.normalScale&&e.normalScale.x!==1&&(o.scale=e.normalScale.x),this.applyTextureTransform(o,e.normalMap),t.normalTexture=o}if(e.aoMap){let o={index:this.processTexture(e.aoMap),texCoord:1};e.aoMapIntensity!==1&&(o.strength=e.aoMapIntensity),this.applyTextureTransform(o,e.aoMap),t.occlusionTexture=o}e.transparent?t.alphaMode="BLEND":e.alphaTest>0&&(t.alphaMode="MASK",t.alphaCutoff=e.alphaTest),e.side===de&&(t.doubleSided=!0),e.name!==""&&(t.name=e.name),this.serializeUserData(e,t),this._invokeAll(function(o){o.writeMaterial&&o.writeMaterial(e,t)});let i=n.materials.push(t)-1;return s.materials.set(e,i),i}processMesh(e){let s=this.cache,n=this.json,t=[e.geometry.uuid];if(Array.isArray(e.material))for(let x=0,M=e.material.length;x<M;x++)t.push(e.material[x].uuid);else t.push(e.material.uuid);let r=t.join(":");if(s.meshes.has(r))return s.meshes.get(r);let i=e.geometry,o;e.isLineSegments?o=g.LINES:e.isLineLoop?o=g.LINE_LOOP:e.isLine?o=g.LINE_STRIP:e.isPoints?o=g.POINTS:o=e.material.wireframe?g.LINES:g.TRIANGLES;let a={},u={},d=[],l=[],m={uv:"TEXCOORD_0",uv2:"TEXCOORD_1",color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},f=i.getAttribute("normal");f!==void 0&&!this.isNormalizedNormalAttribute(f)&&(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),i.setAttribute("normal",this.createNormalizedNormalAttribute(f)));let p=null;for(let x in i.attributes){if(x.slice(0,5)==="morph")continue;let M=i.attributes[x];if(x=m[x]||x.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(x)||(x="_"+x),s.attributes.has(this.getUID(M))){u[x]=s.attributes.get(this.getUID(M));continue}p=null;let A=M.array;x==="JOINTS_0"&&!(A instanceof Uint16Array)&&!(A instanceof Uint8Array)&&(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),p=new O(new Uint16Array(A),M.itemSize,M.normalized));let R=this.processAccessor(p||M,i);R!==null&&(x.startsWith("_")||this.detectMeshQuantization(x,M),u[x]=R,s.attributes.set(this.getUID(M),R))}if(f!==void 0&&i.setAttribute("normal",f),Object.keys(u).length===0)return null;if(e.morphTargetInfluences!==void 0&&e.morphTargetInfluences.length>0){let x=[],M=[],I={};if(e.morphTargetDictionary!==void 0)for(let A in e.morphTargetDictionary)I[e.morphTargetDictionary[A]]=A;for(let A=0;A<e.morphTargetInfluences.length;++A){let R={},he=!1;for(let U in i.morphAttributes){if(U!=="position"&&U!=="normal"){he||(console.warn("GLTFExporter: Only POSITION and NORMAL morph are supported."),he=!0);continue}let b=i.morphAttributes[U][A],B=U.toUpperCase(),L=i.attributes[U];if(s.attributes.has(this.getUID(b,!0))){R[B]=s.attributes.get(this.getUID(b,!0));continue}let C=b.clone();if(!i.morphTargetsRelative)for(let E=0,ke=b.count;E<ke;E++)for(let _=0;_<b.itemSize;_++)_===0&&C.setX(E,b.getX(E)-L.getX(E)),_===1&&C.setY(E,b.getY(E)-L.getY(E)),_===2&&C.setZ(E,b.getZ(E)-L.getZ(E)),_===3&&C.setW(E,b.getW(E)-L.getW(E));R[B]=this.processAccessor(C,i),s.attributes.set(this.getUID(L,!0),R[B])}l.push(R),x.push(e.morphTargetInfluences[A]),e.morphTargetDictionary!==void 0&&M.push(I[A])}a.weights=x,M.length>0&&(a.extras={},a.extras.targetNames=M)}let h=Array.isArray(e.material);if(h&&i.groups.length===0)return null;let w=h?e.material:[e.material],y=h?i.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let x=0,M=y.length;x<M;x++){let I={mode:o,attributes:u};if(this.serializeUserData(i,I),l.length>0&&(I.targets=l),i.index!==null){let R=this.getUID(i.index);(y[x].start!==void 0||y[x].count!==void 0)&&(R+=":"+y[x].start+":"+y[x].count),s.attributes.has(R)?I.indices=s.attributes.get(R):(I.indices=this.processAccessor(i.index,i,y[x].start,y[x].count),s.attributes.set(R,I.indices)),I.indices===null&&delete I.indices}let A=this.processMaterial(w[y[x].materialIndex]);A!==null&&(I.material=A),d.push(I)}a.primitives=d,n.meshes||(n.meshes=[]),this._invokeAll(function(x){x.writeMesh&&x.writeMesh(e,a)});let S=n.meshes.push(a)-1;return s.meshes.set(r,S),S}detectMeshQuantization(e,s){if(this.extensionsUsed[H])return;let n;switch(s.array.constructor){case Int8Array:n="byte";break;case Uint8Array:n="unsigned byte";break;case Int16Array:n="short";break;case Uint16Array:n="unsigned short";break;default:return}s.normalized&&(n+=" normalized");let t=e.split("_",1)[0];Ce[t]&&Ce[t].includes(n)&&(this.extensionsUsed[H]=!0,this.extensionsRequired[H]=!0)}processCamera(e){let s=this.json;s.cameras||(s.cameras=[]);let n=e.isOrthographicCamera,t={type:n?"orthographic":"perspective"};return n?t.orthographic={xmag:e.right*2,ymag:e.top*2,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:t.perspective={aspectRatio:e.aspect,yfov:z.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},e.name!==""&&(t.name=e.type),s.cameras.push(t)-1}processAnimation(e,s){let n=this.json,t=this.nodeMap;n.animations||(n.animations=[]),e=P.Utils.mergeMorphTargetTracks(e.clone(),s);let r=e.tracks,i=[],o=[];for(let a=0;a<r.length;++a){let u=r[a],d=v.parseTrackName(u.name),l=v.findNode(s,d.nodeName),m=Oe[d.propertyName];if(d.objectName==="bones"&&(l.isSkinnedMesh===!0?l=l.skeleton.getBoneByName(d.objectIndex):l=void 0),!l||!m)return console.warn('THREE.GLTFExporter: Could not export animation track "%s".',u.name),null;let f=1,p=u.values.length/u.times.length;m===Oe.morphTargetInfluences&&(p/=l.morphTargetInfluences.length);let h;u.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline===!0?(h="CUBICSPLINE",p/=3):u.getInterpolation()===Re?h="STEP":h="LINEAR",o.push({input:this.processAccessor(new O(u.times,f)),output:this.processAccessor(new O(u.values,p)),interpolation:h}),i.push({sampler:o.length-1,target:{node:t.get(l),path:m}})}return n.animations.push({name:e.name||"clip_"+n.animations.length,samplers:o,channels:i}),n.animations.length-1}processSkin(e){let s=this.json,n=this.nodeMap,t=s.nodes[n.get(e)],r=e.skeleton;if(r===void 0)return null;let i=e.skeleton.bones[0];if(i===void 0)return null;let o=[],a=new Float32Array(r.bones.length*16),u=new Ue;for(let l=0;l<r.bones.length;++l)o.push(n.get(r.bones[l])),u.copy(r.boneInverses[l]),u.multiply(e.bindMatrix).toArray(a,l*16);return s.skins===void 0&&(s.skins=[]),s.skins.push({inverseBindMatrices:this.processAccessor(new O(a,16)),joints:o,skeleton:n.get(i)}),t.skin=s.skins.length-1}processNode(e){let s=this.json,n=this.options,t=this.nodeMap;s.nodes||(s.nodes=[]);let r={};if(n.trs){let o=e.quaternion.toArray(),a=e.position.toArray(),u=e.scale.toArray();D(o,[0,0,0,1])||(r.rotation=o),D(a,[0,0,0])||(r.translation=a),D(u,[1,1,1])||(r.scale=u)}else e.matrixAutoUpdate&&e.updateMatrix(),Ke(e.matrix)===!1&&(r.matrix=e.matrix.elements);if(e.name!==""&&(r.name=String(e.name)),this.serializeUserData(e,r),e.isMesh||e.isLine||e.isPoints){let o=this.processMesh(e);o!==null&&(r.mesh=o)}else e.isCamera&&(r.camera=this.processCamera(e));if(e.isSkinnedMesh&&this.skins.push(e),e.children.length>0){let o=[];for(let a=0,u=e.children.length;a<u;a++){let d=e.children[a];if(d.visible||n.onlyVisible===!1){let l=this.processNode(d);l!==null&&o.push(l)}}o.length>0&&(r.children=o)}this._invokeAll(function(o){o.writeNode&&o.writeNode(e,r)});let i=s.nodes.push(r)-1;return t.set(e,i),i}processScene(e){let s=this.json,n=this.options;s.scenes||(s.scenes=[],s.scene=0);let t={};e.name!==""&&(t.name=e.name),s.scenes.push(t);let r=[];for(let i=0,o=e.children.length;i<o;i++){let a=e.children[i];if(a.visible||n.onlyVisible===!1){let u=this.processNode(a);u!==null&&r.push(u)}}r.length>0&&(t.nodes=r),this.serializeUserData(e,t)}processObjects(e){let s=new F;s.name="AuxScene";for(let n=0;n<e.length;n++)s.children.push(e[n]);this.processScene(s)}processInput(e){let s=this.options;e=e instanceof Array?e:[e],this._invokeAll(function(t){t.beforeParse&&t.beforeParse(e)});let n=[];for(let t=0;t<e.length;t++)e[t]instanceof F?this.processScene(e[t]):n.push(e[t]);n.length>0&&this.processObjects(n);for(let t=0;t<this.skins.length;++t)this.processSkin(this.skins[t]);for(let t=0;t<s.animations.length;++t)this.processAnimation(s.animations[t],e[0]);this._invokeAll(function(t){t.afterParse&&t.afterParse(e)})}_invokeAll(e){for(let s=0,n=this.plugins.length;s<n;s++)e(this.plugins[s])}};T(se,"GLTFWriter");var G=se,te=class te{constructor(e){this.writer=e,this.name="KHR_lights_punctual"}writeNode(e,s){if(!e.isLight)return;if(!e.isDirectionalLight&&!e.isPointLight&&!e.isSpotLight){console.warn("THREE.GLTFExporter: Only directional, point, and spot lights are supported.",e);return}let n=this.writer,t=n.json,r=n.extensionsUsed,i={};e.name&&(i.name=e.name),i.color=e.color.toArray(),i.intensity=e.intensity,e.isDirectionalLight?i.type="directional":e.isPointLight?(i.type="point",e.distance>0&&(i.range=e.distance)):e.isSpotLight&&(i.type="spot",e.distance>0&&(i.range=e.distance),i.spot={},i.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,i.spot.outerConeAngle=e.angle),e.decay!==void 0&&e.decay!==2&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),e.target&&(e.target.parent!==e||e.target.position.x!==0||e.target.position.y!==0||e.target.position.z!==-1)&&console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),r[this.name]||(t.extensions=t.extensions||{},t.extensions[this.name]={lights:[]},r[this.name]=!0);let o=t.extensions[this.name].lights;o.push(i),s.extensions=s.extensions||{},s.extensions[this.name]={light:o.length-1}}};T(te,"GLTFLightExtension");var Y=te,ne=class ne{constructor(e){this.writer=e,this.name="KHR_materials_unlit"}writeMaterial(e,s){if(!e.isMeshBasicMaterial)return;let t=this.writer.extensionsUsed;s.extensions=s.extensions||{},s.extensions[this.name]={},t[this.name]=!0,s.pbrMetallicRoughness.metallicFactor=0,s.pbrMetallicRoughness.roughnessFactor=.9}};T(ne,"GLTFMaterialsUnlitExtension");var j=ne,ie=class ie{constructor(e){this.writer=e,this.name="KHR_materials_clearcoat"}writeMaterial(e,s){if(!e.isMeshPhysicalMaterial||e.clearcoat===0)return;let n=this.writer,t=n.extensionsUsed,r={};if(r.clearcoatFactor=e.clearcoat,e.clearcoatMap){let i={index:n.processTexture(e.clearcoatMap)};n.applyTextureTransform(i,e.clearcoatMap),r.clearcoatTexture=i}if(r.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){let i={index:n.processTexture(e.clearcoatRoughnessMap)};n.applyTextureTransform(i,e.clearcoatRoughnessMap),r.clearcoatRoughnessTexture=i}if(e.clearcoatNormalMap){let i={index:n.processTexture(e.clearcoatNormalMap)};n.applyTextureTransform(i,e.clearcoatNormalMap),r.clearcoatNormalTexture=i}s.extensions=s.extensions||{},s.extensions[this.name]=r,t[this.name]=!0}};T(ie,"GLTFMaterialsClearcoatExtension");var K=ie,re=class re{constructor(e){this.writer=e,this.name="KHR_materials_iridescence"}writeMaterial(e,s){if(!e.isMeshPhysicalMaterial||e.iridescence===0)return;let n=this.writer,t=n.extensionsUsed,r={};if(r.iridescenceFactor=e.iridescence,e.iridescenceMap){let i={index:n.processTexture(e.iridescenceMap)};n.applyTextureTransform(i,e.iridescenceMap),r.iridescenceTexture=i}if(r.iridescenceIor=e.iridescenceIOR,r.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],r.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){let i={index:n.processTexture(e.iridescenceThicknessMap)};n.applyTextureTransform(i,e.iridescenceThicknessMap),r.iridescenceThicknessTexture=i}s.extensions=s.extensions||{},s.extensions[this.name]=r,t[this.name]=!0}};T(re,"GLTFMaterialsIridescenceExtension");var q=re,oe=class oe{constructor(e){this.writer=e,this.name="KHR_materials_transmission"}writeMaterial(e,s){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;let n=this.writer,t=n.extensionsUsed,r={};if(r.transmissionFactor=e.transmission,e.transmissionMap){let i={index:n.processTexture(e.transmissionMap)};n.applyTextureTransform(i,e.transmissionMap),r.transmissionTexture=i}s.extensions=s.extensions||{},s.extensions[this.name]=r,t[this.name]=!0}};T(oe,"GLTFMaterialsTransmissionExtension");var W=oe,ae=class ae{constructor(e){this.writer=e,this.name="KHR_materials_volume"}writeMaterial(e,s){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;let n=this.writer,t=n.extensionsUsed,r={};if(r.thicknessFactor=e.thickness,e.thicknessMap){let i={index:n.processTexture(e.thicknessMap)};n.applyTextureTransform(i,e.thicknessMap),r.thicknessTexture=i}r.attenuationDistance=e.attenuationDistance,r.attenuationColor=e.attenuationColor.toArray(),s.extensions=s.extensions||{},s.extensions[this.name]=r,t[this.name]=!0}};T(ae,"GLTFMaterialsVolumeExtension");var X=ae,ce=class ce{constructor(e){this.writer=e,this.name="KHR_materials_ior"}writeMaterial(e,s){if(!e.isMeshPhysicalMaterial||e.ior===1.5)return;let t=this.writer.extensionsUsed,r={};r.ior=e.ior,s.extensions=s.extensions||{},s.extensions[this.name]=r,t[this.name]=!0}};T(ce,"GLTFMaterialsIorExtension");var J=ce,ue=class ue{constructor(e){this.writer=e,this.name="KHR_materials_specular"}writeMaterial(e,s){if(!e.isMeshPhysicalMaterial||e.specularIntensity===1&&e.specularColor.equals(Fe)&&!e.specularIntensityMap&&!e.specularColorTexture)return;let n=this.writer,t=n.extensionsUsed,r={};if(e.specularIntensityMap){let i={index:n.processTexture(e.specularIntensityMap)};n.applyTextureTransform(i,e.specularIntensityMap),r.specularTexture=i}if(e.specularColorMap){let i={index:n.processTexture(e.specularColorMap)};n.applyTextureTransform(i,e.specularColorMap),r.specularColorTexture=i}r.specularFactor=e.specularIntensity,r.specularColorFactor=e.specularColor.toArray(),s.extensions=s.extensions||{},s.extensions[this.name]=r,t[this.name]=!0}};T(ue,"GLTFMaterialsSpecularExtension");var Z=ue,le=class le{constructor(e){this.writer=e,this.name="KHR_materials_sheen"}writeMaterial(e,s){if(!e.isMeshPhysicalMaterial||e.sheen==0)return;let n=this.writer,t=n.extensionsUsed,r={};if(e.sheenRoughnessMap){let i={index:n.processTexture(e.sheenRoughnessMap)};n.applyTextureTransform(i,e.sheenRoughnessMap),r.sheenRoughnessTexture=i}if(e.sheenColorMap){let i={index:n.processTexture(e.sheenColorMap)};n.applyTextureTransform(i,e.sheenColorMap),r.sheenColorTexture=i}r.sheenRoughnessFactor=e.sheenRoughness,r.sheenColorFactor=e.sheenColor.toArray(),s.extensions=s.extensions||{},s.extensions[this.name]=r,t[this.name]=!0}};T(le,"GLTFMaterialsSheenExtension");var Q=le,fe=class fe{constructor(e){this.writer=e,this.name="KHR_materials_emissive_strength"}writeMaterial(e,s){if(!e.isMeshStandardMaterial||e.emissiveIntensity===1)return;let t=this.writer.extensionsUsed,r={};r.emissiveStrength=e.emissiveIntensity,s.extensions=s.extensions||{},s.extensions[this.name]=r,t[this.name]=!0}};T(fe,"GLTFMaterialsEmissiveStrengthExtension");var $=fe;P.Utils={insertKeyframe:function(c,e){let n=c.getValueSize(),t=new c.TimeBufferType(c.times.length+1),r=new c.ValueBufferType(c.values.length+n),i=c.createInterpolant(new c.ValueBufferType(n)),o;if(c.times.length===0){t[0]=e;for(let a=0;a<n;a++)r[a]=0;o=0}else if(e<c.times[0]){if(Math.abs(c.times[0]-e)<.001)return 0;t[0]=e,t.set(c.times,1),r.set(i.evaluate(e),0),r.set(c.values,n),o=0}else if(e>c.times[c.times.length-1]){if(Math.abs(c.times[c.times.length-1]-e)<.001)return c.times.length-1;t[t.length-1]=e,t.set(c.times,0),r.set(c.values,0),r.set(i.evaluate(e),c.values.length),o=t.length-1}else for(let a=0;a<c.times.length;a++){if(Math.abs(c.times[a]-e)<.001)return a;if(c.times[a]<e&&c.times[a+1]>e){t.set(c.times.slice(0,a+1),0),t[a+1]=e,t.set(c.times.slice(a+1),a+2),r.set(c.values.slice(0,(a+1)*n),0),r.set(i.evaluate(e),(a+1)*n),r.set(c.values.slice((a+1)*n),(a+2)*n),o=a+1;break}}return c.times=t,c.values=r,o},mergeMorphTargetTracks:function(c,e){let s=[],n={},t=c.tracks;for(let r=0;r<t.length;++r){let i=t[r],o=v.parseTrackName(i.name),a=v.findNode(e,o.nodeName);if(o.propertyName!=="morphTargetInfluences"||o.propertyIndex===void 0){s.push(i);continue}if(i.createInterpolant!==i.InterpolantFactoryMethodDiscrete&&i.createInterpolant!==i.InterpolantFactoryMethodLinear){if(i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline)throw new Error("THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.");console.warn("THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead."),i=i.clone(),i.setInterpolation(Ne)}let u=a.morphTargetInfluences.length,d=a.morphTargetDictionary[o.propertyIndex];if(d===void 0)throw new Error("THREE.GLTFExporter: Morph target name not found: "+o.propertyIndex);let l;if(n[a.uuid]===void 0){l=i.clone();let f=new l.ValueBufferType(u*l.times.length);for(let p=0;p<l.times.length;p++)f[p*u+d]=l.values[p];l.name=(o.nodeName||"")+".morphTargetInfluences",l.values=f,n[a.uuid]=l,s.push(l);continue}let m=i.createInterpolant(new i.ValueBufferType(1));l=n[a.uuid];for(let f=0;f<l.times.length;f++)l.values[f*u+d]=m.evaluate(l.times[f]);for(let f=0;f<i.times.length;f++){let p=this.insertKeyframe(l,i.times[f]);l.values[p*u+d]=i.values[f]}}return c.tracks=s,c}};export{P as GLTFExporter};
@@ -1 +0,0 @@
1
- import{a as z}from"./chunk-VSBVGSLC.js";import{a as h,c as J}from"./chunk-J5IUISYU.js";var ue=J((ve,D)=>{"use strict";z();D.exports=C;D.exports.default=C;function C(e,t,n){n=n||2;var r=t&&t.length,x=r?t[0]*n:e.length,i=N(e,0,x,n,!0),u=[];if(!i||i.next===i.prev)return u;var f,o,v,c,l,s,g;if(r&&(i=Y(e,t,i,n)),e.length>80*n){f=v=e[0],o=c=e[1];for(var Z=n;Z<x;Z+=n)l=e[Z],s=e[Z+1],l<f&&(f=l),s<o&&(o=s),l>v&&(v=l),s>c&&(c=s);g=Math.max(v-f,c-o),g=g!==0?32767/g:0}return L(i,u,n,f,o,g,0),u}h(C,"earcut");function N(e,t,n,r,x){var i,u;if(x===B(e,t,n,r)>0)for(i=t;i<n;i+=r)u=K(i,e[i],e[i+1],u);else for(i=n-r;i>=t;i-=r)u=K(i,e[i],e[i+1],u);return u&&E(u,u.next)&&(H(u),u=u.next),u}h(N,"linkedList");function a(e,t){if(!e)return e;t||(t=e);var n=e,r;do if(r=!1,!n.steiner&&(E(n,n.next)||w(n.prev,n,n.next)===0)){if(H(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}h(a,"filterPoints");function L(e,t,n,r,x,i,u){if(e){!u&&i&&ee(e,r,x,i);for(var f=e,o,v;e.prev!==e.next;){if(o=e.prev,v=e.next,i?I(e,r,x,i):j(e)){t.push(o.i/n|0),t.push(e.i/n|0),t.push(v.i/n|0),H(e),e=v.next,f=v.next;continue}if(e=v,e===f){u?u===1?(e=S(a(e),t,n),L(e,t,n,r,x,i,2)):u===2&&X(e,t,n,r,x,i):L(a(e),t,n,r,x,i,1);break}}}}h(L,"earcutLinked");function j(e){var t=e.prev,n=e,r=e.next;if(w(t,n,r)>=0)return!1;for(var x=t.x,i=n.x,u=r.x,f=t.y,o=n.y,v=r.y,c=x<i?x<u?x:u:i<u?i:u,l=f<o?f<v?f:v:o<v?o:v,s=x>i?x>u?x:u:i>u?i:u,g=f>o?f>v?f:v:o>v?o:v,Z=r.next;Z!==t;){if(Z.x>=c&&Z.x<=s&&Z.y>=l&&Z.y<=g&&F(x,f,i,o,u,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;Z=Z.next}return!0}h(j,"isEar");function I(e,t,n,r){var x=e.prev,i=e,u=e.next;if(w(x,i,u)>=0)return!1;for(var f=x.x,o=i.x,v=u.x,c=x.y,l=i.y,s=u.y,g=f<o?f<v?f:v:o<v?o:v,Z=c<l?c<s?c:s:l<s?l:s,M=f>o?f>v?f:v:o>v?o:v,k=c>l?c>s?c:s:l>s?l:s,V=P(g,Z,t,n,r),G=P(M,k,t,n,r),p=e.prevZ,y=e.nextZ;p&&p.z>=V&&y&&y.z<=G;){if(p.x>=g&&p.x<=M&&p.y>=Z&&p.y<=k&&p!==x&&p!==u&&F(f,c,o,l,v,s,p.x,p.y)&&w(p.prev,p,p.next)>=0||(p=p.prevZ,y.x>=g&&y.x<=M&&y.y>=Z&&y.y<=k&&y!==x&&y!==u&&F(f,c,o,l,v,s,y.x,y.y)&&w(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;p&&p.z>=V;){if(p.x>=g&&p.x<=M&&p.y>=Z&&p.y<=k&&p!==x&&p!==u&&F(f,c,o,l,v,s,p.x,p.y)&&w(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;y&&y.z<=G;){if(y.x>=g&&y.x<=M&&y.y>=Z&&y.y<=k&&y!==x&&y!==u&&F(f,c,o,l,v,s,y.x,y.y)&&w(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}h(I,"isEarHashed");function S(e,t,n){var r=e;do{var x=r.prev,i=r.next.next;!E(x,i)&&U(x,r,r.next,i)&&_(x,i)&&_(i,x)&&(t.push(x.i/n|0),t.push(r.i/n|0),t.push(i.i/n|0),H(r),H(r.next),r=e=i),r=r.next}while(r!==e);return a(r)}h(S,"cureLocalIntersections");function X(e,t,n,r,x,i){var u=e;do{for(var f=u.next.next;f!==u.prev;){if(u.i!==f.i&&re(u,f)){var o=W(u,f);u=a(u,u.next),o=a(o,o.next),L(u,t,n,r,x,i,0),L(o,t,n,r,x,i,0);return}f=f.next}u=u.next}while(u!==e)}h(X,"splitEarcut");function Y(e,t,n,r){var x=[],i,u,f,o,v;for(i=0,u=t.length;i<u;i++)f=t[i]*r,o=i<u-1?t[i+1]*r:e.length,v=N(e,f,o,r,!1),v===v.next&&(v.steiner=!0),x.push(te(v));for(x.sort(q),i=0;i<x.length;i++)n=m(x[i],n);return n}h(Y,"eliminateHoles");function q(e,t){return e.x-t.x}h(q,"compareX");function m(e,t){var n=b(e,t);if(!n)return t;var r=W(n,e);return a(r,r.next),a(n,n.next)}h(m,"eliminateHole");function b(e,t){var n=t,r=e.x,x=e.y,i=-1/0,u;do{if(x<=n.y&&x>=n.next.y&&n.next.y!==n.y){var f=n.x+(x-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(f<=r&&f>i&&(i=f,u=n.x<n.next.x?n:n.next,f===r))return u}n=n.next}while(n!==t);if(!u)return null;var o=u,v=u.x,c=u.y,l=1/0,s;n=u;do r>=n.x&&n.x>=v&&r!==n.x&&F(x<c?r:i,x,v,c,x<c?i:r,x,n.x,n.y)&&(s=Math.abs(x-n.y)/(r-n.x),_(n,e)&&(s<l||s===l&&(n.x>u.x||n.x===u.x&&d(u,n)))&&(u=n,l=s)),n=n.next;while(n!==o);return u}h(b,"findHoleBridge");function d(e,t){return w(e.prev,e,t.prev)<0&&w(t.next,e,e.next)<0}h(d,"sectorContainsSector");function ee(e,t,n,r){var x=e;do x.z===0&&(x.z=P(x.x,x.y,t,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next;while(x!==e);x.prevZ.nextZ=null,x.prevZ=null,ne(x)}h(ee,"indexCurve");function ne(e){var t,n,r,x,i,u,f,o,v=1;do{for(n=e,e=null,i=null,u=0;n;){for(u++,r=n,f=0,t=0;t<v&&(f++,r=r.nextZ,!!r);t++);for(o=v;f>0||o>0&&r;)f!==0&&(o===0||!r||n.z<=r.z)?(x=n,n=n.nextZ,f--):(x=r,r=r.nextZ,o--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;n=r}i.nextZ=null,v*=2}while(u>1);return e}h(ne,"sortLinked");function P(e,t,n,r,x){return e=(e-n)*x|0,t=(t-r)*x|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}h(P,"zOrder");function te(e){var t=e,n=e;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==e);return n}h(te,"getLeftmost");function F(e,t,n,r,x,i,u,f){return(x-u)*(t-f)>=(e-u)*(i-f)&&(e-u)*(r-f)>=(n-u)*(t-f)&&(n-u)*(i-f)>=(x-u)*(r-f)}h(F,"pointInTriangle");function re(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!xe(e,t)&&(_(e,t)&&_(t,e)&&ie(e,t)&&(w(e.prev,e,t.prev)||w(e,t.prev,t))||E(e,t)&&w(e.prev,e,e.next)>0&&w(t.prev,t,t.next)>0)}h(re,"isValidDiagonal");function w(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}h(w,"area");function E(e,t){return e.x===t.x&&e.y===t.y}h(E,"equals");function U(e,t,n,r){var x=A(w(e,t,n)),i=A(w(e,t,r)),u=A(w(n,r,e)),f=A(w(n,r,t));return!!(x!==i&&u!==f||x===0&&T(e,n,t)||i===0&&T(e,r,t)||u===0&&T(n,e,r)||f===0&&T(n,t,r))}h(U,"intersects");function T(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}h(T,"onSegment");function A(e){return e>0?1:e<0?-1:0}h(A,"sign");function xe(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&U(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}h(xe,"intersectsPolygon");function _(e,t){return w(e.prev,e,e.next)<0?w(e,t,e.next)>=0&&w(e,e.prev,t)>=0:w(e,t,e.prev)<0||w(e,e.next,t)<0}h(_,"locallyInside");function ie(e,t){var n=e,r=!1,x=(e.x+t.x)/2,i=(e.y+t.y)/2;do n.y>i!=n.next.y>i&&n.next.y!==n.y&&x<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}h(ie,"middleInside");function W(e,t){var n=new Q(e.i,e.x,e.y),r=new Q(t.i,t.x,t.y),x=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=x,x.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}h(W,"splitPolygon");function K(e,t,n,r){var x=new Q(e,t,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}h(K,"insertNode");function H(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}h(H,"removeNode");function Q(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}h(Q,"Node");C.deviation=function(e,t,n,r){var x=t&&t.length,i=x?t[0]*n:e.length,u=Math.abs(B(e,0,i,n));if(x)for(var f=0,o=t.length;f<o;f++){var v=t[f]*n,c=f<o-1?t[f+1]*n:e.length;u-=Math.abs(B(e,v,c,n))}var l=0;for(f=0;f<r.length;f+=3){var s=r[f]*n,g=r[f+1]*n,Z=r[f+2]*n;l+=Math.abs((e[s]-e[Z])*(e[g+1]-e[s+1])-(e[s]-e[g])*(e[Z+1]-e[s+1]))}return u===0&&l===0?0:Math.abs((l-u)/u)};function B(e,t,n,r){for(var x=0,i=t,u=n-r;i<n;i+=r)x+=(e[u]-e[i])*(e[i+1]+e[u+1]),u=i;return x}h(B,"signedArea");C.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,x=0;x<e.length;x++){for(var i=0;i<e[x].length;i++)for(var u=0;u<t;u++)n.vertices.push(e[x][i][u]);x>0&&(r+=e[x-1].length,n.holes.push(r))}return n}});var fe=J((O,R)=>{z();(function(e,t){typeof O=="object"&&typeof R<"u"?R.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.TinyQueue=t())})(O,function(){"use strict";var e=h(function(r,x){if(r===void 0&&(r=[]),x===void 0&&(x=t),this.data=r,this.length=this.data.length,this.compare=x,this.length>0)for(var i=(this.length>>1)-1;i>=0;i--)this._down(i)},"TinyQueue");e.prototype.push=h(function(r){this.data.push(r),this.length++,this._up(this.length-1)},"push"),e.prototype.pop=h(function(){if(this.length!==0){var r=this.data[0],x=this.data.pop();return this.length--,this.length>0&&(this.data[0]=x,this._down(0)),r}},"pop"),e.prototype.peek=h(function(){return this.data[0]},"peek"),e.prototype._up=h(function(r){for(var x=this,i=x.data,u=x.compare,f=i[r];r>0;){var o=r-1>>1,v=i[o];if(u(f,v)>=0)break;i[r]=v,r=o}i[r]=f},"_up"),e.prototype._down=h(function(r){for(var x=this,i=x.data,u=x.compare,f=this.length>>1,o=i[r];r<f;){var v=(r<<1)+1,c=i[v],l=v+1;if(l<this.length&&u(i[l],c)<0&&(v=l,c=i[l]),u(c,o)>=0)break;i[r]=c,r=v}i[r]=o},"_down");function t(n,r){return n<r?-1:n>r?1:0}return h(t,"defaultCompare"),e})});export{fe as a,ue as b};