From 83890faaea9c8ba881c72f26ee767e40fe153343 Mon Sep 17 00:00:00 2001 From: tianmo Date: Fri, 11 Sep 2026 10:00:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=8B=86=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/Preset/index.json | 4 - dist/assets/index-Acs2Q5qJ.css | 1 - dist/assets/index-ClCjv-tT.css | 1 + .../{index-BUbc0qUx.js => index-Cr68vmVa.js} | 2 +- .../{index-D08n0lXm.js => index-CxN-rEmg.js} | 114 +- .../{index-B1oGFzi8.js => index-hYCzV0U1.js} | 2 +- dist/index.html | 28 +- .../Contents/MacOS/SpineParticleConnector | Bin 330248 -> 347800 bytes release/connector/连接器.zip | Bin 0 -> 120435 bytes scripts/build-connector-app.mjs | 4 +- scripts/build-connector-windows-msvc.bat | 2 +- src/core/particleConfig.ts | 479 ++++ src/core/particleConstants.ts | 4 + src/core/particleEmitter.ts | 1102 +------- src/core/particleMath.ts | 225 ++ src/core/particleTypes.ts | 399 +++ src/views/ParticlePanel.vue | 2378 +---------------- src/views/Stage.vue | 626 +---- src/views/particle-panel/EmissionSection.vue | 182 ++ .../particle-panel/ExportSettingsSection.vue | 110 + .../ParticleAppearanceSection.vue | 157 ++ .../ParticleAttributesSection.vue | 196 ++ .../particle-panel/ParticleExportFooter.vue | 61 + .../ParticleModifiersSection.vue | 433 +++ .../particle-panel/ProjectConfigSection.vue | 53 + .../particle-panel/SceneObjectsSection.vue | 275 ++ .../particle-panel/particlePanelContext.ts | 17 + .../particle-panel/particlePanelCurves.ts | 7 + src/views/particle-panel/useParticleExport.ts | 225 ++ src/views/particle-panel/useParticlePanel.ts | 458 ++++ .../particle-panel/useParticleResources.ts | 433 +++ src/views/particle-panel/useProjectPresets.ts | 106 + src/views/stage/axisGuides.ts | 102 + src/views/stage/boneGuides.ts | 104 + src/views/stage/emitterGuides.ts | 160 ++ src/views/stage/sceneGuides.ts | 209 ++ src/views/stage/stageGeometry.ts | 56 + src/views/stage/stageTypes.ts | 15 + 38 files changed, 4586 insertions(+), 4144 deletions(-) delete mode 100644 dist/assets/index-Acs2Q5qJ.css create mode 100644 dist/assets/index-ClCjv-tT.css rename dist/assets/{index-BUbc0qUx.js => index-Cr68vmVa.js} (99%) rename dist/assets/{index-D08n0lXm.js => index-CxN-rEmg.js} (65%) rename dist/assets/{index-B1oGFzi8.js => index-hYCzV0U1.js} (99%) create mode 100644 release/connector/连接器.zip create mode 100644 src/core/particleConfig.ts create mode 100644 src/core/particleConstants.ts create mode 100644 src/core/particleMath.ts create mode 100644 src/core/particleTypes.ts create mode 100644 src/views/particle-panel/EmissionSection.vue create mode 100644 src/views/particle-panel/ExportSettingsSection.vue create mode 100644 src/views/particle-panel/ParticleAppearanceSection.vue create mode 100644 src/views/particle-panel/ParticleAttributesSection.vue create mode 100644 src/views/particle-panel/ParticleExportFooter.vue create mode 100644 src/views/particle-panel/ParticleModifiersSection.vue create mode 100644 src/views/particle-panel/ProjectConfigSection.vue create mode 100644 src/views/particle-panel/SceneObjectsSection.vue create mode 100644 src/views/particle-panel/particlePanelContext.ts create mode 100644 src/views/particle-panel/particlePanelCurves.ts create mode 100644 src/views/particle-panel/useParticleExport.ts create mode 100644 src/views/particle-panel/useParticlePanel.ts create mode 100644 src/views/particle-panel/useParticleResources.ts create mode 100644 src/views/particle-panel/useProjectPresets.ts create mode 100644 src/views/stage/axisGuides.ts create mode 100644 src/views/stage/boneGuides.ts create mode 100644 src/views/stage/emitterGuides.ts create mode 100644 src/views/stage/sceneGuides.ts create mode 100644 src/views/stage/stageGeometry.ts create mode 100644 src/views/stage/stageTypes.ts diff --git a/dist/Preset/index.json b/dist/Preset/index.json index 52a7445..97d6d16 100644 --- a/dist/Preset/index.json +++ b/dist/Preset/index.json @@ -10,9 +10,5 @@ { "name": "粒子-序列帧-拖尾-碰撞-路径-spine", "file": "粒子-序列帧-拖尾-碰撞-路径-spine.json" - }, - { - "name": "烟花金币spine", - "file": "烟花金币spine.json" } ] diff --git a/dist/assets/index-Acs2Q5qJ.css b/dist/assets/index-Acs2Q5qJ.css deleted file mode 100644 index b22ec30..0000000 --- a/dist/assets/index-Acs2Q5qJ.css +++ /dev/null @@ -1 +0,0 @@ -.help-overlay[data-v-ae69ecd7]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:72px 24px 28px;box-sizing:border-box;background:#05080fb8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.help-dialog[data-v-ae69ecd7]{width:min(820px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #3a4864;border-radius:14px;background:#141a27;color:#b8c3d8;box-shadow:0 22px 70px #0000009e}.help-head[data-v-ae69ecd7]{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 15px;border-bottom:1px solid #2b354a;background:linear-gradient(135deg,#202942,#181e2d)}.help-head h2[data-v-ae69ecd7]{margin:0;color:#eef2ff;font-size:19px}.help-head p[data-v-ae69ecd7]{margin:5px 0 0;color:#7786a3;font-size:11px}.help-close[data-v-ae69ecd7]{width:28px;height:28px;flex:0 0 28px;border:1px solid #43516b;border-radius:6px;background:#273249;color:#ccd7ed;cursor:pointer}.help-close[data-v-ae69ecd7]:hover{border-color:#7774ff;background:#3b4670;color:#fff}.help-body[data-v-ae69ecd7]{min-height:0;overflow:auto;padding:18px 20px 21px}.help-section[data-v-ae69ecd7]{padding:14px 15px;border:1px solid #2c3850;border-radius:10px;background:#181f2e}.help-section h3[data-v-ae69ecd7]{margin:0 0 11px;color:#9fb2ff;font-size:13px}.help-start ol[data-v-ae69ecd7]{margin:0;padding-left:21px;color:#aab6cc;font-size:12px;line-height:1.75}.help-start li[data-v-ae69ecd7]::marker{color:#7774ff;font-weight:700}.help-section b[data-v-ae69ecd7]{color:#dce4f7}.help-grid[data-v-ae69ecd7]{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(250px,.85fr);gap:12px;margin-top:12px}.help-list[data-v-ae69ecd7]{display:grid;gap:0;margin:0}.help-list>div[data-v-ae69ecd7]{display:grid;grid-template-columns:78px 1fr;gap:9px;padding:7px 0;border-bottom:1px solid #263146}.help-list>div[data-v-ae69ecd7]:last-child{border-bottom:0}.help-list dt[data-v-ae69ecd7]{color:#d3dcf0;font-size:11px;font-weight:700}.help-list dd[data-v-ae69ecd7]{margin:0;color:#8795ae;font-size:11px;line-height:1.5}.shortcut-list[data-v-ae69ecd7]{display:grid;gap:7px}.shortcut-list>div[data-v-ae69ecd7]{display:flex;align-items:center;min-height:25px;gap:5px}.shortcut-list kbd[data-v-ae69ecd7]{min-width:24px;box-sizing:border-box;padding:3px 6px;border:1px solid #465470;border-bottom-width:2px;border-radius:5px;background:#101623;color:#e0e7f6;font:10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;text-align:center}.shortcut-list span[data-v-ae69ecd7]{color:#65728b;font-size:10px}.shortcut-list em[data-v-ae69ecd7]{margin-left:auto;color:#9ca9c1;font-size:11px;font-style:normal}.help-note[data-v-ae69ecd7]{margin:11px 0 0;padding-top:9px;border-top:1px solid #2a3549;color:#697791;font-size:10px;line-height:1.55}.help-export[data-v-ae69ecd7]{margin-top:12px}.help-export p[data-v-ae69ecd7]{margin:0;color:#8997b0;font-size:11px;line-height:1.65}.help-doc-title[data-v-ae69ecd7]{margin:16px 2px 2px;color:#9fb2ff;font-size:13px;font-weight:700;letter-spacing:.5px}.help-module[data-v-ae69ecd7]{margin-top:12px}.help-module-head[data-v-ae69ecd7]{display:flex;align-items:center;gap:8px;width:100%;padding:0;border:0;background:transparent;color:#9fb2ff;font:inherit;font-size:13px;font-weight:700;text-align:left;cursor:pointer}.help-module-head[data-v-ae69ecd7]:hover{color:#fff}.help-module-head .mtitle[data-v-ae69ecd7]{flex:1;min-width:0}.help-module-head .caret[data-v-ae69ecd7]{flex:0 0 auto;color:#7b86a2;font-size:12px}.help-module.open .help-module-head[data-v-ae69ecd7]{color:#fff}.help-module.open .help-module-head .caret[data-v-ae69ecd7]{color:#9fb2ff}.help-module .mnum[data-v-ae69ecd7]{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:linear-gradient(135deg,#4a53b8,#6a5fd0);color:#fff;font-size:12px;font-weight:700}.help-module.help-connector[data-v-ae69ecd7]{border-color:#4a4f8a;background:linear-gradient(135deg,#1d2442,#181d2f)}.help-module.help-connector .help-module-head[data-v-ae69ecd7]{color:#b8c2ff}.help-module .connector-intro[data-v-ae69ecd7]{margin:0 0 10px;color:#9aa8c4;font-size:11px;line-height:1.6}.help-module .connector-intro b[data-v-ae69ecd7]{color:#dce4f7}.help-module .dl-link[data-v-ae69ecd7]{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;margin:0 10px 6px 0;padding:6px 12px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;font-size:12px;font-weight:700;text-decoration:none}.help-module .dl-link[data-v-ae69ecd7]:hover{border-color:#8982ff;background:#554dc2}.help-module .dl-link small[data-v-ae69ecd7]{color:#cfe0ff;font-weight:500;font-size:9px}.help-module-body[data-v-ae69ecd7]{padding-top:10px}@media(max-width:760px){.help-overlay[data-v-ae69ecd7]{padding:66px 12px 14px}.help-grid[data-v-ae69ecd7]{grid-template-columns:1fr}}.stage-wrap[data-v-373478e7]{position:relative;width:100%;height:100%;overflow:hidden}.stage-holder[data-v-373478e7]{width:100%;height:100%;cursor:grab;touch-action:none;background-color:#0e1219;outline:none}.stage-holder.grid[data-v-373478e7]{background:conic-gradient(#141a26 90deg,transparent 90deg 180deg,#141a26 180deg 270deg,transparent 270deg);background-size:28px 28px}.stage-holder[data-v-373478e7]:active{cursor:grabbing}.topbar[data-v-373478e7]{position:absolute;top:10px;left:10px;right:10px;display:flex;align-items:center;gap:10px;padding:8px 12px;background:#141420d9;border-radius:10px;border:1px solid rgba(255,255,255,.08);font-size:12px;color:#aab;z-index:5;flex-wrap:wrap}.topbar input[type=range][data-v-373478e7]{background:#1a1a28;border:1px solid #2e2e44;color:#dde;border-radius:5px}.tool-group[data-v-373478e7]{display:flex;gap:6px;margin-left:6px;padding-left:12px;border-left:1px solid #2a2a3c}.tool-btn[data-v-373478e7]{width:30px;height:26px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}.tool-btn[data-v-373478e7]:hover{background:#2b3a5c;color:#fff}.tool-btn.on[data-v-373478e7]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.background-menu[data-v-373478e7]{position:relative;flex:0 0 auto}.background-btn[data-v-373478e7]{height:28px;padding:0 11px;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;cursor:pointer}.background-btn[data-v-373478e7]:hover,.background-btn.on[data-v-373478e7]{border-color:#7774ff;background:#343b63;color:#fff}.background-panel[data-v-373478e7]{position:absolute;top:calc(100% + 9px);right:0;width:248px;box-sizing:border-box;padding:10px;border:1px solid #343b50;border-radius:9px;background:#141420fa;color:#aeb8cc;box-shadow:0 8px 24px #0000007a;z-index:12}.background-upload[data-v-373478e7]{width:100%;height:30px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;cursor:pointer}.background-upload[data-v-373478e7]:hover{border-color:#8982ff;background:#554dc2}.background-clear[data-v-373478e7]{width:100%;height:28px;margin-top:6px;border:1px solid #70404a;border-radius:6px;background:#512a33;color:#efb5bd;cursor:pointer}.background-clear[data-v-373478e7]:hover:not(:disabled){border-color:#b65b6a;background:#6a303b;color:#fff}.background-clear[data-v-373478e7]:disabled{opacity:.42;cursor:not-allowed}.background-file-input[data-v-373478e7]{display:none}.background-file-name[data-v-373478e7]{margin:7px 2px 9px;overflow:hidden;color:#737f98;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.background-position-row[data-v-373478e7]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.background-position-row label[data-v-373478e7]{display:flex;align-items:center;gap:5px;color:#8995ad;font-size:11px}.background-position-row input[data-v-373478e7]{width:0;min-width:0;flex:1;box-sizing:border-box;height:28px;padding:0 6px;border:1px solid #343e55;border-radius:5px;background:#101522;color:#e1e6f2}.background-opacity-row[data-v-373478e7]{display:grid;grid-template-columns:46px 1fr 34px;align-items:center;gap:7px;margin-top:10px;font-size:11px}.background-opacity-row input[data-v-373478e7]{min-width:0;accent-color:#675de0}.background-opacity-row b[data-v-373478e7]{color:#aeb8cc;font-size:10px;text-align:right;font-variant-numeric:tabular-nums}.help-btn[data-v-373478e7]{height:28px;margin-left:auto;padding:0 11px;flex:0 0 auto;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;font-weight:700;cursor:pointer}.help-btn[data-v-373478e7]:hover,.help-btn.on[data-v-373478e7]{border-color:#7774ff;background:#343b63;color:#fff}.zoom-pct[data-v-373478e7]{margin-left:0;font-variant-numeric:tabular-nums;color:#9aa;min-width:44px;text-align:center}.hud[data-v-373478e7]{position:absolute;bottom:12px;left:12px;padding:8px 12px;background:#141420bf;border-radius:8px;font-size:12px;color:#a0a8cc}.hud-number[data-v-373478e7]{display:inline-block;box-sizing:border-box;text-align:right;font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}.hud-system-count[data-v-373478e7]{width:3ch}.hud-particle-count[data-v-373478e7]{width:7ch;text-align:left}.hud-tip[data-v-373478e7]{margin-left:12px;color:#5f6a8a;font-size:11px}b[data-v-373478e7]{color:#fc3}.settings-btn[data-v-373478e7]{height:28px;padding:0 12px;flex:0 0 auto;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cdf;font-size:12px;font-weight:700;cursor:pointer}.settings-btn[data-v-373478e7]:hover{border-color:#7774ff;background:#2b3a5c;color:#fff}.undo-btn[data-v-373478e7]{width:30px;height:28px;flex:0 0 30px;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cdd8ed;font-size:18px;line-height:1;cursor:pointer}.undo-btn[data-v-373478e7]:hover:not(:disabled){border-color:#7774ff;background:#2b3a5c;color:#fff}.undo-btn[data-v-373478e7]:disabled{opacity:.38;cursor:not-allowed}.settings-panel[data-v-373478e7]{position:absolute;top:52px;left:10px;width:240px;z-index:10;background:#141420f7;border:1px solid #2a2a3c;border-radius:10px;padding:10px 12px;font-size:12px;color:#aab;box-shadow:0 6px 20px #0006}.sp-head[data-v-373478e7]{display:flex;justify-content:space-between;align-items:center;font-weight:700;color:#cdf;margin-bottom:10px}.sp-section-title[data-v-373478e7]{margin:2px 0 8px;color:#8a93bb;font-size:11px}.sp-switch-row[data-v-373478e7]{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#aab}.sp-switch-control[data-v-373478e7]{display:inline-flex;align-items:center;gap:7px}.sp-switch-control input[data-v-373478e7]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.sp-switch-ui[data-v-373478e7]{position:relative;width:34px;height:18px;border-radius:999px;background:#39445a;cursor:pointer;transition:background .16s ease}.sp-switch-ui[data-v-373478e7]:after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#f4f6fb;transition:transform .16s ease}.sp-switch-control input:checked+.sp-switch-ui[data-v-373478e7]{background:#655df0}.sp-switch-control input:checked+.sp-switch-ui[data-v-373478e7]:after{transform:translate(16px)}.sp-switch-control input:focus-visible+.sp-switch-ui[data-v-373478e7]{outline:2px solid #8b86ff;outline-offset:2px}.sp-switch-control b[data-v-373478e7]{min-width:24px;color:#8a93bb;font-size:11px;font-weight:500}.sp-cache-note[data-v-373478e7]{margin-top:10px;padding-top:9px;border-top:1px solid #2a2a3c;color:#647089;font-size:10px;text-align:center}.sp-divider[data-v-373478e7]{height:1px;margin:10px 0;background:#2a2a3c}.sp-close[data-v-373478e7]{background:#2e3a55;border:none;color:#cdf;border-radius:4px;width:18px;height:18px;cursor:pointer;font-size:11px}.sp-row[data-v-373478e7]{display:flex;align-items:center;gap:8px;margin:8px 0}.sp-row>span[data-v-373478e7]:first-child{width:76px;flex-shrink:0;color:#8a93bb}.sp-row input[type=range][data-v-373478e7]{flex:1;background:#1a1a28;accent-color:#3a5a8c}.sp-num[data-v-373478e7]{width:52px;background:#1a1a28;border:1px solid #2e2e44;border-radius:5px;color:#dde;font-size:12px;padding:2px 4px}.sp-undo-limit[data-v-373478e7]{margin-left:auto;width:64px;height:26px;box-sizing:border-box}.sp-colr[data-v-373478e7]{width:26px;height:22px;border:none;background:none;cursor:pointer}.sp-hex[data-v-373478e7]{font-size:11px;color:#889;font-variant-numeric:tabular-nums}.sp-chk[data-v-373478e7]{display:flex;align-items:center;gap:6px;margin:8px 0;color:#aab}.sp-chk.disabled[data-v-373478e7]{color:#5f687d;cursor:not-allowed}.sp-chk.disabled input[data-v-373478e7]{cursor:not-allowed;opacity:.55}.ns[data-v-45669c72]{display:flex;align-items:center;gap:8px;margin:6px 0;font-size:12px;color:#aab}.ns-label[data-v-45669c72]{width:60px;flex-shrink:0;color:#8a93bb}.ns-range[data-v-45669c72]{flex:1;accent-color:#3a7cd6}.ns-num[data-v-45669c72]{width:56px;padding:3px 5px;background:#1a1a28;border:1px solid #2e2e44;border-radius:5px;color:#dde;font-size:12px;text-align:right}.ns.disabled[data-v-45669c72]{opacity:.55}.ns.disabled .ns-range[data-v-45669c72],.ns.disabled .ns-num[data-v-45669c72]{cursor:not-allowed}.ce[data-v-3c8d1b94]{display:flex;align-items:flex-start;gap:6px;width:100%}.ce-editor[data-v-3c8d1b94]{flex:1;min-width:0}.ce-reset[data-v-3c8d1b94]{flex:0 0 auto;padding:5px 7px;border:1px solid #3b4b65;border-radius:5px;background:#242f42;color:#c4cee2;font-size:10px;cursor:pointer}.ce-reset[data-v-3c8d1b94]:hover{border-color:#7774ff;background:#4f4dc2;color:#fff}.ce-svg[data-v-3c8d1b94]{width:100%;height:110px;display:block;border:1px solid #2a2a3c;border-radius:6px;background:#10101a;cursor:crosshair;touch-action:none}.ce-grid line[data-v-3c8d1b94]{stroke:#1e1e30;stroke-width:1}.ce-frame[data-v-3c8d1b94]{stroke:#2e2e44;stroke-width:1}.ce-line[data-v-3c8d1b94]{stroke:#6ea0e8;stroke-width:2;stroke-linejoin:round}.ce-handles line[data-v-3c8d1b94]{stroke:#8d96b5;stroke-width:1;stroke-dasharray:3 2}.ce-handles circle[data-v-3c8d1b94]{fill:#b7c2dd;stroke:#344d94;stroke-width:1.2;cursor:grab}.ce-handles circle[data-v-3c8d1b94]:active{cursor:grabbing}.ce-node[data-v-3c8d1b94]{fill:#fff;stroke:#3a55aa;stroke-width:1.6;pointer-events:none}.ce-hit[data-v-3c8d1b94]{fill:transparent;stroke:none;cursor:grab}.ce-hit[data-v-3c8d1b94]:active{cursor:grabbing}.ce-nav[data-v-3c8d1b94]{display:flex;justify-content:space-between;margin-top:3px}.ce-tip[data-v-3c8d1b94]{color:#566;font-size:10px}.pac[data-v-7a931847]{padding:10px;margin:8px 0;border:1px solid #2c3850;border-radius:7px;background:#171d2a}.pac-head[data-v-7a931847]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}.pac-label[data-v-7a931847]{color:#aeb8cf;font-size:12px;font-weight:600;white-space:nowrap}.pac-modes[data-v-7a931847]{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}.pac-mode[data-v-7a931847]{padding:4px 7px;border:1px solid #344158;border-radius:5px;background:#273246;color:#aeb8cf;font-size:11px;cursor:pointer}.pac-mode.on[data-v-7a931847]{border-color:#7774ff;background:#605df0;color:#fff}.pac-curve[data-v-7a931847]{margin-top:8px}.pac-axis[data-v-7a931847]{display:flex;justify-content:space-between;margin-top:3px;color:#5f6b82;font-size:10px}.pac[data-v-7a931847] .ns-label{width:58px}.pac[data-v-7a931847] .ce-svg{height:96px;background:#0f1625;border-color:#30405a}.pac[data-v-7a931847] .ce-tip{color:#657188}.gradient-editor[data-v-8816e4a4]{margin:8px 0 11px 68px}.gradient-bar[data-v-8816e4a4]{position:relative;height:18px;margin-bottom:14px;border:1px solid #465570;border-radius:6px;cursor:crosshair}.gradient-stop[data-v-8816e4a4]{position:absolute;top:15px;width:14px;height:17px;padding:0;transform:translate(-50%);border:2px solid #d8deea;border-radius:2px 2px 5px 5px;background:var(--stop-color);cursor:grab;box-shadow:0 1px 3px #0009}.gradient-stop[data-v-8816e4a4]:before{content:"";position:absolute;left:2px;top:-7px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:5px solid #d8deea}.gradient-stop.selected[data-v-8816e4a4]{outline:2px solid #7774ff;outline-offset:1px;z-index:2}.gradient-stop[data-v-8816e4a4]:active{cursor:grabbing}.gradient-controls[data-v-8816e4a4]{display:flex;align-items:center;gap:5px;margin-top:30px}.gradient-color[data-v-8816e4a4]{width:28px;height:24px;padding:1px;border:1px solid #465570;border-radius:4px;background:#151b27;cursor:pointer}.gradient-hex-input[data-v-8816e4a4]{width:66px;padding:4px 5px;border:1px solid #344158;border-radius:4px;outline:none;background:#101725;color:#aeb8cb;font-size:10px;font-family:monospace}.gradient-hex-input[data-v-8816e4a4]:focus{border-color:#7774ff;color:#fff}.gradient-position[data-v-8816e4a4]{display:flex;align-items:center;color:#71809a;font-size:10px}.gradient-position input[data-v-8816e4a4]{width:43px;padding:3px 4px;border:1px solid #344158;border-radius:4px;outline:none;background:#101725;color:#dce3ef;text-align:right}.gradient-action[data-v-8816e4a4]{width:25px;height:24px;padding:0;border:1px solid #3a4860;border-radius:4px;background:#273246;color:#cbd4e5;cursor:pointer}.gradient-action[data-v-8816e4a4]:hover:not(:disabled){border-color:#7774ff;color:#fff}.gradient-action.danger[data-v-8816e4a4]{color:#e3a5aa}.gradient-action[data-v-8816e4a4]:disabled{opacity:.35;cursor:not-allowed}.gradient-hint[data-v-8816e4a4]{margin-top:5px;color:#59667b;font-size:9px}.image-card[data-v-7a2d016a]{margin:8px 0;padding:9px;border:1px solid #2e3c55;border-radius:7px;background:#171d2a}.imgrow[data-v-7a2d016a]{display:flex;align-items:flex-start;gap:8px}.img-thumb[data-v-7a2d016a]{width:48px;height:48px;padding:0;border:1px solid #3a4963;border-radius:6px;background:#1a2232;display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;overflow:hidden}.img-thumb[data-v-7a2d016a]:hover{border-color:#7774ff}.img-thumb img[data-v-7a2d016a]{display:block;width:100%;height:100%;object-fit:contain}.img-fields[data-v-7a2d016a]{flex:1;min-width:0}.img-actions[data-v-7a2d016a]{display:flex;flex-direction:column;gap:4px}.row[data-v-7a2d016a]{display:flex;align-items:center;gap:8px;margin:6px 0;color:#aab;font-size:12px}.row>span[data-v-7a2d016a]:first-child{width:60px;flex-shrink:0;color:#8a93bb}.inp[data-v-7a2d016a]{min-width:0;flex:1;padding:3px 5px;border:1px solid #2e2e44;border-radius:5px;background:#1a1a28;color:#dde;font-size:12px}.mini-btn2[data-v-7a2d016a]{width:26px;height:24px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:5px;color:#aab;font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center}.mini-btn2[data-v-7a2d016a]:hover{background:#2b3a5c}.mini-btn2[data-v-7a2d016a]:disabled{opacity:.35;cursor:not-allowed}.thumb-note[data-v-7a2d016a]{margin:4px 0 2px;color:#667;font-size:11px}.sequence-pick[data-v-7a2d016a]{width:100%;margin:2px 0 4px;padding:6px 8px;border:1px solid #4a4a76;border-radius:5px;background:#27264b;color:#d8d7ff;font-size:12px;cursor:pointer}.sequence-pick[data-v-7a2d016a]:hover{border-color:#7774ff;background:#35336a}.sequence-note[data-v-7a2d016a]{margin:0 0 6px;color:#727b9b;font-size:11px;line-height:1.4}.resource-weight-row[data-v-7a2d016a]{display:grid;grid-template-columns:minmax(0,1fr) 28px;align-items:center;gap:7px}.resource-weight-control[data-v-7a2d016a]{width:100%;min-width:0}.resource-weight-control[data-v-7a2d016a] .ns-range{min-width:0}.resource-weight-control[data-v-7a2d016a] .ns-num{flex:0 0 56px;box-sizing:border-box}.weight-lock[data-v-7a2d016a]{width:28px;height:26px;flex:0 0 28px;padding:5px;border:1px solid #35435c;border-radius:5px;background:#202a3b;color:#78859e;cursor:pointer}.weight-lock svg[data-v-7a2d016a]{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.weight-lock[data-v-7a2d016a]:hover:not(:disabled){border-color:#7774ff;color:#b8b6ff}.weight-lock.on[data-v-7a2d016a]{border-color:#7774ff;background:#514fd0;color:#fff}.weight-lock[data-v-7a2d016a]:disabled{opacity:.35;cursor:not-allowed}.spine-editor[data-v-3af7b738]{display:grid;gap:10px;color:#c5cbe0}.editor-title[data-v-3af7b738],.section-title[data-v-3af7b738]{color:#dce2f5;font-weight:700}.editor-title[data-v-3af7b738]{padding-bottom:9px;border-bottom:1px solid #30394d}.grid[data-v-3af7b738]{display:grid;gap:8px}.grid.three[data-v-3af7b738]{grid-template-columns:repeat(3,minmax(0,1fr))}.field[data-v-3af7b738]{display:grid;gap:5px;min-width:0;color:#919bb7;font-size:12px}.field input[data-v-3af7b738],.field select[data-v-3af7b738],.asset-name[data-v-3af7b738]{box-sizing:border-box;width:100%;min-width:0;height:35px;padding:0 10px;color:#e2e6f3;background:#101625;border:1px solid #32405b;border-radius:6px}.divider[data-v-3af7b738]{height:1px;background:#30394d;margin:2px 0}.asset-row[data-v-3af7b738]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.asset-name[data-v-3af7b738]{display:flex;align-items:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#7f8aa7}button[data-v-3af7b738]{height:35px;padding:0 13px;border:1px solid #3b4a67;border-radius:6px;background:#33415b;color:#e2e6f3;cursor:pointer}button[data-v-3af7b738]:hover{filter:brightness(1.13)}button[data-v-3af7b738]:disabled{opacity:.55;cursor:wait}.folder-select[data-v-3af7b738]{width:100%;border-color:#6659c7;background:#4940a8;color:#fff}.folder-hint[data-v-3af7b738]{margin-top:-5px;color:#69758e;font-size:10px;line-height:1.45}.asset-actions[data-v-3af7b738]{display:grid;grid-template-columns:1fr 1fr;gap:5px}.asset-actions .load[data-v-3af7b738]{background:#5543df;border-color:#6959ec}.asset-actions .clear[data-v-3af7b738]{background:#702b34;border-color:#803842}.runtime-note[data-v-3af7b738]{color:#69758e;font-size:11px;text-align:center}.error[data-v-3af7b738]{padding:8px 10px;color:#ffabb2;background:#4b2028;border:1px solid #76323e;border-radius:6px;font-size:12px}.section-box[data-v-3af7b738]{display:grid;gap:8px;padding:10px;background:#182132;border:1px solid #303c54;border-radius:7px}.empty[data-v-3af7b738]{color:#667187;font-size:12px;padding:5px 0}.bone-tree[data-v-3af7b738]{max-height:240px;overflow:auto;padding:4px 0;background:#111827;border-radius:5px}.tree-title-row[data-v-3af7b738]{display:flex;align-items:center;justify-content:space-between;gap:8px}.selected-bone[data-v-3af7b738]{width:auto;min-width:0;max-width:100%;height:24px;flex:0 1 auto;overflow:hidden;padding:0 7px;color:#75819c;background:#182132;border:1px solid transparent;border-radius:5px;font-size:10px;text-align:right;white-space:nowrap;text-overflow:ellipsis}.selected-bone.active[data-v-3af7b738]{color:#aeb9d4;background:#242f44;border-color:#35445e;cursor:pointer}.selected-bone.active[data-v-3af7b738]:hover{border-color:#675ec4;background:#302b57}.selected-bone[data-v-3af7b738]:disabled{opacity:1;cursor:default}.selected-bone strong[data-v-3af7b738]{color:#c5cde3;font-weight:600}.tree-action[data-v-3af7b738]{height:24px;padding:0 8px;color:#9aa7c2;background:#242f44;border-color:#35445e;font-size:10px}.bone-search[data-v-3af7b738]{position:relative}.bone-search input[data-v-3af7b738]{box-sizing:border-box;width:100%;height:30px;padding:0 32px 0 9px;color:#dce2f2;background:#101827;border:1px solid #33415b;border-radius:5px;font-size:11px;outline:none}.bone-search input[data-v-3af7b738]:focus{border-color:#7065df;box-shadow:0 0 0 1px #7065df38}.bone-search button[data-v-3af7b738]{position:absolute;top:3px;right:3px;width:24px;height:24px;padding:0;border:0;color:#8d98b0;background:transparent}.bone[data-v-3af7b738]{display:flex;align-items:center;gap:4px;min-height:25px;color:#aeb8d2;font-size:12px;border-bottom:1px solid rgba(72,84,112,.22);cursor:pointer;outline:none}.bone[data-v-3af7b738]:hover{background:#45567e38}.bone.selected[data-v-3af7b738]{color:#f0edff;background:#6b53dd52;box-shadow:inset 2px 0 #8e72ff}.bone[data-v-3af7b738]:focus-visible{box-shadow:inset 0 0 0 1px #7d72dd}.bone-toggle[data-v-3af7b738]{width:22px;height:22px;padding:0;border:0;background:transparent;color:#9aa7c2}.bone-toggle[data-v-3af7b738]:hover{background:#26324a}.bone-leaf[data-v-3af7b738]{display:inline-flex;width:22px;justify-content:center;color:#58647d}.bone-name[data-v-3af7b738]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media(max-width:430px){.grid.three[data-v-3af7b738]{grid-template-columns:1fr}}.panel[data-v-a377e4d4]{display:flex;width:100%;height:100%;flex-direction:column;overflow:hidden;background:#14141f;border-left:1px solid #2a2a3c;padding:12px;box-sizing:border-box}.panel-scroll[data-v-a377e4d4]{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;padding-right:2px;scrollbar-width:thin;scrollbar-color:#2e2e44 transparent}.panel-scroll[data-v-a377e4d4]::-webkit-scrollbar{width:6px}.panel-scroll[data-v-a377e4d4]::-webkit-scrollbar-track{background:transparent}.panel-scroll[data-v-a377e4d4]::-webkit-scrollbar-thumb{background:#2e2e44;border-radius:3px}.panel-scroll[data-v-a377e4d4]::-webkit-scrollbar-thumb:hover{background:#3a3a55}.panel-header[data-v-a377e4d4]{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;flex:0 0 auto;font-weight:700;color:#ccd}.config-management-body[data-v-a377e4d4]{padding-bottom:2px}.config-toolbar[data-v-a377e4d4]{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:6px;margin-bottom:10px}.config-toolbar button[data-v-a377e4d4],.config-toolbar select[data-v-a377e4d4]{min-width:0;height:30px;box-sizing:border-box;border:1px solid #3b4864;border-radius:6px;background:#263149;color:#d6def0;font-size:11px}.config-toolbar button[data-v-a377e4d4]{padding:0 9px;cursor:pointer}.config-toolbar button[data-v-a377e4d4]:hover{border-color:#7169dc;background:#343d68;color:#fff}.config-toolbar select[data-v-a377e4d4]{padding:0 7px;overflow:hidden;text-overflow:ellipsis}.config-toolbar select[data-v-a377e4d4]:disabled{color:#68738a;background:#1b2130}.config-message[data-v-a377e4d4]{margin:-4px 0 9px;color:#83b9a2;font-size:10px}.config-message.error[data-v-a377e4d4]{color:#e8959e}.empty[data-v-a377e4d4],.panel-hint[data-v-a377e4d4]{color:#667;font-size:12px;padding:8px 0}.group[data-v-a377e4d4]{border:1px solid #2a2a3c;border-radius:8px;margin-bottom:10px;overflow:hidden}.group-head[data-v-a377e4d4]{display:flex;align-items:center;gap:6px;padding:7px 10px;cursor:pointer;font-size:12px;font-weight:600;color:#ccd;background:#191924;-webkit-user-select:none;user-select:none}.group-head[data-v-a377e4d4]:hover{background:#20202e}.group-reset[data-v-a377e4d4]{margin-left:auto;height:22px;padding:0 7px;border:1px solid #3a465f;border-radius:5px;background:#252d3d;color:#9eabc3;font-size:10px;line-height:20px;cursor:pointer}.group-reset[data-v-a377e4d4]:hover{border-color:#7774ff;background:#45426f;color:#fff}.scene-head[data-v-a377e4d4]{padding-right:6px}.scene-actions[data-v-a377e4d4]{margin-left:auto;display:flex;align-items:center;gap:4px}.scene-add[data-v-a377e4d4]{height:24px;padding:0 6px;border:1px solid #3a4a6a;border-radius:5px;background:#2e3a55;color:#cdf;font-size:10px;white-space:nowrap;cursor:pointer}.scene-add[data-v-a377e4d4]:hover{border-color:#7774ff;background:#45426f;color:#fff}.scene-add[data-v-a377e4d4]:disabled{opacity:.42;cursor:not-allowed;border-color:#343a4b;background:#252a38;color:#778095}.group-body[data-v-a377e4d4]{padding:8px 10px 12px}.caret[data-v-a377e4d4]{display:inline-block;width:12px;color:#667;font-size:11px}.divider[data-v-a377e4d4]{height:1px;background:#2a2a3c;margin:8px 0}.tree[data-v-a377e4d4]{margin-bottom:8px}.tree-item[data-v-a377e4d4]{display:flex;align-items:center;gap:6px;padding:5px 6px;font-size:12px;color:#bcd;border-radius:6px;margin-bottom:2px}.tree-item.on[data-v-a377e4d4]{background:#26324a;color:#ffe}.tree-item .tdot[data-v-a377e4d4]{color:#fc3;font-size:10px}.tree-item .tdot.dim[data-v-a377e4d4]{color:#556}.tree-item .tdot.collision-dot[data-v-a377e4d4]{color:#ff7070}.tree-item .tdot.path-dot[data-v-a377e4d4]{color:#ff933e;font-size:14px}.tree-item .tdot.spine-dot[data-v-a377e4d4]{color:#c08cff;font-size:11px}.tree-item .tlabel[data-v-a377e4d4]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scene-tree[data-v-a377e4d4]{padding-bottom:8px;border-bottom:1px solid #2a2a3c}.scene-object-item[data-v-a377e4d4]{min-height:28px;cursor:pointer}.scene-object-item[data-v-a377e4d4]:hover{background:#202b40}.scene-object-kind[data-v-a377e4d4]{color:#75829c;font-size:10px}.scene-object-eye[data-v-a377e4d4]{width:24px;height:22px;padding:3px;flex:0 0 24px;border:1px solid transparent;border-radius:5px;background:transparent;color:#9aa6bf;cursor:pointer}.scene-object-eye[data-v-a377e4d4]:hover{border-color:#4b5972;background:#29354a;color:#e1e7f4}.scene-object-eye.off[data-v-a377e4d4]{color:#59647a}.scene-object-eye svg[data-v-a377e4d4]{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.scene-object-eye .eye-slash[data-v-a377e4d4]{stroke:#d47b88;stroke-width:2}.scene-object-delete[data-v-a377e4d4]{width:24px;height:22px;padding:0;border:1px solid #59414a;border-radius:5px;background:#3a272f;color:#efb4bd;font-size:11px;cursor:pointer}.scene-object-delete[data-v-a377e4d4]:hover{border-color:#a45c69;background:#57303a;color:#fff}.object-editor-title[data-v-a377e4d4]{margin:10px 0 8px;padding-top:8px;border-top:1px solid #2a2a3c;color:#cbd4e8;font-weight:700}.field-block[data-v-a377e4d4]{display:flex;flex-direction:column;gap:5px;margin:10px 0;color:#8f9ab3;font-size:11px}.field-block>.inp[data-v-a377e4d4]{width:100%;box-sizing:border-box;min-height:30px}.field-block small[data-v-a377e4d4]{color:#5f6d86;line-height:1.5}.field-grid[data-v-a377e4d4]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:end}.compact-field[data-v-a377e4d4]{display:flex;min-width:0;flex-direction:column;gap:5px;margin:5px 0;color:#8f9ab3;font-size:11px}.compact-field .inp[data-v-a377e4d4]{width:100%;min-height:30px;box-sizing:border-box}.check-field[data-v-a377e4d4]{align-items:flex-start}.check-field input[data-v-a377e4d4]{width:18px;height:18px;margin:4px 0;accent-color:#4f7ee8}.follow-path[data-v-a377e4d4],.setting-line[data-v-a377e4d4]{display:flex;align-items:center;gap:8px;margin:12px 0 4px;color:#aeb8cf;font-size:12px}.setting-line[data-v-a377e4d4]{justify-content:space-between}.follow-path input[data-v-a377e4d4],.setting-line input[type=checkbox][data-v-a377e4d4]{width:17px;height:17px;accent-color:#4f7ee8}.collider-follow-section[data-v-a377e4d4]{margin-top:12px;padding-top:4px;border-top:1px solid #30394d}.collider-curve-title[data-v-a377e4d4]{display:flex;flex-direction:column;gap:3px;margin:12px 0 6px;color:#aeb8cf;font-size:12px}.collider-curve-title small[data-v-a377e4d4]{color:#67738c;font-size:10px;line-height:1.45}.path-color[data-v-a377e4d4]{width:48px;height:28px;padding:0;border:1px solid #3a4963;background:transparent;cursor:pointer}.path-help[data-v-a377e4d4]{margin:12px 0;color:#7d89a2;font-size:11px;line-height:1.55}.path-help>span[data-v-a377e4d4]{color:#aeb8cf}.path-help ul[data-v-a377e4d4]{margin:6px 0 0;padding-left:20px}.path-help li[data-v-a377e4d4]{margin:3px 0}.path-action[data-v-a377e4d4]{width:100%;height:31px;margin-top:7px;border:0;border-radius:5px;background:#33425b;color:#c9d1e1;cursor:pointer}.path-action[data-v-a377e4d4]:hover{filter:brightness(1.12)}.path-action.primary[data-v-a377e4d4]{background:#f05408;color:#fff}.tag[data-v-a377e4d4]{font-size:10px;color:#667;background:#1c1c2a;border-radius:4px;padding:1px 5px}.row[data-v-a377e4d4]{display:flex;align-items:center;gap:8px;margin:6px 0;font-size:12px;color:#aab}.row>span[data-v-a377e4d4]:first-child{width:60px;flex-shrink:0;color:#8a93bb}.inp[data-v-a377e4d4]{flex:1;min-width:0;padding:3px 5px;background:#1a1a28;border:1px solid #2e2e44;border-radius:5px;color:#dde;font-size:12px}.pair[data-v-a377e4d4]{display:flex;flex-direction:column;gap:2px;flex:1}.colr[data-v-a377e4d4]{width:28px;height:22px;border:none;background:none;cursor:pointer}.segs[data-v-a377e4d4]{display:flex;gap:6px;margin:6px 0}.stream-behavior-segs[data-v-a377e4d4]{margin-top:10px}.stream-loop-options[data-v-a377e4d4]{display:grid;gap:8px;margin:8px 0 4px;padding:9px 10px;border:1px solid #32405a;border-radius:6px;background:#171f2e}.loop-section-row[data-v-a377e4d4]{display:flex;min-height:27px;align-items:center;justify-content:space-between;gap:8px}.loop-duration-control[data-v-a377e4d4]{display:flex;flex:0 0 auto;align-items:center;gap:7px}.loop-duration-toggle[data-v-a377e4d4]{gap:5px;font-size:10px;white-space:nowrap}.loop-duration-toggle .switch-ui[data-v-a377e4d4]{width:26px;height:14px}.loop-duration-toggle .switch-ui[data-v-a377e4d4]:after{width:10px;height:10px}.loop-duration-toggle input:checked+.switch-ui[data-v-a377e4d4]:after{transform:translate(12px)}.loop-section-duration[data-v-a377e4d4]{display:flex;flex:0 0 auto;align-items:center;gap:4px;color:#7f8ba4;font-size:11px}.loop-section-duration input[data-v-a377e4d4]{position:static;width:54px;height:25px;padding:0 6px;border:1px solid #3a465f;border-radius:5px;outline:none;background:#101725;color:#e4e8f2;text-align:right;opacity:1;pointer-events:auto}.loop-section-duration input[data-v-a377e4d4]:focus{border-color:#716eff}.loop-auto-duration[data-v-a377e4d4]{min-width:54px;color:#77839a;text-align:right;white-space:nowrap}.seg[data-v-a377e4d4]{flex:1;padding:5px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:12px;cursor:pointer}.seg.on[data-v-a377e4d4]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.mini-btn[data-v-a377e4d4]{background:#2e3a55;border:1px solid #3a4a6a;color:#cdf;border-radius:5px;padding:3px 8px;font-size:11px;cursor:pointer}.mini-btn.danger[data-v-a377e4d4]{background:#4a2a2e;color:#fbb}.placeholder[data-v-a377e4d4]{color:#667;font-size:11px;padding:6px 0}.export-settings[data-v-a377e4d4]{padding-top:3px}.export-field[data-v-a377e4d4]{display:flex;flex-direction:column;gap:6px;margin:10px 0 13px;color:#9ca8bf;font-size:11px;font-weight:600}.export-input[data-v-a377e4d4]{width:100%;min-height:34px;box-sizing:border-box;padding:6px 9px;color:#e3e7f2;background:#141a29;border-color:#35445f}.export-fps-row[data-v-a377e4d4]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}.export-fps-field[data-v-a377e4d4]{margin-bottom:5px}.export-checkbox[data-v-a377e4d4]{display:flex;align-items:center;gap:7px;min-height:34px;margin-bottom:5px;color:#aeb8cc;font-size:11px;white-space:nowrap}.export-checkbox input[data-v-a377e4d4]{width:17px;height:17px;margin:0;accent-color:#625ff1}.export-help[data-v-a377e4d4]{margin:-6px 0 14px;color:#66758e;font-size:10px;line-height:1.5}.export-switches[data-v-a377e4d4]{display:grid;gap:13px;margin:4px 0 7px;padding-top:2px}.export-switch[data-v-a377e4d4]{font-weight:600}.export-switch-last[data-v-a377e4d4]{margin-top:13px}.spine-export-actions[data-v-a377e4d4]{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.export-spine-json[data-v-a377e4d4]{width:100%;padding:9px 8px;flex:0 0 auto;border:1px solid #4f4b9a;border-radius:7px;background:#403b91;color:#f1f0ff;font-size:12px;font-weight:700;cursor:pointer}.export-spine-json[data-v-a377e4d4]:hover{border-color:#7774ff;background:#514bc0}.export-spine-json[data-v-a377e4d4]:disabled{cursor:wait;opacity:.68}.export-spine-project[data-v-a377e4d4]{grid-column:1 / -1;width:100%;padding:7px 8px;border:1px solid #287d69;border-radius:7px;background:#196854;color:#edfff9;font-size:12px;font-weight:700;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.export-spine-project small[data-v-a377e4d4]{color:inherit;font-size:9px;font-weight:500;line-height:1.1}.export-spine-project[data-v-a377e4d4]:hover:not(:disabled){border-color:#47c89f;background:#238267}.export-spine-project[data-v-a377e4d4]:disabled{cursor:not-allowed;opacity:.48}.export-spine-images[data-v-a377e4d4]{width:100%;padding:8px;border:1px solid #3b5f8b;border-radius:7px;background:#243e64;color:#eaf3ff;font-size:12px;font-weight:700;cursor:pointer}.export-spine-images[data-v-a377e4d4]:hover:not(:disabled){border-color:#6099dc;background:#315581}.export-spine-images[data-v-a377e4d4]:disabled{cursor:wait;opacity:.55}.connector-status[data-v-a377e4d4]{display:flex;align-items:center;justify-content:center;gap:5px;padding-top:6px;color:#717b99;font-size:10px}.connector-status .connector-dot[data-v-a377e4d4]{width:6px;height:6px;border-radius:50%;background:#66718f}.connector-status.ready[data-v-a377e4d4]{color:#70d8ae}.connector-status.ready .connector-dot[data-v-a377e4d4]{background:#49c993;box-shadow:0 0 5px #49c99388}.connector-status.warning[data-v-a377e4d4]{color:#d4aa67}.connector-status.warning .connector-dot[data-v-a377e4d4]{background:#d4aa67}.connector-status button[data-v-a377e4d4]{padding:0 3px;border:0;background:transparent;color:#8290b6;font-size:10px;cursor:pointer}.connector-status button[data-v-a377e4d4]:hover{color:#c5caff}.connector-status a[data-v-a377e4d4]{padding:0 3px;color:#a8b0ff;font-size:10px;text-decoration:underline}.connector-status a[data-v-a377e4d4]:hover{color:#d8dcff}.export-message[data-v-a377e4d4]{padding:7px 5px 0;color:#70d8ae;font-size:10px;line-height:1.45;text-align:center}.export-message.error[data-v-a377e4d4]{color:#ff858f}.export-message a[data-v-a377e4d4]{display:inline-block;margin-left:5px;color:#9da7ff;text-decoration:underline}.look-title[data-v-a377e4d4]{font-size:12px;font-weight:600;color:#ccd;margin:10px 0 6px;padding-bottom:4px;border-bottom:1px solid #2a2a3c}.look-title[data-v-a377e4d4]:first-child{margin-top:2px}.seg[data-v-a377e4d4]{display:flex;gap:6px;margin:6px 0}.seg-btn[data-v-a377e4d4]{flex:1;padding:5px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:12px;cursor:pointer}.seg-btn.active[data-v-a377e4d4]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.curve-hint[data-v-a377e4d4]{min-height:54px;border:1px dashed #2e2e44;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#556;font-size:11px;margin:6px 0}.curve-wrap[data-v-a377e4d4]{margin:6px 0}.curve-labels[data-v-a377e4d4]{display:flex;justify-content:space-between;color:#566;font-size:10px;margin-top:2px}.image-title[data-v-a377e4d4]{display:flex;align-items:center;justify-content:space-between}.image-add[data-v-a377e4d4]{width:26px;height:24px;border:1px solid #4a4d9a;border-radius:5px;background:#252850;color:#8f8cff;font-size:18px;line-height:1;cursor:pointer}.image-add[data-v-a377e4d4]:hover{background:#4542a8;color:#fff}.image-card[data-v-a377e4d4]{margin:8px 0;padding:9px;border:1px solid #2e3c55;border-radius:7px;background:#171d2a}.imgrow[data-v-a377e4d4]{display:flex;align-items:flex-start;gap:8px}.img-thumb[data-v-a377e4d4]{width:48px;height:48px;padding:0;border:1px solid #3a4963;border-radius:6px;background:#1a2232;display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;overflow:hidden}.img-thumb[data-v-a377e4d4]:hover{border-color:#7774ff}.img-thumb img[data-v-a377e4d4]{display:block;width:100%;height:100%;object-fit:contain}.img-fields[data-v-a377e4d4]{flex:1;min-width:0}.img-actions[data-v-a377e4d4]{display:flex;flex-direction:column;gap:4px}.mini-btn2[data-v-a377e4d4]{width:26px;height:24px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:5px;color:#aab;font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center}.mini-btn2[data-v-a377e4d4]:hover{background:#2b3a5c}.mini-btn2[data-v-a377e4d4]:disabled{opacity:.35;cursor:not-allowed}.thumb-note[data-v-a377e4d4]{color:#667;font-size:11px;margin:4px 0 2px}.resource-divider[data-v-a377e4d4]{height:1px;margin:9px 0 7px;background:#2a3549}.resource-color-row .blend-select[data-v-a377e4d4]{max-width:88px}.resource-color-picker .hex[data-v-a377e4d4]{margin-left:0}.random-color-hint[data-v-a377e4d4]{margin:-5px 0 9px 68px;color:#66758e;font-size:9px;line-height:1.45}.hex-input[data-v-a377e4d4]{width:72px;padding:4px 6px;border:1px solid #344158;border-radius:5px;outline:none;background:#101725;color:#aeb8cb;font-size:11px;font-family:monospace}.hex-input[data-v-a377e4d4]:focus{border-color:#7774ff;color:#fff}.resource-alpha-head[data-v-a377e4d4]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;color:#8a93bb;font-size:12px}.alpha-modes[data-v-a377e4d4]{display:flex;gap:3px}.alpha-modes button[data-v-a377e4d4]{padding:4px 8px;border:1px solid transparent;border-radius:5px;background:transparent;color:#8d98ae;font-size:11px;cursor:pointer}.alpha-modes button[data-v-a377e4d4]:hover{background:#273246}.alpha-modes button.on[data-v-a377e4d4]{border-color:#7774ff;background:#605df0;color:#fff}.resource-alpha-curve[data-v-a377e4d4]{margin-top:7px}.resource-weight-row[data-v-a377e4d4]{display:flex;align-items:center;gap:5px}.resource-weight-control[data-v-a377e4d4]{flex:1;min-width:0}.weight-lock[data-v-a377e4d4]{width:28px;height:26px;flex:0 0 28px;padding:5px;border:1px solid #35435c;border-radius:5px;background:#202a3b;color:#78859e;cursor:pointer}.weight-lock svg[data-v-a377e4d4]{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.weight-lock[data-v-a377e4d4]:hover:not(:disabled){border-color:#7774ff;color:#b8b6ff}.weight-lock.on[data-v-a377e4d4]{border-color:#7774ff;background:#514fd0;color:#fff}.weight-lock[data-v-a377e4d4]:disabled{opacity:.35;cursor:not-allowed}.file-input[data-v-a377e4d4]{display:none}.hex[data-v-a377e4d4]{font-size:11px;color:#889;margin-left:auto;font-variant-numeric:tabular-nums}.inp.tiny[data-v-a377e4d4]{width:46px;flex:0 0 46px;text-align:center}.attr-body[data-v-a377e4d4]{padding:10px;background:#151b27}.attr-section-title[data-v-a377e4d4]{margin:2px 0 8px;color:#9ca8c0;font-size:12px;font-weight:700}.attr-section-title.life-title[data-v-a377e4d4]{margin-top:14px;padding-top:12px;border-top:1px solid #2d3950}.attr-axis-head[data-v-a377e4d4]{display:flex;align-items:center;justify-content:space-between;margin:10px 1px -2px;color:#aeb8cf;font-size:12px;font-weight:600}.axis-modes[data-v-a377e4d4]{display:flex;gap:4px}.axis-mode[data-v-a377e4d4]{padding:4px 8px;border:1px solid #344158;border-radius:5px;background:#273246;color:#aeb8cf;font-size:11px;cursor:pointer}.axis-mode.on[data-v-a377e4d4]{border-color:#7774ff;background:#605df0;color:#fff}.life-item[data-v-a377e4d4]{padding:9px 0;border-bottom:1px solid #2a3549}.switch-row[data-v-a377e4d4]{display:flex;align-items:center;gap:9px;color:#b8c1d5;font-size:12px;cursor:pointer}.switch-row input[data-v-a377e4d4]{position:absolute;opacity:0;pointer-events:none}.switch-ui[data-v-a377e4d4]{position:relative;width:32px;height:18px;border-radius:10px;background:#354258;transition:background .16s ease}.switch-ui[data-v-a377e4d4]:after{content:"";position:absolute;left:2px;top:2px;width:14px;height:14px;border-radius:50%;background:#fff;transition:transform .16s ease}.switch-row input:checked+.switch-ui[data-v-a377e4d4]{background:#625ff1}.switch-row input:checked+.switch-ui[data-v-a377e4d4]:after{transform:translate(14px)}.life-axis[data-v-a377e4d4]{margin:9px 0 2px 42px}.seed-row[data-v-a377e4d4]{display:flex;align-items:center;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #2d3950}.seed-row label[data-v-a377e4d4]{width:64px;color:#8f9bb5;font-size:12px}.seed-input[data-v-a377e4d4]{min-width:0;flex:1;padding:6px 8px;border:1px solid #344158;border-radius:6px;outline:none;background:#0f1625;color:#e2e7f2;font-size:12px}.seed-input[data-v-a377e4d4]:focus{border-color:#625ff1}.seed-random[data-v-a377e4d4]{width:34px;height:30px;border:1px solid #3a4860;border-radius:6px;background:#2c3950;color:#d7def0;cursor:pointer}.seed-random[data-v-a377e4d4]:hover{background:#394964}.scene-seed[data-v-a377e4d4]{margin-top:10px}.seed-hint[data-v-a377e4d4]{margin:5px 0 1px 72px;color:#657188;font-size:9px;line-height:1.45}.modifier-item[data-v-a377e4d4]{padding:8px 0 10px;border-bottom:1px solid #2a3549}.modifier-switch[data-v-a377e4d4]{font-weight:600}.modifier-params[data-v-a377e4d4]{margin:8px 0 0 10px;padding:2px 0 2px 10px;border-left:2px solid #344158}.modifier-hint[data-v-a377e4d4]{margin:7px 0 0 2px;color:#647086;font-size:9px;line-height:1.5}.collision-filter-params[data-v-a377e4d4]{position:relative;padding-top:5px;padding-bottom:5px}.collision-filter-title[data-v-a377e4d4]{margin-bottom:8px;color:#9ba7bd;font-size:11px;font-weight:600}.collision-filter-tags[data-v-a377e4d4]{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.collision-filter-tag[data-v-a377e4d4]{display:inline-flex;min-width:0;align-items:center;gap:6px;padding:5px 5px 5px 8px;border:1px solid #625ff1;border-radius:6px;background:#514dcf;color:#fff;font-size:11px}.collision-filter-tag>span[data-v-a377e4d4]{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.collision-filter-tag.disabled[data-v-a377e4d4]{border-color:#4b5364;background:#343b4b;color:#929bad}.collision-filter-tag button[data-v-a377e4d4]{width:18px;height:18px;padding:0;border:0;border-radius:4px;background:#0b0f1a38;color:inherit;line-height:16px;cursor:pointer}.collision-filter-tag button[data-v-a377e4d4]:hover{background:#0b0f1a80;color:#fff}.collision-filter-add[data-v-a377e4d4]{width:30px;height:30px;padding:0;border:1px dashed #536079;border-radius:6px;background:#182131;color:#98a5bd;font-size:18px;line-height:28px;cursor:pointer}.collision-filter-add[data-v-a377e4d4]:hover,.collision-filter-add.active[data-v-a377e4d4]{border-color:#7774ff;background:#262c52;color:#fff}.collision-filter-add[data-v-a377e4d4]:disabled{opacity:.42;cursor:not-allowed}.collision-filter-empty[data-v-a377e4d4]{margin-top:7px;color:#6f7b91;font-size:10px}.collision-filter-picker[data-v-a377e4d4]{display:grid;gap:4px;margin-top:7px;padding:5px;border:1px solid #344158;border-radius:6px;background:#101725}.collision-filter-picker button[data-v-a377e4d4]{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;border:0;border-radius:4px;background:transparent;color:#c7d0e3;font-size:11px;text-align:left;cursor:pointer}.collision-filter-picker button[data-v-a377e4d4]:hover{background:#29344a;color:#fff}.collision-filter-picker button span[data-v-a377e4d4]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.collision-filter-picker button small[data-v-a377e4d4]{flex:none;color:#68758d;font-size:9px}.stream-loop-hint[data-v-a377e4d4]{margin:9px 2px 3px;padding:7px 8px;border:1px solid #4a436e;border-radius:5px;background:#211f35;color:#aaa4d7}.switch-row input:disabled+.switch-ui[data-v-a377e4d4]{opacity:.45;cursor:not-allowed}.bone-follow-target[data-v-a377e4d4]{margin:7px 0 9px;padding:7px 8px;overflow:hidden;color:#7f8ba3;background:#121a29;border:1px solid #2f3c53;border-radius:5px;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.bone-follow-target strong[data-v-a377e4d4]{color:#c8d0e4;font-weight:600}.bone-follow-missing[data-v-a377e4d4]{margin:7px 0 9px;padding:7px 8px;color:#d49aa3;background:#2a1e26;border:1px solid #513540;border-radius:5px;font-size:10px;line-height:1.5}.bone-follow-rebind[data-v-a377e4d4]{width:100%;min-height:28px;margin:0 0 8px;padding:4px 8px;overflow:hidden;border:1px solid #4a436e;border-radius:5px;background:#2d2947;color:#c8c2ee;font-size:10px;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.bone-follow-rebind[data-v-a377e4d4]:hover{border-color:#7165bd;background:#3a335d;color:#fff}.bone-follow-transform-grid[data-v-a377e4d4]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.modifier-mode-row[data-v-a377e4d4]{display:flex;justify-content:flex-end;gap:4px;margin-bottom:6px}.gravity-curve-title[data-v-a377e4d4]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0 6px;color:#9ba7bd;font-size:11px}.gravity-curve-title span[data-v-a377e4d4]:last-child{color:#657188;font-size:9px}.gravity-curve-axis[data-v-a377e4d4]{display:flex;justify-content:space-between;margin:3px 34px 0 1px;color:#5f6b82;font-size:9px}.gravity-params[data-v-a377e4d4] .ce-svg{height:96px;background:#0f1625;border-color:#30405a}.trail-params[data-v-a377e4d4]{padding-right:2px}.trail-section-title[data-v-a377e4d4]{margin:3px 0 8px;color:#aeb8cf;font-size:12px;font-weight:700}.trail-resource-row[data-v-a377e4d4]{display:flex;align-items:stretch;gap:8px;margin-bottom:10px;padding:8px;border:1px solid #2e3c55;border-radius:7px;background:#171d2a}.trail-thumb[data-v-a377e4d4]{width:58px;min-height:58px;padding:3px;flex:0 0 58px;border:1px solid #3a4963;border-radius:6px;background:#101725;cursor:pointer;overflow:hidden}.trail-thumb[data-v-a377e4d4]:hover{border-color:#7774ff}.trail-thumb img[data-v-a377e4d4]{display:block;width:100%;height:100%;object-fit:contain}.trail-resource-fields[data-v-a377e4d4]{display:flex;min-width:0;flex:1;flex-direction:column;gap:7px}.trail-color-row[data-v-a377e4d4]{display:flex;align-items:center;gap:5px;color:#8a93bb;font-size:11px}.trail-color-row>span[data-v-a377e4d4]{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trail-color-row .hex-input[data-v-a377e4d4],.trail-fixed-color .hex-input[data-v-a377e4d4]{min-width:0;flex:1}.trail-mode-head[data-v-a377e4d4]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0 6px;color:#9ba7bd;font-size:11px}.trail-sub-switch[data-v-a377e4d4]{margin:11px 0 7px;padding-top:9px;border-top:1px solid #2a3549}.trail-grid-row[data-v-a377e4d4]{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.trail-grid-row[data-v-a377e4d4] .ns{min-width:0;flex-wrap:wrap;align-items:center}.trail-grid-row[data-v-a377e4d4] .ns-label{width:100%}.trail-grid-row[data-v-a377e4d4] .ns-range{min-width:0}.trail-grid-row[data-v-a377e4d4] .ns-num{width:42px}.trail-params[data-v-a377e4d4] .ce-svg{height:92px;background:#0f1625;border-color:#30405a}.timeline[data-v-e305dee7]{height:100%;background:#12121c;border-top:1px solid #2a2a3c;display:flex;flex-direction:column;padding:6px 10px;gap:4px}.tl-controls[data-v-e305dee7]{display:flex;align-items:center;gap:8px}.tl-btn[data-v-e305dee7]{width:30px;height:26px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:12px;cursor:pointer}.tl-btn.on[data-v-e305dee7]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.tl-range[data-v-e305dee7]{display:flex;height:25px;align-items:center;gap:3px;color:#778198;font-size:10px}.tl-range input[data-v-e305dee7]{width:43px;height:25px;padding:0 5px;box-sizing:border-box;border:1px solid #3a3a51;border-radius:5px;outline:none;background:#181824;color:#e1e4ed;font-size:11px;text-align:center}.tl-range input[data-v-e305dee7]:focus{border-color:#716eff}.tl-loop-range[data-v-e305dee7]{height:25px;padding:0 7px;border:1px solid #4e5680;border-radius:5px;background:#252943;color:#bfc8e8;font-size:10px;cursor:pointer;white-space:nowrap}.tl-loop-range[data-v-e305dee7]:hover{border-color:#716eff;color:#fff}.tl-frame[data-v-e305dee7]{display:inline-block;flex:0 0 92px;width:92px;box-sizing:border-box;font-size:12px;color:#aab;text-align:right;font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;white-space:nowrap}.tl-frame b[data-v-e305dee7]{display:inline;color:inherit;font-weight:400}.tl-legend[data-v-e305dee7]{display:flex;align-items:center;gap:4px;color:#778198;font-size:10px}.tl-legend i[data-v-e305dee7]{display:inline-block;width:10px;height:7px;border-radius:2px}.legend-emission[data-v-e305dee7]{margin-left:4px;background:#2f8b62}.legend-life[data-v-e305dee7]{margin-left:5px;background:#a54551}.legend-spine[data-v-e305dee7]{margin-left:5px;background:#7448b8}.tl-anim[data-v-e305dee7]{display:flex;align-items:center;gap:6px;font-size:12px;color:#aab}.tl-owner-animation[data-v-e305dee7]{position:relative}.tl-animation-trigger[data-v-e305dee7]{display:flex;align-items:center;justify-content:space-between;gap:8px;width:116px;height:25px;padding:0 7px;overflow:hidden;border:1px solid #2e2e44;border-radius:5px;background:#1a1a28;color:#dde;cursor:pointer}.tl-animation-trigger>span[data-v-e305dee7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-animation-trigger>i[data-v-e305dee7]{flex:0 0 auto;color:#8c96ad;font-style:normal}.tl-animation-trigger[data-v-e305dee7]:disabled{opacity:.5;cursor:not-allowed}.tl-animation-menu[data-v-e305dee7]{position:absolute;z-index:30;right:0;bottom:calc(100% + 6px);width:226px;padding:7px;border:1px solid #3c4760;border-radius:8px;background:#171b29;box-shadow:0 10px 24px #00000073}.tl-animation-menu-title[data-v-e305dee7]{padding:2px 4px 6px;color:#77839c;font-size:10px}.tl-animation-option[data-v-e305dee7]{display:flex;align-items:center;justify-content:space-between;width:100%;height:27px;padding:0 7px;border:0;border-radius:5px;background:transparent;color:#b8c1d5;text-align:left;cursor:pointer}.tl-animation-option>span[data-v-e305dee7]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-animation-option[data-v-e305dee7]:hover{background:#252e42}.tl-animation-option.on[data-v-e305dee7]{background:#34335d;color:#fff}.tl-animation-option>i[data-v-e305dee7]{color:#8d8aff;font-style:normal}.tl-animation-editor[data-v-e305dee7]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;margin-top:7px;padding-top:7px;border-top:1px solid #2b3346}.tl-animation-name[data-v-e305dee7]{min-width:0;height:27px;padding:0 7px;box-sizing:border-box;border:1px solid #343e55;border-radius:5px;background:#101522;color:#e1e6f2;outline:none}.tl-animation-name[data-v-e305dee7]:focus{border-color:#6865d8}.tl-animation-editor button[data-v-e305dee7],.tl-animation-actions button[data-v-e305dee7]{height:27px;padding:0 8px;border:1px solid #3c4861;border-radius:5px;background:#29344a;color:#cbd3e3;cursor:pointer}.tl-animation-actions[data-v-e305dee7]{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:6px}.tl-animation-actions button[data-v-e305dee7]:last-child{border-color:#5b3942;background:#3b282f;color:#e2a8b2}.tl-animation-actions button[data-v-e305dee7]:disabled{opacity:.4;cursor:not-allowed}.tl-animation-error[data-v-e305dee7]{margin-top:5px;color:#ef8997;font-size:10px}.tl-animation-hint[data-v-e305dee7]{margin-top:5px;color:#69758d;font-size:9px;text-align:center}.tl-sel[data-v-e305dee7]{background:#1a1a28;border:1px solid #2e2e44;color:#dde;border-radius:5px;padding:2px 6px;font-size:12px}.tl-sel[data-v-e305dee7]:disabled{opacity:.5;cursor:not-allowed}.tl-spine-preview .tl-sel[data-v-e305dee7]{max-width:190px}.tl-zoom[data-v-e305dee7]{margin-left:auto;font-size:11px;color:#667}.tl-viewport[data-v-e305dee7]{position:relative;flex:1;overflow:hidden;background:#0d0d14;border:1px solid #2a2a3c;border-radius:6px;cursor:ew-resize}.tl-ticks[data-v-e305dee7]{position:absolute;top:0;left:0;right:0;height:18px}.tl-tickline[data-v-e305dee7]{position:absolute;top:0;bottom:0;width:1px;background:#263040}.tl-ticklabel[data-v-e305dee7]{position:absolute;top:2px;transform:translate(-50%);font-size:9px;color:#667}.tl-playhead[data-v-e305dee7]{position:absolute;top:0;bottom:0;width:2px;background:#fc3;z-index:5;pointer-events:none}.tl-lanes[data-v-e305dee7]{position:absolute;top:22px;left:0;right:0;bottom:0}.tl-lane[data-v-e305dee7]{position:relative;height:26px;margin-bottom:4px}.lane-ico[data-v-e305dee7]{position:absolute;left:4px;top:6px;font-size:11px;color:#dde;z-index:2;pointer-events:none}.lane-bar[data-v-e305dee7]{position:absolute;top:4px;height:18px;display:flex;align-items:stretch;cursor:grab;box-sizing:border-box}.lane-bar[data-v-e305dee7]:active{cursor:grabbing}.lane-name[data-v-e305dee7]{position:absolute;left:14px;right:5px;top:2px;z-index:2;pointer-events:none;font-size:11px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bar-life[data-v-e305dee7]{position:absolute;inset:0 auto 0 0;z-index:0;min-width:1px;border:1px solid #c05a66;border-radius:5px;background:#a54551;box-sizing:border-box}.bar-life.loop-life[data-v-e305dee7]{border-color:#667085;background:#242b39}.bar-emission[data-v-e305dee7]{position:absolute;inset:0 auto 0 0;z-index:1;min-width:1px;border:1px solid #45a97d;border-radius:5px 0 0 5px;background:#2f8b62;box-sizing:border-box}.bar-emission.bar-loop[data-v-e305dee7]{border-radius:0}.bar-loop-transition[data-v-e305dee7]{position:absolute;top:0;bottom:0;z-index:1;border:1px solid #7d8799;background:#50596a;box-sizing:border-box}.bar-loop-start[data-v-e305dee7]{left:0;border-radius:5px 0 0 5px}.bar-loop-end[data-v-e305dee7]{border-radius:0 5px 5px 0}.bar-handle[data-v-e305dee7]{position:absolute;z-index:4;right:-4px;top:-1px;bottom:-1px;width:8px;cursor:ew-resize;background:#ffffff2e}.bar-handle[data-v-e305dee7]:hover{background:#ffffff59}.spine-ico[data-v-e305dee7]{color:#c08cff}.spine-bar[data-v-e305dee7]{position:absolute;top:4px;height:18px;min-width:1px;box-sizing:border-box;border:1px solid #a575ed;border-radius:5px;background:#7448b8;cursor:grab;box-shadow:inset 0 0 0 1px #ffffff0d}.spine-bar[data-v-e305dee7]:active{cursor:grabbing}.tl-empty[data-v-e305dee7]{color:#667;font-size:11px;padding:8px}.transfer-overlay[data-v-016b4c9d]{position:fixed;z-index:2000;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:auto;cursor:wait;overscroll-behavior:contain;background:#05080f42;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}.transfer-dialog[data-v-016b4c9d]{width:min(420px,calc(100vw - 40px));padding:18px 20px 16px;border:1px solid #414b66;border-radius:10px;box-shadow:0 18px 55px #00000075;background:#171d2b;color:#e7ebf5}.transfer-heading[data-v-016b4c9d]{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px;font-size:14px;font-weight:700}.transfer-heading strong[data-v-016b4c9d]{color:#a8a6ff;font-size:12px;font-variant-numeric:tabular-nums}.transfer-track[data-v-016b4c9d]{height:9px;overflow:hidden;border:1px solid #35415a;border-radius:999px;background:#0d1422}.transfer-bar[data-v-016b4c9d]{height:100%;border-radius:inherit;background:linear-gradient(90deg,#4d75e8,#7774ff);transition:width .16s ease}.transfer-track.indeterminate .transfer-bar[data-v-016b4c9d]{width:42%;animation:transfer-slide-016b4c9d 1s ease-in-out infinite}.transfer-detail[data-v-016b4c9d]{min-height:17px;margin-top:9px;color:#8895ae;font-size:11px;line-height:1.5}.transfer-dialog.failed[data-v-016b4c9d]{border-color:#754351}.transfer-dialog.failed .transfer-heading strong[data-v-016b4c9d],.transfer-dialog.failed .transfer-detail[data-v-016b4c9d]{color:#e99aa9}.transfer-dialog.failed .transfer-bar[data-v-016b4c9d]{background:#c85d70}.transfer-fade-enter-active[data-v-016b4c9d],.transfer-fade-leave-active[data-v-016b4c9d]{transition:opacity .16s ease}.transfer-fade-enter-from[data-v-016b4c9d],.transfer-fade-leave-to[data-v-016b4c9d]{opacity:0}@keyframes transfer-slide-016b4c9d{0%{transform:translate(-110%)}to{transform:translate(250%)}}.layout[data-v-d7e0e59a]{display:flex;width:100%;height:100%;min-height:0;overflow:clip}.parameter-panel[data-v-d7e0e59a]{flex-shrink:0;height:100%;min-height:0;overflow:clip}.resizer-col[data-v-d7e0e59a]{width:5px;cursor:col-resize;background:#1c1c2a;border-left:1px solid #2a2a3c;border-right:1px solid #2a2a3c;flex-shrink:0}.resizer-col[data-v-d7e0e59a]:hover{background:#3a5a8c}.right[data-v-d7e0e59a]{flex:1;min-width:0;height:100%;min-height:0;overflow:clip;display:flex;flex-direction:column}.panel-right .right[data-v-d7e0e59a]{order:1}.panel-right .resizer-col[data-v-d7e0e59a]{order:2}.panel-right .parameter-panel[data-v-d7e0e59a]{order:3}.stage-area[data-v-d7e0e59a]{flex:1;min-height:0;overflow:clip}.resizer-row[data-v-d7e0e59a]{height:4px;cursor:row-resize;background:#1c1c2a;border-top:1px solid #2a2a3c;border-bottom:1px solid #2a2a3c;flex-shrink:0}.resizer-row[data-v-d7e0e59a]:hover{background:#3a5a8c}.timeline-area[data-v-d7e0e59a]{position:relative;z-index:10;flex-shrink:0;overflow:visible}html,body{width:100%;height:100%;margin:0;padding:0;overflow:clip;overscroll-behavior:none;background:#0b0b12;color:#e8e8f0;font-family:system-ui,-apple-system,Segoe UI,sans-serif}body{position:fixed;top:0;right:0;bottom:0;left:0}*{box-sizing:border-box}#app{position:fixed;top:0;right:0;bottom:0;left:0;width:auto;height:auto;overflow:clip}input[type=number]{-webkit-appearance:textfield;appearance:textfield;-moz-appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none} diff --git a/dist/assets/index-ClCjv-tT.css b/dist/assets/index-ClCjv-tT.css new file mode 100644 index 0000000..8e9afe3 --- /dev/null +++ b/dist/assets/index-ClCjv-tT.css @@ -0,0 +1 @@ +.help-overlay[data-v-12773018]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:72px 24px 28px;box-sizing:border-box;background:#05080fb8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.help-dialog[data-v-12773018]{width:min(820px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #3a4864;border-radius:14px;background:#141a27;color:#b8c3d8;box-shadow:0 22px 70px #0000009e}.help-head[data-v-12773018]{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 15px;border-bottom:1px solid #2b354a;background:linear-gradient(135deg,#202942,#181e2d)}.help-head h2[data-v-12773018]{margin:0;color:#eef2ff;font-size:19px}.help-head p[data-v-12773018]{margin:5px 0 0;color:#7786a3;font-size:11px}.help-close[data-v-12773018]{width:28px;height:28px;flex:0 0 28px;border:1px solid #43516b;border-radius:6px;background:#273249;color:#ccd7ed;cursor:pointer}.help-close[data-v-12773018]:hover{border-color:#7774ff;background:#3b4670;color:#fff}.help-body[data-v-12773018]{min-height:0;overflow:auto;padding:18px 20px 21px}.help-section[data-v-12773018]{padding:14px 15px;border:1px solid #2c3850;border-radius:10px;background:#181f2e}.help-section h3[data-v-12773018]{margin:0 0 11px;color:#9fb2ff;font-size:13px}.help-start ol[data-v-12773018]{margin:0;padding-left:21px;color:#aab6cc;font-size:12px;line-height:1.75}.help-start li[data-v-12773018]::marker{color:#7774ff;font-weight:700}.help-section b[data-v-12773018]{color:#dce4f7}.help-grid[data-v-12773018]{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(250px,.85fr);gap:12px;margin-top:12px}.help-list[data-v-12773018]{display:grid;gap:0;margin:0}.help-list>div[data-v-12773018]{display:grid;grid-template-columns:78px 1fr;gap:9px;padding:7px 0;border-bottom:1px solid #263146}.help-list>div[data-v-12773018]:last-child{border-bottom:0}.help-list dt[data-v-12773018]{color:#d3dcf0;font-size:11px;font-weight:700}.help-list dd[data-v-12773018]{margin:0;color:#8795ae;font-size:11px;line-height:1.5}.shortcut-list[data-v-12773018]{display:grid;gap:7px}.shortcut-list>div[data-v-12773018]{display:flex;align-items:center;min-height:25px;gap:5px}.shortcut-list kbd[data-v-12773018]{min-width:24px;box-sizing:border-box;padding:3px 6px;border:1px solid #465470;border-bottom-width:2px;border-radius:5px;background:#101623;color:#e0e7f6;font:10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;text-align:center}.shortcut-list span[data-v-12773018]{color:#65728b;font-size:10px}.shortcut-list em[data-v-12773018]{margin-left:auto;color:#9ca9c1;font-size:11px;font-style:normal}.help-note[data-v-12773018]{margin:11px 0 0;padding-top:9px;border-top:1px solid #2a3549;color:#697791;font-size:10px;line-height:1.55}.help-export[data-v-12773018]{margin-top:12px}.help-export p[data-v-12773018]{margin:0;color:#8997b0;font-size:11px;line-height:1.65}.help-doc-title[data-v-12773018]{margin:16px 2px 2px;color:#9fb2ff;font-size:13px;font-weight:700;letter-spacing:.5px}.help-module[data-v-12773018]{margin-top:12px}.help-module-head[data-v-12773018]{display:flex;align-items:center;gap:8px;width:100%;padding:0;border:0;background:transparent;color:#9fb2ff;font:inherit;font-size:13px;font-weight:700;text-align:left;cursor:pointer}.help-module-head[data-v-12773018]:hover{color:#fff}.help-module-head .mtitle[data-v-12773018]{flex:1;min-width:0}.help-module-head .caret[data-v-12773018]{flex:0 0 auto;color:#7b86a2;font-size:12px}.help-module.open .help-module-head[data-v-12773018]{color:#fff}.help-module.open .help-module-head .caret[data-v-12773018]{color:#9fb2ff}.help-module .mnum[data-v-12773018]{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:linear-gradient(135deg,#4a53b8,#6a5fd0);color:#fff;font-size:12px;font-weight:700}.help-module.help-connector[data-v-12773018]{border-color:#4a4f8a;background:linear-gradient(135deg,#1d2442,#181d2f)}.help-module.help-connector .help-module-head[data-v-12773018]{color:#b8c2ff}.help-module .connector-intro[data-v-12773018]{margin:0 0 10px;color:#9aa8c4;font-size:11px;line-height:1.6}.help-module .connector-intro b[data-v-12773018]{color:#dce4f7}.help-module .dl-link[data-v-12773018]{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;margin:0 10px 6px 0;padding:6px 12px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;font-size:12px;font-weight:700;text-decoration:none}.help-module .dl-link[data-v-12773018]:hover{border-color:#8982ff;background:#554dc2}.help-module .dl-link small[data-v-12773018]{color:#cfe0ff;font-weight:500;font-size:9px}.help-module-body[data-v-12773018]{padding-top:10px}@media(max-width:760px){.help-overlay[data-v-12773018]{padding:66px 12px 14px}.help-grid[data-v-12773018]{grid-template-columns:1fr}}.stage-wrap[data-v-659e6fc2]{position:relative;width:100%;height:100%;overflow:hidden}.stage-holder[data-v-659e6fc2]{width:100%;height:100%;cursor:grab;touch-action:none;background-color:#0e1219;outline:none}.stage-holder.grid[data-v-659e6fc2]{background:conic-gradient(#141a26 90deg,transparent 90deg 180deg,#141a26 180deg 270deg,transparent 270deg);background-size:28px 28px}.stage-holder[data-v-659e6fc2]:active{cursor:grabbing}.topbar[data-v-659e6fc2]{position:absolute;top:10px;left:10px;right:10px;display:flex;align-items:center;gap:10px;padding:8px 12px;background:#141420d9;border-radius:10px;border:1px solid rgba(255,255,255,.08);font-size:12px;color:#aab;z-index:5;flex-wrap:wrap}.topbar input[type=range][data-v-659e6fc2]{background:#1a1a28;border:1px solid #2e2e44;color:#dde;border-radius:5px}.tool-group[data-v-659e6fc2]{display:flex;gap:6px;margin-left:6px;padding-left:12px;border-left:1px solid #2a2a3c}.tool-btn[data-v-659e6fc2]{width:30px;height:26px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}.tool-btn[data-v-659e6fc2]:hover{background:#2b3a5c;color:#fff}.tool-btn.on[data-v-659e6fc2]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.background-menu[data-v-659e6fc2]{position:relative;flex:0 0 auto}.background-btn[data-v-659e6fc2]{height:28px;padding:0 11px;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;cursor:pointer}.background-btn[data-v-659e6fc2]:hover,.background-btn.on[data-v-659e6fc2]{border-color:#7774ff;background:#343b63;color:#fff}.background-panel[data-v-659e6fc2]{position:absolute;top:calc(100% + 9px);right:0;width:248px;box-sizing:border-box;padding:10px;border:1px solid #343b50;border-radius:9px;background:#141420fa;color:#aeb8cc;box-shadow:0 8px 24px #0000007a;z-index:12}.background-upload[data-v-659e6fc2]{width:100%;height:30px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;cursor:pointer}.background-upload[data-v-659e6fc2]:hover{border-color:#8982ff;background:#554dc2}.background-clear[data-v-659e6fc2]{width:100%;height:28px;margin-top:6px;border:1px solid #70404a;border-radius:6px;background:#512a33;color:#efb5bd;cursor:pointer}.background-clear[data-v-659e6fc2]:hover:not(:disabled){border-color:#b65b6a;background:#6a303b;color:#fff}.background-clear[data-v-659e6fc2]:disabled{opacity:.42;cursor:not-allowed}.background-file-input[data-v-659e6fc2]{display:none}.background-file-name[data-v-659e6fc2]{margin:7px 2px 9px;overflow:hidden;color:#737f98;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.background-position-row[data-v-659e6fc2]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.background-position-row label[data-v-659e6fc2]{display:flex;align-items:center;gap:5px;color:#8995ad;font-size:11px}.background-position-row input[data-v-659e6fc2]{width:0;min-width:0;flex:1;box-sizing:border-box;height:28px;padding:0 6px;border:1px solid #343e55;border-radius:5px;background:#101522;color:#e1e6f2}.background-opacity-row[data-v-659e6fc2]{display:grid;grid-template-columns:46px 1fr 34px;align-items:center;gap:7px;margin-top:10px;font-size:11px}.background-opacity-row input[data-v-659e6fc2]{min-width:0;accent-color:#675de0}.background-opacity-row b[data-v-659e6fc2]{color:#aeb8cc;font-size:10px;text-align:right;font-variant-numeric:tabular-nums}.help-btn[data-v-659e6fc2]{height:28px;margin-left:auto;padding:0 11px;flex:0 0 auto;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;font-weight:700;cursor:pointer}.help-btn[data-v-659e6fc2]:hover,.help-btn.on[data-v-659e6fc2]{border-color:#7774ff;background:#343b63;color:#fff}.zoom-pct[data-v-659e6fc2]{margin-left:0;font-variant-numeric:tabular-nums;color:#9aa;min-width:44px;text-align:center}.hud[data-v-659e6fc2]{position:absolute;bottom:12px;left:12px;padding:8px 12px;background:#141420bf;border-radius:8px;font-size:12px;color:#a0a8cc}.hud-number[data-v-659e6fc2]{display:inline-block;box-sizing:border-box;text-align:right;font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}.hud-system-count[data-v-659e6fc2]{width:3ch}.hud-particle-count[data-v-659e6fc2]{width:7ch;text-align:left}.hud-tip[data-v-659e6fc2]{margin-left:12px;color:#5f6a8a;font-size:11px}b[data-v-659e6fc2]{color:#fc3}.settings-btn[data-v-659e6fc2]{height:28px;padding:0 12px;flex:0 0 auto;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cdf;font-size:12px;font-weight:700;cursor:pointer}.settings-btn[data-v-659e6fc2]:hover{border-color:#7774ff;background:#2b3a5c;color:#fff}.undo-btn[data-v-659e6fc2]{width:30px;height:28px;flex:0 0 30px;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cdd8ed;font-size:18px;line-height:1;cursor:pointer}.undo-btn[data-v-659e6fc2]:hover:not(:disabled){border-color:#7774ff;background:#2b3a5c;color:#fff}.undo-btn[data-v-659e6fc2]:disabled{opacity:.38;cursor:not-allowed}.settings-panel[data-v-659e6fc2]{position:absolute;top:52px;left:10px;width:240px;z-index:10;background:#141420f7;border:1px solid #2a2a3c;border-radius:10px;padding:10px 12px;font-size:12px;color:#aab;box-shadow:0 6px 20px #0006}.sp-head[data-v-659e6fc2]{display:flex;justify-content:space-between;align-items:center;font-weight:700;color:#cdf;margin-bottom:10px}.sp-section-title[data-v-659e6fc2]{margin:2px 0 8px;color:#8a93bb;font-size:11px}.sp-switch-row[data-v-659e6fc2]{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#aab}.sp-switch-control[data-v-659e6fc2]{display:inline-flex;align-items:center;gap:7px}.sp-switch-control input[data-v-659e6fc2]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.sp-switch-ui[data-v-659e6fc2]{position:relative;width:34px;height:18px;border-radius:999px;background:#39445a;cursor:pointer;transition:background .16s ease}.sp-switch-ui[data-v-659e6fc2]:after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#f4f6fb;transition:transform .16s ease}.sp-switch-control input:checked+.sp-switch-ui[data-v-659e6fc2]{background:#655df0}.sp-switch-control input:checked+.sp-switch-ui[data-v-659e6fc2]:after{transform:translate(16px)}.sp-switch-control input:focus-visible+.sp-switch-ui[data-v-659e6fc2]{outline:2px solid #8b86ff;outline-offset:2px}.sp-switch-control b[data-v-659e6fc2]{min-width:24px;color:#8a93bb;font-size:11px;font-weight:500}.sp-cache-note[data-v-659e6fc2]{margin-top:10px;padding-top:9px;border-top:1px solid #2a2a3c;color:#647089;font-size:10px;text-align:center}.sp-divider[data-v-659e6fc2]{height:1px;margin:10px 0;background:#2a2a3c}.sp-close[data-v-659e6fc2]{background:#2e3a55;border:none;color:#cdf;border-radius:4px;width:18px;height:18px;cursor:pointer;font-size:11px}.sp-row[data-v-659e6fc2]{display:flex;align-items:center;gap:8px;margin:8px 0}.sp-row>span[data-v-659e6fc2]:first-child{width:76px;flex-shrink:0;color:#8a93bb}.sp-row input[type=range][data-v-659e6fc2]{flex:1;background:#1a1a28;accent-color:#3a5a8c}.sp-num[data-v-659e6fc2]{width:52px;background:#1a1a28;border:1px solid #2e2e44;border-radius:5px;color:#dde;font-size:12px;padding:2px 4px}.sp-undo-limit[data-v-659e6fc2]{margin-left:auto;width:64px;height:26px;box-sizing:border-box}.sp-colr[data-v-659e6fc2]{width:26px;height:22px;border:none;background:none;cursor:pointer}.sp-hex[data-v-659e6fc2]{font-size:11px;color:#889;font-variant-numeric:tabular-nums}.sp-chk[data-v-659e6fc2]{display:flex;align-items:center;gap:6px;margin:8px 0;color:#aab}.sp-chk.disabled[data-v-659e6fc2]{color:#5f687d;cursor:not-allowed}.sp-chk.disabled input[data-v-659e6fc2]{cursor:not-allowed;opacity:.55}.ns[data-v-7c2fbed0]{display:flex;align-items:center;gap:8px;margin:6px 0;font-size:12px;color:#aab}.ns-label[data-v-7c2fbed0]{width:60px;flex-shrink:0;color:#8a93bb}.ns-range[data-v-7c2fbed0]{flex:1;accent-color:#3a7cd6}.ns-num[data-v-7c2fbed0]{width:56px;padding:3px 5px;background:#1a1a28;border:1px solid #2e2e44;border-radius:5px;color:#dde;font-size:12px;text-align:right}.ns.disabled[data-v-7c2fbed0]{opacity:.55}.ns.disabled .ns-range[data-v-7c2fbed0],.ns.disabled .ns-num[data-v-7c2fbed0]{cursor:not-allowed}.ce[data-v-9bfb7b31]{display:flex;align-items:flex-start;gap:6px;width:100%}.ce-editor[data-v-9bfb7b31]{flex:1;min-width:0}.ce-reset[data-v-9bfb7b31]{flex:0 0 auto;padding:5px 7px;border:1px solid #3b4b65;border-radius:5px;background:#242f42;color:#c4cee2;font-size:10px;cursor:pointer}.ce-reset[data-v-9bfb7b31]:hover{border-color:#7774ff;background:#4f4dc2;color:#fff}.ce-svg[data-v-9bfb7b31]{width:100%;height:110px;display:block;border:1px solid #2a2a3c;border-radius:6px;background:#10101a;cursor:crosshair;touch-action:none}.ce-grid line[data-v-9bfb7b31]{stroke:#1e1e30;stroke-width:1}.ce-frame[data-v-9bfb7b31]{stroke:#2e2e44;stroke-width:1}.ce-line[data-v-9bfb7b31]{stroke:#6ea0e8;stroke-width:2;stroke-linejoin:round}.ce-handles line[data-v-9bfb7b31]{stroke:#8d96b5;stroke-width:1;stroke-dasharray:3 2}.ce-handles circle[data-v-9bfb7b31]{fill:#b7c2dd;stroke:#344d94;stroke-width:1.2;cursor:grab}.ce-handles circle[data-v-9bfb7b31]:active{cursor:grabbing}.ce-node[data-v-9bfb7b31]{fill:#fff;stroke:#3a55aa;stroke-width:1.6;pointer-events:none}.ce-hit[data-v-9bfb7b31]{fill:transparent;stroke:none;cursor:grab}.ce-hit[data-v-9bfb7b31]:active{cursor:grabbing}.ce-nav[data-v-9bfb7b31]{display:flex;justify-content:space-between;margin-top:3px}.ce-tip[data-v-9bfb7b31]{color:#566;font-size:10px}.pac[data-v-238f838c]{padding:10px;margin:8px 0;border:1px solid #2c3850;border-radius:7px;background:#171d2a}.pac-head[data-v-238f838c]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}.pac-label[data-v-238f838c]{color:#aeb8cf;font-size:12px;font-weight:600;white-space:nowrap}.pac-modes[data-v-238f838c]{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}.pac-mode[data-v-238f838c]{padding:4px 7px;border:1px solid #344158;border-radius:5px;background:#273246;color:#aeb8cf;font-size:11px;cursor:pointer}.pac-mode.on[data-v-238f838c]{border-color:#7774ff;background:#605df0;color:#fff}.pac-curve[data-v-238f838c]{margin-top:8px}.pac-axis[data-v-238f838c]{display:flex;justify-content:space-between;margin-top:3px;color:#5f6b82;font-size:10px}.pac[data-v-238f838c] .ns-label{width:58px}.pac[data-v-238f838c] .ce-svg{height:96px;background:#0f1625;border-color:#30405a}.pac[data-v-238f838c] .ce-tip{color:#657188}.gradient-editor[data-v-f6ab10bf]{margin:8px 0 11px 68px}.gradient-bar[data-v-f6ab10bf]{position:relative;height:18px;margin-bottom:14px;border:1px solid #465570;border-radius:6px;cursor:crosshair}.gradient-stop[data-v-f6ab10bf]{position:absolute;top:15px;width:14px;height:17px;padding:0;transform:translate(-50%);border:2px solid #d8deea;border-radius:2px 2px 5px 5px;background:var(--stop-color);cursor:grab;box-shadow:0 1px 3px #0009}.gradient-stop[data-v-f6ab10bf]:before{content:"";position:absolute;left:2px;top:-7px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:5px solid #d8deea}.gradient-stop.selected[data-v-f6ab10bf]{outline:2px solid #7774ff;outline-offset:1px;z-index:2}.gradient-stop[data-v-f6ab10bf]:active{cursor:grabbing}.gradient-controls[data-v-f6ab10bf]{display:flex;align-items:center;gap:5px;margin-top:30px}.gradient-color[data-v-f6ab10bf]{width:28px;height:24px;padding:1px;border:1px solid #465570;border-radius:4px;background:#151b27;cursor:pointer}.gradient-hex-input[data-v-f6ab10bf]{width:66px;padding:4px 5px;border:1px solid #344158;border-radius:4px;outline:none;background:#101725;color:#aeb8cb;font-size:10px;font-family:monospace}.gradient-hex-input[data-v-f6ab10bf]:focus{border-color:#7774ff;color:#fff}.gradient-position[data-v-f6ab10bf]{display:flex;align-items:center;color:#71809a;font-size:10px}.gradient-position input[data-v-f6ab10bf]{width:43px;padding:3px 4px;border:1px solid #344158;border-radius:4px;outline:none;background:#101725;color:#dce3ef;text-align:right}.gradient-action[data-v-f6ab10bf]{width:25px;height:24px;padding:0;border:1px solid #3a4860;border-radius:4px;background:#273246;color:#cbd4e5;cursor:pointer}.gradient-action[data-v-f6ab10bf]:hover:not(:disabled){border-color:#7774ff;color:#fff}.gradient-action.danger[data-v-f6ab10bf]{color:#e3a5aa}.gradient-action[data-v-f6ab10bf]:disabled{opacity:.35;cursor:not-allowed}.gradient-hint[data-v-f6ab10bf]{margin-top:5px;color:#59667b;font-size:9px}.image-card[data-v-68ff5314]{margin:8px 0;padding:9px;border:1px solid #2e3c55;border-radius:7px;background:#171d2a}.imgrow[data-v-68ff5314]{display:flex;align-items:flex-start;gap:8px}.img-thumb[data-v-68ff5314]{width:48px;height:48px;padding:0;border:1px solid #3a4963;border-radius:6px;background:#1a2232;display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;overflow:hidden}.img-thumb[data-v-68ff5314]:hover{border-color:#7774ff}.img-thumb img[data-v-68ff5314]{display:block;width:100%;height:100%;object-fit:contain}.img-fields[data-v-68ff5314]{flex:1;min-width:0}.img-actions[data-v-68ff5314]{display:flex;flex-direction:column;gap:4px}.row[data-v-68ff5314]{display:flex;align-items:center;gap:8px;margin:6px 0;color:#aab;font-size:12px}.row>span[data-v-68ff5314]:first-child{width:60px;flex-shrink:0;color:#8a93bb}.inp[data-v-68ff5314]{min-width:0;flex:1;padding:3px 5px;border:1px solid #2e2e44;border-radius:5px;background:#1a1a28;color:#dde;font-size:12px}.mini-btn2[data-v-68ff5314]{width:26px;height:24px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:5px;color:#aab;font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center}.mini-btn2[data-v-68ff5314]:hover{background:#2b3a5c}.mini-btn2[data-v-68ff5314]:disabled{opacity:.35;cursor:not-allowed}.thumb-note[data-v-68ff5314]{margin:4px 0 2px;color:#667;font-size:11px}.sequence-pick[data-v-68ff5314]{width:100%;margin:2px 0 4px;padding:6px 8px;border:1px solid #4a4a76;border-radius:5px;background:#27264b;color:#d8d7ff;font-size:12px;cursor:pointer}.sequence-pick[data-v-68ff5314]:hover{border-color:#7774ff;background:#35336a}.sequence-note[data-v-68ff5314]{margin:0 0 6px;color:#727b9b;font-size:11px;line-height:1.4}.resource-weight-row[data-v-68ff5314]{display:grid;grid-template-columns:minmax(0,1fr) 28px;align-items:center;gap:7px}.resource-weight-control[data-v-68ff5314]{width:100%;min-width:0}.resource-weight-control[data-v-68ff5314] .ns-range{min-width:0}.resource-weight-control[data-v-68ff5314] .ns-num{flex:0 0 56px;box-sizing:border-box}.weight-lock[data-v-68ff5314]{width:28px;height:26px;flex:0 0 28px;padding:5px;border:1px solid #35435c;border-radius:5px;background:#202a3b;color:#78859e;cursor:pointer}.weight-lock svg[data-v-68ff5314]{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.weight-lock[data-v-68ff5314]:hover:not(:disabled){border-color:#7774ff;color:#b8b6ff}.weight-lock.on[data-v-68ff5314]{border-color:#7774ff;background:#514fd0;color:#fff}.weight-lock[data-v-68ff5314]:disabled{opacity:.35;cursor:not-allowed}.spine-editor[data-v-9257fb45]{display:grid;gap:10px;color:#c5cbe0}.editor-title[data-v-9257fb45],.section-title[data-v-9257fb45]{color:#dce2f5;font-weight:700}.editor-title[data-v-9257fb45]{padding-bottom:9px;border-bottom:1px solid #30394d}.grid[data-v-9257fb45]{display:grid;gap:8px}.grid.three[data-v-9257fb45]{grid-template-columns:repeat(3,minmax(0,1fr))}.field[data-v-9257fb45]{display:grid;gap:5px;min-width:0;color:#919bb7;font-size:12px}.field input[data-v-9257fb45],.field select[data-v-9257fb45],.asset-name[data-v-9257fb45]{box-sizing:border-box;width:100%;min-width:0;height:35px;padding:0 10px;color:#e2e6f3;background:#101625;border:1px solid #32405b;border-radius:6px}.divider[data-v-9257fb45]{height:1px;background:#30394d;margin:2px 0}.asset-row[data-v-9257fb45]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.asset-name[data-v-9257fb45]{display:flex;align-items:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#7f8aa7}button[data-v-9257fb45]{height:35px;padding:0 13px;border:1px solid #3b4a67;border-radius:6px;background:#33415b;color:#e2e6f3;cursor:pointer}button[data-v-9257fb45]:hover{filter:brightness(1.13)}button[data-v-9257fb45]:disabled{opacity:.55;cursor:wait}.folder-select[data-v-9257fb45]{width:100%;border-color:#6659c7;background:#4940a8;color:#fff}.folder-hint[data-v-9257fb45]{margin-top:-5px;color:#69758e;font-size:10px;line-height:1.45}.asset-actions[data-v-9257fb45]{display:grid;grid-template-columns:1fr 1fr;gap:5px}.asset-actions .load[data-v-9257fb45]{background:#5543df;border-color:#6959ec}.asset-actions .clear[data-v-9257fb45]{background:#702b34;border-color:#803842}.runtime-note[data-v-9257fb45]{color:#69758e;font-size:11px;text-align:center}.error[data-v-9257fb45]{padding:8px 10px;color:#ffabb2;background:#4b2028;border:1px solid #76323e;border-radius:6px;font-size:12px}.section-box[data-v-9257fb45]{display:grid;gap:8px;padding:10px;background:#182132;border:1px solid #303c54;border-radius:7px}.empty[data-v-9257fb45]{color:#667187;font-size:12px;padding:5px 0}.bone-tree[data-v-9257fb45]{max-height:240px;overflow:auto;padding:4px 0;background:#111827;border-radius:5px}.tree-title-row[data-v-9257fb45]{display:flex;align-items:center;justify-content:space-between;gap:8px}.selected-bone[data-v-9257fb45]{width:auto;min-width:0;max-width:100%;height:24px;flex:0 1 auto;overflow:hidden;padding:0 7px;color:#75819c;background:#182132;border:1px solid transparent;border-radius:5px;font-size:10px;text-align:right;white-space:nowrap;text-overflow:ellipsis}.selected-bone.active[data-v-9257fb45]{color:#aeb9d4;background:#242f44;border-color:#35445e;cursor:pointer}.selected-bone.active[data-v-9257fb45]:hover{border-color:#675ec4;background:#302b57}.selected-bone[data-v-9257fb45]:disabled{opacity:1;cursor:default}.selected-bone strong[data-v-9257fb45]{color:#c5cde3;font-weight:600}.tree-action[data-v-9257fb45]{height:24px;padding:0 8px;color:#9aa7c2;background:#242f44;border-color:#35445e;font-size:10px}.bone-search[data-v-9257fb45]{position:relative}.bone-search input[data-v-9257fb45]{box-sizing:border-box;width:100%;height:30px;padding:0 32px 0 9px;color:#dce2f2;background:#101827;border:1px solid #33415b;border-radius:5px;font-size:11px;outline:none}.bone-search input[data-v-9257fb45]:focus{border-color:#7065df;box-shadow:0 0 0 1px #7065df38}.bone-search button[data-v-9257fb45]{position:absolute;top:3px;right:3px;width:24px;height:24px;padding:0;border:0;color:#8d98b0;background:transparent}.bone[data-v-9257fb45]{display:flex;align-items:center;gap:4px;min-height:25px;color:#aeb8d2;font-size:12px;border-bottom:1px solid rgba(72,84,112,.22);cursor:pointer;outline:none}.bone[data-v-9257fb45]:hover{background:#45567e38}.bone.selected[data-v-9257fb45]{color:#f0edff;background:#6b53dd52;box-shadow:inset 2px 0 #8e72ff}.bone[data-v-9257fb45]:focus-visible{box-shadow:inset 0 0 0 1px #7d72dd}.bone-toggle[data-v-9257fb45]{width:22px;height:22px;padding:0;border:0;background:transparent;color:#9aa7c2}.bone-toggle[data-v-9257fb45]:hover{background:#26324a}.bone-leaf[data-v-9257fb45]{display:inline-flex;width:22px;justify-content:center;color:#58647d}.bone-name[data-v-9257fb45]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media(max-width:430px){.grid.three[data-v-9257fb45]{grid-template-columns:1fr}}.panel[data-v-1ace5c57]{display:flex;width:100%;height:100%;flex-direction:column;overflow:hidden;background:#14141f;border-left:1px solid #2a2a3c;padding:12px;box-sizing:border-box}.panel-scroll[data-v-1ace5c57]{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;padding-right:2px;scrollbar-width:thin;scrollbar-color:#2e2e44 transparent}.panel-scroll[data-v-1ace5c57]::-webkit-scrollbar{width:6px}.panel-scroll[data-v-1ace5c57]::-webkit-scrollbar-track{background:transparent}.panel-scroll[data-v-1ace5c57]::-webkit-scrollbar-thumb{background:#2e2e44;border-radius:3px}.panel-scroll[data-v-1ace5c57]::-webkit-scrollbar-thumb:hover{background:#3a3a55}.panel-header[data-v-1ace5c57]{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;flex:0 0 auto;font-weight:700;color:#ccd}.config-management-body[data-v-1ace5c57]{padding-bottom:2px}.config-toolbar[data-v-1ace5c57]{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:6px;margin-bottom:10px}.config-toolbar button[data-v-1ace5c57],.config-toolbar select[data-v-1ace5c57]{min-width:0;height:30px;box-sizing:border-box;border:1px solid #3b4864;border-radius:6px;background:#263149;color:#d6def0;font-size:11px}.config-toolbar button[data-v-1ace5c57]{padding:0 9px;cursor:pointer}.config-toolbar button[data-v-1ace5c57]:hover{border-color:#7169dc;background:#343d68;color:#fff}.config-toolbar select[data-v-1ace5c57]{padding:0 7px;overflow:hidden;text-overflow:ellipsis}.config-toolbar select[data-v-1ace5c57]:disabled{color:#68738a;background:#1b2130}.config-message[data-v-1ace5c57]{margin:-4px 0 9px;color:#83b9a2;font-size:10px}.config-message.error[data-v-1ace5c57]{color:#e8959e}.empty[data-v-1ace5c57],.panel-hint[data-v-1ace5c57]{color:#667;font-size:12px;padding:8px 0}.group[data-v-1ace5c57]{border:1px solid #2a2a3c;border-radius:8px;margin-bottom:10px;overflow:hidden}.group-head[data-v-1ace5c57]{display:flex;align-items:center;gap:6px;padding:7px 10px;cursor:pointer;font-size:12px;font-weight:600;color:#ccd;background:#191924;-webkit-user-select:none;user-select:none}.group-head[data-v-1ace5c57]:hover{background:#20202e}.group-reset[data-v-1ace5c57]{margin-left:auto;height:22px;padding:0 7px;border:1px solid #3a465f;border-radius:5px;background:#252d3d;color:#9eabc3;font-size:10px;line-height:20px;cursor:pointer}.group-reset[data-v-1ace5c57]:hover{border-color:#7774ff;background:#45426f;color:#fff}.scene-head[data-v-1ace5c57]{padding-right:6px}.scene-actions[data-v-1ace5c57]{margin-left:auto;display:flex;align-items:center;gap:4px}.scene-add[data-v-1ace5c57]{height:24px;padding:0 6px;border:1px solid #3a4a6a;border-radius:5px;background:#2e3a55;color:#cdf;font-size:10px;white-space:nowrap;cursor:pointer}.scene-add[data-v-1ace5c57]:hover{border-color:#7774ff;background:#45426f;color:#fff}.scene-add[data-v-1ace5c57]:disabled{opacity:.42;cursor:not-allowed;border-color:#343a4b;background:#252a38;color:#778095}.group-body[data-v-1ace5c57]{padding:8px 10px 12px}.caret[data-v-1ace5c57]{display:inline-block;width:12px;color:#667;font-size:11px}.divider[data-v-1ace5c57]{height:1px;background:#2a2a3c;margin:8px 0}.tree[data-v-1ace5c57]{margin-bottom:8px}.tree-item[data-v-1ace5c57]{display:flex;align-items:center;gap:6px;padding:5px 6px;font-size:12px;color:#bcd;border-radius:6px;margin-bottom:2px}.tree-item.on[data-v-1ace5c57]{background:#26324a;color:#ffe}.tree-item .tdot[data-v-1ace5c57]{color:#fc3;font-size:10px}.tree-item .tdot.dim[data-v-1ace5c57]{color:#556}.tree-item .tdot.collision-dot[data-v-1ace5c57]{color:#ff7070}.tree-item .tdot.path-dot[data-v-1ace5c57]{color:#ff933e;font-size:14px}.tree-item .tdot.spine-dot[data-v-1ace5c57]{color:#c08cff;font-size:11px}.tree-item .tlabel[data-v-1ace5c57]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scene-tree[data-v-1ace5c57]{padding-bottom:8px;border-bottom:1px solid #2a2a3c}.scene-object-item[data-v-1ace5c57]{min-height:28px;cursor:pointer}.scene-object-item[data-v-1ace5c57]:hover{background:#202b40}.scene-object-kind[data-v-1ace5c57]{color:#75829c;font-size:10px}.scene-object-eye[data-v-1ace5c57]{width:24px;height:22px;padding:3px;flex:0 0 24px;border:1px solid transparent;border-radius:5px;background:transparent;color:#9aa6bf;cursor:pointer}.scene-object-eye[data-v-1ace5c57]:hover{border-color:#4b5972;background:#29354a;color:#e1e7f4}.scene-object-eye.off[data-v-1ace5c57]{color:#59647a}.scene-object-eye svg[data-v-1ace5c57]{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.scene-object-eye .eye-slash[data-v-1ace5c57]{stroke:#d47b88;stroke-width:2}.scene-object-delete[data-v-1ace5c57]{width:24px;height:22px;padding:0;border:1px solid #59414a;border-radius:5px;background:#3a272f;color:#efb4bd;font-size:11px;cursor:pointer}.scene-object-delete[data-v-1ace5c57]:hover{border-color:#a45c69;background:#57303a;color:#fff}.object-editor-title[data-v-1ace5c57]{margin:10px 0 8px;padding-top:8px;border-top:1px solid #2a2a3c;color:#cbd4e8;font-weight:700}.field-block[data-v-1ace5c57]{display:flex;flex-direction:column;gap:5px;margin:10px 0;color:#8f9ab3;font-size:11px}.field-block>.inp[data-v-1ace5c57]{width:100%;box-sizing:border-box;min-height:30px}.field-block small[data-v-1ace5c57]{color:#5f6d86;line-height:1.5}.field-grid[data-v-1ace5c57]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:end}.compact-field[data-v-1ace5c57]{display:flex;min-width:0;flex-direction:column;gap:5px;margin:5px 0;color:#8f9ab3;font-size:11px}.compact-field .inp[data-v-1ace5c57]{width:100%;min-height:30px;box-sizing:border-box}.check-field[data-v-1ace5c57]{align-items:flex-start}.check-field input[data-v-1ace5c57]{width:18px;height:18px;margin:4px 0;accent-color:#4f7ee8}.follow-path[data-v-1ace5c57],.setting-line[data-v-1ace5c57]{display:flex;align-items:center;gap:8px;margin:12px 0 4px;color:#aeb8cf;font-size:12px}.setting-line[data-v-1ace5c57]{justify-content:space-between}.follow-path input[data-v-1ace5c57],.setting-line input[type=checkbox][data-v-1ace5c57]{width:17px;height:17px;accent-color:#4f7ee8}.collider-follow-section[data-v-1ace5c57]{margin-top:12px;padding-top:4px;border-top:1px solid #30394d}.collider-curve-title[data-v-1ace5c57]{display:flex;flex-direction:column;gap:3px;margin:12px 0 6px;color:#aeb8cf;font-size:12px}.collider-curve-title small[data-v-1ace5c57]{color:#67738c;font-size:10px;line-height:1.45}.path-color[data-v-1ace5c57]{width:48px;height:28px;padding:0;border:1px solid #3a4963;background:transparent;cursor:pointer}.path-help[data-v-1ace5c57]{margin:12px 0;color:#7d89a2;font-size:11px;line-height:1.55}.path-help>span[data-v-1ace5c57]{color:#aeb8cf}.path-help ul[data-v-1ace5c57]{margin:6px 0 0;padding-left:20px}.path-help li[data-v-1ace5c57]{margin:3px 0}.path-action[data-v-1ace5c57]{width:100%;height:31px;margin-top:7px;border:0;border-radius:5px;background:#33425b;color:#c9d1e1;cursor:pointer}.path-action[data-v-1ace5c57]:hover{filter:brightness(1.12)}.path-action.primary[data-v-1ace5c57]{background:#f05408;color:#fff}.tag[data-v-1ace5c57]{font-size:10px;color:#667;background:#1c1c2a;border-radius:4px;padding:1px 5px}.row[data-v-1ace5c57]{display:flex;align-items:center;gap:8px;margin:6px 0;font-size:12px;color:#aab}.row>span[data-v-1ace5c57]:first-child{width:60px;flex-shrink:0;color:#8a93bb}.inp[data-v-1ace5c57]{flex:1;min-width:0;padding:3px 5px;background:#1a1a28;border:1px solid #2e2e44;border-radius:5px;color:#dde;font-size:12px}.pair[data-v-1ace5c57]{display:flex;flex-direction:column;gap:2px;flex:1}.colr[data-v-1ace5c57]{width:28px;height:22px;border:none;background:none;cursor:pointer}.segs[data-v-1ace5c57]{display:flex;gap:6px;margin:6px 0}.stream-behavior-segs[data-v-1ace5c57]{margin-top:10px}.stream-loop-options[data-v-1ace5c57]{display:grid;gap:8px;margin:8px 0 4px;padding:9px 10px;border:1px solid #32405a;border-radius:6px;background:#171f2e}.loop-section-row[data-v-1ace5c57]{display:flex;min-height:27px;align-items:center;justify-content:space-between;gap:8px}.loop-duration-control[data-v-1ace5c57]{display:flex;flex:0 0 auto;align-items:center;gap:7px}.loop-duration-toggle[data-v-1ace5c57]{gap:5px;font-size:10px;white-space:nowrap}.loop-duration-toggle .switch-ui[data-v-1ace5c57]{width:26px;height:14px}.loop-duration-toggle .switch-ui[data-v-1ace5c57]:after{width:10px;height:10px}.loop-duration-toggle input:checked+.switch-ui[data-v-1ace5c57]:after{transform:translate(12px)}.loop-section-duration[data-v-1ace5c57]{display:flex;flex:0 0 auto;align-items:center;gap:4px;color:#7f8ba4;font-size:11px}.loop-section-duration input[data-v-1ace5c57]{position:static;width:54px;height:25px;padding:0 6px;border:1px solid #3a465f;border-radius:5px;outline:none;background:#101725;color:#e4e8f2;text-align:right;opacity:1;pointer-events:auto}.loop-section-duration input[data-v-1ace5c57]:focus{border-color:#716eff}.loop-auto-duration[data-v-1ace5c57]{min-width:54px;color:#77839a;text-align:right;white-space:nowrap}.seg[data-v-1ace5c57]{flex:1;padding:5px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:12px;cursor:pointer}.seg.on[data-v-1ace5c57]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.mini-btn[data-v-1ace5c57]{background:#2e3a55;border:1px solid #3a4a6a;color:#cdf;border-radius:5px;padding:3px 8px;font-size:11px;cursor:pointer}.mini-btn.danger[data-v-1ace5c57]{background:#4a2a2e;color:#fbb}.placeholder[data-v-1ace5c57]{color:#667;font-size:11px;padding:6px 0}.export-settings[data-v-1ace5c57]{padding-top:3px}.export-field[data-v-1ace5c57]{display:flex;flex-direction:column;gap:6px;margin:10px 0 13px;color:#9ca8bf;font-size:11px;font-weight:600}.export-input[data-v-1ace5c57]{width:100%;min-height:34px;box-sizing:border-box;padding:6px 9px;color:#e3e7f2;background:#141a29;border-color:#35445f}.export-fps-row[data-v-1ace5c57]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}.export-fps-field[data-v-1ace5c57]{margin-bottom:5px}.export-checkbox[data-v-1ace5c57]{display:flex;align-items:center;gap:7px;min-height:34px;margin-bottom:5px;color:#aeb8cc;font-size:11px;white-space:nowrap}.export-checkbox input[data-v-1ace5c57]{width:17px;height:17px;margin:0;accent-color:#625ff1}.export-help[data-v-1ace5c57]{margin:-6px 0 14px;color:#66758e;font-size:10px;line-height:1.5}.export-switches[data-v-1ace5c57]{display:grid;gap:13px;margin:4px 0 7px;padding-top:2px}.export-switch[data-v-1ace5c57]{font-weight:600}.export-switch-last[data-v-1ace5c57]{margin-top:13px}.spine-export-actions[data-v-1ace5c57]{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.export-spine-json[data-v-1ace5c57]{width:100%;padding:9px 8px;flex:0 0 auto;border:1px solid #4f4b9a;border-radius:7px;background:#403b91;color:#f1f0ff;font-size:12px;font-weight:700;cursor:pointer}.export-spine-json[data-v-1ace5c57]:hover{border-color:#7774ff;background:#514bc0}.export-spine-json[data-v-1ace5c57]:disabled{cursor:wait;opacity:.68}.export-spine-project[data-v-1ace5c57]{grid-column:1 / -1;width:100%;padding:7px 8px;border:1px solid #287d69;border-radius:7px;background:#196854;color:#edfff9;font-size:12px;font-weight:700;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.export-spine-project small[data-v-1ace5c57]{color:inherit;font-size:9px;font-weight:500;line-height:1.1}.export-spine-project[data-v-1ace5c57]:hover:not(:disabled){border-color:#47c89f;background:#238267}.export-spine-project[data-v-1ace5c57]:disabled{cursor:not-allowed;opacity:.48}.export-spine-images[data-v-1ace5c57]{width:100%;padding:8px;border:1px solid #3b5f8b;border-radius:7px;background:#243e64;color:#eaf3ff;font-size:12px;font-weight:700;cursor:pointer}.export-spine-images[data-v-1ace5c57]:hover:not(:disabled){border-color:#6099dc;background:#315581}.export-spine-images[data-v-1ace5c57]:disabled{cursor:wait;opacity:.55}.connector-status[data-v-1ace5c57]{display:flex;align-items:center;justify-content:center;gap:5px;padding-top:6px;color:#717b99;font-size:10px}.connector-status .connector-dot[data-v-1ace5c57]{width:6px;height:6px;border-radius:50%;background:#66718f}.connector-status.ready[data-v-1ace5c57]{color:#70d8ae}.connector-status.ready .connector-dot[data-v-1ace5c57]{background:#49c993;box-shadow:0 0 5px #49c99388}.connector-status.warning[data-v-1ace5c57]{color:#d4aa67}.connector-status.warning .connector-dot[data-v-1ace5c57]{background:#d4aa67}.connector-status button[data-v-1ace5c57]{padding:0 3px;border:0;background:transparent;color:#8290b6;font-size:10px;cursor:pointer}.connector-status button[data-v-1ace5c57]:hover{color:#c5caff}.connector-status a[data-v-1ace5c57]{padding:0 3px;color:#a8b0ff;font-size:10px;text-decoration:underline}.connector-status a[data-v-1ace5c57]:hover{color:#d8dcff}.export-message[data-v-1ace5c57]{padding:7px 5px 0;color:#70d8ae;font-size:10px;line-height:1.45;text-align:center}.export-message.error[data-v-1ace5c57]{color:#ff858f}.export-message a[data-v-1ace5c57]{display:inline-block;margin-left:5px;color:#9da7ff;text-decoration:underline}.look-title[data-v-1ace5c57]{font-size:12px;font-weight:600;color:#ccd;margin:10px 0 6px;padding-bottom:4px;border-bottom:1px solid #2a2a3c}.look-title[data-v-1ace5c57]:first-child{margin-top:2px}.seg[data-v-1ace5c57]{display:flex;gap:6px;margin:6px 0}.seg-btn[data-v-1ace5c57]{flex:1;padding:5px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:12px;cursor:pointer}.seg-btn.active[data-v-1ace5c57]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.curve-hint[data-v-1ace5c57]{min-height:54px;border:1px dashed #2e2e44;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#556;font-size:11px;margin:6px 0}.curve-wrap[data-v-1ace5c57]{margin:6px 0}.curve-labels[data-v-1ace5c57]{display:flex;justify-content:space-between;color:#566;font-size:10px;margin-top:2px}.image-title[data-v-1ace5c57]{display:flex;align-items:center;justify-content:space-between}.image-add[data-v-1ace5c57]{width:26px;height:24px;border:1px solid #4a4d9a;border-radius:5px;background:#252850;color:#8f8cff;font-size:18px;line-height:1;cursor:pointer}.image-add[data-v-1ace5c57]:hover{background:#4542a8;color:#fff}.image-card[data-v-1ace5c57]{margin:8px 0;padding:9px;border:1px solid #2e3c55;border-radius:7px;background:#171d2a}.imgrow[data-v-1ace5c57]{display:flex;align-items:flex-start;gap:8px}.img-thumb[data-v-1ace5c57]{width:48px;height:48px;padding:0;border:1px solid #3a4963;border-radius:6px;background:#1a2232;display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;overflow:hidden}.img-thumb[data-v-1ace5c57]:hover{border-color:#7774ff}.img-thumb img[data-v-1ace5c57]{display:block;width:100%;height:100%;object-fit:contain}.img-fields[data-v-1ace5c57]{flex:1;min-width:0}.img-actions[data-v-1ace5c57]{display:flex;flex-direction:column;gap:4px}.mini-btn2[data-v-1ace5c57]{width:26px;height:24px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:5px;color:#aab;font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center}.mini-btn2[data-v-1ace5c57]:hover{background:#2b3a5c}.mini-btn2[data-v-1ace5c57]:disabled{opacity:.35;cursor:not-allowed}.thumb-note[data-v-1ace5c57]{color:#667;font-size:11px;margin:4px 0 2px}.resource-divider[data-v-1ace5c57]{height:1px;margin:9px 0 7px;background:#2a3549}.resource-color-row .blend-select[data-v-1ace5c57]{max-width:88px}.resource-color-picker .hex[data-v-1ace5c57]{margin-left:0}.random-color-hint[data-v-1ace5c57]{margin:-5px 0 9px 68px;color:#66758e;font-size:9px;line-height:1.45}.hex-input[data-v-1ace5c57]{width:72px;padding:4px 6px;border:1px solid #344158;border-radius:5px;outline:none;background:#101725;color:#aeb8cb;font-size:11px;font-family:monospace}.hex-input[data-v-1ace5c57]:focus{border-color:#7774ff;color:#fff}.resource-alpha-head[data-v-1ace5c57]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;color:#8a93bb;font-size:12px}.alpha-modes[data-v-1ace5c57]{display:flex;gap:3px}.alpha-modes button[data-v-1ace5c57]{padding:4px 8px;border:1px solid transparent;border-radius:5px;background:transparent;color:#8d98ae;font-size:11px;cursor:pointer}.alpha-modes button[data-v-1ace5c57]:hover{background:#273246}.alpha-modes button.on[data-v-1ace5c57]{border-color:#7774ff;background:#605df0;color:#fff}.resource-alpha-curve[data-v-1ace5c57]{margin-top:7px}.resource-weight-row[data-v-1ace5c57]{display:flex;align-items:center;gap:5px}.resource-weight-control[data-v-1ace5c57]{flex:1;min-width:0}.weight-lock[data-v-1ace5c57]{width:28px;height:26px;flex:0 0 28px;padding:5px;border:1px solid #35435c;border-radius:5px;background:#202a3b;color:#78859e;cursor:pointer}.weight-lock svg[data-v-1ace5c57]{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.weight-lock[data-v-1ace5c57]:hover:not(:disabled){border-color:#7774ff;color:#b8b6ff}.weight-lock.on[data-v-1ace5c57]{border-color:#7774ff;background:#514fd0;color:#fff}.weight-lock[data-v-1ace5c57]:disabled{opacity:.35;cursor:not-allowed}.file-input[data-v-1ace5c57]{display:none}.hex[data-v-1ace5c57]{font-size:11px;color:#889;margin-left:auto;font-variant-numeric:tabular-nums}.inp.tiny[data-v-1ace5c57]{width:46px;flex:0 0 46px;text-align:center}.attr-body[data-v-1ace5c57]{padding:10px;background:#151b27}.attr-section-title[data-v-1ace5c57]{margin:2px 0 8px;color:#9ca8c0;font-size:12px;font-weight:700}.attr-section-title.life-title[data-v-1ace5c57]{margin-top:14px;padding-top:12px;border-top:1px solid #2d3950}.attr-axis-head[data-v-1ace5c57]{display:flex;align-items:center;justify-content:space-between;margin:10px 1px -2px;color:#aeb8cf;font-size:12px;font-weight:600}.axis-modes[data-v-1ace5c57]{display:flex;gap:4px}.axis-mode[data-v-1ace5c57]{padding:4px 8px;border:1px solid #344158;border-radius:5px;background:#273246;color:#aeb8cf;font-size:11px;cursor:pointer}.axis-mode.on[data-v-1ace5c57]{border-color:#7774ff;background:#605df0;color:#fff}.life-item[data-v-1ace5c57]{padding:9px 0;border-bottom:1px solid #2a3549}.switch-row[data-v-1ace5c57]{display:flex;align-items:center;gap:9px;color:#b8c1d5;font-size:12px;cursor:pointer}.switch-row input[data-v-1ace5c57]{position:absolute;opacity:0;pointer-events:none}.switch-ui[data-v-1ace5c57]{position:relative;width:32px;height:18px;border-radius:10px;background:#354258;transition:background .16s ease}.switch-ui[data-v-1ace5c57]:after{content:"";position:absolute;left:2px;top:2px;width:14px;height:14px;border-radius:50%;background:#fff;transition:transform .16s ease}.switch-row input:checked+.switch-ui[data-v-1ace5c57]{background:#625ff1}.switch-row input:checked+.switch-ui[data-v-1ace5c57]:after{transform:translate(14px)}.life-axis[data-v-1ace5c57]{margin:9px 0 2px 42px}.seed-row[data-v-1ace5c57]{display:flex;align-items:center;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #2d3950}.seed-row label[data-v-1ace5c57]{width:64px;color:#8f9bb5;font-size:12px}.seed-input[data-v-1ace5c57]{min-width:0;flex:1;padding:6px 8px;border:1px solid #344158;border-radius:6px;outline:none;background:#0f1625;color:#e2e7f2;font-size:12px}.seed-input[data-v-1ace5c57]:focus{border-color:#625ff1}.seed-random[data-v-1ace5c57]{width:34px;height:30px;border:1px solid #3a4860;border-radius:6px;background:#2c3950;color:#d7def0;cursor:pointer}.seed-random[data-v-1ace5c57]:hover{background:#394964}.scene-seed[data-v-1ace5c57]{margin-top:10px}.seed-hint[data-v-1ace5c57]{margin:5px 0 1px 72px;color:#657188;font-size:9px;line-height:1.45}.modifier-item[data-v-1ace5c57]{padding:8px 0 10px;border-bottom:1px solid #2a3549}.modifier-switch[data-v-1ace5c57]{font-weight:600}.modifier-params[data-v-1ace5c57]{margin:8px 0 0 10px;padding:2px 0 2px 10px;border-left:2px solid #344158}.modifier-hint[data-v-1ace5c57]{margin:7px 0 0 2px;color:#647086;font-size:9px;line-height:1.5}.collision-filter-params[data-v-1ace5c57]{position:relative;padding-top:5px;padding-bottom:5px}.collision-filter-title[data-v-1ace5c57]{margin-bottom:8px;color:#9ba7bd;font-size:11px;font-weight:600}.collision-filter-tags[data-v-1ace5c57]{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.collision-filter-tag[data-v-1ace5c57]{display:inline-flex;min-width:0;align-items:center;gap:6px;padding:5px 5px 5px 8px;border:1px solid #625ff1;border-radius:6px;background:#514dcf;color:#fff;font-size:11px}.collision-filter-tag>span[data-v-1ace5c57]{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.collision-filter-tag.disabled[data-v-1ace5c57]{border-color:#4b5364;background:#343b4b;color:#929bad}.collision-filter-tag button[data-v-1ace5c57]{width:18px;height:18px;padding:0;border:0;border-radius:4px;background:#0b0f1a38;color:inherit;line-height:16px;cursor:pointer}.collision-filter-tag button[data-v-1ace5c57]:hover{background:#0b0f1a80;color:#fff}.collision-filter-add[data-v-1ace5c57]{width:30px;height:30px;padding:0;border:1px dashed #536079;border-radius:6px;background:#182131;color:#98a5bd;font-size:18px;line-height:28px;cursor:pointer}.collision-filter-add[data-v-1ace5c57]:hover,.collision-filter-add.active[data-v-1ace5c57]{border-color:#7774ff;background:#262c52;color:#fff}.collision-filter-add[data-v-1ace5c57]:disabled{opacity:.42;cursor:not-allowed}.collision-filter-empty[data-v-1ace5c57]{margin-top:7px;color:#6f7b91;font-size:10px}.collision-filter-picker[data-v-1ace5c57]{display:grid;gap:4px;margin-top:7px;padding:5px;border:1px solid #344158;border-radius:6px;background:#101725}.collision-filter-picker button[data-v-1ace5c57]{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;border:0;border-radius:4px;background:transparent;color:#c7d0e3;font-size:11px;text-align:left;cursor:pointer}.collision-filter-picker button[data-v-1ace5c57]:hover{background:#29344a;color:#fff}.collision-filter-picker button span[data-v-1ace5c57]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.collision-filter-picker button small[data-v-1ace5c57]{flex:none;color:#68758d;font-size:9px}.stream-loop-hint[data-v-1ace5c57]{margin:9px 2px 3px;padding:7px 8px;border:1px solid #4a436e;border-radius:5px;background:#211f35;color:#aaa4d7}.switch-row input:disabled+.switch-ui[data-v-1ace5c57]{opacity:.45;cursor:not-allowed}.bone-follow-target[data-v-1ace5c57]{margin:7px 0 9px;padding:7px 8px;overflow:hidden;color:#7f8ba3;background:#121a29;border:1px solid #2f3c53;border-radius:5px;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.bone-follow-target strong[data-v-1ace5c57]{color:#c8d0e4;font-weight:600}.bone-follow-missing[data-v-1ace5c57]{margin:7px 0 9px;padding:7px 8px;color:#d49aa3;background:#2a1e26;border:1px solid #513540;border-radius:5px;font-size:10px;line-height:1.5}.bone-follow-rebind[data-v-1ace5c57]{width:100%;min-height:28px;margin:0 0 8px;padding:4px 8px;overflow:hidden;border:1px solid #4a436e;border-radius:5px;background:#2d2947;color:#c8c2ee;font-size:10px;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.bone-follow-rebind[data-v-1ace5c57]:hover{border-color:#7165bd;background:#3a335d;color:#fff}.bone-follow-transform-grid[data-v-1ace5c57]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.modifier-mode-row[data-v-1ace5c57]{display:flex;justify-content:flex-end;gap:4px;margin-bottom:6px}.gravity-curve-title[data-v-1ace5c57]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0 6px;color:#9ba7bd;font-size:11px}.gravity-curve-title span[data-v-1ace5c57]:last-child{color:#657188;font-size:9px}.gravity-curve-axis[data-v-1ace5c57]{display:flex;justify-content:space-between;margin:3px 34px 0 1px;color:#5f6b82;font-size:9px}.gravity-params[data-v-1ace5c57] .ce-svg{height:96px;background:#0f1625;border-color:#30405a}.trail-params[data-v-1ace5c57]{padding-right:2px}.trail-section-title[data-v-1ace5c57]{margin:3px 0 8px;color:#aeb8cf;font-size:12px;font-weight:700}.trail-resource-row[data-v-1ace5c57]{display:flex;align-items:stretch;gap:8px;margin-bottom:10px;padding:8px;border:1px solid #2e3c55;border-radius:7px;background:#171d2a}.trail-thumb[data-v-1ace5c57]{width:58px;min-height:58px;padding:3px;flex:0 0 58px;border:1px solid #3a4963;border-radius:6px;background:#101725;cursor:pointer;overflow:hidden}.trail-thumb[data-v-1ace5c57]:hover{border-color:#7774ff}.trail-thumb img[data-v-1ace5c57]{display:block;width:100%;height:100%;object-fit:contain}.trail-resource-fields[data-v-1ace5c57]{display:flex;min-width:0;flex:1;flex-direction:column;gap:7px}.trail-color-row[data-v-1ace5c57]{display:flex;align-items:center;gap:5px;color:#8a93bb;font-size:11px}.trail-color-row>span[data-v-1ace5c57]{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trail-color-row .hex-input[data-v-1ace5c57],.trail-fixed-color .hex-input[data-v-1ace5c57]{min-width:0;flex:1}.trail-mode-head[data-v-1ace5c57]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0 6px;color:#9ba7bd;font-size:11px}.trail-sub-switch[data-v-1ace5c57]{margin:11px 0 7px;padding-top:9px;border-top:1px solid #2a3549}.trail-grid-row[data-v-1ace5c57]{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.trail-grid-row[data-v-1ace5c57] .ns{min-width:0;flex-wrap:wrap;align-items:center}.trail-grid-row[data-v-1ace5c57] .ns-label{width:100%}.trail-grid-row[data-v-1ace5c57] .ns-range{min-width:0}.trail-grid-row[data-v-1ace5c57] .ns-num{width:42px}.trail-params[data-v-1ace5c57] .ce-svg{height:92px;background:#0f1625;border-color:#30405a}.timeline[data-v-8d9981a9]{height:100%;background:#12121c;border-top:1px solid #2a2a3c;display:flex;flex-direction:column;padding:6px 10px;gap:4px}.tl-controls[data-v-8d9981a9]{display:flex;align-items:center;gap:8px}.tl-btn[data-v-8d9981a9]{width:30px;height:26px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:12px;cursor:pointer}.tl-btn.on[data-v-8d9981a9]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.tl-range[data-v-8d9981a9]{display:flex;height:25px;align-items:center;gap:3px;color:#778198;font-size:10px}.tl-range input[data-v-8d9981a9]{width:43px;height:25px;padding:0 5px;box-sizing:border-box;border:1px solid #3a3a51;border-radius:5px;outline:none;background:#181824;color:#e1e4ed;font-size:11px;text-align:center}.tl-range input[data-v-8d9981a9]:focus{border-color:#716eff}.tl-loop-range[data-v-8d9981a9]{height:25px;padding:0 7px;border:1px solid #4e5680;border-radius:5px;background:#252943;color:#bfc8e8;font-size:10px;cursor:pointer;white-space:nowrap}.tl-loop-range[data-v-8d9981a9]:hover{border-color:#716eff;color:#fff}.tl-frame[data-v-8d9981a9]{display:inline-block;flex:0 0 92px;width:92px;box-sizing:border-box;font-size:12px;color:#aab;text-align:right;font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;white-space:nowrap}.tl-frame b[data-v-8d9981a9]{display:inline;color:inherit;font-weight:400}.tl-legend[data-v-8d9981a9]{display:flex;align-items:center;gap:4px;color:#778198;font-size:10px}.tl-legend i[data-v-8d9981a9]{display:inline-block;width:10px;height:7px;border-radius:2px}.legend-emission[data-v-8d9981a9]{margin-left:4px;background:#2f8b62}.legend-life[data-v-8d9981a9]{margin-left:5px;background:#a54551}.legend-spine[data-v-8d9981a9]{margin-left:5px;background:#7448b8}.tl-anim[data-v-8d9981a9]{display:flex;align-items:center;gap:6px;font-size:12px;color:#aab}.tl-owner-animation[data-v-8d9981a9]{position:relative}.tl-animation-trigger[data-v-8d9981a9]{display:flex;align-items:center;justify-content:space-between;gap:8px;width:116px;height:25px;padding:0 7px;overflow:hidden;border:1px solid #2e2e44;border-radius:5px;background:#1a1a28;color:#dde;cursor:pointer}.tl-animation-trigger>span[data-v-8d9981a9]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-animation-trigger>i[data-v-8d9981a9]{flex:0 0 auto;color:#8c96ad;font-style:normal}.tl-animation-trigger[data-v-8d9981a9]:disabled{opacity:.5;cursor:not-allowed}.tl-animation-menu[data-v-8d9981a9]{position:absolute;z-index:30;right:0;bottom:calc(100% + 6px);width:226px;padding:7px;border:1px solid #3c4760;border-radius:8px;background:#171b29;box-shadow:0 10px 24px #00000073}.tl-animation-menu-title[data-v-8d9981a9]{padding:2px 4px 6px;color:#77839c;font-size:10px}.tl-animation-option[data-v-8d9981a9]{display:flex;align-items:center;justify-content:space-between;width:100%;height:27px;padding:0 7px;border:0;border-radius:5px;background:transparent;color:#b8c1d5;text-align:left;cursor:pointer}.tl-animation-option>span[data-v-8d9981a9]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-animation-option[data-v-8d9981a9]:hover{background:#252e42}.tl-animation-option.on[data-v-8d9981a9]{background:#34335d;color:#fff}.tl-animation-option>i[data-v-8d9981a9]{color:#8d8aff;font-style:normal}.tl-animation-editor[data-v-8d9981a9]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;margin-top:7px;padding-top:7px;border-top:1px solid #2b3346}.tl-animation-name[data-v-8d9981a9]{min-width:0;height:27px;padding:0 7px;box-sizing:border-box;border:1px solid #343e55;border-radius:5px;background:#101522;color:#e1e6f2;outline:none}.tl-animation-name[data-v-8d9981a9]:focus{border-color:#6865d8}.tl-animation-editor button[data-v-8d9981a9],.tl-animation-actions button[data-v-8d9981a9]{height:27px;padding:0 8px;border:1px solid #3c4861;border-radius:5px;background:#29344a;color:#cbd3e3;cursor:pointer}.tl-animation-actions[data-v-8d9981a9]{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:6px}.tl-animation-actions button[data-v-8d9981a9]:last-child{border-color:#5b3942;background:#3b282f;color:#e2a8b2}.tl-animation-actions button[data-v-8d9981a9]:disabled{opacity:.4;cursor:not-allowed}.tl-animation-error[data-v-8d9981a9]{margin-top:5px;color:#ef8997;font-size:10px}.tl-animation-hint[data-v-8d9981a9]{margin-top:5px;color:#69758d;font-size:9px;text-align:center}.tl-sel[data-v-8d9981a9]{background:#1a1a28;border:1px solid #2e2e44;color:#dde;border-radius:5px;padding:2px 6px;font-size:12px}.tl-sel[data-v-8d9981a9]:disabled{opacity:.5;cursor:not-allowed}.tl-spine-preview .tl-sel[data-v-8d9981a9]{max-width:190px}.tl-zoom[data-v-8d9981a9]{margin-left:auto;font-size:11px;color:#667}.tl-viewport[data-v-8d9981a9]{position:relative;flex:1;overflow:hidden;background:#0d0d14;border:1px solid #2a2a3c;border-radius:6px;cursor:ew-resize}.tl-ticks[data-v-8d9981a9]{position:absolute;top:0;left:0;right:0;height:18px}.tl-tickline[data-v-8d9981a9]{position:absolute;top:0;bottom:0;width:1px;background:#263040}.tl-ticklabel[data-v-8d9981a9]{position:absolute;top:2px;transform:translate(-50%);font-size:9px;color:#667}.tl-playhead[data-v-8d9981a9]{position:absolute;top:0;bottom:0;width:2px;background:#fc3;z-index:5;pointer-events:none}.tl-lanes[data-v-8d9981a9]{position:absolute;top:22px;left:0;right:0;bottom:0}.tl-lane[data-v-8d9981a9]{position:relative;height:26px;margin-bottom:4px}.lane-ico[data-v-8d9981a9]{position:absolute;left:4px;top:6px;font-size:11px;color:#dde;z-index:2;pointer-events:none}.lane-bar[data-v-8d9981a9]{position:absolute;top:4px;height:18px;display:flex;align-items:stretch;cursor:grab;box-sizing:border-box}.lane-bar[data-v-8d9981a9]:active{cursor:grabbing}.lane-name[data-v-8d9981a9]{position:absolute;left:14px;right:5px;top:2px;z-index:2;pointer-events:none;font-size:11px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bar-life[data-v-8d9981a9]{position:absolute;inset:0 auto 0 0;z-index:0;min-width:1px;border:1px solid #c05a66;border-radius:5px;background:#a54551;box-sizing:border-box}.bar-life.loop-life[data-v-8d9981a9]{border-color:#667085;background:#242b39}.bar-emission[data-v-8d9981a9]{position:absolute;inset:0 auto 0 0;z-index:1;min-width:1px;border:1px solid #45a97d;border-radius:5px 0 0 5px;background:#2f8b62;box-sizing:border-box}.bar-emission.bar-loop[data-v-8d9981a9]{border-radius:0}.bar-loop-transition[data-v-8d9981a9]{position:absolute;top:0;bottom:0;z-index:1;border:1px solid #7d8799;background:#50596a;box-sizing:border-box}.bar-loop-start[data-v-8d9981a9]{left:0;border-radius:5px 0 0 5px}.bar-loop-end[data-v-8d9981a9]{border-radius:0 5px 5px 0}.bar-handle[data-v-8d9981a9]{position:absolute;z-index:4;right:-4px;top:-1px;bottom:-1px;width:8px;cursor:ew-resize;background:#ffffff2e}.bar-handle[data-v-8d9981a9]:hover{background:#ffffff59}.spine-ico[data-v-8d9981a9]{color:#c08cff}.spine-bar[data-v-8d9981a9]{position:absolute;top:4px;height:18px;min-width:1px;box-sizing:border-box;border:1px solid #a575ed;border-radius:5px;background:#7448b8;cursor:grab;box-shadow:inset 0 0 0 1px #ffffff0d}.spine-bar[data-v-8d9981a9]:active{cursor:grabbing}.tl-empty[data-v-8d9981a9]{color:#667;font-size:11px;padding:8px}.transfer-overlay[data-v-592b922e]{position:fixed;z-index:2000;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:auto;cursor:wait;overscroll-behavior:contain;background:#05080f42;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}.transfer-dialog[data-v-592b922e]{width:min(420px,calc(100vw - 40px));padding:18px 20px 16px;border:1px solid #414b66;border-radius:10px;box-shadow:0 18px 55px #00000075;background:#171d2b;color:#e7ebf5}.transfer-heading[data-v-592b922e]{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px;font-size:14px;font-weight:700}.transfer-heading strong[data-v-592b922e]{color:#a8a6ff;font-size:12px;font-variant-numeric:tabular-nums}.transfer-track[data-v-592b922e]{height:9px;overflow:hidden;border:1px solid #35415a;border-radius:999px;background:#0d1422}.transfer-bar[data-v-592b922e]{height:100%;border-radius:inherit;background:linear-gradient(90deg,#4d75e8,#7774ff);transition:width .16s ease}.transfer-track.indeterminate .transfer-bar[data-v-592b922e]{width:42%;animation:transfer-slide-592b922e 1s ease-in-out infinite}.transfer-detail[data-v-592b922e]{min-height:17px;margin-top:9px;color:#8895ae;font-size:11px;line-height:1.5}.transfer-dialog.failed[data-v-592b922e]{border-color:#754351}.transfer-dialog.failed .transfer-heading strong[data-v-592b922e],.transfer-dialog.failed .transfer-detail[data-v-592b922e]{color:#e99aa9}.transfer-dialog.failed .transfer-bar[data-v-592b922e]{background:#c85d70}.transfer-fade-enter-active[data-v-592b922e],.transfer-fade-leave-active[data-v-592b922e]{transition:opacity .16s ease}.transfer-fade-enter-from[data-v-592b922e],.transfer-fade-leave-to[data-v-592b922e]{opacity:0}@keyframes transfer-slide-592b922e{0%{transform:translate(-110%)}to{transform:translate(250%)}}.layout[data-v-42c4fa00]{display:flex;width:100%;height:100%;min-height:0;overflow:clip}.parameter-panel[data-v-42c4fa00]{flex-shrink:0;height:100%;min-height:0;overflow:clip}.resizer-col[data-v-42c4fa00]{width:5px;cursor:col-resize;background:#1c1c2a;border-left:1px solid #2a2a3c;border-right:1px solid #2a2a3c;flex-shrink:0}.resizer-col[data-v-42c4fa00]:hover{background:#3a5a8c}.right[data-v-42c4fa00]{flex:1;min-width:0;height:100%;min-height:0;overflow:clip;display:flex;flex-direction:column}.panel-right .right[data-v-42c4fa00]{order:1}.panel-right .resizer-col[data-v-42c4fa00]{order:2}.panel-right .parameter-panel[data-v-42c4fa00]{order:3}.stage-area[data-v-42c4fa00]{flex:1;min-height:0;overflow:clip}.resizer-row[data-v-42c4fa00]{height:4px;cursor:row-resize;background:#1c1c2a;border-top:1px solid #2a2a3c;border-bottom:1px solid #2a2a3c;flex-shrink:0}.resizer-row[data-v-42c4fa00]:hover{background:#3a5a8c}.timeline-area[data-v-42c4fa00]{position:relative;z-index:10;flex-shrink:0;overflow:visible}html,body{width:100%;height:100%;margin:0;padding:0;overflow:clip;overscroll-behavior:none;background:#0b0b12;color:#e8e8f0;font-family:system-ui,-apple-system,Segoe UI,sans-serif}body{position:fixed;top:0;right:0;bottom:0;left:0}*{box-sizing:border-box}#app{position:fixed;top:0;right:0;bottom:0;left:0;width:auto;height:auto;overflow:clip}input[type=number]{-webkit-appearance:textfield;appearance:textfield;-moz-appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none} diff --git a/dist/assets/index-BUbc0qUx.js b/dist/assets/index-Cr68vmVa.js similarity index 99% rename from dist/assets/index-BUbc0qUx.js rename to dist/assets/index-Cr68vmVa.js index 8c1c9d5..27d365e 100644 --- a/dist/assets/index-BUbc0qUx.js +++ b/dist/assets/index-Cr68vmVa.js @@ -1,2 +1,2 @@ -var ft=Object.defineProperty;var gt=(W,t,e)=>t in W?ft(W,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):W[t]=e;var T=(W,t,e)=>gt(W,typeof t!="symbol"?t+"":t,e);import{f as ht,R as pt,N as dt,ac as ut,Z as mt,b4 as yt,O as rt,b5 as at,U as D,B as Tt}from"./index-D08n0lXm.js";import{$ as Rt,a0 as Yt,a1 as Ft,a2 as Et,y as _t,a3 as Ot,a4 as kt,a5 as Xt,a6 as Bt,a7 as Nt,a8 as Dt,a9 as $t,aa as zt,ab as Wt,ad as qt,H as Gt,ae as Jt,af as Ht,ag as Zt,ah as Kt,ai as Qt,aj as jt,ak as te,al as ee,am as se,an as ne,ao as ie,ap as oe,aq as re,ar as ae,as as le,at as ce,au as he,av as pe,aw as de,ax as ue,ay as fe,az as ge,aA as me,aB as ye,aC as Te,aD as be,aE as we,aF as xe,aG as Ae,aH as Pe,aI as Ie,aJ as Ce,aK as Ve,aL as Le,aM as Se,aN as Me,aO as ve,aP as Ue,aQ as Re,aR as Ye,aS as Fe,aT as Ee,x as _e,aU as Oe,aV as ke,aW as Xe,aX as Be,aY as Ne,aZ as De,a_ as $e,a$ as ze,b0 as We,b1 as qe,b2 as Ge,b3 as Je,b6 as He,b7 as Ze,b8 as Ke,b9 as Qe,ba as je,bb as ts,bc as es,bd as ss,be as ns,bf as is,bg as os,bh as rs,bi as as,bj as ls,bk as cs,bl as hs,bm as ps,bn as ds,bo as us,bp as fs,bq as gs,br as ms,bs as ys,bt as Ts,bu as bs,w as ws,X as xs,J as As,Y as Ps,z as Is,bv as Cs,bw as Vs,bx as Ls,by as Ss,bz as Ms,bA as vs,bB as Us,bC as Rs,bD as Ys,bE as Fs,bF as Es,bG as _s,T as Os,bH as ks,bI as Xs,b as Bs,bJ as Ns,c as Ds,bK as $s,bL as zs,bM as Ws,bN as qs,bO as Gs,bP as Js,bQ as Hs,bR as Zs,bS as Ks,bT as Qs,bU as js,bV as tn,bW as en,bX as sn,bY as nn,bZ as on,b_ as rn,V as an,b$ as ln,c0 as cn,c1 as hn,c2 as pn,c3 as dn}from"./index-D08n0lXm.js";class It{constructor(t){T(this,"skeletonData");T(this,"animationToMixTime",{});T(this,"defaultMix",0);if(!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,n){return typeof t=="string"?this.setMix1(t,e,n):this.setMix2(t,e,n)}setMix1(t,e,n){const s=this.skeletonData.findAnimation(t);if(!s)throw new Error(`Animation not found: ${t}`);const i=this.skeletonData.findAnimation(e);if(!i)throw new Error(`Animation not found: ${e}`);this.setMix2(s,i,n)}setMix2(t,e,n){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");const s=`${t.name}.${e.name}`;this.animationToMixTime[s]=n}getMix(t,e){const n=`${t.name}.${e.name}`,s=this.animationToMixTime[n];return s===void 0?this.defaultMix:s}}class Ct{constructor(t,e="",n=new bt,s=new lt){T(this,"textureLoader");T(this,"pathPrefix");T(this,"downloader");T(this,"cache");T(this,"errors",{});T(this,"toLoad",0);T(this,"loaded",0);T(this,"texturePmaInfo",{});this.textureLoader=t,this.pathPrefix=e,this.downloader=n,this.cache=s}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,n){this.toLoad--,this.loaded++,this.cache.assets[e]=n,this.cache.assetsRefCount[e]=(this.cache.assetsRefCount[e]||0)+1,t&&t(e,n)}error(t,e,n){this.toLoad--,this.loaded++,this.errors[e]=n,t&&t(e,n)}loadAll(){return new Promise((e,n)=>{const s=()=>{if(this.isLoadingComplete()){this.hasErrors()?n(this.errors):e(this);return}requestAnimationFrame(s)};requestAnimationFrame(s)})}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadBinary(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load binary ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}loadText(t,e=()=>{},n=()=>{}){t=this.start(t),this.downloader.downloadText(t,s=>{this.success(e,t,s)},(s,i)=>{this.error(n,t,`Couldn't load text ${t}: status ${s}, ${i}`)})}loadJson(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadJson(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load JSON ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}reuseAssets(t,e=()=>{},n=()=>{}){const s=this.cache.getAsset(t),i=s!==void 0;return i&&(this.cache.assetsLoaded[t]=s.then(o=>(o=o instanceof Image||o instanceof ImageBitmap?this.textureLoader(o):o,this.success(e,t,o),o)).catch(o=>{this.error(n,t,o)})),i}loadTexture(t,e=()=>{},n=()=>{}){if(t=this.start(t),this.reuseAssets(t,e,n))return;const s=this.texturePmaInfo[t];this.cache.assetsLoaded[t]=new Promise((i,o)=>{if(!!!(typeof window<"u"&&typeof navigator<"u"&&window.document))fetch(t,{mode:"cors"}).then(c=>{if(c.ok)return c.blob();const a=`Couldn't load image: ${t}`;this.error(n,t,`Couldn't load image: ${t}`),o(a)}).then(c=>c?createImageBitmap(c,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null).then(c=>{if(c){const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)}});else{const c=new Image;c.crossOrigin="anonymous",c.onload=()=>{const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)},c.onerror=()=>{const a=`Couldn't load image: ${t}`;this.error(n,t,a),o(a)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),c.src=t}})}loadTextureAtlas(t,e=()=>{},n=()=>{},s){const i=t.lastIndexOf("/"),o=i>=0?t.substring(0,i+1):"";t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((r,l)=>{this.downloader.downloadText(t,c=>{try{const a=this.createTextureAtlas(c,o,t,s);let h=a.pages.length,m=!1;if(h===0){this.success(e,t,a),r(a);return}for(const y of a.pages)this.loadTexture(this.texturePath(o,y.name,s),(A,u)=>{m||(y.setTexture(u),--h===0&&(this.success(e,t,a),r(a)))},(A,u)=>{if(!m){const g=`Couldn't load texture ${t} page image: ${A}`;this.error(n,t,g),l(g)}m=!0})}catch(a){const h=`Couldn't parse texture atlas ${t}: ${a.message}`;this.error(n,t,h),l(h)}},(c,a)=>{const h=`Couldn't load texture atlas ${t}: status ${c}, ${a}`;this.error(n,t,h),l(h)})}))}loadTextureAtlasButNoTextures(t,e=()=>{},n=()=>{}){const s=t.lastIndexOf("/"),i=s>=0?t.substring(0,s+1):"";t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((o,r)=>{this.downloader.downloadText(t,l=>{try{const c=this.createTextureAtlas(l,i,t);this.success(e,t,c),o(c)}catch(c){const a=`Couldn't parse texture atlas ${t}: ${c.message}`;this.error(n,t,a),r(a)}},(l,c)=>{const a=`Couldn't load texture atlas ${t}: status ${l}, ${c}`;this.error(n,t,a),r(a)})}))}async loadBinaryAsync(t){return new Promise((e,n)=>{this.loadBinary(t,(s,i)=>e(i),(s,i)=>n(i))})}async loadJsonAsync(t){return new Promise((e,n)=>{this.loadJson(t,(s,i)=>e(i),(s,i)=>n(i))})}async loadTextureAsync(t){return new Promise((e,n)=>{this.loadTexture(t,(s,i)=>e(i),(s,i)=>n(i))})}async loadTextureAtlasAsync(t){return new Promise((e,n)=>{this.loadTextureAtlas(t,(s,i)=>e(i),(s,i)=>n(i))})}async loadTextureAtlasButNoTexturesAsync(t){return new Promise((e,n)=>{this.loadTextureAtlasButNoTextures(t,(s,i)=>e(i),(s,i)=>n(i))})}setCache(t){this.cache=t}get(t){return this.cache.assets[this.pathPrefix+t]}require(t){t=this.pathPrefix+t;const e=this.cache.assets[t];if(e)return e;const n=this.errors[t];throw Error(`Asset not found: ${t}${n?` +var ft=Object.defineProperty;var gt=(W,t,e)=>t in W?ft(W,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):W[t]=e;var T=(W,t,e)=>gt(W,typeof t!="symbol"?t+"":t,e);import{f as ht,R as pt,N as dt,ac as ut,Z as mt,b4 as yt,O as rt,b5 as at,U as D,B as Tt}from"./index-CxN-rEmg.js";import{$ as Rt,a0 as Yt,a1 as Ft,a2 as Et,y as _t,a3 as Ot,a4 as kt,a5 as Xt,a6 as Bt,a7 as Nt,a8 as Dt,a9 as $t,aa as zt,ab as Wt,ad as qt,H as Gt,ae as Jt,af as Ht,ag as Zt,ah as Kt,ai as Qt,aj as jt,ak as te,al as ee,am as se,an as ne,ao as ie,ap as oe,aq as re,ar as ae,as as le,at as ce,au as he,av as pe,aw as de,ax as ue,ay as fe,az as ge,aA as me,aB as ye,aC as Te,aD as be,aE as we,aF as xe,aG as Ae,aH as Pe,aI as Ie,aJ as Ce,aK as Ve,aL as Le,aM as Se,aN as Me,aO as ve,aP as Ue,aQ as Re,aR as Ye,aS as Fe,aT as Ee,x as _e,aU as Oe,aV as ke,aW as Xe,aX as Be,aY as Ne,aZ as De,a_ as $e,a$ as ze,b0 as We,b1 as qe,b2 as Ge,b3 as Je,b6 as He,b7 as Ze,b8 as Ke,b9 as Qe,ba as je,bb as ts,bc as es,bd as ss,be as ns,bf as is,bg as os,bh as rs,bi as as,bj as ls,bk as cs,bl as hs,bm as ps,bn as ds,bo as us,bp as fs,bq as gs,br as ms,bs as ys,bt as Ts,bu as bs,w as ws,X as xs,J as As,Y as Ps,z as Is,bv as Cs,bw as Vs,bx as Ls,by as Ss,bz as Ms,bA as vs,bB as Us,bC as Rs,bD as Ys,bE as Fs,bF as Es,bG as _s,T as Os,bH as ks,bI as Xs,b as Bs,bJ as Ns,c as Ds,bK as $s,bL as zs,bM as Ws,bN as qs,bO as Gs,bP as Js,bQ as Hs,bR as Zs,bS as Ks,bT as Qs,bU as js,bV as tn,bW as en,bX as sn,bY as nn,bZ as on,b_ as rn,V as an,b$ as ln,c0 as cn,c1 as hn,c2 as pn,c3 as dn}from"./index-CxN-rEmg.js";class It{constructor(t){T(this,"skeletonData");T(this,"animationToMixTime",{});T(this,"defaultMix",0);if(!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,n){return typeof t=="string"?this.setMix1(t,e,n):this.setMix2(t,e,n)}setMix1(t,e,n){const s=this.skeletonData.findAnimation(t);if(!s)throw new Error(`Animation not found: ${t}`);const i=this.skeletonData.findAnimation(e);if(!i)throw new Error(`Animation not found: ${e}`);this.setMix2(s,i,n)}setMix2(t,e,n){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");const s=`${t.name}.${e.name}`;this.animationToMixTime[s]=n}getMix(t,e){const n=`${t.name}.${e.name}`,s=this.animationToMixTime[n];return s===void 0?this.defaultMix:s}}class Ct{constructor(t,e="",n=new bt,s=new lt){T(this,"textureLoader");T(this,"pathPrefix");T(this,"downloader");T(this,"cache");T(this,"errors",{});T(this,"toLoad",0);T(this,"loaded",0);T(this,"texturePmaInfo",{});this.textureLoader=t,this.pathPrefix=e,this.downloader=n,this.cache=s}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,n){this.toLoad--,this.loaded++,this.cache.assets[e]=n,this.cache.assetsRefCount[e]=(this.cache.assetsRefCount[e]||0)+1,t&&t(e,n)}error(t,e,n){this.toLoad--,this.loaded++,this.errors[e]=n,t&&t(e,n)}loadAll(){return new Promise((e,n)=>{const s=()=>{if(this.isLoadingComplete()){this.hasErrors()?n(this.errors):e(this);return}requestAnimationFrame(s)};requestAnimationFrame(s)})}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadBinary(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load binary ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}loadText(t,e=()=>{},n=()=>{}){t=this.start(t),this.downloader.downloadText(t,s=>{this.success(e,t,s)},(s,i)=>{this.error(n,t,`Couldn't load text ${t}: status ${s}, ${i}`)})}loadJson(t,e=()=>{},n=()=>{}){t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((s,i)=>{this.downloader.downloadJson(t,o=>{this.success(e,t,o),s(o)},(o,r)=>{const l=`Couldn't load JSON ${t}: status ${o}, ${r}`;this.error(n,t,l),i(l)})}))}reuseAssets(t,e=()=>{},n=()=>{}){const s=this.cache.getAsset(t),i=s!==void 0;return i&&(this.cache.assetsLoaded[t]=s.then(o=>(o=o instanceof Image||o instanceof ImageBitmap?this.textureLoader(o):o,this.success(e,t,o),o)).catch(o=>{this.error(n,t,o)})),i}loadTexture(t,e=()=>{},n=()=>{}){if(t=this.start(t),this.reuseAssets(t,e,n))return;const s=this.texturePmaInfo[t];this.cache.assetsLoaded[t]=new Promise((i,o)=>{if(!!!(typeof window<"u"&&typeof navigator<"u"&&window.document))fetch(t,{mode:"cors"}).then(c=>{if(c.ok)return c.blob();const a=`Couldn't load image: ${t}`;this.error(n,t,`Couldn't load image: ${t}`),o(a)}).then(c=>c?createImageBitmap(c,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null).then(c=>{if(c){const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)}});else{const c=new Image;c.crossOrigin="anonymous",c.onload=()=>{const a=this.createTexture(t,s,c);this.success(e,t,a),i(a)},c.onerror=()=>{const a=`Couldn't load image: ${t}`;this.error(n,t,a),o(a)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),c.src=t}})}loadTextureAtlas(t,e=()=>{},n=()=>{},s){const i=t.lastIndexOf("/"),o=i>=0?t.substring(0,i+1):"";t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((r,l)=>{this.downloader.downloadText(t,c=>{try{const a=this.createTextureAtlas(c,o,t,s);let h=a.pages.length,m=!1;if(h===0){this.success(e,t,a),r(a);return}for(const y of a.pages)this.loadTexture(this.texturePath(o,y.name,s),(A,u)=>{m||(y.setTexture(u),--h===0&&(this.success(e,t,a),r(a)))},(A,u)=>{if(!m){const g=`Couldn't load texture ${t} page image: ${A}`;this.error(n,t,g),l(g)}m=!0})}catch(a){const h=`Couldn't parse texture atlas ${t}: ${a.message}`;this.error(n,t,h),l(h)}},(c,a)=>{const h=`Couldn't load texture atlas ${t}: status ${c}, ${a}`;this.error(n,t,h),l(h)})}))}loadTextureAtlasButNoTextures(t,e=()=>{},n=()=>{}){const s=t.lastIndexOf("/"),i=s>=0?t.substring(0,s+1):"";t=this.start(t),!this.reuseAssets(t,e,n)&&(this.cache.assetsLoaded[t]=new Promise((o,r)=>{this.downloader.downloadText(t,l=>{try{const c=this.createTextureAtlas(l,i,t);this.success(e,t,c),o(c)}catch(c){const a=`Couldn't parse texture atlas ${t}: ${c.message}`;this.error(n,t,a),r(a)}},(l,c)=>{const a=`Couldn't load texture atlas ${t}: status ${l}, ${c}`;this.error(n,t,a),r(a)})}))}async loadBinaryAsync(t){return new Promise((e,n)=>{this.loadBinary(t,(s,i)=>e(i),(s,i)=>n(i))})}async loadJsonAsync(t){return new Promise((e,n)=>{this.loadJson(t,(s,i)=>e(i),(s,i)=>n(i))})}async loadTextureAsync(t){return new Promise((e,n)=>{this.loadTexture(t,(s,i)=>e(i),(s,i)=>n(i))})}async loadTextureAtlasAsync(t){return new Promise((e,n)=>{this.loadTextureAtlas(t,(s,i)=>e(i),(s,i)=>n(i))})}async loadTextureAtlasButNoTexturesAsync(t){return new Promise((e,n)=>{this.loadTextureAtlasButNoTextures(t,(s,i)=>e(i),(s,i)=>n(i))})}setCache(t){this.cache=t}get(t){return this.cache.assets[this.pathPrefix+t]}require(t){t=this.pathPrefix+t;const e=this.cache.assets[t];if(e)return e;const n=this.errors[t];throw Error(`Asset not found: ${t}${n?` ${n}`:""}`)}remove(t){t=this.pathPrefix+t;const e=this.cache.assets[t];return e.dispose&&e.dispose(),delete this.cache.assets[t],delete this.cache.assetsRefCount[t],delete this.cache.assetsLoaded[t],e}removeAll(){for(const t in this.cache.assets){const e=this.cache.assets[t];e.dispose&&e.dispose()}this.cache.assets={},this.cache.assetsLoaded={},this.cache.assetsRefCount={}}isLoadingComplete(){return this.toLoad===0}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}disposeAsset(t){const e=this.cache.assets[t];if(e instanceof ht){e.dispose();return}this.disposeAssetInternal(t)}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}disposeAssetInternal(t){if(this.cache.assetsRefCount[t]>0&&--this.cache.assetsRefCount[t]===0)return this.remove(t)}createTextureAtlas(t,e,n,s){const i=new ht(t);i.dispose=()=>{var o;if(!(this.cache.assetsRefCount[n]<=0)){this.disposeAssetInternal(n);for(const r of i.pages)(o=r.texture)==null||o.dispose()}};for(const o of i.pages){const r=this.texturePath(e,o.name,s);this.texturePmaInfo[this.pathPrefix+r]=o.pma}return i}createTexture(t,e,n){const s=this.textureLoader(n,e),i=s.dispose.bind(s);return s.dispose=()=>{this.disposeAssetInternal(t)&&i()},s}texturePath(t,e,n){return n?n[e]:t+e}}const nt=class nt{constructor(){T(this,"assets",{});T(this,"assetsRefCount",{});T(this,"assetsLoaded",{})}static getCache(t){const e=nt.AVAILABLE_CACHES.get(t);if(e)return e;const n=new nt;return nt.AVAILABLE_CACHES.set(t,n),n}async addAsset(t,e){return this.assetsLoaded[t]=Promise.resolve(e),this.assets[t]=e,e}getAsset(t){return this.assetsLoaded[t]}};T(nt,"AVAILABLE_CACHES",new Map);let lt=nt;class bt{constructor(){T(this,"callbacks",{});T(this,"rawDataUris",{})}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return e!==-1?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){var e=window.atob(t),n=e.length,s=new Uint8Array(n);for(let i=0;i{this.finish(t,i.status,i.responseText)};i.onload=o,i.onerror=o,i.send()}downloadJson(t,e,n){this.downloadText(t,s=>{e(JSON.parse(s))},n)}downloadBinary(t,e,n){if(this.start(t,e,n))return;const s=this.rawDataUris[t];if(s&&!s.includes(".")){try{this.finish(t,200,this.dataUriToUint8Array(s))}catch(r){this.finish(t,400,JSON.stringify(r))}return}const i=new XMLHttpRequest;i.open("GET",s||t,!0),i.responseType="arraybuffer";const o=()=>{this.finish(t,i.status,i.response)};i.onload=()=>{i.status===200||i.status===0?this.finish(t,200,new Uint8Array(i.response)):o()},i.onerror=o,i.send()}start(t,e,n){let s=this.callbacks[t];try{if(s)return!0;this.callbacks[t]=s=[]}finally{s.push(e,n)}}finish(t,e,n){const s=this.callbacks[t];if(delete this.callbacks[t],e===200||e===0)for(let i=0,o=s.length;iD.newFloatArray(16)))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");const n=this.boundingBoxes,s=this.polygons,i=this.polygonPool,o=t.slots,r=o.length;n.length=0,i.freeAll(s),s.length=0;for(let l=0;l=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}aabbIntersectsSegment(t,e,n,s){const i=this.minX,o=this.minY,r=this.maxX,l=this.maxY;if(t<=i&&n<=i||e<=o&&s<=o||t>=r&&n>=r||e>=l&&s>=l)return!1;const c=(s-e)/(n-t);let a=c*(i-t)+e;if(a>o&&ao&&ai&&hi&&ht.minX&&this.minYt.minY}containsPoint(t,e){const n=this.polygons;for(let s=0,i=n.length;s=n||a=n){const h=s[l];h+(n-c)/(a-c)*(s[o]-h)=h&&f<=A||f>=A&&f<=h)&&(f>=e&&f<=s||f>=s&&f<=e)){const x=(a*L-c*g)/C;if((x>=m&&x<=u||x>=u&&x<=m)&&(x>=n&&x<=i||x>=i&&x<=n))return!0}h=A,m=u}return!1}getPolygon(t){if(!t)throw new Error("boundingBox cannot be null.");const e=this.boundingBoxes.indexOf(t);return e===-1?null:this.polygons[e]}getWidth(){return this.maxX-this.minX}getHeight(){return this.maxY-this.minY}}class z{constructor(){T(this,"convexPolygons",[]);T(this,"convexPolygonsIndices",[]);T(this,"indicesArray",[]);T(this,"isConcaveArray",[]);T(this,"triangles",[]);T(this,"polygonPool",new at(()=>[]));T(this,"polygonIndicesPool",new at(()=>[]))}triangulate(t){const e=t;let n=t.length>>1;const s=this.indicesArray;s.length=0;for(let r=0;r3;){let r=n-1,l=0,c=1;for(;;){t:if(!i[l]){const m=s[r]<<1,y=s[l]<<1,A=s[c]<<1,u=e[m],g=e[m+1],b=e[y],L=e[y+1],C=e[A],f=e[A+1];for(let x=c+10);r=l>0?l-1:n-1,c=l+10?l-1:n-1,h=l0&&(s.push(r),i.push(o),r=this.polygonPool.obtain(),o=this.polygonIndicesPool.obtain()),r.length=0,r.push(u,g,b,L),r.push(C,f),o.length=0,o.push(m,y,A),c=z.winding(u,g,b,L,C,f),l=m}r.length>0&&(s.push(r),i.push(o));for(let a=0,h=s.length;a=0;a--)r=s[a],r.length===0?(s.splice(a,1),this.polygonPool.free(r),o=i[a],i.splice(a,1),this.polygonIndicesPool.free(o)):r.push(r[0],r[1]);return s}static isConcave(t,e,n,s){const i=s[t>0?t-1:e-1]<<1,o=s[t]<<1,r=s[t+1=0}static winding(t,e,n,s,i,o){return t*(o-s)+n*(e-o)+i*(s-e)>=0?1:-1}}class wt{constructor(){T(this,"triangulator",null);T(this,"clippingPolygon",[]);T(this,"clippingPolygons",[]);T(this,"clipOutput",[]);T(this,"clippedVertices",[]);T(this,"clippedUVs",[]);T(this,"clippedTriangles",[]);T(this,"inverseVertices",[]);T(this,"_clippedVerticesTyped",new Float32Array(1024));T(this,"_clippedUVsTyped",new Float32Array(1024));T(this,"_clippedTrianglesTyped",new Uint16Array(1024));T(this,"clippedVerticesTyped",new Float32Array(0));T(this,"clippedUVsTyped",new Float32Array(0));T(this,"clippedTrianglesTyped",new Uint16Array(0));T(this,"clippedVerticesLength",0);T(this,"clippedUVsLength",0);T(this,"clippedTrianglesLength",0);T(this,"scratch",[]);T(this,"inverse",!1);T(this,"clipAttachment",null)}clipStart(t,e,n){if(this.clipAttachment)return;const s=n.worldVerticesLength;this.clipAttachment=n,this.inverse=n.inverse;const i=D.setArraySize(this.clippingPolygon,s);n.computeWorldVertices(t,e,0,s,i,0,2);const o=this.clippingPolygon,r=this.makeClockwise(o);r||this.inverse||n.convex?(r||this.makeConvex(o),this.clippingPolygon.push(o[0],o[1]),this.clippingPolygons.push(o)):(this.triangulator===null&&(this.triangulator=new z),this.clippingPolygons.push(...this.triangulator.decompose(o,this.triangulator.triangulate(o))))}clipEnd(t){this.clipAttachment&&(t&&this.clipAttachment.endSlot!==t.data||(this.clipAttachment=null,this.clippingPolygons.length=0))}isClipping(){return this.clipAttachment!=null}clipTriangles(t,e,n,s,i,o,r,l){return s&&i&&o&&typeof r=="boolean"&&typeof l=="number"?this.clipTrianglesRender(t,e,n,s,i,o,r,l):this.clipTrianglesNoRender(t,e,n)}clipTrianglesNoRender(t,e,n){const s=this.clippedVertices;s.length=0;const i=this.clippedTriangles;i.length=0;let o=0;if(this.inverse){const h=this.clippingPolygons[0];for(let m=0;m>1,I=s.length;const R=D.setArraySize(s,I+P);D.arrayCopy(f,x,R,I,P),I=i.length;const v=D.setArraySize(i,I+3*(M-2));for(let V=1;V>1;const P=D.setArraySize(s,f+x);D.arrayCopy(a,0,P,f,x),f=i.length;const M=D.setArraySize(i,f+3*(S-2));S--;for(let I=1;I>1;let F=c.length;const N=D.setArraySize(c,F+G*l);for(let X=0;X>1;q===0&&(U=P-v,O=R-S,B=L-R,K=v-C,q=1/(U*B-O*K));const E=D.setArraySize(c,d+_*l);for(let Y=0;Y>1;let Y=this.clippedVerticesLength;const G=Y+k*o,F=this.clippedUVsLength+k*2;r.length>1;J===0&&(O=M-V,B=v-P,K=L-v,q=V-C,J=1/(O*K-B*q));const k=p+E*o;r.length=2?(a=this.clipOutput,h=this.scratch):(a=this.scratch,h=this.clipOutput);const m=r;a.length=8;const y=a;y[0]=t,y[1]=e,y[2]=n,y[3]=s,y[4]=i,y[5]=o,y[6]=t,y[7]=e,h.length=0;const A=r.length-4;for(let u=0;;u+=2){const g=m[u],b=m[u+1],L=g-m[u+2],C=b-m[u+3],f=h.length,x=a;t=x[0],e=x[1];let S=C*(g-t)-L*(b-e);for(let M=2,I=a.length-2;M<=I;M+=2){n=x[M],s=x[M+1];const R=C*(g-n)-L*(b-s);if(S>0)if(R>0)h.push(n,s);else{const v=n-t,V=s-e,w=S/(v*C-V*L);w>=0&&w<=1?(h.push(t+v*w,e+V*w),c=!0):h.push(n,s)}else if(R>0){const v=n-t,V=s-e,w=S/(v*C-V*L);w>=0&&w<=1?(h.push(t+v*w,e+V*w,n,s),c=!0):h.push(n,s)}else c=!0;t=n,e=s,S=R}if(f===h.length)return l.length=0,!0;if(h.push(h[0],h[1]),u===A)break;const P=h;h=a,h.length=0,a=P}if(l!==h){l.length=0;for(let u=0,g=h.length-2;u=2?(c=this.clipOutput,a=this.scratch):(c=this.scratch,a=this.clipOutput),c.length=8;let h=r,m=c;m[0]=t,m[1]=e,m[2]=n,m[3]=s,m[4]=i,m[5]=o,m[6]=t,m[7]=e,a.length=0;for(let y=0;;y+=2){const A=h[y],u=h[y+1],g=A-h[y+2],b=u-h[y+3],L=a.length,C=this.inverseVertices.length;this.inverseVertices.push(0),m=c,t=m[0],e=m[1];let f=b*(A-t)-g*(u-e);for(let P=2,M=c.length-2;P<=M;P+=2){n=m[P],s=m[P+1];const I=b*(A-n)-g*(u-s);if(f>0)if(I>0)a.push(n,s);else{const R=n-t,v=s-e,V=f/(R*b-v*g);if(V>=0&&V<=1){const w=t+R*V,U=e+v*V;a.push(w,U),this.inverseVertices.push(w,U,n,s)}else a.push(n,s)}else if(I>0){const R=n-t,v=s-e,V=f/(R*b-v*g);if(V>=0&&V<=1){const w=t+R*V,U=e+v*V;this.inverseVertices.push(w,U),a.push(w,U,n,s)}else a.push(n,s)}else this.inverseVertices.push(n,s);t=n,e=s,f=I}const x=this.inverseVertices.length-C-1;if(x>=6?this.inverseVertices[C]=x:this.inverseVertices.length=C,L===a.length||(a.push(a[0],a[1]),y===l))break;const S=a;a=c,a.length=0,c=S}}makeClockwise(t){const e=t,n=t.length;let s=!0,i=!0,o=0,r=e[n-2],l=e[n-1],c=e[0],a=e[1];for(let m=2;m=0,r=c,l=a,c=y,a=A}o+=c*e[1]-e[0]*a;const h=(c-r)*(e[1]-a)-(a-l)*(e[0]-c);if(i=i&&h<=0,s=s&&h>=0,o>=0){for(let m=0,y=n-2,A=n>>1;m=0&&(s[a]>l||s[a]===l&&s[a+1]>c);a-=2)s[a+2]=s[a],s[a+3]=s[a+1];s[a+2]=l,s[a+3]=c}n[0]=s[0],n[1]=s[1],n[2]=s[2],n[3]=s[3];let i=4;for(let r=4;r=0&&(i-=2,i!==2););n[i]=l,n[i+1]=c}n[i]=s[e-4],n[i+1]=s[e-3];const o=i;i+=2;for(let r=e-6;r>=0;r-=2,i+=2){const l=s[r],c=s[r+1];for(;(n[i-2]-n[i-4])*(c-n[i-3])-(n[i-1]-n[i-3])*(l-n[i-4])>=0&&(i-=2,i!==o););n[i]=l,n[i+1]=c}t.length=i-2}}class St{constructor(t,e,n={}){T(this,"skeleton");T(this,"adapter");T(this,"positionInheritanceFactorX",0);T(this,"positionInheritanceFactorY",0);T(this,"rotationInheritanceFactor",0);T(this,"hasLastTransform",!1);T(this,"lastX",0);T(this,"lastY",0);T(this,"lastZ",0);T(this,"lastRotation",0);T(this,"currentTransform",{x:0,y:0,z:0,rotation:0});T(this,"currentPosition",{x:0,y:0,z:0});T(this,"lastPosition",{x:0,y:0,z:0});this.skeleton=t,this.adapter=e,this.positionInheritanceFactorX=n.positionInheritanceX??0,this.positionInheritanceFactorY=n.positionInheritanceY??0,this.rotationInheritanceFactor=n.rotationInheritance??0}get positionInheritanceX(){return this.positionInheritanceFactorX}get positionInheritanceY(){return this.positionInheritanceFactorY}setPositionInheritance(t,e){const n=this.positionInheritanceFactorX===0&&this.positionInheritanceFactorY===0,s=t!==0||e!==0;this.positionInheritanceFactorX=t,this.positionInheritanceFactorY=e,n&&s&&this.resetPosition()}get rotationInheritance(){return this.rotationInheritanceFactor}set rotationInheritance(t){const e=this.rotationInheritanceFactor===0;this.rotationInheritanceFactor=t,e&&t!==0&&this.resetRotation()}resetPosition(){const t=this.currentTransform,e=!this.hasLastTransform&&this.rotationInheritanceFactor!==0;this.adapter.readTransform(t,e),this.lastX=t.x,this.lastY=t.y,this.lastZ=t.z,e&&(this.lastRotation=t.rotation),this.hasLastTransform=!0}resetRotation(){const t=this.currentTransform;this.adapter.readTransform(t,!0),this.lastRotation=t.rotation,this.hasLastTransform||(this.lastX=t.x,this.lastY=t.y,this.lastZ=t.z),this.hasLastTransform=!0}resetTransform(){const t=this.currentTransform;this.adapter.readTransform(t,!0),this.setLastTransform(t.x,t.y,t.z,t.rotation)}applyTransformMovement(){const t=this.positionInheritanceFactorX!==0||this.positionInheritanceFactorY!==0,e=this.rotationInheritanceFactor!==0;if(!t&&!e)return;const n=this.currentTransform;this.adapter.readTransform(n,e);const{x:s,y:i,z:o}=n,r=e?n.rotation:this.lastRotation,l=s!==this.lastX||i!==this.lastY||o!==this.lastZ;if(this.hasLastTransform){if(!l&&r===this.lastRotation)return;t&&l&&this.applyPositionMovement(s,i,o),e&&r!==this.lastRotation&&this.applyRotationMovement(r)}this.setLastTransform(s,i,o,r)}applyPositionMovement(t,e,n){const s=this.currentPosition;s.x=t,s.y=e,s.z=n,this.adapter.worldToSkeleton(s);const i=this.lastPosition;i.x=this.lastX,i.y=this.lastY,i.z=this.lastZ,this.adapter.worldToSkeleton(i),this.skeleton.physicsTranslate((s.x-i.x)*this.positionInheritanceFactorX,(s.y-i.y)*this.positionInheritanceFactorY)}applyRotationMovement(t){const e=this.rotationInheritanceFactor;e!==0&&this.skeleton.physicsRotate(0,0,this.getRotationDelta(t,this.lastRotation)*e)}setLastTransform(t,e,n,s){this.lastX=t,this.lastY=e,this.lastZ=n,this.lastRotation=s,this.hasLastTransform=!0}getRotationDelta(t,e){let n=t-e;return n=(n+180)%360-180,n<-180?n+360:n}}class Mt{constructor(){T(this,"commandPool",new xt);T(this,"worldVertices",new Float32Array(12*1024));T(this,"quadIndices",new Uint16Array([0,1,2,2,3,0]));T(this,"clipping",new wt);T(this,"renderCommands",[])}render(t,e=!1,n,s=2,i=0){var c,a;this.commandPool.reset(),this.renderCommands.length=0;const o=this.clipping;let r=0;const l=t.drawOrder.appliedPose;for(let h=0,m=l.length;h>1;const w=u.sequence,U=w.resolveIndex(A);f=w.getUVs(U),x=u.triangles,S=x.length,M=(a=w.regions[U])==null?void 0:a.texture}else if(u instanceof rt){o.clipEnd(y),o.clipStart(t,y,u);continue}else{o.clipEnd(y);continue}if(!M){o.clipEnd(y);continue}const I=t.color;let R,v;if(e){let w;if(n){w=Math.floor(n[3]*I.a*g.a*P.a*255);const U=Math.floor(w*n[0]*I.r*g.r*P.r),O=Math.floor(w*n[1]*I.g*g.g*P.g),B=Math.floor(w*n[2]*I.b*g.b*P.b);R=w<<24|U<<16|O<<8|B}else{w=Math.floor(I.a*g.a*P.a*255);const U=Math.floor(w*I.r*g.r*P.r),O=Math.floor(w*I.g*g.g*P.g),B=Math.floor(w*I.b*g.b*P.b);R=w<<24|U<<16|O<<8|B}if(v=4278190080,A.darkColor){const{r:U,g:O,b:B}=A.darkColor;v=4278190080|Math.floor(U*w)<<16|Math.floor(O*w)<<8|Math.floor(B*w)}}else{if(n){const w=Math.floor(n[3]*I.a*g.a*P.a*255),U=Math.floor(n[0]*I.r*g.r*P.r*255),O=Math.floor(n[1]*I.g*g.g*P.g*255),B=Math.floor(n[2]*I.b*g.b*P.b*255);R=w<<24|U<<16|O<<8|B}else{const w=Math.floor(I.a*g.a*P.a*255),U=Math.floor(I.r*g.r*P.r*255),O=Math.floor(I.g*g.g*P.g*255),B=Math.floor(I.b*g.b*P.b*255);R=w<<24|U<<16|O<<8|B}if(v=0,A.darkColor){const{r:w,g:U,b:O}=A.darkColor;v=Math.floor(w*255)<<16|Math.floor(U*255)<<8|Math.floor(O*255)}}o.isClipping()&&(o.clipTrianglesUnpacked(L,0,x,S,f,s),L=o.clippedVerticesTyped,C=o.clippedVerticesLength/s,f=o.clippedUVsTyped,x=o.clippedTrianglesTyped,S=o.clippedTrianglesLength);const V=this.commandPool.getCommand(C,S,s);if(V.blendMode=y.data.blendMode,V.texture=M,V.positions.set(L.subarray(0,C*s)),s>=3)for(let w=2,U=C*s;w=t*n&&i._indices.length>=e){s=i;break}if(s)this.pool.splice(this.pool.indexOf(s),1),s.next=void 0,s.numVertices=t,s.numIndices=e,s.positions=s._positions.subarray(0,t*n),s.uvs=s._uvs.subarray(0,t<<1),s.colors=s._colors.subarray(0,t),s.darkColors=s._darkColors.subarray(0,t),s.indices=s._indices.subarray(0,e);else{const i=new Float32Array(t*n),o=new Float32Array(t<<1),r=new Uint32Array(t),l=new Uint32Array(t),c=new Uint16Array(e);s={positions:i,uvs:o,colors:r,darkColors:l,indices:c,_positions:i,_uvs:o,_colors:r,_darkColors:l,_indices:c,numVertices:t,numIndices:e,blendMode:Tt.Normal,texture:null}}return this.inUse.push(s),s}reset(){this.pool.push(...this.inUse),this.inUse.length=0}}export{Rt as ATTACH_RETAIN,Yt as ATTACH_SETUP,Ft as AlphaTimeline,Et as Animation,_t as AnimationState,Ot as AnimationStateAdapter,It as AnimationStateData,lt as AssetCache,Ct as AssetManagerBase,Vt as AtlasAttachmentLoader,kt as Attachment,Xt as AttachmentTimeline,Bt as BinaryInput,Tt as BlendMode,Nt as Bone,Dt as BoneData,$t as BonePose,zt as BoneTimeline1,Wt as BoneTimeline2,ut as BoundingBoxAttachment,qt as CURRENT,rt as ClippingAttachment,Gt as Color,Jt as Constraint,Ht as ConstraintData,Zt as ConstraintTimeline1,Kt as CurveTimeline,Qt as CurveTimeline1,jt as DebugUtils,te as DeformTimeline,bt as Downloader,ee as DrawOrder,se as DrawOrderFolderTimeline,ne as DrawOrderTimeline,ie as Event,oe as EventData,re as EventQueue,ae as EventTimeline,le as EventType,ce as FIRST,he as FakeTexture,pe as FromProperty,de as FromRotate,ue as FromScaleX,fe as FromScaleY,ge as FromShearY,me as FromX,ye as FromY,Te as HOLD,be as IkConstraint,we as IkConstraintData,xe as IkConstraintPose,Ae as IkConstraintTimeline,Pe as Inherit,Ie as InheritTimeline,Ce as IntSet,Ve as Interpolation,Le as MODE,Se as MathUtils,dt as MeshAttachment,Me as MixFrom,mt as PathAttachment,ve as PathConstraint,Ue as PathConstraintData,Re as PathConstraintMixTimeline,Ye as PathConstraintPose,Fe as PathConstraintPositionTimeline,Ee as PathConstraintSpacingTimeline,_e as Physics,Oe as PhysicsConstraint,ke as PhysicsConstraintDampingTimeline,Xe as PhysicsConstraintData,Be as PhysicsConstraintGravityTimeline,Ne as PhysicsConstraintInertiaTimeline,De as PhysicsConstraintMassTimeline,$e as PhysicsConstraintMixTimeline,ze as PhysicsConstraintPose,We as PhysicsConstraintResetTimeline,qe as PhysicsConstraintStrengthTimeline,Ge as PhysicsConstraintTimeline,Je as PhysicsConstraintWindTimeline,yt as PointAttachment,at as Pool,He as Posed,Ze as PosedActive,Ke as PosedData,Qe as PositionMode,je as Pow,ts as PowOut,es as Property,ss as RGB2Timeline,ns as RGBA2Timeline,is as RGBATimeline,os as RGBTimeline,pt as RegionAttachment,rs as RotateMode,as as RotateTimeline,ls as SETUP,cs as ScaleTimeline,hs as ScaleXTimeline,ps as ScaleYMode,ds as ScaleYTimeline,us as Sequence,fs as SequenceMode,gs as SequenceModeValues,ms as SequenceTimeline,ys as ShearTimeline,Ts as ShearXTimeline,bs as ShearYTimeline,ws as Skeleton,xs as SkeletonBinary,Lt as SkeletonBounds,wt as SkeletonClipping,As as SkeletonData,Ps as SkeletonJson,St as SkeletonPhysicsMovement,Mt as SkeletonRendererCore,Is as Skin,Cs as SkinEntry,Vs as Slider,Ls as SliderData,Ss as SliderMixTimeline,Ms as SliderPose,vs as SliderTimeline,Us as Slot,Rs as SlotCurveTimeline,Ys as SlotData,Fs as SlotPose,Es as SpacingMode,_s as StringSet,Os as Texture,ht as TextureAtlas,ks as TextureAtlasPage,Xs as TextureAtlasRegion,Bs as TextureFilter,Ns as TextureRegion,Ds as TextureWrap,$s as TimeKeeper,zs as Timeline,Ws as ToProperty,qs as ToRotate,Gs as ToScaleX,Js as ToScaleY,Hs as ToShearY,Zs as ToX,Ks as ToY,Qs as TrackEntry,js as TransformConstraint,tn as TransformConstraintData,en as TransformConstraintPose,sn as TransformConstraintTimeline,nn as TranslateTimeline,on as TranslateXTimeline,rn as TranslateYTimeline,z as Triangulator,D as Utils,an as Vector2,ln as VertexAttachment,cn as WindowedMean,hn as isBoneTimeline,pn as isConstraintTimeline,dn as isSlotTimeline}; diff --git a/dist/assets/index-D08n0lXm.js b/dist/assets/index-CxN-rEmg.js similarity index 65% rename from dist/assets/index-D08n0lXm.js rename to dist/assets/index-CxN-rEmg.js index d66a5d2..9c2be1d 100644 --- a/dist/assets/index-D08n0lXm.js +++ b/dist/assets/index-CxN-rEmg.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B1oGFzi8.js","assets/index-BUbc0qUx.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-hYCzV0U1.js","assets/index-Cr68vmVa.js"])))=>i.map(i=>d[i]); var ES=Object.defineProperty;var CS=(s,e,t)=>e in s?ES(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var x=(s,e,t)=>CS(s,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=t(n);fetch(n.href,r)}})();/** * @vue/shared v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -7,37 +7,37 @@ var ES=Object.defineProperty;var CS=(s,e,t)=>e in s?ES(s,e,{enumerable:!0,config * @vue/reactivity v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Pi;class Cy{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&Pi&&(Pi.active?(this.parent=Pi,this.index=(Pi.scopes||(Pi.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){const i=this.scopes.slice();for(e=0,t=i.length;e0&&--this._on===0){if(Pi===this)Pi=this.prevScope;else{let e=Pi;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t0)return;if(ul){let e=ul;for(ul=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let s;for(;hl;){let e=hl;for(hl=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){s||(s=i)}e=t}}if(s)throw s}function Oy(s){for(let e=s.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function By(s){let e,t=s.depsTail,i=t;for(;i;){const n=i.prevDep;i.version===-1?(i===t&&(t=n),ep(i),YS(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}s.deps=e,s.depsTail=t}function If(s){for(let e=s.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Ly(e.dep.computed)||e.dep.version!==e.version))return!0;return!!s._dirty}function Ly(s){if(s.flags&4&&!(s.flags&16)||(s.flags&=-17,s.globalVersion===_l)||(s.globalVersion=_l,!s.isSSR&&s.flags&128&&(!s.deps&&!s._dirty||!If(s))))return;s.flags|=2;const e=s.dep,t=ai,i=rn;ai=s,rn=!0;try{Oy(s);const n=s.fn(s._value);(e.version===0||In(n,s._value))&&(s.flags|=128,s._value=n,e.version++)}catch(n){throw e.version++,n}finally{ai=t,rn=i,By(s),s.flags&=-3}}function ep(s,e=!1){const{dep:t,prevSub:i,nextSub:n}=s;if(i&&(i.nextSub=n,s.prevSub=void 0),n&&(n.prevSub=i,s.nextSub=void 0),t.subs===s&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)ep(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function YS(s){const{prevDep:e,nextDep:t}=s;e&&(e.nextDep=t,s.prevDep=void 0),t&&(t.prevDep=e,s.nextDep=void 0)}let rn=!0;const Dy=[];function dr(){Dy.push(rn),rn=!1}function fr(){const s=Dy.pop();rn=s===void 0?!0:s}function Gp(s){const{cleanup:e}=s;if(s.cleanup=void 0,e){const t=ai;ai=void 0;try{e()}finally{ai=t}}}let _l=0;class $S{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class tp{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!ai||!rn||ai===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==ai)t=this.activeLink=new $S(ai,this),ai.deps?(t.prevDep=ai.depsTail,ai.depsTail.nextDep=t,ai.depsTail=t):ai.deps=ai.depsTail=t,Ny(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=ai.depsTail,t.nextDep=void 0,ai.depsTail.nextDep=t,ai.depsTail=t,ai.deps===t&&(ai.deps=i)}return t}trigger(e){this.version++,_l++,this.notify(e)}notify(e){Jm();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{Qm()}}}function Ny(s){if(s.dep.sc++,s.sub.flags&4){const e=s.dep.computed;if(e&&!s.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Ny(i)}const t=s.dep.subs;t!==s&&(s.prevSub=t,t&&(t.nextSub=s)),s.dep.subs=s}}const ih=new WeakMap,Ta=Symbol(""),Rf=Symbol(""),Tl=Symbol("");function Qi(s,e,t){if(rn&&ai){let i=ih.get(s);i||ih.set(s,i=new Map);let n=i.get(t);n||(i.set(t,n=new tp),n.map=i,n.key=t),n.track()}}function Qn(s,e,t,i,n,r){const a=ih.get(s);if(!a){_l++;return}const o=h=>{h&&h.trigger()};if(Jm(),e==="clear")a.forEach(o);else{const h=ft(s),l=h&&tu(t);if(h&&t==="length"){const c=Number(i);a.forEach((u,d)=>{(d==="length"||d===Tl||!Cs(d)&&d>=c)&&o(u)})}else switch((t!==void 0||a.has(void 0))&&o(a.get(t)),l&&o(a.get(Tl)),e){case"add":h?l&&o(a.get("length")):(o(a.get(Ta)),mo(s)&&o(a.get(Rf)));break;case"delete":h||(o(a.get(Ta)),mo(s)&&o(a.get(Rf)));break;case"set":mo(s)&&o(a.get(Ta));break}}Qm()}function GS(s,e){const t=ih.get(s);return t&&t.get(e)}function ja(s){const e=$t(s);return e===s?e:(Qi(e,"iterate",Tl),Es(s)?e:e.map(hn))}function ru(s){return Qi(s=$t(s),"iterate",Tl),s}function An(s,e){return mr(s)?Ao(cr(s)?hn(e):e):hn(e)}const HS={__proto__:null,[Symbol.iterator](){return Du(this,Symbol.iterator,s=>An(this,s))},concat(...s){return ja(this).concat(...s.map(e=>ft(e)?ja(e):e))},entries(){return Du(this,"entries",s=>(s[1]=An(this,s[1]),s))},every(s,e){return Yn(this,"every",s,e,void 0,arguments)},filter(s,e){return Yn(this,"filter",s,e,t=>t.map(i=>An(this,i)),arguments)},find(s,e){return Yn(this,"find",s,e,t=>An(this,t),arguments)},findIndex(s,e){return Yn(this,"findIndex",s,e,void 0,arguments)},findLast(s,e){return Yn(this,"findLast",s,e,t=>An(this,t),arguments)},findLastIndex(s,e){return Yn(this,"findLastIndex",s,e,void 0,arguments)},forEach(s,e){return Yn(this,"forEach",s,e,void 0,arguments)},includes(...s){return Nu(this,"includes",s)},indexOf(...s){return Nu(this,"indexOf",s)},join(s){return ja(this).join(s)},lastIndexOf(...s){return Nu(this,"lastIndexOf",s)},map(s,e){return Yn(this,"map",s,e,void 0,arguments)},pop(){return Yo(this,"pop")},push(...s){return Yo(this,"push",s)},reduce(s,...e){return Hp(this,"reduce",s,e)},reduceRight(s,...e){return Hp(this,"reduceRight",s,e)},shift(){return Yo(this,"shift")},some(s,e){return Yn(this,"some",s,e,void 0,arguments)},splice(...s){return Yo(this,"splice",s)},toReversed(){return ja(this).toReversed()},toSorted(s){return ja(this).toSorted(s)},toSpliced(...s){return ja(this).toSpliced(...s)},unshift(...s){return Yo(this,"unshift",s)},values(){return Du(this,"values",s=>An(this,s))}};function Du(s,e,t){const i=ru(s),n=i[e]();return i!==s&&!Es(s)&&(n._next=n.next,n.next=()=>{const r=n._next();return r.done||(r.value=t(r.value)),r}),n}const jS=Array.prototype;function Yn(s,e,t,i,n,r){const a=ru(s),o=a!==s&&!Es(s),h=a[e];if(h!==jS[e]){const u=h.apply(s,r);return o?hn(u):u}let l=t;a!==s&&(o?l=function(u,d){return t.call(this,An(s,u),d,s)}:t.length>2&&(l=function(u,d){return t.call(this,u,d,s)}));const c=h.call(a,l,i);return o&&n?n(c):c}function Hp(s,e,t,i){const n=ru(s),r=n!==s&&!Es(s);let a=t,o=!1;n!==s&&(r?(o=i.length===0,a=function(l,c,u){return o&&(o=!1,l=An(s,l)),t.call(this,l,An(s,c),u,s)}):t.length>3&&(a=function(l,c,u){return t.call(this,l,c,u,s)}));const h=n[e](a,...i);return o?An(s,h):h}function Nu(s,e,t){const i=$t(s);Qi(i,"iterate",Tl);const n=i[e](...t);return(n===-1||n===!1)&&au(t[0])?(t[0]=$t(t[0]),i[e](...t)):n}function Yo(s,e,t=[]){dr(),Jm();const i=$t(s)[e].apply(s,t);return Qm(),fr(),i}const WS=qm("__proto__,__v_isRef,__isVue"),Uy=new Set(Object.getOwnPropertyNames(Symbol).filter(s=>s!=="arguments"&&s!=="caller").map(s=>Symbol[s]).filter(Cs));function zS(s){Cs(s)||(s=String(s));const e=$t(this);return Qi(e,"has",s),e.hasOwnProperty(s)}class Xy{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const n=this._isReadonly,r=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return r;if(t==="__v_raw")return i===(n?r?nM:Gy:r?$y:Yy).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const a=ft(e);if(!n){let h;if(a&&(h=HS[t]))return h;if(t==="hasOwnProperty")return zS}const o=Reflect.get(e,t,Si(e)?e:i);if((Cs(t)?Uy.has(t):WS(t))||(n||Qi(e,"get",t),r))return o;if(Si(o)){const h=a&&tu(t)?o:o.value;return n&&qt(h)?kf(h):h}return qt(o)?n?kf(o):Da(o):o}}class Vy extends Xy{constructor(e=!1){super(!1,e)}set(e,t,i,n){let r=e[t];const a=ft(e)&&tu(t);if(!this._isShallow){const l=mr(r);if(!Es(i)&&!mr(i)&&(r=$t(r),i=$t(i)),!a&&Si(r)&&!Si(i))return l||(r.value=i),!0}const o=a?Number(t)s,ic=s=>Reflect.getPrototypeOf(s);function QS(s,e,t){return function(...i){const n=this.__v_raw,r=$t(n),a=mo(r),o=s==="entries"||s===Symbol.iterator&&a,h=s==="keys"&&a,l=n[s](...i),c=t?Pf:e?Ao:hn;return!e&&Qi(r,"iterate",h?Rf:Ta),Oi(Object.create(l),{next(){const{value:u,done:d}=l.next();return d?{value:u,done:d}:{value:o?[c(u[0]),c(u[1])]:c(u),done:d}}})}}function sc(s){return function(...e){return s==="delete"?!1:s==="clear"?void 0:this}}function eM(s,e){const t={get(n){const r=this.__v_raw,a=$t(r),o=$t(n);s||(In(n,o)&&Qi(a,"get",n),Qi(a,"get",o));const{has:h}=ic(a),l=e?Pf:s?Ao:hn;if(h.call(a,n))return l(r.get(n));if(h.call(a,o))return l(r.get(o));r!==a&&r.get(n)},get size(){const n=this.__v_raw;return!s&&Qi($t(n),"iterate",Ta),n.size},has(n){const r=this.__v_raw,a=$t(r),o=$t(n);return s||(In(n,o)&&Qi(a,"has",n),Qi(a,"has",o)),n===o?r.has(n):r.has(n)||r.has(o)},forEach(n,r){const a=this,o=a.__v_raw,h=$t(o),l=e?Pf:s?Ao:hn;return!s&&Qi(h,"iterate",Ta),o.forEach((c,u)=>n.call(r,l(c),l(u),a))}};return Oi(t,s?{add:sc("add"),set:sc("set"),delete:sc("delete"),clear:sc("clear")}:{add(n){const r=$t(this),a=ic(r),o=$t(n),h=!e&&!Es(n)&&!mr(n)?o:n;return a.has.call(r,h)||In(n,h)&&a.has.call(r,n)||In(o,h)&&a.has.call(r,o)||(r.add(h),Qn(r,"add",h,h)),this},set(n,r){!e&&!Es(r)&&!mr(r)&&(r=$t(r));const a=$t(this),{has:o,get:h}=ic(a);let l=o.call(a,n);l||(n=$t(n),l=o.call(a,n));const c=h.call(a,n);return a.set(n,r),l?In(r,c)&&Qn(a,"set",n,r):Qn(a,"add",n,r),this},delete(n){const r=$t(this),{has:a,get:o}=ic(r);let h=a.call(r,n);h||(n=$t(n),h=a.call(r,n)),o&&o.call(r,n);const l=r.delete(n);return h&&Qn(r,"delete",n,void 0),l},clear(){const n=$t(this),r=n.size!==0,a=n.clear();return r&&Qn(n,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(n=>{t[n]=QS(n,s,e)}),t}function ip(s,e){const t=eM(s,e);return(i,n,r)=>n==="__v_isReactive"?!s:n==="__v_isReadonly"?s:n==="__v_raw"?i:Reflect.get(zt(t,n)&&n in i?t:i,n,r)}const tM={get:ip(!1,!1)},iM={get:ip(!1,!0)},sM={get:ip(!0,!1)};const Yy=new WeakMap,$y=new WeakMap,Gy=new WeakMap,nM=new WeakMap;function rM(s){switch(s){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Da(s){return mr(s)?s:sp(s,!1,KS,tM,Yy)}function aM(s){return sp(s,!1,JS,iM,$y)}function kf(s){return sp(s,!0,ZS,sM,Gy)}function sp(s,e,t,i,n){if(!qt(s)||s.__v_raw&&!(e&&s.__v_isReactive)||s.__v_skip||!Object.isExtensible(s))return s;const r=n.get(s);if(r)return r;const a=rM(RS(s));if(a===0)return s;const o=new Proxy(s,a===2?i:t);return n.set(s,o),o}function cr(s){return mr(s)?cr(s.__v_raw):!!(s&&s.__v_isReactive)}function mr(s){return!!(s&&s.__v_isReadonly)}function Es(s){return!!(s&&s.__v_isShallow)}function au(s){return s?!!s.__v_raw:!1}function $t(s){const e=s&&s.__v_raw;return e?$t(e):s}function Dr(s){return!zt(s,"__v_skip")&&Object.isExtensible(s)&&_y(s,"__v_skip",!0),s}const hn=s=>qt(s)?Da(s):s,Ao=s=>qt(s)?kf(s):s;function Si(s){return s?s.__v_isRef===!0:!1}function lt(s){return oM(s,!1)}function oM(s,e){return Si(s)?s:new lM(s,e)}class lM{constructor(e,t){this.dep=new tp,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:$t(e),this._value=t?e:hn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||Es(e)||mr(e);e=i?e:$t(e),In(e,t)&&(this._rawValue=e,this._value=i?e:hn(e),this.dep.trigger())}}function ke(s){return Si(s)?s.value:s}const cM={get:(s,e,t)=>e==="__v_raw"?s:ke(Reflect.get(s,e,t)),set:(s,e,t,i)=>{const n=s[e];return Si(n)&&!Si(t)?(n.value=t,!0):Reflect.set(s,e,t,i)}};function Hy(s){return cr(s)?s:new Proxy(s,cM)}function hM(s){const e=ft(s)?new Array(s.length):{};for(const t in s)e[t]=dM(s,t);return e}class uM{constructor(e,t,i){this._object=e,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._key=Cs(t)?t:String(t),this._raw=$t(e);let n=!0,r=e;if(!ft(e)||Cs(this._key)||!tu(this._key))do n=!au(r)||Es(r);while(n&&(r=r.__v_raw));this._shallow=n}get value(){let e=this._object[this._key];return this._shallow&&(e=ke(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&Si(this._raw[this._key])){const t=this._object[this._key];if(Si(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return GS(this._raw,this._key)}}function dM(s,e,t){return new uM(s,e,t)}class fM{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new tp(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=_l-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&ai!==this)return Fy(this,!0),!0}get value(){const e=this.dep.track();return Ly(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function mM(s,e,t=!1){let i,n;return Mt(s)?i=s:(i=s.get,n=s.set),new fM(i,n,t)}const nc={},sh=new WeakMap;let ha;function pM(s,e=!1,t=ha){if(t){let i=sh.get(t);i||sh.set(t,i=[]),i.push(s)}}function gM(s,e,t=ti){const{immediate:i,deep:n,once:r,scheduler:a,augmentJob:o,call:h}=t,l=w=>n?w:Es(w)||n===!1||n===0?er(w,1):er(w);let c,u,d,f,p=!1,m=!1;if(Si(s)?(u=()=>s.value,p=Es(s)):cr(s)?(u=()=>l(s),p=!0):ft(s)?(m=!0,p=s.some(w=>cr(w)||Es(w)),u=()=>s.map(w=>{if(Si(w))return w.value;if(cr(w))return l(w);if(Mt(w))return h?h(w,2):w()})):Mt(s)?e?u=h?()=>h(s,2):s:u=()=>{if(d){dr();try{d()}finally{fr()}}const w=ha;ha=c;try{return h?h(s,3,[f]):s(f)}finally{ha=w}}:u=On,e&&n){const w=u,A=n===!0?1/0:n;u=()=>er(w(),A)}const g=Ry(),v=()=>{c.stop(),g&&g.active&&Km(g.effects,c)};if(r&&e){const w=e;e=(...A)=>{const T=w(...A);return v(),T}}let b=m?new Array(s.length).fill(nc):nc;const y=w=>{if(!(!(c.flags&1)||!c.dirty&&!w))if(e){const A=c.run();if(w||n||p||(m?A.some((T,_)=>In(T,b[_])):In(A,b))){d&&d();const T=ha;ha=c;try{const _=[A,b===nc?void 0:m&&b[0]===nc?[]:b,f];b=A,h?h(e,3,_):e(..._)}finally{ha=T}}}else c.run()};return o&&o(y),c=new Py(u),c.scheduler=a?()=>a(y,!1):y,f=w=>pM(w,!1,c),d=c.onStop=()=>{const w=sh.get(c);if(w){if(h)h(w,4);else for(const A of w)A();sh.delete(c)}},e?i?y(!0):b=c.run():a?a(y.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function er(s,e=1/0,t){if(e<=0||!qt(s)||s.__v_skip||(t=t||new Map,(t.get(s)||0)>=e))return s;if(t.set(s,e),e--,Si(s))er(s.value,e,t);else if(ft(s))for(let i=0;i{er(i,e,t)});else if(Sy(s)){for(const i in s)er(s[i],e,t);for(const i of Object.getOwnPropertySymbols(s))Object.prototype.propertyIsEnumerable.call(s,i)&&er(s[i],e,t)}return s}/** +**/let Pi;class Cy{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&Pi&&(Pi.active?(this.parent=Pi,this.index=(Pi.scopes||(Pi.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){const i=this.scopes.slice();for(e=0,t=i.length;e0&&--this._on===0){if(Pi===this)Pi=this.prevScope;else{let e=Pi;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t0)return;if(ul){let e=ul;for(ul=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let s;for(;hl;){let e=hl;for(hl=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){s||(s=i)}e=t}}if(s)throw s}function Oy(s){for(let e=s.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function By(s){let e,t=s.depsTail,i=t;for(;i;){const n=i.prevDep;i.version===-1?(i===t&&(t=n),ep(i),YS(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}s.deps=e,s.depsTail=t}function If(s){for(let e=s.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Ly(e.dep.computed)||e.dep.version!==e.version))return!0;return!!s._dirty}function Ly(s){if(s.flags&4&&!(s.flags&16)||(s.flags&=-17,s.globalVersion===_l)||(s.globalVersion=_l,!s.isSSR&&s.flags&128&&(!s.deps&&!s._dirty||!If(s))))return;s.flags|=2;const e=s.dep,t=ai,i=rn;ai=s,rn=!0;try{Oy(s);const n=s.fn(s._value);(e.version===0||In(n,s._value))&&(s.flags|=128,s._value=n,e.version++)}catch(n){throw e.version++,n}finally{ai=t,rn=i,By(s),s.flags&=-3}}function ep(s,e=!1){const{dep:t,prevSub:i,nextSub:n}=s;if(i&&(i.nextSub=n,s.prevSub=void 0),n&&(n.prevSub=i,s.nextSub=void 0),t.subs===s&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)ep(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function YS(s){const{prevDep:e,nextDep:t}=s;e&&(e.nextDep=t,s.prevDep=void 0),t&&(t.prevDep=e,s.nextDep=void 0)}let rn=!0;const Dy=[];function dr(){Dy.push(rn),rn=!1}function fr(){const s=Dy.pop();rn=s===void 0?!0:s}function Gp(s){const{cleanup:e}=s;if(s.cleanup=void 0,e){const t=ai;ai=void 0;try{e()}finally{ai=t}}}let _l=0;class $S{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class tp{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!ai||!rn||ai===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==ai)t=this.activeLink=new $S(ai,this),ai.deps?(t.prevDep=ai.depsTail,ai.depsTail.nextDep=t,ai.depsTail=t):ai.deps=ai.depsTail=t,Ny(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=ai.depsTail,t.nextDep=void 0,ai.depsTail.nextDep=t,ai.depsTail=t,ai.deps===t&&(ai.deps=i)}return t}trigger(e){this.version++,_l++,this.notify(e)}notify(e){Jm();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{Qm()}}}function Ny(s){if(s.dep.sc++,s.sub.flags&4){const e=s.dep.computed;if(e&&!s.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Ny(i)}const t=s.dep.subs;t!==s&&(s.prevSub=t,t&&(t.nextSub=s)),s.dep.subs=s}}const ih=new WeakMap,Ta=Symbol(""),Rf=Symbol(""),Tl=Symbol("");function Qi(s,e,t){if(rn&&ai){let i=ih.get(s);i||ih.set(s,i=new Map);let n=i.get(t);n||(i.set(t,n=new tp),n.map=i,n.key=t),n.track()}}function Qn(s,e,t,i,n,r){const a=ih.get(s);if(!a){_l++;return}const o=h=>{h&&h.trigger()};if(Jm(),e==="clear")a.forEach(o);else{const h=ft(s),l=h&&tu(t);if(h&&t==="length"){const c=Number(i);a.forEach((u,d)=>{(d==="length"||d===Tl||!Cs(d)&&d>=c)&&o(u)})}else switch((t!==void 0||a.has(void 0))&&o(a.get(t)),l&&o(a.get(Tl)),e){case"add":h?l&&o(a.get("length")):(o(a.get(Ta)),mo(s)&&o(a.get(Rf)));break;case"delete":h||(o(a.get(Ta)),mo(s)&&o(a.get(Rf)));break;case"set":mo(s)&&o(a.get(Ta));break}}Qm()}function GS(s,e){const t=ih.get(s);return t&&t.get(e)}function ja(s){const e=$t(s);return e===s?e:(Qi(e,"iterate",Tl),Es(s)?e:e.map(hn))}function ru(s){return Qi(s=$t(s),"iterate",Tl),s}function An(s,e){return mr(s)?Ao(cr(s)?hn(e):e):hn(e)}const HS={__proto__:null,[Symbol.iterator](){return Du(this,Symbol.iterator,s=>An(this,s))},concat(...s){return ja(this).concat(...s.map(e=>ft(e)?ja(e):e))},entries(){return Du(this,"entries",s=>(s[1]=An(this,s[1]),s))},every(s,e){return Yn(this,"every",s,e,void 0,arguments)},filter(s,e){return Yn(this,"filter",s,e,t=>t.map(i=>An(this,i)),arguments)},find(s,e){return Yn(this,"find",s,e,t=>An(this,t),arguments)},findIndex(s,e){return Yn(this,"findIndex",s,e,void 0,arguments)},findLast(s,e){return Yn(this,"findLast",s,e,t=>An(this,t),arguments)},findLastIndex(s,e){return Yn(this,"findLastIndex",s,e,void 0,arguments)},forEach(s,e){return Yn(this,"forEach",s,e,void 0,arguments)},includes(...s){return Nu(this,"includes",s)},indexOf(...s){return Nu(this,"indexOf",s)},join(s){return ja(this).join(s)},lastIndexOf(...s){return Nu(this,"lastIndexOf",s)},map(s,e){return Yn(this,"map",s,e,void 0,arguments)},pop(){return Yo(this,"pop")},push(...s){return Yo(this,"push",s)},reduce(s,...e){return Hp(this,"reduce",s,e)},reduceRight(s,...e){return Hp(this,"reduceRight",s,e)},shift(){return Yo(this,"shift")},some(s,e){return Yn(this,"some",s,e,void 0,arguments)},splice(...s){return Yo(this,"splice",s)},toReversed(){return ja(this).toReversed()},toSorted(s){return ja(this).toSorted(s)},toSpliced(...s){return ja(this).toSpliced(...s)},unshift(...s){return Yo(this,"unshift",s)},values(){return Du(this,"values",s=>An(this,s))}};function Du(s,e,t){const i=ru(s),n=i[e]();return i!==s&&!Es(s)&&(n._next=n.next,n.next=()=>{const r=n._next();return r.done||(r.value=t(r.value)),r}),n}const jS=Array.prototype;function Yn(s,e,t,i,n,r){const a=ru(s),o=a!==s&&!Es(s),h=a[e];if(h!==jS[e]){const u=h.apply(s,r);return o?hn(u):u}let l=t;a!==s&&(o?l=function(u,d){return t.call(this,An(s,u),d,s)}:t.length>2&&(l=function(u,d){return t.call(this,u,d,s)}));const c=h.call(a,l,i);return o&&n?n(c):c}function Hp(s,e,t,i){const n=ru(s),r=n!==s&&!Es(s);let a=t,o=!1;n!==s&&(r?(o=i.length===0,a=function(l,c,u){return o&&(o=!1,l=An(s,l)),t.call(this,l,An(s,c),u,s)}):t.length>3&&(a=function(l,c,u){return t.call(this,l,c,u,s)}));const h=n[e](a,...i);return o?An(s,h):h}function Nu(s,e,t){const i=$t(s);Qi(i,"iterate",Tl);const n=i[e](...t);return(n===-1||n===!1)&&au(t[0])?(t[0]=$t(t[0]),i[e](...t)):n}function Yo(s,e,t=[]){dr(),Jm();const i=$t(s)[e].apply(s,t);return Qm(),fr(),i}const WS=qm("__proto__,__v_isRef,__isVue"),Uy=new Set(Object.getOwnPropertyNames(Symbol).filter(s=>s!=="arguments"&&s!=="caller").map(s=>Symbol[s]).filter(Cs));function zS(s){Cs(s)||(s=String(s));const e=$t(this);return Qi(e,"has",s),e.hasOwnProperty(s)}class Xy{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const n=this._isReadonly,r=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return r;if(t==="__v_raw")return i===(n?r?n2:Gy:r?$y:Yy).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const a=ft(e);if(!n){let h;if(a&&(h=HS[t]))return h;if(t==="hasOwnProperty")return zS}const o=Reflect.get(e,t,Si(e)?e:i);if((Cs(t)?Uy.has(t):WS(t))||(n||Qi(e,"get",t),r))return o;if(Si(o)){const h=a&&tu(t)?o:o.value;return n&&qt(h)?kf(h):h}return qt(o)?n?kf(o):Da(o):o}}class Vy extends Xy{constructor(e=!1){super(!1,e)}set(e,t,i,n){let r=e[t];const a=ft(e)&&tu(t);if(!this._isShallow){const l=mr(r);if(!Es(i)&&!mr(i)&&(r=$t(r),i=$t(i)),!a&&Si(r)&&!Si(i))return l||(r.value=i),!0}const o=a?Number(t)s,ic=s=>Reflect.getPrototypeOf(s);function QS(s,e,t){return function(...i){const n=this.__v_raw,r=$t(n),a=mo(r),o=s==="entries"||s===Symbol.iterator&&a,h=s==="keys"&&a,l=n[s](...i),c=t?Pf:e?Ao:hn;return!e&&Qi(r,"iterate",h?Rf:Ta),Oi(Object.create(l),{next(){const{value:u,done:d}=l.next();return d?{value:u,done:d}:{value:o?[c(u[0]),c(u[1])]:c(u),done:d}}})}}function sc(s){return function(...e){return s==="delete"?!1:s==="clear"?void 0:this}}function e2(s,e){const t={get(n){const r=this.__v_raw,a=$t(r),o=$t(n);s||(In(n,o)&&Qi(a,"get",n),Qi(a,"get",o));const{has:h}=ic(a),l=e?Pf:s?Ao:hn;if(h.call(a,n))return l(r.get(n));if(h.call(a,o))return l(r.get(o));r!==a&&r.get(n)},get size(){const n=this.__v_raw;return!s&&Qi($t(n),"iterate",Ta),n.size},has(n){const r=this.__v_raw,a=$t(r),o=$t(n);return s||(In(n,o)&&Qi(a,"has",n),Qi(a,"has",o)),n===o?r.has(n):r.has(n)||r.has(o)},forEach(n,r){const a=this,o=a.__v_raw,h=$t(o),l=e?Pf:s?Ao:hn;return!s&&Qi(h,"iterate",Ta),o.forEach((c,u)=>n.call(r,l(c),l(u),a))}};return Oi(t,s?{add:sc("add"),set:sc("set"),delete:sc("delete"),clear:sc("clear")}:{add(n){const r=$t(this),a=ic(r),o=$t(n),h=!e&&!Es(n)&&!mr(n)?o:n;return a.has.call(r,h)||In(n,h)&&a.has.call(r,n)||In(o,h)&&a.has.call(r,o)||(r.add(h),Qn(r,"add",h,h)),this},set(n,r){!e&&!Es(r)&&!mr(r)&&(r=$t(r));const a=$t(this),{has:o,get:h}=ic(a);let l=o.call(a,n);l||(n=$t(n),l=o.call(a,n));const c=h.call(a,n);return a.set(n,r),l?In(r,c)&&Qn(a,"set",n,r):Qn(a,"add",n,r),this},delete(n){const r=$t(this),{has:a,get:o}=ic(r);let h=a.call(r,n);h||(n=$t(n),h=a.call(r,n)),o&&o.call(r,n);const l=r.delete(n);return h&&Qn(r,"delete",n,void 0),l},clear(){const n=$t(this),r=n.size!==0,a=n.clear();return r&&Qn(n,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(n=>{t[n]=QS(n,s,e)}),t}function ip(s,e){const t=e2(s,e);return(i,n,r)=>n==="__v_isReactive"?!s:n==="__v_isReadonly"?s:n==="__v_raw"?i:Reflect.get(zt(t,n)&&n in i?t:i,n,r)}const t2={get:ip(!1,!1)},i2={get:ip(!1,!0)},s2={get:ip(!0,!1)};const Yy=new WeakMap,$y=new WeakMap,Gy=new WeakMap,n2=new WeakMap;function r2(s){switch(s){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Da(s){return mr(s)?s:sp(s,!1,KS,t2,Yy)}function a2(s){return sp(s,!1,JS,i2,$y)}function kf(s){return sp(s,!0,ZS,s2,Gy)}function sp(s,e,t,i,n){if(!qt(s)||s.__v_raw&&!(e&&s.__v_isReactive)||s.__v_skip||!Object.isExtensible(s))return s;const r=n.get(s);if(r)return r;const a=r2(RS(s));if(a===0)return s;const o=new Proxy(s,a===2?i:t);return n.set(s,o),o}function cr(s){return mr(s)?cr(s.__v_raw):!!(s&&s.__v_isReactive)}function mr(s){return!!(s&&s.__v_isReadonly)}function Es(s){return!!(s&&s.__v_isShallow)}function au(s){return s?!!s.__v_raw:!1}function $t(s){const e=s&&s.__v_raw;return e?$t(e):s}function Dr(s){return!zt(s,"__v_skip")&&Object.isExtensible(s)&&_y(s,"__v_skip",!0),s}const hn=s=>qt(s)?Da(s):s,Ao=s=>qt(s)?kf(s):s;function Si(s){return s?s.__v_isRef===!0:!1}function lt(s){return o2(s,!1)}function o2(s,e){return Si(s)?s:new l2(s,e)}class l2{constructor(e,t){this.dep=new tp,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:$t(e),this._value=t?e:hn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||Es(e)||mr(e);e=i?e:$t(e),In(e,t)&&(this._rawValue=e,this._value=i?e:hn(e),this.dep.trigger())}}function ke(s){return Si(s)?s.value:s}const c2={get:(s,e,t)=>e==="__v_raw"?s:ke(Reflect.get(s,e,t)),set:(s,e,t,i)=>{const n=s[e];return Si(n)&&!Si(t)?(n.value=t,!0):Reflect.set(s,e,t,i)}};function Hy(s){return cr(s)?s:new Proxy(s,c2)}function h2(s){const e=ft(s)?new Array(s.length):{};for(const t in s)e[t]=d2(s,t);return e}class u2{constructor(e,t,i){this._object=e,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._key=Cs(t)?t:String(t),this._raw=$t(e);let n=!0,r=e;if(!ft(e)||Cs(this._key)||!tu(this._key))do n=!au(r)||Es(r);while(n&&(r=r.__v_raw));this._shallow=n}get value(){let e=this._object[this._key];return this._shallow&&(e=ke(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&Si(this._raw[this._key])){const t=this._object[this._key];if(Si(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return GS(this._raw,this._key)}}function d2(s,e,t){return new u2(s,e,t)}class f2{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new tp(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=_l-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&ai!==this)return Fy(this,!0),!0}get value(){const e=this.dep.track();return Ly(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function m2(s,e,t=!1){let i,n;return Mt(s)?i=s:(i=s.get,n=s.set),new f2(i,n,t)}const nc={},sh=new WeakMap;let ha;function p2(s,e=!1,t=ha){if(t){let i=sh.get(t);i||sh.set(t,i=[]),i.push(s)}}function g2(s,e,t=ti){const{immediate:i,deep:n,once:r,scheduler:a,augmentJob:o,call:h}=t,l=w=>n?w:Es(w)||n===!1||n===0?er(w,1):er(w);let c,u,d,f,p=!1,m=!1;if(Si(s)?(u=()=>s.value,p=Es(s)):cr(s)?(u=()=>l(s),p=!0):ft(s)?(m=!0,p=s.some(w=>cr(w)||Es(w)),u=()=>s.map(w=>{if(Si(w))return w.value;if(cr(w))return l(w);if(Mt(w))return h?h(w,2):w()})):Mt(s)?e?u=h?()=>h(s,2):s:u=()=>{if(d){dr();try{d()}finally{fr()}}const w=ha;ha=c;try{return h?h(s,3,[f]):s(f)}finally{ha=w}}:u=On,e&&n){const w=u,A=n===!0?1/0:n;u=()=>er(w(),A)}const g=Ry(),v=()=>{c.stop(),g&&g.active&&Km(g.effects,c)};if(r&&e){const w=e;e=(...A)=>{const T=w(...A);return v(),T}}let b=m?new Array(s.length).fill(nc):nc;const y=w=>{if(!(!(c.flags&1)||!c.dirty&&!w))if(e){const A=c.run();if(w||n||p||(m?A.some((T,_)=>In(T,b[_])):In(A,b))){d&&d();const T=ha;ha=c;try{const _=[A,b===nc?void 0:m&&b[0]===nc?[]:b,f];b=A,h?h(e,3,_):e(..._)}finally{ha=T}}}else c.run()};return o&&o(y),c=new Py(u),c.scheduler=a?()=>a(y,!1):y,f=w=>p2(w,!1,c),d=c.onStop=()=>{const w=sh.get(c);if(w){if(h)h(w,4);else for(const A of w)A();sh.delete(c)}},e?i?y(!0):b=c.run():a?a(y.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function er(s,e=1/0,t){if(e<=0||!qt(s)||s.__v_skip||(t=t||new Map,(t.get(s)||0)>=e))return s;if(t.set(s,e),e--,Si(s))er(s.value,e,t);else if(ft(s))for(let i=0;i{er(i,e,t)});else if(Sy(s)){for(const i in s)er(s[i],e,t);for(const i of Object.getOwnPropertySymbols(s))Object.prototype.propertyIsEnumerable.call(s,i)&&er(s[i],e,t)}return s}/** * @vue/runtime-core v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Yl(s,e,t,i){try{return i?s(...i):s()}catch(n){ou(n,e,t)}}function Vs(s,e,t,i){if(Mt(s)){const n=Yl(s,e,t,i);return n&&by(n)&&n.catch(r=>{ou(r,e,t)}),n}if(ft(s)){const n=[];for(let r=0;r>>1,n=ls[i],r=Al(n);r=Al(t)?ls.push(s):ls.splice(yM(e),0,s),s.flags|=1,Wy()}}function Wy(){nh||(nh=jy.then(qy))}function xM(s){if(!ft(s))Er&&s.id===-1?Er.splice(to+1,0,s):s.flags&1||(po.push(s),s.flags|=1);else for(let e=0;eAl(t)-Al(i));if(po.length=0,Er){for(let t=0;ts.id==null?s.flags&2?-1:1/0:s.id;function qy(s){try{for(bn=0;bn{i._d&&hh(-1);const r=rh(e),a=hr.length;let o;try{o=s(...n)}finally{for(let h=hr.length;h>a;h--)lp();rh(r),i._d&&hh(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function ye(s,e){if(is===null)return s;const t=mu(is),i=s.dirs||(s.dirs=[]);for(let n=0;n1)return t&&Mt(e)?e.call(i&&i.proxy):e}}function wM(){return!!(cp()||Aa)}const SM=Symbol.for("v-scx"),MM=()=>dl(SM);function Jo(s,e){return rp(s,null,e)}function fs(s,e,t){return rp(s,e,t)}function rp(s,e,t=ti){const{immediate:i,deep:n,flush:r,once:a}=t,o=Oi({},t),h=e&&i||!e&&r!=="post";let l;if(Pl){if(r==="sync"){const f=MM();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!h){const f=()=>{};return f.stop=On,f.resume=On,f.pause=On,f}}const c=cs;o.call=(f,p,m)=>Vs(f,c,p,m);let u=!1;r==="post"?o.scheduler=f=>{ms(f,c&&c.suspense)}:r!=="sync"&&(u=!0,o.scheduler=(f,p)=>{p?f():np(f)}),o.augmentJob=f=>{e&&(f.flags|=4),u&&(f.flags|=2,c&&(f.id=c.uid,f.i=c))};const d=gM(s,e,o);return Pl&&(l?l.push(d):h&&d()),d}function _M(s,e,t){const i=this.proxy,n=vi(s)?s.includes(".")?Zy(i,s):()=>i[s]:s.bind(i,i);let r;Mt(e)?r=e:(r=e.handler,t=e);const a=Hl(this),o=rp(n,r.bind(i),t);return a(),o}function Zy(s,e){const t=e.split(".");return()=>{let i=s;for(let n=0;ns.__isTeleport,Ds=Symbol("_leaveCb"),$o=Symbol("_enterCb");function AM(){const s={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Kr(()=>{s.isMounted=!0}),$l(()=>{s.isUnmounting=!0}),s}const Fs=[Function,Array],Jy={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Fs,onEnter:Fs,onAfterEnter:Fs,onEnterCancelled:Fs,onBeforeLeave:Fs,onLeave:Fs,onAfterLeave:Fs,onLeaveCancelled:Fs,onBeforeAppear:Fs,onAppear:Fs,onAfterAppear:Fs,onAppearCancelled:Fs},Qy=s=>{const e=s.subTree;return e.component?Qy(e.component):e},EM={name:"BaseTransition",props:Jy,setup(s,{slots:e}){const t=cp(),i=AM();return()=>{const n=e.default&&ix(e.default(),!0),r=n&&n.length?ex(n):t.subTree?Ve():void 0;if(!r)return;const a=$t(s),{mode:o}=a;if(i.isLeaving)return Uu(r);const h=oh(r);if(!h)return Uu(r);let l=Ff(h,a,i,t,u=>l=u);h.type!==ts&&El(h,l);let c=t.subTree&&oh(t.subTree);if(c&&c.type!==ts&&!ga(c,h)&&Qy(t).type!==ts){let u=Ff(c,a,i,t);if(El(c,u),o==="out-in"&&h.type!==ts)return i.isLeaving=!0,u.afterLeave=()=>{i.isLeaving=!1,t.job.flags&8||t.update(),delete u.afterLeave,c=void 0},Uu(r);o==="in-out"&&h.type!==ts?u.delayLeave=(d,f,p)=>{const m=tx(i,c);m[String(c.key)]=c,d[Ds]=()=>{f(),d[Ds]=void 0,delete l.delayedLeave,c=void 0},l.delayedLeave=()=>{p(),delete l.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return r}}};function ex(s){let e=s[0];if(s.length>1){for(const t of s)if(t.type!==ts){e=t;break}}return e}const CM=EM;function tx(s,e){const{leavingVNodes:t}=s;let i=t.get(e.type);return i||(i=Object.create(null),t.set(e.type,i)),i}function Ff(s,e,t,i,n){const{appear:r,mode:a,persisted:o=!1,onBeforeEnter:h,onEnter:l,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:d,onLeave:f,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:g,onAppear:v,onAfterAppear:b,onAppearCancelled:y}=e,w=String(s.key),A=tx(t,s),T=(P,F)=>{P&&Vs(P,i,9,F)},_=(P,F)=>{const I=F[1];T(P,F),ft(P)?P.every(k=>k.length<=1)&&I():P.length<=1&&I()},R={mode:a,persisted:o,beforeEnter(P){let F=h;if(!t.isMounted)if(r)F=g||h;else return;P[Ds]&&P[Ds](!0);const I=A[w];I&&ga(s,I)&&I.el[Ds]&&I.el[Ds](),T(F,[P])},enter(P){if(A[w]===s)return;let F=l,I=c,k=u;if(!t.isMounted)if(r)F=v||l,I=b||c,k=y||u;else return;let B=!1;P[$o]=U=>{B||(B=!0,U?T(k,[P]):T(I,[P]),R.delayedLeave&&R.delayedLeave(),P[$o]=void 0)};const D=P[$o].bind(null,!1);F?_(F,[P,D]):D()},leave(P,F){const I=String(s.key);if(P[$o]&&P[$o](!0),t.isUnmounting)return F();T(d,[P]);let k=!1;P[Ds]=D=>{k||(k=!0,F(),D?T(m,[P]):T(p,[P]),P[Ds]=void 0,A[I]===s&&delete A[I])};const B=P[Ds].bind(null,!1);A[I]=s,f?_(f,[P,B]):B()},clone(P){const F=Ff(P,e,t,i,n);return n&&n(F),F}};return R}function Uu(s){if(hu(s))return s=Hr(s),s.children=null,s}function oh(s){if(!hu(s))return cu(s.type)&&s.children?ex(s.children):s;if(s.component)return s.component.subTree;const{shapeFlag:e,children:t}=s;if(t){if(e&16)return t[0];if(e&32&&Mt(t.default))return t.default()}}function El(s,e){if(s.shapeFlag&6&&s.component){s.transition=e;const t=s.component.subTree;El(cu(t.type)&&oh(t)||t,e)}else s.shapeFlag&128?(s.ssContent.transition=e.clone(s.ssContent),s.ssFallback.transition=e.clone(s.ssFallback)):s.transition=e}function ix(s,e=!1,t){let i=[],n=0;for(let r=0;r1)for(let r=0;rfl(m,e&&(ft(e)?e[g]:e),t,i,n));return}if(go(i)&&!n){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&fl(s,e,t,i.component.subTree);return}const r=i.shapeFlag&4?mu(i.component):i.el,a=n?null:r,{i:o,r:h}=s,l=e&&e.r,c=o.refs===ti?o.refs={}:o.refs,u=o.setupState,d=$t(u),f=u===ti?xy:m=>Wp(c,m)?!1:zt(d,m),p=(m,g)=>!(g&&Wp(c,g));if(l!=null&&l!==h){if(zp(e),vi(l))c[l]=null,f(l)&&(u[l]=null);else if(Si(l)){const m=e;p(l,m.k)&&(l.value=null),m.k&&(c[m.k]=null)}}if(Mt(h))Yl(h,o,12,[a,c]);else{const m=vi(h),g=Si(h);if(m||g){const v=()=>{if(s.f){const b=m?f(h)?u[h]:c[h]:p()||!s.k?h.value:c[s.k];if(n)ft(b)&&Km(b,r);else if(ft(b))b.includes(r)||b.push(r);else if(m)c[h]=[r],f(h)&&(u[h]=c[h]);else{const y=[r];p(h,s.k)&&(h.value=y),s.k&&(c[s.k]=y)}}else m?(c[h]=a,f(h)&&(u[h]=a)):g&&(p(h,s.k)&&(h.value=a),s.k&&(c[s.k]=a))};if(a){const b=()=>{v(),lh.delete(s)};b.id=-1,lh.set(s,b),ms(b,t)}else zp(s),v()}}}function zp(s){const e=lh.get(s);e&&(e.flags|=8,lh.delete(s))}nu().requestIdleCallback;nu().cancelIdleCallback;const go=s=>!!s.type.__asyncLoader,hu=s=>s.type.__isKeepAlive;function IM(s,e){nx(s,"a",e)}function RM(s,e){nx(s,"da",e)}function nx(s,e,t=cs){const i=s.__wdc||(s.__wdc=()=>{let n=t;for(;n;){if(n.isDeactivated)return;n=n.parent}return s()});if(uu(e,i,t),t){let n=t.parent;for(;n&&n.parent;)hu(n.parent.vnode)&&PM(i,e,t,n),n=n.parent}}function PM(s,e,t,i){const n=uu(e,s,i,!0);Gl(()=>{Km(i[e],n)},t)}function uu(s,e,t=cs,i=!1){if(t){const n=t[s]||(t[s]=[]),r=e.__weh||(e.__weh=(...a)=>{dr();const o=Hl(t),h=Vs(e,t,s,a);return o(),fr(),h});return i?n.unshift(r):n.push(r),r}}const xr=s=>(e,t=cs)=>{(!Pl||s==="sp")&&uu(s,(...i)=>e(...i),t)},kM=xr("bm"),Kr=xr("m"),FM=xr("bu"),OM=xr("u"),$l=xr("bum"),Gl=xr("um"),BM=xr("sp"),LM=xr("rtg"),DM=xr("rtc");function NM(s,e=cs){uu("ec",s,e)}const UM=Symbol.for("v-ndc");function ci(s,e,t,i){let n;const r=t,a=ft(s);if(a||vi(s)){const o=a&&cr(s);let h=!1,l=!1;o&&(h=!Es(s),l=mr(s),s=ru(s)),n=new Array(s.length);for(let c=0,u=s.length;ce(o,h,void 0,r));else{const o=Object.keys(s);n=new Array(o.length);for(let h=0,l=o.length;h0;return ie(),Jt(Ke,null,[Ue("slot",l,i)],c?-2:64)}let a=s[e];a&&a._c&&(a._d=!1);const o=hr.length;ie();let h;try{const l=a&&rx(a(t)),c=t.key||r||l&&l.key;h=Jt(Ke,{key:(c&&!Cs(c)?c:`_${e}`)+(!l&&i?"_fb":"")},l||(i?i():[]),l&&s._===1?64:-2)}catch(l){for(let c=hr.length;c>o;c--)lp();throw l}finally{a&&a._c&&(a._d=!0)}return h}function rx(s){return s.some(e=>Il(e)?!(e.type===ts||e.type===Ke&&!rx(e.children)):!0)?s:null}const Of=s=>s?Tx(s)?mu(s):Of(s.parent):null,ml=Oi(Object.create(null),{$:s=>s,$el:s=>s.vnode.el,$data:s=>s.data,$props:s=>s.props,$attrs:s=>s.attrs,$slots:s=>s.slots,$refs:s=>s.refs,$parent:s=>Of(s.parent),$root:s=>Of(s.root),$host:s=>s.ce,$emit:s=>s.emit,$options:s=>ox(s),$forceUpdate:s=>s.f||(s.f=()=>{np(s.update)}),$nextTick:s=>s.n||(s.n=lu.bind(s.proxy)),$watch:s=>_M.bind(s)}),Xu=(s,e)=>s!==ti&&!s.__isScriptSetup&&zt(s,e),VM={get({_:s},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:n,props:r,accessCache:a,type:o,appContext:h}=s;if(e[0]!=="$"){const d=a[e];if(d!==void 0)switch(d){case 1:return i[e];case 2:return n[e];case 4:return t[e];case 3:return r[e]}else{if(Xu(i,e))return a[e]=1,i[e];if(n!==ti&&zt(n,e))return a[e]=2,n[e];if(zt(r,e))return a[e]=3,r[e];if(t!==ti&&zt(t,e))return a[e]=4,t[e];Bf&&(a[e]=0)}}const l=ml[e];let c,u;if(l)return e==="$attrs"&&Qi(s.attrs,"get",""),l(s);if((c=o.__cssModules)&&(c=c[e]))return c;if(t!==ti&&zt(t,e))return a[e]=4,t[e];if(u=h.config.globalProperties,zt(u,e))return u[e]},set({_:s},e,t){const{data:i,setupState:n,ctx:r}=s;return Xu(n,e)?(n[e]=t,!0):i!==ti&&zt(i,e)?(i[e]=t,!0):zt(s.props,e)||e[0]==="$"&&e.slice(1)in s?!1:(r[e]=t,!0)},has({_:{data:s,setupState:e,accessCache:t,ctx:i,appContext:n,props:r,type:a}},o){let h;return!!(t[o]||s!==ti&&o[0]!=="$"&&zt(s,o)||Xu(e,o)||zt(r,o)||zt(i,o)||zt(ml,o)||zt(n.config.globalProperties,o)||(h=a.__cssModules)&&h[o])},defineProperty(s,e,t){return t.get!=null?s._.accessCache[e]=0:zt(t,"value")&&this.set(s,e,t.value,null),Reflect.defineProperty(s,e,t)}};function qp(s){return ft(s)?s.reduce((e,t)=>(e[t]=null,e),{}):s}let Bf=!0;function YM(s){const e=ox(s),t=s.proxy,i=s.ctx;Bf=!1,e.beforeCreate&&Kp(e.beforeCreate,s,"bc");const{data:n,computed:r,methods:a,watch:o,provide:h,inject:l,created:c,beforeMount:u,mounted:d,beforeUpdate:f,updated:p,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:b,destroyed:y,unmounted:w,render:A,renderTracked:T,renderTriggered:_,errorCaptured:R,serverPrefetch:P,expose:F,inheritAttrs:I,components:k,directives:B,filters:D}=e;if(l&&$M(l,i,null),a)for(const N in a){const O=a[N];Mt(O)&&(i[N]=O.bind(t))}if(n){const N=n.call(t,t);qt(N)&&(s.data=Da(N))}if(Bf=!0,r)for(const N in r){const O=r[N],X=Mt(O)?O.bind(t,t):Mt(O.get)?O.get.bind(t,t):On,E=!Mt(O)&&Mt(O.set)?O.set.bind(t):On,V=vt({get:X,set:E});Object.defineProperty(i,N,{enumerable:!0,configurable:!0,get:()=>V.value,set:q=>V.value=q})}if(o)for(const N in o)ax(o[N],i,t,N);if(h){const N=Mt(h)?h.call(t):h;Reflect.ownKeys(N).forEach(O=>{bM(O,N[O])})}c&&Kp(c,s,"c");function L(N,O){ft(O)?O.forEach(X=>N(X.bind(t))):O&&N(O.bind(t))}if(L(kM,u),L(Kr,d),L(FM,f),L(OM,p),L(IM,m),L(RM,g),L(NM,R),L(DM,T),L(LM,_),L($l,b),L(Gl,w),L(BM,P),ft(F))if(F.length){const N=s.exposed||(s.exposed={});F.forEach(O=>{Object.defineProperty(N,O,{get:()=>t[O],set:X=>t[O]=X,enumerable:!0})})}else s.exposed||(s.exposed={});A&&s.render===On&&(s.render=A),I!=null&&(s.inheritAttrs=I),k&&(s.components=k),B&&(s.directives=B),P&&sx(s)}function $M(s,e,t=On){ft(s)&&(s=Lf(s));for(const i in s){const n=s[i];let r;qt(n)?"default"in n?r=dl(n.from||i,n.default,!0):r=dl(n.from||i):r=dl(n),Si(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:a=>r.value=a}):e[i]=r}}function Kp(s,e,t){Vs(ft(s)?s.map(i=>i.bind(e.proxy)):s.bind(e.proxy),e,t)}function ax(s,e,t,i){let n=i.includes(".")?Zy(t,i):()=>t[i];if(vi(s)){const r=e[s];Mt(r)&&fs(n,r)}else if(Mt(s))fs(n,s.bind(t));else if(qt(s))if(ft(s))s.forEach(r=>ax(r,e,t,i));else{const r=Mt(s.handler)?s.handler.bind(t):e[s.handler];Mt(r)&&fs(n,r,s)}}function ox(s){const e=s.type,{mixins:t,extends:i}=e,{mixins:n,optionsCache:r,config:{optionMergeStrategies:a}}=s.appContext,o=r.get(e);let h;return o?h=o:!n.length&&!t&&!i?h=e:(h={},n.length&&n.forEach(l=>ch(h,l,a,!0)),ch(h,e,a)),qt(e)&&r.set(e,h),h}function ch(s,e,t,i=!1){const{mixins:n,extends:r}=e;r&&ch(s,r,t,!0),n&&n.forEach(a=>ch(s,a,t,!0));for(const a in e)if(!(i&&a==="expose")){const o=GM[a]||t&&t[a];s[a]=o?o(s[a],e[a]):e[a]}return s}const GM={data:Zp,props:Jp,emits:Jp,methods:Qo,computed:Qo,beforeCreate:as,created:as,beforeMount:as,mounted:as,beforeUpdate:as,updated:as,beforeDestroy:as,beforeUnmount:as,destroyed:as,unmounted:as,activated:as,deactivated:as,errorCaptured:as,serverPrefetch:as,components:Qo,directives:Qo,watch:jM,provide:Zp,inject:HM};function Zp(s,e){return e?s?function(){return Oi(Mt(s)?s.call(this,this):s,Mt(e)?e.call(this,this):e)}:e:s}function HM(s,e){return Qo(Lf(s),Lf(e))}function Lf(s){if(ft(s)){const e={};for(let t=0;te==="modelValue"||e==="model-value"?s.modelModifiers:s[`${e}Modifiers`]||s[`${nn(e)}Modifiers`]||s[`${qr(e)}Modifiers`];function KM(s,e,...t){if(s.isUnmounted)return;const i=s.vnode.props||ti;let n=t;const r=e.startsWith("update:"),a=r&&qM(i,e.slice(7));a&&(a.trim&&(n=t.map(c=>vi(c)?c.trim():c)),a.number&&(n=t.map(su)));let o,h=i[o=Ou(e)]||i[o=Ou(nn(e))];!h&&r&&(h=i[o=Ou(qr(e))]),h&&Vs(h,s,6,n);const l=i[o+"Once"];if(l){if(!s.emitted)s.emitted={};else if(s.emitted[o])return;s.emitted[o]=!0,Vs(l,s,6,n)}}const ZM=new WeakMap;function cx(s,e,t=!1){const i=t?ZM:e.emitsCache,n=i.get(s);if(n!==void 0)return n;const r=s.emits;let a={},o=!1;if(!Mt(s)){const h=l=>{const c=cx(l,e,!0);c&&(o=!0,Oi(a,c))};!t&&e.mixins.length&&e.mixins.forEach(h),s.extends&&h(s.extends),s.mixins&&s.mixins.forEach(h)}return!r&&!o?(qt(s)&&i.set(s,null),null):(ft(r)?r.forEach(h=>a[h]=null):Oi(a,r),qt(s)&&i.set(s,a),a)}function du(s,e){return!s||!Qh(e)?!1:(e=e.slice(2),e=e==="Once"?e:e.replace(/Once$/,""),zt(s,e[0].toLowerCase()+e.slice(1))||zt(s,qr(e))||zt(s,e))}function Qp(s){const{type:e,vnode:t,proxy:i,withProxy:n,propsOptions:[r],slots:a,attrs:o,emit:h,render:l,renderCache:c,props:u,data:d,setupState:f,ctx:p,inheritAttrs:m}=s,g=rh(s);let v,b;try{if(t.shapeFlag&4){const w=n||i,A=w;v=En(l.call(A,w,c,u,f,d,p)),b=o}else{const w=e;v=En(w.length>1?w(u,{attrs:o,slots:a,emit:h}):w(u,null)),b=e.props?o:JM(o)}}catch(w){hr.length=0,ou(w,s,1),v=Ue(ts)}let y=v;if(b&&m!==!1){const w=Object.keys(b),{shapeFlag:A}=y;w.length&&A&7&&(r&&w.some(eu)&&(b=QM(b,r)),y=Hr(y,b,!1,!0))}if(t.dirs&&(y=Hr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(t.dirs):t.dirs),t.transition){const w=cu(y.type)&&oh(y)||y;El(w,t.transition)}return v=y,rh(g),v}const JM=s=>{let e;for(const t in s)(t==="class"||t==="style"||Qh(t))&&((e||(e={}))[t]=s[t]);return e},QM=(s,e)=>{const t={};for(const i in s)(!eu(i)||!(i.slice(9)in e))&&(t[i]=s[i]);return t};function e_(s,e,t){const{props:i,children:n,component:r}=s,{props:a,children:o,patchFlag:h}=e,l=r.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&h>=0){if(h&1024)return!0;if(h&16)return i?eg(i,a,l):!!a;if(h&8){const c=e.dynamicProps;for(let u=0;uObject.create(ux),fx=s=>Object.getPrototypeOf(s)===ux;function i_(s,e,t,i=!1){const n={},r=dx();s.propsDefaults=Object.create(null),mx(s,e,n,r);for(const a in s.propsOptions[0])a in n||(n[a]=void 0);t?s.props=i?n:aM(n):s.type.props?s.props=n:s.props=r,s.attrs=r}function s_(s,e,t,i){const{props:n,attrs:r,vnode:{patchFlag:a}}=s,o=$t(n),[h]=s.propsOptions;let l=!1;if((i||a>0)&&!(a&16)){if(a&8){const c=s.vnode.dynamicProps;for(let u=0;u{h=!0;const[d,f]=px(u,e,!0);Oi(a,d),f&&o.push(...f)};!t&&e.mixins.length&&e.mixins.forEach(c),s.extends&&c(s.extends),s.mixins&&s.mixins.forEach(c)}if(!r&&!h)return qt(s)&&i.set(s,fo),fo;if(ft(r))for(let c=0;cs==="_"||s==="_ctx"||s==="$stable",op=s=>ft(s)?s.map(En):[En(s)],r_=(s,e,t)=>{if(e._n)return e;const i=ah((...n)=>op(e(...n)),t);return i._c=!1,i},gx=(s,e,t)=>{const i=s._ctx;for(const n in s){if(ap(n))continue;const r=s[n];if(Mt(r))e[n]=r_(n,r,i);else if(r!=null){const a=op(r);e[n]=()=>a}}},vx=(s,e)=>{const t=op(e);s.slots.default=()=>t},yx=(s,e,t)=>{for(const i in e)(t||!ap(i))&&(s[i]=e[i])},a_=(s,e,t)=>{const i=s.slots=dx();if(s.vnode.shapeFlag&32){const n=e._;n?(yx(i,e,t),t&&_y(i,"_",n,!0)):gx(e,i)}else e&&vx(s,e)},o_=(s,e,t)=>{const{vnode:i,slots:n}=s;let r=!0,a=ti;if(i.shapeFlag&32){const o=e._;o?t&&o===1?r=!1:yx(n,e,t):(r=!e.$stable,gx(e,n)),a=e}else e&&(vx(s,e),a={default:1});if(r)for(const o in n)!ap(o)&&a[o]==null&&delete n[o]},ms=d_;function l_(s){return c_(s)}function c_(s,e){const t=nu();t.__VUE__=!0;const{insert:i,remove:n,patchProp:r,createElement:a,createText:o,createComment:h,setText:l,setElementText:c,parentNode:u,nextSibling:d,setScopeId:f=On,insertStaticContent:p}=s,m=(G,Z,z,j=null,te=null,he=null,xe=void 0,oe=null,ge=!!Z.dynamicChildren)=>{if(G===Z)return;G&&!ga(G,Z)&&(j=me(G),q(G,te,he,!0),G=null),Z.patchFlag===-2&&(ge=!1,Z.dynamicChildren=null);const{type:le,ref:Oe,shapeFlag:Fe}=Z;switch(le){case fu:g(G,Z,z,j);break;case ts:v(G,Z,z,j);break;case Xc:G==null&&b(Z,z,j,xe);break;case Ke:k(G,Z,z,j,te,he,xe,oe,ge);break;default:Fe&1?A(G,Z,z,j,te,he,xe,oe,ge):Fe&6?B(G,Z,z,j,te,he,xe,oe,ge):(Fe&64||Fe&128)&&le.process(G,Z,z,j,te,he,xe,oe,ge,pe)}Oe!=null&&te?fl(Oe,G&&G.ref,he,Z||G,!Z):Oe==null&&G&&G.ref!=null&&fl(G.ref,null,he,G,!0)},g=(G,Z,z,j)=>{if(G==null)i(Z.el=o(Z.children),z,j);else{const te=Z.el=G.el;Z.children!==G.children&&l(te,Z.children)}},v=(G,Z,z,j)=>{G==null?i(Z.el=h(Z.children||""),z,j):Z.el=G.el},b=(G,Z,z,j)=>{[G.el,G.anchor]=p(G.children,Z,z,j,G.el,G.anchor)},y=({el:G,anchor:Z},z,j)=>{let te;for(;G&&G!==Z;)te=d(G),i(G,z,j),G=te;i(Z,z,j)},w=({el:G,anchor:Z})=>{let z;for(;G&&G!==Z;)z=d(G),n(G),G=z;n(Z)},A=(G,Z,z,j,te,he,xe,oe,ge)=>{if(Z.type==="svg"?xe="svg":Z.type==="math"&&(xe="mathml"),G==null)T(Z,z,j,te,he,xe,oe,ge);else{const le=G.el&&G.el._isVueCE?G.el:null;try{le&&le._beginPatch(),P(G,Z,te,he,xe,oe,ge)}finally{le&&le._endPatch()}}},T=(G,Z,z,j,te,he,xe,oe)=>{let ge,le;const{props:Oe,shapeFlag:Fe,transition:Be,dirs:st}=G;if(ge=G.el=a(G.type,he,Oe&&Oe.is,Oe),Fe&8?c(ge,G.children):Fe&16&&R(G.children,ge,null,j,te,Vu(G,he),xe,oe),st&&ia(G,null,j,"created"),_(ge,G,G.scopeId,xe,j),Oe){for(const At in Oe)At!=="value"&&!cl(At)&&r(ge,At,null,Oe[At],he,j);"value"in Oe&&r(ge,"value",null,Oe.value,he),(le=Oe.onVnodeBeforeMount)&&fn(le,j,G)}st&&ia(G,null,j,"beforeMount");const St=h_(te,Be);St&&Be.beforeEnter(ge),i(ge,Z,z),((le=Oe&&Oe.onVnodeMounted)||St||st)&&ms(()=>{try{le&&fn(le,j,G),St&&Be.enter(ge),st&&ia(G,null,j,"mounted")}finally{}},te)},_=(G,Z,z,j,te)=>{if(z&&f(G,z),j)for(let he=0;he{for(let le=ge;le{const oe=Z.el=G.el;let{patchFlag:ge,dynamicChildren:le,dirs:Oe}=Z;ge|=G.patchFlag&16;const Fe=G.props||ti,Be=Z.props||ti;let st;if(z&&sa(z,!1),(st=Be.onVnodeBeforeUpdate)&&fn(st,z,Z,G),Oe&&ia(Z,G,z,"beforeUpdate"),z&&sa(z,!0),le&&(!G.dynamicChildren||G.dynamicChildren.length!==le.length)&&(ge=0,xe=!1,le=null),(Fe.innerHTML&&Be.innerHTML==null||Fe.textContent&&Be.textContent==null)&&c(oe,""),le?F(G.dynamicChildren,le,oe,z,j,Vu(Z,te),he):xe||O(G,Z,oe,null,z,j,Vu(Z,te),he,!1),ge>0){if(ge&16)I(oe,Fe,Be,z,te);else if(ge&2&&Fe.class!==Be.class&&r(oe,"class",null,Be.class,te),ge&4&&r(oe,"style",Fe.style,Be.style,te),ge&8){const St=Z.dynamicProps;for(let At=0;At{st&&fn(st,z,Z,G),Oe&&ia(Z,G,z,"updated")},j)},F=(G,Z,z,j,te,he,xe)=>{for(let oe=0;oe{if(Z!==z){if(Z!==ti)for(const he in Z)!cl(he)&&!(he in z)&&r(G,he,Z[he],null,te,j);for(const he in z){if(cl(he))continue;const xe=z[he],oe=Z[he];xe!==oe&&he!=="value"&&r(G,he,oe,xe,te,j)}"value"in z&&r(G,"value",Z.value,z.value,te)}},k=(G,Z,z,j,te,he,xe,oe,ge)=>{const le=Z.el=G?G.el:o(""),Oe=Z.anchor=G?G.anchor:o("");let{patchFlag:Fe,dynamicChildren:Be,slotScopeIds:st}=Z;st&&(oe=oe?oe.concat(st):st),G==null?(i(le,z,j),i(Oe,z,j),R(Z.children||[],z,Oe,te,he,xe,oe,ge)):Fe>0&&Fe&64&&Be&&G.dynamicChildren&&G.dynamicChildren.length===Be.length?(F(G.dynamicChildren,Be,z,te,he,xe,oe),(Z.key!=null||te&&Z===te.subTree)&&xx(G,Z,!0)):O(G,Z,z,Oe,te,he,xe,oe,ge)},B=(G,Z,z,j,te,he,xe,oe,ge)=>{Z.slotScopeIds=oe,G==null?Z.shapeFlag&512?te.ctx.activate(Z,z,j,xe,ge):D(Z,z,j,te,he,xe,ge):U(G,Z,ge)},D=(G,Z,z,j,te,he,xe)=>{const oe=G.component=y_(G,j,te);if(hu(G)&&(oe.ctx.renderer=pe),x_(oe,!1,xe),oe.asyncDep){if(te&&te.registerDep(oe,L,xe),!G.el){const ge=oe.subTree=Ue(ts);v(null,ge,Z,z),G.placeholder=ge.el}}else L(oe,G,Z,z,te,he,xe)},U=(G,Z,z)=>{const j=Z.component=G.component;if(e_(G,Z,z))if(j.asyncDep&&!j.asyncResolved){N(j,Z,z);return}else j.next=Z,j.update();else Z.el=G.el,j.vnode=Z},L=(G,Z,z,j,te,he,xe)=>{const oe=()=>{if(G.isMounted){let{next:Fe,bu:Be,u:st,parent:St,vnode:At}=G;{const Wi=bx(G);if(Wi){Fe&&(Fe.el=At.el,N(G,Fe,xe)),Wi.asyncDep.then(()=>{ms(()=>{G.isUnmounted||le()},te)});return}}let Et=Fe,It;sa(G,!1),Fe?(Fe.el=At.el,N(G,Fe,xe)):Fe=At,Be&&Uc(Be),(It=Fe.props&&Fe.props.onVnodeBeforeUpdate)&&fn(It,St,Fe,At),sa(G,!0);const Kt=Qp(G),Ti=G.subTree;G.subTree=Kt,m(Ti,Kt,u(Ti.el),me(Ti),G,te,he),Fe.el=Kt.el,Et===null&&t_(G,Kt.el),st&&ms(st,te),(It=Fe.props&&Fe.props.onVnodeUpdated)&&ms(()=>fn(It,St,Fe,At),te)}else{let Fe;const{el:Be,props:st}=Z,{bm:St,m:At,parent:Et,root:It,type:Kt}=G,Ti=go(Z);sa(G,!1),St&&Uc(St),!Ti&&(Fe=st&&st.onVnodeBeforeMount)&&fn(Fe,Et,Z),sa(G,!0);{It.ce&&It.ce._hasShadowRoot()&&It.ce._injectChildStyle(Kt,G.parent?G.parent.type:void 0);const Wi=G.subTree=Qp(G);m(null,Wi,z,j,G,te,he),Z.el=Wi.el}if(At&&ms(At,te),!Ti&&(Fe=st&&st.onVnodeMounted)){const Wi=Z;ms(()=>fn(Fe,Et,Wi),te)}(Z.shapeFlag&256||Et&&go(Et.vnode)&&Et.vnode.shapeFlag&256)&&G.a&&ms(G.a,te),G.isMounted=!0,Z=z=j=null}};G.scope.on();const ge=G.effect=new Py(oe);G.scope.off();const le=G.update=ge.run.bind(ge),Oe=G.job=ge.runIfDirty.bind(ge);Oe.i=G,Oe.id=G.uid,ge.scheduler=()=>np(Oe),sa(G,!0),le()},N=(G,Z,z)=>{Z.component=G;const j=G.vnode.props;G.vnode=Z,G.next=null,s_(G,Z.props,j,z),o_(G,Z.children,z),dr(),jp(G),fr()},O=(G,Z,z,j,te,he,xe,oe,ge=!1)=>{const le=G&&G.children,Oe=G?G.shapeFlag:0,Fe=Z.children,{patchFlag:Be,shapeFlag:st}=Z;if(Be>0){if(Be&128){E(le,Fe,z,j,te,he,xe,oe,ge);return}else if(Be&256){X(le,Fe,z,j,te,he,xe,oe,ge);return}}st&8?(Oe&16&&fe(le,te,he),Fe!==le&&c(z,Fe)):Oe&16?st&16?E(le,Fe,z,j,te,he,xe,oe,ge):fe(le,te,he,!0):(Oe&8&&c(z,""),st&16&&R(Fe,z,j,te,he,xe,oe,ge))},X=(G,Z,z,j,te,he,xe,oe,ge)=>{G=G||fo,Z=Z||fo;const le=G.length,Oe=Z.length,Fe=Math.min(le,Oe);let Be;for(Be=0;BeOe?fe(G,te,he,!0,!1,Fe):R(Z,z,j,te,he,xe,oe,ge,Fe)},E=(G,Z,z,j,te,he,xe,oe,ge)=>{let le=0;const Oe=Z.length;let Fe=G.length-1,Be=Oe-1;for(;le<=Fe&&le<=Be;){const st=G[le],St=Z[le]=ge?Jn(Z[le]):En(Z[le]);if(ga(st,St))m(st,St,z,null,te,he,xe,oe,ge);else break;le++}for(;le<=Fe&&le<=Be;){const st=G[Fe],St=Z[Be]=ge?Jn(Z[Be]):En(Z[Be]);if(ga(st,St))m(st,St,z,null,te,he,xe,oe,ge);else break;Fe--,Be--}if(le>Fe){if(le<=Be){const st=Be+1,St=stBe)for(;le<=Fe;)q(G[le],te,he,!0),le++;else{const st=le,St=le,At=new Map;for(le=St;le<=Be;le++){const di=Z[le]=ge?Jn(Z[le]):En(Z[le]);di.key!=null&&At.set(di.key,le)}let Et,It=0;const Kt=Be-St+1;let Ti=!1,Wi=0;const zi=new Array(Kt);for(le=0;le=Kt){q(di,te,he,!0);continue}let ce;if(di.key!=null)ce=At.get(di.key);else for(Et=St;Et<=Be;Et++)if(zi[Et-St]===0&&ga(di,Z[Et])){ce=Et;break}ce===void 0?q(di,te,he,!0):(zi[ce-St]=le+1,ce>=Wi?Wi=ce:Ti=!0,m(di,Z[ce],z,null,te,he,xe,oe,ge),It++)}const dn=Ti?u_(zi):fo;for(Et=dn.length-1,le=Kt-1;le>=0;le--){const di=St+le,ce=Z[di],de=Z[di+1],Rt=di+1{const{el:he,type:xe,transition:oe,children:ge,shapeFlag:le}=G;if(le&6){V(G.component.subTree,Z,z,j);return}if(le&128){G.suspense.move(Z,z,j);return}if(le&64){xe.move(G,Z,z,pe);return}if(xe===Ke){i(he,Z,z);for(let Fe=0;Feoe.enter(he),te));else{const{leave:Fe,delayLeave:Be,afterLeave:st}=oe,St=()=>{G.ctx.isUnmounted?n(he):i(he,Z,z)},At=()=>{const Et=he._isLeaving||!!he[Ds];he._isLeaving&&he[Ds](!0),oe.persisted&&!Et?St():Fe(he,()=>{St(),st&&st()})};Be?Be(he,St,At):At()}else i(he,Z,z)},q=(G,Z,z,j=!1,te=!1)=>{const{type:he,props:xe,ref:oe,children:ge,dynamicChildren:le,shapeFlag:Oe,patchFlag:Fe,dirs:Be,cacheIndex:st,memo:St}=G;if(Fe===-2&&(te=!1),oe!=null&&(dr(),fl(oe,null,z,G,!0),fr()),st!=null&&(Z.renderCache[st]=void 0),Oe&256){Z.ctx.deactivate(G);return}const At=Oe&1&&Be,Et=!go(G);let It;if(Et&&(It=xe&&xe.onVnodeBeforeUnmount)&&fn(It,Z,G),Oe&6)K(G.component,z,j);else{if(Oe&128){G.suspense.unmount(z,j);return}At&&ia(G,null,Z,"beforeUnmount"),Oe&64?G.type.remove(G,Z,z,pe,j):le&&!le.hasOnce&&(he!==Ke||Fe>0&&Fe&64)?fe(le,Z,z,!1,!0):(he===Ke&&Fe&384||!te&&Oe&16)&&fe(ge,Z,z),j&&W(G)}const Kt=St!=null&&st==null;(Et&&(It=xe&&xe.onVnodeUnmounted)||At||Kt)&&ms(()=>{It&&fn(It,Z,G),At&&ia(G,null,Z,"unmounted"),Kt&&(G.el=null)},z)},W=G=>{const{type:Z,el:z,anchor:j,transition:te}=G;if(Z===Ke){J(z,j);return}if(Z===Xc){w(G);return}const he=()=>{n(z),te&&!te.persisted&&te.afterLeave&&te.afterLeave()};if(G.shapeFlag&1&&te&&!te.persisted){const{leave:xe,delayLeave:oe}=te,ge=()=>xe(z,he);oe?oe(G.el,he,ge):ge()}else he()},J=(G,Z)=>{let z;for(;G!==Z;)z=d(G),n(G),G=z;n(Z)},K=(G,Z,z)=>{const{bum:j,scope:te,job:he,subTree:xe,um:oe,m:ge,a:le}=G;ig(ge),ig(le),j&&Uc(j),te.stop(),he&&(he.flags|=8,q(xe,G,Z,z)),oe&&ms(oe,Z),ms(()=>{G.isUnmounted=!0},Z)},fe=(G,Z,z,j=!1,te=!1,he=0)=>{for(let xe=he;xe{if(G.shapeFlag&6)return me(G.component.subTree);if(G.shapeFlag&128)return G.suspense.next();const Z=d(G.anchor||G.el),z=Z&&Z[TM];return z?d(z):Z};let we=!1;const Ee=(G,Z,z)=>{let j;G==null?Z._vnode&&(q(Z._vnode,null,null,!0),j=Z._vnode.component):m(Z._vnode||null,G,Z,null,null,null,z),Z._vnode=G,we||(we=!0,jp(j),zy(),we=!1)},pe={p:m,um:q,m:V,r:W,mt:D,mc:R,pc:O,pbc:F,n:me,o:s};return{render:Ee,hydrate:void 0,createApp:zM(Ee)}}function Vu({type:s,props:e},t){return t==="svg"&&s==="foreignObject"||t==="mathml"&&s==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function sa({effect:s,job:e},t){t?(s.flags|=32,e.flags|=4):(s.flags&=-33,e.flags&=-5)}function h_(s,e){return(!s||s&&!s.pendingBranch)&&e&&!e.persisted}function xx(s,e,t=!1){const i=s.children,n=e.children;if(ft(i)&&ft(n))for(let r=0;r>1,s[t[o]]0&&(e[i]=t[r-1]),t[r]=i)}}for(r=t.length,a=t[r-1];r-- >0;)t[r]=a,a=e[a];return t}function bx(s){const e=s.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:bx(e)}function ig(s){if(s)for(let e=0;es.__isSuspense;function d_(s,e){e&&e.pendingBranch?ft(s)?e.effects.push(...s):e.effects.push(s):xM(s)}const Ke=Symbol.for("v-fgt"),fu=Symbol.for("v-txt"),ts=Symbol.for("v-cmt"),Xc=Symbol.for("v-stc"),hr=[];let As=null;function ie(s=!1){hr.push(As=s?null:[])}function lp(){hr.pop(),As=hr[hr.length-1]||null}let Cl=1;function hh(s,e=!1){Cl+=s,s<0&&As&&e&&(As.hasOnce=!0)}function Mx(s){return s.dynamicChildren=Cl>0?As||fo:null,lp(),Cl>0&&As&&As.push(s),s}function ae(s,e,t,i,n,r){return Mx(M(s,e,t,i,n,r,!0))}function Jt(s,e,t,i,n){return Mx(Ue(s,e,t,i,n,!0))}function Il(s){return s?s.__v_isVNode===!0:!1}function ga(s,e){return s.type===e.type&&s.key===e.key}const _x=({key:s})=>s??null,Vc=({ref:s,ref_key:e,ref_for:t})=>(typeof s=="number"&&(s=""+s),s!=null?vi(s)||Si(s)||Mt(s)?{i:is,r:s,k:e,f:!!t}:s:null);function M(s,e=null,t=null,i=0,n=null,r=s===Ke?0:1,a=!1,o=!1){const h={__v_isVNode:!0,__v_skip:!0,type:s,props:e,key:e&&_x(e),ref:e&&Vc(e),scopeId:Ky,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:is};return o?(uh(h,t),r&128&&s.normalize(h)):t&&(h.shapeFlag|=vi(t)?8:16),Cl>0&&!a&&As&&(h.patchFlag>0||r&6)&&h.patchFlag!==32&&As.push(h),h}const Ue=f_;function f_(s,e=null,t=null,i=0,n=null,r=!1){if((!s||s===UM)&&(s=ts),Il(s)){const o=Hr(s,e,!0);return t&&uh(o,t),Cl>0&&!r&&As&&(o.shapeFlag&6?As[As.indexOf(s)]=o:As.push(o)),o.patchFlag=-2,o}if(M_(s)&&(s=s.__vccOpts),e){e=m_(e);let{class:o,style:h}=e;o&&!vi(o)&&(e.class=Ze(o)),qt(h)&&(au(h)&&!ft(h)&&(h=Oi({},h)),e.style=Li(h))}const a=vi(s)?1:Sx(s)?128:cu(s)?64:qt(s)?4:Mt(s)?2:0;return M(s,e,t,i,n,a,r,!0)}function m_(s){return s?au(s)||fx(s)?Oi({},s):s:null}function Hr(s,e,t=!1,i=!1){const{props:n,ref:r,patchFlag:a,children:o,transition:h}=s,l=e?p_(n||{},e):n,c={__v_isVNode:!0,__v_skip:!0,type:s.type,props:l,key:l&&_x(l),ref:e&&e.ref?t&&r?ft(r)?r.concat(Vc(e)):[r,Vc(e)]:Vc(e):r,scopeId:s.scopeId,slotScopeIds:s.slotScopeIds,children:o,target:s.target,targetStart:s.targetStart,targetAnchor:s.targetAnchor,staticCount:s.staticCount,shapeFlag:s.shapeFlag,patchFlag:e&&s.type!==Ke?a===-1?16:a|16:a,dynamicProps:s.dynamicProps,dynamicChildren:s.dynamicChildren,appContext:s.appContext,dirs:s.dirs,transition:h,component:s.component,suspense:s.suspense,ssContent:s.ssContent&&Hr(s.ssContent),ssFallback:s.ssFallback&&Hr(s.ssFallback),placeholder:s.placeholder,el:s.el,anchor:s.anchor,ctx:s.ctx,ce:s.ce};return h&&i&&El(c,h.clone(c)),c}function Qt(s=" ",e=0){return Ue(fu,null,s,e)}function Ts(s,e){const t=Ue(Xc,null,s);return t.staticCount=e,t}function Ve(s="",e=!1){return e?(ie(),Jt(ts,null,s)):Ue(ts,null,s)}function En(s){return s==null||typeof s=="boolean"?Ue(ts):ft(s)?Ue(Ke,null,s.slice()):Il(s)?Jn(s):Ue(fu,null,String(s))}function Jn(s){return s.el===null&&s.patchFlag!==-1||s.memo?s:Hr(s)}function uh(s,e){let t=0;const{shapeFlag:i}=s;if(e==null)e=null;else if(ft(e))t=16;else if(typeof e=="object")if(i&65){const n=e.default;n&&(n._c&&(n._d=!1),uh(s,n()),n._c&&(n._d=!0));return}else{t=32;const n=e._;!n&&!fx(e)?e._ctx=is:n===3&&is&&(is.slots._===1?e._=1:(e._=2,s.patchFlag|=1024))}else if(Mt(e)){if(i&65){uh(s,{default:e});return}e={default:e,_ctx:is},t=32}else e=String(e),i&64?(t=16,e=[Qt(e)]):t=8;s.children=e,s.shapeFlag|=t}function p_(...s){const e={};for(let t=0;tcs||is;let dh,Rl;{const s=nu(),e=(t,i)=>{let n;return(n=s[t])||(n=s[t]=[]),n.push(i),r=>{n.length>1?n.forEach(a=>a(r)):n[0](r)}};dh=e("__VUE_INSTANCE_SETTERS__",t=>cs=t),Rl=e("__VUE_SSR_SETTERS__",t=>Pl=t)}const Hl=s=>{const e=cs;return dh(s),s.scope.on(),()=>{s.scope.off(),dh(e)}},sg=()=>{cs&&cs.scope.off(),dh(null)};function Tx(s){return s.vnode.shapeFlag&4}let Pl=!1;function x_(s,e=!1,t=!1){e&&Rl(e);const{props:i,children:n}=s.vnode,r=Tx(s);i_(s,i,r,e),a_(s,n,t||e);const a=r?b_(s,e):void 0;return e&&Rl(!1),a}function b_(s,e){const t=s.type;s.accessCache=Object.create(null),s.proxy=new Proxy(s.ctx,VM);const{setup:i}=t;if(i){dr();const n=s.setupContext=i.length>1?S_(s):null,r=Hl(s),a=Yl(i,s,0,[s.props,n]),o=by(a);if(fr(),r(),(o||s.sp)&&!go(s)&&sx(s),o){if(a.then(sg,sg),e)return a.then(h=>{Rl(!0);try{ng(s,h,e)}finally{Rl(!1)}}).catch(h=>{ou(h,s,0)});s.asyncDep=a}else ng(s,a)}else Ax(s)}function ng(s,e,t){Mt(e)?s.type.__ssrInlineRender?s.ssrRender=e:s.render=e:qt(e)&&(s.setupState=Hy(e)),Ax(s)}function Ax(s,e,t){const i=s.type;s.render||(s.render=i.render||On);{const n=Hl(s);dr();try{YM(s)}finally{fr(),n()}}}const w_={get(s,e){return Qi(s,"get",""),s[e]}};function S_(s){const e=t=>{s.exposed=t||{}};return{attrs:new Proxy(s.attrs,w_),slots:s.slots,emit:s.emit,expose:e}}function mu(s){return s.exposed?s.exposeProxy||(s.exposeProxy=new Proxy(Hy(Dr(s.exposed)),{get(e,t){if(t in e)return e[t];if(t in ml)return ml[t](s)},has(e,t){return t in e||t in ml}})):s.proxy}function M_(s){return Mt(s)&&"__vccOpts"in s}const vt=(s,e)=>mM(s,e,Pl);function __(s,e,t){try{hh(-1);const i=arguments.length;return i===2?qt(e)&&!ft(e)?Il(e)?Ue(s,null,[e]):Ue(s,e):Ue(s,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Il(t)&&(t=[t]),Ue(s,e,t))}finally{hh(1)}}const T_="3.5.41";/** +**/function Yl(s,e,t,i){try{return i?s(...i):s()}catch(n){ou(n,e,t)}}function Vs(s,e,t,i){if(Mt(s)){const n=Yl(s,e,t,i);return n&&by(n)&&n.catch(r=>{ou(r,e,t)}),n}if(ft(s)){const n=[];for(let r=0;r>>1,n=ls[i],r=Al(n);r=Al(t)?ls.push(s):ls.splice(y2(e),0,s),s.flags|=1,Wy()}}function Wy(){nh||(nh=jy.then(qy))}function x2(s){if(!ft(s))Er&&s.id===-1?Er.splice(to+1,0,s):s.flags&1||(po.push(s),s.flags|=1);else for(let e=0;eAl(t)-Al(i));if(po.length=0,Er){for(let t=0;ts.id==null?s.flags&2?-1:1/0:s.id;function qy(s){try{for(bn=0;bn{i._d&&hh(-1);const r=rh(e),a=hr.length;let o;try{o=s(...n)}finally{for(let h=hr.length;h>a;h--)lp();rh(r),i._d&&hh(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function ye(s,e){if(is===null)return s;const t=mu(is),i=s.dirs||(s.dirs=[]);for(let n=0;n1)return t&&Mt(e)?e.call(i&&i.proxy):e}}function w2(){return!!(cp()||Aa)}const S2=Symbol.for("v-scx"),M2=()=>dl(S2);function Jo(s,e){return rp(s,null,e)}function fs(s,e,t){return rp(s,e,t)}function rp(s,e,t=ti){const{immediate:i,deep:n,flush:r,once:a}=t,o=Oi({},t),h=e&&i||!e&&r!=="post";let l;if(Pl){if(r==="sync"){const f=M2();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!h){const f=()=>{};return f.stop=On,f.resume=On,f.pause=On,f}}const c=cs;o.call=(f,p,m)=>Vs(f,c,p,m);let u=!1;r==="post"?o.scheduler=f=>{ms(f,c&&c.suspense)}:r!=="sync"&&(u=!0,o.scheduler=(f,p)=>{p?f():np(f)}),o.augmentJob=f=>{e&&(f.flags|=4),u&&(f.flags|=2,c&&(f.id=c.uid,f.i=c))};const d=g2(s,e,o);return Pl&&(l?l.push(d):h&&d()),d}function _2(s,e,t){const i=this.proxy,n=vi(s)?s.includes(".")?Zy(i,s):()=>i[s]:s.bind(i,i);let r;Mt(e)?r=e:(r=e.handler,t=e);const a=Hl(this),o=rp(n,r.bind(i),t);return a(),o}function Zy(s,e){const t=e.split(".");return()=>{let i=s;for(let n=0;ns.__isTeleport,Ds=Symbol("_leaveCb"),$o=Symbol("_enterCb");function A2(){const s={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Kr(()=>{s.isMounted=!0}),$l(()=>{s.isUnmounting=!0}),s}const Fs=[Function,Array],Jy={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Fs,onEnter:Fs,onAfterEnter:Fs,onEnterCancelled:Fs,onBeforeLeave:Fs,onLeave:Fs,onAfterLeave:Fs,onLeaveCancelled:Fs,onBeforeAppear:Fs,onAppear:Fs,onAfterAppear:Fs,onAppearCancelled:Fs},Qy=s=>{const e=s.subTree;return e.component?Qy(e.component):e},E2={name:"BaseTransition",props:Jy,setup(s,{slots:e}){const t=cp(),i=A2();return()=>{const n=e.default&&ix(e.default(),!0),r=n&&n.length?ex(n):t.subTree?Ve():void 0;if(!r)return;const a=$t(s),{mode:o}=a;if(i.isLeaving)return Uu(r);const h=oh(r);if(!h)return Uu(r);let l=Ff(h,a,i,t,u=>l=u);h.type!==ts&&El(h,l);let c=t.subTree&&oh(t.subTree);if(c&&c.type!==ts&&!ga(c,h)&&Qy(t).type!==ts){let u=Ff(c,a,i,t);if(El(c,u),o==="out-in"&&h.type!==ts)return i.isLeaving=!0,u.afterLeave=()=>{i.isLeaving=!1,t.job.flags&8||t.update(),delete u.afterLeave,c=void 0},Uu(r);o==="in-out"&&h.type!==ts?u.delayLeave=(d,f,p)=>{const m=tx(i,c);m[String(c.key)]=c,d[Ds]=()=>{f(),d[Ds]=void 0,delete l.delayedLeave,c=void 0},l.delayedLeave=()=>{p(),delete l.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return r}}};function ex(s){let e=s[0];if(s.length>1){for(const t of s)if(t.type!==ts){e=t;break}}return e}const C2=E2;function tx(s,e){const{leavingVNodes:t}=s;let i=t.get(e.type);return i||(i=Object.create(null),t.set(e.type,i)),i}function Ff(s,e,t,i,n){const{appear:r,mode:a,persisted:o=!1,onBeforeEnter:h,onEnter:l,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:d,onLeave:f,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:g,onAppear:v,onAfterAppear:b,onAppearCancelled:y}=e,w=String(s.key),A=tx(t,s),T=(P,F)=>{P&&Vs(P,i,9,F)},_=(P,F)=>{const I=F[1];T(P,F),ft(P)?P.every(k=>k.length<=1)&&I():P.length<=1&&I()},R={mode:a,persisted:o,beforeEnter(P){let F=h;if(!t.isMounted)if(r)F=g||h;else return;P[Ds]&&P[Ds](!0);const I=A[w];I&&ga(s,I)&&I.el[Ds]&&I.el[Ds](),T(F,[P])},enter(P){if(A[w]===s)return;let F=l,I=c,k=u;if(!t.isMounted)if(r)F=v||l,I=b||c,k=y||u;else return;let B=!1;P[$o]=U=>{B||(B=!0,U?T(k,[P]):T(I,[P]),R.delayedLeave&&R.delayedLeave(),P[$o]=void 0)};const D=P[$o].bind(null,!1);F?_(F,[P,D]):D()},leave(P,F){const I=String(s.key);if(P[$o]&&P[$o](!0),t.isUnmounting)return F();T(d,[P]);let k=!1;P[Ds]=D=>{k||(k=!0,F(),D?T(m,[P]):T(p,[P]),P[Ds]=void 0,A[I]===s&&delete A[I])};const B=P[Ds].bind(null,!1);A[I]=s,f?_(f,[P,B]):B()},clone(P){const F=Ff(P,e,t,i,n);return n&&n(F),F}};return R}function Uu(s){if(hu(s))return s=Hr(s),s.children=null,s}function oh(s){if(!hu(s))return cu(s.type)&&s.children?ex(s.children):s;if(s.component)return s.component.subTree;const{shapeFlag:e,children:t}=s;if(t){if(e&16)return t[0];if(e&32&&Mt(t.default))return t.default()}}function El(s,e){if(s.shapeFlag&6&&s.component){s.transition=e;const t=s.component.subTree;El(cu(t.type)&&oh(t)||t,e)}else s.shapeFlag&128?(s.ssContent.transition=e.clone(s.ssContent),s.ssFallback.transition=e.clone(s.ssFallback)):s.transition=e}function ix(s,e=!1,t){let i=[],n=0;for(let r=0;r1)for(let r=0;rfl(m,e&&(ft(e)?e[g]:e),t,i,n));return}if(go(i)&&!n){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&fl(s,e,t,i.component.subTree);return}const r=i.shapeFlag&4?mu(i.component):i.el,a=n?null:r,{i:o,r:h}=s,l=e&&e.r,c=o.refs===ti?o.refs={}:o.refs,u=o.setupState,d=$t(u),f=u===ti?xy:m=>Wp(c,m)?!1:zt(d,m),p=(m,g)=>!(g&&Wp(c,g));if(l!=null&&l!==h){if(zp(e),vi(l))c[l]=null,f(l)&&(u[l]=null);else if(Si(l)){const m=e;p(l,m.k)&&(l.value=null),m.k&&(c[m.k]=null)}}if(Mt(h))Yl(h,o,12,[a,c]);else{const m=vi(h),g=Si(h);if(m||g){const v=()=>{if(s.f){const b=m?f(h)?u[h]:c[h]:p()||!s.k?h.value:c[s.k];if(n)ft(b)&&Km(b,r);else if(ft(b))b.includes(r)||b.push(r);else if(m)c[h]=[r],f(h)&&(u[h]=c[h]);else{const y=[r];p(h,s.k)&&(h.value=y),s.k&&(c[s.k]=y)}}else m?(c[h]=a,f(h)&&(u[h]=a)):g&&(p(h,s.k)&&(h.value=a),s.k&&(c[s.k]=a))};if(a){const b=()=>{v(),lh.delete(s)};b.id=-1,lh.set(s,b),ms(b,t)}else zp(s),v()}}}function zp(s){const e=lh.get(s);e&&(e.flags|=8,lh.delete(s))}nu().requestIdleCallback;nu().cancelIdleCallback;const go=s=>!!s.type.__asyncLoader,hu=s=>s.type.__isKeepAlive;function I2(s,e){nx(s,"a",e)}function R2(s,e){nx(s,"da",e)}function nx(s,e,t=cs){const i=s.__wdc||(s.__wdc=()=>{let n=t;for(;n;){if(n.isDeactivated)return;n=n.parent}return s()});if(uu(e,i,t),t){let n=t.parent;for(;n&&n.parent;)hu(n.parent.vnode)&&P2(i,e,t,n),n=n.parent}}function P2(s,e,t,i){const n=uu(e,s,i,!0);Gl(()=>{Km(i[e],n)},t)}function uu(s,e,t=cs,i=!1){if(t){const n=t[s]||(t[s]=[]),r=e.__weh||(e.__weh=(...a)=>{dr();const o=Hl(t),h=Vs(e,t,s,a);return o(),fr(),h});return i?n.unshift(r):n.push(r),r}}const xr=s=>(e,t=cs)=>{(!Pl||s==="sp")&&uu(s,(...i)=>e(...i),t)},k2=xr("bm"),Kr=xr("m"),F2=xr("bu"),O2=xr("u"),$l=xr("bum"),Gl=xr("um"),B2=xr("sp"),L2=xr("rtg"),D2=xr("rtc");function N2(s,e=cs){uu("ec",s,e)}const U2=Symbol.for("v-ndc");function ci(s,e,t,i){let n;const r=t,a=ft(s);if(a||vi(s)){const o=a&&cr(s);let h=!1,l=!1;o&&(h=!Es(s),l=mr(s),s=ru(s)),n=new Array(s.length);for(let c=0,u=s.length;ce(o,h,void 0,r));else{const o=Object.keys(s);n=new Array(o.length);for(let h=0,l=o.length;h0;return ie(),Jt(Ke,null,[Ue("slot",l,i)],c?-2:64)}let a=s[e];a&&a._c&&(a._d=!1);const o=hr.length;ie();let h;try{const l=a&&rx(a(t)),c=t.key||r||l&&l.key;h=Jt(Ke,{key:(c&&!Cs(c)?c:`_${e}`)+(!l&&i?"_fb":"")},l||(i?i():[]),l&&s._===1?64:-2)}catch(l){for(let c=hr.length;c>o;c--)lp();throw l}finally{a&&a._c&&(a._d=!0)}return h}function rx(s){return s.some(e=>Il(e)?!(e.type===ts||e.type===Ke&&!rx(e.children)):!0)?s:null}const Of=s=>s?Tx(s)?mu(s):Of(s.parent):null,ml=Oi(Object.create(null),{$:s=>s,$el:s=>s.vnode.el,$data:s=>s.data,$props:s=>s.props,$attrs:s=>s.attrs,$slots:s=>s.slots,$refs:s=>s.refs,$parent:s=>Of(s.parent),$root:s=>Of(s.root),$host:s=>s.ce,$emit:s=>s.emit,$options:s=>ox(s),$forceUpdate:s=>s.f||(s.f=()=>{np(s.update)}),$nextTick:s=>s.n||(s.n=lu.bind(s.proxy)),$watch:s=>_2.bind(s)}),Xu=(s,e)=>s!==ti&&!s.__isScriptSetup&&zt(s,e),V2={get({_:s},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:n,props:r,accessCache:a,type:o,appContext:h}=s;if(e[0]!=="$"){const d=a[e];if(d!==void 0)switch(d){case 1:return i[e];case 2:return n[e];case 4:return t[e];case 3:return r[e]}else{if(Xu(i,e))return a[e]=1,i[e];if(n!==ti&&zt(n,e))return a[e]=2,n[e];if(zt(r,e))return a[e]=3,r[e];if(t!==ti&&zt(t,e))return a[e]=4,t[e];Bf&&(a[e]=0)}}const l=ml[e];let c,u;if(l)return e==="$attrs"&&Qi(s.attrs,"get",""),l(s);if((c=o.__cssModules)&&(c=c[e]))return c;if(t!==ti&&zt(t,e))return a[e]=4,t[e];if(u=h.config.globalProperties,zt(u,e))return u[e]},set({_:s},e,t){const{data:i,setupState:n,ctx:r}=s;return Xu(n,e)?(n[e]=t,!0):i!==ti&&zt(i,e)?(i[e]=t,!0):zt(s.props,e)||e[0]==="$"&&e.slice(1)in s?!1:(r[e]=t,!0)},has({_:{data:s,setupState:e,accessCache:t,ctx:i,appContext:n,props:r,type:a}},o){let h;return!!(t[o]||s!==ti&&o[0]!=="$"&&zt(s,o)||Xu(e,o)||zt(r,o)||zt(i,o)||zt(ml,o)||zt(n.config.globalProperties,o)||(h=a.__cssModules)&&h[o])},defineProperty(s,e,t){return t.get!=null?s._.accessCache[e]=0:zt(t,"value")&&this.set(s,e,t.value,null),Reflect.defineProperty(s,e,t)}};function qp(s){return ft(s)?s.reduce((e,t)=>(e[t]=null,e),{}):s}let Bf=!0;function Y2(s){const e=ox(s),t=s.proxy,i=s.ctx;Bf=!1,e.beforeCreate&&Kp(e.beforeCreate,s,"bc");const{data:n,computed:r,methods:a,watch:o,provide:h,inject:l,created:c,beforeMount:u,mounted:d,beforeUpdate:f,updated:p,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:b,destroyed:y,unmounted:w,render:A,renderTracked:T,renderTriggered:_,errorCaptured:R,serverPrefetch:P,expose:F,inheritAttrs:I,components:k,directives:B,filters:D}=e;if(l&&$2(l,i,null),a)for(const N in a){const O=a[N];Mt(O)&&(i[N]=O.bind(t))}if(n){const N=n.call(t,t);qt(N)&&(s.data=Da(N))}if(Bf=!0,r)for(const N in r){const O=r[N],X=Mt(O)?O.bind(t,t):Mt(O.get)?O.get.bind(t,t):On,E=!Mt(O)&&Mt(O.set)?O.set.bind(t):On,V=vt({get:X,set:E});Object.defineProperty(i,N,{enumerable:!0,configurable:!0,get:()=>V.value,set:q=>V.value=q})}if(o)for(const N in o)ax(o[N],i,t,N);if(h){const N=Mt(h)?h.call(t):h;Reflect.ownKeys(N).forEach(O=>{b2(O,N[O])})}c&&Kp(c,s,"c");function L(N,O){ft(O)?O.forEach(X=>N(X.bind(t))):O&&N(O.bind(t))}if(L(k2,u),L(Kr,d),L(F2,f),L(O2,p),L(I2,m),L(R2,g),L(N2,R),L(D2,T),L(L2,_),L($l,b),L(Gl,w),L(B2,P),ft(F))if(F.length){const N=s.exposed||(s.exposed={});F.forEach(O=>{Object.defineProperty(N,O,{get:()=>t[O],set:X=>t[O]=X,enumerable:!0})})}else s.exposed||(s.exposed={});A&&s.render===On&&(s.render=A),I!=null&&(s.inheritAttrs=I),k&&(s.components=k),B&&(s.directives=B),P&&sx(s)}function $2(s,e,t=On){ft(s)&&(s=Lf(s));for(const i in s){const n=s[i];let r;qt(n)?"default"in n?r=dl(n.from||i,n.default,!0):r=dl(n.from||i):r=dl(n),Si(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:a=>r.value=a}):e[i]=r}}function Kp(s,e,t){Vs(ft(s)?s.map(i=>i.bind(e.proxy)):s.bind(e.proxy),e,t)}function ax(s,e,t,i){let n=i.includes(".")?Zy(t,i):()=>t[i];if(vi(s)){const r=e[s];Mt(r)&&fs(n,r)}else if(Mt(s))fs(n,s.bind(t));else if(qt(s))if(ft(s))s.forEach(r=>ax(r,e,t,i));else{const r=Mt(s.handler)?s.handler.bind(t):e[s.handler];Mt(r)&&fs(n,r,s)}}function ox(s){const e=s.type,{mixins:t,extends:i}=e,{mixins:n,optionsCache:r,config:{optionMergeStrategies:a}}=s.appContext,o=r.get(e);let h;return o?h=o:!n.length&&!t&&!i?h=e:(h={},n.length&&n.forEach(l=>ch(h,l,a,!0)),ch(h,e,a)),qt(e)&&r.set(e,h),h}function ch(s,e,t,i=!1){const{mixins:n,extends:r}=e;r&&ch(s,r,t,!0),n&&n.forEach(a=>ch(s,a,t,!0));for(const a in e)if(!(i&&a==="expose")){const o=G2[a]||t&&t[a];s[a]=o?o(s[a],e[a]):e[a]}return s}const G2={data:Zp,props:Jp,emits:Jp,methods:Qo,computed:Qo,beforeCreate:as,created:as,beforeMount:as,mounted:as,beforeUpdate:as,updated:as,beforeDestroy:as,beforeUnmount:as,destroyed:as,unmounted:as,activated:as,deactivated:as,errorCaptured:as,serverPrefetch:as,components:Qo,directives:Qo,watch:j2,provide:Zp,inject:H2};function Zp(s,e){return e?s?function(){return Oi(Mt(s)?s.call(this,this):s,Mt(e)?e.call(this,this):e)}:e:s}function H2(s,e){return Qo(Lf(s),Lf(e))}function Lf(s){if(ft(s)){const e={};for(let t=0;te==="modelValue"||e==="model-value"?s.modelModifiers:s[`${e}Modifiers`]||s[`${nn(e)}Modifiers`]||s[`${qr(e)}Modifiers`];function K2(s,e,...t){if(s.isUnmounted)return;const i=s.vnode.props||ti;let n=t;const r=e.startsWith("update:"),a=r&&q2(i,e.slice(7));a&&(a.trim&&(n=t.map(c=>vi(c)?c.trim():c)),a.number&&(n=t.map(su)));let o,h=i[o=Ou(e)]||i[o=Ou(nn(e))];!h&&r&&(h=i[o=Ou(qr(e))]),h&&Vs(h,s,6,n);const l=i[o+"Once"];if(l){if(!s.emitted)s.emitted={};else if(s.emitted[o])return;s.emitted[o]=!0,Vs(l,s,6,n)}}const Z2=new WeakMap;function cx(s,e,t=!1){const i=t?Z2:e.emitsCache,n=i.get(s);if(n!==void 0)return n;const r=s.emits;let a={},o=!1;if(!Mt(s)){const h=l=>{const c=cx(l,e,!0);c&&(o=!0,Oi(a,c))};!t&&e.mixins.length&&e.mixins.forEach(h),s.extends&&h(s.extends),s.mixins&&s.mixins.forEach(h)}return!r&&!o?(qt(s)&&i.set(s,null),null):(ft(r)?r.forEach(h=>a[h]=null):Oi(a,r),qt(s)&&i.set(s,a),a)}function du(s,e){return!s||!Qh(e)?!1:(e=e.slice(2),e=e==="Once"?e:e.replace(/Once$/,""),zt(s,e[0].toLowerCase()+e.slice(1))||zt(s,qr(e))||zt(s,e))}function Qp(s){const{type:e,vnode:t,proxy:i,withProxy:n,propsOptions:[r],slots:a,attrs:o,emit:h,render:l,renderCache:c,props:u,data:d,setupState:f,ctx:p,inheritAttrs:m}=s,g=rh(s);let v,b;try{if(t.shapeFlag&4){const w=n||i,A=w;v=En(l.call(A,w,c,u,f,d,p)),b=o}else{const w=e;v=En(w.length>1?w(u,{attrs:o,slots:a,emit:h}):w(u,null)),b=e.props?o:J2(o)}}catch(w){hr.length=0,ou(w,s,1),v=Ue(ts)}let y=v;if(b&&m!==!1){const w=Object.keys(b),{shapeFlag:A}=y;w.length&&A&7&&(r&&w.some(eu)&&(b=Q2(b,r)),y=Hr(y,b,!1,!0))}if(t.dirs&&(y=Hr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(t.dirs):t.dirs),t.transition){const w=cu(y.type)&&oh(y)||y;El(w,t.transition)}return v=y,rh(g),v}const J2=s=>{let e;for(const t in s)(t==="class"||t==="style"||Qh(t))&&((e||(e={}))[t]=s[t]);return e},Q2=(s,e)=>{const t={};for(const i in s)(!eu(i)||!(i.slice(9)in e))&&(t[i]=s[i]);return t};function eM(s,e,t){const{props:i,children:n,component:r}=s,{props:a,children:o,patchFlag:h}=e,l=r.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&h>=0){if(h&1024)return!0;if(h&16)return i?eg(i,a,l):!!a;if(h&8){const c=e.dynamicProps;for(let u=0;uObject.create(ux),fx=s=>Object.getPrototypeOf(s)===ux;function iM(s,e,t,i=!1){const n={},r=dx();s.propsDefaults=Object.create(null),mx(s,e,n,r);for(const a in s.propsOptions[0])a in n||(n[a]=void 0);t?s.props=i?n:a2(n):s.type.props?s.props=n:s.props=r,s.attrs=r}function sM(s,e,t,i){const{props:n,attrs:r,vnode:{patchFlag:a}}=s,o=$t(n),[h]=s.propsOptions;let l=!1;if((i||a>0)&&!(a&16)){if(a&8){const c=s.vnode.dynamicProps;for(let u=0;u{h=!0;const[d,f]=px(u,e,!0);Oi(a,d),f&&o.push(...f)};!t&&e.mixins.length&&e.mixins.forEach(c),s.extends&&c(s.extends),s.mixins&&s.mixins.forEach(c)}if(!r&&!h)return qt(s)&&i.set(s,fo),fo;if(ft(r))for(let c=0;cs==="_"||s==="_ctx"||s==="$stable",op=s=>ft(s)?s.map(En):[En(s)],rM=(s,e,t)=>{if(e._n)return e;const i=ah((...n)=>op(e(...n)),t);return i._c=!1,i},gx=(s,e,t)=>{const i=s._ctx;for(const n in s){if(ap(n))continue;const r=s[n];if(Mt(r))e[n]=rM(n,r,i);else if(r!=null){const a=op(r);e[n]=()=>a}}},vx=(s,e)=>{const t=op(e);s.slots.default=()=>t},yx=(s,e,t)=>{for(const i in e)(t||!ap(i))&&(s[i]=e[i])},aM=(s,e,t)=>{const i=s.slots=dx();if(s.vnode.shapeFlag&32){const n=e._;n?(yx(i,e,t),t&&_y(i,"_",n,!0)):gx(e,i)}else e&&vx(s,e)},oM=(s,e,t)=>{const{vnode:i,slots:n}=s;let r=!0,a=ti;if(i.shapeFlag&32){const o=e._;o?t&&o===1?r=!1:yx(n,e,t):(r=!e.$stable,gx(e,n)),a=e}else e&&(vx(s,e),a={default:1});if(r)for(const o in n)!ap(o)&&a[o]==null&&delete n[o]},ms=dM;function lM(s){return cM(s)}function cM(s,e){const t=nu();t.__VUE__=!0;const{insert:i,remove:n,patchProp:r,createElement:a,createText:o,createComment:h,setText:l,setElementText:c,parentNode:u,nextSibling:d,setScopeId:f=On,insertStaticContent:p}=s,m=(G,Z,z,j=null,te=null,he=null,xe=void 0,oe=null,ge=!!Z.dynamicChildren)=>{if(G===Z)return;G&&!ga(G,Z)&&(j=me(G),q(G,te,he,!0),G=null),Z.patchFlag===-2&&(ge=!1,Z.dynamicChildren=null);const{type:le,ref:Oe,shapeFlag:Fe}=Z;switch(le){case fu:g(G,Z,z,j);break;case ts:v(G,Z,z,j);break;case Xc:G==null&&b(Z,z,j,xe);break;case Ke:k(G,Z,z,j,te,he,xe,oe,ge);break;default:Fe&1?A(G,Z,z,j,te,he,xe,oe,ge):Fe&6?B(G,Z,z,j,te,he,xe,oe,ge):(Fe&64||Fe&128)&&le.process(G,Z,z,j,te,he,xe,oe,ge,pe)}Oe!=null&&te?fl(Oe,G&&G.ref,he,Z||G,!Z):Oe==null&&G&&G.ref!=null&&fl(G.ref,null,he,G,!0)},g=(G,Z,z,j)=>{if(G==null)i(Z.el=o(Z.children),z,j);else{const te=Z.el=G.el;Z.children!==G.children&&l(te,Z.children)}},v=(G,Z,z,j)=>{G==null?i(Z.el=h(Z.children||""),z,j):Z.el=G.el},b=(G,Z,z,j)=>{[G.el,G.anchor]=p(G.children,Z,z,j,G.el,G.anchor)},y=({el:G,anchor:Z},z,j)=>{let te;for(;G&&G!==Z;)te=d(G),i(G,z,j),G=te;i(Z,z,j)},w=({el:G,anchor:Z})=>{let z;for(;G&&G!==Z;)z=d(G),n(G),G=z;n(Z)},A=(G,Z,z,j,te,he,xe,oe,ge)=>{if(Z.type==="svg"?xe="svg":Z.type==="math"&&(xe="mathml"),G==null)T(Z,z,j,te,he,xe,oe,ge);else{const le=G.el&&G.el._isVueCE?G.el:null;try{le&&le._beginPatch(),P(G,Z,te,he,xe,oe,ge)}finally{le&&le._endPatch()}}},T=(G,Z,z,j,te,he,xe,oe)=>{let ge,le;const{props:Oe,shapeFlag:Fe,transition:Be,dirs:st}=G;if(ge=G.el=a(G.type,he,Oe&&Oe.is,Oe),Fe&8?c(ge,G.children):Fe&16&&R(G.children,ge,null,j,te,Vu(G,he),xe,oe),st&&ia(G,null,j,"created"),_(ge,G,G.scopeId,xe,j),Oe){for(const At in Oe)At!=="value"&&!cl(At)&&r(ge,At,null,Oe[At],he,j);"value"in Oe&&r(ge,"value",null,Oe.value,he),(le=Oe.onVnodeBeforeMount)&&fn(le,j,G)}st&&ia(G,null,j,"beforeMount");const St=hM(te,Be);St&&Be.beforeEnter(ge),i(ge,Z,z),((le=Oe&&Oe.onVnodeMounted)||St||st)&&ms(()=>{try{le&&fn(le,j,G),St&&Be.enter(ge),st&&ia(G,null,j,"mounted")}finally{}},te)},_=(G,Z,z,j,te)=>{if(z&&f(G,z),j)for(let he=0;he{for(let le=ge;le{const oe=Z.el=G.el;let{patchFlag:ge,dynamicChildren:le,dirs:Oe}=Z;ge|=G.patchFlag&16;const Fe=G.props||ti,Be=Z.props||ti;let st;if(z&&sa(z,!1),(st=Be.onVnodeBeforeUpdate)&&fn(st,z,Z,G),Oe&&ia(Z,G,z,"beforeUpdate"),z&&sa(z,!0),le&&(!G.dynamicChildren||G.dynamicChildren.length!==le.length)&&(ge=0,xe=!1,le=null),(Fe.innerHTML&&Be.innerHTML==null||Fe.textContent&&Be.textContent==null)&&c(oe,""),le?F(G.dynamicChildren,le,oe,z,j,Vu(Z,te),he):xe||O(G,Z,oe,null,z,j,Vu(Z,te),he,!1),ge>0){if(ge&16)I(oe,Fe,Be,z,te);else if(ge&2&&Fe.class!==Be.class&&r(oe,"class",null,Be.class,te),ge&4&&r(oe,"style",Fe.style,Be.style,te),ge&8){const St=Z.dynamicProps;for(let At=0;At{st&&fn(st,z,Z,G),Oe&&ia(Z,G,z,"updated")},j)},F=(G,Z,z,j,te,he,xe)=>{for(let oe=0;oe{if(Z!==z){if(Z!==ti)for(const he in Z)!cl(he)&&!(he in z)&&r(G,he,Z[he],null,te,j);for(const he in z){if(cl(he))continue;const xe=z[he],oe=Z[he];xe!==oe&&he!=="value"&&r(G,he,oe,xe,te,j)}"value"in z&&r(G,"value",Z.value,z.value,te)}},k=(G,Z,z,j,te,he,xe,oe,ge)=>{const le=Z.el=G?G.el:o(""),Oe=Z.anchor=G?G.anchor:o("");let{patchFlag:Fe,dynamicChildren:Be,slotScopeIds:st}=Z;st&&(oe=oe?oe.concat(st):st),G==null?(i(le,z,j),i(Oe,z,j),R(Z.children||[],z,Oe,te,he,xe,oe,ge)):Fe>0&&Fe&64&&Be&&G.dynamicChildren&&G.dynamicChildren.length===Be.length?(F(G.dynamicChildren,Be,z,te,he,xe,oe),(Z.key!=null||te&&Z===te.subTree)&&xx(G,Z,!0)):O(G,Z,z,Oe,te,he,xe,oe,ge)},B=(G,Z,z,j,te,he,xe,oe,ge)=>{Z.slotScopeIds=oe,G==null?Z.shapeFlag&512?te.ctx.activate(Z,z,j,xe,ge):D(Z,z,j,te,he,xe,ge):U(G,Z,ge)},D=(G,Z,z,j,te,he,xe)=>{const oe=G.component=yM(G,j,te);if(hu(G)&&(oe.ctx.renderer=pe),xM(oe,!1,xe),oe.asyncDep){if(te&&te.registerDep(oe,L,xe),!G.el){const ge=oe.subTree=Ue(ts);v(null,ge,Z,z),G.placeholder=ge.el}}else L(oe,G,Z,z,te,he,xe)},U=(G,Z,z)=>{const j=Z.component=G.component;if(eM(G,Z,z))if(j.asyncDep&&!j.asyncResolved){N(j,Z,z);return}else j.next=Z,j.update();else Z.el=G.el,j.vnode=Z},L=(G,Z,z,j,te,he,xe)=>{const oe=()=>{if(G.isMounted){let{next:Fe,bu:Be,u:st,parent:St,vnode:At}=G;{const Wi=bx(G);if(Wi){Fe&&(Fe.el=At.el,N(G,Fe,xe)),Wi.asyncDep.then(()=>{ms(()=>{G.isUnmounted||le()},te)});return}}let Et=Fe,It;sa(G,!1),Fe?(Fe.el=At.el,N(G,Fe,xe)):Fe=At,Be&&Uc(Be),(It=Fe.props&&Fe.props.onVnodeBeforeUpdate)&&fn(It,St,Fe,At),sa(G,!0);const Kt=Qp(G),Ti=G.subTree;G.subTree=Kt,m(Ti,Kt,u(Ti.el),me(Ti),G,te,he),Fe.el=Kt.el,Et===null&&tM(G,Kt.el),st&&ms(st,te),(It=Fe.props&&Fe.props.onVnodeUpdated)&&ms(()=>fn(It,St,Fe,At),te)}else{let Fe;const{el:Be,props:st}=Z,{bm:St,m:At,parent:Et,root:It,type:Kt}=G,Ti=go(Z);sa(G,!1),St&&Uc(St),!Ti&&(Fe=st&&st.onVnodeBeforeMount)&&fn(Fe,Et,Z),sa(G,!0);{It.ce&&It.ce._hasShadowRoot()&&It.ce._injectChildStyle(Kt,G.parent?G.parent.type:void 0);const Wi=G.subTree=Qp(G);m(null,Wi,z,j,G,te,he),Z.el=Wi.el}if(At&&ms(At,te),!Ti&&(Fe=st&&st.onVnodeMounted)){const Wi=Z;ms(()=>fn(Fe,Et,Wi),te)}(Z.shapeFlag&256||Et&&go(Et.vnode)&&Et.vnode.shapeFlag&256)&&G.a&&ms(G.a,te),G.isMounted=!0,Z=z=j=null}};G.scope.on();const ge=G.effect=new Py(oe);G.scope.off();const le=G.update=ge.run.bind(ge),Oe=G.job=ge.runIfDirty.bind(ge);Oe.i=G,Oe.id=G.uid,ge.scheduler=()=>np(Oe),sa(G,!0),le()},N=(G,Z,z)=>{Z.component=G;const j=G.vnode.props;G.vnode=Z,G.next=null,sM(G,Z.props,j,z),oM(G,Z.children,z),dr(),jp(G),fr()},O=(G,Z,z,j,te,he,xe,oe,ge=!1)=>{const le=G&&G.children,Oe=G?G.shapeFlag:0,Fe=Z.children,{patchFlag:Be,shapeFlag:st}=Z;if(Be>0){if(Be&128){E(le,Fe,z,j,te,he,xe,oe,ge);return}else if(Be&256){X(le,Fe,z,j,te,he,xe,oe,ge);return}}st&8?(Oe&16&&fe(le,te,he),Fe!==le&&c(z,Fe)):Oe&16?st&16?E(le,Fe,z,j,te,he,xe,oe,ge):fe(le,te,he,!0):(Oe&8&&c(z,""),st&16&&R(Fe,z,j,te,he,xe,oe,ge))},X=(G,Z,z,j,te,he,xe,oe,ge)=>{G=G||fo,Z=Z||fo;const le=G.length,Oe=Z.length,Fe=Math.min(le,Oe);let Be;for(Be=0;BeOe?fe(G,te,he,!0,!1,Fe):R(Z,z,j,te,he,xe,oe,ge,Fe)},E=(G,Z,z,j,te,he,xe,oe,ge)=>{let le=0;const Oe=Z.length;let Fe=G.length-1,Be=Oe-1;for(;le<=Fe&&le<=Be;){const st=G[le],St=Z[le]=ge?Jn(Z[le]):En(Z[le]);if(ga(st,St))m(st,St,z,null,te,he,xe,oe,ge);else break;le++}for(;le<=Fe&&le<=Be;){const st=G[Fe],St=Z[Be]=ge?Jn(Z[Be]):En(Z[Be]);if(ga(st,St))m(st,St,z,null,te,he,xe,oe,ge);else break;Fe--,Be--}if(le>Fe){if(le<=Be){const st=Be+1,St=stBe)for(;le<=Fe;)q(G[le],te,he,!0),le++;else{const st=le,St=le,At=new Map;for(le=St;le<=Be;le++){const di=Z[le]=ge?Jn(Z[le]):En(Z[le]);di.key!=null&&At.set(di.key,le)}let Et,It=0;const Kt=Be-St+1;let Ti=!1,Wi=0;const zi=new Array(Kt);for(le=0;le=Kt){q(di,te,he,!0);continue}let ce;if(di.key!=null)ce=At.get(di.key);else for(Et=St;Et<=Be;Et++)if(zi[Et-St]===0&&ga(di,Z[Et])){ce=Et;break}ce===void 0?q(di,te,he,!0):(zi[ce-St]=le+1,ce>=Wi?Wi=ce:Ti=!0,m(di,Z[ce],z,null,te,he,xe,oe,ge),It++)}const dn=Ti?uM(zi):fo;for(Et=dn.length-1,le=Kt-1;le>=0;le--){const di=St+le,ce=Z[di],de=Z[di+1],Rt=di+1{const{el:he,type:xe,transition:oe,children:ge,shapeFlag:le}=G;if(le&6){V(G.component.subTree,Z,z,j);return}if(le&128){G.suspense.move(Z,z,j);return}if(le&64){xe.move(G,Z,z,pe);return}if(xe===Ke){i(he,Z,z);for(let Fe=0;Feoe.enter(he),te));else{const{leave:Fe,delayLeave:Be,afterLeave:st}=oe,St=()=>{G.ctx.isUnmounted?n(he):i(he,Z,z)},At=()=>{const Et=he._isLeaving||!!he[Ds];he._isLeaving&&he[Ds](!0),oe.persisted&&!Et?St():Fe(he,()=>{St(),st&&st()})};Be?Be(he,St,At):At()}else i(he,Z,z)},q=(G,Z,z,j=!1,te=!1)=>{const{type:he,props:xe,ref:oe,children:ge,dynamicChildren:le,shapeFlag:Oe,patchFlag:Fe,dirs:Be,cacheIndex:st,memo:St}=G;if(Fe===-2&&(te=!1),oe!=null&&(dr(),fl(oe,null,z,G,!0),fr()),st!=null&&(Z.renderCache[st]=void 0),Oe&256){Z.ctx.deactivate(G);return}const At=Oe&1&&Be,Et=!go(G);let It;if(Et&&(It=xe&&xe.onVnodeBeforeUnmount)&&fn(It,Z,G),Oe&6)K(G.component,z,j);else{if(Oe&128){G.suspense.unmount(z,j);return}At&&ia(G,null,Z,"beforeUnmount"),Oe&64?G.type.remove(G,Z,z,pe,j):le&&!le.hasOnce&&(he!==Ke||Fe>0&&Fe&64)?fe(le,Z,z,!1,!0):(he===Ke&&Fe&384||!te&&Oe&16)&&fe(ge,Z,z),j&&W(G)}const Kt=St!=null&&st==null;(Et&&(It=xe&&xe.onVnodeUnmounted)||At||Kt)&&ms(()=>{It&&fn(It,Z,G),At&&ia(G,null,Z,"unmounted"),Kt&&(G.el=null)},z)},W=G=>{const{type:Z,el:z,anchor:j,transition:te}=G;if(Z===Ke){J(z,j);return}if(Z===Xc){w(G);return}const he=()=>{n(z),te&&!te.persisted&&te.afterLeave&&te.afterLeave()};if(G.shapeFlag&1&&te&&!te.persisted){const{leave:xe,delayLeave:oe}=te,ge=()=>xe(z,he);oe?oe(G.el,he,ge):ge()}else he()},J=(G,Z)=>{let z;for(;G!==Z;)z=d(G),n(G),G=z;n(Z)},K=(G,Z,z)=>{const{bum:j,scope:te,job:he,subTree:xe,um:oe,m:ge,a:le}=G;ig(ge),ig(le),j&&Uc(j),te.stop(),he&&(he.flags|=8,q(xe,G,Z,z)),oe&&ms(oe,Z),ms(()=>{G.isUnmounted=!0},Z)},fe=(G,Z,z,j=!1,te=!1,he=0)=>{for(let xe=he;xe{if(G.shapeFlag&6)return me(G.component.subTree);if(G.shapeFlag&128)return G.suspense.next();const Z=d(G.anchor||G.el),z=Z&&Z[T2];return z?d(z):Z};let we=!1;const Ee=(G,Z,z)=>{let j;G==null?Z._vnode&&(q(Z._vnode,null,null,!0),j=Z._vnode.component):m(Z._vnode||null,G,Z,null,null,null,z),Z._vnode=G,we||(we=!0,jp(j),zy(),we=!1)},pe={p:m,um:q,m:V,r:W,mt:D,mc:R,pc:O,pbc:F,n:me,o:s};return{render:Ee,hydrate:void 0,createApp:z2(Ee)}}function Vu({type:s,props:e},t){return t==="svg"&&s==="foreignObject"||t==="mathml"&&s==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function sa({effect:s,job:e},t){t?(s.flags|=32,e.flags|=4):(s.flags&=-33,e.flags&=-5)}function hM(s,e){return(!s||s&&!s.pendingBranch)&&e&&!e.persisted}function xx(s,e,t=!1){const i=s.children,n=e.children;if(ft(i)&&ft(n))for(let r=0;r>1,s[t[o]]0&&(e[i]=t[r-1]),t[r]=i)}}for(r=t.length,a=t[r-1];r-- >0;)t[r]=a,a=e[a];return t}function bx(s){const e=s.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:bx(e)}function ig(s){if(s)for(let e=0;es.__isSuspense;function dM(s,e){e&&e.pendingBranch?ft(s)?e.effects.push(...s):e.effects.push(s):x2(s)}const Ke=Symbol.for("v-fgt"),fu=Symbol.for("v-txt"),ts=Symbol.for("v-cmt"),Xc=Symbol.for("v-stc"),hr=[];let As=null;function ie(s=!1){hr.push(As=s?null:[])}function lp(){hr.pop(),As=hr[hr.length-1]||null}let Cl=1;function hh(s,e=!1){Cl+=s,s<0&&As&&e&&(As.hasOnce=!0)}function Mx(s){return s.dynamicChildren=Cl>0?As||fo:null,lp(),Cl>0&&As&&As.push(s),s}function ae(s,e,t,i,n,r){return Mx(M(s,e,t,i,n,r,!0))}function Jt(s,e,t,i,n){return Mx(Ue(s,e,t,i,n,!0))}function Il(s){return s?s.__v_isVNode===!0:!1}function ga(s,e){return s.type===e.type&&s.key===e.key}const _x=({key:s})=>s??null,Vc=({ref:s,ref_key:e,ref_for:t})=>(typeof s=="number"&&(s=""+s),s!=null?vi(s)||Si(s)||Mt(s)?{i:is,r:s,k:e,f:!!t}:s:null);function M(s,e=null,t=null,i=0,n=null,r=s===Ke?0:1,a=!1,o=!1){const h={__v_isVNode:!0,__v_skip:!0,type:s,props:e,key:e&&_x(e),ref:e&&Vc(e),scopeId:Ky,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:is};return o?(uh(h,t),r&128&&s.normalize(h)):t&&(h.shapeFlag|=vi(t)?8:16),Cl>0&&!a&&As&&(h.patchFlag>0||r&6)&&h.patchFlag!==32&&As.push(h),h}const Ue=fM;function fM(s,e=null,t=null,i=0,n=null,r=!1){if((!s||s===U2)&&(s=ts),Il(s)){const o=Hr(s,e,!0);return t&&uh(o,t),Cl>0&&!r&&As&&(o.shapeFlag&6?As[As.indexOf(s)]=o:As.push(o)),o.patchFlag=-2,o}if(MM(s)&&(s=s.__vccOpts),e){e=mM(e);let{class:o,style:h}=e;o&&!vi(o)&&(e.class=Ze(o)),qt(h)&&(au(h)&&!ft(h)&&(h=Oi({},h)),e.style=Li(h))}const a=vi(s)?1:Sx(s)?128:cu(s)?64:qt(s)?4:Mt(s)?2:0;return M(s,e,t,i,n,a,r,!0)}function mM(s){return s?au(s)||fx(s)?Oi({},s):s:null}function Hr(s,e,t=!1,i=!1){const{props:n,ref:r,patchFlag:a,children:o,transition:h}=s,l=e?pM(n||{},e):n,c={__v_isVNode:!0,__v_skip:!0,type:s.type,props:l,key:l&&_x(l),ref:e&&e.ref?t&&r?ft(r)?r.concat(Vc(e)):[r,Vc(e)]:Vc(e):r,scopeId:s.scopeId,slotScopeIds:s.slotScopeIds,children:o,target:s.target,targetStart:s.targetStart,targetAnchor:s.targetAnchor,staticCount:s.staticCount,shapeFlag:s.shapeFlag,patchFlag:e&&s.type!==Ke?a===-1?16:a|16:a,dynamicProps:s.dynamicProps,dynamicChildren:s.dynamicChildren,appContext:s.appContext,dirs:s.dirs,transition:h,component:s.component,suspense:s.suspense,ssContent:s.ssContent&&Hr(s.ssContent),ssFallback:s.ssFallback&&Hr(s.ssFallback),placeholder:s.placeholder,el:s.el,anchor:s.anchor,ctx:s.ctx,ce:s.ce};return h&&i&&El(c,h.clone(c)),c}function Qt(s=" ",e=0){return Ue(fu,null,s,e)}function Ts(s,e){const t=Ue(Xc,null,s);return t.staticCount=e,t}function Ve(s="",e=!1){return e?(ie(),Jt(ts,null,s)):Ue(ts,null,s)}function En(s){return s==null||typeof s=="boolean"?Ue(ts):ft(s)?Ue(Ke,null,s.slice()):Il(s)?Jn(s):Ue(fu,null,String(s))}function Jn(s){return s.el===null&&s.patchFlag!==-1||s.memo?s:Hr(s)}function uh(s,e){let t=0;const{shapeFlag:i}=s;if(e==null)e=null;else if(ft(e))t=16;else if(typeof e=="object")if(i&65){const n=e.default;n&&(n._c&&(n._d=!1),uh(s,n()),n._c&&(n._d=!0));return}else{t=32;const n=e._;!n&&!fx(e)?e._ctx=is:n===3&&is&&(is.slots._===1?e._=1:(e._=2,s.patchFlag|=1024))}else if(Mt(e)){if(i&65){uh(s,{default:e});return}e={default:e,_ctx:is},t=32}else e=String(e),i&64?(t=16,e=[Qt(e)]):t=8;s.children=e,s.shapeFlag|=t}function pM(...s){const e={};for(let t=0;tcs||is;let dh,Rl;{const s=nu(),e=(t,i)=>{let n;return(n=s[t])||(n=s[t]=[]),n.push(i),r=>{n.length>1?n.forEach(a=>a(r)):n[0](r)}};dh=e("__VUE_INSTANCE_SETTERS__",t=>cs=t),Rl=e("__VUE_SSR_SETTERS__",t=>Pl=t)}const Hl=s=>{const e=cs;return dh(s),s.scope.on(),()=>{s.scope.off(),dh(e)}},sg=()=>{cs&&cs.scope.off(),dh(null)};function Tx(s){return s.vnode.shapeFlag&4}let Pl=!1;function xM(s,e=!1,t=!1){e&&Rl(e);const{props:i,children:n}=s.vnode,r=Tx(s);iM(s,i,r,e),aM(s,n,t||e);const a=r?bM(s,e):void 0;return e&&Rl(!1),a}function bM(s,e){const t=s.type;s.accessCache=Object.create(null),s.proxy=new Proxy(s.ctx,V2);const{setup:i}=t;if(i){dr();const n=s.setupContext=i.length>1?SM(s):null,r=Hl(s),a=Yl(i,s,0,[s.props,n]),o=by(a);if(fr(),r(),(o||s.sp)&&!go(s)&&sx(s),o){if(a.then(sg,sg),e)return a.then(h=>{Rl(!0);try{ng(s,h,e)}finally{Rl(!1)}}).catch(h=>{ou(h,s,0)});s.asyncDep=a}else ng(s,a)}else Ax(s)}function ng(s,e,t){Mt(e)?s.type.__ssrInlineRender?s.ssrRender=e:s.render=e:qt(e)&&(s.setupState=Hy(e)),Ax(s)}function Ax(s,e,t){const i=s.type;s.render||(s.render=i.render||On);{const n=Hl(s);dr();try{Y2(s)}finally{fr(),n()}}}const wM={get(s,e){return Qi(s,"get",""),s[e]}};function SM(s){const e=t=>{s.exposed=t||{}};return{attrs:new Proxy(s.attrs,wM),slots:s.slots,emit:s.emit,expose:e}}function mu(s){return s.exposed?s.exposeProxy||(s.exposeProxy=new Proxy(Hy(Dr(s.exposed)),{get(e,t){if(t in e)return e[t];if(t in ml)return ml[t](s)},has(e,t){return t in e||t in ml}})):s.proxy}function MM(s){return Mt(s)&&"__vccOpts"in s}const vt=(s,e)=>m2(s,e,Pl);function _M(s,e,t){try{hh(-1);const i=arguments.length;return i===2?qt(e)&&!ft(e)?Il(e)?Ue(s,null,[e]):Ue(s,e):Ue(s,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Il(t)&&(t=[t]),Ue(s,e,t))}finally{hh(1)}}const TM="3.5.41";/** * @vue/runtime-dom v3.5.41 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Nf;const rg=typeof window<"u"&&window.trustedTypes;if(rg)try{Nf=rg.createPolicy("vue",{createHTML:s=>s})}catch{}const Ex=Nf?s=>Nf.createHTML(s):s=>s,A_="http://www.w3.org/2000/svg",E_="http://www.w3.org/1998/Math/MathML",Wn=typeof document<"u"?document:null,ag=Wn&&Wn.createElement("template"),C_={insert:(s,e,t)=>{e.insertBefore(s,t||null)},remove:s=>{const e=s.parentNode;e&&e.removeChild(s)},createElement:(s,e,t,i)=>{const n=e==="svg"?Wn.createElementNS(A_,s):e==="mathml"?Wn.createElementNS(E_,s):t?Wn.createElement(s,{is:t}):Wn.createElement(s);return s==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:s=>Wn.createTextNode(s),createComment:s=>Wn.createComment(s),setText:(s,e)=>{s.nodeValue=e},setElementText:(s,e)=>{s.textContent=e},parentNode:s=>s.parentNode,nextSibling:s=>s.nextSibling,querySelector:s=>Wn.querySelector(s),setScopeId(s,e){s.setAttribute(e,"")},insertStaticContent(s,e,t,i,n,r){const a=t?t.previousSibling:e.lastChild;if(n&&(n===r||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),t),!(n===r||!(n=n.nextSibling)););else{ag.innerHTML=Ex(i==="svg"?`${s}`:i==="mathml"?`${s}`:s);const o=ag.content;if(i==="svg"||i==="mathml"){const h=o.firstChild;for(;h.firstChild;)o.appendChild(h.firstChild);o.removeChild(h)}e.insertBefore(o,t)}return[a?a.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},wr="transition",Go="animation",kl=Symbol("_vtc"),Cx={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},I_=Oi({},Jy,Cx),R_=s=>(s.displayName="Transition",s.props=I_,s),P_=R_((s,{slots:e})=>__(CM,k_(s),e)),na=(s,e=[])=>{ft(s)?s.forEach(t=>t(...e)):s&&s(...e)},og=s=>s?ft(s)?s.some(e=>e.length>1):s.length>1:!1;function k_(s){const e={};for(const k in s)k in Cx||(e[k]=s[k]);if(s.css===!1)return e;const{name:t="v",type:i,duration:n,enterFromClass:r=`${t}-enter-from`,enterActiveClass:a=`${t}-enter-active`,enterToClass:o=`${t}-enter-to`,appearFromClass:h=r,appearActiveClass:l=a,appearToClass:c=o,leaveFromClass:u=`${t}-leave-from`,leaveActiveClass:d=`${t}-leave-active`,leaveToClass:f=`${t}-leave-to`}=s,p=F_(n),m=p&&p[0],g=p&&p[1],{onBeforeEnter:v,onEnter:b,onEnterCancelled:y,onLeave:w,onLeaveCancelled:A,onBeforeAppear:T=v,onAppear:_=b,onAppearCancelled:R=y}=e,P=(k,B,D,U)=>{k._enterCancelled=U,ra(k,B?c:o),ra(k,B?l:a),D&&D()},F=(k,B)=>{k._isLeaving=!1,ra(k,u),ra(k,f),ra(k,d),B&&B()},I=k=>(B,D)=>{const U=k?_:b,L=()=>P(B,k,D);na(U,[B,L]),lg(()=>{ra(B,k?h:r),$n(B,k?c:o),og(U)||cg(B,i,m,L)})};return Oi(e,{onBeforeEnter(k){na(v,[k]),$n(k,r),$n(k,a)},onBeforeAppear(k){na(T,[k]),$n(k,h),$n(k,l)},onEnter:I(!1),onAppear:I(!0),onLeave(k,B){k._isLeaving=!0;const D=()=>F(k,B);$n(k,u),k._enterCancelled?($n(k,d),dg(k)):(dg(k),$n(k,d)),lg(()=>{k._isLeaving&&(ra(k,u),$n(k,f),og(w)||cg(k,i,g,D))}),na(w,[k,D])},onEnterCancelled(k){P(k,!1,void 0,!0),na(y,[k])},onAppearCancelled(k){P(k,!0,void 0,!0),na(R,[k])},onLeaveCancelled(k){F(k),na(A,[k])}})}function F_(s){if(s==null)return null;if(qt(s))return[Yu(s.enter),Yu(s.leave)];{const e=Yu(s);return[e,e]}}function Yu(s){return FS(s)}function $n(s,e){e.split(/\s+/).forEach(t=>t&&s.classList.add(t)),(s[kl]||(s[kl]=new Set)).add(e)}function ra(s,e){e.split(/\s+/).forEach(i=>i&&s.classList.remove(i));const t=s[kl];t&&(t.delete(e),t.size||(s[kl]=void 0))}function lg(s){requestAnimationFrame(()=>{requestAnimationFrame(s)})}let O_=0;function cg(s,e,t,i){const n=s._endId=++O_,r=()=>{n===s._endId&&i()};if(t!=null)return setTimeout(r,t);const{type:a,timeout:o,propCount:h}=B_(s,e);if(!a)return i();const l=a+"end";let c=0;const u=()=>{s.removeEventListener(l,d),r()},d=f=>{f.target===s&&++c>=h&&u()};setTimeout(()=>{c(t[p]||"").split(", "),n=i(`${wr}Delay`),r=i(`${wr}Duration`),a=hg(n,r),o=i(`${Go}Delay`),h=i(`${Go}Duration`),l=hg(o,h);let c=null,u=0,d=0;e===wr?a>0&&(c=wr,u=a,d=r.length):e===Go?l>0&&(c=Go,u=l,d=h.length):(u=Math.max(a,l),c=u>0?a>l?wr:Go:null,d=c?c===wr?r.length:h.length:0);const f=c===wr&&/\b(?:transform|all)(?:,|$)/.test(i(`${wr}Property`).toString());return{type:c,timeout:u,propCount:d,hasTransform:f}}function hg(s,e){for(;s.lengthug(t)+ug(s[i])))}function ug(s){return s==="auto"?0:Number(s.slice(0,-1).replace(",","."))*1e3}function dg(s){return(s?s.ownerDocument:document).body.offsetHeight}function L_(s,e,t){const i=s[kl];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?s.removeAttribute("class"):t?s.setAttribute("class",e):s.className=e}const fh=Symbol("_vod"),Ix=Symbol("_vsh"),Yi={name:"show",beforeMount(s,{value:e},{transition:t}){s[fh]=s.style.display==="none"?"":s.style.display,t&&e?t.beforeEnter(s):Ho(s,e)},mounted(s,{value:e},{transition:t}){t&&e&&t.enter(s)},updated(s,{value:e,oldValue:t},{transition:i}){!e!=!t&&(i?e?(i.beforeEnter(s),Ho(s,!0),i.enter(s)):i.leave(s,()=>{Ho(s,!1)}):Ho(s,e))},beforeUnmount(s,{value:e}){Ho(s,e)}};function Ho(s,e){s.style.display=e?s[fh]:"none",s[Ix]=!e}const D_=Symbol(""),N_=/(?:^|;)\s*display\s*:/;function U_(s,e,t){const i=s.style,n=vi(t);let r=!1;if(t&&!n){if(e)if(vi(e))for(const a of e.split(";")){const o=a.slice(0,a.indexOf(":")).trim();t[o]==null&&el(i,o,"")}else for(const a in e)t[a]==null&&el(i,a,"");for(const a in t){a==="display"&&(r=!0);const o=t[a];o!=null?V_(s,a,!vi(e)&&e?e[a]:void 0,o)||el(i,a,o):el(i,a,"")}}else if(n){if(e!==t){const a=i[D_];a&&(t+=";"+a),i.cssText=t,r=N_.test(t)}}else e&&s.removeAttribute("style");fh in s&&(s[fh]=r?i.display:"",s[Ix]&&(i.display="none"))}const fg=/\s*!important$/;function el(s,e,t){if(ft(t))t.forEach(i=>el(s,e,i));else if(t==null&&(t=""),e.startsWith("--"))s.setProperty(e,t);else{const i=X_(s,e);fg.test(t)?s.setProperty(qr(i),t.replace(fg,""),"important"):s[i]=t}}const mg=["Webkit","Moz","ms"],$u={};function X_(s,e){const t=$u[e];if(t)return t;let i=nn(e);if(i!=="filter"&&i in s)return $u[e]=i;i=My(i);for(let n=0;nGu||(W_.then(()=>Gu=0),Gu=Date.now());function q_(s,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;const n=t.value;if(ft(n)){const r=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0};const a=n.slice(),o=[i];for(let h=0;hs.charCodeAt(0)===111&&s.charCodeAt(1)===110&&s.charCodeAt(2)>96&&s.charCodeAt(2)<123,K_=(s,e,t,i,n,r)=>{const a=n==="svg";e==="class"?L_(s,i,a):e==="style"?U_(s,t,i):Qh(e)?eu(e)||$_(s,e,t,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Z_(s,e,i,a))?(vg(s,e,i),!s.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&gg(s,e,i,a,r,e!=="value")):s._isVueCE&&(J_(s,e)||s._def.__asyncLoader&&(/[A-Z]/.test(e)||!vi(i)))?vg(s,nn(e),i,r,e):(e==="true-value"?s._trueValue=i:e==="false-value"&&(s._falseValue=i),gg(s,e,i,a))};function Z_(s,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in s&&xg(e)&&Mt(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&s.tagName==="IFRAME"||e==="form"||e==="list"&&s.tagName==="INPUT"||e==="type"&&s.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const n=s.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return xg(e)&&vi(t)?!1:e in s}function J_(s,e){const t=s._def.props;if(!t)return!1;const i=nn(e);return Array.isArray(t)?t.some(n=>nn(n)===i):Object.keys(t).some(n=>nn(n)===i)}const Eo=s=>{const e=s.props["onUpdate:modelValue"]||!1;return ft(e)?t=>Uc(e,t):e};function Q_(s){s.target.composing=!0}function bg(s){const e=s.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Rn=Symbol("_assign"),rc=Symbol("_initialValue");function Hu(s,e,t){return e&&(s=s.trim()),t&&(s=su(s)),s}const ht={created(s,{modifiers:{lazy:e,trim:t,number:i}},n){s.parentNode&&(s.type==="text"?s[rc]=s.defaultValue.replace(/[\r\n]/g,""):s.type==="textarea"&&(s[rc]=s.defaultValue.replace(/\r\n?/g,` -`))),s[Rn]=Eo(n);const r=i||n.props&&n.props.type==="number";Fr(s,e?"change":"input",a=>{a.target.composing||s[Rn](Hu(s.value,t,r))}),(t||r)&&Fr(s,"change",()=>{s.value=Hu(s.value,t,r)}),e||(Fr(s,"compositionstart",Q_),Fr(s,"compositionend",bg),Fr(s,"change",bg))},mounted(s,{value:e,modifiers:{trim:t,number:i}}){const n=e??"",r=s[rc];delete s[rc],r!==void 0&&(s.type==="text"||s.type==="textarea")&&s.value!==r?s[Rn](Hu(s.value,t,i)):s.value=n},beforeUpdate(s,{value:e,oldValue:t,modifiers:{lazy:i,trim:n,number:r}},a){if(s[Rn]=Eo(a),s.composing)return;const o=(r||s.type==="number")&&!/^0\d/.test(s.value)?su(s.value):s.value,h=e??"";if(o===h)return;const l=s.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===s&&s.type!=="range"&&(i&&e===t||n&&s.value.trim()===h)||(s.value=h)}},ei={deep:!0,created(s,e,t){s[Rn]=Eo(t),Fr(s,"change",()=>{const i=s._modelValue,n=Fl(s),r=s.checked,a=s[Rn];if(ft(i)){const o=Zm(i,n),h=o!==-1;if(r&&!h)a(i.concat(n));else if(!r&&h){const l=[...i];l.splice(o,1),a(l)}}else if(Oo(i)){const o=new Set(i);r?o.add(n):o.delete(n),a(o)}else a(Rx(s,r))})},mounted:wg,beforeUpdate(s,e,t){s[Rn]=Eo(t),wg(s,e,t)}};function wg(s,{value:e,oldValue:t},i){s._modelValue=e;let n;if(ft(e))n=Zm(e,i.props.value)>-1;else if(Oo(e))n=e.has(i.props.value);else{if(e===t)return;n=Bo(e,Rx(s,!0))}s.checked!==n&&(s.checked=n)}const Ht={deep:!0,created(s,{value:e,modifiers:{number:t}},i){s._modelValue=e,Fr(s,"change",()=>{const n=Array.prototype.filter.call(s.options,r=>r.selected).map(r=>t?su(Fl(r)):Fl(r));s[Rn](s.multiple?Oo(s._modelValue)?new Set(n):n:n[0]),s._assigning=!0,lu(()=>{s._assigning=!1})}),s[Rn]=Eo(i)},mounted(s,{value:e}){Sg(s,e)},beforeUpdate(s,{value:e},t){s._modelValue=e,s[Rn]=Eo(t)},updated(s,{value:e}){s._assigning||Sg(s,e)}};function Sg(s,e){const t=s.multiple,i=ft(e);if(!(t&&!i&&!Oo(e))){for(let n=0,r=s.options.length;nString(l)===String(o)):a.selected=Zm(e,o)>-1}else a.selected=e.has(o);else if(Bo(Fl(a),e)){s.selectedIndex!==n&&(s.selectedIndex=n);return}}!t&&s.selectedIndex!==-1&&(s.selectedIndex=-1)}}function Fl(s){return"_value"in s?s._value:s.value}function Rx(s,e){const t=e?"_trueValue":"_falseValue";return t in s?s[t]:e}const eT=["ctrl","shift","alt","meta"],tT={stop:s=>s.stopPropagation(),prevent:s=>s.preventDefault(),self:s=>s.target!==s.currentTarget,ctrl:s=>!s.ctrlKey,shift:s=>!s.shiftKey,alt:s=>!s.altKey,meta:s=>!s.metaKey,left:s=>"button"in s&&s.button!==0,middle:s=>"button"in s&&s.button!==1,right:s=>"button"in s&&s.button!==2,exact:(s,e)=>eT.some(t=>s[`${t}Key`]&&!e.includes(t))},bt=(s,e)=>{if(!s)return s;const t=s._withMods||(s._withMods={}),i=e.join(".");return t[i]||(t[i]=((n,...r)=>{for(let a=0;a{const t=s._withKeys||(s._withKeys={}),i=e.join(".");return t[i]||(t[i]=(n=>{if(!("key"in n))return;const r=qr(n.key);if(e.some(a=>a===r||iT[a]===r))return s(n)}))},sT=Oi({patchProp:K_},C_);let Mg;function nT(){return Mg||(Mg=l_(sT))}const rT=((...s)=>{const e=nT().createApp(...s),{mount:t}=e;return e.mount=i=>{const n=oT(i);if(!n)return;const r=e._component;!Mt(r)&&!r.render&&!r.template&&(r.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const a=t(n,!1,aT(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},e});function aT(s){if(s instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&s instanceof MathMLElement)return"mathml"}function oT(s){return vi(s)?document.querySelector(s):s}/*! +**/let Nf;const rg=typeof window<"u"&&window.trustedTypes;if(rg)try{Nf=rg.createPolicy("vue",{createHTML:s=>s})}catch{}const Ex=Nf?s=>Nf.createHTML(s):s=>s,AM="http://www.w3.org/2000/svg",EM="http://www.w3.org/1998/Math/MathML",Wn=typeof document<"u"?document:null,ag=Wn&&Wn.createElement("template"),CM={insert:(s,e,t)=>{e.insertBefore(s,t||null)},remove:s=>{const e=s.parentNode;e&&e.removeChild(s)},createElement:(s,e,t,i)=>{const n=e==="svg"?Wn.createElementNS(AM,s):e==="mathml"?Wn.createElementNS(EM,s):t?Wn.createElement(s,{is:t}):Wn.createElement(s);return s==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:s=>Wn.createTextNode(s),createComment:s=>Wn.createComment(s),setText:(s,e)=>{s.nodeValue=e},setElementText:(s,e)=>{s.textContent=e},parentNode:s=>s.parentNode,nextSibling:s=>s.nextSibling,querySelector:s=>Wn.querySelector(s),setScopeId(s,e){s.setAttribute(e,"")},insertStaticContent(s,e,t,i,n,r){const a=t?t.previousSibling:e.lastChild;if(n&&(n===r||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),t),!(n===r||!(n=n.nextSibling)););else{ag.innerHTML=Ex(i==="svg"?`${s}`:i==="mathml"?`${s}`:s);const o=ag.content;if(i==="svg"||i==="mathml"){const h=o.firstChild;for(;h.firstChild;)o.appendChild(h.firstChild);o.removeChild(h)}e.insertBefore(o,t)}return[a?a.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},wr="transition",Go="animation",kl=Symbol("_vtc"),Cx={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},IM=Oi({},Jy,Cx),RM=s=>(s.displayName="Transition",s.props=IM,s),PM=RM((s,{slots:e})=>_M(C2,kM(s),e)),na=(s,e=[])=>{ft(s)?s.forEach(t=>t(...e)):s&&s(...e)},og=s=>s?ft(s)?s.some(e=>e.length>1):s.length>1:!1;function kM(s){const e={};for(const k in s)k in Cx||(e[k]=s[k]);if(s.css===!1)return e;const{name:t="v",type:i,duration:n,enterFromClass:r=`${t}-enter-from`,enterActiveClass:a=`${t}-enter-active`,enterToClass:o=`${t}-enter-to`,appearFromClass:h=r,appearActiveClass:l=a,appearToClass:c=o,leaveFromClass:u=`${t}-leave-from`,leaveActiveClass:d=`${t}-leave-active`,leaveToClass:f=`${t}-leave-to`}=s,p=FM(n),m=p&&p[0],g=p&&p[1],{onBeforeEnter:v,onEnter:b,onEnterCancelled:y,onLeave:w,onLeaveCancelled:A,onBeforeAppear:T=v,onAppear:_=b,onAppearCancelled:R=y}=e,P=(k,B,D,U)=>{k._enterCancelled=U,ra(k,B?c:o),ra(k,B?l:a),D&&D()},F=(k,B)=>{k._isLeaving=!1,ra(k,u),ra(k,f),ra(k,d),B&&B()},I=k=>(B,D)=>{const U=k?_:b,L=()=>P(B,k,D);na(U,[B,L]),lg(()=>{ra(B,k?h:r),$n(B,k?c:o),og(U)||cg(B,i,m,L)})};return Oi(e,{onBeforeEnter(k){na(v,[k]),$n(k,r),$n(k,a)},onBeforeAppear(k){na(T,[k]),$n(k,h),$n(k,l)},onEnter:I(!1),onAppear:I(!0),onLeave(k,B){k._isLeaving=!0;const D=()=>F(k,B);$n(k,u),k._enterCancelled?($n(k,d),dg(k)):(dg(k),$n(k,d)),lg(()=>{k._isLeaving&&(ra(k,u),$n(k,f),og(w)||cg(k,i,g,D))}),na(w,[k,D])},onEnterCancelled(k){P(k,!1,void 0,!0),na(y,[k])},onAppearCancelled(k){P(k,!0,void 0,!0),na(R,[k])},onLeaveCancelled(k){F(k),na(A,[k])}})}function FM(s){if(s==null)return null;if(qt(s))return[Yu(s.enter),Yu(s.leave)];{const e=Yu(s);return[e,e]}}function Yu(s){return FS(s)}function $n(s,e){e.split(/\s+/).forEach(t=>t&&s.classList.add(t)),(s[kl]||(s[kl]=new Set)).add(e)}function ra(s,e){e.split(/\s+/).forEach(i=>i&&s.classList.remove(i));const t=s[kl];t&&(t.delete(e),t.size||(s[kl]=void 0))}function lg(s){requestAnimationFrame(()=>{requestAnimationFrame(s)})}let OM=0;function cg(s,e,t,i){const n=s._endId=++OM,r=()=>{n===s._endId&&i()};if(t!=null)return setTimeout(r,t);const{type:a,timeout:o,propCount:h}=BM(s,e);if(!a)return i();const l=a+"end";let c=0;const u=()=>{s.removeEventListener(l,d),r()},d=f=>{f.target===s&&++c>=h&&u()};setTimeout(()=>{c(t[p]||"").split(", "),n=i(`${wr}Delay`),r=i(`${wr}Duration`),a=hg(n,r),o=i(`${Go}Delay`),h=i(`${Go}Duration`),l=hg(o,h);let c=null,u=0,d=0;e===wr?a>0&&(c=wr,u=a,d=r.length):e===Go?l>0&&(c=Go,u=l,d=h.length):(u=Math.max(a,l),c=u>0?a>l?wr:Go:null,d=c?c===wr?r.length:h.length:0);const f=c===wr&&/\b(?:transform|all)(?:,|$)/.test(i(`${wr}Property`).toString());return{type:c,timeout:u,propCount:d,hasTransform:f}}function hg(s,e){for(;s.lengthug(t)+ug(s[i])))}function ug(s){return s==="auto"?0:Number(s.slice(0,-1).replace(",","."))*1e3}function dg(s){return(s?s.ownerDocument:document).body.offsetHeight}function LM(s,e,t){const i=s[kl];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?s.removeAttribute("class"):t?s.setAttribute("class",e):s.className=e}const fh=Symbol("_vod"),Ix=Symbol("_vsh"),Yi={name:"show",beforeMount(s,{value:e},{transition:t}){s[fh]=s.style.display==="none"?"":s.style.display,t&&e?t.beforeEnter(s):Ho(s,e)},mounted(s,{value:e},{transition:t}){t&&e&&t.enter(s)},updated(s,{value:e,oldValue:t},{transition:i}){!e!=!t&&(i?e?(i.beforeEnter(s),Ho(s,!0),i.enter(s)):i.leave(s,()=>{Ho(s,!1)}):Ho(s,e))},beforeUnmount(s,{value:e}){Ho(s,e)}};function Ho(s,e){s.style.display=e?s[fh]:"none",s[Ix]=!e}const DM=Symbol(""),NM=/(?:^|;)\s*display\s*:/;function UM(s,e,t){const i=s.style,n=vi(t);let r=!1;if(t&&!n){if(e)if(vi(e))for(const a of e.split(";")){const o=a.slice(0,a.indexOf(":")).trim();t[o]==null&&el(i,o,"")}else for(const a in e)t[a]==null&&el(i,a,"");for(const a in t){a==="display"&&(r=!0);const o=t[a];o!=null?VM(s,a,!vi(e)&&e?e[a]:void 0,o)||el(i,a,o):el(i,a,"")}}else if(n){if(e!==t){const a=i[DM];a&&(t+=";"+a),i.cssText=t,r=NM.test(t)}}else e&&s.removeAttribute("style");fh in s&&(s[fh]=r?i.display:"",s[Ix]&&(i.display="none"))}const fg=/\s*!important$/;function el(s,e,t){if(ft(t))t.forEach(i=>el(s,e,i));else if(t==null&&(t=""),e.startsWith("--"))s.setProperty(e,t);else{const i=XM(s,e);fg.test(t)?s.setProperty(qr(i),t.replace(fg,""),"important"):s[i]=t}}const mg=["Webkit","Moz","ms"],$u={};function XM(s,e){const t=$u[e];if(t)return t;let i=nn(e);if(i!=="filter"&&i in s)return $u[e]=i;i=My(i);for(let n=0;nGu||(WM.then(()=>Gu=0),Gu=Date.now());function qM(s,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;const n=t.value;if(ft(n)){const r=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0};const a=n.slice(),o=[i];for(let h=0;hs.charCodeAt(0)===111&&s.charCodeAt(1)===110&&s.charCodeAt(2)>96&&s.charCodeAt(2)<123,KM=(s,e,t,i,n,r)=>{const a=n==="svg";e==="class"?LM(s,i,a):e==="style"?UM(s,t,i):Qh(e)?eu(e)||$M(s,e,t,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):ZM(s,e,i,a))?(vg(s,e,i),!s.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&gg(s,e,i,a,r,e!=="value")):s._isVueCE&&(JM(s,e)||s._def.__asyncLoader&&(/[A-Z]/.test(e)||!vi(i)))?vg(s,nn(e),i,r,e):(e==="true-value"?s._trueValue=i:e==="false-value"&&(s._falseValue=i),gg(s,e,i,a))};function ZM(s,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in s&&xg(e)&&Mt(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&s.tagName==="IFRAME"||e==="form"||e==="list"&&s.tagName==="INPUT"||e==="type"&&s.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const n=s.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return xg(e)&&vi(t)?!1:e in s}function JM(s,e){const t=s._def.props;if(!t)return!1;const i=nn(e);return Array.isArray(t)?t.some(n=>nn(n)===i):Object.keys(t).some(n=>nn(n)===i)}const Eo=s=>{const e=s.props["onUpdate:modelValue"]||!1;return ft(e)?t=>Uc(e,t):e};function QM(s){s.target.composing=!0}function bg(s){const e=s.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Rn=Symbol("_assign"),rc=Symbol("_initialValue");function Hu(s,e,t){return e&&(s=s.trim()),t&&(s=su(s)),s}const ht={created(s,{modifiers:{lazy:e,trim:t,number:i}},n){s.parentNode&&(s.type==="text"?s[rc]=s.defaultValue.replace(/[\r\n]/g,""):s.type==="textarea"&&(s[rc]=s.defaultValue.replace(/\r\n?/g,` +`))),s[Rn]=Eo(n);const r=i||n.props&&n.props.type==="number";Fr(s,e?"change":"input",a=>{a.target.composing||s[Rn](Hu(s.value,t,r))}),(t||r)&&Fr(s,"change",()=>{s.value=Hu(s.value,t,r)}),e||(Fr(s,"compositionstart",QM),Fr(s,"compositionend",bg),Fr(s,"change",bg))},mounted(s,{value:e,modifiers:{trim:t,number:i}}){const n=e??"",r=s[rc];delete s[rc],r!==void 0&&(s.type==="text"||s.type==="textarea")&&s.value!==r?s[Rn](Hu(s.value,t,i)):s.value=n},beforeUpdate(s,{value:e,oldValue:t,modifiers:{lazy:i,trim:n,number:r}},a){if(s[Rn]=Eo(a),s.composing)return;const o=(r||s.type==="number")&&!/^0\d/.test(s.value)?su(s.value):s.value,h=e??"";if(o===h)return;const l=s.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===s&&s.type!=="range"&&(i&&e===t||n&&s.value.trim()===h)||(s.value=h)}},ei={deep:!0,created(s,e,t){s[Rn]=Eo(t),Fr(s,"change",()=>{const i=s._modelValue,n=Fl(s),r=s.checked,a=s[Rn];if(ft(i)){const o=Zm(i,n),h=o!==-1;if(r&&!h)a(i.concat(n));else if(!r&&h){const l=[...i];l.splice(o,1),a(l)}}else if(Oo(i)){const o=new Set(i);r?o.add(n):o.delete(n),a(o)}else a(Rx(s,r))})},mounted:wg,beforeUpdate(s,e,t){s[Rn]=Eo(t),wg(s,e,t)}};function wg(s,{value:e,oldValue:t},i){s._modelValue=e;let n;if(ft(e))n=Zm(e,i.props.value)>-1;else if(Oo(e))n=e.has(i.props.value);else{if(e===t)return;n=Bo(e,Rx(s,!0))}s.checked!==n&&(s.checked=n)}const Ht={deep:!0,created(s,{value:e,modifiers:{number:t}},i){s._modelValue=e,Fr(s,"change",()=>{const n=Array.prototype.filter.call(s.options,r=>r.selected).map(r=>t?su(Fl(r)):Fl(r));s[Rn](s.multiple?Oo(s._modelValue)?new Set(n):n:n[0]),s._assigning=!0,lu(()=>{s._assigning=!1})}),s[Rn]=Eo(i)},mounted(s,{value:e}){Sg(s,e)},beforeUpdate(s,{value:e},t){s._modelValue=e,s[Rn]=Eo(t)},updated(s,{value:e}){s._assigning||Sg(s,e)}};function Sg(s,e){const t=s.multiple,i=ft(e);if(!(t&&!i&&!Oo(e))){for(let n=0,r=s.options.length;nString(l)===String(o)):a.selected=Zm(e,o)>-1}else a.selected=e.has(o);else if(Bo(Fl(a),e)){s.selectedIndex!==n&&(s.selectedIndex=n);return}}!t&&s.selectedIndex!==-1&&(s.selectedIndex=-1)}}function Fl(s){return"_value"in s?s._value:s.value}function Rx(s,e){const t=e?"_trueValue":"_falseValue";return t in s?s[t]:e}const e_=["ctrl","shift","alt","meta"],t_={stop:s=>s.stopPropagation(),prevent:s=>s.preventDefault(),self:s=>s.target!==s.currentTarget,ctrl:s=>!s.ctrlKey,shift:s=>!s.shiftKey,alt:s=>!s.altKey,meta:s=>!s.metaKey,left:s=>"button"in s&&s.button!==0,middle:s=>"button"in s&&s.button!==1,right:s=>"button"in s&&s.button!==2,exact:(s,e)=>e_.some(t=>s[`${t}Key`]&&!e.includes(t))},bt=(s,e)=>{if(!s)return s;const t=s._withMods||(s._withMods={}),i=e.join(".");return t[i]||(t[i]=((n,...r)=>{for(let a=0;a{const t=s._withKeys||(s._withKeys={}),i=e.join(".");return t[i]||(t[i]=(n=>{if(!("key"in n))return;const r=qr(n.key);if(e.some(a=>a===r||i_[a]===r))return s(n)}))},s_=Oi({patchProp:KM},CM);let Mg;function n_(){return Mg||(Mg=lM(s_))}const r_=((...s)=>{const e=n_().createApp(...s),{mount:t}=e;return e.mount=i=>{const n=o_(i);if(!n)return;const r=e._component;!Mt(r)&&!r.render&&!r.template&&(r.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const a=t(n,!1,a_(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},e});function a_(s){if(s instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&s instanceof MathMLElement)return"mathml"}function o_(s){return vi(s)?document.querySelector(s):s}/*! * pinia v4.0.3 * (c) 2026 Eduardo San Martin Morote * @license MIT - */let Px;const pu=s=>Px=s,kx=Symbol();function _g(s){return s&&typeof s=="object"&&Object.prototype.toString.call(s)==="[object Object]"&&typeof s.toJSON!="function"}function lT(){const s=Iy(!0),e=s.run(()=>lt({}));let t=[],i=[];const n=Dr({install(r){pu(n),n._a=r,r.provide(kx,n),r.config.globalProperties.$pinia=n,i.forEach(a=>t.push(a)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:s,_s:new Map,state:e});return n}const Uf=()=>{};function Tg(s,e,t,i=Uf){s.add(e);const n=()=>{s.delete(e)&&i()};return!t&&Ry()&&VS(n),n}function Wa(s,...e){s.forEach(t=>{t(...e)})}const cT=s=>s(),Ag=Symbol(),ju=Symbol();function Xf(s,e){s instanceof Map&&e instanceof Map?e.forEach((t,i)=>s.set(i,t)):s instanceof Set&&e instanceof Set&&e.forEach(s.add,s);for(const t in e){if(!Object.hasOwn(e,t))continue;const i=e[t],n=s[t];_g(n)&&_g(i)&&Object.hasOwn(s,t)&&!Si(i)&&!cr(i)?s[t]=Xf(n,i):s[t]=i}return s}const hT=Symbol();function uT(s){return!s||typeof s!="object"||!Object.hasOwn(s,hT)}const{assign:_r}=Object;function dT(s){return!!(Si(s)&&s.effect)}function fT(s,e,t,i){const{state:n,actions:r,getters:a}=e,o=t.state.value[s];let h;function l(){o||(t.state.value[s]=n?n():{});const c=hM(t.state.value[s]);return _r(c,r,Object.keys(a||{}).reduce((u,d)=>(u[d]=Dr(vt(()=>{pu(t);const f=t._s.get(s);return a[d].call(f,f)})),u),{}))}return h=Fx(s,l,e,t,i,!0),h}function Fx(s,e,t={},i,n,r){let a;const o=_r({actions:{}},t),h={deep:!0};let l,c,u=new Set,d=new Set,f;const p=i.state.value[s];!r&&!p&&(i.state.value[s]={});let m;function g(_){let R;l=c=!1,typeof _=="function"?(_(i.state.value[s]),R={type:"patch function",storeId:s,events:f}):(Xf(i.state.value[s],_),R={type:"patch object",payload:_,storeId:s,events:f});const P=m=Symbol();lu().then(()=>{m===P&&(l=!0)}),c=!0,Wa(u,R,i.state.value[s])}const v=r?function(){const{state:R}=t,P=R?R():{};this.$patch(F=>{_r(F,P)})}:Uf;function b(){a.stop(),u.clear(),d.clear(),i._s.delete(s)}const y=(_,R="")=>{if(Ag in _)return _[ju]=R,_;const P=function(){pu(i);const F=Array.from(arguments),I=new Set,k=new Set;function B(L){I.add(L)}function D(L){k.add(L)}Wa(d,{args:F,name:P[ju],store:A,after:B,onError:D});let U;try{U=_.apply(this&&this.$id===s?this:A,F)}catch(L){throw Wa(k,L),L}return U instanceof Promise?U.then(L=>(Wa(I,L),L)).catch(L=>(Wa(k,L),Promise.reject(L))):(Wa(I,U),U)};return P[Ag]=!0,P[ju]=R,P},w={_p:i,$id:s,$onAction:Tg.bind(null,d),$patch:g,$reset:v,$subscribe(_,R={}){if(u.has(_))return Uf;const P=Tg(u,_,R.detached,()=>F()),F=a.run(()=>fs(()=>i.state.value[s],I=>{(R.flush==="sync"?c:l)&&_({storeId:s,type:"direct",events:f},I)},_r({},h,R)));return P},$dispose:b},A=Da(w);i._s.set(s,A);const T=(i._a&&i._a.runWithContext||cT)(()=>i._e.run(()=>(a=Iy()).run(()=>e({action:y}))));for(const _ in T){const R=T[_];Si(R)&&!dT(R)||cr(R)?r||(p&&uT(R)&&(Si(R)?R.value=p[_]:((R instanceof Set||R instanceof Map)&&R.clear(),Xf(R,p[_]))),i.state.value[s][_]=R):typeof R=="function"&&(T[_]=y(R,_),o.actions[_]=R)}return _r(A,T),_r($t(A),T),Object.defineProperty(A,"$state",{get:()=>i.state.value[s],set:_=>{g(R=>{_r(R,_)})}}),i._p.forEach(_=>{const R=a.run(()=>_({store:A,app:i._a,pinia:i,options:o}));_r(A,R)}),p&&r&&t.hydrate&&t.hydrate(A.$state,p),l=!0,c=!0,A}/*! #__NO_SIDE_EFFECTS__ */function mT(s,e,t){let i;const n=typeof e=="function";i=n?t:e;function r(a,o){const h=wM();return a=a||(h?dl(kx,null):null),a&&pu(a),a=Px,a._s.has(s)||(n?Fx(s,e,i,a):fT(s,i,a)),a._s.get(s)}return r.$id=s,r}var Na=(s=>(s[s.WEBGL_LEGACY=0]="WEBGL_LEGACY",s[s.WEBGL=1]="WEBGL",s[s.WEBGL2=2]="WEBGL2",s))(Na||{}),Ox=(s=>(s[s.UNKNOWN=0]="UNKNOWN",s[s.WEBGL=1]="WEBGL",s[s.CANVAS=2]="CANVAS",s))(Ox||{}),Vf=(s=>(s[s.COLOR=16384]="COLOR",s[s.DEPTH=256]="DEPTH",s[s.STENCIL=1024]="STENCIL",s))(Vf||{}),dt=(s=>(s[s.NORMAL=0]="NORMAL",s[s.ADD=1]="ADD",s[s.MULTIPLY=2]="MULTIPLY",s[s.SCREEN=3]="SCREEN",s[s.OVERLAY=4]="OVERLAY",s[s.DARKEN=5]="DARKEN",s[s.LIGHTEN=6]="LIGHTEN",s[s.COLOR_DODGE=7]="COLOR_DODGE",s[s.COLOR_BURN=8]="COLOR_BURN",s[s.HARD_LIGHT=9]="HARD_LIGHT",s[s.SOFT_LIGHT=10]="SOFT_LIGHT",s[s.DIFFERENCE=11]="DIFFERENCE",s[s.EXCLUSION=12]="EXCLUSION",s[s.HUE=13]="HUE",s[s.SATURATION=14]="SATURATION",s[s.COLOR=15]="COLOR",s[s.LUMINOSITY=16]="LUMINOSITY",s[s.NORMAL_NPM=17]="NORMAL_NPM",s[s.ADD_NPM=18]="ADD_NPM",s[s.SCREEN_NPM=19]="SCREEN_NPM",s[s.NONE=20]="NONE",s[s.SRC_OVER=0]="SRC_OVER",s[s.SRC_IN=21]="SRC_IN",s[s.SRC_OUT=22]="SRC_OUT",s[s.SRC_ATOP=23]="SRC_ATOP",s[s.DST_OVER=24]="DST_OVER",s[s.DST_IN=25]="DST_IN",s[s.DST_OUT=26]="DST_OUT",s[s.DST_ATOP=27]="DST_ATOP",s[s.ERASE=26]="ERASE",s[s.SUBTRACT=28]="SUBTRACT",s[s.XOR=29]="XOR",s))(dt||{}),Pn=(s=>(s[s.POINTS=0]="POINTS",s[s.LINES=1]="LINES",s[s.LINE_LOOP=2]="LINE_LOOP",s[s.LINE_STRIP=3]="LINE_STRIP",s[s.TRIANGLES=4]="TRIANGLES",s[s.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",s[s.TRIANGLE_FAN=6]="TRIANGLE_FAN",s))(Pn||{}),Ne=(s=>(s[s.RGBA=6408]="RGBA",s[s.RGB=6407]="RGB",s[s.RG=33319]="RG",s[s.RED=6403]="RED",s[s.RGBA_INTEGER=36249]="RGBA_INTEGER",s[s.RGB_INTEGER=36248]="RGB_INTEGER",s[s.RG_INTEGER=33320]="RG_INTEGER",s[s.RED_INTEGER=36244]="RED_INTEGER",s[s.ALPHA=6406]="ALPHA",s[s.LUMINANCE=6409]="LUMINANCE",s[s.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",s[s.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",s[s.DEPTH_STENCIL=34041]="DEPTH_STENCIL",s))(Ne||{}),vo=(s=>(s[s.TEXTURE_2D=3553]="TEXTURE_2D",s[s.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",s[s.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",s[s.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",s[s.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",s[s.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",s[s.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",s))(vo||{}),et=(s=>(s[s.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",s[s.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",s[s.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",s[s.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",s[s.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",s[s.UNSIGNED_INT=5125]="UNSIGNED_INT",s[s.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",s[s.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",s[s.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",s[s.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",s[s.BYTE=5120]="BYTE",s[s.SHORT=5122]="SHORT",s[s.INT=5124]="INT",s[s.FLOAT=5126]="FLOAT",s[s.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",s[s.HALF_FLOAT=36193]="HALF_FLOAT",s))(et||{}),ze=(s=>(s[s.FLOAT=0]="FLOAT",s[s.INT=1]="INT",s[s.UINT=2]="UINT",s))(ze||{}),sn=(s=>(s[s.NEAREST=0]="NEAREST",s[s.LINEAR=1]="LINEAR",s))(sn||{}),an=(s=>(s[s.CLAMP=33071]="CLAMP",s[s.REPEAT=10497]="REPEAT",s[s.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",s))(an||{}),Ys=(s=>(s[s.OFF=0]="OFF",s[s.POW2=1]="POW2",s[s.ON=2]="ON",s[s.ON_MANUAL=3]="ON_MANUAL",s))(Ys||{}),Ni=(s=>(s[s.NPM=0]="NPM",s[s.UNPACK=1]="UNPACK",s[s.PMA=2]="PMA",s[s.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",s[s.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",s[s.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",s))(Ni||{}),Cn=(s=>(s[s.NO=0]="NO",s[s.YES=1]="YES",s[s.AUTO=2]="AUTO",s[s.BLEND=0]="BLEND",s[s.CLEAR=1]="CLEAR",s[s.BLIT=2]="BLIT",s))(Cn||{}),hp=(s=>(s[s.AUTO=0]="AUTO",s[s.MANUAL=1]="MANUAL",s))(hp||{}),Us=(s=>(s.LOW="lowp",s.MEDIUM="mediump",s.HIGH="highp",s))(Us||{}),Ri=(s=>(s[s.NONE=0]="NONE",s[s.SCISSOR=1]="SCISSOR",s[s.STENCIL=2]="STENCIL",s[s.SPRITE=3]="SPRITE",s[s.COLOR=4]="COLOR",s))(Ri||{}),Ei=(s=>(s[s.NONE=0]="NONE",s[s.LOW=2]="LOW",s[s.MEDIUM=4]="MEDIUM",s[s.HIGH=8]="HIGH",s))(Ei||{}),Bn=(s=>(s[s.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",s[s.ARRAY_BUFFER=34962]="ARRAY_BUFFER",s[s.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",s))(Bn||{});const pT={createCanvas:(s,e)=>{const t=document.createElement("canvas");return t.width=s,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(s,e)=>fetch(s,e),parseXML:s=>new DOMParser().parseFromString(s,"text/xml")},We={ADAPTER:pT,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var Wu=/iPhone/i,Eg=/iPod/i,Cg=/iPad/i,Ig=/\biOS-universal(?:.+)Mac\b/i,zu=/\bAndroid(?:.+)Mobile\b/i,Rg=/Android/i,za=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ac=/Silk/i,Gn=/Windows Phone/i,Pg=/\bWindows(?:.+)ARM\b/i,kg=/BlackBerry/i,Fg=/BB10/i,Og=/Opera Mini/i,Bg=/\b(CriOS|Chrome)(?:.+)Mobile/i,Lg=/Mobile(?:.+)Firefox\b/i,Dg=function(s){return typeof s<"u"&&s.platform==="MacIntel"&&typeof s.maxTouchPoints=="number"&&s.maxTouchPoints>1&&typeof MSStream>"u"};function gT(s){return function(e){return e.test(s)}}function Ng(s){var e={userAgent:"",platform:"",maxTouchPoints:0};!s&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof s=="string"?e.userAgent=s:s&&s.userAgent&&(e={userAgent:s.userAgent,platform:s.platform,maxTouchPoints:s.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var n=gT(t),r={apple:{phone:n(Wu)&&!n(Gn),ipod:n(Eg),tablet:!n(Wu)&&(n(Cg)||Dg(e))&&!n(Gn),universal:n(Ig),device:(n(Wu)||n(Eg)||n(Cg)||n(Ig)||Dg(e))&&!n(Gn)},amazon:{phone:n(za),tablet:!n(za)&&n(ac),device:n(za)||n(ac)},android:{phone:!n(Gn)&&n(za)||!n(Gn)&&n(zu),tablet:!n(Gn)&&!n(za)&&!n(zu)&&(n(ac)||n(Rg)),device:!n(Gn)&&(n(za)||n(ac)||n(zu)||n(Rg))||n(/\bokhttp\b/i)},windows:{phone:n(Gn),tablet:n(Pg),device:n(Gn)||n(Pg)},other:{blackberry:n(kg),blackberry10:n(Fg),opera:n(Og),firefox:n(Lg),chrome:n(Bg),device:n(kg)||n(Fg)||n(Og)||n(Lg)||n(Bg)},any:!1,phone:!1,tablet:!1};return r.any=r.apple.device||r.android.device||r.windows.device||r.other.device,r.phone=r.apple.phone||r.android.phone||r.windows.phone,r.tablet=r.apple.tablet||r.android.tablet||r.windows.tablet,r}const vT=Ng.default??Ng,ir=vT(globalThis.navigator);We.RETINA_PREFIX=/@([0-9\.]+)x/;We.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var mh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bx(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function yT(s){if(Object.prototype.hasOwnProperty.call(s,"__esModule"))return s;var e=s.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(i){var n=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return s[i]}})}),t}var qu={exports:{}},Ug;function xT(){return Ug||(Ug=1,(function(s){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function n(h,l,c){this.fn=h,this.context=l,this.once=c||!1}function r(h,l,c,u,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var f=new n(c,u||h,d),p=t?t+l:l;return h._events[p]?h._events[p].fn?h._events[p]=[h._events[p],f]:h._events[p].push(f):(h._events[p]=f,h._eventsCount++),h}function a(h,l){--h._eventsCount===0?h._events=new i:delete h._events[l]}function o(){this._events=new i,this._eventsCount=0}o.prototype.eventNames=function(){var l=[],c,u;if(this._eventsCount===0)return l;for(u in c=this._events)e.call(c,u)&&l.push(t?u.slice(1):u);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},o.prototype.listeners=function(l){var c=t?t+l:l,u=this._events[c];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,f=u.length,p=new Array(f);d80*O){W=K=L[0],J=fe=L[1];for(var pe=O;peK&&(K=me),we>fe&&(fe=we);Ee=Math.max(K-W,fe-J),Ee=Ee!==0?32767/Ee:0}return i(V,q,O,W,J,Ee,0),q}function e(L,N,O,X,E){var V,q;if(E===U(L,N,O,X)>0)for(V=N;V=N;V-=X)q=k(V,L[V],L[V+1],q);return q&&w(q,q.next)&&(B(q),q=q.next),q}function t(L,N){if(!L)return L;N||(N=L);var O=L,X;do if(X=!1,!O.steiner&&(w(O,O.next)||y(O.prev,O,O.next)===0)){if(B(O),O=N=O.prev,O===O.next)break;X=!0}else O=O.next;while(X||O!==N);return N}function i(L,N,O,X,E,V,q){if(L){!q&&V&&f(L,X,E,V);for(var W=L,J,K;L.prev!==L.next;){if(J=L.prev,K=L.next,V?r(L,X,E,V):n(L)){N.push(J.i/O|0),N.push(L.i/O|0),N.push(K.i/O|0),B(L),L=K.next,W=K.next;continue}if(L=K,L===W){q?q===1?(L=a(t(L),N,O),i(L,N,O,X,E,V,2)):q===2&&o(L,N,O,X,E,V):i(t(L),N,O,X,E,V,1);break}}}}function n(L){var N=L.prev,O=L,X=L.next;if(y(N,O,X)>=0)return!1;for(var E=N.x,V=O.x,q=X.x,W=N.y,J=O.y,K=X.y,fe=EV?E>q?E:q:V>q?V:q,Ee=W>J?W>K?W:K:J>K?J:K,pe=X.next;pe!==N;){if(pe.x>=fe&&pe.x<=we&&pe.y>=me&&pe.y<=Ee&&v(E,W,V,J,q,K,pe.x,pe.y)&&y(pe.prev,pe,pe.next)>=0)return!1;pe=pe.next}return!0}function r(L,N,O,X){var E=L.prev,V=L,q=L.next;if(y(E,V,q)>=0)return!1;for(var W=E.x,J=V.x,K=q.x,fe=E.y,me=V.y,we=q.y,Ee=WJ?W>K?W:K:J>K?J:K,G=fe>me?fe>we?fe:we:me>we?me:we,Z=m(Ee,pe,N,O,X),z=m(Ae,G,N,O,X),j=L.prevZ,te=L.nextZ;j&&j.z>=Z&&te&&te.z<=z;){if(j.x>=Ee&&j.x<=Ae&&j.y>=pe&&j.y<=G&&j!==E&&j!==q&&v(W,fe,J,me,K,we,j.x,j.y)&&y(j.prev,j,j.next)>=0||(j=j.prevZ,te.x>=Ee&&te.x<=Ae&&te.y>=pe&&te.y<=G&&te!==E&&te!==q&&v(W,fe,J,me,K,we,te.x,te.y)&&y(te.prev,te,te.next)>=0))return!1;te=te.nextZ}for(;j&&j.z>=Z;){if(j.x>=Ee&&j.x<=Ae&&j.y>=pe&&j.y<=G&&j!==E&&j!==q&&v(W,fe,J,me,K,we,j.x,j.y)&&y(j.prev,j,j.next)>=0)return!1;j=j.prevZ}for(;te&&te.z<=z;){if(te.x>=Ee&&te.x<=Ae&&te.y>=pe&&te.y<=G&&te!==E&&te!==q&&v(W,fe,J,me,K,we,te.x,te.y)&&y(te.prev,te,te.next)>=0)return!1;te=te.nextZ}return!0}function a(L,N,O){var X=L;do{var E=X.prev,V=X.next.next;!w(E,V)&&A(E,X,X.next,V)&&P(E,V)&&P(V,E)&&(N.push(E.i/O|0),N.push(X.i/O|0),N.push(V.i/O|0),B(X),B(X.next),X=L=V),X=X.next}while(X!==L);return t(X)}function o(L,N,O,X,E,V){var q=L;do{for(var W=q.next.next;W!==q.prev;){if(q.i!==W.i&&b(q,W)){var J=I(q,W);q=t(q,q.next),J=t(J,J.next),i(q,N,O,X,E,V,0),i(J,N,O,X,E,V,0);return}W=W.next}q=q.next}while(q!==L)}function h(L,N,O,X){var E=[],V,q,W,J,K;for(V=0,q=N.length;V=O.next.y&&O.next.y!==O.y){var W=O.x+(E-O.y)*(O.next.x-O.x)/(O.next.y-O.y);if(W<=X&&W>V&&(V=W,q=O.x=O.x&&O.x>=K&&X!==O.x&&v(Eq.x||O.x===q.x&&d(q,O)))&&(q=O,me=we)),O=O.next;while(O!==J);return q}function d(L,N){return y(L.prev,L,N.prev)<0&&y(N.next,L,L.next)<0}function f(L,N,O,X){var E=L;do E.z===0&&(E.z=m(E.x,E.y,N,O,X)),E.prevZ=E.prev,E.nextZ=E.next,E=E.next;while(E!==L);E.prevZ.nextZ=null,E.prevZ=null,p(E)}function p(L){var N,O,X,E,V,q,W,J,K=1;do{for(O=L,L=null,V=null,q=0;O;){for(q++,X=O,W=0,N=0;N0||J>0&&X;)W!==0&&(J===0||!X||O.z<=X.z)?(E=O,O=O.nextZ,W--):(E=X,X=X.nextZ,J--),V?V.nextZ=E:L=E,E.prevZ=V,V=E;O=X}V.nextZ=null,K*=2}while(q>1);return L}function m(L,N,O,X,E){return L=(L-O)*E|0,N=(N-X)*E|0,L=(L|L<<8)&16711935,L=(L|L<<4)&252645135,L=(L|L<<2)&858993459,L=(L|L<<1)&1431655765,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,L|N<<1}function g(L){var N=L,O=L;do(N.x=(L-q)*(V-W)&&(L-q)*(X-W)>=(O-q)*(N-W)&&(O-q)*(V-W)>=(E-q)*(X-W)}function b(L,N){return L.next.i!==N.i&&L.prev.i!==N.i&&!R(L,N)&&(P(L,N)&&P(N,L)&&F(L,N)&&(y(L.prev,L,N.prev)||y(L,N.prev,N))||w(L,N)&&y(L.prev,L,L.next)>0&&y(N.prev,N,N.next)>0)}function y(L,N,O){return(N.y-L.y)*(O.x-N.x)-(N.x-L.x)*(O.y-N.y)}function w(L,N){return L.x===N.x&&L.y===N.y}function A(L,N,O,X){var E=_(y(L,N,O)),V=_(y(L,N,X)),q=_(y(O,X,L)),W=_(y(O,X,N));return!!(E!==V&&q!==W||E===0&&T(L,O,N)||V===0&&T(L,X,N)||q===0&&T(O,L,X)||W===0&&T(O,N,X))}function T(L,N,O){return N.x<=Math.max(L.x,O.x)&&N.x>=Math.min(L.x,O.x)&&N.y<=Math.max(L.y,O.y)&&N.y>=Math.min(L.y,O.y)}function _(L){return L>0?1:L<0?-1:0}function R(L,N){var O=L;do{if(O.i!==L.i&&O.next.i!==L.i&&O.i!==N.i&&O.next.i!==N.i&&A(O,O.next,L,N))return!0;O=O.next}while(O!==L);return!1}function P(L,N){return y(L.prev,L,L.next)<0?y(L,N,L.next)>=0&&y(L,L.prev,N)>=0:y(L,N,L.prev)<0||y(L,L.next,N)<0}function F(L,N){var O=L,X=!1,E=(L.x+N.x)/2,V=(L.y+N.y)/2;do O.y>V!=O.next.y>V&&O.next.y!==O.y&&E<(O.next.x-O.x)*(V-O.y)/(O.next.y-O.y)+O.x&&(X=!X),O=O.next;while(O!==L);return X}function I(L,N){var O=new D(L.i,L.x,L.y),X=new D(N.i,N.x,N.y),E=L.next,V=N.prev;return L.next=N,N.prev=L,O.next=E,E.prev=O,X.next=O,O.prev=X,V.next=X,X.prev=V,X}function k(L,N,O,X){var E=new D(L,N,O);return X?(E.next=X.next,E.prev=X,X.next.prev=E,X.next=E):(E.prev=E,E.next=E),E}function B(L){L.next.prev=L.prev,L.prev.next=L.next,L.prevZ&&(L.prevZ.nextZ=L.nextZ),L.nextZ&&(L.nextZ.prevZ=L.prevZ)}function D(L,N,O){this.i=L,this.x=N,this.y=O,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}s.deviation=function(L,N,O,X){var E=N&&N.length,V=E?N[0]*O:L.length,q=Math.abs(U(L,0,V,O));if(E)for(var W=0,J=N.length;W0&&(X+=L[E-1].length,O.holes.push(X))}return O},oc.exports}var ST=wT();const MT=Bx(ST);var aa={},tl={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var _T=tl.exports,Vg;function TT(){return Vg||(Vg=1,(function(s,e){(function(t){var i=e&&!e.nodeType&&e,n=s&&!s.nodeType&&s,r=typeof mh=="object"&&mh;(r.global===r||r.window===r||r.self===r)&&(t=r);var a,o=2147483647,h=36,l=1,c=26,u=38,d=700,f=72,p=128,m="-",g=/^xn--/,v=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=h-l,A=Math.floor,T=String.fromCharCode,_;function R(E){throw new RangeError(y[E])}function P(E,V){for(var q=E.length,W=[];q--;)W[q]=V(E[q]);return W}function F(E,V){var q=E.split("@"),W="";q.length>1&&(W=q[0]+"@",E=q[1]),E=E.replace(b,".");var J=E.split("."),K=P(J,V).join(".");return W+K}function I(E){for(var V=[],q=0,W=E.length,J,K;q=55296&&J<=56319&&q65535&&(V-=65536,q+=T(V>>>10&1023|55296),V=56320|V&1023),q+=T(V),q}).join("")}function B(E){return E-48<10?E-22:E-65<26?E-65:E-97<26?E-97:h}function D(E,V){return E+22+75*(E<26)-((V!=0)<<5)}function U(E,V,q){var W=0;for(E=q?A(E/d):E>>1,E+=A(E/V);E>w*c>>1;W+=h)E=A(E/w);return A(W+(w+1)*E/(E+u))}function L(E){var V=[],q=E.length,W,J=0,K=p,fe=f,me,we,Ee,pe,Ae,G,Z,z,j;for(me=E.lastIndexOf(m),me<0&&(me=0),we=0;we=128&&R("not-basic"),V.push(E.charCodeAt(we));for(Ee=me>0?me+1:0;Ee=q&&R("invalid-input"),Z=B(E.charCodeAt(Ee++)),(Z>=h||Z>A((o-J)/Ae))&&R("overflow"),J+=Z*Ae,z=G<=fe?l:G>=fe+c?c:G-fe,!(ZA(o/j)&&R("overflow"),Ae*=j;W=V.length+1,fe=U(J-pe,W,pe==0),A(J/W)>o-K&&R("overflow"),K+=A(J/W),J%=W,V.splice(J++,0,K)}return k(V)}function N(E){var V,q,W,J,K,fe,me,we,Ee,pe,Ae,G=[],Z,z,j,te;for(E=I(E),Z=E.length,V=p,q=0,K=f,fe=0;fe=V&&AeA((o-q)/z)&&R("overflow"),q+=(me-V)*z,V=me,fe=0;feo&&R("overflow"),Ae==V){for(we=q,Ee=h;pe=Ee<=K?l:Ee>=K+c?c:Ee-K,!(we-1e3&&ce<1e3||T.call(/e/,de))return de;var Rt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ce=="number"){var Wt=ce<0?-F(-ce):F(ce);if(Wt!==ce){var Zt=String(Wt),pt=b.call(de,Zt.length+1);return y.call(Zt,Rt,"$&_")+"."+y.call(y.call(pt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(de,Rt,"$&_")}var X=CT,E=X.custom,V=z(E)?E:null,q={__proto__:null,double:'"',single:"'"},W={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Zu=function ce(de,Rt,Wt,Zt){var pt=Rt||{};if(he(pt,"quoteStyle")&&!he(q,pt.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(he(pt,"maxStringLength")&&(typeof pt.maxStringLength=="number"?pt.maxStringLength<0&&pt.maxStringLength!==1/0:pt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Rs=he(pt,"customInspect")?pt.customInspect:!0;if(typeof Rs!="boolean"&&Rs!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(he(pt,"indent")&&pt.indent!==null&&pt.indent!==" "&&!(parseInt(pt.indent,10)===pt.indent&&pt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(he(pt,"numericSeparator")&&typeof pt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Hs=pt.numericSeparator;if(typeof de>"u")return"undefined";if(de===null)return"null";if(typeof de=="boolean")return de?"true":"false";if(typeof de=="string")return At(de,pt);if(typeof de=="number"){if(de===0)return 1/0/de>0?"0":"-0";var Ui=String(de);return Hs?O(de,Ui):Ui}if(typeof de=="bigint"){var Ps=String(de)+"n";return Hs?O(de,Ps):Ps}var br=typeof pt.depth>"u"?5:pt.depth;if(typeof Wt>"u"&&(Wt=0),Wt>=br&&br>0&&typeof de=="object")return me(de)?"[Array]":"[Object]";var js=zi(pt,Wt);if(typeof Zt>"u")Zt=[];else if(ge(Zt,de)>=0)return"[Circular]";function ss(Me,be,De){if(be&&(Zt=P.call(Zt),Zt.push(be)),De){var Ie={depth:pt.depth};return he(pt,"quoteStyle")&&(Ie.quoteStyle=pt.quoteStyle),ce(Me,Ie,Wt+1,Zt)}return ce(Me,pt,Wt+1,Zt)}if(typeof de=="function"&&!Ee(de)){var $a=oe(de),Ga=di(de,ss);return"[Function"+($a?": "+$a:" (anonymous)")+"]"+(Ga.length>0?" { "+R.call(Ga,", ")+" }":"")}if(z(de)){var Qr=D?y.call(String(de),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(de);return typeof de=="object"&&!D?It(Qr):Qr}if(St(de)){for(var Ws="<"+A.call(String(de.nodeName)),ws=de.attributes||[],Vn=0;Vn",Ws}if(me(de)){if(de.length===0)return"[]";var ks=di(de,ss);return js&&!Wi(ks)?"["+dn(ks,js)+"]":"[ "+R.call(ks,", ")+" ]"}if(pe(de)){var ea=di(de,ss);return!("cause"in Error.prototype)&&"cause"in de&&!L.call(de,"cause")?"{ ["+String(de)+"] "+R.call(_.call("[cause]: "+ss(de.cause),ea),", ")+" }":ea.length===0?"["+String(de)+"]":"{ ["+String(de)+"] "+R.call(ea,", ")+" }"}if(typeof de=="object"&&Rs){if(V&&typeof de[V]=="function"&&X)return X(de,{depth:br-Wt});if(Rs!=="symbol"&&typeof de.inspect=="function")return de.inspect()}if(le(de)){var ta=[];return i&&i.call(de,function(Me,be){ta.push(ss(be,de,!0)+" => "+ss(Me,de))}),Ti("Map",t.call(de),ta,js)}if(Be(de)){var H=[];return o&&o.call(de,function(Me){H.push(ss(Me,de))}),Ti("Set",a.call(de),H,js)}if(Oe(de))return Kt("WeakMap");if(st(de))return Kt("WeakSet");if(Fe(de))return Kt("WeakRef");if(G(de))return It(ss(Number(de)));if(j(de))return It(ss(I.call(de)));if(Z(de))return It(p.call(de));if(Ae(de))return It(ss(String(de)));if(typeof window<"u"&&de===window)return"{ [object Window] }";if(typeof globalThis<"u"&&de===globalThis||typeof mh<"u"&&de===mh)return"{ [object globalThis] }";if(!we(de)&&!Ee(de)){var Y=di(de,ss),ee=N?N(de)===Object.prototype:de instanceof Object||de.constructor===Object,ne=de instanceof Object?"":"null prototype",ue=!ee&&U&&Object(de)===de&&U in de?b.call(xe(de),8,-1):ne?"Object":"",ve=ee||typeof de.constructor!="function"?"":de.constructor.name?de.constructor.name+" ":"",_e=ve+(ue||ne?"["+R.call(_.call([],ue||[],ne||[]),": ")+"] ":"");return Y.length===0?_e+"{}":js?_e+"{"+dn(Y,js)+"}":_e+"{ "+R.call(Y,", ")+" }"}return String(de)};function J(ce,de,Rt){var Wt=Rt.quoteStyle||de,Zt=q[Wt];return Zt+ce+Zt}function K(ce){return y.call(String(ce),/"/g,""")}function fe(ce){return!U||!(typeof ce=="object"&&(U in ce||typeof ce[U]<"u"))}function me(ce){return xe(ce)==="[object Array]"&&fe(ce)}function we(ce){return xe(ce)==="[object Date]"&&fe(ce)}function Ee(ce){return xe(ce)==="[object RegExp]"&&fe(ce)}function pe(ce){return xe(ce)==="[object Error]"&&fe(ce)}function Ae(ce){return xe(ce)==="[object String]"&&fe(ce)}function G(ce){return xe(ce)==="[object Number]"&&fe(ce)}function Z(ce){return xe(ce)==="[object Boolean]"&&fe(ce)}function z(ce){if(D)return ce&&typeof ce=="object"&&ce instanceof Symbol;if(typeof ce=="symbol")return!0;if(!ce||typeof ce!="object"||!B)return!1;try{return B.call(ce),!0}catch{}return!1}function j(ce){if(!ce||typeof ce!="object"||!I)return!1;try{return I.call(ce),!0}catch{}return!1}var te=Object.prototype.hasOwnProperty||function(ce){return ce in this};function he(ce,de){return te.call(ce,de)}function xe(ce){return m.call(ce)}function oe(ce){if(ce.name)return ce.name;var de=v.call(g.call(ce),/^function\s*([\w$]+)/);return de?de[1]:null}function ge(ce,de){if(ce.indexOf)return ce.indexOf(de);for(var Rt=0,Wt=ce.length;Rtde.maxStringLength){var Rt=ce.length-de.maxStringLength,Wt="... "+Rt+" more character"+(Rt>1?"s":"");return At(b.call(ce,0,de.maxStringLength),de)+Wt}var Zt=W[de.quoteStyle||"single"];Zt.lastIndex=0;var pt=y.call(y.call(ce,Zt,"\\$1"),/[\x00-\x1f]/g,Et);return J(pt,"single",de)}function Et(ce){var de=ce.charCodeAt(0),Rt={8:"b",9:"t",10:"n",12:"f",13:"r"}[de];return Rt?"\\"+Rt:"\\x"+(de<16?"0":"")+w.call(de.toString(16))}function It(ce){return"Object("+ce+")"}function Kt(ce){return ce+" { ? }"}function Ti(ce,de,Rt,Wt){var Zt=Wt?dn(Rt,Wt):R.call(Rt,", ");return ce+" ("+de+") {"+Zt+"}"}function Wi(ce){for(var de=0;dePx=s,kx=Symbol();function _g(s){return s&&typeof s=="object"&&Object.prototype.toString.call(s)==="[object Object]"&&typeof s.toJSON!="function"}function l_(){const s=Iy(!0),e=s.run(()=>lt({}));let t=[],i=[];const n=Dr({install(r){pu(n),n._a=r,r.provide(kx,n),r.config.globalProperties.$pinia=n,i.forEach(a=>t.push(a)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:s,_s:new Map,state:e});return n}const Uf=()=>{};function Tg(s,e,t,i=Uf){s.add(e);const n=()=>{s.delete(e)&&i()};return!t&&Ry()&&VS(n),n}function Wa(s,...e){s.forEach(t=>{t(...e)})}const c_=s=>s(),Ag=Symbol(),ju=Symbol();function Xf(s,e){s instanceof Map&&e instanceof Map?e.forEach((t,i)=>s.set(i,t)):s instanceof Set&&e instanceof Set&&e.forEach(s.add,s);for(const t in e){if(!Object.hasOwn(e,t))continue;const i=e[t],n=s[t];_g(n)&&_g(i)&&Object.hasOwn(s,t)&&!Si(i)&&!cr(i)?s[t]=Xf(n,i):s[t]=i}return s}const h_=Symbol();function u_(s){return!s||typeof s!="object"||!Object.hasOwn(s,h_)}const{assign:_r}=Object;function d_(s){return!!(Si(s)&&s.effect)}function f_(s,e,t,i){const{state:n,actions:r,getters:a}=e,o=t.state.value[s];let h;function l(){o||(t.state.value[s]=n?n():{});const c=h2(t.state.value[s]);return _r(c,r,Object.keys(a||{}).reduce((u,d)=>(u[d]=Dr(vt(()=>{pu(t);const f=t._s.get(s);return a[d].call(f,f)})),u),{}))}return h=Fx(s,l,e,t,i,!0),h}function Fx(s,e,t={},i,n,r){let a;const o=_r({actions:{}},t),h={deep:!0};let l,c,u=new Set,d=new Set,f;const p=i.state.value[s];!r&&!p&&(i.state.value[s]={});let m;function g(_){let R;l=c=!1,typeof _=="function"?(_(i.state.value[s]),R={type:"patch function",storeId:s,events:f}):(Xf(i.state.value[s],_),R={type:"patch object",payload:_,storeId:s,events:f});const P=m=Symbol();lu().then(()=>{m===P&&(l=!0)}),c=!0,Wa(u,R,i.state.value[s])}const v=r?function(){const{state:R}=t,P=R?R():{};this.$patch(F=>{_r(F,P)})}:Uf;function b(){a.stop(),u.clear(),d.clear(),i._s.delete(s)}const y=(_,R="")=>{if(Ag in _)return _[ju]=R,_;const P=function(){pu(i);const F=Array.from(arguments),I=new Set,k=new Set;function B(L){I.add(L)}function D(L){k.add(L)}Wa(d,{args:F,name:P[ju],store:A,after:B,onError:D});let U;try{U=_.apply(this&&this.$id===s?this:A,F)}catch(L){throw Wa(k,L),L}return U instanceof Promise?U.then(L=>(Wa(I,L),L)).catch(L=>(Wa(k,L),Promise.reject(L))):(Wa(I,U),U)};return P[Ag]=!0,P[ju]=R,P},w={_p:i,$id:s,$onAction:Tg.bind(null,d),$patch:g,$reset:v,$subscribe(_,R={}){if(u.has(_))return Uf;const P=Tg(u,_,R.detached,()=>F()),F=a.run(()=>fs(()=>i.state.value[s],I=>{(R.flush==="sync"?c:l)&&_({storeId:s,type:"direct",events:f},I)},_r({},h,R)));return P},$dispose:b},A=Da(w);i._s.set(s,A);const T=(i._a&&i._a.runWithContext||c_)(()=>i._e.run(()=>(a=Iy()).run(()=>e({action:y}))));for(const _ in T){const R=T[_];Si(R)&&!d_(R)||cr(R)?r||(p&&u_(R)&&(Si(R)?R.value=p[_]:((R instanceof Set||R instanceof Map)&&R.clear(),Xf(R,p[_]))),i.state.value[s][_]=R):typeof R=="function"&&(T[_]=y(R,_),o.actions[_]=R)}return _r(A,T),_r($t(A),T),Object.defineProperty(A,"$state",{get:()=>i.state.value[s],set:_=>{g(R=>{_r(R,_)})}}),i._p.forEach(_=>{const R=a.run(()=>_({store:A,app:i._a,pinia:i,options:o}));_r(A,R)}),p&&r&&t.hydrate&&t.hydrate(A.$state,p),l=!0,c=!0,A}/*! #__NO_SIDE_EFFECTS__ */function m_(s,e,t){let i;const n=typeof e=="function";i=n?t:e;function r(a,o){const h=w2();return a=a||(h?dl(kx,null):null),a&&pu(a),a=Px,a._s.has(s)||(n?Fx(s,e,i,a):f_(s,i,a)),a._s.get(s)}return r.$id=s,r}var Na=(s=>(s[s.WEBGL_LEGACY=0]="WEBGL_LEGACY",s[s.WEBGL=1]="WEBGL",s[s.WEBGL2=2]="WEBGL2",s))(Na||{}),Ox=(s=>(s[s.UNKNOWN=0]="UNKNOWN",s[s.WEBGL=1]="WEBGL",s[s.CANVAS=2]="CANVAS",s))(Ox||{}),Vf=(s=>(s[s.COLOR=16384]="COLOR",s[s.DEPTH=256]="DEPTH",s[s.STENCIL=1024]="STENCIL",s))(Vf||{}),dt=(s=>(s[s.NORMAL=0]="NORMAL",s[s.ADD=1]="ADD",s[s.MULTIPLY=2]="MULTIPLY",s[s.SCREEN=3]="SCREEN",s[s.OVERLAY=4]="OVERLAY",s[s.DARKEN=5]="DARKEN",s[s.LIGHTEN=6]="LIGHTEN",s[s.COLOR_DODGE=7]="COLOR_DODGE",s[s.COLOR_BURN=8]="COLOR_BURN",s[s.HARD_LIGHT=9]="HARD_LIGHT",s[s.SOFT_LIGHT=10]="SOFT_LIGHT",s[s.DIFFERENCE=11]="DIFFERENCE",s[s.EXCLUSION=12]="EXCLUSION",s[s.HUE=13]="HUE",s[s.SATURATION=14]="SATURATION",s[s.COLOR=15]="COLOR",s[s.LUMINOSITY=16]="LUMINOSITY",s[s.NORMAL_NPM=17]="NORMAL_NPM",s[s.ADD_NPM=18]="ADD_NPM",s[s.SCREEN_NPM=19]="SCREEN_NPM",s[s.NONE=20]="NONE",s[s.SRC_OVER=0]="SRC_OVER",s[s.SRC_IN=21]="SRC_IN",s[s.SRC_OUT=22]="SRC_OUT",s[s.SRC_ATOP=23]="SRC_ATOP",s[s.DST_OVER=24]="DST_OVER",s[s.DST_IN=25]="DST_IN",s[s.DST_OUT=26]="DST_OUT",s[s.DST_ATOP=27]="DST_ATOP",s[s.ERASE=26]="ERASE",s[s.SUBTRACT=28]="SUBTRACT",s[s.XOR=29]="XOR",s))(dt||{}),Pn=(s=>(s[s.POINTS=0]="POINTS",s[s.LINES=1]="LINES",s[s.LINE_LOOP=2]="LINE_LOOP",s[s.LINE_STRIP=3]="LINE_STRIP",s[s.TRIANGLES=4]="TRIANGLES",s[s.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",s[s.TRIANGLE_FAN=6]="TRIANGLE_FAN",s))(Pn||{}),Ne=(s=>(s[s.RGBA=6408]="RGBA",s[s.RGB=6407]="RGB",s[s.RG=33319]="RG",s[s.RED=6403]="RED",s[s.RGBA_INTEGER=36249]="RGBA_INTEGER",s[s.RGB_INTEGER=36248]="RGB_INTEGER",s[s.RG_INTEGER=33320]="RG_INTEGER",s[s.RED_INTEGER=36244]="RED_INTEGER",s[s.ALPHA=6406]="ALPHA",s[s.LUMINANCE=6409]="LUMINANCE",s[s.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",s[s.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",s[s.DEPTH_STENCIL=34041]="DEPTH_STENCIL",s))(Ne||{}),vo=(s=>(s[s.TEXTURE_2D=3553]="TEXTURE_2D",s[s.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",s[s.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",s[s.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",s[s.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",s[s.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",s[s.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",s))(vo||{}),et=(s=>(s[s.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",s[s.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",s[s.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",s[s.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",s[s.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",s[s.UNSIGNED_INT=5125]="UNSIGNED_INT",s[s.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",s[s.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",s[s.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",s[s.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",s[s.BYTE=5120]="BYTE",s[s.SHORT=5122]="SHORT",s[s.INT=5124]="INT",s[s.FLOAT=5126]="FLOAT",s[s.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",s[s.HALF_FLOAT=36193]="HALF_FLOAT",s))(et||{}),ze=(s=>(s[s.FLOAT=0]="FLOAT",s[s.INT=1]="INT",s[s.UINT=2]="UINT",s))(ze||{}),sn=(s=>(s[s.NEAREST=0]="NEAREST",s[s.LINEAR=1]="LINEAR",s))(sn||{}),an=(s=>(s[s.CLAMP=33071]="CLAMP",s[s.REPEAT=10497]="REPEAT",s[s.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",s))(an||{}),Ys=(s=>(s[s.OFF=0]="OFF",s[s.POW2=1]="POW2",s[s.ON=2]="ON",s[s.ON_MANUAL=3]="ON_MANUAL",s))(Ys||{}),Ni=(s=>(s[s.NPM=0]="NPM",s[s.UNPACK=1]="UNPACK",s[s.PMA=2]="PMA",s[s.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",s[s.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",s[s.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",s))(Ni||{}),Cn=(s=>(s[s.NO=0]="NO",s[s.YES=1]="YES",s[s.AUTO=2]="AUTO",s[s.BLEND=0]="BLEND",s[s.CLEAR=1]="CLEAR",s[s.BLIT=2]="BLIT",s))(Cn||{}),hp=(s=>(s[s.AUTO=0]="AUTO",s[s.MANUAL=1]="MANUAL",s))(hp||{}),Us=(s=>(s.LOW="lowp",s.MEDIUM="mediump",s.HIGH="highp",s))(Us||{}),Ri=(s=>(s[s.NONE=0]="NONE",s[s.SCISSOR=1]="SCISSOR",s[s.STENCIL=2]="STENCIL",s[s.SPRITE=3]="SPRITE",s[s.COLOR=4]="COLOR",s))(Ri||{}),Ei=(s=>(s[s.NONE=0]="NONE",s[s.LOW=2]="LOW",s[s.MEDIUM=4]="MEDIUM",s[s.HIGH=8]="HIGH",s))(Ei||{}),Bn=(s=>(s[s.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",s[s.ARRAY_BUFFER=34962]="ARRAY_BUFFER",s[s.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",s))(Bn||{});const p_={createCanvas:(s,e)=>{const t=document.createElement("canvas");return t.width=s,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(s,e)=>fetch(s,e),parseXML:s=>new DOMParser().parseFromString(s,"text/xml")},We={ADAPTER:p_,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var Wu=/iPhone/i,Eg=/iPod/i,Cg=/iPad/i,Ig=/\biOS-universal(?:.+)Mac\b/i,zu=/\bAndroid(?:.+)Mobile\b/i,Rg=/Android/i,za=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ac=/Silk/i,Gn=/Windows Phone/i,Pg=/\bWindows(?:.+)ARM\b/i,kg=/BlackBerry/i,Fg=/BB10/i,Og=/Opera Mini/i,Bg=/\b(CriOS|Chrome)(?:.+)Mobile/i,Lg=/Mobile(?:.+)Firefox\b/i,Dg=function(s){return typeof s<"u"&&s.platform==="MacIntel"&&typeof s.maxTouchPoints=="number"&&s.maxTouchPoints>1&&typeof MSStream>"u"};function g_(s){return function(e){return e.test(s)}}function Ng(s){var e={userAgent:"",platform:"",maxTouchPoints:0};!s&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof s=="string"?e.userAgent=s:s&&s.userAgent&&(e={userAgent:s.userAgent,platform:s.platform,maxTouchPoints:s.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var n=g_(t),r={apple:{phone:n(Wu)&&!n(Gn),ipod:n(Eg),tablet:!n(Wu)&&(n(Cg)||Dg(e))&&!n(Gn),universal:n(Ig),device:(n(Wu)||n(Eg)||n(Cg)||n(Ig)||Dg(e))&&!n(Gn)},amazon:{phone:n(za),tablet:!n(za)&&n(ac),device:n(za)||n(ac)},android:{phone:!n(Gn)&&n(za)||!n(Gn)&&n(zu),tablet:!n(Gn)&&!n(za)&&!n(zu)&&(n(ac)||n(Rg)),device:!n(Gn)&&(n(za)||n(ac)||n(zu)||n(Rg))||n(/\bokhttp\b/i)},windows:{phone:n(Gn),tablet:n(Pg),device:n(Gn)||n(Pg)},other:{blackberry:n(kg),blackberry10:n(Fg),opera:n(Og),firefox:n(Lg),chrome:n(Bg),device:n(kg)||n(Fg)||n(Og)||n(Lg)||n(Bg)},any:!1,phone:!1,tablet:!1};return r.any=r.apple.device||r.android.device||r.windows.device||r.other.device,r.phone=r.apple.phone||r.android.phone||r.windows.phone,r.tablet=r.apple.tablet||r.android.tablet||r.windows.tablet,r}const v_=Ng.default??Ng,ir=v_(globalThis.navigator);We.RETINA_PREFIX=/@([0-9\.]+)x/;We.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var mh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bx(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function y_(s){if(Object.prototype.hasOwnProperty.call(s,"__esModule"))return s;var e=s.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(i){var n=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return s[i]}})}),t}var qu={exports:{}},Ug;function x_(){return Ug||(Ug=1,(function(s){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function n(h,l,c){this.fn=h,this.context=l,this.once=c||!1}function r(h,l,c,u,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var f=new n(c,u||h,d),p=t?t+l:l;return h._events[p]?h._events[p].fn?h._events[p]=[h._events[p],f]:h._events[p].push(f):(h._events[p]=f,h._eventsCount++),h}function a(h,l){--h._eventsCount===0?h._events=new i:delete h._events[l]}function o(){this._events=new i,this._eventsCount=0}o.prototype.eventNames=function(){var l=[],c,u;if(this._eventsCount===0)return l;for(u in c=this._events)e.call(c,u)&&l.push(t?u.slice(1):u);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},o.prototype.listeners=function(l){var c=t?t+l:l,u=this._events[c];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,f=u.length,p=new Array(f);d80*O){W=K=L[0],J=fe=L[1];for(var pe=O;peK&&(K=me),we>fe&&(fe=we);Ee=Math.max(K-W,fe-J),Ee=Ee!==0?32767/Ee:0}return i(V,q,O,W,J,Ee,0),q}function e(L,N,O,X,E){var V,q;if(E===U(L,N,O,X)>0)for(V=N;V=N;V-=X)q=k(V,L[V],L[V+1],q);return q&&w(q,q.next)&&(B(q),q=q.next),q}function t(L,N){if(!L)return L;N||(N=L);var O=L,X;do if(X=!1,!O.steiner&&(w(O,O.next)||y(O.prev,O,O.next)===0)){if(B(O),O=N=O.prev,O===O.next)break;X=!0}else O=O.next;while(X||O!==N);return N}function i(L,N,O,X,E,V,q){if(L){!q&&V&&f(L,X,E,V);for(var W=L,J,K;L.prev!==L.next;){if(J=L.prev,K=L.next,V?r(L,X,E,V):n(L)){N.push(J.i/O|0),N.push(L.i/O|0),N.push(K.i/O|0),B(L),L=K.next,W=K.next;continue}if(L=K,L===W){q?q===1?(L=a(t(L),N,O),i(L,N,O,X,E,V,2)):q===2&&o(L,N,O,X,E,V):i(t(L),N,O,X,E,V,1);break}}}}function n(L){var N=L.prev,O=L,X=L.next;if(y(N,O,X)>=0)return!1;for(var E=N.x,V=O.x,q=X.x,W=N.y,J=O.y,K=X.y,fe=EV?E>q?E:q:V>q?V:q,Ee=W>J?W>K?W:K:J>K?J:K,pe=X.next;pe!==N;){if(pe.x>=fe&&pe.x<=we&&pe.y>=me&&pe.y<=Ee&&v(E,W,V,J,q,K,pe.x,pe.y)&&y(pe.prev,pe,pe.next)>=0)return!1;pe=pe.next}return!0}function r(L,N,O,X){var E=L.prev,V=L,q=L.next;if(y(E,V,q)>=0)return!1;for(var W=E.x,J=V.x,K=q.x,fe=E.y,me=V.y,we=q.y,Ee=WJ?W>K?W:K:J>K?J:K,G=fe>me?fe>we?fe:we:me>we?me:we,Z=m(Ee,pe,N,O,X),z=m(Ae,G,N,O,X),j=L.prevZ,te=L.nextZ;j&&j.z>=Z&&te&&te.z<=z;){if(j.x>=Ee&&j.x<=Ae&&j.y>=pe&&j.y<=G&&j!==E&&j!==q&&v(W,fe,J,me,K,we,j.x,j.y)&&y(j.prev,j,j.next)>=0||(j=j.prevZ,te.x>=Ee&&te.x<=Ae&&te.y>=pe&&te.y<=G&&te!==E&&te!==q&&v(W,fe,J,me,K,we,te.x,te.y)&&y(te.prev,te,te.next)>=0))return!1;te=te.nextZ}for(;j&&j.z>=Z;){if(j.x>=Ee&&j.x<=Ae&&j.y>=pe&&j.y<=G&&j!==E&&j!==q&&v(W,fe,J,me,K,we,j.x,j.y)&&y(j.prev,j,j.next)>=0)return!1;j=j.prevZ}for(;te&&te.z<=z;){if(te.x>=Ee&&te.x<=Ae&&te.y>=pe&&te.y<=G&&te!==E&&te!==q&&v(W,fe,J,me,K,we,te.x,te.y)&&y(te.prev,te,te.next)>=0)return!1;te=te.nextZ}return!0}function a(L,N,O){var X=L;do{var E=X.prev,V=X.next.next;!w(E,V)&&A(E,X,X.next,V)&&P(E,V)&&P(V,E)&&(N.push(E.i/O|0),N.push(X.i/O|0),N.push(V.i/O|0),B(X),B(X.next),X=L=V),X=X.next}while(X!==L);return t(X)}function o(L,N,O,X,E,V){var q=L;do{for(var W=q.next.next;W!==q.prev;){if(q.i!==W.i&&b(q,W)){var J=I(q,W);q=t(q,q.next),J=t(J,J.next),i(q,N,O,X,E,V,0),i(J,N,O,X,E,V,0);return}W=W.next}q=q.next}while(q!==L)}function h(L,N,O,X){var E=[],V,q,W,J,K;for(V=0,q=N.length;V=O.next.y&&O.next.y!==O.y){var W=O.x+(E-O.y)*(O.next.x-O.x)/(O.next.y-O.y);if(W<=X&&W>V&&(V=W,q=O.x=O.x&&O.x>=K&&X!==O.x&&v(Eq.x||O.x===q.x&&d(q,O)))&&(q=O,me=we)),O=O.next;while(O!==J);return q}function d(L,N){return y(L.prev,L,N.prev)<0&&y(N.next,L,L.next)<0}function f(L,N,O,X){var E=L;do E.z===0&&(E.z=m(E.x,E.y,N,O,X)),E.prevZ=E.prev,E.nextZ=E.next,E=E.next;while(E!==L);E.prevZ.nextZ=null,E.prevZ=null,p(E)}function p(L){var N,O,X,E,V,q,W,J,K=1;do{for(O=L,L=null,V=null,q=0;O;){for(q++,X=O,W=0,N=0;N0||J>0&&X;)W!==0&&(J===0||!X||O.z<=X.z)?(E=O,O=O.nextZ,W--):(E=X,X=X.nextZ,J--),V?V.nextZ=E:L=E,E.prevZ=V,V=E;O=X}V.nextZ=null,K*=2}while(q>1);return L}function m(L,N,O,X,E){return L=(L-O)*E|0,N=(N-X)*E|0,L=(L|L<<8)&16711935,L=(L|L<<4)&252645135,L=(L|L<<2)&858993459,L=(L|L<<1)&1431655765,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,L|N<<1}function g(L){var N=L,O=L;do(N.x=(L-q)*(V-W)&&(L-q)*(X-W)>=(O-q)*(N-W)&&(O-q)*(V-W)>=(E-q)*(X-W)}function b(L,N){return L.next.i!==N.i&&L.prev.i!==N.i&&!R(L,N)&&(P(L,N)&&P(N,L)&&F(L,N)&&(y(L.prev,L,N.prev)||y(L,N.prev,N))||w(L,N)&&y(L.prev,L,L.next)>0&&y(N.prev,N,N.next)>0)}function y(L,N,O){return(N.y-L.y)*(O.x-N.x)-(N.x-L.x)*(O.y-N.y)}function w(L,N){return L.x===N.x&&L.y===N.y}function A(L,N,O,X){var E=_(y(L,N,O)),V=_(y(L,N,X)),q=_(y(O,X,L)),W=_(y(O,X,N));return!!(E!==V&&q!==W||E===0&&T(L,O,N)||V===0&&T(L,X,N)||q===0&&T(O,L,X)||W===0&&T(O,N,X))}function T(L,N,O){return N.x<=Math.max(L.x,O.x)&&N.x>=Math.min(L.x,O.x)&&N.y<=Math.max(L.y,O.y)&&N.y>=Math.min(L.y,O.y)}function _(L){return L>0?1:L<0?-1:0}function R(L,N){var O=L;do{if(O.i!==L.i&&O.next.i!==L.i&&O.i!==N.i&&O.next.i!==N.i&&A(O,O.next,L,N))return!0;O=O.next}while(O!==L);return!1}function P(L,N){return y(L.prev,L,L.next)<0?y(L,N,L.next)>=0&&y(L,L.prev,N)>=0:y(L,N,L.prev)<0||y(L,L.next,N)<0}function F(L,N){var O=L,X=!1,E=(L.x+N.x)/2,V=(L.y+N.y)/2;do O.y>V!=O.next.y>V&&O.next.y!==O.y&&E<(O.next.x-O.x)*(V-O.y)/(O.next.y-O.y)+O.x&&(X=!X),O=O.next;while(O!==L);return X}function I(L,N){var O=new D(L.i,L.x,L.y),X=new D(N.i,N.x,N.y),E=L.next,V=N.prev;return L.next=N,N.prev=L,O.next=E,E.prev=O,X.next=O,O.prev=X,V.next=X,X.prev=V,X}function k(L,N,O,X){var E=new D(L,N,O);return X?(E.next=X.next,E.prev=X,X.next.prev=E,X.next=E):(E.prev=E,E.next=E),E}function B(L){L.next.prev=L.prev,L.prev.next=L.next,L.prevZ&&(L.prevZ.nextZ=L.nextZ),L.nextZ&&(L.nextZ.prevZ=L.prevZ)}function D(L,N,O){this.i=L,this.x=N,this.y=O,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}s.deviation=function(L,N,O,X){var E=N&&N.length,V=E?N[0]*O:L.length,q=Math.abs(U(L,0,V,O));if(E)for(var W=0,J=N.length;W0&&(X+=L[E-1].length,O.holes.push(X))}return O},oc.exports}var S_=w_();const M_=Bx(S_);var aa={},tl={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var __=tl.exports,Vg;function T_(){return Vg||(Vg=1,(function(s,e){(function(t){var i=e&&!e.nodeType&&e,n=s&&!s.nodeType&&s,r=typeof mh=="object"&&mh;(r.global===r||r.window===r||r.self===r)&&(t=r);var a,o=2147483647,h=36,l=1,c=26,u=38,d=700,f=72,p=128,m="-",g=/^xn--/,v=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=h-l,A=Math.floor,T=String.fromCharCode,_;function R(E){throw new RangeError(y[E])}function P(E,V){for(var q=E.length,W=[];q--;)W[q]=V(E[q]);return W}function F(E,V){var q=E.split("@"),W="";q.length>1&&(W=q[0]+"@",E=q[1]),E=E.replace(b,".");var J=E.split("."),K=P(J,V).join(".");return W+K}function I(E){for(var V=[],q=0,W=E.length,J,K;q=55296&&J<=56319&&q65535&&(V-=65536,q+=T(V>>>10&1023|55296),V=56320|V&1023),q+=T(V),q}).join("")}function B(E){return E-48<10?E-22:E-65<26?E-65:E-97<26?E-97:h}function D(E,V){return E+22+75*(E<26)-((V!=0)<<5)}function U(E,V,q){var W=0;for(E=q?A(E/d):E>>1,E+=A(E/V);E>w*c>>1;W+=h)E=A(E/w);return A(W+(w+1)*E/(E+u))}function L(E){var V=[],q=E.length,W,J=0,K=p,fe=f,me,we,Ee,pe,Ae,G,Z,z,j;for(me=E.lastIndexOf(m),me<0&&(me=0),we=0;we=128&&R("not-basic"),V.push(E.charCodeAt(we));for(Ee=me>0?me+1:0;Ee=q&&R("invalid-input"),Z=B(E.charCodeAt(Ee++)),(Z>=h||Z>A((o-J)/Ae))&&R("overflow"),J+=Z*Ae,z=G<=fe?l:G>=fe+c?c:G-fe,!(ZA(o/j)&&R("overflow"),Ae*=j;W=V.length+1,fe=U(J-pe,W,pe==0),A(J/W)>o-K&&R("overflow"),K+=A(J/W),J%=W,V.splice(J++,0,K)}return k(V)}function N(E){var V,q,W,J,K,fe,me,we,Ee,pe,Ae,G=[],Z,z,j,te;for(E=I(E),Z=E.length,V=p,q=0,K=f,fe=0;fe=V&&AeA((o-q)/z)&&R("overflow"),q+=(me-V)*z,V=me,fe=0;feo&&R("overflow"),Ae==V){for(we=q,Ee=h;pe=Ee<=K?l:Ee>=K+c?c:Ee-K,!(we-1e3&&ce<1e3||T.call(/e/,de))return de;var Rt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ce=="number"){var Wt=ce<0?-F(-ce):F(ce);if(Wt!==ce){var Zt=String(Wt),pt=b.call(de,Zt.length+1);return y.call(Zt,Rt,"$&_")+"."+y.call(y.call(pt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(de,Rt,"$&_")}var X=C_,E=X.custom,V=z(E)?E:null,q={__proto__:null,double:'"',single:"'"},W={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Zu=function ce(de,Rt,Wt,Zt){var pt=Rt||{};if(he(pt,"quoteStyle")&&!he(q,pt.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(he(pt,"maxStringLength")&&(typeof pt.maxStringLength=="number"?pt.maxStringLength<0&&pt.maxStringLength!==1/0:pt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Rs=he(pt,"customInspect")?pt.customInspect:!0;if(typeof Rs!="boolean"&&Rs!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(he(pt,"indent")&&pt.indent!==null&&pt.indent!==" "&&!(parseInt(pt.indent,10)===pt.indent&&pt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(he(pt,"numericSeparator")&&typeof pt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Hs=pt.numericSeparator;if(typeof de>"u")return"undefined";if(de===null)return"null";if(typeof de=="boolean")return de?"true":"false";if(typeof de=="string")return At(de,pt);if(typeof de=="number"){if(de===0)return 1/0/de>0?"0":"-0";var Ui=String(de);return Hs?O(de,Ui):Ui}if(typeof de=="bigint"){var Ps=String(de)+"n";return Hs?O(de,Ps):Ps}var br=typeof pt.depth>"u"?5:pt.depth;if(typeof Wt>"u"&&(Wt=0),Wt>=br&&br>0&&typeof de=="object")return me(de)?"[Array]":"[Object]";var js=zi(pt,Wt);if(typeof Zt>"u")Zt=[];else if(ge(Zt,de)>=0)return"[Circular]";function ss(Me,be,De){if(be&&(Zt=P.call(Zt),Zt.push(be)),De){var Ie={depth:pt.depth};return he(pt,"quoteStyle")&&(Ie.quoteStyle=pt.quoteStyle),ce(Me,Ie,Wt+1,Zt)}return ce(Me,pt,Wt+1,Zt)}if(typeof de=="function"&&!Ee(de)){var $a=oe(de),Ga=di(de,ss);return"[Function"+($a?": "+$a:" (anonymous)")+"]"+(Ga.length>0?" { "+R.call(Ga,", ")+" }":"")}if(z(de)){var Qr=D?y.call(String(de),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(de);return typeof de=="object"&&!D?It(Qr):Qr}if(St(de)){for(var Ws="<"+A.call(String(de.nodeName)),ws=de.attributes||[],Vn=0;Vn",Ws}if(me(de)){if(de.length===0)return"[]";var ks=di(de,ss);return js&&!Wi(ks)?"["+dn(ks,js)+"]":"[ "+R.call(ks,", ")+" ]"}if(pe(de)){var ea=di(de,ss);return!("cause"in Error.prototype)&&"cause"in de&&!L.call(de,"cause")?"{ ["+String(de)+"] "+R.call(_.call("[cause]: "+ss(de.cause),ea),", ")+" }":ea.length===0?"["+String(de)+"]":"{ ["+String(de)+"] "+R.call(ea,", ")+" }"}if(typeof de=="object"&&Rs){if(V&&typeof de[V]=="function"&&X)return X(de,{depth:br-Wt});if(Rs!=="symbol"&&typeof de.inspect=="function")return de.inspect()}if(le(de)){var ta=[];return i&&i.call(de,function(Me,be){ta.push(ss(be,de,!0)+" => "+ss(Me,de))}),Ti("Map",t.call(de),ta,js)}if(Be(de)){var H=[];return o&&o.call(de,function(Me){H.push(ss(Me,de))}),Ti("Set",a.call(de),H,js)}if(Oe(de))return Kt("WeakMap");if(st(de))return Kt("WeakSet");if(Fe(de))return Kt("WeakRef");if(G(de))return It(ss(Number(de)));if(j(de))return It(ss(I.call(de)));if(Z(de))return It(p.call(de));if(Ae(de))return It(ss(String(de)));if(typeof window<"u"&&de===window)return"{ [object Window] }";if(typeof globalThis<"u"&&de===globalThis||typeof mh<"u"&&de===mh)return"{ [object globalThis] }";if(!we(de)&&!Ee(de)){var Y=di(de,ss),ee=N?N(de)===Object.prototype:de instanceof Object||de.constructor===Object,ne=de instanceof Object?"":"null prototype",ue=!ee&&U&&Object(de)===de&&U in de?b.call(xe(de),8,-1):ne?"Object":"",ve=ee||typeof de.constructor!="function"?"":de.constructor.name?de.constructor.name+" ":"",_e=ve+(ue||ne?"["+R.call(_.call([],ue||[],ne||[]),": ")+"] ":"");return Y.length===0?_e+"{}":js?_e+"{"+dn(Y,js)+"}":_e+"{ "+R.call(Y,", ")+" }"}return String(de)};function J(ce,de,Rt){var Wt=Rt.quoteStyle||de,Zt=q[Wt];return Zt+ce+Zt}function K(ce){return y.call(String(ce),/"/g,""")}function fe(ce){return!U||!(typeof ce=="object"&&(U in ce||typeof ce[U]<"u"))}function me(ce){return xe(ce)==="[object Array]"&&fe(ce)}function we(ce){return xe(ce)==="[object Date]"&&fe(ce)}function Ee(ce){return xe(ce)==="[object RegExp]"&&fe(ce)}function pe(ce){return xe(ce)==="[object Error]"&&fe(ce)}function Ae(ce){return xe(ce)==="[object String]"&&fe(ce)}function G(ce){return xe(ce)==="[object Number]"&&fe(ce)}function Z(ce){return xe(ce)==="[object Boolean]"&&fe(ce)}function z(ce){if(D)return ce&&typeof ce=="object"&&ce instanceof Symbol;if(typeof ce=="symbol")return!0;if(!ce||typeof ce!="object"||!B)return!1;try{return B.call(ce),!0}catch{}return!1}function j(ce){if(!ce||typeof ce!="object"||!I)return!1;try{return I.call(ce),!0}catch{}return!1}var te=Object.prototype.hasOwnProperty||function(ce){return ce in this};function he(ce,de){return te.call(ce,de)}function xe(ce){return m.call(ce)}function oe(ce){if(ce.name)return ce.name;var de=v.call(g.call(ce),/^function\s*([\w$]+)/);return de?de[1]:null}function ge(ce,de){if(ce.indexOf)return ce.indexOf(de);for(var Rt=0,Wt=ce.length;Rtde.maxStringLength){var Rt=ce.length-de.maxStringLength,Wt="... "+Rt+" more character"+(Rt>1?"s":"");return At(b.call(ce,0,de.maxStringLength),de)+Wt}var Zt=W[de.quoteStyle||"single"];Zt.lastIndex=0;var pt=y.call(y.call(ce,Zt,"\\$1"),/[\x00-\x1f]/g,Et);return J(pt,"single",de)}function Et(ce){var de=ce.charCodeAt(0),Rt={8:"b",9:"t",10:"n",12:"f",13:"r"}[de];return Rt?"\\"+Rt:"\\x"+(de<16?"0":"")+w.call(de.toString(16))}function It(ce){return"Object("+ce+")"}function Kt(ce){return ce+" { ? }"}function Ti(ce,de,Rt,Wt){var Zt=Wt?dn(Rt,Wt):R.call(Rt,", ");return ce+" ("+de+") {"+Zt+"}"}function Wi(ce){for(var de=0;de=0)return!1;return!0}function zi(ce,de){var Rt;if(ce.indent===" ")Rt=" ";else if(typeof ce.indent=="number"&&ce.indent>0)Rt=R.call(Array(ce.indent+1)," ");else return null;return{base:Rt,prev:R.call(Array(de+1),Rt)}}function dn(ce,de){if(ce.length===0)return"";var Rt=` `+de.prev+de.base;return Rt+R.call(ce,","+Rt)+` -`+de.prev}function di(ce,de){var Rt=me(ce),Wt=[];if(Rt){Wt.length=ce.length;for(var Zt=0;Zt"u"||!_?s:_(Uint8Array),D={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?s:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?s:ArrayBuffer,"%ArrayIteratorPrototype%":T&&_?_([][Symbol.iterator]()):s,"%AsyncFromSyncIteratorPrototype%":s,"%AsyncFunction%":k,"%AsyncGenerator%":k,"%AsyncGeneratorFunction%":k,"%AsyncIteratorPrototype%":k,"%Atomics%":typeof Atomics>"u"?s:Atomics,"%BigInt%":typeof BigInt>"u"?s:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?s:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?s:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?s:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":i,"%Float16Array%":typeof Float16Array>"u"?s:Float16Array,"%Float32Array%":typeof Float32Array>"u"?s:Float32Array,"%Float64Array%":typeof Float64Array>"u"?s:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?s:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":k,"%Int8Array%":typeof Int8Array>"u"?s:Int8Array,"%Int16Array%":typeof Int16Array>"u"?s:Int16Array,"%Int32Array%":typeof Int32Array>"u"?s:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&_?_(_([][Symbol.iterator]())):s,"%JSON%":typeof JSON=="object"?JSON:s,"%Map%":typeof Map>"u"?s:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!_?s:_(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?s:Promise,"%Proxy%":typeof Proxy>"u"?s:Proxy,"%RangeError%":n,"%ReferenceError%":r,"%Reflect%":typeof Reflect>"u"?s:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?s:Set,"%SetIteratorPrototype%":typeof Set>"u"||!T||!_?s:_(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?s:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&_?_(""[Symbol.iterator]()):s,"%Symbol%":T?Symbol:s,"%SyntaxError%":a,"%ThrowTypeError%":A,"%TypedArray%":B,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?s:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?s:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?s:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?s:Uint32Array,"%URIError%":h,"%WeakMap%":typeof WeakMap>"u"?s:WeakMap,"%WeakRef%":typeof WeakRef>"u"?s:WeakRef,"%WeakSet%":typeof WeakSet>"u"?s:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":F,"%Object.defineProperty%":y,"%Object.getPrototypeOf%":R,"%Math.abs%":l,"%Math.floor%":c,"%Math.max%":u,"%Math.min%":d,"%Math.pow%":f,"%Math.round%":p,"%Math.sign%":m,"%Reflect.getPrototypeOf%":P};if(_)try{null.error}catch(Ee){var U=_(_(Ee));D["%Error.prototype%"]=U}var L=function Ee(pe){var Ae;if(pe==="%AsyncFunction%")Ae=v("async function () {}");else if(pe==="%GeneratorFunction%")Ae=v("function* () {}");else if(pe==="%AsyncGeneratorFunction%")Ae=v("async function* () {}");else if(pe==="%AsyncGenerator%"){var G=Ee("%AsyncGeneratorFunction%");G&&(Ae=G.prototype)}else if(pe==="%AsyncIteratorPrototype%"){var Z=Ee("%AsyncGenerator%");Z&&_&&(Ae=_(Z.prototype))}return D[pe]=Ae,Ae},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=vu(),X=JT(),E=O.call(I,Array.prototype.concat),V=O.call(F,Array.prototype.splice),q=O.call(I,String.prototype.replace),W=O.call(I,String.prototype.slice),J=O.call(I,RegExp.prototype.exec),K=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fe=/\\(\\)?/g,me=function(pe){var Ae=W(pe,0,1),G=W(pe,-1);if(Ae==="%"&&G!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(G==="%"&&Ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var Z=[];return q(pe,K,function(z,j,te,he){Z[Z.length]=te?q(he,fe,"$1"):j||z}),Z},we=function(pe,Ae){var G=pe,Z;if(X(N,G)&&(Z=N[G],G="%"+Z[0]+"%"),X(D,G)){var z=D[G];if(z===k&&(z=L(G)),typeof z>"u"&&!Ae)throw new o("intrinsic "+pe+" exists, but is not available. Please file an issue!");return{alias:Z,name:G,value:z}}throw new a("intrinsic "+pe+" does not exist!")};return Pd=function(pe,Ae){if(typeof pe!="string"||pe.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ae!="boolean")throw new o('"allowMissing" argument must be a boolean');if(J(/^%?[^%]*%?$/,pe)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var G=me(pe),Z=G.length>0?G[0]:"",z=we("%"+Z+"%",Ae),j=z.name,te=z.value,he=!1,xe=z.alias;xe&&(Z=xe[0],V(G,E([0,1],xe)));for(var oe=1,ge=!0;oe=G.length){var Be=b(te,le);ge=!!Be,ge&&"get"in Be&&!("originalValue"in Be.get)?te=Be.get:te=te[le]}else ge=X(te,le),te=te[le];ge&&!he&&(D[j]=te)}}return te},Pd}var kd,_0;function $x(){if(_0)return kd;_0=1;var s=dp(),e=Yx(),t=e([s("%String.prototype.indexOf%")]);return kd=function(n,r){var a=s(n,!!r);return typeof a=="function"&&t(n,".prototype.")>-1?e([a]):a},kd}var Fd,T0;function Gx(){if(T0)return Fd;T0=1;var s=dp(),e=$x(),t=gu(),i=Lo(),n=s("%Map%",!0),r=e("Map.prototype.get",!0),a=e("Map.prototype.set",!0),o=e("Map.prototype.has",!0),h=e("Map.prototype.delete",!0),l=e("Map.prototype.size",!0);return Fd=!!n&&function(){var u,d={assert:function(f){if(!d.has(f))throw new i("Side channel does not contain "+t(f))},delete:function(f){if(u){var p=h(u,f);return l(u)===0&&(u=void 0),p}return!1},get:function(f){if(u)return r(u,f)},has:function(f){return u?o(u,f):!1},set:function(f,p){u||(u=new n),a(u,f,p)}};return d},Fd}var Od,A0;function QT(){if(A0)return Od;A0=1;var s=dp(),e=$x(),t=gu(),i=Gx(),n=Lo(),r=s("%WeakMap%",!0),a=e("WeakMap.prototype.get",!0),o=e("WeakMap.prototype.set",!0),h=e("WeakMap.prototype.has",!0),l=e("WeakMap.prototype.delete",!0);return Od=r?function(){var u,d,f={assert:function(p){if(!f.has(p))throw new n("Side channel does not contain "+t(p))},delete:function(p){if(r&&p&&(typeof p=="object"||typeof p=="function")){if(u)return l(u,p)}else if(i&&d)return d.delete(p);return!1},get:function(p){return r&&p&&(typeof p=="object"||typeof p=="function")&&u?a(u,p):d&&d.get(p)},has:function(p){return r&&p&&(typeof p=="object"||typeof p=="function")&&u?h(u,p):!!d&&d.has(p)},set:function(p,m){r&&p&&(typeof p=="object"||typeof p=="function")?(u||(u=new r),o(u,p,m)):i&&(d||(d=i()),d.set(p,m))}};return f}:i,Od}var Bd,E0;function Hx(){if(E0)return Bd;E0=1;var s=Lo(),e=gu(),t=IT(),i=Gx(),n=QT(),r=n||i||t;return Bd=function(){var o,h={assert:function(l){if(!h.has(l)){var c=l&&Object(l)===l?"the given object key":e(l);throw new s("Side channel does not contain "+c)}},delete:function(l){return!!o&&o.delete(l)},get:function(l){return o&&o.get(l)},has:function(l){return!!o&&o.has(l)},set:function(l,c){o||(o=r()),o.set(l,c)}};return h},Bd}var Ld,C0;function fp(){if(C0)return Ld;C0=1;var s=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Ld={default:t.RFC3986,formatters:{RFC1738:function(i){return s.call(i,e,"+")},RFC3986:function(i){return String(i)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},Ld}var Dd,I0;function jx(){if(I0)return Dd;I0=1;var s=fp(),e=Hx(),t=Nx(),i=Object.prototype.hasOwnProperty,n=Array.isArray,r=e(),a=function(P,F){return r.set(P,F),P},o=function(P){return r.has(P)},h=function(P){return r.get(P)},l=function(P,F){r.set(P,F)},c=(function(){for(var R=[],P=0;P<256;++P)R[R.length]="%"+((P<16?"0":"")+P.toString(16)).toUpperCase();return R})(),u=function(P){for(;P.length>1;){var F=P.pop(),I=F.obj[F.prop];if(n(I)){for(var k=[],B=0;B=I.arrayLimit){if(I.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+I.arrayLimit+" element"+(I.arrayLimit===1?"":"s")+" allowed in an array.");return a(d(P.concat(F),I),k)}P[k]=F}else if(P&&typeof P=="object")if(o(P)){var B=h(P)+1;P[B]=F,l(P,B)}else{if(I&&I.strictMerge)return[P,F];(I&&(I.plainObjects||I.allowPrototypes)||!i.call(Object.prototype,F))&&(P[F]=!0)}else return[P,F];return P}if(!P||typeof P!="object"){if(o(F)){for(var D=Object.keys(F),U=I&&I.plainObjects?{__proto__:null,0:P}:{0:P},L=0;LI.arrayLimit){if(I.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+I.arrayLimit+" element"+(I.arrayLimit===1?"":"s")+" allowed in an array.");return a(d(O,I),O.length-1)}return O}var X=P;if(n(P)&&!n(F)&&(X=d(P,I)),n(P)&&n(F)){if(F.forEach(function(E,V){if(i.call(P,V)){var q=P[V];q&&typeof q=="object"&&E&&typeof E=="object"?P[V]=R(q,E,I):P[P.length]=E}else P[V]=E}),I&&typeof I.arrayLimit=="number"&&P.length>I.arrayLimit){if(I.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+I.arrayLimit+" element"+(I.arrayLimit===1?"":"s")+" allowed in an array.");return a(d(P,I),P.length-1)}return P}return Object.keys(F).reduce(function(E,V){var q=F[V];if(i.call(E,V)?f(E,V,R(E[V],q,I)):f(E,V,q),o(F)&&!o(E)&&a(E,h(F)),o(E)){var W=parseInt(V,10);String(W)===V&&W>=0&&W>h(E)&&l(E,W)}return E},X)},m=function(P,F){return Object.keys(F).reduce(function(I,k){return f(I,k,F[k]),I},P)},g=function(R,P,F){var I=R.replace(/\+/g," ");if(F==="iso-8859-1")return I.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(I)}catch{return I}},v=1024,b=function(P,F,I,k,B){if(P.length===0)return P;var D=P;if(typeof P=="symbol"?D=Symbol.prototype.toString.call(P):typeof P!="string"&&(D=String(P)),I==="iso-8859-1")return escape(D).replace(/%u[0-9a-f]{4}/gi,function(q){return"%26%23"+parseInt(q.slice(2),16)+"%3B"});for(var U="",L=0;L=v?D.slice(L,L+v):D;if(L+v=55296&&O<=56319&&(N=N.slice(0,-1),L-=1)}for(var X=[],E=0;E=48&&V<=57||V>=65&&V<=90||V>=97&&V<=122||B===s.RFC1738&&(V===40||V===41)){X[X.length]=N.charAt(E);continue}if(V<128){X[X.length]=c[V];continue}if(V<2048){X[X.length]=c[192|V>>6]+c[128|V&63];continue}if(V<55296||V>=57344){X[X.length]=c[224|V>>12]+c[128|V>>6&63]+c[128|V&63];continue}E+=1,V=65536+((V&1023)<<10|N.charCodeAt(E)&1023),X[X.length]=c[240|V>>18]+c[128|V>>12&63]+c[128|V>>6&63]+c[128|V&63]}U+=X.join("")}return U},y=function(P){for(var F=[{obj:{o:P},prop:"o"}],I=e(),k=0;kI){if(B)throw new RangeError("Array limit exceeded. Only "+I+" element"+(I===1?"":"s")+" allowed in an array.");return a(d(U,{plainObjects:k}),U.length-1)}return U},_=function(P,F){if(n(P)){for(var I=[],k=0;k"u"&&(E=0)}if(typeof P=="function"?O=P(v,O):O instanceof Date?O=k(O):b==="comma"&&r(O)&&(O=e.maybeMap(O,function(j){return j instanceof Date?k(j):j})),O===null){if(A)return D(R&&!U?R(v,c.encoder,L,"key",B):v);O=""}if(u(O)||e.isBuffer(O)){if(R){var W=U?v:R(v,c.encoder,L,"key",B);return[D(W)+"="+D(R(O,c.encoder,L,"value",B))]}return[D(v)+"="+D(String(O))]}var J=[];if(typeof O>"u")return J;var K;if(b==="comma"&&r(O))U&&R&&(O=e.maybeMap(O,function(j){return j==null?j:R(j)})),K=[{value:O.length>0?O.join(",")||null:void 0}];else if(r(P))K=P;else{var fe=Object.keys(O);K=F?fe.sort(F):fe}var me=_?String(v).replace(/\./g,"%2E"):String(v),we=y&&r(O)&&O.length===1?me+"[]":me;if(w&&r(O)&&O.length===0)return we+"[]";for(var Ee=0;Ee"u"?g.encodeDotInKeys===!0?!0:c.allowDots:!!g.allowDots;return{addQueryPrefix:typeof g.addQueryPrefix=="boolean"?g.addQueryPrefix:c.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:c.allowEmptyArrays,arrayFormat:A,charset:v,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:c.charsetSentinel,commaRoundTrip:!!g.commaRoundTrip,delimiter:typeof g.delimiter>"u"?c.delimiter:g.delimiter,encode:typeof g.encode=="boolean"?g.encode:c.encode,encodeDotInKeys:typeof g.encodeDotInKeys=="boolean"?g.encodeDotInKeys:c.encodeDotInKeys,encoder:typeof g.encoder=="function"?g.encoder:c.encoder,encodeValuesOnly:typeof g.encodeValuesOnly=="boolean"?g.encodeValuesOnly:c.encodeValuesOnly,filter:w,format:b,formatter:y,serializeDate:typeof g.serializeDate=="function"?g.serializeDate:c.serializeDate,skipNulls:typeof g.skipNulls=="boolean"?g.skipNulls:c.skipNulls,sort:typeof g.sort=="function"?g.sort:null,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:c.strictNullHandling}};return Nd=function(m,g){var v=m,b=p(g),y,w;typeof b.filter=="function"?(w=b.filter,v=w("",v)):r(b.filter)&&(w=b.filter,y=w);var A=[];if(typeof v!="object"||v===null)return"";var T=n[b.arrayFormat],_=T==="comma"&&b.commaRoundTrip;y||(y=Object.keys(v)),b.sort&&y.sort(b.sort);for(var R=s(),P=0;P"u"||F===null)){var I=v[F];b.skipNulls&&I===null||o(A,f(I,F,T,_,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,R))}}var k=A.join(b.delimiter),B=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?B+="utf8=%26%2310003%3B"+b.delimiter:B+="utf8=%E2%9C%93"+b.delimiter),k.length>0?B+k:""},Nd}var Ud,P0;function tA(){if(P0)return Ud;P0=1;var s=jx(),e=Object.prototype.hasOwnProperty,t=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:s.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},n=function(f){return f.replace(/&#(\d+);/g,function(p,m){return String.fromCharCode(parseInt(m,10))})},r=function(f,p,m,g){if(f&&typeof f=="string"&&p.comma&&f.indexOf(",")>-1){if(g&&p.throwOnLimitExceeded)for(var v=0,b=f.indexOf(",");b>-1;){if(v+=1,v>=p.arrayLimit)throw new RangeError("Array limit exceeded. Only "+p.arrayLimit+" element"+(p.arrayLimit===1?"":"s")+" allowed in an array.");b=f.indexOf(",",b+1)}return f.split(",")}if(p.throwOnLimitExceeded&&m>=p.arrayLimit)throw new RangeError("Array limit exceeded. Only "+p.arrayLimit+" element"+(p.arrayLimit===1?"":"s")+" allowed in an array.");return f},a="utf8=%26%2310003%3B",o="utf8=%E2%9C%93",h=function(p,m){var g={__proto__:null},v=m.ignoreQueryPrefix?p.replace(/^\?/,""):p;v=v.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=m.parameterLimit===1/0?void 0:m.parameterLimit,y=v.split(m.delimiter,m.throwOnLimitExceeded&&typeof b<"u"?b+1:b);if(m.throwOnLimitExceeded&&typeof b<"u"&&y.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var w=-1,A,T=m.charset;if(m.charsetSentinel)for(A=0;A-1&&(I=t(I)?[I]:I),m.comma&&t(I)&&I.length>m.arrayLimit&&(I=s.combine([],I,m.arrayLimit,m.plainObjects,m.throwOnLimitExceeded)),F!==null){var k=e.call(g,F);k&&(m.duplicates==="combine"||_.indexOf("[]=")>-1)?g[F]=s.combine(g[F],I,m.arrayLimit,m.plainObjects,m.throwOnLimitExceeded):(!k||m.duplicates==="last")&&(g[F]=I)}}return g},l=function(f,p,m,g){var v=0;if(f.length>0&&f[f.length-1]==="[]"){var b=f.slice(0,-1).join("");v=Array.isArray(p)&&p[b]?p[b].length:0}for(var y=g?p:r(p,m,v),w=f.length-1;w>=0;--w){var A,T=f[w];if(T==="[]"&&m.parseArrays)s.isOverflow(y)?A=y:A=m.allowEmptyArrays&&(y===""||m.strictNullHandling&&y===null)?[]:s.combine([],y,m.arrayLimit,m.plainObjects,m.throwOnLimitExceeded);else{A=m.plainObjects?{__proto__:null}:{};var _=T.charAt(0)==="["&&T.charAt(T.length-1)==="]"?T.slice(1,-1):T,R=m.decodeDotInKeys?_.replace(/%2E/g,"."):_,P=parseInt(R,10),F=!isNaN(P)&&T!==R&&String(P)===R&&P>=0&&m.parseArrays;if(!m.parseArrays&&R==="")A={0:y};else if(F&&P=0?g.slice(0,b):g;if(y){if(!m.plainObjects&&e.call(Object.prototype,y)&&!m.allowPrototypes)return;v[v.length]=y}for(var w=g.length,A=b,T=0;A>=0&&T=0){if(m.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+m.depth+" and strictDepth is true");v[v.length]="["+g.slice(A)+"]"}return v},u=function(p,m,g,v){if(p){var b=c(p,g);if(b)return l(b,m,g,v)}},d=function(p){if(!p)return i;if(typeof p.allowEmptyArrays<"u"&&typeof p.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof p.decodeDotInKeys<"u"&&typeof p.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(p.decoder!==null&&typeof p.decoder<"u"&&typeof p.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof p.throwOnLimitExceeded<"u"&&typeof p.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof p.charset>"u"?i.charset:p.charset,g=typeof p.duplicates>"u"?i.duplicates:p.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var v=typeof p.allowDots>"u"?p.decodeDotInKeys===!0?!0:i.allowDots:!!p.allowDots;return{allowDots:v,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:typeof p.allowPrototypes=="boolean"?p.allowPrototypes:i.allowPrototypes,allowSparse:typeof p.allowSparse=="boolean"?p.allowSparse:i.allowSparse,arrayLimit:typeof p.arrayLimit=="number"?p.arrayLimit:i.arrayLimit,charset:m,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:i.charsetSentinel,comma:typeof p.comma=="boolean"?p.comma:i.comma,decodeDotInKeys:typeof p.decodeDotInKeys=="boolean"?p.decodeDotInKeys:i.decodeDotInKeys,decoder:typeof p.decoder=="function"?p.decoder:i.decoder,delimiter:typeof p.delimiter=="string"||s.isRegExp(p.delimiter)?p.delimiter:i.delimiter,depth:typeof p.depth=="number"||p.depth===!1?+p.depth:i.depth,duplicates:g,ignoreQueryPrefix:p.ignoreQueryPrefix===!0,interpretNumericEntities:typeof p.interpretNumericEntities=="boolean"?p.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:typeof p.parameterLimit=="number"?p.parameterLimit:i.parameterLimit,parseArrays:p.parseArrays!==!1,plainObjects:typeof p.plainObjects=="boolean"?p.plainObjects:i.plainObjects,strictDepth:typeof p.strictDepth=="boolean"?!!p.strictDepth:i.strictDepth,strictMerge:typeof p.strictMerge=="boolean"?!!p.strictMerge:i.strictMerge,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:i.strictNullHandling,throwOnLimitExceeded:typeof p.throwOnLimitExceeded=="boolean"?p.throwOnLimitExceeded:!1}};return Ud=function(f,p){var m=d(p);if(f===""||f===null||typeof f>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof f=="string"?h(f,m):f,v=m.plainObjects?{__proto__:null}:{},b=Object.keys(g),y=0;y",'"',"`"," ","\r",` -`," "],a=["{","}","|","\\","^","`"].concat(r),o=["'"].concat(a),h=["%","/","?",";","#"].concat(o),l=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=iA();function v(A,T,_){if(A&&typeof A=="object"&&A instanceof e)return A;var R=new e;return R.parse(A,T,_),R}e.prototype.parse=function(A,T,_){if(typeof A!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof A);var R=A.indexOf("?"),P=R!==-1&&R127?fe+="x":fe+=K[me];if(!fe.match(u)){var Ee=W.slice(0,O),pe=W.slice(O+1),Ae=K.match(d);Ae&&(Ee.push(Ae[1]),pe.unshift(Ae[2])),pe.length&&(k="/"+pe.join(".")+k),this.hostname=Ee.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),q||(this.hostname=s.toASCII(this.hostname));var G=this.port?":"+this.port:"",Z=this.hostname||"";this.host=Z+G,this.href+=this.host,q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),k[0]!=="/"&&(k="/"+k))}if(!f[U])for(var O=0,J=o.length;O0?_.host.split("@"):!1;fe&&(_.auth=fe.shift(),_.hostname=fe.shift(),_.host=_.hostname)}return _.search=A.search,_.query=A.query,(_.pathname!==null||_.search!==null)&&(_.path=(_.pathname?_.pathname:"")+(_.search?_.search:"")),_.href=_.format(),_}if(!W.length)return _.pathname=null,_.search?_.path="/"+_.search:_.path=null,_.href=_.format(),_;for(var me=W.slice(-1)[0],we=(_.host||A.host||W.length>1)&&(me==="."||me==="..")||me==="",Ee=0,pe=W.length;pe>=0;pe--)me=W[pe],me==="."?W.splice(pe,1):me===".."?(W.splice(pe,1),Ee++):Ee&&(W.splice(pe,1),Ee--);if(!V&&!q)for(;Ee--;Ee)W.unshift("..");V&&W[0]!==""&&(!W[0]||W[0].charAt(0)!=="/")&&W.unshift(""),we&&W.join("/").substr(-1)!=="/"&&W.push("");var Ae=W[0]===""||W[0]&&W[0].charAt(0)==="/";if(K){_.hostname=Ae?"":W.length?W.shift():"",_.host=_.hostname;var fe=_.host&&_.host.indexOf("@")>0?_.host.split("@"):!1;fe&&(_.auth=fe.shift(),_.hostname=fe.shift(),_.host=_.hostname)}return V=V||_.host&&W.length,V&&!Ae&&W.unshift(""),W.length>0?_.pathname=W.join("/"):(_.pathname=null,_.path=null),(_.pathname!==null||_.search!==null)&&(_.path=(_.pathname?_.pathname:"")+(_.search?_.search:"")),_.auth=A.auth||_.auth,_.slashes=_.slashes||A.slashes,_.href=_.format(),_},e.prototype.parseHost=function(){var A=this.host,T=i.exec(A);T&&(T=T[0],T!==":"&&(this.port=T.substr(1)),A=A.substr(0,A.length-T.length)),A&&(this.hostname=A)},aa.parse=v,aa.resolve=y,aa.resolveObject=w,aa.format=b,aa.Url=e,aa}sA();const O0={};function kt(s,e,t=3){if(O0[e])return;let i=new Error().stack;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",`${e} +`+de.prev}function di(ce,de){var Rt=me(ce),Wt=[];if(Rt){Wt.length=ce.length;for(var Zt=0;Zt"u"||!_?s:_(Uint8Array),D={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?s:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?s:ArrayBuffer,"%ArrayIteratorPrototype%":T&&_?_([][Symbol.iterator]()):s,"%AsyncFromSyncIteratorPrototype%":s,"%AsyncFunction%":k,"%AsyncGenerator%":k,"%AsyncGeneratorFunction%":k,"%AsyncIteratorPrototype%":k,"%Atomics%":typeof Atomics>"u"?s:Atomics,"%BigInt%":typeof BigInt>"u"?s:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?s:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?s:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?s:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":i,"%Float16Array%":typeof Float16Array>"u"?s:Float16Array,"%Float32Array%":typeof Float32Array>"u"?s:Float32Array,"%Float64Array%":typeof Float64Array>"u"?s:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?s:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":k,"%Int8Array%":typeof Int8Array>"u"?s:Int8Array,"%Int16Array%":typeof Int16Array>"u"?s:Int16Array,"%Int32Array%":typeof Int32Array>"u"?s:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&_?_(_([][Symbol.iterator]())):s,"%JSON%":typeof JSON=="object"?JSON:s,"%Map%":typeof Map>"u"?s:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!_?s:_(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?s:Promise,"%Proxy%":typeof Proxy>"u"?s:Proxy,"%RangeError%":n,"%ReferenceError%":r,"%Reflect%":typeof Reflect>"u"?s:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?s:Set,"%SetIteratorPrototype%":typeof Set>"u"||!T||!_?s:_(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?s:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&_?_(""[Symbol.iterator]()):s,"%Symbol%":T?Symbol:s,"%SyntaxError%":a,"%ThrowTypeError%":A,"%TypedArray%":B,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?s:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?s:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?s:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?s:Uint32Array,"%URIError%":h,"%WeakMap%":typeof WeakMap>"u"?s:WeakMap,"%WeakRef%":typeof WeakRef>"u"?s:WeakRef,"%WeakSet%":typeof WeakSet>"u"?s:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":F,"%Object.defineProperty%":y,"%Object.getPrototypeOf%":R,"%Math.abs%":l,"%Math.floor%":c,"%Math.max%":u,"%Math.min%":d,"%Math.pow%":f,"%Math.round%":p,"%Math.sign%":m,"%Reflect.getPrototypeOf%":P};if(_)try{null.error}catch(Ee){var U=_(_(Ee));D["%Error.prototype%"]=U}var L=function Ee(pe){var Ae;if(pe==="%AsyncFunction%")Ae=v("async function () {}");else if(pe==="%GeneratorFunction%")Ae=v("function* () {}");else if(pe==="%AsyncGeneratorFunction%")Ae=v("async function* () {}");else if(pe==="%AsyncGenerator%"){var G=Ee("%AsyncGeneratorFunction%");G&&(Ae=G.prototype)}else if(pe==="%AsyncIteratorPrototype%"){var Z=Ee("%AsyncGenerator%");Z&&_&&(Ae=_(Z.prototype))}return D[pe]=Ae,Ae},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=vu(),X=J_(),E=O.call(I,Array.prototype.concat),V=O.call(F,Array.prototype.splice),q=O.call(I,String.prototype.replace),W=O.call(I,String.prototype.slice),J=O.call(I,RegExp.prototype.exec),K=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fe=/\\(\\)?/g,me=function(pe){var Ae=W(pe,0,1),G=W(pe,-1);if(Ae==="%"&&G!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(G==="%"&&Ae!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var Z=[];return q(pe,K,function(z,j,te,he){Z[Z.length]=te?q(he,fe,"$1"):j||z}),Z},we=function(pe,Ae){var G=pe,Z;if(X(N,G)&&(Z=N[G],G="%"+Z[0]+"%"),X(D,G)){var z=D[G];if(z===k&&(z=L(G)),typeof z>"u"&&!Ae)throw new o("intrinsic "+pe+" exists, but is not available. Please file an issue!");return{alias:Z,name:G,value:z}}throw new a("intrinsic "+pe+" does not exist!")};return Pd=function(pe,Ae){if(typeof pe!="string"||pe.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ae!="boolean")throw new o('"allowMissing" argument must be a boolean');if(J(/^%?[^%]*%?$/,pe)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var G=me(pe),Z=G.length>0?G[0]:"",z=we("%"+Z+"%",Ae),j=z.name,te=z.value,he=!1,xe=z.alias;xe&&(Z=xe[0],V(G,E([0,1],xe)));for(var oe=1,ge=!0;oe=G.length){var Be=b(te,le);ge=!!Be,ge&&"get"in Be&&!("originalValue"in Be.get)?te=Be.get:te=te[le]}else ge=X(te,le),te=te[le];ge&&!he&&(D[j]=te)}}return te},Pd}var kd,_0;function $x(){if(_0)return kd;_0=1;var s=dp(),e=Yx(),t=e([s("%String.prototype.indexOf%")]);return kd=function(n,r){var a=s(n,!!r);return typeof a=="function"&&t(n,".prototype.")>-1?e([a]):a},kd}var Fd,T0;function Gx(){if(T0)return Fd;T0=1;var s=dp(),e=$x(),t=gu(),i=Lo(),n=s("%Map%",!0),r=e("Map.prototype.get",!0),a=e("Map.prototype.set",!0),o=e("Map.prototype.has",!0),h=e("Map.prototype.delete",!0),l=e("Map.prototype.size",!0);return Fd=!!n&&function(){var u,d={assert:function(f){if(!d.has(f))throw new i("Side channel does not contain "+t(f))},delete:function(f){if(u){var p=h(u,f);return l(u)===0&&(u=void 0),p}return!1},get:function(f){if(u)return r(u,f)},has:function(f){return u?o(u,f):!1},set:function(f,p){u||(u=new n),a(u,f,p)}};return d},Fd}var Od,A0;function Q_(){if(A0)return Od;A0=1;var s=dp(),e=$x(),t=gu(),i=Gx(),n=Lo(),r=s("%WeakMap%",!0),a=e("WeakMap.prototype.get",!0),o=e("WeakMap.prototype.set",!0),h=e("WeakMap.prototype.has",!0),l=e("WeakMap.prototype.delete",!0);return Od=r?function(){var u,d,f={assert:function(p){if(!f.has(p))throw new n("Side channel does not contain "+t(p))},delete:function(p){if(r&&p&&(typeof p=="object"||typeof p=="function")){if(u)return l(u,p)}else if(i&&d)return d.delete(p);return!1},get:function(p){return r&&p&&(typeof p=="object"||typeof p=="function")&&u?a(u,p):d&&d.get(p)},has:function(p){return r&&p&&(typeof p=="object"||typeof p=="function")&&u?h(u,p):!!d&&d.has(p)},set:function(p,m){r&&p&&(typeof p=="object"||typeof p=="function")?(u||(u=new r),o(u,p,m)):i&&(d||(d=i()),d.set(p,m))}};return f}:i,Od}var Bd,E0;function Hx(){if(E0)return Bd;E0=1;var s=Lo(),e=gu(),t=I_(),i=Gx(),n=Q_(),r=n||i||t;return Bd=function(){var o,h={assert:function(l){if(!h.has(l)){var c=l&&Object(l)===l?"the given object key":e(l);throw new s("Side channel does not contain "+c)}},delete:function(l){return!!o&&o.delete(l)},get:function(l){return o&&o.get(l)},has:function(l){return!!o&&o.has(l)},set:function(l,c){o||(o=r()),o.set(l,c)}};return h},Bd}var Ld,C0;function fp(){if(C0)return Ld;C0=1;var s=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Ld={default:t.RFC3986,formatters:{RFC1738:function(i){return s.call(i,e,"+")},RFC3986:function(i){return String(i)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},Ld}var Dd,I0;function jx(){if(I0)return Dd;I0=1;var s=fp(),e=Hx(),t=Nx(),i=Object.prototype.hasOwnProperty,n=Array.isArray,r=e(),a=function(P,F){return r.set(P,F),P},o=function(P){return r.has(P)},h=function(P){return r.get(P)},l=function(P,F){r.set(P,F)},c=(function(){for(var R=[],P=0;P<256;++P)R[R.length]="%"+((P<16?"0":"")+P.toString(16)).toUpperCase();return R})(),u=function(P){for(;P.length>1;){var F=P.pop(),I=F.obj[F.prop];if(n(I)){for(var k=[],B=0;B=I.arrayLimit){if(I.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+I.arrayLimit+" element"+(I.arrayLimit===1?"":"s")+" allowed in an array.");return a(d(P.concat(F),I),k)}P[k]=F}else if(P&&typeof P=="object")if(o(P)){var B=h(P)+1;P[B]=F,l(P,B)}else{if(I&&I.strictMerge)return[P,F];(I&&(I.plainObjects||I.allowPrototypes)||!i.call(Object.prototype,F))&&(P[F]=!0)}else return[P,F];return P}if(!P||typeof P!="object"){if(o(F)){for(var D=Object.keys(F),U=I&&I.plainObjects?{__proto__:null,0:P}:{0:P},L=0;LI.arrayLimit){if(I.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+I.arrayLimit+" element"+(I.arrayLimit===1?"":"s")+" allowed in an array.");return a(d(O,I),O.length-1)}return O}var X=P;if(n(P)&&!n(F)&&(X=d(P,I)),n(P)&&n(F)){if(F.forEach(function(E,V){if(i.call(P,V)){var q=P[V];q&&typeof q=="object"&&E&&typeof E=="object"?P[V]=R(q,E,I):P[P.length]=E}else P[V]=E}),I&&typeof I.arrayLimit=="number"&&P.length>I.arrayLimit){if(I.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+I.arrayLimit+" element"+(I.arrayLimit===1?"":"s")+" allowed in an array.");return a(d(P,I),P.length-1)}return P}return Object.keys(F).reduce(function(E,V){var q=F[V];if(i.call(E,V)?f(E,V,R(E[V],q,I)):f(E,V,q),o(F)&&!o(E)&&a(E,h(F)),o(E)){var W=parseInt(V,10);String(W)===V&&W>=0&&W>h(E)&&l(E,W)}return E},X)},m=function(P,F){return Object.keys(F).reduce(function(I,k){return f(I,k,F[k]),I},P)},g=function(R,P,F){var I=R.replace(/\+/g," ");if(F==="iso-8859-1")return I.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(I)}catch{return I}},v=1024,b=function(P,F,I,k,B){if(P.length===0)return P;var D=P;if(typeof P=="symbol"?D=Symbol.prototype.toString.call(P):typeof P!="string"&&(D=String(P)),I==="iso-8859-1")return escape(D).replace(/%u[0-9a-f]{4}/gi,function(q){return"%26%23"+parseInt(q.slice(2),16)+"%3B"});for(var U="",L=0;L=v?D.slice(L,L+v):D;if(L+v=55296&&O<=56319&&(N=N.slice(0,-1),L-=1)}for(var X=[],E=0;E=48&&V<=57||V>=65&&V<=90||V>=97&&V<=122||B===s.RFC1738&&(V===40||V===41)){X[X.length]=N.charAt(E);continue}if(V<128){X[X.length]=c[V];continue}if(V<2048){X[X.length]=c[192|V>>6]+c[128|V&63];continue}if(V<55296||V>=57344){X[X.length]=c[224|V>>12]+c[128|V>>6&63]+c[128|V&63];continue}E+=1,V=65536+((V&1023)<<10|N.charCodeAt(E)&1023),X[X.length]=c[240|V>>18]+c[128|V>>12&63]+c[128|V>>6&63]+c[128|V&63]}U+=X.join("")}return U},y=function(P){for(var F=[{obj:{o:P},prop:"o"}],I=e(),k=0;kI){if(B)throw new RangeError("Array limit exceeded. Only "+I+" element"+(I===1?"":"s")+" allowed in an array.");return a(d(U,{plainObjects:k}),U.length-1)}return U},_=function(P,F){if(n(P)){for(var I=[],k=0;k"u"&&(E=0)}if(typeof P=="function"?O=P(v,O):O instanceof Date?O=k(O):b==="comma"&&r(O)&&(O=e.maybeMap(O,function(j){return j instanceof Date?k(j):j})),O===null){if(A)return D(R&&!U?R(v,c.encoder,L,"key",B):v);O=""}if(u(O)||e.isBuffer(O)){if(R){var W=U?v:R(v,c.encoder,L,"key",B);return[D(W)+"="+D(R(O,c.encoder,L,"value",B))]}return[D(v)+"="+D(String(O))]}var J=[];if(typeof O>"u")return J;var K;if(b==="comma"&&r(O))U&&R&&(O=e.maybeMap(O,function(j){return j==null?j:R(j)})),K=[{value:O.length>0?O.join(",")||null:void 0}];else if(r(P))K=P;else{var fe=Object.keys(O);K=F?fe.sort(F):fe}var me=_?String(v).replace(/\./g,"%2E"):String(v),we=y&&r(O)&&O.length===1?me+"[]":me;if(w&&r(O)&&O.length===0)return we+"[]";for(var Ee=0;Ee"u"?g.encodeDotInKeys===!0?!0:c.allowDots:!!g.allowDots;return{addQueryPrefix:typeof g.addQueryPrefix=="boolean"?g.addQueryPrefix:c.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:c.allowEmptyArrays,arrayFormat:A,charset:v,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:c.charsetSentinel,commaRoundTrip:!!g.commaRoundTrip,delimiter:typeof g.delimiter>"u"?c.delimiter:g.delimiter,encode:typeof g.encode=="boolean"?g.encode:c.encode,encodeDotInKeys:typeof g.encodeDotInKeys=="boolean"?g.encodeDotInKeys:c.encodeDotInKeys,encoder:typeof g.encoder=="function"?g.encoder:c.encoder,encodeValuesOnly:typeof g.encodeValuesOnly=="boolean"?g.encodeValuesOnly:c.encodeValuesOnly,filter:w,format:b,formatter:y,serializeDate:typeof g.serializeDate=="function"?g.serializeDate:c.serializeDate,skipNulls:typeof g.skipNulls=="boolean"?g.skipNulls:c.skipNulls,sort:typeof g.sort=="function"?g.sort:null,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:c.strictNullHandling}};return Nd=function(m,g){var v=m,b=p(g),y,w;typeof b.filter=="function"?(w=b.filter,v=w("",v)):r(b.filter)&&(w=b.filter,y=w);var A=[];if(typeof v!="object"||v===null)return"";var T=n[b.arrayFormat],_=T==="comma"&&b.commaRoundTrip;y||(y=Object.keys(v)),b.sort&&y.sort(b.sort);for(var R=s(),P=0;P"u"||F===null)){var I=v[F];b.skipNulls&&I===null||o(A,f(I,F,T,_,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,R))}}var k=A.join(b.delimiter),B=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?B+="utf8=%26%2310003%3B"+b.delimiter:B+="utf8=%E2%9C%93"+b.delimiter),k.length>0?B+k:""},Nd}var Ud,P0;function tT(){if(P0)return Ud;P0=1;var s=jx(),e=Object.prototype.hasOwnProperty,t=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:s.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},n=function(f){return f.replace(/&#(\d+);/g,function(p,m){return String.fromCharCode(parseInt(m,10))})},r=function(f,p,m,g){if(f&&typeof f=="string"&&p.comma&&f.indexOf(",")>-1){if(g&&p.throwOnLimitExceeded)for(var v=0,b=f.indexOf(",");b>-1;){if(v+=1,v>=p.arrayLimit)throw new RangeError("Array limit exceeded. Only "+p.arrayLimit+" element"+(p.arrayLimit===1?"":"s")+" allowed in an array.");b=f.indexOf(",",b+1)}return f.split(",")}if(p.throwOnLimitExceeded&&m>=p.arrayLimit)throw new RangeError("Array limit exceeded. Only "+p.arrayLimit+" element"+(p.arrayLimit===1?"":"s")+" allowed in an array.");return f},a="utf8=%26%2310003%3B",o="utf8=%E2%9C%93",h=function(p,m){var g={__proto__:null},v=m.ignoreQueryPrefix?p.replace(/^\?/,""):p;v=v.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=m.parameterLimit===1/0?void 0:m.parameterLimit,y=v.split(m.delimiter,m.throwOnLimitExceeded&&typeof b<"u"?b+1:b);if(m.throwOnLimitExceeded&&typeof b<"u"&&y.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var w=-1,A,T=m.charset;if(m.charsetSentinel)for(A=0;A-1&&(I=t(I)?[I]:I),m.comma&&t(I)&&I.length>m.arrayLimit&&(I=s.combine([],I,m.arrayLimit,m.plainObjects,m.throwOnLimitExceeded)),F!==null){var k=e.call(g,F);k&&(m.duplicates==="combine"||_.indexOf("[]=")>-1)?g[F]=s.combine(g[F],I,m.arrayLimit,m.plainObjects,m.throwOnLimitExceeded):(!k||m.duplicates==="last")&&(g[F]=I)}}return g},l=function(f,p,m,g){var v=0;if(f.length>0&&f[f.length-1]==="[]"){var b=f.slice(0,-1).join("");v=Array.isArray(p)&&p[b]?p[b].length:0}for(var y=g?p:r(p,m,v),w=f.length-1;w>=0;--w){var A,T=f[w];if(T==="[]"&&m.parseArrays)s.isOverflow(y)?A=y:A=m.allowEmptyArrays&&(y===""||m.strictNullHandling&&y===null)?[]:s.combine([],y,m.arrayLimit,m.plainObjects,m.throwOnLimitExceeded);else{A=m.plainObjects?{__proto__:null}:{};var _=T.charAt(0)==="["&&T.charAt(T.length-1)==="]"?T.slice(1,-1):T,R=m.decodeDotInKeys?_.replace(/%2E/g,"."):_,P=parseInt(R,10),F=!isNaN(P)&&T!==R&&String(P)===R&&P>=0&&m.parseArrays;if(!m.parseArrays&&R==="")A={0:y};else if(F&&P=0?g.slice(0,b):g;if(y){if(!m.plainObjects&&e.call(Object.prototype,y)&&!m.allowPrototypes)return;v[v.length]=y}for(var w=g.length,A=b,T=0;A>=0&&T=0){if(m.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+m.depth+" and strictDepth is true");v[v.length]="["+g.slice(A)+"]"}return v},u=function(p,m,g,v){if(p){var b=c(p,g);if(b)return l(b,m,g,v)}},d=function(p){if(!p)return i;if(typeof p.allowEmptyArrays<"u"&&typeof p.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof p.decodeDotInKeys<"u"&&typeof p.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(p.decoder!==null&&typeof p.decoder<"u"&&typeof p.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof p.throwOnLimitExceeded<"u"&&typeof p.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var m=typeof p.charset>"u"?i.charset:p.charset,g=typeof p.duplicates>"u"?i.duplicates:p.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var v=typeof p.allowDots>"u"?p.decodeDotInKeys===!0?!0:i.allowDots:!!p.allowDots;return{allowDots:v,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:typeof p.allowPrototypes=="boolean"?p.allowPrototypes:i.allowPrototypes,allowSparse:typeof p.allowSparse=="boolean"?p.allowSparse:i.allowSparse,arrayLimit:typeof p.arrayLimit=="number"?p.arrayLimit:i.arrayLimit,charset:m,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:i.charsetSentinel,comma:typeof p.comma=="boolean"?p.comma:i.comma,decodeDotInKeys:typeof p.decodeDotInKeys=="boolean"?p.decodeDotInKeys:i.decodeDotInKeys,decoder:typeof p.decoder=="function"?p.decoder:i.decoder,delimiter:typeof p.delimiter=="string"||s.isRegExp(p.delimiter)?p.delimiter:i.delimiter,depth:typeof p.depth=="number"||p.depth===!1?+p.depth:i.depth,duplicates:g,ignoreQueryPrefix:p.ignoreQueryPrefix===!0,interpretNumericEntities:typeof p.interpretNumericEntities=="boolean"?p.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:typeof p.parameterLimit=="number"?p.parameterLimit:i.parameterLimit,parseArrays:p.parseArrays!==!1,plainObjects:typeof p.plainObjects=="boolean"?p.plainObjects:i.plainObjects,strictDepth:typeof p.strictDepth=="boolean"?!!p.strictDepth:i.strictDepth,strictMerge:typeof p.strictMerge=="boolean"?!!p.strictMerge:i.strictMerge,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:i.strictNullHandling,throwOnLimitExceeded:typeof p.throwOnLimitExceeded=="boolean"?p.throwOnLimitExceeded:!1}};return Ud=function(f,p){var m=d(p);if(f===""||f===null||typeof f>"u")return m.plainObjects?{__proto__:null}:{};for(var g=typeof f=="string"?h(f,m):f,v=m.plainObjects?{__proto__:null}:{},b=Object.keys(g),y=0;y",'"',"`"," ","\r",` +`," "],a=["{","}","|","\\","^","`"].concat(r),o=["'"].concat(a),h=["%","/","?",";","#"].concat(o),l=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=iT();function v(A,T,_){if(A&&typeof A=="object"&&A instanceof e)return A;var R=new e;return R.parse(A,T,_),R}e.prototype.parse=function(A,T,_){if(typeof A!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof A);var R=A.indexOf("?"),P=R!==-1&&R127?fe+="x":fe+=K[me];if(!fe.match(u)){var Ee=W.slice(0,O),pe=W.slice(O+1),Ae=K.match(d);Ae&&(Ee.push(Ae[1]),pe.unshift(Ae[2])),pe.length&&(k="/"+pe.join(".")+k),this.hostname=Ee.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),q||(this.hostname=s.toASCII(this.hostname));var G=this.port?":"+this.port:"",Z=this.hostname||"";this.host=Z+G,this.href+=this.host,q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),k[0]!=="/"&&(k="/"+k))}if(!f[U])for(var O=0,J=o.length;O0?_.host.split("@"):!1;fe&&(_.auth=fe.shift(),_.hostname=fe.shift(),_.host=_.hostname)}return _.search=A.search,_.query=A.query,(_.pathname!==null||_.search!==null)&&(_.path=(_.pathname?_.pathname:"")+(_.search?_.search:"")),_.href=_.format(),_}if(!W.length)return _.pathname=null,_.search?_.path="/"+_.search:_.path=null,_.href=_.format(),_;for(var me=W.slice(-1)[0],we=(_.host||A.host||W.length>1)&&(me==="."||me==="..")||me==="",Ee=0,pe=W.length;pe>=0;pe--)me=W[pe],me==="."?W.splice(pe,1):me===".."?(W.splice(pe,1),Ee++):Ee&&(W.splice(pe,1),Ee--);if(!V&&!q)for(;Ee--;Ee)W.unshift("..");V&&W[0]!==""&&(!W[0]||W[0].charAt(0)!=="/")&&W.unshift(""),we&&W.join("/").substr(-1)!=="/"&&W.push("");var Ae=W[0]===""||W[0]&&W[0].charAt(0)==="/";if(K){_.hostname=Ae?"":W.length?W.shift():"",_.host=_.hostname;var fe=_.host&&_.host.indexOf("@")>0?_.host.split("@"):!1;fe&&(_.auth=fe.shift(),_.hostname=fe.shift(),_.host=_.hostname)}return V=V||_.host&&W.length,V&&!Ae&&W.unshift(""),W.length>0?_.pathname=W.join("/"):(_.pathname=null,_.path=null),(_.pathname!==null||_.search!==null)&&(_.path=(_.pathname?_.pathname:"")+(_.search?_.search:"")),_.auth=A.auth||_.auth,_.slashes=_.slashes||A.slashes,_.href=_.format(),_},e.prototype.parseHost=function(){var A=this.host,T=i.exec(A);T&&(T=T[0],T!==":"&&(this.port=T.substr(1)),A=A.substr(0,A.length-T.length)),A&&(this.hostname=A)},aa.parse=v,aa.resolve=y,aa.resolveObject=w,aa.format=b,aa.Url=e,aa}sT();const O0={};function kt(s,e,t=3){if(O0[e])return;let i=new Error().stack;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",`${e} Deprecated since v${s}`):(i=i.split(` `).splice(t).join(` `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e} Deprecated since v${s}`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e} -Deprecated since v${s}`),console.warn(i))),O0[e]=!0}function zs(s){if(typeof s!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(s)}`)}function jo(s){return s.split("?")[0].split("#")[0]}function nA(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rA(s,e,t){return s.replace(new RegExp(nA(e),"g"),t)}function aA(s,e){let t="",i=0,n=-1,r=0,a=-1;for(let o=0;o<=s.length;++o){if(o2){const h=t.lastIndexOf("/");if(h!==t.length-1){h===-1?(t="",i=0):(t=t.slice(0,h),i=t.length-1-t.lastIndexOf("/")),n=o,r=0;continue}}else if(t.length===2||t.length===1){t="",i=0,n=o,r=0;continue}}}else t.length>0?t+=`/${s.slice(n+1,o)}`:t=s.slice(n+1,o),i=o-n-1;n=o,r=0}else a===46&&r!==-1?++r:r=-1}return t}const wi={toPosix(s){return rA(s,"\\","/")},isUrl(s){return/^https?:/.test(this.toPosix(s))},isDataUrl(s){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(s)},isBlobUrl(s){return s.startsWith("blob:")},hasProtocol(s){return/^[^/:]+:/.test(this.toPosix(s))},getProtocol(s){zs(s),s=this.toPosix(s);const e=/^file:\/\/\//.exec(s);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(s);return t?t[0]:""},toAbsolute(s,e,t){if(zs(s),this.isDataUrl(s)||this.isBlobUrl(s))return s;const i=jo(this.toPosix(e??We.ADAPTER.getBaseUrl())),n=jo(this.toPosix(t??this.rootname(i)));return s=this.toPosix(s),s.startsWith("/")?wi.join(n,s.slice(1)):this.isAbsolute(s)?s:this.join(i,s)},normalize(s){if(zs(s),s.length===0)return".";if(this.isDataUrl(s)||this.isBlobUrl(s))return s;s=this.toPosix(s);let e="";const t=s.startsWith("/");this.hasProtocol(s)&&(e=this.rootname(s),s=s.slice(e.length));const i=s.endsWith("/");return s=aA(s),s.length>0&&i&&(s+="/"),t?`/${s}`:e+s},isAbsolute(s){return zs(s),s=this.toPosix(s),this.hasProtocol(s)?!0:s.startsWith("/")},join(...s){if(s.length===0)return".";let e;for(let t=0;t0)if(e===void 0)e=i;else{const n=s[t-1]??"";this.joinExtensions.includes(this.extname(n).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(s){if(zs(s),s.length===0)return".";s=this.toPosix(s);let e=s.charCodeAt(0);const t=e===47;let i=-1,n=!0;const r=this.getProtocol(s),a=s;s=s.slice(r.length);for(let o=s.length-1;o>=1;--o)if(e=s.charCodeAt(o),e===47){if(!n){i=o;break}}else n=!1;return i===-1?t?"/":this.isUrl(a)?r+s:r:t&&i===1?"//":r+s.slice(0,i)},rootname(s){zs(s),s=this.toPosix(s);let e="";if(s.startsWith("/")?e="/":e=this.getProtocol(s),this.isUrl(s)){const t=s.indexOf("/",e.length);t!==-1?e=s.slice(0,t):e=s,e.endsWith("/")||(e+="/")}return e},basename(s,e){zs(s),e&&zs(e),s=jo(this.toPosix(s));let t=0,i=-1,n=!0,r;if(e!==void 0&&e.length>0&&e.length<=s.length){if(e.length===s.length&&e===s)return"";let a=e.length-1,o=-1;for(r=s.length-1;r>=0;--r){const h=s.charCodeAt(r);if(h===47){if(!n){t=r+1;break}}else o===-1&&(n=!1,o=r+1),a>=0&&(h===e.charCodeAt(a)?--a===-1&&(i=r):(a=-1,i=o))}return t===i?i=o:i===-1&&(i=s.length),s.slice(t,i)}for(r=s.length-1;r>=0;--r)if(s.charCodeAt(r)===47){if(!n){t=r+1;break}}else i===-1&&(n=!1,i=r+1);return i===-1?"":s.slice(t,i)},extname(s){zs(s),s=jo(this.toPosix(s));let e=-1,t=0,i=-1,n=!0,r=0;for(let a=s.length-1;a>=0;--a){const o=s.charCodeAt(a);if(o===47){if(!n){t=a+1;break}continue}i===-1&&(n=!1,i=a+1),o===46?e===-1?e=a:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||i===-1||r===0||r===1&&e===i-1&&e===t+1?"":s.slice(e,i)},parse(s){zs(s);const e={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return e;s=jo(this.toPosix(s));let t=s.charCodeAt(0);const i=this.isAbsolute(s);let n;e.root=this.rootname(s),i||this.hasProtocol(s)?n=1:n=0;let r=-1,a=0,o=-1,h=!0,l=s.length-1,c=0;for(;l>=n;--l){if(t=s.charCodeAt(l),t===47){if(!h){a=l+1;break}continue}o===-1&&(h=!1,o=l+1),t===46?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||o===-1||c===0||c===1&&r===o-1&&r===a+1?o!==-1&&(a===0&&i?e.base=e.name=s.slice(1,o):e.base=e.name=s.slice(a,o)):(a===0&&i?(e.name=s.slice(1,r),e.base=s.slice(1,o)):(e.name=s.slice(a,r),e.base=s.slice(a,o)),e.ext=s.slice(r,o)),e.dir=this.dirname(s),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Vd;async function oA(){return Vd??(Vd=(async()=>{var r;const s=document.createElement("canvas").getContext("webgl");if(!s)return Ni.UNPACK;const e=await new Promise(a=>{const o=document.createElement("video");o.onloadeddata=()=>a(o),o.onerror=()=>a(null),o.autoplay=!1,o.crossOrigin="anonymous",o.preload="auto",o.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",o.load()});if(!e)return Ni.UNPACK;const t=s.createTexture();s.bindTexture(s.TEXTURE_2D,t);const i=s.createFramebuffer();s.bindFramebuffer(s.FRAMEBUFFER,i),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,t,0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,e);const n=new Uint8Array(4);return s.readPixels(0,0,1,1,s.RGBA,s.UNSIGNED_BYTE,n),s.deleteFramebuffer(i),s.deleteTexture(t),(r=s.getExtension("WEBGL_lose_context"))==null||r.loseContext(),n[0]<=n[3]?Ni.PMA:Ni.UNPACK})()),Vd}let Yd;function lA(){return typeof Yd>"u"&&(Yd=(function(){var e;const s={stencil:!0,failIfMajorPerformanceCaveat:We.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!We.ADAPTER.getWebGLRenderingContext())return!1;const t=We.ADAPTER.createCanvas();let i=t.getContext("webgl",s)||t.getContext("experimental-webgl",s);const n=!!((e=i==null?void 0:i.getContextAttributes())!=null&&e.stencil);if(i){const r=i.getExtension("WEBGL_lose_context");r&&r.loseContext()}return i=null,n}catch{return!1}})()),Yd}var cA={grad:.9,turn:360,rad:360/(2*Math.PI)},Hn=function(s){return typeof s=="string"?s.length>0:typeof s=="number"},Di=function(s,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*s)/t+0},Xs=function(s,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),s>t?t:s>e?s:e},Wx=function(s){return(s=isFinite(s)?s%360:0)>0?s:s+360},B0=function(s){return{r:Xs(s.r,0,255),g:Xs(s.g,0,255),b:Xs(s.b,0,255),a:Xs(s.a)}},$d=function(s){return{r:Di(s.r),g:Di(s.g),b:Di(s.b),a:Di(s.a,3)}},hA=/^#([0-9a-f]{3,8})$/i,lc=function(s){var e=s.toString(16);return e.length<2?"0"+e:e},zx=function(s){var e=s.r,t=s.g,i=s.b,n=s.a,r=Math.max(e,t,i),a=r-Math.min(e,t,i),o=a?r===e?(t-i)/a:r===t?2+(i-e)/a:4+(e-t)/a:0;return{h:60*(o<0?o+6:o),s:r?a/r*100:0,v:r/255*100,a:n}},qx=function(s){var e=s.h,t=s.s,i=s.v,n=s.a;e=e/360*6,t/=100,i/=100;var r=Math.floor(e),a=i*(1-t),o=i*(1-(e-r)*t),h=i*(1-(1-e+r)*t),l=r%6;return{r:255*[i,o,a,a,h,i][l],g:255*[h,i,i,o,a,a][l],b:255*[a,a,h,i,i,o][l],a:n}},L0=function(s){return{h:Wx(s.h),s:Xs(s.s,0,100),l:Xs(s.l,0,100),a:Xs(s.a)}},D0=function(s){return{h:Di(s.h),s:Di(s.s),l:Di(s.l),a:Di(s.a,3)}},N0=function(s){return qx((t=(e=s).s,{h:e.h,s:(t*=((i=e.l)<50?i:100-i)/100)>0?2*t/(i+t)*100:0,v:i+t,a:e.a}));var e,t,i},pl=function(s){return{h:(e=zx(s)).h,s:(n=(200-(t=e.s))*(i=e.v)/100)>0&&n<200?t*i/100/(n<=100?n:200-n)*100:0,l:n/2,a:e.a};var e,t,i,n},uA=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,dA=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fA=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,mA=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yf={string:[[function(s){var e=hA.exec(s);return e?(s=e[1]).length<=4?{r:parseInt(s[0]+s[0],16),g:parseInt(s[1]+s[1],16),b:parseInt(s[2]+s[2],16),a:s.length===4?Di(parseInt(s[3]+s[3],16)/255,2):1}:s.length===6||s.length===8?{r:parseInt(s.substr(0,2),16),g:parseInt(s.substr(2,2),16),b:parseInt(s.substr(4,2),16),a:s.length===8?Di(parseInt(s.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(s){var e=fA.exec(s)||mA.exec(s);return e?e[2]!==e[4]||e[4]!==e[6]?null:B0({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(s){var e=uA.exec(s)||dA.exec(s);if(!e)return null;var t,i,n=L0({h:(t=e[1],i=e[2],i===void 0&&(i="deg"),Number(t)*(cA[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return N0(n)},"hsl"]],object:[[function(s){var e=s.r,t=s.g,i=s.b,n=s.a,r=n===void 0?1:n;return Hn(e)&&Hn(t)&&Hn(i)?B0({r:Number(e),g:Number(t),b:Number(i),a:Number(r)}):null},"rgb"],[function(s){var e=s.h,t=s.s,i=s.l,n=s.a,r=n===void 0?1:n;if(!Hn(e)||!Hn(t)||!Hn(i))return null;var a=L0({h:Number(e),s:Number(t),l:Number(i),a:Number(r)});return N0(a)},"hsl"],[function(s){var e=s.h,t=s.s,i=s.v,n=s.a,r=n===void 0?1:n;if(!Hn(e)||!Hn(t)||!Hn(i))return null;var a=(function(o){return{h:Wx(o.h),s:Xs(o.s,0,100),v:Xs(o.v,0,100),a:Xs(o.a)}})({h:Number(e),s:Number(t),v:Number(i),a:Number(r)});return qx(a)},"hsv"]]},U0=function(s,e){for(var t=0;t=.5},s.prototype.toHex=function(){return e=$d(this.rgba),t=e.r,i=e.g,n=e.b,a=(r=e.a)<1?lc(Di(255*r)):"","#"+lc(t)+lc(i)+lc(n)+a;var e,t,i,n,r,a},s.prototype.toRgb=function(){return $d(this.rgba)},s.prototype.toRgbString=function(){return e=$d(this.rgba),t=e.r,i=e.g,n=e.b,(r=e.a)<1?"rgba("+t+", "+i+", "+n+", "+r+")":"rgb("+t+", "+i+", "+n+")";var e,t,i,n,r},s.prototype.toHsl=function(){return D0(pl(this.rgba))},s.prototype.toHslString=function(){return e=D0(pl(this.rgba)),t=e.h,i=e.s,n=e.l,(r=e.a)<1?"hsla("+t+", "+i+"%, "+n+"%, "+r+")":"hsl("+t+", "+i+"%, "+n+"%)";var e,t,i,n,r},s.prototype.toHsv=function(){return e=zx(this.rgba),{h:Di(e.h),s:Di(e.s),v:Di(e.v),a:Di(e.a,3)};var e},s.prototype.invert=function(){return mn({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},s.prototype.saturate=function(e){return e===void 0&&(e=.1),mn(Gd(this.rgba,e))},s.prototype.desaturate=function(e){return e===void 0&&(e=.1),mn(Gd(this.rgba,-e))},s.prototype.grayscale=function(){return mn(Gd(this.rgba,-1))},s.prototype.lighten=function(e){return e===void 0&&(e=.1),mn(X0(this.rgba,e))},s.prototype.darken=function(e){return e===void 0&&(e=.1),mn(X0(this.rgba,-e))},s.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},s.prototype.alpha=function(e){return typeof e=="number"?mn({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Di(this.rgba.a,3);var t},s.prototype.hue=function(e){var t=pl(this.rgba);return typeof e=="number"?mn({h:e,s:t.s,l:t.l,a:t.a}):Di(t.h)},s.prototype.isEqual=function(e){return this.toHex()===mn(e).toHex()},s})(),mn=function(s){return s instanceof $f?s:new $f(s)},V0=[],gA=function(s){s.forEach(function(e){V0.indexOf(e)<0&&(e($f,Yf),V0.push(e))})};function vA(s,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var n in t)i[t[n]]=n;var r={};s.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,h,l=i[this.toHex()];if(l)return l;if(a!=null&&a.closest){var c=this.toRgb(),u=1/0,d="black";if(!r.length)for(var f in t)r[f]=new s(t[f]).toRgb();for(var p in t){var m=(o=c,h=r[p],Math.pow(o.r-h.r,2)+Math.pow(o.g-h.g,2)+Math.pow(o.b-h.b,2));mn===t[r]);if(e!==null&&t!==null){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,i,n]=this._components;return{r:e,g:t,b:i,a:n}}toRgb(){const[e,t,i]=this._components;return{r:e,g:t,b:i}}toRgbaString(){const[e,t,i]=this.toUint8RgbArray();return`rgba(${e},${t},${i},${this.alpha})`}toUint8RgbArray(e){const[t,i,n]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(i*255),e[2]=Math.round(n*255),e}toRgbArray(e){e=e??[];const[t,i,n]=this._components;return e[0]=t,e[1]=i,e[2]=n,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,i,n,r]=Yc.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=i,this._components[2]*=n,this._components[3]*=r,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let i=this._int>>16&255,n=this._int>>8&255,r=this._int&255;return t&&(i=i*e+.5|0,n=n*e+.5|0,r=r*e+.5|0),(e*255<<24)+(i<<16)+(n<<8)+r}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,i,n]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(i*e)/e,this._components[2]=Math.round(n*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,i,n,r]=this._components;return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e}normalize(e){let t,i,n,r;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const a=e;t=(a>>16&255)/255,i=(a>>8&255)/255,n=(a&255)/255,r=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,i,n,r=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,i,n,r=255]=e,t/=255,i/=255,n/=255,r/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const o=Yc.HEX_PATTERN.exec(e);o&&(e=`#${o[2]}`)}const a=mn(e);a.isValid()&&({r:t,g:i,b:n,a:r}=a.rgba,t/=255,i/=255,n/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=i,this._components[2]=n,this._components[3]=r,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,i]=this._components;this._int=(e*255<<16)+(t*255<<8)+(i*255|0)}_clamp(e,t=0,i=1){return typeof e=="number"?Math.min(Math.max(e,t),i):(e.forEach((n,r)=>{e[r]=Math.min(Math.max(n,t),i)}),e)}};io.shared=new io,io.temp=new io,io.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let jt=io;function yA(s){return kt("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),jt.shared.setValue(s).toHex()}function xA(s){return kt("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),jt.shared.setValue(s).toNumber()}function bA(){const s=[],e=[];for(let i=0;i<32;i++)s[i]=i,e[i]=i;s[dt.NORMAL_NPM]=dt.NORMAL,s[dt.ADD_NPM]=dt.ADD,s[dt.SCREEN_NPM]=dt.SCREEN,e[dt.NORMAL]=dt.NORMAL_NPM,e[dt.ADD]=dt.ADD_NPM,e[dt.SCREEN]=dt.SCREEN_NPM;const t=[];return t.push(e),t.push(s),t}const Kx=bA();function Zx(s,e){return Kx[e?1:0][s]}function wA(s,e=null){const t=s*6;if(e=e||new Uint16Array(t),e.length!==t)throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${t}`);for(let i=0,n=0;i>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s+1}function Y0(s){return!(s&s-1)&&!!s}function $0(s){let e=(s>65535?1:0)<<4;s>>>=e;let t=(s>255?1:0)<<3;return s>>>=t,e|=t,t=(s>15?1:0)<<2,s>>>=t,e|=t,t=(s>3?1:0)<<1,s>>>=t,e|=t,e|s>>1}function yo(s,e,t){const i=s.length;let n;if(e>=i||t===0)return;t=e+t>i?i-e:t;const r=i-t;for(n=e;n(s.Renderer="renderer",s.Application="application",s.RendererSystem="renderer-webgl-system",s.RendererPlugin="renderer-webgl-plugin",s.CanvasRendererSystem="renderer-canvas-system",s.CanvasRendererPlugin="renderer-canvas-plugin",s.Asset="asset",s.LoadParser="load-parser",s.ResolveParser="resolve-parser",s.CacheParser="cache-parser",s.DetectionParser="detection-parser",s))(He||{});const Hf=s=>{if(typeof s=="function"||typeof s=="object"&&s.extension){if(!s.extension)throw new Error("Extension class must have an extension object");s={...typeof s.extension!="object"?{type:s.extension}:s.extension,ref:s}}if(typeof s=="object")s={...s};else throw new Error("Invalid extension type");return typeof s.type=="string"&&(s.type=[s.type]),s},z0=(s,e)=>Hf(s).priority??e,tt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...s){return s.map(Hf).forEach(e=>{e.type.forEach(t=>{var i,n;return(n=(i=this._removeHandlers)[t])==null?void 0:n.call(i,e)})}),this},add(...s){return s.map(Hf).forEach(e=>{e.type.forEach(t=>{var r,a;const i=this._addHandlers,n=this._queue;i[t]?(r=i[t])==null||r.call(i,e):(n[t]=n[t]||[],(a=n[t])==null||a.push(e))})}),this},handle(s,e,t){var a;const i=this._addHandlers,n=this._removeHandlers;if(i[s]||n[s])throw new Error(`Extension type ${s} already has a handler`);i[s]=e,n[s]=t;const r=this._queue;return r[s]&&((a=r[s])==null||a.forEach(o=>e(o)),delete r[s]),this},handleByMap(s,e){return this.handle(s,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByList(s,e,t=-1){return this.handle(s,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((n,r)=>z0(r,t)-z0(n,t)))},i=>{const n=e.indexOf(i.ref);n!==-1&&e.splice(n,1)})}};class jf{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}const EA=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` -`);function CA(s){let e="";for(let t=0;t0&&(e+=` -else `),t=0;--i){const n=Wf[i];if(n.test&&n.test(s,t))return new n(s,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class on{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,n,r,a,o,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:c}=this;this._aliasCount++;for(let u=0,d=c.length;u0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(on.prototype,{dispatch:{value:on.prototype.emit},run:{value:on.prototype.emit}});class Ol{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new on("setRealSize"),this.onUpdate=new on("update"),this.onError=new on("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}}class yu extends Ol{constructor(e,t){const{width:i,height:n}=t||{};if(!i||!n)throw new Error("BufferResource width or height invalid");super(i,n),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,i){const n=e.gl;n.pixelStorei(n.UNPACK_ALIGNMENT,this.unpackAlignment),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Ni.UNPACK);const r=t.realWidth,a=t.realHeight;return i.width===r&&i.height===a?n.texSubImage2D(t.target,0,0,0,r,a,t.format,i.type,this.data):(i.width=r,i.height=a,n.texImage2D(t.target,0,i.internalFormat,r,a,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const RA={scaleMode:sn.NEAREST,alphaMode:Ni.NPM},zf=class so extends jl{constructor(e=null,t=null){super(),t=Object.assign({},so.defaultOptions,t);const{alphaMode:i,mipmap:n,anisotropicLevel:r,scaleMode:a,width:o,height:h,wrapMode:l,format:c,type:u,target:d,resolution:f,resourceOptions:p}=t;e&&!(e instanceof Ol)&&(e=Qx(e,p),e.internal=!0),this.resolution=f||We.RESOLUTION,this.width=Math.round((o||0)*this.resolution)/this.resolution,this.height=Math.round((h||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=r,this._wrapMode=l,this._scaleMode=a,this.format=c,this.type=u,this.target=d,this.alphaMode=i,this.uid=Fa(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=o>0&&h>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let i;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,i=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,i=!0),i&&this.dirtyStyleId++,this}setSize(e,t,i){return i=i||this.resolution,this.setRealSize(e*i,t*i,i)}setRealSize(e,t,i){return this.resolution=i||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Y0(this.realWidth)&&Y0(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Sr[this.cacheId],delete pn[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),so.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,i=We.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let r=null;if(n)r=e;else{if(!e._pixiId){const o=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${o}_${Fa()}`}r=e._pixiId}let a=Sr[r];if(n&&i&&!a)throw new Error(`The cacheId "${r}" does not exist in BaseTextureCache.`);return a||(a=new so(e,t),a.cacheId=r,so.addToCache(a,r)),a}static fromBuffer(e,t,i,n){e=e||new Float32Array(t*i*4);const r=new yu(e,{width:t,height:i,...n==null?void 0:n.resourceOptions});let a,o;return e instanceof Float32Array?(a=Ne.RGBA,o=et.FLOAT):e instanceof Int32Array?(a=Ne.RGBA_INTEGER,o=et.INT):e instanceof Uint32Array?(a=Ne.RGBA_INTEGER,o=et.UNSIGNED_INT):e instanceof Int16Array?(a=Ne.RGBA_INTEGER,o=et.SHORT):e instanceof Uint16Array?(a=Ne.RGBA_INTEGER,o=et.UNSIGNED_SHORT):e instanceof Int8Array?(a=Ne.RGBA,o=et.BYTE):(a=Ne.RGBA,o=et.UNSIGNED_BYTE),r.internal=!0,new so(r,Object.assign({},RA,{type:o,format:a},n))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Sr[t]&&Sr[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Sr[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Sr[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete Sr[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t1){for(let u=0;u(s[s.POLY=0]="POLY",s[s.RECT=1]="RECT",s[s.CIRC=2]="CIRC",s[s.ELIP=3]="ELIP",s[s.RREC=4]="RREC",s))(Hi||{});class Ut{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new Ut(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,t=e){return this.x=e,this.y=t,this}}Ut.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const cc=[new Ut,new Ut,new Ut,new Ut];class Tt{constructor(e=0,t=0,i=0,n=0){this.x=Number(e),this.y=Number(t),this.width=Number(i),this.height=Number(n),this.type=Hi.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new Tt(0,0,0,0)}clone(){return new Tt(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,t){return this.width<=0||this.height<=0?!1:e>=this.x&&e=this.y&&te.right?e.right:this.right)<=R)return!1;const P=this.ye.bottom?e.bottom:this.bottom)>P}const i=this.left,n=this.right,r=this.top,a=this.bottom;if(n<=i||a<=r)return!1;const o=cc[0].set(e.left,e.top),h=cc[1].set(e.left,e.bottom),l=cc[2].set(e.right,e.top),c=cc[3].set(e.right,e.bottom);if(l.x<=o.x||h.y<=o.y)return!1;const u=Math.sign(t.a*t.d-t.b*t.c);if(u===0||(t.apply(o,o),t.apply(h,h),t.apply(l,l),t.apply(c,c),Math.max(o.x,h.x,l.x,c.x)<=i||Math.min(o.x,h.x,l.x,c.x)>=n||Math.max(o.y,h.y,l.y,c.y)<=r||Math.min(o.y,h.y,l.y,c.y)>=a))return!1;const d=u*(h.y-o.y),f=u*(o.x-h.x),p=d*i+f*r,m=d*n+f*r,g=d*i+f*a,v=d*n+f*a;if(Math.max(p,m,g,v)<=d*o.x+f*o.y||Math.min(p,m,g,v)>=d*c.x+f*c.y)return!1;const b=u*(o.y-l.y),y=u*(l.x-o.x),w=b*i+y*r,A=b*n+y*r,T=b*i+y*a,_=b*n+y*a;return!(Math.max(w,A,T,_)<=b*o.x+y*o.y||Math.min(w,A,T,_)>=b*c.x+y*c.y)}pad(e=0,t=e){return this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this}fit(e){const t=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),n=Math.max(this.y,e.y),r=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(i-t,0),this.y=n,this.height=Math.max(r-n,0),this}ceil(e=1,t=.001){const i=Math.ceil((this.x+this.width-t)*e)/e,n=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=i-this.x,this.height=n-this.y,this}enlarge(e){const t=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),n=Math.min(this.y,e.y),r=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=i-t,this.y=n,this.height=r-n,this}}Tt.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class xu{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.radius=i,this.type=Hi.CIRC}clone(){return new xu(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;const i=this.radius*this.radius;let n=this.x-e,r=this.y-t;return n*=n,r*=r,n+r<=i}getBounds(){return new Tt(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}}xu.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class bu{constructor(e=0,t=0,i=0,n=0){this.x=e,this.y=t,this.width=i,this.height=n,this.type=Hi.ELIP}clone(){return new bu(this.x,this.y,this.width,this.height)}contains(e,t){if(this.width<=0||this.height<=0)return!1;let i=(e-this.x)/this.width,n=(t-this.y)/this.height;return i*=i,n*=n,i+n<=1}getBounds(){return new Tt(this.x-this.width,this.y-this.height,this.width,this.height)}}bu.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class Ca{constructor(...e){let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!="number"){const i=[];for(let n=0,r=t.length;nt!=c>t&&e<(l-o)*((t-h)/(c-h))+o&&(i=!i)}return i}}Ca.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((s,e)=>`${s}, ${e}`,"")}]`};class wu{constructor(e=0,t=0,i=0,n=0,r=20){this.x=e,this.y=t,this.width=i,this.height=n,this.radius=r,this.type=Hi.RREC}clone(){return new wu(this.x,this.y,this.width,this.height,this.radius)}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){const i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+i&&t<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;let n=e-(this.x+i),r=t-(this.y+i);const a=i*i;if(n*n+r*r<=a||(n=e-(this.x+this.width-i),n*n+r*r<=a)||(r=t-(this.y+this.height-i),n*n+r*r<=a)||(n=e-(this.x+i),n*n+r*r<=a))return!0}return!1}}wu.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class li{constructor(e=1,t=0,i=0,n=1,r=0,a=0){this.array=null,this.a=e,this.b=t,this.c=i,this.d=n,this.tx=r,this.ty=a}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,t,i,n,r,a){return this.a=e,this.b=t,this.c=i,this.d=n,this.tx=r,this.ty=a,this}toArray(e,t){this.array||(this.array=new Float32Array(9));const i=t||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,t){t=t||new Ut;const i=e.x,n=e.y;return t.x=this.a*i+this.c*n+this.tx,t.y=this.b*i+this.d*n+this.ty,t}applyInverse(e,t){t=t||new Ut;const i=1/(this.a*this.d+this.c*-this.b),n=e.x,r=e.y;return t.x=this.d*i*n+-this.c*i*r+(this.ty*this.c-this.tx*this.d)*i,t.y=this.a*i*r+-this.b*i*n+(-this.ty*this.a+this.tx*this.b)*i,t}translate(e,t){return this.tx+=e,this.ty+=t,this}scale(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this}rotate(e){const t=Math.cos(e),i=Math.sin(e),n=this.a,r=this.c,a=this.tx;return this.a=n*t-this.b*i,this.b=n*i+this.b*t,this.c=r*t-this.d*i,this.d=r*i+this.d*t,this.tx=a*t-this.ty*i,this.ty=a*i+this.ty*t,this}append(e){const t=this.a,i=this.b,n=this.c,r=this.d;return this.a=e.a*t+e.b*n,this.b=e.a*i+e.b*r,this.c=e.c*t+e.d*n,this.d=e.c*i+e.d*r,this.tx=e.tx*t+e.ty*n+this.tx,this.ty=e.tx*i+e.ty*r+this.ty,this}setTransform(e,t,i,n,r,a,o,h,l){return this.a=Math.cos(o+l)*r,this.b=Math.sin(o+l)*r,this.c=-Math.sin(o-h)*a,this.d=Math.cos(o-h)*a,this.tx=e-(i*this.a+n*this.c),this.ty=t-(i*this.b+n*this.d),this}prepend(e){const t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const i=this.a,n=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=n*e.a+this.d*e.c,this.d=n*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this}decompose(e){const t=this.a,i=this.b,n=this.c,r=this.d,a=e.pivot,o=-Math.atan2(-n,r),h=Math.atan2(i,t),l=Math.abs(o+h);return l<1e-5||Math.abs(vh-l)<1e-5?(e.rotation=h,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=h),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(n*n+r*r),e.position.x=this.tx+(a.x*t+a.y*n),e.position.y=this.ty+(a.x*i+a.y*r),e}invert(){const e=this.a,t=this.b,i=this.c,n=this.d,r=this.tx,a=e*n-t*i;return this.a=n/a,this.b=-t/a,this.c=-i/a,this.d=e/a,this.tx=(i*this.ty-n*r)/a,this.ty=-(e*this.ty-t*r)/a,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new li;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}static get IDENTITY(){return new li}static get TEMP_MATRIX(){return new li}}li.prototype.toString=function(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`};const ua=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],da=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],fa=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],ma=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Kf=[],tb=[],hc=Math.sign;function NA(){for(let s=0;s<16;s++){const e=[];Kf.push(e);for(let t=0;t<16;t++){const i=hc(ua[s]*ua[t]+fa[s]*da[t]),n=hc(da[s]*ua[t]+ma[s]*da[t]),r=hc(ua[s]*fa[t]+fa[s]*ma[t]),a=hc(da[s]*fa[t]+ma[s]*ma[t]);for(let o=0;o<16;o++)if(ua[o]===i&&da[o]===n&&fa[o]===r&&ma[o]===a){e.push(o);break}}}for(let s=0;s<16;s++){const e=new li;e.set(ua[s],da[s],fa[s],ma[s],0,0),tb.push(e)}}NA();const mi={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:s=>ua[s],uY:s=>da[s],vX:s=>fa[s],vY:s=>ma[s],inv:s=>s&8?s&15:-s&7,add:(s,e)=>Kf[s][e],sub:(s,e)=>Kf[s][mi.inv(e)],rotate180:s=>s^4,isVertical:s=>(s&3)===2,byDirection:(s,e)=>Math.abs(s)*2<=Math.abs(e)?e>=0?mi.S:mi.N:Math.abs(e)*2<=Math.abs(s)?s>0?mi.E:mi.W:e>0?s>0?mi.SE:mi.SW:s>0?mi.NE:mi.NW,matrixAppendRotationInv:(s,e,t=0,i=0)=>{const n=tb[mi.inv(e)];n.tx=t,n.ty=i,s.append(n)}};class sr{constructor(e,t,i=0,n=0){this._x=i,this._y=n,this.cb=e,this.scope=t}clone(e=this.cb,t=this.scope){return new sr(e,t,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}sr.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const Zf=class{constructor(){this.worldTransform=new li,this.localTransform=new li,this.position=new sr(this.onChange,this,0,0),this.scale=new sr(this.onChange,this,1,1),this.pivot=new sr(this.onChange,this,0,0),this.skew=new sr(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}updateLocalTransform(){const s=this.localTransform;this._localID!==this._currentLocalID&&(s.a=this._cx*this.scale.x,s.b=this._sx*this.scale.x,s.c=this._cy*this.scale.y,s.d=this._sy*this.scale.y,s.tx=this.position.x-(this.pivot.x*s.a+this.pivot.y*s.c),s.ty=this.position.y-(this.pivot.x*s.b+this.pivot.y*s.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(s){const e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==s._worldID){const t=s.worldTransform,i=this.worldTransform;i.a=e.a*t.a+e.b*t.c,i.b=e.a*t.b+e.b*t.d,i.c=e.c*t.a+e.d*t.c,i.d=e.c*t.b+e.d*t.d,i.tx=e.tx*t.a+e.ty*t.c+t.tx,i.ty=e.tx*t.b+e.ty*t.d+t.ty,this._parentID=s._worldID,this._worldID++}}setFromMatrix(s){s.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(s){this._rotation!==s&&(this._rotation=s,this.updateSkew())}};Zf.IDENTITY=new Zf;let mp=Zf;mp.prototype.toString=function(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`};var UA=`varying vec2 vTextureCoord; +Deprecated since v${s}`),console.warn(i))),O0[e]=!0}function zs(s){if(typeof s!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(s)}`)}function jo(s){return s.split("?")[0].split("#")[0]}function nT(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rT(s,e,t){return s.replace(new RegExp(nT(e),"g"),t)}function aT(s,e){let t="",i=0,n=-1,r=0,a=-1;for(let o=0;o<=s.length;++o){if(o2){const h=t.lastIndexOf("/");if(h!==t.length-1){h===-1?(t="",i=0):(t=t.slice(0,h),i=t.length-1-t.lastIndexOf("/")),n=o,r=0;continue}}else if(t.length===2||t.length===1){t="",i=0,n=o,r=0;continue}}}else t.length>0?t+=`/${s.slice(n+1,o)}`:t=s.slice(n+1,o),i=o-n-1;n=o,r=0}else a===46&&r!==-1?++r:r=-1}return t}const wi={toPosix(s){return rT(s,"\\","/")},isUrl(s){return/^https?:/.test(this.toPosix(s))},isDataUrl(s){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(s)},isBlobUrl(s){return s.startsWith("blob:")},hasProtocol(s){return/^[^/:]+:/.test(this.toPosix(s))},getProtocol(s){zs(s),s=this.toPosix(s);const e=/^file:\/\/\//.exec(s);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(s);return t?t[0]:""},toAbsolute(s,e,t){if(zs(s),this.isDataUrl(s)||this.isBlobUrl(s))return s;const i=jo(this.toPosix(e??We.ADAPTER.getBaseUrl())),n=jo(this.toPosix(t??this.rootname(i)));return s=this.toPosix(s),s.startsWith("/")?wi.join(n,s.slice(1)):this.isAbsolute(s)?s:this.join(i,s)},normalize(s){if(zs(s),s.length===0)return".";if(this.isDataUrl(s)||this.isBlobUrl(s))return s;s=this.toPosix(s);let e="";const t=s.startsWith("/");this.hasProtocol(s)&&(e=this.rootname(s),s=s.slice(e.length));const i=s.endsWith("/");return s=aT(s),s.length>0&&i&&(s+="/"),t?`/${s}`:e+s},isAbsolute(s){return zs(s),s=this.toPosix(s),this.hasProtocol(s)?!0:s.startsWith("/")},join(...s){if(s.length===0)return".";let e;for(let t=0;t0)if(e===void 0)e=i;else{const n=s[t-1]??"";this.joinExtensions.includes(this.extname(n).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(s){if(zs(s),s.length===0)return".";s=this.toPosix(s);let e=s.charCodeAt(0);const t=e===47;let i=-1,n=!0;const r=this.getProtocol(s),a=s;s=s.slice(r.length);for(let o=s.length-1;o>=1;--o)if(e=s.charCodeAt(o),e===47){if(!n){i=o;break}}else n=!1;return i===-1?t?"/":this.isUrl(a)?r+s:r:t&&i===1?"//":r+s.slice(0,i)},rootname(s){zs(s),s=this.toPosix(s);let e="";if(s.startsWith("/")?e="/":e=this.getProtocol(s),this.isUrl(s)){const t=s.indexOf("/",e.length);t!==-1?e=s.slice(0,t):e=s,e.endsWith("/")||(e+="/")}return e},basename(s,e){zs(s),e&&zs(e),s=jo(this.toPosix(s));let t=0,i=-1,n=!0,r;if(e!==void 0&&e.length>0&&e.length<=s.length){if(e.length===s.length&&e===s)return"";let a=e.length-1,o=-1;for(r=s.length-1;r>=0;--r){const h=s.charCodeAt(r);if(h===47){if(!n){t=r+1;break}}else o===-1&&(n=!1,o=r+1),a>=0&&(h===e.charCodeAt(a)?--a===-1&&(i=r):(a=-1,i=o))}return t===i?i=o:i===-1&&(i=s.length),s.slice(t,i)}for(r=s.length-1;r>=0;--r)if(s.charCodeAt(r)===47){if(!n){t=r+1;break}}else i===-1&&(n=!1,i=r+1);return i===-1?"":s.slice(t,i)},extname(s){zs(s),s=jo(this.toPosix(s));let e=-1,t=0,i=-1,n=!0,r=0;for(let a=s.length-1;a>=0;--a){const o=s.charCodeAt(a);if(o===47){if(!n){t=a+1;break}continue}i===-1&&(n=!1,i=a+1),o===46?e===-1?e=a:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||i===-1||r===0||r===1&&e===i-1&&e===t+1?"":s.slice(e,i)},parse(s){zs(s);const e={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return e;s=jo(this.toPosix(s));let t=s.charCodeAt(0);const i=this.isAbsolute(s);let n;e.root=this.rootname(s),i||this.hasProtocol(s)?n=1:n=0;let r=-1,a=0,o=-1,h=!0,l=s.length-1,c=0;for(;l>=n;--l){if(t=s.charCodeAt(l),t===47){if(!h){a=l+1;break}continue}o===-1&&(h=!1,o=l+1),t===46?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||o===-1||c===0||c===1&&r===o-1&&r===a+1?o!==-1&&(a===0&&i?e.base=e.name=s.slice(1,o):e.base=e.name=s.slice(a,o)):(a===0&&i?(e.name=s.slice(1,r),e.base=s.slice(1,o)):(e.name=s.slice(a,r),e.base=s.slice(a,o)),e.ext=s.slice(r,o)),e.dir=this.dirname(s),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Vd;async function oT(){return Vd??(Vd=(async()=>{var r;const s=document.createElement("canvas").getContext("webgl");if(!s)return Ni.UNPACK;const e=await new Promise(a=>{const o=document.createElement("video");o.onloadeddata=()=>a(o),o.onerror=()=>a(null),o.autoplay=!1,o.crossOrigin="anonymous",o.preload="auto",o.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",o.load()});if(!e)return Ni.UNPACK;const t=s.createTexture();s.bindTexture(s.TEXTURE_2D,t);const i=s.createFramebuffer();s.bindFramebuffer(s.FRAMEBUFFER,i),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,t,0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,e);const n=new Uint8Array(4);return s.readPixels(0,0,1,1,s.RGBA,s.UNSIGNED_BYTE,n),s.deleteFramebuffer(i),s.deleteTexture(t),(r=s.getExtension("WEBGL_lose_context"))==null||r.loseContext(),n[0]<=n[3]?Ni.PMA:Ni.UNPACK})()),Vd}let Yd;function lT(){return typeof Yd>"u"&&(Yd=(function(){var e;const s={stencil:!0,failIfMajorPerformanceCaveat:We.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!We.ADAPTER.getWebGLRenderingContext())return!1;const t=We.ADAPTER.createCanvas();let i=t.getContext("webgl",s)||t.getContext("experimental-webgl",s);const n=!!((e=i==null?void 0:i.getContextAttributes())!=null&&e.stencil);if(i){const r=i.getExtension("WEBGL_lose_context");r&&r.loseContext()}return i=null,n}catch{return!1}})()),Yd}var cT={grad:.9,turn:360,rad:360/(2*Math.PI)},Hn=function(s){return typeof s=="string"?s.length>0:typeof s=="number"},Di=function(s,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*s)/t+0},Xs=function(s,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),s>t?t:s>e?s:e},Wx=function(s){return(s=isFinite(s)?s%360:0)>0?s:s+360},B0=function(s){return{r:Xs(s.r,0,255),g:Xs(s.g,0,255),b:Xs(s.b,0,255),a:Xs(s.a)}},$d=function(s){return{r:Di(s.r),g:Di(s.g),b:Di(s.b),a:Di(s.a,3)}},hT=/^#([0-9a-f]{3,8})$/i,lc=function(s){var e=s.toString(16);return e.length<2?"0"+e:e},zx=function(s){var e=s.r,t=s.g,i=s.b,n=s.a,r=Math.max(e,t,i),a=r-Math.min(e,t,i),o=a?r===e?(t-i)/a:r===t?2+(i-e)/a:4+(e-t)/a:0;return{h:60*(o<0?o+6:o),s:r?a/r*100:0,v:r/255*100,a:n}},qx=function(s){var e=s.h,t=s.s,i=s.v,n=s.a;e=e/360*6,t/=100,i/=100;var r=Math.floor(e),a=i*(1-t),o=i*(1-(e-r)*t),h=i*(1-(1-e+r)*t),l=r%6;return{r:255*[i,o,a,a,h,i][l],g:255*[h,i,i,o,a,a][l],b:255*[a,a,h,i,i,o][l],a:n}},L0=function(s){return{h:Wx(s.h),s:Xs(s.s,0,100),l:Xs(s.l,0,100),a:Xs(s.a)}},D0=function(s){return{h:Di(s.h),s:Di(s.s),l:Di(s.l),a:Di(s.a,3)}},N0=function(s){return qx((t=(e=s).s,{h:e.h,s:(t*=((i=e.l)<50?i:100-i)/100)>0?2*t/(i+t)*100:0,v:i+t,a:e.a}));var e,t,i},pl=function(s){return{h:(e=zx(s)).h,s:(n=(200-(t=e.s))*(i=e.v)/100)>0&&n<200?t*i/100/(n<=100?n:200-n)*100:0,l:n/2,a:e.a};var e,t,i,n},uT=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,dT=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,mT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yf={string:[[function(s){var e=hT.exec(s);return e?(s=e[1]).length<=4?{r:parseInt(s[0]+s[0],16),g:parseInt(s[1]+s[1],16),b:parseInt(s[2]+s[2],16),a:s.length===4?Di(parseInt(s[3]+s[3],16)/255,2):1}:s.length===6||s.length===8?{r:parseInt(s.substr(0,2),16),g:parseInt(s.substr(2,2),16),b:parseInt(s.substr(4,2),16),a:s.length===8?Di(parseInt(s.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(s){var e=fT.exec(s)||mT.exec(s);return e?e[2]!==e[4]||e[4]!==e[6]?null:B0({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(s){var e=uT.exec(s)||dT.exec(s);if(!e)return null;var t,i,n=L0({h:(t=e[1],i=e[2],i===void 0&&(i="deg"),Number(t)*(cT[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return N0(n)},"hsl"]],object:[[function(s){var e=s.r,t=s.g,i=s.b,n=s.a,r=n===void 0?1:n;return Hn(e)&&Hn(t)&&Hn(i)?B0({r:Number(e),g:Number(t),b:Number(i),a:Number(r)}):null},"rgb"],[function(s){var e=s.h,t=s.s,i=s.l,n=s.a,r=n===void 0?1:n;if(!Hn(e)||!Hn(t)||!Hn(i))return null;var a=L0({h:Number(e),s:Number(t),l:Number(i),a:Number(r)});return N0(a)},"hsl"],[function(s){var e=s.h,t=s.s,i=s.v,n=s.a,r=n===void 0?1:n;if(!Hn(e)||!Hn(t)||!Hn(i))return null;var a=(function(o){return{h:Wx(o.h),s:Xs(o.s,0,100),v:Xs(o.v,0,100),a:Xs(o.a)}})({h:Number(e),s:Number(t),v:Number(i),a:Number(r)});return qx(a)},"hsv"]]},U0=function(s,e){for(var t=0;t=.5},s.prototype.toHex=function(){return e=$d(this.rgba),t=e.r,i=e.g,n=e.b,a=(r=e.a)<1?lc(Di(255*r)):"","#"+lc(t)+lc(i)+lc(n)+a;var e,t,i,n,r,a},s.prototype.toRgb=function(){return $d(this.rgba)},s.prototype.toRgbString=function(){return e=$d(this.rgba),t=e.r,i=e.g,n=e.b,(r=e.a)<1?"rgba("+t+", "+i+", "+n+", "+r+")":"rgb("+t+", "+i+", "+n+")";var e,t,i,n,r},s.prototype.toHsl=function(){return D0(pl(this.rgba))},s.prototype.toHslString=function(){return e=D0(pl(this.rgba)),t=e.h,i=e.s,n=e.l,(r=e.a)<1?"hsla("+t+", "+i+"%, "+n+"%, "+r+")":"hsl("+t+", "+i+"%, "+n+"%)";var e,t,i,n,r},s.prototype.toHsv=function(){return e=zx(this.rgba),{h:Di(e.h),s:Di(e.s),v:Di(e.v),a:Di(e.a,3)};var e},s.prototype.invert=function(){return mn({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},s.prototype.saturate=function(e){return e===void 0&&(e=.1),mn(Gd(this.rgba,e))},s.prototype.desaturate=function(e){return e===void 0&&(e=.1),mn(Gd(this.rgba,-e))},s.prototype.grayscale=function(){return mn(Gd(this.rgba,-1))},s.prototype.lighten=function(e){return e===void 0&&(e=.1),mn(X0(this.rgba,e))},s.prototype.darken=function(e){return e===void 0&&(e=.1),mn(X0(this.rgba,-e))},s.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},s.prototype.alpha=function(e){return typeof e=="number"?mn({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Di(this.rgba.a,3);var t},s.prototype.hue=function(e){var t=pl(this.rgba);return typeof e=="number"?mn({h:e,s:t.s,l:t.l,a:t.a}):Di(t.h)},s.prototype.isEqual=function(e){return this.toHex()===mn(e).toHex()},s})(),mn=function(s){return s instanceof $f?s:new $f(s)},V0=[],gT=function(s){s.forEach(function(e){V0.indexOf(e)<0&&(e($f,Yf),V0.push(e))})};function vT(s,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var n in t)i[t[n]]=n;var r={};s.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,h,l=i[this.toHex()];if(l)return l;if(a!=null&&a.closest){var c=this.toRgb(),u=1/0,d="black";if(!r.length)for(var f in t)r[f]=new s(t[f]).toRgb();for(var p in t){var m=(o=c,h=r[p],Math.pow(o.r-h.r,2)+Math.pow(o.g-h.g,2)+Math.pow(o.b-h.b,2));mn===t[r]);if(e!==null&&t!==null){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,i,n]=this._components;return{r:e,g:t,b:i,a:n}}toRgb(){const[e,t,i]=this._components;return{r:e,g:t,b:i}}toRgbaString(){const[e,t,i]=this.toUint8RgbArray();return`rgba(${e},${t},${i},${this.alpha})`}toUint8RgbArray(e){const[t,i,n]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(i*255),e[2]=Math.round(n*255),e}toRgbArray(e){e=e??[];const[t,i,n]=this._components;return e[0]=t,e[1]=i,e[2]=n,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,i,n,r]=Yc.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=i,this._components[2]*=n,this._components[3]*=r,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let i=this._int>>16&255,n=this._int>>8&255,r=this._int&255;return t&&(i=i*e+.5|0,n=n*e+.5|0,r=r*e+.5|0),(e*255<<24)+(i<<16)+(n<<8)+r}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,i,n]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(i*e)/e,this._components[2]=Math.round(n*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,i,n,r]=this._components;return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e}normalize(e){let t,i,n,r;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const a=e;t=(a>>16&255)/255,i=(a>>8&255)/255,n=(a&255)/255,r=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,i,n,r=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,i,n,r=255]=e,t/=255,i/=255,n/=255,r/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const o=Yc.HEX_PATTERN.exec(e);o&&(e=`#${o[2]}`)}const a=mn(e);a.isValid()&&({r:t,g:i,b:n,a:r}=a.rgba,t/=255,i/=255,n/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=i,this._components[2]=n,this._components[3]=r,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,i]=this._components;this._int=(e*255<<16)+(t*255<<8)+(i*255|0)}_clamp(e,t=0,i=1){return typeof e=="number"?Math.min(Math.max(e,t),i):(e.forEach((n,r)=>{e[r]=Math.min(Math.max(n,t),i)}),e)}};io.shared=new io,io.temp=new io,io.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let jt=io;function yT(s){return kt("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),jt.shared.setValue(s).toHex()}function xT(s){return kt("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),jt.shared.setValue(s).toNumber()}function bT(){const s=[],e=[];for(let i=0;i<32;i++)s[i]=i,e[i]=i;s[dt.NORMAL_NPM]=dt.NORMAL,s[dt.ADD_NPM]=dt.ADD,s[dt.SCREEN_NPM]=dt.SCREEN,e[dt.NORMAL]=dt.NORMAL_NPM,e[dt.ADD]=dt.ADD_NPM,e[dt.SCREEN]=dt.SCREEN_NPM;const t=[];return t.push(e),t.push(s),t}const Kx=bT();function Zx(s,e){return Kx[e?1:0][s]}function wT(s,e=null){const t=s*6;if(e=e||new Uint16Array(t),e.length!==t)throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${t}`);for(let i=0,n=0;i>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s+1}function Y0(s){return!(s&s-1)&&!!s}function $0(s){let e=(s>65535?1:0)<<4;s>>>=e;let t=(s>255?1:0)<<3;return s>>>=t,e|=t,t=(s>15?1:0)<<2,s>>>=t,e|=t,t=(s>3?1:0)<<1,s>>>=t,e|=t,e|s>>1}function yo(s,e,t){const i=s.length;let n;if(e>=i||t===0)return;t=e+t>i?i-e:t;const r=i-t;for(n=e;n(s.Renderer="renderer",s.Application="application",s.RendererSystem="renderer-webgl-system",s.RendererPlugin="renderer-webgl-plugin",s.CanvasRendererSystem="renderer-canvas-system",s.CanvasRendererPlugin="renderer-canvas-plugin",s.Asset="asset",s.LoadParser="load-parser",s.ResolveParser="resolve-parser",s.CacheParser="cache-parser",s.DetectionParser="detection-parser",s))(He||{});const Hf=s=>{if(typeof s=="function"||typeof s=="object"&&s.extension){if(!s.extension)throw new Error("Extension class must have an extension object");s={...typeof s.extension!="object"?{type:s.extension}:s.extension,ref:s}}if(typeof s=="object")s={...s};else throw new Error("Invalid extension type");return typeof s.type=="string"&&(s.type=[s.type]),s},z0=(s,e)=>Hf(s).priority??e,tt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...s){return s.map(Hf).forEach(e=>{e.type.forEach(t=>{var i,n;return(n=(i=this._removeHandlers)[t])==null?void 0:n.call(i,e)})}),this},add(...s){return s.map(Hf).forEach(e=>{e.type.forEach(t=>{var r,a;const i=this._addHandlers,n=this._queue;i[t]?(r=i[t])==null||r.call(i,e):(n[t]=n[t]||[],(a=n[t])==null||a.push(e))})}),this},handle(s,e,t){var a;const i=this._addHandlers,n=this._removeHandlers;if(i[s]||n[s])throw new Error(`Extension type ${s} already has a handler`);i[s]=e,n[s]=t;const r=this._queue;return r[s]&&((a=r[s])==null||a.forEach(o=>e(o)),delete r[s]),this},handleByMap(s,e){return this.handle(s,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByList(s,e,t=-1){return this.handle(s,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((n,r)=>z0(r,t)-z0(n,t)))},i=>{const n=e.indexOf(i.ref);n!==-1&&e.splice(n,1)})}};class jf{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}const ET=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` +`);function CT(s){let e="";for(let t=0;t0&&(e+=` +else `),t=0;--i){const n=Wf[i];if(n.test&&n.test(s,t))return new n(s,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class on{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,n,r,a,o,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:c}=this;this._aliasCount++;for(let u=0,d=c.length;u0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(on.prototype,{dispatch:{value:on.prototype.emit},run:{value:on.prototype.emit}});class Ol{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new on("setRealSize"),this.onUpdate=new on("update"),this.onError=new on("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}}class yu extends Ol{constructor(e,t){const{width:i,height:n}=t||{};if(!i||!n)throw new Error("BufferResource width or height invalid");super(i,n),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,i){const n=e.gl;n.pixelStorei(n.UNPACK_ALIGNMENT,this.unpackAlignment),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Ni.UNPACK);const r=t.realWidth,a=t.realHeight;return i.width===r&&i.height===a?n.texSubImage2D(t.target,0,0,0,r,a,t.format,i.type,this.data):(i.width=r,i.height=a,n.texImage2D(t.target,0,i.internalFormat,r,a,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const RT={scaleMode:sn.NEAREST,alphaMode:Ni.NPM},zf=class so extends jl{constructor(e=null,t=null){super(),t=Object.assign({},so.defaultOptions,t);const{alphaMode:i,mipmap:n,anisotropicLevel:r,scaleMode:a,width:o,height:h,wrapMode:l,format:c,type:u,target:d,resolution:f,resourceOptions:p}=t;e&&!(e instanceof Ol)&&(e=Qx(e,p),e.internal=!0),this.resolution=f||We.RESOLUTION,this.width=Math.round((o||0)*this.resolution)/this.resolution,this.height=Math.round((h||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=r,this._wrapMode=l,this._scaleMode=a,this.format=c,this.type=u,this.target=d,this.alphaMode=i,this.uid=Fa(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=o>0&&h>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let i;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,i=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,i=!0),i&&this.dirtyStyleId++,this}setSize(e,t,i){return i=i||this.resolution,this.setRealSize(e*i,t*i,i)}setRealSize(e,t,i){return this.resolution=i||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Y0(this.realWidth)&&Y0(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Sr[this.cacheId],delete pn[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),so.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,i=We.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let r=null;if(n)r=e;else{if(!e._pixiId){const o=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${o}_${Fa()}`}r=e._pixiId}let a=Sr[r];if(n&&i&&!a)throw new Error(`The cacheId "${r}" does not exist in BaseTextureCache.`);return a||(a=new so(e,t),a.cacheId=r,so.addToCache(a,r)),a}static fromBuffer(e,t,i,n){e=e||new Float32Array(t*i*4);const r=new yu(e,{width:t,height:i,...n==null?void 0:n.resourceOptions});let a,o;return e instanceof Float32Array?(a=Ne.RGBA,o=et.FLOAT):e instanceof Int32Array?(a=Ne.RGBA_INTEGER,o=et.INT):e instanceof Uint32Array?(a=Ne.RGBA_INTEGER,o=et.UNSIGNED_INT):e instanceof Int16Array?(a=Ne.RGBA_INTEGER,o=et.SHORT):e instanceof Uint16Array?(a=Ne.RGBA_INTEGER,o=et.UNSIGNED_SHORT):e instanceof Int8Array?(a=Ne.RGBA,o=et.BYTE):(a=Ne.RGBA,o=et.UNSIGNED_BYTE),r.internal=!0,new so(r,Object.assign({},RT,{type:o,format:a},n))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Sr[t]&&Sr[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Sr[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Sr[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete Sr[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t1){for(let u=0;u(s[s.POLY=0]="POLY",s[s.RECT=1]="RECT",s[s.CIRC=2]="CIRC",s[s.ELIP=3]="ELIP",s[s.RREC=4]="RREC",s))(Hi||{});class Ut{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new Ut(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,t=e){return this.x=e,this.y=t,this}}Ut.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const cc=[new Ut,new Ut,new Ut,new Ut];class Tt{constructor(e=0,t=0,i=0,n=0){this.x=Number(e),this.y=Number(t),this.width=Number(i),this.height=Number(n),this.type=Hi.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new Tt(0,0,0,0)}clone(){return new Tt(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,t){return this.width<=0||this.height<=0?!1:e>=this.x&&e=this.y&&te.right?e.right:this.right)<=R)return!1;const P=this.ye.bottom?e.bottom:this.bottom)>P}const i=this.left,n=this.right,r=this.top,a=this.bottom;if(n<=i||a<=r)return!1;const o=cc[0].set(e.left,e.top),h=cc[1].set(e.left,e.bottom),l=cc[2].set(e.right,e.top),c=cc[3].set(e.right,e.bottom);if(l.x<=o.x||h.y<=o.y)return!1;const u=Math.sign(t.a*t.d-t.b*t.c);if(u===0||(t.apply(o,o),t.apply(h,h),t.apply(l,l),t.apply(c,c),Math.max(o.x,h.x,l.x,c.x)<=i||Math.min(o.x,h.x,l.x,c.x)>=n||Math.max(o.y,h.y,l.y,c.y)<=r||Math.min(o.y,h.y,l.y,c.y)>=a))return!1;const d=u*(h.y-o.y),f=u*(o.x-h.x),p=d*i+f*r,m=d*n+f*r,g=d*i+f*a,v=d*n+f*a;if(Math.max(p,m,g,v)<=d*o.x+f*o.y||Math.min(p,m,g,v)>=d*c.x+f*c.y)return!1;const b=u*(o.y-l.y),y=u*(l.x-o.x),w=b*i+y*r,A=b*n+y*r,T=b*i+y*a,_=b*n+y*a;return!(Math.max(w,A,T,_)<=b*o.x+y*o.y||Math.min(w,A,T,_)>=b*c.x+y*c.y)}pad(e=0,t=e){return this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this}fit(e){const t=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),n=Math.max(this.y,e.y),r=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(i-t,0),this.y=n,this.height=Math.max(r-n,0),this}ceil(e=1,t=.001){const i=Math.ceil((this.x+this.width-t)*e)/e,n=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=i-this.x,this.height=n-this.y,this}enlarge(e){const t=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),n=Math.min(this.y,e.y),r=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=i-t,this.y=n,this.height=r-n,this}}Tt.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class xu{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.radius=i,this.type=Hi.CIRC}clone(){return new xu(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;const i=this.radius*this.radius;let n=this.x-e,r=this.y-t;return n*=n,r*=r,n+r<=i}getBounds(){return new Tt(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}}xu.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class bu{constructor(e=0,t=0,i=0,n=0){this.x=e,this.y=t,this.width=i,this.height=n,this.type=Hi.ELIP}clone(){return new bu(this.x,this.y,this.width,this.height)}contains(e,t){if(this.width<=0||this.height<=0)return!1;let i=(e-this.x)/this.width,n=(t-this.y)/this.height;return i*=i,n*=n,i+n<=1}getBounds(){return new Tt(this.x-this.width,this.y-this.height,this.width,this.height)}}bu.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class Ca{constructor(...e){let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!="number"){const i=[];for(let n=0,r=t.length;nt!=c>t&&e<(l-o)*((t-h)/(c-h))+o&&(i=!i)}return i}}Ca.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((s,e)=>`${s}, ${e}`,"")}]`};class wu{constructor(e=0,t=0,i=0,n=0,r=20){this.x=e,this.y=t,this.width=i,this.height=n,this.radius=r,this.type=Hi.RREC}clone(){return new wu(this.x,this.y,this.width,this.height,this.radius)}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){const i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+i&&t<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;let n=e-(this.x+i),r=t-(this.y+i);const a=i*i;if(n*n+r*r<=a||(n=e-(this.x+this.width-i),n*n+r*r<=a)||(r=t-(this.y+this.height-i),n*n+r*r<=a)||(n=e-(this.x+i),n*n+r*r<=a))return!0}return!1}}wu.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class li{constructor(e=1,t=0,i=0,n=1,r=0,a=0){this.array=null,this.a=e,this.b=t,this.c=i,this.d=n,this.tx=r,this.ty=a}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,t,i,n,r,a){return this.a=e,this.b=t,this.c=i,this.d=n,this.tx=r,this.ty=a,this}toArray(e,t){this.array||(this.array=new Float32Array(9));const i=t||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,t){t=t||new Ut;const i=e.x,n=e.y;return t.x=this.a*i+this.c*n+this.tx,t.y=this.b*i+this.d*n+this.ty,t}applyInverse(e,t){t=t||new Ut;const i=1/(this.a*this.d+this.c*-this.b),n=e.x,r=e.y;return t.x=this.d*i*n+-this.c*i*r+(this.ty*this.c-this.tx*this.d)*i,t.y=this.a*i*r+-this.b*i*n+(-this.ty*this.a+this.tx*this.b)*i,t}translate(e,t){return this.tx+=e,this.ty+=t,this}scale(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this}rotate(e){const t=Math.cos(e),i=Math.sin(e),n=this.a,r=this.c,a=this.tx;return this.a=n*t-this.b*i,this.b=n*i+this.b*t,this.c=r*t-this.d*i,this.d=r*i+this.d*t,this.tx=a*t-this.ty*i,this.ty=a*i+this.ty*t,this}append(e){const t=this.a,i=this.b,n=this.c,r=this.d;return this.a=e.a*t+e.b*n,this.b=e.a*i+e.b*r,this.c=e.c*t+e.d*n,this.d=e.c*i+e.d*r,this.tx=e.tx*t+e.ty*n+this.tx,this.ty=e.tx*i+e.ty*r+this.ty,this}setTransform(e,t,i,n,r,a,o,h,l){return this.a=Math.cos(o+l)*r,this.b=Math.sin(o+l)*r,this.c=-Math.sin(o-h)*a,this.d=Math.cos(o-h)*a,this.tx=e-(i*this.a+n*this.c),this.ty=t-(i*this.b+n*this.d),this}prepend(e){const t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const i=this.a,n=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=n*e.a+this.d*e.c,this.d=n*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this}decompose(e){const t=this.a,i=this.b,n=this.c,r=this.d,a=e.pivot,o=-Math.atan2(-n,r),h=Math.atan2(i,t),l=Math.abs(o+h);return l<1e-5||Math.abs(vh-l)<1e-5?(e.rotation=h,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=h),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(n*n+r*r),e.position.x=this.tx+(a.x*t+a.y*n),e.position.y=this.ty+(a.x*i+a.y*r),e}invert(){const e=this.a,t=this.b,i=this.c,n=this.d,r=this.tx,a=e*n-t*i;return this.a=n/a,this.b=-t/a,this.c=-i/a,this.d=e/a,this.tx=(i*this.ty-n*r)/a,this.ty=-(e*this.ty-t*r)/a,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new li;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}static get IDENTITY(){return new li}static get TEMP_MATRIX(){return new li}}li.prototype.toString=function(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`};const ua=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],da=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],fa=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],ma=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Kf=[],t1=[],hc=Math.sign;function NT(){for(let s=0;s<16;s++){const e=[];Kf.push(e);for(let t=0;t<16;t++){const i=hc(ua[s]*ua[t]+fa[s]*da[t]),n=hc(da[s]*ua[t]+ma[s]*da[t]),r=hc(ua[s]*fa[t]+fa[s]*ma[t]),a=hc(da[s]*fa[t]+ma[s]*ma[t]);for(let o=0;o<16;o++)if(ua[o]===i&&da[o]===n&&fa[o]===r&&ma[o]===a){e.push(o);break}}}for(let s=0;s<16;s++){const e=new li;e.set(ua[s],da[s],fa[s],ma[s],0,0),t1.push(e)}}NT();const mi={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:s=>ua[s],uY:s=>da[s],vX:s=>fa[s],vY:s=>ma[s],inv:s=>s&8?s&15:-s&7,add:(s,e)=>Kf[s][e],sub:(s,e)=>Kf[s][mi.inv(e)],rotate180:s=>s^4,isVertical:s=>(s&3)===2,byDirection:(s,e)=>Math.abs(s)*2<=Math.abs(e)?e>=0?mi.S:mi.N:Math.abs(e)*2<=Math.abs(s)?s>0?mi.E:mi.W:e>0?s>0?mi.SE:mi.SW:s>0?mi.NE:mi.NW,matrixAppendRotationInv:(s,e,t=0,i=0)=>{const n=t1[mi.inv(e)];n.tx=t,n.ty=i,s.append(n)}};class sr{constructor(e,t,i=0,n=0){this._x=i,this._y=n,this.cb=e,this.scope=t}clone(e=this.cb,t=this.scope){return new sr(e,t,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}}sr.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const Zf=class{constructor(){this.worldTransform=new li,this.localTransform=new li,this.position=new sr(this.onChange,this,0,0),this.scale=new sr(this.onChange,this,1,1),this.pivot=new sr(this.onChange,this,0,0),this.skew=new sr(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}updateLocalTransform(){const s=this.localTransform;this._localID!==this._currentLocalID&&(s.a=this._cx*this.scale.x,s.b=this._sx*this.scale.x,s.c=this._cy*this.scale.y,s.d=this._sy*this.scale.y,s.tx=this.position.x-(this.pivot.x*s.a+this.pivot.y*s.c),s.ty=this.position.y-(this.pivot.x*s.b+this.pivot.y*s.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(s){const e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==s._worldID){const t=s.worldTransform,i=this.worldTransform;i.a=e.a*t.a+e.b*t.c,i.b=e.a*t.b+e.b*t.d,i.c=e.c*t.a+e.d*t.c,i.d=e.c*t.b+e.d*t.d,i.tx=e.tx*t.a+e.ty*t.c+t.tx,i.ty=e.tx*t.b+e.ty*t.d+t.ty,this._parentID=s._worldID,this._worldID++}}setFromMatrix(s){s.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(s){this._rotation!==s&&(this._rotation=s,this.updateSkew())}};Zf.IDENTITY=new Zf;let mp=Zf;mp.prototype.toString=function(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`};var UT=`varying vec2 vTextureCoord; uniform sampler2D uSampler; void main(void){ gl_FragColor *= texture2D(uSampler, vTextureCoord); -}`,XA=`attribute vec2 aVertexPosition; +}`,XT=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -48,7 +48,7 @@ void main(void){ gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; } -`;function K0(s,e,t){const i=s.createShader(e);return s.shaderSource(i,t),s.compileShader(i),i}function Jd(s){const e=new Array(s);for(let t=0;ts.type==="float"&&s.size===1&&!s.isArray,code:s=>` +`;function K0(s,e,t){const i=s.createShader(e);return s.shaderSource(i,t),s.compileShader(i),i}function Jd(s){const e=new Array(s);for(let t=0;ts.type==="float"&&s.size===1&&!s.isArray,code:s=>` if(uv["${s}"] !== ud["${s}"].value) { ud["${s}"].value = uv["${s}"] @@ -168,7 +168,7 @@ void main(void){ cv[3] = v[3]; gl.uniform4f(ud["${s}"].location, v[0], v[1], v[2], v[3]) - }`}],VA={float:` + }`}],VT={float:` if (cv !== v) { cu.value = v; @@ -304,7 +304,7 @@ void main(void){ cu.value = v; gl.uniform1i(location, v); - }`},YA={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function $A(s,e){var i;const t=[` + }`},YT={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function $T(s,e){var i;const t=[` var v = null; var cv = null; var cu = null; @@ -314,18 +314,18 @@ void main(void){ renderer.shader.syncUniformBufferGroup(uv.${n}, '${n}'); `):t.push(` renderer.shader.syncUniformGroup(uv.${n}, syncData); - `));continue}const a=s.uniforms[n];let o=!1;for(let h=0;h=Na.WEBGL2&&(e=s.getContext("webgl2",{})),e||(e=s.getContext("webgl",{})||s.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),qa=e}return qa}let uc;function HA(){if(!uc){uc=Us.MEDIUM;const s=GA();if(s&&s.getShaderPrecisionFormat){const e=s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT);e&&(uc=e.precision?Us.HIGH:Us.MEDIUM)}}return uc}function Z0(s,e){const t=s.getShaderSource(e).split(` +`))}const s1={};let qa=s1;function GT(){if(qa===s1||qa!=null&&qa.isContextLost()){const s=We.ADAPTER.createCanvas();let e;We.PREFER_ENV>=Na.WEBGL2&&(e=s.getContext("webgl2",{})),e||(e=s.getContext("webgl",{})||s.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),qa=e}return qa}let uc;function HT(){if(!uc){uc=Us.MEDIUM;const s=GT();if(s&&s.getShaderPrecisionFormat){const e=s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT);e&&(uc=e.precision?Us.HIGH:Us.MEDIUM)}}return uc}function Z0(s,e){const t=s.getShaderSource(e).split(` `).map((l,c)=>`${c}: ${l}`),i=s.getShaderInfoLog(e),n=i.split(` `),r={},a=n.map(l=>parseFloat(l.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(l=>l&&!r[l]?(r[l]=!0,!0):!1),o=[""];a.forEach(l=>{t[l-1]=`%c${t[l-1]}%c`,o.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const h=t.join(` -`);o[0]=h,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function jA(s,e,t,i){s.getProgramParameter(e,s.LINK_STATUS)||(s.getShaderParameter(t,s.COMPILE_STATUS)||Z0(s,t),s.getShaderParameter(i,s.COMPILE_STATUS)||Z0(s,i),console.error("PixiJS Error: Could not initialize shader."),s.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",s.getProgramInfoLog(e)))}const WA={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function nb(s){return WA[s]}let dc=null;const J0={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function rb(s,e){if(!dc){const t=Object.keys(J0);dc={};for(let i=0;i0&&(t+=` else `),ithis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,i=Zs._textureArrayPool,n=this.renderer.batch,r=this._tempBoundTextures,a=this.renderer.textureGC.count;let o=++yt._globalBatch,h=0,l=i[0],c=0;n.copyBoundTextures(r,t);for(let u=0;u=t&&(n.boundArray(l,r,o,t),this.buildDrawCalls(l,c,u),c=u,l=i[++h],++o),d._batchEnabled=o,d.touched=a,l.elements[l.count++]=d)}l.count>0&&(n.boundArray(l,r,o,t),this.buildDrawCalls(l,c,this._bufferSize),++h,++o);for(let u=0;u0);for(let m=0;mthis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,i=Zs._textureArrayPool,n=this.renderer.batch,r=this._tempBoundTextures,a=this.renderer.textureGC.count;let o=++yt._globalBatch,h=0,l=i[0],c=0;n.copyBoundTextures(r,t);for(let u=0;u=t&&(n.boundArray(l,r,o,t),this.buildDrawCalls(l,c,u),c=u,l=i[++h],++o),d._batchEnabled=o,d.touched=a,l.elements[l.count++]=d)}l.count>0&&(n.boundArray(l,r,o,t),this.buildDrawCalls(l,c,this._bufferSize),++h,++o);for(let u=0;u0);for(let m=0;m=0;--n)e[n]=i[n]||null,e[n]&&(e[n]._batchLocation=n)}boundArray(e,t,i,n){const{elements:r,ids:a,count:o}=e;let h=0;for(let l=0;l=0&&u=Na.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){const t=e.getContextAttributes(),i="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;i&&(this.webGLVersion=2),t&&!t.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const n=i||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=n,n||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}xh.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},xh.extension={type:He.RendererSystem,name:"context"};tt.add(xh);class tm{constructor(e,t){if(this.width=Math.round(e),this.height=Math.round(t),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new on("disposeFramebuffer"),this.multisample=Ei.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,t){return this.colorTextures[e]=t||new yt(null,{scaleMode:sn.NEAREST,resolution:1,mipmap:Ys.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new yt(null,{scaleMode:sn.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Ys.OFF,format:Ne.DEPTH_COMPONENT,type:et.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,t){if(e=Math.round(e),t=Math.round(t),!e||!t)throw new Error("Framebuffer width and height must not be zero");if(!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(let i=0;i{const n=this.source;this.url=n.src;const r=()=>{this.destroyed||(n.onload=null,n.onerror=null,this.update(),this._load=null,this.createBitmap?t(this.process()):t(this))};n.complete&&n.src?r():(n.onload=r,n.onerror=a=>{i(a),this.onError.emit(a)})}),this._load)}process(){const e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const t=globalThis.createImageBitmap,i=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:i?"cors":"no-cors"}).then(n=>n.blob()).then(n=>t(n,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Ni.UNPACK?"premultiply":"none"})).then(n=>this.destroyed?Promise.reject():(this.bitmap=n,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,t,i){if(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,t,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,t,i,this.bitmap),!this.preserveBitmap){let n=!0;const r=t._glTextures;for(const a in r){const o=r[a];if(o!==i&&o.dirtyId!==t.dirtyId){n=!1;break}}n&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}}class pp{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(e,t,i){const n=t.width,r=t.height;if(i){const a=e.width/2/n,o=e.height/2/r,h=e.x/n+a,l=e.y/r+o;i=mi.add(i,mi.NW),this.x0=h+a*mi.uX(i),this.y0=l+o*mi.uY(i),i=mi.add(i,2),this.x1=h+a*mi.uX(i),this.y1=l+o*mi.uY(i),i=mi.add(i,2),this.x2=h+a*mi.uX(i),this.y2=l+o*mi.uY(i),i=mi.add(i,2),this.x3=h+a*mi.uX(i),this.y3=l+o*mi.uY(i)}else this.x0=e.x/n,this.y0=e.y/r,this.x1=(e.x+e.width)/n,this.y1=e.y/r,this.x2=(e.x+e.width)/n,this.y2=(e.y+e.height)/r,this.x3=e.x/n,this.y3=(e.y+e.height)/r;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}}pp.prototype.toString=function(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`};const tv=new pp;function mc(s){s.destroy=function(){},s.on=function(){},s.once=function(){},s.emit=function(){}}let gt=class ri extends jl{constructor(e,t,i,n,r,a,o){if(super(),this.noFrame=!1,t||(this.noFrame=!0,t=new Tt(0,0,1,1)),e instanceof ri&&(e=e.baseTexture),this.baseTexture=e,this._frame=t,this.trim=n,this.valid=!1,this.destroyed=!1,this._uvs=tv,this.uvMatrix=null,this.orig=i||t,this._rotate=Number(r||0),r===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=a?new Ut(a.x,a.y):new Ut(0,0),this.defaultBorders=o,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=t:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){const{resource:t}=this.baseTexture;t!=null&&t.url&&pn[t.url]&&ri.removeFromCache(t.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,ri.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){var n;const e=this._frame.clone(),t=this._frame===this.orig?e:this.orig.clone(),i=new ri(this.baseTexture,!this.noFrame&&e,t,(n=this.trim)==null?void 0:n.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(i._frame=e),i}updateUvs(){this._uvs===tv&&(this._uvs=new pp),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,t={},i=We.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let r=null;if(n)r=e;else if(e instanceof yt){if(!e.cacheId){const o=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e.cacheId=`${o}-${Fa()}`,yt.addToCache(e,e.cacheId)}r=e.cacheId}else{if(!e._pixiId){const o=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${o}_${Fa()}`}r=e._pixiId}let a=pn[r];if(n&&i&&!a)throw new Error(`The cacheId "${r}" does not exist in TextureCache.`);return!a&&!(e instanceof yt)?(t.resolution||(t.resolution=pr(e)),a=new ri(new yt(e,t)),a.baseTexture.cacheId=r,yt.addToCache(a.baseTexture,r),ri.addToCache(a,r)):!a&&e instanceof yt&&(a=new ri(e),ri.addToCache(a,r)),a}static fromURL(e,t){const i=Object.assign({autoLoad:!1},t==null?void 0:t.resourceOptions),n=ri.from(e,Object.assign({resourceOptions:i},t),!1),r=n.baseTexture.resource;return n.baseTexture.valid?Promise.resolve(n):r.load().then(()=>Promise.resolve(n))}static fromBuffer(e,t,i,n){return new ri(yt.fromBuffer(e,t,i,n))}static fromLoader(e,t,i,n){const r=new yt(e,Object.assign({scaleMode:yt.defaultOptions.scaleMode,resolution:pr(t)},n)),{resource:a}=r;a instanceof cb&&(a.url=t);const o=new ri(r);return i||(i=t),yt.addToCache(o.baseTexture,i),ri.addToCache(o,i),i!==t&&(yt.addToCache(o.baseTexture,t),ri.addToCache(o,t)),o.baseTexture.valid?Promise.resolve(o):new Promise(h=>{o.baseTexture.once("loaded",()=>h(o))})}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),pn[t]&&pn[t]!==e&&console.warn(`Texture added to the cache with an id [${t}] that already had an entry`),pn[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=pn[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete pn[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;tthis.baseTexture.width,o=i+r>this.baseTexture.height;if(a||o){const h=a&&o?"and":"or",l=`X: ${t} + ${n} = ${t+n} > ${this.baseTexture.width}`,c=`Y: ${i} + ${r} = ${i+r} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${l} ${h} ${c}`)}this.valid=n&&r&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return ri._EMPTY||(ri._EMPTY=new ri(new yt),mc(ri._EMPTY),mc(ri._EMPTY.baseTexture)),ri._EMPTY}static get WHITE(){if(!ri._WHITE){const e=We.ADAPTER.createCanvas(16,16),t=e.getContext("2d");e.width=16,e.height=16,t.fillStyle="white",t.fillRect(0,0,16,16),ri._WHITE=new ri(yt.from(e)),mc(ri._WHITE),mc(ri._WHITE.baseTexture)}return ri._WHITE}};class Ua extends gt{constructor(e,t){super(e,t),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,t,i=!0){const n=this.baseTexture.resolution,r=Math.round(e*n)/n,a=Math.round(t*n)/n;this.valid=r>0&&a>0,this._frame.width=this.orig.width=r,this._frame.height=this.orig.height=a,i&&this.baseTexture.resize(r,a),this.updateUvs()}setResolution(e){const{baseTexture:t}=this;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))}static create(e){return new Ua(new lb(e))}}class hb{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,t,i=Ei.NONE){const n=new lb(Object.assign({width:e,height:t,resolution:1,multisample:i},this.textureOptions));return new Ua(n)}getOptimalTexture(e,t,i=1,n=Ei.NONE){let r;e=Math.max(Math.ceil(e*i-1e-6),1),t=Math.max(Math.ceil(t*i-1e-6),1),!this.enableFullScreen||e!==this._pixelsWidth||t!==this._pixelsHeight?(e=ph(e),t=ph(t),r=((e&65535)<<16|t&65535)>>>0,n>1&&(r+=n*4294967296)):r=n>1?-n:-1,this.texturePool[r]||(this.texturePool[r]=[]);let a=this.texturePool[r].pop();return a||(a=this.createTexture(e,t,n)),a.filterPoolKey=r,a.setResolution(i),a}getFilterTexture(e,t,i){const n=this.getOptimalTexture(e.width,e.height,t||e.resolution,i||Ei.NONE);return n.filterFrame=e.filterFrame,n}returnTexture(e){const t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(const t in this.texturePool){const i=this.texturePool[t];if(i)for(let n=0;n0&&e.height>0;for(const t in this.texturePool){if(!(Number(t)<0))continue;const i=this.texturePool[t];if(i)for(let n=0;n1&&(c=this.getOptimalFilterTexture(l.width,l.height,t.resolution),c.filterFrame=l.filterFrame),i[u].apply(this,l,c,Cn.CLEAR,t);const d=l;l=c,c=d}i[u].apply(this,l,h.renderTexture,Cn.BLEND,t),u>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(l),this.returnFilterTexture(c)}t.clear(),this.statePool.push(t)}bindAndClear(e,t=Cn.CLEAR){const{renderTexture:i,state:n}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e==null?void 0:e.filterFrame){const a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,i.bind(e,e.filterFrame,a)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const r=n.stateId&1||this.forceClear;(t===Cn.CLEAR||t===Cn.BLIT&&r)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,t,i,n){const r=this.renderer;r.state.set(e.state),this.bindAndClear(i,n),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,r.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),r.geometry.bind(this.quadUv),r.geometry.draw(Pn.TRIANGLES)):(r.geometry.bind(this.quad),r.geometry.draw(Pn.TRIANGLE_STRIP))}calculateSpriteMatrix(e,t){const{sourceFrame:i,destinationFrame:n}=this.activeState,{orig:r}=t._texture,a=e.set(n.width,0,0,n.height,i.x,i.y),o=t.worldTransform.copyTo(li.TEMP_MATRIX);return o.invert(),a.prepend(o),a.scale(1/r.width,1/r.height),a.translate(t.anchor.x,t.anchor.y),a}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,t,i=1,n=Ei.NONE){return this.texturePool.getOptimalTexture(e,t,i,n)}getFilterTexture(e,t,i){if(typeof e=="number"){const r=e;e=t,t=r}e=e||this.activeState.renderTexture;const n=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,i||Ei.NONE);return n.filterFrame=e.filterFrame,n}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,t){const i=pc[0],n=pc[1],r=pc[2],a=pc[3];i.set(t.left,t.top),n.set(t.left,t.bottom),r.set(t.right,t.top),a.set(t.right,t.bottom),e.apply(i,i),e.apply(n,n),e.apply(r,r),e.apply(a,a);const o=Math.min(i.x,n.x,r.x,a.x),h=Math.min(i.y,n.y,r.y,a.y),l=Math.max(i.x,n.x,r.x,a.x),c=Math.max(i.y,n.y,r.y,a.y);t.x=o,t.y=h,t.width=l-o,t.height=c-h}roundFrame(e,t,i,n,r){if(!(e.width<=0||e.height<=0||i.width<=0||i.height<=0)){if(r){const{a,b:o,c:h,d:l}=r;if((Math.abs(o)>1e-4||Math.abs(h)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(l)>1e-4))return}r=r?Qd.copyFrom(r):Qd.identity(),r.translate(-i.x,-i.y).scale(n.width/i.width,n.height/i.height).translate(n.x,n.y),this.transformAABB(r,e),e.ceil(t),this.transformAABB(r.invert(),e)}}}db.extension={type:He.RendererSystem,name:"filter"};tt.add(db);class rE{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Ei.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const aE=new Tt;class fb{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new tm(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Tt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let t=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;We.PREFER_ENV===Na.WEBGL_LEGACY&&(t=null,i=null),t?e.drawBuffers=n=>t.drawBuffersWEBGL(n):(this.hasMRT=!1,e.drawBuffers=()=>{}),i||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,t,i=0){const{gl:n}=this;if(e){const r=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,n.bindFramebuffer(n.FRAMEBUFFER,r.framebuffer)),r.mipLevel!==i&&(e.dirtyId++,e.dirtyFormat++,r.mipLevel=i),r.dirtyId!==e.dirtyId&&(r.dirtyId=e.dirtyId,r.dirtyFormat!==e.dirtyFormat?(r.dirtyFormat=e.dirtyFormat,r.dirtySize=e.dirtySize,this.updateFramebuffer(e,i)):r.dirtySize!==e.dirtySize&&(r.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let a=0;a>i,o=t.height>>i,h=a/t.width;this.setViewport(t.x*h,t.y*h,a,o)}else{const a=e.width>>i,o=e.height>>i;this.setViewport(0,0,a,o)}}else this.current&&(this.current=null,n.bindFramebuffer(n.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,t,i,n){const r=this.viewport;e=Math.round(e),t=Math.round(t),i=Math.round(i),n=Math.round(n),(r.width!==i||r.height!==n||r.x!==e||r.y!==t)&&(r.x=e,r.y=t,r.width=i,r.height=n,this.gl.viewport(e,t,i,n))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(e,t,i,n,r=Vf.COLOR|Vf.DEPTH){const{gl:a}=this;a.clearColor(e,t,i,n),a.clear(r)}initFramebuffer(e){const{gl:t}=this,i=new rE(t.createFramebuffer());return i.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=i,this.managedFramebuffers.push(e),e.disposeRunner.add(this),i}resizeFramebuffer(e){const{gl:t}=this,i=e.glFramebuffers[this.CONTEXT_UID];if(i.stencil){t.bindRenderbuffer(t.RENDERBUFFER,i.stencil);let a;this.renderer.context.webGLVersion===1?a=t.DEPTH_STENCIL:e.depth&&e.stencil?a=t.DEPTH24_STENCIL8:e.depth?a=t.DEPTH_COMPONENT24:a=t.STENCIL_INDEX8,i.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,i.multisample,a,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,a,e.width,e.height)}const n=e.colorTextures;let r=n.length;t.drawBuffers||(r=Math.min(r,1));for(let a=0;a1&&this.canMultisampleFramebuffer(e)?n.msaaBuffer=n.msaaBuffer||i.createRenderbuffer():n.msaaBuffer&&(i.deleteRenderbuffer(n.msaaBuffer),n.msaaBuffer=null,n.blitFramebuffer&&(n.blitFramebuffer.dispose(),n.blitFramebuffer=null));const o=[];for(let h=0;h1&&i.drawBuffers(o),e.depthTexture&&this.writeDepthTexture){const h=e.depthTexture;this.renderer.texture.bind(h,0),i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,t)}if((e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)){n.stencil=n.stencil||i.createRenderbuffer();let h,l;this.renderer.context.webGLVersion===1?(h=i.DEPTH_STENCIL_ATTACHMENT,l=i.DEPTH_STENCIL):e.depth&&e.stencil?(h=i.DEPTH_STENCIL_ATTACHMENT,l=i.DEPTH24_STENCIL8):e.depth?(h=i.DEPTH_ATTACHMENT,l=i.DEPTH_COMPONENT24):(h=i.STENCIL_ATTACHMENT,l=i.STENCIL_INDEX8),i.bindRenderbuffer(i.RENDERBUFFER,n.stencil),n.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,n.multisample,l,e.width,e.height):i.renderbufferStorage(i.RENDERBUFFER,l,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,h,i.RENDERBUFFER,n.stencil)}else n.stencil&&(i.deleteRenderbuffer(n.stencil),n.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){const{msaaSamples:t}=this;let i=Ei.NONE;if(e<=1||t===null)return i;for(let n=0;n=0&&this.managedFramebuffers.splice(r,1),e.disposeRunner.remove(this),t||(n.deleteFramebuffer(i.framebuffer),i.msaaBuffer&&n.deleteRenderbuffer(i.msaaBuffer),i.stencil&&n.deleteRenderbuffer(i.stencil)),i.blitFramebuffer&&this.disposeFramebuffer(i.blitFramebuffer,t)}disposeAll(e){const t=this.managedFramebuffers;this.managedFramebuffers=[];for(let i=0;ii.createVertexArrayOES(),e.bindVertexArray=n=>i.bindVertexArrayOES(n),e.deleteVertexArray=n=>i.deleteVertexArrayOES(n)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(t.webGLVersion!==2){const i=e.getExtension("ANGLE_instanced_arrays");i?(e.vertexAttribDivisor=(n,r)=>i.vertexAttribDivisorANGLE(n,r),e.drawElementsInstanced=(n,r,a,o,h)=>i.drawElementsInstancedANGLE(n,r,a,o,h),e.drawArraysInstanced=(n,r,a,o)=>i.drawArraysInstancedANGLE(n,r,a,o)):this.hasInstance=!1}this.canUseUInt32ElementIndex=t.webGLVersion===2||!!t.extensions.uint32ElementIndex}bind(e,t){t=t||this.renderer.shader.shader;const{gl:i}=this;let n=e.glVertexArrayObjects[this.CONTEXT_UID],r=!1;n||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=n={},r=!0);const a=n[t.program.id]||this.initGeometryVao(e,t,r);this._activeGeometry=e,this._activeVao!==a&&(this._activeVao=a,this.hasVao?i.bindVertexArray(a):this.activateVao(e,t.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,t=this.renderer.buffer;for(let i=0;i"u"?.5:t,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,t){t===void 0&&(t=e);const i=this.mapCoord;for(let n=0;n=0;--n)e[n]=i[n]||null,e[n]&&(e[n]._batchLocation=n)}boundArray(e,t,i,n){const{elements:r,ids:a,count:o}=e;let h=0;for(let l=0;l=0&&u=Na.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){const t=e.getContextAttributes(),i="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;i&&(this.webGLVersion=2),t&&!t.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const n=i||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=n,n||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}xh.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},xh.extension={type:He.RendererSystem,name:"context"};tt.add(xh);class tm{constructor(e,t){if(this.width=Math.round(e),this.height=Math.round(t),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new on("disposeFramebuffer"),this.multisample=Ei.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,t){return this.colorTextures[e]=t||new yt(null,{scaleMode:sn.NEAREST,resolution:1,mipmap:Ys.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new yt(null,{scaleMode:sn.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Ys.OFF,format:Ne.DEPTH_COMPONENT,type:et.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,t){if(e=Math.round(e),t=Math.round(t),!e||!t)throw new Error("Framebuffer width and height must not be zero");if(!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(let i=0;i{const n=this.source;this.url=n.src;const r=()=>{this.destroyed||(n.onload=null,n.onerror=null,this.update(),this._load=null,this.createBitmap?t(this.process()):t(this))};n.complete&&n.src?r():(n.onload=r,n.onerror=a=>{i(a),this.onError.emit(a)})}),this._load)}process(){const e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const t=globalThis.createImageBitmap,i=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:i?"cors":"no-cors"}).then(n=>n.blob()).then(n=>t(n,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Ni.UNPACK?"premultiply":"none"})).then(n=>this.destroyed?Promise.reject():(this.bitmap=n,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,t,i){if(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,t,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,t,i,this.bitmap),!this.preserveBitmap){let n=!0;const r=t._glTextures;for(const a in r){const o=r[a];if(o!==i&&o.dirtyId!==t.dirtyId){n=!1;break}}n&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}}class pp{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(e,t,i){const n=t.width,r=t.height;if(i){const a=e.width/2/n,o=e.height/2/r,h=e.x/n+a,l=e.y/r+o;i=mi.add(i,mi.NW),this.x0=h+a*mi.uX(i),this.y0=l+o*mi.uY(i),i=mi.add(i,2),this.x1=h+a*mi.uX(i),this.y1=l+o*mi.uY(i),i=mi.add(i,2),this.x2=h+a*mi.uX(i),this.y2=l+o*mi.uY(i),i=mi.add(i,2),this.x3=h+a*mi.uX(i),this.y3=l+o*mi.uY(i)}else this.x0=e.x/n,this.y0=e.y/r,this.x1=(e.x+e.width)/n,this.y1=e.y/r,this.x2=(e.x+e.width)/n,this.y2=(e.y+e.height)/r,this.x3=e.x/n,this.y3=(e.y+e.height)/r;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}}pp.prototype.toString=function(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`};const tv=new pp;function mc(s){s.destroy=function(){},s.on=function(){},s.once=function(){},s.emit=function(){}}let gt=class ri extends jl{constructor(e,t,i,n,r,a,o){if(super(),this.noFrame=!1,t||(this.noFrame=!0,t=new Tt(0,0,1,1)),e instanceof ri&&(e=e.baseTexture),this.baseTexture=e,this._frame=t,this.trim=n,this.valid=!1,this.destroyed=!1,this._uvs=tv,this.uvMatrix=null,this.orig=i||t,this._rotate=Number(r||0),r===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=a?new Ut(a.x,a.y):new Ut(0,0),this.defaultBorders=o,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=t:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){const{resource:t}=this.baseTexture;t!=null&&t.url&&pn[t.url]&&ri.removeFromCache(t.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,ri.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){var n;const e=this._frame.clone(),t=this._frame===this.orig?e:this.orig.clone(),i=new ri(this.baseTexture,!this.noFrame&&e,t,(n=this.trim)==null?void 0:n.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(i._frame=e),i}updateUvs(){this._uvs===tv&&(this._uvs=new pp),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,t={},i=We.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let r=null;if(n)r=e;else if(e instanceof yt){if(!e.cacheId){const o=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e.cacheId=`${o}-${Fa()}`,yt.addToCache(e,e.cacheId)}r=e.cacheId}else{if(!e._pixiId){const o=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${o}_${Fa()}`}r=e._pixiId}let a=pn[r];if(n&&i&&!a)throw new Error(`The cacheId "${r}" does not exist in TextureCache.`);return!a&&!(e instanceof yt)?(t.resolution||(t.resolution=pr(e)),a=new ri(new yt(e,t)),a.baseTexture.cacheId=r,yt.addToCache(a.baseTexture,r),ri.addToCache(a,r)):!a&&e instanceof yt&&(a=new ri(e),ri.addToCache(a,r)),a}static fromURL(e,t){const i=Object.assign({autoLoad:!1},t==null?void 0:t.resourceOptions),n=ri.from(e,Object.assign({resourceOptions:i},t),!1),r=n.baseTexture.resource;return n.baseTexture.valid?Promise.resolve(n):r.load().then(()=>Promise.resolve(n))}static fromBuffer(e,t,i,n){return new ri(yt.fromBuffer(e,t,i,n))}static fromLoader(e,t,i,n){const r=new yt(e,Object.assign({scaleMode:yt.defaultOptions.scaleMode,resolution:pr(t)},n)),{resource:a}=r;a instanceof c1&&(a.url=t);const o=new ri(r);return i||(i=t),yt.addToCache(o.baseTexture,i),ri.addToCache(o,i),i!==t&&(yt.addToCache(o.baseTexture,t),ri.addToCache(o,t)),o.baseTexture.valid?Promise.resolve(o):new Promise(h=>{o.baseTexture.once("loaded",()=>h(o))})}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),pn[t]&&pn[t]!==e&&console.warn(`Texture added to the cache with an id [${t}] that already had an entry`),pn[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=pn[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete pn[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;tthis.baseTexture.width,o=i+r>this.baseTexture.height;if(a||o){const h=a&&o?"and":"or",l=`X: ${t} + ${n} = ${t+n} > ${this.baseTexture.width}`,c=`Y: ${i} + ${r} = ${i+r} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${l} ${h} ${c}`)}this.valid=n&&r&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return ri._EMPTY||(ri._EMPTY=new ri(new yt),mc(ri._EMPTY),mc(ri._EMPTY.baseTexture)),ri._EMPTY}static get WHITE(){if(!ri._WHITE){const e=We.ADAPTER.createCanvas(16,16),t=e.getContext("2d");e.width=16,e.height=16,t.fillStyle="white",t.fillRect(0,0,16,16),ri._WHITE=new ri(yt.from(e)),mc(ri._WHITE),mc(ri._WHITE.baseTexture)}return ri._WHITE}};class Ua extends gt{constructor(e,t){super(e,t),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,t,i=!0){const n=this.baseTexture.resolution,r=Math.round(e*n)/n,a=Math.round(t*n)/n;this.valid=r>0&&a>0,this._frame.width=this.orig.width=r,this._frame.height=this.orig.height=a,i&&this.baseTexture.resize(r,a),this.updateUvs()}setResolution(e){const{baseTexture:t}=this;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))}static create(e){return new Ua(new l1(e))}}class h1{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,t,i=Ei.NONE){const n=new l1(Object.assign({width:e,height:t,resolution:1,multisample:i},this.textureOptions));return new Ua(n)}getOptimalTexture(e,t,i=1,n=Ei.NONE){let r;e=Math.max(Math.ceil(e*i-1e-6),1),t=Math.max(Math.ceil(t*i-1e-6),1),!this.enableFullScreen||e!==this._pixelsWidth||t!==this._pixelsHeight?(e=ph(e),t=ph(t),r=((e&65535)<<16|t&65535)>>>0,n>1&&(r+=n*4294967296)):r=n>1?-n:-1,this.texturePool[r]||(this.texturePool[r]=[]);let a=this.texturePool[r].pop();return a||(a=this.createTexture(e,t,n)),a.filterPoolKey=r,a.setResolution(i),a}getFilterTexture(e,t,i){const n=this.getOptimalTexture(e.width,e.height,t||e.resolution,i||Ei.NONE);return n.filterFrame=e.filterFrame,n}returnTexture(e){const t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(const t in this.texturePool){const i=this.texturePool[t];if(i)for(let n=0;n0&&e.height>0;for(const t in this.texturePool){if(!(Number(t)<0))continue;const i=this.texturePool[t];if(i)for(let n=0;n1&&(c=this.getOptimalFilterTexture(l.width,l.height,t.resolution),c.filterFrame=l.filterFrame),i[u].apply(this,l,c,Cn.CLEAR,t);const d=l;l=c,c=d}i[u].apply(this,l,h.renderTexture,Cn.BLEND,t),u>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(l),this.returnFilterTexture(c)}t.clear(),this.statePool.push(t)}bindAndClear(e,t=Cn.CLEAR){const{renderTexture:i,state:n}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e==null?void 0:e.filterFrame){const a=this.tempRect;a.x=0,a.y=0,a.width=e.filterFrame.width,a.height=e.filterFrame.height,i.bind(e,e.filterFrame,a)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const r=n.stateId&1||this.forceClear;(t===Cn.CLEAR||t===Cn.BLIT&&r)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,t,i,n){const r=this.renderer;r.state.set(e.state),this.bindAndClear(i,n),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,r.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),r.geometry.bind(this.quadUv),r.geometry.draw(Pn.TRIANGLES)):(r.geometry.bind(this.quad),r.geometry.draw(Pn.TRIANGLE_STRIP))}calculateSpriteMatrix(e,t){const{sourceFrame:i,destinationFrame:n}=this.activeState,{orig:r}=t._texture,a=e.set(n.width,0,0,n.height,i.x,i.y),o=t.worldTransform.copyTo(li.TEMP_MATRIX);return o.invert(),a.prepend(o),a.scale(1/r.width,1/r.height),a.translate(t.anchor.x,t.anchor.y),a}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,t,i=1,n=Ei.NONE){return this.texturePool.getOptimalTexture(e,t,i,n)}getFilterTexture(e,t,i){if(typeof e=="number"){const r=e;e=t,t=r}e=e||this.activeState.renderTexture;const n=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,i||Ei.NONE);return n.filterFrame=e.filterFrame,n}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,t){const i=pc[0],n=pc[1],r=pc[2],a=pc[3];i.set(t.left,t.top),n.set(t.left,t.bottom),r.set(t.right,t.top),a.set(t.right,t.bottom),e.apply(i,i),e.apply(n,n),e.apply(r,r),e.apply(a,a);const o=Math.min(i.x,n.x,r.x,a.x),h=Math.min(i.y,n.y,r.y,a.y),l=Math.max(i.x,n.x,r.x,a.x),c=Math.max(i.y,n.y,r.y,a.y);t.x=o,t.y=h,t.width=l-o,t.height=c-h}roundFrame(e,t,i,n,r){if(!(e.width<=0||e.height<=0||i.width<=0||i.height<=0)){if(r){const{a,b:o,c:h,d:l}=r;if((Math.abs(o)>1e-4||Math.abs(h)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(l)>1e-4))return}r=r?Qd.copyFrom(r):Qd.identity(),r.translate(-i.x,-i.y).scale(n.width/i.width,n.height/i.height).translate(n.x,n.y),this.transformAABB(r,e),e.ceil(t),this.transformAABB(r.invert(),e)}}}d1.extension={type:He.RendererSystem,name:"filter"};tt.add(d1);class rA{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Ei.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const aA=new Tt;class f1{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new tm(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Tt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let t=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;We.PREFER_ENV===Na.WEBGL_LEGACY&&(t=null,i=null),t?e.drawBuffers=n=>t.drawBuffersWEBGL(n):(this.hasMRT=!1,e.drawBuffers=()=>{}),i||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,t,i=0){const{gl:n}=this;if(e){const r=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,n.bindFramebuffer(n.FRAMEBUFFER,r.framebuffer)),r.mipLevel!==i&&(e.dirtyId++,e.dirtyFormat++,r.mipLevel=i),r.dirtyId!==e.dirtyId&&(r.dirtyId=e.dirtyId,r.dirtyFormat!==e.dirtyFormat?(r.dirtyFormat=e.dirtyFormat,r.dirtySize=e.dirtySize,this.updateFramebuffer(e,i)):r.dirtySize!==e.dirtySize&&(r.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let a=0;a>i,o=t.height>>i,h=a/t.width;this.setViewport(t.x*h,t.y*h,a,o)}else{const a=e.width>>i,o=e.height>>i;this.setViewport(0,0,a,o)}}else this.current&&(this.current=null,n.bindFramebuffer(n.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,t,i,n){const r=this.viewport;e=Math.round(e),t=Math.round(t),i=Math.round(i),n=Math.round(n),(r.width!==i||r.height!==n||r.x!==e||r.y!==t)&&(r.x=e,r.y=t,r.width=i,r.height=n,this.gl.viewport(e,t,i,n))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(e,t,i,n,r=Vf.COLOR|Vf.DEPTH){const{gl:a}=this;a.clearColor(e,t,i,n),a.clear(r)}initFramebuffer(e){const{gl:t}=this,i=new rA(t.createFramebuffer());return i.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=i,this.managedFramebuffers.push(e),e.disposeRunner.add(this),i}resizeFramebuffer(e){const{gl:t}=this,i=e.glFramebuffers[this.CONTEXT_UID];if(i.stencil){t.bindRenderbuffer(t.RENDERBUFFER,i.stencil);let a;this.renderer.context.webGLVersion===1?a=t.DEPTH_STENCIL:e.depth&&e.stencil?a=t.DEPTH24_STENCIL8:e.depth?a=t.DEPTH_COMPONENT24:a=t.STENCIL_INDEX8,i.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,i.multisample,a,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,a,e.width,e.height)}const n=e.colorTextures;let r=n.length;t.drawBuffers||(r=Math.min(r,1));for(let a=0;a1&&this.canMultisampleFramebuffer(e)?n.msaaBuffer=n.msaaBuffer||i.createRenderbuffer():n.msaaBuffer&&(i.deleteRenderbuffer(n.msaaBuffer),n.msaaBuffer=null,n.blitFramebuffer&&(n.blitFramebuffer.dispose(),n.blitFramebuffer=null));const o=[];for(let h=0;h1&&i.drawBuffers(o),e.depthTexture&&this.writeDepthTexture){const h=e.depthTexture;this.renderer.texture.bind(h,0),i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,t)}if((e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)){n.stencil=n.stencil||i.createRenderbuffer();let h,l;this.renderer.context.webGLVersion===1?(h=i.DEPTH_STENCIL_ATTACHMENT,l=i.DEPTH_STENCIL):e.depth&&e.stencil?(h=i.DEPTH_STENCIL_ATTACHMENT,l=i.DEPTH24_STENCIL8):e.depth?(h=i.DEPTH_ATTACHMENT,l=i.DEPTH_COMPONENT24):(h=i.STENCIL_ATTACHMENT,l=i.STENCIL_INDEX8),i.bindRenderbuffer(i.RENDERBUFFER,n.stencil),n.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,n.multisample,l,e.width,e.height):i.renderbufferStorage(i.RENDERBUFFER,l,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,h,i.RENDERBUFFER,n.stencil)}else n.stencil&&(i.deleteRenderbuffer(n.stencil),n.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){const{msaaSamples:t}=this;let i=Ei.NONE;if(e<=1||t===null)return i;for(let n=0;n=0&&this.managedFramebuffers.splice(r,1),e.disposeRunner.remove(this),t||(n.deleteFramebuffer(i.framebuffer),i.msaaBuffer&&n.deleteRenderbuffer(i.msaaBuffer),i.stencil&&n.deleteRenderbuffer(i.stencil)),i.blitFramebuffer&&this.disposeFramebuffer(i.blitFramebuffer,t)}disposeAll(e){const t=this.managedFramebuffers;this.managedFramebuffers=[];for(let i=0;ii.createVertexArrayOES(),e.bindVertexArray=n=>i.bindVertexArrayOES(n),e.deleteVertexArray=n=>i.deleteVertexArrayOES(n)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(t.webGLVersion!==2){const i=e.getExtension("ANGLE_instanced_arrays");i?(e.vertexAttribDivisor=(n,r)=>i.vertexAttribDivisorANGLE(n,r),e.drawElementsInstanced=(n,r,a,o,h)=>i.drawElementsInstancedANGLE(n,r,a,o,h),e.drawArraysInstanced=(n,r,a,o)=>i.drawArraysInstancedANGLE(n,r,a,o)):this.hasInstance=!1}this.canUseUInt32ElementIndex=t.webGLVersion===2||!!t.extensions.uint32ElementIndex}bind(e,t){t=t||this.renderer.shader.shader;const{gl:i}=this;let n=e.glVertexArrayObjects[this.CONTEXT_UID],r=!1;n||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=n={},r=!0);const a=n[t.program.id]||this.initGeometryVao(e,t,r);this._activeGeometry=e,this._activeVao!==a&&(this._activeVao=a,this.hasVao?i.bindVertexArray(a):this.activateVao(e,t.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,t=this.renderer.buffer;for(let i=0;i"u"?.5:t,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,t){t===void 0&&(t=e);const i=this.mapCoord;for(let n=0;n0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}pb.extension={type:He.RendererSystem,name:"mask"};tt.add(pb);class gb{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;const n=this.getStackLength();n!==i&&(n===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const sv=new li,nv=[],vb=class $c extends gb{constructor(e){super(e),this.glConst=We.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:n}=this,r=n.renderTexture,a=i.getBounds(!0,nv.pop()??new Tt);this.roundFrameToPixels(a,r.current?r.current.resolution:n.resolution,r.sourceFrame,r.destinationFrame,n.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:i,c:n,d:r}=e;return(Math.abs(i)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(r)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||$c.isMatrixRotated(t.worldTransform)||$c.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const i=e._scissorRectLocal;return i.width>0&&i.height>0}roundFrameToPixels(e,t,i,n,r){$c.isMatrixRotated(r)||(r=r?sv.copyFrom(r):sv.identity(),r.translate(-i.x,-i.y).scale(n.width/i.width,n.height/i.height).translate(n.x,n.y),this.renderer.filter.transformAABB(r,e),e.fit(n),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&nv.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};vb.extension={type:He.RendererSystem,name:"scissor"};let uE=vb;tt.add(uE);class yb extends gb{constructor(e){super(e),this.glConst=We.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){const t=e.maskObject,{gl:i}=this.renderer,n=e._stencilCounter;n===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),e._stencilCounter++;const r=e._colorMask;r!==0&&(e._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,n,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,r!==0&&(e._colorMask=r,i.colorMask((r&1)!==0,(r&2)!==0,(r&4)!==0,(r&8)!==0)),this._useCurrent()}pop(e){const t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,n=i?i._colorMask:15;n!==0&&(i._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,n!==0&&(i._colorMask=n,t.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)),this._useCurrent()}}_useCurrent(){const e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}}yb.extension={type:He.RendererSystem,name:"stencil"};tt.add(yb);class xb{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return kt("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return kt("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return kt("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){const e=this.rendererPlugins;for(const t in e)this.plugins[t]=new e[t](this.renderer)}destroy(){for(const e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}}xb.extension={type:[He.RendererSystem,He.CanvasRendererSystem],name:"_plugin"};tt.add(xb);class bb{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new li,this.transform=null}update(e,t,i,n){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,i,n),this.transform&&this.projectionMatrix.append(this.transform);const r=this.renderer;r.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,r.globalUniforms.update(),r.shader.shader&&r.shader.syncUniformGroup(r.shader.shader.uniforms.globals)}calculateProjection(e,t,i,n){const r=this.projectionMatrix,a=n?-1:1;r.identity(),r.a=1/t.width*2,r.d=a*(1/t.height*2),r.tx=-1-t.x*r.a,r.ty=-a-t.y*r.d}setTransform(e){}destroy(){this.renderer=null}}bb.extension={type:He.RendererSystem,name:"projection"};tt.add(bb);const dE=new mp,rv=new Tt;class wb{constructor(e){this.renderer=e,this._tempMatrix=new li}generateTexture(e,t){const{region:i,...n}=t||{},r=(i==null?void 0:i.copyTo(rv))||e.getLocalBounds(rv,!0),a=n.resolution||this.renderer.resolution;r.width=Math.max(r.width,1/a),r.height=Math.max(r.height,1/a),n.width=r.width,n.height=r.height,n.resolution=a,n.multisample??(n.multisample=this.renderer.multisample);const o=Ua.create(n);this._tempMatrix.tx=-r.x,this._tempMatrix.ty=-r.y;const h=e.transform;return e.transform=dE,this.renderer.render(e,{renderTexture:o,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=h,o}destroy(){}}wb.extension={type:[He.RendererSystem,He.CanvasRendererSystem],name:"textureGenerator"};tt.add(wb);const oa=new Tt,zo=new Tt;class Sb{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Tt,this.destinationFrame=new Tt,this.viewportFrame=new Tt}contextChange(){var t;const e=(t=this.renderer)==null?void 0:t.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}bind(e=null,t,i){const n=this.renderer;this.current=e;let r,a,o;e?(r=e.baseTexture,o=r.resolution,t||(oa.width=e.frame.width,oa.height=e.frame.height,t=oa),i||(zo.x=e.frame.x,zo.y=e.frame.y,zo.width=t.width,zo.height=t.height,i=zo),a=r.framebuffer):(o=n.resolution,t||(oa.width=n._view.screen.width,oa.height=n._view.screen.height,t=oa),i||(i=oa,i.width=t.width,i.height=t.height));const h=this.viewportFrame;h.x=i.x*o,h.y=i.y*o,h.width=i.width*o,h.height=i.height*o,e||(h.y=n.view.height-(h.y+h.height)),h.ceil(),this.renderer.framebuffer.bind(a,h),this.renderer.projection.update(i,t,o,!a),e?this.renderer.mask.setMaskStack(r.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(i)}clear(e,t){const i=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,n=jt.shared.setValue(e||i);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&n.premultiply(n.alpha);const r=this.destinationFrame,a=this.current?this.current.baseTexture:this.renderer._view.screen,o=r.width!==a.width||r.height!==a.height;if(o){let{x:h,y:l,width:c,height:u}=this.viewportFrame;h=Math.round(h),l=Math.round(l),c=Math.round(c),u=Math.round(u),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(h,l,c,u)}this.renderer.framebuffer.clear(n.red,n.green,n.blue,n.alpha,t),o&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Sb.extension={type:He.RendererSystem,name:"renderTexture"};tt.add(Sb);class fE{constructor(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function mE(s,e){const t={},i=e.getProgramParameter(s,e.ACTIVE_ATTRIBUTES);for(let n=0;nl>c?1:-1);for(let l=0;l0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}}p1.extension={type:He.RendererSystem,name:"mask"};tt.add(p1);class g1{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;const n=this.getStackLength();n!==i&&(n===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const sv=new li,nv=[],v1=class $c extends g1{constructor(e){super(e),this.glConst=We.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:n}=this,r=n.renderTexture,a=i.getBounds(!0,nv.pop()??new Tt);this.roundFrameToPixels(a,r.current?r.current.resolution:n.resolution,r.sourceFrame,r.destinationFrame,n.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:i,c:n,d:r}=e;return(Math.abs(i)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(r)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||$c.isMatrixRotated(t.worldTransform)||$c.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const i=e._scissorRectLocal;return i.width>0&&i.height>0}roundFrameToPixels(e,t,i,n,r){$c.isMatrixRotated(r)||(r=r?sv.copyFrom(r):sv.identity(),r.translate(-i.x,-i.y).scale(n.width/i.width,n.height/i.height).translate(n.x,n.y),this.renderer.filter.transformAABB(r,e),e.fit(n),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&nv.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};v1.extension={type:He.RendererSystem,name:"scissor"};let uA=v1;tt.add(uA);class y1 extends g1{constructor(e){super(e),this.glConst=We.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){const t=e.maskObject,{gl:i}=this.renderer,n=e._stencilCounter;n===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),e._stencilCounter++;const r=e._colorMask;r!==0&&(e._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,n,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,r!==0&&(e._colorMask=r,i.colorMask((r&1)!==0,(r&2)!==0,(r&4)!==0,(r&8)!==0)),this._useCurrent()}pop(e){const t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,n=i?i._colorMask:15;n!==0&&(i._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,n!==0&&(i._colorMask=n,t.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)),this._useCurrent()}}_useCurrent(){const e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}}y1.extension={type:He.RendererSystem,name:"stencil"};tt.add(y1);class x1{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return kt("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return kt("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return kt("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){const e=this.rendererPlugins;for(const t in e)this.plugins[t]=new e[t](this.renderer)}destroy(){for(const e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}}x1.extension={type:[He.RendererSystem,He.CanvasRendererSystem],name:"_plugin"};tt.add(x1);class b1{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new li,this.transform=null}update(e,t,i,n){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,i,n),this.transform&&this.projectionMatrix.append(this.transform);const r=this.renderer;r.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,r.globalUniforms.update(),r.shader.shader&&r.shader.syncUniformGroup(r.shader.shader.uniforms.globals)}calculateProjection(e,t,i,n){const r=this.projectionMatrix,a=n?-1:1;r.identity(),r.a=1/t.width*2,r.d=a*(1/t.height*2),r.tx=-1-t.x*r.a,r.ty=-a-t.y*r.d}setTransform(e){}destroy(){this.renderer=null}}b1.extension={type:He.RendererSystem,name:"projection"};tt.add(b1);const dA=new mp,rv=new Tt;class w1{constructor(e){this.renderer=e,this._tempMatrix=new li}generateTexture(e,t){const{region:i,...n}=t||{},r=(i==null?void 0:i.copyTo(rv))||e.getLocalBounds(rv,!0),a=n.resolution||this.renderer.resolution;r.width=Math.max(r.width,1/a),r.height=Math.max(r.height,1/a),n.width=r.width,n.height=r.height,n.resolution=a,n.multisample??(n.multisample=this.renderer.multisample);const o=Ua.create(n);this._tempMatrix.tx=-r.x,this._tempMatrix.ty=-r.y;const h=e.transform;return e.transform=dA,this.renderer.render(e,{renderTexture:o,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=h,o}destroy(){}}w1.extension={type:[He.RendererSystem,He.CanvasRendererSystem],name:"textureGenerator"};tt.add(w1);const oa=new Tt,zo=new Tt;class S1{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Tt,this.destinationFrame=new Tt,this.viewportFrame=new Tt}contextChange(){var t;const e=(t=this.renderer)==null?void 0:t.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}bind(e=null,t,i){const n=this.renderer;this.current=e;let r,a,o;e?(r=e.baseTexture,o=r.resolution,t||(oa.width=e.frame.width,oa.height=e.frame.height,t=oa),i||(zo.x=e.frame.x,zo.y=e.frame.y,zo.width=t.width,zo.height=t.height,i=zo),a=r.framebuffer):(o=n.resolution,t||(oa.width=n._view.screen.width,oa.height=n._view.screen.height,t=oa),i||(i=oa,i.width=t.width,i.height=t.height));const h=this.viewportFrame;h.x=i.x*o,h.y=i.y*o,h.width=i.width*o,h.height=i.height*o,e||(h.y=n.view.height-(h.y+h.height)),h.ceil(),this.renderer.framebuffer.bind(a,h),this.renderer.projection.update(i,t,o,!a),e?this.renderer.mask.setMaskStack(r.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(i)}clear(e,t){const i=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,n=jt.shared.setValue(e||i);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&n.premultiply(n.alpha);const r=this.destinationFrame,a=this.current?this.current.baseTexture:this.renderer._view.screen,o=r.width!==a.width||r.height!==a.height;if(o){let{x:h,y:l,width:c,height:u}=this.viewportFrame;h=Math.round(h),l=Math.round(l),c=Math.round(c),u=Math.round(u),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(h,l,c,u)}this.renderer.framebuffer.clear(n.red,n.green,n.blue,n.alpha,t),o&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}S1.extension={type:He.RendererSystem,name:"renderTexture"};tt.add(S1);class fA{constructor(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function mA(s,e){const t={},i=e.getProgramParameter(s,e.ACTIVE_ATTRIBUTES);for(let n=0;nl>c?1:-1);for(let l=0;l({data:r,offset:0,dataLen:0,dirty:0}));let t=0,i=0,n=0;for(let r=0;r1&&(t=Math.max(t,16)*a.data.size),a.dataLen=t,i%t!==0&&i<16){const o=i%t%16;i+=o,n+=o}i+t>16?(n=Math.ceil(n/16)*16,a.offset=n,n+=t,i=t):(a.offset=n,i+=t,n+=t)}return n=Math.ceil(n/16)*16,{uboElements:e,size:n}}function bE(s,e){const t=[];for(const i in s)e[i]&&t.push(e[i]);return t.sort((i,n)=>i.index-n.index),t}function wE(s,e){if(!s.autoManage)return{size:0,syncFunc:vE};const t=bE(s.uniforms,e),{uboElements:i,size:n}=xE(t),r=[` + `},M1={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function xA(s){const e=s.map(r=>({data:r,offset:0,dataLen:0,dirty:0}));let t=0,i=0,n=0;for(let r=0;r1&&(t=Math.max(t,16)*a.data.size),a.dataLen=t,i%t!==0&&i<16){const o=i%t%16;i+=o,n+=o}i+t>16?(n=Math.ceil(n/16)*16,a.offset=n,n+=t,i=t):(a.offset=n,i+=t,n+=t)}return n=Math.ceil(n/16)*16,{uboElements:e,size:n}}function bA(s,e){const t=[];for(const i in s)e[i]&&t.push(e[i]);return t.sort((i,n)=>i.index-n.index),t}function wA(s,e){if(!s.autoManage)return{size:0,syncFunc:vA};const t=bA(s.uniforms,e),{uboElements:i,size:n}=xA(t),r=[` var v = null; var v2 = null; var cv = null; @@ -484,7 +484,7 @@ void main(void) var gl = renderer.gl var index = 0; var data = buffer.data; - `];for(let a=0;a1){const u=nb(o.data.type),d=Math.max(Mb[o.data.type]/16,1),f=u/d,p=(4-f%4)%4;r.push(` + `];for(let a=0;a1){const u=n1(o.data.type),d=Math.max(M1[o.data.type]/16,1),f=u/d,p=(4-f%4)%4;r.push(` cv = ud.${l}.value; v = uv.${l}; offset = ${o.offset/4}; @@ -500,7 +500,7 @@ void main(void) offset += ${p}; } - `)}else{const u=yE[o.data.type];r.push(` + `)}else{const u=yA[o.data.type];r.push(` cv = ud.${l}.value; v = uv.${l}; offset = ${o.offset/4}; @@ -508,7 +508,7 @@ void main(void) `)}}return r.push(` renderer.buffer.update(buffer); `),{size:n,syncFunc:new Function("ud","uv","renderer","syncData","buffer",r.join(` -`))}}let SE=0;const gc={textureCount:0,uboCount:0};class _b{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=SE++}systemCheck(){if(!zA())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const i=e.program,n=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(n.program)),t||(gc.textureCount=0,gc.uboCount=0,this.syncUniformGroup(e.uniformGroup,gc)),n}setUniforms(e){const t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){const i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=$A(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;const n=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),n(i.uniformData,e.uniforms,this.renderer,gc,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){const{gl:n}=this.renderer;this.renderer.buffer.bind(e.buffer);const r=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,n.uniformBlockBinding(t.program,r,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(e,this.shader.program.uniformData,"ubo");let o=this._uboCache[a];if(o||(o=this._uboCache[a]=wE(e,this.shader.program.uniformData)),e.autoManage){const h=new Float32Array(o.size/4);e.buffer.update(h)}return t.uniformGroups[e.id]=o.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){const n=e.uniforms,r=[`${i}-`];for(const a in n)r.push(a),t[a]&&r.push(t[a].type);return r.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,i=e.program,n=gE(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=n,n}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}_b.extension={type:He.RendererSystem,name:"shader"};tt.add(_b);class bh{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.3 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}bh.defaultOptions={hello:!1},bh.extension={type:[He.RendererSystem,He.CanvasRendererSystem],name:"startup"};tt.add(bh);function ME(s,e=[]){return e[dt.NORMAL]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[dt.ADD]=[s.ONE,s.ONE],e[dt.MULTIPLY]=[s.DST_COLOR,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[dt.SCREEN]=[s.ONE,s.ONE_MINUS_SRC_COLOR,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[dt.OVERLAY]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[dt.DARKEN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[dt.LIGHTEN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[dt.COLO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UNC_ADD],e}const _E=0,TE=1,AE=2,EE=3,CE=4,IE=5,Tb=class im{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=dt.NONE,this._blendEq=!1,this.map=[],this.map[_E]=this.setBlend,this.map[TE]=this.setOffset,this.map[AE]=this.setCullFace,this.map[EE]=this.setDepthTest,this.map[CE]=this.setFrontFace,this.map[IE]=this.setDepthMask,this.checks=[],this.defaultState=new Un,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=ME(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,i=0;for(;t;)t&1&&this.map[i].call(this,!!(e.data&1<>1,i++;this.stateId=e.data}for(let t=0;te.systems[n]),i=[...t,...Object.keys(e.systems).filter(n=>!t.includes(n))];for(const n of i)this.addSystem(e.systems[n],n)}addRunners(...e){e.forEach(t=>{this.runners[t]=new on(t)})}addSystem(e,t){const i=new e(this);if(this[t])throw new Error(`Whoops! The name "${t}" is already in use`);this[t]=i,this._systemsHash[t]=i;for(const n in this.runners)this.runners[n].add(i);return this}emitWithCustomOptions(e,t){const i=Object.keys(this._systemsHash);e.items.forEach(n=>{const r=i.find(a=>this._systemsHash[a]===n);n[e.name](t[r])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const nl=class Gc{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=Gc.defaultMaxIdle,this.checkCountMax=Gc.defaultCheckCountMax,this.mode=Gc.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==hp.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let i=!1;for(let n=0;nthis.maxIdle&&(e.destroyTexture(r,!0),t[n]=null,i=!0)}if(i){let n=0;for(let r=0;r=0;n--)this.unload(e.children[n])}destroy(){this.renderer=null}};nl.defaultMode=hp.AUTO,nl.defaultMaxIdle=3600,nl.defaultCheckCountMax=600,nl.extension={type:He.RendererSystem,name:"textureGC"};let pa=nl;tt.add(pa);class tf{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=et.UNSIGNED_BYTE,this.internalFormat=Ne.RGBA,this.samplerType=0}}function kE(s){let e;return"WebGL2RenderingContext"in globalThis&&s instanceof globalThis.WebGL2RenderingContext?e={[s.RGB]:ze.FLOAT,[s.RGBA]:ze.FLOAT,[s.ALPHA]:ze.FLOAT,[s.LUMINANCE]:ze.FLOAT,[s.LUMINANCE_ALPHA]:ze.FLOAT,[s.R8]:ze.FLOAT,[s.R8_SNORM]:ze.FLOAT,[s.RG8]:ze.FLOAT,[s.RG8_SNORM]:ze.FLOAT,[s.RGB8]:ze.FLOAT,[s.RGB8_SNORM]:ze.FLOAT,[s.RGB565]:ze.FLOAT,[s.RGBA4]:ze.FLOAT,[s.RGB5_A1]:ze.FLOAT,[s.RGBA8]:ze.FLOAT,[s.RGBA8_SNORM]:ze.FLOAT,[s.RGB10_A2]:ze.FLOAT,[s.RGB10_A2UI]:ze.FLOAT,[s.SRGB8]:ze.FLOAT,[s.SRGB8_ALPHA8]:ze.FLOAT,[s.R16F]:ze.FLOAT,[s.RG16F]:ze.FLOAT,[s.RGB16F]:ze.FLOAT,[s.RGBA16F]:ze.FLOAT,[s.R32F]:ze.FLOAT,[s.RG32F]:ze.FLOAT,[s.RGB32F]:ze.FLOAT,[s.RGBA32F]:ze.FLOAT,[s.R11F_G11F_B10F]:ze.FLOAT,[s.RGB9_E5]:ze.FLOAT,[s.R8I]:ze.INT,[s.R8UI]:ze.UINT,[s.R16I]:ze.INT,[s.R16UI]:ze.UINT,[s.R32I]:ze.INT,[s.R32UI]:ze.UINT,[s.RG8I]:ze.INT,[s.RG8UI]:ze.UINT,[s.RG16I]:ze.INT,[s.RG16UI]:ze.UINT,[s.RG32I]:ze.INT,[s.RG32UI]:ze.UINT,[s.RGB8I]:ze.INT,[s.RGB8UI]:ze.UINT,[s.RGB16I]:ze.INT,[s.RGB16UI]:ze.UINT,[s.RGB32I]:ze.INT,[s.RGB32UI]:ze.UINT,[s.RGBA8I]:ze.INT,[s.RGBA8UI]:ze.UINT,[s.RGBA16I]:ze.INT,[s.RGBA16UI]:ze.UINT,[s.RGBA32I]:ze.INT,[s.RGBA32UI]:ze.UINT,[s.DEPTH_COMPONENT16]:ze.FLOAT,[s.DEPTH_COMPONENT24]:ze.FLOAT,[s.DEPTH_COMPONENT32F]:ze.FLOAT,[s.DEPTH_STENCIL]:ze.FLOAT,[s.DEPTH24_STENCIL8]:ze.FLOAT,[s.DEPTH32F_STENCIL8]:ze.FLOAT}:e={[s.RGB]:ze.FLOAT,[s.RGBA]:ze.FLOAT,[s.ALPHA]:ze.FLOAT,[s.LUMINANCE]:ze.FLOAT,[s.LUMINANCE_ALPHA]:ze.FLOAT,[s.DEPTH_STENCIL]:ze.FLOAT},e}function FE(s){let e;return"WebGL2RenderingContext"in globalThis&&s instanceof globalThis.WebGL2RenderingContext?e={[et.UNSIGNED_BYTE]:{[Ne.RGBA]:s.RGBA8,[Ne.RGB]:s.RGB8,[Ne.RG]:s.RG8,[Ne.RED]:s.R8,[Ne.RGBA_INTEGER]:s.RGBA8UI,[Ne.RGB_INTEGER]:s.RGB8UI,[Ne.RG_INTEGER]:s.RG8UI,[Ne.RED_INTEGER]:s.R8UI,[Ne.ALPHA]:s.ALPHA,[Ne.LUMINANCE]:s.LUMINANCE,[Ne.LUMINANCE_ALPHA]:s.LUMINANCE_ALPHA},[et.BYTE]:{[Ne.RGBA]:s.RGBA8_SNORM,[Ne.RGB]:s.RGB8_SNORM,[Ne.RG]:s.RG8_SNORM,[Ne.RED]:s.R8_SNORM,[Ne.RGBA_INTEGER]:s.RGBA8I,[Ne.RGB_INTEGER]:s.RGB8I,[Ne.RG_INTEGER]:s.RG8I,[Ne.RED_INTEGER]:s.R8I},[et.UNSIGNED_SHORT]:{[Ne.RGBA_INTEGER]:s.RGBA16UI,[Ne.RGB_INTEGER]:s.RGB16UI,[Ne.RG_INTEGER]:s.RG16UI,[Ne.RED_INTEGER]:s.R16UI,[Ne.DEPTH_COMPONENT]:s.DEPTH_COMPONENT16},[et.SHORT]:{[Ne.RGBA_INTEGER]:s.RGBA16I,[Ne.RGB_INTEGER]:s.RGB16I,[Ne.RG_INTEGER]:s.RG16I,[Ne.RED_INTEGER]:s.R16I},[et.UNSIGNED_INT]:{[Ne.RGBA_INTEGER]:s.RGBA32UI,[Ne.RGB_INTEGER]:s.RGB32UI,[Ne.RG_INTEGER]:s.RG32UI,[Ne.RED_INTEGER]:s.R32UI,[Ne.DEPTH_COMPONENT]:s.DEPTH_COMPONENT24},[et.INT]:{[Ne.RGBA_INTEGER]:s.RGBA32I,[Ne.RGB_INTEGER]:s.RGB32I,[Ne.RG_INTEGER]:s.RG32I,[Ne.RED_INTEGER]:s.R32I},[et.FLOAT]:{[Ne.RGBA]:s.RGBA32F,[Ne.RGB]:s.RGB32F,[Ne.RG]:s.RG32F,[Ne.RED]:s.R32F,[Ne.DEPTH_COMPONENT]:s.DEPTH_COMPONENT32F},[et.HALF_FLOAT]:{[Ne.RGBA]:s.RGBA16F,[Ne.RGB]:s.RGB16F,[Ne.RG]:s.RG16F,[Ne.RED]:s.R16F},[et.UNSIGNED_SHORT_5_6_5]:{[Ne.RGB]:s.RGB565},[et.UNSIGNED_SHORT_4_4_4_4]:{[Ne.RGBA]:s.RGBA4},[et.UNSIGNED_SHORT_5_5_5_1]:{[Ne.RGBA]:s.RGB5_A1},[et.UNSIGNED_INT_2_10_10_10_REV]:{[Ne.RGBA]:s.RGB10_A2,[Ne.RGBA_INTEGER]:s.RGB10_A2UI},[et.UNSIGNED_INT_10F_11F_11F_REV]:{[Ne.RGB]:s.R11F_G11F_B10F},[et.UNSIGNED_INT_5_9_9_9_REV]:{[Ne.RGB]:s.RGB9_E5},[et.UNSIGNED_INT_24_8]:{[Ne.DEPTH_STENCIL]:s.DEPTH24_STENCIL8},[et.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ne.DEPTH_STENCIL]:s.DEPTH32F_STENCIL8}}:e={[et.UNSIGNED_BYTE]:{[Ne.RGBA]:s.RGBA,[Ne.RGB]:s.RGB,[Ne.ALPHA]:s.ALPHA,[Ne.LUMINANCE]:s.LUMINANCE,[Ne.LUMINANCE_ALPHA]:s.LUMINANCE_ALPHA},[et.UNSIGNED_SHORT_5_6_5]:{[Ne.RGB]:s.RGB},[et.UNSIGNED_SHORT_4_4_4_4]:{[Ne.RGBA]:s.RGBA},[et.UNSIGNED_SHORT_5_5_5_1]:{[Ne.RGBA]:s.RGBA}},e}class Ab{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new yt,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=FE(e),this.samplerTypes=kE(e);const t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(let n=0;n=0;--r){const a=t[r];a&&a._glTextures[n].samplerType!==ze.FLOAT&&this.renderer.texture.unbind(a)}}initTexture(e){const t=new tf(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),t}initTextureType(e,t){var i;t.internalFormat=((i=this.internalFormats[e.type])==null?void 0:i[e.format])??e.format,t.samplerType=this.samplerTypes[t.internalFormat]??ze.FLOAT,this.webGLVersion===2&&e.type===et.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type}updateTexture(e){var n;const t=e._glTextures[this.CONTEXT_UID];if(!t)return;const i=this.renderer;if(this.initTextureType(e,t),(n=e.resource)==null?void 0:n.upload(i,e,t))t.samplerType!==ze.FLOAT&&(this.hasIntegerTextures=!0);else{const r=e.realWidth,a=e.realHeight,o=i.gl;(t.width!==r||t.height!==a||t.dirtyId<0)&&(t.width=r,t.height=a,o.texImage2D(e.target,0,t.internalFormat,r,a,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}destroyTexture(e,t){const{gl:i}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),i.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){const n=this.managedTextures.indexOf(e);n!==-1&&yo(this.managedTextures,n,1)}}updateTextureStyle(e){var i;const t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===Ys.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=an.CLAMP:t.wrapMode=e.wrapMode,(i=e.resource)!=null&&i.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)}setStyle(e,t){const i=this.gl;if(t.mipmap&&e.mipmap!==Ys.ON_MANUAL&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,t.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===sn.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);const n=this.renderer.context.extensions.anisotropicFiltering;if(n&&e.anisotropicLevel>0&&e.scaleMode===sn.LINEAR){const r=Math.min(e.anisotropicLevel,i.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,n.TEXTURE_MAX_ANISOTROPY_EXT,r)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===sn.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===sn.LINEAR?i.LINEAR:i.NEAREST)}destroy(){this.renderer=null}}Ab.extension={type:He.RendererSystem,name:"texture"};tt.add(Ab);class Eb{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glTransformFeedbacks[i]||this.createGLTransformFeedback(e);t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,n)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,t){const{gl:i,renderer:n}=this;t&&n.shader.bind(t),i.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:t,renderer:i,CONTEXT_UID:n}=this,r=t.createTransformFeedback();e._glTransformFeedbacks[n]=r,t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,r);for(let a=0;a(s[s.INTERACTION=50]="INTERACTION",s[s.HIGH=25]="HIGH",s[s.NORMAL=0]="NORMAL",s[s.LOW=-25]="LOW",s[s.UTILITY=-50]="UTILITY",s))(Oa||{});class sf{constructor(e,t=null,i=0,n=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=i,this.once=n}match(e,t=null){return this.fn===e&&this.context===t}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const t=this.next;return this.next=e?null:t,this.previous=null,t}}const Cb=class Ms{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new sf(null,null,1/0),this.deltaMS=1/Ms.targetFPMS,this.elapsedMS=1/Ms.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,i=Oa.NORMAL){return this._addListener(new sf(e,t,i))}addOnce(e,t,i=Oa.NORMAL){return this._addListener(new sf(e,t,i,!0))}_addListener(e){let t=this._head.next,i=this._head;if(!t)e.connect(i);else{for(;t;){if(e.priority>t.priority){e.connect(i);break}i=t,t=t.next}e.previous||e.connect(i)}return this._startIfPossible(),this}remove(e,t){let i=this._head.next;for(;i;)i.match(e,t)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const r=e-this._lastFrame|0;if(r{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?ds.shared:new ds,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}Ib.extension=He.Application;tt.add(Ib);const Rb=[];tt.handleByList(He.Renderer,Rb);function OE(s){for(const e of Rb)if(e.test(s))return new e(s);throw new Error("Unable to auto-detect a suitable renderer.")}var BE=`attribute vec2 aVertexPosition; +`))}}let SA=0;const gc={textureCount:0,uboCount:0};class _1{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=SA++}systemCheck(){if(!zT())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const i=e.program,n=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(n.program)),t||(gc.textureCount=0,gc.uboCount=0,this.syncUniformGroup(e.uniformGroup,gc)),n}setUniforms(e){const t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){const i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=$T(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;const n=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),n(i.uniformData,e.uniforms,this.renderer,gc,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){const{gl:n}=this.renderer;this.renderer.buffer.bind(e.buffer);const r=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,n.uniformBlockBinding(t.program,r,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(e,this.shader.program.uniformData,"ubo");let o=this._uboCache[a];if(o||(o=this._uboCache[a]=wA(e,this.shader.program.uniformData)),e.autoManage){const h=new Float32Array(o.size/4);e.buffer.update(h)}return t.uniformGroups[e.id]=o.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){const n=e.uniforms,r=[`${i}-`];for(const a in n)r.push(a),t[a]&&r.push(t[a].type);return r.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,i=e.program,n=gA(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=n,n}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}_1.extension={type:He.RendererSystem,name:"shader"};tt.add(_1);class bh{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.3 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}bh.defaultOptions={hello:!1},bh.extension={type:[He.RendererSystem,He.CanvasRendererSystem],name:"startup"};tt.add(bh);function MA(s,e=[]){return e[dt.NORMAL]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[dt.ADD]=[s.ONE,s.ONE],e[dt.MULTIPLY]=[s.DST_COLOR,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[dt.SCREEN]=[s.ONE,s.ONE_MINUS_SRC_COLOR,s.ONE,s.ONE_MINUS_SRC_ALPHA],e[dt.OVERLAY]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[dt.DARKEN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[dt.LIGHTEN]=[s.ONE,s.ONE_MINUS_SRC_ALPHA],e[dt.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s.FUNC_ADD],e}const _A=0,TA=1,AA=2,EA=3,CA=4,IA=5,T1=class im{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=dt.NONE,this._blendEq=!1,this.map=[],this.map[_A]=this.setBlend,this.map[TA]=this.setOffset,this.map[AA]=this.setCullFace,this.map[EA]=this.setDepthTest,this.map[CA]=this.setFrontFace,this.map[IA]=this.setDepthMask,this.checks=[],this.defaultState=new Un,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=MA(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,i=0;for(;t;)t&1&&this.map[i].call(this,!!(e.data&1<>1,i++;this.stateId=e.data}for(let t=0;te.systems[n]),i=[...t,...Object.keys(e.systems).filter(n=>!t.includes(n))];for(const n of i)this.addSystem(e.systems[n],n)}addRunners(...e){e.forEach(t=>{this.runners[t]=new on(t)})}addSystem(e,t){const i=new e(this);if(this[t])throw new Error(`Whoops! The name "${t}" is already in use`);this[t]=i,this._systemsHash[t]=i;for(const n in this.runners)this.runners[n].add(i);return this}emitWithCustomOptions(e,t){const i=Object.keys(this._systemsHash);e.items.forEach(n=>{const r=i.find(a=>this._systemsHash[a]===n);n[e.name](t[r])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}}const nl=class Gc{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=Gc.defaultMaxIdle,this.checkCountMax=Gc.defaultCheckCountMax,this.mode=Gc.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==hp.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let i=!1;for(let n=0;nthis.maxIdle&&(e.destroyTexture(r,!0),t[n]=null,i=!0)}if(i){let n=0;for(let r=0;r=0;n--)this.unload(e.children[n])}destroy(){this.renderer=null}};nl.defaultMode=hp.AUTO,nl.defaultMaxIdle=3600,nl.defaultCheckCountMax=600,nl.extension={type:He.RendererSystem,name:"textureGC"};let pa=nl;tt.add(pa);class tf{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=et.UNSIGNED_BYTE,this.internalFormat=Ne.RGBA,this.samplerType=0}}function kA(s){let e;return"WebGL2RenderingContext"in globalThis&&s instanceof globalThis.WebGL2RenderingContext?e={[s.RGB]:ze.FLOAT,[s.RGBA]:ze.FLOAT,[s.ALPHA]:ze.FLOAT,[s.LUMINANCE]:ze.FLOAT,[s.LUMINANCE_ALPHA]:ze.FLOAT,[s.R8]:ze.FLOAT,[s.R8_SNORM]:ze.FLOAT,[s.RG8]:ze.FLOAT,[s.RG8_SNORM]:ze.FLOAT,[s.RGB8]:ze.FLOAT,[s.RGB8_SNORM]:ze.FLOAT,[s.RGB565]:ze.FLOAT,[s.RGBA4]:ze.FLOAT,[s.RGB5_A1]:ze.FLOAT,[s.RGBA8]:ze.FLOAT,[s.RGBA8_SNORM]:ze.FLOAT,[s.RGB10_A2]:ze.FLOAT,[s.RGB10_A2UI]:ze.FLOAT,[s.SRGB8]:ze.FLOAT,[s.SRGB8_ALPHA8]:ze.FLOAT,[s.R16F]:ze.FLOAT,[s.RG16F]:ze.FLOAT,[s.RGB16F]:ze.FLOAT,[s.RGBA16F]:ze.FLOAT,[s.R32F]:ze.FLOAT,[s.RG32F]:ze.FLOAT,[s.RGB32F]:ze.FLOAT,[s.RGBA32F]:ze.FLOAT,[s.R11F_G11F_B10F]:ze.FLOAT,[s.RGB9_E5]:ze.FLOAT,[s.R8I]:ze.INT,[s.R8UI]:ze.UINT,[s.R16I]:ze.INT,[s.R16UI]:ze.UINT,[s.R32I]:ze.INT,[s.R32UI]:ze.UINT,[s.RG8I]:ze.INT,[s.RG8UI]:ze.UINT,[s.RG16I]:ze.INT,[s.RG16UI]:ze.UINT,[s.RG32I]:ze.INT,[s.RG32UI]:ze.UINT,[s.RGB8I]:ze.INT,[s.RGB8UI]:ze.UINT,[s.RGB16I]:ze.INT,[s.RGB16UI]:ze.UINT,[s.RGB32I]:ze.INT,[s.RGB32UI]:ze.UINT,[s.RGBA8I]:ze.INT,[s.RGBA8UI]:ze.UINT,[s.RGBA16I]:ze.INT,[s.RGBA16UI]:ze.UINT,[s.RGBA32I]:ze.INT,[s.RGBA32UI]:ze.UINT,[s.DEPTH_COMPONENT16]:ze.FLOAT,[s.DEPTH_COMPONENT24]:ze.FLOAT,[s.DEPTH_COMPONENT32F]:ze.FLOAT,[s.DEPTH_STENCIL]:ze.FLOAT,[s.DEPTH24_STENCIL8]:ze.FLOAT,[s.DEPTH32F_STENCIL8]:ze.FLOAT}:e={[s.RGB]:ze.FLOAT,[s.RGBA]:ze.FLOAT,[s.ALPHA]:ze.FLOAT,[s.LUMINANCE]:ze.FLOAT,[s.LUMINANCE_ALPHA]:ze.FLOAT,[s.DEPTH_STENCIL]:ze.FLOAT},e}function FA(s){let e;return"WebGL2RenderingContext"in globalThis&&s instanceof globalThis.WebGL2RenderingContext?e={[et.UNSIGNED_BYTE]:{[Ne.RGBA]:s.RGBA8,[Ne.RGB]:s.RGB8,[Ne.RG]:s.RG8,[Ne.RED]:s.R8,[Ne.RGBA_INTEGER]:s.RGBA8UI,[Ne.RGB_INTEGER]:s.RGB8UI,[Ne.RG_INTEGER]:s.RG8UI,[Ne.RED_INTEGER]:s.R8UI,[Ne.ALPHA]:s.ALPHA,[Ne.LUMINANCE]:s.LUMINANCE,[Ne.LUMINANCE_ALPHA]:s.LUMINANCE_ALPHA},[et.BYTE]:{[Ne.RGBA]:s.RGBA8_SNORM,[Ne.RGB]:s.RGB8_SNORM,[Ne.RG]:s.RG8_SNORM,[Ne.RED]:s.R8_SNORM,[Ne.RGBA_INTEGER]:s.RGBA8I,[Ne.RGB_INTEGER]:s.RGB8I,[Ne.RG_INTEGER]:s.RG8I,[Ne.RED_INTEGER]:s.R8I},[et.UNSIGNED_SHORT]:{[Ne.RGBA_INTEGER]:s.RGBA16UI,[Ne.RGB_INTEGER]:s.RGB16UI,[Ne.RG_INTEGER]:s.RG16UI,[Ne.RED_INTEGER]:s.R16UI,[Ne.DEPTH_COMPONENT]:s.DEPTH_COMPONENT16},[et.SHORT]:{[Ne.RGBA_INTEGER]:s.RGBA16I,[Ne.RGB_INTEGER]:s.RGB16I,[Ne.RG_INTEGER]:s.RG16I,[Ne.RED_INTEGER]:s.R16I},[et.UNSIGNED_INT]:{[Ne.RGBA_INTEGER]:s.RGBA32UI,[Ne.RGB_INTEGER]:s.RGB32UI,[Ne.RG_INTEGER]:s.RG32UI,[Ne.RED_INTEGER]:s.R32UI,[Ne.DEPTH_COMPONENT]:s.DEPTH_COMPONENT24},[et.INT]:{[Ne.RGBA_INTEGER]:s.RGBA32I,[Ne.RGB_INTEGER]:s.RGB32I,[Ne.RG_INTEGER]:s.RG32I,[Ne.RED_INTEGER]:s.R32I},[et.FLOAT]:{[Ne.RGBA]:s.RGBA32F,[Ne.RGB]:s.RGB32F,[Ne.RG]:s.RG32F,[Ne.RED]:s.R32F,[Ne.DEPTH_COMPONENT]:s.DEPTH_COMPONENT32F},[et.HALF_FLOAT]:{[Ne.RGBA]:s.RGBA16F,[Ne.RGB]:s.RGB16F,[Ne.RG]:s.RG16F,[Ne.RED]:s.R16F},[et.UNSIGNED_SHORT_5_6_5]:{[Ne.RGB]:s.RGB565},[et.UNSIGNED_SHORT_4_4_4_4]:{[Ne.RGBA]:s.RGBA4},[et.UNSIGNED_SHORT_5_5_5_1]:{[Ne.RGBA]:s.RGB5_A1},[et.UNSIGNED_INT_2_10_10_10_REV]:{[Ne.RGBA]:s.RGB10_A2,[Ne.RGBA_INTEGER]:s.RGB10_A2UI},[et.UNSIGNED_INT_10F_11F_11F_REV]:{[Ne.RGB]:s.R11F_G11F_B10F},[et.UNSIGNED_INT_5_9_9_9_REV]:{[Ne.RGB]:s.RGB9_E5},[et.UNSIGNED_INT_24_8]:{[Ne.DEPTH_STENCIL]:s.DEPTH24_STENCIL8},[et.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Ne.DEPTH_STENCIL]:s.DEPTH32F_STENCIL8}}:e={[et.UNSIGNED_BYTE]:{[Ne.RGBA]:s.RGBA,[Ne.RGB]:s.RGB,[Ne.ALPHA]:s.ALPHA,[Ne.LUMINANCE]:s.LUMINANCE,[Ne.LUMINANCE_ALPHA]:s.LUMINANCE_ALPHA},[et.UNSIGNED_SHORT_5_6_5]:{[Ne.RGB]:s.RGB},[et.UNSIGNED_SHORT_4_4_4_4]:{[Ne.RGBA]:s.RGBA},[et.UNSIGNED_SHORT_5_5_5_1]:{[Ne.RGBA]:s.RGBA}},e}class A1{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new yt,this.hasIntegerTextures=!1}contextChange(){const e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=FA(e),this.samplerTypes=kA(e);const t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(let n=0;n=0;--r){const a=t[r];a&&a._glTextures[n].samplerType!==ze.FLOAT&&this.renderer.texture.unbind(a)}}initTexture(e){const t=new tf(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),t}initTextureType(e,t){var i;t.internalFormat=((i=this.internalFormats[e.type])==null?void 0:i[e.format])??e.format,t.samplerType=this.samplerTypes[t.internalFormat]??ze.FLOAT,this.webGLVersion===2&&e.type===et.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type}updateTexture(e){var n;const t=e._glTextures[this.CONTEXT_UID];if(!t)return;const i=this.renderer;if(this.initTextureType(e,t),(n=e.resource)==null?void 0:n.upload(i,e,t))t.samplerType!==ze.FLOAT&&(this.hasIntegerTextures=!0);else{const r=e.realWidth,a=e.realHeight,o=i.gl;(t.width!==r||t.height!==a||t.dirtyId<0)&&(t.width=r,t.height=a,o.texImage2D(e.target,0,t.internalFormat,r,a,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}destroyTexture(e,t){const{gl:i}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),i.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){const n=this.managedTextures.indexOf(e);n!==-1&&yo(this.managedTextures,n,1)}}updateTextureStyle(e){var i;const t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===Ys.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=an.CLAMP:t.wrapMode=e.wrapMode,(i=e.resource)!=null&&i.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)}setStyle(e,t){const i=this.gl;if(t.mipmap&&e.mipmap!==Ys.ON_MANUAL&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,t.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===sn.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);const n=this.renderer.context.extensions.anisotropicFiltering;if(n&&e.anisotropicLevel>0&&e.scaleMode===sn.LINEAR){const r=Math.min(e.anisotropicLevel,i.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,n.TEXTURE_MAX_ANISOTROPY_EXT,r)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===sn.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===sn.LINEAR?i.LINEAR:i.NEAREST)}destroy(){this.renderer=null}}A1.extension={type:He.RendererSystem,name:"texture"};tt.add(A1);class E1{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glTransformFeedbacks[i]||this.createGLTransformFeedback(e);t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,n)}unbind(){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,t){const{gl:i,renderer:n}=this;t&&n.shader.bind(t),i.beginTransformFeedback(e)}endTransformFeedback(){const{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){const{gl:t,renderer:i,CONTEXT_UID:n}=this,r=t.createTransformFeedback();e._glTransformFeedbacks[n]=r,t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,r);for(let a=0;a(s[s.INTERACTION=50]="INTERACTION",s[s.HIGH=25]="HIGH",s[s.NORMAL=0]="NORMAL",s[s.LOW=-25]="LOW",s[s.UTILITY=-50]="UTILITY",s))(Oa||{});class sf{constructor(e,t=null,i=0,n=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=i,this.once=n}match(e,t=null){return this.fn===e&&this.context===t}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));const t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const t=this.next;return this.next=e?null:t,this.previous=null,t}}const C1=class Ms{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new sf(null,null,1/0),this.deltaMS=1/Ms.targetFPMS,this.elapsedMS=1/Ms.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,i=Oa.NORMAL){return this._addListener(new sf(e,t,i))}addOnce(e,t,i=Oa.NORMAL){return this._addListener(new sf(e,t,i,!0))}_addListener(e){let t=this._head.next,i=this._head;if(!t)e.connect(i);else{for(;t;){if(e.priority>t.priority){e.connect(i);break}i=t,t=t.next}e.previous||e.connect(i)}return this._startIfPossible(),this}remove(e,t){let i=this._head.next;for(;i;)i.match(e,t)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const r=e-this._lastFrame|0;if(r{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?ds.shared:new ds,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}I1.extension=He.Application;tt.add(I1);const R1=[];tt.handleByList(He.Renderer,R1);function OA(s){for(const e of R1)if(e.test(s))return new e(s);throw new Error("Unable to auto-detect a suitable renderer.")}var BA=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -519,7 +519,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,LE=`attribute vec2 aVertexPosition; +}`,LA=`attribute vec2 aVertexPosition; uniform mat3 projectionMatrix; @@ -545,7 +545,7 @@ void main(void) gl_Position = filterVertexPosition(); vTextureCoord = filterTextureCoord(); } -`;const DE=BE,Pb=LE;class kb{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{const i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}t>=Ei.HIGH?this.multisample=Ei.HIGH:t>=Ei.MEDIUM?this.multisample=Ei.MEDIUM:t>=Ei.LOW?this.multisample=Ei.LOW:this.multisample=Ei.NONE}destroy(){}}kb.extension={type:He.RendererSystem,name:"_multisample"};tt.add(kb);class NE{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Fb{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,n.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:i,CONTEXT_UID:n}=this;if(this.boundBufferBases[t]!==e){const r=e._glBuffers[n]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,r.buffer)}}bindBufferRange(e,t,i){const{gl:n,CONTEXT_UID:r}=this;i=i||0;const a=e._glBuffers[r]||this.createGLBuffer(e);n.bindBufferRange(n.UNIFORM_BUFFER,t||0,a.buffer,i*256,256)}update(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==n.updateID)if(n.updateID=e._updateID,t.bindBuffer(e.type,n.buffer),n.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const r=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;n.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,r)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],n=this.gl;e.disposeRunner.remove(this),i&&(t||n.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let i=0;it.resource).filter(t=>t).map(t=>t.load());return this._load=Promise.all(e).then(()=>{const{realWidth:t,realHeight:i}=this.items[0];return this.resize(t,i),this.update(),Promise.resolve(this)}),this._load}}class UE extends Bb{constructor(e,t){const{width:i,height:n}=t||{};let r,a;Array.isArray(e)?(r=e,a=e.length):a=e,super(a,{width:i,height:n}),r&&this.initFromArray(r,t)}addBaseTextureAt(e,t){if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=vo.TEXTURE_2D_ARRAY}upload(e,t,i){const{length:n,itemDirtyIds:r,items:a}=this,{gl:o}=e;i.dirtyId<0&&o.texImage3D(o.TEXTURE_2D_ARRAY,0,i.internalFormat,this._width,this._height,n,0,t.format,i.type,null);for(let h=0;h0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=vo.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,i){const n=this.itemDirtyIds;for(let r=0;r{if(this.url===null){e(this);return}try{const i=await We.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const n=await i.blob();if(this.destroyed)return;const r=await createImageBitmap(n,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Ni.UNPACK?"premultiply":"none"});if(this.destroyed){r.close();return}this.source=r,this.update(),e(this)}catch(i){if(this.destroyed)return;t(i),this.onError.emit(i)}}),this._load)}upload(e,t,i){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),super.upload(e,t,i)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return lo._EMPTY=lo._EMPTY??We.ADAPTER.createCanvas(0,0),lo._EMPTY}}const nm=class jc extends gr{constructor(e,t){t=t||{},super(We.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.update(),e(this)},jc.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;gr.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,i=e.height;if(!t||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=t*this.scale,r=i*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/i*t,r=this._overrideHeight||this._overrideWidth/t*i),n=Math.round(n),r=Math.round(r);const a=this.source;a.width=n,a.height=r,a._pixiId=`canvas_${Fa()}`,a.getContext("2d").drawImage(e,0,0,t,i,0,0,n,r),this._resolve(),this._resolve=null}}static getSize(e){const t=jc.SVG_SIZE.exec(e),i={};return t&&(i[t[1]]=Math.round(parseFloat(t[3])),i[t[5]]=Math.round(parseFloat(t[7]))),i}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&jc.SVG_XML.test(e)}};nm.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;let rm=nm;class YE extends gr{constructor(e){super(e)}static test(e){return!!globalThis.VideoFrame&&e instanceof globalThis.VideoFrame}}const am=class om extends gr{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const i=document.createElement("video");t.autoLoad!==!1&&i.setAttribute("preload","auto"),t.playsinline!==!1&&(i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline","")),t.muted===!0&&(i.setAttribute("muted",""),i.muted=!0),t.loop===!0&&i.setAttribute("loop",""),t.autoPlay!==!1&&i.setAttribute("autoplay",""),typeof e=="string"&&(e=[e]);const n=e[0].src||e[0];gr.crossOrigin(i,n,t.crossorigin);for(let r=0;r{this.valid?t(this):(this._resolve=t,this._reject=i,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0,!t&&this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._configureAutoUpdate();const e=this.source;e&&(e.removeEventListener("play",this._onPlayStart),e.removeEventListener("pause",this._onPlayStop),e.removeEventListener("seeked",this._onSeeked),e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(ds.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(ds.shared.add(this.update,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(ds.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||om.TYPES.includes(t)}};am.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],am.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let Db=am;Wf.push(lo,cb,XE,Db,YE,rm,yu,VE,UE);class Bl{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?Tt.EMPTY:(e=e||new Tt(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,t){const{a:i,b:n,c:r,d:a,tx:o,ty:h}=e,l=i*t.x+r*t.y+o,c=n*t.x+a*t.y+h;this.minX=Math.min(this.minX,l),this.maxX=Math.max(this.maxX,l),this.minY=Math.min(this.minY,c),this.maxY=Math.max(this.maxY,c)}addQuad(e){let t=this.minX,i=this.minY,n=this.maxX,r=this.maxY,a=e[0],o=e[1];t=an?a:n,r=o>r?o:r,a=e[2],o=e[3],t=an?a:n,r=o>r?o:r,a=e[4],o=e[5],t=an?a:n,r=o>r?o:r,a=e[6],o=e[7],t=an?a:n,r=o>r?o:r,this.minX=t,this.minY=i,this.maxX=n,this.maxY=r}addFrame(e,t,i,n,r){this.addFrameMatrix(e.worldTransform,t,i,n,r)}addFrameMatrix(e,t,i,n,r){const a=e.a,o=e.b,h=e.c,l=e.d,c=e.tx,u=e.ty;let d=this.minX,f=this.minY,p=this.maxX,m=this.maxY,g=a*t+h*i+c,v=o*t+l*i+u;d=gp?g:p,m=v>m?v:m,g=a*n+h*i+c,v=o*n+l*i+u,d=gp?g:p,m=v>m?v:m,g=a*t+h*r+c,v=o*t+l*r+u,d=gp?g:p,m=v>m?v:m,g=a*n+h*r+c,v=o*n+l*r+u,d=gp?g:p,m=v>m?v:m,this.minX=d,this.minY=f,this.maxX=p,this.maxY=m}addVertexData(e,t,i){let n=this.minX,r=this.minY,a=this.maxX,o=this.maxY;for(let h=t;ha?l:a,o=c>o?c:o}this.minX=n,this.minY=r,this.maxX=a,this.maxY=o}addVertices(e,t,i,n){this.addVerticesMatrix(e.worldTransform,t,i,n)}addVerticesMatrix(e,t,i,n,r=0,a=r){const o=e.a,h=e.b,l=e.c,c=e.d,u=e.tx,d=e.ty;let f=this.minX,p=this.minY,m=this.maxX,g=this.maxY;for(let v=i;vn?e.maxX:n,this.maxY=e.maxY>r?e.maxY:r}addBoundsMask(e,t){const i=e.minX>t.minX?e.minX:t.minX,n=e.minY>t.minY?e.minY:t.minY,r=e.maxXl?r:l,this.maxY=a>c?a:c}}addBoundsMatrix(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,t){const i=e.minX>t.x?e.minX:t.x,n=e.minY>t.y?e.minY:t.y,r=e.maxXl?r:l,this.maxY=a>c?a:c}}pad(e=0,t=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)}addFramePad(e,t,i,n,r,a){e-=r,t-=a,i+=r,n+=a,this.minX=this.minXi?this.maxX:i,this.minY=this.minYn?this.maxY:n}}class yi extends jl{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new mp,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Bl,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){const t=Object.keys(e);for(let i=0;i1)for(let t=0;tthis.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const i=this.getChildIndex(e),n=this.getChildIndex(t);this.children[i]=t,this.children[n]=e,this.onChildrenChange(i=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const i=this.getChildIndex(e);yo(this.children,i,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t0&&r<=n){a=this.children.splice(i,r);for(let o=0;o1&&this.children.sort(HE),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e0&&t.height>0))return;let i,n;this.cullArea?(i=this.cullArea,n=this.worldTransform):this._render!==lm.prototype._render&&(i=this.getBounds(!0));const r=e.projection.transform;if(r&&(n?(n=GE.copyFrom(n),n.prepend(r)):n=r),i&&t.intersects(i,n))this._render(e);else if(this.cullArea)return;for(let a=0,o=this.children.length;a=n&&qo.x=r&&qo.y=Ei.HIGH?this.multisample=Ei.HIGH:t>=Ei.MEDIUM?this.multisample=Ei.MEDIUM:t>=Ei.LOW?this.multisample=Ei.LOW:this.multisample=Ei.NONE}destroy(){}}k1.extension={type:He.RendererSystem,name:"_multisample"};tt.add(k1);class NA{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class F1{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,n.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:i,CONTEXT_UID:n}=this;if(this.boundBufferBases[t]!==e){const r=e._glBuffers[n]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,r.buffer)}}bindBufferRange(e,t,i){const{gl:n,CONTEXT_UID:r}=this;i=i||0;const a=e._glBuffers[r]||this.createGLBuffer(e);n.bindBufferRange(n.UNIFORM_BUFFER,t||0,a.buffer,i*256,256)}update(e){const{gl:t,CONTEXT_UID:i}=this,n=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==n.updateID)if(n.updateID=e._updateID,t.bindBuffer(e.type,n.buffer),n.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const r=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;n.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,r)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const i=e._glBuffers[this.CONTEXT_UID],n=this.gl;e.disposeRunner.remove(this),i&&(t||n.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let i=0;it.resource).filter(t=>t).map(t=>t.load());return this._load=Promise.all(e).then(()=>{const{realWidth:t,realHeight:i}=this.items[0];return this.resize(t,i),this.update(),Promise.resolve(this)}),this._load}}class UA extends B1{constructor(e,t){const{width:i,height:n}=t||{};let r,a;Array.isArray(e)?(r=e,a=e.length):a=e,super(a,{width:i,height:n}),r&&this.initFromArray(r,t)}addBaseTextureAt(e,t){if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=vo.TEXTURE_2D_ARRAY}upload(e,t,i){const{length:n,itemDirtyIds:r,items:a}=this,{gl:o}=e;i.dirtyId<0&&o.texImage3D(o.TEXTURE_2D_ARRAY,0,i.internalFormat,this._width,this._height,n,0,t.format,i.type,null);for(let h=0;h0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=vo.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,i){const n=this.itemDirtyIds;for(let r=0;r{if(this.url===null){e(this);return}try{const i=await We.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const n=await i.blob();if(this.destroyed)return;const r=await createImageBitmap(n,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Ni.UNPACK?"premultiply":"none"});if(this.destroyed){r.close();return}this.source=r,this.update(),e(this)}catch(i){if(this.destroyed)return;t(i),this.onError.emit(i)}}),this._load)}upload(e,t,i){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),super.upload(e,t,i)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return lo._EMPTY=lo._EMPTY??We.ADAPTER.createCanvas(0,0),lo._EMPTY}}const nm=class jc extends gr{constructor(e,t){t=t||{},super(We.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.update(),e(this)},jc.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;gr.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,i=e.height;if(!t||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=t*this.scale,r=i*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/i*t,r=this._overrideHeight||this._overrideWidth/t*i),n=Math.round(n),r=Math.round(r);const a=this.source;a.width=n,a.height=r,a._pixiId=`canvas_${Fa()}`,a.getContext("2d").drawImage(e,0,0,t,i,0,0,n,r),this._resolve(),this._resolve=null}}static getSize(e){const t=jc.SVG_SIZE.exec(e),i={};return t&&(i[t[1]]=Math.round(parseFloat(t[3])),i[t[5]]=Math.round(parseFloat(t[7]))),i}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&jc.SVG_XML.test(e)}};nm.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;let rm=nm;class YA extends gr{constructor(e){super(e)}static test(e){return!!globalThis.VideoFrame&&e instanceof globalThis.VideoFrame}}const am=class om extends gr{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const i=document.createElement("video");t.autoLoad!==!1&&i.setAttribute("preload","auto"),t.playsinline!==!1&&(i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline","")),t.muted===!0&&(i.setAttribute("muted",""),i.muted=!0),t.loop===!0&&i.setAttribute("loop",""),t.autoPlay!==!1&&i.setAttribute("autoplay",""),typeof e=="string"&&(e=[e]);const n=e[0].src||e[0];gr.crossOrigin(i,n,t.crossorigin);for(let r=0;r{this.valid?t(this):(this._resolve=t,this._reject=i,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0,!t&&this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._configureAutoUpdate();const e=this.source;e&&(e.removeEventListener("play",this._onPlayStart),e.removeEventListener("pause",this._onPlayStop),e.removeEventListener("seeked",this._onSeeked),e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(ds.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(ds.shared.add(this.update,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(ds.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||om.TYPES.includes(t)}};am.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],am.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let D1=am;Wf.push(lo,c1,XA,D1,YA,rm,yu,VA,UA);class Bl{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?Tt.EMPTY:(e=e||new Tt(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,t){const{a:i,b:n,c:r,d:a,tx:o,ty:h}=e,l=i*t.x+r*t.y+o,c=n*t.x+a*t.y+h;this.minX=Math.min(this.minX,l),this.maxX=Math.max(this.maxX,l),this.minY=Math.min(this.minY,c),this.maxY=Math.max(this.maxY,c)}addQuad(e){let t=this.minX,i=this.minY,n=this.maxX,r=this.maxY,a=e[0],o=e[1];t=an?a:n,r=o>r?o:r,a=e[2],o=e[3],t=an?a:n,r=o>r?o:r,a=e[4],o=e[5],t=an?a:n,r=o>r?o:r,a=e[6],o=e[7],t=an?a:n,r=o>r?o:r,this.minX=t,this.minY=i,this.maxX=n,this.maxY=r}addFrame(e,t,i,n,r){this.addFrameMatrix(e.worldTransform,t,i,n,r)}addFrameMatrix(e,t,i,n,r){const a=e.a,o=e.b,h=e.c,l=e.d,c=e.tx,u=e.ty;let d=this.minX,f=this.minY,p=this.maxX,m=this.maxY,g=a*t+h*i+c,v=o*t+l*i+u;d=gp?g:p,m=v>m?v:m,g=a*n+h*i+c,v=o*n+l*i+u,d=gp?g:p,m=v>m?v:m,g=a*t+h*r+c,v=o*t+l*r+u,d=gp?g:p,m=v>m?v:m,g=a*n+h*r+c,v=o*n+l*r+u,d=gp?g:p,m=v>m?v:m,this.minX=d,this.minY=f,this.maxX=p,this.maxY=m}addVertexData(e,t,i){let n=this.minX,r=this.minY,a=this.maxX,o=this.maxY;for(let h=t;ha?l:a,o=c>o?c:o}this.minX=n,this.minY=r,this.maxX=a,this.maxY=o}addVertices(e,t,i,n){this.addVerticesMatrix(e.worldTransform,t,i,n)}addVerticesMatrix(e,t,i,n,r=0,a=r){const o=e.a,h=e.b,l=e.c,c=e.d,u=e.tx,d=e.ty;let f=this.minX,p=this.minY,m=this.maxX,g=this.maxY;for(let v=i;vn?e.maxX:n,this.maxY=e.maxY>r?e.maxY:r}addBoundsMask(e,t){const i=e.minX>t.minX?e.minX:t.minX,n=e.minY>t.minY?e.minY:t.minY,r=e.maxXl?r:l,this.maxY=a>c?a:c}}addBoundsMatrix(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,t){const i=e.minX>t.x?e.minX:t.x,n=e.minY>t.y?e.minY:t.y,r=e.maxXl?r:l,this.maxY=a>c?a:c}}pad(e=0,t=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)}addFramePad(e,t,i,n,r,a){e-=r,t-=a,i+=r,n+=a,this.minX=this.minXi?this.maxX:i,this.minY=this.minYn?this.maxY:n}}class yi extends jl{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new mp,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Bl,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){const t=Object.keys(e);for(let i=0;i1)for(let t=0;tthis.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const i=this.getChildIndex(e),n=this.getChildIndex(t);this.children[i]=t,this.children[n]=e,this.onChildrenChange(i=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const i=this.getChildIndex(e);yo(this.children,i,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t0&&r<=n){a=this.children.splice(i,r);for(let o=0;o1&&this.children.sort(HA),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e0&&t.height>0))return;let i,n;this.cullArea?(i=this.cullArea,n=this.worldTransform):this._render!==lm.prototype._render&&(i=this.getBounds(!0));const r=e.projection.transform;if(r&&(n?(n=GA.copyFrom(n),n.prepend(r)):n=r),i&&t.intersects(i,n))this._render(e);else if(this.cullArea)return;for(let a=0,o=this.children.length;a=n&&qo.x=r&&qo.y=t&&(a=s-o-1),h=h.replace("%value%",e[a].toString()),n+=h,n+=` -`}return i=i.replace("%blur%",n),i=i.replace("%size%",s.toString()),i}const QE=` +`;class qA extends us{constructor(e=1){super(DA,zA,{uAlpha:1}),this.alpha=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}const KA={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},ZA=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(` +`);function JA(s){const e=KA[s],t=e.length;let i=ZA,n="";const r="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let a;for(let o=0;o=t&&(a=s-o-1),h=h.replace("%value%",e[a].toString()),n+=h,n+=` +`}return i=i.replace("%blur%",n),i=i.replace("%size%",s.toString()),i}const QA=` attribute vec2 aVertexPosition; uniform mat3 projectionMatrix; @@ -586,8 +586,8 @@ void main(void) vec2 textureCoord = filterTextureCoord(); %blur% - }`;function eC(s,e){const t=Math.ceil(s/2);let i=QE,n="",r;e?r="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":r="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let a=0;a{Object.defineProperty(av,s,{get(){return kt("7.1.0",`filters.${s} has moved to ${s}`),e}})});class uC{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(ds.system.add(this.tickerUpdate,this,Oa.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(ds.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTimei.priority-n.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;const t=this.mappingTable[e.type];if(t)for(let i=0,n=t.length;i=0;n--)if(e.currentTarget=i[n],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,i=this._allInteractiveElements){if(i.length===0)return;e.eventPhase=e.BUBBLING_PHASE;const n=Array.isArray(t)?t:[t];for(let r=i.length-1;r>=0;r--)n.forEach(a=>{e.currentTarget=i[r],this.notifyTarget(e,a)})}propagationPath(e){const t=[e];for(let i=0;i=0;u--){const d=c[u],f=this.hitTestMoveRecursive(d,this._isInteractive(t)?t:d.eventMode,i,n,r,a||r(e,i));if(f){if(f.length>0&&!f[f.length-1].parent)continue;const p=e.isInteractive();(f.length>0||p)&&(p&&this._allInteractiveElements.push(e),f.push(e)),this._hitElements.length===0&&(this._hitElements=f),o=!0}}}const h=this._isInteractive(t),l=e.isInteractive();return h&&l&&this._allInteractiveElements.push(e),a||this._hitElements.length>0?null:o?this._hitElements:h&&!r(e,i)&&n(e,i)?l?[e]:[]:null}hitTestRecursive(e,t,i,n,r){if(this._interactivePrune(e)||r(e,i))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(Or.pauseUpdate=!1),e.interactiveChildren&&e.children){const h=e.children;for(let l=h.length-1;l>=0;l--){const c=h[l],u=this.hitTestRecursive(c,this._isInteractive(t)?t:c.eventMode,i,n,r);if(u){if(u.length>0&&!u[u.length-1].parent)continue;const d=e.isInteractive();return(u.length>0||d)&&u.push(e),u}}}const a=this._isInteractive(t),o=e.isInteractive();return a&&n(e,i)?o?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!!(!e||e.isMask||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren||e.isMask)}hitPruneFn(e,t){var i;if(e.hitArea&&(e.worldTransform.applyInverse(t,nf),!e.hitArea.contains(nf.x,nf.y)))return!0;if(e._mask){const n=e._mask.isMaskData?e._mask.maskObject:e._mask;if(n&&!((i=n.containsPoint)!=null&&i.call(n,t)))return!0}return!1}hitTestFn(e,t){return e.eventMode==="passive"?!1:e.hitArea?!0:e.containsPoint?e.containsPoint(t):!1}notifyTarget(e,t){var r,a;t=t??e.type;const i=`on${t}`;(a=(r=e.currentTarget)[i])==null||a.call(r,e);const n=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this.notifyListeners(e,n),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof Js)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.createPointerEvent(e);if(this.dispatchEvent(t,"pointerdown"),t.pointerType==="touch")this.dispatchEvent(t,"touchstart");else if(t.pointerType==="mouse"||t.pointerType==="pen"){const n=t.button===2;this.dispatchEvent(t,n?"rightdown":"mousedown")}const i=this.trackingData(e.pointerId);i.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){var h,l;if(!(e instanceof Js)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;const i=t.pointerType==="mouse"||t.pointerType==="pen",n=this.trackingData(e.pointerId),r=this.findMountedTarget(n.overTargets);if(((h=n.overTargets)==null?void 0:h.length)>0&&r!==t.target){const c=e.type==="mousemove"?"mouseout":"pointerout",u=this.createPointerEvent(e,c,r);if(this.dispatchEvent(u,"pointerout"),i&&this.dispatchEvent(u,"mouseout"),!t.composedPath().includes(r)){const d=this.createPointerEvent(e,"pointerleave",r);for(d.eventPhase=d.AT_TARGET;d.target&&!t.composedPath().includes(d.target);)d.currentTarget=d.target,this.notifyTarget(d),i&&this.notifyTarget(d,"mouseleave"),d.target=d.target.parent;this.freeEvent(d)}this.freeEvent(u)}if(r!==t.target){const c=e.type==="mousemove"?"mouseover":"pointerover",u=this.clonePointerEvent(t,c);this.dispatchEvent(u,"pointerover"),i&&this.dispatchEvent(u,"mouseover");let d=r==null?void 0:r.parent;for(;d&&d!==this.rootTarget.parent&&d!==t.target;)d=d.parent;if(!d||d===this.rootTarget.parent){const f=this.clonePointerEvent(t,"pointerenter");for(f.eventPhase=f.AT_TARGET;f.target&&f.target!==r&&f.target!==this.rootTarget.parent;)f.currentTarget=f.target,this.notifyTarget(f),i&&this.notifyTarget(f,"mouseenter"),f.target=f.target.parent;this.freeEvent(f)}this.freeEvent(u)}const a=[],o=this.enableGlobalMoveEvents??!0;this.moveOnAll?a.push("pointermove"):this.dispatchEvent(t,"pointermove"),o&&a.push("globalpointermove"),t.pointerType==="touch"&&(this.moveOnAll?a.splice(1,0,"touchmove"):this.dispatchEvent(t,"touchmove"),o&&a.push("globaltouchmove")),i&&(this.moveOnAll?a.splice(1,0,"mousemove"):this.dispatchEvent(t,"mousemove"),o&&a.push("globalmousemove"),this.cursor=(l=t.target)==null?void 0:l.cursor),a.length>0&&this.all(t,a),this._allInteractiveElements.length=0,this._hitElements.length=0,n.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){var a;if(!(e instanceof Js)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.createPointerEvent(e),n=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),n&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=(a=i.target)==null?void 0:a.cursor);const r=this.clonePointerEvent(i,"pointerenter");for(r.eventPhase=r.AT_TARGET;r.target&&r.target!==this.rootTarget.parent;)r.currentTarget=r.target,this.notifyTarget(r),n&&this.notifyTarget(r,"mouseenter"),r.target=r.target.parent;t.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(r)}mapPointerOut(e){if(!(e instanceof Js)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId);if(t.overTargets){const i=e.pointerType==="mouse"||e.pointerType==="pen",n=this.findMountedTarget(t.overTargets),r=this.createPointerEvent(e,"pointerout",n);this.dispatchEvent(r),i&&this.dispatchEvent(r,"mouseout");const a=this.createPointerEvent(e,"pointerleave",n);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==this.rootTarget.parent;)a.currentTarget=a.target,this.notifyTarget(a),i&&this.notifyTarget(a,"mouseleave"),a.target=a.target.parent;t.overTargets=null,this.freeEvent(r),this.freeEvent(a)}this.cursor=null}mapPointerUp(e){if(!(e instanceof Js)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=performance.now(),i=this.createPointerEvent(e);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const o=i.button===2;this.dispatchEvent(i,o?"rightup":"mouseup")}const n=this.trackingData(e.pointerId),r=this.findMountedTarget(n.pressTargetsByButton[e.button]);let a=r;if(r&&!i.composedPath().includes(r)){let o=r;for(;o&&!i.composedPath().includes(o);){if(i.currentTarget=o,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const h=i.button===2;this.notifyTarget(i,h?"rightupoutside":"mouseupoutside")}o=o.parent}delete n.pressTargetsByButton[e.button],a=o}if(a){const o=this.clonePointerEvent(i,"click");o.target=a,o.path=null,n.clicksByButton[e.button]||(n.clicksByButton[e.button]={clickCount:0,target:o.target,timeStamp:t});const h=n.clicksByButton[e.button];if(h.target===o.target&&t-h.timeStamp<200?++h.clickCount:h.clickCount=1,h.target=o.target,h.timeStamp=t,o.detail=h.clickCount,o.pointerType==="mouse"){const l=o.button===2;this.dispatchEvent(o,l?"rightclick":"click")}else o.pointerType==="touch"&&this.dispatchEvent(o,"tap");this.dispatchEvent(o,"pointertap"),this.freeEvent(o)}this.freeEvent(i)}mapPointerUpOutside(e){if(!(e instanceof Js)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.findMountedTarget(t.pressTargetsByButton[e.button]),n=this.createPointerEvent(e);if(i){let r=i;for(;r;)n.currentTarget=r,this.notifyTarget(n,"pointerupoutside"),n.pointerType==="touch"?this.notifyTarget(n,"touchendoutside"):(n.pointerType==="mouse"||n.pointerType==="pen")&&this.notifyTarget(n,n.button===2?"rightupoutside":"mouseupoutside"),r=r.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(n)}mapWheel(e){if(!(e instanceof bo)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let i=1;i(i==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=n),t[i]=n,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:t,resolution:i}=this.renderer;this.setTargetElement(t),this.resolution=i,dm._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this.currentCursor===e)return;this.currentCursor=e;const i=this.cursorStyles[e];if(i)switch(typeof i){case"string":t&&(this.domElement.style.cursor=i);break;case"function":i(e);break;case"object":t&&Object.assign(this.domElement.style,i);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let i=0,n=t.length;i0&&(t=e.composedPath()[0]);const i=t!==this.domElement?"outside":"",n=this.normalizeToPointerData(e);for(let r=0,a=n.length;r"u"&&(r.button=0),typeof r.buttons>"u"&&(r.buttons=1),typeof r.isPrimary>"u"&&(r.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof r.width>"u"&&(r.width=r.radiusX||1),typeof r.height>"u"&&(r.height=r.radiusY||1),typeof r.tiltX>"u"&&(r.tiltX=0),typeof r.tiltY>"u"&&(r.tiltY=0),typeof r.pointerType>"u"&&(r.pointerType="touch"),typeof r.pointerId>"u"&&(r.pointerId=r.identifier||0),typeof r.pressure>"u"&&(r.pressure=r.force||.5),typeof r.twist>"u"&&(r.twist=0),typeof r.tangentialPressure>"u"&&(r.tangentialPressure=0),typeof r.layerX>"u"&&(r.layerX=r.offsetX=r.clientX),typeof r.layerY>"u"&&(r.layerY=r.offsetY=r.clientY),r.isNormalized=!0,r.type=e.type,t.push(r)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const i=e;typeof i.isPrimary>"u"&&(i.isPrimary=!0),typeof i.width>"u"&&(i.width=1),typeof i.height>"u"&&(i.height=1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="mouse"),typeof i.pointerId>"u"&&(i.pointerId=pC),typeof i.pressure>"u"&&(i.pressure=.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),i.isNormalized=!0,t.push(i)}else t.push(e);return t}normalizeWheelEvent(e){const t=this.rootWheelEvent;return this.transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=gC[e.type]||e.type),e}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};um.extension={name:"events",type:[He.RendererSystem,He.CanvasRendererSystem]},um.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};let fm=um;tt.add(fm);function ov(s){return s==="dynamic"||s==="static"}const vC={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??ov(fm.defaultEventMode)},set interactive(s){kt("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=s,this.eventMode=s?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??fm.defaultEventMode},set eventMode(s){this._internalInteractive=ov(s),this._internalEventMode=s},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(s,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,n=typeof t=="object"?t.signal:void 0,r=typeof t=="object"?t.once===!0:!1,a=typeof e=="function"?void 0:e;s=i?`${s}capture`:s;const o=typeof e=="function"?e:e.handleEvent,h=this;n&&n.addEventListener("abort",()=>{h.off(s,o,a)}),r?h.once(s,o,a):h.on(s,o,a)},removeEventListener(s,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,n=typeof e=="function"?void 0:e;s=i?`${s}capture`:s,e=typeof e=="function"?e:e.handleEvent,this.off(s,e,n)},dispatchEvent(s){if(!(s instanceof Wl))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return s.defaultPrevented=!1,s.path=null,s.target=this,s.manager.dispatchEvent(s),!s.defaultPrevented}};yi.mixin(vC);const yC={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};yi.mixin(yC);const xC=9,vc=100,bC=0,wC=0,lv=2,cv=1,SC=-1e3,MC=-1e3,_C=2;class Xb{constructor(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(ir.tablet||ir.phone)&&this.createTouchHook();const t=document.createElement("div");t.style.width=`${vc}px`,t.style.height=`${vc}px`,t.style.position="absolute",t.style.top=`${bC}px`,t.style.left=`${wC}px`,t.style.zIndex=lv.toString(),this.div=t,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const e=document.createElement("button");e.style.width=`${cv}px`,e.style.height=`${cv}px`,e.style.position="absolute",e.style.top=`${SC}px`,e.style.left=`${MC}px`,e.style.zIndex=_C.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){var e;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(e=this.renderer.view.parentNode)==null||e.appendChild(this.div))}deactivate(){var e;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(e=this.div.parentNode)==null||e.removeChild(this.div))}updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);const t=e.children;if(t)for(let i=0;i title : ${e.title}
tabIndex: ${e.tabIndex}`}capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:t,height:i}=this.renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>i&&(e.height=i-e.y)}addChild(e){let t=this.pool.pop();t||(t=document.createElement("button"),t.style.width=`${vc}px`,t.style.height=`${vc}px`,t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=lv.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`displayObject ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,t){const{displayObject:i}=e.target,n=this.renderer.events.rootBoundary,r=Object.assign(new Wl(n),{target:i});n.rootTarget=this.renderer.lastObjectRendered,t.forEach(a=>n.dispatchEvent(r,a))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===xC&&this.activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}Xb.extension={name:"accessibility",type:[He.RendererPlugin,He.CanvasRendererPlugin]};tt.add(Xb);const Vb=class mm{constructor(e){this.stage=new ji,e=Object.assign({forceCanvas:!1},e),this.renderer=OE(e),mm._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){var e;return(e=this.renderer)==null?void 0:e.view}get screen(){var e;return(e=this.renderer)==null?void 0:e.screen}destroy(e,t){const i=mm._plugins.slice(0);i.reverse(),i.forEach(n=>{n.destroy.call(this)}),this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null}};Vb._plugins=[];let Yb=Vb;tt.handleByList(He.Application,Yb._plugins);class $b{static init(e){Object.defineProperty(this,"resizeTo",{set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let t,i;if(this._resizeTo===globalThis.window)t=globalThis.innerWidth,i=globalThis.innerHeight;else{const{clientWidth:n,clientHeight:r}=this._resizeTo;t=n,i=r}this.renderer.resize(t,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}$b.extension=He.Application;tt.add($b);const hv={loader:He.LoadParser,resolver:He.ResolveParser,cache:He.CacheParser,detection:He.DetectionParser};tt.handle(He.Asset,s=>{const e=s.ref;Object.entries(hv).filter(([t])=>!!e[t]).forEach(([t,i])=>tt.add(Object.assign(e[t],{extension:e[t].extension??i})))},s=>{const e=s.ref;Object.keys(hv).filter(t=>!!e[t]).forEach(t=>tt.remove(e[t]))});class TC{constructor(e,t=!1){this._loader=e,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=t}add(e){e.forEach(t=>{this._assetList.push(t)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const e=[],t=Math.min(this._assetList.length,this._maxConcurrent);for(let i=0;i(Array.isArray(s)||(s=[s]),e?s.map(i=>typeof i=="string"||t?e(i):i):s),Mh=(s,e)=>{const t=e.split("?")[1];return t&&(s+=`?${t}`),s};function Gb(s,e,t,i,n){const r=e[t];for(let a=0;a{const a=r.substring(1,r.length-1).split(",");n.push(a)}),Gb(s,n,0,t,i)}else i.push(s);return i}const _h=s=>!Array.isArray(s);class EC{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){const t=this._cache.get(e);return t||console.warn(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){const i=en(e);let n;for(let o=0;o{n[o]=t}));const r=Object.keys(n),a={cacheKeys:r,keys:i};if(i.forEach(o=>{this._cacheMap.set(o,a)}),r.forEach(o=>{const h=n?n[o]:t;this._cache.has(o)&&this._cache.get(o)!==h&&console.warn("[Cache] already has key:",o),this._cache.set(o,n[o])}),t instanceof gt){const o=t;i.forEach(h=>{o.baseTexture!==gt.EMPTY.baseTexture&&yt.addToCache(o.baseTexture,h),gt.addToCache(o,h)})}}remove(e){if(!this._cacheMap.has(e)){console.warn(`[Assets] Asset id ${e} was not found in the Cache`);return}const t=this._cacheMap.get(e);t.cacheKeys.forEach(i=>{this._cache.delete(i)}),t.keys.forEach(i=>{this._cacheMap.delete(i)})}get parsers(){return this._parsers}}const va=new EC;class CC{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(e,t,i)=>(this._parsersValidated=!1,e[t]=i,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(e,t){const i={promise:null,parser:null};return i.promise=(async()=>{var a,o;let n=null,r=null;if(t.loadParser&&(r=this._parserHash[t.loadParser],r||console.warn(`[Assets] specified load parser "${t.loadParser}" not found while loading ${e}`)),!r){for(let h=0;h({alias:[l],src:l})),o=a.length,h=a.map(async l=>{const c=wi.toAbsolute(l.src);if(!n[l.src])try{this.promiseCache[c]||(this.promiseCache[c]=this._getLoadPromiseAndParser(c,l)),n[l.src]=await this.promiseCache[c].promise,t&&t(++i/o)}catch(u){throw delete this.promiseCache[c],delete n[l.src],new Error(`[Loader.load] Failed to load ${c}. -${u}`)}});return await Promise.all(h),r?n[a[0].src]:n}async unload(e){const t=en(e,i=>({alias:[i],src:i})).map(async i=>{var a,o;const n=wi.toAbsolute(i.src),r=this.promiseCache[n];if(r){const h=await r.promise;delete this.promiseCache[n],(o=(a=r.parser)==null?void 0:a.unload)==null||o.call(a,h,i,this)}});await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}}var Is=(s=>(s[s.Low=0]="Low",s[s.Normal=1]="Normal",s[s.High=2]="High",s))(Is||{});const IC=".json",RC="application/json",PC={extension:{type:He.LoadParser,priority:Is.Low},name:"loadJson",test(s){return Do(s,RC)||bs(s,IC)},async load(s){return await(await We.ADAPTER.fetch(s)).json()}};tt.add(PC);const kC=".txt",FC="text/plain",OC={name:"loadTxt",extension:{type:He.LoadParser,priority:Is.Low},test(s){return Do(s,FC)||bs(s,kC)},async load(s){return await(await We.ADAPTER.fetch(s)).text()}};tt.add(OC);const BC=["normal","bold","100","200","300","400","500","600","700","800","900"],LC=[".ttf",".otf",".woff",".woff2"],DC=["font/ttf","font/otf","font/woff","font/woff2"],NC=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function UC(s){const e=wi.extname(s),t=wi.basename(s,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1));let i=t.length>0;for(const r of t)if(!r.match(NC)){i=!1;break}let n=t.join(" ");return i||(n=`"${n.replace(/[\\"]/g,"\\$&")}"`),n}const XC=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function VC(s){return XC.test(s)?s:encodeURI(s)}const YC={extension:{type:He.LoadParser,priority:Is.Low},name:"loadWebFont",test(s){return Do(s,DC)||bs(s,LC)},async load(s,e){var i,n,r;const t=We.ADAPTER.getFontFaceSet();if(t){const a=[],o=((i=e.data)==null?void 0:i.family)??UC(s),h=((r=(n=e.data)==null?void 0:n.weights)==null?void 0:r.filter(c=>BC.includes(c)))??["normal"],l=e.data??{};for(let c=0;cWe.ADAPTER.getFontFaceSet().delete(e))}};tt.add(YC);const $C=`(function() { +`;class hE extends us{constructor(e=.5,t=Math.random()){super(P1,cE,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const av={AlphaFilter:qA,BlurFilter:tE,BlurFilterPass:cm,ColorMatrixFilter:hm,DisplacementFilter:rE,FXAAFilter:lE,NoiseFilter:hE};Object.entries(av).forEach(([s,e])=>{Object.defineProperty(av,s,{get(){return kt("7.1.0",`filters.${s} has moved to ${s}`),e}})});class uE{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(ds.system.add(this.tickerUpdate,this,Oa.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(ds.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTimei.priority-n.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;const t=this.mappingTable[e.type];if(t)for(let i=0,n=t.length;i=0;n--)if(e.currentTarget=i[n],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,i=this._allInteractiveElements){if(i.length===0)return;e.eventPhase=e.BUBBLING_PHASE;const n=Array.isArray(t)?t:[t];for(let r=i.length-1;r>=0;r--)n.forEach(a=>{e.currentTarget=i[r],this.notifyTarget(e,a)})}propagationPath(e){const t=[e];for(let i=0;i=0;u--){const d=c[u],f=this.hitTestMoveRecursive(d,this._isInteractive(t)?t:d.eventMode,i,n,r,a||r(e,i));if(f){if(f.length>0&&!f[f.length-1].parent)continue;const p=e.isInteractive();(f.length>0||p)&&(p&&this._allInteractiveElements.push(e),f.push(e)),this._hitElements.length===0&&(this._hitElements=f),o=!0}}}const h=this._isInteractive(t),l=e.isInteractive();return h&&l&&this._allInteractiveElements.push(e),a||this._hitElements.length>0?null:o?this._hitElements:h&&!r(e,i)&&n(e,i)?l?[e]:[]:null}hitTestRecursive(e,t,i,n,r){if(this._interactivePrune(e)||r(e,i))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(Or.pauseUpdate=!1),e.interactiveChildren&&e.children){const h=e.children;for(let l=h.length-1;l>=0;l--){const c=h[l],u=this.hitTestRecursive(c,this._isInteractive(t)?t:c.eventMode,i,n,r);if(u){if(u.length>0&&!u[u.length-1].parent)continue;const d=e.isInteractive();return(u.length>0||d)&&u.push(e),u}}}const a=this._isInteractive(t),o=e.isInteractive();return a&&n(e,i)?o?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!!(!e||e.isMask||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren||e.isMask)}hitPruneFn(e,t){var i;if(e.hitArea&&(e.worldTransform.applyInverse(t,nf),!e.hitArea.contains(nf.x,nf.y)))return!0;if(e._mask){const n=e._mask.isMaskData?e._mask.maskObject:e._mask;if(n&&!((i=n.containsPoint)!=null&&i.call(n,t)))return!0}return!1}hitTestFn(e,t){return e.eventMode==="passive"?!1:e.hitArea?!0:e.containsPoint?e.containsPoint(t):!1}notifyTarget(e,t){var r,a;t=t??e.type;const i=`on${t}`;(a=(r=e.currentTarget)[i])==null||a.call(r,e);const n=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this.notifyListeners(e,n),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof Js)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.createPointerEvent(e);if(this.dispatchEvent(t,"pointerdown"),t.pointerType==="touch")this.dispatchEvent(t,"touchstart");else if(t.pointerType==="mouse"||t.pointerType==="pen"){const n=t.button===2;this.dispatchEvent(t,n?"rightdown":"mousedown")}const i=this.trackingData(e.pointerId);i.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){var h,l;if(!(e instanceof Js)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;const i=t.pointerType==="mouse"||t.pointerType==="pen",n=this.trackingData(e.pointerId),r=this.findMountedTarget(n.overTargets);if(((h=n.overTargets)==null?void 0:h.length)>0&&r!==t.target){const c=e.type==="mousemove"?"mouseout":"pointerout",u=this.createPointerEvent(e,c,r);if(this.dispatchEvent(u,"pointerout"),i&&this.dispatchEvent(u,"mouseout"),!t.composedPath().includes(r)){const d=this.createPointerEvent(e,"pointerleave",r);for(d.eventPhase=d.AT_TARGET;d.target&&!t.composedPath().includes(d.target);)d.currentTarget=d.target,this.notifyTarget(d),i&&this.notifyTarget(d,"mouseleave"),d.target=d.target.parent;this.freeEvent(d)}this.freeEvent(u)}if(r!==t.target){const c=e.type==="mousemove"?"mouseover":"pointerover",u=this.clonePointerEvent(t,c);this.dispatchEvent(u,"pointerover"),i&&this.dispatchEvent(u,"mouseover");let d=r==null?void 0:r.parent;for(;d&&d!==this.rootTarget.parent&&d!==t.target;)d=d.parent;if(!d||d===this.rootTarget.parent){const f=this.clonePointerEvent(t,"pointerenter");for(f.eventPhase=f.AT_TARGET;f.target&&f.target!==r&&f.target!==this.rootTarget.parent;)f.currentTarget=f.target,this.notifyTarget(f),i&&this.notifyTarget(f,"mouseenter"),f.target=f.target.parent;this.freeEvent(f)}this.freeEvent(u)}const a=[],o=this.enableGlobalMoveEvents??!0;this.moveOnAll?a.push("pointermove"):this.dispatchEvent(t,"pointermove"),o&&a.push("globalpointermove"),t.pointerType==="touch"&&(this.moveOnAll?a.splice(1,0,"touchmove"):this.dispatchEvent(t,"touchmove"),o&&a.push("globaltouchmove")),i&&(this.moveOnAll?a.splice(1,0,"mousemove"):this.dispatchEvent(t,"mousemove"),o&&a.push("globalmousemove"),this.cursor=(l=t.target)==null?void 0:l.cursor),a.length>0&&this.all(t,a),this._allInteractiveElements.length=0,this._hitElements.length=0,n.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){var a;if(!(e instanceof Js)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.createPointerEvent(e),n=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),n&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=(a=i.target)==null?void 0:a.cursor);const r=this.clonePointerEvent(i,"pointerenter");for(r.eventPhase=r.AT_TARGET;r.target&&r.target!==this.rootTarget.parent;)r.currentTarget=r.target,this.notifyTarget(r),n&&this.notifyTarget(r,"mouseenter"),r.target=r.target.parent;t.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(r)}mapPointerOut(e){if(!(e instanceof Js)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId);if(t.overTargets){const i=e.pointerType==="mouse"||e.pointerType==="pen",n=this.findMountedTarget(t.overTargets),r=this.createPointerEvent(e,"pointerout",n);this.dispatchEvent(r),i&&this.dispatchEvent(r,"mouseout");const a=this.createPointerEvent(e,"pointerleave",n);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==this.rootTarget.parent;)a.currentTarget=a.target,this.notifyTarget(a),i&&this.notifyTarget(a,"mouseleave"),a.target=a.target.parent;t.overTargets=null,this.freeEvent(r),this.freeEvent(a)}this.cursor=null}mapPointerUp(e){if(!(e instanceof Js)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=performance.now(),i=this.createPointerEvent(e);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const o=i.button===2;this.dispatchEvent(i,o?"rightup":"mouseup")}const n=this.trackingData(e.pointerId),r=this.findMountedTarget(n.pressTargetsByButton[e.button]);let a=r;if(r&&!i.composedPath().includes(r)){let o=r;for(;o&&!i.composedPath().includes(o);){if(i.currentTarget=o,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const h=i.button===2;this.notifyTarget(i,h?"rightupoutside":"mouseupoutside")}o=o.parent}delete n.pressTargetsByButton[e.button],a=o}if(a){const o=this.clonePointerEvent(i,"click");o.target=a,o.path=null,n.clicksByButton[e.button]||(n.clicksByButton[e.button]={clickCount:0,target:o.target,timeStamp:t});const h=n.clicksByButton[e.button];if(h.target===o.target&&t-h.timeStamp<200?++h.clickCount:h.clickCount=1,h.target=o.target,h.timeStamp=t,o.detail=h.clickCount,o.pointerType==="mouse"){const l=o.button===2;this.dispatchEvent(o,l?"rightclick":"click")}else o.pointerType==="touch"&&this.dispatchEvent(o,"tap");this.dispatchEvent(o,"pointertap"),this.freeEvent(o)}this.freeEvent(i)}mapPointerUpOutside(e){if(!(e instanceof Js)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.findMountedTarget(t.pressTargetsByButton[e.button]),n=this.createPointerEvent(e);if(i){let r=i;for(;r;)n.currentTarget=r,this.notifyTarget(n,"pointerupoutside"),n.pointerType==="touch"?this.notifyTarget(n,"touchendoutside"):(n.pointerType==="mouse"||n.pointerType==="pen")&&this.notifyTarget(n,n.button===2?"rightupoutside":"mouseupoutside"),r=r.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(n)}mapWheel(e){if(!(e instanceof bo)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let i=1;i(i==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=n),t[i]=n,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{view:t,resolution:i}=this.renderer;this.setTargetElement(t),this.resolution=i,dm._defaultEventMode=e.eventMode??"auto",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this.currentCursor===e)return;this.currentCursor=e;const i=this.cursorStyles[e];if(i)switch(typeof i){case"string":t&&(this.domElement.style.cursor=i);break;case"function":i(e);break;case"object":t&&Object.assign(this.domElement.style,i);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let i=0,n=t.length;i0&&(t=e.composedPath()[0]);const i=t!==this.domElement?"outside":"",n=this.normalizeToPointerData(e);for(let r=0,a=n.length;r"u"&&(r.button=0),typeof r.buttons>"u"&&(r.buttons=1),typeof r.isPrimary>"u"&&(r.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof r.width>"u"&&(r.width=r.radiusX||1),typeof r.height>"u"&&(r.height=r.radiusY||1),typeof r.tiltX>"u"&&(r.tiltX=0),typeof r.tiltY>"u"&&(r.tiltY=0),typeof r.pointerType>"u"&&(r.pointerType="touch"),typeof r.pointerId>"u"&&(r.pointerId=r.identifier||0),typeof r.pressure>"u"&&(r.pressure=r.force||.5),typeof r.twist>"u"&&(r.twist=0),typeof r.tangentialPressure>"u"&&(r.tangentialPressure=0),typeof r.layerX>"u"&&(r.layerX=r.offsetX=r.clientX),typeof r.layerY>"u"&&(r.layerY=r.offsetY=r.clientY),r.isNormalized=!0,r.type=e.type,t.push(r)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const i=e;typeof i.isPrimary>"u"&&(i.isPrimary=!0),typeof i.width>"u"&&(i.width=1),typeof i.height>"u"&&(i.height=1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="mouse"),typeof i.pointerId>"u"&&(i.pointerId=pE),typeof i.pressure>"u"&&(i.pressure=.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),i.isNormalized=!0,t.push(i)}else t.push(e);return t}normalizeWheelEvent(e){const t=this.rootWheelEvent;return this.transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=gE[e.type]||e.type),e}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};um.extension={name:"events",type:[He.RendererSystem,He.CanvasRendererSystem]},um.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};let fm=um;tt.add(fm);function ov(s){return s==="dynamic"||s==="static"}const vE={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??ov(fm.defaultEventMode)},set interactive(s){kt("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=s,this.eventMode=s?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??fm.defaultEventMode},set eventMode(s){this._internalInteractive=ov(s),this._internalEventMode=s},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(s,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,n=typeof t=="object"?t.signal:void 0,r=typeof t=="object"?t.once===!0:!1,a=typeof e=="function"?void 0:e;s=i?`${s}capture`:s;const o=typeof e=="function"?e:e.handleEvent,h=this;n&&n.addEventListener("abort",()=>{h.off(s,o,a)}),r?h.once(s,o,a):h.on(s,o,a)},removeEventListener(s,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,n=typeof e=="function"?void 0:e;s=i?`${s}capture`:s,e=typeof e=="function"?e:e.handleEvent,this.off(s,e,n)},dispatchEvent(s){if(!(s instanceof Wl))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return s.defaultPrevented=!1,s.path=null,s.target=this,s.manager.dispatchEvent(s),!s.defaultPrevented}};yi.mixin(vE);const yE={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};yi.mixin(yE);const xE=9,vc=100,bE=0,wE=0,lv=2,cv=1,SE=-1e3,ME=-1e3,_E=2;class X1{constructor(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(ir.tablet||ir.phone)&&this.createTouchHook();const t=document.createElement("div");t.style.width=`${vc}px`,t.style.height=`${vc}px`,t.style.position="absolute",t.style.top=`${bE}px`,t.style.left=`${wE}px`,t.style.zIndex=lv.toString(),this.div=t,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const e=document.createElement("button");e.style.width=`${cv}px`,e.style.height=`${cv}px`,e.style.position="absolute",e.style.top=`${SE}px`,e.style.left=`${ME}px`,e.style.zIndex=_E.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){var e;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(e=this.renderer.view.parentNode)==null||e.appendChild(this.div))}deactivate(){var e;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(e=this.div.parentNode)==null||e.removeChild(this.div))}updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);const t=e.children;if(t)for(let i=0;i title : ${e.title}
tabIndex: ${e.tabIndex}`}capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:t,height:i}=this.renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>i&&(e.height=i-e.y)}addChild(e){let t=this.pool.pop();t||(t=document.createElement("button"),t.style.width=`${vc}px`,t.style.height=`${vc}px`,t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=lv.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`displayObject ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,t){const{displayObject:i}=e.target,n=this.renderer.events.rootBoundary,r=Object.assign(new Wl(n),{target:i});n.rootTarget=this.renderer.lastObjectRendered,t.forEach(a=>n.dispatchEvent(r,a))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===xE&&this.activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}X1.extension={name:"accessibility",type:[He.RendererPlugin,He.CanvasRendererPlugin]};tt.add(X1);const V1=class mm{constructor(e){this.stage=new ji,e=Object.assign({forceCanvas:!1},e),this.renderer=OA(e),mm._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){var e;return(e=this.renderer)==null?void 0:e.view}get screen(){var e;return(e=this.renderer)==null?void 0:e.screen}destroy(e,t){const i=mm._plugins.slice(0);i.reverse(),i.forEach(n=>{n.destroy.call(this)}),this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null}};V1._plugins=[];let Y1=V1;tt.handleByList(He.Application,Y1._plugins);class $1{static init(e){Object.defineProperty(this,"resizeTo",{set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let t,i;if(this._resizeTo===globalThis.window)t=globalThis.innerWidth,i=globalThis.innerHeight;else{const{clientWidth:n,clientHeight:r}=this._resizeTo;t=n,i=r}this.renderer.resize(t,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}$1.extension=He.Application;tt.add($1);const hv={loader:He.LoadParser,resolver:He.ResolveParser,cache:He.CacheParser,detection:He.DetectionParser};tt.handle(He.Asset,s=>{const e=s.ref;Object.entries(hv).filter(([t])=>!!e[t]).forEach(([t,i])=>tt.add(Object.assign(e[t],{extension:e[t].extension??i})))},s=>{const e=s.ref;Object.keys(hv).filter(t=>!!e[t]).forEach(t=>tt.remove(e[t]))});class TE{constructor(e,t=!1){this._loader=e,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=t}add(e){e.forEach(t=>{this._assetList.push(t)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const e=[],t=Math.min(this._assetList.length,this._maxConcurrent);for(let i=0;i(Array.isArray(s)||(s=[s]),e?s.map(i=>typeof i=="string"||t?e(i):i):s),Mh=(s,e)=>{const t=e.split("?")[1];return t&&(s+=`?${t}`),s};function G1(s,e,t,i,n){const r=e[t];for(let a=0;a{const a=r.substring(1,r.length-1).split(",");n.push(a)}),G1(s,n,0,t,i)}else i.push(s);return i}const _h=s=>!Array.isArray(s);class EE{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){const t=this._cache.get(e);return t||console.warn(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){const i=en(e);let n;for(let o=0;o{n[o]=t}));const r=Object.keys(n),a={cacheKeys:r,keys:i};if(i.forEach(o=>{this._cacheMap.set(o,a)}),r.forEach(o=>{const h=n?n[o]:t;this._cache.has(o)&&this._cache.get(o)!==h&&console.warn("[Cache] already has key:",o),this._cache.set(o,n[o])}),t instanceof gt){const o=t;i.forEach(h=>{o.baseTexture!==gt.EMPTY.baseTexture&&yt.addToCache(o.baseTexture,h),gt.addToCache(o,h)})}}remove(e){if(!this._cacheMap.has(e)){console.warn(`[Assets] Asset id ${e} was not found in the Cache`);return}const t=this._cacheMap.get(e);t.cacheKeys.forEach(i=>{this._cache.delete(i)}),t.keys.forEach(i=>{this._cacheMap.delete(i)})}get parsers(){return this._parsers}}const va=new EE;class CE{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(e,t,i)=>(this._parsersValidated=!1,e[t]=i,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(e,t){const i={promise:null,parser:null};return i.promise=(async()=>{var a,o;let n=null,r=null;if(t.loadParser&&(r=this._parserHash[t.loadParser],r||console.warn(`[Assets] specified load parser "${t.loadParser}" not found while loading ${e}`)),!r){for(let h=0;h({alias:[l],src:l})),o=a.length,h=a.map(async l=>{const c=wi.toAbsolute(l.src);if(!n[l.src])try{this.promiseCache[c]||(this.promiseCache[c]=this._getLoadPromiseAndParser(c,l)),n[l.src]=await this.promiseCache[c].promise,t&&t(++i/o)}catch(u){throw delete this.promiseCache[c],delete n[l.src],new Error(`[Loader.load] Failed to load ${c}. +${u}`)}});return await Promise.all(h),r?n[a[0].src]:n}async unload(e){const t=en(e,i=>({alias:[i],src:i})).map(async i=>{var a,o;const n=wi.toAbsolute(i.src),r=this.promiseCache[n];if(r){const h=await r.promise;delete this.promiseCache[n],(o=(a=r.parser)==null?void 0:a.unload)==null||o.call(a,h,i,this)}});await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}}var Is=(s=>(s[s.Low=0]="Low",s[s.Normal=1]="Normal",s[s.High=2]="High",s))(Is||{});const IE=".json",RE="application/json",PE={extension:{type:He.LoadParser,priority:Is.Low},name:"loadJson",test(s){return Do(s,RE)||bs(s,IE)},async load(s){return await(await We.ADAPTER.fetch(s)).json()}};tt.add(PE);const kE=".txt",FE="text/plain",OE={name:"loadTxt",extension:{type:He.LoadParser,priority:Is.Low},test(s){return Do(s,FE)||bs(s,kE)},async load(s){return await(await We.ADAPTER.fetch(s)).text()}};tt.add(OE);const BE=["normal","bold","100","200","300","400","500","600","700","800","900"],LE=[".ttf",".otf",".woff",".woff2"],DE=["font/ttf","font/otf","font/woff","font/woff2"],NE=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function UE(s){const e=wi.extname(s),t=wi.basename(s,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1));let i=t.length>0;for(const r of t)if(!r.match(NE)){i=!1;break}let n=t.join(" ");return i||(n=`"${n.replace(/[\\"]/g,"\\$&")}"`),n}const XE=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function VE(s){return XE.test(s)?s:encodeURI(s)}const YE={extension:{type:He.LoadParser,priority:Is.Low},name:"loadWebFont",test(s){return Do(s,DE)||bs(s,LE)},async load(s,e){var i,n,r;const t=We.ADAPTER.getFontFaceSet();if(t){const a=[],o=((i=e.data)==null?void 0:i.family)??UE(s),h=((r=(n=e.data)==null?void 0:n.weights)==null?void 0:r.filter(c=>BE.includes(c)))??["normal"],l=e.data??{};for(let c=0;cWe.ADAPTER.getFontFaceSet().delete(e))}};tt.add(YE);const $E=`(function() { "use strict"; const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII="; async function checkImageBitmap() { @@ -903,7 +903,7 @@ ${u}`)}});return await Promise.all(h),r?n[a[0].src]:n}async unload(e){const t=en self.postMessage(result); }); })(); -`;let wo=null,pm=class{constructor(){wo||(wo=URL.createObjectURL(new Blob([$C],{type:"application/javascript"}))),this.worker=new Worker(wo)}};pm.revokeObjectURL=function(){wo&&(URL.revokeObjectURL(wo),wo=null)};const GC=`(function() { +`;let wo=null,pm=class{constructor(){wo||(wo=URL.createObjectURL(new Blob([$E],{type:"application/javascript"}))),this.worker=new Worker(wo)}};pm.revokeObjectURL=function(){wo&&(URL.revokeObjectURL(wo),wo=null)};const GE=`(function() { "use strict"; async function loadImageBitmap(url) { const response = await fetch(url); @@ -929,8 +929,8 @@ ${u}`)}});return await Promise.all(h),r?n[a[0].src]:n}async unload(e){const t=en } }; })(); -`;let So=null;class Hb{constructor(){So||(So=URL.createObjectURL(new Blob([GC],{type:"application/javascript"}))),this.worker=new Worker(So)}}Hb.revokeObjectURL=function(){So&&(URL.revokeObjectURL(So),So=null)};let uv=0,rf;class HC{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:t}=new pm;t.addEventListener("message",i=>{t.terminate(),pm.revokeObjectURL(),e(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){rf===void 0&&(rf=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const i=new Promise((n,r)=>{this.queue.push({id:e,arguments:t,resolve:n,reject:r})});return this.next(),i}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),i=t.id;this.resolveHash[uv]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:uv++,id:i})}}const dv=new HC;function zl(s,e,t){s.resource.internal=!0;const i=new gt(s),n=()=>{delete e.promiseCache[t],va.has(t)&&va.remove(t)};return i.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),n())}),i.once("destroyed",()=>{s.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),n())}),i}const jC=[".jpeg",".jpg",".png",".webp",".avif"],WC=["image/jpeg","image/png","image/webp","image/avif"];async function zC(s){const e=await We.ADAPTER.fetch(s);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${s}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const Mu={name:"loadTextures",extension:{type:He.LoadParser,priority:Is.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(s){return Do(s,WC)||bs(s,jC)},async load(s,e,t){var o;const i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let n;i?this.config.preferWorkers&&await dv.isImageBitmapSupported()?n=await dv.loadImageBitmap(s):n=await zC(s):n=await new Promise((h,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=s,c.complete?h(c):(c.onload=()=>h(c),c.onerror=u=>l(u))});const r={...e.data};r.resolution??(r.resolution=pr(s)),i&&((o=r.resourceOptions)==null?void 0:o.ownsImageBitmap)===void 0&&(r.resourceOptions={...r.resourceOptions},r.resourceOptions.ownsImageBitmap=!0);const a=new yt(n,r);return a.resource.src=s,zl(a,t,s)},unload(s){s.destroy(!0)}};tt.add(Mu);const qC=".svg",KC="image/svg+xml",ZC={extension:{type:He.LoadParser,priority:Is.High},name:"loadSVG",test(s){return Do(s,KC)||bs(s,qC)},async testParse(s){return rm.test(s)},async parse(s,e,t){var r;const i=new rm(s,(r=e==null?void 0:e.data)==null?void 0:r.resourceOptions);await i.load();const n=new yt(i,{resolution:pr(s),...e==null?void 0:e.data});return n.resource.src=e.src,zl(n,t,e.src)},async load(s,e){return(await We.ADAPTER.fetch(s)).text()},unload:Mu.unload};tt.add(ZC);const JC=[".mp4",".m4v",".webm",".ogv"],QC=["video/mp4","video/webm","video/ogg"],e2={name:"loadVideo",extension:{type:He.LoadParser,priority:Is.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(s){return Do(s,QC)||bs(s,JC)},async load(s,e,t){var a;let i;const n=await(await We.ADAPTER.fetch(s)).blob(),r=URL.createObjectURL(n);try{const o={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(a=e==null?void 0:e.data)==null?void 0:a.resourceOptions,autoLoad:!0},h=new Db(r,o);await h.load();const l=new yt(h,{alphaMode:await oA(),resolution:pr(s),...e==null?void 0:e.data});l.resource.src=s,i=zl(l,t,s),i.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(r)})}catch(o){throw URL.revokeObjectURL(r),o}return i},unload(s){s.destroy(!0)}};tt.add(e2);class t2{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...e){e.forEach(t=>{this._preferredOrder.push(t),t.priority||(t.priority=Object.keys(t.params))}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e=="string")this._defaultSearchParams=e;else{const t=e;this._defaultSearchParams=Object.keys(t).map(i=>`${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`).join("&")}}getAlias(e){const{alias:t,name:i,src:n,srcs:r}=e;return en(t||i||n||r,a=>typeof a=="string"?a:Array.isArray(a)?a.map(o=>(o==null?void 0:o.src)??(o==null?void 0:o.srcs)??o):a!=null&&a.src||a!=null&&a.srcs?a.src??a.srcs:a,!0)}addManifest(e){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=e,e.bundles.forEach(t=>{this.addBundle(t.name,t.assets)})}addBundle(e,t){const i=[];Array.isArray(t)?t.forEach(n=>{const r=n.src??n.srcs,a=n.alias??n.name;let o;if(typeof a=="string"){const h=this._createBundleAssetId(e,a);i.push(h),o=[a,h]}else{const h=a.map(l=>this._createBundleAssetId(e,l));i.push(...h),o=[...a,...h]}this.add({...n,alias:o,src:r})}):Object.keys(t).forEach(n=>{const r=[n,this._createBundleAssetId(e,n)];if(typeof t[n]=="string")this.add({alias:r,src:t[n]});else if(Array.isArray(t[n]))this.add({alias:r,src:t[n]});else{const a=t[n],o=a.src??a.srcs;this.add({...a,alias:r,src:Array.isArray(o)?o:[o]})}i.push(...r)}),this._bundles[e]=i}add(e,t,i,n,r){const a=[];typeof e=="string"||Array.isArray(e)&&typeof e[0]=="string"?(kt("7.2.0",`Assets.add now uses an object instead of individual parameters. -Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),a.push({alias:e,src:t,data:i,format:n,loadParser:r})):Array.isArray(e)?a.push(...e):a.push(e);let o;o=h=>{this.hasKey(h)&&console.warn(`[Resolver] already has key: ${h} overwriting`)},en(a).forEach(h=>{const{src:l,srcs:c}=h;let{data:u,format:d,loadParser:f}=h;const p=en(l||c).map(v=>typeof v=="string"?AC(v):Array.isArray(v)?v:[v]),m=this.getAlias(h);Array.isArray(m)?m.forEach(o):o(m);const g=[];p.forEach(v=>{v.forEach(b=>{let y={};if(typeof b!="object"){y.src=b;for(let w=0;w{this._assetMap[v]=g})})}resolveBundle(e){const t=_h(e);e=en(e);const i={};return e.forEach(n=>{const r=this._bundles[n];if(r){const a=this.resolve(r),o={};for(const h in a){const l=a[h];o[this._extractAssetIdFromBundle(n,h)]=l}i[n]=o}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const n in t)i[n]=t[n].src;return i}return t.src}resolve(e){const t=_h(e);e=en(e);const i={};return e.forEach(n=>{if(!this._resolverHash[n])if(this._assetMap[n]){let r=this._assetMap[n];const a=r[0],o=this._getPreferredOrder(r);o==null||o.priority.forEach(h=>{o.params[h].forEach(l=>{const c=r.filter(u=>u[h]?u[h]===l:!1);c.length&&(r=c)})}),this._resolverHash[n]=r[0]??a}else this._resolverHash[n]=this.buildResolvedAsset({alias:[n],src:n},{});i[n]=this._resolverHash[n]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;tr.params.format.includes(i.format));if(n)return n}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:i,data:n,loadParser:r,format:a}=t;return(this._basePath||this._rootPath)&&(e.src=wi.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...n||{},...e.data},e.loadParser=r??e.loadParser,e.format=a??e.format??wi.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class i2{constructor(){this._detections=[],this._initialized=!1,this.resolver=new t2,this.loader=new CC,this.cache=va,this._backgroundLoader=new TC(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){var r,a;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let o=e.manifest;typeof o=="string"&&(o=await this.load(o)),this.resolver.addManifest(o)}const t=((r=e.texturePreference)==null?void 0:r.resolution)??1,i=typeof t=="number"?[t]:t,n=await this._detectFormats({preferredFormats:(a=e.texturePreference)==null?void 0:a.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:n,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i,n,r){this.resolver.add(e,t,i,n,r)}async load(e,t){this._initialized||await this.init();const i=_h(e),n=en(e).map(o=>{if(typeof o!="string"){const h=this.resolver.getAlias(o);return h.some(l=>!this.resolver.hasKey(l))&&this.add(o),Array.isArray(h)?h[0]:h}return this.resolver.hasKey(o)||this.add({alias:o,src:o}),o}),r=this.resolver.resolve(n),a=await this._mapLoadToResolve(r,t);return i?a[n[0]]:a}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);const n=this.resolver.resolveBundle(e),r={},a=Object.keys(n);let o=0,h=0;const l=()=>{t==null||t(++o/h)},c=a.map(u=>{const d=n[u];return h+=Object.keys(d).length,this._mapLoadToResolve(d,l).then(f=>{r[u]=f})});return await Promise.all(c),i?r[e[0]]:r}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return va.get(e);const t={};for(let i=0;i{const l=r[o.src],c=[o.src];o.alias&&c.push(...o.alias),a[n[h]]=l,va.set(c,l)}),a}async unload(e){this._initialized||await this.init();const t=en(e).map(n=>typeof n!="string"?n.src:n),i=this.resolver.resolve(t);await this._unloadFromResolved(i)}async unloadBundle(e){this._initialized||await this.init(),e=en(e);const t=this.resolver.resolveBundle(e),i=Object.keys(t).map(n=>this._unloadFromResolved(t[n]));await Promise.all(i)}async _unloadFromResolved(e){const t=Object.values(e);t.forEach(i=>{va.remove(i.src)}),await this.loader.unload(t)}async _detectFormats(e){let t=[];e.preferredFormats&&(t=Array.isArray(e.preferredFormats)?e.preferredFormats:[e.preferredFormats]);for(const i of e.detections)e.skipDetections||await i.test()?t=await i.add(t):e.skipDetections||(t=await i.remove(t));return t=t.filter((i,n)=>t.indexOf(i)===n),t}get detections(){return this._detections}get preferWorkers(){return Mu.config.preferWorkers}set preferWorkers(e){kt("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:e})}setPreferences(e){this.loader.parsers.forEach(t=>{t.config&&Object.keys(t.config).filter(i=>i in e).forEach(i=>{t.config[i]=e[i]})})}}const Fn=new i2;tt.handleByList(He.LoadParser,Fn.loader.parsers).handleByList(He.ResolveParser,Fn.resolver.parsers).handleByList(He.CacheParser,Fn.cache.parsers).handleByList(He.DetectionParser,Fn.detections);const s2={extension:He.CacheParser,test:s=>Array.isArray(s)&&s.every(e=>e instanceof gt),getCacheableAssets:(s,e)=>{const t={};return s.forEach(i=>{e.forEach((n,r)=>{t[i+(r===0?"":r+1)]=n})}),t}};tt.add(s2);async function jb(s){if("Image"in globalThis)return new Promise(e=>{const t=new Image;t.onload=()=>{e(!0)},t.onerror=()=>{e(!1)},t.src=s});if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const e=await(await fetch(s)).blob();await createImageBitmap(e)}catch{return!1}return!0}return!1}const n2={extension:{type:He.DetectionParser,priority:1},test:async()=>jb("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async s=>[...s,"avif"],remove:async s=>s.filter(e=>e!=="avif")};tt.add(n2);const r2={extension:{type:He.DetectionParser,priority:0},test:async()=>jb("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async s=>[...s,"webp"],remove:async s=>s.filter(e=>e!=="webp")};tt.add(r2);const fv=["png","jpg","jpeg"],a2={extension:{type:He.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async s=>[...s,...fv],remove:async s=>s.filter(e=>!fv.includes(e))};tt.add(a2);const o2="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function yp(s){return o2?!1:document.createElement("video").canPlayType(s)!==""}const l2={extension:{type:He.DetectionParser,priority:0},test:async()=>yp("video/webm"),add:async s=>[...s,"webm"],remove:async s=>s.filter(e=>e!=="webm")};tt.add(l2);const c2={extension:{type:He.DetectionParser,priority:0},test:async()=>yp("video/mp4"),add:async s=>[...s,"mp4","m4v"],remove:async s=>s.filter(e=>e!=="mp4"&&e!=="m4v")};tt.add(c2);const h2={extension:{type:He.DetectionParser,priority:0},test:async()=>yp("video/ogg"),add:async s=>[...s,"ogv"],remove:async s=>s.filter(e=>e!=="ogv")};tt.add(h2);const u2={extension:He.ResolveParser,test:Mu.test,parse:s=>{var e;return{resolution:parseFloat(((e=We.RETINA_PREFIX.exec(s))==null?void 0:e[1])??"1"),format:wi.extname(s).slice(1),src:s}}};tt.add(u2);var Xi=(s=>(s[s.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",s[s.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",s[s.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",s[s.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",s[s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",s[s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",s[s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",s[s.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",s[s.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",s[s.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",s[s.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",s[s.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",s[s.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",s[s.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",s[s.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",s[s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",s[s.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",s[s.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",s[s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",s[s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",s[s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",s[s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",s[s.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",s[s.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",s[s.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35987]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",s[s.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",s[s.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",s[s.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",s[s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",s[s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",s[s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",s))(Xi||{});const Th={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35987:1,34798:1,37808:1,36492:1,36493:1,36494:1,36495:1};let gn,ro;function mv(){ro={bptc:gn.getExtension("EXT_texture_compression_bptc"),astc:gn.getExtension("WEBGL_compressed_texture_astc"),etc:gn.getExtension("WEBGL_compressed_texture_etc"),s3tc:gn.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:gn.getExtension("WEBGL_compressed_texture_s3tc_srgb"),pvrtc:gn.getExtension("WEBGL_compressed_texture_pvrtc")||gn.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:gn.getExtension("WEBGL_compressed_texture_etc1"),atc:gn.getExtension("WEBGL_compressed_texture_atc")}}const d2={extension:{type:He.DetectionParser,priority:2},test:async()=>{const s=We.ADAPTER.createCanvas().getContext("webgl");return s?(gn=s,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async s=>{ro||mv();const e=[];for(const t in ro)ro[t]&&e.push(t);return[...e,...s]},remove:async s=>(ro||mv(),s.filter(e=>!(e in ro)))};tt.add(d2);class f2 extends yu{constructor(e,t={width:1,height:1,autoLoad:!0}){let i,n;typeof e=="string"?(i=e,n=new Uint8Array):(i=null,n=e),super(n,t),this.origin=i,this.buffer=n?new jf(n):null,this._load=null,this.loaded=!1,this.origin!==null&&t.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(e){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(e=>e.blob()).then(e=>e.arrayBuffer()).then(e=>(this.data=new Uint32Array(e),this.buffer=new jf(e),this.loaded=!0,this.onBlobLoaded(e),this.update(),this)),this._load)}}class Ia extends f2{constructor(e,t){super(e,t),this.format=t.format,this.levels=t.levels||1,this._width=t.width,this._height=t.height,this._extension=Ia._formatToExtension(this.format),(t.levelBuffers||this.buffer)&&(this._levelBuffers=t.levelBuffers||Ia._createLevelBuffers(e instanceof Uint8Array?e:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(e,t,i){const n=e.gl;if(!e.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;n.pixelStorei(n.UNPACK_ALIGNMENT,4);for(let r=0,a=this.levels;r=33776&&e<=33779)return"s3tc";if(e>=35916&&e<=35919)return"s3tc_sRGB";if(e>=37488&&e<=37497)return"etc";if(e>=35840&&e<=35843)return"pvrtc";if(e===36196)return"etc1";if(e===35986||e===35987||e===34798)return"atc";if(e>=36492&&e<=36495)return"bptc";if(e===37808)return"astc";throw new Error(`Invalid (compressed) texture format given: ${e}`)}static _createLevelBuffers(e,t,i,n,r,a,o){const h=new Array(i);let l=e.byteOffset,c=a,u=o,d=c+n-1&~(n-1),f=u+r-1&~(r-1),p=d*f*Th[t];for(let m=0;m1?c:d,levelHeight:i>1?u:f,levelBuffer:new Uint8Array(e.buffer,l,p)},l+=p,c=c>>1||1,u=u>>1||1,d=c+n-1&~(n-1),f=u+r-1&~(r-1),p=d*f*Th[t];return h}}const af=4,yc=124,m2=32,pv=20,p2=542327876,xc={HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},g2={FOURCC:2},bc={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3},v2=1,y2=2,x2=4,b2=64,w2=512,S2=131072,M2=827611204,_2=861165636,T2=894720068,A2=808540228,E2=4,C2={[M2]:Xi.COMPRESSED_RGBA_S3TC_DXT1_EXT,[_2]:Xi.COMPRESSED_RGBA_S3TC_DXT3_EXT,[T2]:Xi.COMPRESSED_RGBA_S3TC_DXT5_EXT},I2={70:Xi.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:Xi.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:Xi.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:Xi.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:Xi.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:Xi.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:Xi.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:Xi.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:Xi.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,96:Xi.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,95:Xi.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,98:Xi.COMPRESSED_RGBA_BPTC_UNORM_EXT,99:Xi.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT};function R2(s){const e=new Uint32Array(s);if(e[0]!==p2)throw new Error("Invalid DDS file magic word");const t=new Uint32Array(s,0,yc/Uint32Array.BYTES_PER_ELEMENT),i=t[xc.HEIGHT],n=t[xc.WIDTH],r=t[xc.MIPMAP_COUNT],a=new Uint32Array(s,xc.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,m2/Uint32Array.BYTES_PER_ELEMENT),o=a[v2];if(o&x2){const h=a[g2.FOURCC];if(h!==A2){const b=C2[h],y=af+yc,w=new Uint8Array(s,y);return[new Ia(w,{format:b,width:n,height:i,levels:r})]}const l=af+yc,c=new Uint32Array(e.buffer,l,pv/Uint32Array.BYTES_PER_ELEMENT),u=c[bc.DXGI_FORMAT],d=c[bc.RESOURCE_DIMENSION],f=c[bc.MISC_FLAG],p=c[bc.ARRAY_SIZE],m=I2[u];if(m===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${u}`);if(f===E2)throw new Error("DDSParser does not support cubemap textures");if(d===6)throw new Error("DDSParser does not supported 3D texture data");const g=new Array,v=af+yc+pv;if(p===1)g.push(new Uint8Array(s,v));else{const b=Th[m];let y=0,w=n,A=i;for(let _=0;_>>1,A=A>>>1}let T=v;for(let _=0;_new Ia(b,{format:m,width:n,height:i,levels:r}))}throw o&b2?new Error("DDSParser does not support uncompressed texture data."):o&w2?new Error("DDSParser does not supported YUV uncompressed texture data."):o&S2?new Error("DDSParser does not support single-channel (lumninance) texture data!"):o&y2?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const gv=[171,75,84,88,32,49,49,187,13,10,26,10],P2=67305985,qs={ENDIANNESS:12,GL_TYPE:16,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},gm=64,vv={[et.UNSIGNED_BYTE]:1,[et.UNSIGNED_SHORT]:2,[et.INT]:4,[et.UNSIGNED_INT]:4,[et.FLOAT]:4,[et.HALF_FLOAT]:8},k2={[Ne.RGBA]:4,[Ne.RGB]:3,[Ne.RG]:2,[Ne.RED]:1,[Ne.LUMINANCE]:1,[Ne.LUMINANCE_ALPHA]:2,[Ne.ALPHA]:1},F2={[et.UNSIGNED_SHORT_4_4_4_4]:2,[et.UNSIGNED_SHORT_5_5_5_1]:2,[et.UNSIGNED_SHORT_5_6_5]:2};function O2(s,e,t=!1){const i=new DataView(e);if(!B2(s,i))return null;const n=i.getUint32(qs.ENDIANNESS,!0)===P2,r=i.getUint32(qs.GL_TYPE,n),a=i.getUint32(qs.GL_FORMAT,n),o=i.getUint32(qs.GL_INTERNAL_FORMAT,n),h=i.getUint32(qs.PIXEL_WIDTH,n),l=i.getUint32(qs.PIXEL_HEIGHT,n)||1,c=i.getUint32(qs.PIXEL_DEPTH,n)||1,u=i.getUint32(qs.NUMBER_OF_ARRAY_ELEMENTS,n)||1,d=i.getUint32(qs.NUMBER_OF_FACES,n),f=i.getUint32(qs.NUMBER_OF_MIPMAP_LEVELS,n),p=i.getUint32(qs.BYTES_OF_KEY_VALUE_DATA,n);if(l===0||c!==1)throw new Error("Only 2D textures are supported");if(d!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(u!==1)throw new Error("WebGL does not support array textures");const m=4,g=4,v=h+3&-4,b=l+3&-4,y=new Array(u);let w=h*l;r===0&&(w=v*b);let A;if(r!==0?vv[r]?A=vv[r]*k2[a]:A=F2[r]:A=Th[o],A===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const T=t?D2(i,p,n):null;let _=w*A,R=h,P=l,F=v,I=b,k=gm+p;for(let B=0;B1||r!==0?R:F,levelHeight:f>1||r!==0?P:I,levelBuffer:new Uint8Array(e,U,_)},U+=_}k+=D+4,k=k%4!==0?k+4-k%4:k,R=R>>1||1,P=P>>1||1,F=R+m-1&-4,I=P+g-1&-4,_=F*I*A}return r!==0?{uncompressed:y.map(B=>{let D=B[0].levelBuffer,U=!1;return r===et.FLOAT?D=new Float32Array(B[0].levelBuffer.buffer,B[0].levelBuffer.byteOffset,B[0].levelBuffer.byteLength/4):r===et.UNSIGNED_INT?(U=!0,D=new Uint32Array(B[0].levelBuffer.buffer,B[0].levelBuffer.byteOffset,B[0].levelBuffer.byteLength/4)):r===et.INT&&(U=!0,D=new Int32Array(B[0].levelBuffer.buffer,B[0].levelBuffer.byteOffset,B[0].levelBuffer.byteLength/4)),{resource:new yu(D,{width:B[0].levelWidth,height:B[0].levelHeight}),type:r,format:U?L2(a):a}}),kvData:T}:{compressed:y.map(B=>new Ia(null,{format:o,width:h,height:l,levels:f,levelBuffers:B})),kvData:T}}function B2(s,e){for(let t=0;te-n){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let h=0;for(;h{const a=new yt(r,{mipmap:Ys.OFF,alphaMode:Ni.NO_PREMULTIPLIED_ALPHA,resolution:pr(s),...e.data});return zl(a,t,s)});return n.length===1?n[0]:n},unload(s){Array.isArray(s)?s.forEach(e=>e.destroy(!0)):s.destroy(!0)}};tt.add(N2);const U2={extension:{type:He.LoadParser,priority:Is.High},name:"loadKTX",test(s){return bs(s,".ktx")},async load(s,e,t){const i=await(await We.ADAPTER.fetch(s)).arrayBuffer(),{compressed:n,uncompressed:r,kvData:a}=O2(s,i),o=n??r,h={mipmap:Ys.OFF,alphaMode:Ni.NO_PREMULTIPLIED_ALPHA,resolution:pr(s),...e.data},l=o.map(c=>{o===r&&Object.assign(h,{type:c.type,format:c.format});const u=c.resource??c,d=new yt(u,h);return d.ktxKeyValueData=a,zl(d,t,s)});return l.length===1?l[0]:l},unload(s){Array.isArray(s)?s.forEach(e=>e.destroy(!0)):s.destroy(!0)}};tt.add(U2);const X2=["s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"],V2={extension:He.ResolveParser,test:s=>{const e=wi.extname(s).slice(1);return["basis","ktx","dds"].includes(e)},parse:s=>{var i,n;const e=s.split("."),t=e.pop();if(["ktx","dds"].includes(t)){const r=e.pop();if(X2.includes(r))return{resolution:parseFloat(((i=We.RETINA_PREFIX.exec(s))==null?void 0:i[1])??"1"),format:r,src:s}}return{resolution:parseFloat(((n=We.RETINA_PREFIX.exec(s))==null?void 0:n[1])??"1"),format:t,src:s}}};tt.add(V2);const wc=new Tt,Y2=4,Wb=class al{constructor(e){this.renderer=e,this._rendererPremultipliedAlpha=!1}contextChange(){var t;const e=(t=this.renderer)==null?void 0:t.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}async image(e,t,i,n){const r=new Image;return r.src=await this.base64(e,t,i,n),r}async base64(e,t,i,n){const r=this.canvas(e,n);if(r.toBlob!==void 0)return new Promise((a,o)=>{r.toBlob(h=>{if(!h){o(new Error("ICanvas.toBlob failed!"));return}const l=new FileReader;l.onload=()=>a(l.result),l.onerror=o,l.readAsDataURL(h)},t,i)});if(r.toDataURL!==void 0)return r.toDataURL(t,i);if(r.convertToBlob!==void 0){const a=await r.convertToBlob({type:t,quality:i});return new Promise((o,h)=>{const l=new FileReader;l.onload=()=>o(l.result),l.onerror=h,l.readAsDataURL(a)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:i,width:n,height:r,flipY:a,premultipliedAlpha:o}=this._rawPixels(e,t);a&&al._flipY(i,n,r),o&&al._unpremultiplyAlpha(i);const h=new MA(n,r,1),l=new ImageData(new Uint8ClampedArray(i.buffer),n,r);return h.context.putImageData(l,0,0),h.canvas}pixels(e,t){const{pixels:i,width:n,height:r,flipY:a,premultipliedAlpha:o}=this._rawPixels(e,t);return a&&al._flipY(i,n,r),o&&al._unpremultiplyAlpha(i),i}_rawPixels(e,t){const i=this.renderer;if(!i)throw new Error("The Extract has already been destroyed");let n,r=!1,a=!1,o,h=!1;e&&(e instanceof Ua?o=e:(o=i.generateTexture(e,{region:t,resolution:i.resolution,multisample:i.multisample}),h=!0,t&&(wc.width=t.width,wc.height=t.height,t=wc)));const l=i.gl;if(o){if(n=o.baseTexture.resolution,t=t??o.frame,r=!1,a=o.baseTexture.alphaMode>0&&o.baseTexture.format===Ne.RGBA,!h){i.renderTexture.bind(o);const f=o.framebuffer.glFramebuffers[i.CONTEXT_UID];f.blitFramebuffer&&i.framebuffer.bind(f.blitFramebuffer)}}else n=i.resolution,t||(t=wc,t.width=i.width/n,t.height=i.height/n),r=!0,a=this._rendererPremultipliedAlpha,i.renderTexture.bind();const c=Math.max(Math.round(t.width*n),1),u=Math.max(Math.round(t.height*n),1),d=new Uint8Array(Y2*c*u);return l.readPixels(Math.round(t.x*n),Math.round(t.y*n),c,u,l.RGBA,l.UNSIGNED_BYTE,d),h&&(o==null||o.destroy(!0)),{pixels:d,width:c,height:u,flipY:r,premultipliedAlpha:a}}destroy(){this.renderer=null}static _flipY(e,t,i){const n=t<<2,r=i>>1,a=new Uint8Array(n);for(let o=0;o=0&&o>=0&&n>=0&&r>=0)){e.length=0;return}const h=Math.ceil(2.3*Math.sqrt(a+o)),l=h*8+(n?4:0)+(r?4:0);if(e.length=l,l===0)return;if(h===0){e.length=8,e[0]=e[6]=t+n,e[1]=e[3]=i+r,e[2]=e[4]=t-n,e[5]=e[7]=i-r;return}let c=0,u=h*4+(n?2:0)+2,d=u,f=l;{const p=n+a,m=r,g=t+p,v=t-p,b=i+m;if(e[c++]=g,e[c++]=b,e[--u]=b,e[--u]=v,r){const y=i-m;e[d++]=v,e[d++]=y,e[--f]=y,e[--f]=g}}for(let p=1;p0||e&&i<=0){const n=t/2;for(let r=n+n%2;r=6){yv(t,!1);const a=[];for(let l=0;l=0&&r>=0&&a.push(t,i,t+n,i,t+n,i+r,t,i+r)},triangulate(s,e){const t=s.points,i=e.points;if(t.length===0)return;const n=i.length/2;i.push(t[0],t[1],t[2],t[3],t[6],t[7],t[4],t[5]),e.indices.push(n,n+1,n+2,n+1,n+2,n+3)}},H2={build(s){Ah.build(s)},triangulate(s,e){Ah.triangulate(s,e)}};var Ls=(s=>(s.MITER="miter",s.BEVEL="bevel",s.ROUND="round",s))(Ls||{}),Ur=(s=>(s.BUTT="butt",s.ROUND="round",s.SQUARE="square",s))(Ur||{});const Co={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(s,e=20){if(!this.adaptive||!s||isNaN(s))return e;let t=Math.ceil(s/this.maxLength);return tthis.maxSegments&&(t=this.maxSegments),t}};class xv{static curveTo(e,t,i,n,r,a){const o=a[a.length-2],h=a[a.length-1]-t,l=o-e,c=n-t,u=i-e,d=Math.abs(h*u-l*c);if(d<1e-8||r===0)return(a[a.length-2]!==e||a[a.length-1]!==t)&&a.push(e,t),null;const f=h*h+l*l,p=c*c+u*u,m=h*c+l*u,g=r*Math.sqrt(f)/d,v=r*Math.sqrt(p)/d,b=g*m/f,y=v*m/p,w=g*u+v*l,A=g*c+v*h,T=l*(v+b),_=h*(v+b),R=u*(g+y),P=c*(g+y),F=Math.atan2(_-A,T-w),I=Math.atan2(P-A,R-w);return{cx:w+e,cy:A+t,radius:r,startAngle:F,endAngle:I,anticlockwise:l*c>u*h}}static arc(e,t,i,n,r,a,o,h,l){const c=o-a,u=Co._segmentsCount(Math.abs(c)*r,Math.ceil(Math.abs(c)/vh)*40),d=c/(u*2),f=d*2,p=Math.cos(d),m=Math.sin(d),g=u-1,v=g%1/g;for(let b=0;b<=g;++b){const y=b+v*b,w=d+a+f*y,A=Math.cos(w),T=-Math.sin(w);l.push((p*A+m*T)*r+i,(p*-T+m*A)*r+n)}}}class j2{constructor(){this.reset()}begin(e,t,i){this.reset(),this.style=e,this.start=t,this.attribStart=i}end(e,t){this.attribSize=t-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class xp{static curveLength(e,t,i,n,r,a,o,h){let l=0,c=0,u=0,d=0,f=0,p=0,m=0,g=0,v=0,b=0,y=0,w=e,A=t;for(let T=1;T<=10;++T)c=T/10,u=c*c,d=u*c,f=1-c,p=f*f,m=p*f,g=m*e+3*p*c*i+3*f*u*r+d*o,v=m*t+3*p*c*n+3*f*u*a+d*h,b=w-g,y=A-v,w=g,A=v,l+=Math.sqrt(b*b+y*y);return l}static curveTo(e,t,i,n,r,a,o){const h=o[o.length-2],l=o[o.length-1];o.length-=2;const c=Co._segmentsCount(xp.curveLength(h,l,e,t,i,n,r,a));let u=0,d=0,f=0,p=0,m=0;o.push(h,l);for(let g=1,v=0;g<=c;++g)v=g/c,u=1-v,d=u*u,f=d*u,p=v*v,m=p*v,o.push(f*h+3*d*v*e+3*u*p*i+m*r,f*l+3*d*v*t+3*u*p*n+m*a)}}function bv(s,e,t,i,n,r,a,o){const h=s-t*n,l=e-i*n,c=s+t*r,u=e+i*r;let d,f;a?(d=i,f=-t):(d=-i,f=t);const p=h+d,m=l+f,g=c+d,v=u+f;return o.push(p,m,g,v),2}function la(s,e,t,i,n,r,a,o){const h=t-s,l=i-e;let c=Math.atan2(h,l),u=Math.atan2(n-s,r-e);o&&cu&&(u+=Math.PI*2);let d=c;const f=u-c,p=Math.abs(f),m=Math.sqrt(h*h+l*l),g=(15*p*Math.sqrt(m)/Math.PI>>0)+1,v=f/g;if(d+=v,o){a.push(s,e,t,i);for(let b=1,y=d;b=0&&(r.join===Ls.ROUND?d+=la(y,w,y-_*B,w-R*B,y-P*B,w-F*B,c,!1)+4:d+=2,c.push(y-P*D,w-F*D,y+P*B,w+F*B));continue}const K=(-_+v)*(-R+w)-(-_+y)*(-R+b),fe=(-P+A)*(-F+w)-(-P+y)*(-F+T),me=(O*fe-E*K)/W,we=(V*K-X*fe)/W,Ee=(me-y)*(me-y)+(we-w)*(we-w),pe=y+(me-y)*B,Ae=w+(we-w)*B,G=y-(me-y)*D,Z=w-(we-w)*D,z=Math.min(O*O+X*X,E*E+V*V),j=J?B:D,te=z+j*j*m,he=Ee<=te;let xe=r.join;if(xe===Ls.MITER&&Ee/m>g&&(xe=Ls.BEVEL),he)switch(xe){case Ls.MITER:{c.push(pe,Ae,G,Z);break}case Ls.BEVEL:{J?c.push(pe,Ae,y+_*D,w+R*D,pe,Ae,y+P*D,w+F*D):c.push(y-_*B,w-R*B,G,Z,y-P*B,w-F*B,G,Z),d+=2;break}case Ls.ROUND:{J?(c.push(pe,Ae,y+_*D,w+R*D),d+=la(y,w,y+_*D,w+R*D,y+P*D,w+F*D,c,!0)+4,c.push(pe,Ae,y+P*D,w+F*D)):(c.push(y-_*B,w-R*B,G,Z),d+=la(y,w,y-_*B,w-R*B,y-P*B,w-F*B,c,!1)+4,c.push(y-P*B,w-F*B,G,Z));break}}else{switch(c.push(y-_*B,w-R*B,y+_*D,w+R*D),xe){case Ls.MITER:{J?c.push(G,Z,G,Z):c.push(pe,Ae,pe,Ae),d+=2;break}case Ls.ROUND:{J?d+=la(y,w,y+_*D,w+R*D,y+P*D,w+F*D,c,!0)+2:d+=la(y,w,y-_*B,w-R*B,y-P*B,w-F*B,c,!1)+2;break}}c.push(y-P*B,w-F*B,y+P*D,w+F*D),d+=2}}v=i[(u-2)*2],b=i[(u-2)*2+1],y=i[(u-1)*2],w=i[(u-1)*2+1],_=-(b-w),R=v-y,I=Math.sqrt(_*_+R*R),_/=I,R/=I,_*=p,R*=p,c.push(y-_*B,w-R*B,y+_*D,w+R*D),h||(r.cap===Ur.ROUND?d+=la(y-_*(B-D)*.5,w-R*(B-D)*.5,y-_*B,w-R*B,y+_*D,w+R*D,c,!1)+2:r.cap===Ur.SQUARE&&(d+=bv(y,w,_,R,B,D,!1,c)));const U=e.indices,L=Co.epsilon*Co.epsilon;for(let N=f;N0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,i=null,n=null){const r=new Eh(e,t,i,n);return this.graphicsData.push(r),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const i=new Eh(e,null,null,t),n=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=n.lineStyle,n.holes.push(i),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(i=this.batches[this.batches.length-1],n=i.style);for(let h=this.shapeIndex;h65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&o===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=o?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(n=Sc.pop(),n||(n=new qf,n.texArray=new Qf),this.drawCalls.push(n)),n.start=c,n.size=0,n.texArray.count=0,n.type=l),m.touched=1,m._batchEnabled=e,m._batchLocation=r,m.wrapMode=an.REPEAT,n.texArray.elements[n.texArray.count++]=m,r++)),n.size+=d.size,c+=d.size,o=m._batchLocation,this.addColors(t,p.color,p.alpha,d.attribSize,d.attribStart),this.addTextureIds(i,o,d.attribSize,d.attribStart)}yt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,i=this.colors,n=this.textureIds,r=new ArrayBuffer(e.length*3*4),a=new Float32Array(r),o=new Uint32Array(r);let h=0;for(let l=0;l0&&e.alpha>0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:i},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new Ca,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new Ca,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const i=this.currentPath.points,n=i[i.length-2],r=i[i.length-1];return(n!==e||r!==t)&&i.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,i,n){this._initCurve();const r=this.currentPath.points;return r.length===0&&this.moveTo(0,0),bp.curveTo(e,t,i,n,r),this}bezierCurveTo(e,t,i,n,r,a){return this._initCurve(),xp.curveTo(e,t,i,n,r,a,this.currentPath.points),this}arcTo(e,t,i,n,r){this._initCurve(e,t);const a=this.currentPath.points,o=xv.curveTo(e,t,i,n,r,a);if(o){const{cx:h,cy:l,radius:c,startAngle:u,endAngle:d,anticlockwise:f}=o;this.arc(h,l,c,u,d,f)}return this}arc(e,t,i,n,r,a=!1){if(n===r)return this;if(!a&&r<=n?r+=vh:a&&n<=r&&(n+=vh),r-n===0)return this;const o=e+Math.cos(n)*i,h=t+Math.sin(n)*i,l=this._geometry.closePointEps;let c=this.currentPath?this.currentPath.points:null;if(c){const u=Math.abs(c[c.length-2]-o),d=Math.abs(c[c.length-1]-h);u0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:i},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,i,n){return this.drawShape(new Tt(e,t,i,n))}drawRoundedRect(e,t,i,n,r){return this.drawShape(new wu(e,t,i,n,r))}drawCircle(e,t,i){return this.drawShape(new xu(e,t,i))}drawEllipse(e,t,i,n){return this.drawShape(new bu(e,t,i,n))}drawPolygon(...e){let t,i=!0;const n=e[0];n.points?(i=n.closeStroke,t=n.points):Array.isArray(e[0])?t=e[0]:t=e;const r=new Ca(t);return r.closeStroke=i,this.drawShape(r),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===Hi.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,i=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=i,this.vertexData=new Float32Array(e.points);for(let n=0;n{const{worker:t}=new pm;t.addEventListener("message",i=>{t.terminate(),pm.revokeObjectURL(),e(i.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){rf===void 0&&(rf=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const i=new Promise((n,r)=>{this.queue.push({id:e,arguments:t,resolve:n,reject:r})});return this.next(),i}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),i=t.id;this.resolveHash[uv]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:uv++,id:i})}}const dv=new HE;function zl(s,e,t){s.resource.internal=!0;const i=new gt(s),n=()=>{delete e.promiseCache[t],va.has(t)&&va.remove(t)};return i.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),n())}),i.once("destroyed",()=>{s.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),n())}),i}const jE=[".jpeg",".jpg",".png",".webp",".avif"],WE=["image/jpeg","image/png","image/webp","image/avif"];async function zE(s){const e=await We.ADAPTER.fetch(s);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${s}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const Mu={name:"loadTextures",extension:{type:He.LoadParser,priority:Is.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(s){return Do(s,WE)||bs(s,jE)},async load(s,e,t){var o;const i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let n;i?this.config.preferWorkers&&await dv.isImageBitmapSupported()?n=await dv.loadImageBitmap(s):n=await zE(s):n=await new Promise((h,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=s,c.complete?h(c):(c.onload=()=>h(c),c.onerror=u=>l(u))});const r={...e.data};r.resolution??(r.resolution=pr(s)),i&&((o=r.resourceOptions)==null?void 0:o.ownsImageBitmap)===void 0&&(r.resourceOptions={...r.resourceOptions},r.resourceOptions.ownsImageBitmap=!0);const a=new yt(n,r);return a.resource.src=s,zl(a,t,s)},unload(s){s.destroy(!0)}};tt.add(Mu);const qE=".svg",KE="image/svg+xml",ZE={extension:{type:He.LoadParser,priority:Is.High},name:"loadSVG",test(s){return Do(s,KE)||bs(s,qE)},async testParse(s){return rm.test(s)},async parse(s,e,t){var r;const i=new rm(s,(r=e==null?void 0:e.data)==null?void 0:r.resourceOptions);await i.load();const n=new yt(i,{resolution:pr(s),...e==null?void 0:e.data});return n.resource.src=e.src,zl(n,t,e.src)},async load(s,e){return(await We.ADAPTER.fetch(s)).text()},unload:Mu.unload};tt.add(ZE);const JE=[".mp4",".m4v",".webm",".ogv"],QE=["video/mp4","video/webm","video/ogg"],eC={name:"loadVideo",extension:{type:He.LoadParser,priority:Is.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(s){return Do(s,QE)||bs(s,JE)},async load(s,e,t){var a;let i;const n=await(await We.ADAPTER.fetch(s)).blob(),r=URL.createObjectURL(n);try{const o={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(a=e==null?void 0:e.data)==null?void 0:a.resourceOptions,autoLoad:!0},h=new D1(r,o);await h.load();const l=new yt(h,{alphaMode:await oT(),resolution:pr(s),...e==null?void 0:e.data});l.resource.src=s,i=zl(l,t,s),i.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(r)})}catch(o){throw URL.revokeObjectURL(r),o}return i},unload(s){s.destroy(!0)}};tt.add(eC);class tC{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...e){e.forEach(t=>{this._preferredOrder.push(t),t.priority||(t.priority=Object.keys(t.params))}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e=="string")this._defaultSearchParams=e;else{const t=e;this._defaultSearchParams=Object.keys(t).map(i=>`${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`).join("&")}}getAlias(e){const{alias:t,name:i,src:n,srcs:r}=e;return en(t||i||n||r,a=>typeof a=="string"?a:Array.isArray(a)?a.map(o=>(o==null?void 0:o.src)??(o==null?void 0:o.srcs)??o):a!=null&&a.src||a!=null&&a.srcs?a.src??a.srcs:a,!0)}addManifest(e){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=e,e.bundles.forEach(t=>{this.addBundle(t.name,t.assets)})}addBundle(e,t){const i=[];Array.isArray(t)?t.forEach(n=>{const r=n.src??n.srcs,a=n.alias??n.name;let o;if(typeof a=="string"){const h=this._createBundleAssetId(e,a);i.push(h),o=[a,h]}else{const h=a.map(l=>this._createBundleAssetId(e,l));i.push(...h),o=[...a,...h]}this.add({...n,alias:o,src:r})}):Object.keys(t).forEach(n=>{const r=[n,this._createBundleAssetId(e,n)];if(typeof t[n]=="string")this.add({alias:r,src:t[n]});else if(Array.isArray(t[n]))this.add({alias:r,src:t[n]});else{const a=t[n],o=a.src??a.srcs;this.add({...a,alias:r,src:Array.isArray(o)?o:[o]})}i.push(...r)}),this._bundles[e]=i}add(e,t,i,n,r){const a=[];typeof e=="string"||Array.isArray(e)&&typeof e[0]=="string"?(kt("7.2.0",`Assets.add now uses an object instead of individual parameters. +Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),a.push({alias:e,src:t,data:i,format:n,loadParser:r})):Array.isArray(e)?a.push(...e):a.push(e);let o;o=h=>{this.hasKey(h)&&console.warn(`[Resolver] already has key: ${h} overwriting`)},en(a).forEach(h=>{const{src:l,srcs:c}=h;let{data:u,format:d,loadParser:f}=h;const p=en(l||c).map(v=>typeof v=="string"?AE(v):Array.isArray(v)?v:[v]),m=this.getAlias(h);Array.isArray(m)?m.forEach(o):o(m);const g=[];p.forEach(v=>{v.forEach(b=>{let y={};if(typeof b!="object"){y.src=b;for(let w=0;w{this._assetMap[v]=g})})}resolveBundle(e){const t=_h(e);e=en(e);const i={};return e.forEach(n=>{const r=this._bundles[n];if(r){const a=this.resolve(r),o={};for(const h in a){const l=a[h];o[this._extractAssetIdFromBundle(n,h)]=l}i[n]=o}}),t?i[e[0]]:i}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const i={};for(const n in t)i[n]=t[n].src;return i}return t.src}resolve(e){const t=_h(e);e=en(e);const i={};return e.forEach(n=>{if(!this._resolverHash[n])if(this._assetMap[n]){let r=this._assetMap[n];const a=r[0],o=this._getPreferredOrder(r);o==null||o.priority.forEach(h=>{o.params[h].forEach(l=>{const c=r.filter(u=>u[h]?u[h]===l:!1);c.length&&(r=c)})}),this._resolverHash[n]=r[0]??a}else this._resolverHash[n]=this.buildResolvedAsset({alias:[n],src:n},{});i[n]=this._resolverHash[n]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;tr.params.format.includes(i.format));if(n)return n}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:i,data:n,loadParser:r,format:a}=t;return(this._basePath||this._rootPath)&&(e.src=wi.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...n||{},...e.data},e.loadParser=r??e.loadParser,e.format=a??e.format??wi.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class iC{constructor(){this._detections=[],this._initialized=!1,this.resolver=new tC,this.loader=new CE,this.cache=va,this._backgroundLoader=new TE(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){var r,a;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let o=e.manifest;typeof o=="string"&&(o=await this.load(o)),this.resolver.addManifest(o)}const t=((r=e.texturePreference)==null?void 0:r.resolution)??1,i=typeof t=="number"?[t]:t,n=await this._detectFormats({preferredFormats:(a=e.texturePreference)==null?void 0:a.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:n,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i,n,r){this.resolver.add(e,t,i,n,r)}async load(e,t){this._initialized||await this.init();const i=_h(e),n=en(e).map(o=>{if(typeof o!="string"){const h=this.resolver.getAlias(o);return h.some(l=>!this.resolver.hasKey(l))&&this.add(o),Array.isArray(h)?h[0]:h}return this.resolver.hasKey(o)||this.add({alias:o,src:o}),o}),r=this.resolver.resolve(n),a=await this._mapLoadToResolve(r,t);return i?a[n[0]]:a}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);const n=this.resolver.resolveBundle(e),r={},a=Object.keys(n);let o=0,h=0;const l=()=>{t==null||t(++o/h)},c=a.map(u=>{const d=n[u];return h+=Object.keys(d).length,this._mapLoadToResolve(d,l).then(f=>{r[u]=f})});return await Promise.all(c),i?r[e[0]]:r}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return va.get(e);const t={};for(let i=0;i{const l=r[o.src],c=[o.src];o.alias&&c.push(...o.alias),a[n[h]]=l,va.set(c,l)}),a}async unload(e){this._initialized||await this.init();const t=en(e).map(n=>typeof n!="string"?n.src:n),i=this.resolver.resolve(t);await this._unloadFromResolved(i)}async unloadBundle(e){this._initialized||await this.init(),e=en(e);const t=this.resolver.resolveBundle(e),i=Object.keys(t).map(n=>this._unloadFromResolved(t[n]));await Promise.all(i)}async _unloadFromResolved(e){const t=Object.values(e);t.forEach(i=>{va.remove(i.src)}),await this.loader.unload(t)}async _detectFormats(e){let t=[];e.preferredFormats&&(t=Array.isArray(e.preferredFormats)?e.preferredFormats:[e.preferredFormats]);for(const i of e.detections)e.skipDetections||await i.test()?t=await i.add(t):e.skipDetections||(t=await i.remove(t));return t=t.filter((i,n)=>t.indexOf(i)===n),t}get detections(){return this._detections}get preferWorkers(){return Mu.config.preferWorkers}set preferWorkers(e){kt("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:e})}setPreferences(e){this.loader.parsers.forEach(t=>{t.config&&Object.keys(t.config).filter(i=>i in e).forEach(i=>{t.config[i]=e[i]})})}}const Fn=new iC;tt.handleByList(He.LoadParser,Fn.loader.parsers).handleByList(He.ResolveParser,Fn.resolver.parsers).handleByList(He.CacheParser,Fn.cache.parsers).handleByList(He.DetectionParser,Fn.detections);const sC={extension:He.CacheParser,test:s=>Array.isArray(s)&&s.every(e=>e instanceof gt),getCacheableAssets:(s,e)=>{const t={};return s.forEach(i=>{e.forEach((n,r)=>{t[i+(r===0?"":r+1)]=n})}),t}};tt.add(sC);async function j1(s){if("Image"in globalThis)return new Promise(e=>{const t=new Image;t.onload=()=>{e(!0)},t.onerror=()=>{e(!1)},t.src=s});if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const e=await(await fetch(s)).blob();await createImageBitmap(e)}catch{return!1}return!0}return!1}const nC={extension:{type:He.DetectionParser,priority:1},test:async()=>j1("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async s=>[...s,"avif"],remove:async s=>s.filter(e=>e!=="avif")};tt.add(nC);const rC={extension:{type:He.DetectionParser,priority:0},test:async()=>j1("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async s=>[...s,"webp"],remove:async s=>s.filter(e=>e!=="webp")};tt.add(rC);const fv=["png","jpg","jpeg"],aC={extension:{type:He.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async s=>[...s,...fv],remove:async s=>s.filter(e=>!fv.includes(e))};tt.add(aC);const oC="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function yp(s){return oC?!1:document.createElement("video").canPlayType(s)!==""}const lC={extension:{type:He.DetectionParser,priority:0},test:async()=>yp("video/webm"),add:async s=>[...s,"webm"],remove:async s=>s.filter(e=>e!=="webm")};tt.add(lC);const cC={extension:{type:He.DetectionParser,priority:0},test:async()=>yp("video/mp4"),add:async s=>[...s,"mp4","m4v"],remove:async s=>s.filter(e=>e!=="mp4"&&e!=="m4v")};tt.add(cC);const hC={extension:{type:He.DetectionParser,priority:0},test:async()=>yp("video/ogg"),add:async s=>[...s,"ogv"],remove:async s=>s.filter(e=>e!=="ogv")};tt.add(hC);const uC={extension:He.ResolveParser,test:Mu.test,parse:s=>{var e;return{resolution:parseFloat(((e=We.RETINA_PREFIX.exec(s))==null?void 0:e[1])??"1"),format:wi.extname(s).slice(1),src:s}}};tt.add(uC);var Xi=(s=>(s[s.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",s[s.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",s[s.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",s[s.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",s[s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",s[s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",s[s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",s[s.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",s[s.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",s[s.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",s[s.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",s[s.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",s[s.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",s[s.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",s[s.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",s[s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",s[s.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",s[s.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",s[s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",s[s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",s[s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",s[s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",s[s.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",s[s.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",s[s.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35987]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",s[s.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",s[s.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",s[s.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",s[s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",s[s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",s[s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",s))(Xi||{});const Th={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35987:1,34798:1,37808:1,36492:1,36493:1,36494:1,36495:1};let gn,ro;function mv(){ro={bptc:gn.getExtension("EXT_texture_compression_bptc"),astc:gn.getExtension("WEBGL_compressed_texture_astc"),etc:gn.getExtension("WEBGL_compressed_texture_etc"),s3tc:gn.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:gn.getExtension("WEBGL_compressed_texture_s3tc_srgb"),pvrtc:gn.getExtension("WEBGL_compressed_texture_pvrtc")||gn.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:gn.getExtension("WEBGL_compressed_texture_etc1"),atc:gn.getExtension("WEBGL_compressed_texture_atc")}}const dC={extension:{type:He.DetectionParser,priority:2},test:async()=>{const s=We.ADAPTER.createCanvas().getContext("webgl");return s?(gn=s,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async s=>{ro||mv();const e=[];for(const t in ro)ro[t]&&e.push(t);return[...e,...s]},remove:async s=>(ro||mv(),s.filter(e=>!(e in ro)))};tt.add(dC);class fC extends yu{constructor(e,t={width:1,height:1,autoLoad:!0}){let i,n;typeof e=="string"?(i=e,n=new Uint8Array):(i=null,n=e),super(n,t),this.origin=i,this.buffer=n?new jf(n):null,this._load=null,this.loaded=!1,this.origin!==null&&t.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(e){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(e=>e.blob()).then(e=>e.arrayBuffer()).then(e=>(this.data=new Uint32Array(e),this.buffer=new jf(e),this.loaded=!0,this.onBlobLoaded(e),this.update(),this)),this._load)}}class Ia extends fC{constructor(e,t){super(e,t),this.format=t.format,this.levels=t.levels||1,this._width=t.width,this._height=t.height,this._extension=Ia._formatToExtension(this.format),(t.levelBuffers||this.buffer)&&(this._levelBuffers=t.levelBuffers||Ia._createLevelBuffers(e instanceof Uint8Array?e:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(e,t,i){const n=e.gl;if(!e.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;n.pixelStorei(n.UNPACK_ALIGNMENT,4);for(let r=0,a=this.levels;r=33776&&e<=33779)return"s3tc";if(e>=35916&&e<=35919)return"s3tc_sRGB";if(e>=37488&&e<=37497)return"etc";if(e>=35840&&e<=35843)return"pvrtc";if(e===36196)return"etc1";if(e===35986||e===35987||e===34798)return"atc";if(e>=36492&&e<=36495)return"bptc";if(e===37808)return"astc";throw new Error(`Invalid (compressed) texture format given: ${e}`)}static _createLevelBuffers(e,t,i,n,r,a,o){const h=new Array(i);let l=e.byteOffset,c=a,u=o,d=c+n-1&~(n-1),f=u+r-1&~(r-1),p=d*f*Th[t];for(let m=0;m1?c:d,levelHeight:i>1?u:f,levelBuffer:new Uint8Array(e.buffer,l,p)},l+=p,c=c>>1||1,u=u>>1||1,d=c+n-1&~(n-1),f=u+r-1&~(r-1),p=d*f*Th[t];return h}}const af=4,yc=124,mC=32,pv=20,pC=542327876,xc={HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},gC={FOURCC:2},bc={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3},vC=1,yC=2,xC=4,bC=64,wC=512,SC=131072,MC=827611204,_C=861165636,TC=894720068,AC=808540228,EC=4,CC={[MC]:Xi.COMPRESSED_RGBA_S3TC_DXT1_EXT,[_C]:Xi.COMPRESSED_RGBA_S3TC_DXT3_EXT,[TC]:Xi.COMPRESSED_RGBA_S3TC_DXT5_EXT},IC={70:Xi.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:Xi.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:Xi.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:Xi.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:Xi.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:Xi.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:Xi.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:Xi.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:Xi.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,96:Xi.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,95:Xi.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,98:Xi.COMPRESSED_RGBA_BPTC_UNORM_EXT,99:Xi.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT};function RC(s){const e=new Uint32Array(s);if(e[0]!==pC)throw new Error("Invalid DDS file magic word");const t=new Uint32Array(s,0,yc/Uint32Array.BYTES_PER_ELEMENT),i=t[xc.HEIGHT],n=t[xc.WIDTH],r=t[xc.MIPMAP_COUNT],a=new Uint32Array(s,xc.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,mC/Uint32Array.BYTES_PER_ELEMENT),o=a[vC];if(o&xC){const h=a[gC.FOURCC];if(h!==AC){const b=CC[h],y=af+yc,w=new Uint8Array(s,y);return[new Ia(w,{format:b,width:n,height:i,levels:r})]}const l=af+yc,c=new Uint32Array(e.buffer,l,pv/Uint32Array.BYTES_PER_ELEMENT),u=c[bc.DXGI_FORMAT],d=c[bc.RESOURCE_DIMENSION],f=c[bc.MISC_FLAG],p=c[bc.ARRAY_SIZE],m=IC[u];if(m===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${u}`);if(f===EC)throw new Error("DDSParser does not support cubemap textures");if(d===6)throw new Error("DDSParser does not supported 3D texture data");const g=new Array,v=af+yc+pv;if(p===1)g.push(new Uint8Array(s,v));else{const b=Th[m];let y=0,w=n,A=i;for(let _=0;_>>1,A=A>>>1}let T=v;for(let _=0;_new Ia(b,{format:m,width:n,height:i,levels:r}))}throw o&bC?new Error("DDSParser does not support uncompressed texture data."):o&wC?new Error("DDSParser does not supported YUV uncompressed texture data."):o&SC?new Error("DDSParser does not support single-channel (lumninance) texture data!"):o&yC?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const gv=[171,75,84,88,32,49,49,187,13,10,26,10],PC=67305985,qs={ENDIANNESS:12,GL_TYPE:16,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},gm=64,vv={[et.UNSIGNED_BYTE]:1,[et.UNSIGNED_SHORT]:2,[et.INT]:4,[et.UNSIGNED_INT]:4,[et.FLOAT]:4,[et.HALF_FLOAT]:8},kC={[Ne.RGBA]:4,[Ne.RGB]:3,[Ne.RG]:2,[Ne.RED]:1,[Ne.LUMINANCE]:1,[Ne.LUMINANCE_ALPHA]:2,[Ne.ALPHA]:1},FC={[et.UNSIGNED_SHORT_4_4_4_4]:2,[et.UNSIGNED_SHORT_5_5_5_1]:2,[et.UNSIGNED_SHORT_5_6_5]:2};function OC(s,e,t=!1){const i=new DataView(e);if(!BC(s,i))return null;const n=i.getUint32(qs.ENDIANNESS,!0)===PC,r=i.getUint32(qs.GL_TYPE,n),a=i.getUint32(qs.GL_FORMAT,n),o=i.getUint32(qs.GL_INTERNAL_FORMAT,n),h=i.getUint32(qs.PIXEL_WIDTH,n),l=i.getUint32(qs.PIXEL_HEIGHT,n)||1,c=i.getUint32(qs.PIXEL_DEPTH,n)||1,u=i.getUint32(qs.NUMBER_OF_ARRAY_ELEMENTS,n)||1,d=i.getUint32(qs.NUMBER_OF_FACES,n),f=i.getUint32(qs.NUMBER_OF_MIPMAP_LEVELS,n),p=i.getUint32(qs.BYTES_OF_KEY_VALUE_DATA,n);if(l===0||c!==1)throw new Error("Only 2D textures are supported");if(d!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(u!==1)throw new Error("WebGL does not support array textures");const m=4,g=4,v=h+3&-4,b=l+3&-4,y=new Array(u);let w=h*l;r===0&&(w=v*b);let A;if(r!==0?vv[r]?A=vv[r]*kC[a]:A=FC[r]:A=Th[o],A===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const T=t?DC(i,p,n):null;let _=w*A,R=h,P=l,F=v,I=b,k=gm+p;for(let B=0;B1||r!==0?R:F,levelHeight:f>1||r!==0?P:I,levelBuffer:new Uint8Array(e,U,_)},U+=_}k+=D+4,k=k%4!==0?k+4-k%4:k,R=R>>1||1,P=P>>1||1,F=R+m-1&-4,I=P+g-1&-4,_=F*I*A}return r!==0?{uncompressed:y.map(B=>{let D=B[0].levelBuffer,U=!1;return r===et.FLOAT?D=new Float32Array(B[0].levelBuffer.buffer,B[0].levelBuffer.byteOffset,B[0].levelBuffer.byteLength/4):r===et.UNSIGNED_INT?(U=!0,D=new Uint32Array(B[0].levelBuffer.buffer,B[0].levelBuffer.byteOffset,B[0].levelBuffer.byteLength/4)):r===et.INT&&(U=!0,D=new Int32Array(B[0].levelBuffer.buffer,B[0].levelBuffer.byteOffset,B[0].levelBuffer.byteLength/4)),{resource:new yu(D,{width:B[0].levelWidth,height:B[0].levelHeight}),type:r,format:U?LC(a):a}}),kvData:T}:{compressed:y.map(B=>new Ia(null,{format:o,width:h,height:l,levels:f,levelBuffers:B})),kvData:T}}function BC(s,e){for(let t=0;te-n){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let h=0;for(;h{const a=new yt(r,{mipmap:Ys.OFF,alphaMode:Ni.NO_PREMULTIPLIED_ALPHA,resolution:pr(s),...e.data});return zl(a,t,s)});return n.length===1?n[0]:n},unload(s){Array.isArray(s)?s.forEach(e=>e.destroy(!0)):s.destroy(!0)}};tt.add(NC);const UC={extension:{type:He.LoadParser,priority:Is.High},name:"loadKTX",test(s){return bs(s,".ktx")},async load(s,e,t){const i=await(await We.ADAPTER.fetch(s)).arrayBuffer(),{compressed:n,uncompressed:r,kvData:a}=OC(s,i),o=n??r,h={mipmap:Ys.OFF,alphaMode:Ni.NO_PREMULTIPLIED_ALPHA,resolution:pr(s),...e.data},l=o.map(c=>{o===r&&Object.assign(h,{type:c.type,format:c.format});const u=c.resource??c,d=new yt(u,h);return d.ktxKeyValueData=a,zl(d,t,s)});return l.length===1?l[0]:l},unload(s){Array.isArray(s)?s.forEach(e=>e.destroy(!0)):s.destroy(!0)}};tt.add(UC);const XC=["s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"],VC={extension:He.ResolveParser,test:s=>{const e=wi.extname(s).slice(1);return["basis","ktx","dds"].includes(e)},parse:s=>{var i,n;const e=s.split("."),t=e.pop();if(["ktx","dds"].includes(t)){const r=e.pop();if(XC.includes(r))return{resolution:parseFloat(((i=We.RETINA_PREFIX.exec(s))==null?void 0:i[1])??"1"),format:r,src:s}}return{resolution:parseFloat(((n=We.RETINA_PREFIX.exec(s))==null?void 0:n[1])??"1"),format:t,src:s}}};tt.add(VC);const wc=new Tt,YC=4,W1=class al{constructor(e){this.renderer=e,this._rendererPremultipliedAlpha=!1}contextChange(){var t;const e=(t=this.renderer)==null?void 0:t.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}async image(e,t,i,n){const r=new Image;return r.src=await this.base64(e,t,i,n),r}async base64(e,t,i,n){const r=this.canvas(e,n);if(r.toBlob!==void 0)return new Promise((a,o)=>{r.toBlob(h=>{if(!h){o(new Error("ICanvas.toBlob failed!"));return}const l=new FileReader;l.onload=()=>a(l.result),l.onerror=o,l.readAsDataURL(h)},t,i)});if(r.toDataURL!==void 0)return r.toDataURL(t,i);if(r.convertToBlob!==void 0){const a=await r.convertToBlob({type:t,quality:i});return new Promise((o,h)=>{const l=new FileReader;l.onload=()=>o(l.result),l.onerror=h,l.readAsDataURL(a)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:i,width:n,height:r,flipY:a,premultipliedAlpha:o}=this._rawPixels(e,t);a&&al._flipY(i,n,r),o&&al._unpremultiplyAlpha(i);const h=new MT(n,r,1),l=new ImageData(new Uint8ClampedArray(i.buffer),n,r);return h.context.putImageData(l,0,0),h.canvas}pixels(e,t){const{pixels:i,width:n,height:r,flipY:a,premultipliedAlpha:o}=this._rawPixels(e,t);return a&&al._flipY(i,n,r),o&&al._unpremultiplyAlpha(i),i}_rawPixels(e,t){const i=this.renderer;if(!i)throw new Error("The Extract has already been destroyed");let n,r=!1,a=!1,o,h=!1;e&&(e instanceof Ua?o=e:(o=i.generateTexture(e,{region:t,resolution:i.resolution,multisample:i.multisample}),h=!0,t&&(wc.width=t.width,wc.height=t.height,t=wc)));const l=i.gl;if(o){if(n=o.baseTexture.resolution,t=t??o.frame,r=!1,a=o.baseTexture.alphaMode>0&&o.baseTexture.format===Ne.RGBA,!h){i.renderTexture.bind(o);const f=o.framebuffer.glFramebuffers[i.CONTEXT_UID];f.blitFramebuffer&&i.framebuffer.bind(f.blitFramebuffer)}}else n=i.resolution,t||(t=wc,t.width=i.width/n,t.height=i.height/n),r=!0,a=this._rendererPremultipliedAlpha,i.renderTexture.bind();const c=Math.max(Math.round(t.width*n),1),u=Math.max(Math.round(t.height*n),1),d=new Uint8Array(YC*c*u);return l.readPixels(Math.round(t.x*n),Math.round(t.y*n),c,u,l.RGBA,l.UNSIGNED_BYTE,d),h&&(o==null||o.destroy(!0)),{pixels:d,width:c,height:u,flipY:r,premultipliedAlpha:a}}destroy(){this.renderer=null}static _flipY(e,t,i){const n=t<<2,r=i>>1,a=new Uint8Array(n);for(let o=0;o=0&&o>=0&&n>=0&&r>=0)){e.length=0;return}const h=Math.ceil(2.3*Math.sqrt(a+o)),l=h*8+(n?4:0)+(r?4:0);if(e.length=l,l===0)return;if(h===0){e.length=8,e[0]=e[6]=t+n,e[1]=e[3]=i+r,e[2]=e[4]=t-n,e[5]=e[7]=i-r;return}let c=0,u=h*4+(n?2:0)+2,d=u,f=l;{const p=n+a,m=r,g=t+p,v=t-p,b=i+m;if(e[c++]=g,e[c++]=b,e[--u]=b,e[--u]=v,r){const y=i-m;e[d++]=v,e[d++]=y,e[--f]=y,e[--f]=g}}for(let p=1;p0||e&&i<=0){const n=t/2;for(let r=n+n%2;r=6){yv(t,!1);const a=[];for(let l=0;l=0&&r>=0&&a.push(t,i,t+n,i,t+n,i+r,t,i+r)},triangulate(s,e){const t=s.points,i=e.points;if(t.length===0)return;const n=i.length/2;i.push(t[0],t[1],t[2],t[3],t[6],t[7],t[4],t[5]),e.indices.push(n,n+1,n+2,n+1,n+2,n+3)}},HC={build(s){Ah.build(s)},triangulate(s,e){Ah.triangulate(s,e)}};var Ls=(s=>(s.MITER="miter",s.BEVEL="bevel",s.ROUND="round",s))(Ls||{}),Ur=(s=>(s.BUTT="butt",s.ROUND="round",s.SQUARE="square",s))(Ur||{});const Co={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(s,e=20){if(!this.adaptive||!s||isNaN(s))return e;let t=Math.ceil(s/this.maxLength);return tthis.maxSegments&&(t=this.maxSegments),t}};class xv{static curveTo(e,t,i,n,r,a){const o=a[a.length-2],h=a[a.length-1]-t,l=o-e,c=n-t,u=i-e,d=Math.abs(h*u-l*c);if(d<1e-8||r===0)return(a[a.length-2]!==e||a[a.length-1]!==t)&&a.push(e,t),null;const f=h*h+l*l,p=c*c+u*u,m=h*c+l*u,g=r*Math.sqrt(f)/d,v=r*Math.sqrt(p)/d,b=g*m/f,y=v*m/p,w=g*u+v*l,A=g*c+v*h,T=l*(v+b),_=h*(v+b),R=u*(g+y),P=c*(g+y),F=Math.atan2(_-A,T-w),I=Math.atan2(P-A,R-w);return{cx:w+e,cy:A+t,radius:r,startAngle:F,endAngle:I,anticlockwise:l*c>u*h}}static arc(e,t,i,n,r,a,o,h,l){const c=o-a,u=Co._segmentsCount(Math.abs(c)*r,Math.ceil(Math.abs(c)/vh)*40),d=c/(u*2),f=d*2,p=Math.cos(d),m=Math.sin(d),g=u-1,v=g%1/g;for(let b=0;b<=g;++b){const y=b+v*b,w=d+a+f*y,A=Math.cos(w),T=-Math.sin(w);l.push((p*A+m*T)*r+i,(p*-T+m*A)*r+n)}}}class jC{constructor(){this.reset()}begin(e,t,i){this.reset(),this.style=e,this.start=t,this.attribStart=i}end(e,t){this.attribSize=t-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class xp{static curveLength(e,t,i,n,r,a,o,h){let l=0,c=0,u=0,d=0,f=0,p=0,m=0,g=0,v=0,b=0,y=0,w=e,A=t;for(let T=1;T<=10;++T)c=T/10,u=c*c,d=u*c,f=1-c,p=f*f,m=p*f,g=m*e+3*p*c*i+3*f*u*r+d*o,v=m*t+3*p*c*n+3*f*u*a+d*h,b=w-g,y=A-v,w=g,A=v,l+=Math.sqrt(b*b+y*y);return l}static curveTo(e,t,i,n,r,a,o){const h=o[o.length-2],l=o[o.length-1];o.length-=2;const c=Co._segmentsCount(xp.curveLength(h,l,e,t,i,n,r,a));let u=0,d=0,f=0,p=0,m=0;o.push(h,l);for(let g=1,v=0;g<=c;++g)v=g/c,u=1-v,d=u*u,f=d*u,p=v*v,m=p*v,o.push(f*h+3*d*v*e+3*u*p*i+m*r,f*l+3*d*v*t+3*u*p*n+m*a)}}function bv(s,e,t,i,n,r,a,o){const h=s-t*n,l=e-i*n,c=s+t*r,u=e+i*r;let d,f;a?(d=i,f=-t):(d=-i,f=t);const p=h+d,m=l+f,g=c+d,v=u+f;return o.push(p,m,g,v),2}function la(s,e,t,i,n,r,a,o){const h=t-s,l=i-e;let c=Math.atan2(h,l),u=Math.atan2(n-s,r-e);o&&cu&&(u+=Math.PI*2);let d=c;const f=u-c,p=Math.abs(f),m=Math.sqrt(h*h+l*l),g=(15*p*Math.sqrt(m)/Math.PI>>0)+1,v=f/g;if(d+=v,o){a.push(s,e,t,i);for(let b=1,y=d;b=0&&(r.join===Ls.ROUND?d+=la(y,w,y-_*B,w-R*B,y-P*B,w-F*B,c,!1)+4:d+=2,c.push(y-P*D,w-F*D,y+P*B,w+F*B));continue}const K=(-_+v)*(-R+w)-(-_+y)*(-R+b),fe=(-P+A)*(-F+w)-(-P+y)*(-F+T),me=(O*fe-E*K)/W,we=(V*K-X*fe)/W,Ee=(me-y)*(me-y)+(we-w)*(we-w),pe=y+(me-y)*B,Ae=w+(we-w)*B,G=y-(me-y)*D,Z=w-(we-w)*D,z=Math.min(O*O+X*X,E*E+V*V),j=J?B:D,te=z+j*j*m,he=Ee<=te;let xe=r.join;if(xe===Ls.MITER&&Ee/m>g&&(xe=Ls.BEVEL),he)switch(xe){case Ls.MITER:{c.push(pe,Ae,G,Z);break}case Ls.BEVEL:{J?c.push(pe,Ae,y+_*D,w+R*D,pe,Ae,y+P*D,w+F*D):c.push(y-_*B,w-R*B,G,Z,y-P*B,w-F*B,G,Z),d+=2;break}case Ls.ROUND:{J?(c.push(pe,Ae,y+_*D,w+R*D),d+=la(y,w,y+_*D,w+R*D,y+P*D,w+F*D,c,!0)+4,c.push(pe,Ae,y+P*D,w+F*D)):(c.push(y-_*B,w-R*B,G,Z),d+=la(y,w,y-_*B,w-R*B,y-P*B,w-F*B,c,!1)+4,c.push(y-P*B,w-F*B,G,Z));break}}else{switch(c.push(y-_*B,w-R*B,y+_*D,w+R*D),xe){case Ls.MITER:{J?c.push(G,Z,G,Z):c.push(pe,Ae,pe,Ae),d+=2;break}case Ls.ROUND:{J?d+=la(y,w,y+_*D,w+R*D,y+P*D,w+F*D,c,!0)+2:d+=la(y,w,y-_*B,w-R*B,y-P*B,w-F*B,c,!1)+2;break}}c.push(y-P*B,w-F*B,y+P*D,w+F*D),d+=2}}v=i[(u-2)*2],b=i[(u-2)*2+1],y=i[(u-1)*2],w=i[(u-1)*2+1],_=-(b-w),R=v-y,I=Math.sqrt(_*_+R*R),_/=I,R/=I,_*=p,R*=p,c.push(y-_*B,w-R*B,y+_*D,w+R*D),h||(r.cap===Ur.ROUND?d+=la(y-_*(B-D)*.5,w-R*(B-D)*.5,y-_*B,w-R*B,y+_*D,w+R*D,c,!1)+2:r.cap===Ur.SQUARE&&(d+=bv(y,w,_,R,B,D,!1,c)));const U=e.indices,L=Co.epsilon*Co.epsilon;for(let N=f;N0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,i=null,n=null){const r=new Eh(e,t,i,n);return this.graphicsData.push(r),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const i=new Eh(e,null,null,t),n=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=n.lineStyle,n.holes.push(i),this.dirty++,this}destroy(){super.destroy();for(let e=0;e0&&(i=this.batches[this.batches.length-1],n=i.style);for(let h=this.shapeIndex;h65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&o===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=o?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e65535*2)return!1;const e=this.batches;for(let t=0;t0&&(n=Sc.pop(),n||(n=new qf,n.texArray=new Qf),this.drawCalls.push(n)),n.start=c,n.size=0,n.texArray.count=0,n.type=l),m.touched=1,m._batchEnabled=e,m._batchLocation=r,m.wrapMode=an.REPEAT,n.texArray.elements[n.texArray.count++]=m,r++)),n.size+=d.size,c+=d.size,o=m._batchLocation,this.addColors(t,p.color,p.alpha,d.attribSize,d.attribStart),this.addTextureIds(i,o,d.attribSize,d.attribStart)}yt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,i=this.colors,n=this.textureIds,r=new ArrayBuffer(e.length*3*4),a=new Float32Array(r),o=new Uint32Array(r);let h=0;for(let l=0;l0&&e.alpha>0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:i},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new Ca,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new Ca,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const i=this.currentPath.points,n=i[i.length-2],r=i[i.length-1];return(n!==e||r!==t)&&i.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,i,n){this._initCurve();const r=this.currentPath.points;return r.length===0&&this.moveTo(0,0),bp.curveTo(e,t,i,n,r),this}bezierCurveTo(e,t,i,n,r,a){return this._initCurve(),xp.curveTo(e,t,i,n,r,a,this.currentPath.points),this}arcTo(e,t,i,n,r){this._initCurve(e,t);const a=this.currentPath.points,o=xv.curveTo(e,t,i,n,r,a);if(o){const{cx:h,cy:l,radius:c,startAngle:u,endAngle:d,anticlockwise:f}=o;this.arc(h,l,c,u,d,f)}return this}arc(e,t,i,n,r,a=!1){if(n===r)return this;if(!a&&r<=n?r+=vh:a&&n<=r&&(n+=vh),r-n===0)return this;const o=e+Math.cos(n)*i,h=t+Math.sin(n)*i,l=this._geometry.closePointEps;let c=this.currentPath?this.currentPath.points:null;if(c){const u=Math.abs(c[c.length-2]-o),d=Math.abs(c[c.length-1]-h);u0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:i},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,i,n){return this.drawShape(new Tt(e,t,i,n))}drawRoundedRect(e,t,i,n,r){return this.drawShape(new wu(e,t,i,n,r))}drawCircle(e,t,i){return this.drawShape(new xu(e,t,i))}drawEllipse(e,t,i,n){return this.drawShape(new bu(e,t,i,n))}drawPolygon(...e){let t,i=!0;const n=e[0];n.points?(i=n.closeStroke,t=n.points):Array.isArray(e[0])?t=e[0]:t=e;const r=new Ca(t);return r.closeStroke=i,this.drawShape(r),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===Hi.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,i=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=i,this.vertexData=new Float32Array(e.points);for(let n=0;ni&&!e.autoResize&&(a=i);let o=e._buffers;o||(o=e._buffers=this.generateBuffers(e));const h=t[0]._texture.baseTexture,l=h.alphaMode>0;this.state.blendMode=Zx(e.blendMode,l),r.state.set(this.state);const c=r.gl,u=e.worldTransform.copyTo(this.tempMatrix);u.prepend(r.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=jt.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,l).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);let d=!1;for(let f=0,p=0;fn&&(m=n),p>=o.length&&o.push(this._generateOneMoreBuffer(e));const g=o[p];g.uploadDynamic(t,f,m);const v=e._bufferUpdateIDs[p]||0;d=d||g._updateID0);n[a]=l,n[a+r]=l,n[a+r*2]=l,n[a+r*3]=l,a+=r*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Qb.extension={name:"particle",type:He.RendererPlugin};tt.add(Qb);var Tu=(s=>(s[s.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",s[s.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",s))(Tu||{});const Mc={willReadFrequently:!0},vn=class ot{static get experimentalLetterSpacingSupported(){let e=ot._experimentalLetterSpacingSupported;if(e!==void 0){const t=We.ADAPTER.getCanvasRenderingContext2D().prototype;e=ot._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,n,r,a,o,h,l){this.text=e,this.style=t,this.width=i,this.height=n,this.lines=r,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=h,this.fontProperties=l}static measureText(e,t,i,n=ot._canvas){i=i??t.wordWrap;const r=t.toFontString(),a=ot.measureFont(r);a.fontSize===0&&(a.fontSize=t.fontSize,a.ascent=t.fontSize);const o=n.getContext("2d",Mc);o.font=r;const h=(i?ot.wordWrap(e,t,n):e).split(/(?:\r\n|\r|\n)/),l=new Array(h.length);let c=0;for(let p=0;p0&&(n?r-=t:r+=(ot.graphemeSegmenter(e).length-1)*t),r}static wordWrap(e,t,i=ot._canvas){const n=i.getContext("2d",Mc);let r=0,a="",o="";const h=Object.create(null),{letterSpacing:l,whiteSpace:c}=t,u=ot.collapseSpaces(c),d=ot.collapseNewlines(c);let f=!u;const p=t.wordWrapWidth+l,m=ot.tokenize(e);for(let g=0;gp)if(a!==""&&(o+=ot.addLine(a),a="",r=0),ot.canBreakWords(v,t.breakWords)){const y=ot.wordWrapSplit(v);for(let w=0;wp&&(o+=ot.addLine(a),f=!1,a="",r=0),a+=A,r+=R}}else{a.length>0&&(o+=ot.addLine(a),a="",r=0);const y=g===m.length-1;o+=ot.addLine(v,!y),f=!1,a="",r=0}else b+r>p&&(f=!1,o+=ot.addLine(a),a="",r=0),(a.length>0||!ot.isBreakingSpace(v)||f)&&(a+=v,r+=b)}return o+=ot.addLine(a,!1),o}static addLine(e,t=!0){return e=ot.trimRight(e),e=t?`${e} -`:e,e}static getFromCache(e,t,i,n){let r=i[e];return typeof r!="number"&&(r=ot._measureText(e,t,n)+t,i[e]=r),r}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const i=e[t];if(!ot.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:ot._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:ot._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let i="";if(typeof e!="string")return t;for(let n=0;no;--d){for(let m=0;m{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const s=new Intl.Segmenter;return e=>[...s.segment(e)].map(t=>t.segment)}return s=>[...s]})(),vn.experimentalLetterSpacing=!1,vn._fonts={},vn._newlines=[10,13],vn._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let Ir=vn;const iI=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],e1=class ol{constructor(e){this.styleID=0,this.reset(),uf(this,e,e)}clone(){const e={};return uf(e,this,ol.defaultStyle),new ol(e)}reset(){uf(this,ol.defaultStyle,ol.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=hf(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=hf(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){sI(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const t=hf(e);this._stroke!==t&&(this._stroke=t,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(let i=t.length-1;i>=0;i--){let n=t[i].trim();!/([\"\'])[^\'\"]+\1/.test(n)&&!iI.includes(n)&&(n=`"${n}"`),t[i]=n}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};e1.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:Tu.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let jr=e1;function hf(s){const e=jt.shared,t=i=>{const n=e.setValue(i);return n.alpha===1?n.toHex():n.toRgbaString()};return Array.isArray(s)?s.map(t):t(s)}function sI(s,e){if(!Array.isArray(s)||!Array.isArray(e)||s.length!==e.length)return!1;for(let t=0;t0&&p>m&&(g=(m+p)/2);const v=m+d,b=i.lineHeight*(f+1);let y=v;f+10}}function aI(s,e){var i;let t=!1;if((i=s==null?void 0:s._textures)!=null&&i.length){for(let n=0;n{this.queue&&this.prepareItems()},this.registerFindHook(uI),this.registerFindHook(dI),this.registerFindHook(aI),this.registerFindHook(oI),this.registerFindHook(lI),this.registerUploadHook(cI),this.registerUploadHook(hI)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,ds.system.addOnce(this.tick,this,Oa.UTILITY))):t()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let t=!1;if(e&&!e._destroyed){for(let i=0,n=this.uploadHooks.length;i=0;t--)this.add(e.children[t]);return this}destroy(){this.ticking&&ds.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};i1.uploadsPerFrame=4;let xm=i1;Object.defineProperties(We,{UPLOADS_PER_FRAME:{get(){return xm.uploadsPerFrame},set(s){kt("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),xm.uploadsPerFrame=s}}});function n1(s,e){return e instanceof yt?(e._glTextures[s.CONTEXT_UID]||s.texture.bind(e),!0):!1}function fI(s,e){if(!(e instanceof ys))return!1;const{geometry:t}=e;e.finishPoly(),t.updateBatches();const{batches:i}=t;for(let n=0;ni&&!e.autoResize&&(a=i);let o=e._buffers;o||(o=e._buffers=this.generateBuffers(e));const h=t[0]._texture.baseTexture,l=h.alphaMode>0;this.state.blendMode=Zx(e.blendMode,l),r.state.set(this.state);const c=r.gl,u=e.worldTransform.copyTo(this.tempMatrix);u.prepend(r.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=jt.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,l).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);let d=!1;for(let f=0,p=0;fn&&(m=n),p>=o.length&&o.push(this._generateOneMoreBuffer(e));const g=o[p];g.uploadDynamic(t,f,m);const v=e._bufferUpdateIDs[p]||0;d=d||g._updateID0);n[a]=l,n[a+r]=l,n[a+r*2]=l,n[a+r*3]=l,a+=r*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Q1.extension={name:"particle",type:He.RendererPlugin};tt.add(Q1);var Tu=(s=>(s[s.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",s[s.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",s))(Tu||{});const Mc={willReadFrequently:!0},vn=class ot{static get experimentalLetterSpacingSupported(){let e=ot._experimentalLetterSpacingSupported;if(e!==void 0){const t=We.ADAPTER.getCanvasRenderingContext2D().prototype;e=ot._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,n,r,a,o,h,l){this.text=e,this.style=t,this.width=i,this.height=n,this.lines=r,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=h,this.fontProperties=l}static measureText(e,t,i,n=ot._canvas){i=i??t.wordWrap;const r=t.toFontString(),a=ot.measureFont(r);a.fontSize===0&&(a.fontSize=t.fontSize,a.ascent=t.fontSize);const o=n.getContext("2d",Mc);o.font=r;const h=(i?ot.wordWrap(e,t,n):e).split(/(?:\r\n|\r|\n)/),l=new Array(h.length);let c=0;for(let p=0;p0&&(n?r-=t:r+=(ot.graphemeSegmenter(e).length-1)*t),r}static wordWrap(e,t,i=ot._canvas){const n=i.getContext("2d",Mc);let r=0,a="",o="";const h=Object.create(null),{letterSpacing:l,whiteSpace:c}=t,u=ot.collapseSpaces(c),d=ot.collapseNewlines(c);let f=!u;const p=t.wordWrapWidth+l,m=ot.tokenize(e);for(let g=0;gp)if(a!==""&&(o+=ot.addLine(a),a="",r=0),ot.canBreakWords(v,t.breakWords)){const y=ot.wordWrapSplit(v);for(let w=0;wp&&(o+=ot.addLine(a),f=!1,a="",r=0),a+=A,r+=R}}else{a.length>0&&(o+=ot.addLine(a),a="",r=0);const y=g===m.length-1;o+=ot.addLine(v,!y),f=!1,a="",r=0}else b+r>p&&(f=!1,o+=ot.addLine(a),a="",r=0),(a.length>0||!ot.isBreakingSpace(v)||f)&&(a+=v,r+=b)}return o+=ot.addLine(a,!1),o}static addLine(e,t=!0){return e=ot.trimRight(e),e=t?`${e} +`:e,e}static getFromCache(e,t,i,n){let r=i[e];return typeof r!="number"&&(r=ot._measureText(e,t,n)+t,i[e]=r),r}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const i=e[t];if(!ot.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:ot._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:ot._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let i="";if(typeof e!="string")return t;for(let n=0;no;--d){for(let m=0;m{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const s=new Intl.Segmenter;return e=>[...s.segment(e)].map(t=>t.segment)}return s=>[...s]})(),vn.experimentalLetterSpacing=!1,vn._fonts={},vn._newlines=[10,13],vn._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let Ir=vn;const iI=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],eb=class ol{constructor(e){this.styleID=0,this.reset(),uf(this,e,e)}clone(){const e={};return uf(e,this,ol.defaultStyle),new ol(e)}reset(){uf(this,ol.defaultStyle,ol.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=hf(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=hf(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){sI(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const t=hf(e);this._stroke!==t&&(this._stroke=t,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(let i=t.length-1;i>=0;i--){let n=t[i].trim();!/([\"\'])[^\'\"]+\1/.test(n)&&!iI.includes(n)&&(n=`"${n}"`),t[i]=n}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};eb.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:Tu.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let jr=eb;function hf(s){const e=jt.shared,t=i=>{const n=e.setValue(i);return n.alpha===1?n.toHex():n.toRgbaString()};return Array.isArray(s)?s.map(t):t(s)}function sI(s,e){if(!Array.isArray(s)||!Array.isArray(e)||s.length!==e.length)return!1;for(let t=0;t0&&p>m&&(g=(m+p)/2);const v=m+d,b=i.lineHeight*(f+1);let y=v;f+10}}function aI(s,e){var i;let t=!1;if((i=s==null?void 0:s._textures)!=null&&i.length){for(let n=0;n{this.queue&&this.prepareItems()},this.registerFindHook(uI),this.registerFindHook(dI),this.registerFindHook(aI),this.registerFindHook(oI),this.registerFindHook(lI),this.registerUploadHook(cI),this.registerUploadHook(hI)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,ds.system.addOnce(this.tick,this,Oa.UTILITY))):t()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let t=!1;if(e&&!e._destroyed){for(let i=0,n=this.uploadHooks.length;i=0;t--)this.add(e.children[t]);return this}destroy(){this.ticking&&ds.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};ib.uploadsPerFrame=4;let xm=ib;Object.defineProperties(We,{UPLOADS_PER_FRAME:{get(){return xm.uploadsPerFrame},set(s){kt("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),xm.uploadsPerFrame=s}}});function nb(s,e){return e instanceof yt?(e._glTextures[s.CONTEXT_UID]||s.texture.bind(e),!0):!1}function fI(s,e){if(!(e instanceof ys))return!1;const{geometry:t}=e;e.finishPoly(),t.updateBatches();const{batches:i}=t;for(let n=0;n1?cn.from(gI,pI,t):cn.from(Tv,vI,t)}render(e){const t=this.renderer,i=this.quad;let n=i.vertices;n[0]=n[6]=e._width*-e.anchor.x,n[1]=n[3]=e._height*-e.anchor.y,n[2]=n[4]=e._width*(1-e.anchor.x),n[5]=n[7]=e._height*(1-e.anchor.y);const r=e.uvRespectAnchor?e.anchor.x:0,a=e.uvRespectAnchor?e.anchor.y:0;n=i.uvs,n[0]=n[6]=-r,n[1]=n[3]=-a,n[2]=n[4]=1-r,n[5]=n[7]=1-a,i.invalidate();const o=e._texture,h=o.baseTexture,l=h.alphaMode>0,c=e.tileTransform.localTransform,u=e.uvMatrix;let d=h.isPowerOfTwo&&o.frame.width===h.width&&o.frame.height===h.height;d&&(h._glTextures[t.CONTEXT_UID]?d=h.wrapMode!==an.CLAMP:h.wrapMode===an.CLAMP&&(h.wrapMode=an.REPEAT));const f=d?this.simpleShader:this.shader,p=o.width,m=o.height,g=e._width,v=e._height;_c.set(c.a*p/g,c.b*p/v,c.c*m/g,c.d*m/v,c.tx/g,c.ty/v),_c.invert(),d?_c.prepend(u.mapCoord):(f.uniforms.uMapCoord=u.mapCoord.toArray(!0),f.uniforms.uClampFrame=u.uClampFrame,f.uniforms.uClampOffset=u.uClampOffset),f.uniforms.uTransform=_c.toArray(!0),f.uniforms.uColor=jt.shared.setValue(e.tint).premultiply(e.worldAlpha,l).toArray(f.uniforms.uColor),f.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),f.uniforms.uSampler=o,t.shader.bind(f),t.geometry.bind(i),this.state.blendMode=Zx(e.blendMode,l),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}a1.extension={name:"tilingSprite",type:He.RendererPlugin};tt.add(a1);const o1=class ll{constructor(e,t,i){this.linkedSheets=[],(e instanceof yt||e instanceof gt)&&(e={texture:e,data:t,resolutionFilename:i});const{texture:n,data:r,resolutionFilename:a=null,cachePrefix:o=""}=e;this.cachePrefix=o,this._texture=n instanceof gt?n:null,this.baseTexture=n instanceof yt?n:this._texture.baseTexture,this.textures={},this.animations={},this.data=r;const h=this.baseTexture.resource;this.resolution=this._updateResolution(a||(h?h.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=pr(e,null);return i===null&&(i=typeof t=="number"?t:parseFloat(t??"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=ll.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=ll.BATCH_SIZE;for(;t-e{this._batchIndex*ll.BATCH_SIZE{i[n]=e}),Object.keys(e.textures).forEach(n=>{i[`${e.cachePrefix}${n}`]=e.textures[n]}),!t){const n=wi.dirname(s[0]);e.linkedSheets.forEach((r,a)=>{Object.assign(i,l1([`${n}/${e.data.meta.related_multi_packs[a]}`],r,!0))})}return i}const bI={extension:He.Asset,cache:{test:s=>s instanceof Av,getCacheableAssets:(s,e)=>l1(s,e,!1)},resolver:{test:s=>{const e=s.split("?")[0].split("."),t=e.pop(),i=e.pop();return t==="json"&&xI.includes(i)},parse:s=>{var t;const e=s.split(".");return{resolution:parseFloat(((t=We.RETINA_PREFIX.exec(s))==null?void 0:t[1])??"1"),format:e[e.length-2],src:s}}},loader:{name:"spritesheetLoader",extension:{type:He.LoadParser,priority:Is.Normal},async testParse(s,e){return wi.extname(e.src).toLowerCase()===".json"&&!!s.frames},async parse(s,e,t){var c,u;const{texture:i,imageFilename:n,cachePrefix:r}=(e==null?void 0:e.data)??{};let a=wi.dirname(e.src);a&&a.lastIndexOf("/")!==a.length-1&&(a+="/");let o;if(i&&i.baseTexture)o=i;else{const d=Mh(a+(n??s.meta.image),e.src);o=(await t.load([d]))[d]}const h=new Av({texture:o.baseTexture,data:s,resolutionFilename:e.src,cachePrefix:r});await h.parse();const l=(c=s==null?void 0:s.meta)==null?void 0:c.related_multi_packs;if(Array.isArray(l)){const d=[];for(const p of l){if(typeof p!="string")continue;let m=a+p;(u=e.data)!=null&&u.ignoreMultiPack||(m=Mh(m,e.src),d.push(t.load({src:m,data:{ignoreMultiPack:!0}})))}const f=await Promise.all(d);h.linkedSheets=f,f.forEach(p=>{p.linkedSheets=[h].concat(h.linkedSheets.filter(m=>m!==p))})}return h},unload(s){s.destroy(!0)}}};tt.add(bI);class Ih{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class zc{static test(e){return typeof e=="string"&&e.startsWith("info face=")}static parse(e){const t=e.match(/^[a-z]+\s+.+$/gm),i={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const r in t){const a=t[r].match(/^[a-z]+/gm)[0],o=t[r].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),h={};for(const l in o){const c=o[l].split("="),u=c[0],d=c[1].replace(/"/gm,""),f=parseFloat(d),p=isNaN(f)?d:f;h[u]=p}i[a].push(h)}const n=new Ih;return i.info.forEach(r=>n.info.push({face:r.face,size:parseInt(r.size,10)})),i.common.forEach(r=>n.common.push({lineHeight:parseInt(r.lineHeight,10)})),i.page.forEach(r=>n.page.push({id:parseInt(r.id,10),file:r.file})),i.char.forEach(r=>n.char.push({id:parseInt(r.id,10),page:parseInt(r.page,10),x:parseInt(r.x,10),y:parseInt(r.y,10),width:parseInt(r.width,10),height:parseInt(r.height,10),xoffset:parseInt(r.xoffset,10),yoffset:parseInt(r.yoffset,10),xadvance:parseInt(r.xadvance,10)})),i.kerning.forEach(r=>n.kerning.push({first:parseInt(r.first,10),second:parseInt(r.second,10),amount:parseInt(r.amount,10)})),i.distanceField.forEach(r=>n.distanceField.push({distanceRange:parseInt(r.distanceRange,10),fieldType:r.fieldType})),n}}class bm{static test(e){const t=e;return typeof e!="string"&&"getElementsByTagName"in e&&t.getElementsByTagName("page").length&&t.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(e){const t=new Ih,i=e.getElementsByTagName("info"),n=e.getElementsByTagName("common"),r=e.getElementsByTagName("page"),a=e.getElementsByTagName("char"),o=e.getElementsByTagName("kerning"),h=e.getElementsByTagName("distanceField");for(let l=0;l")?bm.test(We.ADAPTER.parseXML(e)):!1}static parse(e){return bm.parse(We.ADAPTER.parseXML(e))}}const df=[zc,bm,wm];function wI(s){for(let e=0;e=h-F*a){if(m===0)throw new Error(`[BitmapFont] textureHeight ${h}px is too small (fontFamily: '${u.fontFamily}', fontSize: ${u.fontSize}px, char: '${_}')`);--T,g=null,v=null,b=null,m=0,p=0,y=0;continue}if(y=Math.max(F+R.fontProperties.descent,y),I*a+p>=d){if(p===0)throw new Error(`[BitmapFont] textureWidth ${o}px is too small (fontFamily: '${u.fontFamily}', fontSize: ${u.fontSize}px, char: '${_}')`);--T,m+=y*a,m=Math.ceil(m),p=0,y=0;continue}MI(g,v,R,p,m,a,u);const k=qc(R.text);f.char.push({id:k,page:w.length-1,x:p/a,y:m/a,width:I,height:F,xoffset:0,yoffset:0,xadvance:P-(u.dropShadow?u.dropShadowDistance:0)-(u.stroke?u.strokeThickness:0)}),p+=(I+2*r)*a,p=Math.ceil(p)}if(!(i!=null&&i.skipKerning))for(let T=0,_=c.length;T<_;T++){const R=c[T];for(let P=0;P<_;P++){const F=c[P],I=v.measureText(R).width,k=v.measureText(F).width,B=v.measureText(R+F).width-(I+k);B&&f.kerning.push({first:qc(R),second:qc(F),amount:B})}}const A=new yn(f,w,!0);return yn.available[e]!==void 0&&yn.uninstall(e),yn.available[e]=A,A}};Tr.ALPHA=[["a","z"],["A","Z"]," "],Tr.NUMERIC=[["0","9"]],Tr.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],Tr.ASCII=[[" ","~"]],Tr.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:Tr.ALPHANUMERIC},Tr.available={};let Ar=Tr;var TI=`// Pixi texture info\r +`;const _c=new li;class ab extends Su{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new u1,this.state=Un.for2d()}contextChange(){const e=this.renderer,t={globals:e.globalUniforms};this.simpleShader=cn.from(Tv,yI,t),this.shader=e.context.webGLVersion>1?cn.from(gI,pI,t):cn.from(Tv,vI,t)}render(e){const t=this.renderer,i=this.quad;let n=i.vertices;n[0]=n[6]=e._width*-e.anchor.x,n[1]=n[3]=e._height*-e.anchor.y,n[2]=n[4]=e._width*(1-e.anchor.x),n[5]=n[7]=e._height*(1-e.anchor.y);const r=e.uvRespectAnchor?e.anchor.x:0,a=e.uvRespectAnchor?e.anchor.y:0;n=i.uvs,n[0]=n[6]=-r,n[1]=n[3]=-a,n[2]=n[4]=1-r,n[5]=n[7]=1-a,i.invalidate();const o=e._texture,h=o.baseTexture,l=h.alphaMode>0,c=e.tileTransform.localTransform,u=e.uvMatrix;let d=h.isPowerOfTwo&&o.frame.width===h.width&&o.frame.height===h.height;d&&(h._glTextures[t.CONTEXT_UID]?d=h.wrapMode!==an.CLAMP:h.wrapMode===an.CLAMP&&(h.wrapMode=an.REPEAT));const f=d?this.simpleShader:this.shader,p=o.width,m=o.height,g=e._width,v=e._height;_c.set(c.a*p/g,c.b*p/v,c.c*m/g,c.d*m/v,c.tx/g,c.ty/v),_c.invert(),d?_c.prepend(u.mapCoord):(f.uniforms.uMapCoord=u.mapCoord.toArray(!0),f.uniforms.uClampFrame=u.uClampFrame,f.uniforms.uClampOffset=u.uClampOffset),f.uniforms.uTransform=_c.toArray(!0),f.uniforms.uColor=jt.shared.setValue(e.tint).premultiply(e.worldAlpha,l).toArray(f.uniforms.uColor),f.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),f.uniforms.uSampler=o,t.shader.bind(f),t.geometry.bind(i),this.state.blendMode=Zx(e.blendMode,l),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}ab.extension={name:"tilingSprite",type:He.RendererPlugin};tt.add(ab);const ob=class ll{constructor(e,t,i){this.linkedSheets=[],(e instanceof yt||e instanceof gt)&&(e={texture:e,data:t,resolutionFilename:i});const{texture:n,data:r,resolutionFilename:a=null,cachePrefix:o=""}=e;this.cachePrefix=o,this._texture=n instanceof gt?n:null,this.baseTexture=n instanceof yt?n:this._texture.baseTexture,this.textures={},this.animations={},this.data=r;const h=this.baseTexture.resource;this.resolution=this._updateResolution(a||(h?h.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=pr(e,null);return i===null&&(i=typeof t=="number"?t:parseFloat(t??"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=ll.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=ll.BATCH_SIZE;for(;t-e{this._batchIndex*ll.BATCH_SIZE{i[n]=e}),Object.keys(e.textures).forEach(n=>{i[`${e.cachePrefix}${n}`]=e.textures[n]}),!t){const n=wi.dirname(s[0]);e.linkedSheets.forEach((r,a)=>{Object.assign(i,lb([`${n}/${e.data.meta.related_multi_packs[a]}`],r,!0))})}return i}const bI={extension:He.Asset,cache:{test:s=>s instanceof Av,getCacheableAssets:(s,e)=>lb(s,e,!1)},resolver:{test:s=>{const e=s.split("?")[0].split("."),t=e.pop(),i=e.pop();return t==="json"&&xI.includes(i)},parse:s=>{var t;const e=s.split(".");return{resolution:parseFloat(((t=We.RETINA_PREFIX.exec(s))==null?void 0:t[1])??"1"),format:e[e.length-2],src:s}}},loader:{name:"spritesheetLoader",extension:{type:He.LoadParser,priority:Is.Normal},async testParse(s,e){return wi.extname(e.src).toLowerCase()===".json"&&!!s.frames},async parse(s,e,t){var c,u;const{texture:i,imageFilename:n,cachePrefix:r}=(e==null?void 0:e.data)??{};let a=wi.dirname(e.src);a&&a.lastIndexOf("/")!==a.length-1&&(a+="/");let o;if(i&&i.baseTexture)o=i;else{const d=Mh(a+(n??s.meta.image),e.src);o=(await t.load([d]))[d]}const h=new Av({texture:o.baseTexture,data:s,resolutionFilename:e.src,cachePrefix:r});await h.parse();const l=(c=s==null?void 0:s.meta)==null?void 0:c.related_multi_packs;if(Array.isArray(l)){const d=[];for(const p of l){if(typeof p!="string")continue;let m=a+p;(u=e.data)!=null&&u.ignoreMultiPack||(m=Mh(m,e.src),d.push(t.load({src:m,data:{ignoreMultiPack:!0}})))}const f=await Promise.all(d);h.linkedSheets=f,f.forEach(p=>{p.linkedSheets=[h].concat(h.linkedSheets.filter(m=>m!==p))})}return h},unload(s){s.destroy(!0)}}};tt.add(bI);class Ih{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class zc{static test(e){return typeof e=="string"&&e.startsWith("info face=")}static parse(e){const t=e.match(/^[a-z]+\s+.+$/gm),i={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const r in t){const a=t[r].match(/^[a-z]+/gm)[0],o=t[r].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),h={};for(const l in o){const c=o[l].split("="),u=c[0],d=c[1].replace(/"/gm,""),f=parseFloat(d),p=isNaN(f)?d:f;h[u]=p}i[a].push(h)}const n=new Ih;return i.info.forEach(r=>n.info.push({face:r.face,size:parseInt(r.size,10)})),i.common.forEach(r=>n.common.push({lineHeight:parseInt(r.lineHeight,10)})),i.page.forEach(r=>n.page.push({id:parseInt(r.id,10),file:r.file})),i.char.forEach(r=>n.char.push({id:parseInt(r.id,10),page:parseInt(r.page,10),x:parseInt(r.x,10),y:parseInt(r.y,10),width:parseInt(r.width,10),height:parseInt(r.height,10),xoffset:parseInt(r.xoffset,10),yoffset:parseInt(r.yoffset,10),xadvance:parseInt(r.xadvance,10)})),i.kerning.forEach(r=>n.kerning.push({first:parseInt(r.first,10),second:parseInt(r.second,10),amount:parseInt(r.amount,10)})),i.distanceField.forEach(r=>n.distanceField.push({distanceRange:parseInt(r.distanceRange,10),fieldType:r.fieldType})),n}}class bm{static test(e){const t=e;return typeof e!="string"&&"getElementsByTagName"in e&&t.getElementsByTagName("page").length&&t.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(e){const t=new Ih,i=e.getElementsByTagName("info"),n=e.getElementsByTagName("common"),r=e.getElementsByTagName("page"),a=e.getElementsByTagName("char"),o=e.getElementsByTagName("kerning"),h=e.getElementsByTagName("distanceField");for(let l=0;l")?bm.test(We.ADAPTER.parseXML(e)):!1}static parse(e){return bm.parse(We.ADAPTER.parseXML(e))}}const df=[zc,bm,wm];function wI(s){for(let e=0;e=h-F*a){if(m===0)throw new Error(`[BitmapFont] textureHeight ${h}px is too small (fontFamily: '${u.fontFamily}', fontSize: ${u.fontSize}px, char: '${_}')`);--T,g=null,v=null,b=null,m=0,p=0,y=0;continue}if(y=Math.max(F+R.fontProperties.descent,y),I*a+p>=d){if(p===0)throw new Error(`[BitmapFont] textureWidth ${o}px is too small (fontFamily: '${u.fontFamily}', fontSize: ${u.fontSize}px, char: '${_}')`);--T,m+=y*a,m=Math.ceil(m),p=0,y=0;continue}MI(g,v,R,p,m,a,u);const k=qc(R.text);f.char.push({id:k,page:w.length-1,x:p/a,y:m/a,width:I,height:F,xoffset:0,yoffset:0,xadvance:P-(u.dropShadow?u.dropShadowDistance:0)-(u.stroke?u.strokeThickness:0)}),p+=(I+2*r)*a,p=Math.ceil(p)}if(!(i!=null&&i.skipKerning))for(let T=0,_=c.length;T<_;T++){const R=c[T];for(let P=0;P<_;P++){const F=c[P],I=v.measureText(R).width,k=v.measureText(F).width,B=v.measureText(R+F).width-(I+k);B&&f.kerning.push({first:qc(R),second:qc(F),amount:B})}}const A=new yn(f,w,!0);return yn.available[e]!==void 0&&yn.uninstall(e),yn.available[e]=A,A}};Tr.ALPHA=[["a","z"],["A","Z"]," "],Tr.NUMERIC=[["0","9"]],Tr.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],Tr.ASCII=[[" ","~"]],Tr.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:Tr.ALPHANUMERIC},Tr.available={};let Ar=Tr;var TI=`// Pixi texture info\r varying vec2 vTextureCoord;\r uniform sampler2D uSampler;\r \r @@ -1156,8 +1156,8 @@ void main(void)\r \r vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r }\r -`;const Ev=[],Cv=[],Iv=[],EI=class h1 extends ji{constructor(e,t={}){super();const{align:i,tint:n,maxWidth:r,letterSpacing:a,fontName:o,fontSize:h}=Object.assign({},h1.styleDefaults,t);if(!Ar.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=i,this._tintColor=new jt(n),this._font=void 0,this._fontName=o,this._fontSize=h,this.text=e,this._maxWidth=r,this._maxLineHeight=0,this._letterSpacing=a,this._anchor=new sr(()=>{this.dirty=!0},this,0,0),this._roundPixels=We.ROUND_PIXELS,this.dirty=!0,this._resolution=We.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var I;const e=Ar.available[this._fontName],t=this.fontSize,i=t/e.size,n=new Ut,r=[],a=[],o=[],h=this._text.replace(/(?:\r\n|\r)/g,` -`)||" ",l=c1(h),c=this._maxWidth*e.size/t,u=e.distanceFieldType==="none"?Ev:Cv;let d=null,f=0,p=0,m=0,g=-1,v=0,b=0,y=0,w=0;for(let k=0;k{this.dirty=!0},this,0,0),this._roundPixels=We.ROUND_PIXELS,this.dirty=!0,this._resolution=We.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var I;const e=Ar.available[this._fontName],t=this.fontSize,i=t/e.size,n=new Ut,r=[],a=[],o=[],h=this._text.replace(/(?:\r\n|\r)/g,` +`)||" ",l=cb(h),c=this._maxWidth*e.size/t,u=e.distanceFieldType==="none"?Ev:Cv;let d=null,f=0,p=0,m=0,g=-1,v=0,b=0,y=0,w=0;for(let k=0;k0&&n.x>c&&(++b,yo(r,1+g-b,1+k-g),k=g,g=-1,a.push(v),o.push(r.length>0?r[r.length-1].prevSpaces:0),p=Math.max(p,v),m++,n.x=0,n.y+=e.lineHeight,d=null,w=0)}const A=l[l.length-1];A!=="\r"&&A!==` `&&(/(?:\s)/.test(A)&&(f=v),a.push(f),p=Math.max(p,f),o.push(-1));const T=[];for(let k=0;k<=m;k++){let B=0;this._align==="right"?B=p-a[k]:this._align==="center"?B=(p-a[k])/2:this._align==="justify"&&(B=o[k]<0?0:(p-a[k])/o[k]),T.push(B)}const _=r.length,R={},P=[],F=this._activePagesMeshData;u.push(...F);for(let k=0;k<_;k++){const B=r[k].texture,D=B.baseTexture.uid;if(!R[D]){let U=u.pop();if(!U){const N=new Sp;let O,X;e.distanceFieldType==="none"?(O=new Ch(gt.EMPTY),X=dt.NORMAL):(O=new Ch(gt.EMPTY,{program:kn.from(AI,TI),uniforms:{uFWidth:0}}),X=dt.NORMAL_NPM);const E=new Ll(N,O);E.blendMode=X,U={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:E,vertices:null,uvs:null,indices:null}}U.index=0,U.indexCount=0,U.vertexCount=0,U.uvsCount=0,U.total=0;const{_textureCache:L}=this;L[D]=L[D]||new gt(B.baseTexture),U.mesh.texture=L[D],U.mesh.tint=this._tintColor.value,P.push(U),R[D]=U}R[D].total++}for(let k=0;k6*D)||B.vertices.lengtht[n.mesh.texture.baseTexture.uid]).forEach(n=>{n.mesh.texture=gt.EMPTY});for(const n in t)t[n].destroy(),delete t[n];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};EI.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const CI=[".xml",".fnt"],II={extension:{type:He.LoadParser,priority:Is.Normal},name:"loadBitmapFont",test(s){return CI.includes(wi.extname(s).toLowerCase())},async testParse(s){return zc.test(s)||wm.test(s)},async parse(s,e,t){const i=zc.test(s)?zc.parse(s):wm.parse(s),{src:n}=e,{page:r}=i,a=[];for(let l=0;lo[l]);return Ar.install(i,h,!0)},async load(s,e){return(await We.ADAPTER.fetch(s)).text()},unload(s){s.destroy()}};tt.add(II);const Sm=class ao extends jr{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new ao(Object.keys(ao.defaultOptions).reduce((t,i)=>({...t,[i]:e[i]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete ao.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:i}=ao;if(i[e]){const n=i[e];return this._fonts.push(n),n.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return We.ADAPTER.fetch(e).then(n=>n.blob()).then(async n=>new Promise((r,a)=>{const o=URL.createObjectURL(n),h=new FileReader;h.onload=()=>r([o,h.result]),h.onerror=a,h.readAsDataURL(n)})).then(async([n,r])=>{const a=Object.assign({family:wi.basename(e,wi.extname(e)),weight:"normal",style:"normal",display:"auto",src:n,dataSrc:r,refs:1,originalUrl:e,fontFace:null},t);i[e]=a,this._fonts.push(a),this.styleID++;const o=new FontFace(a.family,`url(${a.src})`,{weight:a.weight,style:a.style,display:a.display});a.fontFace=o,await o.load(),document.fonts.add(o),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const t=e.filter(i=>!this._overrides.includes(i));t.length>0&&(this._overrides.push(...t),this.styleID++)}removeOverride(...e){const t=e.filter(i=>this._overrides.includes(i));t.length>0&&(this._overrides=this._overrides.filter(i=>!t.includes(i)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,t)=>`${e} @font-face { @@ -1166,7 +1166,7 @@ void main(void)\r font-weight: ${t.weight}; font-style: ${t.style}; font-display: ${t.display}; - }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=xA(e)),typeof e=="number"?yA(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,i=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),n=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const r=`${i}px ${n}px`;return this.dropShadowBlur>0?`text-shadow: ${r} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${r} ${e}`}reset(){Object.assign(this,ao.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=We.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};Sm.availableFonts={},Sm.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let ff=Sm;const Tc=class oo extends Zr{constructor(e="",t={}){super(gt.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const i=new Image,n=gt.from(i,{scaleMode:We.SCALE_MODE,resourceOptions:{autoLoad:!1}});n.orig=new Tt,n.trim=new Tt,this.texture=n;const r="http://www.w3.org/2000/svg",a="http://www.w3.org/1999/xhtml",o=document.createElementNS(r,"svg"),h=document.createElementNS(r,"foreignObject"),l=document.createElementNS(a,"div"),c=document.createElementNS(a,"style");h.setAttribute("width","10000"),h.setAttribute("height","10000"),h.style.overflow="hidden",o.appendChild(h),this.maxWidth=oo.defaultMaxWidth,this.maxHeight=oo.defaultMaxHeight,this._domElement=l,this._styleElement=c,this._svgRoot=o,this._foreignObject=h,this._foreignObject.appendChild(c),this._foreignObject.appendChild(l),this._image=i,this._loadImage=new Image,this._autoResolution=oo.defaultAutoResolution,this._resolution=oo.defaultResolution??We.RESOLUTION,this.text=e,this.style=t}measureText(e){var c,u;const{text:t,style:i,resolution:n}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(n)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const r=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:a,height:o}=r;(a>this.maxWidth||o>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const h=Math.min(this.maxWidth,Math.ceil(a)),l=Math.min(this.maxHeight,Math.ceil(o));return this._svgRoot.setAttribute("width",h.toString()),this._svgRoot.setAttribute("height",l.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:(c=this._style)==null?void 0:c.toCSS(n)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:h+i.padding*2,height:l+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:n}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:r,height:a}=this.measureText();i.width=n.width=Math.ceil(Math.max(1,r)),i.height=n.height=Math.ceil(Math.max(1,a)),this._updateID++;const o=this._updateID;await new Promise(h=>{n.onload=async()=>{if(o/gi,"

").replace(/
/gi,"
").replace(/ /gi," ")}};Tc.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0},Tc.defaultMaxWidth=2024,Tc.defaultMaxHeight=2024,Tc.defaultAutoResolution=!0;function Rh(s,e){const t=Math.max(0,Number(s)||0),i=Math.max(0,Number(e)||0);return{inner:Math.min(t,i),outer:Math.max(t,i)}}function u1(s){const e=Math.max(0,Number(s.outerRectW)||0),t=Math.max(0,Number(s.outerRectH)||0);return{innerW:Math.min(e,Math.max(0,Number(s.innerRectW)||0)),innerH:Math.min(t,Math.max(0,Number(s.innerRectH)||0)),outerW:e,outerH:t}}function RI(s,e,t,i,n){if(s==="random")return n();const r=Math.max(1,Math.round(t)),a=Math.max(0,Math.round(e))%r;return i?a/r:r<=1?.5:a/(r-1)}function Rv(s,e,t,i){const n=Math.sqrt(s*s+i()*(e*e-s*s));return{x:Math.cos(t)*n,y:-Math.sin(t)*n,radialAngle:-t*180/Math.PI}}function PI(s,e){const{innerW:t,innerH:i,outerW:n,outerH:r}=u1(s),a=Math.max(0,(n-t)/2),o=Math.max(0,(r-i)/2),h=a*r,l=t*o,c=h*2+l*2;if(c<=0){const p=n*2+r*2;if(p<=0)return{x:0,y:0,radialAngle:0};let m=e()*p,g,v;return mtypeof B=="object"&&B!==null?{...B}:B):k);i&&(s.innerRadius=0,s.outerRadius=Math.max(0,Number.isFinite(n)?n:e.outerRadius),s.innerRectW=0,s.innerRectH=0,s.outerRectW=Math.max(0,Number.isFinite(r)?r:e.outerRectW),s.outerRectH=Math.max(0,Number.isFinite(a)?a:e.outerRectH),s.coneDirection=Number.isFinite(o)?o:90,s.emissionAngleMode=Number.isFinite(h)&&h>0?"random":"fixed",l==="cone"&&(s.spread=Math.max(0,Number(s.coneAngle)||0)),s.shapeRangeVersion=1),s.shape==="orbit"&&(s.shape="path"),["fixed","random","radial","path-normal","path-tangent"].includes(s.emissionAngleMode)||(s.emissionAngleMode="fixed"),!["circle","rect","cone"].includes(s.shape)&&s.emissionAngleMode==="radial"&&(s.emissionAngleMode="fixed"),s.shape!=="path"&&(s.emissionAngleMode==="path-normal"||s.emissionAngleMode==="path-tangent")&&(s.emissionAngleMode="fixed"),s.spawnPathId=Math.max(0,Math.round(Number(s.spawnPathId)||0)),s.spawnPathDistribution!=="fixed"&&s.spawnPathDistribution!=="random"&&(s.spawnPathDistribution="fixed"),s.innerRadius=Math.max(0,Number(s.innerRadius)||0),s.outerRadius=Math.max(s.innerRadius,Number(s.outerRadius)||0),s.innerRectW=Math.max(0,Number(s.innerRectW)||0),s.innerRectH=Math.max(0,Number(s.innerRectH)||0),s.outerRectW=Math.max(s.innerRectW,Number(s.outerRectW)||0),s.outerRectH=Math.max(s.innerRectH,Number(s.outerRectH)||0);const P=Array.from(new Set((Array.isArray(s.collisionColliderIds)?s.collisionColliderIds:[]).map(I=>Math.round(Number(I))).filter(I=>Number.isFinite(I)&&I>0)));(P.length!==s.collisionColliderIds.length||P.some((I,k)=>I!==s.collisionColliderIds[k]))&&(s.collisionColliderIds=P),s.streamBehavior!=="normal"&&s.streamBehavior!=="loop"&&(s.streamBehavior="normal"),(u||!Number.isFinite(s.loopDurationFrames))&&(s.loopDurationFrames=Math.ceil(Math.max(1/30,Number(s.duration)||1)*30)),s.loopDurationFrames=Math.min(1800,Math.max(1,Math.ceil(s.loopDurationFrames))),typeof s.generateLoopStartAnimation!="boolean"&&(s.generateLoopStartAnimation=!1),typeof s.generateLoopEndAnimation!="boolean"&&(s.generateLoopEndAnimation=!1),typeof s.loopStartUseCustomDuration!="boolean"&&(s.loopStartUseCustomDuration=!1),typeof s.loopEndUseCustomDuration!="boolean"&&(s.loopEndUseCustomDuration=!1),s.loopStartDurationFrames=Math.min(1800,Math.max(1,Math.ceil(Number(s.loopStartDurationFrames)||30))),s.loopEndDurationFrames=Math.min(1800,Math.max(1,Math.ceil(Number(s.loopEndDurationFrames)||30))),(!Array.isArray(s.imageResources)||s.imageResources.length===0)&&(s.imageResources=Dl().imageResources);for(const I of s.imageResources){!I.texture&&s.texture&&(I.texture=s.texture),I.textureName||(I.textureName="star"),I.previewUrl==="/particles/star.png"&&(I.previewUrl="/images/star.png"),I.previewUrl||(I.previewUrl=I.textureName==="star"?"/images/star.png":""),I.imageMode!=="fixed"&&I.imageMode!=="sequence"&&(I.imageMode="fixed"),I.sequencePlayback==="once"?I.sequencePlayback="once-hold":I.sequencePlayback==="loop"?I.sequencePlayback="loop-forward":["once-hide","once-hold","loop-forward","loop-reverse"].includes(I.sequencePlayback)||(I.sequencePlayback="loop-forward"),Number.isFinite(I.sequenceFps)||(I.sequenceFps=30),I.sequenceFps=Math.min(120,Math.max(1,Number(I.sequenceFps)||30)),Array.isArray(I.sequenceFrames)||(I.sequenceFrames=[]);for(const k of I.sequenceFrames)typeof k.name!="string"&&(k.name=""),typeof k.previewUrl!="string"&&(k.previewUrl=""),k.texture===void 0&&(k.texture=null);Number.isFinite(I.weight)||(I.weight=100),typeof I.locked!="boolean"&&(I.locked=!1),Number.isFinite(I.scale)||(I.scale=1),Number.isFinite(I.anchorX)||(I.anchorX=.5),Number.isFinite(I.anchorY)||(I.anchorY=.5),I.colorMode!=="fixed"&&I.colorMode!=="random"&&I.colorMode!=="lifetime"&&(I.colorMode=s.colorOverLife?"lifetime":"fixed"),I.colorStart||(I.colorStart=s.colorStart||"#ffffff"),I.colorEnd||(I.colorEnd=s.colorEnd||I.colorStart),(!Array.isArray(I.colorGradient)||I.colorGradient.length<2)&&(I.colorGradient=[{position:0,color:I.colorStart},{position:1,color:I.colorEnd}]),Object.prototype.hasOwnProperty.call(Rr,I.blend)||(I.blend=s.blend||"normal"),["off","fixed","curve"].includes(I.independentAlpha)||(I.independentAlpha=s.independentAlpha||"off"),Number.isFinite(I.alpha)||(I.alpha=Number.isFinite(s.alphaScale)?s.alphaScale:1),["跟随导出","线性","贝塞尔"].includes(I.alphaCurveMode)||(I.alphaCurveMode=s.curveMode||"跟随导出"),(!Array.isArray(I.alphaCurve)||I.alphaCurve.length<2)&&(I.alphaCurve=(s.alphaCurve||[{x:0,y:1},{x:1,y:1}]).map(k=>({...k})))}if(s.imageResources.length===1)s.imageResources[0].weight=100,s.imageResources[0].locked=!1;else if(c){const I=100/s.imageResources.length;s.imageResources.forEach((k,B)=>{k.weight=B===s.imageResources.length-1?100-I*(s.imageResources.length-1):I,k.locked=!1})}if(s.imageWeightVersion=1,d){const I=Number.isFinite(f)&&f!==0?f:980;s.gravity=I,s.gravityMin=I,s.gravityMax=I}if(p){const I=Number.isFinite(m)&&Number.isFinite(g)&&(m!==0||g!==0);s.windMin=I?Math.hypot(m,g):100,s.windMax=s.windMin,s.windDirection=I?Math.atan2(-g,m)*180/Math.PI:0}v&&(s.forceStrength=Number.isFinite(b)&&b!==0?b:10),y&&(s.trailConfigVersion=3,s.trailAlphaCurve=[{x:0,y:1},{x:1,y:1}],s.trailLifeLengthCurve=[{x:0,y:1},{x:1,y:1}],s.trailShapeCurve=[{x:0,y:1},{x:1,y:1}],s.trailGridRows=4,s.trailGridCols=4),(w||!s.trailResources.length)&&(s.trailResources=[{id:1,texture:T||null,textureName:_,previewUrl:R,weight:100,locked:!1,rotation:0,colorMode:s.trailColorMode,color:s.trailColor,colorGradient:s.trailColorGradient.map(I=>({...I})),blend:"normal",alphaMode:s.trailAlphaMode,alpha:s.trailAlpha,alphaCurve:s.trailAlphaCurve.map(I=>({...I})),boneCount:s.trailBoneCount,trailRatio:100,lengthMode:"fixed",length:s.trailLength,lengthMin:s.trailLength,lengthMax:s.trailLength,widthSizeMode:"fixed",width:s.trailWidth,widthMin:s.trailWidth,widthMax:s.trailWidth,widthMode:s.trailWidthMode,lifeLengthEnabled:s.trailLifeLengthEnabled,lifeLengthCurve:s.trailLifeLengthCurve.map(I=>({...I})),shapeEnabled:s.trailShapeEnabled,shapeCurve:s.trailShapeCurve.map(I=>({...I}))}]);for(const I of s.trailResources)I.textureName||(I.textureName="trail"),I.previewUrl==="/trails/trail.png"&&(I.previewUrl="/images/trail.png"),I.previewUrl||(I.previewUrl="/images/trail.png"),Number.isFinite(I.weight)||(I.weight=100),typeof I.locked!="boolean"&&(I.locked=!1),Number.isFinite(I.rotation)||(I.rotation=0),["particle","fixed","curve"].includes(I.colorMode)||(I.colorMode=s.trailColorMode||"particle"),I.color||(I.color=s.trailColor||"#ffffff"),(!Array.isArray(I.colorGradient)||I.colorGradient.length<2)&&(I.colorGradient=(s.trailColorGradient||[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}]).map(k=>({...k}))),Object.prototype.hasOwnProperty.call(Rr,I.blend)||(I.blend="normal"),["particle","fixed","curve"].includes(I.alphaMode)||(I.alphaMode=s.trailAlphaMode||"particle"),Number.isFinite(I.alpha)||(I.alpha=Number.isFinite(s.trailAlpha)?s.trailAlpha:1),(!Array.isArray(I.alphaCurve)||I.alphaCurve.length<2)&&(I.alphaCurve=(s.trailAlphaCurve||[{x:0,y:1},{x:1,y:1}]).map(k=>({...k}))),Number.isFinite(I.boneCount)||(I.boneCount=Number.isFinite(s.trailBoneCount)?s.trailBoneCount:3),Number.isFinite(I.trailRatio)||(I.trailRatio=100),I.trailRatio=Math.min(100,Math.max(0,I.trailRatio)),["fixed","random"].includes(I.lengthMode)||(I.lengthMode="fixed"),Number.isFinite(I.length)||(I.length=Number.isFinite(s.trailLength)?s.trailLength:100),Number.isFinite(I.lengthMin)||(I.lengthMin=I.length),Number.isFinite(I.lengthMax)||(I.lengthMax=I.length),["fixed","random"].includes(I.widthSizeMode)||(I.widthSizeMode="fixed"),Number.isFinite(I.width)||(I.width=Number.isFinite(s.trailWidth)?s.trailWidth:100),Number.isFinite(I.widthMin)||(I.widthMin=I.width),Number.isFinite(I.widthMax)||(I.widthMax=I.width),["particle","fixed"].includes(I.widthMode)||(I.widthMode=s.trailWidthMode||"particle"),typeof I.lifeLengthEnabled!="boolean"&&(I.lifeLengthEnabled=!!s.trailLifeLengthEnabled),(!Array.isArray(I.lifeLengthCurve)||I.lifeLengthCurve.length<2)&&(I.lifeLengthCurve=(s.trailLifeLengthCurve||[{x:0,y:1},{x:1,y:1}]).map(k=>({...k}))),typeof I.shapeEnabled!="boolean"&&(I.shapeEnabled=!!s.trailShapeEnabled),(!Array.isArray(I.shapeCurve)||I.shapeCurve.length<2)&&(I.shapeCurve=(s.trailShapeCurve||[{x:0,y:1},{x:1,y:1}]).map(k=>({...k})));if(s.trailResources.length===1&&(s.trailResources[0].weight=100,s.trailResources[0].locked=!1),A)for(const I of s.trailResources)I.alphaCurve=((F=I.alphaCurve)==null?void 0:F.length)>=2?I.alphaCurve:[{x:0,y:1},{x:1,y:1}];return s.trailResourceVersion=6,s}const Rr={normal:0,add:1,multiply:2,screen:3},OI=400;class BI extends ji{constructor(t,i=OI){super();x(this,"pool",[]);x(this,"cfg");x(this,"accumulator",0);x(this,"burstTimer",0);x(this,"_spawnSerial",0);x(this,"_elapsed",0);x(this,"_attractionEnabledAt",0);x(this,"_attractionWasEnabled",!1);x(this,"_emitterPos",null);x(this,"states",[]);x(this,"rng",Math.random);x(this,"_lastSeed",-1);x(this,"trailDebugGfx",new ys);x(this,"colliders",[]);x(this,"followSpawnX",0);x(this,"followSpawnY",0);x(this,"followSpawnAngle",0);x(this,"spawnPathSampler",null);x(this,"spawnPathClosed",!1);x(this,"followExportCurveMode","线性");x(this,"simulationTransform",null);this.cfg=Wr(t),this._ensurePool(i),this.addChild(this.trailDebugGfx)}setFollowExportCurveMode(t){this.followExportCurveMode=t}resolveCurveMode(t){return t==="跟随导出"?this.followExportCurveMode:t}reseed(){const t=this.cfg.seed;t!==this._lastSeed&&(this._lastSeed=t,this.rng=pf(t>>>0))}_ensurePool(t){for(;this.pool.length=n.delay),a=i==="force"||i==="normal"&&(n.mode==="burst"||this._elapsed=1;)this.accumulator-=1,this.spawnOne();else this.burstTimer+=t,n.burstLoop?this.burstTimer>=1&&(this.burstTimer=0,this.emitBurst()):t>0&&this.burstTimer<=t&&this.emitBurst();const o=[];for(let p=0;p0){const O=Math.max(1e-4,Math.abs(n.rootScaleX)),X=Math.max(1e-4,Math.abs(n.rootScaleY)),E=-(((h=this.simulationTransform)==null?void 0:h.rotation)??n.rootRotation)*Math.PI/180,V=Math.cos(E),q=Math.sin(E),W=((l=this.simulationTransform)==null?void 0:l.centerX)??n.centerX,J=((c=this.simulationTransform)==null?void 0:c.centerY)??n.centerY,K=W+V*O*m.x-q*X*m.y,fe=-J+q*O*m.x+V*X*m.y,me=K,we=-fe,Ee=n.forceCenterX-me,pe=n.forceCenterY-we,Ae=Math.hypot(Ee,pe);if(Ae>1e-4&&Ae<=n.forceRadius){let G=1;n.forceFalloff==="linear"?G=1-Ae/n.forceRadius:n.forceFalloff==="inverse"&&(G=Math.min(10,n.forceRadius/Math.max(Ae,n.forceRadius*.1)));const Z=n.forceStrength*G*10,z=Ee/Ae*Z,j=pe/Ae*Z,te=z,he=-j;m.vx+=(V*te+q*he)/O*t,m.vy+=(-q*te+V*he)/X*t}}if(!m.collisionPaused&&n.damping>0){const O=Math.max(0,1-n.damping*t);m.vx*=O,m.vy*=O}if(m.collisionPaused)m.vx=0,m.vy=0;else if(m.x+=m.vx*t,m.y+=m.vy*t,this.applyColliders(m,p))continue;if(n.attraction&&!m.collisionPaused){const O=m.maxLife-m.life;if(n.attractionDelayMode==="particle"?O>=Math.max(0,n.attractionDelay):this._elapsed-this._attractionEnabledAt>=Math.max(0,n.attractionDelay)){const E=Za(n,m.x,m.y,this.simulationTransform),V=n.attractionCenterX,q=n.attractionCenterY,W=Math.max(0,n.attractionRadius);if(!m.attractionActive){if(Math.hypot(V-E.x,q-E.y)<=W){this.kill(p);continue}m.attractionActive=!0,m.attractionElapsed=0,m.attractionStartWorldX=E.x,m.attractionStartWorldY=E.y}m.attractionElapsed+=t;const J=Math.max(1e-4,n.attractionDuration),K=Math.min(1,m.attractionElapsed/J);let fe=Vi(m.attractionStartWorldX,V,K),me=Vi(m.attractionStartWorldY,q,K);if(n.attractionPath==="curve"){const pe=V-m.attractionStartWorldX,Ae=q-m.attractionStartWorldY,G=Math.hypot(pe,Ae);if(G>1e-4){const Z=G*.25*m.attractionCurveSide,z=(m.attractionStartWorldX+V)*.5-Ae/G*Z,j=(m.attractionStartWorldY+q)*.5+pe/G*Z,te=1-K;fe=te*te*m.attractionStartWorldX+2*te*K*z+K*K*V,me=te*te*m.attractionStartWorldY+2*te*K*j+K*K*q}}const we=Math.hypot(V-fe,q-me);if(K>=1||we<=W){this.kill(p);continue}const Ee=Pv(n,fe,me,this.simulationTransform);m.x=Ee.x,m.y=Ee.y,m.vx=0,m.vy=0}}const v=g,b=m.sprite,y=n.imageResources.find(O=>O.id===m.resourceId);if(y){const O=this.imageFrameState(y,m.maxLife-m.life);m.imageFrameIndex=O.index,b.texture=this.imageFrameTexture(y,m.imageFrameIndex),b.visible=O.visible}if(n.speedOverLifeEnabled){const O=Ac(mf(n.speedOverLifeMode,n.speedOverLifeMin,n.speedOverLifeMax,n.speedOverLifeCurve,v,m.speedScaleTarget),1),X=m.speedScale===0?O:O/m.speedScale;m.vx*=X,m.vy*=X,m.speedScale=O}let w=m.rotationSpeed;n.rotationOverLifeEnabled&&n.rotationOverLifeMode==="curve"&&(w=Vi(n.rotationSpeedMin,n.rotationSpeedMax,wn(n.rotationOverLifeCurve,v))),m.rotation+=w*t;let A=m.x,T=m.y;if(n.noise&&n.noiseAmt>0&&n.noiseRange>0&&n.noiseSpeed>0){const O=m.maxLife-m.life,X=Math.max(0,n.noiseRange)*Math.min(1,Math.max(0,n.noiseAmt)/100)*.5,E=O*Math.max(0,n.noiseSpeed)*Math.PI*2;A+=(Math.sin(m.noisePhaseX+E)-Math.sin(m.noisePhaseX))*X,T+=(Math.sin(m.noisePhaseY+E*.83)-Math.sin(m.noisePhaseY))*X}b.x=A,b.y=T,b.rotation=-m.rotation*Math.PI/180;let _=1,R=1;n.scaleOverLifeEnabled&&(_=mf(n.scaleOverLifeMode,n.scaleOverLifeMin,n.scaleOverLifeMax,n.scaleOverLifeCurve,v,m.scaleOverLifeX),R=n.scaleOverLifeAxisMode==="separate"?mf(n.scaleOverLifeMode,n.scaleYOverLifeMin,n.scaleYOverLifeMax,n.scaleYOverLifeCurve,v,m.scaleOverLifeY):_),b.scale.set(Ac(m.scaleStartX*_,1),Ac(m.scaleStartY*R,1));const P=n.alphaMode==="curve"?wn(n.alphaCurve,v,this.resolveCurveMode(n.curveMode))*n.alphaScale:n.alpha*n.alphaScale;b.alpha=Ac((y==null?void 0:y.independentAlpha)==="fixed"?y.alpha:(y==null?void 0:y.independentAlpha)==="curve"?wn(y.alphaCurve,v,this.resolveCurveMode(y.alphaCurveMode)):P,1);const F=(y==null?void 0:y.colorStart)||"#ffffff",I=(y==null?void 0:y.colorMode)==="lifetime"?gf(y.colorGradient,v):(y==null?void 0:y.colorMode)==="random"?m.colorSample:Mo(F);b.tint=I,b.blendMode=Rr[(y==null?void 0:y.blend)||"normal"];const k=this.updateTrail(m,A,T,v,b),B=Za(n,A,T,this.simulationTransform),D=((u=this.simulationTransform)==null?void 0:u.rotation)??n.rootRotation,U=Math.abs(((d=this.simulationTransform)==null?void 0:d.scaleX)??n.rootScaleX),L=Math.abs(((f=this.simulationTransform)==null?void 0:f.scaleY)??n.rootScaleY),N=k?{...k,bones:k.bones.map(O=>{const X=Za(n,O.x,O.y,this.simulationTransform);return{...O,worldX:X.x,worldY:X.y,worldRotation:D-O.rotation}})}:void 0;o.push({boneName:m.boneName,spawnId:m.spawnId,x:A,y:T,rotation:m.rotation,scaleX:b.scale.x,scaleY:b.scale.y,worldX:B.x,worldY:B.y,worldRotation:D+m.rotation,worldScaleX:b.scale.x*U,worldScaleY:b.scale.y*L,alpha:b.alpha,colorHex:I,resourceId:m.resourceId,imageFrameIndex:m.imageFrameIndex,imageVisible:b.visible,trailState:N,active:!0})}return this.states=o,o}ensureTrailMesh(t){const i=this.cfg,n=i.trailResources.find(g=>g.id===t.trailResourceId)||i.trailResources[0],r=(n==null?void 0:n.texture)||gt.EMPTY,a=Number(n==null?void 0:n.rotation)||0,o=Math.max(2,Math.min(16,Math.round(i.trailGridRows))),h=Math.max(2,Math.min(32,Math.round(i.trailGridCols))),l=Math.max(2,Math.min(16,Math.round((n==null?void 0:n.boneCount)??3))),c=`${o}:${h}:${l}:${(n==null?void 0:n.id)??0}:${a}`;if(t.trailMesh&&t.trailMeshSignature===c)return t.trailMesh.texture!==r&&(t.trailMesh.texture=r),t.trailMesh;t.trailMesh&&(this.removeChild(t.trailMesh),t.trailMesh.destroy()),t.trailMeshSignature&&t.trailMeshSignature!==c&&(t.trailHistory.length=0,t.trailBones.length=0);const u=new Float32Array(o*h*2),d=new Float32Array(o*h*2),f=[],p=[];for(let g=0;g.05?t.trailHistory.unshift({x:i,y:n}):(a.x=i,a.y=n);const o=Math.max(1,r)*1.5;let h=0,l=t.trailHistory.length;for(let c=1;c=o||c>=239){l=c+1;break}t.trailHistory.length>l&&(t.trailHistory.length=l)}sampleTrailBones(t,i,n){const r=Math.max(2,Math.min(16,Math.round(n))),a=t.trailHistory,o=[];if(!a.length)return o;let h=0;for(let c=1;c=u&&v>1e-4){const b=(u-d)/v;f={x:Vi(m.x,g.x,b),y:Vi(m.y,g.y,b)};break}d+=v}o.push({boneName:`${t.boneName}_trail_${c}`,x:f.x,y:f.y,rotation:0})}for(let c=0;c1){const c=o[0].rotation,d=(o[o.length-1].rotation-c+540)%360-180;for(let f=0;fu.id===i.resourceId)||r.trailResources[0];if(!(a!=null&&a.texture)||i.bones.length<2){n.visible=!1;return}t.trailResourceId=a.id,n.texture!==a.texture&&(n.texture=a.texture);const o=Math.max(2,Math.min(16,Math.round(r.trailGridRows))),h=Math.max(2,Math.min(32,Math.round(r.trailGridCols))),l=n.vertices,c=[];for(let u=0;u.5&&i.alpha>0}updateTrail(t,i,n,r,a){const o=this.cfg;if(!o.trail||!t.trailEnabled||t.trailSampledLength<=0||t.trailSampledWidth<=0){t.trailHistory.length=0,t.trailBones.length=0,t.trailMesh&&(t.trailMesh.visible=!1);return}this.ensureTrailMesh(t);const h=o.trailResources.find(f=>f.id===t.trailResourceId)||o.trailResources[0];this.appendTrailPoint(t,i,n,t.trailSampledLength);const l=h!=null&&h.lifeLengthEnabled?Math.max(0,wn(h.lifeLengthCurve,r)):1,c=Math.max(0,t.trailSampledLength)*l;t.trailBones=this.sampleTrailBones(t,c,(h==null?void 0:h.boneCount)??3),t.trailBones[0]&&(t.trailBones[0].x=i,t.trailBones[0].y=n);const u=(h==null?void 0:h.widthMode)==="particle"?(Math.abs(a.scale.x)+Math.abs(a.scale.y))*.5:1;t.trailCurrentWidth=Math.max(0,t.trailSampledWidth)*u,t.trailCurrentAlpha=(h==null?void 0:h.alphaMode)==="particle"?a.alpha:(h==null?void 0:h.alphaMode)==="curve"?wn(h.alphaCurve,r):(h==null?void 0:h.alpha)??1,t.trailCurrentColor=(h==null?void 0:h.colorMode)==="particle"?a.tint:(h==null?void 0:h.colorMode)==="curve"?gf(h.colorGradient,r):Mo((h==null?void 0:h.color)||"#ffffff");const d={bones:t.trailBones.map(f=>({...f})),activeBoneCount:t.trailBones.length,width:t.trailCurrentWidth,alpha:Math.min(1,Math.max(0,t.trailCurrentAlpha)),colorHex:t.trailCurrentColor,resourceId:t.trailResourceId};return this.skinTrailMesh(t,d),d}drawTrailMeshDebug(t){const i=this.trailDebugGfx;if(i.clear(),!t||!this.cfg.trail)return;const n=Math.max(2,Math.min(16,Math.round(this.cfg.trailGridRows))),r=Math.max(2,Math.min(32,Math.round(this.cfg.trailGridCols)));i.lineStyle(1,3790847,.72);for(const a of this.pool){const o=a.trailMesh;if(!(o!=null&&o.visible))continue;const h=o.vertices,l=(c,u)=>{const d=(c*n+u)*2;return{x:h[d],y:h[d+1]}};for(let c=0;c0&&this.spawnPathSampler){const o=this.estimatedEmissionCount(),h=RI(t.spawnPathDistribution,this._spawnSerial,o,this.spawnPathClosed,this.rng),l=this.spawnPathSampler(h);if(l)return{...this.applyFollowToOrigin(l.x+i,l.y+n),radialAngle:0,pathAngle:l.angle}}const r=kI(t,this.rng);return{...this.applyFollowToOrigin(i+r.x,n+r.y),radialAngle:r.radialAngle}}estimatedEmissionCount(){const t=this.cfg;return t.mode==="burst"?Math.max(1,Math.round(t.burstCount)):Math.max(1,Math.floor(t.rate*(t.streamBehavior==="loop"?Math.max(1,t.loopDurationFrames)/30:Math.max(0,t.duration))))}applyFollowToOrigin(t,i){const n=this.followSpawnAngle*Math.PI/180,r=Math.cos(n),a=Math.sin(n);return{x:this.followSpawnX+r*t-a*i,y:this.followSpawnY+a*t+r*i}}spawnOne(){const t=this.cfg;let i=this.pool.findIndex(w=>!w.active);if(i===-1)return;const n=this.spawnOrigin(),{x:r,y:a}=n,o=Ja(t.lifeMode,t.lifeMin,t.lifeMax,t.lifeCurve,this.rng()),h=Ja(t.speedMode,t.speedMin,t.speedMax,t.speedCurve,this.rng()),l=FI(t,n,this.followSpawnAngle,this.rng),c=this.pool[i],u=this.pickImageResource(),d=this._spawnSerial++;c.spawnId=d;const f=this.pickTrailResource(ca(t.seed,d,1540483477));c.noisePhaseX=ca(t.seed,d,1757159915)*Math.PI*2,c.noisePhaseY=ca(t.seed,d,48610963)*Math.PI*2,c.gravityStrength=t.useGravity&&t.gravityMode==="random"?Vi(t.gravityMin,t.gravityMax,this.rng()):t.gravityMin,c.windStrength=t.wind&&t.windMode==="random"?Vi(t.windMin,t.windMax,this.rng()):t.windMin,c.attractionActive=!1,c.attractionElapsed=0,c.collisionPaused=!1,c.attractionCurveSide=ca(t.seed,d,2738958700)<.5?-1:1,c.trailHistory.length=0,c.trailBones.length=0,c.trailCurrentWidth=0,c.trailCurrentAlpha=0,c.trailCurrentColor=16777215,c.trailResourceId=f.id;const p=Math.min(100,Math.max(0,Number(f.trailRatio)||0)),m=t.mode==="burst"?Math.max(0,Math.round(t.burstCount)):Math.max(0,Math.floor(t.rate*(t.streamBehavior==="loop"?Math.max(1,t.loopDurationFrames)/30:Math.max(0,t.duration)))),g=p>0&&m===1&&d===0,v=ca(t.seed,d,668265261)*100,b=(w,A,T,_,R)=>{if(w!=="random")return Math.max(0,Number(A)||0);const P=Math.max(0,Math.min(Number(T)||0,Number(_)||0)),F=Math.max(0,Math.max(Number(T)||0,Number(_)||0));return Vi(P,F,ca(t.seed,d,R))};c.trailSampledLength=b(f.lengthMode,f.length,f.lengthMin,f.lengthMax,374761393),c.trailSampledWidth=b(f.widthSizeMode,f.width,f.widthMin,f.widthMax,3550635116),c.trailEnabled=t.trail&&(g||v0&&c.trailSampledWidth>0,c.trailMesh&&(c.trailMesh.visible=!1),c.active=!0,c.life=o,c.maxLife=o,c.x=r,c.y=a,c.trailEnabled&&c.trailHistory.push({x:r,y:a}),c.vx=Math.cos(l)*h,c.vy=Math.sin(l)*h,c.scaleStartX=Ja(t.scaleMode,t.scaleMin,t.scaleMax,t.scaleCurve,this.rng())*u.scale,c.scaleStartY=t.scaleAxisMode==="separate"?Ja(t.scaleMode,t.scaleYMin,t.scaleYMax,t.scaleYCurve,this.rng())*u.scale:c.scaleStartX,c.alphaStart=t.alpha,c.alphaEnd=t.alphaEnd,c.rotation=t.initialRotationMode==="direction"?-Math.atan2(c.vy,c.vx)*180/Math.PI+t.initialRotationMin:Ja(t.initialRotationMode,t.initialRotationMin,t.initialRotationMax,t.initialRotationCurve,this.rng()),c.rotationSpeed=t.rotationOverLifeEnabled?Ja(t.rotationOverLifeMode,t.rotationSpeedMin,t.rotationSpeedMax,t.rotationOverLifeCurve,this.rng()):0,c.speedScale=1,c.speedScaleTarget=t.speedOverLifeMode==="random"?Vi(t.speedOverLifeMin,t.speedOverLifeMax,this.rng()):t.speedOverLifeMin,c.scaleOverLifeX=t.scaleOverLifeMode==="random"?Vi(t.scaleOverLifeMin,t.scaleOverLifeMax,this.rng()):t.scaleOverLifeMin,c.scaleOverLifeY=t.scaleOverLifeMode==="random"?Vi(t.scaleYOverLifeMin,t.scaleYOverLifeMax,this.rng()):t.scaleYOverLifeMin,c.resourceId=u.id,c.colorSample=u.colorMode==="random"?gf(u.colorGradient,ca(t.seed,d,2654435769)):Mo(u.colorStart);const y=this.imageFrameState(u,0);c.imageFrameIndex=y.index,c.sprite.texture=this.imageFrameTexture(u,y.index),c.sprite.anchor.set(u.anchorX,u.anchorY),c.sprite.blendMode=Rr[u.blend],c.sprite.tint=c.colorSample,c.sprite.visible=!0}pickImageResource(){const t=this.cfg.imageResources.filter(r=>r.texture||r.sequenceFrames.some(a=>a.texture));if(!t.length)return{id:1,texture:this.cfg.texture,textureName:"star",textureFolder:"",previewUrl:"/images/star.png",imageMode:"fixed",sequencePlayback:"loop-forward",sequenceFps:30,sequenceFrames:[],weight:100,locked:!1,scale:1,anchorX:.5,anchorY:.5,colorMode:"fixed",colorStart:"#ffffff",colorEnd:"#ff4d4d",blend:"normal",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ff4d4d"}],independentAlpha:"off",alpha:1,alphaCurveMode:"跟随导出",alphaCurve:[{x:0,y:0},{x:.1,y:1},{x:.9,y:1},{x:1,y:0}]};const i=t.reduce((r,a)=>r+Math.max(0,a.weight),0);if(i<=0)return t[Math.floor(this.rng()*t.length)];let n=this.rng()*i;for(const r of t)if(n-=Math.max(0,r.weight),n<=0)return r;return t[t.length-1]}imageFrameState(t,i){if(t.imageMode!=="sequence"||t.sequenceFrames.length<=1)return{index:0,visible:!0};const n=Math.min(120,Math.max(1,Number(t.sequenceFps)||30)),r=Math.max(0,Math.floor(Math.max(0,i)*n)),a=t.sequenceFrames.length-1;return t.sequencePlayback==="once-hide"?{index:Math.min(a,r),visible:r<=a}:t.sequencePlayback==="once-hold"?{index:Math.min(a,r),visible:!0}:t.sequencePlayback==="loop-reverse"?{index:a-r%t.sequenceFrames.length,visible:!0}:{index:r%t.sequenceFrames.length,visible:!0}}imageFrameTexture(t,i){var n;return t.imageMode==="sequence"&&t.sequenceFrames.length?((n=t.sequenceFrames[Math.max(0,Math.min(t.sequenceFrames.length-1,i))])==null?void 0:n.texture)||t.texture||this.cfg.texture:t.texture||this.cfg.texture}pickTrailResource(t){const i=this.cfg.trailResources.filter(a=>a.texture);if(!i.length)return this.cfg.trailResources[0]||{id:1,texture:null,textureName:"trail",previewUrl:"/images/trail.png",weight:100,locked:!1,rotation:0,colorMode:"particle",color:"#ffffff",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}],blend:"normal",alphaMode:"particle",alpha:1,alphaCurve:[{x:0,y:1},{x:1,y:1}],boneCount:3,trailRatio:100,lengthMode:"fixed",length:100,lengthMin:100,lengthMax:100,widthSizeMode:"fixed",width:100,widthMin:100,widthMax:100,widthMode:"particle",lifeLengthEnabled:!1,lifeLengthCurve:[{x:0,y:1},{x:1,y:1}],shapeEnabled:!1,shapeCurve:[{x:0,y:1},{x:1,y:1}]};const n=i.reduce((a,o)=>a+Math.max(0,o.weight),0);if(n<=0)return i[Math.min(i.length-1,Math.floor(t*i.length))];let r=t*n;for(const a of i)if(r-=Math.max(0,a.weight),r<=0)return a;return i[i.length-1]}kill(t){const i=this.pool[t];i.active=!1,i.sprite.visible=!1,i.trailHistory.length=0,i.trailBones.length=0,i.trailMesh&&(i.trailMesh.visible=!1)}clear(){for(const t of this.pool)t.active=!1,t.sprite.visible=!1,t.trailHistory.length=0,t.trailBones.length=0,t.trailMesh&&(t.trailMesh.visible=!1)}get activeCount(){let t=0;for(const i of this.pool)i.active&&t++;return t}capture(){const t=[];for(const i of this.pool)i.active&&t.push({boneName:i.boneName,spawnId:i.spawnId,x:i.sprite.x,y:i.sprite.y,rotation:i.rotation,scaleX:i.sprite.scale.x,scaleY:i.sprite.scale.y,...this.captureWorldTransform(i),alpha:i.sprite.alpha,colorHex:i.sprite.tint,resourceId:i.resourceId,imageFrameIndex:i.imageFrameIndex,imageVisible:i.sprite.visible,active:!0,trailState:this.cfg.trail&&i.trailBones.length?{bones:i.trailBones.map(n=>{var a;const r=Za(this.cfg,n.x,n.y,this.simulationTransform);return{...n,worldX:r.x,worldY:r.y,worldRotation:(((a=this.simulationTransform)==null?void 0:a.rotation)??this.cfg.rootRotation)-n.rotation}}),activeBoneCount:i.trailBones.length,width:i.trailCurrentWidth,alpha:i.trailCurrentAlpha,colorHex:i.trailCurrentColor,resourceId:i.trailResourceId}:void 0});return t}captureWorldTransform(t){var r,a,o;const i=Za(this.cfg,t.sprite.x,t.sprite.y,this.simulationTransform),n=((r=this.simulationTransform)==null?void 0:r.rotation)??this.cfg.rootRotation;return{worldX:i.x,worldY:i.y,worldRotation:n+t.rotation,worldScaleX:t.sprite.scale.x*Math.abs(((a=this.simulationTransform)==null?void 0:a.scaleX)??this.cfg.rootScaleX),worldScaleY:t.sprite.scale.y*Math.abs(((o=this.simulationTransform)==null?void 0:o.scaleY)??this.cfg.rootScaleY)}}apply(t){var n;const i=new Map;for(const r of t)i.set(r.boneName,r);for(const r of this.pool){const a=i.get(r.boneName);if(!a){r.active=!1,r.sprite.visible=!1,r.trailMesh&&(r.trailMesh.visible=!1);continue}r.active=a.active;const o=r.sprite;if(o.visible=a.active&&a.imageVisible!==!1,o.x=a.x,o.y=a.y,o.rotation=-a.rotation*Math.PI/180,o.scale.set(a.scaleX,a.scaleY),o.alpha=a.alpha,o.tint=a.colorHex,a.resourceId!=null){const h=this.cfg.imageResources.find(l=>l.id===a.resourceId);h&&(r.imageFrameIndex=a.imageFrameIndex??0,o.texture=this.imageFrameTexture(h,r.imageFrameIndex),o.anchor.set(h.anchorX,h.anchorY),o.blendMode=Rr[h.blend])}this.cfg.trail&&a.trailState?(r.trailResourceId=a.trailState.resourceId??((n=this.cfg.trailResources[0])==null?void 0:n.id)??1,r.trailBones=a.trailState.bones.map(h=>({...h})),r.trailCurrentWidth=a.trailState.width,r.trailCurrentAlpha=a.trailState.alpha,this.skinTrailMesh(r,a.trailState)):r.trailMesh&&(r.trailMesh.visible=!1)}}reset(){for(const t of this.pool)t.active=!1,t.sprite.visible=!1,t.trailHistory.length=0,t.trailBones.length=0,t.trailMesh&&(t.trailMesh.visible=!1);this.accumulator=0,this.burstTimer=0,this._spawnSerial=0,this._elapsed=0,this._attractionEnabledAt=0,this._attractionWasEnabled=!1,this._lastSeed=this.cfg.seed,this.rng=pf(this.cfg.seed>>>0)}restartEmissionCycle(){this.accumulator=0,this.burstTimer=0,this._spawnSerial=0,this._elapsed=0,this._attractionEnabledAt=0,this._attractionWasEnabled=this.cfg.attraction,this._lastSeed=this.cfg.seed,this.rng=pf(this.cfg.seed>>>0)}}function Vi(s,e,t){return s+(e-s)*t}function Ac(s,e){return Number.isFinite(s)?s:e}function Za(s,e,t,i=null){const n=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleX)??s.rootScaleX)),r=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleY)??s.rootScaleY)),a=-((i==null?void 0:i.rotation)??s.rootRotation)*Math.PI/180,o=Math.cos(a),h=Math.sin(a),l=(i==null?void 0:i.centerX)??s.centerX,c=(i==null?void 0:i.centerY)??s.centerY,u=l+o*n*e-h*r*t,d=-c+h*n*e+o*r*t;return{x:u,y:-d}}function Pv(s,e,t,i=null){const n=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleX)??s.rootScaleX)),r=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleY)??s.rootScaleY)),a=-((i==null?void 0:i.rotation)??s.rootRotation)*Math.PI/180,o=Math.cos(a),h=Math.sin(a),l=e-((i==null?void 0:i.centerX)??s.centerX),c=-t+((i==null?void 0:i.centerY)??s.centerY);return{x:(o*l+h*c)/n,y:(-h*l+o*c)/r}}function LI(s,e,t,i=null){const n=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleX)??s.rootScaleX)),r=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleY)??s.rootScaleY)),a=-((i==null?void 0:i.rotation)??s.rootRotation)*Math.PI/180,o=Math.cos(a),h=Math.sin(a),l=o*n*e-h*r*t,c=h*n*e+o*r*t;return{x:l,y:-c}}function DI(s,e,t,i=null){const n=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleX)??s.rootScaleX)),r=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleY)??s.rootScaleY)),a=-((i==null?void 0:i.rotation)??s.rootRotation)*Math.PI/180,o=Math.cos(a),h=Math.sin(a),l=-t;return{x:(o*e+h*l)/n,y:(-h*e+o*l)/r}}function NI(s,e,t){const i=s.rotation*Math.PI/180,n=Math.cos(i),r=Math.sin(i),a=Math.max(1e-4,Math.abs(s.scaleX??1)),o=Math.max(1e-4,Math.abs(s.scaleY??1)),h=e-s.x,l=t-s.y,c=(n*h+r*l)/a,u=(-r*h+n*l)/o,d=(T,_,R,P)=>{const F=R/a,I=P/o,k=Math.max(1e-4,Math.hypot(F,I)),B=F/k,D=I/k,U=n*B-r*D,L=r*B+n*D;return{x:s.x+n*T*a-r*_*o+U*.05,y:s.y+r*T*a+n*_*o+L*.05,nx:U,ny:L}};if(s.shape==="circle"){const T=Math.max(.001,s.radius),_=Math.hypot(c,u);if(_>=T)return null;const R=_>1e-4?c/_:1,P=_>1e-4?u/_:0;return d(R*T,P*T,R,P)}if(s.shape==="ellipse"){const T=Math.max(.001,s.radiusX),_=Math.max(.001,s.radiusY),R=Math.hypot(c/T,u/_);if(R>=1)return null;const P=R>1e-4?1/R:1,F=R>1e-4?c*P:T,I=R>1e-4?u*P:0,k=Math.max(1e-4,Math.hypot(F/(T*T),I/(_*_)));return d(F,I,F/(T*T)/k,I/(_*_)/k)}if(s.shape==="rect"){const T=Math.max(.001,s.width*.5),_=Math.max(.001,s.height*.5);if(Math.abs(c)>=T||Math.abs(u)>=_)return null;const R=T-Math.abs(c),P=_-Math.abs(u);if(R=0?1:-1;return d(I*T,u,I,0)}const F=u>=0?1:-1;return d(c,F*_,0,F)}const f=Math.max(3,Math.min(16,Math.round(s.sides||(s.shape==="custom"?5:6)))),p=Math.max(.001,s.width*.5),m=Math.max(.001,s.height*.5),g=Array.from({length:f},(T,_)=>{const R=Math.PI*.5+_/f*Math.PI*2;return{x:Math.cos(R)*p,y:Math.sin(R)*m}});let v=!1;for(let T=0,_=g.length-1;Tu!=P.y>u&&c<(P.x-R.x)*(u-R.y)/(P.y-R.y)+R.x&&(v=!v)}if(!v)return null;let b=g[0].x,y=g[0].y,w=1/0;for(let T=0;T>>0^Math.imul(e+1,2654435761)^t)>>>0;return i^=i>>>16,i=Math.imul(i,2146121005),i^=i>>>15,i=Math.imul(i,2221713035),i^=i>>>16,(i>>>0)/4294967296}function Ja(s,e,t,i,n){return s==="fixed"?e:s==="curve"?Vi(e,t,wn(i,n)):Vi(e,t,n)}function mf(s,e,t,i,n,r){return s==="curve"?Vi(e,t,wn(i,n)):s==="random"?r:e}function kv(s,e,t,i,n){const r=1-n;return r*r*r*s+3*r*r*n*e+3*r*n*n*t+n*n*n*i}function wn(s,e,t="线性"){if(!Array.isArray(s)||s.length===0)return 1;const i=[...s].sort((n,r)=>n.x-r.x);if(e<=i[0].x)return i[0].y;if(e>=i[i.length-1].x)return i[i.length-1].y;for(let n=0;n=i[n].x&&e<=i[n+1].x){const r=i[n],a=i[n+1],o=a.x-r.x||1;if(t!=="贝塞尔")return Vi(r.y,a.y,(e-r.x)/o);const h=r.x+(r.outX??o/3),l=r.y+(r.outY??(a.y-r.y)/3),c=a.x+(a.inX??-o/3),u=a.y+(a.inY??-(a.y-r.y)/3);let d=0,f=1;for(let p=0;p<14;p++){const m=(d+f)/2;kv(r.x,h,c,a.x,m)>>0;return function(){e|=0,e=e+1831565813|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}function Mo(s){let e=s.replace("#","");return e.length===3&&(e=e.split("").map(t=>t+t).join("")),parseInt(e,16)}function XI(s,e,t){const i=Fv(s),n=Fv(e),r=Math.round(i[0]+(n[0]-i[0])*t),a=Math.round(i[1]+(n[1]-i[1])*t),o=Math.round(i[2]+(n[2]-i[2])*t);return r<<16|a<<8|o}function gf(s,e){if(!Array.isArray(s)||s.length===0)return 16777215;const t=[...s].sort((i,n)=>i.position-n.position);if(e<=t[0].position)return Mo(t[0].color);if(e>=t[t.length-1].position)return Mo(t[t.length-1].color);for(let i=0;ir.position)continue;const a=(e-n.position)/Math.max(1e-4,r.position-n.position);return XI(n.color,r.color,a)}return Mo(t[t.length-1].color)}function Fv(s){let e=s.replace("#","");e.length===3&&(e=e.split("").map(i=>i+i).join(""));const t=parseInt(e,16);return[t>>16&255,t>>8&255,t&255]}const Ba=new Map,Ra=new Map;function VI(s){return[...Ba.values()].some(e=>e===s)}function d1(s){if(!(VI(s)||(Ra.get(s)||0)>0)){Ra.delete(s);for(const e of s.textures)e.destroy(!0)}}function YI(s){const e=Ra.get(s)||0;e>1?Ra.set(s,e-1):Ra.delete(s),d1(s)}function $I(s){return Ba.get(s)||null}function Au(s,e){ql(s),Ba.set(s,e)}function GI(s){const e=Ba.get(s);return e?(Ra.set(e,(Ra.get(e)||0)+1),e):null}function HI(s,e){const t=Ba.get(s);return t?(Au(e,t),!0):!1}function ql(s){const e=Ba.get(s);e&&(Ba.delete(s),d1(e))}function hi(s){if(Array.isArray(s))return s.map(e=>hi(e));if(s&&typeof s=="object"){const e=Object.getPrototypeOf(s);if(e===Object.prototype||e===null){const t={};for(const[i,n]of Object.entries(s))t[i]=hi(n);return t}}return s}const f1=["3.8","4.0","4.1","4.2","4.3"];function Ph(s){const e=String(s||"").trim();return f1.find(t=>e===t||e.startsWith(`${t}.`))||null}function Mm(){return f1.join(" / ")}function jI(s){return s==="4.3"?"4.3":"4.2"}function _p(){return{imagesPath:"./images/",spineVersion:"4.2",keyframeCurve:"linear",fps:30,omitFps:!1,integerFrameAlignment:!0,bonePool:!0,excludeEmptyAnimations:!1,fileName:"SpineParticle.json"}}function m1(s){const e=Object.assign(_p(),s||{});return e.imagesPath=String(e.imagesPath||"./images/"),e.spineVersion=Ph(e.spineVersion)||"4.2",e.keyframeCurve=e.keyframeCurve==="bezier"?"bezier":"linear",e.fps=Math.min(240,Math.max(1,Math.round(Number(e.fps)||30))),e.omitFps=e.omitFps===!0,e.integerFrameAlignment=e.integerFrameAlignment!==!1,e.bonePool=e.bonePool!==!1,e.excludeEmptyAnimations=e.excludeEmptyAnimations===!0,e.fileName=String(e.fileName||"SpineParticle.json"),e}const _m=30;function Kc(s,e=1){return Math.min(1800,Math.max(1,Math.ceil(Number(s)||e)))}function p1(s,e=30){const t=Math.max(0,Number(s.lifeMin)||0),i=Math.max(0,Number(s.lifeMax)||0),n=s.lifeMode==="fixed"?t:Math.max(t,i);return Kc(Math.ceil(n*Math.max(1,e)),_m)}function Xr(s,e=30){const t=Kc(s.loopDurationFrames),i=p1(s,e),n=s.generateLoopStartAnimation?s.loopStartUseCustomDuration?Kc(s.loopStartDurationFrames,_m):i:0,r=s.generateLoopEndAnimation?s.loopEndUseCustomDuration?Kc(s.loopEndDurationFrames,_m):i:0;return{start:n,loop:t,end:r,total:n+t+r}}function g1(s,e){const t=Xr(s,e),n=Math.max(0,Math.ceil(Math.max(0,Number(s.delay)||0)*Math.max(1,e)))+t.start;return{start:n,end:n+t.loop}}function Zc(s,e,t){const i=Math.max(1,Math.floor(t)-1),n=Math.min(i-1,Math.max(0,Math.floor(Number(s)||0))),r=Math.min(i,Math.max(n+1,Math.floor(Number(e)||i)));return{start:n,end:r}}function WI(s,e,t){const i=Math.max(1,e-1),n=Math.max(1,t-1),r=s.end>=i?n:s.end;return Zc(s.start,r,t)}let Ec=1,Cc=1,Ic=1,Rc=1;function Pc(s,e){const t=new Set(e),i=`${s} Copy`;if(!t.has(i))return i;let n=2;for(;t.has(`${i} ${n}`);)n++;return`${i} ${n}`}const Kl=mT("particle",{state:()=>({editor:{viewScale:1,viewX:0,viewY:0},systems:[],colliders:[],paths:[],spines:[],activeId:0,activeObjectType:"particle",activeObjectId:0,timeline:{playing:!0,loop:!0,frame:0,totalFrames:60,playbackStart:0,playbackEnd:59,fps:30,recorded:!1,animation:"animation",animations:["animation"]},settings:{parameterPanelOnRight:!0,tickEnabled:!1,axisFontSize:12,tickWidth:1,showAxisLabels:!0,axisColor:"#7a86ad",undoLimit:20,backgroundX:0,backgroundY:0,backgroundOpacity:1,backgroundImageName:"",backgroundImageData:"",showEmitter:!0,showBones:!1,bonePointDrawSize:1,boneAxisDrawSize:2,showSkinMesh:!1,showGrid:!0,exportSettings:_p()}}),getters:{activeSystemCount:s=>s.systems.length},actions:{syncSceneSequences(){Ec=Math.max(Ec,...this.systems.map(s=>s.id+1),1),Cc=Math.max(Cc,...this.colliders.map(s=>s.id+1),1),Ic=Math.max(Ic,...this.paths.map(s=>s.id+1),1),Rc=Math.max(Rc,...this.spines.map(s=>s.id+1),1)},addSystem(s){const e=Dl();s!=null&&s.config&&Object.assign(e,s.config);const t=new Set(this.systems.map(r=>r.config.name));if(t.has(e.name)){let r=0;for(const o of this.systems){const h=/^ParticleSystem(\d+)$/.exec(o.config.name);h&&(r=Math.max(r,parseInt(h[1],10)))}e.name=`ParticleSystem${r+1}`;let a=2;for(;t.has(e.name);)e.name=`ParticleSystem${r+a}`,a++}const i=this.timeline.animations.includes(this.timeline.animation)?this.timeline.animation:this.timeline.animations[0]||"animation",n={id:Ec++,visible:!0,animation:i,config:e};return this.systems.push(n),this.activeId=n.id,this.activeObjectType="particle",this.activeObjectId=n.id,n},removeSystem(s){var i;const e=this.systems.findIndex(n=>n.id===s);e>=0&&this.systems.splice(e,1),this.activeId===s&&(this.activeId=((i=this.systems[0])==null?void 0:i.id)??0);const t=this.systems.find(n=>n.id===this.activeId);if(t&&(this.timeline.animation=t.animation),this.activeObjectType==="particle"&&this.activeObjectId===s){const n=this.systems[0];this.activeObjectId=(n==null?void 0:n.id)??0}},selectSystem(s){this.activeId=s,this.activeObjectType="particle",this.activeObjectId=s;const e=this.systems.find(t=>t.id===s);e&&(this.timeline.animation=e.animation)},setSystemAnimation(s,e){if(!this.timeline.animations.includes(e))return;const t=this.systems.find(i=>i.id===s);t&&(t.animation=e,this.timeline.animation=e)},addAnimation(){const s=new Set(this.timeline.animations);let e=2,t=`animation${e}`;for(;s.has(t);)t=`animation${++e}`;this.timeline.animations.push(t),this.timeline.animation=t;const i=this.systems.find(n=>n.id===this.activeId);return i&&(i.animation=t),t},renameAnimation(s,e){const t=e.trim(),i=this.timeline.animations.indexOf(s);if(i<0||!t||t!==s&&this.timeline.animations.includes(t))return!1;this.timeline.animations[i]=t;for(const n of this.systems)n.animation===s&&(n.animation=t);return this.timeline.animation===s&&(this.timeline.animation=t),!0},removeAnimation(s){if(this.timeline.animations.length<=1)return!1;const e=this.timeline.animations.indexOf(s);if(e<0)return!1;this.timeline.animations.splice(e,1);const t=this.timeline.animations[Math.min(e,this.timeline.animations.length-1)];for(const i of this.systems)i.animation===s&&(i.animation=t);return this.timeline.animation===s&&(this.timeline.animation=t),!0},addCollider(){const s=Cc++,e={id:s,name:`Collider${s}`,visible:!0,shape:"circle",enabled:!0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,radius:50,radiusX:70,radiusY:45,width:120,height:80,sides:6,response:"physics",elasticity:.8,friction:.3,followPath:!1,followPathId:0,followDuration:2,followPathRotation:!1,followCurveMode:"跟随导出",followCurve:[{x:0,y:0},{x:1,y:1}]};return this.colliders.push(e),this.activeObjectType="collision",this.activeObjectId=e.id,e},addPath(){const s=Ic++,e={id:s,name:`Path${s}`,visible:!0,enabled:!0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,closed:!1,color:"#ff933e",preset:"",points:[]};return this.paths.push(e),this.activeObjectType="path",this.activeObjectId=e.id,e},addSpine(){const s=Rc++,e={id:s,name:`SpineSkeleton${s}`,enabled:!0,visible:!0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,timeOffset:0,skeletonFileName:"",atlasFileName:"",textureFileNames:[],dataVersion:"",sourceBundle:null,selectedAnimation:"",selectedBone:"",animations:[],bones:[],assetVersion:0,status:"empty",error:""};return this.spines.push(e),this.activeObjectType="spine",this.activeObjectId=e.id,e},duplicateSelectedObject(){const s=this.activeObjectId;if(!s)return null;if(this.activeObjectType==="particle"){const i=this.systems.find(r=>r.id===s);if(!i)return null;const n=hi(i);return n.id=Ec++,n.config.name=Pc(i.config.name,this.systems.map(r=>r.config.name)),n.frames=void 0,this.systems.push(n),this.activeId=n.id,this.activeObjectId=n.id,this.timeline.animation=n.animation,n}if(this.activeObjectType==="collision"){const i=this.colliders.find(r=>r.id===s);if(!i)return null;const n=hi(i);return n.id=Cc++,n.name=Pc(i.name,this.colliders.map(r=>r.name)),this.colliders.push(n),this.activeObjectId=n.id,n}if(this.activeObjectType==="path"){const i=this.paths.find(r=>r.id===s);if(!i)return null;const n=hi(i);return n.id=Ic++,n.name=Pc(i.name,this.paths.map(r=>r.name)),this.paths.push(n),this.activeObjectId=n.id,n}const e=this.spines.find(i=>i.id===s);if(!e)return null;const t=hi(e);return t.id=Rc++,t.name=Pc(e.name,this.spines.map(i=>i.name)),t.selectedBone="",HI(e.id,t.id),this.spines.push(t),this.activeObjectId=t.id,t},selectSceneObject(s,e){if(this.activeObjectType=s,this.activeObjectId=e,s==="particle"){this.activeId=e;const t=this.systems.find(i=>i.id===e);t&&(this.timeline.animation=t.animation)}},removeCollider(s){var t;const e=this.colliders.findIndex(i=>i.id===s);e>=0&&this.colliders.splice(e,1);for(const i of this.systems){const n=Wr(i.config);n.collisionColliderIds=n.collisionColliderIds.filter(r=>r!==s)}if(this.activeObjectType==="collision"&&this.activeObjectId===s){const i=this.systems[0];this.activeObjectType=i?"particle":"collision",this.activeObjectId=(i==null?void 0:i.id)??((t=this.colliders[0])==null?void 0:t.id)??0}},removePath(s){var t;const e=this.paths.findIndex(i=>i.id===s);if(e>=0&&this.paths.splice(e,1),this.activeObjectType==="path"&&this.activeObjectId===s){const i=this.systems[0];this.activeObjectType=i?"particle":"path",this.activeObjectId=(i==null?void 0:i.id)??((t=this.paths[0])==null?void 0:t.id)??0}},removeSpine(s){ql(s);const e=this.spines.findIndex(t=>t.id===s);if(e>=0&&this.spines.splice(e,1),this.activeObjectType==="spine"&&this.activeObjectId===s){const t=this.systems[0],i=this.colliders[0],n=this.paths[0],r=this.spines[0];t?(this.activeObjectType="particle",this.activeObjectId=t.id,this.activeId=t.id):i?(this.activeObjectType="collision",this.activeObjectId=i.id):n?(this.activeObjectType="path",this.activeObjectId=n.id):(this.activeObjectType="spine",this.activeObjectId=(r==null?void 0:r.id)??0)}this.recalcTotalFrames()},play(){const s=Zc(this.timeline.playbackStart,this.timeline.playbackEnd,this.timeline.totalFrames);(this.timeline.frame=s.end)&&(this.timeline.frame=s.start),this.timeline.playing=!0},pause(){this.timeline.playing=!1},togglePlay(){this.timeline.playing?this.pause():this.play()},toStart(){this.timeline.frame=this.timeline.playbackStart},previousFrame(){this.timeline.playing=!1,this.timeline.frame=Math.max(this.timeline.playbackStart,this.timeline.frame-1)},nextFrame(){this.timeline.playing=!1,this.timeline.frame=Math.min(this.timeline.playbackEnd,this.timeline.frame+1)},toEnd(){this.timeline.playing=!1,this.timeline.frame=this.timeline.playbackEnd},toggleLoop(){this.timeline.loop=!this.timeline.loop},setFrame(s){this.timeline.frame=Math.max(0,Math.min(s,this.timeline.totalFrames-1))},setPlaybackStart(s){const e=Zc(s,this.timeline.playbackEnd,this.timeline.totalFrames);this.timeline.playbackStart=e.start,this.timeline.playbackEnd=e.end,this.timeline.framee.end&&(this.timeline.frame=e.end)},recalcTotalFrames(){const s=this.timeline.fps||30;let e=0;for(const r of this.systems){const a=r.config,o=Math.max(0,Number(a.lifeMin)||0),h=Math.max(0,Number(a.lifeMax)||0),l=a.lifeMode==="fixed"?o:Math.max(o,h),c=a.mode==="stream"?a.streamBehavior==="loop"?Math.max(1/s,Math.ceil(Math.max(1,Number(a.loopDurationFrames)||1))/s):Math.max(1/s,Number(a.duration)||0):0;let u=Math.max(0,Number(a.delay)||0)+c+l;a.mode==="stream"&&a.streamBehavior==="loop"&&(u=Math.max(0,Number(a.delay)||0)+Xr(a,s).total/s),u>e&&(e=u)}for(const r of this.spines){const a=r.animations.find(h=>h.name===r.selectedAnimation);if(!a)continue;const o=Math.max(0,Number(r.timeOffset)||0)+Math.max(0,a.duration||0);o>e&&(e=o)}for(const r of this.colliders){if(!r.followPath||!r.followPathId)continue;const a=Math.max(0,Number(r.followDuration)||0);a>e&&(e=a)}const t=this.timeline.totalFrames,i=Math.max(2,Math.ceil(e*s)+1);this.timeline.totalFrames=i;const n=WI({start:this.timeline.playbackStart,end:this.timeline.playbackEnd},t,i);return this.timeline.playbackStart=n.start,this.timeline.playbackEnd=n.end,this.timeline.frame>=i&&(this.timeline.frame=i-1),i}}}),v1="SpineParticle.SystemSettings",y1=1,vf="SpineParticle.SystemSettings.v1";function Ko(s,e,t,i){const n=Number(s);return Math.min(t,Math.max(e,Number.isFinite(n)?n:i))}function zI(s){return{parameterPanelOnRight:s.parameterPanelOnRight,undoLimit:s.undoLimit,showEmitter:s.showEmitter,showBones:s.showBones,bonePointDrawSize:s.bonePointDrawSize,boneAxisDrawSize:s.boneAxisDrawSize,showSkinMesh:s.showSkinMesh,tickEnabled:s.tickEnabled,axisFontSize:s.axisFontSize,tickWidth:s.tickWidth,showAxisLabels:s.showAxisLabels,axisColor:s.axisColor}}function qI(s,e){const t=n=>s[n]==null?!!e[n]:s[n]===!0,i=typeof s.axisColor=="string"&&/^#[0-9a-f]{6}$/i.test(s.axisColor)?s.axisColor:e.axisColor;return{parameterPanelOnRight:t("parameterPanelOnRight"),undoLimit:Math.round(Ko(s.undoLimit,1,200,e.undoLimit)),showEmitter:t("showEmitter"),showBones:t("showBones"),bonePointDrawSize:Ko(s.bonePointDrawSize,.1,10,e.bonePointDrawSize),boneAxisDrawSize:Ko(s.boneAxisDrawSize,.1,10,e.boneAxisDrawSize),showSkinMesh:t("showSkinMesh"),tickEnabled:t("tickEnabled"),axisFontSize:Math.round(Ko(s.axisFontSize,8,40,e.axisFontSize)),tickWidth:Ko(s.tickWidth,1,5,e.tickWidth),showAxisLabels:t("showAxisLabels"),axisColor:i}}function KI(s){let e;try{e=JSON.parse(s)}catch{throw new Error("系统设置缓存不是有效的 JSON")}const t=e;if(t.format!==v1)throw new Error("不是 Spine粒子编辑器系统设置缓存");if(t.version!==y1)throw new Error(`暂不支持系统配置版本:${t.version??"未知"}`);if(!t.settings||typeof t.settings!="object")throw new Error("系统设置缓存缺少 settings");return t}function ZI(s,e){Object.assign(s.settings,qI(e,s.settings))}let kc=null;function JI(s){kc==null||kc();try{const e=localStorage.getItem(vf);e&&ZI(s,KI(e).settings)}catch{try{localStorage.removeItem(vf)}catch{}}kc=fs(()=>zI(s.settings),e=>{const t={format:v1,version:y1,savedAt:new Date().toISOString(),settings:e};try{localStorage.setItem(vf,JSON.stringify(t))}catch{}},{deep:!0})}function Ov(s,e,t,i,n){const r=1-n;return r*r*r*s+3*r*r*n*e+3*r*n*n*t+n*n*n*i}function Bv(s,e,t){const i=s.rotation*Math.PI/180,n=Math.cos(i),r=Math.sin(i),a=Math.max(1e-4,Math.abs(s.scaleX??1)),o=Math.max(1e-4,Math.abs(s.scaleY??1));return{x:s.x+n*e*a-r*t*o,y:s.y+r*e*a+n*t*o}}function yf(s,e){if(!s.points.length)return null;if(s.points.length===1)return{...Bv(s,s.points[0].x,s.points[0].y),angle:s.rotation};const t=s.closed?s.points.length:s.points.length-1,i=[];let n=0;for(let p=0;p0&&v===0)continue;const b=v/20,y=Ov(m.x,m.x+m.outX,g.x+g.inX,g.x,b),w=Ov(m.y,m.y+m.outY,g.y+g.inY,g.y,b),A=Bv(s,y,w),T=i[i.length-1];T&&(n+=Math.hypot(A.x-T.x,A.y-T.y)),i.push({...A,distance:n})}}const r=Math.min(1,Math.max(0,e))*n;let a=i.findIndex(p=>p.distance>=r);a<0&&(a=i.length-1);const o=i[a],h=i[Math.max(0,a-1)],l=i[Math.min(i.length-1,a+1)],c=h.distance,u=a>0?(r-c)/Math.max(1e-4,o.distance-c):0,d=h.x+(o.x-h.x)*Math.min(1,Math.max(0,u)),f=h.y+(o.y-h.y)*Math.min(1,Math.max(0,u));return{x:d,y:f,angle:Math.atan2(l.y-h.y,l.x-h.x)*180/Math.PI}}function Zi(s){return s.map(e=>({...e,trailState:e.trailState?{...e.trailState,bones:e.trailState.bones.map(t=>({...t}))}:void 0}))}function QI(s){const e=new Map;for(const i of s)for(const n of i)e.has(n.boneName)||e.set(n.boneName,Zi([n])[0]);const t=[...e.keys()].sort((i,n)=>{const r=Number(i.replace(/^p_/,"")),a=Number(n.replace(/^p_/,""));return Number.isFinite(r)&&Number.isFinite(a)?r-a:i.localeCompare(n)});for(let i=0;i[r.boneName,r]));s[i]=t.map(r=>{const a=n.get(r);return a||{...Zi([e.get(r)])[0],alpha:0,imageVisible:!1,trailState:void 0,active:!0}})}}function eR(s){s.length<2||(s[s.length-1]=Zi(s[0]))}function tR(s,e){const t=Math.max(0,s.length-1),i=[];for(let n=0;n<=e;n++){const r=Math.min(t,Math.round(n/e*t));i.push(Zi(s[r]||[]))}return i}function xf(s){return`${s.boneName}:${s.spawnId??"legacy"}`}function Lv(s){return{...Zi([s])[0],alpha:0,imageVisible:!1,trailState:void 0,active:!0}}function iR(s,e,t,i){const n=Math.min(s.length,i+1),r=s.slice(Math.max(0,s.length-n)),a=new Map;for(const l of e){if(l.imageVisible===!1||l.alpha<=0)continue;const c=xf(l),u=new Map;let d=!1;for(let f=r.length-1;f>=0;f--){const p=r[f].find(m=>xf(m)===c);if(p)d=!0,u.set(f,p);else if(d)break}a.set(c,u)}const o=Math.max(0,r.length-1),h=[];for(let l=0;l<=t;l++){const c=Math.min(o,Math.round(l/t*o));h.push(e.map(u=>{var f;if(u.imageVisible===!1||u.alpha<=0)return Zi([u])[0];const d=(f=a.get(xf(u)))==null?void 0:f.get(c);return d?Zi([d])[0]:Lv(u)}))}return h[0]=h[0].map(Lv),h[h.length-1]=Zi(e),h}function Dv(s,e){const t=s.length?1:0;for(let i=t;i{const y=b?[[]]:[];e.reset();for(let w=0;w0&&e.restartEmissionCycle();for(let A=0;A0;w++)e.update(r,"off"),b.push(e.capture());(v=b[b.length-1])!=null&&v.length&&b.push([]),Dv(u,tR(b,o.end))}const g=Zi(u[u.length-1]||[]);for(u.length>i&&(u.length=i);u.lengtho.id===r)||(this.container.removeChild(a.root),a.root.destroy({children:!0}),this.entries.delete(r));for(const r of e){const a=$I(r.id);let o=this.entries.get(r.id);if(o&&o.assetVersion!==r.assetVersion&&!a&&(this.container.removeChild(o.root),o.root.destroy({children:!0}),this.entries.delete(r.id),o=void 0),(!o||o.assetVersion!==r.assetVersion)&&a){o&&(this.container.removeChild(o.root),o.root.destroy({children:!0}));const d=new ji,f=new a.SpineClass({skeletonData:a.skeletonData,autoUpdate:!1,darkTint:!1});a.skeletonData.defaultSkin&&f.skeleton.setSkin(a.skeletonData.defaultSkin),a.runtimeVersion==="4.3"?f.skeleton.setupPoseSlots():f.skeleton.setSlotsToSetupPose(),d.addChild(f),this.container.addChild(d),o={root:d,spine:f,runtimeVersion:a.runtimeVersion,assetVersion:r.assetVersion,animation:""},this.entries.set(r.id,o)}if(!o)continue;const h=o.root,l=o.spine,c=r.visible!==!1&&r.enabled;h.visible=c,h.renderable=c,h.position.set(r.x,-r.y),h.rotation=-r.rotation*Math.PI/180,h.scale.set(r.scaleX,r.scaleY),o.animation!==r.selectedAnimation&&(o.animation=r.selectedAnimation,o.runtimeVersion==="4.3"?l.skeleton.setupPose():l.skeleton.setToSetupPose(),l.state.clearTracks(),o.animation&&l.state.setAnimation(0,o.animation,!1));const u=o.runtimeVersion==="4.3"?l.state.getTrack(0):l.state.getCurrent(0);if(u){const d=((n=r.animations.find(p=>p.name===r.selectedAnimation))==null?void 0:n.duration)||0,f=Math.max(0,t/Math.max(1,i)-r.timeOffset);u.trackTime=d>0?Math.min(f,d):f}l.update(0)}}getBoneWorldTransform(e,t){const i=this.entries.get(e),n=i==null?void 0:i.spine.skeleton.findBone(t);if(!i||!n||!n.active)return null;const r=i.runtimeVersion==="4.3"?n.appliedPose:n,a=i.root,o=Math.cos(a.rotation),h=Math.sin(a.rotation),l=o*a.scale.x,c=-h*a.scale.y,u=h*a.scale.x,d=o*a.scale.y,f=l*r.a+c*r.c,p=l*r.b+c*r.d,m=u*r.a+d*r.c,g=u*r.b+d*r.d,v=a.position.x+l*r.worldX+c*r.worldY,b=a.position.y+u*r.worldX+d*r.worldY;return{x:v,y:-b,rotation:-Math.atan2(m,f)*180/Math.PI,scaleX:Math.max(1e-4,Math.hypot(f,m)),scaleY:Math.max(1e-4,Math.hypot(p,g))}}destroy(){for(const e of this.entries.values())e.root.removeFromParent(),e.root.destroy({children:!0});this.entries.clear(),this.container.removeFromParent(),this.container.destroy({children:!0})}}let x1=class{constructor(){x(this,"entries",{});x(this,"size",0)}add(e){let t=this.entries[e];return this.entries[e]=!0,t?!1:(this.size++,!0)}addAll(e){let t=this.size;for(var i=0,n=e.length;i1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(e,t){e.r=((t&4278190080)>>>24)/255,e.g=((t&16711680)>>>16)/255,e.b=((t&65280)>>>8)/255,e.a=(t&255)/255}static rgb888ToColor(e,t){e.r=((t&16711680)>>>16)/255,e.g=((t&65280)>>>8)/255,e.b=(t&255)/255}toRgb888(){const e=t=>("0"+(t*255).toString(16)).slice(-2);return+("0x"+e(this.r)+e(this.g)+e(this.b))}static fromString(e,t=new Ki){return t.setFromString(e)}},x(Ki,"WHITE",new Ki(1,1,1,1)),x(Ki,"RED",new Ki(1,0,0,1)),x(Ki,"GREEN",new Ki(0,1,0,1)),x(Ki,"BLUE",new Ki(0,0,1,1)),x(Ki,"MAGENTA",new Ki(1,0,1,1)),Ki);var bi;let $e=(bi=class{static clamp(e,t,i){return ei?i:e}static cosDeg(e){return Math.cos(e*bi.degRad)}static sinDeg(e){return Math.sin(e*bi.degRad)}static atan2Deg(e,t){return Math.atan2(e,t)*bi.degRad}static signum(e){return e>0?1:e<0?-1:0}static toInt(e){return e>0?Math.floor(e):Math.ceil(e)}static cbrt(e){let t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t}static randomTriangular(e,t){return bi.randomTriangularWith(e,t,(e+t)*.5)}static randomTriangularWith(e,t,i){let n=Math.random(),r=t-e;return n<=(i-e)/r?e+Math.sqrt(n*r*(i-e)):t-Math.sqrt((1-n)*r*(t-i))}static isPowerOfTwo(e){return e&&(e&e-1)===0}},x(bi,"PI",3.1415927),x(bi,"PI2",bi.PI*2),x(bi,"invPI2",1/bi.PI2),x(bi,"radiansToDegrees",180/bi.PI),x(bi,"radDeg",bi.radiansToDegrees),x(bi,"degreesToRadians",bi.PI/180),x(bi,"degRad",bi.degreesToRadians),bi);var tn;let Ge=(tn=class{static arrayCopy(e,t,i,n,r){for(let a=t,o=n;a=t?e:tn.setArraySize(e,t,i)}static newArray(e,t){let i=new Array(e);for(let n=0;n0?this.items.pop():this.instantiator()}free(e){e.reset&&e.reset(),this.items.push(e)}freeAll(e){for(let t=0;t>1)*o;let h=t.bone.skeleton,l=t.deform,c=this.vertices,u=this.bones;if(!u){l.length>0&&(c=l);let m=t.bone,g=m.worldX,v=m.worldY,b=m.a,y=m.b,w=m.c,A=m.d;for(let T=i,_=a;_=this.regions.length&&(i=this.regions.length-1);let n=this.regions[i];t.region!=n&&(t.region=n,t.updateRegion())}getPath(e,t){let i=e,n=(this.start+t).toString();for(let r=this.digits-n.length;r>0;r--)i+="0";return i+=n,i}static nextID(){return or._nextID++}},x(or,"_nextID",0),or);var $i;(function(s){s[s.hold=0]="hold",s[s.once=1]="once",s[s.loop=2]="loop",s[s.pingpong=3]="pingpong",s[s.onceReverse=4]="onceReverse",s[s.loopReverse=5]="loopReverse",s[s.pingpongReverse=6]="pingpongReverse"})($i||($i={}));const S1=[$i.hold,$i.once,$i.loop,$i.pingpong,$i.onceReverse,$i.loopReverse,$i.pingpongReverse];let Tp=class{constructor(e,t,i){x(this,"name");x(this,"timelines",[]);x(this,"timelineIds",new x1);x(this,"duration");if(!e)throw new Error("name cannot be null.");this.name=e,this.setTimelines(t),this.duration=i}setTimelines(e){if(!e)throw new Error("timelines cannot be null.");this.timelines=e,this.timelineIds.clear();for(var t=0;t0&&(t%=this.duration));let l=this.timelines;for(let c=0,u=l.length;ct)return n-1;return i-1}static search(e,t,i){let n=e.length;for(let r=i;rt)return r-i;return n-i}},Xn=class extends ui{constructor(t,i,n){super(t,n);x(this,"curves");this.curves=Ge.newFloatArray(t+i*18),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let i=this.getFrameCount()+t*18;if(this.curves.length>i){let n=Ge.newFloatArray(i);Ge.arrayCopy(this.curves,0,n,0,i),this.curves=n}}setBezier(t,i,n,r,a,o,h,l,c,u,d){let f=this.curves,p=this.getFrameCount()+t*18;n==0&&(f[i]=2+p);let m=(r-o*2+l)*.03,g=(a-h*2+c)*.03,v=((o-l)*3-r+u)*.006,b=((h-c)*3-a+d)*.006,y=m*2+v,w=g*2+b,A=(o-r)*.3+m+v*.16666667,T=(h-a)*.3+g+b*.16666667,_=r+A,R=a+T;for(let P=p+18;pt){let c=this.frames[i],u=this.frames[i+n];return u+(t-c)/(a[r]-c)*(a[r+1]-u)}let o=r+18;for(r+=2;r=t){let c=a[r-2],u=a[r-1];return u+(t-c)/(a[r]-c)*(a[r+1]-u)}i+=this.getFrameEntries();let h=a[o-2],l=a[o-1];return l+(t-h)/(this.frames[i]-h)*(this.frames[i+n]-l)}},un=class extends Xn{constructor(e,t,i){super(e,t,[i])}getFrameEntries(){return 2}setFrame(e,t,i){e<<=1,this.frames[e]=t,this.frames[e+1]=i}getCurveValue(e){let t=this.frames,i=t.length-2;for(let r=2;r<=i;r+=2)if(t[r]>e){i=r-2;break}let n=this.curves[i>>1];switch(n){case 0:let r=t[i],a=t[i+1];return a+(e-r)/(t[i+2]-r)*(t[i+2+1]-a);case 1:return t[i+1]}return this.getBezierValue(e,i,1,n-2)}getRelativeValue(e,t,i,n,r){if(e>2];switch(g){case 0:let v=c[m];d=c[m+1],f=c[m+2],p=c[m+3];let b=(n-v)/(c[m+4]-v);d+=(c[m+4+1]-d)*b,f+=(c[m+4+2]-f)*b,p+=(c[m+4+3]-p)*b;break;case 1:d=c[m+1],f=c[m+2],p=c[m+3];break;default:d=this.getBezierValue(n,m,1,g-2),f=this.getBezierValue(n,m,2,g+18-2),p=this.getBezierValue(n,m,3,g+36-2)}if(a==1)u.r=d,u.g=f,u.b=p;else{if(o==Ce.setup){let v=l.data.color;u.r=v.r,u.g=v.g,u.b=v.b}u.r+=(d-u.r)*a,u.g+=(f-u.g)*a,u.b+=(p-u.b)*a}}},B1=class extends un{constructor(t,i,n){super(t,i,Ct.alpha+"|"+n);x(this,"slotIndex",0);this.slotIndex=n}apply(t,i,n,r,a,o,h){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let c=l.color;if(n>3];switch(A){case 0:let T=c[w];f=c[w+1],p=c[w+2],m=c[w+3],g=c[w+4],v=c[w+5],b=c[w+6],y=c[w+7];let _=(n-T)/(c[w+8]-T);f+=(c[w+8+1]-f)*_,p+=(c[w+8+2]-p)*_,m+=(c[w+8+3]-m)*_,g+=(c[w+8+4]-g)*_,v+=(c[w+8+5]-v)*_,b+=(c[w+8+6]-b)*_,y+=(c[w+8+7]-y)*_;break;case 1:f=c[w+1],p=c[w+2],m=c[w+3],g=c[w+4],v=c[w+5],b=c[w+6],y=c[w+7];break;default:f=this.getBezierValue(n,w,1,A-2),p=this.getBezierValue(n,w,2,A+18-2),m=this.getBezierValue(n,w,3,A+36-2),g=this.getBezierValue(n,w,4,A+54-2),v=this.getBezierValue(n,w,5,A+72-2),b=this.getBezierValue(n,w,6,A+90-2),y=this.getBezierValue(n,w,7,A+108-2)}if(a==1)u.set(f,p,m,g),d.r=v,d.g=b,d.b=y;else{if(o==Ce.setup){u.setFromColor(l.data.color);let T=l.data.darkColor;d.r=T.r,d.g=T.g,d.b=T.b}u.add((f-u.r)*a,(p-u.g)*a,(m-u.b)*a,(g-u.a)*a),d.r+=(v-d.r)*a,d.g+=(b-d.g)*a,d.b+=(y-d.b)*a}}},D1=class extends Xn{constructor(t,i,n){super(t,i,[Ct.rgb+"|"+n,Ct.rgb2+"|"+n]);x(this,"slotIndex",0);this.slotIndex=n}getFrameEntries(){return 7}setFrame(t,i,n,r,a,o,h,l){t*=7,this.frames[t]=i,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=a,this.frames[t+4]=o,this.frames[t+5]=h,this.frames[t+6]=l}apply(t,i,n,r,a,o,h){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let c=this.frames,u=l.color,d=l.darkColor;if(nt){let l=this.frames[i];return n[r+1]*(t-l)/(n[r]-l)}let a=r+18;for(r+=2;r=t){let l=n[r-2],c=n[r-1];return c+(t-l)/(n[r]-l)*(n[r+1]-c)}let o=n[a-2],h=n[a-1];return h+(1-h)*(t-o)/(this.frames[i+this.getFrameEntries()]-o)}apply(t,i,n,r,a,o,h){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let c=l.getAttachment();if(!c||!(c instanceof vr)||c.timelineAttachment!=this.attachment)return;let u=l.deform;u.length==0&&(o=Ce.setup);let d=this.vertices,f=d[0].length,p=this.frames;if(n=p[p.length-1]){let w=d[p.length-1];if(a==1)if(o==Ce.add){let A=c;if(A.bones)for(let T=0;Tn)this.apply(t,i,Number.MAX_VALUE,r,a,o,h),i=-1;else if(i>=l[c-1])return;if(n0&&l[u-1]==d;)u--}for(;u=l[u];u++)r.push(this.events[u])}},x(Sa,"propertyIds",[""+Ct.event]),Sa);var Ma;let gl=(Ma=class extends ui{constructor(t){super(t,Ma.propertyIds);x(this,"drawOrders");this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,i,n){this.frames[t]=i,this.drawOrders[t]=n}apply(t,i,n,r,a,o,h){if(h==es.mixOut){o==Ce.setup&&Ge.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length);return}if(n>2];switch(m){case 0:let g=c[p];u=c[p+1],d=c[p+2],f=c[p+3];let v=(n-g)/(c[p+4]-g);u+=(c[p+4+1]-u)*v,d+=(c[p+4+2]-d)*v,f+=(c[p+4+3]-f)*v;break;case 1:u=c[p+1],d=c[p+2],f=c[p+3];break;default:u=this.getBezierValue(n,p,1,m-2),d=this.getBezierValue(n,p,2,m+18-2),f=this.getBezierValue(n,p,3,m+36-2)}if(o==Ce.setup){let g=l.data;l.mixRotate=g.mixRotate+(u-g.mixRotate)*a,l.mixX=g.mixX+(d-g.mixX)*a,l.mixY=g.mixY+(f-g.mixY)*a}else l.mixRotate+=(u-l.mixRotate)*a,l.mixX+=(d-l.mixX)*a,l.mixY+=(f-l.mixY)*a}},Xa=class extends un{constructor(t,i,n,r){super(t,i,r+"|"+n);x(this,"constraintIndex",0);this.constraintIndex=n}apply(t,i,n,r,a,o,h){let l;if(this.constraintIndex==-1){const c=n>=this.frames[0]?this.getCurveValue(n):0;for(const u of t.physicsConstraints)u.active&&this.global(u.data)&&this.set(u,this.getAbsoluteValue2(n,a,o,this.get(u),this.setup(u),c))}else l=t.physicsConstraints[this.constraintIndex],l.active&&this.set(l,this.getAbsoluteValue(n,a,o,this.get(l),this.setup(l)))}},G1=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintInertia)}setup(e){return e.data.inertia}get(e){return e.inertia}set(e,t){e.inertia=t}global(e){return e.inertiaGlobal}},H1=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintStrength)}setup(e){return e.data.strength}get(e){return e.strength}set(e,t){e.strength=t}global(e){return e.strengthGlobal}},j1=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintDamping)}setup(e){return e.data.damping}get(e){return e.damping}set(e,t){e.damping=t}global(e){return e.dampingGlobal}},W1=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintMass)}setup(e){return 1/e.data.massInverse}get(e){return 1/e.massInverse}set(e,t){e.massInverse=1/t}global(e){return e.massGlobal}},z1=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintWind)}setup(e){return e.data.wind}get(e){return e.wind}set(e,t){e.wind=t}global(e){return e.windGlobal}},q1=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintGravity)}setup(e){return e.data.gravity}get(e){return e.gravity}set(e,t){e.gravity=t}global(e){return e.gravityGlobal}},K1=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintMix)}setup(e){return e.data.mix}get(e){return e.mix}set(e,t){e.mix=t}global(e){return e.mixGlobal}};var _a;let Z1=(_a=class extends ui{constructor(t,i){super(t,_a.propertyIds);x(this,"constraintIndex");this.constraintIndex=i}getFrameCount(){return this.frames.length}setFrame(t,i){this.frames[t]=i}apply(t,i,n,r,a,o,h){let l;if(this.constraintIndex!=-1&&(l=t.physicsConstraints[this.constraintIndex],!l.active))return;const c=this.frames;if(i>n)this.apply(t,i,Number.MAX_VALUE,[],a,o,h),i=-1;else if(i>=c[c.length-1])return;if(!(n=c[ui.search1(c,i)+1]))if(l!=null)l.reset();else for(const u of t.physicsConstraints)u.active&&u.reset()}},x(_a,"propertyIds",[Ct.physicsConstraintReset.toString()]),_a);var os;let J1=(os=class extends ui{constructor(t,i,n){super(t,[Ct.sequence+"|"+i+"|"+n.sequence.id]);x(this,"slotIndex");x(this,"attachment");this.slotIndex=i,this.attachment=n}getFrameEntries(){return os.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,i,n,r,a){let o=this.frames;t*=os.ENTRIES,o[t]=i,o[t+os.MODE]=n|r<<4,o[t+os.DELAY]=a}apply(t,i,n,r,a,o,h){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let c=l.attachment,u=this.attachment;if(c!=u&&(!(c instanceof vr)||c.timelineAttachment!=u))return;if(h==es.mixOut){o==Ce.setup&&(l.sequenceIndex=-1);return}let d=this.frames;if(n>4,b=this.attachment.sequence.regions.length,y=S1[m&15];if(y!=$i.hold)switch(v+=(n-p)/g+1e-5|0,y){case $i.once:v=Math.min(b-1,v);break;case $i.loop:v%=b;break;case $i.pingpong:{let w=(b<<1)-2;v=w==0?0:v%w,v>=b&&(v=w-v);break}case $i.onceReverse:v=Math.max(b-1-v,0);break;case $i.loopReverse:v=b-1-v%b;break;case $i.pingpongReverse:{let w=(b<<1)-2;v=w==0?0:(v+b-1)%w,v>=b&&(v=w-v)}}l.sequenceIndex=v}},x(os,"ENTRIES",3),x(os,"MODE",1),x(os,"DELAY",2),os);var lr;let rR=(lr=class{constructor(e){x(this,"data");x(this,"tracks",new Array);x(this,"timeScale",1);x(this,"unkeyedState",0);x(this,"events",new Array);x(this,"listeners",new Array);x(this,"queue",new oR(this));x(this,"propertyIDs",new x1);x(this,"animationsChanged",!1);x(this,"trackEntryPool",new kh(()=>new aR));this.data=e}static emptyAnimation(){return lr._emptyAnimation}update(e){e*=this.timeScale;let t=this.tracks;for(let i=0,n=t.length;i0){if(r.delay-=a,r.delay>0)continue;a=-r.delay,r.delay=0}let o=r.next;if(o){let h=r.trackLast-o.delay;if(h>=0){for(o.delay=0,o.trackTime+=r.timeScale==0?0:(h/r.timeScale+e)*o.timeScale,r.trackTime+=a,this.setCurrent(i,o,!0);o.mixingFrom;)o.mixTime+=e,o=o.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&!r.mixingFrom){t[i]=null,this.queue.end(r),this.clearNext(r);continue}if(r.mixingFrom&&this.updateMixingFrom(r,e)){let h=r.mixingFrom;for(r.mixingFrom=null,h&&(h.mixingTo=null);h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=a}this.queue.drain()}updateMixingFrom(e,t){let i=e.mixingFrom;if(!i)return!0;let n=this.updateMixingFrom(i,t);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,e.nextTrackLast!=-1&&e.mixTime>=e.mixDuration?((i.totalAlpha==0||e.mixDuration==0)&&(e.mixingFrom=i.mixingFrom,i.mixingFrom!=null&&(i.mixingFrom.mixingTo=e),e.interruptAlpha=i.interruptAlpha,this.queue.end(i)),n):(i.trackTime+=t*i.timeScale,e.mixTime+=t,!1)}apply(e){if(!e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let t=this.events,i=this.tracks,n=!1;for(let d=0,f=i.length;d0)continue;n=!0;let m=d==0?Ce.first:p.mixBlend,g=p.alpha;p.mixingFrom?g*=this.applyMixingFrom(p,e,m):p.trackTime>=p.trackEnd&&!p.next&&(g=0);let v=g>=p.alphaAttachmentThreshold,b=p.animationLast,y=p.getAnimationTime(),w=y,A=t;p.reverse&&(w=p.animation.duration-w,A=null);let T=p.animation.timelines,_=T.length;if(d==0&&g==1||m==Ce.add){d==0&&(v=!0);for(let R=0;R<_;R++){var r=T[R];r instanceof co?this.applyAttachmentTimeline(r,e,w,m,v):r.apply(e,b,w,A,g,m,es.mixIn)}}else{let R=p.timelineMode,P=p.shortestRotation,F=!P&&p.timelinesRotation.length!=_<<1;F&&(p.timelinesRotation.length=_<<1);for(let I=0;I<_;I++){let k=T[I],B=R[I]==bf?m:Ce.setup;!P&&k instanceof Oh?this.applyRotateTimeline(k,e,w,g,B,p.timelinesRotation,I<<1,F):k instanceof co?this.applyAttachmentTimeline(k,e,w,m,v):k.apply(e,b,w,A,g,B,es.mixIn)}}this.queueEvents(p,y),t.length=0,p.nextAnimationLast=y,p.nextTrackLast=p.trackTime}for(var a=this.unkeyedState+Xv,o=e.slots,h=0,l=e.slots.length;h1&&(r=1),i!=Ce.first&&(i=n.mixBlend));let a=r=n.alphaAttachmentThreshold):(o&&A instanceof gl&&_==Ce.setup&&(T=es.mixIn),A.apply(t,d,p,m,R,_,T))}}return e.mixDuration>0&&this.queueEvents(n,f),this.events.length=0,n.nextAnimationLast=f,n.nextTrackLast=n.trackTime,r}applyAttachmentTimeline(e,t,i,n,r){var a=t.slots[e.slotIndex];a.bone.active&&(i=0,y=m>=0;Math.abs(g)<=90&&$e.signum(g)!=$e.signum(p)&&(Math.abs(m-v)>180?(f+=360*$e.signum(m),y=b):v!=0?f-=360*$e.signum(m):y=b),y!=b&&(f+=360*$e.signum(m)),a[o]=f}a[o+1]=p,l.rotation=u+f*n}queueEvents(e,t){let i=e.animationStart,n=e.animationEnd,r=n-i,a=e.trackLast%r,o=this.events,h=0,l=o.length;for(;hn||this.queue.event(e,u)}let c=!1;if(e.loop)if(r==0)c=!0;else{const u=Math.floor(e.trackTime/r);c=u>0&&u>Math.floor(e.trackLast/r)}else c=t>=n&&e.animationLast=this.tracks.length)return;let t=this.tracks[e];if(!t)return;this.queue.end(t),this.clearNext(t);let i=t;for(;;){let n=i.mixingFrom;if(!n)break;this.queue.end(n),i.mixingFrom=null,i.mixingTo=null,i=n}this.tracks[t.trackIndex]=null,this.queue.drain()}setCurrent(e,t,i){let n=this.expandToIndex(e);this.tracks[e]=t,t.previous=null,n&&(i&&this.queue.interrupt(n),t.mixingFrom=n,n.mixingTo=t,t.mixTime=0,n.mixingFrom&&n.mixDuration>0&&(t.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(t)}setAnimation(e,t,i=!1){let n=this.data.skeletonData.findAnimation(t);if(!n)throw new Error("Animation not found: "+t);return this.setAnimationWith(e,n,i)}setAnimationWith(e,t,i=!1){if(!t)throw new Error("animation cannot be null.");let n=!0,r=this.expandToIndex(e);r&&(r.nextTrackLast==-1?(this.tracks[e]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,n=!1):this.clearNext(r));let a=this.trackEntry(e,t,i,r);return this.setCurrent(e,a,n),this.queue.drain(),a}addAnimation(e,t,i=!1,n=0){let r=this.data.skeletonData.findAnimation(t);if(!r)throw new Error("Animation not found: "+t);return this.addAnimationWith(e,r,i,n)}addAnimationWith(e,t,i=!1,n=0){if(!t)throw new Error("animation cannot be null.");let r=this.expandToIndex(e);if(r)for(;r.next;)r=r.next;let a=this.trackEntry(e,t,i,r);return r?(r.next=a,a.previous=r,n<=0&&(n=Math.max(n+r.getTrackComplete()-a.mixDuration,0))):(this.setCurrent(e,a,!0),this.queue.drain(),n<0&&(n=0)),a.delay=n,a}setEmptyAnimation(e,t=0){let i=this.setAnimationWith(e,lr.emptyAnimation(),!1);return i.mixDuration=t,i.trackEnd=t,i}addEmptyAnimation(e,t=0,i=0){let n=this.addAnimationWith(e,lr.emptyAnimation(),!1,i);return i<=0&&(n.delay=Math.max(n.delay+n.mixDuration-t,0)),n.mixDuration=t,n.trackEnd=t,n}setEmptyAnimations(e=0){let t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let i=0,n=this.tracks.length;i0){r[h]=lR,a[h]=u;continue e}break}r[h]=wf}}}getCurrent(e){return e>=this.tracks.length?null:this.tracks[e]}addListener(e){if(!e)throw new Error("listener cannot be null.");this.listeners.push(e)}removeListener(e){let t=this.listeners.indexOf(e);t>=0&&this.listeners.splice(t,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},x(lr,"_emptyAnimation",new Tp("",[],0)),lr),aR=class{constructor(){x(this,"animation",null);x(this,"previous",null);x(this,"next",null);x(this,"mixingFrom",null);x(this,"mixingTo",null);x(this,"listener",null);x(this,"trackIndex",0);x(this,"loop",!1);x(this,"holdPrevious",!1);x(this,"reverse",!1);x(this,"shortestRotation",!1);x(this,"eventThreshold",0);x(this,"mixAttachmentThreshold",0);x(this,"alphaAttachmentThreshold",0);x(this,"mixDrawOrderThreshold",0);x(this,"animationStart",0);x(this,"animationEnd",0);x(this,"animationLast",0);x(this,"nextAnimationLast",0);x(this,"delay",0);x(this,"trackTime",0);x(this,"trackLast",0);x(this,"nextTrackLast",0);x(this,"trackEnd",0);x(this,"timeScale",0);x(this,"alpha",0);x(this,"mixTime",0);x(this,"_mixDuration",0);x(this,"interruptAlpha",0);x(this,"totalAlpha",0);x(this,"mixBlend",Ce.replace);x(this,"timelineMode",new Array);x(this,"timelineHoldMix",new Array);x(this,"timelinesRotation",new Array)}get mixDuration(){return this._mixDuration}set mixDuration(e){this._mixDuration=e}setMixDurationWithDelay(e,t){this._mixDuration=e,t<=0&&(this.previous!=null?t=Math.max(t+this.previous.getTrackComplete()-e,0):t=0),this.delay=t}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let e=this.animationEnd-this.animationStart;return e==0?this.animationStart:this.trackTime%e+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(e){this.animationLast=e,this.nextAnimationLast=e}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){let e=this.animationEnd-this.animationStart;if(e!=0){if(this.loop)return e*(1+(this.trackTime/e|0));if(this.trackTime=0}},oR=class{constructor(e){x(this,"objects",[]);x(this,"drainDisabled",!1);x(this,"animState");this.animState=e}start(e){this.objects.push(ps.start),this.objects.push(e),this.animState.animationsChanged=!0}interrupt(e){this.objects.push(ps.interrupt),this.objects.push(e)}end(e){this.objects.push(ps.end),this.objects.push(e),this.animState.animationsChanged=!0}dispose(e){this.objects.push(ps.dispose),this.objects.push(e)}complete(e){this.objects.push(ps.complete),this.objects.push(e)}event(e,t){this.objects.push(ps.event),this.objects.push(e),this.objects.push(t)}drain(){if(this.drainDisabled)return;this.drainDisabled=!0;let e=this.objects;for(let t=0;t{c.width=parseInt(i[1]),c.height=parseInt(i[2])},n.format=()=>{},n.filter=c=>{c.minFilter=Ge.enumValue(Bi,i[1]),c.magFilter=Ge.enumValue(Bi,i[2])},n.repeat=c=>{i[1].indexOf("x")!=-1&&(c.uWrap=ur.Repeat),i[1].indexOf("y")!=-1&&(c.vWrap=ur.Repeat)},n.pma=c=>{c.pma=i[1]=="true"};var r={};r.xy=c=>{c.x=parseInt(i[1]),c.y=parseInt(i[2])},r.size=c=>{c.width=parseInt(i[1]),c.height=parseInt(i[2])},r.bounds=c=>{c.x=parseInt(i[1]),c.y=parseInt(i[2]),c.width=parseInt(i[3]),c.height=parseInt(i[4])},r.offset=c=>{c.offsetX=parseInt(i[1]),c.offsetY=parseInt(i[2])},r.orig=c=>{c.originalWidth=parseInt(i[1]),c.originalHeight=parseInt(i[2])},r.offsets=c=>{c.offsetX=parseInt(i[1]),c.offsetY=parseInt(i[2]),c.originalWidth=parseInt(i[3]),c.originalHeight=parseInt(i[4])},r.rotate=c=>{let u=i[1];u=="true"?c.degrees=90:u!="false"&&(c.degrees=parseInt(u))},r.index=c=>{c.index=parseInt(i[1])};let a=t.readLine();for(;a&&a.trim().length==0;)a=t.readLine();for(;!(!a||a.trim().length==0||t.readEntry(i,a)==0);)a=t.readLine();let o=null,h=null,l=null;for(;a!==null;)if(a.trim().length==0)o=null,a=t.readLine();else if(o){let c=new sw(o,a);for(;;){let u=t.readEntry(i,a=t.readLine());if(u==0)break;let d=r[i[0]];if(d)d(c);else{h||(h=[]),l||(l=[]),h.push(i[0]);let f=[];for(let p=0;p0&&l&&l.length>0&&(c.names=h,c.values=l,h=null,l=null),c.u=c.x/o.width,c.v=c.y/o.height,c.degrees==90?(c.u2=(c.x+c.height)/o.width,c.v2=(c.y+c.width)/o.height):(c.u2=(c.x+c.width)/o.width,c.v2=(c.y+c.height)/o.height),this.regions.push(c)}else{for(o=new mR(a.trim());t.readEntry(i,a=t.readLine())!=0;){let c=n[i[0]];c&&c(o)}this.pages.push(o)}}findRegion(e){for(let t=0;t=this.lines.length?null:this.lines[this.index++]}readEntry(e,t){if(!t||(t=t.trim(),t.length==0))return 0;let i=t.indexOf(":");if(i==-1)return 0;e[0]=t.substr(0,i).trim();for(let n=1,r=i+1;;n++){let a=t.indexOf(",",r);if(a==-1)return e[n]=t.substr(r).trim(),n;if(e[n]=t.substr(r,a-r).trim(),r=a+1,n==4)return 4}}},mR=class{constructor(e){x(this,"name");x(this,"minFilter",Bi.Nearest);x(this,"magFilter",Bi.Nearest);x(this,"uWrap",ur.ClampToEdge);x(this,"vWrap",ur.ClampToEdge);x(this,"texture",null);x(this,"width",0);x(this,"height",0);x(this,"pma",!1);x(this,"regions",new Array);this.name=e}setTexture(e){this.texture=e,e.setFilters(this.minFilter,this.magFilter),e.setWraps(this.uWrap,this.vWrap);for(let t of this.regions)t.texture=e}},sw=class extends dR{constructor(t,i){super();x(this,"page");x(this,"name");x(this,"x",0);x(this,"y",0);x(this,"offsetX",0);x(this,"offsetY",0);x(this,"originalWidth",0);x(this,"originalHeight",0);x(this,"index",0);x(this,"degrees",0);x(this,"names",null);x(this,"values",null);this.page=t,this.name=i,t.regions.push(this)}},Zl=class Tm extends vr{constructor(t,i){super(t);x(this,"region",null);x(this,"path");x(this,"regionUVs",[]);x(this,"uvs",[]);x(this,"triangles",[]);x(this,"color",new _t(1,1,1,1));x(this,"width",0);x(this,"height",0);x(this,"hullLength",0);x(this,"edges",[]);x(this,"parentMesh",null);x(this,"sequence",null);x(this,"tempColor",new _t(0,0,0,0));this.path=i}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.regionUVs;(!this.uvs||this.uvs.length!=t.length)&&(this.uvs=Ge.newFloatArray(t.length));let i=this.uvs,n=this.uvs.length,r=this.region.u,a=this.region.v,o=0,h=0;if(this.region instanceof sw){let l=this.region,c=l.page,u=c.width,d=c.height;switch(l.degrees){case 90:r-=(l.originalHeight-l.offsetY-l.height)/u,a-=(l.originalWidth-l.offsetX-l.width)/d,o=l.originalHeight/u,h=l.originalWidth/d;for(let f=0;f= 0.");if(!t)throw new Error("name cannot be null.");this.index=e,this.name=t,this.parent=i}};var gi;(function(s){s[s.Normal=0]="Normal",s[s.OnlyTranslation=1]="OnlyTranslation",s[s.NoRotationOrReflection=2]="NoRotationOrReflection",s[s.NoScale=3]="NoScale",s[s.NoScaleOrReflection=4]="NoScaleOrReflection"})(gi||(gi={}));let Vv=class{constructor(e,t,i){x(this,"data");x(this,"skeleton");x(this,"parent",null);x(this,"children",new Array);x(this,"x",0);x(this,"y",0);x(this,"rotation",0);x(this,"scaleX",0);x(this,"scaleY",0);x(this,"shearX",0);x(this,"shearY",0);x(this,"ax",0);x(this,"ay",0);x(this,"arotation",0);x(this,"ascaleX",0);x(this,"ascaleY",0);x(this,"ashearX",0);x(this,"ashearY",0);x(this,"a",0);x(this,"b",0);x(this,"c",0);x(this,"d",0);x(this,"worldY",0);x(this,"worldX",0);x(this,"inherit",gi.Normal);x(this,"sorted",!1);x(this,"active",!1);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.skeleton=t,this.parent=i,this.setToSetupPose()}isActive(){return this.active}update(e){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(e,t,i,n,r,a,o){this.ax=e,this.ay=t,this.arotation=i,this.ascaleX=n,this.ascaleY=r,this.ashearX=a,this.ashearY=o;let h=this.parent;if(!h){let f=this.skeleton;const p=f.scaleX,m=f.scaleY,g=(i+a)*$e.degRad,v=(i+90+o)*$e.degRad;this.a=Math.cos(g)*n*p,this.b=Math.cos(v)*r*p,this.c=Math.sin(g)*n*m,this.d=Math.sin(v)*r*m,this.worldX=e*p+f.x,this.worldY=t*m+f.y;return}let l=h.a,c=h.b,u=h.c,d=h.d;switch(this.worldX=l*e+c*t+h.worldX,this.worldY=u*e+d*t+h.worldY,this.inherit){case gi.Normal:{const f=(i+a)*$e.degRad,p=(i+90+o)*$e.degRad,m=Math.cos(f)*n,g=Math.cos(p)*r,v=Math.sin(f)*n,b=Math.sin(p)*r;this.a=l*m+c*v,this.b=l*g+c*b,this.c=u*m+d*v,this.d=u*g+d*b;return}case gi.OnlyTranslation:{const f=(i+a)*$e.degRad,p=(i+90+o)*$e.degRad;this.a=Math.cos(f)*n,this.b=Math.cos(p)*r,this.c=Math.sin(f)*n,this.d=Math.sin(p)*r;break}case gi.NoRotationOrReflection:{let f=1/this.skeleton.scaleX,p=1/this.skeleton.scaleY;l*=f,u*=p;let m=l*l+u*u,g=0;m>1e-4?(m=Math.abs(l*d*p-c*f*u)/m,c=u*m,d=l*m,g=Math.atan2(u,l)*$e.radDeg):(l=0,u=0,g=90-Math.atan2(d,c)*$e.radDeg);const v=(i+a-g)*$e.degRad,b=(i+o-g+90)*$e.degRad,y=Math.cos(v)*n,w=Math.cos(b)*r,A=Math.sin(v)*n,T=Math.sin(b)*r;this.a=l*y-c*A,this.b=l*w-c*T,this.c=u*y+d*A,this.d=u*w+d*T;break}case gi.NoScale:case gi.NoScaleOrReflection:{i*=$e.degRad;const f=Math.cos(i),p=Math.sin(i);let m=(l*f+c*p)/this.skeleton.scaleX,g=(u*f+d*p)/this.skeleton.scaleY,v=Math.sqrt(m*m+g*g);v>1e-5&&(v=1/v),m*=v,g*=v,v=Math.sqrt(m*m+g*g),this.inherit==gi.NoScale&&l*d-c*u<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(v=-v),i=Math.PI/2+Math.atan2(g,m);const b=Math.cos(i)*v,y=Math.sin(i)*v;a*=$e.degRad,o=(90+o)*$e.degRad;const w=Math.cos(a)*n,A=Math.cos(o)*r,T=Math.sin(a)*n,_=Math.sin(o)*r;this.a=m*w+b*T,this.b=m*A+b*_,this.c=g*w+y*T,this.d=g*A+y*_;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY,this.inherit=e.inherit}updateAppliedTransform(){let e=this.parent;if(!e){this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*$e.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*$e.radDeg;return}let t=e.a,i=e.b,n=e.c,r=e.d,a=1/(t*r-i*n),o=r*a,h=i*a,l=n*a,c=t*a,u=this.worldX-e.worldX,d=this.worldY-e.worldY;this.ax=u*o-d*h,this.ay=d*c-u*l;let f,p,m,g;if(this.inherit==gi.OnlyTranslation)f=this.a,p=this.b,m=this.c,g=this.d;else{switch(this.inherit){case gi.NoRotationOrReflection:{let A=Math.abs(t*r-i*n)/(t*t+n*n);i=-n*this.skeleton.scaleX*A/this.skeleton.scaleY,r=t*this.skeleton.scaleY*A/this.skeleton.scaleX,a=1/(t*r-i*n),o=r*a,h=i*a;break}case gi.NoScale:case gi.NoScaleOrReflection:let v=$e.cosDeg(this.rotation),b=$e.sinDeg(this.rotation);t=(t*v+i*b)/this.skeleton.scaleX,n=(n*v+r*b)/this.skeleton.scaleY;let y=Math.sqrt(t*t+n*n);y>1e-5&&(y=1/y),t*=y,n*=y,y=Math.sqrt(t*t+n*n),this.inherit==gi.NoScale&&a<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(y=-y);let w=$e.PI/2+Math.atan2(n,t);i=Math.cos(w)*y,r=Math.sin(w)*y,a=1/(t*r-i*n),o=r*a,h=i*a,l=n*a,c=t*a}f=o*this.a-h*this.c,p=o*this.b-h*this.d,m=c*this.c-l*this.a,g=c*this.d-l*this.b}if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+m*m),this.ascaleX>1e-4){let v=f*g-p*m;this.ascaleY=v/this.ascaleX,this.ashearY=-Math.atan2(f*p+m*g,v)*$e.radDeg,this.arotation=Math.atan2(m,f)*$e.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*$e.radDeg}getWorldRotationX(){return Math.atan2(this.c,this.a)*$e.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*$e.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}worldToLocal(e){let t=1/(this.a*this.d-this.b*this.c),i=e.x-this.worldX,n=e.y-this.worldY;return e.x=i*this.d*t-n*this.b*t,e.y=n*this.a*t-i*this.c*t,e}localToWorld(e){let t=e.x,i=e.y;return e.x=t*this.a+i*this.b+this.worldX,e.y=t*this.c+i*this.d+this.worldY,e}worldToParent(e){if(e==null)throw new Error("world cannot be null.");return this.parent==null?e:this.parent.worldToLocal(e)}parentToWorld(e){if(e==null)throw new Error("world cannot be null.");return this.parent==null?e:this.parent.localToWorld(e)}worldToLocalRotation(e){let t=$e.sinDeg(e),i=$e.cosDeg(e);return Math.atan2(this.a*t-this.c*i,this.d*i-this.b*t)*$e.radDeg+this.rotation-this.shearX}localToWorldRotation(e){e-=this.rotation-this.shearX;let t=$e.sinDeg(e),i=$e.cosDeg(e);return Math.atan2(i*this.c+t*this.d,i*this.a+t*this.b)*$e.radDeg}rotateWorld(e){e*=$e.degRad;const t=Math.sin(e),i=Math.cos(e),n=this.a,r=this.b;this.a=i*n-t*this.c,this.b=i*r-t*this.d,this.c=t*n+i*this.c,this.d=t*r+i*this.d}},Cu=class{constructor(e,t,i){x(this,"name");x(this,"order");x(this,"skinRequired");this.name=e,this.order=t,this.skinRequired=i}},lw=class{constructor(e,t){x(this,"data");x(this,"intValue",0);x(this,"floatValue",0);x(this,"stringValue",null);x(this,"time",0);x(this,"volume",0);x(this,"balance",0);if(!t)throw new Error("data cannot be null.");this.time=e,this.data=t}},cw=class{constructor(e){x(this,"name");x(this,"intValue",0);x(this,"floatValue",0);x(this,"stringValue",null);x(this,"audioPath",null);x(this,"volume",0);x(this,"balance",0);this.name=e}},pR=class{constructor(e,t){x(this,"data");x(this,"bones");x(this,"target");x(this,"bendDirection",0);x(this,"compress",!1);x(this,"stretch",!1);x(this,"mix",1);x(this,"softness",0);x(this,"active",!1);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(let n=0;n180?f-=360:f<-180&&(f+=360);let g=e.ascaleX,v=e.ascaleY;if(n||r){switch(e.inherit){case gi.NoScale:case gi.NoScaleOrReflection:p=t-e.worldX,m=i-e.worldY}const b=e.data.length*g;if(b>1e-4){const y=p*p+m*m;if(n&&yb*b){const w=(Math.sqrt(y)/b-1)*o+1;g*=w,a&&(v*=w)}}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+f*o,g,v,e.ashearX,e.ashearY)}apply2(e,t,i,n,r,a,o,h,l){if(e.inherit!=gi.Normal||t.inherit!=gi.Normal)return;let c=e.ax,u=e.ay,d=e.ascaleX,f=e.ascaleY,p=d,m=f,g=t.ascaleX,v=0,b=0,y=0;d<0?(d=-d,v=180,y=-1):(v=0,y=1),f<0&&(f=-f,y=-y),g<0?(g=-g,b=180):b=0;let w=t.ax,A=0,T=0,_=0,R=e.a,P=e.b,F=e.c,I=e.d,k=Math.abs(d-f)<=1e-4;!k||a?(A=0,T=R*w+e.worldX,_=F*w+e.worldY):(A=t.ay,T=R*w+P*A+e.worldX,_=F*w+I*A+e.worldY);let B=e.parent;if(!B)throw new Error("IK parent must itself have a parent.");R=B.a,P=B.b,F=B.c,I=B.d;let D=R*I-P*F,U=T-B.worldX,L=_-B.worldY;D=Math.abs(D)<=1e-4?0:1/D;let N=(U*I-L*P)*D-c,O=(L*R-U*F)*D-u,X=Math.sqrt(N*N+O*O),E=t.data.length*g,V,q;if(X<1e-4){this.apply1(e,i,n,!1,a,!1,l),t.updateWorldTransformWith(w,A,0,t.ascaleX,t.ascaleY,t.ashearX,t.ashearY);return}U=i-B.worldX,L=n-B.worldY;let W=(U*I-L*P)*D-c,J=(L*R-U*F)*D-u,K=W*W+J*J;if(h!=0){h*=d*(g+1)*.5;let we=Math.sqrt(K),Ee=we-X-E*d+h;if(Ee>0){let pe=Math.min(1,Ee/(h*2))-1;pe=(Ee-h*(1-pe*pe))/we,W-=pe*W,J-=pe*J,K=W*W+J*J}}e:if(k){E*=d;let we=(K-X*X-E*E)/(2*X*E);we<-1?(we=-1,q=Math.PI*r):we>1?(we=1,q=0,a&&(R=(Math.sqrt(K)/(X+E)-1)*l+1,p*=R,o&&(m*=R))):q=Math.acos(we)*r,R=X+E*we,P=E*Math.sin(q),V=Math.atan2(J*R-W*P,W*R+J*P)}else{R=d*E,P=f*E;let we=R*R,Ee=P*P,pe=Math.atan2(J,W);F=Ee*X*X+we*K-we*Ee;let Ae=-2*Ee*X,G=Ee-we;if(I=Ae*Ae-4*G*F,I>=0){let le=Math.sqrt(I);Ae<0&&(le=-le),le=-(Ae+le)*.5;let Oe=le/G,Fe=F/le,Be=Math.abs(Oe)=0){L=Math.sqrt(Oe)*r,V=pe-Math.atan2(L,Be),q=Math.atan2(L/f,(Be-X)/d);break e}}let Z=$e.PI,z=X-R,j=z*z,te=0,he=0,xe=X+R,oe=xe*xe,ge=0;F=-R*X/(we-Ee),F>=-1&&F<=1&&(F=Math.acos(F),U=R*Math.cos(F)+X,L=P*Math.sin(F),I=U*U+L*L,Ioe&&(he=F,oe=I,xe=U,ge=L)),K<=(j+oe)*.5?(V=pe-Math.atan2(te*r,z),q=Z*r):(V=pe-Math.atan2(ge*r,xe),q=he*r)}let fe=Math.atan2(A,w)*y,me=e.arotation;V=(V-fe)*$e.radDeg+v-me,V>180?V-=360:V<-180&&(V+=360),e.updateWorldTransformWith(c,u,me+V*l,p,m,0,0),me=t.arotation,q=((q+fe)*$e.radDeg-t.ashearX)*y+b-me,q>180?q-=360:q<-180&&(q+=360),t.updateWorldTransformWith(w,A,me+q*l,t.ascaleX,t.ascaleY,t.ashearX,t.ashearY)}},hw=class extends Cu{constructor(t){super(t,0,!1);x(this,"bones",new Array);x(this,"_target",null);x(this,"bendDirection",0);x(this,"compress",!1);x(this,"stretch",!1);x(this,"uniform",!1);x(this,"mix",0);x(this,"softness",0)}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},uw=class extends Cu{constructor(t){super(t,0,!1);x(this,"bones",new Array);x(this,"_target",null);x(this,"positionMode",Ln.Fixed);x(this,"spacingMode",ki.Fixed);x(this,"rotateMode",Pa.Chain);x(this,"offsetRotation",0);x(this,"position",0);x(this,"spacing",0);x(this,"mixRotate",0);x(this,"mixX",0);x(this,"mixY",0)}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}};var Ln;(function(s){s[s.Fixed=0]="Fixed",s[s.Percent=1]="Percent"})(Ln||(Ln={}));var ki;(function(s){s[s.Length=0]="Length",s[s.Fixed=1]="Fixed",s[s.Percent=2]="Percent",s[s.Proportional=3]="Proportional"})(ki||(ki={}));var Pa;(function(s){s[s.Tangent=0]="Tangent",s[s.Chain=1]="Chain",s[s.ChainScale=2]="ChainScale"})(Pa||(Pa={}));var Ji;let gR=(Ji=class{constructor(e,t){x(this,"data");x(this,"bones");x(this,"target");x(this,"position",0);x(this,"spacing",0);x(this,"mixRotate",0);x(this,"mixX",0);x(this,"mixY",0);x(this,"spaces",new Array);x(this,"positions",new Array);x(this,"world",new Array);x(this,"curves",new Array);x(this,"lengths",new Array);x(this,"segments",new Array);x(this,"active",!1);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(let n=0,r=e.bones.length;n0){w=u/w*p;for(let T=1;T0?$e.degRad:-.01745329277777778}for(let w=0,A=3;w0){let I=T.a,k=T.b,B=T.c,D=T.d,U=0,L=0,N=0;if(o?U=m[A-1]:d[w+1]==0?U=m[A+2]:U=Math.atan2(F,P),U-=Math.atan2(B,I),y){L=Math.cos(U),N=Math.sin(U);let O=T.data.length;g+=(O*(L*I-N*B)-P)*i,v+=(O*(N*I+L*B)-F)*i}else U+=b;U>$e.PI?U-=$e.PI2:U<-3.1415927&&(U+=$e.PI2),U*=i,L=Math.cos(U),N=Math.sin(U),T.a=L*I-N*B,T.b=L*k-N*D,T.c=N*I+L*B,T.d=N*k+L*D}T.updateAppliedTransform()}}computeWorldPositions(e,t,i){let n=this.target,r=this.position,a=this.spaces,o=Ge.setArraySize(this.positions,t*3+2),h=this.world,l=e.closed,c=e.worldVerticesLength,u=c/6,d=Ji.NONE;if(!e.constantSpeed){let O=e.lengths;u-=l?1:2;let X=O[u];this.data.positionMode==Ln.Percent&&(r*=X);let E;switch(this.data.spacingMode){case ki.Percent:E=X;break;case ki.Proportional:E=X/t;break;default:E=1}h=Ge.setArraySize(this.world,8);for(let V=0,q=0,W=0;VX){d!=Ji.AFTER&&(d=Ji.AFTER,e.computeWorldVertices(n,c-6,4,h,0,2)),this.addAfterPosition(K-X,h,0,o,q);continue}for(;;W++){let fe=O[W];if(!(K>fe)){if(W==0)K/=fe;else{let me=O[W-1];K=(K-me)/(fe-me)}break}}W!=d&&(d=W,l&&W==u?(e.computeWorldVertices(n,c-4,4,h,0,2),e.computeWorldVertices(n,0,4,h,4,2)):e.computeWorldVertices(n,W*6+2,8,h,0,2)),this.addCurvePosition(K,h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],o,q,i||V>0&&J==0)}return o}l?(c+=2,h=Ge.setArraySize(this.world,c),e.computeWorldVertices(n,2,c-4,h,0,2),e.computeWorldVertices(n,0,2,h,c-4,2),h[c-2]=h[0],h[c-1]=h[1]):(u--,c-=4,h=Ge.setArraySize(this.world,c),e.computeWorldVertices(n,2,c,h,0,2));let f=Ge.setArraySize(this.curves,u),p=0,m=h[0],g=h[1],v=0,b=0,y=0,w=0,A=0,T=0,_=0,R=0,P=0,F=0,I=0,k=0,B=0,D=0;for(let O=0,X=2;Op){this.addAfterPosition(W-p,h,c-4,o,X);continue}for(;;E++){let J=f[E];if(!(W>J)){if(E==0)W/=J;else{let K=f[E-1];W=(W-K)/(J-K)}break}}if(E!=d){d=E;let J=E*6;for(m=h[J],g=h[J+1],v=h[J+2],b=h[J+3],y=h[J+4],w=h[J+5],A=h[J+6],T=h[J+7],_=(m-v*2+y)*.03,R=(g-b*2+w)*.03,P=((v-y)*3-m+A)*.006,F=((b-w)*3-g+T)*.006,I=_*2+P,k=R*2+F,B=(v-m)*.3+_+P*.16666667,D=(b-g)*.3+R+F*.16666667,N=Math.sqrt(B*B+D*D),L[0]=N,J=1;J<8;J++)B+=I,D+=k,I+=P,k+=F,N+=Math.sqrt(B*B+D*D),L[J]=N;B+=I,D+=k,N+=Math.sqrt(B*B+D*D),L[8]=N,B+=I+P,D+=k+F,N+=Math.sqrt(B*B+D*D),L[9]=N,V=0}for(W*=N;;V++){let J=L[V];if(!(W>J)){if(V==0)W/=J;else{let K=L[V-1];W=V+(W-K)/(J-K)}break}}this.addCurvePosition(W*.1,m,g,v,b,y,w,A,T,o,X,i||O>0&&q==0)}return o}addBeforePosition(e,t,i,n,r){let a=t[i],o=t[i+1],h=t[i+2]-a,l=t[i+3]-o,c=Math.atan2(l,h);n[r]=a+e*Math.cos(c),n[r+1]=o+e*Math.sin(c),n[r+2]=c}addAfterPosition(e,t,i,n,r){let a=t[i+2],o=t[i+3],h=a-t[i],l=o-t[i+1],c=Math.atan2(l,h);n[r]=a+e*Math.cos(c),n[r+1]=o+e*Math.sin(c),n[r+2]=c}addCurvePosition(e,t,i,n,r,a,o,h,l,c,u,d){if(e==0||isNaN(e)){c[u]=t,c[u+1]=i,c[u+2]=Math.atan2(r-i,n-t);return}let f=e*e,p=f*e,m=1-e,g=m*m,v=g*m,b=m*e,y=b*3,w=m*y,A=y*e,T=t*v+n*w+a*A+h*p,_=i*v+r*w+o*A+l*p;c[u]=T,c[u+1]=_,d&&(e<.001?c[u+2]=Math.atan2(r-i,n-t):c[u+2]=Math.atan2(_-(i*g+r*b*2+o*f),T-(t*g+n*b*2+a*f)))}},x(Ji,"NONE",-1),x(Ji,"BEFORE",-2),x(Ji,"AFTER",-3),x(Ji,"epsilon",1e-5),Ji),vR=class{constructor(e,t){x(this,"data");x(this,"_bone",null);x(this,"inertia",0);x(this,"strength",0);x(this,"damping",0);x(this,"massInverse",0);x(this,"wind",0);x(this,"gravity",0);x(this,"mix",0);x(this,"_reset",!0);x(this,"ux",0);x(this,"uy",0);x(this,"cx",0);x(this,"cy",0);x(this,"tx",0);x(this,"ty",0);x(this,"xOffset",0);x(this,"xVelocity",0);x(this,"yOffset",0);x(this,"yVelocity",0);x(this,"rotateOffset",0);x(this,"rotateVelocity",0);x(this,"scaleOffset",0);x(this,"scaleVelocity",0);x(this,"active",!1);x(this,"skeleton");x(this,"remaining",0);x(this,"lastTime",0);this.data=e,this.skeleton=t,this.bone=t.bones[e.bone.index],this.inertia=e.inertia,this.strength=e.strength,this.damping=e.damping,this.massInverse=e.massInverse,this.wind=e.wind,this.gravity=e.gravity,this.mix=e.mix}set bone(e){this._bone=e}get bone(){if(this._bone)return this._bone;throw new Error("Bone not set.")}reset(){this.remaining=0,this.lastTime=this.skeleton.time,this._reset=!0,this.xOffset=0,this.xVelocity=0,this.yOffset=0,this.yVelocity=0,this.rotateOffset=0,this.rotateVelocity=0,this.scaleOffset=0,this.scaleVelocity=0}setToSetupPose(){const e=this.data;this.inertia=e.inertia,this.strength=e.strength,this.damping=e.damping,this.massInverse=e.massInverse,this.wind=e.wind,this.gravity=e.gravity,this.mix=e.mix}isActive(){return this.active}update(e){const t=this.mix;if(t==0)return;const i=this.data.x>0,n=this.data.y>0,r=this.data.rotate>0||this.data.shearX>0,a=this.data.scaleX>0,o=this.bone,h=o.data.length;switch(e){case Br.none:return;case Br.reset:this.reset();case Br.update:const l=this.skeleton,c=Math.max(this.skeleton.time-this.lastTime,0);this.remaining+=c,this.lastTime=l.time;const u=o.worldX,d=o.worldY;if(this._reset)this._reset=!1,this.ux=u,this.uy=d;else{let f=this.remaining,p=this.inertia,m=this.data.step,g=this.skeleton.data.referenceScale,v=-1,b=this.data.limit*c,y=b*Math.abs(l.scaleY);if(b*=Math.abs(l.scaleX),i||n){if(i){const w=(this.ux-u)*p;this.xOffset+=w>b?b:w<-b?-b:w,this.ux=u}if(n){const w=(this.uy-d)*p;this.yOffset+=w>y?y:w<-y?-y:w,this.uy=d}if(f>=m){v=Math.pow(this.damping,60*m);const w=this.massInverse*m,A=this.strength,T=this.wind*g*l.scaleX,_=this.gravity*g*l.scaleY;do i&&(this.xVelocity+=(T-this.xOffset*A)*w,this.xOffset+=this.xVelocity*m,this.xVelocity*=v),n&&(this.yVelocity-=(_+this.yOffset*A)*w,this.yOffset+=this.yVelocity*m,this.yVelocity*=v),f-=m;while(f>=m)}i&&(o.worldX+=this.xOffset*t*this.data.x),n&&(o.worldY+=this.yOffset*t*this.data.y)}if(r||a){let w=Math.atan2(o.c,o.a),A=0,T=0,_=0,R=this.cx-o.worldX,P=this.cy-o.worldY;if(R>b?R=b:R<-b&&(R=-b),P>y?P=y:P<-y&&(P=-y),r){_=(this.data.rotate+this.data.shearX)*t;let F=Math.atan2(P+this.ty,R+this.tx)-w-this.rotateOffset*_;this.rotateOffset+=(F-Math.ceil(F*$e.invPI2-.5)*$e.PI2)*p,F=this.rotateOffset*_+w,A=Math.cos(F),T=Math.sin(F),a&&(F=h*o.getWorldScaleX(),F>0&&(this.scaleOffset+=(R*A+P*T)*p/F))}else{A=Math.cos(w),T=Math.sin(w);const F=h*o.getWorldScaleX();F>0&&(this.scaleOffset+=(R*A+P*T)*p/F)}if(f=this.remaining,f>=m){v==-1&&(v=Math.pow(this.damping,60*m));const F=this.massInverse*m,I=this.strength,k=this.wind,B=Cp.yDown?-this.gravity:this.gravity,D=h/g;for(;;)if(f-=m,a&&(this.scaleVelocity+=(k*A-B*T-this.scaleOffset*I)*F,this.scaleOffset+=this.scaleVelocity*m,this.scaleVelocity*=v),r){if(this.rotateVelocity-=((k*T+B*A)*D+this.rotateOffset*I)*F,this.rotateOffset+=this.rotateVelocity*m,this.rotateVelocity*=v,f0){let f=0;this.data.rotate>0&&(f=l*this.data.rotate,c=Math.sin(f),u=Math.cos(f),d=o.b,o.b=u*d-c*o.d,o.d=c*d+u*o.d),f+=l*this.data.shearX,c=Math.sin(f),u=Math.cos(f),d=o.a,o.a=u*d-c*o.c,o.c=c*d+u*o.c}else l*=this.data.rotate,c=Math.sin(l),u=Math.cos(l),d=o.a,o.a=u*d-c*o.c,o.c=c*d+u*o.c,d=o.b,o.b=u*d-c*o.d,o.d=c*d+u*o.d}if(a){const l=1+this.scaleOffset*t*this.data.scaleX;o.a*=l,o.c*=l}e!=Br.pose&&(this.tx=h*o.a,this.ty=h*o.c),o.updateAppliedTransform()}translate(e,t){this.ux-=e,this.uy-=t,this.cx-=e,this.cy-=t}rotate(e,t,i){const n=i*$e.degRad,r=Math.cos(n),a=Math.sin(n),o=this.cx-e,h=this.cy-t;this.translate(o*r-h*a-o,o*a+h*r-h)}},yR=class{constructor(e,t){x(this,"data");x(this,"bone");x(this,"color");x(this,"darkColor",null);x(this,"attachment",null);x(this,"attachmentState",0);x(this,"sequenceIndex",-1);x(this,"deform",new Array);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("bone cannot be null.");this.data=e,this.bone=t,this.color=new _t,this.darkColor=e.darkColor?new _t:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(e){this.attachment!=e&&((!(e instanceof vr)||!(this.attachment instanceof vr)||e.timelineAttachment!=this.attachment.timelineAttachment)&&(this.deform.length=0),this.attachment=e,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}},xR=class{constructor(e,t){x(this,"data");x(this,"bones");x(this,"target");x(this,"mixRotate",0);x(this,"mixX",0);x(this,"mixY",0);x(this,"mixScaleX",0);x(this,"mixScaleY",0);x(this,"mixShearY",0);x(this,"temp",new Fh);x(this,"active",!1);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(let n=0;n0?$e.degRad:-.01745329277777778,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let v=0,b=g.length;v$e.PI?R-=$e.PI2:R<-3.1415927&&(R+=$e.PI2),R*=e;let P=Math.cos(R),F=Math.sin(R);y.a=P*w-F*T,y.b=P*A-F*_,y.c=F*w+P*T,y.d=F*A+P*_}if(o){let w=this.temp;h.localToWorld(w.set(this.data.offsetX,this.data.offsetY)),y.worldX+=(w.x-y.worldX)*t,y.worldY+=(w.y-y.worldY)*i}if(n!=0){let w=Math.sqrt(y.a*y.a+y.c*y.c);w!=0&&(w=(w+(Math.sqrt(l*l+u*u)-w+this.data.offsetScaleX)*n)/w),y.a*=w,y.c*=w}if(r!=0){let w=Math.sqrt(y.b*y.b+y.d*y.d);w!=0&&(w=(w+(Math.sqrt(c*c+d*d)-w+this.data.offsetScaleY)*r)/w),y.b*=w,y.d*=w}if(a>0){let w=y.b,A=y.d,T=Math.atan2(A,w),_=Math.atan2(d,c)-Math.atan2(u,l)-(T-Math.atan2(y.c,y.a));_>$e.PI?_-=$e.PI2:_<-3.1415927&&(_+=$e.PI2),_=T+(_+m)*a;let R=Math.sqrt(w*w+A*A);y.b=Math.cos(_)*R,y.d=Math.sin(_)*R}y.updateAppliedTransform()}}applyRelativeWorld(){let e=this.mixRotate,t=this.mixX,i=this.mixY,n=this.mixScaleX,r=this.mixScaleY,a=this.mixShearY,o=t!=0||i!=0,h=this.target,l=h.a,c=h.b,u=h.c,d=h.d,f=l*d-c*u>0?$e.degRad:-.01745329277777778,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let v=0,b=g.length;v$e.PI?R-=$e.PI2:R<-3.1415927&&(R+=$e.PI2),R*=e;let P=Math.cos(R),F=Math.sin(R);y.a=P*w-F*T,y.b=P*A-F*_,y.c=F*w+P*T,y.d=F*A+P*_}if(o){let w=this.temp;h.localToWorld(w.set(this.data.offsetX,this.data.offsetY)),y.worldX+=w.x*t,y.worldY+=w.y*i}if(n!=0){let w=(Math.sqrt(l*l+u*u)-1+this.data.offsetScaleX)*n+1;y.a*=w,y.c*=w}if(r!=0){let w=(Math.sqrt(c*c+d*d)-1+this.data.offsetScaleY)*r+1;y.b*=w,y.d*=w}if(a>0){let w=Math.atan2(d,c)-Math.atan2(u,l);w>$e.PI?w-=$e.PI2:w<-3.1415927&&(w+=$e.PI2);let A=y.b,T=y.d;w=Math.atan2(T,A)+(w-$e.PI/2+m)*a;let _=Math.sqrt(A*A+T*T);y.b=Math.cos(w)*_,y.d=Math.sin(w)*_}y.updateAppliedTransform()}}applyAbsoluteLocal(){let e=this.mixRotate,t=this.mixX,i=this.mixY,n=this.mixScaleX,r=this.mixScaleY,a=this.mixShearY,o=this.target,h=this.bones;for(let l=0,c=h.length;lt.data.name==e)??null}findTransformConstraint(e){if(!e)throw new Error("constraintName cannot be null.");return this.transformConstraints.find(t=>t.data.name==e)??null}findPathConstraint(e){if(!e)throw new Error("constraintName cannot be null.");return this.pathConstraints.find(t=>t.data.name==e)??null}findPhysicsConstraint(e){if(e==null)throw new Error("constraintName cannot be null.");return this.physicsConstraints.find(t=>t.data.name==e)??null}getBoundsRect(e){let t=new Fh,i=new Fh;return this.getBounds(t,i,void 0,e),{x:t.x,y:t.y,width:i.x,height:i.y}}getBounds(e,t,i=new Array(2),n=null){if(!e)throw new Error("offset cannot be null.");if(!t)throw new Error("size cannot be null.");let r=this.drawOrder,a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;for(let c=0,u=r.length;c=n.length&&(n.length=e+1),n[e]||(n[e]={}),n[e][t]=i}addSkin(e){for(let n=0;n= 0.");if(!t)throw new Error("name cannot be null.");if(!i)throw new Error("boneData cannot be null.");this.index=e,this.name=t,this.boneData=i}};var Vr;(function(s){s[s.Normal=0]="Normal",s[s.Additive=1]="Additive",s[s.Multiply=2]="Multiply",s[s.Screen=3]="Screen"})(Vr||(Vr={}));let mw=class extends Cu{constructor(t){super(t,0,!1);x(this,"bones",new Array);x(this,"_target",null);x(this,"mixRotate",0);x(this,"mixX",0);x(this,"mixY",0);x(this,"mixScaleX",0);x(this,"mixScaleY",0);x(this,"mixShearY",0);x(this,"offsetRotation",0);x(this,"offsetX",0);x(this,"offsetY",0);x(this,"offsetScaleX",0);x(this,"offsetScaleY",0);x(this,"offsetShearY",0);x(this,"relative",!1);x(this,"local",!1)}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},Cm=class{constructor(e){x(this,"scale",1);x(this,"attachmentLoader");x(this,"linkedMeshes",new Array);this.attachmentLoader=e}readSkeletonData(e){let t=this.scale,i=new Bh;i.name="";let n=new bR(e),r=n.readInt32(),a=n.readInt32();i.hash=a==0&&r==0?null:a.toString(16)+r.toString(16),i.version=n.readString(),i.x=n.readFloat(),i.y=n.readFloat(),i.width=n.readFloat(),i.height=n.readFloat(),i.referenceScale=n.readFloat()*t;let o=n.readBoolean();o&&(i.fps=n.readFloat(),i.imagesPath=n.readString(),i.audioPath=n.readString());let h=0;h=n.readInt(!0);for(let c=0;c>1&3,f.rotateMode=p>>3&3,(p&128)!=0&&(f.offsetRotation=n.readFloat()),f.position=n.readFloat(),f.positionMode==Ln.Fixed&&(f.position*=t),f.spacing=n.readFloat(),(f.spacingMode==ki.Length||f.spacingMode==ki.Fixed)&&(f.spacing*=t),f.mixRotate=n.readFloat(),f.mixX=n.readFloat(),f.mixY=n.readFloat(),i.pathConstraints.push(f)}h=n.readInt(!0);for(let c=0,u;c>4,e.readFloat())}n.push(T);break}}}}}let a=e.readInt(!0);if(a>0){let l=new gl(a),c=i.slots.length;for(let u=0;u=0;b--)p[b]=-1;let m=Ge.newArray(c-f,0),g=0,v=0;for(let b=0;b=0;b--)p[b]==-1&&(p[b]=m[--v]);l.setFrame(u,d,p)}n.push(l)}let o=e.readInt(!0);if(o>0){let l=new Ep(o);for(let c=0;c>>1^-(i&1)}readStringRef(){let e=this.readInt(!0);return e==0?null:this.strings[e-1]}readString(){let e=this.readInt(!0);switch(e){case 0:return null;case 1:return""}e--;let t="";for(let i=0;i>4){case 12:case 13:t+=String.fromCharCode((n&31)<<6|this.readByte()&63),i+=2;break;case 14:t+=String.fromCharCode((n&15)<<12|(this.readByte()&63)<<6|this.readByte()&63),i+=3;break;default:t+=String.fromCharCode(n),i++}}return t}readFloat(){let e=this.buffer.getFloat32(this.index);return this.index+=4,e}readBoolean(){return this.readByte()!=0}},wR=class{constructor(e,t,i,n,r){x(this,"parent");x(this,"skinIndex");x(this,"slotIndex");x(this,"mesh");x(this,"inheritTimeline");this.mesh=e,this.skinIndex=t,this.slotIndex=i,this.parent=n,this.inheritTimeline=r}},SR=class{constructor(e=null,t=null,i=0){x(this,"bones");x(this,"vertices");x(this,"length");this.bones=e,this.vertices=t,this.length=i}};var zn;(function(s){s[s.Region=0]="Region",s[s.BoundingBox=1]="BoundingBox",s[s.Mesh=2]="Mesh",s[s.LinkedMesh=3]="LinkedMesh",s[s.Path=4]="Path",s[s.Point=5]="Point",s[s.Clipping=6]="Clipping"})(zn||(zn={}));function qi(s,e,t){let i=s.readFloat(),n=s.readFloat()*t;for(let r=0,a=0,o=e.getFrameCount()-1;e.setFrame(r,i,n),r!=o;r++){let h=s.readFloat(),l=s.readFloat()*t;switch(s.readByte()){case Sn:e.setStepped(r);break;case Mn:Ft(s,e,a++,r,0,i,h,n,l,t)}i=h,n=l}return e}function Sf(s,e,t){let i=s.readFloat(),n=s.readFloat()*t,r=s.readFloat()*t;for(let a=0,o=0,h=e.getFrameCount()-1;e.setFrame(a,i,n,r),a!=h;a++){let l=s.readFloat(),c=s.readFloat()*t,u=s.readFloat()*t;switch(s.readByte()){case Sn:e.setStepped(a);break;case Mn:Ft(s,e,o++,a,0,i,l,n,c,t),Ft(s,e,o++,a,1,i,l,r,u,t)}i=l,n=c,r=u}return e}function Ft(s,e,t,i,n,r,a,o,h,l){e.setBezier(t,i,n,r,o,s.readFloat(),s.readFloat()*l,s.readFloat(),s.readFloat()*l,a,h)}const MR=0,_R=1,TR=2,AR=3,ER=4,CR=5,IR=6,RR=7,PR=8,kR=9,FR=10,OR=0,BR=1,LR=2,DR=3,NR=4,UR=5,XR=0,VR=1,YR=0,$R=1,GR=2,HR=0,jR=1,WR=2,zR=4,qR=5,KR=6,ZR=7,JR=8,Sn=1,Mn=2;class gs{constructor(){x(this,"convexPolygons",new Array);x(this,"convexPolygonsIndices",new Array);x(this,"indicesArray",new Array);x(this,"isConcaveArray",new Array);x(this,"triangles",new Array);x(this,"polygonPool",new kh(()=>new Array));x(this,"polygonIndicesPool",new kh(()=>new Array))}triangulate(e){let t=e,i=e.length>>1,n=this.indicesArray;n.length=0;for(let o=0;o3;){let o=i-1,h=0,l=1;for(;;){e:if(!r[h]){let d=n[o]<<1,f=n[h]<<1,p=n[l]<<1,m=t[d],g=t[d+1],v=t[f],b=t[f+1],y=t[p],w=t[p+1];for(let A=(l+1)%i;A!=o;A=(A+1)%i){if(!r[A])continue;let T=n[A]<<1,_=t[T],R=t[T+1];if(gs.positiveArea(y,w,m,g,_,R)&&gs.positiveArea(m,g,v,b,_,R)&&gs.positiveArea(v,b,y,w,_,R))break e}break}if(l==0){do{if(!r[h])break;h--}while(h>0);break}o=h,h=l,l=(l+1)%i}a.push(n[(i+h-1)%i]),a.push(n[h]),a.push(n[(h+1)%i]),n.splice(h,1),r.splice(h,1),i--;let c=(i+h-1)%i,u=h==i?0:h;r[c]=gs.isConcave(c,i,t,n),r[u]=gs.isConcave(u,i,t,n)}return i==3&&(a.push(n[2]),a.push(n[0]),a.push(n[1])),a}decompose(e,t){let i=e,n=this.convexPolygons;this.polygonPool.freeAll(n),n.length=0;let r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;let a=this.polygonIndicesPool.obtain();a.length=0;let o=this.polygonPool.obtain();o.length=0;let h=-1,l=0;for(let c=0,u=t.length;c0?(n.push(o),r.push(a)):(this.polygonPool.free(o),this.polygonIndicesPool.free(a)),o=this.polygonPool.obtain(),o.length=0,o.push(m),o.push(g),o.push(v),o.push(b),o.push(y),o.push(w),a=this.polygonIndicesPool.obtain(),a.length=0,a.push(d),a.push(f),a.push(p),l=gs.winding(m,g,v,b,y,w),h=d)}o.length>0&&(n.push(o),r.push(a));for(let c=0,u=n.length;c=0;c--)o=n[c],o.length==0&&(n.splice(c,1),this.polygonPool.free(o),a=r[c],r.splice(c,1),this.polygonIndicesPool.free(a));return n}static isConcave(e,t,i,n){let r=n[(t+e-1)%t]<<1,a=n[e]<<1,o=n[(e+1)%t]<<1;return!this.positiveArea(i[r],i[r+1],i[a],i[a+1],i[o],i[o+1])}static positiveArea(e,t,i,n,r,a){return e*(a-n)+i*(t-a)+r*(n-t)>=0}static winding(e,t,i,n,r,a){let o=i-e,h=n-t;return r*h-a*o+o*t-e*h>=0?1:-1}}class Lh{constructor(){x(this,"triangulator",new gs);x(this,"clippingPolygon",new Array);x(this,"clipOutput",new Array);x(this,"clippedVertices",new Array);x(this,"clippedUVs",new Array);x(this,"clippedTriangles",new Array);x(this,"scratch",new Array);x(this,"clipAttachment",null);x(this,"clippingPolygons",null)}clipStart(e,t){if(this.clipAttachment)return 0;this.clipAttachment=t;let i=t.worldVerticesLength,n=Ge.setArraySize(this.clippingPolygon,i);t.computeWorldVertices(e,0,i,n,0,2);let r=this.clippingPolygon;Lh.makeClockwise(r);let a=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r));for(let o=0,h=a.length;o>1,T=this.clipOutput,_=Ge.setArraySize(r,y+A*2);for(let P=0;P>1,q=this.clipOutput,W=Ge.setArraySize(l,D+V*f);for(let K=0;K>1,X=this.clipOutput,E=Ge.setArraySize(a,I+O*2),V=Ge.setArraySize(o,I+O*2);for(let W=0;W=2?(u=h,h=this.scratch):u=this.scratch,u.length=0,u.push(e),u.push(t),u.push(i),u.push(n),u.push(r),u.push(a),u.push(e),u.push(t),h.length=0;let d=o.length-4,f=o;for(let p=0;;p+=2){let m=f[p],g=f[p+1],v=m-f[p+2],b=g-f[p+3],y=h.length,w=u;for(let T=0,_=u.length-2;T<_;){let R=w[T],P=w[T+1];T+=2;let F=w[T],I=w[T+1],k=b*(m-F)>v*(g-I),B=b*(m-R)-v*(g-P);if(B>0){if(k){h.push(F),h.push(I);continue}let D=F-R,U=I-P,L=B/(D*b-U*v);if(L>=0&&L<=1)h.push(R+D*L),h.push(P+U*L);else{h.push(F),h.push(I);continue}}else if(k){let D=F-R,U=I-P,L=B/(D*b-U*v);if(L>=0&&L<=1)h.push(R+D*L),h.push(P+U*L),h.push(F),h.push(I);else{h.push(F),h.push(I);continue}}c=!0}if(y==h.length)return l.length=0,!0;if(h.push(h[0]),h.push(h[1]),p==d)break;let A=h;h=u,h.length=0,u=A}if(l!=h){l.length=0;for(let p=0,m=h.length-2;p>1;l0){let c=i.findPhysicsConstraint(o);if(!c)throw new Error("Physics constraint not found: "+o);l=i.physicsConstraints.indexOf(c)}for(let c in h){let u=h[c],d=u[0];if(!d)continue;let f=u.length;if(c=="reset"){const m=new Z1(f,l);for(let g=0;d!=null;d=u[g+1],g++)m.setFrame(g,re(d,"time",0));r.push(m);continue}let p;if(c=="inertia")p=new G1(f,f,l);else if(c=="strength")p=new H1(f,f,l);else if(c=="damping")p=new j1(f,f,l);else if(c=="mass")p=new W1(f,f,l);else if(c=="wind")p=new z1(f,f,l);else if(c=="gravity")p=new q1(f,f,l);else if(c=="mix")p=new K1(f,f,l);else continue;r.push(Ks(u,p,0,1))}}if(e.attachments)for(let o in e.attachments){let h=e.attachments[o],l=i.findSkin(o);if(!l)throw new Error("Skin not found: "+o);for(let c in h){let u=h[c],d=i.findSlot(c);if(!d)throw new Error("Slot not found: "+c);let f=d.index;for(let p in u){let m=u[p],g=l.getAttachment(f,p);for(let v in m){let b=m[v],y=b[0];if(y){if(v=="deform"){let w=g.bones,A=g.vertices,T=w?A.length/3*2:A.length,_=new N1(b.length,b.length,f,g),R=re(y,"time",0);for(let P=0,F=0;;P++){let I,k=re(y,"vertices",null);if(!k)I=w?Ge.newFloatArray(T):A;else{I=Ge.newFloatArray(T);let L=re(y,"offset",0);if(Ge.arrayCopy(k,0,I,L,k.length),n!=1)for(let N=L,O=N+k.length;N=0;v--)d[v]==-1&&(d[v]=p[--g])}o.setFrame(l,re(u,"time",0),d)}r.push(o)}if(e.events){let o=new Ep(e.events.length),h=0;for(let l=0;l"u"&&(Math.fround=(function(s){return function(e){return s[0]=e,s[0]}})(new Float32Array(1)));if(typeof window<"u"&&window.PIXI){let s=window.require;window.require=e=>{if(s)return s(e);if(e.startsWith("@pixi/"))return window.PIXI}}const Kn=class Kn extends uR{constructor(t){super(t.resource.source);x(this,"texture");this.texture=gt.from(t)}static from(t){return Kn.textureMap.has(t)?Kn.textureMap.get(t):new Kn(t)}setFilters(t,i){this.texture.baseTexture.scaleMode=Kn.toPixiTextureFilter(t),this.texture.baseTexture.mipmap=Kn.toPixiMipMap(t)}setWraps(t,i){this.texture.baseTexture.wrapMode=Kn.toPixiTextureWrap(t)}dispose(){this.texture.destroy()}static toPixiTextureFilter(t){switch(t){case Bi.Nearest:case Bi.MipMapNearestLinear:case Bi.MipMapNearestNearest:return sn.NEAREST;case Bi.Linear:case Bi.MipMapLinearLinear:case Bi.MipMapLinearNearest:return sn.LINEAR;default:throw new Error(`Unknown texture filter: ${String(t)}`)}}static toPixiMipMap(t){switch(t){case Bi.Nearest:case Bi.Linear:return Ys.OFF;case Bi.MipMapNearestLinear:case Bi.MipMapNearestNearest:case Bi.MipMapLinearLinear:case Bi.MipMapLinearNearest:return Ys.ON;default:throw new Error(`Unknown texture filter: ${String(t)}`)}}static toPixiTextureWrap(t){switch(t){case ur.ClampToEdge:return an.CLAMP;case ur.MirroredRepeat:return an.MIRRORED_REPEAT;case ur.Repeat:return an.REPEAT;default:throw new Error(`Unknown texture wrap: ${String(t)}`)}}static toPixiBlending(t){switch(t){case Vr.Normal:return dt.NORMAL;case Vr.Additive:return dt.ADD;case Vr.Multiply:return dt.MULTIPLY;case Vr.Screen:return dt.SCREEN;default:throw new Error(`Unknown blendMode: ${String(t)}`)}}};x(Kn,"textureMap",new Map);let La=Kn;const Zn=class Zn extends Ll{constructor(){const t=new Sp;t.getBuffer("aVertexPosition").static=!1,t.getBuffer("aTextureCoord").static=!1;const i=new Ch(gt.EMPTY);super(t,i);x(this,"name","");x(this,"warnedTwoTint",!1)}updateFromSpineData(t,i,n,r,a,o,h,l){var v,b;this.texture=t.texture;const c=a/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((v=u.data)==null?void 0:v.length)!==c&&(u.data=new Float32Array(c));const d=this.geometry.getBuffer("aVertexPosition");((b=d.data)==null?void 0:b.length)!==c&&(d.data=new Float32Array(c));let f=0,p=u.data,m=d.data;for(let y=0;y0?`text-shadow: ${r} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${r} ${e}`}reset(){Object.assign(this,ao.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=We.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};Sm.availableFonts={},Sm.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let ff=Sm;const Tc=class oo extends Zr{constructor(e="",t={}){super(gt.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const i=new Image,n=gt.from(i,{scaleMode:We.SCALE_MODE,resourceOptions:{autoLoad:!1}});n.orig=new Tt,n.trim=new Tt,this.texture=n;const r="http://www.w3.org/2000/svg",a="http://www.w3.org/1999/xhtml",o=document.createElementNS(r,"svg"),h=document.createElementNS(r,"foreignObject"),l=document.createElementNS(a,"div"),c=document.createElementNS(a,"style");h.setAttribute("width","10000"),h.setAttribute("height","10000"),h.style.overflow="hidden",o.appendChild(h),this.maxWidth=oo.defaultMaxWidth,this.maxHeight=oo.defaultMaxHeight,this._domElement=l,this._styleElement=c,this._svgRoot=o,this._foreignObject=h,this._foreignObject.appendChild(c),this._foreignObject.appendChild(l),this._image=i,this._loadImage=new Image,this._autoResolution=oo.defaultAutoResolution,this._resolution=oo.defaultResolution??We.RESOLUTION,this.text=e,this.style=t}measureText(e){var c,u;const{text:t,style:i,resolution:n}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(n)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const r=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:a,height:o}=r;(a>this.maxWidth||o>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const h=Math.min(this.maxWidth,Math.ceil(a)),l=Math.min(this.maxHeight,Math.ceil(o));return this._svgRoot.setAttribute("width",h.toString()),this._svgRoot.setAttribute("height",l.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:(c=this._style)==null?void 0:c.toCSS(n)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:h+i.padding*2,height:l+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:n}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:r,height:a}=this.measureText();i.width=n.width=Math.ceil(Math.max(1,r)),i.height=n.height=Math.ceil(Math.max(1,a)),this._updateID++;const o=this._updateID;await new Promise(h=>{n.onload=async()=>{if(o/gi,"
").replace(/
/gi,"
").replace(/ /gi," ")}};Tc.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0},Tc.defaultMaxWidth=2024,Tc.defaultMaxHeight=2024,Tc.defaultAutoResolution=!0;function Rh(s,e){const t=Math.max(0,Number(s)||0),i=Math.max(0,Number(e)||0);return{inner:Math.min(t,i),outer:Math.max(t,i)}}function ub(s){const e=Math.max(0,Number(s.outerRectW)||0),t=Math.max(0,Number(s.outerRectH)||0);return{innerW:Math.min(e,Math.max(0,Number(s.innerRectW)||0)),innerH:Math.min(t,Math.max(0,Number(s.innerRectH)||0)),outerW:e,outerH:t}}function RI(s,e,t,i,n){if(s==="random")return n();const r=Math.max(1,Math.round(t)),a=Math.max(0,Math.round(e))%r;return i?a/r:r<=1?.5:a/(r-1)}function Rv(s,e,t,i){const n=Math.sqrt(s*s+i()*(e*e-s*s));return{x:Math.cos(t)*n,y:-Math.sin(t)*n,radialAngle:-t*180/Math.PI}}function PI(s,e){const{innerW:t,innerH:i,outerW:n,outerH:r}=ub(s),a=Math.max(0,(n-t)/2),o=Math.max(0,(r-i)/2),h=a*r,l=t*o,c=h*2+l*2;if(c<=0){const p=n*2+r*2;if(p<=0)return{x:0,y:0,radialAngle:0};let m=e()*p,g,v;return mtypeof B=="object"&&B!==null?{...B}:B):k);i&&(s.innerRadius=0,s.outerRadius=Math.max(0,Number.isFinite(n)?n:e.outerRadius),s.innerRectW=0,s.innerRectH=0,s.outerRectW=Math.max(0,Number.isFinite(r)?r:e.outerRectW),s.outerRectH=Math.max(0,Number.isFinite(a)?a:e.outerRectH),s.coneDirection=Number.isFinite(o)?o:90,s.emissionAngleMode=Number.isFinite(h)&&h>0?"random":"fixed",l==="cone"&&(s.spread=Math.max(0,Number(s.coneAngle)||0)),s.shapeRangeVersion=1),s.shape==="orbit"&&(s.shape="path"),["fixed","random","radial","path-normal","path-tangent"].includes(s.emissionAngleMode)||(s.emissionAngleMode="fixed"),!["circle","rect","cone"].includes(s.shape)&&s.emissionAngleMode==="radial"&&(s.emissionAngleMode="fixed"),s.shape!=="path"&&(s.emissionAngleMode==="path-normal"||s.emissionAngleMode==="path-tangent")&&(s.emissionAngleMode="fixed"),s.spawnPathId=Math.max(0,Math.round(Number(s.spawnPathId)||0)),s.spawnPathDistribution!=="fixed"&&s.spawnPathDistribution!=="random"&&(s.spawnPathDistribution="fixed"),s.innerRadius=Math.max(0,Number(s.innerRadius)||0),s.outerRadius=Math.max(s.innerRadius,Number(s.outerRadius)||0),s.innerRectW=Math.max(0,Number(s.innerRectW)||0),s.innerRectH=Math.max(0,Number(s.innerRectH)||0),s.outerRectW=Math.max(s.innerRectW,Number(s.outerRectW)||0),s.outerRectH=Math.max(s.innerRectH,Number(s.outerRectH)||0);const P=Array.from(new Set((Array.isArray(s.collisionColliderIds)?s.collisionColliderIds:[]).map(I=>Math.round(Number(I))).filter(I=>Number.isFinite(I)&&I>0)));(P.length!==s.collisionColliderIds.length||P.some((I,k)=>I!==s.collisionColliderIds[k]))&&(s.collisionColliderIds=P),s.streamBehavior!=="normal"&&s.streamBehavior!=="loop"&&(s.streamBehavior="normal"),(u||!Number.isFinite(s.loopDurationFrames))&&(s.loopDurationFrames=Math.ceil(Math.max(1/30,Number(s.duration)||1)*30)),s.loopDurationFrames=Math.min(1800,Math.max(1,Math.ceil(s.loopDurationFrames))),typeof s.generateLoopStartAnimation!="boolean"&&(s.generateLoopStartAnimation=!1),typeof s.generateLoopEndAnimation!="boolean"&&(s.generateLoopEndAnimation=!1),typeof s.loopStartUseCustomDuration!="boolean"&&(s.loopStartUseCustomDuration=!1),typeof s.loopEndUseCustomDuration!="boolean"&&(s.loopEndUseCustomDuration=!1),s.loopStartDurationFrames=Math.min(1800,Math.max(1,Math.ceil(Number(s.loopStartDurationFrames)||30))),s.loopEndDurationFrames=Math.min(1800,Math.max(1,Math.ceil(Number(s.loopEndDurationFrames)||30))),(!Array.isArray(s.imageResources)||s.imageResources.length===0)&&(s.imageResources=Dl().imageResources);for(const I of s.imageResources){!I.texture&&s.texture&&(I.texture=s.texture),I.textureName||(I.textureName="star"),I.previewUrl==="/particles/star.png"&&(I.previewUrl="/images/star.png"),I.previewUrl||(I.previewUrl=I.textureName==="star"?"/images/star.png":""),I.imageMode!=="fixed"&&I.imageMode!=="sequence"&&(I.imageMode="fixed"),I.sequencePlayback==="once"?I.sequencePlayback="once-hold":I.sequencePlayback==="loop"?I.sequencePlayback="loop-forward":["once-hide","once-hold","loop-forward","loop-reverse"].includes(I.sequencePlayback)||(I.sequencePlayback="loop-forward"),Number.isFinite(I.sequenceFps)||(I.sequenceFps=30),I.sequenceFps=Math.min(120,Math.max(1,Number(I.sequenceFps)||30)),Array.isArray(I.sequenceFrames)||(I.sequenceFrames=[]);for(const k of I.sequenceFrames)typeof k.name!="string"&&(k.name=""),typeof k.previewUrl!="string"&&(k.previewUrl=""),k.texture===void 0&&(k.texture=null);Number.isFinite(I.weight)||(I.weight=100),typeof I.locked!="boolean"&&(I.locked=!1),Number.isFinite(I.scale)||(I.scale=1),Number.isFinite(I.anchorX)||(I.anchorX=.5),Number.isFinite(I.anchorY)||(I.anchorY=.5),I.colorMode!=="fixed"&&I.colorMode!=="random"&&I.colorMode!=="lifetime"&&(I.colorMode=s.colorOverLife?"lifetime":"fixed"),I.colorStart||(I.colorStart=s.colorStart||"#ffffff"),I.colorEnd||(I.colorEnd=s.colorEnd||I.colorStart),(!Array.isArray(I.colorGradient)||I.colorGradient.length<2)&&(I.colorGradient=[{position:0,color:I.colorStart},{position:1,color:I.colorEnd}]),Object.prototype.hasOwnProperty.call(Rr,I.blend)||(I.blend=s.blend||"normal"),["off","fixed","curve"].includes(I.independentAlpha)||(I.independentAlpha=s.independentAlpha||"off"),Number.isFinite(I.alpha)||(I.alpha=Number.isFinite(s.alphaScale)?s.alphaScale:1),["跟随导出","线性","贝塞尔"].includes(I.alphaCurveMode)||(I.alphaCurveMode=s.curveMode||"跟随导出"),(!Array.isArray(I.alphaCurve)||I.alphaCurve.length<2)&&(I.alphaCurve=(s.alphaCurve||[{x:0,y:1},{x:1,y:1}]).map(k=>({...k})))}if(s.imageResources.length===1)s.imageResources[0].weight=100,s.imageResources[0].locked=!1;else if(c){const I=100/s.imageResources.length;s.imageResources.forEach((k,B)=>{k.weight=B===s.imageResources.length-1?100-I*(s.imageResources.length-1):I,k.locked=!1})}if(s.imageWeightVersion=1,d){const I=Number.isFinite(f)&&f!==0?f:980;s.gravity=I,s.gravityMin=I,s.gravityMax=I}if(p){const I=Number.isFinite(m)&&Number.isFinite(g)&&(m!==0||g!==0);s.windMin=I?Math.hypot(m,g):100,s.windMax=s.windMin,s.windDirection=I?Math.atan2(-g,m)*180/Math.PI:0}v&&(s.forceStrength=Number.isFinite(b)&&b!==0?b:10),y&&(s.trailConfigVersion=3,s.trailAlphaCurve=[{x:0,y:1},{x:1,y:1}],s.trailLifeLengthCurve=[{x:0,y:1},{x:1,y:1}],s.trailShapeCurve=[{x:0,y:1},{x:1,y:1}],s.trailGridRows=4,s.trailGridCols=4),(w||!s.trailResources.length)&&(s.trailResources=[{id:1,texture:T||null,textureName:_,previewUrl:R,weight:100,locked:!1,rotation:0,colorMode:s.trailColorMode,color:s.trailColor,colorGradient:s.trailColorGradient.map(I=>({...I})),blend:"normal",alphaMode:s.trailAlphaMode,alpha:s.trailAlpha,alphaCurve:s.trailAlphaCurve.map(I=>({...I})),boneCount:s.trailBoneCount,trailRatio:100,lengthMode:"fixed",length:s.trailLength,lengthMin:s.trailLength,lengthMax:s.trailLength,widthSizeMode:"fixed",width:s.trailWidth,widthMin:s.trailWidth,widthMax:s.trailWidth,widthMode:s.trailWidthMode,lifeLengthEnabled:s.trailLifeLengthEnabled,lifeLengthCurve:s.trailLifeLengthCurve.map(I=>({...I})),shapeEnabled:s.trailShapeEnabled,shapeCurve:s.trailShapeCurve.map(I=>({...I}))}]);for(const I of s.trailResources)I.textureName||(I.textureName="trail"),I.previewUrl==="/trails/trail.png"&&(I.previewUrl="/images/trail.png"),I.previewUrl||(I.previewUrl="/images/trail.png"),Number.isFinite(I.weight)||(I.weight=100),typeof I.locked!="boolean"&&(I.locked=!1),Number.isFinite(I.rotation)||(I.rotation=0),["particle","fixed","curve"].includes(I.colorMode)||(I.colorMode=s.trailColorMode||"particle"),I.color||(I.color=s.trailColor||"#ffffff"),(!Array.isArray(I.colorGradient)||I.colorGradient.length<2)&&(I.colorGradient=(s.trailColorGradient||[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}]).map(k=>({...k}))),Object.prototype.hasOwnProperty.call(Rr,I.blend)||(I.blend="normal"),["particle","fixed","curve"].includes(I.alphaMode)||(I.alphaMode=s.trailAlphaMode||"particle"),Number.isFinite(I.alpha)||(I.alpha=Number.isFinite(s.trailAlpha)?s.trailAlpha:1),(!Array.isArray(I.alphaCurve)||I.alphaCurve.length<2)&&(I.alphaCurve=(s.trailAlphaCurve||[{x:0,y:1},{x:1,y:1}]).map(k=>({...k}))),Number.isFinite(I.boneCount)||(I.boneCount=Number.isFinite(s.trailBoneCount)?s.trailBoneCount:3),Number.isFinite(I.trailRatio)||(I.trailRatio=100),I.trailRatio=Math.min(100,Math.max(0,I.trailRatio)),["fixed","random"].includes(I.lengthMode)||(I.lengthMode="fixed"),Number.isFinite(I.length)||(I.length=Number.isFinite(s.trailLength)?s.trailLength:100),Number.isFinite(I.lengthMin)||(I.lengthMin=I.length),Number.isFinite(I.lengthMax)||(I.lengthMax=I.length),["fixed","random"].includes(I.widthSizeMode)||(I.widthSizeMode="fixed"),Number.isFinite(I.width)||(I.width=Number.isFinite(s.trailWidth)?s.trailWidth:100),Number.isFinite(I.widthMin)||(I.widthMin=I.width),Number.isFinite(I.widthMax)||(I.widthMax=I.width),["particle","fixed"].includes(I.widthMode)||(I.widthMode=s.trailWidthMode||"particle"),typeof I.lifeLengthEnabled!="boolean"&&(I.lifeLengthEnabled=!!s.trailLifeLengthEnabled),(!Array.isArray(I.lifeLengthCurve)||I.lifeLengthCurve.length<2)&&(I.lifeLengthCurve=(s.trailLifeLengthCurve||[{x:0,y:1},{x:1,y:1}]).map(k=>({...k}))),typeof I.shapeEnabled!="boolean"&&(I.shapeEnabled=!!s.trailShapeEnabled),(!Array.isArray(I.shapeCurve)||I.shapeCurve.length<2)&&(I.shapeCurve=(s.trailShapeCurve||[{x:0,y:1},{x:1,y:1}]).map(k=>({...k})));if(s.trailResources.length===1&&(s.trailResources[0].weight=100,s.trailResources[0].locked=!1),A)for(const I of s.trailResources)I.alphaCurve=((F=I.alphaCurve)==null?void 0:F.length)>=2?I.alphaCurve:[{x:0,y:1},{x:1,y:1}];return s.trailResourceVersion=6,s}const Rr={normal:0,add:1,multiply:2,screen:3},OI=400;class BI extends ji{constructor(t,i=OI){super();x(this,"pool",[]);x(this,"cfg");x(this,"accumulator",0);x(this,"burstTimer",0);x(this,"_spawnSerial",0);x(this,"_elapsed",0);x(this,"_attractionEnabledAt",0);x(this,"_attractionWasEnabled",!1);x(this,"_emitterPos",null);x(this,"states",[]);x(this,"rng",Math.random);x(this,"_lastSeed",-1);x(this,"trailDebugGfx",new ys);x(this,"colliders",[]);x(this,"followSpawnX",0);x(this,"followSpawnY",0);x(this,"followSpawnAngle",0);x(this,"spawnPathSampler",null);x(this,"spawnPathClosed",!1);x(this,"followExportCurveMode","线性");x(this,"simulationTransform",null);this.cfg=Wr(t),this._ensurePool(i),this.addChild(this.trailDebugGfx)}setFollowExportCurveMode(t){this.followExportCurveMode=t}resolveCurveMode(t){return t==="跟随导出"?this.followExportCurveMode:t}reseed(){const t=this.cfg.seed;t!==this._lastSeed&&(this._lastSeed=t,this.rng=pf(t>>>0))}_ensurePool(t){for(;this.pool.length=n.delay),a=i==="force"||i==="normal"&&(n.mode==="burst"||this._elapsed=1;)this.accumulator-=1,this.spawnOne();else this.burstTimer+=t,n.burstLoop?this.burstTimer>=1&&(this.burstTimer=0,this.emitBurst()):t>0&&this.burstTimer<=t&&this.emitBurst();const o=[];for(let p=0;p0){const O=Math.max(1e-4,Math.abs(n.rootScaleX)),X=Math.max(1e-4,Math.abs(n.rootScaleY)),E=-(((h=this.simulationTransform)==null?void 0:h.rotation)??n.rootRotation)*Math.PI/180,V=Math.cos(E),q=Math.sin(E),W=((l=this.simulationTransform)==null?void 0:l.centerX)??n.centerX,J=((c=this.simulationTransform)==null?void 0:c.centerY)??n.centerY,K=W+V*O*m.x-q*X*m.y,fe=-J+q*O*m.x+V*X*m.y,me=K,we=-fe,Ee=n.forceCenterX-me,pe=n.forceCenterY-we,Ae=Math.hypot(Ee,pe);if(Ae>1e-4&&Ae<=n.forceRadius){let G=1;n.forceFalloff==="linear"?G=1-Ae/n.forceRadius:n.forceFalloff==="inverse"&&(G=Math.min(10,n.forceRadius/Math.max(Ae,n.forceRadius*.1)));const Z=n.forceStrength*G*10,z=Ee/Ae*Z,j=pe/Ae*Z,te=z,he=-j;m.vx+=(V*te+q*he)/O*t,m.vy+=(-q*te+V*he)/X*t}}if(!m.collisionPaused&&n.damping>0){const O=Math.max(0,1-n.damping*t);m.vx*=O,m.vy*=O}if(m.collisionPaused)m.vx=0,m.vy=0;else if(m.x+=m.vx*t,m.y+=m.vy*t,this.applyColliders(m,p))continue;if(n.attraction&&!m.collisionPaused){const O=m.maxLife-m.life;if(n.attractionDelayMode==="particle"?O>=Math.max(0,n.attractionDelay):this._elapsed-this._attractionEnabledAt>=Math.max(0,n.attractionDelay)){const E=Za(n,m.x,m.y,this.simulationTransform),V=n.attractionCenterX,q=n.attractionCenterY,W=Math.max(0,n.attractionRadius);if(!m.attractionActive){if(Math.hypot(V-E.x,q-E.y)<=W){this.kill(p);continue}m.attractionActive=!0,m.attractionElapsed=0,m.attractionStartWorldX=E.x,m.attractionStartWorldY=E.y}m.attractionElapsed+=t;const J=Math.max(1e-4,n.attractionDuration),K=Math.min(1,m.attractionElapsed/J);let fe=Vi(m.attractionStartWorldX,V,K),me=Vi(m.attractionStartWorldY,q,K);if(n.attractionPath==="curve"){const pe=V-m.attractionStartWorldX,Ae=q-m.attractionStartWorldY,G=Math.hypot(pe,Ae);if(G>1e-4){const Z=G*.25*m.attractionCurveSide,z=(m.attractionStartWorldX+V)*.5-Ae/G*Z,j=(m.attractionStartWorldY+q)*.5+pe/G*Z,te=1-K;fe=te*te*m.attractionStartWorldX+2*te*K*z+K*K*V,me=te*te*m.attractionStartWorldY+2*te*K*j+K*K*q}}const we=Math.hypot(V-fe,q-me);if(K>=1||we<=W){this.kill(p);continue}const Ee=Pv(n,fe,me,this.simulationTransform);m.x=Ee.x,m.y=Ee.y,m.vx=0,m.vy=0}}const v=g,b=m.sprite,y=n.imageResources.find(O=>O.id===m.resourceId);if(y){const O=this.imageFrameState(y,m.maxLife-m.life);m.imageFrameIndex=O.index,b.texture=this.imageFrameTexture(y,m.imageFrameIndex),b.visible=O.visible}if(n.speedOverLifeEnabled){const O=Ac(mf(n.speedOverLifeMode,n.speedOverLifeMin,n.speedOverLifeMax,n.speedOverLifeCurve,v,m.speedScaleTarget),1),X=m.speedScale===0?O:O/m.speedScale;m.vx*=X,m.vy*=X,m.speedScale=O}let w=m.rotationSpeed;n.rotationOverLifeEnabled&&n.rotationOverLifeMode==="curve"&&(w=Vi(n.rotationSpeedMin,n.rotationSpeedMax,wn(n.rotationOverLifeCurve,v))),m.rotation+=w*t;let A=m.x,T=m.y;if(n.noise&&n.noiseAmt>0&&n.noiseRange>0&&n.noiseSpeed>0){const O=m.maxLife-m.life,X=Math.max(0,n.noiseRange)*Math.min(1,Math.max(0,n.noiseAmt)/100)*.5,E=O*Math.max(0,n.noiseSpeed)*Math.PI*2;A+=(Math.sin(m.noisePhaseX+E)-Math.sin(m.noisePhaseX))*X,T+=(Math.sin(m.noisePhaseY+E*.83)-Math.sin(m.noisePhaseY))*X}b.x=A,b.y=T,b.rotation=-m.rotation*Math.PI/180;let _=1,R=1;n.scaleOverLifeEnabled&&(_=mf(n.scaleOverLifeMode,n.scaleOverLifeMin,n.scaleOverLifeMax,n.scaleOverLifeCurve,v,m.scaleOverLifeX),R=n.scaleOverLifeAxisMode==="separate"?mf(n.scaleOverLifeMode,n.scaleYOverLifeMin,n.scaleYOverLifeMax,n.scaleYOverLifeCurve,v,m.scaleOverLifeY):_),b.scale.set(Ac(m.scaleStartX*_,1),Ac(m.scaleStartY*R,1));const P=n.alphaMode==="curve"?wn(n.alphaCurve,v,this.resolveCurveMode(n.curveMode))*n.alphaScale:n.alpha*n.alphaScale;b.alpha=Ac((y==null?void 0:y.independentAlpha)==="fixed"?y.alpha:(y==null?void 0:y.independentAlpha)==="curve"?wn(y.alphaCurve,v,this.resolveCurveMode(y.alphaCurveMode)):P,1);const F=(y==null?void 0:y.colorStart)||"#ffffff",I=(y==null?void 0:y.colorMode)==="lifetime"?gf(y.colorGradient,v):(y==null?void 0:y.colorMode)==="random"?m.colorSample:Mo(F);b.tint=I,b.blendMode=Rr[(y==null?void 0:y.blend)||"normal"];const k=this.updateTrail(m,A,T,v,b),B=Za(n,A,T,this.simulationTransform),D=((u=this.simulationTransform)==null?void 0:u.rotation)??n.rootRotation,U=Math.abs(((d=this.simulationTransform)==null?void 0:d.scaleX)??n.rootScaleX),L=Math.abs(((f=this.simulationTransform)==null?void 0:f.scaleY)??n.rootScaleY),N=k?{...k,bones:k.bones.map(O=>{const X=Za(n,O.x,O.y,this.simulationTransform);return{...O,worldX:X.x,worldY:X.y,worldRotation:D-O.rotation}})}:void 0;o.push({boneName:m.boneName,spawnId:m.spawnId,x:A,y:T,rotation:m.rotation,scaleX:b.scale.x,scaleY:b.scale.y,worldX:B.x,worldY:B.y,worldRotation:D+m.rotation,worldScaleX:b.scale.x*U,worldScaleY:b.scale.y*L,alpha:b.alpha,colorHex:I,resourceId:m.resourceId,imageFrameIndex:m.imageFrameIndex,imageVisible:b.visible,trailState:N,active:!0})}return this.states=o,o}ensureTrailMesh(t){const i=this.cfg,n=i.trailResources.find(g=>g.id===t.trailResourceId)||i.trailResources[0],r=(n==null?void 0:n.texture)||gt.EMPTY,a=Number(n==null?void 0:n.rotation)||0,o=Math.max(2,Math.min(16,Math.round(i.trailGridRows))),h=Math.max(2,Math.min(32,Math.round(i.trailGridCols))),l=Math.max(2,Math.min(16,Math.round((n==null?void 0:n.boneCount)??3))),c=`${o}:${h}:${l}:${(n==null?void 0:n.id)??0}:${a}`;if(t.trailMesh&&t.trailMeshSignature===c)return t.trailMesh.texture!==r&&(t.trailMesh.texture=r),t.trailMesh;t.trailMesh&&(this.removeChild(t.trailMesh),t.trailMesh.destroy()),t.trailMeshSignature&&t.trailMeshSignature!==c&&(t.trailHistory.length=0,t.trailBones.length=0);const u=new Float32Array(o*h*2),d=new Float32Array(o*h*2),f=[],p=[];for(let g=0;g.05?t.trailHistory.unshift({x:i,y:n}):(a.x=i,a.y=n);const o=Math.max(1,r)*1.5;let h=0,l=t.trailHistory.length;for(let c=1;c=o||c>=239){l=c+1;break}t.trailHistory.length>l&&(t.trailHistory.length=l)}sampleTrailBones(t,i,n){const r=Math.max(2,Math.min(16,Math.round(n))),a=t.trailHistory,o=[];if(!a.length)return o;let h=0;for(let c=1;c=u&&v>1e-4){const b=(u-d)/v;f={x:Vi(m.x,g.x,b),y:Vi(m.y,g.y,b)};break}d+=v}o.push({boneName:`${t.boneName}_trail_${c}`,x:f.x,y:f.y,rotation:0})}for(let c=0;c1){const c=o[0].rotation,d=(o[o.length-1].rotation-c+540)%360-180;for(let f=0;fu.id===i.resourceId)||r.trailResources[0];if(!(a!=null&&a.texture)||i.bones.length<2){n.visible=!1;return}t.trailResourceId=a.id,n.texture!==a.texture&&(n.texture=a.texture);const o=Math.max(2,Math.min(16,Math.round(r.trailGridRows))),h=Math.max(2,Math.min(32,Math.round(r.trailGridCols))),l=n.vertices,c=[];for(let u=0;u.5&&i.alpha>0}updateTrail(t,i,n,r,a){const o=this.cfg;if(!o.trail||!t.trailEnabled||t.trailSampledLength<=0||t.trailSampledWidth<=0){t.trailHistory.length=0,t.trailBones.length=0,t.trailMesh&&(t.trailMesh.visible=!1);return}this.ensureTrailMesh(t);const h=o.trailResources.find(f=>f.id===t.trailResourceId)||o.trailResources[0];this.appendTrailPoint(t,i,n,t.trailSampledLength);const l=h!=null&&h.lifeLengthEnabled?Math.max(0,wn(h.lifeLengthCurve,r)):1,c=Math.max(0,t.trailSampledLength)*l;t.trailBones=this.sampleTrailBones(t,c,(h==null?void 0:h.boneCount)??3),t.trailBones[0]&&(t.trailBones[0].x=i,t.trailBones[0].y=n);const u=(h==null?void 0:h.widthMode)==="particle"?(Math.abs(a.scale.x)+Math.abs(a.scale.y))*.5:1;t.trailCurrentWidth=Math.max(0,t.trailSampledWidth)*u,t.trailCurrentAlpha=(h==null?void 0:h.alphaMode)==="particle"?a.alpha:(h==null?void 0:h.alphaMode)==="curve"?wn(h.alphaCurve,r):(h==null?void 0:h.alpha)??1,t.trailCurrentColor=(h==null?void 0:h.colorMode)==="particle"?a.tint:(h==null?void 0:h.colorMode)==="curve"?gf(h.colorGradient,r):Mo((h==null?void 0:h.color)||"#ffffff");const d={bones:t.trailBones.map(f=>({...f})),activeBoneCount:t.trailBones.length,width:t.trailCurrentWidth,alpha:Math.min(1,Math.max(0,t.trailCurrentAlpha)),colorHex:t.trailCurrentColor,resourceId:t.trailResourceId};return this.skinTrailMesh(t,d),d}drawTrailMeshDebug(t){const i=this.trailDebugGfx;if(i.clear(),!t||!this.cfg.trail)return;const n=Math.max(2,Math.min(16,Math.round(this.cfg.trailGridRows))),r=Math.max(2,Math.min(32,Math.round(this.cfg.trailGridCols)));i.lineStyle(1,3790847,.72);for(const a of this.pool){const o=a.trailMesh;if(!(o!=null&&o.visible))continue;const h=o.vertices,l=(c,u)=>{const d=(c*n+u)*2;return{x:h[d],y:h[d+1]}};for(let c=0;c0&&this.spawnPathSampler){const o=this.estimatedEmissionCount(),h=RI(t.spawnPathDistribution,this._spawnSerial,o,this.spawnPathClosed,this.rng),l=this.spawnPathSampler(h);if(l)return{...this.applyFollowToOrigin(l.x+i,l.y+n),radialAngle:0,pathAngle:l.angle}}const r=kI(t,this.rng);return{...this.applyFollowToOrigin(i+r.x,n+r.y),radialAngle:r.radialAngle}}estimatedEmissionCount(){const t=this.cfg;return t.mode==="burst"?Math.max(1,Math.round(t.burstCount)):Math.max(1,Math.floor(t.rate*(t.streamBehavior==="loop"?Math.max(1,t.loopDurationFrames)/30:Math.max(0,t.duration))))}applyFollowToOrigin(t,i){const n=this.followSpawnAngle*Math.PI/180,r=Math.cos(n),a=Math.sin(n);return{x:this.followSpawnX+r*t-a*i,y:this.followSpawnY+a*t+r*i}}spawnOne(){const t=this.cfg;let i=this.pool.findIndex(w=>!w.active);if(i===-1)return;const n=this.spawnOrigin(),{x:r,y:a}=n,o=Ja(t.lifeMode,t.lifeMin,t.lifeMax,t.lifeCurve,this.rng()),h=Ja(t.speedMode,t.speedMin,t.speedMax,t.speedCurve,this.rng()),l=FI(t,n,this.followSpawnAngle,this.rng),c=this.pool[i],u=this.pickImageResource(),d=this._spawnSerial++;c.spawnId=d;const f=this.pickTrailResource(ca(t.seed,d,1540483477));c.noisePhaseX=ca(t.seed,d,1757159915)*Math.PI*2,c.noisePhaseY=ca(t.seed,d,48610963)*Math.PI*2,c.gravityStrength=t.useGravity&&t.gravityMode==="random"?Vi(t.gravityMin,t.gravityMax,this.rng()):t.gravityMin,c.windStrength=t.wind&&t.windMode==="random"?Vi(t.windMin,t.windMax,this.rng()):t.windMin,c.attractionActive=!1,c.attractionElapsed=0,c.collisionPaused=!1,c.attractionCurveSide=ca(t.seed,d,2738958700)<.5?-1:1,c.trailHistory.length=0,c.trailBones.length=0,c.trailCurrentWidth=0,c.trailCurrentAlpha=0,c.trailCurrentColor=16777215,c.trailResourceId=f.id;const p=Math.min(100,Math.max(0,Number(f.trailRatio)||0)),m=t.mode==="burst"?Math.max(0,Math.round(t.burstCount)):Math.max(0,Math.floor(t.rate*(t.streamBehavior==="loop"?Math.max(1,t.loopDurationFrames)/30:Math.max(0,t.duration)))),g=p>0&&m===1&&d===0,v=ca(t.seed,d,668265261)*100,b=(w,A,T,_,R)=>{if(w!=="random")return Math.max(0,Number(A)||0);const P=Math.max(0,Math.min(Number(T)||0,Number(_)||0)),F=Math.max(0,Math.max(Number(T)||0,Number(_)||0));return Vi(P,F,ca(t.seed,d,R))};c.trailSampledLength=b(f.lengthMode,f.length,f.lengthMin,f.lengthMax,374761393),c.trailSampledWidth=b(f.widthSizeMode,f.width,f.widthMin,f.widthMax,3550635116),c.trailEnabled=t.trail&&(g||v0&&c.trailSampledWidth>0,c.trailMesh&&(c.trailMesh.visible=!1),c.active=!0,c.life=o,c.maxLife=o,c.x=r,c.y=a,c.trailEnabled&&c.trailHistory.push({x:r,y:a}),c.vx=Math.cos(l)*h,c.vy=Math.sin(l)*h,c.scaleStartX=Ja(t.scaleMode,t.scaleMin,t.scaleMax,t.scaleCurve,this.rng())*u.scale,c.scaleStartY=t.scaleAxisMode==="separate"?Ja(t.scaleMode,t.scaleYMin,t.scaleYMax,t.scaleYCurve,this.rng())*u.scale:c.scaleStartX,c.alphaStart=t.alpha,c.alphaEnd=t.alphaEnd,c.rotation=t.initialRotationMode==="direction"?-Math.atan2(c.vy,c.vx)*180/Math.PI+t.initialRotationMin:Ja(t.initialRotationMode,t.initialRotationMin,t.initialRotationMax,t.initialRotationCurve,this.rng()),c.rotationSpeed=t.rotationOverLifeEnabled?Ja(t.rotationOverLifeMode,t.rotationSpeedMin,t.rotationSpeedMax,t.rotationOverLifeCurve,this.rng()):0,c.speedScale=1,c.speedScaleTarget=t.speedOverLifeMode==="random"?Vi(t.speedOverLifeMin,t.speedOverLifeMax,this.rng()):t.speedOverLifeMin,c.scaleOverLifeX=t.scaleOverLifeMode==="random"?Vi(t.scaleOverLifeMin,t.scaleOverLifeMax,this.rng()):t.scaleOverLifeMin,c.scaleOverLifeY=t.scaleOverLifeMode==="random"?Vi(t.scaleYOverLifeMin,t.scaleYOverLifeMax,this.rng()):t.scaleYOverLifeMin,c.resourceId=u.id,c.colorSample=u.colorMode==="random"?gf(u.colorGradient,ca(t.seed,d,2654435769)):Mo(u.colorStart);const y=this.imageFrameState(u,0);c.imageFrameIndex=y.index,c.sprite.texture=this.imageFrameTexture(u,y.index),c.sprite.anchor.set(u.anchorX,u.anchorY),c.sprite.blendMode=Rr[u.blend],c.sprite.tint=c.colorSample,c.sprite.visible=!0}pickImageResource(){const t=this.cfg.imageResources.filter(r=>r.texture||r.sequenceFrames.some(a=>a.texture));if(!t.length)return{id:1,texture:this.cfg.texture,textureName:"star",textureFolder:"",previewUrl:"/images/star.png",imageMode:"fixed",sequencePlayback:"loop-forward",sequenceFps:30,sequenceFrames:[],weight:100,locked:!1,scale:1,anchorX:.5,anchorY:.5,colorMode:"fixed",colorStart:"#ffffff",colorEnd:"#ff4d4d",blend:"normal",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ff4d4d"}],independentAlpha:"off",alpha:1,alphaCurveMode:"跟随导出",alphaCurve:[{x:0,y:0},{x:.1,y:1},{x:.9,y:1},{x:1,y:0}]};const i=t.reduce((r,a)=>r+Math.max(0,a.weight),0);if(i<=0)return t[Math.floor(this.rng()*t.length)];let n=this.rng()*i;for(const r of t)if(n-=Math.max(0,r.weight),n<=0)return r;return t[t.length-1]}imageFrameState(t,i){if(t.imageMode!=="sequence"||t.sequenceFrames.length<=1)return{index:0,visible:!0};const n=Math.min(120,Math.max(1,Number(t.sequenceFps)||30)),r=Math.max(0,Math.floor(Math.max(0,i)*n)),a=t.sequenceFrames.length-1;return t.sequencePlayback==="once-hide"?{index:Math.min(a,r),visible:r<=a}:t.sequencePlayback==="once-hold"?{index:Math.min(a,r),visible:!0}:t.sequencePlayback==="loop-reverse"?{index:a-r%t.sequenceFrames.length,visible:!0}:{index:r%t.sequenceFrames.length,visible:!0}}imageFrameTexture(t,i){var n;return t.imageMode==="sequence"&&t.sequenceFrames.length?((n=t.sequenceFrames[Math.max(0,Math.min(t.sequenceFrames.length-1,i))])==null?void 0:n.texture)||t.texture||this.cfg.texture:t.texture||this.cfg.texture}pickTrailResource(t){const i=this.cfg.trailResources.filter(a=>a.texture);if(!i.length)return this.cfg.trailResources[0]||{id:1,texture:null,textureName:"trail",previewUrl:"/images/trail.png",weight:100,locked:!1,rotation:0,colorMode:"particle",color:"#ffffff",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}],blend:"normal",alphaMode:"particle",alpha:1,alphaCurve:[{x:0,y:1},{x:1,y:1}],boneCount:3,trailRatio:100,lengthMode:"fixed",length:100,lengthMin:100,lengthMax:100,widthSizeMode:"fixed",width:100,widthMin:100,widthMax:100,widthMode:"particle",lifeLengthEnabled:!1,lifeLengthCurve:[{x:0,y:1},{x:1,y:1}],shapeEnabled:!1,shapeCurve:[{x:0,y:1},{x:1,y:1}]};const n=i.reduce((a,o)=>a+Math.max(0,o.weight),0);if(n<=0)return i[Math.min(i.length-1,Math.floor(t*i.length))];let r=t*n;for(const a of i)if(r-=Math.max(0,a.weight),r<=0)return a;return i[i.length-1]}kill(t){const i=this.pool[t];i.active=!1,i.sprite.visible=!1,i.trailHistory.length=0,i.trailBones.length=0,i.trailMesh&&(i.trailMesh.visible=!1)}clear(){for(const t of this.pool)t.active=!1,t.sprite.visible=!1,t.trailHistory.length=0,t.trailBones.length=0,t.trailMesh&&(t.trailMesh.visible=!1)}get activeCount(){let t=0;for(const i of this.pool)i.active&&t++;return t}capture(){const t=[];for(const i of this.pool)i.active&&t.push({boneName:i.boneName,spawnId:i.spawnId,x:i.sprite.x,y:i.sprite.y,rotation:i.rotation,scaleX:i.sprite.scale.x,scaleY:i.sprite.scale.y,...this.captureWorldTransform(i),alpha:i.sprite.alpha,colorHex:i.sprite.tint,resourceId:i.resourceId,imageFrameIndex:i.imageFrameIndex,imageVisible:i.sprite.visible,active:!0,trailState:this.cfg.trail&&i.trailBones.length?{bones:i.trailBones.map(n=>{var a;const r=Za(this.cfg,n.x,n.y,this.simulationTransform);return{...n,worldX:r.x,worldY:r.y,worldRotation:(((a=this.simulationTransform)==null?void 0:a.rotation)??this.cfg.rootRotation)-n.rotation}}),activeBoneCount:i.trailBones.length,width:i.trailCurrentWidth,alpha:i.trailCurrentAlpha,colorHex:i.trailCurrentColor,resourceId:i.trailResourceId}:void 0});return t}captureWorldTransform(t){var r,a,o;const i=Za(this.cfg,t.sprite.x,t.sprite.y,this.simulationTransform),n=((r=this.simulationTransform)==null?void 0:r.rotation)??this.cfg.rootRotation;return{worldX:i.x,worldY:i.y,worldRotation:n+t.rotation,worldScaleX:t.sprite.scale.x*Math.abs(((a=this.simulationTransform)==null?void 0:a.scaleX)??this.cfg.rootScaleX),worldScaleY:t.sprite.scale.y*Math.abs(((o=this.simulationTransform)==null?void 0:o.scaleY)??this.cfg.rootScaleY)}}apply(t){var n;const i=new Map;for(const r of t)i.set(r.boneName,r);for(const r of this.pool){const a=i.get(r.boneName);if(!a){r.active=!1,r.sprite.visible=!1,r.trailMesh&&(r.trailMesh.visible=!1);continue}r.active=a.active;const o=r.sprite;if(o.visible=a.active&&a.imageVisible!==!1,o.x=a.x,o.y=a.y,o.rotation=-a.rotation*Math.PI/180,o.scale.set(a.scaleX,a.scaleY),o.alpha=a.alpha,o.tint=a.colorHex,a.resourceId!=null){const h=this.cfg.imageResources.find(l=>l.id===a.resourceId);h&&(r.imageFrameIndex=a.imageFrameIndex??0,o.texture=this.imageFrameTexture(h,r.imageFrameIndex),o.anchor.set(h.anchorX,h.anchorY),o.blendMode=Rr[h.blend])}this.cfg.trail&&a.trailState?(r.trailResourceId=a.trailState.resourceId??((n=this.cfg.trailResources[0])==null?void 0:n.id)??1,r.trailBones=a.trailState.bones.map(h=>({...h})),r.trailCurrentWidth=a.trailState.width,r.trailCurrentAlpha=a.trailState.alpha,this.skinTrailMesh(r,a.trailState)):r.trailMesh&&(r.trailMesh.visible=!1)}}reset(){for(const t of this.pool)t.active=!1,t.sprite.visible=!1,t.trailHistory.length=0,t.trailBones.length=0,t.trailMesh&&(t.trailMesh.visible=!1);this.accumulator=0,this.burstTimer=0,this._spawnSerial=0,this._elapsed=0,this._attractionEnabledAt=0,this._attractionWasEnabled=!1,this._lastSeed=this.cfg.seed,this.rng=pf(this.cfg.seed>>>0)}restartEmissionCycle(){this.accumulator=0,this.burstTimer=0,this._spawnSerial=0,this._elapsed=0,this._attractionEnabledAt=0,this._attractionWasEnabled=this.cfg.attraction,this._lastSeed=this.cfg.seed,this.rng=pf(this.cfg.seed>>>0)}}function Vi(s,e,t){return s+(e-s)*t}function Ac(s,e){return Number.isFinite(s)?s:e}function Za(s,e,t,i=null){const n=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleX)??s.rootScaleX)),r=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleY)??s.rootScaleY)),a=-((i==null?void 0:i.rotation)??s.rootRotation)*Math.PI/180,o=Math.cos(a),h=Math.sin(a),l=(i==null?void 0:i.centerX)??s.centerX,c=(i==null?void 0:i.centerY)??s.centerY,u=l+o*n*e-h*r*t,d=-c+h*n*e+o*r*t;return{x:u,y:-d}}function Pv(s,e,t,i=null){const n=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleX)??s.rootScaleX)),r=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleY)??s.rootScaleY)),a=-((i==null?void 0:i.rotation)??s.rootRotation)*Math.PI/180,o=Math.cos(a),h=Math.sin(a),l=e-((i==null?void 0:i.centerX)??s.centerX),c=-t+((i==null?void 0:i.centerY)??s.centerY);return{x:(o*l+h*c)/n,y:(-h*l+o*c)/r}}function LI(s,e,t,i=null){const n=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleX)??s.rootScaleX)),r=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleY)??s.rootScaleY)),a=-((i==null?void 0:i.rotation)??s.rootRotation)*Math.PI/180,o=Math.cos(a),h=Math.sin(a),l=o*n*e-h*r*t,c=h*n*e+o*r*t;return{x:l,y:-c}}function DI(s,e,t,i=null){const n=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleX)??s.rootScaleX)),r=Math.max(1e-4,Math.abs((i==null?void 0:i.scaleY)??s.rootScaleY)),a=-((i==null?void 0:i.rotation)??s.rootRotation)*Math.PI/180,o=Math.cos(a),h=Math.sin(a),l=-t;return{x:(o*e+h*l)/n,y:(-h*e+o*l)/r}}function NI(s,e,t){const i=s.rotation*Math.PI/180,n=Math.cos(i),r=Math.sin(i),a=Math.max(1e-4,Math.abs(s.scaleX??1)),o=Math.max(1e-4,Math.abs(s.scaleY??1)),h=e-s.x,l=t-s.y,c=(n*h+r*l)/a,u=(-r*h+n*l)/o,d=(T,_,R,P)=>{const F=R/a,I=P/o,k=Math.max(1e-4,Math.hypot(F,I)),B=F/k,D=I/k,U=n*B-r*D,L=r*B+n*D;return{x:s.x+n*T*a-r*_*o+U*.05,y:s.y+r*T*a+n*_*o+L*.05,nx:U,ny:L}};if(s.shape==="circle"){const T=Math.max(.001,s.radius),_=Math.hypot(c,u);if(_>=T)return null;const R=_>1e-4?c/_:1,P=_>1e-4?u/_:0;return d(R*T,P*T,R,P)}if(s.shape==="ellipse"){const T=Math.max(.001,s.radiusX),_=Math.max(.001,s.radiusY),R=Math.hypot(c/T,u/_);if(R>=1)return null;const P=R>1e-4?1/R:1,F=R>1e-4?c*P:T,I=R>1e-4?u*P:0,k=Math.max(1e-4,Math.hypot(F/(T*T),I/(_*_)));return d(F,I,F/(T*T)/k,I/(_*_)/k)}if(s.shape==="rect"){const T=Math.max(.001,s.width*.5),_=Math.max(.001,s.height*.5);if(Math.abs(c)>=T||Math.abs(u)>=_)return null;const R=T-Math.abs(c),P=_-Math.abs(u);if(R=0?1:-1;return d(I*T,u,I,0)}const F=u>=0?1:-1;return d(c,F*_,0,F)}const f=Math.max(3,Math.min(16,Math.round(s.sides||(s.shape==="custom"?5:6)))),p=Math.max(.001,s.width*.5),m=Math.max(.001,s.height*.5),g=Array.from({length:f},(T,_)=>{const R=Math.PI*.5+_/f*Math.PI*2;return{x:Math.cos(R)*p,y:Math.sin(R)*m}});let v=!1;for(let T=0,_=g.length-1;Tu!=P.y>u&&c<(P.x-R.x)*(u-R.y)/(P.y-R.y)+R.x&&(v=!v)}if(!v)return null;let b=g[0].x,y=g[0].y,w=1/0;for(let T=0;T>>0^Math.imul(e+1,2654435761)^t)>>>0;return i^=i>>>16,i=Math.imul(i,2146121005),i^=i>>>15,i=Math.imul(i,2221713035),i^=i>>>16,(i>>>0)/4294967296}function Ja(s,e,t,i,n){return s==="fixed"?e:s==="curve"?Vi(e,t,wn(i,n)):Vi(e,t,n)}function mf(s,e,t,i,n,r){return s==="curve"?Vi(e,t,wn(i,n)):s==="random"?r:e}function kv(s,e,t,i,n){const r=1-n;return r*r*r*s+3*r*r*n*e+3*r*n*n*t+n*n*n*i}function wn(s,e,t="线性"){if(!Array.isArray(s)||s.length===0)return 1;const i=[...s].sort((n,r)=>n.x-r.x);if(e<=i[0].x)return i[0].y;if(e>=i[i.length-1].x)return i[i.length-1].y;for(let n=0;n=i[n].x&&e<=i[n+1].x){const r=i[n],a=i[n+1],o=a.x-r.x||1;if(t!=="贝塞尔")return Vi(r.y,a.y,(e-r.x)/o);const h=r.x+(r.outX??o/3),l=r.y+(r.outY??(a.y-r.y)/3),c=a.x+(a.inX??-o/3),u=a.y+(a.inY??-(a.y-r.y)/3);let d=0,f=1;for(let p=0;p<14;p++){const m=(d+f)/2;kv(r.x,h,c,a.x,m)>>0;return function(){e|=0,e=e+1831565813|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}function Mo(s){let e=s.replace("#","");return e.length===3&&(e=e.split("").map(t=>t+t).join("")),parseInt(e,16)}function XI(s,e,t){const i=Fv(s),n=Fv(e),r=Math.round(i[0]+(n[0]-i[0])*t),a=Math.round(i[1]+(n[1]-i[1])*t),o=Math.round(i[2]+(n[2]-i[2])*t);return r<<16|a<<8|o}function gf(s,e){if(!Array.isArray(s)||s.length===0)return 16777215;const t=[...s].sort((i,n)=>i.position-n.position);if(e<=t[0].position)return Mo(t[0].color);if(e>=t[t.length-1].position)return Mo(t[t.length-1].color);for(let i=0;ir.position)continue;const a=(e-n.position)/Math.max(1e-4,r.position-n.position);return XI(n.color,r.color,a)}return Mo(t[t.length-1].color)}function Fv(s){let e=s.replace("#","");e.length===3&&(e=e.split("").map(i=>i+i).join(""));const t=parseInt(e,16);return[t>>16&255,t>>8&255,t&255]}const Ba=new Map,Ra=new Map;function VI(s){return[...Ba.values()].some(e=>e===s)}function db(s){if(!(VI(s)||(Ra.get(s)||0)>0)){Ra.delete(s);for(const e of s.textures)e.destroy(!0)}}function YI(s){const e=Ra.get(s)||0;e>1?Ra.set(s,e-1):Ra.delete(s),db(s)}function $I(s){return Ba.get(s)||null}function Au(s,e){ql(s),Ba.set(s,e)}function GI(s){const e=Ba.get(s);return e?(Ra.set(e,(Ra.get(e)||0)+1),e):null}function HI(s,e){const t=Ba.get(s);return t?(Au(e,t),!0):!1}function ql(s){const e=Ba.get(s);e&&(Ba.delete(s),db(e))}function hi(s){if(Array.isArray(s))return s.map(e=>hi(e));if(s&&typeof s=="object"){const e=Object.getPrototypeOf(s);if(e===Object.prototype||e===null){const t={};for(const[i,n]of Object.entries(s))t[i]=hi(n);return t}}return s}const fb=["3.8","4.0","4.1","4.2","4.3"];function Ph(s){const e=String(s||"").trim();return fb.find(t=>e===t||e.startsWith(`${t}.`))||null}function Mm(){return fb.join(" / ")}function jI(s){return s==="4.3"?"4.3":"4.2"}function _p(){return{imagesPath:"./images/",spineVersion:"4.2",keyframeCurve:"linear",fps:30,omitFps:!1,integerFrameAlignment:!0,bonePool:!0,excludeEmptyAnimations:!1,fileName:"SpineParticle.json"}}function mb(s){const e=Object.assign(_p(),s||{});return e.imagesPath=String(e.imagesPath||"./images/"),e.spineVersion=Ph(e.spineVersion)||"4.2",e.keyframeCurve=e.keyframeCurve==="bezier"?"bezier":"linear",e.fps=Math.min(240,Math.max(1,Math.round(Number(e.fps)||30))),e.omitFps=e.omitFps===!0,e.integerFrameAlignment=e.integerFrameAlignment!==!1,e.bonePool=e.bonePool!==!1,e.excludeEmptyAnimations=e.excludeEmptyAnimations===!0,e.fileName=String(e.fileName||"SpineParticle.json"),e}const _m=30;function Kc(s,e=1){return Math.min(1800,Math.max(1,Math.ceil(Number(s)||e)))}function pb(s,e=30){const t=Math.max(0,Number(s.lifeMin)||0),i=Math.max(0,Number(s.lifeMax)||0),n=s.lifeMode==="fixed"?t:Math.max(t,i);return Kc(Math.ceil(n*Math.max(1,e)),_m)}function Xr(s,e=30){const t=Kc(s.loopDurationFrames),i=pb(s,e),n=s.generateLoopStartAnimation?s.loopStartUseCustomDuration?Kc(s.loopStartDurationFrames,_m):i:0,r=s.generateLoopEndAnimation?s.loopEndUseCustomDuration?Kc(s.loopEndDurationFrames,_m):i:0;return{start:n,loop:t,end:r,total:n+t+r}}function gb(s,e){const t=Xr(s,e),n=Math.max(0,Math.ceil(Math.max(0,Number(s.delay)||0)*Math.max(1,e)))+t.start;return{start:n,end:n+t.loop}}function Zc(s,e,t){const i=Math.max(1,Math.floor(t)-1),n=Math.min(i-1,Math.max(0,Math.floor(Number(s)||0))),r=Math.min(i,Math.max(n+1,Math.floor(Number(e)||i)));return{start:n,end:r}}function WI(s,e,t){const i=Math.max(1,e-1),n=Math.max(1,t-1),r=s.end>=i?n:s.end;return Zc(s.start,r,t)}let Ec=1,Cc=1,Ic=1,Rc=1;function Pc(s,e){const t=new Set(e),i=`${s} Copy`;if(!t.has(i))return i;let n=2;for(;t.has(`${i} ${n}`);)n++;return`${i} ${n}`}const Kl=m_("particle",{state:()=>({editor:{viewScale:1,viewX:0,viewY:0},systems:[],colliders:[],paths:[],spines:[],activeId:0,activeObjectType:"particle",activeObjectId:0,timeline:{playing:!0,loop:!0,frame:0,totalFrames:60,playbackStart:0,playbackEnd:59,fps:30,recorded:!1,animation:"animation",animations:["animation"]},settings:{parameterPanelOnRight:!0,tickEnabled:!1,axisFontSize:12,tickWidth:1,showAxisLabels:!0,axisColor:"#7a86ad",undoLimit:20,backgroundX:0,backgroundY:0,backgroundOpacity:1,backgroundImageName:"",backgroundImageData:"",showEmitter:!0,showBones:!1,bonePointDrawSize:1,boneAxisDrawSize:2,showSkinMesh:!1,showGrid:!0,exportSettings:_p()}}),getters:{activeSystemCount:s=>s.systems.length},actions:{syncSceneSequences(){Ec=Math.max(Ec,...this.systems.map(s=>s.id+1),1),Cc=Math.max(Cc,...this.colliders.map(s=>s.id+1),1),Ic=Math.max(Ic,...this.paths.map(s=>s.id+1),1),Rc=Math.max(Rc,...this.spines.map(s=>s.id+1),1)},addSystem(s){const e=Dl();s!=null&&s.config&&Object.assign(e,s.config);const t=new Set(this.systems.map(r=>r.config.name));if(t.has(e.name)){let r=0;for(const o of this.systems){const h=/^ParticleSystem(\d+)$/.exec(o.config.name);h&&(r=Math.max(r,parseInt(h[1],10)))}e.name=`ParticleSystem${r+1}`;let a=2;for(;t.has(e.name);)e.name=`ParticleSystem${r+a}`,a++}const i=this.timeline.animations.includes(this.timeline.animation)?this.timeline.animation:this.timeline.animations[0]||"animation",n={id:Ec++,visible:!0,animation:i,config:e};return this.systems.push(n),this.activeId=n.id,this.activeObjectType="particle",this.activeObjectId=n.id,n},removeSystem(s){var i;const e=this.systems.findIndex(n=>n.id===s);e>=0&&this.systems.splice(e,1),this.activeId===s&&(this.activeId=((i=this.systems[0])==null?void 0:i.id)??0);const t=this.systems.find(n=>n.id===this.activeId);if(t&&(this.timeline.animation=t.animation),this.activeObjectType==="particle"&&this.activeObjectId===s){const n=this.systems[0];this.activeObjectId=(n==null?void 0:n.id)??0}},selectSystem(s){this.activeId=s,this.activeObjectType="particle",this.activeObjectId=s;const e=this.systems.find(t=>t.id===s);e&&(this.timeline.animation=e.animation)},setSystemAnimation(s,e){if(!this.timeline.animations.includes(e))return;const t=this.systems.find(i=>i.id===s);t&&(t.animation=e,this.timeline.animation=e)},addAnimation(){const s=new Set(this.timeline.animations);let e=2,t=`animation${e}`;for(;s.has(t);)t=`animation${++e}`;this.timeline.animations.push(t),this.timeline.animation=t;const i=this.systems.find(n=>n.id===this.activeId);return i&&(i.animation=t),t},renameAnimation(s,e){const t=e.trim(),i=this.timeline.animations.indexOf(s);if(i<0||!t||t!==s&&this.timeline.animations.includes(t))return!1;this.timeline.animations[i]=t;for(const n of this.systems)n.animation===s&&(n.animation=t);return this.timeline.animation===s&&(this.timeline.animation=t),!0},removeAnimation(s){if(this.timeline.animations.length<=1)return!1;const e=this.timeline.animations.indexOf(s);if(e<0)return!1;this.timeline.animations.splice(e,1);const t=this.timeline.animations[Math.min(e,this.timeline.animations.length-1)];for(const i of this.systems)i.animation===s&&(i.animation=t);return this.timeline.animation===s&&(this.timeline.animation=t),!0},addCollider(){const s=Cc++,e={id:s,name:`Collider${s}`,visible:!0,shape:"circle",enabled:!0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,radius:50,radiusX:70,radiusY:45,width:120,height:80,sides:6,response:"physics",elasticity:.8,friction:.3,followPath:!1,followPathId:0,followDuration:2,followPathRotation:!1,followCurveMode:"跟随导出",followCurve:[{x:0,y:0},{x:1,y:1}]};return this.colliders.push(e),this.activeObjectType="collision",this.activeObjectId=e.id,e},addPath(){const s=Ic++,e={id:s,name:`Path${s}`,visible:!0,enabled:!0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,closed:!1,color:"#ff933e",preset:"",points:[]};return this.paths.push(e),this.activeObjectType="path",this.activeObjectId=e.id,e},addSpine(){const s=Rc++,e={id:s,name:`SpineSkeleton${s}`,enabled:!0,visible:!0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,timeOffset:0,skeletonFileName:"",atlasFileName:"",textureFileNames:[],dataVersion:"",sourceBundle:null,selectedAnimation:"",selectedBone:"",animations:[],bones:[],assetVersion:0,status:"empty",error:""};return this.spines.push(e),this.activeObjectType="spine",this.activeObjectId=e.id,e},duplicateSelectedObject(){const s=this.activeObjectId;if(!s)return null;if(this.activeObjectType==="particle"){const i=this.systems.find(r=>r.id===s);if(!i)return null;const n=hi(i);return n.id=Ec++,n.config.name=Pc(i.config.name,this.systems.map(r=>r.config.name)),n.frames=void 0,this.systems.push(n),this.activeId=n.id,this.activeObjectId=n.id,this.timeline.animation=n.animation,n}if(this.activeObjectType==="collision"){const i=this.colliders.find(r=>r.id===s);if(!i)return null;const n=hi(i);return n.id=Cc++,n.name=Pc(i.name,this.colliders.map(r=>r.name)),this.colliders.push(n),this.activeObjectId=n.id,n}if(this.activeObjectType==="path"){const i=this.paths.find(r=>r.id===s);if(!i)return null;const n=hi(i);return n.id=Ic++,n.name=Pc(i.name,this.paths.map(r=>r.name)),this.paths.push(n),this.activeObjectId=n.id,n}const e=this.spines.find(i=>i.id===s);if(!e)return null;const t=hi(e);return t.id=Rc++,t.name=Pc(e.name,this.spines.map(i=>i.name)),t.selectedBone="",HI(e.id,t.id),this.spines.push(t),this.activeObjectId=t.id,t},selectSceneObject(s,e){if(this.activeObjectType=s,this.activeObjectId=e,s==="particle"){this.activeId=e;const t=this.systems.find(i=>i.id===e);t&&(this.timeline.animation=t.animation)}},removeCollider(s){var t;const e=this.colliders.findIndex(i=>i.id===s);e>=0&&this.colliders.splice(e,1);for(const i of this.systems){const n=Wr(i.config);n.collisionColliderIds=n.collisionColliderIds.filter(r=>r!==s)}if(this.activeObjectType==="collision"&&this.activeObjectId===s){const i=this.systems[0];this.activeObjectType=i?"particle":"collision",this.activeObjectId=(i==null?void 0:i.id)??((t=this.colliders[0])==null?void 0:t.id)??0}},removePath(s){var t;const e=this.paths.findIndex(i=>i.id===s);if(e>=0&&this.paths.splice(e,1),this.activeObjectType==="path"&&this.activeObjectId===s){const i=this.systems[0];this.activeObjectType=i?"particle":"path",this.activeObjectId=(i==null?void 0:i.id)??((t=this.paths[0])==null?void 0:t.id)??0}},removeSpine(s){ql(s);const e=this.spines.findIndex(t=>t.id===s);if(e>=0&&this.spines.splice(e,1),this.activeObjectType==="spine"&&this.activeObjectId===s){const t=this.systems[0],i=this.colliders[0],n=this.paths[0],r=this.spines[0];t?(this.activeObjectType="particle",this.activeObjectId=t.id,this.activeId=t.id):i?(this.activeObjectType="collision",this.activeObjectId=i.id):n?(this.activeObjectType="path",this.activeObjectId=n.id):(this.activeObjectType="spine",this.activeObjectId=(r==null?void 0:r.id)??0)}this.recalcTotalFrames()},play(){const s=Zc(this.timeline.playbackStart,this.timeline.playbackEnd,this.timeline.totalFrames);(this.timeline.frame=s.end)&&(this.timeline.frame=s.start),this.timeline.playing=!0},pause(){this.timeline.playing=!1},togglePlay(){this.timeline.playing?this.pause():this.play()},toStart(){this.timeline.frame=this.timeline.playbackStart},previousFrame(){this.timeline.playing=!1,this.timeline.frame=Math.max(this.timeline.playbackStart,this.timeline.frame-1)},nextFrame(){this.timeline.playing=!1,this.timeline.frame=Math.min(this.timeline.playbackEnd,this.timeline.frame+1)},toEnd(){this.timeline.playing=!1,this.timeline.frame=this.timeline.playbackEnd},toggleLoop(){this.timeline.loop=!this.timeline.loop},setFrame(s){this.timeline.frame=Math.max(0,Math.min(s,this.timeline.totalFrames-1))},setPlaybackStart(s){const e=Zc(s,this.timeline.playbackEnd,this.timeline.totalFrames);this.timeline.playbackStart=e.start,this.timeline.playbackEnd=e.end,this.timeline.framee.end&&(this.timeline.frame=e.end)},recalcTotalFrames(){const s=this.timeline.fps||30;let e=0;for(const r of this.systems){const a=r.config,o=Math.max(0,Number(a.lifeMin)||0),h=Math.max(0,Number(a.lifeMax)||0),l=a.lifeMode==="fixed"?o:Math.max(o,h),c=a.mode==="stream"?a.streamBehavior==="loop"?Math.max(1/s,Math.ceil(Math.max(1,Number(a.loopDurationFrames)||1))/s):Math.max(1/s,Number(a.duration)||0):0;let u=Math.max(0,Number(a.delay)||0)+c+l;a.mode==="stream"&&a.streamBehavior==="loop"&&(u=Math.max(0,Number(a.delay)||0)+Xr(a,s).total/s),u>e&&(e=u)}for(const r of this.spines){const a=r.animations.find(h=>h.name===r.selectedAnimation);if(!a)continue;const o=Math.max(0,Number(r.timeOffset)||0)+Math.max(0,a.duration||0);o>e&&(e=o)}for(const r of this.colliders){if(!r.followPath||!r.followPathId)continue;const a=Math.max(0,Number(r.followDuration)||0);a>e&&(e=a)}const t=this.timeline.totalFrames,i=Math.max(2,Math.ceil(e*s)+1);this.timeline.totalFrames=i;const n=WI({start:this.timeline.playbackStart,end:this.timeline.playbackEnd},t,i);return this.timeline.playbackStart=n.start,this.timeline.playbackEnd=n.end,this.timeline.frame>=i&&(this.timeline.frame=i-1),i}}}),vb="SpineParticle.SystemSettings",yb=1,vf="SpineParticle.SystemSettings.v1";function Ko(s,e,t,i){const n=Number(s);return Math.min(t,Math.max(e,Number.isFinite(n)?n:i))}function zI(s){return{parameterPanelOnRight:s.parameterPanelOnRight,undoLimit:s.undoLimit,showEmitter:s.showEmitter,showBones:s.showBones,bonePointDrawSize:s.bonePointDrawSize,boneAxisDrawSize:s.boneAxisDrawSize,showSkinMesh:s.showSkinMesh,tickEnabled:s.tickEnabled,axisFontSize:s.axisFontSize,tickWidth:s.tickWidth,showAxisLabels:s.showAxisLabels,axisColor:s.axisColor}}function qI(s,e){const t=n=>s[n]==null?!!e[n]:s[n]===!0,i=typeof s.axisColor=="string"&&/^#[0-9a-f]{6}$/i.test(s.axisColor)?s.axisColor:e.axisColor;return{parameterPanelOnRight:t("parameterPanelOnRight"),undoLimit:Math.round(Ko(s.undoLimit,1,200,e.undoLimit)),showEmitter:t("showEmitter"),showBones:t("showBones"),bonePointDrawSize:Ko(s.bonePointDrawSize,.1,10,e.bonePointDrawSize),boneAxisDrawSize:Ko(s.boneAxisDrawSize,.1,10,e.boneAxisDrawSize),showSkinMesh:t("showSkinMesh"),tickEnabled:t("tickEnabled"),axisFontSize:Math.round(Ko(s.axisFontSize,8,40,e.axisFontSize)),tickWidth:Ko(s.tickWidth,1,5,e.tickWidth),showAxisLabels:t("showAxisLabels"),axisColor:i}}function KI(s){let e;try{e=JSON.parse(s)}catch{throw new Error("系统设置缓存不是有效的 JSON")}const t=e;if(t.format!==vb)throw new Error("不是 Spine粒子编辑器系统设置缓存");if(t.version!==yb)throw new Error(`暂不支持系统配置版本:${t.version??"未知"}`);if(!t.settings||typeof t.settings!="object")throw new Error("系统设置缓存缺少 settings");return t}function ZI(s,e){Object.assign(s.settings,qI(e,s.settings))}let kc=null;function JI(s){kc==null||kc();try{const e=localStorage.getItem(vf);e&&ZI(s,KI(e).settings)}catch{try{localStorage.removeItem(vf)}catch{}}kc=fs(()=>zI(s.settings),e=>{const t={format:vb,version:yb,savedAt:new Date().toISOString(),settings:e};try{localStorage.setItem(vf,JSON.stringify(t))}catch{}},{deep:!0})}function Ov(s,e,t,i,n){const r=1-n;return r*r*r*s+3*r*r*n*e+3*r*n*n*t+n*n*n*i}function Bv(s,e,t){const i=s.rotation*Math.PI/180,n=Math.cos(i),r=Math.sin(i),a=Math.max(1e-4,Math.abs(s.scaleX??1)),o=Math.max(1e-4,Math.abs(s.scaleY??1));return{x:s.x+n*e*a-r*t*o,y:s.y+r*e*a+n*t*o}}function yf(s,e){if(!s.points.length)return null;if(s.points.length===1)return{...Bv(s,s.points[0].x,s.points[0].y),angle:s.rotation};const t=s.closed?s.points.length:s.points.length-1,i=[];let n=0;for(let p=0;p0&&v===0)continue;const b=v/20,y=Ov(m.x,m.x+m.outX,g.x+g.inX,g.x,b),w=Ov(m.y,m.y+m.outY,g.y+g.inY,g.y,b),A=Bv(s,y,w),T=i[i.length-1];T&&(n+=Math.hypot(A.x-T.x,A.y-T.y)),i.push({...A,distance:n})}}const r=Math.min(1,Math.max(0,e))*n;let a=i.findIndex(p=>p.distance>=r);a<0&&(a=i.length-1);const o=i[a],h=i[Math.max(0,a-1)],l=i[Math.min(i.length-1,a+1)],c=h.distance,u=a>0?(r-c)/Math.max(1e-4,o.distance-c):0,d=h.x+(o.x-h.x)*Math.min(1,Math.max(0,u)),f=h.y+(o.y-h.y)*Math.min(1,Math.max(0,u));return{x:d,y:f,angle:Math.atan2(l.y-h.y,l.x-h.x)*180/Math.PI}}function Zi(s){return s.map(e=>({...e,trailState:e.trailState?{...e.trailState,bones:e.trailState.bones.map(t=>({...t}))}:void 0}))}function QI(s){const e=new Map;for(const i of s)for(const n of i)e.has(n.boneName)||e.set(n.boneName,Zi([n])[0]);const t=[...e.keys()].sort((i,n)=>{const r=Number(i.replace(/^p_/,"")),a=Number(n.replace(/^p_/,""));return Number.isFinite(r)&&Number.isFinite(a)?r-a:i.localeCompare(n)});for(let i=0;i[r.boneName,r]));s[i]=t.map(r=>{const a=n.get(r);return a||{...Zi([e.get(r)])[0],alpha:0,imageVisible:!1,trailState:void 0,active:!0}})}}function eR(s){s.length<2||(s[s.length-1]=Zi(s[0]))}function tR(s,e){const t=Math.max(0,s.length-1),i=[];for(let n=0;n<=e;n++){const r=Math.min(t,Math.round(n/e*t));i.push(Zi(s[r]||[]))}return i}function xf(s){return`${s.boneName}:${s.spawnId??"legacy"}`}function Lv(s){return{...Zi([s])[0],alpha:0,imageVisible:!1,trailState:void 0,active:!0}}function iR(s,e,t,i){const n=Math.min(s.length,i+1),r=s.slice(Math.max(0,s.length-n)),a=new Map;for(const l of e){if(l.imageVisible===!1||l.alpha<=0)continue;const c=xf(l),u=new Map;let d=!1;for(let f=r.length-1;f>=0;f--){const p=r[f].find(m=>xf(m)===c);if(p)d=!0,u.set(f,p);else if(d)break}a.set(c,u)}const o=Math.max(0,r.length-1),h=[];for(let l=0;l<=t;l++){const c=Math.min(o,Math.round(l/t*o));h.push(e.map(u=>{var f;if(u.imageVisible===!1||u.alpha<=0)return Zi([u])[0];const d=(f=a.get(xf(u)))==null?void 0:f.get(c);return d?Zi([d])[0]:Lv(u)}))}return h[0]=h[0].map(Lv),h[h.length-1]=Zi(e),h}function Dv(s,e){const t=s.length?1:0;for(let i=t;i{const y=b?[[]]:[];e.reset();for(let w=0;w0&&e.restartEmissionCycle();for(let A=0;A0;w++)e.update(r,"off"),b.push(e.capture());(v=b[b.length-1])!=null&&v.length&&b.push([]),Dv(u,tR(b,o.end))}const g=Zi(u[u.length-1]||[]);for(u.length>i&&(u.length=i);u.lengtho.id===r)||(this.container.removeChild(a.root),a.root.destroy({children:!0}),this.entries.delete(r));for(const r of e){const a=$I(r.id);let o=this.entries.get(r.id);if(o&&o.assetVersion!==r.assetVersion&&!a&&(this.container.removeChild(o.root),o.root.destroy({children:!0}),this.entries.delete(r.id),o=void 0),(!o||o.assetVersion!==r.assetVersion)&&a){o&&(this.container.removeChild(o.root),o.root.destroy({children:!0}));const d=new ji,f=new a.SpineClass({skeletonData:a.skeletonData,autoUpdate:!1,darkTint:!1});a.skeletonData.defaultSkin&&f.skeleton.setSkin(a.skeletonData.defaultSkin),a.runtimeVersion==="4.3"?f.skeleton.setupPoseSlots():f.skeleton.setSlotsToSetupPose(),d.addChild(f),this.container.addChild(d),o={root:d,spine:f,runtimeVersion:a.runtimeVersion,assetVersion:r.assetVersion,animation:""},this.entries.set(r.id,o)}if(!o)continue;const h=o.root,l=o.spine,c=r.visible!==!1&&r.enabled;h.visible=c,h.renderable=c,h.position.set(r.x,-r.y),h.rotation=-r.rotation*Math.PI/180,h.scale.set(r.scaleX,r.scaleY),o.animation!==r.selectedAnimation&&(o.animation=r.selectedAnimation,o.runtimeVersion==="4.3"?l.skeleton.setupPose():l.skeleton.setToSetupPose(),l.state.clearTracks(),o.animation&&l.state.setAnimation(0,o.animation,!1));const u=o.runtimeVersion==="4.3"?l.state.getTrack(0):l.state.getCurrent(0);if(u){const d=((n=r.animations.find(p=>p.name===r.selectedAnimation))==null?void 0:n.duration)||0,f=Math.max(0,t/Math.max(1,i)-r.timeOffset);u.trackTime=d>0?Math.min(f,d):f}l.update(0)}}getBoneWorldTransform(e,t){const i=this.entries.get(e),n=i==null?void 0:i.spine.skeleton.findBone(t);if(!i||!n||!n.active)return null;const r=i.runtimeVersion==="4.3"?n.appliedPose:n,a=i.root,o=Math.cos(a.rotation),h=Math.sin(a.rotation),l=o*a.scale.x,c=-h*a.scale.y,u=h*a.scale.x,d=o*a.scale.y,f=l*r.a+c*r.c,p=l*r.b+c*r.d,m=u*r.a+d*r.c,g=u*r.b+d*r.d,v=a.position.x+l*r.worldX+c*r.worldY,b=a.position.y+u*r.worldX+d*r.worldY;return{x:v,y:-b,rotation:-Math.atan2(m,f)*180/Math.PI,scaleX:Math.max(1e-4,Math.hypot(f,m)),scaleY:Math.max(1e-4,Math.hypot(p,g))}}destroy(){for(const e of this.entries.values())e.root.removeFromParent(),e.root.destroy({children:!0});this.entries.clear(),this.container.removeFromParent(),this.container.destroy({children:!0})}}let xb=class{constructor(){x(this,"entries",{});x(this,"size",0)}add(e){let t=this.entries[e];return this.entries[e]=!0,t?!1:(this.size++,!0)}addAll(e){let t=this.size;for(var i=0,n=e.length;i1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(e,t){e.r=((t&4278190080)>>>24)/255,e.g=((t&16711680)>>>16)/255,e.b=((t&65280)>>>8)/255,e.a=(t&255)/255}static rgb888ToColor(e,t){e.r=((t&16711680)>>>16)/255,e.g=((t&65280)>>>8)/255,e.b=(t&255)/255}toRgb888(){const e=t=>("0"+(t*255).toString(16)).slice(-2);return+("0x"+e(this.r)+e(this.g)+e(this.b))}static fromString(e,t=new Ki){return t.setFromString(e)}},x(Ki,"WHITE",new Ki(1,1,1,1)),x(Ki,"RED",new Ki(1,0,0,1)),x(Ki,"GREEN",new Ki(0,1,0,1)),x(Ki,"BLUE",new Ki(0,0,1,1)),x(Ki,"MAGENTA",new Ki(1,0,1,1)),Ki);var bi;let $e=(bi=class{static clamp(e,t,i){return ei?i:e}static cosDeg(e){return Math.cos(e*bi.degRad)}static sinDeg(e){return Math.sin(e*bi.degRad)}static atan2Deg(e,t){return Math.atan2(e,t)*bi.degRad}static signum(e){return e>0?1:e<0?-1:0}static toInt(e){return e>0?Math.floor(e):Math.ceil(e)}static cbrt(e){let t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t}static randomTriangular(e,t){return bi.randomTriangularWith(e,t,(e+t)*.5)}static randomTriangularWith(e,t,i){let n=Math.random(),r=t-e;return n<=(i-e)/r?e+Math.sqrt(n*r*(i-e)):t-Math.sqrt((1-n)*r*(t-i))}static isPowerOfTwo(e){return e&&(e&e-1)===0}},x(bi,"PI",3.1415927),x(bi,"PI2",bi.PI*2),x(bi,"invPI2",1/bi.PI2),x(bi,"radiansToDegrees",180/bi.PI),x(bi,"radDeg",bi.radiansToDegrees),x(bi,"degreesToRadians",bi.PI/180),x(bi,"degRad",bi.degreesToRadians),bi);var tn;let Ge=(tn=class{static arrayCopy(e,t,i,n,r){for(let a=t,o=n;a=t?e:tn.setArraySize(e,t,i)}static newArray(e,t){let i=new Array(e);for(let n=0;n0?this.items.pop():this.instantiator()}free(e){e.reset&&e.reset(),this.items.push(e)}freeAll(e){for(let t=0;t>1)*o;let h=t.bone.skeleton,l=t.deform,c=this.vertices,u=this.bones;if(!u){l.length>0&&(c=l);let m=t.bone,g=m.worldX,v=m.worldY,b=m.a,y=m.b,w=m.c,A=m.d;for(let T=i,_=a;_=this.regions.length&&(i=this.regions.length-1);let n=this.regions[i];t.region!=n&&(t.region=n,t.updateRegion())}getPath(e,t){let i=e,n=(this.start+t).toString();for(let r=this.digits-n.length;r>0;r--)i+="0";return i+=n,i}static nextID(){return or._nextID++}},x(or,"_nextID",0),or);var $i;(function(s){s[s.hold=0]="hold",s[s.once=1]="once",s[s.loop=2]="loop",s[s.pingpong=3]="pingpong",s[s.onceReverse=4]="onceReverse",s[s.loopReverse=5]="loopReverse",s[s.pingpongReverse=6]="pingpongReverse"})($i||($i={}));const Sb=[$i.hold,$i.once,$i.loop,$i.pingpong,$i.onceReverse,$i.loopReverse,$i.pingpongReverse];let Tp=class{constructor(e,t,i){x(this,"name");x(this,"timelines",[]);x(this,"timelineIds",new xb);x(this,"duration");if(!e)throw new Error("name cannot be null.");this.name=e,this.setTimelines(t),this.duration=i}setTimelines(e){if(!e)throw new Error("timelines cannot be null.");this.timelines=e,this.timelineIds.clear();for(var t=0;t0&&(t%=this.duration));let l=this.timelines;for(let c=0,u=l.length;ct)return n-1;return i-1}static search(e,t,i){let n=e.length;for(let r=i;rt)return r-i;return n-i}},Xn=class extends ui{constructor(t,i,n){super(t,n);x(this,"curves");this.curves=Ge.newFloatArray(t+i*18),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let i=this.getFrameCount()+t*18;if(this.curves.length>i){let n=Ge.newFloatArray(i);Ge.arrayCopy(this.curves,0,n,0,i),this.curves=n}}setBezier(t,i,n,r,a,o,h,l,c,u,d){let f=this.curves,p=this.getFrameCount()+t*18;n==0&&(f[i]=2+p);let m=(r-o*2+l)*.03,g=(a-h*2+c)*.03,v=((o-l)*3-r+u)*.006,b=((h-c)*3-a+d)*.006,y=m*2+v,w=g*2+b,A=(o-r)*.3+m+v*.16666667,T=(h-a)*.3+g+b*.16666667,_=r+A,R=a+T;for(let P=p+18;pt){let c=this.frames[i],u=this.frames[i+n];return u+(t-c)/(a[r]-c)*(a[r+1]-u)}let o=r+18;for(r+=2;r=t){let c=a[r-2],u=a[r-1];return u+(t-c)/(a[r]-c)*(a[r+1]-u)}i+=this.getFrameEntries();let h=a[o-2],l=a[o-1];return l+(t-h)/(this.frames[i]-h)*(this.frames[i+n]-l)}},un=class extends Xn{constructor(e,t,i){super(e,t,[i])}getFrameEntries(){return 2}setFrame(e,t,i){e<<=1,this.frames[e]=t,this.frames[e+1]=i}getCurveValue(e){let t=this.frames,i=t.length-2;for(let r=2;r<=i;r+=2)if(t[r]>e){i=r-2;break}let n=this.curves[i>>1];switch(n){case 0:let r=t[i],a=t[i+1];return a+(e-r)/(t[i+2]-r)*(t[i+2+1]-a);case 1:return t[i+1]}return this.getBezierValue(e,i,1,n-2)}getRelativeValue(e,t,i,n,r){if(e>2];switch(g){case 0:let v=c[m];d=c[m+1],f=c[m+2],p=c[m+3];let b=(n-v)/(c[m+4]-v);d+=(c[m+4+1]-d)*b,f+=(c[m+4+2]-f)*b,p+=(c[m+4+3]-p)*b;break;case 1:d=c[m+1],f=c[m+2],p=c[m+3];break;default:d=this.getBezierValue(n,m,1,g-2),f=this.getBezierValue(n,m,2,g+18-2),p=this.getBezierValue(n,m,3,g+36-2)}if(a==1)u.r=d,u.g=f,u.b=p;else{if(o==Ce.setup){let v=l.data.color;u.r=v.r,u.g=v.g,u.b=v.b}u.r+=(d-u.r)*a,u.g+=(f-u.g)*a,u.b+=(p-u.b)*a}}},Bb=class extends un{constructor(t,i,n){super(t,i,Ct.alpha+"|"+n);x(this,"slotIndex",0);this.slotIndex=n}apply(t,i,n,r,a,o,h){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let c=l.color;if(n>3];switch(A){case 0:let T=c[w];f=c[w+1],p=c[w+2],m=c[w+3],g=c[w+4],v=c[w+5],b=c[w+6],y=c[w+7];let _=(n-T)/(c[w+8]-T);f+=(c[w+8+1]-f)*_,p+=(c[w+8+2]-p)*_,m+=(c[w+8+3]-m)*_,g+=(c[w+8+4]-g)*_,v+=(c[w+8+5]-v)*_,b+=(c[w+8+6]-b)*_,y+=(c[w+8+7]-y)*_;break;case 1:f=c[w+1],p=c[w+2],m=c[w+3],g=c[w+4],v=c[w+5],b=c[w+6],y=c[w+7];break;default:f=this.getBezierValue(n,w,1,A-2),p=this.getBezierValue(n,w,2,A+18-2),m=this.getBezierValue(n,w,3,A+36-2),g=this.getBezierValue(n,w,4,A+54-2),v=this.getBezierValue(n,w,5,A+72-2),b=this.getBezierValue(n,w,6,A+90-2),y=this.getBezierValue(n,w,7,A+108-2)}if(a==1)u.set(f,p,m,g),d.r=v,d.g=b,d.b=y;else{if(o==Ce.setup){u.setFromColor(l.data.color);let T=l.data.darkColor;d.r=T.r,d.g=T.g,d.b=T.b}u.add((f-u.r)*a,(p-u.g)*a,(m-u.b)*a,(g-u.a)*a),d.r+=(v-d.r)*a,d.g+=(b-d.g)*a,d.b+=(y-d.b)*a}}},Db=class extends Xn{constructor(t,i,n){super(t,i,[Ct.rgb+"|"+n,Ct.rgb2+"|"+n]);x(this,"slotIndex",0);this.slotIndex=n}getFrameEntries(){return 7}setFrame(t,i,n,r,a,o,h,l){t*=7,this.frames[t]=i,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=a,this.frames[t+4]=o,this.frames[t+5]=h,this.frames[t+6]=l}apply(t,i,n,r,a,o,h){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let c=this.frames,u=l.color,d=l.darkColor;if(nt){let l=this.frames[i];return n[r+1]*(t-l)/(n[r]-l)}let a=r+18;for(r+=2;r=t){let l=n[r-2],c=n[r-1];return c+(t-l)/(n[r]-l)*(n[r+1]-c)}let o=n[a-2],h=n[a-1];return h+(1-h)*(t-o)/(this.frames[i+this.getFrameEntries()]-o)}apply(t,i,n,r,a,o,h){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let c=l.getAttachment();if(!c||!(c instanceof vr)||c.timelineAttachment!=this.attachment)return;let u=l.deform;u.length==0&&(o=Ce.setup);let d=this.vertices,f=d[0].length,p=this.frames;if(n=p[p.length-1]){let w=d[p.length-1];if(a==1)if(o==Ce.add){let A=c;if(A.bones)for(let T=0;Tn)this.apply(t,i,Number.MAX_VALUE,r,a,o,h),i=-1;else if(i>=l[c-1])return;if(n0&&l[u-1]==d;)u--}for(;u=l[u];u++)r.push(this.events[u])}},x(Sa,"propertyIds",[""+Ct.event]),Sa);var Ma;let gl=(Ma=class extends ui{constructor(t){super(t,Ma.propertyIds);x(this,"drawOrders");this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,i,n){this.frames[t]=i,this.drawOrders[t]=n}apply(t,i,n,r,a,o,h){if(h==es.mixOut){o==Ce.setup&&Ge.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length);return}if(n>2];switch(m){case 0:let g=c[p];u=c[p+1],d=c[p+2],f=c[p+3];let v=(n-g)/(c[p+4]-g);u+=(c[p+4+1]-u)*v,d+=(c[p+4+2]-d)*v,f+=(c[p+4+3]-f)*v;break;case 1:u=c[p+1],d=c[p+2],f=c[p+3];break;default:u=this.getBezierValue(n,p,1,m-2),d=this.getBezierValue(n,p,2,m+18-2),f=this.getBezierValue(n,p,3,m+36-2)}if(o==Ce.setup){let g=l.data;l.mixRotate=g.mixRotate+(u-g.mixRotate)*a,l.mixX=g.mixX+(d-g.mixX)*a,l.mixY=g.mixY+(f-g.mixY)*a}else l.mixRotate+=(u-l.mixRotate)*a,l.mixX+=(d-l.mixX)*a,l.mixY+=(f-l.mixY)*a}},Xa=class extends un{constructor(t,i,n,r){super(t,i,r+"|"+n);x(this,"constraintIndex",0);this.constraintIndex=n}apply(t,i,n,r,a,o,h){let l;if(this.constraintIndex==-1){const c=n>=this.frames[0]?this.getCurveValue(n):0;for(const u of t.physicsConstraints)u.active&&this.global(u.data)&&this.set(u,this.getAbsoluteValue2(n,a,o,this.get(u),this.setup(u),c))}else l=t.physicsConstraints[this.constraintIndex],l.active&&this.set(l,this.getAbsoluteValue(n,a,o,this.get(l),this.setup(l)))}},Gb=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintInertia)}setup(e){return e.data.inertia}get(e){return e.inertia}set(e,t){e.inertia=t}global(e){return e.inertiaGlobal}},Hb=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintStrength)}setup(e){return e.data.strength}get(e){return e.strength}set(e,t){e.strength=t}global(e){return e.strengthGlobal}},jb=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintDamping)}setup(e){return e.data.damping}get(e){return e.damping}set(e,t){e.damping=t}global(e){return e.dampingGlobal}},Wb=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintMass)}setup(e){return 1/e.data.massInverse}get(e){return 1/e.massInverse}set(e,t){e.massInverse=1/t}global(e){return e.massGlobal}},zb=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintWind)}setup(e){return e.data.wind}get(e){return e.wind}set(e,t){e.wind=t}global(e){return e.windGlobal}},qb=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintGravity)}setup(e){return e.data.gravity}get(e){return e.gravity}set(e,t){e.gravity=t}global(e){return e.gravityGlobal}},Kb=class extends Xa{constructor(e,t,i){super(e,t,i,Ct.physicsConstraintMix)}setup(e){return e.data.mix}get(e){return e.mix}set(e,t){e.mix=t}global(e){return e.mixGlobal}};var _a;let Zb=(_a=class extends ui{constructor(t,i){super(t,_a.propertyIds);x(this,"constraintIndex");this.constraintIndex=i}getFrameCount(){return this.frames.length}setFrame(t,i){this.frames[t]=i}apply(t,i,n,r,a,o,h){let l;if(this.constraintIndex!=-1&&(l=t.physicsConstraints[this.constraintIndex],!l.active))return;const c=this.frames;if(i>n)this.apply(t,i,Number.MAX_VALUE,[],a,o,h),i=-1;else if(i>=c[c.length-1])return;if(!(n=c[ui.search1(c,i)+1]))if(l!=null)l.reset();else for(const u of t.physicsConstraints)u.active&&u.reset()}},x(_a,"propertyIds",[Ct.physicsConstraintReset.toString()]),_a);var os;let Jb=(os=class extends ui{constructor(t,i,n){super(t,[Ct.sequence+"|"+i+"|"+n.sequence.id]);x(this,"slotIndex");x(this,"attachment");this.slotIndex=i,this.attachment=n}getFrameEntries(){return os.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,i,n,r,a){let o=this.frames;t*=os.ENTRIES,o[t]=i,o[t+os.MODE]=n|r<<4,o[t+os.DELAY]=a}apply(t,i,n,r,a,o,h){let l=t.slots[this.slotIndex];if(!l.bone.active)return;let c=l.attachment,u=this.attachment;if(c!=u&&(!(c instanceof vr)||c.timelineAttachment!=u))return;if(h==es.mixOut){o==Ce.setup&&(l.sequenceIndex=-1);return}let d=this.frames;if(n>4,b=this.attachment.sequence.regions.length,y=Sb[m&15];if(y!=$i.hold)switch(v+=(n-p)/g+1e-5|0,y){case $i.once:v=Math.min(b-1,v);break;case $i.loop:v%=b;break;case $i.pingpong:{let w=(b<<1)-2;v=w==0?0:v%w,v>=b&&(v=w-v);break}case $i.onceReverse:v=Math.max(b-1-v,0);break;case $i.loopReverse:v=b-1-v%b;break;case $i.pingpongReverse:{let w=(b<<1)-2;v=w==0?0:(v+b-1)%w,v>=b&&(v=w-v)}}l.sequenceIndex=v}},x(os,"ENTRIES",3),x(os,"MODE",1),x(os,"DELAY",2),os);var lr;let rR=(lr=class{constructor(e){x(this,"data");x(this,"tracks",new Array);x(this,"timeScale",1);x(this,"unkeyedState",0);x(this,"events",new Array);x(this,"listeners",new Array);x(this,"queue",new oR(this));x(this,"propertyIDs",new xb);x(this,"animationsChanged",!1);x(this,"trackEntryPool",new kh(()=>new aR));this.data=e}static emptyAnimation(){return lr._emptyAnimation}update(e){e*=this.timeScale;let t=this.tracks;for(let i=0,n=t.length;i0){if(r.delay-=a,r.delay>0)continue;a=-r.delay,r.delay=0}let o=r.next;if(o){let h=r.trackLast-o.delay;if(h>=0){for(o.delay=0,o.trackTime+=r.timeScale==0?0:(h/r.timeScale+e)*o.timeScale,r.trackTime+=a,this.setCurrent(i,o,!0);o.mixingFrom;)o.mixTime+=e,o=o.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&!r.mixingFrom){t[i]=null,this.queue.end(r),this.clearNext(r);continue}if(r.mixingFrom&&this.updateMixingFrom(r,e)){let h=r.mixingFrom;for(r.mixingFrom=null,h&&(h.mixingTo=null);h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=a}this.queue.drain()}updateMixingFrom(e,t){let i=e.mixingFrom;if(!i)return!0;let n=this.updateMixingFrom(i,t);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,e.nextTrackLast!=-1&&e.mixTime>=e.mixDuration?((i.totalAlpha==0||e.mixDuration==0)&&(e.mixingFrom=i.mixingFrom,i.mixingFrom!=null&&(i.mixingFrom.mixingTo=e),e.interruptAlpha=i.interruptAlpha,this.queue.end(i)),n):(i.trackTime+=t*i.timeScale,e.mixTime+=t,!1)}apply(e){if(!e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let t=this.events,i=this.tracks,n=!1;for(let d=0,f=i.length;d0)continue;n=!0;let m=d==0?Ce.first:p.mixBlend,g=p.alpha;p.mixingFrom?g*=this.applyMixingFrom(p,e,m):p.trackTime>=p.trackEnd&&!p.next&&(g=0);let v=g>=p.alphaAttachmentThreshold,b=p.animationLast,y=p.getAnimationTime(),w=y,A=t;p.reverse&&(w=p.animation.duration-w,A=null);let T=p.animation.timelines,_=T.length;if(d==0&&g==1||m==Ce.add){d==0&&(v=!0);for(let R=0;R<_;R++){var r=T[R];r instanceof co?this.applyAttachmentTimeline(r,e,w,m,v):r.apply(e,b,w,A,g,m,es.mixIn)}}else{let R=p.timelineMode,P=p.shortestRotation,F=!P&&p.timelinesRotation.length!=_<<1;F&&(p.timelinesRotation.length=_<<1);for(let I=0;I<_;I++){let k=T[I],B=R[I]==bf?m:Ce.setup;!P&&k instanceof Oh?this.applyRotateTimeline(k,e,w,g,B,p.timelinesRotation,I<<1,F):k instanceof co?this.applyAttachmentTimeline(k,e,w,m,v):k.apply(e,b,w,A,g,B,es.mixIn)}}this.queueEvents(p,y),t.length=0,p.nextAnimationLast=y,p.nextTrackLast=p.trackTime}for(var a=this.unkeyedState+Xv,o=e.slots,h=0,l=e.slots.length;h1&&(r=1),i!=Ce.first&&(i=n.mixBlend));let a=r=n.alphaAttachmentThreshold):(o&&A instanceof gl&&_==Ce.setup&&(T=es.mixIn),A.apply(t,d,p,m,R,_,T))}}return e.mixDuration>0&&this.queueEvents(n,f),this.events.length=0,n.nextAnimationLast=f,n.nextTrackLast=n.trackTime,r}applyAttachmentTimeline(e,t,i,n,r){var a=t.slots[e.slotIndex];a.bone.active&&(i=0,y=m>=0;Math.abs(g)<=90&&$e.signum(g)!=$e.signum(p)&&(Math.abs(m-v)>180?(f+=360*$e.signum(m),y=b):v!=0?f-=360*$e.signum(m):y=b),y!=b&&(f+=360*$e.signum(m)),a[o]=f}a[o+1]=p,l.rotation=u+f*n}queueEvents(e,t){let i=e.animationStart,n=e.animationEnd,r=n-i,a=e.trackLast%r,o=this.events,h=0,l=o.length;for(;hn||this.queue.event(e,u)}let c=!1;if(e.loop)if(r==0)c=!0;else{const u=Math.floor(e.trackTime/r);c=u>0&&u>Math.floor(e.trackLast/r)}else c=t>=n&&e.animationLast=this.tracks.length)return;let t=this.tracks[e];if(!t)return;this.queue.end(t),this.clearNext(t);let i=t;for(;;){let n=i.mixingFrom;if(!n)break;this.queue.end(n),i.mixingFrom=null,i.mixingTo=null,i=n}this.tracks[t.trackIndex]=null,this.queue.drain()}setCurrent(e,t,i){let n=this.expandToIndex(e);this.tracks[e]=t,t.previous=null,n&&(i&&this.queue.interrupt(n),t.mixingFrom=n,n.mixingTo=t,t.mixTime=0,n.mixingFrom&&n.mixDuration>0&&(t.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(t)}setAnimation(e,t,i=!1){let n=this.data.skeletonData.findAnimation(t);if(!n)throw new Error("Animation not found: "+t);return this.setAnimationWith(e,n,i)}setAnimationWith(e,t,i=!1){if(!t)throw new Error("animation cannot be null.");let n=!0,r=this.expandToIndex(e);r&&(r.nextTrackLast==-1?(this.tracks[e]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,n=!1):this.clearNext(r));let a=this.trackEntry(e,t,i,r);return this.setCurrent(e,a,n),this.queue.drain(),a}addAnimation(e,t,i=!1,n=0){let r=this.data.skeletonData.findAnimation(t);if(!r)throw new Error("Animation not found: "+t);return this.addAnimationWith(e,r,i,n)}addAnimationWith(e,t,i=!1,n=0){if(!t)throw new Error("animation cannot be null.");let r=this.expandToIndex(e);if(r)for(;r.next;)r=r.next;let a=this.trackEntry(e,t,i,r);return r?(r.next=a,a.previous=r,n<=0&&(n=Math.max(n+r.getTrackComplete()-a.mixDuration,0))):(this.setCurrent(e,a,!0),this.queue.drain(),n<0&&(n=0)),a.delay=n,a}setEmptyAnimation(e,t=0){let i=this.setAnimationWith(e,lr.emptyAnimation(),!1);return i.mixDuration=t,i.trackEnd=t,i}addEmptyAnimation(e,t=0,i=0){let n=this.addAnimationWith(e,lr.emptyAnimation(),!1,i);return i<=0&&(n.delay=Math.max(n.delay+n.mixDuration-t,0)),n.mixDuration=t,n.trackEnd=t,n}setEmptyAnimations(e=0){let t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let i=0,n=this.tracks.length;i0){r[h]=lR,a[h]=u;continue e}break}r[h]=wf}}}getCurrent(e){return e>=this.tracks.length?null:this.tracks[e]}addListener(e){if(!e)throw new Error("listener cannot be null.");this.listeners.push(e)}removeListener(e){let t=this.listeners.indexOf(e);t>=0&&this.listeners.splice(t,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},x(lr,"_emptyAnimation",new Tp("",[],0)),lr),aR=class{constructor(){x(this,"animation",null);x(this,"previous",null);x(this,"next",null);x(this,"mixingFrom",null);x(this,"mixingTo",null);x(this,"listener",null);x(this,"trackIndex",0);x(this,"loop",!1);x(this,"holdPrevious",!1);x(this,"reverse",!1);x(this,"shortestRotation",!1);x(this,"eventThreshold",0);x(this,"mixAttachmentThreshold",0);x(this,"alphaAttachmentThreshold",0);x(this,"mixDrawOrderThreshold",0);x(this,"animationStart",0);x(this,"animationEnd",0);x(this,"animationLast",0);x(this,"nextAnimationLast",0);x(this,"delay",0);x(this,"trackTime",0);x(this,"trackLast",0);x(this,"nextTrackLast",0);x(this,"trackEnd",0);x(this,"timeScale",0);x(this,"alpha",0);x(this,"mixTime",0);x(this,"_mixDuration",0);x(this,"interruptAlpha",0);x(this,"totalAlpha",0);x(this,"mixBlend",Ce.replace);x(this,"timelineMode",new Array);x(this,"timelineHoldMix",new Array);x(this,"timelinesRotation",new Array)}get mixDuration(){return this._mixDuration}set mixDuration(e){this._mixDuration=e}setMixDurationWithDelay(e,t){this._mixDuration=e,t<=0&&(this.previous!=null?t=Math.max(t+this.previous.getTrackComplete()-e,0):t=0),this.delay=t}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let e=this.animationEnd-this.animationStart;return e==0?this.animationStart:this.trackTime%e+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(e){this.animationLast=e,this.nextAnimationLast=e}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){let e=this.animationEnd-this.animationStart;if(e!=0){if(this.loop)return e*(1+(this.trackTime/e|0));if(this.trackTime=0}},oR=class{constructor(e){x(this,"objects",[]);x(this,"drainDisabled",!1);x(this,"animState");this.animState=e}start(e){this.objects.push(ps.start),this.objects.push(e),this.animState.animationsChanged=!0}interrupt(e){this.objects.push(ps.interrupt),this.objects.push(e)}end(e){this.objects.push(ps.end),this.objects.push(e),this.animState.animationsChanged=!0}dispose(e){this.objects.push(ps.dispose),this.objects.push(e)}complete(e){this.objects.push(ps.complete),this.objects.push(e)}event(e,t){this.objects.push(ps.event),this.objects.push(e),this.objects.push(t)}drain(){if(this.drainDisabled)return;this.drainDisabled=!0;let e=this.objects;for(let t=0;t{c.width=parseInt(i[1]),c.height=parseInt(i[2])},n.format=()=>{},n.filter=c=>{c.minFilter=Ge.enumValue(Bi,i[1]),c.magFilter=Ge.enumValue(Bi,i[2])},n.repeat=c=>{i[1].indexOf("x")!=-1&&(c.uWrap=ur.Repeat),i[1].indexOf("y")!=-1&&(c.vWrap=ur.Repeat)},n.pma=c=>{c.pma=i[1]=="true"};var r={};r.xy=c=>{c.x=parseInt(i[1]),c.y=parseInt(i[2])},r.size=c=>{c.width=parseInt(i[1]),c.height=parseInt(i[2])},r.bounds=c=>{c.x=parseInt(i[1]),c.y=parseInt(i[2]),c.width=parseInt(i[3]),c.height=parseInt(i[4])},r.offset=c=>{c.offsetX=parseInt(i[1]),c.offsetY=parseInt(i[2])},r.orig=c=>{c.originalWidth=parseInt(i[1]),c.originalHeight=parseInt(i[2])},r.offsets=c=>{c.offsetX=parseInt(i[1]),c.offsetY=parseInt(i[2]),c.originalWidth=parseInt(i[3]),c.originalHeight=parseInt(i[4])},r.rotate=c=>{let u=i[1];u=="true"?c.degrees=90:u!="false"&&(c.degrees=parseInt(u))},r.index=c=>{c.index=parseInt(i[1])};let a=t.readLine();for(;a&&a.trim().length==0;)a=t.readLine();for(;!(!a||a.trim().length==0||t.readEntry(i,a)==0);)a=t.readLine();let o=null,h=null,l=null;for(;a!==null;)if(a.trim().length==0)o=null,a=t.readLine();else if(o){let c=new sw(o,a);for(;;){let u=t.readEntry(i,a=t.readLine());if(u==0)break;let d=r[i[0]];if(d)d(c);else{h||(h=[]),l||(l=[]),h.push(i[0]);let f=[];for(let p=0;p0&&l&&l.length>0&&(c.names=h,c.values=l,h=null,l=null),c.u=c.x/o.width,c.v=c.y/o.height,c.degrees==90?(c.u2=(c.x+c.height)/o.width,c.v2=(c.y+c.width)/o.height):(c.u2=(c.x+c.width)/o.width,c.v2=(c.y+c.height)/o.height),this.regions.push(c)}else{for(o=new mR(a.trim());t.readEntry(i,a=t.readLine())!=0;){let c=n[i[0]];c&&c(o)}this.pages.push(o)}}findRegion(e){for(let t=0;t=this.lines.length?null:this.lines[this.index++]}readEntry(e,t){if(!t||(t=t.trim(),t.length==0))return 0;let i=t.indexOf(":");if(i==-1)return 0;e[0]=t.substr(0,i).trim();for(let n=1,r=i+1;;n++){let a=t.indexOf(",",r);if(a==-1)return e[n]=t.substr(r).trim(),n;if(e[n]=t.substr(r,a-r).trim(),r=a+1,n==4)return 4}}},mR=class{constructor(e){x(this,"name");x(this,"minFilter",Bi.Nearest);x(this,"magFilter",Bi.Nearest);x(this,"uWrap",ur.ClampToEdge);x(this,"vWrap",ur.ClampToEdge);x(this,"texture",null);x(this,"width",0);x(this,"height",0);x(this,"pma",!1);x(this,"regions",new Array);this.name=e}setTexture(e){this.texture=e,e.setFilters(this.minFilter,this.magFilter),e.setWraps(this.uWrap,this.vWrap);for(let t of this.regions)t.texture=e}},sw=class extends dR{constructor(t,i){super();x(this,"page");x(this,"name");x(this,"x",0);x(this,"y",0);x(this,"offsetX",0);x(this,"offsetY",0);x(this,"originalWidth",0);x(this,"originalHeight",0);x(this,"index",0);x(this,"degrees",0);x(this,"names",null);x(this,"values",null);this.page=t,this.name=i,t.regions.push(this)}},Zl=class Tm extends vr{constructor(t,i){super(t);x(this,"region",null);x(this,"path");x(this,"regionUVs",[]);x(this,"uvs",[]);x(this,"triangles",[]);x(this,"color",new _t(1,1,1,1));x(this,"width",0);x(this,"height",0);x(this,"hullLength",0);x(this,"edges",[]);x(this,"parentMesh",null);x(this,"sequence",null);x(this,"tempColor",new _t(0,0,0,0));this.path=i}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.regionUVs;(!this.uvs||this.uvs.length!=t.length)&&(this.uvs=Ge.newFloatArray(t.length));let i=this.uvs,n=this.uvs.length,r=this.region.u,a=this.region.v,o=0,h=0;if(this.region instanceof sw){let l=this.region,c=l.page,u=c.width,d=c.height;switch(l.degrees){case 90:r-=(l.originalHeight-l.offsetY-l.height)/u,a-=(l.originalWidth-l.offsetX-l.width)/d,o=l.originalHeight/u,h=l.originalWidth/d;for(let f=0;f= 0.");if(!t)throw new Error("name cannot be null.");this.index=e,this.name=t,this.parent=i}};var gi;(function(s){s[s.Normal=0]="Normal",s[s.OnlyTranslation=1]="OnlyTranslation",s[s.NoRotationOrReflection=2]="NoRotationOrReflection",s[s.NoScale=3]="NoScale",s[s.NoScaleOrReflection=4]="NoScaleOrReflection"})(gi||(gi={}));let Vv=class{constructor(e,t,i){x(this,"data");x(this,"skeleton");x(this,"parent",null);x(this,"children",new Array);x(this,"x",0);x(this,"y",0);x(this,"rotation",0);x(this,"scaleX",0);x(this,"scaleY",0);x(this,"shearX",0);x(this,"shearY",0);x(this,"ax",0);x(this,"ay",0);x(this,"arotation",0);x(this,"ascaleX",0);x(this,"ascaleY",0);x(this,"ashearX",0);x(this,"ashearY",0);x(this,"a",0);x(this,"b",0);x(this,"c",0);x(this,"d",0);x(this,"worldY",0);x(this,"worldX",0);x(this,"inherit",gi.Normal);x(this,"sorted",!1);x(this,"active",!1);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.skeleton=t,this.parent=i,this.setToSetupPose()}isActive(){return this.active}update(e){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(e,t,i,n,r,a,o){this.ax=e,this.ay=t,this.arotation=i,this.ascaleX=n,this.ascaleY=r,this.ashearX=a,this.ashearY=o;let h=this.parent;if(!h){let f=this.skeleton;const p=f.scaleX,m=f.scaleY,g=(i+a)*$e.degRad,v=(i+90+o)*$e.degRad;this.a=Math.cos(g)*n*p,this.b=Math.cos(v)*r*p,this.c=Math.sin(g)*n*m,this.d=Math.sin(v)*r*m,this.worldX=e*p+f.x,this.worldY=t*m+f.y;return}let l=h.a,c=h.b,u=h.c,d=h.d;switch(this.worldX=l*e+c*t+h.worldX,this.worldY=u*e+d*t+h.worldY,this.inherit){case gi.Normal:{const f=(i+a)*$e.degRad,p=(i+90+o)*$e.degRad,m=Math.cos(f)*n,g=Math.cos(p)*r,v=Math.sin(f)*n,b=Math.sin(p)*r;this.a=l*m+c*v,this.b=l*g+c*b,this.c=u*m+d*v,this.d=u*g+d*b;return}case gi.OnlyTranslation:{const f=(i+a)*$e.degRad,p=(i+90+o)*$e.degRad;this.a=Math.cos(f)*n,this.b=Math.cos(p)*r,this.c=Math.sin(f)*n,this.d=Math.sin(p)*r;break}case gi.NoRotationOrReflection:{let f=1/this.skeleton.scaleX,p=1/this.skeleton.scaleY;l*=f,u*=p;let m=l*l+u*u,g=0;m>1e-4?(m=Math.abs(l*d*p-c*f*u)/m,c=u*m,d=l*m,g=Math.atan2(u,l)*$e.radDeg):(l=0,u=0,g=90-Math.atan2(d,c)*$e.radDeg);const v=(i+a-g)*$e.degRad,b=(i+o-g+90)*$e.degRad,y=Math.cos(v)*n,w=Math.cos(b)*r,A=Math.sin(v)*n,T=Math.sin(b)*r;this.a=l*y-c*A,this.b=l*w-c*T,this.c=u*y+d*A,this.d=u*w+d*T;break}case gi.NoScale:case gi.NoScaleOrReflection:{i*=$e.degRad;const f=Math.cos(i),p=Math.sin(i);let m=(l*f+c*p)/this.skeleton.scaleX,g=(u*f+d*p)/this.skeleton.scaleY,v=Math.sqrt(m*m+g*g);v>1e-5&&(v=1/v),m*=v,g*=v,v=Math.sqrt(m*m+g*g),this.inherit==gi.NoScale&&l*d-c*u<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(v=-v),i=Math.PI/2+Math.atan2(g,m);const b=Math.cos(i)*v,y=Math.sin(i)*v;a*=$e.degRad,o=(90+o)*$e.degRad;const w=Math.cos(a)*n,A=Math.cos(o)*r,T=Math.sin(a)*n,_=Math.sin(o)*r;this.a=m*w+b*T,this.b=m*A+b*_,this.c=g*w+y*T,this.d=g*A+y*_;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY,this.inherit=e.inherit}updateAppliedTransform(){let e=this.parent;if(!e){this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*$e.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*$e.radDeg;return}let t=e.a,i=e.b,n=e.c,r=e.d,a=1/(t*r-i*n),o=r*a,h=i*a,l=n*a,c=t*a,u=this.worldX-e.worldX,d=this.worldY-e.worldY;this.ax=u*o-d*h,this.ay=d*c-u*l;let f,p,m,g;if(this.inherit==gi.OnlyTranslation)f=this.a,p=this.b,m=this.c,g=this.d;else{switch(this.inherit){case gi.NoRotationOrReflection:{let A=Math.abs(t*r-i*n)/(t*t+n*n);i=-n*this.skeleton.scaleX*A/this.skeleton.scaleY,r=t*this.skeleton.scaleY*A/this.skeleton.scaleX,a=1/(t*r-i*n),o=r*a,h=i*a;break}case gi.NoScale:case gi.NoScaleOrReflection:let v=$e.cosDeg(this.rotation),b=$e.sinDeg(this.rotation);t=(t*v+i*b)/this.skeleton.scaleX,n=(n*v+r*b)/this.skeleton.scaleY;let y=Math.sqrt(t*t+n*n);y>1e-5&&(y=1/y),t*=y,n*=y,y=Math.sqrt(t*t+n*n),this.inherit==gi.NoScale&&a<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(y=-y);let w=$e.PI/2+Math.atan2(n,t);i=Math.cos(w)*y,r=Math.sin(w)*y,a=1/(t*r-i*n),o=r*a,h=i*a,l=n*a,c=t*a}f=o*this.a-h*this.c,p=o*this.b-h*this.d,m=c*this.c-l*this.a,g=c*this.d-l*this.b}if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+m*m),this.ascaleX>1e-4){let v=f*g-p*m;this.ascaleY=v/this.ascaleX,this.ashearY=-Math.atan2(f*p+m*g,v)*$e.radDeg,this.arotation=Math.atan2(m,f)*$e.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*$e.radDeg}getWorldRotationX(){return Math.atan2(this.c,this.a)*$e.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*$e.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}worldToLocal(e){let t=1/(this.a*this.d-this.b*this.c),i=e.x-this.worldX,n=e.y-this.worldY;return e.x=i*this.d*t-n*this.b*t,e.y=n*this.a*t-i*this.c*t,e}localToWorld(e){let t=e.x,i=e.y;return e.x=t*this.a+i*this.b+this.worldX,e.y=t*this.c+i*this.d+this.worldY,e}worldToParent(e){if(e==null)throw new Error("world cannot be null.");return this.parent==null?e:this.parent.worldToLocal(e)}parentToWorld(e){if(e==null)throw new Error("world cannot be null.");return this.parent==null?e:this.parent.localToWorld(e)}worldToLocalRotation(e){let t=$e.sinDeg(e),i=$e.cosDeg(e);return Math.atan2(this.a*t-this.c*i,this.d*i-this.b*t)*$e.radDeg+this.rotation-this.shearX}localToWorldRotation(e){e-=this.rotation-this.shearX;let t=$e.sinDeg(e),i=$e.cosDeg(e);return Math.atan2(i*this.c+t*this.d,i*this.a+t*this.b)*$e.radDeg}rotateWorld(e){e*=$e.degRad;const t=Math.sin(e),i=Math.cos(e),n=this.a,r=this.b;this.a=i*n-t*this.c,this.b=i*r-t*this.d,this.c=t*n+i*this.c,this.d=t*r+i*this.d}},Cu=class{constructor(e,t,i){x(this,"name");x(this,"order");x(this,"skinRequired");this.name=e,this.order=t,this.skinRequired=i}},lw=class{constructor(e,t){x(this,"data");x(this,"intValue",0);x(this,"floatValue",0);x(this,"stringValue",null);x(this,"time",0);x(this,"volume",0);x(this,"balance",0);if(!t)throw new Error("data cannot be null.");this.time=e,this.data=t}},cw=class{constructor(e){x(this,"name");x(this,"intValue",0);x(this,"floatValue",0);x(this,"stringValue",null);x(this,"audioPath",null);x(this,"volume",0);x(this,"balance",0);this.name=e}},pR=class{constructor(e,t){x(this,"data");x(this,"bones");x(this,"target");x(this,"bendDirection",0);x(this,"compress",!1);x(this,"stretch",!1);x(this,"mix",1);x(this,"softness",0);x(this,"active",!1);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(let n=0;n180?f-=360:f<-180&&(f+=360);let g=e.ascaleX,v=e.ascaleY;if(n||r){switch(e.inherit){case gi.NoScale:case gi.NoScaleOrReflection:p=t-e.worldX,m=i-e.worldY}const b=e.data.length*g;if(b>1e-4){const y=p*p+m*m;if(n&&yb*b){const w=(Math.sqrt(y)/b-1)*o+1;g*=w,a&&(v*=w)}}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+f*o,g,v,e.ashearX,e.ashearY)}apply2(e,t,i,n,r,a,o,h,l){if(e.inherit!=gi.Normal||t.inherit!=gi.Normal)return;let c=e.ax,u=e.ay,d=e.ascaleX,f=e.ascaleY,p=d,m=f,g=t.ascaleX,v=0,b=0,y=0;d<0?(d=-d,v=180,y=-1):(v=0,y=1),f<0&&(f=-f,y=-y),g<0?(g=-g,b=180):b=0;let w=t.ax,A=0,T=0,_=0,R=e.a,P=e.b,F=e.c,I=e.d,k=Math.abs(d-f)<=1e-4;!k||a?(A=0,T=R*w+e.worldX,_=F*w+e.worldY):(A=t.ay,T=R*w+P*A+e.worldX,_=F*w+I*A+e.worldY);let B=e.parent;if(!B)throw new Error("IK parent must itself have a parent.");R=B.a,P=B.b,F=B.c,I=B.d;let D=R*I-P*F,U=T-B.worldX,L=_-B.worldY;D=Math.abs(D)<=1e-4?0:1/D;let N=(U*I-L*P)*D-c,O=(L*R-U*F)*D-u,X=Math.sqrt(N*N+O*O),E=t.data.length*g,V,q;if(X<1e-4){this.apply1(e,i,n,!1,a,!1,l),t.updateWorldTransformWith(w,A,0,t.ascaleX,t.ascaleY,t.ashearX,t.ashearY);return}U=i-B.worldX,L=n-B.worldY;let W=(U*I-L*P)*D-c,J=(L*R-U*F)*D-u,K=W*W+J*J;if(h!=0){h*=d*(g+1)*.5;let we=Math.sqrt(K),Ee=we-X-E*d+h;if(Ee>0){let pe=Math.min(1,Ee/(h*2))-1;pe=(Ee-h*(1-pe*pe))/we,W-=pe*W,J-=pe*J,K=W*W+J*J}}e:if(k){E*=d;let we=(K-X*X-E*E)/(2*X*E);we<-1?(we=-1,q=Math.PI*r):we>1?(we=1,q=0,a&&(R=(Math.sqrt(K)/(X+E)-1)*l+1,p*=R,o&&(m*=R))):q=Math.acos(we)*r,R=X+E*we,P=E*Math.sin(q),V=Math.atan2(J*R-W*P,W*R+J*P)}else{R=d*E,P=f*E;let we=R*R,Ee=P*P,pe=Math.atan2(J,W);F=Ee*X*X+we*K-we*Ee;let Ae=-2*Ee*X,G=Ee-we;if(I=Ae*Ae-4*G*F,I>=0){let le=Math.sqrt(I);Ae<0&&(le=-le),le=-(Ae+le)*.5;let Oe=le/G,Fe=F/le,Be=Math.abs(Oe)=0){L=Math.sqrt(Oe)*r,V=pe-Math.atan2(L,Be),q=Math.atan2(L/f,(Be-X)/d);break e}}let Z=$e.PI,z=X-R,j=z*z,te=0,he=0,xe=X+R,oe=xe*xe,ge=0;F=-R*X/(we-Ee),F>=-1&&F<=1&&(F=Math.acos(F),U=R*Math.cos(F)+X,L=P*Math.sin(F),I=U*U+L*L,Ioe&&(he=F,oe=I,xe=U,ge=L)),K<=(j+oe)*.5?(V=pe-Math.atan2(te*r,z),q=Z*r):(V=pe-Math.atan2(ge*r,xe),q=he*r)}let fe=Math.atan2(A,w)*y,me=e.arotation;V=(V-fe)*$e.radDeg+v-me,V>180?V-=360:V<-180&&(V+=360),e.updateWorldTransformWith(c,u,me+V*l,p,m,0,0),me=t.arotation,q=((q+fe)*$e.radDeg-t.ashearX)*y+b-me,q>180?q-=360:q<-180&&(q+=360),t.updateWorldTransformWith(w,A,me+q*l,t.ascaleX,t.ascaleY,t.ashearX,t.ashearY)}},hw=class extends Cu{constructor(t){super(t,0,!1);x(this,"bones",new Array);x(this,"_target",null);x(this,"bendDirection",0);x(this,"compress",!1);x(this,"stretch",!1);x(this,"uniform",!1);x(this,"mix",0);x(this,"softness",0)}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},uw=class extends Cu{constructor(t){super(t,0,!1);x(this,"bones",new Array);x(this,"_target",null);x(this,"positionMode",Ln.Fixed);x(this,"spacingMode",ki.Fixed);x(this,"rotateMode",Pa.Chain);x(this,"offsetRotation",0);x(this,"position",0);x(this,"spacing",0);x(this,"mixRotate",0);x(this,"mixX",0);x(this,"mixY",0)}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}};var Ln;(function(s){s[s.Fixed=0]="Fixed",s[s.Percent=1]="Percent"})(Ln||(Ln={}));var ki;(function(s){s[s.Length=0]="Length",s[s.Fixed=1]="Fixed",s[s.Percent=2]="Percent",s[s.Proportional=3]="Proportional"})(ki||(ki={}));var Pa;(function(s){s[s.Tangent=0]="Tangent",s[s.Chain=1]="Chain",s[s.ChainScale=2]="ChainScale"})(Pa||(Pa={}));var Ji;let gR=(Ji=class{constructor(e,t){x(this,"data");x(this,"bones");x(this,"target");x(this,"position",0);x(this,"spacing",0);x(this,"mixRotate",0);x(this,"mixX",0);x(this,"mixY",0);x(this,"spaces",new Array);x(this,"positions",new Array);x(this,"world",new Array);x(this,"curves",new Array);x(this,"lengths",new Array);x(this,"segments",new Array);x(this,"active",!1);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(let n=0,r=e.bones.length;n0){w=u/w*p;for(let T=1;T0?$e.degRad:-.01745329277777778}for(let w=0,A=3;w0){let I=T.a,k=T.b,B=T.c,D=T.d,U=0,L=0,N=0;if(o?U=m[A-1]:d[w+1]==0?U=m[A+2]:U=Math.atan2(F,P),U-=Math.atan2(B,I),y){L=Math.cos(U),N=Math.sin(U);let O=T.data.length;g+=(O*(L*I-N*B)-P)*i,v+=(O*(N*I+L*B)-F)*i}else U+=b;U>$e.PI?U-=$e.PI2:U<-3.1415927&&(U+=$e.PI2),U*=i,L=Math.cos(U),N=Math.sin(U),T.a=L*I-N*B,T.b=L*k-N*D,T.c=N*I+L*B,T.d=N*k+L*D}T.updateAppliedTransform()}}computeWorldPositions(e,t,i){let n=this.target,r=this.position,a=this.spaces,o=Ge.setArraySize(this.positions,t*3+2),h=this.world,l=e.closed,c=e.worldVerticesLength,u=c/6,d=Ji.NONE;if(!e.constantSpeed){let O=e.lengths;u-=l?1:2;let X=O[u];this.data.positionMode==Ln.Percent&&(r*=X);let E;switch(this.data.spacingMode){case ki.Percent:E=X;break;case ki.Proportional:E=X/t;break;default:E=1}h=Ge.setArraySize(this.world,8);for(let V=0,q=0,W=0;VX){d!=Ji.AFTER&&(d=Ji.AFTER,e.computeWorldVertices(n,c-6,4,h,0,2)),this.addAfterPosition(K-X,h,0,o,q);continue}for(;;W++){let fe=O[W];if(!(K>fe)){if(W==0)K/=fe;else{let me=O[W-1];K=(K-me)/(fe-me)}break}}W!=d&&(d=W,l&&W==u?(e.computeWorldVertices(n,c-4,4,h,0,2),e.computeWorldVertices(n,0,4,h,4,2)):e.computeWorldVertices(n,W*6+2,8,h,0,2)),this.addCurvePosition(K,h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],o,q,i||V>0&&J==0)}return o}l?(c+=2,h=Ge.setArraySize(this.world,c),e.computeWorldVertices(n,2,c-4,h,0,2),e.computeWorldVertices(n,0,2,h,c-4,2),h[c-2]=h[0],h[c-1]=h[1]):(u--,c-=4,h=Ge.setArraySize(this.world,c),e.computeWorldVertices(n,2,c,h,0,2));let f=Ge.setArraySize(this.curves,u),p=0,m=h[0],g=h[1],v=0,b=0,y=0,w=0,A=0,T=0,_=0,R=0,P=0,F=0,I=0,k=0,B=0,D=0;for(let O=0,X=2;Op){this.addAfterPosition(W-p,h,c-4,o,X);continue}for(;;E++){let J=f[E];if(!(W>J)){if(E==0)W/=J;else{let K=f[E-1];W=(W-K)/(J-K)}break}}if(E!=d){d=E;let J=E*6;for(m=h[J],g=h[J+1],v=h[J+2],b=h[J+3],y=h[J+4],w=h[J+5],A=h[J+6],T=h[J+7],_=(m-v*2+y)*.03,R=(g-b*2+w)*.03,P=((v-y)*3-m+A)*.006,F=((b-w)*3-g+T)*.006,I=_*2+P,k=R*2+F,B=(v-m)*.3+_+P*.16666667,D=(b-g)*.3+R+F*.16666667,N=Math.sqrt(B*B+D*D),L[0]=N,J=1;J<8;J++)B+=I,D+=k,I+=P,k+=F,N+=Math.sqrt(B*B+D*D),L[J]=N;B+=I,D+=k,N+=Math.sqrt(B*B+D*D),L[8]=N,B+=I+P,D+=k+F,N+=Math.sqrt(B*B+D*D),L[9]=N,V=0}for(W*=N;;V++){let J=L[V];if(!(W>J)){if(V==0)W/=J;else{let K=L[V-1];W=V+(W-K)/(J-K)}break}}this.addCurvePosition(W*.1,m,g,v,b,y,w,A,T,o,X,i||O>0&&q==0)}return o}addBeforePosition(e,t,i,n,r){let a=t[i],o=t[i+1],h=t[i+2]-a,l=t[i+3]-o,c=Math.atan2(l,h);n[r]=a+e*Math.cos(c),n[r+1]=o+e*Math.sin(c),n[r+2]=c}addAfterPosition(e,t,i,n,r){let a=t[i+2],o=t[i+3],h=a-t[i],l=o-t[i+1],c=Math.atan2(l,h);n[r]=a+e*Math.cos(c),n[r+1]=o+e*Math.sin(c),n[r+2]=c}addCurvePosition(e,t,i,n,r,a,o,h,l,c,u,d){if(e==0||isNaN(e)){c[u]=t,c[u+1]=i,c[u+2]=Math.atan2(r-i,n-t);return}let f=e*e,p=f*e,m=1-e,g=m*m,v=g*m,b=m*e,y=b*3,w=m*y,A=y*e,T=t*v+n*w+a*A+h*p,_=i*v+r*w+o*A+l*p;c[u]=T,c[u+1]=_,d&&(e<.001?c[u+2]=Math.atan2(r-i,n-t):c[u+2]=Math.atan2(_-(i*g+r*b*2+o*f),T-(t*g+n*b*2+a*f)))}},x(Ji,"NONE",-1),x(Ji,"BEFORE",-2),x(Ji,"AFTER",-3),x(Ji,"epsilon",1e-5),Ji),vR=class{constructor(e,t){x(this,"data");x(this,"_bone",null);x(this,"inertia",0);x(this,"strength",0);x(this,"damping",0);x(this,"massInverse",0);x(this,"wind",0);x(this,"gravity",0);x(this,"mix",0);x(this,"_reset",!0);x(this,"ux",0);x(this,"uy",0);x(this,"cx",0);x(this,"cy",0);x(this,"tx",0);x(this,"ty",0);x(this,"xOffset",0);x(this,"xVelocity",0);x(this,"yOffset",0);x(this,"yVelocity",0);x(this,"rotateOffset",0);x(this,"rotateVelocity",0);x(this,"scaleOffset",0);x(this,"scaleVelocity",0);x(this,"active",!1);x(this,"skeleton");x(this,"remaining",0);x(this,"lastTime",0);this.data=e,this.skeleton=t,this.bone=t.bones[e.bone.index],this.inertia=e.inertia,this.strength=e.strength,this.damping=e.damping,this.massInverse=e.massInverse,this.wind=e.wind,this.gravity=e.gravity,this.mix=e.mix}set bone(e){this._bone=e}get bone(){if(this._bone)return this._bone;throw new Error("Bone not set.")}reset(){this.remaining=0,this.lastTime=this.skeleton.time,this._reset=!0,this.xOffset=0,this.xVelocity=0,this.yOffset=0,this.yVelocity=0,this.rotateOffset=0,this.rotateVelocity=0,this.scaleOffset=0,this.scaleVelocity=0}setToSetupPose(){const e=this.data;this.inertia=e.inertia,this.strength=e.strength,this.damping=e.damping,this.massInverse=e.massInverse,this.wind=e.wind,this.gravity=e.gravity,this.mix=e.mix}isActive(){return this.active}update(e){const t=this.mix;if(t==0)return;const i=this.data.x>0,n=this.data.y>0,r=this.data.rotate>0||this.data.shearX>0,a=this.data.scaleX>0,o=this.bone,h=o.data.length;switch(e){case Br.none:return;case Br.reset:this.reset();case Br.update:const l=this.skeleton,c=Math.max(this.skeleton.time-this.lastTime,0);this.remaining+=c,this.lastTime=l.time;const u=o.worldX,d=o.worldY;if(this._reset)this._reset=!1,this.ux=u,this.uy=d;else{let f=this.remaining,p=this.inertia,m=this.data.step,g=this.skeleton.data.referenceScale,v=-1,b=this.data.limit*c,y=b*Math.abs(l.scaleY);if(b*=Math.abs(l.scaleX),i||n){if(i){const w=(this.ux-u)*p;this.xOffset+=w>b?b:w<-b?-b:w,this.ux=u}if(n){const w=(this.uy-d)*p;this.yOffset+=w>y?y:w<-y?-y:w,this.uy=d}if(f>=m){v=Math.pow(this.damping,60*m);const w=this.massInverse*m,A=this.strength,T=this.wind*g*l.scaleX,_=this.gravity*g*l.scaleY;do i&&(this.xVelocity+=(T-this.xOffset*A)*w,this.xOffset+=this.xVelocity*m,this.xVelocity*=v),n&&(this.yVelocity-=(_+this.yOffset*A)*w,this.yOffset+=this.yVelocity*m,this.yVelocity*=v),f-=m;while(f>=m)}i&&(o.worldX+=this.xOffset*t*this.data.x),n&&(o.worldY+=this.yOffset*t*this.data.y)}if(r||a){let w=Math.atan2(o.c,o.a),A=0,T=0,_=0,R=this.cx-o.worldX,P=this.cy-o.worldY;if(R>b?R=b:R<-b&&(R=-b),P>y?P=y:P<-y&&(P=-y),r){_=(this.data.rotate+this.data.shearX)*t;let F=Math.atan2(P+this.ty,R+this.tx)-w-this.rotateOffset*_;this.rotateOffset+=(F-Math.ceil(F*$e.invPI2-.5)*$e.PI2)*p,F=this.rotateOffset*_+w,A=Math.cos(F),T=Math.sin(F),a&&(F=h*o.getWorldScaleX(),F>0&&(this.scaleOffset+=(R*A+P*T)*p/F))}else{A=Math.cos(w),T=Math.sin(w);const F=h*o.getWorldScaleX();F>0&&(this.scaleOffset+=(R*A+P*T)*p/F)}if(f=this.remaining,f>=m){v==-1&&(v=Math.pow(this.damping,60*m));const F=this.massInverse*m,I=this.strength,k=this.wind,B=Cp.yDown?-this.gravity:this.gravity,D=h/g;for(;;)if(f-=m,a&&(this.scaleVelocity+=(k*A-B*T-this.scaleOffset*I)*F,this.scaleOffset+=this.scaleVelocity*m,this.scaleVelocity*=v),r){if(this.rotateVelocity-=((k*T+B*A)*D+this.rotateOffset*I)*F,this.rotateOffset+=this.rotateVelocity*m,this.rotateVelocity*=v,f0){let f=0;this.data.rotate>0&&(f=l*this.data.rotate,c=Math.sin(f),u=Math.cos(f),d=o.b,o.b=u*d-c*o.d,o.d=c*d+u*o.d),f+=l*this.data.shearX,c=Math.sin(f),u=Math.cos(f),d=o.a,o.a=u*d-c*o.c,o.c=c*d+u*o.c}else l*=this.data.rotate,c=Math.sin(l),u=Math.cos(l),d=o.a,o.a=u*d-c*o.c,o.c=c*d+u*o.c,d=o.b,o.b=u*d-c*o.d,o.d=c*d+u*o.d}if(a){const l=1+this.scaleOffset*t*this.data.scaleX;o.a*=l,o.c*=l}e!=Br.pose&&(this.tx=h*o.a,this.ty=h*o.c),o.updateAppliedTransform()}translate(e,t){this.ux-=e,this.uy-=t,this.cx-=e,this.cy-=t}rotate(e,t,i){const n=i*$e.degRad,r=Math.cos(n),a=Math.sin(n),o=this.cx-e,h=this.cy-t;this.translate(o*r-h*a-o,o*a+h*r-h)}},yR=class{constructor(e,t){x(this,"data");x(this,"bone");x(this,"color");x(this,"darkColor",null);x(this,"attachment",null);x(this,"attachmentState",0);x(this,"sequenceIndex",-1);x(this,"deform",new Array);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("bone cannot be null.");this.data=e,this.bone=t,this.color=new _t,this.darkColor=e.darkColor?new _t:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(e){this.attachment!=e&&((!(e instanceof vr)||!(this.attachment instanceof vr)||e.timelineAttachment!=this.attachment.timelineAttachment)&&(this.deform.length=0),this.attachment=e,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}},xR=class{constructor(e,t){x(this,"data");x(this,"bones");x(this,"target");x(this,"mixRotate",0);x(this,"mixX",0);x(this,"mixY",0);x(this,"mixScaleX",0);x(this,"mixScaleY",0);x(this,"mixShearY",0);x(this,"temp",new Fh);x(this,"active",!1);if(!e)throw new Error("data cannot be null.");if(!t)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(let n=0;n0?$e.degRad:-.01745329277777778,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let v=0,b=g.length;v$e.PI?R-=$e.PI2:R<-3.1415927&&(R+=$e.PI2),R*=e;let P=Math.cos(R),F=Math.sin(R);y.a=P*w-F*T,y.b=P*A-F*_,y.c=F*w+P*T,y.d=F*A+P*_}if(o){let w=this.temp;h.localToWorld(w.set(this.data.offsetX,this.data.offsetY)),y.worldX+=(w.x-y.worldX)*t,y.worldY+=(w.y-y.worldY)*i}if(n!=0){let w=Math.sqrt(y.a*y.a+y.c*y.c);w!=0&&(w=(w+(Math.sqrt(l*l+u*u)-w+this.data.offsetScaleX)*n)/w),y.a*=w,y.c*=w}if(r!=0){let w=Math.sqrt(y.b*y.b+y.d*y.d);w!=0&&(w=(w+(Math.sqrt(c*c+d*d)-w+this.data.offsetScaleY)*r)/w),y.b*=w,y.d*=w}if(a>0){let w=y.b,A=y.d,T=Math.atan2(A,w),_=Math.atan2(d,c)-Math.atan2(u,l)-(T-Math.atan2(y.c,y.a));_>$e.PI?_-=$e.PI2:_<-3.1415927&&(_+=$e.PI2),_=T+(_+m)*a;let R=Math.sqrt(w*w+A*A);y.b=Math.cos(_)*R,y.d=Math.sin(_)*R}y.updateAppliedTransform()}}applyRelativeWorld(){let e=this.mixRotate,t=this.mixX,i=this.mixY,n=this.mixScaleX,r=this.mixScaleY,a=this.mixShearY,o=t!=0||i!=0,h=this.target,l=h.a,c=h.b,u=h.c,d=h.d,f=l*d-c*u>0?$e.degRad:-.01745329277777778,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let v=0,b=g.length;v$e.PI?R-=$e.PI2:R<-3.1415927&&(R+=$e.PI2),R*=e;let P=Math.cos(R),F=Math.sin(R);y.a=P*w-F*T,y.b=P*A-F*_,y.c=F*w+P*T,y.d=F*A+P*_}if(o){let w=this.temp;h.localToWorld(w.set(this.data.offsetX,this.data.offsetY)),y.worldX+=w.x*t,y.worldY+=w.y*i}if(n!=0){let w=(Math.sqrt(l*l+u*u)-1+this.data.offsetScaleX)*n+1;y.a*=w,y.c*=w}if(r!=0){let w=(Math.sqrt(c*c+d*d)-1+this.data.offsetScaleY)*r+1;y.b*=w,y.d*=w}if(a>0){let w=Math.atan2(d,c)-Math.atan2(u,l);w>$e.PI?w-=$e.PI2:w<-3.1415927&&(w+=$e.PI2);let A=y.b,T=y.d;w=Math.atan2(T,A)+(w-$e.PI/2+m)*a;let _=Math.sqrt(A*A+T*T);y.b=Math.cos(w)*_,y.d=Math.sin(w)*_}y.updateAppliedTransform()}}applyAbsoluteLocal(){let e=this.mixRotate,t=this.mixX,i=this.mixY,n=this.mixScaleX,r=this.mixScaleY,a=this.mixShearY,o=this.target,h=this.bones;for(let l=0,c=h.length;lt.data.name==e)??null}findTransformConstraint(e){if(!e)throw new Error("constraintName cannot be null.");return this.transformConstraints.find(t=>t.data.name==e)??null}findPathConstraint(e){if(!e)throw new Error("constraintName cannot be null.");return this.pathConstraints.find(t=>t.data.name==e)??null}findPhysicsConstraint(e){if(e==null)throw new Error("constraintName cannot be null.");return this.physicsConstraints.find(t=>t.data.name==e)??null}getBoundsRect(e){let t=new Fh,i=new Fh;return this.getBounds(t,i,void 0,e),{x:t.x,y:t.y,width:i.x,height:i.y}}getBounds(e,t,i=new Array(2),n=null){if(!e)throw new Error("offset cannot be null.");if(!t)throw new Error("size cannot be null.");let r=this.drawOrder,a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;for(let c=0,u=r.length;c=n.length&&(n.length=e+1),n[e]||(n[e]={}),n[e][t]=i}addSkin(e){for(let n=0;n= 0.");if(!t)throw new Error("name cannot be null.");if(!i)throw new Error("boneData cannot be null.");this.index=e,this.name=t,this.boneData=i}};var Vr;(function(s){s[s.Normal=0]="Normal",s[s.Additive=1]="Additive",s[s.Multiply=2]="Multiply",s[s.Screen=3]="Screen"})(Vr||(Vr={}));let mw=class extends Cu{constructor(t){super(t,0,!1);x(this,"bones",new Array);x(this,"_target",null);x(this,"mixRotate",0);x(this,"mixX",0);x(this,"mixY",0);x(this,"mixScaleX",0);x(this,"mixScaleY",0);x(this,"mixShearY",0);x(this,"offsetRotation",0);x(this,"offsetX",0);x(this,"offsetY",0);x(this,"offsetScaleX",0);x(this,"offsetScaleY",0);x(this,"offsetShearY",0);x(this,"relative",!1);x(this,"local",!1)}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},Cm=class{constructor(e){x(this,"scale",1);x(this,"attachmentLoader");x(this,"linkedMeshes",new Array);this.attachmentLoader=e}readSkeletonData(e){let t=this.scale,i=new Bh;i.name="";let n=new bR(e),r=n.readInt32(),a=n.readInt32();i.hash=a==0&&r==0?null:a.toString(16)+r.toString(16),i.version=n.readString(),i.x=n.readFloat(),i.y=n.readFloat(),i.width=n.readFloat(),i.height=n.readFloat(),i.referenceScale=n.readFloat()*t;let o=n.readBoolean();o&&(i.fps=n.readFloat(),i.imagesPath=n.readString(),i.audioPath=n.readString());let h=0;h=n.readInt(!0);for(let c=0;c>1&3,f.rotateMode=p>>3&3,(p&128)!=0&&(f.offsetRotation=n.readFloat()),f.position=n.readFloat(),f.positionMode==Ln.Fixed&&(f.position*=t),f.spacing=n.readFloat(),(f.spacingMode==ki.Length||f.spacingMode==ki.Fixed)&&(f.spacing*=t),f.mixRotate=n.readFloat(),f.mixX=n.readFloat(),f.mixY=n.readFloat(),i.pathConstraints.push(f)}h=n.readInt(!0);for(let c=0,u;c>4,e.readFloat())}n.push(T);break}}}}}let a=e.readInt(!0);if(a>0){let l=new gl(a),c=i.slots.length;for(let u=0;u=0;b--)p[b]=-1;let m=Ge.newArray(c-f,0),g=0,v=0;for(let b=0;b=0;b--)p[b]==-1&&(p[b]=m[--v]);l.setFrame(u,d,p)}n.push(l)}let o=e.readInt(!0);if(o>0){let l=new Ep(o);for(let c=0;c>>1^-(i&1)}readStringRef(){let e=this.readInt(!0);return e==0?null:this.strings[e-1]}readString(){let e=this.readInt(!0);switch(e){case 0:return null;case 1:return""}e--;let t="";for(let i=0;i>4){case 12:case 13:t+=String.fromCharCode((n&31)<<6|this.readByte()&63),i+=2;break;case 14:t+=String.fromCharCode((n&15)<<12|(this.readByte()&63)<<6|this.readByte()&63),i+=3;break;default:t+=String.fromCharCode(n),i++}}return t}readFloat(){let e=this.buffer.getFloat32(this.index);return this.index+=4,e}readBoolean(){return this.readByte()!=0}},wR=class{constructor(e,t,i,n,r){x(this,"parent");x(this,"skinIndex");x(this,"slotIndex");x(this,"mesh");x(this,"inheritTimeline");this.mesh=e,this.skinIndex=t,this.slotIndex=i,this.parent=n,this.inheritTimeline=r}},SR=class{constructor(e=null,t=null,i=0){x(this,"bones");x(this,"vertices");x(this,"length");this.bones=e,this.vertices=t,this.length=i}};var zn;(function(s){s[s.Region=0]="Region",s[s.BoundingBox=1]="BoundingBox",s[s.Mesh=2]="Mesh",s[s.LinkedMesh=3]="LinkedMesh",s[s.Path=4]="Path",s[s.Point=5]="Point",s[s.Clipping=6]="Clipping"})(zn||(zn={}));function qi(s,e,t){let i=s.readFloat(),n=s.readFloat()*t;for(let r=0,a=0,o=e.getFrameCount()-1;e.setFrame(r,i,n),r!=o;r++){let h=s.readFloat(),l=s.readFloat()*t;switch(s.readByte()){case Sn:e.setStepped(r);break;case Mn:Ft(s,e,a++,r,0,i,h,n,l,t)}i=h,n=l}return e}function Sf(s,e,t){let i=s.readFloat(),n=s.readFloat()*t,r=s.readFloat()*t;for(let a=0,o=0,h=e.getFrameCount()-1;e.setFrame(a,i,n,r),a!=h;a++){let l=s.readFloat(),c=s.readFloat()*t,u=s.readFloat()*t;switch(s.readByte()){case Sn:e.setStepped(a);break;case Mn:Ft(s,e,o++,a,0,i,l,n,c,t),Ft(s,e,o++,a,1,i,l,r,u,t)}i=l,n=c,r=u}return e}function Ft(s,e,t,i,n,r,a,o,h,l){e.setBezier(t,i,n,r,o,s.readFloat(),s.readFloat()*l,s.readFloat(),s.readFloat()*l,a,h)}const MR=0,_R=1,TR=2,AR=3,ER=4,CR=5,IR=6,RR=7,PR=8,kR=9,FR=10,OR=0,BR=1,LR=2,DR=3,NR=4,UR=5,XR=0,VR=1,YR=0,$R=1,GR=2,HR=0,jR=1,WR=2,zR=4,qR=5,KR=6,ZR=7,JR=8,Sn=1,Mn=2;class gs{constructor(){x(this,"convexPolygons",new Array);x(this,"convexPolygonsIndices",new Array);x(this,"indicesArray",new Array);x(this,"isConcaveArray",new Array);x(this,"triangles",new Array);x(this,"polygonPool",new kh(()=>new Array));x(this,"polygonIndicesPool",new kh(()=>new Array))}triangulate(e){let t=e,i=e.length>>1,n=this.indicesArray;n.length=0;for(let o=0;o3;){let o=i-1,h=0,l=1;for(;;){e:if(!r[h]){let d=n[o]<<1,f=n[h]<<1,p=n[l]<<1,m=t[d],g=t[d+1],v=t[f],b=t[f+1],y=t[p],w=t[p+1];for(let A=(l+1)%i;A!=o;A=(A+1)%i){if(!r[A])continue;let T=n[A]<<1,_=t[T],R=t[T+1];if(gs.positiveArea(y,w,m,g,_,R)&&gs.positiveArea(m,g,v,b,_,R)&&gs.positiveArea(v,b,y,w,_,R))break e}break}if(l==0){do{if(!r[h])break;h--}while(h>0);break}o=h,h=l,l=(l+1)%i}a.push(n[(i+h-1)%i]),a.push(n[h]),a.push(n[(h+1)%i]),n.splice(h,1),r.splice(h,1),i--;let c=(i+h-1)%i,u=h==i?0:h;r[c]=gs.isConcave(c,i,t,n),r[u]=gs.isConcave(u,i,t,n)}return i==3&&(a.push(n[2]),a.push(n[0]),a.push(n[1])),a}decompose(e,t){let i=e,n=this.convexPolygons;this.polygonPool.freeAll(n),n.length=0;let r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;let a=this.polygonIndicesPool.obtain();a.length=0;let o=this.polygonPool.obtain();o.length=0;let h=-1,l=0;for(let c=0,u=t.length;c0?(n.push(o),r.push(a)):(this.polygonPool.free(o),this.polygonIndicesPool.free(a)),o=this.polygonPool.obtain(),o.length=0,o.push(m),o.push(g),o.push(v),o.push(b),o.push(y),o.push(w),a=this.polygonIndicesPool.obtain(),a.length=0,a.push(d),a.push(f),a.push(p),l=gs.winding(m,g,v,b,y,w),h=d)}o.length>0&&(n.push(o),r.push(a));for(let c=0,u=n.length;c=0;c--)o=n[c],o.length==0&&(n.splice(c,1),this.polygonPool.free(o),a=r[c],r.splice(c,1),this.polygonIndicesPool.free(a));return n}static isConcave(e,t,i,n){let r=n[(t+e-1)%t]<<1,a=n[e]<<1,o=n[(e+1)%t]<<1;return!this.positiveArea(i[r],i[r+1],i[a],i[a+1],i[o],i[o+1])}static positiveArea(e,t,i,n,r,a){return e*(a-n)+i*(t-a)+r*(n-t)>=0}static winding(e,t,i,n,r,a){let o=i-e,h=n-t;return r*h-a*o+o*t-e*h>=0?1:-1}}class Lh{constructor(){x(this,"triangulator",new gs);x(this,"clippingPolygon",new Array);x(this,"clipOutput",new Array);x(this,"clippedVertices",new Array);x(this,"clippedUVs",new Array);x(this,"clippedTriangles",new Array);x(this,"scratch",new Array);x(this,"clipAttachment",null);x(this,"clippingPolygons",null)}clipStart(e,t){if(this.clipAttachment)return 0;this.clipAttachment=t;let i=t.worldVerticesLength,n=Ge.setArraySize(this.clippingPolygon,i);t.computeWorldVertices(e,0,i,n,0,2);let r=this.clippingPolygon;Lh.makeClockwise(r);let a=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r));for(let o=0,h=a.length;o>1,T=this.clipOutput,_=Ge.setArraySize(r,y+A*2);for(let P=0;P>1,q=this.clipOutput,W=Ge.setArraySize(l,D+V*f);for(let K=0;K>1,X=this.clipOutput,E=Ge.setArraySize(a,I+O*2),V=Ge.setArraySize(o,I+O*2);for(let W=0;W=2?(u=h,h=this.scratch):u=this.scratch,u.length=0,u.push(e),u.push(t),u.push(i),u.push(n),u.push(r),u.push(a),u.push(e),u.push(t),h.length=0;let d=o.length-4,f=o;for(let p=0;;p+=2){let m=f[p],g=f[p+1],v=m-f[p+2],b=g-f[p+3],y=h.length,w=u;for(let T=0,_=u.length-2;T<_;){let R=w[T],P=w[T+1];T+=2;let F=w[T],I=w[T+1],k=b*(m-F)>v*(g-I),B=b*(m-R)-v*(g-P);if(B>0){if(k){h.push(F),h.push(I);continue}let D=F-R,U=I-P,L=B/(D*b-U*v);if(L>=0&&L<=1)h.push(R+D*L),h.push(P+U*L);else{h.push(F),h.push(I);continue}}else if(k){let D=F-R,U=I-P,L=B/(D*b-U*v);if(L>=0&&L<=1)h.push(R+D*L),h.push(P+U*L),h.push(F),h.push(I);else{h.push(F),h.push(I);continue}}c=!0}if(y==h.length)return l.length=0,!0;if(h.push(h[0]),h.push(h[1]),p==d)break;let A=h;h=u,h.length=0,u=A}if(l!=h){l.length=0;for(let p=0,m=h.length-2;p>1;l0){let c=i.findPhysicsConstraint(o);if(!c)throw new Error("Physics constraint not found: "+o);l=i.physicsConstraints.indexOf(c)}for(let c in h){let u=h[c],d=u[0];if(!d)continue;let f=u.length;if(c=="reset"){const m=new Zb(f,l);for(let g=0;d!=null;d=u[g+1],g++)m.setFrame(g,re(d,"time",0));r.push(m);continue}let p;if(c=="inertia")p=new Gb(f,f,l);else if(c=="strength")p=new Hb(f,f,l);else if(c=="damping")p=new jb(f,f,l);else if(c=="mass")p=new Wb(f,f,l);else if(c=="wind")p=new zb(f,f,l);else if(c=="gravity")p=new qb(f,f,l);else if(c=="mix")p=new Kb(f,f,l);else continue;r.push(Ks(u,p,0,1))}}if(e.attachments)for(let o in e.attachments){let h=e.attachments[o],l=i.findSkin(o);if(!l)throw new Error("Skin not found: "+o);for(let c in h){let u=h[c],d=i.findSlot(c);if(!d)throw new Error("Slot not found: "+c);let f=d.index;for(let p in u){let m=u[p],g=l.getAttachment(f,p);for(let v in m){let b=m[v],y=b[0];if(y){if(v=="deform"){let w=g.bones,A=g.vertices,T=w?A.length/3*2:A.length,_=new Nb(b.length,b.length,f,g),R=re(y,"time",0);for(let P=0,F=0;;P++){let I,k=re(y,"vertices",null);if(!k)I=w?Ge.newFloatArray(T):A;else{I=Ge.newFloatArray(T);let L=re(y,"offset",0);if(Ge.arrayCopy(k,0,I,L,k.length),n!=1)for(let N=L,O=N+k.length;N=0;v--)d[v]==-1&&(d[v]=p[--g])}o.setFrame(l,re(u,"time",0),d)}r.push(o)}if(e.events){let o=new Ep(e.events.length),h=0;for(let l=0;l"u"&&(Math.fround=(function(s){return function(e){return s[0]=e,s[0]}})(new Float32Array(1)));if(typeof window<"u"&&window.PIXI){let s=window.require;window.require=e=>{if(s)return s(e);if(e.startsWith("@pixi/"))return window.PIXI}}const Kn=class Kn extends uR{constructor(t){super(t.resource.source);x(this,"texture");this.texture=gt.from(t)}static from(t){return Kn.textureMap.has(t)?Kn.textureMap.get(t):new Kn(t)}setFilters(t,i){this.texture.baseTexture.scaleMode=Kn.toPixiTextureFilter(t),this.texture.baseTexture.mipmap=Kn.toPixiMipMap(t)}setWraps(t,i){this.texture.baseTexture.wrapMode=Kn.toPixiTextureWrap(t)}dispose(){this.texture.destroy()}static toPixiTextureFilter(t){switch(t){case Bi.Nearest:case Bi.MipMapNearestLinear:case Bi.MipMapNearestNearest:return sn.NEAREST;case Bi.Linear:case Bi.MipMapLinearLinear:case Bi.MipMapLinearNearest:return sn.LINEAR;default:throw new Error(`Unknown texture filter: ${String(t)}`)}}static toPixiMipMap(t){switch(t){case Bi.Nearest:case Bi.Linear:return Ys.OFF;case Bi.MipMapNearestLinear:case Bi.MipMapNearestNearest:case Bi.MipMapLinearLinear:case Bi.MipMapLinearNearest:return Ys.ON;default:throw new Error(`Unknown texture filter: ${String(t)}`)}}static toPixiTextureWrap(t){switch(t){case ur.ClampToEdge:return an.CLAMP;case ur.MirroredRepeat:return an.MIRRORED_REPEAT;case ur.Repeat:return an.REPEAT;default:throw new Error(`Unknown texture wrap: ${String(t)}`)}}static toPixiBlending(t){switch(t){case Vr.Normal:return dt.NORMAL;case Vr.Additive:return dt.ADD;case Vr.Multiply:return dt.MULTIPLY;case Vr.Screen:return dt.SCREEN;default:throw new Error(`Unknown blendMode: ${String(t)}`)}}};x(Kn,"textureMap",new Map);let La=Kn;const Zn=class Zn extends Ll{constructor(){const t=new Sp;t.getBuffer("aVertexPosition").static=!1,t.getBuffer("aTextureCoord").static=!1;const i=new Ch(gt.EMPTY);super(t,i);x(this,"name","");x(this,"warnedTwoTint",!1)}updateFromSpineData(t,i,n,r,a,o,h,l){var v,b;this.texture=t.texture;const c=a/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((v=u.data)==null?void 0:v.length)!==c&&(u.data=new Float32Array(c));const d=this.geometry.getBuffer("aVertexPosition");((b=d.data)==null?void 0:b.length)!==c&&(d.data=new Float32Array(c));let f=0,p=u.data,m=d.data;for(let y=0;y0){let a=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),h=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));n=a(t.map(l=>{if(l=gP(l),l in Gv)return;Gv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":pP,c||(d.as="script"),d.crossOrigin="",d.href=l,h&&d.setAttribute("nonce",h),document.head.appendChild(d),c)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function r(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return n.then(a=>{for(const o of a||[])o.status==="rejected"&&r(o.reason);return e().catch(r)})};async function vw(){const[s,e]=await Promise.all([Hv(()=>import("./index-BUbc0qUx.js"),[]),Hv(()=>import("./index-B1oGFzi8.js"),__vite__mapDeps([0,1]))]);return{core:s,pixi:e}}async function vP(s,e,t){const{core:i,pixi:n}=await vw(),r=new i.TextureAtlas(e);return Ip(r,t,n.SpineTexture),{skeletonData:new i.SkeletonJson(new i.AtlasAttachmentLoader(r)).readSkeletonData(s),SpineClass:n.Spine}}async function yP(s,e,t){const{core:i,pixi:n}=await vw(),r=new i.TextureAtlas(e);return Ip(r,t,n.SpineTexture),{skeletonData:new i.SkeletonBinary(new i.AtlasAttachmentLoader(r)).readSkeletonData(s),SpineClass:n.Spine}}function Lr(s,e,t){const i=Number(s[e]);return Number.isFinite(i)?i:t}function xs(s,e,t,i){s[e]==null&&(s[e]=Lr(s,t,i))}function Rp(s,e,t){if(typeof s.curve!="number")return;const i=Lr(s,"time",0),r=Lr(e,"time",0)-i,a=s.curve,o=Lr(s,"c2",0),h=Lr(s,"c3",1),l=Lr(s,"c4",1);s.curve=t.flatMap(([c,u])=>[i+r*a,c+(u-c)*o,i+r*h,c+(u-c)*l]),delete s.c2,delete s.c3,delete s.c4}function Yr(s,e){if(Array.isArray(s))for(let t=0;t[Lr(i,r,a),Lr(n,r,a)]))}}function xP(s){if(Array.isArray(s))for(let e=0;eNumber.parseInt(i.slice(r,r+2),16)/255);return e?n:n.slice(0,3)}function jv(s,e){if(Array.isArray(s))for(let t=0;t[o,a[h]]))}}function bP(s){for(const e of s.bones||[])e.inherit==null&&e.transform!=null&&(e.inherit=e.transform);for(const e of s.transform||[])xs(e,"mixRotate","rotateMix",1),xs(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX),xs(e,"mixScaleX","scaleMix",1),e.mixScaleY==null&&(e.mixScaleY=e.mixScaleX),xs(e,"mixShearY","shearMix",1);for(const e of s.path||[])xs(e,"mixRotate","rotateMix",1),xs(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX)}function wP(s){for(const e of s.skins||[])for(const t of Object.values(e.attachments||{}))for(const i of Object.values(t||{}))i.parent!=null&&i.timelines==null&&i.deform!=null&&(i.timelines=i.deform)}function SP(s){for(const e of Object.values(s.slots||{}))e.color&&!e.rgba&&(e.rgba=e.color,delete e.color),e.twoColor&&!e.rgba2&&(e.rgba2=e.twoColor,delete e.twoColor),jv(e.rgba,!1),jv(e.rgba2,!0)}function MP(s){for(const e of Object.values(s.bones||{})){for(const t of e.rotate||[])xs(t,"value","angle",0);Yr(e.rotate,[{key:"value",fallback:0}]),Yr(e.translate,[{key:"x",fallback:0},{key:"y",fallback:0}]),Yr(e.scale,[{key:"x",fallback:1},{key:"y",fallback:1}]),Yr(e.shear,[{key:"x",fallback:0},{key:"y",fallback:0}])}}function _P(s){for(const e of Object.values(s.ik||{}))Yr(e,[{key:"mix",fallback:1},{key:"softness",fallback:0}])}function TP(s){for(const e of Object.values(s.transform||{})){for(const t of e)xs(t,"mixRotate","rotateMix",1),xs(t,"mixX","translateMix",1),t.mixY==null&&(t.mixY=t.mixX),xs(t,"mixScaleX","scaleMix",1),t.mixScaleY==null&&(t.mixScaleY=t.mixScaleX),xs(t,"mixShearY","shearMix",1);Yr(e,[{key:"mixRotate",fallback:1},{key:"mixX",fallback:1},{key:"mixY",fallback:1},{key:"mixScaleX",fallback:1},{key:"mixScaleY",fallback:1},{key:"mixShearY",fallback:1}])}}function AP(s){for(const e of Object.values(s.path||{})){for(const i of["position","spacing"]){const n=e[i];for(const r of n||[])xs(r,"value",i,0);Yr(n,[{key:"value",fallback:0}])}const t=e.mix;for(const i of t||[])xs(i,"mixRotate","rotateMix",1),xs(i,"mixX","translateMix",1),i.mixY==null&&(i.mixY=i.mixX);Yr(t,[{key:"mixRotate",fallback:1},{key:"mixX",fallback:1},{key:"mixY",fallback:1}])}}function EP(s){if(!s.deform)return;const e=s.attachments||(s.attachments={});for(const[t,i]of Object.entries(s.deform)){const n=e[t]||(e[t]={});for(const[r,a]of Object.entries(i)){const o=n[r]||(n[r]={});for(const[h,l]of Object.entries(a)){const c=o[h]||(o[h]={});c.deform=l,xP(l)}}}delete s.deform}function yw(s){bP(s),wP(s);for(const e of Object.values(s.animations||{}))SP(e),MP(e),_P(e),TP(e),AP(e),EP(e),!e.drawOrder&&e.draworder&&(e.drawOrder=e.draworder);return s}function CP(s){return s.replace(/\\/g,"/").split("/").pop()||s}async function IP(s){const e=await Promise.all(s.map(async t=>{const i=URL.createObjectURL(t);try{return[CP(t.name).toLowerCase(),await gt.fromURL(i)]}finally{URL.revokeObjectURL(i)}}));return new Map(e)}function RP(s){const e=new Map;return s.bones.map(t=>{var r;const i=((r=t.parent)==null?void 0:r.name)||null,n=i?(e.get(i)||0)+1:0;return e.set(t.name,n),{name:t.name,parent:i,depth:n}})}async function xw(s,e,t){var a;if(!/\.(json|skel)$/i.test(s.name))throw new Error("Spine 数据仅支持 .json 或 .skel");if(!/\.atlas$/i.test(e.name))throw new Error("图集文件仅支持 .atlas");if(!t.length)throw new Error("请至少选择一张纹理图片");const i=await e.text(),n=await IP(t),r=[...n.values()];try{let o,h,l=null,c;if(/\.skel$/i.test(s.name)){const u=await s.arrayBuffer();try{({skeletonData:o,SpineClass:h}=await yP(u,i,n)),c="4.3"}catch(d){try{({skeletonData:o,SpineClass:h}=mP(u,i,n)),c="4.2"}catch(f){const p=d instanceof Error?d.message:String(d),m=f instanceof Error?f.message:String(f);throw new Error(`Spine 二进制解析失败(4.3:${p};旧版:${m})`)}}l=Ph(o.version)}else{let u;try{u=JSON.parse(await s.text())}catch{throw new Error("Spine JSON 文件格式无效")}if(l=Ph((a=u==null?void 0:u.skeleton)==null?void 0:a.spine),!l)throw new Error(`Spine JSON 版本不受支持,仅支持 ${Mm()}`);c=jI(l),l==="3.8"&&yw(u);const d=c==="4.3"?await vP(u,i,n):fP(u,i,n);o=d.skeletonData,h=d.SpineClass}if(!l)throw new Error(`Spine 数据版本不受支持,仅支持 ${Mm()}`);return{skeletonData:o,textures:r,runtimeVersion:c,SpineClass:h,dataVersion:l,animations:o.animations.map(u=>({name:u.name,duration:u.duration})),bones:RP(o)}}catch(o){for(const h of r)h.destroy(!0);throw o}}function Jc(s){return new Promise((e,t)=>{const i=new FileReader;i.onload=()=>e(String(i.result||"")),i.onerror=()=>t(i.error),i.readAsDataURL(s)})}async function PP(s,e,t){return{skeleton:{name:s.name,dataUrl:await Jc(s)},atlas:{name:e.name,dataUrl:await Jc(e)},textures:await Promise.all(t.map(async i=>({name:i.name,dataUrl:await Jc(i)})))}}async function _f(s){const e=await fetch(s.dataUrl);if(!e.ok)throw new Error(`无法读取内嵌 Spine 文件:${s.name}`);return new File([await e.blob()],s.name)}async function kP(s){return{skeleton:await _f(s.skeleton),atlas:await _f(s.atlas),textures:await Promise.all(s.textures.map(_f))}}const bw="SpineParticle.EditorConfig",ww=1;function Sw(s){return{backgroundX:s.backgroundX,backgroundY:s.backgroundY,backgroundOpacity:s.backgroundOpacity,backgroundImageName:s.backgroundImageName,backgroundImageData:s.backgroundImageData,showGrid:s.showGrid,exportSettings:hi(s.exportSettings)}}function FP(s){return JSON.parse(JSON.stringify(s,(e,t)=>{if(!(e==="texture"||e==="trailTexture"||e==="frames"))return t}))}function Mw(s){const e=hi(s);return delete e.tags,delete e.selectedTag,e}function OP(s){const e=Sw(s.settings);return FP({format:bw,version:ww,savedAt:new Date().toISOString(),editor:hi(s.editor),settings:e,timeline:{fps:s.timeline.fps,loop:s.timeline.loop,playbackStart:s.timeline.playbackStart,playbackEnd:s.timeline.playbackEnd,animations:[...s.timeline.animations]},selection:{type:s.activeObjectType,id:s.activeObjectId},scene:{systems:s.systems.map(t=>({...hi(t),frames:void 0})),colliders:s.colliders.map(Mw),paths:hi(s.paths),spines:hi(s.spines)}})}function BP(){return`SpineParticle-${new Date().toISOString().replace(/[-:]/g,"").replace(/\.\d{3}Z$/,"").replace("T","-")}.json`}function _w(s){const e=OP(s),t=new Blob([JSON.stringify(e,null,2)],{type:"application/json;charset=utf-8"}),i=URL.createObjectURL(t),n=document.createElement("a");return n.href=i,n.download=BP(),document.body.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(i),0),e}function Tw(s){let e;try{e=JSON.parse(s)}catch{throw new Error("配置文件不是有效的 JSON")}const t=e;if(t.format!==bw)throw new Error("不是 SpineParticle 编辑器配置文件");if(t.version!==ww)throw new Error(`暂不支持配置版本:${t.version??"未知"}`);if(!t.scene||!Array.isArray(t.scene.systems)||!Array.isArray(t.scene.colliders)||!Array.isArray(t.scene.paths)||!Array.isArray(t.scene.spines))throw new Error("配置文件缺少完整场景数据");return t}async function LP(s){const e=new Map,t=n=>{const r=n==="/particles/star.png"?"/images/star.png":n==="/trails/trail.png"?"/images/trail.png":n||"/images/star.png";let a=e.get(r);return a||(a=gt.fromURL(r).then(o=>Dr(o)),e.set(r,a)),a},i=await t("/images/star.png");await Promise.all(s.map(async n=>{var a;const r=Wr(n.config);r.texture=i,await Promise.all(r.imageResources.map(async o=>{o.texture=await t(o.previewUrl||"/images/star.png"),await Promise.all(o.sequenceFrames.map(async h=>{h.texture=await t(h.previewUrl||o.previewUrl||"/images/star.png")}))})),await Promise.all(r.trailResources.map(async o=>{o.texture=await t(o.previewUrl||"/images/trail.png")})),r.trailTexture=((a=r.trailResources[0])==null?void 0:a.texture)||null,n.frames=[]}))}async function DP(s){const e=new Map;try{for(const t of s){if(!t.sourceBundle)continue;const i=await kP(t.sourceBundle);e.set(t.id,await xw(i.skeleton,i.atlas,i.textures))}return e}catch(t){for(const i of e.values())for(const n of i.textures)n.destroy(!0);throw t}}function NP(s,e){const t=(e==null?void 0:e.type)||"particle",i=Number(e==null?void 0:e.id)||0;(t==="particle"?s.systems.some(r=>r.id===i):t==="collision"?s.colliders.some(r=>r.id===i):t==="path"?s.paths.some(r=>r.id===i):s.spines.some(r=>r.id===i))?s.selectSceneObject(t,i):s.systems[0]?s.selectSceneObject("particle",s.systems[0].id):s.colliders[0]?s.selectSceneObject("collision",s.colliders[0].id):s.paths[0]?s.selectSceneObject("path",s.paths[0].id):s.spines[0]?s.selectSceneObject("spine",s.spines[0].id):(s.activeObjectType="particle",s.activeObjectId=0,s.activeId=0)}async function UP(s,e){var c,u,d,f,p,m,g;const t=Tw(JSON.stringify(e)),i=hi(t.scene.systems),n=t.scene.colliders.map(Mw),r=hi(t.scene.paths),a=hi(t.scene.spines);for(const v of a)v.sourceBundle==null&&(v.sourceBundle=null),v.dataVersion==null&&(v.dataVersion="");await LP(i);const o=await DP(a),h=new Map(s.spines.map(v=>[v.id,v.assetVersion]));for(const v of s.spines)ql(v.id);s.systems=i,s.colliders=n,s.paths=r,s.spines=a,Object.assign(s.editor,hi(t.editor||{}));const l=t.settings;if(l)for(const v of["backgroundX","backgroundY","backgroundOpacity","backgroundImageName","backgroundImageData","showGrid"])Object.prototype.hasOwnProperty.call(l,v)&&(s.settings[v]=l[v]);s.settings.exportSettings=m1((c=t.settings)==null?void 0:c.exportSettings),s.settings.undoLimit=Math.min(200,Math.max(1,Math.round(Number(s.settings.undoLimit)||20))),s.timeline.fps=Math.max(1,Math.round(Number((u=t.timeline)==null?void 0:u.fps)||30)),s.timeline.loop=((d=t.timeline)==null?void 0:d.loop)!==!1,s.timeline.animations=Array.isArray((f=t.timeline)==null?void 0:f.animations)&&t.timeline.animations.length?[...new Set(t.timeline.animations.filter(v=>typeof v=="string"&&v.trim()).map(v=>v.trim()))]:["animation"];for(const v of s.spines){const b=o.get(v.id);if(v.assetVersion=Math.max(Number(v.assetVersion)||0,h.get(v.id)||0)+1,!b){v.status="empty",v.error=v.skeletonFileName?"配置未包含可复用的 Spine 原始资源":"",v.animations=[],v.bones=[],v.selectedAnimation="";continue}Au(v.id,b),v.dataVersion=b.dataVersion,v.animations=b.animations,v.bones=b.bones,b.animations.some(y=>y.name===v.selectedAnimation)||(v.selectedAnimation=((p=b.animations[0])==null?void 0:p.name)||""),v.status="ready",v.error=""}s.syncSceneSequences(),NP(s,t.selection),s.timeline.playbackStart=Math.max(0,Math.floor(Number((m=t.timeline)==null?void 0:m.playbackStart)||0)),s.timeline.playbackEnd=Math.max(1,Math.floor(Number((g=t.timeline)==null?void 0:g.playbackEnd)||Number.MAX_SAFE_INTEGER)),s.timeline.frame=0,s.timeline.recorded=!1,s.timeline.playing=!0;for(const v of s.systems)s.timeline.animations.includes(v.animation)||(v.animation=s.timeline.animations[0]);return s.recalcTotalFrames(),s.timeline.frame=s.timeline.playbackStart,t}async function Aw(s,e){return UP(s,Tw(e))}async function XP(s,e){if(!/\.json$/i.test(e.name))throw new Error("请选择 .json 配置文件");return Aw(s,await e.text())}const Iu=Da({undoCount:0});let Uh=null,nr=null,$r=[],Zo=null,rr=null,Xh=!1;function Pp(s){return{systems:s.systems.map(t=>{const i=hi(t);return i.frames=void 0,i}),colliders:hi(s.colliders),paths:hi(s.paths),spines:hi(s.spines),animations:[...s.timeline.animations],settings:Sw(s.settings)}}function kp(s){return JSON.stringify(s,(e,t)=>e==="texture"||e==="trailTexture"?null:typeof t=="string"&&t.startsWith("data:")&&t.length>256?`${t.length}:${t.slice(0,96)}:${t.slice(-48)}`:t)}function Ew(s,e=Pp(s),t=kp(e)){const i=new Map;for(const n of e.spines){const r=GI(n.id);r&&i.set(n.id,r)}return{data:e,signature:t,spineAssets:i}}function Vh(s){if(s){for(const e of s.spineAssets.values())YI(e);s.spineAssets.clear()}}function Cw(s){for(;$r.length>s;)Vh($r.shift()||null);Iu.undoCount=$r.length}function Iw(){const s=Uh;if(!s||!nr||Xh)return;const e=Pp(s),t=kp(e);t!==nr.signature&&($r.push(nr),nr=Ew(s,e,t),Cw(s.settings.undoLimit))}function VP(){Xh||(rr&&clearTimeout(rr),rr=setTimeout(()=>{rr=null,Iw()},250))}function YP(s){const e=s.activeObjectId;return s.activeObjectType==="particle"?s.systems.some(t=>t.id===e):s.activeObjectType==="collision"?s.colliders.some(t=>t.id===e):s.activeObjectType==="path"?s.paths.some(t=>t.id===e):s.spines.some(t=>t.id===e)}function $P(s){var t,i;if(!YP(s)){const n=s.systems[0],r=s.colliders[0],a=s.paths[0],o=s.spines[0];n?(s.activeObjectType="particle",s.activeObjectId=n.id):r?(s.activeObjectType="collision",s.activeObjectId=r.id):a?(s.activeObjectType="path",s.activeObjectId=a.id):(s.activeObjectType="spine",s.activeObjectId=(o==null?void 0:o.id)||0)}const e=s.activeObjectType==="particle"?s.systems.find(n=>n.id===s.activeObjectId):s.systems.find(n=>n.id===s.activeId);s.activeId=(e==null?void 0:e.id)||((t=s.systems[0])==null?void 0:t.id)||0,s.timeline.animation=(e==null?void 0:e.animation)||((i=s.systems[0])==null?void 0:i.animation)||s.timeline.animations[0]||"animation"}function GP(s,e){const t=nr;Xh=!0;try{for(const i of s.spines)ql(i.id);s.systems=hi(e.data.systems),s.colliders=hi(e.data.colliders),s.paths=hi(e.data.paths),s.spines=hi(e.data.spines),s.timeline.animations=[...e.data.animations],Object.assign(s.settings,hi(e.data.settings));for(const[i,n]of e.spineAssets)Au(i,n);for(const i of s.systems)i.frames=[];s.timeline.recorded=!1,s.timeline.playing=!1,$P(s),s.recalcTotalFrames(),nr=e}finally{Xh=!1,Vh(t)}}function HP(s){if(!(Uh===s&&Zo)){Zo==null||Zo(),rr&&clearTimeout(rr),Vh(nr);for(const e of $r)Vh(e);$r=[],Uh=s,nr=Ew(s),Iu.undoCount=0,Zo=fs(()=>kp(Pp(s)),VP,{flush:"post"})}}function jP(s,e){const t=Math.min(200,Math.max(1,Math.round(Number(e)||20)));s.settings.undoLimit=t,Cw(t)}function Tf(){const s=Uh;if(!s||!nr)return!1;rr&&(clearTimeout(rr),rr=null),Iw();const e=$r.pop();return e?(GP(s,e),Iu.undoCount=$r.length,!0):!1}function WP(s){const e=s instanceof HTMLElement?s:null;return!!(e!=null&&e.closest('input, textarea, select, [contenteditable="true"]'))}function zP(s){function e(i){var r;const n=i.target instanceof Node?i.target:null;s.canvasFocused.value=!!n&&!!((r=s.canvasElement.value)!=null&&r.contains(n))}function t(i){const n=i.key.toLowerCase();if((i.ctrlKey||i.metaKey)&&!i.altKey&&n==="s"){i.preventDefault(),i.stopPropagation(),s.save();return}if((i.ctrlKey||i.metaKey)&&!i.altKey&&n==="z"){i.preventDefault(),i.stopPropagation(),s.undo();return}if(i.ctrlKey||i.metaKey||i.altKey||WP(i.target))return;if(n==="d"){i.preventDefault(),s.togglePlay();return}if(n==="s"){i.preventDefault(),s.toStart();return}if(!s.canvasFocused.value)return;const r={q:"",w:"translate",e:"rotate",r:"scale"};n in r&&(i.preventDefault(),s.setTool(r[n]))}Kr(()=>{document.addEventListener("pointerdown",e,!0),window.addEventListener("keydown",t,!0)}),Gl(()=>{document.removeEventListener("pointerdown",e,!0),window.removeEventListener("keydown",t,!0)})}const qP={class:"help-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"help-title"},KP={class:"help-body"},ZP=["aria-expanded"],JP={class:"caret"},QP={class:"help-module-body"},ek=["aria-expanded"],tk={class:"caret"},ik={class:"help-module-body"},sk=["aria-expanded"],nk={class:"caret"},rk={class:"help-module-body"},ak=["aria-expanded"],ok={class:"caret"},lk={class:"help-module-body"},ck=["aria-expanded"],hk={class:"caret"},uk={class:"help-module-body"},dk=["aria-expanded"],fk={class:"caret"},mk={class:"help-module-body"},pk=["aria-expanded"],gk={class:"caret"},vk={class:"help-module-body"},yk=["aria-expanded"],xk={class:"caret"},bk={class:"help-module-body"},wk=["aria-expanded"],Sk={class:"caret"},Mk={class:"help-module-body"},_k=$s({__name:"HelpDialog",props:{show:{type:Boolean}},emits:["close"],setup(s,{emit:e}){const t=e,i=lt(Array.from({length:9},()=>!1));function n(){t("close")}function r(a){a.key==="Escape"&&n()}return Kr(()=>window.addEventListener("keydown",r)),$l(()=>window.removeEventListener("keydown",r)),(a,o)=>s.show?(ie(),ae("div",{key:0,class:"help-overlay",role:"presentation",onClick:bt(n,["self"])},[M("section",qP,[M("header",{class:"help-head"},[o[9]||(o[9]=M("div",null,[M("h2",{id:"help-title"},"使用说明"),M("p",null,"从创建粒子到保存、导出的快速入门")],-1)),M("button",{class:"help-close","aria-label":"关闭使用说明",title:"关闭 (Esc)",onClick:n},"✕")]),M("div",KP,[o[37]||(o[37]=Ts('

快速开始

  1. 创建对象:在左侧“场景对象”中用 +粒子 / +碰撞 / +路径 / +Spine 添加场景对象。
  2. 编辑粒子:选中某个粒子系统,依次调整“发射模式 → 发射器形状 → 粒子属性 → 外观与资源 → 修改器”。
  3. 查看效果:底部时间轴可播放、暂停、逐帧或拖动;修改任意参数后会自动重新计算。
  4. 保存与导出:用“保存配置”保留工程;“导出 Spine Json / images 包 / .spine 包”输出成品。

每个模块组标题右侧的“重置”可把该组参数恢复默认;系统设置会自动保存在当前浏览器。

常用操作

小眼睛
单独显示/隐藏对象;隐藏的粒子系统不会被导出。
+Copy
完整复制当前选中对象,方便对比不同参数。
背景图
上传参考图并调整位置和透明度,只用于画布预览。
系统设置
管理界面布局、辅助显示、刻度等,自动存入浏览器。
撤销/重做
Ctrl+Z 撤回一步;可达成的步数在系统设置中调整。
Spine 骨骼
在层级树搜索并选择骨骼,可用于粒子发射器跟随。

快捷键

Ctrl/⌘+Z撤回上一步
Ctrl/⌘+S保存配置
Q拖动画布
W位移工具
E旋转工具
R缩放工具
D播放 / 暂停
S回到第一帧

Q / W / E / R 需先点击画布;光标位于输入框时,单键快捷键不会触发。

功能模块详解
',3)),M("section",{class:Ze(["help-section help-module",{open:i.value[0]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[0]?"true":"false",onClick:o[0]||(o[0]=h=>i.value[0]=!i.value[0])},[o[10]||(o[10]=M("span",{class:"mnum"},"1",-1)),o[11]||(o[11]=M("span",{class:"mtitle"},"配置管理",-1)),M("span",JP,Xe(i.value[0]?"▾":"▸"),1)],8,ZP),ye(M("div",QP,[...o[12]||(o[12]=[Ts('
保存配置
把当前全部场景对象和参数保存为工程 JSON 文件(也支持 Ctrl+S)。
加载配置
选择本地配置文件,恢复完整工程。
预设
从下拉中选择已保存的预设快速套用;点击下拉即可刷新列表。
范围
配置只含对象与参数,不含“系统设置”;系统设置单独存于浏览器。
',1)])],512),[[Yi,i.value[0]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[1]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[1]?"true":"false",onClick:o[1]||(o[1]=h=>i.value[1]=!i.value[1])},[o[13]||(o[13]=M("span",{class:"mnum"},"2",-1)),o[14]||(o[14]=M("span",{class:"mtitle"},"场景对象",-1)),M("span",tk,Xe(i.value[1]?"▾":"▸"),1)],8,ek),ye(M("div",ik,[...o[15]||(o[15]=[Ts('
粒子
核心对象。可设名称、位置 X/Y、偏移、旋转、缩放 X/Y,以及“随机种子”——相同种子可精确复现同一次效果。
碰撞
圆形/椭圆/矩形/多边形/自定义;启用开关、碰撞响应(物理弹跳/暂停/销毁)、弹性与摩擦,还可沿某条路径移动并带进度曲线。
路径
贝塞尔路径,可双击新建/删除锚点、拖手柄调曲线;内置圆/方/多边形/星形预设,支持闭合与颜色。
Spine
加载 .json+.atlas+.png 预览骨骼动画,可查看/搜索骨骼层级树,用于粒子“发射器跟随”。
通用
每个对象都有小眼睛显隐;“+Copy”可以复制当前对象;隐藏的粒子系统不会进入导出。
',1)])],512),[[Yi,i.value[1]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[2]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[2]?"true":"false",onClick:o[2]||(o[2]=h=>i.value[2]=!i.value[2])},[o[16]||(o[16]=M("span",{class:"mnum"},"3",-1)),o[17]||(o[17]=M("span",{class:"mtitle"},"发射模式",-1)),M("span",nk,Xe(i.value[2]?"▾":"▸"),1)],8,sk),ye(M("div",rk,[...o[18]||(o[18]=[Ts('
持续
按“每秒发射数量”持续喷射;再分“常规持续”(发射时长)与“循环持续”(三段式:开始循环 / 纯循环 / 结束循环,可自动或自定义帧长,做到无缝衔接)。
爆发
一次性发射“单次数量”颗粒子。
延迟时间
粒子条左端位置,表示发射开始前的等待时间。
注意
循环持续模式不支持骨骼跟随和路径跟随;开关时会把跟随设置恢复默认。
',1)])],512),[[Yi,i.value[2]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[3]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[3]?"true":"false",onClick:o[3]||(o[3]=h=>i.value[3]=!i.value[3])},[o[19]||(o[19]=M("span",{class:"mnum"},"4",-1)),o[20]||(o[20]=M("span",{class:"mtitle"},"发射器形状",-1)),M("span",ok,Xe(i.value[3]?"▾":"▸"),1)],8,ak),ye(M("div",lk,[...o[21]||(o[21]=[Ts('
形状
点 / 圆形 / 矩形 / 锥形 / 路径。
圆·锥
内半径与外半径,形成环形或锥形发射区;锥形额外有“锥形朝向”和“开口角度”。
矩形
“外框 − 内框”形成环带,可分别设置内外宽高。
路径
选一条场景路径作为出生线;出生分布可选等距固定或随机。
发射角度
固定 / 随机(基准角度 + 随机范围)/ 径向(圆、矩、锥中心向外)/ 垂直于路径 / 沿路径方向。
',1)])],512),[[Yi,i.value[3]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[4]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[4]?"true":"false",onClick:o[4]||(o[4]=h=>i.value[4]=!i.value[4])},[o[22]||(o[22]=M("span",{class:"mnum"},"5",-1)),o[23]||(o[23]=M("span",{class:"mtitle"},"粒子属性",-1)),M("span",hk,Xe(i.value[4]?"▾":"▸"),1)],8,ck),ye(M("div",uk,[...o[24]||(o[24]=[M("dl",{class:"help-list"},[M("div",null,[M("dt",null,"初始参数"),M("dd",null,"生命周期、速度、缩放(统一或 X/Y 分离)、初始旋转(可跟随发射方向)。每个属性支持固定 / 随机 / 曲线三种取值。")]),M("div",null,[M("dt",null,"生命周期变化"),M("dd",null,"速度倍率、缩放倍率(统一/分离)、旋转速度,均可用“生命周期 → 倍率”曲线控制。")]),M("div",null,[M("dt",null,"曲线含义"),M("dd",null,"横轴为粒子生命周期 0→1,纵轴为倍率或对应数值。")])],-1)])],512),[[Yi,i.value[4]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[5]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[5]?"true":"false",onClick:o[5]||(o[5]=h=>i.value[5]=!i.value[5])},[o[25]||(o[25]=M("span",{class:"mnum"},"6",-1)),o[26]||(o[26]=M("span",{class:"mtitle"},"外观与资源",-1)),M("span",fk,Xe(i.value[5]?"▾":"▸"),1)],8,dk),ye(M("div",mk,[...o[27]||(o[27]=[M("dl",{class:"help-list"},[M("div",null,[M("dt",null,"透明度"),M("dd",null,"曲线或固定;曲线模式可选“跟随导出 / 线性 / 贝塞尔”。")]),M("div",null,[M("dt",null,"图片资源"),M("dd",null,"“+”新增,可上传单图或序列帧;多张图片按权重随机。每张可调缩放、轴心、颜色(固定/随机/生命周期渐变)、混合模式(正常/相加/相乘/滤色)、独立透明度(关/固定/曲线)。")]),M("div",null,[M("dt",null,"序列帧"),M("dd",null,"播放方式:单次隐藏 / 单次定格 / 正向循环 / 反向循环,可设每秒帧数。")])],-1)])],512),[[Yi,i.value[5]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[6]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[6]?"true":"false",onClick:o[6]||(o[6]=h=>i.value[6]=!i.value[6])},[o[28]||(o[28]=M("span",{class:"mnum"},"7",-1)),o[29]||(o[29]=M("span",{class:"mtitle"},"修改器",-1)),M("span",gk,Xe(i.value[6]?"▾":"▸"),1)],8,pk),ye(M("div",vk,[...o[30]||(o[30]=[Ts('
移动噪声
强度、波动范围、时间流速,让粒子轨迹产生抖动。
重力 / 风力
固定或随机强度、方向,以及生命周期内强度曲线。
力场
中心 X/Y、强度(正吸负斥)、半径、衰减(恒定/线性/反比)。
吸附
延迟后把粒子吸到指定点,到达范围即死亡;可直线或曲线。
拖尾
独立拖尾图片(多资源按权重)、旋转、拖尾骨骼数、拖尾比例;长度/宽度可固定或随机并支持放大;可加生命周期长度曲线与形状曲线;颜色/透明度可跟随粒子、固定或曲线。
发射器跟随
跟随某条路径(局部/世界、正/反向、进度曲线),或跟随 Spine 骨骼(选中的骨骼 + 偏移)。
碰撞 + 阻尼
选择场景中已启用的碰撞对象参与,并设置速度阻尼。
',1)])],512),[[Yi,i.value[6]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[7]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[7]?"true":"false",onClick:o[7]||(o[7]=h=>i.value[7]=!i.value[7])},[o[31]||(o[31]=M("span",{class:"mnum"},"8",-1)),o[32]||(o[32]=M("span",{class:"mtitle"},"导出设置",-1)),M("span",xk,Xe(i.value[7]?"▾":"▸"),1)],8,yk),ye(M("div",bk,[...o[33]||(o[33]=[Ts('
图片路径
写入 Spine 的 images 路径,例如 ./images/。
Spine 版本
3.8 / 4.0 / 4.1 / 4.2 / 4.3。
关键帧曲线
线性或平滑贝塞尔;出生、死亡、突变仍使用阶跃关键帧。
导出 FPS
修改 FPS 会保持动画实际秒数不变;“不写 fps”只省略元数据。
其它
整数帧对齐、骨骼对象池、排除无内容动画。
导出按钮
“导出 Spine Json”生成骨骼动画文件;“导出 images 包”单独下载图片 ZIP;“导出 .spine 包”需要连接器。
',1)])],512),[[Yi,i.value[7]]])],2),M("section",{class:Ze(["help-section help-module help-connector",{open:i.value[8]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[8]?"true":"false",onClick:o[8]||(o[8]=h=>i.value[8]=!i.value[8])},[o[34]||(o[34]=M("span",{class:"mnum"},"9",-1)),o[35]||(o[35]=M("span",{class:"mtitle"},"连接器(Spine 连接器)使用说明",-1)),M("span",Sk,Xe(i.value[8]?"▾":"▸"),1)],8,wk),ye(M("div",Mk,[...o[36]||(o[36]=[Ts('

连接器用于把网页生成的 JSON 和图片,调用你电脑上已安装并激活的 Spine,转换成可编辑的 .spine 工程。

前置
电脑已安装并激活 Spine;并已启动连接器(桌面版 App,或运行“npm run connector”)。
网页端
导出区状态显示“连接器可用 · Spine 已就绪”后,点击“导出 .spine 包”。
首次授权
生产网站首次连接会显示“授权当前网站”;点击后在本机确认页核对完整来源(协议 + 域名 + 端口),再点“允许此网站”。授权一次后本机会保存白名单。本地 127.0.0.1:5173 默认允许。
路径设置
连接器自动检测 Spine 安装位置;检测不到时可在桌面窗口手动指定:Windows 选 Spine.com,macOS 选 Spine.app/Contents/MacOS/Spine。
下载结果
得到 ZIP 包,内含 .spine 工程和图片目录(如 images/star.png)。
版本
连接器按请求与 JSON 内的版本自动匹配 3.8~4.3,使用最新可用补丁。
安全
仅监听本机 127.0.0.1:27843;授权与白名单保存在连接器里;文件在临时目录转换后清理,并有大小限制。
',2)])],512),[[Yi,i.value[8]]])],2),o[38]||(o[38]=M("section",{class:"help-section help-export"},[M("h3",null,"配置与导出有什么区别?"),M("p",null,[M("b",null,"保存配置"),Qt("会保存编辑器中的全部对象和参数,之后可以继续修改;"),M("b",null,"导出 Spine Json"),Qt("只导出显示中的粒子系统,并把跟随、碰撞和拖尾结果烘焙为独立动画数据。")])],-1))])])])):Ve("",!0)}}),Gs=(s,e)=>{const t=s.__vccOpts||s;for(const[i,n]of e)t[i]=n;return t},Tk=Gs(_k,[["__scopeId","data-v-ae69ecd7"]]),Ak={class:"stage-wrap"},Ek={class:"topbar"},Ck=["disabled"],Ik={class:"tool-group"},Rk={class:"tool-group"},Pk={key:0,class:"background-panel"},kk=["disabled"],Fk=["title"],Ok={class:"background-position-row"},Bk={class:"background-opacity-row"},Lk={class:"zoom-pct"},Dk={key:0,class:"settings-panel"},Nk={class:"sp-head"},Uk={class:"sp-switch-row"},Xk={class:"sp-switch-control"},Vk={class:"sp-row"},Yk={class:"sp-chk"},$k={class:"sp-chk"},Gk={class:"sp-row"},Hk={class:"sp-row"},jk={class:"sp-chk"},Wk={class:"sp-chk"},zk={class:"sp-row"},qk={class:"sp-row"},Kk={class:"sp-row"},Zk={class:"sp-hex"},Jk={class:"sp-chk"},Qk={key:1,class:"hud"},eF={class:"hud-number hud-system-count"},tF={class:"hud-number hud-particle-count"},iF=$s({__name:"Stage",setup(s){const e=Kl(),t=lt(null),i=lt(null),n=lt(!1),r=lt(!1),a=lt(!1),o=lt(null),h=vt(()=>e.settings.backgroundImageName),l=lt(""),c=lt(!1);function u(H){l.value=l.value===H?"":H}e.settings.undoLimit>0||(e.settings.undoLimit=20),e.settings.parameterPanelOnRight==null&&(e.settings.parameterPanelOnRight=!0),Number.isFinite(e.settings.backgroundX)||(e.settings.backgroundX=0),Number.isFinite(e.settings.backgroundY)||(e.settings.backgroundY=0),Number.isFinite(e.settings.backgroundOpacity)||(e.settings.backgroundOpacity=1),e.settings.backgroundImageName==null&&(e.settings.backgroundImageName=""),e.settings.backgroundImageData==null&&(e.settings.backgroundImageData=""),e.settings.showEmitter==null&&(e.settings.showEmitter=!0),e.settings.showBones==null&&(e.settings.showBones=!1),e.settings.bonePointDrawSize>0||(e.settings.bonePointDrawSize=1),e.settings.boneAxisDrawSize>0||(e.settings.boneAxisDrawSize=2),e.settings.showSkinMesh==null&&(e.settings.showSkinMesh=!1),e.settings.showGrid==null&&(e.settings.showGrid=!0);function d(){e.settings.bonePointDrawSize=Math.min(10,Math.max(.1,Number(e.settings.bonePointDrawSize)||1)),e.settings.boneAxisDrawSize=Math.min(10,Math.max(.1,Number(e.settings.boneAxisDrawSize)||2))}zP({canvasElement:t,canvasFocused:c,undo:Tf,save:()=>_w(e),togglePlay:()=>e.togglePlay(),toStart:()=>e.toStart(),setTool:H=>{l.value=H}});let f=null,p=null,m=null,g=null,v=0,b=null,y=null,w=null,A=null,T=null,_=null,R=null,P=null,F=null,I=null,k=null,B=null,D=[],U=0,L=0,N=0,O=0,X=null,E=null;const V=new Map,q=new Map;let W=[];const J=new Map,K=new Set;let fe=!1;fs(()=>[e.activeObjectType,e.activeObjectId],()=>K.clear());async function me(){if(X&&E)return X;const[H,Y]=await Promise.all([gt.fromURL("/images/star.png"),gt.fromURL("/images/trail.png")]);return X=H,E=Y,X}function we(){p=new ji,f.stage.addChild(p),k=new ji,f.stage.addChild(k),m=new Zr(gt.EMPTY),m.anchor.set(.5),m.visible=!1,p.addChild(m),I=new ys,p.addChild(I),B=new nR,p.addChild(B.container),y=new ys,p.addChild(y),b=new ys,p.addChild(b),A=new ys,p.addChild(A),T=new ys,p.addChild(T),_=new ys,p.addChild(_),R=new ys,p.addChild(R),P=new ys,p.addChild(P),F=new ys,p.addChild(F),w=new ys,p.addChild(w)}function Ee(){r.value=!r.value,r.value&&(n.value=!1)}function pe(){a.value=!0,n.value=!1,r.value=!1}function Ae(){n.value=!n.value,n.value&&(r.value=!1)}function G(H){jP(e,Number(H.target.value))}async function Z(H){var ne;const Y=H.target,ee=(ne=Y.files)==null?void 0:ne[0];if(ee)try{e.settings.backgroundImageData=await Jc(ee),e.settings.backgroundImageName=ee.name}catch(ue){console.error("背景图加载失败",ue)}finally{Y.value=""}}async function z(H){const Y=++v;if(!H){m&&(m.texture=gt.EMPTY,m.visible=!1),g&&g.destroy(!0),g=null;return}try{const ee=await gt.fromURL(H);if(Y!==v||!m){ee.destroy(!0);return}const ne=g;g=ee,m.texture=ee,m.visible=!0,ne&&ne.destroy(!0)}catch(ee){console.error("背景图恢复失败",ee)}}function j(H=!0){e.settings.backgroundImageData="",e.settings.backgroundImageName="",o.value&&(o.value.value=""),H&&(e.settings.backgroundX=0,e.settings.backgroundY=0,e.settings.backgroundOpacity=1)}function te(H,Y=0){if(H<=0)return 1;const ee=Math.pow(10,Math.floor(Math.log10(H))),ne=[1,2,5,10,20,50,100];let ue=1;for(const ve of ne)if(ve*ee>=H){ue=ve*ee;break}return Math.max(ue,Y)}function he(){if(!I)return;const H=I;H.clear();const Y=e.settings;if(!Y.tickEnabled){for(const Se of D)Se.visible=!1;return}const ee=0,ne=0,ue=f.screen.width/e.editor.viewScale,ve=f.screen.height/e.editor.viewScale,_e=+("0x"+Y.axisColor.replace("#",""));H.lineStyle(1.5,_e,.35),H.moveTo(-ue,ne),H.lineTo(ue,ne),H.moveTo(ee,-ve),H.lineTo(ee,ve);const Me=e.editor.viewScale,be=te(50/Me),De=ue,Ie=ve,Le=Math.max(1,Y.tickWidth);if(Y.tickEnabled){for(let Se=0;Se<=ue;Se+=be){const at=Math.round(Se/be)*be;at!==0&&(H.lineStyle(Le,_e,.25),H.moveTo(at,ne-4),H.lineTo(at,ne+4),H.moveTo(-at,ne-4),H.lineTo(-at,ne+4))}for(let Se=0;Se<=ve;Se+=be)Math.round(Se/be)*be!==0&&(H.lineStyle(Le,_e,.25),H.moveTo(ee-4,Se),H.lineTo(ee+4,Se),H.moveTo(ee-4,-Se),H.lineTo(ee+4,-Se))}const Te=f.screen.width/2+e.editor.viewX,je=f.screen.height*.5+e.editor.viewY,rt=Y.axisFontSize,Je=+("0x"+Y.axisColor.replace("#",""));for(;D.length<64;){const Se=new Mp("",{fontFamily:"monospace",fontSize:rt,fill:Je});Se.anchor.set(.5,.5),k.addChild(Se),D.push(Se)}let nt=0;const Qe=Y.showAxisLabels&&Y.tickEnabled;for(let Se=0;Se<=ue;Se+=be){const at=Math.round(Se/be)*be;if(at===0||!Qe||at>De)continue;const Pe=D[nt++];if(!Pe)break;Pe.style.fontSize=rt,Pe.text=String(at),Pe.position.set(Te+at*Me,je+9),Pe.visible=!0;const Xt=D[nt++];if(!Xt)break;Xt.style.fontSize=rt,Xt.text=String(-at),Xt.position.set(Te-at*Me,je+9),Xt.visible=!0}for(let Se=0;Se<=ve;Se+=be){const at=Math.round(Se/be)*be;if(at===0||!Qe||at>Ie)continue;const Pe=D[nt++];if(!Pe)break;Pe.style.fontSize=rt,Pe.text=String(at),Pe.position.set(Te+8,je-Se*Me),Pe.visible=!0;const Xt=D[nt++];if(!Xt)break;Xt.style.fontSize=rt,Xt.text=String(-at),Xt.position.set(Te+8,je+Se*Me),Xt.visible=!0}for(;nt{e.editor.viewX=ne+(Me.clientX-Y),e.editor.viewY=ue+(Me.clientY-ee)},_e=()=>{window.removeEventListener("pointermove",ve),window.removeEventListener("pointerup",_e),window.removeEventListener("pointercancel",_e)};window.addEventListener("pointermove",ve),window.addEventListener("pointerup",_e),window.addEventListener("pointercancel",_e)}function ge(H,Y){const ee=t.value.getBoundingClientRect(),ne=Math.max(1e-4,e.editor.viewScale),ue=H-ee.left,ve=Y-ee.top;return{x:(ue-f.screen.width/2-e.editor.viewX)/ne,y:-(ve-f.screen.height*.5-e.editor.viewY)/ne}}function le(H,Y,ee){const ne=H.rotation*Math.PI/180,ue=Math.cos(ne),ve=Math.sin(ne),_e=Math.max(1e-4,Math.abs(H.scaleX??1)),Me=Math.max(1e-4,Math.abs(H.scaleY??1));return{x:H.x+ue*Y*_e-ve*ee*Me,y:H.y+ve*Y*_e+ue*ee*Me}}function Oe(H,Y,ee){const ne=H.rotation*Math.PI/180,ue=Math.cos(ne),ve=Math.sin(ne),_e=Math.max(1e-4,Math.abs(H.scaleX??1)),Me=Math.max(1e-4,Math.abs(H.scaleY??1)),be=Y-H.x,De=ee-H.y;return{x:(ue*be+ve*De)/_e,y:(-ve*be+ue*De)/Me}}function Fe(){if(e.activeObjectType!=="path")return null;const H=e.paths.find(Y=>Y.id===e.activeObjectId)||null;return(H==null?void 0:H.visible)===!1?null:H}function Be(H,Y,ee){if(H.points.length<2)return H.points.length;const ne=H.closed?H.points.length:H.points.length-1;let ue=H.points.length,ve=1/0;for(let _e=0;_eMath.hypot(Me.x-ne.x,Me.y-ne.y)<=ue);if(ve>=0){Y.points.splice(ve,1),K.clear();return}const _e=Be(Y,ne.x,ne.y);Y.points.splice(_e,0,{x:ne.x,y:ne.y,inX:0,inY:0,outX:0,outY:0}),K.clear(),K.add(_e)}function St(H){const Y=Fe();if(!Y||!Y.enabled)return!1;const ee=ge(H.clientX,H.clientY),ne=Oe(Y,ee.x,ee.y),ue=9/Math.max(.01,e.editor.viewScale);if(H.detail>=2){if(Y.points.findIndex(Ie=>Math.hypot(Ie.x-ne.x,Ie.y-ne.y)<=ue)>=0)return!0;const be={x:ne.x,y:ne.y,inX:0,inY:0,outX:0,outY:0},De=Be(Y,ne.x,ne.y);return Y.points.splice(De,0,be),K.clear(),K.add(De),fe=!0,At(Ie=>{const Le=ge(Ie.clientX,Ie.clientY),Te=Oe(Y,Le.x,Le.y);be.outX=Te.x-be.x,be.outY=Te.y-be.y,be.inX=-be.outX,be.inY=-be.outY}),!0}let ve=null;for(const Me of K){const be=Y.points[Me];be&&(Math.hypot(be.x+be.inX-ne.x,be.y+be.inY-ne.y)<=ue&&(ve={index:Me,side:"in"}),Math.hypot(be.x+be.outX-ne.x,be.y+be.outY-ne.y)<=ue&&(ve={index:Me,side:"out"}))}if(ve){const Me=Y.points[ve.index],be=ve.side==="in"?Math.hypot(Me.outX,Me.outY):Math.hypot(Me.inX,Me.inY);return At(Ie=>{const Le=ge(Ie.clientX,Ie.clientY),Te=Oe(Y,Le.x,Le.y),je=Te.x-Me.x,rt=Te.y-Me.y;if(ve.side==="in"?(Me.inX=je,Me.inY=rt):(Me.outX=je,Me.outY=rt),!Ie.altKey){const Je=Math.max(1e-4,Math.hypot(je,rt)),nt=Ie.shiftKey?Je:be;ve.side==="in"?(Me.outX=-je/Je*nt,Me.outY=-rt/Je*nt):(Me.inX=-je/Je*nt,Me.inY=-rt/Je*nt)}}),!0}const _e=Y.points.findIndex(Me=>Math.hypot(Me.x-ne.x,Me.y-ne.y)<=ue);if(_e>=0){if(H.altKey)return K.delete(_e),!0;H.ctrlKey||H.metaKey?K.add(_e):K.has(_e)||(K.clear(),K.add(_e));const Me=ne,be=[...K].map(Ie=>({index:Ie,x:Y.points[Ie].x,y:Y.points[Ie].y}));return At(Ie=>{const Le=ge(Ie.clientX,Ie.clientY),Te=Oe(Y,Le.x,Le.y);for(const je of be)Y.points[je.index].x=je.x+Te.x-Me.x,Y.points[je.index].y=je.y+Te.y-Me.y}),!0}if(H.altKey&&!H.ctrlKey&&!H.metaKey)return K.clear(),!0;if(H.ctrlKey||H.metaKey||H.altKey){const Me=ne,be=H.altKey,De=Ie=>{const Le=ge(Ie.clientX,Ie.clientY),Te=Oe(Y,Le.x,Le.y),je=Math.min(Me.x,Te.x),rt=Math.max(Me.x,Te.x),Je=Math.min(Me.y,Te.y),nt=Math.max(Me.y,Te.y);Y.points.forEach((Qe,Se)=>{Qe.x>=je&&Qe.x<=rt&&Qe.y>=Je&&Qe.y<=nt&&(be?K.delete(Se):K.add(Se))}),window.removeEventListener("pointerup",De),window.removeEventListener("pointercancel",De)};return window.addEventListener("pointerup",De),window.addEventListener("pointercancel",De),!0}return!1}function At(H){const Y=()=>{window.removeEventListener("pointermove",H),window.removeEventListener("pointerup",Y),window.removeEventListener("pointercancel",Y)};window.addEventListener("pointermove",H),window.addEventListener("pointerup",Y),window.addEventListener("pointercancel",Y)}function Et(H){if(e.activeObjectType!=="collision")return!1;const Y=e.colliders.find(nt=>nt.id===e.activeObjectId);if(!(Y!=null&&Y.enabled)||Y.visible===!1)return!1;const ee=ge(H.clientX,H.clientY),ne=Y.rotation*Math.PI/180,ue=Math.cos(ne),ve=Math.sin(ne),_e=Math.max(1e-4,Math.abs(Y.scaleX??1)),Me=Math.max(1e-4,Math.abs(Y.scaleY??1)),be=ee.x-Y.x,De=ee.y-Y.y,Ie=(ue*be+ve*De)/_e,Le=(-ve*be+ue*De)/Me;if(!(Y.shape==="circle"?Math.hypot(Ie,Le)<=Y.radius:Y.shape==="ellipse"?Math.hypot(Ie/Math.max(1,Y.radiusX),Le/Math.max(1,Y.radiusY))<=1:Math.abs(Ie)<=Y.width*.5&&Math.abs(Le)<=Y.height*.5))return!1;const je=Y.x,rt=Y.y,Je=ee;return At(nt=>{const Qe=ge(nt.clientX,nt.clientY);Y.x=je+Qe.x-Je.x,Y.y=rt+Qe.y-Je.y}),!0}function It(H){const Y=e.systems.find(De=>De.id===e.activeId);if((Y==null?void 0:Y.visible)===!1)return!1;const ee=Y==null?void 0:Y.config;if(!(ee!=null&&ee.forceField)||ee.forceRadius<=0)return!1;const ne=ge(H.clientX,H.clientY);if(Math.hypot(ne.x-ee.forceCenterX,ne.y-ee.forceCenterY)>ee.forceRadius)return!1;const ve=ee.forceCenterX,_e=ee.forceCenterY;t.value&&(t.value.style.cursor="grabbing");const Me=De=>{const Ie=ge(De.clientX,De.clientY);ee.forceCenterX=ve+Ie.x-ne.x,ee.forceCenterY=_e+Ie.y-ne.y},be=()=>{t.value&&(t.value.style.cursor=""),window.removeEventListener("pointermove",Me),window.removeEventListener("pointerup",be),window.removeEventListener("pointercancel",be)};return window.addEventListener("pointermove",Me),window.addEventListener("pointerup",be),window.addEventListener("pointercancel",be),H.preventDefault(),!0}function Kt(H){const Y=e.systems.find(Ie=>Ie.id===e.activeId);if((Y==null?void 0:Y.visible)===!1)return!1;const ee=Y==null?void 0:Y.config;if(!(ee!=null&&ee.attraction))return!1;const ne=ge(H.clientX,H.clientY),ue=Math.max(ee.attractionRadius,12/Math.max(1e-4,e.editor.viewScale));if(Math.hypot(ne.x-ee.attractionCenterX,ne.y-ee.attractionCenterY)>ue)return!1;const _e=ee.attractionCenterX,Me=ee.attractionCenterY;t.value&&(t.value.style.cursor="grabbing");const be=Ie=>{const Le=ge(Ie.clientX,Ie.clientY);ee.attractionCenterX=_e+Le.x-ne.x,ee.attractionCenterY=Me+Le.y-ne.y},De=()=>{t.value&&(t.value.style.cursor=""),window.removeEventListener("pointermove",be),window.removeEventListener("pointerup",De),window.removeEventListener("pointercancel",De)};return window.addEventListener("pointermove",be),window.addEventListener("pointerup",De),window.addEventListener("pointercancel",De),H.preventDefault(),!0}function Ti(){const H=e.activeObjectId;if(e.activeObjectType==="particle"){const ne=e.systems.find(ve=>ve.id===H);if(!ne||ne.visible===!1)return null;const ue=ne.config;return{x:ue.centerX,y:ue.centerY,rotation:ue.rootRotation,scaleX:ue.rootScaleX??1,scaleY:ue.rootScaleY??1,setPosition:(ve,_e)=>{ue.centerX=ve,ue.centerY=_e},setRotation:ve=>{ue.rootRotation=ve},setScale:(ve,_e)=>{ue.rootScaleX=ve,ue.rootScaleY=_e}}}const ee=(e.activeObjectType==="collision"?e.colliders:e.activeObjectType==="path"?e.paths:e.spines).find(ne=>ne.id===H);return!ee||ee.visible===!1?null:{x:Number(ee.x)||0,y:Number(ee.y)||0,rotation:Number(ee.rotation)||0,scaleX:Math.max(.05,Number(ee.scaleX)||1),scaleY:Math.max(.05,Number(ee.scaleY)||1),setPosition:(ne,ue)=>{ee.x=ne,ee.y=ue},setRotation:ne=>{ee.rotation=ne},setScale:(ne,ue)=>{ee.scaleX=ne,ee.scaleY=ue}}}function Wi(H){const Y=Ti();if(!Y)return;const ee=e.editor.viewScale,ne=t.value.getBoundingClientRect(),ue=ne.left+f.screen.width/2+e.editor.viewX+Y.x*ee,ve=ne.top+f.screen.height*.5+e.editor.viewY+-Y.y*ee,_e=H.clientX,Me=H.clientY,be=l.value,De=Y.x,Ie=Y.y,Le=Y.rotation,Te=Y.scaleX,je=Y.scaleY,rt=Math.hypot(_e-ue,Me-ve)||1,Je=Math.atan2(Me-ve,_e-ue),nt=Se=>{const at=(Se.clientX-_e)/ee,Pe=(Se.clientY-Me)/ee;if(be==="translate")Y.setPosition(De+at,Ie-Pe);else if(be==="rotate"){const Xt=Math.atan2(Se.clientY-ve,Se.clientX-ue);Y.setRotation(Le-(Xt-Je)*180/Math.PI)}else if(be==="scale"){const Bt=Math.hypot(Se.clientX-ue,Se.clientY-ve)/rt;Y.setScale(Math.max(.05,Te*Bt),Math.max(.05,je*Bt))}},Qe=()=>{window.removeEventListener("pointermove",nt),window.removeEventListener("pointerup",Qe),window.removeEventListener("pointercancel",Qe)};window.addEventListener("pointermove",nt),window.addEventListener("pointerup",Qe),window.addEventListener("pointercancel",Qe)}function zi(){di(1.2)}function dn(){di(1/1.2)}function di(H){const Y=Math.max(.01,e.editor.viewScale*H);e.editor.viewScale=Y}function ce(){e.editor.viewScale=1,e.editor.viewX=0,e.editor.viewY=0}function de(){e.editor.viewScale=1,e.editor.viewX=0,e.editor.viewY=0}function Rt(){e.settings.showGrid=!e.settings.showGrid}function Wt(){if(p){for(const[H,Y]of V){const ee=e.systems.find(ne=>ne.id===H);(!ee||q.get(H)!==ee.config)&&(p.removeChild(Y),Y.destroy({children:!0}),V.delete(H),q.delete(H))}for(const H of e.systems){X&&!H.config.texture&&(H.config.texture=X);const Y=Wr(H.config);if(E)for(const ne of Y.trailResources)!ne.texture&&(ne.previewUrl==="/images/trail.png"||ne.previewUrl==="/trails/trail.png")&&(ne.texture=E);if(X)for(const ne of Y.imageResources)!ne.texture&&ne.textureName==="star"&&(ne.texture=X);if(V.has(H.id))continue;const ee=new BI(H.config);ee.setEmitterPos(()=>({x:H.config.centerX,y:H.config.centerY})),p.addChild(ee),V.set(H.id,ee),q.set(H.id,H.config)}}}function Zt(){if(!b)return;const H=b;if(H.clear(),!!e.settings.showEmitter&&e.systems.length)for(const Y of e.systems){if(Y.visible===!1)continue;const ee=J.get(Y.id),ne=(ee==null?void 0:ee.x)??Y.config.centerX??0,ue=-((ee==null?void 0:ee.y)??Y.config.centerY??0),ve=e.activeObjectType==="particle"&&Y.id===e.activeId,_e=ve?16763955:9082040,Me=ve?.4:.2;H.lineStyle(1,_e,Me),H.drawCircle(ne,ue,10),H.beginFill(_e,ve?.8:.4),H.drawCircle(ne,ue,3),H.endFill(),H.lineStyle(1,_e,ve?.3:.15),H.moveTo(ne-16,ue),H.lineTo(ne+16,ue),H.moveTo(ne,ue-16),H.lineTo(ne,ue+16)}}function pt(){var ee;if(!y)return;const H=y;(ee=H.parent)==null||ee.addChild(H),H.clear();const Y=new Map;for(const ne of e.spines)ne.visible===!1||!ne.selectedBone||ne.status!=="ready"||Y.set(`${ne.id}:${ne.selectedBone}`,{spineId:ne.id,boneName:ne.selectedBone});for(const ne of e.systems){if(ne.visible===!1)continue;const ue=ne.config;if(!ue.emitterFollow||ue.emitterFollowMode!=="bone"||!ue.emitterFollowSpineId||!ue.emitterFollowBoneName)continue;const ve=e.spines.find(_e=>_e.id===ue.emitterFollowSpineId);!ve||ve.visible===!1||Y.set(`${ue.emitterFollowSpineId}:${ue.emitterFollowBoneName}`,{spineId:ue.emitterFollowSpineId,boneName:ue.emitterFollowBoneName})}for(const ne of Y.values()){const ue=B==null?void 0:B.getBoneWorldTransform(ne.spineId,ne.boneName);if(!ue)continue;const ve=ue.x,_e=-ue.y;H.lineStyle(2,12881151,.95),H.beginFill(12881151,.2),H.drawCircle(ve,_e,8),H.endFill(),H.beginFill(15919103,1),H.drawCircle(ve,_e,3.5),H.endFill()}}function Rs(){if(!A)return;const H=A;if(H.clear(),!e.settings.showEmitter)return;const Y=e.systems.find(Je=>Je.id===e.activeId);if(!Y||Y.visible===!1)return;const ee=Y.config,ne=J.get(Y.id),ue=(ne==null?void 0:ne.x)??ee.centerX??0,ve=-((ne==null?void 0:ne.y)??ee.centerY??0),_e=ee.shape;if(_e==="point"||_e==="path")return;const Me=ee.rootScaleX??1,be=ee.rootScaleY??1,De=-((ne==null?void 0:ne.rotation)??ee.rootRotation??0)*Math.PI/180,Ie=Math.cos(De),Le=Math.sin(De),Te=ee.offsetX??0,je=ee.offsetY??0,rt=(Je,nt)=>{const Qe=Je+Te,Se=-nt-je,at=Qe*Me,Pe=Se*be;return[ue+at*Ie-Pe*Le,ve+(at*Le+Pe*Ie)]};if(_e==="circle"){const Je=Rh(ee.innerRadius,ee.outerRadius);H.lineStyle(2,3991658,.7);const nt=48;for(const Qe of[Je.outer,Je.inner])if(!(Qe<=0))for(let Se=0;Se<=nt;Se++){const at=Se/nt*Math.PI*2,[Pe,Xt]=rt(Math.cos(at)*Qe,Math.sin(at)*Qe);Se===0?H.moveTo(Pe,Xt):H.lineTo(Pe,Xt)}}else if(_e==="rect"){const Je=u1(ee);H.lineStyle(2,4885759,.7);for(const[nt,Qe]of[[Je.outerW,Je.outerH],[Je.innerW,Je.innerH]]){if(nt<=0||Qe<=0)continue;const Se=nt/2,at=Qe/2,Pe=rt(-Se,-at),Xt=rt(Se,-at),Bt=rt(Se,at),si=rt(-Se,at);H.moveTo(Pe[0],Pe[1]),H.lineTo(Xt[0],Xt[1]),H.lineTo(Bt[0],Bt[1]),H.lineTo(si[0],si[1]),H.lineTo(Pe[0],Pe[1])}}else if(_e==="cone"){const Je=Rh(ee.innerRadius,ee.outerRadius),nt=ee.coneAngle/2*Math.PI/180,Qe=ee.coneDirection*Math.PI/180,Se=rt(Math.cos(Qe-nt)*Je.inner,Math.sin(Qe-nt)*Je.inner),at=rt(Math.cos(Qe+nt)*Je.inner,Math.sin(Qe+nt)*Je.inner),Pe=rt(Math.cos(Qe-nt)*Je.outer,Math.sin(Qe-nt)*Je.outer),Xt=rt(Math.cos(Qe+nt)*Je.outer,Math.sin(Qe+nt)*Je.outer);H.lineStyle(2,3991658,.7),H.moveTo(Se[0],Se[1]),H.lineTo(Pe[0],Pe[1]),H.moveTo(at[0],at[1]),H.lineTo(Xt[0],Xt[1]),H.lineStyle(1,3991658,.5);const Bt=24;for(const si of[Je.outer,Je.inner])if(!(si<=0))for(let Ci=0;Ci<=Bt;Ci++){const ns=Qe-nt+2*nt*Ci/Bt,[Ha,$]=rt(Math.cos(ns)*si,Math.sin(ns)*si);Ci===0?H.moveTo(Ha,$):H.lineTo(Ha,$)}}}function Hs(){if(!T)return;const H=T;H.clear();const Y=e.systems.find(_e=>_e.id===e.activeId);if((Y==null?void 0:Y.visible)===!1)return;const ee=Y==null?void 0:Y.config;if(!(ee!=null&&ee.forceField)||ee.forceRadius<=0)return;const ne=ee.forceCenterX,ue=-ee.forceCenterY,ve=ee.forceStrength>=0?5818367:16739194;H.lineStyle(2,ve,.85),H.beginFill(ve,.08),H.drawCircle(ne,ue,ee.forceRadius),H.endFill(),H.lineStyle(1,ve,.7),H.moveTo(ne-9,ue),H.lineTo(ne+9,ue),H.moveTo(ne,ue-9),H.lineTo(ne,ue+9),H.beginFill(ve,.95),H.drawCircle(ne,ue,4),H.endFill()}function Ui(){if(!_)return;const H=_;H.clear();const Y=e.systems.find(Me=>Me.id===e.activeId);if((Y==null?void 0:Y.visible)===!1)return;const ee=Y==null?void 0:Y.config;if(!(ee!=null&&ee.attraction))return;const ne=ee.attractionCenterX,ue=-ee.attractionCenterY,ve=Math.max(0,ee.attractionRadius),_e=16731487;ve>0&&(H.lineStyle(2,_e,.95),H.beginFill(_e,.09),H.drawCircle(ne,ue,ve),H.endFill()),H.lineStyle(1,_e,.85),H.moveTo(ne-10,ue),H.lineTo(ne+10,ue),H.moveTo(ne,ue-10),H.lineTo(ne,ue+10),H.beginFill(_e,1),H.drawCircle(ne,ue,ve>0?4:6),H.endFill()}function Ps(){if(!F)return;const H=F;if(H.clear(),!l.value)return;const Y=Ti();if(!Y)return;const ee=Y.x,ne=-Y.y,ue=Y.scaleX,ve=Y.scaleY,_e=-Y.rotation*Math.PI/180,Me=Math.cos(_e),be=Math.sin(_e),De=(Te,je)=>{const rt=Te*ue,Je=-je*ve;return[ee+rt*Me-Je*be,ne+(rt*be+Je*Me)]},Ie=(Te,je,rt,Je)=>{const nt=De(Te,je),Qe=De(rt,Je);H.moveTo(nt[0],nt[1]),H.lineTo(Qe[0],Qe[1])},Le=26;if(H.lineStyle(2,3526911,.9),H.beginFill(3526911,.25),H.drawCircle(ee,ne,6),H.endFill(),l.value==="translate")H.lineStyle(2,3526911,.9),Ie(-Le,0,Le,0),Ie(0,-Le,0,Le),Ie(Le-6,-4,Le,0),Ie(Le,0,Le-6,4),Ie(-20,-4,-Le,0),Ie(-Le,0,-20,4),Ie(-4,Le-6,0,Le),Ie(0,Le,4,Le-6),Ie(-4,-20,0,-Le),Ie(0,-Le,4,-20);else if(l.value==="rotate"){H.lineStyle(2,3526911,.8);const Te=48;for(let Je=0;Je<=Te;Je++){const nt=Je/Te*Math.PI*2,[Qe,Se]=De(Math.cos(nt)*Le,Math.sin(nt)*Le);Je===0?H.moveTo(Qe,Se):H.lineTo(Qe,Se)}const[je,rt]=De(0,Le);H.beginFill(3526911,.95),H.drawCircle(je,rt,4),H.endFill()}else if(l.value==="scale"){H.lineStyle(2,3526911,.9);const je=[[-Le,-Le],[Le,-Le],[Le,Le],[-Le,Le]].map(([rt,Je])=>De(rt,Je));H.moveTo(je[0][0],je[0][1]),H.lineTo(je[1][0],je[1][1]),H.lineTo(je[2][0],je[2][1]),H.lineTo(je[3][0],je[3][1]),H.lineTo(je[0][0],je[0][1]),H.beginFill(3526911,.9);for(const rt of je)H.drawRect(rt[0]-3,rt[1]-3,6,6);H.endFill()}}function br(H,Y,ee,ne){var _e;const ue=Number.isFinite(Y.worldX)&&Number.isFinite(Y.worldY),ve=Number.isFinite(Y.worldRotation);H.push({boneName:Y.boneName,x:ue?Y.worldX:Y.x,y:ue?-Y.worldY:Y.y,rotation:ve?-Y.worldRotation:-Y.rotation,parentX:ee,parentY:ne}),(_e=Y.trailState)!=null&&_e.bones.length&&Y.trailState.bones.forEach(Me=>{const be=Number.isFinite(Me.worldX)&&Number.isFinite(Me.worldY),De=Number.isFinite(Me.worldRotation);H.push({boneName:Me.boneName,x:be?Me.worldX:Me.x,y:be?-Me.worldY:Me.y,rotation:De?-Me.worldRotation:Me.rotation,parentX:ee,parentY:ne,trail:!0})})}function js(H,Y,ee,ne,ue,ve,_e,Me){const be=ve*.62,De=Y+ne*ve,Ie=ee+ue*ve,Le=Math.max(2.5,ve*.32),Te=Math.max(1.7,ve*.22),je=De-ne*Le,rt=Ie-ue*Le,Je=-ue,nt=ne;H.lineStyle(_e,Me,.95),H.moveTo(Y-ne*be,ee-ue*be),H.lineTo(je,rt),H.lineStyle(0),H.beginFill(Me,.95),H.drawPolygon([De,Ie,je+Je*Te,rt+nt*Te,je-Je*Te,rt-nt*Te]),H.endFill()}function ss(H){if(!w)return;const Y=w;if(Y.clear(),!e.settings.showBones)return;const ee=0,ne=0,ue=Math.max(.25,Math.abs(e.editor.viewScale)||1),ve=Math.min(10,Math.max(.1,Number(e.settings.bonePointDrawSize)||1)),_e=Math.min(10,Math.max(.1,Number(e.settings.boneAxisDrawSize)||2)),Me=2.5*ve/ue,be=4.5*_e/ue,De=Math.max(.65,_e*.625)/ue;for(const Ie of H){const Le=Ie.trail?16731533:16747610;Y.lineStyle(1,Le,Ie.trail?.65:.35),Y.moveTo(Ie.parentX??ee,Ie.parentY??ne),Y.lineTo(Ie.x,Ie.y);const Te=Ie.rotation*Math.PI/180,je=Math.cos(Te),rt=Math.sin(Te);js(Y,Ie.x,Ie.y,je,rt,be,De,15684432),js(Y,Ie.x,Ie.y,rt,-je,be,De,5622123),Y.beginFill(Le,.9),Y.drawCircle(Ie.x,Ie.y,Me),Y.endFill()}}function $a(H,Y=16777215){const ee=Number.parseInt(H.replace("#",""),16);return Number.isFinite(ee)?ee:Y}function Ga(){if(!R)return;const H=R;H.clear();for(const Y of W){if(Y.visible===!1)continue;const ee=e.activeObjectType==="collision"&&e.activeObjectId===Y.id,ne=Y.enabled?ee?16735858:13911899:5792116,ue=Y.rotation*Math.PI/180,ve=Math.cos(ue),_e=Math.sin(ue),Me=Math.max(1e-4,Math.abs(Y.scaleX??1)),be=Math.max(1e-4,Math.abs(Y.scaleY??1)),De=(Te,je)=>({x:Y.x+ve*Te*Me-_e*je*be,y:-(Y.y+_e*Te*Me+ve*je*be)});let Ie=[];if(Y.shape==="circle"||Y.shape==="ellipse"){const Te=Y.shape==="circle"?Y.radius:Y.radiusX,je=Y.shape==="circle"?Y.radius:Y.radiusY;Ie=Array.from({length:49},(rt,Je)=>{const nt=Je/48*Math.PI*2;return De(Math.cos(nt)*Te,Math.sin(nt)*je)})}else if(Y.shape==="rect"){const Te=Y.width*.5,je=Y.height*.5;Ie=[De(-Te,-je),De(Te,-je),De(Te,je),De(-Te,je),De(-Te,-je)]}else{const Te=Math.max(3,Math.min(16,Math.round(Y.sides)));Ie=Array.from({length:Te+1},(je,rt)=>{const Je=Math.PI*.5+rt%Te/Te*Math.PI*2;return De(Math.cos(Je)*Y.width*.5,Math.sin(Je)*Y.height*.5)})}if(!Ie.length)continue;H.lineStyle(ee?2.5:1.5,ne,Y.enabled?.95:.45),H.beginFill(ne,ee?.12:.055),H.moveTo(Ie[0].x,Ie[0].y);for(let Te=1;Te{const Ie=le(Y,be,De);return{x:Ie.x,y:-Ie.y}},ve=Y.points[0],_e=ue(ve.x,ve.y);H.lineStyle(ee?2.5:1.8,ne,ee?1:.75),H.moveTo(_e.x,_e.y);const Me=Y.closed?Y.points.length:Y.points.length-1;for(let be=0;be{const Ie=ue(be.x,be.y),Le=ue(be.x+be.inX,be.y+be.inY),Te=ue(be.x+be.outX,be.y+be.outY),je=Math.hypot(be.inX,be.inY)>.01,rt=Math.hypot(be.outX,be.outY)>.01;H.lineStyle(1,11121867,.65),je&&(H.moveTo(Ie.x,Ie.y),H.lineTo(Le.x,Le.y)),rt&&(H.moveTo(Ie.x,Ie.y),H.lineTo(Te.x,Te.y)),je&&(H.beginFill(14015724,.95),H.drawCircle(Le.x,Le.y,3),H.endFill()),rt&&(H.beginFill(14015724,.95),H.drawCircle(Te.x,Te.y,3),H.endFill()),H.beginFill(K.has(De)?16777215:ne,1),H.lineStyle(1.5,K.has(De)?6126847:16777215,.95),H.drawCircle(Ie.x,Ie.y,K.has(De)?5:4),H.endFill()})}}function Ws(H,Y,ee="linear"){if(!H.length)return Y;const ne=[...H].sort((ue,ve)=>ue.x-ve.x);if(Y<=ne[0].x)return ne[0].y;for(let ue=1;ue{if(!Y.followPath||!Y.followPathId)return Y;const ee=e.paths.find(De=>De.id===Y.followPathId&&De.enabled);if(!(ee!=null&&ee.points.length))return Y;const ne=Math.max(.05,Number(Y.followDuration)||2),ue=Math.min(1,Math.max(0,H/ne)),ve=Array.isArray(Y.followCurve)?Y.followCurve:[{x:0,y:0},{x:1,y:1}],_e=Y.followCurveMode==="跟随导出"?e.settings.exportSettings.keyframeCurve==="bezier"?"bezier":"linear":Y.followCurveMode==="贝塞尔"?"bezier":"linear",Me=Math.min(1,Math.max(0,Ws(ve,ue,_e))),be=yf(ee,Me);return be?{...Y,x:be.x,y:be.y,rotation:Y.rotation+(Y.followPathRotation?be.angle:0)}:Y})}function ks(H,Y,ee,ne=Math.max(1e-4,Math.abs(H.rootScaleX)),ue=Math.max(1e-4,Math.abs(H.rootScaleY))){const ve=-H.rootRotation*Math.PI/180,_e=Math.cos(ve),Me=Math.sin(ve),be=Y-H.centerX,De=-ee+H.centerY;return{x:(_e*be+Me*De)/ne,y:(-Me*be+_e*De)/ue}}function ea(H,Y,ee){const ne=yf(Y,ee);if(!ne)return null;const ue=ks(H,ne.x,ne.y),ve=ne.angle*Math.PI/180,_e=ks(H,ne.x+Math.cos(ve),ne.y+Math.sin(ve)),Me=Math.atan2(_e.y-ue.y,_e.x-ue.x)*180/Math.PI;return{...ue,angle:Me}}function ta(){var ee,ne,ue;O=requestAnimationFrame(ta);const H=performance.now()/1e3;let Y=H-U;if(U=H,Y>.1&&(Y=.1),f&&p){p.scale.set(e.editor.viewScale),p.position.set(f.screen.width/2+e.editor.viewX,f.screen.height*.5+e.editor.viewY),m&&(m.position.set(Number(e.settings.backgroundX)||0,-(Number(e.settings.backgroundY)||0)),m.alpha=Math.min(1,Math.max(0,Number(e.settings.backgroundOpacity)||0))),he(),Wt();const ve=Math.max(1,e.timeline.fps),_e=e.timeline.frame,Me=_e/ve;B==null||B.sync(e.spines,_e,ve),Vn(Me);for(const Qe of e.systems){const Se=V.get(Qe.id);if(!Se)continue;Se.setFollowExportCurveMode(e.settings.exportSettings.keyframeCurve==="bezier"?"贝塞尔":"线性");const at=Qe.visible!==!1;Se.visible=at,Se.renderable=at;const Pe=Qe.config;Se.scale.set(Pe.rootScaleX,Pe.rootScaleY);const Xt=new Set(Pe.collisionColliderIds);Se.setColliders(Pe.collision?W.filter(ut=>Xt.has(ut.id)):[]),Se.setEmitterFollowSpawn(0,0,0);let Bt={x:Pe.centerX,y:Pe.centerY,rotation:Pe.rootRotation};const si=Pe.emitterFollow&&Pe.emitterFollowMode==="bone"?e.spines.find(ut=>ut.id===Pe.emitterFollowSpineId&&ut.enabled&&ut.status==="ready"):null,Ci=si&&(B==null?void 0:B.getBoneWorldTransform(si.id,Pe.emitterFollowBoneName))||null,ns=Pe.emitterFollow&&Pe.emitterFollowMode==="path"?e.paths.find(ut=>ut.id===Pe.emitterFollowPathId&&ut.enabled):null,Ha=Math.max(.05,Pe.emitterFollowDuration),$=Math.min(1,Math.max(0,Me/Ha)),S=Math.min(1,Math.max(0,Ws(Pe.emitterFollowCurve,$))),C=Math.min(1,Math.max(0,Pe.emitterFollowOffset)),Q=Pe.emitterFollowDirection==="reverse"?(1-C)*(1-S):C+(1-C)*S,Re=ns?yf(ns,Q):null;if(Ci){const ut=Pe.emitterFollowBoneOffsetX,ni=Pe.emitterFollowBoneOffsetY,Vt=Ci.x+ut,rs=Ci.y+ni,tc=Pe.rootRotation+Pe.emitterFollowBoneRotation,Xo=Math.max(1e-4,Math.abs(Pe.rootScaleX*Pe.emitterFollowBoneScaleX)),Vo=Math.max(1e-4,Math.abs(Pe.rootScaleY*Pe.emitterFollowBoneScaleY));if(Bt={x:Vt,y:rs,rotation:tc},Pe.emitterFollowSpace==="local")Se.position.set(Vt,-rs),Se.rotation=-tc*Math.PI/180,Se.scale.set(Xo,Vo),Se.setSimulationTransform(Vt,rs,tc,Xo,Vo);else{Se.position.set(Pe.centerX,-Pe.centerY),Se.rotation=-Pe.rootRotation*Math.PI/180,Se.scale.set(Xo,Vo),Se.setSimulationTransform(Pe.centerX,Pe.centerY,Pe.rootRotation,Xo,Vo);const Vp=ks(Pe,Vt,rs,Xo,Vo),AS=-(tc-Pe.rootRotation);Se.setEmitterFollowSpawn(Vp.x,Vp.y,AS)}}else if(Re){const ut=Re.angle+(Pe.emitterFollowDirection==="reverse"?180:0),ni=Pe.emitterAngleMode==="direction"?ut:Pe.rootRotation;if(Bt={x:Re.x,y:Re.y,rotation:ni},Pe.emitterFollowSpace==="local")Se.position.set(Re.x,-Re.y),Se.rotation=-ni*Math.PI/180,Se.setSimulationTransform(Re.x,Re.y,ni);else{Se.position.set(Pe.centerX,-Pe.centerY),Se.rotation=-Pe.rootRotation*Math.PI/180,Se.setSimulationTransform(Pe.centerX,Pe.centerY,Pe.rootRotation);const Vt=ks(Pe,Re.x,Re.y),rs=Pe.emitterAngleMode==="direction"?-(ut-Pe.rootRotation):0;Se.setEmitterFollowSpawn(Vt.x,Vt.y,rs)}}else Se.position.set(Pe.centerX,-Pe.centerY),Se.rotation=-Pe.rootRotation*Math.PI/180,Se.setSimulationTransform(Pe.centerX,Pe.centerY,Pe.rootRotation);const mt=Pe.shape==="path"&&Pe.spawnPathId>0&&e.paths.find(ut=>ut.id===Pe.spawnPathId&&ut.enabled&&ut.points.length>0)||null;Se.setSpawnPathSampler(mt?ut=>ea(Pe,mt,ut):null,(mt==null?void 0:mt.closed)===!0),J.set(Qe.id,Bt)}let be=0;const De=[],Ie=e.settings.showBones&&e.activeObjectType==="particle"?e.activeObjectId:0,Le=(Qe,Se,at)=>{!Qe||Qe.id!==Ie||Qe.visible===!1||br(De,at,Se.position.x,Se.position.y)},Te=e.timeline,je=Te.fps,rt=1/Math.max(1,je);let Je=N,nt=0;if(Te.playing?(L+=Y,nt=Math.floor(L/rt),nt>0&&(L-=nt*rt)):L=0,Te.playing&&nt>0)for(let Qe=0;QeBt.id===e.activeId),at=(Se==null?void 0:Se.config.mode)==="stream"&&Se.config.streamBehavior==="loop"?g1(Se.config,je):null,Xt=Te.loop&&(at==null?void 0:at.start)===Te.playbackStart&&at.end===Te.playbackEnd?Te.playbackEnd-1:Te.playbackEnd;if(Te.frame>Xt)if(Te.loop)Te.frame=Te.playbackStart;else{Te.frame=Te.playbackEnd,Te.playing=!1;break}}else{if(Te.frame===0)for(const Se of e.systems){const at=V.get(Se.id);at&&(Se.config.mode==="stream"&&Se.config.streamBehavior==="loop"?sR(Se,at,je,Te.totalFrames):at.reset())}for(const[Se,at]of V){const Pe=e.systems.find(ns=>ns.id===Se),Xt=(Pe==null?void 0:Pe.config.mode)==="stream"&&Pe.config.streamBehavior==="loop",Bt=Xt?(ee=Pe.frames)==null?void 0:ee[Te.frame]:void 0,si=Te.frame===0&&!Xt,Ci=si?[]:Bt||at.update(rt);if(si?at.apply([]):Bt&&at.apply(Bt),(Pe==null?void 0:Pe.visible)!==!1)for(const ns of Ci)ns.active&&Le(Pe,at,ns);be+=Ci.length}for(const Se of e.systems){if(!Se.config.texture)continue;Se.frames=Se.frames||[];const at=V.get(Se.id);at&&!(Se.config.mode==="stream"&&Se.config.streamBehavior==="loop")&&(Se.frames[Te.frame]=at.capture())}Te.frame++,Te.frame>=Te.totalFrames&&(Te.frame=Te.playbackStart,Te.recorded=!0)}else{Te.playing||(Je=Te.frame);for(const Qe of e.systems){const Se=V.get(Qe.id),at=Te.playing?N:Te.frame,Pe=(ue=Qe.frames)==null?void 0:ue[at],Xt=Qe.config.mode==="stream"&&Qe.config.streamBehavior==="loop"&&!!Pe;if((Te.recorded||Xt)&&Se&&Pe){Se.apply(Pe);for(const Bt of Pe)Bt.active&&(Le(Qe,Se,Bt),be++)}else if(Se){const Bt=Te.frame===0?[]:Se.update(0);if(Te.frame===0&&Se.apply([]),Qe.visible!==!1)for(const si of Bt)si.active&&Le(Qe,Se,si);be+=Se.activeCount}}}N=Je,B==null||B.sync(e.spines,Je,je);for(const[,Qe]of V)Qe.drawTrailMeshDebug(e.settings.showSkinMesh);Ga(),Qr(),pt(),Zt(),Rs(),Hs(),Ui(),Ps(),ss(De),i.value&&(i.value.systems=e.systems.length,i.value.particles=be)}}return Kr(async()=>{const H=t.value;f=new Yb({width:H.clientWidth||800,height:H.clientHeight||600,backgroundAlpha:0,antialias:!0}),H.appendChild(f.view),we(),fs(()=>e.settings.backgroundImageData,z,{immediate:!0}),await me();const Y=X;for(const ee of e.systems){ee.config.texture=Y;const ne=Wr(ee.config);if(E)for(const ue of ne.trailResources)!ue.texture&&(ue.previewUrl==="/images/trail.png"||ue.previewUrl==="/trails/trail.png")&&(ue.texture=E);for(const ue of ne.imageResources)!ue.texture&&ue.textureName==="star"&&(ue.texture=Y)}i.value={systems:e.systems.length,particles:0},e.timeline.recorded=!1,e.timeline.frame=0,L=0,N=0,e.timeline.playing=!0,e.timeline.loop=!0;for(const ee of e.systems)ee.frames=[];e.recalcTotalFrames(),U=performance.now()/1e3,ta(),fs(()=>e.systems.map(ee=>JSON.stringify(ee.config,(ne,ue)=>ne==="texture"||ne==="trailTexture"||ne==="previewUrl"?void 0:ue)).join("|")+`|colliders:${JSON.stringify(e.colliders)}|paths:${JSON.stringify(e.paths)}`,()=>{e.recalcTotalFrames(),e.timeline.recorded=!1,e.timeline.frame=0;for(const ee of e.systems)ee.frames=[];e.timeline.playing=!0,e.timeline.loop=!0}),HP(e)}),Gl(()=>{cancelAnimationFrame(O),B==null||B.destroy(),B=null,v++,g&&g.destroy(!0),g=null,m=null,f&&(f.destroy(!0,{children:!0}),f=null)}),(H,Y)=>(ie(),ae("div",Ak,[M("div",{ref_key:"holder",ref:t,class:Ze(["stage-holder",{grid:ke(e).settings.showGrid}]),tabindex:"0",onWheel:bt(xe,["prevent"]),onPointerdown:oe,onDblclick:bt(st,["prevent"])},null,34),M("div",Ek,[M("button",{class:"settings-btn",onClick:Ae,title:"系统设置"},"系统设置"),M("button",{class:"undo-btn",disabled:ke(Iu).undoCount===0,onClick:Y[0]||(Y[0]=(...ee)=>ke(Tf)&&ke(Tf)(...ee)),title:"撤回上一步 (Ctrl+Z)"},"↶",8,Ck),M("div",Ik,[M("button",{class:Ze(["tool-btn",{on:l.value===""}]),onClick:Y[1]||(Y[1]=ee=>u("")),title:"拖动画布 (Q)"},"✋",2),M("button",{class:Ze(["tool-btn",{on:l.value==="translate"}]),onClick:Y[2]||(Y[2]=ee=>u("translate")),title:"位移 (W)"},"✥",2),M("button",{class:Ze(["tool-btn",{on:l.value==="rotate"}]),onClick:Y[3]||(Y[3]=ee=>u("rotate")),title:"旋转 (E)"},"⟳",2),M("button",{class:Ze(["tool-btn",{on:l.value==="scale"}]),onClick:Y[4]||(Y[4]=ee=>u("scale")),title:"缩放 (R)"},"⤢",2)]),M("div",Rk,[M("button",{class:"tool-btn",onClick:zi,title:"放大"},"+"),M("button",{class:"tool-btn",onClick:dn,title:"缩小"},"-"),M("button",{class:"tool-btn",onClick:ce,title:"适配画布"},"⤢"),M("button",{class:Ze(["tool-btn",{on:ke(e).settings.showGrid}]),onClick:Rt,title:"切换网格"},"▦",2),M("button",{class:"tool-btn",onClick:de,title:"重置视图"},"⟳")]),M("div",{class:"background-menu",onClick:Y[10]||(Y[10]=bt(()=>{},["stop"]))},[M("button",{class:Ze(["background-btn",{on:r.value}]),title:"背景图显示设置",onClick:Ee},"背景图",2),r.value?(ie(),ae("div",Pk,[M("button",{class:"background-upload",onClick:Y[5]||(Y[5]=ee=>{var ne;return(ne=o.value)==null?void 0:ne.click()})},Xe(h.value?"更换图像":"上传图像"),1),M("button",{class:"background-clear",disabled:!h.value,onClick:Y[6]||(Y[6]=ee=>j())},"清除背景",8,kk),M("input",{ref_key:"backgroundFileInput",ref:o,class:"background-file-input",type:"file",accept:"image/png,image/jpeg,image/webp",onChange:Z},null,544),M("div",{class:"background-file-name",title:h.value},Xe(h.value||"未上传图像"),9,Fk),M("div",Ok,[M("label",null,[Y[27]||(Y[27]=M("span",null,"X",-1)),ye(M("input",{"onUpdate:modelValue":Y[7]||(Y[7]=ee=>ke(e).settings.backgroundX=ee),type:"number",step:"1","aria-label":"背景图 X 偏移"},null,512),[[ht,ke(e).settings.backgroundX,void 0,{number:!0}]])]),M("label",null,[Y[28]||(Y[28]=M("span",null,"Y",-1)),ye(M("input",{"onUpdate:modelValue":Y[8]||(Y[8]=ee=>ke(e).settings.backgroundY=ee),type:"number",step:"1","aria-label":"背景图 Y 偏移"},null,512),[[ht,ke(e).settings.backgroundY,void 0,{number:!0}]])])]),M("label",Bk,[Y[29]||(Y[29]=M("span",null,"透明度",-1)),ye(M("input",{"onUpdate:modelValue":Y[9]||(Y[9]=ee=>ke(e).settings.backgroundOpacity=ee),type:"range",min:"0",max:"1",step:"0.01","aria-label":"背景图透明度"},null,512),[[ht,ke(e).settings.backgroundOpacity,void 0,{number:!0}]]),M("b",null,Xe(Math.round(ke(e).settings.backgroundOpacity*100))+"%",1)])])):Ve("",!0)]),M("button",{class:Ze(["help-btn",{on:a.value}]),title:"查看使用说明",onClick:pe},"使用说明",2),M("span",Lk,Xe(Math.round(ke(e).editor.viewScale*100))+"%",1)]),n.value?(ie(),ae("div",Dk,[M("div",Nk,[Y[30]||(Y[30]=Qt("系统设置 ",-1)),M("button",{class:"sp-close",onClick:Y[11]||(Y[11]=ee=>n.value=!1)},"✕")]),Y[44]||(Y[44]=M("div",{class:"sp-section-title"},"界面布局",-1)),M("label",Uk,[Y[32]||(Y[32]=M("span",null,"参数面板位置",-1)),M("span",Xk,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Y[12]||(Y[12]=ee=>ke(e).settings.parameterPanelOnRight=ee),"aria-label":"参数面板显示在右侧"},null,512),[[ei,ke(e).settings.parameterPanelOnRight]]),Y[31]||(Y[31]=M("span",{class:"sp-switch-ui","aria-hidden":"true"},null,-1)),M("b",null,Xe(ke(e).settings.parameterPanelOnRight?"右侧":"左侧"),1)])]),Y[45]||(Y[45]=M("div",{class:"sp-divider"},null,-1)),Y[46]||(Y[46]=M("div",{class:"sp-section-title"},"操作历史",-1)),M("label",Vk,[Y[33]||(Y[33]=M("span",null,"最大撤回步数",-1)),ye(M("input",{class:"sp-num sp-undo-limit",type:"number",min:"1",max:"200","onUpdate:modelValue":Y[13]||(Y[13]=ee=>ke(e).settings.undoLimit=ee),"aria-label":"最大撤回步数",onChange:G},null,544),[[ht,ke(e).settings.undoLimit,void 0,{number:!0}]])]),Y[47]||(Y[47]=M("div",{class:"sp-divider"},null,-1)),Y[48]||(Y[48]=M("div",{class:"sp-section-title"},"画布辅助显示",-1)),M("label",Yk,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Y[14]||(Y[14]=ee=>ke(e).settings.showEmitter=ee)},null,512),[[ei,ke(e).settings.showEmitter]]),Y[34]||(Y[34]=Qt("发射点",-1))]),M("label",$k,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Y[15]||(Y[15]=ee=>ke(e).settings.showBones=ee)},null,512),[[ei,ke(e).settings.showBones]]),Y[35]||(Y[35]=Qt("骨骼连线",-1))]),ke(e).settings.showBones?(ie(),ae(Ke,{key:0},[M("label",Gk,[Y[36]||(Y[36]=M("span",null,"骨骼点绘制大小",-1)),ye(M("input",{class:"sp-num",type:"number",min:"0.1",max:"10",step:"0.1","onUpdate:modelValue":Y[16]||(Y[16]=ee=>ke(e).settings.bonePointDrawSize=ee),"aria-label":"骨骼点绘制大小",onChange:d},null,544),[[ht,ke(e).settings.bonePointDrawSize,void 0,{number:!0}]])]),M("label",Hk,[Y[37]||(Y[37]=M("span",null,"坐标轴绘制大小",-1)),ye(M("input",{class:"sp-num",type:"number",min:"0.1",max:"10",step:"0.1","onUpdate:modelValue":Y[17]||(Y[17]=ee=>ke(e).settings.boneAxisDrawSize=ee),"aria-label":"坐标轴绘制大小",onChange:d},null,544),[[ht,ke(e).settings.boneAxisDrawSize,void 0,{number:!0}]])])],64)):Ve("",!0),M("label",jk,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Y[18]||(Y[18]=ee=>ke(e).settings.showSkinMesh=ee)},null,512),[[ei,ke(e).settings.showSkinMesh]]),Y[38]||(Y[38]=Qt("蒙皮网格",-1))]),Y[49]||(Y[49]=M("div",{class:"sp-divider"},null,-1)),M("label",Wk,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Y[19]||(Y[19]=ee=>ke(e).settings.tickEnabled=ee)},null,512),[[ei,ke(e).settings.tickEnabled]]),Y[39]||(Y[39]=Qt("启用刻度",-1))]),ke(e).settings.tickEnabled?(ie(),ae(Ke,{key:1},[M("label",zk,[Y[40]||(Y[40]=M("span",null,"刻度文字大小",-1)),ye(M("input",{type:"range",min:"8",max:"40",step:"1","onUpdate:modelValue":Y[20]||(Y[20]=ee=>ke(e).settings.axisFontSize=ee)},null,512),[[ht,ke(e).settings.axisFontSize,void 0,{number:!0}]]),ye(M("input",{type:"number",min:"8",max:"40","onUpdate:modelValue":Y[21]||(Y[21]=ee=>ke(e).settings.axisFontSize=ee),class:"sp-num"},null,512),[[ht,ke(e).settings.axisFontSize,void 0,{number:!0}]])]),M("label",qk,[Y[41]||(Y[41]=M("span",null,"刻度线粗细",-1)),ye(M("input",{type:"range",min:"1",max:"5",step:"0.5","onUpdate:modelValue":Y[22]||(Y[22]=ee=>ke(e).settings.tickWidth=ee)},null,512),[[ht,ke(e).settings.tickWidth,void 0,{number:!0}]]),ye(M("input",{type:"number",min:"1",max:"5","onUpdate:modelValue":Y[23]||(Y[23]=ee=>ke(e).settings.tickWidth=ee),class:"sp-num"},null,512),[[ht,ke(e).settings.tickWidth,void 0,{number:!0}]])]),M("label",Kk,[Y[42]||(Y[42]=M("span",null,"坐标轴颜色",-1)),ye(M("input",{type:"color","onUpdate:modelValue":Y[24]||(Y[24]=ee=>ke(e).settings.axisColor=ee),class:"sp-colr"},null,512),[[ht,ke(e).settings.axisColor]]),M("span",Zk,Xe(ke(e).settings.axisColor),1)]),M("label",Jk,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Y[25]||(Y[25]=ee=>ke(e).settings.showAxisLabels=ee)},null,512),[[ei,ke(e).settings.showAxisLabels]]),Y[43]||(Y[43]=Qt("显示刻度数值",-1))])],64)):Ve("",!0),Y[50]||(Y[50]=M("div",{class:"sp-cache-note"},"整个系统设置会自动保存到当前浏览器",-1))])):Ve("",!0),Ue(Tk,{show:a.value,onClose:Y[26]||(Y[26]=ee=>a.value=!1)},null,8,["show"]),i.value?(ie(),ae("div",Qk,[Y[51]||(Y[51]=Qt(" 系统: ",-1)),M("b",eF,Xe(i.value.systems),1),Y[52]||(Y[52]=Qt(" · 粒子(骨骼): ",-1)),M("b",tF,Xe(i.value.particles),1),Y[53]||(Y[53]=Qt(" · 根骨骼: ",-1)),Y[54]||(Y[54]=M("b",null,"root",-1)),Y[55]||(Y[55]=M("span",{class:"hud-tip"},"滚轮缩放 · 左键拖动画布",-1))])):Ve("",!0)]))}}),sF=Gs(iF,[["__scopeId","data-v-373478e7"]]),nF={class:"ns-label"},rF=["min","max","step","value","disabled"],aF=["min","max","step","value","disabled"],oF=$s({__name:"NumSlider",props:{label:{},modelValue:{},min:{},max:{},step:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,i=e,n=lt(String(t.modelValue));fs(()=>t.modelValue,h=>{n.value=String(h)});function r(h){const l=parseFloat(h.target.value);Number.isNaN(l)||i("update:modelValue",l)}function a(h){n.value=h.target.value;const l=parseFloat(n.value);Number.isNaN(l)||i("update:modelValue",l)}function o(){const h=parseFloat(n.value);Number.isNaN(h)&&(n.value=String(t.modelValue))}return(h,l)=>(ie(),ae("div",{class:Ze(["ns",{disabled:s.disabled}])},[M("span",nF,Xe(s.label),1),M("input",{type:"range",class:"ns-range",min:s.min,max:s.max,step:s.step,value:s.modelValue,disabled:s.disabled,onInput:r},null,40,rF),M("input",{type:"number",class:"ns-num",min:s.min,max:s.max,step:s.step,value:n.value,disabled:s.disabled,onInput:a,onBlur:o},null,40,aF)],2))}}),qe=Gs(oF,[["__scopeId","data-v-45669c72"]]),lF={class:"ce"},cF={class:"ce-editor"},hF={class:"ce-grid"},uF=["x1","x2","y2"],dF=["y1","x2","y2"],fF=["x","y","width","height"],mF=["d"],pF={key:0,class:"ce-handles"},gF=["x1","y1","x2","y2"],vF=["cx","cy","onPointerdown"],yF=["x1","y1","x2","y2"],xF=["cx","cy","onPointerdown"],bF=["cx","cy"],wF=["cx","cy","onPointerdown","onDblclick"],SF={class:"ce-nav"},MF={class:"ce-tip"},Mr=8,_F=$s({__name:"CurveEditor",props:{modelValue:{},defaultValue:{default:()=>[{x:0,y:0},{x:1,y:1}]},mode:{default:"linear"}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,i=e,n=lt(null),r=lt(300),a=lt(110);let o=null;function h(){if(!n.value)return;const I=n.value.getBoundingClientRect();r.value=I.width,a.value=I.height}function l(I){return Mr+I*(r.value-Mr*2)}function c(I){return Mr+(1-I)*(a.value-Mr*2)}function u(){return[...t.modelValue].sort((I,k)=>I.x-k.x)}function d(I){i("update:modelValue",[...I].sort((k,B)=>k.x-B.x))}function f(){d(t.defaultValue.map(I=>({...I})))}const p=vt(()=>u());function m(I){const k=p.value[I],B=p.value[Math.max(0,I-1)];return{x:k.x-(k.x-B.x)/3,y:k.y-(k.y-B.y)/3}}function g(I){const k=p.value[I],B=p.value[Math.min(p.value.length-1,I+1)];return{x:k.x+(B.x-k.x)/3,y:k.y+(B.y-k.y)/3}}function v(I){const k=p.value[I],B=m(I);return{x:k.x+(k.inX??B.x-k.x),y:k.y+(k.inY??B.y-k.y)}}function b(I){const k=p.value[I],B=g(I);return{x:k.x+(k.outX??B.x-k.x),y:k.y+(k.outY??B.y-k.y)}}const y=vt(()=>{if(!p.value.length)return"";let I=`M ${l(p.value[0].x)} ${c(p.value[0].y)}`;for(let k=1;kMath.abs(U.x-k)>.02);D.push({x:k,y:B}),d(D)}let _={t:0,i:-1,x:0,y:0};function R(I,k){I.stopPropagation();const B=u().findIndex(N=>Math.abs(N.x-p.value[k].x)<1e-6&&Math.abs(N.y-p.value[k].y)<1e-6);if(B<0)return;const D=Date.now();if(D-_.t<300&&_.i===k&&Math.abs(I.clientX-_.x)<8&&Math.abs(I.clientY-_.y)<8){_={t:0,i:-1,x:0,y:0},F(k);return}_={t:D,i:k,x:I.clientX,y:I.clientY};const U=N=>{(Math.abs(N.clientX-I.clientX)>8||Math.abs(N.clientY-I.clientY)>8)&&(_={t:0,i:-1,x:0,y:0});const{x:O,y:X}=w(N.clientX,N.clientY),E=u();E[B]={x:O,y:X},d(E)},L=()=>{window.removeEventListener("pointermove",U),window.removeEventListener("pointerup",L)};window.addEventListener("pointermove",U),window.addEventListener("pointerup",L)}function P(I,k,B){I.stopPropagation();const D=L=>{const N=w(L.clientX,L.clientY),O=u(),X=O[k],E=B==="in"?O[Math.max(0,k-1)].x:X.x,V=B==="in"?X.x:O[Math.min(O.length-1,k+1)].x,q=Math.min(V,Math.max(E,N.x)),W=Math.round((q-X.x)*100)/100,J=Math.round((N.y-X.y)*100)/100;O[k]=B==="in"?{...X,inX:W,inY:J}:{...X,outX:W,outY:J},d(O)},U=()=>{window.removeEventListener("pointermove",D),window.removeEventListener("pointerup",U)};window.addEventListener("pointermove",D),window.addEventListener("pointerup",U)}function F(I,k){k==null||k.stopPropagation();const B=u();B.length<=2||(A=Date.now(),d(B.filter((D,U)=>U!==I)))}return Kr(()=>{h(),o=new ResizeObserver(h),n.value&&o.observe(n.value)}),Gl(()=>{o==null||o.disconnect()}),(I,k)=>(ie(),ae("div",lF,[M("div",cF,[(ie(),ae("svg",{ref_key:"svg",ref:n,class:"ce-svg",onDblclick:T},[M("g",hF,[(ie(),ae(Ke,null,ci([.25,.5,.75],B=>M("line",{key:"v"+B,x1:l(B),y1:"0",x2:l(B),y2:c(0)},null,8,uF)),64)),(ie(),ae(Ke,null,ci([.25,.5,.75],B=>M("line",{key:"h"+B,x1:"0",y1:c(B),x2:l(1),y2:c(B)},null,8,dF)),64))]),M("rect",{x:l(0),y:c(1),width:l(1)-l(0),height:c(0)-c(1),class:"ce-frame",fill:"none"},null,8,fF),M("path",{d:y.value,class:"ce-line",fill:"none"},null,8,mF),s.mode==="bezier"?(ie(),ae("g",pF,[(ie(!0),ae(Ke,null,ci(p.value,(B,D)=>(ie(),ae(Ke,{key:"handles-"+D},[D>0?(ie(),ae("line",{key:0,x1:l(B.x),y1:c(B.y),x2:l(v(D).x),y2:c(v(D).y)},null,8,gF)):Ve("",!0),D>0?(ie(),ae("circle",{key:1,cx:l(v(D).x),cy:c(v(D).y),r:"4",onPointerdown:U=>P(U,D,"in")},null,40,vF)):Ve("",!0),DP(U,D,"out")},null,40,xF)):Ve("",!0)],64))),128))])):Ve("",!0),(ie(!0),ae(Ke,null,ci(p.value,(B,D)=>(ie(),ae("g",{key:D},[M("circle",{cx:l(B.x),cy:c(B.y),r:"5",class:"ce-node"},null,8,bF),M("circle",{cx:l(B.x),cy:c(B.y),r:"9",class:"ce-hit",onPointerdown:U=>R(U,D),onDblclick:U=>F(D,U)},null,40,wF)]))),128))],544)),M("div",SF,[M("span",MF,Xe(s.mode==="bezier"?"拖动方形手柄调整弧度·双击空白新建·双击节点删除":"双击空白新建·双击节点删除·拖动节点调整"),1)])]),M("button",{class:"ce-reset",type:"button",title:"恢复默认曲线",onClick:f},"重置")]))}}),xn=Gs(_F,[["__scopeId","data-v-3c8d1b94"]]),TF={class:"pac"},AF={class:"pac-head"},EF={class:"pac-label"},CF={key:0,class:"pac-modes"},IF=["onClick"],RF={class:"pac-range"},PF={class:"pac-curve"},kF={class:"pac-axis"},FF=$s({__name:"ParticleAttributeControl",props:{label:{},mode:{},valueMin:{},valueMax:{},curve:{},defaultCurve:{default:()=>[{x:0,y:0},{x:1,y:1}]},min:{},max:{},step:{default:1},allowDirection:{type:Boolean,default:!1},allowCurve:{type:Boolean,default:!0},showModes:{type:Boolean,default:!0},curveLabel:{default:"曲线输入 →"}},emits:["update:mode","update:valueMin","update:valueMax","update:curve"],setup(s){const e=s,t=vt(()=>{const i=[{label:"固定",value:"fixed"},{label:"随机",value:"random"}];return e.allowCurve&&i.push({label:"曲线",value:"curve"}),e.allowDirection&&i.push({label:"发射方向",value:"direction"}),i});return(i,n)=>(ie(),ae("div",TF,[M("div",AF,[M("span",EF,Xe(s.label),1),s.showModes?(ie(),ae("div",CF,[(ie(!0),ae(Ke,null,ci(t.value,r=>(ie(),ae("button",{key:r.value,class:Ze(["pac-mode",{on:s.mode===r.value}]),onClick:a=>i.$emit("update:mode",r.value)},Xe(r.label),11,IF))),128))])):Ve("",!0)]),s.mode==="fixed"||s.mode==="direction"?(ie(),Jt(qe,{key:0,label:s.mode==="direction"?"角度偏移":"数值",min:s.min,max:s.max,step:s.step,"model-value":s.valueMin,"onUpdate:modelValue":n[0]||(n[0]=r=>i.$emit("update:valueMin",r))},null,8,["label","min","max","step","model-value"])):s.mode==="random"?(ie(),ae(Ke,{key:1},[Ue(qe,{label:"下限",min:s.min,max:s.max,step:s.step,"model-value":s.valueMin,"onUpdate:modelValue":n[1]||(n[1]=r=>i.$emit("update:valueMin",r))},null,8,["min","max","step","model-value"]),Ue(qe,{label:"上限",min:s.min,max:s.max,step:s.step,"model-value":s.valueMax,"onUpdate:modelValue":n[2]||(n[2]=r=>i.$emit("update:valueMax",r))},null,8,["min","max","step","model-value"])],64)):(ie(),ae(Ke,{key:2},[M("div",RF,[Ue(qe,{label:"范围下限",min:s.min,max:s.max,step:s.step,"model-value":s.valueMin,"onUpdate:modelValue":n[3]||(n[3]=r=>i.$emit("update:valueMin",r))},null,8,["min","max","step","model-value"]),Ue(qe,{label:"范围上限",min:s.min,max:s.max,step:s.step,"model-value":s.valueMax,"onUpdate:modelValue":n[4]||(n[4]=r=>i.$emit("update:valueMax",r))},null,8,["min","max","step","model-value"])]),M("div",PF,[Ue(xn,{"model-value":s.curve,"default-value":s.defaultCurve,"onUpdate:modelValue":n[5]||(n[5]=r=>i.$emit("update:curve",r))},null,8,["model-value","default-value"]),M("div",kF,[n[6]||(n[6]=M("span",null,"0",-1)),M("span",null,Xe(s.curveLabel),1),n[7]||(n[7]=M("span",null,"1",-1))])])],64))]))}}),jn=Gs(FF,[["__scopeId","data-v-7a931847"]]),OF={class:"gradient-editor"},BF=["title","onClick","onDblclick","onPointerdown"],LF={key:0,class:"gradient-controls"},DF=["value"],NF=["value"],UF={class:"gradient-position"},XF=["value"],VF=["disabled"],YF=$s({__name:"ColorGradientEditor",props:{modelValue:{}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,i=e,n=lt(null),r=lt(0),a=vt(()=>t.modelValue[r.value]||null),o=vt(()=>[...t.modelValue].sort((R,P)=>R.position-P.position)),h=vt(()=>{const R=o.value;return R.length?`linear-gradient(90deg, ${R.map(P=>`${P.color} ${l(P.position)*100}%`).join(", ")})`:"#ffffff"});fs(()=>t.modelValue.length,R=>{r.value>=R&&(r.value=Math.max(0,R-1))});function l(R){return Math.min(1,Math.max(0,Number(R)||0))}function c(){return t.modelValue.map(R=>({position:l(R.position),color:R.color}))}function u(R,P){const F=c();F[R]&&(F[R]={...F[R],...P},i("update:modelValue",F))}function d(R){u(r.value,{color:R.target.value})}function f(R){var I;const P=R.target,F=_(P.value,((I=a.value)==null?void 0:I.color)||"#ffffff");P.value=F,u(r.value,{color:F})}function p(R){const P=R.target;f(R),P.blur()}function m(R){const P=Number(R.target.value);Number.isFinite(P)&&u(r.value,{position:l(P/100)})}function g(R){const P=c();P.push({position:l(R),color:A(P,R)}),r.value=P.length-1,i("update:modelValue",P)}function v(R){if(!n.value)return;const P=n.value.getBoundingClientRect();g((R.clientX-P.left)/Math.max(1,P.width))}function b(){const R=o.value;let P=.5;if(R.length>1){let F=-1;for(let I=0;IF&&(F=k,P=(R[I].position+R[I+1].position)/2)}}g(P)}function y(R){if(t.modelValue.length<=2||R<0)return;const P=c().filter((F,I)=>I!==R);r.value=Math.min(R,P.length-1),i("update:modelValue",P)}function w(R,P){if(!n.value)return;r.value=P;const F=k=>{const B=n.value.getBoundingClientRect();u(P,{position:l((k.clientX-B.left)/Math.max(1,B.width))})},I=()=>{window.removeEventListener("pointermove",F),window.removeEventListener("pointerup",I),window.removeEventListener("pointercancel",I)};window.addEventListener("pointermove",F),window.addEventListener("pointerup",I),window.addEventListener("pointercancel",I),R.preventDefault()}function A(R,P){const F=[...R].sort((I,k)=>I.position-k.position);if(!F.length)return"#ffffff";if(P<=F[0].position)return F[0].color;if(P>=F[F.length-1].position)return F[F.length-1].color;for(let I=0;IB.position)continue;const D=(P-k.position)/Math.max(1e-4,B.position-k.position);return T(k.color,B.color,D)}return F[F.length-1].color}function T(R,P,F){const I=U=>{const L=parseInt(U.replace("#","").padEnd(6,"0").slice(0,6),16);return[L>>16&255,L>>8&255,L&255]},k=I(R),B=I(P),D=U=>Math.round(k[U]+(B[U]-k[U])*F);return`#${[D(0),D(1),D(2)].map(U=>U.toString(16).padStart(2,"0")).join("")}`}function _(R,P){let F=R.trim().replace(/^#/,"");return/^[0-9a-f]{3}$/i.test(F)&&(F=F.split("").map(I=>I+I).join("")),/^[0-9a-f]{6}$/i.test(F)?`#${F.toLowerCase()}`:P}return(R,P)=>(ie(),ae("div",OF,[M("div",{ref_key:"bar",ref:n,class:"gradient-bar",style:Li({background:h.value}),title:"双击色带添加色标",onDblclick:v},[(ie(!0),ae(Ke,null,ci(s.modelValue,(F,I)=>(ie(),ae("button",{key:I,type:"button",class:Ze(["gradient-stop",{selected:I===r.value}]),style:Li({left:`${l(F.position)*100}%`,"--stop-color":F.color}),title:`${Math.round(l(F.position)*100)}% · ${F.color}`,onClick:bt(k=>r.value=I,["stop"]),onDblclick:bt(k=>y(I),["stop"]),onPointerdown:bt(k=>w(k,I),["stop"])},null,46,BF))),128))],36),a.value?(ie(),ae("div",LF,[M("input",{type:"color",class:"gradient-color",value:a.value.color,"aria-label":"色标颜色",onInput:d},null,40,DF),M("input",{type:"text",class:"gradient-hex-input",value:a.value.color,"aria-label":"色标颜色值",spellcheck:"false",onChange:f,onKeydown:Ea(p,["enter"])},null,40,NF),M("label",UF,[M("input",{type:"number",min:"0",max:"100",step:"1",value:Math.round(l(a.value.position)*100),"aria-label":"色标位置",onInput:m},null,40,XF),P[1]||(P[1]=M("span",null,"%",-1))]),M("button",{type:"button",class:"gradient-action",title:"在中间新增颜色",onClick:b},"+"),M("button",{type:"button",class:"gradient-action danger",title:"删除当前色标",disabled:s.modelValue.length<=2,onClick:P[0]||(P[0]=F=>y(r.value))},"×",8,VF)])):Ve("",!0),P[2]||(P[2]=M("div",{class:"gradient-hint"},"双击色带新增 · 拖动色标调整位置 · 双击色标删除",-1))]))}}),Wv=Gs(YF,[["__scopeId","data-v-8816e4a4"]]),$F={class:"image-card"},GF={class:"imgrow"},HF=["title"],jF=["src","alt"],WF={key:1,viewBox:"0 0 24 24",width:"22",height:"22",fill:"none",stroke:"#8a93bb","stroke-width":"1.6"},zF={class:"img-fields"},qF={key:0,class:"row"},KF={class:"row"},ZF=["placeholder"],JF={class:"img-actions"},QF=["title"],e3=["disabled"],t3={class:"thumb-note"},i3={key:0,class:"row"},s3={class:"row"},n3={class:"row"},r3={class:"sequence-note"},a3={class:"resource-weight-row"},o3=["disabled","title"],l3={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},c3={key:1,viewBox:"0 0 24 24","aria-hidden":"true"},h3=$s({__name:"ImageResourceCard",props:{resource:{},resourceCount:{},defaultFile:{},namePlaceholder:{default:"particle"},showFolder:{type:Boolean,default:!0},supportsSequence:{type:Boolean,default:!1}},emits:["pick","pickSequence","reset","remove","updateWeight","toggleLock"],setup(s,{emit:e}){const t=s,i=e,n=vt(()=>{var l,c;if(t.resource.imageMode==="sequence"){const u=t.resource.sequenceFrames||[];if(!u.length)return"未选择序列帧";const d=((l=u[0])==null?void 0:l.name)||"第 1 帧",f=((c=u[u.length-1])==null?void 0:c.name)||d;return u.length===1?`1 帧 · ${d}`:`${u.length} 帧 · ${d} → ${f}`}const h=t.resource.textureName||t.defaultFile.replace(/\.[^.]+$/,"");return h.includes(".")?h:`${h}.png`}),r=vt(()=>{var h,l;return t.resource.imageMode==="sequence"?((l=(h=t.resource.sequenceFrames)==null?void 0:h[0])==null?void 0:l.previewUrl)||"":t.resource.previewUrl}),a=vt(()=>{var u,d;const h=t.resource.sequenceFrames||[];if(!h.length)return"未选择序列帧";const l=((u=h[0])==null?void 0:u.name)||"第一张图片",c=((d=h[h.length-1])==null?void 0:d.name)||"最后一张图片";return`已选择 ${h.length} 帧,按 ${l}-${c} 顺序播放`});function o(){t.supportsSequence&&t.resource.imageMode==="sequence"?i("pickSequence",t.resource.id):i("pick",t.resource.id)}return(h,l)=>(ie(),ae("div",$F,[M("div",GF,[M("button",{class:"img-thumb",title:s.supportsSequence&&s.resource.imageMode==="sequence"?"选择序列帧图片":"选择本地图片",onClick:o},[r.value?(ie(),ae("img",{key:0,src:r.value,alt:s.resource.textureName},null,8,jF)):(ie(),ae("svg",WF,[...l[10]||(l[10]=[M("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"},null,-1),M("circle",{cx:"8.5",cy:"8.5",r:"1.6"},null,-1),M("path",{d:"M21 15l-5-5-9 9"},null,-1)])]))],8,HF),M("div",zF,[s.showFolder?(ie(),ae("label",qF,[l[11]||(l[11]=M("span",null,"子文件夹",-1)),ye(M("input",{"onUpdate:modelValue":l[0]||(l[0]=c=>s.resource.textureFolder=c),type:"text",class:"inp",placeholder:"subfolder/"},null,512),[[ht,s.resource.textureFolder]])])):Ve("",!0),M("label",KF,[l[12]||(l[12]=M("span",null,"名称",-1)),ye(M("input",{"onUpdate:modelValue":l[1]||(l[1]=c=>s.resource.textureName=c),type:"text",class:"inp",placeholder:s.namePlaceholder},null,8,ZF),[[ht,s.resource.textureName]])])]),M("div",JF,[M("button",{class:"mini-btn2",title:`恢复 ${s.defaultFile}`,onClick:l[2]||(l[2]=c=>h.$emit("reset",s.resource.id))},"⟳",8,QF),M("button",{class:"mini-btn2",title:"删除图片资源",disabled:s.resourceCount===1,onClick:l[3]||(l[3]=c=>h.$emit("remove",s.resource.id))},"🗑",8,e3)])]),M("div",t3,Xe(n.value),1),s.supportsSequence?(ie(),ae("label",i3,[l[14]||(l[14]=M("span",null,"图片模式",-1)),ye(M("select",{"onUpdate:modelValue":l[4]||(l[4]=c=>s.resource.imageMode=c),class:"inp"},[...l[13]||(l[13]=[M("option",{value:"fixed"},"固定",-1),M("option",{value:"sequence"},"序列帧",-1)])],512),[[Ht,s.resource.imageMode]])])):Ve("",!0),s.supportsSequence&&s.resource.imageMode==="sequence"?(ie(),ae(Ke,{key:1},[M("label",s3,[l[16]||(l[16]=M("span",null,"播放模式",-1)),ye(M("select",{"onUpdate:modelValue":l[5]||(l[5]=c=>s.resource.sequencePlayback=c),class:"inp"},[...l[15]||(l[15]=[M("option",{value:"once-hide"},"单次-尾帧消失",-1),M("option",{value:"once-hold"},"单次-尾帧固定",-1),M("option",{value:"loop-forward"},"正向循环",-1),M("option",{value:"loop-reverse"},"反向循环",-1)])],512),[[Ht,s.resource.sequencePlayback]])]),M("label",n3,[l[17]||(l[17]=M("span",null,"播放帧率",-1)),ye(M("input",{"onUpdate:modelValue":l[6]||(l[6]=c=>s.resource.sequenceFps=c),type:"number",min:"1",max:"120",step:"1",class:"inp"},null,512),[[ht,s.resource.sequenceFps,void 0,{number:!0}]])]),M("button",{class:"sequence-pick",onClick:l[7]||(l[7]=c=>h.$emit("pickSequence",s.resource.id))},"选择序列帧(多选)"),M("div",r3,Xe(a.value),1)],64)):Ve("",!0),M("div",a3,[Ue(qe,{class:"resource-weight-control",label:"占比%",min:0,max:100,step:1,"model-value":s.resource.weight,disabled:s.resource.locked||s.resourceCount===1,"onUpdate:modelValue":l[8]||(l[8]=c=>h.$emit("updateWeight",s.resource.id,c))},null,8,["model-value","disabled"]),M("button",{class:Ze(["weight-lock",{on:s.resource.locked}]),disabled:s.resourceCount===1,title:s.resource.locked?"解除占比锁定":"锁定当前占比",onClick:l[9]||(l[9]=c=>h.$emit("toggleLock",s.resource.id))},[s.resource.locked?(ie(),ae("svg",l3,[...l[18]||(l[18]=[M("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"},null,-1),M("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"},null,-1)])])):(ie(),ae("svg",c3,[...l[19]||(l[19]=[M("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"},null,-1),M("path",{d:"M16 10V7a4 4 0 0 0-7.5-2"},null,-1)])]))],10,o3)]),XM(h.$slots,"default",{},void 0)]))}}),zv=Gs(h3,[["__scopeId","data-v-7a2d016a"]]),u3={class:"spine-editor"},d3={class:"field wide"},f3={class:"grid three"},m3={class:"field"},p3={class:"field"},g3={class:"field"},v3={class:"grid three"},y3={class:"field"},x3={class:"field"},b3={class:"field"},w3=["disabled"],S3={class:"asset-row"},M3=["title"],_3={class:"asset-row"},T3=["title"],A3={class:"asset-row"},E3=["title"],C3={class:"asset-actions"},I3=["disabled"],R3={class:"runtime-note"},P3={key:0},k3={key:0,class:"error"},F3={class:"section-box"},O3={key:0,class:"empty"},B3={key:1,class:"field wide"},L3=["value"],D3={class:"section-box"},N3={class:"tree-title-row"},U3=["disabled","title"],X3={key:0,class:"empty"},V3={key:1,class:"bone-search"},Y3={key:2,class:"empty"},$3={key:3,class:"bone-tree"},G3=["onClick","onKeydown"],H3=["title","onClick"],j3={key:1,class:"bone-leaf"},W3={class:"bone-name"},z3=$s({__name:"SpineObjectPanel",props:{spineObject:{}},setup(s){const e=s,t=Kl(),i=lt(null),n=lt(null),r=lt(null),a=lt(null),o=lt(new Set),h=lt(""),l=lt(null),c=lt(null),u=lt([]);e.spineObject.selectedBone==null&&(e.spineObject.selectedBone=""),e.spineObject.sourceBundle==null&&(e.spineObject.sourceBundle=null),e.spineObject.dataVersion==null&&(e.spineObject.dataVersion="");const d=vt(()=>{var N;return((N=l.value)==null?void 0:N.name)||e.spineObject.skeletonFileName}),f=vt(()=>{var N;return((N=c.value)==null?void 0:N.name)||e.spineObject.atlasFileName}),p=vt(()=>u.value.length?u.value.map(N=>N.name):e.spineObject.textureFileNames),m=vt(()=>p.value.length?`${p.value.length} 张:${p.value.join(", ")}`:"PNG / JPEG / WebP..."),g=vt(()=>new Set(e.spineObject.bones.map(N=>N.parent).filter(N=>!!N))),v=vt(()=>new Map(e.spineObject.bones.map(N=>[N.name,N]))),b=vt(()=>e.spineObject.bones.filter(N=>{var E;const O=h.value.trim().toLocaleLowerCase();if(O)return N.name.toLocaleLowerCase().includes(O);let X=N.parent;for(;X;){if(o.value.has(X))return!1;X=((E=v.value.get(X))==null?void 0:E.parent)||null}return!0})),y=vt(()=>g.value.size>0&&[...g.value].every(N=>o.value.has(N)));function w(N){const O=e.spineObject.selectedBone===N;for(const X of t.spines)X.selectedBone="";O||(e.spineObject.selectedBone=N)}function A(N){o.value.has(N)?o.value.delete(N):o.value.add(N)}function T(){o.value=y.value?new Set:new Set(g.value)}function _(N){var O;return((O=N.target.files)==null?void 0:O[0])||null}function R(N){l.value=_(N)}function P(N){c.value=_(N)}function F(N){u.value=Array.from(N.target.files||[])}function I(N){return N.name.replace(/\.[^.]+$/,"").toLocaleLowerCase()}async function k(N){const O=Array.from(N.target.files||[]);if(!O.length)return;const X=O.filter(K=>/\.(json|skel)$/i.test(K.name)),E=O.filter(K=>/\.atlas$/i.test(K.name)),V=O.filter(K=>/\.(png|jpe?g|webp|wepb)$/i.test(K.name)),q=E.map(K=>({atlas:K,skeleton:X.find(fe=>I(fe)===I(K))})).find(K=>K.skeleton),W=(q==null?void 0:q.skeleton)||X[0]||null,J=(q==null?void 0:q.atlas)||E[0]||null;if(l.value=W,c.value=J,u.value=V,!W||!J||!V.length){const K=[!W&&"JSON / SKEL",!J&&"Atlas",!V.length&&"纹理图片"].filter(Boolean).join("、");e.spineObject.status="error",e.spineObject.error=`所选文件夹缺少:${K}`;return}await U()}function B(){t.recalcTotalFrames()}function D(){B(),t.timeline.frame=0}async function U(){var X;const N=l.value,O=c.value;if(!N||!O||!u.value.length){e.spineObject.status="error",e.spineObject.error="请依次选择 Spine 数据、Atlas 和全部纹理图片";return}e.spineObject.status="loading",e.spineObject.error="";try{const E=await xw(N,O,u.value);Au(e.spineObject.id,E),e.spineObject.skeletonFileName=N.name,e.spineObject.atlasFileName=O.name,e.spineObject.textureFileNames=u.value.map(V=>V.name),e.spineObject.dataVersion=E.dataVersion,e.spineObject.animations=E.animations,e.spineObject.bones=E.bones,e.spineObject.selectedBone="",h.value="",o.value=new Set,e.spineObject.selectedAnimation=((X=E.animations[0])==null?void 0:X.name)||"",e.spineObject.assetVersion++,e.spineObject.status="ready",B(),t.timeline.frame=0;try{e.spineObject.sourceBundle=await PP(N,O,u.value)}catch(V){e.spineObject.sourceBundle=null,console.warn("Spine 配置资源嵌入失败",V)}}catch(E){e.spineObject.status="error",e.spineObject.error=E instanceof Error?E.message:String(E)}}function L(){ql(e.spineObject.id),l.value=null,c.value=null,u.value=[],i.value&&(i.value.value=""),n.value&&(n.value.value=""),r.value&&(r.value.value=""),a.value&&(a.value.value=""),e.spineObject.skeletonFileName="",e.spineObject.atlasFileName="",e.spineObject.textureFileNames=[],e.spineObject.dataVersion="",e.spineObject.sourceBundle=null,e.spineObject.animations=[],e.spineObject.bones=[],e.spineObject.selectedBone="",h.value="",o.value=new Set,e.spineObject.selectedAnimation="",e.spineObject.assetVersion++,e.spineObject.status="empty",e.spineObject.error="",B()}return(N,O)=>(ie(),ae("div",u3,[O[30]||(O[30]=M("div",{class:"editor-title"},"Spine 属性",-1)),M("label",d3,[O[15]||(O[15]=M("span",null,"Spine 名称",-1)),ye(M("input",{"onUpdate:modelValue":O[0]||(O[0]=X=>s.spineObject.name=X)},null,512),[[ht,s.spineObject.name]])]),M("div",f3,[M("label",m3,[O[16]||(O[16]=M("span",null,"X 位置",-1)),ye(M("input",{"onUpdate:modelValue":O[1]||(O[1]=X=>s.spineObject.x=X),type:"number"},null,512),[[ht,s.spineObject.x,void 0,{number:!0}]])]),M("label",p3,[O[17]||(O[17]=M("span",null,"Y 位置",-1)),ye(M("input",{"onUpdate:modelValue":O[2]||(O[2]=X=>s.spineObject.y=X),type:"number"},null,512),[[ht,s.spineObject.y,void 0,{number:!0}]])]),M("label",g3,[O[18]||(O[18]=M("span",null,"旋转",-1)),ye(M("input",{"onUpdate:modelValue":O[3]||(O[3]=X=>s.spineObject.rotation=X),type:"number"},null,512),[[ht,s.spineObject.rotation,void 0,{number:!0}]])])]),M("div",v3,[M("label",y3,[O[19]||(O[19]=M("span",null,"Scale X",-1)),ye(M("input",{"onUpdate:modelValue":O[4]||(O[4]=X=>s.spineObject.scaleX=X),type:"number",step:"0.05"},null,512),[[ht,s.spineObject.scaleX,void 0,{number:!0}]])]),M("label",x3,[O[20]||(O[20]=M("span",null,"Scale Y",-1)),ye(M("input",{"onUpdate:modelValue":O[5]||(O[5]=X=>s.spineObject.scaleY=X),type:"number",step:"0.05"},null,512),[[ht,s.spineObject.scaleY,void 0,{number:!0}]])]),M("label",b3,[O[21]||(O[21]=M("span",null,"开始时间",-1)),ye(M("input",{"onUpdate:modelValue":O[6]||(O[6]=X=>s.spineObject.timeOffset=X),type:"number",min:"0",step:"0.033333",onChange:B},null,544),[[ht,s.spineObject.timeOffset,void 0,{number:!0}]])])]),O[31]||(O[31]=M("div",{class:"divider"},null,-1)),O[32]||(O[32]=M("div",{class:"section-title"},"Spine 资源",-1)),M("input",{ref_key:"skeletonInput",ref:i,hidden:"",type:"file",accept:".json,.skel,application/json,application/octet-stream",onChange:R},null,544),M("input",{ref_key:"atlasInput",ref:n,hidden:"",type:"file",accept:".atlas,text/plain",onChange:P},null,544),M("input",{ref_key:"textureInput",ref:r,hidden:"",type:"file",multiple:"",accept:".png,.jpg,.jpeg,.webp,.wepb,image/png,image/jpeg,image/webp",onChange:F},null,544),M("input",{ref_key:"folderInput",ref:a,hidden:"",type:"file",multiple:"",webkitdirectory:"",directory:"",onChange:k},null,544),M("button",{class:"folder-select",disabled:s.spineObject.status==="loading",onClick:O[7]||(O[7]=X=>{var E;return(E=a.value)==null?void 0:E.click()})},"选择文件夹并加载",8,w3),O[33]||(O[33]=M("div",{class:"folder-hint"},"一次读取文件夹中的 JSON / SKEL、Atlas 和全部纹理;仍可在下方单独替换资源。",-1)),M("div",S3,[M("div",{class:"asset-name",title:d.value},Xe(d.value||"JSON / SKEL..."),9,M3),M("button",{onClick:O[8]||(O[8]=X=>{var E;return(E=i.value)==null?void 0:E.click()})},"选择")]),M("div",_3,[M("div",{class:"asset-name",title:f.value},Xe(f.value||"Atlas..."),9,T3),M("button",{onClick:O[9]||(O[9]=X=>{var E;return(E=n.value)==null?void 0:E.click()})},"选择")]),M("div",A3,[M("div",{class:"asset-name",title:p.value.join(", ")},Xe(m.value),9,E3),M("button",{onClick:O[10]||(O[10]=X=>{var E;return(E=r.value)==null?void 0:E.click()})},"选择(多选)")]),M("div",C3,[M("button",{class:"load",disabled:s.spineObject.status==="loading",onClick:U},Xe(s.spineObject.status==="loading"?"加载中…":"↧ 加载"),9,I3),M("button",{class:"clear",onClick:L},"清除")]),M("div",R3,[O[22]||(O[22]=Qt(" 支持 Spine 3.8 / 4.0 / 4.1 / 4.2 / 4.3 JSON · 对应版本运行时按需加载 · 本地离线 ",-1)),s.spineObject.dataVersion?(ie(),ae("span",P3," · 当前资源 "+Xe(s.spineObject.dataVersion),1)):Ve("",!0)]),s.spineObject.error?(ie(),ae("div",k3,Xe(s.spineObject.error),1)):Ve("",!0),M("div",F3,[O[25]||(O[25]=M("div",{class:"section-title"},"Spine 动画",-1)),s.spineObject.animations.length?(ie(),ae("label",B3,[O[24]||(O[24]=M("span",null,"时间轴播放动画",-1)),ye(M("select",{"onUpdate:modelValue":O[11]||(O[11]=X=>s.spineObject.selectedAnimation=X),onChange:D},[O[23]||(O[23]=M("option",{value:""},"无",-1)),(ie(!0),ae(Ke,null,ci(s.spineObject.animations,X=>(ie(),ae("option",{key:X.name,value:X.name},Xe(X.name)+"("+Xe(X.duration.toFixed(2))+"s) ",9,L3))),128))],544),[[Ht,s.spineObject.selectedAnimation]])])):(ie(),ae("div",O3,"无可用动画"))]),M("div",D3,[M("div",N3,[O[29]||(O[29]=M("div",{class:"section-title"},"层级树",-1)),M("button",{class:Ze(["selected-bone",{active:s.spineObject.selectedBone}]),disabled:!s.spineObject.selectedBone,title:s.spineObject.selectedBone?"点击清除骨骼选择":"当前未选择骨骼",onClick:O[12]||(O[12]=X=>s.spineObject.selectedBone="")},[s.spineObject.selectedBone?(ie(),ae(Ke,{key:0},[O[26]||(O[26]=Qt("清除选中骨骼:",-1)),M("strong",null,Xe(s.spineObject.selectedBone),1)],64)):(ie(),ae(Ke,{key:1},[O[27]||(O[27]=Qt("当前骨骼:",-1)),O[28]||(O[28]=M("strong",null,"未选择",-1))],64))],10,U3),s.spineObject.bones.length?(ie(),ae("button",{key:0,class:"tree-action",onClick:T},Xe(y.value?"全部展开":"全部折叠"),1)):Ve("",!0)]),s.spineObject.bones.length?(ie(),ae("div",V3,[ye(M("input",{"onUpdate:modelValue":O[13]||(O[13]=X=>h.value=X),type:"search","aria-label":"搜索骨骼",placeholder:"搜索骨骼名称…"},null,512),[[ht,h.value,void 0,{trim:!0}]]),h.value?(ie(),ae("button",{key:0,title:"清空搜索","aria-label":"清空骨骼搜索",onClick:O[14]||(O[14]=X=>h.value="")},"✕")):Ve("",!0)])):(ie(),ae("div",X3,"未加载 Spine")),s.spineObject.bones.length&&!b.value.length?(ie(),ae("div",Y3,"未找到匹配的骨骼")):s.spineObject.bones.length?(ie(),ae("div",$3,[(ie(!0),ae(Ke,null,ci(b.value,X=>(ie(),ae("div",{key:X.name,class:Ze(["bone",{selected:s.spineObject.selectedBone===X.name}]),style:Li({paddingLeft:`${6+X.depth*16}px`}),role:"button",tabindex:"0",onClick:E=>w(X.name),onKeydown:Ea(bt(E=>w(X.name),["prevent"]),["enter"])},[g.value.has(X.name)?(ie(),ae("button",{key:0,class:"bone-toggle",title:o.value.has(X.name)?"展开子骨骼":"折叠子骨骼",onClick:bt(E=>A(X.name),["stop"])},Xe(o.value.has(X.name)?"▸":"▾"),9,H3)):(ie(),ae("span",j3,"•")),M("span",W3,Xe(X.name),1)],46,G3))),128))])):Ve("",!0)])]))}}),q3=Gs(z3,[["__scopeId","data-v-3af7b738"]]),xi=Da({visible:!1,title:"",detail:"",progress:0,indeterminate:!1,failed:!1});let Bc=0;function K3(s){return new Promise(e=>window.setTimeout(e,s))}function qv(s,e){const t=++Bc,i=performance.now();Object.assign(xi,{visible:!0,title:s,detail:e,progress:0,indeterminate:!1,failed:!1});const n=(a,o)=>{t===Bc&&(xi.indeterminate=a==null,a!=null&&(xi.progress=Math.min(100,Math.max(0,a))),o&&(xi.detail=o))},r=async(a,o)=>{if(t!==Bc)return;xi.failed=a,xi.indeterminate=!1,xi.progress=a?xi.progress:100,xi.detail=o,await K3(Math.max(180,(a?850:450)-(performance.now()-i))),t===Bc&&(xi.visible=!1)};return{update:n,paint:()=>new Promise(a=>requestAnimationFrame(()=>a())),finish:(a="已完成")=>r(!1,a),fail:(a="操作失败")=>r(!0,a)}}async function Z3(s,e){if(!s.body)return e(null),s.text();const t=Number(s.headers.get("content-length")),i=Number.isFinite(t)&&t>0,n=s.body.getReader(),r=new TextDecoder;let a=0,o="";for(e(i?0:null);;){const{done:h,value:l}=await n.read();if(h)break;a+=l.byteLength,o+=r.decode(l,{stream:!0}),e(i?Math.min(1,a/t):null)}return o+=r.decode(),i&&e(1),o}const J3="3.8";function Ns(s,e,t){s[e]==null&&s[t]!=null&&(s[e]=s[t]),delete s[t]}function Rm(s){if(!s||typeof s!="object")return;if(Array.isArray(s)){for(const t of s)Rm(t);return}const e=s;Array.isArray(e.curve)&&delete e.curve;for(const t of Object.values(e))Rm(t)}function Q3(s){for(const e of s.bones)Ns(e,"transform","inherit");for(const e of s.transform||[])Ns(e,"rotateMix","mixRotate"),e.translateMix==null&&(e.translateMix=e.mixX??e.mixY),e.scaleMix==null&&(e.scaleMix=e.mixScaleX??e.mixScaleY),Ns(e,"shearMix","mixShearY"),delete e.mixX,delete e.mixY,delete e.mixScaleX,delete e.mixScaleY;for(const e of s.path||[])Ns(e,"rotateMix","mixRotate"),e.translateMix==null&&(e.translateMix=e.mixX??e.mixY),delete e.mixX,delete e.mixY;for(const e of s.skins)for(const t of Object.values(e.attachments||{}))for(const i of Object.values(t||{}))i.parent!=null&&Ns(i,"deform","timelines")}function eO(s){for(const e of Object.values(s.slots||{}))Ns(e,"color","rgba"),Ns(e,"twoColor","rgba2")}function tO(s){for(const e of Object.values(s.bones||{}))for(const t of e.rotate||[])Ns(t,"angle","value")}function iO(s){for(const e of Object.values(s.transform||{}))for(const t of e)Ns(t,"rotateMix","mixRotate"),t.translateMix==null&&(t.translateMix=t.mixX??t.mixY),t.scaleMix==null&&(t.scaleMix=t.mixScaleX??t.mixScaleY),Ns(t,"shearMix","mixShearY"),delete t.mixX,delete t.mixY,delete t.mixScaleX,delete t.mixScaleY}function sO(s){for(const e of Object.values(s.path||{})){for(const t of["position","spacing"])for(const i of e[t]||[])Ns(i,t,"value");for(const t of e.mix||[])Ns(t,"rotateMix","mixRotate"),t.translateMix==null&&(t.translateMix=t.mixX??t.mixY),delete t.mixX,delete t.mixY}}function nO(s){if(!s.attachments)return;const e=s.deform||(s.deform={});for(const[t,i]of Object.entries(s.attachments)){const n=e[t]||(e[t]={});for(const[r,a]of Object.entries(i)){const o=n[r]||(n[r]={});for(const[h,l]of Object.entries(a))l.deform&&(o[h]=l.deform)}}delete s.attachments}function rO(s){s.skeleton.spine=J3,Q3(s);for(const e of Object.values(s.animations))eO(e),tO(e),iO(e),sO(e),nO(e);return Rm(s.animations),s}function aO(s,e,t,i){const n=t.frame-e.frame,r=n<=0?0:(s.frame-e.frame)/n;let a=0;for(let o=0;o[...i].sort((a,o)=>a-o);let r=!0;for(;r;){r=!1;const a=n();for(let o=0;ou&&(u=f,c=d)}c>=0&&(i.add(c),r=!0)}}return n().map(a=>s[a])}function Kv(s,e,t,i,n){const r=t-e+1;if(r<2)return 0;const a=n?e:t,o=n?e+1:t-1,h=n?e+2:t-2,l=Math.abs(s[o].frame-s[a].frame);if(r>=3&&l>0&&Math.abs(Math.abs(s[h].frame-s[o].frame)-l)<1e-6){const u=s[a].values[i],d=s[o].values[i],f=s[h].values[i];return n?(-3*u+4*d-f)/(2*l):(3*u-4*d+f)/(2*l)}const c=s[o].frame-s[a].frame;return c?(s[o].values[i]-s[a].values[i])/c:0}function Zv(s,e,t){const i=s[t].frame-s[e].frame,n=[];for(let r=0;rd.values[r])),l=Math.max(...s.slice(e,t+1).map(d=>d.values[r])),c=a+Kv(s,e,t,r,!0)*i/3,u=o-Kv(s,e,t,r,!1)*i/3;n.push([Math.max(h,Math.min(l,c)),Math.max(h,Math.min(l,u))])}return{values:n}}function oO(s,e,t,i,n){const r=1-n;return r*r*r*s+3*r*r*n*e+3*r*n*n*t+n*n*n*i}function lO(s,e,t,i,n){const r=t.frame-e.frame,a=r<=0?0:(s.frame-e.frame)/r;let o=0;for(let h=0;h[...i].sort((o,h)=>o-h);let r=!0;for(;r;){r=!1;const o=n();for(let h=0;hf&&(f=m,d=p)}d>=0&&(i.add(d),r=!0)}}const a=n();return{samples:a.map(o=>s[o]),controls:a.slice(0,-1).map((o,h)=>Zv(s,o,a[h+1]))}}function cO(s){if(!s.length)return[];const e=[s[0]];for(let t=1;t180;)i-=360;for(;i-e[t-1]<-180;)i+=360;e.push(i)}return e}function _i(s){if(!Number.isFinite(s))return 0;const e=Math.round(s*1e5)/1e5;return Object.is(e,-0)?0:e}function hO(s,e,t,i){const n=Math.max(2,Math.min(16,Math.round(Number(s.trailGridRows)||2))),r=Math.max(2,Math.min(32,Math.round(Number(s.trailGridCols)||2))),a=Math.max(2,t.length),o=e.lengthMode==="random"?Math.max(1,Number(e.lengthMin)||0,Number(e.lengthMax)||0):Math.max(.001,Number(e.length)||100),h=e.widthSizeMode==="random"?Math.max(1,Number(e.widthMin)||0,Number(e.widthMax)||0):Math.max(.001,Number(e.width)||100),l=(Number(e.rotation)||0)*Math.PI/180,c=Math.cos(l),u=Math.sin(l),d=[],f=[],p=[],m=[],g=[];for(let y=0;y=0;y--)g.push({col:y,row:n-1});for(let y=n-2;y>=1;y--)g.push({col:0,row:y});const v=g.length;for(let y=1;y|\s]+/g,"_").replace(/^_+|_+$/g,"")||e}function kw(s,e){let t=s,i=2;for(;e.has(t);)t=`${s}_${i++}`;return e.add(t),t}function dO(s){return s.replace(/\.[^./\\]+$/,"")}function Fw(s,e){return dO([s,e].filter(Boolean).join("/").replace(/\\/g,"/").replace(/\/{2,}/g,"/").replace(/^\.\//,""))}function fO(s){var i,n;const e=Number(((i=s==null?void 0:s.orig)==null?void 0:i.width)??(s==null?void 0:s.width))||0,t=Number(((n=s==null?void 0:s.orig)==null?void 0:n.height)??(s==null?void 0:s.height))||0;return{width:e,height:t}}function Dc(s){return Math.round(Math.max(0,Math.min(1,s))*255).toString(16).padStart(2,"0")}function iy(s,e){return[(s>>16&255)/255,(s>>8&255)/255,(s&255)/255,Math.max(0,Math.min(1,e))]}function yl(s,e){return _i(s/e)}function mO(s,e){const t=s.config,i=t.lifeMode==="fixed"?Math.max(0,Number(t.lifeMin)||0):Math.max(0,Number(t.lifeMin)||0,Number(t.lifeMax)||0),n=Math.max(0,Number(t.delay)||0);let r;return t.mode!=="stream"?r=n+i:t.streamBehavior!=="loop"?r=n+Math.max(1/e,Number(t.duration)||0)+i:r=n+Xr(t,e).total/e,Math.max(1,Math.ceil(r*e)+1)}function Yh(s,e){return e?s.boneName:`${s.spawnId??"legacy"}_${s.boneName}`}function pO(s,e,t){const i=new Set;for(const n of s)for(const r of n)i.add(Yh(r,e));return[...i].sort().map((n,r)=>({key:n,name:kw(`_particle_${String(r).padStart(3,"0")}`,t),states:s.map(a=>a.find(o=>Yh(o,e)===n)||null)}))}function gO(s,e,t,i){const n=e*t/i,r=Math.min(s.states.length-1,Math.max(0,Math.floor(n))),a=Math.min(s.states.length-1,r+1),o=s.states[r],h=s.states[a];if(!o||!h||Yh(o,!0)!==Yh(h,!0)||o.spawnId!==h.spawnId)return o;const l=n-r;if(l<=1e-6)return o;const c=(d,f)=>(d??0)+((f??d??0)-(d??0))*l,u=o.trailState&&h.trailState&&o.trailState.resourceId===h.trailState.resourceId?{...o.trailState,width:c(o.trailState.width,h.trailState.width),alpha:c(o.trailState.alpha,h.trailState.alpha),bones:o.trailState.bones.map((d,f)=>{const p=h.trailState.bones[f]||d;return{...d,worldX:c(d.worldX??d.x,p.worldX??p.x),worldY:c(d.worldY??d.y,p.worldY??p.y),worldRotation:c(d.worldRotation??-d.rotation,p.worldRotation??-p.rotation)}})}:o.trailState;return{...o,worldX:c(o.worldX,h.worldX),worldY:c(o.worldY,h.worldY),worldRotation:c(o.worldRotation,h.worldRotation),worldScaleX:c(o.worldScaleX,h.worldScaleX),worldScaleY:c(o.worldScaleY,h.worldScaleY),alpha:c(o.alpha,h.alpha),trailState:u}}function sy(s,e){return!s||s==="跟随导出"?e.keyframeCurve:s==="贝塞尔"?"bezier":"linear"}function eo(s,e,t,i,n,r=new Set,a=n.keyframeCurve){if(!s.length)return[];const o=a==="bezier"&&n.spineVersion!=="3.8"?Pw(s,i,r):{samples:Rw(s,i,r),controls:[]},h=o.samples.map(l=>{const c={time:yl(l.frame,e)};return t.forEach((u,d)=>{c[u]=_i(l.values[d])}),c});for(let l=0;l0&&n&&e.add(t-1),i&&e.add(t))}return e}function yO(s){const e=new Set;for(let t=0;t0&&n&&e.add(t-1),i&&e.add(t))}return e}function xO(s,e){var i;if(!s.shapeEnabled||!((i=s.shapeCurve)!=null&&i.length))return 1;const t=[...s.shapeCurve].sort((n,r)=>n.x-r.x);if(e<=t[0].x)return Math.max(0,t[0].y);for(let n=1;n{r!==n&&(i.push(t(r,a)),n=r)}),i}function wO(s,e,t){const i=s.imageMode==="sequence"?s.sequenceFrames[e]:void 0,n=(i==null?void 0:i.name)||s.textureName||`image_${s.id}`,r=(i==null?void 0:i.texture)||s.texture,a=fO(r);(!a.width||!a.height)&&t.push({code:"missing-image",message:`图片“${n}”缺失或尺寸不可读,已保留路径。`});const o=a.width||1,h=a.height||1;return{path:Fw(s.textureFolder,n),x:_i((.5-s.anchorX)*o),y:_i((s.anchorY-.5)*h),width:_i(o),height:_i(h)}}function SO(s,e,t,i,n=i.keyframeCurve){if(!s.length)return[];const r=new Set;for(let c=1;c({frame:u,values:c})),o=1/255,h=n==="bezier"&&i.spineVersion!=="3.8"?Pw(a,[o,o,o,.01],r):{samples:Rw(a,[o,o,o,.01],r),controls:[]},l=h.samples.map(c=>({time:yl(c.frame,t),color:`${Dc(c.values[0])}${Dc(c.values[1])}${Dc(c.values[2])}${Dc(c.values[3])}`}));if(h.controls.length)for(let c=0;c({time:yl(d,n),name:u??null}));h.length&&(o.attachment=h);const l=SO(i,t,n,r,a);l.length&&(o.rgba=l)}function ry(s){var p;const e=s.settings,t=Math.max(1,Number(s.timeline.fps)||30),i=Math.max(1,Math.round(e.fps||30)),n=e.integerFrameAlignment?i:t,r=[],a=s.systems.filter(m=>m.visible!==!1),o={skeleton:{hash:"",spine:e.spineVersion,x:0,y:0,width:0,height:0,images:e.imagesPath||"./images/"},bones:[{name:"root"}],slots:[],skins:[{name:"default",attachments:{}}],animations:{}};e.omitFps||(o.skeleton.fps=i);const h=o.skins[0].attachments,l=new Set(["root"]),c=[...new Set([...s.timeline.animations.length?s.timeline.animations:["animation"],...a.map(m=>m.animation||"animation")])],u=new Map;for(const m of a){const g=Math.min(((p=m.frames)==null?void 0:p.length)||0,mO(m,t)),v=(m.frames||[]).slice(0,g);v.length||r.push({code:"empty-cache",message:`“${m.config.name}”没有可用帧缓存。`});const b=kw(uO(m.config.name,`system_${m.id}`),l);o.bones.push({name:b,parent:"root"});const y=pO(v,e.bonePool,l),w=Math.max(0,(g-1)/t),A=Math.max(1,Math.ceil(w*n)+1),T=u.get(m.animation)||[];T.push({system:m,tracks:y,targetFrames:A}),u.set(m.animation,T);for(const _ of y){o.bones.push({name:_.name,parent:b});const R=new Set(m.config.imageResources.map(k=>k.blend));for(const k of R){const B=`${_.name}_image_${k}`;o.slots.push({name:B,bone:_.name,color:"ffffff00",blend:Jv[k]});const D=h[B]||(h[B]={});for(const U of m.config.imageResources.filter(L=>L.blend===k)){const L=U.imageMode==="sequence"?Math.max(1,U.sequenceFrames.length):1;for(let N=0;N{var X;return((X=O==null?void 0:O.trailState)==null?void 0:X.resourceId)===k.id}))continue;const B=Math.max(2,Math.min(16,Math.round(k.boneCount||3))),D=[];for(let O=0;Oo.bones.findIndex(X=>X.name===O)),N=Fw("",k.textureName||`trail_${k.id}`);(h[U]||(h[U]={}))[`trail_${k.id}`]=hO(m.config,k,L,N),k.texture||r.push({code:"missing-image",message:`拖尾图片“${k.textureName||k.id}”缺失,已保留路径。`})}const P=`${_.name}_image_`,F=`${_.name}_trail_`,I=o.slots.filter(k=>String(k.name).startsWith(P)||String(k.name).startsWith(F));I.length&&(o.slots=o.slots.filter(k=>!I.includes(k)),o.slots.push(...I.filter(k=>String(k.name).startsWith(F)),...I.filter(k=>String(k.name).startsWith(P))))}}for(const m of c){const g=u.get(m)||[],v={bones:{},slots:{}};let b=!1;for(const{system:y,tracks:w,targetFrames:A}of g)for(const T of w){const _=Array.from({length:A},(E,V)=>gO(T,V,t,n)),R=_.map(E=>!!(E!=null&&E.active)),P=[],F=[],I=[];_.forEach((E,V)=>{E!=null&&E.active&&(P.push({frame:V,values:[E.worldX??E.x,E.worldY??E.y]}),F.push(E.worldRotation??E.rotation),I.push({frame:V,values:[E.worldScaleX??E.scaleX,E.worldScaleY??E.scaleY]}))});const k=cO(F),B=P.map((E,V)=>({frame:E.frame,values:[k[V]??0]})),D=vO(_),U={},L=eo(P,n,["x","y"],[Qv,Qv],e,D),N=eo(B,n,["value"],[ty],e,D),O=eo(I,n,["x","y"],[Lc,Lc],e,D);L.length&&(U.translate=L),N.length&&(U.rotate=N),O.length&&(U.scale=O),Object.keys(U).length&&(v.bones[T.name]=U,b=!0);const X=new Set(y.config.imageResources.map(E=>E.blend));for(const E of X){const V=[],q=[];let W=16777215;for(let me=0;meAe.id===we.resourceId):void 0,pe=!!we&&R[me]&&we.imageVisible!==!1&&(Ee==null?void 0:Ee.blend)===E;we&&(Ee==null?void 0:Ee.blend)===E&&(W=we.colorHex),V.push(pe?`image_${Ee.id}_${we.imageFrameIndex??0}`:null),q.push(iy(W,pe?we.alpha:0))}const K=y.config.imageResources.filter(me=>me.blend===E).filter(me=>me.independentAlpha==="curve").map(me=>sy(me.alphaCurveMode,e)),fe=K.length?K.includes("bezier")?"bezier":"linear":sy(y.config.alphaMode==="curve"?y.config.curveMode:void 0,e);ny(v,`${T.name}_image_${E}`,V,q,n,e,fe),V.some(Boolean)&&(b=!0)}if(y.config.trail)for(const E of y.config.trailResources){const V=Math.max(2,Math.min(16,Math.round(E.boneCount||3))),q=_.map(Ae=>{var G;return((G=Ae==null?void 0:Ae.trailState)==null?void 0:G.resourceId)===E.id?Ae.trailState:void 0}),W=q.find(Ae=>!!Ae);if(!W)continue;const J=yO(q),K=E.widthSizeMode==="random"?Math.max(1,Number(E.widthMin)||0,Number(E.widthMax)||0):Math.max(.001,Number(E.width)||100);let fe=W;const me=q.map(Ae=>(Ae&&(fe=Ae),fe));for(let Ae=0;Ae{const Be=Oe==null?void 0:Oe.bones[Math.min(Oe.bones.length-1,Ae)];if(!Be)return;const st={x:Be.worldX??Be.x,y:Be.worldY??Be.y,rotation:Be.worldRotation??-Be.rotation};G.push({frame:Fe,values:[st.x,st.y]}),Z.push({frame:Fe,values:[st.rotation]}),z.push({frame:Fe,values:[1,Math.max(0,Oe.width/K)*te]})});const he=`${T.name}_trail_${E.id}_${Ae}`,xe={},oe=eo(G,n,["x","y"],[ey,ey],e,j),ge=eo(Z,n,["value"],[ty],e,j),le=eo(z,n,["x","y"],[Lc,Lc],e,j);oe.length&&(xe.translate=oe),ge.length&&(xe.rotate=ge),le.length&&(xe.scale=le),Object.keys(xe).length&&(v.bones[he]=xe)}const we=q.map(()=>`trail_${E.id}`);let Ee=W.colorHex;const pe=q.map(Ae=>(Ae&&(Ee=Ae.colorHex),iy(Ee,Ae?Ae.alpha:0)));ny(v,`${T.name}_trail_${E.id}`,we,pe,n,e),b=!0}}(b||!e.excludeEmptyAnimations)&&(o.animations[m]=v)}!Object.keys(o.animations).length&&!e.excludeEmptyAnimations&&(o.animations.animation={bones:{},slots:{}});const d=e.spineVersion==="3.8"?rO(o):o,f=JSON.stringify(d,null,2);return{json:d,text:f,warnings:r,particleSystemCount:a.length,animationCount:Object.keys(d.animations).length,boneCount:d.bones.length}}function MO(s,e){const t=new Blob([s.text],{type:"application/json;charset=utf-8"}),i=URL.createObjectURL(t),n=document.createElement("a");n.href=i,n.download=/\.json$/i.test(e)?e:`${e||"SpineParticle"}.json`,n.style.display="none",document.body.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(i),1e3)}class q6{constructor(){x(this,"array",[])}add(e){const t=this.contains(e);return this.array[e|0]=e|0,!t}contains(e){return this.array[e|0]!==void 0}remove(e){this.array[e|0]=void 0}clear(){this.array.length=0}}class _O{constructor(){x(this,"entries",{});x(this,"size",0)}add(e){const t=this.entries[e];return this.entries[e]=!0,t?!1:(this.size++,!0)}addAll(e){const t=this.size;for(let i=0,n=e.length;i1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(e,t){e.r=((t&4278190080)>>>24)/255,e.g=((t&16711680)>>>16)/255,e.b=((t&65280)>>>8)/255,e.a=(t&255)/255}static rgb888ToColor(e,t){e.r=((t&16711680)>>>16)/255,e.g=((t&65280)>>>8)/255,e.b=(t&255)/255}toRgb888(){const e=t=>`0${(t*255).toString(16)}`.slice(-2);return+`0x${e(this.r)}${e(this.g)}${e(this.b)}`}static fromString(e,t=new _s){return t.setFromString(e)}};x(_s,"WHITE",new _s(1,1,1,1)),x(_s,"RED",new _s(1,0,0,1)),x(_s,"GREEN",new _s(0,1,0,1)),x(_s,"BLUE",new _s(0,0,1,1)),x(_s,"MAGENTA",new _s(1,0,1,1));let wt=_s;const fi=class fi{static clamp(e,t,i){return ei?i:e}static cosDeg(e){return Math.cos(e*fi.degRad)}static sinDeg(e){return Math.sin(e*fi.degRad)}static atan2Deg(e,t){return Math.atan2(e,t)*fi.radDeg}static signum(e){return e>0?1:e<0?-1:0}static toInt(e){return e>0?Math.floor(e):Math.ceil(e)}static cbrt(e){const t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t}static randomTriangular(e,t){return fi.randomTriangularWith(e,t,(e+t)*.5)}static randomTriangularWith(e,t,i){const n=Math.random(),r=t-e;return n<=(i-e)/r?e+Math.sqrt(n*r*(i-e)):t-Math.sqrt((1-n)*r*(t-i))}static isPowerOfTwo(e){return e&&(e&e-1)===0}};x(fi,"epsilon",1e-5),x(fi,"epsilon2",fi.epsilon*fi.epsilon),x(fi,"PI",3.1415927),x(fi,"PI2",fi.PI*2),x(fi,"invPI2",1/fi.PI2),x(fi,"radiansToDegrees",180/fi.PI),x(fi,"radDeg",fi.radiansToDegrees),x(fi,"degreesToRadians",fi.PI/180),x(fi,"degRad",fi.degreesToRadians);let Ye=fi;const Os=class Os{apply(e,t,i){return t===void 0||i===void 0?this.applyInternal(e):e+(t-e)*this.applyInternal(i)}};x(Os,"linear",new class extends Os{applyInternal(e){return e}}),x(Os,"smooth",new class extends Os{applyInternal(e){return e*e*(3-2*e)}}),x(Os,"slowFast",new class extends Os{applyInternal(e){return e*e}}),x(Os,"fastSlow",new class extends Os{applyInternal(e){return(e-1)*(e-1)*-1+1}}),x(Os,"circle",new class extends Os{applyInternal(e){return e<=.5?(e*=2,(1-Math.sqrt(1-e*e))/2):(e--,e*=2,(Math.sqrt(1-e*e)+1)/2)}});let To=Os;class TO extends To{constructor(t){super();x(this,"power",2);this.power=t}applyInternal(t){return t<=.5?Math.pow(t*2,this.power)/2:Math.pow((t-1)*2,this.power)/(this.power%2===0?-2:2)+1}}class K6 extends TO{constructor(e){super(e)}applyInternal(e){return Math.pow(e-1,this.power)*(this.power%2===0?-1:1)+1}}const kr=class kr{static arrayCopy(e,t,i,n,r){for(let a=t,o=n;a=t?e:kr.setArraySize(e,t,i)}static newArray(e,t){const i=[];for(let n=0;n0?this.items.pop():this.instantiator()}free(e){var t;(t=e.reset)==null||t.call(e),this.items.push(e)}freeAll(e){for(let t=0;tthis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=e,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}}class Q6{constructor(e=32){x(this,"values");x(this,"addedValues",0);x(this,"lastValue",0);x(this,"mean",0);x(this,"dirty",!0);this.values=new Array(e)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(e){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let e=0;for(let t=0;t{c.width=parseInt(i[1]),c.height=parseInt(i[2])},n.format=()=>{},n.filter=c=>{c.minFilter=ct.enumValue(Io,i[1]),c.magFilter=ct.enumValue(Io,i[2])},n.repeat=c=>{i[1].indexOf("x")!==-1&&(c.uWrap=Ro.Repeat),i[1].indexOf("y")!==-1&&(c.vWrap=Ro.Repeat)},n.pma=c=>{c.pma=i[1]==="true"};var r={};r.xy=c=>{c.x=parseInt(i[1]),c.y=parseInt(i[2])},r.size=c=>{c.width=parseInt(i[1]),c.height=parseInt(i[2])},r.bounds=c=>{c.x=parseInt(i[1]),c.y=parseInt(i[2]),c.width=parseInt(i[3]),c.height=parseInt(i[4])},r.offset=c=>{c.offsetX=parseInt(i[1]),c.offsetY=parseInt(i[2])},r.orig=c=>{c.originalWidth=parseInt(i[1]),c.originalHeight=parseInt(i[2])},r.offsets=c=>{c.offsetX=parseInt(i[1]),c.offsetY=parseInt(i[2]),c.originalWidth=parseInt(i[3]),c.originalHeight=parseInt(i[4])},r.rotate=c=>{const u=i[1];u==="true"?c.degrees=90:u!=="false"&&(c.degrees=parseInt(u))},r.index=c=>{c.index=parseInt(i[1])};let a=t.readLine();for(;a&&a.trim().length===0;)a=t.readLine();for(;!(!a||a.trim().length===0||t.readEntry(i,a)===0);)a=t.readLine();let o=null,h=null,l=null;for(;a!==null;)if(a.trim().length===0)o=null,a=t.readLine();else if(o){const c=new Bw(o,a);for(;;){const u=t.readEntry(i,a=t.readLine());if(u===0)break;const d=r[i[0]];if(d)d(c);else{h||(h=[]),l||(l=[]),h.push(i[0]);const f=[];for(let p=0;p0&&l&&l.length>0&&(c.names=h,c.values=l,h=null,l=null),c.u=c.x/o.width,c.v=c.y/o.height,c.degrees===90?(c.u2=(c.x+c.height)/o.width,c.v2=(c.y+c.width)/o.height):(c.u2=(c.x+c.width)/o.width,c.v2=(c.y+c.height)/o.height),this.regions.push(c)}else{for(o=new IO(a.trim());t.readEntry(i,a=t.readLine())!==0;){const c=n[i[0]];c&&c(o)}this.pages.push(o)}}findRegion(e){for(let t=0;t=this.lines.length?null:this.lines[this.index++]}readEntry(e,t){if(!t||(t=t.trim(),t.length===0))return 0;const i=t.indexOf(":");if(i===-1)return 0;e[0]=t.substr(0,i).trim();for(let n=1,r=i+1;;n++){const a=t.indexOf(",",r);if(a===-1)return e[n]=t.substr(r).trim(),n;if(e[n]=t.substr(r,a-r).trim(),r=a+1,n===4)return 4}}}class IO{constructor(e){x(this,"name");x(this,"minFilter",Io.Nearest);x(this,"magFilter",Io.Nearest);x(this,"uWrap",Ro.ClampToEdge);x(this,"vWrap",Ro.ClampToEdge);x(this,"texture",null);x(this,"width",0);x(this,"height",0);x(this,"pma",!1);x(this,"regions",[]);this.name=e}setTexture(e){this.texture=e,e.setFilters(this.minFilter,this.magFilter),e.setWraps(this.uWrap,this.vWrap);for(const t of this.regions)t.texture=e}}class Bw extends Ow{constructor(t,i){super();x(this,"page");x(this,"name");x(this,"x",0);x(this,"y",0);x(this,"offsetX",0);x(this,"offsetY",0);x(this,"originalWidth",0);x(this,"originalHeight",0);x(this,"index",0);x(this,"degrees",0);x(this,"names",null);x(this,"values",null);this.page=t,this.name=i,t.regions.push(this)}}const qh=class qh{constructor(e){x(this,"name");x(this,"timelineAttachment");x(this,"timelineSlots",qh.empty);if(!e)throw new Error("name cannot be null.");this.name=e,this.timelineAttachment=this}isTimelineActive(e,t,i){let n=e[t];if(n.bone.isActive()){const r=(i?n.getAppliedPose():n.getPose()).getAttachment();if(r!=null&&r.timelineAttachment===this)return!0}for(let r=0,a=this.timelineSlots.length;r>1)*h;const l=i.appliedPose.deform;let c=this.vertices;const u=this.bones;if(!u){l.length>0&&(c=l);const m=i.bone.appliedPose,g=m.worldX,v=m.worldY,b=m.a,y=m.b,w=m.c,A=m.d;for(let T=n,_=o;_=this.regions.length&&(t=this.regions.length-1),t}getUVs(e){return this.uvs[e]}hasPathSuffix(){return this.pathSuffix}getPath(e,t){if(!this.pathSuffix)return e;let i=e;const n=(this.start+t).toString();for(let r=this.digits-n.length;r>0;r--)i+="0";return i+=n,i}static nextID(){return ho._nextID++}};x(ho,"_nextID",0);let ko=ho;var Gi;(function(s){s[s.hold=0]="hold",s[s.once=1]="once",s[s.loop=2]="loop",s[s.pingpong=3]="pingpong",s[s.onceReverse=4]="onceReverse",s[s.loopReverse=5]="loopReverse",s[s.pingpongReverse=6]="pingpongReverse"})(Gi||(Gi={}));const Lw=[Gi.hold,Gi.once,Gi.loop,Gi.pingpong,Gi.onceReverse,Gi.loopReverse,Gi.pingpongReverse];class Fp{constructor(e,t,i){x(this,"name");x(this,"timelines",[]);x(this,"timelineIds");x(this,"bones");x(this,"color",new wt(1,1,1,1));x(this,"duration");if(!e)throw new Error("name cannot be null.");this.name=e,this.duration=i,this.timelineIds=new _O,this.bones=[],this.setTimelines(t)}setTimelines(e){if(!e)throw new Error("timelines cannot be null.");this.timelines=e;const t=e.length;this.timelineIds.clear(),this.bones.length=0;const i=new Set,n=e;for(let r=0;r0&&(t%=this.duration));const u=this.timelines;for(let d=0,f=u.length;dt)return r-i;return n-i}};function RO(s){return typeof s=="object"&&s!==null&&typeof s.slotIndex=="number"}class Va extends ii{constructor(t,i,...n){super(t,...n);x(this,"curves");this.curves=ct.newFloatArray(t+i*18),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){const i=this.getFrameCount()+t*18;if(this.curves.length>i){const n=ct.newFloatArray(i);ct.arrayCopy(this.curves,0,n,0,i),this.curves=n}}setBezier(t,i,n,r,a,o,h,l,c,u,d){const f=this.curves;let p=this.getFrameCount()+t*18;n===0&&(f[i]=2+p);const m=(r-o*2+l)*.03,g=(a-h*2+c)*.03,v=((o-l)*3-r+u)*.006,b=((h-c)*3-a+d)*.006;let y=m*2+v,w=g*2+b,A=(o-r)*.3+m+v*.16666667,T=(h-a)*.3+g+b*.16666667,_=r+A,R=a+T;for(let P=p+18;pt){const c=this.frames[i],u=this.frames[i+n];return u+(t-c)/(a[r]-c)*(a[r+1]-u)}const o=r+18;for(r+=2;r=t){const c=a[r-2],u=a[r-1];return u+(t-c)/(a[r]-c)*(a[r+1]-u)}i+=this.getFrameEntries();const h=a[o-2],l=a[o-1];return l+(t-h)/(this.frames[i]-h)*(this.frames[i+n]-l)}}class ar extends Va{constructor(e,t,i){super(e,t,i)}getFrameEntries(){return 2}setFrame(e,t,i){e<<=1,this.frames[e]=t,this.frames[e+1]=i}getCurveValue(e){const t=this.frames;let i=t.length-2;for(let r=2;r<=i;r+=2)if(t[r]>e){i=r-2;break}const n=this.curves[i>>1];switch(n){case 0:{const r=t[i],a=t[i+1];return a+(e-r)/(t[i+2]-r)*(t[i+2+1]-a)}case 1:return t[i+1]}return this.getBezierValue(e,i,1,n-2)}getRelativeValue(e,t,i,n,r,a){if(e>2];switch(f){case 0:{const p=u[d];h=u[d+1],l=u[d+2],c=u[d+3];const m=(i-p)/(u[d+4]-p);h+=(u[d+4+1]-h)*m,l+=(u[d+4+2]-l)*m,c+=(u[d+4+3]-c)*m;break}case 1:h=u[d+1],l=u[d+2],c=u[d+3];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2),c=this.getBezierValue(i,d,3,f+36-2)}if(n!==1)if(r===it.setup){const p=e.data.setupPose.color;h=p.r+(h-p.r)*n,l=p.g+(l-p.g)*n,c=p.b+(c-p.b)*n}else h=o.r+(h-o.r)*n,l=o.g+(l-o.g)*n,c=o.b+(c-o.b)*n;o.r=h<0?0:h>1?1:h,o.g=l<0?0:l>1?1:l,o.b=c<0?0:c>1?1:c}}class qw extends ar{constructor(t,i,n){super(t,i,`${xt.alpha}|${n}`);x(this,"slotIndex",0);this.slotIndex=n}apply(t,i,n,r,a,o,h,l,c){const u=t.slots[this.slotIndex];if(!u.bone.active)return;const d=(c?u.appliedPose:u.pose).color;let f=0;const p=this.frames;if(n1?1:f}}class Kw extends Ru{constructor(e,t,i){super(e,t,i,`${xt.rgb}|${i}`,`${xt.alpha}|${i}`,`${xt.rgb2}|${i}`)}getFrameEntries(){return 8}setFrame(e,t,i,n,r,a,o,h,l){e<<=3,this.frames[e]=t,this.frames[e+1]=i,this.frames[e+2]=n,this.frames[e+3]=r,this.frames[e+4]=a,this.frames[e+5]=o,this.frames[e+6]=h,this.frames[e+7]=l}apply1(e,t,i,n,r,a){const o=t.color,h=t.darkColor;let l=0,c=0,u=0;const d=this.frames;if(i>3];switch(b){case 0:{const y=d[v];f=d[v+1],p=d[v+2],m=d[v+3],g=d[v+4],l=d[v+5],c=d[v+6],u=d[v+7];const w=(i-y)/(d[v+8]-y);f+=(d[v+8+1]-f)*w,p+=(d[v+8+2]-p)*w,m+=(d[v+8+3]-m)*w,g+=(d[v+8+4]-g)*w,l+=(d[v+8+5]-l)*w,c+=(d[v+8+6]-c)*w,u+=(d[v+8+7]-u)*w;break}case 1:f=d[v+1],p=d[v+2],m=d[v+3],g=d[v+4],l=d[v+5],c=d[v+6],u=d[v+7];break;default:f=this.getBezierValue(i,v,1,b-2),p=this.getBezierValue(i,v,2,b+18-2),m=this.getBezierValue(i,v,3,b+36-2),g=this.getBezierValue(i,v,4,b+54-2),l=this.getBezierValue(i,v,5,b+72-2),c=this.getBezierValue(i,v,6,b+90-2),u=this.getBezierValue(i,v,7,b+108-2)}if(n===1)o.set(f,p,m,g);else if(r===it.setup){const y=e.data.setupPose;let w=y.color;o.set(w.r+(f-w.r)*n,w.g+(p-w.g)*n,w.b+(m-w.b)*n,w.a+(g-w.a)*n),w=y.darkColor,l=w.r+(l-w.r)*n,c=w.g+(c-w.g)*n,u=w.b+(u-w.b)*n}else o.add((f-o.r)*n,(p-o.g)*n,(m-o.b)*n,(g-o.a)*n),l=h.r+(l-h.r)*n,c=h.g+(c-h.g)*n,u=h.b+(u-h.b)*n;h.r=l<0?0:l>1?1:l,h.g=c<0?0:c>1?1:c,h.b=u<0?0:u>1?1:u}}class Zw extends Ru{constructor(e,t,i){super(e,t,i,`${xt.rgb}|${i}`,`${xt.rgb2}|${i}`)}getFrameEntries(){return 7}setFrame(e,t,i,n,r,a,o,h){e*=7,this.frames[e]=t,this.frames[e+1]=i,this.frames[e+2]=n,this.frames[e+3]=r,this.frames[e+4]=a,this.frames[e+5]=o,this.frames[e+6]=h}apply1(e,t,i,n,r,a){const o=t.color,h=t.darkColor;let l=0,c=0,u=0,d=0,f=0,p=0;const m=this.frames;if(i1?1:l,o.g=c<0?0:c>1?1:c,o.b=u<0?0:u>1?1:u,h.r=d<0?0:d>1?1:d,h.g=f<0?0:f>1?1:f,h.b=p<0?0:p>1?1:p}}class xl extends ii{constructor(t,i){super(t,`${xt.attachment}|${i}`);x(this,"slotIndex",0);x(this,"attachmentNames");this.slotIndex=i,this.attachmentNames=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,i,n){this.frames[t]=i,this.attachmentNames[t]=n}apply(t,i,n,r,a,o,h,l,c){const u=t.slots[this.slotIndex];if(!u.bone.active)return;const d=c?u.appliedPose:u.pose;l||nt){const l=this.frames[i];return n[r+1]*(t-l)/(n[r]-l)}const a=r+18;for(r+=2;r=t){const l=n[r-2],c=n[r-1];return c+(t-l)/(n[r]-l)*(n[r+1]-c)}const o=n[a-2],h=n[a-1];return h+(1-h)*(t-o)/(this.frames[i+this.getFrameEntries()]-o)}apply(t,i,n,r,a,o,h,l,c){const u=t.slots;if(!this.attachment.isTimelineActive(u,this.slotIndex,c))return;const d=this.attachment.timelineSlots,f=this.frames;if(n=f[f.length-1])g=0,p=this.vertices[f.length-1],m=null;else{const b=ii.search(f,n);g=this.getCurvePercent(n,b),p=this.vertices[b],m=this.vertices[b+1]}const v=this.vertices[0].length;this.applyToSlot(u[this.slotIndex],c,p,m,g,v,a,o,h);for(const b of d)this.applyToSlot(u[b],c,p,m,g,v,a,o,h)}applyBeforeFirst(t,i,n,r){if(!t.bone.active)return;const a=i?t.appliedPose:t.pose;if(a.attachment==null||a.attachment.timelineAttachment!==this.attachment)return;const o=a.deform;switch(o.length===0&&(r=it.setup),r){case it.setup:o.length=0;break;case it.first:{if(n===1){o.length=0;return}const h=this.vertices[0].length;o.length=h;const l=o,c=a.attachment;if(c.bones===null){const u=c.vertices;for(let d=0;d>4,c=h.attachment.sequence.regions.length;const u=Lw[a&15];if(u!==Gi.hold)switch(l+=(n-r)/o+1e-5|0,u){case Gi.once:l=Math.min(c-1,l);break;case Gi.loop:l%=c;break;case Gi.pingpong:{const d=(c<<1)-2;l=d===0?0:l%d,l>=c&&(l=d-l);break}case Gi.onceReverse:l=Math.max(c-1-l,0);break;case Gi.loopReverse:l=c-1-l%c;break;case Gi.pingpongReverse:{const d=(c<<1)-2;l=d===0?0:(l+c-1)%d,l>=c&&(l=d-l)}}h.sequenceIndex=l}};x(Bs,"ENTRIES",3),x(Bs,"MODE",1),x(Bs,"DELAY",2);let Hh=Bs;const Zh=class Zh extends ii{constructor(t){super(t,...Zh.propertyIds);x(this,"events");this.events=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,i){this.frames[t]=i.time,this.events[t]=i}apply(t,i,n,r,a,o,h,l,c){if(!r)return;const u=this.frames,d=this.frames.length;if(i>n)this.apply(null,i,Number.MAX_VALUE,r,0,o,!1,!1,!1),i=-1;else if(i>=u[d-1])return;if(n0&&u[f-1]===p;)f--}for(;f=u[f];f++)r.push(this.events[f])}};x(Zh,"propertyIds",[`${xt.event}`]);let Ul=Zh;const uo=class uo extends ii{constructor(t){super(t,...uo.propertyIds);x(this,"drawOrders");this.drawOrders=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,i,n){this.frames[t]=i,this.drawOrders[t]=n}apply(t,i,n,r,a,o,h,l,c){const u=c?t.drawOrder.appliedPose:t.drawOrder.pose,d=t.slots;if(l||n>2];switch(b){case 0:{const w=f[v];p=f[v+1],m=f[v+2],g=f[v+3];const A=(n-w)/(f[v+4]-w);p+=(f[v+4+1]-p)*A,m+=(f[v+4+2]-m)*A,g+=(f[v+4+3]-g)*A;break}case 1:p=f[v+1],m=f[v+2],g=f[v+3];break;default:p=this.getBezierValue(n,v,1,b-2),m=this.getBezierValue(n,v,2,b+18-2),g=this.getBezierValue(n,v,3,b+36-2)}const y=o===it.setup?u.data.setupPose:d;h?(d.mixRotate=y.mixRotate+p*a,d.mixX=y.mixX+m*a,d.mixY=y.mixY+g*a):(d.mixRotate=y.mixRotate+(p-y.mixRotate)*a,d.mixX=y.mixX+(m-y.mixX)*a,d.mixY=y.mixY+(g-y.mixY)*a)}}class Jr extends Jl{constructor(e,t,i,n){super(e,t,i,n)}apply(e,t,i,n,r,a,o,h,l){if(o&&!this.additive&&(o=!1),this.constraintIndex===-1){const c=i>=this.frames[0]?this.getCurveValue(i):0,u=e.physics;for(const d of u)if(d.active&&this.global(d.data)){const f=l?d.appliedPose:d.pose;this.set(f,this.getAbsoluteValue(i,r,a,o,this.get(f),this.get(d.data.setupPose),c))}}else{const c=e.constraints[this.constraintIndex];if(c.active){const u=l?c.appliedPose:c.pose;this.set(u,this.getAbsoluteValue(i,r,a,o,this.get(u),this.get(c.data.setupPose)))}}}}class nS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintInertia)}get(e){return e.inertia}set(e,t){e.inertia=t}global(e){return e.inertiaGlobal}}class rS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintStrength)}get(e){return e.strength}set(e,t){e.strength=t}global(e){return e.strengthGlobal}}class aS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintDamping)}get(e){return e.damping}set(e,t){e.damping=t}global(e){return e.dampingGlobal}}class oS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintMass)}get(e){return 1/e.massInverse}set(e,t){e.massInverse=1/t}global(e){return e.massGlobal}}class lS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintWind),this.additive=!0}get(e){return e.wind}set(e,t){e.wind=t}global(e){return e.windGlobal}}class cS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintGravity),this.additive=!0}get(e){return e.gravity}set(e,t){e.gravity=t}global(e){return e.gravityGlobal}}class hS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintMix)}get(e){return e.mix}set(e,t){e.mix=t}global(e){return e.mixGlobal}}const Jh=class Jh extends ii{constructor(t,i){super(t,...Jh.propertyIds);x(this,"constraintIndex");this.constraintIndex=i,this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,i){this.frames[t]=i}apply(t,i,n,r,a,o,h,l,c){let u;if(this.constraintIndex!==-1&&(u=t.constraints[this.constraintIndex],!u.active))return;const d=this.frames;if(i>n)this.apply(t,i,Number.MAX_VALUE,[],a,o,!1,!1,!1),i=-1;else if(i>=d[d.length-1])return;if(!(n=d[ii.search(d,i)+1]))if(u!=null)u.reset(t);else for(const f of t.physics)f.active&&f.reset(t)}};x(Jh,"propertyIds",[xt.physicsConstraintReset.toString()]);let jh=Jh;class uS extends Jl{constructor(e,t,i){super(e,t,i,xt.sliderTime)}apply(e,t,i,n,r,a,o,h,l){const c=e.constraints[this.constraintIndex];if(c.active){const u=l?c.appliedPose:c.pose;u.time=this.getAbsoluteValue(i,r,a,o,u.time,c.data.setupPose.time)}}}class dS extends Jl{constructor(e,t,i){super(e,t,i,xt.sliderMix),this.additive=!0}apply(e,t,i,n,r,a,o,h,l){const c=e.constraints[this.constraintIndex];if(c.active){const u=l?c.appliedPose:c.pose;u.mix=this.getAbsoluteValue(i,r,a,o,u.mix,c.data.setupPose.mix)}}}const Sl=class Sl{constructor(e){x(this,"data");x(this,"tracks",[]);x(this,"timeScale",1);x(this,"unkeyedState",0);x(this,"events",[]);x(this,"listeners",[]);x(this,"queue",new OO(this));x(this,"propertyIds",new Map);x(this,"animationsChanged",!1);x(this,"trackEntryPool",new AO(()=>new FO));this.data=e}update(e){e*=this.timeScale;const t=this.tracks;for(let i=0,n=t.length;i0){if(r.delay-=a,r.delay>0)continue;a=-r.delay,r.delay=0}let o=r.next;if(o){const h=r.trackLast-o.delay;if(h>=0){for(o.delay=0,o.trackTime+=r.timeScale===0?0:(h/r.timeScale+e)*o.timeScale,r.trackTime+=a,this.setTrack(i,o,!0);o.mixingFrom;)o.mixTime+=e,o=o.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&!r.mixingFrom){t[i]=null,this.queue.end(r),this.clearNext(r);continue}if(r.mixingFrom&&this.updateMixingFrom(r,e)){let h=r.mixingFrom;for(r.mixingFrom=null,h&&(h.mixingTo=null);h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=a}this.queue.drain()}updateMixingFrom(e,t){const i=e.mixingFrom;if(!i)return!0;const n=this.updateMixingFrom(i,t);if(i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,e.nextTrackLast!==-1&&e.mixTime>=e.mixDuration){if(i.totalAlpha===0||e.mixDuration===0){if(e.mixingFrom=i.mixingFrom,i.mixingFrom!=null&&(i.mixingFrom.mixingTo=e),i.totalAlpha===0)for(let r=e;r.mixingTo!=null;r=r.mixingTo)r.keepHold=!0;this.queue.end(i)}return n}return i.trackTime+=t*i.timeScale,e.mixTime+=t,!1}apply(e){if(!e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();const t=this.events,i=this.tracks;let n=!1;for(let o=0,h=i.length;o0)continue;n=!0;let c=l.alpha;l.mixingFrom?c*=this.applyMixingFrom(l,e):l.trackTime>=l.trackEnd&&!l.next&&(c=0);let u=l.animationLast,d=l.getAnimationTime(),f=d,p=t;l.reverse&&(f=l.animation.duration-f,p=null);const m=l.animation.timelines,g=m.length;if(o===0&&c===1)for(let v=0;v=l.alphaAttachmentThreshold,y=l.additive,w=y||l.shortestRotation,A=!w&&l.timelinesRotation.length!==g<<1;A&&(l.timelinesRotation.length=g<<1);for(let T=0;T0?h/o:a,c=i.animation.timelines,u=c.length,d=i.timelineMode,f=i.timelineHoldMix,p=r=i.alphaAttachmentThreshold);else{const B=!m||!(P instanceof Gr)||I===it.current;P.apply(t,w,T,_,k,I,g,B,!1)}}return i.reverse&&r0&&this.queueEvents(i,A),this.events.length=0,i.nextAnimationLast=A,i.nextTrackLast=i.trackTime,r}applyAttachmentTimeline(e,t,i,n,r){const a=t.slots[e.slotIndex];if(!a.bone.active||!r&&a.attachmentState===this.unkeyedState+dy)return;let o=i=0,A=v>=0;Math.abs(b)<=90&&Ye.signum(b)!==Ye.signum(g)&&(Math.abs(v-y)>180?(m+=360*Ye.signum(v),A=w):y!==0?m-=360*Ye.signum(v):A=w),A!==w&&(m+=360*Ye.signum(v)),a[o]=m}a[o+1]=g,c.rotation=f+m*n}queueEvents(e,t){const i=e.animationStart,n=e.animationEnd,r=n-i,a=e.reverse;let o=e.trackLast%r;a&&(o=r-o);const h=this.events;let l=0,c=h.length;for(;l=i&&d.time<=n&&this.queue.event(e,d)}let u=!1;if(e.loop)if(r===0)u=!0;else{const d=Math.floor(e.trackTime/r);u=d>0&&d>Math.floor(e.trackLast/r)}else u=t>=n&&e.animationLast=i&&d.time<=n&&this.queue.event(e,d)}}eventsReverse(e,t,i){const n=e.animation.duration,r=n-t,a=n-i,o=e.animation.timelines;for(let h=0,l=e.animation.timelines.length;h=a){for(let p=0;p=r)break;this.events.push(u[p])}}else{for(let m=0;m=r);m++)this.events.push(u[m]);let p=0;for(;p=a);p++);for(;p= 0.");if(e>=this.tracks.length)return;const t=this.tracks[e];if(!t)return;this.queue.end(t),this.clearNext(t);let i=t;for(;;){const n=i.mixingFrom;if(!n)break;this.queue.end(n),i.mixingFrom=null,i.mixingTo=null,i=n}this.tracks[t.trackIndex]=null,this.queue.drain()}setTrack(e,t,i){const n=this.expandToIndex(e);this.tracks[e]=t,t.previous=null,n&&(n.next=null,i&&this.queue.interrupt(n),t.mixingFrom=n,n.mixingTo=t,t.mixTime=0,n.timelinesRotation.length=0),this.queue.start(t)}setAnimation(e,t,i=!1){return typeof t=="string"?this.setAnimation1(e,t,i):this.setAnimation2(e,t,i)}setAnimation1(e,t,i=!1){const n=this.data.skeletonData.findAnimation(t);if(!n)throw new Error(`Animation not found: ${t}`);return this.setAnimation2(e,n,i)}setAnimation2(e,t,i=!1){if(e<0)throw new Error("trackIndex must be >= 0.");if(!t)throw new Error("animation cannot be null.");let n=!0,r=this.expandToIndex(e);r&&(r.nextTrackLast===-1&&r.animation===t?(this.tracks[e]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,n=!1):this.clearNext(r));const a=this.trackEntry(e,t,i,r);return this.setTrack(e,a,n),this.queue.drain(),a}addAnimation(e,t,i=!1,n=0){return typeof t=="string"?this.addAnimation1(e,t,i,n):this.addAnimation2(e,t,i,n)}addAnimation1(e,t,i=!1,n=0){const r=this.data.skeletonData.findAnimation(t);if(!r)throw new Error(`Animation not found: ${t}`);return this.addAnimation2(e,r,i,n)}addAnimation2(e,t,i=!1,n=0){if(e<0)throw new Error("trackIndex must be >= 0.");if(!t)throw new Error("animation cannot be null.");let r=this.expandToIndex(e);if(r)for(;r.next;)r=r.next;const a=this.trackEntry(e,t,i,r);return r?(r.next=a,a.previous=r,n<=0&&(n=Math.max(n+r.getTrackComplete()-a.mixDuration,0))):(this.setTrack(e,a,!0),this.queue.drain(),n<0&&(n=0)),a.delay=n,a}setEmptyAnimation(e,t=0){const i=this.setAnimation(e,Sl.emptyAnimation,!1);return i.mixDuration=t,i.trackEnd=t,i}addEmptyAnimation(e,t=0,i=0){const n=this.addAnimation(e,Sl.emptyAnimation,!1,i);return i<=0&&(n.delay=Math.max(n.delay+n.mixDuration-t,0)),n.mixDuration=t,n.trackEnd=t,n}setEmptyAnimations(e=0){const t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let i=0,n=this.tracks.length;i0&&(a[d]=v);break}}h&&(g=g&~Nc|r[d]&Nc),r[d]=g}}from(e,t,i){const n=this.propertyIds;let r=BO;for(let a=0,o=i.length;a= 0.");return e>=this.tracks.length?null:this.tracks[e]}addListener(e){if(!e)throw new Error("listener cannot be null.");this.listeners.push(e)}removeListener(e){const t=this.listeners.indexOf(e);t>=0&&this.listeners.splice(t,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}};x(Sl,"emptyAnimation",new Fp("",[],0));let oy=Sl;class FO{constructor(){x(this,"animation",null);x(this,"previous",null);x(this,"next",null);x(this,"mixingFrom",null);x(this,"mixingTo",null);x(this,"listener",null);x(this,"trackIndex",0);x(this,"loop",!1);x(this,"additive",!1);x(this,"reverse",!1);x(this,"shortestRotation",!1);x(this,"keepHold",!1);x(this,"eventThreshold",0);x(this,"mixAttachmentThreshold",0);x(this,"alphaAttachmentThreshold",0);x(this,"mixDrawOrderThreshold",0);x(this,"animationStart",0);x(this,"animationEnd",0);x(this,"animationLast",0);x(this,"nextAnimationLast",0);x(this,"delay",0);x(this,"trackTime",0);x(this,"trackLast",0);x(this,"nextTrackLast",0);x(this,"trackEnd",0);x(this,"timeScale",0);x(this,"alpha",0);x(this,"mixTime",0);x(this,"mixDuration",0);x(this,"totalAlpha",0);x(this,"mixInterpolation",To.linear);x(this,"timelineMode",[]);x(this,"timelineHoldMix",[]);x(this,"timelinesRotation",[])}setMixDuration(e,t){this.mixDuration=e,t!==void 0&&(t<=0&&(t=this.previous==null?0:Math.max(t+this.previous.getTrackComplete()-e,0)),this.delay=t)}setMixInterpolation(e){if(!e)throw new Error("mixInterpolation cannot be null.");this.mixInterpolation=e}mix(){if(this.mixDuration===0)return 1;let e=this.mixTime/this.mixDuration;return e>=1?1:this.mixInterpolation===To.linear?e:(e=this.mixInterpolation.apply(e),e<0?0:e>1?1:e)}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.mixInterpolation=To.linear,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(!this.loop)return Math.min(this.trackTime+this.animationStart,this.animationEnd);const e=this.animationEnd-this.animationStart;return e===0?this.animationStart:this.trackTime%e+this.animationStart}setAnimationLast(e){this.animationLast=e,this.nextAnimationLast=e}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){const e=this.animationEnd-this.animationStart;if(e!==0){if(this.loop)return e*(1+(this.trackTime/e|0));if(this.trackTime=0}}class OO{constructor(e){x(this,"objects",[]);x(this,"drainDisabled",!1);x(this,"animState");this.animState=e}start(e){this.objects.push(vs.start),this.objects.push(e),this.animState.animationsChanged=!0}interrupt(e){this.objects.push(vs.interrupt),this.objects.push(e)}end(e){this.objects.push(vs.end),this.objects.push(e),this.animState.animationsChanged=!0}dispose(e){this.objects.push(vs.dispose),this.objects.push(e)}complete(e){this.objects.push(vs.complete),this.objects.push(e)}event(e,t){this.objects.push(vs.event),this.objects.push(e),this.objects.push(t)}drain(){var e,t,i,n,r,a;if(!this.drainDisabled){this.drainDisabled=!0;for(let o=0;o= 0.");if(!i)throw new Error("name cannot be null.");this.index=t,this.parent=n}copy(t){const i=new ku(this.index,this.name,t);return i.length=this.length,i.setupPose.set(this.setupPose),i}}var pi;(function(s){s[s.Normal=0]="Normal",s[s.OnlyTranslation=1]="OnlyTranslation",s[s.NoRotationOrReflection=2]="NoRotationOrReflection",s[s.NoScale=3]="NoScale",s[s.NoScaleOrReflection=4]="NoScaleOrReflection"})(pi||(pi={}));class Pm{constructor(){x(this,"bone");x(this,"x",0);x(this,"y",0);x(this,"rotation",0);x(this,"scaleX",0);x(this,"scaleY",0);x(this,"shearX",0);x(this,"shearY",0);x(this,"inherit",pi.Normal);x(this,"a",0);x(this,"b",0);x(this,"c",0);x(this,"d",0);x(this,"worldY",0);x(this,"worldX",0);x(this,"world",0);x(this,"local",0)}set(e){if(e==null)throw new Error("pose cannot be null.");this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY,this.inherit=e.inherit}setPosition(e,t){this.x=e,this.y=t}setScale(e,t){this.scaleX=e,this.scaleY=t===void 0?e:t}getInherit(){return this.inherit}setInherit(e){if(e==null)throw new Error("inherit cannot be null.");this.inherit=e}update(e,t){this.world!==e._update&&this.updateWorldTransform(e)}updateWorldTransform(e){this.local===e._update?this.updateLocalTransform(e):this.world=e._update;const t=this.rotation,i=this.scaleX,n=this.scaleY,r=this.shearX,a=this.shearY;if(!this.bone.parent){const d=e.scaleX,f=e.scaleY,p=(t+r)*Ye.degRad,m=(t+90+a)*Ye.degRad;this.a=Math.cos(p)*i*d,this.b=Math.cos(m)*n*d,this.c=Math.sin(p)*i*f,this.d=Math.sin(m)*n*f,this.worldX=this.x*d+e.x,this.worldY=this.y*f+e.y;return}const o=this.bone.parent.appliedPose;let h=o.a,l=o.b,c=o.c,u=o.d;switch(this.worldX=h*this.x+l*this.y+o.worldX,this.worldY=c*this.x+u*this.y+o.worldY,this.inherit){case pi.Normal:{const d=(t+r)*Ye.degRad,f=(t+90+a)*Ye.degRad,p=Math.cos(d)*i,m=Math.cos(f)*n,g=Math.sin(d)*i,v=Math.sin(f)*n;this.a=h*p+l*g,this.b=h*m+l*v,this.c=c*p+u*g,this.d=c*m+u*v;return}case pi.OnlyTranslation:{const d=e.scaleX,f=e.scaleY,p=(t+r)*Ye.degRad,m=(t+90+a)*Ye.degRad;this.a=Math.cos(p)*i*d,this.b=Math.cos(m)*n*d,this.c=Math.sin(p)*i*f,this.d=Math.sin(m)*n*f;break}case pi.NoRotationOrReflection:{const d=e.scaleX,f=e.scaleY,p=1/d,m=1/f;h*=p,c*=m;let g=h*h+c*c,v=0;g>Ye.epsilon2?(g=Math.abs(h*u*m-l*p*c)/g,l=c*g,u=h*g,v=t-Ye.atan2Deg(c,h)):(h=0,c=0,v=t-90+Ye.atan2Deg(u,l));const b=(v+r)*Ye.degRad,y=(v+a+90)*Ye.degRad,w=Math.cos(b)*i,A=Math.cos(y)*n,T=Math.sin(b)*i,_=Math.sin(y)*n;this.a=(h*w-l*T)*d,this.b=(h*A-l*_)*d,this.c=(c*w+u*T)*f,this.d=(c*A+u*_)*f;break}case pi.NoScale:case pi.NoScaleOrReflection:{const d=e.scaleX,f=e.scaleY,p=1/d,m=1/f,g=t*Ye.degRad,v=Math.cos(g),b=Math.sin(g);let y=(h*v+l*b)*p,w=(c*v+u*b)*m;const A=1/Math.sqrt(y*y+w*w);y*=A,w*=A;let T=-w,_=y;this.inherit===pi.NoScale&&h*u-l*c<0!=(d<0!=f<0)&&(T=-T,_=-_);const R=r*Ye.degRad,P=(90+a)*Ye.degRad,F=Math.cos(R)*i,I=Math.cos(P)*n,k=Math.sin(R)*i,B=Math.sin(P)*n;this.a=(y*F+T*k)*d,this.b=(y*I+T*B)*d,this.c=(w*F+_*k)*f,this.d=(w*I+_*B)*f;break}}}updateLocalTransform(e){this.local=0,this.world=e._update;const t=e.scaleX,i=e.scaleY;if(!this.bone.parent){const v=1/t,b=1/i;this.x=(this.worldX-e.x)*v,this.y=(this.worldY-e.y)*b,this.set5(this.a*v,this.b*v,this.c*b,this.d*b,0);return}const n=this.bone.parent.appliedPose;let r=n.a,a=n.b,o=n.c,h=n.d;const l=r*h-a*o,c=1/(r*h-a*o),u=h*c,d=a*c,f=o*c,p=r*c,m=this.worldX-n.worldX,g=this.worldY-n.worldY;switch(this.x=m*u-g*d,this.y=g*p-m*f,this.inherit){case pi.Normal:this.set5(u*this.a-d*this.c,u*this.b-d*this.d,p*this.c-f*this.a,p*this.d-f*this.b,0);break;case pi.OnlyTranslation:{const v=1/t,b=1/i;this.set5(this.a*v,this.b*v,this.c*b,this.d*b,0);break}case pi.NoRotationOrReflection:{const v=1/t,b=1/i;r*=v,o*=b;const y=this.a*v,w=this.b*v,A=this.c*b,T=this.d*b,_=1/(r*r+o*o),R=1/Math.abs(l*v*b);this.set5((r*y+o*A)*_,(r*w+o*T)*_,(r*A-o*y)*R,(r*T-o*w)*R,Ye.atan2Deg(o,r));break}case pi.NoScale:case pi.NoScaleOrReflection:{const v=1/t,b=1/i,y=this.a*v,w=this.b*v,A=this.c*b,T=this.d*b;let _=h*this.a-a*this.c,R=r*this.c-o*this.a;l<0&&(_=-_,R=-R);let P=Ye.atan2Deg(R,_);this.rotation=P,P*=Ye.degRad;const F=Math.cos(P),I=Math.sin(P);let k=(r*F+a*I)*v,B=(o*F+h*I)*b;const D=1/Math.sqrt(k*k+B*B);k*=D,B*=D;const U=this.inherit===pi.NoScale&&l<0!=(t<0!=i<0)?-1:1;this.set4(k*y+B*A,k*w+B*T,(k*A-B*y)*U,(k*T-B*w)*U)}}}set4(e,t,i,n){const r=e*e+i*i,a=t*t+n*n;r>Ye.epsilon2?(this.shearX=Ye.atan2Deg(i,e),this.scaleX=Math.sqrt(r)):(this.shearX=0,this.scaleX=0),this.scaleY=Math.sqrt(a),a>Ye.epsilon2?(this.shearY=Ye.atan2Deg(n,t),e*n-t*i<0?(this.scaleY=-this.scaleY,this.shearY+=90):this.shearY-=90,this.shearY>180?this.shearY-=360:this.shearY<=-180&&(this.shearY+=360)):this.shearY=0}set5(e,t,i,n,r){this.shearX=0;const a=e*e+i*i,o=t*t+n*n;if(a>Ye.epsilon2){const h=Ye.atan2Deg(i,e);this.rotation=h+r,this.scaleX=Math.sqrt(a),this.scaleY=Math.sqrt(o),o>Ye.epsilon2?(this.shearY=Ye.atan2Deg(n,t),e*n-t*i<0?(this.scaleY=-this.scaleY,this.shearY+=90-h):this.shearY-=90+h,this.shearY>180?this.shearY-=360:this.shearY<=-180&&(this.shearY+=360)):this.shearY=0}else this.scaleX=0,this.scaleY=Math.sqrt(o),this.shearY=0,this.rotation=o>Ye.epsilon2?Ye.atan2Deg(n,t)-90+r:r}validateLocalTransform(e){this.local===e._update&&this.updateLocalTransform(e)}modifyLocal(e){this.local===e._update&&this.updateLocalTransform(e),this.world=0,this.resetWorld(e,e._update)}modifyWorld(e){const t=e._update;this.local=t,this.world=t,this.resetWorld(e,t)}resetWorld(e,t){const i=this.bone.children;for(let n=0,r=i.length;n1&&t.constrained(this.bones[1].bone)}isSourceActive(){return this.target.active}static apply(t,i,n,r,a,o,h,l,c,u){typeof n=="number"?Pr.apply1(t,i,n,r,a,o,h,l):Pr.apply2(t,i,n,r,a,o,h,l,c,u)}static apply1(t,i,n,r,a,o,h,l){i.modifyLocal(t);const c=i.bone.parent.appliedPose;let u=c.a,d=c.b,f=c.c,p=c.d,m=-i.shearX-i.rotation,g=0,v=0;switch(i.inherit){case pi.OnlyTranslation:g=(n-i.worldX)*Ye.signum(t.scaleX),v=(r-i.worldY)*Ye.signum(t.scaleY);break;case pi.NoRotationOrReflection:{const b=Math.abs(u*p-d*f)/Math.max(Ye.epsilon,u*u+f*f),y=u/t.scaleX,w=f/t.scaleY;d=-w*b*t.scaleX,p=y*b*t.scaleY,m+=Ye.atan2Deg(w,y)}default:{const b=n-c.worldX,y=r-c.worldY,w=u*p-d*f;Math.abs(w)<=Ye.epsilon?(g=0,v=0):(g=(b*p-y*d)/w-i.x,v=(y*u-b*f)/w-i.y)}}if(m+=Ye.atan2Deg(v,g),i.scaleX<0&&(m+=180),m>180?m-=360:m<=-180&&(m+=360),i.rotation+=m*l,a||o){switch(i.inherit){case pi.NoScale:case pi.NoScaleOrReflection:g=n-i.worldX,v=r-i.worldY}const b=i.bone.data.length*i.scaleX;if(b>Ye.epsilon){const y=g*g+v*v;if(a&&yb*b){const w=(Math.sqrt(y)/b-1)*l+1;switch(i.scaleX*=w,h){case hs.Uniform:i.scaleY*=w;break;case hs.Volume:i.scaleY/=w<.7?.25+.642857*w:w}}}}}static apply2(t,i,n,r,a,o,h,l,c,u){if(i.inherit!==pi.Normal||n.inherit!==pi.Normal)return;i.modifyLocal(t),n.modifyLocal(t);let d=i.x,f=i.y,p=i.scaleX,m=i.scaleY,g=n.scaleX,v=0,b=0,y=0;p<0?(p=-p,v=180,y=-1):(v=0,y=1),m<0&&(m=-m,y=-y),g<0?(g=-g,b=180):b=0;let w=0,A=0,T=i.a,_=i.b,R=i.c,P=i.d;const F=Math.abs(p-m)<=Ye.epsilon;!F||h?(n.y=0,w=T*n.x+i.worldX,A=R*n.x+i.worldY):(w=T*n.x+_*n.y+i.worldX,A=R*n.x+P*n.y+i.worldY);const I=i.bone.parent.appliedPose;T=I.a,_=I.b,R=I.c,P=I.d;let k=T*P-_*R,B=w-I.worldX,D=A-I.worldY;k=Math.abs(k)<=Ye.epsilon?0:1/k;const U=(B*P-D*_)*k-d,L=(D*T-B*R)*k-f;let N=Math.sqrt(U*U+L*L),O=n.bone.data.length*g,X,E;if(N0){let me=Math.min(1,fe/(c*2))-1;me=(fe-c*(1-me*me))/K,V-=me*V,q-=me*q,W=V*V+q*q}}e:if(F){O*=p;let K=(W-N*N-O*O)/(2*N*O);if(K<-1)K=-1,E=Math.PI*o;else if(K>1){if(K=1,E=0,h)switch(T=(Math.sqrt(W)/(N+O)-1)*u+1,i.scaleX*=T,l){case hs.Uniform:i.scaleY*=T;break;case hs.Volume:i.scaleY/=T<.7?.25+.642857*T:T}}else E=Math.acos(K)*o;T=N+O*K,_=O*Math.sin(E),X=Math.atan2(q*T-V*_,V*T+q*_)}else{T=p*O,_=m*O;const K=T*T,fe=_*_,me=Math.atan2(q,V);R=fe*N*N+K*W-K*fe;const we=-2*fe*N,Ee=fe-K;if(P=we*we-4*Ee*R,P>=0){let xe=Math.sqrt(P);we<0&&(xe=-xe),xe=-(we+xe)*.5;let oe=xe/Ee,ge=R/xe;const le=Math.abs(oe)=0){D=Math.sqrt(oe)*o,X=me-Math.atan2(D,le),E=Math.atan2(D/m,(le-N)/p);break e}}let pe=Ye.PI,Ae=N-T,G=Ae*Ae,Z=0,z=0,j=N+T,te=j*j,he=0;R=-T*N/(K-fe),R>=-1&&R<=1&&(R=Math.acos(R),B=T*Math.cos(R)+N,D=_*Math.sin(R),P=B*B+D*D,Pte&&(z=R,te=P,j=B,he=D)),W<=(G+te)*.5?(X=me-Math.atan2(Z*o,Ae),E=pe*o):(X=me-Math.atan2(he*o,j),E=z*o)}const J=Math.atan2(n.y,n.x)*y;X=(X-J)*Ye.radDeg+v-i.rotation,X>180?X-=360:X<=-180&&(X+=360),i.rotation+=X*u,E=((E+J)*Ye.radDeg-n.shearX)*y+b-n.rotation,E>180?E-=360:E<=-180&&(E+=360),n.rotation+=E*u}}class Qc extends ec{constructor(t){super(t,new km);x(this,"bones",[]);x(this,"_target",null);x(this,"_scaleYMode",hs.None)}set target(t){this._target=t}get target(){if(!this._target)throw new Error("target cannot be null.");return this._target}set scaleYMode(t){this._scaleYMode=t}get scaleYMode(){if(this._scaleYMode==null)throw new Error("scaleYMode cannot be null.");return this._scaleYMode}create(t){return new Pr(this,t)}}class Fm{constructor(){x(this,"position",0);x(this,"spacing",0);x(this,"mixRotate",0);x(this,"mixX",0);x(this,"mixY",0)}set(e){this.position=e.position,this.spacing=e.spacing,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY}}class eh extends ec{constructor(t){super(t,new Fm);x(this,"bones",[]);x(this,"_slot",null);x(this,"positionMode",Dn.Fixed);x(this,"spacingMode",Fi.Fixed);x(this,"rotateMode",ka.Chain);x(this,"offsetRotation",0)}set slot(t){this._slot=t}get slot(){if(this._slot)return this._slot;throw new Error("SlotData not set.")}create(t){return new Om(this,t)}}var Dn;(function(s){s[s.Fixed=0]="Fixed",s[s.Percent=1]="Percent"})(Dn||(Dn={}));var Fi;(function(s){s[s.Length=0]="Length",s[s.Fixed=1]="Fixed",s[s.Percent=2]="Percent",s[s.Proportional=3]="Proportional"})(Fi||(Fi={}));var ka;(function(s){s[s.Tangent=0]="Tangent",s[s.Chain=1]="Chain",s[s.ChainScale=2]="ChainScale"})(ka||(ka={}));const Qs=class Qs extends Ql{constructor(t,i){super(t,new Fm,new Fm);x(this,"data");x(this,"bones");x(this,"slot");x(this,"spaces",[]);x(this,"positions",[]);x(this,"world",[]);x(this,"curves",[]);x(this,"lengths",[]);x(this,"segments",[]);if(!i)throw new Error("skeleton cannot be null.");this.data=t,this.bones=[];for(const n of this.data.bones)this.bones.push(i.bones[n.index].constrainedPose);this.slot=i.slots[t.slot.index]}copy(t){var i=new Qs(this.data,t);return i.pose.set(this.pose),i}update(t,i){const n=this.slot.appliedPose.attachment;if(!(n instanceof Xl))return;const r=this.appliedPose,a=r.mixRotate,o=r.mixX,h=r.mixY;if(a===0&&o===0&&h===0)return;const l=this.data,c=l.rotateMode===ka.Tangent,u=l.rotateMode===ka.ChainScale,d=this.bones,f=d.length,p=c?f:f+1,m=ct.setArraySize(this.spaces,p),g=u?this.lengths=ct.setArraySize(this.lengths,f):[],v=r.spacing;switch(l.spacingMode){case Fi.Percent:if(u)for(let _=0,R=p-1;_0){_=p/_*v;for(let R=1;R0?Ye.degRad:-Ye.degRad}for(let _=0,R=3;_0){let D=P.a,U=P.b,L=P.c,N=P.d,O=0,X=0,E=0;if(c?O=b[R-1]:m[_+1]===0?O=b[R+2]:O=Math.atan2(B,k),O-=Math.atan2(L,D),T){X=Math.cos(O),E=Math.sin(O);const V=P.bone.data.length;y+=(V*(X*D-E*L)-k)*a,w+=(V*(E*D+X*L)-B)*a}else O+=A;O>Ye.PI?O-=Ye.PI2:O<-Ye.PI&&(O+=Ye.PI2),O*=a,X=Math.cos(O),E=Math.sin(O),P.a=X*D-E*L,P.b=X*U-E*N,P.c=E*D+X*L,P.d=E*U+X*N}}}computeWorldPositions(t,i,n,r){const a=this.slot;let o=this.appliedPose.position,h=this.spaces,l=ct.setArraySize(this.positions,n*3+2),c=this.world;const u=i.closed;let d=i.worldVerticesLength,f=d/6,p=Qs.NONE;if(!i.constantSpeed){const E=i.lengths;f-=u?1:2;const V=E[f];this.data.positionMode===Dn.Percent&&(o*=V);let q;switch(this.data.spacingMode){case Fi.Percent:q=V;break;case Fi.Proportional:q=V/n;break;default:q=1}c=ct.setArraySize(this.world,8);for(let W=0,J=0,K=0;WV){p!==Qs.AFTER&&(p=Qs.AFTER,i.computeWorldVertices(t,a,d-6,4,c,0,2)),this.addAfterPosition(me-V,c,0,l,J);continue}for(;;K++){const we=E[K];if(!(me>we)){if(K===0)me/=we;else{const Ee=E[K-1];me=(me-Ee)/(we-Ee)}break}}K!==p&&(p=K,u&&K===f?(i.computeWorldVertices(t,a,d-4,4,c,0,2),i.computeWorldVertices(t,a,0,4,c,4,2)):i.computeWorldVertices(t,a,K*6+2,8,c,0,2)),this.addCurvePosition(me,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],l,J,r||W>0&&fe===0)}return l}u?(d+=2,c=ct.setArraySize(this.world,d),i.computeWorldVertices(t,a,2,d-4,c,0,2),i.computeWorldVertices(t,a,0,2,c,d-4,2),c[d-2]=c[0],c[d-1]=c[1]):(f--,d-=4,c=ct.setArraySize(this.world,d),i.computeWorldVertices(t,a,2,d,c,0,2));const m=ct.setArraySize(this.curves,f);let g=0,v=c[0],b=c[1],y=0,w=0,A=0,T=0,_=0,R=0,P=0,F=0,I=0,k=0,B=0,D=0,U=0,L=0;for(let E=0,V=2;Eg){this.addAfterPosition(K-g,c,d-4,l,V);continue}for(;;q++){const fe=m[q];if(!(K>fe)){if(q===0)K/=fe;else{const me=m[q-1];K=(K-me)/(fe-me)}break}}if(q!==p){p=q;let fe=q*6;for(v=c[fe],b=c[fe+1],y=c[fe+2],w=c[fe+3],A=c[fe+4],T=c[fe+5],_=c[fe+6],R=c[fe+7],P=(v-y*2+A)*.03,F=(b-w*2+T)*.03,I=((y-A)*3-v+_)*.006,k=((w-T)*3-b+R)*.006,B=P*2+I,D=F*2+k,U=(y-v)*.3+P+I*.16666667,L=(w-b)*.3+F+k*.16666667,X=Math.sqrt(U*U+L*L),O[0]=X,fe=1;fe<8;fe++)U+=B,L+=D,B+=I,D+=k,X+=Math.sqrt(U*U+L*L),O[fe]=X;U+=B,L+=D,X+=Math.sqrt(U*U+L*L),O[8]=X,U+=B+I,L+=D+k,X+=Math.sqrt(U*U+L*L),O[9]=X,W=0}for(K*=X;;W++){const fe=O[W];if(!(K>fe)){if(W===0)K/=fe;else{const me=O[W-1];K=W+(K-me)/(fe-me)}break}}this.addCurvePosition(K*.1,v,b,y,w,A,T,_,R,l,V,r||E>0&&J===0)}return l}addBeforePosition(t,i,n,r,a){const o=i[n],h=i[n+1],l=i[n+2]-o,c=i[n+3]-h,u=Math.atan2(c,l);r[a]=o+t*Math.cos(u),r[a+1]=h+t*Math.sin(u),r[a+2]=u}addAfterPosition(t,i,n,r,a){const o=i[n+2],h=i[n+3],l=o-i[n],c=h-i[n+1],u=Math.atan2(c,l);r[a]=o+t*Math.cos(u),r[a+1]=h+t*Math.sin(u),r[a+2]=u}addCurvePosition(t,i,n,r,a,o,h,l,c,u,d,f){if(t===0||Number.isNaN(t)){u[d]=i,u[d+1]=n,u[d+2]=Math.atan2(a-n,r-i);return}const p=t*t,m=p*t,g=1-t,v=g*g,b=v*g,y=g*t,w=y*3,A=g*w,T=w*t,_=i*b+r*A+o*T+l*m,R=n*b+a*A+h*T+c*m;u[d]=_,u[d+1]=R,f&&(t<.001?u[d+2]=Math.atan2(a-n,r-i):u[d+2]=Math.atan2(R-(n*v+a*y*2+h*p),_-(i*v+r*y*2+o*p)))}sort(t){const i=this.slot.data.index,n=this.slot.bone;t.skin!=null&&this.sortPathSlot(t,t.skin,i,n),t.data.defaultSkin!=null&&t.data.defaultSkin!==t.skin&&this.sortPathSlot(t,t.data.defaultSkin,i,n),this.sortPath(t,this.slot.pose.attachment,n);const r=this.bones,a=this.bones.length;for(let o=0;o0,o=this.data.y>0,h=this.data.rotate>0||this.data.shearX>0,l=this.data.scaleX>0,c=this.bone;let u=c.bone.data.length,d=this.data.step,f=0;if(i!==ya.none){switch(c.modifyWorld(t),i){case ya.reset:this.reset(t);case ya.update:{const p=Math.max(t.time-this.lastTime,0),m=this.remaining;this.remaining+=p,this.lastTime=t.time;const g=c.worldX,v=c.worldY;if(this._reset)this._reset=!1,this.ux=g,this.uy=v;else{let b=this.remaining,y=n.inertia,w=t.data.referenceScale,A=-1,T=0,_=0,R=this.data.limit*p,P=R*Math.abs(t.scaleY);if(R*=Math.abs(t.scaleX),a||o){if(a){const F=(this.ux-g)*y;this.xOffset+=F>R?R:F<-R?-R:F,this.ux=g}if(o){const F=(this.uy-v)*y;this.yOffset+=F>P?P:F<-P?-P:F,this.uy=v}if(b>=d){const F=this.xOffset,I=this.yOffset;A=n.damping**(60*d),T=d*n.massInverse,_=n.strength;const k=w*n.wind,B=w*n.gravity,D=(k*t.windX+B*t.gravityX)*t.scaleX,U=(k*t.windY+B*t.gravityY)*t.scaleY;do a&&(this.xVelocity+=(D-this.xOffset*_)*T,this.xOffset+=this.xVelocity*d,this.xVelocity*=A),o&&(this.yVelocity-=(U+this.yOffset*_)*T,this.yOffset+=this.yVelocity*d,this.yVelocity*=A),b-=d;while(b>=d);this.xLag=this.xOffset-F,this.yLag=this.yOffset-I}f=Math.max(0,1-b/d),a&&(c.worldX+=(this.xOffset-this.xLag*f)*r*this.data.x),o&&(c.worldY+=(this.yOffset-this.yLag*f)*r*this.data.y)}if(h||l){let F=Math.atan2(c.c,c.a),I=0,k=0,B=0,D=this.cx-c.worldX,U=this.cy-c.worldY;if(D>R?D=R:D<-R&&(D=-R),U>P?U=P:U<-P&&(U=-P),b=this.remaining,h){B=(this.data.rotate+this.data.shearX)*r,f=this.rotateLag*Math.max(0,1-m/d);let L=Math.atan2(U+this.ty,D+this.tx)-F-(this.rotateOffset-f)*B;this.rotateOffset+=(L-Math.ceil(L*Ye.invPI2-.5)*Ye.PI2)*y,L=(this.rotateOffset-f)*B+F,I=Math.cos(L),k=Math.sin(L),l&&(L=u*c.getWorldScaleX(),L>0&&(this.scaleOffset+=(D*I+U*k)*y/L))}else{I=Math.cos(F),k=Math.sin(F);const L=u*c.getWorldScaleX()-this.scaleLag*Math.max(0,1-m/d);L>0&&(this.scaleOffset+=(D*I+U*k)*y/L)}if(b>=d){A===-1&&(A=n.damping**(60*d),T=d*n.massInverse,_=n.strength);const L=n.wind*t.windX+n.gravity*t.gravityX,N=(n.wind*t.windY+n.gravity*t.gravityY)*Dm.yDir,O=this.rotateOffset,X=this.scaleOffset,E=u/w;for(;;)if(b-=d,l&&(this.scaleVelocity+=(L*I-N*k-this.scaleOffset*_)*T,this.scaleOffset+=this.scaleVelocity*d,this.scaleVelocity*=A),h){if(this.rotateVelocity-=((L*k+N*I)*E+this.rotateOffset*_)*T,this.rotateOffset+=this.rotateVelocity*d,this.rotateVelocity*=A,b0){let b=0;this.data.rotate>0&&(b=p*this.data.rotate,m=Math.sin(b),g=Math.cos(b),v=c.b,c.b=g*v-m*c.d,c.d=m*v+g*c.d),b+=p*this.data.shearX,m=Math.sin(b),g=Math.cos(b),v=c.a,c.a=g*v-m*c.c,c.c=m*v+g*c.c}else p*=this.data.rotate,m=Math.sin(p),g=Math.cos(p),v=c.a,c.a=g*v-m*c.c,c.c=m*v+g*c.c,v=c.b,c.b=g*v-m*c.d,c.d=m*v+g*c.d}if(l){let p=1+(this.scaleOffset-this.scaleLag*f)*r*this.data.scaleX;switch(c.a*=p,c.c*=p,this.data.scaleYMode){case hs.Uniform:c.b*=p,c.d*=p;break;case hs.Volume:p=Math.abs(p),p=p>=.7?1/p:4-3.67347*p,c.b*=p,c.d*=p}}i!==ya.pose&&(this.tx=u*c.a,this.ty=u*c.c)}}sort(t){const i=this.bone.bone;t.sortBone(i),t._updateCache.push(this),t.sortReset(i.children),t.constrained(i)}isSourceActive(){return this.bone.bone.active}}class th extends ec{constructor(t){super(t,new Bm);x(this,"_bone",null);x(this,"x",0);x(this,"y",0);x(this,"rotate",0);x(this,"scaleX",0);x(this,"shearX",0);x(this,"limit",0);x(this,"step",0);x(this,"inertiaGlobal",!1);x(this,"strengthGlobal",!1);x(this,"dampingGlobal",!1);x(this,"massGlobal",!1);x(this,"windGlobal",!1);x(this,"gravityGlobal",!1);x(this,"mixGlobal",!1);x(this,"_scaleYMode",hs.None)}set bone(t){this._bone=t}get bone(){if(this._bone)return this._bone;throw new Error("BoneData not set.")}get scaleYMode(){return this._scaleYMode}set scaleYMode(t){if(t==null)throw new Error("scaleYMode cannot be null.");this._scaleYMode=t}create(t){return new Fu(this,t)}}typeof Math.fround>"u"&&(Math.fround=(s=>e=>(s[0]=e,s[0]))(new Float32Array(1)));class Nm{constructor(){x(this,"time",0);x(this,"mix",0)}set(e){this.time=e.time,this.mix=e.mix}}const Ml=class Ml extends Ql{constructor(t,i){super(t,new Nm,new Nm);x(this,"bone",null);if(!i)throw new Error("skeleton cannot be null.");t.bone!=null&&(this.bone=i.bones[t.bone.index])}copy(t){var i=new Ml(this.data,t);return i.pose.set(this.pose),i}update(t,i){const n=this.appliedPose;if(n.mix===0)return;const r=this.data,a=r.animation,o=this.bone;if(o!==null){if(!o.active)return;r.local&&o.appliedPose.validateLocalTransform(t),n.time=r.offset+(r.property.value(t,o.appliedPose,r.local,Ml.offsets)-r.property.offset)*r.scale,r.loop?n.time=a.duration+n.time%a.duration:n.time=Math.max(0,n.time)}const h=t.bones,l=a.bones;for(let c=0,u=a.bones.length;c=n.length&&(n.length=e+1),n[e]||(n[e]={}),n[e][t]=i}addSkin(e){for(let i=0;i= 0.");if(!n)throw new Error("boneData cannot be null.");this.index=t,this.boneData=n}}var Wh;(function(s){s[s.Normal=0]="Normal",s[s.Additive=1]="Additive",s[s.Multiply=2]="Multiply",s[s.Screen=3]="Screen"})(Wh||(Wh={}));class Vm{constructor(){x(this,"mixRotate",0);x(this,"mixX",0);x(this,"mixY",0);x(this,"mixScaleX",0);x(this,"mixScaleY",0);x(this,"mixShearY",0)}set(e){this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY,this.mixScaleX=e.mixScaleX,this.mixScaleY=e.mixScaleY,this.mixShearY=e.mixShearY}}class Xp extends Ql{constructor(t,i){super(t,new Vm,new Vm);x(this,"bones");x(this,"source");if(!i)throw new Error("skeleton cannot be null.");this.bones=[];for(const r of t.bones)this.bones.push(i.bones[r.index].constrainedPose);const n=i.bones[t.source.index];if(n==null)throw new Error("source cannot be null.");this.source=n}copy(t){var i=new Xp(this.data,t);return i.pose.set(this.pose),i}update(t,i){const n=this.appliedPose;if(n.mixRotate===0&&n.mixX===0&&n.mixY===0&&n.mixScaleX===0&&n.mixScaleY===0&&n.mixShearY===0)return;const r=this.data,a=r.localSource,o=r.localTarget,h=r.additive,l=r.clamp,c=r.offsets,u=this.source.appliedPose;a&&u.validateLocalTransform(t);const d=r.properties,f=r.properties.length,p=this.bones;for(let m=0,g=this.bones.length;m0?n[Gt.ROTATION]:-n[Gt.ROTATION]);return o<0&&(o+=360),o}}class yS extends Uo{mix(e){return e.mixRotate}apply(e,t,i,n,r,a){if(r)i.rotation+=(a?n:n-i.rotation)*t.mixRotate;else{const o=e.scaleX,h=e.scaleY,l=1/o,c=1/h,u=i.a*l,d=i.b*l,f=i.c*c,p=i.d*c;n*=Ye.degRad,a||(n-=Math.atan2(f,u)),n>Ye.PI?n-=Ye.PI2:n<-Ye.PI&&(n+=Ye.PI2),n*=t.mixRotate;const m=Math.cos(n),g=Math.sin(n);i.a=(m*u-g*f)*o,i.b=(m*d-g*p)*o,i.c=(g*u+m*f)*h,i.d=(g*d+m*p)*h}}}class $m extends No{value(e,t,i,n){return i?t.x+n[Gt.X]:(n[Gt.X]*t.a+n[Gt.Y]*t.b+t.worldX)/e.scaleX}}class xS extends Uo{mix(e){return e.mixX}apply(e,t,i,n,r,a){r?i.x+=(a?n:n-i.x)*t.mixX:(a||(n-=i.worldX/e.scaleX),i.worldX+=n*t.mixX*e.scaleX)}}class Gm extends No{value(e,t,i,n){return i?t.y+n[Gt.Y]:(n[Gt.X]*t.c+n[Gt.Y]*t.d+t.worldY)/e.scaleY}}class bS extends Uo{mix(e){return e.mixY}apply(e,t,i,n,r,a){r?i.y+=(a?n:n-i.y)*t.mixY:(a||(n-=i.worldY/e.scaleY),i.worldY+=n*t.mixY*e.scaleY)}}class Hm extends No{value(e,t,i,n){if(i)return t.scaleX+n[Gt.SCALEX];const r=t.a/e.scaleX,a=t.c/e.scaleY;return Math.sqrt(r*r+a*a)+n[Gt.SCALEX]}}class wS extends Uo{mix(e){return e.mixScaleX}apply(e,t,i,n,r,a){if(r)a?i.scaleX*=1+(n-1)*t.mixScaleX:i.scaleX!==0&&(i.scaleX+=(n-i.scaleX)*t.mixScaleX);else if(a){const o=1+(n-1)*t.mixScaleX;i.a*=o,i.c*=o}else{let o=i.a/e.scaleX,h=i.c/e.scaleY,l=Math.sqrt(o*o+h*h);l!==0&&(l=1+(n-l)*t.mixScaleX/l,i.a*=l,i.c*=l)}}}class jm extends No{value(e,t,i,n){if(i)return t.scaleY+n[Gt.SCALEY];const r=t.b/e.scaleX,a=t.d/e.scaleY;return Math.sqrt(r*r+a*a)+n[Gt.SCALEY]}}class SS extends Uo{mix(e){return e.mixScaleY}apply(e,t,i,n,r,a){if(r)a?i.scaleY*=1+(n-1)*t.mixScaleY:i.scaleY!==0&&(i.scaleY+=(n-i.scaleY)*t.mixScaleY);else if(a){const o=1+(n-1)*t.mixScaleY;i.b*=o,i.d*=o}else{let o=i.b/e.scaleX,h=i.d/e.scaleY,l=Math.sqrt(o*o+h*h);l!==0&&(l=1+(n-l)*t.mixScaleY/l,i.b*=l,i.d*=l)}}}class Wm extends No{value(e,t,i,n){if(i)return t.shearY+n[Gt.SHEARY];const r=1/e.scaleX,a=1/e.scaleY;return(Math.atan2(t.d*a,t.b*r)-Math.atan2(t.c*a,t.a*r))*Ye.radDeg-90+n[Gt.SHEARY]}}class MS extends Uo{mix(e){return e.mixShearY}apply(e,t,i,n,r,a){if(r)a||(n-=i.shearY),i.shearY+=n*t.mixShearY;else{const o=e.scaleX,h=e.scaleY,l=i.b/o,c=i.d/h,u=Math.atan2(c,l);n=(n+90)*Ye.degRad,a?n-=Ye.PI/2:(n-=u-Math.atan2(i.c/h,i.a/o),n>Ye.PI?n-=Ye.PI2:n<-Ye.PI&&(n+=Ye.PI2)),n=u+n*t.mixShearY;const d=Math.sqrt(l*l+c*c);i.b=Math.cos(n)*d*o,i.d=Math.sin(n)*d*h}}}class r8{constructor(e){x(this,"scale",1);x(this,"attachmentLoader");x(this,"linkedMeshes",[]);this.attachmentLoader=e}readSkeletonData(e){const t=this.scale,i=new gS;i.name="";const n=new DO(e),r=n.readInt32(),a=n.readInt32();i.hash=a===0&&r===0?null:a.toString(16)+r.toString(16),i.version=n.readString(),i.x=n.readFloat(),i.y=n.readFloat(),i.width=n.readFloat(),i.height=n.readFloat(),i.referenceScale=n.readFloat()*t;const o=n.readBoolean();o&&(i.fps=n.readFloat(),i.imagesPath=n.readString(),i.audioPath=n.readString());let h=0;h=n.readInt(!0);for(let p=0;p>5;for(let w=0,A;w>1&1,v.spacingMode=b>>2&3,v.rotateMode=b>>4&3,(b&128)!==0&&(v.offsetRotation=n.readFloat());const y=v.setupPose;y.position=n.readFloat(),v.positionMode===Dn.Fixed&&(y.position*=t),y.spacing=n.readFloat(),(v.spacingMode===Fi.Length||v.spacingMode===Fi.Fixed)&&(y.spacing*=t),y.mixRotate=n.readFloat(),y.mixX=n.readFloat(),y.mixY=n.readFloat(),c.push(v);break}case oB:{const v=new th(m);v.bone=l[n.readInt(!0)];let b=n.readByte();if(v.skinRequired=(b&1)!==0,(b&2)!==0&&(v.x=n.readFloat()),(b&4)!==0&&(v.y=n.readFloat()),(b&8)!==0&&(v.rotate=n.readFloat()),(b&16)!==0){let w=n.readFloat();w<-2?(v.scaleYMode=hs.Volume,w=-2-w):w<0&&(v.scaleYMode=hs.Uniform,w=-1-w),v.scaleX=w}(b&32)!==0&&(v.shearX=n.readFloat()),v.limit=((b&64)!==0?n.readFloat():5e3)*t,v.step=1/n.readUnsignedByte();const y=v.setupPose;y.inertia=n.readFloat(),y.strength=n.readFloat(),y.damping=n.readFloat(),y.massInverse=(b&128)!==0?n.readFloat():1,y.wind=n.readFloat(),y.gravity=n.readFloat(),b=n.readByte(),(b&1)!==0&&(v.inertiaGlobal=!0),(b&2)!==0&&(v.strengthGlobal=!0),(b&4)!==0&&(v.dampingGlobal=!0),(b&8)!==0&&(v.massGlobal=!0),(b&16)!==0&&(v.windGlobal=!0),(b&32)!==0&&(v.gravityGlobal=!0),(b&64)!==0&&(v.mixGlobal=!0),y.mix=(b&128)!==0?n.readFloat():1,c.push(v);break}case lB:{const v=new ba(m),b=n.readByte();if(v.skinRequired=(b&1)!==0,v.loop=(b&2)!==0,v.additive=(b&4)!==0,(b&8)!==0){const y=n.readFloat();o&&(b&64)!==0?v.max=y:v.setupPose.time=y}if((b&16)!==0&&(v.setupPose.mix=(b&32)!==0?n.readFloat():1),(b&64)!==0){v.local=(b&128)!==0,v.bone=l[n.readInt(!0)];const y=n.readFloat();let w=1;switch(n.readByte()){case 0:v.property=new Ym;break;case 1:{w=t,v.property=new $m;break}case 2:{w=t,v.property=new Gm;break}case 3:v.property=new Hm;break;case 4:v.property=new jm;break;case 5:v.property=new Wm;break;default:continue}v.property.offset=y*w,v.offset=n.readFloat(),v.scale=n.readFloat()/w}c.push(v);break}}}const d=this.readSkin(n,i,!0,o);d&&(i.defaultSkin=d,i.skins.push(d));{let p=i.skins.length;for(ct.setArraySize(i.skins,h=p+n.readInt(!0));p0){b=[];for(let _=0;_>4,e.readFloat())}r.push(F);break}}}}}const o=i.slots.length,h=e.readInt(!0);if(h>0){const f=new Gr(h);for(let p=0;p0){const f=new Ul(c);for(let p=0;p>>1^-(i&1)}readStringRef(){const e=this.readInt(!0);return e===0?null:this.strings[e-1]}readString(){let e=this.readInt(!0);switch(e){case 0:return null;case 1:return""}e--;let t="";for(let i=0;i>4){case 12:case 13:t+=String.fromCharCode((n&31)<<6|this.readByte()&63),i+=2;break;case 14:t+=String.fromCharCode((n&15)<<12|(this.readByte()&63)<<6|this.readByte()&63),i+=3;break;default:t+=String.fromCharCode(n),i++}}return t}readFloat(){const e=this.buffer.getFloat32(this.index);return this.index+=4,e}readBoolean(){return this.readByte()!==0}}let NO=class{constructor(e,t,i,n,r,a){x(this,"source");x(this,"skinIndex");x(this,"slotIndex");x(this,"sourceIndex");x(this,"mesh");x(this,"inheritTimelines");this.mesh=e,this.skinIndex=t,this.slotIndex=i,this.sourceIndex=n,this.source=r,this.inheritTimelines=a}};class my{constructor(e=null,t,i=0){x(this,"bones");x(this,"vertices");x(this,"length");this.bones=e,this.vertices=t,this.length=i}}var qn;(function(s){s[s.Region=0]="Region",s[s.BoundingBox=1]="BoundingBox",s[s.Mesh=2]="Mesh",s[s.LinkedMesh=3]="LinkedMesh",s[s.Path=4]="Path",s[s.Point=5]="Point",s[s.Clipping=6]="Clipping"})(qn||(qn={}));function Mi(s,e,t,i){t instanceof ar?UO(s,e,t,i):XO(s,e,t,i)}function UO(s,e,t,i){let n=s.readFloat(),r=s.readFloat()*i;for(let a=0,o=0,h=t.getFrameCount()-1;t.setFrame(a,n,r),a!==h;a++){const l=s.readFloat(),c=s.readFloat()*i;switch(s.readByte()){case _n:t.setStepped(a);break;case Tn:Ot(s,t,o++,a,0,n,l,r,c,i)}n=l,r=c}e.push(t)}function XO(s,e,t,i){let n=s.readFloat(),r=s.readFloat()*i,a=s.readFloat()*i;for(let o=0,h=0,l=t.getFrameCount()-1;t.setFrame(o,n,r,a),o!==l;o++){const c=s.readFloat(),u=s.readFloat()*i,d=s.readFloat()*i;switch(s.readByte()){case _n:t.setStepped(o);break;case Tn:Ot(s,t,h++,o,0,n,c,r,u,i),Ot(s,t,h++,o,1,n,c,a,d,i)}n=c,r=u,a=d}e.push(t)}function py(s,e){const t=s.readInt(!0);if(t===0)return null;const i=new Array(e).fill(-1),n=new Array(e-t);let r=0,a=0;for(let o=0;o=0;o--)i[o]===-1&&(i[o]=n[--a]);return i}function Ot(s,e,t,i,n,r,a,o,h,l){e.setBezier(t,i,n,r,o,s.readFloat(),s.readFloat()*l,s.readFloat(),s.readFloat()*l,a,h)}const VO=0,YO=1,$O=2,GO=3,HO=4,jO=5,WO=6,zO=7,qO=8,KO=9,ZO=10,JO=0,QO=1,eB=2,tB=3,iB=4,sB=5,nB=0,rB=1,aB=2,oB=3,lB=4,cB=0,hB=1,uB=0,dB=1,fB=2,mB=0,pB=1,gB=2,vB=4,yB=5,xB=6,bB=7,wB=8,SB=0,MB=1,_n=1,Tn=2;class _B{constructor(e){x(this,"attachmentLoader");x(this,"scale",1);x(this,"linkedMeshes",[]);this.attachmentLoader=e}readSkeletonData(e){const t=this.scale,i=new gS,n=typeof e=="string"?JSON.parse(e):e,r=n.skeleton;if(r&&(i.hash=r.hash,i.version=r.spine,i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height,i.referenceScale=se(r,"referenceScale",100)*t,i.fps=r.fps,i.imagesPath=r.images??null,i.audioPath=r.audio??null),n.bones)for(let a=0;a0&&l.properties.push(T)}l.offsets[Gt.ROTATION]=se(a,"rotation",0),l.offsets[Gt.X]=se(a,"x",0)*t,l.offsets[Gt.Y]=se(a,"y",0)*t,l.offsets[Gt.SCALEX]=se(a,"scaleX",0),l.offsets[Gt.SCALEY]=se(a,"scaleY",0),l.offsets[Gt.SHEARY]=se(a,"shearY",0);const y=l.setupPose;d&&(y.mixRotate=se(a,"mixRotate",1)),f&&(y.mixX=se(a,"mixX",1)),p&&(y.mixY=se(a,"mixY",y.mixX)),m&&(y.mixScaleX=se(a,"mixScaleX",1)),g&&(y.mixScaleY=se(a,"mixScaleY",y.mixScaleX)),v&&(y.mixShearY=se(a,"mixShearY",1)),i.constraints.push(l);break}case"path":{const l=new eh(o);l.skinRequired=h;for(let f=0;f0){const d=i.findConstraint(l,th);if(!d)throw new Error(`Physics constraint not found: ${l}`);u=i.constraints.indexOf(d)}for(const d in c){const f=c[d];let p=f[0];if(!p)continue;const m=f.length;let g,v=0;if(d==="reset"){const b=new jh(m,u);for(let y=0;p!=null;p=f[y+1],y++)b.setFrame(y,se(p,"time",0));r.push(b);continue}switch(d){case"inertia":g=new nS(m,m,u);break;case"strength":g=new rS(m,m,u);break;case"damping":g=new aS(m,m,u);break;case"mass":g=new oS(m,m,u);break;case"wind":g=new lS(m,m,u);break;case"gravity":g=new cS(m,m,u);break;case"mix":{v=1,g=new hS(m,m,u);break}default:continue}Ss(r,f,g,v,1)}}if(e.slider)for(const l in e.slider){const c=e.slider[l],u=i.findConstraint(l,ba);if(!u)throw new Error(`Slider not found: ${l}`);const d=i.constraints.indexOf(u);for(const f in c){const p=c[f];if(!p[0])continue;const g=p.length;switch(f){case"time":Ss(r,p,new uS(g,g,d),1,1);break;case"mix":Ss(r,p,new dS(g,g,d),1,1);break}}}if(e.attachments)for(const l in e.attachments){const c=e.attachments[l],u=i.findSkin(l);if(!u)throw new Error(`Skin not found: ${l}`);for(const d in c){const f=c[d],p=i.findSlot(d);if(!p)throw new Error(`Attachment slot not found: ${d}`);const m=p.index;for(const g in f){const v=f[g],b=u.getAttachment(m,g);if(!b)throw new Error(`Timeline attachment not found: ${g}`);for(const y in v){const w=v[y];let A=w[0];if(A){if(y==="deform"){const T=b.bones,_=b.vertices,R=T?_.length/3*2:_.length,P=new Jw(w.length,w.length,m,b);let F=se(A,"time",0);for(let I=0,k=0;;I++){let B;const D=se(A,"vertices",null);if(!D)B=T?ct.newFloatArray(R):_;else{B=ct.newFloatArray(R);const O=se(A,"offset",0);if(ct.arrayCopy(D,0,B,O,D.length),n!==1)for(let X=O,E=X+D.length;X=0;l--)r[l]===-1&&(r[l]=a[--h]);return r}function Nt(s,e,t,i,n,r,a,o,h,l){if(s==="stepped")return e.setStepped(i),t;const c=n<<2,u=s[c],d=s[c+1]*l,f=s[c+2],p=s[c+3]*l;return e.setBezier(t,i,n,r,o,u,d,f,p,a,h),t+1}function se(s,e,t){return s[e]!==void 0?s[e]:t}class AB{newRegionAttachment(e,t,i,n){return new Eu(t,i)}newMeshAttachment(e,t,i,n){return new Zl(t,i)}newBoundingBoxAttachment(e,t){return new Q1(t)}newPathAttachment(e,t){return new Nl(t)}newPointAttachment(e,t){return new rw(t)}newClippingAttachment(e,t){return new _o(t)}}class EB{sequence(e){for(let t=0;t!Number.isInteger(c)||c<0||c>=a))throw new Error(`拖尾网格“${e}”的三角形索引越界`);const o=Number(s.hull)||0;if(!Number.isInteger(o)||o<0||o>a)throw new Error(`拖尾网格“${e}”的外轮廓数量无效`);if(Array.isArray(s.edges)&&s.edges.some(c=>!Number.isInteger(c)||c<0||c>=a*2||c%2))throw new Error(`拖尾网格“${e}”的外轮廓边索引越界`);if(n.length===i.length)return;let h=0,l=0;for(;h=t)throw new Error(`拖尾网格“${e}”引用了不存在的骨骼`);if(![p,m,g].every(Number.isFinite)||g<0)throw new Error(`拖尾网格“${e}”包含无效权重数据`);u+=g}if(Math.abs(u-1)>.001)throw new Error(`拖尾网格“${e}”的顶点权重之和不为 1`);l++}if(h!==n.length||l!==a)throw new Error(`拖尾网格“${e}”的顶点数量与 UV 不一致`)}function RB(s,e){var r,a,o,h;const t=Array.isArray(s.bones)?s.bones:[],i=new Map(t.map(l=>[String(l.name||""),l])),n=new Set;for(const l of t){if(l.inherit!=null&&!CB.has(l.inherit))throw new Error(`骨骼“${l.name||""}”的 inherit 值“${l.inherit}”不符合 Spine ${e} JSON 格式`);if(/_particle_\d+_trail_/.test(String(l.name||""))){const c=i.get(String(l.parent||""));if(!c||/_particle_\d+_trail_/.test(String(c.name||"")))throw new Error(`拖尾骨骼“${l.name||""}”必须直接挂在粒子系统骨骼下,不能组成骨骼链`)}}for(const l of Array.isArray(s.skins)?s.skins:[]){const c=(l==null?void 0:l.attachments)||{};for(const u of Object.keys(c))for(const d of Object.keys(c[u]||{})){const f=c[u][d];(f==null?void 0:f.type)==="mesh"&&(IB(f,d,t.length),((r=f.vertices)==null?void 0:r.length)!==((a=f.uvs)==null?void 0:a.length)&&n.add(u))}}for(const l of Object.values(s.animations||{}))for(const c of n){const u=(h=(o=l==null?void 0:l.slots)==null?void 0:o[c])==null?void 0:h.attachment;if(Array.isArray(u)&&u.some(d=>!(d!=null&&d.name)))throw new Error(`加权拖尾插槽“${c}”不能使用空附件,未出现或死亡阶段应将对应骨骼缩放设为 0`)}}function PB(s){var e;if(String(((e=s==null?void 0:s.skeleton)==null?void 0:e.spine)||"")!=="3.8")throw new Error("Spine 3.8 导出的版本标识必须为 3.8");for(const t of s.bones||[])if(t.inherit!=null)throw new Error(`Spine 3.8 骨骼“${t.name||""}”应使用 transform,不能使用 inherit`);for(const t of Object.values(s.animations||{})){for(const n of Object.values(t.slots||{})){if(n.rgba||n.rgba2)throw new Error("Spine 3.8 插槽颜色时间轴必须使用 color / twoColor");for(const r of n.attachment||[])if(!Object.prototype.hasOwnProperty.call(r,"name"))throw new Error("Spine 3.8 附件时间轴的隐藏帧必须显式写入 name: null")}for(const n of Object.values(t.bones||{}))for(const r of n.rotate||[])if(r.value!=null||r.angle==null)throw new Error("Spine 3.8 旋转时间轴必须使用 angle");const i=[t];for(;i.length;){const n=i.pop();if(!(!n||typeof n!="object")){if(!Array.isArray(n)&&Array.isArray(n.curve))throw new Error("Spine 3.8 不支持 4.x 数组曲线格式");i.push(...Object.values(n))}}}}function vy(s,e){var a;const t=JSON.parse(s),i=Ph((a=t==null?void 0:t.skeleton)==null?void 0:a.spine);if(!i)throw new Error(`导出版本不受支持,仅支持 Spine ${Mm()}`);if(e&&i!==e)throw new Error(`导出版本不一致:设置为 Spine ${e},JSON 标记为 Spine ${i}`);RB(t,i),i==="3.8"&&PB(t);const n=i==="3.8"?yw(JSON.parse(JSON.stringify(t))):t,r=i==="4.3"?new _B(new EB).readSkeletonData(n):new Dh(new AB).readSkeletonData(n);if(!r.bones.length)throw new Error("导出结果缺少骨骼");return{version:i,bones:r.bones.length,slots:r.slots.length,animations:r.animations.length}}const _S="http://127.0.0.1:27843";class zh extends Error{constructor(t,i="CONNECTOR_ERROR",n){super(t);x(this,"code");x(this,"pairUrl");this.name="SpineConnectorError",this.code=i,this.pairUrl=n}}function zm(s,e){return String(s||"").trim().replace(/[\\/:*?"<>|]+/g,"_").replace(/^\.+/,"")||e}function kB(s,e){const t=/\.([a-z0-9]{2,5})$/i.exec(s);return t?`.${t[1].toLowerCase()}`:e.includes("jpeg")?".jpg":e.includes("webp")?".webp":e.includes("gif")?".gif":".png"}function FB(s,e,t){const i=String(s||"").replace(/\\/g,"/").split("/").filter(Boolean).map(r=>zm(r,"images")),n=zm(e.replace(/\.[^./\\]+$/,""),"image");return[...i,`${n}${kB(e,t)}`].join("/")}async function Ef(s,e,t){if(!s)return null;const i=await fetch(s);if(!i.ok)throw new Error(`无法读取导出图片:${t}`);const n=await i.blob(),r=new Uint8Array(await n.arrayBuffer());let a="";const o=32768;for(let h=0;ha.finally(()=>{i++,e==null||e(i,t.length)});for(const a of s.filter(o=>o.visible!==!1)){for(const o of a.config.imageResources)if(o.imageMode==="sequence"&&o.sequenceFrames.length)for(const h of o.sequenceFrames)t.push(n(Ef(h.previewUrl,o.textureFolder,h.name||o.textureName)));else t.push(n(Ef(o.previewUrl,o.textureFolder,o.textureName)));if(a.config.trail)for(const o of a.config.trailResources)t.push(n(Ef(o.previewUrl,"",o.textureName)))}const r=new Map;for(const a of await Promise.all(t))a&&!r.has(a.path)&&r.set(a.path,a);return[...r.values()]}async function OB(){try{const s=await fetch(`${_S}/v1/health`,{cache:"no-store"});if(!s.ok)throw new Error(`HTTP ${s.status}`);return{available:!0,...await s.json()}}catch(s){return{available:!1,authorized:!1,error:s instanceof Error?s.message:String(s)}}}async function BB(s,e){const t=await TS(s.systems,(n,r)=>{e==null||e({phase:"images",progress:r?n/r:1})}),i=JSON.stringify({schemaVersion:1,projectName:s.projectName,spineVersion:s.spineVersion,skeletonJson:s.skeletonJson,images:t});return new Promise((n,r)=>{const a=new XMLHttpRequest;a.open("POST",`${_S}/v1/convert`),a.responseType="blob",a.setRequestHeader("Content-Type","application/json"),a.upload.onprogress=o=>{e==null||e({phase:"upload",progress:o.lengthComputable&&o.total>0?o.loaded/o.total:null})},a.upload.onloadend=()=>e==null?void 0:e({phase:"processing",progress:null}),a.onprogress=o=>{e==null||e({phase:"download",progress:o.lengthComputable&&o.total>0?o.loaded/o.total:null})},a.onerror=()=>r(new zh("未检测到本地 Spine 连接器,请先启动连接器","CONNECTOR_OFFLINE")),a.onload=async()=>{const o=a.response;if(a.status<200||a.status>=300){let c={};try{c=JSON.parse(await o.text())}catch{}r(new zh(c.message||`Spine 连接器返回错误:HTTP ${a.status}`,c.code,c.pairUrl));return}const h=a.getResponseHeader("X-Spine-File-Name");let l=`${zm(s.projectName,"SpineParticle")}.zip`;if(h)try{l=decodeURIComponent(h)}catch{}n({blob:o,fileName:l,spineEditorVersion:a.getResponseHeader("X-Spine-Editor-Version")||s.spineVersion,imageCount:t.length})},a.send(i)})}function LB(s,e){const t=URL.createObjectURL(s),i=document.createElement("a");i.href=t,i.download=/\.zip$/i.test(e)?e:`${e}.zip`,i.style.display="none",document.body.appendChild(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(t),1e3)}const DB=Array.from({length:256},(s,e)=>{let t=e;for(let i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;return t>>>0});function NB(s){let e=4294967295;for(const t of s)e=DB[(e^t)&255]^e>>>8;return(e^4294967295)>>>0}function UB(s){const e=String(s||"").replace(/\\/g,"/").split("/").filter(t=>t&&t!==".");if(!e.length||e.some(t=>t===".."))throw new Error("ZIP 文件路径无效");return e.join("/")}function XB(s=new Date){const e=Math.max(1980,s.getFullYear());return{time:s.getHours()<<11|s.getMinutes()<<5|Math.floor(s.getSeconds()/2),date:e-1980<<9|s.getMonth()+1<<5|s.getDate()}}function Cf(s){const e=new Uint8Array(s);return{bytes:e,view:new DataView(e.buffer)}}function yy(s){const e=new Uint8Array(s.reduce((i,n)=>i+n.length,0));let t=0;for(const i of s)e.set(i,t),t+=i.length;return e}function VB(s){const e=new TextEncoder,t=[],i=[],n=XB();let r=0;for(const h of s){const l=e.encode(UB(h.name)),c=NB(h.data),u=Cf(30);u.view.setUint32(0,67324752,!0),u.view.setUint16(4,20,!0),u.view.setUint16(6,2048,!0),u.view.setUint16(10,n.time,!0),u.view.setUint16(12,n.date,!0),u.view.setUint32(14,c,!0),u.view.setUint32(18,h.data.length,!0),u.view.setUint32(22,h.data.length,!0),u.view.setUint16(26,l.length,!0),t.push(u.bytes,l,h.data);const d=Cf(46);d.view.setUint32(0,33639248,!0),d.view.setUint16(4,20,!0),d.view.setUint16(6,20,!0),d.view.setUint16(8,2048,!0),d.view.setUint16(12,n.time,!0),d.view.setUint16(14,n.date,!0),d.view.setUint32(16,c,!0),d.view.setUint32(20,h.data.length,!0),d.view.setUint32(24,h.data.length,!0),d.view.setUint16(28,l.length,!0),d.view.setUint32(42,r,!0),i.push(d.bytes,l),r+=u.bytes.length+l.length+h.data.length}const a=yy(i),o=Cf(22);return o.view.setUint32(0,101010256,!0),o.view.setUint16(8,s.length,!0),o.view.setUint16(10,s.length,!0),o.view.setUint32(12,a.length,!0),o.view.setUint32(16,r,!0),new Blob([yy([...t,a,o.bytes])],{type:"application/zip"})}function YB(s){const e=atob(s),t=new Uint8Array(e.length);for(let i=0;ii===".."||/^[a-z]+:/i.test(i))?"images":t.join("/")}function GB(s){return String(s||"SpineParticle").replace(/\.json$/i,"").replace(/[\\/:*?"<>|]+/g,"_").replace(/^\.+/,"")||"SpineParticle"}async function HB(s){const e=await TS(s.systems);if(!e.length)throw new Error("当前可见粒子系统没有可导出的图片");const t=$B(s.imagesPath);return{blob:VB(e.map(n=>({name:`${t}/${n.path}`,data:YB(n.dataBase64)}))),imageCount:e.length,folder:t}}function jB(s,e){const t=`${GB(e)}-images.zip`,i=URL.createObjectURL(s),n=document.createElement("a");return n.href=i,n.download=t,n.style.display="none",document.body.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(i),1e3),t}const WB={class:"panel"},zB={class:"panel-scroll"},qB={class:"group config-management"},KB={class:"caret"},ZB={class:"group-body config-management-body"},JB={class:"config-toolbar"},QB=["disabled"],eL={value:""},tL=["value"],iL={class:"group"},sL={class:"caret"},nL={class:"scene-actions"},rL=["disabled"],aL={class:"group-body"},oL={class:"tree scene-tree"},lL=["onClick"],cL={class:"tlabel"},hL=["title","aria-label","onClick"],uL={viewBox:"0 0 24 24","aria-hidden":"true"},dL={key:0,class:"eye-slash",d:"M4 4l16 16"},fL=["onClick"],mL=["onClick"],pL={class:"tlabel"},gL=["title","aria-label","onClick"],vL={viewBox:"0 0 24 24","aria-hidden":"true"},yL={key:0,class:"eye-slash",d:"M4 4l16 16"},xL=["onClick"],bL=["onClick"],wL={class:"tlabel"},SL=["title","aria-label","onClick"],ML={viewBox:"0 0 24 24","aria-hidden":"true"},_L={key:0,class:"eye-slash",d:"M4 4l16 16"},TL=["onClick"],AL=["onClick"],EL={class:"tlabel"},CL=["title","aria-label","onClick"],IL={viewBox:"0 0 24 24","aria-hidden":"true"},RL={key:0,class:"eye-slash",d:"M4 4l16 16"},PL=["onClick"],kL={key:0,class:"empty"},FL={class:"row"},OL={class:"seed-row scene-seed"},BL={class:"field-block"},LL={class:"field-grid"},DL={class:"field-block"},NL={class:"field-block check-field"},UL={class:"field-grid"},XL={class:"compact-field"},VL={class:"compact-field"},YL={class:"field-grid"},$L={class:"compact-field"},GL={class:"compact-field"},HL={key:1,class:"field-grid"},jL={class:"compact-field"},WL={class:"compact-field"},zL={key:2,class:"field-grid"},qL={class:"compact-field"},KL={class:"compact-field"},ZL={class:"field-block"},JL={key:4,class:"field-grid"},QL={class:"compact-field"},eD={class:"compact-field"},tD={class:"collider-follow-section"},iD={class:"follow-path"},sD={class:"field-block"},nD=["value"],rD={class:"field-grid"},aD={class:"compact-field"},oD={class:"compact-field"},lD={class:"follow-path"},cD={class:"field-block"},hD={class:"field-grid"},uD={class:"compact-field"},dD={class:"compact-field"},fD={class:"field-grid"},mD={class:"compact-field"},pD={class:"compact-field"},gD={class:"setting-line"},vD={class:"setting-line"},yD={class:"field-block"},xD={key:4,class:"panel-hint"},bD={class:"group"},wD={class:"caret"},SD={class:"group-body"},MD={class:"segs"},_D={class:"segs stream-behavior-segs"},TD={key:2,class:"stream-loop-options"},AD={class:"loop-section-row"},ED={class:"switch-row"},CD=["checked"],ID={key:0,class:"loop-duration-control"},RD={class:"switch-row loop-duration-toggle"},PD=["checked"],kD={class:"loop-section-duration"},FD=["value"],OD={key:1},BD={key:2,class:"loop-auto-duration"},LD={class:"loop-section-row"},DD={class:"switch-row"},ND=["checked"],UD={key:0,class:"loop-duration-control"},XD={class:"switch-row loop-duration-toggle"},VD=["checked"],YD={class:"loop-section-duration"},$D=["value"],GD={key:1},HD={key:2,class:"loop-auto-duration"},jD={key:3,class:"modifier-hint stream-loop-hint"},WD={class:"group"},zD={class:"caret"},qD={class:"group-body"},KD={class:"row"},ZD={class:"row"},JD=["value","disabled"],QD={key:0,class:"row"},eN={class:"row"},tN={key:0,value:"radial"},iN={key:1,value:"path-normal"},sN={key:2,value:"path-tangent"},nN={class:"group"},rN={class:"caret"},aN={class:"group-body attr-body"},oN={class:"attr-axis-head"},lN={class:"axis-modes"},cN={class:"life-item"},hN={class:"switch-row"},uN={class:"life-item"},dN={class:"switch-row"},fN={class:"axis-modes life-axis"},mN={class:"life-item"},pN={class:"switch-row"},gN={class:"group"},vN={class:"caret"},yN={class:"group-body"},xN={class:"seg"},bN={class:"row"},wN={class:"curve-wrap"},SN={class:"row"},MN=["onUpdate:modelValue"],_N=["onUpdate:modelValue"],TN={class:"row resource-color-row"},AN=["onUpdate:modelValue"],EN=["onUpdate:modelValue"],CN={key:0,class:"row resource-color-picker"},IN=["onUpdate:modelValue"],RN=["value","onChange","onKeydown"],PN={key:0,class:"random-color-hint"},kN={class:"resource-alpha-head"},FN={class:"alpha-modes"},ON=["onClick"],BN=["onClick"],LN=["onClick"],DN={class:"row"},NN=["onUpdate:modelValue"],UN={class:"resource-alpha-curve"},XN={class:"group"},VN={class:"caret"},YN={class:"group-body"},$N={class:"modifier-item"},GN={class:"switch-row modifier-switch"},HN={key:0,class:"modifier-params"},jN={class:"modifier-item"},WN={class:"switch-row modifier-switch"},zN={key:0,class:"modifier-params gravity-params"},qN={class:"modifier-mode-row"},KN={class:"modifier-item"},ZN={class:"switch-row modifier-switch"},JN={key:0,class:"modifier-params gravity-params"},QN={class:"modifier-mode-row"},e4={class:"modifier-item"},t4={class:"switch-row modifier-switch"},i4={key:0,class:"modifier-params"},s4={class:"row"},n4={class:"modifier-item"},r4={class:"switch-row modifier-switch"},a4={key:0,class:"modifier-params"},o4={class:"row"},l4={class:"row"},c4={class:"modifier-item"},h4={class:"switch-row modifier-switch"},u4={key:0,class:"modifier-params trail-params"},d4={class:"row"},f4=["onUpdate:modelValue"],m4={class:"row"},p4=["onUpdate:modelValue"],g4={class:"row"},v4=["onUpdate:modelValue"],y4={class:"switch-row trail-sub-switch"},x4=["onUpdate:modelValue"],b4={class:"switch-row trail-sub-switch"},w4=["onUpdate:modelValue"],S4={class:"trail-mode-head"},M4={class:"alpha-modes"},_4=["onClick"],T4=["onClick"],A4=["onClick"],E4={class:"row"},C4=["onUpdate:modelValue"],I4={key:6,class:"row trail-fixed-color"},R4=["onUpdate:modelValue"],P4=["value","onChange","onKeydown"],k4={class:"trail-mode-head"},F4={class:"alpha-modes"},O4=["onClick"],B4=["onClick"],L4=["onClick"],D4={class:"trail-grid-row"},N4={class:"modifier-item"},U4={class:"switch-row modifier-switch"},X4=["disabled"],V4={key:0,class:"modifier-params emitter-follow-params"},Y4={class:"field-block"},$4=["value"],G4={key:0,value:"bone"},H4={class:"field-block"},j4=["value"],W4={class:"field-block"},z4={class:"field-grid follow-grid"},q4={class:"compact-field"},K4={class:"compact-field"},Z4={class:"field-block"},J4={key:0,class:"bone-follow-target"},Q4={key:1,class:"bone-follow-missing"},e5={class:"field-block"},t5={class:"field-grid follow-grid"},i5={class:"compact-field"},s5={class:"compact-field"},n5={class:"bone-follow-transform-grid"},r5={class:"compact-field"},a5={class:"compact-field"},o5={class:"compact-field"},l5={class:"modifier-item"},c5={class:"switch-row modifier-switch"},h5={key:0,class:"modifier-params collision-filter-params"},u5={class:"collision-filter-tags"},d5=["title"],f5=["aria-label","onClick"],m5=["disabled","title"],p5={key:0,class:"collision-filter-empty"},g5={key:1,class:"collision-filter-picker"},v5=["onClick"],y5={class:"group"},x5={class:"caret"},b5={class:"group-body export-settings"},w5={class:"export-field"},S5={class:"export-field"},M5={class:"export-field"},_5={key:0,class:"export-help"},T5={class:"export-fps-row"},A5={class:"export-field export-fps-field"},E5={class:"export-checkbox"},C5={class:"export-switches"},I5={class:"switch-row export-switch"},R5={class:"switch-row export-switch"},P5={class:"switch-row export-switch export-switch-last"},k5={class:"spine-export-actions"},F5=["disabled","title"],O5=["disabled"],B5=["disabled","title"],L5={key:0},D5=["href"],N5=["href"],U5=$s({__name:"ParticlePanel",setup(s){const e=Kl();e.settings.exportSettings=m1(e.settings.exportSettings);const t=vt(()=>e.settings.exportSettings),i=lt(null),n=lt(""),r=lt([]),a=lt(!1),o=lt(""),h=lt(!1),l=lt(!1),c=lt(null),u=lt(""),d=lt(!1),f=lt(null),p=lt(""),m=lt(""),g=vt(()=>{const $=f.value;return $?$.available?$.spineFound?$.authorized?"连接器可用 · Spine 已就绪":"连接器已启动,当前网站尚未授权":"连接器已启动,但未找到 Spine":"本地 Spine 连接器未启动":"正在检测本地 Spine 连接器…"}),v=vt(()=>{var $,S,C,Q,Re,mt;return{ready:!!(($=f.value)!=null&&$.available)&&!!((S=f.value)!=null&&S.spineFound)&&!!((C=f.value)!=null&&C.authorized),warning:!!((Q=f.value)!=null&&Q.available)&&(!((Re=f.value)!=null&&Re.spineFound)||!((mt=f.value)!=null&&mt.authorized))}}),b=vt(()=>{var $,S,C;return!!(($=f.value)!=null&&$.available)&&!!((S=f.value)!=null&&S.spineFound)&&!!((C=f.value)!=null&&C.authorized)}),y=vt(()=>{const $=f.value;return!($!=null&&$.available)||!$.spineFound||$.authorized||typeof window>"u"?"":`http://127.0.0.1:27843/pair?origin=${encodeURIComponent(window.location.origin)}`}),w=vt(()=>{const $=f.value;return $?$.available?$.spineFound?$.authorized?"":"未授权":"未找到 Spine":"未启动":"检测中"}),A=vt(()=>l.value?"正在重新计算并生成 Spine 工程":w.value?`暂不可用:${w.value}`:`调用本机 Spine 自动生成 ${t.value.spineVersion} 工程`);function T($){return $==="跟随导出"?t.value.keyframeCurve==="bezier"?"bezier":"linear":$==="贝塞尔"?"bezier":"linear"}e.systems.length||e.addSystem();function _(){_w(e),h.value=!1,o.value="配置已保存到本地"}async function R($){var Q;const S=$.target,C=(Q=S.files)==null?void 0:Q[0];if(C){o.value="正在加载配置…",h.value=!1;try{await XP(e,C),o.value=`已加载:${C.name}`}catch(Re){h.value=!0,o.value=Re instanceof Error?Re.message:String(Re)}finally{S.value=""}}}async function P(){try{const $=await fetch(`/Preset/index.json?t=${Date.now()}`,{cache:"no-store"});if(!$.ok)throw new Error("无法读取预设列表");const S=await $.json();r.value=Array.isArray(S)?S.filter(C=>!!C&&typeof C.name=="string"&&typeof C.file=="string"):[]}catch{r.value=[]}}async function F(){const $=n.value;if(!$)return;a.value=!0,h.value=!1,o.value="正在加载预设…";const S=qv("加载预设",`正在下载 ${$}…`);try{await S.paint();const C=await fetch(`/Preset/${encodeURIComponent($)}`,{cache:"no-store"});if(!C.ok)throw new Error(`无法读取预设:${$}`);const Q=await Z3(C,Re=>{S.update(Re==null?null:Re*55,`正在下载 ${$}…`)});S.update(58,"正在解析预设配置…"),S.update(70,"正在解析并恢复预设资源…"),await Aw(e,Q),o.value=`已加载预设:${$.replace(/\.json$/i,"")}`,await S.finish("预设加载完成")}catch(C){h.value=!0;const Q=C instanceof Error?C.message:String(C);o.value=`${Q},请检查预设文件命名`,await S.fail(Q)}finally{a.value=!1,n.value=""}}Kr(()=>{P(),B(),I=window.setInterval(B,3e3)});let I,k=0;$l(()=>{I!==void 0&&window.clearInterval(I)});async function B(){const $=++k,S=await OB();if($!==k)return;f.value=S;const C=m.value;(C==="CONNECTOR_OFFLINE"?S.available:C==="SPINE_NOT_FOUND"?S.available&&S.spineFound:C==="ORIGIN_NOT_ALLOWED"?S.available&&S.spineFound&&S.authorized:!!C&&S.available&&S.spineFound&&S.authorized)&&(m.value="",p.value="",d.value&&(d.value=!1,u.value=""))}function D(){return new Promise($=>requestAnimationFrame(()=>$()))}async function U($){e.timeline.playing=!1,e.timeline.frame=0,e.timeline.recorded=!1;for(const Q of e.systems)Q.frames=void 0;e.recalcTotalFrames(),await D(),e.timeline.playing=!0;const S=e.timeline.totalFrames/Math.max(1,e.timeline.fps)*1e3,C=performance.now()+Math.max(8e3,S*2.5+3e3);for(;!e.timeline.recorded;){if(performance.now()>C)throw new Error("重新计算动画超时,请确认页面仍在运行后重试");$==null||$(Math.min(.98,e.timeline.frame/Math.max(1,e.timeline.totalFrames-1))),await new Promise(Q=>setTimeout(Q,50))}$==null||$(1)}async function L(){if(!l.value){l.value=!0,c.value="json",d.value=!1,m.value="",p.value="",u.value="正在重新计算粒子动画…";try{await U();const $=ry({systems:e.systems,timeline:e.timeline,settings:t.value});vy($.text,t.value.spineVersion),MO($,t.value.fileName);const S=$.warnings.length?`;${$.warnings.length} 条资源提示(缺图仍已导出)`:"";u.value=`已导出 Spine ${t.value.spineVersion}:${$.particleSystemCount} 个粒子系统、${$.animationCount} 个动画、${$.boneCount} 根骨骼${S}`}catch($){d.value=!0,u.value=$ instanceof Error?$.message:String($)}finally{l.value=!1,c.value=null}}}async function N(){if(l.value)return;l.value=!0,c.value="spine",d.value=!1,m.value="",p.value="",u.value="正在重新计算粒子动画…";const $=qv("导出 Spine 包","正在重新计算粒子动画…");try{await $.paint(),await U(Re=>$.update(Re*18,"正在重新计算粒子动画…")),$.update(20,"正在生成 Spine JSON…");const S=ry({systems:e.systems,timeline:e.timeline,settings:t.value});vy(S.text,t.value.spineVersion),u.value="正在整理图片并调用本机 Spine…";const C=t.value.fileName.replace(/\.json$/i,"")||"SpineParticle",Q=await BB({projectName:C,spineVersion:t.value.spineVersion,skeletonJson:S.text,systems:e.systems},({phase:Re,progress:mt})=>{Re==="images"?$.update(mt==null?null:22+mt*18,"正在整理工程图片…"):Re==="upload"?$.update(mt==null?null:40+mt*30,"正在上传数据到 Spine 连接器…"):Re==="processing"?$.update(null,"Spine 正在转换工程,请稍候…"):$.update(mt==null?null:82+mt*16,"正在下载生成的 Spine 工程包…")});$.update(99,"正在交给浏览器下载…"),LB(Q.blob,Q.fileName),u.value=`已生成 ${Q.fileName}:包含 .spine 工程和 ${Q.imageCount} 张图片,Spine ${Q.spineEditorVersion}`,await B(),await $.finish("Spine 工程包已开始下载")}catch(S){const C=S instanceof Error?S.message:String(S);d.value=!0,m.value=S instanceof zh?S.code:"",S instanceof zh&&S.pairUrl&&(p.value=S.pairUrl),u.value=C,await B(),await $.fail(C)}finally{l.value=!1,c.value=null}}async function O(){if(!l.value){l.value=!0,c.value="images",d.value=!1,m.value="",p.value="",u.value="正在整理当前粒子系统使用的图片…";try{const $=await HB({systems:e.systems,imagesPath:t.value.imagesPath}),S=jB($.blob,t.value.fileName);u.value=`已生成 ${S}:${$.folder}/ 内包含 ${$.imageCount} 张图片`}catch($){d.value=!0,u.value=$ instanceof Error?$.message:String($)}finally{l.value=!1,c.value=null}}}const X=vt(()=>{const $=e.systems.findIndex(S=>S.id===e.activeId);return $>=0?$:0}),E=vt(()=>e.systems[X.value]||null),V=vt(()=>E.value?p1(E.value.config,e.timeline.fps):30),q=vt(()=>{var S;const $=(S=E.value)==null?void 0:S.config;return $?Math.max(1,Math.ceil(Number($.loopDurationFrames)||1)):1}),W=vt(()=>e.activeObjectType),J=vt(()=>e.activeObjectType==="collision"&&e.colliders.find($=>$.id===e.activeObjectId)||null),K=vt(()=>e.activeObjectType==="path"&&e.paths.find($=>$.id===e.activeObjectId)||null),fe=vt(()=>e.activeObjectType==="spine"&&e.spines.find($=>$.id===e.activeObjectId)||null),me=vt(()=>e.activeObjectType==="particle"?e.systems.some($=>$.id===e.activeObjectId):e.activeObjectType==="collision"?e.colliders.some($=>$.id===e.activeObjectId):e.activeObjectType==="path"?e.paths.some($=>$.id===e.activeObjectId):e.spines.some($=>$.id===e.activeObjectId)),we=vt(()=>{const $=e.spines.find(S=>S.selectedBone&&S.bones.some(C=>C.name===S.selectedBone));return $?{spine:$,boneName:$.selectedBone}:null}),Ee=vt(()=>{var C;const $=(C=E.value)==null?void 0:C.config;if(!$||$.emitterFollowMode!=="bone")return null;const S=e.spines.find(Q=>Q.id===$.emitterFollowSpineId);return!S||!S.bones.some(Q=>Q.name===$.emitterFollowBoneName)?null:{spine:S,boneName:$.emitterFollowBoneName}}),pe=lt(!1),Ae=vt(()=>{var S;const $=new Set(((S=E.value)==null?void 0:S.config.collisionColliderIds)||[]);return e.colliders.filter(C=>$.has(C.id))}),G=vt(()=>{var S;const $=new Set(((S=E.value)==null?void 0:S.config.collisionColliderIds)||[]);return e.colliders.filter(C=>!$.has(C.id))});fs(()=>{var $,S;return[($=E.value)==null?void 0:$.id,(S=E.value)==null?void 0:S.config.collision]},()=>{pe.value=!1});function Z($){var C;const S=(C=E.value)==null?void 0:C.config;!S||S.collisionColliderIds.includes($)||(S.collisionColliderIds.push($),pe.value=!1)}function z($){var C;const S=(C=E.value)==null?void 0:C.config;S&&(S.collisionColliderIds=S.collisionColliderIds.filter(Q=>Q!==$))}Jo(()=>{for(const $ of e.systems)$.visible==null&&($.visible=!0);for(const $ of e.colliders)$.visible==null&&($.visible=!0);for(const $ of e.paths)$.visible==null&&($.visible=!0);for(const $ of e.spines)$.visible==null&&($.visible=!0)}),Jo(()=>{if(!E.value)return;const $=Wr(E.value.config);$.lifeMode==="curve"&&($.lifeMode="random"),$.speedMode==="curve"&&($.speedMode="random"),$.scaleMode==="curve"&&($.scaleMode="random"),$.initialRotationMode==="curve"&&($.initialRotationMode="random"),$.mode==="stream"&&!($.duration>0)&&($.duration=1),$.streamBehavior==="loop"&&($.emitterFollow||$.emitterFollowMode!=="none")&&st($)}),Jo(()=>{const $=new Set(e.colliders.map(S=>S.id));for(const S of e.systems){const C=Wr(S.config),Q=C.collisionColliderIds.filter(ut=>$.has(ut));if(Q.length!==C.collisionColliderIds.length&&(C.collisionColliderIds=Q),C.spawnPathId>0&&!e.paths.some(ut=>ut.id===C.spawnPathId)&&(C.spawnPathId=0,(C.emissionAngleMode==="path-normal"||C.emissionAngleMode==="path-tangent")&&(C.emissionAngleMode="fixed")),C.emitterFollowMode!=="bone")continue;const Re=e.spines.find(ut=>ut.id===C.emitterFollowSpineId);!!(Re!=null&&Re.bones.some(ut=>ut.name===C.emitterFollowBoneName))||(C.emitterFollowMode="none",C.emitterFollowSpineId=0,C.emitterFollowBoneName="")}}),Jo(()=>{for(const $ of e.colliders)$.followPathId==null&&($.followPathId=0),$.followDuration>0||($.followDuration=2),$.followPathRotation==null&&($.followPathRotation=!1),["跟随导出","线性","贝塞尔"].includes($.followCurveMode)||($.followCurveMode="跟随导出"),(!Array.isArray($.followCurve)||$.followCurve.length<2)&&($.followCurve=[{x:0,y:0},{x:1,y:1}])});const j=[{x:0,y:0},{x:1,y:1}],te=[{x:0,y:1},{x:1,y:1}],he=[{x:0,y:0},{x:.2,y:1},{x:.8,y:1},{x:1,y:0}],xe=[{x:0,y:0},{x:.1,y:1},{x:.9,y:1},{x:1,y:0}],oe=[{x:0,y:1},{x:1,y:1}],ge=[{x:0,y:1},{x:1,y:1}],le=Da({config:!0,scene:!1,emitMode:!0,shape:!0,attr:!0,look:!0,mods:!0,export:!1});function Oe($){le[$]=!le[$]}function Fe($){var C;const S=(C=E.value)==null?void 0:C.config;S&&(S.mode=$,$==="stream"&&!(S.duration>0)&&(S.duration=1))}function Be($){var Q;const S=(Q=E.value)==null?void 0:Q.config;if(!S)return;const C=Math.min(1800,Math.max(1,Math.ceil(Number($)||1)));S.loopDurationFrames=C}function st($){const S=Dl();$.emitterFollow=!1,$.emitterFollowMode="none",$.emitterFollowPathId=S.emitterFollowPathId,$.emitterFollowSpineId=S.emitterFollowSpineId,$.emitterFollowBoneName=S.emitterFollowBoneName,$.emitterFollowBoneOffsetX=S.emitterFollowBoneOffsetX,$.emitterFollowBoneOffsetY=S.emitterFollowBoneOffsetY,$.emitterFollowBoneRotation=S.emitterFollowBoneRotation,$.emitterFollowBoneScaleX=S.emitterFollowBoneScaleX,$.emitterFollowBoneScaleY=S.emitterFollowBoneScaleY,$.emitterAngleMode=S.emitterAngleMode,$.emitterFollowCurve=S.emitterFollowCurve.map(C=>({...C})),$.emitterFollowDuration=S.emitterFollowDuration,$.emitterFollowSpace=S.emitterFollowSpace,$.emitterFollowDirection=S.emitterFollowDirection,$.emitterFollowOffset=S.emitterFollowOffset}function St($){var Re;const S=(Re=E.value)==null?void 0:Re.config;if(!S||S.streamBehavior===$)return;const C=$==="loop",Q=C?"进入循环持续模式后,粒子跟随设置会失效并恢复默认值。是否继续?":"退出循环持续模式后,粒子跟随设置会失效并恢复默认值。是否继续?";window.confirm(Q)&&(st(S),S.streamBehavior=$,C||(S.generateLoopStartAnimation=!1,S.generateLoopEndAnimation=!1))}function At($,S){var Re;const C=(Re=E.value)==null?void 0:Re.config;if(!C)return;const Q=S.target.checked;$==="start"?C.generateLoopStartAnimation=Q:C.generateLoopEndAnimation=Q}function Et($,S){var Re;const C=(Re=E.value)==null?void 0:Re.config;if(!C)return;const Q=Math.min(1800,Math.max(1,Math.ceil(Number(S.target.value)||30)));$==="start"?C.loopStartDurationFrames=Q:C.loopEndDurationFrames=Q}function It($,S){var Re;const C=(Re=E.value)==null?void 0:Re.config;if(!C)return;const Q=S.target.checked;$==="start"?C.loopStartUseCustomDuration=Q:C.loopEndUseCustomDuration=Q}function Kt($,S){const C=$.target.value;if(S.emitterFollowMode=C,C!=="bone"){S.emitterFollowSpineId=0,S.emitterFollowBoneName="";return}Ti(S)}function Ti($){const S=we.value;if(!S){$.emitterFollowMode="none",$.emitterFollowSpineId=0,$.emitterFollowBoneName="";return}$.emitterFollowMode="bone",$.emitterFollowSpineId=S.spine.id,$.emitterFollowBoneName=S.boneName}const Wi={emitMode:["mode","rate","streamBehavior","loopDurationFrames","generateLoopStartAnimation","loopStartUseCustomDuration","loopStartDurationFrames","generateLoopEndAnimation","loopEndUseCustomDuration","loopEndDurationFrames","burstCount","burstLoop","delay","duration"],shape:["shape","shapeRangeVersion","innerRadius","outerRadius","innerRectW","innerRectH","outerRectW","outerRectH","spawnPathId","spawnPathDistribution","radius","rectW","rectH","emissionAngleMode","direction","spread","coneDirection","coneAngle"],attr:["lifeMin","lifeMax","lifeMode","lifeCurve","speedMin","speedMax","speedMode","speedCurve","scaleMin","scaleMax","scaleMode","scaleAxisMode","scaleYMin","scaleYMax","scaleCurve","scaleYCurve","scaleEndRatio","initialRotationMode","initialRotationMin","initialRotationMax","initialRotationCurve","rotationSpeedMin","rotationSpeedMax","speedOverLifeEnabled","speedOverLifeMode","speedOverLifeMin","speedOverLifeMax","speedOverLifeCurve","scaleOverLifeEnabled","scaleOverLifeMode","scaleOverLifeAxisMode","scaleOverLifeMin","scaleOverLifeMax","scaleYOverLifeMin","scaleYOverLifeMax","scaleOverLifeCurve","scaleYOverLifeCurve","rotationOverLifeEnabled","rotationOverLifeMode","rotationOverLifeCurve"],look:["texture","imageResources","imageWeightVersion","alpha","alphaEnd","colorStart","colorEnd","colorOverLife","blend","alphaMode","curveMode","alphaCurve","textureName","textureFolder","alphaScale","anchorX","anchorY","independentAlpha"],mods:["noise","noiseAmt","noiseRange","noiseSpeed","useGravity","gravity","gravityMode","gravityMin","gravityMax","gravityDirection","gravityCurve","wind","windX","windY","windMode","windMin","windMax","windDirection","windCurve","forceField","forceStrength","forceRadius","forceCenterX","forceCenterY","forceFalloff","attraction","attractionCenterX","attractionCenterY","attractionRadius","attractionDuration","attractionDelay","attractionDelayMode","attractionPath","trail","trailConfigVersion","trailResources","trailResourceVersion","trailTexture","trailTextureName","trailPreviewUrl","trailColorMode","trailColor","trailColorGradient","trailAlphaMode","trailAlpha","trailAlphaCurve","trailBoneCount","trailLength","trailWidth","trailWidthMode","trailLifeLengthEnabled","trailLifeLengthCurve","trailShapeEnabled","trailShapeCurve","trailGridRows","trailGridCols","collision","collisionColliderIds","pathFollow","emitterFollow","emitterFollowMode","emitterFollowPathId","emitterFollowSpineId","emitterFollowBoneName","emitterFollowBoneOffsetX","emitterFollowBoneOffsetY","emitterFollowBoneRotation","emitterFollowBoneScaleX","emitterFollowBoneScaleY","emitterAngleMode","emitterFollowCurve","emitterFollowDuration","emitterFollowSpace","emitterFollowDirection","emitterFollowOffset","damping"]};function zi($){var Q;const S=(Q=E.value)==null?void 0:Q.config;if($==="export"){e.settings.exportSettings=_p();return}if(!S)return;const C=Dl();for(const Re of Wi[$])S[Re]=C[Re]}function dn(){t.value.fps=Math.min(240,Math.max(1,Math.round(Number(t.value.fps)||30)))}function di($){var S;e.selectSystem(((S=e.systems[$])==null?void 0:S.id)??0)}function ce(){e.addSystem()}function de(){e.addCollider()}function Rt(){e.addPath()}function Wt(){e.addSpine()}function Zt(){e.duplicateSelectedObject()}function pt($,S,C=0,Q=0,Re=0,mt=0){return{x:$,y:S,inX:C,inY:Q,outX:Re,outY:mt}}function Rs(){const $=K.value;if(!(!$||!$.preset))if($.preset==="circle"){const C=60.751328;$.points=[pt(110,0,0,-C,0,C),pt(0,110,C,0,-C,0),pt(-110,0,0,C,0,-C),pt(0,-110,-C,0,C,0)],$.closed=!0}else if($.preset==="square")$.points=[pt(-100,-100),pt(100,-100),pt(100,100),pt(-100,100)],$.closed=!0;else{const S=$.preset==="star"?10:6;$.points=Array.from({length:S},(C,Q)=>{const Re=$.preset==="star"&&Q%2?50:110,mt=-Math.PI*.5+Q/S*Math.PI*2;return pt(Math.cos(mt)*Re,Math.sin(mt)*Re)}),$.closed=!0}}function Hs(){K.value&&(K.value.points=[])}function Ui(){E.value&&(E.value.config.seed=Math.floor(Math.random()*999999)+1)}function Ps($){var C;const S=(C=E.value)==null?void 0:C.config;!S||$==="direction"||(S.speedOverLifeMode=$,$==="curve"&&S.speedOverLifeMin===S.speedOverLifeMax&&(S.speedOverLifeMin=0,S.speedOverLifeMax=1))}function br(){var S;const $=(S=E.value)==null?void 0:S.config;!$||$.scaleOverLifeMode!=="curve"||($.scaleOverLifeMin===$.scaleOverLifeMax&&($.scaleOverLifeMin=0,$.scaleOverLifeMax=1),$.scaleYOverLifeMin===$.scaleYOverLifeMax&&($.scaleYOverLifeMin=0,$.scaleYOverLifeMax=1))}function js($){var C;const S=(C=E.value)==null?void 0:C.config;!S||$==="direction"||(S.scaleOverLifeMode=$,br())}const ss={point:{emissionAngleMode:"random",direction:0,spread:360},circle:{innerRadius:0,outerRadius:100,emissionAngleMode:"fixed",direction:-90,spread:0},rect:{innerRectW:0,innerRectH:0,outerRectW:200,outerRectH:100,emissionAngleMode:"fixed",direction:-90,spread:0},cone:{innerRadius:0,outerRadius:100,coneAngle:90,coneDirection:90,emissionAngleMode:"random",direction:90,spread:90},path:{spawnPathId:0,spawnPathDistribution:"fixed",emissionAngleMode:"fixed",direction:0,spread:0}};function $a(){var C;const $=(C=E.value)==null?void 0:C.config;if(!$)return;const S=ss[$.shape];S&&Object.assign($,S)}function Ga(){var S;const $=(S=E.value)==null?void 0:S.config;!$||$.spawnPathId>0||($.emissionAngleMode==="path-normal"||$.emissionAngleMode==="path-tangent")&&($.emissionAngleMode="fixed")}const Qr=lt(null),Ws=lt(null),ws=lt(null),Vn=lt(null),ks=lt(null);function ea(){var C;const $=(C=E.value)==null?void 0:C.config;if(!$)return;const S=Math.max(0,...$.trailResources.map(Q=>Q.id))+1;$.trailResources.push({id:S,texture:null,textureName:"trail",previewUrl:"/images/trail.png",weight:100,locked:!1,rotation:0,colorMode:"particle",color:"#ffffff",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}],blend:"normal",alphaMode:"particle",alpha:1,alphaCurve:oe.map(Q=>({...Q})),boneCount:3,trailRatio:100,lengthMode:"fixed",length:100,lengthMin:100,lengthMax:100,widthSizeMode:"fixed",width:100,widthMin:100,widthMax:100,widthMode:"particle",lifeLengthEnabled:!1,lifeLengthCurve:te.map(Q=>({...Q})),shapeEnabled:!1,shapeCurve:ge.map(Q=>({...Q}))}),_e()}function ta($){var S;ks.value=$,(S=Vn.value)==null||S.click()}function H($,S){var Re;const C=(Re=E.value)==null?void 0:Re.config;if(!C)return;const Q=$==="trailGridCols"?32:16;C[$]=Math.min(Q,Math.max(2,Math.round(Number(S)||2)))}function Y($,S){var Q;const C=(Q=E.value)==null?void 0:Q.config.trailResources.find(Re=>Re.id===$);C&&(C.boneCount=Math.min(16,Math.max(2,Math.round(Number(S)||2))))}function ee($,S){var Q;const C=(Q=E.value)==null?void 0:Q.config.trailResources.find(Re=>Re.id===$);C&&(C.rotation=Math.max(-360,Math.min(360,Number(S)||0)))}async function ne($){var ut,ni;const S=$.target,C=(ut=S.files)==null?void 0:ut[0],Q=(ni=E.value)==null?void 0:ni.config,Re=Q==null?void 0:Q.trailResources.find(Vt=>Vt.id===ks.value);if(!C||!Re){S.value="";return}const mt=await nt(C);Re.texture=Dr(await gt.fromURL(mt)),Re.previewUrl=mt,Re.textureName=C.name.replace(/\.[^.]+$/,"")||"trail",S.value="",ks.value=null}async function ue($){var Q;const S=(Q=E.value)==null?void 0:Q.config,C=S==null?void 0:S.trailResources.find(Re=>Re.id===$);C&&(C.texture=Dr(await gt.fromURL("/images/trail.png")),C.previewUrl="/images/trail.png",C.textureName="trail",C.weight=100,C.locked=!1,C.rotation=0,C.boneCount=3,C.trailRatio=100,C.lengthMode="fixed",C.length=100,C.lengthMin=100,C.lengthMax=100,C.widthSizeMode="fixed",C.width=100,C.widthMin=100,C.widthMax=100,C.widthMode="particle",C.lifeLengthEnabled=!1,C.lifeLengthCurve=te.map(Re=>({...Re})),C.shapeEnabled=!1,C.shapeCurve=ge.map(Re=>({...Re})),C.colorMode="particle",C.color="#ffffff",C.colorGradient=[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}],C.blend="normal",C.alphaMode="particle",C.alpha=1,C.alphaCurve=oe.map(Re=>({...Re})),_e())}function ve($){var Q;const S=(Q=E.value)==null?void 0:Q.config.trailResources;if(!S||S.length<=1)return;const C=S.findIndex(Re=>Re.id===$);C>=0&&S.splice(C,1),_e()}function _e(){var Re;const $=(Re=E.value)==null?void 0:Re.config.trailResources;if(!($!=null&&$.length))return;if($.length===1){$[0].weight=100,$[0].locked=!1;return}const S=$.filter(mt=>mt.locked),C=$.filter(mt=>!mt.locked);let Q=S.reduce((mt,ut)=>mt+Math.max(0,Number(ut.weight)||0),0);Q>100&&(si(S,100,!0),Q=100),si(C,100-Q)}function Me($,S){var ni;const C=(ni=E.value)==null?void 0:ni.config.trailResources;if(!(C!=null&&C.length))return;if(C.length===1){C[0].weight=100,C[0].locked=!1;return}const Q=C.find(Vt=>Vt.id===$);if(!Q||Q.locked)return;const Re=C.filter(Vt=>Vt.id!==$&&Vt.locked).reduce((Vt,rs)=>Vt+Math.max(0,Number(rs.weight)||0),0),mt=Math.max(0,100-Re),ut=C.filter(Vt=>Vt.id!==$&&!Vt.locked);Q.weight=Bt(Math.min(mt,Math.max(0,Number(S)||0))),ut.length?si(ut,mt-Q.weight,!0):Q.weight=Bt(mt)}function be($){var Q;const S=(Q=E.value)==null?void 0:Q.config.trailResources;if(!S||S.length===1)return;const C=S.find(Re=>Re.id===$);C&&(C.locked=!C.locked)}function De($,S){const C=S.target;$.color=Se(C.value,$.color),C.value=$.color}function Ie($,S){De($,S),S.target.blur()}function Le(){var C;const $=(C=E.value)==null?void 0:C.config;if(!$)return;const S=Math.max(0,...$.imageResources.map(Q=>Q.id))+1;$.imageResources.push({id:S,texture:$.texture,textureName:"star",textureFolder:"",previewUrl:"/images/star.png",imageMode:"fixed",sequencePlayback:"loop-forward",sequenceFps:30,sequenceFrames:[],weight:100,locked:!1,scale:1,anchorX:.5,anchorY:.5,colorMode:"fixed",colorStart:"#ffffff",colorEnd:"#ff4d4d",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ff4d4d"}],blend:"normal",independentAlpha:"off",alpha:1,alphaCurveMode:"跟随导出",alphaCurve:xe.map(Q=>({...Q}))}),Ci()}function Te($){var S;ws.value=$,(S=Qr.value)==null||S.click()}function je($){var S;ws.value=$,(S=Ws.value)==null||S.click()}async function rt($){var ni,Vt;const S=$.target,C=(ni=S.files)==null?void 0:ni[0],Q=(Vt=E.value)==null?void 0:Vt.config,Re=Q==null?void 0:Q.imageResources.find(rs=>rs.id===ws.value);if(!C||!Re){S.value="";return}const mt=await nt(C),ut=Dr(await gt.fromURL(mt));Re.texture=ut,Re.previewUrl=mt,Re.textureFolder="",Re.textureName=C.name.replace(/\.[^.]+$/,"")||"particle",S.value="",ws.value=null}async function Je($){var mt;const S=$.target,C=Array.from(S.files||[]).sort((ut,ni)=>ut.name.localeCompare(ni.name,void 0,{numeric:!0,sensitivity:"base"})),Q=(mt=E.value)==null?void 0:mt.config,Re=Q==null?void 0:Q.imageResources.find(ut=>ut.id===ws.value);if(!C.length||!Re){S.value="";return}Re.sequenceFrames=await Promise.all(C.map(async ut=>{const ni=await nt(ut);return{name:ut.name,previewUrl:ni,texture:Dr(await gt.fromURL(ni))}})),Re.imageMode="sequence",S.value="",ws.value=null}function nt($){return new Promise((S,C)=>{const Q=new FileReader;Q.onload=()=>S(String(Q.result||"")),Q.onerror=()=>C(Q.error),Q.readAsDataURL($)})}function Qe($){var Q;const S=(Q=E.value)==null?void 0:Q.config,C=S==null?void 0:S.imageResources.find(Re=>Re.id===$);!S||!C||(C.texture=S.texture,C.textureName="star",C.textureFolder="",C.previewUrl="/images/star.png",C.imageMode="fixed",C.sequencePlayback="loop-forward",C.sequenceFps=30,C.sequenceFrames=[],C.scale=1,C.anchorX=.5,C.anchorY=.5,C.colorMode="fixed",C.colorStart="#ffffff",C.colorEnd="#ff4d4d",C.colorGradient=[{position:0,color:"#ffffff"},{position:1,color:"#ff4d4d"}],C.blend="normal",C.independentAlpha="off",C.alpha=1,C.alphaCurveMode="跟随导出",C.alphaCurve=xe.map(Re=>({...Re})),C.locked=!1,Ci())}function Se($,S){let C=$.trim().replace(/^#/,"");return/^[0-9a-f]{3}$/i.test(C)&&(C=C.split("").map(Q=>Q+Q).join("")),/^[0-9a-f]{6}$/i.test(C)?`#${C.toLowerCase()}`:S}function at($,S){const C=S.target;$.colorStart=Se(C.value,$.colorStart),C.value=$.colorStart}function Pe($,S){at($,S),S.target.blur()}function Xt($){var Q;const S=(Q=E.value)==null?void 0:Q.config.imageResources;if(!S||S.length<=1)return;const C=S.findIndex(Re=>Re.id===$);C>=0&&S.splice(C,1),Ci()}function Bt($){return Math.round($)}function si($,S,C=!1){if(!$.length)return;const Q=Math.max(0,Bt(S)),Re=C?$.reduce((ut,ni)=>ut+Math.max(0,Number(ni.weight)||0),0):0;let mt=0;$.forEach((ut,ni)=>{const Vt=ni===$.length-1,rs=Bt(Vt?Q-mt:Re>0?Q*Math.max(0,Number(ut.weight)||0)/Re:Q/$.length);ut.weight=rs,mt+=rs})}function Ci(){var Re;const $=(Re=E.value)==null?void 0:Re.config.imageResources;if(!($!=null&&$.length))return;if($.length===1){$[0].weight=100,$[0].locked=!1;return}const S=$.filter(mt=>mt.locked),C=$.filter(mt=>!mt.locked);let Q=S.reduce((mt,ut)=>mt+Math.max(0,Number(ut.weight)||0),0);Q>100&&(si(S,100,!0),Q=100),si(C,100-Q)}function ns($,S){var ni;const C=(ni=E.value)==null?void 0:ni.config.imageResources;if(!(C!=null&&C.length))return;if(C.length===1){C[0].weight=100,C[0].locked=!1;return}const Q=C.find(Vt=>Vt.id===$);if(!Q||Q.locked)return;const Re=C.filter(Vt=>Vt.id!==$&&Vt.locked).reduce((Vt,rs)=>Vt+Math.max(0,Number(rs.weight)||0),0),mt=Math.max(0,100-Re),ut=C.filter(Vt=>Vt.id!==$&&!Vt.locked);if(Q.weight=Bt(Math.min(mt,Math.max(0,Number(S)||0))),!ut.length){Q.weight=Bt(mt);return}si(ut,mt-Q.weight,!0)}function Ha($){var Q;const S=(Q=E.value)==null?void 0:Q.config.imageResources;if(!S||S.length===1)return;const C=S.find(Re=>Re.id===$);C&&(C.locked=!C.locked)}return($,S)=>(ie(),ae("div",WB,[S[391]||(S[391]=M("div",{class:"panel-header"},[M("span",null,"Spine粒子编辑器-Yeomai")],-1)),M("div",zB,[M("div",qB,[M("div",{class:"group-head",onClick:S[0]||(S[0]=C=>Oe("config"))},[M("span",KB,Xe(le.config?"▸":"▾"),1),S[197]||(S[197]=M("span",null,"配置管理",-1))]),ye(M("div",ZB,[M("div",JB,[M("button",{title:"保存全部编辑器配置 (Ctrl+S)",onClick:_},"保存配置"),M("button",{title:"加载本地编辑器配置",onClick:S[1]||(S[1]=C=>{var Q;return(Q=i.value)==null?void 0:Q.click()})},"加载配置"),ye(M("select",{"onUpdate:modelValue":S[2]||(S[2]=C=>n.value=C),"aria-label":"预设列表",disabled:!r.value.length||a.value,onPointerdown:P,onFocus:P,onChange:F},[M("option",eL,Xe(r.value.length?"选择预设":"无预设文件"),1),(ie(!0),ae(Ke,null,ci(r.value,C=>(ie(),ae("option",{key:C.file,value:C.file},Xe(C.name),9,tL))),128))],40,QB),[[Ht,n.value]]),M("input",{ref_key:"configFileInput",ref:i,hidden:"",type:"file",accept:".json,application/json",onChange:R},null,544)]),o.value?(ie(),ae("div",{key:0,class:Ze(["config-message",{error:h.value}])},Xe(o.value),3)):Ve("",!0)],512),[[Yi,!le.config]])]),M("div",iL,[M("div",{class:"group-head scene-head",onClick:S[3]||(S[3]=C=>Oe("scene"))},[M("span",sL,Xe(le.scene?"▸":"▾"),1),S[198]||(S[198]=M("span",null,"场景对象",-1)),M("div",nL,[M("button",{class:"scene-add",title:"添加粒子系统",onClick:bt(ce,["stop"])},"+粒子"),M("button",{class:"scene-add",title:"添加碰撞体",onClick:bt(de,["stop"])},"+碰撞"),M("button",{class:"scene-add",title:"添加路径",onClick:bt(Rt,["stop"])},"+路径"),M("button",{class:"scene-add",title:"添加 Spine",onClick:bt(Wt,["stop"])},"+Spine"),M("button",{class:"scene-add",disabled:!me.value,title:"复制当前选中的场景对象",onClick:bt(Zt,["stop"])},"+Copy",8,rL)])]),ye(M("div",aL,[M("div",oL,[(ie(!0),ae(Ke,null,ci(ke(e).systems,(C,Q)=>(ie(),ae("div",{key:`particle-${C.id}`,class:Ze(["tree-item scene-object-item",{on:W.value==="particle"&&C.id===ke(e).activeObjectId}]),onClick:Re=>di(Q)},[S[201]||(S[201]=M("span",{class:"tdot"},"●",-1)),M("span",cL,Xe(C.config.name||"ParticleSystem"+(Q+1)),1),M("button",{class:Ze(["scene-object-eye",{off:C.visible===!1}]),title:C.visible===!1?"显示粒子系统":"隐藏粒子系统","aria-label":C.visible===!1?"显示粒子系统":"隐藏粒子系统",onClick:bt(Re=>C.visible=C.visible===!1,["stop"])},[(ie(),ae("svg",uL,[S[199]||(S[199]=M("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"},null,-1)),S[200]||(S[200]=M("circle",{cx:"12",cy:"12",r:"2.8"},null,-1)),C.visible===!1?(ie(),ae("path",dL)):Ve("",!0)]))],10,hL),S[202]||(S[202]=M("span",{class:"scene-object-kind"},"粒子",-1)),M("button",{class:"scene-object-delete",title:"删除粒子系统",onClick:bt(Re=>ke(e).removeSystem(C.id),["stop"])},"✕",8,fL)],10,lL))),128)),(ie(!0),ae(Ke,null,ci(ke(e).colliders,C=>(ie(),ae("div",{key:`collision-${C.id}`,class:Ze(["tree-item scene-object-item",{on:W.value==="collision"&&C.id===ke(e).activeObjectId}]),onClick:Q=>ke(e).selectSceneObject("collision",C.id)},[S[205]||(S[205]=M("span",{class:"tdot collision-dot"},"■",-1)),M("span",pL,Xe(C.name),1),M("button",{class:Ze(["scene-object-eye",{off:C.visible===!1}]),title:C.visible===!1?"显示碰撞体":"隐藏碰撞体","aria-label":C.visible===!1?"显示碰撞体":"隐藏碰撞体",onClick:bt(Q=>C.visible=C.visible===!1,["stop"])},[(ie(),ae("svg",vL,[S[203]||(S[203]=M("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"},null,-1)),S[204]||(S[204]=M("circle",{cx:"12",cy:"12",r:"2.8"},null,-1)),C.visible===!1?(ie(),ae("path",yL)):Ve("",!0)]))],10,gL),S[206]||(S[206]=M("span",{class:"scene-object-kind"},"碰撞",-1)),M("button",{class:"scene-object-delete",title:"删除碰撞体",onClick:bt(Q=>ke(e).removeCollider(C.id),["stop"])},"✕",8,xL)],10,mL))),128)),(ie(!0),ae(Ke,null,ci(ke(e).paths,C=>(ie(),ae("div",{key:`path-${C.id}`,class:Ze(["tree-item scene-object-item",{on:W.value==="path"&&C.id===ke(e).activeObjectId}]),onClick:Q=>ke(e).selectSceneObject("path",C.id)},[S[209]||(S[209]=M("span",{class:"tdot path-dot"},"◇",-1)),M("span",wL,Xe(C.name),1),M("button",{class:Ze(["scene-object-eye",{off:C.visible===!1}]),title:C.visible===!1?"显示路径":"隐藏路径","aria-label":C.visible===!1?"显示路径":"隐藏路径",onClick:bt(Q=>C.visible=C.visible===!1,["stop"])},[(ie(),ae("svg",ML,[S[207]||(S[207]=M("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"},null,-1)),S[208]||(S[208]=M("circle",{cx:"12",cy:"12",r:"2.8"},null,-1)),C.visible===!1?(ie(),ae("path",_L)):Ve("",!0)]))],10,SL),S[210]||(S[210]=M("span",{class:"scene-object-kind"},"路径",-1)),M("button",{class:"scene-object-delete",title:"删除路径",onClick:bt(Q=>ke(e).removePath(C.id),["stop"])},"✕",8,TL)],10,bL))),128)),(ie(!0),ae(Ke,null,ci(ke(e).spines,C=>(ie(),ae("div",{key:`spine-${C.id}`,class:Ze(["tree-item scene-object-item",{on:W.value==="spine"&&C.id===ke(e).activeObjectId}]),onClick:Q=>ke(e).selectSceneObject("spine",C.id)},[S[213]||(S[213]=M("span",{class:"tdot spine-dot"},"◆",-1)),M("span",EL,Xe(C.name),1),M("button",{class:Ze(["scene-object-eye",{off:C.visible===!1}]),title:C.visible===!1?"显示 Spine":"隐藏 Spine","aria-label":C.visible===!1?"显示 Spine":"隐藏 Spine",onClick:bt(Q=>C.visible=C.visible===!1,["stop"])},[(ie(),ae("svg",IL,[S[211]||(S[211]=M("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"},null,-1)),S[212]||(S[212]=M("circle",{cx:"12",cy:"12",r:"2.8"},null,-1)),C.visible===!1?(ie(),ae("path",RL)):Ve("",!0)]))],10,CL),S[214]||(S[214]=M("span",{class:"scene-object-kind"},"Spine",-1)),M("button",{class:"scene-object-delete",title:"删除 Spine",onClick:bt(Q=>ke(e).removeSpine(C.id),["stop"])},"✕",8,PL)],10,AL))),128)),!ke(e).systems.length&&!ke(e).colliders.length&&!ke(e).paths.length&&!ke(e).spines.length?(ie(),ae("div",kL,"场景中暂无对象")):Ve("",!0)]),W.value==="particle"&&E.value?(ie(),ae(Ke,{key:0},[M("label",FL,[S[215]||(S[215]=M("span",null,"名称",-1)),ye(M("input",{"onUpdate:modelValue":S[4]||(S[4]=C=>E.value.config.name=C),class:"inp"},null,512),[[ht,E.value.config.name]])]),Ue(qe,{label:"位置X",min:-2e3,max:2e3,step:1,modelValue:E.value.config.centerX,"onUpdate:modelValue":S[5]||(S[5]=C=>E.value.config.centerX=C)},null,8,["modelValue"]),Ue(qe,{label:"位置Y",min:-2e3,max:2e3,step:1,modelValue:E.value.config.centerY,"onUpdate:modelValue":S[6]||(S[6]=C=>E.value.config.centerY=C)},null,8,["modelValue"]),Ue(qe,{label:"偏移X",min:-2e3,max:2e3,step:1,modelValue:E.value.config.offsetX,"onUpdate:modelValue":S[7]||(S[7]=C=>E.value.config.offsetX=C)},null,8,["modelValue"]),Ue(qe,{label:"偏移Y",min:-2e3,max:2e3,step:1,modelValue:E.value.config.offsetY,"onUpdate:modelValue":S[8]||(S[8]=C=>E.value.config.offsetY=C)},null,8,["modelValue"]),Ue(qe,{label:"旋转",min:-360,max:360,step:1,modelValue:E.value.config.rootRotation,"onUpdate:modelValue":S[9]||(S[9]=C=>E.value.config.rootRotation=C)},null,8,["modelValue"]),Ue(qe,{label:"缩放X",min:.05,max:10,step:.05,modelValue:E.value.config.rootScaleX,"onUpdate:modelValue":S[10]||(S[10]=C=>E.value.config.rootScaleX=C)},null,8,["modelValue"]),Ue(qe,{label:"缩放Y",min:.05,max:10,step:.05,modelValue:E.value.config.rootScaleY,"onUpdate:modelValue":S[11]||(S[11]=C=>E.value.config.rootScaleY=C)},null,8,["modelValue"]),M("div",OL,[S[216]||(S[216]=M("label",{for:"system-seed"},"随机种子",-1)),ye(M("input",{id:"system-seed",class:"seed-input",type:"number",min:"0",step:"1","onUpdate:modelValue":S[12]||(S[12]=C=>E.value.config.seed=C),title:"控制粒子系统内全部随机属性、资源选择与修改器随机采样"},null,512),[[ht,E.value.config.seed,void 0,{number:!0}]]),M("button",{class:"seed-random",title:"生成新的全局随机种子",onClick:Ui},"⚄")]),S[217]||(S[217]=M("div",{class:"seed-hint"},"控制初始随机参数、资源选择和修改器随机采样;相同种子可复现相同效果",-1))],64)):J.value?(ie(),ae(Ke,{key:1},[S[242]||(S[242]=M("div",{class:"object-editor-title"},"碰撞体属性",-1)),M("label",BL,[S[218]||(S[218]=M("span",null,"碰撞体名称",-1)),ye(M("input",{"onUpdate:modelValue":S[13]||(S[13]=C=>J.value.name=C),class:"inp"},null,512),[[ht,J.value.name]])]),M("div",LL,[M("label",DL,[S[220]||(S[220]=M("span",null,"类型",-1)),ye(M("select",{"onUpdate:modelValue":S[14]||(S[14]=C=>J.value.shape=C),class:"inp"},[...S[219]||(S[219]=[Ts('',5)])],512),[[Ht,J.value.shape]])]),M("label",NL,[S[221]||(S[221]=M("span",null,"启用",-1)),ye(M("input",{"onUpdate:modelValue":S[15]||(S[15]=C=>J.value.enabled=C),type:"checkbox"},null,512),[[ei,J.value.enabled]])])]),M("div",UL,[M("label",XL,[S[222]||(S[222]=M("span",null,"X 位置",-1)),ye(M("input",{"onUpdate:modelValue":S[16]||(S[16]=C=>J.value.x=C),type:"number",class:"inp"},null,512),[[ht,J.value.x,void 0,{number:!0}]])]),M("label",VL,[S[223]||(S[223]=M("span",null,"Y 位置",-1)),ye(M("input",{"onUpdate:modelValue":S[17]||(S[17]=C=>J.value.y=C),type:"number",class:"inp"},null,512),[[ht,J.value.y,void 0,{number:!0}]])])]),Ue(qe,{label:"旋转",min:-360,max:360,step:1,modelValue:J.value.rotation,"onUpdate:modelValue":S[18]||(S[18]=C=>J.value.rotation=C)},null,8,["modelValue"]),M("div",YL,[M("label",$L,[S[224]||(S[224]=M("span",null,"缩放 X",-1)),ye(M("input",{"onUpdate:modelValue":S[19]||(S[19]=C=>J.value.scaleX=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[ht,J.value.scaleX,void 0,{number:!0}]])]),M("label",GL,[S[225]||(S[225]=M("span",null,"缩放 Y",-1)),ye(M("input",{"onUpdate:modelValue":S[20]||(S[20]=C=>J.value.scaleY=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[ht,J.value.scaleY,void 0,{number:!0}]])])]),J.value.shape==="circle"?(ie(),Jt(qe,{key:0,label:"半径",min:1,max:1e3,step:1,modelValue:J.value.radius,"onUpdate:modelValue":S[21]||(S[21]=C=>J.value.radius=C)},null,8,["modelValue"])):J.value.shape==="ellipse"?(ie(),ae("div",HL,[M("label",jL,[S[226]||(S[226]=M("span",null,"X 半径",-1)),ye(M("input",{"onUpdate:modelValue":S[22]||(S[22]=C=>J.value.radiusX=C),type:"number",min:"1",class:"inp"},null,512),[[ht,J.value.radiusX,void 0,{number:!0}]])]),M("label",WL,[S[227]||(S[227]=M("span",null,"Y 半径",-1)),ye(M("input",{"onUpdate:modelValue":S[23]||(S[23]=C=>J.value.radiusY=C),type:"number",min:"1",class:"inp"},null,512),[[ht,J.value.radiusY,void 0,{number:!0}]])])])):(ie(),ae("div",zL,[M("label",qL,[S[228]||(S[228]=M("span",null,"宽度",-1)),ye(M("input",{"onUpdate:modelValue":S[24]||(S[24]=C=>J.value.width=C),type:"number",min:"1",class:"inp"},null,512),[[ht,J.value.width,void 0,{number:!0}]])]),M("label",KL,[S[229]||(S[229]=M("span",null,"高度",-1)),ye(M("input",{"onUpdate:modelValue":S[25]||(S[25]=C=>J.value.height=C),type:"number",min:"1",class:"inp"},null,512),[[ht,J.value.height,void 0,{number:!0}]])])])),J.value.shape==="polygon"||J.value.shape==="custom"?(ie(),Jt(qe,{key:3,label:"边数",min:3,max:16,step:1,modelValue:J.value.sides,"onUpdate:modelValue":S[26]||(S[26]=C=>J.value.sides=C)},null,8,["modelValue"])):Ve("",!0),M("label",ZL,[S[231]||(S[231]=M("span",null,"碰撞响应",-1)),ye(M("select",{"onUpdate:modelValue":S[27]||(S[27]=C=>J.value.response=C),class:"inp"},[...S[230]||(S[230]=[M("option",{value:"physics"},"物理(弹跳/摩擦)",-1),M("option",{value:"pause"},"暂停(停止不动)",-1),M("option",{value:"destroy"},"消失(立即销毁)",-1)])],512),[[Ht,J.value.response]])]),J.value.response==="physics"?(ie(),ae("div",JL,[M("label",QL,[S[232]||(S[232]=M("span",null,"弹性 (0-1)",-1)),ye(M("input",{"onUpdate:modelValue":S[28]||(S[28]=C=>J.value.elasticity=C),type:"number",min:"0",max:"1",step:"0.01",class:"inp"},null,512),[[ht,J.value.elasticity,void 0,{number:!0}]])]),M("label",eD,[S[233]||(S[233]=M("span",null,"摩擦 (0-1)",-1)),ye(M("input",{"onUpdate:modelValue":S[29]||(S[29]=C=>J.value.friction=C),type:"number",min:"0",max:"1",step:"0.01",class:"inp"},null,512),[[ht,J.value.friction,void 0,{number:!0}]])])])):Ve("",!0),M("div",tD,[M("label",iD,[ye(M("input",{"onUpdate:modelValue":S[30]||(S[30]=C=>J.value.followPath=C),type:"checkbox"},null,512),[[ei,J.value.followPath]]),S[234]||(S[234]=Qt("跟随路径移动",-1))]),J.value.followPath?(ie(),ae(Ke,{key:0},[M("label",sD,[S[236]||(S[236]=M("span",null,"目标路径",-1)),ye(M("select",{"onUpdate:modelValue":S[31]||(S[31]=C=>J.value.followPathId=C),class:"inp"},[S[235]||(S[235]=M("option",{value:0},"(未选择)",-1)),(ie(!0),ae(Ke,null,ci(ke(e).paths,C=>(ie(),ae("option",{key:C.id,value:C.id},Xe(C.name),9,nD))),128))],512),[[Ht,J.value.followPathId,void 0,{number:!0}]])]),M("div",rD,[M("label",aD,[S[237]||(S[237]=M("span",null,"移动时长(秒)",-1)),ye(M("input",{"onUpdate:modelValue":S[32]||(S[32]=C=>J.value.followDuration=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[ht,J.value.followDuration,void 0,{number:!0}]])]),M("label",oD,[S[239]||(S[239]=M("span",null,"曲线模式",-1)),ye(M("select",{"onUpdate:modelValue":S[33]||(S[33]=C=>J.value.followCurveMode=C),class:"inp"},[...S[238]||(S[238]=[M("option",null,"跟随导出",-1),M("option",null,"线性",-1),M("option",null,"贝塞尔",-1)])],512),[[Ht,J.value.followCurveMode]])])]),M("label",lD,[ye(M("input",{"onUpdate:modelValue":S[34]||(S[34]=C=>J.value.followPathRotation=C),type:"checkbox"},null,512),[[ei,J.value.followPathRotation]]),S[240]||(S[240]=Qt("方向沿路径",-1))]),S[241]||(S[241]=M("div",{class:"collider-curve-title"},[Qt("移动进度曲线 "),M("small",null,"横轴:实时/移动时长 纵轴:路径进度(0=起点 → 1=终点)")],-1)),Ue(xn,{"model-value":J.value.followCurve||j,"default-value":j,mode:T(J.value.followCurveMode),"onUpdate:modelValue":S[35]||(S[35]=C=>J.value.followCurve=C)},null,8,["model-value","mode"])],64)):Ve("",!0)])],64)):K.value?(ie(),ae(Ke,{key:2},[S[252]||(S[252]=M("div",{class:"object-editor-title"},"路径属性",-1)),M("label",cD,[S[243]||(S[243]=M("span",null,"路径名称",-1)),ye(M("input",{"onUpdate:modelValue":S[36]||(S[36]=C=>K.value.name=C),class:"inp"},null,512),[[ht,K.value.name]])]),M("div",hD,[M("label",uD,[S[244]||(S[244]=M("span",null,"X 位置",-1)),ye(M("input",{"onUpdate:modelValue":S[37]||(S[37]=C=>K.value.x=C),type:"number",class:"inp"},null,512),[[ht,K.value.x,void 0,{number:!0}]])]),M("label",dD,[S[245]||(S[245]=M("span",null,"Y 位置",-1)),ye(M("input",{"onUpdate:modelValue":S[38]||(S[38]=C=>K.value.y=C),type:"number",class:"inp"},null,512),[[ht,K.value.y,void 0,{number:!0}]])])]),Ue(qe,{label:"旋转",min:-360,max:360,step:1,modelValue:K.value.rotation,"onUpdate:modelValue":S[39]||(S[39]=C=>K.value.rotation=C)},null,8,["modelValue"]),M("div",fD,[M("label",mD,[S[246]||(S[246]=M("span",null,"缩放 X",-1)),ye(M("input",{"onUpdate:modelValue":S[40]||(S[40]=C=>K.value.scaleX=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[ht,K.value.scaleX,void 0,{number:!0}]])]),M("label",pD,[S[247]||(S[247]=M("span",null,"缩放 Y",-1)),ye(M("input",{"onUpdate:modelValue":S[41]||(S[41]=C=>K.value.scaleY=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[ht,K.value.scaleY,void 0,{number:!0}]])])]),M("label",gD,[S[248]||(S[248]=M("span",null,"闭合路径",-1)),ye(M("input",{"onUpdate:modelValue":S[42]||(S[42]=C=>K.value.closed=C),type:"checkbox"},null,512),[[ei,K.value.closed]])]),M("label",vD,[S[249]||(S[249]=M("span",null,"路径颜色",-1)),ye(M("input",{"onUpdate:modelValue":S[43]||(S[43]=C=>K.value.color=C),type:"color",class:"path-color"},null,512),[[ht,K.value.color]])]),S[253]||(S[253]=Ts('
操作说明:
  • 双击空白处/曲线:新建锚点
  • 双击锚点:删除节点
  • 双击第二下按住拖动:新建并拉出手柄
  • 拖动锚点移动位置,拖动手柄调整曲线
  • Shift+拖动手柄:两侧完全对称
  • Alt+拖动手柄:独立控制单侧
  • Ctrl+点击/框选:加选节点
  • Alt+点击/框选:减选节点
  • Alt+单击空白处:清除全部选中
  • 选中多个节点后可整体拖动
',1)),M("label",yD,[S[251]||(S[251]=M("span",null,"应用预设形状",-1)),ye(M("select",{"onUpdate:modelValue":S[44]||(S[44]=C=>K.value.preset=C),class:"inp"},[...S[250]||(S[250]=[Ts('',5)])],512),[[Ht,K.value.preset]])]),M("button",{class:"path-action primary",onClick:Rs},"应用预设"),M("button",{class:"path-action",onClick:Hs},"清空锚点")],64)):fe.value?(ie(),Jt(q3,{key:3,"spine-object":fe.value},null,8,["spine-object"])):(ie(),ae("div",xD,"使用右上角按钮创建场景对象"))],512),[[Yi,!le.scene]])]),W.value==="particle"&&E.value?(ie(),ae(Ke,{key:0},[M("div",bD,[M("div",{class:"group-head",onClick:S[46]||(S[46]=C=>Oe("emitMode"))},[M("span",wD,Xe(le.emitMode?"▸":"▾"),1),S[254]||(S[254]=M("span",null,"发射模式",-1)),M("button",{class:"group-reset",title:"重置发射模式参数",onClick:S[45]||(S[45]=bt(C=>zi("emitMode"),["stop"]))},"重置")]),ye(M("div",SD,[M("div",MD,[M("button",{class:Ze(["seg",{on:E.value.config.mode==="stream"}]),onClick:S[47]||(S[47]=C=>Fe("stream"))},"持续",2),M("button",{class:Ze(["seg",{on:E.value.config.mode==="burst"}]),onClick:S[48]||(S[48]=C=>Fe("burst"))},"爆发",2)]),E.value.config.mode==="stream"?(ie(),ae(Ke,{key:0},[M("div",_D,[M("button",{class:Ze(["seg",{on:E.value.config.streamBehavior==="normal"}]),onClick:S[49]||(S[49]=C=>St("normal"))},"常规持续",2),M("button",{class:Ze(["seg",{on:E.value.config.streamBehavior==="loop"}]),onClick:S[50]||(S[50]=C=>St("loop"))},"循环持续",2)]),Ue(qe,{label:"发射速率",min:1,max:300,step:1,modelValue:E.value.config.rate,"onUpdate:modelValue":S[51]||(S[51]=C=>E.value.config.rate=C)},null,8,["modelValue"]),E.value.config.streamBehavior==="normal"?(ie(),Jt(qe,{key:0,label:"发射时长",min:1/30,max:60,step:1/30,modelValue:E.value.config.duration,"onUpdate:modelValue":S[52]||(S[52]=C=>E.value.config.duration=C)},null,8,["modelValue"])):(ie(),Jt(qe,{key:1,label:"发射时长 (f)",min:1,max:1800,step:1,"model-value":q.value,"onUpdate:modelValue":Be},null,8,["model-value"])),E.value.config.streamBehavior==="loop"?(ie(),ae("div",TD,[M("div",AD,[M("label",ED,[M("input",{type:"checkbox",checked:E.value.config.generateLoopStartAnimation,onChange:S[53]||(S[53]=C=>At("start",C))},null,40,CD),S[255]||(S[255]=M("span",{class:"switch-ui"},null,-1)),S[256]||(S[256]=M("span",null,"生成开始循环动画",-1))]),E.value.config.generateLoopStartAnimation?(ie(),ae("div",ID,[M("label",RD,[M("input",{type:"checkbox",checked:E.value.config.loopStartUseCustomDuration,onChange:S[54]||(S[54]=C=>It("start",C))},null,40,PD),S[257]||(S[257]=M("span",{class:"switch-ui"},null,-1)),S[258]||(S[258]=M("span",null,"指定时长",-1))]),M("label",kD,[E.value.config.loopStartUseCustomDuration?(ie(),ae("input",{key:0,value:E.value.config.loopStartDurationFrames,type:"number",min:"1",max:"1800",step:"1","aria-label":"开始循环段时长",onChange:S[55]||(S[55]=C=>Et("start",C))},null,40,FD)):Ve("",!0),E.value.config.loopStartUseCustomDuration?(ie(),ae("span",OD,"f")):(ie(),ae("span",BD,"自动 "+Xe(V.value)+"f",1))])])):Ve("",!0)]),M("div",LD,[M("label",DD,[M("input",{type:"checkbox",checked:E.value.config.generateLoopEndAnimation,onChange:S[56]||(S[56]=C=>At("end",C))},null,40,ND),S[259]||(S[259]=M("span",{class:"switch-ui"},null,-1)),S[260]||(S[260]=M("span",null,"生成结束循环动画",-1))]),E.value.config.generateLoopEndAnimation?(ie(),ae("div",UD,[M("label",XD,[M("input",{type:"checkbox",checked:E.value.config.loopEndUseCustomDuration,onChange:S[57]||(S[57]=C=>It("end",C))},null,40,VD),S[261]||(S[261]=M("span",{class:"switch-ui"},null,-1)),S[262]||(S[262]=M("span",null,"指定时长",-1))]),M("label",YD,[E.value.config.loopEndUseCustomDuration?(ie(),ae("input",{key:0,value:E.value.config.loopEndDurationFrames,type:"number",min:"1",max:"1800",step:"1","aria-label":"结束循环段时长",onChange:S[58]||(S[58]=C=>Et("end",C))},null,40,$D)):Ve("",!0),E.value.config.loopEndUseCustomDuration?(ie(),ae("span",GD,"f")):(ie(),ae("span",HD,"自动 "+Xe(V.value)+"f",1))])])):Ve("",!0)])])):Ve("",!0),E.value.config.streamBehavior==="loop"?(ie(),ae("div",jD,"循环持续模式不支持骨骼跟随和路径跟随;进入或退出时会将粒子跟随设置恢复默认值。")):Ve("",!0)],64)):(ie(),Jt(qe,{key:1,label:"单次数量",min:1,max:1e3,step:1,modelValue:E.value.config.burstCount,"onUpdate:modelValue":S[59]||(S[59]=C=>E.value.config.burstCount=C)},null,8,["modelValue"])),Ue(qe,{label:"延迟时间",min:0,max:5,step:.1,modelValue:E.value.config.delay,"onUpdate:modelValue":S[60]||(S[60]=C=>E.value.config.delay=C)},null,8,["modelValue"])],512),[[Yi,!le.emitMode]])]),M("div",WD,[M("div",{class:"group-head",onClick:S[62]||(S[62]=C=>Oe("shape"))},[M("span",zD,Xe(le.shape?"▸":"▾"),1),S[263]||(S[263]=M("span",null,"发射器形状",-1)),M("button",{class:"group-reset",title:"重置发射器形状参数",onClick:S[61]||(S[61]=bt(C=>zi("shape"),["stop"]))},"重置")]),ye(M("div",qD,[M("label",KD,[S[265]||(S[265]=M("span",null,"形状",-1)),ye(M("select",{"onUpdate:modelValue":S[63]||(S[63]=C=>E.value.config.shape=C),class:"inp",onChange:$a},[...S[264]||(S[264]=[Ts('',5)])],544),[[Ht,E.value.config.shape]])]),E.value.config.shape==="circle"||E.value.config.shape==="cone"?(ie(),ae(Ke,{key:0},[Ue(qe,{label:E.value.config.shape==="cone"?"内径":"内半径",min:0,max:E.value.config.outerRadius,step:1,modelValue:E.value.config.innerRadius,"onUpdate:modelValue":S[64]||(S[64]=C=>E.value.config.innerRadius=C)},null,8,["label","max","modelValue"]),Ue(qe,{label:E.value.config.shape==="cone"?"外径":"外半径",min:E.value.config.innerRadius,max:300,step:1,modelValue:E.value.config.outerRadius,"onUpdate:modelValue":S[65]||(S[65]=C=>E.value.config.outerRadius=C)},null,8,["label","min","modelValue"])],64)):Ve("",!0),E.value.config.shape==="cone"?(ie(),ae(Ke,{key:1},[Ue(qe,{label:"锥形朝向",min:-360,max:360,step:1,modelValue:E.value.config.coneDirection,"onUpdate:modelValue":S[66]||(S[66]=C=>E.value.config.coneDirection=C)},null,8,["modelValue"]),Ue(qe,{label:"锥形开口角度",min:1,max:360,step:1,modelValue:E.value.config.coneAngle,"onUpdate:modelValue":S[67]||(S[67]=C=>E.value.config.coneAngle=C)},null,8,["modelValue"])],64)):E.value.config.shape==="rect"?(ie(),ae(Ke,{key:2},[Ue(qe,{label:"内宽",min:0,max:E.value.config.outerRectW,step:1,modelValue:E.value.config.innerRectW,"onUpdate:modelValue":S[68]||(S[68]=C=>E.value.config.innerRectW=C)},null,8,["max","modelValue"]),Ue(qe,{label:"内高",min:0,max:E.value.config.outerRectH,step:1,modelValue:E.value.config.innerRectH,"onUpdate:modelValue":S[69]||(S[69]=C=>E.value.config.innerRectH=C)},null,8,["max","modelValue"]),Ue(qe,{label:"外宽",min:E.value.config.innerRectW,max:400,step:1,modelValue:E.value.config.outerRectW,"onUpdate:modelValue":S[70]||(S[70]=C=>E.value.config.outerRectW=C)},null,8,["min","modelValue"]),Ue(qe,{label:"外高",min:E.value.config.innerRectH,max:400,step:1,modelValue:E.value.config.outerRectH,"onUpdate:modelValue":S[71]||(S[71]=C=>E.value.config.outerRectH=C)},null,8,["min","modelValue"])],64)):E.value.config.shape==="path"?(ie(),ae(Ke,{key:3},[M("label",ZD,[S[267]||(S[267]=M("span",null,"选择路径",-1)),ye(M("select",{"onUpdate:modelValue":S[72]||(S[72]=C=>E.value.config.spawnPathId=C),class:"inp",onChange:Ga},[S[266]||(S[266]=M("option",{value:0},"无路径(点发射)",-1)),(ie(!0),ae(Ke,null,ci(ke(e).paths,C=>(ie(),ae("option",{key:C.id,value:C.id,disabled:!C.enabled},Xe(C.name),9,JD))),128))],544),[[Ht,E.value.config.spawnPathId,void 0,{number:!0}]])]),E.value.config.spawnPathId>0?(ie(),ae("label",QD,[S[269]||(S[269]=M("span",null,"出生分布",-1)),ye(M("select",{"onUpdate:modelValue":S[73]||(S[73]=C=>E.value.config.spawnPathDistribution=C),class:"inp"},[...S[268]||(S[268]=[M("option",{value:"fixed"},"等间距固定分布",-1),M("option",{value:"random"},"随机分布",-1)])],512),[[Ht,E.value.config.spawnPathDistribution]])])):Ve("",!0)],64)):Ve("",!0),S[273]||(S[273]=M("div",{class:"divider"},null,-1)),M("label",eN,[S[272]||(S[272]=M("span",null,"发射角度",-1)),ye(M("select",{"onUpdate:modelValue":S[74]||(S[74]=C=>E.value.config.emissionAngleMode=C),class:"inp"},[S[270]||(S[270]=M("option",{value:"fixed"},"固定",-1)),S[271]||(S[271]=M("option",{value:"random"},"随机",-1)),E.value.config.shape==="circle"||E.value.config.shape==="rect"||E.value.config.shape==="cone"?(ie(),ae("option",tN,"径向(中心向外)")):Ve("",!0),E.value.config.shape==="path"&&E.value.config.spawnPathId>0?(ie(),ae("option",iN,"垂直于路径")):Ve("",!0),E.value.config.shape==="path"&&E.value.config.spawnPathId>0?(ie(),ae("option",sN,"沿路径方向")):Ve("",!0)],512),[[Ht,E.value.config.emissionAngleMode]])]),E.value.config.emissionAngleMode==="fixed"?(ie(),Jt(qe,{key:4,label:"固定角度",min:-360,max:360,step:1,modelValue:E.value.config.direction,"onUpdate:modelValue":S[75]||(S[75]=C=>E.value.config.direction=C)},null,8,["modelValue"])):E.value.config.emissionAngleMode==="random"?(ie(),ae(Ke,{key:5},[Ue(qe,{label:"基准角度",min:-360,max:360,step:1,modelValue:E.value.config.direction,"onUpdate:modelValue":S[76]||(S[76]=C=>E.value.config.direction=C)},null,8,["modelValue"]),Ue(qe,{label:"随机范围",min:0,max:360,step:1,modelValue:E.value.config.spread,"onUpdate:modelValue":S[77]||(S[77]=C=>E.value.config.spread=C)},null,8,["modelValue"])],64)):Ve("",!0)],512),[[Yi,!le.shape]])]),M("div",nN,[M("div",{class:"group-head",onClick:S[79]||(S[79]=C=>Oe("attr"))},[M("span",rN,Xe(le.attr?"▸":"▾"),1),S[274]||(S[274]=M("span",null,"粒子属性",-1)),M("button",{class:"group-reset",title:"重置粒子属性参数",onClick:S[78]||(S[78]=bt(C=>zi("attr"),["stop"]))},"重置")]),ye(M("div",aN,[S[282]||(S[282]=M("div",{class:"attr-section-title"},"粒子初始参数",-1)),Ue(jn,{label:"初始生命周期","allow-curve":!1,mode:E.value.config.lifeMode,"onUpdate:mode":S[80]||(S[80]=C=>E.value.config.lifeMode=C),"value-min":E.value.config.lifeMin,"onUpdate:valueMin":S[81]||(S[81]=C=>E.value.config.lifeMin=C),"value-max":E.value.config.lifeMax,"onUpdate:valueMax":S[82]||(S[82]=C=>E.value.config.lifeMax=C),curve:E.value.config.lifeCurve,"onUpdate:curve":S[83]||(S[83]=C=>E.value.config.lifeCurve=C),min:.1,max:10,step:.1,"curve-label":"随机采样 →"},null,8,["mode","value-min","value-max","curve"]),Ue(jn,{label:"初始速度","allow-curve":!1,mode:E.value.config.speedMode,"onUpdate:mode":S[84]||(S[84]=C=>E.value.config.speedMode=C),"value-min":E.value.config.speedMin,"onUpdate:valueMin":S[85]||(S[85]=C=>E.value.config.speedMin=C),"value-max":E.value.config.speedMax,"onUpdate:valueMax":S[86]||(S[86]=C=>E.value.config.speedMax=C),curve:E.value.config.speedCurve,"onUpdate:curve":S[87]||(S[87]=C=>E.value.config.speedCurve=C),min:0,max:1e3,step:1,"curve-label":"随机采样 →"},null,8,["mode","value-min","value-max","curve"]),M("div",oN,[S[275]||(S[275]=M("span",null,"初始缩放",-1)),M("div",lN,[M("button",{class:Ze(["axis-mode",{on:E.value.config.scaleAxisMode==="uniform"}]),onClick:S[88]||(S[88]=C=>E.value.config.scaleAxisMode="uniform")},"统一",2),M("button",{class:Ze(["axis-mode",{on:E.value.config.scaleAxisMode==="separate"}]),onClick:S[89]||(S[89]=C=>E.value.config.scaleAxisMode="separate")},"XY分离",2)])]),Ue(jn,{label:E.value.config.scaleAxisMode==="uniform"?"初始缩放":"缩放 X","allow-curve":!1,mode:E.value.config.scaleMode,"onUpdate:mode":S[90]||(S[90]=C=>E.value.config.scaleMode=C),"value-min":E.value.config.scaleMin,"onUpdate:valueMin":S[91]||(S[91]=C=>E.value.config.scaleMin=C),"value-max":E.value.config.scaleMax,"onUpdate:valueMax":S[92]||(S[92]=C=>E.value.config.scaleMax=C),curve:E.value.config.scaleCurve,"onUpdate:curve":S[93]||(S[93]=C=>E.value.config.scaleCurve=C),min:0,max:5,step:.05,"curve-label":"随机采样 →"},null,8,["label","mode","value-min","value-max","curve"]),E.value.config.scaleAxisMode==="separate"?(ie(),Jt(jn,{key:0,label:"缩放 Y","show-modes":!1,"allow-curve":!1,mode:E.value.config.scaleMode,"onUpdate:mode":S[94]||(S[94]=C=>E.value.config.scaleMode=C),"value-min":E.value.config.scaleYMin,"onUpdate:valueMin":S[95]||(S[95]=C=>E.value.config.scaleYMin=C),"value-max":E.value.config.scaleYMax,"onUpdate:valueMax":S[96]||(S[96]=C=>E.value.config.scaleYMax=C),curve:E.value.config.scaleYCurve,"onUpdate:curve":S[97]||(S[97]=C=>E.value.config.scaleYCurve=C),min:0,max:5,step:.05,"curve-label":"随机采样 →"},null,8,["mode","value-min","value-max","curve"])):Ve("",!0),Ue(jn,{label:"初始旋转","allow-direction":"","allow-curve":!1,mode:E.value.config.initialRotationMode,"onUpdate:mode":S[98]||(S[98]=C=>E.value.config.initialRotationMode=C),"value-min":E.value.config.initialRotationMin,"onUpdate:valueMin":S[99]||(S[99]=C=>E.value.config.initialRotationMin=C),"value-max":E.value.config.initialRotationMax,"onUpdate:valueMax":S[100]||(S[100]=C=>E.value.config.initialRotationMax=C),curve:E.value.config.initialRotationCurve,"onUpdate:curve":S[101]||(S[101]=C=>E.value.config.initialRotationCurve=C),min:-360,max:360,step:1,"curve-label":"随机采样 →"},null,8,["mode","value-min","value-max","curve"]),S[283]||(S[283]=M("div",{class:"attr-section-title life-title"},"粒子生命周期变化参数",-1)),M("div",cN,[M("label",hN,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[102]||(S[102]=C=>E.value.config.speedOverLifeEnabled=C)},null,512),[[ei,E.value.config.speedOverLifeEnabled]]),S[276]||(S[276]=M("span",{class:"switch-ui"},null,-1)),S[277]||(S[277]=M("span",null,"生命周期内速度",-1))]),E.value.config.speedOverLifeEnabled?(ie(),Jt(jn,{key:0,label:"速度倍率",mode:E.value.config.speedOverLifeMode,"onUpdate:mode":Ps,"value-min":E.value.config.speedOverLifeMin,"onUpdate:valueMin":S[103]||(S[103]=C=>E.value.config.speedOverLifeMin=C),"value-max":E.value.config.speedOverLifeMax,"onUpdate:valueMax":S[104]||(S[104]=C=>E.value.config.speedOverLifeMax=C),curve:E.value.config.speedOverLifeCurve,"onUpdate:curve":S[105]||(S[105]=C=>E.value.config.speedOverLifeCurve=C),"default-curve":te,min:0,max:3,step:.05,"curve-label":"生命周期 →"},null,8,["mode","value-min","value-max","curve"])):Ve("",!0)]),M("div",uN,[M("label",dN,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[106]||(S[106]=C=>E.value.config.scaleOverLifeEnabled=C),onChange:br},null,544),[[ei,E.value.config.scaleOverLifeEnabled]]),S[278]||(S[278]=M("span",{class:"switch-ui"},null,-1)),S[279]||(S[279]=M("span",null,"生命周期内缩放",-1))]),E.value.config.scaleOverLifeEnabled?(ie(),ae(Ke,{key:0},[M("div",fN,[M("button",{class:Ze(["axis-mode",{on:E.value.config.scaleOverLifeAxisMode==="uniform"}]),onClick:S[107]||(S[107]=C=>E.value.config.scaleOverLifeAxisMode="uniform")},"统一",2),M("button",{class:Ze(["axis-mode",{on:E.value.config.scaleOverLifeAxisMode==="separate"}]),onClick:S[108]||(S[108]=C=>E.value.config.scaleOverLifeAxisMode="separate")},"XY分离",2)]),Ue(jn,{label:E.value.config.scaleOverLifeAxisMode==="uniform"?"缩放倍率":"倍率 X",mode:E.value.config.scaleOverLifeMode,"onUpdate:mode":js,"value-min":E.value.config.scaleOverLifeMin,"onUpdate:valueMin":S[109]||(S[109]=C=>E.value.config.scaleOverLifeMin=C),"value-max":E.value.config.scaleOverLifeMax,"onUpdate:valueMax":S[110]||(S[110]=C=>E.value.config.scaleOverLifeMax=C),curve:E.value.config.scaleOverLifeCurve,"onUpdate:curve":S[111]||(S[111]=C=>E.value.config.scaleOverLifeCurve=C),"default-curve":te,min:0,max:3,step:.05,"curve-label":"生命周期 →"},null,8,["label","mode","value-min","value-max","curve"]),E.value.config.scaleOverLifeAxisMode==="separate"?(ie(),Jt(jn,{key:0,label:"倍率 Y","show-modes":!1,mode:E.value.config.scaleOverLifeMode,"onUpdate:mode":S[112]||(S[112]=C=>E.value.config.scaleOverLifeMode=C),"value-min":E.value.config.scaleYOverLifeMin,"onUpdate:valueMin":S[113]||(S[113]=C=>E.value.config.scaleYOverLifeMin=C),"value-max":E.value.config.scaleYOverLifeMax,"onUpdate:valueMax":S[114]||(S[114]=C=>E.value.config.scaleYOverLifeMax=C),curve:E.value.config.scaleYOverLifeCurve,"onUpdate:curve":S[115]||(S[115]=C=>E.value.config.scaleYOverLifeCurve=C),"default-curve":te,min:0,max:3,step:.05,"curve-label":"生命周期 →"},null,8,["mode","value-min","value-max","curve"])):Ve("",!0)],64)):Ve("",!0)]),M("div",mN,[M("label",pN,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[116]||(S[116]=C=>E.value.config.rotationOverLifeEnabled=C)},null,512),[[ei,E.value.config.rotationOverLifeEnabled]]),S[280]||(S[280]=M("span",{class:"switch-ui"},null,-1)),S[281]||(S[281]=M("span",null,"生命周期内旋转",-1))]),E.value.config.rotationOverLifeEnabled?(ie(),Jt(jn,{key:0,label:"旋转速度",mode:E.value.config.rotationOverLifeMode,"onUpdate:mode":S[117]||(S[117]=C=>E.value.config.rotationOverLifeMode=C),"value-min":E.value.config.rotationSpeedMin,"onUpdate:valueMin":S[118]||(S[118]=C=>E.value.config.rotationSpeedMin=C),"value-max":E.value.config.rotationSpeedMax,"onUpdate:valueMax":S[119]||(S[119]=C=>E.value.config.rotationSpeedMax=C),curve:E.value.config.rotationOverLifeCurve,"onUpdate:curve":S[120]||(S[120]=C=>E.value.config.rotationOverLifeCurve=C),"default-curve":j,min:-720,max:720,step:10,"curve-label":"生命周期 →"},null,8,["mode","value-min","value-max","curve"])):Ve("",!0)])],512),[[Yi,!le.attr]])]),M("div",gN,[M("div",{class:"group-head",onClick:S[122]||(S[122]=C=>Oe("look"))},[M("span",vN,Xe(le.look?"▸":"▾"),1),S[284]||(S[284]=M("span",null,"外观与资源",-1)),M("button",{class:"group-reset",title:"重置外观与资源参数",onClick:S[121]||(S[121]=bt(C=>zi("look"),["stop"]))},"重置")]),ye(M("div",yN,[S[298]||(S[298]=M("div",{class:"look-title"},"透明度",-1)),M("div",xN,[M("button",{class:Ze(["seg-btn",{active:E.value.config.alphaMode==="curve"}]),onClick:S[123]||(S[123]=C=>E.value.config.alphaMode="curve")},"曲线",2),M("button",{class:Ze(["seg-btn",{active:E.value.config.alphaMode==="fixed"}]),onClick:S[124]||(S[124]=C=>E.value.config.alphaMode="fixed")},"固定",2)]),E.value.config.alphaMode==="fixed"?(ie(),Jt(qe,{key:0,label:"透明度",min:0,max:1,step:.01,modelValue:E.value.config.alpha,"onUpdate:modelValue":S[125]||(S[125]=C=>E.value.config.alpha=C)},null,8,["modelValue"])):(ie(),ae(Ke,{key:1},[M("label",bN,[S[286]||(S[286]=M("span",null,"曲线模式",-1)),ye(M("select",{"onUpdate:modelValue":S[126]||(S[126]=C=>E.value.config.curveMode=C),class:"inp"},[...S[285]||(S[285]=[M("option",null,"跟随导出",-1),M("option",null,"线性",-1),M("option",null,"贝塞尔",-1)])],512),[[Ht,E.value.config.curveMode]])]),M("div",wN,[Ue(xn,{modelValue:E.value.config.alphaCurve,"onUpdate:modelValue":S[127]||(S[127]=C=>E.value.config.alphaCurve=C),"default-value":he,mode:T(E.value.config.curveMode)},null,8,["modelValue","mode"]),S[287]||(S[287]=M("div",{class:"curve-labels"},[M("span",null,"0(透明)"),M("span",null,"生命周期 →"),M("span",null,"1(不透明)")],-1))])],64)),M("div",{class:"look-title image-title"},[S[288]||(S[288]=M("span",null,"图片资源",-1)),M("button",{class:"image-add",title:"新增图片资源",onClick:Le},"+")]),(ie(!0),ae(Ke,null,ci(E.value.config.imageResources,C=>(ie(),Jt(zv,{key:C.id,resource:C,"resource-count":E.value.config.imageResources.length,"supports-sequence":"","default-file":"star.png",onPick:Te,onPickSequence:je,onReset:Qe,onRemove:Xt,onUpdateWeight:ns,onToggleLock:Ha},{default:ah(()=>[Ue(qe,{label:"缩放",min:.1,max:3,step:.05,modelValue:C.scale,"onUpdate:modelValue":Q=>C.scale=Q},null,8,["modelValue","onUpdate:modelValue"]),M("label",SN,[S[289]||(S[289]=M("span",null,"轴心 x,y",-1)),ye(M("input",{type:"number",step:"0.05",class:"inp tiny","onUpdate:modelValue":Q=>C.anchorX=Q},null,8,MN),[[ht,C.anchorX,void 0,{number:!0}]]),ye(M("input",{type:"number",step:"0.05",class:"inp tiny","onUpdate:modelValue":Q=>C.anchorY=Q},null,8,_N),[[ht,C.anchorY,void 0,{number:!0}]])]),S[297]||(S[297]=M("div",{class:"resource-divider"},null,-1)),M("label",TN,[S[292]||(S[292]=M("span",null,"颜色",-1)),ye(M("select",{"onUpdate:modelValue":Q=>C.colorMode=Q,class:"inp"},[...S[290]||(S[290]=[M("option",{value:"fixed"},"固定色",-1),M("option",{value:"random"},"随机颜色",-1),M("option",{value:"lifetime"},"生命周期",-1)])],8,AN),[[Ht,C.colorMode]]),ye(M("select",{"onUpdate:modelValue":Q=>C.blend=Q,class:"inp blend-select"},[...S[291]||(S[291]=[M("option",{value:"normal"},"正常",-1),M("option",{value:"add"},"相加",-1),M("option",{value:"multiply"},"相乘",-1),M("option",{value:"screen"},"滤色",-1)])],8,EN),[[Ht,C.blend]])]),C.colorMode==="fixed"?(ie(),ae("label",CN,[S[293]||(S[293]=M("span",null,"固定色",-1)),ye(M("input",{type:"color","onUpdate:modelValue":Q=>C.colorStart=Q,class:"colr"},null,8,IN),[[ht,C.colorStart]]),M("input",{type:"text",class:"hex-input",value:C.colorStart,spellcheck:"false","aria-label":"固定颜色值",onChange:Q=>at(C,Q),onKeydown:Ea(Q=>Pe(C,Q),["enter"])},null,40,RN)])):(ie(),ae(Ke,{key:1},[Ue(Wv,{modelValue:C.colorGradient,"onUpdate:modelValue":Q=>C.colorGradient=Q},null,8,["modelValue","onUpdate:modelValue"]),C.colorMode==="random"?(ie(),ae("div",PN,"每个粒子出生时从色带随机取色,生命周期内保持不变")):Ve("",!0)],64)),M("div",kN,[S[294]||(S[294]=M("span",null,"独立透明度",-1)),M("div",FN,[M("button",{class:Ze({on:C.independentAlpha==="off"}),onClick:Q=>C.independentAlpha="off"},"关闭",10,ON),M("button",{class:Ze({on:C.independentAlpha==="fixed"}),onClick:Q=>C.independentAlpha="fixed"},"固定",10,BN),M("button",{class:Ze({on:C.independentAlpha==="curve"}),onClick:Q=>C.independentAlpha="curve"},"曲线",10,LN)])]),C.independentAlpha==="fixed"?(ie(),Jt(qe,{key:2,label:"透明度",min:0,max:1,step:.01,modelValue:C.alpha,"onUpdate:modelValue":Q=>C.alpha=Q},null,8,["modelValue","onUpdate:modelValue"])):C.independentAlpha==="curve"?(ie(),ae(Ke,{key:3},[M("label",DN,[S[296]||(S[296]=M("span",null,"曲线模式",-1)),ye(M("select",{"onUpdate:modelValue":Q=>C.alphaCurveMode=Q,class:"inp"},[...S[295]||(S[295]=[M("option",null,"跟随导出",-1),M("option",null,"线性",-1),M("option",null,"贝塞尔",-1)])],8,NN),[[Ht,C.alphaCurveMode]])]),M("div",UN,[Ue(xn,{modelValue:C.alphaCurve,"onUpdate:modelValue":Q=>C.alphaCurve=Q,"default-value":xe,mode:T(C.alphaCurveMode)},null,8,["modelValue","onUpdate:modelValue","mode"])])],64)):Ve("",!0)]),_:2},1032,["resource","resource-count"]))),128)),M("input",{ref_key:"textureFileInput",ref:Qr,class:"file-input",type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",onChange:rt},null,544),M("input",{ref_key:"sequenceFileInput",ref:Ws,class:"file-input",type:"file",multiple:"",accept:"image/png,image/jpeg,image/webp,image/gif",onChange:Je},null,544)],512),[[Yi,!le.look]])]),M("div",XN,[M("div",{class:"group-head",onClick:S[129]||(S[129]=C=>Oe("mods"))},[M("span",VN,Xe(le.mods?"▸":"▾"),1),S[299]||(S[299]=M("span",null,"修改器",-1)),M("button",{class:"group-reset",title:"重置修改器参数",onClick:S[128]||(S[128]=bt(C=>zi("mods"),["stop"]))},"重置")]),ye(M("div",YN,[M("div",$N,[M("label",GN,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[130]||(S[130]=C=>E.value.config.noise=C)},null,512),[[ei,E.value.config.noise]]),S[300]||(S[300]=M("span",{class:"switch-ui"},null,-1)),S[301]||(S[301]=M("span",null,"开启移动噪声",-1))]),E.value.config.noise?(ie(),ae("div",HN,[Ue(qe,{label:"强度",min:0,max:100,step:1,modelValue:E.value.config.noiseAmt,"onUpdate:modelValue":S[131]||(S[131]=C=>E.value.config.noiseAmt=C)},null,8,["modelValue"]),Ue(qe,{label:"波动范围",min:0,max:500,step:1,modelValue:E.value.config.noiseRange,"onUpdate:modelValue":S[132]||(S[132]=C=>E.value.config.noiseRange=C)},null,8,["modelValue"]),Ue(qe,{label:"时间流速",min:0,max:10,step:.1,modelValue:E.value.config.noiseSpeed,"onUpdate:modelValue":S[133]||(S[133]=C=>E.value.config.noiseSpeed=C)},null,8,["modelValue"]),S[302]||(S[302]=M("div",{class:"modifier-hint"},"强度控制影响比例 · 波动范围控制最大偏移 · 时间流速控制变化速度",-1))])):Ve("",!0)]),M("div",jN,[M("label",WN,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[134]||(S[134]=C=>E.value.config.useGravity=C)},null,512),[[ei,E.value.config.useGravity]]),S[303]||(S[303]=M("span",{class:"switch-ui"},null,-1)),S[304]||(S[304]=M("span",null,"开启重力",-1))]),E.value.config.useGravity?(ie(),ae("div",zN,[M("div",qN,[M("button",{class:Ze(["axis-mode",{on:E.value.config.gravityMode==="fixed"}]),onClick:S[135]||(S[135]=C=>E.value.config.gravityMode="fixed")},"固定",2),M("button",{class:Ze(["axis-mode",{on:E.value.config.gravityMode==="random"}]),onClick:S[136]||(S[136]=C=>E.value.config.gravityMode="random")},"随机",2)]),E.value.config.gravityMode==="fixed"?(ie(),Jt(qe,{key:0,label:"重力强度",min:-3e3,max:3e3,step:10,modelValue:E.value.config.gravityMin,"onUpdate:modelValue":S[137]||(S[137]=C=>E.value.config.gravityMin=C)},null,8,["modelValue"])):(ie(),ae(Ke,{key:1},[Ue(qe,{label:"强度 min",min:-3e3,max:3e3,step:10,modelValue:E.value.config.gravityMin,"onUpdate:modelValue":S[138]||(S[138]=C=>E.value.config.gravityMin=C)},null,8,["modelValue"]),Ue(qe,{label:"强度 max",min:-3e3,max:3e3,step:10,modelValue:E.value.config.gravityMax,"onUpdate:modelValue":S[139]||(S[139]=C=>E.value.config.gravityMax=C)},null,8,["modelValue"])],64)),Ue(qe,{label:"方向",min:-360,max:360,step:1,modelValue:E.value.config.gravityDirection,"onUpdate:modelValue":S[140]||(S[140]=C=>E.value.config.gravityDirection=C)},null,8,["modelValue"]),S[305]||(S[305]=M("div",{class:"gravity-curve-title"},[M("span",null,"生命周期内重力"),M("span",null,"纵轴:强度 0~1")],-1)),Ue(xn,{modelValue:E.value.config.gravityCurve,"onUpdate:modelValue":S[141]||(S[141]=C=>E.value.config.gravityCurve=C),"default-value":te},null,8,["modelValue"]),S[306]||(S[306]=M("div",{class:"gravity-curve-axis"},[M("span",null,"0"),M("span",null,"生命周期 →"),M("span",null,"1")],-1)),S[307]||(S[307]=M("div",{class:"modifier-hint"},"0° 向右 · -90° 向下 · 负强度会反转方向",-1))])):Ve("",!0)]),M("div",KN,[M("label",ZN,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[142]||(S[142]=C=>E.value.config.wind=C)},null,512),[[ei,E.value.config.wind]]),S[308]||(S[308]=M("span",{class:"switch-ui"},null,-1)),S[309]||(S[309]=M("span",null,"开启风力",-1))]),E.value.config.wind?(ie(),ae("div",JN,[M("div",QN,[M("button",{class:Ze(["axis-mode",{on:E.value.config.windMode==="fixed"}]),onClick:S[143]||(S[143]=C=>E.value.config.windMode="fixed")},"固定",2),M("button",{class:Ze(["axis-mode",{on:E.value.config.windMode==="random"}]),onClick:S[144]||(S[144]=C=>E.value.config.windMode="random")},"随机",2)]),E.value.config.windMode==="fixed"?(ie(),Jt(qe,{key:0,label:"风力强度",min:-3e3,max:3e3,step:10,modelValue:E.value.config.windMin,"onUpdate:modelValue":S[145]||(S[145]=C=>E.value.config.windMin=C)},null,8,["modelValue"])):(ie(),ae(Ke,{key:1},[Ue(qe,{label:"强度 min",min:-3e3,max:3e3,step:10,modelValue:E.value.config.windMin,"onUpdate:modelValue":S[146]||(S[146]=C=>E.value.config.windMin=C)},null,8,["modelValue"]),Ue(qe,{label:"强度 max",min:-3e3,max:3e3,step:10,modelValue:E.value.config.windMax,"onUpdate:modelValue":S[147]||(S[147]=C=>E.value.config.windMax=C)},null,8,["modelValue"])],64)),Ue(qe,{label:"方向",min:-360,max:360,step:1,modelValue:E.value.config.windDirection,"onUpdate:modelValue":S[148]||(S[148]=C=>E.value.config.windDirection=C)},null,8,["modelValue"]),S[310]||(S[310]=M("div",{class:"gravity-curve-title"},[M("span",null,"生命周期内风力"),M("span",null,"纵轴:强度 0~1")],-1)),Ue(xn,{modelValue:E.value.config.windCurve,"onUpdate:modelValue":S[149]||(S[149]=C=>E.value.config.windCurve=C),"default-value":te},null,8,["modelValue"]),S[311]||(S[311]=M("div",{class:"gravity-curve-axis"},[M("span",null,"0"),M("span",null,"生命周期 →"),M("span",null,"1")],-1)),S[312]||(S[312]=M("div",{class:"modifier-hint"},"0° 向右 · -90° 向下 · 负强度会反转方向",-1))])):Ve("",!0)]),M("div",e4,[M("label",t4,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[150]||(S[150]=C=>E.value.config.forceField=C)},null,512),[[ei,E.value.config.forceField]]),S[313]||(S[313]=M("span",{class:"switch-ui"},null,-1)),S[314]||(S[314]=M("span",null,"开启力场",-1))]),E.value.config.forceField?(ie(),ae("div",i4,[Ue(qe,{label:"中心 X",min:-5e3,max:5e3,step:1,modelValue:E.value.config.forceCenterX,"onUpdate:modelValue":S[151]||(S[151]=C=>E.value.config.forceCenterX=C)},null,8,["modelValue"]),Ue(qe,{label:"中心 Y",min:-5e3,max:5e3,step:1,modelValue:E.value.config.forceCenterY,"onUpdate:modelValue":S[152]||(S[152]=C=>E.value.config.forceCenterY=C)},null,8,["modelValue"]),Ue(qe,{label:"力场强度",min:-300,max:300,step:1,modelValue:E.value.config.forceStrength,"onUpdate:modelValue":S[153]||(S[153]=C=>E.value.config.forceStrength=C)},null,8,["modelValue"]),Ue(qe,{label:"力场半径",min:1,max:2e3,step:1,modelValue:E.value.config.forceRadius,"onUpdate:modelValue":S[154]||(S[154]=C=>E.value.config.forceRadius=C)},null,8,["modelValue"]),M("label",s4,[S[316]||(S[316]=M("span",null,"衰减模式",-1)),ye(M("select",{"onUpdate:modelValue":S[155]||(S[155]=C=>E.value.config.forceFalloff=C),class:"inp"},[...S[315]||(S[315]=[M("option",{value:"constant"},"恒定(范围内力度不变)",-1),M("option",{value:"linear"},"线性衰减(边缘为 0)",-1),M("option",{value:"inverse"},"距离反比(中心最强)",-1)])],512),[[Ht,E.value.config.forceFalloff]])]),S[317]||(S[317]=M("div",{class:"modifier-hint"},"正数吸向中心 · 负数向外排斥 · 可在画布内拖动力场圆",-1))])):Ve("",!0)]),M("div",n4,[M("label",r4,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[156]||(S[156]=C=>E.value.config.attraction=C)},null,512),[[ei,E.value.config.attraction]]),S[318]||(S[318]=M("span",{class:"switch-ui"},null,-1)),S[319]||(S[319]=M("span",null,"开启吸附",-1))]),E.value.config.attraction?(ie(),ae("div",a4,[Ue(qe,{label:"吸附点 X",min:-5e3,max:5e3,step:1,modelValue:E.value.config.attractionCenterX,"onUpdate:modelValue":S[157]||(S[157]=C=>E.value.config.attractionCenterX=C)},null,8,["modelValue"]),Ue(qe,{label:"吸附点 Y",min:-5e3,max:5e3,step:1,modelValue:E.value.config.attractionCenterY,"onUpdate:modelValue":S[158]||(S[158]=C=>E.value.config.attractionCenterY=C)},null,8,["modelValue"]),Ue(qe,{label:"吸附半径",min:0,max:2e3,step:1,modelValue:E.value.config.attractionRadius,"onUpdate:modelValue":S[159]||(S[159]=C=>E.value.config.attractionRadius=C)},null,8,["modelValue"]),Ue(qe,{label:"吸附时长",min:.05,max:30,step:.05,modelValue:E.value.config.attractionDuration,"onUpdate:modelValue":S[160]||(S[160]=C=>E.value.config.attractionDuration=C)},null,8,["modelValue"]),Ue(qe,{label:"延迟时间",min:0,max:30,step:.05,modelValue:E.value.config.attractionDelay,"onUpdate:modelValue":S[161]||(S[161]=C=>E.value.config.attractionDelay=C)},null,8,["modelValue"]),M("label",o4,[S[321]||(S[321]=M("span",null,"延迟方式",-1)),ye(M("select",{"onUpdate:modelValue":S[162]||(S[162]=C=>E.value.config.attractionDelayMode=C),class:"inp"},[...S[320]||(S[320]=[M("option",{value:"global"},"统一时间",-1),M("option",{value:"particle"},"单粒子生命",-1)])],512),[[Ht,E.value.config.attractionDelayMode]])]),M("label",l4,[S[323]||(S[323]=M("span",null,"吸附方式",-1)),ye(M("select",{"onUpdate:modelValue":S[163]||(S[163]=C=>E.value.config.attractionPath=C),class:"inp"},[...S[322]||(S[322]=[M("option",{value:"linear"},"直线",-1),M("option",{value:"curve"},"曲线",-1)])],512),[[Ht,E.value.config.attractionPath]])]),S[324]||(S[324]=M("div",{class:"modifier-hint"},"延迟后从当前位置开始吸附 · 到达红色范围即死亡 · 可在画布内拖动吸附圆",-1))])):Ve("",!0)]),M("div",c4,[M("label",h4,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[164]||(S[164]=C=>E.value.config.trail=C)},null,512),[[ei,E.value.config.trail]]),S[325]||(S[325]=M("span",{class:"switch-ui"},null,-1)),S[326]||(S[326]=M("span",null,"开启拖尾",-1))]),E.value.config.trail?(ie(),ae("div",u4,[M("div",{class:"trail-section-head"},[S[327]||(S[327]=M("div",{class:"trail-section-title"},"拖尾独立图片",-1)),M("button",{class:"image-add",title:"增加拖尾图片资源",onClick:ea},"+")]),(ie(!0),ae(Ke,null,ci(E.value.config.trailResources,C=>(ie(),Jt(zv,{key:C.id,resource:C,"resource-count":E.value.config.trailResources.length,"default-file":"trail.png","name-placeholder":"trail","show-folder":!1,onPick:ta,onReset:ue,onRemove:ve,onUpdateWeight:Me,onToggleLock:be},{default:ah(()=>[S[343]||(S[343]=M("div",{class:"resource-divider"},null,-1)),Ue(qe,{label:"旋转",min:-360,max:360,step:1,"model-value":C.rotation,"onUpdate:modelValue":Q=>ee(C.id,Q)},null,8,["model-value","onUpdate:modelValue"]),Ue(qe,{label:"拖尾骨骼数",min:2,max:16,step:1,"model-value":C.boneCount,"onUpdate:modelValue":Q=>Y(C.id,Q)},null,8,["model-value","onUpdate:modelValue"]),Ue(qe,{label:"拖尾比例 (%)",min:0,max:100,step:1,modelValue:C.trailRatio,"onUpdate:modelValue":Q=>C.trailRatio=Q},null,8,["modelValue","onUpdate:modelValue"]),M("label",d4,[S[329]||(S[329]=M("span",null,"拖尾长度",-1)),ye(M("select",{"onUpdate:modelValue":Q=>C.lengthMode=Q,class:"inp"},[...S[328]||(S[328]=[M("option",{value:"fixed"},"固定",-1),M("option",{value:"random"},"随机范围",-1)])],8,f4),[[Ht,C.lengthMode]])]),C.lengthMode==="fixed"?(ie(),Jt(qe,{key:0,label:"长度比例 (%)",min:0,max:500,step:1,modelValue:C.length,"onUpdate:modelValue":Q=>C.length=Q},null,8,["modelValue","onUpdate:modelValue"])):(ie(),ae(Ke,{key:1},[Ue(qe,{label:"长度最小 (%)",min:0,max:500,step:1,modelValue:C.lengthMin,"onUpdate:modelValue":Q=>C.lengthMin=Q},null,8,["modelValue","onUpdate:modelValue"]),Ue(qe,{label:"长度最大 (%)",min:0,max:500,step:1,modelValue:C.lengthMax,"onUpdate:modelValue":Q=>C.lengthMax=Q},null,8,["modelValue","onUpdate:modelValue"])],64)),M("label",m4,[S[331]||(S[331]=M("span",null,"拖尾宽度",-1)),ye(M("select",{"onUpdate:modelValue":Q=>C.widthSizeMode=Q,class:"inp"},[...S[330]||(S[330]=[M("option",{value:"fixed"},"固定",-1),M("option",{value:"random"},"随机范围",-1)])],8,p4),[[Ht,C.widthSizeMode]])]),C.widthSizeMode==="fixed"?(ie(),Jt(qe,{key:2,label:"宽度比例 (%)",min:0,max:500,step:1,modelValue:C.width,"onUpdate:modelValue":Q=>C.width=Q},null,8,["modelValue","onUpdate:modelValue"])):(ie(),ae(Ke,{key:3},[Ue(qe,{label:"宽度最小 (%)",min:0,max:500,step:1,modelValue:C.widthMin,"onUpdate:modelValue":Q=>C.widthMin=Q},null,8,["modelValue","onUpdate:modelValue"]),Ue(qe,{label:"宽度最大 (%)",min:0,max:500,step:1,modelValue:C.widthMax,"onUpdate:modelValue":Q=>C.widthMax=Q},null,8,["modelValue","onUpdate:modelValue"])],64)),M("label",g4,[S[333]||(S[333]=M("span",null,"宽度缩放",-1)),ye(M("select",{"onUpdate:modelValue":Q=>C.widthMode=Q,class:"inp"},[...S[332]||(S[332]=[M("option",{value:"particle"},"跟随粒子",-1),M("option",{value:"fixed"},"固定",-1)])],8,v4),[[Ht,C.widthMode]])]),M("label",y4,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Q=>C.lifeLengthEnabled=Q},null,8,x4),[[ei,C.lifeLengthEnabled]]),S[334]||(S[334]=M("span",{class:"switch-ui"},null,-1)),S[335]||(S[335]=M("span",null,"生命周期长度曲线",-1))]),C.lifeLengthEnabled?(ie(),Jt(xn,{key:4,modelValue:C.lifeLengthCurve,"onUpdate:modelValue":Q=>C.lifeLengthCurve=Q,"default-value":te},null,8,["modelValue","onUpdate:modelValue"])):Ve("",!0),M("label",b4,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Q=>C.shapeEnabled=Q},null,8,w4),[[ei,C.shapeEnabled]]),S[336]||(S[336]=M("span",{class:"switch-ui"},null,-1)),S[337]||(S[337]=M("span",null,"形状曲线(首端 → 尾端宽度)",-1))]),C.shapeEnabled?(ie(),Jt(xn,{key:5,modelValue:C.shapeCurve,"onUpdate:modelValue":Q=>C.shapeCurve=Q,"default-value":ge},null,8,["modelValue","onUpdate:modelValue"])):Ve("",!0),M("div",S4,[S[338]||(S[338]=M("span",null,"颜色模式",-1)),M("div",M4,[M("button",{class:Ze(["axis-mode",{on:C.colorMode==="particle"}]),onClick:Q=>C.colorMode="particle"},"跟随粒子",10,_4),M("button",{class:Ze(["axis-mode",{on:C.colorMode==="fixed"}]),onClick:Q=>C.colorMode="fixed"},"固定",10,T4),M("button",{class:Ze(["axis-mode",{on:C.colorMode==="curve"}]),onClick:Q=>C.colorMode="curve"},"曲线",10,A4)])]),M("label",E4,[S[340]||(S[340]=M("span",null,"混合模式",-1)),ye(M("select",{"onUpdate:modelValue":Q=>C.blend=Q,class:"inp"},[...S[339]||(S[339]=[M("option",{value:"normal"},"正常",-1),M("option",{value:"add"},"相加",-1),M("option",{value:"multiply"},"相乘",-1),M("option",{value:"screen"},"滤色",-1)])],8,C4),[[Ht,C.blend]])]),C.colorMode==="fixed"?(ie(),ae("label",I4,[S[341]||(S[341]=M("span",null,"固定颜色",-1)),ye(M("input",{class:"colr",type:"color","onUpdate:modelValue":Q=>C.color=Q},null,8,R4),[[ht,C.color]]),M("input",{class:"hex-input",value:C.color,onChange:Q=>De(C,Q),onKeydown:Ea(bt(Q=>Ie(C,Q),["prevent"]),["enter"])},null,40,P4)])):C.colorMode==="curve"?(ie(),Jt(Wv,{key:7,modelValue:C.colorGradient,"onUpdate:modelValue":Q=>C.colorGradient=Q},null,8,["modelValue","onUpdate:modelValue"])):Ve("",!0),M("div",k4,[S[342]||(S[342]=M("span",null,"透明度模式",-1)),M("div",F4,[M("button",{class:Ze(["axis-mode",{on:C.alphaMode==="particle"}]),onClick:Q=>C.alphaMode="particle"},"跟随粒子",10,O4),M("button",{class:Ze(["axis-mode",{on:C.alphaMode==="fixed"}]),onClick:Q=>C.alphaMode="fixed"},"固定",10,B4),M("button",{class:Ze(["axis-mode",{on:C.alphaMode==="curve"}]),onClick:Q=>C.alphaMode="curve"},"曲线",10,L4)])]),C.alphaMode==="fixed"?(ie(),Jt(qe,{key:8,label:"透明度",min:0,max:1,step:.01,modelValue:C.alpha,"onUpdate:modelValue":Q=>C.alpha=Q},null,8,["modelValue","onUpdate:modelValue"])):Ve("",!0),C.alphaMode==="curve"?(ie(),Jt(xn,{key:9,modelValue:C.alphaCurve,"onUpdate:modelValue":Q=>C.alphaCurve=Q,"default-value":oe},null,8,["modelValue","onUpdate:modelValue"])):Ve("",!0)]),_:2},1032,["resource","resource-count"]))),128)),M("input",{ref_key:"trailTextureFileInput",ref:Vn,class:"file-input",type:"file",accept:"image/png,image/jpeg,image/webp",onChange:ne},null,544),M("div",D4,[Ue(qe,{label:"网格行数",min:2,max:16,step:1,"model-value":E.value.config.trailGridRows,"onUpdate:modelValue":S[165]||(S[165]=C=>H("trailGridRows",C))},null,8,["model-value"]),Ue(qe,{label:"网格列数",min:2,max:32,step:1,"model-value":E.value.config.trailGridCols,"onUpdate:modelValue":S[166]||(S[166]=C=>H("trailGridCols",C))},null,8,["model-value"])]),S[344]||(S[344]=M("div",{class:"modifier-hint"},"每个粒子按资源比例生成一组同级拖尾骨骼;随机长度与宽度在粒子出生时确定,相同种子可稳定复现",-1))])):Ve("",!0)]),M("div",N4,[M("label",U4,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[167]||(S[167]=C=>E.value.config.emitterFollow=C),disabled:E.value.config.streamBehavior==="loop"},null,8,X4),[[ei,E.value.config.emitterFollow]]),S[345]||(S[345]=M("span",{class:"switch-ui"},null,-1)),S[346]||(S[346]=M("span",null,"开启发射器跟随",-1))]),E.value.config.emitterFollow&&E.value.config.streamBehavior!=="loop"?(ie(),ae("div",V4,[M("label",Y4,[S[349]||(S[349]=M("span",null,"跟随模式",-1)),M("select",{value:E.value.config.emitterFollowMode,class:"inp",onChange:S[168]||(S[168]=C=>Kt(C,E.value.config))},[S[347]||(S[347]=M("option",{value:"none"},"无",-1)),S[348]||(S[348]=M("option",{value:"path"},"跟随路径",-1)),we.value||E.value.config.emitterFollowMode==="bone"?(ie(),ae("option",G4,"选中的骨骼")):Ve("",!0)],40,$4)]),E.value.config.emitterFollowMode==="path"?(ie(),ae(Ke,{key:0},[M("label",H4,[S[351]||(S[351]=M("span",null,"跟随路径",-1)),ye(M("select",{"onUpdate:modelValue":S[169]||(S[169]=C=>E.value.config.emitterFollowPathId=C),class:"inp"},[S[350]||(S[350]=M("option",{value:0},"无",-1)),(ie(!0),ae(Ke,null,ci(ke(e).paths,C=>(ie(),ae("option",{key:C.id,value:C.id},Xe(C.name),9,j4))),128))],512),[[Ht,E.value.config.emitterFollowPathId,void 0,{number:!0}]])]),M("label",W4,[S[353]||(S[353]=M("span",null,"发射器角度模式",-1)),ye(M("select",{"onUpdate:modelValue":S[170]||(S[170]=C=>E.value.config.emitterAngleMode=C),class:"inp"},[...S[352]||(S[352]=[M("option",{value:"fixed"},"固定角度",-1),M("option",{value:"direction"},"跟随移动方向",-1)])],512),[[Ht,E.value.config.emitterAngleMode]])]),S[359]||(S[359]=M("div",{class:"gravity-curve-title"},[M("span",null,"移动进度曲线 (0→1)")],-1)),Ue(xn,{modelValue:E.value.config.emitterFollowCurve,"onUpdate:modelValue":S[171]||(S[171]=C=>E.value.config.emitterFollowCurve=C),"default-value":j},null,8,["modelValue"]),M("div",z4,[M("label",q4,[S[354]||(S[354]=M("span",null,"移动时长 (s)",-1)),ye(M("input",{"onUpdate:modelValue":S[172]||(S[172]=C=>E.value.config.emitterFollowDuration=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[ht,E.value.config.emitterFollowDuration,void 0,{number:!0}]])]),M("label",K4,[S[356]||(S[356]=M("span",null,"跟随空间",-1)),ye(M("select",{"onUpdate:modelValue":S[173]||(S[173]=C=>E.value.config.emitterFollowSpace=C),class:"inp"},[...S[355]||(S[355]=[M("option",{value:"local"},"局部空间(GEN 移动)",-1),M("option",{value:"world"},"世界空间(粒子生成点移动)",-1)])],512),[[Ht,E.value.config.emitterFollowSpace]])])]),M("label",Z4,[S[358]||(S[358]=M("span",null,"移动方向",-1)),ye(M("select",{"onUpdate:modelValue":S[174]||(S[174]=C=>E.value.config.emitterFollowDirection=C),class:"inp"},[...S[357]||(S[357]=[M("option",{value:"forward"},"正向(起点 → 终点)",-1),M("option",{value:"reverse"},"反向(终点 → 起点)",-1)])],512),[[Ht,E.value.config.emitterFollowDirection]])]),Ue(qe,{label:"偏移起始点 (0-1)",min:0,max:1,step:.01,modelValue:E.value.config.emitterFollowOffset,"onUpdate:modelValue":S[175]||(S[175]=C=>E.value.config.emitterFollowOffset=C)},null,8,["modelValue"]),S[360]||(S[360]=M("div",{class:"modifier-hint"},"局部空间会移动整个发射器;世界空间只移动新粒子的生成点,已出生粒子留在世界位置。",-1))],64)):E.value.config.emitterFollowMode==="bone"?(ie(),ae(Ke,{key:1},[Ee.value?(ie(),ae("div",J4,[S[361]||(S[361]=Qt("跟随目标:",-1)),M("strong",null,Xe(Ee.value.spine.name)+" / "+Xe(Ee.value.boneName),1)])):(ie(),ae("div",Q4,"尚未绑定有效骨骼,请先在 Spine 层级树中选择骨骼。")),we.value&&(!Ee.value||we.value.spine.id!==Ee.value.spine.id||we.value.boneName!==Ee.value.boneName)?(ie(),ae("button",{key:2,class:"bone-follow-rebind",onClick:S[176]||(S[176]=C=>Ti(E.value.config))},Xe(Ee.value?"重新绑定":"绑定")+"当前选中骨骼:"+Xe(we.value.spine.name)+" / "+Xe(we.value.boneName),1)):Ve("",!0),Ee.value?(ie(),ae(Ke,{key:3},[M("label",e5,[S[363]||(S[363]=M("span",null,"跟随空间",-1)),ye(M("select",{"onUpdate:modelValue":S[177]||(S[177]=C=>E.value.config.emitterFollowSpace=C),class:"inp"},[...S[362]||(S[362]=[M("option",{value:"local"},"本地空间(随骨骼移动)",-1),M("option",{value:"world"},"世界空间(粒子生成后保持位置)",-1)])],512),[[Ht,E.value.config.emitterFollowSpace]])]),M("div",t5,[M("label",i5,[S[364]||(S[364]=M("span",null,"位移偏移 X",-1)),ye(M("input",{"onUpdate:modelValue":S[178]||(S[178]=C=>E.value.config.emitterFollowBoneOffsetX=C),type:"number",step:"1",class:"inp"},null,512),[[ht,E.value.config.emitterFollowBoneOffsetX,void 0,{number:!0}]])]),M("label",s5,[S[365]||(S[365]=M("span",null,"位移偏移 Y",-1)),ye(M("input",{"onUpdate:modelValue":S[179]||(S[179]=C=>E.value.config.emitterFollowBoneOffsetY=C),type:"number",step:"1",class:"inp"},null,512),[[ht,E.value.config.emitterFollowBoneOffsetY,void 0,{number:!0}]])])]),M("div",n5,[M("label",r5,[S[366]||(S[366]=M("span",null,"旋转偏移",-1)),ye(M("input",{"onUpdate:modelValue":S[180]||(S[180]=C=>E.value.config.emitterFollowBoneRotation=C),type:"number",step:"1",class:"inp"},null,512),[[ht,E.value.config.emitterFollowBoneRotation,void 0,{number:!0}]])]),M("label",a5,[S[367]||(S[367]=M("span",null,"缩放偏移 X",-1)),ye(M("input",{"onUpdate:modelValue":S[181]||(S[181]=C=>E.value.config.emitterFollowBoneScaleX=C),type:"number",step:"0.05",class:"inp"},null,512),[[ht,E.value.config.emitterFollowBoneScaleX,void 0,{number:!0}]])]),M("label",o5,[S[368]||(S[368]=M("span",null,"缩放偏移 Y",-1)),ye(M("input",{"onUpdate:modelValue":S[182]||(S[182]=C=>E.value.config.emitterFollowBoneScaleY=C),type:"number",step:"0.05",class:"inp"},null,512),[[ht,E.value.config.emitterFollowBoneScaleY,void 0,{number:!0}]])])]),S[369]||(S[369]=M("div",{class:"modifier-hint"},"发射器只跟随所选 Spine 骨骼的位置,不继承 Spine 的旋转或缩放;粒子变换使用粒子系统自身参数和上方偏移。",-1))],64)):Ve("",!0)],64)):Ve("",!0)])):Ve("",!0)]),M("div",l5,[M("label",c5,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[183]||(S[183]=C=>E.value.config.collision=C)},null,512),[[ei,E.value.config.collision]]),S[370]||(S[370]=M("span",{class:"switch-ui"},null,-1)),S[371]||(S[371]=M("span",null,"开启碰撞",-1))]),E.value.config.collision?(ie(),ae("div",h5,[S[372]||(S[372]=M("div",{class:"collision-filter-title"},"参与的碰撞对象",-1)),M("div",u5,[(ie(!0),ae(Ke,null,ci(Ae.value,C=>(ie(),ae("span",{key:C.id,class:Ze(["collision-filter-tag",{disabled:!C.enabled}]),title:C.enabled?C.name:`${C.name}(碰撞体已禁用)`},[M("span",null,Xe(C.name),1),M("button",{type:"button","aria-label":`清除碰撞对象 ${C.name}`,onClick:Q=>z(C.id)},"×",8,f5)],10,d5))),128)),M("button",{type:"button",class:Ze(["collision-filter-add",{active:pe.value}]),disabled:G.value.length===0,title:G.value.length?"加入场景碰撞对象":"没有可加入的碰撞对象",onClick:S[184]||(S[184]=C=>pe.value=!pe.value)},"+",10,m5)]),Ae.value.length===0?(ie(),ae("div",p5,"未选择碰撞对象,当前粒子不会发生碰撞")):Ve("",!0),pe.value&&G.value.length?(ie(),ae("div",g5,[(ie(!0),ae(Ke,null,ci(G.value,C=>(ie(),ae("button",{key:C.id,type:"button",onClick:Q=>Z(C.id)},[M("span",null,Xe(C.name),1),M("small",null,Xe(C.enabled?"可用":"已禁用"),1)],8,v5))),128))])):Ve("",!0),S[373]||(S[373]=M("div",{class:"modifier-hint"},"只有已加入且启用的场景碰撞对象会参与当前粒子系统的碰撞",-1))])):Ve("",!0)]),Ue(qe,{label:"阻尼",min:0,max:2,step:.05,modelValue:E.value.config.damping,"onUpdate:modelValue":S[185]||(S[185]=C=>E.value.config.damping=C)},null,8,["modelValue"])],512),[[Yi,!le.mods]])]),M("div",y5,[M("div",{class:"group-head",onClick:S[187]||(S[187]=C=>Oe("export"))},[M("span",x5,Xe(le.export?"▸":"▾"),1),S[374]||(S[374]=M("span",null,"导出设置",-1)),M("button",{class:"group-reset",title:"重置导出设置",onClick:S[186]||(S[186]=bt(C=>zi("export"),["stop"]))},"重置")]),ye(M("div",b5,[M("label",w5,[S[375]||(S[375]=M("span",null,"图片路径 (Spine Images Path)",-1)),ye(M("input",{"onUpdate:modelValue":S[188]||(S[188]=C=>t.value.imagesPath=C),class:"inp export-input",type:"text",placeholder:"./images/"},null,512),[[ht,t.value.imagesPath,void 0,{trim:!0}]])]),M("label",S5,[S[377]||(S[377]=M("span",null,"Spine 版本",-1)),ye(M("select",{"onUpdate:modelValue":S[189]||(S[189]=C=>t.value.spineVersion=C),class:"inp export-input"},[...S[376]||(S[376]=[Ts('',5)])],512),[[Ht,t.value.spineVersion]])]),M("label",M5,[S[379]||(S[379]=M("span",null,"关键帧插值曲线",-1)),ye(M("select",{"onUpdate:modelValue":S[190]||(S[190]=C=>t.value.keyframeCurve=C),class:"inp export-input"},[...S[378]||(S[378]=[M("option",{value:"linear"},"线性 (Linear)",-1),M("option",{value:"bezier"},"平滑贝塞尔 (Smooth Bézier)",-1)])],512),[[Ht,t.value.keyframeCurve]])]),S[388]||(S[388]=M("div",{class:"export-help"},"平滑贝塞尔会在误差允许范围内拟合连续运动;出生、死亡、附件切换和突变仍使用阶跃关键帧。",-1)),t.value.spineVersion==="3.8"?(ie(),ae("div",_5,"Spine 3.8 不支持 4.x 的逐通道数组贝塞尔,导出时会转换为经过容差精简的分段线性关键帧。")):Ve("",!0),M("div",T5,[M("label",A5,[S[380]||(S[380]=M("span",null,"导出 FPS",-1)),ye(M("input",{"onUpdate:modelValue":S[191]||(S[191]=C=>t.value.fps=C),class:"inp export-input",type:"number",min:"1",max:"240",step:"1",onChange:dn},null,544),[[ht,t.value.fps,void 0,{number:!0}]])]),M("label",E5,[ye(M("input",{"onUpdate:modelValue":S[192]||(S[192]=C=>t.value.omitFps=C),type:"checkbox"},null,512),[[ei,t.value.omitFps]]),S[381]||(S[381]=Qt("不写 fps",-1))])]),S[389]||(S[389]=M("div",{class:"export-help"},"修改 FPS 时保持动画实际秒数不变;“不写 fps”只省略 Spine 的 fps 元数据。",-1)),M("div",C5,[M("label",I5,[ye(M("input",{"onUpdate:modelValue":S[193]||(S[193]=C=>t.value.integerFrameAlignment=C),type:"checkbox"},null,512),[[ei,t.value.integerFrameAlignment]]),S[382]||(S[382]=M("span",{class:"switch-ui"},null,-1)),S[383]||(S[383]=M("span",null,"整数帧对齐",-1))]),M("label",R5,[ye(M("input",{"onUpdate:modelValue":S[194]||(S[194]=C=>t.value.bonePool=C),type:"checkbox"},null,512),[[ei,t.value.bonePool]]),S[384]||(S[384]=M("span",{class:"switch-ui"},null,-1)),S[385]||(S[385]=M("span",null,"骨骼对象池",-1))]),M("label",P5,[ye(M("input",{"onUpdate:modelValue":S[195]||(S[195]=C=>t.value.excludeEmptyAnimations=C),type:"checkbox"},null,512),[[ei,t.value.excludeEmptyAnimations]]),S[386]||(S[386]=M("span",{class:"switch-ui"},null,-1)),S[387]||(S[387]=M("span",null,"排除无内容动画",-1))])])],512),[[Yi,!le.export]])])],64)):Ve("",!0)]),M("div",k5,[M("button",{type:"button",class:"export-spine-json",disabled:l.value,title:l.value?"正在重新计算并烘焙动画":`导出 Spine ${t.value.spineVersion} JSON`,onClick:L},Xe(l.value&&c.value==="json"?"正在准备导出…":"导出Spine Json"),9,F5),M("button",{type:"button",class:"export-spine-images",disabled:l.value,title:"单独下载当前粒子系统使用的图片 ZIP",onClick:O},Xe(l.value&&c.value==="images"?"正在整理图片…":"导出 images 包"),9,O5),M("button",{type:"button",class:"export-spine-project",disabled:l.value||!b.value,title:A.value,onClick:N},[M("span",null,Xe(l.value&&c.value==="spine"?"正在生成工程…":"导出 .spine 包"),1),!l.value&&w.value?(ie(),ae("small",L5,Xe(w.value),1)):Ve("",!0)],8,B5)]),M("div",{class:Ze(["connector-status",v.value])},[S[390]||(S[390]=M("span",{class:"connector-dot"},null,-1)),Qt(Xe(g.value)+" ",1),y.value?(ie(),ae("a",{key:0,href:y.value,target:"_blank",rel:"noopener",title:"在本机连接器中授权当前网站"},"授权当前网站",8,D5)):Ve("",!0),M("button",{type:"button",title:"重新检测连接器",onClick:B},"刷新")],2),u.value?(ie(),ae("div",{key:0,class:Ze(["export-message",{error:d.value}])},[Qt(Xe(u.value)+" ",1),p.value?(ie(),ae("a",{key:0,href:p.value,target:"_blank",rel:"noopener",onClick:S[196]||(S[196]=C=>p.value="")},"授权当前网站",8,N5)):Ve("",!0)],2)):Ve("",!0)]))}}),X5=Gs(U5,[["__scopeId","data-v-a377e4d4"]]),V5={class:"timeline"},Y5={class:"tl-controls"},$5=["title"],G5={class:"tl-range",title:"自定义播放起始帧"},H5=["max","onKeydown"],j5={class:"tl-range",title:"自定义播放结束帧"},W5=["min","max","onKeydown"],z5=["title"],q5={class:"tl-frame"},K5=["disabled"],Z5=["onClick"],J5={key:0},Q5={class:"tl-animation-editor"},eU={key:0,class:"tl-animation-error"},tU={class:"tl-animation-actions"},iU=["disabled"],sU={key:1,class:"tl-animation-hint"},nU={class:"tl-anim tl-spine-preview"},rU=["value","disabled"],aU={value:""},oU=["value"],lU={class:"tl-zoom"},cU={class:"tl-ticks"},hU={class:"tl-ticklabel"},uU={class:"tl-lanes"},dU=["onPointerdown"],fU={class:"lane-name"},mU=["onPointerdown"],pU=["onPointerdown"],gU=["onPointerdown"],vU={class:"lane-name"},yU={key:0,class:"tl-empty"},xU=$s({__name:"Timeline",setup(s){const e=Kl(),t=lt(null),i=lt(null),n=lt(!1),r=lt("animation"),a=lt("");Jo(()=>{(!Array.isArray(e.timeline.animations)||!e.timeline.animations.length)&&(e.timeline.animations=["animation"]),e.timeline.animations.includes(e.timeline.animation)||(e.timeline.animation=e.timeline.animations[0]);for(const z of e.systems)(!z.animation||!e.timeline.animations.includes(z.animation))&&(z.animation=e.timeline.animations[0])});const o=vt(()=>e.systems.find(z=>z.id===e.activeId)||null),h=vt(()=>{const z=o.value;return!z||!W(z)?null:g1(z.config,m.value)});function l(){o.value&&(n.value=!n.value,r.value=o.value.animation,a.value="")}function c(z){const j=o.value;j&&(e.setSystemAnimation(j.id,z),r.value=z,a.value="")}function u(){const z=e.addAnimation();r.value=z,a.value=""}function d(){var te;const z=((te=o.value)==null?void 0:te.animation)||e.timeline.animation,j=r.value.trim();if(!j){a.value="动画名称不能为空";return}if(j!==z&&e.timeline.animations.includes(j)){a.value="动画名称不能重复";return}if(!e.renameAnimation(z,j)){a.value="无法修改动画名称";return}r.value=j,a.value=""}function f(){var te,he;const z=((te=o.value)==null?void 0:te.animation)||e.timeline.animation;if(!e.removeAnimation(z)){a.value="至少需要保留一个动画";return}const j=((he=o.value)==null?void 0:he.animation)||e.timeline.animation;r.value=j,a.value=""}function p(z){var j;(j=i.value)!=null&&j.contains(z.target)||(n.value=!1)}Kr(()=>document.addEventListener("pointerdown",p)),$l(()=>document.removeEventListener("pointerdown",p));const m=vt(()=>Math.max(1,e.timeline.fps||30)),g=lt(120),v=lt({}),b=lt({}),y=lt({}),w=lt({}),A=lt(String(e.timeline.playbackStart)),T=lt(String(e.timeline.playbackEnd));fs(()=>e.timeline.playbackStart,z=>{A.value=String(z)}),fs(()=>e.timeline.playbackEnd,z=>{T.value=String(z)});const _=vt(()=>e.timeline.totalFrames),R=vt(()=>g.value<=30?"放大":g.value>=300?"缩小":"适中"),P=vt(()=>e.spines.filter(z=>z.selectedAnimation&&z.animations.some(j=>j.name===z.selectedAnimation&&j.duration>0))),F=vt(()=>(e.activeObjectType==="spine"?e.spines.find(j=>j.id===e.activeObjectId&&j.animations.length):null)||e.spines.find(j=>j.animations.length)||null);function I(z){const j=F.value;j&&(j.selectedAnimation=z.target.value,e.recalcTotalFrames(),e.timeline.frame=0)}function k(){e.setPlaybackStart(Number(A.value)),A.value=String(e.timeline.playbackStart)}function B(){e.setPlaybackEnd(Number(T.value)),T.value=String(e.timeline.playbackEnd)}function D(){const z=h.value;z&&(e.setPlaybackEnd(z.end),e.setPlaybackStart(z.start))}function U(){var j;const z=((j=t.value)==null?void 0:j.clientWidth)||600;return g.value/z}const L=vt(()=>{const z=[],j=g.value;let te=1;g.value<=10?te=1:g.value<=50?te=5:g.value<=200?te=10:g.value<=500?te=50:te=100;for(let he=0;he<=j;he+=te)z.push({f:he,px:he/U()});return z}),N=vt(()=>e.timeline.frame/U());function O(z){const j=z.config;return(v.value[z.id]??Math.max(0,Number(j.delay)||0))*m.value/U()}function X(z){const j=z.config,te=Math.max(0,Number(j.lifeMin)||0),he=Math.max(0,Number(j.lifeMax)||0);return j.lifeMode==="fixed"?te:Math.max(te,he)}function E(z){return q(z)}function V(z){if(z.config.mode!=="stream")return 0;if(z.config.streamBehavior==="loop"){const te=z.config;return(y.value[z.id]??Xr(te,m.value).loop)/U()}return(b.value[z.id]??Math.max(1/m.value,Number(z.config.duration)||1))*m.value/U()}function q(z){const j=z.config;return j.mode==="stream"&&j.streamBehavior==="loop"?J(z)+V(z)+K(z):V(z)+X(z)*m.value/U()}function W(z){const j=z.config;return j.mode==="stream"&&j.streamBehavior==="loop"}function J(z){return W(z)?Xr(z.config,m.value).start/U():0}function K(z){return W(z)?Xr(z.config,m.value).end/U():0}function fe(z){var j;return((j=z.animations.find(te=>te.name===z.selectedAnimation))==null?void 0:j.duration)||0}function me(z){return(w.value[z.id]??Math.max(0,Number(z.timeOffset)||0))*m.value/U()}function we(z){return fe(z)*m.value/U()}function Ee(z){const j=z.deltaY<0?.8:1.25;let te=g.value*j;te=Math.min(2e3,Math.max(10,te)),g.value=Math.round(te)}function pe(z){const j=t.value,te=xe=>{const oe=j.getBoundingClientRect(),ge=Math.floor((xe.clientX-oe.left)/oe.width*g.value);e.timeline.frame=Math.max(0,Math.min(ge,_.value-1))};te(z);const he=()=>{window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",he)};window.addEventListener("pointermove",te),window.addEventListener("pointerup",he)}function Ae(z,j){z.stopPropagation();const te=z.clientX,he=Math.max(0,Number(j.config.delay)||0),xe=U()/m.value,oe=Fe=>{const Be=(Fe.clientX-te)*xe,st=Math.max(0,Math.min(he+Be,600));v.value[j.id]=Math.round(st*m.value)/m.value},ge=Fe=>{window.removeEventListener("pointermove",oe),window.removeEventListener("pointerup",le),window.removeEventListener("pointercancel",Oe);const Be=v.value[j.id];delete v.value[j.id],Fe&&Be!=null&&Be!==he&&(j.config.delay=Be)},le=()=>ge(!0),Oe=()=>ge(!1);window.addEventListener("pointermove",oe),window.addEventListener("pointerup",le),window.addEventListener("pointercancel",Oe)}function G(z,j){var At;z.stopPropagation();const te=W(j),he=Math.max(0,Number(j.config.duration)||0),xe=Xr(j.config,m.value).loop,oe=U()/m.value,ge=((At=z.currentTarget.closest(".lane-bar"))==null?void 0:At.getBoundingClientRect().left)??z.clientX,le=J(j);let Oe=!1;const Fe=Et=>{if(Oe=!0,te){const It=Math.min(1800,Math.max(1,Math.round((Et.clientX-ge-le)/U())));y.value[j.id]=It}else{const It=Math.max(1/m.value,Math.min((Et.clientX-ge)*oe,600));b.value[j.id]=Math.round(It*m.value)/m.value}},Be=Et=>{window.removeEventListener("pointermove",Fe),window.removeEventListener("pointerup",st),window.removeEventListener("pointercancel",St);const It=b.value[j.id],Kt=y.value[j.id];delete b.value[j.id],delete y.value[j.id],Et&&Oe&&te&&Kt!=null&&Kt!==xe?j.config.loopDurationFrames=Kt:Et&&Oe&&!te&&It!=null&&It!==he&&(j.config.duration=It)},st=()=>Be(!0),St=()=>Be(!1);window.addEventListener("pointermove",Fe),window.addEventListener("pointerup",st),window.addEventListener("pointercancel",St)}function Z(z,j){z.stopPropagation();const te=z.clientX,he=Math.max(0,Number(j.timeOffset)||0),xe=U()/m.value,oe=Fe=>{const Be=Math.max(0,Math.min(he+(Fe.clientX-te)*xe,600));w.value[j.id]=Math.round(Be*m.value)/m.value},ge=Fe=>{window.removeEventListener("pointermove",oe),window.removeEventListener("pointerup",le),window.removeEventListener("pointercancel",Oe);const Be=w.value[j.id];delete w.value[j.id],Fe&&Be!=null&&Be!==he&&(j.timeOffset=Be,e.recalcTotalFrames())},le=()=>ge(!0),Oe=()=>ge(!1);window.addEventListener("pointermove",oe),window.addEventListener("pointerup",le),window.addEventListener("pointercancel",Oe)}return(z,j)=>{var te,he,xe;return ie(),ae("div",V5,[M("div",Y5,[M("button",{class:Ze(["tl-btn",{on:ke(e).timeline.playing}]),onClick:j[0]||(j[0]=oe=>ke(e).togglePlay()),title:ke(e).timeline.playing?"暂停 (D)":"播放 (D)"},Xe(ke(e).timeline.playing?"❚❚":"▶"),11,$5),M("button",{class:"tl-btn",onClick:j[1]||(j[1]=oe=>ke(e).toStart()),title:"回到第一帧 (S)"},"⏮"),M("button",{class:"tl-btn",onClick:j[2]||(j[2]=oe=>ke(e).previousFrame()),title:"前一帧"},"◀"),M("button",{class:"tl-btn",onClick:j[3]||(j[3]=oe=>ke(e).nextFrame()),title:"后一帧"},"▶"),M("button",{class:"tl-btn",onClick:j[4]||(j[4]=oe=>ke(e).toEnd()),title:"移动到最后一帧"},"⏭"),M("button",{class:Ze(["tl-btn",{on:ke(e).timeline.loop}]),onClick:j[5]||(j[5]=oe=>ke(e).toggleLoop()),title:"循环"},"⟳",2),M("label",G5,[j[10]||(j[10]=M("span",null,"A",-1)),ye(M("input",{"onUpdate:modelValue":j[6]||(j[6]=oe=>A.value=oe),type:"number",min:"0",max:Math.max(0,ke(e).timeline.playbackEnd-1),"aria-label":"播放起始帧",onChange:k,onKeydown:Ea(bt(k,["prevent"]),["enter"])},null,40,H5),[[ht,A.value]])]),M("label",j5,[j[11]||(j[11]=M("span",null,"B",-1)),ye(M("input",{"onUpdate:modelValue":j[7]||(j[7]=oe=>T.value=oe),type:"number",min:ke(e).timeline.playbackStart+1,max:Math.max(1,ke(e).timeline.totalFrames-1),"aria-label":"播放结束帧",onChange:B,onKeydown:Ea(bt(B,["prevent"]),["enter"])},null,40,W5),[[ht,T.value]])]),h.value?(ie(),ae("button",{key:0,class:"tl-loop-range",title:`设为闭合自循环范围 ${h.value.start}–${h.value.end}f`,onClick:D},"循环段",8,z5)):Ve("",!0),M("span",q5,[j[12]||(j[12]=Qt("帧 ",-1)),M("b",null,Xe(ke(e).timeline.frame),1),j[13]||(j[13]=Qt(" / ",-1)),M("b",null,Xe(Math.max(0,ke(e).timeline.totalFrames-1)),1)]),j[18]||(j[18]=M("span",{class:"tl-legend"},[M("i",{class:"legend-emission"}),Qt("持续发射 "),M("i",{class:"legend-life"}),Qt("粒子存在 "),M("i",{class:"legend-spine"}),Qt("Spine 动画")],-1)),M("div",{ref_key:"animationMenuRef",ref:i,class:"tl-anim tl-owner-animation"},[j[16]||(j[16]=M("span",null,"所属动画",-1)),M("button",{class:"tl-animation-trigger",disabled:!o.value,title:"设置当前粒子系统所属的动画",onClick:bt(l,["stop"])},[M("span",null,Xe(((te=o.value)==null?void 0:te.animation)||ke(e).timeline.animation),1),j[14]||(j[14]=M("i",null,"⌄",-1))],8,K5),n.value?(ie(),ae("div",{key:0,class:"tl-animation-menu",onPointerdown:j[9]||(j[9]=bt(()=>{},["stop"]))},[j[15]||(j[15]=M("div",{class:"tl-animation-menu-title"},"选择所属动画",-1)),(ie(!0),ae(Ke,null,ci(ke(e).timeline.animations,oe=>{var ge,le;return ie(),ae("button",{key:oe,class:Ze(["tl-animation-option",{on:((ge=o.value)==null?void 0:ge.animation)===oe}]),onClick:Oe=>c(oe)},[M("span",null,Xe(oe),1),((le=o.value)==null?void 0:le.animation)===oe?(ie(),ae("i",J5,"✓")):Ve("",!0)],10,Z5)}),128)),M("div",Q5,[ye(M("input",{"onUpdate:modelValue":j[8]||(j[8]=oe=>r.value=oe),class:"tl-animation-name",maxlength:"64","aria-label":"动画名称",onKeydown:Ea(d,["enter"])},null,544),[[ht,r.value]]),M("button",{title:"重命名当前动画",onClick:d},"重命名")]),a.value?(ie(),ae("div",eU,Xe(a.value),1)):Ve("",!0),M("div",tU,[M("button",{onClick:u},"+ 新增"),M("button",{disabled:ke(e).timeline.animations.length<=1,onClick:f},"删除",8,iU)]),ke(e).timeline.animations.length<=1?(ie(),ae("div",sU,"至少需要保留一个动画")):Ve("",!0)],32)):Ve("",!0)],512),M("label",nU,[j[17]||(j[17]=Qt("Spine 预览动画 ",-1)),M("select",{class:"tl-sel",value:((he=F.value)==null?void 0:he.selectedAnimation)||"",disabled:!F.value,onChange:I},[M("option",aU,Xe(F.value?"无":"无可用 Spine 动画"),1),(ie(!0),ae(Ke,null,ci(((xe=F.value)==null?void 0:xe.animations)||[],oe=>(ie(),ae("option",{key:oe.name,value:oe.name},Xe(oe.name)+"("+Xe(oe.duration.toFixed(2))+"s) ",9,oU))),128))],40,rU)]),M("span",lU,Xe(R.value),1)]),M("div",{class:"tl-viewport",ref_key:"vpRef",ref:t,onWheel:bt(Ee,["prevent"]),onPointerdown:pe},[M("div",cU,[(ie(!0),ae(Ke,null,ci(L.value,oe=>(ie(),ae("div",{key:oe.f,class:"tl-tickline",style:Li({left:oe.px+"px"})},[M("span",hU,Xe(oe.f)+"f",1)],4))),128))]),M("div",{class:"tl-playhead",style:Li({left:N.value+"px"})},null,4),M("div",uU,[(ie(!0),ae(Ke,null,ci(ke(e).systems,(oe,ge)=>(ie(),ae("div",{key:oe.id,class:"tl-lane"},[j[19]||(j[19]=M("span",{class:"lane-ico"},"●",-1)),M("div",{class:"lane-bar",style:Li({left:O(oe)+"px",width:E(oe)+"px"}),onPointerdown:bt(le=>Ae(le,oe),["stop"])},[M("span",fU,Xe(oe.config.name||"系统 "+(ge+1)),1),M("span",{class:Ze(["bar-life",{"loop-life":W(oe)}]),style:Li({width:q(oe)+"px"})},null,6),W(oe)?(ie(),ae(Ke,{key:0},[J(oe)?(ie(),ae("span",{key:0,class:"bar-loop-transition bar-loop-start",style:Li({width:J(oe)+"px"})},null,4)):Ve("",!0),M("span",{class:"bar-emission bar-loop",style:Li({left:J(oe)+"px",width:V(oe)+"px"})},[M("span",{class:"bar-handle",title:"拖动循环段时长",onPointerdown:bt(le=>G(le,oe),["stop"])},null,40,mU)],4),K(oe)?(ie(),ae("span",{key:1,class:"bar-loop-transition bar-loop-end",style:Li({left:J(oe)+V(oe)+"px",width:K(oe)+"px"})},null,4)):Ve("",!0)],64)):oe.config.mode==="stream"?(ie(),ae("span",{key:1,class:"bar-emission",style:Li({width:V(oe)+"px"})},[M("span",{class:"bar-handle",title:"拖动持续发射时长",onPointerdown:bt(le=>G(le,oe),["stop"])},null,40,pU)],4)):Ve("",!0)],44,dU)]))),128)),(ie(!0),ae(Ke,null,ci(P.value,oe=>(ie(),ae("div",{key:`spine-${oe.id}`,class:"tl-lane spine-lane"},[j[20]||(j[20]=M("span",{class:"lane-ico spine-ico"},"◆",-1)),M("div",{class:"spine-bar",style:Li({left:me(oe)+"px",width:we(oe)+"px"}),title:"拖动调整动画开始时间",onPointerdown:bt(ge=>Z(ge,oe),["stop"])},[M("span",vU,Xe(oe.name)+" · "+Xe(oe.selectedAnimation),1)],44,gU)]))),128)),!ke(e).systems.length&&!P.value.length?(ie(),ae("div",yU,"暂无可显示的动画数据")):Ve("",!0)])],544)])}}}),bU=Gs(xU,[["__scopeId","data-v-e305dee7"]]),wU={class:"transfer-heading"},SU={key:0},MU={class:"transfer-detail"},_U=$s({__name:"TransferProgressOverlay",setup(s){const e=lt(null);return fs(()=>xi.visible,async t=>{var i;t&&(await lu(),(i=e.value)==null||i.focus({preventScroll:!0}))},{flush:"post"}),(t,i)=>(ie(),Jt(P_,{name:"transfer-fade"},{default:ah(()=>[ke(xi).visible?(ie(),ae("div",{key:0,ref_key:"overlayElement",ref:e,class:"transfer-overlay",role:"dialog","aria-modal":"true","aria-live":"polite",tabindex:"-1",onPointerdown:i[0]||(i[0]=bt(()=>{},["stop","prevent"])),onPointerup:i[1]||(i[1]=bt(()=>{},["stop","prevent"])),onClick:i[2]||(i[2]=bt(()=>{},["stop","prevent"])),onDblclick:i[3]||(i[3]=bt(()=>{},["stop","prevent"])),onContextmenu:i[4]||(i[4]=bt(()=>{},["stop","prevent"])),onWheel:i[5]||(i[5]=bt(()=>{},["stop","prevent"])),onKeydown:i[6]||(i[6]=bt(()=>{},["stop","prevent"]))},[M("div",{class:Ze(["transfer-dialog",{failed:ke(xi).failed}])},[M("div",wU,[M("span",null,Xe(ke(xi).title),1),ke(xi).indeterminate?Ve("",!0):(ie(),ae("strong",SU,Xe(Math.round(ke(xi).progress))+"%",1))]),M("div",{class:Ze(["transfer-track",{indeterminate:ke(xi).indeterminate}])},[M("div",{class:"transfer-bar",style:Li(ke(xi).indeterminate?void 0:{width:`${ke(xi).progress}%`})},null,4)],2),M("div",MU,Xe(ke(xi).detail),1)],2)],544)):Ve("",!0)]),_:1}))}}),TU=Gs(_U,[["__scopeId","data-v-016b4c9d"]]),AU=["inert","aria-hidden"],EU={class:"right"},CU={class:"stage-area"},IU=$s({__name:"App",setup(s){const e=Kl();JI(e);const t=lt(360),i=lt(180);function n(a){a.preventDefault();const o=l=>{const c=e.settings.parameterPanelOnRight?window.innerWidth-l.clientX:l.clientX,u=Math.max(240,Math.min(c,window.innerWidth-200));t.value=u},h=()=>{window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",h)};window.addEventListener("pointermove",o),window.addEventListener("pointerup",h)}function r(a){a.preventDefault();const o=a.clientY,h=i.value,l=u=>{const d=Math.max(80,Math.min(h+(o-u.clientY),window.innerHeight-200));i.value=d},c=()=>{window.removeEventListener("pointermove",l),window.removeEventListener("pointerup",c)};window.addEventListener("pointermove",l),window.addEventListener("pointerup",c)}return(a,o)=>(ie(),ae(Ke,null,[M("div",{class:Ze(["layout",{"panel-right":ke(e).settings.parameterPanelOnRight}]),inert:ke(xi).visible?!0:void 0,"aria-hidden":ke(xi).visible?"true":void 0},[M("div",{class:"parameter-panel",style:Li({width:t.value+"px"})},[Ue(X5)],4),M("div",{class:"resizer-col",onPointerdown:n},null,32),M("div",EU,[M("div",CU,[Ue(sF)]),M("div",{class:"resizer-row",onPointerdown:r,title:"拖动调整时间轴高度"},null,32),M("div",{class:"timeline-area",style:Li({height:i.value+"px"})},[Ue(bU)],4)])],10,AU),Ue(TU)],64))}}),RU=Gs(IU,[["__scopeId","data-v-d7e0e59a"]]);rT(RU).use(lT()).mount("#app");export{dy as $,Fn as A,Wh as B,jt as C,ji as D,He as E,ds as F,Nn as G,wt as H,Ut as I,gS as J,ys as K,Is as L,Ys as M,zr as N,Pu as O,kn as P,Bl as Q,Po as R,sn as S,EO as T,ct as U,ay as V,an as W,r8 as X,_B as Y,Xl as Z,Mp as _,gt as a,Bm as a$,uy as a0,qw as a1,Fp as a2,s8 as a3,$h as a4,xl as a5,DO as a6,bl as a7,ku as a8,Pm as a9,$m as aA,Gm as aB,Nc as aC,Pr as aD,Qc as aE,km as aF,Qw as aG,pi as aH,jw as aI,q6 as aJ,To as aK,hy as aL,Ye as aM,it as aN,Om as aO,eh as aP,sS as aQ,Fm as aR,tS as aS,iS as aT,Fu as aU,aS as aV,th as aW,cS as aX,nS as aY,oS as aZ,hS as a_,Ya as aa,Op as ab,Bp as ac,ly as ad,Ql as ae,ec as af,Jl as ag,Va as ah,ar as ai,Z6 as aj,Jw as ak,LO as al,Fo as am,Gr as an,Np as ao,pS as ap,OO as aq,Ul as ar,vs as as,cy as at,e8 as au,No as av,Ym as aw,Hm as ax,jm as ay,Wm as az,Io as b,yr as b$,jh as b0,rS as b1,Jr as b2,lS as b3,Lp as b4,AO as b5,fS as b6,mS as b7,Dp as b8,Dn as b9,uS as bA,Up as bB,Ru as bC,vS as bD,Lm as bE,Fi as bF,_O as bG,IO as bH,Bw as bI,Ow as bJ,J6 as bK,ii as bL,Uo as bM,yS as bN,wS as bO,SS as bP,MS as bQ,xS as bR,bS,FO as bT,Xp as bU,Gt as bV,Vm as bW,eS as bX,Dw as bY,Nw as bZ,Uw as b_,TO as ba,K6 as bb,xt as bc,Zw as bd,Kw as be,Ww as bf,zw as bg,ka as bh,Gh as bi,BO as bj,Xw as bk,Vw as bl,hs as bm,Yw as bn,ko as bo,Gi as bp,Lw as bq,Hh as br,$w as bs,Gw as bt,Hw as bu,fy as bv,Um as bw,ba as bx,dS as by,Nm as bz,Ro as c,Q6 as c0,PO as c1,kO as c2,RO as c3,dt as d,tt as e,t8 as f,yt as g,Ni as h,Mh as i,bs as j,oi as k,et as l,cn as m,li as n,gp as o,wi as p,Ll as q,Cr as r,We as s,ab as t,Sp as u,Ch as v,Dm as w,ya as x,oy as y,Xm as z}; +`;class pw extends Cr{constructor(e){super(e),this.shaderGenerator=new a1(hP,uP),this.geometryClass=cP,this.vertexSize=7}packInterleavedGeometry(e,t,i,n,r){const{uint32View:a,float32View:o}=t,h=n/this.vertexSize,l=e.uvs,c=e.indices,u=e.vertexData,d=e._texture.baseTexture._batchLocation,f=Math.min(e.worldAlpha,1),p=jt.shared.setValue(e._tintRGB).toPremultiplied(f,!0),m=jt.shared.setValue(e._darkTintRGB).premultiply(f,!0).toPremultiplied(1,!1);for(let g=0;g0){let a=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),h=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));n=a(t.map(l=>{if(l=gP(l),l in Gv)return;Gv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":pP,c||(d.as="script"),d.crossOrigin="",d.href=l,h&&d.setAttribute("nonce",h),document.head.appendChild(d),c)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function r(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return n.then(a=>{for(const o of a||[])o.status==="rejected"&&r(o.reason);return e().catch(r)})};async function vw(){const[s,e]=await Promise.all([Hv(()=>import("./index-Cr68vmVa.js"),[]),Hv(()=>import("./index-hYCzV0U1.js"),__vite__mapDeps([0,1]))]);return{core:s,pixi:e}}async function vP(s,e,t){const{core:i,pixi:n}=await vw(),r=new i.TextureAtlas(e);return Ip(r,t,n.SpineTexture),{skeletonData:new i.SkeletonJson(new i.AtlasAttachmentLoader(r)).readSkeletonData(s),SpineClass:n.Spine}}async function yP(s,e,t){const{core:i,pixi:n}=await vw(),r=new i.TextureAtlas(e);return Ip(r,t,n.SpineTexture),{skeletonData:new i.SkeletonBinary(new i.AtlasAttachmentLoader(r)).readSkeletonData(s),SpineClass:n.Spine}}function Lr(s,e,t){const i=Number(s[e]);return Number.isFinite(i)?i:t}function xs(s,e,t,i){s[e]==null&&(s[e]=Lr(s,t,i))}function Rp(s,e,t){if(typeof s.curve!="number")return;const i=Lr(s,"time",0),r=Lr(e,"time",0)-i,a=s.curve,o=Lr(s,"c2",0),h=Lr(s,"c3",1),l=Lr(s,"c4",1);s.curve=t.flatMap(([c,u])=>[i+r*a,c+(u-c)*o,i+r*h,c+(u-c)*l]),delete s.c2,delete s.c3,delete s.c4}function Yr(s,e){if(Array.isArray(s))for(let t=0;t[Lr(i,r,a),Lr(n,r,a)]))}}function xP(s){if(Array.isArray(s))for(let e=0;eNumber.parseInt(i.slice(r,r+2),16)/255);return e?n:n.slice(0,3)}function jv(s,e){if(Array.isArray(s))for(let t=0;t[o,a[h]]))}}function bP(s){for(const e of s.bones||[])e.inherit==null&&e.transform!=null&&(e.inherit=e.transform);for(const e of s.transform||[])xs(e,"mixRotate","rotateMix",1),xs(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX),xs(e,"mixScaleX","scaleMix",1),e.mixScaleY==null&&(e.mixScaleY=e.mixScaleX),xs(e,"mixShearY","shearMix",1);for(const e of s.path||[])xs(e,"mixRotate","rotateMix",1),xs(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX)}function wP(s){for(const e of s.skins||[])for(const t of Object.values(e.attachments||{}))for(const i of Object.values(t||{}))i.parent!=null&&i.timelines==null&&i.deform!=null&&(i.timelines=i.deform)}function SP(s){for(const e of Object.values(s.slots||{}))e.color&&!e.rgba&&(e.rgba=e.color,delete e.color),e.twoColor&&!e.rgba2&&(e.rgba2=e.twoColor,delete e.twoColor),jv(e.rgba,!1),jv(e.rgba2,!0)}function MP(s){for(const e of Object.values(s.bones||{})){for(const t of e.rotate||[])xs(t,"value","angle",0);Yr(e.rotate,[{key:"value",fallback:0}]),Yr(e.translate,[{key:"x",fallback:0},{key:"y",fallback:0}]),Yr(e.scale,[{key:"x",fallback:1},{key:"y",fallback:1}]),Yr(e.shear,[{key:"x",fallback:0},{key:"y",fallback:0}])}}function _P(s){for(const e of Object.values(s.ik||{}))Yr(e,[{key:"mix",fallback:1},{key:"softness",fallback:0}])}function TP(s){for(const e of Object.values(s.transform||{})){for(const t of e)xs(t,"mixRotate","rotateMix",1),xs(t,"mixX","translateMix",1),t.mixY==null&&(t.mixY=t.mixX),xs(t,"mixScaleX","scaleMix",1),t.mixScaleY==null&&(t.mixScaleY=t.mixScaleX),xs(t,"mixShearY","shearMix",1);Yr(e,[{key:"mixRotate",fallback:1},{key:"mixX",fallback:1},{key:"mixY",fallback:1},{key:"mixScaleX",fallback:1},{key:"mixScaleY",fallback:1},{key:"mixShearY",fallback:1}])}}function AP(s){for(const e of Object.values(s.path||{})){for(const i of["position","spacing"]){const n=e[i];for(const r of n||[])xs(r,"value",i,0);Yr(n,[{key:"value",fallback:0}])}const t=e.mix;for(const i of t||[])xs(i,"mixRotate","rotateMix",1),xs(i,"mixX","translateMix",1),i.mixY==null&&(i.mixY=i.mixX);Yr(t,[{key:"mixRotate",fallback:1},{key:"mixX",fallback:1},{key:"mixY",fallback:1}])}}function EP(s){if(!s.deform)return;const e=s.attachments||(s.attachments={});for(const[t,i]of Object.entries(s.deform)){const n=e[t]||(e[t]={});for(const[r,a]of Object.entries(i)){const o=n[r]||(n[r]={});for(const[h,l]of Object.entries(a)){const c=o[h]||(o[h]={});c.deform=l,xP(l)}}}delete s.deform}function yw(s){bP(s),wP(s);for(const e of Object.values(s.animations||{}))SP(e),MP(e),_P(e),TP(e),AP(e),EP(e),!e.drawOrder&&e.draworder&&(e.drawOrder=e.draworder);return s}function CP(s){return s.replace(/\\/g,"/").split("/").pop()||s}async function IP(s){const e=await Promise.all(s.map(async t=>{const i=URL.createObjectURL(t);try{return[CP(t.name).toLowerCase(),await gt.fromURL(i)]}finally{URL.revokeObjectURL(i)}}));return new Map(e)}function RP(s){const e=new Map;return s.bones.map(t=>{var r;const i=((r=t.parent)==null?void 0:r.name)||null,n=i?(e.get(i)||0)+1:0;return e.set(t.name,n),{name:t.name,parent:i,depth:n}})}async function xw(s,e,t){var a;if(!/\.(json|skel)$/i.test(s.name))throw new Error("Spine 数据仅支持 .json 或 .skel");if(!/\.atlas$/i.test(e.name))throw new Error("图集文件仅支持 .atlas");if(!t.length)throw new Error("请至少选择一张纹理图片");const i=await e.text(),n=await IP(t),r=[...n.values()];try{let o,h,l=null,c;if(/\.skel$/i.test(s.name)){const u=await s.arrayBuffer();try{({skeletonData:o,SpineClass:h}=await yP(u,i,n)),c="4.3"}catch(d){try{({skeletonData:o,SpineClass:h}=mP(u,i,n)),c="4.2"}catch(f){const p=d instanceof Error?d.message:String(d),m=f instanceof Error?f.message:String(f);throw new Error(`Spine 二进制解析失败(4.3:${p};旧版:${m})`)}}l=Ph(o.version)}else{let u;try{u=JSON.parse(await s.text())}catch{throw new Error("Spine JSON 文件格式无效")}if(l=Ph((a=u==null?void 0:u.skeleton)==null?void 0:a.spine),!l)throw new Error(`Spine JSON 版本不受支持,仅支持 ${Mm()}`);c=jI(l),l==="3.8"&&yw(u);const d=c==="4.3"?await vP(u,i,n):fP(u,i,n);o=d.skeletonData,h=d.SpineClass}if(!l)throw new Error(`Spine 数据版本不受支持,仅支持 ${Mm()}`);return{skeletonData:o,textures:r,runtimeVersion:c,SpineClass:h,dataVersion:l,animations:o.animations.map(u=>({name:u.name,duration:u.duration})),bones:RP(o)}}catch(o){for(const h of r)h.destroy(!0);throw o}}function Jc(s){return new Promise((e,t)=>{const i=new FileReader;i.onload=()=>e(String(i.result||"")),i.onerror=()=>t(i.error),i.readAsDataURL(s)})}async function PP(s,e,t){return{skeleton:{name:s.name,dataUrl:await Jc(s)},atlas:{name:e.name,dataUrl:await Jc(e)},textures:await Promise.all(t.map(async i=>({name:i.name,dataUrl:await Jc(i)})))}}async function _f(s){const e=await fetch(s.dataUrl);if(!e.ok)throw new Error(`无法读取内嵌 Spine 文件:${s.name}`);return new File([await e.blob()],s.name)}async function kP(s){return{skeleton:await _f(s.skeleton),atlas:await _f(s.atlas),textures:await Promise.all(s.textures.map(_f))}}const bw="SpineParticle.EditorConfig",ww=1;function Sw(s){return{backgroundX:s.backgroundX,backgroundY:s.backgroundY,backgroundOpacity:s.backgroundOpacity,backgroundImageName:s.backgroundImageName,backgroundImageData:s.backgroundImageData,showGrid:s.showGrid,exportSettings:hi(s.exportSettings)}}function FP(s){return JSON.parse(JSON.stringify(s,(e,t)=>{if(!(e==="texture"||e==="trailTexture"||e==="frames"))return t}))}function Mw(s){const e=hi(s);return delete e.tags,delete e.selectedTag,e}function OP(s){const e=Sw(s.settings);return FP({format:bw,version:ww,savedAt:new Date().toISOString(),editor:hi(s.editor),settings:e,timeline:{fps:s.timeline.fps,loop:s.timeline.loop,playbackStart:s.timeline.playbackStart,playbackEnd:s.timeline.playbackEnd,animations:[...s.timeline.animations]},selection:{type:s.activeObjectType,id:s.activeObjectId},scene:{systems:s.systems.map(t=>({...hi(t),frames:void 0})),colliders:s.colliders.map(Mw),paths:hi(s.paths),spines:hi(s.spines)}})}function BP(){return`SpineParticle-${new Date().toISOString().replace(/[-:]/g,"").replace(/\.\d{3}Z$/,"").replace("T","-")}.json`}function _w(s){const e=OP(s),t=new Blob([JSON.stringify(e,null,2)],{type:"application/json;charset=utf-8"}),i=URL.createObjectURL(t),n=document.createElement("a");return n.href=i,n.download=BP(),document.body.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(i),0),e}function Tw(s){let e;try{e=JSON.parse(s)}catch{throw new Error("配置文件不是有效的 JSON")}const t=e;if(t.format!==bw)throw new Error("不是 SpineParticle 编辑器配置文件");if(t.version!==ww)throw new Error(`暂不支持配置版本:${t.version??"未知"}`);if(!t.scene||!Array.isArray(t.scene.systems)||!Array.isArray(t.scene.colliders)||!Array.isArray(t.scene.paths)||!Array.isArray(t.scene.spines))throw new Error("配置文件缺少完整场景数据");return t}async function LP(s){const e=new Map,t=n=>{const r=n==="/particles/star.png"?"/images/star.png":n==="/trails/trail.png"?"/images/trail.png":n||"/images/star.png";let a=e.get(r);return a||(a=gt.fromURL(r).then(o=>Dr(o)),e.set(r,a)),a},i=await t("/images/star.png");await Promise.all(s.map(async n=>{var a;const r=Wr(n.config);r.texture=i,await Promise.all(r.imageResources.map(async o=>{o.texture=await t(o.previewUrl||"/images/star.png"),await Promise.all(o.sequenceFrames.map(async h=>{h.texture=await t(h.previewUrl||o.previewUrl||"/images/star.png")}))})),await Promise.all(r.trailResources.map(async o=>{o.texture=await t(o.previewUrl||"/images/trail.png")})),r.trailTexture=((a=r.trailResources[0])==null?void 0:a.texture)||null,n.frames=[]}))}async function DP(s){const e=new Map;try{for(const t of s){if(!t.sourceBundle)continue;const i=await kP(t.sourceBundle);e.set(t.id,await xw(i.skeleton,i.atlas,i.textures))}return e}catch(t){for(const i of e.values())for(const n of i.textures)n.destroy(!0);throw t}}function NP(s,e){const t=(e==null?void 0:e.type)||"particle",i=Number(e==null?void 0:e.id)||0;(t==="particle"?s.systems.some(r=>r.id===i):t==="collision"?s.colliders.some(r=>r.id===i):t==="path"?s.paths.some(r=>r.id===i):s.spines.some(r=>r.id===i))?s.selectSceneObject(t,i):s.systems[0]?s.selectSceneObject("particle",s.systems[0].id):s.colliders[0]?s.selectSceneObject("collision",s.colliders[0].id):s.paths[0]?s.selectSceneObject("path",s.paths[0].id):s.spines[0]?s.selectSceneObject("spine",s.spines[0].id):(s.activeObjectType="particle",s.activeObjectId=0,s.activeId=0)}async function UP(s,e){var c,u,d,f,p,m,g;const t=Tw(JSON.stringify(e)),i=hi(t.scene.systems),n=t.scene.colliders.map(Mw),r=hi(t.scene.paths),a=hi(t.scene.spines);for(const v of a)v.sourceBundle==null&&(v.sourceBundle=null),v.dataVersion==null&&(v.dataVersion="");await LP(i);const o=await DP(a),h=new Map(s.spines.map(v=>[v.id,v.assetVersion]));for(const v of s.spines)ql(v.id);s.systems=i,s.colliders=n,s.paths=r,s.spines=a,Object.assign(s.editor,hi(t.editor||{}));const l=t.settings;if(l)for(const v of["backgroundX","backgroundY","backgroundOpacity","backgroundImageName","backgroundImageData","showGrid"])Object.prototype.hasOwnProperty.call(l,v)&&(s.settings[v]=l[v]);s.settings.exportSettings=mb((c=t.settings)==null?void 0:c.exportSettings),s.settings.undoLimit=Math.min(200,Math.max(1,Math.round(Number(s.settings.undoLimit)||20))),s.timeline.fps=Math.max(1,Math.round(Number((u=t.timeline)==null?void 0:u.fps)||30)),s.timeline.loop=((d=t.timeline)==null?void 0:d.loop)!==!1,s.timeline.animations=Array.isArray((f=t.timeline)==null?void 0:f.animations)&&t.timeline.animations.length?[...new Set(t.timeline.animations.filter(v=>typeof v=="string"&&v.trim()).map(v=>v.trim()))]:["animation"];for(const v of s.spines){const b=o.get(v.id);if(v.assetVersion=Math.max(Number(v.assetVersion)||0,h.get(v.id)||0)+1,!b){v.status="empty",v.error=v.skeletonFileName?"配置未包含可复用的 Spine 原始资源":"",v.animations=[],v.bones=[],v.selectedAnimation="";continue}Au(v.id,b),v.dataVersion=b.dataVersion,v.animations=b.animations,v.bones=b.bones,b.animations.some(y=>y.name===v.selectedAnimation)||(v.selectedAnimation=((p=b.animations[0])==null?void 0:p.name)||""),v.status="ready",v.error=""}s.syncSceneSequences(),NP(s,t.selection),s.timeline.playbackStart=Math.max(0,Math.floor(Number((m=t.timeline)==null?void 0:m.playbackStart)||0)),s.timeline.playbackEnd=Math.max(1,Math.floor(Number((g=t.timeline)==null?void 0:g.playbackEnd)||Number.MAX_SAFE_INTEGER)),s.timeline.frame=0,s.timeline.recorded=!1,s.timeline.playing=!0;for(const v of s.systems)s.timeline.animations.includes(v.animation)||(v.animation=s.timeline.animations[0]);return s.recalcTotalFrames(),s.timeline.frame=s.timeline.playbackStart,t}async function Aw(s,e){return UP(s,Tw(e))}async function XP(s,e){if(!/\.json$/i.test(e.name))throw new Error("请选择 .json 配置文件");return Aw(s,await e.text())}const Iu=Da({undoCount:0});let Uh=null,nr=null,$r=[],Zo=null,rr=null,Xh=!1;function Pp(s){return{systems:s.systems.map(t=>{const i=hi(t);return i.frames=void 0,i}),colliders:hi(s.colliders),paths:hi(s.paths),spines:hi(s.spines),animations:[...s.timeline.animations],settings:Sw(s.settings)}}function kp(s){return JSON.stringify(s,(e,t)=>e==="texture"||e==="trailTexture"?null:typeof t=="string"&&t.startsWith("data:")&&t.length>256?`${t.length}:${t.slice(0,96)}:${t.slice(-48)}`:t)}function Ew(s,e=Pp(s),t=kp(e)){const i=new Map;for(const n of e.spines){const r=GI(n.id);r&&i.set(n.id,r)}return{data:e,signature:t,spineAssets:i}}function Vh(s){if(s){for(const e of s.spineAssets.values())YI(e);s.spineAssets.clear()}}function Cw(s){for(;$r.length>s;)Vh($r.shift()||null);Iu.undoCount=$r.length}function Iw(){const s=Uh;if(!s||!nr||Xh)return;const e=Pp(s),t=kp(e);t!==nr.signature&&($r.push(nr),nr=Ew(s,e,t),Cw(s.settings.undoLimit))}function VP(){Xh||(rr&&clearTimeout(rr),rr=setTimeout(()=>{rr=null,Iw()},250))}function YP(s){const e=s.activeObjectId;return s.activeObjectType==="particle"?s.systems.some(t=>t.id===e):s.activeObjectType==="collision"?s.colliders.some(t=>t.id===e):s.activeObjectType==="path"?s.paths.some(t=>t.id===e):s.spines.some(t=>t.id===e)}function $P(s){var t,i;if(!YP(s)){const n=s.systems[0],r=s.colliders[0],a=s.paths[0],o=s.spines[0];n?(s.activeObjectType="particle",s.activeObjectId=n.id):r?(s.activeObjectType="collision",s.activeObjectId=r.id):a?(s.activeObjectType="path",s.activeObjectId=a.id):(s.activeObjectType="spine",s.activeObjectId=(o==null?void 0:o.id)||0)}const e=s.activeObjectType==="particle"?s.systems.find(n=>n.id===s.activeObjectId):s.systems.find(n=>n.id===s.activeId);s.activeId=(e==null?void 0:e.id)||((t=s.systems[0])==null?void 0:t.id)||0,s.timeline.animation=(e==null?void 0:e.animation)||((i=s.systems[0])==null?void 0:i.animation)||s.timeline.animations[0]||"animation"}function GP(s,e){const t=nr;Xh=!0;try{for(const i of s.spines)ql(i.id);s.systems=hi(e.data.systems),s.colliders=hi(e.data.colliders),s.paths=hi(e.data.paths),s.spines=hi(e.data.spines),s.timeline.animations=[...e.data.animations],Object.assign(s.settings,hi(e.data.settings));for(const[i,n]of e.spineAssets)Au(i,n);for(const i of s.systems)i.frames=[];s.timeline.recorded=!1,s.timeline.playing=!1,$P(s),s.recalcTotalFrames(),nr=e}finally{Xh=!1,Vh(t)}}function HP(s){if(!(Uh===s&&Zo)){Zo==null||Zo(),rr&&clearTimeout(rr),Vh(nr);for(const e of $r)Vh(e);$r=[],Uh=s,nr=Ew(s),Iu.undoCount=0,Zo=fs(()=>kp(Pp(s)),VP,{flush:"post"})}}function jP(s,e){const t=Math.min(200,Math.max(1,Math.round(Number(e)||20)));s.settings.undoLimit=t,Cw(t)}function Tf(){const s=Uh;if(!s||!nr)return!1;rr&&(clearTimeout(rr),rr=null),Iw();const e=$r.pop();return e?(GP(s,e),Iu.undoCount=$r.length,!0):!1}function WP(s){const e=s instanceof HTMLElement?s:null;return!!(e!=null&&e.closest('input, textarea, select, [contenteditable="true"]'))}function zP(s){function e(i){var r;const n=i.target instanceof Node?i.target:null;s.canvasFocused.value=!!n&&!!((r=s.canvasElement.value)!=null&&r.contains(n))}function t(i){const n=i.key.toLowerCase();if((i.ctrlKey||i.metaKey)&&!i.altKey&&n==="s"){i.preventDefault(),i.stopPropagation(),s.save();return}if((i.ctrlKey||i.metaKey)&&!i.altKey&&n==="z"){i.preventDefault(),i.stopPropagation(),s.undo();return}if(i.ctrlKey||i.metaKey||i.altKey||WP(i.target))return;if(n==="d"){i.preventDefault(),s.togglePlay();return}if(n==="s"){i.preventDefault(),s.toStart();return}if(!s.canvasFocused.value)return;const r={q:"",w:"translate",e:"rotate",r:"scale"};n in r&&(i.preventDefault(),s.setTool(r[n]))}Kr(()=>{document.addEventListener("pointerdown",e,!0),window.addEventListener("keydown",t,!0)}),Gl(()=>{document.removeEventListener("pointerdown",e,!0),window.removeEventListener("keydown",t,!0)})}const qP={class:"help-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"help-title"},KP={class:"help-body"},ZP=["aria-expanded"],JP={class:"caret"},QP={class:"help-module-body"},ek=["aria-expanded"],tk={class:"caret"},ik={class:"help-module-body"},sk=["aria-expanded"],nk={class:"caret"},rk={class:"help-module-body"},ak=["aria-expanded"],ok={class:"caret"},lk={class:"help-module-body"},ck=["aria-expanded"],hk={class:"caret"},uk={class:"help-module-body"},dk=["aria-expanded"],fk={class:"caret"},mk={class:"help-module-body"},pk=["aria-expanded"],gk={class:"caret"},vk={class:"help-module-body"},yk=["aria-expanded"],xk={class:"caret"},bk={class:"help-module-body"},wk=["aria-expanded"],Sk={class:"caret"},Mk={class:"help-module-body"},_k=$s({__name:"HelpDialog",props:{show:{type:Boolean}},emits:["close"],setup(s,{emit:e}){const t=e,i=lt(Array.from({length:9},()=>!1));function n(){t("close")}function r(a){a.key==="Escape"&&n()}return Kr(()=>window.addEventListener("keydown",r)),$l(()=>window.removeEventListener("keydown",r)),(a,o)=>s.show?(ie(),ae("div",{key:0,class:"help-overlay",role:"presentation",onClick:bt(n,["self"])},[M("section",qP,[M("header",{class:"help-head"},[o[9]||(o[9]=M("div",null,[M("h2",{id:"help-title"},"使用说明"),M("p",null,"从创建粒子到保存、导出的快速入门")],-1)),M("button",{class:"help-close","aria-label":"关闭使用说明",title:"关闭 (Esc)",onClick:n},"✕")]),M("div",KP,[o[37]||(o[37]=Ts('

快速开始

  1. 创建对象:在左侧“场景对象”中用 +粒子 / +碰撞 / +路径 / +Spine 添加场景对象。
  2. 编辑粒子:选中某个粒子系统,依次调整“发射模式 → 发射器形状 → 粒子属性 → 外观与资源 → 修改器”。
  3. 查看效果:底部时间轴可播放、暂停、逐帧或拖动;修改任意参数后会自动重新计算。
  4. 保存与导出:用“保存配置”保留工程;“导出 Spine Json / images 包 / .spine 包”输出成品。

每个模块组标题右侧的“重置”可把该组参数恢复默认;系统设置会自动保存在当前浏览器。

常用操作

小眼睛
单独显示/隐藏对象;隐藏的粒子系统不会被导出。
+Copy
完整复制当前选中对象,方便对比不同参数。
背景图
上传参考图并调整位置和透明度,只用于画布预览。
系统设置
管理界面布局、辅助显示、刻度等,自动存入浏览器。
撤销/重做
Ctrl+Z 撤回一步;可达成的步数在系统设置中调整。
Spine 骨骼
在层级树搜索并选择骨骼,可用于粒子发射器跟随。

快捷键

Ctrl/⌘+Z撤回上一步
Ctrl/⌘+S保存配置
Q拖动画布
W位移工具
E旋转工具
R缩放工具
D播放 / 暂停
S回到第一帧

Q / W / E / R 需先点击画布;光标位于输入框时,单键快捷键不会触发。

功能模块详解
',3)),M("section",{class:Ze(["help-section help-module",{open:i.value[0]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[0]?"true":"false",onClick:o[0]||(o[0]=h=>i.value[0]=!i.value[0])},[o[10]||(o[10]=M("span",{class:"mnum"},"1",-1)),o[11]||(o[11]=M("span",{class:"mtitle"},"配置管理",-1)),M("span",JP,Xe(i.value[0]?"▾":"▸"),1)],8,ZP),ye(M("div",QP,[...o[12]||(o[12]=[Ts('
保存配置
把当前全部场景对象和参数保存为工程 JSON 文件(也支持 Ctrl+S)。
加载配置
选择本地配置文件,恢复完整工程。
预设
从下拉中选择已保存的预设快速套用;点击下拉即可刷新列表。
范围
配置只含对象与参数,不含“系统设置”;系统设置单独存于浏览器。
',1)])],512),[[Yi,i.value[0]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[1]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[1]?"true":"false",onClick:o[1]||(o[1]=h=>i.value[1]=!i.value[1])},[o[13]||(o[13]=M("span",{class:"mnum"},"2",-1)),o[14]||(o[14]=M("span",{class:"mtitle"},"场景对象",-1)),M("span",tk,Xe(i.value[1]?"▾":"▸"),1)],8,ek),ye(M("div",ik,[...o[15]||(o[15]=[Ts('
粒子
核心对象。可设名称、位置 X/Y、偏移、旋转、缩放 X/Y,以及“随机种子”——相同种子可精确复现同一次效果。
碰撞
圆形/椭圆/矩形/多边形/自定义;启用开关、碰撞响应(物理弹跳/暂停/销毁)、弹性与摩擦,还可沿某条路径移动并带进度曲线。
路径
贝塞尔路径,可双击新建/删除锚点、拖手柄调曲线;内置圆/方/多边形/星形预设,支持闭合与颜色。
Spine
加载 .json+.atlas+.png 预览骨骼动画,可查看/搜索骨骼层级树,用于粒子“发射器跟随”。
通用
每个对象都有小眼睛显隐;“+Copy”可以复制当前对象;隐藏的粒子系统不会进入导出。
',1)])],512),[[Yi,i.value[1]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[2]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[2]?"true":"false",onClick:o[2]||(o[2]=h=>i.value[2]=!i.value[2])},[o[16]||(o[16]=M("span",{class:"mnum"},"3",-1)),o[17]||(o[17]=M("span",{class:"mtitle"},"发射模式",-1)),M("span",nk,Xe(i.value[2]?"▾":"▸"),1)],8,sk),ye(M("div",rk,[...o[18]||(o[18]=[Ts('
持续
按“每秒发射数量”持续喷射;再分“常规持续”(发射时长)与“循环持续”(三段式:开始循环 / 纯循环 / 结束循环,可自动或自定义帧长,做到无缝衔接)。
爆发
一次性发射“单次数量”颗粒子。
延迟时间
粒子条左端位置,表示发射开始前的等待时间。
注意
循环持续模式不支持骨骼跟随和路径跟随;开关时会把跟随设置恢复默认。
',1)])],512),[[Yi,i.value[2]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[3]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[3]?"true":"false",onClick:o[3]||(o[3]=h=>i.value[3]=!i.value[3])},[o[19]||(o[19]=M("span",{class:"mnum"},"4",-1)),o[20]||(o[20]=M("span",{class:"mtitle"},"发射器形状",-1)),M("span",ok,Xe(i.value[3]?"▾":"▸"),1)],8,ak),ye(M("div",lk,[...o[21]||(o[21]=[Ts('
形状
点 / 圆形 / 矩形 / 锥形 / 路径。
圆·锥
内半径与外半径,形成环形或锥形发射区;锥形额外有“锥形朝向”和“开口角度”。
矩形
“外框 − 内框”形成环带,可分别设置内外宽高。
路径
选一条场景路径作为出生线;出生分布可选等距固定或随机。
发射角度
固定 / 随机(基准角度 + 随机范围)/ 径向(圆、矩、锥中心向外)/ 垂直于路径 / 沿路径方向。
',1)])],512),[[Yi,i.value[3]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[4]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[4]?"true":"false",onClick:o[4]||(o[4]=h=>i.value[4]=!i.value[4])},[o[22]||(o[22]=M("span",{class:"mnum"},"5",-1)),o[23]||(o[23]=M("span",{class:"mtitle"},"粒子属性",-1)),M("span",hk,Xe(i.value[4]?"▾":"▸"),1)],8,ck),ye(M("div",uk,[...o[24]||(o[24]=[M("dl",{class:"help-list"},[M("div",null,[M("dt",null,"初始参数"),M("dd",null,"生命周期、速度、缩放(统一或 X/Y 分离)、初始旋转(可跟随发射方向)。每个属性支持固定 / 随机 / 曲线三种取值。")]),M("div",null,[M("dt",null,"生命周期变化"),M("dd",null,"速度倍率、缩放倍率(统一/分离)、旋转速度,均可用“生命周期 → 倍率”曲线控制。")]),M("div",null,[M("dt",null,"曲线含义"),M("dd",null,"横轴为粒子生命周期 0→1,纵轴为倍率或对应数值。")])],-1)])],512),[[Yi,i.value[4]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[5]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[5]?"true":"false",onClick:o[5]||(o[5]=h=>i.value[5]=!i.value[5])},[o[25]||(o[25]=M("span",{class:"mnum"},"6",-1)),o[26]||(o[26]=M("span",{class:"mtitle"},"外观与资源",-1)),M("span",fk,Xe(i.value[5]?"▾":"▸"),1)],8,dk),ye(M("div",mk,[...o[27]||(o[27]=[M("dl",{class:"help-list"},[M("div",null,[M("dt",null,"透明度"),M("dd",null,"曲线或固定;曲线模式可选“跟随导出 / 线性 / 贝塞尔”。")]),M("div",null,[M("dt",null,"图片资源"),M("dd",null,"“+”新增,可上传单图或序列帧;多张图片按权重随机。每张可调缩放、轴心、颜色(固定/随机/生命周期渐变)、混合模式(正常/相加/相乘/滤色)、独立透明度(关/固定/曲线)。")]),M("div",null,[M("dt",null,"序列帧"),M("dd",null,"播放方式:单次隐藏 / 单次定格 / 正向循环 / 反向循环,可设每秒帧数。")])],-1)])],512),[[Yi,i.value[5]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[6]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[6]?"true":"false",onClick:o[6]||(o[6]=h=>i.value[6]=!i.value[6])},[o[28]||(o[28]=M("span",{class:"mnum"},"7",-1)),o[29]||(o[29]=M("span",{class:"mtitle"},"修改器",-1)),M("span",gk,Xe(i.value[6]?"▾":"▸"),1)],8,pk),ye(M("div",vk,[...o[30]||(o[30]=[Ts('
移动噪声
强度、波动范围、时间流速,让粒子轨迹产生抖动。
重力 / 风力
固定或随机强度、方向,以及生命周期内强度曲线。
力场
中心 X/Y、强度(正吸负斥)、半径、衰减(恒定/线性/反比)。
吸附
延迟后把粒子吸到指定点,到达范围即死亡;可直线或曲线。
拖尾
独立拖尾图片(多资源按权重)、旋转、拖尾骨骼数、拖尾比例;长度/宽度可固定或随机并支持放大;可加生命周期长度曲线与形状曲线;颜色/透明度可跟随粒子、固定或曲线。
发射器跟随
跟随某条路径(局部/世界、正/反向、进度曲线),或跟随 Spine 骨骼(选中的骨骼 + 偏移)。
碰撞 + 阻尼
选择场景中已启用的碰撞对象参与,并设置速度阻尼。
',1)])],512),[[Yi,i.value[6]]])],2),M("section",{class:Ze(["help-section help-module",{open:i.value[7]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[7]?"true":"false",onClick:o[7]||(o[7]=h=>i.value[7]=!i.value[7])},[o[31]||(o[31]=M("span",{class:"mnum"},"8",-1)),o[32]||(o[32]=M("span",{class:"mtitle"},"导出设置",-1)),M("span",xk,Xe(i.value[7]?"▾":"▸"),1)],8,yk),ye(M("div",bk,[...o[33]||(o[33]=[Ts('
图片路径
写入 Spine 的 images 路径,例如 ./images/。
Spine 版本
3.8 / 4.0 / 4.1 / 4.2 / 4.3。
关键帧曲线
线性或平滑贝塞尔;出生、死亡、突变仍使用阶跃关键帧。
导出 FPS
修改 FPS 会保持动画实际秒数不变;“不写 fps”只省略元数据。
其它
整数帧对齐、骨骼对象池、排除无内容动画。
导出按钮
“导出 Spine Json”生成骨骼动画文件;“导出 images 包”单独下载图片 ZIP;“导出 .spine 包”需要连接器。
',1)])],512),[[Yi,i.value[7]]])],2),M("section",{class:Ze(["help-section help-module help-connector",{open:i.value[8]}])},[M("button",{type:"button",class:"help-module-head","aria-expanded":i.value[8]?"true":"false",onClick:o[8]||(o[8]=h=>i.value[8]=!i.value[8])},[o[34]||(o[34]=M("span",{class:"mnum"},"9",-1)),o[35]||(o[35]=M("span",{class:"mtitle"},"连接器(Spine 连接器)使用说明",-1)),M("span",Sk,Xe(i.value[8]?"▾":"▸"),1)],8,wk),ye(M("div",Mk,[...o[36]||(o[36]=[Ts('

连接器用于把网页生成的 JSON 和图片,调用你电脑上已安装并激活的 Spine,转换成可编辑的 .spine 工程。

前置
电脑已安装并激活 Spine;并已启动桌面版连接器APP。
网页端
导出区状态显示“连接器可用 · Spine 已就绪”后,点击“导出 .spine 包”。
首次授权
生产网站首次连接会显示“授权当前网站”;点击后在本机确认页核对完整来源(协议 + 域名 + 端口),再点“允许此网站”。授权一次后本机会保存白名单。本地 127.0.0.1:5173 默认允许。
路径设置
连接器自动检测 Spine 安装位置;检测不到时可在桌面窗口手动指定:Windows 选 Spine.com,macOS 选 Spine.app/Contents/MacOS/Spine。
下载结果
得到 ZIP 包,内含 .spine 工程和图片目录(如 images/star.png)。
版本
连接器按请求与 JSON 内的版本自动匹配 3.8~4.3,使用最新可用补丁。
安全
仅监听本机 127.0.0.1:27843;授权与白名单保存在连接器里;文件在临时目录转换后清理,并有大小限制。
',2)])],512),[[Yi,i.value[8]]])],2),o[38]||(o[38]=M("section",{class:"help-section help-export"},[M("h3",null,"配置与导出有什么区别?"),M("p",null,[M("b",null,"保存配置"),Qt("会保存编辑器中的全部对象和参数,之后可以继续修改;"),M("b",null,"导出 Spine Json"),Qt("只导出显示中的粒子系统,并把跟随、碰撞和拖尾结果烘焙为独立动画数据。")])],-1))])])])):Ve("",!0)}}),Gs=(s,e)=>{const t=s.__vccOpts||s;for(const[i,n]of e)t[i]=n;return t},Tk=Gs(_k,[["__scopeId","data-v-12773018"]]),Ak={class:"stage-wrap"},Ek={class:"topbar"},Ck=["disabled"],Ik={class:"tool-group"},Rk={class:"tool-group"},Pk={key:0,class:"background-panel"},kk=["disabled"],Fk=["title"],Ok={class:"background-position-row"},Bk={class:"background-opacity-row"},Lk={class:"zoom-pct"},Dk={key:0,class:"settings-panel"},Nk={class:"sp-head"},Uk={class:"sp-switch-row"},Xk={class:"sp-switch-control"},Vk={class:"sp-row"},Yk={class:"sp-chk"},$k={class:"sp-chk"},Gk={class:"sp-row"},Hk={class:"sp-row"},jk={class:"sp-chk"},Wk={class:"sp-chk"},zk={class:"sp-row"},qk={class:"sp-row"},Kk={class:"sp-row"},Zk={class:"sp-hex"},Jk={class:"sp-chk"},Qk={key:1,class:"hud"},e3={class:"hud-number hud-system-count"},t3={class:"hud-number hud-particle-count"},i3=$s({__name:"Stage",setup(s){const e=Kl(),t=lt(null),i=lt(null),n=lt(!1),r=lt(!1),a=lt(!1),o=lt(null),h=vt(()=>e.settings.backgroundImageName),l=lt(""),c=lt(!1);function u(H){l.value=l.value===H?"":H}e.settings.undoLimit>0||(e.settings.undoLimit=20),e.settings.parameterPanelOnRight==null&&(e.settings.parameterPanelOnRight=!0),Number.isFinite(e.settings.backgroundX)||(e.settings.backgroundX=0),Number.isFinite(e.settings.backgroundY)||(e.settings.backgroundY=0),Number.isFinite(e.settings.backgroundOpacity)||(e.settings.backgroundOpacity=1),e.settings.backgroundImageName==null&&(e.settings.backgroundImageName=""),e.settings.backgroundImageData==null&&(e.settings.backgroundImageData=""),e.settings.showEmitter==null&&(e.settings.showEmitter=!0),e.settings.showBones==null&&(e.settings.showBones=!1),e.settings.bonePointDrawSize>0||(e.settings.bonePointDrawSize=1),e.settings.boneAxisDrawSize>0||(e.settings.boneAxisDrawSize=2),e.settings.showSkinMesh==null&&(e.settings.showSkinMesh=!1),e.settings.showGrid==null&&(e.settings.showGrid=!0);function d(){e.settings.bonePointDrawSize=Math.min(10,Math.max(.1,Number(e.settings.bonePointDrawSize)||1)),e.settings.boneAxisDrawSize=Math.min(10,Math.max(.1,Number(e.settings.boneAxisDrawSize)||2))}zP({canvasElement:t,canvasFocused:c,undo:Tf,save:()=>_w(e),togglePlay:()=>e.togglePlay(),toStart:()=>e.toStart(),setTool:H=>{l.value=H}});let f=null,p=null,m=null,g=null,v=0,b=null,y=null,w=null,A=null,T=null,_=null,R=null,P=null,F=null,I=null,k=null,B=null,D=[],U=0,L=0,N=0,O=0,X=null,E=null;const V=new Map,q=new Map;let W=[];const J=new Map,K=new Set;let fe=!1;fs(()=>[e.activeObjectType,e.activeObjectId],()=>K.clear());async function me(){if(X&&E)return X;const[H,Y]=await Promise.all([gt.fromURL("/images/star.png"),gt.fromURL("/images/trail.png")]);return X=H,E=Y,X}function we(){p=new ji,f.stage.addChild(p),k=new ji,f.stage.addChild(k),m=new Zr(gt.EMPTY),m.anchor.set(.5),m.visible=!1,p.addChild(m),I=new ys,p.addChild(I),B=new nR,p.addChild(B.container),y=new ys,p.addChild(y),b=new ys,p.addChild(b),A=new ys,p.addChild(A),T=new ys,p.addChild(T),_=new ys,p.addChild(_),R=new ys,p.addChild(R),P=new ys,p.addChild(P),F=new ys,p.addChild(F),w=new ys,p.addChild(w)}function Ee(){r.value=!r.value,r.value&&(n.value=!1)}function pe(){a.value=!0,n.value=!1,r.value=!1}function Ae(){n.value=!n.value,n.value&&(r.value=!1)}function G(H){jP(e,Number(H.target.value))}async function Z(H){var ne;const Y=H.target,ee=(ne=Y.files)==null?void 0:ne[0];if(ee)try{e.settings.backgroundImageData=await Jc(ee),e.settings.backgroundImageName=ee.name}catch(ue){console.error("背景图加载失败",ue)}finally{Y.value=""}}async function z(H){const Y=++v;if(!H){m&&(m.texture=gt.EMPTY,m.visible=!1),g&&g.destroy(!0),g=null;return}try{const ee=await gt.fromURL(H);if(Y!==v||!m){ee.destroy(!0);return}const ne=g;g=ee,m.texture=ee,m.visible=!0,ne&&ne.destroy(!0)}catch(ee){console.error("背景图恢复失败",ee)}}function j(H=!0){e.settings.backgroundImageData="",e.settings.backgroundImageName="",o.value&&(o.value.value=""),H&&(e.settings.backgroundX=0,e.settings.backgroundY=0,e.settings.backgroundOpacity=1)}function te(H,Y=0){if(H<=0)return 1;const ee=Math.pow(10,Math.floor(Math.log10(H))),ne=[1,2,5,10,20,50,100];let ue=1;for(const ve of ne)if(ve*ee>=H){ue=ve*ee;break}return Math.max(ue,Y)}function he(){if(!I)return;const H=I;H.clear();const Y=e.settings;if(!Y.tickEnabled){for(const Se of D)Se.visible=!1;return}const ee=0,ne=0,ue=f.screen.width/e.editor.viewScale,ve=f.screen.height/e.editor.viewScale,_e=+("0x"+Y.axisColor.replace("#",""));H.lineStyle(1.5,_e,.35),H.moveTo(-ue,ne),H.lineTo(ue,ne),H.moveTo(ee,-ve),H.lineTo(ee,ve);const Me=e.editor.viewScale,be=te(50/Me),De=ue,Ie=ve,Le=Math.max(1,Y.tickWidth);if(Y.tickEnabled){for(let Se=0;Se<=ue;Se+=be){const at=Math.round(Se/be)*be;at!==0&&(H.lineStyle(Le,_e,.25),H.moveTo(at,ne-4),H.lineTo(at,ne+4),H.moveTo(-at,ne-4),H.lineTo(-at,ne+4))}for(let Se=0;Se<=ve;Se+=be)Math.round(Se/be)*be!==0&&(H.lineStyle(Le,_e,.25),H.moveTo(ee-4,Se),H.lineTo(ee+4,Se),H.moveTo(ee-4,-Se),H.lineTo(ee+4,-Se))}const Te=f.screen.width/2+e.editor.viewX,je=f.screen.height*.5+e.editor.viewY,rt=Y.axisFontSize,Je=+("0x"+Y.axisColor.replace("#",""));for(;D.length<64;){const Se=new Mp("",{fontFamily:"monospace",fontSize:rt,fill:Je});Se.anchor.set(.5,.5),k.addChild(Se),D.push(Se)}let nt=0;const Qe=Y.showAxisLabels&&Y.tickEnabled;for(let Se=0;Se<=ue;Se+=be){const at=Math.round(Se/be)*be;if(at===0||!Qe||at>De)continue;const Pe=D[nt++];if(!Pe)break;Pe.style.fontSize=rt,Pe.text=String(at),Pe.position.set(Te+at*Me,je+9),Pe.visible=!0;const Xt=D[nt++];if(!Xt)break;Xt.style.fontSize=rt,Xt.text=String(-at),Xt.position.set(Te-at*Me,je+9),Xt.visible=!0}for(let Se=0;Se<=ve;Se+=be){const at=Math.round(Se/be)*be;if(at===0||!Qe||at>Ie)continue;const Pe=D[nt++];if(!Pe)break;Pe.style.fontSize=rt,Pe.text=String(at),Pe.position.set(Te+8,je-Se*Me),Pe.visible=!0;const Xt=D[nt++];if(!Xt)break;Xt.style.fontSize=rt,Xt.text=String(-at),Xt.position.set(Te+8,je+Se*Me),Xt.visible=!0}for(;nt{e.editor.viewX=ne+(Me.clientX-Y),e.editor.viewY=ue+(Me.clientY-ee)},_e=()=>{window.removeEventListener("pointermove",ve),window.removeEventListener("pointerup",_e),window.removeEventListener("pointercancel",_e)};window.addEventListener("pointermove",ve),window.addEventListener("pointerup",_e),window.addEventListener("pointercancel",_e)}function ge(H,Y){const ee=t.value.getBoundingClientRect(),ne=Math.max(1e-4,e.editor.viewScale),ue=H-ee.left,ve=Y-ee.top;return{x:(ue-f.screen.width/2-e.editor.viewX)/ne,y:-(ve-f.screen.height*.5-e.editor.viewY)/ne}}function le(H,Y,ee){const ne=H.rotation*Math.PI/180,ue=Math.cos(ne),ve=Math.sin(ne),_e=Math.max(1e-4,Math.abs(H.scaleX??1)),Me=Math.max(1e-4,Math.abs(H.scaleY??1));return{x:H.x+ue*Y*_e-ve*ee*Me,y:H.y+ve*Y*_e+ue*ee*Me}}function Oe(H,Y,ee){const ne=H.rotation*Math.PI/180,ue=Math.cos(ne),ve=Math.sin(ne),_e=Math.max(1e-4,Math.abs(H.scaleX??1)),Me=Math.max(1e-4,Math.abs(H.scaleY??1)),be=Y-H.x,De=ee-H.y;return{x:(ue*be+ve*De)/_e,y:(-ve*be+ue*De)/Me}}function Fe(){if(e.activeObjectType!=="path")return null;const H=e.paths.find(Y=>Y.id===e.activeObjectId)||null;return(H==null?void 0:H.visible)===!1?null:H}function Be(H,Y,ee){if(H.points.length<2)return H.points.length;const ne=H.closed?H.points.length:H.points.length-1;let ue=H.points.length,ve=1/0;for(let _e=0;_eMath.hypot(Me.x-ne.x,Me.y-ne.y)<=ue);if(ve>=0){Y.points.splice(ve,1),K.clear();return}const _e=Be(Y,ne.x,ne.y);Y.points.splice(_e,0,{x:ne.x,y:ne.y,inX:0,inY:0,outX:0,outY:0}),K.clear(),K.add(_e)}function St(H){const Y=Fe();if(!Y||!Y.enabled)return!1;const ee=ge(H.clientX,H.clientY),ne=Oe(Y,ee.x,ee.y),ue=9/Math.max(.01,e.editor.viewScale);if(H.detail>=2){if(Y.points.findIndex(Ie=>Math.hypot(Ie.x-ne.x,Ie.y-ne.y)<=ue)>=0)return!0;const be={x:ne.x,y:ne.y,inX:0,inY:0,outX:0,outY:0},De=Be(Y,ne.x,ne.y);return Y.points.splice(De,0,be),K.clear(),K.add(De),fe=!0,At(Ie=>{const Le=ge(Ie.clientX,Ie.clientY),Te=Oe(Y,Le.x,Le.y);be.outX=Te.x-be.x,be.outY=Te.y-be.y,be.inX=-be.outX,be.inY=-be.outY}),!0}let ve=null;for(const Me of K){const be=Y.points[Me];be&&(Math.hypot(be.x+be.inX-ne.x,be.y+be.inY-ne.y)<=ue&&(ve={index:Me,side:"in"}),Math.hypot(be.x+be.outX-ne.x,be.y+be.outY-ne.y)<=ue&&(ve={index:Me,side:"out"}))}if(ve){const Me=Y.points[ve.index],be=ve.side==="in"?Math.hypot(Me.outX,Me.outY):Math.hypot(Me.inX,Me.inY);return At(Ie=>{const Le=ge(Ie.clientX,Ie.clientY),Te=Oe(Y,Le.x,Le.y),je=Te.x-Me.x,rt=Te.y-Me.y;if(ve.side==="in"?(Me.inX=je,Me.inY=rt):(Me.outX=je,Me.outY=rt),!Ie.altKey){const Je=Math.max(1e-4,Math.hypot(je,rt)),nt=Ie.shiftKey?Je:be;ve.side==="in"?(Me.outX=-je/Je*nt,Me.outY=-rt/Je*nt):(Me.inX=-je/Je*nt,Me.inY=-rt/Je*nt)}}),!0}const _e=Y.points.findIndex(Me=>Math.hypot(Me.x-ne.x,Me.y-ne.y)<=ue);if(_e>=0){if(H.altKey)return K.delete(_e),!0;H.ctrlKey||H.metaKey?K.add(_e):K.has(_e)||(K.clear(),K.add(_e));const Me=ne,be=[...K].map(Ie=>({index:Ie,x:Y.points[Ie].x,y:Y.points[Ie].y}));return At(Ie=>{const Le=ge(Ie.clientX,Ie.clientY),Te=Oe(Y,Le.x,Le.y);for(const je of be)Y.points[je.index].x=je.x+Te.x-Me.x,Y.points[je.index].y=je.y+Te.y-Me.y}),!0}if(H.altKey&&!H.ctrlKey&&!H.metaKey)return K.clear(),!0;if(H.ctrlKey||H.metaKey||H.altKey){const Me=ne,be=H.altKey,De=Ie=>{const Le=ge(Ie.clientX,Ie.clientY),Te=Oe(Y,Le.x,Le.y),je=Math.min(Me.x,Te.x),rt=Math.max(Me.x,Te.x),Je=Math.min(Me.y,Te.y),nt=Math.max(Me.y,Te.y);Y.points.forEach((Qe,Se)=>{Qe.x>=je&&Qe.x<=rt&&Qe.y>=Je&&Qe.y<=nt&&(be?K.delete(Se):K.add(Se))}),window.removeEventListener("pointerup",De),window.removeEventListener("pointercancel",De)};return window.addEventListener("pointerup",De),window.addEventListener("pointercancel",De),!0}return!1}function At(H){const Y=()=>{window.removeEventListener("pointermove",H),window.removeEventListener("pointerup",Y),window.removeEventListener("pointercancel",Y)};window.addEventListener("pointermove",H),window.addEventListener("pointerup",Y),window.addEventListener("pointercancel",Y)}function Et(H){if(e.activeObjectType!=="collision")return!1;const Y=e.colliders.find(nt=>nt.id===e.activeObjectId);if(!(Y!=null&&Y.enabled)||Y.visible===!1)return!1;const ee=ge(H.clientX,H.clientY),ne=Y.rotation*Math.PI/180,ue=Math.cos(ne),ve=Math.sin(ne),_e=Math.max(1e-4,Math.abs(Y.scaleX??1)),Me=Math.max(1e-4,Math.abs(Y.scaleY??1)),be=ee.x-Y.x,De=ee.y-Y.y,Ie=(ue*be+ve*De)/_e,Le=(-ve*be+ue*De)/Me;if(!(Y.shape==="circle"?Math.hypot(Ie,Le)<=Y.radius:Y.shape==="ellipse"?Math.hypot(Ie/Math.max(1,Y.radiusX),Le/Math.max(1,Y.radiusY))<=1:Math.abs(Ie)<=Y.width*.5&&Math.abs(Le)<=Y.height*.5))return!1;const je=Y.x,rt=Y.y,Je=ee;return At(nt=>{const Qe=ge(nt.clientX,nt.clientY);Y.x=je+Qe.x-Je.x,Y.y=rt+Qe.y-Je.y}),!0}function It(H){const Y=e.systems.find(De=>De.id===e.activeId);if((Y==null?void 0:Y.visible)===!1)return!1;const ee=Y==null?void 0:Y.config;if(!(ee!=null&&ee.forceField)||ee.forceRadius<=0)return!1;const ne=ge(H.clientX,H.clientY);if(Math.hypot(ne.x-ee.forceCenterX,ne.y-ee.forceCenterY)>ee.forceRadius)return!1;const ve=ee.forceCenterX,_e=ee.forceCenterY;t.value&&(t.value.style.cursor="grabbing");const Me=De=>{const Ie=ge(De.clientX,De.clientY);ee.forceCenterX=ve+Ie.x-ne.x,ee.forceCenterY=_e+Ie.y-ne.y},be=()=>{t.value&&(t.value.style.cursor=""),window.removeEventListener("pointermove",Me),window.removeEventListener("pointerup",be),window.removeEventListener("pointercancel",be)};return window.addEventListener("pointermove",Me),window.addEventListener("pointerup",be),window.addEventListener("pointercancel",be),H.preventDefault(),!0}function Kt(H){const Y=e.systems.find(Ie=>Ie.id===e.activeId);if((Y==null?void 0:Y.visible)===!1)return!1;const ee=Y==null?void 0:Y.config;if(!(ee!=null&&ee.attraction))return!1;const ne=ge(H.clientX,H.clientY),ue=Math.max(ee.attractionRadius,12/Math.max(1e-4,e.editor.viewScale));if(Math.hypot(ne.x-ee.attractionCenterX,ne.y-ee.attractionCenterY)>ue)return!1;const _e=ee.attractionCenterX,Me=ee.attractionCenterY;t.value&&(t.value.style.cursor="grabbing");const be=Ie=>{const Le=ge(Ie.clientX,Ie.clientY);ee.attractionCenterX=_e+Le.x-ne.x,ee.attractionCenterY=Me+Le.y-ne.y},De=()=>{t.value&&(t.value.style.cursor=""),window.removeEventListener("pointermove",be),window.removeEventListener("pointerup",De),window.removeEventListener("pointercancel",De)};return window.addEventListener("pointermove",be),window.addEventListener("pointerup",De),window.addEventListener("pointercancel",De),H.preventDefault(),!0}function Ti(){const H=e.activeObjectId;if(e.activeObjectType==="particle"){const ne=e.systems.find(ve=>ve.id===H);if(!ne||ne.visible===!1)return null;const ue=ne.config;return{x:ue.centerX,y:ue.centerY,rotation:ue.rootRotation,scaleX:ue.rootScaleX??1,scaleY:ue.rootScaleY??1,setPosition:(ve,_e)=>{ue.centerX=ve,ue.centerY=_e},setRotation:ve=>{ue.rootRotation=ve},setScale:(ve,_e)=>{ue.rootScaleX=ve,ue.rootScaleY=_e}}}const ee=(e.activeObjectType==="collision"?e.colliders:e.activeObjectType==="path"?e.paths:e.spines).find(ne=>ne.id===H);return!ee||ee.visible===!1?null:{x:Number(ee.x)||0,y:Number(ee.y)||0,rotation:Number(ee.rotation)||0,scaleX:Math.max(.05,Number(ee.scaleX)||1),scaleY:Math.max(.05,Number(ee.scaleY)||1),setPosition:(ne,ue)=>{ee.x=ne,ee.y=ue},setRotation:ne=>{ee.rotation=ne},setScale:(ne,ue)=>{ee.scaleX=ne,ee.scaleY=ue}}}function Wi(H){const Y=Ti();if(!Y)return;const ee=e.editor.viewScale,ne=t.value.getBoundingClientRect(),ue=ne.left+f.screen.width/2+e.editor.viewX+Y.x*ee,ve=ne.top+f.screen.height*.5+e.editor.viewY+-Y.y*ee,_e=H.clientX,Me=H.clientY,be=l.value,De=Y.x,Ie=Y.y,Le=Y.rotation,Te=Y.scaleX,je=Y.scaleY,rt=Math.hypot(_e-ue,Me-ve)||1,Je=Math.atan2(Me-ve,_e-ue),nt=Se=>{const at=(Se.clientX-_e)/ee,Pe=(Se.clientY-Me)/ee;if(be==="translate")Y.setPosition(De+at,Ie-Pe);else if(be==="rotate"){const Xt=Math.atan2(Se.clientY-ve,Se.clientX-ue);Y.setRotation(Le-(Xt-Je)*180/Math.PI)}else if(be==="scale"){const Bt=Math.hypot(Se.clientX-ue,Se.clientY-ve)/rt;Y.setScale(Math.max(.05,Te*Bt),Math.max(.05,je*Bt))}},Qe=()=>{window.removeEventListener("pointermove",nt),window.removeEventListener("pointerup",Qe),window.removeEventListener("pointercancel",Qe)};window.addEventListener("pointermove",nt),window.addEventListener("pointerup",Qe),window.addEventListener("pointercancel",Qe)}function zi(){di(1.2)}function dn(){di(1/1.2)}function di(H){const Y=Math.max(.01,e.editor.viewScale*H);e.editor.viewScale=Y}function ce(){e.editor.viewScale=1,e.editor.viewX=0,e.editor.viewY=0}function de(){e.editor.viewScale=1,e.editor.viewX=0,e.editor.viewY=0}function Rt(){e.settings.showGrid=!e.settings.showGrid}function Wt(){if(p){for(const[H,Y]of V){const ee=e.systems.find(ne=>ne.id===H);(!ee||q.get(H)!==ee.config)&&(p.removeChild(Y),Y.destroy({children:!0}),V.delete(H),q.delete(H))}for(const H of e.systems){X&&!H.config.texture&&(H.config.texture=X);const Y=Wr(H.config);if(E)for(const ne of Y.trailResources)!ne.texture&&(ne.previewUrl==="/images/trail.png"||ne.previewUrl==="/trails/trail.png")&&(ne.texture=E);if(X)for(const ne of Y.imageResources)!ne.texture&&ne.textureName==="star"&&(ne.texture=X);if(V.has(H.id))continue;const ee=new BI(H.config);ee.setEmitterPos(()=>({x:H.config.centerX,y:H.config.centerY})),p.addChild(ee),V.set(H.id,ee),q.set(H.id,H.config)}}}function Zt(){if(!b)return;const H=b;if(H.clear(),!!e.settings.showEmitter&&e.systems.length)for(const Y of e.systems){if(Y.visible===!1)continue;const ee=J.get(Y.id),ne=(ee==null?void 0:ee.x)??Y.config.centerX??0,ue=-((ee==null?void 0:ee.y)??Y.config.centerY??0),ve=e.activeObjectType==="particle"&&Y.id===e.activeId,_e=ve?16763955:9082040,Me=ve?.4:.2;H.lineStyle(1,_e,Me),H.drawCircle(ne,ue,10),H.beginFill(_e,ve?.8:.4),H.drawCircle(ne,ue,3),H.endFill(),H.lineStyle(1,_e,ve?.3:.15),H.moveTo(ne-16,ue),H.lineTo(ne+16,ue),H.moveTo(ne,ue-16),H.lineTo(ne,ue+16)}}function pt(){var ee;if(!y)return;const H=y;(ee=H.parent)==null||ee.addChild(H),H.clear();const Y=new Map;for(const ne of e.spines)ne.visible===!1||!ne.selectedBone||ne.status!=="ready"||Y.set(`${ne.id}:${ne.selectedBone}`,{spineId:ne.id,boneName:ne.selectedBone});for(const ne of e.systems){if(ne.visible===!1)continue;const ue=ne.config;if(!ue.emitterFollow||ue.emitterFollowMode!=="bone"||!ue.emitterFollowSpineId||!ue.emitterFollowBoneName)continue;const ve=e.spines.find(_e=>_e.id===ue.emitterFollowSpineId);!ve||ve.visible===!1||Y.set(`${ue.emitterFollowSpineId}:${ue.emitterFollowBoneName}`,{spineId:ue.emitterFollowSpineId,boneName:ue.emitterFollowBoneName})}for(const ne of Y.values()){const ue=B==null?void 0:B.getBoneWorldTransform(ne.spineId,ne.boneName);if(!ue)continue;const ve=ue.x,_e=-ue.y;H.lineStyle(2,12881151,.95),H.beginFill(12881151,.2),H.drawCircle(ve,_e,8),H.endFill(),H.beginFill(15919103,1),H.drawCircle(ve,_e,3.5),H.endFill()}}function Rs(){if(!A)return;const H=A;if(H.clear(),!e.settings.showEmitter)return;const Y=e.systems.find(Je=>Je.id===e.activeId);if(!Y||Y.visible===!1)return;const ee=Y.config,ne=J.get(Y.id),ue=(ne==null?void 0:ne.x)??ee.centerX??0,ve=-((ne==null?void 0:ne.y)??ee.centerY??0),_e=ee.shape;if(_e==="point"||_e==="path")return;const Me=ee.rootScaleX??1,be=ee.rootScaleY??1,De=-((ne==null?void 0:ne.rotation)??ee.rootRotation??0)*Math.PI/180,Ie=Math.cos(De),Le=Math.sin(De),Te=ee.offsetX??0,je=ee.offsetY??0,rt=(Je,nt)=>{const Qe=Je+Te,Se=-nt-je,at=Qe*Me,Pe=Se*be;return[ue+at*Ie-Pe*Le,ve+(at*Le+Pe*Ie)]};if(_e==="circle"){const Je=Rh(ee.innerRadius,ee.outerRadius);H.lineStyle(2,3991658,.7);const nt=48;for(const Qe of[Je.outer,Je.inner])if(!(Qe<=0))for(let Se=0;Se<=nt;Se++){const at=Se/nt*Math.PI*2,[Pe,Xt]=rt(Math.cos(at)*Qe,Math.sin(at)*Qe);Se===0?H.moveTo(Pe,Xt):H.lineTo(Pe,Xt)}}else if(_e==="rect"){const Je=ub(ee);H.lineStyle(2,4885759,.7);for(const[nt,Qe]of[[Je.outerW,Je.outerH],[Je.innerW,Je.innerH]]){if(nt<=0||Qe<=0)continue;const Se=nt/2,at=Qe/2,Pe=rt(-Se,-at),Xt=rt(Se,-at),Bt=rt(Se,at),si=rt(-Se,at);H.moveTo(Pe[0],Pe[1]),H.lineTo(Xt[0],Xt[1]),H.lineTo(Bt[0],Bt[1]),H.lineTo(si[0],si[1]),H.lineTo(Pe[0],Pe[1])}}else if(_e==="cone"){const Je=Rh(ee.innerRadius,ee.outerRadius),nt=ee.coneAngle/2*Math.PI/180,Qe=ee.coneDirection*Math.PI/180,Se=rt(Math.cos(Qe-nt)*Je.inner,Math.sin(Qe-nt)*Je.inner),at=rt(Math.cos(Qe+nt)*Je.inner,Math.sin(Qe+nt)*Je.inner),Pe=rt(Math.cos(Qe-nt)*Je.outer,Math.sin(Qe-nt)*Je.outer),Xt=rt(Math.cos(Qe+nt)*Je.outer,Math.sin(Qe+nt)*Je.outer);H.lineStyle(2,3991658,.7),H.moveTo(Se[0],Se[1]),H.lineTo(Pe[0],Pe[1]),H.moveTo(at[0],at[1]),H.lineTo(Xt[0],Xt[1]),H.lineStyle(1,3991658,.5);const Bt=24;for(const si of[Je.outer,Je.inner])if(!(si<=0))for(let Ci=0;Ci<=Bt;Ci++){const ns=Qe-nt+2*nt*Ci/Bt,[Ha,$]=rt(Math.cos(ns)*si,Math.sin(ns)*si);Ci===0?H.moveTo(Ha,$):H.lineTo(Ha,$)}}}function Hs(){if(!T)return;const H=T;H.clear();const Y=e.systems.find(_e=>_e.id===e.activeId);if((Y==null?void 0:Y.visible)===!1)return;const ee=Y==null?void 0:Y.config;if(!(ee!=null&&ee.forceField)||ee.forceRadius<=0)return;const ne=ee.forceCenterX,ue=-ee.forceCenterY,ve=ee.forceStrength>=0?5818367:16739194;H.lineStyle(2,ve,.85),H.beginFill(ve,.08),H.drawCircle(ne,ue,ee.forceRadius),H.endFill(),H.lineStyle(1,ve,.7),H.moveTo(ne-9,ue),H.lineTo(ne+9,ue),H.moveTo(ne,ue-9),H.lineTo(ne,ue+9),H.beginFill(ve,.95),H.drawCircle(ne,ue,4),H.endFill()}function Ui(){if(!_)return;const H=_;H.clear();const Y=e.systems.find(Me=>Me.id===e.activeId);if((Y==null?void 0:Y.visible)===!1)return;const ee=Y==null?void 0:Y.config;if(!(ee!=null&&ee.attraction))return;const ne=ee.attractionCenterX,ue=-ee.attractionCenterY,ve=Math.max(0,ee.attractionRadius),_e=16731487;ve>0&&(H.lineStyle(2,_e,.95),H.beginFill(_e,.09),H.drawCircle(ne,ue,ve),H.endFill()),H.lineStyle(1,_e,.85),H.moveTo(ne-10,ue),H.lineTo(ne+10,ue),H.moveTo(ne,ue-10),H.lineTo(ne,ue+10),H.beginFill(_e,1),H.drawCircle(ne,ue,ve>0?4:6),H.endFill()}function Ps(){if(!F)return;const H=F;if(H.clear(),!l.value)return;const Y=Ti();if(!Y)return;const ee=Y.x,ne=-Y.y,ue=Y.scaleX,ve=Y.scaleY,_e=-Y.rotation*Math.PI/180,Me=Math.cos(_e),be=Math.sin(_e),De=(Te,je)=>{const rt=Te*ue,Je=-je*ve;return[ee+rt*Me-Je*be,ne+(rt*be+Je*Me)]},Ie=(Te,je,rt,Je)=>{const nt=De(Te,je),Qe=De(rt,Je);H.moveTo(nt[0],nt[1]),H.lineTo(Qe[0],Qe[1])},Le=26;if(H.lineStyle(2,3526911,.9),H.beginFill(3526911,.25),H.drawCircle(ee,ne,6),H.endFill(),l.value==="translate")H.lineStyle(2,3526911,.9),Ie(-Le,0,Le,0),Ie(0,-Le,0,Le),Ie(Le-6,-4,Le,0),Ie(Le,0,Le-6,4),Ie(-20,-4,-Le,0),Ie(-Le,0,-20,4),Ie(-4,Le-6,0,Le),Ie(0,Le,4,Le-6),Ie(-4,-20,0,-Le),Ie(0,-Le,4,-20);else if(l.value==="rotate"){H.lineStyle(2,3526911,.8);const Te=48;for(let Je=0;Je<=Te;Je++){const nt=Je/Te*Math.PI*2,[Qe,Se]=De(Math.cos(nt)*Le,Math.sin(nt)*Le);Je===0?H.moveTo(Qe,Se):H.lineTo(Qe,Se)}const[je,rt]=De(0,Le);H.beginFill(3526911,.95),H.drawCircle(je,rt,4),H.endFill()}else if(l.value==="scale"){H.lineStyle(2,3526911,.9);const je=[[-Le,-Le],[Le,-Le],[Le,Le],[-Le,Le]].map(([rt,Je])=>De(rt,Je));H.moveTo(je[0][0],je[0][1]),H.lineTo(je[1][0],je[1][1]),H.lineTo(je[2][0],je[2][1]),H.lineTo(je[3][0],je[3][1]),H.lineTo(je[0][0],je[0][1]),H.beginFill(3526911,.9);for(const rt of je)H.drawRect(rt[0]-3,rt[1]-3,6,6);H.endFill()}}function br(H,Y,ee,ne){var _e;const ue=Number.isFinite(Y.worldX)&&Number.isFinite(Y.worldY),ve=Number.isFinite(Y.worldRotation);H.push({boneName:Y.boneName,x:ue?Y.worldX:Y.x,y:ue?-Y.worldY:Y.y,rotation:ve?-Y.worldRotation:-Y.rotation,parentX:ee,parentY:ne}),(_e=Y.trailState)!=null&&_e.bones.length&&Y.trailState.bones.forEach(Me=>{const be=Number.isFinite(Me.worldX)&&Number.isFinite(Me.worldY),De=Number.isFinite(Me.worldRotation);H.push({boneName:Me.boneName,x:be?Me.worldX:Me.x,y:be?-Me.worldY:Me.y,rotation:De?-Me.worldRotation:Me.rotation,parentX:ee,parentY:ne,trail:!0})})}function js(H,Y,ee,ne,ue,ve,_e,Me){const be=ve*.62,De=Y+ne*ve,Ie=ee+ue*ve,Le=Math.max(2.5,ve*.32),Te=Math.max(1.7,ve*.22),je=De-ne*Le,rt=Ie-ue*Le,Je=-ue,nt=ne;H.lineStyle(_e,Me,.95),H.moveTo(Y-ne*be,ee-ue*be),H.lineTo(je,rt),H.lineStyle(0),H.beginFill(Me,.95),H.drawPolygon([De,Ie,je+Je*Te,rt+nt*Te,je-Je*Te,rt-nt*Te]),H.endFill()}function ss(H){if(!w)return;const Y=w;if(Y.clear(),!e.settings.showBones)return;const ee=0,ne=0,ue=Math.max(.25,Math.abs(e.editor.viewScale)||1),ve=Math.min(10,Math.max(.1,Number(e.settings.bonePointDrawSize)||1)),_e=Math.min(10,Math.max(.1,Number(e.settings.boneAxisDrawSize)||2)),Me=2.5*ve/ue,be=4.5*_e/ue,De=Math.max(.65,_e*.625)/ue;for(const Ie of H){const Le=Ie.trail?16731533:16747610;Y.lineStyle(1,Le,Ie.trail?.65:.35),Y.moveTo(Ie.parentX??ee,Ie.parentY??ne),Y.lineTo(Ie.x,Ie.y);const Te=Ie.rotation*Math.PI/180,je=Math.cos(Te),rt=Math.sin(Te);js(Y,Ie.x,Ie.y,je,rt,be,De,15684432),js(Y,Ie.x,Ie.y,rt,-je,be,De,5622123),Y.beginFill(Le,.9),Y.drawCircle(Ie.x,Ie.y,Me),Y.endFill()}}function $a(H,Y=16777215){const ee=Number.parseInt(H.replace("#",""),16);return Number.isFinite(ee)?ee:Y}function Ga(){if(!R)return;const H=R;H.clear();for(const Y of W){if(Y.visible===!1)continue;const ee=e.activeObjectType==="collision"&&e.activeObjectId===Y.id,ne=Y.enabled?ee?16735858:13911899:5792116,ue=Y.rotation*Math.PI/180,ve=Math.cos(ue),_e=Math.sin(ue),Me=Math.max(1e-4,Math.abs(Y.scaleX??1)),be=Math.max(1e-4,Math.abs(Y.scaleY??1)),De=(Te,je)=>({x:Y.x+ve*Te*Me-_e*je*be,y:-(Y.y+_e*Te*Me+ve*je*be)});let Ie=[];if(Y.shape==="circle"||Y.shape==="ellipse"){const Te=Y.shape==="circle"?Y.radius:Y.radiusX,je=Y.shape==="circle"?Y.radius:Y.radiusY;Ie=Array.from({length:49},(rt,Je)=>{const nt=Je/48*Math.PI*2;return De(Math.cos(nt)*Te,Math.sin(nt)*je)})}else if(Y.shape==="rect"){const Te=Y.width*.5,je=Y.height*.5;Ie=[De(-Te,-je),De(Te,-je),De(Te,je),De(-Te,je),De(-Te,-je)]}else{const Te=Math.max(3,Math.min(16,Math.round(Y.sides)));Ie=Array.from({length:Te+1},(je,rt)=>{const Je=Math.PI*.5+rt%Te/Te*Math.PI*2;return De(Math.cos(Je)*Y.width*.5,Math.sin(Je)*Y.height*.5)})}if(!Ie.length)continue;H.lineStyle(ee?2.5:1.5,ne,Y.enabled?.95:.45),H.beginFill(ne,ee?.12:.055),H.moveTo(Ie[0].x,Ie[0].y);for(let Te=1;Te{const Ie=le(Y,be,De);return{x:Ie.x,y:-Ie.y}},ve=Y.points[0],_e=ue(ve.x,ve.y);H.lineStyle(ee?2.5:1.8,ne,ee?1:.75),H.moveTo(_e.x,_e.y);const Me=Y.closed?Y.points.length:Y.points.length-1;for(let be=0;be{const Ie=ue(be.x,be.y),Le=ue(be.x+be.inX,be.y+be.inY),Te=ue(be.x+be.outX,be.y+be.outY),je=Math.hypot(be.inX,be.inY)>.01,rt=Math.hypot(be.outX,be.outY)>.01;H.lineStyle(1,11121867,.65),je&&(H.moveTo(Ie.x,Ie.y),H.lineTo(Le.x,Le.y)),rt&&(H.moveTo(Ie.x,Ie.y),H.lineTo(Te.x,Te.y)),je&&(H.beginFill(14015724,.95),H.drawCircle(Le.x,Le.y,3),H.endFill()),rt&&(H.beginFill(14015724,.95),H.drawCircle(Te.x,Te.y,3),H.endFill()),H.beginFill(K.has(De)?16777215:ne,1),H.lineStyle(1.5,K.has(De)?6126847:16777215,.95),H.drawCircle(Ie.x,Ie.y,K.has(De)?5:4),H.endFill()})}}function Ws(H,Y,ee="linear"){if(!H.length)return Y;const ne=[...H].sort((ue,ve)=>ue.x-ve.x);if(Y<=ne[0].x)return ne[0].y;for(let ue=1;ue{if(!Y.followPath||!Y.followPathId)return Y;const ee=e.paths.find(De=>De.id===Y.followPathId&&De.enabled);if(!(ee!=null&&ee.points.length))return Y;const ne=Math.max(.05,Number(Y.followDuration)||2),ue=Math.min(1,Math.max(0,H/ne)),ve=Array.isArray(Y.followCurve)?Y.followCurve:[{x:0,y:0},{x:1,y:1}],_e=Y.followCurveMode==="跟随导出"?e.settings.exportSettings.keyframeCurve==="bezier"?"bezier":"linear":Y.followCurveMode==="贝塞尔"?"bezier":"linear",Me=Math.min(1,Math.max(0,Ws(ve,ue,_e))),be=yf(ee,Me);return be?{...Y,x:be.x,y:be.y,rotation:Y.rotation+(Y.followPathRotation?be.angle:0)}:Y})}function ks(H,Y,ee,ne=Math.max(1e-4,Math.abs(H.rootScaleX)),ue=Math.max(1e-4,Math.abs(H.rootScaleY))){const ve=-H.rootRotation*Math.PI/180,_e=Math.cos(ve),Me=Math.sin(ve),be=Y-H.centerX,De=-ee+H.centerY;return{x:(_e*be+Me*De)/ne,y:(-Me*be+_e*De)/ue}}function ea(H,Y,ee){const ne=yf(Y,ee);if(!ne)return null;const ue=ks(H,ne.x,ne.y),ve=ne.angle*Math.PI/180,_e=ks(H,ne.x+Math.cos(ve),ne.y+Math.sin(ve)),Me=Math.atan2(_e.y-ue.y,_e.x-ue.x)*180/Math.PI;return{...ue,angle:Me}}function ta(){var ee,ne,ue;O=requestAnimationFrame(ta);const H=performance.now()/1e3;let Y=H-U;if(U=H,Y>.1&&(Y=.1),f&&p){p.scale.set(e.editor.viewScale),p.position.set(f.screen.width/2+e.editor.viewX,f.screen.height*.5+e.editor.viewY),m&&(m.position.set(Number(e.settings.backgroundX)||0,-(Number(e.settings.backgroundY)||0)),m.alpha=Math.min(1,Math.max(0,Number(e.settings.backgroundOpacity)||0))),he(),Wt();const ve=Math.max(1,e.timeline.fps),_e=e.timeline.frame,Me=_e/ve;B==null||B.sync(e.spines,_e,ve),Vn(Me);for(const Qe of e.systems){const Se=V.get(Qe.id);if(!Se)continue;Se.setFollowExportCurveMode(e.settings.exportSettings.keyframeCurve==="bezier"?"贝塞尔":"线性");const at=Qe.visible!==!1;Se.visible=at,Se.renderable=at;const Pe=Qe.config;Se.scale.set(Pe.rootScaleX,Pe.rootScaleY);const Xt=new Set(Pe.collisionColliderIds);Se.setColliders(Pe.collision?W.filter(ut=>Xt.has(ut.id)):[]),Se.setEmitterFollowSpawn(0,0,0);let Bt={x:Pe.centerX,y:Pe.centerY,rotation:Pe.rootRotation};const si=Pe.emitterFollow&&Pe.emitterFollowMode==="bone"?e.spines.find(ut=>ut.id===Pe.emitterFollowSpineId&&ut.enabled&&ut.status==="ready"):null,Ci=si&&(B==null?void 0:B.getBoneWorldTransform(si.id,Pe.emitterFollowBoneName))||null,ns=Pe.emitterFollow&&Pe.emitterFollowMode==="path"?e.paths.find(ut=>ut.id===Pe.emitterFollowPathId&&ut.enabled):null,Ha=Math.max(.05,Pe.emitterFollowDuration),$=Math.min(1,Math.max(0,Me/Ha)),S=Math.min(1,Math.max(0,Ws(Pe.emitterFollowCurve,$))),C=Math.min(1,Math.max(0,Pe.emitterFollowOffset)),Q=Pe.emitterFollowDirection==="reverse"?(1-C)*(1-S):C+(1-C)*S,Re=ns?yf(ns,Q):null;if(Ci){const ut=Pe.emitterFollowBoneOffsetX,ni=Pe.emitterFollowBoneOffsetY,Vt=Ci.x+ut,rs=Ci.y+ni,tc=Pe.rootRotation+Pe.emitterFollowBoneRotation,Xo=Math.max(1e-4,Math.abs(Pe.rootScaleX*Pe.emitterFollowBoneScaleX)),Vo=Math.max(1e-4,Math.abs(Pe.rootScaleY*Pe.emitterFollowBoneScaleY));if(Bt={x:Vt,y:rs,rotation:tc},Pe.emitterFollowSpace==="local")Se.position.set(Vt,-rs),Se.rotation=-tc*Math.PI/180,Se.scale.set(Xo,Vo),Se.setSimulationTransform(Vt,rs,tc,Xo,Vo);else{Se.position.set(Pe.centerX,-Pe.centerY),Se.rotation=-Pe.rootRotation*Math.PI/180,Se.scale.set(Xo,Vo),Se.setSimulationTransform(Pe.centerX,Pe.centerY,Pe.rootRotation,Xo,Vo);const Vp=ks(Pe,Vt,rs,Xo,Vo),AS=-(tc-Pe.rootRotation);Se.setEmitterFollowSpawn(Vp.x,Vp.y,AS)}}else if(Re){const ut=Re.angle+(Pe.emitterFollowDirection==="reverse"?180:0),ni=Pe.emitterAngleMode==="direction"?ut:Pe.rootRotation;if(Bt={x:Re.x,y:Re.y,rotation:ni},Pe.emitterFollowSpace==="local")Se.position.set(Re.x,-Re.y),Se.rotation=-ni*Math.PI/180,Se.setSimulationTransform(Re.x,Re.y,ni);else{Se.position.set(Pe.centerX,-Pe.centerY),Se.rotation=-Pe.rootRotation*Math.PI/180,Se.setSimulationTransform(Pe.centerX,Pe.centerY,Pe.rootRotation);const Vt=ks(Pe,Re.x,Re.y),rs=Pe.emitterAngleMode==="direction"?-(ut-Pe.rootRotation):0;Se.setEmitterFollowSpawn(Vt.x,Vt.y,rs)}}else Se.position.set(Pe.centerX,-Pe.centerY),Se.rotation=-Pe.rootRotation*Math.PI/180,Se.setSimulationTransform(Pe.centerX,Pe.centerY,Pe.rootRotation);const mt=Pe.shape==="path"&&Pe.spawnPathId>0&&e.paths.find(ut=>ut.id===Pe.spawnPathId&&ut.enabled&&ut.points.length>0)||null;Se.setSpawnPathSampler(mt?ut=>ea(Pe,mt,ut):null,(mt==null?void 0:mt.closed)===!0),J.set(Qe.id,Bt)}let be=0;const De=[],Ie=e.settings.showBones&&e.activeObjectType==="particle"?e.activeObjectId:0,Le=(Qe,Se,at)=>{!Qe||Qe.id!==Ie||Qe.visible===!1||br(De,at,Se.position.x,Se.position.y)},Te=e.timeline,je=Te.fps,rt=1/Math.max(1,je);let Je=N,nt=0;if(Te.playing?(L+=Y,nt=Math.floor(L/rt),nt>0&&(L-=nt*rt)):L=0,Te.playing&&nt>0)for(let Qe=0;QeBt.id===e.activeId),at=(Se==null?void 0:Se.config.mode)==="stream"&&Se.config.streamBehavior==="loop"?gb(Se.config,je):null,Xt=Te.loop&&(at==null?void 0:at.start)===Te.playbackStart&&at.end===Te.playbackEnd?Te.playbackEnd-1:Te.playbackEnd;if(Te.frame>Xt)if(Te.loop)Te.frame=Te.playbackStart;else{Te.frame=Te.playbackEnd,Te.playing=!1;break}}else{if(Te.frame===0)for(const Se of e.systems){const at=V.get(Se.id);at&&(Se.config.mode==="stream"&&Se.config.streamBehavior==="loop"?sR(Se,at,je,Te.totalFrames):at.reset())}for(const[Se,at]of V){const Pe=e.systems.find(ns=>ns.id===Se),Xt=(Pe==null?void 0:Pe.config.mode)==="stream"&&Pe.config.streamBehavior==="loop",Bt=Xt?(ee=Pe.frames)==null?void 0:ee[Te.frame]:void 0,si=Te.frame===0&&!Xt,Ci=si?[]:Bt||at.update(rt);if(si?at.apply([]):Bt&&at.apply(Bt),(Pe==null?void 0:Pe.visible)!==!1)for(const ns of Ci)ns.active&&Le(Pe,at,ns);be+=Ci.length}for(const Se of e.systems){if(!Se.config.texture)continue;Se.frames=Se.frames||[];const at=V.get(Se.id);at&&!(Se.config.mode==="stream"&&Se.config.streamBehavior==="loop")&&(Se.frames[Te.frame]=at.capture())}Te.frame++,Te.frame>=Te.totalFrames&&(Te.frame=Te.playbackStart,Te.recorded=!0)}else{Te.playing||(Je=Te.frame);for(const Qe of e.systems){const Se=V.get(Qe.id),at=Te.playing?N:Te.frame,Pe=(ue=Qe.frames)==null?void 0:ue[at],Xt=Qe.config.mode==="stream"&&Qe.config.streamBehavior==="loop"&&!!Pe;if((Te.recorded||Xt)&&Se&&Pe){Se.apply(Pe);for(const Bt of Pe)Bt.active&&(Le(Qe,Se,Bt),be++)}else if(Se){const Bt=Te.frame===0?[]:Se.update(0);if(Te.frame===0&&Se.apply([]),Qe.visible!==!1)for(const si of Bt)si.active&&Le(Qe,Se,si);be+=Se.activeCount}}}N=Je,B==null||B.sync(e.spines,Je,je);for(const[,Qe]of V)Qe.drawTrailMeshDebug(e.settings.showSkinMesh);Ga(),Qr(),pt(),Zt(),Rs(),Hs(),Ui(),Ps(),ss(De),i.value&&(i.value.systems=e.systems.length,i.value.particles=be)}}return Kr(async()=>{const H=t.value;f=new Y1({width:H.clientWidth||800,height:H.clientHeight||600,backgroundAlpha:0,antialias:!0}),H.appendChild(f.view),we(),fs(()=>e.settings.backgroundImageData,z,{immediate:!0}),await me();const Y=X;for(const ee of e.systems){ee.config.texture=Y;const ne=Wr(ee.config);if(E)for(const ue of ne.trailResources)!ue.texture&&(ue.previewUrl==="/images/trail.png"||ue.previewUrl==="/trails/trail.png")&&(ue.texture=E);for(const ue of ne.imageResources)!ue.texture&&ue.textureName==="star"&&(ue.texture=Y)}i.value={systems:e.systems.length,particles:0},e.timeline.recorded=!1,e.timeline.frame=0,L=0,N=0,e.timeline.playing=!0,e.timeline.loop=!0;for(const ee of e.systems)ee.frames=[];e.recalcTotalFrames(),U=performance.now()/1e3,ta(),fs(()=>e.systems.map(ee=>JSON.stringify(ee.config,(ne,ue)=>ne==="texture"||ne==="trailTexture"||ne==="previewUrl"?void 0:ue)).join("|")+`|colliders:${JSON.stringify(e.colliders)}|paths:${JSON.stringify(e.paths)}`,()=>{e.recalcTotalFrames(),e.timeline.recorded=!1,e.timeline.frame=0;for(const ee of e.systems)ee.frames=[];e.timeline.playing=!0,e.timeline.loop=!0}),HP(e)}),Gl(()=>{cancelAnimationFrame(O),B==null||B.destroy(),B=null,v++,g&&g.destroy(!0),g=null,m=null,f&&(f.destroy(!0,{children:!0}),f=null)}),(H,Y)=>(ie(),ae("div",Ak,[M("div",{ref_key:"holder",ref:t,class:Ze(["stage-holder",{grid:ke(e).settings.showGrid}]),tabindex:"0",onWheel:bt(xe,["prevent"]),onPointerdown:oe,onDblclick:bt(st,["prevent"])},null,34),M("div",Ek,[M("button",{class:"settings-btn",onClick:Ae,title:"系统设置"},"系统设置"),M("button",{class:"undo-btn",disabled:ke(Iu).undoCount===0,onClick:Y[0]||(Y[0]=(...ee)=>ke(Tf)&&ke(Tf)(...ee)),title:"撤回上一步 (Ctrl+Z)"},"↶",8,Ck),M("div",Ik,[M("button",{class:Ze(["tool-btn",{on:l.value===""}]),onClick:Y[1]||(Y[1]=ee=>u("")),title:"拖动画布 (Q)"},"✋",2),M("button",{class:Ze(["tool-btn",{on:l.value==="translate"}]),onClick:Y[2]||(Y[2]=ee=>u("translate")),title:"位移 (W)"},"✥",2),M("button",{class:Ze(["tool-btn",{on:l.value==="rotate"}]),onClick:Y[3]||(Y[3]=ee=>u("rotate")),title:"旋转 (E)"},"⟳",2),M("button",{class:Ze(["tool-btn",{on:l.value==="scale"}]),onClick:Y[4]||(Y[4]=ee=>u("scale")),title:"缩放 (R)"},"⤢",2)]),M("div",Rk,[M("button",{class:"tool-btn",onClick:zi,title:"放大"},"+"),M("button",{class:"tool-btn",onClick:dn,title:"缩小"},"-"),M("button",{class:"tool-btn",onClick:ce,title:"适配画布"},"⤢"),M("button",{class:Ze(["tool-btn",{on:ke(e).settings.showGrid}]),onClick:Rt,title:"切换网格"},"▦",2),M("button",{class:"tool-btn",onClick:de,title:"重置视图"},"⟳")]),M("div",{class:"background-menu",onClick:Y[10]||(Y[10]=bt(()=>{},["stop"]))},[M("button",{class:Ze(["background-btn",{on:r.value}]),title:"背景图显示设置",onClick:Ee},"背景图",2),r.value?(ie(),ae("div",Pk,[M("button",{class:"background-upload",onClick:Y[5]||(Y[5]=ee=>{var ne;return(ne=o.value)==null?void 0:ne.click()})},Xe(h.value?"更换图像":"上传图像"),1),M("button",{class:"background-clear",disabled:!h.value,onClick:Y[6]||(Y[6]=ee=>j())},"清除背景",8,kk),M("input",{ref_key:"backgroundFileInput",ref:o,class:"background-file-input",type:"file",accept:"image/png,image/jpeg,image/webp",onChange:Z},null,544),M("div",{class:"background-file-name",title:h.value},Xe(h.value||"未上传图像"),9,Fk),M("div",Ok,[M("label",null,[Y[27]||(Y[27]=M("span",null,"X",-1)),ye(M("input",{"onUpdate:modelValue":Y[7]||(Y[7]=ee=>ke(e).settings.backgroundX=ee),type:"number",step:"1","aria-label":"背景图 X 偏移"},null,512),[[ht,ke(e).settings.backgroundX,void 0,{number:!0}]])]),M("label",null,[Y[28]||(Y[28]=M("span",null,"Y",-1)),ye(M("input",{"onUpdate:modelValue":Y[8]||(Y[8]=ee=>ke(e).settings.backgroundY=ee),type:"number",step:"1","aria-label":"背景图 Y 偏移"},null,512),[[ht,ke(e).settings.backgroundY,void 0,{number:!0}]])])]),M("label",Bk,[Y[29]||(Y[29]=M("span",null,"透明度",-1)),ye(M("input",{"onUpdate:modelValue":Y[9]||(Y[9]=ee=>ke(e).settings.backgroundOpacity=ee),type:"range",min:"0",max:"1",step:"0.01","aria-label":"背景图透明度"},null,512),[[ht,ke(e).settings.backgroundOpacity,void 0,{number:!0}]]),M("b",null,Xe(Math.round(ke(e).settings.backgroundOpacity*100))+"%",1)])])):Ve("",!0)]),M("button",{class:Ze(["help-btn",{on:a.value}]),title:"查看使用说明",onClick:pe},"使用说明",2),M("span",Lk,Xe(Math.round(ke(e).editor.viewScale*100))+"%",1)]),n.value?(ie(),ae("div",Dk,[M("div",Nk,[Y[30]||(Y[30]=Qt("系统设置 ",-1)),M("button",{class:"sp-close",onClick:Y[11]||(Y[11]=ee=>n.value=!1)},"✕")]),Y[44]||(Y[44]=M("div",{class:"sp-section-title"},"界面布局",-1)),M("label",Uk,[Y[32]||(Y[32]=M("span",null,"参数面板位置",-1)),M("span",Xk,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Y[12]||(Y[12]=ee=>ke(e).settings.parameterPanelOnRight=ee),"aria-label":"参数面板显示在右侧"},null,512),[[ei,ke(e).settings.parameterPanelOnRight]]),Y[31]||(Y[31]=M("span",{class:"sp-switch-ui","aria-hidden":"true"},null,-1)),M("b",null,Xe(ke(e).settings.parameterPanelOnRight?"右侧":"左侧"),1)])]),Y[45]||(Y[45]=M("div",{class:"sp-divider"},null,-1)),Y[46]||(Y[46]=M("div",{class:"sp-section-title"},"操作历史",-1)),M("label",Vk,[Y[33]||(Y[33]=M("span",null,"最大撤回步数",-1)),ye(M("input",{class:"sp-num sp-undo-limit",type:"number",min:"1",max:"200","onUpdate:modelValue":Y[13]||(Y[13]=ee=>ke(e).settings.undoLimit=ee),"aria-label":"最大撤回步数",onChange:G},null,544),[[ht,ke(e).settings.undoLimit,void 0,{number:!0}]])]),Y[47]||(Y[47]=M("div",{class:"sp-divider"},null,-1)),Y[48]||(Y[48]=M("div",{class:"sp-section-title"},"画布辅助显示",-1)),M("label",Yk,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Y[14]||(Y[14]=ee=>ke(e).settings.showEmitter=ee)},null,512),[[ei,ke(e).settings.showEmitter]]),Y[34]||(Y[34]=Qt("发射点",-1))]),M("label",$k,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Y[15]||(Y[15]=ee=>ke(e).settings.showBones=ee)},null,512),[[ei,ke(e).settings.showBones]]),Y[35]||(Y[35]=Qt("骨骼连线",-1))]),ke(e).settings.showBones?(ie(),ae(Ke,{key:0},[M("label",Gk,[Y[36]||(Y[36]=M("span",null,"骨骼点绘制大小",-1)),ye(M("input",{class:"sp-num",type:"number",min:"0.1",max:"10",step:"0.1","onUpdate:modelValue":Y[16]||(Y[16]=ee=>ke(e).settings.bonePointDrawSize=ee),"aria-label":"骨骼点绘制大小",onChange:d},null,544),[[ht,ke(e).settings.bonePointDrawSize,void 0,{number:!0}]])]),M("label",Hk,[Y[37]||(Y[37]=M("span",null,"坐标轴绘制大小",-1)),ye(M("input",{class:"sp-num",type:"number",min:"0.1",max:"10",step:"0.1","onUpdate:modelValue":Y[17]||(Y[17]=ee=>ke(e).settings.boneAxisDrawSize=ee),"aria-label":"坐标轴绘制大小",onChange:d},null,544),[[ht,ke(e).settings.boneAxisDrawSize,void 0,{number:!0}]])])],64)):Ve("",!0),M("label",jk,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Y[18]||(Y[18]=ee=>ke(e).settings.showSkinMesh=ee)},null,512),[[ei,ke(e).settings.showSkinMesh]]),Y[38]||(Y[38]=Qt("蒙皮网格",-1))]),Y[49]||(Y[49]=M("div",{class:"sp-divider"},null,-1)),M("label",Wk,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Y[19]||(Y[19]=ee=>ke(e).settings.tickEnabled=ee)},null,512),[[ei,ke(e).settings.tickEnabled]]),Y[39]||(Y[39]=Qt("启用刻度",-1))]),ke(e).settings.tickEnabled?(ie(),ae(Ke,{key:1},[M("label",zk,[Y[40]||(Y[40]=M("span",null,"刻度文字大小",-1)),ye(M("input",{type:"range",min:"8",max:"40",step:"1","onUpdate:modelValue":Y[20]||(Y[20]=ee=>ke(e).settings.axisFontSize=ee)},null,512),[[ht,ke(e).settings.axisFontSize,void 0,{number:!0}]]),ye(M("input",{type:"number",min:"8",max:"40","onUpdate:modelValue":Y[21]||(Y[21]=ee=>ke(e).settings.axisFontSize=ee),class:"sp-num"},null,512),[[ht,ke(e).settings.axisFontSize,void 0,{number:!0}]])]),M("label",qk,[Y[41]||(Y[41]=M("span",null,"刻度线粗细",-1)),ye(M("input",{type:"range",min:"1",max:"5",step:"0.5","onUpdate:modelValue":Y[22]||(Y[22]=ee=>ke(e).settings.tickWidth=ee)},null,512),[[ht,ke(e).settings.tickWidth,void 0,{number:!0}]]),ye(M("input",{type:"number",min:"1",max:"5","onUpdate:modelValue":Y[23]||(Y[23]=ee=>ke(e).settings.tickWidth=ee),class:"sp-num"},null,512),[[ht,ke(e).settings.tickWidth,void 0,{number:!0}]])]),M("label",Kk,[Y[42]||(Y[42]=M("span",null,"坐标轴颜色",-1)),ye(M("input",{type:"color","onUpdate:modelValue":Y[24]||(Y[24]=ee=>ke(e).settings.axisColor=ee),class:"sp-colr"},null,512),[[ht,ke(e).settings.axisColor]]),M("span",Zk,Xe(ke(e).settings.axisColor),1)]),M("label",Jk,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Y[25]||(Y[25]=ee=>ke(e).settings.showAxisLabels=ee)},null,512),[[ei,ke(e).settings.showAxisLabels]]),Y[43]||(Y[43]=Qt("显示刻度数值",-1))])],64)):Ve("",!0),Y[50]||(Y[50]=M("div",{class:"sp-cache-note"},"整个系统设置会自动保存到当前浏览器",-1))])):Ve("",!0),Ue(Tk,{show:a.value,onClose:Y[26]||(Y[26]=ee=>a.value=!1)},null,8,["show"]),i.value?(ie(),ae("div",Qk,[Y[51]||(Y[51]=Qt(" 系统: ",-1)),M("b",e3,Xe(i.value.systems),1),Y[52]||(Y[52]=Qt(" · 粒子(骨骼): ",-1)),M("b",t3,Xe(i.value.particles),1),Y[53]||(Y[53]=Qt(" · 根骨骼: ",-1)),Y[54]||(Y[54]=M("b",null,"root",-1)),Y[55]||(Y[55]=M("span",{class:"hud-tip"},"滚轮缩放 · 左键拖动画布",-1))])):Ve("",!0)]))}}),s3=Gs(i3,[["__scopeId","data-v-659e6fc2"]]),n3={class:"ns-label"},r3=["min","max","step","value","disabled"],a3=["min","max","step","value","disabled"],o3=$s({__name:"NumSlider",props:{label:{},modelValue:{},min:{},max:{},step:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,i=e,n=lt(String(t.modelValue));fs(()=>t.modelValue,h=>{n.value=String(h)});function r(h){const l=parseFloat(h.target.value);Number.isNaN(l)||i("update:modelValue",l)}function a(h){n.value=h.target.value;const l=parseFloat(n.value);Number.isNaN(l)||i("update:modelValue",l)}function o(){const h=parseFloat(n.value);Number.isNaN(h)&&(n.value=String(t.modelValue))}return(h,l)=>(ie(),ae("div",{class:Ze(["ns",{disabled:s.disabled}])},[M("span",n3,Xe(s.label),1),M("input",{type:"range",class:"ns-range",min:s.min,max:s.max,step:s.step,value:s.modelValue,disabled:s.disabled,onInput:r},null,40,r3),M("input",{type:"number",class:"ns-num",min:s.min,max:s.max,step:s.step,value:n.value,disabled:s.disabled,onInput:a,onBlur:o},null,40,a3)],2))}}),qe=Gs(o3,[["__scopeId","data-v-7c2fbed0"]]),l3={class:"ce"},c3={class:"ce-editor"},h3={class:"ce-grid"},u3=["x1","x2","y2"],d3=["y1","x2","y2"],f3=["x","y","width","height"],m3=["d"],p3={key:0,class:"ce-handles"},g3=["x1","y1","x2","y2"],v3=["cx","cy","onPointerdown"],y3=["x1","y1","x2","y2"],x3=["cx","cy","onPointerdown"],b3=["cx","cy"],w3=["cx","cy","onPointerdown","onDblclick"],S3={class:"ce-nav"},M3={class:"ce-tip"},Mr=8,_3=$s({__name:"CurveEditor",props:{modelValue:{},defaultValue:{default:()=>[{x:0,y:0},{x:1,y:1}]},mode:{default:"linear"}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,i=e,n=lt(null),r=lt(300),a=lt(110);let o=null;function h(){if(!n.value)return;const I=n.value.getBoundingClientRect();r.value=I.width,a.value=I.height}function l(I){return Mr+I*(r.value-Mr*2)}function c(I){return Mr+(1-I)*(a.value-Mr*2)}function u(){return[...t.modelValue].sort((I,k)=>I.x-k.x)}function d(I){i("update:modelValue",[...I].sort((k,B)=>k.x-B.x))}function f(){d(t.defaultValue.map(I=>({...I})))}const p=vt(()=>u());function m(I){const k=p.value[I],B=p.value[Math.max(0,I-1)];return{x:k.x-(k.x-B.x)/3,y:k.y-(k.y-B.y)/3}}function g(I){const k=p.value[I],B=p.value[Math.min(p.value.length-1,I+1)];return{x:k.x+(B.x-k.x)/3,y:k.y+(B.y-k.y)/3}}function v(I){const k=p.value[I],B=m(I);return{x:k.x+(k.inX??B.x-k.x),y:k.y+(k.inY??B.y-k.y)}}function b(I){const k=p.value[I],B=g(I);return{x:k.x+(k.outX??B.x-k.x),y:k.y+(k.outY??B.y-k.y)}}const y=vt(()=>{if(!p.value.length)return"";let I=`M ${l(p.value[0].x)} ${c(p.value[0].y)}`;for(let k=1;kMath.abs(U.x-k)>.02);D.push({x:k,y:B}),d(D)}let _={t:0,i:-1,x:0,y:0};function R(I,k){I.stopPropagation();const B=u().findIndex(N=>Math.abs(N.x-p.value[k].x)<1e-6&&Math.abs(N.y-p.value[k].y)<1e-6);if(B<0)return;const D=Date.now();if(D-_.t<300&&_.i===k&&Math.abs(I.clientX-_.x)<8&&Math.abs(I.clientY-_.y)<8){_={t:0,i:-1,x:0,y:0},F(k);return}_={t:D,i:k,x:I.clientX,y:I.clientY};const U=N=>{(Math.abs(N.clientX-I.clientX)>8||Math.abs(N.clientY-I.clientY)>8)&&(_={t:0,i:-1,x:0,y:0});const{x:O,y:X}=w(N.clientX,N.clientY),E=u();E[B]={x:O,y:X},d(E)},L=()=>{window.removeEventListener("pointermove",U),window.removeEventListener("pointerup",L)};window.addEventListener("pointermove",U),window.addEventListener("pointerup",L)}function P(I,k,B){I.stopPropagation();const D=L=>{const N=w(L.clientX,L.clientY),O=u(),X=O[k],E=B==="in"?O[Math.max(0,k-1)].x:X.x,V=B==="in"?X.x:O[Math.min(O.length-1,k+1)].x,q=Math.min(V,Math.max(E,N.x)),W=Math.round((q-X.x)*100)/100,J=Math.round((N.y-X.y)*100)/100;O[k]=B==="in"?{...X,inX:W,inY:J}:{...X,outX:W,outY:J},d(O)},U=()=>{window.removeEventListener("pointermove",D),window.removeEventListener("pointerup",U)};window.addEventListener("pointermove",D),window.addEventListener("pointerup",U)}function F(I,k){k==null||k.stopPropagation();const B=u();B.length<=2||(A=Date.now(),d(B.filter((D,U)=>U!==I)))}return Kr(()=>{h(),o=new ResizeObserver(h),n.value&&o.observe(n.value)}),Gl(()=>{o==null||o.disconnect()}),(I,k)=>(ie(),ae("div",l3,[M("div",c3,[(ie(),ae("svg",{ref_key:"svg",ref:n,class:"ce-svg",onDblclick:T},[M("g",h3,[(ie(),ae(Ke,null,ci([.25,.5,.75],B=>M("line",{key:"v"+B,x1:l(B),y1:"0",x2:l(B),y2:c(0)},null,8,u3)),64)),(ie(),ae(Ke,null,ci([.25,.5,.75],B=>M("line",{key:"h"+B,x1:"0",y1:c(B),x2:l(1),y2:c(B)},null,8,d3)),64))]),M("rect",{x:l(0),y:c(1),width:l(1)-l(0),height:c(0)-c(1),class:"ce-frame",fill:"none"},null,8,f3),M("path",{d:y.value,class:"ce-line",fill:"none"},null,8,m3),s.mode==="bezier"?(ie(),ae("g",p3,[(ie(!0),ae(Ke,null,ci(p.value,(B,D)=>(ie(),ae(Ke,{key:"handles-"+D},[D>0?(ie(),ae("line",{key:0,x1:l(B.x),y1:c(B.y),x2:l(v(D).x),y2:c(v(D).y)},null,8,g3)):Ve("",!0),D>0?(ie(),ae("circle",{key:1,cx:l(v(D).x),cy:c(v(D).y),r:"4",onPointerdown:U=>P(U,D,"in")},null,40,v3)):Ve("",!0),DP(U,D,"out")},null,40,x3)):Ve("",!0)],64))),128))])):Ve("",!0),(ie(!0),ae(Ke,null,ci(p.value,(B,D)=>(ie(),ae("g",{key:D},[M("circle",{cx:l(B.x),cy:c(B.y),r:"5",class:"ce-node"},null,8,b3),M("circle",{cx:l(B.x),cy:c(B.y),r:"9",class:"ce-hit",onPointerdown:U=>R(U,D),onDblclick:U=>F(D,U)},null,40,w3)]))),128))],544)),M("div",S3,[M("span",M3,Xe(s.mode==="bezier"?"拖动方形手柄调整弧度·双击空白新建·双击节点删除":"双击空白新建·双击节点删除·拖动节点调整"),1)])]),M("button",{class:"ce-reset",type:"button",title:"恢复默认曲线",onClick:f},"重置")]))}}),xn=Gs(_3,[["__scopeId","data-v-9bfb7b31"]]),T3={class:"pac"},A3={class:"pac-head"},E3={class:"pac-label"},C3={key:0,class:"pac-modes"},I3=["onClick"],R3={class:"pac-range"},P3={class:"pac-curve"},k3={class:"pac-axis"},F3=$s({__name:"ParticleAttributeControl",props:{label:{},mode:{},valueMin:{},valueMax:{},curve:{},defaultCurve:{default:()=>[{x:0,y:0},{x:1,y:1}]},min:{},max:{},step:{default:1},allowDirection:{type:Boolean,default:!1},allowCurve:{type:Boolean,default:!0},showModes:{type:Boolean,default:!0},curveLabel:{default:"曲线输入 →"}},emits:["update:mode","update:valueMin","update:valueMax","update:curve"],setup(s){const e=s,t=vt(()=>{const i=[{label:"固定",value:"fixed"},{label:"随机",value:"random"}];return e.allowCurve&&i.push({label:"曲线",value:"curve"}),e.allowDirection&&i.push({label:"发射方向",value:"direction"}),i});return(i,n)=>(ie(),ae("div",T3,[M("div",A3,[M("span",E3,Xe(s.label),1),s.showModes?(ie(),ae("div",C3,[(ie(!0),ae(Ke,null,ci(t.value,r=>(ie(),ae("button",{key:r.value,class:Ze(["pac-mode",{on:s.mode===r.value}]),onClick:a=>i.$emit("update:mode",r.value)},Xe(r.label),11,I3))),128))])):Ve("",!0)]),s.mode==="fixed"||s.mode==="direction"?(ie(),Jt(qe,{key:0,label:s.mode==="direction"?"角度偏移":"数值",min:s.min,max:s.max,step:s.step,"model-value":s.valueMin,"onUpdate:modelValue":n[0]||(n[0]=r=>i.$emit("update:valueMin",r))},null,8,["label","min","max","step","model-value"])):s.mode==="random"?(ie(),ae(Ke,{key:1},[Ue(qe,{label:"下限",min:s.min,max:s.max,step:s.step,"model-value":s.valueMin,"onUpdate:modelValue":n[1]||(n[1]=r=>i.$emit("update:valueMin",r))},null,8,["min","max","step","model-value"]),Ue(qe,{label:"上限",min:s.min,max:s.max,step:s.step,"model-value":s.valueMax,"onUpdate:modelValue":n[2]||(n[2]=r=>i.$emit("update:valueMax",r))},null,8,["min","max","step","model-value"])],64)):(ie(),ae(Ke,{key:2},[M("div",R3,[Ue(qe,{label:"范围下限",min:s.min,max:s.max,step:s.step,"model-value":s.valueMin,"onUpdate:modelValue":n[3]||(n[3]=r=>i.$emit("update:valueMin",r))},null,8,["min","max","step","model-value"]),Ue(qe,{label:"范围上限",min:s.min,max:s.max,step:s.step,"model-value":s.valueMax,"onUpdate:modelValue":n[4]||(n[4]=r=>i.$emit("update:valueMax",r))},null,8,["min","max","step","model-value"])]),M("div",P3,[Ue(xn,{"model-value":s.curve,"default-value":s.defaultCurve,"onUpdate:modelValue":n[5]||(n[5]=r=>i.$emit("update:curve",r))},null,8,["model-value","default-value"]),M("div",k3,[n[6]||(n[6]=M("span",null,"0",-1)),M("span",null,Xe(s.curveLabel),1),n[7]||(n[7]=M("span",null,"1",-1))])])],64))]))}}),jn=Gs(F3,[["__scopeId","data-v-238f838c"]]),O3={class:"gradient-editor"},B3=["title","onClick","onDblclick","onPointerdown"],L3={key:0,class:"gradient-controls"},D3=["value"],N3=["value"],U3={class:"gradient-position"},X3=["value"],V3=["disabled"],Y3=$s({__name:"ColorGradientEditor",props:{modelValue:{}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,i=e,n=lt(null),r=lt(0),a=vt(()=>t.modelValue[r.value]||null),o=vt(()=>[...t.modelValue].sort((R,P)=>R.position-P.position)),h=vt(()=>{const R=o.value;return R.length?`linear-gradient(90deg, ${R.map(P=>`${P.color} ${l(P.position)*100}%`).join(", ")})`:"#ffffff"});fs(()=>t.modelValue.length,R=>{r.value>=R&&(r.value=Math.max(0,R-1))});function l(R){return Math.min(1,Math.max(0,Number(R)||0))}function c(){return t.modelValue.map(R=>({position:l(R.position),color:R.color}))}function u(R,P){const F=c();F[R]&&(F[R]={...F[R],...P},i("update:modelValue",F))}function d(R){u(r.value,{color:R.target.value})}function f(R){var I;const P=R.target,F=_(P.value,((I=a.value)==null?void 0:I.color)||"#ffffff");P.value=F,u(r.value,{color:F})}function p(R){const P=R.target;f(R),P.blur()}function m(R){const P=Number(R.target.value);Number.isFinite(P)&&u(r.value,{position:l(P/100)})}function g(R){const P=c();P.push({position:l(R),color:A(P,R)}),r.value=P.length-1,i("update:modelValue",P)}function v(R){if(!n.value)return;const P=n.value.getBoundingClientRect();g((R.clientX-P.left)/Math.max(1,P.width))}function b(){const R=o.value;let P=.5;if(R.length>1){let F=-1;for(let I=0;IF&&(F=k,P=(R[I].position+R[I+1].position)/2)}}g(P)}function y(R){if(t.modelValue.length<=2||R<0)return;const P=c().filter((F,I)=>I!==R);r.value=Math.min(R,P.length-1),i("update:modelValue",P)}function w(R,P){if(!n.value)return;r.value=P;const F=k=>{const B=n.value.getBoundingClientRect();u(P,{position:l((k.clientX-B.left)/Math.max(1,B.width))})},I=()=>{window.removeEventListener("pointermove",F),window.removeEventListener("pointerup",I),window.removeEventListener("pointercancel",I)};window.addEventListener("pointermove",F),window.addEventListener("pointerup",I),window.addEventListener("pointercancel",I),R.preventDefault()}function A(R,P){const F=[...R].sort((I,k)=>I.position-k.position);if(!F.length)return"#ffffff";if(P<=F[0].position)return F[0].color;if(P>=F[F.length-1].position)return F[F.length-1].color;for(let I=0;IB.position)continue;const D=(P-k.position)/Math.max(1e-4,B.position-k.position);return T(k.color,B.color,D)}return F[F.length-1].color}function T(R,P,F){const I=U=>{const L=parseInt(U.replace("#","").padEnd(6,"0").slice(0,6),16);return[L>>16&255,L>>8&255,L&255]},k=I(R),B=I(P),D=U=>Math.round(k[U]+(B[U]-k[U])*F);return`#${[D(0),D(1),D(2)].map(U=>U.toString(16).padStart(2,"0")).join("")}`}function _(R,P){let F=R.trim().replace(/^#/,"");return/^[0-9a-f]{3}$/i.test(F)&&(F=F.split("").map(I=>I+I).join("")),/^[0-9a-f]{6}$/i.test(F)?`#${F.toLowerCase()}`:P}return(R,P)=>(ie(),ae("div",O3,[M("div",{ref_key:"bar",ref:n,class:"gradient-bar",style:Li({background:h.value}),title:"双击色带添加色标",onDblclick:v},[(ie(!0),ae(Ke,null,ci(s.modelValue,(F,I)=>(ie(),ae("button",{key:I,type:"button",class:Ze(["gradient-stop",{selected:I===r.value}]),style:Li({left:`${l(F.position)*100}%`,"--stop-color":F.color}),title:`${Math.round(l(F.position)*100)}% · ${F.color}`,onClick:bt(k=>r.value=I,["stop"]),onDblclick:bt(k=>y(I),["stop"]),onPointerdown:bt(k=>w(k,I),["stop"])},null,46,B3))),128))],36),a.value?(ie(),ae("div",L3,[M("input",{type:"color",class:"gradient-color",value:a.value.color,"aria-label":"色标颜色",onInput:d},null,40,D3),M("input",{type:"text",class:"gradient-hex-input",value:a.value.color,"aria-label":"色标颜色值",spellcheck:"false",onChange:f,onKeydown:Ea(p,["enter"])},null,40,N3),M("label",U3,[M("input",{type:"number",min:"0",max:"100",step:"1",value:Math.round(l(a.value.position)*100),"aria-label":"色标位置",onInput:m},null,40,X3),P[1]||(P[1]=M("span",null,"%",-1))]),M("button",{type:"button",class:"gradient-action",title:"在中间新增颜色",onClick:b},"+"),M("button",{type:"button",class:"gradient-action danger",title:"删除当前色标",disabled:s.modelValue.length<=2,onClick:P[0]||(P[0]=F=>y(r.value))},"×",8,V3)])):Ve("",!0),P[2]||(P[2]=M("div",{class:"gradient-hint"},"双击色带新增 · 拖动色标调整位置 · 双击色标删除",-1))]))}}),Wv=Gs(Y3,[["__scopeId","data-v-f6ab10bf"]]),$3={class:"image-card"},G3={class:"imgrow"},H3=["title"],j3=["src","alt"],W3={key:1,viewBox:"0 0 24 24",width:"22",height:"22",fill:"none",stroke:"#8a93bb","stroke-width":"1.6"},z3={class:"img-fields"},q3={key:0,class:"row"},K3={class:"row"},Z3=["placeholder"],J3={class:"img-actions"},Q3=["title"],eF=["disabled"],tF={class:"thumb-note"},iF={key:0,class:"row"},sF={class:"row"},nF={class:"row"},rF={class:"sequence-note"},aF={class:"resource-weight-row"},oF=["disabled","title"],lF={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},cF={key:1,viewBox:"0 0 24 24","aria-hidden":"true"},hF=$s({__name:"ImageResourceCard",props:{resource:{},resourceCount:{},defaultFile:{},namePlaceholder:{default:"particle"},showFolder:{type:Boolean,default:!0},supportsSequence:{type:Boolean,default:!1}},emits:["pick","pickSequence","reset","remove","updateWeight","toggleLock"],setup(s,{emit:e}){const t=s,i=e,n=vt(()=>{var l,c;if(t.resource.imageMode==="sequence"){const u=t.resource.sequenceFrames||[];if(!u.length)return"未选择序列帧";const d=((l=u[0])==null?void 0:l.name)||"第 1 帧",f=((c=u[u.length-1])==null?void 0:c.name)||d;return u.length===1?`1 帧 · ${d}`:`${u.length} 帧 · ${d} → ${f}`}const h=t.resource.textureName||t.defaultFile.replace(/\.[^.]+$/,"");return h.includes(".")?h:`${h}.png`}),r=vt(()=>{var h,l;return t.resource.imageMode==="sequence"?((l=(h=t.resource.sequenceFrames)==null?void 0:h[0])==null?void 0:l.previewUrl)||"":t.resource.previewUrl}),a=vt(()=>{var u,d;const h=t.resource.sequenceFrames||[];if(!h.length)return"未选择序列帧";const l=((u=h[0])==null?void 0:u.name)||"第一张图片",c=((d=h[h.length-1])==null?void 0:d.name)||"最后一张图片";return`已选择 ${h.length} 帧,按 ${l}-${c} 顺序播放`});function o(){t.supportsSequence&&t.resource.imageMode==="sequence"?i("pickSequence",t.resource.id):i("pick",t.resource.id)}return(h,l)=>(ie(),ae("div",$3,[M("div",G3,[M("button",{class:"img-thumb",title:s.supportsSequence&&s.resource.imageMode==="sequence"?"选择序列帧图片":"选择本地图片",onClick:o},[r.value?(ie(),ae("img",{key:0,src:r.value,alt:s.resource.textureName},null,8,j3)):(ie(),ae("svg",W3,[...l[10]||(l[10]=[M("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"},null,-1),M("circle",{cx:"8.5",cy:"8.5",r:"1.6"},null,-1),M("path",{d:"M21 15l-5-5-9 9"},null,-1)])]))],8,H3),M("div",z3,[s.showFolder?(ie(),ae("label",q3,[l[11]||(l[11]=M("span",null,"子文件夹",-1)),ye(M("input",{"onUpdate:modelValue":l[0]||(l[0]=c=>s.resource.textureFolder=c),type:"text",class:"inp",placeholder:"subfolder/"},null,512),[[ht,s.resource.textureFolder]])])):Ve("",!0),M("label",K3,[l[12]||(l[12]=M("span",null,"名称",-1)),ye(M("input",{"onUpdate:modelValue":l[1]||(l[1]=c=>s.resource.textureName=c),type:"text",class:"inp",placeholder:s.namePlaceholder},null,8,Z3),[[ht,s.resource.textureName]])])]),M("div",J3,[M("button",{class:"mini-btn2",title:`恢复 ${s.defaultFile}`,onClick:l[2]||(l[2]=c=>h.$emit("reset",s.resource.id))},"⟳",8,Q3),M("button",{class:"mini-btn2",title:"删除图片资源",disabled:s.resourceCount===1,onClick:l[3]||(l[3]=c=>h.$emit("remove",s.resource.id))},"🗑",8,eF)])]),M("div",tF,Xe(n.value),1),s.supportsSequence?(ie(),ae("label",iF,[l[14]||(l[14]=M("span",null,"图片模式",-1)),ye(M("select",{"onUpdate:modelValue":l[4]||(l[4]=c=>s.resource.imageMode=c),class:"inp"},[...l[13]||(l[13]=[M("option",{value:"fixed"},"固定",-1),M("option",{value:"sequence"},"序列帧",-1)])],512),[[Ht,s.resource.imageMode]])])):Ve("",!0),s.supportsSequence&&s.resource.imageMode==="sequence"?(ie(),ae(Ke,{key:1},[M("label",sF,[l[16]||(l[16]=M("span",null,"播放模式",-1)),ye(M("select",{"onUpdate:modelValue":l[5]||(l[5]=c=>s.resource.sequencePlayback=c),class:"inp"},[...l[15]||(l[15]=[M("option",{value:"once-hide"},"单次-尾帧消失",-1),M("option",{value:"once-hold"},"单次-尾帧固定",-1),M("option",{value:"loop-forward"},"正向循环",-1),M("option",{value:"loop-reverse"},"反向循环",-1)])],512),[[Ht,s.resource.sequencePlayback]])]),M("label",nF,[l[17]||(l[17]=M("span",null,"播放帧率",-1)),ye(M("input",{"onUpdate:modelValue":l[6]||(l[6]=c=>s.resource.sequenceFps=c),type:"number",min:"1",max:"120",step:"1",class:"inp"},null,512),[[ht,s.resource.sequenceFps,void 0,{number:!0}]])]),M("button",{class:"sequence-pick",onClick:l[7]||(l[7]=c=>h.$emit("pickSequence",s.resource.id))},"选择序列帧(多选)"),M("div",rF,Xe(a.value),1)],64)):Ve("",!0),M("div",aF,[Ue(qe,{class:"resource-weight-control",label:"占比%",min:0,max:100,step:1,"model-value":s.resource.weight,disabled:s.resource.locked||s.resourceCount===1,"onUpdate:modelValue":l[8]||(l[8]=c=>h.$emit("updateWeight",s.resource.id,c))},null,8,["model-value","disabled"]),M("button",{class:Ze(["weight-lock",{on:s.resource.locked}]),disabled:s.resourceCount===1,title:s.resource.locked?"解除占比锁定":"锁定当前占比",onClick:l[9]||(l[9]=c=>h.$emit("toggleLock",s.resource.id))},[s.resource.locked?(ie(),ae("svg",lF,[...l[18]||(l[18]=[M("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"},null,-1),M("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"},null,-1)])])):(ie(),ae("svg",cF,[...l[19]||(l[19]=[M("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2"},null,-1),M("path",{d:"M16 10V7a4 4 0 0 0-7.5-2"},null,-1)])]))],10,oF)]),X2(h.$slots,"default",{},void 0)]))}}),zv=Gs(hF,[["__scopeId","data-v-68ff5314"]]),uF={class:"spine-editor"},dF={class:"field wide"},fF={class:"grid three"},mF={class:"field"},pF={class:"field"},gF={class:"field"},vF={class:"grid three"},yF={class:"field"},xF={class:"field"},bF={class:"field"},wF=["disabled"],SF={class:"asset-row"},MF=["title"],_F={class:"asset-row"},TF=["title"],AF={class:"asset-row"},EF=["title"],CF={class:"asset-actions"},IF=["disabled"],RF={class:"runtime-note"},PF={key:0},kF={key:0,class:"error"},FF={class:"section-box"},OF={key:0,class:"empty"},BF={key:1,class:"field wide"},LF=["value"],DF={class:"section-box"},NF={class:"tree-title-row"},UF=["disabled","title"],XF={key:0,class:"empty"},VF={key:1,class:"bone-search"},YF={key:2,class:"empty"},$F={key:3,class:"bone-tree"},GF=["onClick","onKeydown"],HF=["title","onClick"],jF={key:1,class:"bone-leaf"},WF={class:"bone-name"},zF=$s({__name:"SpineObjectPanel",props:{spineObject:{}},setup(s){const e=s,t=Kl(),i=lt(null),n=lt(null),r=lt(null),a=lt(null),o=lt(new Set),h=lt(""),l=lt(null),c=lt(null),u=lt([]);e.spineObject.selectedBone==null&&(e.spineObject.selectedBone=""),e.spineObject.sourceBundle==null&&(e.spineObject.sourceBundle=null),e.spineObject.dataVersion==null&&(e.spineObject.dataVersion="");const d=vt(()=>{var N;return((N=l.value)==null?void 0:N.name)||e.spineObject.skeletonFileName}),f=vt(()=>{var N;return((N=c.value)==null?void 0:N.name)||e.spineObject.atlasFileName}),p=vt(()=>u.value.length?u.value.map(N=>N.name):e.spineObject.textureFileNames),m=vt(()=>p.value.length?`${p.value.length} 张:${p.value.join(", ")}`:"PNG / JPEG / WebP..."),g=vt(()=>new Set(e.spineObject.bones.map(N=>N.parent).filter(N=>!!N))),v=vt(()=>new Map(e.spineObject.bones.map(N=>[N.name,N]))),b=vt(()=>e.spineObject.bones.filter(N=>{var E;const O=h.value.trim().toLocaleLowerCase();if(O)return N.name.toLocaleLowerCase().includes(O);let X=N.parent;for(;X;){if(o.value.has(X))return!1;X=((E=v.value.get(X))==null?void 0:E.parent)||null}return!0})),y=vt(()=>g.value.size>0&&[...g.value].every(N=>o.value.has(N)));function w(N){const O=e.spineObject.selectedBone===N;for(const X of t.spines)X.selectedBone="";O||(e.spineObject.selectedBone=N)}function A(N){o.value.has(N)?o.value.delete(N):o.value.add(N)}function T(){o.value=y.value?new Set:new Set(g.value)}function _(N){var O;return((O=N.target.files)==null?void 0:O[0])||null}function R(N){l.value=_(N)}function P(N){c.value=_(N)}function F(N){u.value=Array.from(N.target.files||[])}function I(N){return N.name.replace(/\.[^.]+$/,"").toLocaleLowerCase()}async function k(N){const O=Array.from(N.target.files||[]);if(!O.length)return;const X=O.filter(K=>/\.(json|skel)$/i.test(K.name)),E=O.filter(K=>/\.atlas$/i.test(K.name)),V=O.filter(K=>/\.(png|jpe?g|webp|wepb)$/i.test(K.name)),q=E.map(K=>({atlas:K,skeleton:X.find(fe=>I(fe)===I(K))})).find(K=>K.skeleton),W=(q==null?void 0:q.skeleton)||X[0]||null,J=(q==null?void 0:q.atlas)||E[0]||null;if(l.value=W,c.value=J,u.value=V,!W||!J||!V.length){const K=[!W&&"JSON / SKEL",!J&&"Atlas",!V.length&&"纹理图片"].filter(Boolean).join("、");e.spineObject.status="error",e.spineObject.error=`所选文件夹缺少:${K}`;return}await U()}function B(){t.recalcTotalFrames()}function D(){B(),t.timeline.frame=0}async function U(){var X;const N=l.value,O=c.value;if(!N||!O||!u.value.length){e.spineObject.status="error",e.spineObject.error="请依次选择 Spine 数据、Atlas 和全部纹理图片";return}e.spineObject.status="loading",e.spineObject.error="";try{const E=await xw(N,O,u.value);Au(e.spineObject.id,E),e.spineObject.skeletonFileName=N.name,e.spineObject.atlasFileName=O.name,e.spineObject.textureFileNames=u.value.map(V=>V.name),e.spineObject.dataVersion=E.dataVersion,e.spineObject.animations=E.animations,e.spineObject.bones=E.bones,e.spineObject.selectedBone="",h.value="",o.value=new Set,e.spineObject.selectedAnimation=((X=E.animations[0])==null?void 0:X.name)||"",e.spineObject.assetVersion++,e.spineObject.status="ready",B(),t.timeline.frame=0;try{e.spineObject.sourceBundle=await PP(N,O,u.value)}catch(V){e.spineObject.sourceBundle=null,console.warn("Spine 配置资源嵌入失败",V)}}catch(E){e.spineObject.status="error",e.spineObject.error=E instanceof Error?E.message:String(E)}}function L(){ql(e.spineObject.id),l.value=null,c.value=null,u.value=[],i.value&&(i.value.value=""),n.value&&(n.value.value=""),r.value&&(r.value.value=""),a.value&&(a.value.value=""),e.spineObject.skeletonFileName="",e.spineObject.atlasFileName="",e.spineObject.textureFileNames=[],e.spineObject.dataVersion="",e.spineObject.sourceBundle=null,e.spineObject.animations=[],e.spineObject.bones=[],e.spineObject.selectedBone="",h.value="",o.value=new Set,e.spineObject.selectedAnimation="",e.spineObject.assetVersion++,e.spineObject.status="empty",e.spineObject.error="",B()}return(N,O)=>(ie(),ae("div",uF,[O[30]||(O[30]=M("div",{class:"editor-title"},"Spine 属性",-1)),M("label",dF,[O[15]||(O[15]=M("span",null,"Spine 名称",-1)),ye(M("input",{"onUpdate:modelValue":O[0]||(O[0]=X=>s.spineObject.name=X)},null,512),[[ht,s.spineObject.name]])]),M("div",fF,[M("label",mF,[O[16]||(O[16]=M("span",null,"X 位置",-1)),ye(M("input",{"onUpdate:modelValue":O[1]||(O[1]=X=>s.spineObject.x=X),type:"number"},null,512),[[ht,s.spineObject.x,void 0,{number:!0}]])]),M("label",pF,[O[17]||(O[17]=M("span",null,"Y 位置",-1)),ye(M("input",{"onUpdate:modelValue":O[2]||(O[2]=X=>s.spineObject.y=X),type:"number"},null,512),[[ht,s.spineObject.y,void 0,{number:!0}]])]),M("label",gF,[O[18]||(O[18]=M("span",null,"旋转",-1)),ye(M("input",{"onUpdate:modelValue":O[3]||(O[3]=X=>s.spineObject.rotation=X),type:"number"},null,512),[[ht,s.spineObject.rotation,void 0,{number:!0}]])])]),M("div",vF,[M("label",yF,[O[19]||(O[19]=M("span",null,"Scale X",-1)),ye(M("input",{"onUpdate:modelValue":O[4]||(O[4]=X=>s.spineObject.scaleX=X),type:"number",step:"0.05"},null,512),[[ht,s.spineObject.scaleX,void 0,{number:!0}]])]),M("label",xF,[O[20]||(O[20]=M("span",null,"Scale Y",-1)),ye(M("input",{"onUpdate:modelValue":O[5]||(O[5]=X=>s.spineObject.scaleY=X),type:"number",step:"0.05"},null,512),[[ht,s.spineObject.scaleY,void 0,{number:!0}]])]),M("label",bF,[O[21]||(O[21]=M("span",null,"开始时间",-1)),ye(M("input",{"onUpdate:modelValue":O[6]||(O[6]=X=>s.spineObject.timeOffset=X),type:"number",min:"0",step:"0.033333",onChange:B},null,544),[[ht,s.spineObject.timeOffset,void 0,{number:!0}]])])]),O[31]||(O[31]=M("div",{class:"divider"},null,-1)),O[32]||(O[32]=M("div",{class:"section-title"},"Spine 资源",-1)),M("input",{ref_key:"skeletonInput",ref:i,hidden:"",type:"file",accept:".json,.skel,application/json,application/octet-stream",onChange:R},null,544),M("input",{ref_key:"atlasInput",ref:n,hidden:"",type:"file",accept:".atlas,text/plain",onChange:P},null,544),M("input",{ref_key:"textureInput",ref:r,hidden:"",type:"file",multiple:"",accept:".png,.jpg,.jpeg,.webp,.wepb,image/png,image/jpeg,image/webp",onChange:F},null,544),M("input",{ref_key:"folderInput",ref:a,hidden:"",type:"file",multiple:"",webkitdirectory:"",directory:"",onChange:k},null,544),M("button",{class:"folder-select",disabled:s.spineObject.status==="loading",onClick:O[7]||(O[7]=X=>{var E;return(E=a.value)==null?void 0:E.click()})},"选择文件夹并加载",8,wF),O[33]||(O[33]=M("div",{class:"folder-hint"},"一次读取文件夹中的 JSON / SKEL、Atlas 和全部纹理;仍可在下方单独替换资源。",-1)),M("div",SF,[M("div",{class:"asset-name",title:d.value},Xe(d.value||"JSON / SKEL..."),9,MF),M("button",{onClick:O[8]||(O[8]=X=>{var E;return(E=i.value)==null?void 0:E.click()})},"选择")]),M("div",_F,[M("div",{class:"asset-name",title:f.value},Xe(f.value||"Atlas..."),9,TF),M("button",{onClick:O[9]||(O[9]=X=>{var E;return(E=n.value)==null?void 0:E.click()})},"选择")]),M("div",AF,[M("div",{class:"asset-name",title:p.value.join(", ")},Xe(m.value),9,EF),M("button",{onClick:O[10]||(O[10]=X=>{var E;return(E=r.value)==null?void 0:E.click()})},"选择(多选)")]),M("div",CF,[M("button",{class:"load",disabled:s.spineObject.status==="loading",onClick:U},Xe(s.spineObject.status==="loading"?"加载中…":"↧ 加载"),9,IF),M("button",{class:"clear",onClick:L},"清除")]),M("div",RF,[O[22]||(O[22]=Qt(" 支持 Spine 3.8 / 4.0 / 4.1 / 4.2 / 4.3 JSON · 对应版本运行时按需加载 · 本地离线 ",-1)),s.spineObject.dataVersion?(ie(),ae("span",PF," · 当前资源 "+Xe(s.spineObject.dataVersion),1)):Ve("",!0)]),s.spineObject.error?(ie(),ae("div",kF,Xe(s.spineObject.error),1)):Ve("",!0),M("div",FF,[O[25]||(O[25]=M("div",{class:"section-title"},"Spine 动画",-1)),s.spineObject.animations.length?(ie(),ae("label",BF,[O[24]||(O[24]=M("span",null,"时间轴播放动画",-1)),ye(M("select",{"onUpdate:modelValue":O[11]||(O[11]=X=>s.spineObject.selectedAnimation=X),onChange:D},[O[23]||(O[23]=M("option",{value:""},"无",-1)),(ie(!0),ae(Ke,null,ci(s.spineObject.animations,X=>(ie(),ae("option",{key:X.name,value:X.name},Xe(X.name)+"("+Xe(X.duration.toFixed(2))+"s) ",9,LF))),128))],544),[[Ht,s.spineObject.selectedAnimation]])])):(ie(),ae("div",OF,"无可用动画"))]),M("div",DF,[M("div",NF,[O[29]||(O[29]=M("div",{class:"section-title"},"层级树",-1)),M("button",{class:Ze(["selected-bone",{active:s.spineObject.selectedBone}]),disabled:!s.spineObject.selectedBone,title:s.spineObject.selectedBone?"点击清除骨骼选择":"当前未选择骨骼",onClick:O[12]||(O[12]=X=>s.spineObject.selectedBone="")},[s.spineObject.selectedBone?(ie(),ae(Ke,{key:0},[O[26]||(O[26]=Qt("清除选中骨骼:",-1)),M("strong",null,Xe(s.spineObject.selectedBone),1)],64)):(ie(),ae(Ke,{key:1},[O[27]||(O[27]=Qt("当前骨骼:",-1)),O[28]||(O[28]=M("strong",null,"未选择",-1))],64))],10,UF),s.spineObject.bones.length?(ie(),ae("button",{key:0,class:"tree-action",onClick:T},Xe(y.value?"全部展开":"全部折叠"),1)):Ve("",!0)]),s.spineObject.bones.length?(ie(),ae("div",VF,[ye(M("input",{"onUpdate:modelValue":O[13]||(O[13]=X=>h.value=X),type:"search","aria-label":"搜索骨骼",placeholder:"搜索骨骼名称…"},null,512),[[ht,h.value,void 0,{trim:!0}]]),h.value?(ie(),ae("button",{key:0,title:"清空搜索","aria-label":"清空骨骼搜索",onClick:O[14]||(O[14]=X=>h.value="")},"✕")):Ve("",!0)])):(ie(),ae("div",XF,"未加载 Spine")),s.spineObject.bones.length&&!b.value.length?(ie(),ae("div",YF,"未找到匹配的骨骼")):s.spineObject.bones.length?(ie(),ae("div",$F,[(ie(!0),ae(Ke,null,ci(b.value,X=>(ie(),ae("div",{key:X.name,class:Ze(["bone",{selected:s.spineObject.selectedBone===X.name}]),style:Li({paddingLeft:`${6+X.depth*16}px`}),role:"button",tabindex:"0",onClick:E=>w(X.name),onKeydown:Ea(bt(E=>w(X.name),["prevent"]),["enter"])},[g.value.has(X.name)?(ie(),ae("button",{key:0,class:"bone-toggle",title:o.value.has(X.name)?"展开子骨骼":"折叠子骨骼",onClick:bt(E=>A(X.name),["stop"])},Xe(o.value.has(X.name)?"▸":"▾"),9,HF)):(ie(),ae("span",jF,"•")),M("span",WF,Xe(X.name),1)],46,GF))),128))])):Ve("",!0)])]))}}),qF=Gs(zF,[["__scopeId","data-v-9257fb45"]]),xi=Da({visible:!1,title:"",detail:"",progress:0,indeterminate:!1,failed:!1});let Bc=0;function KF(s){return new Promise(e=>window.setTimeout(e,s))}function qv(s,e){const t=++Bc,i=performance.now();Object.assign(xi,{visible:!0,title:s,detail:e,progress:0,indeterminate:!1,failed:!1});const n=(a,o)=>{t===Bc&&(xi.indeterminate=a==null,a!=null&&(xi.progress=Math.min(100,Math.max(0,a))),o&&(xi.detail=o))},r=async(a,o)=>{if(t!==Bc)return;xi.failed=a,xi.indeterminate=!1,xi.progress=a?xi.progress:100,xi.detail=o,await KF(Math.max(180,(a?850:450)-(performance.now()-i))),t===Bc&&(xi.visible=!1)};return{update:n,paint:()=>new Promise(a=>requestAnimationFrame(()=>a())),finish:(a="已完成")=>r(!1,a),fail:(a="操作失败")=>r(!0,a)}}async function ZF(s,e){if(!s.body)return e(null),s.text();const t=Number(s.headers.get("content-length")),i=Number.isFinite(t)&&t>0,n=s.body.getReader(),r=new TextDecoder;let a=0,o="";for(e(i?0:null);;){const{done:h,value:l}=await n.read();if(h)break;a+=l.byteLength,o+=r.decode(l,{stream:!0}),e(i?Math.min(1,a/t):null)}return o+=r.decode(),i&&e(1),o}const JF="3.8";function Ns(s,e,t){s[e]==null&&s[t]!=null&&(s[e]=s[t]),delete s[t]}function Rm(s){if(!s||typeof s!="object")return;if(Array.isArray(s)){for(const t of s)Rm(t);return}const e=s;Array.isArray(e.curve)&&delete e.curve;for(const t of Object.values(e))Rm(t)}function QF(s){for(const e of s.bones)Ns(e,"transform","inherit");for(const e of s.transform||[])Ns(e,"rotateMix","mixRotate"),e.translateMix==null&&(e.translateMix=e.mixX??e.mixY),e.scaleMix==null&&(e.scaleMix=e.mixScaleX??e.mixScaleY),Ns(e,"shearMix","mixShearY"),delete e.mixX,delete e.mixY,delete e.mixScaleX,delete e.mixScaleY;for(const e of s.path||[])Ns(e,"rotateMix","mixRotate"),e.translateMix==null&&(e.translateMix=e.mixX??e.mixY),delete e.mixX,delete e.mixY;for(const e of s.skins)for(const t of Object.values(e.attachments||{}))for(const i of Object.values(t||{}))i.parent!=null&&Ns(i,"deform","timelines")}function eO(s){for(const e of Object.values(s.slots||{}))Ns(e,"color","rgba"),Ns(e,"twoColor","rgba2")}function tO(s){for(const e of Object.values(s.bones||{}))for(const t of e.rotate||[])Ns(t,"angle","value")}function iO(s){for(const e of Object.values(s.transform||{}))for(const t of e)Ns(t,"rotateMix","mixRotate"),t.translateMix==null&&(t.translateMix=t.mixX??t.mixY),t.scaleMix==null&&(t.scaleMix=t.mixScaleX??t.mixScaleY),Ns(t,"shearMix","mixShearY"),delete t.mixX,delete t.mixY,delete t.mixScaleX,delete t.mixScaleY}function sO(s){for(const e of Object.values(s.path||{})){for(const t of["position","spacing"])for(const i of e[t]||[])Ns(i,t,"value");for(const t of e.mix||[])Ns(t,"rotateMix","mixRotate"),t.translateMix==null&&(t.translateMix=t.mixX??t.mixY),delete t.mixX,delete t.mixY}}function nO(s){if(!s.attachments)return;const e=s.deform||(s.deform={});for(const[t,i]of Object.entries(s.attachments)){const n=e[t]||(e[t]={});for(const[r,a]of Object.entries(i)){const o=n[r]||(n[r]={});for(const[h,l]of Object.entries(a))l.deform&&(o[h]=l.deform)}}delete s.attachments}function rO(s){s.skeleton.spine=JF,QF(s);for(const e of Object.values(s.animations))eO(e),tO(e),iO(e),sO(e),nO(e);return Rm(s.animations),s}function aO(s,e,t,i){const n=t.frame-e.frame,r=n<=0?0:(s.frame-e.frame)/n;let a=0;for(let o=0;o[...i].sort((a,o)=>a-o);let r=!0;for(;r;){r=!1;const a=n();for(let o=0;ou&&(u=f,c=d)}c>=0&&(i.add(c),r=!0)}}return n().map(a=>s[a])}function Kv(s,e,t,i,n){const r=t-e+1;if(r<2)return 0;const a=n?e:t,o=n?e+1:t-1,h=n?e+2:t-2,l=Math.abs(s[o].frame-s[a].frame);if(r>=3&&l>0&&Math.abs(Math.abs(s[h].frame-s[o].frame)-l)<1e-6){const u=s[a].values[i],d=s[o].values[i],f=s[h].values[i];return n?(-3*u+4*d-f)/(2*l):(3*u-4*d+f)/(2*l)}const c=s[o].frame-s[a].frame;return c?(s[o].values[i]-s[a].values[i])/c:0}function Zv(s,e,t){const i=s[t].frame-s[e].frame,n=[];for(let r=0;rd.values[r])),l=Math.max(...s.slice(e,t+1).map(d=>d.values[r])),c=a+Kv(s,e,t,r,!0)*i/3,u=o-Kv(s,e,t,r,!1)*i/3;n.push([Math.max(h,Math.min(l,c)),Math.max(h,Math.min(l,u))])}return{values:n}}function oO(s,e,t,i,n){const r=1-n;return r*r*r*s+3*r*r*n*e+3*r*n*n*t+n*n*n*i}function lO(s,e,t,i,n){const r=t.frame-e.frame,a=r<=0?0:(s.frame-e.frame)/r;let o=0;for(let h=0;h[...i].sort((o,h)=>o-h);let r=!0;for(;r;){r=!1;const o=n();for(let h=0;hf&&(f=m,d=p)}d>=0&&(i.add(d),r=!0)}}const a=n();return{samples:a.map(o=>s[o]),controls:a.slice(0,-1).map((o,h)=>Zv(s,o,a[h+1]))}}function cO(s){if(!s.length)return[];const e=[s[0]];for(let t=1;t180;)i-=360;for(;i-e[t-1]<-180;)i+=360;e.push(i)}return e}function _i(s){if(!Number.isFinite(s))return 0;const e=Math.round(s*1e5)/1e5;return Object.is(e,-0)?0:e}function hO(s,e,t,i){const n=Math.max(2,Math.min(16,Math.round(Number(s.trailGridRows)||2))),r=Math.max(2,Math.min(32,Math.round(Number(s.trailGridCols)||2))),a=Math.max(2,t.length),o=e.lengthMode==="random"?Math.max(1,Number(e.lengthMin)||0,Number(e.lengthMax)||0):Math.max(.001,Number(e.length)||100),h=e.widthSizeMode==="random"?Math.max(1,Number(e.widthMin)||0,Number(e.widthMax)||0):Math.max(.001,Number(e.width)||100),l=(Number(e.rotation)||0)*Math.PI/180,c=Math.cos(l),u=Math.sin(l),d=[],f=[],p=[],m=[],g=[];for(let y=0;y=0;y--)g.push({col:y,row:n-1});for(let y=n-2;y>=1;y--)g.push({col:0,row:y});const v=g.length;for(let y=1;y|\s]+/g,"_").replace(/^_+|_+$/g,"")||e}function kw(s,e){let t=s,i=2;for(;e.has(t);)t=`${s}_${i++}`;return e.add(t),t}function dO(s){return s.replace(/\.[^./\\]+$/,"")}function Fw(s,e){return dO([s,e].filter(Boolean).join("/").replace(/\\/g,"/").replace(/\/{2,}/g,"/").replace(/^\.\//,""))}function fO(s){var i,n;const e=Number(((i=s==null?void 0:s.orig)==null?void 0:i.width)??(s==null?void 0:s.width))||0,t=Number(((n=s==null?void 0:s.orig)==null?void 0:n.height)??(s==null?void 0:s.height))||0;return{width:e,height:t}}function Dc(s){return Math.round(Math.max(0,Math.min(1,s))*255).toString(16).padStart(2,"0")}function iy(s,e){return[(s>>16&255)/255,(s>>8&255)/255,(s&255)/255,Math.max(0,Math.min(1,e))]}function yl(s,e){return _i(s/e)}function mO(s,e){const t=s.config,i=t.lifeMode==="fixed"?Math.max(0,Number(t.lifeMin)||0):Math.max(0,Number(t.lifeMin)||0,Number(t.lifeMax)||0),n=Math.max(0,Number(t.delay)||0);let r;return t.mode!=="stream"?r=n+i:t.streamBehavior!=="loop"?r=n+Math.max(1/e,Number(t.duration)||0)+i:r=n+Xr(t,e).total/e,Math.max(1,Math.ceil(r*e)+1)}function Yh(s,e){return e?s.boneName:`${s.spawnId??"legacy"}_${s.boneName}`}function pO(s,e,t){const i=new Set;for(const n of s)for(const r of n)i.add(Yh(r,e));return[...i].sort().map((n,r)=>({key:n,name:kw(`_particle_${String(r).padStart(3,"0")}`,t),states:s.map(a=>a.find(o=>Yh(o,e)===n)||null)}))}function gO(s,e,t,i){const n=e*t/i,r=Math.min(s.states.length-1,Math.max(0,Math.floor(n))),a=Math.min(s.states.length-1,r+1),o=s.states[r],h=s.states[a];if(!o||!h||Yh(o,!0)!==Yh(h,!0)||o.spawnId!==h.spawnId)return o;const l=n-r;if(l<=1e-6)return o;const c=(d,f)=>(d??0)+((f??d??0)-(d??0))*l,u=o.trailState&&h.trailState&&o.trailState.resourceId===h.trailState.resourceId?{...o.trailState,width:c(o.trailState.width,h.trailState.width),alpha:c(o.trailState.alpha,h.trailState.alpha),bones:o.trailState.bones.map((d,f)=>{const p=h.trailState.bones[f]||d;return{...d,worldX:c(d.worldX??d.x,p.worldX??p.x),worldY:c(d.worldY??d.y,p.worldY??p.y),worldRotation:c(d.worldRotation??-d.rotation,p.worldRotation??-p.rotation)}})}:o.trailState;return{...o,worldX:c(o.worldX,h.worldX),worldY:c(o.worldY,h.worldY),worldRotation:c(o.worldRotation,h.worldRotation),worldScaleX:c(o.worldScaleX,h.worldScaleX),worldScaleY:c(o.worldScaleY,h.worldScaleY),alpha:c(o.alpha,h.alpha),trailState:u}}function sy(s,e){return!s||s==="跟随导出"?e.keyframeCurve:s==="贝塞尔"?"bezier":"linear"}function eo(s,e,t,i,n,r=new Set,a=n.keyframeCurve){if(!s.length)return[];const o=a==="bezier"&&n.spineVersion!=="3.8"?Pw(s,i,r):{samples:Rw(s,i,r),controls:[]},h=o.samples.map(l=>{const c={time:yl(l.frame,e)};return t.forEach((u,d)=>{c[u]=_i(l.values[d])}),c});for(let l=0;l0&&n&&e.add(t-1),i&&e.add(t))}return e}function yO(s){const e=new Set;for(let t=0;t0&&n&&e.add(t-1),i&&e.add(t))}return e}function xO(s,e){var i;if(!s.shapeEnabled||!((i=s.shapeCurve)!=null&&i.length))return 1;const t=[...s.shapeCurve].sort((n,r)=>n.x-r.x);if(e<=t[0].x)return Math.max(0,t[0].y);for(let n=1;n{r!==n&&(i.push(t(r,a)),n=r)}),i}function wO(s,e,t){const i=s.imageMode==="sequence"?s.sequenceFrames[e]:void 0,n=(i==null?void 0:i.name)||s.textureName||`image_${s.id}`,r=(i==null?void 0:i.texture)||s.texture,a=fO(r);(!a.width||!a.height)&&t.push({code:"missing-image",message:`图片“${n}”缺失或尺寸不可读,已保留路径。`});const o=a.width||1,h=a.height||1;return{path:Fw(s.textureFolder,n),x:_i((.5-s.anchorX)*o),y:_i((s.anchorY-.5)*h),width:_i(o),height:_i(h)}}function SO(s,e,t,i,n=i.keyframeCurve){if(!s.length)return[];const r=new Set;for(let c=1;c({frame:u,values:c})),o=1/255,h=n==="bezier"&&i.spineVersion!=="3.8"?Pw(a,[o,o,o,.01],r):{samples:Rw(a,[o,o,o,.01],r),controls:[]},l=h.samples.map(c=>({time:yl(c.frame,t),color:`${Dc(c.values[0])}${Dc(c.values[1])}${Dc(c.values[2])}${Dc(c.values[3])}`}));if(h.controls.length)for(let c=0;c({time:yl(d,n),name:u??null}));h.length&&(o.attachment=h);const l=SO(i,t,n,r,a);l.length&&(o.rgba=l)}function ry(s){var p;const e=s.settings,t=Math.max(1,Number(s.timeline.fps)||30),i=Math.max(1,Math.round(e.fps||30)),n=e.integerFrameAlignment?i:t,r=[],a=s.systems.filter(m=>m.visible!==!1),o={skeleton:{hash:"",spine:e.spineVersion,x:0,y:0,width:0,height:0,images:e.imagesPath||"./images/"},bones:[{name:"root"}],slots:[],skins:[{name:"default",attachments:{}}],animations:{}};e.omitFps||(o.skeleton.fps=i);const h=o.skins[0].attachments,l=new Set(["root"]),c=[...new Set([...s.timeline.animations.length?s.timeline.animations:["animation"],...a.map(m=>m.animation||"animation")])],u=new Map;for(const m of a){const g=Math.min(((p=m.frames)==null?void 0:p.length)||0,mO(m,t)),v=(m.frames||[]).slice(0,g);v.length||r.push({code:"empty-cache",message:`“${m.config.name}”没有可用帧缓存。`});const b=kw(uO(m.config.name,`system_${m.id}`),l);o.bones.push({name:b,parent:"root"});const y=pO(v,e.bonePool,l),w=Math.max(0,(g-1)/t),A=Math.max(1,Math.ceil(w*n)+1),T=u.get(m.animation)||[];T.push({system:m,tracks:y,targetFrames:A}),u.set(m.animation,T);for(const _ of y){o.bones.push({name:_.name,parent:b});const R=new Set(m.config.imageResources.map(k=>k.blend));for(const k of R){const B=`${_.name}_image_${k}`;o.slots.push({name:B,bone:_.name,color:"ffffff00",blend:Jv[k]});const D=h[B]||(h[B]={});for(const U of m.config.imageResources.filter(L=>L.blend===k)){const L=U.imageMode==="sequence"?Math.max(1,U.sequenceFrames.length):1;for(let N=0;N{var X;return((X=O==null?void 0:O.trailState)==null?void 0:X.resourceId)===k.id}))continue;const B=Math.max(2,Math.min(16,Math.round(k.boneCount||3))),D=[];for(let O=0;Oo.bones.findIndex(X=>X.name===O)),N=Fw("",k.textureName||`trail_${k.id}`);(h[U]||(h[U]={}))[`trail_${k.id}`]=hO(m.config,k,L,N),k.texture||r.push({code:"missing-image",message:`拖尾图片“${k.textureName||k.id}”缺失,已保留路径。`})}const P=`${_.name}_image_`,F=`${_.name}_trail_`,I=o.slots.filter(k=>String(k.name).startsWith(P)||String(k.name).startsWith(F));I.length&&(o.slots=o.slots.filter(k=>!I.includes(k)),o.slots.push(...I.filter(k=>String(k.name).startsWith(F)),...I.filter(k=>String(k.name).startsWith(P))))}}for(const m of c){const g=u.get(m)||[],v={bones:{},slots:{}};let b=!1;for(const{system:y,tracks:w,targetFrames:A}of g)for(const T of w){const _=Array.from({length:A},(E,V)=>gO(T,V,t,n)),R=_.map(E=>!!(E!=null&&E.active)),P=[],F=[],I=[];_.forEach((E,V)=>{E!=null&&E.active&&(P.push({frame:V,values:[E.worldX??E.x,E.worldY??E.y]}),F.push(E.worldRotation??E.rotation),I.push({frame:V,values:[E.worldScaleX??E.scaleX,E.worldScaleY??E.scaleY]}))});const k=cO(F),B=P.map((E,V)=>({frame:E.frame,values:[k[V]??0]})),D=vO(_),U={},L=eo(P,n,["x","y"],[Qv,Qv],e,D),N=eo(B,n,["value"],[ty],e,D),O=eo(I,n,["x","y"],[Lc,Lc],e,D);L.length&&(U.translate=L),N.length&&(U.rotate=N),O.length&&(U.scale=O),Object.keys(U).length&&(v.bones[T.name]=U,b=!0);const X=new Set(y.config.imageResources.map(E=>E.blend));for(const E of X){const V=[],q=[];let W=16777215;for(let me=0;meAe.id===we.resourceId):void 0,pe=!!we&&R[me]&&we.imageVisible!==!1&&(Ee==null?void 0:Ee.blend)===E;we&&(Ee==null?void 0:Ee.blend)===E&&(W=we.colorHex),V.push(pe?`image_${Ee.id}_${we.imageFrameIndex??0}`:null),q.push(iy(W,pe?we.alpha:0))}const K=y.config.imageResources.filter(me=>me.blend===E).filter(me=>me.independentAlpha==="curve").map(me=>sy(me.alphaCurveMode,e)),fe=K.length?K.includes("bezier")?"bezier":"linear":sy(y.config.alphaMode==="curve"?y.config.curveMode:void 0,e);ny(v,`${T.name}_image_${E}`,V,q,n,e,fe),V.some(Boolean)&&(b=!0)}if(y.config.trail)for(const E of y.config.trailResources){const V=Math.max(2,Math.min(16,Math.round(E.boneCount||3))),q=_.map(Ae=>{var G;return((G=Ae==null?void 0:Ae.trailState)==null?void 0:G.resourceId)===E.id?Ae.trailState:void 0}),W=q.find(Ae=>!!Ae);if(!W)continue;const J=yO(q),K=E.widthSizeMode==="random"?Math.max(1,Number(E.widthMin)||0,Number(E.widthMax)||0):Math.max(.001,Number(E.width)||100);let fe=W;const me=q.map(Ae=>(Ae&&(fe=Ae),fe));for(let Ae=0;Ae{const Be=Oe==null?void 0:Oe.bones[Math.min(Oe.bones.length-1,Ae)];if(!Be)return;const st={x:Be.worldX??Be.x,y:Be.worldY??Be.y,rotation:Be.worldRotation??-Be.rotation};G.push({frame:Fe,values:[st.x,st.y]}),Z.push({frame:Fe,values:[st.rotation]}),z.push({frame:Fe,values:[1,Math.max(0,Oe.width/K)*te]})});const he=`${T.name}_trail_${E.id}_${Ae}`,xe={},oe=eo(G,n,["x","y"],[ey,ey],e,j),ge=eo(Z,n,["value"],[ty],e,j),le=eo(z,n,["x","y"],[Lc,Lc],e,j);oe.length&&(xe.translate=oe),ge.length&&(xe.rotate=ge),le.length&&(xe.scale=le),Object.keys(xe).length&&(v.bones[he]=xe)}const we=q.map(()=>`trail_${E.id}`);let Ee=W.colorHex;const pe=q.map(Ae=>(Ae&&(Ee=Ae.colorHex),iy(Ee,Ae?Ae.alpha:0)));ny(v,`${T.name}_trail_${E.id}`,we,pe,n,e),b=!0}}(b||!e.excludeEmptyAnimations)&&(o.animations[m]=v)}!Object.keys(o.animations).length&&!e.excludeEmptyAnimations&&(o.animations.animation={bones:{},slots:{}});const d=e.spineVersion==="3.8"?rO(o):o,f=JSON.stringify(d,null,2);return{json:d,text:f,warnings:r,particleSystemCount:a.length,animationCount:Object.keys(d.animations).length,boneCount:d.bones.length}}function MO(s,e){const t=new Blob([s.text],{type:"application/json;charset=utf-8"}),i=URL.createObjectURL(t),n=document.createElement("a");n.href=i,n.download=/\.json$/i.test(e)?e:`${e||"SpineParticle"}.json`,n.style.display="none",document.body.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(i),1e3)}class qU{constructor(){x(this,"array",[])}add(e){const t=this.contains(e);return this.array[e|0]=e|0,!t}contains(e){return this.array[e|0]!==void 0}remove(e){this.array[e|0]=void 0}clear(){this.array.length=0}}class _O{constructor(){x(this,"entries",{});x(this,"size",0)}add(e){const t=this.entries[e];return this.entries[e]=!0,t?!1:(this.size++,!0)}addAll(e){const t=this.size;for(let i=0,n=e.length;i1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(e,t){e.r=((t&4278190080)>>>24)/255,e.g=((t&16711680)>>>16)/255,e.b=((t&65280)>>>8)/255,e.a=(t&255)/255}static rgb888ToColor(e,t){e.r=((t&16711680)>>>16)/255,e.g=((t&65280)>>>8)/255,e.b=(t&255)/255}toRgb888(){const e=t=>`0${(t*255).toString(16)}`.slice(-2);return+`0x${e(this.r)}${e(this.g)}${e(this.b)}`}static fromString(e,t=new _s){return t.setFromString(e)}};x(_s,"WHITE",new _s(1,1,1,1)),x(_s,"RED",new _s(1,0,0,1)),x(_s,"GREEN",new _s(0,1,0,1)),x(_s,"BLUE",new _s(0,0,1,1)),x(_s,"MAGENTA",new _s(1,0,1,1));let wt=_s;const fi=class fi{static clamp(e,t,i){return ei?i:e}static cosDeg(e){return Math.cos(e*fi.degRad)}static sinDeg(e){return Math.sin(e*fi.degRad)}static atan2Deg(e,t){return Math.atan2(e,t)*fi.radDeg}static signum(e){return e>0?1:e<0?-1:0}static toInt(e){return e>0?Math.floor(e):Math.ceil(e)}static cbrt(e){const t=Math.pow(Math.abs(e),.3333333333333333);return e<0?-t:t}static randomTriangular(e,t){return fi.randomTriangularWith(e,t,(e+t)*.5)}static randomTriangularWith(e,t,i){const n=Math.random(),r=t-e;return n<=(i-e)/r?e+Math.sqrt(n*r*(i-e)):t-Math.sqrt((1-n)*r*(t-i))}static isPowerOfTwo(e){return e&&(e&e-1)===0}};x(fi,"epsilon",1e-5),x(fi,"epsilon2",fi.epsilon*fi.epsilon),x(fi,"PI",3.1415927),x(fi,"PI2",fi.PI*2),x(fi,"invPI2",1/fi.PI2),x(fi,"radiansToDegrees",180/fi.PI),x(fi,"radDeg",fi.radiansToDegrees),x(fi,"degreesToRadians",fi.PI/180),x(fi,"degRad",fi.degreesToRadians);let Ye=fi;const Os=class Os{apply(e,t,i){return t===void 0||i===void 0?this.applyInternal(e):e+(t-e)*this.applyInternal(i)}};x(Os,"linear",new class extends Os{applyInternal(e){return e}}),x(Os,"smooth",new class extends Os{applyInternal(e){return e*e*(3-2*e)}}),x(Os,"slowFast",new class extends Os{applyInternal(e){return e*e}}),x(Os,"fastSlow",new class extends Os{applyInternal(e){return(e-1)*(e-1)*-1+1}}),x(Os,"circle",new class extends Os{applyInternal(e){return e<=.5?(e*=2,(1-Math.sqrt(1-e*e))/2):(e--,e*=2,(Math.sqrt(1-e*e)+1)/2)}});let To=Os;class TO extends To{constructor(t){super();x(this,"power",2);this.power=t}applyInternal(t){return t<=.5?Math.pow(t*2,this.power)/2:Math.pow((t-1)*2,this.power)/(this.power%2===0?-2:2)+1}}class KU extends TO{constructor(e){super(e)}applyInternal(e){return Math.pow(e-1,this.power)*(this.power%2===0?-1:1)+1}}const kr=class kr{static arrayCopy(e,t,i,n,r){for(let a=t,o=n;a=t?e:kr.setArraySize(e,t,i)}static newArray(e,t){const i=[];for(let n=0;n0?this.items.pop():this.instantiator()}free(e){var t;(t=e.reset)==null||t.call(e),this.items.push(e)}freeAll(e){for(let t=0;tthis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=e,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}}class QU{constructor(e=32){x(this,"values");x(this,"addedValues",0);x(this,"lastValue",0);x(this,"mean",0);x(this,"dirty",!0);this.values=new Array(e)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(e){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let e=0;for(let t=0;t{c.width=parseInt(i[1]),c.height=parseInt(i[2])},n.format=()=>{},n.filter=c=>{c.minFilter=ct.enumValue(Io,i[1]),c.magFilter=ct.enumValue(Io,i[2])},n.repeat=c=>{i[1].indexOf("x")!==-1&&(c.uWrap=Ro.Repeat),i[1].indexOf("y")!==-1&&(c.vWrap=Ro.Repeat)},n.pma=c=>{c.pma=i[1]==="true"};var r={};r.xy=c=>{c.x=parseInt(i[1]),c.y=parseInt(i[2])},r.size=c=>{c.width=parseInt(i[1]),c.height=parseInt(i[2])},r.bounds=c=>{c.x=parseInt(i[1]),c.y=parseInt(i[2]),c.width=parseInt(i[3]),c.height=parseInt(i[4])},r.offset=c=>{c.offsetX=parseInt(i[1]),c.offsetY=parseInt(i[2])},r.orig=c=>{c.originalWidth=parseInt(i[1]),c.originalHeight=parseInt(i[2])},r.offsets=c=>{c.offsetX=parseInt(i[1]),c.offsetY=parseInt(i[2]),c.originalWidth=parseInt(i[3]),c.originalHeight=parseInt(i[4])},r.rotate=c=>{const u=i[1];u==="true"?c.degrees=90:u!=="false"&&(c.degrees=parseInt(u))},r.index=c=>{c.index=parseInt(i[1])};let a=t.readLine();for(;a&&a.trim().length===0;)a=t.readLine();for(;!(!a||a.trim().length===0||t.readEntry(i,a)===0);)a=t.readLine();let o=null,h=null,l=null;for(;a!==null;)if(a.trim().length===0)o=null,a=t.readLine();else if(o){const c=new Bw(o,a);for(;;){const u=t.readEntry(i,a=t.readLine());if(u===0)break;const d=r[i[0]];if(d)d(c);else{h||(h=[]),l||(l=[]),h.push(i[0]);const f=[];for(let p=0;p0&&l&&l.length>0&&(c.names=h,c.values=l,h=null,l=null),c.u=c.x/o.width,c.v=c.y/o.height,c.degrees===90?(c.u2=(c.x+c.height)/o.width,c.v2=(c.y+c.width)/o.height):(c.u2=(c.x+c.width)/o.width,c.v2=(c.y+c.height)/o.height),this.regions.push(c)}else{for(o=new IO(a.trim());t.readEntry(i,a=t.readLine())!==0;){const c=n[i[0]];c&&c(o)}this.pages.push(o)}}findRegion(e){for(let t=0;t=this.lines.length?null:this.lines[this.index++]}readEntry(e,t){if(!t||(t=t.trim(),t.length===0))return 0;const i=t.indexOf(":");if(i===-1)return 0;e[0]=t.substr(0,i).trim();for(let n=1,r=i+1;;n++){const a=t.indexOf(",",r);if(a===-1)return e[n]=t.substr(r).trim(),n;if(e[n]=t.substr(r,a-r).trim(),r=a+1,n===4)return 4}}}class IO{constructor(e){x(this,"name");x(this,"minFilter",Io.Nearest);x(this,"magFilter",Io.Nearest);x(this,"uWrap",Ro.ClampToEdge);x(this,"vWrap",Ro.ClampToEdge);x(this,"texture",null);x(this,"width",0);x(this,"height",0);x(this,"pma",!1);x(this,"regions",[]);this.name=e}setTexture(e){this.texture=e,e.setFilters(this.minFilter,this.magFilter),e.setWraps(this.uWrap,this.vWrap);for(const t of this.regions)t.texture=e}}class Bw extends Ow{constructor(t,i){super();x(this,"page");x(this,"name");x(this,"x",0);x(this,"y",0);x(this,"offsetX",0);x(this,"offsetY",0);x(this,"originalWidth",0);x(this,"originalHeight",0);x(this,"index",0);x(this,"degrees",0);x(this,"names",null);x(this,"values",null);this.page=t,this.name=i,t.regions.push(this)}}const qh=class qh{constructor(e){x(this,"name");x(this,"timelineAttachment");x(this,"timelineSlots",qh.empty);if(!e)throw new Error("name cannot be null.");this.name=e,this.timelineAttachment=this}isTimelineActive(e,t,i){let n=e[t];if(n.bone.isActive()){const r=(i?n.getAppliedPose():n.getPose()).getAttachment();if(r!=null&&r.timelineAttachment===this)return!0}for(let r=0,a=this.timelineSlots.length;r>1)*h;const l=i.appliedPose.deform;let c=this.vertices;const u=this.bones;if(!u){l.length>0&&(c=l);const m=i.bone.appliedPose,g=m.worldX,v=m.worldY,b=m.a,y=m.b,w=m.c,A=m.d;for(let T=n,_=o;_=this.regions.length&&(t=this.regions.length-1),t}getUVs(e){return this.uvs[e]}hasPathSuffix(){return this.pathSuffix}getPath(e,t){if(!this.pathSuffix)return e;let i=e;const n=(this.start+t).toString();for(let r=this.digits-n.length;r>0;r--)i+="0";return i+=n,i}static nextID(){return ho._nextID++}};x(ho,"_nextID",0);let ko=ho;var Gi;(function(s){s[s.hold=0]="hold",s[s.once=1]="once",s[s.loop=2]="loop",s[s.pingpong=3]="pingpong",s[s.onceReverse=4]="onceReverse",s[s.loopReverse=5]="loopReverse",s[s.pingpongReverse=6]="pingpongReverse"})(Gi||(Gi={}));const Lw=[Gi.hold,Gi.once,Gi.loop,Gi.pingpong,Gi.onceReverse,Gi.loopReverse,Gi.pingpongReverse];class Fp{constructor(e,t,i){x(this,"name");x(this,"timelines",[]);x(this,"timelineIds");x(this,"bones");x(this,"color",new wt(1,1,1,1));x(this,"duration");if(!e)throw new Error("name cannot be null.");this.name=e,this.duration=i,this.timelineIds=new _O,this.bones=[],this.setTimelines(t)}setTimelines(e){if(!e)throw new Error("timelines cannot be null.");this.timelines=e;const t=e.length;this.timelineIds.clear(),this.bones.length=0;const i=new Set,n=e;for(let r=0;r0&&(t%=this.duration));const u=this.timelines;for(let d=0,f=u.length;dt)return r-i;return n-i}};function RO(s){return typeof s=="object"&&s!==null&&typeof s.slotIndex=="number"}class Va extends ii{constructor(t,i,...n){super(t,...n);x(this,"curves");this.curves=ct.newFloatArray(t+i*18),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){const i=this.getFrameCount()+t*18;if(this.curves.length>i){const n=ct.newFloatArray(i);ct.arrayCopy(this.curves,0,n,0,i),this.curves=n}}setBezier(t,i,n,r,a,o,h,l,c,u,d){const f=this.curves;let p=this.getFrameCount()+t*18;n===0&&(f[i]=2+p);const m=(r-o*2+l)*.03,g=(a-h*2+c)*.03,v=((o-l)*3-r+u)*.006,b=((h-c)*3-a+d)*.006;let y=m*2+v,w=g*2+b,A=(o-r)*.3+m+v*.16666667,T=(h-a)*.3+g+b*.16666667,_=r+A,R=a+T;for(let P=p+18;pt){const c=this.frames[i],u=this.frames[i+n];return u+(t-c)/(a[r]-c)*(a[r+1]-u)}const o=r+18;for(r+=2;r=t){const c=a[r-2],u=a[r-1];return u+(t-c)/(a[r]-c)*(a[r+1]-u)}i+=this.getFrameEntries();const h=a[o-2],l=a[o-1];return l+(t-h)/(this.frames[i]-h)*(this.frames[i+n]-l)}}class ar extends Va{constructor(e,t,i){super(e,t,i)}getFrameEntries(){return 2}setFrame(e,t,i){e<<=1,this.frames[e]=t,this.frames[e+1]=i}getCurveValue(e){const t=this.frames;let i=t.length-2;for(let r=2;r<=i;r+=2)if(t[r]>e){i=r-2;break}const n=this.curves[i>>1];switch(n){case 0:{const r=t[i],a=t[i+1];return a+(e-r)/(t[i+2]-r)*(t[i+2+1]-a)}case 1:return t[i+1]}return this.getBezierValue(e,i,1,n-2)}getRelativeValue(e,t,i,n,r,a){if(e>2];switch(f){case 0:{const p=u[d];h=u[d+1],l=u[d+2],c=u[d+3];const m=(i-p)/(u[d+4]-p);h+=(u[d+4+1]-h)*m,l+=(u[d+4+2]-l)*m,c+=(u[d+4+3]-c)*m;break}case 1:h=u[d+1],l=u[d+2],c=u[d+3];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2),c=this.getBezierValue(i,d,3,f+36-2)}if(n!==1)if(r===it.setup){const p=e.data.setupPose.color;h=p.r+(h-p.r)*n,l=p.g+(l-p.g)*n,c=p.b+(c-p.b)*n}else h=o.r+(h-o.r)*n,l=o.g+(l-o.g)*n,c=o.b+(c-o.b)*n;o.r=h<0?0:h>1?1:h,o.g=l<0?0:l>1?1:l,o.b=c<0?0:c>1?1:c}}class qw extends ar{constructor(t,i,n){super(t,i,`${xt.alpha}|${n}`);x(this,"slotIndex",0);this.slotIndex=n}apply(t,i,n,r,a,o,h,l,c){const u=t.slots[this.slotIndex];if(!u.bone.active)return;const d=(c?u.appliedPose:u.pose).color;let f=0;const p=this.frames;if(n1?1:f}}class Kw extends Ru{constructor(e,t,i){super(e,t,i,`${xt.rgb}|${i}`,`${xt.alpha}|${i}`,`${xt.rgb2}|${i}`)}getFrameEntries(){return 8}setFrame(e,t,i,n,r,a,o,h,l){e<<=3,this.frames[e]=t,this.frames[e+1]=i,this.frames[e+2]=n,this.frames[e+3]=r,this.frames[e+4]=a,this.frames[e+5]=o,this.frames[e+6]=h,this.frames[e+7]=l}apply1(e,t,i,n,r,a){const o=t.color,h=t.darkColor;let l=0,c=0,u=0;const d=this.frames;if(i>3];switch(b){case 0:{const y=d[v];f=d[v+1],p=d[v+2],m=d[v+3],g=d[v+4],l=d[v+5],c=d[v+6],u=d[v+7];const w=(i-y)/(d[v+8]-y);f+=(d[v+8+1]-f)*w,p+=(d[v+8+2]-p)*w,m+=(d[v+8+3]-m)*w,g+=(d[v+8+4]-g)*w,l+=(d[v+8+5]-l)*w,c+=(d[v+8+6]-c)*w,u+=(d[v+8+7]-u)*w;break}case 1:f=d[v+1],p=d[v+2],m=d[v+3],g=d[v+4],l=d[v+5],c=d[v+6],u=d[v+7];break;default:f=this.getBezierValue(i,v,1,b-2),p=this.getBezierValue(i,v,2,b+18-2),m=this.getBezierValue(i,v,3,b+36-2),g=this.getBezierValue(i,v,4,b+54-2),l=this.getBezierValue(i,v,5,b+72-2),c=this.getBezierValue(i,v,6,b+90-2),u=this.getBezierValue(i,v,7,b+108-2)}if(n===1)o.set(f,p,m,g);else if(r===it.setup){const y=e.data.setupPose;let w=y.color;o.set(w.r+(f-w.r)*n,w.g+(p-w.g)*n,w.b+(m-w.b)*n,w.a+(g-w.a)*n),w=y.darkColor,l=w.r+(l-w.r)*n,c=w.g+(c-w.g)*n,u=w.b+(u-w.b)*n}else o.add((f-o.r)*n,(p-o.g)*n,(m-o.b)*n,(g-o.a)*n),l=h.r+(l-h.r)*n,c=h.g+(c-h.g)*n,u=h.b+(u-h.b)*n;h.r=l<0?0:l>1?1:l,h.g=c<0?0:c>1?1:c,h.b=u<0?0:u>1?1:u}}class Zw extends Ru{constructor(e,t,i){super(e,t,i,`${xt.rgb}|${i}`,`${xt.rgb2}|${i}`)}getFrameEntries(){return 7}setFrame(e,t,i,n,r,a,o,h){e*=7,this.frames[e]=t,this.frames[e+1]=i,this.frames[e+2]=n,this.frames[e+3]=r,this.frames[e+4]=a,this.frames[e+5]=o,this.frames[e+6]=h}apply1(e,t,i,n,r,a){const o=t.color,h=t.darkColor;let l=0,c=0,u=0,d=0,f=0,p=0;const m=this.frames;if(i1?1:l,o.g=c<0?0:c>1?1:c,o.b=u<0?0:u>1?1:u,h.r=d<0?0:d>1?1:d,h.g=f<0?0:f>1?1:f,h.b=p<0?0:p>1?1:p}}class xl extends ii{constructor(t,i){super(t,`${xt.attachment}|${i}`);x(this,"slotIndex",0);x(this,"attachmentNames");this.slotIndex=i,this.attachmentNames=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,i,n){this.frames[t]=i,this.attachmentNames[t]=n}apply(t,i,n,r,a,o,h,l,c){const u=t.slots[this.slotIndex];if(!u.bone.active)return;const d=c?u.appliedPose:u.pose;l||nt){const l=this.frames[i];return n[r+1]*(t-l)/(n[r]-l)}const a=r+18;for(r+=2;r=t){const l=n[r-2],c=n[r-1];return c+(t-l)/(n[r]-l)*(n[r+1]-c)}const o=n[a-2],h=n[a-1];return h+(1-h)*(t-o)/(this.frames[i+this.getFrameEntries()]-o)}apply(t,i,n,r,a,o,h,l,c){const u=t.slots;if(!this.attachment.isTimelineActive(u,this.slotIndex,c))return;const d=this.attachment.timelineSlots,f=this.frames;if(n=f[f.length-1])g=0,p=this.vertices[f.length-1],m=null;else{const b=ii.search(f,n);g=this.getCurvePercent(n,b),p=this.vertices[b],m=this.vertices[b+1]}const v=this.vertices[0].length;this.applyToSlot(u[this.slotIndex],c,p,m,g,v,a,o,h);for(const b of d)this.applyToSlot(u[b],c,p,m,g,v,a,o,h)}applyBeforeFirst(t,i,n,r){if(!t.bone.active)return;const a=i?t.appliedPose:t.pose;if(a.attachment==null||a.attachment.timelineAttachment!==this.attachment)return;const o=a.deform;switch(o.length===0&&(r=it.setup),r){case it.setup:o.length=0;break;case it.first:{if(n===1){o.length=0;return}const h=this.vertices[0].length;o.length=h;const l=o,c=a.attachment;if(c.bones===null){const u=c.vertices;for(let d=0;d>4,c=h.attachment.sequence.regions.length;const u=Lw[a&15];if(u!==Gi.hold)switch(l+=(n-r)/o+1e-5|0,u){case Gi.once:l=Math.min(c-1,l);break;case Gi.loop:l%=c;break;case Gi.pingpong:{const d=(c<<1)-2;l=d===0?0:l%d,l>=c&&(l=d-l);break}case Gi.onceReverse:l=Math.max(c-1-l,0);break;case Gi.loopReverse:l=c-1-l%c;break;case Gi.pingpongReverse:{const d=(c<<1)-2;l=d===0?0:(l+c-1)%d,l>=c&&(l=d-l)}}h.sequenceIndex=l}};x(Bs,"ENTRIES",3),x(Bs,"MODE",1),x(Bs,"DELAY",2);let Hh=Bs;const Zh=class Zh extends ii{constructor(t){super(t,...Zh.propertyIds);x(this,"events");this.events=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,i){this.frames[t]=i.time,this.events[t]=i}apply(t,i,n,r,a,o,h,l,c){if(!r)return;const u=this.frames,d=this.frames.length;if(i>n)this.apply(null,i,Number.MAX_VALUE,r,0,o,!1,!1,!1),i=-1;else if(i>=u[d-1])return;if(n0&&u[f-1]===p;)f--}for(;f=u[f];f++)r.push(this.events[f])}};x(Zh,"propertyIds",[`${xt.event}`]);let Ul=Zh;const uo=class uo extends ii{constructor(t){super(t,...uo.propertyIds);x(this,"drawOrders");this.drawOrders=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,i,n){this.frames[t]=i,this.drawOrders[t]=n}apply(t,i,n,r,a,o,h,l,c){const u=c?t.drawOrder.appliedPose:t.drawOrder.pose,d=t.slots;if(l||n>2];switch(b){case 0:{const w=f[v];p=f[v+1],m=f[v+2],g=f[v+3];const A=(n-w)/(f[v+4]-w);p+=(f[v+4+1]-p)*A,m+=(f[v+4+2]-m)*A,g+=(f[v+4+3]-g)*A;break}case 1:p=f[v+1],m=f[v+2],g=f[v+3];break;default:p=this.getBezierValue(n,v,1,b-2),m=this.getBezierValue(n,v,2,b+18-2),g=this.getBezierValue(n,v,3,b+36-2)}const y=o===it.setup?u.data.setupPose:d;h?(d.mixRotate=y.mixRotate+p*a,d.mixX=y.mixX+m*a,d.mixY=y.mixY+g*a):(d.mixRotate=y.mixRotate+(p-y.mixRotate)*a,d.mixX=y.mixX+(m-y.mixX)*a,d.mixY=y.mixY+(g-y.mixY)*a)}}class Jr extends Jl{constructor(e,t,i,n){super(e,t,i,n)}apply(e,t,i,n,r,a,o,h,l){if(o&&!this.additive&&(o=!1),this.constraintIndex===-1){const c=i>=this.frames[0]?this.getCurveValue(i):0,u=e.physics;for(const d of u)if(d.active&&this.global(d.data)){const f=l?d.appliedPose:d.pose;this.set(f,this.getAbsoluteValue(i,r,a,o,this.get(f),this.get(d.data.setupPose),c))}}else{const c=e.constraints[this.constraintIndex];if(c.active){const u=l?c.appliedPose:c.pose;this.set(u,this.getAbsoluteValue(i,r,a,o,this.get(u),this.get(c.data.setupPose)))}}}}class nS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintInertia)}get(e){return e.inertia}set(e,t){e.inertia=t}global(e){return e.inertiaGlobal}}class rS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintStrength)}get(e){return e.strength}set(e,t){e.strength=t}global(e){return e.strengthGlobal}}class aS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintDamping)}get(e){return e.damping}set(e,t){e.damping=t}global(e){return e.dampingGlobal}}class oS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintMass)}get(e){return 1/e.massInverse}set(e,t){e.massInverse=1/t}global(e){return e.massGlobal}}class lS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintWind),this.additive=!0}get(e){return e.wind}set(e,t){e.wind=t}global(e){return e.windGlobal}}class cS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintGravity),this.additive=!0}get(e){return e.gravity}set(e,t){e.gravity=t}global(e){return e.gravityGlobal}}class hS extends Jr{constructor(e,t,i){super(e,t,i,xt.physicsConstraintMix)}get(e){return e.mix}set(e,t){e.mix=t}global(e){return e.mixGlobal}}const Jh=class Jh extends ii{constructor(t,i){super(t,...Jh.propertyIds);x(this,"constraintIndex");this.constraintIndex=i,this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,i){this.frames[t]=i}apply(t,i,n,r,a,o,h,l,c){let u;if(this.constraintIndex!==-1&&(u=t.constraints[this.constraintIndex],!u.active))return;const d=this.frames;if(i>n)this.apply(t,i,Number.MAX_VALUE,[],a,o,!1,!1,!1),i=-1;else if(i>=d[d.length-1])return;if(!(n=d[ii.search(d,i)+1]))if(u!=null)u.reset(t);else for(const f of t.physics)f.active&&f.reset(t)}};x(Jh,"propertyIds",[xt.physicsConstraintReset.toString()]);let jh=Jh;class uS extends Jl{constructor(e,t,i){super(e,t,i,xt.sliderTime)}apply(e,t,i,n,r,a,o,h,l){const c=e.constraints[this.constraintIndex];if(c.active){const u=l?c.appliedPose:c.pose;u.time=this.getAbsoluteValue(i,r,a,o,u.time,c.data.setupPose.time)}}}class dS extends Jl{constructor(e,t,i){super(e,t,i,xt.sliderMix),this.additive=!0}apply(e,t,i,n,r,a,o,h,l){const c=e.constraints[this.constraintIndex];if(c.active){const u=l?c.appliedPose:c.pose;u.mix=this.getAbsoluteValue(i,r,a,o,u.mix,c.data.setupPose.mix)}}}const Sl=class Sl{constructor(e){x(this,"data");x(this,"tracks",[]);x(this,"timeScale",1);x(this,"unkeyedState",0);x(this,"events",[]);x(this,"listeners",[]);x(this,"queue",new OO(this));x(this,"propertyIds",new Map);x(this,"animationsChanged",!1);x(this,"trackEntryPool",new AO(()=>new FO));this.data=e}update(e){e*=this.timeScale;const t=this.tracks;for(let i=0,n=t.length;i0){if(r.delay-=a,r.delay>0)continue;a=-r.delay,r.delay=0}let o=r.next;if(o){const h=r.trackLast-o.delay;if(h>=0){for(o.delay=0,o.trackTime+=r.timeScale===0?0:(h/r.timeScale+e)*o.timeScale,r.trackTime+=a,this.setTrack(i,o,!0);o.mixingFrom;)o.mixTime+=e,o=o.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&!r.mixingFrom){t[i]=null,this.queue.end(r),this.clearNext(r);continue}if(r.mixingFrom&&this.updateMixingFrom(r,e)){let h=r.mixingFrom;for(r.mixingFrom=null,h&&(h.mixingTo=null);h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=a}this.queue.drain()}updateMixingFrom(e,t){const i=e.mixingFrom;if(!i)return!0;const n=this.updateMixingFrom(i,t);if(i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,e.nextTrackLast!==-1&&e.mixTime>=e.mixDuration){if(i.totalAlpha===0||e.mixDuration===0){if(e.mixingFrom=i.mixingFrom,i.mixingFrom!=null&&(i.mixingFrom.mixingTo=e),i.totalAlpha===0)for(let r=e;r.mixingTo!=null;r=r.mixingTo)r.keepHold=!0;this.queue.end(i)}return n}return i.trackTime+=t*i.timeScale,e.mixTime+=t,!1}apply(e){if(!e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();const t=this.events,i=this.tracks;let n=!1;for(let o=0,h=i.length;o0)continue;n=!0;let c=l.alpha;l.mixingFrom?c*=this.applyMixingFrom(l,e):l.trackTime>=l.trackEnd&&!l.next&&(c=0);let u=l.animationLast,d=l.getAnimationTime(),f=d,p=t;l.reverse&&(f=l.animation.duration-f,p=null);const m=l.animation.timelines,g=m.length;if(o===0&&c===1)for(let v=0;v=l.alphaAttachmentThreshold,y=l.additive,w=y||l.shortestRotation,A=!w&&l.timelinesRotation.length!==g<<1;A&&(l.timelinesRotation.length=g<<1);for(let T=0;T0?h/o:a,c=i.animation.timelines,u=c.length,d=i.timelineMode,f=i.timelineHoldMix,p=r=i.alphaAttachmentThreshold);else{const B=!m||!(P instanceof Gr)||I===it.current;P.apply(t,w,T,_,k,I,g,B,!1)}}return i.reverse&&r0&&this.queueEvents(i,A),this.events.length=0,i.nextAnimationLast=A,i.nextTrackLast=i.trackTime,r}applyAttachmentTimeline(e,t,i,n,r){const a=t.slots[e.slotIndex];if(!a.bone.active||!r&&a.attachmentState===this.unkeyedState+dy)return;let o=i=0,A=v>=0;Math.abs(b)<=90&&Ye.signum(b)!==Ye.signum(g)&&(Math.abs(v-y)>180?(m+=360*Ye.signum(v),A=w):y!==0?m-=360*Ye.signum(v):A=w),A!==w&&(m+=360*Ye.signum(v)),a[o]=m}a[o+1]=g,c.rotation=f+m*n}queueEvents(e,t){const i=e.animationStart,n=e.animationEnd,r=n-i,a=e.reverse;let o=e.trackLast%r;a&&(o=r-o);const h=this.events;let l=0,c=h.length;for(;l=i&&d.time<=n&&this.queue.event(e,d)}let u=!1;if(e.loop)if(r===0)u=!0;else{const d=Math.floor(e.trackTime/r);u=d>0&&d>Math.floor(e.trackLast/r)}else u=t>=n&&e.animationLast=i&&d.time<=n&&this.queue.event(e,d)}}eventsReverse(e,t,i){const n=e.animation.duration,r=n-t,a=n-i,o=e.animation.timelines;for(let h=0,l=e.animation.timelines.length;h=a){for(let p=0;p=r)break;this.events.push(u[p])}}else{for(let m=0;m=r);m++)this.events.push(u[m]);let p=0;for(;p=a);p++);for(;p= 0.");if(e>=this.tracks.length)return;const t=this.tracks[e];if(!t)return;this.queue.end(t),this.clearNext(t);let i=t;for(;;){const n=i.mixingFrom;if(!n)break;this.queue.end(n),i.mixingFrom=null,i.mixingTo=null,i=n}this.tracks[t.trackIndex]=null,this.queue.drain()}setTrack(e,t,i){const n=this.expandToIndex(e);this.tracks[e]=t,t.previous=null,n&&(n.next=null,i&&this.queue.interrupt(n),t.mixingFrom=n,n.mixingTo=t,t.mixTime=0,n.timelinesRotation.length=0),this.queue.start(t)}setAnimation(e,t,i=!1){return typeof t=="string"?this.setAnimation1(e,t,i):this.setAnimation2(e,t,i)}setAnimation1(e,t,i=!1){const n=this.data.skeletonData.findAnimation(t);if(!n)throw new Error(`Animation not found: ${t}`);return this.setAnimation2(e,n,i)}setAnimation2(e,t,i=!1){if(e<0)throw new Error("trackIndex must be >= 0.");if(!t)throw new Error("animation cannot be null.");let n=!0,r=this.expandToIndex(e);r&&(r.nextTrackLast===-1&&r.animation===t?(this.tracks[e]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,n=!1):this.clearNext(r));const a=this.trackEntry(e,t,i,r);return this.setTrack(e,a,n),this.queue.drain(),a}addAnimation(e,t,i=!1,n=0){return typeof t=="string"?this.addAnimation1(e,t,i,n):this.addAnimation2(e,t,i,n)}addAnimation1(e,t,i=!1,n=0){const r=this.data.skeletonData.findAnimation(t);if(!r)throw new Error(`Animation not found: ${t}`);return this.addAnimation2(e,r,i,n)}addAnimation2(e,t,i=!1,n=0){if(e<0)throw new Error("trackIndex must be >= 0.");if(!t)throw new Error("animation cannot be null.");let r=this.expandToIndex(e);if(r)for(;r.next;)r=r.next;const a=this.trackEntry(e,t,i,r);return r?(r.next=a,a.previous=r,n<=0&&(n=Math.max(n+r.getTrackComplete()-a.mixDuration,0))):(this.setTrack(e,a,!0),this.queue.drain(),n<0&&(n=0)),a.delay=n,a}setEmptyAnimation(e,t=0){const i=this.setAnimation(e,Sl.emptyAnimation,!1);return i.mixDuration=t,i.trackEnd=t,i}addEmptyAnimation(e,t=0,i=0){const n=this.addAnimation(e,Sl.emptyAnimation,!1,i);return i<=0&&(n.delay=Math.max(n.delay+n.mixDuration-t,0)),n.mixDuration=t,n.trackEnd=t,n}setEmptyAnimations(e=0){const t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let i=0,n=this.tracks.length;i0&&(a[d]=v);break}}h&&(g=g&~Nc|r[d]&Nc),r[d]=g}}from(e,t,i){const n=this.propertyIds;let r=BO;for(let a=0,o=i.length;a= 0.");return e>=this.tracks.length?null:this.tracks[e]}addListener(e){if(!e)throw new Error("listener cannot be null.");this.listeners.push(e)}removeListener(e){const t=this.listeners.indexOf(e);t>=0&&this.listeners.splice(t,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}};x(Sl,"emptyAnimation",new Fp("",[],0));let oy=Sl;class FO{constructor(){x(this,"animation",null);x(this,"previous",null);x(this,"next",null);x(this,"mixingFrom",null);x(this,"mixingTo",null);x(this,"listener",null);x(this,"trackIndex",0);x(this,"loop",!1);x(this,"additive",!1);x(this,"reverse",!1);x(this,"shortestRotation",!1);x(this,"keepHold",!1);x(this,"eventThreshold",0);x(this,"mixAttachmentThreshold",0);x(this,"alphaAttachmentThreshold",0);x(this,"mixDrawOrderThreshold",0);x(this,"animationStart",0);x(this,"animationEnd",0);x(this,"animationLast",0);x(this,"nextAnimationLast",0);x(this,"delay",0);x(this,"trackTime",0);x(this,"trackLast",0);x(this,"nextTrackLast",0);x(this,"trackEnd",0);x(this,"timeScale",0);x(this,"alpha",0);x(this,"mixTime",0);x(this,"mixDuration",0);x(this,"totalAlpha",0);x(this,"mixInterpolation",To.linear);x(this,"timelineMode",[]);x(this,"timelineHoldMix",[]);x(this,"timelinesRotation",[])}setMixDuration(e,t){this.mixDuration=e,t!==void 0&&(t<=0&&(t=this.previous==null?0:Math.max(t+this.previous.getTrackComplete()-e,0)),this.delay=t)}setMixInterpolation(e){if(!e)throw new Error("mixInterpolation cannot be null.");this.mixInterpolation=e}mix(){if(this.mixDuration===0)return 1;let e=this.mixTime/this.mixDuration;return e>=1?1:this.mixInterpolation===To.linear?e:(e=this.mixInterpolation.apply(e),e<0?0:e>1?1:e)}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.mixInterpolation=To.linear,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(!this.loop)return Math.min(this.trackTime+this.animationStart,this.animationEnd);const e=this.animationEnd-this.animationStart;return e===0?this.animationStart:this.trackTime%e+this.animationStart}setAnimationLast(e){this.animationLast=e,this.nextAnimationLast=e}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){const e=this.animationEnd-this.animationStart;if(e!==0){if(this.loop)return e*(1+(this.trackTime/e|0));if(this.trackTime=0}}class OO{constructor(e){x(this,"objects",[]);x(this,"drainDisabled",!1);x(this,"animState");this.animState=e}start(e){this.objects.push(vs.start),this.objects.push(e),this.animState.animationsChanged=!0}interrupt(e){this.objects.push(vs.interrupt),this.objects.push(e)}end(e){this.objects.push(vs.end),this.objects.push(e),this.animState.animationsChanged=!0}dispose(e){this.objects.push(vs.dispose),this.objects.push(e)}complete(e){this.objects.push(vs.complete),this.objects.push(e)}event(e,t){this.objects.push(vs.event),this.objects.push(e),this.objects.push(t)}drain(){var e,t,i,n,r,a;if(!this.drainDisabled){this.drainDisabled=!0;for(let o=0;o= 0.");if(!i)throw new Error("name cannot be null.");this.index=t,this.parent=n}copy(t){const i=new ku(this.index,this.name,t);return i.length=this.length,i.setupPose.set(this.setupPose),i}}var pi;(function(s){s[s.Normal=0]="Normal",s[s.OnlyTranslation=1]="OnlyTranslation",s[s.NoRotationOrReflection=2]="NoRotationOrReflection",s[s.NoScale=3]="NoScale",s[s.NoScaleOrReflection=4]="NoScaleOrReflection"})(pi||(pi={}));class Pm{constructor(){x(this,"bone");x(this,"x",0);x(this,"y",0);x(this,"rotation",0);x(this,"scaleX",0);x(this,"scaleY",0);x(this,"shearX",0);x(this,"shearY",0);x(this,"inherit",pi.Normal);x(this,"a",0);x(this,"b",0);x(this,"c",0);x(this,"d",0);x(this,"worldY",0);x(this,"worldX",0);x(this,"world",0);x(this,"local",0)}set(e){if(e==null)throw new Error("pose cannot be null.");this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY,this.inherit=e.inherit}setPosition(e,t){this.x=e,this.y=t}setScale(e,t){this.scaleX=e,this.scaleY=t===void 0?e:t}getInherit(){return this.inherit}setInherit(e){if(e==null)throw new Error("inherit cannot be null.");this.inherit=e}update(e,t){this.world!==e._update&&this.updateWorldTransform(e)}updateWorldTransform(e){this.local===e._update?this.updateLocalTransform(e):this.world=e._update;const t=this.rotation,i=this.scaleX,n=this.scaleY,r=this.shearX,a=this.shearY;if(!this.bone.parent){const d=e.scaleX,f=e.scaleY,p=(t+r)*Ye.degRad,m=(t+90+a)*Ye.degRad;this.a=Math.cos(p)*i*d,this.b=Math.cos(m)*n*d,this.c=Math.sin(p)*i*f,this.d=Math.sin(m)*n*f,this.worldX=this.x*d+e.x,this.worldY=this.y*f+e.y;return}const o=this.bone.parent.appliedPose;let h=o.a,l=o.b,c=o.c,u=o.d;switch(this.worldX=h*this.x+l*this.y+o.worldX,this.worldY=c*this.x+u*this.y+o.worldY,this.inherit){case pi.Normal:{const d=(t+r)*Ye.degRad,f=(t+90+a)*Ye.degRad,p=Math.cos(d)*i,m=Math.cos(f)*n,g=Math.sin(d)*i,v=Math.sin(f)*n;this.a=h*p+l*g,this.b=h*m+l*v,this.c=c*p+u*g,this.d=c*m+u*v;return}case pi.OnlyTranslation:{const d=e.scaleX,f=e.scaleY,p=(t+r)*Ye.degRad,m=(t+90+a)*Ye.degRad;this.a=Math.cos(p)*i*d,this.b=Math.cos(m)*n*d,this.c=Math.sin(p)*i*f,this.d=Math.sin(m)*n*f;break}case pi.NoRotationOrReflection:{const d=e.scaleX,f=e.scaleY,p=1/d,m=1/f;h*=p,c*=m;let g=h*h+c*c,v=0;g>Ye.epsilon2?(g=Math.abs(h*u*m-l*p*c)/g,l=c*g,u=h*g,v=t-Ye.atan2Deg(c,h)):(h=0,c=0,v=t-90+Ye.atan2Deg(u,l));const b=(v+r)*Ye.degRad,y=(v+a+90)*Ye.degRad,w=Math.cos(b)*i,A=Math.cos(y)*n,T=Math.sin(b)*i,_=Math.sin(y)*n;this.a=(h*w-l*T)*d,this.b=(h*A-l*_)*d,this.c=(c*w+u*T)*f,this.d=(c*A+u*_)*f;break}case pi.NoScale:case pi.NoScaleOrReflection:{const d=e.scaleX,f=e.scaleY,p=1/d,m=1/f,g=t*Ye.degRad,v=Math.cos(g),b=Math.sin(g);let y=(h*v+l*b)*p,w=(c*v+u*b)*m;const A=1/Math.sqrt(y*y+w*w);y*=A,w*=A;let T=-w,_=y;this.inherit===pi.NoScale&&h*u-l*c<0!=(d<0!=f<0)&&(T=-T,_=-_);const R=r*Ye.degRad,P=(90+a)*Ye.degRad,F=Math.cos(R)*i,I=Math.cos(P)*n,k=Math.sin(R)*i,B=Math.sin(P)*n;this.a=(y*F+T*k)*d,this.b=(y*I+T*B)*d,this.c=(w*F+_*k)*f,this.d=(w*I+_*B)*f;break}}}updateLocalTransform(e){this.local=0,this.world=e._update;const t=e.scaleX,i=e.scaleY;if(!this.bone.parent){const v=1/t,b=1/i;this.x=(this.worldX-e.x)*v,this.y=(this.worldY-e.y)*b,this.set5(this.a*v,this.b*v,this.c*b,this.d*b,0);return}const n=this.bone.parent.appliedPose;let r=n.a,a=n.b,o=n.c,h=n.d;const l=r*h-a*o,c=1/(r*h-a*o),u=h*c,d=a*c,f=o*c,p=r*c,m=this.worldX-n.worldX,g=this.worldY-n.worldY;switch(this.x=m*u-g*d,this.y=g*p-m*f,this.inherit){case pi.Normal:this.set5(u*this.a-d*this.c,u*this.b-d*this.d,p*this.c-f*this.a,p*this.d-f*this.b,0);break;case pi.OnlyTranslation:{const v=1/t,b=1/i;this.set5(this.a*v,this.b*v,this.c*b,this.d*b,0);break}case pi.NoRotationOrReflection:{const v=1/t,b=1/i;r*=v,o*=b;const y=this.a*v,w=this.b*v,A=this.c*b,T=this.d*b,_=1/(r*r+o*o),R=1/Math.abs(l*v*b);this.set5((r*y+o*A)*_,(r*w+o*T)*_,(r*A-o*y)*R,(r*T-o*w)*R,Ye.atan2Deg(o,r));break}case pi.NoScale:case pi.NoScaleOrReflection:{const v=1/t,b=1/i,y=this.a*v,w=this.b*v,A=this.c*b,T=this.d*b;let _=h*this.a-a*this.c,R=r*this.c-o*this.a;l<0&&(_=-_,R=-R);let P=Ye.atan2Deg(R,_);this.rotation=P,P*=Ye.degRad;const F=Math.cos(P),I=Math.sin(P);let k=(r*F+a*I)*v,B=(o*F+h*I)*b;const D=1/Math.sqrt(k*k+B*B);k*=D,B*=D;const U=this.inherit===pi.NoScale&&l<0!=(t<0!=i<0)?-1:1;this.set4(k*y+B*A,k*w+B*T,(k*A-B*y)*U,(k*T-B*w)*U)}}}set4(e,t,i,n){const r=e*e+i*i,a=t*t+n*n;r>Ye.epsilon2?(this.shearX=Ye.atan2Deg(i,e),this.scaleX=Math.sqrt(r)):(this.shearX=0,this.scaleX=0),this.scaleY=Math.sqrt(a),a>Ye.epsilon2?(this.shearY=Ye.atan2Deg(n,t),e*n-t*i<0?(this.scaleY=-this.scaleY,this.shearY+=90):this.shearY-=90,this.shearY>180?this.shearY-=360:this.shearY<=-180&&(this.shearY+=360)):this.shearY=0}set5(e,t,i,n,r){this.shearX=0;const a=e*e+i*i,o=t*t+n*n;if(a>Ye.epsilon2){const h=Ye.atan2Deg(i,e);this.rotation=h+r,this.scaleX=Math.sqrt(a),this.scaleY=Math.sqrt(o),o>Ye.epsilon2?(this.shearY=Ye.atan2Deg(n,t),e*n-t*i<0?(this.scaleY=-this.scaleY,this.shearY+=90-h):this.shearY-=90+h,this.shearY>180?this.shearY-=360:this.shearY<=-180&&(this.shearY+=360)):this.shearY=0}else this.scaleX=0,this.scaleY=Math.sqrt(o),this.shearY=0,this.rotation=o>Ye.epsilon2?Ye.atan2Deg(n,t)-90+r:r}validateLocalTransform(e){this.local===e._update&&this.updateLocalTransform(e)}modifyLocal(e){this.local===e._update&&this.updateLocalTransform(e),this.world=0,this.resetWorld(e,e._update)}modifyWorld(e){const t=e._update;this.local=t,this.world=t,this.resetWorld(e,t)}resetWorld(e,t){const i=this.bone.children;for(let n=0,r=i.length;n1&&t.constrained(this.bones[1].bone)}isSourceActive(){return this.target.active}static apply(t,i,n,r,a,o,h,l,c,u){typeof n=="number"?Pr.apply1(t,i,n,r,a,o,h,l):Pr.apply2(t,i,n,r,a,o,h,l,c,u)}static apply1(t,i,n,r,a,o,h,l){i.modifyLocal(t);const c=i.bone.parent.appliedPose;let u=c.a,d=c.b,f=c.c,p=c.d,m=-i.shearX-i.rotation,g=0,v=0;switch(i.inherit){case pi.OnlyTranslation:g=(n-i.worldX)*Ye.signum(t.scaleX),v=(r-i.worldY)*Ye.signum(t.scaleY);break;case pi.NoRotationOrReflection:{const b=Math.abs(u*p-d*f)/Math.max(Ye.epsilon,u*u+f*f),y=u/t.scaleX,w=f/t.scaleY;d=-w*b*t.scaleX,p=y*b*t.scaleY,m+=Ye.atan2Deg(w,y)}default:{const b=n-c.worldX,y=r-c.worldY,w=u*p-d*f;Math.abs(w)<=Ye.epsilon?(g=0,v=0):(g=(b*p-y*d)/w-i.x,v=(y*u-b*f)/w-i.y)}}if(m+=Ye.atan2Deg(v,g),i.scaleX<0&&(m+=180),m>180?m-=360:m<=-180&&(m+=360),i.rotation+=m*l,a||o){switch(i.inherit){case pi.NoScale:case pi.NoScaleOrReflection:g=n-i.worldX,v=r-i.worldY}const b=i.bone.data.length*i.scaleX;if(b>Ye.epsilon){const y=g*g+v*v;if(a&&yb*b){const w=(Math.sqrt(y)/b-1)*l+1;switch(i.scaleX*=w,h){case hs.Uniform:i.scaleY*=w;break;case hs.Volume:i.scaleY/=w<.7?.25+.642857*w:w}}}}}static apply2(t,i,n,r,a,o,h,l,c,u){if(i.inherit!==pi.Normal||n.inherit!==pi.Normal)return;i.modifyLocal(t),n.modifyLocal(t);let d=i.x,f=i.y,p=i.scaleX,m=i.scaleY,g=n.scaleX,v=0,b=0,y=0;p<0?(p=-p,v=180,y=-1):(v=0,y=1),m<0&&(m=-m,y=-y),g<0?(g=-g,b=180):b=0;let w=0,A=0,T=i.a,_=i.b,R=i.c,P=i.d;const F=Math.abs(p-m)<=Ye.epsilon;!F||h?(n.y=0,w=T*n.x+i.worldX,A=R*n.x+i.worldY):(w=T*n.x+_*n.y+i.worldX,A=R*n.x+P*n.y+i.worldY);const I=i.bone.parent.appliedPose;T=I.a,_=I.b,R=I.c,P=I.d;let k=T*P-_*R,B=w-I.worldX,D=A-I.worldY;k=Math.abs(k)<=Ye.epsilon?0:1/k;const U=(B*P-D*_)*k-d,L=(D*T-B*R)*k-f;let N=Math.sqrt(U*U+L*L),O=n.bone.data.length*g,X,E;if(N0){let me=Math.min(1,fe/(c*2))-1;me=(fe-c*(1-me*me))/K,V-=me*V,q-=me*q,W=V*V+q*q}}e:if(F){O*=p;let K=(W-N*N-O*O)/(2*N*O);if(K<-1)K=-1,E=Math.PI*o;else if(K>1){if(K=1,E=0,h)switch(T=(Math.sqrt(W)/(N+O)-1)*u+1,i.scaleX*=T,l){case hs.Uniform:i.scaleY*=T;break;case hs.Volume:i.scaleY/=T<.7?.25+.642857*T:T}}else E=Math.acos(K)*o;T=N+O*K,_=O*Math.sin(E),X=Math.atan2(q*T-V*_,V*T+q*_)}else{T=p*O,_=m*O;const K=T*T,fe=_*_,me=Math.atan2(q,V);R=fe*N*N+K*W-K*fe;const we=-2*fe*N,Ee=fe-K;if(P=we*we-4*Ee*R,P>=0){let xe=Math.sqrt(P);we<0&&(xe=-xe),xe=-(we+xe)*.5;let oe=xe/Ee,ge=R/xe;const le=Math.abs(oe)=0){D=Math.sqrt(oe)*o,X=me-Math.atan2(D,le),E=Math.atan2(D/m,(le-N)/p);break e}}let pe=Ye.PI,Ae=N-T,G=Ae*Ae,Z=0,z=0,j=N+T,te=j*j,he=0;R=-T*N/(K-fe),R>=-1&&R<=1&&(R=Math.acos(R),B=T*Math.cos(R)+N,D=_*Math.sin(R),P=B*B+D*D,Pte&&(z=R,te=P,j=B,he=D)),W<=(G+te)*.5?(X=me-Math.atan2(Z*o,Ae),E=pe*o):(X=me-Math.atan2(he*o,j),E=z*o)}const J=Math.atan2(n.y,n.x)*y;X=(X-J)*Ye.radDeg+v-i.rotation,X>180?X-=360:X<=-180&&(X+=360),i.rotation+=X*u,E=((E+J)*Ye.radDeg-n.shearX)*y+b-n.rotation,E>180?E-=360:E<=-180&&(E+=360),n.rotation+=E*u}}class Qc extends ec{constructor(t){super(t,new km);x(this,"bones",[]);x(this,"_target",null);x(this,"_scaleYMode",hs.None)}set target(t){this._target=t}get target(){if(!this._target)throw new Error("target cannot be null.");return this._target}set scaleYMode(t){this._scaleYMode=t}get scaleYMode(){if(this._scaleYMode==null)throw new Error("scaleYMode cannot be null.");return this._scaleYMode}create(t){return new Pr(this,t)}}class Fm{constructor(){x(this,"position",0);x(this,"spacing",0);x(this,"mixRotate",0);x(this,"mixX",0);x(this,"mixY",0)}set(e){this.position=e.position,this.spacing=e.spacing,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY}}class eh extends ec{constructor(t){super(t,new Fm);x(this,"bones",[]);x(this,"_slot",null);x(this,"positionMode",Dn.Fixed);x(this,"spacingMode",Fi.Fixed);x(this,"rotateMode",ka.Chain);x(this,"offsetRotation",0)}set slot(t){this._slot=t}get slot(){if(this._slot)return this._slot;throw new Error("SlotData not set.")}create(t){return new Om(this,t)}}var Dn;(function(s){s[s.Fixed=0]="Fixed",s[s.Percent=1]="Percent"})(Dn||(Dn={}));var Fi;(function(s){s[s.Length=0]="Length",s[s.Fixed=1]="Fixed",s[s.Percent=2]="Percent",s[s.Proportional=3]="Proportional"})(Fi||(Fi={}));var ka;(function(s){s[s.Tangent=0]="Tangent",s[s.Chain=1]="Chain",s[s.ChainScale=2]="ChainScale"})(ka||(ka={}));const Qs=class Qs extends Ql{constructor(t,i){super(t,new Fm,new Fm);x(this,"data");x(this,"bones");x(this,"slot");x(this,"spaces",[]);x(this,"positions",[]);x(this,"world",[]);x(this,"curves",[]);x(this,"lengths",[]);x(this,"segments",[]);if(!i)throw new Error("skeleton cannot be null.");this.data=t,this.bones=[];for(const n of this.data.bones)this.bones.push(i.bones[n.index].constrainedPose);this.slot=i.slots[t.slot.index]}copy(t){var i=new Qs(this.data,t);return i.pose.set(this.pose),i}update(t,i){const n=this.slot.appliedPose.attachment;if(!(n instanceof Xl))return;const r=this.appliedPose,a=r.mixRotate,o=r.mixX,h=r.mixY;if(a===0&&o===0&&h===0)return;const l=this.data,c=l.rotateMode===ka.Tangent,u=l.rotateMode===ka.ChainScale,d=this.bones,f=d.length,p=c?f:f+1,m=ct.setArraySize(this.spaces,p),g=u?this.lengths=ct.setArraySize(this.lengths,f):[],v=r.spacing;switch(l.spacingMode){case Fi.Percent:if(u)for(let _=0,R=p-1;_0){_=p/_*v;for(let R=1;R0?Ye.degRad:-Ye.degRad}for(let _=0,R=3;_0){let D=P.a,U=P.b,L=P.c,N=P.d,O=0,X=0,E=0;if(c?O=b[R-1]:m[_+1]===0?O=b[R+2]:O=Math.atan2(B,k),O-=Math.atan2(L,D),T){X=Math.cos(O),E=Math.sin(O);const V=P.bone.data.length;y+=(V*(X*D-E*L)-k)*a,w+=(V*(E*D+X*L)-B)*a}else O+=A;O>Ye.PI?O-=Ye.PI2:O<-Ye.PI&&(O+=Ye.PI2),O*=a,X=Math.cos(O),E=Math.sin(O),P.a=X*D-E*L,P.b=X*U-E*N,P.c=E*D+X*L,P.d=E*U+X*N}}}computeWorldPositions(t,i,n,r){const a=this.slot;let o=this.appliedPose.position,h=this.spaces,l=ct.setArraySize(this.positions,n*3+2),c=this.world;const u=i.closed;let d=i.worldVerticesLength,f=d/6,p=Qs.NONE;if(!i.constantSpeed){const E=i.lengths;f-=u?1:2;const V=E[f];this.data.positionMode===Dn.Percent&&(o*=V);let q;switch(this.data.spacingMode){case Fi.Percent:q=V;break;case Fi.Proportional:q=V/n;break;default:q=1}c=ct.setArraySize(this.world,8);for(let W=0,J=0,K=0;WV){p!==Qs.AFTER&&(p=Qs.AFTER,i.computeWorldVertices(t,a,d-6,4,c,0,2)),this.addAfterPosition(me-V,c,0,l,J);continue}for(;;K++){const we=E[K];if(!(me>we)){if(K===0)me/=we;else{const Ee=E[K-1];me=(me-Ee)/(we-Ee)}break}}K!==p&&(p=K,u&&K===f?(i.computeWorldVertices(t,a,d-4,4,c,0,2),i.computeWorldVertices(t,a,0,4,c,4,2)):i.computeWorldVertices(t,a,K*6+2,8,c,0,2)),this.addCurvePosition(me,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],l,J,r||W>0&&fe===0)}return l}u?(d+=2,c=ct.setArraySize(this.world,d),i.computeWorldVertices(t,a,2,d-4,c,0,2),i.computeWorldVertices(t,a,0,2,c,d-4,2),c[d-2]=c[0],c[d-1]=c[1]):(f--,d-=4,c=ct.setArraySize(this.world,d),i.computeWorldVertices(t,a,2,d,c,0,2));const m=ct.setArraySize(this.curves,f);let g=0,v=c[0],b=c[1],y=0,w=0,A=0,T=0,_=0,R=0,P=0,F=0,I=0,k=0,B=0,D=0,U=0,L=0;for(let E=0,V=2;Eg){this.addAfterPosition(K-g,c,d-4,l,V);continue}for(;;q++){const fe=m[q];if(!(K>fe)){if(q===0)K/=fe;else{const me=m[q-1];K=(K-me)/(fe-me)}break}}if(q!==p){p=q;let fe=q*6;for(v=c[fe],b=c[fe+1],y=c[fe+2],w=c[fe+3],A=c[fe+4],T=c[fe+5],_=c[fe+6],R=c[fe+7],P=(v-y*2+A)*.03,F=(b-w*2+T)*.03,I=((y-A)*3-v+_)*.006,k=((w-T)*3-b+R)*.006,B=P*2+I,D=F*2+k,U=(y-v)*.3+P+I*.16666667,L=(w-b)*.3+F+k*.16666667,X=Math.sqrt(U*U+L*L),O[0]=X,fe=1;fe<8;fe++)U+=B,L+=D,B+=I,D+=k,X+=Math.sqrt(U*U+L*L),O[fe]=X;U+=B,L+=D,X+=Math.sqrt(U*U+L*L),O[8]=X,U+=B+I,L+=D+k,X+=Math.sqrt(U*U+L*L),O[9]=X,W=0}for(K*=X;;W++){const fe=O[W];if(!(K>fe)){if(W===0)K/=fe;else{const me=O[W-1];K=W+(K-me)/(fe-me)}break}}this.addCurvePosition(K*.1,v,b,y,w,A,T,_,R,l,V,r||E>0&&J===0)}return l}addBeforePosition(t,i,n,r,a){const o=i[n],h=i[n+1],l=i[n+2]-o,c=i[n+3]-h,u=Math.atan2(c,l);r[a]=o+t*Math.cos(u),r[a+1]=h+t*Math.sin(u),r[a+2]=u}addAfterPosition(t,i,n,r,a){const o=i[n+2],h=i[n+3],l=o-i[n],c=h-i[n+1],u=Math.atan2(c,l);r[a]=o+t*Math.cos(u),r[a+1]=h+t*Math.sin(u),r[a+2]=u}addCurvePosition(t,i,n,r,a,o,h,l,c,u,d,f){if(t===0||Number.isNaN(t)){u[d]=i,u[d+1]=n,u[d+2]=Math.atan2(a-n,r-i);return}const p=t*t,m=p*t,g=1-t,v=g*g,b=v*g,y=g*t,w=y*3,A=g*w,T=w*t,_=i*b+r*A+o*T+l*m,R=n*b+a*A+h*T+c*m;u[d]=_,u[d+1]=R,f&&(t<.001?u[d+2]=Math.atan2(a-n,r-i):u[d+2]=Math.atan2(R-(n*v+a*y*2+h*p),_-(i*v+r*y*2+o*p)))}sort(t){const i=this.slot.data.index,n=this.slot.bone;t.skin!=null&&this.sortPathSlot(t,t.skin,i,n),t.data.defaultSkin!=null&&t.data.defaultSkin!==t.skin&&this.sortPathSlot(t,t.data.defaultSkin,i,n),this.sortPath(t,this.slot.pose.attachment,n);const r=this.bones,a=this.bones.length;for(let o=0;o0,o=this.data.y>0,h=this.data.rotate>0||this.data.shearX>0,l=this.data.scaleX>0,c=this.bone;let u=c.bone.data.length,d=this.data.step,f=0;if(i!==ya.none){switch(c.modifyWorld(t),i){case ya.reset:this.reset(t);case ya.update:{const p=Math.max(t.time-this.lastTime,0),m=this.remaining;this.remaining+=p,this.lastTime=t.time;const g=c.worldX,v=c.worldY;if(this._reset)this._reset=!1,this.ux=g,this.uy=v;else{let b=this.remaining,y=n.inertia,w=t.data.referenceScale,A=-1,T=0,_=0,R=this.data.limit*p,P=R*Math.abs(t.scaleY);if(R*=Math.abs(t.scaleX),a||o){if(a){const F=(this.ux-g)*y;this.xOffset+=F>R?R:F<-R?-R:F,this.ux=g}if(o){const F=(this.uy-v)*y;this.yOffset+=F>P?P:F<-P?-P:F,this.uy=v}if(b>=d){const F=this.xOffset,I=this.yOffset;A=n.damping**(60*d),T=d*n.massInverse,_=n.strength;const k=w*n.wind,B=w*n.gravity,D=(k*t.windX+B*t.gravityX)*t.scaleX,U=(k*t.windY+B*t.gravityY)*t.scaleY;do a&&(this.xVelocity+=(D-this.xOffset*_)*T,this.xOffset+=this.xVelocity*d,this.xVelocity*=A),o&&(this.yVelocity-=(U+this.yOffset*_)*T,this.yOffset+=this.yVelocity*d,this.yVelocity*=A),b-=d;while(b>=d);this.xLag=this.xOffset-F,this.yLag=this.yOffset-I}f=Math.max(0,1-b/d),a&&(c.worldX+=(this.xOffset-this.xLag*f)*r*this.data.x),o&&(c.worldY+=(this.yOffset-this.yLag*f)*r*this.data.y)}if(h||l){let F=Math.atan2(c.c,c.a),I=0,k=0,B=0,D=this.cx-c.worldX,U=this.cy-c.worldY;if(D>R?D=R:D<-R&&(D=-R),U>P?U=P:U<-P&&(U=-P),b=this.remaining,h){B=(this.data.rotate+this.data.shearX)*r,f=this.rotateLag*Math.max(0,1-m/d);let L=Math.atan2(U+this.ty,D+this.tx)-F-(this.rotateOffset-f)*B;this.rotateOffset+=(L-Math.ceil(L*Ye.invPI2-.5)*Ye.PI2)*y,L=(this.rotateOffset-f)*B+F,I=Math.cos(L),k=Math.sin(L),l&&(L=u*c.getWorldScaleX(),L>0&&(this.scaleOffset+=(D*I+U*k)*y/L))}else{I=Math.cos(F),k=Math.sin(F);const L=u*c.getWorldScaleX()-this.scaleLag*Math.max(0,1-m/d);L>0&&(this.scaleOffset+=(D*I+U*k)*y/L)}if(b>=d){A===-1&&(A=n.damping**(60*d),T=d*n.massInverse,_=n.strength);const L=n.wind*t.windX+n.gravity*t.gravityX,N=(n.wind*t.windY+n.gravity*t.gravityY)*Dm.yDir,O=this.rotateOffset,X=this.scaleOffset,E=u/w;for(;;)if(b-=d,l&&(this.scaleVelocity+=(L*I-N*k-this.scaleOffset*_)*T,this.scaleOffset+=this.scaleVelocity*d,this.scaleVelocity*=A),h){if(this.rotateVelocity-=((L*k+N*I)*E+this.rotateOffset*_)*T,this.rotateOffset+=this.rotateVelocity*d,this.rotateVelocity*=A,b0){let b=0;this.data.rotate>0&&(b=p*this.data.rotate,m=Math.sin(b),g=Math.cos(b),v=c.b,c.b=g*v-m*c.d,c.d=m*v+g*c.d),b+=p*this.data.shearX,m=Math.sin(b),g=Math.cos(b),v=c.a,c.a=g*v-m*c.c,c.c=m*v+g*c.c}else p*=this.data.rotate,m=Math.sin(p),g=Math.cos(p),v=c.a,c.a=g*v-m*c.c,c.c=m*v+g*c.c,v=c.b,c.b=g*v-m*c.d,c.d=m*v+g*c.d}if(l){let p=1+(this.scaleOffset-this.scaleLag*f)*r*this.data.scaleX;switch(c.a*=p,c.c*=p,this.data.scaleYMode){case hs.Uniform:c.b*=p,c.d*=p;break;case hs.Volume:p=Math.abs(p),p=p>=.7?1/p:4-3.67347*p,c.b*=p,c.d*=p}}i!==ya.pose&&(this.tx=u*c.a,this.ty=u*c.c)}}sort(t){const i=this.bone.bone;t.sortBone(i),t._updateCache.push(this),t.sortReset(i.children),t.constrained(i)}isSourceActive(){return this.bone.bone.active}}class th extends ec{constructor(t){super(t,new Bm);x(this,"_bone",null);x(this,"x",0);x(this,"y",0);x(this,"rotate",0);x(this,"scaleX",0);x(this,"shearX",0);x(this,"limit",0);x(this,"step",0);x(this,"inertiaGlobal",!1);x(this,"strengthGlobal",!1);x(this,"dampingGlobal",!1);x(this,"massGlobal",!1);x(this,"windGlobal",!1);x(this,"gravityGlobal",!1);x(this,"mixGlobal",!1);x(this,"_scaleYMode",hs.None)}set bone(t){this._bone=t}get bone(){if(this._bone)return this._bone;throw new Error("BoneData not set.")}get scaleYMode(){return this._scaleYMode}set scaleYMode(t){if(t==null)throw new Error("scaleYMode cannot be null.");this._scaleYMode=t}create(t){return new Fu(this,t)}}typeof Math.fround>"u"&&(Math.fround=(s=>e=>(s[0]=e,s[0]))(new Float32Array(1)));class Nm{constructor(){x(this,"time",0);x(this,"mix",0)}set(e){this.time=e.time,this.mix=e.mix}}const Ml=class Ml extends Ql{constructor(t,i){super(t,new Nm,new Nm);x(this,"bone",null);if(!i)throw new Error("skeleton cannot be null.");t.bone!=null&&(this.bone=i.bones[t.bone.index])}copy(t){var i=new Ml(this.data,t);return i.pose.set(this.pose),i}update(t,i){const n=this.appliedPose;if(n.mix===0)return;const r=this.data,a=r.animation,o=this.bone;if(o!==null){if(!o.active)return;r.local&&o.appliedPose.validateLocalTransform(t),n.time=r.offset+(r.property.value(t,o.appliedPose,r.local,Ml.offsets)-r.property.offset)*r.scale,r.loop?n.time=a.duration+n.time%a.duration:n.time=Math.max(0,n.time)}const h=t.bones,l=a.bones;for(let c=0,u=a.bones.length;c=n.length&&(n.length=e+1),n[e]||(n[e]={}),n[e][t]=i}addSkin(e){for(let i=0;i= 0.");if(!n)throw new Error("boneData cannot be null.");this.index=t,this.boneData=n}}var Wh;(function(s){s[s.Normal=0]="Normal",s[s.Additive=1]="Additive",s[s.Multiply=2]="Multiply",s[s.Screen=3]="Screen"})(Wh||(Wh={}));class Vm{constructor(){x(this,"mixRotate",0);x(this,"mixX",0);x(this,"mixY",0);x(this,"mixScaleX",0);x(this,"mixScaleY",0);x(this,"mixShearY",0)}set(e){this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY,this.mixScaleX=e.mixScaleX,this.mixScaleY=e.mixScaleY,this.mixShearY=e.mixShearY}}class Xp extends Ql{constructor(t,i){super(t,new Vm,new Vm);x(this,"bones");x(this,"source");if(!i)throw new Error("skeleton cannot be null.");this.bones=[];for(const r of t.bones)this.bones.push(i.bones[r.index].constrainedPose);const n=i.bones[t.source.index];if(n==null)throw new Error("source cannot be null.");this.source=n}copy(t){var i=new Xp(this.data,t);return i.pose.set(this.pose),i}update(t,i){const n=this.appliedPose;if(n.mixRotate===0&&n.mixX===0&&n.mixY===0&&n.mixScaleX===0&&n.mixScaleY===0&&n.mixShearY===0)return;const r=this.data,a=r.localSource,o=r.localTarget,h=r.additive,l=r.clamp,c=r.offsets,u=this.source.appliedPose;a&&u.validateLocalTransform(t);const d=r.properties,f=r.properties.length,p=this.bones;for(let m=0,g=this.bones.length;m0?n[Gt.ROTATION]:-n[Gt.ROTATION]);return o<0&&(o+=360),o}}class yS extends Uo{mix(e){return e.mixRotate}apply(e,t,i,n,r,a){if(r)i.rotation+=(a?n:n-i.rotation)*t.mixRotate;else{const o=e.scaleX,h=e.scaleY,l=1/o,c=1/h,u=i.a*l,d=i.b*l,f=i.c*c,p=i.d*c;n*=Ye.degRad,a||(n-=Math.atan2(f,u)),n>Ye.PI?n-=Ye.PI2:n<-Ye.PI&&(n+=Ye.PI2),n*=t.mixRotate;const m=Math.cos(n),g=Math.sin(n);i.a=(m*u-g*f)*o,i.b=(m*d-g*p)*o,i.c=(g*u+m*f)*h,i.d=(g*d+m*p)*h}}}class $m extends No{value(e,t,i,n){return i?t.x+n[Gt.X]:(n[Gt.X]*t.a+n[Gt.Y]*t.b+t.worldX)/e.scaleX}}class xS extends Uo{mix(e){return e.mixX}apply(e,t,i,n,r,a){r?i.x+=(a?n:n-i.x)*t.mixX:(a||(n-=i.worldX/e.scaleX),i.worldX+=n*t.mixX*e.scaleX)}}class Gm extends No{value(e,t,i,n){return i?t.y+n[Gt.Y]:(n[Gt.X]*t.c+n[Gt.Y]*t.d+t.worldY)/e.scaleY}}class bS extends Uo{mix(e){return e.mixY}apply(e,t,i,n,r,a){r?i.y+=(a?n:n-i.y)*t.mixY:(a||(n-=i.worldY/e.scaleY),i.worldY+=n*t.mixY*e.scaleY)}}class Hm extends No{value(e,t,i,n){if(i)return t.scaleX+n[Gt.SCALEX];const r=t.a/e.scaleX,a=t.c/e.scaleY;return Math.sqrt(r*r+a*a)+n[Gt.SCALEX]}}class wS extends Uo{mix(e){return e.mixScaleX}apply(e,t,i,n,r,a){if(r)a?i.scaleX*=1+(n-1)*t.mixScaleX:i.scaleX!==0&&(i.scaleX+=(n-i.scaleX)*t.mixScaleX);else if(a){const o=1+(n-1)*t.mixScaleX;i.a*=o,i.c*=o}else{let o=i.a/e.scaleX,h=i.c/e.scaleY,l=Math.sqrt(o*o+h*h);l!==0&&(l=1+(n-l)*t.mixScaleX/l,i.a*=l,i.c*=l)}}}class jm extends No{value(e,t,i,n){if(i)return t.scaleY+n[Gt.SCALEY];const r=t.b/e.scaleX,a=t.d/e.scaleY;return Math.sqrt(r*r+a*a)+n[Gt.SCALEY]}}class SS extends Uo{mix(e){return e.mixScaleY}apply(e,t,i,n,r,a){if(r)a?i.scaleY*=1+(n-1)*t.mixScaleY:i.scaleY!==0&&(i.scaleY+=(n-i.scaleY)*t.mixScaleY);else if(a){const o=1+(n-1)*t.mixScaleY;i.b*=o,i.d*=o}else{let o=i.b/e.scaleX,h=i.d/e.scaleY,l=Math.sqrt(o*o+h*h);l!==0&&(l=1+(n-l)*t.mixScaleY/l,i.b*=l,i.d*=l)}}}class Wm extends No{value(e,t,i,n){if(i)return t.shearY+n[Gt.SHEARY];const r=1/e.scaleX,a=1/e.scaleY;return(Math.atan2(t.d*a,t.b*r)-Math.atan2(t.c*a,t.a*r))*Ye.radDeg-90+n[Gt.SHEARY]}}class MS extends Uo{mix(e){return e.mixShearY}apply(e,t,i,n,r,a){if(r)a||(n-=i.shearY),i.shearY+=n*t.mixShearY;else{const o=e.scaleX,h=e.scaleY,l=i.b/o,c=i.d/h,u=Math.atan2(c,l);n=(n+90)*Ye.degRad,a?n-=Ye.PI/2:(n-=u-Math.atan2(i.c/h,i.a/o),n>Ye.PI?n-=Ye.PI2:n<-Ye.PI&&(n+=Ye.PI2)),n=u+n*t.mixShearY;const d=Math.sqrt(l*l+c*c);i.b=Math.cos(n)*d*o,i.d=Math.sin(n)*d*h}}}class rX{constructor(e){x(this,"scale",1);x(this,"attachmentLoader");x(this,"linkedMeshes",[]);this.attachmentLoader=e}readSkeletonData(e){const t=this.scale,i=new gS;i.name="";const n=new DO(e),r=n.readInt32(),a=n.readInt32();i.hash=a===0&&r===0?null:a.toString(16)+r.toString(16),i.version=n.readString(),i.x=n.readFloat(),i.y=n.readFloat(),i.width=n.readFloat(),i.height=n.readFloat(),i.referenceScale=n.readFloat()*t;const o=n.readBoolean();o&&(i.fps=n.readFloat(),i.imagesPath=n.readString(),i.audioPath=n.readString());let h=0;h=n.readInt(!0);for(let p=0;p>5;for(let w=0,A;w>1&1,v.spacingMode=b>>2&3,v.rotateMode=b>>4&3,(b&128)!==0&&(v.offsetRotation=n.readFloat());const y=v.setupPose;y.position=n.readFloat(),v.positionMode===Dn.Fixed&&(y.position*=t),y.spacing=n.readFloat(),(v.spacingMode===Fi.Length||v.spacingMode===Fi.Fixed)&&(y.spacing*=t),y.mixRotate=n.readFloat(),y.mixX=n.readFloat(),y.mixY=n.readFloat(),c.push(v);break}case oB:{const v=new th(m);v.bone=l[n.readInt(!0)];let b=n.readByte();if(v.skinRequired=(b&1)!==0,(b&2)!==0&&(v.x=n.readFloat()),(b&4)!==0&&(v.y=n.readFloat()),(b&8)!==0&&(v.rotate=n.readFloat()),(b&16)!==0){let w=n.readFloat();w<-2?(v.scaleYMode=hs.Volume,w=-2-w):w<0&&(v.scaleYMode=hs.Uniform,w=-1-w),v.scaleX=w}(b&32)!==0&&(v.shearX=n.readFloat()),v.limit=((b&64)!==0?n.readFloat():5e3)*t,v.step=1/n.readUnsignedByte();const y=v.setupPose;y.inertia=n.readFloat(),y.strength=n.readFloat(),y.damping=n.readFloat(),y.massInverse=(b&128)!==0?n.readFloat():1,y.wind=n.readFloat(),y.gravity=n.readFloat(),b=n.readByte(),(b&1)!==0&&(v.inertiaGlobal=!0),(b&2)!==0&&(v.strengthGlobal=!0),(b&4)!==0&&(v.dampingGlobal=!0),(b&8)!==0&&(v.massGlobal=!0),(b&16)!==0&&(v.windGlobal=!0),(b&32)!==0&&(v.gravityGlobal=!0),(b&64)!==0&&(v.mixGlobal=!0),y.mix=(b&128)!==0?n.readFloat():1,c.push(v);break}case lB:{const v=new ba(m),b=n.readByte();if(v.skinRequired=(b&1)!==0,v.loop=(b&2)!==0,v.additive=(b&4)!==0,(b&8)!==0){const y=n.readFloat();o&&(b&64)!==0?v.max=y:v.setupPose.time=y}if((b&16)!==0&&(v.setupPose.mix=(b&32)!==0?n.readFloat():1),(b&64)!==0){v.local=(b&128)!==0,v.bone=l[n.readInt(!0)];const y=n.readFloat();let w=1;switch(n.readByte()){case 0:v.property=new Ym;break;case 1:{w=t,v.property=new $m;break}case 2:{w=t,v.property=new Gm;break}case 3:v.property=new Hm;break;case 4:v.property=new jm;break;case 5:v.property=new Wm;break;default:continue}v.property.offset=y*w,v.offset=n.readFloat(),v.scale=n.readFloat()/w}c.push(v);break}}}const d=this.readSkin(n,i,!0,o);d&&(i.defaultSkin=d,i.skins.push(d));{let p=i.skins.length;for(ct.setArraySize(i.skins,h=p+n.readInt(!0));p0){b=[];for(let _=0;_>4,e.readFloat())}r.push(F);break}}}}}const o=i.slots.length,h=e.readInt(!0);if(h>0){const f=new Gr(h);for(let p=0;p0){const f=new Ul(c);for(let p=0;p>>1^-(i&1)}readStringRef(){const e=this.readInt(!0);return e===0?null:this.strings[e-1]}readString(){let e=this.readInt(!0);switch(e){case 0:return null;case 1:return""}e--;let t="";for(let i=0;i>4){case 12:case 13:t+=String.fromCharCode((n&31)<<6|this.readByte()&63),i+=2;break;case 14:t+=String.fromCharCode((n&15)<<12|(this.readByte()&63)<<6|this.readByte()&63),i+=3;break;default:t+=String.fromCharCode(n),i++}}return t}readFloat(){const e=this.buffer.getFloat32(this.index);return this.index+=4,e}readBoolean(){return this.readByte()!==0}}let NO=class{constructor(e,t,i,n,r,a){x(this,"source");x(this,"skinIndex");x(this,"slotIndex");x(this,"sourceIndex");x(this,"mesh");x(this,"inheritTimelines");this.mesh=e,this.skinIndex=t,this.slotIndex=i,this.sourceIndex=n,this.source=r,this.inheritTimelines=a}};class my{constructor(e=null,t,i=0){x(this,"bones");x(this,"vertices");x(this,"length");this.bones=e,this.vertices=t,this.length=i}}var qn;(function(s){s[s.Region=0]="Region",s[s.BoundingBox=1]="BoundingBox",s[s.Mesh=2]="Mesh",s[s.LinkedMesh=3]="LinkedMesh",s[s.Path=4]="Path",s[s.Point=5]="Point",s[s.Clipping=6]="Clipping"})(qn||(qn={}));function Mi(s,e,t,i){t instanceof ar?UO(s,e,t,i):XO(s,e,t,i)}function UO(s,e,t,i){let n=s.readFloat(),r=s.readFloat()*i;for(let a=0,o=0,h=t.getFrameCount()-1;t.setFrame(a,n,r),a!==h;a++){const l=s.readFloat(),c=s.readFloat()*i;switch(s.readByte()){case _n:t.setStepped(a);break;case Tn:Ot(s,t,o++,a,0,n,l,r,c,i)}n=l,r=c}e.push(t)}function XO(s,e,t,i){let n=s.readFloat(),r=s.readFloat()*i,a=s.readFloat()*i;for(let o=0,h=0,l=t.getFrameCount()-1;t.setFrame(o,n,r,a),o!==l;o++){const c=s.readFloat(),u=s.readFloat()*i,d=s.readFloat()*i;switch(s.readByte()){case _n:t.setStepped(o);break;case Tn:Ot(s,t,h++,o,0,n,c,r,u,i),Ot(s,t,h++,o,1,n,c,a,d,i)}n=c,r=u,a=d}e.push(t)}function py(s,e){const t=s.readInt(!0);if(t===0)return null;const i=new Array(e).fill(-1),n=new Array(e-t);let r=0,a=0;for(let o=0;o=0;o--)i[o]===-1&&(i[o]=n[--a]);return i}function Ot(s,e,t,i,n,r,a,o,h,l){e.setBezier(t,i,n,r,o,s.readFloat(),s.readFloat()*l,s.readFloat(),s.readFloat()*l,a,h)}const VO=0,YO=1,$O=2,GO=3,HO=4,jO=5,WO=6,zO=7,qO=8,KO=9,ZO=10,JO=0,QO=1,eB=2,tB=3,iB=4,sB=5,nB=0,rB=1,aB=2,oB=3,lB=4,cB=0,hB=1,uB=0,dB=1,fB=2,mB=0,pB=1,gB=2,vB=4,yB=5,xB=6,bB=7,wB=8,SB=0,MB=1,_n=1,Tn=2;class _B{constructor(e){x(this,"attachmentLoader");x(this,"scale",1);x(this,"linkedMeshes",[]);this.attachmentLoader=e}readSkeletonData(e){const t=this.scale,i=new gS,n=typeof e=="string"?JSON.parse(e):e,r=n.skeleton;if(r&&(i.hash=r.hash,i.version=r.spine,i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height,i.referenceScale=se(r,"referenceScale",100)*t,i.fps=r.fps,i.imagesPath=r.images??null,i.audioPath=r.audio??null),n.bones)for(let a=0;a0&&l.properties.push(T)}l.offsets[Gt.ROTATION]=se(a,"rotation",0),l.offsets[Gt.X]=se(a,"x",0)*t,l.offsets[Gt.Y]=se(a,"y",0)*t,l.offsets[Gt.SCALEX]=se(a,"scaleX",0),l.offsets[Gt.SCALEY]=se(a,"scaleY",0),l.offsets[Gt.SHEARY]=se(a,"shearY",0);const y=l.setupPose;d&&(y.mixRotate=se(a,"mixRotate",1)),f&&(y.mixX=se(a,"mixX",1)),p&&(y.mixY=se(a,"mixY",y.mixX)),m&&(y.mixScaleX=se(a,"mixScaleX",1)),g&&(y.mixScaleY=se(a,"mixScaleY",y.mixScaleX)),v&&(y.mixShearY=se(a,"mixShearY",1)),i.constraints.push(l);break}case"path":{const l=new eh(o);l.skinRequired=h;for(let f=0;f0){const d=i.findConstraint(l,th);if(!d)throw new Error(`Physics constraint not found: ${l}`);u=i.constraints.indexOf(d)}for(const d in c){const f=c[d];let p=f[0];if(!p)continue;const m=f.length;let g,v=0;if(d==="reset"){const b=new jh(m,u);for(let y=0;p!=null;p=f[y+1],y++)b.setFrame(y,se(p,"time",0));r.push(b);continue}switch(d){case"inertia":g=new nS(m,m,u);break;case"strength":g=new rS(m,m,u);break;case"damping":g=new aS(m,m,u);break;case"mass":g=new oS(m,m,u);break;case"wind":g=new lS(m,m,u);break;case"gravity":g=new cS(m,m,u);break;case"mix":{v=1,g=new hS(m,m,u);break}default:continue}Ss(r,f,g,v,1)}}if(e.slider)for(const l in e.slider){const c=e.slider[l],u=i.findConstraint(l,ba);if(!u)throw new Error(`Slider not found: ${l}`);const d=i.constraints.indexOf(u);for(const f in c){const p=c[f];if(!p[0])continue;const g=p.length;switch(f){case"time":Ss(r,p,new uS(g,g,d),1,1);break;case"mix":Ss(r,p,new dS(g,g,d),1,1);break}}}if(e.attachments)for(const l in e.attachments){const c=e.attachments[l],u=i.findSkin(l);if(!u)throw new Error(`Skin not found: ${l}`);for(const d in c){const f=c[d],p=i.findSlot(d);if(!p)throw new Error(`Attachment slot not found: ${d}`);const m=p.index;for(const g in f){const v=f[g],b=u.getAttachment(m,g);if(!b)throw new Error(`Timeline attachment not found: ${g}`);for(const y in v){const w=v[y];let A=w[0];if(A){if(y==="deform"){const T=b.bones,_=b.vertices,R=T?_.length/3*2:_.length,P=new Jw(w.length,w.length,m,b);let F=se(A,"time",0);for(let I=0,k=0;;I++){let B;const D=se(A,"vertices",null);if(!D)B=T?ct.newFloatArray(R):_;else{B=ct.newFloatArray(R);const O=se(A,"offset",0);if(ct.arrayCopy(D,0,B,O,D.length),n!==1)for(let X=O,E=X+D.length;X=0;l--)r[l]===-1&&(r[l]=a[--h]);return r}function Nt(s,e,t,i,n,r,a,o,h,l){if(s==="stepped")return e.setStepped(i),t;const c=n<<2,u=s[c],d=s[c+1]*l,f=s[c+2],p=s[c+3]*l;return e.setBezier(t,i,n,r,o,u,d,f,p,a,h),t+1}function se(s,e,t){return s[e]!==void 0?s[e]:t}class AB{newRegionAttachment(e,t,i,n){return new Eu(t,i)}newMeshAttachment(e,t,i,n){return new Zl(t,i)}newBoundingBoxAttachment(e,t){return new Qb(t)}newPathAttachment(e,t){return new Nl(t)}newPointAttachment(e,t){return new rw(t)}newClippingAttachment(e,t){return new _o(t)}}class EB{sequence(e){for(let t=0;t!Number.isInteger(c)||c<0||c>=a))throw new Error(`拖尾网格“${e}”的三角形索引越界`);const o=Number(s.hull)||0;if(!Number.isInteger(o)||o<0||o>a)throw new Error(`拖尾网格“${e}”的外轮廓数量无效`);if(Array.isArray(s.edges)&&s.edges.some(c=>!Number.isInteger(c)||c<0||c>=a*2||c%2))throw new Error(`拖尾网格“${e}”的外轮廓边索引越界`);if(n.length===i.length)return;let h=0,l=0;for(;h=t)throw new Error(`拖尾网格“${e}”引用了不存在的骨骼`);if(![p,m,g].every(Number.isFinite)||g<0)throw new Error(`拖尾网格“${e}”包含无效权重数据`);u+=g}if(Math.abs(u-1)>.001)throw new Error(`拖尾网格“${e}”的顶点权重之和不为 1`);l++}if(h!==n.length||l!==a)throw new Error(`拖尾网格“${e}”的顶点数量与 UV 不一致`)}function RB(s,e){var r,a,o,h;const t=Array.isArray(s.bones)?s.bones:[],i=new Map(t.map(l=>[String(l.name||""),l])),n=new Set;for(const l of t){if(l.inherit!=null&&!CB.has(l.inherit))throw new Error(`骨骼“${l.name||""}”的 inherit 值“${l.inherit}”不符合 Spine ${e} JSON 格式`);if(/_particle_\d+_trail_/.test(String(l.name||""))){const c=i.get(String(l.parent||""));if(!c||/_particle_\d+_trail_/.test(String(c.name||"")))throw new Error(`拖尾骨骼“${l.name||""}”必须直接挂在粒子系统骨骼下,不能组成骨骼链`)}}for(const l of Array.isArray(s.skins)?s.skins:[]){const c=(l==null?void 0:l.attachments)||{};for(const u of Object.keys(c))for(const d of Object.keys(c[u]||{})){const f=c[u][d];(f==null?void 0:f.type)==="mesh"&&(IB(f,d,t.length),((r=f.vertices)==null?void 0:r.length)!==((a=f.uvs)==null?void 0:a.length)&&n.add(u))}}for(const l of Object.values(s.animations||{}))for(const c of n){const u=(h=(o=l==null?void 0:l.slots)==null?void 0:o[c])==null?void 0:h.attachment;if(Array.isArray(u)&&u.some(d=>!(d!=null&&d.name)))throw new Error(`加权拖尾插槽“${c}”不能使用空附件,未出现或死亡阶段应将对应骨骼缩放设为 0`)}}function PB(s){var e;if(String(((e=s==null?void 0:s.skeleton)==null?void 0:e.spine)||"")!=="3.8")throw new Error("Spine 3.8 导出的版本标识必须为 3.8");for(const t of s.bones||[])if(t.inherit!=null)throw new Error(`Spine 3.8 骨骼“${t.name||""}”应使用 transform,不能使用 inherit`);for(const t of Object.values(s.animations||{})){for(const n of Object.values(t.slots||{})){if(n.rgba||n.rgba2)throw new Error("Spine 3.8 插槽颜色时间轴必须使用 color / twoColor");for(const r of n.attachment||[])if(!Object.prototype.hasOwnProperty.call(r,"name"))throw new Error("Spine 3.8 附件时间轴的隐藏帧必须显式写入 name: null")}for(const n of Object.values(t.bones||{}))for(const r of n.rotate||[])if(r.value!=null||r.angle==null)throw new Error("Spine 3.8 旋转时间轴必须使用 angle");const i=[t];for(;i.length;){const n=i.pop();if(!(!n||typeof n!="object")){if(!Array.isArray(n)&&Array.isArray(n.curve))throw new Error("Spine 3.8 不支持 4.x 数组曲线格式");i.push(...Object.values(n))}}}}function vy(s,e){var a;const t=JSON.parse(s),i=Ph((a=t==null?void 0:t.skeleton)==null?void 0:a.spine);if(!i)throw new Error(`导出版本不受支持,仅支持 Spine ${Mm()}`);if(e&&i!==e)throw new Error(`导出版本不一致:设置为 Spine ${e},JSON 标记为 Spine ${i}`);RB(t,i),i==="3.8"&&PB(t);const n=i==="3.8"?yw(JSON.parse(JSON.stringify(t))):t,r=i==="4.3"?new _B(new EB).readSkeletonData(n):new Dh(new AB).readSkeletonData(n);if(!r.bones.length)throw new Error("导出结果缺少骨骼");return{version:i,bones:r.bones.length,slots:r.slots.length,animations:r.animations.length}}const _S="http://127.0.0.1:27843";class zh extends Error{constructor(t,i="CONNECTOR_ERROR",n){super(t);x(this,"code");x(this,"pairUrl");this.name="SpineConnectorError",this.code=i,this.pairUrl=n}}function zm(s,e){return String(s||"").trim().replace(/[\\/:*?"<>|]+/g,"_").replace(/^\.+/,"")||e}function kB(s,e){const t=/\.([a-z0-9]{2,5})$/i.exec(s);return t?`.${t[1].toLowerCase()}`:e.includes("jpeg")?".jpg":e.includes("webp")?".webp":e.includes("gif")?".gif":".png"}function FB(s,e,t){const i=String(s||"").replace(/\\/g,"/").split("/").filter(Boolean).map(r=>zm(r,"images")),n=zm(e.replace(/\.[^./\\]+$/,""),"image");return[...i,`${n}${kB(e,t)}`].join("/")}async function Ef(s,e,t){if(!s)return null;const i=await fetch(s);if(!i.ok)throw new Error(`无法读取导出图片:${t}`);const n=await i.blob(),r=new Uint8Array(await n.arrayBuffer());let a="";const o=32768;for(let h=0;ha.finally(()=>{i++,e==null||e(i,t.length)});for(const a of s.filter(o=>o.visible!==!1)){for(const o of a.config.imageResources)if(o.imageMode==="sequence"&&o.sequenceFrames.length)for(const h of o.sequenceFrames)t.push(n(Ef(h.previewUrl,o.textureFolder,h.name||o.textureName)));else t.push(n(Ef(o.previewUrl,o.textureFolder,o.textureName)));if(a.config.trail)for(const o of a.config.trailResources)t.push(n(Ef(o.previewUrl,"",o.textureName)))}const r=new Map;for(const a of await Promise.all(t))a&&!r.has(a.path)&&r.set(a.path,a);return[...r.values()]}async function OB(){try{const s=await fetch(`${_S}/v1/health`,{cache:"no-store"});if(!s.ok)throw new Error(`HTTP ${s.status}`);return{available:!0,...await s.json()}}catch(s){return{available:!1,authorized:!1,error:s instanceof Error?s.message:String(s)}}}async function BB(s,e){const t=await TS(s.systems,(n,r)=>{e==null||e({phase:"images",progress:r?n/r:1})}),i=JSON.stringify({schemaVersion:1,projectName:s.projectName,spineVersion:s.spineVersion,skeletonJson:s.skeletonJson,images:t});return new Promise((n,r)=>{const a=new XMLHttpRequest;a.open("POST",`${_S}/v1/convert`),a.responseType="blob",a.setRequestHeader("Content-Type","application/json"),a.upload.onprogress=o=>{e==null||e({phase:"upload",progress:o.lengthComputable&&o.total>0?o.loaded/o.total:null})},a.upload.onloadend=()=>e==null?void 0:e({phase:"processing",progress:null}),a.onprogress=o=>{e==null||e({phase:"download",progress:o.lengthComputable&&o.total>0?o.loaded/o.total:null})},a.onerror=()=>r(new zh("未检测到本地 Spine 连接器,请先启动连接器","CONNECTOR_OFFLINE")),a.onload=async()=>{const o=a.response;if(a.status<200||a.status>=300){let c={};try{c=JSON.parse(await o.text())}catch{}r(new zh(c.message||`Spine 连接器返回错误:HTTP ${a.status}`,c.code,c.pairUrl));return}const h=a.getResponseHeader("X-Spine-File-Name");let l=`${zm(s.projectName,"SpineParticle")}.zip`;if(h)try{l=decodeURIComponent(h)}catch{}n({blob:o,fileName:l,spineEditorVersion:a.getResponseHeader("X-Spine-Editor-Version")||s.spineVersion,imageCount:t.length})},a.send(i)})}function LB(s,e){const t=URL.createObjectURL(s),i=document.createElement("a");i.href=t,i.download=/\.zip$/i.test(e)?e:`${e}.zip`,i.style.display="none",document.body.appendChild(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(t),1e3)}const DB=Array.from({length:256},(s,e)=>{let t=e;for(let i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;return t>>>0});function NB(s){let e=4294967295;for(const t of s)e=DB[(e^t)&255]^e>>>8;return(e^4294967295)>>>0}function UB(s){const e=String(s||"").replace(/\\/g,"/").split("/").filter(t=>t&&t!==".");if(!e.length||e.some(t=>t===".."))throw new Error("ZIP 文件路径无效");return e.join("/")}function XB(s=new Date){const e=Math.max(1980,s.getFullYear());return{time:s.getHours()<<11|s.getMinutes()<<5|Math.floor(s.getSeconds()/2),date:e-1980<<9|s.getMonth()+1<<5|s.getDate()}}function Cf(s){const e=new Uint8Array(s);return{bytes:e,view:new DataView(e.buffer)}}function yy(s){const e=new Uint8Array(s.reduce((i,n)=>i+n.length,0));let t=0;for(const i of s)e.set(i,t),t+=i.length;return e}function VB(s){const e=new TextEncoder,t=[],i=[],n=XB();let r=0;for(const h of s){const l=e.encode(UB(h.name)),c=NB(h.data),u=Cf(30);u.view.setUint32(0,67324752,!0),u.view.setUint16(4,20,!0),u.view.setUint16(6,2048,!0),u.view.setUint16(10,n.time,!0),u.view.setUint16(12,n.date,!0),u.view.setUint32(14,c,!0),u.view.setUint32(18,h.data.length,!0),u.view.setUint32(22,h.data.length,!0),u.view.setUint16(26,l.length,!0),t.push(u.bytes,l,h.data);const d=Cf(46);d.view.setUint32(0,33639248,!0),d.view.setUint16(4,20,!0),d.view.setUint16(6,20,!0),d.view.setUint16(8,2048,!0),d.view.setUint16(12,n.time,!0),d.view.setUint16(14,n.date,!0),d.view.setUint32(16,c,!0),d.view.setUint32(20,h.data.length,!0),d.view.setUint32(24,h.data.length,!0),d.view.setUint16(28,l.length,!0),d.view.setUint32(42,r,!0),i.push(d.bytes,l),r+=u.bytes.length+l.length+h.data.length}const a=yy(i),o=Cf(22);return o.view.setUint32(0,101010256,!0),o.view.setUint16(8,s.length,!0),o.view.setUint16(10,s.length,!0),o.view.setUint32(12,a.length,!0),o.view.setUint32(16,r,!0),new Blob([yy([...t,a,o.bytes])],{type:"application/zip"})}function YB(s){const e=atob(s),t=new Uint8Array(e.length);for(let i=0;ii===".."||/^[a-z]+:/i.test(i))?"images":t.join("/")}function GB(s){return String(s||"SpineParticle").replace(/\.json$/i,"").replace(/[\\/:*?"<>|]+/g,"_").replace(/^\.+/,"")||"SpineParticle"}async function HB(s){const e=await TS(s.systems);if(!e.length)throw new Error("当前可见粒子系统没有可导出的图片");const t=$B(s.imagesPath);return{blob:VB(e.map(n=>({name:`${t}/${n.path}`,data:YB(n.dataBase64)}))),imageCount:e.length,folder:t}}function jB(s,e){const t=`${GB(e)}-images.zip`,i=URL.createObjectURL(s),n=document.createElement("a");return n.href=i,n.download=t,n.style.display="none",document.body.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(i),1e3),t}const WB={class:"panel"},zB={class:"panel-scroll"},qB={class:"group config-management"},KB={class:"caret"},ZB={class:"group-body config-management-body"},JB={class:"config-toolbar"},QB=["disabled"],eL={value:""},tL=["value"],iL={class:"group"},sL={class:"caret"},nL={class:"scene-actions"},rL=["disabled"],aL={class:"group-body"},oL={class:"tree scene-tree"},lL=["onClick"],cL={class:"tlabel"},hL=["title","aria-label","onClick"],uL={viewBox:"0 0 24 24","aria-hidden":"true"},dL={key:0,class:"eye-slash",d:"M4 4l16 16"},fL=["onClick"],mL=["onClick"],pL={class:"tlabel"},gL=["title","aria-label","onClick"],vL={viewBox:"0 0 24 24","aria-hidden":"true"},yL={key:0,class:"eye-slash",d:"M4 4l16 16"},xL=["onClick"],bL=["onClick"],wL={class:"tlabel"},SL=["title","aria-label","onClick"],ML={viewBox:"0 0 24 24","aria-hidden":"true"},_L={key:0,class:"eye-slash",d:"M4 4l16 16"},TL=["onClick"],AL=["onClick"],EL={class:"tlabel"},CL=["title","aria-label","onClick"],IL={viewBox:"0 0 24 24","aria-hidden":"true"},RL={key:0,class:"eye-slash",d:"M4 4l16 16"},PL=["onClick"],kL={key:0,class:"empty"},FL={class:"row"},OL={class:"seed-row scene-seed"},BL={class:"field-block"},LL={class:"field-grid"},DL={class:"field-block"},NL={class:"field-block check-field"},UL={class:"field-grid"},XL={class:"compact-field"},VL={class:"compact-field"},YL={class:"field-grid"},$L={class:"compact-field"},GL={class:"compact-field"},HL={key:1,class:"field-grid"},jL={class:"compact-field"},WL={class:"compact-field"},zL={key:2,class:"field-grid"},qL={class:"compact-field"},KL={class:"compact-field"},ZL={class:"field-block"},JL={key:4,class:"field-grid"},QL={class:"compact-field"},eD={class:"compact-field"},tD={class:"collider-follow-section"},iD={class:"follow-path"},sD={class:"field-block"},nD=["value"],rD={class:"field-grid"},aD={class:"compact-field"},oD={class:"compact-field"},lD={class:"follow-path"},cD={class:"field-block"},hD={class:"field-grid"},uD={class:"compact-field"},dD={class:"compact-field"},fD={class:"field-grid"},mD={class:"compact-field"},pD={class:"compact-field"},gD={class:"setting-line"},vD={class:"setting-line"},yD={class:"field-block"},xD={key:4,class:"panel-hint"},bD={class:"group"},wD={class:"caret"},SD={class:"group-body"},MD={class:"segs"},_D={class:"segs stream-behavior-segs"},TD={key:2,class:"stream-loop-options"},AD={class:"loop-section-row"},ED={class:"switch-row"},CD=["checked"],ID={key:0,class:"loop-duration-control"},RD={class:"switch-row loop-duration-toggle"},PD=["checked"],kD={class:"loop-section-duration"},FD=["value"],OD={key:1},BD={key:2,class:"loop-auto-duration"},LD={class:"loop-section-row"},DD={class:"switch-row"},ND=["checked"],UD={key:0,class:"loop-duration-control"},XD={class:"switch-row loop-duration-toggle"},VD=["checked"],YD={class:"loop-section-duration"},$D=["value"],GD={key:1},HD={key:2,class:"loop-auto-duration"},jD={key:3,class:"modifier-hint stream-loop-hint"},WD={class:"group"},zD={class:"caret"},qD={class:"group-body"},KD={class:"row"},ZD={class:"row"},JD=["value","disabled"],QD={key:0,class:"row"},eN={class:"row"},tN={key:0,value:"radial"},iN={key:1,value:"path-normal"},sN={key:2,value:"path-tangent"},nN={class:"group"},rN={class:"caret"},aN={class:"group-body attr-body"},oN={class:"attr-axis-head"},lN={class:"axis-modes"},cN={class:"life-item"},hN={class:"switch-row"},uN={class:"life-item"},dN={class:"switch-row"},fN={class:"axis-modes life-axis"},mN={class:"life-item"},pN={class:"switch-row"},gN={class:"group"},vN={class:"caret"},yN={class:"group-body"},xN={class:"seg"},bN={class:"row"},wN={class:"curve-wrap"},SN={class:"row"},MN=["onUpdate:modelValue"],_N=["onUpdate:modelValue"],TN={class:"row resource-color-row"},AN=["onUpdate:modelValue"],EN=["onUpdate:modelValue"],CN={key:0,class:"row resource-color-picker"},IN=["onUpdate:modelValue"],RN=["value","onChange","onKeydown"],PN={key:0,class:"random-color-hint"},kN={class:"resource-alpha-head"},FN={class:"alpha-modes"},ON=["onClick"],BN=["onClick"],LN=["onClick"],DN={class:"row"},NN=["onUpdate:modelValue"],UN={class:"resource-alpha-curve"},XN={class:"group"},VN={class:"caret"},YN={class:"group-body"},$N={class:"modifier-item"},GN={class:"switch-row modifier-switch"},HN={key:0,class:"modifier-params"},jN={class:"modifier-item"},WN={class:"switch-row modifier-switch"},zN={key:0,class:"modifier-params gravity-params"},qN={class:"modifier-mode-row"},KN={class:"modifier-item"},ZN={class:"switch-row modifier-switch"},JN={key:0,class:"modifier-params gravity-params"},QN={class:"modifier-mode-row"},e5={class:"modifier-item"},t5={class:"switch-row modifier-switch"},i5={key:0,class:"modifier-params"},s5={class:"row"},n5={class:"modifier-item"},r5={class:"switch-row modifier-switch"},a5={key:0,class:"modifier-params"},o5={class:"row"},l5={class:"row"},c5={class:"modifier-item"},h5={class:"switch-row modifier-switch"},u5={key:0,class:"modifier-params trail-params"},d5={class:"row"},f5=["onUpdate:modelValue"],m5={class:"row"},p5=["onUpdate:modelValue"],g5={class:"row"},v5=["onUpdate:modelValue"],y5={class:"switch-row trail-sub-switch"},x5=["onUpdate:modelValue"],b5={class:"switch-row trail-sub-switch"},w5=["onUpdate:modelValue"],S5={class:"trail-mode-head"},M5={class:"alpha-modes"},_5=["onClick"],T5=["onClick"],A5=["onClick"],E5={class:"row"},C5=["onUpdate:modelValue"],I5={key:6,class:"row trail-fixed-color"},R5=["onUpdate:modelValue"],P5=["value","onChange","onKeydown"],k5={class:"trail-mode-head"},F5={class:"alpha-modes"},O5=["onClick"],B5=["onClick"],L5=["onClick"],D5={class:"trail-grid-row"},N5={class:"modifier-item"},U5={class:"switch-row modifier-switch"},X5=["disabled"],V5={key:0,class:"modifier-params emitter-follow-params"},Y5={class:"field-block"},$5=["value"],G5={key:0,value:"bone"},H5={class:"field-block"},j5=["value"],W5={class:"field-block"},z5={class:"field-grid follow-grid"},q5={class:"compact-field"},K5={class:"compact-field"},Z5={class:"field-block"},J5={key:0,class:"bone-follow-target"},Q5={key:1,class:"bone-follow-missing"},e8={class:"field-block"},t8={class:"field-grid follow-grid"},i8={class:"compact-field"},s8={class:"compact-field"},n8={class:"bone-follow-transform-grid"},r8={class:"compact-field"},a8={class:"compact-field"},o8={class:"compact-field"},l8={class:"modifier-item"},c8={class:"switch-row modifier-switch"},h8={key:0,class:"modifier-params collision-filter-params"},u8={class:"collision-filter-tags"},d8=["title"],f8=["aria-label","onClick"],m8=["disabled","title"],p8={key:0,class:"collision-filter-empty"},g8={key:1,class:"collision-filter-picker"},v8=["onClick"],y8={class:"group"},x8={class:"caret"},b8={class:"group-body export-settings"},w8={class:"export-field"},S8={class:"export-field"},M8={class:"export-field"},_8={key:0,class:"export-help"},T8={class:"export-fps-row"},A8={class:"export-field export-fps-field"},E8={class:"export-checkbox"},C8={class:"export-switches"},I8={class:"switch-row export-switch"},R8={class:"switch-row export-switch"},P8={class:"switch-row export-switch export-switch-last"},k8={class:"spine-export-actions"},F8=["disabled","title"],O8=["disabled"],B8=["disabled","title"],L8={key:0},D8=["href"],N8=["href"],U8=$s({__name:"ParticlePanel",setup(s){const e=Kl();e.settings.exportSettings=mb(e.settings.exportSettings);const t=vt(()=>e.settings.exportSettings),i=lt(null),n=lt(""),r=lt([]),a=lt(!1),o=lt(""),h=lt(!1),l=lt(!1),c=lt(null),u=lt(""),d=lt(!1),f=lt(null),p=lt(""),m=lt(""),g=vt(()=>{const $=f.value;return $?$.available?$.spineFound?$.authorized?"连接器可用 · Spine 已就绪":"连接器已启动,当前网站尚未授权":"连接器已启动,但未找到 Spine":"本地 Spine 连接器未启动":"正在检测本地 Spine 连接器…"}),v=vt(()=>{var $,S,C,Q,Re,mt;return{ready:!!(($=f.value)!=null&&$.available)&&!!((S=f.value)!=null&&S.spineFound)&&!!((C=f.value)!=null&&C.authorized),warning:!!((Q=f.value)!=null&&Q.available)&&(!((Re=f.value)!=null&&Re.spineFound)||!((mt=f.value)!=null&&mt.authorized))}}),b=vt(()=>{var $,S,C;return!!(($=f.value)!=null&&$.available)&&!!((S=f.value)!=null&&S.spineFound)&&!!((C=f.value)!=null&&C.authorized)}),y=vt(()=>{const $=f.value;return!($!=null&&$.available)||!$.spineFound||$.authorized||typeof window>"u"?"":`http://127.0.0.1:27843/pair?origin=${encodeURIComponent(window.location.origin)}`}),w=vt(()=>{const $=f.value;return $?$.available?$.spineFound?$.authorized?"":"未授权":"未找到 Spine":"未启动":"检测中"}),A=vt(()=>l.value?"正在重新计算并生成 Spine 工程":w.value?`暂不可用:${w.value}`:`调用本机 Spine 自动生成 ${t.value.spineVersion} 工程`);function T($){return $==="跟随导出"?t.value.keyframeCurve==="bezier"?"bezier":"linear":$==="贝塞尔"?"bezier":"linear"}e.systems.length||e.addSystem();function _(){_w(e),h.value=!1,o.value="配置已保存到本地"}async function R($){var Q;const S=$.target,C=(Q=S.files)==null?void 0:Q[0];if(C){o.value="正在加载配置…",h.value=!1;try{await XP(e,C),o.value=`已加载:${C.name}`}catch(Re){h.value=!0,o.value=Re instanceof Error?Re.message:String(Re)}finally{S.value=""}}}async function P(){try{const $=await fetch(`/Preset/index.json?t=${Date.now()}`,{cache:"no-store"});if(!$.ok)throw new Error("无法读取预设列表");const S=await $.json();r.value=Array.isArray(S)?S.filter(C=>!!C&&typeof C.name=="string"&&typeof C.file=="string"):[]}catch{r.value=[]}}async function F(){const $=n.value;if(!$)return;a.value=!0,h.value=!1,o.value="正在加载预设…";const S=qv("加载预设",`正在下载 ${$}…`);try{await S.paint();const C=await fetch(`/Preset/${encodeURIComponent($)}`,{cache:"no-store"});if(!C.ok)throw new Error(`无法读取预设:${$}`);const Q=await ZF(C,Re=>{S.update(Re==null?null:Re*55,`正在下载 ${$}…`)});S.update(58,"正在解析预设配置…"),S.update(70,"正在解析并恢复预设资源…"),await Aw(e,Q),o.value=`已加载预设:${$.replace(/\.json$/i,"")}`,await S.finish("预设加载完成")}catch(C){h.value=!0;const Q=C instanceof Error?C.message:String(C);o.value=`${Q},请检查预设文件命名`,await S.fail(Q)}finally{a.value=!1,n.value=""}}Kr(()=>{P(),B(),I=window.setInterval(B,3e3)});let I,k=0;$l(()=>{I!==void 0&&window.clearInterval(I)});async function B(){const $=++k,S=await OB();if($!==k)return;f.value=S;const C=m.value;(C==="CONNECTOR_OFFLINE"?S.available:C==="SPINE_NOT_FOUND"?S.available&&S.spineFound:C==="ORIGIN_NOT_ALLOWED"?S.available&&S.spineFound&&S.authorized:!!C&&S.available&&S.spineFound&&S.authorized)&&(m.value="",p.value="",d.value&&(d.value=!1,u.value=""))}function D(){return new Promise($=>requestAnimationFrame(()=>$()))}async function U($){e.timeline.playing=!1,e.timeline.frame=0,e.timeline.recorded=!1;for(const Q of e.systems)Q.frames=void 0;e.recalcTotalFrames(),await D(),e.timeline.playing=!0;const S=e.timeline.totalFrames/Math.max(1,e.timeline.fps)*1e3,C=performance.now()+Math.max(8e3,S*2.5+3e3);for(;!e.timeline.recorded;){if(performance.now()>C)throw new Error("重新计算动画超时,请确认页面仍在运行后重试");$==null||$(Math.min(.98,e.timeline.frame/Math.max(1,e.timeline.totalFrames-1))),await new Promise(Q=>setTimeout(Q,50))}$==null||$(1)}async function L(){if(!l.value){l.value=!0,c.value="json",d.value=!1,m.value="",p.value="",u.value="正在重新计算粒子动画…";try{await U();const $=ry({systems:e.systems,timeline:e.timeline,settings:t.value});vy($.text,t.value.spineVersion),MO($,t.value.fileName);const S=$.warnings.length?`;${$.warnings.length} 条资源提示(缺图仍已导出)`:"";u.value=`已导出 Spine ${t.value.spineVersion}:${$.particleSystemCount} 个粒子系统、${$.animationCount} 个动画、${$.boneCount} 根骨骼${S}`}catch($){d.value=!0,u.value=$ instanceof Error?$.message:String($)}finally{l.value=!1,c.value=null}}}async function N(){if(l.value)return;l.value=!0,c.value="spine",d.value=!1,m.value="",p.value="",u.value="正在重新计算粒子动画…";const $=qv("导出 Spine 包","正在重新计算粒子动画…");try{await $.paint(),await U(Re=>$.update(Re*18,"正在重新计算粒子动画…")),$.update(20,"正在生成 Spine JSON…");const S=ry({systems:e.systems,timeline:e.timeline,settings:t.value});vy(S.text,t.value.spineVersion),u.value="正在整理图片并调用本机 Spine…";const C=t.value.fileName.replace(/\.json$/i,"")||"SpineParticle",Q=await BB({projectName:C,spineVersion:t.value.spineVersion,skeletonJson:S.text,systems:e.systems},({phase:Re,progress:mt})=>{Re==="images"?$.update(mt==null?null:22+mt*18,"正在整理工程图片…"):Re==="upload"?$.update(mt==null?null:40+mt*30,"正在上传数据到 Spine 连接器…"):Re==="processing"?$.update(null,"Spine 正在转换工程,请稍候…"):$.update(mt==null?null:82+mt*16,"正在下载生成的 Spine 工程包…")});$.update(99,"正在交给浏览器下载…"),LB(Q.blob,Q.fileName),u.value=`已生成 ${Q.fileName}:包含 .spine 工程和 ${Q.imageCount} 张图片,Spine ${Q.spineEditorVersion}`,await B(),await $.finish("Spine 工程包已开始下载")}catch(S){const C=S instanceof Error?S.message:String(S);d.value=!0,m.value=S instanceof zh?S.code:"",S instanceof zh&&S.pairUrl&&(p.value=S.pairUrl),u.value=C,await B(),await $.fail(C)}finally{l.value=!1,c.value=null}}async function O(){if(!l.value){l.value=!0,c.value="images",d.value=!1,m.value="",p.value="",u.value="正在整理当前粒子系统使用的图片…";try{const $=await HB({systems:e.systems,imagesPath:t.value.imagesPath}),S=jB($.blob,t.value.fileName);u.value=`已生成 ${S}:${$.folder}/ 内包含 ${$.imageCount} 张图片`}catch($){d.value=!0,u.value=$ instanceof Error?$.message:String($)}finally{l.value=!1,c.value=null}}}const X=vt(()=>{const $=e.systems.findIndex(S=>S.id===e.activeId);return $>=0?$:0}),E=vt(()=>e.systems[X.value]||null),V=vt(()=>E.value?pb(E.value.config,e.timeline.fps):30),q=vt(()=>{var S;const $=(S=E.value)==null?void 0:S.config;return $?Math.max(1,Math.ceil(Number($.loopDurationFrames)||1)):1}),W=vt(()=>e.activeObjectType),J=vt(()=>e.activeObjectType==="collision"&&e.colliders.find($=>$.id===e.activeObjectId)||null),K=vt(()=>e.activeObjectType==="path"&&e.paths.find($=>$.id===e.activeObjectId)||null),fe=vt(()=>e.activeObjectType==="spine"&&e.spines.find($=>$.id===e.activeObjectId)||null),me=vt(()=>e.activeObjectType==="particle"?e.systems.some($=>$.id===e.activeObjectId):e.activeObjectType==="collision"?e.colliders.some($=>$.id===e.activeObjectId):e.activeObjectType==="path"?e.paths.some($=>$.id===e.activeObjectId):e.spines.some($=>$.id===e.activeObjectId)),we=vt(()=>{const $=e.spines.find(S=>S.selectedBone&&S.bones.some(C=>C.name===S.selectedBone));return $?{spine:$,boneName:$.selectedBone}:null}),Ee=vt(()=>{var C;const $=(C=E.value)==null?void 0:C.config;if(!$||$.emitterFollowMode!=="bone")return null;const S=e.spines.find(Q=>Q.id===$.emitterFollowSpineId);return!S||!S.bones.some(Q=>Q.name===$.emitterFollowBoneName)?null:{spine:S,boneName:$.emitterFollowBoneName}}),pe=lt(!1),Ae=vt(()=>{var S;const $=new Set(((S=E.value)==null?void 0:S.config.collisionColliderIds)||[]);return e.colliders.filter(C=>$.has(C.id))}),G=vt(()=>{var S;const $=new Set(((S=E.value)==null?void 0:S.config.collisionColliderIds)||[]);return e.colliders.filter(C=>!$.has(C.id))});fs(()=>{var $,S;return[($=E.value)==null?void 0:$.id,(S=E.value)==null?void 0:S.config.collision]},()=>{pe.value=!1});function Z($){var C;const S=(C=E.value)==null?void 0:C.config;!S||S.collisionColliderIds.includes($)||(S.collisionColliderIds.push($),pe.value=!1)}function z($){var C;const S=(C=E.value)==null?void 0:C.config;S&&(S.collisionColliderIds=S.collisionColliderIds.filter(Q=>Q!==$))}Jo(()=>{for(const $ of e.systems)$.visible==null&&($.visible=!0);for(const $ of e.colliders)$.visible==null&&($.visible=!0);for(const $ of e.paths)$.visible==null&&($.visible=!0);for(const $ of e.spines)$.visible==null&&($.visible=!0)}),Jo(()=>{if(!E.value)return;const $=Wr(E.value.config);$.lifeMode==="curve"&&($.lifeMode="random"),$.speedMode==="curve"&&($.speedMode="random"),$.scaleMode==="curve"&&($.scaleMode="random"),$.initialRotationMode==="curve"&&($.initialRotationMode="random"),$.mode==="stream"&&!($.duration>0)&&($.duration=1),$.streamBehavior==="loop"&&($.emitterFollow||$.emitterFollowMode!=="none")&&st($)}),Jo(()=>{const $=new Set(e.colliders.map(S=>S.id));for(const S of e.systems){const C=Wr(S.config),Q=C.collisionColliderIds.filter(ut=>$.has(ut));if(Q.length!==C.collisionColliderIds.length&&(C.collisionColliderIds=Q),C.spawnPathId>0&&!e.paths.some(ut=>ut.id===C.spawnPathId)&&(C.spawnPathId=0,(C.emissionAngleMode==="path-normal"||C.emissionAngleMode==="path-tangent")&&(C.emissionAngleMode="fixed")),C.emitterFollowMode!=="bone")continue;const Re=e.spines.find(ut=>ut.id===C.emitterFollowSpineId);!!(Re!=null&&Re.bones.some(ut=>ut.name===C.emitterFollowBoneName))||(C.emitterFollowMode="none",C.emitterFollowSpineId=0,C.emitterFollowBoneName="")}}),Jo(()=>{for(const $ of e.colliders)$.followPathId==null&&($.followPathId=0),$.followDuration>0||($.followDuration=2),$.followPathRotation==null&&($.followPathRotation=!1),["跟随导出","线性","贝塞尔"].includes($.followCurveMode)||($.followCurveMode="跟随导出"),(!Array.isArray($.followCurve)||$.followCurve.length<2)&&($.followCurve=[{x:0,y:0},{x:1,y:1}])});const j=[{x:0,y:0},{x:1,y:1}],te=[{x:0,y:1},{x:1,y:1}],he=[{x:0,y:0},{x:.2,y:1},{x:.8,y:1},{x:1,y:0}],xe=[{x:0,y:0},{x:.1,y:1},{x:.9,y:1},{x:1,y:0}],oe=[{x:0,y:1},{x:1,y:1}],ge=[{x:0,y:1},{x:1,y:1}],le=Da({config:!0,scene:!1,emitMode:!0,shape:!0,attr:!0,look:!0,mods:!0,export:!1});function Oe($){le[$]=!le[$]}function Fe($){var C;const S=(C=E.value)==null?void 0:C.config;S&&(S.mode=$,$==="stream"&&!(S.duration>0)&&(S.duration=1))}function Be($){var Q;const S=(Q=E.value)==null?void 0:Q.config;if(!S)return;const C=Math.min(1800,Math.max(1,Math.ceil(Number($)||1)));S.loopDurationFrames=C}function st($){const S=Dl();$.emitterFollow=!1,$.emitterFollowMode="none",$.emitterFollowPathId=S.emitterFollowPathId,$.emitterFollowSpineId=S.emitterFollowSpineId,$.emitterFollowBoneName=S.emitterFollowBoneName,$.emitterFollowBoneOffsetX=S.emitterFollowBoneOffsetX,$.emitterFollowBoneOffsetY=S.emitterFollowBoneOffsetY,$.emitterFollowBoneRotation=S.emitterFollowBoneRotation,$.emitterFollowBoneScaleX=S.emitterFollowBoneScaleX,$.emitterFollowBoneScaleY=S.emitterFollowBoneScaleY,$.emitterAngleMode=S.emitterAngleMode,$.emitterFollowCurve=S.emitterFollowCurve.map(C=>({...C})),$.emitterFollowDuration=S.emitterFollowDuration,$.emitterFollowSpace=S.emitterFollowSpace,$.emitterFollowDirection=S.emitterFollowDirection,$.emitterFollowOffset=S.emitterFollowOffset}function St($){var Re;const S=(Re=E.value)==null?void 0:Re.config;if(!S||S.streamBehavior===$)return;const C=$==="loop",Q=C?"进入循环持续模式后,粒子跟随设置会失效并恢复默认值。是否继续?":"退出循环持续模式后,粒子跟随设置会失效并恢复默认值。是否继续?";window.confirm(Q)&&(st(S),S.streamBehavior=$,C||(S.generateLoopStartAnimation=!1,S.generateLoopEndAnimation=!1))}function At($,S){var Re;const C=(Re=E.value)==null?void 0:Re.config;if(!C)return;const Q=S.target.checked;$==="start"?C.generateLoopStartAnimation=Q:C.generateLoopEndAnimation=Q}function Et($,S){var Re;const C=(Re=E.value)==null?void 0:Re.config;if(!C)return;const Q=Math.min(1800,Math.max(1,Math.ceil(Number(S.target.value)||30)));$==="start"?C.loopStartDurationFrames=Q:C.loopEndDurationFrames=Q}function It($,S){var Re;const C=(Re=E.value)==null?void 0:Re.config;if(!C)return;const Q=S.target.checked;$==="start"?C.loopStartUseCustomDuration=Q:C.loopEndUseCustomDuration=Q}function Kt($,S){const C=$.target.value;if(S.emitterFollowMode=C,C!=="bone"){S.emitterFollowSpineId=0,S.emitterFollowBoneName="";return}Ti(S)}function Ti($){const S=we.value;if(!S){$.emitterFollowMode="none",$.emitterFollowSpineId=0,$.emitterFollowBoneName="";return}$.emitterFollowMode="bone",$.emitterFollowSpineId=S.spine.id,$.emitterFollowBoneName=S.boneName}const Wi={emitMode:["mode","rate","streamBehavior","loopDurationFrames","generateLoopStartAnimation","loopStartUseCustomDuration","loopStartDurationFrames","generateLoopEndAnimation","loopEndUseCustomDuration","loopEndDurationFrames","burstCount","burstLoop","delay","duration"],shape:["shape","shapeRangeVersion","innerRadius","outerRadius","innerRectW","innerRectH","outerRectW","outerRectH","spawnPathId","spawnPathDistribution","radius","rectW","rectH","emissionAngleMode","direction","spread","coneDirection","coneAngle"],attr:["lifeMin","lifeMax","lifeMode","lifeCurve","speedMin","speedMax","speedMode","speedCurve","scaleMin","scaleMax","scaleMode","scaleAxisMode","scaleYMin","scaleYMax","scaleCurve","scaleYCurve","scaleEndRatio","initialRotationMode","initialRotationMin","initialRotationMax","initialRotationCurve","rotationSpeedMin","rotationSpeedMax","speedOverLifeEnabled","speedOverLifeMode","speedOverLifeMin","speedOverLifeMax","speedOverLifeCurve","scaleOverLifeEnabled","scaleOverLifeMode","scaleOverLifeAxisMode","scaleOverLifeMin","scaleOverLifeMax","scaleYOverLifeMin","scaleYOverLifeMax","scaleOverLifeCurve","scaleYOverLifeCurve","rotationOverLifeEnabled","rotationOverLifeMode","rotationOverLifeCurve"],look:["texture","imageResources","imageWeightVersion","alpha","alphaEnd","colorStart","colorEnd","colorOverLife","blend","alphaMode","curveMode","alphaCurve","textureName","textureFolder","alphaScale","anchorX","anchorY","independentAlpha"],mods:["noise","noiseAmt","noiseRange","noiseSpeed","useGravity","gravity","gravityMode","gravityMin","gravityMax","gravityDirection","gravityCurve","wind","windX","windY","windMode","windMin","windMax","windDirection","windCurve","forceField","forceStrength","forceRadius","forceCenterX","forceCenterY","forceFalloff","attraction","attractionCenterX","attractionCenterY","attractionRadius","attractionDuration","attractionDelay","attractionDelayMode","attractionPath","trail","trailConfigVersion","trailResources","trailResourceVersion","trailTexture","trailTextureName","trailPreviewUrl","trailColorMode","trailColor","trailColorGradient","trailAlphaMode","trailAlpha","trailAlphaCurve","trailBoneCount","trailLength","trailWidth","trailWidthMode","trailLifeLengthEnabled","trailLifeLengthCurve","trailShapeEnabled","trailShapeCurve","trailGridRows","trailGridCols","collision","collisionColliderIds","pathFollow","emitterFollow","emitterFollowMode","emitterFollowPathId","emitterFollowSpineId","emitterFollowBoneName","emitterFollowBoneOffsetX","emitterFollowBoneOffsetY","emitterFollowBoneRotation","emitterFollowBoneScaleX","emitterFollowBoneScaleY","emitterAngleMode","emitterFollowCurve","emitterFollowDuration","emitterFollowSpace","emitterFollowDirection","emitterFollowOffset","damping"]};function zi($){var Q;const S=(Q=E.value)==null?void 0:Q.config;if($==="export"){e.settings.exportSettings=_p();return}if(!S)return;const C=Dl();for(const Re of Wi[$])S[Re]=C[Re]}function dn(){t.value.fps=Math.min(240,Math.max(1,Math.round(Number(t.value.fps)||30)))}function di($){var S;e.selectSystem(((S=e.systems[$])==null?void 0:S.id)??0)}function ce(){e.addSystem()}function de(){e.addCollider()}function Rt(){e.addPath()}function Wt(){e.addSpine()}function Zt(){e.duplicateSelectedObject()}function pt($,S,C=0,Q=0,Re=0,mt=0){return{x:$,y:S,inX:C,inY:Q,outX:Re,outY:mt}}function Rs(){const $=K.value;if(!(!$||!$.preset))if($.preset==="circle"){const C=60.751328;$.points=[pt(110,0,0,-C,0,C),pt(0,110,C,0,-C,0),pt(-110,0,0,C,0,-C),pt(0,-110,-C,0,C,0)],$.closed=!0}else if($.preset==="square")$.points=[pt(-100,-100),pt(100,-100),pt(100,100),pt(-100,100)],$.closed=!0;else{const S=$.preset==="star"?10:6;$.points=Array.from({length:S},(C,Q)=>{const Re=$.preset==="star"&&Q%2?50:110,mt=-Math.PI*.5+Q/S*Math.PI*2;return pt(Math.cos(mt)*Re,Math.sin(mt)*Re)}),$.closed=!0}}function Hs(){K.value&&(K.value.points=[])}function Ui(){E.value&&(E.value.config.seed=Math.floor(Math.random()*999999)+1)}function Ps($){var C;const S=(C=E.value)==null?void 0:C.config;!S||$==="direction"||(S.speedOverLifeMode=$,$==="curve"&&S.speedOverLifeMin===S.speedOverLifeMax&&(S.speedOverLifeMin=0,S.speedOverLifeMax=1))}function br(){var S;const $=(S=E.value)==null?void 0:S.config;!$||$.scaleOverLifeMode!=="curve"||($.scaleOverLifeMin===$.scaleOverLifeMax&&($.scaleOverLifeMin=0,$.scaleOverLifeMax=1),$.scaleYOverLifeMin===$.scaleYOverLifeMax&&($.scaleYOverLifeMin=0,$.scaleYOverLifeMax=1))}function js($){var C;const S=(C=E.value)==null?void 0:C.config;!S||$==="direction"||(S.scaleOverLifeMode=$,br())}const ss={point:{emissionAngleMode:"random",direction:0,spread:360},circle:{innerRadius:0,outerRadius:100,emissionAngleMode:"fixed",direction:-90,spread:0},rect:{innerRectW:0,innerRectH:0,outerRectW:200,outerRectH:100,emissionAngleMode:"fixed",direction:-90,spread:0},cone:{innerRadius:0,outerRadius:100,coneAngle:90,coneDirection:90,emissionAngleMode:"random",direction:90,spread:90},path:{spawnPathId:0,spawnPathDistribution:"fixed",emissionAngleMode:"fixed",direction:0,spread:0}};function $a(){var C;const $=(C=E.value)==null?void 0:C.config;if(!$)return;const S=ss[$.shape];S&&Object.assign($,S)}function Ga(){var S;const $=(S=E.value)==null?void 0:S.config;!$||$.spawnPathId>0||($.emissionAngleMode==="path-normal"||$.emissionAngleMode==="path-tangent")&&($.emissionAngleMode="fixed")}const Qr=lt(null),Ws=lt(null),ws=lt(null),Vn=lt(null),ks=lt(null);function ea(){var C;const $=(C=E.value)==null?void 0:C.config;if(!$)return;const S=Math.max(0,...$.trailResources.map(Q=>Q.id))+1;$.trailResources.push({id:S,texture:null,textureName:"trail",previewUrl:"/images/trail.png",weight:100,locked:!1,rotation:0,colorMode:"particle",color:"#ffffff",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}],blend:"normal",alphaMode:"particle",alpha:1,alphaCurve:oe.map(Q=>({...Q})),boneCount:3,trailRatio:100,lengthMode:"fixed",length:100,lengthMin:100,lengthMax:100,widthSizeMode:"fixed",width:100,widthMin:100,widthMax:100,widthMode:"particle",lifeLengthEnabled:!1,lifeLengthCurve:te.map(Q=>({...Q})),shapeEnabled:!1,shapeCurve:ge.map(Q=>({...Q}))}),_e()}function ta($){var S;ks.value=$,(S=Vn.value)==null||S.click()}function H($,S){var Re;const C=(Re=E.value)==null?void 0:Re.config;if(!C)return;const Q=$==="trailGridCols"?32:16;C[$]=Math.min(Q,Math.max(2,Math.round(Number(S)||2)))}function Y($,S){var Q;const C=(Q=E.value)==null?void 0:Q.config.trailResources.find(Re=>Re.id===$);C&&(C.boneCount=Math.min(16,Math.max(2,Math.round(Number(S)||2))))}function ee($,S){var Q;const C=(Q=E.value)==null?void 0:Q.config.trailResources.find(Re=>Re.id===$);C&&(C.rotation=Math.max(-360,Math.min(360,Number(S)||0)))}async function ne($){var ut,ni;const S=$.target,C=(ut=S.files)==null?void 0:ut[0],Q=(ni=E.value)==null?void 0:ni.config,Re=Q==null?void 0:Q.trailResources.find(Vt=>Vt.id===ks.value);if(!C||!Re){S.value="";return}const mt=await nt(C);Re.texture=Dr(await gt.fromURL(mt)),Re.previewUrl=mt,Re.textureName=C.name.replace(/\.[^.]+$/,"")||"trail",S.value="",ks.value=null}async function ue($){var Q;const S=(Q=E.value)==null?void 0:Q.config,C=S==null?void 0:S.trailResources.find(Re=>Re.id===$);C&&(C.texture=Dr(await gt.fromURL("/images/trail.png")),C.previewUrl="/images/trail.png",C.textureName="trail",C.weight=100,C.locked=!1,C.rotation=0,C.boneCount=3,C.trailRatio=100,C.lengthMode="fixed",C.length=100,C.lengthMin=100,C.lengthMax=100,C.widthSizeMode="fixed",C.width=100,C.widthMin=100,C.widthMax=100,C.widthMode="particle",C.lifeLengthEnabled=!1,C.lifeLengthCurve=te.map(Re=>({...Re})),C.shapeEnabled=!1,C.shapeCurve=ge.map(Re=>({...Re})),C.colorMode="particle",C.color="#ffffff",C.colorGradient=[{position:0,color:"#ffffff"},{position:1,color:"#ffffff"}],C.blend="normal",C.alphaMode="particle",C.alpha=1,C.alphaCurve=oe.map(Re=>({...Re})),_e())}function ve($){var Q;const S=(Q=E.value)==null?void 0:Q.config.trailResources;if(!S||S.length<=1)return;const C=S.findIndex(Re=>Re.id===$);C>=0&&S.splice(C,1),_e()}function _e(){var Re;const $=(Re=E.value)==null?void 0:Re.config.trailResources;if(!($!=null&&$.length))return;if($.length===1){$[0].weight=100,$[0].locked=!1;return}const S=$.filter(mt=>mt.locked),C=$.filter(mt=>!mt.locked);let Q=S.reduce((mt,ut)=>mt+Math.max(0,Number(ut.weight)||0),0);Q>100&&(si(S,100,!0),Q=100),si(C,100-Q)}function Me($,S){var ni;const C=(ni=E.value)==null?void 0:ni.config.trailResources;if(!(C!=null&&C.length))return;if(C.length===1){C[0].weight=100,C[0].locked=!1;return}const Q=C.find(Vt=>Vt.id===$);if(!Q||Q.locked)return;const Re=C.filter(Vt=>Vt.id!==$&&Vt.locked).reduce((Vt,rs)=>Vt+Math.max(0,Number(rs.weight)||0),0),mt=Math.max(0,100-Re),ut=C.filter(Vt=>Vt.id!==$&&!Vt.locked);Q.weight=Bt(Math.min(mt,Math.max(0,Number(S)||0))),ut.length?si(ut,mt-Q.weight,!0):Q.weight=Bt(mt)}function be($){var Q;const S=(Q=E.value)==null?void 0:Q.config.trailResources;if(!S||S.length===1)return;const C=S.find(Re=>Re.id===$);C&&(C.locked=!C.locked)}function De($,S){const C=S.target;$.color=Se(C.value,$.color),C.value=$.color}function Ie($,S){De($,S),S.target.blur()}function Le(){var C;const $=(C=E.value)==null?void 0:C.config;if(!$)return;const S=Math.max(0,...$.imageResources.map(Q=>Q.id))+1;$.imageResources.push({id:S,texture:$.texture,textureName:"star",textureFolder:"",previewUrl:"/images/star.png",imageMode:"fixed",sequencePlayback:"loop-forward",sequenceFps:30,sequenceFrames:[],weight:100,locked:!1,scale:1,anchorX:.5,anchorY:.5,colorMode:"fixed",colorStart:"#ffffff",colorEnd:"#ff4d4d",colorGradient:[{position:0,color:"#ffffff"},{position:1,color:"#ff4d4d"}],blend:"normal",independentAlpha:"off",alpha:1,alphaCurveMode:"跟随导出",alphaCurve:xe.map(Q=>({...Q}))}),Ci()}function Te($){var S;ws.value=$,(S=Qr.value)==null||S.click()}function je($){var S;ws.value=$,(S=Ws.value)==null||S.click()}async function rt($){var ni,Vt;const S=$.target,C=(ni=S.files)==null?void 0:ni[0],Q=(Vt=E.value)==null?void 0:Vt.config,Re=Q==null?void 0:Q.imageResources.find(rs=>rs.id===ws.value);if(!C||!Re){S.value="";return}const mt=await nt(C),ut=Dr(await gt.fromURL(mt));Re.texture=ut,Re.previewUrl=mt,Re.textureFolder="",Re.textureName=C.name.replace(/\.[^.]+$/,"")||"particle",S.value="",ws.value=null}async function Je($){var mt;const S=$.target,C=Array.from(S.files||[]).sort((ut,ni)=>ut.name.localeCompare(ni.name,void 0,{numeric:!0,sensitivity:"base"})),Q=(mt=E.value)==null?void 0:mt.config,Re=Q==null?void 0:Q.imageResources.find(ut=>ut.id===ws.value);if(!C.length||!Re){S.value="";return}Re.sequenceFrames=await Promise.all(C.map(async ut=>{const ni=await nt(ut);return{name:ut.name,previewUrl:ni,texture:Dr(await gt.fromURL(ni))}})),Re.imageMode="sequence",S.value="",ws.value=null}function nt($){return new Promise((S,C)=>{const Q=new FileReader;Q.onload=()=>S(String(Q.result||"")),Q.onerror=()=>C(Q.error),Q.readAsDataURL($)})}function Qe($){var Q;const S=(Q=E.value)==null?void 0:Q.config,C=S==null?void 0:S.imageResources.find(Re=>Re.id===$);!S||!C||(C.texture=S.texture,C.textureName="star",C.textureFolder="",C.previewUrl="/images/star.png",C.imageMode="fixed",C.sequencePlayback="loop-forward",C.sequenceFps=30,C.sequenceFrames=[],C.scale=1,C.anchorX=.5,C.anchorY=.5,C.colorMode="fixed",C.colorStart="#ffffff",C.colorEnd="#ff4d4d",C.colorGradient=[{position:0,color:"#ffffff"},{position:1,color:"#ff4d4d"}],C.blend="normal",C.independentAlpha="off",C.alpha=1,C.alphaCurveMode="跟随导出",C.alphaCurve=xe.map(Re=>({...Re})),C.locked=!1,Ci())}function Se($,S){let C=$.trim().replace(/^#/,"");return/^[0-9a-f]{3}$/i.test(C)&&(C=C.split("").map(Q=>Q+Q).join("")),/^[0-9a-f]{6}$/i.test(C)?`#${C.toLowerCase()}`:S}function at($,S){const C=S.target;$.colorStart=Se(C.value,$.colorStart),C.value=$.colorStart}function Pe($,S){at($,S),S.target.blur()}function Xt($){var Q;const S=(Q=E.value)==null?void 0:Q.config.imageResources;if(!S||S.length<=1)return;const C=S.findIndex(Re=>Re.id===$);C>=0&&S.splice(C,1),Ci()}function Bt($){return Math.round($)}function si($,S,C=!1){if(!$.length)return;const Q=Math.max(0,Bt(S)),Re=C?$.reduce((ut,ni)=>ut+Math.max(0,Number(ni.weight)||0),0):0;let mt=0;$.forEach((ut,ni)=>{const Vt=ni===$.length-1,rs=Bt(Vt?Q-mt:Re>0?Q*Math.max(0,Number(ut.weight)||0)/Re:Q/$.length);ut.weight=rs,mt+=rs})}function Ci(){var Re;const $=(Re=E.value)==null?void 0:Re.config.imageResources;if(!($!=null&&$.length))return;if($.length===1){$[0].weight=100,$[0].locked=!1;return}const S=$.filter(mt=>mt.locked),C=$.filter(mt=>!mt.locked);let Q=S.reduce((mt,ut)=>mt+Math.max(0,Number(ut.weight)||0),0);Q>100&&(si(S,100,!0),Q=100),si(C,100-Q)}function ns($,S){var ni;const C=(ni=E.value)==null?void 0:ni.config.imageResources;if(!(C!=null&&C.length))return;if(C.length===1){C[0].weight=100,C[0].locked=!1;return}const Q=C.find(Vt=>Vt.id===$);if(!Q||Q.locked)return;const Re=C.filter(Vt=>Vt.id!==$&&Vt.locked).reduce((Vt,rs)=>Vt+Math.max(0,Number(rs.weight)||0),0),mt=Math.max(0,100-Re),ut=C.filter(Vt=>Vt.id!==$&&!Vt.locked);if(Q.weight=Bt(Math.min(mt,Math.max(0,Number(S)||0))),!ut.length){Q.weight=Bt(mt);return}si(ut,mt-Q.weight,!0)}function Ha($){var Q;const S=(Q=E.value)==null?void 0:Q.config.imageResources;if(!S||S.length===1)return;const C=S.find(Re=>Re.id===$);C&&(C.locked=!C.locked)}return($,S)=>(ie(),ae("div",WB,[S[391]||(S[391]=M("div",{class:"panel-header"},[M("span",null,"Spine粒子编辑器-Yeomai")],-1)),M("div",zB,[M("div",qB,[M("div",{class:"group-head",onClick:S[0]||(S[0]=C=>Oe("config"))},[M("span",KB,Xe(le.config?"▸":"▾"),1),S[197]||(S[197]=M("span",null,"配置管理",-1))]),ye(M("div",ZB,[M("div",JB,[M("button",{title:"保存全部编辑器配置 (Ctrl+S)",onClick:_},"保存配置"),M("button",{title:"加载本地编辑器配置",onClick:S[1]||(S[1]=C=>{var Q;return(Q=i.value)==null?void 0:Q.click()})},"加载配置"),ye(M("select",{"onUpdate:modelValue":S[2]||(S[2]=C=>n.value=C),"aria-label":"预设列表",disabled:!r.value.length||a.value,onPointerdown:P,onFocus:P,onChange:F},[M("option",eL,Xe(r.value.length?"选择预设":"无预设文件"),1),(ie(!0),ae(Ke,null,ci(r.value,C=>(ie(),ae("option",{key:C.file,value:C.file},Xe(C.name),9,tL))),128))],40,QB),[[Ht,n.value]]),M("input",{ref_key:"configFileInput",ref:i,hidden:"",type:"file",accept:".json,application/json",onChange:R},null,544)]),o.value?(ie(),ae("div",{key:0,class:Ze(["config-message",{error:h.value}])},Xe(o.value),3)):Ve("",!0)],512),[[Yi,!le.config]])]),M("div",iL,[M("div",{class:"group-head scene-head",onClick:S[3]||(S[3]=C=>Oe("scene"))},[M("span",sL,Xe(le.scene?"▸":"▾"),1),S[198]||(S[198]=M("span",null,"场景对象",-1)),M("div",nL,[M("button",{class:"scene-add",title:"添加粒子系统",onClick:bt(ce,["stop"])},"+粒子"),M("button",{class:"scene-add",title:"添加碰撞体",onClick:bt(de,["stop"])},"+碰撞"),M("button",{class:"scene-add",title:"添加路径",onClick:bt(Rt,["stop"])},"+路径"),M("button",{class:"scene-add",title:"添加 Spine",onClick:bt(Wt,["stop"])},"+Spine"),M("button",{class:"scene-add",disabled:!me.value,title:"复制当前选中的场景对象",onClick:bt(Zt,["stop"])},"+Copy",8,rL)])]),ye(M("div",aL,[M("div",oL,[(ie(!0),ae(Ke,null,ci(ke(e).systems,(C,Q)=>(ie(),ae("div",{key:`particle-${C.id}`,class:Ze(["tree-item scene-object-item",{on:W.value==="particle"&&C.id===ke(e).activeObjectId}]),onClick:Re=>di(Q)},[S[201]||(S[201]=M("span",{class:"tdot"},"●",-1)),M("span",cL,Xe(C.config.name||"ParticleSystem"+(Q+1)),1),M("button",{class:Ze(["scene-object-eye",{off:C.visible===!1}]),title:C.visible===!1?"显示粒子系统":"隐藏粒子系统","aria-label":C.visible===!1?"显示粒子系统":"隐藏粒子系统",onClick:bt(Re=>C.visible=C.visible===!1,["stop"])},[(ie(),ae("svg",uL,[S[199]||(S[199]=M("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"},null,-1)),S[200]||(S[200]=M("circle",{cx:"12",cy:"12",r:"2.8"},null,-1)),C.visible===!1?(ie(),ae("path",dL)):Ve("",!0)]))],10,hL),S[202]||(S[202]=M("span",{class:"scene-object-kind"},"粒子",-1)),M("button",{class:"scene-object-delete",title:"删除粒子系统",onClick:bt(Re=>ke(e).removeSystem(C.id),["stop"])},"✕",8,fL)],10,lL))),128)),(ie(!0),ae(Ke,null,ci(ke(e).colliders,C=>(ie(),ae("div",{key:`collision-${C.id}`,class:Ze(["tree-item scene-object-item",{on:W.value==="collision"&&C.id===ke(e).activeObjectId}]),onClick:Q=>ke(e).selectSceneObject("collision",C.id)},[S[205]||(S[205]=M("span",{class:"tdot collision-dot"},"■",-1)),M("span",pL,Xe(C.name),1),M("button",{class:Ze(["scene-object-eye",{off:C.visible===!1}]),title:C.visible===!1?"显示碰撞体":"隐藏碰撞体","aria-label":C.visible===!1?"显示碰撞体":"隐藏碰撞体",onClick:bt(Q=>C.visible=C.visible===!1,["stop"])},[(ie(),ae("svg",vL,[S[203]||(S[203]=M("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"},null,-1)),S[204]||(S[204]=M("circle",{cx:"12",cy:"12",r:"2.8"},null,-1)),C.visible===!1?(ie(),ae("path",yL)):Ve("",!0)]))],10,gL),S[206]||(S[206]=M("span",{class:"scene-object-kind"},"碰撞",-1)),M("button",{class:"scene-object-delete",title:"删除碰撞体",onClick:bt(Q=>ke(e).removeCollider(C.id),["stop"])},"✕",8,xL)],10,mL))),128)),(ie(!0),ae(Ke,null,ci(ke(e).paths,C=>(ie(),ae("div",{key:`path-${C.id}`,class:Ze(["tree-item scene-object-item",{on:W.value==="path"&&C.id===ke(e).activeObjectId}]),onClick:Q=>ke(e).selectSceneObject("path",C.id)},[S[209]||(S[209]=M("span",{class:"tdot path-dot"},"◇",-1)),M("span",wL,Xe(C.name),1),M("button",{class:Ze(["scene-object-eye",{off:C.visible===!1}]),title:C.visible===!1?"显示路径":"隐藏路径","aria-label":C.visible===!1?"显示路径":"隐藏路径",onClick:bt(Q=>C.visible=C.visible===!1,["stop"])},[(ie(),ae("svg",ML,[S[207]||(S[207]=M("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"},null,-1)),S[208]||(S[208]=M("circle",{cx:"12",cy:"12",r:"2.8"},null,-1)),C.visible===!1?(ie(),ae("path",_L)):Ve("",!0)]))],10,SL),S[210]||(S[210]=M("span",{class:"scene-object-kind"},"路径",-1)),M("button",{class:"scene-object-delete",title:"删除路径",onClick:bt(Q=>ke(e).removePath(C.id),["stop"])},"✕",8,TL)],10,bL))),128)),(ie(!0),ae(Ke,null,ci(ke(e).spines,C=>(ie(),ae("div",{key:`spine-${C.id}`,class:Ze(["tree-item scene-object-item",{on:W.value==="spine"&&C.id===ke(e).activeObjectId}]),onClick:Q=>ke(e).selectSceneObject("spine",C.id)},[S[213]||(S[213]=M("span",{class:"tdot spine-dot"},"◆",-1)),M("span",EL,Xe(C.name),1),M("button",{class:Ze(["scene-object-eye",{off:C.visible===!1}]),title:C.visible===!1?"显示 Spine":"隐藏 Spine","aria-label":C.visible===!1?"显示 Spine":"隐藏 Spine",onClick:bt(Q=>C.visible=C.visible===!1,["stop"])},[(ie(),ae("svg",IL,[S[211]||(S[211]=M("path",{d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"},null,-1)),S[212]||(S[212]=M("circle",{cx:"12",cy:"12",r:"2.8"},null,-1)),C.visible===!1?(ie(),ae("path",RL)):Ve("",!0)]))],10,CL),S[214]||(S[214]=M("span",{class:"scene-object-kind"},"Spine",-1)),M("button",{class:"scene-object-delete",title:"删除 Spine",onClick:bt(Q=>ke(e).removeSpine(C.id),["stop"])},"✕",8,PL)],10,AL))),128)),!ke(e).systems.length&&!ke(e).colliders.length&&!ke(e).paths.length&&!ke(e).spines.length?(ie(),ae("div",kL,"场景中暂无对象")):Ve("",!0)]),W.value==="particle"&&E.value?(ie(),ae(Ke,{key:0},[M("label",FL,[S[215]||(S[215]=M("span",null,"名称",-1)),ye(M("input",{"onUpdate:modelValue":S[4]||(S[4]=C=>E.value.config.name=C),class:"inp"},null,512),[[ht,E.value.config.name]])]),Ue(qe,{label:"位置X",min:-2e3,max:2e3,step:1,modelValue:E.value.config.centerX,"onUpdate:modelValue":S[5]||(S[5]=C=>E.value.config.centerX=C)},null,8,["modelValue"]),Ue(qe,{label:"位置Y",min:-2e3,max:2e3,step:1,modelValue:E.value.config.centerY,"onUpdate:modelValue":S[6]||(S[6]=C=>E.value.config.centerY=C)},null,8,["modelValue"]),Ue(qe,{label:"偏移X",min:-2e3,max:2e3,step:1,modelValue:E.value.config.offsetX,"onUpdate:modelValue":S[7]||(S[7]=C=>E.value.config.offsetX=C)},null,8,["modelValue"]),Ue(qe,{label:"偏移Y",min:-2e3,max:2e3,step:1,modelValue:E.value.config.offsetY,"onUpdate:modelValue":S[8]||(S[8]=C=>E.value.config.offsetY=C)},null,8,["modelValue"]),Ue(qe,{label:"旋转",min:-360,max:360,step:1,modelValue:E.value.config.rootRotation,"onUpdate:modelValue":S[9]||(S[9]=C=>E.value.config.rootRotation=C)},null,8,["modelValue"]),Ue(qe,{label:"缩放X",min:.05,max:10,step:.05,modelValue:E.value.config.rootScaleX,"onUpdate:modelValue":S[10]||(S[10]=C=>E.value.config.rootScaleX=C)},null,8,["modelValue"]),Ue(qe,{label:"缩放Y",min:.05,max:10,step:.05,modelValue:E.value.config.rootScaleY,"onUpdate:modelValue":S[11]||(S[11]=C=>E.value.config.rootScaleY=C)},null,8,["modelValue"]),M("div",OL,[S[216]||(S[216]=M("label",{for:"system-seed"},"随机种子",-1)),ye(M("input",{id:"system-seed",class:"seed-input",type:"number",min:"0",step:"1","onUpdate:modelValue":S[12]||(S[12]=C=>E.value.config.seed=C),title:"控制粒子系统内全部随机属性、资源选择与修改器随机采样"},null,512),[[ht,E.value.config.seed,void 0,{number:!0}]]),M("button",{class:"seed-random",title:"生成新的全局随机种子",onClick:Ui},"⚄")]),S[217]||(S[217]=M("div",{class:"seed-hint"},"控制初始随机参数、资源选择和修改器随机采样;相同种子可复现相同效果",-1))],64)):J.value?(ie(),ae(Ke,{key:1},[S[242]||(S[242]=M("div",{class:"object-editor-title"},"碰撞体属性",-1)),M("label",BL,[S[218]||(S[218]=M("span",null,"碰撞体名称",-1)),ye(M("input",{"onUpdate:modelValue":S[13]||(S[13]=C=>J.value.name=C),class:"inp"},null,512),[[ht,J.value.name]])]),M("div",LL,[M("label",DL,[S[220]||(S[220]=M("span",null,"类型",-1)),ye(M("select",{"onUpdate:modelValue":S[14]||(S[14]=C=>J.value.shape=C),class:"inp"},[...S[219]||(S[219]=[Ts('',5)])],512),[[Ht,J.value.shape]])]),M("label",NL,[S[221]||(S[221]=M("span",null,"启用",-1)),ye(M("input",{"onUpdate:modelValue":S[15]||(S[15]=C=>J.value.enabled=C),type:"checkbox"},null,512),[[ei,J.value.enabled]])])]),M("div",UL,[M("label",XL,[S[222]||(S[222]=M("span",null,"X 位置",-1)),ye(M("input",{"onUpdate:modelValue":S[16]||(S[16]=C=>J.value.x=C),type:"number",class:"inp"},null,512),[[ht,J.value.x,void 0,{number:!0}]])]),M("label",VL,[S[223]||(S[223]=M("span",null,"Y 位置",-1)),ye(M("input",{"onUpdate:modelValue":S[17]||(S[17]=C=>J.value.y=C),type:"number",class:"inp"},null,512),[[ht,J.value.y,void 0,{number:!0}]])])]),Ue(qe,{label:"旋转",min:-360,max:360,step:1,modelValue:J.value.rotation,"onUpdate:modelValue":S[18]||(S[18]=C=>J.value.rotation=C)},null,8,["modelValue"]),M("div",YL,[M("label",$L,[S[224]||(S[224]=M("span",null,"缩放 X",-1)),ye(M("input",{"onUpdate:modelValue":S[19]||(S[19]=C=>J.value.scaleX=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[ht,J.value.scaleX,void 0,{number:!0}]])]),M("label",GL,[S[225]||(S[225]=M("span",null,"缩放 Y",-1)),ye(M("input",{"onUpdate:modelValue":S[20]||(S[20]=C=>J.value.scaleY=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[ht,J.value.scaleY,void 0,{number:!0}]])])]),J.value.shape==="circle"?(ie(),Jt(qe,{key:0,label:"半径",min:1,max:1e3,step:1,modelValue:J.value.radius,"onUpdate:modelValue":S[21]||(S[21]=C=>J.value.radius=C)},null,8,["modelValue"])):J.value.shape==="ellipse"?(ie(),ae("div",HL,[M("label",jL,[S[226]||(S[226]=M("span",null,"X 半径",-1)),ye(M("input",{"onUpdate:modelValue":S[22]||(S[22]=C=>J.value.radiusX=C),type:"number",min:"1",class:"inp"},null,512),[[ht,J.value.radiusX,void 0,{number:!0}]])]),M("label",WL,[S[227]||(S[227]=M("span",null,"Y 半径",-1)),ye(M("input",{"onUpdate:modelValue":S[23]||(S[23]=C=>J.value.radiusY=C),type:"number",min:"1",class:"inp"},null,512),[[ht,J.value.radiusY,void 0,{number:!0}]])])])):(ie(),ae("div",zL,[M("label",qL,[S[228]||(S[228]=M("span",null,"宽度",-1)),ye(M("input",{"onUpdate:modelValue":S[24]||(S[24]=C=>J.value.width=C),type:"number",min:"1",class:"inp"},null,512),[[ht,J.value.width,void 0,{number:!0}]])]),M("label",KL,[S[229]||(S[229]=M("span",null,"高度",-1)),ye(M("input",{"onUpdate:modelValue":S[25]||(S[25]=C=>J.value.height=C),type:"number",min:"1",class:"inp"},null,512),[[ht,J.value.height,void 0,{number:!0}]])])])),J.value.shape==="polygon"||J.value.shape==="custom"?(ie(),Jt(qe,{key:3,label:"边数",min:3,max:16,step:1,modelValue:J.value.sides,"onUpdate:modelValue":S[26]||(S[26]=C=>J.value.sides=C)},null,8,["modelValue"])):Ve("",!0),M("label",ZL,[S[231]||(S[231]=M("span",null,"碰撞响应",-1)),ye(M("select",{"onUpdate:modelValue":S[27]||(S[27]=C=>J.value.response=C),class:"inp"},[...S[230]||(S[230]=[M("option",{value:"physics"},"物理(弹跳/摩擦)",-1),M("option",{value:"pause"},"暂停(停止不动)",-1),M("option",{value:"destroy"},"消失(立即销毁)",-1)])],512),[[Ht,J.value.response]])]),J.value.response==="physics"?(ie(),ae("div",JL,[M("label",QL,[S[232]||(S[232]=M("span",null,"弹性 (0-1)",-1)),ye(M("input",{"onUpdate:modelValue":S[28]||(S[28]=C=>J.value.elasticity=C),type:"number",min:"0",max:"1",step:"0.01",class:"inp"},null,512),[[ht,J.value.elasticity,void 0,{number:!0}]])]),M("label",eD,[S[233]||(S[233]=M("span",null,"摩擦 (0-1)",-1)),ye(M("input",{"onUpdate:modelValue":S[29]||(S[29]=C=>J.value.friction=C),type:"number",min:"0",max:"1",step:"0.01",class:"inp"},null,512),[[ht,J.value.friction,void 0,{number:!0}]])])])):Ve("",!0),M("div",tD,[M("label",iD,[ye(M("input",{"onUpdate:modelValue":S[30]||(S[30]=C=>J.value.followPath=C),type:"checkbox"},null,512),[[ei,J.value.followPath]]),S[234]||(S[234]=Qt("跟随路径移动",-1))]),J.value.followPath?(ie(),ae(Ke,{key:0},[M("label",sD,[S[236]||(S[236]=M("span",null,"目标路径",-1)),ye(M("select",{"onUpdate:modelValue":S[31]||(S[31]=C=>J.value.followPathId=C),class:"inp"},[S[235]||(S[235]=M("option",{value:0},"(未选择)",-1)),(ie(!0),ae(Ke,null,ci(ke(e).paths,C=>(ie(),ae("option",{key:C.id,value:C.id},Xe(C.name),9,nD))),128))],512),[[Ht,J.value.followPathId,void 0,{number:!0}]])]),M("div",rD,[M("label",aD,[S[237]||(S[237]=M("span",null,"移动时长(秒)",-1)),ye(M("input",{"onUpdate:modelValue":S[32]||(S[32]=C=>J.value.followDuration=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[ht,J.value.followDuration,void 0,{number:!0}]])]),M("label",oD,[S[239]||(S[239]=M("span",null,"曲线模式",-1)),ye(M("select",{"onUpdate:modelValue":S[33]||(S[33]=C=>J.value.followCurveMode=C),class:"inp"},[...S[238]||(S[238]=[M("option",null,"跟随导出",-1),M("option",null,"线性",-1),M("option",null,"贝塞尔",-1)])],512),[[Ht,J.value.followCurveMode]])])]),M("label",lD,[ye(M("input",{"onUpdate:modelValue":S[34]||(S[34]=C=>J.value.followPathRotation=C),type:"checkbox"},null,512),[[ei,J.value.followPathRotation]]),S[240]||(S[240]=Qt("方向沿路径",-1))]),S[241]||(S[241]=M("div",{class:"collider-curve-title"},[Qt("移动进度曲线 "),M("small",null,"横轴:实时/移动时长 纵轴:路径进度(0=起点 → 1=终点)")],-1)),Ue(xn,{"model-value":J.value.followCurve||j,"default-value":j,mode:T(J.value.followCurveMode),"onUpdate:modelValue":S[35]||(S[35]=C=>J.value.followCurve=C)},null,8,["model-value","mode"])],64)):Ve("",!0)])],64)):K.value?(ie(),ae(Ke,{key:2},[S[252]||(S[252]=M("div",{class:"object-editor-title"},"路径属性",-1)),M("label",cD,[S[243]||(S[243]=M("span",null,"路径名称",-1)),ye(M("input",{"onUpdate:modelValue":S[36]||(S[36]=C=>K.value.name=C),class:"inp"},null,512),[[ht,K.value.name]])]),M("div",hD,[M("label",uD,[S[244]||(S[244]=M("span",null,"X 位置",-1)),ye(M("input",{"onUpdate:modelValue":S[37]||(S[37]=C=>K.value.x=C),type:"number",class:"inp"},null,512),[[ht,K.value.x,void 0,{number:!0}]])]),M("label",dD,[S[245]||(S[245]=M("span",null,"Y 位置",-1)),ye(M("input",{"onUpdate:modelValue":S[38]||(S[38]=C=>K.value.y=C),type:"number",class:"inp"},null,512),[[ht,K.value.y,void 0,{number:!0}]])])]),Ue(qe,{label:"旋转",min:-360,max:360,step:1,modelValue:K.value.rotation,"onUpdate:modelValue":S[39]||(S[39]=C=>K.value.rotation=C)},null,8,["modelValue"]),M("div",fD,[M("label",mD,[S[246]||(S[246]=M("span",null,"缩放 X",-1)),ye(M("input",{"onUpdate:modelValue":S[40]||(S[40]=C=>K.value.scaleX=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[ht,K.value.scaleX,void 0,{number:!0}]])]),M("label",pD,[S[247]||(S[247]=M("span",null,"缩放 Y",-1)),ye(M("input",{"onUpdate:modelValue":S[41]||(S[41]=C=>K.value.scaleY=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[ht,K.value.scaleY,void 0,{number:!0}]])])]),M("label",gD,[S[248]||(S[248]=M("span",null,"闭合路径",-1)),ye(M("input",{"onUpdate:modelValue":S[42]||(S[42]=C=>K.value.closed=C),type:"checkbox"},null,512),[[ei,K.value.closed]])]),M("label",vD,[S[249]||(S[249]=M("span",null,"路径颜色",-1)),ye(M("input",{"onUpdate:modelValue":S[43]||(S[43]=C=>K.value.color=C),type:"color",class:"path-color"},null,512),[[ht,K.value.color]])]),S[253]||(S[253]=Ts('
操作说明:
  • 双击空白处/曲线:新建锚点
  • 双击锚点:删除节点
  • 双击第二下按住拖动:新建并拉出手柄
  • 拖动锚点移动位置,拖动手柄调整曲线
  • Shift+拖动手柄:两侧完全对称
  • Alt+拖动手柄:独立控制单侧
  • Ctrl+点击/框选:加选节点
  • Alt+点击/框选:减选节点
  • Alt+单击空白处:清除全部选中
  • 选中多个节点后可整体拖动
',1)),M("label",yD,[S[251]||(S[251]=M("span",null,"应用预设形状",-1)),ye(M("select",{"onUpdate:modelValue":S[44]||(S[44]=C=>K.value.preset=C),class:"inp"},[...S[250]||(S[250]=[Ts('',5)])],512),[[Ht,K.value.preset]])]),M("button",{class:"path-action primary",onClick:Rs},"应用预设"),M("button",{class:"path-action",onClick:Hs},"清空锚点")],64)):fe.value?(ie(),Jt(qF,{key:3,"spine-object":fe.value},null,8,["spine-object"])):(ie(),ae("div",xD,"使用右上角按钮创建场景对象"))],512),[[Yi,!le.scene]])]),W.value==="particle"&&E.value?(ie(),ae(Ke,{key:0},[M("div",bD,[M("div",{class:"group-head",onClick:S[46]||(S[46]=C=>Oe("emitMode"))},[M("span",wD,Xe(le.emitMode?"▸":"▾"),1),S[254]||(S[254]=M("span",null,"发射模式",-1)),M("button",{class:"group-reset",title:"重置发射模式参数",onClick:S[45]||(S[45]=bt(C=>zi("emitMode"),["stop"]))},"重置")]),ye(M("div",SD,[M("div",MD,[M("button",{class:Ze(["seg",{on:E.value.config.mode==="stream"}]),onClick:S[47]||(S[47]=C=>Fe("stream"))},"持续",2),M("button",{class:Ze(["seg",{on:E.value.config.mode==="burst"}]),onClick:S[48]||(S[48]=C=>Fe("burst"))},"爆发",2)]),E.value.config.mode==="stream"?(ie(),ae(Ke,{key:0},[M("div",_D,[M("button",{class:Ze(["seg",{on:E.value.config.streamBehavior==="normal"}]),onClick:S[49]||(S[49]=C=>St("normal"))},"常规持续",2),M("button",{class:Ze(["seg",{on:E.value.config.streamBehavior==="loop"}]),onClick:S[50]||(S[50]=C=>St("loop"))},"循环持续",2)]),Ue(qe,{label:"发射速率",min:1,max:300,step:1,modelValue:E.value.config.rate,"onUpdate:modelValue":S[51]||(S[51]=C=>E.value.config.rate=C)},null,8,["modelValue"]),E.value.config.streamBehavior==="normal"?(ie(),Jt(qe,{key:0,label:"发射时长",min:1/30,max:60,step:1/30,modelValue:E.value.config.duration,"onUpdate:modelValue":S[52]||(S[52]=C=>E.value.config.duration=C)},null,8,["modelValue"])):(ie(),Jt(qe,{key:1,label:"发射时长 (f)",min:1,max:1800,step:1,"model-value":q.value,"onUpdate:modelValue":Be},null,8,["model-value"])),E.value.config.streamBehavior==="loop"?(ie(),ae("div",TD,[M("div",AD,[M("label",ED,[M("input",{type:"checkbox",checked:E.value.config.generateLoopStartAnimation,onChange:S[53]||(S[53]=C=>At("start",C))},null,40,CD),S[255]||(S[255]=M("span",{class:"switch-ui"},null,-1)),S[256]||(S[256]=M("span",null,"生成开始循环动画",-1))]),E.value.config.generateLoopStartAnimation?(ie(),ae("div",ID,[M("label",RD,[M("input",{type:"checkbox",checked:E.value.config.loopStartUseCustomDuration,onChange:S[54]||(S[54]=C=>It("start",C))},null,40,PD),S[257]||(S[257]=M("span",{class:"switch-ui"},null,-1)),S[258]||(S[258]=M("span",null,"指定时长",-1))]),M("label",kD,[E.value.config.loopStartUseCustomDuration?(ie(),ae("input",{key:0,value:E.value.config.loopStartDurationFrames,type:"number",min:"1",max:"1800",step:"1","aria-label":"开始循环段时长",onChange:S[55]||(S[55]=C=>Et("start",C))},null,40,FD)):Ve("",!0),E.value.config.loopStartUseCustomDuration?(ie(),ae("span",OD,"f")):(ie(),ae("span",BD,"自动 "+Xe(V.value)+"f",1))])])):Ve("",!0)]),M("div",LD,[M("label",DD,[M("input",{type:"checkbox",checked:E.value.config.generateLoopEndAnimation,onChange:S[56]||(S[56]=C=>At("end",C))},null,40,ND),S[259]||(S[259]=M("span",{class:"switch-ui"},null,-1)),S[260]||(S[260]=M("span",null,"生成结束循环动画",-1))]),E.value.config.generateLoopEndAnimation?(ie(),ae("div",UD,[M("label",XD,[M("input",{type:"checkbox",checked:E.value.config.loopEndUseCustomDuration,onChange:S[57]||(S[57]=C=>It("end",C))},null,40,VD),S[261]||(S[261]=M("span",{class:"switch-ui"},null,-1)),S[262]||(S[262]=M("span",null,"指定时长",-1))]),M("label",YD,[E.value.config.loopEndUseCustomDuration?(ie(),ae("input",{key:0,value:E.value.config.loopEndDurationFrames,type:"number",min:"1",max:"1800",step:"1","aria-label":"结束循环段时长",onChange:S[58]||(S[58]=C=>Et("end",C))},null,40,$D)):Ve("",!0),E.value.config.loopEndUseCustomDuration?(ie(),ae("span",GD,"f")):(ie(),ae("span",HD,"自动 "+Xe(V.value)+"f",1))])])):Ve("",!0)])])):Ve("",!0),E.value.config.streamBehavior==="loop"?(ie(),ae("div",jD,"循环持续模式不支持骨骼跟随和路径跟随;进入或退出时会将粒子跟随设置恢复默认值。")):Ve("",!0)],64)):(ie(),Jt(qe,{key:1,label:"单次数量",min:1,max:1e3,step:1,modelValue:E.value.config.burstCount,"onUpdate:modelValue":S[59]||(S[59]=C=>E.value.config.burstCount=C)},null,8,["modelValue"])),Ue(qe,{label:"延迟时间",min:0,max:5,step:.1,modelValue:E.value.config.delay,"onUpdate:modelValue":S[60]||(S[60]=C=>E.value.config.delay=C)},null,8,["modelValue"])],512),[[Yi,!le.emitMode]])]),M("div",WD,[M("div",{class:"group-head",onClick:S[62]||(S[62]=C=>Oe("shape"))},[M("span",zD,Xe(le.shape?"▸":"▾"),1),S[263]||(S[263]=M("span",null,"发射器形状",-1)),M("button",{class:"group-reset",title:"重置发射器形状参数",onClick:S[61]||(S[61]=bt(C=>zi("shape"),["stop"]))},"重置")]),ye(M("div",qD,[M("label",KD,[S[265]||(S[265]=M("span",null,"形状",-1)),ye(M("select",{"onUpdate:modelValue":S[63]||(S[63]=C=>E.value.config.shape=C),class:"inp",onChange:$a},[...S[264]||(S[264]=[Ts('',5)])],544),[[Ht,E.value.config.shape]])]),E.value.config.shape==="circle"||E.value.config.shape==="cone"?(ie(),ae(Ke,{key:0},[Ue(qe,{label:E.value.config.shape==="cone"?"内径":"内半径",min:0,max:E.value.config.outerRadius,step:1,modelValue:E.value.config.innerRadius,"onUpdate:modelValue":S[64]||(S[64]=C=>E.value.config.innerRadius=C)},null,8,["label","max","modelValue"]),Ue(qe,{label:E.value.config.shape==="cone"?"外径":"外半径",min:E.value.config.innerRadius,max:300,step:1,modelValue:E.value.config.outerRadius,"onUpdate:modelValue":S[65]||(S[65]=C=>E.value.config.outerRadius=C)},null,8,["label","min","modelValue"])],64)):Ve("",!0),E.value.config.shape==="cone"?(ie(),ae(Ke,{key:1},[Ue(qe,{label:"锥形朝向",min:-360,max:360,step:1,modelValue:E.value.config.coneDirection,"onUpdate:modelValue":S[66]||(S[66]=C=>E.value.config.coneDirection=C)},null,8,["modelValue"]),Ue(qe,{label:"锥形开口角度",min:1,max:360,step:1,modelValue:E.value.config.coneAngle,"onUpdate:modelValue":S[67]||(S[67]=C=>E.value.config.coneAngle=C)},null,8,["modelValue"])],64)):E.value.config.shape==="rect"?(ie(),ae(Ke,{key:2},[Ue(qe,{label:"内宽",min:0,max:E.value.config.outerRectW,step:1,modelValue:E.value.config.innerRectW,"onUpdate:modelValue":S[68]||(S[68]=C=>E.value.config.innerRectW=C)},null,8,["max","modelValue"]),Ue(qe,{label:"内高",min:0,max:E.value.config.outerRectH,step:1,modelValue:E.value.config.innerRectH,"onUpdate:modelValue":S[69]||(S[69]=C=>E.value.config.innerRectH=C)},null,8,["max","modelValue"]),Ue(qe,{label:"外宽",min:E.value.config.innerRectW,max:400,step:1,modelValue:E.value.config.outerRectW,"onUpdate:modelValue":S[70]||(S[70]=C=>E.value.config.outerRectW=C)},null,8,["min","modelValue"]),Ue(qe,{label:"外高",min:E.value.config.innerRectH,max:400,step:1,modelValue:E.value.config.outerRectH,"onUpdate:modelValue":S[71]||(S[71]=C=>E.value.config.outerRectH=C)},null,8,["min","modelValue"])],64)):E.value.config.shape==="path"?(ie(),ae(Ke,{key:3},[M("label",ZD,[S[267]||(S[267]=M("span",null,"选择路径",-1)),ye(M("select",{"onUpdate:modelValue":S[72]||(S[72]=C=>E.value.config.spawnPathId=C),class:"inp",onChange:Ga},[S[266]||(S[266]=M("option",{value:0},"无路径(点发射)",-1)),(ie(!0),ae(Ke,null,ci(ke(e).paths,C=>(ie(),ae("option",{key:C.id,value:C.id,disabled:!C.enabled},Xe(C.name),9,JD))),128))],544),[[Ht,E.value.config.spawnPathId,void 0,{number:!0}]])]),E.value.config.spawnPathId>0?(ie(),ae("label",QD,[S[269]||(S[269]=M("span",null,"出生分布",-1)),ye(M("select",{"onUpdate:modelValue":S[73]||(S[73]=C=>E.value.config.spawnPathDistribution=C),class:"inp"},[...S[268]||(S[268]=[M("option",{value:"fixed"},"等间距固定分布",-1),M("option",{value:"random"},"随机分布",-1)])],512),[[Ht,E.value.config.spawnPathDistribution]])])):Ve("",!0)],64)):Ve("",!0),S[273]||(S[273]=M("div",{class:"divider"},null,-1)),M("label",eN,[S[272]||(S[272]=M("span",null,"发射角度",-1)),ye(M("select",{"onUpdate:modelValue":S[74]||(S[74]=C=>E.value.config.emissionAngleMode=C),class:"inp"},[S[270]||(S[270]=M("option",{value:"fixed"},"固定",-1)),S[271]||(S[271]=M("option",{value:"random"},"随机",-1)),E.value.config.shape==="circle"||E.value.config.shape==="rect"||E.value.config.shape==="cone"?(ie(),ae("option",tN,"径向(中心向外)")):Ve("",!0),E.value.config.shape==="path"&&E.value.config.spawnPathId>0?(ie(),ae("option",iN,"垂直于路径")):Ve("",!0),E.value.config.shape==="path"&&E.value.config.spawnPathId>0?(ie(),ae("option",sN,"沿路径方向")):Ve("",!0)],512),[[Ht,E.value.config.emissionAngleMode]])]),E.value.config.emissionAngleMode==="fixed"?(ie(),Jt(qe,{key:4,label:"固定角度",min:-360,max:360,step:1,modelValue:E.value.config.direction,"onUpdate:modelValue":S[75]||(S[75]=C=>E.value.config.direction=C)},null,8,["modelValue"])):E.value.config.emissionAngleMode==="random"?(ie(),ae(Ke,{key:5},[Ue(qe,{label:"基准角度",min:-360,max:360,step:1,modelValue:E.value.config.direction,"onUpdate:modelValue":S[76]||(S[76]=C=>E.value.config.direction=C)},null,8,["modelValue"]),Ue(qe,{label:"随机范围",min:0,max:360,step:1,modelValue:E.value.config.spread,"onUpdate:modelValue":S[77]||(S[77]=C=>E.value.config.spread=C)},null,8,["modelValue"])],64)):Ve("",!0)],512),[[Yi,!le.shape]])]),M("div",nN,[M("div",{class:"group-head",onClick:S[79]||(S[79]=C=>Oe("attr"))},[M("span",rN,Xe(le.attr?"▸":"▾"),1),S[274]||(S[274]=M("span",null,"粒子属性",-1)),M("button",{class:"group-reset",title:"重置粒子属性参数",onClick:S[78]||(S[78]=bt(C=>zi("attr"),["stop"]))},"重置")]),ye(M("div",aN,[S[282]||(S[282]=M("div",{class:"attr-section-title"},"粒子初始参数",-1)),Ue(jn,{label:"初始生命周期","allow-curve":!1,mode:E.value.config.lifeMode,"onUpdate:mode":S[80]||(S[80]=C=>E.value.config.lifeMode=C),"value-min":E.value.config.lifeMin,"onUpdate:valueMin":S[81]||(S[81]=C=>E.value.config.lifeMin=C),"value-max":E.value.config.lifeMax,"onUpdate:valueMax":S[82]||(S[82]=C=>E.value.config.lifeMax=C),curve:E.value.config.lifeCurve,"onUpdate:curve":S[83]||(S[83]=C=>E.value.config.lifeCurve=C),min:.1,max:10,step:.1,"curve-label":"随机采样 →"},null,8,["mode","value-min","value-max","curve"]),Ue(jn,{label:"初始速度","allow-curve":!1,mode:E.value.config.speedMode,"onUpdate:mode":S[84]||(S[84]=C=>E.value.config.speedMode=C),"value-min":E.value.config.speedMin,"onUpdate:valueMin":S[85]||(S[85]=C=>E.value.config.speedMin=C),"value-max":E.value.config.speedMax,"onUpdate:valueMax":S[86]||(S[86]=C=>E.value.config.speedMax=C),curve:E.value.config.speedCurve,"onUpdate:curve":S[87]||(S[87]=C=>E.value.config.speedCurve=C),min:0,max:1e3,step:1,"curve-label":"随机采样 →"},null,8,["mode","value-min","value-max","curve"]),M("div",oN,[S[275]||(S[275]=M("span",null,"初始缩放",-1)),M("div",lN,[M("button",{class:Ze(["axis-mode",{on:E.value.config.scaleAxisMode==="uniform"}]),onClick:S[88]||(S[88]=C=>E.value.config.scaleAxisMode="uniform")},"统一",2),M("button",{class:Ze(["axis-mode",{on:E.value.config.scaleAxisMode==="separate"}]),onClick:S[89]||(S[89]=C=>E.value.config.scaleAxisMode="separate")},"XY分离",2)])]),Ue(jn,{label:E.value.config.scaleAxisMode==="uniform"?"初始缩放":"缩放 X","allow-curve":!1,mode:E.value.config.scaleMode,"onUpdate:mode":S[90]||(S[90]=C=>E.value.config.scaleMode=C),"value-min":E.value.config.scaleMin,"onUpdate:valueMin":S[91]||(S[91]=C=>E.value.config.scaleMin=C),"value-max":E.value.config.scaleMax,"onUpdate:valueMax":S[92]||(S[92]=C=>E.value.config.scaleMax=C),curve:E.value.config.scaleCurve,"onUpdate:curve":S[93]||(S[93]=C=>E.value.config.scaleCurve=C),min:0,max:5,step:.05,"curve-label":"随机采样 →"},null,8,["label","mode","value-min","value-max","curve"]),E.value.config.scaleAxisMode==="separate"?(ie(),Jt(jn,{key:0,label:"缩放 Y","show-modes":!1,"allow-curve":!1,mode:E.value.config.scaleMode,"onUpdate:mode":S[94]||(S[94]=C=>E.value.config.scaleMode=C),"value-min":E.value.config.scaleYMin,"onUpdate:valueMin":S[95]||(S[95]=C=>E.value.config.scaleYMin=C),"value-max":E.value.config.scaleYMax,"onUpdate:valueMax":S[96]||(S[96]=C=>E.value.config.scaleYMax=C),curve:E.value.config.scaleYCurve,"onUpdate:curve":S[97]||(S[97]=C=>E.value.config.scaleYCurve=C),min:0,max:5,step:.05,"curve-label":"随机采样 →"},null,8,["mode","value-min","value-max","curve"])):Ve("",!0),Ue(jn,{label:"初始旋转","allow-direction":"","allow-curve":!1,mode:E.value.config.initialRotationMode,"onUpdate:mode":S[98]||(S[98]=C=>E.value.config.initialRotationMode=C),"value-min":E.value.config.initialRotationMin,"onUpdate:valueMin":S[99]||(S[99]=C=>E.value.config.initialRotationMin=C),"value-max":E.value.config.initialRotationMax,"onUpdate:valueMax":S[100]||(S[100]=C=>E.value.config.initialRotationMax=C),curve:E.value.config.initialRotationCurve,"onUpdate:curve":S[101]||(S[101]=C=>E.value.config.initialRotationCurve=C),min:-360,max:360,step:1,"curve-label":"随机采样 →"},null,8,["mode","value-min","value-max","curve"]),S[283]||(S[283]=M("div",{class:"attr-section-title life-title"},"粒子生命周期变化参数",-1)),M("div",cN,[M("label",hN,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[102]||(S[102]=C=>E.value.config.speedOverLifeEnabled=C)},null,512),[[ei,E.value.config.speedOverLifeEnabled]]),S[276]||(S[276]=M("span",{class:"switch-ui"},null,-1)),S[277]||(S[277]=M("span",null,"生命周期内速度",-1))]),E.value.config.speedOverLifeEnabled?(ie(),Jt(jn,{key:0,label:"速度倍率",mode:E.value.config.speedOverLifeMode,"onUpdate:mode":Ps,"value-min":E.value.config.speedOverLifeMin,"onUpdate:valueMin":S[103]||(S[103]=C=>E.value.config.speedOverLifeMin=C),"value-max":E.value.config.speedOverLifeMax,"onUpdate:valueMax":S[104]||(S[104]=C=>E.value.config.speedOverLifeMax=C),curve:E.value.config.speedOverLifeCurve,"onUpdate:curve":S[105]||(S[105]=C=>E.value.config.speedOverLifeCurve=C),"default-curve":te,min:0,max:3,step:.05,"curve-label":"生命周期 →"},null,8,["mode","value-min","value-max","curve"])):Ve("",!0)]),M("div",uN,[M("label",dN,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[106]||(S[106]=C=>E.value.config.scaleOverLifeEnabled=C),onChange:br},null,544),[[ei,E.value.config.scaleOverLifeEnabled]]),S[278]||(S[278]=M("span",{class:"switch-ui"},null,-1)),S[279]||(S[279]=M("span",null,"生命周期内缩放",-1))]),E.value.config.scaleOverLifeEnabled?(ie(),ae(Ke,{key:0},[M("div",fN,[M("button",{class:Ze(["axis-mode",{on:E.value.config.scaleOverLifeAxisMode==="uniform"}]),onClick:S[107]||(S[107]=C=>E.value.config.scaleOverLifeAxisMode="uniform")},"统一",2),M("button",{class:Ze(["axis-mode",{on:E.value.config.scaleOverLifeAxisMode==="separate"}]),onClick:S[108]||(S[108]=C=>E.value.config.scaleOverLifeAxisMode="separate")},"XY分离",2)]),Ue(jn,{label:E.value.config.scaleOverLifeAxisMode==="uniform"?"缩放倍率":"倍率 X",mode:E.value.config.scaleOverLifeMode,"onUpdate:mode":js,"value-min":E.value.config.scaleOverLifeMin,"onUpdate:valueMin":S[109]||(S[109]=C=>E.value.config.scaleOverLifeMin=C),"value-max":E.value.config.scaleOverLifeMax,"onUpdate:valueMax":S[110]||(S[110]=C=>E.value.config.scaleOverLifeMax=C),curve:E.value.config.scaleOverLifeCurve,"onUpdate:curve":S[111]||(S[111]=C=>E.value.config.scaleOverLifeCurve=C),"default-curve":te,min:0,max:3,step:.05,"curve-label":"生命周期 →"},null,8,["label","mode","value-min","value-max","curve"]),E.value.config.scaleOverLifeAxisMode==="separate"?(ie(),Jt(jn,{key:0,label:"倍率 Y","show-modes":!1,mode:E.value.config.scaleOverLifeMode,"onUpdate:mode":S[112]||(S[112]=C=>E.value.config.scaleOverLifeMode=C),"value-min":E.value.config.scaleYOverLifeMin,"onUpdate:valueMin":S[113]||(S[113]=C=>E.value.config.scaleYOverLifeMin=C),"value-max":E.value.config.scaleYOverLifeMax,"onUpdate:valueMax":S[114]||(S[114]=C=>E.value.config.scaleYOverLifeMax=C),curve:E.value.config.scaleYOverLifeCurve,"onUpdate:curve":S[115]||(S[115]=C=>E.value.config.scaleYOverLifeCurve=C),"default-curve":te,min:0,max:3,step:.05,"curve-label":"生命周期 →"},null,8,["mode","value-min","value-max","curve"])):Ve("",!0)],64)):Ve("",!0)]),M("div",mN,[M("label",pN,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[116]||(S[116]=C=>E.value.config.rotationOverLifeEnabled=C)},null,512),[[ei,E.value.config.rotationOverLifeEnabled]]),S[280]||(S[280]=M("span",{class:"switch-ui"},null,-1)),S[281]||(S[281]=M("span",null,"生命周期内旋转",-1))]),E.value.config.rotationOverLifeEnabled?(ie(),Jt(jn,{key:0,label:"旋转速度",mode:E.value.config.rotationOverLifeMode,"onUpdate:mode":S[117]||(S[117]=C=>E.value.config.rotationOverLifeMode=C),"value-min":E.value.config.rotationSpeedMin,"onUpdate:valueMin":S[118]||(S[118]=C=>E.value.config.rotationSpeedMin=C),"value-max":E.value.config.rotationSpeedMax,"onUpdate:valueMax":S[119]||(S[119]=C=>E.value.config.rotationSpeedMax=C),curve:E.value.config.rotationOverLifeCurve,"onUpdate:curve":S[120]||(S[120]=C=>E.value.config.rotationOverLifeCurve=C),"default-curve":j,min:-720,max:720,step:10,"curve-label":"生命周期 →"},null,8,["mode","value-min","value-max","curve"])):Ve("",!0)])],512),[[Yi,!le.attr]])]),M("div",gN,[M("div",{class:"group-head",onClick:S[122]||(S[122]=C=>Oe("look"))},[M("span",vN,Xe(le.look?"▸":"▾"),1),S[284]||(S[284]=M("span",null,"外观与资源",-1)),M("button",{class:"group-reset",title:"重置外观与资源参数",onClick:S[121]||(S[121]=bt(C=>zi("look"),["stop"]))},"重置")]),ye(M("div",yN,[S[298]||(S[298]=M("div",{class:"look-title"},"透明度",-1)),M("div",xN,[M("button",{class:Ze(["seg-btn",{active:E.value.config.alphaMode==="curve"}]),onClick:S[123]||(S[123]=C=>E.value.config.alphaMode="curve")},"曲线",2),M("button",{class:Ze(["seg-btn",{active:E.value.config.alphaMode==="fixed"}]),onClick:S[124]||(S[124]=C=>E.value.config.alphaMode="fixed")},"固定",2)]),E.value.config.alphaMode==="fixed"?(ie(),Jt(qe,{key:0,label:"透明度",min:0,max:1,step:.01,modelValue:E.value.config.alpha,"onUpdate:modelValue":S[125]||(S[125]=C=>E.value.config.alpha=C)},null,8,["modelValue"])):(ie(),ae(Ke,{key:1},[M("label",bN,[S[286]||(S[286]=M("span",null,"曲线模式",-1)),ye(M("select",{"onUpdate:modelValue":S[126]||(S[126]=C=>E.value.config.curveMode=C),class:"inp"},[...S[285]||(S[285]=[M("option",null,"跟随导出",-1),M("option",null,"线性",-1),M("option",null,"贝塞尔",-1)])],512),[[Ht,E.value.config.curveMode]])]),M("div",wN,[Ue(xn,{modelValue:E.value.config.alphaCurve,"onUpdate:modelValue":S[127]||(S[127]=C=>E.value.config.alphaCurve=C),"default-value":he,mode:T(E.value.config.curveMode)},null,8,["modelValue","mode"]),S[287]||(S[287]=M("div",{class:"curve-labels"},[M("span",null,"0(透明)"),M("span",null,"生命周期 →"),M("span",null,"1(不透明)")],-1))])],64)),M("div",{class:"look-title image-title"},[S[288]||(S[288]=M("span",null,"图片资源",-1)),M("button",{class:"image-add",title:"新增图片资源",onClick:Le},"+")]),(ie(!0),ae(Ke,null,ci(E.value.config.imageResources,C=>(ie(),Jt(zv,{key:C.id,resource:C,"resource-count":E.value.config.imageResources.length,"supports-sequence":"","default-file":"star.png",onPick:Te,onPickSequence:je,onReset:Qe,onRemove:Xt,onUpdateWeight:ns,onToggleLock:Ha},{default:ah(()=>[Ue(qe,{label:"缩放",min:.1,max:3,step:.05,modelValue:C.scale,"onUpdate:modelValue":Q=>C.scale=Q},null,8,["modelValue","onUpdate:modelValue"]),M("label",SN,[S[289]||(S[289]=M("span",null,"轴心 x,y",-1)),ye(M("input",{type:"number",step:"0.05",class:"inp tiny","onUpdate:modelValue":Q=>C.anchorX=Q},null,8,MN),[[ht,C.anchorX,void 0,{number:!0}]]),ye(M("input",{type:"number",step:"0.05",class:"inp tiny","onUpdate:modelValue":Q=>C.anchorY=Q},null,8,_N),[[ht,C.anchorY,void 0,{number:!0}]])]),S[297]||(S[297]=M("div",{class:"resource-divider"},null,-1)),M("label",TN,[S[292]||(S[292]=M("span",null,"颜色",-1)),ye(M("select",{"onUpdate:modelValue":Q=>C.colorMode=Q,class:"inp"},[...S[290]||(S[290]=[M("option",{value:"fixed"},"固定色",-1),M("option",{value:"random"},"随机颜色",-1),M("option",{value:"lifetime"},"生命周期",-1)])],8,AN),[[Ht,C.colorMode]]),ye(M("select",{"onUpdate:modelValue":Q=>C.blend=Q,class:"inp blend-select"},[...S[291]||(S[291]=[M("option",{value:"normal"},"正常",-1),M("option",{value:"add"},"相加",-1),M("option",{value:"multiply"},"相乘",-1),M("option",{value:"screen"},"滤色",-1)])],8,EN),[[Ht,C.blend]])]),C.colorMode==="fixed"?(ie(),ae("label",CN,[S[293]||(S[293]=M("span",null,"固定色",-1)),ye(M("input",{type:"color","onUpdate:modelValue":Q=>C.colorStart=Q,class:"colr"},null,8,IN),[[ht,C.colorStart]]),M("input",{type:"text",class:"hex-input",value:C.colorStart,spellcheck:"false","aria-label":"固定颜色值",onChange:Q=>at(C,Q),onKeydown:Ea(Q=>Pe(C,Q),["enter"])},null,40,RN)])):(ie(),ae(Ke,{key:1},[Ue(Wv,{modelValue:C.colorGradient,"onUpdate:modelValue":Q=>C.colorGradient=Q},null,8,["modelValue","onUpdate:modelValue"]),C.colorMode==="random"?(ie(),ae("div",PN,"每个粒子出生时从色带随机取色,生命周期内保持不变")):Ve("",!0)],64)),M("div",kN,[S[294]||(S[294]=M("span",null,"独立透明度",-1)),M("div",FN,[M("button",{class:Ze({on:C.independentAlpha==="off"}),onClick:Q=>C.independentAlpha="off"},"关闭",10,ON),M("button",{class:Ze({on:C.independentAlpha==="fixed"}),onClick:Q=>C.independentAlpha="fixed"},"固定",10,BN),M("button",{class:Ze({on:C.independentAlpha==="curve"}),onClick:Q=>C.independentAlpha="curve"},"曲线",10,LN)])]),C.independentAlpha==="fixed"?(ie(),Jt(qe,{key:2,label:"透明度",min:0,max:1,step:.01,modelValue:C.alpha,"onUpdate:modelValue":Q=>C.alpha=Q},null,8,["modelValue","onUpdate:modelValue"])):C.independentAlpha==="curve"?(ie(),ae(Ke,{key:3},[M("label",DN,[S[296]||(S[296]=M("span",null,"曲线模式",-1)),ye(M("select",{"onUpdate:modelValue":Q=>C.alphaCurveMode=Q,class:"inp"},[...S[295]||(S[295]=[M("option",null,"跟随导出",-1),M("option",null,"线性",-1),M("option",null,"贝塞尔",-1)])],8,NN),[[Ht,C.alphaCurveMode]])]),M("div",UN,[Ue(xn,{modelValue:C.alphaCurve,"onUpdate:modelValue":Q=>C.alphaCurve=Q,"default-value":xe,mode:T(C.alphaCurveMode)},null,8,["modelValue","onUpdate:modelValue","mode"])])],64)):Ve("",!0)]),_:2},1032,["resource","resource-count"]))),128)),M("input",{ref_key:"textureFileInput",ref:Qr,class:"file-input",type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",onChange:rt},null,544),M("input",{ref_key:"sequenceFileInput",ref:Ws,class:"file-input",type:"file",multiple:"",accept:"image/png,image/jpeg,image/webp,image/gif",onChange:Je},null,544)],512),[[Yi,!le.look]])]),M("div",XN,[M("div",{class:"group-head",onClick:S[129]||(S[129]=C=>Oe("mods"))},[M("span",VN,Xe(le.mods?"▸":"▾"),1),S[299]||(S[299]=M("span",null,"修改器",-1)),M("button",{class:"group-reset",title:"重置修改器参数",onClick:S[128]||(S[128]=bt(C=>zi("mods"),["stop"]))},"重置")]),ye(M("div",YN,[M("div",$N,[M("label",GN,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[130]||(S[130]=C=>E.value.config.noise=C)},null,512),[[ei,E.value.config.noise]]),S[300]||(S[300]=M("span",{class:"switch-ui"},null,-1)),S[301]||(S[301]=M("span",null,"开启移动噪声",-1))]),E.value.config.noise?(ie(),ae("div",HN,[Ue(qe,{label:"强度",min:0,max:100,step:1,modelValue:E.value.config.noiseAmt,"onUpdate:modelValue":S[131]||(S[131]=C=>E.value.config.noiseAmt=C)},null,8,["modelValue"]),Ue(qe,{label:"波动范围",min:0,max:500,step:1,modelValue:E.value.config.noiseRange,"onUpdate:modelValue":S[132]||(S[132]=C=>E.value.config.noiseRange=C)},null,8,["modelValue"]),Ue(qe,{label:"时间流速",min:0,max:10,step:.1,modelValue:E.value.config.noiseSpeed,"onUpdate:modelValue":S[133]||(S[133]=C=>E.value.config.noiseSpeed=C)},null,8,["modelValue"]),S[302]||(S[302]=M("div",{class:"modifier-hint"},"强度控制影响比例 · 波动范围控制最大偏移 · 时间流速控制变化速度",-1))])):Ve("",!0)]),M("div",jN,[M("label",WN,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[134]||(S[134]=C=>E.value.config.useGravity=C)},null,512),[[ei,E.value.config.useGravity]]),S[303]||(S[303]=M("span",{class:"switch-ui"},null,-1)),S[304]||(S[304]=M("span",null,"开启重力",-1))]),E.value.config.useGravity?(ie(),ae("div",zN,[M("div",qN,[M("button",{class:Ze(["axis-mode",{on:E.value.config.gravityMode==="fixed"}]),onClick:S[135]||(S[135]=C=>E.value.config.gravityMode="fixed")},"固定",2),M("button",{class:Ze(["axis-mode",{on:E.value.config.gravityMode==="random"}]),onClick:S[136]||(S[136]=C=>E.value.config.gravityMode="random")},"随机",2)]),E.value.config.gravityMode==="fixed"?(ie(),Jt(qe,{key:0,label:"重力强度",min:-3e3,max:3e3,step:10,modelValue:E.value.config.gravityMin,"onUpdate:modelValue":S[137]||(S[137]=C=>E.value.config.gravityMin=C)},null,8,["modelValue"])):(ie(),ae(Ke,{key:1},[Ue(qe,{label:"强度 min",min:-3e3,max:3e3,step:10,modelValue:E.value.config.gravityMin,"onUpdate:modelValue":S[138]||(S[138]=C=>E.value.config.gravityMin=C)},null,8,["modelValue"]),Ue(qe,{label:"强度 max",min:-3e3,max:3e3,step:10,modelValue:E.value.config.gravityMax,"onUpdate:modelValue":S[139]||(S[139]=C=>E.value.config.gravityMax=C)},null,8,["modelValue"])],64)),Ue(qe,{label:"方向",min:-360,max:360,step:1,modelValue:E.value.config.gravityDirection,"onUpdate:modelValue":S[140]||(S[140]=C=>E.value.config.gravityDirection=C)},null,8,["modelValue"]),S[305]||(S[305]=M("div",{class:"gravity-curve-title"},[M("span",null,"生命周期内重力"),M("span",null,"纵轴:强度 0~1")],-1)),Ue(xn,{modelValue:E.value.config.gravityCurve,"onUpdate:modelValue":S[141]||(S[141]=C=>E.value.config.gravityCurve=C),"default-value":te},null,8,["modelValue"]),S[306]||(S[306]=M("div",{class:"gravity-curve-axis"},[M("span",null,"0"),M("span",null,"生命周期 →"),M("span",null,"1")],-1)),S[307]||(S[307]=M("div",{class:"modifier-hint"},"0° 向右 · -90° 向下 · 负强度会反转方向",-1))])):Ve("",!0)]),M("div",KN,[M("label",ZN,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[142]||(S[142]=C=>E.value.config.wind=C)},null,512),[[ei,E.value.config.wind]]),S[308]||(S[308]=M("span",{class:"switch-ui"},null,-1)),S[309]||(S[309]=M("span",null,"开启风力",-1))]),E.value.config.wind?(ie(),ae("div",JN,[M("div",QN,[M("button",{class:Ze(["axis-mode",{on:E.value.config.windMode==="fixed"}]),onClick:S[143]||(S[143]=C=>E.value.config.windMode="fixed")},"固定",2),M("button",{class:Ze(["axis-mode",{on:E.value.config.windMode==="random"}]),onClick:S[144]||(S[144]=C=>E.value.config.windMode="random")},"随机",2)]),E.value.config.windMode==="fixed"?(ie(),Jt(qe,{key:0,label:"风力强度",min:-3e3,max:3e3,step:10,modelValue:E.value.config.windMin,"onUpdate:modelValue":S[145]||(S[145]=C=>E.value.config.windMin=C)},null,8,["modelValue"])):(ie(),ae(Ke,{key:1},[Ue(qe,{label:"强度 min",min:-3e3,max:3e3,step:10,modelValue:E.value.config.windMin,"onUpdate:modelValue":S[146]||(S[146]=C=>E.value.config.windMin=C)},null,8,["modelValue"]),Ue(qe,{label:"强度 max",min:-3e3,max:3e3,step:10,modelValue:E.value.config.windMax,"onUpdate:modelValue":S[147]||(S[147]=C=>E.value.config.windMax=C)},null,8,["modelValue"])],64)),Ue(qe,{label:"方向",min:-360,max:360,step:1,modelValue:E.value.config.windDirection,"onUpdate:modelValue":S[148]||(S[148]=C=>E.value.config.windDirection=C)},null,8,["modelValue"]),S[310]||(S[310]=M("div",{class:"gravity-curve-title"},[M("span",null,"生命周期内风力"),M("span",null,"纵轴:强度 0~1")],-1)),Ue(xn,{modelValue:E.value.config.windCurve,"onUpdate:modelValue":S[149]||(S[149]=C=>E.value.config.windCurve=C),"default-value":te},null,8,["modelValue"]),S[311]||(S[311]=M("div",{class:"gravity-curve-axis"},[M("span",null,"0"),M("span",null,"生命周期 →"),M("span",null,"1")],-1)),S[312]||(S[312]=M("div",{class:"modifier-hint"},"0° 向右 · -90° 向下 · 负强度会反转方向",-1))])):Ve("",!0)]),M("div",e5,[M("label",t5,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[150]||(S[150]=C=>E.value.config.forceField=C)},null,512),[[ei,E.value.config.forceField]]),S[313]||(S[313]=M("span",{class:"switch-ui"},null,-1)),S[314]||(S[314]=M("span",null,"开启力场",-1))]),E.value.config.forceField?(ie(),ae("div",i5,[Ue(qe,{label:"中心 X",min:-5e3,max:5e3,step:1,modelValue:E.value.config.forceCenterX,"onUpdate:modelValue":S[151]||(S[151]=C=>E.value.config.forceCenterX=C)},null,8,["modelValue"]),Ue(qe,{label:"中心 Y",min:-5e3,max:5e3,step:1,modelValue:E.value.config.forceCenterY,"onUpdate:modelValue":S[152]||(S[152]=C=>E.value.config.forceCenterY=C)},null,8,["modelValue"]),Ue(qe,{label:"力场强度",min:-300,max:300,step:1,modelValue:E.value.config.forceStrength,"onUpdate:modelValue":S[153]||(S[153]=C=>E.value.config.forceStrength=C)},null,8,["modelValue"]),Ue(qe,{label:"力场半径",min:1,max:2e3,step:1,modelValue:E.value.config.forceRadius,"onUpdate:modelValue":S[154]||(S[154]=C=>E.value.config.forceRadius=C)},null,8,["modelValue"]),M("label",s5,[S[316]||(S[316]=M("span",null,"衰减模式",-1)),ye(M("select",{"onUpdate:modelValue":S[155]||(S[155]=C=>E.value.config.forceFalloff=C),class:"inp"},[...S[315]||(S[315]=[M("option",{value:"constant"},"恒定(范围内力度不变)",-1),M("option",{value:"linear"},"线性衰减(边缘为 0)",-1),M("option",{value:"inverse"},"距离反比(中心最强)",-1)])],512),[[Ht,E.value.config.forceFalloff]])]),S[317]||(S[317]=M("div",{class:"modifier-hint"},"正数吸向中心 · 负数向外排斥 · 可在画布内拖动力场圆",-1))])):Ve("",!0)]),M("div",n5,[M("label",r5,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[156]||(S[156]=C=>E.value.config.attraction=C)},null,512),[[ei,E.value.config.attraction]]),S[318]||(S[318]=M("span",{class:"switch-ui"},null,-1)),S[319]||(S[319]=M("span",null,"开启吸附",-1))]),E.value.config.attraction?(ie(),ae("div",a5,[Ue(qe,{label:"吸附点 X",min:-5e3,max:5e3,step:1,modelValue:E.value.config.attractionCenterX,"onUpdate:modelValue":S[157]||(S[157]=C=>E.value.config.attractionCenterX=C)},null,8,["modelValue"]),Ue(qe,{label:"吸附点 Y",min:-5e3,max:5e3,step:1,modelValue:E.value.config.attractionCenterY,"onUpdate:modelValue":S[158]||(S[158]=C=>E.value.config.attractionCenterY=C)},null,8,["modelValue"]),Ue(qe,{label:"吸附半径",min:0,max:2e3,step:1,modelValue:E.value.config.attractionRadius,"onUpdate:modelValue":S[159]||(S[159]=C=>E.value.config.attractionRadius=C)},null,8,["modelValue"]),Ue(qe,{label:"吸附时长",min:.05,max:30,step:.05,modelValue:E.value.config.attractionDuration,"onUpdate:modelValue":S[160]||(S[160]=C=>E.value.config.attractionDuration=C)},null,8,["modelValue"]),Ue(qe,{label:"延迟时间",min:0,max:30,step:.05,modelValue:E.value.config.attractionDelay,"onUpdate:modelValue":S[161]||(S[161]=C=>E.value.config.attractionDelay=C)},null,8,["modelValue"]),M("label",o5,[S[321]||(S[321]=M("span",null,"延迟方式",-1)),ye(M("select",{"onUpdate:modelValue":S[162]||(S[162]=C=>E.value.config.attractionDelayMode=C),class:"inp"},[...S[320]||(S[320]=[M("option",{value:"global"},"统一时间",-1),M("option",{value:"particle"},"单粒子生命",-1)])],512),[[Ht,E.value.config.attractionDelayMode]])]),M("label",l5,[S[323]||(S[323]=M("span",null,"吸附方式",-1)),ye(M("select",{"onUpdate:modelValue":S[163]||(S[163]=C=>E.value.config.attractionPath=C),class:"inp"},[...S[322]||(S[322]=[M("option",{value:"linear"},"直线",-1),M("option",{value:"curve"},"曲线",-1)])],512),[[Ht,E.value.config.attractionPath]])]),S[324]||(S[324]=M("div",{class:"modifier-hint"},"延迟后从当前位置开始吸附 · 到达红色范围即死亡 · 可在画布内拖动吸附圆",-1))])):Ve("",!0)]),M("div",c5,[M("label",h5,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[164]||(S[164]=C=>E.value.config.trail=C)},null,512),[[ei,E.value.config.trail]]),S[325]||(S[325]=M("span",{class:"switch-ui"},null,-1)),S[326]||(S[326]=M("span",null,"开启拖尾",-1))]),E.value.config.trail?(ie(),ae("div",u5,[M("div",{class:"trail-section-head"},[S[327]||(S[327]=M("div",{class:"trail-section-title"},"拖尾独立图片",-1)),M("button",{class:"image-add",title:"增加拖尾图片资源",onClick:ea},"+")]),(ie(!0),ae(Ke,null,ci(E.value.config.trailResources,C=>(ie(),Jt(zv,{key:C.id,resource:C,"resource-count":E.value.config.trailResources.length,"default-file":"trail.png","name-placeholder":"trail","show-folder":!1,onPick:ta,onReset:ue,onRemove:ve,onUpdateWeight:Me,onToggleLock:be},{default:ah(()=>[S[343]||(S[343]=M("div",{class:"resource-divider"},null,-1)),Ue(qe,{label:"旋转",min:-360,max:360,step:1,"model-value":C.rotation,"onUpdate:modelValue":Q=>ee(C.id,Q)},null,8,["model-value","onUpdate:modelValue"]),Ue(qe,{label:"拖尾骨骼数",min:2,max:16,step:1,"model-value":C.boneCount,"onUpdate:modelValue":Q=>Y(C.id,Q)},null,8,["model-value","onUpdate:modelValue"]),Ue(qe,{label:"拖尾比例 (%)",min:0,max:100,step:1,modelValue:C.trailRatio,"onUpdate:modelValue":Q=>C.trailRatio=Q},null,8,["modelValue","onUpdate:modelValue"]),M("label",d5,[S[329]||(S[329]=M("span",null,"拖尾长度",-1)),ye(M("select",{"onUpdate:modelValue":Q=>C.lengthMode=Q,class:"inp"},[...S[328]||(S[328]=[M("option",{value:"fixed"},"固定",-1),M("option",{value:"random"},"随机范围",-1)])],8,f5),[[Ht,C.lengthMode]])]),C.lengthMode==="fixed"?(ie(),Jt(qe,{key:0,label:"长度比例 (%)",min:0,max:500,step:1,modelValue:C.length,"onUpdate:modelValue":Q=>C.length=Q},null,8,["modelValue","onUpdate:modelValue"])):(ie(),ae(Ke,{key:1},[Ue(qe,{label:"长度最小 (%)",min:0,max:500,step:1,modelValue:C.lengthMin,"onUpdate:modelValue":Q=>C.lengthMin=Q},null,8,["modelValue","onUpdate:modelValue"]),Ue(qe,{label:"长度最大 (%)",min:0,max:500,step:1,modelValue:C.lengthMax,"onUpdate:modelValue":Q=>C.lengthMax=Q},null,8,["modelValue","onUpdate:modelValue"])],64)),M("label",m5,[S[331]||(S[331]=M("span",null,"拖尾宽度",-1)),ye(M("select",{"onUpdate:modelValue":Q=>C.widthSizeMode=Q,class:"inp"},[...S[330]||(S[330]=[M("option",{value:"fixed"},"固定",-1),M("option",{value:"random"},"随机范围",-1)])],8,p5),[[Ht,C.widthSizeMode]])]),C.widthSizeMode==="fixed"?(ie(),Jt(qe,{key:2,label:"宽度比例 (%)",min:0,max:500,step:1,modelValue:C.width,"onUpdate:modelValue":Q=>C.width=Q},null,8,["modelValue","onUpdate:modelValue"])):(ie(),ae(Ke,{key:3},[Ue(qe,{label:"宽度最小 (%)",min:0,max:500,step:1,modelValue:C.widthMin,"onUpdate:modelValue":Q=>C.widthMin=Q},null,8,["modelValue","onUpdate:modelValue"]),Ue(qe,{label:"宽度最大 (%)",min:0,max:500,step:1,modelValue:C.widthMax,"onUpdate:modelValue":Q=>C.widthMax=Q},null,8,["modelValue","onUpdate:modelValue"])],64)),M("label",g5,[S[333]||(S[333]=M("span",null,"宽度缩放",-1)),ye(M("select",{"onUpdate:modelValue":Q=>C.widthMode=Q,class:"inp"},[...S[332]||(S[332]=[M("option",{value:"particle"},"跟随粒子",-1),M("option",{value:"fixed"},"固定",-1)])],8,v5),[[Ht,C.widthMode]])]),M("label",y5,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Q=>C.lifeLengthEnabled=Q},null,8,x5),[[ei,C.lifeLengthEnabled]]),S[334]||(S[334]=M("span",{class:"switch-ui"},null,-1)),S[335]||(S[335]=M("span",null,"生命周期长度曲线",-1))]),C.lifeLengthEnabled?(ie(),Jt(xn,{key:4,modelValue:C.lifeLengthCurve,"onUpdate:modelValue":Q=>C.lifeLengthCurve=Q,"default-value":te},null,8,["modelValue","onUpdate:modelValue"])):Ve("",!0),M("label",b5,[ye(M("input",{type:"checkbox","onUpdate:modelValue":Q=>C.shapeEnabled=Q},null,8,w5),[[ei,C.shapeEnabled]]),S[336]||(S[336]=M("span",{class:"switch-ui"},null,-1)),S[337]||(S[337]=M("span",null,"形状曲线(首端 → 尾端宽度)",-1))]),C.shapeEnabled?(ie(),Jt(xn,{key:5,modelValue:C.shapeCurve,"onUpdate:modelValue":Q=>C.shapeCurve=Q,"default-value":ge},null,8,["modelValue","onUpdate:modelValue"])):Ve("",!0),M("div",S5,[S[338]||(S[338]=M("span",null,"颜色模式",-1)),M("div",M5,[M("button",{class:Ze(["axis-mode",{on:C.colorMode==="particle"}]),onClick:Q=>C.colorMode="particle"},"跟随粒子",10,_5),M("button",{class:Ze(["axis-mode",{on:C.colorMode==="fixed"}]),onClick:Q=>C.colorMode="fixed"},"固定",10,T5),M("button",{class:Ze(["axis-mode",{on:C.colorMode==="curve"}]),onClick:Q=>C.colorMode="curve"},"曲线",10,A5)])]),M("label",E5,[S[340]||(S[340]=M("span",null,"混合模式",-1)),ye(M("select",{"onUpdate:modelValue":Q=>C.blend=Q,class:"inp"},[...S[339]||(S[339]=[M("option",{value:"normal"},"正常",-1),M("option",{value:"add"},"相加",-1),M("option",{value:"multiply"},"相乘",-1),M("option",{value:"screen"},"滤色",-1)])],8,C5),[[Ht,C.blend]])]),C.colorMode==="fixed"?(ie(),ae("label",I5,[S[341]||(S[341]=M("span",null,"固定颜色",-1)),ye(M("input",{class:"colr",type:"color","onUpdate:modelValue":Q=>C.color=Q},null,8,R5),[[ht,C.color]]),M("input",{class:"hex-input",value:C.color,onChange:Q=>De(C,Q),onKeydown:Ea(bt(Q=>Ie(C,Q),["prevent"]),["enter"])},null,40,P5)])):C.colorMode==="curve"?(ie(),Jt(Wv,{key:7,modelValue:C.colorGradient,"onUpdate:modelValue":Q=>C.colorGradient=Q},null,8,["modelValue","onUpdate:modelValue"])):Ve("",!0),M("div",k5,[S[342]||(S[342]=M("span",null,"透明度模式",-1)),M("div",F5,[M("button",{class:Ze(["axis-mode",{on:C.alphaMode==="particle"}]),onClick:Q=>C.alphaMode="particle"},"跟随粒子",10,O5),M("button",{class:Ze(["axis-mode",{on:C.alphaMode==="fixed"}]),onClick:Q=>C.alphaMode="fixed"},"固定",10,B5),M("button",{class:Ze(["axis-mode",{on:C.alphaMode==="curve"}]),onClick:Q=>C.alphaMode="curve"},"曲线",10,L5)])]),C.alphaMode==="fixed"?(ie(),Jt(qe,{key:8,label:"透明度",min:0,max:1,step:.01,modelValue:C.alpha,"onUpdate:modelValue":Q=>C.alpha=Q},null,8,["modelValue","onUpdate:modelValue"])):Ve("",!0),C.alphaMode==="curve"?(ie(),Jt(xn,{key:9,modelValue:C.alphaCurve,"onUpdate:modelValue":Q=>C.alphaCurve=Q,"default-value":oe},null,8,["modelValue","onUpdate:modelValue"])):Ve("",!0)]),_:2},1032,["resource","resource-count"]))),128)),M("input",{ref_key:"trailTextureFileInput",ref:Vn,class:"file-input",type:"file",accept:"image/png,image/jpeg,image/webp",onChange:ne},null,544),M("div",D5,[Ue(qe,{label:"网格行数",min:2,max:16,step:1,"model-value":E.value.config.trailGridRows,"onUpdate:modelValue":S[165]||(S[165]=C=>H("trailGridRows",C))},null,8,["model-value"]),Ue(qe,{label:"网格列数",min:2,max:32,step:1,"model-value":E.value.config.trailGridCols,"onUpdate:modelValue":S[166]||(S[166]=C=>H("trailGridCols",C))},null,8,["model-value"])]),S[344]||(S[344]=M("div",{class:"modifier-hint"},"每个粒子按资源比例生成一组同级拖尾骨骼;随机长度与宽度在粒子出生时确定,相同种子可稳定复现",-1))])):Ve("",!0)]),M("div",N5,[M("label",U5,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[167]||(S[167]=C=>E.value.config.emitterFollow=C),disabled:E.value.config.streamBehavior==="loop"},null,8,X5),[[ei,E.value.config.emitterFollow]]),S[345]||(S[345]=M("span",{class:"switch-ui"},null,-1)),S[346]||(S[346]=M("span",null,"开启发射器跟随",-1))]),E.value.config.emitterFollow&&E.value.config.streamBehavior!=="loop"?(ie(),ae("div",V5,[M("label",Y5,[S[349]||(S[349]=M("span",null,"跟随模式",-1)),M("select",{value:E.value.config.emitterFollowMode,class:"inp",onChange:S[168]||(S[168]=C=>Kt(C,E.value.config))},[S[347]||(S[347]=M("option",{value:"none"},"无",-1)),S[348]||(S[348]=M("option",{value:"path"},"跟随路径",-1)),we.value||E.value.config.emitterFollowMode==="bone"?(ie(),ae("option",G5,"选中的骨骼")):Ve("",!0)],40,$5)]),E.value.config.emitterFollowMode==="path"?(ie(),ae(Ke,{key:0},[M("label",H5,[S[351]||(S[351]=M("span",null,"跟随路径",-1)),ye(M("select",{"onUpdate:modelValue":S[169]||(S[169]=C=>E.value.config.emitterFollowPathId=C),class:"inp"},[S[350]||(S[350]=M("option",{value:0},"无",-1)),(ie(!0),ae(Ke,null,ci(ke(e).paths,C=>(ie(),ae("option",{key:C.id,value:C.id},Xe(C.name),9,j5))),128))],512),[[Ht,E.value.config.emitterFollowPathId,void 0,{number:!0}]])]),M("label",W5,[S[353]||(S[353]=M("span",null,"发射器角度模式",-1)),ye(M("select",{"onUpdate:modelValue":S[170]||(S[170]=C=>E.value.config.emitterAngleMode=C),class:"inp"},[...S[352]||(S[352]=[M("option",{value:"fixed"},"固定角度",-1),M("option",{value:"direction"},"跟随移动方向",-1)])],512),[[Ht,E.value.config.emitterAngleMode]])]),S[359]||(S[359]=M("div",{class:"gravity-curve-title"},[M("span",null,"移动进度曲线 (0→1)")],-1)),Ue(xn,{modelValue:E.value.config.emitterFollowCurve,"onUpdate:modelValue":S[171]||(S[171]=C=>E.value.config.emitterFollowCurve=C),"default-value":j},null,8,["modelValue"]),M("div",z5,[M("label",q5,[S[354]||(S[354]=M("span",null,"移动时长 (s)",-1)),ye(M("input",{"onUpdate:modelValue":S[172]||(S[172]=C=>E.value.config.emitterFollowDuration=C),type:"number",min:"0.05",step:"0.05",class:"inp"},null,512),[[ht,E.value.config.emitterFollowDuration,void 0,{number:!0}]])]),M("label",K5,[S[356]||(S[356]=M("span",null,"跟随空间",-1)),ye(M("select",{"onUpdate:modelValue":S[173]||(S[173]=C=>E.value.config.emitterFollowSpace=C),class:"inp"},[...S[355]||(S[355]=[M("option",{value:"local"},"局部空间(GEN 移动)",-1),M("option",{value:"world"},"世界空间(粒子生成点移动)",-1)])],512),[[Ht,E.value.config.emitterFollowSpace]])])]),M("label",Z5,[S[358]||(S[358]=M("span",null,"移动方向",-1)),ye(M("select",{"onUpdate:modelValue":S[174]||(S[174]=C=>E.value.config.emitterFollowDirection=C),class:"inp"},[...S[357]||(S[357]=[M("option",{value:"forward"},"正向(起点 → 终点)",-1),M("option",{value:"reverse"},"反向(终点 → 起点)",-1)])],512),[[Ht,E.value.config.emitterFollowDirection]])]),Ue(qe,{label:"偏移起始点 (0-1)",min:0,max:1,step:.01,modelValue:E.value.config.emitterFollowOffset,"onUpdate:modelValue":S[175]||(S[175]=C=>E.value.config.emitterFollowOffset=C)},null,8,["modelValue"]),S[360]||(S[360]=M("div",{class:"modifier-hint"},"局部空间会移动整个发射器;世界空间只移动新粒子的生成点,已出生粒子留在世界位置。",-1))],64)):E.value.config.emitterFollowMode==="bone"?(ie(),ae(Ke,{key:1},[Ee.value?(ie(),ae("div",J5,[S[361]||(S[361]=Qt("跟随目标:",-1)),M("strong",null,Xe(Ee.value.spine.name)+" / "+Xe(Ee.value.boneName),1)])):(ie(),ae("div",Q5,"尚未绑定有效骨骼,请先在 Spine 层级树中选择骨骼。")),we.value&&(!Ee.value||we.value.spine.id!==Ee.value.spine.id||we.value.boneName!==Ee.value.boneName)?(ie(),ae("button",{key:2,class:"bone-follow-rebind",onClick:S[176]||(S[176]=C=>Ti(E.value.config))},Xe(Ee.value?"重新绑定":"绑定")+"当前选中骨骼:"+Xe(we.value.spine.name)+" / "+Xe(we.value.boneName),1)):Ve("",!0),Ee.value?(ie(),ae(Ke,{key:3},[M("label",e8,[S[363]||(S[363]=M("span",null,"跟随空间",-1)),ye(M("select",{"onUpdate:modelValue":S[177]||(S[177]=C=>E.value.config.emitterFollowSpace=C),class:"inp"},[...S[362]||(S[362]=[M("option",{value:"local"},"本地空间(随骨骼移动)",-1),M("option",{value:"world"},"世界空间(粒子生成后保持位置)",-1)])],512),[[Ht,E.value.config.emitterFollowSpace]])]),M("div",t8,[M("label",i8,[S[364]||(S[364]=M("span",null,"位移偏移 X",-1)),ye(M("input",{"onUpdate:modelValue":S[178]||(S[178]=C=>E.value.config.emitterFollowBoneOffsetX=C),type:"number",step:"1",class:"inp"},null,512),[[ht,E.value.config.emitterFollowBoneOffsetX,void 0,{number:!0}]])]),M("label",s8,[S[365]||(S[365]=M("span",null,"位移偏移 Y",-1)),ye(M("input",{"onUpdate:modelValue":S[179]||(S[179]=C=>E.value.config.emitterFollowBoneOffsetY=C),type:"number",step:"1",class:"inp"},null,512),[[ht,E.value.config.emitterFollowBoneOffsetY,void 0,{number:!0}]])])]),M("div",n8,[M("label",r8,[S[366]||(S[366]=M("span",null,"旋转偏移",-1)),ye(M("input",{"onUpdate:modelValue":S[180]||(S[180]=C=>E.value.config.emitterFollowBoneRotation=C),type:"number",step:"1",class:"inp"},null,512),[[ht,E.value.config.emitterFollowBoneRotation,void 0,{number:!0}]])]),M("label",a8,[S[367]||(S[367]=M("span",null,"缩放偏移 X",-1)),ye(M("input",{"onUpdate:modelValue":S[181]||(S[181]=C=>E.value.config.emitterFollowBoneScaleX=C),type:"number",step:"0.05",class:"inp"},null,512),[[ht,E.value.config.emitterFollowBoneScaleX,void 0,{number:!0}]])]),M("label",o8,[S[368]||(S[368]=M("span",null,"缩放偏移 Y",-1)),ye(M("input",{"onUpdate:modelValue":S[182]||(S[182]=C=>E.value.config.emitterFollowBoneScaleY=C),type:"number",step:"0.05",class:"inp"},null,512),[[ht,E.value.config.emitterFollowBoneScaleY,void 0,{number:!0}]])])]),S[369]||(S[369]=M("div",{class:"modifier-hint"},"发射器只跟随所选 Spine 骨骼的位置,不继承 Spine 的旋转或缩放;粒子变换使用粒子系统自身参数和上方偏移。",-1))],64)):Ve("",!0)],64)):Ve("",!0)])):Ve("",!0)]),M("div",l8,[M("label",c8,[ye(M("input",{type:"checkbox","onUpdate:modelValue":S[183]||(S[183]=C=>E.value.config.collision=C)},null,512),[[ei,E.value.config.collision]]),S[370]||(S[370]=M("span",{class:"switch-ui"},null,-1)),S[371]||(S[371]=M("span",null,"开启碰撞",-1))]),E.value.config.collision?(ie(),ae("div",h8,[S[372]||(S[372]=M("div",{class:"collision-filter-title"},"参与的碰撞对象",-1)),M("div",u8,[(ie(!0),ae(Ke,null,ci(Ae.value,C=>(ie(),ae("span",{key:C.id,class:Ze(["collision-filter-tag",{disabled:!C.enabled}]),title:C.enabled?C.name:`${C.name}(碰撞体已禁用)`},[M("span",null,Xe(C.name),1),M("button",{type:"button","aria-label":`清除碰撞对象 ${C.name}`,onClick:Q=>z(C.id)},"×",8,f8)],10,d8))),128)),M("button",{type:"button",class:Ze(["collision-filter-add",{active:pe.value}]),disabled:G.value.length===0,title:G.value.length?"加入场景碰撞对象":"没有可加入的碰撞对象",onClick:S[184]||(S[184]=C=>pe.value=!pe.value)},"+",10,m8)]),Ae.value.length===0?(ie(),ae("div",p8,"未选择碰撞对象,当前粒子不会发生碰撞")):Ve("",!0),pe.value&&G.value.length?(ie(),ae("div",g8,[(ie(!0),ae(Ke,null,ci(G.value,C=>(ie(),ae("button",{key:C.id,type:"button",onClick:Q=>Z(C.id)},[M("span",null,Xe(C.name),1),M("small",null,Xe(C.enabled?"可用":"已禁用"),1)],8,v8))),128))])):Ve("",!0),S[373]||(S[373]=M("div",{class:"modifier-hint"},"只有已加入且启用的场景碰撞对象会参与当前粒子系统的碰撞",-1))])):Ve("",!0)]),Ue(qe,{label:"阻尼",min:0,max:2,step:.05,modelValue:E.value.config.damping,"onUpdate:modelValue":S[185]||(S[185]=C=>E.value.config.damping=C)},null,8,["modelValue"])],512),[[Yi,!le.mods]])]),M("div",y8,[M("div",{class:"group-head",onClick:S[187]||(S[187]=C=>Oe("export"))},[M("span",x8,Xe(le.export?"▸":"▾"),1),S[374]||(S[374]=M("span",null,"导出设置",-1)),M("button",{class:"group-reset",title:"重置导出设置",onClick:S[186]||(S[186]=bt(C=>zi("export"),["stop"]))},"重置")]),ye(M("div",b8,[M("label",w8,[S[375]||(S[375]=M("span",null,"图片路径 (Spine Images Path)",-1)),ye(M("input",{"onUpdate:modelValue":S[188]||(S[188]=C=>t.value.imagesPath=C),class:"inp export-input",type:"text",placeholder:"./images/"},null,512),[[ht,t.value.imagesPath,void 0,{trim:!0}]])]),M("label",S8,[S[377]||(S[377]=M("span",null,"Spine 版本",-1)),ye(M("select",{"onUpdate:modelValue":S[189]||(S[189]=C=>t.value.spineVersion=C),class:"inp export-input"},[...S[376]||(S[376]=[Ts('',5)])],512),[[Ht,t.value.spineVersion]])]),M("label",M8,[S[379]||(S[379]=M("span",null,"关键帧插值曲线",-1)),ye(M("select",{"onUpdate:modelValue":S[190]||(S[190]=C=>t.value.keyframeCurve=C),class:"inp export-input"},[...S[378]||(S[378]=[M("option",{value:"linear"},"线性 (Linear)",-1),M("option",{value:"bezier"},"平滑贝塞尔 (Smooth Bézier)",-1)])],512),[[Ht,t.value.keyframeCurve]])]),S[388]||(S[388]=M("div",{class:"export-help"},"平滑贝塞尔会在误差允许范围内拟合连续运动;出生、死亡、附件切换和突变仍使用阶跃关键帧。",-1)),t.value.spineVersion==="3.8"?(ie(),ae("div",_8,"Spine 3.8 不支持 4.x 的逐通道数组贝塞尔,导出时会转换为经过容差精简的分段线性关键帧。")):Ve("",!0),M("div",T8,[M("label",A8,[S[380]||(S[380]=M("span",null,"导出 FPS",-1)),ye(M("input",{"onUpdate:modelValue":S[191]||(S[191]=C=>t.value.fps=C),class:"inp export-input",type:"number",min:"1",max:"240",step:"1",onChange:dn},null,544),[[ht,t.value.fps,void 0,{number:!0}]])]),M("label",E8,[ye(M("input",{"onUpdate:modelValue":S[192]||(S[192]=C=>t.value.omitFps=C),type:"checkbox"},null,512),[[ei,t.value.omitFps]]),S[381]||(S[381]=Qt("不写 fps",-1))])]),S[389]||(S[389]=M("div",{class:"export-help"},"修改 FPS 时保持动画实际秒数不变;“不写 fps”只省略 Spine 的 fps 元数据。",-1)),M("div",C8,[M("label",I8,[ye(M("input",{"onUpdate:modelValue":S[193]||(S[193]=C=>t.value.integerFrameAlignment=C),type:"checkbox"},null,512),[[ei,t.value.integerFrameAlignment]]),S[382]||(S[382]=M("span",{class:"switch-ui"},null,-1)),S[383]||(S[383]=M("span",null,"整数帧对齐",-1))]),M("label",R8,[ye(M("input",{"onUpdate:modelValue":S[194]||(S[194]=C=>t.value.bonePool=C),type:"checkbox"},null,512),[[ei,t.value.bonePool]]),S[384]||(S[384]=M("span",{class:"switch-ui"},null,-1)),S[385]||(S[385]=M("span",null,"骨骼对象池",-1))]),M("label",P8,[ye(M("input",{"onUpdate:modelValue":S[195]||(S[195]=C=>t.value.excludeEmptyAnimations=C),type:"checkbox"},null,512),[[ei,t.value.excludeEmptyAnimations]]),S[386]||(S[386]=M("span",{class:"switch-ui"},null,-1)),S[387]||(S[387]=M("span",null,"排除无内容动画",-1))])])],512),[[Yi,!le.export]])])],64)):Ve("",!0)]),M("div",k8,[M("button",{type:"button",class:"export-spine-json",disabled:l.value,title:l.value?"正在重新计算并烘焙动画":`导出 Spine ${t.value.spineVersion} JSON`,onClick:L},Xe(l.value&&c.value==="json"?"正在准备导出…":"导出Spine Json"),9,F8),M("button",{type:"button",class:"export-spine-images",disabled:l.value,title:"单独下载当前粒子系统使用的图片 ZIP",onClick:O},Xe(l.value&&c.value==="images"?"正在整理图片…":"导出 images 包"),9,O8),M("button",{type:"button",class:"export-spine-project",disabled:l.value||!b.value,title:A.value,onClick:N},[M("span",null,Xe(l.value&&c.value==="spine"?"正在生成工程…":"导出 .spine 包"),1),!l.value&&w.value?(ie(),ae("small",L8,Xe(w.value),1)):Ve("",!0)],8,B8)]),M("div",{class:Ze(["connector-status",v.value])},[S[390]||(S[390]=M("span",{class:"connector-dot"},null,-1)),Qt(Xe(g.value)+" ",1),y.value?(ie(),ae("a",{key:0,href:y.value,target:"_blank",rel:"noopener",title:"在本机连接器中授权当前网站"},"授权当前网站",8,D8)):Ve("",!0),M("button",{type:"button",title:"重新检测连接器",onClick:B},"刷新")],2),u.value?(ie(),ae("div",{key:0,class:Ze(["export-message",{error:d.value}])},[Qt(Xe(u.value)+" ",1),p.value?(ie(),ae("a",{key:0,href:p.value,target:"_blank",rel:"noopener",onClick:S[196]||(S[196]=C=>p.value="")},"授权当前网站",8,N8)):Ve("",!0)],2)):Ve("",!0)]))}}),X8=Gs(U8,[["__scopeId","data-v-1ace5c57"]]),V8={class:"timeline"},Y8={class:"tl-controls"},$8=["title"],G8={class:"tl-range",title:"自定义播放起始帧"},H8=["max","onKeydown"],j8={class:"tl-range",title:"自定义播放结束帧"},W8=["min","max","onKeydown"],z8=["title"],q8={class:"tl-frame"},K8=["disabled"],Z8=["onClick"],J8={key:0},Q8={class:"tl-animation-editor"},e4={key:0,class:"tl-animation-error"},t4={class:"tl-animation-actions"},i4=["disabled"],s4={key:1,class:"tl-animation-hint"},n4={class:"tl-anim tl-spine-preview"},r4=["value","disabled"],a4={value:""},o4=["value"],l4={class:"tl-zoom"},c4={class:"tl-ticks"},h4={class:"tl-ticklabel"},u4={class:"tl-lanes"},d4=["onPointerdown"],f4={class:"lane-name"},m4=["onPointerdown"],p4=["onPointerdown"],g4=["onPointerdown"],v4={class:"lane-name"},y4={key:0,class:"tl-empty"},x4=$s({__name:"Timeline",setup(s){const e=Kl(),t=lt(null),i=lt(null),n=lt(!1),r=lt("animation"),a=lt("");Jo(()=>{(!Array.isArray(e.timeline.animations)||!e.timeline.animations.length)&&(e.timeline.animations=["animation"]),e.timeline.animations.includes(e.timeline.animation)||(e.timeline.animation=e.timeline.animations[0]);for(const z of e.systems)(!z.animation||!e.timeline.animations.includes(z.animation))&&(z.animation=e.timeline.animations[0])});const o=vt(()=>e.systems.find(z=>z.id===e.activeId)||null),h=vt(()=>{const z=o.value;return!z||!W(z)?null:gb(z.config,m.value)});function l(){o.value&&(n.value=!n.value,r.value=o.value.animation,a.value="")}function c(z){const j=o.value;j&&(e.setSystemAnimation(j.id,z),r.value=z,a.value="")}function u(){const z=e.addAnimation();r.value=z,a.value=""}function d(){var te;const z=((te=o.value)==null?void 0:te.animation)||e.timeline.animation,j=r.value.trim();if(!j){a.value="动画名称不能为空";return}if(j!==z&&e.timeline.animations.includes(j)){a.value="动画名称不能重复";return}if(!e.renameAnimation(z,j)){a.value="无法修改动画名称";return}r.value=j,a.value=""}function f(){var te,he;const z=((te=o.value)==null?void 0:te.animation)||e.timeline.animation;if(!e.removeAnimation(z)){a.value="至少需要保留一个动画";return}const j=((he=o.value)==null?void 0:he.animation)||e.timeline.animation;r.value=j,a.value=""}function p(z){var j;(j=i.value)!=null&&j.contains(z.target)||(n.value=!1)}Kr(()=>document.addEventListener("pointerdown",p)),$l(()=>document.removeEventListener("pointerdown",p));const m=vt(()=>Math.max(1,e.timeline.fps||30)),g=lt(120),v=lt({}),b=lt({}),y=lt({}),w=lt({}),A=lt(String(e.timeline.playbackStart)),T=lt(String(e.timeline.playbackEnd));fs(()=>e.timeline.playbackStart,z=>{A.value=String(z)}),fs(()=>e.timeline.playbackEnd,z=>{T.value=String(z)});const _=vt(()=>e.timeline.totalFrames),R=vt(()=>g.value<=30?"放大":g.value>=300?"缩小":"适中"),P=vt(()=>e.spines.filter(z=>z.selectedAnimation&&z.animations.some(j=>j.name===z.selectedAnimation&&j.duration>0))),F=vt(()=>(e.activeObjectType==="spine"?e.spines.find(j=>j.id===e.activeObjectId&&j.animations.length):null)||e.spines.find(j=>j.animations.length)||null);function I(z){const j=F.value;j&&(j.selectedAnimation=z.target.value,e.recalcTotalFrames(),e.timeline.frame=0)}function k(){e.setPlaybackStart(Number(A.value)),A.value=String(e.timeline.playbackStart)}function B(){e.setPlaybackEnd(Number(T.value)),T.value=String(e.timeline.playbackEnd)}function D(){const z=h.value;z&&(e.setPlaybackEnd(z.end),e.setPlaybackStart(z.start))}function U(){var j;const z=((j=t.value)==null?void 0:j.clientWidth)||600;return g.value/z}const L=vt(()=>{const z=[],j=g.value;let te=1;g.value<=10?te=1:g.value<=50?te=5:g.value<=200?te=10:g.value<=500?te=50:te=100;for(let he=0;he<=j;he+=te)z.push({f:he,px:he/U()});return z}),N=vt(()=>e.timeline.frame/U());function O(z){const j=z.config;return(v.value[z.id]??Math.max(0,Number(j.delay)||0))*m.value/U()}function X(z){const j=z.config,te=Math.max(0,Number(j.lifeMin)||0),he=Math.max(0,Number(j.lifeMax)||0);return j.lifeMode==="fixed"?te:Math.max(te,he)}function E(z){return q(z)}function V(z){if(z.config.mode!=="stream")return 0;if(z.config.streamBehavior==="loop"){const te=z.config;return(y.value[z.id]??Xr(te,m.value).loop)/U()}return(b.value[z.id]??Math.max(1/m.value,Number(z.config.duration)||1))*m.value/U()}function q(z){const j=z.config;return j.mode==="stream"&&j.streamBehavior==="loop"?J(z)+V(z)+K(z):V(z)+X(z)*m.value/U()}function W(z){const j=z.config;return j.mode==="stream"&&j.streamBehavior==="loop"}function J(z){return W(z)?Xr(z.config,m.value).start/U():0}function K(z){return W(z)?Xr(z.config,m.value).end/U():0}function fe(z){var j;return((j=z.animations.find(te=>te.name===z.selectedAnimation))==null?void 0:j.duration)||0}function me(z){return(w.value[z.id]??Math.max(0,Number(z.timeOffset)||0))*m.value/U()}function we(z){return fe(z)*m.value/U()}function Ee(z){const j=z.deltaY<0?.8:1.25;let te=g.value*j;te=Math.min(2e3,Math.max(10,te)),g.value=Math.round(te)}function pe(z){const j=t.value,te=xe=>{const oe=j.getBoundingClientRect(),ge=Math.floor((xe.clientX-oe.left)/oe.width*g.value);e.timeline.frame=Math.max(0,Math.min(ge,_.value-1))};te(z);const he=()=>{window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",he)};window.addEventListener("pointermove",te),window.addEventListener("pointerup",he)}function Ae(z,j){z.stopPropagation();const te=z.clientX,he=Math.max(0,Number(j.config.delay)||0),xe=U()/m.value,oe=Fe=>{const Be=(Fe.clientX-te)*xe,st=Math.max(0,Math.min(he+Be,600));v.value[j.id]=Math.round(st*m.value)/m.value},ge=Fe=>{window.removeEventListener("pointermove",oe),window.removeEventListener("pointerup",le),window.removeEventListener("pointercancel",Oe);const Be=v.value[j.id];delete v.value[j.id],Fe&&Be!=null&&Be!==he&&(j.config.delay=Be)},le=()=>ge(!0),Oe=()=>ge(!1);window.addEventListener("pointermove",oe),window.addEventListener("pointerup",le),window.addEventListener("pointercancel",Oe)}function G(z,j){var At;z.stopPropagation();const te=W(j),he=Math.max(0,Number(j.config.duration)||0),xe=Xr(j.config,m.value).loop,oe=U()/m.value,ge=((At=z.currentTarget.closest(".lane-bar"))==null?void 0:At.getBoundingClientRect().left)??z.clientX,le=J(j);let Oe=!1;const Fe=Et=>{if(Oe=!0,te){const It=Math.min(1800,Math.max(1,Math.round((Et.clientX-ge-le)/U())));y.value[j.id]=It}else{const It=Math.max(1/m.value,Math.min((Et.clientX-ge)*oe,600));b.value[j.id]=Math.round(It*m.value)/m.value}},Be=Et=>{window.removeEventListener("pointermove",Fe),window.removeEventListener("pointerup",st),window.removeEventListener("pointercancel",St);const It=b.value[j.id],Kt=y.value[j.id];delete b.value[j.id],delete y.value[j.id],Et&&Oe&&te&&Kt!=null&&Kt!==xe?j.config.loopDurationFrames=Kt:Et&&Oe&&!te&&It!=null&&It!==he&&(j.config.duration=It)},st=()=>Be(!0),St=()=>Be(!1);window.addEventListener("pointermove",Fe),window.addEventListener("pointerup",st),window.addEventListener("pointercancel",St)}function Z(z,j){z.stopPropagation();const te=z.clientX,he=Math.max(0,Number(j.timeOffset)||0),xe=U()/m.value,oe=Fe=>{const Be=Math.max(0,Math.min(he+(Fe.clientX-te)*xe,600));w.value[j.id]=Math.round(Be*m.value)/m.value},ge=Fe=>{window.removeEventListener("pointermove",oe),window.removeEventListener("pointerup",le),window.removeEventListener("pointercancel",Oe);const Be=w.value[j.id];delete w.value[j.id],Fe&&Be!=null&&Be!==he&&(j.timeOffset=Be,e.recalcTotalFrames())},le=()=>ge(!0),Oe=()=>ge(!1);window.addEventListener("pointermove",oe),window.addEventListener("pointerup",le),window.addEventListener("pointercancel",Oe)}return(z,j)=>{var te,he,xe;return ie(),ae("div",V8,[M("div",Y8,[M("button",{class:Ze(["tl-btn",{on:ke(e).timeline.playing}]),onClick:j[0]||(j[0]=oe=>ke(e).togglePlay()),title:ke(e).timeline.playing?"暂停 (D)":"播放 (D)"},Xe(ke(e).timeline.playing?"❚❚":"▶"),11,$8),M("button",{class:"tl-btn",onClick:j[1]||(j[1]=oe=>ke(e).toStart()),title:"回到第一帧 (S)"},"⏮"),M("button",{class:"tl-btn",onClick:j[2]||(j[2]=oe=>ke(e).previousFrame()),title:"前一帧"},"◀"),M("button",{class:"tl-btn",onClick:j[3]||(j[3]=oe=>ke(e).nextFrame()),title:"后一帧"},"▶"),M("button",{class:"tl-btn",onClick:j[4]||(j[4]=oe=>ke(e).toEnd()),title:"移动到最后一帧"},"⏭"),M("button",{class:Ze(["tl-btn",{on:ke(e).timeline.loop}]),onClick:j[5]||(j[5]=oe=>ke(e).toggleLoop()),title:"循环"},"⟳",2),M("label",G8,[j[10]||(j[10]=M("span",null,"A",-1)),ye(M("input",{"onUpdate:modelValue":j[6]||(j[6]=oe=>A.value=oe),type:"number",min:"0",max:Math.max(0,ke(e).timeline.playbackEnd-1),"aria-label":"播放起始帧",onChange:k,onKeydown:Ea(bt(k,["prevent"]),["enter"])},null,40,H8),[[ht,A.value]])]),M("label",j8,[j[11]||(j[11]=M("span",null,"B",-1)),ye(M("input",{"onUpdate:modelValue":j[7]||(j[7]=oe=>T.value=oe),type:"number",min:ke(e).timeline.playbackStart+1,max:Math.max(1,ke(e).timeline.totalFrames-1),"aria-label":"播放结束帧",onChange:B,onKeydown:Ea(bt(B,["prevent"]),["enter"])},null,40,W8),[[ht,T.value]])]),h.value?(ie(),ae("button",{key:0,class:"tl-loop-range",title:`设为闭合自循环范围 ${h.value.start}–${h.value.end}f`,onClick:D},"循环段",8,z8)):Ve("",!0),M("span",q8,[j[12]||(j[12]=Qt("帧 ",-1)),M("b",null,Xe(ke(e).timeline.frame),1),j[13]||(j[13]=Qt(" / ",-1)),M("b",null,Xe(Math.max(0,ke(e).timeline.totalFrames-1)),1)]),j[18]||(j[18]=M("span",{class:"tl-legend"},[M("i",{class:"legend-emission"}),Qt("持续发射 "),M("i",{class:"legend-life"}),Qt("粒子存在 "),M("i",{class:"legend-spine"}),Qt("Spine 动画")],-1)),M("div",{ref_key:"animationMenuRef",ref:i,class:"tl-anim tl-owner-animation"},[j[16]||(j[16]=M("span",null,"所属动画",-1)),M("button",{class:"tl-animation-trigger",disabled:!o.value,title:"设置当前粒子系统所属的动画",onClick:bt(l,["stop"])},[M("span",null,Xe(((te=o.value)==null?void 0:te.animation)||ke(e).timeline.animation),1),j[14]||(j[14]=M("i",null,"⌄",-1))],8,K8),n.value?(ie(),ae("div",{key:0,class:"tl-animation-menu",onPointerdown:j[9]||(j[9]=bt(()=>{},["stop"]))},[j[15]||(j[15]=M("div",{class:"tl-animation-menu-title"},"选择所属动画",-1)),(ie(!0),ae(Ke,null,ci(ke(e).timeline.animations,oe=>{var ge,le;return ie(),ae("button",{key:oe,class:Ze(["tl-animation-option",{on:((ge=o.value)==null?void 0:ge.animation)===oe}]),onClick:Oe=>c(oe)},[M("span",null,Xe(oe),1),((le=o.value)==null?void 0:le.animation)===oe?(ie(),ae("i",J8,"✓")):Ve("",!0)],10,Z8)}),128)),M("div",Q8,[ye(M("input",{"onUpdate:modelValue":j[8]||(j[8]=oe=>r.value=oe),class:"tl-animation-name",maxlength:"64","aria-label":"动画名称",onKeydown:Ea(d,["enter"])},null,544),[[ht,r.value]]),M("button",{title:"重命名当前动画",onClick:d},"重命名")]),a.value?(ie(),ae("div",e4,Xe(a.value),1)):Ve("",!0),M("div",t4,[M("button",{onClick:u},"+ 新增"),M("button",{disabled:ke(e).timeline.animations.length<=1,onClick:f},"删除",8,i4)]),ke(e).timeline.animations.length<=1?(ie(),ae("div",s4,"至少需要保留一个动画")):Ve("",!0)],32)):Ve("",!0)],512),M("label",n4,[j[17]||(j[17]=Qt("Spine 预览动画 ",-1)),M("select",{class:"tl-sel",value:((he=F.value)==null?void 0:he.selectedAnimation)||"",disabled:!F.value,onChange:I},[M("option",a4,Xe(F.value?"无":"无可用 Spine 动画"),1),(ie(!0),ae(Ke,null,ci(((xe=F.value)==null?void 0:xe.animations)||[],oe=>(ie(),ae("option",{key:oe.name,value:oe.name},Xe(oe.name)+"("+Xe(oe.duration.toFixed(2))+"s) ",9,o4))),128))],40,r4)]),M("span",l4,Xe(R.value),1)]),M("div",{class:"tl-viewport",ref_key:"vpRef",ref:t,onWheel:bt(Ee,["prevent"]),onPointerdown:pe},[M("div",c4,[(ie(!0),ae(Ke,null,ci(L.value,oe=>(ie(),ae("div",{key:oe.f,class:"tl-tickline",style:Li({left:oe.px+"px"})},[M("span",h4,Xe(oe.f)+"f",1)],4))),128))]),M("div",{class:"tl-playhead",style:Li({left:N.value+"px"})},null,4),M("div",u4,[(ie(!0),ae(Ke,null,ci(ke(e).systems,(oe,ge)=>(ie(),ae("div",{key:oe.id,class:"tl-lane"},[j[19]||(j[19]=M("span",{class:"lane-ico"},"●",-1)),M("div",{class:"lane-bar",style:Li({left:O(oe)+"px",width:E(oe)+"px"}),onPointerdown:bt(le=>Ae(le,oe),["stop"])},[M("span",f4,Xe(oe.config.name||"系统 "+(ge+1)),1),M("span",{class:Ze(["bar-life",{"loop-life":W(oe)}]),style:Li({width:q(oe)+"px"})},null,6),W(oe)?(ie(),ae(Ke,{key:0},[J(oe)?(ie(),ae("span",{key:0,class:"bar-loop-transition bar-loop-start",style:Li({width:J(oe)+"px"})},null,4)):Ve("",!0),M("span",{class:"bar-emission bar-loop",style:Li({left:J(oe)+"px",width:V(oe)+"px"})},[M("span",{class:"bar-handle",title:"拖动循环段时长",onPointerdown:bt(le=>G(le,oe),["stop"])},null,40,m4)],4),K(oe)?(ie(),ae("span",{key:1,class:"bar-loop-transition bar-loop-end",style:Li({left:J(oe)+V(oe)+"px",width:K(oe)+"px"})},null,4)):Ve("",!0)],64)):oe.config.mode==="stream"?(ie(),ae("span",{key:1,class:"bar-emission",style:Li({width:V(oe)+"px"})},[M("span",{class:"bar-handle",title:"拖动持续发射时长",onPointerdown:bt(le=>G(le,oe),["stop"])},null,40,p4)],4)):Ve("",!0)],44,d4)]))),128)),(ie(!0),ae(Ke,null,ci(P.value,oe=>(ie(),ae("div",{key:`spine-${oe.id}`,class:"tl-lane spine-lane"},[j[20]||(j[20]=M("span",{class:"lane-ico spine-ico"},"◆",-1)),M("div",{class:"spine-bar",style:Li({left:me(oe)+"px",width:we(oe)+"px"}),title:"拖动调整动画开始时间",onPointerdown:bt(ge=>Z(ge,oe),["stop"])},[M("span",v4,Xe(oe.name)+" · "+Xe(oe.selectedAnimation),1)],44,g4)]))),128)),!ke(e).systems.length&&!P.value.length?(ie(),ae("div",y4,"暂无可显示的动画数据")):Ve("",!0)])],544)])}}}),b4=Gs(x4,[["__scopeId","data-v-8d9981a9"]]),w4={class:"transfer-heading"},S4={key:0},M4={class:"transfer-detail"},_4=$s({__name:"TransferProgressOverlay",setup(s){const e=lt(null);return fs(()=>xi.visible,async t=>{var i;t&&(await lu(),(i=e.value)==null||i.focus({preventScroll:!0}))},{flush:"post"}),(t,i)=>(ie(),Jt(PM,{name:"transfer-fade"},{default:ah(()=>[ke(xi).visible?(ie(),ae("div",{key:0,ref_key:"overlayElement",ref:e,class:"transfer-overlay",role:"dialog","aria-modal":"true","aria-live":"polite",tabindex:"-1",onPointerdown:i[0]||(i[0]=bt(()=>{},["stop","prevent"])),onPointerup:i[1]||(i[1]=bt(()=>{},["stop","prevent"])),onClick:i[2]||(i[2]=bt(()=>{},["stop","prevent"])),onDblclick:i[3]||(i[3]=bt(()=>{},["stop","prevent"])),onContextmenu:i[4]||(i[4]=bt(()=>{},["stop","prevent"])),onWheel:i[5]||(i[5]=bt(()=>{},["stop","prevent"])),onKeydown:i[6]||(i[6]=bt(()=>{},["stop","prevent"]))},[M("div",{class:Ze(["transfer-dialog",{failed:ke(xi).failed}])},[M("div",w4,[M("span",null,Xe(ke(xi).title),1),ke(xi).indeterminate?Ve("",!0):(ie(),ae("strong",S4,Xe(Math.round(ke(xi).progress))+"%",1))]),M("div",{class:Ze(["transfer-track",{indeterminate:ke(xi).indeterminate}])},[M("div",{class:"transfer-bar",style:Li(ke(xi).indeterminate?void 0:{width:`${ke(xi).progress}%`})},null,4)],2),M("div",M4,Xe(ke(xi).detail),1)],2)],544)):Ve("",!0)]),_:1}))}}),T4=Gs(_4,[["__scopeId","data-v-592b922e"]]),A4=["inert","aria-hidden"],E4={class:"right"},C4={class:"stage-area"},I4=$s({__name:"App",setup(s){const e=Kl();JI(e);const t=lt(360),i=lt(180);function n(a){a.preventDefault();const o=l=>{const c=e.settings.parameterPanelOnRight?window.innerWidth-l.clientX:l.clientX,u=Math.max(240,Math.min(c,window.innerWidth-200));t.value=u},h=()=>{window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",h)};window.addEventListener("pointermove",o),window.addEventListener("pointerup",h)}function r(a){a.preventDefault();const o=a.clientY,h=i.value,l=u=>{const d=Math.max(80,Math.min(h+(o-u.clientY),window.innerHeight-200));i.value=d},c=()=>{window.removeEventListener("pointermove",l),window.removeEventListener("pointerup",c)};window.addEventListener("pointermove",l),window.addEventListener("pointerup",c)}return(a,o)=>(ie(),ae(Ke,null,[M("div",{class:Ze(["layout",{"panel-right":ke(e).settings.parameterPanelOnRight}]),inert:ke(xi).visible?!0:void 0,"aria-hidden":ke(xi).visible?"true":void 0},[M("div",{class:"parameter-panel",style:Li({width:t.value+"px"})},[Ue(X8)],4),M("div",{class:"resizer-col",onPointerdown:n},null,32),M("div",E4,[M("div",C4,[Ue(s3)]),M("div",{class:"resizer-row",onPointerdown:r,title:"拖动调整时间轴高度"},null,32),M("div",{class:"timeline-area",style:Li({height:i.value+"px"})},[Ue(b4)],4)])],10,A4),Ue(T4)],64))}}),R4=Gs(I4,[["__scopeId","data-v-42c4fa00"]]);r_(R4).use(l_()).mount("#app");export{dy as $,Fn as A,Wh as B,jt as C,ji as D,He as E,ds as F,Nn as G,wt as H,Ut as I,gS as J,ys as K,Is as L,Ys as M,zr as N,Pu as O,kn as P,Bl as Q,Po as R,sn as S,EO as T,ct as U,ay as V,an as W,rX as X,_B as Y,Xl as Z,Mp as _,gt as a,Bm as a$,uy as a0,qw as a1,Fp as a2,sX as a3,$h as a4,xl as a5,DO as a6,bl as a7,ku as a8,Pm as a9,$m as aA,Gm as aB,Nc as aC,Pr as aD,Qc as aE,km as aF,Qw as aG,pi as aH,jw as aI,qU as aJ,To as aK,hy as aL,Ye as aM,it as aN,Om as aO,eh as aP,sS as aQ,Fm as aR,tS as aS,iS as aT,Fu as aU,aS as aV,th as aW,cS as aX,nS as aY,oS as aZ,hS as a_,Ya as aa,Op as ab,Bp as ac,ly as ad,Ql as ae,ec as af,Jl as ag,Va as ah,ar as ai,ZU as aj,Jw as ak,LO as al,Fo as am,Gr as an,Np as ao,pS as ap,OO as aq,Ul as ar,vs as as,cy as at,eX as au,No as av,Ym as aw,Hm as ax,jm as ay,Wm as az,Io as b,yr as b$,jh as b0,rS as b1,Jr as b2,lS as b3,Lp as b4,AO as b5,fS as b6,mS as b7,Dp as b8,Dn as b9,uS as bA,Up as bB,Ru as bC,vS as bD,Lm as bE,Fi as bF,_O as bG,IO as bH,Bw as bI,Ow as bJ,JU as bK,ii as bL,Uo as bM,yS as bN,wS as bO,SS as bP,MS as bQ,xS as bR,bS,FO as bT,Xp as bU,Gt as bV,Vm as bW,eS as bX,Dw as bY,Nw as bZ,Uw as b_,TO as ba,KU as bb,xt as bc,Zw as bd,Kw as be,Ww as bf,zw as bg,ka as bh,Gh as bi,BO as bj,Xw as bk,Vw as bl,hs as bm,Yw as bn,ko as bo,Gi as bp,Lw as bq,Hh as br,$w as bs,Gw as bt,Hw as bu,fy as bv,Um as bw,ba as bx,dS as by,Nm as bz,Ro as c,QU as c0,PO as c1,kO as c2,RO as c3,dt as d,tt as e,tX as f,yt as g,Ni as h,Mh as i,bs as j,oi as k,et as l,cn as m,li as n,gp as o,wi as p,Ll as q,Cr as r,We as s,a1 as t,Sp as u,Ch as v,Dm as w,ya as x,oy as y,Xm as z}; diff --git a/dist/assets/index-B1oGFzi8.js b/dist/assets/index-hYCzV0U1.js similarity index 99% rename from dist/assets/index-B1oGFzi8.js rename to dist/assets/index-hYCzV0U1.js index 245db5e..1c7ae52 100644 --- a/dist/assets/index-B1oGFzi8.js +++ b/dist/assets/index-hYCzV0U1.js @@ -1,4 +1,4 @@ -var Ae=Object.defineProperty;var Be=(m,o,e)=>o in m?Ae(m,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[o]=e;var a=(m,o,e)=>Be(m,typeof o!="symbol"?o+"":o,e);import{T as Fe,a as he,b as F,S as ue,M as pe,c as oe,W as ne,B as H,d as z,L as Te,E as O,e as ce,p as q,f as Ee,g as fe,A as Q,h as me,i as De,j as V,s as re,G as we,k as $,l as Y,m as Le,P as Ie,n as Re,o as Ne,C as X,q as be,r as _e,t as Ue,u as Ye,v as Xe,w as ee,x as j,y as ke,z as Ve,D as J,F as ge,V as Ge,H as ae,I as We,J as $e,U as xe,K as E,R as ve,N as ye,O as Pe,Q as Oe,X as He,Y as ze,Z as qe,_ as Ke}from"./index-D08n0lXm.js";import{$ as bt,a0 as kt,a1 as vt,a2 as yt,a3 as Pt,a4 as St,a5 as Mt,a6 as At,a7 as Bt,a8 as Ft,a9 as Et,aa as Dt,ab as Lt,ac as It,ad as Rt,ae as Nt,af as _t,ag as Ut,ah as Yt,ai as Xt,aj as Vt,ak as Gt,al as Wt,am as $t,an as Ot,ao as Ht,ap as zt,aq as qt,ar as Kt,as as Zt,at as Jt,au as Qt,av as jt,aw as es,ax as ts,ay as ss,az as os,aA as ns,aB as as,aC as rs,aD as is,aE as ls,aF as hs,aG as cs,aH as ds,aI as us,aJ as ps,aK as fs,aL as ms,aM as gs,aN as xs,aO as Cs,aP as Ts,aQ as ws,aR as bs,aS as ks,aT as vs,aU as ys,aV as Ps,aW as Ss,aX as Ms,aY as As,aZ as Bs,a_ as Fs,a$ as Es,b0 as Ds,b1 as Ls,b2 as Is,b3 as Rs,b4 as Ns,b5 as _s,b6 as Us,b7 as Ys,b8 as Xs,b9 as Vs,ba as Gs,bb as Ws,bc as $s,bd as Os,be as Hs,bf as zs,bg as qs,bh as Ks,bi as Zs,bj as Js,bk as Qs,bl as js,bm as eo,bn as to,bo as so,bp as oo,bq as no,br as ao,bs as ro,bt as io,bu as lo,bv as ho,bw as co,bx as uo,by as po,bz as fo,bA as mo,bB as go,bC as xo,bD as Co,bE as To,bF as wo,bG as bo,bH as ko,bI as vo,bJ as yo,bK as Po,bL as So,bM as Mo,bN as Ao,bO as Bo,bP as Fo,bQ as Eo,bR as Do,bS as Lo,bT as Io,bU as Ro,bV as No,bW as _o,bX as Uo,bY as Yo,bZ as Xo,b_ as Vo,b$ as Go,c0 as Wo,c1 as $o,c2 as Oo,c3 as Ho}from"./index-D08n0lXm.js";import{SkeletonClipping as de,SkeletonPhysicsMovement as Ze,AnimationStateData as Je,AtlasAttachmentLoader as Qe,SkeletonBounds as je}from"./index-BUbc0qUx.js";import{AssetCache as qo,AssetManagerBase as Ko,Downloader as Zo,SkeletonRendererCore as Jo,Triangulator as Qo}from"./index-BUbc0qUx.js";if(typeof window<"u"&&window.PIXI){const m=window.require;window.require=o=>{if(m)return m(o);if(o.startsWith("@pixi/"))return window.PIXI}}const _=class _ extends Fe{constructor(e){super(e.resource.source);a(this,"texture");this.texture=he.from(e)}static from(e){return _.textureMap.has(e)?_.textureMap.get(e):new _(e)}setFilters(e,t){this.texture.baseTexture.scaleMode=_.toPixiTextureFilter(e),this.texture.baseTexture.mipmap=_.toPixiMipMap(e)}setWraps(e,t){this.texture.baseTexture.wrapMode=_.toPixiTextureWrap(e)}dispose(){this.texture.destroy()}static toPixiTextureFilter(e){switch(e){case F.Nearest:case F.MipMapNearestLinear:case F.MipMapNearestNearest:return ue.NEAREST;case F.Linear:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return ue.LINEAR;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiMipMap(e){switch(e){case F.Nearest:case F.Linear:return pe.OFF;case F.MipMapNearestLinear:case F.MipMapNearestNearest:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return pe.ON;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiTextureWrap(e){switch(e){case oe.ClampToEdge:return ne.CLAMP;case oe.MirroredRepeat:return ne.MIRRORED_REPEAT;case oe.Repeat:return ne.REPEAT;default:throw new Error(`Unknown texture wrap: ${String(e)}`)}}static toPixiBlending(e){switch(e){case H.Normal:return z.NORMAL;case H.Additive:return z.ADD;case H.Multiply:return z.MULTIPLY;case H.Screen:return z.SCREEN;default:throw new Error(`Unknown blendMode: ${String(e)}`)}}};a(_,"textureMap",new Map);let G=_;const K="spineTextureAtlasLoader",et={extension:O.Asset,resolver:{test:m=>V(m,".atlas"),parse:m=>{var e,t;const o=m.split(".");return{resolution:parseFloat(((t=(e=re.RETINA_PREFIX)==null?void 0:e.exec(m))==null?void 0:t[1])??"1"),format:o[o.length-2],src:m}}},loader:{name:K,extension:{type:O.LoadParser,priority:Te.Normal,name:K},test(m){return V(m,".atlas")},async load(m){const o=await re.ADAPTER.fetch(m);if(!o.ok)throw new Error(`[${K}] Failed to fetch ${m}: ${o.status} ${o.statusText}`);return await o.text()},testParse(m,o){const e=V(o.src,".atlas"),t=typeof m=="string",s=o.loadParser===K;return Promise.resolve((e||s)&&t)},unload(m){m.dispose()},async parse(m,o,e){var p;const t=o.data||{};let s=q.dirname(o.src);s&&s.lastIndexOf("/")!==s.length-1&&(s+="/");const n=new Ee(m);if(t.images instanceof fe||typeof t.images=="string"){const h=t.images;t.images={},t.images[n.pages[0].name]=h}const r=[];let l=!0;for(const h of e.parsers)if(h.name==="loadTextures"){l=(p=h.config)==null?void 0:p.preferCreateImageBitmap;break}Q.setPreferences({preferCreateImageBitmap:!1});for(const h of n.pages){const u=h.name,c=t!=null&&t.images?t.images[u]:void 0;if(c instanceof fe)h.setTexture(G.from(c));else{const i=c??q.normalize([...s.split(q.sep),u].join(q.sep)),g={src:De(i,o.src),data:{...t.imageMetadata,alphaMode:h.pma?me.PMA:me.UNPACK}},x=e.load(g).then(d=>{h.setTexture(G.from(d.baseTexture))});r.push(x)}}return await Promise.all(r),Q.setPreferences({preferCreateImageBitmap:l}),n}}};ce.add(et);const Z="spineSkeletonLoader";function tt(m){return m.hasOwnProperty("bones")}function st(m){return m instanceof Uint8Array}const ot={extension:O.Asset,loader:{name:Z,extension:{type:O.LoadParser,priority:Te.Normal,name:Z},test(m){return V(m,".skel")},async load(m){const o=await re.ADAPTER.fetch(m);if(!o.ok)throw new Error(`[${Z}] Failed to fetch ${m}: ${o.status} ${o.statusText}`);return new Uint8Array(await o.arrayBuffer())},testParse(m,o){const e=V(o.src,".json")&&tt(m),t=V(o.src,".skel")&&st(m),s=o.loadParser===Z;return Promise.resolve(e||t||s)}}};ce.add(ot);class nt extends we{constructor(o=!1){super();const e=new $(void 0),t=new $(void 0,!0),s=new $(void 0,!0,!0);this.addAttribute("aVertexPosition",e,2,!1,Y.FLOAT),this.addAttribute("aTextureCoord",t,2,!1,Y.FLOAT),this.addIndex(s)}}const at=` +var Ae=Object.defineProperty;var Be=(m,o,e)=>o in m?Ae(m,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[o]=e;var a=(m,o,e)=>Be(m,typeof o!="symbol"?o+"":o,e);import{T as Fe,a as he,b as F,S as ue,M as pe,c as oe,W as ne,B as H,d as z,L as Te,E as O,e as ce,p as q,f as Ee,g as fe,A as Q,h as me,i as De,j as V,s as re,G as we,k as $,l as Y,m as Le,P as Ie,n as Re,o as Ne,C as X,q as be,r as _e,t as Ue,u as Ye,v as Xe,w as ee,x as j,y as ke,z as Ve,D as J,F as ge,V as Ge,H as ae,I as We,J as $e,U as xe,K as E,R as ve,N as ye,O as Pe,Q as Oe,X as He,Y as ze,Z as qe,_ as Ke}from"./index-CxN-rEmg.js";import{$ as bt,a0 as kt,a1 as vt,a2 as yt,a3 as Pt,a4 as St,a5 as Mt,a6 as At,a7 as Bt,a8 as Ft,a9 as Et,aa as Dt,ab as Lt,ac as It,ad as Rt,ae as Nt,af as _t,ag as Ut,ah as Yt,ai as Xt,aj as Vt,ak as Gt,al as Wt,am as $t,an as Ot,ao as Ht,ap as zt,aq as qt,ar as Kt,as as Zt,at as Jt,au as Qt,av as jt,aw as es,ax as ts,ay as ss,az as os,aA as ns,aB as as,aC as rs,aD as is,aE as ls,aF as hs,aG as cs,aH as ds,aI as us,aJ as ps,aK as fs,aL as ms,aM as gs,aN as xs,aO as Cs,aP as Ts,aQ as ws,aR as bs,aS as ks,aT as vs,aU as ys,aV as Ps,aW as Ss,aX as Ms,aY as As,aZ as Bs,a_ as Fs,a$ as Es,b0 as Ds,b1 as Ls,b2 as Is,b3 as Rs,b4 as Ns,b5 as _s,b6 as Us,b7 as Ys,b8 as Xs,b9 as Vs,ba as Gs,bb as Ws,bc as $s,bd as Os,be as Hs,bf as zs,bg as qs,bh as Ks,bi as Zs,bj as Js,bk as Qs,bl as js,bm as eo,bn as to,bo as so,bp as oo,bq as no,br as ao,bs as ro,bt as io,bu as lo,bv as ho,bw as co,bx as uo,by as po,bz as fo,bA as mo,bB as go,bC as xo,bD as Co,bE as To,bF as wo,bG as bo,bH as ko,bI as vo,bJ as yo,bK as Po,bL as So,bM as Mo,bN as Ao,bO as Bo,bP as Fo,bQ as Eo,bR as Do,bS as Lo,bT as Io,bU as Ro,bV as No,bW as _o,bX as Uo,bY as Yo,bZ as Xo,b_ as Vo,b$ as Go,c0 as Wo,c1 as $o,c2 as Oo,c3 as Ho}from"./index-CxN-rEmg.js";import{SkeletonClipping as de,SkeletonPhysicsMovement as Ze,AnimationStateData as Je,AtlasAttachmentLoader as Qe,SkeletonBounds as je}from"./index-Cr68vmVa.js";import{AssetCache as qo,AssetManagerBase as Ko,Downloader as Zo,SkeletonRendererCore as Jo,Triangulator as Qo}from"./index-Cr68vmVa.js";if(typeof window<"u"&&window.PIXI){const m=window.require;window.require=o=>{if(m)return m(o);if(o.startsWith("@pixi/"))return window.PIXI}}const _=class _ extends Fe{constructor(e){super(e.resource.source);a(this,"texture");this.texture=he.from(e)}static from(e){return _.textureMap.has(e)?_.textureMap.get(e):new _(e)}setFilters(e,t){this.texture.baseTexture.scaleMode=_.toPixiTextureFilter(e),this.texture.baseTexture.mipmap=_.toPixiMipMap(e)}setWraps(e,t){this.texture.baseTexture.wrapMode=_.toPixiTextureWrap(e)}dispose(){this.texture.destroy()}static toPixiTextureFilter(e){switch(e){case F.Nearest:case F.MipMapNearestLinear:case F.MipMapNearestNearest:return ue.NEAREST;case F.Linear:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return ue.LINEAR;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiMipMap(e){switch(e){case F.Nearest:case F.Linear:return pe.OFF;case F.MipMapNearestLinear:case F.MipMapNearestNearest:case F.MipMapLinearLinear:case F.MipMapLinearNearest:return pe.ON;default:throw new Error(`Unknown texture filter: ${String(e)}`)}}static toPixiTextureWrap(e){switch(e){case oe.ClampToEdge:return ne.CLAMP;case oe.MirroredRepeat:return ne.MIRRORED_REPEAT;case oe.Repeat:return ne.REPEAT;default:throw new Error(`Unknown texture wrap: ${String(e)}`)}}static toPixiBlending(e){switch(e){case H.Normal:return z.NORMAL;case H.Additive:return z.ADD;case H.Multiply:return z.MULTIPLY;case H.Screen:return z.SCREEN;default:throw new Error(`Unknown blendMode: ${String(e)}`)}}};a(_,"textureMap",new Map);let G=_;const K="spineTextureAtlasLoader",et={extension:O.Asset,resolver:{test:m=>V(m,".atlas"),parse:m=>{var e,t;const o=m.split(".");return{resolution:parseFloat(((t=(e=re.RETINA_PREFIX)==null?void 0:e.exec(m))==null?void 0:t[1])??"1"),format:o[o.length-2],src:m}}},loader:{name:K,extension:{type:O.LoadParser,priority:Te.Normal,name:K},test(m){return V(m,".atlas")},async load(m){const o=await re.ADAPTER.fetch(m);if(!o.ok)throw new Error(`[${K}] Failed to fetch ${m}: ${o.status} ${o.statusText}`);return await o.text()},testParse(m,o){const e=V(o.src,".atlas"),t=typeof m=="string",s=o.loadParser===K;return Promise.resolve((e||s)&&t)},unload(m){m.dispose()},async parse(m,o,e){var p;const t=o.data||{};let s=q.dirname(o.src);s&&s.lastIndexOf("/")!==s.length-1&&(s+="/");const n=new Ee(m);if(t.images instanceof fe||typeof t.images=="string"){const h=t.images;t.images={},t.images[n.pages[0].name]=h}const r=[];let l=!0;for(const h of e.parsers)if(h.name==="loadTextures"){l=(p=h.config)==null?void 0:p.preferCreateImageBitmap;break}Q.setPreferences({preferCreateImageBitmap:!1});for(const h of n.pages){const u=h.name,c=t!=null&&t.images?t.images[u]:void 0;if(c instanceof fe)h.setTexture(G.from(c));else{const i=c??q.normalize([...s.split(q.sep),u].join(q.sep)),g={src:De(i,o.src),data:{...t.imageMetadata,alphaMode:h.pma?me.PMA:me.UNPACK}},x=e.load(g).then(d=>{h.setTexture(G.from(d.baseTexture))});r.push(x)}}return await Promise.all(r),Q.setPreferences({preferCreateImageBitmap:l}),n}}};ce.add(et);const Z="spineSkeletonLoader";function tt(m){return m.hasOwnProperty("bones")}function st(m){return m instanceof Uint8Array}const ot={extension:O.Asset,loader:{name:Z,extension:{type:O.LoadParser,priority:Te.Normal,name:Z},test(m){return V(m,".skel")},async load(m){const o=await re.ADAPTER.fetch(m);if(!o.ok)throw new Error(`[${Z}] Failed to fetch ${m}: ${o.status} ${o.statusText}`);return new Uint8Array(await o.arrayBuffer())},testParse(m,o){const e=V(o.src,".json")&&tt(m),t=V(o.src,".skel")&&st(m),s=o.loadParser===Z;return Promise.resolve(e||t||s)}}};ce.add(ot);class nt extends we{constructor(o=!1){super();const e=new $(void 0),t=new $(void 0,!0),s=new $(void 0,!0,!0);this.addAttribute("aVertexPosition",e,2,!1,Y.FLOAT),this.addAttribute("aTextureCoord",t,2,!1,Y.FLOAT),this.addIndex(s)}}const at=` attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; diff --git a/dist/index.html b/dist/index.html index 0827bcf..73cbb74 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,17 +1,17 @@ - - - - - - Spine粒子编辑器 + + + + + + Spine粒子编辑器 - - - - -
- - + + + + + +
+ + diff --git a/release/connector/macos-arm64/Spine粒子连接器.app/Contents/MacOS/SpineParticleConnector b/release/connector/macos-arm64/Spine粒子连接器.app/Contents/MacOS/SpineParticleConnector index 6894ceeaada8f0147ae07904ee6174128225f40d..b53b900db6b470f46415931b88ad25d8462d27ca 100755 GIT binary patch delta 78795 zcma%k3tW^%_y04)ZAC-mCZH}XC;}=PDgp{DV5C^6sHmifnuhl~-cl}>p{DUT=#-hF zromc9;=Nu)O*6ZpnQvJsXs_?4{+Ug#mlh-9}O#FJf7;PjQN^IA3QgE>01p zC~kP%R_to$*YLPF%aZ-g_TnGxObB)ngIlx_Mjq;aF3VQw<40|^2<95LoQL{U7Td4` zTG_Cb#o`!G_P?pxio1E*iV1erDs^)S^$*=>!{%}uR)aNcu}i4WqD?mJEMFUT(I&Cm zCE4ftJGSC}wo>K#JA%6=`*h!JEAHRSR^ENL$aYQkfA(El@t5{uf^AaQxdsX5(MhgUJFWnBRyGw^h$r1T`FC@-QI^};5o}XYm0PHPT}vCb(%v6}ZPkY9Ubv%XRk&NqpbzSXfHFm zi0kNTXO9kkcGLn#Hv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dtz9v!b8xw=}=?ZTyDLtGhS!I^e+5t7B@kO1Je}pH!+q*saXeMF=<28o{%yv5xc0%^N_kgWCDc3g zdF9dP$K7$fJu7Kj#0OsmMGW_f`>E*Fgh@@DBHBfJ#rAs9X7lV7(*qtjSSCEL{`g6F zjeX0~_YE4IHtL&aksrlIZ1DfH-HsxW;nU*MLj7A!imKdZQy0sfZ?dBImi7ugl(}i( zizc%wc#q2K``eSOZzIY&Rw&ygDLf$lLRQCCH@_PH=;h29hkZpV?p<;Cn^oJ&51Nvm znv?g?b+mutpgA9=tvOR;z|&E!zw){BaYj{lOTE_4QNx!G%=xrZrzkIPpF4g(KYny! zU84Jdv@a4<$Cl`KLpggT;d)^2vhRM_5Jdj4ktV?;b~jzNpahb%@|QRYkaBc+pElb>UBQ2*RW-?v%WvNb=awecMoi6 zR$}1!uWOB*G@+5X)?anDZQeXK(WP(u8Brx-9jfj;T+R6#hnjQ8JfC(bYVq=^?GCNG z(yh`<*TCXadPdxd)>=C?ZV?h&>?`MEeNvClUC=mXQ0LkS)1ALHyN!BzyyI=liNj;A zOej|AlXrY`8v6G133<`zyP)wI;eXt1wRyqX2VUJ9k2tfeWW_5Z+dp1Aym*x|BksK# zeEP{xJ9jRw*t~YV@+m0?`kr(u_Oy1h-Je$-`}59AnIkUrFJ7i%SiQqY;n6ZDRjWdUA-Hv;h+%X;^ z-;`bV&r&V8I8eW{drXGqRAn;we8HkOD$vvkD zURYenCl3%(&i8*p@a)rw=wX%;z=eF+rFe+NRu*)KX1Mr~4cc!&m&x4UR#Jh{+xi{* zR4D2&g|htk*mV-qA*Z6gQ$Tsi?{OceGcVCIPLA+kS>YyRo&ArebaZQ%cNzR1y4%y! yieLJwXQlkB7->S52k4hnn6-R8X+%93urJL1Kuyg`l`#yq?ZU?^dGY`N0000L=+##M diff --git a/release/connector/连接器.zip b/release/connector/连接器.zip new file mode 100644 index 0000000000000000000000000000000000000000..632357fba52dbd3e37e15126607ea53d78107fb4 GIT binary patch literal 120435 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^zqJhMGgJ%RCVJw)z!I4c;nvOdW89n$746e`v3jtV!gmJH&=Tnr=erO=V)Q+?9OB1<|rb>r{iMlWQDAb z-z@vN-I2K!o4=V_#B1T=!YAkKGOsOT7==5d@y;h9_Tp$-9Y-*e}$dh2MM@Vu(6aZ2C& ztoIpjztn`3q>A+a+YNu+_+kt8csWbHT^P{H#Xub3&B!Fe3~~SiLu;%$ir0Ag5!gMp`MD(XaO{5gN)|xIACE4bYKM#E1($N&4lD^6g%Qc zvIUgV+>#lWbu%+C>}O?QkVdgZ4=9Rk_>;Z+pHErwV*Qq9Gy3#$Q?PjhlzNauA7lY? z=&PYvpu~>T8zkBV3?YVov}~h_WY=5AH$c0PJ%cmvVDlCqnzuk!&06;`q5)_vJ20B{ zk*#X<=fLSLT(%Oj6y!hjVnGktQb!+7BK-$18?f0)DE=&v?QGluv=g3thzeZ2c$oEs zY{%wf6J*;Rr*M(#V_$G-NXTYb5saK}?T~G5WaB2)-!NYTi(;@N2)O~|d-U{-684TS zfNmfv$l+E8r55Lx7A2<^>tnMWTM|bO0Vk9Yh~uFk1mF%K#vPzkuWtJDUoJ44aRLh@ zCZJR<~zF2Lef@*FU^FaQ8oOXtY| literal 0 HcmV?d00001 diff --git a/scripts/build-connector-app.mjs b/scripts/build-connector-app.mjs index 38ce2f6..36b060c 100644 --- a/scripts/build-connector-app.mjs +++ b/scripts/build-connector-app.mjs @@ -58,10 +58,10 @@ async function buildWindows() { const compiler = process.env.CXX || 'cl.exe' if (/cl(?:\.exe)?$/i.test(compiler)) { run(compiler, ['/nologo', '/std:c++17', '/O2', '/EHsc', '/utf-8', '/W4', ...commonSources, join(native, 'app_windows.cpp'), - '/link', '/SUBSYSTEM:WINDOWS', `'/OUT:${executable}'`.replaceAll("'", ''), 'ws2_32.lib', 'comdlg32.lib', 'user32.lib', 'gdi32.lib']) + '/link', '/SUBSYSTEM:WINDOWS', `'/OUT:${executable}'`.replaceAll("'", ''), 'ws2_32.lib', 'iphlpapi.lib', 'comdlg32.lib', 'user32.lib', 'gdi32.lib']) } else { run(compiler, ['-std=c++17', '-O2', '-Wall', '-Wextra', '-Werror', ...commonSources, join(native, 'app_windows.cpp'), - '-municode', '-mwindows', '-lws2_32', '-lcomdlg32', '-o', executable]) + '-municode', '-mwindows', '-lws2_32', '-liphlpapi', '-lcomdlg32', '-o', executable]) } await cp(join(root, 'connector', 'DISTRIBUTION.md'), join(packageDir, '使用说明.md')) console.log(`已生成 Windows 应用:${executable}`) diff --git a/scripts/build-connector-windows-msvc.bat b/scripts/build-connector-windows-msvc.bat index 854aa42..c941dc7 100644 --- a/scripts/build-connector-windows-msvc.bat +++ b/scripts/build-connector-windows-msvc.bat @@ -15,7 +15,7 @@ pushd "%SRC_DIR%" cl /nologo /std:c++17 /utf-8 /O1 /GL /EHsc /MT /W3 /D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0601 ^ app_windows.cpp config.cpp connector_service.cpp encoding.cpp http_server.cpp json.cpp platform_common.cpp process_windows.cpp workspace.cpp zip.cpp ^ /link /SUBSYSTEM:WINDOWS /LTCG /OPT:REF /OPT:ICF ^ - user32.lib gdi32.lib comdlg32.lib ws2_32.lib shell32.lib ole32.lib ^ + user32.lib gdi32.lib comdlg32.lib ws2_32.lib iphlpapi.lib shell32.lib ole32.lib ^ /OUT:"%OUT_DIR%\SpineParticleConnector.exe" set "RC=%ERRORLEVEL%" del /q "%SRC_DIR%\*.obj" >nul 2>&1 diff --git a/src/core/particleConfig.ts b/src/core/particleConfig.ts new file mode 100644 index 0000000..e81bd32 --- /dev/null +++ b/src/core/particleConfig.ts @@ -0,0 +1,479 @@ +import { Texture } from 'pixi.js' +import type { EmitMode, EmitShape, Blend, AttributeMode, RotationMode, ScaleAxisMode, CurvePoint, ColorGradientStop, ColliderShape, CollisionResponse, SceneCollider, ParticleImageResource, ParticleSequenceFrame, TrailImageResource, EmitterConfig, ParticleState, TrailBoneState, TrailState } from './particleTypes' +import { BLEND_MAP } from './particleConstants' + +export function defaultConfig(): EmitterConfig { + return { + texture: null as unknown as Texture, + imageResources: [{ + id: 1, + texture: null, + textureName: 'star', + textureFolder: '', + previewUrl: '/images/star.png', + imageMode: 'fixed', + sequencePlayback: 'loop-forward', + sequenceFps: 30, + sequenceFrames: [], + weight: 100, + locked: false, + scale: 1, + anchorX: 0.5, + anchorY: 0.5, + colorMode: 'fixed', + colorStart: '#ffffff', + colorEnd: '#ff4d4d', + colorGradient: [{ position: 0, color: '#ffffff' }, { position: 1, color: '#ff4d4d' }], + blend: 'normal', + independentAlpha: 'off', + alpha: 1, + alphaCurveMode: '跟随导出', + alphaCurve: [{ x: 0, y: 0 }, { x: 0.1, y: 1 }, { x: 0.9, y: 1 }, { x: 1, y: 0 }], + }], + imageWeightVersion: 1, + name: 'ParticleSystem1', + mode: 'stream', + rate: 20, + streamBehavior: 'normal', + loopDurationFrames: 30, + generateLoopStartAnimation: false, + loopStartUseCustomDuration: false, + loopStartDurationFrames: 30, + generateLoopEndAnimation: false, + loopEndUseCustomDuration: false, + loopEndDurationFrames: 30, + burstCount: 50, + burstLoop: false, // 一次性爆发(持续爆发开关已移除) + delay: 0, + duration: 1, // 持续发射时长;默认 1 秒(30f)。爆发模式运行时按 0 处理。 + shape: 'point', + shapeRangeVersion: 1, + innerRadius: 0, + outerRadius: 30, + innerRectW: 0, + innerRectH: 0, + outerRectW: 60, + outerRectH: 40, + spawnPathId: 0, + spawnPathDistribution: 'fixed', + radius: 30, + rectW: 60, + rectH: 40, + centerX: 0, + centerY: 0, + rootRotation: 0, + rootScaleX: 1, + rootScaleY: 1, + emissionAngleMode: 'random', + direction: 0, + spread: 360, + coneDirection: 90, + coneAngle: 60, + lifeMin: 0.6, + lifeMax: 1.8, + lifeMode: 'random', + lifeCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], + speedMin: 30, + speedMax: 140, + speedMode: 'random', + speedCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], + scaleMin: 0.3, + scaleMax: 0.8, + scaleMode: 'random', + scaleAxisMode: 'uniform', + scaleYMin: 0.3, + scaleYMax: 0.8, + scaleCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], + scaleYCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], + scaleEndRatio: 0.3, + initialRotationMode: 'random', + initialRotationMin: 0, + initialRotationMax: 360, + initialRotationCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], + alpha: 0.9, + alphaEnd: 0, + rotationSpeedMin: -180, + rotationSpeedMax: 180, + speedOverLifeEnabled: false, + speedOverLifeMode: 'fixed', + speedOverLifeMin: 1, + speedOverLifeMax: 1, + speedOverLifeCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], + scaleOverLifeEnabled: false, + scaleOverLifeMode: 'curve', + scaleOverLifeAxisMode: 'uniform', + scaleOverLifeMin: 0, + scaleOverLifeMax: 1, + scaleYOverLifeMin: 0, + scaleYOverLifeMax: 1, + scaleOverLifeCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], + scaleYOverLifeCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], + rotationOverLifeEnabled: false, + rotationOverLifeMode: 'random', + rotationOverLifeCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], + gravity: 980, + gravityMode: 'fixed', + gravityMin: 980, + gravityMax: 980, + gravityDirection: -90, + gravityCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], + damping: 0, + seed: 0, + colorStart: '#ffffff', + colorEnd: '#ff4d4d', + colorOverLife: false, + blend: 'add', + alphaMode: 'curve', + curveMode: '线性', + alphaCurve: [{ x: 0, y: 0 }, { x: 0.2, y: 1 }, { x: 0.8, y: 1 }, { x: 1, y: 0 }], + textureName: 'star', + textureFolder: '', + alphaScale: 1, + anchorX: 0.5, + anchorY: 0.5, + independentAlpha: 'off', + offsetX: 0, + offsetY: 0, + noise: false, + noiseAmt: 30, + noiseRange: 100, + noiseSpeed: 1, + useGravity: false, + wind: false, + windX: 0, + windY: 0, + windMode: 'fixed', + windMin: 100, + windMax: 100, + windDirection: 0, + windCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], + forceField: false, + forceStrength: 10, + forceRadius: 100, + forceCenterX: 0, + forceCenterY: 0, + forceFalloff: 'linear', + attraction: false, + attractionCenterX: 200, + attractionCenterY: 0, + attractionRadius: 20, + attractionDuration: 0.5, + attractionDelay: 0.1, + attractionDelayMode: 'particle', + attractionPath: 'curve', + trail: false, + trailConfigVersion: 3, + trailResources: [{ + id: 1, + texture: null, + textureName: 'trail', + previewUrl: '/images/trail.png', + weight: 100, + locked: false, + rotation: 0, + colorMode: 'particle', + color: '#ffffff', + colorGradient: [{ position: 0, color: '#ffffff' }, { position: 1, color: '#ffffff' }], + blend: 'normal', + alphaMode: 'particle', + alpha: 1, + alphaCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], + boneCount: 3, + trailRatio: 100, + lengthMode: 'fixed', + length: 100, + lengthMin: 100, + lengthMax: 100, + widthSizeMode: 'fixed', + width: 100, + widthMin: 100, + widthMax: 100, + widthMode: 'particle', + lifeLengthEnabled: false, + lifeLengthCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], + shapeEnabled: false, + shapeCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], + }], + trailResourceVersion: 6, + trailTexture: null, + trailTextureName: 'trail', + trailPreviewUrl: '/images/trail.png', + trailColorMode: 'particle', + trailColor: '#ffffff', + trailColorGradient: [{ position: 0, color: '#ffffff' }, { position: 1, color: '#ffffff' }], + trailAlphaMode: 'particle', + trailAlpha: 1, + trailAlphaCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], + trailBoneCount: 3, + trailLength: 100, + trailWidth: 100, + trailWidthMode: 'particle', + trailLifeLengthEnabled: false, + trailLifeLengthCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], + trailShapeEnabled: false, + trailShapeCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], + trailGridRows: 4, + trailGridCols: 4, + collision: false, + collisionColliderIds: [], + pathFollow: false, + emitterFollow: false, + emitterFollowMode: 'none', + emitterFollowPathId: 0, + emitterFollowSpineId: 0, + emitterFollowBoneName: '', + emitterFollowBoneOffsetX: 0, + emitterFollowBoneOffsetY: 0, + emitterFollowBoneRotation: 0, + emitterFollowBoneScaleX: 1, + emitterFollowBoneScaleY: 1, + emitterAngleMode: 'fixed', + emitterFollowCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], + emitterFollowDuration: 2, + emitterFollowSpace: 'world', + emitterFollowDirection: 'forward', + emitterFollowOffset: 0, + } +} + +/** 为热更新或旧版配置补齐后来新增的字段,避免 undefined 进入粒子计算。 */ +export function ensureEmitterConfig(config: EmitterConfig): EmitterConfig { + const defaults = defaultConfig() as unknown as Record + const target = config as unknown as Record + const needsShapeRangeMigration = target.shapeRangeVersion !== 1 + const legacyRadius = Number(target.radius) + const legacyRectW = Number(target.rectW) + const legacyRectH = Number(target.rectH) + const legacyDirection = Number(target.direction) + const legacySpread = Number(target.spread) + const legacyShape = target.shape + const needsImageWeightMigration = target.imageWeightVersion !== 1 + const needsLoopDurationMigration = target.loopDurationFrames == null + const needsGravityMigration = target.gravityMode == null + const legacyGravity = Number(target.gravity) + const needsWindMigration = target.windMode == null + const legacyWindX = Number(target.windX) + const legacyWindY = Number(target.windY) + const needsForceFieldMigration = target.forceFalloff == null + const legacyForceStrength = Number(target.forceStrength) + const needsTrailCurveMigration = target.trailConfigVersion !== 3 + const needsTrailResourceMigration = !Array.isArray(target.trailResources) + const needsTrailResourceStyleMigration = target.trailResourceVersion !== 6 + const legacyTrailTexture = target.trailTexture as Texture | null | undefined + const legacyTrailTextureName = String(target.trailTextureName || 'trail') + const legacyTrailPreviewUrl = String(target.trailPreviewUrl || '/images/trail.png').replace('/trails/trail.png', '/images/trail.png') + for (const [key, value] of Object.entries(defaults)) { + if (target[key] !== undefined && target[key] !== null) continue + target[key] = Array.isArray(value) + ? value.map((item) => typeof item === 'object' && item !== null ? { ...item } : item) + : value + } + if (needsShapeRangeMigration) { + config.innerRadius = 0 + config.outerRadius = Math.max(0, Number.isFinite(legacyRadius) ? legacyRadius : defaults.outerRadius as number) + config.innerRectW = 0 + config.innerRectH = 0 + config.outerRectW = Math.max(0, Number.isFinite(legacyRectW) ? legacyRectW : defaults.outerRectW as number) + config.outerRectH = Math.max(0, Number.isFinite(legacyRectH) ? legacyRectH : defaults.outerRectH as number) + config.coneDirection = Number.isFinite(legacyDirection) ? legacyDirection : 90 + config.emissionAngleMode = Number.isFinite(legacySpread) && legacySpread > 0 ? 'random' : 'fixed' + if (legacyShape === 'cone') config.spread = Math.max(0, Number(config.coneAngle) || 0) + config.shapeRangeVersion = 1 + } + if (config.shape === 'orbit') config.shape = 'path' + if (!['fixed', 'random', 'radial', 'path-normal', 'path-tangent'].includes(config.emissionAngleMode)) config.emissionAngleMode = 'fixed' + if (!['circle', 'rect', 'cone'].includes(config.shape) && config.emissionAngleMode === 'radial') config.emissionAngleMode = 'fixed' + if (config.shape !== 'path' && (config.emissionAngleMode === 'path-normal' || config.emissionAngleMode === 'path-tangent')) config.emissionAngleMode = 'fixed' + config.spawnPathId = Math.max(0, Math.round(Number(config.spawnPathId) || 0)) + if (config.spawnPathDistribution !== 'fixed' && config.spawnPathDistribution !== 'random') config.spawnPathDistribution = 'fixed' + config.innerRadius = Math.max(0, Number(config.innerRadius) || 0) + config.outerRadius = Math.max(config.innerRadius, Number(config.outerRadius) || 0) + config.innerRectW = Math.max(0, Number(config.innerRectW) || 0) + config.innerRectH = Math.max(0, Number(config.innerRectH) || 0) + config.outerRectW = Math.max(config.innerRectW, Number(config.outerRectW) || 0) + config.outerRectH = Math.max(config.innerRectH, Number(config.outerRectH) || 0) + const normalizedCollisionColliderIds = Array.from(new Set( + (Array.isArray(config.collisionColliderIds) ? config.collisionColliderIds : []) + .map((id) => Math.round(Number(id))) + .filter((id) => Number.isFinite(id) && id > 0), + )) + if (normalizedCollisionColliderIds.length !== config.collisionColliderIds.length + || normalizedCollisionColliderIds.some((id, index) => id !== config.collisionColliderIds[index])) { + config.collisionColliderIds = normalizedCollisionColliderIds + } + if (config.streamBehavior !== 'normal' && config.streamBehavior !== 'loop') config.streamBehavior = 'normal' + if (needsLoopDurationMigration || !Number.isFinite(config.loopDurationFrames)) config.loopDurationFrames = Math.ceil(Math.max(1 / 30, Number(config.duration) || 1) * 30) + config.loopDurationFrames = Math.min(1800, Math.max(1, Math.ceil(config.loopDurationFrames))) + if (typeof config.generateLoopStartAnimation !== 'boolean') config.generateLoopStartAnimation = false + if (typeof config.generateLoopEndAnimation !== 'boolean') config.generateLoopEndAnimation = false + if (typeof config.loopStartUseCustomDuration !== 'boolean') config.loopStartUseCustomDuration = false + if (typeof config.loopEndUseCustomDuration !== 'boolean') config.loopEndUseCustomDuration = false + config.loopStartDurationFrames = Math.min(1800, Math.max(1, Math.ceil(Number(config.loopStartDurationFrames) || 30))) + config.loopEndDurationFrames = Math.min(1800, Math.max(1, Math.ceil(Number(config.loopEndDurationFrames) || 30))) + if (!Array.isArray(config.imageResources) || config.imageResources.length === 0) { + config.imageResources = defaultConfig().imageResources + } + for (const resource of config.imageResources) { + if (!resource.texture && config.texture) resource.texture = config.texture + if (!resource.textureName) resource.textureName = 'star' + if (resource.previewUrl === '/particles/star.png') resource.previewUrl = '/images/star.png' + if (!resource.previewUrl) resource.previewUrl = resource.textureName === 'star' ? '/images/star.png' : '' + if (resource.imageMode !== 'fixed' && resource.imageMode !== 'sequence') resource.imageMode = 'fixed' + if ((resource.sequencePlayback as string) === 'once') resource.sequencePlayback = 'once-hold' + else if ((resource.sequencePlayback as string) === 'loop') resource.sequencePlayback = 'loop-forward' + else if (!['once-hide', 'once-hold', 'loop-forward', 'loop-reverse'].includes(resource.sequencePlayback)) { + resource.sequencePlayback = 'loop-forward' + } + if (!Number.isFinite(resource.sequenceFps)) resource.sequenceFps = 30 + resource.sequenceFps = Math.min(120, Math.max(1, Number(resource.sequenceFps) || 30)) + if (!Array.isArray(resource.sequenceFrames)) resource.sequenceFrames = [] + for (const frame of resource.sequenceFrames) { + if (typeof frame.name !== 'string') frame.name = '' + if (typeof frame.previewUrl !== 'string') frame.previewUrl = '' + if (frame.texture === undefined) frame.texture = null + } + if (!Number.isFinite(resource.weight)) resource.weight = 100 + if (typeof resource.locked !== 'boolean') resource.locked = false + if (!Number.isFinite(resource.scale)) resource.scale = 1 + if (!Number.isFinite(resource.anchorX)) resource.anchorX = 0.5 + if (!Number.isFinite(resource.anchorY)) resource.anchorY = 0.5 + if (resource.colorMode !== 'fixed' && resource.colorMode !== 'random' && resource.colorMode !== 'lifetime') { + resource.colorMode = config.colorOverLife ? 'lifetime' : 'fixed' + } + if (!resource.colorStart) resource.colorStart = config.colorStart || '#ffffff' + if (!resource.colorEnd) resource.colorEnd = config.colorEnd || resource.colorStart + if (!Array.isArray(resource.colorGradient) || resource.colorGradient.length < 2) { + resource.colorGradient = [ + { position: 0, color: resource.colorStart }, + { position: 1, color: resource.colorEnd }, + ] + } + if (!Object.prototype.hasOwnProperty.call(BLEND_MAP, resource.blend)) resource.blend = config.blend || 'normal' + if (!['off', 'fixed', 'curve'].includes(resource.independentAlpha)) resource.independentAlpha = config.independentAlpha || 'off' + if (!Number.isFinite(resource.alpha)) resource.alpha = Number.isFinite(config.alphaScale) ? config.alphaScale : 1 + if (!['跟随导出', '线性', '贝塞尔'].includes(resource.alphaCurveMode)) resource.alphaCurveMode = config.curveMode || '跟随导出' + if (!Array.isArray(resource.alphaCurve) || resource.alphaCurve.length < 2) { + resource.alphaCurve = (config.alphaCurve || [{ x: 0, y: 1 }, { x: 1, y: 1 }]).map((point) => ({ ...point })) + } + } + if (config.imageResources.length === 1) { + config.imageResources[0].weight = 100 + config.imageResources[0].locked = false + } else if (needsImageWeightMigration) { + const equalWeight = 100 / config.imageResources.length + config.imageResources.forEach((resource, index) => { + resource.weight = index === config.imageResources.length - 1 + ? 100 - equalWeight * (config.imageResources.length - 1) + : equalWeight + resource.locked = false + }) + } + config.imageWeightVersion = 1 + if (needsGravityMigration) { + const migratedStrength = Number.isFinite(legacyGravity) && legacyGravity !== 0 ? legacyGravity : 980 + config.gravity = migratedStrength + config.gravityMin = migratedStrength + config.gravityMax = migratedStrength + } + if (needsWindMigration) { + const hasLegacyWind = Number.isFinite(legacyWindX) && Number.isFinite(legacyWindY) && (legacyWindX !== 0 || legacyWindY !== 0) + config.windMin = hasLegacyWind ? Math.hypot(legacyWindX, legacyWindY) : 100 + config.windMax = config.windMin + config.windDirection = hasLegacyWind ? Math.atan2(-legacyWindY, legacyWindX) * 180 / Math.PI : 0 + } + if (needsForceFieldMigration) { + config.forceStrength = Number.isFinite(legacyForceStrength) && legacyForceStrength !== 0 ? legacyForceStrength : 10 + } + if (needsTrailCurveMigration) { + config.trailConfigVersion = 3 + config.trailAlphaCurve = [{ x: 0, y: 1 }, { x: 1, y: 1 }] + config.trailLifeLengthCurve = [{ x: 0, y: 1 }, { x: 1, y: 1 }] + config.trailShapeCurve = [{ x: 0, y: 1 }, { x: 1, y: 1 }] + config.trailGridRows = 4 + config.trailGridCols = 4 + } + if (needsTrailResourceMigration || !config.trailResources.length) { + config.trailResources = [{ + id: 1, + texture: legacyTrailTexture || null, + textureName: legacyTrailTextureName, + previewUrl: legacyTrailPreviewUrl, + weight: 100, + locked: false, + rotation: 0, + colorMode: config.trailColorMode, + color: config.trailColor, + colorGradient: config.trailColorGradient.map((stop) => ({ ...stop })), + blend: 'normal', + alphaMode: config.trailAlphaMode, + alpha: config.trailAlpha, + alphaCurve: config.trailAlphaCurve.map((point) => ({ ...point })), + boneCount: config.trailBoneCount, + trailRatio: 100, + lengthMode: 'fixed', + length: config.trailLength, + lengthMin: config.trailLength, + lengthMax: config.trailLength, + widthSizeMode: 'fixed', + width: config.trailWidth, + widthMin: config.trailWidth, + widthMax: config.trailWidth, + widthMode: config.trailWidthMode, + lifeLengthEnabled: config.trailLifeLengthEnabled, + lifeLengthCurve: config.trailLifeLengthCurve.map((point) => ({ ...point })), + shapeEnabled: config.trailShapeEnabled, + shapeCurve: config.trailShapeCurve.map((point) => ({ ...point })), + }] + } + for (const resource of config.trailResources) { + if (!resource.textureName) resource.textureName = 'trail' + if (resource.previewUrl === '/trails/trail.png') resource.previewUrl = '/images/trail.png' + if (!resource.previewUrl) resource.previewUrl = '/images/trail.png' + if (!Number.isFinite(resource.weight)) resource.weight = 100 + if (typeof resource.locked !== 'boolean') resource.locked = false + if (!Number.isFinite(resource.rotation)) resource.rotation = 0 + if (!['particle', 'fixed', 'curve'].includes(resource.colorMode)) resource.colorMode = config.trailColorMode || 'particle' + if (!resource.color) resource.color = config.trailColor || '#ffffff' + if (!Array.isArray(resource.colorGradient) || resource.colorGradient.length < 2) { + resource.colorGradient = (config.trailColorGradient || [{ position: 0, color: '#ffffff' }, { position: 1, color: '#ffffff' }]).map((stop) => ({ ...stop })) + } + if (!Object.prototype.hasOwnProperty.call(BLEND_MAP, resource.blend)) resource.blend = 'normal' + if (!['particle', 'fixed', 'curve'].includes(resource.alphaMode)) resource.alphaMode = config.trailAlphaMode || 'particle' + if (!Number.isFinite(resource.alpha)) resource.alpha = Number.isFinite(config.trailAlpha) ? config.trailAlpha : 1 + if (!Array.isArray(resource.alphaCurve) || resource.alphaCurve.length < 2) { + resource.alphaCurve = (config.trailAlphaCurve || [{ x: 0, y: 1 }, { x: 1, y: 1 }]).map((point) => ({ ...point })) + } + if (!Number.isFinite(resource.boneCount)) resource.boneCount = Number.isFinite(config.trailBoneCount) ? config.trailBoneCount : 3 + if (!Number.isFinite(resource.trailRatio)) resource.trailRatio = 100 + resource.trailRatio = Math.min(100, Math.max(0, resource.trailRatio)) + if (!['fixed', 'random'].includes(resource.lengthMode)) resource.lengthMode = 'fixed' + if (!Number.isFinite(resource.length)) resource.length = Number.isFinite(config.trailLength) ? config.trailLength : 100 + if (!Number.isFinite(resource.lengthMin)) resource.lengthMin = resource.length + if (!Number.isFinite(resource.lengthMax)) resource.lengthMax = resource.length + if (!['fixed', 'random'].includes(resource.widthSizeMode)) resource.widthSizeMode = 'fixed' + if (!Number.isFinite(resource.width)) resource.width = Number.isFinite(config.trailWidth) ? config.trailWidth : 100 + if (!Number.isFinite(resource.widthMin)) resource.widthMin = resource.width + if (!Number.isFinite(resource.widthMax)) resource.widthMax = resource.width + if (!['particle', 'fixed'].includes(resource.widthMode)) resource.widthMode = config.trailWidthMode || 'particle' + if (typeof resource.lifeLengthEnabled !== 'boolean') resource.lifeLengthEnabled = Boolean(config.trailLifeLengthEnabled) + if (!Array.isArray(resource.lifeLengthCurve) || resource.lifeLengthCurve.length < 2) { + resource.lifeLengthCurve = (config.trailLifeLengthCurve || [{ x: 0, y: 1 }, { x: 1, y: 1 }]).map((point) => ({ ...point })) + } + if (typeof resource.shapeEnabled !== 'boolean') resource.shapeEnabled = Boolean(config.trailShapeEnabled) + if (!Array.isArray(resource.shapeCurve) || resource.shapeCurve.length < 2) { + resource.shapeCurve = (config.trailShapeCurve || [{ x: 0, y: 1 }, { x: 1, y: 1 }]).map((point) => ({ ...point })) + } + } + if (config.trailResources.length === 1) { + config.trailResources[0].weight = 100 + config.trailResources[0].locked = false + } + if (needsTrailResourceStyleMigration) { + for (const resource of config.trailResources) { + resource.alphaCurve = resource.alphaCurve?.length >= 2 ? resource.alphaCurve : [{ x: 0, y: 1 }, { x: 1, y: 1 }] + } + } + config.trailResourceVersion = 6 + return config +} + diff --git a/src/core/particleConstants.ts b/src/core/particleConstants.ts new file mode 100644 index 0000000..36ce762 --- /dev/null +++ b/src/core/particleConstants.ts @@ -0,0 +1,4 @@ +import type { Blend } from './particleTypes' + +export const BLEND_MAP: Record = { normal: 0, add: 1, multiply: 2, screen: 3 } +export const MAX_PARTICLES = 400 diff --git a/src/core/particleEmitter.ts b/src/core/particleEmitter.ts index 6a54bde..ce84f2b 100644 --- a/src/core/particleEmitter.ts +++ b/src/core/particleEmitter.ts @@ -1,876 +1,14 @@ import { Container, Sprite, Texture, IPointData, SimpleMesh, Graphics } from 'pixi.js' import { pathDistributionProgress, sampleEmitterShape, sampleEmissionVelocityAngle, type EmissionAngleMode, type EmitterShapeSample } from './emitterShape' -/** 发射模式 */ -export type EmitMode = 'stream' | 'burst' -/** 发射形状 */ -export type EmitShape = 'point' | 'circle' | 'rect' | 'cone' | 'path' | 'orbit' -/** 混合模式 */ -export type Blend = 'normal' | 'add' | 'multiply' | 'screen' -/** 粒子属性取值方式 */ -export type AttributeMode = 'fixed' | 'random' | 'curve' -/** 初始旋转额外支持跟随发射方向 */ -export type RotationMode = AttributeMode | 'direction' -export type ScaleAxisMode = 'uniform' | 'separate' -export interface CurvePoint { x: number; y: number; inX?: number; inY?: number; outX?: number; outY?: number } -export interface ColorGradientStop { position: number; color: string } +import type { EmitMode, EmitShape, Blend, AttributeMode, RotationMode, ScaleAxisMode, CurvePoint, ColorGradientStop, ColliderShape, CollisionResponse, SceneCollider, ParticleImageResource, ParticleSequenceFrame, TrailImageResource, EmitterConfig, ParticleState, TrailBoneState, TrailState } from './particleTypes' +import { defaultConfig, ensureEmitterConfig } from './particleConfig' +import { BLEND_MAP, MAX_PARTICLES } from './particleConstants' +import { lerp, finite, localToWorldMath, worldMathToLocal, localVelocityToWorldMath, worldVelocityToLocalMath, resolveColliderPoint, tFromLife, seededUnit, initialValue, overLifeValue, cubicValue, curveAt, mulberry32, hexToNumber, blendRgb, gradientColorAt, hexToRgb, type SimulationTransform } from './particleMath' -export type ColliderShape = 'circle' | 'ellipse' | 'rect' | 'polygon' | 'custom' -export type CollisionResponse = 'physics' | 'pause' | 'destroy' -export interface SceneCollider { - id: number - shape: ColliderShape - enabled: boolean - x: number - y: number - rotation: number - scaleX: number - scaleY: number - radius: number - radiusX: number - radiusY: number - width: number - height: number - sides: number - response: CollisionResponse - elasticity: number - friction: number -} - -export interface ParticleImageResource { - id: number - texture: Texture | null - textureName: string - textureFolder: string - previewUrl: string - /** 图片模式:固定图片或按粒子出生时间播放的序列帧。 */ - imageMode: 'fixed' | 'sequence' - /** 序列帧播放方式:单次隐藏、单次定格、正向循环或反向循环。 */ - sequencePlayback: 'once-hide' | 'once-hold' | 'loop-forward' | 'loop-reverse' - /** 序列帧每秒播放帧数。 */ - sequenceFps: number - sequenceFrames: ParticleSequenceFrame[] - /** 发射权重,多个资源按权重随机选择 */ - weight: number - /** 锁定后,调整其他资源时保持当前占比 */ - locked: boolean - scale: number - anchorX: number - anchorY: number - /** 每张贴图独立的颜色、混合与透明度设置 */ - colorMode: 'fixed' | 'random' | 'lifetime' - colorStart: string - colorEnd: string - colorGradient: ColorGradientStop[] - blend: Blend - independentAlpha: 'off' | 'fixed' | 'curve' - alpha: number - alphaCurveMode: '跟随导出' | '线性' | '贝塞尔' - alphaCurve: CurvePoint[] -} - -export interface ParticleSequenceFrame { - name: string - previewUrl: string - texture: Texture | null -} - -export interface TrailImageResource { - id: number - texture: Texture | null - textureName: string - previewUrl: string - weight: number - locked: boolean - /** 图片默认方向,修改后重新生成 UV 并绑定蒙皮 */ - rotation: number - colorMode: 'particle' | 'fixed' | 'curve' - color: string - colorGradient: ColorGradientStop[] - blend: Blend - alphaMode: 'particle' | 'fixed' | 'curve' - alpha: number - alphaCurve: CurvePoint[] - boneCount: number - /** 选中该资源的粒子实际生成拖尾的比例(0-100)。 */ - trailRatio: number - lengthMode: 'fixed' | 'random' - length: number - lengthMin: number - lengthMax: number - widthSizeMode: 'fixed' | 'random' - width: number - widthMin: number - widthMax: number - widthMode: 'particle' | 'fixed' - lifeLengthEnabled: boolean - lifeLengthCurve: CurvePoint[] - shapeEnabled: boolean - shapeCurve: CurvePoint[] -} - -/** 粒子配置(引用保持,面板改字段即实时生效) */ -export interface EmitterConfig { - texture: Texture - imageResources: ParticleImageResource[] - imageWeightVersion: number - name: string - // 发射 - mode: EmitMode - rate: number // 持续:每秒发射数 - /** 持续发射表现:常规持续或可无缝衔接的循环段。 */ - streamBehavior: 'normal' | 'loop' - /** 循环持续的独立时长(帧),不覆盖常规持续的 duration 秒数。 */ - loopDurationFrames: number - /** 循环持续模式下是否生成循环开始动画。 */ - generateLoopStartAnimation: boolean - /** 是否手动指定进入循环稳定状态的时长;关闭时按最长粒子生命周期计算。 */ - loopStartUseCustomDuration: boolean - /** 进入循环稳定状态的时长(帧)。 */ - loopStartDurationFrames: number - /** 循环持续模式下是否生成循环结束动画。 */ - generateLoopEndAnimation: boolean - /** 是否手动指定从循环稳定状态消亡的时长;关闭时按最长粒子生命周期计算。 */ - loopEndUseCustomDuration: boolean - /** 从循环稳定状态消亡的时长(帧)。 */ - loopEndDurationFrames: number - burstCount: number // 爆发:单次数量 - burstLoop: boolean // 爆发是否每秒重复 - /** 延迟发射(秒)= 粒子条左端位置 */ - delay: number - /** 持续发射时长(秒)= 时间轴绿色段;爆发模式不使用该时长 */ - duration: number - shape: EmitShape // 发射形状 - /** 发射范围结构版本,用于旧配置迁移。 */ - shapeRangeVersion: number - /** 圆形和锥形发射范围的内外半径。 */ - innerRadius: number - outerRadius: number - /** 矩形发射范围:外矩形减去内矩形。 */ - innerRectW: number - innerRectH: number - outerRectW: number - outerRectH: number - /** 粒子出生路径;与修改器中的发射器整体跟随路径完全独立。 */ - spawnPathId: number - spawnPathDistribution: 'fixed' | 'random' - /** 旧版形状尺寸字段,保留用于配置迁移。 */ - radius: number - rectW: number - rectH: number - /** 发射器中心 X/Y */ - centerX: number - centerY: number - // 根节点(root)变换:作用于整个粒子系统(旋转/缩放),与场景对象参数联动 - rootRotation: number - rootScaleX: number - rootScaleY: number - // 方向 - emissionAngleMode: EmissionAngleMode - direction: number - spread: number - /** 锥形区域朝向;与粒子发射角度独立。 */ - coneDirection: number - /** 锥形开口角度(发电器形状=锥体时,粒子在锥形扇区内均匀散开) */ - coneAngle: number - // 属性 - lifeMin: number - lifeMax: number - lifeMode: AttributeMode - lifeCurve: CurvePoint[] - speedMin: number - speedMax: number - speedMode: AttributeMode - speedCurve: CurvePoint[] - scaleMin: number - scaleMax: number - scaleMode: AttributeMode - scaleAxisMode: ScaleAxisMode - scaleYMin: number - scaleYMax: number - scaleCurve: CurvePoint[] - scaleYCurve: CurvePoint[] - scaleEndRatio: number - initialRotationMode: RotationMode - initialRotationMin: number - initialRotationMax: number - initialRotationCurve: CurvePoint[] - alpha: number - alphaEnd: number - rotationSpeedMin: number - rotationSpeedMax: number - // 生命周期内属性 - speedOverLifeEnabled: boolean - speedOverLifeMode: AttributeMode - speedOverLifeMin: number - speedOverLifeMax: number - speedOverLifeCurve: CurvePoint[] - scaleOverLifeEnabled: boolean - scaleOverLifeMode: AttributeMode - scaleOverLifeAxisMode: ScaleAxisMode - scaleOverLifeMin: number - scaleOverLifeMax: number - scaleYOverLifeMin: number - scaleYOverLifeMax: number - scaleOverLifeCurve: CurvePoint[] - scaleYOverLifeCurve: CurvePoint[] - rotationOverLifeEnabled: boolean - rotationOverLifeMode: AttributeMode - rotationOverLifeCurve: CurvePoint[] - // 物理 - /** 旧版重力值,保留用于配置迁移 */ - gravity: number - gravityMode: 'fixed' | 'random' - gravityMin: number - gravityMax: number - /** 数学角度:0 向右,-90 向屏幕下方 */ - gravityDirection: number - /** 生命周期内重力倍率,纵轴范围 0~1 */ - gravityCurve: CurvePoint[] - /** 阻尼(速度衰减系数,0=无) */ - damping: number - /** 全局随机种子;包括 0 在内的任意整数都可确定性复现 */ - seed: number - // 颜色 - colorStart: string - colorEnd: string - colorOverLife: boolean - // 混合 - blend: Blend - /** 透明度模式:fixed(固定)/ curve(曲线) */ - alphaMode: 'fixed' | 'curve' - /** 曲线模式(透明度插值方式) */ - curveMode: '跟随导出' | '线性' | '贝塞尔' - /** 透明度曲线关键帧:x=生命周期时刻(0~1),y=透明度(0~1,1=完全不透明) */ - alphaCurve: { x: number; y: number }[] - /** 图片名称(贴图资源名,默认 dot) */ - textureName: string - /** 子文件夹(图片资源路径,占位) */ - textureFolder: string - /** 占比(0~1) */ - alphaScale: number - /** 贴图锚点/轴心 x,y(0~1) */ - anchorX: number - anchorY: number - /** 独立透明度:off / fixed / curve */ - independentAlpha: 'off' | 'fixed' | 'curve' - // 发射点偏移 - offsetX: number - offsetY: number - // ===== 修改器 (Modifiers) ===== - /** 开启移动噪声 */ - noise: boolean - /** 噪声影响比例(0~100%) */ - noiseAmt: number - /** 粒子偏离原轨迹的最大距离(px) */ - noiseRange: number - /** 噪声每秒变化速度 */ - noiseSpeed: number - /** 开启重力(由 gravity 控制) */ - useGravity: boolean - /** 开启风力 */ - wind: boolean - /** 旧版二维风力,保留用于配置迁移 */ - windX: number - windY: number - windMode: 'fixed' | 'random' - windMin: number - windMax: number - /** 数学角度:0 向右,-90 向屏幕下方 */ - windDirection: number - /** 生命周期内风力倍率,纵轴范围 0~1 */ - windCurve: CurvePoint[] - /** 开启力场(吸力/斥力) */ - forceField: boolean - forceStrength: number - forceRadius: number - /** 力场中心使用场景全局数学坐标 */ - forceCenterX: number - forceCenterY: number - forceFalloff: 'constant' | 'linear' | 'inverse' - /** 开启吸附:粒子在延迟后从当前位置移动到全局吸附点,到达范围后死亡 */ - attraction: boolean - attractionCenterX: number - attractionCenterY: number - attractionRadius: number - attractionDuration: number - attractionDelay: number - attractionDelayMode: 'global' | 'particle' - attractionPath: 'linear' | 'curve' - /** 开启拖尾 */ - trail: boolean - trailConfigVersion: number - trailResources: TrailImageResource[] - trailResourceVersion: number - /** 拖尾使用独立图片和独立网格蒙皮 */ - /** @deprecated 旧版单拖尾资源字段,仅用于配置迁移 */ - trailTexture: Texture | null - trailTextureName: string - trailPreviewUrl: string - trailColorMode: 'particle' | 'fixed' | 'curve' - trailColor: string - trailColorGradient: ColorGradientStop[] - trailAlphaMode: 'particle' | 'fixed' | 'curve' - trailAlpha: number - trailAlphaCurve: CurvePoint[] - /** 每个粒子的同级拖尾骨骼数量 */ - trailBoneCount: number - trailLength: number - trailWidth: number - trailWidthMode: 'particle' | 'fixed' - trailLifeLengthEnabled: boolean - trailLifeLengthCurve: CurvePoint[] - trailShapeEnabled: boolean - trailShapeCurve: CurvePoint[] - /** 蒙皮网格拓扑尺寸 */ - trailGridRows: number - trailGridCols: number - /** 开启碰撞;仅 collisionColliderIds 中显式选中的场景碰撞体参与计算。 */ - collision: boolean - collisionColliderIds: number[] - /** 开启路径跟随(预留) */ - pathFollow: boolean - emitterFollow: boolean - emitterFollowMode: 'none' | 'path' | 'bone' - emitterFollowPathId: number - emitterFollowSpineId: number - emitterFollowBoneName: string - emitterFollowBoneOffsetX: number - emitterFollowBoneOffsetY: number - emitterFollowBoneRotation: number - emitterFollowBoneScaleX: number - emitterFollowBoneScaleY: number - emitterAngleMode: 'fixed' | 'direction' - emitterFollowCurve: CurvePoint[] - emitterFollowDuration: number - emitterFollowSpace: 'local' | 'world' - emitterFollowDirection: 'forward' | 'reverse' - emitterFollowOffset: number -} - -/** 粒子瞬间状态(供骨骼同步 / 导出) */ -export interface ParticleState { - /** 对应骨骼在 root 下的命名 p_ */ - boneName: string - /** 每次出生唯一且可复现的编号;关闭导出骨骼池时用于区分同一池槽的多次复用。 */ - spawnId?: number - x: number - y: number - rotation: number - scaleX: number - scaleY: number - /** 已烘焙的数学世界坐标;导出时不再依赖路径、碰撞体或 Spine。 */ - worldX?: number - worldY?: number - worldRotation?: number - worldScaleX?: number - worldScaleY?: number - alpha: number - colorHex: number - resourceId?: number - /** 当前图片资源的序列帧索引,固定图片为 0。 */ - imageFrameIndex?: number - /** 单次播放结束后可只隐藏图片,粒子和拖尾仍继续存在。 */ - imageVisible?: boolean - /** 拖尾拥有一组同级骨骼和蒙皮状态,录制/回放时一并保存。 */ - trailState?: TrailState - active: boolean -} - -export interface TrailBoneState { - boneName: string - x: number - y: number - rotation: number - worldX?: number - worldY?: number - worldRotation?: number -} - -export interface TrailState { - bones: TrailBoneState[] - /** 兼容旧配置;当前拖尾整组骨骼同时出生和死亡,存在时始终等于骨骼总数。 */ - activeBoneCount?: number - width: number - alpha: number - colorHex: number - resourceId?: number -} - -export function defaultConfig(): EmitterConfig { - return { - texture: null as unknown as Texture, - imageResources: [{ - id: 1, - texture: null, - textureName: 'star', - textureFolder: '', - previewUrl: '/images/star.png', - imageMode: 'fixed', - sequencePlayback: 'loop-forward', - sequenceFps: 30, - sequenceFrames: [], - weight: 100, - locked: false, - scale: 1, - anchorX: 0.5, - anchorY: 0.5, - colorMode: 'fixed', - colorStart: '#ffffff', - colorEnd: '#ff4d4d', - colorGradient: [{ position: 0, color: '#ffffff' }, { position: 1, color: '#ff4d4d' }], - blend: 'normal', - independentAlpha: 'off', - alpha: 1, - alphaCurveMode: '跟随导出', - alphaCurve: [{ x: 0, y: 0 }, { x: 0.1, y: 1 }, { x: 0.9, y: 1 }, { x: 1, y: 0 }], - }], - imageWeightVersion: 1, - name: 'ParticleSystem1', - mode: 'stream', - rate: 20, - streamBehavior: 'normal', - loopDurationFrames: 30, - generateLoopStartAnimation: false, - loopStartUseCustomDuration: false, - loopStartDurationFrames: 30, - generateLoopEndAnimation: false, - loopEndUseCustomDuration: false, - loopEndDurationFrames: 30, - burstCount: 50, - burstLoop: false, // 一次性爆发(持续爆发开关已移除) - delay: 0, - duration: 1, // 持续发射时长;默认 1 秒(30f)。爆发模式运行时按 0 处理。 - shape: 'point', - shapeRangeVersion: 1, - innerRadius: 0, - outerRadius: 30, - innerRectW: 0, - innerRectH: 0, - outerRectW: 60, - outerRectH: 40, - spawnPathId: 0, - spawnPathDistribution: 'fixed', - radius: 30, - rectW: 60, - rectH: 40, - centerX: 0, - centerY: 0, - rootRotation: 0, - rootScaleX: 1, - rootScaleY: 1, - emissionAngleMode: 'random', - direction: 0, - spread: 360, - coneDirection: 90, - coneAngle: 60, - lifeMin: 0.6, - lifeMax: 1.8, - lifeMode: 'random', - lifeCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], - speedMin: 30, - speedMax: 140, - speedMode: 'random', - speedCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], - scaleMin: 0.3, - scaleMax: 0.8, - scaleMode: 'random', - scaleAxisMode: 'uniform', - scaleYMin: 0.3, - scaleYMax: 0.8, - scaleCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], - scaleYCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], - scaleEndRatio: 0.3, - initialRotationMode: 'random', - initialRotationMin: 0, - initialRotationMax: 360, - initialRotationCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], - alpha: 0.9, - alphaEnd: 0, - rotationSpeedMin: -180, - rotationSpeedMax: 180, - speedOverLifeEnabled: false, - speedOverLifeMode: 'fixed', - speedOverLifeMin: 1, - speedOverLifeMax: 1, - speedOverLifeCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], - scaleOverLifeEnabled: false, - scaleOverLifeMode: 'curve', - scaleOverLifeAxisMode: 'uniform', - scaleOverLifeMin: 0, - scaleOverLifeMax: 1, - scaleYOverLifeMin: 0, - scaleYOverLifeMax: 1, - scaleOverLifeCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], - scaleYOverLifeCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], - rotationOverLifeEnabled: false, - rotationOverLifeMode: 'random', - rotationOverLifeCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], - gravity: 980, - gravityMode: 'fixed', - gravityMin: 980, - gravityMax: 980, - gravityDirection: -90, - gravityCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], - damping: 0, - seed: 0, - colorStart: '#ffffff', - colorEnd: '#ff4d4d', - colorOverLife: false, - blend: 'add', - alphaMode: 'curve', - curveMode: '线性', - alphaCurve: [{ x: 0, y: 0 }, { x: 0.2, y: 1 }, { x: 0.8, y: 1 }, { x: 1, y: 0 }], - textureName: 'star', - textureFolder: '', - alphaScale: 1, - anchorX: 0.5, - anchorY: 0.5, - independentAlpha: 'off', - offsetX: 0, - offsetY: 0, - noise: false, - noiseAmt: 30, - noiseRange: 100, - noiseSpeed: 1, - useGravity: false, - wind: false, - windX: 0, - windY: 0, - windMode: 'fixed', - windMin: 100, - windMax: 100, - windDirection: 0, - windCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], - forceField: false, - forceStrength: 10, - forceRadius: 100, - forceCenterX: 0, - forceCenterY: 0, - forceFalloff: 'linear', - attraction: false, - attractionCenterX: 200, - attractionCenterY: 0, - attractionRadius: 20, - attractionDuration: 0.5, - attractionDelay: 0.1, - attractionDelayMode: 'particle', - attractionPath: 'curve', - trail: false, - trailConfigVersion: 3, - trailResources: [{ - id: 1, - texture: null, - textureName: 'trail', - previewUrl: '/images/trail.png', - weight: 100, - locked: false, - rotation: 0, - colorMode: 'particle', - color: '#ffffff', - colorGradient: [{ position: 0, color: '#ffffff' }, { position: 1, color: '#ffffff' }], - blend: 'normal', - alphaMode: 'particle', - alpha: 1, - alphaCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], - boneCount: 3, - trailRatio: 100, - lengthMode: 'fixed', - length: 100, - lengthMin: 100, - lengthMax: 100, - widthSizeMode: 'fixed', - width: 100, - widthMin: 100, - widthMax: 100, - widthMode: 'particle', - lifeLengthEnabled: false, - lifeLengthCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], - shapeEnabled: false, - shapeCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], - }], - trailResourceVersion: 6, - trailTexture: null, - trailTextureName: 'trail', - trailPreviewUrl: '/images/trail.png', - trailColorMode: 'particle', - trailColor: '#ffffff', - trailColorGradient: [{ position: 0, color: '#ffffff' }, { position: 1, color: '#ffffff' }], - trailAlphaMode: 'particle', - trailAlpha: 1, - trailAlphaCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], - trailBoneCount: 3, - trailLength: 100, - trailWidth: 100, - trailWidthMode: 'particle', - trailLifeLengthEnabled: false, - trailLifeLengthCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], - trailShapeEnabled: false, - trailShapeCurve: [{ x: 0, y: 1 }, { x: 1, y: 1 }], - trailGridRows: 4, - trailGridCols: 4, - collision: false, - collisionColliderIds: [], - pathFollow: false, - emitterFollow: false, - emitterFollowMode: 'none', - emitterFollowPathId: 0, - emitterFollowSpineId: 0, - emitterFollowBoneName: '', - emitterFollowBoneOffsetX: 0, - emitterFollowBoneOffsetY: 0, - emitterFollowBoneRotation: 0, - emitterFollowBoneScaleX: 1, - emitterFollowBoneScaleY: 1, - emitterAngleMode: 'fixed', - emitterFollowCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }], - emitterFollowDuration: 2, - emitterFollowSpace: 'world', - emitterFollowDirection: 'forward', - emitterFollowOffset: 0, - } -} - -/** 为热更新或旧版配置补齐后来新增的字段,避免 undefined 进入粒子计算。 */ -export function ensureEmitterConfig(config: EmitterConfig): EmitterConfig { - const defaults = defaultConfig() as unknown as Record - const target = config as unknown as Record - const needsShapeRangeMigration = target.shapeRangeVersion !== 1 - const legacyRadius = Number(target.radius) - const legacyRectW = Number(target.rectW) - const legacyRectH = Number(target.rectH) - const legacyDirection = Number(target.direction) - const legacySpread = Number(target.spread) - const legacyShape = target.shape - const needsImageWeightMigration = target.imageWeightVersion !== 1 - const needsLoopDurationMigration = target.loopDurationFrames == null - const needsGravityMigration = target.gravityMode == null - const legacyGravity = Number(target.gravity) - const needsWindMigration = target.windMode == null - const legacyWindX = Number(target.windX) - const legacyWindY = Number(target.windY) - const needsForceFieldMigration = target.forceFalloff == null - const legacyForceStrength = Number(target.forceStrength) - const needsTrailCurveMigration = target.trailConfigVersion !== 3 - const needsTrailResourceMigration = !Array.isArray(target.trailResources) - const needsTrailResourceStyleMigration = target.trailResourceVersion !== 6 - const legacyTrailTexture = target.trailTexture as Texture | null | undefined - const legacyTrailTextureName = String(target.trailTextureName || 'trail') - const legacyTrailPreviewUrl = String(target.trailPreviewUrl || '/images/trail.png').replace('/trails/trail.png', '/images/trail.png') - for (const [key, value] of Object.entries(defaults)) { - if (target[key] !== undefined && target[key] !== null) continue - target[key] = Array.isArray(value) - ? value.map((item) => typeof item === 'object' && item !== null ? { ...item } : item) - : value - } - if (needsShapeRangeMigration) { - config.innerRadius = 0 - config.outerRadius = Math.max(0, Number.isFinite(legacyRadius) ? legacyRadius : defaults.outerRadius as number) - config.innerRectW = 0 - config.innerRectH = 0 - config.outerRectW = Math.max(0, Number.isFinite(legacyRectW) ? legacyRectW : defaults.outerRectW as number) - config.outerRectH = Math.max(0, Number.isFinite(legacyRectH) ? legacyRectH : defaults.outerRectH as number) - config.coneDirection = Number.isFinite(legacyDirection) ? legacyDirection : 90 - config.emissionAngleMode = Number.isFinite(legacySpread) && legacySpread > 0 ? 'random' : 'fixed' - if (legacyShape === 'cone') config.spread = Math.max(0, Number(config.coneAngle) || 0) - config.shapeRangeVersion = 1 - } - if (config.shape === 'orbit') config.shape = 'path' - if (!['fixed', 'random', 'radial', 'path-normal', 'path-tangent'].includes(config.emissionAngleMode)) config.emissionAngleMode = 'fixed' - if (!['circle', 'rect', 'cone'].includes(config.shape) && config.emissionAngleMode === 'radial') config.emissionAngleMode = 'fixed' - if (config.shape !== 'path' && (config.emissionAngleMode === 'path-normal' || config.emissionAngleMode === 'path-tangent')) config.emissionAngleMode = 'fixed' - config.spawnPathId = Math.max(0, Math.round(Number(config.spawnPathId) || 0)) - if (config.spawnPathDistribution !== 'fixed' && config.spawnPathDistribution !== 'random') config.spawnPathDistribution = 'fixed' - config.innerRadius = Math.max(0, Number(config.innerRadius) || 0) - config.outerRadius = Math.max(config.innerRadius, Number(config.outerRadius) || 0) - config.innerRectW = Math.max(0, Number(config.innerRectW) || 0) - config.innerRectH = Math.max(0, Number(config.innerRectH) || 0) - config.outerRectW = Math.max(config.innerRectW, Number(config.outerRectW) || 0) - config.outerRectH = Math.max(config.innerRectH, Number(config.outerRectH) || 0) - const normalizedCollisionColliderIds = Array.from(new Set( - (Array.isArray(config.collisionColliderIds) ? config.collisionColliderIds : []) - .map((id) => Math.round(Number(id))) - .filter((id) => Number.isFinite(id) && id > 0), - )) - if (normalizedCollisionColliderIds.length !== config.collisionColliderIds.length - || normalizedCollisionColliderIds.some((id, index) => id !== config.collisionColliderIds[index])) { - config.collisionColliderIds = normalizedCollisionColliderIds - } - if (config.streamBehavior !== 'normal' && config.streamBehavior !== 'loop') config.streamBehavior = 'normal' - if (needsLoopDurationMigration || !Number.isFinite(config.loopDurationFrames)) config.loopDurationFrames = Math.ceil(Math.max(1 / 30, Number(config.duration) || 1) * 30) - config.loopDurationFrames = Math.min(1800, Math.max(1, Math.ceil(config.loopDurationFrames))) - if (typeof config.generateLoopStartAnimation !== 'boolean') config.generateLoopStartAnimation = false - if (typeof config.generateLoopEndAnimation !== 'boolean') config.generateLoopEndAnimation = false - if (typeof config.loopStartUseCustomDuration !== 'boolean') config.loopStartUseCustomDuration = false - if (typeof config.loopEndUseCustomDuration !== 'boolean') config.loopEndUseCustomDuration = false - config.loopStartDurationFrames = Math.min(1800, Math.max(1, Math.ceil(Number(config.loopStartDurationFrames) || 30))) - config.loopEndDurationFrames = Math.min(1800, Math.max(1, Math.ceil(Number(config.loopEndDurationFrames) || 30))) - if (!Array.isArray(config.imageResources) || config.imageResources.length === 0) { - config.imageResources = defaultConfig().imageResources - } - for (const resource of config.imageResources) { - if (!resource.texture && config.texture) resource.texture = config.texture - if (!resource.textureName) resource.textureName = 'star' - if (resource.previewUrl === '/particles/star.png') resource.previewUrl = '/images/star.png' - if (!resource.previewUrl) resource.previewUrl = resource.textureName === 'star' ? '/images/star.png' : '' - if (resource.imageMode !== 'fixed' && resource.imageMode !== 'sequence') resource.imageMode = 'fixed' - if ((resource.sequencePlayback as string) === 'once') resource.sequencePlayback = 'once-hold' - else if ((resource.sequencePlayback as string) === 'loop') resource.sequencePlayback = 'loop-forward' - else if (!['once-hide', 'once-hold', 'loop-forward', 'loop-reverse'].includes(resource.sequencePlayback)) { - resource.sequencePlayback = 'loop-forward' - } - if (!Number.isFinite(resource.sequenceFps)) resource.sequenceFps = 30 - resource.sequenceFps = Math.min(120, Math.max(1, Number(resource.sequenceFps) || 30)) - if (!Array.isArray(resource.sequenceFrames)) resource.sequenceFrames = [] - for (const frame of resource.sequenceFrames) { - if (typeof frame.name !== 'string') frame.name = '' - if (typeof frame.previewUrl !== 'string') frame.previewUrl = '' - if (frame.texture === undefined) frame.texture = null - } - if (!Number.isFinite(resource.weight)) resource.weight = 100 - if (typeof resource.locked !== 'boolean') resource.locked = false - if (!Number.isFinite(resource.scale)) resource.scale = 1 - if (!Number.isFinite(resource.anchorX)) resource.anchorX = 0.5 - if (!Number.isFinite(resource.anchorY)) resource.anchorY = 0.5 - if (resource.colorMode !== 'fixed' && resource.colorMode !== 'random' && resource.colorMode !== 'lifetime') { - resource.colorMode = config.colorOverLife ? 'lifetime' : 'fixed' - } - if (!resource.colorStart) resource.colorStart = config.colorStart || '#ffffff' - if (!resource.colorEnd) resource.colorEnd = config.colorEnd || resource.colorStart - if (!Array.isArray(resource.colorGradient) || resource.colorGradient.length < 2) { - resource.colorGradient = [ - { position: 0, color: resource.colorStart }, - { position: 1, color: resource.colorEnd }, - ] - } - if (!Object.prototype.hasOwnProperty.call(BLEND_MAP, resource.blend)) resource.blend = config.blend || 'normal' - if (!['off', 'fixed', 'curve'].includes(resource.independentAlpha)) resource.independentAlpha = config.independentAlpha || 'off' - if (!Number.isFinite(resource.alpha)) resource.alpha = Number.isFinite(config.alphaScale) ? config.alphaScale : 1 - if (!['跟随导出', '线性', '贝塞尔'].includes(resource.alphaCurveMode)) resource.alphaCurveMode = config.curveMode || '跟随导出' - if (!Array.isArray(resource.alphaCurve) || resource.alphaCurve.length < 2) { - resource.alphaCurve = (config.alphaCurve || [{ x: 0, y: 1 }, { x: 1, y: 1 }]).map((point) => ({ ...point })) - } - } - if (config.imageResources.length === 1) { - config.imageResources[0].weight = 100 - config.imageResources[0].locked = false - } else if (needsImageWeightMigration) { - const equalWeight = 100 / config.imageResources.length - config.imageResources.forEach((resource, index) => { - resource.weight = index === config.imageResources.length - 1 - ? 100 - equalWeight * (config.imageResources.length - 1) - : equalWeight - resource.locked = false - }) - } - config.imageWeightVersion = 1 - if (needsGravityMigration) { - const migratedStrength = Number.isFinite(legacyGravity) && legacyGravity !== 0 ? legacyGravity : 980 - config.gravity = migratedStrength - config.gravityMin = migratedStrength - config.gravityMax = migratedStrength - } - if (needsWindMigration) { - const hasLegacyWind = Number.isFinite(legacyWindX) && Number.isFinite(legacyWindY) && (legacyWindX !== 0 || legacyWindY !== 0) - config.windMin = hasLegacyWind ? Math.hypot(legacyWindX, legacyWindY) : 100 - config.windMax = config.windMin - config.windDirection = hasLegacyWind ? Math.atan2(-legacyWindY, legacyWindX) * 180 / Math.PI : 0 - } - if (needsForceFieldMigration) { - config.forceStrength = Number.isFinite(legacyForceStrength) && legacyForceStrength !== 0 ? legacyForceStrength : 10 - } - if (needsTrailCurveMigration) { - config.trailConfigVersion = 3 - config.trailAlphaCurve = [{ x: 0, y: 1 }, { x: 1, y: 1 }] - config.trailLifeLengthCurve = [{ x: 0, y: 1 }, { x: 1, y: 1 }] - config.trailShapeCurve = [{ x: 0, y: 1 }, { x: 1, y: 1 }] - config.trailGridRows = 4 - config.trailGridCols = 4 - } - if (needsTrailResourceMigration || !config.trailResources.length) { - config.trailResources = [{ - id: 1, - texture: legacyTrailTexture || null, - textureName: legacyTrailTextureName, - previewUrl: legacyTrailPreviewUrl, - weight: 100, - locked: false, - rotation: 0, - colorMode: config.trailColorMode, - color: config.trailColor, - colorGradient: config.trailColorGradient.map((stop) => ({ ...stop })), - blend: 'normal', - alphaMode: config.trailAlphaMode, - alpha: config.trailAlpha, - alphaCurve: config.trailAlphaCurve.map((point) => ({ ...point })), - boneCount: config.trailBoneCount, - trailRatio: 100, - lengthMode: 'fixed', - length: config.trailLength, - lengthMin: config.trailLength, - lengthMax: config.trailLength, - widthSizeMode: 'fixed', - width: config.trailWidth, - widthMin: config.trailWidth, - widthMax: config.trailWidth, - widthMode: config.trailWidthMode, - lifeLengthEnabled: config.trailLifeLengthEnabled, - lifeLengthCurve: config.trailLifeLengthCurve.map((point) => ({ ...point })), - shapeEnabled: config.trailShapeEnabled, - shapeCurve: config.trailShapeCurve.map((point) => ({ ...point })), - }] - } - for (const resource of config.trailResources) { - if (!resource.textureName) resource.textureName = 'trail' - if (resource.previewUrl === '/trails/trail.png') resource.previewUrl = '/images/trail.png' - if (!resource.previewUrl) resource.previewUrl = '/images/trail.png' - if (!Number.isFinite(resource.weight)) resource.weight = 100 - if (typeof resource.locked !== 'boolean') resource.locked = false - if (!Number.isFinite(resource.rotation)) resource.rotation = 0 - if (!['particle', 'fixed', 'curve'].includes(resource.colorMode)) resource.colorMode = config.trailColorMode || 'particle' - if (!resource.color) resource.color = config.trailColor || '#ffffff' - if (!Array.isArray(resource.colorGradient) || resource.colorGradient.length < 2) { - resource.colorGradient = (config.trailColorGradient || [{ position: 0, color: '#ffffff' }, { position: 1, color: '#ffffff' }]).map((stop) => ({ ...stop })) - } - if (!Object.prototype.hasOwnProperty.call(BLEND_MAP, resource.blend)) resource.blend = 'normal' - if (!['particle', 'fixed', 'curve'].includes(resource.alphaMode)) resource.alphaMode = config.trailAlphaMode || 'particle' - if (!Number.isFinite(resource.alpha)) resource.alpha = Number.isFinite(config.trailAlpha) ? config.trailAlpha : 1 - if (!Array.isArray(resource.alphaCurve) || resource.alphaCurve.length < 2) { - resource.alphaCurve = (config.trailAlphaCurve || [{ x: 0, y: 1 }, { x: 1, y: 1 }]).map((point) => ({ ...point })) - } - if (!Number.isFinite(resource.boneCount)) resource.boneCount = Number.isFinite(config.trailBoneCount) ? config.trailBoneCount : 3 - if (!Number.isFinite(resource.trailRatio)) resource.trailRatio = 100 - resource.trailRatio = Math.min(100, Math.max(0, resource.trailRatio)) - if (!['fixed', 'random'].includes(resource.lengthMode)) resource.lengthMode = 'fixed' - if (!Number.isFinite(resource.length)) resource.length = Number.isFinite(config.trailLength) ? config.trailLength : 100 - if (!Number.isFinite(resource.lengthMin)) resource.lengthMin = resource.length - if (!Number.isFinite(resource.lengthMax)) resource.lengthMax = resource.length - if (!['fixed', 'random'].includes(resource.widthSizeMode)) resource.widthSizeMode = 'fixed' - if (!Number.isFinite(resource.width)) resource.width = Number.isFinite(config.trailWidth) ? config.trailWidth : 100 - if (!Number.isFinite(resource.widthMin)) resource.widthMin = resource.width - if (!Number.isFinite(resource.widthMax)) resource.widthMax = resource.width - if (!['particle', 'fixed'].includes(resource.widthMode)) resource.widthMode = config.trailWidthMode || 'particle' - if (typeof resource.lifeLengthEnabled !== 'boolean') resource.lifeLengthEnabled = Boolean(config.trailLifeLengthEnabled) - if (!Array.isArray(resource.lifeLengthCurve) || resource.lifeLengthCurve.length < 2) { - resource.lifeLengthCurve = (config.trailLifeLengthCurve || [{ x: 0, y: 1 }, { x: 1, y: 1 }]).map((point) => ({ ...point })) - } - if (typeof resource.shapeEnabled !== 'boolean') resource.shapeEnabled = Boolean(config.trailShapeEnabled) - if (!Array.isArray(resource.shapeCurve) || resource.shapeCurve.length < 2) { - resource.shapeCurve = (config.trailShapeCurve || [{ x: 0, y: 1 }, { x: 1, y: 1 }]).map((point) => ({ ...point })) - } - } - if (config.trailResources.length === 1) { - config.trailResources[0].weight = 100 - config.trailResources[0].locked = false - } - if (needsTrailResourceStyleMigration) { - for (const resource of config.trailResources) { - resource.alphaCurve = resource.alphaCurve?.length >= 2 ? resource.alphaCurve : [{ x: 0, y: 1 }, { x: 1, y: 1 }] - } - } - config.trailResourceVersion = 6 - return config -} +// 保留原有入口,现有调用方无需随内部拆分修改。 +export type * from './particleTypes' +export { defaultConfig, ensureEmitterConfig } from './particleConfig' interface Particle { sprite: Sprite @@ -914,9 +52,6 @@ interface Particle { collisionPaused: boolean } -const BLEND_MAP: Record = { normal: 0, add: 1, multiply: 2, screen: 3 } - -const MAX_PARTICLES = 400 export class ParticleEmitter extends Container { private pool: Particle[] = [] @@ -1896,226 +1031,3 @@ export class ParticleEmitter extends Container { } } -function lerp(a: number, b: number, t: number) { return a + (b - a) * t } -function finite(value: number, fallback: number) { return Number.isFinite(value) ? value : fallback } -type SimulationTransform = { centerX: number; centerY: number; rotation: number; scaleX?: number; scaleY?: number } | null -function localToWorldMath(cfg: EmitterConfig, localX: number, localY: number, transform: SimulationTransform = null) { - const scaleX = Math.max(0.0001, Math.abs(transform?.scaleX ?? cfg.rootScaleX)) - const scaleY = Math.max(0.0001, Math.abs(transform?.scaleY ?? cfg.rootScaleY)) - const angle = -(transform?.rotation ?? cfg.rootRotation) * Math.PI / 180 - const cos = Math.cos(angle), sin = Math.sin(angle) - const centerX = transform?.centerX ?? cfg.centerX - const centerY = transform?.centerY ?? cfg.centerY - const screenX = centerX + cos * scaleX * localX - sin * scaleY * localY - const screenY = -centerY + sin * scaleX * localX + cos * scaleY * localY - return { x: screenX, y: -screenY } -} -function worldMathToLocal(cfg: EmitterConfig, worldX: number, worldY: number, transform: SimulationTransform = null) { - const scaleX = Math.max(0.0001, Math.abs(transform?.scaleX ?? cfg.rootScaleX)) - const scaleY = Math.max(0.0001, Math.abs(transform?.scaleY ?? cfg.rootScaleY)) - const angle = -(transform?.rotation ?? cfg.rootRotation) * Math.PI / 180 - const cos = Math.cos(angle), sin = Math.sin(angle) - const screenX = worldX - (transform?.centerX ?? cfg.centerX) - const screenY = -worldY + (transform?.centerY ?? cfg.centerY) - return { - x: (cos * screenX + sin * screenY) / scaleX, - y: (-sin * screenX + cos * screenY) / scaleY, - } -} -function localVelocityToWorldMath(cfg: EmitterConfig, vx: number, vy: number, transform: SimulationTransform = null) { - const scaleX = Math.max(0.0001, Math.abs(transform?.scaleX ?? cfg.rootScaleX)) - const scaleY = Math.max(0.0001, Math.abs(transform?.scaleY ?? cfg.rootScaleY)) - const angle = -(transform?.rotation ?? cfg.rootRotation) * Math.PI / 180 - const cos = Math.cos(angle), sin = Math.sin(angle) - const screenX = cos * scaleX * vx - sin * scaleY * vy - const screenY = sin * scaleX * vx + cos * scaleY * vy - return { x: screenX, y: -screenY } -} -function worldVelocityToLocalMath(cfg: EmitterConfig, vx: number, vy: number, transform: SimulationTransform = null) { - const scaleX = Math.max(0.0001, Math.abs(transform?.scaleX ?? cfg.rootScaleX)) - const scaleY = Math.max(0.0001, Math.abs(transform?.scaleY ?? cfg.rootScaleY)) - const angle = -(transform?.rotation ?? cfg.rootRotation) * Math.PI / 180 - const cos = Math.cos(angle), sin = Math.sin(angle) - const screenY = -vy - return { - x: (cos * vx + sin * screenY) / scaleX, - y: (-sin * vx + cos * screenY) / scaleY, - } -} - -type ColliderHit = { x: number; y: number; nx: number; ny: number } -function resolveColliderPoint(collider: SceneCollider, worldX: number, worldY: number): ColliderHit | null { - const angle = collider.rotation * Math.PI / 180 - const cos = Math.cos(angle), sin = Math.sin(angle) - const scaleX = Math.max(0.0001, Math.abs(collider.scaleX ?? 1)) - const scaleY = Math.max(0.0001, Math.abs(collider.scaleY ?? 1)) - const dx = worldX - collider.x, dy = worldY - collider.y - const localX = (cos * dx + sin * dy) / scaleX - const localY = (-sin * dx + cos * dy) / scaleY - const toWorld = (x: number, y: number, nx: number, ny: number): ColliderHit => { - // 非等比缩放下,法线使用逆转置缩放后再旋转,保证反弹方向正确。 - const scaledNormalX = nx / scaleX - const scaledNormalY = ny / scaleY - const normalLength = Math.max(0.0001, Math.hypot(scaledNormalX, scaledNormalY)) - const localNormalX = scaledNormalX / normalLength - const localNormalY = scaledNormalY / normalLength - const worldNormalX = cos * localNormalX - sin * localNormalY - const worldNormalY = sin * localNormalX + cos * localNormalY - return { - x: collider.x + cos * x * scaleX - sin * y * scaleY + worldNormalX * 0.05, - y: collider.y + sin * x * scaleX + cos * y * scaleY + worldNormalY * 0.05, - nx: worldNormalX, - ny: worldNormalY, - } - } - if (collider.shape === 'circle') { - const radius = Math.max(0.001, collider.radius) - const distance = Math.hypot(localX, localY) - if (distance >= radius) return null - const nx = distance > 0.0001 ? localX / distance : 1 - const ny = distance > 0.0001 ? localY / distance : 0 - return toWorld(nx * radius, ny * radius, nx, ny) - } - if (collider.shape === 'ellipse') { - const radiusX = Math.max(0.001, collider.radiusX) - const radiusY = Math.max(0.001, collider.radiusY) - const normalized = Math.hypot(localX / radiusX, localY / radiusY) - if (normalized >= 1) return null - const scale = normalized > 0.0001 ? 1 / normalized : 1 - const x = normalized > 0.0001 ? localX * scale : radiusX - const y = normalized > 0.0001 ? localY * scale : 0 - const gradientLength = Math.max(0.0001, Math.hypot(x / (radiusX * radiusX), y / (radiusY * radiusY))) - return toWorld(x, y, x / (radiusX * radiusX) / gradientLength, y / (radiusY * radiusY) / gradientLength) - } - if (collider.shape === 'rect') { - const halfWidth = Math.max(0.001, collider.width * 0.5) - const halfHeight = Math.max(0.001, collider.height * 0.5) - if (Math.abs(localX) >= halfWidth || Math.abs(localY) >= halfHeight) return null - const penetrationX = halfWidth - Math.abs(localX) - const penetrationY = halfHeight - Math.abs(localY) - if (penetrationX < penetrationY) { - const nx = localX >= 0 ? 1 : -1 - return toWorld(nx * halfWidth, localY, nx, 0) - } - const ny = localY >= 0 ? 1 : -1 - return toWorld(localX, ny * halfHeight, 0, ny) - } - const sides = Math.max(3, Math.min(16, Math.round(collider.sides || (collider.shape === 'custom' ? 5 : 6)))) - const radiusX = Math.max(0.001, collider.width * 0.5) - const radiusY = Math.max(0.001, collider.height * 0.5) - const points = Array.from({ length: sides }, (_, index) => { - const theta = Math.PI * 0.5 + index / sides * Math.PI * 2 - return { x: Math.cos(theta) * radiusX, y: Math.sin(theta) * radiusY } - }) - let inside = false - for (let i = 0, j = points.length - 1; i < points.length; j = i++) { - const a = points[i], b = points[j] - if ((a.y > localY) !== (b.y > localY) && localX < (b.x - a.x) * (localY - a.y) / (b.y - a.y) + a.x) inside = !inside - } - if (!inside) return null - let nearestX = points[0].x, nearestY = points[0].y, nearestDistance = Infinity - for (let i = 0; i < points.length; i++) { - const a = points[i], b = points[(i + 1) % points.length] - const edgeX = b.x - a.x, edgeY = b.y - a.y - const edgeLengthSq = Math.max(0.0001, edgeX * edgeX + edgeY * edgeY) - const amount = Math.min(1, Math.max(0, ((localX - a.x) * edgeX + (localY - a.y) * edgeY) / edgeLengthSq)) - const x = a.x + edgeX * amount, y = a.y + edgeY * amount - const distance = Math.hypot(x - localX, y - localY) - if (distance < nearestDistance) { nearestDistance = distance; nearestX = x; nearestY = y } - } - const normalLength = Math.max(0.0001, Math.hypot(nearestX - localX, nearestY - localY)) - return toWorld(nearestX, nearestY, (nearestX - localX) / normalLength, (nearestY - localY) / normalLength) -} -function tFromLife(particle: Pick) { - return Math.min(1, Math.max(0, 1 - particle.life / Math.max(0.0001, particle.maxLife))) -} -function seededUnit(seed: number, index: number, salt: number) { - let value = ((seed >>> 0) ^ Math.imul(index + 1, 0x9e3779b1) ^ salt) >>> 0 - value ^= value >>> 16 - value = Math.imul(value, 0x7feb352d) - value ^= value >>> 15 - value = Math.imul(value, 0x846ca68b) - value ^= value >>> 16 - return (value >>> 0) / 4294967296 -} -function initialValue(mode: AttributeMode, min: number, max: number, curve: CurvePoint[], random: number) { - if (mode === 'fixed') return min - if (mode === 'curve') return lerp(min, max, curveAt(curve, random)) - return lerp(min, max, random) -} -function overLifeValue(mode: AttributeMode, min: number, max: number, curve: CurvePoint[], age: number, sampled: number) { - if (mode === 'curve') return lerp(min, max, curveAt(curve, age)) - return mode === 'random' ? sampled : min -} -/** 在透明度曲线关键帧上按 x(生命周期时刻 0~1)求 y(透明度 0~1)。保证有序、端点外取端点 */ -function cubicValue(a: number, b: number, c: number, d: number, t: number) { - const inverse = 1 - t - return inverse * inverse * inverse * a + 3 * inverse * inverse * t * b + 3 * inverse * t * t * c + t * t * t * d -} - -function curveAt(pts: CurvePoint[] | undefined, x: number, mode: '线性' | '贝塞尔' = '线性'): number { - if (!Array.isArray(pts) || pts.length === 0) return 1 - const p = [...pts].sort((a, b) => a.x - b.x) - if (x <= p[0].x) return p[0].y - if (x >= p[p.length - 1].x) return p[p.length - 1].y - for (let i = 0; i < p.length - 1; i++) { - if (x >= p[i].x && x <= p[i + 1].x) { - const start = p[i], end = p[i + 1] - const spanX = end.x - start.x || 1 - if (mode !== '贝塞尔') return lerp(start.y, end.y, (x - start.x) / spanX) - const control1X = start.x + (start.outX ?? spanX / 3) - const control1Y = start.y + (start.outY ?? (end.y - start.y) / 3) - const control2X = end.x + (end.inX ?? -spanX / 3) - const control2Y = end.y + (end.inY ?? -(end.y - start.y) / 3) - let low = 0, high = 1 - for (let iteration = 0; iteration < 14; iteration++) { - const amount = (low + high) / 2 - if (cubicValue(start.x, control1X, control2X, end.x, amount) < x) low = amount - else high = amount - } - return cubicValue(start.y, control1Y, control2Y, end.y, (low + high) / 2) - } - } - return p[p.length - 1].y -} -/** 确定性伪随机(mulberry32),种子相同则序列相同 */ -function mulberry32(seed: number): () => number { - let a = seed >>> 0 - return function () { - a |= 0; a = (a + 0x6D2B79F5) | 0 - let t = Math.imul(a ^ (a >>> 15), 1 | a) - t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t - return ((t ^ (t >>> 14)) >>> 0) / 4294967296 - } -} -function hexToNumber(hex: string): number { - let h = hex.replace('#', '') - if (h.length === 3) h = h.split('').map((c) => c + c).join('') - return parseInt(h, 16) -} -function blendRgb(start: string, end: string, t: number): number { - const s = hexToRgb(start), e = hexToRgb(end) - const r = Math.round(s[0] + (e[0] - s[0]) * t) - const g = Math.round(s[1] + (e[1] - s[1]) * t) - const b = Math.round(s[2] + (e[2] - s[2]) * t) - return (r << 16) | (g << 8) | b -} -function gradientColorAt(stops: ColorGradientStop[] | undefined, t: number): number { - if (!Array.isArray(stops) || stops.length === 0) return 0xffffff - const sorted = [...stops].sort((a, b) => a.position - b.position) - if (t <= sorted[0].position) return hexToNumber(sorted[0].color) - if (t >= sorted[sorted.length - 1].position) return hexToNumber(sorted[sorted.length - 1].color) - for (let index = 0; index < sorted.length - 1; index++) { - const start = sorted[index], end = sorted[index + 1] - if (t < start.position || t > end.position) continue - const amount = (t - start.position) / Math.max(0.0001, end.position - start.position) - return blendRgb(start.color, end.color, amount) - } - return hexToNumber(sorted[sorted.length - 1].color) -} -function hexToRgb(hex: string): [number, number, number] { - let h = hex.replace('#', '') - if (h.length === 3) h = h.split('').map((c) => c + c).join('') - const n = parseInt(h, 16) - return [(n >> 16) & 255, (n >> 8) & 255, n & 255] -} diff --git a/src/core/particleMath.ts b/src/core/particleMath.ts new file mode 100644 index 0000000..384ea3b --- /dev/null +++ b/src/core/particleMath.ts @@ -0,0 +1,225 @@ +import type { EmitMode, EmitShape, Blend, AttributeMode, RotationMode, ScaleAxisMode, CurvePoint, ColorGradientStop, ColliderShape, CollisionResponse, SceneCollider, ParticleImageResource, ParticleSequenceFrame, TrailImageResource, EmitterConfig, ParticleState, TrailBoneState, TrailState } from './particleTypes' + +export function lerp(a: number, b: number, t: number) { return a + (b - a) * t } +export function finite(value: number, fallback: number) { return Number.isFinite(value) ? value : fallback } +export type SimulationTransform = { centerX: number; centerY: number; rotation: number; scaleX?: number; scaleY?: number } | null +export function localToWorldMath(cfg: EmitterConfig, localX: number, localY: number, transform: SimulationTransform = null) { + const scaleX = Math.max(0.0001, Math.abs(transform?.scaleX ?? cfg.rootScaleX)) + const scaleY = Math.max(0.0001, Math.abs(transform?.scaleY ?? cfg.rootScaleY)) + const angle = -(transform?.rotation ?? cfg.rootRotation) * Math.PI / 180 + const cos = Math.cos(angle), sin = Math.sin(angle) + const centerX = transform?.centerX ?? cfg.centerX + const centerY = transform?.centerY ?? cfg.centerY + const screenX = centerX + cos * scaleX * localX - sin * scaleY * localY + const screenY = -centerY + sin * scaleX * localX + cos * scaleY * localY + return { x: screenX, y: -screenY } +} +export function worldMathToLocal(cfg: EmitterConfig, worldX: number, worldY: number, transform: SimulationTransform = null) { + const scaleX = Math.max(0.0001, Math.abs(transform?.scaleX ?? cfg.rootScaleX)) + const scaleY = Math.max(0.0001, Math.abs(transform?.scaleY ?? cfg.rootScaleY)) + const angle = -(transform?.rotation ?? cfg.rootRotation) * Math.PI / 180 + const cos = Math.cos(angle), sin = Math.sin(angle) + const screenX = worldX - (transform?.centerX ?? cfg.centerX) + const screenY = -worldY + (transform?.centerY ?? cfg.centerY) + return { + x: (cos * screenX + sin * screenY) / scaleX, + y: (-sin * screenX + cos * screenY) / scaleY, + } +} +export function localVelocityToWorldMath(cfg: EmitterConfig, vx: number, vy: number, transform: SimulationTransform = null) { + const scaleX = Math.max(0.0001, Math.abs(transform?.scaleX ?? cfg.rootScaleX)) + const scaleY = Math.max(0.0001, Math.abs(transform?.scaleY ?? cfg.rootScaleY)) + const angle = -(transform?.rotation ?? cfg.rootRotation) * Math.PI / 180 + const cos = Math.cos(angle), sin = Math.sin(angle) + const screenX = cos * scaleX * vx - sin * scaleY * vy + const screenY = sin * scaleX * vx + cos * scaleY * vy + return { x: screenX, y: -screenY } +} +export function worldVelocityToLocalMath(cfg: EmitterConfig, vx: number, vy: number, transform: SimulationTransform = null) { + const scaleX = Math.max(0.0001, Math.abs(transform?.scaleX ?? cfg.rootScaleX)) + const scaleY = Math.max(0.0001, Math.abs(transform?.scaleY ?? cfg.rootScaleY)) + const angle = -(transform?.rotation ?? cfg.rootRotation) * Math.PI / 180 + const cos = Math.cos(angle), sin = Math.sin(angle) + const screenY = -vy + return { + x: (cos * vx + sin * screenY) / scaleX, + y: (-sin * vx + cos * screenY) / scaleY, + } +} + +export type ColliderHit = { x: number; y: number; nx: number; ny: number } +export function resolveColliderPoint(collider: SceneCollider, worldX: number, worldY: number): ColliderHit | null { + const angle = collider.rotation * Math.PI / 180 + const cos = Math.cos(angle), sin = Math.sin(angle) + const scaleX = Math.max(0.0001, Math.abs(collider.scaleX ?? 1)) + const scaleY = Math.max(0.0001, Math.abs(collider.scaleY ?? 1)) + const dx = worldX - collider.x, dy = worldY - collider.y + const localX = (cos * dx + sin * dy) / scaleX + const localY = (-sin * dx + cos * dy) / scaleY + const toWorld = (x: number, y: number, nx: number, ny: number): ColliderHit => { + // 非等比缩放下,法线使用逆转置缩放后再旋转,保证反弹方向正确。 + const scaledNormalX = nx / scaleX + const scaledNormalY = ny / scaleY + const normalLength = Math.max(0.0001, Math.hypot(scaledNormalX, scaledNormalY)) + const localNormalX = scaledNormalX / normalLength + const localNormalY = scaledNormalY / normalLength + const worldNormalX = cos * localNormalX - sin * localNormalY + const worldNormalY = sin * localNormalX + cos * localNormalY + return { + x: collider.x + cos * x * scaleX - sin * y * scaleY + worldNormalX * 0.05, + y: collider.y + sin * x * scaleX + cos * y * scaleY + worldNormalY * 0.05, + nx: worldNormalX, + ny: worldNormalY, + } + } + if (collider.shape === 'circle') { + const radius = Math.max(0.001, collider.radius) + const distance = Math.hypot(localX, localY) + if (distance >= radius) return null + const nx = distance > 0.0001 ? localX / distance : 1 + const ny = distance > 0.0001 ? localY / distance : 0 + return toWorld(nx * radius, ny * radius, nx, ny) + } + if (collider.shape === 'ellipse') { + const radiusX = Math.max(0.001, collider.radiusX) + const radiusY = Math.max(0.001, collider.radiusY) + const normalized = Math.hypot(localX / radiusX, localY / radiusY) + if (normalized >= 1) return null + const scale = normalized > 0.0001 ? 1 / normalized : 1 + const x = normalized > 0.0001 ? localX * scale : radiusX + const y = normalized > 0.0001 ? localY * scale : 0 + const gradientLength = Math.max(0.0001, Math.hypot(x / (radiusX * radiusX), y / (radiusY * radiusY))) + return toWorld(x, y, x / (radiusX * radiusX) / gradientLength, y / (radiusY * radiusY) / gradientLength) + } + if (collider.shape === 'rect') { + const halfWidth = Math.max(0.001, collider.width * 0.5) + const halfHeight = Math.max(0.001, collider.height * 0.5) + if (Math.abs(localX) >= halfWidth || Math.abs(localY) >= halfHeight) return null + const penetrationX = halfWidth - Math.abs(localX) + const penetrationY = halfHeight - Math.abs(localY) + if (penetrationX < penetrationY) { + const nx = localX >= 0 ? 1 : -1 + return toWorld(nx * halfWidth, localY, nx, 0) + } + const ny = localY >= 0 ? 1 : -1 + return toWorld(localX, ny * halfHeight, 0, ny) + } + const sides = Math.max(3, Math.min(16, Math.round(collider.sides || (collider.shape === 'custom' ? 5 : 6)))) + const radiusX = Math.max(0.001, collider.width * 0.5) + const radiusY = Math.max(0.001, collider.height * 0.5) + const points = Array.from({ length: sides }, (_, index) => { + const theta = Math.PI * 0.5 + index / sides * Math.PI * 2 + return { x: Math.cos(theta) * radiusX, y: Math.sin(theta) * radiusY } + }) + let inside = false + for (let i = 0, j = points.length - 1; i < points.length; j = i++) { + const a = points[i], b = points[j] + if ((a.y > localY) !== (b.y > localY) && localX < (b.x - a.x) * (localY - a.y) / (b.y - a.y) + a.x) inside = !inside + } + if (!inside) return null + let nearestX = points[0].x, nearestY = points[0].y, nearestDistance = Infinity + for (let i = 0; i < points.length; i++) { + const a = points[i], b = points[(i + 1) % points.length] + const edgeX = b.x - a.x, edgeY = b.y - a.y + const edgeLengthSq = Math.max(0.0001, edgeX * edgeX + edgeY * edgeY) + const amount = Math.min(1, Math.max(0, ((localX - a.x) * edgeX + (localY - a.y) * edgeY) / edgeLengthSq)) + const x = a.x + edgeX * amount, y = a.y + edgeY * amount + const distance = Math.hypot(x - localX, y - localY) + if (distance < nearestDistance) { nearestDistance = distance; nearestX = x; nearestY = y } + } + const normalLength = Math.max(0.0001, Math.hypot(nearestX - localX, nearestY - localY)) + return toWorld(nearestX, nearestY, (nearestX - localX) / normalLength, (nearestY - localY) / normalLength) +} +export function tFromLife(particle: { life: number; maxLife: number }) { + return Math.min(1, Math.max(0, 1 - particle.life / Math.max(0.0001, particle.maxLife))) +} +export function seededUnit(seed: number, index: number, salt: number) { + let value = ((seed >>> 0) ^ Math.imul(index + 1, 0x9e3779b1) ^ salt) >>> 0 + value ^= value >>> 16 + value = Math.imul(value, 0x7feb352d) + value ^= value >>> 15 + value = Math.imul(value, 0x846ca68b) + value ^= value >>> 16 + return (value >>> 0) / 4294967296 +} +export function initialValue(mode: AttributeMode, min: number, max: number, curve: CurvePoint[], random: number) { + if (mode === 'fixed') return min + if (mode === 'curve') return lerp(min, max, curveAt(curve, random)) + return lerp(min, max, random) +} +export function overLifeValue(mode: AttributeMode, min: number, max: number, curve: CurvePoint[], age: number, sampled: number) { + if (mode === 'curve') return lerp(min, max, curveAt(curve, age)) + return mode === 'random' ? sampled : min +} +/** 在透明度曲线关键帧上按 x(生命周期时刻 0~1)求 y(透明度 0~1)。保证有序、端点外取端点 */ +export function cubicValue(a: number, b: number, c: number, d: number, t: number) { + const inverse = 1 - t + return inverse * inverse * inverse * a + 3 * inverse * inverse * t * b + 3 * inverse * t * t * c + t * t * t * d +} + +export function curveAt(pts: CurvePoint[] | undefined, x: number, mode: '线性' | '贝塞尔' = '线性'): number { + if (!Array.isArray(pts) || pts.length === 0) return 1 + const p = [...pts].sort((a, b) => a.x - b.x) + if (x <= p[0].x) return p[0].y + if (x >= p[p.length - 1].x) return p[p.length - 1].y + for (let i = 0; i < p.length - 1; i++) { + if (x >= p[i].x && x <= p[i + 1].x) { + const start = p[i], end = p[i + 1] + const spanX = end.x - start.x || 1 + if (mode !== '贝塞尔') return lerp(start.y, end.y, (x - start.x) / spanX) + const control1X = start.x + (start.outX ?? spanX / 3) + const control1Y = start.y + (start.outY ?? (end.y - start.y) / 3) + const control2X = end.x + (end.inX ?? -spanX / 3) + const control2Y = end.y + (end.inY ?? -(end.y - start.y) / 3) + let low = 0, high = 1 + for (let iteration = 0; iteration < 14; iteration++) { + const amount = (low + high) / 2 + if (cubicValue(start.x, control1X, control2X, end.x, amount) < x) low = amount + else high = amount + } + return cubicValue(start.y, control1Y, control2Y, end.y, (low + high) / 2) + } + } + return p[p.length - 1].y +} +/** 确定性伪随机(mulberry32),种子相同则序列相同 */ +export function mulberry32(seed: number): () => number { + let a = seed >>> 0 + return function () { + a |= 0; a = (a + 0x6D2B79F5) | 0 + let t = Math.imul(a ^ (a >>> 15), 1 | a) + t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t + return ((t ^ (t >>> 14)) >>> 0) / 4294967296 + } +} +export function hexToNumber(hex: string): number { + let h = hex.replace('#', '') + if (h.length === 3) h = h.split('').map((c) => c + c).join('') + return parseInt(h, 16) +} +export function blendRgb(start: string, end: string, t: number): number { + const s = hexToRgb(start), e = hexToRgb(end) + const r = Math.round(s[0] + (e[0] - s[0]) * t) + const g = Math.round(s[1] + (e[1] - s[1]) * t) + const b = Math.round(s[2] + (e[2] - s[2]) * t) + return (r << 16) | (g << 8) | b +} +export function gradientColorAt(stops: ColorGradientStop[] | undefined, t: number): number { + if (!Array.isArray(stops) || stops.length === 0) return 0xffffff + const sorted = [...stops].sort((a, b) => a.position - b.position) + if (t <= sorted[0].position) return hexToNumber(sorted[0].color) + if (t >= sorted[sorted.length - 1].position) return hexToNumber(sorted[sorted.length - 1].color) + for (let index = 0; index < sorted.length - 1; index++) { + const start = sorted[index], end = sorted[index + 1] + if (t < start.position || t > end.position) continue + const amount = (t - start.position) / Math.max(0.0001, end.position - start.position) + return blendRgb(start.color, end.color, amount) + } + return hexToNumber(sorted[sorted.length - 1].color) +} +export function hexToRgb(hex: string): [number, number, number] { + let h = hex.replace('#', '') + if (h.length === 3) h = h.split('').map((c) => c + c).join('') + const n = parseInt(h, 16) + return [(n >> 16) & 255, (n >> 8) & 255, n & 255] +} diff --git a/src/core/particleTypes.ts b/src/core/particleTypes.ts new file mode 100644 index 0000000..beb0845 --- /dev/null +++ b/src/core/particleTypes.ts @@ -0,0 +1,399 @@ +import type { Texture } from 'pixi.js' +import type { EmissionAngleMode } from './emitterShape' + +/** 发射模式 */ +export type EmitMode = 'stream' | 'burst' +/** 发射形状 */ +export type EmitShape = 'point' | 'circle' | 'rect' | 'cone' | 'path' | 'orbit' +/** 混合模式 */ +export type Blend = 'normal' | 'add' | 'multiply' | 'screen' +/** 粒子属性取值方式 */ +export type AttributeMode = 'fixed' | 'random' | 'curve' +/** 初始旋转额外支持跟随发射方向 */ +export type RotationMode = AttributeMode | 'direction' +export type ScaleAxisMode = 'uniform' | 'separate' +export interface CurvePoint { x: number; y: number; inX?: number; inY?: number; outX?: number; outY?: number } +export interface ColorGradientStop { position: number; color: string } + +export type ColliderShape = 'circle' | 'ellipse' | 'rect' | 'polygon' | 'custom' +export type CollisionResponse = 'physics' | 'pause' | 'destroy' +export interface SceneCollider { + id: number + shape: ColliderShape + enabled: boolean + x: number + y: number + rotation: number + scaleX: number + scaleY: number + radius: number + radiusX: number + radiusY: number + width: number + height: number + sides: number + response: CollisionResponse + elasticity: number + friction: number +} + +export interface ParticleImageResource { + id: number + texture: Texture | null + textureName: string + textureFolder: string + previewUrl: string + /** 图片模式:固定图片或按粒子出生时间播放的序列帧。 */ + imageMode: 'fixed' | 'sequence' + /** 序列帧播放方式:单次隐藏、单次定格、正向循环或反向循环。 */ + sequencePlayback: 'once-hide' | 'once-hold' | 'loop-forward' | 'loop-reverse' + /** 序列帧每秒播放帧数。 */ + sequenceFps: number + sequenceFrames: ParticleSequenceFrame[] + /** 发射权重,多个资源按权重随机选择 */ + weight: number + /** 锁定后,调整其他资源时保持当前占比 */ + locked: boolean + scale: number + anchorX: number + anchorY: number + /** 每张贴图独立的颜色、混合与透明度设置 */ + colorMode: 'fixed' | 'random' | 'lifetime' + colorStart: string + colorEnd: string + colorGradient: ColorGradientStop[] + blend: Blend + independentAlpha: 'off' | 'fixed' | 'curve' + alpha: number + alphaCurveMode: '跟随导出' | '线性' | '贝塞尔' + alphaCurve: CurvePoint[] +} + +export interface ParticleSequenceFrame { + name: string + previewUrl: string + texture: Texture | null +} + +export interface TrailImageResource { + id: number + texture: Texture | null + textureName: string + previewUrl: string + weight: number + locked: boolean + /** 图片默认方向,修改后重新生成 UV 并绑定蒙皮 */ + rotation: number + colorMode: 'particle' | 'fixed' | 'curve' + color: string + colorGradient: ColorGradientStop[] + blend: Blend + alphaMode: 'particle' | 'fixed' | 'curve' + alpha: number + alphaCurve: CurvePoint[] + boneCount: number + /** 选中该资源的粒子实际生成拖尾的比例(0-100)。 */ + trailRatio: number + lengthMode: 'fixed' | 'random' + length: number + lengthMin: number + lengthMax: number + widthSizeMode: 'fixed' | 'random' + width: number + widthMin: number + widthMax: number + widthMode: 'particle' | 'fixed' + lifeLengthEnabled: boolean + lifeLengthCurve: CurvePoint[] + shapeEnabled: boolean + shapeCurve: CurvePoint[] +} + +/** 粒子配置(引用保持,面板改字段即实时生效) */ +export interface EmitterConfig { + texture: Texture + imageResources: ParticleImageResource[] + imageWeightVersion: number + name: string + // 发射 + mode: EmitMode + rate: number // 持续:每秒发射数 + /** 持续发射表现:常规持续或可无缝衔接的循环段。 */ + streamBehavior: 'normal' | 'loop' + /** 循环持续的独立时长(帧),不覆盖常规持续的 duration 秒数。 */ + loopDurationFrames: number + /** 循环持续模式下是否生成循环开始动画。 */ + generateLoopStartAnimation: boolean + /** 是否手动指定进入循环稳定状态的时长;关闭时按最长粒子生命周期计算。 */ + loopStartUseCustomDuration: boolean + /** 进入循环稳定状态的时长(帧)。 */ + loopStartDurationFrames: number + /** 循环持续模式下是否生成循环结束动画。 */ + generateLoopEndAnimation: boolean + /** 是否手动指定从循环稳定状态消亡的时长;关闭时按最长粒子生命周期计算。 */ + loopEndUseCustomDuration: boolean + /** 从循环稳定状态消亡的时长(帧)。 */ + loopEndDurationFrames: number + burstCount: number // 爆发:单次数量 + burstLoop: boolean // 爆发是否每秒重复 + /** 延迟发射(秒)= 粒子条左端位置 */ + delay: number + /** 持续发射时长(秒)= 时间轴绿色段;爆发模式不使用该时长 */ + duration: number + shape: EmitShape // 发射形状 + /** 发射范围结构版本,用于旧配置迁移。 */ + shapeRangeVersion: number + /** 圆形和锥形发射范围的内外半径。 */ + innerRadius: number + outerRadius: number + /** 矩形发射范围:外矩形减去内矩形。 */ + innerRectW: number + innerRectH: number + outerRectW: number + outerRectH: number + /** 粒子出生路径;与修改器中的发射器整体跟随路径完全独立。 */ + spawnPathId: number + spawnPathDistribution: 'fixed' | 'random' + /** 旧版形状尺寸字段,保留用于配置迁移。 */ + radius: number + rectW: number + rectH: number + /** 发射器中心 X/Y */ + centerX: number + centerY: number + // 根节点(root)变换:作用于整个粒子系统(旋转/缩放),与场景对象参数联动 + rootRotation: number + rootScaleX: number + rootScaleY: number + // 方向 + emissionAngleMode: EmissionAngleMode + direction: number + spread: number + /** 锥形区域朝向;与粒子发射角度独立。 */ + coneDirection: number + /** 锥形开口角度(发电器形状=锥体时,粒子在锥形扇区内均匀散开) */ + coneAngle: number + // 属性 + lifeMin: number + lifeMax: number + lifeMode: AttributeMode + lifeCurve: CurvePoint[] + speedMin: number + speedMax: number + speedMode: AttributeMode + speedCurve: CurvePoint[] + scaleMin: number + scaleMax: number + scaleMode: AttributeMode + scaleAxisMode: ScaleAxisMode + scaleYMin: number + scaleYMax: number + scaleCurve: CurvePoint[] + scaleYCurve: CurvePoint[] + scaleEndRatio: number + initialRotationMode: RotationMode + initialRotationMin: number + initialRotationMax: number + initialRotationCurve: CurvePoint[] + alpha: number + alphaEnd: number + rotationSpeedMin: number + rotationSpeedMax: number + // 生命周期内属性 + speedOverLifeEnabled: boolean + speedOverLifeMode: AttributeMode + speedOverLifeMin: number + speedOverLifeMax: number + speedOverLifeCurve: CurvePoint[] + scaleOverLifeEnabled: boolean + scaleOverLifeMode: AttributeMode + scaleOverLifeAxisMode: ScaleAxisMode + scaleOverLifeMin: number + scaleOverLifeMax: number + scaleYOverLifeMin: number + scaleYOverLifeMax: number + scaleOverLifeCurve: CurvePoint[] + scaleYOverLifeCurve: CurvePoint[] + rotationOverLifeEnabled: boolean + rotationOverLifeMode: AttributeMode + rotationOverLifeCurve: CurvePoint[] + // 物理 + /** 旧版重力值,保留用于配置迁移 */ + gravity: number + gravityMode: 'fixed' | 'random' + gravityMin: number + gravityMax: number + /** 数学角度:0 向右,-90 向屏幕下方 */ + gravityDirection: number + /** 生命周期内重力倍率,纵轴范围 0~1 */ + gravityCurve: CurvePoint[] + /** 阻尼(速度衰减系数,0=无) */ + damping: number + /** 全局随机种子;包括 0 在内的任意整数都可确定性复现 */ + seed: number + // 颜色 + colorStart: string + colorEnd: string + colorOverLife: boolean + // 混合 + blend: Blend + /** 透明度模式:fixed(固定)/ curve(曲线) */ + alphaMode: 'fixed' | 'curve' + /** 曲线模式(透明度插值方式) */ + curveMode: '跟随导出' | '线性' | '贝塞尔' + /** 透明度曲线关键帧:x=生命周期时刻(0~1),y=透明度(0~1,1=完全不透明) */ + alphaCurve: { x: number; y: number }[] + /** 图片名称(贴图资源名,默认 dot) */ + textureName: string + /** 子文件夹(图片资源路径,占位) */ + textureFolder: string + /** 占比(0~1) */ + alphaScale: number + /** 贴图锚点/轴心 x,y(0~1) */ + anchorX: number + anchorY: number + /** 独立透明度:off / fixed / curve */ + independentAlpha: 'off' | 'fixed' | 'curve' + // 发射点偏移 + offsetX: number + offsetY: number + // ===== 修改器 (Modifiers) ===== + /** 开启移动噪声 */ + noise: boolean + /** 噪声影响比例(0~100%) */ + noiseAmt: number + /** 粒子偏离原轨迹的最大距离(px) */ + noiseRange: number + /** 噪声每秒变化速度 */ + noiseSpeed: number + /** 开启重力(由 gravity 控制) */ + useGravity: boolean + /** 开启风力 */ + wind: boolean + /** 旧版二维风力,保留用于配置迁移 */ + windX: number + windY: number + windMode: 'fixed' | 'random' + windMin: number + windMax: number + /** 数学角度:0 向右,-90 向屏幕下方 */ + windDirection: number + /** 生命周期内风力倍率,纵轴范围 0~1 */ + windCurve: CurvePoint[] + /** 开启力场(吸力/斥力) */ + forceField: boolean + forceStrength: number + forceRadius: number + /** 力场中心使用场景全局数学坐标 */ + forceCenterX: number + forceCenterY: number + forceFalloff: 'constant' | 'linear' | 'inverse' + /** 开启吸附:粒子在延迟后从当前位置移动到全局吸附点,到达范围后死亡 */ + attraction: boolean + attractionCenterX: number + attractionCenterY: number + attractionRadius: number + attractionDuration: number + attractionDelay: number + attractionDelayMode: 'global' | 'particle' + attractionPath: 'linear' | 'curve' + /** 开启拖尾 */ + trail: boolean + trailConfigVersion: number + trailResources: TrailImageResource[] + trailResourceVersion: number + /** 拖尾使用独立图片和独立网格蒙皮 */ + /** @deprecated 旧版单拖尾资源字段,仅用于配置迁移 */ + trailTexture: Texture | null + trailTextureName: string + trailPreviewUrl: string + trailColorMode: 'particle' | 'fixed' | 'curve' + trailColor: string + trailColorGradient: ColorGradientStop[] + trailAlphaMode: 'particle' | 'fixed' | 'curve' + trailAlpha: number + trailAlphaCurve: CurvePoint[] + /** 每个粒子的同级拖尾骨骼数量 */ + trailBoneCount: number + trailLength: number + trailWidth: number + trailWidthMode: 'particle' | 'fixed' + trailLifeLengthEnabled: boolean + trailLifeLengthCurve: CurvePoint[] + trailShapeEnabled: boolean + trailShapeCurve: CurvePoint[] + /** 蒙皮网格拓扑尺寸 */ + trailGridRows: number + trailGridCols: number + /** 开启碰撞;仅 collisionColliderIds 中显式选中的场景碰撞体参与计算。 */ + collision: boolean + collisionColliderIds: number[] + /** 开启路径跟随(预留) */ + pathFollow: boolean + emitterFollow: boolean + emitterFollowMode: 'none' | 'path' | 'bone' + emitterFollowPathId: number + emitterFollowSpineId: number + emitterFollowBoneName: string + emitterFollowBoneOffsetX: number + emitterFollowBoneOffsetY: number + emitterFollowBoneRotation: number + emitterFollowBoneScaleX: number + emitterFollowBoneScaleY: number + emitterAngleMode: 'fixed' | 'direction' + emitterFollowCurve: CurvePoint[] + emitterFollowDuration: number + emitterFollowSpace: 'local' | 'world' + emitterFollowDirection: 'forward' | 'reverse' + emitterFollowOffset: number +} + +/** 粒子瞬间状态(供骨骼同步 / 导出) */ +export interface ParticleState { + /** 对应骨骼在 root 下的命名 p_ */ + boneName: string + /** 每次出生唯一且可复现的编号;关闭导出骨骼池时用于区分同一池槽的多次复用。 */ + spawnId?: number + x: number + y: number + rotation: number + scaleX: number + scaleY: number + /** 已烘焙的数学世界坐标;导出时不再依赖路径、碰撞体或 Spine。 */ + worldX?: number + worldY?: number + worldRotation?: number + worldScaleX?: number + worldScaleY?: number + alpha: number + colorHex: number + resourceId?: number + /** 当前图片资源的序列帧索引,固定图片为 0。 */ + imageFrameIndex?: number + /** 单次播放结束后可只隐藏图片,粒子和拖尾仍继续存在。 */ + imageVisible?: boolean + /** 拖尾拥有一组同级骨骼和蒙皮状态,录制/回放时一并保存。 */ + trailState?: TrailState + active: boolean +} + +export interface TrailBoneState { + boneName: string + x: number + y: number + rotation: number + worldX?: number + worldY?: number + worldRotation?: number +} + +export interface TrailState { + bones: TrailBoneState[] + /** 兼容旧配置;当前拖尾整组骨骼同时出生和死亡,存在时始终等于骨骼总数。 */ + activeBoneCount?: number + width: number + alpha: number + colorHex: number + resourceId?: number +} + diff --git a/src/views/ParticlePanel.vue b/src/views/ParticlePanel.vue index 08f19de..9aa637f 100644 --- a/src/views/ParticlePanel.vue +++ b/src/views/ParticlePanel.vue @@ -5,2383 +5,43 @@

-
-
- {{ collapsed.config ? '▸' : '▾' }}配置管理 -
-
-
- - - - -
-
{{ configMessage }}
-
-
- - -
-
- {{ collapsed.scene ? '▸' : '▾' }}场景对象 -
- - - - - -
-
-
-
-
- ● - {{ system.config.name || 'ParticleSystem' + (i + 1) }} - - 粒子 - -
-
- ■ - {{ collider.name }} - - 碰撞 - -
-
- ◇ - {{ path.name }} - - 路径 - -
-
- ◆ - {{ spine.name }} - - Spine - -
-
场景中暂无对象
-
- - - - -
使用右上角按钮创建场景对象
-
-
+ +
-
- - - -
-
- {{ connectorStatusText }} - 授权当前网站 - -
-
- {{ exportMessage }} - 授权当前网站 -
+ + diff --git a/src/views/Stage.vue b/src/views/Stage.vue index 1e02227..6e266c0 100644 --- a/src/views/Stage.vue +++ b/src/views/Stage.vue @@ -129,6 +129,13 @@ + + diff --git a/src/views/particle-panel/ExportSettingsSection.vue b/src/views/particle-panel/ExportSettingsSection.vue new file mode 100644 index 0000000..5849e02 --- /dev/null +++ b/src/views/particle-panel/ExportSettingsSection.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/src/views/particle-panel/ParticleAppearanceSection.vue b/src/views/particle-panel/ParticleAppearanceSection.vue new file mode 100644 index 0000000..1addca8 --- /dev/null +++ b/src/views/particle-panel/ParticleAppearanceSection.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/src/views/particle-panel/ParticleAttributesSection.vue b/src/views/particle-panel/ParticleAttributesSection.vue new file mode 100644 index 0000000..7f2dfa5 --- /dev/null +++ b/src/views/particle-panel/ParticleAttributesSection.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/src/views/particle-panel/ParticleExportFooter.vue b/src/views/particle-panel/ParticleExportFooter.vue new file mode 100644 index 0000000..f55bb8e --- /dev/null +++ b/src/views/particle-panel/ParticleExportFooter.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/src/views/particle-panel/ParticleModifiersSection.vue b/src/views/particle-panel/ParticleModifiersSection.vue new file mode 100644 index 0000000..253aa61 --- /dev/null +++ b/src/views/particle-panel/ParticleModifiersSection.vue @@ -0,0 +1,433 @@ + + + + + diff --git a/src/views/particle-panel/ProjectConfigSection.vue b/src/views/particle-panel/ProjectConfigSection.vue new file mode 100644 index 0000000..b337b34 --- /dev/null +++ b/src/views/particle-panel/ProjectConfigSection.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/src/views/particle-panel/SceneObjectsSection.vue b/src/views/particle-panel/SceneObjectsSection.vue new file mode 100644 index 0000000..0cebfa2 --- /dev/null +++ b/src/views/particle-panel/SceneObjectsSection.vue @@ -0,0 +1,275 @@ + + + + + diff --git a/src/views/particle-panel/particlePanelContext.ts b/src/views/particle-panel/particlePanelContext.ts new file mode 100644 index 0000000..f182228 --- /dev/null +++ b/src/views/particle-panel/particlePanelContext.ts @@ -0,0 +1,17 @@ +import { inject, provide, type InjectionKey } from 'vue' +import { useParticlePanel } from './useParticlePanel' + +type ParticlePanelContext = ReturnType +const particlePanelKey: InjectionKey = Symbol('particle-panel') + +export function provideParticlePanel() { + const context = useParticlePanel() + provide(particlePanelKey, context) + return context +} + +export function useParticlePanelContext() { + const context = inject(particlePanelKey) + if (!context) throw new Error('Particle panel sections require a ParticlePanel parent') + return context +} diff --git a/src/views/particle-panel/particlePanelCurves.ts b/src/views/particle-panel/particlePanelCurves.ts new file mode 100644 index 0000000..1f0ebc8 --- /dev/null +++ b/src/views/particle-panel/particlePanelCurves.ts @@ -0,0 +1,7 @@ +export const LINEAR_CURVE = [{ x: 0, y: 0 }, { x: 1, y: 1 }] +export const FLAT_CURVE = [{ x: 0, y: 1 }, { x: 1, y: 1 }] +export const ALPHA_CURVE = [{ x: 0, y: 0 }, { x: 0.2, y: 1 }, { x: 0.8, y: 1 }, { x: 1, y: 0 }] +export const RESOURCE_ALPHA_CURVE = [{ x: 0, y: 0 }, { x: 0.1, y: 1 }, { x: 0.9, y: 1 }, { x: 1, y: 0 }] +export const TRAIL_ALPHA_CURVE = [{ x: 0, y: 1 }, { x: 1, y: 1 }] +export const TRAIL_SHAPE_CURVE = [{ x: 0, y: 1 }, { x: 1, y: 1 }] + diff --git a/src/views/particle-panel/useParticleExport.ts b/src/views/particle-panel/useParticleExport.ts new file mode 100644 index 0000000..81b4da5 --- /dev/null +++ b/src/views/particle-panel/useParticleExport.ts @@ -0,0 +1,225 @@ + +import { computed, markRaw, onBeforeUnmount, onMounted, reactive, ref, watch, watchEffect } from 'vue' +import { Texture } from 'pixi.js' +import { useParticleStore } from '../../store/particleStore' +import type { ParticleSystem } from '../../store/particleStore' +import { defaultConfig, ensureEmitterConfig } from '../../core/particleEmitter' +import NumSlider from '../NumSlider.vue' +import CurveEditor from '../CurveEditor.vue' +import ParticleAttributeControl from '../ParticleAttributeControl.vue' +import ColorGradientEditor from '../ColorGradientEditor.vue' +import ImageResourceCard from '../ImageResourceCard.vue' +import SpineObjectPanel from '../../spine/SpineObjectPanel.vue' +import { downloadEditorConfig, loadEditorConfigFile, loadEditorConfigText } from '../../editor/editorConfig' +import { beginTransfer, readResponseTextWithProgress } from '../../editor/transferProgress' +import { defaultSpineExportSettings, ensureSpineExportSettings } from '../../export/spineExportSettings' +import { buildSpineJson, downloadSpineJson } from '../../export/spineJsonExporter' +import { validateSpineJson } from '../../export/spineJsonValidator' +import { buildSpineImagesArchive, downloadSpineImagesArchive } from '../../export/spineImagesExporter' +import { + SpineConnectorError, + checkSpineConnector, + convertWithSpineConnector, + downloadSpineProject, + type SpineConnectorHealth, +} from '../../export/spineConnectorClient' +import { automaticLoopTransitionFrames } from '../../core/loopSegmentTiming' + + +export function useParticleExport(store: ReturnType) { +store.settings.exportSettings = ensureSpineExportSettings(store.settings.exportSettings) +const exportSettings = computed(() => store.settings.exportSettings) +const exportBusy = ref(false) +const exportTarget = ref<'json' | 'spine' | 'images' | null>(null) +const exportMessage = ref('') +const exportError = ref(false) +const connectorHealth = ref(null) +const connectorPairUrl = ref('') +const connectorExportErrorCode = ref('') + +const connectorStatusText = computed(() => { + const health = connectorHealth.value + if (!health) return '正在检测本地 Spine 连接器…' + if (!health.available) return '本地 Spine 连接器未启动' + if (!health.spineFound) return '连接器已启动,但未找到 Spine' + if (!health.authorized) return '连接器已启动,当前网站尚未授权' + return '连接器可用 · Spine 已就绪' +}) +const connectorStatusClass = computed(() => ({ + ready: !!connectorHealth.value?.available && !!connectorHealth.value?.spineFound && !!connectorHealth.value?.authorized, + warning: !!connectorHealth.value?.available && (!connectorHealth.value?.spineFound || !connectorHealth.value?.authorized), +})) +const connectorReady = computed(() => !!connectorHealth.value?.available && !!connectorHealth.value?.spineFound && !!connectorHealth.value?.authorized) +const connectorAuthorizationUrl = computed(() => { + const health = connectorHealth.value + if (!health?.available || !health.spineFound || health.authorized || typeof window === 'undefined') return '' + return `http://127.0.0.1:27843/pair?origin=${encodeURIComponent(window.location.origin)}` +}) +const connectorDisabledReason = computed(() => { + const health = connectorHealth.value + if (!health) return '检测中' + if (!health.available) return '未启动' + if (!health.spineFound) return '未找到 Spine' + if (!health.authorized) return '未授权' + return '' +}) +const connectorButtonTitle = computed(() => { + if (exportBusy.value) return '正在重新计算并生成 Spine 工程' + if (connectorDisabledReason.value) return `暂不可用:${connectorDisabledReason.value}` + return `调用本机 Spine 自动生成 ${exportSettings.value.spineVersion} 工程` +}) + +onMounted(() => { + refreshConnectorHealth() + connectorHealthTimer = window.setInterval(refreshConnectorHealth, 3000) +}) + +let connectorHealthTimer: number | undefined +let connectorHealthRequestId = 0 +onBeforeUnmount(() => { + if (connectorHealthTimer !== undefined) window.clearInterval(connectorHealthTimer) +}) + +async function refreshConnectorHealth() { + const requestId = ++connectorHealthRequestId + const health = await checkSpineConnector() + if (requestId !== connectorHealthRequestId) return + connectorHealth.value = health + const code = connectorExportErrorCode.value + const resolved = code === 'CONNECTOR_OFFLINE' + ? health.available + : code === 'SPINE_NOT_FOUND' + ? health.available && health.spineFound + : code === 'ORIGIN_NOT_ALLOWED' + ? health.available && health.spineFound && health.authorized + : !!code && health.available && health.spineFound && health.authorized + if (resolved) { + connectorExportErrorCode.value = '' + connectorPairUrl.value = '' + if (exportError.value) { + exportError.value = false + exportMessage.value = '' + } + } +} + +function nextPaint() { + return new Promise((resolve) => requestAnimationFrame(() => resolve())) +} + +async function prepareExportFrames(onProgress?: (progress: number) => void) { + store.timeline.playing = false + store.timeline.frame = 0 + store.timeline.recorded = false + for (const system of store.systems) system.frames = undefined + store.recalcTotalFrames() + await nextPaint() + store.timeline.playing = true + const expectedMs = store.timeline.totalFrames / Math.max(1, store.timeline.fps) * 1000 + const deadline = performance.now() + Math.max(8000, expectedMs * 2.5 + 3000) + while (!store.timeline.recorded) { + if (performance.now() > deadline) throw new Error('重新计算动画超时,请确认页面仍在运行后重试') + onProgress?.(Math.min(0.98, store.timeline.frame / Math.max(1, store.timeline.totalFrames - 1))) + await new Promise((resolve) => setTimeout(resolve, 50)) + } + onProgress?.(1) +} + +async function exportSpineJson() { + if (exportBusy.value) return + exportBusy.value = true + exportTarget.value = 'json' + exportError.value = false + connectorExportErrorCode.value = '' + connectorPairUrl.value = '' + exportMessage.value = '正在重新计算粒子动画…' + try { + await prepareExportFrames() + const result = buildSpineJson({ systems: store.systems as unknown as ParticleSystem[], timeline: store.timeline, settings: exportSettings.value }) + validateSpineJson(result.text, exportSettings.value.spineVersion) + downloadSpineJson(result, exportSettings.value.fileName) + const warning = result.warnings.length ? `;${result.warnings.length} 条资源提示(缺图仍已导出)` : '' + exportMessage.value = `已导出 Spine ${exportSettings.value.spineVersion}:${result.particleSystemCount} 个粒子系统、${result.animationCount} 个动画、${result.boneCount} 根骨骼${warning}` + } catch (error) { + exportError.value = true + exportMessage.value = error instanceof Error ? error.message : String(error) + } finally { + exportBusy.value = false + exportTarget.value = null + } +} + +async function exportSpineProject() { + if (exportBusy.value) return + exportBusy.value = true + exportTarget.value = 'spine' + exportError.value = false + connectorExportErrorCode.value = '' + connectorPairUrl.value = '' + exportMessage.value = '正在重新计算粒子动画…' + const transfer = beginTransfer('导出 Spine 包', '正在重新计算粒子动画…') + try { + await transfer.paint() + await prepareExportFrames((progress) => transfer.update(progress * 18, '正在重新计算粒子动画…')) + transfer.update(20, '正在生成 Spine JSON…') + const result = buildSpineJson({ systems: store.systems as unknown as ParticleSystem[], timeline: store.timeline, settings: exportSettings.value }) + validateSpineJson(result.text, exportSettings.value.spineVersion) + exportMessage.value = '正在整理图片并调用本机 Spine…' + const projectName = exportSettings.value.fileName.replace(/\.json$/i, '') || 'SpineParticle' + const converted = await convertWithSpineConnector({ + projectName, + spineVersion: exportSettings.value.spineVersion, + skeletonJson: result.text, + systems: store.systems as unknown as ParticleSystem[], + }, ({ phase, progress }) => { + if (phase === 'images') transfer.update(progress == null ? null : 22 + progress * 18, '正在整理工程图片…') + else if (phase === 'upload') transfer.update(progress == null ? null : 40 + progress * 30, '正在上传数据到 Spine 连接器…') + else if (phase === 'processing') transfer.update(null, 'Spine 正在转换工程,请稍候…') + else transfer.update(progress == null ? null : 82 + progress * 16, '正在下载生成的 Spine 工程包…') + }) + transfer.update(99, '正在交给浏览器下载…') + downloadSpineProject(converted.blob, converted.fileName) + exportMessage.value = `已生成 ${converted.fileName}:包含 .spine 工程和 ${converted.imageCount} 张图片,Spine ${converted.spineEditorVersion}` + await refreshConnectorHealth() + await transfer.finish('Spine 工程包已开始下载') + } catch (error) { + const errorMessage = error instanceof Error ? error.message : String(error) + exportError.value = true + connectorExportErrorCode.value = error instanceof SpineConnectorError ? error.code : '' + if (error instanceof SpineConnectorError && error.pairUrl) connectorPairUrl.value = error.pairUrl + exportMessage.value = errorMessage + await refreshConnectorHealth() + await transfer.fail(errorMessage) + } finally { + exportBusy.value = false + exportTarget.value = null + } +} + +async function exportSpineImages() { + if (exportBusy.value) return + exportBusy.value = true + exportTarget.value = 'images' + exportError.value = false + connectorExportErrorCode.value = '' + connectorPairUrl.value = '' + exportMessage.value = '正在整理当前粒子系统使用的图片…' + try { + const archive = await buildSpineImagesArchive({ + systems: store.systems as unknown as ParticleSystem[], + imagesPath: exportSettings.value.imagesPath, + }) + const fileName = downloadSpineImagesArchive(archive.blob, exportSettings.value.fileName) + exportMessage.value = `已生成 ${fileName}:${archive.folder}/ 内包含 ${archive.imageCount} 张图片` + } catch (error) { + exportError.value = true + exportMessage.value = error instanceof Error ? error.message : String(error) + } finally { + exportBusy.value = false + exportTarget.value = null + } +} + + +return { exportSettings, exportBusy, exportTarget, exportMessage, exportError, connectorHealth, connectorPairUrl, connectorExportErrorCode, connectorStatusText, connectorStatusClass, connectorReady, connectorAuthorizationUrl, connectorDisabledReason, connectorButtonTitle, connectorHealthTimer, connectorHealthRequestId, refreshConnectorHealth, nextPaint, prepareExportFrames, exportSpineJson, exportSpineProject, exportSpineImages } +} diff --git a/src/views/particle-panel/useParticlePanel.ts b/src/views/particle-panel/useParticlePanel.ts new file mode 100644 index 0000000..665a616 --- /dev/null +++ b/src/views/particle-panel/useParticlePanel.ts @@ -0,0 +1,458 @@ + +import { computed, markRaw, onBeforeUnmount, onMounted, reactive, ref, watch, watchEffect } from 'vue' +import { Texture } from 'pixi.js' +import { useParticleStore } from '../../store/particleStore' +import type { ParticleSystem } from '../../store/particleStore' +import { defaultConfig, ensureEmitterConfig } from '../../core/particleEmitter' +import NumSlider from '../NumSlider.vue' +import CurveEditor from '../CurveEditor.vue' +import ParticleAttributeControl from '../ParticleAttributeControl.vue' +import ColorGradientEditor from '../ColorGradientEditor.vue' +import ImageResourceCard from '../ImageResourceCard.vue' +import SpineObjectPanel from '../../spine/SpineObjectPanel.vue' +import { downloadEditorConfig, loadEditorConfigFile, loadEditorConfigText } from '../../editor/editorConfig' +import { beginTransfer, readResponseTextWithProgress } from '../../editor/transferProgress' +import { defaultSpineExportSettings, ensureSpineExportSettings } from '../../export/spineExportSettings' +import { buildSpineJson, downloadSpineJson } from '../../export/spineJsonExporter' +import { validateSpineJson } from '../../export/spineJsonValidator' +import { buildSpineImagesArchive, downloadSpineImagesArchive } from '../../export/spineImagesExporter' +import { + SpineConnectorError, + checkSpineConnector, + convertWithSpineConnector, + downloadSpineProject, + type SpineConnectorHealth, +} from '../../export/spineConnectorClient' +import { automaticLoopTransitionFrames } from '../../core/loopSegmentTiming' + +import { LINEAR_CURVE, FLAT_CURVE, ALPHA_CURVE, RESOURCE_ALPHA_CURVE, TRAIL_ALPHA_CURVE, TRAIL_SHAPE_CURVE } from './particlePanelCurves' +import { useParticleExport } from './useParticleExport' +import { useProjectPresets } from './useProjectPresets' +import { useParticleResources } from './useParticleResources' + +/** 每个参数面板创建一次状态,子分组共享选择、折叠状态与操作。 */ +export function useParticlePanel() { +const store = useParticleStore() +const { exportSettings, exportBusy, exportTarget, exportMessage, exportError, connectorHealth, connectorPairUrl, connectorExportErrorCode, connectorStatusText, connectorStatusClass, connectorReady, connectorAuthorizationUrl, connectorDisabledReason, connectorButtonTitle, connectorHealthTimer, connectorHealthRequestId, refreshConnectorHealth, nextPaint, prepareExportFrames, exportSpineJson, exportSpineProject, exportSpineImages } = useParticleExport(store) +const { configFileInput, selectedPreset, presetOptions, presetLoading, configMessage, configError, saveConfig, onConfigFileChange, refreshPresets, loadSelectedPreset } = useProjectPresets(store) +function resolvedCurveEditorMode(mode: '跟随导出' | '线性' | '贝塞尔') { + if (mode === '跟随导出') return exportSettings.value.keyframeCurve === 'bezier' ? 'bezier' : 'linear' + return mode === '贝塞尔' ? 'bezier' : 'linear' +} +// 默认场景始终有一个可编辑的粒子系统;热更新保留现有系统时不重复创建。 +if (!store.systems.length) store.addSystem() + +const activeIdx = computed(() => { + const i = store.systems.findIndex((s) => s.id === store.activeId) + return i >= 0 ? i : 0 +}) +const sys = computed(() => store.systems[activeIdx.value] || null) +const { textureFileInput, sequenceFileInput, pendingResourceId, trailTextureFileInput, pendingTrailResourceId, addTrailResource, openTrailTexturePicker, onTrailRigChange, onTrailResourceBoneCountChange, onTrailResourceRotationChange, onTrailTextureFile, resetTrailTexture, removeTrailResource, rebalanceTrailWeights, setTrailResourceWeight, toggleTrailResourceLock, setTrailColor, commitTrailColor, addImageResource, openTexturePicker, openSequencePicker, onTextureFile, onSequenceFiles, readFileAsDataUrl, resetTexture, normalizeHex, setResourceFixedColor, commitResourceFixedColor, removeImageResource, roundWeight, distributeImageWeights, rebalanceImageWeights, setResourceWeight, toggleResourceLock } = useParticleResources(sys) +const automaticLoopDuration = computed(() => sys.value + ? automaticLoopTransitionFrames(sys.value.config, store.timeline.fps) + : 30) +const loopDurationFrames = computed(() => { + const config = sys.value?.config + if (!config) return 1 + return Math.max(1, Math.ceil(Number(config.loopDurationFrames) || 1)) +}) +const activeObjectType = computed(() => store.activeObjectType) +const activeCollider = computed(() => store.activeObjectType === 'collision' + ? store.colliders.find((item) => item.id === store.activeObjectId) || null + : null) +const activePath = computed(() => store.activeObjectType === 'path' + ? store.paths.find((item) => item.id === store.activeObjectId) || null + : null) +const activeSpine = computed(() => store.activeObjectType === 'spine' + ? store.spines.find((item) => item.id === store.activeObjectId) || null + : null) +const canCopyObject = computed(() => { + if (store.activeObjectType === 'particle') return store.systems.some((item) => item.id === store.activeObjectId) + if (store.activeObjectType === 'collision') return store.colliders.some((item) => item.id === store.activeObjectId) + if (store.activeObjectType === 'path') return store.paths.some((item) => item.id === store.activeObjectId) + return store.spines.some((item) => item.id === store.activeObjectId) +}) +const selectedSpineBone = computed(() => { + const spine = store.spines.find((item) => item.selectedBone && item.bones.some((bone) => bone.name === item.selectedBone)) + return spine ? { spine, boneName: spine.selectedBone } : null +}) +const boundSpineBone = computed(() => { + const config = sys.value?.config + if (!config || config.emitterFollowMode !== 'bone') return null + const spine = store.spines.find((item) => item.id === config.emitterFollowSpineId) + if (!spine || !spine.bones.some((bone) => bone.name === config.emitterFollowBoneName)) return null + return { spine, boneName: config.emitterFollowBoneName } +}) +const collisionPickerOpen = ref(false) +const selectedCollisionBodies = computed(() => { + const ids = new Set(sys.value?.config.collisionColliderIds || []) + return store.colliders.filter((collider) => ids.has(collider.id)) +}) +const availableCollisionBodies = computed(() => { + const ids = new Set(sys.value?.config.collisionColliderIds || []) + return store.colliders.filter((collider) => !ids.has(collider.id)) +}) + +watch(() => [sys.value?.id, sys.value?.config.collision], () => { + collisionPickerOpen.value = false +}) + +function addCollisionBody(colliderId: number) { + const config = sys.value?.config + if (!config || config.collisionColliderIds.includes(colliderId)) return + config.collisionColliderIds.push(colliderId) + collisionPickerOpen.value = false +} + +function removeCollisionBody(colliderId: number) { + const config = sys.value?.config + if (!config) return + config.collisionColliderIds = config.collisionColliderIds.filter((id) => id !== colliderId) +} + +// 兼容开发热更新和旧场景:缺少显隐字段的对象按“显示”处理。 +watchEffect(() => { + for (const system of store.systems) if (system.visible == null) system.visible = true + for (const collider of store.colliders) if (collider.visible == null) collider.visible = true + for (const path of store.paths) if (path.visible == null) path.visible = true + for (const spine of store.spines) if (spine.visible == null) spine.visible = true +}) + +// 开发热更新会保留旧的 Pinia 对象;渲染属性控件前先补齐新增字段。 +watchEffect(() => { + if (!sys.value) return + const config = ensureEmitterConfig(sys.value.config as any) + // 初始属性不再提供曲线模式;旧配置自动回退为随机。 + if (config.lifeMode === 'curve') config.lifeMode = 'random' + if (config.speedMode === 'curve') config.speedMode = 'random' + if (config.scaleMode === 'curve') config.scaleMode = 'random' + if (config.initialRotationMode === 'curve') config.initialRotationMode = 'random' + if (config.mode === 'stream' && (!(config.duration > 0))) config.duration = 1 + if (config.streamBehavior === 'loop') { + if (config.emitterFollow || config.emitterFollowMode !== 'none') resetParticleFollow(config) + } +}) + +// 每个粒子系统永久保存自己的 Spine ID 与骨骼名;层级树当前选择不会覆盖既有绑定。 +// 仅当已绑定的 Spine 或骨骼确实不存在时,才回到“无”模式。 +watchEffect(() => { + const colliderIds = new Set(store.colliders.map((collider) => collider.id)) + for (const system of store.systems) { + const config = ensureEmitterConfig(system.config as any) + const validCollisionIds = config.collisionColliderIds.filter((id) => colliderIds.has(id)) + if (validCollisionIds.length !== config.collisionColliderIds.length) config.collisionColliderIds = validCollisionIds + if (config.spawnPathId > 0 && !store.paths.some((path) => path.id === config.spawnPathId)) { + config.spawnPathId = 0 + if (config.emissionAngleMode === 'path-normal' || config.emissionAngleMode === 'path-tangent') config.emissionAngleMode = 'fixed' + } + if (config.emitterFollowMode !== 'bone') continue + const spine = store.spines.find((item) => item.id === config.emitterFollowSpineId) + const targetExists = !!spine?.bones.some((bone) => bone.name === config.emitterFollowBoneName) + if (!targetExists) { + config.emitterFollowMode = 'none' + config.emitterFollowSpineId = 0 + config.emitterFollowBoneName = '' + } + } +}) + +// HMR 或旧场景中的碰撞体缺少路径跟随字段时即时补齐。 +watchEffect(() => { + for (const collider of store.colliders) { + if (collider.followPathId == null) collider.followPathId = 0 + if (!(collider.followDuration > 0)) collider.followDuration = 2 + if (collider.followPathRotation == null) collider.followPathRotation = false + if (!['跟随导出', '线性', '贝塞尔'].includes(collider.followCurveMode)) collider.followCurveMode = '跟随导出' + if (!Array.isArray(collider.followCurve) || collider.followCurve.length < 2) collider.followCurve = [{ x: 0, y: 0 }, { x: 1, y: 1 }] + } +}) + +const collapsed = reactive>({ + config: true, + scene: false, + emitMode: true, + shape: true, + attr: true, + look: true, + mods: true, + export: false, +}) +function toggle(key: string) { collapsed[key] = !collapsed[key] } + +function setEmitMode(mode: 'stream' | 'burst') { + const config = sys.value?.config + if (!config) return + config.mode = mode + if (mode === 'stream' && (!(config.duration > 0))) config.duration = 1 +} + +function setLoopDurationFrames(value: number) { + const config = sys.value?.config + if (!config) return + const frames = Math.min(1800, Math.max(1, Math.ceil(Number(value) || 1))) + config.loopDurationFrames = frames +} + +function resetParticleFollow(config: any) { + const defaults = defaultConfig() + config.emitterFollow = false + config.emitterFollowMode = 'none' + config.emitterFollowPathId = defaults.emitterFollowPathId + config.emitterFollowSpineId = defaults.emitterFollowSpineId + config.emitterFollowBoneName = defaults.emitterFollowBoneName + config.emitterFollowBoneOffsetX = defaults.emitterFollowBoneOffsetX + config.emitterFollowBoneOffsetY = defaults.emitterFollowBoneOffsetY + config.emitterFollowBoneRotation = defaults.emitterFollowBoneRotation + config.emitterFollowBoneScaleX = defaults.emitterFollowBoneScaleX + config.emitterFollowBoneScaleY = defaults.emitterFollowBoneScaleY + config.emitterAngleMode = defaults.emitterAngleMode + config.emitterFollowCurve = defaults.emitterFollowCurve.map((point) => ({ ...point })) + config.emitterFollowDuration = defaults.emitterFollowDuration + config.emitterFollowSpace = defaults.emitterFollowSpace + config.emitterFollowDirection = defaults.emitterFollowDirection + config.emitterFollowOffset = defaults.emitterFollowOffset +} + +function setStreamBehavior(behavior: 'normal' | 'loop') { + const config = sys.value?.config + if (!config || config.streamBehavior === behavior) return + const entering = behavior === 'loop' + const message = entering + ? '进入循环持续模式后,粒子跟随设置会失效并恢复默认值。是否继续?' + : '退出循环持续模式后,粒子跟随设置会失效并恢复默认值。是否继续?' + if (!window.confirm(message)) return + resetParticleFollow(config) + config.streamBehavior = behavior + if (!entering) { + config.generateLoopStartAnimation = false + config.generateLoopEndAnimation = false + } +} + +function setLoopSection(section: 'start' | 'end', event: Event) { + const config = sys.value?.config + if (!config) return + const checked = (event.target as HTMLInputElement).checked + if (section === 'start') { + config.generateLoopStartAnimation = checked + } else { + config.generateLoopEndAnimation = checked + } +} + +function setLoopSectionDuration(section: 'start' | 'end', event: Event) { + const config = sys.value?.config + if (!config) return + const frames = Math.min(1800, Math.max(1, Math.ceil(Number((event.target as HTMLInputElement).value) || 30))) + if (section === 'start') config.loopStartDurationFrames = frames + else config.loopEndDurationFrames = frames +} + +function setLoopCustomDuration(section: 'start' | 'end', event: Event) { + const config = sys.value?.config + if (!config) return + const checked = (event.target as HTMLInputElement).checked + if (section === 'start') config.loopStartUseCustomDuration = checked + else config.loopEndUseCustomDuration = checked +} + +function onEmitterFollowModeChange(event: Event, config: { + emitterFollowMode: 'none' | 'path' | 'bone' + emitterFollowSpineId: number + emitterFollowBoneName: string +}) { + const mode = (event.target as HTMLSelectElement).value as 'none' | 'path' | 'bone' + config.emitterFollowMode = mode + if (mode !== 'bone') { + config.emitterFollowSpineId = 0 + config.emitterFollowBoneName = '' + return + } + bindSelectedBone(config) +} + +function bindSelectedBone(config: { + emitterFollowMode: 'none' | 'path' | 'bone' + emitterFollowSpineId: number + emitterFollowBoneName: string +}) { + const target = selectedSpineBone.value + if (!target) { + config.emitterFollowMode = 'none' + config.emitterFollowSpineId = 0 + config.emitterFollowBoneName = '' + return + } + config.emitterFollowMode = 'bone' + config.emitterFollowSpineId = target.spine.id + config.emitterFollowBoneName = target.boneName +} + +type ResetModule = 'emitMode' | 'shape' | 'attr' | 'look' | 'mods' | 'export' + +const MODULE_RESET_KEYS: Record, string[]> = { + emitMode: [ + 'mode', 'rate', 'streamBehavior', 'loopDurationFrames', + 'generateLoopStartAnimation', 'loopStartUseCustomDuration', 'loopStartDurationFrames', + 'generateLoopEndAnimation', 'loopEndUseCustomDuration', 'loopEndDurationFrames', + 'burstCount', 'burstLoop', 'delay', 'duration', + ], + shape: [ + 'shape', 'shapeRangeVersion', + 'innerRadius', 'outerRadius', 'innerRectW', 'innerRectH', 'outerRectW', 'outerRectH', 'spawnPathId', 'spawnPathDistribution', + 'radius', 'rectW', 'rectH', 'emissionAngleMode', 'direction', 'spread', 'coneDirection', 'coneAngle', + ], + attr: [ + 'lifeMin', 'lifeMax', 'lifeMode', 'lifeCurve', + 'speedMin', 'speedMax', 'speedMode', 'speedCurve', + 'scaleMin', 'scaleMax', 'scaleMode', 'scaleAxisMode', 'scaleYMin', 'scaleYMax', + 'scaleCurve', 'scaleYCurve', 'scaleEndRatio', + 'initialRotationMode', 'initialRotationMin', 'initialRotationMax', 'initialRotationCurve', + 'rotationSpeedMin', 'rotationSpeedMax', + 'speedOverLifeEnabled', 'speedOverLifeMode', 'speedOverLifeMin', 'speedOverLifeMax', 'speedOverLifeCurve', + 'scaleOverLifeEnabled', 'scaleOverLifeMode', 'scaleOverLifeAxisMode', + 'scaleOverLifeMin', 'scaleOverLifeMax', 'scaleYOverLifeMin', 'scaleYOverLifeMax', + 'scaleOverLifeCurve', 'scaleYOverLifeCurve', + 'rotationOverLifeEnabled', 'rotationOverLifeMode', 'rotationOverLifeCurve', + ], + look: [ + 'texture', 'imageResources', 'imageWeightVersion', + 'alpha', 'alphaEnd', 'colorStart', 'colorEnd', 'colorOverLife', 'blend', + 'alphaMode', 'curveMode', 'alphaCurve', 'textureName', 'textureFolder', + 'alphaScale', 'anchorX', 'anchorY', 'independentAlpha', + ], + mods: [ + 'noise', 'noiseAmt', 'noiseRange', 'noiseSpeed', + 'useGravity', 'gravity', 'gravityMode', 'gravityMin', 'gravityMax', 'gravityDirection', 'gravityCurve', + 'wind', 'windX', 'windY', 'windMode', 'windMin', 'windMax', 'windDirection', 'windCurve', + 'forceField', 'forceStrength', 'forceRadius', 'forceCenterX', 'forceCenterY', 'forceFalloff', + 'attraction', 'attractionCenterX', 'attractionCenterY', 'attractionRadius', + 'attractionDuration', 'attractionDelay', 'attractionDelayMode', 'attractionPath', + 'trail', 'trailConfigVersion', 'trailResources', 'trailResourceVersion', + 'trailTexture', 'trailTextureName', 'trailPreviewUrl', 'trailColorMode', 'trailColor', + 'trailColorGradient', 'trailAlphaMode', 'trailAlpha', 'trailAlphaCurve', + 'trailBoneCount', 'trailLength', 'trailWidth', 'trailWidthMode', + 'trailLifeLengthEnabled', 'trailLifeLengthCurve', 'trailShapeEnabled', 'trailShapeCurve', + 'trailGridRows', 'trailGridCols', 'collision', 'collisionColliderIds', 'pathFollow', + 'emitterFollow', 'emitterFollowMode', 'emitterFollowPathId', + 'emitterFollowSpineId', 'emitterFollowBoneName', + 'emitterFollowBoneOffsetX', 'emitterFollowBoneOffsetY', 'emitterFollowBoneRotation', + 'emitterFollowBoneScaleX', 'emitterFollowBoneScaleY', 'emitterAngleMode', + 'emitterFollowCurve', 'emitterFollowDuration', 'emitterFollowSpace', + 'emitterFollowDirection', 'emitterFollowOffset', 'damping', + ], +} + +function resetModule(module: ResetModule) { + const config = sys.value?.config as any + if (module === 'export') { + store.settings.exportSettings = defaultSpineExportSettings() + return + } + if (!config) return + const defaults = defaultConfig() as any + for (const key of MODULE_RESET_KEYS[module]) config[key] = defaults[key] + // 重置资源模块后,Stage 会在下一帧重新挂载默认 star/trail 纹理。 +} + +function normalizeExportFps() { + exportSettings.value.fps = Math.min(240, Math.max(1, Math.round(Number(exportSettings.value.fps) || 30))) +} + +function select(i: number) { store.selectSystem(store.systems[i]?.id ?? 0) } +function addSys() { store.addSystem() } +function addCollider() { store.addCollider() } +function addPath() { store.addPath() } +function addSpine() { store.addSpine() } +function copySelectedObject() { store.duplicateSelectedObject() } +function pathAnchor(x: number, y: number, inX = 0, inY = 0, outX = 0, outY = 0) { + return { x, y, inX, inY, outX, outY } +} +function applyPathPreset() { + const path = activePath.value + if (!path || !path.preset) return + if (path.preset === 'circle') { + const radius = 110, handle = radius * 0.5522848 + path.points = [ + pathAnchor(radius, 0, 0, -handle, 0, handle), + pathAnchor(0, radius, handle, 0, -handle, 0), + pathAnchor(-radius, 0, 0, handle, 0, -handle), + pathAnchor(0, -radius, -handle, 0, handle, 0), + ] + path.closed = true + } else if (path.preset === 'square') { + path.points = [pathAnchor(-100, -100), pathAnchor(100, -100), pathAnchor(100, 100), pathAnchor(-100, 100)] + path.closed = true + } else { + const sides = path.preset === 'star' ? 10 : 6 + path.points = Array.from({ length: sides }, (_, index) => { + const radius = path.preset === 'star' && index % 2 ? 50 : 110 + const angle = -Math.PI * 0.5 + index / sides * Math.PI * 2 + return pathAnchor(Math.cos(angle) * radius, Math.sin(angle) * radius) + }) + path.closed = true + } +} +function clearPathAnchors() { + if (activePath.value) activePath.value.points = [] +} +function randomizeSeed() { + if (sys.value) sys.value.config.seed = Math.floor(Math.random() * 999999) + 1 +} + +function setSpeedOverLifeMode(mode: 'fixed' | 'random' | 'curve' | 'direction') { + const config = sys.value?.config + if (!config || mode === 'direction') return + config.speedOverLifeMode = mode + // 旧默认是 1~1,曲线映射后永远为 1;切换曲线时改为有效倍率范围。 + if (mode === 'curve' && config.speedOverLifeMin === config.speedOverLifeMax) { + config.speedOverLifeMin = 0 + config.speedOverLifeMax = 1 + } +} + +function prepareScaleOverLifeCurve() { + const config = sys.value?.config + if (!config || config.scaleOverLifeMode !== 'curve') return + if (config.scaleOverLifeMin === config.scaleOverLifeMax) { + config.scaleOverLifeMin = 0 + config.scaleOverLifeMax = 1 + } + if (config.scaleYOverLifeMin === config.scaleYOverLifeMax) { + config.scaleYOverLifeMin = 0 + config.scaleYOverLifeMax = 1 + } +} + +function setScaleOverLifeMode(mode: 'fixed' | 'random' | 'curve' | 'direction') { + const config = sys.value?.config + if (!config || mode === 'direction') return + config.scaleOverLifeMode = mode + prepareScaleOverLifeCurve() +} + +// 各发射器形状的默认参数:切换形状时应用(只影响形状相关字段,不牵连其他) +const SHAPE_DEFAULTS: Record> = { + point: { emissionAngleMode: 'random', direction: 0, spread: 360 }, + circle: { innerRadius: 0, outerRadius: 100, emissionAngleMode: 'fixed', direction: -90, spread: 0 }, + rect: { innerRectW: 0, innerRectH: 0, outerRectW: 200, outerRectH: 100, emissionAngleMode: 'fixed', direction: -90, spread: 0 }, + cone: { innerRadius: 0, outerRadius: 100, coneAngle: 90, coneDirection: 90, emissionAngleMode: 'random', direction: 90, spread: 90 }, + path: { spawnPathId: 0, spawnPathDistribution: 'fixed', emissionAngleMode: 'fixed', direction: 0, spread: 0 }, +} +function onShapeChange() { + const cfg = sys.value?.config + if (!cfg) return + const d = SHAPE_DEFAULTS[cfg.shape] + if (!d) return + Object.assign(cfg, d) +} +function onSpawnPathChange() { + const cfg = sys.value?.config + if (!cfg || cfg.spawnPathId > 0) return + if (cfg.emissionAngleMode === 'path-normal' || cfg.emissionAngleMode === 'path-tangent') cfg.emissionAngleMode = 'fixed' +} +// 重置/删除图片 → 回到默认 star.png + + +return { store, exportSettings, exportBusy, exportTarget, exportMessage, exportError, connectorPairUrl, connectorStatusText, connectorStatusClass, connectorReady, connectorAuthorizationUrl, connectorDisabledReason, connectorButtonTitle, refreshConnectorHealth, exportSpineJson, exportSpineProject, exportSpineImages, configFileInput, selectedPreset, presetOptions, presetLoading, configMessage, configError, saveConfig, onConfigFileChange, refreshPresets, loadSelectedPreset, resolvedCurveEditorMode, sys, textureFileInput, sequenceFileInput, trailTextureFileInput, addTrailResource, openTrailTexturePicker, onTrailRigChange, onTrailResourceBoneCountChange, onTrailResourceRotationChange, onTrailTextureFile, resetTrailTexture, removeTrailResource, setTrailResourceWeight, toggleTrailResourceLock, setTrailColor, commitTrailColor, addImageResource, openTexturePicker, openSequencePicker, onTextureFile, onSequenceFiles, resetTexture, setResourceFixedColor, commitResourceFixedColor, removeImageResource, setResourceWeight, toggleResourceLock, automaticLoopDuration, loopDurationFrames, activeObjectType, activeCollider, activePath, activeSpine, canCopyObject, selectedSpineBone, boundSpineBone, collisionPickerOpen, selectedCollisionBodies, availableCollisionBodies, addCollisionBody, removeCollisionBody, collapsed, toggle, setEmitMode, setLoopDurationFrames, setStreamBehavior, setLoopSection, setLoopSectionDuration, setLoopCustomDuration, onEmitterFollowModeChange, bindSelectedBone, resetModule, normalizeExportFps, select, addSys, addCollider, addPath, addSpine, copySelectedObject, applyPathPreset, clearPathAnchors, randomizeSeed, setSpeedOverLifeMode, prepareScaleOverLifeCurve, setScaleOverLifeMode, onShapeChange, onSpawnPathChange, LINEAR_CURVE, FLAT_CURVE, ALPHA_CURVE, RESOURCE_ALPHA_CURVE, TRAIL_ALPHA_CURVE, TRAIL_SHAPE_CURVE } +} diff --git a/src/views/particle-panel/useParticleResources.ts b/src/views/particle-panel/useParticleResources.ts new file mode 100644 index 0000000..aa53ef5 --- /dev/null +++ b/src/views/particle-panel/useParticleResources.ts @@ -0,0 +1,433 @@ + +import { computed, markRaw, onBeforeUnmount, onMounted, reactive, ref, watch, watchEffect } from 'vue' +import { Texture } from 'pixi.js' +import { useParticleStore } from '../../store/particleStore' +import type { ParticleSystem } from '../../store/particleStore' +import { defaultConfig, ensureEmitterConfig } from '../../core/particleEmitter' +import NumSlider from '../NumSlider.vue' +import CurveEditor from '../CurveEditor.vue' +import ParticleAttributeControl from '../ParticleAttributeControl.vue' +import ColorGradientEditor from '../ColorGradientEditor.vue' +import ImageResourceCard from '../ImageResourceCard.vue' +import SpineObjectPanel from '../../spine/SpineObjectPanel.vue' +import { downloadEditorConfig, loadEditorConfigFile, loadEditorConfigText } from '../../editor/editorConfig' +import { beginTransfer, readResponseTextWithProgress } from '../../editor/transferProgress' +import { defaultSpineExportSettings, ensureSpineExportSettings } from '../../export/spineExportSettings' +import { buildSpineJson, downloadSpineJson } from '../../export/spineJsonExporter' +import { validateSpineJson } from '../../export/spineJsonValidator' +import { buildSpineImagesArchive, downloadSpineImagesArchive } from '../../export/spineImagesExporter' +import { + SpineConnectorError, + checkSpineConnector, + convertWithSpineConnector, + downloadSpineProject, + type SpineConnectorHealth, +} from '../../export/spineConnectorClient' +import { automaticLoopTransitionFrames } from '../../core/loopSegmentTiming' + + +export function useParticleResources(sys: import('vue').ComputedRef['systems'][number] | null>) { +const textureFileInput = ref(null) +const sequenceFileInput = ref(null) +const pendingResourceId = ref(null) +const trailTextureFileInput = ref(null) +const pendingTrailResourceId = ref(null) + +function addTrailResource() { + const config = sys.value?.config + if (!config) return + const nextId = Math.max(0, ...config.trailResources.map((resource) => resource.id)) + 1 + config.trailResources.push({ + id: nextId, + texture: null, + textureName: 'trail', + previewUrl: '/images/trail.png', + weight: 100, + locked: false, + rotation: 0, + colorMode: 'particle', + color: '#ffffff', + colorGradient: [{ position: 0, color: '#ffffff' }, { position: 1, color: '#ffffff' }], + blend: 'normal', + alphaMode: 'particle', + alpha: 1, + alphaCurve: TRAIL_ALPHA_CURVE.map((point) => ({ ...point })), + boneCount: 3, + trailRatio: 100, + lengthMode: 'fixed', + length: 100, + lengthMin: 100, + lengthMax: 100, + widthSizeMode: 'fixed', + width: 100, + widthMin: 100, + widthMax: 100, + widthMode: 'particle', + lifeLengthEnabled: false, + lifeLengthCurve: FLAT_CURVE.map((point) => ({ ...point })), + shapeEnabled: false, + shapeCurve: TRAIL_SHAPE_CURVE.map((point) => ({ ...point })), + }) + rebalanceTrailWeights() +} + +function openTrailTexturePicker(resourceId: number) { + pendingTrailResourceId.value = resourceId + trailTextureFileInput.value?.click() +} + +type TrailRigKey = 'trailGridRows' | 'trailGridCols' +function onTrailRigChange(key: TrailRigKey, value: number) { + const config = sys.value?.config + if (!config) return + const maximum = key === 'trailGridCols' ? 32 : 16 + config[key] = Math.min(maximum, Math.max(2, Math.round(Number(value) || 2))) + // 只触发骨骼和蒙皮重建;所有正在使用的拖尾图片与粒子资源选择保持不变。 +} + +function onTrailResourceBoneCountChange(resourceId: number, value: number) { + const resource = sys.value?.config.trailResources.find((item) => item.id === resourceId) + if (!resource) return + resource.boneCount = Math.min(16, Math.max(2, Math.round(Number(value) || 2))) + // 骨骼数量包含在该资源的蒙皮签名中,运行层会保留图片并重新绑定。 +} + +function onTrailResourceRotationChange(resourceId: number, value: number) { + const resource = sys.value?.config.trailResources.find((item) => item.id === resourceId) + if (!resource) return + resource.rotation = Math.max(-360, Math.min(360, Number(value) || 0)) + // 旋转属于图片默认方向;运行层将新的角度写入 UV 签名并重新绑定蒙皮。 +} + +async function onTrailTextureFile(event: Event) { + const input = event.target as HTMLInputElement + const file = input.files?.[0] + const config = sys.value?.config + const resource = config?.trailResources.find((item) => item.id === pendingTrailResourceId.value) + if (!file || !resource) { input.value = ''; return } + const dataUrl = await readFileAsDataUrl(file) + resource.texture = markRaw(await Texture.fromURL(dataUrl)) as any + resource.previewUrl = dataUrl + resource.textureName = file.name.replace(/\.[^.]+$/, '') || 'trail' + input.value = '' + pendingTrailResourceId.value = null +} + +async function resetTrailTexture(resourceId: number) { + const config = sys.value?.config + const resource = config?.trailResources.find((item) => item.id === resourceId) + if (!resource) return + resource.texture = markRaw(await Texture.fromURL('/images/trail.png')) as any + resource.previewUrl = '/images/trail.png' + resource.textureName = 'trail' + resource.weight = 100 + resource.locked = false + resource.rotation = 0 + resource.boneCount = 3 + resource.trailRatio = 100 + resource.lengthMode = 'fixed' + resource.length = 100 + resource.lengthMin = 100 + resource.lengthMax = 100 + resource.widthSizeMode = 'fixed' + resource.width = 100 + resource.widthMin = 100 + resource.widthMax = 100 + resource.widthMode = 'particle' + resource.lifeLengthEnabled = false + resource.lifeLengthCurve = FLAT_CURVE.map((point) => ({ ...point })) + resource.shapeEnabled = false + resource.shapeCurve = TRAIL_SHAPE_CURVE.map((point) => ({ ...point })) + resource.colorMode = 'particle' + resource.color = '#ffffff' + resource.colorGradient = [ + { position: 0, color: '#ffffff' }, + { position: 1, color: '#ffffff' }, + ] + resource.blend = 'normal' + resource.alphaMode = 'particle' + resource.alpha = 1 + resource.alphaCurve = TRAIL_ALPHA_CURVE.map((point) => ({ ...point })) + rebalanceTrailWeights() +} + +function removeTrailResource(resourceId: number) { + const resources = sys.value?.config.trailResources + if (!resources || resources.length <= 1) return + const index = resources.findIndex((resource) => resource.id === resourceId) + if (index >= 0) resources.splice(index, 1) + rebalanceTrailWeights() +} + +function rebalanceTrailWeights() { + const resources = sys.value?.config.trailResources + if (!resources?.length) return + if (resources.length === 1) { + resources[0].weight = 100 + resources[0].locked = false + return + } + const locked = resources.filter((resource) => resource.locked) + const unlocked = resources.filter((resource) => !resource.locked) + let lockedTotal = locked.reduce((sum, resource) => sum + Math.max(0, Number(resource.weight) || 0), 0) + if (lockedTotal > 100) { + distributeImageWeights(locked, 100, true) + lockedTotal = 100 + } + distributeImageWeights(unlocked, 100 - lockedTotal) +} + +function setTrailResourceWeight(resourceId: number, value: number) { + const resources = sys.value?.config.trailResources + if (!resources?.length) return + if (resources.length === 1) { + resources[0].weight = 100 + resources[0].locked = false + return + } + const resource = resources.find((item) => item.id === resourceId) + if (!resource || resource.locked) return + const lockedTotal = resources + .filter((item) => item.id !== resourceId && item.locked) + .reduce((sum, item) => sum + Math.max(0, Number(item.weight) || 0), 0) + const available = Math.max(0, 100 - lockedTotal) + const others = resources.filter((item) => item.id !== resourceId && !item.locked) + resource.weight = roundWeight(Math.min(available, Math.max(0, Number(value) || 0))) + if (!others.length) resource.weight = roundWeight(available) + else distributeImageWeights(others, available - resource.weight, true) +} + +function toggleTrailResourceLock(resourceId: number) { + const resources = sys.value?.config.trailResources + if (!resources || resources.length === 1) return + const resource = resources.find((item) => item.id === resourceId) + if (resource) resource.locked = !resource.locked +} + +function setTrailColor(resource: { color: string }, event: Event) { + const input = event.target as HTMLInputElement + resource.color = normalizeHex(input.value, resource.color) + input.value = resource.color +} + +function commitTrailColor(resource: { color: string }, event: KeyboardEvent) { + setTrailColor(resource, event) + ;(event.target as HTMLInputElement).blur() +} + +function addImageResource() { + const config = sys.value?.config + if (!config) return + const nextId = Math.max(0, ...config.imageResources.map((resource) => resource.id)) + 1 + config.imageResources.push({ + id: nextId, + texture: config.texture, + textureName: 'star', + textureFolder: '', + previewUrl: '/images/star.png', + imageMode: 'fixed', + sequencePlayback: 'loop-forward', + sequenceFps: 30, + sequenceFrames: [], + weight: 100, + locked: false, + scale: 1, + anchorX: 0.5, + anchorY: 0.5, + colorMode: 'fixed', + colorStart: '#ffffff', + colorEnd: '#ff4d4d', + colorGradient: [{ position: 0, color: '#ffffff' }, { position: 1, color: '#ff4d4d' }], + blend: 'normal', + independentAlpha: 'off', + alpha: 1, + alphaCurveMode: '跟随导出', + alphaCurve: RESOURCE_ALPHA_CURVE.map((point) => ({ ...point })), + } as any) + rebalanceImageWeights() +} + +function openTexturePicker(resourceId: number) { + pendingResourceId.value = resourceId + textureFileInput.value?.click() +} + +function openSequencePicker(resourceId: number) { + pendingResourceId.value = resourceId + sequenceFileInput.value?.click() +} + +async function onTextureFile(event: Event) { + const input = event.target as HTMLInputElement + const file = input.files?.[0] + const config = sys.value?.config + const resource = config?.imageResources.find((item) => item.id === pendingResourceId.value) + if (!file || !resource) { input.value = ''; return } + const dataUrl = await readFileAsDataUrl(file) + const texture = markRaw(await Texture.fromURL(dataUrl)) + resource.texture = texture as any + resource.previewUrl = dataUrl + resource.textureFolder = '' + resource.textureName = file.name.replace(/\.[^.]+$/, '') || 'particle' + input.value = '' + pendingResourceId.value = null +} + +async function onSequenceFiles(event: Event) { + const input = event.target as HTMLInputElement + const files = Array.from(input.files || []).sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true, sensitivity: 'base' })) + const config = sys.value?.config + const resource = config?.imageResources.find((item) => item.id === pendingResourceId.value) + if (!files.length || !resource) { input.value = ''; return } + resource.sequenceFrames = await Promise.all(files.map(async (file) => { + const previewUrl = await readFileAsDataUrl(file) + return { + name: file.name, + previewUrl, + texture: markRaw(await Texture.fromURL(previewUrl)) as any, + } + })) + resource.imageMode = 'sequence' + input.value = '' + pendingResourceId.value = null +} + +function readFileAsDataUrl(file: File) { + return new Promise((resolve, reject) => { + const reader = new FileReader() + reader.onload = () => resolve(String(reader.result || '')) + reader.onerror = () => reject(reader.error) + reader.readAsDataURL(file) + }) +} + +function resetTexture(resourceId: number) { + const config = sys.value?.config + const resource = config?.imageResources.find((item) => item.id === resourceId) + if (!config || !resource) return + resource.texture = config.texture + resource.textureName = 'star' + resource.textureFolder = '' + resource.previewUrl = '/images/star.png' + resource.imageMode = 'fixed' + resource.sequencePlayback = 'loop-forward' + resource.sequenceFps = 30 + resource.sequenceFrames = [] + resource.scale = 1 + resource.anchorX = 0.5 + resource.anchorY = 0.5 + resource.colorMode = 'fixed' + resource.colorStart = '#ffffff' + resource.colorEnd = '#ff4d4d' + resource.colorGradient = [{ position: 0, color: '#ffffff' }, { position: 1, color: '#ff4d4d' }] + resource.blend = 'normal' + resource.independentAlpha = 'off' + resource.alpha = 1 + resource.alphaCurveMode = '跟随导出' + resource.alphaCurve = RESOURCE_ALPHA_CURVE.map((point) => ({ ...point })) + resource.locked = false + rebalanceImageWeights() +} + +function normalizeHex(value: string, fallback: string) { + let hex = value.trim().replace(/^#/, '') + if (/^[0-9a-f]{3}$/i.test(hex)) hex = hex.split('').map((character) => character + character).join('') + return /^[0-9a-f]{6}$/i.test(hex) ? `#${hex.toLowerCase()}` : fallback +} + +function setResourceFixedColor(resource: { colorStart: string }, event: Event) { + const input = event.target as HTMLInputElement + resource.colorStart = normalizeHex(input.value, resource.colorStart) + input.value = resource.colorStart +} + +function commitResourceFixedColor(resource: { colorStart: string }, event: KeyboardEvent) { + setResourceFixedColor(resource, event) + ;(event.target as HTMLInputElement).blur() +} + +function removeImageResource(resourceId: number) { + const resources = sys.value?.config.imageResources + if (!resources || resources.length <= 1) return + const index = resources.findIndex((resource) => resource.id === resourceId) + if (index >= 0) resources.splice(index, 1) + rebalanceImageWeights() +} + +function roundWeight(value: number) { + return Math.round(value) +} + +type WeightResource = { weight: number; locked: boolean } + +function distributeImageWeights(resources: WeightResource[], total: number, proportional = false) { + if (!resources.length) return + const safeTotal = Math.max(0, roundWeight(total)) + const sourceTotal = proportional + ? resources.reduce((sum, resource) => sum + Math.max(0, Number(resource.weight) || 0), 0) + : 0 + let assigned = 0 + resources.forEach((resource, index) => { + const isLast = index === resources.length - 1 + const next = isLast + ? roundWeight(safeTotal - assigned) + : roundWeight(sourceTotal > 0 + ? safeTotal * Math.max(0, Number(resource.weight) || 0) / sourceTotal + : safeTotal / resources.length) + resource.weight = next + assigned += next + }) +} + +function rebalanceImageWeights() { + const resources = sys.value?.config.imageResources + if (!resources?.length) return + if (resources.length === 1) { + resources[0].weight = 100 + resources[0].locked = false + return + } + const locked = resources.filter((resource) => resource.locked) + const unlocked = resources.filter((resource) => !resource.locked) + let lockedTotal = locked.reduce((sum, resource) => sum + Math.max(0, Number(resource.weight) || 0), 0) + if (lockedTotal > 100) { + distributeImageWeights(locked, 100, true) + lockedTotal = 100 + } + distributeImageWeights(unlocked, 100 - lockedTotal) +} + +function setResourceWeight(resourceId: number, value: number) { + const resources = sys.value?.config.imageResources + if (!resources?.length) return + if (resources.length === 1) { + resources[0].weight = 100 + resources[0].locked = false + return + } + const resource = resources.find((item) => item.id === resourceId) + if (!resource || resource.locked) return + const lockedTotal = resources + .filter((item) => item.id !== resourceId && item.locked) + .reduce((sum, item) => sum + Math.max(0, Number(item.weight) || 0), 0) + const available = Math.max(0, 100 - lockedTotal) + const others = resources.filter((item) => item.id !== resourceId && !item.locked) + resource.weight = roundWeight(Math.min(available, Math.max(0, Number(value) || 0))) + if (!others.length) { + resource.weight = roundWeight(available) + return + } + distributeImageWeights(others, available - resource.weight, true) +} + +function toggleResourceLock(resourceId: number) { + const resources = sys.value?.config.imageResources + if (!resources || resources.length === 1) return + const resource = resources.find((item) => item.id === resourceId) + if (resource) resource.locked = !resource.locked +} + + +return { textureFileInput, sequenceFileInput, pendingResourceId, trailTextureFileInput, pendingTrailResourceId, addTrailResource, openTrailTexturePicker, onTrailRigChange, onTrailResourceBoneCountChange, onTrailResourceRotationChange, onTrailTextureFile, resetTrailTexture, removeTrailResource, rebalanceTrailWeights, setTrailResourceWeight, toggleTrailResourceLock, setTrailColor, commitTrailColor, addImageResource, openTexturePicker, openSequencePicker, onTextureFile, onSequenceFiles, readFileAsDataUrl, resetTexture, normalizeHex, setResourceFixedColor, commitResourceFixedColor, removeImageResource, roundWeight, distributeImageWeights, rebalanceImageWeights, setResourceWeight, toggleResourceLock } +} +import { LINEAR_CURVE, FLAT_CURVE, ALPHA_CURVE, RESOURCE_ALPHA_CURVE, TRAIL_ALPHA_CURVE, TRAIL_SHAPE_CURVE } from './particlePanelCurves' diff --git a/src/views/particle-panel/useProjectPresets.ts b/src/views/particle-panel/useProjectPresets.ts new file mode 100644 index 0000000..849c0ed --- /dev/null +++ b/src/views/particle-panel/useProjectPresets.ts @@ -0,0 +1,106 @@ + +import { computed, markRaw, onBeforeUnmount, onMounted, reactive, ref, watch, watchEffect } from 'vue' +import { Texture } from 'pixi.js' +import { useParticleStore } from '../../store/particleStore' +import type { ParticleSystem } from '../../store/particleStore' +import { defaultConfig, ensureEmitterConfig } from '../../core/particleEmitter' +import NumSlider from '../NumSlider.vue' +import CurveEditor from '../CurveEditor.vue' +import ParticleAttributeControl from '../ParticleAttributeControl.vue' +import ColorGradientEditor from '../ColorGradientEditor.vue' +import ImageResourceCard from '../ImageResourceCard.vue' +import SpineObjectPanel from '../../spine/SpineObjectPanel.vue' +import { downloadEditorConfig, loadEditorConfigFile, loadEditorConfigText } from '../../editor/editorConfig' +import { beginTransfer, readResponseTextWithProgress } from '../../editor/transferProgress' +import { defaultSpineExportSettings, ensureSpineExportSettings } from '../../export/spineExportSettings' +import { buildSpineJson, downloadSpineJson } from '../../export/spineJsonExporter' +import { validateSpineJson } from '../../export/spineJsonValidator' +import { buildSpineImagesArchive, downloadSpineImagesArchive } from '../../export/spineImagesExporter' +import { + SpineConnectorError, + checkSpineConnector, + convertWithSpineConnector, + downloadSpineProject, + type SpineConnectorHealth, +} from '../../export/spineConnectorClient' +import { automaticLoopTransitionFrames } from '../../core/loopSegmentTiming' + + +export function useProjectPresets(store: ReturnType) { +const configFileInput = ref(null) +const selectedPreset = ref('') +const presetOptions = ref>([]) +const presetLoading = ref(false) +const configMessage = ref('') +const configError = ref(false) +function saveConfig() { + downloadEditorConfig(store) + configError.value = false + configMessage.value = '配置已保存到本地' +} + +async function onConfigFileChange(event: Event) { + const input = event.target as HTMLInputElement + const file = input.files?.[0] + if (!file) return + configMessage.value = '正在加载配置…' + configError.value = false + try { + await loadEditorConfigFile(store, file) + configMessage.value = `已加载:${file.name}` + } catch (error) { + configError.value = true + configMessage.value = error instanceof Error ? error.message : String(error) + } finally { + input.value = '' + } +} + +async function refreshPresets() { + try { + const response = await fetch(`/Preset/index.json?t=${Date.now()}`, { cache: 'no-store' }) + if (!response.ok) throw new Error('无法读取预设列表') + const presets = await response.json() + presetOptions.value = Array.isArray(presets) + ? presets.filter((item): item is { name: string; file: string } => !!item && typeof item.name === 'string' && typeof item.file === 'string') + : [] + } catch { + presetOptions.value = [] + } +} + +async function loadSelectedPreset() { + const file = selectedPreset.value + if (!file) return + presetLoading.value = true + configError.value = false + configMessage.value = '正在加载预设…' + const transfer = beginTransfer('加载预设', `正在下载 ${file}…`) + try { + await transfer.paint() + const response = await fetch(`/Preset/${encodeURIComponent(file)}`, { cache: 'no-store' }) + if (!response.ok) throw new Error(`无法读取预设:${file}`) + const text = await readResponseTextWithProgress(response, (progress) => { + transfer.update(progress == null ? null : progress * 55, `正在下载 ${file}…`) + }) + transfer.update(58, '正在解析预设配置…') + transfer.update(70, '正在解析并恢复预设资源…') + await loadEditorConfigText(store, text) + configMessage.value = `已加载预设:${file.replace(/\.json$/i, '')}` + await transfer.finish('预设加载完成') + } catch (error) { + configError.value = true + const message = error instanceof Error ? error.message : String(error) + configMessage.value = `${message},请检查预设文件命名` + await transfer.fail(message) + } finally { + presetLoading.value = false + selectedPreset.value = '' + } +} + + +onMounted(refreshPresets) + +return { configFileInput, selectedPreset, presetOptions, presetLoading, configMessage, configError, saveConfig, onConfigFileChange, refreshPresets, loadSelectedPreset } +} diff --git a/src/views/stage/axisGuides.ts b/src/views/stage/axisGuides.ts new file mode 100644 index 0000000..6d8124e --- /dev/null +++ b/src/views/stage/axisGuides.ts @@ -0,0 +1,102 @@ +import { Text, type Application, type Container, type Graphics } from 'pixi.js' +import type { Ref } from 'vue' +import type { useParticleStore, CollisionBody, ScenePath } from '../../store/particleStore' +import type { ParticleState } from '../../core/particleTypes' +import type { SpineRuntimeLayer } from '../../spine/SpineRuntimeLayer' +import type { BonePreview, SceneTransformTarget } from './stageTypes' +import { pathLocalToWorld } from './stageGeometry' +type EditorStore = ReturnType + +// 自适应刻度步进(仿时间轴):返回 1/2/5 序列里的最合适步长,保证屏幕间距合理 +export function niceStep(target: number, minStep = 0): number { + if (target <= 0) return 1 + const pow = Math.pow(10, Math.floor(Math.log10(target))) + const candidates = [1, 2, 5, 10, 20, 50, 100] + let best = 1 + for (const c of candidates) { + if (c * pow >= target) { best = c * pow; break } + } + return Math.max(best, minStep) +} + +// 画无限长 x/y 轴 + 自适应整数刻度 + 数值(0,0 在画布中心) +export function drawAxis(store: EditorStore, app: Application | null, axisGfx: Graphics | null, axisLabelLayer: Container | null, axisLabels: Text[]) { + if (!axisGfx) return + const g = axisGfx + g.clear() + const S = store.settings + if (!S.tickEnabled) { // 未启用刻度:隐藏整个坐标轴(轴+刻度+数值) + for (const t of axisLabels) t.visible = false + return + } + const cx = 0, cy = 0 // 世界原点(中心) + const halfW = app!.screen.width / store.editor.viewScale + const halfH = app!.screen.height / store.editor.viewScale + const axisColor = Number('0x' + S.axisColor.replace('#', '')) + // 轴线(贯穿到视口边缘外) + g.lineStyle(1.5, axisColor, 0.35) + g.moveTo(-halfW, cy); g.lineTo(halfW, cy) // x 轴 + g.moveTo(cx, -halfH); g.lineTo(cx, halfH) // y 轴 + // 刻度步进:目标 ~50px 一个刻度(世界单位 = px/viewScale) + const sc = store.editor.viewScale + const step = niceStep(50 / sc) + // 数值显示范围:只在中心 ±range 内标数值(避免远端堆积/干扰);范围随视口半宽 + const rangeW = halfW + const rangeH = halfH + // 刻度线(贯穿整个视口;仅启用刻度时画) + const tickW = Math.max(1, S.tickWidth) + if (S.tickEnabled) { + for (let x = 0; x <= halfW; x += step) { + const v = Math.round(x / step) * step + if (v === 0) continue + g.lineStyle(tickW, axisColor, 0.25) + g.moveTo(v, cy - 4); g.lineTo(v, cy + 4) + g.moveTo(-v, cy - 4); g.lineTo(-v, cy + 4) + } + for (let y = 0; y <= halfH; y += step) { + const v = Math.round(y / step) * step + if (v === 0) continue + g.lineStyle(tickW, axisColor, 0.25) + g.moveTo(cx - 4, y); g.lineTo(cx + 4, y) + g.moveTo(cx - 4, -y); g.lineTo(cx + 4, -y) + } + } + // 数值标签(文字放 axisLabelLayer,不随 world 缩放,尺寸/清晰度恒定) + // 只在中心 ±range 内标注数值,超出不显示,避免看不清/干扰 + const cxS = app!.screen.width / 2 + store.editor.viewX + const cyS = app!.screen.height * 0.5 + store.editor.viewY + const fs = S.axisFontSize // 字号由系统设置手动控制(默认 12px) + const labelColor = Number('0x' + S.axisColor.replace('#', '')) + while (axisLabels.length < 64) { + const t = new Text('', { fontFamily: 'monospace', fontSize: fs, fill: labelColor }) + t.anchor.set(0.5, 0.5) + axisLabelLayer!.addChild(t) + axisLabels.push(t) + } + let li = 0 + const showLbl = S.showAxisLabels && S.tickEnabled + // x 轴正/负数值(放在轴下方一点) + for (let x = 0; x <= halfW; x += step) { + const v = Math.round(x / step) * step + if (v === 0 || !showLbl || v > rangeW) continue + const lbl = axisLabels[li++]; if (!lbl) break + lbl.style.fontSize = fs + lbl.text = String(v); lbl.position.set(cxS + v * sc, cyS + 9); lbl.visible = true + const lvb = axisLabels[li++]; if (!lvb) break + lvb.style.fontSize = fs + lvb.text = String(-v); lvb.position.set(cxS - v * sc, cyS + 9); lvb.visible = true + } + // y 轴(数值放在轴右侧) + for (let y = 0; y <= halfH; y += step) { + const v = Math.round(y / step) * step + if (v === 0 || !showLbl || v > rangeH) continue + const lbl = axisLabels[li++]; if (!lbl) break + lbl.style.fontSize = fs + lbl.text = String(v); lbl.position.set(cxS + 8, cyS - y * sc); lbl.visible = true + const lvb = axisLabels[li++]; if (!lvb) break + lvb.style.fontSize = fs + lvb.text = String(-v); lvb.position.set(cxS + 8, cyS + y * sc); lvb.visible = true + } + // 隐藏多余标签 + while (li < axisLabels.length) { const t = axisLabels[li++]; if (t) t.visible = false } +} diff --git a/src/views/stage/boneGuides.ts b/src/views/stage/boneGuides.ts new file mode 100644 index 0000000..a487892 --- /dev/null +++ b/src/views/stage/boneGuides.ts @@ -0,0 +1,104 @@ +import type { Application, Container, Graphics, Text } from 'pixi.js' +import type { Ref } from 'vue' +import type { useParticleStore, CollisionBody, ScenePath } from '../../store/particleStore' +import type { ParticleState } from '../../core/particleTypes' +import type { SpineRuntimeLayer } from '../../spine/SpineRuntimeLayer' +import type { BonePreview, SceneTransformTarget } from './stageTypes' +import { pathLocalToWorld } from './stageGeometry' +type EditorStore = ReturnType + + +export function appendStateBones(target: BonePreview[], state: ParticleState, parentX: number, parentY: number) { + // 粒子快照同时保存局部坐标和烘焙世界坐标。骨骼调试图层挂在 world 下,必须使用 + // 世界坐标,才能与发生位移、旋转、缩放或跟随后的粒子保持逐点重合。 + const hasWorldPosition = Number.isFinite(state.worldX) && Number.isFinite(state.worldY) + const hasWorldRotation = Number.isFinite(state.worldRotation) + target.push({ + boneName: state.boneName, + x: hasWorldPosition ? state.worldX! : state.x, + y: hasWorldPosition ? -state.worldY! : state.y, + rotation: hasWorldRotation ? -state.worldRotation! : -state.rotation, + parentX, + parentY, + }) + if (!state.trailState?.bones.length) return + state.trailState.bones.forEach((bone) => { + // 导出结构中拖尾骨骼全部直接挂在粒子系统骨骼下,画布连线也保持同级语义。 + const hasBoneWorldPosition = Number.isFinite(bone.worldX) && Number.isFinite(bone.worldY) + const hasBoneWorldRotation = Number.isFinite(bone.worldRotation) + target.push({ + boneName: bone.boneName, + x: hasBoneWorldPosition ? bone.worldX! : bone.x, + y: hasBoneWorldPosition ? -bone.worldY! : bone.y, + rotation: hasBoneWorldRotation ? -bone.worldRotation! : bone.rotation, + parentX, + parentY, + trail: true, + }) + }) +} + + +export function drawDirectionalAxis( + g: Graphics, + x: number, + y: number, + directionX: number, + directionY: number, + length: number, + width: number, + color: number, +) { + const negativeLength = length * 0.62 + const tipX = x + directionX * length + const tipY = y + directionY * length + const headLength = Math.max(2.5, length * 0.32) + const headWidth = Math.max(1.7, length * 0.22) + const baseX = tipX - directionX * headLength + const baseY = tipY - directionY * headLength + const perpendicularX = -directionY + const perpendicularY = directionX + g.lineStyle(width, color, 0.95) + g.moveTo(x - directionX * negativeLength, y - directionY * negativeLength) + g.lineTo(baseX, baseY) + g.lineStyle(0) + g.beginFill(color, 0.95) + g.drawPolygon([ + tipX, tipY, + baseX + perpendicularX * headWidth, baseY + perpendicularY * headWidth, + baseX - perpendicularX * headWidth, baseY - perpendicularY * headWidth, + ]) + g.endFill() +} + + +export function drawBones(bones: BonePreview[], store: EditorStore, boneGfx: Graphics | null) { + if (!boneGfx) return + const g = boneGfx + g.clear() + if (!store.settings.showBones) return + const cx = 0, cy = 0 + const viewScale = Math.max(0.25, Math.abs(store.editor.viewScale) || 1) + const pointSize = Math.min(10, Math.max(0.1, Number(store.settings.bonePointDrawSize) || 1)) + const axisSize = Math.min(10, Math.max(0.1, Number(store.settings.boneAxisDrawSize) || 2)) + // 所有尺寸先定义为屏幕像素,再除以画布缩放,保证缩放画布时视觉大小不变。 + const pointRadius = 2.5 * pointSize / viewScale + const forwardLength = 4.5 * axisSize / viewScale + const forwardWidth = Math.max(0.65, axisSize * 0.625) / viewScale + // root → 每颗粒子骨骼 的连线 + for (const b of bones) { + const color = b.trail ? 0xff4d8d : 0xff8c5a + g.lineStyle(1, color, b.trail ? 0.65 : 0.35) + g.moveTo(b.parentX ?? cx, b.parentY ?? cy) + g.lineTo(b.x, b.y) + // 局部坐标轴为两根交叉轴线,仅在 +X、+Y 端绘制箭头。 + const angle = b.rotation * Math.PI / 180 + const cos = Math.cos(angle), sin = Math.sin(angle) + drawDirectionalAxis(g, b.x, b.y, cos, sin, forwardLength, forwardWidth, 0xef5350) + drawDirectionalAxis(g, b.x, b.y, sin, -cos, forwardLength, forwardWidth, 0x55c96b) + // 骨骼点 + g.beginFill(color, 0.9) + g.drawCircle(b.x, b.y, pointRadius) + g.endFill() + } +} diff --git a/src/views/stage/emitterGuides.ts b/src/views/stage/emitterGuides.ts new file mode 100644 index 0000000..4922a82 --- /dev/null +++ b/src/views/stage/emitterGuides.ts @@ -0,0 +1,160 @@ +import type { Application, Container, Graphics, Text } from 'pixi.js' +import type { Ref } from 'vue' +import type { useParticleStore, CollisionBody, ScenePath } from '../../store/particleStore' +import type { ParticleState } from '../../core/particleTypes' +import type { SpineRuntimeLayer } from '../../spine/SpineRuntimeLayer' +import type { BonePreview, SceneTransformTarget } from './stageTypes' +import { pathLocalToWorld } from './stageGeometry' +type EditorStore = ReturnType +import { normalizedRadialRange, normalizedRectRange } from '../../core/emitterShape' + + +export function drawOrigin(store: EditorStore, emitterPreviewTransform: Map, originGfx: Graphics | null) { + if (!originGfx) return + const g = originGfx + g.clear() + if (!store.settings.showEmitter) return + // 每个系统对应一个发射点(坐标点);没有系统时不画 + if (!store.systems.length) return + for (const sys of store.systems) { + if (sys.visible === false) continue + const preview = emitterPreviewTransform.get(sys.id) + const cx = preview?.x ?? sys.config.centerX ?? 0 + const cy = -(preview?.y ?? sys.config.centerY ?? 0) + const active = store.activeObjectType === 'particle' && sys.id === store.activeId + const col = active ? 0xffcc33 : 0x8a94b8 + const opacity = active ? 0.4 : 0.2 + g.lineStyle(1, col, opacity) + g.drawCircle(cx, cy, 10) + g.beginFill(col, active ? 0.8 : 0.4) + g.drawCircle(cx, cy, 3) + g.endFill() + g.lineStyle(1, col, active ? 0.3 : 0.15) + g.moveTo(cx - 16, cy); g.lineTo(cx + 16, cy) + g.moveTo(cx, cy - 16); g.lineTo(cx, cy + 16) + } +} + +// 绘制当前选中系统的发射器形状范围(点/路径不额外绘制),随参数实时响应。 +export function drawShapeRange(store: EditorStore, emitterPreviewTransform: Map, shapeGfx: Graphics | null) { + if (!shapeGfx) return + const g = shapeGfx + g.clear() + if (!store.settings.showEmitter) return + const sys = store.systems.find((s) => s.id === store.activeId) + if (!sys || sys.visible === false) return + const c = sys.config + const preview = emitterPreviewTransform.get(sys.id) + // root 中心(发射器容器 position = centerX/-centerY),数学坐标 + const cx = preview?.x ?? c.centerX ?? 0 + const cy = -(preview?.y ?? c.centerY ?? 0) + const shape = c.shape + if (shape === 'point' || shape === 'path') return + // 相对 root 中心的局部点(lx,ly,数学坐标)先加偏移(发射源 = root 中心 + offset),再应用 root 缩放+旋转,加 root 中心 → 世界坐标 + const sxr = c.rootScaleX ?? 1, syr = c.rootScaleY ?? 1 + const rot = -(preview?.rotation ?? c.rootRotation ?? 0) * Math.PI / 180 // 数学上正 → 屏幕:逆时针为正 + const cs = Math.cos(rot), sn = Math.sin(rot) + const oxo = c.offsetX ?? 0, oyo = c.offsetY ?? 0 + const pt = (lx: number, ly: number): [number, number] => { + // 对齐粒子:局部 y 为数学上正 → 屏幕取负;发射源偏移 offsetY(数学上正)→ 屏幕也取负 + const X = lx + oxo, Y = -ly - oyo + const x = X * sxr, y = Y * syr + return [cx + x * cs - y * sn, cy + (x * sn + y * cs)] + } + if (shape === 'circle') { + const range = normalizedRadialRange(c.innerRadius, c.outerRadius) + g.lineStyle(2, 0x3ce86a, 0.7) + // 圆环:以 root 变换后的椭圆近似(逐点) + const steps = 48 + for (const radius of [range.outer, range.inner]) { + if (radius <= 0) continue + for (let i = 0; i <= steps; i++) { + const a = i / steps * Math.PI * 2 + const [px, py] = pt(Math.cos(a) * radius, Math.sin(a) * radius) + if (i === 0) g.moveTo(px, py); else g.lineTo(px, py) + } + } + } else if (shape === 'rect') { + const range = normalizedRectRange(c) + g.lineStyle(2, 0x4a8cff, 0.7) + for (const [width, height] of [[range.outerW, range.outerH], [range.innerW, range.innerH]]) { + if (width <= 0 || height <= 0) continue + const hw = width / 2, hh = height / 2 + const p1 = pt(-hw, -hh), p2 = pt(hw, -hh), p3 = pt(hw, hh), p4 = pt(-hw, hh) + g.moveTo(p1[0], p1[1]); g.lineTo(p2[0], p2[1]); g.lineTo(p3[0], p3[1]); g.lineTo(p4[0], p4[1]); g.lineTo(p1[0], p1[1]) + } + } else if (shape === 'cone') { + const range = normalizedRadialRange(c.innerRadius, c.outerRadius) + const half = (c.coneAngle / 2) * Math.PI / 180 + const base = c.coneDirection * Math.PI / 180 + // 锥形环带的两条边、内弧和外弧。 + const innerEdge1 = pt(Math.cos(base - half) * range.inner, Math.sin(base - half) * range.inner) + const innerEdge2 = pt(Math.cos(base + half) * range.inner, Math.sin(base + half) * range.inner) + const outerEdge1 = pt(Math.cos(base - half) * range.outer, Math.sin(base - half) * range.outer) + const outerEdge2 = pt(Math.cos(base + half) * range.outer, Math.sin(base + half) * range.outer) + g.lineStyle(2, 0x3ce86a, 0.7) + g.moveTo(innerEdge1[0], innerEdge1[1]); g.lineTo(outerEdge1[0], outerEdge1[1]) + g.moveTo(innerEdge2[0], innerEdge2[1]); g.lineTo(outerEdge2[0], outerEdge2[1]) + g.lineStyle(1, 0x3ce86a, 0.5) + const steps = 24 + for (const radius of [range.outer, range.inner]) { + if (radius <= 0) continue + for (let i = 0; i <= steps; i++) { + const a = base - half + (2 * half * i / steps) + const [px, py] = pt(Math.cos(a) * radius, Math.sin(a) * radius) + if (i === 0) g.moveTo(px, py); else g.lineTo(px, py) + } + } + } +} + +/** 绘制当前选中系统的全局力场;不应用粒子系统 root 变换。 */ +export function drawForceField(store: EditorStore, forceFieldGfx: Graphics | null) { + if (!forceFieldGfx) return + const g = forceFieldGfx + g.clear() + const sys = store.systems.find((item) => item.id === store.activeId) + if (sys?.visible === false) return + const cfg = sys?.config + if (!cfg?.forceField || cfg.forceRadius <= 0) return + const x = cfg.forceCenterX + const y = -cfg.forceCenterY + const color = cfg.forceStrength >= 0 ? 0x58c7ff : 0xff6b7a + g.lineStyle(2, color, 0.85) + g.beginFill(color, 0.08) + g.drawCircle(x, y, cfg.forceRadius) + g.endFill() + g.lineStyle(1, color, 0.7) + g.moveTo(x - 9, y); g.lineTo(x + 9, y) + g.moveTo(x, y - 9); g.lineTo(x, y + 9) + g.beginFill(color, 0.95) + g.drawCircle(x, y, 4) + g.endFill() +} + +/** 绘制全局吸附点与吸附完成半径;半径为 0 时显示为红色点。 */ +export function drawAttraction(store: EditorStore, attractionGfx: Graphics | null) { + if (!attractionGfx) return + const g = attractionGfx + g.clear() + const sys = store.systems.find((item) => item.id === store.activeId) + if (sys?.visible === false) return + const cfg = sys?.config + if (!cfg?.attraction) return + const x = cfg.attractionCenterX + const y = -cfg.attractionCenterY + const radius = Math.max(0, cfg.attractionRadius) + const color = 0xff4d5f + if (radius > 0) { + g.lineStyle(2, color, 0.95) + g.beginFill(color, 0.09) + g.drawCircle(x, y, radius) + g.endFill() + } + g.lineStyle(1, color, 0.85) + g.moveTo(x - 10, y); g.lineTo(x + 10, y) + g.moveTo(x, y - 10); g.lineTo(x, y + 10) + g.beginFill(color, 1) + g.drawCircle(x, y, radius > 0 ? 4 : 6) + g.endFill() +} diff --git a/src/views/stage/sceneGuides.ts b/src/views/stage/sceneGuides.ts new file mode 100644 index 0000000..a513e64 --- /dev/null +++ b/src/views/stage/sceneGuides.ts @@ -0,0 +1,209 @@ +import type { Application, Container, Graphics, Text } from 'pixi.js' +import type { Ref } from 'vue' +import type { useParticleStore, CollisionBody, ScenePath } from '../../store/particleStore' +import type { ParticleState } from '../../core/particleTypes' +import type { SpineRuntimeLayer } from '../../spine/SpineRuntimeLayer' +import type { BonePreview, SceneTransformTarget } from './stageTypes' +import { pathLocalToWorld } from './stageGeometry' +type EditorStore = ReturnType + +/** 标出层级树当前选中的骨骼;发射器骨骼跟随复用同一目标点。 */ +export function drawBoneFollowTargets(store: EditorStore, spineRuntime: SpineRuntimeLayer | null, boneFollowTargetGfx: Graphics | null) { + if (!boneFollowTargetGfx) return + const g = boneFollowTargetGfx + g.parent?.addChild(g) + g.clear() + const targets = new Map() + for (const spine of store.spines) { + if (spine.visible === false || !spine.selectedBone || spine.status !== 'ready') continue + targets.set(`${spine.id}:${spine.selectedBone}`, { spineId: spine.id, boneName: spine.selectedBone }) + } + for (const system of store.systems) { + if (system.visible === false) continue + const config = system.config + if (!config.emitterFollow || config.emitterFollowMode !== 'bone') continue + if (!config.emitterFollowSpineId || !config.emitterFollowBoneName) continue + const spine = store.spines.find((item) => item.id === config.emitterFollowSpineId) + if (!spine || spine.visible === false) continue + targets.set(`${config.emitterFollowSpineId}:${config.emitterFollowBoneName}`, { + spineId: config.emitterFollowSpineId, + boneName: config.emitterFollowBoneName, + }) + } + for (const item of targets.values()) { + const target = spineRuntime?.getBoneWorldTransform(item.spineId, item.boneName) + if (!target) continue + const x = target.x + const y = -target.y + g.lineStyle(2, 0xc48cff, 0.95) + g.beginFill(0xc48cff, 0.2) + g.drawCircle(x, y, 8) + g.endFill() + g.beginFill(0xf2e7ff, 1) + g.drawCircle(x, y, 3.5) + g.endFill() + } +} + +// 当前场景对象的变换手柄:跟随其位置、旋转和缩放。 +export function drawGizmo(activeTool: Ref<'' | 'translate' | 'rotate' | 'scale'>, selectedTransformTarget: () => SceneTransformTarget | null, gizmoGfx: Graphics | null) { + if (!gizmoGfx) return + const g = gizmoGfx + g.clear() + if (!activeTool.value) return + const target = selectedTransformTarget() + if (!target) return + const cx = target.x + const cy = -target.y + const sxr = target.scaleX, syr = target.scaleY + const rot = -target.rotation * Math.PI / 180 + const cs = Math.cos(rot), sn = Math.sin(rot) + // 局部点(数学坐标,ly 上正) → 屏幕点(应用 root 缩放+旋转+平移到 root 中心) + const pt = (lx: number, ly: number): [number, number] => { + const x = lx * sxr, y = (-ly) * syr + return [cx + x * cs - y * sn, cy + (x * sn + y * cs)] + } + const line = (ax: number, ay: number, bx: number, by: number) => { + const a = pt(ax, ay), b = pt(bx, by) + g.moveTo(a[0], a[1]); g.lineTo(b[0], b[1]) + } + const R = 26 + // 中心点 + g.lineStyle(2, 0x35d0ff, 0.9) + g.beginFill(0x35d0ff, 0.25) + g.drawCircle(cx, cy, 6) + g.endFill() + if (activeTool.value === 'translate') { + // 十字箭头 + g.lineStyle(2, 0x35d0ff, 0.9) + line(-R, 0, R, 0); line(0, -R, 0, R) + line(R - 6, -4, R, 0); line(R, 0, R - 6, 4) // 右箭头 + line(-(R - 6), -4, -R, 0); line(-R, 0, -(R - 6), 4) // 左箭头 + line(-4, R - 6, 0, R); line(0, R, 4, R - 6) // 上箭头 + line(-4, -(R - 6), 0, -R); line(0, -R, 4, -(R - 6)) // 下箭头 + } else if (activeTool.value === 'rotate') { + // 旋转外圈(经缩放/旋转后可能是椭圆) + g.lineStyle(2, 0x35d0ff, 0.8) + const steps = 48 + for (let i = 0; i <= steps; i++) { + const a = i / steps * Math.PI * 2 + const [px, py] = pt(Math.cos(a) * R, Math.sin(a) * R) + if (i === 0) g.moveTo(px, py); else g.lineTo(px, py) + } + // 指向点:固定于局部顶部(0° 刻度在 12 点方向),经 pt(含 root 旋转)后随 rootRotation 旋转。 + // 默认(rootRotation=0)时指向点位于顶部;旋转时它随 root 一起转,反映当前旋转角。 + const [tx, ty] = pt(0, R) + g.beginFill(0x35d0ff, 0.95) + g.drawCircle(tx, ty, 4) + g.endFill() + } else if (activeTool.value === 'scale') { + // 四角方点(经缩放/旋转后为旋转矩形) + g.lineStyle(2, 0x35d0ff, 0.9) + const corners: [number, number][] = [[-R, -R], [R, -R], [R, R], [-R, R]] + const pts = corners.map(([ox, oy]) => pt(ox, oy)) + g.moveTo(pts[0][0], pts[0][1]); g.lineTo(pts[1][0], pts[1][1]); g.lineTo(pts[2][0], pts[2][1]); g.lineTo(pts[3][0], pts[3][1]); g.lineTo(pts[0][0], pts[0][1]) + g.beginFill(0x35d0ff, 0.9) + for (const p of pts) g.drawRect(p[0] - 3, p[1] - 3, 6, 6) + g.endFill() + } +} + + +export function colorNumber(value: string, fallback = 0xffffff) { + const parsed = Number.parseInt(value.replace('#', ''), 16) + return Number.isFinite(parsed) ? parsed : fallback +} + + +export function drawCollisionBodies(store: EditorStore, previewColliders: CollisionBody[], collisionGfx: Graphics | null) { + if (!collisionGfx) return + const g = collisionGfx + g.clear() + for (const collider of previewColliders) { + if (collider.visible === false) continue + const selected = store.activeObjectType === 'collision' && store.activeObjectId === collider.id + const color = collider.enabled ? (selected ? 0xff5e72 : 0xd4475b) : 0x586174 + const angle = collider.rotation * Math.PI / 180 + const cos = Math.cos(angle), sin = Math.sin(angle) + const scaleX = Math.max(0.0001, Math.abs(collider.scaleX ?? 1)) + const scaleY = Math.max(0.0001, Math.abs(collider.scaleY ?? 1)) + const point = (x: number, y: number) => ({ + x: collider.x + cos * x * scaleX - sin * y * scaleY, + y: -(collider.y + sin * x * scaleX + cos * y * scaleY), + }) + let points: Array<{ x: number; y: number }> = [] + if (collider.shape === 'circle' || collider.shape === 'ellipse') { + const radiusX = collider.shape === 'circle' ? collider.radius : collider.radiusX + const radiusY = collider.shape === 'circle' ? collider.radius : collider.radiusY + points = Array.from({ length: 49 }, (_, index) => { + const theta = index / 48 * Math.PI * 2 + return point(Math.cos(theta) * radiusX, Math.sin(theta) * radiusY) + }) + } else if (collider.shape === 'rect') { + const hw = collider.width * 0.5, hh = collider.height * 0.5 + points = [point(-hw, -hh), point(hw, -hh), point(hw, hh), point(-hw, hh), point(-hw, -hh)] + } else { + const sides = Math.max(3, Math.min(16, Math.round(collider.sides))) + points = Array.from({ length: sides + 1 }, (_, index) => { + const theta = Math.PI * 0.5 + (index % sides) / sides * Math.PI * 2 + return point(Math.cos(theta) * collider.width * 0.5, Math.sin(theta) * collider.height * 0.5) + }) + } + if (!points.length) continue + g.lineStyle(selected ? 2.5 : 1.5, color, collider.enabled ? 0.95 : 0.45) + g.beginFill(color, selected ? 0.12 : 0.055) + g.moveTo(points[0].x, points[0].y) + for (let i = 1; i < points.length; i++) g.lineTo(points[i].x, points[i].y) + g.endFill() + const center = point(0, 0) + g.lineStyle(1, color, 0.8) + g.moveTo(center.x - 7, center.y); g.lineTo(center.x + 7, center.y) + g.moveTo(center.x, center.y - 7); g.lineTo(center.x, center.y + 7) + } +} + + +export function drawPaths(store: EditorStore, selectedPathNodes: Set, pathGfx: Graphics | null) { + if (!pathGfx) return + const g = pathGfx + g.clear() + for (const path of store.paths) { + if (path.visible === false || !path.enabled || !path.points.length) continue + const selected = store.activeObjectType === 'path' && store.activeObjectId === path.id + const color = colorNumber(path.color, 0xff933e) + const screenPoint = (x: number, y: number) => { + const worldPoint = pathLocalToWorld(path, x, y) + return { x: worldPoint.x, y: -worldPoint.y } + } + const first = path.points[0] + const start = screenPoint(first.x, first.y) + g.lineStyle(selected ? 2.5 : 1.8, color, selected ? 1 : 0.75) + g.moveTo(start.x, start.y) + const segmentCount = path.closed ? path.points.length : path.points.length - 1 + for (let i = 0; i < segmentCount; i++) { + const a = path.points[i] + const b = path.points[(i + 1) % path.points.length] + const controlA = screenPoint(a.x + a.outX, a.y + a.outY) + const controlB = screenPoint(b.x + b.inX, b.y + b.inY) + const end = screenPoint(b.x, b.y) + g.bezierCurveTo(controlA.x, controlA.y, controlB.x, controlB.y, end.x, end.y) + } + if (!selected) continue + path.points.forEach((anchor, index) => { + const point = screenPoint(anchor.x, anchor.y) + const input = screenPoint(anchor.x + anchor.inX, anchor.y + anchor.inY) + const output = screenPoint(anchor.x + anchor.outX, anchor.y + anchor.outY) + const hasInput = Math.hypot(anchor.inX, anchor.inY) > 0.01 + const hasOutput = Math.hypot(anchor.outX, anchor.outY) > 0.01 + g.lineStyle(1, 0xa9b4cb, 0.65) + if (hasInput) { g.moveTo(point.x, point.y); g.lineTo(input.x, input.y) } + if (hasOutput) { g.moveTo(point.x, point.y); g.lineTo(output.x, output.y) } + if (hasInput) { g.beginFill(0xd5dcec, 0.95); g.drawCircle(input.x, input.y, 3); g.endFill() } + if (hasOutput) { g.beginFill(0xd5dcec, 0.95); g.drawCircle(output.x, output.y, 3); g.endFill() } + g.beginFill(selectedPathNodes.has(index) ? 0xffffff : color, 1) + g.lineStyle(1.5, selectedPathNodes.has(index) ? 0x5d7cff : 0xffffff, 0.95) + g.drawCircle(point.x, point.y, selectedPathNodes.has(index) ? 5 : 4) + g.endFill() + }) + } +} diff --git a/src/views/stage/stageGeometry.ts b/src/views/stage/stageGeometry.ts new file mode 100644 index 0000000..40d2dd6 --- /dev/null +++ b/src/views/stage/stageGeometry.ts @@ -0,0 +1,56 @@ +import type { ScenePath } from '../../store/particleStore' + + +export function pathLocalToWorld(path: ScenePath, x: number, y: number) { + const angle = path.rotation * Math.PI / 180 + const cos = Math.cos(angle), sin = Math.sin(angle) + const scaleX = Math.max(0.0001, Math.abs(path.scaleX ?? 1)) + const scaleY = Math.max(0.0001, Math.abs(path.scaleY ?? 1)) + return { x: path.x + cos * x * scaleX - sin * y * scaleY, y: path.y + sin * x * scaleX + cos * y * scaleY } +} + + +export function worldToPathLocal(path: ScenePath, x: number, y: number) { + const angle = path.rotation * Math.PI / 180 + const cos = Math.cos(angle), sin = Math.sin(angle) + const scaleX = Math.max(0.0001, Math.abs(path.scaleX ?? 1)) + const scaleY = Math.max(0.0001, Math.abs(path.scaleY ?? 1)) + const dx = x - path.x, dy = y - path.y + return { x: (cos * dx + sin * dy) / scaleX, y: (-sin * dx + cos * dy) / scaleY } +} + + +export type FollowCurvePoint = { x: number; y: number; inX?: number; inY?: number; outX?: number; outY?: number } + + +export function followCurveValue(points: FollowCurvePoint[], t: number, mode: 'linear' | 'bezier' = 'linear') { + if (!points.length) return t + const sorted = [...points].sort((a, b) => a.x - b.x) + if (t <= sorted[0].x) return sorted[0].y + for (let index = 1; index < sorted.length; index++) { + const a = sorted[index - 1], b = sorted[index] + if (t <= b.x) { + let amount = (t - a.x) / Math.max(0.0001, b.x - a.x) + if (mode === 'bezier') { + const x1 = a.x + (a.outX ?? (b.x - a.x) / 3) + const x2 = b.x + (b.inX ?? -(b.x - a.x) / 3) + let low = 0, high = 1 + for (let step = 0; step < 18; step++) { + const middle = (low + high) / 2 + if (cubicPoint(a.x, x1, x2, b.x, middle) < t) low = middle + else high = middle + } + amount = (low + high) / 2 + return cubicPoint(a.y, a.y + (a.outY ?? (b.y - a.y) / 3), b.y + (b.inY ?? -(b.y - a.y) / 3), b.y, amount) + } + return a.y + (b.y - a.y) * amount + } + } + return sorted[sorted.length - 1].y +} + + +export function cubicPoint(a: number, b: number, c: number, d: number, t: number) { + const u = 1 - t + return u * u * u * a + 3 * u * u * t * b + 3 * u * t * t * c + t * t * t * d +} diff --git a/src/views/stage/stageTypes.ts b/src/views/stage/stageTypes.ts new file mode 100644 index 0000000..4911eb4 --- /dev/null +++ b/src/views/stage/stageTypes.ts @@ -0,0 +1,15 @@ + +// 粒子→骨骼映射:每个活动粒子 = 一根挂在 root 下的骨骼 +export type BonePreview = { boneName: string; x: number; y: number; rotation: number; parentX?: number; parentY?: number; trail?: boolean } + + +export type SceneTransformTarget = { + x: number + y: number + rotation: number + scaleX: number + scaleY: number + setPosition: (x: number, y: number) => void + setRotation: (rotation: number) => void + setScale: (scaleX: number, scaleY: number) => void +}