diff --git a/ffplay/20250917204504.mp4 b/ffplay/20250917204504.mp4 new file mode 100644 index 0000000..6f6036f Binary files /dev/null and b/ffplay/20250917204504.mp4 differ diff --git a/resources/java/app/sdk/geographysdk.jar b/resources/java/app/sdk/geographysdk.jar index 00a1bbc..0a08195 100644 Binary files a/resources/java/app/sdk/geographysdk.jar and b/resources/java/app/sdk/geographysdk.jar differ diff --git a/resources/java/app/upload/033b9092110c478797b9b1cdb9b40de3.jpg b/resources/java/app/upload/033b9092110c478797b9b1cdb9b40de3.jpg new file mode 100644 index 0000000..56d2c0b Binary files /dev/null and b/resources/java/app/upload/033b9092110c478797b9b1cdb9b40de3.jpg differ diff --git a/resources/java/app/upload/08f0721a0d8e48ae83b8de6e8b6c1e75.jpg b/resources/java/app/upload/08f0721a0d8e48ae83b8de6e8b6c1e75.jpg new file mode 100644 index 0000000..54449ae Binary files /dev/null and b/resources/java/app/upload/08f0721a0d8e48ae83b8de6e8b6c1e75.jpg differ diff --git a/resources/java/app/upload/0c67c2ad328042ea948dc48ec03b3f57.JPG b/resources/java/app/upload/0c67c2ad328042ea948dc48ec03b3f57.JPG new file mode 100644 index 0000000..f9594f1 Binary files /dev/null and b/resources/java/app/upload/0c67c2ad328042ea948dc48ec03b3f57.JPG differ diff --git a/resources/java/app/upload/100161d302f44a659f3abfc0adb0038c.jpg b/resources/java/app/upload/100161d302f44a659f3abfc0adb0038c.jpg new file mode 100644 index 0000000..54449ae Binary files /dev/null and b/resources/java/app/upload/100161d302f44a659f3abfc0adb0038c.jpg differ diff --git a/resources/java/app/upload/1062975692f646a6982a367e8f13935f.jpg b/resources/java/app/upload/1062975692f646a6982a367e8f13935f.jpg new file mode 100644 index 0000000..56d2c0b Binary files /dev/null and b/resources/java/app/upload/1062975692f646a6982a367e8f13935f.jpg differ diff --git a/resources/java/app/upload/12c436c4cad549b1b38eff2568550ee1.jpg b/resources/java/app/upload/12c436c4cad549b1b38eff2568550ee1.jpg new file mode 100644 index 0000000..dfdaa33 Binary files /dev/null and b/resources/java/app/upload/12c436c4cad549b1b38eff2568550ee1.jpg differ diff --git a/resources/java/app/upload/18bcbb8043094c4181e8744ae7a84de9.JPG b/resources/java/app/upload/18bcbb8043094c4181e8744ae7a84de9.JPG new file mode 100644 index 0000000..a7f8dc6 Binary files /dev/null and b/resources/java/app/upload/18bcbb8043094c4181e8744ae7a84de9.JPG differ diff --git a/resources/java/app/upload/1e08f64aa77d404bb3f1de555dc6a0ac.JPG b/resources/java/app/upload/1e08f64aa77d404bb3f1de555dc6a0ac.JPG new file mode 100644 index 0000000..f9594f1 Binary files /dev/null and b/resources/java/app/upload/1e08f64aa77d404bb3f1de555dc6a0ac.JPG differ diff --git a/resources/java/app/upload/257fff4cff71496db00e40fef3487ac4.jpg b/resources/java/app/upload/257fff4cff71496db00e40fef3487ac4.jpg new file mode 100644 index 0000000..6e2f971 Binary files /dev/null and b/resources/java/app/upload/257fff4cff71496db00e40fef3487ac4.jpg differ diff --git a/resources/java/app/upload/2c8f6ff66541480e93361a73708c16e2.jpg b/resources/java/app/upload/2c8f6ff66541480e93361a73708c16e2.jpg new file mode 100644 index 0000000..dfdaa33 Binary files /dev/null and b/resources/java/app/upload/2c8f6ff66541480e93361a73708c16e2.jpg differ diff --git a/resources/java/app/upload/2dded9e561a742f88d3a04ad11540053.jpg b/resources/java/app/upload/2dded9e561a742f88d3a04ad11540053.jpg new file mode 100644 index 0000000..56d2c0b Binary files /dev/null and b/resources/java/app/upload/2dded9e561a742f88d3a04ad11540053.jpg differ diff --git a/resources/java/app/upload/330d8f72f895485290d0b408fa707f81.jpg b/resources/java/app/upload/330d8f72f895485290d0b408fa707f81.jpg new file mode 100644 index 0000000..dfdaa33 Binary files /dev/null and b/resources/java/app/upload/330d8f72f895485290d0b408fa707f81.jpg differ diff --git a/resources/java/app/upload/3baf5da7c6154a8c8ff0b2cbb919451f.JPG b/resources/java/app/upload/3baf5da7c6154a8c8ff0b2cbb919451f.JPG new file mode 100644 index 0000000..a7f8dc6 Binary files /dev/null and b/resources/java/app/upload/3baf5da7c6154a8c8ff0b2cbb919451f.JPG differ diff --git a/resources/java/app/upload/3fc40e256c7f4cefa3cc5cca84d20d2b.jpg b/resources/java/app/upload/3fc40e256c7f4cefa3cc5cca84d20d2b.jpg new file mode 100644 index 0000000..4386554 Binary files /dev/null and b/resources/java/app/upload/3fc40e256c7f4cefa3cc5cca84d20d2b.jpg differ diff --git a/resources/java/app/upload/41ade62b36904aa1b77b6ae450cd08b2.JPG b/resources/java/app/upload/41ade62b36904aa1b77b6ae450cd08b2.JPG new file mode 100644 index 0000000..f389f18 Binary files /dev/null and b/resources/java/app/upload/41ade62b36904aa1b77b6ae450cd08b2.JPG differ diff --git a/resources/java/app/upload/474d50b295b043aea8b71c09ecfc3fe6.jpg b/resources/java/app/upload/474d50b295b043aea8b71c09ecfc3fe6.jpg new file mode 100644 index 0000000..56d2c0b Binary files /dev/null and b/resources/java/app/upload/474d50b295b043aea8b71c09ecfc3fe6.jpg differ diff --git a/resources/java/app/upload/478fb67eaa91490fbe6cdc488f7415bf.jpg b/resources/java/app/upload/478fb67eaa91490fbe6cdc488f7415bf.jpg new file mode 100644 index 0000000..54449ae Binary files /dev/null and b/resources/java/app/upload/478fb67eaa91490fbe6cdc488f7415bf.jpg differ diff --git a/resources/java/app/upload/4b59dad7d85c4da0b57dc6e3e44de559.JPG b/resources/java/app/upload/4b59dad7d85c4da0b57dc6e3e44de559.JPG new file mode 100644 index 0000000..f9594f1 Binary files /dev/null and b/resources/java/app/upload/4b59dad7d85c4da0b57dc6e3e44de559.JPG differ diff --git a/resources/java/app/upload/4baa689f69c34736b601f52a9362e4c7.JPG b/resources/java/app/upload/4baa689f69c34736b601f52a9362e4c7.JPG new file mode 100644 index 0000000..9144105 Binary files /dev/null and b/resources/java/app/upload/4baa689f69c34736b601f52a9362e4c7.JPG differ diff --git a/resources/java/app/upload/532778a977564f62a0f2d83a998a9fc4.jpg b/resources/java/app/upload/532778a977564f62a0f2d83a998a9fc4.jpg new file mode 100644 index 0000000..dfdaa33 Binary files /dev/null and b/resources/java/app/upload/532778a977564f62a0f2d83a998a9fc4.jpg differ diff --git a/resources/java/app/upload/5da68b3196b046a494888c122c8f1978.JPG b/resources/java/app/upload/5da68b3196b046a494888c122c8f1978.JPG new file mode 100644 index 0000000..f389f18 Binary files /dev/null and b/resources/java/app/upload/5da68b3196b046a494888c122c8f1978.JPG differ diff --git a/resources/java/app/upload/61fd16a0bb1b46d6a2aaf7e1c877547d.jpg b/resources/java/app/upload/61fd16a0bb1b46d6a2aaf7e1c877547d.jpg new file mode 100644 index 0000000..4386554 Binary files /dev/null and b/resources/java/app/upload/61fd16a0bb1b46d6a2aaf7e1c877547d.jpg differ diff --git a/resources/java/app/upload/691cbca45f2b40ac92194a0f4a3c8512.jpg b/resources/java/app/upload/691cbca45f2b40ac92194a0f4a3c8512.jpg new file mode 100644 index 0000000..ace57b8 Binary files /dev/null and b/resources/java/app/upload/691cbca45f2b40ac92194a0f4a3c8512.jpg differ diff --git a/resources/java/app/upload/6c9a4dded45443208d6351863643648b.JPG b/resources/java/app/upload/6c9a4dded45443208d6351863643648b.JPG new file mode 100644 index 0000000..4286973 Binary files /dev/null and b/resources/java/app/upload/6c9a4dded45443208d6351863643648b.JPG differ diff --git a/resources/java/app/upload/6f4b0752eca94b60911ebc13c0d020cf.JPG b/resources/java/app/upload/6f4b0752eca94b60911ebc13c0d020cf.JPG new file mode 100644 index 0000000..d3f9423 Binary files /dev/null and b/resources/java/app/upload/6f4b0752eca94b60911ebc13c0d020cf.JPG differ diff --git a/resources/java/app/upload/702b03455ae24f4aaa04cbaed17d6c29.jpg b/resources/java/app/upload/702b03455ae24f4aaa04cbaed17d6c29.jpg new file mode 100644 index 0000000..54449ae Binary files /dev/null and b/resources/java/app/upload/702b03455ae24f4aaa04cbaed17d6c29.jpg differ diff --git a/resources/java/app/upload/71b4ddc5ac6745c489478a6274ab7321.JPG b/resources/java/app/upload/71b4ddc5ac6745c489478a6274ab7321.JPG new file mode 100644 index 0000000..da481d2 Binary files /dev/null and b/resources/java/app/upload/71b4ddc5ac6745c489478a6274ab7321.JPG differ diff --git a/resources/java/app/upload/720df0f8ca5743dd9c9babb5e22c4f54.jpg b/resources/java/app/upload/720df0f8ca5743dd9c9babb5e22c4f54.jpg new file mode 100644 index 0000000..4386554 Binary files /dev/null and b/resources/java/app/upload/720df0f8ca5743dd9c9babb5e22c4f54.jpg differ diff --git a/resources/java/app/upload/75d897267dc9491d8255b498dd44edfb.jpg b/resources/java/app/upload/75d897267dc9491d8255b498dd44edfb.jpg new file mode 100644 index 0000000..4386554 Binary files /dev/null and b/resources/java/app/upload/75d897267dc9491d8255b498dd44edfb.jpg differ diff --git a/resources/java/app/upload/7631415789d7434f9638a385a11b0dbf.JPG b/resources/java/app/upload/7631415789d7434f9638a385a11b0dbf.JPG new file mode 100644 index 0000000..47c8c40 Binary files /dev/null and b/resources/java/app/upload/7631415789d7434f9638a385a11b0dbf.JPG differ diff --git a/resources/java/app/upload/80a9b3701a25480b9c731db92501015a.jpg b/resources/java/app/upload/80a9b3701a25480b9c731db92501015a.jpg new file mode 100644 index 0000000..dfdaa33 Binary files /dev/null and b/resources/java/app/upload/80a9b3701a25480b9c731db92501015a.jpg differ diff --git a/resources/java/app/upload/8286f6b52f254884af601447ca13a1d5.JPG b/resources/java/app/upload/8286f6b52f254884af601447ca13a1d5.JPG new file mode 100644 index 0000000..32fbef3 Binary files /dev/null and b/resources/java/app/upload/8286f6b52f254884af601447ca13a1d5.JPG differ diff --git a/resources/java/app/upload/8e515835140c4128b0ae4451e18dde81.JPG b/resources/java/app/upload/8e515835140c4128b0ae4451e18dde81.JPG new file mode 100644 index 0000000..9144105 Binary files /dev/null and b/resources/java/app/upload/8e515835140c4128b0ae4451e18dde81.JPG differ diff --git a/resources/java/app/upload/8ea517aa085f4979a6edafe754a4dbe6.jpg b/resources/java/app/upload/8ea517aa085f4979a6edafe754a4dbe6.jpg new file mode 100644 index 0000000..4386554 Binary files /dev/null and b/resources/java/app/upload/8ea517aa085f4979a6edafe754a4dbe6.jpg differ diff --git a/resources/java/app/upload/907bc53ebfd04f9b9c6212b22a533b86.jpg b/resources/java/app/upload/907bc53ebfd04f9b9c6212b22a533b86.jpg new file mode 100644 index 0000000..4386554 Binary files /dev/null and b/resources/java/app/upload/907bc53ebfd04f9b9c6212b22a533b86.jpg differ diff --git a/resources/java/app/upload/a6be98ea6a2d47ecad60786f1a2e1751.jpg b/resources/java/app/upload/a6be98ea6a2d47ecad60786f1a2e1751.jpg new file mode 100644 index 0000000..4386554 Binary files /dev/null and b/resources/java/app/upload/a6be98ea6a2d47ecad60786f1a2e1751.jpg differ diff --git a/resources/java/app/upload/ab5d72cbcf0b45e580588e74f92b592a.jpg b/resources/java/app/upload/ab5d72cbcf0b45e580588e74f92b592a.jpg new file mode 100644 index 0000000..dfdaa33 Binary files /dev/null and b/resources/java/app/upload/ab5d72cbcf0b45e580588e74f92b592a.jpg differ diff --git a/resources/java/app/upload/ad823c4046704e1c84eb37797d1d844b.jpg b/resources/java/app/upload/ad823c4046704e1c84eb37797d1d844b.jpg new file mode 100644 index 0000000..dfdaa33 Binary files /dev/null and b/resources/java/app/upload/ad823c4046704e1c84eb37797d1d844b.jpg differ diff --git a/resources/java/app/upload/afbad7b36e784bcdaf8ce099022ada48.jpg b/resources/java/app/upload/afbad7b36e784bcdaf8ce099022ada48.jpg new file mode 100644 index 0000000..54449ae Binary files /dev/null and b/resources/java/app/upload/afbad7b36e784bcdaf8ce099022ada48.jpg differ diff --git a/resources/java/app/upload/b1ffe201bf2e4438b0644573c89e61c8.JPG b/resources/java/app/upload/b1ffe201bf2e4438b0644573c89e61c8.JPG new file mode 100644 index 0000000..4286973 Binary files /dev/null and b/resources/java/app/upload/b1ffe201bf2e4438b0644573c89e61c8.JPG differ diff --git a/resources/java/app/upload/b22ecf1de04348c687ab284a64b02696.jpg b/resources/java/app/upload/b22ecf1de04348c687ab284a64b02696.jpg new file mode 100644 index 0000000..dfdaa33 Binary files /dev/null and b/resources/java/app/upload/b22ecf1de04348c687ab284a64b02696.jpg differ diff --git a/resources/java/app/upload/b7d8a392f4ae448f9e6ea5d8d53c7960.jpg b/resources/java/app/upload/b7d8a392f4ae448f9e6ea5d8d53c7960.jpg new file mode 100644 index 0000000..4386554 Binary files /dev/null and b/resources/java/app/upload/b7d8a392f4ae448f9e6ea5d8d53c7960.jpg differ diff --git a/resources/java/app/upload/ba5a9fe7d09f4b63b4fde841dff4c48e.jpg b/resources/java/app/upload/ba5a9fe7d09f4b63b4fde841dff4c48e.jpg new file mode 100644 index 0000000..56d2c0b Binary files /dev/null and b/resources/java/app/upload/ba5a9fe7d09f4b63b4fde841dff4c48e.jpg differ diff --git a/resources/java/app/upload/bfba71b1d9834395a9f78d8139414c75.jpg b/resources/java/app/upload/bfba71b1d9834395a9f78d8139414c75.jpg new file mode 100644 index 0000000..ace57b8 Binary files /dev/null and b/resources/java/app/upload/bfba71b1d9834395a9f78d8139414c75.jpg differ diff --git a/resources/java/app/upload/c22545152fe947f5be5e90644eee4947.jpg b/resources/java/app/upload/c22545152fe947f5be5e90644eee4947.jpg new file mode 100644 index 0000000..dfdaa33 Binary files /dev/null and b/resources/java/app/upload/c22545152fe947f5be5e90644eee4947.jpg differ diff --git a/resources/java/app/upload/c977d56bc876462aabe4e65787f26772.jpg b/resources/java/app/upload/c977d56bc876462aabe4e65787f26772.jpg new file mode 100644 index 0000000..56d2c0b Binary files /dev/null and b/resources/java/app/upload/c977d56bc876462aabe4e65787f26772.jpg differ diff --git a/resources/java/app/upload/cfa5bd609fea44e28d0e8c46950612cc.JPG b/resources/java/app/upload/cfa5bd609fea44e28d0e8c46950612cc.JPG new file mode 100644 index 0000000..19b8ad3 Binary files /dev/null and b/resources/java/app/upload/cfa5bd609fea44e28d0e8c46950612cc.JPG differ diff --git a/resources/java/app/upload/d2889ca0ad30448a9d4157bf7b4709b7.JPG b/resources/java/app/upload/d2889ca0ad30448a9d4157bf7b4709b7.JPG new file mode 100644 index 0000000..f9594f1 Binary files /dev/null and b/resources/java/app/upload/d2889ca0ad30448a9d4157bf7b4709b7.JPG differ diff --git a/resources/java/app/upload/d7b05fc0252841049e0dd75e877e86fa.jpg b/resources/java/app/upload/d7b05fc0252841049e0dd75e877e86fa.jpg new file mode 100644 index 0000000..56d2c0b Binary files /dev/null and b/resources/java/app/upload/d7b05fc0252841049e0dd75e877e86fa.jpg differ diff --git a/resources/java/app/upload/d9d820f53cc241db80fc2be0a1fabcd7.JPG b/resources/java/app/upload/d9d820f53cc241db80fc2be0a1fabcd7.JPG new file mode 100644 index 0000000..32fbef3 Binary files /dev/null and b/resources/java/app/upload/d9d820f53cc241db80fc2be0a1fabcd7.JPG differ diff --git a/resources/java/app/upload/e093ba97f3884e6ab10c8748201d2aef.jpg b/resources/java/app/upload/e093ba97f3884e6ab10c8748201d2aef.jpg new file mode 100644 index 0000000..dfdaa33 Binary files /dev/null and b/resources/java/app/upload/e093ba97f3884e6ab10c8748201d2aef.jpg differ diff --git a/resources/java/app/upload/f6cbc3ded9f14158a9bc6d6d84a82e76.JPG b/resources/java/app/upload/f6cbc3ded9f14158a9bc6d6d84a82e76.JPG new file mode 100644 index 0000000..da481d2 Binary files /dev/null and b/resources/java/app/upload/f6cbc3ded9f14158a9bc6d6d84a82e76.JPG differ diff --git a/resources/java/app/yjearth.jar b/resources/java/app/yjearth.jar index 4b9c91b..eb81831 100644 Binary files a/resources/java/app/yjearth.jar and b/resources/java/app/yjearth.jar differ diff --git a/src/main/index.ts b/src/main/index.ts index 48cc557..69fd92b 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -136,9 +136,9 @@ function createWindow(): void { ipcMain.on("open-directory-dialog", (event, option) => { // @ts-ignore dialog.showOpenDialog(BrowserWindow.getFocusedWindow(), { - properties: option.properties, - filters: option.filters, - }) + properties: option.properties, + filters: option.filters, + }) .then((files) => { let arr = []; if (!files.canceled) { @@ -194,6 +194,20 @@ function createWindow(): void { } }); }); + // 监听渲染进程创建新窗口的请求 + ipcMain.handle('create-new-window', async (event, params, url, option) => { + try { + const newWindow = await new BrowserWindow(params) + if (url) { + await newWindow.loadURL(url) + await newWindow.webContents.send("data", option) + } + return newWindow.id + } catch (error) { + console.error('创建窗口失败:', error); + throw error; // 抛出错误以便渲染进程捕获 + } + }) // 设置窗口标题和图标 mainWindow.webContents.setWindowOpenHandler((details) => { shell.openExternal(details.url) diff --git a/src/renderer/components.d.ts b/src/renderer/components.d.ts index 5cb6634..caebf2c 100644 --- a/src/renderer/components.d.ts +++ b/src/renderer/components.d.ts @@ -12,6 +12,7 @@ declare module 'vue' { Directory: typeof import('./src/components/dialog/directory.vue')['default'] ElButton: typeof import('element-plus/es')['ElButton'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] + ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] diff --git a/src/renderer/public/Vue/index.css b/src/renderer/public/Vue/index.css new file mode 100644 index 0000000..fea6775 --- /dev/null +++ b/src/renderer/public/Vue/index.css @@ -0,0 +1,15676 @@ +@charset "UTF-8"; +.el-pagination--small .arrow.disabled, .el-table .el-table__cell.is-hidden > *, .el-table .hidden-columns, .el-table--hidden { + visibility: hidden +} + +.el-dropdown .el-dropdown-selfdefine:focus:active, .el-dropdown .el-dropdown-selfdefine:focus:not(.focusing), .el-message__closeBtn:focus, .el-message__content:focus, .el-popover:focus, .el-popover:focus:active, .el-popover__reference:focus:hover, .el-popover__reference:focus:not(.focusing), .el-rate:active, .el-rate:focus, .el-tooltip:focus:hover, .el-tooltip:focus:not(.focusing), .el-upload-list__item.is-success:active, .el-upload-list__item.is-success:not(.focusing):focus { + outline-width: 0 +} + +.el-input__suffix, .el-tree.is-dragging .el-tree-node__content * { + pointer-events: none +} + +@font-face { + font-family: element-icons; + src: url(fonts/element-icons.woff) format("woff"), url(fonts/element-icons.ttf) format("truetype"); + font-weight: 400; + font-display: "auto"; + font-style: normal +} + +[class*=" el-icon-"], [class^=el-icon-] { + font-family: element-icons !important; + speak: none; + font-style: normal; + font-weight: 400; + font-variant: normal; + text-transform: none; + line-height: 1; + vertical-align: baseline; + display: inline-block; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale +} + +.el-icon-ice-cream-round:before { + content: "\e6a0" +} + +.el-icon-ice-cream-square:before { + content: "\e6a3" +} + +.el-icon-lollipop:before { + content: "\e6a4" +} + +.el-icon-potato-strips:before { + content: "\e6a5" +} + +.el-icon-milk-tea:before { + content: "\e6a6" +} + +.el-icon-ice-drink:before { + content: "\e6a7" +} + +.el-icon-ice-tea:before { + content: "\e6a9" +} + +.el-icon-coffee:before { + content: "\e6aa" +} + +.el-icon-orange:before { + content: "\e6ab" +} + +.el-icon-pear:before { + content: "\e6ac" +} + +.el-icon-apple:before { + content: "\e6ad" +} + +.el-icon-cherry:before { + content: "\e6ae" +} + +.el-icon-watermelon:before { + content: "\e6af" +} + +.el-icon-grape:before { + content: "\e6b0" +} + +.el-icon-refrigerator:before { + content: "\e6b1" +} + +.el-icon-goblet-square-full:before { + content: "\e6b2" +} + +.el-icon-goblet-square:before { + content: "\e6b3" +} + +.el-icon-goblet-full:before { + content: "\e6b4" +} + +.el-icon-goblet:before { + content: "\e6b5" +} + +.el-icon-cold-drink:before { + content: "\e6b6" +} + +.el-icon-coffee-cup:before { + content: "\e6b8" +} + +.el-icon-water-cup:before { + content: "\e6b9" +} + +.el-icon-hot-water:before { + content: "\e6ba" +} + +.el-icon-ice-cream:before { + content: "\e6bb" +} + +.el-icon-dessert:before { + content: "\e6bc" +} + +.el-icon-sugar:before { + content: "\e6bd" +} + +.el-icon-tableware:before { + content: "\e6be" +} + +.el-icon-burger:before { + content: "\e6bf" +} + +.el-icon-knife-fork:before { + content: "\e6c1" +} + +.el-icon-fork-spoon:before { + content: "\e6c2" +} + +.el-icon-chicken:before { + content: "\e6c3" +} + +.el-icon-food:before { + content: "\e6c4" +} + +.el-icon-dish-1:before { + content: "\e6c5" +} + +.el-icon-dish:before { + content: "\e6c6" +} + +.el-icon-moon-night:before { + content: "\e6ee" +} + +.el-icon-moon:before { + content: "\e6f0" +} + +.el-icon-cloudy-and-sunny:before { + content: "\e6f1" +} + +.el-icon-partly-cloudy:before { + content: "\e6f2" +} + +.el-icon-cloudy:before { + content: "\e6f3" +} + +.el-icon-sunny:before { + content: "\e6f6" +} + +.el-icon-sunset:before { + content: "\e6f7" +} + +.el-icon-sunrise-1:before { + content: "\e6f8" +} + +.el-icon-sunrise:before { + content: "\e6f9" +} + +.el-icon-heavy-rain:before { + content: "\e6fa" +} + +.el-icon-lightning:before { + content: "\e6fb" +} + +.el-icon-light-rain:before { + content: "\e6fc" +} + +.el-icon-wind-power:before { + content: "\e6fd" +} + +.el-icon-baseball:before { + content: "\e712" +} + +.el-icon-soccer:before { + content: "\e713" +} + +.el-icon-football:before { + content: "\e715" +} + +.el-icon-basketball:before { + content: "\e716" +} + +.el-icon-ship:before { + content: "\e73f" +} + +.el-icon-truck:before { + content: "\e740" +} + +.el-icon-bicycle:before { + content: "\e741" +} + +.el-icon-mobile-phone:before { + content: "\e6d3" +} + +.el-icon-service:before { + content: "\e6d4" +} + +.el-icon-key:before { + content: "\e6e2" +} + +.el-icon-unlock:before { + content: "\e6e4" +} + +.el-icon-lock:before { + content: "\e6e5" +} + +.el-icon-watch:before { + content: "\e6fe" +} + +.el-icon-watch-1:before { + content: "\e6ff" +} + +.el-icon-timer:before { + content: "\e702" +} + +.el-icon-alarm-clock:before { + content: "\e703" +} + +.el-icon-map-location:before { + content: "\e704" +} + +.el-icon-delete-location:before { + content: "\e705" +} + +.el-icon-add-location:before { + content: "\e706" +} + +.el-icon-location-information:before { + content: "\e707" +} + +.el-icon-location-outline:before { + content: "\e708" +} + +.el-icon-location:before { + content: "\e79e" +} + +.el-icon-place:before { + content: "\e709" +} + +.el-icon-discover:before { + content: "\e70a" +} + +.el-icon-first-aid-kit:before { + content: "\e70b" +} + +.el-icon-trophy-1:before { + content: "\e70c" +} + +.el-icon-trophy:before { + content: "\e70d" +} + +.el-icon-medal:before { + content: "\e70e" +} + +.el-icon-medal-1:before { + content: "\e70f" +} + +.el-icon-stopwatch:before { + content: "\e710" +} + +.el-icon-mic:before { + content: "\e711" +} + +.el-icon-copy-document:before { + content: "\e718" +} + +.el-icon-full-screen:before { + content: "\e719" +} + +.el-icon-switch-button:before { + content: "\e71b" +} + +.el-icon-aim:before { + content: "\e71c" +} + +.el-icon-crop:before { + content: "\e71d" +} + +.el-icon-odometer:before { + content: "\e71e" +} + +.el-icon-time:before { + content: "\e71f" +} + +.el-icon-bangzhu:before { + content: "\e724" +} + +.el-icon-close-notification:before { + content: "\e726" +} + +.el-icon-microphone:before { + content: "\e727" +} + +.el-icon-turn-off-microphone:before { + content: "\e728" +} + +.el-icon-position:before { + content: "\e729" +} + +.el-icon-postcard:before { + content: "\e72a" +} + +.el-icon-message:before { + content: "\e72b" +} + +.el-icon-chat-line-square:before { + content: "\e72d" +} + +.el-icon-chat-dot-square:before { + content: "\e72e" +} + +.el-icon-chat-dot-round:before { + content: "\e72f" +} + +.el-icon-chat-square:before { + content: "\e730" +} + +.el-icon-chat-line-round:before { + content: "\e731" +} + +.el-icon-chat-round:before { + content: "\e732" +} + +.el-icon-set-up:before { + content: "\e733" +} + +.el-icon-turn-off:before { + content: "\e734" +} + +.el-icon-open:before { + content: "\e735" +} + +.el-icon-connection:before { + content: "\e736" +} + +.el-icon-link:before { + content: "\e737" +} + +.el-icon-cpu:before { + content: "\e738" +} + +.el-icon-thumb:before { + content: "\e739" +} + +.el-icon-female:before { + content: "\e73a" +} + +.el-icon-male:before { + content: "\e73b" +} + +.el-icon-guide:before { + content: "\e73c" +} + +.el-icon-news:before { + content: "\e73e" +} + +.el-icon-price-tag:before { + content: "\e744" +} + +.el-icon-discount:before { + content: "\e745" +} + +.el-icon-wallet:before { + content: "\e747" +} + +.el-icon-coin:before { + content: "\e748" +} + +.el-icon-money:before { + content: "\e749" +} + +.el-icon-bank-card:before { + content: "\e74a" +} + +.el-icon-box:before { + content: "\e74b" +} + +.el-icon-present:before { + content: "\e74c" +} + +.el-icon-sell:before { + content: "\e6d5" +} + +.el-icon-sold-out:before { + content: "\e6d6" +} + +.el-icon-shopping-bag-2:before { + content: "\e74d" +} + +.el-icon-shopping-bag-1:before { + content: "\e74e" +} + +.el-icon-shopping-cart-2:before { + content: "\e74f" +} + +.el-icon-shopping-cart-1:before { + content: "\e750" +} + +.el-icon-shopping-cart-full:before { + content: "\e751" +} + +.el-icon-smoking:before { + content: "\e752" +} + +.el-icon-no-smoking:before { + content: "\e753" +} + +.el-icon-house:before { + content: "\e754" +} + +.el-icon-table-lamp:before { + content: "\e755" +} + +.el-icon-school:before { + content: "\e756" +} + +.el-icon-office-building:before { + content: "\e757" +} + +.el-icon-toilet-paper:before { + content: "\e758" +} + +.el-icon-notebook-2:before { + content: "\e759" +} + +.el-icon-notebook-1:before { + content: "\e75a" +} + +.el-icon-files:before { + content: "\e75b" +} + +.el-icon-collection:before { + content: "\e75c" +} + +.el-icon-receiving:before { + content: "\e75d" +} + +.el-icon-suitcase-1:before { + content: "\e760" +} + +.el-icon-suitcase:before { + content: "\e761" +} + +.el-icon-film:before { + content: "\e763" +} + +.el-icon-collection-tag:before { + content: "\e765" +} + +.el-icon-data-analysis:before { + content: "\e766" +} + +.el-icon-pie-chart:before { + content: "\e767" +} + +.el-icon-data-board:before { + content: "\e768" +} + +.el-icon-data-line:before { + content: "\e76d" +} + +.el-icon-reading:before { + content: "\e769" +} + +.el-icon-magic-stick:before { + content: "\e76a" +} + +.el-icon-coordinate:before { + content: "\e76b" +} + +.el-icon-mouse:before { + content: "\e76c" +} + +.el-icon-brush:before { + content: "\e76e" +} + +.el-icon-headset:before { + content: "\e76f" +} + +.el-icon-umbrella:before { + content: "\e770" +} + +.el-icon-scissors:before { + content: "\e771" +} + +.el-icon-mobile:before { + content: "\e773" +} + +.el-icon-attract:before { + content: "\e774" +} + +.el-icon-monitor:before { + content: "\e775" +} + +.el-icon-search:before { + content: "\e778" +} + +.el-icon-takeaway-box:before { + content: "\e77a" +} + +.el-icon-paperclip:before { + content: "\e77d" +} + +.el-icon-printer:before { + content: "\e77e" +} + +.el-icon-document-add:before { + content: "\e782" +} + +.el-icon-document:before { + content: "\e785" +} + +.el-icon-document-checked:before { + content: "\e786" +} + +.el-icon-document-copy:before { + content: "\e787" +} + +.el-icon-document-delete:before { + content: "\e788" +} + +.el-icon-document-remove:before { + content: "\e789" +} + +.el-icon-tickets:before { + content: "\e78b" +} + +.el-icon-folder-checked:before { + content: "\e77f" +} + +.el-icon-folder-delete:before { + content: "\e780" +} + +.el-icon-folder-remove:before { + content: "\e781" +} + +.el-icon-folder-add:before { + content: "\e783" +} + +.el-icon-folder-opened:before { + content: "\e784" +} + +.el-icon-folder:before { + content: "\e78a" +} + +.el-icon-edit-outline:before { + content: "\e764" +} + +.el-icon-edit:before { + content: "\e78c" +} + +.el-icon-date:before { + content: "\e78e" +} + +.el-icon-c-scale-to-original:before { + content: "\e7c6" +} + +.el-icon-view:before { + content: "\e6ce" +} + +.el-icon-loading:before { + content: "\e6cf" +} + +.el-icon-rank:before { + content: "\e6d1" +} + +.el-icon-sort-down:before { + content: "\e7c4" +} + +.el-icon-sort-up:before { + content: "\e7c5" +} + +.el-icon-sort:before { + content: "\e6d2" +} + +.el-icon-finished:before { + content: "\e6cd" +} + +.el-icon-refresh-left:before { + content: "\e6c7" +} + +.el-icon-refresh-right:before { + content: "\e6c8" +} + +.el-icon-refresh:before { + content: "\e6d0" +} + +.el-icon-video-play:before { + content: "\e7c0" +} + +.el-icon-video-pause:before { + content: "\e7c1" +} + +.el-icon-d-arrow-right:before { + content: "\e6dc" +} + +.el-icon-d-arrow-left:before { + content: "\e6dd" +} + +.el-icon-arrow-up:before { + content: "\e6e1" +} + +.el-icon-arrow-down:before { + content: "\e6df" +} + +.el-icon-arrow-right:before { + content: "\e6e0" +} + +.el-icon-arrow-left:before { + content: "\e6de" +} + +.el-icon-top-right:before { + content: "\e6e7" +} + +.el-icon-top-left:before { + content: "\e6e8" +} + +.el-icon-top:before { + content: "\e6e6" +} + +.el-icon-bottom:before { + content: "\e6eb" +} + +.el-icon-right:before { + content: "\e6e9" +} + +.el-icon-back:before { + content: "\e6ea" +} + +.el-icon-bottom-right:before { + content: "\e6ec" +} + +.el-icon-bottom-left:before { + content: "\e6ed" +} + +.el-icon-caret-top:before { + content: "\e78f" +} + +.el-icon-caret-bottom:before { + content: "\e790" +} + +.el-icon-caret-right:before { + content: "\e791" +} + +.el-icon-caret-left:before { + content: "\e792" +} + +.el-icon-d-caret:before { + content: "\e79a" +} + +.el-icon-share:before { + content: "\e793" +} + +.el-icon-menu:before { + content: "\e798" +} + +.el-icon-s-grid:before { + content: "\e7a6" +} + +.el-icon-s-check:before { + content: "\e7a7" +} + +.el-icon-s-data:before { + content: "\e7a8" +} + +.el-icon-s-opportunity:before { + content: "\e7aa" +} + +.el-icon-s-custom:before { + content: "\e7ab" +} + +.el-icon-s-claim:before { + content: "\e7ad" +} + +.el-icon-s-finance:before { + content: "\e7ae" +} + +.el-icon-s-comment:before { + content: "\e7af" +} + +.el-icon-s-flag:before { + content: "\e7b0" +} + +.el-icon-s-marketing:before { + content: "\e7b1" +} + +.el-icon-s-shop:before { + content: "\e7b4" +} + +.el-icon-s-open:before { + content: "\e7b5" +} + +.el-icon-s-management:before { + content: "\e7b6" +} + +.el-icon-s-ticket:before { + content: "\e7b7" +} + +.el-icon-s-release:before { + content: "\e7b8" +} + +.el-icon-s-home:before { + content: "\e7b9" +} + +.el-icon-s-promotion:before { + content: "\e7ba" +} + +.el-icon-s-operation:before { + content: "\e7bb" +} + +.el-icon-s-unfold:before { + content: "\e7bc" +} + +.el-icon-s-fold:before { + content: "\e7a9" +} + +.el-icon-s-platform:before { + content: "\e7bd" +} + +.el-icon-s-order:before { + content: "\e7be" +} + +.el-icon-s-cooperation:before { + content: "\e7bf" +} + +.el-icon-bell:before { + content: "\e725" +} + +.el-icon-message-solid:before { + content: "\e799" +} + +.el-icon-video-camera:before { + content: "\e772" +} + +.el-icon-video-camera-solid:before { + content: "\e796" +} + +.el-icon-camera:before { + content: "\e779" +} + +.el-icon-camera-solid:before { + content: "\e79b" +} + +.el-icon-download:before { + content: "\e77c" +} + +.el-icon-upload2:before { + content: "\e77b" +} + +.el-icon-upload:before { + content: "\e7c3" +} + +.el-icon-picture-outline-round:before { + content: "\e75f" +} + +.el-icon-picture-outline:before { + content: "\e75e" +} + +.el-icon-picture:before { + content: "\e79f" +} + +.el-icon-close:before { + content: "\e6db" +} + +.el-icon-check:before { + content: "\e6da" +} + +.el-icon-plus:before { + content: "\e6d9" +} + +.el-icon-minus:before { + content: "\e6d8" +} + +.el-icon-help:before { + content: "\e73d" +} + +.el-icon-s-help:before { + content: "\e7b3" +} + +.el-icon-circle-close:before { + content: "\e78d" +} + +.el-icon-circle-check:before { + content: "\e720" +} + +.el-icon-circle-plus-outline:before { + content: "\e723" +} + +.el-icon-remove-outline:before { + content: "\e722" +} + +.el-icon-zoom-out:before { + content: "\e776" +} + +.el-icon-zoom-in:before { + content: "\e777" +} + +.el-icon-error:before { + content: "\e79d" +} + +.el-icon-success:before { + content: "\e79c" +} + +.el-icon-circle-plus:before { + content: "\e7a0" +} + +.el-icon-remove:before { + content: "\e7a2" +} + +.el-icon-info:before { + content: "\e7a1" +} + +.el-icon-question:before { + content: "\e7a4" +} + +.el-icon-warning-outline:before { + content: "\e6c9" +} + +.el-icon-warning:before { + content: "\e7a3" +} + +.el-icon-goods:before { + content: "\e7c2" +} + +.el-icon-s-goods:before { + content: "\e7b2" +} + +.el-icon-star-off:before { + content: "\e717" +} + +.el-icon-star-on:before { + content: "\e797" +} + +.el-icon-more-outline:before { + content: "\e6cc" +} + +.el-icon-more:before { + content: "\e794" +} + +.el-icon-phone-outline:before { + content: "\e6cb" +} + +.el-icon-phone:before { + content: "\e795" +} + +.el-icon-user:before { + content: "\e6e3" +} + +.el-icon-user-solid:before { + content: "\e7a5" +} + +.el-icon-setting:before { + content: "\e6ca" +} + +.el-icon-s-tools:before { + content: "\e7ac" +} + +.el-icon-delete:before { + content: "\e6d7" +} + +.el-icon-delete-solid:before { + content: "\e7c9" +} + +.el-icon-eleme:before { + content: "\e7c7" +} + +.el-icon-platform-eleme:before { + content: "\e7ca" +} + +.el-icon-loading { + -webkit-animation: rotating 2s linear infinite; + animation: rotating 2s linear infinite +} + +.el-icon--right { + margin-left: 5px +} + +.el-icon--left { + margin-right: 5px +} + +@-webkit-keyframes rotating { + 0% { + -webkit-transform: rotateZ(0); + transform: rotateZ(0) + } + 100% { + -webkit-transform: rotateZ(360deg); + transform: rotateZ(360deg) + } +} + +@keyframes rotating { + 0% { + -webkit-transform: rotateZ(0); + transform: rotateZ(0) + } + 100% { + -webkit-transform: rotateZ(360deg); + transform: rotateZ(360deg) + } +} + +.el-pagination { + white-space: nowrap; + padding: 2px 5px; + color: #303133; + font-weight: 700 +} + +.el-pagination::after, .el-pagination::before { + display: table; + content: "" +} + +.el-pagination::after { + clear: both +} + +.el-pagination button, .el-pagination span:not([class*=suffix]) { + display: inline-block; + font-size: 13px; + min-width: 35.5px; + height: 28px; + line-height: 28px; + vertical-align: top; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-pagination .el-input__inner { + text-align: center; + -moz-appearance: textfield; + line-height: normal +} + +.el-pagination .el-input__suffix { + right: 0; + -webkit-transform: scale(.8); + transform: scale(.8) +} + +.el-pagination .el-select .el-input { + width: 100px; + margin: 0 5px +} + +.el-pagination .el-select .el-input .el-input__inner { + padding-right: 25px; + border-radius: 3px +} + +.el-pagination button { + border: none; + padding: 0 6px; + background: 0 0 +} + +.el-pagination button:focus { + outline: 0 +} + +.el-pagination button:hover { + color: #409EFF +} + +.el-pagination button:disabled { + color: #C0C4CC; + background-color: #FFF; + cursor: not-allowed +} + +.el-pagination .btn-next, .el-pagination .btn-prev { + background: center center no-repeat #FFF; + background-size: 16px; + cursor: pointer; + margin: 0; + color: #303133 +} + +.el-pagination .btn-next .el-icon, .el-pagination .btn-prev .el-icon { + display: block; + font-size: 12px; + font-weight: 700 +} + +.el-pagination .btn-prev { + padding-right: 12px +} + +.el-pagination .btn-next { + padding-left: 12px +} + +.el-pagination .el-pager li.disabled { + color: #C0C4CC; + cursor: not-allowed +} + +.el-pager li, .el-pager li.btn-quicknext:hover, .el-pager li.btn-quickprev:hover { + cursor: pointer +} + +.el-pagination--small .btn-next, .el-pagination--small .btn-prev, .el-pagination--small .el-pager li, .el-pagination--small .el-pager li.btn-quicknext, .el-pagination--small .el-pager li.btn-quickprev, .el-pagination--small .el-pager li:last-child { + border-color: transparent; + font-size: 12px; + line-height: 22px; + height: 22px; + min-width: 22px +} + +.el-pagination--small .more::before, .el-pagination--small li.more::before { + line-height: 24px +} + +.el-pagination--small button, .el-pagination--small span:not([class*=suffix]) { + height: 22px; + line-height: 22px +} + +.el-pagination--small .el-pagination__editor, .el-pagination--small .el-pagination__editor.el-input .el-input__inner { + height: 22px +} + +.el-pagination__sizes { + margin: 0 10px 0 0; + font-weight: 400; + color: #606266 +} + +.el-pagination__sizes .el-input .el-input__inner { + font-size: 13px; + padding-left: 8px +} + +.el-pagination__sizes .el-input .el-input__inner:hover { + border-color: #409EFF +} + +.el-pagination__total { + margin-right: 10px; + font-weight: 400; + color: #606266 +} + +.el-pagination__jump { + margin-left: 24px; + font-weight: 400; + color: #606266 +} + +.el-pagination__jump .el-input__inner { + padding: 0 3px +} + +.el-pagination__rightwrapper { + float: right +} + +.el-pagination__editor { + line-height: 18px; + padding: 0 2px; + height: 28px; + text-align: center; + margin: 0 2px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border-radius: 3px +} + +.el-pager, .el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev { + padding: 0 +} + +.el-pagination__editor.el-input { + width: 50px +} + +.el-pagination__editor.el-input .el-input__inner { + height: 28px +} + +.el-pagination__editor .el-input__inner::-webkit-inner-spin-button, .el-pagination__editor .el-input__inner::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0 +} + +.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev, .el-pagination.is-background .el-pager li { + margin: 0 5px; + background-color: #f4f4f5; + color: #606266; + min-width: 30px; + border-radius: 2px +} + +.el-pagination.is-background .btn-next.disabled, .el-pagination.is-background .btn-next:disabled, .el-pagination.is-background .btn-prev.disabled, .el-pagination.is-background .btn-prev:disabled, .el-pagination.is-background .el-pager li.disabled { + color: #C0C4CC +} + +.el-pagination.is-background .el-pager li:not(.disabled):hover { + color: #409EFF +} + +.el-pagination.is-background .el-pager li:not(.disabled).active { + background-color: #409EFF; + color: #FFF +} + +.el-dialog, .el-pager li { + background: #FFF; + -webkit-box-sizing: border-box +} + +.el-pagination.is-background.el-pagination--small .btn-next, .el-pagination.is-background.el-pagination--small .btn-prev, .el-pagination.is-background.el-pagination--small .el-pager li { + margin: 0 3px; + min-width: 22px +} + +.el-pager, .el-pager li { + vertical-align: top; + margin: 0; + display: inline-block +} + +.el-pager { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + list-style: none; + font-size: 0 +} + +.el-date-table, .el-table th.el-table__cell { + -webkit-user-select: none; + -moz-user-select: none +} + +.el-pager .more::before { + line-height: 30px +} + +.el-pager li { + padding: 0 4px; + font-size: 13px; + min-width: 35.5px; + height: 28px; + line-height: 28px; + box-sizing: border-box; + text-align: center +} + +.el-menu--collapse .el-menu .el-submenu, .el-menu--popup { + min-width: 200px +} + +.el-pager li.btn-quicknext, .el-pager li.btn-quickprev { + line-height: 28px; + color: #303133 +} + +.el-pager li.btn-quicknext.disabled, .el-pager li.btn-quickprev.disabled { + color: #C0C4CC +} + +.el-pager li.active + li { + border-left: 0 +} + +.el-pager li:hover { + color: #409EFF +} + +.el-pager li.active { + color: #409EFF; + cursor: default +} + +@-webkit-keyframes v-modal-in { + 0% { + opacity: 0 + } +} + +@-webkit-keyframes v-modal-out { + 100% { + opacity: 0 + } +} + +.el-dialog { + position: relative; + margin: 0 auto 50px; + border-radius: 2px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .3); + box-shadow: 0 1px 3px rgba(0, 0, 0, .3); + box-sizing: border-box; + width: 50% +} + +.el-dialog.is-fullscreen { + width: 100%; + margin-top: 0; + margin-bottom: 0; + height: 100%; + overflow: auto +} + +.el-dialog__wrapper { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + overflow: auto; + margin: 0 +} + +.el-dialog__header { + padding: 20px 20px 10px +} + +.el-dialog__headerbtn { + position: absolute; + top: 20px; + right: 20px; + padding: 0; + background: 0 0; + border: none; + outline: 0; + cursor: pointer; + font-size: 16px +} + +.el-dialog__headerbtn .el-dialog__close { + color: #909399 +} + +.el-dialog__headerbtn:focus .el-dialog__close, .el-dialog__headerbtn:hover .el-dialog__close { + color: #409EFF +} + +.el-dialog__title { + line-height: 24px; + font-size: 18px; + color: #303133 +} + +.el-dialog__body { + padding: 30px 20px; + color: #606266; + font-size: 14px; + word-break: break-all +} + +.el-dialog__footer { + padding: 10px 20px 20px; + text-align: right; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-dialog--center { + text-align: center +} + +.el-dialog--center .el-dialog__body { + text-align: initial; + padding: 25px 25px 30px +} + +.el-dialog--center .el-dialog__footer { + text-align: inherit +} + +.dialog-fade-enter-active { + -webkit-animation: dialog-fade-in .3s; + animation: dialog-fade-in .3s +} + +.dialog-fade-leave-active { + -webkit-animation: dialog-fade-out .3s; + animation: dialog-fade-out .3s +} + +@-webkit-keyframes dialog-fade-in { + 0% { + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + opacity: 0 + } + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1 + } +} + +@keyframes dialog-fade-in { + 0% { + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + opacity: 0 + } + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1 + } +} + +@-webkit-keyframes dialog-fade-out { + 0% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1 + } + 100% { + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + opacity: 0 + } +} + +@keyframes dialog-fade-out { + 0% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1 + } + 100% { + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + opacity: 0 + } +} + +.el-autocomplete { + position: relative; + display: inline-block +} + +.el-autocomplete-suggestion { + margin: 5px 0; + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + border-radius: 4px; + border: 1px solid #E4E7ED; + -webkit-box-sizing: border-box; + box-sizing: border-box; + background-color: #FFF +} + +.el-dropdown-menu, .el-menu--collapse .el-submenu .el-menu { + z-index: 10; + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1) +} + +.el-autocomplete-suggestion__wrap { + max-height: 280px; + padding: 10px 0; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-autocomplete-suggestion__list { + margin: 0; + padding: 0 +} + +.el-autocomplete-suggestion li { + padding: 0 20px; + margin: 0; + line-height: 34px; + cursor: pointer; + color: #606266; + font-size: 14px; + list-style: none; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis +} + +.el-autocomplete-suggestion li.highlighted, .el-autocomplete-suggestion li:hover { + background-color: #F5F7FA +} + +.el-autocomplete-suggestion li.divider { + margin-top: 6px; + border-top: 1px solid #000 +} + +.el-autocomplete-suggestion li.divider:last-child { + margin-bottom: -6px +} + +.el-autocomplete-suggestion.is-loading li { + text-align: center; + height: 100px; + line-height: 100px; + font-size: 20px; + color: #999 +} + +.el-autocomplete-suggestion.is-loading li::after { + display: inline-block; + content: ""; + height: 100%; + vertical-align: middle +} + +.el-autocomplete-suggestion.is-loading li:hover { + background-color: #FFF +} + +.el-autocomplete-suggestion.is-loading .el-icon-loading { + vertical-align: middle +} + +.el-dropdown { + display: inline-block; + position: relative; + color: #606266; + font-size: 14px +} + +.el-dropdown .el-button-group { + display: block +} + +.el-dropdown .el-button-group .el-button { + float: none +} + +.el-dropdown .el-dropdown__caret-button { + padding-left: 5px; + padding-right: 5px; + position: relative; + border-left: none +} + +.el-dropdown .el-dropdown__caret-button::before { + content: ''; + position: absolute; + display: block; + width: 1px; + top: 5px; + bottom: 5px; + left: 0; + background: rgba(255, 255, 255, .5) +} + +.el-dropdown .el-dropdown__caret-button.el-button--default::before { + background: rgba(220, 223, 230, .5) +} + +.el-dropdown .el-dropdown__caret-button:hover:not(.is-disabled)::before { + top: 0; + bottom: 0 +} + +.el-dropdown .el-dropdown__caret-button .el-dropdown__icon { + padding-left: 0 +} + +.el-dropdown__icon { + font-size: 12px; + margin: 0 3px +} + +.el-dropdown [disabled] { + cursor: not-allowed; + color: #bbb +} + +.el-dropdown-menu { + position: absolute; + top: 0; + left: 0; + padding: 10px 0; + margin: 5px 0; + background-color: #FFF; + border: 1px solid #EBEEF5; + border-radius: 4px; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1) +} + +.el-dropdown-menu__item { + list-style: none; + line-height: 36px; + padding: 0 20px; + margin: 0; + font-size: 14px; + color: #606266; + cursor: pointer; + outline: 0 +} + +.el-dropdown-menu__item:focus, .el-dropdown-menu__item:not(.is-disabled):hover { + background-color: #ecf5ff; + color: #66b1ff +} + +.el-dropdown-menu__item i { + margin-right: 5px +} + +.el-dropdown-menu__item--divided { + position: relative; + margin-top: 6px; + border-top: 1px solid #EBEEF5 +} + +.el-dropdown-menu__item--divided:before { + content: ''; + height: 6px; + display: block; + margin: 0 -20px; + background-color: #FFF +} + +.el-dropdown-menu__item.is-disabled { + cursor: default; + color: #bbb; + pointer-events: none +} + +.el-dropdown-menu--medium { + padding: 6px 0 +} + +.el-dropdown-menu--medium .el-dropdown-menu__item { + line-height: 30px; + padding: 0 17px; + font-size: 14px +} + +.el-dropdown-menu--medium .el-dropdown-menu__item.el-dropdown-menu__item--divided { + margin-top: 6px +} + +.el-dropdown-menu--medium .el-dropdown-menu__item.el-dropdown-menu__item--divided:before { + height: 6px; + margin: 0 -17px +} + +.el-dropdown-menu--small { + padding: 6px 0 +} + +.el-dropdown-menu--small .el-dropdown-menu__item { + line-height: 27px; + padding: 0 15px; + font-size: 13px +} + +.el-dropdown-menu--small .el-dropdown-menu__item.el-dropdown-menu__item--divided { + margin-top: 4px +} + +.el-dropdown-menu--small .el-dropdown-menu__item.el-dropdown-menu__item--divided:before { + height: 4px; + margin: 0 -15px +} + +.el-dropdown-menu--mini { + padding: 3px 0 +} + +.el-dropdown-menu--mini .el-dropdown-menu__item { + line-height: 24px; + padding: 0 10px; + font-size: 12px +} + +.el-dropdown-menu--mini .el-dropdown-menu__item.el-dropdown-menu__item--divided { + margin-top: 3px +} + +.el-dropdown-menu--mini .el-dropdown-menu__item.el-dropdown-menu__item--divided:before { + height: 3px; + margin: 0 -10px +} + +.el-menu { + border-right: solid 1px #e6e6e6; + list-style: none; + position: relative; + margin: 0; + padding-left: 0; + background-color: #FFF +} + +.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-submenu .el-submenu__title:hover { + background-color: #fff +} + +.el-menu::after, .el-menu::before { + display: table; + content: "" +} + +.el-menu::after { + clear: both +} + +.el-menu.el-menu--horizontal { + border-bottom: solid 1px #e6e6e6 +} + +.el-menu--horizontal { + border-right: none +} + +.el-menu--horizontal > .el-menu-item { + float: left; + height: 60px; + line-height: 60px; + margin: 0; + border-bottom: 2px solid transparent; + color: #909399 +} + +.el-menu--horizontal > .el-menu-item a, .el-menu--horizontal > .el-menu-item a:hover { + color: inherit +} + +.el-menu--horizontal > .el-submenu { + float: left +} + +.el-menu--horizontal > .el-submenu:focus, .el-menu--horizontal > .el-submenu:hover { + outline: 0 +} + +.el-menu--horizontal > .el-submenu:focus .el-submenu__title, .el-menu--horizontal > .el-submenu:hover .el-submenu__title { + color: #303133 +} + +.el-menu--horizontal > .el-submenu.is-active .el-submenu__title { + border-bottom: 2px solid #409EFF; + color: #303133 +} + +.el-menu--horizontal > .el-submenu .el-submenu__title { + height: 60px; + line-height: 60px; + border-bottom: 2px solid transparent; + color: #909399 +} + +.el-menu--horizontal > .el-submenu .el-submenu__icon-arrow { + position: static; + vertical-align: middle; + margin-left: 8px; + margin-top: -3px +} + +.el-menu--horizontal .el-menu .el-menu-item, .el-menu--horizontal .el-menu .el-submenu__title { + background-color: #FFF; + float: none; + height: 36px; + line-height: 36px; + padding: 0 10px; + color: #909399 +} + +.el-menu--horizontal .el-menu .el-menu-item.is-active, .el-menu--horizontal .el-menu .el-submenu.is-active > .el-submenu__title { + color: #303133 +} + +.el-menu--horizontal .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal .el-menu-item:not(.is-disabled):hover { + outline: 0; + color: #303133 +} + +.el-menu--horizontal > .el-menu-item.is-active { + border-bottom: 2px solid #409EFF; + color: #303133 +} + +.el-menu--collapse { + width: 64px +} + +.el-menu--collapse > .el-menu-item [class^=el-icon-], .el-menu--collapse > .el-submenu > .el-submenu__title [class^=el-icon-] { + margin: 0; + vertical-align: middle; + width: 24px; + text-align: center +} + +.el-menu--collapse > .el-menu-item .el-submenu__icon-arrow, .el-menu--collapse > .el-submenu > .el-submenu__title .el-submenu__icon-arrow { + display: none +} + +.el-menu--collapse > .el-menu-item span, .el-menu--collapse > .el-submenu > .el-submenu__title span { + height: 0; + width: 0; + overflow: hidden; + visibility: hidden; + display: inline-block +} + +.el-menu--collapse > .el-menu-item.is-active i { + color: inherit +} + +.el-menu--collapse .el-submenu { + position: relative +} + +.el-menu--collapse .el-submenu .el-menu { + position: absolute; + margin-left: 5px; + top: 0; + left: 100%; + border: 1px solid #E4E7ED; + border-radius: 2px; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1) +} + +.el-menu-item, .el-submenu__title { + height: 56px; + line-height: 56px; + position: relative; + -webkit-box-sizing: border-box; + white-space: nowrap; + list-style: none +} + +.el-menu--collapse .el-submenu.is-opened > .el-submenu__title .el-submenu__icon-arrow { + -webkit-transform: none; + transform: none +} + +.el-menu--popup { + z-index: 100; + border: none; + padding: 5px 0; + border-radius: 2px; + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1) +} + +.el-menu--popup-bottom-start { + margin-top: 5px +} + +.el-menu--popup-right-start { + margin-left: 5px; + margin-right: 5px +} + +.el-menu-item { + font-size: 14px; + color: #303133; + padding: 0 20px; + cursor: pointer; + -webkit-transition: border-color .3s, background-color .3s, color .3s; + transition: border-color .3s, background-color .3s, color .3s; + box-sizing: border-box +} + +.el-menu-item * { + vertical-align: middle +} + +.el-menu-item i { + color: #909399 +} + +.el-menu-item:focus, .el-menu-item:hover { + outline: 0; + background-color: #ecf5ff +} + +.el-menu-item.is-disabled { + opacity: .25; + cursor: not-allowed; + background: 0 0 !important +} + +.el-menu-item [class^=el-icon-] { + margin-right: 5px; + width: 24px; + text-align: center; + font-size: 18px; + vertical-align: middle +} + +.el-menu-item.is-active { + color: #409EFF +} + +.el-menu-item.is-active i { + color: inherit +} + +.el-submenu { + list-style: none; + margin: 0; + padding-left: 0 +} + +.el-submenu__title { + font-size: 14px; + color: #303133; + padding: 0 20px; + cursor: pointer; + -webkit-transition: border-color .3s, background-color .3s, color .3s; + transition: border-color .3s, background-color .3s, color .3s; + box-sizing: border-box +} + +.el-submenu__title * { + vertical-align: middle +} + +.el-submenu__title i { + color: #909399 +} + +.el-submenu__title:focus, .el-submenu__title:hover { + outline: 0; + background-color: #ecf5ff +} + +.el-submenu__title.is-disabled { + opacity: .25; + cursor: not-allowed; + background: 0 0 !important +} + +.el-submenu__title:hover { + background-color: #ecf5ff +} + +.el-submenu .el-menu { + border: none +} + +.el-submenu .el-menu-item { + height: 50px; + line-height: 50px; + padding: 0 45px; + min-width: 200px +} + +.el-submenu__icon-arrow { + position: absolute; + top: 50%; + right: 20px; + margin-top: -7px; + -webkit-transition: -webkit-transform .3s; + transition: -webkit-transform .3s; + transition: transform .3s; + transition: transform .3s, -webkit-transform .3s; + font-size: 12px +} + +.el-submenu.is-active .el-submenu__title { + border-bottom-color: #409EFF +} + +.el-submenu.is-opened > .el-submenu__title .el-submenu__icon-arrow { + -webkit-transform: rotateZ(180deg); + transform: rotateZ(180deg) +} + +.el-submenu.is-disabled .el-menu-item, .el-submenu.is-disabled .el-submenu__title { + opacity: .25; + cursor: not-allowed; + background: 0 0 !important +} + +.el-submenu [class^=el-icon-] { + vertical-align: middle; + margin-right: 5px; + width: 24px; + text-align: center; + font-size: 18px +} + +.el-menu-item-group > ul { + padding: 0 +} + +.el-menu-item-group__title { + padding: 7px 0 7px 20px; + line-height: normal; + font-size: 12px; + color: #909399 +} + +.el-radio-button__inner, .el-radio-group { + display: inline-block; + line-height: 1; + vertical-align: middle +} + +.horizontal-collapse-transition .el-submenu__title .el-submenu__icon-arrow { + -webkit-transition: .2s; + transition: .2s; + opacity: 0 +} + +.el-radio-group { + font-size: 0 +} + +.el-radio-button { + position: relative; + display: inline-block; + outline: 0 +} + +.el-radio-button__inner { + white-space: nowrap; + background: #FFF; + border: 1px solid #DCDFE6; + font-weight: 500; + border-left: 0; + color: #606266; + -webkit-appearance: none; + text-align: center; + -webkit-box-sizing: border-box; + box-sizing: border-box; + outline: 0; + margin: 0; + position: relative; + cursor: pointer; + -webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1); + transition: all .3s cubic-bezier(.645, .045, .355, 1); + padding: 12px 20px; + font-size: 14px; + border-radius: 0 +} + +.el-radio-button__inner.is-round { + padding: 12px 20px +} + +.el-radio-button__inner:hover { + color: #409EFF +} + +.el-radio-button__inner [class*=el-icon-] { + line-height: .9 +} + +.el-radio-button__inner [class*=el-icon-] + span { + margin-left: 5px +} + +.el-radio-button:first-child .el-radio-button__inner { + border-left: 1px solid #DCDFE6; + border-radius: 4px 0 0 4px; + -webkit-box-shadow: none !important; + box-shadow: none !important +} + +.el-radio-button__orig-radio { + opacity: 0; + outline: 0; + position: absolute; + z-index: -1 +} + +.el-radio-button__orig-radio:checked + .el-radio-button__inner { + color: #FFF; + background-color: #409EFF; + border-color: #409EFF; + -webkit-box-shadow: -1px 0 0 0 #409EFF; + box-shadow: -1px 0 0 0 #409EFF +} + +.el-radio-button__orig-radio:disabled + .el-radio-button__inner { + color: #C0C4CC; + cursor: not-allowed; + background-image: none; + background-color: #FFF; + border-color: #EBEEF5; + -webkit-box-shadow: none; + box-shadow: none +} + +.el-radio-button__orig-radio:disabled:checked + .el-radio-button__inner { + background-color: #F2F6FC +} + +.el-radio-button:last-child .el-radio-button__inner { + border-radius: 0 4px 4px 0 +} + +.el-popover, .el-radio-button:first-child:last-child .el-radio-button__inner { + border-radius: 4px +} + +.el-radio-button--medium .el-radio-button__inner { + padding: 10px 20px; + font-size: 14px; + border-radius: 0 +} + +.el-radio-button--medium .el-radio-button__inner.is-round { + padding: 10px 20px +} + +.el-radio-button--small .el-radio-button__inner { + padding: 9px 15px; + font-size: 12px; + border-radius: 0 +} + +.el-radio-button--small .el-radio-button__inner.is-round { + padding: 9px 15px +} + +.el-radio-button--mini .el-radio-button__inner { + padding: 7px 15px; + font-size: 12px; + border-radius: 0 +} + +.el-radio-button--mini .el-radio-button__inner.is-round { + padding: 7px 15px +} + +.el-radio-button:focus:not(.is-focus):not(:active):not(.is-disabled) { + -webkit-box-shadow: 0 0 2px 2px #409EFF; + box-shadow: 0 0 2px 2px #409EFF +} + +.el-switch { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + position: relative; + font-size: 14px; + line-height: 20px; + height: 20px; + vertical-align: middle +} + +.el-switch__core, .el-switch__label { + display: inline-block; + cursor: pointer +} + +.el-switch.is-disabled .el-switch__core, .el-switch.is-disabled .el-switch__label { + cursor: not-allowed +} + +.el-switch__label { + -webkit-transition: .2s; + transition: .2s; + height: 20px; + font-size: 14px; + font-weight: 500; + vertical-align: middle; + color: #303133 +} + +.el-switch__label.is-active { + color: #409EFF +} + +.el-switch__label--left { + margin-right: 10px +} + +.el-switch__label--right { + margin-left: 10px +} + +.el-switch__label * { + line-height: 1; + font-size: 14px; + display: inline-block +} + +.el-switch__input { + position: absolute; + width: 0; + height: 0; + opacity: 0; + margin: 0 +} + +.el-switch__core { + margin: 0; + position: relative; + width: 40px; + height: 20px; + border: 1px solid #DCDFE6; + outline: 0; + border-radius: 10px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + background: #DCDFE6; + -webkit-transition: border-color .3s, background-color .3s; + transition: border-color .3s, background-color .3s; + vertical-align: middle +} + +.el-switch__core:after { + content: ""; + position: absolute; + top: 1px; + left: 1px; + border-radius: 100%; + -webkit-transition: all .3s; + transition: all .3s; + width: 16px; + height: 16px; + background-color: #FFF +} + +.el-switch.is-checked .el-switch__core { + border-color: #409EFF; + background-color: #409EFF +} + +.el-switch.is-checked .el-switch__core::after { + left: 100%; + margin-left: -17px +} + +.el-switch.is-disabled { + opacity: .6 +} + +.el-switch--wide .el-switch__label.el-switch__label--left span { + left: 10px +} + +.el-switch--wide .el-switch__label.el-switch__label--right span { + right: 10px +} + +.el-switch .label-fade-enter, .el-switch .label-fade-leave-active { + opacity: 0 +} + +.el-select-dropdown { + position: absolute; + z-index: 1001; + border: 1px solid #E4E7ED; + border-radius: 4px; + background-color: #FFF; + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin: 5px 0 +} + +.el-select-dropdown.is-multiple .el-select-dropdown__item { + padding-right: 40px +} + +.el-select-dropdown.is-multiple .el-select-dropdown__item.selected { + color: #409EFF; + background-color: #FFF +} + +.el-select-dropdown.is-multiple .el-select-dropdown__item.selected.hover { + background-color: #F5F7FA +} + +.el-select-dropdown.is-multiple .el-select-dropdown__item.selected::after { + position: absolute; + right: 20px; + font-family: element-icons; + content: "\e6da"; + font-size: 12px; + font-weight: 700; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale +} + +.el-select-dropdown .el-scrollbar.is-empty .el-select-dropdown__list { + padding: 0 +} + +.el-select-dropdown__empty { + padding: 10px 0; + margin: 0; + text-align: center; + color: #999; + font-size: 14px +} + +.el-select-dropdown__wrap { + max-height: 274px +} + +.el-select-dropdown__list { + list-style: none; + padding: 6px 0; + margin: 0; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-select-dropdown__item { + font-size: 14px; + padding: 0 20px; + position: relative; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: #606266; + height: 34px; + line-height: 34px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + cursor: pointer +} + +.el-select-dropdown__item.is-disabled { + color: #C0C4CC; + cursor: not-allowed +} + +.el-select-dropdown__item.is-disabled:hover { + background-color: #FFF +} + +.el-select-dropdown__item.hover, .el-select-dropdown__item:hover { + background-color: #F5F7FA +} + +.el-select-dropdown__item.selected { + color: #409EFF; + font-weight: 700 +} + +.el-select-group { + margin: 0; + padding: 0 +} + +.el-select-group__wrap { + position: relative; + list-style: none; + margin: 0; + padding: 0 +} + +.el-select-group__wrap:not(:last-of-type) { + padding-bottom: 24px +} + +.el-select-group__wrap:not(:last-of-type)::after { + content: ''; + position: absolute; + display: block; + left: 20px; + right: 20px; + bottom: 12px; + height: 1px; + background: #E4E7ED +} + +.el-select-group__title { + padding-left: 20px; + font-size: 12px; + color: #909399; + line-height: 30px +} + +.el-select-group .el-select-dropdown__item { + padding-left: 20px +} + +.el-select { + display: inline-block; + position: relative +} + +.el-select .el-select__tags > span { + display: contents +} + +.el-select:hover .el-input__inner { + border-color: #C0C4CC +} + +.el-select .el-input__inner { + cursor: pointer; + padding-right: 35px +} + +.el-select .el-input__inner:focus { + border-color: #409EFF +} + +.el-select .el-input .el-select__caret { + color: #C0C4CC; + font-size: 14px; + -webkit-transition: -webkit-transform .3s; + transition: -webkit-transform .3s; + transition: transform .3s; + transition: transform .3s, -webkit-transform .3s; + -webkit-transform: rotateZ(180deg); + transform: rotateZ(180deg); + cursor: pointer +} + +.el-select .el-input .el-select__caret.is-reverse { + -webkit-transform: rotateZ(0); + transform: rotateZ(0) +} + +.el-select .el-input .el-select__caret.is-show-close { + font-size: 14px; + text-align: center; + -webkit-transform: rotateZ(180deg); + transform: rotateZ(180deg); + border-radius: 100%; + color: #C0C4CC; + -webkit-transition: color .2s cubic-bezier(.645, .045, .355, 1); + transition: color .2s cubic-bezier(.645, .045, .355, 1) +} + +.el-select .el-input .el-select__caret.is-show-close:hover { + color: #909399 +} + +.el-select .el-input.is-disabled .el-input__inner { + cursor: not-allowed +} + +.el-select .el-input.is-disabled .el-input__inner:hover { + border-color: #E4E7ED +} + +.el-select .el-input.is-focus .el-input__inner { + border-color: #409EFF +} + +.el-select > .el-input { + display: block +} + +.el-select__input { + border: none; + outline: 0; + padding: 0; + margin-left: 15px; + color: #666; + font-size: 14px; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + height: 28px; + background-color: transparent +} + +.el-select__input.is-mini { + height: 14px +} + +.el-select__close { + cursor: pointer; + position: absolute; + top: 8px; + z-index: 1000; + right: 25px; + color: #C0C4CC; + line-height: 18px; + font-size: 14px +} + +.el-select__close:hover { + color: #909399 +} + +.el-select__tags { + position: absolute; + line-height: normal; + white-space: normal; + z-index: 1; + top: 50%; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -ms-flex-wrap: wrap; + flex-wrap: wrap +} + +.el-select__tags-text { + overflow: hidden; + text-overflow: ellipsis +} + +.el-select .el-tag { + -webkit-box-sizing: border-box; + box-sizing: border-box; + border-color: transparent; + margin: 2px 0 2px 6px; + background-color: #f0f2f5; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + max-width: 100%; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center +} + +.el-select .el-tag__close.el-icon-close { + background-color: #C0C4CC; + top: 0; + color: #FFF; + -ms-flex-negative: 0; + flex-shrink: 0 +} + +.el-select .el-tag__close.el-icon-close:hover { + background-color: #909399 +} + +.el-table, .el-table__expanded-cell { + background-color: #FFF +} + +.el-select .el-tag__close.el-icon-close::before { + display: block; + -webkit-transform: translate(0, .5px); + transform: translate(0, .5px) +} + +.el-table { + position: relative; + overflow: hidden; + -webkit-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + width: 100%; + max-width: 100%; + font-size: 14px; + color: #606266 +} + +.el-table--mini, .el-table--small, .el-table__expand-icon { + font-size: 12px +} + +.el-table__empty-block { + min-height: 60px; + text-align: center; + width: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center +} + +.el-table__empty-text { + line-height: 60px; + width: 50%; + color: #909399 +} + +.el-table__expand-column .cell { + padding: 0; + text-align: center +} + +.el-table__expand-icon { + position: relative; + cursor: pointer; + color: #666; + -webkit-transition: -webkit-transform .2s ease-in-out; + transition: -webkit-transform .2s ease-in-out; + transition: transform .2s ease-in-out; + transition: transform .2s ease-in-out, -webkit-transform .2s ease-in-out; + height: 20px +} + +.el-table__expand-icon--expanded { + -webkit-transform: rotate(90deg); + transform: rotate(90deg) +} + +.el-table__expand-icon > .el-icon { + position: absolute; + left: 50%; + top: 50%; + margin-left: -5px; + margin-top: -5px +} + +.el-table__expanded-cell[class*=cell] { + padding: 20px 50px +} + +.el-table__expanded-cell:hover { + background-color: transparent !important +} + +.el-table__placeholder { + display: inline-block; + width: 20px +} + +.el-table__append-wrapper { + overflow: hidden +} + +.el-table--fit { + border-right: 0; + border-bottom: 0 +} + +.el-table--fit .el-table__cell.gutter { + border-right-width: 1px +} + +.el-table--scrollable-x .el-table__body-wrapper { + overflow-x: auto +} + +.el-table--scrollable-y .el-table__body-wrapper { + overflow-y: auto +} + +.el-table thead { + color: #909399; + font-weight: 500 +} + +.el-table thead.is-group th.el-table__cell { + background: #F5F7FA +} + +.el-table .el-table__cell { + padding: 12px 0; + min-width: 0; + -webkit-box-sizing: border-box; + box-sizing: border-box; + text-overflow: ellipsis; + vertical-align: middle; + position: relative; + text-align: left +} + +.el-table .el-table__cell.is-center { + text-align: center +} + +.el-table .el-table__cell.is-right { + text-align: right +} + +.el-table .el-table__cell.gutter { + width: 15px; + border-right-width: 0; + border-bottom-width: 0; + padding: 0 +} + +.el-table--medium .el-table__cell { + padding: 10px 0 +} + +.el-table--small .el-table__cell { + padding: 8px 0 +} + +.el-table--mini .el-table__cell { + padding: 6px 0 +} + +.el-table .cell, .el-table--border .el-table__cell:first-child .cell { + padding-left: 10px +} + +.el-table tr { + background-color: #FFF +} + +.el-table tr input[type=checkbox] { + margin: 0 +} + +.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf { + border-bottom: 1px solid #EBEEF5 +} + +.el-table th.el-table__cell.is-sortable { + cursor: pointer +} + +.el-table th.el-table__cell { + overflow: hidden; + -ms-user-select: none; + user-select: none; + background-color: #FFF +} + +.el-table th.el-table__cell > .cell { + display: inline-block; + -webkit-box-sizing: border-box; + box-sizing: border-box; + position: relative; + vertical-align: middle; + padding-left: 10px; + padding-right: 10px; + width: 100% +} + +.el-table th.el-table__cell > .cell.highlight { + color: #409EFF +} + +.el-table th.el-table__cell.required > div::before { + display: inline-block; + content: ""; + width: 8px; + height: 8px; + border-radius: 50%; + background: #ff4d51; + margin-right: 5px; + vertical-align: middle +} + +.el-table td.el-table__cell div { + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-table td.el-table__cell.gutter { + width: 0 +} + +.el-table .cell { + -webkit-box-sizing: border-box; + box-sizing: border-box; + overflow: hidden; + text-overflow: ellipsis; + white-space: normal; + word-break: break-all; + line-height: 23px; + padding-right: 10px +} + +.el-table .cell.el-tooltip { + white-space: nowrap; + min-width: 50px +} + +.el-table--border, .el-table--group { + border: 1px solid #EBEEF5 +} + +.el-table--border::after, .el-table--group::after, .el-table::before { + content: ''; + position: absolute; + background-color: #EBEEF5; + z-index: 1 +} + +.el-table--border::after, .el-table--group::after { + top: 0; + right: 0; + width: 1px; + height: 100% +} + +.el-table::before { + left: 0; + bottom: 0; + width: 100%; + height: 1px +} + +.el-table--border { + border-right: none; + border-bottom: none +} + +.el-table--border.el-loading-parent--relative { + border-color: transparent +} + +.el-table--border .el-table__cell, .el-table__body-wrapper .el-table--border.is-scrolling-left ~ .el-table__fixed { + border-right: 1px solid #EBEEF5 +} + +.el-table--border th.el-table__cell.gutter:last-of-type { + border-bottom: 1px solid #EBEEF5; + border-bottom-width: 1px +} + +.el-table--border th.el-table__cell, .el-table__fixed-right-patch { + border-bottom: 1px solid #EBEEF5 +} + +.el-table__fixed, .el-table__fixed-right { + position: absolute; + top: 0; + left: 0; + overflow-x: hidden; + overflow-y: hidden; + -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, .12); + box-shadow: 0 0 10px rgba(0, 0, 0, .12) +} + +.el-table__fixed-right::before, .el-table__fixed::before { + content: ''; + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 1px; + background-color: #EBEEF5; + z-index: 4 +} + +.el-table__fixed-right-patch { + position: absolute; + top: -1px; + right: 0; + background-color: #FFF +} + +.el-table__fixed-right { + top: 0; + left: auto; + right: 0 +} + +.el-table__fixed-right .el-table__fixed-body-wrapper, .el-table__fixed-right .el-table__fixed-footer-wrapper, .el-table__fixed-right .el-table__fixed-header-wrapper { + left: auto; + right: 0 +} + +.el-table__fixed-header-wrapper { + position: absolute; + left: 0; + top: 0; + z-index: 3 +} + +.el-table__fixed-footer-wrapper { + position: absolute; + left: 0; + bottom: 0; + z-index: 3 +} + +.el-table__fixed-footer-wrapper tbody td.el-table__cell { + border-top: 1px solid #EBEEF5; + background-color: #F5F7FA; + color: #606266 +} + +.el-table__fixed-body-wrapper { + position: absolute; + left: 0; + top: 37px; + overflow: hidden; + z-index: 3 +} + +.el-table__body-wrapper, .el-table__footer-wrapper, .el-table__header-wrapper { + width: 100% +} + +.el-table__footer-wrapper { + margin-top: -1px +} + +.el-table__footer-wrapper td.el-table__cell { + border-top: 1px solid #EBEEF5 +} + +.el-table__body, .el-table__footer, .el-table__header { + table-layout: fixed; + border-collapse: separate +} + +.el-table__footer-wrapper, .el-table__header-wrapper { + overflow: hidden +} + +.el-table__footer-wrapper tbody td.el-table__cell, .el-table__header-wrapper tbody td.el-table__cell { + background-color: #F5F7FA; + color: #606266 +} + +.el-table__body-wrapper { + overflow: hidden; + position: relative +} + +.el-table__body-wrapper.is-scrolling-left ~ .el-table__fixed, .el-table__body-wrapper.is-scrolling-none ~ .el-table__fixed, .el-table__body-wrapper.is-scrolling-none ~ .el-table__fixed-right, .el-table__body-wrapper.is-scrolling-right ~ .el-table__fixed-right { + -webkit-box-shadow: none; + box-shadow: none +} + +.el-picker-panel, .el-table-filter { + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1) +} + +.el-table__body-wrapper .el-table--border.is-scrolling-right ~ .el-table__fixed-right { + border-left: 1px solid #EBEEF5 +} + +.el-table .caret-wrapper { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + height: 34px; + width: 24px; + vertical-align: middle; + cursor: pointer; + overflow: initial; + position: relative +} + +.el-table .sort-caret { + width: 0; + height: 0; + border: 5px solid transparent; + position: absolute; + left: 7px +} + +.el-table .sort-caret.ascending { + border-bottom-color: #C0C4CC; + top: 5px +} + +.el-table .sort-caret.descending { + border-top-color: #C0C4CC; + bottom: 7px +} + +.el-table .ascending .sort-caret.ascending { + border-bottom-color: #409EFF +} + +.el-table .descending .sort-caret.descending { + border-top-color: #409EFF +} + +.el-table .hidden-columns { + position: absolute; + z-index: -1 +} + +.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell { + background: #FAFAFA +} + +.el-table--striped .el-table__body tr.el-table__row--striped.current-row td.el-table__cell { + background-color: #ecf5ff +} + +.el-table__body tr.hover-row.current-row > td.el-table__cell, .el-table__body tr.hover-row.el-table__row--striped.current-row > td.el-table__cell, .el-table__body tr.hover-row.el-table__row--striped > td.el-table__cell, .el-table__body tr.hover-row > td.el-table__cell { + background-color: #F5F7FA +} + +.el-table__body tr.current-row > td.el-table__cell { + background-color: #ecf5ff +} + +.el-table__column-resize-proxy { + position: absolute; + left: 200px; + top: 0; + bottom: 0; + width: 0; + border-left: 1px solid #EBEEF5; + z-index: 10 +} + +.el-table__column-filter-trigger { + display: inline-block; + line-height: 34px; + cursor: pointer +} + +.el-table__column-filter-trigger i { + color: #909399; + font-size: 12px; + -webkit-transform: scale(.75); + transform: scale(.75) +} + +.el-table--enable-row-transition .el-table__body td.el-table__cell { + -webkit-transition: background-color .25s ease; + transition: background-color .25s ease +} + +.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell { + background-color: #F5F7FA +} + +.el-table--fluid-height .el-table__fixed, .el-table--fluid-height .el-table__fixed-right { + bottom: 0; + overflow: hidden +} + +.el-table [class*=el-table__row--level] .el-table__expand-icon { + display: inline-block; + width: 20px; + line-height: 20px; + height: 20px; + text-align: center; + margin-right: 3px +} + +.el-table-column--selection .cell { + padding-left: 14px; + padding-right: 14px +} + +.el-table-filter { + border: 1px solid #EBEEF5; + border-radius: 2px; + background-color: #FFF; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin: 2px 0 +} + +.el-date-table td, .el-date-table td div { + height: 30px; + -webkit-box-sizing: border-box +} + +.el-table-filter__list { + padding: 5px 0; + margin: 0; + list-style: none; + min-width: 100px +} + +.el-table-filter__list-item { + line-height: 36px; + padding: 0 10px; + cursor: pointer; + font-size: 14px +} + +.el-table-filter__list-item:hover { + background-color: #ecf5ff; + color: #66b1ff +} + +.el-table-filter__list-item.is-active { + background-color: #409EFF; + color: #FFF +} + +.el-table-filter__content { + min-width: 100px +} + +.el-table-filter__bottom { + border-top: 1px solid #EBEEF5; + padding: 8px +} + +.el-table-filter__bottom button { + background: 0 0; + border: none; + color: #606266; + cursor: pointer; + font-size: 13px; + padding: 0 3px +} + +.el-date-table td.in-range div, .el-date-table td.in-range div:hover, .el-date-table.is-week-mode .el-date-table__row.current div, .el-date-table.is-week-mode .el-date-table__row:hover div { + background-color: #F2F6FC +} + +.el-table-filter__bottom button:hover { + color: #409EFF +} + +.el-table-filter__bottom button:focus { + outline: 0 +} + +.el-table-filter__bottom button.is-disabled { + color: #C0C4CC; + cursor: not-allowed +} + +.el-table-filter__wrap { + max-height: 280px +} + +.el-table-filter__checkbox-group { + padding: 10px +} + +.el-table-filter__checkbox-group label.el-checkbox { + display: block; + margin-right: 5px; + margin-bottom: 8px; + margin-left: 5px +} + +.el-table-filter__checkbox-group .el-checkbox:last-child { + margin-bottom: 0 +} + +.el-date-table { + font-size: 12px; + -ms-user-select: none; + user-select: none +} + +.el-date-table.is-week-mode .el-date-table__row:hover td.available:hover { + color: #606266 +} + +.el-date-table.is-week-mode .el-date-table__row:hover td:first-child div { + margin-left: 5px; + border-top-left-radius: 15px; + border-bottom-left-radius: 15px +} + +.el-date-table.is-week-mode .el-date-table__row:hover td:last-child div { + margin-right: 5px; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px +} + +.el-date-table td { + width: 32px; + padding: 4px 0; + box-sizing: border-box; + text-align: center; + cursor: pointer; + position: relative +} + +.el-date-table td div { + padding: 3px 0; + box-sizing: border-box +} + +.el-date-table td span { + width: 24px; + height: 24px; + display: block; + margin: 0 auto; + line-height: 24px; + position: absolute; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + border-radius: 50% +} + +.el-date-table td.next-month, .el-date-table td.prev-month { + color: #C0C4CC +} + +.el-date-table td.today { + position: relative +} + +.el-date-table td.today span { + color: #409EFF; + font-weight: 700 +} + +.el-date-table td.today.end-date span, .el-date-table td.today.start-date span { + color: #FFF +} + +.el-date-table td.available:hover { + color: #409EFF +} + +.el-date-table td.current:not(.disabled) span { + color: #FFF; + background-color: #409EFF +} + +.el-date-table td.end-date div, .el-date-table td.start-date div { + color: #FFF +} + +.el-date-table td.end-date span, .el-date-table td.start-date span { + background-color: #409EFF +} + +.el-date-table td.start-date div { + margin-left: 5px; + border-top-left-radius: 15px; + border-bottom-left-radius: 15px +} + +.el-date-table td.end-date div { + margin-right: 5px; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px +} + +.el-date-table td.disabled div { + background-color: #F5F7FA; + opacity: 1; + cursor: not-allowed; + color: #C0C4CC +} + +.el-date-table td.selected div { + margin-left: 5px; + margin-right: 5px; + background-color: #F2F6FC; + border-radius: 15px +} + +.el-date-table td.selected div:hover { + background-color: #F2F6FC +} + +.el-date-table td.selected span { + background-color: #409EFF; + color: #FFF; + border-radius: 15px +} + +.el-date-table td.week { + font-size: 80%; + color: #606266 +} + +.el-month-table, .el-year-table { + font-size: 12px; + border-collapse: collapse +} + +.el-date-table th { + padding: 5px; + color: #606266; + font-weight: 400; + border-bottom: solid 1px #EBEEF5 +} + +.el-month-table { + margin: -1px +} + +.el-month-table td { + text-align: center; + padding: 8px 0; + cursor: pointer +} + +.el-month-table td div { + height: 48px; + padding: 6px 0; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-month-table td.today .cell { + color: #409EFF; + font-weight: 700 +} + +.el-month-table td.today.end-date .cell, .el-month-table td.today.start-date .cell { + color: #FFF +} + +.el-month-table td.disabled .cell { + background-color: #F5F7FA; + cursor: not-allowed; + color: #C0C4CC +} + +.el-month-table td.disabled .cell:hover { + color: #C0C4CC +} + +.el-month-table td .cell { + width: 60px; + height: 36px; + display: block; + line-height: 36px; + color: #606266; + margin: 0 auto; + border-radius: 18px +} + +.el-month-table td .cell:hover { + color: #409EFF +} + +.el-month-table td.in-range div, .el-month-table td.in-range div:hover { + background-color: #F2F6FC +} + +.el-month-table td.end-date div, .el-month-table td.start-date div { + color: #FFF +} + +.el-month-table td.end-date .cell, .el-month-table td.start-date .cell { + color: #FFF; + background-color: #409EFF +} + +.el-month-table td.start-date div { + border-top-left-radius: 24px; + border-bottom-left-radius: 24px +} + +.el-month-table td.end-date div { + border-top-right-radius: 24px; + border-bottom-right-radius: 24px +} + +.el-month-table td.current:not(.disabled) .cell { + color: #409EFF +} + +.el-year-table { + margin: -1px +} + +.el-year-table .el-icon { + color: #303133 +} + +.el-year-table td { + text-align: center; + padding: 20px 3px; + cursor: pointer +} + +.el-year-table td.today .cell { + color: #409EFF; + font-weight: 700 +} + +.el-year-table td.disabled .cell { + background-color: #F5F7FA; + cursor: not-allowed; + color: #C0C4CC +} + +.el-year-table td.disabled .cell:hover { + color: #C0C4CC +} + +.el-year-table td .cell { + width: 48px; + height: 32px; + display: block; + line-height: 32px; + color: #606266; + margin: 0 auto +} + +.el-year-table td .cell:hover, .el-year-table td.current:not(.disabled) .cell { + color: #409EFF +} + +.el-date-range-picker { + width: 646px +} + +.el-date-range-picker.has-sidebar { + width: 756px +} + +.el-date-range-picker table { + table-layout: fixed; + width: 100% +} + +.el-date-range-picker .el-picker-panel__body { + min-width: 513px +} + +.el-date-range-picker .el-picker-panel__content { + margin: 0 +} + +.el-date-range-picker__header { + position: relative; + text-align: center; + height: 28px +} + +.el-date-range-picker__header [class*=arrow-left] { + float: left +} + +.el-date-range-picker__header [class*=arrow-right] { + float: right +} + +.el-date-range-picker__header div { + font-size: 16px; + font-weight: 500; + margin-right: 50px +} + +.el-date-range-picker__content { + float: left; + width: 50%; + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin: 0; + padding: 16px +} + +.el-date-range-picker__content.is-left { + border-right: 1px solid #e4e4e4 +} + +.el-date-range-picker__content .el-date-range-picker__header div { + margin-left: 50px; + margin-right: 50px +} + +.el-date-range-picker__editors-wrap { + -webkit-box-sizing: border-box; + box-sizing: border-box; + display: table-cell +} + +.el-date-range-picker__editors-wrap.is-right { + text-align: right +} + +.el-date-range-picker__time-header { + position: relative; + border-bottom: 1px solid #e4e4e4; + font-size: 12px; + padding: 8px 5px 5px; + display: table; + width: 100%; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-date-range-picker__time-header > .el-icon-arrow-right { + font-size: 20px; + vertical-align: middle; + display: table-cell; + color: #303133 +} + +.el-date-range-picker__time-picker-wrap { + position: relative; + display: table-cell; + padding: 0 5px +} + +.el-date-range-picker__time-picker-wrap .el-picker-panel { + position: absolute; + top: 13px; + right: 0; + z-index: 1; + background: #FFF +} + +.el-date-picker { + width: 322px +} + +.el-date-picker.has-sidebar.has-time { + width: 434px +} + +.el-date-picker.has-sidebar { + width: 438px +} + +.el-date-picker.has-time .el-picker-panel__body-wrapper { + position: relative +} + +.el-date-picker .el-picker-panel__content { + width: 292px +} + +.el-date-picker table { + table-layout: fixed; + width: 100% +} + +.el-date-picker__editor-wrap { + position: relative; + display: table-cell; + padding: 0 5px +} + +.el-date-picker__time-header { + position: relative; + border-bottom: 1px solid #e4e4e4; + font-size: 12px; + padding: 8px 5px 5px; + display: table; + width: 100%; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-date-picker__header { + margin: 12px; + text-align: center +} + +.el-date-picker__header--bordered { + margin-bottom: 0; + padding-bottom: 12px; + border-bottom: solid 1px #EBEEF5 +} + +.el-date-picker__header--bordered + .el-picker-panel__content { + margin-top: 0 +} + +.el-date-picker__header-label { + font-size: 16px; + font-weight: 500; + padding: 0 5px; + line-height: 22px; + text-align: center; + cursor: pointer; + color: #606266 +} + +.el-date-picker__header-label.active, .el-date-picker__header-label:hover { + color: #409EFF +} + +.el-date-picker__prev-btn { + float: left +} + +.el-date-picker__next-btn { + float: right +} + +.el-date-picker__time-wrap { + padding: 10px; + text-align: center +} + +.el-date-picker__time-label { + float: left; + cursor: pointer; + line-height: 30px; + margin-left: 10px +} + +.time-select { + margin: 5px 0; + min-width: 0 +} + +.time-select .el-picker-panel__content { + max-height: 200px; + margin: 0 +} + +.time-select-item { + padding: 8px 10px; + font-size: 14px; + line-height: 20px +} + +.time-select-item.selected:not(.disabled) { + color: #409EFF; + font-weight: 700 +} + +.time-select-item.disabled { + color: #E4E7ED; + cursor: not-allowed +} + +.time-select-item:hover { + background-color: #F5F7FA; + font-weight: 700; + cursor: pointer +} + +.el-date-editor { + position: relative; + display: inline-block; + text-align: left +} + +.el-date-editor.el-input, .el-date-editor.el-input__inner { + width: 220px +} + +.el-date-editor--monthrange.el-input, .el-date-editor--monthrange.el-input__inner { + width: 300px +} + +.el-date-editor--daterange.el-input, .el-date-editor--daterange.el-input__inner, .el-date-editor--timerange.el-input, .el-date-editor--timerange.el-input__inner { + width: 350px +} + +.el-date-editor--datetimerange.el-input, .el-date-editor--datetimerange.el-input__inner { + width: 400px +} + +.el-date-editor--dates .el-input__inner { + text-overflow: ellipsis; + white-space: nowrap +} + +.el-date-editor .el-icon-circle-close { + cursor: pointer +} + +.el-date-editor .el-range__icon { + font-size: 14px; + margin-left: -5px; + color: #C0C4CC; + float: left; + line-height: 32px +} + +.el-date-editor .el-range-input, .el-date-editor .el-range-separator { + height: 100%; + margin: 0; + text-align: center; + display: inline-block; + font-size: 14px +} + +.el-date-editor .el-range-input { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border: none; + outline: 0; + padding: 0; + width: 39%; + color: #606266 +} + +.el-date-editor .el-range-input::-webkit-input-placeholder { + color: #C0C4CC +} + +.el-date-editor .el-range-input:-ms-input-placeholder { + color: #C0C4CC +} + +.el-date-editor .el-range-input::-ms-input-placeholder { + color: #C0C4CC +} + +.el-date-editor .el-range-input::placeholder { + color: #C0C4CC +} + +.el-date-editor .el-range-separator { + padding: 0 5px; + line-height: 32px; + width: 5%; + color: #303133 +} + +.el-date-editor .el-range__close-icon { + font-size: 14px; + color: #C0C4CC; + width: 25px; + display: inline-block; + float: right; + line-height: 32px +} + +.el-range-editor.el-input__inner { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + padding: 3px 10px +} + +.el-range-editor .el-range-input { + line-height: 1 +} + +.el-range-editor.is-active, .el-range-editor.is-active:hover { + border-color: #409EFF +} + +.el-range-editor--medium.el-input__inner { + height: 36px +} + +.el-range-editor--medium .el-range-separator { + line-height: 28px; + font-size: 14px +} + +.el-range-editor--medium .el-range-input { + font-size: 14px +} + +.el-range-editor--medium .el-range__close-icon, .el-range-editor--medium .el-range__icon { + line-height: 28px +} + +.el-range-editor--small.el-input__inner { + height: 32px +} + +.el-range-editor--small .el-range-separator { + line-height: 24px; + font-size: 13px +} + +.el-range-editor--small .el-range-input { + font-size: 13px +} + +.el-range-editor--small .el-range__close-icon, .el-range-editor--small .el-range__icon { + line-height: 24px +} + +.el-range-editor--mini.el-input__inner { + height: 28px +} + +.el-range-editor--mini .el-range-separator { + line-height: 20px; + font-size: 12px +} + +.el-range-editor--mini .el-range-input { + font-size: 12px +} + +.el-range-editor--mini .el-range__close-icon, .el-range-editor--mini .el-range__icon { + line-height: 20px +} + +.el-range-editor.is-disabled { + background-color: #F5F7FA; + border-color: #E4E7ED; + color: #C0C4CC; + cursor: not-allowed +} + +.el-range-editor.is-disabled:focus, .el-range-editor.is-disabled:hover { + border-color: #E4E7ED +} + +.el-range-editor.is-disabled input { + background-color: #F5F7FA; + color: #C0C4CC; + cursor: not-allowed +} + +.el-range-editor.is-disabled input::-webkit-input-placeholder { + color: #C0C4CC +} + +.el-range-editor.is-disabled input:-ms-input-placeholder { + color: #C0C4CC +} + +.el-range-editor.is-disabled input::-ms-input-placeholder { + color: #C0C4CC +} + +.el-range-editor.is-disabled input::placeholder { + color: #C0C4CC +} + +.el-range-editor.is-disabled .el-range-separator { + color: #C0C4CC +} + +.el-picker-panel { + color: #606266; + border: 1px solid #E4E7ED; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + background: #FFF; + border-radius: 4px; + line-height: 30px; + margin: 5px 0 +} + +.el-popover, .el-time-panel { + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1) +} + +.el-picker-panel__body-wrapper::after, .el-picker-panel__body::after { + content: ""; + display: table; + clear: both +} + +.el-picker-panel__content { + position: relative; + margin: 15px +} + +.el-picker-panel__footer { + border-top: 1px solid #e4e4e4; + padding: 4px; + text-align: right; + background-color: #FFF; + position: relative; + font-size: 0 +} + +.el-picker-panel__shortcut { + display: block; + width: 100%; + border: 0; + background-color: transparent; + line-height: 28px; + font-size: 14px; + color: #606266; + padding-left: 12px; + text-align: left; + outline: 0; + cursor: pointer +} + +.el-picker-panel__shortcut:hover { + color: #409EFF +} + +.el-picker-panel__shortcut.active { + background-color: #e6f1fe; + color: #409EFF +} + +.el-picker-panel__btn { + border: 1px solid #dcdcdc; + color: #333; + line-height: 24px; + border-radius: 2px; + padding: 0 20px; + cursor: pointer; + background-color: transparent; + outline: 0; + font-size: 12px +} + +.el-picker-panel__btn[disabled] { + color: #ccc; + cursor: not-allowed +} + +.el-picker-panel__icon-btn { + font-size: 12px; + color: #303133; + border: 0; + background: 0 0; + cursor: pointer; + outline: 0; + margin-top: 8px +} + +.el-picker-panel__icon-btn:hover { + color: #409EFF +} + +.el-picker-panel__icon-btn.is-disabled { + color: #bbb +} + +.el-picker-panel__icon-btn.is-disabled:hover { + cursor: not-allowed +} + +.el-picker-panel__link-btn { + vertical-align: middle +} + +.el-picker-panel [slot=sidebar], .el-picker-panel__sidebar { + position: absolute; + top: 0; + bottom: 0; + width: 110px; + border-right: 1px solid #e4e4e4; + -webkit-box-sizing: border-box; + box-sizing: border-box; + padding-top: 6px; + background-color: #FFF; + overflow: auto +} + +.el-picker-panel [slot=sidebar] + .el-picker-panel__body, .el-picker-panel__sidebar + .el-picker-panel__body { + margin-left: 110px +} + +.el-time-spinner.has-seconds .el-time-spinner__wrapper { + width: 33.3% +} + +.el-time-spinner__wrapper { + max-height: 190px; + overflow: auto; + display: inline-block; + width: 50%; + vertical-align: top; + position: relative +} + +.el-time-spinner__wrapper .el-scrollbar__wrap:not(.el-scrollbar__wrap--hidden-default) { + padding-bottom: 15px +} + +.el-time-spinner__input.el-input .el-input__inner, .el-time-spinner__list { + padding: 0; + text-align: center +} + +.el-time-spinner__wrapper.is-arrow { + -webkit-box-sizing: border-box; + box-sizing: border-box; + text-align: center; + overflow: hidden +} + +.el-time-spinner__wrapper.is-arrow .el-time-spinner__list { + -webkit-transform: translateY(-32px); + transform: translateY(-32px) +} + +.el-time-spinner__wrapper.is-arrow .el-time-spinner__item:hover:not(.disabled):not(.active) { + background: #FFF; + cursor: default +} + +.el-time-spinner__arrow { + font-size: 12px; + color: #909399; + position: absolute; + left: 0; + width: 100%; + z-index: 1; + text-align: center; + height: 30px; + line-height: 30px; + cursor: pointer +} + +.el-time-spinner__arrow:hover { + color: #409EFF +} + +.el-time-spinner__arrow.el-icon-arrow-up { + top: 10px +} + +.el-time-spinner__arrow.el-icon-arrow-down { + bottom: 10px +} + +.el-time-spinner__input.el-input { + width: 70% +} + +.el-time-spinner__list { + margin: 0; + list-style: none +} + +.el-time-spinner__list::after, .el-time-spinner__list::before { + content: ''; + display: block; + width: 100%; + height: 80px +} + +.el-time-spinner__item { + height: 32px; + line-height: 32px; + font-size: 12px; + color: #606266 +} + +.el-time-spinner__item:hover:not(.disabled):not(.active) { + background: #F5F7FA; + cursor: pointer +} + +.el-time-spinner__item.active:not(.disabled) { + color: #303133; + font-weight: 700 +} + +.el-time-spinner__item.disabled { + color: #C0C4CC; + cursor: not-allowed +} + +.el-time-panel { + margin: 5px 0; + border: 1px solid #E4E7ED; + background-color: #FFF; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + border-radius: 2px; + position: absolute; + width: 180px; + left: 0; + z-index: 1000; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-box-sizing: content-box; + box-sizing: content-box +} + +.el-slider__button, .el-slider__button-wrapper { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none +} + +.el-time-panel__content { + font-size: 0; + position: relative; + overflow: hidden +} + +.el-time-panel__content::after, .el-time-panel__content::before { + content: ""; + top: 50%; + position: absolute; + margin-top: -15px; + height: 32px; + z-index: -1; + left: 0; + right: 0; + -webkit-box-sizing: border-box; + box-sizing: border-box; + padding-top: 6px; + text-align: left; + border-top: 1px solid #E4E7ED; + border-bottom: 1px solid #E4E7ED +} + +.el-time-panel__content::after { + left: 50%; + margin-left: 12%; + margin-right: 12% +} + +.el-time-panel__content::before { + padding-left: 50%; + margin-right: 12%; + margin-left: 12% +} + +.el-time-panel__content.has-seconds::after { + left: calc(100% / 3 * 2) +} + +.el-time-panel__content.has-seconds::before { + padding-left: calc(100% / 3) +} + +.el-time-panel__footer { + border-top: 1px solid #e4e4e4; + padding: 4px; + height: 36px; + line-height: 25px; + text-align: right; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-time-panel__btn { + border: none; + line-height: 28px; + padding: 0 5px; + margin: 0 5px; + cursor: pointer; + background-color: transparent; + outline: 0; + font-size: 12px; + color: #303133 +} + +.el-time-panel__btn.confirm { + font-weight: 800; + color: #409EFF +} + +.el-time-range-picker { + width: 354px; + overflow: visible +} + +.el-time-range-picker__content { + position: relative; + text-align: center; + padding: 10px +} + +.el-time-range-picker__cell { + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin: 0; + padding: 4px 7px 7px; + width: 50%; + display: inline-block +} + +.el-time-range-picker__header { + margin-bottom: 5px; + text-align: center; + font-size: 14px +} + +.el-time-range-picker__body { + border-radius: 2px; + border: 1px solid #E4E7ED +} + +.el-popover { + position: absolute; + background: #FFF; + min-width: 150px; + border: 1px solid #EBEEF5; + padding: 12px; + z-index: 2000; + color: #606266; + line-height: 1.4; + text-align: justify; + font-size: 14px; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + word-break: break-all +} + +.el-popover--plain { + padding: 18px 20px +} + +.el-popover__title { + color: #303133; + font-size: 16px; + line-height: 1; + margin-bottom: 12px +} + +.v-modal-enter { + -webkit-animation: v-modal-in .2s ease; + animation: v-modal-in .2s ease +} + +.v-modal-leave { + -webkit-animation: v-modal-out .2s ease forwards; + animation: v-modal-out .2s ease forwards +} + +@keyframes v-modal-in { + 0% { + opacity: 0 + } +} + +@keyframes v-modal-out { + 100% { + opacity: 0 + } +} + +.v-modal { + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: .5; + background: #000 +} + +.el-popup-parent--hidden { + overflow: hidden +} + +.el-message-box { + display: inline-block; + width: 420px; + padding-bottom: 10px; + vertical-align: middle; + background-color: #FFF; + border-radius: 4px; + border: 1px solid #EBEEF5; + font-size: 18px; + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + text-align: left; + overflow: hidden; + -webkit-backface-visibility: hidden; + backface-visibility: hidden +} + +.el-message-box__wrapper { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + text-align: center +} + +.el-message-box__wrapper::after { + content: ""; + display: inline-block; + height: 100%; + width: 0; + vertical-align: middle +} + +.el-message-box__header { + position: relative; + padding: 15px 15px 10px +} + +.el-message-box__title { + padding-left: 0; + margin-bottom: 0; + font-size: 18px; + line-height: 1; + color: #303133 +} + +.el-message-box__headerbtn { + position: absolute; + top: 15px; + right: 15px; + padding: 0; + border: none; + outline: 0; + background: 0 0; + font-size: 16px; + cursor: pointer +} + +.el-form-item.is-error .el-input__inner, .el-form-item.is-error .el-input__inner:focus, .el-form-item.is-error .el-textarea__inner, .el-form-item.is-error .el-textarea__inner:focus, .el-message-box__input input.invalid, .el-message-box__input input.invalid:focus { + border-color: #F56C6C +} + +.el-message-box__headerbtn .el-message-box__close { + color: #909399 +} + +.el-message-box__headerbtn:focus .el-message-box__close, .el-message-box__headerbtn:hover .el-message-box__close { + color: #409EFF +} + +.el-message-box__content { + padding: 10px 15px; + color: #606266; + font-size: 14px +} + +.el-message-box__container { + position: relative +} + +.el-message-box__input { + padding-top: 15px +} + +.el-message-box__status { + position: absolute; + top: 50%; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + font-size: 24px !important +} + +.el-message-box__status::before { + padding-left: 1px +} + +.el-message-box__status + .el-message-box__message { + padding-left: 36px; + padding-right: 12px +} + +.el-message-box__status.el-icon-success { + color: #67C23A +} + +.el-message-box__status.el-icon-info { + color: #909399 +} + +.el-message-box__status.el-icon-warning { + color: #E6A23C +} + +.el-message-box__status.el-icon-error { + color: #F56C6C +} + +.el-message-box__message { + margin: 0 +} + +.el-message-box__message p { + margin: 0; + line-height: 24px +} + +.el-message-box__errormsg { + color: #F56C6C; + font-size: 12px; + min-height: 18px; + margin-top: 2px +} + +.el-message-box__btns { + padding: 5px 15px 0; + text-align: right +} + +.el-message-box__btns button:nth-child(2) { + margin-left: 10px +} + +.el-message-box__btns-reverse { + -webkit-box-orient: horizontal; + -webkit-box-direction: reverse; + -ms-flex-direction: row-reverse; + flex-direction: row-reverse +} + +.el-message-box--center { + padding-bottom: 30px +} + +.el-message-box--center .el-message-box__header { + padding-top: 30px +} + +.el-message-box--center .el-message-box__title { + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center +} + +.el-message-box--center .el-message-box__status { + position: relative; + top: auto; + padding-right: 5px; + text-align: center; + -webkit-transform: translateY(-1px); + transform: translateY(-1px) +} + +.el-message-box--center .el-message-box__message { + margin-left: 0 +} + +.el-message-box--center .el-message-box__btns, .el-message-box--center .el-message-box__content { + text-align: center +} + +.el-message-box--center .el-message-box__content { + padding-left: 27px; + padding-right: 27px +} + +.msgbox-fade-enter-active { + -webkit-animation: msgbox-fade-in .3s; + animation: msgbox-fade-in .3s +} + +.msgbox-fade-leave-active { + -webkit-animation: msgbox-fade-out .3s; + animation: msgbox-fade-out .3s +} + +@-webkit-keyframes msgbox-fade-in { + 0% { + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + opacity: 0 + } + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1 + } +} + +@keyframes msgbox-fade-in { + 0% { + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + opacity: 0 + } + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1 + } +} + +@-webkit-keyframes msgbox-fade-out { + 0% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1 + } + 100% { + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + opacity: 0 + } +} + +@keyframes msgbox-fade-out { + 0% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1 + } + 100% { + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + opacity: 0 + } +} + +.el-breadcrumb { + font-size: 14px; + line-height: 1 +} + +.el-breadcrumb::after, .el-breadcrumb::before { + display: table; + content: "" +} + +.el-breadcrumb::after { + clear: both +} + +.el-breadcrumb__separator { + margin: 0 9px; + font-weight: 700; + color: #C0C4CC +} + +.el-breadcrumb__separator[class*=icon] { + margin: 0 6px; + font-weight: 400 +} + +.el-breadcrumb__item { + float: left +} + +.el-breadcrumb__inner { + color: #606266 +} + +.el-breadcrumb__inner a, .el-breadcrumb__inner.is-link { + font-weight: 700; + text-decoration: none; + -webkit-transition: color .2s cubic-bezier(.645, .045, .355, 1); + transition: color .2s cubic-bezier(.645, .045, .355, 1); + color: #303133 +} + +.el-breadcrumb__inner a:hover, .el-breadcrumb__inner.is-link:hover { + color: #409EFF; + cursor: pointer +} + +.el-breadcrumb__item:last-child .el-breadcrumb__inner, .el-breadcrumb__item:last-child .el-breadcrumb__inner a, .el-breadcrumb__item:last-child .el-breadcrumb__inner a:hover, .el-breadcrumb__item:last-child .el-breadcrumb__inner:hover { + font-weight: 400; + color: #606266; + cursor: text +} + +.el-breadcrumb__item:last-child .el-breadcrumb__separator { + display: none +} + +.el-form--label-left .el-form-item__label { + text-align: left +} + +.el-form--label-top .el-form-item__label { + float: none; + display: inline-block; + text-align: left; + padding: 0 0 10px +} + +.el-form--inline .el-form-item { + display: inline-block; + margin-right: 10px; + vertical-align: top +} + +.el-form--inline .el-form-item__label { + float: none; + display: inline-block +} + +.el-form--inline .el-form-item__content { + display: inline-block; + vertical-align: top +} + +.el-form--inline.el-form--label-top .el-form-item__content { + display: block +} + +.el-form-item { + margin-bottom: 22px +} + +.el-form-item::after, .el-form-item::before { + display: table; + content: "" +} + +.el-form-item::after { + clear: both +} + +.el-form-item .el-form-item { + margin-bottom: 0 +} + +.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item { + margin-bottom: 18px +} + +.el-form-item .el-input__validateIcon { + display: none +} + +.el-form-item--medium .el-form-item__content, .el-form-item--medium .el-form-item__label { + line-height: 36px +} + +.el-form-item--small .el-form-item__content, .el-form-item--small .el-form-item__label { + line-height: 32px +} + +.el-form-item--small .el-form-item__error { + padding-top: 2px +} + +.el-form-item--mini .el-form-item__content, .el-form-item--mini .el-form-item__label { + line-height: 28px +} + +.el-form-item--mini .el-form-item__error { + padding-top: 1px +} + +.el-form-item__label-wrap { + float: left +} + +.el-form-item__label-wrap .el-form-item__label { + display: inline-block; + float: none +} + +.el-form-item__label { + text-align: right; + vertical-align: middle; + float: left; + font-size: 14px; + color: #606266; + line-height: 40px; + padding: 0 12px 0 0; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-form-item__content { + line-height: 40px; + position: relative; + font-size: 14px +} + +.el-form-item__content::after, .el-form-item__content::before { + display: table; + content: "" +} + +.el-form-item__content::after { + clear: both +} + +.el-form-item__content .el-input-group { + vertical-align: top +} + +.el-form-item__error { + color: #F56C6C; + font-size: 12px; + line-height: 1; + padding-top: 4px; + position: absolute; + top: 100%; + left: 0 +} + +.el-form-item__error--inline { + position: relative; + top: auto; + left: auto; + display: inline-block; + margin-left: 10px +} + +.el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label:before, .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before { + content: '*'; + color: #F56C6C; + margin-right: 4px +} + +.el-form-item.is-error .el-input-group__append .el-input__inner, .el-form-item.is-error .el-input-group__prepend .el-input__inner { + border-color: transparent +} + +.el-form-item.is-error .el-input__validateIcon { + color: #F56C6C +} + +.el-form-item--feedback .el-input__validateIcon { + display: inline-block +} + +.el-tabs__header { + padding: 0; + position: relative; + margin: 0 0 15px +} + +.el-tabs__active-bar { + position: absolute; + bottom: 0; + left: 0; + height: 2px; + background-color: #409EFF; + z-index: 1; + -webkit-transition: -webkit-transform .3s cubic-bezier(.645, .045, .355, 1); + transition: -webkit-transform .3s cubic-bezier(.645, .045, .355, 1); + transition: transform .3s cubic-bezier(.645, .045, .355, 1); + transition: transform .3s cubic-bezier(.645, .045, .355, 1), -webkit-transform .3s cubic-bezier(.645, .045, .355, 1); + list-style: none +} + +.el-tabs__new-tab { + float: right; + border: 1px solid #d3dce6; + height: 18px; + width: 18px; + line-height: 18px; + margin: 12px 0 9px 10px; + border-radius: 3px; + text-align: center; + font-size: 12px; + color: #d3dce6; + cursor: pointer; + -webkit-transition: all .15s; + transition: all .15s +} + +.el-collapse-item__arrow, .el-tabs__nav { + -webkit-transition: -webkit-transform .3s +} + +.el-tabs__new-tab .el-icon-plus { + -webkit-transform: scale(.8, .8); + transform: scale(.8, .8) +} + +.el-tabs__new-tab:hover { + color: #409EFF +} + +.el-tabs__nav-wrap { + overflow: hidden; + margin-bottom: -1px; + position: relative +} + +.el-tabs__nav-wrap::after { + content: ""; + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 2px; + background-color: #E4E7ED; + z-index: 1 +} + +.el-tabs--border-card > .el-tabs__header .el-tabs__nav-wrap::after, .el-tabs--card > .el-tabs__header .el-tabs__nav-wrap::after { + content: none +} + +.el-tabs__nav-wrap.is-scrollable { + padding: 0 20px; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-tabs__nav-scroll { + overflow: hidden; + background: url("./background_image/bg.png") no-repeat; + background-color: #22278e; +} + +.el-tabs__nav-next, .el-tabs__nav-prev { + position: absolute; + cursor: pointer; + line-height: 44px; + font-size: 12px; + color: #909399 +} + +.el-tabs__nav-next { + right: 0 +} + +.el-tabs__nav-prev { + left: 0 +} + +.el-tabs__nav { + white-space: nowrap; + position: relative; + transition: -webkit-transform .3s; + transition: transform .3s; + transition: transform .3s, -webkit-transform .3s; + float: left; + z-index: 2; + /*padding-left: 30px;*/ +} + +.el-tabs__nav.is-stretch { + min-width: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: flex +} + +.el-tabs__nav.is-stretch > * { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + text-align: center +} + +.el-tabs__item { + padding: 0 20px; + height: 40px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + line-height: 40px; + display: inline-block; + list-style: none; + font-size: 14px; + font-weight: 500; + color: #303133; + position: relative; + background: url("./background_image/item1.png") no-repeat; + background-size: 100% 100%; +} + +.el-tabs__item:focus, .el-tabs__item:focus:active { + outline: 0 +} + +.el-tabs__item:focus.is-active.is-focus:not(:active) { + -webkit-box-shadow: 0 0 2px 2px #409EFF inset; + box-shadow: 0 0 2px 2px #409EFF inset; + border-radius: 3px +} + +.el-tabs__item .el-icon-close { + border-radius: 50%; + text-align: center; + -webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1); + transition: all .3s cubic-bezier(.645, .045, .355, 1); + margin-left: 5px +} + +.el-tabs__item .el-icon-close:before { + -webkit-transform: scale(.9); + transform: scale(.9); + display: inline-block +} + +.el-tabs__item .el-icon-close:hover { + background-color: #C0C4CC; + color: #FFF +} + +.el-tabs__item.is-active { + color: #409EFF +} + +.el-tabs__item:hover { + color: #409EFF; + cursor: pointer +} + +.el-tabs__item.is-disabled { + color: #C0C4CC; + cursor: default +} + +.el-tabs__content { + overflow: hidden; + position: relative +} + +.el-tabs--card > .el-tabs__header { + border-bottom: 1px solid #E4E7ED +} + +.el-tabs--card > .el-tabs__header .el-tabs__nav { + border: 1px solid #E4E7ED; + border-bottom: none; + border-radius: 4px 4px 0 0; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-tabs--card > .el-tabs__header .el-tabs__active-bar { + display: none +} + +.el-tabs--card > .el-tabs__header .el-tabs__item .el-icon-close { + position: relative; + font-size: 12px; + width: 0; + height: 14px; + vertical-align: middle; + line-height: 15px; + overflow: hidden; + top: -1px; + right: -2px; + -webkit-transform-origin: 100% 50%; + transform-origin: 100% 50% +} + +.el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable .el-icon-close, .el-tabs--card > .el-tabs__header .el-tabs__item.is-closable:hover .el-icon-close { + width: 14px +} + +.el-tabs--card > .el-tabs__header .el-tabs__item { + border-bottom: 1px solid transparent; + /*border-left: 1px solid #E4E7ED;*/ + -webkit-transition: color .3s cubic-bezier(.645, .045, .355, 1), padding .3s cubic-bezier(.645, .045, .355, 1); + transition: color .3s cubic-bezier(.645, .045, .355, 1), padding .3s cubic-bezier(.645, .045, .355, 1) +} + +.el-tabs--card > .el-tabs__header .el-tabs__item:first-child { + border-left: none +} + +.el-tabs--card > .el-tabs__header .el-tabs__item.is-closable:hover { + padding-left: 13px; + padding-right: 13px +} + +.el-tabs--card > .el-tabs__header .el-tabs__item.is-active { + border-bottom-color: #FFF +} + +.el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable { + padding-left: 20px; + padding-right: 20px +} + +.el-tabs--border-card { + background: #FFF; + border: 1px solid #DCDFE6; + -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .04); + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .04) +} + +.el-tabs--border-card > .el-tabs__content { + padding: 0px; + height: calc(100vh - 40px) +} + +.el-tabs--border-card > .el-tabs__header { + background-color: #F5F7FA; + border-bottom: 1px solid #E4E7ED; + margin: 0 +} + +.el-tabs--border-card > .el-tabs__header .el-tabs__item { + -webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1); + transition: all .3s cubic-bezier(.645, .045, .355, 1); + border: 1px solid transparent; + margin-top: -1px; + color: #d0cccc +} + +.el-tabs--border-card > .el-tabs__header .el-tabs__item + .el-tabs__item, .el-tabs--border-card > .el-tabs__header .el-tabs__item:first-child { + margin-left: -1px +} + +.el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active { + color: #fff; + /*background-color: #FFF;*/ + /*border-right-color: #DCDFE6;*/ + /*border-left-color: #DCDFE6*/ +} + +.el-tabs--border-card > .el-tabs__header .el-tabs__item:not(.is-disabled):hover { + color: #409EFF +} + +.el-tabs--border-card > .el-tabs__header .el-tabs__item.is-disabled { + color: #C0C4CC +} + +.el-tabs--border-card > .el-tabs__header .is-scrollable .el-tabs__item:first-child { + margin-left: 0 +} + +.el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2), .el-tabs--bottom .el-tabs__item.is-top:nth-child(2), .el-tabs--top .el-tabs__item.is-bottom:nth-child(2), .el-tabs--top .el-tabs__item.is-top:nth-child(2) { + padding-left: 0 +} + +.el-tabs--bottom .el-tabs__item.is-bottom:last-child, .el-tabs--bottom .el-tabs__item.is-top:last-child, .el-tabs--top .el-tabs__item.is-bottom:last-child, .el-tabs--top .el-tabs__item.is-top:last-child { + padding-right: 0 +} + +.el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) { + padding-left: 20px +} + +.el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child { + padding-right: 20px +} + +.el-tabs--bottom .el-tabs__header.is-bottom { + margin-bottom: 0; + margin-top: 10px +} + +.el-tabs--bottom.el-tabs--border-card .el-tabs__header.is-bottom { + border-bottom: 0; + border-top: 1px solid #DCDFE6 +} + +.el-tabs--bottom.el-tabs--border-card .el-tabs__nav-wrap.is-bottom { + margin-top: -1px; + margin-bottom: 0 +} + +.el-tabs--bottom.el-tabs--border-card .el-tabs__item.is-bottom:not(.is-active) { + border: 1px solid transparent +} + +.el-tabs--bottom.el-tabs--border-card .el-tabs__item.is-bottom { + margin: 0 -1px -1px +} + +.el-tabs--left, .el-tabs--right { + overflow: hidden +} + +.el-tabs--left .el-tabs__header.is-left, .el-tabs--left .el-tabs__header.is-right, .el-tabs--left .el-tabs__nav-scroll, .el-tabs--left .el-tabs__nav-wrap.is-left, .el-tabs--left .el-tabs__nav-wrap.is-right, .el-tabs--right .el-tabs__header.is-left, .el-tabs--right .el-tabs__header.is-right, .el-tabs--right .el-tabs__nav-scroll, .el-tabs--right .el-tabs__nav-wrap.is-left, .el-tabs--right .el-tabs__nav-wrap.is-right { + height: 100% +} + +.el-tabs--left .el-tabs__active-bar.is-left, .el-tabs--left .el-tabs__active-bar.is-right, .el-tabs--right .el-tabs__active-bar.is-left, .el-tabs--right .el-tabs__active-bar.is-right { + top: 0; + bottom: auto; + width: 2px; + height: auto +} + +.el-tabs--left .el-tabs__nav-wrap.is-left, .el-tabs--left .el-tabs__nav-wrap.is-right, .el-tabs--right .el-tabs__nav-wrap.is-left, .el-tabs--right .el-tabs__nav-wrap.is-right { + margin-bottom: 0 +} + +.el-tabs--left .el-tabs__nav-wrap.is-left > .el-tabs__nav-next, .el-tabs--left .el-tabs__nav-wrap.is-left > .el-tabs__nav-prev, .el-tabs--left .el-tabs__nav-wrap.is-right > .el-tabs__nav-next, .el-tabs--left .el-tabs__nav-wrap.is-right > .el-tabs__nav-prev, .el-tabs--right .el-tabs__nav-wrap.is-left > .el-tabs__nav-next, .el-tabs--right .el-tabs__nav-wrap.is-left > .el-tabs__nav-prev, .el-tabs--right .el-tabs__nav-wrap.is-right > .el-tabs__nav-next, .el-tabs--right .el-tabs__nav-wrap.is-right > .el-tabs__nav-prev { + height: 30px; + line-height: 30px; + width: 100%; + text-align: center; + cursor: pointer +} + +.el-tabs--left .el-tabs__nav-wrap.is-left > .el-tabs__nav-next i, .el-tabs--left .el-tabs__nav-wrap.is-left > .el-tabs__nav-prev i, .el-tabs--left .el-tabs__nav-wrap.is-right > .el-tabs__nav-next i, .el-tabs--left .el-tabs__nav-wrap.is-right > .el-tabs__nav-prev i, .el-tabs--right .el-tabs__nav-wrap.is-left > .el-tabs__nav-next i, .el-tabs--right .el-tabs__nav-wrap.is-left > .el-tabs__nav-prev i, .el-tabs--right .el-tabs__nav-wrap.is-right > .el-tabs__nav-next i, .el-tabs--right .el-tabs__nav-wrap.is-right > .el-tabs__nav-prev i { + -webkit-transform: rotateZ(90deg); + transform: rotateZ(90deg) +} + +.el-tabs--left .el-tabs__nav-wrap.is-left > .el-tabs__nav-prev, .el-tabs--left .el-tabs__nav-wrap.is-right > .el-tabs__nav-prev, .el-tabs--right .el-tabs__nav-wrap.is-left > .el-tabs__nav-prev, .el-tabs--right .el-tabs__nav-wrap.is-right > .el-tabs__nav-prev { + left: auto; + top: 0 +} + +.el-tabs--left .el-tabs__nav-wrap.is-left > .el-tabs__nav-next, .el-tabs--left .el-tabs__nav-wrap.is-right > .el-tabs__nav-next, .el-tabs--right .el-tabs__nav-wrap.is-left > .el-tabs__nav-next, .el-tabs--right .el-tabs__nav-wrap.is-right > .el-tabs__nav-next { + right: auto; + bottom: 0 +} + +.el-tabs--left .el-tabs__active-bar.is-left, .el-tabs--left .el-tabs__nav-wrap.is-left::after { + right: 0; + left: auto +} + +.el-tabs--left .el-tabs__nav-wrap.is-left.is-scrollable, .el-tabs--left .el-tabs__nav-wrap.is-right.is-scrollable, .el-tabs--right .el-tabs__nav-wrap.is-left.is-scrollable, .el-tabs--right .el-tabs__nav-wrap.is-right.is-scrollable { + padding: 30px 0 +} + +.el-tabs--left .el-tabs__nav-wrap.is-left::after, .el-tabs--left .el-tabs__nav-wrap.is-right::after, .el-tabs--right .el-tabs__nav-wrap.is-left::after, .el-tabs--right .el-tabs__nav-wrap.is-right::after { + height: 100%; + width: 2px; + bottom: auto; + top: 0 +} + +.el-tabs--left .el-tabs__nav.is-left, .el-tabs--left .el-tabs__nav.is-right, .el-tabs--right .el-tabs__nav.is-left, .el-tabs--right .el-tabs__nav.is-right { + float: none +} + +.el-tabs--left .el-tabs__item.is-left, .el-tabs--left .el-tabs__item.is-right, .el-tabs--right .el-tabs__item.is-left, .el-tabs--right .el-tabs__item.is-right { + display: block +} + +.el-tabs--left.el-tabs--card .el-tabs__active-bar.is-left, .el-tabs--right.el-tabs--card .el-tabs__active-bar.is-right { + display: none +} + +.el-tabs--left .el-tabs__header.is-left { + float: left; + margin-bottom: 0; + margin-right: 10px +} + +.el-tabs--left .el-tabs__nav-wrap.is-left { + margin-right: -1px +} + +.el-tabs--left .el-tabs__item.is-left { + text-align: right +} + +.el-tabs--left.el-tabs--card .el-tabs__item.is-left { + border-left: none; + border-right: 1px solid #E4E7ED; + border-bottom: none; + border-top: 1px solid #E4E7ED; + text-align: left +} + +.el-tabs--left.el-tabs--card .el-tabs__item.is-left:first-child { + border-right: 1px solid #E4E7ED; + border-top: none +} + +.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active { + border: 1px solid #E4E7ED; + border-right-color: #fff; + border-left: none; + border-bottom: none +} + +.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active:first-child { + border-top: none +} + +.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active:last-child { + border-bottom: none +} + +.el-tabs--left.el-tabs--card .el-tabs__nav { + border-radius: 4px 0 0 4px; + border-bottom: 1px solid #E4E7ED; + border-right: none +} + +.el-tabs--left.el-tabs--card .el-tabs__new-tab { + float: none +} + +.el-tabs--left.el-tabs--border-card .el-tabs__header.is-left { + border-right: 1px solid #dfe4ed +} + +.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left { + border: 1px solid transparent; + margin: -1px 0 -1px -1px +} + +.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left.is-active { + border-color: #d1dbe5 transparent +} + +.el-tabs--right .el-tabs__header.is-right { + float: right; + margin-bottom: 0; + margin-left: 10px +} + +.el-tabs--right .el-tabs__nav-wrap.is-right { + margin-left: -1px +} + +.el-tabs--right .el-tabs__nav-wrap.is-right::after { + left: 0; + right: auto +} + +.el-tabs--right .el-tabs__active-bar.is-right { + left: 0 +} + +.el-tabs--right.el-tabs--card .el-tabs__item.is-right { + border-bottom: none; + border-top: 1px solid #E4E7ED +} + +.el-tabs--right.el-tabs--card .el-tabs__item.is-right:first-child { + border-left: 1px solid #E4E7ED; + border-top: none +} + +.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active { + border: 1px solid #E4E7ED; + border-left-color: #fff; + border-right: none; + border-bottom: none +} + +.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active:first-child { + border-top: none +} + +.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active:last-child { + border-bottom: none +} + +.el-tabs--right.el-tabs--card .el-tabs__nav { + border-radius: 0 4px 4px 0; + border-bottom: 1px solid #E4E7ED; + border-left: none +} + +.el-tabs--right.el-tabs--border-card .el-tabs__header.is-right { + border-left: 1px solid #dfe4ed +} + +.el-tabs--right.el-tabs--border-card .el-tabs__item.is-right { + border: 1px solid transparent; + margin: -1px -1px -1px 0 +} + +.el-tabs--right.el-tabs--border-card .el-tabs__item.is-right.is-active { + border-color: #d1dbe5 transparent +} + +.slideInLeft-transition, .slideInRight-transition { + display: inline-block +} + +.slideInRight-enter { + -webkit-animation: slideInRight-enter .3s; + animation: slideInRight-enter .3s +} + +.slideInRight-leave { + position: absolute; + left: 0; + right: 0; + -webkit-animation: slideInRight-leave .3s; + animation: slideInRight-leave .3s +} + +.slideInLeft-enter { + -webkit-animation: slideInLeft-enter .3s; + animation: slideInLeft-enter .3s +} + +.slideInLeft-leave { + position: absolute; + left: 0; + right: 0; + -webkit-animation: slideInLeft-leave .3s; + animation: slideInLeft-leave .3s +} + +@-webkit-keyframes slideInRight-enter { + 0% { + opacity: 0; + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(100%); + transform: translateX(100%) + } + to { + opacity: 1; + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(0); + transform: translateX(0) + } +} + +@keyframes slideInRight-enter { + 0% { + opacity: 0; + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(100%); + transform: translateX(100%) + } + to { + opacity: 1; + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(0); + transform: translateX(0) + } +} + +@-webkit-keyframes slideInRight-leave { + 0% { + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(0); + transform: translateX(0); + opacity: 1 + } + 100% { + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(100%); + transform: translateX(100%); + opacity: 0 + } +} + +@keyframes slideInRight-leave { + 0% { + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(0); + transform: translateX(0); + opacity: 1 + } + 100% { + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(100%); + transform: translateX(100%); + opacity: 0 + } +} + +@-webkit-keyframes slideInLeft-enter { + 0% { + opacity: 0; + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(-100%); + transform: translateX(-100%) + } + to { + opacity: 1; + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(0); + transform: translateX(0) + } +} + +@keyframes slideInLeft-enter { + 0% { + opacity: 0; + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(-100%); + transform: translateX(-100%) + } + to { + opacity: 1; + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(0); + transform: translateX(0) + } +} + +@-webkit-keyframes slideInLeft-leave { + 0% { + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(0); + transform: translateX(0); + opacity: 1 + } + 100% { + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(-100%); + transform: translateX(-100%); + opacity: 0 + } +} + +@keyframes slideInLeft-leave { + 0% { + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(0); + transform: translateX(0); + opacity: 1 + } + 100% { + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: translateX(-100%); + transform: translateX(-100%); + opacity: 0 + } +} + +.el-tree { + position: relative; + cursor: default; + background: #FFF; + color: #606266 +} + +.el-tree__empty-block { + position: relative; + min-height: 60px; + text-align: center; + width: 100%; + height: 100% +} + +.el-tree__empty-text { + position: absolute; + left: 50%; + top: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + color: #909399; + font-size: 14px +} + +.el-tree__drop-indicator { + position: absolute; + left: 0; + right: 0; + height: 1px; + background-color: #409EFF +} + +.el-tree-node { + white-space: nowrap; + outline: 0 +} + +.el-tree-node:focus > .el-tree-node__content { + background-color: #F5F7FA +} + +.el-tree-node.is-drop-inner > .el-tree-node__content .el-tree-node__label { + background-color: #409EFF; + color: #fff +} + +.el-tree-node__content { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + height: 26px; + cursor: pointer +} + +.el-tree-node__content > .el-tree-node__expand-icon { + padding: 6px +} + +.el-tree-node__content > label.el-checkbox { + margin-right: 8px +} + +.el-tree-node__content:hover { + background-color: #F5F7FA +} + +.el-tree.is-dragging .el-tree-node__content { + cursor: move +} + +.el-tree.is-dragging.is-drop-not-allow .el-tree-node__content { + cursor: not-allowed +} + +.el-tree-node__expand-icon { + cursor: pointer; + color: #C0C4CC; + font-size: 12px; + -webkit-transform: rotate(0); + transform: rotate(0); + -webkit-transition: -webkit-transform .3s ease-in-out; + transition: -webkit-transform .3s ease-in-out; + transition: transform .3s ease-in-out; + transition: transform .3s ease-in-out, -webkit-transform .3s ease-in-out +} + +.el-tree-node__expand-icon.expanded { + -webkit-transform: rotate(90deg); + transform: rotate(90deg) +} + +.el-tree-node__expand-icon.is-leaf { + color: transparent; + cursor: default +} + +.el-tree-node__label { + font-size: 14px +} + +.el-tree-node__loading-icon { + margin-right: 8px; + font-size: 14px; + color: #C0C4CC +} + +.el-tree-node > .el-tree-node__children { + overflow: hidden; + background-color: transparent +} + +.el-tree-node.is-expanded > .el-tree-node__children { + display: block +} + +.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content { + background-color: #f0f7ff +} + +.el-alert { + width: 100%; + padding: 8px 16px; + margin: 0; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border-radius: 4px; + position: relative; + background-color: #FFF; + overflow: hidden; + opacity: 1; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-transition: opacity .2s; + transition: opacity .2s +} + +.el-alert.is-light .el-alert__closebtn { + color: #C0C4CC +} + +.el-alert.is-dark .el-alert__closebtn, .el-alert.is-dark .el-alert__description { + color: #FFF +} + +.el-alert.is-center { + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center +} + +.el-alert--success.is-light { + background-color: #f0f9eb; + color: #67C23A +} + +.el-alert--success.is-light .el-alert__description { + color: #67C23A +} + +.el-alert--success.is-dark { + background-color: #67C23A; + color: #FFF +} + +.el-alert--info.is-light { + background-color: #f4f4f5; + color: #909399 +} + +.el-alert--info.is-dark { + background-color: #909399; + color: #FFF +} + +.el-alert--info .el-alert__description { + color: #909399 +} + +.el-alert--warning.is-light { + background-color: #fdf6ec; + color: #E6A23C +} + +.el-alert--warning.is-light .el-alert__description { + color: #E6A23C +} + +.el-alert--warning.is-dark { + background-color: #E6A23C; + color: #FFF +} + +.el-alert--error.is-light { + background-color: #fef0f0; + color: #F56C6C +} + +.el-alert--error.is-light .el-alert__description { + color: #F56C6C +} + +.el-alert--error.is-dark { + background-color: #F56C6C; + color: #FFF +} + +.el-alert__content { + display: table-cell; + padding: 0 8px +} + +.el-alert__icon { + font-size: 16px; + width: 16px +} + +.el-alert__icon.is-big { + font-size: 28px; + width: 28px +} + +.el-alert__title { + font-size: 13px; + line-height: 18px +} + +.el-alert__title.is-bold { + font-weight: 700 +} + +.el-alert .el-alert__description { + font-size: 12px; + margin: 5px 0 0 +} + +.el-alert__closebtn { + font-size: 12px; + opacity: 1; + position: absolute; + top: 12px; + right: 15px; + cursor: pointer +} + +.el-alert-fade-enter, .el-alert-fade-leave-active, .el-loading-fade-enter, .el-loading-fade-leave-active, .el-notification-fade-leave-active { + opacity: 0 +} + +.el-alert__closebtn.is-customed { + font-style: normal; + font-size: 13px; + top: 9px +} + +.el-notification { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + width: 330px; + padding: 14px 26px 14px 13px; + border-radius: 8px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid #EBEEF5; + position: fixed; + background-color: #FFF; + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + -webkit-transition: opacity .3s, left .3s, right .3s, top .4s, bottom .3s, -webkit-transform .3s; + transition: opacity .3s, left .3s, right .3s, top .4s, bottom .3s, -webkit-transform .3s; + transition: opacity .3s, transform .3s, left .3s, right .3s, top .4s, bottom .3s; + transition: opacity .3s, transform .3s, left .3s, right .3s, top .4s, bottom .3s, -webkit-transform .3s; + overflow: hidden +} + +.el-notification.right { + right: 16px +} + +.el-notification.left { + left: 16px +} + +.el-notification__group { + margin-left: 13px; + margin-right: 8px +} + +.el-notification__title { + font-weight: 700; + font-size: 16px; + color: #303133; + margin: 0 +} + +.el-notification__content { + font-size: 14px; + line-height: 21px; + margin: 6px 0 0; + color: #606266; + text-align: justify +} + +.el-notification__content p { + margin: 0 +} + +.el-notification__icon { + height: 24px; + width: 24px; + font-size: 24px +} + +.el-notification__closeBtn { + position: absolute; + top: 18px; + right: 15px; + cursor: pointer; + color: #909399; + font-size: 16px +} + +.el-notification__closeBtn:hover { + color: #606266 +} + +.el-notification .el-icon-success { + color: #67C23A +} + +.el-notification .el-icon-error { + color: #F56C6C +} + +.el-notification .el-icon-info { + color: #909399 +} + +.el-notification .el-icon-warning { + color: #E6A23C +} + +.el-notification-fade-enter.right { + right: 0; + -webkit-transform: translateX(100%); + transform: translateX(100%) +} + +.el-notification-fade-enter.left { + left: 0; + -webkit-transform: translateX(-100%); + transform: translateX(-100%) +} + +.el-input-number { + position: relative; + display: inline-block; + width: 180px; + line-height: 38px +} + +.el-input-number .el-input { + display: block +} + +.el-input-number .el-input__inner { + -webkit-appearance: none; + padding-left: 50px; + padding-right: 50px; + text-align: center +} + +.el-input-number__decrease, .el-input-number__increase { + position: absolute; + z-index: 1; + top: 1px; + width: 40px; + height: auto; + text-align: center; + background: #F5F7FA; + color: #606266; + cursor: pointer; + font-size: 13px +} + +.el-input-number__decrease:hover, .el-input-number__increase:hover { + color: #409EFF +} + +.el-input-number__decrease:hover:not(.is-disabled) ~ .el-input .el-input__inner:not(.is-disabled), .el-input-number__increase:hover:not(.is-disabled) ~ .el-input .el-input__inner:not(.is-disabled) { + border-color: #409EFF +} + +.el-input-number__decrease.is-disabled, .el-input-number__increase.is-disabled { + color: #C0C4CC; + cursor: not-allowed +} + +.el-input-number__increase { + right: 1px; + border-radius: 0 4px 4px 0; + border-left: 1px solid #DCDFE6 +} + +.el-input-number__decrease { + left: 1px; + border-radius: 4px 0 0 4px; + border-right: 1px solid #DCDFE6 +} + +.el-input-number.is-disabled .el-input-number__decrease, .el-input-number.is-disabled .el-input-number__increase { + border-color: #E4E7ED; + color: #E4E7ED +} + +.el-input-number.is-disabled .el-input-number__decrease:hover, .el-input-number.is-disabled .el-input-number__increase:hover { + color: #E4E7ED; + cursor: not-allowed +} + +.el-input-number--medium { + width: 200px; + line-height: 34px +} + +.el-input-number--medium .el-input-number__decrease, .el-input-number--medium .el-input-number__increase { + width: 36px; + font-size: 14px +} + +.el-input-number--medium .el-input__inner { + padding-left: 43px; + padding-right: 43px +} + +.el-input-number--small { + width: 130px; + line-height: 30px +} + +.el-input-number--small .el-input-number__decrease, .el-input-number--small .el-input-number__increase { + width: 32px; + font-size: 13px +} + +.el-input-number--small .el-input-number__decrease [class*=el-icon], .el-input-number--small .el-input-number__increase [class*=el-icon] { + -webkit-transform: scale(.9); + transform: scale(.9) +} + +.el-input-number--small .el-input__inner { + padding-left: 39px; + padding-right: 39px +} + +.el-input-number--mini { + width: 130px; + line-height: 26px +} + +.el-input-number--mini .el-input-number__decrease, .el-input-number--mini .el-input-number__increase { + width: 28px; + font-size: 12px +} + +.el-input-number--mini .el-input-number__decrease [class*=el-icon], .el-input-number--mini .el-input-number__increase [class*=el-icon] { + -webkit-transform: scale(.8); + transform: scale(.8) +} + +.el-input-number--mini .el-input__inner { + padding-left: 35px; + padding-right: 35px +} + +.el-input-number.is-without-controls .el-input__inner { + padding-left: 15px; + padding-right: 15px +} + +.el-input-number.is-controls-right .el-input__inner { + padding-left: 15px; + padding-right: 50px +} + +.el-input-number.is-controls-right .el-input-number__decrease, .el-input-number.is-controls-right .el-input-number__increase { + height: auto; + line-height: 19px +} + +.el-input-number.is-controls-right .el-input-number__decrease [class*=el-icon], .el-input-number.is-controls-right .el-input-number__increase [class*=el-icon] { + -webkit-transform: scale(.8); + transform: scale(.8) +} + +.el-input-number.is-controls-right .el-input-number__increase { + border-radius: 0 4px 0 0; + border-bottom: 1px solid #DCDFE6 +} + +.el-input-number.is-controls-right .el-input-number__decrease { + right: 1px; + bottom: 1px; + top: auto; + left: auto; + border-right: none; + border-left: 1px solid #DCDFE6; + border-radius: 0 0 4px +} + +.el-input-number.is-controls-right[class*=medium] [class*=decrease], .el-input-number.is-controls-right[class*=medium] [class*=increase] { + line-height: 17px +} + +.el-input-number.is-controls-right[class*=small] [class*=decrease], .el-input-number.is-controls-right[class*=small] [class*=increase] { + line-height: 15px +} + +.el-input-number.is-controls-right[class*=mini] [class*=decrease], .el-input-number.is-controls-right[class*=mini] [class*=increase] { + line-height: 13px +} + +.el-tooltip__popper { + position: absolute; + border-radius: 4px; + padding: 10px; + z-index: 2000; + font-size: 12px; + line-height: 1.2; + min-width: 10px; + word-wrap: break-word +} + +.el-tooltip__popper .popper__arrow, .el-tooltip__popper .popper__arrow::after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid +} + +.el-tooltip__popper .popper__arrow { + border-width: 6px +} + +.el-tooltip__popper .popper__arrow::after { + content: " "; + border-width: 5px +} + +.el-progress-bar__inner::after, .el-row::after, .el-row::before, .el-slider::after, .el-slider::before, .el-slider__button-wrapper::after, .el-upload-cover::after { + content: "" +} + +.el-tooltip__popper[x-placement^=top] { + margin-bottom: 12px +} + +.el-tooltip__popper[x-placement^=top] .popper__arrow { + bottom: -6px; + border-top-color: #303133; + border-bottom-width: 0 +} + +.el-tooltip__popper[x-placement^=top] .popper__arrow::after { + bottom: 1px; + margin-left: -5px; + border-top-color: #303133; + border-bottom-width: 0 +} + +.el-tooltip__popper[x-placement^=bottom] { + margin-top: 12px +} + +.el-tooltip__popper[x-placement^=bottom] .popper__arrow { + top: -6px; + border-top-width: 0; + border-bottom-color: #303133 +} + +.el-tooltip__popper[x-placement^=bottom] .popper__arrow::after { + top: 1px; + margin-left: -5px; + border-top-width: 0; + border-bottom-color: #303133 +} + +.el-tooltip__popper[x-placement^=right] { + margin-left: 12px +} + +.el-tooltip__popper[x-placement^=right] .popper__arrow { + left: -6px; + border-right-color: #303133; + border-left-width: 0 +} + +.el-tooltip__popper[x-placement^=right] .popper__arrow::after { + bottom: -5px; + left: 1px; + border-right-color: #303133; + border-left-width: 0 +} + +.el-tooltip__popper[x-placement^=left] { + margin-right: 12px +} + +.el-tooltip__popper[x-placement^=left] .popper__arrow { + right: -6px; + border-right-width: 0; + border-left-color: #303133 +} + +.el-tooltip__popper[x-placement^=left] .popper__arrow::after { + right: 1px; + bottom: -5px; + margin-left: -5px; + border-right-width: 0; + border-left-color: #303133 +} + +.el-tooltip__popper.is-dark { + background: #303133; + color: #FFF +} + +.el-tooltip__popper.is-light { + background: #FFF; + border: 1px solid #303133 +} + +.el-tooltip__popper.is-light[x-placement^=top] .popper__arrow { + border-top-color: #303133 +} + +.el-tooltip__popper.is-light[x-placement^=top] .popper__arrow::after { + border-top-color: #FFF +} + +.el-tooltip__popper.is-light[x-placement^=bottom] .popper__arrow { + border-bottom-color: #303133 +} + +.el-tooltip__popper.is-light[x-placement^=bottom] .popper__arrow::after { + border-bottom-color: #FFF +} + +.el-tooltip__popper.is-light[x-placement^=left] .popper__arrow { + border-left-color: #303133 +} + +.el-tooltip__popper.is-light[x-placement^=left] .popper__arrow::after { + border-left-color: #FFF +} + +.el-tooltip__popper.is-light[x-placement^=right] .popper__arrow { + border-right-color: #303133 +} + +.el-tooltip__popper.is-light[x-placement^=right] .popper__arrow::after { + border-right-color: #FFF +} + +.el-slider::after, .el-slider::before { + display: table +} + +.el-slider__button-wrapper .el-tooltip, .el-slider__button-wrapper::after { + vertical-align: middle; + display: inline-block +} + +.el-slider::after { + clear: both +} + +.el-slider__runway { + width: 100%; + height: 6px; + margin: 16px 0; + background-color: #E4E7ED; + border-radius: 3px; + position: relative; + cursor: pointer; + vertical-align: middle +} + +.el-slider__runway.show-input { + margin-right: 160px; + width: auto +} + +.el-slider__runway.disabled { + cursor: default +} + +.el-slider__runway.disabled .el-slider__bar { + background-color: #C0C4CC +} + +.el-slider__runway.disabled .el-slider__button { + border-color: #C0C4CC +} + +.el-slider__runway.disabled .el-slider__button-wrapper.dragging, .el-slider__runway.disabled .el-slider__button-wrapper.hover, .el-slider__runway.disabled .el-slider__button-wrapper:hover { + cursor: not-allowed +} + +.el-slider__runway.disabled .el-slider__button.dragging, .el-slider__runway.disabled .el-slider__button.hover, .el-slider__runway.disabled .el-slider__button:hover { + -webkit-transform: scale(1); + transform: scale(1); + cursor: not-allowed +} + +.el-slider__button-wrapper, .el-slider__stop { + -webkit-transform: translateX(-50%); + position: absolute +} + +.el-slider__input { + float: right; + margin-top: 3px; + width: 130px +} + +.el-slider__input.el-input-number--mini { + margin-top: 5px +} + +.el-slider__input.el-input-number--medium { + margin-top: 0 +} + +.el-slider__input.el-input-number--large { + margin-top: -2px +} + +.el-slider__bar { + height: 6px; + background-color: #409EFF; + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + position: absolute +} + +.el-slider__button-wrapper { + height: 36px; + width: 36px; + z-index: 1001; + top: -15px; + transform: translateX(-50%); + background-color: transparent; + text-align: center; + user-select: none; + line-height: normal +} + +.el-slider__button-wrapper::after { + height: 100% +} + +.el-slider__button-wrapper.hover, .el-slider__button-wrapper:hover { + cursor: -webkit-grab; + cursor: grab +} + +.el-slider__button-wrapper.dragging { + cursor: -webkit-grabbing; + cursor: grabbing +} + +.el-slider__button { + width: 16px; + height: 16px; + border: 2px solid #409EFF; + background-color: #FFF; + border-radius: 50%; + -webkit-transition: .2s; + transition: .2s; + user-select: none +} + +.el-image-viewer__btn, .el-step__icon-inner { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none +} + +.el-slider__button.dragging, .el-slider__button.hover, .el-slider__button:hover { + -webkit-transform: scale(1.2); + transform: scale(1.2) +} + +.el-slider__button.hover, .el-slider__button:hover { + cursor: -webkit-grab; + cursor: grab +} + +.el-slider__button.dragging { + cursor: -webkit-grabbing; + cursor: grabbing +} + +.el-slider__stop { + height: 6px; + width: 6px; + border-radius: 100%; + background-color: #FFF; + transform: translateX(-50%) +} + +.el-slider__marks { + top: 0; + left: 12px; + width: 18px; + height: 100% +} + +.el-slider__marks-text { + position: absolute; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + font-size: 14px; + color: #909399; + margin-top: 15px +} + +.el-slider.is-vertical { + position: relative +} + +.el-slider.is-vertical .el-slider__runway { + width: 6px; + height: 100%; + margin: 0 16px +} + +.el-slider.is-vertical .el-slider__bar { + width: 6px; + height: auto; + border-radius: 0 0 3px 3px +} + +.el-slider.is-vertical .el-slider__button-wrapper { + top: auto; + left: -15px; + -webkit-transform: translateY(50%); + transform: translateY(50%) +} + +.el-slider.is-vertical .el-slider__stop { + -webkit-transform: translateY(50%); + transform: translateY(50%) +} + +.el-slider.is-vertical.el-slider--with-input { + padding-bottom: 58px +} + +.el-slider.is-vertical.el-slider--with-input .el-slider__input { + overflow: visible; + float: none; + position: absolute; + bottom: 22px; + width: 36px; + margin-top: 15px +} + +.el-slider.is-vertical.el-slider--with-input .el-slider__input .el-input__inner { + text-align: center; + padding-left: 5px; + padding-right: 5px +} + +.el-slider.is-vertical.el-slider--with-input .el-slider__input .el-input-number__decrease, .el-slider.is-vertical.el-slider--with-input .el-slider__input .el-input-number__increase { + top: 32px; + margin-top: -1px; + border: 1px solid #DCDFE6; + line-height: 20px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: border-color .2s cubic-bezier(.645, .045, .355, 1); + transition: border-color .2s cubic-bezier(.645, .045, .355, 1) +} + +.el-slider.is-vertical.el-slider--with-input .el-slider__input .el-input-number__decrease { + width: 18px; + right: 18px; + border-bottom-left-radius: 4px +} + +.el-slider.is-vertical.el-slider--with-input .el-slider__input .el-input-number__increase { + width: 19px; + border-bottom-right-radius: 4px +} + +.el-slider.is-vertical.el-slider--with-input .el-slider__input .el-input-number__increase ~ .el-input .el-input__inner { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0 +} + +.el-slider.is-vertical.el-slider--with-input .el-slider__input:hover .el-input-number__decrease, .el-slider.is-vertical.el-slider--with-input .el-slider__input:hover .el-input-number__increase { + border-color: #C0C4CC +} + +.el-slider.is-vertical.el-slider--with-input .el-slider__input:active .el-input-number__decrease, .el-slider.is-vertical.el-slider--with-input .el-slider__input:active .el-input-number__increase { + border-color: #409EFF +} + +.el-slider.is-vertical .el-slider__marks-text { + margin-top: 0; + left: 15px; + -webkit-transform: translateY(50%); + transform: translateY(50%) +} + +.el-loading-parent--relative { + position: relative !important +} + +.el-loading-parent--hidden { + overflow: hidden !important +} + +.el-loading-mask { + position: absolute; + z-index: 2000; + background-color: rgba(255, 255, 255, .9); + margin: 0; + top: 0; + right: 0; + bottom: 0; + left: 0; + -webkit-transition: opacity .3s; + transition: opacity .3s +} + +.el-loading-mask.is-fullscreen { + position: fixed +} + +.el-loading-mask.is-fullscreen .el-loading-spinner { + margin-top: -25px +} + +.el-loading-mask.is-fullscreen .el-loading-spinner .circular { + height: 50px; + width: 50px +} + +.el-loading-spinner { + top: 50%; + margin-top: -21px; + width: 100%; + text-align: center; + position: absolute +} + +.el-col-pull-0, .el-col-pull-1, .el-col-pull-10, .el-col-pull-11, .el-col-pull-13, .el-col-pull-14, .el-col-pull-15, .el-col-pull-16, .el-col-pull-17, .el-col-pull-18, .el-col-pull-19, .el-col-pull-2, .el-col-pull-20, .el-col-pull-21, .el-col-pull-22, .el-col-pull-23, .el-col-pull-24, .el-col-pull-3, .el-col-pull-4, .el-col-pull-5, .el-col-pull-6, .el-col-pull-7, .el-col-pull-8, .el-col-pull-9, .el-col-push-0, .el-col-push-1, .el-col-push-10, .el-col-push-11, .el-col-push-12, .el-col-push-13, .el-col-push-14, .el-col-push-15, .el-col-push-16, .el-col-push-17, .el-col-push-18, .el-col-push-19, .el-col-push-2, .el-col-push-20, .el-col-push-21, .el-col-push-22, .el-col-push-23, .el-col-push-24, .el-col-push-3, .el-col-push-4, .el-col-push-5, .el-col-push-6, .el-col-push-7, .el-col-push-8, .el-col-push-9, .el-row { + position: relative +} + +.el-loading-spinner .el-loading-text { + color: #409EFF; + margin: 3px 0; + font-size: 14px +} + +.el-loading-spinner .circular { + height: 42px; + width: 42px; + -webkit-animation: loading-rotate 2s linear infinite; + animation: loading-rotate 2s linear infinite +} + +.el-loading-spinner .path { + -webkit-animation: loading-dash 1.5s ease-in-out infinite; + animation: loading-dash 1.5s ease-in-out infinite; + stroke-dasharray: 90, 150; + stroke-dashoffset: 0; + stroke-width: 2; + stroke: #409EFF; + stroke-linecap: round +} + +.el-loading-spinner i { + color: #409EFF +} + +@-webkit-keyframes loading-rotate { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg) + } +} + +@keyframes loading-rotate { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg) + } +} + +@-webkit-keyframes loading-dash { + 0% { + stroke-dasharray: 1, 200; + stroke-dashoffset: 0 + } + 50% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -40px + } + 100% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -120px + } +} + +@keyframes loading-dash { + 0% { + stroke-dasharray: 1, 200; + stroke-dashoffset: 0 + } + 50% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -40px + } + 100% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -120px + } +} + +.el-row { + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-row::after, .el-row::before { + display: table +} + +.el-row::after { + clear: both +} + +.el-row--flex { + display: -webkit-box; + display: -ms-flexbox; + display: flex +} + +.el-col-0, .el-row--flex:after, .el-row--flex:before { + display: none +} + +.el-row--flex.is-justify-center { + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center +} + +.el-row--flex.is-justify-end { + -webkit-box-pack: end; + -ms-flex-pack: end; + justify-content: flex-end +} + +.el-row--flex.is-justify-space-between { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between +} + +.el-row--flex.is-justify-space-around { + -ms-flex-pack: distribute; + justify-content: space-around +} + +.el-row--flex.is-align-top { + -webkit-box-align: start; + -ms-flex-align: start; + align-items: flex-start +} + +.el-row--flex.is-align-middle { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center +} + +.el-row--flex.is-align-bottom { + -webkit-box-align: end; + -ms-flex-align: end; + align-items: flex-end +} + +[class*=el-col-] { + float: left; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-upload--picture-card, .el-upload-dragger { + -webkit-box-sizing: border-box; + cursor: pointer +} + +.el-col-0 { + width: 0% +} + +.el-col-offset-0 { + margin-left: 0 +} + +.el-col-pull-0 { + right: 0 +} + +.el-col-push-0 { + left: 0 +} + +.el-col-1 { + width: 4.16667% +} + +.el-col-offset-1 { + margin-left: 4.16667% +} + +.el-col-pull-1 { + right: 4.16667% +} + +.el-col-push-1 { + left: 4.16667% +} + +.el-col-2 { + width: 8.33333% +} + +.el-col-offset-2 { + margin-left: 8.33333% +} + +.el-col-pull-2 { + right: 8.33333% +} + +.el-col-push-2 { + left: 8.33333% +} + +.el-col-3 { + width: 12.5% +} + +.el-col-offset-3 { + margin-left: 12.5% +} + +.el-col-pull-3 { + right: 12.5% +} + +.el-col-push-3 { + left: 12.5% +} + +.el-col-4 { + width: 16.66667% +} + +.el-col-offset-4 { + margin-left: 16.66667% +} + +.el-col-pull-4 { + right: 16.66667% +} + +.el-col-push-4 { + left: 16.66667% +} + +.el-col-5 { + width: 20.83333% +} + +.el-col-offset-5 { + margin-left: 20.83333% +} + +.el-col-pull-5 { + right: 20.83333% +} + +.el-col-push-5 { + left: 20.83333% +} + +.el-col-6 { + width: 25% +} + +.el-col-offset-6 { + margin-left: 25% +} + +.el-col-pull-6 { + right: 25% +} + +.el-col-push-6 { + left: 25% +} + +.el-col-7 { + width: 29.16667% +} + +.el-col-offset-7 { + margin-left: 29.16667% +} + +.el-col-pull-7 { + right: 29.16667% +} + +.el-col-push-7 { + left: 29.16667% +} + +.el-col-8 { + width: 33.33333% +} + +.el-col-offset-8 { + margin-left: 33.33333% +} + +.el-col-pull-8 { + right: 33.33333% +} + +.el-col-push-8 { + left: 33.33333% +} + +.el-col-9 { + width: 37.5% +} + +.el-col-offset-9 { + margin-left: 37.5% +} + +.el-col-pull-9 { + right: 37.5% +} + +.el-col-push-9 { + left: 37.5% +} + +.el-col-10 { + width: 41.66667% +} + +.el-col-offset-10 { + margin-left: 41.66667% +} + +.el-col-pull-10 { + right: 41.66667% +} + +.el-col-push-10 { + left: 41.66667% +} + +.el-col-11 { + width: 45.83333% +} + +.el-col-offset-11 { + margin-left: 45.83333% +} + +.el-col-pull-11 { + right: 45.83333% +} + +.el-col-push-11 { + left: 45.83333% +} + +.el-col-12 { + width: 50% +} + +.el-col-offset-12 { + margin-left: 50% +} + +.el-col-pull-12 { + position: relative; + right: 50% +} + +.el-col-push-12 { + left: 50% +} + +.el-col-13 { + width: 54.16667% +} + +.el-col-offset-13 { + margin-left: 54.16667% +} + +.el-col-pull-13 { + right: 54.16667% +} + +.el-col-push-13 { + left: 54.16667% +} + +.el-col-14 { + width: 58.33333% +} + +.el-col-offset-14 { + margin-left: 58.33333% +} + +.el-col-pull-14 { + right: 58.33333% +} + +.el-col-push-14 { + left: 58.33333% +} + +.el-col-15 { + width: 62.5% +} + +.el-col-offset-15 { + margin-left: 62.5% +} + +.el-col-pull-15 { + right: 62.5% +} + +.el-col-push-15 { + left: 62.5% +} + +.el-col-16 { + width: 66.66667% +} + +.el-col-offset-16 { + margin-left: 66.66667% +} + +.el-col-pull-16 { + right: 66.66667% +} + +.el-col-push-16 { + left: 66.66667% +} + +.el-col-17 { + width: 70.83333% +} + +.el-col-offset-17 { + margin-left: 70.83333% +} + +.el-col-pull-17 { + right: 70.83333% +} + +.el-col-push-17 { + left: 70.83333% +} + +.el-col-18 { + width: 75% +} + +.el-col-offset-18 { + margin-left: 75% +} + +.el-col-pull-18 { + right: 75% +} + +.el-col-push-18 { + left: 75% +} + +.el-col-19 { + width: 79.16667% +} + +.el-col-offset-19 { + margin-left: 79.16667% +} + +.el-col-pull-19 { + right: 79.16667% +} + +.el-col-push-19 { + left: 79.16667% +} + +.el-col-20 { + width: 83.33333% +} + +.el-col-offset-20 { + margin-left: 83.33333% +} + +.el-col-pull-20 { + right: 83.33333% +} + +.el-col-push-20 { + left: 83.33333% +} + +.el-col-21 { + width: 87.5% +} + +.el-col-offset-21 { + margin-left: 87.5% +} + +.el-col-pull-21 { + right: 87.5% +} + +.el-col-push-21 { + left: 87.5% +} + +.el-col-22 { + width: 91.66667% +} + +.el-col-offset-22 { + margin-left: 91.66667% +} + +.el-col-pull-22 { + right: 91.66667% +} + +.el-col-push-22 { + left: 91.66667% +} + +.el-col-23 { + width: 95.83333% +} + +.el-col-offset-23 { + margin-left: 95.83333% +} + +.el-col-pull-23 { + right: 95.83333% +} + +.el-col-push-23 { + left: 95.83333% +} + +.el-col-24 { + width: 100% +} + +.el-col-offset-24 { + margin-left: 100% +} + +.el-col-pull-24 { + right: 100% +} + +.el-col-push-24 { + left: 100% +} + +@media only screen and (max-width: 767px) { + .el-col-xs-0 { + display: none; + width: 0% + } + + .el-col-xs-offset-0 { + margin-left: 0 + } + + .el-col-xs-pull-0 { + position: relative; + right: 0 + } + + .el-col-xs-push-0 { + position: relative; + left: 0 + } + + .el-col-xs-1 { + width: 4.16667% + } + + .el-col-xs-offset-1 { + margin-left: 4.16667% + } + + .el-col-xs-pull-1 { + position: relative; + right: 4.16667% + } + + .el-col-xs-push-1 { + position: relative; + left: 4.16667% + } + + .el-col-xs-2 { + width: 8.33333% + } + + .el-col-xs-offset-2 { + margin-left: 8.33333% + } + + .el-col-xs-pull-2 { + position: relative; + right: 8.33333% + } + + .el-col-xs-push-2 { + position: relative; + left: 8.33333% + } + + .el-col-xs-3 { + width: 12.5% + } + + .el-col-xs-offset-3 { + margin-left: 12.5% + } + + .el-col-xs-pull-3 { + position: relative; + right: 12.5% + } + + .el-col-xs-push-3 { + position: relative; + left: 12.5% + } + + .el-col-xs-4 { + width: 16.66667% + } + + .el-col-xs-offset-4 { + margin-left: 16.66667% + } + + .el-col-xs-pull-4 { + position: relative; + right: 16.66667% + } + + .el-col-xs-push-4 { + position: relative; + left: 16.66667% + } + + .el-col-xs-5 { + width: 20.83333% + } + + .el-col-xs-offset-5 { + margin-left: 20.83333% + } + + .el-col-xs-pull-5 { + position: relative; + right: 20.83333% + } + + .el-col-xs-push-5 { + position: relative; + left: 20.83333% + } + + .el-col-xs-6 { + width: 25% + } + + .el-col-xs-offset-6 { + margin-left: 25% + } + + .el-col-xs-pull-6 { + position: relative; + right: 25% + } + + .el-col-xs-push-6 { + position: relative; + left: 25% + } + + .el-col-xs-7 { + width: 29.16667% + } + + .el-col-xs-offset-7 { + margin-left: 29.16667% + } + + .el-col-xs-pull-7 { + position: relative; + right: 29.16667% + } + + .el-col-xs-push-7 { + position: relative; + left: 29.16667% + } + + .el-col-xs-8 { + width: 33.33333% + } + + .el-col-xs-offset-8 { + margin-left: 33.33333% + } + + .el-col-xs-pull-8 { + position: relative; + right: 33.33333% + } + + .el-col-xs-push-8 { + position: relative; + left: 33.33333% + } + + .el-col-xs-9 { + width: 37.5% + } + + .el-col-xs-offset-9 { + margin-left: 37.5% + } + + .el-col-xs-pull-9 { + position: relative; + right: 37.5% + } + + .el-col-xs-push-9 { + position: relative; + left: 37.5% + } + + .el-col-xs-10 { + width: 41.66667% + } + + .el-col-xs-offset-10 { + margin-left: 41.66667% + } + + .el-col-xs-pull-10 { + position: relative; + right: 41.66667% + } + + .el-col-xs-push-10 { + position: relative; + left: 41.66667% + } + + .el-col-xs-11 { + width: 45.83333% + } + + .el-col-xs-offset-11 { + margin-left: 45.83333% + } + + .el-col-xs-pull-11 { + position: relative; + right: 45.83333% + } + + .el-col-xs-push-11 { + position: relative; + left: 45.83333% + } + + .el-col-xs-12 { + width: 50% + } + + .el-col-xs-offset-12 { + margin-left: 50% + } + + .el-col-xs-pull-12 { + position: relative; + right: 50% + } + + .el-col-xs-push-12 { + position: relative; + left: 50% + } + + .el-col-xs-13 { + width: 54.16667% + } + + .el-col-xs-offset-13 { + margin-left: 54.16667% + } + + .el-col-xs-pull-13 { + position: relative; + right: 54.16667% + } + + .el-col-xs-push-13 { + position: relative; + left: 54.16667% + } + + .el-col-xs-14 { + width: 58.33333% + } + + .el-col-xs-offset-14 { + margin-left: 58.33333% + } + + .el-col-xs-pull-14 { + position: relative; + right: 58.33333% + } + + .el-col-xs-push-14 { + position: relative; + left: 58.33333% + } + + .el-col-xs-15 { + width: 62.5% + } + + .el-col-xs-offset-15 { + margin-left: 62.5% + } + + .el-col-xs-pull-15 { + position: relative; + right: 62.5% + } + + .el-col-xs-push-15 { + position: relative; + left: 62.5% + } + + .el-col-xs-16 { + width: 66.66667% + } + + .el-col-xs-offset-16 { + margin-left: 66.66667% + } + + .el-col-xs-pull-16 { + position: relative; + right: 66.66667% + } + + .el-col-xs-push-16 { + position: relative; + left: 66.66667% + } + + .el-col-xs-17 { + width: 70.83333% + } + + .el-col-xs-offset-17 { + margin-left: 70.83333% + } + + .el-col-xs-pull-17 { + position: relative; + right: 70.83333% + } + + .el-col-xs-push-17 { + position: relative; + left: 70.83333% + } + + .el-col-xs-18 { + width: 75% + } + + .el-col-xs-offset-18 { + margin-left: 75% + } + + .el-col-xs-pull-18 { + position: relative; + right: 75% + } + + .el-col-xs-push-18 { + position: relative; + left: 75% + } + + .el-col-xs-19 { + width: 79.16667% + } + + .el-col-xs-offset-19 { + margin-left: 79.16667% + } + + .el-col-xs-pull-19 { + position: relative; + right: 79.16667% + } + + .el-col-xs-push-19 { + position: relative; + left: 79.16667% + } + + .el-col-xs-20 { + width: 83.33333% + } + + .el-col-xs-offset-20 { + margin-left: 83.33333% + } + + .el-col-xs-pull-20 { + position: relative; + right: 83.33333% + } + + .el-col-xs-push-20 { + position: relative; + left: 83.33333% + } + + .el-col-xs-21 { + width: 87.5% + } + + .el-col-xs-offset-21 { + margin-left: 87.5% + } + + .el-col-xs-pull-21 { + position: relative; + right: 87.5% + } + + .el-col-xs-push-21 { + position: relative; + left: 87.5% + } + + .el-col-xs-22 { + width: 91.66667% + } + + .el-col-xs-offset-22 { + margin-left: 91.66667% + } + + .el-col-xs-pull-22 { + position: relative; + right: 91.66667% + } + + .el-col-xs-push-22 { + position: relative; + left: 91.66667% + } + + .el-col-xs-23 { + width: 95.83333% + } + + .el-col-xs-offset-23 { + margin-left: 95.83333% + } + + .el-col-xs-pull-23 { + position: relative; + right: 95.83333% + } + + .el-col-xs-push-23 { + position: relative; + left: 95.83333% + } + + .el-col-xs-24 { + width: 100% + } + + .el-col-xs-offset-24 { + margin-left: 100% + } + + .el-col-xs-pull-24 { + position: relative; + right: 100% + } + + .el-col-xs-push-24 { + position: relative; + left: 100% + } +} + +@media only screen and (min-width: 768px) { + .el-col-sm-0 { + display: none; + width: 0% + } + + .el-col-sm-offset-0 { + margin-left: 0 + } + + .el-col-sm-pull-0 { + position: relative; + right: 0 + } + + .el-col-sm-push-0 { + position: relative; + left: 0 + } + + .el-col-sm-1 { + width: 4.16667% + } + + .el-col-sm-offset-1 { + margin-left: 4.16667% + } + + .el-col-sm-pull-1 { + position: relative; + right: 4.16667% + } + + .el-col-sm-push-1 { + position: relative; + left: 4.16667% + } + + .el-col-sm-2 { + width: 8.33333% + } + + .el-col-sm-offset-2 { + margin-left: 8.33333% + } + + .el-col-sm-pull-2 { + position: relative; + right: 8.33333% + } + + .el-col-sm-push-2 { + position: relative; + left: 8.33333% + } + + .el-col-sm-3 { + width: 12.5% + } + + .el-col-sm-offset-3 { + margin-left: 12.5% + } + + .el-col-sm-pull-3 { + position: relative; + right: 12.5% + } + + .el-col-sm-push-3 { + position: relative; + left: 12.5% + } + + .el-col-sm-4 { + width: 16.66667% + } + + .el-col-sm-offset-4 { + margin-left: 16.66667% + } + + .el-col-sm-pull-4 { + position: relative; + right: 16.66667% + } + + .el-col-sm-push-4 { + position: relative; + left: 16.66667% + } + + .el-col-sm-5 { + width: 20.83333% + } + + .el-col-sm-offset-5 { + margin-left: 20.83333% + } + + .el-col-sm-pull-5 { + position: relative; + right: 20.83333% + } + + .el-col-sm-push-5 { + position: relative; + left: 20.83333% + } + + .el-col-sm-6 { + width: 25% + } + + .el-col-sm-offset-6 { + margin-left: 25% + } + + .el-col-sm-pull-6 { + position: relative; + right: 25% + } + + .el-col-sm-push-6 { + position: relative; + left: 25% + } + + .el-col-sm-7 { + width: 29.16667% + } + + .el-col-sm-offset-7 { + margin-left: 29.16667% + } + + .el-col-sm-pull-7 { + position: relative; + right: 29.16667% + } + + .el-col-sm-push-7 { + position: relative; + left: 29.16667% + } + + .el-col-sm-8 { + width: 33.33333% + } + + .el-col-sm-offset-8 { + margin-left: 33.33333% + } + + .el-col-sm-pull-8 { + position: relative; + right: 33.33333% + } + + .el-col-sm-push-8 { + position: relative; + left: 33.33333% + } + + .el-col-sm-9 { + width: 37.5% + } + + .el-col-sm-offset-9 { + margin-left: 37.5% + } + + .el-col-sm-pull-9 { + position: relative; + right: 37.5% + } + + .el-col-sm-push-9 { + position: relative; + left: 37.5% + } + + .el-col-sm-10 { + width: 41.66667% + } + + .el-col-sm-offset-10 { + margin-left: 41.66667% + } + + .el-col-sm-pull-10 { + position: relative; + right: 41.66667% + } + + .el-col-sm-push-10 { + position: relative; + left: 41.66667% + } + + .el-col-sm-11 { + width: 45.83333% + } + + .el-col-sm-offset-11 { + margin-left: 45.83333% + } + + .el-col-sm-pull-11 { + position: relative; + right: 45.83333% + } + + .el-col-sm-push-11 { + position: relative; + left: 45.83333% + } + + .el-col-sm-12 { + width: 50% + } + + .el-col-sm-offset-12 { + margin-left: 50% + } + + .el-col-sm-pull-12 { + position: relative; + right: 50% + } + + .el-col-sm-push-12 { + position: relative; + left: 50% + } + + .el-col-sm-13 { + width: 54.16667% + } + + .el-col-sm-offset-13 { + margin-left: 54.16667% + } + + .el-col-sm-pull-13 { + position: relative; + right: 54.16667% + } + + .el-col-sm-push-13 { + position: relative; + left: 54.16667% + } + + .el-col-sm-14 { + width: 58.33333% + } + + .el-col-sm-offset-14 { + margin-left: 58.33333% + } + + .el-col-sm-pull-14 { + position: relative; + right: 58.33333% + } + + .el-col-sm-push-14 { + position: relative; + left: 58.33333% + } + + .el-col-sm-15 { + width: 62.5% + } + + .el-col-sm-offset-15 { + margin-left: 62.5% + } + + .el-col-sm-pull-15 { + position: relative; + right: 62.5% + } + + .el-col-sm-push-15 { + position: relative; + left: 62.5% + } + + .el-col-sm-16 { + width: 66.66667% + } + + .el-col-sm-offset-16 { + margin-left: 66.66667% + } + + .el-col-sm-pull-16 { + position: relative; + right: 66.66667% + } + + .el-col-sm-push-16 { + position: relative; + left: 66.66667% + } + + .el-col-sm-17 { + width: 70.83333% + } + + .el-col-sm-offset-17 { + margin-left: 70.83333% + } + + .el-col-sm-pull-17 { + position: relative; + right: 70.83333% + } + + .el-col-sm-push-17 { + position: relative; + left: 70.83333% + } + + .el-col-sm-18 { + width: 75% + } + + .el-col-sm-offset-18 { + margin-left: 75% + } + + .el-col-sm-pull-18 { + position: relative; + right: 75% + } + + .el-col-sm-push-18 { + position: relative; + left: 75% + } + + .el-col-sm-19 { + width: 79.16667% + } + + .el-col-sm-offset-19 { + margin-left: 79.16667% + } + + .el-col-sm-pull-19 { + position: relative; + right: 79.16667% + } + + .el-col-sm-push-19 { + position: relative; + left: 79.16667% + } + + .el-col-sm-20 { + width: 83.33333% + } + + .el-col-sm-offset-20 { + margin-left: 83.33333% + } + + .el-col-sm-pull-20 { + position: relative; + right: 83.33333% + } + + .el-col-sm-push-20 { + position: relative; + left: 83.33333% + } + + .el-col-sm-21 { + width: 87.5% + } + + .el-col-sm-offset-21 { + margin-left: 87.5% + } + + .el-col-sm-pull-21 { + position: relative; + right: 87.5% + } + + .el-col-sm-push-21 { + position: relative; + left: 87.5% + } + + .el-col-sm-22 { + width: 91.66667% + } + + .el-col-sm-offset-22 { + margin-left: 91.66667% + } + + .el-col-sm-pull-22 { + position: relative; + right: 91.66667% + } + + .el-col-sm-push-22 { + position: relative; + left: 91.66667% + } + + .el-col-sm-23 { + width: 95.83333% + } + + .el-col-sm-offset-23 { + margin-left: 95.83333% + } + + .el-col-sm-pull-23 { + position: relative; + right: 95.83333% + } + + .el-col-sm-push-23 { + position: relative; + left: 95.83333% + } + + .el-col-sm-24 { + width: 100% + } + + .el-col-sm-offset-24 { + margin-left: 100% + } + + .el-col-sm-pull-24 { + position: relative; + right: 100% + } + + .el-col-sm-push-24 { + position: relative; + left: 100% + } +} + +@media only screen and (min-width: 992px) { + .el-col-md-0 { + display: none; + width: 0% + } + + .el-col-md-offset-0 { + margin-left: 0 + } + + .el-col-md-pull-0 { + position: relative; + right: 0 + } + + .el-col-md-push-0 { + position: relative; + left: 0 + } + + .el-col-md-1 { + width: 4.16667% + } + + .el-col-md-offset-1 { + margin-left: 4.16667% + } + + .el-col-md-pull-1 { + position: relative; + right: 4.16667% + } + + .el-col-md-push-1 { + position: relative; + left: 4.16667% + } + + .el-col-md-2 { + width: 8.33333% + } + + .el-col-md-offset-2 { + margin-left: 8.33333% + } + + .el-col-md-pull-2 { + position: relative; + right: 8.33333% + } + + .el-col-md-push-2 { + position: relative; + left: 8.33333% + } + + .el-col-md-3 { + width: 12.5% + } + + .el-col-md-offset-3 { + margin-left: 12.5% + } + + .el-col-md-pull-3 { + position: relative; + right: 12.5% + } + + .el-col-md-push-3 { + position: relative; + left: 12.5% + } + + .el-col-md-4 { + width: 16.66667% + } + + .el-col-md-offset-4 { + margin-left: 16.66667% + } + + .el-col-md-pull-4 { + position: relative; + right: 16.66667% + } + + .el-col-md-push-4 { + position: relative; + left: 16.66667% + } + + .el-col-md-5 { + width: 20.83333% + } + + .el-col-md-offset-5 { + margin-left: 20.83333% + } + + .el-col-md-pull-5 { + position: relative; + right: 20.83333% + } + + .el-col-md-push-5 { + position: relative; + left: 20.83333% + } + + .el-col-md-6 { + width: 25% + } + + .el-col-md-offset-6 { + margin-left: 25% + } + + .el-col-md-pull-6 { + position: relative; + right: 25% + } + + .el-col-md-push-6 { + position: relative; + left: 25% + } + + .el-col-md-7 { + width: 29.16667% + } + + .el-col-md-offset-7 { + margin-left: 29.16667% + } + + .el-col-md-pull-7 { + position: relative; + right: 29.16667% + } + + .el-col-md-push-7 { + position: relative; + left: 29.16667% + } + + .el-col-md-8 { + width: 33.33333% + } + + .el-col-md-offset-8 { + margin-left: 33.33333% + } + + .el-col-md-pull-8 { + position: relative; + right: 33.33333% + } + + .el-col-md-push-8 { + position: relative; + left: 33.33333% + } + + .el-col-md-9 { + width: 37.5% + } + + .el-col-md-offset-9 { + margin-left: 37.5% + } + + .el-col-md-pull-9 { + position: relative; + right: 37.5% + } + + .el-col-md-push-9 { + position: relative; + left: 37.5% + } + + .el-col-md-10 { + width: 41.66667% + } + + .el-col-md-offset-10 { + margin-left: 41.66667% + } + + .el-col-md-pull-10 { + position: relative; + right: 41.66667% + } + + .el-col-md-push-10 { + position: relative; + left: 41.66667% + } + + .el-col-md-11 { + width: 45.83333% + } + + .el-col-md-offset-11 { + margin-left: 45.83333% + } + + .el-col-md-pull-11 { + position: relative; + right: 45.83333% + } + + .el-col-md-push-11 { + position: relative; + left: 45.83333% + } + + .el-col-md-12 { + width: 50% + } + + .el-col-md-offset-12 { + margin-left: 50% + } + + .el-col-md-pull-12 { + position: relative; + right: 50% + } + + .el-col-md-push-12 { + position: relative; + left: 50% + } + + .el-col-md-13 { + width: 54.16667% + } + + .el-col-md-offset-13 { + margin-left: 54.16667% + } + + .el-col-md-pull-13 { + position: relative; + right: 54.16667% + } + + .el-col-md-push-13 { + position: relative; + left: 54.16667% + } + + .el-col-md-14 { + width: 58.33333% + } + + .el-col-md-offset-14 { + margin-left: 58.33333% + } + + .el-col-md-pull-14 { + position: relative; + right: 58.33333% + } + + .el-col-md-push-14 { + position: relative; + left: 58.33333% + } + + .el-col-md-15 { + width: 62.5% + } + + .el-col-md-offset-15 { + margin-left: 62.5% + } + + .el-col-md-pull-15 { + position: relative; + right: 62.5% + } + + .el-col-md-push-15 { + position: relative; + left: 62.5% + } + + .el-col-md-16 { + width: 66.66667% + } + + .el-col-md-offset-16 { + margin-left: 66.66667% + } + + .el-col-md-pull-16 { + position: relative; + right: 66.66667% + } + + .el-col-md-push-16 { + position: relative; + left: 66.66667% + } + + .el-col-md-17 { + width: 70.83333% + } + + .el-col-md-offset-17 { + margin-left: 70.83333% + } + + .el-col-md-pull-17 { + position: relative; + right: 70.83333% + } + + .el-col-md-push-17 { + position: relative; + left: 70.83333% + } + + .el-col-md-18 { + width: 75% + } + + .el-col-md-offset-18 { + margin-left: 75% + } + + .el-col-md-pull-18 { + position: relative; + right: 75% + } + + .el-col-md-push-18 { + position: relative; + left: 75% + } + + .el-col-md-19 { + width: 79.16667% + } + + .el-col-md-offset-19 { + margin-left: 79.16667% + } + + .el-col-md-pull-19 { + position: relative; + right: 79.16667% + } + + .el-col-md-push-19 { + position: relative; + left: 79.16667% + } + + .el-col-md-20 { + width: 83.33333% + } + + .el-col-md-offset-20 { + margin-left: 83.33333% + } + + .el-col-md-pull-20 { + position: relative; + right: 83.33333% + } + + .el-col-md-push-20 { + position: relative; + left: 83.33333% + } + + .el-col-md-21 { + width: 87.5% + } + + .el-col-md-offset-21 { + margin-left: 87.5% + } + + .el-col-md-pull-21 { + position: relative; + right: 87.5% + } + + .el-col-md-push-21 { + position: relative; + left: 87.5% + } + + .el-col-md-22 { + width: 91.66667% + } + + .el-col-md-offset-22 { + margin-left: 91.66667% + } + + .el-col-md-pull-22 { + position: relative; + right: 91.66667% + } + + .el-col-md-push-22 { + position: relative; + left: 91.66667% + } + + .el-col-md-23 { + width: 95.83333% + } + + .el-col-md-offset-23 { + margin-left: 95.83333% + } + + .el-col-md-pull-23 { + position: relative; + right: 95.83333% + } + + .el-col-md-push-23 { + position: relative; + left: 95.83333% + } + + .el-col-md-24 { + width: 100% + } + + .el-col-md-offset-24 { + margin-left: 100% + } + + .el-col-md-pull-24 { + position: relative; + right: 100% + } + + .el-col-md-push-24 { + position: relative; + left: 100% + } +} + +@media only screen and (min-width: 1200px) { + .el-col-lg-0 { + display: none; + width: 0% + } + + .el-col-lg-offset-0 { + margin-left: 0 + } + + .el-col-lg-pull-0 { + position: relative; + right: 0 + } + + .el-col-lg-push-0 { + position: relative; + left: 0 + } + + .el-col-lg-1 { + width: 4.16667% + } + + .el-col-lg-offset-1 { + margin-left: 4.16667% + } + + .el-col-lg-pull-1 { + position: relative; + right: 4.16667% + } + + .el-col-lg-push-1 { + position: relative; + left: 4.16667% + } + + .el-col-lg-2 { + width: 8.33333% + } + + .el-col-lg-offset-2 { + margin-left: 8.33333% + } + + .el-col-lg-pull-2 { + position: relative; + right: 8.33333% + } + + .el-col-lg-push-2 { + position: relative; + left: 8.33333% + } + + .el-col-lg-3 { + width: 12.5% + } + + .el-col-lg-offset-3 { + margin-left: 12.5% + } + + .el-col-lg-pull-3 { + position: relative; + right: 12.5% + } + + .el-col-lg-push-3 { + position: relative; + left: 12.5% + } + + .el-col-lg-4 { + width: 16.66667% + } + + .el-col-lg-offset-4 { + margin-left: 16.66667% + } + + .el-col-lg-pull-4 { + position: relative; + right: 16.66667% + } + + .el-col-lg-push-4 { + position: relative; + left: 16.66667% + } + + .el-col-lg-5 { + width: 20.83333% + } + + .el-col-lg-offset-5 { + margin-left: 20.83333% + } + + .el-col-lg-pull-5 { + position: relative; + right: 20.83333% + } + + .el-col-lg-push-5 { + position: relative; + left: 20.83333% + } + + .el-col-lg-6 { + width: 25% + } + + .el-col-lg-offset-6 { + margin-left: 25% + } + + .el-col-lg-pull-6 { + position: relative; + right: 25% + } + + .el-col-lg-push-6 { + position: relative; + left: 25% + } + + .el-col-lg-7 { + width: 29.16667% + } + + .el-col-lg-offset-7 { + margin-left: 29.16667% + } + + .el-col-lg-pull-7 { + position: relative; + right: 29.16667% + } + + .el-col-lg-push-7 { + position: relative; + left: 29.16667% + } + + .el-col-lg-8 { + width: 33.33333% + } + + .el-col-lg-offset-8 { + margin-left: 33.33333% + } + + .el-col-lg-pull-8 { + position: relative; + right: 33.33333% + } + + .el-col-lg-push-8 { + position: relative; + left: 33.33333% + } + + .el-col-lg-9 { + width: 37.5% + } + + .el-col-lg-offset-9 { + margin-left: 37.5% + } + + .el-col-lg-pull-9 { + position: relative; + right: 37.5% + } + + .el-col-lg-push-9 { + position: relative; + left: 37.5% + } + + .el-col-lg-10 { + width: 41.66667% + } + + .el-col-lg-offset-10 { + margin-left: 41.66667% + } + + .el-col-lg-pull-10 { + position: relative; + right: 41.66667% + } + + .el-col-lg-push-10 { + position: relative; + left: 41.66667% + } + + .el-col-lg-11 { + width: 45.83333% + } + + .el-col-lg-offset-11 { + margin-left: 45.83333% + } + + .el-col-lg-pull-11 { + position: relative; + right: 45.83333% + } + + .el-col-lg-push-11 { + position: relative; + left: 45.83333% + } + + .el-col-lg-12 { + width: 50% + } + + .el-col-lg-offset-12 { + margin-left: 50% + } + + .el-col-lg-pull-12 { + position: relative; + right: 50% + } + + .el-col-lg-push-12 { + position: relative; + left: 50% + } + + .el-col-lg-13 { + width: 54.16667% + } + + .el-col-lg-offset-13 { + margin-left: 54.16667% + } + + .el-col-lg-pull-13 { + position: relative; + right: 54.16667% + } + + .el-col-lg-push-13 { + position: relative; + left: 54.16667% + } + + .el-col-lg-14 { + width: 58.33333% + } + + .el-col-lg-offset-14 { + margin-left: 58.33333% + } + + .el-col-lg-pull-14 { + position: relative; + right: 58.33333% + } + + .el-col-lg-push-14 { + position: relative; + left: 58.33333% + } + + .el-col-lg-15 { + width: 62.5% + } + + .el-col-lg-offset-15 { + margin-left: 62.5% + } + + .el-col-lg-pull-15 { + position: relative; + right: 62.5% + } + + .el-col-lg-push-15 { + position: relative; + left: 62.5% + } + + .el-col-lg-16 { + width: 66.66667% + } + + .el-col-lg-offset-16 { + margin-left: 66.66667% + } + + .el-col-lg-pull-16 { + position: relative; + right: 66.66667% + } + + .el-col-lg-push-16 { + position: relative; + left: 66.66667% + } + + .el-col-lg-17 { + width: 70.83333% + } + + .el-col-lg-offset-17 { + margin-left: 70.83333% + } + + .el-col-lg-pull-17 { + position: relative; + right: 70.83333% + } + + .el-col-lg-push-17 { + position: relative; + left: 70.83333% + } + + .el-col-lg-18 { + width: 75% + } + + .el-col-lg-offset-18 { + margin-left: 75% + } + + .el-col-lg-pull-18 { + position: relative; + right: 75% + } + + .el-col-lg-push-18 { + position: relative; + left: 75% + } + + .el-col-lg-19 { + width: 79.16667% + } + + .el-col-lg-offset-19 { + margin-left: 79.16667% + } + + .el-col-lg-pull-19 { + position: relative; + right: 79.16667% + } + + .el-col-lg-push-19 { + position: relative; + left: 79.16667% + } + + .el-col-lg-20 { + width: 83.33333% + } + + .el-col-lg-offset-20 { + margin-left: 83.33333% + } + + .el-col-lg-pull-20 { + position: relative; + right: 83.33333% + } + + .el-col-lg-push-20 { + position: relative; + left: 83.33333% + } + + .el-col-lg-21 { + width: 87.5% + } + + .el-col-lg-offset-21 { + margin-left: 87.5% + } + + .el-col-lg-pull-21 { + position: relative; + right: 87.5% + } + + .el-col-lg-push-21 { + position: relative; + left: 87.5% + } + + .el-col-lg-22 { + width: 91.66667% + } + + .el-col-lg-offset-22 { + margin-left: 91.66667% + } + + .el-col-lg-pull-22 { + position: relative; + right: 91.66667% + } + + .el-col-lg-push-22 { + position: relative; + left: 91.66667% + } + + .el-col-lg-23 { + width: 95.83333% + } + + .el-col-lg-offset-23 { + margin-left: 95.83333% + } + + .el-col-lg-pull-23 { + position: relative; + right: 95.83333% + } + + .el-col-lg-push-23 { + position: relative; + left: 95.83333% + } + + .el-col-lg-24 { + width: 100% + } + + .el-col-lg-offset-24 { + margin-left: 100% + } + + .el-col-lg-pull-24 { + position: relative; + right: 100% + } + + .el-col-lg-push-24 { + position: relative; + left: 100% + } +} + +@media only screen and (min-width: 1920px) { + .el-col-xl-0 { + display: none; + width: 0% + } + + .el-col-xl-offset-0 { + margin-left: 0 + } + + .el-col-xl-pull-0 { + position: relative; + right: 0 + } + + .el-col-xl-push-0 { + position: relative; + left: 0 + } + + .el-col-xl-1 { + width: 4.16667% + } + + .el-col-xl-offset-1 { + margin-left: 4.16667% + } + + .el-col-xl-pull-1 { + position: relative; + right: 4.16667% + } + + .el-col-xl-push-1 { + position: relative; + left: 4.16667% + } + + .el-col-xl-2 { + width: 8.33333% + } + + .el-col-xl-offset-2 { + margin-left: 8.33333% + } + + .el-col-xl-pull-2 { + position: relative; + right: 8.33333% + } + + .el-col-xl-push-2 { + position: relative; + left: 8.33333% + } + + .el-col-xl-3 { + width: 12.5% + } + + .el-col-xl-offset-3 { + margin-left: 12.5% + } + + .el-col-xl-pull-3 { + position: relative; + right: 12.5% + } + + .el-col-xl-push-3 { + position: relative; + left: 12.5% + } + + .el-col-xl-4 { + width: 16.66667% + } + + .el-col-xl-offset-4 { + margin-left: 16.66667% + } + + .el-col-xl-pull-4 { + position: relative; + right: 16.66667% + } + + .el-col-xl-push-4 { + position: relative; + left: 16.66667% + } + + .el-col-xl-5 { + width: 20.83333% + } + + .el-col-xl-offset-5 { + margin-left: 20.83333% + } + + .el-col-xl-pull-5 { + position: relative; + right: 20.83333% + } + + .el-col-xl-push-5 { + position: relative; + left: 20.83333% + } + + .el-col-xl-6 { + width: 25% + } + + .el-col-xl-offset-6 { + margin-left: 25% + } + + .el-col-xl-pull-6 { + position: relative; + right: 25% + } + + .el-col-xl-push-6 { + position: relative; + left: 25% + } + + .el-col-xl-7 { + width: 29.16667% + } + + .el-col-xl-offset-7 { + margin-left: 29.16667% + } + + .el-col-xl-pull-7 { + position: relative; + right: 29.16667% + } + + .el-col-xl-push-7 { + position: relative; + left: 29.16667% + } + + .el-col-xl-8 { + width: 33.33333% + } + + .el-col-xl-offset-8 { + margin-left: 33.33333% + } + + .el-col-xl-pull-8 { + position: relative; + right: 33.33333% + } + + .el-col-xl-push-8 { + position: relative; + left: 33.33333% + } + + .el-col-xl-9 { + width: 37.5% + } + + .el-col-xl-offset-9 { + margin-left: 37.5% + } + + .el-col-xl-pull-9 { + position: relative; + right: 37.5% + } + + .el-col-xl-push-9 { + position: relative; + left: 37.5% + } + + .el-col-xl-10 { + width: 41.66667% + } + + .el-col-xl-offset-10 { + margin-left: 41.66667% + } + + .el-col-xl-pull-10 { + position: relative; + right: 41.66667% + } + + .el-col-xl-push-10 { + position: relative; + left: 41.66667% + } + + .el-col-xl-11 { + width: 45.83333% + } + + .el-col-xl-offset-11 { + margin-left: 45.83333% + } + + .el-col-xl-pull-11 { + position: relative; + right: 45.83333% + } + + .el-col-xl-push-11 { + position: relative; + left: 45.83333% + } + + .el-col-xl-12 { + width: 50% + } + + .el-col-xl-offset-12 { + margin-left: 50% + } + + .el-col-xl-pull-12 { + position: relative; + right: 50% + } + + .el-col-xl-push-12 { + position: relative; + left: 50% + } + + .el-col-xl-13 { + width: 54.16667% + } + + .el-col-xl-offset-13 { + margin-left: 54.16667% + } + + .el-col-xl-pull-13 { + position: relative; + right: 54.16667% + } + + .el-col-xl-push-13 { + position: relative; + left: 54.16667% + } + + .el-col-xl-14 { + width: 58.33333% + } + + .el-col-xl-offset-14 { + margin-left: 58.33333% + } + + .el-col-xl-pull-14 { + position: relative; + right: 58.33333% + } + + .el-col-xl-push-14 { + position: relative; + left: 58.33333% + } + + .el-col-xl-15 { + width: 62.5% + } + + .el-col-xl-offset-15 { + margin-left: 62.5% + } + + .el-col-xl-pull-15 { + position: relative; + right: 62.5% + } + + .el-col-xl-push-15 { + position: relative; + left: 62.5% + } + + .el-col-xl-16 { + width: 66.66667% + } + + .el-col-xl-offset-16 { + margin-left: 66.66667% + } + + .el-col-xl-pull-16 { + position: relative; + right: 66.66667% + } + + .el-col-xl-push-16 { + position: relative; + left: 66.66667% + } + + .el-col-xl-17 { + width: 70.83333% + } + + .el-col-xl-offset-17 { + margin-left: 70.83333% + } + + .el-col-xl-pull-17 { + position: relative; + right: 70.83333% + } + + .el-col-xl-push-17 { + position: relative; + left: 70.83333% + } + + .el-col-xl-18 { + width: 75% + } + + .el-col-xl-offset-18 { + margin-left: 75% + } + + .el-col-xl-pull-18 { + position: relative; + right: 75% + } + + .el-col-xl-push-18 { + position: relative; + left: 75% + } + + .el-col-xl-19 { + width: 79.16667% + } + + .el-col-xl-offset-19 { + margin-left: 79.16667% + } + + .el-col-xl-pull-19 { + position: relative; + right: 79.16667% + } + + .el-col-xl-push-19 { + position: relative; + left: 79.16667% + } + + .el-col-xl-20 { + width: 83.33333% + } + + .el-col-xl-offset-20 { + margin-left: 83.33333% + } + + .el-col-xl-pull-20 { + position: relative; + right: 83.33333% + } + + .el-col-xl-push-20 { + position: relative; + left: 83.33333% + } + + .el-col-xl-21 { + width: 87.5% + } + + .el-col-xl-offset-21 { + margin-left: 87.5% + } + + .el-col-xl-pull-21 { + position: relative; + right: 87.5% + } + + .el-col-xl-push-21 { + position: relative; + left: 87.5% + } + + .el-col-xl-22 { + width: 91.66667% + } + + .el-col-xl-offset-22 { + margin-left: 91.66667% + } + + .el-col-xl-pull-22 { + position: relative; + right: 91.66667% + } + + .el-col-xl-push-22 { + position: relative; + left: 91.66667% + } + + .el-col-xl-23 { + width: 95.83333% + } + + .el-col-xl-offset-23 { + margin-left: 95.83333% + } + + .el-col-xl-pull-23 { + position: relative; + right: 95.83333% + } + + .el-col-xl-push-23 { + position: relative; + left: 95.83333% + } + + .el-col-xl-24 { + width: 100% + } + + .el-col-xl-offset-24 { + margin-left: 100% + } + + .el-col-xl-pull-24 { + position: relative; + right: 100% + } + + .el-col-xl-push-24 { + position: relative; + left: 100% + } +} + +@-webkit-keyframes progress { + 0% { + background-position: 0 0 + } + 100% { + background-position: 32px 0 + } +} + +.el-upload { + display: inline-block; + text-align: center; + cursor: pointer; + outline: 0 +} + +.el-upload__input { + display: none +} + +.el-upload__tip { + font-size: 12px; + color: #606266; + margin-top: 7px +} + +.el-upload iframe { + position: absolute; + z-index: -1; + top: 0; + left: 0; + opacity: 0; + filter: alpha(opacity=0) +} + +.el-upload--picture-card { + background-color: #fbfdff; + border: 1px dashed #c0ccda; + border-radius: 6px; + box-sizing: border-box; + width: 148px; + height: 148px; + line-height: 146px; + vertical-align: top +} + +.el-upload--picture-card i { + font-size: 28px; + color: #8c939d +} + +.el-upload--picture-card:hover, .el-upload:focus { + border-color: #409EFF; + color: #409EFF +} + +.el-upload:focus .el-upload-dragger { + border-color: #409EFF +} + +.el-upload-dragger { + background-color: #fff; + border: 1px dashed #d9d9d9; + border-radius: 6px; + box-sizing: border-box; + width: 360px; + height: 180px; + text-align: center; + position: relative; + overflow: hidden +} + +.el-upload-dragger .el-icon-upload { + font-size: 67px; + color: #C0C4CC; + margin: 40px 0 16px; + line-height: 50px +} + +.el-upload-dragger + .el-upload__tip { + text-align: center +} + +.el-upload-dragger ~ .el-upload__files { + border-top: 1px solid #DCDFE6; + margin-top: 7px; + padding-top: 5px +} + +.el-upload-dragger .el-upload__text { + color: #606266; + font-size: 14px; + text-align: center +} + +.el-upload-dragger .el-upload__text em { + color: #409EFF; + font-style: normal +} + +.el-upload-dragger:hover { + border-color: #409EFF +} + +.el-upload-dragger.is-dragover { + background-color: rgba(32, 159, 255, .06); + border: 2px dashed #409EFF +} + +.el-upload-list { + margin: 0; + padding: 0; + list-style: none +} + +.el-upload-list__item { + -webkit-transition: all .5s cubic-bezier(.55, 0, .1, 1); + transition: all .5s cubic-bezier(.55, 0, .1, 1); + font-size: 14px; + color: #606266; + line-height: 1.8; + margin-top: 5px; + position: relative; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border-radius: 4px; + width: 100% +} + +.el-upload-list__item .el-progress { + position: absolute; + top: 20px; + width: 100% +} + +.el-upload-list__item .el-progress__text { + position: absolute; + right: 0; + top: -13px +} + +.el-upload-list__item .el-progress-bar { + margin-right: 0; + padding-right: 0 +} + +.el-upload-list__item:first-child { + margin-top: 10px +} + +.el-upload-list__item .el-icon-upload-success { + color: #67C23A +} + +.el-upload-list__item .el-icon-close { + display: none; + position: absolute; + top: 5px; + right: 5px; + cursor: pointer; + opacity: .75; + color: #606266 +} + +.el-upload-list__item .el-icon-close:hover { + opacity: 1 +} + +.el-upload-list__item .el-icon-close-tip { + display: none; + position: absolute; + top: 5px; + right: 5px; + font-size: 12px; + cursor: pointer; + opacity: 1; + color: #409EFF +} + +.el-upload-list__item:hover { + background-color: #F5F7FA +} + +.el-upload-list__item:hover .el-icon-close { + display: inline-block +} + +.el-upload-list__item:hover .el-progress__text { + display: none +} + +.el-upload-list__item.is-success .el-upload-list__item-status-label { + display: block +} + +.el-upload-list__item.is-success .el-upload-list__item-name:focus, .el-upload-list__item.is-success .el-upload-list__item-name:hover { + color: #409EFF; + cursor: pointer +} + +.el-upload-list__item.is-success:focus:not(:hover) .el-icon-close-tip { + display: inline-block +} + +.el-upload-list__item.is-success:active .el-icon-close-tip, .el-upload-list__item.is-success:focus .el-upload-list__item-status-label, .el-upload-list__item.is-success:hover .el-upload-list__item-status-label, .el-upload-list__item.is-success:not(.focusing):focus .el-icon-close-tip { + display: none +} + +.el-upload-list.is-disabled .el-upload-list__item:hover .el-upload-list__item-status-label { + display: block +} + +.el-upload-list__item-name { + color: #606266; + display: block; + margin-right: 40px; + overflow: hidden; + padding-left: 4px; + text-overflow: ellipsis; + -webkit-transition: color .3s; + transition: color .3s; + white-space: nowrap +} + +.el-upload-list__item-name [class^=el-icon] { + height: 100%; + margin-right: 7px; + color: #909399; + line-height: inherit +} + +.el-upload-list__item-status-label { + position: absolute; + right: 5px; + top: 0; + line-height: inherit; + display: none +} + +.el-upload-list__item-delete { + position: absolute; + right: 10px; + top: 0; + font-size: 12px; + color: #606266; + display: none +} + +.el-upload-list__item-delete:hover { + color: #409EFF +} + +.el-upload-list--picture-card { + margin: 0; + display: inline; + vertical-align: top +} + +.el-upload-list--picture-card .el-upload-list__item { + overflow: hidden; + background-color: #fff; + border: 1px solid #c0ccda; + border-radius: 6px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + width: 148px; + height: 148px; + margin: 0 8px 8px 0; + display: inline-block +} + +.el-upload-list--picture-card .el-upload-list__item .el-icon-check, .el-upload-list--picture-card .el-upload-list__item .el-icon-circle-check { + color: #FFF +} + +.el-upload-list--picture-card .el-upload-list__item .el-icon-close, .el-upload-list--picture-card .el-upload-list__item:hover .el-upload-list__item-status-label { + display: none +} + +.el-upload-list--picture-card .el-upload-list__item:hover .el-progress__text { + display: block +} + +.el-upload-list--picture-card .el-upload-list__item-name { + display: none +} + +.el-upload-list--picture-card .el-upload-list__item-thumbnail { + width: 100%; + height: 100% +} + +.el-upload-list--picture-card .el-upload-list__item-status-label { + position: absolute; + right: -15px; + top: -6px; + width: 40px; + height: 24px; + background: #13ce66; + text-align: center; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + -webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, .2); + box-shadow: 0 0 1pc 1px rgba(0, 0, 0, .2) +} + +.el-upload-list--picture-card .el-upload-list__item-status-label i { + font-size: 12px; + margin-top: 11px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg) +} + +.el-upload-list--picture-card .el-upload-list__item-actions { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + cursor: default; + text-align: center; + color: #fff; + opacity: 0; + font-size: 20px; + background-color: rgba(0, 0, 0, .5); + -webkit-transition: opacity .3s; + transition: opacity .3s +} + +.el-upload-list--picture-card .el-upload-list__item-actions::after { + display: inline-block; + content: ""; + height: 100%; + vertical-align: middle +} + +.el-upload-list--picture-card .el-upload-list__item-actions span { + display: none; + cursor: pointer +} + +.el-upload-list--picture-card .el-upload-list__item-actions span + span { + margin-left: 15px +} + +.el-upload-list--picture-card .el-upload-list__item-actions .el-upload-list__item-delete { + position: static; + font-size: inherit; + color: inherit +} + +.el-upload-list--picture-card .el-upload-list__item-actions:hover { + opacity: 1 +} + +.el-upload-list--picture-card .el-upload-list__item-actions:hover span { + display: inline-block +} + +.el-upload-list--picture-card .el-progress { + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + bottom: auto; + width: 126px +} + +.el-upload-list--picture-card .el-progress .el-progress__text { + top: 50% +} + +.el-upload-list--picture .el-upload-list__item { + overflow: hidden; + z-index: 0; + background-color: #fff; + border: 1px solid #c0ccda; + border-radius: 6px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin-top: 10px; + padding: 10px 10px 10px 90px; + height: 92px +} + +.el-upload-list--picture .el-upload-list__item .el-icon-check, .el-upload-list--picture .el-upload-list__item .el-icon-circle-check { + color: #FFF +} + +.el-upload-list--picture .el-upload-list__item:hover .el-upload-list__item-status-label { + background: 0 0; + -webkit-box-shadow: none; + box-shadow: none; + top: -2px; + right: -12px +} + +.el-upload-list--picture .el-upload-list__item:hover .el-progress__text { + display: block +} + +.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name { + line-height: 70px; + margin-top: 0 +} + +.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name i { + display: none +} + +.el-upload-list--picture .el-upload-list__item-thumbnail { + vertical-align: middle; + display: inline-block; + width: 70px; + height: 70px; + float: left; + position: relative; + z-index: 1; + margin-left: -80px; + background-color: #FFF +} + +.el-upload-list--picture .el-upload-list__item-name { + display: block; + margin-top: 20px +} + +.el-upload-list--picture .el-upload-list__item-name i { + font-size: 70px; + line-height: 1; + position: absolute; + left: 9px; + top: 10px +} + +.el-upload-list--picture .el-upload-list__item-status-label { + position: absolute; + right: -17px; + top: -7px; + width: 46px; + height: 26px; + background: #13ce66; + text-align: center; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + -webkit-box-shadow: 0 1px 1px #ccc; + box-shadow: 0 1px 1px #ccc +} + +.el-upload-list--picture .el-upload-list__item-status-label i { + font-size: 12px; + margin-top: 12px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg) +} + +.el-upload-list--picture .el-progress { + position: relative; + top: -7px +} + +.el-upload-cover { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: hidden; + z-index: 10; + cursor: default +} + +.el-upload-cover::after { + display: inline-block; + height: 100%; + vertical-align: middle +} + +.el-upload-cover img { + display: block; + width: 100%; + height: 100% +} + +.el-upload-cover__label { + position: absolute; + right: -15px; + top: -6px; + width: 40px; + height: 24px; + background: #13ce66; + text-align: center; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + -webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, .2); + box-shadow: 0 0 1pc 1px rgba(0, 0, 0, .2) +} + +.el-upload-cover__label i { + font-size: 12px; + margin-top: 11px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + color: #fff +} + +.el-upload-cover__progress { + display: inline-block; + vertical-align: middle; + position: static; + width: 243px +} + +.el-upload-cover__progress + .el-upload__inner { + opacity: 0 +} + +.el-upload-cover__content { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100% +} + +.el-upload-cover__interact { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, .72); + text-align: center +} + +.el-upload-cover__interact .btn { + display: inline-block; + color: #FFF; + font-size: 14px; + cursor: pointer; + vertical-align: middle; + -webkit-transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1); + transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1); + transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1); + transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1); + margin-top: 60px +} + +.el-upload-cover__interact .btn span { + opacity: 0; + -webkit-transition: opacity .15s linear; + transition: opacity .15s linear +} + +.el-upload-cover__interact .btn:not(:first-child) { + margin-left: 35px +} + +.el-upload-cover__interact .btn:hover { + -webkit-transform: translateY(-13px); + transform: translateY(-13px) +} + +.el-upload-cover__interact .btn:hover span { + opacity: 1 +} + +.el-upload-cover__interact .btn i { + color: #FFF; + display: block; + font-size: 24px; + line-height: inherit; + margin: 0 auto 5px +} + +.el-upload-cover__title { + position: absolute; + bottom: 0; + left: 0; + background-color: #FFF; + height: 36px; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-weight: 400; + text-align: left; + padding: 0 10px; + margin: 0; + line-height: 36px; + font-size: 14px; + color: #303133 +} + +.el-upload-cover + .el-upload__inner { + opacity: 0; + position: relative; + z-index: 1 +} + +.el-progress { + position: relative; + line-height: 1 +} + +.el-progress__text { + font-size: 14px; + color: #606266; + display: inline-block; + vertical-align: middle; + margin-left: 10px; + line-height: 1 +} + +.el-progress__text i { + vertical-align: middle; + display: block +} + +.el-progress--circle, .el-progress--dashboard { + display: inline-block +} + +.el-progress--circle .el-progress__text, .el-progress--dashboard .el-progress__text { + position: absolute; + top: 50%; + left: 0; + width: 100%; + text-align: center; + margin: 0; + -webkit-transform: translate(0, -50%); + transform: translate(0, -50%) +} + +.el-progress--circle .el-progress__text i, .el-progress--dashboard .el-progress__text i { + vertical-align: middle; + display: inline-block +} + +.el-progress--without-text .el-progress__text { + display: none +} + +.el-progress--without-text .el-progress-bar { + padding-right: 0; + margin-right: 0; + display: block +} + +.el-progress-bar, .el-progress-bar__inner::after, .el-progress-bar__innerText, .el-spinner { + display: inline-block; + vertical-align: middle +} + +.el-progress--text-inside .el-progress-bar { + padding-right: 0; + margin-right: 0 +} + +.el-progress.is-success .el-progress-bar__inner { + background-color: #67C23A +} + +.el-progress.is-success .el-progress__text { + color: #67C23A +} + +.el-progress.is-warning .el-progress-bar__inner { + background-color: #E6A23C +} + +.el-progress.is-warning .el-progress__text { + color: #E6A23C +} + +.el-progress.is-exception .el-progress-bar__inner { + background-color: #F56C6C +} + +.el-progress.is-exception .el-progress__text { + color: #F56C6C +} + +.el-progress-bar { + padding-right: 50px; + width: 100%; + margin-right: -55px; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-progress-bar__outer { + height: 6px; + border-radius: 100px; + background-color: #EBEEF5; + overflow: hidden; + position: relative; + vertical-align: middle +} + +.el-progress-bar__inner { + position: absolute; + left: 0; + top: 0; + height: 100%; + background-color: #409EFF; + text-align: right; + border-radius: 100px; + line-height: 1; + white-space: nowrap; + -webkit-transition: width .6s ease; + transition: width .6s ease +} + +.el-card, .el-message { + border-radius: 4px; + overflow: hidden +} + +.el-progress-bar__inner::after { + height: 100% +} + +.el-progress-bar__innerText { + color: #FFF; + font-size: 12px; + margin: 0 5px +} + +@keyframes progress { + 0% { + background-position: 0 0 + } + 100% { + background-position: 32px 0 + } +} + +.el-time-spinner { + width: 100%; + white-space: nowrap +} + +.el-spinner-inner { + -webkit-animation: rotate 2s linear infinite; + animation: rotate 2s linear infinite; + width: 50px; + height: 50px +} + +.el-spinner-inner .path { + stroke: #ececec; + stroke-linecap: round; + -webkit-animation: dash 1.5s ease-in-out infinite; + animation: dash 1.5s ease-in-out infinite +} + +@-webkit-keyframes rotate { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg) + } +} + +@keyframes rotate { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg) + } +} + +@-webkit-keyframes dash { + 0% { + stroke-dasharray: 1, 150; + stroke-dashoffset: 0 + } + 50% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -35 + } + 100% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -124 + } +} + +@keyframes dash { + 0% { + stroke-dasharray: 1, 150; + stroke-dashoffset: 0 + } + 50% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -35 + } + 100% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -124 + } +} + +.el-message { + min-width: 380px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border-width: 1px; + border-style: solid; + border-color: #EBEEF5; + position: fixed; + left: 50%; + top: 20px; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + background-color: #edf2fc; + -webkit-transition: opacity .3s, top .4s, -webkit-transform .4s; + transition: opacity .3s, top .4s, -webkit-transform .4s; + transition: opacity .3s, transform .4s, top .4s; + transition: opacity .3s, transform .4s, top .4s, -webkit-transform .4s; + padding: 15px 15px 15px 20px; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center +} + +.el-message.is-center { + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center +} + +.el-message.is-closable .el-message__content { + padding-right: 16px +} + +.el-message p { + margin: 0 +} + +.el-message--info .el-message__content { + color: #909399 +} + +.el-message--success { + background-color: #f0f9eb; + border-color: #e1f3d8 +} + +.el-message--success .el-message__content { + color: #67C23A +} + +.el-message--warning { + background-color: #fdf6ec; + border-color: #faecd8 +} + +.el-message--warning .el-message__content { + color: #E6A23C +} + +.el-message--error { + background-color: #fef0f0; + border-color: #fde2e2 +} + +.el-message--error .el-message__content { + color: #F56C6C +} + +.el-message__icon { + margin-right: 10px +} + +.el-message__content { + padding: 0; + font-size: 14px; + line-height: 1 +} + +.el-message__closeBtn { + position: absolute; + top: 50%; + right: 15px; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + cursor: pointer; + color: #C0C4CC; + font-size: 16px +} + +.el-message__closeBtn:hover { + color: #909399 +} + +.el-message .el-icon-success { + color: #67C23A +} + +.el-message .el-icon-error { + color: #F56C6C +} + +.el-message .el-icon-info { + color: #909399 +} + +.el-message .el-icon-warning { + color: #E6A23C +} + +.el-message-fade-enter, .el-message-fade-leave-active { + opacity: 0; + -webkit-transform: translate(-50%, -100%); + transform: translate(-50%, -100%) +} + +.el-badge { + position: relative; + vertical-align: middle; + display: inline-block +} + +.el-badge__content { + background-color: #F56C6C; + border-radius: 10px; + color: #FFF; + display: inline-block; + font-size: 12px; + height: 18px; + line-height: 18px; + padding: 0 6px; + text-align: center; + white-space: nowrap; + border: 1px solid #FFF +} + +.el-badge__content.is-fixed { + position: absolute; + top: 0; + right: 10px; + -webkit-transform: translateY(-50%) translateX(100%); + transform: translateY(-50%) translateX(100%) +} + +.el-rate__icon, .el-rate__item { + position: relative; + display: inline-block +} + +.el-badge__content.is-fixed.is-dot { + right: 5px +} + +.el-badge__content.is-dot { + height: 8px; + width: 8px; + padding: 0; + right: 0; + border-radius: 50% +} + +.el-badge__content--primary { + background-color: #409EFF +} + +.el-badge__content--success { + background-color: #67C23A +} + +.el-badge__content--warning { + background-color: #E6A23C +} + +.el-badge__content--info { + background-color: #909399 +} + +.el-badge__content--danger { + background-color: #F56C6C +} + +.el-card { + border: 1px solid #EBEEF5; + background-color: #FFF; + color: #303133; + -webkit-transition: .3s; + transition: .3s +} + +.el-card.is-always-shadow, .el-card.is-hover-shadow:focus, .el-card.is-hover-shadow:hover { + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1) +} + +.el-card__header { + padding: 18px 20px; + border-bottom: 1px solid #EBEEF5; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-card__body { + padding: 20px +} + +.el-rate { + height: 20px; + line-height: 1 +} + +.el-rate__item { + font-size: 0; + vertical-align: middle +} + +.el-rate__icon { + font-size: 18px; + margin-right: 6px; + color: #C0C4CC; + -webkit-transition: .3s; + transition: .3s +} + +.el-rate__decimal, .el-rate__icon .path2 { + position: absolute; + top: 0; + left: 0 +} + +.el-rate__icon.hover { + -webkit-transform: scale(1.15); + transform: scale(1.15) +} + +.el-rate__decimal { + display: inline-block; + overflow: hidden +} + +.el-step.is-vertical, .el-steps { + display: -webkit-box; + display: -ms-flexbox +} + +.el-rate__text { + font-size: 14px; + vertical-align: middle +} + +.el-steps { + display: flex +} + +.el-steps--simple { + padding: 13px 8%; + border-radius: 4px; + background: #F5F7FA +} + +.el-steps--horizontal { + white-space: nowrap +} + +.el-steps--vertical { + height: 100%; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-flow: column; + flex-flow: column +} + +.el-step { + position: relative; + -ms-flex-negative: 1; + flex-shrink: 1 +} + +.el-step:last-of-type .el-step__line { + display: none +} + +.el-step:last-of-type.is-flex { + -ms-flex-preferred-size: auto !important; + flex-basis: auto !important; + -ms-flex-negative: 0; + flex-shrink: 0; + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0 +} + +.el-step:last-of-type .el-step__description, .el-step:last-of-type .el-step__main { + padding-right: 0 +} + +.el-step__head { + position: relative; + width: 100% +} + +.el-step__head.is-process { + color: #303133; + border-color: #303133 +} + +.el-step__head.is-wait { + color: #C0C4CC; + border-color: #C0C4CC +} + +.el-step__head.is-success { + color: #67C23A; + border-color: #67C23A +} + +.el-step__head.is-error { + color: #F56C6C; + border-color: #F56C6C +} + +.el-step__head.is-finish { + color: #409EFF; + border-color: #409EFF +} + +.el-step__icon { + position: relative; + z-index: 1; + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + width: 24px; + height: 24px; + font-size: 14px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + background: #FFF; + -webkit-transition: .15s ease-out; + transition: .15s ease-out +} + +.el-step__icon.is-text { + border-radius: 50%; + border: 2px solid; + border-color: inherit +} + +.el-step__icon.is-icon { + width: 40px +} + +.el-step__icon-inner { + display: inline-block; + user-select: none; + text-align: center; + font-weight: 700; + line-height: 1; + color: inherit +} + +.el-step__icon-inner[class*=el-icon]:not(.is-status) { + font-size: 25px; + font-weight: 400 +} + +.el-step__icon-inner.is-status { + -webkit-transform: translateY(1px); + transform: translateY(1px) +} + +.el-step__line { + position: absolute; + border-color: inherit; + background-color: #C0C4CC +} + +.el-step__line-inner { + display: block; + border-width: 1px; + border-style: solid; + border-color: inherit; + -webkit-transition: .15s ease-out; + transition: .15s ease-out; + -webkit-box-sizing: border-box; + box-sizing: border-box; + width: 0; + height: 0 +} + +.el-step__main { + white-space: normal; + text-align: left +} + +.el-step__title { + font-size: 16px; + line-height: 38px +} + +.el-step__title.is-process { + font-weight: 700; + color: #303133 +} + +.el-step__title.is-wait { + color: #C0C4CC +} + +.el-step__title.is-success { + color: #67C23A +} + +.el-step__title.is-error { + color: #F56C6C +} + +.el-step__title.is-finish { + color: #409EFF +} + +.el-step__description { + padding-right: 10%; + margin-top: -5px; + font-size: 12px; + line-height: 20px; + font-weight: 400 +} + +.el-step__description.is-process { + color: #303133 +} + +.el-step__description.is-wait { + color: #C0C4CC +} + +.el-step__description.is-success { + color: #67C23A +} + +.el-step__description.is-error { + color: #F56C6C +} + +.el-step__description.is-finish { + color: #409EFF +} + +.el-step.is-horizontal { + display: inline-block +} + +.el-step.is-horizontal .el-step__line { + height: 2px; + top: 11px; + left: 0; + right: 0 +} + +.el-step.is-vertical { + display: flex +} + +.el-step.is-vertical .el-step__head { + -webkit-box-flex: 0; + -ms-flex-positive: 0; + flex-grow: 0; + width: 24px +} + +.el-step.is-vertical .el-step__main { + padding-left: 10px; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1 +} + +.el-step.is-vertical .el-step__title { + line-height: 24px; + padding-bottom: 8px +} + +.el-step.is-vertical .el-step__line { + width: 2px; + top: 0; + bottom: 0; + left: 11px +} + +.el-step.is-vertical .el-step__icon.is-icon { + width: 24px +} + +.el-step.is-center .el-step__head, .el-step.is-center .el-step__main { + text-align: center +} + +.el-step.is-center .el-step__description { + padding-left: 20%; + padding-right: 20% +} + +.el-step.is-center .el-step__line { + left: 50%; + right: -50% +} + +.el-step.is-simple { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center +} + +.el-step.is-simple .el-step__head { + width: auto; + font-size: 0; + padding-right: 10px +} + +.el-step.is-simple .el-step__icon { + background: 0 0; + width: 16px; + height: 16px; + font-size: 12px +} + +.el-step.is-simple .el-step__icon-inner[class*=el-icon]:not(.is-status) { + font-size: 18px +} + +.el-step.is-simple .el-step__icon-inner.is-status { + -webkit-transform: scale(.8) translateY(1px); + transform: scale(.8) translateY(1px) +} + +.el-step.is-simple .el-step__main { + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: stretch; + -ms-flex-align: stretch; + align-items: stretch; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1 +} + +.el-step.is-simple .el-step__title { + font-size: 16px; + line-height: 20px +} + +.el-step.is-simple:not(:last-of-type) .el-step__title { + max-width: 50%; + word-break: break-all +} + +.el-step.is-simple .el-step__arrow { + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center +} + +.el-step.is-simple .el-step__arrow::after, .el-step.is-simple .el-step__arrow::before { + content: ''; + display: inline-block; + position: absolute; + height: 15px; + width: 1px; + background: #C0C4CC +} + +.el-step.is-simple .el-step__arrow::before { + -webkit-transform: rotate(-45deg) translateY(-4px); + transform: rotate(-45deg) translateY(-4px); + -webkit-transform-origin: 0 0; + transform-origin: 0 0 +} + +.el-step.is-simple .el-step__arrow::after { + -webkit-transform: rotate(45deg) translateY(4px); + transform: rotate(45deg) translateY(4px); + -webkit-transform-origin: 100% 100%; + transform-origin: 100% 100% +} + +.el-step.is-simple:last-of-type .el-step__arrow { + display: none +} + +.el-carousel { + position: relative +} + +.el-carousel--horizontal { + overflow-x: hidden +} + +.el-carousel--vertical { + overflow-y: hidden +} + +.el-carousel__container { + position: relative; + height: 300px +} + +.el-carousel__arrow { + border: none; + outline: 0; + padding: 0; + margin: 0; + height: 36px; + width: 36px; + cursor: pointer; + -webkit-transition: .3s; + transition: .3s; + border-radius: 50%; + background-color: rgba(31, 45, 61, .11); + color: #FFF; + position: absolute; + top: 50%; + z-index: 10; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + text-align: center; + font-size: 12px +} + +.el-carousel__arrow--left { + left: 16px +} + +.el-carousel__arrow--right { + right: 16px +} + +.el-carousel__arrow:hover { + background-color: rgba(31, 45, 61, .23) +} + +.el-carousel__arrow i { + cursor: pointer +} + +.el-carousel__indicators { + position: absolute; + list-style: none; + margin: 0; + padding: 0; + z-index: 2 +} + +.el-carousel__indicators--horizontal { + bottom: 0; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%) +} + +.el-carousel__indicators--vertical { + right: 0; + top: 50%; + -webkit-transform: translateY(-50%); + transform: translateY(-50%) +} + +.el-carousel__indicators--outside { + bottom: 26px; + text-align: center; + position: static; + -webkit-transform: none; + transform: none +} + +.el-carousel__indicators--outside .el-carousel__indicator:hover button { + opacity: .64 +} + +.el-carousel__indicators--outside button { + background-color: #C0C4CC; + opacity: .24 +} + +.el-carousel__indicators--labels { + left: 0; + right: 0; + -webkit-transform: none; + transform: none; + text-align: center +} + +.el-carousel__indicators--labels .el-carousel__button { + height: auto; + width: auto; + padding: 2px 18px; + font-size: 12px +} + +.el-carousel__indicators--labels .el-carousel__indicator { + padding: 6px 4px +} + +.el-carousel__indicator { + background-color: transparent; + cursor: pointer +} + +.el-carousel__indicator:hover button { + opacity: .72 +} + +.el-carousel__indicator--horizontal { + display: inline-block; + padding: 12px 4px +} + +.el-carousel__indicator--vertical { + padding: 4px 12px +} + +.el-carousel__indicator--vertical .el-carousel__button { + width: 2px; + height: 15px +} + +.el-carousel__indicator.is-active button { + opacity: 1 +} + +.el-carousel__button { + display: block; + opacity: .48; + width: 30px; + height: 2px; + background-color: #FFF; + border: none; + outline: 0; + padding: 0; + margin: 0; + cursor: pointer; + -webkit-transition: .3s; + transition: .3s +} + +.el-carousel__item, .el-carousel__mask { + height: 100%; + top: 0; + left: 0; + position: absolute +} + +.carousel-arrow-left-enter, .carousel-arrow-left-leave-active { + -webkit-transform: translateY(-50%) translateX(-10px); + transform: translateY(-50%) translateX(-10px); + opacity: 0 +} + +.carousel-arrow-right-enter, .carousel-arrow-right-leave-active { + -webkit-transform: translateY(-50%) translateX(10px); + transform: translateY(-50%) translateX(10px); + opacity: 0 +} + +.el-carousel__item { + width: 100%; + display: inline-block; + overflow: hidden; + z-index: 0 +} + +.el-carousel__item.is-active { + z-index: 2 +} + +.el-carousel__item.is-animating { + -webkit-transition: -webkit-transform .4s ease-in-out; + transition: -webkit-transform .4s ease-in-out; + transition: transform .4s ease-in-out; + transition: transform .4s ease-in-out, -webkit-transform .4s ease-in-out +} + +.el-carousel__item--card { + width: 50%; + -webkit-transition: -webkit-transform .4s ease-in-out; + transition: -webkit-transform .4s ease-in-out; + transition: transform .4s ease-in-out; + transition: transform .4s ease-in-out, -webkit-transform .4s ease-in-out +} + +.el-carousel__item--card.is-in-stage { + cursor: pointer; + z-index: 1 +} + +.el-carousel__item--card.is-in-stage.is-hover .el-carousel__mask, .el-carousel__item--card.is-in-stage:hover .el-carousel__mask { + opacity: .12 +} + +.el-carousel__item--card.is-active { + z-index: 2 +} + +.el-carousel__mask { + width: 100%; + background-color: #FFF; + opacity: .24; + -webkit-transition: .2s; + transition: .2s +} + +.el-fade-in-enter, .el-fade-in-leave-active, .el-fade-in-linear-enter, .el-fade-in-linear-leave, .el-fade-in-linear-leave-active, .fade-in-linear-enter, .fade-in-linear-leave, .fade-in-linear-leave-active { + opacity: 0 +} + +.fade-in-linear-enter-active, .fade-in-linear-leave-active { + -webkit-transition: opacity .2s linear; + transition: opacity .2s linear +} + +.el-fade-in-linear-enter-active, .el-fade-in-linear-leave-active { + -webkit-transition: opacity .2s linear; + transition: opacity .2s linear +} + +.el-fade-in-enter-active, .el-fade-in-leave-active { + -webkit-transition: all .3s cubic-bezier(.55, 0, .1, 1); + transition: all .3s cubic-bezier(.55, 0, .1, 1) +} + +.el-zoom-in-center-enter-active, .el-zoom-in-center-leave-active { + -webkit-transition: all .3s cubic-bezier(.55, 0, .1, 1); + transition: all .3s cubic-bezier(.55, 0, .1, 1) +} + +.el-zoom-in-center-enter, .el-zoom-in-center-leave-active { + opacity: 0; + -webkit-transform: scaleX(0); + transform: scaleX(0) +} + +.el-zoom-in-top-enter-active, .el-zoom-in-top-leave-active { + opacity: 1; + -webkit-transform: scaleY(1); + transform: scaleY(1); + -webkit-transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1); + transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1); + transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1); + transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1); + -webkit-transform-origin: center top; + transform-origin: center top +} + +.el-zoom-in-top-enter, .el-zoom-in-top-leave-active { + opacity: 0; + -webkit-transform: scaleY(0); + transform: scaleY(0) +} + +.el-zoom-in-bottom-enter-active, .el-zoom-in-bottom-leave-active { + opacity: 1; + -webkit-transform: scaleY(1); + transform: scaleY(1); + -webkit-transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1); + transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1); + transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1); + transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1); + -webkit-transform-origin: center bottom; + transform-origin: center bottom +} + +.el-zoom-in-bottom-enter, .el-zoom-in-bottom-leave-active { + opacity: 0; + -webkit-transform: scaleY(0); + transform: scaleY(0) +} + +.el-zoom-in-left-enter-active, .el-zoom-in-left-leave-active { + opacity: 1; + -webkit-transform: scale(1, 1); + transform: scale(1, 1); + -webkit-transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1); + transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1); + transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1); + transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1); + -webkit-transform-origin: top left; + transform-origin: top left +} + +.el-zoom-in-left-enter, .el-zoom-in-left-leave-active { + opacity: 0; + -webkit-transform: scale(.45, .45); + transform: scale(.45, .45) +} + +.collapse-transition { + -webkit-transition: .3s height ease-in-out, .3s padding-top ease-in-out, .3s padding-bottom ease-in-out; + transition: .3s height ease-in-out, .3s padding-top ease-in-out, .3s padding-bottom ease-in-out +} + +.horizontal-collapse-transition { + -webkit-transition: .3s width ease-in-out, .3s padding-left ease-in-out, .3s padding-right ease-in-out; + transition: .3s width ease-in-out, .3s padding-left ease-in-out, .3s padding-right ease-in-out +} + +.el-list-enter-active, .el-list-leave-active { + -webkit-transition: all 1s; + transition: all 1s +} + +.el-list-enter, .el-list-leave-active { + opacity: 0; + -webkit-transform: translateY(-30px); + transform: translateY(-30px) +} + +.el-opacity-transition { + -webkit-transition: opacity .3s cubic-bezier(.55, 0, .1, 1); + transition: opacity .3s cubic-bezier(.55, 0, .1, 1) +} + +.el-collapse { + border-top: 1px solid #EBEEF5; + border-bottom: 1px solid #EBEEF5 +} + +.el-collapse-item.is-disabled .el-collapse-item__header { + color: #bbb; + cursor: not-allowed +} + +.el-collapse-item__header { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + height: 48px; + line-height: 48px; + background-color: #FFF; + color: #303133; + cursor: pointer; + border-bottom: 1px solid #EBEEF5; + font-size: 13px; + font-weight: 500; + -webkit-transition: border-bottom-color .3s; + transition: border-bottom-color .3s; + outline: 0 +} + +.el-collapse-item__arrow { + margin: 0 8px 0 auto; + transition: -webkit-transform .3s; + transition: transform .3s; + transition: transform .3s, -webkit-transform .3s; + font-weight: 300 +} + +.el-collapse-item__arrow.is-active { + -webkit-transform: rotate(90deg); + transform: rotate(90deg) +} + +.el-collapse-item__header.focusing:focus:not(:hover) { + color: #409EFF +} + +.el-collapse-item__header.is-active { + border-bottom-color: transparent +} + +.el-collapse-item__wrap { + will-change: height; + background-color: #FFF; + overflow: hidden; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border-bottom: 1px solid #EBEEF5 +} + +.el-cascader__tags, .el-tag { + -webkit-box-sizing: border-box +} + +.el-collapse-item__content { + padding-bottom: 25px; + font-size: 13px; + color: #303133; + line-height: 1.769230769230769 +} + +.el-collapse-item:last-child { + margin-bottom: -1px +} + +.el-popper .popper__arrow, .el-popper .popper__arrow::after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid +} + +.el-popper .popper__arrow { + border-width: 6px; + -webkit-filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .03)); + filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .03)) +} + +.el-popper .popper__arrow::after { + content: " "; + border-width: 6px +} + +.el-popper[x-placement^=top] { + margin-bottom: 12px +} + +.el-popper[x-placement^=top] .popper__arrow { + bottom: -6px; + left: 50%; + margin-right: 3px; + border-top-color: #EBEEF5; + border-bottom-width: 0 +} + +.el-popper[x-placement^=top] .popper__arrow::after { + bottom: 1px; + margin-left: -6px; + border-top-color: #FFF; + border-bottom-width: 0 +} + +.el-popper[x-placement^=bottom] { + margin-top: 12px +} + +.el-popper[x-placement^=bottom] .popper__arrow { + top: -6px; + left: 50%; + margin-right: 3px; + border-top-width: 0; + border-bottom-color: #EBEEF5 +} + +.el-popper[x-placement^=bottom] .popper__arrow::after { + top: 1px; + margin-left: -6px; + border-top-width: 0; + border-bottom-color: #FFF +} + +.el-popper[x-placement^=right] { + margin-left: 12px +} + +.el-popper[x-placement^=right] .popper__arrow { + top: 50%; + left: -6px; + margin-bottom: 3px; + border-right-color: #EBEEF5; + border-left-width: 0 +} + +.el-popper[x-placement^=right] .popper__arrow::after { + bottom: -6px; + left: 1px; + border-right-color: #FFF; + border-left-width: 0 +} + +.el-popper[x-placement^=left] { + margin-right: 12px +} + +.el-popper[x-placement^=left] .popper__arrow { + top: 50%; + right: -6px; + margin-bottom: 3px; + border-right-width: 0; + border-left-color: #EBEEF5 +} + +.el-popper[x-placement^=left] .popper__arrow::after { + right: 1px; + bottom: -6px; + margin-left: -6px; + border-right-width: 0; + border-left-color: #FFF +} + +.el-tag { + background-color: #ecf5ff; + border-color: #d9ecff; + display: inline-block; + height: 32px; + padding: 0 10px; + line-height: 30px; + font-size: 12px; + color: #409EFF; + border-width: 1px; + border-style: solid; + border-radius: 4px; + box-sizing: border-box; + white-space: nowrap +} + +.el-tag.is-hit { + border-color: #409EFF +} + +.el-tag .el-tag__close { + color: #409eff +} + +.el-tag .el-tag__close:hover { + color: #FFF; + background-color: #409eff +} + +.el-tag.el-tag--info { + background-color: #f4f4f5; + border-color: #e9e9eb; + color: #909399 +} + +.el-tag.el-tag--info.is-hit { + border-color: #909399 +} + +.el-tag.el-tag--info .el-tag__close { + color: #909399 +} + +.el-tag.el-tag--info .el-tag__close:hover { + color: #FFF; + background-color: #909399 +} + +.el-tag.el-tag--success { + background-color: #f0f9eb; + border-color: #e1f3d8; + color: #67c23a +} + +.el-tag.el-tag--success.is-hit { + border-color: #67C23A +} + +.el-tag.el-tag--success .el-tag__close { + color: #67c23a +} + +.el-tag.el-tag--success .el-tag__close:hover { + color: #FFF; + background-color: #67c23a +} + +.el-tag.el-tag--warning { + background-color: #fdf6ec; + border-color: #faecd8; + color: #e6a23c +} + +.el-tag.el-tag--warning.is-hit { + border-color: #E6A23C +} + +.el-tag.el-tag--warning .el-tag__close { + color: #e6a23c +} + +.el-tag.el-tag--warning .el-tag__close:hover { + color: #FFF; + background-color: #e6a23c +} + +.el-tag.el-tag--danger { + background-color: #fef0f0; + border-color: #fde2e2; + color: #f56c6c +} + +.el-tag.el-tag--danger.is-hit { + border-color: #F56C6C +} + +.el-tag.el-tag--danger .el-tag__close { + color: #f56c6c +} + +.el-tag.el-tag--danger .el-tag__close:hover { + color: #FFF; + background-color: #f56c6c +} + +.el-tag .el-icon-close { + border-radius: 50%; + text-align: center; + position: relative; + cursor: pointer; + font-size: 12px; + height: 16px; + width: 16px; + line-height: 16px; + vertical-align: middle; + top: -1px; + right: -5px +} + +.el-tag .el-icon-close::before { + display: block +} + +.el-tag--dark { + background-color: #409eff; + border-color: #409eff; + color: #fff +} + +.el-tag--dark.is-hit { + border-color: #409EFF +} + +.el-tag--dark .el-tag__close { + color: #fff +} + +.el-tag--dark .el-tag__close:hover { + color: #FFF; + background-color: #66b1ff +} + +.el-tag--dark.el-tag--info { + background-color: #909399; + border-color: #909399; + color: #fff +} + +.el-tag--dark.el-tag--info.is-hit { + border-color: #909399 +} + +.el-tag--dark.el-tag--info .el-tag__close { + color: #fff +} + +.el-tag--dark.el-tag--info .el-tag__close:hover { + color: #FFF; + background-color: #a6a9ad +} + +.el-tag--dark.el-tag--success { + background-color: #67c23a; + border-color: #67c23a; + color: #fff +} + +.el-tag--dark.el-tag--success.is-hit { + border-color: #67C23A +} + +.el-tag--dark.el-tag--success .el-tag__close { + color: #fff +} + +.el-tag--dark.el-tag--success .el-tag__close:hover { + color: #FFF; + background-color: #85ce61 +} + +.el-tag--dark.el-tag--warning { + background-color: #e6a23c; + border-color: #e6a23c; + color: #fff +} + +.el-tag--dark.el-tag--warning.is-hit { + border-color: #E6A23C +} + +.el-tag--dark.el-tag--warning .el-tag__close { + color: #fff +} + +.el-tag--dark.el-tag--warning .el-tag__close:hover { + color: #FFF; + background-color: #ebb563 +} + +.el-tag--dark.el-tag--danger { + background-color: #f56c6c; + border-color: #f56c6c; + color: #fff +} + +.el-tag--dark.el-tag--danger.is-hit { + border-color: #F56C6C +} + +.el-tag--dark.el-tag--danger .el-tag__close { + color: #fff +} + +.el-tag--dark.el-tag--danger .el-tag__close:hover { + color: #FFF; + background-color: #f78989 +} + +.el-tag--plain { + background-color: #fff; + border-color: #b3d8ff; + color: #409eff +} + +.el-tag--plain.is-hit { + border-color: #409EFF +} + +.el-tag--plain .el-tag__close { + color: #409eff +} + +.el-tag--plain .el-tag__close:hover { + color: #FFF; + background-color: #409eff +} + +.el-tag--plain.el-tag--info { + background-color: #fff; + border-color: #d3d4d6; + color: #909399 +} + +.el-tag--plain.el-tag--info.is-hit { + border-color: #909399 +} + +.el-tag--plain.el-tag--info .el-tag__close { + color: #909399 +} + +.el-tag--plain.el-tag--info .el-tag__close:hover { + color: #FFF; + background-color: #909399 +} + +.el-tag--plain.el-tag--success { + background-color: #fff; + border-color: #c2e7b0; + color: #67c23a +} + +.el-tag--plain.el-tag--success.is-hit { + border-color: #67C23A +} + +.el-tag--plain.el-tag--success .el-tag__close { + color: #67c23a +} + +.el-tag--plain.el-tag--success .el-tag__close:hover { + color: #FFF; + background-color: #67c23a +} + +.el-tag--plain.el-tag--warning { + background-color: #fff; + border-color: #f5dab1; + color: #e6a23c +} + +.el-tag--plain.el-tag--warning.is-hit { + border-color: #E6A23C +} + +.el-tag--plain.el-tag--warning .el-tag__close { + color: #e6a23c +} + +.el-tag--plain.el-tag--warning .el-tag__close:hover { + color: #FFF; + background-color: #e6a23c +} + +.el-tag--plain.el-tag--danger { + background-color: #fff; + border-color: #fbc4c4; + color: #f56c6c +} + +.el-tag--plain.el-tag--danger.is-hit { + border-color: #F56C6C +} + +.el-tag--plain.el-tag--danger .el-tag__close { + color: #f56c6c +} + +.el-tag--plain.el-tag--danger .el-tag__close:hover { + color: #FFF; + background-color: #f56c6c +} + +.el-tag--medium { + height: 28px; + line-height: 26px +} + +.el-tag--medium .el-icon-close { + -webkit-transform: scale(.8); + transform: scale(.8) +} + +.el-tag--small { + height: 24px; + padding: 0 8px; + line-height: 22px +} + +.el-tag--small .el-icon-close { + -webkit-transform: scale(.8); + transform: scale(.8) +} + +.el-tag--mini { + height: 20px; + padding: 0 5px; + line-height: 19px +} + +.el-tag--mini .el-icon-close { + margin-left: -3px; + -webkit-transform: scale(.7); + transform: scale(.7) +} + +.el-cascader { + display: inline-block; + position: relative; + font-size: 14px; + line-height: 40px +} + +.el-cascader:not(.is-disabled):hover .el-input__inner { + cursor: pointer; + border-color: #C0C4CC +} + +.el-cascader .el-input .el-input__inner:focus, .el-cascader .el-input.is-focus .el-input__inner { + border-color: #409EFF +} + +.el-cascader .el-input { + cursor: pointer +} + +.el-cascader .el-input .el-input__inner { + text-overflow: ellipsis +} + +.el-cascader .el-input .el-icon-arrow-down { + -webkit-transition: -webkit-transform .3s; + transition: -webkit-transform .3s; + transition: transform .3s; + transition: transform .3s, -webkit-transform .3s; + font-size: 14px +} + +.el-cascader .el-input .el-icon-arrow-down.is-reverse { + -webkit-transform: rotateZ(180deg); + transform: rotateZ(180deg) +} + +.el-cascader .el-input .el-icon-circle-close:hover { + color: #909399 +} + +.el-cascader--medium { + font-size: 14px; + line-height: 36px +} + +.el-cascader--small { + font-size: 13px; + line-height: 32px +} + +.el-cascader--mini { + font-size: 12px; + line-height: 28px +} + +.el-cascader.is-disabled .el-cascader__label { + z-index: 2; + color: #C0C4CC +} + +.el-cascader__dropdown { + margin: 5px 0; + font-size: 14px; + background: #FFF; + border: 1px solid #E4E7ED; + border-radius: 4px; + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1) +} + +.el-cascader__tags { + position: absolute; + left: 0; + right: 30px; + top: 50%; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + line-height: normal; + text-align: left; + box-sizing: border-box +} + +.el-cascader__tags .el-tag { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + max-width: 100%; + margin: 2px 0 2px 6px; + text-overflow: ellipsis; + background: #f0f2f5 +} + +.el-cascader__tags .el-tag:not(.is-hit) { + border-color: transparent +} + +.el-cascader__tags .el-tag > span { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + overflow: hidden; + text-overflow: ellipsis +} + +.el-cascader__tags .el-tag .el-icon-close { + -webkit-box-flex: 0; + -ms-flex: none; + flex: none; + background-color: #C0C4CC; + color: #FFF +} + +.el-cascader__tags .el-tag .el-icon-close:hover { + background-color: #909399 +} + +.el-cascader__suggestion-panel { + border-radius: 4px +} + +.el-cascader__suggestion-list { + max-height: 204px; + margin: 0; + padding: 6px 0; + font-size: 14px; + color: #606266; + text-align: center +} + +.el-cascader__suggestion-item { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + height: 34px; + padding: 0 15px; + text-align: left; + outline: 0; + cursor: pointer +} + +.el-cascader__suggestion-item:focus, .el-cascader__suggestion-item:hover { + background: #F5F7FA +} + +.el-cascader__suggestion-item.is-checked { + color: #409EFF; + font-weight: 700 +} + +.el-cascader__suggestion-item > span { + margin-right: 10px +} + +.el-cascader__empty-text { + margin: 10px 0; + color: #C0C4CC +} + +.el-cascader__search-input { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + height: 24px; + min-width: 60px; + margin: 2px 0 2px 15px; + padding: 0; + color: #606266; + border: none; + outline: 0; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-cascader__search-input::-webkit-input-placeholder { + color: #C0C4CC +} + +.el-cascader__search-input:-ms-input-placeholder { + color: #C0C4CC +} + +.el-cascader__search-input::-ms-input-placeholder { + color: #C0C4CC +} + +.el-cascader__search-input::placeholder { + color: #C0C4CC +} + +.el-color-predefine { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + font-size: 12px; + margin-top: 8px; + width: 280px +} + +.el-color-predefine__colors { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + -ms-flex-wrap: wrap; + flex-wrap: wrap +} + +.el-color-predefine__color-selector { + margin: 0 0 8px 8px; + width: 20px; + height: 20px; + border-radius: 4px; + cursor: pointer +} + +.el-color-predefine__color-selector:nth-child(10n+1) { + margin-left: 0 +} + +.el-color-predefine__color-selector.selected { + -webkit-box-shadow: 0 0 3px 2px #409EFF; + box-shadow: 0 0 3px 2px #409EFF +} + +.el-color-predefine__color-selector > div { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + height: 100%; + border-radius: 3px +} + +.el-color-predefine__color-selector.is-alpha { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==) +} + +.el-color-hue-slider { + position: relative; + -webkit-box-sizing: border-box; + box-sizing: border-box; + width: 280px; + height: 12px; + background-color: red; + padding: 0 2px +} + +.el-color-hue-slider__bar { + position: relative; + background: -webkit-gradient(linear, left top, right top, from(red), color-stop(17%, #ff0), color-stop(33%, #0f0), color-stop(50%, #0ff), color-stop(67%, #00f), color-stop(83%, #f0f), to(red)); + background: linear-gradient(to right, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red 100%); + height: 100% +} + +.el-color-hue-slider__thumb { + position: absolute; + cursor: pointer; + -webkit-box-sizing: border-box; + box-sizing: border-box; + left: 0; + top: 0; + width: 4px; + height: 100%; + border-radius: 1px; + background: #fff; + border: 1px solid #f0f0f0; + -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, .6); + box-shadow: 0 0 2px rgba(0, 0, 0, .6); + z-index: 1 +} + +.el-color-hue-slider.is-vertical { + width: 12px; + height: 180px; + padding: 2px 0 +} + +.el-color-hue-slider.is-vertical .el-color-hue-slider__bar { + background: -webkit-gradient(linear, left top, left bottom, from(red), color-stop(17%, #ff0), color-stop(33%, #0f0), color-stop(50%, #0ff), color-stop(67%, #00f), color-stop(83%, #f0f), to(red)); + background: linear-gradient(to bottom, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red 100%) +} + +.el-color-hue-slider.is-vertical .el-color-hue-slider__thumb { + left: 0; + top: 0; + width: 100%; + height: 4px +} + +.el-color-svpanel { + position: relative; + width: 280px; + height: 180px +} + +.el-color-svpanel__black, .el-color-svpanel__white { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0 +} + +.el-color-svpanel__white { + background: -webkit-gradient(linear, left top, right top, from(#fff), to(rgba(255, 255, 255, 0))); + background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0)) +} + +.el-color-svpanel__black { + background: -webkit-gradient(linear, left bottom, left top, from(#000), to(rgba(0, 0, 0, 0))); + background: linear-gradient(to top, #000, rgba(0, 0, 0, 0)) +} + +.el-color-svpanel__cursor { + position: absolute +} + +.el-color-svpanel__cursor > div { + cursor: head; + width: 4px; + height: 4px; + -webkit-box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0, 0, 0, .3), 0 0 1px 2px rgba(0, 0, 0, .4); + box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0, 0, 0, .3), 0 0 1px 2px rgba(0, 0, 0, .4); + border-radius: 50%; + -webkit-transform: translate(-2px, -2px); + transform: translate(-2px, -2px) +} + +.el-color-alpha-slider { + position: relative; + -webkit-box-sizing: border-box; + box-sizing: border-box; + width: 280px; + height: 12px; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==) +} + +.el-color-alpha-slider__bar { + position: relative; + background: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), to(white)); + background: linear-gradient(to right, rgba(255, 255, 255, 0) 0, #fff 100%); + height: 100% +} + +.el-color-alpha-slider__thumb { + position: absolute; + cursor: pointer; + -webkit-box-sizing: border-box; + box-sizing: border-box; + left: 0; + top: 0; + width: 4px; + height: 100%; + border-radius: 1px; + background: #fff; + border: 1px solid #f0f0f0; + -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, .6); + box-shadow: 0 0 2px rgba(0, 0, 0, .6); + z-index: 1 +} + +.el-color-alpha-slider.is-vertical { + width: 20px; + height: 180px +} + +.el-color-alpha-slider.is-vertical .el-color-alpha-slider__bar { + background: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0)), to(white)); + background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0, #fff 100%) +} + +.el-color-alpha-slider.is-vertical .el-color-alpha-slider__thumb { + left: 0; + top: 0; + width: 100%; + height: 4px +} + +.el-color-dropdown { + width: 300px +} + +.el-color-dropdown__main-wrapper { + margin-bottom: 6px +} + +.el-color-dropdown__main-wrapper::after { + content: ""; + display: table; + clear: both +} + +.el-color-dropdown__btns { + margin-top: 6px; + text-align: right +} + +.el-color-dropdown__value { + float: left; + line-height: 26px; + font-size: 12px; + color: #000; + width: 160px +} + +.el-color-dropdown__btn { + border: 1px solid #dcdcdc; + color: #333; + line-height: 24px; + border-radius: 2px; + padding: 0 20px; + cursor: pointer; + background-color: transparent; + outline: 0; + font-size: 12px +} + +.el-color-dropdown__btn[disabled] { + color: #ccc; + cursor: not-allowed +} + +.el-color-dropdown__btn:hover { + color: #409EFF; + border-color: #409EFF +} + +.el-color-dropdown__link-btn { + cursor: pointer; + color: #409EFF; + text-decoration: none; + padding: 15px; + font-size: 12px +} + +.el-color-dropdown__link-btn:hover { + color: tint(#409EFF, 20%) +} + +.el-color-picker { + display: inline-block; + position: relative; + line-height: normal; + height: 40px +} + +.el-color-picker.is-disabled .el-color-picker__trigger { + cursor: not-allowed +} + +.el-color-picker--medium { + height: 36px +} + +.el-color-picker--medium .el-color-picker__trigger { + height: 36px; + width: 36px +} + +.el-color-picker--medium .el-color-picker__mask { + height: 34px; + width: 34px +} + +.el-color-picker--small { + height: 32px +} + +.el-color-picker--small .el-color-picker__trigger { + height: 32px; + width: 32px +} + +.el-color-picker--small .el-color-picker__mask { + height: 30px; + width: 30px +} + +.el-color-picker--small .el-color-picker__empty, .el-color-picker--small .el-color-picker__icon { + -webkit-transform: translate3d(-50%, -50%, 0) scale(.8); + transform: translate3d(-50%, -50%, 0) scale(.8) +} + +.el-color-picker--mini { + height: 28px +} + +.el-color-picker--mini .el-color-picker__trigger { + height: 28px; + width: 28px +} + +.el-color-picker--mini .el-color-picker__mask { + height: 26px; + width: 26px +} + +.el-color-picker--mini .el-color-picker__empty, .el-color-picker--mini .el-color-picker__icon { + -webkit-transform: translate3d(-50%, -50%, 0) scale(.8); + transform: translate3d(-50%, -50%, 0) scale(.8) +} + +.el-color-picker__mask { + height: 38px; + width: 38px; + border-radius: 4px; + position: absolute; + top: 1px; + left: 1px; + z-index: 1; + cursor: not-allowed; + background-color: rgba(255, 255, 255, .7) +} + +.el-color-picker__trigger { + display: inline-block; + -webkit-box-sizing: border-box; + box-sizing: border-box; + height: 40px; + width: 40px; + padding: 4px; + border: 1px solid #e6e6e6; + border-radius: 4px; + font-size: 0; + position: relative; + cursor: pointer +} + +.el-color-picker__color { + position: relative; + display: block; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid #999; + border-radius: 2px; + width: 100%; + height: 100%; + text-align: center +} + +.el-color-picker__color.is-alpha { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==) +} + +.el-color-picker__color-inner { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0 +} + +.el-color-picker__empty, .el-color-picker__icon { + top: 50%; + left: 50%; + font-size: 12px; + position: absolute +} + +.el-color-picker__empty { + color: #999; + -webkit-transform: translate3d(-50%, -50%, 0); + transform: translate3d(-50%, -50%, 0) +} + +.el-color-picker__icon { + display: inline-block; + width: 100%; + -webkit-transform: translate3d(-50%, -50%, 0); + transform: translate3d(-50%, -50%, 0); + color: #FFF; + text-align: center +} + +.el-color-picker__panel { + position: absolute; + z-index: 10; + padding: 6px; + -webkit-box-sizing: content-box; + box-sizing: content-box; + background-color: #FFF; + border: 1px solid #EBEEF5; + border-radius: 4px; + -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1); + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1) +} + +.el-textarea { + position: relative; + display: inline-block; + width: 100%; + vertical-align: bottom; + font-size: 14px +} + +.el-textarea__inner { + display: block; + resize: vertical; + padding: 5px 15px; + line-height: 1.5; + -webkit-box-sizing: border-box; + box-sizing: border-box; + width: 100%; + font-size: inherit; + color: #606266; + background-color: #FFF; + background-image: none; + border: 1px solid #DCDFE6; + border-radius: 4px; + -webkit-transition: border-color .2s cubic-bezier(.645, .045, .355, 1); + transition: border-color .2s cubic-bezier(.645, .045, .355, 1) +} + +.el-textarea__inner::-webkit-input-placeholder { + color: #C0C4CC +} + +.el-textarea__inner:-ms-input-placeholder { + color: #C0C4CC +} + +.el-textarea__inner::-ms-input-placeholder { + color: #C0C4CC +} + +.el-textarea__inner::placeholder { + color: #C0C4CC +} + +.el-textarea__inner:hover { + border-color: #C0C4CC +} + +.el-textarea__inner:focus { + outline: 0; + border-color: #409EFF +} + +.el-textarea .el-input__count { + color: #909399; + background: #FFF; + position: absolute; + font-size: 12px; + bottom: 5px; + right: 10px +} + +.el-textarea.is-disabled .el-textarea__inner { + background-color: #F5F7FA; + border-color: #E4E7ED; + color: #C0C4CC; + cursor: not-allowed +} + +.el-textarea.is-disabled .el-textarea__inner::-webkit-input-placeholder { + color: #C0C4CC +} + +.el-textarea.is-disabled .el-textarea__inner:-ms-input-placeholder { + color: #C0C4CC +} + +.el-textarea.is-disabled .el-textarea__inner::-ms-input-placeholder { + color: #C0C4CC +} + +.el-textarea.is-disabled .el-textarea__inner::placeholder { + color: #C0C4CC +} + +.el-textarea.is-exceed .el-textarea__inner { + border-color: #F56C6C +} + +.el-textarea.is-exceed .el-input__count { + color: #F56C6C +} + +.el-input { + position: relative; + font-size: 14px; + display: inline-block; + width: 100% +} + +.el-input::-webkit-scrollbar { + z-index: 11; + width: 6px +} + +.el-input::-webkit-scrollbar:horizontal { + height: 6px +} + +.el-input::-webkit-scrollbar-thumb { + border-radius: 5px; + width: 6px; + background: #b4bccc +} + +.el-input::-webkit-scrollbar-corner { + background: #fff +} + +.el-input::-webkit-scrollbar-track { + background: #fff +} + +.el-input::-webkit-scrollbar-track-piece { + background: #fff; + width: 6px +} + +.el-input .el-input__clear { + color: #C0C4CC; + font-size: 14px; + cursor: pointer; + -webkit-transition: color .2s cubic-bezier(.645, .045, .355, 1); + transition: color .2s cubic-bezier(.645, .045, .355, 1) +} + +.el-input .el-input__clear:hover { + color: #909399 +} + +.el-input .el-input__count { + height: 100%; + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + color: #909399; + font-size: 12px +} + +.el-input .el-input__count .el-input__count-inner { + background: #FFF; + line-height: initial; + display: inline-block; + padding: 0 5px +} + +.el-input__inner { + -webkit-appearance: none; + background-color: #FFF; + background-image: none; + border-radius: 4px; + border: 1px solid #DCDFE6; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: #606266; + display: inline-block; + font-size: inherit; + height: 40px; + line-height: 40px; + outline: 0; + padding: 0 15px; + -webkit-transition: border-color .2s cubic-bezier(.645, .045, .355, 1); + transition: border-color .2s cubic-bezier(.645, .045, .355, 1); + width: 100% +} + +.el-input__prefix, .el-input__suffix { + position: absolute; + top: 0; + -webkit-transition: all .3s; + height: 100%; + color: #C0C4CC; + text-align: center +} + +.el-input__inner::-ms-reveal { + display: none +} + +.el-input__inner::-webkit-input-placeholder { + color: #C0C4CC +} + +.el-input__inner:-ms-input-placeholder { + color: #C0C4CC +} + +.el-input__inner::-ms-input-placeholder { + color: #C0C4CC +} + +.el-input__inner::placeholder { + color: #C0C4CC +} + +.el-input__inner:hover { + border-color: #C0C4CC +} + +.el-input.is-active .el-input__inner, .el-input__inner:focus { + border-color: #409EFF; + outline: 0 +} + +.el-input__suffix { + right: 5px; + transition: all .3s +} + +.el-input__suffix-inner { + pointer-events: all +} + +.el-input__prefix { + left: 5px; + transition: all .3s +} + +.el-input__icon { + height: 100%; + width: 25px; + text-align: center; + -webkit-transition: all .3s; + transition: all .3s; + line-height: 40px +} + +.el-input__icon:after { + content: ''; + height: 100%; + width: 0; + display: inline-block; + vertical-align: middle +} + +.el-input__validateIcon { + pointer-events: none +} + +.el-input.is-disabled .el-input__inner { + background-color: #F5F7FA; + border-color: #E4E7ED; + color: #C0C4CC; + cursor: not-allowed +} + +.el-input.is-disabled .el-input__inner::-webkit-input-placeholder { + color: #C0C4CC +} + +.el-input.is-disabled .el-input__inner:-ms-input-placeholder { + color: #C0C4CC +} + +.el-input.is-disabled .el-input__inner::-ms-input-placeholder { + color: #C0C4CC +} + +.el-input.is-disabled .el-input__inner::placeholder { + color: #C0C4CC +} + +.el-input.is-disabled .el-input__icon { + cursor: not-allowed +} + +.el-link, .el-transfer-panel__filter .el-icon-circle-close { + cursor: pointer +} + +.el-input.is-exceed .el-input__inner { + border-color: #F56C6C +} + +.el-input.is-exceed .el-input__suffix .el-input__count { + color: #F56C6C +} + +.el-input--suffix .el-input__inner { + padding-right: 30px +} + +.el-input--prefix .el-input__inner { + padding-left: 30px +} + +.el-input--medium { + font-size: 14px +} + +.el-input--medium .el-input__inner { + height: 36px; + line-height: 36px +} + +.el-input--medium .el-input__icon { + line-height: 36px +} + +.el-input--small { + font-size: 13px +} + +.el-input--small .el-input__inner { + height: 32px; + line-height: 32px +} + +.el-input--small .el-input__icon { + line-height: 32px +} + +.el-input--mini { + font-size: 12px +} + +.el-input--mini .el-input__inner { + height: 28px; + line-height: 28px +} + +.el-input--mini .el-input__icon { + line-height: 28px +} + +.el-input-group { + line-height: normal; + display: inline-table; + width: 100%; + border-collapse: separate; + border-spacing: 0 +} + +.el-input-group > .el-input__inner { + vertical-align: middle; + display: table-cell +} + +.el-input-group__append, .el-input-group__prepend { + background-color: #F5F7FA; + color: #909399; + vertical-align: middle; + display: table-cell; + position: relative; + border: 1px solid #DCDFE6; + border-radius: 4px; + padding: 0 20px; + width: 1px; + white-space: nowrap +} + +.el-input-group--prepend .el-input__inner, .el-input-group__append { + border-top-left-radius: 0; + border-bottom-left-radius: 0 +} + +.el-input-group--append .el-input__inner, .el-input-group__prepend { + border-top-right-radius: 0; + border-bottom-right-radius: 0 +} + +.el-input-group__append:focus, .el-input-group__prepend:focus { + outline: 0 +} + +.el-input-group__append .el-button, .el-input-group__append .el-select, .el-input-group__prepend .el-button, .el-input-group__prepend .el-select { + display: inline-block; + margin: -10px -20px +} + +.el-input-group__append button.el-button, .el-input-group__append div.el-select .el-input__inner, .el-input-group__append div.el-select:hover .el-input__inner, .el-input-group__prepend button.el-button, .el-input-group__prepend div.el-select .el-input__inner, .el-input-group__prepend div.el-select:hover .el-input__inner { + border-color: transparent; + background-color: transparent; + color: inherit; + border-top: 0; + border-bottom: 0 +} + +.el-input-group__append .el-button, .el-input-group__append .el-input, .el-input-group__prepend .el-button, .el-input-group__prepend .el-input { + font-size: inherit +} + +.el-input-group__prepend { + border-right: 0 +} + +.el-input-group__append { + border-left: 0 +} + +.el-input-group--append .el-select .el-input.is-focus .el-input__inner, .el-input-group--prepend .el-select .el-input.is-focus .el-input__inner { + border-color: transparent +} + +.el-input__inner::-ms-clear { + display: none; + width: 0; + height: 0 +} + +.el-transfer { + font-size: 14px +} + +.el-transfer__buttons { + display: inline-block; + vertical-align: middle; + padding: 0 30px +} + +.el-transfer__button { + display: block; + margin: 0 auto; + padding: 10px; + border-radius: 50%; + color: #FFF; + background-color: #409EFF; + font-size: 0 +} + +.el-transfer-panel__item + .el-transfer-panel__item, .el-transfer__button [class*=el-icon-] + span { + margin-left: 0 +} + +.el-transfer__button.is-with-texts { + border-radius: 4px +} + +.el-transfer__button.is-disabled, .el-transfer__button.is-disabled:hover { + border: 1px solid #DCDFE6; + background-color: #F5F7FA; + color: #C0C4CC +} + +.el-transfer__button:first-child { + margin-bottom: 10px +} + +.el-transfer__button:nth-child(2) { + margin: 0 +} + +.el-transfer__button i, .el-transfer__button span { + font-size: 14px +} + +.el-transfer-panel { + border: 1px solid #EBEEF5; + border-radius: 4px; + overflow: hidden; + background: #FFF; + display: inline-block; + vertical-align: middle; + width: 200px; + max-height: 100%; + -webkit-box-sizing: border-box; + box-sizing: border-box; + position: relative +} + +.el-transfer-panel__body { + height: 246px +} + +.el-transfer-panel__body.is-with-footer { + padding-bottom: 40px +} + +.el-transfer-panel__list { + margin: 0; + padding: 6px 0; + list-style: none; + height: 246px; + overflow: auto; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-transfer-panel__list.is-filterable { + height: 194px; + padding-top: 0 +} + +.el-transfer-panel__item { + height: 30px; + line-height: 30px; + padding-left: 15px; + display: block !important +} + +.el-transfer-panel__item.el-checkbox { + color: #606266 +} + +.el-transfer-panel__item:hover { + color: #409EFF +} + +.el-transfer-panel__item.el-checkbox .el-checkbox__label { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: block; + -webkit-box-sizing: border-box; + box-sizing: border-box; + padding-left: 24px; + line-height: 30px +} + +.el-transfer-panel__item .el-checkbox__input { + position: absolute; + top: 8px +} + +.el-transfer-panel__filter { + text-align: center; + margin: 15px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + display: block; + width: auto +} + +.el-transfer-panel__filter .el-input__inner { + height: 32px; + width: 100%; + font-size: 12px; + display: inline-block; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border-radius: 16px; + padding-right: 10px; + padding-left: 30px +} + +.el-transfer-panel__filter .el-input__icon { + margin-left: 5px +} + +.el-transfer-panel .el-transfer-panel__header { + height: 40px; + line-height: 40px; + background: #F5F7FA; + margin: 0; + padding-left: 15px; + border-bottom: 1px solid #EBEEF5; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: #000 +} + +.el-transfer-panel .el-transfer-panel__header .el-checkbox { + display: block; + line-height: 40px +} + +.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label { + font-size: 16px; + color: #303133; + font-weight: 400 +} + +.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label span { + position: absolute; + right: 15px; + color: #909399; + font-size: 12px; + font-weight: 400 +} + +.el-divider__text, .el-link { + font-weight: 500; + font-size: 14px +} + +.el-transfer-panel .el-transfer-panel__footer { + height: 40px; + background: #FFF; + margin: 0; + padding: 0; + border-top: 1px solid #EBEEF5; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + z-index: 1 +} + +.el-transfer-panel .el-transfer-panel__footer::after { + display: inline-block; + content: ""; + height: 100%; + vertical-align: middle +} + +.el-container, .el-timeline-item__node { + display: -webkit-box; + display: -ms-flexbox +} + +.el-transfer-panel .el-transfer-panel__footer .el-checkbox { + padding-left: 20px; + color: #606266 +} + +.el-transfer-panel .el-transfer-panel__empty { + margin: 0; + height: 30px; + line-height: 30px; + padding: 6px 15px 0; + color: #909399; + text-align: center +} + +.el-transfer-panel .el-checkbox__label { + padding-left: 8px +} + +.el-transfer-panel .el-checkbox__inner { + height: 14px; + width: 14px; + border-radius: 3px +} + +.el-transfer-panel .el-checkbox__inner::after { + height: 6px; + width: 3px; + left: 4px +} + +.el-container { + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + -ms-flex-preferred-size: auto; + flex-basis: auto; + -webkit-box-sizing: border-box; + box-sizing: border-box; + min-width: 0 +} + +.el-aside, .el-header { + -webkit-box-sizing: border-box +} + +.el-container.is-vertical { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column +} + +.el-header { + padding: 0 20px; + box-sizing: border-box; + -ms-flex-negative: 0; + flex-shrink: 0 +} + +.el-aside { + overflow: auto; + box-sizing: border-box; + -ms-flex-negative: 0; + flex-shrink: 0 +} + +.el-footer, .el-main { + -webkit-box-sizing: border-box +} + +.el-main { + display: block; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + -ms-flex-preferred-size: auto; + flex-basis: auto; + overflow: auto; + box-sizing: border-box; + padding: 20px +} + +.el-footer { + padding: 0 20px; + box-sizing: border-box; + -ms-flex-negative: 0; + flex-shrink: 0 +} + +.el-timeline { + margin: 0; + font-size: 14px; + list-style: none +} + +.el-timeline .el-timeline-item:last-child .el-timeline-item__tail { + display: none +} + +.el-timeline-item { + position: relative; + padding-bottom: 20px +} + +.el-timeline-item__wrapper { + position: relative; + padding-left: 28px; + top: -3px +} + +.el-timeline-item__tail { + position: absolute; + left: 4px; + height: 100%; + border-left: 2px solid #E4E7ED +} + +.el-timeline-item__icon { + color: #FFF; + font-size: 13px +} + +.el-timeline-item__node { + position: absolute; + background-color: #E4E7ED; + border-radius: 50%; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center +} + +.el-image__error, .el-timeline-item__dot { + display: -webkit-box; + display: -ms-flexbox +} + +.el-timeline-item__node--normal { + left: -1px; + width: 12px; + height: 12px +} + +.el-timeline-item__node--large { + left: -2px; + width: 14px; + height: 14px +} + +.el-timeline-item__node--primary { + background-color: #409EFF +} + +.el-timeline-item__node--success { + background-color: #67C23A +} + +.el-timeline-item__node--warning { + background-color: #E6A23C +} + +.el-timeline-item__node--danger { + background-color: #F56C6C +} + +.el-timeline-item__node--info { + background-color: #909399 +} + +.el-timeline-item__dot { + position: absolute; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center +} + +.el-timeline-item__content { + color: #303133 +} + +.el-timeline-item__timestamp { + color: #909399; + line-height: 1; + font-size: 13px +} + +.el-timeline-item__timestamp.is-top { + margin-bottom: 8px; + padding-top: 4px +} + +.el-timeline-item__timestamp.is-bottom { + margin-top: 8px +} + +.el-link { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + vertical-align: middle; + position: relative; + text-decoration: none; + outline: 0; + padding: 0 +} + +.el-drawer, .el-empty, .el-result { + -webkit-box-orient: vertical; + -webkit-box-direction: normal +} + +.el-link.is-underline:hover:after { + content: ""; + position: absolute; + left: 0; + right: 0; + height: 0; + bottom: 0; + border-bottom: 1px solid #409EFF +} + +.el-link.el-link--default:after, .el-link.el-link--primary.is-underline:hover:after, .el-link.el-link--primary:after { + border-color: #409EFF +} + +.el-link.is-disabled { + cursor: not-allowed +} + +.el-link [class*=el-icon-] + span { + margin-left: 5px +} + +.el-link.el-link--default { + color: #606266 +} + +.el-link.el-link--default:hover { + color: #409EFF +} + +.el-link.el-link--default.is-disabled { + color: #C0C4CC +} + +.el-link.el-link--primary { + color: #409EFF +} + +.el-link.el-link--primary:hover { + color: #66b1ff +} + +.el-link.el-link--primary.is-disabled { + color: #a0cfff +} + +.el-link.el-link--danger.is-underline:hover:after, .el-link.el-link--danger:after { + border-color: #F56C6C +} + +.el-link.el-link--danger { + color: #F56C6C +} + +.el-link.el-link--danger:hover { + color: #f78989 +} + +.el-link.el-link--danger.is-disabled { + color: #fab6b6 +} + +.el-link.el-link--success.is-underline:hover:after, .el-link.el-link--success:after { + border-color: #67C23A +} + +.el-link.el-link--success { + color: #67C23A +} + +.el-link.el-link--success:hover { + color: #85ce61 +} + +.el-link.el-link--success.is-disabled { + color: #b3e19d +} + +.el-link.el-link--warning.is-underline:hover:after, .el-link.el-link--warning:after { + border-color: #E6A23C +} + +.el-link.el-link--warning { + color: #E6A23C +} + +.el-link.el-link--warning:hover { + color: #ebb563 +} + +.el-link.el-link--warning.is-disabled { + color: #f3d19e +} + +.el-link.el-link--info.is-underline:hover:after, .el-link.el-link--info:after { + border-color: #909399 +} + +.el-link.el-link--info { + color: #909399 +} + +.el-link.el-link--info:hover { + color: #a6a9ad +} + +.el-link.el-link--info.is-disabled { + color: #c8c9cc +} + +.el-divider { + background-color: #DCDFE6; + position: relative +} + +.el-divider--horizontal { + display: block; + height: 1px; + width: 100%; + margin: 24px 0 +} + +.el-divider--vertical { + display: inline-block; + width: 1px; + height: 1em; + margin: 0 8px; + vertical-align: middle; + position: relative +} + +.el-divider__text { + position: absolute; + background-color: #FFF; + padding: 0 20px; + color: #303133 +} + +.el-image__error, .el-image__placeholder { + background: #F5F7FA +} + +.el-divider__text.is-left { + left: 20px; + -webkit-transform: translateY(-50%); + transform: translateY(-50%) +} + +.el-divider__text.is-center { + left: 50%; + -webkit-transform: translateX(-50%) translateY(-50%); + transform: translateX(-50%) translateY(-50%) +} + +.el-divider__text.is-right { + right: 20px; + -webkit-transform: translateY(-50%); + transform: translateY(-50%) +} + +.el-image__error, .el-image__inner, .el-image__placeholder { + width: 100%; + height: 100% +} + +.el-image { + position: relative; + display: inline-block; + overflow: hidden +} + +.el-image__inner { + vertical-align: top +} + +.el-image__inner--center { + position: relative; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + display: block +} + +.el-image__error { + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + font-size: 14px; + color: #C0C4CC; + vertical-align: middle +} + +.el-image__preview { + cursor: pointer +} + +.el-image-viewer__wrapper { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0 +} + +.el-image-viewer__btn { + position: absolute; + z-index: 1; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + border-radius: 50%; + opacity: .8; + cursor: pointer; + -webkit-box-sizing: border-box; + box-sizing: border-box; + user-select: none +} + +.el-button, .el-checkbox { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none +} + +.el-image-viewer__close { + top: 40px; + right: 40px; + width: 40px; + height: 40px; + font-size: 24px; + color: #fff; + background-color: #606266 +} + +.el-image-viewer__canvas { + width: 100%; + height: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center +} + +.el-image-viewer__actions { + left: 50%; + bottom: 30px; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + width: 282px; + height: 44px; + padding: 0 23px; + background-color: #606266; + border-color: #fff; + border-radius: 22px +} + +.el-image-viewer__actions__inner { + width: 100%; + height: 100%; + text-align: justify; + cursor: default; + font-size: 23px; + color: #fff; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: distribute; + justify-content: space-around +} + +.el-image-viewer__next, .el-image-viewer__prev { + top: 50%; + width: 44px; + height: 44px; + font-size: 24px; + color: #fff; + background-color: #606266; + border-color: #fff +} + +.el-image-viewer__prev { + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + left: 40px +} + +.el-image-viewer__next { + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + right: 40px; + text-indent: 2px +} + +.el-image-viewer__mask { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + opacity: .5; + background: #000 +} + +.viewer-fade-enter-active { + -webkit-animation: viewer-fade-in .3s; + animation: viewer-fade-in .3s +} + +.viewer-fade-leave-active { + -webkit-animation: viewer-fade-out .3s; + animation: viewer-fade-out .3s +} + +@-webkit-keyframes viewer-fade-in { + 0% { + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + opacity: 0 + } + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1 + } +} + +@keyframes viewer-fade-in { + 0% { + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + opacity: 0 + } + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1 + } +} + +@-webkit-keyframes viewer-fade-out { + 0% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1 + } + 100% { + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + opacity: 0 + } +} + +@keyframes viewer-fade-out { + 0% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1 + } + 100% { + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + opacity: 0 + } +} + +.el-button { + display: inline-block; + line-height: 1; + white-space: nowrap; + cursor: pointer; + background: #FFF; + border: 1px solid #DCDFE6; + color: #606266; + -webkit-appearance: none; + text-align: center; + -webkit-box-sizing: border-box; + box-sizing: border-box; + outline: 0; + margin: 0; + -webkit-transition: .1s; + transition: .1s; + font-weight: 500; + padding: 12px 20px; + font-size: 14px; + border-radius: 4px +} + +.el-button + .el-button { + margin-left: 10px +} + +.el-button:focus, .el-button:hover { + color: #409EFF; + border-color: #c6e2ff; + background-color: #ecf5ff +} + +.el-button:active { + color: #3a8ee6; + border-color: #3a8ee6; + outline: 0 +} + +.el-button::-moz-focus-inner { + border: 0 +} + +.el-button [class*=el-icon-] + span { + margin-left: 5px +} + +.el-button.is-plain:focus, .el-button.is-plain:hover { + background: #FFF; + border-color: #409EFF; + color: #409EFF +} + +.el-button.is-active, .el-button.is-plain:active { + color: #3a8ee6; + border-color: #3a8ee6 +} + +.el-button.is-plain:active { + background: #FFF; + outline: 0 +} + +.el-button.is-disabled, .el-button.is-disabled:focus, .el-button.is-disabled:hover { + color: #C0C4CC; + cursor: not-allowed; + background-image: none; + background-color: #FFF; + border-color: #EBEEF5 +} + +.el-button.is-disabled.el-button--text { + background-color: transparent +} + +.el-button.is-disabled.is-plain, .el-button.is-disabled.is-plain:focus, .el-button.is-disabled.is-plain:hover { + background-color: #FFF; + border-color: #EBEEF5; + color: #C0C4CC +} + +.el-button.is-loading { + position: relative; + pointer-events: none +} + +.el-button.is-loading:before { + pointer-events: none; + content: ''; + position: absolute; + left: -1px; + top: -1px; + right: -1px; + bottom: -1px; + border-radius: inherit; + background-color: rgba(255, 255, 255, .35) +} + +.el-button.is-round { + border-radius: 20px; + padding: 12px 23px +} + +.el-button.is-circle { + border-radius: 50%; + padding: 12px +} + +.el-button--primary { + color: #FFF; + background-color: #409EFF; + border-color: #409EFF +} + +.el-button--primary:focus, .el-button--primary:hover { + background: #66b1ff; + border-color: #66b1ff; + color: #FFF +} + +.el-button--primary.is-active, .el-button--primary:active { + background: #3a8ee6; + border-color: #3a8ee6; + color: #FFF +} + +.el-button--primary:active { + outline: 0 +} + +.el-button--primary.is-disabled, .el-button--primary.is-disabled:active, .el-button--primary.is-disabled:focus, .el-button--primary.is-disabled:hover { + color: #FFF; + background-color: #a0cfff; + border-color: #a0cfff +} + +.el-button--primary.is-plain { + color: #409EFF; + background: #ecf5ff; + border-color: #b3d8ff +} + +.el-button--primary.is-plain:focus, .el-button--primary.is-plain:hover { + background: #409EFF; + border-color: #409EFF; + color: #FFF +} + +.el-button--primary.is-plain:active { + background: #3a8ee6; + border-color: #3a8ee6; + color: #FFF; + outline: 0 +} + +.el-button--primary.is-plain.is-disabled, .el-button--primary.is-plain.is-disabled:active, .el-button--primary.is-plain.is-disabled:focus, .el-button--primary.is-plain.is-disabled:hover { + color: #8cc5ff; + background-color: #ecf5ff; + border-color: #d9ecff +} + +.el-button--success { + color: #FFF; + background-color: #67C23A; + border-color: #67C23A +} + +.el-button--success:focus, .el-button--success:hover { + background: #85ce61; + border-color: #85ce61; + color: #FFF +} + +.el-button--success.is-active, .el-button--success:active { + background: #5daf34; + border-color: #5daf34; + color: #FFF +} + +.el-button--success:active { + outline: 0 +} + +.el-button--success.is-disabled, .el-button--success.is-disabled:active, .el-button--success.is-disabled:focus, .el-button--success.is-disabled:hover { + color: #FFF; + background-color: #b3e19d; + border-color: #b3e19d +} + +.el-button--success.is-plain { + color: #67C23A; + background: #f0f9eb; + border-color: #c2e7b0 +} + +.el-button--success.is-plain:focus, .el-button--success.is-plain:hover { + background: #67C23A; + border-color: #67C23A; + color: #FFF +} + +.el-button--success.is-plain:active { + background: #5daf34; + border-color: #5daf34; + color: #FFF; + outline: 0 +} + +.el-button--success.is-plain.is-disabled, .el-button--success.is-plain.is-disabled:active, .el-button--success.is-plain.is-disabled:focus, .el-button--success.is-plain.is-disabled:hover { + color: #a4da89; + background-color: #f0f9eb; + border-color: #e1f3d8 +} + +.el-button--warning { + color: #FFF; + background-color: #E6A23C; + border-color: #E6A23C +} + +.el-button--warning:focus, .el-button--warning:hover { + background: #ebb563; + border-color: #ebb563; + color: #FFF +} + +.el-button--warning.is-active, .el-button--warning:active { + background: #cf9236; + border-color: #cf9236; + color: #FFF +} + +.el-button--warning:active { + outline: 0 +} + +.el-button--warning.is-disabled, .el-button--warning.is-disabled:active, .el-button--warning.is-disabled:focus, .el-button--warning.is-disabled:hover { + color: #FFF; + background-color: #f3d19e; + border-color: #f3d19e +} + +.el-button--warning.is-plain { + color: #E6A23C; + background: #fdf6ec; + border-color: #f5dab1 +} + +.el-button--warning.is-plain:focus, .el-button--warning.is-plain:hover { + background: #E6A23C; + border-color: #E6A23C; + color: #FFF +} + +.el-button--warning.is-plain:active { + background: #cf9236; + border-color: #cf9236; + color: #FFF; + outline: 0 +} + +.el-button--warning.is-plain.is-disabled, .el-button--warning.is-plain.is-disabled:active, .el-button--warning.is-plain.is-disabled:focus, .el-button--warning.is-plain.is-disabled:hover { + color: #f0c78a; + background-color: #fdf6ec; + border-color: #faecd8 +} + +.el-button--danger { + color: #FFF; + background-color: #F56C6C; + border-color: #F56C6C +} + +.el-button--danger:focus, .el-button--danger:hover { + background: #f78989; + border-color: #f78989; + color: #FFF +} + +.el-button--danger.is-active, .el-button--danger:active { + background: #dd6161; + border-color: #dd6161; + color: #FFF +} + +.el-button--danger:active { + outline: 0 +} + +.el-button--danger.is-disabled, .el-button--danger.is-disabled:active, .el-button--danger.is-disabled:focus, .el-button--danger.is-disabled:hover { + color: #FFF; + background-color: #fab6b6; + border-color: #fab6b6 +} + +.el-button--danger.is-plain { + color: #F56C6C; + background: #fef0f0; + border-color: #fbc4c4 +} + +.el-button--danger.is-plain:focus, .el-button--danger.is-plain:hover { + background: #F56C6C; + border-color: #F56C6C; + color: #FFF +} + +.el-button--danger.is-plain:active { + background: #dd6161; + border-color: #dd6161; + color: #FFF; + outline: 0 +} + +.el-button--danger.is-plain.is-disabled, .el-button--danger.is-plain.is-disabled:active, .el-button--danger.is-plain.is-disabled:focus, .el-button--danger.is-plain.is-disabled:hover { + color: #f9a7a7; + background-color: #fef0f0; + border-color: #fde2e2 +} + +.el-button--info { + color: #FFF; + background-color: #909399; + border-color: #909399 +} + +.el-button--info:focus, .el-button--info:hover { + background: #a6a9ad; + border-color: #a6a9ad; + color: #FFF +} + +.el-button--info.is-active, .el-button--info:active { + background: #82848a; + border-color: #82848a; + color: #FFF +} + +.el-button--info:active { + outline: 0 +} + +.el-button--info.is-disabled, .el-button--info.is-disabled:active, .el-button--info.is-disabled:focus, .el-button--info.is-disabled:hover { + color: #FFF; + background-color: #c8c9cc; + border-color: #c8c9cc +} + +.el-button--info.is-plain { + color: #909399; + background: #f4f4f5; + border-color: #d3d4d6 +} + +.el-button--info.is-plain:focus, .el-button--info.is-plain:hover { + background: #909399; + border-color: #909399; + color: #FFF +} + +.el-button--info.is-plain:active { + background: #82848a; + border-color: #82848a; + color: #FFF; + outline: 0 +} + +.el-button--info.is-plain.is-disabled, .el-button--info.is-plain.is-disabled:active, .el-button--info.is-plain.is-disabled:focus, .el-button--info.is-plain.is-disabled:hover { + color: #bcbec2; + background-color: #f4f4f5; + border-color: #e9e9eb +} + +.el-button--text, .el-button--text.is-disabled, .el-button--text.is-disabled:focus, .el-button--text.is-disabled:hover, .el-button--text:active { + border-color: transparent +} + +.el-button--medium { + padding: 10px 20px; + font-size: 14px; + border-radius: 4px +} + +.el-button--mini, .el-button--small { + font-size: 12px; + border-radius: 3px +} + +.el-button--medium.is-round { + padding: 10px 20px +} + +.el-button--medium.is-circle { + padding: 10px +} + +.el-button--small, .el-button--small.is-round { + padding: 9px 15px +} + +.el-button--small.is-circle { + padding: 9px +} + +.el-button--mini, .el-button--mini.is-round { + padding: 7px 15px +} + +.el-button--mini.is-circle { + padding: 7px +} + +.el-button--text { + color: #409EFF; + background: 0 0; + padding-left: 0; + padding-right: 0 +} + +.el-button--text:focus, .el-button--text:hover { + color: #66b1ff; + border-color: transparent; + background-color: transparent +} + +.el-button--text:active { + color: #3a8ee6; + background-color: transparent +} + +.el-button-group { + display: inline-block; + vertical-align: middle +} + +.el-button-group::after, .el-button-group::before { + display: table; + content: "" +} + +.el-button-group::after { + clear: both +} + +.el-button-group > .el-button { + float: left; + position: relative +} + +.el-button-group > .el-button + .el-button { + margin-left: 0 +} + +.el-button-group > .el-button.is-disabled { + z-index: 1 +} + +.el-button-group > .el-button:first-child { + border-top-right-radius: 0; + border-bottom-right-radius: 0 +} + +.el-button-group > .el-button:last-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0 +} + +.el-button-group > .el-button:first-child:last-child { + border-radius: 4px +} + +.el-button-group > .el-button:first-child:last-child.is-round { + border-radius: 20px +} + +.el-button-group > .el-button:first-child:last-child.is-circle { + border-radius: 50% +} + +.el-button-group > .el-button:not(:first-child):not(:last-child) { + border-radius: 0 +} + +.el-button-group > .el-button:not(:last-child) { + margin-right: -1px +} + +.el-button-group > .el-button.is-active, .el-button-group > .el-button:not(.is-disabled):active, .el-button-group > .el-button:not(.is-disabled):focus, .el-button-group > .el-button:not(.is-disabled):hover { + z-index: 1 +} + +.el-button-group > .el-dropdown > .el-button { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + border-left-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--primary:first-child { + border-right-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--primary:last-child { + border-left-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--primary:not(:first-child):not(:last-child) { + border-left-color: rgba(255, 255, 255, .5); + border-right-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--success:first-child { + border-right-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--success:last-child { + border-left-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--success:not(:first-child):not(:last-child) { + border-left-color: rgba(255, 255, 255, .5); + border-right-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--warning:first-child { + border-right-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--warning:last-child { + border-left-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--warning:not(:first-child):not(:last-child) { + border-left-color: rgba(255, 255, 255, .5); + border-right-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--danger:first-child { + border-right-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--danger:last-child { + border-left-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--danger:not(:first-child):not(:last-child) { + border-left-color: rgba(255, 255, 255, .5); + border-right-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--info:first-child { + border-right-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--info:last-child { + border-left-color: rgba(255, 255, 255, .5) +} + +.el-button-group .el-button--info:not(:first-child):not(:last-child) { + border-left-color: rgba(255, 255, 255, .5); + border-right-color: rgba(255, 255, 255, .5) +} + +.el-calendar { + background-color: #fff +} + +.el-calendar__header { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + padding: 12px 20px; + border-bottom: 1px solid #EBEEF5 +} + +.el-backtop, .el-page-header { + display: -webkit-box; + display: -ms-flexbox +} + +.el-calendar__title { + color: #000; + -ms-flex-item-align: center; + align-self: center +} + +.el-calendar__body { + padding: 12px 20px 35px +} + +.el-calendar-table { + table-layout: fixed; + width: 100% +} + +.el-calendar-table thead th { + padding: 12px 0; + color: #606266; + font-weight: 400 +} + +.el-calendar-table:not(.is-range) td.next, .el-calendar-table:not(.is-range) td.prev { + color: #C0C4CC +} + +.el-backtop, .el-calendar-table td.is-today { + color: #409EFF +} + +.el-calendar-table td { + border-bottom: 1px solid #EBEEF5; + border-right: 1px solid #EBEEF5; + vertical-align: top; + -webkit-transition: background-color .2s ease; + transition: background-color .2s ease +} + +.el-calendar-table td.is-selected { + background-color: #F2F8FE +} + +.el-calendar-table tr:first-child td { + border-top: 1px solid #EBEEF5 +} + +.el-calendar-table tr td:first-child { + border-left: 1px solid #EBEEF5 +} + +.el-calendar-table tr.el-calendar-table__row--hide-border td { + border-top: none +} + +.el-calendar-table .el-calendar-day { + -webkit-box-sizing: border-box; + box-sizing: border-box; + padding: 8px; + height: 85px +} + +.el-calendar-table .el-calendar-day:hover { + cursor: pointer; + background-color: #F2F8FE +} + +.el-backtop { + position: fixed; + background-color: #FFF; + width: 40px; + height: 40px; + border-radius: 50%; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + font-size: 20px; + -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, .12); + box-shadow: 0 0 6px rgba(0, 0, 0, .12); + cursor: pointer; + z-index: 5 +} + +.el-backtop:hover { + background-color: #F2F6FC +} + +.el-page-header { + display: flex; + line-height: 24px +} + +.el-page-header__left { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + cursor: pointer; + margin-right: 40px; + position: relative +} + +.el-page-header__left::after { + content: ""; + position: absolute; + width: 1px; + height: 16px; + right: -20px; + top: 50%; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + background-color: #DCDFE6 +} + +.el-checkbox, .el-checkbox__input { + display: inline-block; + position: relative; + white-space: nowrap +} + +.el-page-header__left .el-icon-back { + font-size: 18px; + margin-right: 6px; + -ms-flex-item-align: center; + align-self: center +} + +.el-page-header__title { + font-size: 14px; + font-weight: 500 +} + +.el-page-header__content { + font-size: 18px; + color: #303133 +} + +.el-checkbox { + color: #606266; + font-weight: 500; + font-size: 14px; + cursor: pointer; + user-select: none; + margin-right: 30px +} + +.el-checkbox-button__inner, .el-empty__image img, .el-radio { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none +} + +.el-checkbox.is-bordered { + padding: 9px 20px 9px 10px; + border-radius: 4px; + border: 1px solid #DCDFE6; + -webkit-box-sizing: border-box; + box-sizing: border-box; + line-height: normal; + height: 40px +} + +.el-checkbox.is-bordered.is-checked { + border-color: #409EFF +} + +.el-checkbox.is-bordered.is-disabled { + border-color: #EBEEF5; + cursor: not-allowed +} + +.el-checkbox.is-bordered + .el-checkbox.is-bordered { + margin-left: 10px +} + +.el-checkbox.is-bordered.el-checkbox--medium { + padding: 7px 20px 7px 10px; + border-radius: 4px; + height: 36px +} + +.el-checkbox.is-bordered.el-checkbox--medium .el-checkbox__label { + line-height: 17px; + font-size: 14px +} + +.el-checkbox.is-bordered.el-checkbox--medium .el-checkbox__inner { + height: 14px; + width: 14px +} + +.el-checkbox.is-bordered.el-checkbox--small { + padding: 5px 15px 5px 10px; + border-radius: 3px; + height: 32px +} + +.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__label { + line-height: 15px; + font-size: 12px +} + +.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__inner { + height: 12px; + width: 12px +} + +.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__inner::after { + height: 6px; + width: 2px +} + +.el-checkbox.is-bordered.el-checkbox--mini { + padding: 3px 15px 3px 10px; + border-radius: 3px; + height: 28px +} + +.el-checkbox.is-bordered.el-checkbox--mini .el-checkbox__label { + line-height: 12px; + font-size: 12px +} + +.el-checkbox.is-bordered.el-checkbox--mini .el-checkbox__inner { + height: 12px; + width: 12px +} + +.el-checkbox.is-bordered.el-checkbox--mini .el-checkbox__inner::after { + height: 6px; + width: 2px +} + +.el-checkbox__input { + cursor: pointer; + outline: 0; + line-height: 1; + vertical-align: middle +} + +.el-checkbox__input.is-disabled .el-checkbox__inner { + background-color: #edf2fc; + border-color: #DCDFE6; + cursor: not-allowed +} + +.el-checkbox__input.is-disabled .el-checkbox__inner::after { + cursor: not-allowed; + border-color: #C0C4CC +} + +.el-checkbox__input.is-disabled .el-checkbox__inner + .el-checkbox__label { + cursor: not-allowed +} + +.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner { + background-color: #F2F6FC; + border-color: #DCDFE6 +} + +.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after { + border-color: #C0C4CC +} + +.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner { + background-color: #F2F6FC; + border-color: #DCDFE6 +} + +.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner::before { + background-color: #C0C4CC; + border-color: #C0C4CC +} + +.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner { + background-color: #409EFF; + border-color: #409EFF +} + +.el-checkbox__input.is-disabled + span.el-checkbox__label { + color: #C0C4CC; + cursor: not-allowed +} + +.el-checkbox__input.is-checked .el-checkbox__inner::after { + -webkit-transform: rotate(45deg) scaleY(1); + transform: rotate(45deg) scaleY(1) +} + +.el-checkbox__input.is-checked + .el-checkbox__label { + color: #409EFF +} + +.el-checkbox__input.is-focus .el-checkbox__inner { + border-color: #409EFF +} + +.el-checkbox__input.is-indeterminate .el-checkbox__inner::before { + content: ''; + position: absolute; + display: block; + background-color: #FFF; + height: 2px; + -webkit-transform: scale(.5); + transform: scale(.5); + left: 0; + right: 0; + top: 5px +} + +.el-checkbox__input.is-indeterminate .el-checkbox__inner::after { + display: none +} + +.el-checkbox__inner { + display: inline-block; + position: relative; + border: 1px solid #DCDFE6; + border-radius: 2px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + width: 14px; + height: 14px; + background-color: #FFF; + z-index: 1; + -webkit-transition: border-color .25s cubic-bezier(.71, -.46, .29, 1.46), background-color .25s cubic-bezier(.71, -.46, .29, 1.46); + transition: border-color .25s cubic-bezier(.71, -.46, .29, 1.46), background-color .25s cubic-bezier(.71, -.46, .29, 1.46) +} + +.el-checkbox__inner:hover { + border-color: #409EFF +} + +.el-checkbox__inner::after { + -webkit-box-sizing: content-box; + box-sizing: content-box; + content: ""; + border: 1px solid #FFF; + border-left: 0; + border-top: 0; + height: 7px; + left: 4px; + position: absolute; + top: 1px; + -webkit-transform: rotate(45deg) scaleY(0); + transform: rotate(45deg) scaleY(0); + width: 3px; + -webkit-transition: -webkit-transform .15s ease-in .05s; + transition: -webkit-transform .15s ease-in .05s; + transition: transform .15s ease-in .05s; + transition: transform .15s ease-in .05s, -webkit-transform .15s ease-in .05s; + -webkit-transform-origin: center; + transform-origin: center +} + +.el-checkbox__original { + opacity: 0; + outline: 0; + position: absolute; + margin: 0; + width: 0; + height: 0; + z-index: -1 +} + +.el-checkbox-button, .el-checkbox-button__inner { + display: inline-block; + position: relative +} + +.el-checkbox__label { + display: inline-block; + padding-left: 10px; + line-height: 19px; + font-size: 14px +} + +.el-checkbox:last-of-type { + margin-right: 0 +} + +.el-checkbox-button__inner { + line-height: 1; + font-weight: 500; + white-space: nowrap; + vertical-align: middle; + cursor: pointer; + background: #FFF; + border: 1px solid #DCDFE6; + border-left: 0; + color: #606266; + -webkit-appearance: none; + text-align: center; + -webkit-box-sizing: border-box; + box-sizing: border-box; + outline: 0; + margin: 0; + -webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1); + transition: all .3s cubic-bezier(.645, .045, .355, 1); + padding: 12px 20px; + font-size: 14px; + border-radius: 0 +} + +.el-checkbox-button__inner.is-round { + padding: 12px 20px +} + +.el-checkbox-button__inner:hover { + color: #409EFF +} + +.el-checkbox-button__inner [class*=el-icon-] { + line-height: .9 +} + +.el-radio, .el-radio__input { + line-height: 1; + white-space: nowrap; + outline: 0 +} + +.el-checkbox-button__inner [class*=el-icon-] + span { + margin-left: 5px +} + +.el-checkbox-button__original { + opacity: 0; + outline: 0; + position: absolute; + margin: 0; + z-index: -1 +} + +.el-radio, .el-radio__inner, .el-radio__input { + position: relative; + display: inline-block +} + +.el-checkbox-button.is-checked .el-checkbox-button__inner { + color: #FFF; + background-color: #409EFF; + border-color: #409EFF; + -webkit-box-shadow: -1px 0 0 0 #8cc5ff; + box-shadow: -1px 0 0 0 #8cc5ff +} + +.el-checkbox-button.is-checked:first-child .el-checkbox-button__inner { + border-left-color: #409EFF +} + +.el-checkbox-button.is-disabled .el-checkbox-button__inner { + color: #C0C4CC; + cursor: not-allowed; + background-image: none; + background-color: #FFF; + border-color: #EBEEF5; + -webkit-box-shadow: none; + box-shadow: none +} + +.el-checkbox-button.is-disabled:first-child .el-checkbox-button__inner { + border-left-color: #EBEEF5 +} + +.el-checkbox-button:first-child .el-checkbox-button__inner { + border-left: 1px solid #DCDFE6; + border-radius: 4px 0 0 4px; + -webkit-box-shadow: none !important; + box-shadow: none !important +} + +.el-checkbox-button.is-focus .el-checkbox-button__inner { + border-color: #409EFF +} + +.el-checkbox-button:last-child .el-checkbox-button__inner { + border-radius: 0 4px 4px 0 +} + +.el-checkbox-button--medium .el-checkbox-button__inner { + padding: 10px 20px; + font-size: 14px; + border-radius: 0 +} + +.el-checkbox-button--medium .el-checkbox-button__inner.is-round { + padding: 10px 20px +} + +.el-checkbox-button--small .el-checkbox-button__inner { + padding: 9px 15px; + font-size: 12px; + border-radius: 0 +} + +.el-checkbox-button--small .el-checkbox-button__inner.is-round { + padding: 9px 15px +} + +.el-checkbox-button--mini .el-checkbox-button__inner { + padding: 7px 15px; + font-size: 12px; + border-radius: 0 +} + +.el-checkbox-button--mini .el-checkbox-button__inner.is-round { + padding: 7px 15px +} + +.el-checkbox-group { + font-size: 0 +} + +.el-radio, .el-radio--medium.is-bordered .el-radio__label { + font-size: 14px +} + +.el-radio { + color: #606266; + font-weight: 500; + cursor: pointer; + margin-right: 30px +} + +.el-cascader-node > .el-radio, .el-radio:last-child { + margin-right: 0 +} + +.el-radio.is-bordered { + padding: 12px 20px 0 10px; + border-radius: 4px; + border: 1px solid #DCDFE6; + -webkit-box-sizing: border-box; + box-sizing: border-box; + height: 40px +} + +.el-radio.is-bordered.is-checked { + border-color: #409EFF +} + +.el-radio.is-bordered.is-disabled { + cursor: not-allowed; + border-color: #EBEEF5 +} + +.el-radio__input.is-disabled .el-radio__inner, .el-radio__input.is-disabled.is-checked .el-radio__inner { + background-color: #F5F7FA; + border-color: #E4E7ED +} + +.el-radio.is-bordered + .el-radio.is-bordered { + margin-left: 10px +} + +.el-radio--medium.is-bordered { + padding: 10px 20px 0 10px; + border-radius: 4px; + height: 36px +} + +.el-radio--mini.is-bordered .el-radio__label, .el-radio--small.is-bordered .el-radio__label { + font-size: 12px +} + +.el-radio--medium.is-bordered .el-radio__inner { + height: 14px; + width: 14px +} + +.el-radio--small.is-bordered { + padding: 8px 15px 0 10px; + border-radius: 3px; + height: 32px +} + +.el-radio--small.is-bordered .el-radio__inner { + height: 12px; + width: 12px +} + +.el-radio--mini.is-bordered { + padding: 6px 15px 0 10px; + border-radius: 3px; + height: 28px +} + +.el-radio--mini.is-bordered .el-radio__inner { + height: 12px; + width: 12px +} + +.el-radio__input { + cursor: pointer; + vertical-align: middle +} + +.el-radio__input.is-disabled .el-radio__inner { + cursor: not-allowed +} + +.el-radio__input.is-disabled .el-radio__inner::after { + cursor: not-allowed; + background-color: #F5F7FA +} + +.el-radio__input.is-disabled .el-radio__inner + .el-radio__label { + cursor: not-allowed +} + +.el-radio__input.is-disabled.is-checked .el-radio__inner::after { + background-color: #C0C4CC +} + +.el-radio__input.is-disabled + span.el-radio__label { + color: #C0C4CC; + cursor: not-allowed +} + +.el-radio__input.is-checked .el-radio__inner { + border-color: #409EFF; + background: #409EFF +} + +.el-radio__input.is-checked .el-radio__inner::after { + -webkit-transform: translate(-50%, -50%) scale(1); + transform: translate(-50%, -50%) scale(1) +} + +.el-radio__input.is-checked + .el-radio__label { + color: #409EFF +} + +.el-radio__input.is-focus .el-radio__inner { + border-color: #409EFF +} + +.el-radio__inner { + border: 1px solid #DCDFE6; + border-radius: 100%; + width: 14px; + height: 14px; + background-color: #FFF; + cursor: pointer; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-radio__inner:hover { + border-color: #409EFF +} + +.el-radio__inner::after { + width: 4px; + height: 4px; + border-radius: 100%; + background-color: #FFF; + content: ""; + position: absolute; + left: 50%; + top: 50%; + -webkit-transform: translate(-50%, -50%) scale(0); + transform: translate(-50%, -50%) scale(0); + -webkit-transition: -webkit-transform .15s ease-in; + transition: -webkit-transform .15s ease-in; + transition: transform .15s ease-in; + transition: transform .15s ease-in, -webkit-transform .15s ease-in +} + +.el-radio__original { + opacity: 0; + outline: 0; + position: absolute; + z-index: -1; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: 0 +} + +.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner { + -webkit-box-shadow: 0 0 2px 2px #409EFF; + box-shadow: 0 0 2px 2px #409EFF +} + +.el-radio__label { + font-size: 14px; + padding-left: 10px +} + +.el-scrollbar { + overflow: hidden; + position: relative +} + +.el-scrollbar:active > .el-scrollbar__bar, .el-scrollbar:focus > .el-scrollbar__bar, .el-scrollbar:hover > .el-scrollbar__bar { + opacity: 1; + -webkit-transition: opacity 340ms ease-out; + transition: opacity 340ms ease-out +} + +.el-scrollbar__wrap { + overflow: scroll; + height: 100% +} + +.el-scrollbar__wrap--hidden-default { + scrollbar-width: none +} + +.el-scrollbar__wrap--hidden-default::-webkit-scrollbar { + width: 0; + height: 0 +} + +.el-scrollbar__thumb { + position: relative; + display: block; + width: 0; + height: 0; + cursor: pointer; + border-radius: inherit; + background-color: rgba(144, 147, 153, .3); + -webkit-transition: .3s background-color; + transition: .3s background-color +} + +.el-scrollbar__thumb:hover { + background-color: rgba(144, 147, 153, .5) +} + +.el-scrollbar__bar { + position: absolute; + right: 2px; + bottom: 2px; + z-index: 1; + border-radius: 4px; + opacity: 0; + -webkit-transition: opacity 120ms ease-out; + transition: opacity 120ms ease-out +} + +.el-scrollbar__bar.is-vertical { + width: 6px; + top: 2px +} + +.el-scrollbar__bar.is-vertical > div { + width: 100% +} + +.el-scrollbar__bar.is-horizontal { + height: 6px; + left: 2px +} + +.el-scrollbar__bar.is-horizontal > div { + height: 100% +} + +.el-cascader-panel { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + border-radius: 4px; + font-size: 14px +} + +.el-cascader-panel.is-bordered { + border: 1px solid #E4E7ED; + border-radius: 4px +} + +.el-cascader-menu { + min-width: 180px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: #606266; + border-right: solid 1px #E4E7ED +} + +.el-cascader-menu:last-child { + border-right: none +} + +.el-cascader-menu:last-child .el-cascader-node { + padding-right: 20px +} + +.el-cascader-menu__wrap { + height: 204px +} + +.el-cascader-menu__list { + position: relative; + min-height: 100%; + margin: 0; + padding: 6px 0; + list-style: none; + -webkit-box-sizing: border-box; + box-sizing: border-box +} + +.el-avatar, .el-drawer { + -webkit-box-sizing: border-box; + overflow: hidden +} + +.el-cascader-menu__hover-zone { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + pointer-events: none +} + +.el-cascader-menu__empty-text { + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + text-align: center; + color: #C0C4CC +} + +.el-cascader-node { + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + padding: 0 30px 0 20px; + height: 34px; + line-height: 34px; + outline: 0 +} + +.el-cascader-node.is-selectable.in-active-path { + color: #606266 +} + +.el-cascader-node.in-active-path, .el-cascader-node.is-active, .el-cascader-node.is-selectable.in-checked-path { + color: #409EFF; + font-weight: 700 +} + +.el-cascader-node:not(.is-disabled) { + cursor: pointer +} + +.el-cascader-node:not(.is-disabled):focus, .el-cascader-node:not(.is-disabled):hover { + background: #F5F7FA +} + +.el-cascader-node.is-disabled { + color: #C0C4CC; + cursor: not-allowed +} + +.el-cascader-node__prefix { + position: absolute; + left: 10px +} + +.el-cascader-node__postfix { + position: absolute; + right: 10px +} + +.el-cascader-node__label { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + padding: 0 10px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis +} + +.el-cascader-node > .el-radio .el-radio__label { + padding-left: 0 +} + +.el-avatar { + display: inline-block; + box-sizing: border-box; + text-align: center; + color: #fff; + background: #C0C4CC; + width: 40px; + height: 40px; + line-height: 40px; + font-size: 14px +} + +.el-avatar > img { + display: block; + height: 100%; + vertical-align: middle +} + +.el-drawer, .el-drawer__header { + display: -webkit-box; + display: -ms-flexbox +} + +.el-empty__image img, .el-empty__image svg { + vertical-align: top; + height: 100%; + width: 100% +} + +.el-avatar--circle { + border-radius: 50% +} + +.el-avatar--square { + border-radius: 4px +} + +.el-avatar--icon { + font-size: 18px +} + +.el-avatar--large { + width: 40px; + height: 40px; + line-height: 40px +} + +.el-avatar--medium { + width: 36px; + height: 36px; + line-height: 36px +} + +.el-avatar--small { + width: 28px; + height: 28px; + line-height: 28px +} + +.el-drawer.ltr, .el-drawer.rtl, .el-drawer__container { + top: 0; + bottom: 0; + height: 100% +} + +@-webkit-keyframes el-drawer-fade-in { + 0% { + opacity: 0 + } + 100% { + opacity: 1 + } +} + +@keyframes el-drawer-fade-in { + 0% { + opacity: 0 + } + 100% { + opacity: 1 + } +} + +@-webkit-keyframes rtl-drawer-in { + 0% { + -webkit-transform: translate(100%, 0); + transform: translate(100%, 0) + } + 100% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } +} + +@keyframes rtl-drawer-in { + 0% { + -webkit-transform: translate(100%, 0); + transform: translate(100%, 0) + } + 100% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } +} + +@-webkit-keyframes rtl-drawer-out { + 0% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } + 100% { + -webkit-transform: translate(100%, 0); + transform: translate(100%, 0) + } +} + +@keyframes rtl-drawer-out { + 0% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } + 100% { + -webkit-transform: translate(100%, 0); + transform: translate(100%, 0) + } +} + +@-webkit-keyframes ltr-drawer-in { + 0% { + -webkit-transform: translate(-100%, 0); + transform: translate(-100%, 0) + } + 100% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } +} + +@keyframes ltr-drawer-in { + 0% { + -webkit-transform: translate(-100%, 0); + transform: translate(-100%, 0) + } + 100% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } +} + +@-webkit-keyframes ltr-drawer-out { + 0% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } + 100% { + -webkit-transform: translate(-100%, 0); + transform: translate(-100%, 0) + } +} + +@keyframes ltr-drawer-out { + 0% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } + 100% { + -webkit-transform: translate(-100%, 0); + transform: translate(-100%, 0) + } +} + +@-webkit-keyframes ttb-drawer-in { + 0% { + -webkit-transform: translate(0, -100%); + transform: translate(0, -100%) + } + 100% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } +} + +@keyframes ttb-drawer-in { + 0% { + -webkit-transform: translate(0, -100%); + transform: translate(0, -100%) + } + 100% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } +} + +@-webkit-keyframes ttb-drawer-out { + 0% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } + 100% { + -webkit-transform: translate(0, -100%); + transform: translate(0, -100%) + } +} + +@keyframes ttb-drawer-out { + 0% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } + 100% { + -webkit-transform: translate(0, -100%); + transform: translate(0, -100%) + } +} + +@-webkit-keyframes btt-drawer-in { + 0% { + -webkit-transform: translate(0, 100%); + transform: translate(0, 100%) + } + 100% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } +} + +@keyframes btt-drawer-in { + 0% { + -webkit-transform: translate(0, 100%); + transform: translate(0, 100%) + } + 100% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } +} + +@-webkit-keyframes btt-drawer-out { + 0% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } + 100% { + -webkit-transform: translate(0, 100%); + transform: translate(0, 100%) + } +} + +@keyframes btt-drawer-out { + 0% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0) + } + 100% { + -webkit-transform: translate(0, 100%); + transform: translate(0, 100%) + } +} + +.el-drawer { + position: absolute; + box-sizing: border-box; + background-color: #FFF; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, .2), 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12); + box-shadow: 0 8px 10px -5px rgba(0, 0, 0, .2), 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12); + outline: 0 +} + +.el-drawer__body > *, .el-empty { + -webkit-box-sizing: border-box +} + +.el-drawer.rtl { + -webkit-animation: rtl-drawer-out .3s; + animation: rtl-drawer-out .3s; + right: 0 +} + +.el-drawer__open .el-drawer.rtl { + -webkit-animation: rtl-drawer-in .3s 1ms; + animation: rtl-drawer-in .3s 1ms +} + +.el-drawer.ltr { + -webkit-animation: ltr-drawer-out .3s; + animation: ltr-drawer-out .3s; + left: 0 +} + +.el-drawer__open .el-drawer.ltr { + -webkit-animation: ltr-drawer-in .3s 1ms; + animation: ltr-drawer-in .3s 1ms +} + +.el-drawer.ttb { + -webkit-animation: ttb-drawer-out .3s; + animation: ttb-drawer-out .3s; + top: 0 +} + +.el-drawer__open .el-drawer.ttb { + -webkit-animation: ttb-drawer-in .3s 1ms; + animation: ttb-drawer-in .3s 1ms +} + +.el-drawer.btt { + -webkit-animation: btt-drawer-out .3s; + animation: btt-drawer-out .3s; + bottom: 0 +} + +.el-drawer__open .el-drawer.btt { + -webkit-animation: btt-drawer-in .3s 1ms; + animation: btt-drawer-in .3s 1ms +} + +.el-drawer__wrapper { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + overflow: hidden; + margin: 0 +} + +.el-drawer__header { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + color: #72767b; + display: flex; + margin-bottom: 32px; + padding: 20px 20px 0 +} + +.el-drawer__header > :first-child { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1 +} + +.el-drawer__title { + margin: 0; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + line-height: inherit; + font-size: 1rem +} + +.el-drawer__close-btn { + border: none; + cursor: pointer; + font-size: 20px; + color: inherit; + background-color: transparent +} + +.el-drawer__body { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + overflow: auto +} + +.el-drawer__body > * { + box-sizing: border-box +} + +.el-drawer.btt, .el-drawer.ttb { + width: 100%; + left: 0; + right: 0 +} + +.el-drawer__container { + position: relative; + left: 0; + right: 0; + width: 100% +} + +.el-drawer-fade-enter-active { + -webkit-animation: el-drawer-fade-in .3s; + animation: el-drawer-fade-in .3s +} + +.el-drawer-fade-leave-active { + animation: el-drawer-fade-in .3s reverse +} + +.el-popconfirm__main { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center +} + +.el-popconfirm__icon { + margin-right: 5px +} + +.el-popconfirm__action { + text-align: right; + margin: 0 +} + +@-webkit-keyframes el-skeleton-loading { + 0% { + background-position: 100% 50% + } + 100% { + background-position: 0 50% + } +} + +@keyframes el-skeleton-loading { + 0% { + background-position: 100% 50% + } + 100% { + background-position: 0 50% + } +} + +.el-skeleton { + width: 100% +} + +.el-skeleton__first-line, .el-skeleton__paragraph { + height: 16px; + margin-top: 16px; + background: #f2f2f2 +} + +.el-skeleton.is-animated .el-skeleton__item { + background: -webkit-gradient(linear, left top, right top, color-stop(25%, #f2f2f2), color-stop(37%, #e6e6e6), color-stop(63%, #f2f2f2)); + background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%); + background-size: 400% 100%; + -webkit-animation: el-skeleton-loading 1.4s ease infinite; + animation: el-skeleton-loading 1.4s ease infinite +} + +.el-skeleton__item { + background: #f2f2f2; + display: inline-block; + height: 16px; + border-radius: 4px; + width: 100% +} + +.el-empty, .el-skeleton__image { + display: -webkit-box; + display: -ms-flexbox +} + +.el-skeleton__circle { + border-radius: 50%; + width: 36px; + height: 36px; + line-height: 36px +} + +.el-skeleton__circle--lg { + width: 40px; + height: 40px; + line-height: 40px +} + +.el-skeleton__circle--md { + width: 28px; + height: 28px; + line-height: 28px +} + +.el-skeleton__button { + height: 40px; + width: 64px; + border-radius: 4px +} + +.el-skeleton__p { + width: 100% +} + +.el-skeleton__p.is-last { + width: 61% +} + +.el-skeleton__p.is-first { + width: 33% +} + +.el-skeleton__text { + width: 100%; + height: 13px +} + +.el-skeleton__caption { + height: 12px +} + +.el-skeleton__h1 { + height: 20px +} + +.el-skeleton__h3 { + height: 18px +} + +.el-skeleton__h5 { + height: 16px +} + +.el-skeleton__image { + width: unset; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + border-radius: 0 +} + +.el-skeleton__image svg { + fill: #DCDDE0; + width: 22%; + height: 22% +} + +.el-empty { + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -ms-flex-direction: column; + flex-direction: column; + text-align: center; + box-sizing: border-box; + padding: 40px 0 +} + +.el-empty__image { + width: 160px +} + +.el-empty__image img { + user-select: none; + -o-object-fit: contain; + object-fit: contain +} + +.el-empty__image svg { + fill: #DCDDE0 +} + +.el-empty__description { + margin-top: 20px +} + +.el-empty__description p { + margin: 0; + font-size: 14px; + color: #909399 +} + +.el-empty__bottom, .el-result__title { + margin-top: 20px +} + +.el-descriptions { + -webkit-box-sizing: border-box; + box-sizing: border-box; + font-size: 14px; + color: #303133 +} + +.el-descriptions__header { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + margin-bottom: 20px +} + +.el-descriptions__title { + font-size: 16px; + font-weight: 700 +} + +.el-descriptions--mini, .el-descriptions--small { + font-size: 12px +} + +.el-descriptions__body { + color: #606266; + background-color: #FFF +} + +.el-descriptions__body .el-descriptions__table { + border-collapse: collapse; + width: 100%; + table-layout: fixed +} + +.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell { + -webkit-box-sizing: border-box; + box-sizing: border-box; + text-align: left; + font-weight: 400; + line-height: 1.5 +} + +.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-left { + text-align: left +} + +.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-center { + text-align: center +} + +.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-right { + text-align: right +} + +.el-descriptions .is-bordered { + table-layout: auto +} + +.el-descriptions .is-bordered .el-descriptions-item__cell { + border: 1px solid #EBEEF5; + padding: 12px 10px +} + +.el-descriptions :not(.is-bordered) .el-descriptions-item__cell { + padding-bottom: 12px +} + +.el-descriptions--medium.is-bordered .el-descriptions-item__cell { + padding: 10px +} + +.el-descriptions--medium:not(.is-bordered) .el-descriptions-item__cell { + padding-bottom: 10px +} + +.el-descriptions--small.is-bordered .el-descriptions-item__cell { + padding: 8px 10px +} + +.el-descriptions--small:not(.is-bordered) .el-descriptions-item__cell { + padding-bottom: 8px +} + +.el-descriptions--mini.is-bordered .el-descriptions-item__cell { + padding: 6px 10px +} + +.el-descriptions--mini:not(.is-bordered) .el-descriptions-item__cell { + padding-bottom: 6px +} + +.el-descriptions-item__container { + display: -webkit-box; + display: -ms-flexbox; + display: flex +} + +.el-descriptions-item__label.has-colon::after { + content: ':'; + position: relative; + top: -.5px +} + +.el-descriptions-item__label.is-bordered-label { + font-weight: 700; + color: #909399; + background: #fafafa +} + +.el-descriptions-item__label:not(.is-bordered-label) { + margin-right: 10px +} + +.el-result { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -ms-flex-direction: column; + flex-direction: column; + text-align: center; + -webkit-box-sizing: border-box; + box-sizing: border-box; + padding: 40px 30px +} + +.el-result__icon svg { + width: 64px; + height: 64px +} + +.el-result__title p { + margin: 0; + font-size: 20px; + color: #303133; + line-height: 1.3 +} + +.el-result__subtitle { + margin-top: 10px +} + +.el-result__subtitle p { + margin: 0; + font-size: 14px; + color: #606266; + line-height: 1.3 +} + +.el-result__extra { + margin-top: 30px +} + +.el-result .icon-success { + fill: #67C23A +} + +.el-result .icon-error { + fill: #F56C6C +} + +.el-result .icon-info { + fill: #909399 +} + +.el-result .icon-warning { + fill: #E6A23C +} diff --git a/src/renderer/public/Vue/index.js b/src/renderer/public/Vue/index.js new file mode 100644 index 0000000..a9647a4 --- /dev/null +++ b/src/renderer/public/Vue/index.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("ELEMENT",["vue"],t):"object"==typeof exports?exports.ELEMENT=t(require("vue")):e.ELEMENT=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/dist/",i(i.s=49)}([function(t,i){t.exports=e},function(e,t,i){var n=i(4);e.exports=function(e,t,i){return void 0===i?n(e,t,!1):n(e,i,!1!==t)}},function(e,t,i){var n;!function(r){"use strict";var s={},a=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,o="[^\\s]+",l=/\[([^]*?)\]/gm,u=function(){};function c(e,t){for(var i=[],n=0,r=e.length;n3?0:(e-e%10!=10)*e%10]}};var g={D:function(e){return e.getDay()},DD:function(e){return d(e.getDay())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return e.getDate()},dd:function(e){return d(e.getDate())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return e.getMonth()+1},MM:function(e){return d(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},yy:function(e){return d(String(e.getFullYear()),4).substr(2)},yyyy:function(e){return d(e.getFullYear(),4)},h:function(e){return e.getHours()%12||12},hh:function(e){return d(e.getHours()%12||12)},H:function(e){return e.getHours()},HH:function(e){return d(e.getHours())},m:function(e){return e.getMinutes()},mm:function(e){return d(e.getMinutes())},s:function(e){return e.getSeconds()},ss:function(e){return d(e.getSeconds())},S:function(e){return Math.round(e.getMilliseconds()/100)},SS:function(e){return d(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return d(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+d(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)}},y={d:["\\d\\d?",function(e,t){e.day=t}],Do:["\\d\\d?"+o,function(e,t){e.day=parseInt(t,10)}],M:["\\d\\d?",function(e,t){e.month=t-1}],yy:["\\d\\d?",function(e,t){var i=+(""+(new Date).getFullYear()).substr(0,2);e.year=""+(t>68?i-1:i)+t}],h:["\\d\\d?",function(e,t){e.hour=t}],m:["\\d\\d?",function(e,t){e.minute=t}],s:["\\d\\d?",function(e,t){e.second=t}],yyyy:["\\d{4}",function(e,t){e.year=t}],S:["\\d",function(e,t){e.millisecond=100*t}],SS:["\\d{2}",function(e,t){e.millisecond=10*t}],SSS:["\\d{3}",function(e,t){e.millisecond=t}],D:["\\d\\d?",u],ddd:[o,u],MMM:[o,h("monthNamesShort")],MMMM:[o,h("monthNames")],a:[o,function(e,t,i){var n=t.toLowerCase();n===i.amPm[0]?e.isPm=!1:n===i.amPm[1]&&(e.isPm=!0)}],ZZ:["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z",function(e,t){var i,n=(t+"").match(/([+-]|\d\d)/gi);n&&(i=60*n[1]+parseInt(n[2],10),e.timezoneOffset="+"===n[0]?i:-i)}]};y.dd=y.d,y.dddd=y.ddd,y.DD=y.D,y.mm=y.m,y.hh=y.H=y.HH=y.h,y.MM=y.M,y.ss=y.s,y.A=y.a,s.masks={default:"ddd MMM dd yyyy HH:mm:ss",shortDate:"M/D/yy",mediumDate:"MMM d, yyyy",longDate:"MMMM d, yyyy",fullDate:"dddd, MMMM d, yyyy",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},s.format=function(e,t,i){var n=i||s.i18n;if("number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date in fecha.format");t=s.masks[t]||t||s.masks.default;var r=[];return(t=(t=t.replace(l,function(e,t){return r.push(t),"@@@"})).replace(a,function(t){return t in g?g[t](e,n):t.slice(1,t.length-1)})).replace(/@@@/g,function(){return r.shift()})},s.parse=function(e,t,i){var n=i||s.i18n;if("string"!=typeof t)throw new Error("Invalid format in fecha.parse");if(t=s.masks[t]||t,e.length>1e3)return null;var r={},o=[],u=[];t=t.replace(l,function(e,t){return u.push(t),"@@@"});var c,h=(c=t,c.replace(/[|\\{()[^$+*?.-]/g,"\\$&")).replace(a,function(e){if(y[e]){var t=y[e];return o.push(t[1]),"("+t[0]+")"}return e});h=h.replace(/@@@/g,function(){return u.shift()});var d=e.match(new RegExp(h,"i"));if(!d)return null;for(var p=1;pe?u():!0!==t&&(r=setTimeout(n?function(){r=void 0}:u,void 0===n?e-o:e))}}},function(e,t){var i=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(e,t){var i=/^(attrs|props|on|nativeOn|class|style|hook)$/;function n(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}}e.exports=function(e){return e.reduce(function(e,t){var r,s,a,o,l;for(a in t)if(r=e[a],s=t[a],r&&i.test(a))if("class"===a&&("string"==typeof r&&(l=r,e[a]=r={},r[l]=!0),"string"==typeof s&&(l=s,t[a]=s={},s[l]=!0)),"on"===a||"nativeOn"===a||"hook"===a)for(o in s)r[o]=n(r[o],s[o]);else if(Array.isArray(r))e[a]=r.concat(s);else if(Array.isArray(s))e[a]=[r].concat(s);else for(o in s)r[o]=s[o];else e[a]=t[a];return e},{})}},function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},function(e,t,i){"use strict";t.__esModule=!0;var n,r=i(56),s=(n=r)&&n.__esModule?n:{default:n};t.default=s.default||function(e){for(var t=1;t0?n:i)(e)}},function(e,t,i){var n=i(28)("keys"),r=i(21);e.exports=function(e){return n[e]||(n[e]=r(e))}},function(e,t,i){var n=i(14),r=i(5),s=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:i(20)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){e.exports={}},function(e,t,i){var n=i(10).f,r=i(7),s=i(13)("toStringTag");e.exports=function(e,t,i){e&&!r(e=i?e:e.prototype,s)&&n(e,s,{configurable:!0,value:t})}},function(e,t,i){t.f=i(13)},function(e,t,i){var n=i(5),r=i(14),s=i(20),a=i(33),o=i(10).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=s?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:a.f(e)})}},function(e,t,i){var n=i(4),r=i(1);e.exports={throttle:n,debounce:r}},function(e,t,i){e.exports=!i(11)&&!i(16)(function(){return 7!=Object.defineProperty(i(37)("div"),"a",{get:function(){return 7}}).a})},function(e,t,i){var n=i(15),r=i(5).document,s=n(r)&&n(r.createElement);e.exports=function(e){return s?r.createElement(e):{}}},function(e,t,i){var n=i(7),r=i(12),s=i(62)(!1),a=i(27)("IE_PROTO");e.exports=function(e,t){var i,o=r(e),l=0,u=[];for(i in o)i!=a&&n(o,i)&&u.push(i);for(;t.length>l;)n(o,i=t[l++])&&(~s(u,i)||u.push(i));return u}},function(e,t,i){var n=i(40);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},function(e,t,i){var n=i(25);e.exports=function(e){return Object(n(e))}},function(e,t,i){"use strict";var n=i(20),r=i(23),s=i(43),a=i(9),o=i(31),l=i(69),u=i(32),c=i(72),h=i(13)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,i,f,m,v,g){l(i,t,f);var y,b,w,_=function(e){if(!d&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new i(this,e)}}return function(){return new i(this,e)}},x=t+" Iterator",C="values"==m,k=!1,S=e.prototype,D=S[h]||S["@@iterator"]||m&&S[m],$=D||_(m),E=m?C?_("entries"):$:void 0,T="Array"==t&&S.entries||D;if(T&&(w=c(T.call(new e)))!==Object.prototype&&w.next&&(u(w,x,!0),n||"function"==typeof w[h]||a(w,h,p)),C&&D&&"values"!==D.name&&(k=!0,$=function(){return D.call(this)}),n&&!g||!d&&!k&&S[h]||a(S,h,$),o[t]=$,o[x]=p,m)if(y={values:C?$:_("values"),keys:v?$:_("keys"),entries:E},g)for(b in y)b in S||s(S,b,y[b]);else r(r.P+r.F*(d||k),t,y);return y}},function(e,t,i){e.exports=i(9)},function(e,t,i){var n=i(17),r=i(70),s=i(29),a=i(27)("IE_PROTO"),o=function(){},l=function(){var e,t=i(37)("iframe"),n=s.length;for(t.style.display="none",i(71).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(" + + + + + + + + +
+ +
+ +
+ + + + + + +
+ + + + + + + \ No newline at end of file diff --git a/src/renderer/public/showPicture.html b/src/renderer/public/showPicture.html new file mode 100644 index 0000000..7d02408 --- /dev/null +++ b/src/renderer/public/showPicture.html @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + +
+ +
+ + + + \ No newline at end of file diff --git a/src/renderer/public/tank.glb b/src/renderer/public/tank.glb deleted file mode 100644 index ff47725..0000000 Binary files a/src/renderer/public/tank.glb and /dev/null differ diff --git a/src/renderer/public/vrHtml/@photo-sphere-viewer/core/index.css b/src/renderer/public/vrHtml/@photo-sphere-viewer/core/index.css new file mode 100644 index 0000000..7f708fc --- /dev/null +++ b/src/renderer/public/vrHtml/@photo-sphere-viewer/core/index.css @@ -0,0 +1,539 @@ +/*! + * PhotoSphereViewer 5.7.3 + * @copyright 2014-2015 Jérémy Heleine + * @copyright 2024 Damien "Mistic" Sorel + * @licence MIT (https://opensource.org/licenses/MIT) + */ +/* src/styles/index.scss */ +.psv-container { + --psv-core-loaded: true; + width: 100%; + height: 100%; + margin: 0; + padding: 0; + position: relative; + background: radial-gradient(#fff 0%, #fdfdfd 16%, #fbfbfb 33%, #f8f8f8 49%, #efefef 66%, #dfdfdf 82%, #bfbfbf 100%); + overflow: hidden; +} +.psv-container * { + box-sizing: content-box; +} +.psv-canvas-container { + position: absolute; + top: 0; + left: 0; + z-index: 0; + transition: opacity linear 100ms; +} +.psv-canvas { + display: block; +} +.psv-loader-container { + display: flex; + align-items: center; + justify-content: center; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 80; +} +.psv-loader { + --psv-loader-border: 3px; + --psv-loader-tickness: 10px; + position: relative; + display: flex; + justify-content: center; + align-items: center; + color: rgba(255, 255, 255, 0.7); + width: 150px; + height: 150px; +} +.psv-loader-canvas { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + color: rgba(61, 61, 61, 0.5); + z-index: -1; +} +.psv-loader-text { + font: 600 16px sans-serif; +} +.psv-navbar { + display: flex; + position: absolute; + z-index: 90; + bottom: -40px; + left: 0; + width: 100%; + height: 40px; + background: rgba(61, 61, 61, 0.5); + transition: bottom ease-in-out 0.1s; + font: 16px sans-serif; + cursor: default; +} +.psv-navbar--open { + bottom: 0; +} +.psv-navbar, +.psv-navbar * { + box-sizing: content-box; +} +.psv-button { + flex: 0 0 auto; + padding: 10px; + position: relative; + cursor: pointer; + height: 20px; + width: 20px; + background: transparent; + color: rgba(255, 255, 255, 0.7); +} +.psv-button--active { + background: rgba(255, 255, 255, 0.2); +} +.psv-button--disabled { + pointer-events: none; + opacity: 0.5; +} +.psv-button-svg { + width: 100%; + transform: scale(1); + transition: transform 200ms ease; + vertical-align: initial; +} +.psv-button:not(.psv-button--disabled):focus-visible { + outline: 2px solid #007cff; + outline-offset: -2px; +} +.psv-container:not(.psv--is-touch) .psv-button--hover-scale:not(.psv-button--disabled):hover .psv-button-svg { + transform: scale(1.2); +} +.psv-move-button + .psv-move-button { + margin-left: -10px; +} +.psv-custom-button { + width: auto; + min-width: 20px; +} +.psv-custom-button--no-padding { + padding: 0; + height: 100%; +} +.psv-caption { + flex: 1 1 100%; + color: rgba(255, 255, 255, 0.7); + overflow: hidden; + text-align: center; + cursor: unset; + padding: unset; + height: unset; + width: unset; +} +.psv-caption-content { + display: inline-block; + padding: 10px; + white-space: nowrap; +} +.psv-zoom-range.psv-button { + width: 80px; + height: 1px; + margin: 10px 0; + padding: 9.5px 0; + max-width: 600px; +} +.psv-zoom-range-line { + position: relative; + width: 80px; + height: 1px; + background: rgba(255, 255, 255, 0.7); + transition: all 0.3s ease; +} +.psv-zoom-range-handle { + position: absolute; + border-radius: 50%; + top: -3px; + width: 7px; + height: 7px; + background: rgba(255, 255, 255, 0.7); + transform: scale(1); + transition: transform 0.3s ease; +} +.psv-zoom-range:not(.psv-button--disabled):hover .psv-zoom-range-line { + box-shadow: 0 0 2px rgba(255, 255, 255, 0.7); +} +.psv-zoom-range:not(.psv-button--disabled):hover .psv-zoom-range-handle { + transform: scale(1.3); +} +.psv-notification { + position: absolute; + z-index: 100; + bottom: -40px; + display: flex; + justify-content: center; + box-sizing: border-box; + width: 100%; + padding: 0 2em; + opacity: 0; + transition-property: opacity, bottom; + transition-timing-function: ease-in-out; + transition-duration: 200ms; +} +.psv-notification-content { + max-width: 50em; + background: rgba(61, 61, 61, 0.8); + border-radius: 4px; + padding: 0.5em 1em; + font: 14px sans-serif; + color: rgb(255, 255, 255); +} +.psv-notification--visible { + opacity: 100; + bottom: 80px; +} +.psv-overlay { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + position: absolute; + z-index: 110; + inset: 0; + background: radial-gradient(#fff 0%, #fdfdfd 16%, #fbfbfb 33%, #f8f8f8 49%, #efefef 66%, #dfdfdf 82%, #bfbfbf 100%); + opacity: 0.8; + cursor: default; +} +.psv-overlay-image { + width: 100%; + text-align: center; +} +.psv-overlay-image svg { + width: 50%; +} +@media (orientation: landscape) { + .psv-overlay-image svg { + width: 33%; + } +} +.psv-overlay-title { + color: black; + margin-top: 1em; + font: 30px sans-serif; + text-align: center; +} +.psv-overlay-text { + color: rgba(0, 0, 0, 0.8); + font: 20px sans-serif; + opacity: 0.8; + text-align: center; +} +.psv-panel { + position: absolute; + z-index: 90; + right: 0; + height: 100%; + width: 400px; + max-width: calc(100% - 9px); + background: rgba(10, 10, 10, 0.7); + transform: translate3d(100%, 0, 0); + opacity: 0; + transition-property: opacity, transform; + transition-timing-function: ease-in-out; + transition-duration: 100ms; + cursor: default; + margin-left: 9px; +} +.psv--has-navbar .psv-panel { + height: calc(100% - 40px); +} +.psv-panel-close-button { + display: none; + position: absolute; + top: -1px; + right: 0; + width: 19.2px; + height: 19.2px; + padding: 6.4px; + background: transparent; + color: #fff; + transition: background 300ms ease-in-out; + cursor: pointer; +} +.psv-panel-close-button svg { + transition: transform 300ms ease-in-out; +} +.psv-panel-close-button:hover { + background: rgba(0, 0, 0, 0.9); +} +.psv-panel-close-button:hover svg { + transform: scale(-1); +} +.psv-panel-resizer { + display: none; + position: absolute; + top: 0; + left: -9px; + width: 9px; + height: 100%; + background-color: rgba(0, 0, 0, 0.9); + cursor: col-resize; +} +.psv-panel-resizer::before { + content: ""; + position: absolute; + top: 50%; + left: 1px; + margin-top: -14.5px; + width: 1px; + height: 1px; + box-shadow: + 1px 0 #fff, + 3px 0px #fff, + 5px 0px #fff, + 1px 2px #fff, + 3px 2px #fff, + 5px 2px #fff, + 1px 4px #fff, + 3px 4px #fff, + 5px 4px #fff, + 1px 6px #fff, + 3px 6px #fff, + 5px 6px #fff, + 1px 8px #fff, + 3px 8px #fff, + 5px 8px #fff, + 1px 10px #fff, + 3px 10px #fff, + 5px 10px #fff, + 1px 12px #fff, + 3px 12px #fff, + 5px 12px #fff, + 1px 14px #fff, + 3px 14px #fff, + 5px 14px #fff, + 1px 16px #fff, + 3px 16px #fff, + 5px 16px #fff, + 1px 18px #fff, + 3px 18px #fff, + 5px 18px #fff, + 1px 20px #fff, + 3px 20px #fff, + 5px 20px #fff, + 1px 22px #fff, + 3px 22px #fff, + 5px 22px #fff, + 1px 24px #fff, + 3px 24px #fff, + 5px 24px #fff, + 1px 26px #fff, + 3px 26px #fff, + 5px 26px #fff, + 1px 28px #fff, + 3px 28px #fff, + 5px 28px #fff; + background: transparent; +} +.psv-panel-content { + width: 100%; + height: 100%; + box-sizing: border-box; + color: rgb(220, 220, 220); + font: 16px sans-serif; + overflow: auto; +} +.psv-panel-content:not(.psv-panel-content--no-margin) { + padding: 1em; +} +.psv-panel-content--no-interaction { + user-select: none; + pointer-events: none; +} +.psv-panel--open { + transform: translate3d(0, 0, 0); + opacity: 1; + transition-duration: 0.2s; +} +.psv-panel--open .psv-panel-close-button, +.psv-panel--open .psv-panel-resizer { + display: block; +} +@media screen and (max-width: 400px) { + .psv-panel { + width: 100% !important; + max-width: none; + } + .psv-panel-resizer { + display: none !important; + } +} +.psv-panel-menu { + height: 100%; + display: flex; + flex-direction: column; +} +.psv-panel-menu-title { + flex: none; + display: flex; + align-items: center; + font: 24px sans-serif; + margin: 24px 12px; +} +.psv-panel-menu-title svg { + width: 24px; + height: 24px; + margin-right: 12px; +} +.psv-panel-menu-list { + flex: 1; + list-style: none; + margin: 0; + padding: 0; + overflow-x: hidden; +} +.psv-panel-menu-item { + min-height: 1.5em; + padding: 0.5em 1em; + cursor: pointer; + display: flex; + align-items: center; + justify-content: flex-start; + transition: background 0.1s ease-in-out; +} +.psv-panel-menu-item--active { + outline: 1px solid currentcolor; + outline-offset: -1px; +} +.psv-panel-menu-item-icon { + flex: none; + height: 1.5em; + width: 1.5em; + margin-right: 0.5em; +} +.psv-panel-menu-item-icon img { + max-width: 100%; + max-height: 100%; +} +.psv-panel-menu-item-icon svg { + width: 100%; + height: 100%; +} +.psv-panel-menu-item:focus-visible { + outline: 2px solid #007cff; + outline-offset: -2px; +} +.psv-panel-menu--stripped .psv-panel-menu-item:hover { + background: rgba(255, 255, 255, 0.2); +} +.psv-panel-menu--stripped .psv-panel-menu-item:nth-child(odd), +.psv-panel-menu--stripped .psv-panel-menu-item:nth-child(odd)::before { + background: rgba(255, 255, 255, 0.1); +} +.psv-panel-menu--stripped .psv-panel-menu-item:nth-child(even), +.psv-panel-menu--stripped .psv-panel-menu-item:nth-child(even)::before { + background: transparent; +} +.psv-container:not(.psv--is-touch) .psv-panel-menu-item:hover { + background: rgba(255, 255, 255, 0.2); +} +.psv-tooltip { + position: absolute; + z-index: 50; + box-sizing: border-box; + max-width: 200px; + background: rgba(61, 61, 61, 0.8); + border-radius: 4px; + opacity: 0; + transition-property: opacity, transform; + transition-timing-function: ease-in-out; + transition-duration: 100ms; + cursor: default; +} +.psv-tooltip-content { + color: rgb(255, 255, 255); + font: 14px sans-serif; + text-shadow: 0 1px #000; + padding: 0.5em 1em; +} +.psv-tooltip-arrow { + position: absolute; + height: 0; + width: 0; + border: 7px solid transparent; +} +.psv-tooltip--top-left, +.psv-tooltip--top-center, +.psv-tooltip--top-right { + transform: translate3d(0, 5px, 0); +} +.psv-tooltip--top-left .psv-tooltip-arrow, +.psv-tooltip--top-center .psv-tooltip-arrow, +.psv-tooltip--top-right .psv-tooltip-arrow { + border-top-color: rgba(61, 61, 61, 0.8); +} +.psv-tooltip--bottom-left, +.psv-tooltip--bottom-center, +.psv-tooltip--bottom-right { + transform: translate3d(0, -5px, 0); +} +.psv-tooltip--bottom-left .psv-tooltip-arrow, +.psv-tooltip--bottom-center .psv-tooltip-arrow, +.psv-tooltip--bottom-right .psv-tooltip-arrow { + border-bottom-color: rgba(61, 61, 61, 0.8); +} +.psv-tooltip--left-top, +.psv-tooltip--center-left, +.psv-tooltip--left-bottom { + transform: translate3d(5px, 0, 0); +} +.psv-tooltip--left-top .psv-tooltip-arrow, +.psv-tooltip--center-left .psv-tooltip-arrow, +.psv-tooltip--left-bottom .psv-tooltip-arrow { + border-left-color: rgba(61, 61, 61, 0.8); +} +.psv-tooltip--right-top, +.psv-tooltip--center-right, +.psv-tooltip--right-bottom { + transform: translate3d(-5px, 0, 0); +} +.psv-tooltip--right-top .psv-tooltip-arrow, +.psv-tooltip--center-right .psv-tooltip-arrow, +.psv-tooltip--right-bottom .psv-tooltip-arrow { + border-right-color: rgba(61, 61, 61, 0.8); +} +.psv-tooltip--left-top, +.psv-tooltip--top-left { + box-shadow: -3px -3px 0 rgba(90, 90, 90, 0.7); +} +.psv-tooltip--top-center { + box-shadow: 0 -3px 0 rgba(90, 90, 90, 0.7); +} +.psv-tooltip--right-top, +.psv-tooltip--top-right { + box-shadow: 3px -3px 0 rgba(90, 90, 90, 0.7); +} +.psv-tooltip--left-bottom, +.psv-tooltip--bottom-left { + box-shadow: -3px 3px 0 rgba(90, 90, 90, 0.7); +} +.psv-tooltip--bottom-center { + box-shadow: 0 3px 0 rgba(90, 90, 90, 0.7); +} +.psv-tooltip--right-bottom, +.psv-tooltip--bottom-right { + box-shadow: 3px 3px 0 rgba(90, 90, 90, 0.7); +} +.psv-tooltip--center-left { + box-shadow: -3px 0 0 rgba(90, 90, 90, 0.7); +} +.psv-tooltip--center-right { + box-shadow: 3px 0 0 rgba(90, 90, 90, 0.7); +} +.psv-tooltip--visible { + transform: translate3d(0, 0, 0); + opacity: 1; +} +/*# sourceMappingURL=index.css.map */ \ No newline at end of file diff --git a/src/renderer/public/vrHtml/@photo-sphere-viewer/core/index.js b/src/renderer/public/vrHtml/@photo-sphere-viewer/core/index.js new file mode 100644 index 0000000..e03972d --- /dev/null +++ b/src/renderer/public/vrHtml/@photo-sphere-viewer/core/index.js @@ -0,0 +1,6567 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('three')) : + typeof define === 'function' && define.amd ? define(['exports', 'three'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PhotoSphereViewer = {}, global.THREE)); +})(this, (function (exports, THREE) { + +console.warn('PhotoSphereViewer "index.js" scripts are deprecated and will be removed in a future version. Please use ES Modules: https://photo-sphere-viewer.js.org/guide/#your-first-viewer'); + +/*! + * PhotoSphereViewer 5.7.3 + * @copyright 2014-2015 Jérémy Heleine + * @copyright 2024 Damien "Mistic" Sorel + * @licence MIT (https://opensource.org/licenses/MIT) + */ +"use strict"; + var __defProp = Object.defineProperty; + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; + var __getOwnPropNames = Object.getOwnPropertyNames; + var __hasOwnProp = Object.prototype.hasOwnProperty; + var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; + }; + + // three + var require_three = () => THREE; + + // src/index.ts + var src_exports = {}; + __export(src_exports, { + AbstractAdapter: () => AbstractAdapter, + AbstractButton: () => AbstractButton, + AbstractComponent: () => AbstractComponent, + AbstractConfigurablePlugin: () => AbstractConfigurablePlugin, + AbstractPlugin: () => AbstractPlugin, + CONSTANTS: () => constants_exports, + Cache: () => Cache, + DEFAULTS: () => DEFAULTS, + EquirectangularAdapter: () => EquirectangularAdapter, + PSVError: () => PSVError, + SYSTEM: () => SYSTEM, + TypedEvent: () => TypedEvent, + VERSION: () => VERSION, + Viewer: () => Viewer, + events: () => events_exports, + registerButton: () => registerButton, + utils: () => utils_exports + }); + + // src/data/constants.ts + var constants_exports = {}; + __export(constants_exports, { + ACTIONS: () => ACTIONS, + ANIMATION_MIN_DURATION: () => ANIMATION_MIN_DURATION, + CAPTURE_EVENTS_CLASS: () => CAPTURE_EVENTS_CLASS, + CTRLZOOM_TIMEOUT: () => CTRLZOOM_TIMEOUT, + DBLCLICK_DELAY: () => DBLCLICK_DELAY, + DEFAULT_TRANSITION: () => DEFAULT_TRANSITION, + EASINGS: () => EASINGS, + ICONS: () => ICONS, + IDS: () => IDS, + INERTIA_WINDOW: () => INERTIA_WINDOW, + KEY_CODES: () => KEY_CODES, + LONGTOUCH_DELAY: () => LONGTOUCH_DELAY, + MOVE_THRESHOLD: () => MOVE_THRESHOLD, + SPHERE_RADIUS: () => SPHERE_RADIUS, + TWOFINGERSOVERLAY_DELAY: () => TWOFINGERSOVERLAY_DELAY, + VIEWER_DATA: () => VIEWER_DATA + }); + + // src/icons/arrow.svg + var arrow_default = '\n'; + + // src/icons/close.svg + var close_default = ''; + + // src/icons/download.svg + var download_default = '\n'; + + // src/icons/fullscreen-in.svg + var fullscreen_in_default = '\n'; + + // src/icons/fullscreen-out.svg + var fullscreen_out_default = '\n'; + + // src/icons/info.svg + var info_default = '\n'; + + // src/icons/menu.svg + var menu_default = '\n'; + + // src/icons/zoom-in.svg + var zoom_in_default = '\n'; + + // src/icons/zoom-out.svg + var zoom_out_default = '\n'; + + // src/data/constants.ts + var DEFAULT_TRANSITION = 1500; + var ANIMATION_MIN_DURATION = 500; + var MOVE_THRESHOLD = 4; + var DBLCLICK_DELAY = 300; + var LONGTOUCH_DELAY = 500; + var TWOFINGERSOVERLAY_DELAY = 100; + var CTRLZOOM_TIMEOUT = 2e3; + var INERTIA_WINDOW = 300; + var SPHERE_RADIUS = 10; + var VIEWER_DATA = "photoSphereViewer"; + var CAPTURE_EVENTS_CLASS = "psv--capture-event"; + var ACTIONS = /* @__PURE__ */ ((ACTIONS2) => { + ACTIONS2["ROTATE_UP"] = "ROTATE_UP"; + ACTIONS2["ROTATE_DOWN"] = "ROTATE_DOWN"; + ACTIONS2["ROTATE_RIGHT"] = "ROTATE_RIGHT"; + ACTIONS2["ROTATE_LEFT"] = "ROTATE_LEFT"; + ACTIONS2["ZOOM_IN"] = "ZOOM_IN"; + ACTIONS2["ZOOM_OUT"] = "ZOOM_OUT"; + return ACTIONS2; + })(ACTIONS || {}); + var IDS = { + MENU: "menu", + TWO_FINGERS: "twoFingers", + CTRL_ZOOM: "ctrlZoom", + ERROR: "error", + DESCRIPTION: "description" + }; + var KEY_CODES = { + Enter: "Enter", + Control: "Control", + Escape: "Escape", + Space: " ", + PageUp: "PageUp", + PageDown: "PageDown", + ArrowLeft: "ArrowLeft", + ArrowUp: "ArrowUp", + ArrowRight: "ArrowRight", + ArrowDown: "ArrowDown", + Delete: "Delete", + Plus: "+", + Minus: "-" + }; + var ICONS = { + arrow: arrow_default, + close: close_default, + download: download_default, + fullscreenIn: fullscreen_in_default, + fullscreenOut: fullscreen_out_default, + info: info_default, + menu: menu_default, + zoomIn: zoom_in_default, + zoomOut: zoom_out_default + }; + var EASINGS = { + linear: (t) => t, + inQuad: (t) => t * t, + outQuad: (t) => t * (2 - t), + inOutQuad: (t) => t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t, + inCubic: (t) => t * t * t, + outCubic: (t) => --t * t * t + 1, + inOutCubic: (t) => t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1, + inQuart: (t) => t * t * t * t, + outQuart: (t) => 1 - --t * t * t * t, + inOutQuart: (t) => t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t, + inQuint: (t) => t * t * t * t * t, + outQuint: (t) => 1 + --t * t * t * t * t, + inOutQuint: (t) => t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t, + inSine: (t) => 1 - Math.cos(t * (Math.PI / 2)), + outSine: (t) => Math.sin(t * (Math.PI / 2)), + inOutSine: (t) => 0.5 - 0.5 * Math.cos(Math.PI * t), + inExpo: (t) => Math.pow(2, 10 * (t - 1)), + outExpo: (t) => 1 - Math.pow(2, -10 * t), + inOutExpo: (t) => (t = t * 2 - 1) < 0 ? 0.5 * Math.pow(2, 10 * t) : 1 - 0.5 * Math.pow(2, -10 * t), + inCirc: (t) => 1 - Math.sqrt(1 - t * t), + outCirc: (t) => Math.sqrt(1 - (t - 1) * (t - 1)), + inOutCirc: (t) => (t *= 2) < 1 ? 0.5 - 0.5 * Math.sqrt(1 - t * t) : 0.5 + 0.5 * Math.sqrt(1 - (t -= 2) * t) + }; + + // src/utils/index.ts + var utils_exports = {}; + __export(utils_exports, { + Animation: () => Animation, + Dynamic: () => Dynamic, + MultiDynamic: () => MultiDynamic, + PressHandler: () => PressHandler, + Slider: () => Slider, + SliderDirection: () => SliderDirection, + addClasses: () => addClasses, + angle: () => angle, + applyEulerInverse: () => applyEulerInverse, + checkStylesheet: () => checkStylesheet, + checkVersion: () => checkVersion, + cleanCssPosition: () => cleanCssPosition, + clone: () => clone, + createTexture: () => createTexture, + cssPositionIsOrdered: () => cssPositionIsOrdered, + dasherize: () => dasherize, + deepEqual: () => deepEqual, + deepmerge: () => deepmerge, + distance: () => distance, + exitFullscreen: () => exitFullscreen, + firstNonNull: () => firstNonNull, + getAbortError: () => getAbortError, + getAngle: () => getAngle, + getClosest: () => getClosest, + getConfigParser: () => getConfigParser, + getElement: () => getElement, + getPosition: () => getPosition, + getShortestArc: () => getShortestArc, + getStyleProperty: () => getStyleProperty, + getTouchData: () => getTouchData, + getXMPValue: () => getXMPValue, + greatArcDistance: () => greatArcDistance, + hasParent: () => hasParent, + invertResolvableBoolean: () => invertResolvableBoolean, + isAbortError: () => isAbortError, + isEmpty: () => isEmpty, + isExtendedPosition: () => isExtendedPosition, + isFullscreenEnabled: () => isFullscreenEnabled, + isNil: () => isNil, + isPlainObject: () => isPlainObject, + logWarn: () => logWarn, + parseAngle: () => parseAngle, + parsePoint: () => parsePoint, + parseSpeed: () => parseSpeed, + removeClasses: () => removeClasses, + requestFullscreen: () => requestFullscreen, + resolveBoolean: () => resolveBoolean, + speedToDuration: () => speedToDuration, + sum: () => sum, + throttle: () => throttle, + toggleClass: () => toggleClass, + wrap: () => wrap + }); + + // src/utils/math.ts + function wrap(value, max) { + let result = value % max; + if (result < 0) { + result += max; + } + return result; + } + function sum(array) { + return array.reduce((a, b) => a + b, 0); + } + function distance(p1, p2) { + return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2)); + } + function angle(p1, p2) { + return Math.atan2(p2.y - p1.y, p2.x - p1.x); + } + function getShortestArc(from, to) { + const candidates = [ + 0, + // direct + Math.PI * 2, + // clock-wise cross zero + -Math.PI * 2 + // counter-clock-wise cross zero + ]; + return candidates.reduce((value, candidate) => { + const newCandidate = to - from + candidate; + return Math.abs(newCandidate) < Math.abs(value) ? newCandidate : value; + }, Infinity); + } + function getAngle(position1, position2) { + return Math.acos( + Math.cos(position1.pitch) * Math.cos(position2.pitch) * Math.cos(position1.yaw - position2.yaw) + Math.sin(position1.pitch) * Math.sin(position2.pitch) + ); + } + function greatArcDistance([yaw1, pitch1], [yaw2, pitch2]) { + if (yaw1 - yaw2 > Math.PI) { + yaw1 -= 2 * Math.PI; + } else if (yaw1 - yaw2 < -Math.PI) { + yaw1 += 2 * Math.PI; + } + const x = (yaw2 - yaw1) * Math.cos((pitch1 + pitch2) / 2); + const y = pitch2 - pitch1; + return Math.sqrt(x * x + y * y); + } + + // src/utils/browser.ts + function getElement(selector) { + if (typeof selector === "string") { + return selector.match(/^[a-z]/i) ? document.getElementById(selector) : document.querySelector(selector); + } else { + return selector; + } + } + function toggleClass(element, className, active) { + if (active === void 0) { + element.classList.toggle(className); + } else if (active) { + element.classList.add(className); + } else if (!active) { + element.classList.remove(className); + } + } + function addClasses(element, className) { + element.classList.add(...className.split(" ")); + } + function removeClasses(element, className) { + element.classList.remove(...className.split(" ")); + } + function hasParent(el, parent) { + let test = el; + do { + if (test === parent) { + return true; + } + test = test.parentElement; + } while (test); + return false; + } + function getClosest(el, selector) { + if (!el?.matches) { + return null; + } + let test = el; + do { + if (test.matches(selector)) { + return test; + } + test = test.parentElement; + } while (test); + return null; + } + function getPosition(el) { + let x = 0; + let y = 0; + let test = el; + while (test) { + x += test.offsetLeft - test.scrollLeft + test.clientLeft; + y += test.offsetTop - test.scrollTop + test.clientTop; + test = test.offsetParent; + } + return { x, y }; + } + function getStyleProperty(elt, varname) { + return window.getComputedStyle(elt).getPropertyValue(varname); + } + function getTouchData(e) { + if (e.touches.length < 2) { + return null; + } + const p1 = { x: e.touches[0].clientX, y: e.touches[0].clientY }; + const p2 = { x: e.touches[1].clientX, y: e.touches[1].clientY }; + return { + distance: distance(p1, p2), + angle: angle(p1, p2), + center: { x: (p1.x + p2.x) / 2, y: (p1.y + p2.y) / 2 } + }; + } + function isFullscreenEnabled(elt) { + return (document.fullscreenElement || document.webkitFullscreenElement) === elt; + } + function requestFullscreen(elt) { + (elt.requestFullscreen || elt.webkitRequestFullscreen).call(elt); + } + function exitFullscreen() { + (document.exitFullscreen || document.webkitExitFullscreen).call(document); + } + + // src/utils/misc.ts + function dasherize(str) { + return str.replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g, (s, i) => { + return (i > 0 ? "-" : "") + s.toLowerCase(); + }); + } + function throttle(callback, wait) { + let paused = false; + return function(...args) { + if (!paused) { + paused = true; + setTimeout(() => { + callback.apply(this, args); + paused = false; + }, wait); + } + }; + } + function isPlainObject(value) { + if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") { + return false; + } + if (Object.getPrototypeOf(value) === null) { + return true; + } + let proto = value; + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + return Object.getPrototypeOf(value) === proto; + } + function deepmerge(target, src) { + const first = src; + return function merge(target2, src2) { + if (Array.isArray(src2)) { + if (!target2 || !Array.isArray(target2)) { + target2 = []; + } else { + target2.length = 0; + } + src2.forEach((e, i) => { + target2[i] = merge(null, e); + }); + } else if (typeof src2 === "object") { + if (!target2 || Array.isArray(target2)) { + target2 = {}; + } + Object.keys(src2).forEach((key) => { + if (typeof src2[key] !== "object" || !src2[key] || !isPlainObject(src2[key])) { + target2[key] = src2[key]; + } else if (src2[key] !== first) { + if (!target2[key]) { + target2[key] = merge(null, src2[key]); + } else { + merge(target2[key], src2[key]); + } + } + }); + } else { + target2 = src2; + } + return target2; + }(target, src); + } + function clone(src) { + return deepmerge(null, src); + } + function isEmpty(obj) { + return !obj || Object.keys(obj).length === 0 && obj.constructor === Object; + } + function isNil(val) { + return val === null || val === void 0; + } + function firstNonNull(...values) { + for (const val of values) { + if (!isNil(val)) { + return val; + } + } + return null; + } + function deepEqual(obj1, obj2) { + if (obj1 === obj2) { + return true; + } else if (isObject(obj1) && isObject(obj2)) { + if (Object.keys(obj1).length !== Object.keys(obj2).length) { + return false; + } + for (const prop of Object.keys(obj1)) { + if (!deepEqual(obj1[prop], obj2[prop])) { + return false; + } + } + return true; + } else { + return false; + } + } + function isObject(obj) { + return typeof obj === "object" && obj !== null; + } + + // src/utils/psv.ts + var import_three = require_three(); + + // src/PSVError.ts + var PSVError = class _PSVError extends Error { + constructor(message) { + super(message); + this.name = "PSVError"; + Error.captureStackTrace?.(this, _PSVError); + } + }; + + // src/utils/psv.ts + function resolveBoolean(value, cb) { + if (isPlainObject(value)) { + cb(value.initial, true); + value.promise.then((res) => cb(res, false)); + } else { + cb(value, true); + } + } + function invertResolvableBoolean(value) { + return { + initial: !value.initial, + promise: value.promise.then((res) => !res) + }; + } + function getAbortError() { + const error = new Error("Loading was aborted."); + error.name = "AbortError"; + return error; + } + function isAbortError(err) { + return err?.name === "AbortError"; + } + function logWarn(message) { + console.warn(`PhotoSphereViewer: ${message}`); + } + function isExtendedPosition(object) { + if (!object) { + return false; + } + return [ + ["textureX", "textureY"], + ["yaw", "pitch"] + ].some(([key1, key2]) => { + return object[key1] !== void 0 && object[key2] !== void 0; + }); + } + function getXMPValue(data, attr) { + let result = data.match("(.*)"); + if (result !== null) { + const val = parseInt(result[1], 10); + return isNaN(val) ? null : val; + } + result = data.match("GPano:" + attr + '="(.*?)"'); + if (result !== null) { + const val = parseInt(result[1], 10); + return isNaN(val) ? null : val; + } + return null; + } + var CSS_POSITIONS = { + top: "0%", + bottom: "100%", + left: "0%", + right: "100%", + center: "50%" + }; + var X_VALUES = ["left", "center", "right"]; + var Y_VALUES = ["top", "center", "bottom"]; + var POS_VALUES = [...X_VALUES, ...Y_VALUES]; + var CENTER = "center"; + function parsePoint(value) { + if (!value) { + return { x: 0.5, y: 0.5 }; + } + if (typeof value === "object") { + return value; + } + let tokens = value.toLocaleLowerCase().split(" ").slice(0, 2); + if (tokens.length === 1) { + if (CSS_POSITIONS[tokens[0]]) { + tokens = [tokens[0], CENTER]; + } else { + tokens = [tokens[0], tokens[0]]; + } + } + const xFirst = tokens[1] !== "left" && tokens[1] !== "right" && tokens[0] !== "top" && tokens[0] !== "bottom"; + tokens = tokens.map((token) => CSS_POSITIONS[token] || token); + if (!xFirst) { + tokens.reverse(); + } + const parsed = tokens.join(" ").match(/^([0-9.]+)% ([0-9.]+)%$/); + if (parsed) { + return { + x: parseFloat(parsed[1]) / 100, + y: parseFloat(parsed[2]) / 100 + }; + } else { + return { x: 0.5, y: 0.5 }; + } + } + function cleanCssPosition(value, { allowCenter, cssOrder } = { + allowCenter: true, + cssOrder: true + }) { + if (!value) { + return null; + } + if (typeof value === "string") { + value = value.split(" "); + } + if (value.length === 1) { + if (value[0] === CENTER) { + value = [CENTER, CENTER]; + } else if (X_VALUES.indexOf(value[0]) !== -1) { + value = [CENTER, value[0]]; + } else if (Y_VALUES.indexOf(value[0]) !== -1) { + value = [value[0], CENTER]; + } + } + if (value.length !== 2 || POS_VALUES.indexOf(value[0]) === -1 || POS_VALUES.indexOf(value[1]) === -1) { + logWarn(`Unparsable position ${value}`); + return null; + } + if (!allowCenter && value[0] === CENTER && value[1] === CENTER) { + logWarn(`Invalid position center center`); + return null; + } + if (cssOrder && !cssPositionIsOrdered(value)) { + value = [value[1], value[0]]; + } + if (value[1] === CENTER && X_VALUES.indexOf(value[0]) !== -1) { + value = [CENTER, value[0]]; + } + if (value[0] === CENTER && Y_VALUES.indexOf(value[1]) !== -1) { + value = [value[1], CENTER]; + } + return value; + } + function cssPositionIsOrdered(value) { + return Y_VALUES.indexOf(value[0]) !== -1 && X_VALUES.indexOf(value[1]) !== -1; + } + function parseSpeed(speed) { + let parsed; + if (typeof speed === "string") { + const speedStr = speed.toString().trim(); + let speedValue = parseFloat(speedStr.replace(/^(-?[0-9]+(?:\.[0-9]*)?).*$/, "$1")); + const speedUnit = speedStr.replace(/^-?[0-9]+(?:\.[0-9]*)?(.*)$/, "$1").trim(); + if (speedUnit.match(/(pm|per minute)$/)) { + speedValue /= 60; + } + switch (speedUnit) { + case "dpm": + case "degrees per minute": + case "dps": + case "degrees per second": + parsed = import_three.MathUtils.degToRad(speedValue); + break; + case "rdpm": + case "radians per minute": + case "rdps": + case "radians per second": + parsed = speedValue; + break; + case "rpm": + case "revolutions per minute": + case "rps": + case "revolutions per second": + parsed = speedValue * Math.PI * 2; + break; + default: + throw new PSVError(`Unknown speed unit "${speedUnit}"`); + } + } else { + parsed = speed; + } + return parsed; + } + function speedToDuration(value, angle2) { + if (typeof value !== "number") { + const speed = parseSpeed(value); + return angle2 / Math.abs(speed) * 1e3; + } else { + return Math.abs(value); + } + } + function parseAngle(angle2, zeroCenter = false, halfCircle = zeroCenter) { + let parsed; + if (typeof angle2 === "string") { + const match = angle2.toLowerCase().trim().match(/^(-?[0-9]+(?:\.[0-9]*)?)(.*)$/); + if (!match) { + throw new PSVError(`Unknown angle "${angle2}"`); + } + const value = parseFloat(match[1]); + const unit = match[2]; + if (unit) { + switch (unit) { + case "deg": + case "degs": + parsed = import_three.MathUtils.degToRad(value); + break; + case "rad": + case "rads": + parsed = value; + break; + default: + throw new PSVError(`Unknown angle unit "${unit}"`); + } + } else { + parsed = value; + } + } else if (typeof angle2 === "number" && !isNaN(angle2)) { + parsed = angle2; + } else { + throw new PSVError(`Unknown angle "${angle2}"`); + } + parsed = wrap(zeroCenter ? parsed + Math.PI : parsed, Math.PI * 2); + return zeroCenter ? import_three.MathUtils.clamp(parsed - Math.PI, -Math.PI / (halfCircle ? 2 : 1), Math.PI / (halfCircle ? 2 : 1)) : parsed; + } + function createTexture(img, mimaps = false) { + const texture = new import_three.Texture(img); + texture.needsUpdate = true; + texture.minFilter = mimaps ? import_three.LinearMipmapLinearFilter : import_three.LinearFilter; + texture.generateMipmaps = mimaps; + texture.anisotropy = mimaps ? 2 : 1; + return texture; + } + var quaternion = new import_three.Quaternion(); + function applyEulerInverse(vector, euler) { + quaternion.setFromEuler(euler).invert(); + vector.applyQuaternion(quaternion); + } + function getConfigParser(defaults, parsers) { + const parser = function(userConfig) { + if (!userConfig) { + return clone(defaults); + } + const rawConfig = clone({ + ...defaults, + ...userConfig + }); + const config = {}; + for (let [key, value] of Object.entries(rawConfig)) { + if (parsers && key in parsers) { + value = parsers[key](value, { + rawConfig, + defValue: defaults[key] + }); + } else if (!(key in defaults)) { + logWarn(`Unknown option ${key}`); + continue; + } + config[key] = value; + } + return config; + }; + parser.defaults = defaults; + parser.parsers = parsers || {}; + return parser; + } + function checkStylesheet(element, name) { + if (getStyleProperty(element, `--psv-${name}-loaded`) !== "true") { + console.error(`PhotoSphereViewer: stylesheet "@photo-sphere-viewer/${name}/index.css" is not loaded`); + } + } + function checkVersion(name, version, coreVersion) { + if (version && version !== coreVersion) { + console.error(`PhotoSphereViewer: @photo-sphere-viewer/${name} is in version ${version} but @photo-sphere-viewer/core is in version ${coreVersion}`); + } + } + + // src/utils/Animation.ts + var Animation = class { + constructor(options) { + this.easing = EASINGS["linear"]; + this.callbacks = []; + this.resolved = false; + this.cancelled = false; + this.options = options; + if (options) { + if (options.easing) { + this.easing = typeof options.easing === "function" ? options.easing : EASINGS[options.easing] || EASINGS["linear"]; + } + this.delayTimeout = setTimeout(() => { + this.delayTimeout = void 0; + this.animationFrame = window.requestAnimationFrame((t) => this.__run(t)); + }, options.delay || 0); + } else { + this.resolved = true; + } + } + __run(timestamp) { + if (this.cancelled) { + return; + } + if (!this.start) { + this.start = timestamp; + } + const progress = (timestamp - this.start) / this.options.duration; + const current = {}; + if (progress < 1) { + for (const [name, prop] of Object.entries(this.options.properties)) { + if (prop) { + const value = prop.start + (prop.end - prop.start) * this.easing(progress); + current[name] = value; + } + } + this.options.onTick(current, progress); + this.animationFrame = window.requestAnimationFrame((t) => this.__run(t)); + } else { + for (const [name, prop] of Object.entries(this.options.properties)) { + if (prop) { + current[name] = prop.end; + } + } + this.options.onTick(current, 1); + this.__resolve(true); + this.animationFrame = void 0; + } + } + __resolve(value) { + if (value) { + this.resolved = true; + } else { + this.cancelled = true; + } + this.callbacks.forEach((cb) => cb(value)); + this.callbacks.length = 0; + } + /** + * Promise chaining + * @param [onFulfilled] - Called when the animation is complete (true) or cancelled (false) + */ + then(onFulfilled) { + if (this.resolved || this.cancelled) { + return Promise.resolve(this.resolved).then(onFulfilled); + } + return new Promise((resolve) => { + this.callbacks.push(resolve); + }).then(onFulfilled); + } + /** + * Cancels the animation + */ + cancel() { + if (!this.cancelled && !this.resolved) { + this.__resolve(false); + if (this.delayTimeout) { + window.clearTimeout(this.delayTimeout); + this.delayTimeout = void 0; + } + if (this.animationFrame) { + window.cancelAnimationFrame(this.animationFrame); + this.animationFrame = void 0; + } + } + } + }; + + // src/utils/Dynamic.ts + var import_three2 = require_three(); + var Dynamic = class { + constructor(fn, config) { + this.fn = fn; + this.mode = 0 /* STOP */; + this.speed = 0; + this.speedMult = 0; + this.currentSpeed = 0; + this.target = 0; + this.__current = 0; + this.min = config.min; + this.max = config.max; + this.wrap = config.wrap; + this.current = config.defaultValue; + if (this.wrap && this.min !== 0) { + throw new PSVError("invalid config"); + } + if (this.fn) { + this.fn(this.current); + } + } + get current() { + return this.__current; + } + set current(current) { + this.__current = current; + } + /** + * Changes base speed + */ + setSpeed(speed) { + this.speed = speed; + } + /** + * Defines the target position + */ + goto(position, speedMult = 1) { + this.mode = 2 /* POSITION */; + this.target = this.wrap ? wrap(position, this.max) : import_three2.MathUtils.clamp(position, this.min, this.max); + this.speedMult = speedMult; + } + /** + * Increases/decreases the target position + */ + step(step, speedMult = 1) { + if (speedMult === 0) { + this.setValue(this.current + step); + } else { + if (this.mode !== 2 /* POSITION */) { + this.target = this.current; + } + this.goto(this.target + step, speedMult); + } + } + /** + * Starts infinite movement + */ + roll(invert = false, speedMult = 1) { + this.mode = 1 /* INFINITE */; + this.target = invert ? -Infinity : Infinity; + this.speedMult = speedMult; + } + /** + * Stops movement + */ + stop() { + this.mode = 0 /* STOP */; + } + /** + * Defines the current position and immediately stops movement + * @param {number} value + */ + setValue(value) { + this.target = this.wrap ? wrap(value, this.max) : import_three2.MathUtils.clamp(value, this.min, this.max); + this.mode = 0 /* STOP */; + this.currentSpeed = 0; + if (this.target !== this.current) { + this.current = this.target; + if (this.fn) { + this.fn(this.current); + } + return true; + } + return false; + } + /** + * @internal + */ + update(elapsed) { + if (this.mode === 2 /* POSITION */) { + if (this.wrap && Math.abs(this.target - this.current) > this.max / 2) { + this.current = this.current < this.target ? this.current + this.max : this.current - this.max; + } + const dstStop = this.currentSpeed * this.currentSpeed / (this.speed * this.speedMult * 4); + if (Math.abs(this.target - this.current) <= dstStop) { + this.mode = 0 /* STOP */; + } + } + let targetSpeed = this.mode === 0 /* STOP */ ? 0 : this.speed * this.speedMult; + if (this.target < this.current) { + targetSpeed = -targetSpeed; + } + if (this.currentSpeed < targetSpeed) { + this.currentSpeed = Math.min( + targetSpeed, + this.currentSpeed + elapsed / 1e3 * this.speed * this.speedMult * 2 + ); + } else if (this.currentSpeed > targetSpeed) { + this.currentSpeed = Math.max( + targetSpeed, + this.currentSpeed - elapsed / 1e3 * this.speed * this.speedMult * 2 + ); + } + let next = null; + if (this.current > this.target && this.currentSpeed) { + next = Math.max(this.target, this.current + this.currentSpeed * elapsed / 1e3); + } else if (this.current < this.target && this.currentSpeed) { + next = Math.min(this.target, this.current + this.currentSpeed * elapsed / 1e3); + } + if (next !== null) { + next = this.wrap ? wrap(next, this.max) : import_three2.MathUtils.clamp(next, this.min, this.max); + if (next !== this.current) { + this.current = next; + if (this.fn) { + this.fn(this.current); + } + return true; + } + } + return false; + } + }; + + // src/utils/MultiDynamic.ts + var MultiDynamic = class { + constructor(fn, dynamics) { + this.fn = fn; + this.dynamics = dynamics; + if (this.fn) { + this.fn(this.current); + } + } + get current() { + return Object.entries(this.dynamics).reduce( + (values, [name, dynamic]) => { + values[name] = dynamic.current; + return values; + }, + {} + ); + } + /** + * Changes base speed + */ + setSpeed(speed) { + for (const d of Object.values(this.dynamics)) { + d.setSpeed(speed); + } + } + /** + * Defines the target positions + */ + goto(positions, speedMult = 1) { + for (const [name, position] of Object.entries(positions)) { + this.dynamics[name].goto(position, speedMult); + } + } + /** + * Increase/decrease the target positions + */ + step(steps, speedMult = 1) { + if (speedMult === 0) { + this.setValue( + Object.keys(steps).reduce( + (values, name) => { + values[name] = steps[name] + this.dynamics[name].current; + return values; + }, + {} + ) + ); + } else { + for (const [name, step] of Object.entries(steps)) { + this.dynamics[name].step(step, speedMult); + } + } + } + /** + * Starts infinite movements + */ + roll(rolls, speedMult = 1) { + for (const [name, roll] of Object.entries(rolls)) { + this.dynamics[name].roll(roll, speedMult); + } + } + /** + * Stops movements + */ + stop() { + for (const d of Object.values(this.dynamics)) { + d.stop(); + } + } + /** + * Defines the current positions and immediately stops movements + */ + setValue(values) { + let hasUpdates = false; + for (const [name, value] of Object.entries(values)) { + hasUpdates = this.dynamics[name].setValue(value) || hasUpdates; + } + if (hasUpdates && this.fn) { + this.fn(this.current); + } + return hasUpdates; + } + /** + * @internal + */ + update(elapsed) { + let hasUpdates = false; + for (const d of Object.values(this.dynamics)) { + hasUpdates = d.update(elapsed) || hasUpdates; + } + if (hasUpdates && this.fn) { + this.fn(this.current); + } + return hasUpdates; + } + }; + + // src/utils/PressHandler.ts + var PressHandler = class { + constructor(delay = 200) { + this.delay = delay; + this.time = 0; + this.delay = delay; + } + get pending() { + return this.time !== 0; + } + down() { + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = void 0; + } + this.time = (/* @__PURE__ */ new Date()).getTime(); + } + up(cb) { + if (!this.time) { + return; + } + const elapsed = Date.now() - this.time; + if (elapsed < this.delay) { + this.timeout = setTimeout(() => { + cb(); + this.timeout = void 0; + this.time = 0; + }, this.delay); + } else { + cb(); + this.time = 0; + } + } + }; + + // src/utils/Slider.ts + var SliderDirection = /* @__PURE__ */ ((SliderDirection2) => { + SliderDirection2["VERTICAL"] = "VERTICAL"; + SliderDirection2["HORIZONTAL"] = "HORIZONTAL"; + return SliderDirection2; + })(SliderDirection || {}); + var Slider = class { + constructor(container, direction, listener) { + this.container = container; + this.direction = direction; + this.listener = listener; + this.mousedown = false; + this.mouseover = false; + this.container.addEventListener("click", this); + this.container.addEventListener("mousedown", this); + this.container.addEventListener("mouseenter", this); + this.container.addEventListener("mouseleave", this); + this.container.addEventListener("touchstart", this); + this.container.addEventListener("mousemove", this, true); + this.container.addEventListener("touchmove", this, true); + window.addEventListener("mouseup", this); + window.addEventListener("touchend", this); + } + get isVertical() { + return this.direction === "VERTICAL" /* VERTICAL */; + } + get isHorizontal() { + return this.direction === "HORIZONTAL" /* HORIZONTAL */; + } + destroy() { + window.removeEventListener("mouseup", this); + window.removeEventListener("touchend", this); + } + /** + * @internal + */ + handleEvent(e) { + switch (e.type) { + case "click": + e.stopPropagation(); + break; + case "mousedown": + this.__onMouseDown(e); + break; + case "mouseenter": + this.__onMouseEnter(e); + break; + case "mouseleave": + this.__onMouseLeave(e); + break; + case "touchstart": + this.__onTouchStart(e); + break; + case "mousemove": + this.__onMouseMove(e); + break; + case "touchmove": + this.__onTouchMove(e); + break; + case "mouseup": + this.__onMouseUp(e); + break; + case "touchend": + this.__onTouchEnd(e); + break; + } + } + __onMouseDown(evt) { + this.mousedown = true; + this.__update(evt.clientX, evt.clientY, true); + } + __onMouseEnter(evt) { + this.mouseover = true; + this.__update(evt.clientX, evt.clientY, true); + } + __onTouchStart(evt) { + this.mouseover = true; + this.mousedown = true; + const touch = evt.changedTouches[0]; + this.__update(touch.clientX, touch.clientY, true); + } + __onMouseMove(evt) { + if (this.mousedown || this.mouseover) { + evt.stopPropagation(); + this.__update(evt.clientX, evt.clientY, true); + } + } + __onTouchMove(evt) { + if (this.mousedown || this.mouseover) { + evt.stopPropagation(); + const touch = evt.changedTouches[0]; + this.__update(touch.clientX, touch.clientY, true); + } + } + __onMouseUp(evt) { + if (this.mousedown) { + this.mousedown = false; + this.__update(evt.clientX, evt.clientY, false); + } + } + __onMouseLeave(evt) { + if (this.mouseover) { + this.mouseover = false; + this.__update(evt.clientX, evt.clientY, true); + } + } + __onTouchEnd(evt) { + if (this.mousedown) { + this.mouseover = false; + this.mousedown = false; + const touch = evt.changedTouches[0]; + this.__update(touch.clientX, touch.clientY, false); + } + } + __update(clientX, clientY, moving) { + const boundingClientRect = this.container.getBoundingClientRect(); + const cursor = this.isVertical ? clientY : clientX; + const pos = boundingClientRect[this.isVertical ? "bottom" : "left"]; + const size = boundingClientRect[this.isVertical ? "height" : "width"]; + const val = Math.abs((pos - cursor) / size); + this.listener({ + value: val, + click: !moving, + mousedown: this.mousedown, + mouseover: this.mouseover, + cursor: { clientX, clientY } + }); + } + }; + + // src/events.ts + var events_exports = {}; + __export(events_exports, { + BeforeAnimateEvent: () => BeforeAnimateEvent, + BeforeRenderEvent: () => BeforeRenderEvent, + BeforeRotateEvent: () => BeforeRotateEvent, + ClickEvent: () => ClickEvent, + ConfigChangedEvent: () => ConfigChangedEvent, + DoubleClickEvent: () => DoubleClickEvent, + FullscreenEvent: () => FullscreenEvent, + HideNotificationEvent: () => HideNotificationEvent, + HideOverlayEvent: () => HideOverlayEvent, + HidePanelEvent: () => HidePanelEvent, + HideTooltipEvent: () => HideTooltipEvent, + KeypressEvent: () => KeypressEvent, + LoadProgressEvent: () => LoadProgressEvent, + ObjectEnterEvent: () => ObjectEnterEvent, + ObjectEvent: () => ObjectEvent, + ObjectHoverEvent: () => ObjectHoverEvent, + ObjectLeaveEvent: () => ObjectLeaveEvent, + PanoramaErrorEvent: () => PanoramaErrorEvent, + PanoramaLoadEvent: () => PanoramaLoadEvent, + PanoramaLoadedEvent: () => PanoramaLoadedEvent, + PositionUpdatedEvent: () => PositionUpdatedEvent, + ReadyEvent: () => ReadyEvent, + RenderEvent: () => RenderEvent, + RollUpdatedEvent: () => RollUpdatedEvent, + ShowNotificationEvent: () => ShowNotificationEvent, + ShowOverlayEvent: () => ShowOverlayEvent, + ShowPanelEvent: () => ShowPanelEvent, + ShowTooltipEvent: () => ShowTooltipEvent, + SizeUpdatedEvent: () => SizeUpdatedEvent, + StopAllEvent: () => StopAllEvent, + ViewerEvent: () => ViewerEvent, + ZoomUpdatedEvent: () => ZoomUpdatedEvent + }); + + // src/lib/TypedEventTarget.ts + var TypedEvent = class extends Event { + constructor(type, cancelable = false) { + super(type, { cancelable }); + } + }; + var TypedEventTarget = class extends EventTarget { + dispatchEvent(e) { + return super.dispatchEvent(e); + } + /** + * @template T the name of event + * @template E the class of the event + */ + addEventListener(type, callback, options) { + super.addEventListener(type, callback, options); + } + /** + * @template T the name of event + * @template E the class of the event + */ + removeEventListener(type, callback, options) { + super.removeEventListener(type, callback, options); + } + }; + + // src/events.ts + var ViewerEvent = class extends TypedEvent { + }; + var _BeforeAnimateEvent = class _BeforeAnimateEvent extends ViewerEvent { + /** @internal */ + constructor(position, zoomLevel) { + super(_BeforeAnimateEvent.type, true); + this.position = position; + this.zoomLevel = zoomLevel; + } + }; + _BeforeAnimateEvent.type = "before-animate"; + var BeforeAnimateEvent = _BeforeAnimateEvent; + var _BeforeRenderEvent = class _BeforeRenderEvent extends ViewerEvent { + /** @internal */ + constructor(timestamp, elapsed) { + super(_BeforeRenderEvent.type); + this.timestamp = timestamp; + this.elapsed = elapsed; + } + }; + _BeforeRenderEvent.type = "before-render"; + var BeforeRenderEvent = _BeforeRenderEvent; + var _BeforeRotateEvent = class _BeforeRotateEvent extends ViewerEvent { + /** @internal */ + constructor(position) { + super(_BeforeRotateEvent.type, true); + this.position = position; + } + }; + _BeforeRotateEvent.type = "before-rotate"; + var BeforeRotateEvent = _BeforeRotateEvent; + var _ClickEvent = class _ClickEvent extends ViewerEvent { + /** @internal */ + constructor(data) { + super(_ClickEvent.type); + this.data = data; + } + }; + _ClickEvent.type = "click"; + var ClickEvent = _ClickEvent; + var _ConfigChangedEvent = class _ConfigChangedEvent extends ViewerEvent { + /** @internal */ + constructor(options) { + super(_ConfigChangedEvent.type); + this.options = options; + } + /** + * Checks if at least one of the `options` has been modified + */ + containsOptions(...options) { + return options.some((option) => this.options.includes(option)); + } + }; + _ConfigChangedEvent.type = "config-changed"; + var ConfigChangedEvent = _ConfigChangedEvent; + var _DoubleClickEvent = class _DoubleClickEvent extends ViewerEvent { + /** @internal */ + constructor(data) { + super(_DoubleClickEvent.type); + this.data = data; + } + }; + _DoubleClickEvent.type = "dblclick"; + var DoubleClickEvent = _DoubleClickEvent; + var _FullscreenEvent = class _FullscreenEvent extends ViewerEvent { + /** @internal */ + constructor(fullscreenEnabled) { + super(_FullscreenEvent.type); + this.fullscreenEnabled = fullscreenEnabled; + } + }; + _FullscreenEvent.type = "fullscreen"; + var FullscreenEvent = _FullscreenEvent; + var _HideNotificationEvent = class _HideNotificationEvent extends ViewerEvent { + /** @internal */ + constructor(notificationId) { + super(_HideNotificationEvent.type); + this.notificationId = notificationId; + } + }; + _HideNotificationEvent.type = "hide-notification"; + var HideNotificationEvent = _HideNotificationEvent; + var _HideOverlayEvent = class _HideOverlayEvent extends ViewerEvent { + /** @internal */ + constructor(overlayId) { + super(_HideOverlayEvent.type); + this.overlayId = overlayId; + } + }; + _HideOverlayEvent.type = "hide-overlay"; + var HideOverlayEvent = _HideOverlayEvent; + var _HidePanelEvent = class _HidePanelEvent extends ViewerEvent { + /** @internal */ + constructor(panelId) { + super(_HidePanelEvent.type); + this.panelId = panelId; + } + }; + _HidePanelEvent.type = "hide-panel"; + var HidePanelEvent = _HidePanelEvent; + var _HideTooltipEvent = class _HideTooltipEvent extends ViewerEvent { + /** @internal */ + constructor(tooltipData) { + super(_HideTooltipEvent.type); + this.tooltipData = tooltipData; + } + }; + _HideTooltipEvent.type = "hide-tooltip"; + var HideTooltipEvent = _HideTooltipEvent; + var _KeypressEvent = class _KeypressEvent extends ViewerEvent { + /** @internal */ + constructor(key) { + super(_KeypressEvent.type, true); + this.key = key; + } + }; + _KeypressEvent.type = "key-press"; + var KeypressEvent = _KeypressEvent; + var _LoadProgressEvent = class _LoadProgressEvent extends ViewerEvent { + /** @internal */ + constructor(progress) { + super(_LoadProgressEvent.type); + this.progress = progress; + } + }; + _LoadProgressEvent.type = "load-progress"; + var LoadProgressEvent = _LoadProgressEvent; + var _PanoramaLoadEvent = class _PanoramaLoadEvent extends ViewerEvent { + /** @internal */ + constructor(panorama) { + super(_PanoramaLoadEvent.type); + this.panorama = panorama; + } + }; + _PanoramaLoadEvent.type = "panorama-load"; + var PanoramaLoadEvent = _PanoramaLoadEvent; + var _PanoramaLoadedEvent = class _PanoramaLoadedEvent extends ViewerEvent { + /** @internal */ + constructor(data) { + super(_PanoramaLoadedEvent.type); + this.data = data; + } + }; + _PanoramaLoadedEvent.type = "panorama-loaded"; + var PanoramaLoadedEvent = _PanoramaLoadedEvent; + var _PanoramaErrorEvent = class _PanoramaErrorEvent extends ViewerEvent { + /** @internal */ + constructor(panorama, error) { + super(_PanoramaErrorEvent.type); + this.panorama = panorama; + this.error = error; + } + }; + _PanoramaErrorEvent.type = "panorama-error"; + var PanoramaErrorEvent = _PanoramaErrorEvent; + var _PositionUpdatedEvent = class _PositionUpdatedEvent extends ViewerEvent { + /** @internal */ + constructor(position) { + super(_PositionUpdatedEvent.type); + this.position = position; + } + }; + _PositionUpdatedEvent.type = "position-updated"; + var PositionUpdatedEvent = _PositionUpdatedEvent; + var _RollUpdatedEvent = class _RollUpdatedEvent extends ViewerEvent { + /** @internal */ + constructor(roll) { + super(_RollUpdatedEvent.type); + this.roll = roll; + } + }; + _RollUpdatedEvent.type = "roll-updated"; + var RollUpdatedEvent = _RollUpdatedEvent; + var _ReadyEvent = class _ReadyEvent extends ViewerEvent { + /** @internal */ + constructor() { + super(_ReadyEvent.type); + } + }; + _ReadyEvent.type = "ready"; + var ReadyEvent = _ReadyEvent; + var _RenderEvent = class _RenderEvent extends ViewerEvent { + /** @internal */ + constructor() { + super(_RenderEvent.type); + } + }; + _RenderEvent.type = "render"; + var RenderEvent = _RenderEvent; + var _ShowNotificationEvent = class _ShowNotificationEvent extends ViewerEvent { + /** @internal */ + constructor(notificationId) { + super(_ShowNotificationEvent.type); + this.notificationId = notificationId; + } + }; + _ShowNotificationEvent.type = "show-notification"; + var ShowNotificationEvent = _ShowNotificationEvent; + var _ShowOverlayEvent = class _ShowOverlayEvent extends ViewerEvent { + /** @internal */ + constructor(overlayId) { + super(_ShowOverlayEvent.type); + this.overlayId = overlayId; + } + }; + _ShowOverlayEvent.type = "show-overlay"; + var ShowOverlayEvent = _ShowOverlayEvent; + var _ShowPanelEvent = class _ShowPanelEvent extends ViewerEvent { + /** @internal */ + constructor(panelId) { + super(_ShowPanelEvent.type); + this.panelId = panelId; + } + }; + _ShowPanelEvent.type = "show-panel"; + var ShowPanelEvent = _ShowPanelEvent; + var _ShowTooltipEvent = class _ShowTooltipEvent extends ViewerEvent { + /** @internal */ + constructor(tooltip, tooltipData) { + super(_ShowTooltipEvent.type); + this.tooltip = tooltip; + this.tooltipData = tooltipData; + } + }; + _ShowTooltipEvent.type = "show-tooltip"; + var ShowTooltipEvent = _ShowTooltipEvent; + var _SizeUpdatedEvent = class _SizeUpdatedEvent extends ViewerEvent { + /** @internal */ + constructor(size) { + super(_SizeUpdatedEvent.type); + this.size = size; + } + }; + _SizeUpdatedEvent.type = "size-updated"; + var SizeUpdatedEvent = _SizeUpdatedEvent; + var _StopAllEvent = class _StopAllEvent extends ViewerEvent { + /** @internal */ + constructor() { + super(_StopAllEvent.type); + } + }; + _StopAllEvent.type = "stop-all"; + var StopAllEvent = _StopAllEvent; + var _ZoomUpdatedEvent = class _ZoomUpdatedEvent extends ViewerEvent { + /** @internal */ + constructor(zoomLevel) { + super(_ZoomUpdatedEvent.type); + this.zoomLevel = zoomLevel; + } + }; + _ZoomUpdatedEvent.type = "zoom-updated"; + var ZoomUpdatedEvent = _ZoomUpdatedEvent; + var ObjectEvent = class extends ViewerEvent { + /** @internal */ + constructor(type, originalEvent, object, viewerPoint, userDataKey) { + super(type); + this.originalEvent = originalEvent; + this.object = object; + this.viewerPoint = viewerPoint; + this.userDataKey = userDataKey; + } + }; + var _ObjectEnterEvent = class _ObjectEnterEvent extends ObjectEvent { + /** @internal */ + constructor(originalEvent, object, viewerPoint, userDataKey) { + super(_ObjectEnterEvent.type, originalEvent, object, viewerPoint, userDataKey); + } + }; + _ObjectEnterEvent.type = "enter-object"; + var ObjectEnterEvent = _ObjectEnterEvent; + var _ObjectLeaveEvent = class _ObjectLeaveEvent extends ObjectEvent { + /** @internal */ + constructor(originalEvent, object, viewerPoint, userDataKey) { + super(_ObjectLeaveEvent.type, originalEvent, object, viewerPoint, userDataKey); + } + }; + _ObjectLeaveEvent.type = "leave-object"; + var ObjectLeaveEvent = _ObjectLeaveEvent; + var _ObjectHoverEvent = class _ObjectHoverEvent extends ObjectEvent { + /** @internal */ + constructor(originalEvent, object, viewerPoint, userDataKey) { + super(_ObjectHoverEvent.type, originalEvent, object, viewerPoint, userDataKey); + } + }; + _ObjectHoverEvent.type = "hover-object"; + var ObjectHoverEvent = _ObjectHoverEvent; + + // src/adapters/AbstractAdapter.ts + var AbstractAdapter = class { + constructor(viewer) { + this.viewer = viewer; + } + /** + * Initializes the adapter + */ + // eslint-disable-next-line @typescript-eslint/no-empty-function + init() { + } + /** + * Destroys the adapter + */ + // eslint-disable-next-line @typescript-eslint/no-empty-function + destroy() { + } + /** + * Indicates if the adapter supports transitions between panoramas + */ + // @ts-ignore unused parameter + // eslint-disable-next-line @typescript-eslint/no-unused-vars + supportsTransition(panorama) { + return false; + } + /** + * Indicates if the adapter supports preload of a panorama + */ + // @ts-ignore unused parameter + // eslint-disable-next-line @typescript-eslint/no-unused-vars + supportsPreload(panorama) { + return false; + } + /** + * Converts pixel texture coordinates to spherical radians coordinates + * @throws {@link PSVError} when the current adapter does not support texture coordinates + */ + // @ts-ignore unused parameter + // eslint-disable-next-line @typescript-eslint/no-unused-vars + textureCoordsToSphericalCoords(point, data) { + throw new PSVError("Current adapter does not support texture coordinates."); + } + /** + * Converts spherical radians coordinates to pixel texture coordinates + * @throws {@link PSVError} when the current adapter does not support texture coordinates + */ + // @ts-ignore unused parameter + // eslint-disable-next-line @typescript-eslint/no-unused-vars + sphericalCoordsToTextureCoords(position, data) { + throw new PSVError("Current adapter does not support texture coordinates."); + } + }; + /** + * Indicates if the adapter supports panorama download natively + */ + AbstractAdapter.supportsDownload = false; + function adapterInterop(adapter) { + if (adapter) { + for (const [, p] of [["_", adapter], ...Object.entries(adapter)]) { + if (p.prototype instanceof AbstractAdapter) { + checkVersion(p.id, p.VERSION, "5.7.3"); + return p; + } + } + } + return null; + } + + // src/adapters/EquirectangularAdapter.ts + var import_three3 = require_three(); + + // src/data/system.ts + var LOCALSTORAGE_TOUCH_SUPPORT = `${VIEWER_DATA}_touchSupport`; + var SYSTEM = { + /** + * Indicates if the system data has been loaded + */ + loaded: false, + /** + * Device screen pixel ratio + */ + pixelRatio: 1, + /** + * Device supports WebGL + */ + isWebGLSupported: false, + /** + * Maximum WebGL texture width + */ + maxTextureWidth: 0, + /** + * Device supports touch events + */ + isTouchEnabled: null, + /** + * Name of the fullscreen event + */ + fullscreenEvent: null, + /** + * @internal + */ + __maxCanvasWidth: null, + /** + * Maximum canvas width + */ + get maxCanvasWidth() { + if (this.__maxCanvasWidth === null) { + this.__maxCanvasWidth = getMaxCanvasWidth(this.maxTextureWidth); + } + return this.__maxCanvasWidth; + }, + /** + * Loads the system if not already loaded + * @internal + */ + load() { + if (!this.loaded) { + const ctx = getWebGLCtx(); + this.pixelRatio = window.devicePixelRatio || 1; + this.isWebGLSupported = ctx !== null; + this.maxTextureWidth = ctx ? ctx.getParameter(ctx.MAX_TEXTURE_SIZE) : 0; + this.isTouchEnabled = isTouchEnabled(); + this.fullscreenEvent = getFullscreenEvent(); + this.loaded = true; + } + if (!SYSTEM.isWebGLSupported) { + throw new PSVError("WebGL is not supported."); + } + if (SYSTEM.maxTextureWidth === 0) { + throw new PSVError("Unable to detect system capabilities"); + } + } + }; + function getWebGLCtx() { + const canvas = document.createElement("canvas"); + const names = ["webgl2", "webgl", "experimental-webgl"]; + let context = null; + if (!canvas.getContext) { + return null; + } + if (names.some((name) => { + try { + context = canvas.getContext(name); + return context !== null; + } catch (e) { + return false; + } + })) { + return context; + } else { + return null; + } + } + function isTouchEnabled() { + let initial = "ontouchstart" in window || navigator.maxTouchPoints > 0; + if (LOCALSTORAGE_TOUCH_SUPPORT in localStorage) { + initial = localStorage[LOCALSTORAGE_TOUCH_SUPPORT] === "true"; + } + const promise = new Promise((resolve) => { + const clear = () => { + window.removeEventListener("mousedown", listenerMouse); + window.removeEventListener("touchstart", listenerTouch); + clearTimeout(listenerTimeoutId); + }; + const listenerMouse = () => { + clear(); + localStorage[LOCALSTORAGE_TOUCH_SUPPORT] = false; + resolve(false); + }; + const listenerTouch = () => { + clear(); + localStorage[LOCALSTORAGE_TOUCH_SUPPORT] = true; + resolve(true); + }; + const listenerTimeout = () => { + clear(); + localStorage[LOCALSTORAGE_TOUCH_SUPPORT] = initial; + resolve(initial); + }; + window.addEventListener("mousedown", listenerMouse, false); + window.addEventListener("touchstart", listenerTouch, false); + const listenerTimeoutId = setTimeout(listenerTimeout, 1e4); + }); + return { initial, promise }; + } + function getMaxCanvasWidth(maxWidth) { + const canvas = document.createElement("canvas"); + const ctx = canvas.getContext("2d"); + canvas.width = maxWidth; + canvas.height = maxWidth / 2; + while (canvas.width > 1024) { + ctx.fillStyle = "white"; + ctx.fillRect(0, 0, 1, 1); + try { + if (ctx.getImageData(0, 0, 1, 1).data[0] > 0) { + return canvas.width; + } + } catch (e) { + } + canvas.width /= 2; + canvas.height /= 2; + } + throw new PSVError("Unable to detect system capabilities"); + } + function getFullscreenEvent() { + if ("exitFullscreen" in document) { + return "fullscreenchange"; + } + if ("webkitExitFullscreen" in document) { + return "webkitfullscreenchange"; + } + return null; + } + + // src/adapters/interpolationWorker.ts + function interpolationWorker() { + self.onmessage = (e) => { + const panoData = e.data.panoData; + const buffer = new OffscreenCanvas(panoData.fullWidth, panoData.fullHeight); + const ctx = buffer.getContext("2d"); + const img = new OffscreenCanvas(panoData.croppedWidth, panoData.croppedHeight); + const ctxImg = img.getContext("2d"); + ctxImg.putImageData(e.data.image, 0, 0); + autoBackground(buffer, img, panoData); + postMessage(ctx.getImageData(0, 0, buffer.width, buffer.height)); + }; + function autoBackground(buffer, img, panoData) { + const croppedY2 = panoData.fullHeight - panoData.croppedHeight - panoData.croppedY; + const croppedX2 = panoData.fullWidth - panoData.croppedWidth - panoData.croppedX; + const middleY = panoData.croppedY + panoData.croppedHeight / 2; + const blurSize = buffer.width / 32; + const padding = blurSize; + const edge = 10; + const filter = `blur(${blurSize}px)`; + const ctx = buffer.getContext("2d"); + ctx.drawImage( + img, + panoData.croppedX, + panoData.croppedY, + panoData.croppedWidth, + panoData.croppedHeight + ); + if (panoData.croppedY > 0) { + if (panoData.croppedX > 0 || croppedX2 > 0) { + ctx.filter = "none"; + const colorLeft = getAverageColor(ctx, panoData.croppedX, panoData.croppedY, edge, edge, 2); + const colorRight = getAverageColor(ctx, buffer.width - croppedX2 - 11, panoData.croppedY, edge, edge, 2); + const colorCenter = averageRgb(colorLeft, colorRight); + if (panoData.croppedX > 0) { + ctx.fillStyle = createHorizontalGradient(ctx, 0, panoData.croppedX, colorCenter, colorLeft); + ctx.fillRect(-padding, -padding, panoData.croppedX + padding * 2, middleY + padding); + } + if (croppedX2 > 0) { + ctx.fillStyle = createHorizontalGradient(ctx, buffer.width - croppedX2, buffer.width, colorRight, colorCenter); + ctx.fillRect(buffer.width - croppedX2 - padding, -padding, croppedX2 + padding * 2, middleY + padding); + } + } + ctx.filter = filter; + ctx.drawImage( + img, + 0, + 0, + img.width, + edge, + panoData.croppedX, + -padding, + panoData.croppedWidth, + panoData.croppedY + padding * 2 + ); + ctx.fillStyle = rgbCss(getAverageColor(ctx, 0, 0, buffer.width, edge, edge)); + ctx.fillRect(-padding, -padding, buffer.width + padding * 2, padding * 2); + } + if (croppedY2 > 0) { + if (panoData.croppedX > 0 || croppedX2 > 0) { + ctx.filter = "none"; + const colorLeft = getAverageColor(ctx, panoData.croppedX, buffer.height - croppedY2 - 1 - edge, edge, edge, 2); + const colorRight = getAverageColor(ctx, buffer.width - croppedX2 - 1 - edge, buffer.height - croppedY2 - 1 - edge, edge, edge, 2); + const colorCenter = averageRgb(colorLeft, colorRight); + if (panoData.croppedX > 0) { + ctx.fillStyle = createHorizontalGradient(ctx, 0, panoData.croppedX, colorCenter, colorLeft); + ctx.fillRect(-padding, middleY, panoData.croppedX + padding * 2, buffer.height - middleY + padding); + } + if (croppedX2 > 0) { + ctx.fillStyle = createHorizontalGradient(ctx, buffer.width - croppedX2, buffer.width, colorRight, colorCenter); + ctx.fillRect(buffer.width - croppedX2 - padding, middleY, croppedX2 + padding * 2, buffer.height - middleY + padding); + } + } + ctx.filter = filter; + ctx.drawImage( + img, + 0, + img.height - edge, + img.width, + edge, + panoData.croppedX, + buffer.height - croppedY2 - padding, + panoData.croppedWidth, + croppedY2 + padding * 2 + ); + ctx.fillStyle = rgbCss(getAverageColor(ctx, 0, buffer.height - 1 - edge, buffer.width, edge, edge)); + ctx.fillRect(-padding, buffer.height - padding, buffer.width + padding * 2, padding * 2); + } + if (panoData.croppedX > 0) { + ctx.filter = filter; + ctx.drawImage( + img, + img.width - edge, + 0, + edge, + img.height, + -padding, + panoData.croppedY, + padding * 2, + panoData.croppedHeight + ); + ctx.drawImage( + img, + 0, + 0, + edge, + img.height, + 0, + panoData.croppedY, + panoData.croppedX + padding, + panoData.croppedHeight + ); + } + if (croppedX2 > 0) { + ctx.filter = filter; + ctx.drawImage( + img, + 0, + 0, + edge, + img.height, + buffer.width - padding, + panoData.croppedY, + padding * 2, + panoData.croppedHeight + ); + ctx.drawImage( + img, + img.width - edge, + 0, + edge, + img.height, + buffer.width - croppedX2 - padding, + panoData.croppedY, + croppedX2 + padding, + panoData.croppedHeight + ); + } + ctx.filter = "none"; + ctx.drawImage( + img, + panoData.croppedX, + panoData.croppedY, + panoData.croppedWidth, + panoData.croppedHeight + ); + } + function rgbCss(color) { + return `rgb(${color.r}, ${color.g}, ${color.b})`; + } + function averageRgb(c1, c2) { + return { + r: Math.round(c1.r / 2 + c2.r / 2), + g: Math.round(c1.g / 2 + c2.g / 2), + b: Math.round(c1.b / 2 + c2.b / 2) + }; + } + function createHorizontalGradient(ctx, x1, x2, c1, c2) { + const grad = ctx.createLinearGradient(x1, 0, x2, 0); + grad.addColorStop(0, rgbCss(c1)); + grad.addColorStop(1, rgbCss(c2)); + return grad; + } + function getAverageColor(ctx, x, y, w, h, every) { + every = Math.round(every); + let r = 0; + let g = 0; + let b = 0; + let count = 0; + const data = ctx.getImageData(x, y, w, h); + for (let row = 0; row < h; row += every) { + for (let col = 0; col < w; col += every) { + const i = 4 * (row * w + col); + r += data.data[i]; + g += data.data[i + 1]; + b += data.data[i + 2]; + count++; + } + } + r = Math.round(r / count); + g = Math.round(g / count); + b = Math.round(b / count); + return { r, g, b }; + } + } + var interpolationWorkerSrc = URL.createObjectURL( + new Blob( + ["(", interpolationWorker.toString(), ")()"], + { type: "application/javascript" } + ) + ); + + // src/adapters/EquirectangularAdapter.ts + var getConfig = getConfigParser( + { + backgroundColor: "#000", + interpolateBackground: false, + resolution: 64, + useXmpData: true, + blur: false + }, + { + resolution: (resolution) => { + if (!resolution || !import_three3.MathUtils.isPowerOfTwo(resolution)) { + throw new PSVError("EquirectangularAdapter resolution must be power of two"); + } + return resolution; + } + } + ); + var EquirectangularAdapter = class extends AbstractAdapter { + constructor(viewer, config) { + super(viewer); + this.config = getConfig(config); + if (this.config.interpolateBackground) { + if (!window.Worker) { + logWarn("Web Worker API not available"); + this.config.interpolateBackground = false; + } else { + this.interpolationWorker = new Worker(interpolationWorkerSrc); + } + } + this.SPHERE_SEGMENTS = this.config.resolution; + this.SPHERE_HORIZONTAL_SEGMENTS = this.SPHERE_SEGMENTS / 2; + } + supportsTransition() { + return true; + } + supportsPreload() { + return true; + } + destroy() { + this.interpolationWorker?.terminate(); + super.destroy(); + } + textureCoordsToSphericalCoords(point, data) { + if (isNil(point.textureX) || isNil(point.textureY)) { + throw new PSVError(`Texture position is missing 'textureX' or 'textureY'`); + } + const relativeX = (point.textureX + data.croppedX) / data.fullWidth * Math.PI * 2; + const relativeY = (point.textureY + data.croppedY) / data.fullHeight * Math.PI; + return { + yaw: relativeX >= Math.PI ? relativeX - Math.PI : relativeX + Math.PI, + pitch: Math.PI / 2 - relativeY + }; + } + sphericalCoordsToTextureCoords(position, data) { + const relativeLong = position.yaw / Math.PI / 2 * data.fullWidth; + const relativeLat = position.pitch / Math.PI * data.fullHeight; + return { + textureX: Math.round( + position.yaw < Math.PI ? relativeLong + data.fullWidth / 2 : relativeLong - data.fullWidth / 2 + ) - data.croppedX, + textureY: Math.round(data.fullHeight / 2 - relativeLat) - data.croppedY + }; + } + async loadTexture(panorama, loader = true, newPanoData, useXmpPanoData = this.config.useXmpData) { + if (typeof panorama !== "string") { + return Promise.reject(new PSVError("Invalid panorama url, are you using the right adapter?")); + } + const blob = await this.viewer.textureLoader.loadFile( + panorama, + loader ? (p) => this.viewer.loader.setProgress(p) : null, + panorama + ); + const xmpPanoData = useXmpPanoData ? await this.loadXMP(blob) : null; + const img = await this.viewer.textureLoader.blobToImage(blob); + if (typeof newPanoData === "function") { + newPanoData = newPanoData(img, xmpPanoData); + } + if (!newPanoData && !xmpPanoData) { + newPanoData = this.__defaultPanoData(img); + } + const panoData = { + isEquirectangular: true, + fullWidth: firstNonNull(newPanoData?.fullWidth, xmpPanoData?.fullWidth, img.width), + fullHeight: firstNonNull(newPanoData?.fullHeight, xmpPanoData?.fullHeight, img.height), + croppedWidth: firstNonNull(newPanoData?.croppedWidth, xmpPanoData?.croppedWidth, img.width), + croppedHeight: firstNonNull(newPanoData?.croppedHeight, xmpPanoData?.croppedHeight, img.height), + croppedX: firstNonNull(newPanoData?.croppedX, xmpPanoData?.croppedX, 0), + croppedY: firstNonNull(newPanoData?.croppedY, xmpPanoData?.croppedY, 0), + poseHeading: firstNonNull(newPanoData?.poseHeading, xmpPanoData?.poseHeading, 0), + posePitch: firstNonNull(newPanoData?.posePitch, xmpPanoData?.posePitch, 0), + poseRoll: firstNonNull(newPanoData?.poseRoll, xmpPanoData?.poseRoll, 0) + }; + if (panoData.croppedWidth !== img.width || panoData.croppedHeight !== img.height) { + logWarn(`Invalid panoData, croppedWidth/croppedHeight is not coherent with the loaded image. + panoData: ${panoData.croppedWidth}x${panoData.croppedHeight}, image: ${img.width}x${img.height}`); + } + if (Math.abs(panoData.fullWidth - panoData.fullHeight * 2) > 1) { + logWarn("Invalid panoData, fullWidth should be twice fullHeight"); + panoData.fullWidth = panoData.fullHeight * 2; + } + if (panoData.croppedX + panoData.croppedWidth > panoData.fullWidth) { + logWarn("Invalid panoData, croppedX + croppedWidth > fullWidth"); + panoData.croppedX = panoData.fullWidth - panoData.croppedWidth; + } + if (panoData.croppedY + panoData.croppedHeight > panoData.fullHeight) { + logWarn("Invalid panoData, croppedY + croppedHeight > fullHeight"); + panoData.croppedY = panoData.fullHeight - panoData.croppedHeight; + } + const texture = this.createEquirectangularTexture(img, panoData); + return { + panorama, + texture, + panoData, + cacheKey: panorama + }; + } + /** + * Loads the XMP data of an image + */ + async loadXMP(blob) { + const binary = await this.loadBlobAsString(blob); + const a = binary.indexOf(""); + const data = binary.substring(a, b); + if (a !== -1 && b !== -1 && data.includes("GPano:")) { + return { + isEquirectangular: true, + fullWidth: getXMPValue(data, "FullPanoWidthPixels"), + fullHeight: getXMPValue(data, "FullPanoHeightPixels"), + croppedWidth: getXMPValue(data, "CroppedAreaImageWidthPixels"), + croppedHeight: getXMPValue(data, "CroppedAreaImageHeightPixels"), + croppedX: getXMPValue(data, "CroppedAreaLeftPixels"), + croppedY: getXMPValue(data, "CroppedAreaTopPixels"), + poseHeading: getXMPValue(data, "PoseHeadingDegrees"), + posePitch: getXMPValue(data, "PosePitchDegrees"), + poseRoll: getXMPValue(data, "PoseRollDegrees") + }; + } + return null; + } + /** + * Reads a Blob as a string + */ + loadBlobAsString(blob) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onload = () => resolve(reader.result); + reader.onerror = reject; + reader.readAsText(blob); + }); + } + /** + * Creates the final texture from image and panorama data + */ + createEquirectangularTexture(img, panoData) { + if (this.config.blur || panoData.fullWidth > SYSTEM.maxTextureWidth || panoData.croppedWidth !== panoData.fullWidth || panoData.croppedHeight !== panoData.fullHeight) { + const ratio = Math.min(1, SYSTEM.maxCanvasWidth / panoData.fullWidth); + const resizedPanoData = { + fullWidth: panoData.fullWidth * ratio, + fullHeight: panoData.fullHeight * ratio, + croppedWidth: panoData.croppedWidth * ratio, + croppedHeight: panoData.croppedHeight * ratio, + croppedX: panoData.croppedX * ratio, + croppedY: panoData.croppedY * ratio + }; + const buffer = document.createElement("canvas"); + buffer.width = resizedPanoData.fullWidth; + buffer.height = resizedPanoData.fullHeight; + const ctx = buffer.getContext("2d"); + if (this.config.backgroundColor) { + ctx.fillStyle = this.config.backgroundColor; + ctx.fillRect(0, 0, buffer.width, buffer.height); + } + if (this.config.blur) { + const blurSize = buffer.width / 2048; + const margin = Math.ceil(blurSize * 2); + if (resizedPanoData.croppedWidth === buffer.width) { + ctx.drawImage( + img, + 0, + 0, + margin / ratio, + img.height, + 0, + resizedPanoData.croppedY, + margin, + resizedPanoData.croppedHeight + ); + ctx.drawImage( + img, + img.width - margin / ratio, + 0, + margin / ratio, + img.height, + buffer.width - margin, + resizedPanoData.croppedY, + margin, + resizedPanoData.croppedHeight + ); + } + if (resizedPanoData.croppedHeight === buffer.height) { + ctx.drawImage( + img, + 0, + 0, + 1, + 1, + resizedPanoData.croppedX, + 0, + resizedPanoData.croppedWidth, + margin + ); + ctx.drawImage( + img, + 0, + img.height - 1, + 1, + 1, + resizedPanoData.croppedX, + buffer.height - margin, + resizedPanoData.croppedWidth, + margin + ); + } + ctx.filter = `blur(${blurSize}px)`; + } + ctx.drawImage( + img, + resizedPanoData.croppedX, + resizedPanoData.croppedY, + resizedPanoData.croppedWidth, + resizedPanoData.croppedHeight + ); + const t = createTexture(buffer); + if (this.config.interpolateBackground && (panoData.croppedWidth !== panoData.fullWidth || panoData.croppedHeight !== panoData.fullHeight)) { + this.interpolationWorker.postMessage({ + image: ctx.getImageData( + resizedPanoData.croppedX, + resizedPanoData.croppedY, + resizedPanoData.croppedWidth, + resizedPanoData.croppedHeight + ), + panoData: resizedPanoData + }); + this.interpolationWorker.onmessage = (e) => { + ctx.putImageData(e.data, 0, 0); + t.needsUpdate = true; + this.viewer.needsUpdate(); + }; + } + return t; + } + return createTexture(img); + } + createMesh(scale = 1) { + const geometry = new import_three3.SphereGeometry( + SPHERE_RADIUS * scale, + this.SPHERE_SEGMENTS, + this.SPHERE_HORIZONTAL_SEGMENTS, + -Math.PI / 2 + ).scale(-1, 1, 1); + return new import_three3.Mesh(geometry, new import_three3.MeshBasicMaterial()); + } + setTexture(mesh, textureData) { + mesh.material.map = textureData.texture; + } + setTextureOpacity(mesh, opacity) { + mesh.material.opacity = opacity; + mesh.material.transparent = opacity < 1; + } + disposeTexture(textureData) { + textureData.texture?.dispose(); + } + __defaultPanoData(img) { + const fullWidth = Math.max(img.width, img.height * 2); + const fullHeight = Math.round(fullWidth / 2); + const croppedX = Math.round((fullWidth - img.width) / 2); + const croppedY = Math.round((fullHeight - img.height) / 2); + return { + isEquirectangular: true, + fullWidth, + fullHeight, + croppedWidth: img.width, + croppedHeight: img.height, + croppedX, + croppedY + }; + } + }; + EquirectangularAdapter.id = "equirectangular"; + EquirectangularAdapter.VERSION = "5.7.3"; + EquirectangularAdapter.supportsDownload = true; + + // src/components/AbstractComponent.ts + var AbstractComponent = class _AbstractComponent { + constructor(parent, config) { + this.parent = parent; + /** + * All child components + * @internal + */ + this.children = []; + /** + * Container element + */ + this.container = document.createElement("div"); + /** + * Internal properties + * @internal + */ + this.state = { + visible: true + }; + this.viewer = parent instanceof _AbstractComponent ? parent.viewer : parent; + this.container.className = config.className || ""; + this.parent.children.push(this); + this.parent.container.appendChild(this.container); + } + /** + * Destroys the component + */ + destroy() { + this.parent.container.removeChild(this.container); + const childIdx = this.parent.children.indexOf(this); + if (childIdx !== -1) { + this.parent.children.splice(childIdx, 1); + } + this.children.slice().forEach((child) => child.destroy()); + this.children.length = 0; + } + /** + * Displays or hides the component + */ + toggle(visible = !this.isVisible()) { + if (!visible) { + this.hide(); + } else { + this.show(); + } + } + /** + * Hides the component + */ + // @ts-ignore unused parameter + // eslint-disable-next-line @typescript-eslint/no-unused-vars + hide(options) { + this.container.style.display = "none"; + this.state.visible = false; + } + /** + * Displays the component + */ + // @ts-ignore unused parameter + // eslint-disable-next-line @typescript-eslint/no-unused-vars + show(options) { + this.container.style.display = ""; + this.state.visible = true; + } + /** + * Checks if the component is visible + */ + isVisible() { + return this.state.visible; + } + }; + + // src/buttons/AbstractButton.ts + var getConfig2 = getConfigParser({ + id: null, + className: null, + title: null, + hoverScale: false, + collapsable: false, + tabbable: true, + icon: null, + iconActive: null + }); + var AbstractButton = class extends AbstractComponent { + constructor(navbar, config) { + super(navbar, { + className: `psv-button ${config.hoverScale ? "psv-button--hover-scale" : ""} ${config.className || ""}` + }); + /** + * Internal properties + */ + this.state = { + visible: true, + enabled: true, + supported: true, + collapsed: false, + active: false, + width: 0 + }; + this.config = getConfig2(config); + this.config.id = this.constructor.id; + if (config.icon) { + this.__setIcon(config.icon); + } + this.state.width = this.container.offsetWidth; + if (this.config.title) { + this.container.title = this.config.title; + } else if (this.id && this.id in this.viewer.config.lang) { + this.container.title = this.viewer.config.lang[this.id]; + } + if (config.tabbable) { + this.container.tabIndex = 0; + } + this.container.addEventListener("click", (e) => { + if (this.state.enabled) { + this.onClick(); + } + e.stopPropagation(); + }); + this.container.addEventListener("keydown", (e) => { + if (e.key === KEY_CODES.Enter && this.state.enabled) { + this.onClick(); + e.stopPropagation(); + } + }); + } + get id() { + return this.config.id; + } + get title() { + return this.container.title; + } + get content() { + return this.container.innerHTML; + } + get width() { + return this.state.width; + } + get collapsable() { + return this.config.collapsable; + } + show(refresh = true) { + if (!this.isVisible()) { + this.state.visible = true; + if (!this.state.collapsed) { + this.container.style.display = ""; + } + if (refresh) { + this.viewer.navbar.autoSize(); + } + } + } + hide(refresh = true) { + if (this.isVisible()) { + this.state.visible = false; + this.container.style.display = "none"; + if (refresh) { + this.viewer.navbar.autoSize(); + } + } + } + /** + * Hides/shows the button depending of the result of {@link isSupported} + * @internal + */ + checkSupported() { + resolveBoolean(this.isSupported(), (supported, init) => { + if (!this.state) { + return; + } + this.state.supported = supported; + if (!init) { + this.toggle(supported); + } else if (!supported) { + this.hide(); + } + }); + } + /** + * Perform action when the navbar size/content changes + * @internal + */ + autoSize() { + } + /** + * Checks if the button can be displayed + */ + isSupported() { + return true; + } + /** + * Changes the active state of the button + */ + toggleActive(active = !this.state.active) { + if (active !== this.state.active) { + this.state.active = active; + toggleClass(this.container, "psv-button--active", this.state.active); + if (this.config.iconActive) { + this.__setIcon(this.state.active ? this.config.iconActive : this.config.icon); + } + } + } + /** + * Disables the button + */ + disable() { + this.container.classList.add("psv-button--disabled"); + this.state.enabled = false; + } + /** + * Enables the button + */ + enable() { + this.container.classList.remove("psv-button--disabled"); + this.state.enabled = true; + } + /** + * Collapses the button in the navbar menu + */ + collapse() { + this.state.collapsed = true; + this.container.style.display = "none"; + } + /** + * Uncollapses the button from the navbar menu + */ + uncollapse() { + this.state.collapsed = false; + if (this.state.visible) { + this.container.style.display = ""; + } + } + __setIcon(icon) { + this.container.innerHTML = icon; + addClasses(this.container.querySelector("svg"), "psv-button-svg"); + } + }; + + // src/buttons/CustomButton.ts + var CustomButton = class extends AbstractButton { + constructor(navbar, config) { + super(navbar, { + className: `psv-custom-button ${config.className || ""}`, + hoverScale: false, + collapsable: config.collapsable !== false, + tabbable: config.tabbable !== false, + title: config.title + }); + this.customOnClick = config.onClick; + if (config.id) { + this.config.id = config.id; + } else { + this.config.id = "psvButton-" + Math.random().toString(36).substring(2); + } + if (config.content) { + if (typeof config.content === "string") { + this.container.innerHTML = config.content; + } else { + this.container.classList.add("psv-custom-button--no-padding"); + config.content.style.height = "100%"; + config.content.attachViewer?.(this.viewer); + this.container.appendChild(config.content); + } + } + this.state.width = this.container.offsetWidth; + if (config.disabled) { + this.disable(); + } + if (config.visible === false) { + this.hide(); + } + } + onClick() { + this.customOnClick?.(this.viewer); + } + }; + + // src/buttons/DescriptionButton.ts + var DescriptionButton = class extends AbstractButton { + constructor(navbar) { + super(navbar, { + className: "psv-description-button", + hoverScale: true, + collapsable: false, + tabbable: true, + icon: ICONS.info + }); + this.mode = 0 /* NONE */; + this.viewer.addEventListener(HideNotificationEvent.type, this); + this.viewer.addEventListener(ShowNotificationEvent.type, this); + this.viewer.addEventListener(HidePanelEvent.type, this); + this.viewer.addEventListener(ShowPanelEvent.type, this); + this.viewer.addEventListener(ConfigChangedEvent.type, this); + } + destroy() { + this.viewer.removeEventListener(HideNotificationEvent.type, this); + this.viewer.removeEventListener(ShowNotificationEvent.type, this); + this.viewer.removeEventListener(HidePanelEvent.type, this); + this.viewer.removeEventListener(ShowPanelEvent.type, this); + this.viewer.removeEventListener(ConfigChangedEvent.type, this); + super.destroy(); + } + handleEvent(e) { + if (e instanceof ConfigChangedEvent) { + e.containsOptions("description") && this.autoSize(true); + return; + } + if (!this.mode) { + return; + } + let closed = false; + if (e instanceof HideNotificationEvent) { + closed = this.mode === 1 /* NOTIF */; + } else if (e instanceof ShowNotificationEvent) { + closed = this.mode === 1 /* NOTIF */ && e.notificationId !== IDS.DESCRIPTION; + } else if (e instanceof HidePanelEvent) { + closed = this.mode === 2 /* PANEL */; + } else if (e instanceof ShowPanelEvent) { + closed = this.mode === 2 /* PANEL */ && e.panelId !== IDS.DESCRIPTION; + } + if (closed) { + this.toggleActive(false); + this.mode = 0 /* NONE */; + } + } + onClick() { + if (this.mode) { + this.__close(); + } else { + this.__open(); + } + } + hide(refresh) { + super.hide(refresh); + if (this.mode) { + this.__close(); + } + } + /** + * This button can only be refreshed from NavbarCaption + * @internal + */ + autoSize(refresh = false) { + if (refresh) { + const caption = this.viewer.navbar.getButton("caption", false); + const captionHidden = caption && !caption.isVisible(); + const hasDescription = !!this.viewer.config.description; + if (captionHidden || hasDescription) { + this.show(false); + } else { + this.hide(false); + } + } + } + __close() { + switch (this.mode) { + case 1 /* NOTIF */: + this.viewer.notification.hide(IDS.DESCRIPTION); + break; + case 2 /* PANEL */: + this.viewer.panel.hide(IDS.DESCRIPTION); + break; + default: + } + } + __open() { + this.toggleActive(true); + if (this.viewer.config.description) { + this.mode = 2 /* PANEL */; + this.viewer.panel.show({ + id: IDS.DESCRIPTION, + content: (this.viewer.config.caption ? `

${this.viewer.config.caption}

` : "") + this.viewer.config.description + }); + } else { + this.mode = 1 /* NOTIF */; + this.viewer.notification.show({ + id: IDS.DESCRIPTION, + content: this.viewer.config.caption + }); + } + } + }; + DescriptionButton.id = "description"; + + // src/buttons/DownloadButton.ts + var DownloadButton = class extends AbstractButton { + constructor(navbar) { + super(navbar, { + className: "psv-download-button", + hoverScale: true, + collapsable: true, + tabbable: true, + icon: ICONS.download + }); + this.viewer.addEventListener(ConfigChangedEvent.type, this); + } + destroy() { + this.viewer.removeEventListener(ConfigChangedEvent.type, this); + super.destroy(); + } + handleEvent(e) { + if (e instanceof ConfigChangedEvent) { + e.containsOptions("downloadUrl") && this.checkSupported(); + } + } + onClick() { + const link = document.createElement("a"); + link.href = this.viewer.config.downloadUrl || this.viewer.config.panorama; + if (link.href.startsWith("data:") && !this.viewer.config.downloadName) { + link.download = "panorama." + link.href.substring(0, link.href.indexOf(";")).split("/").pop(); + } else { + link.download = this.viewer.config.downloadName || link.href.split("/").pop(); + } + link.target = "_blank"; + this.viewer.container.appendChild(link); + link.click(); + setTimeout(() => { + this.viewer.container.removeChild(link); + }, 100); + } + checkSupported() { + const supported = this.viewer.adapter.constructor.supportsDownload || this.viewer.config.downloadUrl; + if (supported) { + this.show(); + } else { + this.hide(); + } + } + }; + DownloadButton.id = "download"; + + // src/buttons/FullscreenButton.ts + var FullscreenButton = class extends AbstractButton { + constructor(navbar) { + super(navbar, { + className: "psv-fullscreen-button", + hoverScale: true, + collapsable: false, + tabbable: true, + icon: ICONS.fullscreenIn, + iconActive: ICONS.fullscreenOut + }); + this.viewer.addEventListener(FullscreenEvent.type, this); + } + destroy() { + this.viewer.removeEventListener(FullscreenEvent.type, this); + super.destroy(); + } + handleEvent(e) { + if (e instanceof FullscreenEvent) { + this.toggleActive(e.fullscreenEnabled); + } + } + onClick() { + this.viewer.toggleFullscreen(); + } + }; + FullscreenButton.id = "fullscreen"; + + // src/buttons/MenuButton.ts + var BUTTON_DATA = "psvButton"; + var MENU_TEMPLATE = (buttons, title) => ` +
+

${ICONS.menu} ${title}

+
    + ${buttons.map( + (button) => ` +
  • + ${button.content} + ${button.title} +
  • + ` + ).join("")} +
+
+`; + var MenuButton = class extends AbstractButton { + constructor(navbar) { + super(navbar, { + className: "psv-menu-button", + hoverScale: true, + collapsable: false, + tabbable: true, + icon: ICONS.menu + }); + this.viewer.addEventListener(ShowPanelEvent.type, this); + this.viewer.addEventListener(HidePanelEvent.type, this); + super.hide(); + } + destroy() { + this.viewer.removeEventListener(ShowPanelEvent.type, this); + this.viewer.removeEventListener(HidePanelEvent.type, this); + super.destroy(); + } + handleEvent(e) { + if (e instanceof ShowPanelEvent) { + this.toggleActive(e.panelId === IDS.MENU); + } else if (e instanceof HidePanelEvent) { + this.toggleActive(false); + } + } + onClick() { + if (this.state.active) { + this.__hideMenu(); + } else { + this.__showMenu(); + } + } + hide(refresh) { + super.hide(refresh); + this.__hideMenu(); + } + show(refresh) { + super.show(refresh); + if (this.state.active) { + this.__showMenu(); + } + } + __showMenu() { + this.viewer.panel.show({ + id: IDS.MENU, + content: MENU_TEMPLATE(this.viewer.navbar.collapsed, this.viewer.config.lang.menu), + noMargin: true, + clickHandler: (target) => { + const li = target ? getClosest(target, "li") : void 0; + const buttonId = li ? li.dataset[BUTTON_DATA] : void 0; + if (buttonId) { + this.viewer.navbar.getButton(buttonId).onClick(); + this.__hideMenu(); + } + } + }); + } + __hideMenu() { + this.viewer.panel.hide(IDS.MENU); + } + }; + MenuButton.id = "menu"; + + // src/buttons/AbstractMoveButton.ts + function getIcon(value) { + let angle2 = 0; + switch (value) { + case 0 /* UP */: + angle2 = 90; + break; + case 1 /* DOWN */: + angle2 = -90; + break; + case 3 /* RIGHT */: + angle2 = 180; + break; + default: + angle2 = 0; + break; + } + return ICONS.arrow.replace("rotate(0", `rotate(${angle2}`); + } + var AbstractMoveButton = class extends AbstractButton { + constructor(navbar, direction) { + super(navbar, { + className: "psv-move-button", + hoverScale: true, + collapsable: false, + tabbable: true, + icon: getIcon(direction) + }); + this.direction = direction; + this.handler = new PressHandler(); + this.container.addEventListener("mousedown", this); + this.container.addEventListener("keydown", this); + this.container.addEventListener("keyup", this); + this.viewer.container.addEventListener("mouseup", this); + this.viewer.container.addEventListener("touchend", this); + } + destroy() { + this.__onMouseUp(); + this.viewer.container.removeEventListener("mouseup", this); + this.viewer.container.removeEventListener("touchend", this); + super.destroy(); + } + handleEvent(e) { + switch (e.type) { + case "mousedown": + this.__onMouseDown(); + break; + case "mouseup": + this.__onMouseUp(); + break; + case "touchend": + this.__onMouseUp(); + break; + case "keydown": + e.key === KEY_CODES.Enter && this.__onMouseDown(); + break; + case "keyup": + e.key === KEY_CODES.Enter && this.__onMouseUp(); + break; + } + } + onClick() { + } + isSupported() { + return invertResolvableBoolean(SYSTEM.isTouchEnabled); + } + __onMouseDown() { + if (!this.state.enabled) { + return; + } + const dynamicRoll = {}; + switch (this.direction) { + case 0 /* UP */: + dynamicRoll.pitch = false; + break; + case 1 /* DOWN */: + dynamicRoll.pitch = true; + break; + case 3 /* RIGHT */: + dynamicRoll.yaw = false; + break; + default: + dynamicRoll.yaw = true; + break; + } + this.viewer.stopAll(); + this.viewer.dynamics.position.roll(dynamicRoll); + this.handler.down(); + } + __onMouseUp() { + if (!this.state.enabled) { + return; + } + this.handler.up(() => { + this.viewer.dynamics.position.stop(); + this.viewer.resetIdleTimer(); + }); + } + }; + AbstractMoveButton.groupId = "move"; + + // src/buttons/MoveDownButton.ts + var MoveDownButton = class extends AbstractMoveButton { + constructor(navbar) { + super(navbar, 1 /* DOWN */); + } + }; + MoveDownButton.id = "moveDown"; + + // src/buttons/MoveLeftButton.ts + var MoveLeftButton = class extends AbstractMoveButton { + constructor(navbar) { + super(navbar, 2 /* LEFT */); + } + }; + MoveLeftButton.id = "moveLeft"; + + // src/buttons/MoveRightButton.ts + var MoveRightButton = class extends AbstractMoveButton { + constructor(navbar) { + super(navbar, 3 /* RIGHT */); + } + }; + MoveRightButton.id = "moveRight"; + + // src/buttons/MoveUpButton.ts + var MoveUpButton = class extends AbstractMoveButton { + constructor(navbar) { + super(navbar, 0 /* UP */); + } + }; + MoveUpButton.id = "moveUp"; + + // src/buttons/AbstractZoomButton.ts + var AbstractZoomButton = class extends AbstractButton { + constructor(navbar, icon, direction) { + super(navbar, { + className: "psv-zoom-button", + hoverScale: true, + collapsable: false, + tabbable: true, + icon + }); + this.direction = direction; + this.handler = new PressHandler(); + this.container.addEventListener("mousedown", this); + this.container.addEventListener("keydown", this); + this.container.addEventListener("keyup", this); + this.viewer.container.addEventListener("mouseup", this); + this.viewer.container.addEventListener("touchend", this); + } + destroy() { + this.__onMouseUp(); + this.viewer.container.removeEventListener("mouseup", this); + this.viewer.container.removeEventListener("touchend", this); + super.destroy(); + } + handleEvent(e) { + switch (e.type) { + case "mousedown": + this.__onMouseDown(); + break; + case "mouseup": + this.__onMouseUp(); + break; + case "touchend": + this.__onMouseUp(); + break; + case "keydown": + e.key === KEY_CODES.Enter && this.__onMouseDown(); + break; + case "keyup": + e.key === KEY_CODES.Enter && this.__onMouseUp(); + break; + } + } + onClick() { + } + isSupported() { + return invertResolvableBoolean(SYSTEM.isTouchEnabled); + } + __onMouseDown() { + if (!this.state.enabled) { + return; + } + this.viewer.dynamics.zoom.roll(this.direction === 1 /* OUT */); + this.handler.down(); + } + __onMouseUp() { + if (!this.state.enabled) { + return; + } + this.handler.up(() => this.viewer.dynamics.zoom.stop()); + } + }; + AbstractZoomButton.groupId = "zoom"; + + // src/buttons/ZoomInButton.ts + var ZoomInButton = class extends AbstractZoomButton { + constructor(navbar) { + super(navbar, ICONS.zoomIn, 0 /* IN */); + } + }; + ZoomInButton.id = "zoomIn"; + + // src/buttons/ZoomOutButton.ts + var ZoomOutButton = class extends AbstractZoomButton { + constructor(navbar) { + super(navbar, ICONS.zoomOut, 1 /* OUT */); + } + }; + ZoomOutButton.id = "zoomOut"; + + // src/buttons/ZoomRangeButton.ts + var ZoomRangeButton = class extends AbstractButton { + constructor(navbar) { + super(navbar, { + className: "psv-zoom-range", + hoverScale: false, + collapsable: false, + tabbable: false + }); + this.zoomRange = document.createElement("div"); + this.zoomRange.className = "psv-zoom-range-line"; + this.container.appendChild(this.zoomRange); + this.zoomValue = document.createElement("div"); + this.zoomValue.className = "psv-zoom-range-handle"; + this.zoomRange.appendChild(this.zoomValue); + this.slider = new Slider(this.container, "HORIZONTAL" /* HORIZONTAL */, (data) => this.__onSliderUpdate(data)); + this.mediaMinWidth = parseInt(getStyleProperty(this.container, "max-width"), 10); + this.viewer.addEventListener(ZoomUpdatedEvent.type, this); + if (this.viewer.state.ready) { + this.__moveZoomValue(this.viewer.getZoomLevel()); + } else { + this.viewer.addEventListener(ReadyEvent.type, this); + } + } + destroy() { + this.slider.destroy(); + this.viewer.removeEventListener(ZoomUpdatedEvent.type, this); + this.viewer.removeEventListener(ReadyEvent.type, this); + super.destroy(); + } + handleEvent(e) { + if (e instanceof ZoomUpdatedEvent) { + this.__moveZoomValue(e.zoomLevel); + } else if (e instanceof ReadyEvent) { + this.__moveZoomValue(this.viewer.getZoomLevel()); + } + } + onClick() { + } + isSupported() { + return invertResolvableBoolean(SYSTEM.isTouchEnabled); + } + autoSize() { + if (this.state.supported) { + if (this.viewer.state.size.width <= this.mediaMinWidth && this.state.visible) { + this.hide(false); + } else if (this.viewer.state.size.width > this.mediaMinWidth && !this.state.visible) { + this.show(false); + } + } + } + __moveZoomValue(level) { + this.zoomValue.style.left = level / 100 * this.zoomRange.offsetWidth - this.zoomValue.offsetWidth / 2 + "px"; + } + __onSliderUpdate(data) { + if (data.mousedown) { + this.viewer.zoom(data.value * 100); + } + } + }; + ZoomRangeButton.id = "zoomRange"; + ZoomRangeButton.groupId = "zoom"; + + // src/data/config.ts + var import_three4 = require_three(); + + // src/plugins/AbstractPlugin.ts + var AbstractPlugin = class extends TypedEventTarget { + constructor(viewer) { + super(); + this.viewer = viewer; + } + /** + * Initializes the plugin + */ + // eslint-disable-next-line @typescript-eslint/no-empty-function + init() { + } + /** + * Destroys the plugin + */ + // eslint-disable-next-line @typescript-eslint/no-empty-function + destroy() { + } + }; + var AbstractConfigurablePlugin = class extends AbstractPlugin { + constructor(viewer, config) { + super(viewer); + this.config = this.constructor.configParser(config); + } + /** + * Update options + */ + setOption(option, value) { + this.setOptions({ [option]: value }); + } + /** + * Update options + */ + setOptions(options) { + const rawConfig = { + ...this.config, + ...options + }; + const ctor = this.constructor; + const parser = ctor.configParser; + const readonly = ctor.readonlyOptions; + const id = ctor.id; + for (let [key, value] of Object.entries(options)) { + if (!(key in parser.defaults)) { + logWarn(`${id}: Unknown option "${key}"`); + continue; + } + if (readonly.includes(key)) { + logWarn(`${id}: Option "${key}" cannot be updated`); + continue; + } + if (key in parser.parsers) { + value = parser.parsers[key](value, { + rawConfig, + defValue: parser.defaults[key] + }); + } + this.config[key] = value; + } + } + }; + AbstractConfigurablePlugin.readonlyOptions = []; + function pluginInterop(plugin) { + if (plugin) { + for (const [, p] of [["_", plugin], ...Object.entries(plugin)]) { + if (p.prototype instanceof AbstractPlugin) { + checkVersion(p.id, p.VERSION, "5.7.3"); + return p; + } + } + } + return null; + } + + // src/data/config.ts + var DEFAULTS = { + panorama: null, + container: null, + adapter: [EquirectangularAdapter, null], + plugins: [], + caption: null, + description: null, + downloadUrl: null, + downloadName: null, + loadingImg: null, + loadingTxt: "", + // empty string => `lang.loading` + size: null, + fisheye: 0, + minFov: 30, + maxFov: 90, + defaultZoomLvl: 50, + defaultYaw: 0, + defaultPitch: 0, + sphereCorrection: null, + moveSpeed: 1, + zoomSpeed: 1, + moveInertia: true, + mousewheel: true, + mousemove: true, + mousewheelCtrlKey: false, + touchmoveTwoFingers: false, + panoData: null, + requestHeaders: null, + rendererParameters: { alpha: true, antialias: true }, + withCredentials: false, + // prettier-ignore + navbar: [ + "zoom", + "move", + "download", + "description", + "caption", + "fullscreen" + ], + lang: { + zoom: "Zoom", + zoomOut: "Zoom out", + zoomIn: "Zoom in", + moveUp: "Move up", + moveDown: "Move down", + moveLeft: "Move left", + moveRight: "Move right", + description: "Description", + download: "Download", + fullscreen: "Fullscreen", + loading: "Loading...", + menu: "Menu", + close: "Close", + twoFingers: "Use two fingers to navigate", + ctrlZoom: "Use ctrl + scroll to zoom the image", + loadError: "The panorama cannot be loaded", + webglError: "Your browser does not seem to support WebGL" + }, + keyboard: "fullscreen", + keyboardActions: { + [KEY_CODES.ArrowUp]: "ROTATE_UP" /* ROTATE_UP */, + [KEY_CODES.ArrowDown]: "ROTATE_DOWN" /* ROTATE_DOWN */, + [KEY_CODES.ArrowRight]: "ROTATE_RIGHT" /* ROTATE_RIGHT */, + [KEY_CODES.ArrowLeft]: "ROTATE_LEFT" /* ROTATE_LEFT */, + [KEY_CODES.PageUp]: "ZOOM_IN" /* ZOOM_IN */, + [KEY_CODES.PageDown]: "ZOOM_OUT" /* ZOOM_OUT */, + [KEY_CODES.Plus]: "ZOOM_IN" /* ZOOM_IN */, + [KEY_CODES.Minus]: "ZOOM_OUT" /* ZOOM_OUT */ + } + }; + var READONLY_OPTIONS = { + panorama: "Use setPanorama method to change the panorama", + panoData: "Use setPanorama method to change the panorama", + container: "Cannot change viewer container", + adapter: "Cannot change adapter", + plugins: "Cannot change plugins" + }; + var CONFIG_PARSERS = { + container: (container) => { + if (!container) { + throw new PSVError("No value given for container."); + } + return container; + }, + adapter: (adapter, { defValue }) => { + if (!adapter) { + adapter = defValue; + } else if (Array.isArray(adapter)) { + adapter = [adapterInterop(adapter[0]), adapter[1]]; + } else { + adapter = [adapterInterop(adapter), null]; + } + if (!adapter[0]) { + throw new PSVError("An undefined value was given for adapter."); + } + if (!adapter[0].id) { + throw new PSVError(`Adapter has no id.`); + } + return adapter; + }, + defaultYaw: (defaultYaw) => { + return parseAngle(defaultYaw); + }, + defaultPitch: (defaultPitch) => { + return parseAngle(defaultPitch, true); + }, + defaultZoomLvl: (defaultZoomLvl) => { + return import_three4.MathUtils.clamp(defaultZoomLvl, 0, 100); + }, + minFov: (minFov, { rawConfig }) => { + if (rawConfig.maxFov < minFov) { + logWarn("maxFov cannot be lower than minFov"); + minFov = rawConfig.maxFov; + } + return import_three4.MathUtils.clamp(minFov, 1, 179); + }, + maxFov: (maxFov, { rawConfig }) => { + if (maxFov < rawConfig.minFov) { + maxFov = rawConfig.minFov; + } + return import_three4.MathUtils.clamp(maxFov, 1, 179); + }, + lang: (lang) => { + return { + ...DEFAULTS.lang, + ...lang + }; + }, + keyboard: (keyboard) => { + if (!keyboard) { + return false; + } + if (typeof keyboard === "object") { + logWarn(`Use keyboardActions to configure the keyboard actions, keyboard option must be either true, false, 'fullscreen' or 'always'`); + return "fullscreen"; + } + return keyboard === "always" ? "always" : "fullscreen"; + }, + keyboardActions: (keyboardActions, { rawConfig }) => { + if (rawConfig.keyboard && typeof rawConfig.keyboard === "object") { + return rawConfig.keyboard; + } + return keyboardActions; + }, + fisheye: (fisheye) => { + if (fisheye === true) { + return 1; + } else if (fisheye === false) { + return 0; + } + return fisheye; + }, + requestHeaders: (requestHeaders) => { + if (requestHeaders && typeof requestHeaders === "object") { + return () => requestHeaders; + } + if (typeof requestHeaders === "function") { + return requestHeaders; + } + return null; + }, + rendererParameters: (rendererParameters, { defValue }) => ({ + ...rendererParameters, + ...defValue + }), + plugins: (plugins) => { + return plugins.map((plugin, i) => { + if (Array.isArray(plugin)) { + plugin = [pluginInterop(plugin[0]), plugin[1]]; + } else { + plugin = [pluginInterop(plugin), null]; + } + if (!plugin[0]) { + throw new PSVError(`An undefined value was given for plugin ${i}.`); + } + if (!plugin[0].id) { + throw new PSVError(`Plugin ${i} has no id.`); + } + return plugin; + }); + }, + navbar: (navbar) => { + if (navbar === false) { + return null; + } + if (navbar === true) { + return clone(DEFAULTS.navbar); + } + if (typeof navbar === "string") { + return navbar.split(/[ ,]/); + } + return navbar; + } + }; + var getViewerConfig = getConfigParser(DEFAULTS, CONFIG_PARSERS); + + // src/components/NavbarCaption.ts + var NavbarCaption = class extends AbstractButton { + constructor(navbar) { + super(navbar, { + className: "psv-caption", + hoverScale: false, + collapsable: false, + tabbable: true + }); + this.contentWidth = 0; + this.state.width = 0; + this.contentElt = document.createElement("div"); + this.contentElt.className = "psv-caption-content"; + this.container.appendChild(this.contentElt); + this.setCaption(this.viewer.config.caption); + } + hide() { + this.contentElt.style.display = "none"; + this.state.visible = false; + } + show() { + this.contentElt.style.display = ""; + this.state.visible = true; + } + onClick() { + } + /** + * Changes the caption + */ + setCaption(html) { + this.show(); + this.contentElt.innerHTML = html ?? ""; + if (this.contentElt.innerHTML) { + this.contentWidth = this.contentElt.offsetWidth; + } else { + this.contentWidth = 0; + } + this.autoSize(); + } + /** + * Toggles content and icon depending on available space + */ + autoSize() { + this.toggle(this.container.offsetWidth >= this.contentWidth); + this.__refreshButton(); + } + __refreshButton() { + this.viewer.navbar.getButton(DescriptionButton.id, false)?.autoSize(true); + } + }; + NavbarCaption.id = "caption"; + + // src/components/Navbar.ts + var AVAILABLE_BUTTONS = {}; + var AVAILABLE_GROUPS = {}; + function registerButton(button, defaultPosition) { + if (!button.id) { + throw new PSVError("Button id is required"); + } + AVAILABLE_BUTTONS[button.id] = button; + if (button.groupId) { + (AVAILABLE_GROUPS[button.groupId] = AVAILABLE_GROUPS[button.groupId] || []).push(button); + } + if (defaultPosition) { + const navbar = DEFAULTS.navbar; + switch (defaultPosition) { + case "start": + navbar.unshift(button.id); + break; + case "end": + navbar.push(button.id); + break; + default: { + const [id, pos] = defaultPosition.split(":"); + const idx = navbar.indexOf(id); + if (!id || !pos || idx === -1) { + throw new PSVError(`Invalid defaultPosition ${defaultPosition}`); + } + navbar.splice(idx + (pos === "right" ? 1 : 0), 0, button.id); + } + } + } + } + [ + ZoomOutButton, + ZoomRangeButton, + ZoomInButton, + DescriptionButton, + NavbarCaption, + DownloadButton, + FullscreenButton, + MoveLeftButton, + MoveRightButton, + MoveUpButton, + MoveDownButton + ].forEach((btn) => registerButton(btn)); + var Navbar = class extends AbstractComponent { + /** + * @internal + */ + constructor(viewer) { + super(viewer, { + className: `psv-navbar ${CAPTURE_EVENTS_CLASS}` + }); + /** + * @internal + */ + this.collapsed = []; + this.state.visible = false; + } + /** + * Shows the navbar + */ + show() { + this.viewer.container.classList.add("psv--has-navbar"); + this.container.classList.add("psv-navbar--open"); + this.state.visible = true; + } + /** + * Hides the navbar + */ + hide() { + this.viewer.container.classList.remove("psv--has-navbar"); + this.container.classList.remove("psv-navbar--open"); + this.state.visible = false; + } + /** + * Change the buttons visible on the navbar + */ + setButtons(buttons) { + this.children.slice().forEach((item) => item.destroy()); + this.children.length = 0; + if (buttons.indexOf(NavbarCaption.id) !== -1 && buttons.indexOf(DescriptionButton.id) === -1) { + buttons.splice(buttons.indexOf(NavbarCaption.id), 0, DescriptionButton.id); + } + buttons.forEach((button) => { + if (typeof button === "object") { + new CustomButton(this, button); + } else if (AVAILABLE_BUTTONS[button]) { + new AVAILABLE_BUTTONS[button](this); + } else if (AVAILABLE_GROUPS[button]) { + AVAILABLE_GROUPS[button].forEach((buttonCtor) => { + new buttonCtor(this); + }); + } else { + logWarn(`Unknown button ${button}`); + } + }); + new MenuButton(this); + this.children.forEach((item) => { + if (item instanceof AbstractButton) { + item.checkSupported(); + } + }); + this.autoSize(); + } + /** + * Changes the navbar caption + */ + setCaption(html) { + this.children.some((item) => { + if (item instanceof NavbarCaption) { + item.setCaption(html); + return true; + } else { + return false; + } + }); + } + /** + * Returns a button by its identifier + */ + getButton(id, warnNotFound = true) { + const button = this.children.find((item) => { + return item instanceof AbstractButton && item.id === id; + }); + if (!button && warnNotFound) { + logWarn(`button "${id}" not found in the navbar`); + } + return button; + } + /** + * Automatically collapses buttons + * @internal + */ + autoSize() { + this.children.forEach((child) => { + if (child instanceof AbstractButton) { + child.autoSize(); + } + }); + const availableWidth = this.container.offsetWidth; + let totalWidth = 0; + const collapsableButtons = []; + this.children.forEach((item) => { + if (item.isVisible() && item instanceof AbstractButton) { + totalWidth += item.width; + if (item.collapsable) { + collapsableButtons.push(item); + } + } + }); + if (totalWidth === 0) { + return; + } + if (availableWidth < totalWidth && collapsableButtons.length > 0) { + collapsableButtons.forEach((item) => item.collapse()); + this.collapsed = collapsableButtons; + this.getButton(MenuButton.id).show(false); + } else if (availableWidth >= totalWidth && this.collapsed.length > 0) { + this.collapsed.forEach((item) => item.uncollapse()); + this.collapsed = []; + this.getButton(MenuButton.id).hide(false); + } + this.getButton(NavbarCaption.id, false)?.autoSize(); + } + }; + + // src/data/cache.ts + var import_three5 = require_three(); + import_three5.Cache.enabled = false; + var Cache = { + enabled: true, + maxItems: 10, + ttl: 10 * 60, + items: {}, + purgeInterval: null, + init() { + if (import_three5.Cache.enabled) { + logWarn("ThreeJS cache should be disabled"); + import_three5.Cache.enabled = false; + } + if (!this.purgeInterval && this.enabled) { + this.purgeInterval = setInterval(() => this.purge(), 60 * 1e3); + } + }, + add(url, key, data) { + if (this.enabled && key) { + this.items[key] = this.items[key] ?? { files: {}, lastAccess: null }; + this.items[key].files[url] = data; + this.items[key].lastAccess = Date.now(); + } + }, + get(url, key) { + if (this.enabled && key && this.items[key]) { + this.items[key].lastAccess = Date.now(); + return this.items[key].files[url]; + } + }, + remove(url, key) { + if (this.enabled && key && this.items[key]) { + delete this.items[key].files[url]; + if (Object.keys(this.items[key].files).length === 0) { + delete this.items[key]; + } + } + }, + purge() { + Object.entries(this.items).sort(([, a], [, b]) => { + return b.lastAccess - a.lastAccess; + }).forEach(([key, { lastAccess }], index) => { + if (index > 0 && (Date.now() - lastAccess >= this.ttl * 1e3 || index >= this.maxItems)) { + delete this.items[key]; + } + }); + } + }; + + // src/components/Loader.ts + var Loader = class extends AbstractComponent { + /** + * @internal + */ + constructor(viewer) { + super(viewer, { className: "psv-loader-container" }); + this.loader = document.createElement("div"); + this.loader.className = "psv-loader"; + this.container.appendChild(this.loader); + this.size = this.loader.offsetWidth; + this.canvas = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + this.canvas.setAttribute("class", "psv-loader-canvas"); + this.canvas.setAttribute("viewBox", `0 0 ${this.size} ${this.size}`); + this.loader.appendChild(this.canvas); + this.textColor = getStyleProperty(this.loader, "color"); + this.color = getStyleProperty(this.canvas, "color"); + this.border = parseInt(getStyleProperty(this.loader, "--psv-loader-border"), 10); + this.thickness = parseInt(getStyleProperty(this.loader, "--psv-loader-tickness"), 10); + this.viewer.addEventListener(ConfigChangedEvent.type, this); + this.__updateContent(); + this.hide(); + } + /** + * @internal + */ + destroy() { + this.viewer.removeEventListener(ConfigChangedEvent.type, this); + super.destroy(); + } + /** + * @internal + */ + handleEvent(e) { + if (e instanceof ConfigChangedEvent) { + e.containsOptions("loadingImg", "loadingTxt") && this.__updateContent(); + } + } + /** + * Sets the loader progression + */ + setProgress(value) { + const angle2 = Math.min(value, 99.999) / 100 * Math.PI * 2; + const halfSize = this.size / 2; + const startX = halfSize; + const startY = this.thickness / 2 + this.border; + const radius = (this.size - this.thickness) / 2 - this.border; + const endX = Math.sin(angle2) * radius + halfSize; + const endY = -Math.cos(angle2) * radius + halfSize; + const largeArc = value > 50 ? "1" : "0"; + this.canvas.innerHTML = ` + + + `; + this.viewer.dispatchEvent(new LoadProgressEvent(Math.round(value))); + } + __updateContent() { + const current = this.loader.querySelector(".psv-loader-image, .psv-loader-text"); + if (current) { + this.loader.removeChild(current); + } + let inner; + if (this.viewer.config.loadingImg) { + inner = document.createElement("img"); + inner.className = "psv-loader-image"; + inner.src = this.viewer.config.loadingImg; + } else if (this.viewer.config.loadingTxt !== null) { + inner = document.createElement("div"); + inner.className = "psv-loader-text"; + inner.innerHTML = this.viewer.config.loadingTxt || this.viewer.config.lang.loading; + } + if (inner) { + const size = Math.round(Math.sqrt(2 * Math.pow(this.size / 2 - this.thickness / 2 - this.border, 2))); + inner.style.maxWidth = size + "px"; + inner.style.maxHeight = size + "px"; + this.loader.appendChild(inner); + } + } + }; + + // src/components/Notification.ts + var Notification = class extends AbstractComponent { + /** + * @internal + */ + constructor(viewer) { + super(viewer, { + className: "psv-notification" + }); + /** + * @internal + */ + this.state = { + visible: false, + contentId: null, + timeout: null + }; + this.content = document.createElement("div"); + this.content.className = "psv-notification-content"; + this.container.appendChild(this.content); + this.content.addEventListener("click", () => this.hide()); + } + /** + * Checks if the notification is visible + */ + isVisible(id) { + return this.state.visible && (!id || !this.state.contentId || this.state.contentId === id); + } + /** + * @throws {@link PSVError} always + * @internal + */ + toggle() { + throw new PSVError("Notification cannot be toggled"); + } + /** + * Displays a notification on the viewer + * + * @example + * viewer.showNotification({ content: 'Hello world', timeout: 5000 }) + * @example + * viewer.showNotification('Hello world') + */ + show(config) { + if (this.state.timeout) { + clearTimeout(this.state.timeout); + this.state.timeout = null; + } + if (typeof config === "string") { + config = { content: config }; + } + this.state.contentId = config.id || null; + this.content.innerHTML = config.content; + this.container.classList.add("psv-notification--visible"); + this.state.visible = true; + this.viewer.dispatchEvent(new ShowNotificationEvent(config.id)); + if (config.timeout) { + this.state.timeout = setTimeout(() => this.hide(this.state.contentId), config.timeout); + } + } + /** + * Hides the notification + */ + hide(id) { + if (this.isVisible(id)) { + const contentId = this.state.contentId; + this.container.classList.remove("psv-notification--visible"); + this.state.visible = false; + this.state.contentId = null; + this.viewer.dispatchEvent(new HideNotificationEvent(contentId)); + } + } + }; + + // src/components/Overlay.ts + var Overlay = class extends AbstractComponent { + /** + * @internal + */ + constructor(viewer) { + super(viewer, { + className: `psv-overlay ${CAPTURE_EVENTS_CLASS}` + }); + /** + * @internal + */ + this.state = { + visible: false, + contentId: null, + dissmisable: true + }; + this.image = document.createElement("div"); + this.image.className = "psv-overlay-image"; + this.container.appendChild(this.image); + this.title = document.createElement("div"); + this.title.className = "psv-overlay-title"; + this.container.appendChild(this.title); + this.text = document.createElement("div"); + this.text.className = "psv-overlay-text"; + this.container.appendChild(this.text); + this.container.addEventListener("click", this); + this.viewer.addEventListener(KeypressEvent.type, this); + super.hide(); + } + /** + * @internal + */ + destroy() { + this.viewer.removeEventListener(KeypressEvent.type, this); + super.destroy(); + } + /** + * @internal + */ + handleEvent(e) { + if (e.type === "click") { + if (this.isVisible() && this.state.dissmisable) { + this.hide(); + e.stopPropagation(); + } + } else if (e instanceof KeypressEvent) { + if (this.isVisible() && this.state.dissmisable && e.key === KEY_CODES.Escape) { + this.hide(); + e.preventDefault(); + } + } + } + /** + * Checks if the overlay is visible + */ + isVisible(id) { + return this.state.visible && (!id || !this.state.contentId || this.state.contentId === id); + } + /** + * @throws {@link PSVError} always + * @internal + */ + toggle() { + throw new PSVError("Overlay cannot be toggled"); + } + /** + * Displays an overlay on the viewer + */ + show(config) { + if (typeof config === "string") { + config = { title: config }; + } + this.state.contentId = config.id || null; + this.state.dissmisable = config.dissmisable !== false; + this.image.innerHTML = config.image || ""; + this.title.innerHTML = config.title || ""; + this.text.innerHTML = config.text || ""; + super.show(); + this.viewer.dispatchEvent(new ShowOverlayEvent(config.id)); + } + /** + * Hides the overlay + */ + hide(id) { + if (this.isVisible(id)) { + const contentId = this.state.contentId; + super.hide(); + this.state.contentId = null; + this.viewer.dispatchEvent(new HideOverlayEvent(contentId)); + } + } + }; + + // src/components/Panel.ts + var PANEL_MIN_WIDTH = 200; + var PANEL_CLASS_NO_INTERACTION = "psv-panel-content--no-interaction"; + var Panel = class extends AbstractComponent { + /** + * @internal + */ + constructor(viewer) { + super(viewer, { + className: `psv-panel ${CAPTURE_EVENTS_CLASS}` + }); + /** + * @internal + */ + this.state = { + visible: false, + contentId: null, + mouseX: 0, + mouseY: 0, + mousedown: false, + clickHandler: null, + keyHandler: null, + width: {} + }; + const resizer = document.createElement("div"); + resizer.className = "psv-panel-resizer"; + this.container.appendChild(resizer); + const closeBtn = document.createElement("div"); + closeBtn.className = "psv-panel-close-button"; + closeBtn.innerHTML = ICONS.close; + closeBtn.title = viewer.config.lang.close; + this.container.appendChild(closeBtn); + this.content = document.createElement("div"); + this.content.className = "psv-panel-content"; + this.container.appendChild(this.content); + this.container.addEventListener("wheel", (e) => e.stopPropagation()); + closeBtn.addEventListener("click", () => this.hide()); + resizer.addEventListener("mousedown", this); + resizer.addEventListener("touchstart", this); + this.viewer.container.addEventListener("mouseup", this); + this.viewer.container.addEventListener("touchend", this); + this.viewer.container.addEventListener("mousemove", this); + this.viewer.container.addEventListener("touchmove", this); + this.viewer.addEventListener(KeypressEvent.type, this); + } + /** + * @internal + */ + destroy() { + this.viewer.removeEventListener(KeypressEvent.type, this); + this.viewer.container.removeEventListener("mousemove", this); + this.viewer.container.removeEventListener("touchmove", this); + this.viewer.container.removeEventListener("mouseup", this); + this.viewer.container.removeEventListener("touchend", this); + super.destroy(); + } + /** + * @internal + */ + handleEvent(e) { + switch (e.type) { + case "mousedown": + this.__onMouseDown(e); + break; + case "touchstart": + this.__onTouchStart(e); + break; + case "mousemove": + this.__onMouseMove(e); + break; + case "touchmove": + this.__onTouchMove(e); + break; + case "mouseup": + this.__onMouseUp(e); + break; + case "touchend": + this.__onTouchEnd(e); + break; + case KeypressEvent.type: + this.__onKeyPress(e); + break; + } + } + /** + * Checks if the panel is visible + */ + isVisible(id) { + return this.state.visible && (!id || !this.state.contentId || this.state.contentId === id); + } + /** + * @throws {@link PSVError} always + * @internal + */ + toggle() { + throw new PSVError("Panel cannot be toggled"); + } + /** + * Shows the panel + */ + show(config) { + if (typeof config === "string") { + config = { content: config }; + } + const wasVisible = this.isVisible(config.id); + this.state.contentId = config.id || null; + this.state.visible = true; + if (this.state.clickHandler) { + this.content.removeEventListener("click", this.state.clickHandler); + this.content.removeEventListener("keydown", this.state.keyHandler); + this.state.clickHandler = null; + this.state.keyHandler = null; + } + if (config.id && this.state.width[config.id]) { + this.container.style.width = this.state.width[config.id]; + } else if (config.width) { + this.container.style.width = config.width; + } else { + this.container.style.width = null; + } + this.content.innerHTML = config.content; + this.content.scrollTop = 0; + this.container.classList.add("psv-panel--open"); + toggleClass(this.content, "psv-panel-content--no-margin", config.noMargin === true); + if (config.clickHandler) { + this.state.clickHandler = (e) => { + config.clickHandler(e.target); + }; + this.state.keyHandler = (e) => { + if (e.key === KEY_CODES.Enter) { + config.clickHandler(e.target); + } + }; + this.content.addEventListener("click", this.state.clickHandler); + this.content.addEventListener("keydown", this.state.keyHandler); + if (!wasVisible) { + setTimeout(() => { + this.content.querySelector("a,button,[tabindex]")?.focus(); + }, 300); + } + } + this.viewer.dispatchEvent(new ShowPanelEvent(config.id)); + } + /** + * Hides the panel + */ + hide(id) { + if (this.isVisible(id)) { + const contentId = this.state.contentId; + this.state.visible = false; + this.state.contentId = null; + this.content.innerHTML = null; + this.container.classList.remove("psv-panel--open"); + if (this.state.clickHandler) { + this.content.removeEventListener("click", this.state.clickHandler); + this.state.clickHandler = null; + } + this.viewer.dispatchEvent(new HidePanelEvent(contentId)); + } + } + __onMouseDown(evt) { + evt.stopPropagation(); + this.__startResize(evt.clientX, evt.clientY); + } + __onTouchStart(evt) { + evt.stopPropagation(); + if (evt.touches.length === 1) { + const touch = evt.touches[0]; + this.__startResize(touch.clientX, touch.clientY); + } + } + __onMouseUp(evt) { + if (this.state.mousedown) { + evt.stopPropagation(); + this.state.mousedown = false; + this.content.classList.remove(PANEL_CLASS_NO_INTERACTION); + } + } + __onTouchEnd(evt) { + if (this.state.mousedown) { + evt.stopPropagation(); + if (evt.touches.length === 0) { + this.state.mousedown = false; + this.content.classList.remove(PANEL_CLASS_NO_INTERACTION); + } + } + } + __onMouseMove(evt) { + if (this.state.mousedown) { + evt.stopPropagation(); + this.__resize(evt.clientX, evt.clientY); + } + } + __onTouchMove(evt) { + if (this.state.mousedown) { + const touch = evt.touches[0]; + this.__resize(touch.clientX, touch.clientY); + } + } + __onKeyPress(evt) { + if (this.isVisible() && evt.key === KEY_CODES.Escape) { + this.hide(); + evt.preventDefault(); + } + } + __startResize(clientX, clientY) { + this.state.mouseX = clientX; + this.state.mouseY = clientY; + this.state.mousedown = true; + this.content.classList.add(PANEL_CLASS_NO_INTERACTION); + } + __resize(clientX, clientY) { + const x = clientX; + const y = clientY; + const width = Math.max(PANEL_MIN_WIDTH, this.container.offsetWidth - (x - this.state.mouseX)) + "px"; + if (this.state.contentId) { + this.state.width[this.state.contentId] = width; + } + this.container.style.width = width; + this.state.mouseX = x; + this.state.mouseY = y; + } + }; + + // src/components/Tooltip.ts + var Tooltip = class extends AbstractComponent { + /** + * @internal + */ + constructor(viewer, config) { + super(viewer, { + className: "psv-tooltip" + }); + /** + * @internal + */ + this.state = { + visible: true, + arrow: 0, + border: 0, + state: 0 /* NONE */, + width: 0, + height: 0, + pos: "", + config: null, + data: null + }; + this.content = document.createElement("div"); + this.content.className = "psv-tooltip-content"; + this.container.appendChild(this.content); + this.arrow = document.createElement("div"); + this.arrow.className = "psv-tooltip-arrow"; + this.container.appendChild(this.arrow); + this.container.addEventListener("transitionend", this); + this.container.addEventListener("touchdown", (e) => e.stopPropagation()); + this.container.addEventListener("mousedown", (e) => e.stopPropagation()); + this.container.style.top = "-1000px"; + this.container.style.left = "-1000px"; + this.show(config); + } + /** + * @internal + */ + handleEvent(e) { + if (e.type === "transitionend") { + this.__onTransitionEnd(e); + } + } + /** + * @internal + */ + destroy() { + delete this.state.data; + super.destroy(); + } + /** + * @throws {@link PSVError} always + * @internal + */ + toggle() { + throw new PSVError("Tooltip cannot be toggled"); + } + /** + * Displays the tooltip on the viewer + * @internal + */ + show(config) { + if (this.state.state !== 0 /* NONE */) { + throw new PSVError("Initialized tooltip cannot be re-initialized"); + } + if (config.className) { + addClasses(this.container, config.className); + } + if (config.style) { + Object.assign(this.container.style, config.style); + } + this.state.state = 3 /* READY */; + this.update(config.content, config); + this.state.data = config.data; + this.state.state = 1 /* SHOWING */; + this.viewer.dispatchEvent(new ShowTooltipEvent(this, this.state.data)); + this.__waitImages(); + } + /** + * Updates the content of the tooltip, optionally with a new position + * @throws {@link PSVError} if the configuration is invalid + */ + update(content, config) { + this.content.innerHTML = content; + const rect = this.container.getBoundingClientRect(); + this.state.width = rect.right - rect.left; + this.state.height = rect.bottom - rect.top; + this.state.arrow = parseInt(getStyleProperty(this.arrow, "border-top-width"), 10); + this.state.border = parseInt(getStyleProperty(this.container, "border-top-left-radius"), 10); + this.move(config ?? this.state.config); + this.__waitImages(); + } + /** + * Moves the tooltip to a new position + * @throws {@link PSVError} if the configuration is invalid + */ + move(config) { + if (this.state.state !== 1 /* SHOWING */ && this.state.state !== 3 /* READY */) { + throw new PSVError("Uninitialized tooltip cannot be moved"); + } + config.box = config.box ?? this.state.config?.box ?? { width: 0, height: 0 }; + this.state.config = config; + const t = this.container; + const a = this.arrow; + const style = { + posClass: cleanCssPosition(config.position, { allowCenter: false, cssOrder: false }) || ["top", "center"], + width: this.state.width, + height: this.state.height, + top: 0, + left: 0, + arrowTop: 0, + arrowLeft: 0 + }; + this.__computeTooltipPosition(style, config); + let swapY = null; + let swapX = null; + if (style.top < 0) { + swapY = "bottom"; + } else if (style.top + style.height > this.viewer.state.size.height) { + swapY = "top"; + } + if (style.left < 0) { + swapX = "right"; + } else if (style.left + style.width > this.viewer.state.size.width) { + swapX = "left"; + } + if (swapX || swapY) { + const ordered = cssPositionIsOrdered(style.posClass); + if (swapY) { + style.posClass[ordered ? 0 : 1] = swapY; + } + if (swapX) { + style.posClass[ordered ? 1 : 0] = swapX; + } + this.__computeTooltipPosition(style, config); + } + t.style.top = style.top + "px"; + t.style.left = style.left + "px"; + a.style.top = style.arrowTop + "px"; + a.style.left = style.arrowLeft + "px"; + const newPos = style.posClass.join("-"); + if (newPos !== this.state.pos) { + t.classList.remove(`psv-tooltip--${this.state.pos}`); + this.state.pos = newPos; + t.classList.add(`psv-tooltip--${this.state.pos}`); + } + } + /** + * Hides the tooltip + */ + hide() { + this.container.classList.remove("psv-tooltip--visible"); + this.state.state = 2 /* HIDING */; + this.viewer.dispatchEvent(new HideTooltipEvent(this.state.data)); + } + /** + * Finalize transition + */ + __onTransitionEnd(e) { + if (e.propertyName === "transform") { + switch (this.state.state) { + case 1 /* SHOWING */: + this.container.classList.add("psv-tooltip--visible"); + this.state.state = 3 /* READY */; + break; + case 2 /* HIDING */: + this.state.state = 0 /* NONE */; + this.destroy(); + break; + default: + } + } + } + /** + * Computes the position of the tooltip and its arrow + */ + __computeTooltipPosition(style, config) { + const arrow = this.state.arrow; + const top = config.top; + const height = style.height; + const left = config.left; + const width = style.width; + const offsetSide = arrow + this.state.border; + const offsetX = config.box.width / 2 + arrow * 2; + const offsetY = config.box.height / 2 + arrow * 2; + switch (style.posClass.join("-")) { + case "top-left": + style.top = top - offsetY - height; + style.left = left + offsetSide - width; + style.arrowTop = height; + style.arrowLeft = width - offsetSide - arrow; + break; + case "top-center": + style.top = top - offsetY - height; + style.left = left - width / 2; + style.arrowTop = height; + style.arrowLeft = width / 2 - arrow; + break; + case "top-right": + style.top = top - offsetY - height; + style.left = left - offsetSide; + style.arrowTop = height; + style.arrowLeft = arrow; + break; + case "bottom-left": + style.top = top + offsetY; + style.left = left + offsetSide - width; + style.arrowTop = -arrow * 2; + style.arrowLeft = width - offsetSide - arrow; + break; + case "bottom-center": + style.top = top + offsetY; + style.left = left - width / 2; + style.arrowTop = -arrow * 2; + style.arrowLeft = width / 2 - arrow; + break; + case "bottom-right": + style.top = top + offsetY; + style.left = left - offsetSide; + style.arrowTop = -arrow * 2; + style.arrowLeft = arrow; + break; + case "left-top": + style.top = top + offsetSide - height; + style.left = left - offsetX - width; + style.arrowTop = height - offsetSide - arrow; + style.arrowLeft = width; + break; + case "center-left": + style.top = top - height / 2; + style.left = left - offsetX - width; + style.arrowTop = height / 2 - arrow; + style.arrowLeft = width; + break; + case "left-bottom": + style.top = top - offsetSide; + style.left = left - offsetX - width; + style.arrowTop = arrow; + style.arrowLeft = width; + break; + case "right-top": + style.top = top + offsetSide - height; + style.left = left + offsetX; + style.arrowTop = height - offsetSide - arrow; + style.arrowLeft = -arrow * 2; + break; + case "center-right": + style.top = top - height / 2; + style.left = left + offsetX; + style.arrowTop = height / 2 - arrow; + style.arrowLeft = -arrow * 2; + break; + case "right-bottom": + style.top = top - offsetSide; + style.left = left + offsetX; + style.arrowTop = arrow; + style.arrowLeft = -arrow * 2; + break; + } + } + /** + * If the tooltip contains images, recompute its size once they are loaded + */ + __waitImages() { + const images = this.content.querySelectorAll("img"); + if (images.length > 0) { + const promises = []; + images.forEach((image) => { + if (!image.complete) { + promises.push( + new Promise((resolve) => { + image.onload = resolve; + image.onerror = resolve; + }) + ); + } + }); + if (promises.length) { + Promise.all(promises).then(() => { + if (this.state.state === 1 /* SHOWING */ || this.state.state === 3 /* READY */) { + const rect = this.container.getBoundingClientRect(); + this.state.width = rect.right - rect.left; + this.state.height = rect.bottom - rect.top; + this.move(this.state.config); + } + }); + } + } + } + }; + + // src/icons/error.svg + var error_default = '\n'; + + // src/services/DataHelper.ts + var import_three6 = require_three(); + + // src/services/AbstractService.ts + var AbstractService = class { + /** + * @internal + */ + constructor(viewer) { + this.viewer = viewer; + this.config = viewer.config; + this.state = viewer.state; + } + /** + * Destroys the service + * @internal + */ + // eslint-disable-next-line @typescript-eslint/no-empty-function + destroy() { + } + }; + + // src/services/DataHelper.ts + var vector3 = new import_three6.Vector3(); + var EULER_ZERO = new import_three6.Euler(0, 0, 0, "ZXY"); + var DataHelper = class extends AbstractService { + /** + * @internal + */ + constructor(viewer) { + super(viewer); + } + /** + * Converts vertical FOV to zoom level + */ + fovToZoomLevel(fov) { + const temp = Math.round((fov - this.config.minFov) / (this.config.maxFov - this.config.minFov) * 100); + return temp - 2 * (temp - 50); + } + /** + * Converts zoom level to vertical FOV + */ + zoomLevelToFov(level) { + return this.config.maxFov + level / 100 * (this.config.minFov - this.config.maxFov); + } + /** + * Converts vertical FOV to horizontal FOV + */ + vFovToHFov(vFov) { + return import_three6.MathUtils.radToDeg(2 * Math.atan(Math.tan(import_three6.MathUtils.degToRad(vFov) / 2) * this.state.aspect)); + } + /** + * @internal + */ + getAnimationProperties(speed, targetPosition, targetZoom) { + const positionProvided = !isNil(targetPosition); + const zoomProvided = !isNil(targetZoom); + const properties = {}; + let duration = null; + if (positionProvided) { + const currentPosition = this.viewer.getPosition(); + const dYaw = getShortestArc(currentPosition.yaw, targetPosition.yaw); + properties.yaw = { start: currentPosition.yaw, end: currentPosition.yaw + dYaw }; + properties.pitch = { start: currentPosition.pitch, end: targetPosition.pitch }; + duration = speedToDuration(speed, getAngle(currentPosition, targetPosition)); + } + if (zoomProvided) { + const currentZoom = this.viewer.getZoomLevel(); + const dZoom = Math.abs(targetZoom - currentZoom); + properties.zoom = { start: currentZoom, end: targetZoom }; + if (duration === null) { + duration = speedToDuration(speed, Math.PI / 4 * dZoom / 100); + } + } + if (duration === null) { + if (typeof speed === "number") { + duration = speed; + } else { + duration = ANIMATION_MIN_DURATION; + } + } else { + duration = Math.max(ANIMATION_MIN_DURATION, duration); + } + return { duration, properties }; + } + /** + * Converts pixel texture coordinates to spherical radians coordinates + * @throws {@link PSVError} when the current adapter does not support texture coordinates + */ + textureCoordsToSphericalCoords(point) { + if (!this.state.textureData?.panoData) { + throw new PSVError("Current adapter does not support texture coordinates or no texture has been loaded"); + } + const result = this.viewer.adapter.textureCoordsToSphericalCoords(point, this.state.textureData.panoData); + if (!EULER_ZERO.equals(this.viewer.renderer.panoramaPose) || !EULER_ZERO.equals(this.viewer.renderer.sphereCorrection)) { + this.sphericalCoordsToVector3(result, vector3); + vector3.applyEuler(this.viewer.renderer.panoramaPose); + vector3.applyEuler(this.viewer.renderer.sphereCorrection); + return this.vector3ToSphericalCoords(vector3); + } else { + return result; + } + } + /** + * Converts spherical radians coordinates to pixel texture coordinates + * @throws {@link PSVError} when the current adapter does not support texture coordinates + */ + sphericalCoordsToTextureCoords(position) { + if (!this.state.textureData?.panoData) { + throw new PSVError("Current adapter does not support texture coordinates or no texture has been loaded"); + } + if (!EULER_ZERO.equals(this.viewer.renderer.panoramaPose) || !EULER_ZERO.equals(this.viewer.renderer.sphereCorrection)) { + this.sphericalCoordsToVector3(position, vector3); + applyEulerInverse(vector3, this.viewer.renderer.sphereCorrection); + applyEulerInverse(vector3, this.viewer.renderer.panoramaPose); + position = this.vector3ToSphericalCoords(vector3); + } + return this.viewer.adapter.sphericalCoordsToTextureCoords(position, this.state.textureData.panoData); + } + /** + * Converts spherical radians coordinates to a Vector3 + */ + sphericalCoordsToVector3(position, vector, distance2 = SPHERE_RADIUS) { + if (!vector) { + vector = new import_three6.Vector3(); + } + vector.x = distance2 * -Math.cos(position.pitch) * Math.sin(position.yaw); + vector.y = distance2 * Math.sin(position.pitch); + vector.z = distance2 * Math.cos(position.pitch) * Math.cos(position.yaw); + return vector; + } + /** + * Converts a Vector3 to spherical radians coordinates + */ + vector3ToSphericalCoords(vector) { + const phi = Math.acos(vector.y / Math.sqrt(vector.x * vector.x + vector.y * vector.y + vector.z * vector.z)); + const theta = Math.atan2(vector.x, vector.z); + return { + yaw: theta < 0 ? -theta : Math.PI * 2 - theta, + pitch: Math.PI / 2 - phi + }; + } + /** + * Converts position on the viewer to a THREE.Vector3 + */ + viewerCoordsToVector3(viewerPoint) { + const sphereIntersect = this.viewer.renderer.getIntersections(viewerPoint).filter((i) => i.object.userData[VIEWER_DATA]); + if (sphereIntersect.length) { + return sphereIntersect[0].point; + } else { + return null; + } + } + /** + * Converts position on the viewer to spherical radians coordinates + */ + viewerCoordsToSphericalCoords(viewerPoint) { + const vector = this.viewerCoordsToVector3(viewerPoint); + return vector ? this.vector3ToSphericalCoords(vector) : null; + } + /** + * Converts a Vector3 to position on the viewer + */ + vector3ToViewerCoords(vector) { + const vectorClone = vector.clone(); + vectorClone.project(this.viewer.renderer.camera); + return { + x: Math.round((vectorClone.x + 1) / 2 * this.state.size.width), + y: Math.round((1 - vectorClone.y) / 2 * this.state.size.height) + }; + } + /** + * Converts spherical radians coordinates to position on the viewer + */ + sphericalCoordsToViewerCoords(position) { + this.sphericalCoordsToVector3(position, vector3); + return this.vector3ToViewerCoords(vector3); + } + /** + * @internal + */ + isPointVisible(point) { + let vector; + let viewerPoint; + if (point instanceof import_three6.Vector3) { + vector = point; + viewerPoint = this.vector3ToViewerCoords(point); + } else if (isExtendedPosition(point)) { + vector = this.sphericalCoordsToVector3(point, vector3); + viewerPoint = this.vector3ToViewerCoords(vector); + } else { + return false; + } + return vector.dot(this.viewer.state.direction) > 0 && viewerPoint.x >= 0 && viewerPoint.x <= this.viewer.state.size.width && viewerPoint.y >= 0 && viewerPoint.y <= this.viewer.state.size.height; + } + /** + * Converts pixel position to angles if present and ensure boundaries + */ + cleanPosition(position) { + if ("yaw" in position || "pitch" in position) { + if (!("yaw" in position) || !("pitch" in position)) { + throw new PSVError(`Position is missing 'yaw' or 'pitch'`); + } + return { + yaw: parseAngle(position.yaw), + pitch: parseAngle(position.pitch, !this.state.littlePlanet) + }; + } else { + return this.textureCoordsToSphericalCoords(position); + } + } + /** + * Ensure a SphereCorrection object is valid + */ + cleanSphereCorrection(sphereCorrection) { + return { + pan: parseAngle(sphereCorrection?.pan || 0), + tilt: parseAngle(sphereCorrection?.tilt || 0, true), + roll: parseAngle(sphereCorrection?.roll || 0, true, false) + }; + } + /** + * Parse the pose angles of the pano data + */ + cleanPanoramaPose(panoData) { + return { + pan: import_three6.MathUtils.degToRad(panoData?.poseHeading || 0), + tilt: import_three6.MathUtils.degToRad(panoData?.posePitch || 0), + roll: import_three6.MathUtils.degToRad(panoData?.poseRoll || 0) + }; + } + }; + + // src/services/EventsHandler.ts + var import_three7 = require_three(); + + // src/icons/gesture.svg + var gesture_default = '\n'; + + // src/icons/mousewheel.svg + var mousewheel_default = '\n'; + + // src/services/EventsHandler.ts + var _Step = class _Step { + constructor() { + this.$ = _Step.IDLE; + } + is(...steps) { + return steps.some((step) => this.$ & step); + } + set(step) { + this.$ = step; + } + add(step) { + this.$ |= step; + } + remove(step) { + this.$ &= ~step; + } + }; + _Step.IDLE = 0; + _Step.CLICK = 1; + _Step.MOVING = 2; + _Step.INERTIA = 4; + var Step = _Step; + var EventsHandler = class extends AbstractService { + constructor(viewer) { + super(viewer); + this.data = { + /** start x position of the click/touch */ + startMouseX: 0, + /** start y position of the click/touch */ + startMouseY: 0, + /** current x position of the cursor */ + mouseX: 0, + /** current y position of the cursor */ + mouseY: 0, + /** list of latest positions of the cursor, [time, x, y] */ + mouseHistory: [], + /** distance between fingers when zooming */ + pinchDist: 0, + /** when the Ctrl key is pressed */ + ctrlKeyDown: false, + /** temporary storage of click data between two clicks */ + dblclickData: null, + dblclickTimeout: null, + longtouchTimeout: null, + twofingersTimeout: null, + ctrlZoomTimeout: null + }; + this.step = new Step(); + this.keyHandler = new PressHandler(); + this.resizeObserver = new ResizeObserver(throttle(() => this.viewer.autoSize(), 50)); + this.moveThreshold = MOVE_THRESHOLD * SYSTEM.pixelRatio; + } + /** + * @internal + */ + init() { + window.addEventListener("keydown", this, { passive: false }); + window.addEventListener("keyup", this); + this.viewer.container.addEventListener("mousedown", this); + window.addEventListener("mousemove", this, { passive: false }); + window.addEventListener("mouseup", this); + this.viewer.container.addEventListener("touchstart", this, { passive: false }); + window.addEventListener("touchmove", this, { passive: false }); + window.addEventListener("touchend", this, { passive: false }); + this.viewer.container.addEventListener("wheel", this, { passive: false }); + document.addEventListener(SYSTEM.fullscreenEvent, this); + this.resizeObserver.observe(this.viewer.container); + } + destroy() { + window.removeEventListener("keydown", this); + window.removeEventListener("keyup", this); + this.viewer.container.removeEventListener("mousedown", this); + window.removeEventListener("mousemove", this); + window.removeEventListener("mouseup", this); + this.viewer.container.removeEventListener("touchstart", this); + window.removeEventListener("touchmove", this); + window.removeEventListener("touchend", this); + this.viewer.container.removeEventListener("wheel", this); + document.removeEventListener(SYSTEM.fullscreenEvent, this); + this.resizeObserver.disconnect(); + clearTimeout(this.data.dblclickTimeout); + clearTimeout(this.data.longtouchTimeout); + clearTimeout(this.data.twofingersTimeout); + clearTimeout(this.data.ctrlZoomTimeout); + super.destroy(); + } + /** + * @internal + */ + handleEvent(evt) { + switch (evt.type) { + case "keydown": + this.__onKeyDown(evt); + break; + case "keyup": + this.__onKeyUp(); + break; + case "mousemove": + this.__onMouseMove(evt); + break; + case "mouseup": + this.__onMouseUp(evt); + break; + case "touchmove": + this.__onTouchMove(evt); + break; + case "touchend": + this.__onTouchEnd(evt); + break; + case SYSTEM.fullscreenEvent: + this.__onFullscreenChange(); + break; + } + if (!getClosest(evt.target, "." + CAPTURE_EVENTS_CLASS)) { + switch (evt.type) { + case "mousedown": + this.__onMouseDown(evt); + break; + case "touchstart": + this.__onTouchStart(evt); + break; + case "wheel": + this.__onMouseWheel(evt); + break; + } + } + } + /** + * Handles keyboard events + */ + __onKeyDown(e) { + if (this.config.mousewheelCtrlKey) { + this.data.ctrlKeyDown = e.key === KEY_CODES.Control; + if (this.data.ctrlKeyDown) { + clearTimeout(this.data.ctrlZoomTimeout); + this.viewer.overlay.hide(IDS.CTRL_ZOOM); + } + } + if (!this.viewer.dispatchEvent(new KeypressEvent(e.key))) { + return; + } + if (!this.state.keyboardEnabled) { + return; + } + const action = this.config.keyboardActions?.[e.key]; + if (typeof action === "function") { + action(this.viewer); + e.preventDefault(); + } else if (action && !this.keyHandler.pending) { + if (action !== "ZOOM_IN" /* ZOOM_IN */ && action !== "ZOOM_OUT" /* ZOOM_OUT */) { + this.viewer.stopAll(); + } + switch (action) { + case "ROTATE_UP" /* ROTATE_UP */: + this.viewer.dynamics.position.roll({ pitch: false }); + break; + case "ROTATE_DOWN" /* ROTATE_DOWN */: + this.viewer.dynamics.position.roll({ pitch: true }); + break; + case "ROTATE_RIGHT" /* ROTATE_RIGHT */: + this.viewer.dynamics.position.roll({ yaw: false }); + break; + case "ROTATE_LEFT" /* ROTATE_LEFT */: + this.viewer.dynamics.position.roll({ yaw: true }); + break; + case "ZOOM_IN" /* ZOOM_IN */: + this.viewer.dynamics.zoom.roll(false); + break; + case "ZOOM_OUT" /* ZOOM_OUT */: + this.viewer.dynamics.zoom.roll(true); + break; + } + this.keyHandler.down(); + e.preventDefault(); + } + } + /** + * Handles keyboard events + */ + __onKeyUp() { + this.data.ctrlKeyDown = false; + if (!this.state.keyboardEnabled) { + return; + } + this.keyHandler.up(() => { + this.viewer.dynamics.position.stop(); + this.viewer.dynamics.zoom.stop(); + this.viewer.resetIdleTimer(); + }); + } + /** + * Handles mouse down events + */ + __onMouseDown(evt) { + this.step.add(Step.CLICK); + this.data.startMouseX = evt.clientX; + this.data.startMouseY = evt.clientY; + } + /** + *Handles mouse up events + */ + __onMouseUp(evt) { + if (this.step.is(Step.CLICK, Step.MOVING)) { + this.__stopMove(evt.clientX, evt.clientY, evt.target, evt.button === 2); + } + } + /** + * Handles mouse move events + */ + __onMouseMove(evt) { + if (this.config.mousemove && this.step.is(Step.CLICK, Step.MOVING)) { + evt.preventDefault(); + this.__doMove(evt.clientX, evt.clientY); + } + this.__handleObjectsEvents(evt); + } + /** + * Handles touch events + */ + __onTouchStart(evt) { + if (evt.touches.length === 1) { + this.step.add(Step.CLICK); + this.data.startMouseX = evt.touches[0].clientX; + this.data.startMouseY = evt.touches[0].clientY; + if (!this.data.longtouchTimeout) { + this.data.longtouchTimeout = setTimeout(() => { + const touch = evt.touches[0]; + this.__stopMove(touch.clientX, touch.clientY, touch.target, true); + this.data.longtouchTimeout = null; + }, LONGTOUCH_DELAY); + } + } else if (evt.touches.length === 2) { + this.step.set(Step.IDLE); + this.__cancelLongTouch(); + if (this.config.mousemove) { + this.__cancelTwoFingersOverlay(); + this.__startMoveZoom(evt); + evt.preventDefault(); + } + } + } + /** + * Handles touch events + */ + __onTouchEnd(evt) { + this.__cancelLongTouch(); + if (this.step.is(Step.CLICK, Step.MOVING)) { + evt.preventDefault(); + this.__cancelTwoFingersOverlay(); + if (evt.touches.length === 1) { + this.__stopMove(this.data.mouseX, this.data.mouseY); + } else if (evt.touches.length === 0) { + const touch = evt.changedTouches[0]; + this.__stopMove(touch.clientX, touch.clientY, touch.target); + } + } + } + /** + * Handles touch move events + */ + __onTouchMove(evt) { + this.__cancelLongTouch(); + if (!this.config.mousemove) { + return; + } + if (evt.touches.length === 1) { + if (this.config.touchmoveTwoFingers) { + if (this.step.is(Step.CLICK) && !this.data.twofingersTimeout) { + this.data.twofingersTimeout = setTimeout(() => { + this.viewer.overlay.show({ + id: IDS.TWO_FINGERS, + image: gesture_default, + title: this.config.lang.twoFingers + }); + }, TWOFINGERSOVERLAY_DELAY); + } + } else if (this.step.is(Step.CLICK, Step.MOVING)) { + evt.preventDefault(); + const touch = evt.touches[0]; + this.__doMove(touch.clientX, touch.clientY); + } + } else { + this.__doMoveZoom(evt); + this.__cancelTwoFingersOverlay(); + } + } + /** + * Cancel the long touch timer if any + */ + __cancelLongTouch() { + if (this.data.longtouchTimeout) { + clearTimeout(this.data.longtouchTimeout); + this.data.longtouchTimeout = null; + } + } + /** + * Cancel the two fingers overlay timer if any + */ + __cancelTwoFingersOverlay() { + if (this.config.touchmoveTwoFingers) { + if (this.data.twofingersTimeout) { + clearTimeout(this.data.twofingersTimeout); + this.data.twofingersTimeout = null; + } + this.viewer.overlay.hide(IDS.TWO_FINGERS); + } + } + /** + * Handles mouse wheel events + */ + __onMouseWheel(evt) { + if (!this.config.mousewheel || !evt.deltaY) { + return; + } + if (this.config.mousewheelCtrlKey && !this.data.ctrlKeyDown) { + this.viewer.overlay.show({ + id: IDS.CTRL_ZOOM, + image: mousewheel_default, + title: this.config.lang.ctrlZoom + }); + clearTimeout(this.data.ctrlZoomTimeout); + this.data.ctrlZoomTimeout = setTimeout(() => this.viewer.overlay.hide(IDS.CTRL_ZOOM), CTRLZOOM_TIMEOUT); + return; + } + evt.preventDefault(); + evt.stopPropagation(); + const delta = evt.deltaY / Math.abs(evt.deltaY) * 5 * this.config.zoomSpeed; + if (delta !== 0) { + this.viewer.dynamics.zoom.step(-delta, 5); + } + } + /** + * Handles fullscreen events + */ + __onFullscreenChange() { + const fullscreen = this.viewer.isFullscreenEnabled(); + if (this.config.keyboard === "fullscreen") { + if (fullscreen) { + this.viewer.startKeyboardControl(); + } else { + this.viewer.stopKeyboardControl(); + } + } + this.viewer.dispatchEvent(new FullscreenEvent(fullscreen)); + } + /** + * Resets all state variables + */ + __resetMove() { + this.step.set(Step.IDLE); + this.data.mouseX = 0; + this.data.mouseY = 0; + this.data.startMouseX = 0; + this.data.startMouseY = 0; + this.data.mouseHistory.length = 0; + } + /** + * Initializes the combines move and zoom + */ + __startMoveZoom(evt) { + this.viewer.stopAll(); + this.__resetMove(); + const touchData = getTouchData(evt); + this.step.set(Step.MOVING); + ({ + distance: this.data.pinchDist, + center: { x: this.data.mouseX, y: this.data.mouseY } + } = touchData); + this.__logMouseMove(this.data.mouseX, this.data.mouseY); + } + /** + * Stops the movement + * @description If the move threshold was not reached a click event is triggered, otherwise an animation is launched to simulate inertia + */ + __stopMove(clientX, clientY, target, rightclick = false) { + if (this.step.is(Step.MOVING)) { + if (this.config.moveInertia) { + this.__logMouseMove(clientX, clientY); + this.__stopMoveInertia(clientX, clientY); + } else { + this.__resetMove(); + this.viewer.resetIdleTimer(); + } + } else { + if (this.step.is(Step.CLICK) && !this.__moveThresholdReached(clientX, clientY)) { + this.__doClick(clientX, clientY, target, rightclick); + } + this.step.remove(Step.CLICK); + if (!this.step.is(Step.INERTIA)) { + this.__resetMove(); + this.viewer.resetIdleTimer(); + } + } + } + /** + * Performs an animation to simulate inertia when the movement stops + */ + __stopMoveInertia(clientX, clientY) { + const curve = new import_three7.SplineCurve(this.data.mouseHistory.map(([, x, y]) => new import_three7.Vector2(x, y))); + const direction = curve.getTangent(1); + const speed = this.data.mouseHistory.reduce(({ total, prev }, curr) => ({ + total: !prev ? 0 : total + distance({ x: prev[1], y: prev[2] }, { x: curr[1], y: curr[2] }) / (curr[0] - prev[0]), + prev: curr + }), { + total: 0, + prev: null + }).total / this.data.mouseHistory.length; + if (!speed) { + this.__resetMove(); + this.viewer.resetIdleTimer(); + return; + } + this.step.set(Step.INERTIA); + let currentClientX = clientX; + let currentClientY = clientY; + this.state.animation = new Animation({ + properties: { + speed: { start: speed, end: 0 } + }, + duration: 1e3, + easing: "outQuad", + onTick: (properties) => { + currentClientX += properties.speed * direction.x * 3 * SYSTEM.pixelRatio; + currentClientY += properties.speed * direction.y * 3 * SYSTEM.pixelRatio; + this.__applyMove(currentClientX, currentClientY); + } + }); + this.state.animation.then((done) => { + this.state.animation = null; + if (done) { + this.__resetMove(); + this.viewer.resetIdleTimer(); + } + }); + } + /** + * Triggers an event with all coordinates when a simple click is performed + */ + __doClick(clientX, clientY, target, rightclick = false) { + const boundingRect = this.viewer.container.getBoundingClientRect(); + const viewerX = clientX - boundingRect.left; + const viewerY = clientY - boundingRect.top; + const intersections = this.viewer.renderer.getIntersections({ x: viewerX, y: viewerY }); + const sphereIntersection = intersections.find((i) => i.object.userData[VIEWER_DATA]); + if (sphereIntersection) { + const sphericalCoords = this.viewer.dataHelper.vector3ToSphericalCoords(sphereIntersection.point); + const data = { + rightclick, + target, + clientX, + clientY, + viewerX, + viewerY, + yaw: sphericalCoords.yaw, + pitch: sphericalCoords.pitch, + objects: intersections.map((i) => i.object).filter((o) => !o.userData[VIEWER_DATA]) + }; + try { + const textureCoords = this.viewer.dataHelper.sphericalCoordsToTextureCoords(data); + Object.assign(data, textureCoords); + } catch (e) { + } + if (!this.data.dblclickTimeout) { + this.viewer.dispatchEvent(new ClickEvent(data)); + this.data.dblclickData = clone(data); + this.data.dblclickTimeout = setTimeout(() => { + this.data.dblclickTimeout = null; + this.data.dblclickData = null; + }, DBLCLICK_DELAY); + } else { + if (Math.abs(this.data.dblclickData.clientX - data.clientX) < this.moveThreshold && Math.abs(this.data.dblclickData.clientY - data.clientY) < this.moveThreshold) { + this.viewer.dispatchEvent(new DoubleClickEvent(this.data.dblclickData)); + } + clearTimeout(this.data.dblclickTimeout); + this.data.dblclickTimeout = null; + this.data.dblclickData = null; + } + } + } + /** + * Trigger events for observed THREE objects + */ + __handleObjectsEvents(evt) { + if (!isEmpty(this.state.objectsObservers) && hasParent(evt.target, this.viewer.container)) { + const viewerPos = getPosition(this.viewer.container); + const viewerPoint = { + x: evt.clientX - viewerPos.x, + y: evt.clientY - viewerPos.y + }; + const intersections = this.viewer.renderer.getIntersections(viewerPoint); + const emit = (object, key, evtCtor) => { + this.viewer.dispatchEvent(new evtCtor(evt, object, viewerPoint, key)); + }; + for (const [key, object] of Object.entries(this.state.objectsObservers)) { + const intersection = intersections.find((i) => i.object.userData[key]); + if (intersection) { + if (object && intersection.object !== object) { + emit(object, key, ObjectLeaveEvent); + this.state.objectsObservers[key] = null; + } + if (!object) { + this.state.objectsObservers[key] = intersection.object; + emit(intersection.object, key, ObjectEnterEvent); + } else { + emit(intersection.object, key, ObjectHoverEvent); + } + } else if (object) { + emit(object, key, ObjectLeaveEvent); + this.state.objectsObservers[key] = null; + } + } + } + } + /** + * Starts moving when crossing moveThreshold and performs movement + */ + __doMove(clientX, clientY) { + if (this.step.is(Step.CLICK) && this.__moveThresholdReached(clientX, clientY)) { + this.viewer.stopAll(); + this.__resetMove(); + this.step.set(Step.MOVING); + this.data.mouseX = clientX; + this.data.mouseY = clientY; + this.__logMouseMove(clientX, clientY); + } else if (this.step.is(Step.MOVING)) { + this.__applyMove(clientX, clientY); + this.__logMouseMove(clientX, clientY); + } + } + /** + * Checks if the cursor was move beyond the move threshold + */ + __moveThresholdReached(clientX, clientY) { + return Math.abs(clientX - this.data.startMouseX) >= this.moveThreshold || Math.abs(clientY - this.data.startMouseY) >= this.moveThreshold; + } + /** + * Raw method for movement, called from mouse event and move inertia + */ + __applyMove(clientX, clientY) { + const x = (clientX - this.data.mouseX) * Math.cos(this.state.roll) - (clientY - this.data.mouseY) * Math.sin(this.state.roll); + const y = (clientY - this.data.mouseY) * Math.cos(this.state.roll) + (clientX - this.data.mouseX) * Math.sin(this.state.roll); + const rotation = { + yaw: this.config.moveSpeed * (x / this.state.size.width) * import_three7.MathUtils.degToRad(this.state.littlePlanet ? 90 : this.state.hFov), + pitch: this.config.moveSpeed * (y / this.state.size.height) * import_three7.MathUtils.degToRad(this.state.littlePlanet ? 90 : this.state.vFov) + }; + const currentPosition = this.viewer.getPosition(); + this.viewer.rotate({ + yaw: currentPosition.yaw - rotation.yaw, + pitch: currentPosition.pitch + rotation.pitch + }); + this.data.mouseX = clientX; + this.data.mouseY = clientY; + } + /** + * Perfoms combined move and zoom + */ + __doMoveZoom(evt) { + if (this.step.is(Step.MOVING)) { + evt.preventDefault(); + const touchData = getTouchData(evt); + const delta = (touchData.distance - this.data.pinchDist) / SYSTEM.pixelRatio * this.config.zoomSpeed; + this.viewer.zoom(this.viewer.getZoomLevel() + delta); + this.__doMove(touchData.center.x, touchData.center.y); + this.data.pinchDist = touchData.distance; + } + } + /** + * Stores each mouse position during a mouse move + * @description Positions older than "INERTIA_WINDOW" are removed
+ * Positions before a pause of "INERTIA_WINDOW" / 10 are removed + */ + __logMouseMove(clientX, clientY) { + const now = Date.now(); + const last = this.data.mouseHistory.length ? this.data.mouseHistory[this.data.mouseHistory.length - 1] : [0, -1, -1]; + if (last[1] === clientX && last[2] === clientY) { + last[0] = now; + } else if (now === last[0]) { + last[1] = clientX; + last[2] = clientY; + } else { + this.data.mouseHistory.push([now, clientX, clientY]); + } + let previous = null; + for (let i = 0; i < this.data.mouseHistory.length; ) { + if (this.data.mouseHistory[i][0] < now - INERTIA_WINDOW) { + this.data.mouseHistory.splice(i, 1); + } else if (previous && this.data.mouseHistory[i][0] - previous > INERTIA_WINDOW / 10) { + this.data.mouseHistory.splice(0, i); + i = 0; + previous = this.data.mouseHistory[i][0]; + } else { + previous = this.data.mouseHistory[i][0]; + i++; + } + } + } + }; + + // src/services/Renderer.ts + var import_three8 = require_three(); + import_three8.ColorManagement.enabled = false; + var vector2 = new import_three8.Vector2(); + var matrix4 = new import_three8.Matrix4(); + var box3 = new import_three8.Box3(); + var Renderer = class extends AbstractService { + /** + * @internal + */ + constructor(viewer) { + super(viewer); + this.frustumNeedsUpdate = true; + this.renderer = new import_three8.WebGLRenderer(this.config.rendererParameters); + this.renderer.setPixelRatio(SYSTEM.pixelRatio); + this.renderer.outputColorSpace = import_three8.LinearSRGBColorSpace; + this.renderer.domElement.className = "psv-canvas"; + this.scene = new import_three8.Scene(); + this.camera = new import_three8.PerspectiveCamera(50, 16 / 9, 0.1, 2 * SPHERE_RADIUS); + this.camera.matrixWorldAutoUpdate = false; + this.mesh = this.viewer.adapter.createMesh(); + this.mesh.userData = { [VIEWER_DATA]: true }; + this.meshContainer = new import_three8.Group(); + this.meshContainer.add(this.mesh); + this.scene.add(this.meshContainer); + this.raycaster = new import_three8.Raycaster(); + this.frustum = new import_three8.Frustum(); + this.container = document.createElement("div"); + this.container.className = "psv-canvas-container"; + this.container.appendChild(this.renderer.domElement); + this.viewer.container.appendChild(this.container); + this.viewer.addEventListener(SizeUpdatedEvent.type, this); + this.viewer.addEventListener(ZoomUpdatedEvent.type, this); + this.viewer.addEventListener(PositionUpdatedEvent.type, this); + this.viewer.addEventListener(RollUpdatedEvent.type, this); + this.viewer.addEventListener(ConfigChangedEvent.type, this); + this.hide(); + } + get panoramaPose() { + return this.mesh.rotation; + } + get sphereCorrection() { + return this.meshContainer.rotation; + } + /** + * @internal + */ + init() { + this.show(); + this.renderer.setAnimationLoop((t) => this.__renderLoop(t)); + } + /** + * @internal + */ + destroy() { + this.renderer.setAnimationLoop(null); + this.cleanScene(this.scene); + this.viewer.container.removeChild(this.container); + this.viewer.removeEventListener(SizeUpdatedEvent.type, this); + this.viewer.removeEventListener(ZoomUpdatedEvent.type, this); + this.viewer.removeEventListener(PositionUpdatedEvent.type, this); + this.viewer.removeEventListener(RollUpdatedEvent.type, this); + this.viewer.removeEventListener(ConfigChangedEvent.type, this); + super.destroy(); + } + /** + * @internal + */ + handleEvent(e) { + switch (e.type) { + case SizeUpdatedEvent.type: + this.__onSizeUpdated(); + break; + case ZoomUpdatedEvent.type: + this.__onZoomUpdated(); + break; + case PositionUpdatedEvent.type: + this.__onPositionUpdated(); + break; + case RollUpdatedEvent.type: + this.__onPositionUpdated(); + break; + case ConfigChangedEvent.type: + if (e.containsOptions("fisheye")) { + this.__onPositionUpdated(); + } + break; + } + } + /** + * Hides the viewer + */ + hide() { + this.container.style.opacity = "0"; + } + /** + * Shows the viewer + */ + show() { + this.container.style.opacity = "1"; + } + /** + * Resets or replaces the THREE renderer by a custom one + */ + setCustomRenderer(factory) { + if (factory) { + this.customRenderer = factory(this.renderer); + } else { + this.customRenderer = null; + } + this.viewer.needsUpdate(); + } + /** + * Updates the size of the renderer and the aspect of the camera + */ + __onSizeUpdated() { + this.renderer.setSize(this.state.size.width, this.state.size.height); + this.camera.aspect = this.state.aspect; + this.camera.updateProjectionMatrix(); + this.viewer.needsUpdate(); + this.frustumNeedsUpdate = true; + } + /** + * Updates the fov of the camera + */ + __onZoomUpdated() { + this.camera.fov = this.state.vFov; + this.camera.updateProjectionMatrix(); + this.viewer.needsUpdate(); + this.frustumNeedsUpdate = true; + } + /** + * Updates the position of the camera + */ + __onPositionUpdated() { + this.camera.position.set(0, 0, 0); + this.camera.lookAt(this.state.direction); + if (this.config.fisheye) { + this.camera.position.copy(this.state.direction).multiplyScalar(this.config.fisheye / 2).negate(); + } + this.camera.rotateZ(-this.state.roll); + this.camera.updateMatrixWorld(); + this.viewer.needsUpdate(); + this.frustumNeedsUpdate = true; + } + /** + * Main event loop, performs a render if `state.needsUpdate` is true + */ + __renderLoop(timestamp) { + const elapsed = !this.timestamp ? 0 : timestamp - this.timestamp; + this.timestamp = timestamp; + this.viewer.dispatchEvent(new BeforeRenderEvent(timestamp, elapsed)); + this.viewer.dynamics.update(elapsed); + if (this.state.needsUpdate || this.state.continuousUpdateCount > 0) { + this.state.needsUpdate = false; + (this.customRenderer || this.renderer).render(this.scene, this.camera); + this.viewer.dispatchEvent(new RenderEvent()); + } + } + /** + * Applies the texture to the scene, creates the scene if needed + * @internal + */ + setTexture(textureData) { + if (this.state.textureData) { + this.viewer.adapter.disposeTexture(this.state.textureData); + } + this.state.textureData = textureData; + this.viewer.adapter.setTexture(this.mesh, textureData); + this.viewer.needsUpdate(); + } + /** + * Applies a panorama data pose to a Mesh + * @internal + */ + setPanoramaPose(panoData, mesh = this.mesh) { + const cleanCorrection = this.viewer.dataHelper.cleanPanoramaPose(panoData); + mesh.rotation.set(-cleanCorrection.tilt, -cleanCorrection.pan, -cleanCorrection.roll, "ZXY"); + } + /** + * Applies a SphereCorrection to a Group + * @internal + */ + setSphereCorrection(sphereCorrection, group = this.meshContainer) { + const cleanCorrection = this.viewer.dataHelper.cleanSphereCorrection(sphereCorrection); + group.rotation.set(cleanCorrection.tilt, cleanCorrection.pan, cleanCorrection.roll, "ZXY"); + } + /** + * Performs transition between the current and a new texture + * @internal + */ + transition(textureData, options) { + const positionProvided = !isNil(options.position); + const zoomProvided = !isNil(options.zoom); + const e = new BeforeAnimateEvent( + positionProvided ? this.viewer.dataHelper.cleanPosition(options.position) : void 0, + options.zoom + ); + this.viewer.dispatchEvent(e); + const group = new import_three8.Group(); + const mesh = this.viewer.adapter.createMesh(0.5); + this.viewer.adapter.setTexture(mesh, textureData, true); + this.viewer.adapter.setTextureOpacity(mesh, 0); + this.setPanoramaPose(textureData.panoData, mesh); + this.setSphereCorrection(options.sphereCorrection, group); + if (positionProvided && options.transition === "fade-only") { + const currentPosition = this.viewer.getPosition(); + const verticalAxis = new import_three8.Vector3(0, 1, 0); + group.rotateOnWorldAxis(verticalAxis, e.position.yaw - currentPosition.yaw); + const horizontalAxis = new import_three8.Vector3(0, 1, 0).cross(this.camera.getWorldDirection(new import_three8.Vector3())).normalize(); + group.rotateOnWorldAxis(horizontalAxis, e.position.pitch - currentPosition.pitch); + } + group.add(mesh); + this.scene.add(group); + this.renderer.setRenderTarget(new import_three8.WebGLRenderTarget()); + this.renderer.render(this.scene, this.camera); + this.renderer.setRenderTarget(null); + const { duration, properties } = this.viewer.dataHelper.getAnimationProperties( + options.speed, + options.transition === true ? e.position : null, + e.zoomLevel + ); + const animation = new Animation({ + properties: { + ...properties, + opacity: { start: 0, end: 1 } + }, + duration, + easing: "inOutCubic", + onTick: (props) => { + this.viewer.adapter.setTextureOpacity(mesh, props.opacity); + if (positionProvided && options.transition === true) { + this.viewer.dynamics.position.setValue({ + yaw: props.yaw, + pitch: props.pitch + }); + } + if (zoomProvided) { + this.viewer.dynamics.zoom.setValue(props.zoom); + } + this.viewer.needsUpdate(); + } + }); + animation.then((completed) => { + if (completed) { + this.setTexture(textureData); + this.viewer.adapter.setTextureOpacity(this.mesh, 1); + this.setPanoramaPose(textureData.panoData); + this.setSphereCorrection(options.sphereCorrection); + if (positionProvided && options.transition === "fade-only") { + this.viewer.rotate(options.position); + } + } else { + this.viewer.adapter.disposeTexture(textureData); + } + this.scene.remove(group); + mesh.geometry.dispose(); + mesh.geometry = null; + }); + return animation; + } + /** + * Returns intersections with objects in the scene + */ + getIntersections(viewerPoint) { + vector2.x = 2 * viewerPoint.x / this.state.size.width - 1; + vector2.y = -2 * viewerPoint.y / this.state.size.height + 1; + this.raycaster.setFromCamera(vector2, this.camera); + const intersections = this.raycaster.intersectObjects(this.scene.children, true).filter((i) => i.object.visible).filter((i) => i.object.isMesh && !!i.object.userData); + if (this.customRenderer?.getIntersections) { + intersections.push(...this.customRenderer.getIntersections(this.raycaster, vector2)); + } + return intersections; + } + /** + * Checks if an object/point is currently visible + */ + isObjectVisible(value) { + if (!value) { + return false; + } + if (this.frustumNeedsUpdate) { + matrix4.multiplyMatrices(this.camera.projectionMatrix, this.camera.matrixWorldInverse); + this.frustum.setFromProjectionMatrix(matrix4); + this.frustumNeedsUpdate = false; + } + if (value.isVector3) { + return this.frustum.containsPoint(value); + } else if (value.isMesh && value.geometry) { + const mesh = value; + if (!mesh.geometry.boundingBox) { + mesh.geometry.computeBoundingBox(); + } + box3.copy(mesh.geometry.boundingBox).applyMatrix4(mesh.matrixWorld); + return this.frustum.intersectsBox(box3); + } else if (value.isObject3D) { + return this.frustum.intersectsObject(value); + } else { + return false; + } + } + /** + * Adds an object to the THREE scene + */ + addObject(object) { + this.scene.add(object); + } + /** + * Removes an object from the THREE scene + */ + removeObject(object) { + this.scene.remove(object); + } + /** + * Calls `dispose` on all objects and textures + * @internal + */ + cleanScene(object) { + const disposeMaterial = (material) => { + material.map?.dispose(); + if (material.uniforms) { + Object.values(material.uniforms).forEach((uniform) => { + uniform.value?.dispose?.(); + }); + } + material.dispose(); + }; + object.traverse((item) => { + item.geometry?.dispose(); + if (item.material) { + if (Array.isArray(item.material)) { + item.material.forEach((material) => { + disposeMaterial(material); + }); + } else { + disposeMaterial(item.material); + } + } + if (!(item instanceof import_three8.Scene)) { + item.dispose?.(); + } + if (item !== object) { + this.cleanScene(item); + } + }); + } + }; + + // src/lib/BlobLoader.ts + var import_three9 = require_three(); + var BlobLoader = class extends import_three9.Loader { + // @ts-ignore + load(url, onLoad, onProgress, onError, abortSignal) { + const req = new Request(url, { + headers: new Headers(this.requestHeader), + credentials: this.withCredentials ? "include" : "same-origin" + }); + fetch(req, { + signal: abortSignal + }).then((response) => { + if (response.status === 200 || response.status === 0) { + const reader = response.body.getReader(); + const contentLength = response.headers.get("Content-Length") || response.headers.get("X-File-Size"); + const total = contentLength ? parseInt(contentLength) : 0; + const lengthComputable = total !== 0; + let loaded = 0; + const stream = new ReadableStream({ + start(controller) { + readData(); + function readData() { + reader.read().then(({ done, value }) => { + if (done) { + controller.close(); + } else { + loaded += value.byteLength; + const event = new ProgressEvent("progress", { lengthComputable, loaded, total }); + onProgress(event); + controller.enqueue(value); + readData(); + } + }).catch((err) => { + onError(err); + }); + } + } + }); + return new Response(stream); + } else { + throw new Error(`fetch for "${response.url}" responded with ${response.status}: ${response.statusText}`); + } + }).then((response) => { + return response.blob(); + }).then((data) => { + onLoad(data); + }).catch((err) => { + onError(err); + }); + } + }; + + // src/lib/ImageLoader.ts + var import_three10 = require_three(); + var ImageLoader = class extends import_three10.Loader { + // @ts-ignore + load(url, onLoad, onError, abortSignal) { + const image = document.createElement("img"); + function onImageLoad() { + removeEventListeners(); + onLoad(this); + } + function onImageError(event) { + removeEventListeners(); + if (abortSignal?.aborted) { + const e = new Error(); + e.name = "AbortError"; + e.message = "The operation was aborted."; + onError(e); + } else { + onError(event); + } + } + function onAbortSignal() { + image.src = ""; + } + function removeEventListeners() { + image.removeEventListener("load", onImageLoad, false); + image.removeEventListener("error", onImageError, false); + abortSignal?.removeEventListener("abort", onAbortSignal, false); + } + image.addEventListener("load", onImageLoad, false); + image.addEventListener("error", onImageError, false); + abortSignal?.addEventListener("abort", onAbortSignal, false); + if (!url.startsWith("data:") && this.crossOrigin !== void 0) { + image.crossOrigin = this.crossOrigin; + } + image.src = url; + return image; + } + }; + + // src/services/TextureLoader.ts + var TextureLoader = class extends AbstractService { + /** + * @internal + */ + constructor(viewer) { + super(viewer); + this.abortCtrl = {}; + this.fileLoader = new BlobLoader(); + this.imageLoader = new ImageLoader(); + if (this.config.withCredentials) { + this.fileLoader.setWithCredentials(true); + this.imageLoader.setCrossOrigin("use-credentials"); + } + } + /** + * @internal + */ + destroy() { + this.abortLoading(); + super.destroy(); + } + /** + * Cancels current HTTP requests + * @internal + */ + abortLoading() { + Object.values(this.abortCtrl).forEach((ctrl) => ctrl.abort()); + this.abortCtrl = {}; + } + /** + * Loads a Blob with FileLoader + */ + loadFile(url, onProgress, cacheKey) { + const cached = Cache.get(url, cacheKey); + if (cached) { + if (cached instanceof Blob) { + onProgress?.(100); + return Promise.resolve(cached); + } else { + Cache.remove(url, cacheKey); + } + } + if (this.config.requestHeaders) { + this.fileLoader.setRequestHeader(this.config.requestHeaders(url)); + } + return new Promise((resolve, reject) => { + let progress = 0; + onProgress?.(progress); + this.fileLoader.load( + url, + (result) => { + progress = 100; + onProgress?.(progress); + Cache.add(url, cacheKey, result); + resolve(result); + }, + (e) => { + if (e.lengthComputable) { + const newProgress = e.loaded / e.total * 100; + if (newProgress > progress) { + progress = newProgress; + onProgress?.(progress); + } + } + }, + (err) => { + reject(err); + }, + this.__getAbortSignal(cacheKey) + ); + }); + } + /** + * Loads an image with ImageLoader or with FileLoader if progress is tracked or if request headers are configured + */ + loadImage(url, onProgress, cacheKey) { + const cached = Cache.get(url, cacheKey); + if (cached) { + onProgress?.(100); + if (cached instanceof Blob) { + return this.blobToImage(cached); + } else { + return Promise.resolve(cached); + } + } + if (!onProgress && !this.config.requestHeaders) { + return new Promise((resolve, reject) => { + this.imageLoader.load( + url, + (result) => { + Cache.add(url, cacheKey, result); + resolve(result); + }, + (err) => { + reject(err); + }, + this.__getAbortSignal(cacheKey) + ); + }); + } else { + return this.loadFile(url, onProgress, cacheKey).then((blob) => this.blobToImage(blob)); + } + } + /** + * Converts a file loaded with {@link loadFile} into an image + */ + blobToImage(blob) { + return new Promise((resolve, reject) => { + const img = document.createElement("img"); + img.onload = () => { + URL.revokeObjectURL(img.src); + resolve(img); + }; + img.onerror = reject; + img.src = URL.createObjectURL(blob); + }); + } + /** + * Preload a panorama file without displaying it + */ + preloadPanorama(panorama) { + if (this.viewer.adapter.supportsPreload(panorama)) { + return this.viewer.adapter.loadTexture(panorama, false); + } else { + return Promise.reject(new PSVError("Current adapter does not support preload")); + } + } + /** + * Get an abort signal + * the signal is shared accross all requests with the same cache key (for tiles adapters) + */ + __getAbortSignal(cacheKey) { + if (cacheKey) { + if (this.abortCtrl[cacheKey]?.signal.aborted) { + delete this.abortCtrl[cacheKey]; + } + if (!this.abortCtrl[cacheKey]) { + this.abortCtrl[cacheKey] = new AbortController(); + } + return this.abortCtrl[cacheKey].signal; + } + return null; + } + }; + + // src/services/ViewerDynamics.ts + var import_three11 = require_three(); + var ViewerDynamics = class extends AbstractService { + /** + * @internal + */ + constructor(viewer) { + super(viewer); + this.zoom = new Dynamic( + (zoomLevel) => { + this.viewer.state.vFov = this.viewer.dataHelper.zoomLevelToFov(zoomLevel); + this.viewer.state.hFov = this.viewer.dataHelper.vFovToHFov(this.viewer.state.vFov); + this.viewer.dispatchEvent(new ZoomUpdatedEvent(zoomLevel)); + }, + { + defaultValue: this.viewer.config.defaultZoomLvl, + min: 0, + max: 100, + wrap: false + } + ); + this.position = new MultiDynamic( + (position) => { + this.viewer.dataHelper.sphericalCoordsToVector3(position, this.viewer.state.direction); + this.viewer.dispatchEvent(new PositionUpdatedEvent(position)); + }, + { + yaw: new Dynamic(null, { + defaultValue: this.config.defaultYaw, + min: 0, + max: 2 * Math.PI, + wrap: true + }), + pitch: new Dynamic(null, { + defaultValue: this.config.defaultPitch, + min: !this.viewer.state.littlePlanet ? -Math.PI / 2 : 0, + max: !this.viewer.state.littlePlanet ? Math.PI / 2 : Math.PI * 2, + wrap: this.viewer.state.littlePlanet + }) + } + ); + this.roll = new Dynamic( + (roll) => { + this.viewer.state.roll = roll; + this.viewer.dispatchEvent(new RollUpdatedEvent(roll)); + }, + { + defaultValue: 0, + min: -Math.PI, + max: Math.PI, + wrap: false + } + ); + this.updateSpeeds(); + } + /** + * @internal + */ + updateSpeeds() { + this.zoom.setSpeed(this.config.zoomSpeed * 50); + this.position.setSpeed(import_three11.MathUtils.degToRad(this.config.moveSpeed * 50)); + this.roll.setSpeed(import_three11.MathUtils.degToRad(this.config.moveSpeed * 50)); + } + /** + * @internal + */ + update(elapsed) { + this.zoom.update(elapsed); + this.position.update(elapsed); + this.roll.update(elapsed); + } + }; + + // src/services/ViewerState.ts + var import_three12 = require_three(); + var ViewerState = class { + /** + * @internal + */ + // eslint-disable-next-line @typescript-eslint/no-empty-function + constructor() { + /** + * when all components are loaded + */ + this.ready = false; + /** + * if the view needs to be renderer + */ + this.needsUpdate = false; + /** + * number of plugins requesting to continuously render the scene + */ + this.continuousUpdateCount = 0; + /** + * if the keyboard events are currently listened to + */ + this.keyboardEnabled = false; + /** + * direction of the camera + */ + this.direction = new import_three12.Vector3(0, 0, SPHERE_RADIUS); + /** + * current camera roll + */ + this.roll = 0; + /** + * vertical FOV + */ + this.vFov = 60; + /** + * horizontal FOV + */ + this.hFov = 60; + /** + * renderer aspect ratio + */ + this.aspect = 1; + /** + * currently running animation + */ + this.animation = null; + /** + * currently running transition + */ + this.transitionAnimation = null; + /** + * promise of the last "setPanorama()" call + */ + this.loadingPromise = null; + /** + * special tweaks for LittlePlanetAdapter + */ + this.littlePlanet = false; + /** + * time of the last user action + */ + this.idleTime = -1; + /** + * registered THREE objects observer + */ + this.objectsObservers = {}; + /** + * size of the container + */ + this.size = { + width: 0, + height: 0 + }; + } + }; + + // src/Viewer.ts + var Viewer = class extends TypedEventTarget { + constructor(config) { + super(); + /** @internal */ + this.plugins = {}; + /** @internal */ + this.children = []; + this.onResize = throttle(() => this.navbar.autoSize(), 500); + this.parent = getElement(config.container); + if (!this.parent) { + throw new PSVError(`"container" element not found.`); + } + this.parent[VIEWER_DATA] = this; + this.container = document.createElement("div"); + this.container.classList.add("psv-container"); + this.parent.appendChild(this.container); + checkStylesheet(this.container, "core"); + this.state = new ViewerState(); + this.config = getViewerConfig(config); + this.__setSize(this.config.size); + this.overlay = new Overlay(this); + try { + SYSTEM.load(); + } catch (err) { + console.error(err); + this.showError(this.config.lang.webglError); + return; + } + Cache.init(); + this.adapter = new this.config.adapter[0](this, this.config.adapter[1]); + this.renderer = new Renderer(this); + this.textureLoader = new TextureLoader(this); + this.eventsHandler = new EventsHandler(this); + this.dataHelper = new DataHelper(this); + this.dynamics = new ViewerDynamics(this); + this.adapter.init?.(); + this.loader = new Loader(this); + this.navbar = new Navbar(this); + this.panel = new Panel(this); + this.notification = new Notification(this); + this.autoSize(); + this.setCursor(null); + resolveBoolean(SYSTEM.isTouchEnabled, (enabled) => { + toggleClass(this.container, "psv--is-touch", enabled); + }); + this.config.plugins.forEach(([plugin, opts]) => { + this.plugins[plugin.id] = new plugin(this, opts); + }); + for (const plugin of Object.values(this.plugins)) { + plugin.init?.(); + } + if (this.config.navbar) { + this.navbar.setButtons(this.config.navbar); + } + if (!this.state.loadingPromise) { + if (this.config.panorama) { + this.setPanorama(this.config.panorama); + } else { + this.loader.show(); + } + } + } + /** + * Destroys the viewer + */ + destroy() { + this.stopAll(); + this.stopKeyboardControl(); + this.exitFullscreen(); + for (const [id, plugin] of Object.entries(this.plugins)) { + plugin.destroy(); + delete this.plugins[id]; + } + this.children.slice().forEach((child) => child.destroy()); + this.children.length = 0; + this.eventsHandler?.destroy(); + this.renderer?.destroy(); + this.textureLoader?.destroy(); + this.dataHelper?.destroy(); + this.adapter?.destroy(); + this.dynamics?.destroy(); + this.parent.removeChild(this.container); + delete this.parent[VIEWER_DATA]; + } + init() { + this.eventsHandler.init(); + this.renderer.init(); + if (this.config.navbar) { + this.navbar.show(); + } + if (this.config.keyboard === "always") { + this.startKeyboardControl(); + } + this.resetIdleTimer(); + this.state.ready = true; + this.dispatchEvent(new ReadyEvent()); + } + /** + * Restarts the idle timer + * @internal + */ + resetIdleTimer() { + this.state.idleTime = performance.now(); + } + /** + * Stops the idle timer + * @internal + */ + disableIdleTimer() { + this.state.idleTime = -1; + } + /** + * Returns the instance of a plugin if it exists + * @example By plugin identifier + * ```js + * viewer.getPlugin('markers') + * ``` + * @example By plugin class with TypeScript support + * ```ts + * viewer.getPlugin(MarkersPlugin) + * ``` + */ + getPlugin(pluginId) { + if (typeof pluginId === "string") { + return this.plugins[pluginId]; + } else { + const pluginCtor = pluginInterop(pluginId); + return pluginCtor ? this.plugins[pluginCtor.id] : null; + } + } + /** + * Returns the current position of the camera + */ + getPosition() { + return this.dataHelper.cleanPosition(this.dynamics.position.current); + } + /** + * Returns the current zoom level + */ + getZoomLevel() { + return this.dynamics.zoom.current; + } + /** + * Returns the current viewer size + */ + getSize() { + return { ...this.state.size }; + } + /** + * Checks if the viewer is in fullscreen + */ + isFullscreenEnabled() { + return isFullscreenEnabled(this.parent); + } + /** + * Request a new render of the scene + */ + needsUpdate() { + this.state.needsUpdate = true; + } + /** + * Request the scene to be continuously renderer (when using videos) + */ + needsContinuousUpdate(enabled) { + if (enabled) { + this.state.continuousUpdateCount++; + } else if (this.state.continuousUpdateCount > 0) { + this.state.continuousUpdateCount--; + } + } + /** + * Resizes the scene if the viewer is resized + */ + autoSize() { + if (this.container.clientWidth !== this.state.size.width || this.container.clientHeight !== this.state.size.height) { + this.state.size.width = Math.round(this.container.clientWidth); + this.state.size.height = Math.round(this.container.clientHeight); + this.state.aspect = this.state.size.width / this.state.size.height; + this.state.hFov = this.dataHelper.vFovToHFov(this.state.vFov); + this.dispatchEvent(new SizeUpdatedEvent(this.getSize())); + this.onResize(); + } + } + /** + * Loads a new panorama file + * @description Loads a new panorama file, optionally changing the camera position/zoom and activating the transition animation.
+ * If the "options" parameter is not defined, the camera will not move and the ongoing animation will continue.
+ * If another loading is already in progress it will be aborted. + * @returns promise resolved with false if the loading was aborted by another call + */ + setPanorama(path, options = {}) { + this.textureLoader.abortLoading(); + this.state.transitionAnimation?.cancel(); + if (!this.state.ready) { + ["sphereCorrection", "panoData"].forEach((opt) => { + if (!(opt in options)) { + options[opt] = this.config[opt]; + } + }); + } + if (options.transition === void 0) { + options.transition = true; + } + if (options.speed === void 0) { + options.speed = DEFAULT_TRANSITION; + } + if (options.showLoader === void 0) { + options.showLoader = true; + } + if (options.caption === void 0) { + options.caption = this.config.caption; + } + if (options.description === void 0) { + options.description = this.config.description; + } + if (!options.panoData && typeof this.config.panoData === "function") { + options.panoData = this.config.panoData; + } + const positionProvided = !isNil(options.position); + const zoomProvided = !isNil(options.zoom); + if (positionProvided || zoomProvided) { + this.stopAll(); + } + this.hideError(); + this.resetIdleTimer(); + this.config.panorama = path; + this.config.caption = options.caption; + this.config.description = options.description; + const done = (err) => { + if (isAbortError(err)) { + return false; + } + this.loader.hide(); + this.state.loadingPromise = null; + if (err) { + this.navbar.setCaption(""); + this.showError(this.config.lang.loadError); + console.error(err); + this.dispatchEvent(new PanoramaErrorEvent(path, err)); + throw err; + } else { + this.navbar.setCaption(this.config.caption); + return true; + } + }; + this.navbar.setCaption(`${this.config.lang.loading}`); + if (options.showLoader || !this.state.ready) { + this.loader.show(); + } + this.dispatchEvent(new PanoramaLoadEvent(path)); + const loadingPromise = this.adapter.loadTexture(this.config.panorama, true, options.panoData).then((textureData) => { + if (textureData.panorama !== this.config.panorama) { + this.adapter.disposeTexture(textureData); + throw getAbortError(); + } + return textureData; + }); + if (!options.transition || !this.state.ready || !this.adapter.supportsTransition(this.config.panorama)) { + this.state.loadingPromise = loadingPromise.then((textureData) => { + this.renderer.show(); + this.renderer.setTexture(textureData); + this.renderer.setPanoramaPose(textureData.panoData); + this.renderer.setSphereCorrection(options.sphereCorrection); + if (!this.state.ready) { + this.init(); + } + this.dispatchEvent(new PanoramaLoadedEvent(textureData)); + if (zoomProvided) { + this.zoom(options.zoom); + } + if (positionProvided) { + this.rotate(options.position); + } + }).then( + () => done(), + (err) => done(err) + ); + } else { + this.state.loadingPromise = loadingPromise.then((textureData) => { + this.loader.hide(); + this.dispatchEvent(new PanoramaLoadedEvent(textureData)); + this.state.transitionAnimation = this.renderer.transition(textureData, options); + return this.state.transitionAnimation; + }).then((completed) => { + this.state.transitionAnimation = null; + if (!completed) { + throw getAbortError(); + } + }).then( + () => done(), + (err) => done(err) + ); + } + return this.state.loadingPromise; + } + /** + * Update options + * @throws {@link PSVError} if the configuration is invalid + */ + setOptions(options) { + const rawConfig = { + ...this.config, + ...options + }; + for (let [key, value] of Object.entries(options)) { + if (!(key in DEFAULTS)) { + logWarn(`Unknown option ${key}`); + continue; + } + if (key in READONLY_OPTIONS) { + logWarn(READONLY_OPTIONS[key]); + continue; + } + if (key in CONFIG_PARSERS) { + value = CONFIG_PARSERS[key](value, { + rawConfig, + defValue: DEFAULTS[key] + }); + } + this.config[key] = value; + switch (key) { + case "mousemove": + if (!this.state.cursorOverride) { + this.setCursor(null); + } + break; + case "caption": + this.navbar.setCaption(this.config.caption); + break; + case "size": + this.resize(this.config.size); + break; + case "sphereCorrection": + this.renderer.setSphereCorrection(this.config.sphereCorrection); + break; + case "navbar": + case "lang": + this.navbar.setButtons(this.config.navbar); + break; + case "moveSpeed": + case "zoomSpeed": + this.dynamics.updateSpeeds(); + break; + case "minFov": + case "maxFov": + this.dynamics.zoom.setValue(this.dataHelper.fovToZoomLevel(this.state.vFov)); + this.dispatchEvent(new ZoomUpdatedEvent(this.getZoomLevel())); + break; + case "keyboard": + if (this.config.keyboard === "always") { + this.startKeyboardControl(); + } else { + this.stopKeyboardControl(); + } + break; + default: + break; + } + } + this.needsUpdate(); + this.dispatchEvent(new ConfigChangedEvent(Object.keys(options))); + } + /** + * Update options + * @throws {@link PSVError} if the configuration is invalid + */ + setOption(option, value) { + this.setOptions({ [option]: value }); + } + /** + * Displays an error message over the viewer + */ + showError(message) { + this.overlay.show({ + id: IDS.ERROR, + image: error_default, + title: message, + dissmisable: false + }); + } + /** + * Hides the error message + */ + hideError() { + this.overlay.hide(IDS.ERROR); + } + /** + * Rotates the view to specific position + */ + rotate(position) { + const e = new BeforeRotateEvent(this.dataHelper.cleanPosition(position)); + this.dispatchEvent(e); + if (e.defaultPrevented) { + return; + } + this.dynamics.position.setValue(e.position); + } + /** + * Zooms to a specific level between `maxFov` and `minFov` + */ + zoom(level) { + this.dynamics.zoom.setValue(level); + } + /** + * Increases the zoom level + */ + zoomIn(step = 1) { + this.dynamics.zoom.step(step); + } + /** + * Decreases the zoom level + */ + zoomOut(step = 1) { + this.dynamics.zoom.step(-step); + } + /** + * Rotates and zooms the view with a smooth animation + */ + animate(options) { + const positionProvided = isExtendedPosition(options); + const zoomProvided = !isNil(options.zoom); + const e = new BeforeAnimateEvent( + positionProvided ? this.dataHelper.cleanPosition(options) : void 0, + options.zoom + ); + this.dispatchEvent(e); + if (e.defaultPrevented) { + return; + } + this.stopAll(); + const { duration, properties } = this.dataHelper.getAnimationProperties(options.speed, e.position, e.zoomLevel); + if (!duration) { + if (positionProvided) { + this.rotate(e.position); + } + if (zoomProvided) { + this.zoom(e.zoomLevel); + } + return new Animation(null); + } + this.state.animation = new Animation({ + properties, + duration, + easing: options.easing || "inOutSine", + onTick: (props) => { + if (positionProvided) { + this.dynamics.position.setValue({ + yaw: props.yaw, + pitch: props.pitch + }); + } + if (zoomProvided) { + this.dynamics.zoom.setValue(props.zoom); + } + } + }); + this.state.animation.then(() => { + this.state.animation = null; + this.resetIdleTimer(); + }); + return this.state.animation; + } + /** + * Stops the ongoing animation + * @description The return value is a Promise because the is no guaranty the animation can be stopped synchronously. + */ + stopAnimation() { + if (this.state.animation) { + this.state.animation.cancel(); + return this.state.animation; + } else { + return Promise.resolve(); + } + } + /** + * Resizes the viewer + */ + resize(size) { + this.__setSize(size); + this.autoSize(); + } + __setSize(size) { + const s = size; + ["width", "height"].forEach((dim) => { + if (size && s[dim]) { + if (/^[0-9.]+$/.test(s[dim])) { + s[dim] += "px"; + } + this.parent.style[dim] = s[dim]; + } + }); + } + /** + * Enters the fullscreen mode + */ + enterFullscreen() { + if (!this.isFullscreenEnabled()) { + requestFullscreen(this.parent); + } + } + /** + * Exits the fullscreen mode + */ + exitFullscreen() { + if (this.isFullscreenEnabled()) { + exitFullscreen(); + } + } + /** + * Enters or exits the fullscreen mode + */ + toggleFullscreen() { + if (!this.isFullscreenEnabled()) { + this.enterFullscreen(); + } else { + this.exitFullscreen(); + } + } + /** + * Enables the keyboard controls + */ + startKeyboardControl() { + this.state.keyboardEnabled = true; + } + /** + * Disables the keyboard controls + */ + stopKeyboardControl() { + this.state.keyboardEnabled = false; + } + /** + * Creates a new tooltip + * @description Use {@link Tooltip.move} to update the tooltip without re-create + * @throws {@link PSVError} if the configuration is invalid + */ + createTooltip(config) { + return new Tooltip(this, config); + } + /** + * Changes the global mouse cursor + */ + setCursor(cursor) { + this.state.cursorOverride = cursor; + if (!cursor) { + this.container.style.cursor = this.config.mousemove ? "move" : "default"; + } else { + this.container.style.cursor = cursor; + } + } + /** + * Subscribes to events on objects in the three.js scene + * @param userDataKey - only objects with the following `userData` will be observed + */ + observeObjects(userDataKey) { + if (!this.state.objectsObservers[userDataKey]) { + this.state.objectsObservers[userDataKey] = null; + } + } + /** + * Unsubscribes to events on objects + */ + unobserveObjects(userDataKey) { + delete this.state.objectsObservers[userDataKey]; + } + /** + * Stops all current animations + * @internal + */ + stopAll() { + this.dispatchEvent(new StopAllEvent()); + this.disableIdleTimer(); + return this.stopAnimation(); + } + }; + + // src/index.ts + var VERSION = "5.7.3"; + __copyProps(__defProp(exports, "__esModule", { value: true }), src_exports); + +}));//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/src/renderer/public/vrHtml/@photo-sphere-viewer/markers-plugin/index.css b/src/renderer/public/vrHtml/@photo-sphere-viewer/markers-plugin/index.css new file mode 100644 index 0000000..aac3afd --- /dev/null +++ b/src/renderer/public/vrHtml/@photo-sphere-viewer/markers-plugin/index.css @@ -0,0 +1,48 @@ +/*! + * PhotoSphereViewer.MarkersPlugin 5.7.3 + * @copyright 2024 Damien "Mistic" Sorel + * @licence MIT (https://opensource.org/licenses/MIT) + */ +/* src/style.scss */ +.psv-container { + --psv-markers-plugin-loaded: true; +} +.psv-markers { + user-select: none; + position: absolute; + z-index: 10; + width: 100%; + height: 100%; +} +.psv-markers-svg-container { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 20; +} +.psv-marker { + display: none; +} +.psv-marker--normal { + position: absolute; + top: 0; + left: 0; + z-index: 30; + overflow: visible; + background-size: contain; + background-repeat: no-repeat; +} +.psv-marker--transparent { + display: block; + opacity: 0; +} +.psv-marker--visible { + display: block; +} +.psv-marker--has-tooltip, +.psv-marker--has-content { + cursor: pointer; +} +/*# sourceMappingURL=index.css.map */ \ No newline at end of file diff --git a/src/renderer/public/vrHtml/@photo-sphere-viewer/markers-plugin/index.js b/src/renderer/public/vrHtml/@photo-sphere-viewer/markers-plugin/index.js new file mode 100644 index 0000000..8d05104 --- /dev/null +++ b/src/renderer/public/vrHtml/@photo-sphere-viewer/markers-plugin/index.js @@ -0,0 +1,1996 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('three'), require('@photo-sphere-viewer/core')) : + typeof define === 'function' && define.amd ? define(['exports', 'three', '@photo-sphere-viewer/core'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.PhotoSphereViewer = global.PhotoSphereViewer || {}, global.PhotoSphereViewer.MarkersPlugin = {}), global.THREE, global.PhotoSphereViewer)); +})(this, (function (exports, THREE, PhotoSphereViewer) { + +console.warn('PhotoSphereViewer "index.js" scripts are deprecated and will be removed in a future version. Please use ES Modules: https://photo-sphere-viewer.js.org/guide/#your-first-viewer'); + +/*! + * PhotoSphereViewer.MarkersPlugin 5.7.3 + * @copyright 2024 Damien "Mistic" Sorel + * @licence MIT (https://opensource.org/licenses/MIT) + */ +"use strict"; + var __defProp = Object.defineProperty; + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; + var __getOwnPropNames = Object.getOwnPropertyNames; + var __hasOwnProp = Object.prototype.hasOwnProperty; + var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; + }; + + // @photo-sphere-viewer/core + var require_core = () => PhotoSphereViewer; + + // three + var require_three = () => THREE; + + // src/index.ts + var src_exports = {}; + __export(src_exports, { + MarkersPlugin: () => MarkersPlugin, + events: () => events_exports + }); + var import_core15 = require_core(); + + // src/events.ts + var events_exports = {}; + __export(events_exports, { + EnterMarkerEvent: () => EnterMarkerEvent, + GotoMarkerDoneEvent: () => GotoMarkerDoneEvent, + HideMarkersEvent: () => HideMarkersEvent, + LeaveMarkerEvent: () => LeaveMarkerEvent, + MarkerVisibilityEvent: () => MarkerVisibilityEvent, + MarkersPluginEvent: () => MarkersPluginEvent, + RenderMarkersListEvent: () => RenderMarkersListEvent, + SelectMarkerEvent: () => SelectMarkerEvent, + SelectMarkerListEvent: () => SelectMarkerListEvent, + SetMarkersEvent: () => SetMarkersEvent, + ShowMarkersEvent: () => ShowMarkersEvent, + UnselectMarkerEvent: () => UnselectMarkerEvent + }); + var import_core = require_core(); + var MarkersPluginEvent = class extends import_core.TypedEvent { + }; + var _MarkerVisibilityEvent = class _MarkerVisibilityEvent extends MarkersPluginEvent { + /** @internal */ + constructor(marker, visible) { + super(_MarkerVisibilityEvent.type); + this.marker = marker; + this.visible = visible; + } + }; + _MarkerVisibilityEvent.type = "marker-visibility"; + var MarkerVisibilityEvent = _MarkerVisibilityEvent; + var _GotoMarkerDoneEvent = class _GotoMarkerDoneEvent extends MarkersPluginEvent { + /** @internal */ + constructor(marker) { + super(_GotoMarkerDoneEvent.type); + this.marker = marker; + } + }; + _GotoMarkerDoneEvent.type = "goto-marker-done"; + var GotoMarkerDoneEvent = _GotoMarkerDoneEvent; + var _LeaveMarkerEvent = class _LeaveMarkerEvent extends MarkersPluginEvent { + /** @internal */ + constructor(marker) { + super(_LeaveMarkerEvent.type); + this.marker = marker; + } + }; + _LeaveMarkerEvent.type = "leave-marker"; + var LeaveMarkerEvent = _LeaveMarkerEvent; + var _EnterMarkerEvent = class _EnterMarkerEvent extends MarkersPluginEvent { + /** @internal */ + constructor(marker) { + super(_EnterMarkerEvent.type); + this.marker = marker; + } + }; + _EnterMarkerEvent.type = "enter-marker"; + var EnterMarkerEvent = _EnterMarkerEvent; + var _SelectMarkerEvent = class _SelectMarkerEvent extends MarkersPluginEvent { + /** @internal */ + constructor(marker, doubleClick, rightClick) { + super(_SelectMarkerEvent.type); + this.marker = marker; + this.doubleClick = doubleClick; + this.rightClick = rightClick; + } + }; + _SelectMarkerEvent.type = "select-marker"; + var SelectMarkerEvent = _SelectMarkerEvent; + var _SelectMarkerListEvent = class _SelectMarkerListEvent extends MarkersPluginEvent { + /** @internal */ + constructor(marker) { + super(_SelectMarkerListEvent.type); + this.marker = marker; + } + }; + _SelectMarkerListEvent.type = "select-marker-list"; + var SelectMarkerListEvent = _SelectMarkerListEvent; + var _UnselectMarkerEvent = class _UnselectMarkerEvent extends MarkersPluginEvent { + /** @internal */ + constructor(marker) { + super(_UnselectMarkerEvent.type); + this.marker = marker; + } + }; + _UnselectMarkerEvent.type = "unselect-marker"; + var UnselectMarkerEvent = _UnselectMarkerEvent; + var _HideMarkersEvent = class _HideMarkersEvent extends MarkersPluginEvent { + /** @internal */ + constructor() { + super(_HideMarkersEvent.type); + } + }; + _HideMarkersEvent.type = "hide-markers"; + var HideMarkersEvent = _HideMarkersEvent; + var _SetMarkersEvent = class _SetMarkersEvent extends MarkersPluginEvent { + /** @internal */ + constructor(markers) { + super(_SetMarkersEvent.type); + this.markers = markers; + } + }; + _SetMarkersEvent.type = "set-markers"; + var SetMarkersEvent = _SetMarkersEvent; + var _ShowMarkersEvent = class _ShowMarkersEvent extends MarkersPluginEvent { + /** @internal */ + constructor() { + super(_ShowMarkersEvent.type); + } + }; + _ShowMarkersEvent.type = "show-markers"; + var ShowMarkersEvent = _ShowMarkersEvent; + var _RenderMarkersListEvent = class _RenderMarkersListEvent extends MarkersPluginEvent { + /** @internal */ + constructor(markers) { + super(_RenderMarkersListEvent.type); + this.markers = markers; + } + }; + _RenderMarkersListEvent.type = "render-markers-list"; + var RenderMarkersListEvent = _RenderMarkersListEvent; + + // src/MarkersButton.ts + var import_core2 = require_core(); + + // src/icons/pin.svg + var pin_default = '\n'; + + // src/MarkersButton.ts + var MarkersButton = class extends import_core2.AbstractButton { + constructor(navbar) { + super(navbar, { + className: "psv-markers-button", + icon: pin_default, + hoverScale: true, + collapsable: true, + tabbable: true + }); + this.plugin = this.viewer.getPlugin("markers"); + if (this.plugin) { + this.plugin.addEventListener(ShowMarkersEvent.type, this); + this.plugin.addEventListener(HideMarkersEvent.type, this); + this.toggleActive(true); + } + } + destroy() { + if (this.plugin) { + this.plugin.removeEventListener(ShowMarkersEvent.type, this); + this.plugin.removeEventListener(HideMarkersEvent.type, this); + } + super.destroy(); + } + isSupported() { + return !!this.plugin; + } + handleEvent(e) { + if (e instanceof ShowMarkersEvent) { + this.toggleActive(true); + } else if (e instanceof HideMarkersEvent) { + this.toggleActive(false); + } + } + onClick() { + this.plugin.toggleAllMarkers(); + } + }; + MarkersButton.id = "markers"; + + // src/MarkersListButton.ts + var import_core4 = require_core(); + + // src/constants.ts + var import_core3 = require_core(); + + // src/icons/pin-list.svg + var pin_list_default = '\n'; + + // src/constants.ts + var SVG_NS = "http://www.w3.org/2000/svg"; + var MARKER_DATA = "psvMarker"; + var MARKER_DATA_KEY = import_core3.utils.dasherize(MARKER_DATA); + var ID_PANEL_MARKER = "marker"; + var ID_PANEL_MARKERS_LIST = "markersList"; + var DEFAULT_HOVER_SCALE = { + amount: 2, + duration: 100, + easing: "linear" + }; + var MARKERS_LIST_TEMPLATE = (markers, title) => ` +
+

${pin_list_default} ${title}

+
    + ${markers.map( + (marker) => ` +
  • + ${marker.type === "image" ? `` : ""} + ${marker.getListContent()} +
  • + ` + ).join("")} +
+
+`; + + // src/MarkersListButton.ts + var MarkersListButton = class extends import_core4.AbstractButton { + constructor(navbar) { + super(navbar, { + className: " psv-markers-list-button", + icon: pin_list_default, + hoverScale: true, + collapsable: true, + tabbable: true + }); + this.plugin = this.viewer.getPlugin("markers"); + if (this.plugin) { + this.viewer.addEventListener(import_core4.events.ShowPanelEvent.type, this); + this.viewer.addEventListener(import_core4.events.HidePanelEvent.type, this); + } + } + destroy() { + this.viewer.removeEventListener(import_core4.events.ShowPanelEvent.type, this); + this.viewer.removeEventListener(import_core4.events.HidePanelEvent.type, this); + super.destroy(); + } + isSupported() { + return !!this.plugin; + } + handleEvent(e) { + if (e instanceof import_core4.events.ShowPanelEvent) { + this.toggleActive(e.panelId === ID_PANEL_MARKERS_LIST); + } else if (e instanceof import_core4.events.HidePanelEvent) { + this.toggleActive(false); + } + } + onClick() { + this.plugin.toggleMarkersList(); + } + }; + MarkersListButton.id = "markersList"; + + // src/MarkersPlugin.ts + var import_core14 = require_core(); + + // src/markers/AbstractStandardMarker.ts + var import_core8 = require_core(); + var import_three = require_three(); + + // src/MarkerType.ts + var import_core5 = require_core(); + var MarkerType = /* @__PURE__ */ ((MarkerType3) => { + MarkerType3["image"] = "image"; + MarkerType3["html"] = "html"; + MarkerType3["element"] = "element"; + MarkerType3["imageLayer"] = "imageLayer"; + MarkerType3["videoLayer"] = "videoLayer"; + MarkerType3["polygon"] = "polygon"; + MarkerType3["polygonPixels"] = "polygonPixels"; + MarkerType3["polyline"] = "polyline"; + MarkerType3["polylinePixels"] = "polylinePixels"; + MarkerType3["square"] = "square"; + MarkerType3["rect"] = "rect"; + MarkerType3["circle"] = "circle"; + MarkerType3["ellipse"] = "ellipse"; + MarkerType3["path"] = "path"; + return MarkerType3; + })(MarkerType || {}); + function getMarkerType(config, allowNone = false) { + const found = []; + Object.keys(MarkerType).forEach((type) => { + if (config[type]) { + found.push(type); + } + }); + if (found.length === 0 && !allowNone) { + throw new import_core5.PSVError(`missing marker content, either ${Object.keys(MarkerType).join(", ")}`); + } else if (found.length > 1) { + throw new import_core5.PSVError(`multiple marker content, either ${Object.keys(MarkerType).join(", ")}`); + } + return found[0]; + } + + // src/markers/AbstractDomMarker.ts + var import_core7 = require_core(); + + // src/markers/Marker.ts + var import_core6 = require_core(); + var Marker = class { + constructor(viewer, plugin, config) { + this.viewer = viewer; + this.plugin = plugin; + /** @internal */ + this.state = { + dynamicSize: false, + anchor: null, + visible: false, + staticTooltip: false, + position: null, + position2D: null, + positions3D: null, + size: null + }; + if (!config.id) { + throw new import_core6.PSVError("missing marker id"); + } + this.type = getMarkerType(config); + this.createElement(); + this.update(config); + } + get id() { + return this.config.id; + } + get data() { + return this.config.data; + } + get domElement() { + return null; + } + get threeElement() { + return null; + } + get video() { + return null; + } + /** + * @internal + */ + destroy() { + delete this.viewer; + delete this.plugin; + this.hideTooltip(); + } + /** + * Checks if it is a 3D marker (imageLayer, videoLayer) + */ + is3d() { + return false; + } + /** + * Checks if it is a normal marker (image, html, element) + */ + isNormal() { + return false; + } + /** + * Checks if it is a polygon/polyline marker + */ + isPoly() { + return false; + } + /** + * Checks if it is an SVG marker + */ + isSvg() { + return false; + } + /** + * Updates the marker with new properties + * @throws {@link PSVError} if the configuration is invalid + * @internal + */ + update(config) { + const newType = getMarkerType(config, true); + if (newType !== void 0 && newType !== this.type) { + throw new import_core6.PSVError("cannot change marker type"); + } + if (import_core6.utils.isExtendedPosition(config)) { + import_core6.utils.logWarn('Use the "position" property to configure the position of a marker'); + config.position = this.viewer.dataHelper.cleanPosition(config); + } + if ("width" in config && "height" in config) { + import_core6.utils.logWarn('Use the "size" property to configure the size of a marker'); + config.size = { width: config["width"], height: config["height"] }; + } + this.config = import_core6.utils.deepmerge(this.config, config); + if (typeof this.config.tooltip === "string") { + this.config.tooltip = { content: this.config.tooltip }; + } + if (this.config.tooltip && !this.config.tooltip.trigger) { + this.config.tooltip.trigger = "hover"; + } + if (import_core6.utils.isNil(this.config.visible)) { + this.config.visible = true; + } + if (import_core6.utils.isNil(this.config.zIndex)) { + this.config.zIndex = 1; + } + if (import_core6.utils.isNil(this.config.opacity)) { + this.config.opacity = 1; + } + try { + this.config.rotation = import_core6.utils.parseAngle(this.config.rotation ?? 0); + } catch (e) { + import_core6.utils.logWarn(e.message); + this.config.rotation = 0; + } + this.state.anchor = import_core6.utils.parsePoint(this.config.anchor); + } + /** + * Returns the markers list content for the marker, it can be either : + * - the `listContent` + * - the `tooltip` + * - the `html` + * - the `id` + * @internal + */ + getListContent() { + if (this.config.listContent) { + return this.config.listContent; + } else if (this.config.tooltip?.content) { + return this.config.tooltip.content; + } else if (this.config.html) { + return this.config.html; + } else { + return this.id; + } + } + /** + * Display the tooltip of this marker + * @internal + */ + showTooltip(clientX, clientY) { + if (this.state.visible && this.config.tooltip?.content && this.state.position2D) { + const config = { + ...this.config.tooltip, + style: { + // prevents conflicts with tooltip tracking + pointerEvents: this.state.staticTooltip ? "auto" : "none" + }, + data: this, + top: 0, + left: 0 + }; + if (this.isPoly() || this.is3d()) { + if (clientX || clientY) { + const viewerPos = import_core6.utils.getPosition(this.viewer.container); + config.top = clientY - viewerPos.y; + config.left = clientX - viewerPos.x; + config.box = { + // separate the tooltip from the cursor + width: 20, + height: 20 + }; + } else { + config.top = this.state.position2D.y; + config.left = this.state.position2D.x; + } + } else { + const position = this.viewer.dataHelper.vector3ToViewerCoords(this.state.positions3D[0]); + let width = this.state.size.width; + let height = this.state.size.height; + if (this.config.hoverScale && !this.state.staticTooltip) { + width *= this.config.hoverScale.amount; + height *= this.config.hoverScale.amount; + } + config.top = position.y - height * this.state.anchor.y + height / 2; + config.left = position.x - width * this.state.anchor.x + width / 2; + config.box = { width, height }; + } + if (this.tooltip) { + this.tooltip.update(this.config.tooltip.content, config); + } else { + this.tooltip = this.viewer.createTooltip(config); + } + } + } + /** + * Hides the tooltip of this marker + * @internal + */ + hideTooltip() { + if (this.tooltip) { + this.tooltip.hide(); + this.tooltip = null; + } + } + }; + + // src/markers/AbstractDomMarker.ts + var AbstractDomMarker = class extends Marker { + get domElement() { + return this.element; + } + constructor(viewer, plugin, config) { + super(viewer, plugin, config); + } + destroy() { + delete this.element[MARKER_DATA]; + super.destroy(); + } + update(config) { + super.update(config); + const element = this.domElement; + element.id = `psv-marker-${this.config.id}`; + element.setAttribute("class", "psv-marker"); + if (this.state.visible) { + element.classList.add("psv-marker--visible"); + } + if (this.config.tooltip) { + element.classList.add("psv-marker--has-tooltip"); + } + if (this.config.content) { + element.classList.add("psv-marker--has-content"); + } + if (this.config.className) { + import_core7.utils.addClasses(element, this.config.className); + } + element.style.opacity = `${this.config.opacity}`; + element.style.zIndex = `${30 + this.config.zIndex}`; + if (this.config.style) { + Object.assign(element.style, this.config.style); + } + } + }; + + // src/markers/AbstractStandardMarker.ts + var AbstractStandardMarker = class extends AbstractDomMarker { + constructor(viewer, plugin, config) { + super(viewer, plugin, config); + } + createElement() { + this.element[MARKER_DATA] = this; + this.domElement.addEventListener("transitionend", () => { + this.domElement.style.transition = ""; + }); + } + render({ + viewerPosition, + zoomLevel, + hoveringMarker + }) { + this.__updateSize(); + const position = this.viewer.dataHelper.vector3ToViewerCoords(this.state.positions3D[0]); + position.x -= this.state.size.width * this.state.anchor.x; + position.y -= this.state.size.height * this.state.anchor.y; + const isVisible = this.state.positions3D[0].dot(this.viewer.state.direction) > 0 && position.x + this.state.size.width >= 0 && position.x - this.state.size.width <= this.viewer.state.size.width && position.y + this.state.size.height >= 0 && position.y - this.state.size.height <= this.viewer.state.size.height; + if (isVisible) { + this.domElement.style.transform = `translate(${position.x}px,${position.y}px)`; + this.applyScale({ + zoomLevel, + viewerPosition, + mouseover: this === hoveringMarker + }); + if (this.type === "element" /* element */) { + this.config.element.updateMarker?.({ + marker: this, + position, + viewerPosition, + zoomLevel, + viewerSize: this.viewer.state.size + }); + } + return position; + } else { + return null; + } + } + update(config) { + super.update(config); + const element = this.domElement; + element.classList.add("psv-marker--normal"); + if (this.config.scale && Array.isArray(this.config.scale)) { + this.config.scale = { zoom: this.config.scale }; + } + if (typeof this.config.hoverScale === "boolean") { + this.config.hoverScale = this.config.hoverScale ? this.plugin.config.defaultHoverScale || DEFAULT_HOVER_SCALE : null; + } else if (typeof this.config.hoverScale === "number") { + this.config.hoverScale = { amount: this.config.hoverScale }; + } else if (!this.config.hoverScale) { + this.config.hoverScale = this.plugin.config.defaultHoverScale; + } + if (this.config.hoverScale) { + this.config.hoverScale = { + ...DEFAULT_HOVER_SCALE, + ...this.plugin.config.defaultHoverScale, + ...this.config.hoverScale + }; + } + element.style.rotate = this.config.rotation !== 0 ? import_three.MathUtils.radToDeg(this.config.rotation) + "deg" : null; + } + /** + * Computes the real size of a marker + * @description This is done by removing all it's transformations (if any) and making it visible + * before querying its bounding rect + */ + __updateSize() { + if (!this.state.dynamicSize) { + return; + } + const element = this.domElement; + const init = !this.state.size; + if (init) { + element.classList.add("psv-marker--transparent"); + } + if (this.isSvg()) { + const rect = element.firstElementChild.getBoundingClientRect(); + this.state.size = { + width: rect.width, + height: rect.height + }; + } else if (this.isNormal()) { + this.state.size = { + width: element.offsetWidth, + height: element.offsetHeight + }; + } + if (init) { + element.classList.remove("psv-marker--transparent"); + } + if (this.isSvg()) { + element.style.width = this.state.size.width + "px"; + element.style.height = this.state.size.height + "px"; + } + if (this.type !== "element" /* element */) { + this.state.dynamicSize = false; + } + } + /** + * Computes and applies the scale to the marker + */ + applyScale({ + zoomLevel, + viewerPosition, + mouseover + }) { + if (mouseover !== null && this.config.hoverScale) { + this.domElement.style.transition = `scale ${this.config.hoverScale.duration}ms ${this.config.hoverScale.easing}`; + } + let scale = 1; + if (typeof this.config.scale === "function") { + scale = this.config.scale(zoomLevel, viewerPosition); + } else if (this.config.scale) { + if (Array.isArray(this.config.scale.zoom)) { + const [min, max] = this.config.scale.zoom; + scale *= min + (max - min) * import_core8.CONSTANTS.EASINGS.inQuad(zoomLevel / 100); + } + if (Array.isArray(this.config.scale.yaw)) { + const [min, max] = this.config.scale.yaw; + const halfFov = import_three.MathUtils.degToRad(this.viewer.state.hFov) / 2; + const arc = Math.abs(import_core8.utils.getShortestArc(this.state.position.yaw, viewerPosition.yaw)); + scale *= max + (min - max) * import_core8.CONSTANTS.EASINGS.outQuad(Math.max(0, (halfFov - arc) / halfFov)); + } + } + if (mouseover && this.config.hoverScale) { + scale *= this.config.hoverScale.amount; + } + let child = this.domElement.children[0] + child && (child.style.transform = `scale(${scale})`); + } + }; + + // src/markers/MarkerNormal.ts + var import_core9 = require_core(); + var MarkerNormal = class extends AbstractStandardMarker { + constructor(viewer, plugin, config) { + super(viewer, plugin, config); + } + isNormal() { + return true; + } + createElement() { + this.element = document.createElement("div"); + super.createElement(); + } + update(config) { + super.update(config); + const element = this.domElement; + if (!import_core9.utils.isExtendedPosition(this.config.position)) { + throw new import_core9.PSVError("missing marker position"); + } + if (this.config.image && !this.config.size) { + throw new import_core9.PSVError("missing marker size"); + } + if (this.config.size) { + this.state.dynamicSize = false; + this.state.size = this.config.size; + element.style.width = this.config.size.width + "px"; + element.style.height = this.config.size.height + "px"; + } else { + this.state.dynamicSize = true; + } + switch (this.type) { + case "image" /* image */: + this.definition = this.config.image; + element.style.backgroundImage = `url("${this.config.image}")`; + break; + case "html" /* html */: + this.definition = this.config.html; + element.innerHTML = this.config.html; + break; + case "element" /* element */: + if (this.definition !== this.config.element) { + this.definition = this.config.element; + element.childNodes.forEach((n) => n.remove()); + element.appendChild(this.config.element); + this.config.element.style.display = "block"; + } + break; + } + element.style.transformOrigin = `${this.state.anchor.x * 100}% ${this.state.anchor.y * 100}%`; + this.state.position = this.viewer.dataHelper.cleanPosition(this.config.position); + this.state.positions3D = [this.viewer.dataHelper.sphericalCoordsToVector3(this.state.position)]; + } + }; + + // src/markers/Marker3D.ts + var import_core11 = require_core(); + var import_three4 = require_three(); + + // ../shared/ChromaKeyMaterial.ts + var import_three2 = require_three(); + + // ../shared/shaders/chromaKey.fragment.glsl + var chromaKey_fragment_default = "// https://www.8thwall.com/playground/chromakey-threejs\n\nuniform sampler2D map;\nuniform float alpha;\nuniform bool keying;\nuniform vec3 color;\nuniform float similarity;\nuniform float smoothness;\nuniform float spill;\n\nvarying vec2 vUv;\n\nvec2 RGBtoUV(vec3 rgb) {\n return vec2(\n rgb.r * -0.169 + rgb.g * -0.331 + rgb.b * 0.5 + 0.5,\n rgb.r * 0.5 + rgb.g * -0.419 + rgb.b * -0.081 + 0.5\n );\n}\n\nvoid main(void) {\n gl_FragColor = texture2D(map, vUv);\n\n if (keying) {\n float chromaDist = distance(RGBtoUV(gl_FragColor.rgb), RGBtoUV(color));\n\n float baseMask = chromaDist - similarity;\n float fullMask = pow(clamp(baseMask / smoothness, 0., 1.), 1.5);\n gl_FragColor.a *= fullMask * alpha;\n\n float spillVal = pow(clamp(baseMask / spill, 0., 1.), 1.5);\n float desat = clamp(gl_FragColor.r * 0.2126 + gl_FragColor.g * 0.7152 + gl_FragColor.b * 0.0722, 0., 1.);\n gl_FragColor.rgb = mix(vec3(desat, desat, desat), gl_FragColor.rgb, spillVal);\n } else {\n gl_FragColor.a *= alpha;\n }\n}\n"; + + // ../shared/shaders/chromaKey.vertex.glsl + var chromaKey_vertex_default = "varying vec2 vUv;\nuniform vec2 repeat;\nuniform vec2 offset;\n\nvoid main() {\n vUv = uv * repeat + offset;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}\n"; + + // ../shared/ChromaKeyMaterial.ts + var ChromaKeyMaterial = class extends import_three2.ShaderMaterial { + constructor(params) { + super({ + transparent: true, + depthTest: false, + uniforms: { + map: { value: params?.map }, + repeat: { value: new import_three2.Vector2(1, 1) }, + offset: { value: new import_three2.Vector2(0, 0) }, + alpha: { value: params?.alpha ?? 1 }, + keying: { value: false }, + color: { value: new import_three2.Color(65280) }, + similarity: { value: 0.2 }, + smoothness: { value: 0.2 }, + spill: { value: 0.1 } + }, + vertexShader: chromaKey_vertex_default, + fragmentShader: chromaKey_fragment_default + }); + this.chromaKey = params?.chromaKey; + } + get map() { + return this.uniforms.map.value; + } + set map(map) { + this.uniforms.map.value = map; + } + set alpha(alpha) { + this.uniforms.alpha.value = alpha; + } + get offset() { + return this.uniforms.offset.value; + } + get repeat() { + return this.uniforms.repeat.value; + } + set chromaKey(chromaKey) { + this.uniforms.keying.value = chromaKey?.enabled === true; + if (chromaKey?.enabled) { + if (typeof chromaKey.color === "object" && "r" in chromaKey.color) { + this.uniforms.color.value.set( + chromaKey.color.r / 255, + chromaKey.color.g / 255, + chromaKey.color.b / 255 + ); + } else { + this.uniforms.color.value.set(chromaKey.color ?? 65280); + } + this.uniforms.similarity.value = chromaKey.similarity ?? 0.2; + this.uniforms.smoothness.value = chromaKey.smoothness ?? 0.2; + } + } + }; + + // ../shared/video-utils.ts + function createVideo({ + src, + withCredentials, + muted, + autoplay + }) { + const video = document.createElement("video"); + video.crossOrigin = withCredentials ? "use-credentials" : "anonymous"; + video.loop = true; + video.playsInline = true; + video.autoplay = autoplay; + video.muted = muted; + video.preload = "metadata"; + video.src = src; + return video; + } + + // src/utils.ts + var import_core10 = require_core(); + var import_three3 = require_three(); + function greatArcIntermediaryPoint(p1, p2, f) { + const [\u03BB1, \u03C61] = p1; + const [\u03BB2, \u03C62] = p2; + const r = import_core10.utils.greatArcDistance(p1, p2); + const a = Math.sin((1 - f) * r) / Math.sin(r); + const b = Math.sin(f * r) / Math.sin(r); + const x = a * Math.cos(\u03C61) * Math.cos(\u03BB1) + b * Math.cos(\u03C62) * Math.cos(\u03BB2); + const y = a * Math.cos(\u03C61) * Math.sin(\u03BB1) + b * Math.cos(\u03C62) * Math.sin(\u03BB2); + const z = a * Math.sin(\u03C61) + b * Math.sin(\u03C62); + return [Math.atan2(y, x), Math.atan2(z, Math.sqrt(x * x + y * y))]; + } + function getPolygonCoherentPoints(points) { + const workPoints = [points[0]]; + let k = 0; + for (let i = 1; i < points.length; i++) { + const d = points[i - 1][0] - points[i][0]; + if (d > Math.PI) { + k += 1; + } else if (d < -Math.PI) { + k -= 1; + } + workPoints.push([points[i][0] + k * 2 * Math.PI, points[i][1]]); + } + return workPoints; + } + function getPolygonCenter(polygon) { + const points = getPolygonCoherentPoints(polygon); + const sum = points.reduce((intermediary, point) => [intermediary[0] + point[0], intermediary[1] + point[1]]); + return [import_core10.utils.parseAngle(sum[0] / polygon.length), sum[1] / polygon.length]; + } + function getPolylineCenter(polyline) { + const points = getPolygonCoherentPoints(polyline); + let length = 0; + const lengths = []; + for (let i = 0; i < points.length - 1; i++) { + const l = import_core10.utils.greatArcDistance(points[i], points[i + 1]) * import_core10.CONSTANTS.SPHERE_RADIUS; + lengths.push(l); + length += l; + } + let consumed = 0; + for (let j = 0; j < points.length - 1; j++) { + if (consumed + lengths[j] > length / 2) { + const r = (length / 2 - consumed) / lengths[j]; + return greatArcIntermediaryPoint(points[j], points[j + 1], r); + } + consumed += lengths[j]; + } + return points[Math.round(points.length / 2)]; + } + var C = new import_three3.Vector3(); + var N = new import_three3.Vector3(); + var V = new import_three3.Vector3(); + var X = new import_three3.Vector3(); + var Y = new import_three3.Vector3(); + var A = new import_three3.Vector3(); + function getGreatCircleIntersection(P1, P2, direction) { + C.copy(direction).normalize(); + N.crossVectors(P1, P2).normalize(); + V.crossVectors(N, P1).normalize(); + X.copy(P1).multiplyScalar(-C.dot(V)); + Y.copy(V).multiplyScalar(C.dot(P1)); + const H = new import_three3.Vector3().addVectors(X, Y).normalize(); + A.crossVectors(H, C); + return H.applyAxisAngle(A, 0.01).multiplyScalar(import_core10.CONSTANTS.SPHERE_RADIUS); + } + + // src/markers/Marker3D.ts + var Marker3D = class extends Marker { + get threeElement() { + return this.element; + } + get threeMesh() { + return this.threeElement.children[0]; + } + get video() { + if (this.type === "videoLayer" /* videoLayer */) { + return this.threeMesh.material.map.image; + } else { + return null; + } + } + constructor(viewer, plugin, config) { + super(viewer, plugin, config); + } + is3d() { + return true; + } + createElement() { + const material = new ChromaKeyMaterial({ alpha: 0 }); + const geometry = new import_three4.PlaneGeometry(1, 1); + const mesh = new import_three4.Mesh(geometry, material); + mesh.userData = { [MARKER_DATA]: this }; + Object.defineProperty(mesh, "visible", { + enumerable: true, + get: function() { + return this.userData[MARKER_DATA].state.visible; + }, + set: function(visible) { + this.userData[MARKER_DATA].state.visible = visible; + } + }); + this.element = new import_three4.Group().add(mesh); + if (this.type === "videoLayer" /* videoLayer */) { + this.viewer.needsContinuousUpdate(true); + } + } + destroy() { + delete this.threeMesh.userData[MARKER_DATA]; + if (this.type === "videoLayer" /* videoLayer */) { + this.video.pause(); + this.viewer.needsContinuousUpdate(false); + } + super.destroy(); + } + render() { + if (this.viewer.renderer.isObjectVisible(this.threeMesh)) { + return this.viewer.dataHelper.sphericalCoordsToViewerCoords(this.state.position); + } else { + return null; + } + } + update(config) { + super.update(config); + const mesh = this.threeMesh; + const group = mesh.parent; + const material = mesh.material; + this.state.dynamicSize = false; + if (import_core11.utils.isExtendedPosition(this.config.position)) { + if (!this.config.size) { + throw new import_core11.PSVError("missing marker size"); + } + this.state.position = this.viewer.dataHelper.cleanPosition(this.config.position); + this.state.size = this.config.size; + mesh.scale.set(this.config.size.width / 100, this.config.size.height / 100, 1); + mesh.position.set(mesh.scale.x * (0.5 - this.state.anchor.x), mesh.scale.y * (this.state.anchor.y - 0.5), 0); + mesh.rotation.set(0, 0, -this.config.rotation); + this.viewer.dataHelper.sphericalCoordsToVector3(this.state.position, group.position); + group.lookAt(0, group.position.y, 0); + switch (this.config.orientation) { + case "horizontal": + group.rotateX(this.state.position.pitch < 0 ? -Math.PI / 2 : Math.PI / 2); + break; + case "vertical-left": + group.rotateY(-Math.PI * 0.4); + break; + case "vertical-right": + group.rotateY(Math.PI * 0.4); + break; + } + const p = mesh.geometry.getAttribute("position"); + this.state.positions3D = [0, 1, 3, 2].map((i) => { + const v3 = new import_three4.Vector3(); + v3.fromBufferAttribute(p, i); + return mesh.localToWorld(v3); + }); + } else { + if (this.config.position?.length !== 4) { + throw new import_core11.PSVError("missing marker position"); + } + const positions = this.config.position.map((p2) => this.viewer.dataHelper.cleanPosition(p2)); + const positions3D = positions.map((p2) => this.viewer.dataHelper.sphericalCoordsToVector3(p2)); + const centroid = getPolygonCenter(positions.map(({ yaw, pitch }) => [yaw, pitch])); + this.state.position = { yaw: centroid[0], pitch: centroid[1] }; + this.state.positions3D = positions3D; + const p = mesh.geometry.getAttribute("position"); + [ + positions3D[0], + positions3D[1], + positions3D[3], + // not a mistake! + positions3D[2] + ].forEach((v, i) => { + p.setX(i, v.x); + p.setY(i, v.y); + p.setZ(i, v.z); + }); + p.needsUpdate = true; + this.__setTextureWrap(material); + } + switch (this.type) { + case "videoLayer" /* videoLayer */: + if (this.definition !== this.config.videoLayer) { + material.map?.dispose(); + const video = createVideo({ + src: this.config.videoLayer, + withCredentials: this.viewer.config.withCredentials, + muted: true, + autoplay: this.config.autoplay ?? true + }); + const texture = new import_three4.VideoTexture(video); + material.map = texture; + material.alpha = 0; + video.addEventListener("loadedmetadata", () => { + if (!this.viewer) { + return; + } + material.alpha = this.config.opacity; + if (!import_core11.utils.isExtendedPosition(this.config.position)) { + mesh.material.userData[MARKER_DATA] = { width: video.videoWidth, height: video.videoHeight }; + this.__setTextureWrap(material); + } + }, { once: true }); + this.definition = this.config.videoLayer; + } else { + material.alpha = this.config.opacity; + } + break; + case "imageLayer" /* imageLayer */: + if (this.definition !== this.config.imageLayer) { + material.map?.dispose(); + const texture = new import_three4.Texture(); + material.map = texture; + material.alpha = 0; + this.viewer.textureLoader.loadImage(this.config.imageLayer).then((image) => { + if (!this.viewer) { + return; + } + if (!import_core11.utils.isExtendedPosition(this.config.position)) { + mesh.material.userData[MARKER_DATA] = { width: image.width, height: image.height }; + this.__setTextureWrap(material); + } + texture.image = image; + texture.anisotropy = 4; + texture.needsUpdate = true; + material.alpha = this.config.opacity; + this.viewer.needsUpdate(); + }); + this.definition = this.config.imageLayer; + } else { + material.alpha = this.config.opacity; + } + break; + } + material.chromaKey = this.config.chromaKey; + mesh.renderOrder = 1e3 + this.config.zIndex; + mesh.geometry.boundingBox = null; + } + /** + * For layers positionned by corners, applies offset to the texture in order to keep its proportions + */ + __setTextureWrap(material) { + const imageSize = material.userData[MARKER_DATA]; + if (!imageSize || !imageSize.height || !imageSize.width) { + material.repeat.set(1, 1); + material.offset.set(0, 0); + return; + } + const positions = this.config.position.map((p) => { + return this.viewer.dataHelper.cleanPosition(p); + }); + const w1 = import_core11.utils.greatArcDistance( + [positions[0].yaw, positions[0].pitch], + [positions[1].yaw, positions[1].pitch] + ); + const w2 = import_core11.utils.greatArcDistance( + [positions[3].yaw, positions[3].pitch], + [positions[2].yaw, positions[2].pitch] + ); + const h1 = import_core11.utils.greatArcDistance( + [positions[1].yaw, positions[1].pitch], + [positions[2].yaw, positions[2].pitch] + ); + const h2 = import_core11.utils.greatArcDistance( + [positions[0].yaw, positions[0].pitch], + [positions[3].yaw, positions[3].pitch] + ); + const layerRatio = (w1 + w2) / (h1 + h2); + const imageRatio = imageSize.width / imageSize.height; + let hMargin = 0; + let vMargin = 0; + if (layerRatio < imageRatio) { + hMargin = imageRatio - layerRatio; + } else { + vMargin = 1 / imageRatio - 1 / layerRatio; + } + material.repeat.set(1 - hMargin, 1 - vMargin); + material.offset.set(hMargin / 2, vMargin / 2); + } + }; + + // src/markers/MarkerPolygon.ts + var import_core12 = require_core(); + var MarkerPolygon = class extends AbstractDomMarker { + constructor(viewer, plugin, config) { + super(viewer, plugin, config); + } + createElement() { + this.element = document.createElementNS(SVG_NS, this.isPolygon ? "polygon" : "polyline"); + this.element[MARKER_DATA] = this; + } + isPoly() { + return true; + } + /** + * Checks if it is a polygon/polyline using pixel coordinates + */ + get isPixels() { + return this.type === "polygonPixels" /* polygonPixels */ || this.type === "polylinePixels" /* polylinePixels */; + } + /** + * Checks if it is a polygon marker + */ + get isPolygon() { + return this.type === "polygon" /* polygon */ || this.type === "polygonPixels" /* polygonPixels */; + } + /** + * Checks if it is a polyline marker + */ + get isPolyline() { + return this.type === "polyline" /* polyline */ || this.type === "polylinePixels" /* polylinePixels */; + } + render() { + const positions = this.__getPolyPositions(); + const isVisible = positions.length > (this.isPolygon ? 2 : 1); + if (isVisible) { + const position = this.viewer.dataHelper.sphericalCoordsToViewerCoords(this.state.position); + const points = positions.map((pos) => pos.x - position.x + "," + (pos.y - position.y)).join(" "); + this.domElement.setAttributeNS(null, "points", points); + this.domElement.setAttributeNS(null, "transform", `translate(${position.x} ${position.y})`); + return position; + } else { + return null; + } + } + update(config) { + super.update(config); + const element = this.domElement; + element.classList.add("psv-marker--poly"); + this.state.dynamicSize = true; + if (this.config.svgStyle) { + Object.entries(this.config.svgStyle).forEach(([prop, value]) => { + element.setAttributeNS(null, import_core12.utils.dasherize(prop), value); + }); + if (this.isPolyline && !this.config.svgStyle.fill) { + element.setAttributeNS(null, "fill", "none"); + } + } else if (this.isPolygon) { + element.setAttributeNS(null, "fill", "rgba(0,0,0,0.5)"); + } else if (this.isPolyline) { + element.setAttributeNS(null, "fill", "none"); + element.setAttributeNS(null, "stroke", "rgb(0,0,0)"); + } + const actualPoly = this.config[this.type]; + if (!Array.isArray(actualPoly[0])) { + for (let i = 0; i < actualPoly.length; i++) { + actualPoly.splice(i, 2, [actualPoly[i], actualPoly[i + 1]]); + } + } + if (this.isPixels) { + this.definition = actualPoly.map((coord) => { + const sphericalCoords = this.viewer.dataHelper.textureCoordsToSphericalCoords({ + textureX: coord[0], + textureY: coord[1] + }); + return [sphericalCoords.yaw, sphericalCoords.pitch]; + }); + } else { + this.definition = actualPoly.map((coord) => { + return [import_core12.utils.parseAngle(coord[0]), import_core12.utils.parseAngle(coord[1], true)]; + }); + } + const centroid = this.isPolygon ? getPolygonCenter(this.definition) : getPolylineCenter(this.definition); + this.state.position = { yaw: centroid[0], pitch: centroid[1] }; + this.state.positions3D = this.definition.map((coord) => { + return this.viewer.dataHelper.sphericalCoordsToVector3({ yaw: coord[0], pitch: coord[1] }); + }); + } + /** + * Computes viewer coordinates of each point of a polygon/polyline
+ * It handles points behind the camera by creating intermediary points suitable for the projector + */ + __getPolyPositions() { + const nbVectors = this.state.positions3D.length; + const positions3D = this.state.positions3D.map((vector) => { + return { + vector, + visible: vector.dot(this.viewer.state.direction) > 0 + }; + }); + const toBeComputed = []; + positions3D.forEach((pos, i) => { + if (!pos.visible) { + const neighbours = [ + i === 0 ? positions3D[nbVectors - 1] : positions3D[i - 1], + i === nbVectors - 1 ? positions3D[0] : positions3D[i + 1] + ]; + neighbours.forEach((neighbour) => { + if (neighbour.visible) { + toBeComputed.push({ + visible: neighbour.vector, + invisible: pos.vector, + index: i + }); + } + }); + } + }); + toBeComputed.reverse().forEach((pair) => { + positions3D.splice(pair.index, 0, { + vector: getGreatCircleIntersection(pair.visible, pair.invisible, this.viewer.state.direction), + visible: true + }); + }); + return positions3D.filter((pos) => pos.visible).map((pos) => this.viewer.dataHelper.vector3ToViewerCoords(pos.vector)); + } + }; + + // src/markers/MarkerSvg.ts + var import_core13 = require_core(); + var MarkerSvg = class extends AbstractStandardMarker { + constructor(viewer, plugin, config) { + super(viewer, plugin, config); + } + isSvg() { + return true; + } + createElement() { + const svgType = this.type === "square" /* square */ ? "rect" : this.type; + const elt = document.createElementNS(SVG_NS, svgType); + this.element = document.createElementNS(SVG_NS, "svg"); + this.element.appendChild(elt); + super.createElement(); + } + update(config) { + super.update(config); + const svgElement = this.domElement.firstElementChild; + if (!import_core13.utils.isExtendedPosition(this.config.position)) { + throw new import_core13.PSVError("missing marker position"); + } + this.state.dynamicSize = true; + switch (this.type) { + case "square" /* square */: + this.definition = { + x: 0, + y: 0, + width: this.config.square, + height: this.config.square + }; + break; + case "rect" /* rect */: + if (Array.isArray(this.config.rect)) { + this.definition = { + x: 0, + y: 0, + width: this.config.rect[0], + height: this.config.rect[1] + }; + } else { + this.definition = { + x: 0, + y: 0, + width: this.config.rect.width, + height: this.config.rect.height + }; + } + break; + case "circle" /* circle */: + this.definition = { + cx: this.config.circle, + cy: this.config.circle, + r: this.config.circle + }; + break; + case "ellipse" /* ellipse */: + if (Array.isArray(this.config.ellipse)) { + this.definition = { + cx: this.config.ellipse[0], + cy: this.config.ellipse[1], + rx: this.config.ellipse[0], + ry: this.config.ellipse[1] + }; + } else { + this.definition = { + cx: this.config.ellipse.rx, + cy: this.config.ellipse.ry, + rx: this.config.ellipse.rx, + ry: this.config.ellipse.ry + }; + } + break; + case "path" /* path */: + this.definition = { + d: this.config.path + }; + break; + } + Object.entries(this.definition).forEach(([prop, value]) => { + svgElement.setAttributeNS(null, prop, value); + }); + if (this.config.svgStyle) { + Object.entries(this.config.svgStyle).forEach(([prop, value]) => { + svgElement.setAttributeNS(null, import_core13.utils.dasherize(prop), value); + }); + } else { + svgElement.setAttributeNS(null, "fill", "rgba(0,0,0,0.5)"); + } + this.domElement.style.transformOrigin = `${this.state.anchor.x * 100}% ${this.state.anchor.y * 100}%`; + this.state.position = this.viewer.dataHelper.cleanPosition(this.config.position); + this.state.positions3D = [this.viewer.dataHelper.sphericalCoordsToVector3(this.state.position)]; + } + }; + + // src/MarkersPlugin.ts + var getConfig = import_core14.utils.getConfigParser( + { + clickEventOnMarker: false, + gotoMarkerSpeed: "8rpm", + markers: null, + defaultHoverScale: null + }, + { + defaultHoverScale(defaultHoverScale) { + if (!defaultHoverScale) { + return null; + } + if (defaultHoverScale === true) { + defaultHoverScale = DEFAULT_HOVER_SCALE; + } + if (typeof defaultHoverScale === "number") { + defaultHoverScale = { amount: defaultHoverScale }; + } + return { + ...DEFAULT_HOVER_SCALE, + ...defaultHoverScale + }; + } + } + ); + function getMarkerCtor(config) { + const type = getMarkerType(config, false); + switch (type) { + case "image": + case "html": + case "element": + return MarkerNormal; + case "imageLayer": + case "videoLayer": + return Marker3D; + case "polygon": + case "polyline": + case "polygonPixels": + case "polylinePixels": + return MarkerPolygon; + case "square": + case "rect": + case "circle": + case "ellipse": + case "path": + return MarkerSvg; + default: + throw new import_core14.PSVError("invalid marker type"); + } + } + var MarkersPlugin = class extends import_core14.AbstractConfigurablePlugin { + constructor(viewer, config) { + super(viewer, config); + this.markers = {}; + this.state = { + visible: true, + showAllTooltips: false, + currentMarker: null, + hoveringMarker: null, + // require a 2nd render (only the scene) when 3d markers visibility changes + needsReRender: false + }; + this.container = document.createElement("div"); + this.container.className = "psv-markers"; + this.viewer.container.appendChild(this.container); + this.svgContainer = document.createElementNS(SVG_NS, "svg"); + this.svgContainer.setAttribute("class", "psv-markers-svg-container"); + this.container.appendChild(this.svgContainer); + this.container.addEventListener("mouseenter", this, true); + this.container.addEventListener("mouseleave", this, true); + this.container.addEventListener("mousemove", this, true); + this.container.addEventListener("contextmenu", this); + } + /** + * @internal + */ + init() { + super.init(); + import_core14.utils.checkStylesheet(this.viewer.container, "markers-plugin"); + this.viewer.addEventListener(import_core14.events.ClickEvent.type, this); + this.viewer.addEventListener(import_core14.events.DoubleClickEvent.type, this); + this.viewer.addEventListener(import_core14.events.RenderEvent.type, this); + this.viewer.addEventListener(import_core14.events.ConfigChangedEvent.type, this); + this.viewer.addEventListener(import_core14.events.ObjectEnterEvent.type, this); + this.viewer.addEventListener(import_core14.events.ObjectHoverEvent.type, this); + this.viewer.addEventListener(import_core14.events.ObjectLeaveEvent.type, this); + this.viewer.addEventListener(import_core14.events.ReadyEvent.type, this, { once: true }); + } + /** + * @internal + */ + destroy() { + this.clearMarkers(false); + this.viewer.unobserveObjects(MARKER_DATA); + this.viewer.removeEventListener(import_core14.events.ClickEvent.type, this); + this.viewer.removeEventListener(import_core14.events.DoubleClickEvent.type, this); + this.viewer.removeEventListener(import_core14.events.RenderEvent.type, this); + this.viewer.removeEventListener(import_core14.events.ObjectEnterEvent.type, this); + this.viewer.removeEventListener(import_core14.events.ObjectHoverEvent.type, this); + this.viewer.removeEventListener(import_core14.events.ObjectLeaveEvent.type, this); + this.viewer.removeEventListener(import_core14.events.ReadyEvent.type, this); + this.viewer.container.removeChild(this.container); + super.destroy(); + } + /** + * @internal + */ + handleEvent(e) { + switch (e.type) { + case import_core14.events.ReadyEvent.type: + if (this.config.markers) { + this.setMarkers(this.config.markers); + delete this.config.markers; + } + break; + case import_core14.events.RenderEvent.type: + this.renderMarkers(); + break; + case import_core14.events.ClickEvent.type: + this.__onClick(e, false); + break; + case import_core14.events.DoubleClickEvent.type: + this.__onClick(e, true); + break; + case import_core14.events.ObjectEnterEvent.type: + case import_core14.events.ObjectLeaveEvent.type: + case import_core14.events.ObjectHoverEvent.type: + if (e.userDataKey === MARKER_DATA) { + const event = e.originalEvent; + const marker = e.object.userData[MARKER_DATA]; + switch (e.type) { + case import_core14.events.ObjectEnterEvent.type: + if (marker.config.style?.cursor) { + this.viewer.setCursor(marker.config.style.cursor); + } else if (marker.config.tooltip || marker.config.content) { + this.viewer.setCursor("pointer"); + } + this.__onEnterMarker(event, marker); + break; + case import_core14.events.ObjectLeaveEvent.type: + this.viewer.setCursor(null); + this.__onLeaveMarker(marker); + break; + case import_core14.events.ObjectHoverEvent.type: + this.__onHoverMarker(event, marker); + break; + } + } + break; + case "mouseenter": + this.__onEnterMarker(e, this.__getTargetMarker(e.target)); + break; + case "mouseleave": + this.__onLeaveMarker(this.__getTargetMarker(e.target)); + break; + case "mousemove": + this.__onHoverMarker(e, this.__getTargetMarker(e.target, true)); + break; + case "contextmenu": + e.preventDefault(); + break; + } + } + /** + * Toggles all markers + */ + toggleAllMarkers() { + if (this.state.visible) { + this.hideAllMarkers(); + } else { + this.showAllMarkers(); + } + } + /** + * Shows all markers + */ + showAllMarkers() { + this.state.visible = true; + this.renderMarkers(); + this.dispatchEvent(new ShowMarkersEvent()); + } + /** + * Hides all markers + */ + hideAllMarkers() { + this.state.visible = false; + this.renderMarkers(); + this.dispatchEvent(new HideMarkersEvent()); + } + /** + * Toggles the visibility of all tooltips + */ + toggleAllTooltips() { + if (this.state.showAllTooltips) { + this.hideAllTooltips(); + } else { + this.showAllTooltips(); + } + } + /** + * Displays all tooltips + */ + showAllTooltips() { + this.state.showAllTooltips = true; + Object.values(this.markers).forEach((marker) => { + marker.state.staticTooltip = true; + marker.showTooltip(); + }); + } + /** + * Hides all tooltips + */ + hideAllTooltips() { + this.state.showAllTooltips = false; + Object.values(this.markers).forEach((marker) => { + marker.state.staticTooltip = false; + marker.hideTooltip(); + }); + } + /** + * Returns the total number of markers + */ + getNbMarkers() { + return Object.keys(this.markers).length; + } + /** + * Returns all the markers + */ + getMarkers() { + return Object.values(this.markers); + } + /** + * Adds a new marker to viewer + * @throws {@link PSVError} when the marker's id is missing or already exists + */ + addMarker(config, render = true) { + if (this.markers[config.id]) { + throw new import_core14.PSVError(`marker "${config.id}" already exists`); + } + const marker = new (getMarkerCtor(config))(this.viewer, this, config); + if (marker.isPoly()) { + this.svgContainer.appendChild(marker.domElement); + } else if (marker.is3d()) { + this.viewer.renderer.addObject(marker.threeElement); + } else { + this.container.appendChild(marker.domElement); + } + this.markers[marker.id] = marker; + if (this.state.showAllTooltips) { + marker.state.staticTooltip = true; + } + if (render) { + this.__afterChangerMarkers(); + } + } + /** + * Returns the internal marker object for a marker id + * @throws {@link PSVError} when the marker cannot be found + */ + getMarker(markerId) { + const id = typeof markerId === "object" ? markerId.id : markerId; + if (!this.markers[id]) { + throw new import_core14.PSVError(`cannot find marker "${id}"`); + } + return this.markers[id]; + } + /** + * Returns the last marker selected by the user + */ + getCurrentMarker() { + return this.state.currentMarker; + } + /** + * Updates the existing marker with the same id + * @description Every property can be changed but you can't change its type (Eg: `image` to `html`) + */ + updateMarker(config, render = true) { + const marker = this.getMarker(config.id); + marker.update(config); + if (render) { + this.__afterChangerMarkers(); + if (marker === this.state.hoveringMarker && marker.config.tooltip?.trigger === "hover" || marker.state.staticTooltip) { + marker.showTooltip(); + } + } + } + /** + * Removes a marker from the viewer + */ + removeMarker(markerId, render = true) { + const marker = this.getMarker(markerId); + if (marker.isPoly()) { + this.svgContainer.removeChild(marker.domElement); + } else if (marker.is3d()) { + this.viewer.renderer.removeObject(marker.threeElement); + } else { + this.container.removeChild(marker.domElement); + } + if (this.state.hoveringMarker === marker) { + this.state.hoveringMarker = null; + } + if (this.state.currentMarker === marker) { + this.state.currentMarker = null; + } + marker.destroy(); + delete this.markers[marker.id]; + if (render) { + this.__afterChangerMarkers(); + } + } + /** + * Removes multiple markers + */ + removeMarkers(markerIds, render = true) { + markerIds.forEach((markerId) => this.removeMarker(markerId, false)); + if (render) { + this.__afterChangerMarkers(); + } + } + /** + * Replaces all markers + */ + setMarkers(markers, render = true) { + this.clearMarkers(false); + markers?.forEach((marker) => { + this.addMarker(marker, false); + }); + if (render) { + this.__afterChangerMarkers(); + } + } + /** + * Removes all markers + */ + clearMarkers(render = true) { + Object.keys(this.markers).forEach((markerId) => { + this.removeMarker(markerId, false); + }); + if (render) { + this.__afterChangerMarkers(); + } + } + /** + * Rotate the view to face the marker + */ + gotoMarker(markerId, speed = this.config.gotoMarkerSpeed) { + const marker = this.getMarker(markerId); + if (!speed) { + this.viewer.rotate(marker.state.position); + if (!import_core14.utils.isNil(marker.config.zoomLvl)) { + this.viewer.zoom(marker.config.zoomLvl); + } + this.dispatchEvent(new GotoMarkerDoneEvent(marker)); + return Promise.resolve(); + } else { + return this.viewer.animate({ + ...marker.state.position, + zoom: marker.config.zoomLvl, + speed + }).then(() => { + this.dispatchEvent(new GotoMarkerDoneEvent(marker)); + }); + } + } + /** + * Hides a marker + */ + hideMarker(markerId) { + this.toggleMarker(markerId, false); + } + /** + * Shows a marker + */ + showMarker(markerId) { + this.toggleMarker(markerId, true); + } + /** + * Forces the display of the tooltip of a marker + */ + showMarkerTooltip(markerId) { + const marker = this.getMarker(markerId); + marker.state.staticTooltip = true; + marker.showTooltip(); + } + /** + * Hides the tooltip of a marker + */ + hideMarkerTooltip(markerId) { + const marker = this.getMarker(markerId); + marker.state.staticTooltip = false; + marker.hideTooltip(); + } + /** + * Toggles a marker visibility + */ + toggleMarker(markerId, visible) { + const marker = this.getMarker(markerId); + marker.config.visible = import_core14.utils.isNil(visible) ? !marker.config.visible : visible; + this.renderMarkers(); + } + /** + * Opens the panel with the content of the marker + */ + showMarkerPanel(markerId) { + const marker = this.getMarker(markerId); + if (marker.config.content) { + this.viewer.panel.show({ + id: ID_PANEL_MARKER, + content: marker.config.content + }); + } else { + this.hideMarkerPanel(); + } + } + /** + * Closes the panel if currently showing the content of a marker + */ + hideMarkerPanel() { + this.viewer.panel.hide(ID_PANEL_MARKER); + } + /** + * Toggles the visibility of the list of markers + */ + toggleMarkersList() { + if (this.viewer.panel.isVisible(ID_PANEL_MARKERS_LIST)) { + this.hideMarkersList(); + } else { + this.showMarkersList(); + } + } + /** + * Opens side panel with the list of markers + */ + showMarkersList() { + let markers = []; + if (this.state.visible) { + Object.values(this.markers).forEach((marker) => { + if (marker.config.visible && !marker.config.hideList) { + markers.push(marker); + } + }); + } + const e = new RenderMarkersListEvent(markers); + this.dispatchEvent(e); + markers = e.markers; + this.viewer.panel.show({ + id: ID_PANEL_MARKERS_LIST, + content: MARKERS_LIST_TEMPLATE(markers, this.viewer.config.lang[MarkersButton.id]), + noMargin: true, + clickHandler: (target) => { + const li = import_core14.utils.getClosest(target, "li"); + const markerId = li ? li.dataset[MARKER_DATA] : void 0; + if (markerId) { + const marker = this.getMarker(markerId); + this.dispatchEvent(new SelectMarkerListEvent(marker)); + this.gotoMarker(marker.id); + this.hideMarkersList(); + } + } + }); + } + /** + * Closes side panel if it contains the list of markers + */ + hideMarkersList() { + this.viewer.panel.hide(ID_PANEL_MARKERS_LIST); + } + /** + * Updates the visibility and the position of all markers + */ + renderMarkers() { + if (this.state.needsReRender) { + this.state.needsReRender = false; + return; + } + const zoomLevel = this.viewer.getZoomLevel(); + const viewerPosition = this.viewer.getPosition(); + const hoveringMarker = this.state.hoveringMarker; + Object.values(this.markers).forEach((marker) => { + let isVisible = this.state.visible && marker.config.visible; + let visibilityChanged = false; + let position = null; + if (isVisible) { + position = marker.render({ viewerPosition, zoomLevel, hoveringMarker }); + isVisible = !!position; + } + visibilityChanged = marker.state.visible !== isVisible; + marker.state.visible = isVisible; + marker.state.position2D = position; + if (!marker.is3d()) { + import_core14.utils.toggleClass(marker.domElement, "psv-marker--visible", isVisible); + } + if (!isVisible) { + marker.hideTooltip(); + } else if (marker.state.staticTooltip) { + marker.showTooltip(); + } else if (marker !== this.state.hoveringMarker) { + marker.hideTooltip(); + } + if (visibilityChanged) { + this.dispatchEvent(new MarkerVisibilityEvent(marker, isVisible)); + if (marker.is3d()) { + this.state.needsReRender = true; + } + } + }); + if (this.state.needsReRender) { + this.viewer.needsUpdate(); + } + } + __getTargetMarker(target, closest = false) { + if (target instanceof Node) { + const target2 = closest ? import_core14.utils.getClosest(target, ".psv-marker") : target; + return target2 ? target2[MARKER_DATA] : void 0; + } else if (Array.isArray(target)) { + return target.map((o) => o.userData[MARKER_DATA]).filter((m) => !!m).sort((a, b) => b.config.zIndex - a.config.zIndex)[0]; + } else { + return null; + } + } + /** + * Handles mouse enter events, show the tooltip for non polygon markers + */ + __onEnterMarker(e, marker) { + if (marker) { + this.state.hoveringMarker = marker; + this.dispatchEvent(new EnterMarkerEvent(marker)); + if (marker instanceof AbstractStandardMarker) { + marker.applyScale({ + zoomLevel: this.viewer.getZoomLevel(), + viewerPosition: this.viewer.getPosition(), + mouseover: true + }); + } + if (!marker.state.staticTooltip && marker.config.tooltip?.trigger === "hover") { + marker.showTooltip(e.clientX, e.clientY); + } + } + } + /** + * Handles mouse leave events, hide the tooltip + */ + __onLeaveMarker(marker) { + if (marker) { + this.dispatchEvent(new LeaveMarkerEvent(marker)); + if (marker instanceof AbstractStandardMarker) { + marker.applyScale({ + zoomLevel: this.viewer.getZoomLevel(), + viewerPosition: this.viewer.getPosition(), + mouseover: false + }); + } + this.state.hoveringMarker = null; + if (!marker.state.staticTooltip && marker.config.tooltip?.trigger === "hover") { + marker.hideTooltip(); + } else if (marker.state.staticTooltip) { + marker.showTooltip(); + } + } + } + /** + * Handles mouse move events, refresh the tooltip for polygon markers + */ + __onHoverMarker(e, marker) { + if (marker && (marker.isPoly() || marker.is3d())) { + if (marker.config.tooltip?.trigger === "hover") { + marker.showTooltip(e.clientX, e.clientY); + } + } + } + /** + * Handles mouse click events, select the marker and open the panel if necessary + */ + __onClick(e, dblclick) { + const threeMarker = this.__getTargetMarker(e.data.objects); + const stdMarker = this.__getTargetMarker(e.data.target, true); + const marker = stdMarker || threeMarker; + if (this.state.currentMarker && this.state.currentMarker !== marker) { + this.dispatchEvent(new UnselectMarkerEvent(this.state.currentMarker)); + this.viewer.panel.hide(ID_PANEL_MARKER); + if (!this.state.showAllTooltips && this.state.currentMarker.config.tooltip?.trigger === "click") { + this.hideMarkerTooltip(this.state.currentMarker.id); + } + this.state.currentMarker = null; + } + if (marker) { + this.state.currentMarker = marker; + this.dispatchEvent(new SelectMarkerEvent(marker, dblclick, e.data.rightclick)); + if (this.config.clickEventOnMarker) { + e.data.marker = marker; + } else { + e.stopImmediatePropagation(); + } + if (this.markers[marker.id]) { + if (marker.config.tooltip?.trigger === "click") { + if (marker.tooltip) { + this.hideMarkerTooltip(marker.id); + } else { + this.showMarkerTooltip(marker.id); + } + } else { + this.showMarkerPanel(marker.id); + } + } + } + } + __afterChangerMarkers() { + this.__refreshUi(); + this.__checkObjectsObserver(); + this.viewer.needsUpdate(); + this.dispatchEvent(new SetMarkersEvent(this.getMarkers())); + } + /** + * Updates the visiblity of the panel and the buttons + */ + __refreshUi() { + const nbMarkers = Object.values(this.markers).filter((m) => !m.config.hideList).length; + if (nbMarkers === 0) { + if (this.viewer.panel.isVisible(ID_PANEL_MARKERS_LIST) || this.viewer.panel.isVisible(ID_PANEL_MARKER)) { + this.viewer.panel.hide(); + } + } else { + if (this.viewer.panel.isVisible(ID_PANEL_MARKERS_LIST)) { + this.showMarkersList(); + } else if (this.viewer.panel.isVisible(ID_PANEL_MARKER)) { + this.state.currentMarker ? this.showMarkerPanel(this.state.currentMarker.id) : this.viewer.panel.hide(); + } + } + this.viewer.navbar.getButton(MarkersButton.id, false)?.toggle(nbMarkers > 0); + this.viewer.navbar.getButton(MarkersListButton.id, false)?.toggle(nbMarkers > 0); + } + /** + * Adds or remove the objects observer if there are 3D markers + */ + __checkObjectsObserver() { + const has3d = Object.values(this.markers).some((marker) => marker.is3d()); + if (has3d) { + this.viewer.observeObjects(MARKER_DATA); + } else { + this.viewer.unobserveObjects(MARKER_DATA); + } + } + }; + MarkersPlugin.id = "markers"; + MarkersPlugin.VERSION = "5.7.3"; + MarkersPlugin.configParser = getConfig; + MarkersPlugin.readonlyOptions = ["markers"]; + + // src/index.ts + import_core15.DEFAULTS.lang[MarkersButton.id] = "Markers"; + import_core15.DEFAULTS.lang[MarkersListButton.id] = "Markers list"; + (0, import_core15.registerButton)(MarkersButton, "caption:left"); + (0, import_core15.registerButton)(MarkersListButton, "caption:left"); + __copyProps(__defProp(exports, "__esModule", { value: true }), src_exports); + +}));//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/src/renderer/public/vrHtml/index.html b/src/renderer/public/vrHtml/index.html new file mode 100644 index 0000000..e3475d8 --- /dev/null +++ b/src/renderer/public/vrHtml/index.html @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/src/renderer/public/vrHtml/sun.jpg b/src/renderer/public/vrHtml/sun.jpg new file mode 100644 index 0000000..ecf859f Binary files /dev/null and b/src/renderer/public/vrHtml/sun.jpg differ diff --git a/src/renderer/public/vrHtml/three.min.js b/src/renderer/public/vrHtml/three.min.js new file mode 100644 index 0000000..e1651c6 --- /dev/null +++ b/src/renderer/public/vrHtml/three.min.js @@ -0,0 +1,7 @@ +console.warn('Scripts "build/three.js" and "build/three.min.js" are deprecated with r150+, and will be removed with r160. Please use ES Modules or alternatives: https://threejs.org/docs/index.html#manual/en/introduction/Installation'), +/** + * @license + * Copyright 2010-2023 Three.js Authors + * SPDX-License-Identifier: MIT + */ +function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).THREE={})}(this,(function(t){"use strict";const e="160",n=1,i=2,r=3,s=0,a=1,o=100,l=204,c=205,h=0,u=1,d=2,p=0,m=1,f=2,g=3,_=4,v=5,x=6,y="attached",M="detached",S=300,b=301,T=302,E=303,w=304,A=306,R=1e3,C=1001,L=1002,P=1003,I=1004,U=1005,D=1006,N=1007,O=1008,F=1009,B=1012,z=1013,G=1014,H=1015,V=1016,k=1017,W=1018,X=1020,j=1023,q=1026,Y=1027,Z=1029,J=1031,K=1033,$=33776,Q=33777,tt=33778,et=33779,nt=35840,it=35841,rt=35842,st=35843,at=36196,ot=37492,lt=37496,ct=37808,ht=37809,ut=37810,dt=37811,pt=37812,mt=37813,ft=37814,gt=37815,_t=37816,vt=37817,xt=37818,yt=37819,Mt=37820,St=37821,bt=36492,Tt=36494,Et=36495,wt=36284,At=36285,Rt=36286,Ct=2300,Lt=2301,Pt=2302,It=2400,Ut=2401,Dt=2402,Nt=2500,Ot=2501,Ft=3e3,Bt=3001,zt="",Gt="srgb",Ht="srgb-linear",Vt="display-p3",kt="display-p3-linear",Wt="linear",Xt="srgb",jt="rec709",qt="p3",Yt=7680,Zt=35044,Jt="300 es",Kt=1035,$t=2e3,Qt=2001;class te{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;const n=this._listeners[t];if(void 0!==n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}dispatchEvent(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const n=e.slice(0);for(let e=0,i=n.length;e>8&255]+ee[t>>16&255]+ee[t>>24&255]+"-"+ee[255&e]+ee[e>>8&255]+"-"+ee[e>>16&15|64]+ee[e>>24&255]+"-"+ee[63&n|128]+ee[n>>8&255]+"-"+ee[n>>16&255]+ee[n>>24&255]+ee[255&i]+ee[i>>8&255]+ee[i>>16&255]+ee[i>>24&255]).toLowerCase()}function ae(t,e,n){return Math.max(e,Math.min(n,t))}function oe(t,e){return(t%e+e)%e}function le(t,e,n){return(1-n)*t+n*e}function ce(t){return 0==(t&t-1)&&0!==t}function he(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function ue(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function de(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(4294967295*t);case Uint16Array:return Math.round(65535*t);case Uint8Array:return Math.round(255*t);case Int32Array:return Math.round(2147483647*t);case Int16Array:return Math.round(32767*t);case Int8Array:return Math.round(127*t);default:throw new Error("Invalid component type.")}}const pe={DEG2RAD:ie,RAD2DEG:re,generateUUID:se,clamp:ae,euclideanModulo:oe,mapLinear:function(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)},inverseLerp:function(t,e,n){return t!==e?(n-t)/(e-t):0},lerp:le,damp:function(t,e,n,i){return le(t,e,1-Math.exp(-n*i))},pingpong:function(t,e=1){return e-Math.abs(oe(t,2*e)-e)},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){void 0!==t&&(ne=t);let e=ne+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296},degToRad:function(t){return t*ie},radToDeg:function(t){return t*re},isPowerOfTwo:ce,ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:he,setQuaternionFromProperEuler:function(t,e,n,i,r){const s=Math.cos,a=Math.sin,o=s(n/2),l=a(n/2),c=s((e+i)/2),h=a((e+i)/2),u=s((e-i)/2),d=a((e-i)/2),p=s((i-e)/2),m=a((i-e)/2);switch(r){case"XYX":t.set(o*h,l*u,l*d,o*c);break;case"YZY":t.set(l*d,o*h,l*u,o*c);break;case"ZXZ":t.set(l*u,l*d,o*h,o*c);break;case"XZX":t.set(o*h,l*m,l*p,o*c);break;case"YXY":t.set(l*p,o*h,l*m,o*c);break;case"ZYZ":t.set(l*m,l*p,o*h,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize:de,denormalize:ue};class me{constructor(t=0,e=0){me.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(ae(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,s=this.y-t.y;return this.x=r*n-s*i+t.x,this.y=r*i+s*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class fe{constructor(t,e,n,i,r,s,a,o,l){fe.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==t&&this.set(t,e,n,i,r,s,a,o,l)}set(t,e,n,i,r,s,a,o,l){const c=this.elements;return c[0]=t,c[1]=i,c[2]=a,c[3]=e,c[4]=r,c[5]=o,c[6]=n,c[7]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],a=n[3],o=n[6],l=n[1],c=n[4],h=n[7],u=n[2],d=n[5],p=n[8],m=i[0],f=i[3],g=i[6],_=i[1],v=i[4],x=i[7],y=i[2],M=i[5],S=i[8];return r[0]=s*m+a*_+o*y,r[3]=s*f+a*v+o*M,r[6]=s*g+a*x+o*S,r[1]=l*m+c*_+h*y,r[4]=l*f+c*v+h*M,r[7]=l*g+c*x+h*S,r[2]=u*m+d*_+p*y,r[5]=u*f+d*v+p*M,r[8]=u*g+d*x+p*S,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8];return e*s*c-e*a*l-n*r*c+n*a*o+i*r*l-i*s*o}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=c*s-a*l,u=a*o-c*r,d=l*r-s*o,p=e*h+n*u+i*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return t[0]=h*m,t[1]=(i*l-c*n)*m,t[2]=(a*n-i*s)*m,t[3]=u*m,t[4]=(c*e-i*o)*m,t[5]=(i*r-a*e)*m,t[6]=d*m,t[7]=(n*o-l*e)*m,t[8]=(s*e-n*r)*m,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,r,s,a){const o=Math.cos(r),l=Math.sin(r);return this.set(n*o,n*l,-n*(o*s+l*a)+s+t,-i*l,i*o,-i*(-l*s+o*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(ge.makeScale(t,e)),this}rotate(t){return this.premultiply(ge.makeRotation(-t)),this}translate(t,e){return this.premultiply(ge.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<9;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}const ge=new fe;function _e(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const ve={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function xe(t,e){return new ve[t](e)}function ye(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function Me(){const t=ye("canvas");return t.style.display="block",t}const Se={};function be(t){t in Se||(Se[t]=!0,console.warn(t))}const Te=(new fe).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Ee=(new fe).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),we={[Ht]:{transfer:Wt,primaries:jt,toReference:t=>t,fromReference:t=>t},[Gt]:{transfer:Xt,primaries:jt,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[kt]:{transfer:Wt,primaries:qt,toReference:t=>t.applyMatrix3(Ee),fromReference:t=>t.applyMatrix3(Te)},[Vt]:{transfer:Xt,primaries:qt,toReference:t=>t.convertSRGBToLinear().applyMatrix3(Ee),fromReference:t=>t.applyMatrix3(Te).convertLinearToSRGB()}},Ae=new Set([Ht,kt]),Re={enabled:!0,_workingColorSpace:Ht,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!Ae.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(!1===this.enabled||e===n||!e||!n)return t;const i=we[e].toReference;return(0,we[n].fromReference)(i(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return we[t].primaries},getTransfer:function(t){return t===zt?Wt:we[t].transfer}};function Ce(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function Le(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}let Pe;class Ie{static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===Pe&&(Pe=ye("canvas")),Pe.width=t.width,Pe.height=t.height;const n=Pe.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=Pe}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const e=ye("canvas");e.width=t.width,e.height=t.height;const n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);const i=n.getImageData(0,0,t.width,t.height),r=i.data;for(let t=0;t0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==S)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case R:t.x=t.x-Math.floor(t.x);break;case C:t.x=t.x<0?0:1;break;case L:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case R:t.y=t.y-Math.floor(t.y);break;case C:t.y=t.y<0?0:1;break;case L:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return be("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Gt?Bt:Ft}set encoding(t){be("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=t===Bt?Gt:zt}}Fe.DEFAULT_IMAGE=null,Fe.DEFAULT_MAPPING=S,Fe.DEFAULT_ANISOTROPY=1;class Be{constructor(t=0,e=0,n=0,i=1){Be.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,r;const s=.01,a=.1,o=t.elements,l=o[0],c=o[4],h=o[8],u=o[1],d=o[5],p=o[9],m=o[2],f=o[6],g=o[10];if(Math.abs(c-u)o&&t>_?t_?o=0?1:-1,i=1-e*e;if(i>Number.EPSILON){const r=Math.sqrt(i),s=Math.atan2(r,e*n);t=Math.sin(t*s)/r,a=Math.sin(a*s)/r}const r=a*n;if(o=o*t+u*r,l=l*t+d*r,c=c*t+p*r,h=h*t+m*r,t===1-a){const t=1/Math.sqrt(o*o+l*l+c*c+h*h);o*=t,l*=t,c*=t,h*=t}}t[e]=o,t[e+1]=l,t[e+2]=c,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,i,r,s){const a=n[i],o=n[i+1],l=n[i+2],c=n[i+3],h=r[s],u=r[s+1],d=r[s+2],p=r[s+3];return t[e]=a*p+c*h+o*d-l*u,t[e+1]=o*p+c*u+l*h-a*d,t[e+2]=l*p+c*d+a*u-o*h,t[e+3]=c*p-a*h-o*u-l*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const n=t._x,i=t._y,r=t._z,s=t._order,a=Math.cos,o=Math.sin,l=a(n/2),c=a(i/2),h=a(r/2),u=o(n/2),d=o(i/2),p=o(r/2);switch(s){case"XYZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"YXZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"ZXY":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"ZYX":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"YZX":this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p;break;case"XZY":this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!0===e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,n=e[0],i=e[4],r=e[8],s=e[1],a=e[5],o=e[9],l=e[2],c=e[6],h=e[10],u=n+a+h;if(u>0){const t=.5/Math.sqrt(u+1);this._w=.25/t,this._x=(c-o)*t,this._y=(r-l)*t,this._z=(s-i)*t}else if(n>a&&n>h){const t=2*Math.sqrt(1+n-a-h);this._w=(c-o)/t,this._x=.25*t,this._y=(i+s)/t,this._z=(r+l)/t}else if(a>h){const t=2*Math.sqrt(1+a-n-h);this._w=(r-l)/t,this._x=(i+s)/t,this._y=.25*t,this._z=(o+c)/t}else{const t=2*Math.sqrt(1+h-n-a);this._w=(s-i)/t,this._x=(r+l)/t,this._y=(o+c)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return nMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(ae(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(0===n)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,s=t._w,a=e._x,o=e._y,l=e._z,c=e._w;return this._x=n*c+s*a+i*l-r*o,this._y=i*c+s*o+r*a-n*l,this._z=r*c+s*l+n*o-i*a,this._w=s*c-n*a-i*o-r*l,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const n=this._x,i=this._y,r=this._z,s=this._w;let a=s*t._w+n*t._x+i*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=n,this._y=i,this._z=r,this;const o=1-a*a;if(o<=Number.EPSILON){const t=1-e;return this._w=t*s+e*this._w,this._x=t*n+e*this._x,this._y=t*i+e*this._y,this._z=t*r+e*this._z,this.normalize(),this}const l=Math.sqrt(o),c=Math.atan2(l,a),h=Math.sin((1-e)*c)/l,u=Math.sin(e*c)/l;return this._w=s*h+this._w*u,this._x=n*h+this._x*u,this._y=i*h+this._y*u,this._z=r*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=Math.random(),e=Math.sqrt(1-t),n=Math.sqrt(t),i=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(e*Math.cos(i),n*Math.sin(r),n*Math.cos(r),e*Math.sin(i))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class We{constructor(t=0,e=0,n=0){We.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return void 0===n&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(je.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(je.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.elements,s=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*s,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*s,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*s,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z,o=t.w,l=2*(s*i-a*n),c=2*(a*e-r*i),h=2*(r*n-s*e);return this.x=e+o*l+s*h-a*c,this.y=n+o*c+a*l-r*h,this.z=i+o*h+r*c-s*l,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=i*o-r*a,this.y=r*s-n*o,this.z=n*a-i*s,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return Xe.copy(this).projectOnVector(t),this.sub(Xe)}reflect(t){return this.sub(Xe.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(ae(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){const i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=2*(Math.random()-.5),e=Math.random()*Math.PI*2,n=Math.sqrt(1-t**2);return this.x=n*Math.cos(e),this.y=n*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Xe=new We,je=new ke;class qe{constructor(t=new We(1/0,1/0,1/0),e=new We(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,Ze),Ze.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(rn),sn.subVectors(this.max,rn),Ke.subVectors(t.a,rn),$e.subVectors(t.b,rn),Qe.subVectors(t.c,rn),tn.subVectors($e,Ke),en.subVectors(Qe,$e),nn.subVectors(Ke,Qe);let e=[0,-tn.z,tn.y,0,-en.z,en.y,0,-nn.z,nn.y,tn.z,0,-tn.x,en.z,0,-en.x,nn.z,0,-nn.x,-tn.y,tn.x,0,-en.y,en.x,0,-nn.y,nn.x,0];return!!ln(e,Ke,$e,Qe,sn)&&(e=[1,0,0,0,1,0,0,0,1],!!ln(e,Ke,$e,Qe,sn)&&(an.crossVectors(tn,en),e=[an.x,an.y,an.z],ln(e,Ke,$e,Qe,sn)))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,Ze).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(Ze).length()),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(Ye[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Ye[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Ye[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Ye[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Ye[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Ye[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Ye[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Ye[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Ye)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const Ye=[new We,new We,new We,new We,new We,new We,new We,new We],Ze=new We,Je=new qe,Ke=new We,$e=new We,Qe=new We,tn=new We,en=new We,nn=new We,rn=new We,sn=new We,an=new We,on=new We;function ln(t,e,n,i,r){for(let s=0,a=t.length-3;s<=a;s+=3){on.fromArray(t,s);const a=r.x*Math.abs(on.x)+r.y*Math.abs(on.y)+r.z*Math.abs(on.z),o=e.dot(on),l=n.dot(on),c=i.dot(on);if(Math.max(-Math.max(o,l,c),Math.min(o,l,c))>a)return!1}return!0}const cn=new qe,hn=new We,un=new We;class dn{constructor(t=new We,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const n=this.center;void 0!==e?n.copy(e):cn.setFromPoints(t).getCenter(n);let i=0;for(let e=0,r=t.length;ethis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;hn.subVectors(t,this.center);const e=hn.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),n=.5*(t-this.radius);this.center.addScaledVector(hn,n/t),this.radius+=n}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(!0===this.center.equals(t.center)?this.radius=Math.max(this.radius,t.radius):(un.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(hn.copy(t.center).add(un)),this.expandByPoint(hn.copy(t.center).sub(un))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const pn=new We,mn=new We,fn=new We,gn=new We,_n=new We,vn=new We,xn=new We;class yn{constructor(t=new We,e=new We(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,pn)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=pn.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(pn.copy(this.origin).addScaledVector(this.direction,e),pn.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){mn.copy(t).add(e).multiplyScalar(.5),fn.copy(e).sub(t).normalize(),gn.copy(this.origin).sub(mn);const r=.5*t.distanceTo(e),s=-this.direction.dot(fn),a=gn.dot(this.direction),o=-gn.dot(fn),l=gn.lengthSq(),c=Math.abs(1-s*s);let h,u,d,p;if(c>0)if(h=s*o-a,u=s*a-o,p=r*c,h>=0)if(u>=-p)if(u<=p){const t=1/c;h*=t,u*=t,d=h*(h+s*u+2*a)+u*(s*h+u+2*o)+l}else u=r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u=-r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u<=-p?(h=Math.max(0,-(-s*r+a)),u=h>0?-r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l):u<=p?(h=0,u=Math.min(Math.max(-r,-o),r),d=u*(u+2*o)+l):(h=Math.max(0,-(s*r+a)),u=h>0?r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l);else u=s>0?-r:r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,h),i&&i.copy(mn).addScaledVector(fn,u),d}intersectSphere(t,e){pn.subVectors(t.center,this.origin);const n=pn.dot(this.direction),i=pn.dot(pn)-n*n,r=t.radius*t.radius;if(i>r)return null;const s=Math.sqrt(r-i),a=n-s,o=n+s;return o<0?null:a<0?this.at(o,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){const n=this.distanceToPlane(t);return null===n?null:this.at(n,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);if(0===e)return!0;return t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,r,s,a,o;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(n=(t.min.x-u.x)*l,i=(t.max.x-u.x)*l):(n=(t.max.x-u.x)*l,i=(t.min.x-u.x)*l),c>=0?(r=(t.min.y-u.y)*c,s=(t.max.y-u.y)*c):(r=(t.max.y-u.y)*c,s=(t.min.y-u.y)*c),n>s||r>i?null:((r>n||isNaN(n))&&(n=r),(s=0?(a=(t.min.z-u.z)*h,o=(t.max.z-u.z)*h):(a=(t.max.z-u.z)*h,o=(t.min.z-u.z)*h),n>o||a>i?null:((a>n||n!=n)&&(n=a),(o=0?n:i,e)))}intersectsBox(t){return null!==this.intersectBox(t,pn)}intersectTriangle(t,e,n,i,r){_n.subVectors(e,t),vn.subVectors(n,t),xn.crossVectors(_n,vn);let s,a=this.direction.dot(xn);if(a>0){if(i)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}gn.subVectors(this.origin,t);const o=s*this.direction.dot(vn.crossVectors(gn,vn));if(o<0)return null;const l=s*this.direction.dot(_n.cross(gn));if(l<0)return null;if(o+l>a)return null;const c=-s*gn.dot(xn);return c<0?null:this.at(c/a,r)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Mn{constructor(t,e,n,i,r,s,a,o,l,c,h,u,d,p,m,f){Mn.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==t&&this.set(t,e,n,i,r,s,a,o,l,c,h,u,d,p,m,f)}set(t,e,n,i,r,s,a,o,l,c,h,u,d,p,m,f){const g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=r,g[5]=s,g[9]=a,g[13]=o,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=p,g[11]=m,g[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Mn).fromArray(this.elements)}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){const e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,n=t.elements,i=1/Sn.setFromMatrixColumn(t,0).length(),r=1/Sn.setFromMatrixColumn(t,1).length(),s=1/Sn.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*s,e[9]=n[9]*s,e[10]=n[10]*s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,n=t.x,i=t.y,r=t.z,s=Math.cos(n),a=Math.sin(n),o=Math.cos(i),l=Math.sin(i),c=Math.cos(r),h=Math.sin(r);if("XYZ"===t.order){const t=s*c,n=s*h,i=a*c,r=a*h;e[0]=o*c,e[4]=-o*h,e[8]=l,e[1]=n+i*l,e[5]=t-r*l,e[9]=-a*o,e[2]=r-t*l,e[6]=i+n*l,e[10]=s*o}else if("YXZ"===t.order){const t=o*c,n=o*h,i=l*c,r=l*h;e[0]=t+r*a,e[4]=i*a-n,e[8]=s*l,e[1]=s*h,e[5]=s*c,e[9]=-a,e[2]=n*a-i,e[6]=r+t*a,e[10]=s*o}else if("ZXY"===t.order){const t=o*c,n=o*h,i=l*c,r=l*h;e[0]=t-r*a,e[4]=-s*h,e[8]=i+n*a,e[1]=n+i*a,e[5]=s*c,e[9]=r-t*a,e[2]=-s*l,e[6]=a,e[10]=s*o}else if("ZYX"===t.order){const t=s*c,n=s*h,i=a*c,r=a*h;e[0]=o*c,e[4]=i*l-n,e[8]=t*l+r,e[1]=o*h,e[5]=r*l+t,e[9]=n*l-i,e[2]=-l,e[6]=a*o,e[10]=s*o}else if("YZX"===t.order){const t=s*o,n=s*l,i=a*o,r=a*l;e[0]=o*c,e[4]=r-t*h,e[8]=i*h+n,e[1]=h,e[5]=s*c,e[9]=-a*c,e[2]=-l*c,e[6]=n*h+i,e[10]=t-r*h}else if("XZY"===t.order){const t=s*o,n=s*l,i=a*o,r=a*l;e[0]=o*c,e[4]=-h,e[8]=l*c,e[1]=t*h+r,e[5]=s*c,e[9]=n*h-i,e[2]=i*h-n,e[6]=a*c,e[10]=r*h+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Tn,t,En)}lookAt(t,e,n){const i=this.elements;return Rn.subVectors(t,e),0===Rn.lengthSq()&&(Rn.z=1),Rn.normalize(),wn.crossVectors(n,Rn),0===wn.lengthSq()&&(1===Math.abs(n.z)?Rn.x+=1e-4:Rn.z+=1e-4,Rn.normalize(),wn.crossVectors(n,Rn)),wn.normalize(),An.crossVectors(Rn,wn),i[0]=wn.x,i[4]=An.x,i[8]=Rn.x,i[1]=wn.y,i[5]=An.y,i[9]=Rn.y,i[2]=wn.z,i[6]=An.z,i[10]=Rn.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],a=n[4],o=n[8],l=n[12],c=n[1],h=n[5],u=n[9],d=n[13],p=n[2],m=n[6],f=n[10],g=n[14],_=n[3],v=n[7],x=n[11],y=n[15],M=i[0],S=i[4],b=i[8],T=i[12],E=i[1],w=i[5],A=i[9],R=i[13],C=i[2],L=i[6],P=i[10],I=i[14],U=i[3],D=i[7],N=i[11],O=i[15];return r[0]=s*M+a*E+o*C+l*U,r[4]=s*S+a*w+o*L+l*D,r[8]=s*b+a*A+o*P+l*N,r[12]=s*T+a*R+o*I+l*O,r[1]=c*M+h*E+u*C+d*U,r[5]=c*S+h*w+u*L+d*D,r[9]=c*b+h*A+u*P+d*N,r[13]=c*T+h*R+u*I+d*O,r[2]=p*M+m*E+f*C+g*U,r[6]=p*S+m*w+f*L+g*D,r[10]=p*b+m*A+f*P+g*N,r[14]=p*T+m*R+f*I+g*O,r[3]=_*M+v*E+x*C+y*U,r[7]=_*S+v*w+x*L+y*D,r[11]=_*b+v*A+x*P+y*N,r[15]=_*T+v*R+x*I+y*O,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[4],i=t[8],r=t[12],s=t[1],a=t[5],o=t[9],l=t[13],c=t[2],h=t[6],u=t[10],d=t[14];return t[3]*(+r*o*h-i*l*h-r*a*u+n*l*u+i*a*d-n*o*d)+t[7]*(+e*o*d-e*l*u+r*s*u-i*s*d+i*l*c-r*o*c)+t[11]*(+e*l*h-e*a*d-r*s*h+n*s*d+r*a*c-n*l*c)+t[15]*(-i*a*c-e*o*h+e*a*u+i*s*h-n*s*u+n*o*c)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=t[9],u=t[10],d=t[11],p=t[12],m=t[13],f=t[14],g=t[15],_=h*f*l-m*u*l+m*o*d-a*f*d-h*o*g+a*u*g,v=p*u*l-c*f*l-p*o*d+s*f*d+c*o*g-s*u*g,x=c*m*l-p*h*l+p*a*d-s*m*d-c*a*g+s*h*g,y=p*h*o-c*m*o-p*a*u+s*m*u+c*a*f-s*h*f,M=e*_+n*v+i*x+r*y;if(0===M)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const S=1/M;return t[0]=_*S,t[1]=(m*u*r-h*f*r-m*i*d+n*f*d+h*i*g-n*u*g)*S,t[2]=(a*f*r-m*o*r+m*i*l-n*f*l-a*i*g+n*o*g)*S,t[3]=(h*o*r-a*u*r-h*i*l+n*u*l+a*i*d-n*o*d)*S,t[4]=v*S,t[5]=(c*f*r-p*u*r+p*i*d-e*f*d-c*i*g+e*u*g)*S,t[6]=(p*o*r-s*f*r-p*i*l+e*f*l+s*i*g-e*o*g)*S,t[7]=(s*u*r-c*o*r+c*i*l-e*u*l-s*i*d+e*o*d)*S,t[8]=x*S,t[9]=(p*h*r-c*m*r-p*n*d+e*m*d+c*n*g-e*h*g)*S,t[10]=(s*m*r-p*a*r+p*n*l-e*m*l-s*n*g+e*a*g)*S,t[11]=(c*a*r-s*h*r-c*n*l+e*h*l+s*n*d-e*a*d)*S,t[12]=y*S,t[13]=(c*m*i-p*h*i+p*n*u-e*m*u-c*n*f+e*h*f)*S,t[14]=(p*a*i-s*m*i-p*n*o+e*m*o+s*n*f-e*a*f)*S,t[15]=(s*h*i-c*a*i+c*n*o-e*h*o-s*n*u+e*a*u)*S,this}scale(t){const e=this.elements,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,a=t.y,o=t.z,l=r*s,c=r*a;return this.set(l*s+n,l*a-i*o,l*o+i*a,0,l*a+i*o,c*a+n,c*o-i*s,0,l*o-i*a,c*o+i*s,r*o*o+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,r,s){return this.set(1,n,r,0,t,1,s,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){const i=this.elements,r=e._x,s=e._y,a=e._z,o=e._w,l=r+r,c=s+s,h=a+a,u=r*l,d=r*c,p=r*h,m=s*c,f=s*h,g=a*h,_=o*l,v=o*c,x=o*h,y=n.x,M=n.y,S=n.z;return i[0]=(1-(m+g))*y,i[1]=(d+x)*y,i[2]=(p-v)*y,i[3]=0,i[4]=(d-x)*M,i[5]=(1-(u+g))*M,i[6]=(f+_)*M,i[7]=0,i[8]=(p+v)*S,i[9]=(f-_)*S,i[10]=(1-(u+m))*S,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.elements;let r=Sn.set(i[0],i[1],i[2]).length();const s=Sn.set(i[4],i[5],i[6]).length(),a=Sn.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],bn.copy(this);const o=1/r,l=1/s,c=1/a;return bn.elements[0]*=o,bn.elements[1]*=o,bn.elements[2]*=o,bn.elements[4]*=l,bn.elements[5]*=l,bn.elements[6]*=l,bn.elements[8]*=c,bn.elements[9]*=c,bn.elements[10]*=c,e.setFromRotationMatrix(bn),n.x=r,n.y=s,n.z=a,this}makePerspective(t,e,n,i,r,s,a=2e3){const o=this.elements,l=2*r/(e-t),c=2*r/(n-i),h=(e+t)/(e-t),u=(n+i)/(n-i);let d,p;if(a===$t)d=-(s+r)/(s-r),p=-2*s*r/(s-r);else{if(a!==Qt)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);d=-s/(s-r),p=-s*r/(s-r)}return o[0]=l,o[4]=0,o[8]=h,o[12]=0,o[1]=0,o[5]=c,o[9]=u,o[13]=0,o[2]=0,o[6]=0,o[10]=d,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(t,e,n,i,r,s,a=2e3){const o=this.elements,l=1/(e-t),c=1/(n-i),h=1/(s-r),u=(e+t)*l,d=(n+i)*c;let p,m;if(a===$t)p=(s+r)*h,m=-2*h;else{if(a!==Qt)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);p=r*h,m=-1*h}return o[0]=2*l,o[4]=0,o[8]=0,o[12]=-u,o[1]=0,o[5]=2*c,o[9]=0,o[13]=-d,o[2]=0,o[6]=0,o[10]=m,o[14]=-p,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<16;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}const Sn=new We,bn=new Mn,Tn=new We(0,0,0),En=new We(1,1,1),wn=new We,An=new We,Rn=new We,Cn=new Mn,Ln=new ke;class Pn{constructor(t=0,e=0,n=0,i=Pn.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){const i=t.elements,r=i[0],s=i[4],a=i[8],o=i[1],l=i[5],c=i[9],h=i[2],u=i[6],d=i[10];switch(e){case"XYZ":this._y=Math.asin(ae(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-ae(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(ae(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(o,r));break;case"ZYX":this._y=Math.asin(-ae(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(o,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(ae(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-ae(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===n&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return Cn.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Cn,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return Ln.setFromEuler(this),this.setFromQuaternion(Ln,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Pn.DEFAULT_ORDER="XYZ";class In{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let t=0;t1){for(let t=0;t0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map((t=>({boxInitialized:t.boxInitialized,boxMin:t.box.min.toArray(),boxMax:t.box.max.toArray(),sphereInitialized:t.sphereInitialized,sphereRadius:t.sphere.radius,sphereCenter:t.sphere.center.toArray()}))),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(t),null!==this.boundingSphere&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),null!==this.boundingBox&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const n=e.shapes;if(Array.isArray(n))for(let e=0,i=n.length;e0){i.children=[];for(let e=0;e0){i.animations=[];for(let e=0;e0&&(n.geometries=e),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),a.length>0&&(n.images=a),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),h.length>0&&(n.nodes=h)}return n.object=i,n;function s(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(t,e,n,i,r){qn.subVectors(i,e),Yn.subVectors(n,e),Zn.subVectors(t,e);const s=qn.dot(qn),a=qn.dot(Yn),o=qn.dot(Zn),l=Yn.dot(Yn),c=Yn.dot(Zn),h=s*l-a*a;if(0===h)return r.set(0,0,0),null;const u=1/h,d=(l*o-a*c)*u,p=(s*c-a*o)*u;return r.set(1-d-p,p,d)}static containsPoint(t,e,n,i){return null!==this.getBarycoord(t,e,n,i,Jn)&&(Jn.x>=0&&Jn.y>=0&&Jn.x+Jn.y<=1)}static getUV(t,e,n,i,r,s,a,o){return!1===ii&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),ii=!0),this.getInterpolation(t,e,n,i,r,s,a,o)}static getInterpolation(t,e,n,i,r,s,a,o){return null===this.getBarycoord(t,e,n,i,Jn)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(r,Jn.x),o.addScaledVector(s,Jn.y),o.addScaledVector(a,Jn.z),o)}static isFrontFacing(t,e,n,i){return qn.subVectors(n,e),Yn.subVectors(t,e),qn.cross(Yn).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return qn.subVectors(this.c,this.b),Yn.subVectors(this.a,this.b),.5*qn.cross(Yn).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return ri.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return ri.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,n,i,r){return!1===ii&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),ii=!0),ri.getInterpolation(t,this.a,this.b,this.c,e,n,i,r)}getInterpolation(t,e,n,i,r){return ri.getInterpolation(t,this.a,this.b,this.c,e,n,i,r)}containsPoint(t){return ri.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return ri.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const n=this.a,i=this.b,r=this.c;let s,a;Kn.subVectors(i,n),$n.subVectors(r,n),ti.subVectors(t,n);const o=Kn.dot(ti),l=$n.dot(ti);if(o<=0&&l<=0)return e.copy(n);ei.subVectors(t,i);const c=Kn.dot(ei),h=$n.dot(ei);if(c>=0&&h<=c)return e.copy(i);const u=o*h-c*l;if(u<=0&&o>=0&&c<=0)return s=o/(o-c),e.copy(n).addScaledVector(Kn,s);ni.subVectors(t,r);const d=Kn.dot(ni),p=$n.dot(ni);if(p>=0&&d<=p)return e.copy(r);const m=d*l-o*p;if(m<=0&&l>=0&&p<=0)return a=l/(l-p),e.copy(n).addScaledVector($n,a);const f=c*p-d*h;if(f<=0&&h-c>=0&&d-p>=0)return Qn.subVectors(r,i),a=(h-c)/(h-c+(d-p)),e.copy(i).addScaledVector(Qn,a);const g=1/(f+m+u);return s=m*g,a=u*g,e.copy(n).addScaledVector(Kn,s).addScaledVector($n,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const si={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ai={h:0,s:0,l:0},oi={h:0,s:0,l:0};function li(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}class ci{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,n)}set(t,e,n){if(void 0===e&&void 0===n){const e=t;e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e)}else this.setRGB(t,e,n);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Gt){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Re.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=Re.workingColorSpace){return this.r=t,this.g=e,this.b=n,Re.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=Re.workingColorSpace){if(t=oe(t,1),e=ae(e,0,1),n=ae(n,0,1),0===e)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+e):n+e-n*e,r=2*n-i;this.r=li(r,i,t+1/3),this.g=li(r,i,t),this.b=li(r,i,t-1/3)}return Re.toWorkingColorSpace(this,i),this}setStyle(t,e=Gt){function n(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(t)){let r;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,e);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,e);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=i[1],r=n.length;if(3===r)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,e);if(6===r)return this.setHex(parseInt(n,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=Gt){const n=si[t.toLowerCase()];return void 0!==n?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Ce(t.r),this.g=Ce(t.g),this.b=Ce(t.b),this}copyLinearToSRGB(t){return this.r=Le(t.r),this.g=Le(t.g),this.b=Le(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Gt){return Re.fromWorkingColorSpace(hi.copy(this),t),65536*Math.round(ae(255*hi.r,0,255))+256*Math.round(ae(255*hi.g,0,255))+Math.round(ae(255*hi.b,0,255))}getHexString(t=Gt){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Re.workingColorSpace){Re.fromWorkingColorSpace(hi.copy(this),e);const n=hi.r,i=hi.g,r=hi.b,s=Math.max(n,i,r),a=Math.min(n,i,r);let o,l;const c=(a+s)/2;if(a===s)o=0,l=0;else{const t=s-a;switch(l=c<=.5?t/(s+a):t/(2-s-a),s){case n:o=(i-r)/t+(i0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const n=t[e];if(void 0===n){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}const i=this[e];void 0!==i?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n:console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`)}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function i(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),this.side!==s&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),this.blendSrc!==l&&(n.blendSrc=this.blendSrc),this.blendDst!==c&&(n.blendDst=this.blendDst),this.blendEquation!==o&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Yt&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Yt&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Yt&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),e){const e=i(t.textures),r=i(t.images);e.length>0&&(n.textures=e),r.length>0&&(n.images=r)}return n}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let n=null;if(null!==e){const t=e.length;n=new Array(t);for(let i=0;i!==t;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}}class pi extends di{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ci(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=h,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const mi=fi();function fi(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),i=new Uint32Array(512),r=new Uint32Array(512);for(let t=0;t<256;++t){const e=t-127;e<-27?(i[t]=0,i[256|t]=32768,r[t]=24,r[256|t]=24):e<-14?(i[t]=1024>>-e-14,i[256|t]=1024>>-e-14|32768,r[t]=-e-1,r[256|t]=-e-1):e<=15?(i[t]=e+15<<10,i[256|t]=e+15<<10|32768,r[t]=13,r[256|t]=13):e<128?(i[t]=31744,i[256|t]=64512,r[t]=24,r[256|t]=24):(i[t]=31744,i[256|t]=64512,r[t]=13,r[256|t]=13)}const s=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let t=1;t<1024;++t){let e=t<<13,n=0;for(;0==(8388608&e);)e<<=1,n-=8388608;e&=-8388609,n+=947912704,s[t]=e|n}for(let t=1024;t<2048;++t)s[t]=939524096+(t-1024<<13);for(let t=1;t<31;++t)a[t]=t<<23;a[31]=1199570944,a[32]=2147483648;for(let t=33;t<63;++t)a[t]=2147483648+(t-32<<23);a[63]=3347054592;for(let t=1;t<64;++t)32!==t&&(o[t]=1024);return{floatView:e,uint32View:n,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:a,offsetTable:o}}function gi(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=ae(t,-65504,65504),mi.floatView[0]=t;const e=mi.uint32View[0],n=e>>23&511;return mi.baseTable[n]+((8388607&e)>>mi.shiftTable[n])}function _i(t){const e=t>>10;return mi.uint32View[0]=mi.mantissaTable[mi.offsetTable[e]+(1023&t)]+mi.exponentTable[e],mi.floatView[0]}const vi={toHalfFloat:gi,fromHalfFloat:_i},xi=new We,yi=new me;class Mi{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=n,this.usage=Zt,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=H,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return console.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,r=this.itemSize;i0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const n=this.attributes;for(const e in n){const i=n[e];t.data.attributes[e]=i.toJSON(t.data)}const i={};let r=!1;for(const e in this.morphAttributes){const n=this.morphAttributes[e],s=[];for(let e=0,i=n.length;e0&&(i[e]=s,r=!0)}r&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return null!==a&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const n=t.index;null!==n&&this.setIndex(n.clone(e));const i=t.attributes;for(const t in i){const n=i[t];this.setAttribute(t,n.clone(e))}const r=t.morphAttributes;for(const t in r){const n=[],i=r[t];for(let t=0,r=i.length;t0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;t(t.far-t.near)**2)return}Ui.copy(r).invert(),Di.copy(t.ray).applyMatrix4(Ui),null!==n.boundingBox&&!1===Di.intersectsBox(n.boundingBox)||this._computeIntersections(t,e,Di)}}_computeIntersections(t,e,n){let i;const r=this.geometry,s=this.material,a=r.index,o=r.attributes.position,l=r.attributes.uv,c=r.attributes.uv1,h=r.attributes.normal,u=r.groups,d=r.drawRange;if(null!==a)if(Array.isArray(s))for(let r=0,o=u.length;rn.far?null:{distance:u,point:Zi.clone(),object:t}}(t,e,n,i,Fi,Bi,zi,Yi);if(d){r&&(Vi.fromBufferAttribute(r,c),ki.fromBufferAttribute(r,h),Wi.fromBufferAttribute(r,u),d.uv=ri.getInterpolation(Yi,Fi,Bi,zi,Vi,ki,Wi,new me)),o&&(Vi.fromBufferAttribute(o,c),ki.fromBufferAttribute(o,h),Wi.fromBufferAttribute(o,u),d.uv1=ri.getInterpolation(Yi,Fi,Bi,zi,Vi,ki,Wi,new me),d.uv2=d.uv1),l&&(Xi.fromBufferAttribute(l,c),ji.fromBufferAttribute(l,h),qi.fromBufferAttribute(l,u),d.normal=ri.getInterpolation(Yi,Fi,Bi,zi,Xi,ji,qi,new We),d.normal.dot(i.direction)>0&&d.normal.multiplyScalar(-1));const t={a:c,b:h,c:u,normal:new We,materialIndex:0};ri.getNormal(Fi,Bi,zi,t.normal),d.face=t}return d}class $i extends Ii{constructor(t=1,e=1,n=1,i=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:r,depthSegments:s};const a=this;i=Math.floor(i),r=Math.floor(r),s=Math.floor(s);const o=[],l=[],c=[],h=[];let u=0,d=0;function p(t,e,n,i,r,s,p,m,f,g,_){const v=s/f,x=p/g,y=s/2,M=p/2,S=m/2,b=f+1,T=g+1;let E=0,w=0;const A=new We;for(let s=0;s0?1:-1,c.push(A.x,A.y,A.z),h.push(o/f),h.push(1-s/g),E+=1}}for(let t=0;t0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const n={};for(const t in this.extensions)!0===this.extensions[t]&&(n[t]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}}class rr extends jn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Mn,this.projectionMatrix=new Mn,this.projectionMatrixInverse=new Mn,this.coordinateSystem=$t}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class sr extends rr{constructor(t=50,e=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*re*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*ie*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*re*Math.atan(Math.tan(.5*ie*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,n,i,r,s){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*ie*this.fov)/this.zoom,n=2*e,i=this.aspect*n,r=-.5*i;const s=this.view;if(null!==this.view&&this.view.enabled){const t=s.fullWidth,a=s.fullHeight;r+=s.offsetX*i/t,e-=s.offsetY*n/a,i*=s.width/t,n*=s.height/a}const a=this.filmOffset;0!==a&&(r+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,e,e-n,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}const ar=-90;class or extends jn{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new sr(ar,1,t,e);i.layers=this.layers,this.add(i);const r=new sr(ar,1,t,e);r.layers=this.layers,this.add(r);const s=new sr(ar,1,t,e);s.layers=this.layers,this.add(s);const a=new sr(ar,1,t,e);a.layers=this.layers,this.add(a);const o=new sr(ar,1,t,e);o.layers=this.layers,this.add(o);const l=new sr(ar,1,t,e);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[n,i,r,s,a,o]=e;for(const t of e)this.remove(t);if(t===$t)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else{if(t!==Qt)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1)}for(const t of e)this.add(t),t.updateMatrixWorld()}update(t,e){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[r,s,a,o,l,c]=this.children,h=t.getRenderTarget(),u=t.getActiveCubeFace(),d=t.getActiveMipmapLevel(),p=t.xr.enabled;t.xr.enabled=!1;const m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0,i),t.render(e,r),t.setRenderTarget(n,1,i),t.render(e,s),t.setRenderTarget(n,2,i),t.render(e,a),t.setRenderTarget(n,3,i),t.render(e,o),t.setRenderTarget(n,4,i),t.render(e,l),n.texture.generateMipmaps=m,t.setRenderTarget(n,5,i),t.render(e,c),t.setRenderTarget(h,u,d),t.xr.enabled=p,n.texture.needsPMREMUpdate=!0}}class lr extends Fe{constructor(t,e,n,i,r,s,a,o,l,c){super(t=void 0!==t?t:[],e=void 0!==e?e:b,n,i,r,s,a,o,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class cr extends Ge{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1},i=[n,n,n,n,n,n];void 0!==e.encoding&&(be("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),e.colorSpace=e.encoding===Bt?Gt:zt),this.texture=new lr(i,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:D}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},i=new $i(5,5,5),r=new ir({name:"CubemapFromEquirect",uniforms:Qi(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:a,blending:0});r.uniforms.tEquirect.value=e;const s=new Ji(i,r),o=e.minFilter;e.minFilter===O&&(e.minFilter=D);return new or(1,10,this).update(t,s),e.minFilter=o,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,n,i){const r=t.getRenderTarget();for(let r=0;r<6;r++)t.setRenderTarget(this,r),t.clear(e,n,i);t.setRenderTarget(r)}}const hr=new We,ur=new We,dr=new fe;class pr{constructor(t=new We(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){const i=hr.subVectors(n,e).cross(ur.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const n=t.delta(hr),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:e.copy(t.start).addScaledVector(n,r)}intersectsLine(t){const e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const n=e||dr.getNormalMatrix(t),i=this.coplanarPoint(hr).applyMatrix4(t),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const mr=new dn,fr=new We;class gr{constructor(t=new pr,e=new pr,n=new pr,i=new pr,r=new pr,s=new pr){this.planes=[t,e,n,i,r,s]}set(t,e,n,i,r,s){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(i),a[4].copy(r),a[5].copy(s),this}copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t,e=2e3){const n=this.planes,i=t.elements,r=i[0],s=i[1],a=i[2],o=i[3],l=i[4],c=i[5],h=i[6],u=i[7],d=i[8],p=i[9],m=i[10],f=i[11],g=i[12],_=i[13],v=i[14],x=i[15];if(n[0].setComponents(o-r,u-l,f-d,x-g).normalize(),n[1].setComponents(o+r,u+l,f+d,x+g).normalize(),n[2].setComponents(o+s,u+c,f+p,x+_).normalize(),n[3].setComponents(o-s,u-c,f-p,x-_).normalize(),n[4].setComponents(o-a,u-h,f-m,x-v).normalize(),e===$t)n[5].setComponents(o+a,u+h,f+m,x+v).normalize();else{if(e!==Qt)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);n[5].setComponents(a,h,m,v).normalize()}return this}intersectsObject(t){if(void 0!==t.boundingSphere)null===t.boundingSphere&&t.computeBoundingSphere(),mr.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),mr.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(mr)}intersectsSprite(t){return mr.center.set(0,0,0),mr.radius=.7071067811865476,mr.applyMatrix4(t.matrixWorld),this.intersectsSphere(mr)}intersectsSphere(t){const e=this.planes,n=t.center,i=-t.radius;for(let t=0;t<6;t++){if(e[t].distanceToPoint(n)0?t.max.x:t.min.x,fr.y=i.normal.y>0?t.max.y:t.min.y,fr.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(fr)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function _r(){let t=null,e=!1,n=null,i=null;function r(e,s){n(e,s),i=t.requestAnimationFrame(r)}return{start:function(){!0!==e&&null!==n&&(i=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(t){n=t},setContext:function(e){t=e}}}function vr(t,e){const n=e.isWebGL2,i=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),i.get(t)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);const n=i.get(e);n&&(t.deleteBuffer(n.buffer),i.delete(e))},update:function(e,r){if(e.isGLBufferAttribute){const t=i.get(e);return void((!t||t.version 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor *= toneMappingExposure;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\treturn color;\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},Mr={common:{diffuse:{value:new ci(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new fe},alphaMap:{value:null},alphaMapTransform:{value:new fe},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new fe}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new fe}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new fe}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new fe},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new fe},normalScale:{value:new me(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new fe},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new fe}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new fe}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new fe}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ci(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ci(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new fe},alphaTest:{value:0},uvTransform:{value:new fe}},sprite:{diffuse:{value:new ci(16777215)},opacity:{value:1},center:{value:new me(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new fe},alphaMap:{value:null},alphaMapTransform:{value:new fe},alphaTest:{value:0}}},Sr={basic:{uniforms:tr([Mr.common,Mr.specularmap,Mr.envmap,Mr.aomap,Mr.lightmap,Mr.fog]),vertexShader:yr.meshbasic_vert,fragmentShader:yr.meshbasic_frag},lambert:{uniforms:tr([Mr.common,Mr.specularmap,Mr.envmap,Mr.aomap,Mr.lightmap,Mr.emissivemap,Mr.bumpmap,Mr.normalmap,Mr.displacementmap,Mr.fog,Mr.lights,{emissive:{value:new ci(0)}}]),vertexShader:yr.meshlambert_vert,fragmentShader:yr.meshlambert_frag},phong:{uniforms:tr([Mr.common,Mr.specularmap,Mr.envmap,Mr.aomap,Mr.lightmap,Mr.emissivemap,Mr.bumpmap,Mr.normalmap,Mr.displacementmap,Mr.fog,Mr.lights,{emissive:{value:new ci(0)},specular:{value:new ci(1118481)},shininess:{value:30}}]),vertexShader:yr.meshphong_vert,fragmentShader:yr.meshphong_frag},standard:{uniforms:tr([Mr.common,Mr.envmap,Mr.aomap,Mr.lightmap,Mr.emissivemap,Mr.bumpmap,Mr.normalmap,Mr.displacementmap,Mr.roughnessmap,Mr.metalnessmap,Mr.fog,Mr.lights,{emissive:{value:new ci(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:yr.meshphysical_vert,fragmentShader:yr.meshphysical_frag},toon:{uniforms:tr([Mr.common,Mr.aomap,Mr.lightmap,Mr.emissivemap,Mr.bumpmap,Mr.normalmap,Mr.displacementmap,Mr.gradientmap,Mr.fog,Mr.lights,{emissive:{value:new ci(0)}}]),vertexShader:yr.meshtoon_vert,fragmentShader:yr.meshtoon_frag},matcap:{uniforms:tr([Mr.common,Mr.bumpmap,Mr.normalmap,Mr.displacementmap,Mr.fog,{matcap:{value:null}}]),vertexShader:yr.meshmatcap_vert,fragmentShader:yr.meshmatcap_frag},points:{uniforms:tr([Mr.points,Mr.fog]),vertexShader:yr.points_vert,fragmentShader:yr.points_frag},dashed:{uniforms:tr([Mr.common,Mr.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:yr.linedashed_vert,fragmentShader:yr.linedashed_frag},depth:{uniforms:tr([Mr.common,Mr.displacementmap]),vertexShader:yr.depth_vert,fragmentShader:yr.depth_frag},normal:{uniforms:tr([Mr.common,Mr.bumpmap,Mr.normalmap,Mr.displacementmap,{opacity:{value:1}}]),vertexShader:yr.meshnormal_vert,fragmentShader:yr.meshnormal_frag},sprite:{uniforms:tr([Mr.sprite,Mr.fog]),vertexShader:yr.sprite_vert,fragmentShader:yr.sprite_frag},background:{uniforms:{uvTransform:{value:new fe},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:yr.background_vert,fragmentShader:yr.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:yr.backgroundCube_vert,fragmentShader:yr.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:yr.cube_vert,fragmentShader:yr.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:yr.equirect_vert,fragmentShader:yr.equirect_frag},distanceRGBA:{uniforms:tr([Mr.common,Mr.displacementmap,{referencePosition:{value:new We},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:yr.distanceRGBA_vert,fragmentShader:yr.distanceRGBA_frag},shadow:{uniforms:tr([Mr.lights,Mr.fog,{color:{value:new ci(0)},opacity:{value:1}}]),vertexShader:yr.shadow_vert,fragmentShader:yr.shadow_frag}};Sr.physical={uniforms:tr([Sr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new fe},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new fe},clearcoatNormalScale:{value:new me(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new fe},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new fe},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new fe},sheen:{value:0},sheenColor:{value:new ci(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new fe},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new fe},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new fe},transmissionSamplerSize:{value:new me},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new fe},attenuationDistance:{value:0},attenuationColor:{value:new ci(0)},specularColor:{value:new ci(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new fe},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new fe},anisotropyVector:{value:new me},anisotropyMap:{value:null},anisotropyMapTransform:{value:new fe}}]),vertexShader:yr.meshphysical_vert,fragmentShader:yr.meshphysical_frag};const br={r:0,b:0,g:0};function Tr(t,e,n,i,r,o,l){const c=new ci(0);let h,u,d=!0===o?0:1,p=null,m=0,f=null;function g(e,n){e.getRGB(br,er(t)),i.buffers.color.setClear(br.r,br.g,br.b,n,l)}return{getClearColor:function(){return c},setClearColor:function(t,e=1){c.set(t),d=e,g(c,d)},getClearAlpha:function(){return d},setClearAlpha:function(t){d=t,g(c,d)},render:function(o,_){let v=!1,x=!0===_.isScene?_.background:null;if(x&&x.isTexture){x=(_.backgroundBlurriness>0?n:e).get(x)}null===x?g(c,d):x&&x.isColor&&(g(x,1),v=!0);const y=t.xr.getEnvironmentBlendMode();"additive"===y?i.buffers.color.setClear(0,0,0,1,l):"alpha-blend"===y&&i.buffers.color.setClear(0,0,0,0,l),(t.autoClear||v)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),x&&(x.isCubeTexture||x.mapping===A)?(void 0===u&&(u=new Ji(new $i(1,1,1),new ir({name:"BackgroundCubeMaterial",uniforms:Qi(Sr.backgroundCube.uniforms),vertexShader:Sr.backgroundCube.vertexShader,fragmentShader:Sr.backgroundCube.fragmentShader,side:a,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),u.material.uniforms.envMap.value=x,u.material.uniforms.flipEnvMap.value=x.isCubeTexture&&!1===x.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=_.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,u.material.toneMapped=Re.getTransfer(x.colorSpace)!==Xt,p===x&&m===x.version&&f===t.toneMapping||(u.material.needsUpdate=!0,p=x,m=x.version,f=t.toneMapping),u.layers.enableAll(),o.unshift(u,u.geometry,u.material,0,0,null)):x&&x.isTexture&&(void 0===h&&(h=new Ji(new xr(2,2),new ir({name:"BackgroundMaterial",uniforms:Qi(Sr.background.uniforms),vertexShader:Sr.background.vertexShader,fragmentShader:Sr.background.fragmentShader,side:s,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),Object.defineProperty(h.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(h)),h.material.uniforms.t2D.value=x,h.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,h.material.toneMapped=Re.getTransfer(x.colorSpace)!==Xt,!0===x.matrixAutoUpdate&&x.updateMatrix(),h.material.uniforms.uvTransform.value.copy(x.matrix),p===x&&m===x.version&&f===t.toneMapping||(h.material.needsUpdate=!0,p=x,m=x.version,f=t.toneMapping),h.layers.enableAll(),o.unshift(h,h.geometry,h.material,0,0,null))}}}function Er(t,e,n,i){const r=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),a=i.isWebGL2||null!==s,o={},l=p(null);let c=l,h=!1;function u(e){return i.isWebGL2?t.bindVertexArray(e):s.bindVertexArrayOES(e)}function d(e){return i.isWebGL2?t.deleteVertexArray(e):s.deleteVertexArrayOES(e)}function p(t){const e=[],n=[],i=[];for(let t=0;t=0){const n=r[e];let i=s[e];if(void 0===i&&("instanceMatrix"===e&&t.instanceMatrix&&(i=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(i=t.instanceColor)),void 0===n)return!0;if(n.attribute!==i)return!0;if(i&&n.data!==i.data)return!0;a++}}return c.attributesNum!==a||c.index!==i}(r,x,d,y),M&&function(t,e,n,i){const r={},s=e.attributes;let a=0;const o=n.getAttributes();for(const e in o){if(o[e].location>=0){let n=s[e];void 0===n&&("instanceMatrix"===e&&t.instanceMatrix&&(n=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(n=t.instanceColor));const i={};i.attribute=n,n&&n.data&&(i.data=n.data),r[e]=i,a++}}c.attributes=r,c.attributesNum=a,c.index=i}(r,x,d,y)}else{const t=!0===l.wireframe;c.geometry===x.id&&c.program===d.id&&c.wireframe===t||(c.geometry=x.id,c.program=d.id,c.wireframe=t,M=!0)}null!==y&&n.update(y,t.ELEMENT_ARRAY_BUFFER),(M||h)&&(h=!1,function(r,s,a,o){if(!1===i.isWebGL2&&(r.isInstancedMesh||o.isInstancedBufferGeometry)&&null===e.get("ANGLE_instanced_arrays"))return;m();const l=o.attributes,c=a.getAttributes(),h=s.defaultAttributeValues;for(const e in c){const s=c[e];if(s.location>=0){let a=l[e];if(void 0===a&&("instanceMatrix"===e&&r.instanceMatrix&&(a=r.instanceMatrix),"instanceColor"===e&&r.instanceColor&&(a=r.instanceColor)),void 0!==a){const e=a.normalized,l=a.itemSize,c=n.get(a);if(void 0===c)continue;const h=c.buffer,u=c.type,d=c.bytesPerElement,p=!0===i.isWebGL2&&(u===t.INT||u===t.UNSIGNED_INT||a.gpuType===z);if(a.isInterleavedBufferAttribute){const n=a.data,i=n.stride,c=a.offset;if(n.isInstancedInterleavedBuffer){for(let t=0;t0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===t.constructor.name;let a=void 0!==n.precision?n.precision:"highp";const o=r(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);const l=s||e.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,h=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=t.getParameter(t.MAX_TEXTURE_SIZE),p=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),m=t.getParameter(t.MAX_VERTEX_ATTRIBS),f=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),g=t.getParameter(t.MAX_VARYING_VECTORS),_=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,x=s||e.has("OES_texture_float");return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===e.has("EXT_texture_filter_anisotropic")){const n=e.get("EXT_texture_filter_anisotropic");i=t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:r,precision:a,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:p,maxAttributes:m,maxVertexUniforms:f,maxVaryings:g,maxFragmentUniforms:_,vertexTextures:v,floatFragmentTextures:x,floatVertexTextures:v&&x,maxSamples:s?t.getParameter(t.MAX_SAMPLES):0}}function Rr(t){const e=this;let n=null,i=0,r=!1,s=!1;const a=new pr,o=new fe,l={value:null,needsUpdate:!1};function c(t,n,i,r){const s=null!==t?t.length:0;let c=null;if(0!==s){if(c=l.value,!0!==r||null===c){const e=i+4*s,r=n.matrixWorldInverse;o.getNormalMatrix(r),(null===c||c.length0);e.numPlanes=i,e.numIntersection=0}();else{const t=s?0:i,e=4*t;let r=m.clippingState||null;l.value=r,r=c(u,o,e,h);for(let t=0;t!==e;++t)r[t]=n[t];m.clippingState=r,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=t}}}function Cr(t){let e=new WeakMap;function n(t,e){return e===E?t.mapping=b:e===w&&(t.mapping=T),t}function i(t){const n=t.target;n.removeEventListener("dispose",i);const r=e.get(n);void 0!==r&&(e.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture){const s=r.mapping;if(s===E||s===w){if(e.has(r)){return n(e.get(r).texture,r.mapping)}{const s=r.image;if(s&&s.height>0){const a=new cr(s.height/2);return a.fromEquirectangularTexture(t,r),e.set(r,a),r.addEventListener("dispose",i),n(a.texture,r.mapping)}return null}}}return r},dispose:function(){e=new WeakMap}}}class Lr extends rr{constructor(t=-1,e=1,n=1,i=-1,r=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=i,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,n,i,r,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-t,s=n+t,a=i+e,o=i-e;if(null!==this.view&&this.view.enabled){const t=(this.right-this.left)/this.view.fullWidth/this.zoom,e=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=t*this.view.offsetX,s=r+t*this.view.width,a-=e*this.view.offsetY,o=a-e*this.view.height}this.projectionMatrix.makeOrthographic(r,s,a,o,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}const Pr=[.125,.215,.35,.446,.526,.582],Ir=20,Ur=new Lr,Dr=new ci;let Nr=null,Or=0,Fr=0;const Br=(1+Math.sqrt(5))/2,zr=1/Br,Gr=[new We(1,1,1),new We(-1,1,1),new We(1,1,-1),new We(-1,1,-1),new We(0,Br,zr),new We(0,Br,-zr),new We(zr,0,Br),new We(-zr,0,Br),new We(Br,zr,0),new We(-Br,zr,0)];class Hr{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,n=.1,i=100){Nr=this._renderer.getRenderTarget(),Or=this._renderer.getActiveCubeFace(),Fr=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(t,n,i,r),e>0&&this._blur(r,0,0,e),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=Xr(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=Wr(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let t=0;tt-4?o=Pr[a-t+4-1]:0===a&&(o=0),i.push(o);const l=1/(s-2),c=-l,h=1+l,u=[c,c,h,c,h,h,c,c,h,h,c,h],d=6,p=6,m=3,f=2,g=1,_=new Float32Array(m*p*d),v=new Float32Array(f*p*d),x=new Float32Array(g*p*d);for(let t=0;t2?0:-1,i=[e,n,0,e+2/3,n,0,e+2/3,n+1,0,e,n,0,e+2/3,n+1,0,e,n+1,0];_.set(i,m*p*t),v.set(u,f*p*t);const r=[t,t,t,t,t,t];x.set(r,g*p*t)}const y=new Ii;y.setAttribute("position",new Mi(_,m)),y.setAttribute("uv",new Mi(v,f)),y.setAttribute("faceIndex",new Mi(x,g)),e.push(y),r>4&&r--}return{lodPlanes:e,sizeLods:n,sigmas:i}}(i)),this._blurMaterial=function(t,e,n){const i=new Float32Array(Ir),r=new We(0,1,0),s=new ir({name:"SphericalGaussianBlur",defines:{n:Ir,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:jr(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1});return s}(i,t,e)}return i}_compileMaterial(t){const e=new Ji(this._lodPlanes[0],t);this._renderer.compile(e,Ur)}_sceneToCubeUV(t,e,n,i){const r=new sr(90,1,e,n),s=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],l=this._renderer,c=l.autoClear,h=l.toneMapping;l.getClearColor(Dr),l.toneMapping=p,l.autoClear=!1;const u=new pi({name:"PMREM.Background",side:a,depthWrite:!1,depthTest:!1}),d=new Ji(new $i,u);let m=!1;const f=t.background;f?f.isColor&&(u.color.copy(f),t.background=null,m=!0):(u.color.copy(Dr),m=!0);for(let e=0;e<6;e++){const n=e%3;0===n?(r.up.set(0,s[e],0),r.lookAt(o[e],0,0)):1===n?(r.up.set(0,0,s[e]),r.lookAt(0,o[e],0)):(r.up.set(0,s[e],0),r.lookAt(0,0,o[e]));const a=this._cubeSize;kr(i,n*a,e>2?a:0,a,a),l.setRenderTarget(i),m&&l.render(d,r),l.render(t,r)}d.geometry.dispose(),d.material.dispose(),l.toneMapping=h,l.autoClear=c,t.background=f}_textureToCubeUV(t,e){const n=this._renderer,i=t.mapping===b||t.mapping===T;i?(null===this._cubemapMaterial&&(this._cubemapMaterial=Xr()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=Wr());const r=i?this._cubemapMaterial:this._equirectMaterial,s=new Ji(this._lodPlanes[0],r);r.uniforms.envMap.value=t;const a=this._cubeSize;kr(e,0,0,3*a,2*a),n.setRenderTarget(e),n.render(s,Ur)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;for(let e=1;eIr&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${m} samples when the maximum is set to 20`);const f=[];let g=0;for(let t=0;t_-4?i-_+4:0),4*(this._cubeSize-v),3*v,2*v),o.setRenderTarget(e),o.render(c,Ur)}}function Vr(t,e,n){const i=new Ge(t,e,n);return i.texture.mapping=A,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function kr(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function Wr(){return new ir({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:jr(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function Xr(){return new ir({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:jr(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function jr(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function qr(t){let e=new WeakMap,n=null;function i(t){const n=t.target;n.removeEventListener("dispose",i);const r=e.get(n);void 0!==r&&(e.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture){const s=r.mapping,a=s===E||s===w,o=s===b||s===T;if(a||o){if(r.isRenderTargetTexture&&!0===r.needsPMREMUpdate){r.needsPMREMUpdate=!1;let i=e.get(r);return null===n&&(n=new Hr(t)),i=a?n.fromEquirectangular(r,i):n.fromCubemap(r,i),e.set(r,i),i.texture}if(e.has(r))return e.get(r).texture;{const s=r.image;if(a&&s&&s.height>0||o&&s&&function(t){let e=0;const n=6;for(let i=0;ie.maxTextureSize&&(E=Math.ceil(T/e.maxTextureSize),T=e.maxTextureSize);const w=new Float32Array(T*E*4*p),A=new He(w,T,E,p);A.type=H,A.needsUpdate=!0;const R=4*b;for(let L=0;L0)return t;const r=e*n;let s=ls[r];if(void 0===s&&(s=new Float32Array(r),ls[r]=s),0!==e){i.toArray(s,0);for(let i=1,r=0;i!==e;++i)r+=n,t[i].toArray(s,r)}return s}function ms(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n":" "} ${r}: ${n[t]}`)}return i.join("\n")}(t.getShaderSource(e),i)}return r}function da(t,e){const n=function(t){const e=Re.getPrimaries(Re.workingColorSpace),n=Re.getPrimaries(t);let i;switch(e===n?i="":e===qt&&n===jt?i="LinearDisplayP3ToLinearSRGB":e===jt&&n===qt&&(i="LinearSRGBToLinearDisplayP3"),t){case Ht:case kt:return[i,"LinearTransferOETF"];case Gt:case Vt:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[i,"LinearTransferOETF"]}}(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function pa(t,e){let n;switch(e){case m:n="Linear";break;case f:n="Reinhard";break;case g:n="OptimizedCineon";break;case _:n="ACESFilmic";break;case x:n="AgX";break;case v:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function ma(t){return""!==t}function fa(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function ga(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const _a=/^[ \t]*#include +<([\w\d./]+)>/gm;function va(t){return t.replace(_a,ya)}const xa=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function ya(t,e){let n=yr[e];if(void 0===n){const t=xa.get(e);if(void 0===t)throw new Error("Can not resolve #include <"+e+">");n=yr[t],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,t)}return va(n)}const Ma=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Sa(t){return t.replace(Ma,ba)}function ba(t,e,n,i){let r="";for(let t=parseInt(e);t0&&(w+="\n"),R=[y,"#define SHADER_TYPE "+s.shaderType,"#define SHADER_NAME "+s.shaderName,S].filter(ma).join("\n"),R.length>0&&(R+="\n")):(w=[Ta(s),"#define SHADER_TYPE "+s.shaderType,"#define SHADER_NAME "+s.shaderName,S,s.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",s.batching?"#define USE_BATCHING":"",s.instancing?"#define USE_INSTANCING":"",s.instancingColor?"#define USE_INSTANCING_COLOR":"",s.useFog&&s.fog?"#define USE_FOG":"",s.useFog&&s.fogExp2?"#define FOG_EXP2":"",s.map?"#define USE_MAP":"",s.envMap?"#define USE_ENVMAP":"",s.envMap?"#define "+_:"",s.lightMap?"#define USE_LIGHTMAP":"",s.aoMap?"#define USE_AOMAP":"",s.bumpMap?"#define USE_BUMPMAP":"",s.normalMap?"#define USE_NORMALMAP":"",s.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",s.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",s.displacementMap?"#define USE_DISPLACEMENTMAP":"",s.emissiveMap?"#define USE_EMISSIVEMAP":"",s.anisotropy?"#define USE_ANISOTROPY":"",s.anisotropyMap?"#define USE_ANISOTROPYMAP":"",s.clearcoatMap?"#define USE_CLEARCOATMAP":"",s.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",s.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",s.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",s.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",s.specularMap?"#define USE_SPECULARMAP":"",s.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",s.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",s.roughnessMap?"#define USE_ROUGHNESSMAP":"",s.metalnessMap?"#define USE_METALNESSMAP":"",s.alphaMap?"#define USE_ALPHAMAP":"",s.alphaHash?"#define USE_ALPHAHASH":"",s.transmission?"#define USE_TRANSMISSION":"",s.transmissionMap?"#define USE_TRANSMISSIONMAP":"",s.thicknessMap?"#define USE_THICKNESSMAP":"",s.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",s.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",s.mapUv?"#define MAP_UV "+s.mapUv:"",s.alphaMapUv?"#define ALPHAMAP_UV "+s.alphaMapUv:"",s.lightMapUv?"#define LIGHTMAP_UV "+s.lightMapUv:"",s.aoMapUv?"#define AOMAP_UV "+s.aoMapUv:"",s.emissiveMapUv?"#define EMISSIVEMAP_UV "+s.emissiveMapUv:"",s.bumpMapUv?"#define BUMPMAP_UV "+s.bumpMapUv:"",s.normalMapUv?"#define NORMALMAP_UV "+s.normalMapUv:"",s.displacementMapUv?"#define DISPLACEMENTMAP_UV "+s.displacementMapUv:"",s.metalnessMapUv?"#define METALNESSMAP_UV "+s.metalnessMapUv:"",s.roughnessMapUv?"#define ROUGHNESSMAP_UV "+s.roughnessMapUv:"",s.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+s.anisotropyMapUv:"",s.clearcoatMapUv?"#define CLEARCOATMAP_UV "+s.clearcoatMapUv:"",s.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+s.clearcoatNormalMapUv:"",s.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+s.clearcoatRoughnessMapUv:"",s.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+s.iridescenceMapUv:"",s.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+s.iridescenceThicknessMapUv:"",s.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+s.sheenColorMapUv:"",s.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+s.sheenRoughnessMapUv:"",s.specularMapUv?"#define SPECULARMAP_UV "+s.specularMapUv:"",s.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+s.specularColorMapUv:"",s.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+s.specularIntensityMapUv:"",s.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+s.transmissionMapUv:"",s.thicknessMapUv?"#define THICKNESSMAP_UV "+s.thicknessMapUv:"",s.vertexTangents&&!1===s.flatShading?"#define USE_TANGENT":"",s.vertexColors?"#define USE_COLOR":"",s.vertexAlphas?"#define USE_COLOR_ALPHA":"",s.vertexUv1s?"#define USE_UV1":"",s.vertexUv2s?"#define USE_UV2":"",s.vertexUv3s?"#define USE_UV3":"",s.pointsUvs?"#define USE_POINTS_UV":"",s.flatShading?"#define FLAT_SHADED":"",s.skinning?"#define USE_SKINNING":"",s.morphTargets?"#define USE_MORPHTARGETS":"",s.morphNormals&&!1===s.flatShading?"#define USE_MORPHNORMALS":"",s.morphColors&&s.isWebGL2?"#define USE_MORPHCOLORS":"",s.morphTargetsCount>0&&s.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",s.morphTargetsCount>0&&s.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+s.morphTextureStride:"",s.morphTargetsCount>0&&s.isWebGL2?"#define MORPHTARGETS_COUNT "+s.morphTargetsCount:"",s.doubleSided?"#define DOUBLE_SIDED":"",s.flipSided?"#define FLIP_SIDED":"",s.shadowMapEnabled?"#define USE_SHADOWMAP":"",s.shadowMapEnabled?"#define "+f:"",s.sizeAttenuation?"#define USE_SIZEATTENUATION":"",s.numLightProbes>0?"#define USE_LIGHT_PROBES":"",s.useLegacyLights?"#define LEGACY_LIGHTS":"",s.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",s.logarithmicDepthBuffer&&s.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(ma).join("\n"),R=[y,Ta(s),"#define SHADER_TYPE "+s.shaderType,"#define SHADER_NAME "+s.shaderName,S,s.useFog&&s.fog?"#define USE_FOG":"",s.useFog&&s.fogExp2?"#define FOG_EXP2":"",s.map?"#define USE_MAP":"",s.matcap?"#define USE_MATCAP":"",s.envMap?"#define USE_ENVMAP":"",s.envMap?"#define "+g:"",s.envMap?"#define "+_:"",s.envMap?"#define "+v:"",x?"#define CUBEUV_TEXEL_WIDTH "+x.texelWidth:"",x?"#define CUBEUV_TEXEL_HEIGHT "+x.texelHeight:"",x?"#define CUBEUV_MAX_MIP "+x.maxMip+".0":"",s.lightMap?"#define USE_LIGHTMAP":"",s.aoMap?"#define USE_AOMAP":"",s.bumpMap?"#define USE_BUMPMAP":"",s.normalMap?"#define USE_NORMALMAP":"",s.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",s.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",s.emissiveMap?"#define USE_EMISSIVEMAP":"",s.anisotropy?"#define USE_ANISOTROPY":"",s.anisotropyMap?"#define USE_ANISOTROPYMAP":"",s.clearcoat?"#define USE_CLEARCOAT":"",s.clearcoatMap?"#define USE_CLEARCOATMAP":"",s.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",s.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",s.iridescence?"#define USE_IRIDESCENCE":"",s.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",s.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",s.specularMap?"#define USE_SPECULARMAP":"",s.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",s.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",s.roughnessMap?"#define USE_ROUGHNESSMAP":"",s.metalnessMap?"#define USE_METALNESSMAP":"",s.alphaMap?"#define USE_ALPHAMAP":"",s.alphaTest?"#define USE_ALPHATEST":"",s.alphaHash?"#define USE_ALPHAHASH":"",s.sheen?"#define USE_SHEEN":"",s.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",s.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",s.transmission?"#define USE_TRANSMISSION":"",s.transmissionMap?"#define USE_TRANSMISSIONMAP":"",s.thicknessMap?"#define USE_THICKNESSMAP":"",s.vertexTangents&&!1===s.flatShading?"#define USE_TANGENT":"",s.vertexColors||s.instancingColor?"#define USE_COLOR":"",s.vertexAlphas?"#define USE_COLOR_ALPHA":"",s.vertexUv1s?"#define USE_UV1":"",s.vertexUv2s?"#define USE_UV2":"",s.vertexUv3s?"#define USE_UV3":"",s.pointsUvs?"#define USE_POINTS_UV":"",s.gradientMap?"#define USE_GRADIENTMAP":"",s.flatShading?"#define FLAT_SHADED":"",s.doubleSided?"#define DOUBLE_SIDED":"",s.flipSided?"#define FLIP_SIDED":"",s.shadowMapEnabled?"#define USE_SHADOWMAP":"",s.shadowMapEnabled?"#define "+f:"",s.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",s.numLightProbes>0?"#define USE_LIGHT_PROBES":"",s.useLegacyLights?"#define LEGACY_LIGHTS":"",s.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",s.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",s.logarithmicDepthBuffer&&s.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",s.toneMapping!==p?"#define TONE_MAPPING":"",s.toneMapping!==p?yr.tonemapping_pars_fragment:"",s.toneMapping!==p?pa("toneMapping",s.toneMapping):"",s.dithering?"#define DITHERING":"",s.opaque?"#define OPAQUE":"",yr.colorspace_pars_fragment,da("linearToOutputTexel",s.outputColorSpace),s.useDepthPacking?"#define DEPTH_PACKING "+s.depthPacking:"","\n"].filter(ma).join("\n")),c=va(c),c=fa(c,s),c=ga(c,s),m=va(m),m=fa(m,s),m=ga(m,s),c=Sa(c),m=Sa(m),s.isWebGL2&&!0!==s.isRawShaderMaterial&&(C="#version 300 es\n",w=[M,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+w,R=["precision mediump sampler2DArray;","#define varying in",s.glslVersion===Jt?"":"layout(location = 0) out highp vec4 pc_fragColor;",s.glslVersion===Jt?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+R);const L=C+w+c,P=C+R+m,I=la(o,o.VERTEX_SHADER,L),U=la(o,o.FRAGMENT_SHADER,P);function D(e){if(t.debug.checkShaderErrors){const n=o.getProgramInfoLog(E).trim(),i=o.getShaderInfoLog(I).trim(),r=o.getShaderInfoLog(U).trim();let s=!0,a=!0;if(!1===o.getProgramParameter(E,o.LINK_STATUS))if(s=!1,"function"==typeof t.debug.onShaderError)t.debug.onShaderError(o,E,I,U);else{const t=ua(o,I,"vertex"),e=ua(o,U,"fragment");console.error("THREE.WebGLProgram: Shader Error "+o.getError()+" - VALIDATE_STATUS "+o.getProgramParameter(E,o.VALIDATE_STATUS)+"\n\nProgram Info Log: "+n+"\n"+t+"\n"+e)}else""!==n?console.warn("THREE.WebGLProgram: Program Info Log:",n):""!==i&&""!==r||(a=!1);a&&(e.diagnostics={runnable:s,programLog:n,vertexShader:{log:i,prefix:w},fragmentShader:{log:r,prefix:R}})}o.deleteShader(I),o.deleteShader(U),N=new oa(o,E),O=function(t,e){const n={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let r=0;r0,Z=s.clearcoat>0,J=s.iridescence>0,K=s.sheen>0,$=s.transmission>0,Q=Y&&!!s.anisotropyMap,tt=Z&&!!s.clearcoatMap,et=Z&&!!s.clearcoatNormalMap,nt=Z&&!!s.clearcoatRoughnessMap,it=J&&!!s.iridescenceMap,rt=J&&!!s.iridescenceThicknessMap,st=K&&!!s.sheenColorMap,at=K&&!!s.sheenRoughnessMap,ot=!!s.specularMap,lt=!!s.specularColorMap,ct=!!s.specularIntensityMap,ht=$&&!!s.transmissionMap,ut=$&&!!s.thicknessMap,dt=!!s.gradientMap,pt=!!s.alphaMap,mt=s.alphaTest>0,ft=!!s.alphaHash,gt=!!s.extensions,_t=!!M.attributes.uv1,vt=!!M.attributes.uv2,xt=!!M.attributes.uv3;let yt=p;return s.toneMapped&&(null!==D&&!0!==D.isXRRenderTarget||(yt=t.toneMapping)),{isWebGL2:u,shaderID:E,shaderType:s.type,shaderName:s.name,vertexShader:C,fragmentShader:L,defines:s.defines,customVertexShaderID:P,customFragmentShaderID:I,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:f,batching:O,instancing:N,instancingColor:N&&null!==x.instanceColor,supportsVertexTextures:m,outputColorSpace:null===D?t.outputColorSpace:!0===D.isXRRenderTarget?D.texture.colorSpace:Ht,map:F,matcap:B,envMap:z,envMapMode:z&&b.mapping,envMapCubeUVHeight:T,aoMap:G,lightMap:H,bumpMap:V,normalMap:k,displacementMap:m&&W,emissiveMap:X,normalMapObjectSpace:k&&1===s.normalMapType,normalMapTangentSpace:k&&0===s.normalMapType,metalnessMap:j,roughnessMap:q,anisotropy:Y,anisotropyMap:Q,clearcoat:Z,clearcoatMap:tt,clearcoatNormalMap:et,clearcoatRoughnessMap:nt,iridescence:J,iridescenceMap:it,iridescenceThicknessMap:rt,sheen:K,sheenColorMap:st,sheenRoughnessMap:at,specularMap:ot,specularColorMap:lt,specularIntensityMap:ct,transmission:$,transmissionMap:ht,thicknessMap:ut,gradientMap:dt,opaque:!1===s.transparent&&1===s.blending,alphaMap:pt,alphaTest:mt,alphaHash:ft,combine:s.combine,mapUv:F&&_(s.map.channel),aoMapUv:G&&_(s.aoMap.channel),lightMapUv:H&&_(s.lightMap.channel),bumpMapUv:V&&_(s.bumpMap.channel),normalMapUv:k&&_(s.normalMap.channel),displacementMapUv:W&&_(s.displacementMap.channel),emissiveMapUv:X&&_(s.emissiveMap.channel),metalnessMapUv:j&&_(s.metalnessMap.channel),roughnessMapUv:q&&_(s.roughnessMap.channel),anisotropyMapUv:Q&&_(s.anisotropyMap.channel),clearcoatMapUv:tt&&_(s.clearcoatMap.channel),clearcoatNormalMapUv:et&&_(s.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:nt&&_(s.clearcoatRoughnessMap.channel),iridescenceMapUv:it&&_(s.iridescenceMap.channel),iridescenceThicknessMapUv:rt&&_(s.iridescenceThicknessMap.channel),sheenColorMapUv:st&&_(s.sheenColorMap.channel),sheenRoughnessMapUv:at&&_(s.sheenRoughnessMap.channel),specularMapUv:ot&&_(s.specularMap.channel),specularColorMapUv:lt&&_(s.specularColorMap.channel),specularIntensityMapUv:ct&&_(s.specularIntensityMap.channel),transmissionMapUv:ht&&_(s.transmissionMap.channel),thicknessMapUv:ut&&_(s.thicknessMap.channel),alphaMapUv:pt&&_(s.alphaMap.channel),vertexTangents:!!M.attributes.tangent&&(k||Y),vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!M.attributes.color&&4===M.attributes.color.itemSize,vertexUv1s:_t,vertexUv2s:vt,vertexUv3s:xt,pointsUvs:!0===x.isPoints&&!!M.attributes.uv&&(F||pt),fog:!!y,useFog:!0===s.fog,fogExp2:y&&y.isFogExp2,flatShading:!0===s.flatShading,sizeAttenuation:!0===s.sizeAttenuation,logarithmicDepthBuffer:d,skinning:!0===x.isSkinnedMesh,morphTargets:void 0!==M.morphAttributes.position,morphNormals:void 0!==M.morphAttributes.normal,morphColors:void 0!==M.morphAttributes.color,morphTargetsCount:R,morphTextureStride:U,numDirLights:l.directional.length,numPointLights:l.point.length,numSpotLights:l.spot.length,numSpotLightMaps:l.spotLightMap.length,numRectAreaLights:l.rectArea.length,numHemiLights:l.hemi.length,numDirLightShadows:l.directionalShadowMap.length,numPointLightShadows:l.pointShadowMap.length,numSpotLightShadows:l.spotShadowMap.length,numSpotLightShadowsWithMaps:l.numSpotLightShadowsWithMaps,numLightProbes:l.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:s.dithering,shadowMapEnabled:t.shadowMap.enabled&&h.length>0,shadowMapType:t.shadowMap.type,toneMapping:yt,useLegacyLights:t._useLegacyLights,decodeVideoTexture:F&&!0===s.map.isVideoTexture&&Re.getTransfer(s.map.colorSpace)===Xt,premultipliedAlpha:s.premultipliedAlpha,doubleSided:2===s.side,flipSided:s.side===a,useDepthPacking:s.depthPacking>=0,depthPacking:s.depthPacking||0,index0AttributeName:s.index0AttributeName,extensionDerivatives:gt&&!0===s.extensions.derivatives,extensionFragDepth:gt&&!0===s.extensions.fragDepth,extensionDrawBuffers:gt&&!0===s.extensions.drawBuffers,extensionShaderTextureLOD:gt&&!0===s.extensions.shaderTextureLOD,extensionClipCullDistance:gt&&s.extensions.clipCullDistance&&i.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:s.customProgramCacheKey()}},getProgramCacheKey:function(e){const n=[];if(e.shaderID?n.push(e.shaderID):(n.push(e.customVertexShaderID),n.push(e.customFragmentShaderID)),void 0!==e.defines)for(const t in e.defines)n.push(t),n.push(e.defines[t]);return!1===e.isRawShaderMaterial&&(!function(t,e){t.push(e.precision),t.push(e.outputColorSpace),t.push(e.envMapMode),t.push(e.envMapCubeUVHeight),t.push(e.mapUv),t.push(e.alphaMapUv),t.push(e.lightMapUv),t.push(e.aoMapUv),t.push(e.bumpMapUv),t.push(e.normalMapUv),t.push(e.displacementMapUv),t.push(e.emissiveMapUv),t.push(e.metalnessMapUv),t.push(e.roughnessMapUv),t.push(e.anisotropyMapUv),t.push(e.clearcoatMapUv),t.push(e.clearcoatNormalMapUv),t.push(e.clearcoatRoughnessMapUv),t.push(e.iridescenceMapUv),t.push(e.iridescenceThicknessMapUv),t.push(e.sheenColorMapUv),t.push(e.sheenRoughnessMapUv),t.push(e.specularMapUv),t.push(e.specularColorMapUv),t.push(e.specularIntensityMapUv),t.push(e.transmissionMapUv),t.push(e.thicknessMapUv),t.push(e.combine),t.push(e.fogExp2),t.push(e.sizeAttenuation),t.push(e.morphTargetsCount),t.push(e.morphAttributeCount),t.push(e.numDirLights),t.push(e.numPointLights),t.push(e.numSpotLights),t.push(e.numSpotLightMaps),t.push(e.numHemiLights),t.push(e.numRectAreaLights),t.push(e.numDirLightShadows),t.push(e.numPointLightShadows),t.push(e.numSpotLightShadows),t.push(e.numSpotLightShadowsWithMaps),t.push(e.numLightProbes),t.push(e.shadowMapType),t.push(e.toneMapping),t.push(e.numClippingPlanes),t.push(e.numClipIntersection),t.push(e.depthPacking)}(n,e),function(t,e){l.disableAll(),e.isWebGL2&&l.enable(0);e.supportsVertexTextures&&l.enable(1);e.instancing&&l.enable(2);e.instancingColor&&l.enable(3);e.matcap&&l.enable(4);e.envMap&&l.enable(5);e.normalMapObjectSpace&&l.enable(6);e.normalMapTangentSpace&&l.enable(7);e.clearcoat&&l.enable(8);e.iridescence&&l.enable(9);e.alphaTest&&l.enable(10);e.vertexColors&&l.enable(11);e.vertexAlphas&&l.enable(12);e.vertexUv1s&&l.enable(13);e.vertexUv2s&&l.enable(14);e.vertexUv3s&&l.enable(15);e.vertexTangents&&l.enable(16);e.anisotropy&&l.enable(17);e.alphaHash&&l.enable(18);e.batching&&l.enable(19);t.push(l.mask),l.disableAll(),e.fog&&l.enable(0);e.useFog&&l.enable(1);e.flatShading&&l.enable(2);e.logarithmicDepthBuffer&&l.enable(3);e.skinning&&l.enable(4);e.morphTargets&&l.enable(5);e.morphNormals&&l.enable(6);e.morphColors&&l.enable(7);e.premultipliedAlpha&&l.enable(8);e.shadowMapEnabled&&l.enable(9);e.useLegacyLights&&l.enable(10);e.doubleSided&&l.enable(11);e.flipSided&&l.enable(12);e.useDepthPacking&&l.enable(13);e.dithering&&l.enable(14);e.transmission&&l.enable(15);e.sheen&&l.enable(16);e.opaque&&l.enable(17);e.pointsUvs&&l.enable(18);e.decodeVideoTexture&&l.enable(19);t.push(l.mask)}(n,e),n.push(t.outputColorSpace)),n.push(e.customProgramCacheKey),n.join()},getUniforms:function(t){const e=g[t.type];let n;if(e){const t=Sr[e];n=nr.clone(t.uniforms)}else n=t.uniforms;return n},acquireProgram:function(e,n){let i;for(let t=0,e=h.length;t0?i.push(h):!0===a.transparent?r.push(h):n.push(h)},unshift:function(t,e,a,o,l,c){const h=s(t,e,a,o,l,c);a.transmission>0?i.unshift(h):!0===a.transparent?r.unshift(h):n.unshift(h)},finish:function(){for(let n=e,i=t.length;n1&&n.sort(t||Pa),i.length>1&&i.sort(e||Ia),r.length>1&&r.sort(e||Ia)}}}function Da(){let t=new WeakMap;return{get:function(e,n){const i=t.get(e);let r;return void 0===i?(r=new Ua,t.set(e,[r])):n>=i.length?(r=new Ua,i.push(r)):r=i[n],r},dispose:function(){t=new WeakMap}}}function Na(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new We,color:new ci};break;case"SpotLight":n={position:new We,direction:new We,color:new ci,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new We,color:new ci,distance:0,decay:0};break;case"HemisphereLight":n={direction:new We,skyColor:new ci,groundColor:new ci};break;case"RectAreaLight":n={color:new ci,position:new We,halfWidth:new We,halfHeight:new We}}return t[e.id]=n,n}}}let Oa=0;function Fa(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function Ba(t,e){const n=new Na,i=function(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new me};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new me,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=n,n}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let t=0;t<9;t++)r.probe.push(new We);const s=new We,a=new Mn,o=new Mn;return{setup:function(s,a){let o=0,l=0,c=0;for(let t=0;t<9;t++)r.probe[t].set(0,0,0);let h=0,u=0,d=0,p=0,m=0,f=0,g=0,_=0,v=0,x=0,y=0;s.sort(Fa);const M=!0===a?Math.PI:1;for(let t=0,e=s.length;t0&&(e.isWebGL2?!0===t.has("OES_texture_float_linear")?(r.rectAreaLTC1=Mr.LTC_FLOAT_1,r.rectAreaLTC2=Mr.LTC_FLOAT_2):(r.rectAreaLTC1=Mr.LTC_HALF_1,r.rectAreaLTC2=Mr.LTC_HALF_2):!0===t.has("OES_texture_float_linear")?(r.rectAreaLTC1=Mr.LTC_FLOAT_1,r.rectAreaLTC2=Mr.LTC_FLOAT_2):!0===t.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=Mr.LTC_HALF_1,r.rectAreaLTC2=Mr.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=o,r.ambient[1]=l,r.ambient[2]=c;const S=r.hash;S.directionalLength===h&&S.pointLength===u&&S.spotLength===d&&S.rectAreaLength===p&&S.hemiLength===m&&S.numDirectionalShadows===f&&S.numPointShadows===g&&S.numSpotShadows===_&&S.numSpotMaps===v&&S.numLightProbes===y||(r.directional.length=h,r.spot.length=d,r.rectArea.length=p,r.point.length=u,r.hemi.length=m,r.directionalShadow.length=f,r.directionalShadowMap.length=f,r.pointShadow.length=g,r.pointShadowMap.length=g,r.spotShadow.length=_,r.spotShadowMap.length=_,r.directionalShadowMatrix.length=f,r.pointShadowMatrix.length=g,r.spotLightMatrix.length=_+v-x,r.spotLightMap.length=v,r.numSpotLightShadowsWithMaps=x,r.numLightProbes=y,S.directionalLength=h,S.pointLength=u,S.spotLength=d,S.rectAreaLength=p,S.hemiLength=m,S.numDirectionalShadows=f,S.numPointShadows=g,S.numSpotShadows=_,S.numSpotMaps=v,S.numLightProbes=y,r.version=Oa++)},setupView:function(t,e){let n=0,i=0,l=0,c=0,h=0;const u=e.matrixWorldInverse;for(let e=0,d=t.length;e=s.length?(a=new za(t,e),s.push(a)):a=s[r],a},dispose:function(){n=new WeakMap}}}class Ha extends di{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class Va extends di{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}function ka(t,e,i){let o=new gr;const l=new me,c=new me,h=new Be,u=new Ha({depthPacking:3201}),d=new Va,p={},m=i.maxTextureSize,f={[s]:a,[a]:s,2:2},g=new ir({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new me},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),_=g.clone();_.defines.HORIZONTAL_PASS=1;const v=new Ii;v.setAttribute("position",new Mi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new Ji(v,g),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=n;let M=this.type;function S(n,i){const r=e.update(x);g.defines.VSM_SAMPLES!==n.blurSamples&&(g.defines.VSM_SAMPLES=n.blurSamples,_.defines.VSM_SAMPLES=n.blurSamples,g.needsUpdate=!0,_.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new Ge(l.x,l.y)),g.uniforms.shadow_pass.value=n.map.texture,g.uniforms.resolution.value=n.mapSize,g.uniforms.radius.value=n.radius,t.setRenderTarget(n.mapPass),t.clear(),t.renderBufferDirect(i,null,r,g,x,null),_.uniforms.shadow_pass.value=n.mapPass.texture,_.uniforms.resolution.value=n.mapSize,_.uniforms.radius.value=n.radius,t.setRenderTarget(n.map),t.clear(),t.renderBufferDirect(i,null,r,_,x,null)}function b(e,n,i,s){let a=null;const o=!0===i.isPointLight?e.customDistanceMaterial:e.customDepthMaterial;if(void 0!==o)a=o;else if(a=!0===i.isPointLight?d:u,t.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const t=a.uuid,e=n.uuid;let i=p[t];void 0===i&&(i={},p[t]=i);let r=i[e];void 0===r&&(r=a.clone(),i[e]=r,n.addEventListener("dispose",E)),a=r}if(a.visible=n.visible,a.wireframe=n.wireframe,a.side=s===r?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:f[n.side],a.alphaMap=n.alphaMap,a.alphaTest=n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,!0===i.isPointLight&&!0===a.isMeshDistanceMaterial){t.properties.get(a).light=i}return a}function T(n,i,s,a,l){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&l===r)&&(!n.frustumCulled||o.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,n.matrixWorld);const r=e.update(n),o=n.material;if(Array.isArray(o)){const e=r.groups;for(let c=0,h=e.length;cm||l.y>m)&&(l.x>m&&(c.x=Math.floor(m/g.x),l.x=c.x*g.x,u.mapSize.x=c.x),l.y>m&&(c.y=Math.floor(m/g.y),l.y=c.y*g.y,u.mapSize.y=c.y)),null===u.map||!0===p||!0===f){const t=this.type!==r?{minFilter:P,magFilter:P}:{};null!==u.map&&u.map.dispose(),u.map=new Ge(l.x,l.y,t),u.map.texture.name=a.name+".shadowMap",u.camera.updateProjectionMatrix()}t.setRenderTarget(u.map),t.clear();const _=u.getViewportCount();for(let t=0;t<_;t++){const e=u.getViewport(t);h.set(c.x*e.x,c.y*e.y,c.x*e.z,c.y*e.w),d.viewport(h),u.updateMatrices(a,t),o=u.getFrustum(),T(n,i,u.camera,a,this.type)}!0!==u.isPointLightShadow&&this.type===r&&S(u,i),u.needsUpdate=!1}M=this.type,y.needsUpdate=!1,t.setRenderTarget(s,a,u)}}function Wa(t,e,n){const i=n.isWebGL2;const r=new function(){let e=!1;const n=new Be;let i=null;const r=new Be(0,0,0,0);return{setMask:function(n){i===n||e||(t.colorMask(n,n,n,n),i=n)},setLocked:function(t){e=t},setClear:function(e,i,s,a,o){!0===o&&(e*=a,i*=a,s*=a),n.set(e,i,s,a),!1===r.equals(n)&&(t.clearColor(e,i,s,a),r.copy(n))},reset:function(){e=!1,i=null,r.set(-1,0,0,0)}}},s=new function(){let e=!1,n=null,i=null,r=null;return{setTest:function(e){e?j(t.DEPTH_TEST):q(t.DEPTH_TEST)},setMask:function(i){n===i||e||(t.depthMask(i),n=i)},setFunc:function(e){if(i!==e){switch(e){case 0:t.depthFunc(t.NEVER);break;case 1:t.depthFunc(t.ALWAYS);break;case 2:t.depthFunc(t.LESS);break;case 3:default:t.depthFunc(t.LEQUAL);break;case 4:t.depthFunc(t.EQUAL);break;case 5:t.depthFunc(t.GEQUAL);break;case 6:t.depthFunc(t.GREATER);break;case 7:t.depthFunc(t.NOTEQUAL)}i=e}},setLocked:function(t){e=t},setClear:function(e){r!==e&&(t.clearDepth(e),r=e)},reset:function(){e=!1,n=null,i=null,r=null}}},h=new function(){let e=!1,n=null,i=null,r=null,s=null,a=null,o=null,l=null,c=null;return{setTest:function(n){e||(n?j(t.STENCIL_TEST):q(t.STENCIL_TEST))},setMask:function(i){n===i||e||(t.stencilMask(i),n=i)},setFunc:function(e,n,a){i===e&&r===n&&s===a||(t.stencilFunc(e,n,a),i=e,r=n,s=a)},setOp:function(e,n,i){a===e&&o===n&&l===i||(t.stencilOp(e,n,i),a=e,o=n,l=i)},setLocked:function(t){e=t},setClear:function(e){c!==e&&(t.clearStencil(e),c=e)},reset:function(){e=!1,n=null,i=null,r=null,s=null,a=null,o=null,l=null,c=null}}},u=new WeakMap,d=new WeakMap;let p={},m={},f=new WeakMap,g=[],_=null,v=!1,x=null,y=null,M=null,S=null,b=null,T=null,E=null,w=new ci(0,0,0),A=0,R=!1,C=null,L=null,P=null,I=null,U=null;const D=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let N=!1,O=0;const F=t.getParameter(t.VERSION);-1!==F.indexOf("WebGL")?(O=parseFloat(/^WebGL (\d)/.exec(F)[1]),N=O>=1):-1!==F.indexOf("OpenGL ES")&&(O=parseFloat(/^OpenGL ES (\d)/.exec(F)[1]),N=O>=2);let B=null,z={};const G=t.getParameter(t.SCISSOR_BOX),H=t.getParameter(t.VIEWPORT),V=(new Be).fromArray(G),k=(new Be).fromArray(H);function W(e,n,r,s){const a=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let o=0;oi||t.height>i)&&(r=i/Math.max(t.width,t.height)),r<1||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const i=e?he:Math.floor,s=i(r*t.width),a=i(r*t.height);void 0===u&&(u=m(s,a));const o=n?m(s,a):u;o.width=s,o.height=a;return o.getContext("2d").drawImage(t,0,0,s,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+t.width+"x"+t.height+") to ("+s+"x"+a+")."),o}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+t.width+"x"+t.height+")."),t}return t}function g(t){return ce(t.width)&&ce(t.height)}function _(t,e){return t.generateMipmaps&&e&&t.minFilter!==P&&t.minFilter!==D}function v(e){t.generateMipmap(e)}function x(n,i,r,s,a=!1){if(!1===o)return i;if(null!==n){if(void 0!==t[n])return t[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let l=i;if(i===t.RED&&(r===t.FLOAT&&(l=t.R32F),r===t.HALF_FLOAT&&(l=t.R16F),r===t.UNSIGNED_BYTE&&(l=t.R8)),i===t.RED_INTEGER&&(r===t.UNSIGNED_BYTE&&(l=t.R8UI),r===t.UNSIGNED_SHORT&&(l=t.R16UI),r===t.UNSIGNED_INT&&(l=t.R32UI),r===t.BYTE&&(l=t.R8I),r===t.SHORT&&(l=t.R16I),r===t.INT&&(l=t.R32I)),i===t.RG&&(r===t.FLOAT&&(l=t.RG32F),r===t.HALF_FLOAT&&(l=t.RG16F),r===t.UNSIGNED_BYTE&&(l=t.RG8)),i===t.RGBA){const e=a?Wt:Re.getTransfer(s);r===t.FLOAT&&(l=t.RGBA32F),r===t.HALF_FLOAT&&(l=t.RGBA16F),r===t.UNSIGNED_BYTE&&(l=e===Xt?t.SRGB8_ALPHA8:t.RGBA8),r===t.UNSIGNED_SHORT_4_4_4_4&&(l=t.RGBA4),r===t.UNSIGNED_SHORT_5_5_5_1&&(l=t.RGB5_A1)}return l!==t.R16F&&l!==t.R32F&&l!==t.RG16F&&l!==t.RG32F&&l!==t.RGBA16F&&l!==t.RGBA32F||e.get("EXT_color_buffer_float"),l}function y(t,e,n){return!0===_(t,n)||t.isFramebufferTexture&&t.minFilter!==P&&t.minFilter!==D?Math.log2(Math.max(e.width,e.height))+1:void 0!==t.mipmaps&&t.mipmaps.length>0?t.mipmaps.length:t.isCompressedTexture&&Array.isArray(t.image)?e.mipmaps.length:1}function M(e){return e===P||e===I||e===U?t.NEAREST:t.LINEAR}function S(t){const e=t.target;e.removeEventListener("dispose",S),function(t){const e=i.get(t);if(void 0===e.__webglInit)return;const n=t.source,r=d.get(n);if(r){const i=r[e.__cacheKey];i.usedTimes--,0===i.usedTimes&&T(t),0===Object.keys(r).length&&d.delete(n)}i.remove(t)}(e),e.isVideoTexture&&h.delete(e)}function b(e){const n=e.target;n.removeEventListener("dispose",b),function(e){const n=e.texture,r=i.get(e),s=i.get(n);void 0!==s.__webglTexture&&(t.deleteTexture(s.__webglTexture),a.memory.textures--);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++){if(Array.isArray(r.__webglFramebuffer[e]))for(let n=0;n0&&s.__version!==e.version){const t=e.image;if(null===t)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==t.complete)return void J(s,e,r);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(t.TEXTURE_2D,s.__webglTexture,t.TEXTURE0+r)}const A={[R]:t.REPEAT,[C]:t.CLAMP_TO_EDGE,[L]:t.MIRRORED_REPEAT},z={[P]:t.NEAREST,[I]:t.NEAREST_MIPMAP_NEAREST,[U]:t.NEAREST_MIPMAP_LINEAR,[D]:t.LINEAR,[N]:t.LINEAR_MIPMAP_NEAREST,[O]:t.LINEAR_MIPMAP_LINEAR},k={512:t.NEVER,519:t.ALWAYS,513:t.LESS,515:t.LEQUAL,514:t.EQUAL,518:t.GEQUAL,516:t.GREATER,517:t.NOTEQUAL};function W(n,s,a){if(a?(t.texParameteri(n,t.TEXTURE_WRAP_S,A[s.wrapS]),t.texParameteri(n,t.TEXTURE_WRAP_T,A[s.wrapT]),n!==t.TEXTURE_3D&&n!==t.TEXTURE_2D_ARRAY||t.texParameteri(n,t.TEXTURE_WRAP_R,A[s.wrapR]),t.texParameteri(n,t.TEXTURE_MAG_FILTER,z[s.magFilter]),t.texParameteri(n,t.TEXTURE_MIN_FILTER,z[s.minFilter])):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),n!==t.TEXTURE_3D&&n!==t.TEXTURE_2D_ARRAY||t.texParameteri(n,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),s.wrapS===C&&s.wrapT===C||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(n,t.TEXTURE_MAG_FILTER,M(s.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,M(s.minFilter)),s.minFilter!==P&&s.minFilter!==D&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),s.compareFunction&&(t.texParameteri(n,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(n,t.TEXTURE_COMPARE_FUNC,k[s.compareFunction])),!0===e.has("EXT_texture_filter_anisotropic")){const a=e.get("EXT_texture_filter_anisotropic");if(s.magFilter===P)return;if(s.minFilter!==U&&s.minFilter!==O)return;if(s.type===H&&!1===e.has("OES_texture_float_linear"))return;if(!1===o&&s.type===V&&!1===e.has("OES_texture_half_float_linear"))return;(s.anisotropy>1||i.get(s).__currentAnisotropy)&&(t.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,r.getMaxAnisotropy())),i.get(s).__currentAnisotropy=s.anisotropy)}}function Z(e,n){let i=!1;void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",S));const r=n.source;let s=d.get(r);void 0===s&&(s={},d.set(r,s));const o=function(t){const e=[];return e.push(t.wrapS),e.push(t.wrapT),e.push(t.wrapR||0),e.push(t.magFilter),e.push(t.minFilter),e.push(t.anisotropy),e.push(t.internalFormat),e.push(t.format),e.push(t.type),e.push(t.generateMipmaps),e.push(t.premultiplyAlpha),e.push(t.flipY),e.push(t.unpackAlignment),e.push(t.colorSpace),e.join()}(n);if(o!==e.__cacheKey){void 0===s[o]&&(s[o]={texture:t.createTexture(),usedTimes:0},a.memory.textures++,i=!0),s[o].usedTimes++;const r=s[e.__cacheKey];void 0!==r&&(s[e.__cacheKey].usedTimes--,0===r.usedTimes&&T(n)),e.__cacheKey=o,e.__webglTexture=s[o].texture}return i}function J(e,a,l){let c=t.TEXTURE_2D;(a.isDataArrayTexture||a.isCompressedArrayTexture)&&(c=t.TEXTURE_2D_ARRAY),a.isData3DTexture&&(c=t.TEXTURE_3D);const h=Z(e,a),u=a.source;n.bindTexture(c,e.__webglTexture,t.TEXTURE0+l);const d=i.get(u);if(u.version!==d.__version||!0===h){n.activeTexture(t.TEXTURE0+l);const e=Re.getPrimaries(Re.workingColorSpace),i=a.colorSpace===zt?null:Re.getPrimaries(a.colorSpace),p=a.colorSpace===zt||e===i?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,a.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,a.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,p);const m=function(t){return!o&&(t.wrapS!==C||t.wrapT!==C||t.minFilter!==P&&t.minFilter!==D)}(a)&&!1===g(a.image);let M=f(a.image,m,!1,r.maxTextureSize);M=nt(a,M);const S=g(M)||o,b=s.convert(a.format,a.colorSpace);let T,E=s.convert(a.type),w=x(a.internalFormat,b,E,a.colorSpace,a.isVideoTexture);W(c,a,S);const A=a.mipmaps,R=o&&!0!==a.isVideoTexture&&w!==at,L=void 0===d.__version||!0===h,I=y(a,M,S);if(a.isDepthTexture)w=t.DEPTH_COMPONENT,o?w=a.type===H?t.DEPTH_COMPONENT32F:a.type===G?t.DEPTH_COMPONENT24:a.type===X?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT16:a.type===H&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),a.format===q&&w===t.DEPTH_COMPONENT&&a.type!==B&&a.type!==G&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),a.type=G,E=s.convert(a.type)),a.format===Y&&w===t.DEPTH_COMPONENT&&(w=t.DEPTH_STENCIL,a.type!==X&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),a.type=X,E=s.convert(a.type))),L&&(R?n.texStorage2D(t.TEXTURE_2D,1,w,M.width,M.height):n.texImage2D(t.TEXTURE_2D,0,w,M.width,M.height,0,b,E,null));else if(a.isDataTexture)if(A.length>0&&S){R&&L&&n.texStorage2D(t.TEXTURE_2D,I,w,A[0].width,A[0].height);for(let e=0,i=A.length;e>=1,i>>=1}}else if(A.length>0&&S){R&&L&&n.texStorage2D(t.TEXTURE_2D,I,w,A[0].width,A[0].height);for(let e=0,i=A.length;e>h),i=Math.max(1,r.height>>h);c===t.TEXTURE_3D||c===t.TEXTURE_2D_ARRAY?n.texImage3D(c,h,p,e,i,r.depth,0,u,d,null):n.texImage2D(c,h,p,e,i,0,u,d,null)}n.bindFramebuffer(t.FRAMEBUFFER,e),et(r)?l.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,o,c,i.get(a).__webglTexture,0,tt(r)):(c===t.TEXTURE_2D||c>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&c<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,o,c,i.get(a).__webglTexture,h),n.bindFramebuffer(t.FRAMEBUFFER,null)}function $(e,n,i){if(t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer){let r=!0===o?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(i||et(n)){const e=n.depthTexture;e&&e.isDepthTexture&&(e.type===H?r=t.DEPTH_COMPONENT32F:e.type===G&&(r=t.DEPTH_COMPONENT24));const i=tt(n);et(n)?l.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,i,r,n.width,n.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,i,r,n.width,n.height)}else t.renderbufferStorage(t.RENDERBUFFER,r,n.width,n.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)}else if(n.depthBuffer&&n.stencilBuffer){const r=tt(n);i&&!1===et(n)?t.renderbufferStorageMultisample(t.RENDERBUFFER,r,t.DEPTH24_STENCIL8,n.width,n.height):et(n)?l.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,r,t.DEPTH24_STENCIL8,n.width,n.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)}else{const e=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let r=0;r0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function nt(t,n){const i=t.colorSpace,r=t.format,s=t.type;return!0===t.isCompressedTexture||!0===t.isVideoTexture||t.format===Kt||i!==Ht&&i!==zt&&(Re.getTransfer(i)===Xt?!1===o?!0===e.has("EXT_sRGB")&&r===j?(t.format=Kt,t.minFilter=D,t.generateMipmaps=!1):n=Ie.sRGBToLinear(n):r===j&&s===F||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",i)),n}this.allocateTextureUnit=function(){const t=E;return t>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+r.maxTextures),E+=1,t},this.resetTextureUnits=function(){E=0},this.setTexture2D=w,this.setTexture2DArray=function(e,r){const s=i.get(e);e.version>0&&s.__version!==e.version?J(s,e,r):n.bindTexture(t.TEXTURE_2D_ARRAY,s.__webglTexture,t.TEXTURE0+r)},this.setTexture3D=function(e,r){const s=i.get(e);e.version>0&&s.__version!==e.version?J(s,e,r):n.bindTexture(t.TEXTURE_3D,s.__webglTexture,t.TEXTURE0+r)},this.setTextureCube=function(e,a){const l=i.get(e);e.version>0&&l.__version!==e.version?function(e,a,l){if(6!==a.image.length)return;const c=Z(e,a),h=a.source;n.bindTexture(t.TEXTURE_CUBE_MAP,e.__webglTexture,t.TEXTURE0+l);const u=i.get(h);if(h.version!==u.__version||!0===c){n.activeTexture(t.TEXTURE0+l);const e=Re.getPrimaries(Re.workingColorSpace),i=a.colorSpace===zt?null:Re.getPrimaries(a.colorSpace),d=a.colorSpace===zt||e===i?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,a.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,a.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);const p=a.isCompressedTexture||a.image[0].isCompressedTexture,m=a.image[0]&&a.image[0].isDataTexture,M=[];for(let t=0;t<6;t++)M[t]=p||m?m?a.image[t].image:a.image[t]:f(a.image[t],!1,!0,r.maxCubemapSize),M[t]=nt(a,M[t]);const S=M[0],b=g(S)||o,T=s.convert(a.format,a.colorSpace),E=s.convert(a.type),w=x(a.internalFormat,T,E,a.colorSpace),A=o&&!0!==a.isVideoTexture,R=void 0===u.__version||!0===c;let C,L=y(a,S,b);if(W(t.TEXTURE_CUBE_MAP,a,b),p){A&&R&&n.texStorage2D(t.TEXTURE_CUBE_MAP,L,w,S.width,S.height);for(let e=0;e<6;e++){C=M[e].mipmaps;for(let i=0;i0&&L++,n.texStorage2D(t.TEXTURE_CUBE_MAP,L,w,M[0].width,M[0].height));for(let e=0;e<6;e++)if(m){A?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,0,0,M[e].width,M[e].height,T,E,M[e].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,w,M[e].width,M[e].height,0,T,E,M[e].data);for(let i=0;i0){c.__webglFramebuffer[e]=[];for(let n=0;n0){c.__webglFramebuffer=[];for(let e=0;e0&&!1===et(e)){const i=d?l:[l];c.__webglMultisampledFramebuffer=t.createFramebuffer(),c.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,c.__webglMultisampledFramebuffer);for(let n=0;n0)for(let i=0;i0)for(let n=0;n0&&!1===et(e)){const r=e.isWebGLMultipleRenderTargets?e.texture:[e.texture],s=e.width,a=e.height;let o=t.COLOR_BUFFER_BIT;const l=[],h=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,u=i.get(e),d=!0===e.isWebGLMultipleRenderTargets;if(d)for(let e=0;eo+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&a<=o-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==o&&t.gripSpace&&(r=e.getPose(t.gripSpace,n),null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1));null!==a&&(i=e.getPose(t.targetRaySpace,n),null===i&&null!==r&&(i=r),null!==i&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(Za)))}return null!==a&&(a.visible=null!==i),null!==o&&(o.visible=null!==r),null!==l&&(l.visible=null!==s),this}_getHandJoint(t,e){if(void 0===t.joints[e.jointName]){const n=new Ya;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class Ka extends te{constructor(t,e){super();const n=this;let i=null,r=1,s=null,a="local-floor",o=1,l=null,c=null,h=null,u=null,d=null,p=null;const m=e.getContextAttributes();let f=null,g=null;const _=[],v=[],x=new me;let y=null;const M=new sr;M.layers.enable(1),M.viewport=new Be;const S=new sr;S.layers.enable(2),S.viewport=new Be;const b=[M,S],T=new qa;T.layers.enable(1),T.layers.enable(2);let E=null,w=null;function A(t){const e=v.indexOf(t.inputSource);if(-1===e)return;const n=_[e];void 0!==n&&(n.update(t.inputSource,t.frame,l||s),n.dispatchEvent({type:t.type,data:t.inputSource}))}function R(){i.removeEventListener("select",A),i.removeEventListener("selectstart",A),i.removeEventListener("selectend",A),i.removeEventListener("squeeze",A),i.removeEventListener("squeezestart",A),i.removeEventListener("squeezeend",A),i.removeEventListener("end",R),i.removeEventListener("inputsourceschange",C);for(let t=0;t<_.length;t++){const e=v[t];null!==e&&(v[t]=null,_[t].disconnect(e))}E=null,w=null,t.setRenderTarget(f),d=null,u=null,h=null,i=null,g=null,D.stop(),n.isPresenting=!1,t.setPixelRatio(y),t.setSize(x.width,x.height,!1),n.dispatchEvent({type:"sessionend"})}function C(t){for(let e=0;e=0&&(v[i]=null,_[i].disconnect(n))}for(let e=0;e=v.length){v.push(n),i=t;break}if(null===v[t]){v[t]=n,i=t;break}}if(-1===i)break}const r=_[i];r&&r.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(t){let e=_[t];return void 0===e&&(e=new Ja,_[t]=e),e.getTargetRaySpace()},this.getControllerGrip=function(t){let e=_[t];return void 0===e&&(e=new Ja,_[t]=e),e.getGripSpace()},this.getHand=function(t){let e=_[t];return void 0===e&&(e=new Ja,_[t]=e),e.getHandSpace()},this.setFramebufferScaleFactor=function(t){r=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(t){a=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||s},this.setReferenceSpace=function(t){l=t},this.getBaseLayer=function(){return null!==u?u:d},this.getBinding=function(){return h},this.getFrame=function(){return p},this.getSession=function(){return i},this.setSession=async function(c){if(i=c,null!==i){if(f=t.getRenderTarget(),i.addEventListener("select",A),i.addEventListener("selectstart",A),i.addEventListener("selectend",A),i.addEventListener("squeeze",A),i.addEventListener("squeezestart",A),i.addEventListener("squeezeend",A),i.addEventListener("end",R),i.addEventListener("inputsourceschange",C),!0!==m.xrCompatible&&await e.makeXRCompatible(),y=t.getPixelRatio(),t.getSize(x),void 0===i.renderState.layers||!1===t.capabilities.isWebGL2){const n={antialias:void 0!==i.renderState.layers||m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:r};d=new XRWebGLLayer(i,e,n),i.updateRenderState({baseLayer:d}),t.setPixelRatio(1),t.setSize(d.framebufferWidth,d.framebufferHeight,!1),g=new Ge(d.framebufferWidth,d.framebufferHeight,{format:j,type:F,colorSpace:t.outputColorSpace,stencilBuffer:m.stencil})}else{let n=null,s=null,a=null;m.depth&&(a=m.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,n=m.stencil?Y:q,s=m.stencil?X:G);const o={colorFormat:e.RGBA8,depthFormat:a,scaleFactor:r};h=new XRWebGLBinding(i,e),u=h.createProjectionLayer(o),i.updateRenderState({layers:[u]}),t.setPixelRatio(1),t.setSize(u.textureWidth,u.textureHeight,!1),g=new Ge(u.textureWidth,u.textureHeight,{format:j,type:F,depthTexture:new ns(u.textureWidth,u.textureHeight,s,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:m.stencil,colorSpace:t.outputColorSpace,samples:m.antialias?4:0});t.properties.get(g).__ignoreDepthValues=u.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(o),l=null,s=await i.requestReferenceSpace(a),D.setContext(i),D.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==i)return i.environmentBlendMode};const L=new We,P=new We;function I(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.copy(t.matrixWorld).invert()}this.updateCamera=function(t){if(null===i)return;T.near=S.near=M.near=t.near,T.far=S.far=M.far=t.far,E===T.near&&w===T.far||(i.updateRenderState({depthNear:T.near,depthFar:T.far}),E=T.near,w=T.far);const e=t.parent,n=T.cameras;I(T,e);for(let t=0;t0&&(i.alphaTest.value=r.alphaTest);const s=e.get(r).envMap;if(s&&(i.envMap.value=s,i.flipEnvMap.value=s.isCubeTexture&&!1===s.isRenderTargetTexture?-1:1,i.reflectivity.value=r.reflectivity,i.ior.value=r.ior,i.refractionRatio.value=r.refractionRatio),r.lightMap){i.lightMap.value=r.lightMap;const e=!0===t._useLegacyLights?Math.PI:1;i.lightMapIntensity.value=r.lightMapIntensity*e,n(r.lightMap,i.lightMapTransform)}r.aoMap&&(i.aoMap.value=r.aoMap,i.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,i.aoMapTransform))}return{refreshFogUniforms:function(e,n){n.color.getRGB(e.fogColor.value,er(t)),n.isFog?(e.fogNear.value=n.near,e.fogFar.value=n.far):n.isFogExp2&&(e.fogDensity.value=n.density)},refreshMaterialUniforms:function(t,r,s,o,l){r.isMeshBasicMaterial||r.isMeshLambertMaterial?i(t,r):r.isMeshToonMaterial?(i(t,r),function(t,e){e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(t,r)):r.isMeshPhongMaterial?(i(t,r),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4)}(t,r)):r.isMeshStandardMaterial?(i(t,r),function(t,i){t.metalness.value=i.metalness,i.metalnessMap&&(t.metalnessMap.value=i.metalnessMap,n(i.metalnessMap,t.metalnessMapTransform));t.roughness.value=i.roughness,i.roughnessMap&&(t.roughnessMap.value=i.roughnessMap,n(i.roughnessMap,t.roughnessMapTransform));const r=e.get(i).envMap;r&&(t.envMapIntensity.value=i.envMapIntensity)}(t,r),r.isMeshPhysicalMaterial&&function(t,e,i){t.ior.value=e.ior,e.sheen>0&&(t.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),t.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(t.sheenColorMap.value=e.sheenColorMap,n(e.sheenColorMap,t.sheenColorMapTransform)),e.sheenRoughnessMap&&(t.sheenRoughnessMap.value=e.sheenRoughnessMap,n(e.sheenRoughnessMap,t.sheenRoughnessMapTransform)));e.clearcoat>0&&(t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap,n(e.clearcoatMap,t.clearcoatMapTransform)),e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap,n(e.clearcoatRoughnessMap,t.clearcoatRoughnessMapTransform)),e.clearcoatNormalMap&&(t.clearcoatNormalMap.value=e.clearcoatNormalMap,n(e.clearcoatNormalMap,t.clearcoatNormalMapTransform),t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),e.side===a&&t.clearcoatNormalScale.value.negate()));e.iridescence>0&&(t.iridescence.value=e.iridescence,t.iridescenceIOR.value=e.iridescenceIOR,t.iridescenceThicknessMinimum.value=e.iridescenceThicknessRange[0],t.iridescenceThicknessMaximum.value=e.iridescenceThicknessRange[1],e.iridescenceMap&&(t.iridescenceMap.value=e.iridescenceMap,n(e.iridescenceMap,t.iridescenceMapTransform)),e.iridescenceThicknessMap&&(t.iridescenceThicknessMap.value=e.iridescenceThicknessMap,n(e.iridescenceThicknessMap,t.iridescenceThicknessMapTransform)));e.transmission>0&&(t.transmission.value=e.transmission,t.transmissionSamplerMap.value=i.texture,t.transmissionSamplerSize.value.set(i.width,i.height),e.transmissionMap&&(t.transmissionMap.value=e.transmissionMap,n(e.transmissionMap,t.transmissionMapTransform)),t.thickness.value=e.thickness,e.thicknessMap&&(t.thicknessMap.value=e.thicknessMap,n(e.thicknessMap,t.thicknessMapTransform)),t.attenuationDistance.value=e.attenuationDistance,t.attenuationColor.value.copy(e.attenuationColor));e.anisotropy>0&&(t.anisotropyVector.value.set(e.anisotropy*Math.cos(e.anisotropyRotation),e.anisotropy*Math.sin(e.anisotropyRotation)),e.anisotropyMap&&(t.anisotropyMap.value=e.anisotropyMap,n(e.anisotropyMap,t.anisotropyMapTransform)));t.specularIntensity.value=e.specularIntensity,t.specularColor.value.copy(e.specularColor),e.specularColorMap&&(t.specularColorMap.value=e.specularColorMap,n(e.specularColorMap,t.specularColorMapTransform));e.specularIntensityMap&&(t.specularIntensityMap.value=e.specularIntensityMap,n(e.specularIntensityMap,t.specularIntensityMapTransform))}(t,r,l)):r.isMeshMatcapMaterial?(i(t,r),function(t,e){e.matcap&&(t.matcap.value=e.matcap)}(t,r)):r.isMeshDepthMaterial?i(t,r):r.isMeshDistanceMaterial?(i(t,r),function(t,n){const i=e.get(n).light;t.referencePosition.value.setFromMatrixPosition(i.matrixWorld),t.nearDistance.value=i.shadow.camera.near,t.farDistance.value=i.shadow.camera.far}(t,r)):r.isMeshNormalMaterial?i(t,r):r.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,e.map&&(t.map.value=e.map,n(e.map,t.mapTransform))}(t,r),r.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(t,r)):r.isPointsMaterial?function(t,e,i,r){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*i,t.scale.value=.5*r,e.map&&(t.map.value=e.map,n(e.map,t.uvTransform));e.alphaMap&&(t.alphaMap.value=e.alphaMap,n(e.alphaMap,t.alphaMapTransform));e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,r,s,o):r.isSpriteMaterial?function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map,n(e.map,t.mapTransform));e.alphaMap&&(t.alphaMap.value=e.alphaMap,n(e.alphaMap,t.alphaMapTransform));e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,r):r.isShadowMaterial?(t.color.value.copy(r.color),t.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function Qa(t,e,n,i){let r={},s={},a=[];const o=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(t,e,n,i){const r=t.value,s=e+"_"+n;if(void 0===i[s])return i[s]="number"==typeof r||"boolean"==typeof r?r:r.clone(),!0;{const t=i[s];if("number"==typeof r||"boolean"==typeof r){if(t!==r)return i[s]=r,!0}else if(!1===t.equals(r))return t.copy(r),!0}return!1}function c(t){const e={boundary:0,storage:0};return"number"==typeof t||"boolean"==typeof t?(e.boundary=4,e.storage=4):t.isVector2?(e.boundary=8,e.storage=8):t.isVector3||t.isColor?(e.boundary=16,e.storage=12):t.isVector4?(e.boundary=16,e.storage=16):t.isMatrix3?(e.boundary=48,e.storage=48):t.isMatrix4?(e.boundary=64,e.storage=64):t.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",t),e}function h(e){const n=e.target;n.removeEventListener("dispose",h);const i=a.indexOf(n.__bindingPointIndex);a.splice(i,1),t.deleteBuffer(r[n.id]),delete r[n.id],delete s[n.id]}return{bind:function(t,e){const n=e.program;i.uniformBlockBinding(t,n)},update:function(n,u){let d=r[n.id];void 0===d&&(!function(t){const e=t.uniforms;let n=0;const i=16;for(let t=0,r=e.length;t0&&(n+=i-r);t.__size=n,t.__cache={}}(n),d=function(e){const n=function(){for(let t=0;t0),u=!!n.morphAttributes.position,d=!!n.morphAttributes.normal,m=!!n.morphAttributes.color;let f=p;i.toneMapped&&(null!==w&&!0!==w.isXRRenderTarget||(f=S.toneMapping));const g=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,_=void 0!==g?g.length:0,v=mt.get(i),y=x.state.lights;if(!0===nt&&(!0===it||t!==R)){const e=t===R&&i.id===A;Et.setState(i,t,e)}let M=!1;i.version===v.__version?v.needsLights&&v.lightsStateVersion!==y.state.version||v.outputColorSpace!==o||r.isBatchedMesh&&!1===v.batching?M=!0:r.isBatchedMesh||!0!==v.batching?r.isInstancedMesh&&!1===v.instancing?M=!0:r.isInstancedMesh||!0!==v.instancing?r.isSkinnedMesh&&!1===v.skinning?M=!0:r.isSkinnedMesh||!0!==v.skinning?r.isInstancedMesh&&!0===v.instancingColor&&null===r.instanceColor||r.isInstancedMesh&&!1===v.instancingColor&&null!==r.instanceColor||v.envMap!==l||!0===i.fog&&v.fog!==s?M=!0:void 0===v.numClippingPlanes||v.numClippingPlanes===Et.numPlanes&&v.numIntersection===Et.numIntersection?(v.vertexAlphas!==c||v.vertexTangents!==h||v.morphTargets!==u||v.morphNormals!==d||v.morphColors!==m||v.toneMapping!==f||!0===ut.isWebGL2&&v.morphTargetsCount!==_)&&(M=!0):M=!0:M=!0:M=!0:M=!0:(M=!0,v.__version=i.version);let b=v.currentProgram;!0===M&&(b=Qt(i,e,r));let T=!1,E=!1,C=!1;const L=b.getUniforms(),P=v.uniforms;dt.useProgram(b.program)&&(T=!0,E=!0,C=!0);i.id!==A&&(A=i.id,E=!0);if(T||R!==t){L.setValue(Dt,"projectionMatrix",t.projectionMatrix),L.setValue(Dt,"viewMatrix",t.matrixWorldInverse);const e=L.map.cameraPosition;void 0!==e&&e.setValue(Dt,ot.setFromMatrixPosition(t.matrixWorld)),ut.logarithmicDepthBuffer&&L.setValue(Dt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),(i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial)&&L.setValue(Dt,"isOrthographic",!0===t.isOrthographicCamera),R!==t&&(R=t,E=!0,C=!0)}if(r.isSkinnedMesh){L.setOptional(Dt,r,"bindMatrix"),L.setOptional(Dt,r,"bindMatrixInverse");const t=r.skeleton;t&&(ut.floatVertexTextures?(null===t.boneTexture&&t.computeBoneTexture(),L.setValue(Dt,"boneTexture",t.boneTexture,ft)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}r.isBatchedMesh&&(L.setOptional(Dt,r,"batchingTexture"),L.setValue(Dt,"batchingTexture",r._matricesTexture,ft));const I=n.morphAttributes;(void 0!==I.position||void 0!==I.normal||void 0!==I.color&&!0===ut.isWebGL2)&&Rt.update(r,n,b);(E||v.receiveShadow!==r.receiveShadow)&&(v.receiveShadow=r.receiveShadow,L.setValue(Dt,"receiveShadow",r.receiveShadow));i.isMeshGouraudMaterial&&null!==i.envMap&&(P.envMap.value=l,P.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1);E&&(L.setValue(Dt,"toneMappingExposure",S.toneMappingExposure),v.needsLights&&(D=C,(U=P).ambientLightColor.needsUpdate=D,U.lightProbe.needsUpdate=D,U.directionalLights.needsUpdate=D,U.directionalLightShadows.needsUpdate=D,U.pointLights.needsUpdate=D,U.pointLightShadows.needsUpdate=D,U.spotLights.needsUpdate=D,U.spotLightShadows.needsUpdate=D,U.rectAreaLights.needsUpdate=D,U.hemisphereLights.needsUpdate=D),s&&!0===i.fog&&St.refreshFogUniforms(P,s),St.refreshMaterialUniforms(P,i,z,N,rt),oa.upload(Dt,te(v),P,ft));var U,D;i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(oa.upload(Dt,te(v),P,ft),i.uniformsNeedUpdate=!1);i.isSpriteMaterial&&L.setValue(Dt,"center",r.center);if(L.setValue(Dt,"modelViewMatrix",r.modelViewMatrix),L.setValue(Dt,"normalMatrix",r.normalMatrix),L.setValue(Dt,"modelMatrix",r.matrixWorld),i.isShaderMaterial||i.isRawShaderMaterial){const t=i.uniformsGroups;for(let e=0,n=t.length;e{function n(){i.forEach((function(t){mt.get(t).currentProgram.isReady()&&i.delete(t)})),0!==i.size?setTimeout(n,10):e(t)}null!==ht.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)}))};let Xt=null;function jt(){Yt.stop()}function qt(){Yt.start()}const Yt=new _r;function Zt(t,e,n,i){if(!1===t.visible)return;if(t.layers.test(e.layers))if(t.isGroup)n=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(e);else if(t.isLight)x.pushLight(t),t.castShadow&&x.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||et.intersectsSprite(t)){i&&ot.setFromMatrixPosition(t.matrixWorld).applyMatrix4(st);const e=yt.update(t),r=t.material;r.visible&&v.push(t,e,r,n,ot.z,null)}}else if((t.isMesh||t.isLine||t.isPoints)&&(!t.frustumCulled||et.intersectsObject(t))){const e=yt.update(t),r=t.material;if(i&&(void 0!==t.boundingSphere?(null===t.boundingSphere&&t.computeBoundingSphere(),ot.copy(t.boundingSphere.center)):(null===e.boundingSphere&&e.computeBoundingSphere(),ot.copy(e.boundingSphere.center)),ot.applyMatrix4(t.matrixWorld).applyMatrix4(st)),Array.isArray(r)){const i=e.groups;for(let s=0,a=i.length;s0&&function(t,e,n,i){const r=!0===n.isScene?n.overrideMaterial:null;if(null!==r)return;const s=ut.isWebGL2;null===rt&&(rt=new Ge(1,1,{generateMipmaps:!0,type:ht.has("EXT_color_buffer_half_float")?V:F,minFilter:O,samples:s?4:0}));S.getDrawingBufferSize(at),s?rt.setSize(at.x,at.y):rt.setSize(he(at.x),he(at.y));const o=S.getRenderTarget();S.setRenderTarget(rt),S.getClearColor(I),U=S.getClearAlpha(),U<1&&S.setClearColor(16777215,.5);S.clear();const l=S.toneMapping;S.toneMapping=p,Kt(t,n,i),ft.updateMultisampleRenderTarget(rt),ft.updateRenderTargetMipmap(rt);let c=!1;for(let t=0,r=e.length;t0&&Kt(r,e,n),s.length>0&&Kt(s,e,n),o.length>0&&Kt(o,e,n),dt.buffers.depth.setTest(!0),dt.buffers.depth.setMask(!0),dt.buffers.color.setMask(!0),dt.setPolygonOffset(!1)}function Kt(t,e,n){const i=!0===e.isScene?e.overrideMaterial:null;for(let r=0,s=t.length;r0?M[M.length-1]:null,y.pop(),v=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return T},this.getActiveMipmapLevel=function(){return E},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(t,e,n){mt.get(t.texture).__webglTexture=e,mt.get(t.depthTexture).__webglTexture=n;const i=mt.get(t);i.__hasExternalTextures=!0,i.__hasExternalTextures&&(i.__autoAllocateDepthBuffer=void 0===n,i.__autoAllocateDepthBuffer||!0===ht.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),i.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(t,e){const n=mt.get(t);n.__webglFramebuffer=e,n.__useDefaultFramebuffer=void 0===e},this.setRenderTarget=function(t,e=0,n=0){w=t,T=e,E=n;let i=!0,r=null,s=!1,a=!1;if(t){const o=mt.get(t);void 0!==o.__useDefaultFramebuffer?(dt.bindFramebuffer(Dt.FRAMEBUFFER,null),i=!1):void 0===o.__webglFramebuffer?ft.setupRenderTarget(t):o.__hasExternalTextures&&ft.rebindTextures(t,mt.get(t.texture).__webglTexture,mt.get(t.depthTexture).__webglTexture);const l=t.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(a=!0);const c=mt.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(r=Array.isArray(c[e])?c[e][n]:c[e],s=!0):r=ut.isWebGL2&&t.samples>0&&!1===ft.useMultisampledRTT(t)?mt.get(t).__webglMultisampledFramebuffer:Array.isArray(c)?c[n]:c,C.copy(t.viewport),L.copy(t.scissor),P=t.scissorTest}else C.copy($).multiplyScalar(z).floor(),L.copy(Q).multiplyScalar(z).floor(),P=tt;if(dt.bindFramebuffer(Dt.FRAMEBUFFER,r)&&ut.drawBuffers&&i&&dt.drawBuffers(t,r),dt.viewport(C),dt.scissor(L),dt.setScissorTest(P),s){const i=mt.get(t.texture);Dt.framebufferTexture2D(Dt.FRAMEBUFFER,Dt.COLOR_ATTACHMENT0,Dt.TEXTURE_CUBE_MAP_POSITIVE_X+e,i.__webglTexture,n)}else if(a){const i=mt.get(t.texture),r=e||0;Dt.framebufferTextureLayer(Dt.FRAMEBUFFER,Dt.COLOR_ATTACHMENT0,i.__webglTexture,n||0,r)}A=-1},this.readRenderTargetPixels=function(t,e,n,i,r,s,a){if(!t||!t.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let o=mt.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==a&&(o=o[a]),o){dt.bindFramebuffer(Dt.FRAMEBUFFER,o);try{const a=t.texture,o=a.format,l=a.type;if(o!==j&&Pt.convert(o)!==Dt.getParameter(Dt.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===V&&(ht.has("EXT_color_buffer_half_float")||ut.isWebGL2&&ht.has("EXT_color_buffer_float"));if(!(l===F||Pt.convert(l)===Dt.getParameter(Dt.IMPLEMENTATION_COLOR_READ_TYPE)||l===H&&(ut.isWebGL2||ht.has("OES_texture_float")||ht.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");e>=0&&e<=t.width-i&&n>=0&&n<=t.height-r&&Dt.readPixels(e,n,i,r,Pt.convert(o),Pt.convert(l),s)}finally{const t=null!==w?mt.get(w).__webglFramebuffer:null;dt.bindFramebuffer(Dt.FRAMEBUFFER,t)}}},this.copyFramebufferToTexture=function(t,e,n=0){const i=Math.pow(2,-n),r=Math.floor(e.image.width*i),s=Math.floor(e.image.height*i);ft.setTexture2D(e,0),Dt.copyTexSubImage2D(Dt.TEXTURE_2D,n,0,0,t.x,t.y,r,s),dt.unbindTexture()},this.copyTextureToTexture=function(t,e,n,i=0){const r=e.image.width,s=e.image.height,a=Pt.convert(n.format),o=Pt.convert(n.type);ft.setTexture2D(n,0),Dt.pixelStorei(Dt.UNPACK_FLIP_Y_WEBGL,n.flipY),Dt.pixelStorei(Dt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),Dt.pixelStorei(Dt.UNPACK_ALIGNMENT,n.unpackAlignment),e.isDataTexture?Dt.texSubImage2D(Dt.TEXTURE_2D,i,t.x,t.y,r,s,a,o,e.image.data):e.isCompressedTexture?Dt.compressedTexSubImage2D(Dt.TEXTURE_2D,i,t.x,t.y,e.mipmaps[0].width,e.mipmaps[0].height,a,e.mipmaps[0].data):Dt.texSubImage2D(Dt.TEXTURE_2D,i,t.x,t.y,a,o,e.image),0===i&&n.generateMipmaps&&Dt.generateMipmap(Dt.TEXTURE_2D),dt.unbindTexture()},this.copyTextureToTexture3D=function(t,e,n,i,r=0){if(S.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const s=t.max.x-t.min.x+1,a=t.max.y-t.min.y+1,o=t.max.z-t.min.z+1,l=Pt.convert(i.format),c=Pt.convert(i.type);let h;if(i.isData3DTexture)ft.setTexture3D(i,0),h=Dt.TEXTURE_3D;else{if(!i.isDataArrayTexture&&!i.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");ft.setTexture2DArray(i,0),h=Dt.TEXTURE_2D_ARRAY}Dt.pixelStorei(Dt.UNPACK_FLIP_Y_WEBGL,i.flipY),Dt.pixelStorei(Dt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),Dt.pixelStorei(Dt.UNPACK_ALIGNMENT,i.unpackAlignment);const u=Dt.getParameter(Dt.UNPACK_ROW_LENGTH),d=Dt.getParameter(Dt.UNPACK_IMAGE_HEIGHT),p=Dt.getParameter(Dt.UNPACK_SKIP_PIXELS),m=Dt.getParameter(Dt.UNPACK_SKIP_ROWS),f=Dt.getParameter(Dt.UNPACK_SKIP_IMAGES),g=n.isCompressedTexture?n.mipmaps[r]:n.image;Dt.pixelStorei(Dt.UNPACK_ROW_LENGTH,g.width),Dt.pixelStorei(Dt.UNPACK_IMAGE_HEIGHT,g.height),Dt.pixelStorei(Dt.UNPACK_SKIP_PIXELS,t.min.x),Dt.pixelStorei(Dt.UNPACK_SKIP_ROWS,t.min.y),Dt.pixelStorei(Dt.UNPACK_SKIP_IMAGES,t.min.z),n.isDataTexture||n.isData3DTexture?Dt.texSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,c,g.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Dt.compressedTexSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,g.data)):Dt.texSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,c,g),Dt.pixelStorei(Dt.UNPACK_ROW_LENGTH,u),Dt.pixelStorei(Dt.UNPACK_IMAGE_HEIGHT,d),Dt.pixelStorei(Dt.UNPACK_SKIP_PIXELS,p),Dt.pixelStorei(Dt.UNPACK_SKIP_ROWS,m),Dt.pixelStorei(Dt.UNPACK_SKIP_IMAGES,f),0===r&&i.generateMipmaps&&Dt.generateMipmap(h),dt.unbindTexture()},this.initTexture=function(t){t.isCubeTexture?ft.setTextureCube(t,0):t.isData3DTexture?ft.setTexture3D(t,0):t.isDataArrayTexture||t.isCompressedArrayTexture?ft.setTexture2DArray(t,0):ft.setTexture2D(t,0),dt.unbindTexture()},this.resetState=function(){T=0,E=0,w=null,dt.reset(),It.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return $t}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===Vt?"display-p3":"srgb",e.unpackColorSpace=Re.workingColorSpace===kt?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Gt?Bt:Ft}set outputEncoding(t){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=t===Bt?Gt:Ht}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}}class eo extends to{}eo.prototype.isWebGL1Renderer=!0;class no{constructor(t,e=25e-5){this.isFogExp2=!0,this.name="",this.color=new ci(t),this.density=e}clone(){return new no(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class io{constructor(t,e=1,n=1e3){this.isFog=!0,this.name="",this.color=new ci(t),this.near=e,this.far=n}clone(){return new io(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class ro extends jn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(e.object.backgroundIntensity=this.backgroundIntensity),e}}class so{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=Zt,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=se()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return console.warn("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,n){t*=this.stride,n*=e.stride;for(let i=0,r=this.stride;it.far||e.push({distance:o,point:ho.clone(),uv:ri.getInterpolation(ho,_o,vo,xo,yo,Mo,So,new me),face:null,object:this})}copy(t,e){return super.copy(t,e),void 0!==t.center&&this.center.copy(t.center),this.material=t.material,this}}function To(t,e,n,i,r,s){mo.subVectors(t,n).addScalar(.5).multiply(i),void 0!==r?(fo.x=s*mo.x-r*mo.y,fo.y=r*mo.x+s*mo.y):fo.copy(mo),t.copy(e),t.x+=fo.x,t.y+=fo.y,t.applyMatrix4(go)}const Eo=new We,wo=new We;class Ao extends jn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const e=t.levels;for(let t=0,n=e.length;t0){let n,i;for(n=1,i=e.length;n0){Eo.setFromMatrixPosition(this.matrixWorld);const n=t.ray.origin.distanceTo(Eo);this.getObjectForDistance(n).raycast(t,e)}}update(t){const e=this.levels;if(e.length>1){Eo.setFromMatrixPosition(t.matrixWorld),wo.setFromMatrixPosition(this.matrixWorld);const n=Eo.distanceTo(wo)/t.zoom;let i,r;for(e[0].object.visible=!0,i=1,r=e.length;i=t))break;e[i-1].object.visible=!1,e[i].object.visible=!0}for(this._currentLevel=i-1;i=n.length&&n.push({start:-1,count:-1,z:-1});const r=n[this.index];i.push(r),this.index++,r.start=t.start,r.count=t.count,r.z=e}reset(){this.list.length=0,this.index=0}}const el="batchId",nl=new Mn,il=new Mn,rl=new Mn,sl=new Mn,al=new gr,ol=new qe,ll=new dn,cl=new We,hl=new tl,ul=new Ji,dl=[];function pl(t,e,n=0){const i=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const r=t.count;for(let s=0;s65536?new Uint32Array(r):new Uint16Array(r);e.setIndex(new Mi(t,1))}const s=i>65536?new Uint32Array(n):new Uint16Array(n);e.setAttribute(el,new Mi(s,1)),this._geometryInitialized=!0}}_validateGeometry(t){if(t.getAttribute(el))throw new Error(`BatchedMesh: Geometry cannot use attribute "${el}"`);const e=this.geometry;if(Boolean(t.getIndex())!==Boolean(e.getIndex()))throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const n in e.attributes){if(n===el)continue;if(!t.hasAttribute(n))throw new Error(`BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const i=t.getAttribute(n),r=e.getAttribute(n);if(i.itemSize!==r.itemSize||i.normalized!==r.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(t){return this.customSort=t,this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new qe);const t=this._geometryCount,e=this.boundingBox,n=this._active;e.makeEmpty();for(let i=0;i=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const i={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let r=null;const s=this._reservedRanges,a=this._drawRanges,o=this._bounds;0!==this._geometryCount&&(r=s[s.length-1]),i.vertexCount=-1===e?t.getAttribute("position").count:e,i.vertexStart=null===r?0:r.vertexStart+r.vertexCount;const l=t.getIndex(),c=null!==l;if(c&&(i.indexCount=-1===n?l.count:n,i.indexStart=null===r?0:r.indexStart+r.indexCount),-1!==i.indexStart&&i.indexStart+i.indexCount>this._maxIndexCount||i.vertexStart+i.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const h=this._visibility,u=this._active,d=this._matricesTexture,p=this._matricesTexture.image.data;h.push(!0),u.push(!0);const m=this._geometryCount;this._geometryCount++,rl.toArray(p,16*m),d.needsUpdate=!0,s.push(i),a.push({start:c?i.indexStart:i.vertexStart,count:-1}),o.push({boxInitialized:!1,box:new qe,sphereInitialized:!1,sphere:new dn});const f=this.geometry.getAttribute(el);for(let t=0;t=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(e);const n=this.geometry,i=null!==n.getIndex(),r=n.getIndex(),s=e.getIndex(),a=this._reservedRanges[t];if(i&&s.count>a.indexCount||e.attributes.position.count>a.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const o=a.vertexStart,l=a.vertexCount;for(const t in n.attributes){if(t===el)continue;const i=e.getAttribute(t),r=n.getAttribute(t);pl(i,r,o);const s=i.itemSize;for(let t=i.count,e=l;t=e.length||!1===e[t]||(e[t]=!1,this._visibilityChanged=!0),this}getBoundingBoxAt(t,e){if(!1===this._active[t])return this;const n=this._bounds[t],i=n.box,r=this.geometry;if(!1===n.boxInitialized){i.makeEmpty();const e=r.index,s=r.attributes.position,a=this._drawRanges[t];for(let t=a.start,n=a.start+a.count;t=this._geometryCount||!1===n[t]||(e.toArray(r,16*t),i.needsUpdate=!0),this}getMatrixAt(t,e){const n=this._active,i=this._matricesTexture.image.data;return t>=this._geometryCount||!1===n[t]?null:e.fromArray(i,16*t)}setVisibleAt(t,e){const n=this._visibility,i=this._active;return t>=this._geometryCount||!1===i[t]||n[t]===e||(n[t]=e,this._visibilityChanged=!0),this}getVisibleAt(t){const e=this._visibility,n=this._active;return!(t>=this._geometryCount||!1===n[t])&&e[t]}raycast(t,e){const n=this._visibility,i=this._active,r=this._drawRanges,s=this._geometryCount,a=this.matrixWorld,o=this.geometry;ul.material=this.material,ul.geometry.index=o.index,ul.geometry.attributes=o.attributes,null===ul.geometry.boundingBox&&(ul.geometry.boundingBox=new qe),null===ul.geometry.boundingSphere&&(ul.geometry.boundingSphere=new dn);for(let o=0;o({...t}))),this._reservedRanges=t._reservedRanges.map((t=>({...t}))),this._visibility=t._visibility.slice(),this._active=t._active.slice(),this._bounds=t._bounds.map((t=>({boxInitialized:t.boxInitialized,box:t.box.clone(),sphereInitialized:t.sphereInitialized,sphere:t.sphere.clone()}))),this._maxGeometryCount=t._maxGeometryCount,this._maxVertexCount=t._maxVertexCount,this._maxIndexCount=t._maxIndexCount,this._geometryInitialized=t._geometryInitialized,this._geometryCount=t._geometryCount,this._multiDrawCounts=t._multiDrawCounts.slice(),this._multiDrawStarts=t._multiDrawStarts.slice(),this._matricesTexture=t._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(t,e,n,i,r){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const s=i.getIndex(),a=null===s?1:s.array.BYTES_PER_ELEMENT,o=this._visibility,l=this._multiDrawStarts,c=this._multiDrawCounts,h=this._drawRanges,u=this.perObjectFrustumCulled;u&&(sl.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),al.setFromProjectionMatrix(sl,t.isWebGPURenderer?Qt:$t));let d=0;if(this.sortObjects){il.copy(this.matrixWorld).invert(),cl.setFromMatrixPosition(n.matrixWorld).applyMatrix4(il);for(let t=0,e=o.length;to)continue;u.applyMatrix4(this.matrixWorld);const s=t.ray.origin.distanceTo(u);st.far||e.push({distance:s,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,s.start),i=Math.min(m.count,s.start+s.count)-1;no)continue;u.applyMatrix4(this.matrixWorld);const i=t.ray.origin.distanceTo(u);it.far||e.push({distance:i,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;t0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;tr.far)return;s.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:e,face:null,object:a})}}class Ul extends Fe{constructor(t,e,n,i,r,s,a,o,l,c,h,u){super(null,s,a,o,l,c,i,r,h,u),this.isCompressedTexture=!0,this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class Dl{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,e){const n=this.getUtoTmapping(t);return this.getPoint(n,e)}getPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return e}getSpacedPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let n,i=this.getPoint(0),r=0;e.push(0);for(let s=1;s<=t;s++)n=this.getPoint(s/t),r+=n.distanceTo(i),e.push(r),i=n;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e){const n=this.getLengths();let i=0;const r=n.length;let s;s=e||t*n[r-1];let a,o=0,l=r-1;for(;o<=l;)if(i=Math.floor(o+(l-o)/2),a=n[i]-s,a<0)o=i+1;else{if(!(a>0)){l=i;break}l=i-1}if(i=l,n[i]===s)return i/(r-1);const c=n[i];return(i+(s-c)/(n[i+1]-c))/(r-1)}getTangent(t,e){const n=1e-4;let i=t-n,r=t+n;i<0&&(i=0),r>1&&(r=1);const s=this.getPoint(i),a=this.getPoint(r),o=e||(s.isVector2?new me:new We);return o.copy(a).sub(s).normalize(),o}getTangentAt(t,e){const n=this.getUtoTmapping(t);return this.getTangent(n,e)}computeFrenetFrames(t,e){const n=new We,i=[],r=[],s=[],a=new We,o=new Mn;for(let e=0;e<=t;e++){const n=e/t;i[e]=this.getTangentAt(n,new We)}r[0]=new We,s[0]=new We;let l=Number.MAX_VALUE;const c=Math.abs(i[0].x),h=Math.abs(i[0].y),u=Math.abs(i[0].z);c<=l&&(l=c,n.set(1,0,0)),h<=l&&(l=h,n.set(0,1,0)),u<=l&&n.set(0,0,1),a.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],a),s[0].crossVectors(i[0],r[0]);for(let e=1;e<=t;e++){if(r[e]=r[e-1].clone(),s[e]=s[e-1].clone(),a.crossVectors(i[e-1],i[e]),a.length()>Number.EPSILON){a.normalize();const t=Math.acos(ae(i[e-1].dot(i[e]),-1,1));r[e].applyMatrix4(o.makeRotationAxis(a,t))}s[e].crossVectors(i[e],r[e])}if(!0===e){let e=Math.acos(ae(r[0].dot(r[t]),-1,1));e/=t,i[0].dot(a.crossVectors(r[0],r[t]))>0&&(e=-e);for(let n=1;n<=t;n++)r[n].applyMatrix4(o.makeRotationAxis(i[n],e*n)),s[n].crossVectors(i[n],r[n])}return{tangents:i,normals:r,binormals:s}}clone(){return(new this.constructor).copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class Nl extends Dl{constructor(t=0,e=0,n=1,i=1,r=0,s=2*Math.PI,a=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=s,this.aClockwise=a,this.aRotation=o}getPoint(t,e){const n=e||new me,i=2*Math.PI;let r=this.aEndAngle-this.aStartAngle;const s=Math.abs(r)i;)r-=i;r0?0:(Math.floor(Math.abs(l)/r)+1)*r:0===c&&l===r-1&&(l=r-2,c=1),this.closed||l>0?a=i[(l-1)%r]:(Bl.subVectors(i[0],i[1]).add(i[0]),a=Bl);const h=i[l%r],u=i[(l+1)%r];if(this.closed||l+2i.length-2?i.length-1:s+1],h=i[s>i.length-3?i.length-1:s+2];return n.set(kl(a,o.x,l.x,c.x,h.x),kl(a,o.y,l.y,c.y,h.y)),n}copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e=n){const t=i[r]-n,s=this.curves[r],a=s.getLength(),o=0===a?0:1-t/a;return s.getPointAt(o,e)}r++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let e=0;for(let n=0,i=this.curves.length;n1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,n=t.curves.length;e0){const t=l.getPoint(0);t.equals(this.currentPoint)||this.lineTo(t.x,t.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class nc extends Ii{constructor(t=[new me(0,-.5),new me(.5,0),new me(0,.5)],e=12,n=0,i=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:i},e=Math.floor(e),i=ae(i,0,2*Math.PI);const r=[],s=[],a=[],o=[],l=[],c=1/e,h=new We,u=new me,d=new We,p=new We,m=new We;let f=0,g=0;for(let e=0;e<=t.length-1;e++)switch(e){case 0:f=t[e+1].x-t[e].x,g=t[e+1].y-t[e].y,d.x=1*g,d.y=-f,d.z=0*g,m.copy(d),d.normalize(),o.push(d.x,d.y,d.z);break;case t.length-1:o.push(m.x,m.y,m.z);break;default:f=t[e+1].x-t[e].x,g=t[e+1].y-t[e].y,d.x=1*g,d.y=-f,d.z=0*g,p.copy(d),d.x+=m.x,d.y+=m.y,d.z+=m.z,d.normalize(),o.push(d.x,d.y,d.z),m.copy(p)}for(let r=0;r<=e;r++){const d=n+r*c*i,p=Math.sin(d),m=Math.cos(d);for(let n=0;n<=t.length-1;n++){h.x=t[n].x*p,h.y=t[n].y,h.z=t[n].x*m,s.push(h.x,h.y,h.z),u.x=r/e,u.y=n/(t.length-1),a.push(u.x,u.y);const i=o[3*n+0]*p,c=o[3*n+1],d=o[3*n+0]*m;l.push(i,c,d)}}for(let n=0;n0&&_(!0),e>0&&_(!1)),this.setIndex(c),this.setAttribute("position",new Ti(h,3)),this.setAttribute("normal",new Ti(u,3)),this.setAttribute("uv",new Ti(d,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new sc(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class ac extends sc{constructor(t=1,e=1,n=32,i=1,r=!1,s=0,a=2*Math.PI){super(0,t,e,n,i,r,s,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:s,thetaLength:a}}static fromJSON(t){return new ac(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class oc extends Ii{constructor(t=[],e=[],n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:i};const r=[],s=[];function a(t,e,n,i){const r=i+1,s=[];for(let i=0;i<=r;i++){s[i]=[];const a=t.clone().lerp(n,i/r),o=e.clone().lerp(n,i/r),l=r-i;for(let t=0;t<=l;t++)s[i][t]=0===t&&i===r?a:a.clone().lerp(o,t/l)}for(let t=0;t.9&&a<.1&&(e<.2&&(s[t+0]+=1),n<.2&&(s[t+2]+=1),i<.2&&(s[t+4]+=1))}}()}(),this.setAttribute("position",new Ti(r,3)),this.setAttribute("normal",new Ti(r.slice(),3)),this.setAttribute("uv",new Ti(s,2)),0===i?this.computeVertexNormals():this.normalizeNormals()}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new oc(t.vertices,t.indices,t.radius,t.details)}}class lc extends oc{constructor(t=1,e=0){const n=(1+Math.sqrt(5))/2,i=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new lc(t.radius,t.detail)}}const cc=new We,hc=new We,uc=new We,dc=new ri;class pc extends Ii{constructor(t=null,e=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:t,thresholdAngle:e},null!==t){const n=4,i=Math.pow(10,n),r=Math.cos(ie*e),s=t.getIndex(),a=t.getAttribute("position"),o=s?s.count:a.count,l=[0,0,0],c=["a","b","c"],h=new Array(3),u={},d=[];for(let t=0;t80*n){o=c=t[0],l=h=t[1];for(let e=n;ec&&(c=u),d>h&&(h=d);p=Math.max(c-o,h-l),p=0!==p?32767/p:0}return vc(s,a,n,o,l,p,0),a};function gc(t,e,n,i,r){let s,a;if(r===function(t,e,n,i){let r=0;for(let s=e,a=n-i;s0)for(s=e;s=e;s-=i)a=Fc(s,t[s],t[s+1],a);return a&&Pc(a,a.next)&&(Bc(a),a=a.next),a}function _c(t,e){if(!t)return t;e||(e=t);let n,i=t;do{if(n=!1,i.steiner||!Pc(i,i.next)&&0!==Lc(i.prev,i,i.next))i=i.next;else{if(Bc(i),i=e=i.prev,i===i.next)break;n=!0}}while(n||i!==e);return e}function vc(t,e,n,i,r,s,a){if(!t)return;!a&&s&&function(t,e,n,i){let r=t;do{0===r.z&&(r.z=wc(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){let e,n,i,r,s,a,o,l,c=1;do{for(n=t,t=null,s=null,a=0;n;){for(a++,i=n,o=0,e=0;e0||l>0&&i;)0!==o&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,o--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;n=i}s.nextZ=null,c*=2}while(a>1)}(r)}(t,i,r,s);let o,l,c=t;for(;t.prev!==t.next;)if(o=t.prev,l=t.next,s?yc(t,i,r,s):xc(t))e.push(o.i/n|0),e.push(t.i/n|0),e.push(l.i/n|0),Bc(t),t=l.next,c=l.next;else if((t=l)===c){a?1===a?vc(t=Mc(_c(t),e,n),e,n,i,r,s,2):2===a&&Sc(t,e,n,i,r,s):vc(_c(t),e,n,i,r,s,1);break}}function xc(t){const e=t.prev,n=t,i=t.next;if(Lc(e,n,i)>=0)return!1;const r=e.x,s=n.x,a=i.x,o=e.y,l=n.y,c=i.y,h=rs?r>a?r:a:s>a?s:a,p=o>l?o>c?o:c:l>c?l:c;let m=i.next;for(;m!==e;){if(m.x>=h&&m.x<=d&&m.y>=u&&m.y<=p&&Rc(r,o,s,l,a,c,m.x,m.y)&&Lc(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function yc(t,e,n,i){const r=t.prev,s=t,a=t.next;if(Lc(r,s,a)>=0)return!1;const o=r.x,l=s.x,c=a.x,h=r.y,u=s.y,d=a.y,p=ol?o>c?o:c:l>c?l:c,g=h>u?h>d?h:d:u>d?u:d,_=wc(p,m,e,n,i),v=wc(f,g,e,n,i);let x=t.prevZ,y=t.nextZ;for(;x&&x.z>=_&&y&&y.z<=v;){if(x.x>=p&&x.x<=f&&x.y>=m&&x.y<=g&&x!==r&&x!==a&&Rc(o,h,l,u,c,d,x.x,x.y)&&Lc(x.prev,x,x.next)>=0)return!1;if(x=x.prevZ,y.x>=p&&y.x<=f&&y.y>=m&&y.y<=g&&y!==r&&y!==a&&Rc(o,h,l,u,c,d,y.x,y.y)&&Lc(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(;x&&x.z>=_;){if(x.x>=p&&x.x<=f&&x.y>=m&&x.y<=g&&x!==r&&x!==a&&Rc(o,h,l,u,c,d,x.x,x.y)&&Lc(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;y&&y.z<=v;){if(y.x>=p&&y.x<=f&&y.y>=m&&y.y<=g&&y!==r&&y!==a&&Rc(o,h,l,u,c,d,y.x,y.y)&&Lc(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function Mc(t,e,n){let i=t;do{const r=i.prev,s=i.next.next;!Pc(r,s)&&Ic(r,i,i.next,s)&&Nc(r,s)&&Nc(s,r)&&(e.push(r.i/n|0),e.push(i.i/n|0),e.push(s.i/n|0),Bc(i),Bc(i.next),i=t=s),i=i.next}while(i!==t);return _c(i)}function Sc(t,e,n,i,r,s){let a=t;do{let t=a.next.next;for(;t!==a.prev;){if(a.i!==t.i&&Cc(a,t)){let o=Oc(a,t);return a=_c(a,a.next),o=_c(o,o.next),vc(a,e,n,i,r,s,0),void vc(o,e,n,i,r,s,0)}t=t.next}a=a.next}while(a!==t)}function bc(t,e){return t.x-e.x}function Tc(t,e){const n=function(t,e){let n,i=e,r=-1/0;const s=t.x,a=t.y;do{if(a<=i.y&&a>=i.next.y&&i.next.y!==i.y){const t=i.x+(a-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(t<=s&&t>r&&(r=t,n=i.x=i.x&&i.x>=l&&s!==i.x&&Rc(an.x||i.x===n.x&&Ec(n,i)))&&(n=i,u=h)),i=i.next}while(i!==o);return n}(t,e);if(!n)return e;const i=Oc(n,t);return _c(i,i.next),_c(n,n.next)}function Ec(t,e){return Lc(t.prev,t,e.prev)<0&&Lc(e.next,t,t.next)<0}function wc(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*r|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-i)*r|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Ac(t){let e=t,n=t;do{(e.x=(t-a)*(s-o)&&(t-a)*(i-o)>=(n-a)*(e-o)&&(n-a)*(s-o)>=(r-a)*(i-o)}function Cc(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Ic(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(Nc(t,e)&&Nc(e,t)&&function(t,e){let n=t,i=!1;const r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(Lc(t.prev,t,e.prev)||Lc(t,e.prev,e))||Pc(t,e)&&Lc(t.prev,t,t.next)>0&&Lc(e.prev,e,e.next)>0)}function Lc(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Pc(t,e){return t.x===e.x&&t.y===e.y}function Ic(t,e,n,i){const r=Dc(Lc(t,e,n)),s=Dc(Lc(t,e,i)),a=Dc(Lc(n,i,t)),o=Dc(Lc(n,i,e));return r!==s&&a!==o||(!(0!==r||!Uc(t,n,e))||(!(0!==s||!Uc(t,i,e))||(!(0!==a||!Uc(n,t,i))||!(0!==o||!Uc(n,e,i)))))}function Uc(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Dc(t){return t>0?1:t<0?-1:0}function Nc(t,e){return Lc(t.prev,t,t.next)<0?Lc(t,e,t.next)>=0&&Lc(t,t.prev,e)>=0:Lc(t,e,t.prev)<0||Lc(t,t.next,e)<0}function Oc(t,e){const n=new zc(t.i,t.x,t.y),i=new zc(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,s.next=i,i.prev=s,i}function Fc(t,e,n,i){const r=new zc(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Bc(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function zc(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Gc{static area(t){const e=t.length;let n=0;for(let i=e-1,r=0;r2&&t[e-1].equals(t[0])&&t.pop()}function Vc(t,e){for(let n=0;nNumber.EPSILON){const u=Math.sqrt(h),d=Math.sqrt(l*l+c*c),p=e.x-o/u,m=e.y+a/u,f=((n.x-c/d-p)*c-(n.y+l/d-m)*l)/(a*c-o*l);i=p+a*f-t.x,r=m+o*f-t.y;const g=i*i+r*r;if(g<=2)return new me(i,r);s=Math.sqrt(g/2)}else{let t=!1;a>Number.EPSILON?l>Number.EPSILON&&(t=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(t=!0):Math.sign(o)===Math.sign(c)&&(t=!0),t?(i=-o,r=a,s=Math.sqrt(h)):(i=a,r=o,s=Math.sqrt(h/2))}return new me(i/s,r/s)}const P=[];for(let t=0,e=w.length,n=e-1,i=t+1;t=0;t--){const e=t/p,n=h*Math.cos(e*Math.PI/2),i=u*Math.sin(e*Math.PI/2)+d;for(let t=0,e=w.length;t=0;){const i=n;let r=n-1;r<0&&(r=t.length-1);for(let t=0,n=o+2*p;t0)&&d.push(e,r,l),(t!==n-1||o0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class oh extends di{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new ci(16777215),this.specular=new ci(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ci(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new me(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=h,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class lh extends di{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new ci(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ci(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new me(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class ch extends di{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new me(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class hh extends di{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new ci(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ci(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new me(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=h,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class uh extends di{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new ci(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new me(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class dh extends fl{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function ph(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)}function mh(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function fh(t){const e=t.length,n=new Array(e);for(let t=0;t!==e;++t)n[t]=t;return n.sort((function(e,n){return t[e]-t[n]})),n}function gh(t,e,n){const i=t.length,r=new t.constructor(i);for(let s=0,a=0;a!==i;++s){const i=n[s]*e;for(let n=0;n!==e;++n)r[a++]=t[i+n]}return r}function _h(t,e,n,i){let r=1,s=t[0];for(;void 0!==s&&void 0===s[i];)s=t[r++];if(void 0===s)return;let a=s[i];if(void 0!==a)if(Array.isArray(a))do{a=s[i],void 0!==a&&(e.push(s.time),n.push.apply(n,a)),s=t[r++]}while(void 0!==s);else if(void 0!==a.toArray)do{a=s[i],void 0!==a&&(e.push(s.time),a.toArray(n,n.length)),s=t[r++]}while(void 0!==s);else do{a=s[i],void 0!==a&&(e.push(s.time),n.push(a)),s=t[r++]}while(void 0!==s)}const vh={convertArray:ph,isTypedArray:mh,getKeyframeOrder:fh,sortedArray:gh,flattenJSON:_h,subclip:function(t,e,n,i,r=30){const s=t.clone();s.name=e;const a=[];for(let t=0;t=i)){l.push(e.times[t]);for(let n=0;ns.tracks[t].times[0]&&(o=s.tracks[t].times[0]);for(let t=0;t=i.times[u]){const t=u*l+o,e=t+l-o;d=i.values.slice(t,e)}else{const t=i.createInterpolant(),e=o,n=l-o;t.evaluate(s),d=t.resultBuffer.slice(e,n)}if("quaternion"===r){(new ke).fromArray(d).normalize().conjugate().toArray(d)}const p=a.times.length;for(let t=0;t=r)break t;{const a=e[1];t=r)break e}s=n,n=0}}for(;n>>1;te;)--s;if(++s,0!==r||s!==i){r>=s&&(s=Math.max(s,1),r=s-1);const t=this.getValueSize();this.times=n.slice(r,s),this.values=this.values.slice(r*t,s*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const n=this.times,i=this.values,r=n.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let e=0;e!==r;e++){const i=n[e];if("number"==typeof i&&isNaN(i)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,i),t=!1;break}if(null!==s&&s>i){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,i,s),t=!1;break}s=i}if(void 0!==i&&mh(i))for(let e=0,n=i.length;e!==n;++e){const n=i[e];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,n),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===Pt,r=t.length-1;let s=1;for(let a=1;a0){t[s]=t[r];for(let t=r*n,i=s*n,a=0;a!==n;++a)e[i+a]=e[t+a];++s}return s!==t.length?(this.times=t.slice(0,s),this.values=e.slice(0,s*n)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),n=new(0,this.constructor)(this.name,t,e);return n.createInterpolant=this.createInterpolant,n}}bh.prototype.TimeBufferType=Float32Array,bh.prototype.ValueBufferType=Float32Array,bh.prototype.DefaultInterpolation=Lt;class Th extends bh{}Th.prototype.ValueTypeName="bool",Th.prototype.ValueBufferType=Array,Th.prototype.DefaultInterpolation=Ct,Th.prototype.InterpolantFactoryMethodLinear=void 0,Th.prototype.InterpolantFactoryMethodSmooth=void 0;class Eh extends bh{}Eh.prototype.ValueTypeName="color";class wh extends bh{}wh.prototype.ValueTypeName="number";class Ah extends xh{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=(n-e)/(i-e);let l=t*a;for(let t=l+a;l!==t;l+=4)ke.slerpFlat(r,0,s,l-a,s,l,o);return r}}class Rh extends bh{InterpolantFactoryMethodLinear(t){return new Ah(this.times,this.values,this.getValueSize(),t)}}Rh.prototype.ValueTypeName="quaternion",Rh.prototype.DefaultInterpolation=Lt,Rh.prototype.InterpolantFactoryMethodSmooth=void 0;class Ch extends bh{}Ch.prototype.ValueTypeName="string",Ch.prototype.ValueBufferType=Array,Ch.prototype.DefaultInterpolation=Ct,Ch.prototype.InterpolantFactoryMethodLinear=void 0,Ch.prototype.InterpolantFactoryMethodSmooth=void 0;class Lh extends bh{}Lh.prototype.ValueTypeName="vector";class Ph{constructor(t,e=-1,n,i=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=i,this.uuid=se(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],n=t.tracks,i=1/(t.fps||1);for(let t=0,r=n.length;t!==r;++t)e.push(Ih(n[t]).scale(i));const r=new this(t.name,t.duration,e,t.blendMode);return r.uuid=t.uuid,r}static toJSON(t){const e=[],n=t.tracks,i={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let t=0,i=n.length;t!==i;++t)e.push(bh.toJSON(n[t]));return i}static CreateFromMorphTargetSequence(t,e,n,i){const r=e.length,s=[];for(let t=0;t1){const t=s[1];let e=i[t];e||(i[t]=e=[]),e.push(n)}}const s=[];for(const t in i)s.push(this.CreateFromMorphTargetSequence(t,i[t],e,n));return s}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(t,e,n,i,r){if(0!==n.length){const s=[],a=[];_h(n,s,a,i),0!==s.length&&r.push(new t(e,s,a))}},i=[],r=t.name||"default",s=t.fps||30,a=t.blendMode;let o=t.length||-1;const l=t.hierarchy||[];for(let t=0;t{e&&e(r),this.manager.itemEnd(t)}),0),r;if(void 0!==Fh[t])return void Fh[t].push({onLoad:e,onProgress:n,onError:i});Fh[t]=[],Fh[t].push({onLoad:e,onProgress:n,onError:i});const s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,o=this.responseType;fetch(s).then((e=>{if(200===e.status||0===e.status){if(0===e.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===e.body||void 0===e.body.getReader)return e;const n=Fh[t],i=e.body.getReader(),r=e.headers.get("Content-Length")||e.headers.get("X-File-Size"),s=r?parseInt(r):0,a=0!==s;let o=0;const l=new ReadableStream({start(t){!function e(){i.read().then((({done:i,value:r})=>{if(i)t.close();else{o+=r.byteLength;const i=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:s});for(let t=0,e=n.length;t{switch(o){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"document":return t.text().then((t=>(new DOMParser).parseFromString(t,a)));case"json":return t.json();default:if(void 0===a)return t.text();{const e=/charset="?([^;"\s]*)"?/i.exec(a),n=e&&e[1]?e[1].toLowerCase():void 0,i=new TextDecoder(n);return t.arrayBuffer().then((t=>i.decode(t)))}}})).then((e=>{Uh.add(t,e);const n=Fh[t];delete Fh[t];for(let t=0,i=n.length;t{const n=Fh[t];if(void 0===n)throw this.manager.itemError(t),e;delete Fh[t];for(let t=0,i=n.length;t{this.manager.itemEnd(t)})),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class Gh extends Oh{constructor(t){super(t)}load(t,e,n,i){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=this,s=Uh.get(t);if(void 0!==s)return r.manager.itemStart(t),setTimeout((function(){e&&e(s),r.manager.itemEnd(t)}),0),s;const a=ye("img");function o(){c(),Uh.add(t,this),e&&e(this),r.manager.itemEnd(t)}function l(e){c(),i&&i(e),r.manager.itemError(t),r.manager.itemEnd(t)}function c(){a.removeEventListener("load",o,!1),a.removeEventListener("error",l,!1)}return a.addEventListener("load",o,!1),a.addEventListener("error",l,!1),"data:"!==t.slice(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(t),a.src=t,a}}class Hh extends jn{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new ci(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}class Vh extends Hh{constructor(t,e,n){super(t,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(jn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new ci(e)}copy(t,e){return super.copy(t,e),this.groundColor.copy(t.groundColor),this}}const kh=new Mn,Wh=new We,Xh=new We;class jh{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new me(512,512),this.map=null,this.mapPass=null,this.matrix=new Mn,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new gr,this._frameExtents=new me(1,1),this._viewportCount=1,this._viewports=[new Be(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;Wh.setFromMatrixPosition(t.matrixWorld),e.position.copy(Wh),Xh.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(Xh),e.updateMatrixWorld(),kh.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(kh),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(kh)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const t={};return 0!==this.bias&&(t.bias=this.bias),0!==this.normalBias&&(t.normalBias=this.normalBias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class qh extends jh{constructor(){super(new sr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*re*t.angle*this.focus,i=this.mapSize.width/this.mapSize.height,r=t.distance||e.far;n===e.fov&&i===e.aspect&&r===e.far||(e.fov=n,e.aspect=i,e.far=r,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}class Yh extends Hh{constructor(t,e,n=0,i=Math.PI/3,r=0,s=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(jn.DEFAULT_UP),this.updateMatrix(),this.target=new jn,this.distance=n,this.angle=i,this.penumbra=r,this.decay=s,this.map=null,this.shadow=new qh}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}const Zh=new Mn,Jh=new We,Kh=new We;class $h extends jh{constructor(){super(new sr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new me(4,2),this._viewportCount=6,this._viewports=[new Be(2,1,1,1),new Be(0,1,1,1),new Be(3,1,1,1),new Be(1,1,1,1),new Be(3,0,1,1),new Be(1,0,1,1)],this._cubeDirections=[new We(1,0,0),new We(-1,0,0),new We(0,0,1),new We(0,0,-1),new We(0,1,0),new We(0,-1,0)],this._cubeUps=[new We(0,1,0),new We(0,1,0),new We(0,1,0),new We(0,1,0),new We(0,0,1),new We(0,0,-1)]}updateMatrices(t,e=0){const n=this.camera,i=this.matrix,r=t.distance||n.far;r!==n.far&&(n.far=r,n.updateProjectionMatrix()),Jh.setFromMatrixPosition(t.matrixWorld),n.position.copy(Jh),Kh.copy(n.position),Kh.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(Kh),n.updateMatrixWorld(),i.makeTranslation(-Jh.x,-Jh.y,-Jh.z),Zh.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Zh)}}class Qh extends Hh{constructor(t,e,n=0,i=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new $h}get power(){return 4*this.intensity*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}class tu extends jh{constructor(){super(new Lr(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class eu extends Hh{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(jn.DEFAULT_UP),this.updateMatrix(),this.target=new jn,this.shadow=new tu}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class nu extends Hh{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class iu extends Hh{constructor(t,e,n=10,i=10){super(t,e),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=i}get power(){return this.intensity*this.width*this.height*Math.PI}set power(t){this.intensity=t/(this.width*this.height*Math.PI)}copy(t){return super.copy(t),this.width=t.width,this.height=t.height,this}toJSON(t){const e=super.toJSON(t);return e.object.width=this.width,e.object.height=this.height,e}}class ru{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new We)}set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,e){const n=t.x,i=t.y,r=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.282095),e.addScaledVector(s[1],.488603*i),e.addScaledVector(s[2],.488603*r),e.addScaledVector(s[3],.488603*n),e.addScaledVector(s[4],n*i*1.092548),e.addScaledVector(s[5],i*r*1.092548),e.addScaledVector(s[6],.315392*(3*r*r-1)),e.addScaledVector(s[7],n*r*1.092548),e.addScaledVector(s[8],.546274*(n*n-i*i)),e}getIrradianceAt(t,e){const n=t.x,i=t.y,r=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.886227),e.addScaledVector(s[1],1.023328*i),e.addScaledVector(s[2],1.023328*r),e.addScaledVector(s[3],1.023328*n),e.addScaledVector(s[4],.858086*n*i),e.addScaledVector(s[5],.858086*i*r),e.addScaledVector(s[6],.743125*r*r-.247708),e.addScaledVector(s[7],.858086*n*r),e.addScaledVector(s[8],.429043*(n*n-i*i)),e}add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e]);return this}addScaledSH(t,e){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(t.coefficients[n],e);return this}scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);return this}lerp(t,e){for(let n=0;n<9;n++)this.coefficients[n].lerp(t.coefficients[n],e);return this}equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(t,e+3*i);return this}toArray(t=[],e=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(t,e+3*i);return t}static getBasisAt(t,e){const n=t.x,i=t.y,r=t.z;e[0]=.282095,e[1]=.488603*i,e[2]=.488603*r,e[3]=.488603*n,e[4]=1.092548*n*i,e[5]=1.092548*i*r,e[6]=.315392*(3*r*r-1),e[7]=1.092548*n*r,e[8]=.546274*(n*n-i*i)}}class su extends Hh{constructor(t=new ru,e=1){super(void 0,e),this.isLightProbe=!0,this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this}toJSON(t){const e=super.toJSON(t);return e.object.sh=this.sh.toArray(),e}}class au extends Oh{constructor(t){super(t),this.textures={}}load(t,e,n,i){const r=this,s=new zh(r.manager);s.setPath(r.path),s.setRequestHeader(r.requestHeader),s.setWithCredentials(r.withCredentials),s.load(t,(function(n){try{e(r.parse(JSON.parse(n)))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}}),n,i)}parse(t){const e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}const i=au.createMaterialFromType(t.type);if(void 0!==t.uuid&&(i.uuid=t.uuid),void 0!==t.name&&(i.name=t.name),void 0!==t.color&&void 0!==i.color&&i.color.setHex(t.color),void 0!==t.roughness&&(i.roughness=t.roughness),void 0!==t.metalness&&(i.metalness=t.metalness),void 0!==t.sheen&&(i.sheen=t.sheen),void 0!==t.sheenColor&&(i.sheenColor=(new ci).setHex(t.sheenColor)),void 0!==t.sheenRoughness&&(i.sheenRoughness=t.sheenRoughness),void 0!==t.emissive&&void 0!==i.emissive&&i.emissive.setHex(t.emissive),void 0!==t.specular&&void 0!==i.specular&&i.specular.setHex(t.specular),void 0!==t.specularIntensity&&(i.specularIntensity=t.specularIntensity),void 0!==t.specularColor&&void 0!==i.specularColor&&i.specularColor.setHex(t.specularColor),void 0!==t.shininess&&(i.shininess=t.shininess),void 0!==t.clearcoat&&(i.clearcoat=t.clearcoat),void 0!==t.clearcoatRoughness&&(i.clearcoatRoughness=t.clearcoatRoughness),void 0!==t.iridescence&&(i.iridescence=t.iridescence),void 0!==t.iridescenceIOR&&(i.iridescenceIOR=t.iridescenceIOR),void 0!==t.iridescenceThicknessRange&&(i.iridescenceThicknessRange=t.iridescenceThicknessRange),void 0!==t.transmission&&(i.transmission=t.transmission),void 0!==t.thickness&&(i.thickness=t.thickness),void 0!==t.attenuationDistance&&(i.attenuationDistance=t.attenuationDistance),void 0!==t.attenuationColor&&void 0!==i.attenuationColor&&i.attenuationColor.setHex(t.attenuationColor),void 0!==t.anisotropy&&(i.anisotropy=t.anisotropy),void 0!==t.anisotropyRotation&&(i.anisotropyRotation=t.anisotropyRotation),void 0!==t.fog&&(i.fog=t.fog),void 0!==t.flatShading&&(i.flatShading=t.flatShading),void 0!==t.blending&&(i.blending=t.blending),void 0!==t.combine&&(i.combine=t.combine),void 0!==t.side&&(i.side=t.side),void 0!==t.shadowSide&&(i.shadowSide=t.shadowSide),void 0!==t.opacity&&(i.opacity=t.opacity),void 0!==t.transparent&&(i.transparent=t.transparent),void 0!==t.alphaTest&&(i.alphaTest=t.alphaTest),void 0!==t.alphaHash&&(i.alphaHash=t.alphaHash),void 0!==t.depthFunc&&(i.depthFunc=t.depthFunc),void 0!==t.depthTest&&(i.depthTest=t.depthTest),void 0!==t.depthWrite&&(i.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(i.colorWrite=t.colorWrite),void 0!==t.blendSrc&&(i.blendSrc=t.blendSrc),void 0!==t.blendDst&&(i.blendDst=t.blendDst),void 0!==t.blendEquation&&(i.blendEquation=t.blendEquation),void 0!==t.blendSrcAlpha&&(i.blendSrcAlpha=t.blendSrcAlpha),void 0!==t.blendDstAlpha&&(i.blendDstAlpha=t.blendDstAlpha),void 0!==t.blendEquationAlpha&&(i.blendEquationAlpha=t.blendEquationAlpha),void 0!==t.blendColor&&void 0!==i.blendColor&&i.blendColor.setHex(t.blendColor),void 0!==t.blendAlpha&&(i.blendAlpha=t.blendAlpha),void 0!==t.stencilWriteMask&&(i.stencilWriteMask=t.stencilWriteMask),void 0!==t.stencilFunc&&(i.stencilFunc=t.stencilFunc),void 0!==t.stencilRef&&(i.stencilRef=t.stencilRef),void 0!==t.stencilFuncMask&&(i.stencilFuncMask=t.stencilFuncMask),void 0!==t.stencilFail&&(i.stencilFail=t.stencilFail),void 0!==t.stencilZFail&&(i.stencilZFail=t.stencilZFail),void 0!==t.stencilZPass&&(i.stencilZPass=t.stencilZPass),void 0!==t.stencilWrite&&(i.stencilWrite=t.stencilWrite),void 0!==t.wireframe&&(i.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(i.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(i.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(i.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(i.rotation=t.rotation),void 0!==t.linewidth&&(i.linewidth=t.linewidth),void 0!==t.dashSize&&(i.dashSize=t.dashSize),void 0!==t.gapSize&&(i.gapSize=t.gapSize),void 0!==t.scale&&(i.scale=t.scale),void 0!==t.polygonOffset&&(i.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(i.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(i.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.dithering&&(i.dithering=t.dithering),void 0!==t.alphaToCoverage&&(i.alphaToCoverage=t.alphaToCoverage),void 0!==t.premultipliedAlpha&&(i.premultipliedAlpha=t.premultipliedAlpha),void 0!==t.forceSinglePass&&(i.forceSinglePass=t.forceSinglePass),void 0!==t.visible&&(i.visible=t.visible),void 0!==t.toneMapped&&(i.toneMapped=t.toneMapped),void 0!==t.userData&&(i.userData=t.userData),void 0!==t.vertexColors&&("number"==typeof t.vertexColors?i.vertexColors=t.vertexColors>0:i.vertexColors=t.vertexColors),void 0!==t.uniforms)for(const e in t.uniforms){const r=t.uniforms[e];switch(i.uniforms[e]={},r.type){case"t":i.uniforms[e].value=n(r.value);break;case"c":i.uniforms[e].value=(new ci).setHex(r.value);break;case"v2":i.uniforms[e].value=(new me).fromArray(r.value);break;case"v3":i.uniforms[e].value=(new We).fromArray(r.value);break;case"v4":i.uniforms[e].value=(new Be).fromArray(r.value);break;case"m3":i.uniforms[e].value=(new fe).fromArray(r.value);break;case"m4":i.uniforms[e].value=(new Mn).fromArray(r.value);break;default:i.uniforms[e].value=r.value}}if(void 0!==t.defines&&(i.defines=t.defines),void 0!==t.vertexShader&&(i.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(i.fragmentShader=t.fragmentShader),void 0!==t.glslVersion&&(i.glslVersion=t.glslVersion),void 0!==t.extensions)for(const e in t.extensions)i.extensions[e]=t.extensions[e];if(void 0!==t.lights&&(i.lights=t.lights),void 0!==t.clipping&&(i.clipping=t.clipping),void 0!==t.size&&(i.size=t.size),void 0!==t.sizeAttenuation&&(i.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(i.map=n(t.map)),void 0!==t.matcap&&(i.matcap=n(t.matcap)),void 0!==t.alphaMap&&(i.alphaMap=n(t.alphaMap)),void 0!==t.bumpMap&&(i.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(i.bumpScale=t.bumpScale),void 0!==t.normalMap&&(i.normalMap=n(t.normalMap)),void 0!==t.normalMapType&&(i.normalMapType=t.normalMapType),void 0!==t.normalScale){let e=t.normalScale;!1===Array.isArray(e)&&(e=[e,e]),i.normalScale=(new me).fromArray(e)}return void 0!==t.displacementMap&&(i.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(i.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(i.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(i.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(i.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(i.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(i.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(i.specularMap=n(t.specularMap)),void 0!==t.specularIntensityMap&&(i.specularIntensityMap=n(t.specularIntensityMap)),void 0!==t.specularColorMap&&(i.specularColorMap=n(t.specularColorMap)),void 0!==t.envMap&&(i.envMap=n(t.envMap)),void 0!==t.envMapIntensity&&(i.envMapIntensity=t.envMapIntensity),void 0!==t.reflectivity&&(i.reflectivity=t.reflectivity),void 0!==t.refractionRatio&&(i.refractionRatio=t.refractionRatio),void 0!==t.lightMap&&(i.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(i.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(i.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(i.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(i.gradientMap=n(t.gradientMap)),void 0!==t.clearcoatMap&&(i.clearcoatMap=n(t.clearcoatMap)),void 0!==t.clearcoatRoughnessMap&&(i.clearcoatRoughnessMap=n(t.clearcoatRoughnessMap)),void 0!==t.clearcoatNormalMap&&(i.clearcoatNormalMap=n(t.clearcoatNormalMap)),void 0!==t.clearcoatNormalScale&&(i.clearcoatNormalScale=(new me).fromArray(t.clearcoatNormalScale)),void 0!==t.iridescenceMap&&(i.iridescenceMap=n(t.iridescenceMap)),void 0!==t.iridescenceThicknessMap&&(i.iridescenceThicknessMap=n(t.iridescenceThicknessMap)),void 0!==t.transmissionMap&&(i.transmissionMap=n(t.transmissionMap)),void 0!==t.thicknessMap&&(i.thicknessMap=n(t.thicknessMap)),void 0!==t.anisotropyMap&&(i.anisotropyMap=n(t.anisotropyMap)),void 0!==t.sheenColorMap&&(i.sheenColorMap=n(t.sheenColorMap)),void 0!==t.sheenRoughnessMap&&(i.sheenRoughnessMap=n(t.sheenRoughnessMap)),i}setTextures(t){return this.textures=t,this}static createMaterialFromType(t){return new{ShadowMaterial:ih,SpriteMaterial:lo,RawShaderMaterial:rh,ShaderMaterial:ir,PointsMaterial:wl,MeshPhysicalMaterial:ah,MeshStandardMaterial:sh,MeshPhongMaterial:oh,MeshToonMaterial:lh,MeshNormalMaterial:ch,MeshLambertMaterial:hh,MeshDepthMaterial:Ha,MeshDistanceMaterial:Va,MeshBasicMaterial:pi,MeshMatcapMaterial:uh,LineDashedMaterial:dh,LineBasicMaterial:fl,Material:di}[t]}}class ou{static decodeText(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);let e="";for(let n=0,i=t.length;n0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t0&&this._mixBufferRegionAdditive(n,i,this._addIndex*e,1,e);for(let t=e,r=e+e;t!==r;++t)if(n[t]!==n[t+e]){a.setValue(n,i);break}}saveOriginalState(){const t=this.binding,e=this.buffer,n=this.valueSize,i=n*this._origIndex;t.getValue(e,i);for(let t=n,r=i;t!==r;++t)e[t]=e[i+t%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=3*this.valueSize;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let n=t;n=.5)for(let i=0;i!==r;++i)t[e+i]=t[n+i]}_slerp(t,e,n,i){ke.slerpFlat(t,e,t,e,t,n,i)}_slerpAdditive(t,e,n,i,r){const s=this._workIndex*r;ke.multiplyQuaternionsFlat(t,s,t,e,t,n),ke.slerpFlat(t,e,t,e,t,s,i)}_lerp(t,e,n,i,r){const s=1-i;for(let a=0;a!==r;++a){const r=e+a;t[r]=t[r]*s+t[n+a]*i}}_lerpAdditive(t,e,n,i,r){for(let s=0;s!==r;++s){const r=e+s;t[r]=t[r]+t[n+s]*i}}}const Lu="\\[\\]\\.:\\/",Pu=new RegExp("["+Lu+"]","g"),Iu="[^"+Lu+"]",Uu="[^"+Lu.replace("\\.","")+"]",Du=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Iu)+/(WCOD+)?/.source.replace("WCOD",Uu)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Iu)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Iu)+"$"),Nu=["material","materials","bones","map"];class Ou{constructor(t,e,n){this.path=e,this.parsedPath=n||Ou.parseTrackName(e),this.node=Ou.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new Ou.Composite(t,e,n):new Ou(t,e,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Pu,"")}static parseTrackName(t){const e=Du.exec(t);if(null===e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==i&&-1!==i){const t=n.nodeName.substring(i+1);-1!==Nu.indexOf(t)&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=t)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){const n=function(t){for(let i=0;i0){const t=this._interpolants,e=this._propertyBindings;if(this.blendMode===Ot)for(let n=0,i=t.length;n!==i;++n)t[n].evaluate(s),e[n].accumulateAdditive(a);else for(let n=0,r=t.length;n!==r;++n)t[n].evaluate(s),e[n].accumulate(i,a)}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const n=this._weightInterpolant;if(null!==n){const i=n.evaluate(t)[0];e*=i,t>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,n=this.loop;let i=this.time+t,r=this._loopCount;const s=2202===n;if(0===t)return-1===r?i:s&&1==(1&r)?e-i:i;if(2200===n){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(i>=e)i=e;else{if(!(i<0)){this.time=i;break t}i=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===r&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),i>=e||i<0){const n=Math.floor(i/e);i-=e*n,r+=Math.abs(n);const a=this.repetitions-r;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=t>0?e:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===a){const e=t<0;this._setEndings(e,!e,s)}else this._setEndings(!1,!1,s);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=i;if(s&&1==(1&r))return e-i}return i}_setEndings(t,e,n){const i=this._interpolantSettings;n?(i.endingStart=Ut,i.endingEnd=Ut):(i.endingStart=t?this.zeroSlopeAtStart?Ut:It:Dt,i.endingEnd=e?this.zeroSlopeAtEnd?Ut:It:Dt)}_scheduleFading(t,e,n){const i=this._mixer,r=i.time;let s=this._weightInterpolant;null===s&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,o=s.sampleValues;return a[0]=r,o[0]=e,a[1]=r+t,o[1]=n,this}}const Bu=new Float32Array(1);class zu{constructor(t){this.value=t}clone(){return new zu(void 0===this.value.clone?this.value:this.value.clone())}}let Gu=0;function Hu(t,e){return t.distance-e.distance}function Vu(t,e,n,i){if(t.layers.test(e.layers)&&t.raycast(e,n),!0===i){const i=t.children;for(let t=0,r=i.length;t=0;--e)t[e].stop();return this}update(t){t*=this.timeScale;const e=this._actions,n=this._nActiveActions,i=this.time+=t,r=Math.sign(t),s=this._accuIndex^=1;for(let a=0;a!==n;++a){e[a]._update(i,t,r,s)}const a=this._bindings,o=this._nActiveBindings;for(let t=0;t!==o;++t)a[t].apply(s);return this}setTime(t){this.time=0;for(let t=0;t=r){const s=r++,c=t[s];e[c.uuid]=l,t[l]=c,e[o]=s,t[s]=a;for(let t=0,e=i;t!==e;++t){const e=n[t],i=e[s],r=e[l];e[l]=i,e[s]=r}}}this.nCachedObjects_=r}uncache(){const t=this._objects,e=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_,s=t.length;for(let a=0,o=arguments.length;a!==o;++a){const o=arguments[a].uuid,l=e[o];if(void 0!==l)if(delete e[o],l0&&(e[a.uuid]=l),t[l]=a,t.pop();for(let t=0,e=i;t!==e;++t){const e=n[t];e[l]=e[r],e.pop()}}}this.nCachedObjects_=r}subscribe_(t,e){const n=this._bindingsIndicesByPath;let i=n[t];const r=this._bindings;if(void 0!==i)return r[i];const s=this._paths,a=this._parsedPaths,o=this._objects,l=o.length,c=this.nCachedObjects_,h=new Array(l);i=r.length,n[t]=i,s.push(t),a.push(e),r.push(h);for(let n=c,i=o.length;n!==i;++n){const i=o[n];h[n]=new Ou(i,t,e)}return h}unsubscribe_(t){const e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){const i=this._paths,r=this._parsedPaths,s=this._bindings,a=s.length-1,o=s[a];e[t[a]]=n,s[n]=o,s.pop(),r[n]=r[a],r.pop(),i[n]=i[a],i.pop()}}},t.AnimationUtils=vh,t.ArcCurve=Ol,t.ArrayCamera=qa,t.ArrowHelper=class extends jn{constructor(t=new We(0,0,1),e=new We(0,0,0),n=1,i=16776960,r=.2*n,s=.2*r){super(),this.type="ArrowHelper",void 0===ld&&(ld=new Ii,ld.setAttribute("position",new Ti([0,0,0,0,1,0],3)),cd=new sc(0,.5,1,5,1),cd.translate(0,-.5,0)),this.position.copy(e),this.line=new Ml(ld,new fl({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Ji(cd,new pi({color:i,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,r,s)}setDirection(t){if(t.y>.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{od.set(t.z,0,-t.x).normalize();const e=Math.acos(t.y);this.quaternion.setFromAxisAngle(od,e)}}setLength(t,e=.2*t,n=.2*e){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},t.AttachedBindMode=y,t.Audio=Tu,t.AudioAnalyser=class{constructor(t,e=2048){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=e,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let t=0;const e=this.getFrequencyData();for(let n=0;nthis.max.x||t.ythis.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,ku).distanceTo(t)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},t.Box3=qe,t.Box3Helper=class extends Tl{constructor(t,e=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Ii;i.setIndex(new Mi(n,1)),i.setAttribute("position",new Ti([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(i,new fl({color:e,toneMapped:!1})),this.box=t,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(t){const e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(t))}dispose(){this.geometry.dispose(),this.material.dispose()}},t.BoxGeometry=$i,t.BoxHelper=class extends Tl{constructor(t,e=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Float32Array(24),r=new Ii;r.setIndex(new Mi(n,1)),r.setAttribute("position",new Mi(i,3)),super(r,new fl({color:e,toneMapped:!1})),this.object=t,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(t){if(void 0!==t&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&ad.setFromObject(this.object),ad.isEmpty())return;const e=ad.min,n=ad.max,i=this.geometry.attributes.position,r=i.array;r[0]=n.x,r[1]=n.y,r[2]=n.z,r[3]=e.x,r[4]=n.y,r[5]=n.z,r[6]=e.x,r[7]=e.y,r[8]=n.z,r[9]=n.x,r[10]=e.y,r[11]=n.z,r[12]=n.x,r[13]=n.y,r[14]=e.z,r[15]=e.x,r[16]=n.y,r[17]=e.z,r[18]=e.x,r[19]=e.y,r[20]=e.z,r[21]=n.x,r[22]=e.y,r[23]=e.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(t){return this.object=t,this.update(),this}copy(t,e){return super.copy(t,e),this.object=t.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}},t.BufferAttribute=Mi,t.BufferGeometry=Ii,t.BufferGeometryLoader=cu,t.ByteType=1010,t.Cache=Uh,t.Camera=rr,t.CameraHelper=class extends Tl{constructor(t){const e=new Ii,n=new fl({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],r=[],s={};function a(t,e){o(t),o(e)}function o(t){i.push(0,0,0),r.push(0,0,0),void 0===s[t]&&(s[t]=[]),s[t].push(i.length/3-1)}a("n1","n2"),a("n2","n4"),a("n4","n3"),a("n3","n1"),a("f1","f2"),a("f2","f4"),a("f4","f3"),a("f3","f1"),a("n1","f1"),a("n2","f2"),a("n3","f3"),a("n4","f4"),a("p","n1"),a("p","n2"),a("p","n3"),a("p","n4"),a("u1","u2"),a("u2","u3"),a("u3","u1"),a("c","t"),a("p","c"),a("cn1","cn2"),a("cn3","cn4"),a("cf1","cf2"),a("cf3","cf4"),e.setAttribute("position",new Ti(i,3)),e.setAttribute("color",new Ti(r,3)),super(e,n),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update();const l=new ci(16755200),c=new ci(16711680),h=new ci(43775),u=new ci(16777215),d=new ci(3355443);this.setColors(l,c,h,u,d)}setColors(t,e,n,i,r){const s=this.geometry.getAttribute("color");s.setXYZ(0,t.r,t.g,t.b),s.setXYZ(1,t.r,t.g,t.b),s.setXYZ(2,t.r,t.g,t.b),s.setXYZ(3,t.r,t.g,t.b),s.setXYZ(4,t.r,t.g,t.b),s.setXYZ(5,t.r,t.g,t.b),s.setXYZ(6,t.r,t.g,t.b),s.setXYZ(7,t.r,t.g,t.b),s.setXYZ(8,t.r,t.g,t.b),s.setXYZ(9,t.r,t.g,t.b),s.setXYZ(10,t.r,t.g,t.b),s.setXYZ(11,t.r,t.g,t.b),s.setXYZ(12,t.r,t.g,t.b),s.setXYZ(13,t.r,t.g,t.b),s.setXYZ(14,t.r,t.g,t.b),s.setXYZ(15,t.r,t.g,t.b),s.setXYZ(16,t.r,t.g,t.b),s.setXYZ(17,t.r,t.g,t.b),s.setXYZ(18,t.r,t.g,t.b),s.setXYZ(19,t.r,t.g,t.b),s.setXYZ(20,t.r,t.g,t.b),s.setXYZ(21,t.r,t.g,t.b),s.setXYZ(22,t.r,t.g,t.b),s.setXYZ(23,t.r,t.g,t.b),s.setXYZ(24,e.r,e.g,e.b),s.setXYZ(25,e.r,e.g,e.b),s.setXYZ(26,e.r,e.g,e.b),s.setXYZ(27,e.r,e.g,e.b),s.setXYZ(28,e.r,e.g,e.b),s.setXYZ(29,e.r,e.g,e.b),s.setXYZ(30,e.r,e.g,e.b),s.setXYZ(31,e.r,e.g,e.b),s.setXYZ(32,n.r,n.g,n.b),s.setXYZ(33,n.r,n.g,n.b),s.setXYZ(34,n.r,n.g,n.b),s.setXYZ(35,n.r,n.g,n.b),s.setXYZ(36,n.r,n.g,n.b),s.setXYZ(37,n.r,n.g,n.b),s.setXYZ(38,i.r,i.g,i.b),s.setXYZ(39,i.r,i.g,i.b),s.setXYZ(40,r.r,r.g,r.b),s.setXYZ(41,r.r,r.g,r.b),s.setXYZ(42,r.r,r.g,r.b),s.setXYZ(43,r.r,r.g,r.b),s.setXYZ(44,r.r,r.g,r.b),s.setXYZ(45,r.r,r.g,r.b),s.setXYZ(46,r.r,r.g,r.b),s.setXYZ(47,r.r,r.g,r.b),s.setXYZ(48,r.r,r.g,r.b),s.setXYZ(49,r.r,r.g,r.b),s.needsUpdate=!0}update(){const t=this.geometry,e=this.pointMap;rd.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),sd("c",e,t,rd,0,0,-1),sd("t",e,t,rd,0,0,1),sd("n1",e,t,rd,-1,-1,-1),sd("n2",e,t,rd,1,-1,-1),sd("n3",e,t,rd,-1,1,-1),sd("n4",e,t,rd,1,1,-1),sd("f1",e,t,rd,-1,-1,1),sd("f2",e,t,rd,1,-1,1),sd("f3",e,t,rd,-1,1,1),sd("f4",e,t,rd,1,1,1),sd("u1",e,t,rd,.7,1.1,-1),sd("u2",e,t,rd,-.7,1.1,-1),sd("u3",e,t,rd,0,2,-1),sd("cf1",e,t,rd,-1,0,1),sd("cf2",e,t,rd,1,0,1),sd("cf3",e,t,rd,0,-1,1),sd("cf4",e,t,rd,0,1,1),sd("cn1",e,t,rd,-1,0,-1),sd("cn2",e,t,rd,1,0,-1),sd("cn3",e,t,rd,0,-1,-1),sd("cn4",e,t,rd,0,1,-1),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}},t.CanvasTexture=class extends Fe{constructor(t,e,n,i,r,s,a,o,l){super(t,e,n,i,r,s,a,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}},t.CapsuleGeometry=ic,t.CatmullRomCurve3=Vl,t.CineonToneMapping=g,t.CircleGeometry=rc,t.ClampToEdgeWrapping=C,t.Clock=vu,t.Color=ci,t.ColorKeyframeTrack=Eh,t.ColorManagement=Re,t.CompressedArrayTexture=class extends Ul{constructor(t,e,n,i,r,s){super(t,e,n,r,s),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=C}},t.CompressedCubeTexture=class extends Ul{constructor(t,e,n){super(void 0,t[0].width,t[0].height,e,n,b),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}},t.CompressedTexture=Ul,t.CompressedTextureLoader=class extends Oh{constructor(t){super(t)}load(t,e,n,i){const r=this,s=[],a=new Ul,o=new zh(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(r.withCredentials);let l=0;function c(c){o.load(t[c],(function(t){const n=r.parse(t,!0);s[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(a.minFilter=D),a.image=s,a.format=n.format,a.needsUpdate=!0,e&&e(a))}),n,i)}if(Array.isArray(t))for(let e=0,n=t.length;e{e&&e(n),r.manager.itemEnd(t)})).catch((t=>{i&&i(t)})):(setTimeout((function(){e&&e(s),r.manager.itemEnd(t)}),0),s);const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader;const o=fetch(t,a).then((function(t){return t.blob()})).then((function(t){return createImageBitmap(t,Object.assign(r.options,{colorSpaceConversion:"none"}))})).then((function(n){return Uh.add(t,n),e&&e(n),r.manager.itemEnd(t),n})).catch((function(e){i&&i(e),Uh.remove(t),r.manager.itemError(t),r.manager.itemEnd(t)}));Uh.add(t,o),r.manager.itemStart(t)}},t.ImageLoader=Gh,t.ImageUtils=Ie,t.IncrementStencilOp=7682,t.IncrementWrapStencilOp=34055,t.InstancedBufferAttribute=ko,t.InstancedBufferGeometry=lu,t.InstancedInterleavedBuffer=class extends so{constructor(t,e,n=1){super(t,e),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}clone(t){const e=super.clone(t);return e.meshPerAttribute=this.meshPerAttribute,e}toJSON(t){const e=super.toJSON(t);return e.isInstancedInterleavedBuffer=!0,e.meshPerAttribute=this.meshPerAttribute,e}},t.InstancedMesh=Ko,t.Int16BufferAttribute=class extends Mi{constructor(t,e,n){super(new Int16Array(t),e,n)}},t.Int32BufferAttribute=class extends Mi{constructor(t,e,n){super(new Int32Array(t),e,n)}},t.Int8BufferAttribute=class extends Mi{constructor(t,e,n){super(new Int8Array(t),e,n)}},t.IntType=z,t.InterleavedBuffer=so,t.InterleavedBufferAttribute=oo,t.Interpolant=xh,t.InterpolateDiscrete=Ct,t.InterpolateLinear=Lt,t.InterpolateSmooth=Pt,t.InvertStencilOp=5386,t.KeepStencilOp=Yt,t.KeyframeTrack=bh,t.LOD=Ao,t.LatheGeometry=nc,t.Layers=In,t.LessCompare=513,t.LessDepth=2,t.LessEqualCompare=515,t.LessEqualDepth=3,t.LessEqualStencilFunc=515,t.LessStencilFunc=513,t.Light=Hh,t.LightProbe=su,t.Line=Ml,t.Line3=class{constructor(t=new We,e=new We){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){Wu.subVectors(t,this.start),Xu.subVectors(this.end,this.start);const n=Xu.dot(Xu);let i=Xu.dot(Wu)/n;return e&&(i=ae(i,0,1)),i}closestPointToPoint(t,e,n){const i=this.closestPointToPointParameter(t,e);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}},t.LineBasicMaterial=fl,t.LineCurve=Yl,t.LineCurve3=Zl,t.LineDashedMaterial=dh,t.LineLoop=El,t.LineSegments=Tl,t.LinearDisplayP3ColorSpace=kt,t.LinearEncoding=Ft,t.LinearFilter=D,t.LinearInterpolant=Mh,t.LinearMipMapLinearFilter=1008,t.LinearMipMapNearestFilter=1007,t.LinearMipmapLinearFilter=O,t.LinearMipmapNearestFilter=N,t.LinearSRGBColorSpace=Ht,t.LinearToneMapping=m,t.LinearTransfer=Wt,t.Loader=Oh,t.LoaderUtils=ou,t.LoadingManager=Dh,t.LoopOnce=2200,t.LoopPingPong=2202,t.LoopRepeat=2201,t.LuminanceAlphaFormat=1025,t.LuminanceFormat=1024,t.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},t.Material=di,t.MaterialLoader=au,t.MathUtils=pe,t.Matrix3=fe,t.Matrix4=Mn,t.MaxEquation=104,t.Mesh=Ji,t.MeshBasicMaterial=pi,t.MeshDepthMaterial=Ha,t.MeshDistanceMaterial=Va,t.MeshLambertMaterial=hh,t.MeshMatcapMaterial=uh,t.MeshNormalMaterial=ch,t.MeshPhongMaterial=oh,t.MeshPhysicalMaterial=ah,t.MeshStandardMaterial=sh,t.MeshToonMaterial=lh,t.MinEquation=103,t.MirroredRepeatWrapping=L,t.MixOperation=u,t.MultiplyBlending=4,t.MultiplyOperation=h,t.NearestFilter=P,t.NearestMipMapLinearFilter=1005,t.NearestMipMapNearestFilter=1004,t.NearestMipmapLinearFilter=U,t.NearestMipmapNearestFilter=I,t.NeverCompare=512,t.NeverDepth=0,t.NeverStencilFunc=512,t.NoBlending=0,t.NoColorSpace=zt,t.NoToneMapping=p,t.NormalAnimationBlendMode=Nt,t.NormalBlending=1,t.NotEqualCompare=517,t.NotEqualDepth=7,t.NotEqualStencilFunc=517,t.NumberKeyframeTrack=wh,t.Object3D=jn,t.ObjectLoader=class extends Oh{constructor(t){super(t)}load(t,e,n,i){const r=this,s=""===this.path?ou.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||s;const a=new zh(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,(function(n){let s=null;try{s=JSON.parse(n)}catch(e){return void 0!==i&&i(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.message)}const a=s.metadata;if(void 0===a||void 0===a.type||"geometry"===a.type.toLowerCase())return void 0!==i&&i(new Error("THREE.ObjectLoader: Can't load "+t)),void console.error("THREE.ObjectLoader: Can't load "+t);r.parse(s,e)}),n,i)}async loadAsync(t,e){const n=""===this.path?ou.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||n;const i=new zh(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials);const r=await i.loadAsync(t,e),s=JSON.parse(r),a=s.metadata;if(void 0===a||void 0===a.type||"geometry"===a.type.toLowerCase())throw new Error("THREE.ObjectLoader: Can't load "+t);return await this.parseAsync(s)}parse(t,e){const n=this.parseAnimations(t.animations),i=this.parseShapes(t.shapes),r=this.parseGeometries(t.geometries,i),s=this.parseImages(t.images,(function(){void 0!==e&&e(l)})),a=this.parseTextures(t.textures,s),o=this.parseMaterials(t.materials,a),l=this.parseObject(t.object,r,o,a,n),c=this.parseSkeletons(t.skeletons,l);if(this.bindSkeletons(l,c),void 0!==e){let t=!1;for(const e in s)if(s[e].data instanceof HTMLImageElement){t=!0;break}!1===t&&e(l)}return l}async parseAsync(t){const e=this.parseAnimations(t.animations),n=this.parseShapes(t.shapes),i=this.parseGeometries(t.geometries,n),r=await this.parseImagesAsync(t.images),s=this.parseTextures(t.textures,r),a=this.parseMaterials(t.materials,s),o=this.parseObject(t.object,i,a,s,e),l=this.parseSkeletons(t.skeletons,o);return this.bindSkeletons(o,l),o}parseShapes(t){const e={};if(void 0!==t)for(let n=0,i=t.length;n0){const n=new Dh(e);r=new Gh(n),r.setCrossOrigin(this.crossOrigin);for(let e=0,n=t.length;e0){i=new Gh(this.manager),i.setCrossOrigin(this.crossOrigin);for(let e=0,i=t.length;e{const e=new qe;e.min.fromArray(t.boxMin),e.max.fromArray(t.boxMax);const n=new dn;return n.radius=t.sphereRadius,n.center.fromArray(t.sphereCenter),{boxInitialized:t.boxInitialized,box:e,sphereInitialized:t.sphereInitialized,sphere:n}})),s._maxGeometryCount=t.maxGeometryCount,s._maxVertexCount=t.maxVertexCount,s._maxIndexCount=t.maxIndexCount,s._geometryInitialized=t.geometryInitialized,s._geometryCount=t.geometryCount,s._matricesTexture=h(t.matricesTexture.uuid);break;case"LOD":s=new Ao;break;case"Line":s=new Ml(l(t.geometry),c(t.material));break;case"LineLoop":s=new El(l(t.geometry),c(t.material));break;case"LineSegments":s=new Tl(l(t.geometry),c(t.material));break;case"PointCloud":case"Points":s=new Pl(l(t.geometry),c(t.material));break;case"Sprite":s=new bo(c(t.material));break;case"Group":s=new Ya;break;case"Bone":s=new Bo;break;default:s=new jn}if(s.uuid=t.uuid,void 0!==t.name&&(s.name=t.name),void 0!==t.matrix?(s.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(s.matrixAutoUpdate=t.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(void 0!==t.position&&s.position.fromArray(t.position),void 0!==t.rotation&&s.rotation.fromArray(t.rotation),void 0!==t.quaternion&&s.quaternion.fromArray(t.quaternion),void 0!==t.scale&&s.scale.fromArray(t.scale)),void 0!==t.up&&s.up.fromArray(t.up),void 0!==t.castShadow&&(s.castShadow=t.castShadow),void 0!==t.receiveShadow&&(s.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(s.shadow.bias=t.shadow.bias),void 0!==t.shadow.normalBias&&(s.shadow.normalBias=t.shadow.normalBias),void 0!==t.shadow.radius&&(s.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&s.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(s.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(s.visible=t.visible),void 0!==t.frustumCulled&&(s.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(s.renderOrder=t.renderOrder),void 0!==t.userData&&(s.userData=t.userData),void 0!==t.layers&&(s.layers.mask=t.layers),void 0!==t.children){const a=t.children;for(let t=0;t1)for(let n=0;nNumber.EPSILON){if(l<0&&(n=e[s],o=-o,a=e[r],l=-l),t.ya.y)continue;if(t.y===n.y){if(t.x===n.x)return!0}else{const e=l*(t.x-n.x)-o*(t.y-n.y);if(0===e)return!0;if(e<0)continue;i=!i}}else{if(t.y!==n.y)continue;if(a.x<=t.x&&t.x<=n.x||n.x<=t.x&&t.x<=a.x)return!0}}return i}const n=Gc.isClockWise,i=this.subPaths;if(0===i.length)return[];let r,s,a;const o=[];if(1===i.length)return s=i[0],a=new mc,a.curves=s.curves,o.push(a),o;let l=!n(i[0].getPoints());l=t?!l:l;const c=[],h=[];let u,d,p=[],m=0;h[m]=void 0,p[m]=[];for(let e=0,a=i.length;e1){let t=!1,n=0;for(let t=0,e=h.length;t0&&!1===t&&(p=c)}for(let t=0,e=h.length;t=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}},t.WebGL1Renderer=eo,t.WebGL3DRenderTarget=class extends Ge{constructor(t=1,e=1,n=1,i={}){super(t,e,i),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new Ve(null,t,e,n),this.texture.isRenderTargetTexture=!0}},t.WebGLArrayRenderTarget=class extends Ge{constructor(t=1,e=1,n=1,i={}){super(t,e,i),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new He(null,t,e,n),this.texture.isRenderTargetTexture=!0}},t.WebGLCoordinateSystem=$t,t.WebGLCubeRenderTarget=cr,t.WebGLMultipleRenderTargets=class extends Ge{constructor(t=1,e=1,n=1,i={}){super(t,e,i),this.isWebGLMultipleRenderTargets=!0;const r=this.texture;this.texture=[];for(let t=0;t { + return await request.post({ + url: `/source/uploadLocationImage`, + data + }) } } diff --git a/src/renderer/src/auto-imports.d.ts b/src/renderer/src/auto-imports.d.ts index 72bc97c..f06b3ba 100644 --- a/src/renderer/src/auto-imports.d.ts +++ b/src/renderer/src/auto-imports.d.ts @@ -8,6 +8,7 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] const ElMessage: typeof import('element-plus/es')['ElMessage'] + const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const computed: typeof import('vue')['computed'] const createApp: typeof import('vue')['createApp'] const customRef: typeof import('vue')['customRef'] diff --git a/src/renderer/src/axios/index.ts b/src/renderer/src/axios/index.ts index c7b56a7..ad41bff 100644 --- a/src/renderer/src/axios/index.ts +++ b/src/renderer/src/axios/index.ts @@ -19,7 +19,7 @@ if (window && window.process && window.process.type === 'renderer') { // 创建自定义配置的axios实例 const service: AxiosInstance = axios.create({ baseURL: baseURL, - timeout: 10000, + timeout: 300000, headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' diff --git a/src/renderer/src/common/addMapSource.ts b/src/renderer/src/common/addMapSource.ts index 01c603e..c296bab 100644 --- a/src/renderer/src/common/addMapSource.ts +++ b/src/renderer/src/common/addMapSource.ts @@ -43,5 +43,6 @@ export const addMapSource = async ({ type, id, sourceName = '未命名对象', o TreeApi.addOtherSource(params) params.params = JSON.stringify(params.params) params.isShow = true + cusAddNodes(window.treeObj, params.parentId, [params]) } \ No newline at end of file diff --git a/src/renderer/src/common/initMapData.ts b/src/renderer/src/common/initMapData.ts index 396dd72..19f45fa 100644 --- a/src/renderer/src/common/initMapData.ts +++ b/src/renderer/src/common/initMapData.ts @@ -1,3 +1,4 @@ +import { leftClick, rightClick } from '../../src/views/components/tree/entityClick' export const initMapData = async (type, data) => { let entityObject let options @@ -16,7 +17,10 @@ export const initMapData = async (type, data) => { entityObject = new YJ.Obj.StandText(window.earth, data) break case 'point': + case 'linkImage': + case 'vrImage': entityObject = new YJ.Obj.BillboardObject(window.earth, data) + entityObject.options.billboard.defaultImage='' break case 'line': entityObject = await new YJ.Obj.PolylineObject(window.earth, data) @@ -99,6 +103,14 @@ export const initMapData = async (type, data) => { } options = structuredClone(entityObject.options) delete options.host + //鼠标左键点击事件 + entityObject.onClick = () => { + leftClick(options); + }; + //鼠标右键点击事件 + entityObject.onRightClick = () => { + rightClick(options); + }; // options = entityObject return options } diff --git a/src/renderer/src/main.ts b/src/renderer/src/main.ts index 3371fbd..79b24b1 100644 --- a/src/renderer/src/main.ts +++ b/src/renderer/src/main.ts @@ -34,9 +34,9 @@ const i18n = createI18n({ 'zh-TW': zhTW, 'zh-EN': zhEN } -}) +}); // 注册全局指令 - +(window as any)._winMap = new Map(); const setApp = createApp(App) // 定义全局方法 diff --git a/src/renderer/src/views/components/propertyBox/CircleObject.vue b/src/renderer/src/views/components/propertyBox/CircleObject.vue index 2a61c2b..dd88225 100644 --- a/src/renderer/src/views/components/propertyBox/CircleObject.vue +++ b/src/renderer/src/views/components/propertyBox/CircleObject.vue @@ -133,12 +133,13 @@ import { ref } from 'vue'; import { inject } from "vue"; import { TreeApi } from '@/api/tree' +import { ElMessage, ElMessageBox } from 'element-plus' import Dialog from '@/components/dialog/baseDialog.vue' import attribute from './attribute.vue' import labelStyle from './labelStyle.vue' import { useTreeNode } from '@/views/components/tree/hooks/treeNode' -const { cusUpdateNode } = useTreeNode() +const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode() const title = ref('圆') const baseDialog: any = ref(null); @@ -320,8 +321,31 @@ const close = () => { } const remove = () => { - that.remove() close() + ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + let selectNodes = getSelectedNodes(window.treeObj) + let source_ids = cusRemoveNode(window.treeObj, selectNodes) + const res = await TreeApi.removeDirectory({ ids: source_ids }) + if (res.code == 0 || res.code == 200) { + ElMessage({ + message: '删除成功', + type: 'success' + }) + that.remove() + } else { + ElMessage({ + message: res.msg || '删除失败', + type: 'error' + }) + } + }) + .catch(() => { + }) } watch( diff --git a/src/renderer/src/views/components/propertyBox/attribute.vue b/src/renderer/src/views/components/propertyBox/attribute.vue index 608c828..164d7a3 100644 --- a/src/renderer/src/views/components/propertyBox/attribute.vue +++ b/src/renderer/src/views/components/propertyBox/attribute.vue @@ -362,7 +362,10 @@ const linkDelete = (index: any) => { attribute.value.link.content.splice(index, 1) } const linkConfirmEdit = (index: string | number) => { - attribute.value.link.content[index] = linkEditActive.value + attribute.value.link.content[index] = { + name: linkEditActive.value.name, + url: linkEditActive.value.url + } linkEditActive.value = {} } const linkCancelEdit = () => { diff --git a/src/renderer/src/views/components/propertyBox/billboardObject.vue b/src/renderer/src/views/components/propertyBox/billboardObject.vue index 2b71a8c..c732206 100644 --- a/src/renderer/src/views/components/propertyBox/billboardObject.vue +++ b/src/renderer/src/views/components/propertyBox/billboardObject.vue @@ -460,12 +460,13 @@ import { ref } from 'vue' import { inject } from 'vue' import { TreeApi } from '@/api/tree' +import { ElMessage, ElMessageBox } from 'element-plus' import Dialog from '@/components/dialog/baseDialog.vue' import attribute from './attribute.vue' import { getFontList } from './fontSelect' import { useTreeNode } from '@/views/components/tree/hooks/treeNode' -const { cusUpdateNode } = useTreeNode() +const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode() const baseDialog: any = ref(null) const eventBus: any = inject('bus') @@ -771,8 +772,32 @@ const fontChange = (val) => { } const remove = () => { - that.remove() close() + ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + let selectNodes = getSelectedNodes(window.treeObj) + let source_ids = cusRemoveNode(window.treeObj, selectNodes) + const res = await TreeApi.removeDirectory({ ids: source_ids }) + if (res.code == 0 || res.code == 200) { + ElMessage({ + message: '删除成功', + type: 'success' + }) + that.remove() + } else { + ElMessage({ + message: res.msg || '删除失败', + type: 'error' + }) + } + }) + .catch(() => { + // 用户点击取消,不执行任何操作 + }) } defineExpose({ diff --git a/src/renderer/src/views/components/propertyBox/circleDiffuse.vue b/src/renderer/src/views/components/propertyBox/circleDiffuse.vue index a33f2fe..1887a4b 100644 --- a/src/renderer/src/views/components/propertyBox/circleDiffuse.vue +++ b/src/renderer/src/views/components/propertyBox/circleDiffuse.vue @@ -112,11 +112,12 @@ import { ref } from 'vue'; import { inject } from "vue"; import { TreeApi } from '@/api/tree' +import { ElMessage, ElMessageBox } from 'element-plus' import Dialog from '@/components/dialog/baseDialog.vue' import attribute from './attribute.vue' import labelStyle from './labelStyle.vue' import { useTreeNode } from '@/views/components/tree/hooks/treeNode' -const { cusUpdateNode } = useTreeNode() +const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode() const baseDialog: any = ref(null); const eventBus: any = inject("bus"); @@ -129,7 +130,7 @@ const activeName = ref('1') const entityOptions: any = ref({}); let originalOptions: any let that: any -const circle:any = ref([]) +const circle: any = ref([]) const colorRefs = ref<(Element | ComponentPublicInstance | null)[]>([]) const open = async (id: any) => { that = window.earth.entityMap.get(id) @@ -272,8 +273,32 @@ const close = () => { baseDialog.value?.close() } const remove = () => { - entityOptions.value.remove() close() + ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + let selectNodes = getSelectedNodes(window.treeObj) + let source_ids = cusRemoveNode(window.treeObj, selectNodes) + const res = await TreeApi.removeDirectory({ ids: source_ids }) + if (res.code == 0 || res.code == 200) { + ElMessage({ + message: '删除成功', + type: 'success' + }) + that.remove() + } else { + ElMessage({ + message: res.msg || '删除失败', + type: 'error' + }) + } + }) + .catch(() => { + // 用户点击取消,不执行任何操作 + }) } const translate = () => { that.openPositionEditing(() => { diff --git a/src/renderer/src/views/components/propertyBox/curvelineObject.vue b/src/renderer/src/views/components/propertyBox/curvelineObject.vue index 2e15a90..a21a9fa 100644 --- a/src/renderer/src/views/components/propertyBox/curvelineObject.vue +++ b/src/renderer/src/views/components/propertyBox/curvelineObject.vue @@ -287,13 +287,14 @@ import { ref, getCurrentInstance } from 'vue' import { inject } from 'vue' import { TreeApi } from '@/api/tree' +import { ElMessage, ElMessageBox } from 'element-plus' import Dialog from '@/components/dialog/baseDialog.vue' import { getFontList } from './fontSelect' import attribute from './attribute.vue' import labelStyle from './labelStyle.vue' import { useTreeNode } from '@/views/components/tree/hooks/treeNode' -const { cusUpdateNode } = useTreeNode() +const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode() const baseDialog: any = ref(null) const eventBus: any = inject('bus') @@ -546,8 +547,31 @@ const close = () => { } const remove = () => { - that.remove() close() + ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + let selectNodes = getSelectedNodes(window.treeObj) + let source_ids = cusRemoveNode(window.treeObj, selectNodes) + const res = await TreeApi.removeDirectory({ ids: source_ids }) + if (res.code == 0 || res.code == 200) { + ElMessage({ + message: '删除成功', + type: 'success' + }) + that.remove() + } else { + ElMessage({ + message: res.msg || '删除失败', + type: 'error' + }) + } + }) + .catch(() => { + }) } watch( diff --git a/src/renderer/src/views/components/propertyBox/groundText.vue b/src/renderer/src/views/components/propertyBox/groundText.vue index bfb8073..b64e3cf 100644 --- a/src/renderer/src/views/components/propertyBox/groundText.vue +++ b/src/renderer/src/views/components/propertyBox/groundText.vue @@ -86,9 +86,10 @@ import { ref } from 'vue'; import { inject } from "vue"; import { TreeApi } from '@/api/tree' +import { ElMessage, ElMessageBox } from 'element-plus' import Dialog from '@/components/dialog/baseDialog.vue' import { useTreeNode } from '@/views/components/tree/hooks/treeNode' -const { cusUpdateNode } = useTreeNode() +const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode() const baseDialog: any = ref(null); const eventBus: any = inject("bus"); @@ -142,8 +143,32 @@ const close = () => { baseDialog.value?.close() } const remove = () => { - entityOptions.value.remove() - close() + close() + ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + let selectNodes = getSelectedNodes(window.treeObj) + let source_ids = cusRemoveNode(window.treeObj, selectNodes) + const res = await TreeApi.removeDirectory({ ids: source_ids }) + if (res.code == 0 || res.code == 200) { + ElMessage({ + message: '删除成功', + type: 'success' + }) + entityOptions.value.remove() + } else { + ElMessage({ + message: res.msg || '删除失败', + type: 'error' + }) + } + }) + .catch(() => { + // 用户点击取消,不执行任何操作 + }) } const translate = () => { entityOptions.value.positionEditing = true diff --git a/src/renderer/src/views/components/propertyBox/layer.vue b/src/renderer/src/views/components/propertyBox/layer.vue index 28c17c4..53269e0 100644 --- a/src/renderer/src/views/components/propertyBox/layer.vue +++ b/src/renderer/src/views/components/propertyBox/layer.vue @@ -67,7 +67,7 @@ const confirm = () => { brightness: entityOptions.value.brightness, name: entityOptions.value.name, show: entityOptions.value.show, - id: entityOptions.value.id, + id: entityOptions.value.options.id, } let params2 = { "id": params.id, diff --git a/src/renderer/src/views/components/propertyBox/polygonObject.vue b/src/renderer/src/views/components/propertyBox/polygonObject.vue index 9237c8e..bfb3f29 100644 --- a/src/renderer/src/views/components/propertyBox/polygonObject.vue +++ b/src/renderer/src/views/components/propertyBox/polygonObject.vue @@ -133,12 +133,13 @@ import { ref } from 'vue'; import { inject } from "vue"; import { TreeApi } from '@/api/tree' +import { ElMessage, ElMessageBox } from 'element-plus' import Dialog from '@/components/dialog/baseDialog.vue' import attribute from './attribute.vue' import labelStyle from './labelStyle.vue' import { useTreeNode } from '@/views/components/tree/hooks/treeNode' -const { cusUpdateNode } = useTreeNode() +const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode() const title = ref('面') const baseDialog: any = ref(null); @@ -327,8 +328,32 @@ const close = () => { } const remove = () => { - that.remove() close() + ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + let selectNodes = getSelectedNodes(window.treeObj) + let source_ids = cusRemoveNode(window.treeObj, selectNodes) + const res = await TreeApi.removeDirectory({ ids: source_ids }) + if (res.code == 0 || res.code == 200) { + ElMessage({ + message: '删除成功', + type: 'success' + }) + that.remove() + } else { + ElMessage({ + message: res.msg || '删除失败', + type: 'error' + }) + } + }) + .catch(() => { + // 用户点击取消,不执行任何操作 + }) } watch( diff --git a/src/renderer/src/views/components/propertyBox/polylineObject.vue b/src/renderer/src/views/components/propertyBox/polylineObject.vue index 51d4ffc..ad48603 100644 --- a/src/renderer/src/views/components/propertyBox/polylineObject.vue +++ b/src/renderer/src/views/components/propertyBox/polylineObject.vue @@ -295,12 +295,13 @@ import { ref, getCurrentInstance } from 'vue' import { inject } from 'vue' import { TreeApi } from '@/api/tree' +import { ElMessage, ElMessageBox } from 'element-plus' import Dialog from '@/components/dialog/baseDialog.vue' import attribute from './attribute.vue' import labelStyle from './labelStyle.vue' import { useTreeNode } from '@/views/components/tree/hooks/treeNode' -const { cusUpdateNode } = useTreeNode() +const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode() const baseDialog: any = ref(null) const eventBus: any = inject('bus') @@ -553,8 +554,32 @@ const close = () => { } const remove = () => { - that.remove() close() + ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + let selectNodes = getSelectedNodes(window.treeObj) + let source_ids = cusRemoveNode(window.treeObj, selectNodes) + const res = await TreeApi.removeDirectory({ ids: source_ids }) + if (res.code == 0 || res.code == 200) { + ElMessage({ + message: '删除成功', + type: 'success' + }) + that.remove() + } else { + ElMessage({ + message: res.msg || '删除失败', + type: 'error' + }) + } + }) + .catch(() => { + // 用户点击取消,不执行任何操作 + }) } watch( diff --git a/src/renderer/src/views/components/propertyBox/radarScan.vue b/src/renderer/src/views/components/propertyBox/radarScan.vue index 415dd42..36802b4 100644 --- a/src/renderer/src/views/components/propertyBox/radarScan.vue +++ b/src/renderer/src/views/components/propertyBox/radarScan.vue @@ -75,11 +75,12 @@ import { ref } from 'vue'; import { inject } from "vue"; import { TreeApi } from '@/api/tree' +import { ElMessage, ElMessageBox } from 'element-plus' import Dialog from '@/components/dialog/baseDialog.vue' import attribute from './attribute.vue' import labelStyle from './labelStyle.vue' import { useTreeNode } from '@/views/components/tree/hooks/treeNode' -const { cusUpdateNode } = useTreeNode() +const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode() const baseDialog: any = ref(null); const eventBus: any = inject("bus"); @@ -137,8 +138,32 @@ const close = () => { baseDialog.value?.close() } const remove = () => { - entityOptions.value.remove() close() + ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + let selectNodes = getSelectedNodes(window.treeObj) + let source_ids = cusRemoveNode(window.treeObj, selectNodes) + const res = await TreeApi.removeDirectory({ ids: source_ids }) + if (res.code == 0 || res.code == 200) { + ElMessage({ + message: '删除成功', + type: 'success' + }) + entityOptions.value.remove() + } else { + ElMessage({ + message: res.msg || '删除失败', + type: 'error' + }) + } + }) + .catch(() => { + // 用户点击取消,不执行任何操作 + }) } const changeRadius = (val)=>{ if (radiusUnit.value == 'km') { diff --git a/src/renderer/src/views/components/propertyBox/standText.vue b/src/renderer/src/views/components/propertyBox/standText.vue index 7c1da55..c14aab8 100644 --- a/src/renderer/src/views/components/propertyBox/standText.vue +++ b/src/renderer/src/views/components/propertyBox/standText.vue @@ -47,9 +47,10 @@ import { ref } from 'vue'; import { inject } from "vue"; import { TreeApi } from '@/api/tree' +import { ElMessage, ElMessageBox } from 'element-plus' import Dialog from '@/components/dialog/baseDialog.vue' import { useTreeNode } from '@/views/components/tree/hooks/treeNode' -const { cusUpdateNode } = useTreeNode() +const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode() const baseDialog: any = ref(null); const eventBus: any = inject("bus"); @@ -101,8 +102,32 @@ const close = () => { baseDialog.value?.close() } const remove = () => { - that.remove() close() + ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { + let selectNodes = getSelectedNodes(window.treeObj) + let source_ids = cusRemoveNode(window.treeObj, selectNodes) + const res = await TreeApi.removeDirectory({ ids: source_ids }) + if (res.code == 0 || res.code == 200) { + ElMessage({ + message: '删除成功', + type: 'success' + }) + that.remove() + } else { + ElMessage({ + message: res.msg || '删除失败', + type: 'error' + }) + } + }) + .catch(() => { + // 用户点击取消,不执行任何操作 + }) } const nodeEdit = () => { that.nodeEdit() diff --git a/src/renderer/src/views/components/propertyBox/terrain.vue b/src/renderer/src/views/components/propertyBox/terrain.vue new file mode 100644 index 0000000..c463f04 --- /dev/null +++ b/src/renderer/src/views/components/propertyBox/terrain.vue @@ -0,0 +1,108 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/views/components/propertyBox/tileset.vue b/src/renderer/src/views/components/propertyBox/tileset.vue index 86382fc..67909df 100644 --- a/src/renderer/src/views/components/propertyBox/tileset.vue +++ b/src/renderer/src/views/components/propertyBox/tileset.vue @@ -39,6 +39,14 @@