ss-component-new 1.2.60 → 1.2.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MTLLoader-gdzQR_Hk.js → MTLLoader-6dpEXEoM.js} +1 -1
- package/dist/{MTLLoader-Bd8gswVO.cjs → MTLLoader-DVChBUrC.cjs} +1 -1
- package/dist/{OrbitControls-DrQG0WwG.js → OrbitControls-A_plVV3e.js} +1 -1
- package/dist/{OrbitControls-BDr3JwU7.cjs → OrbitControls-xWQZ-wvG.cjs} +1 -1
- package/dist/{animationData-BebPFu1o.js → animationData-BEBKknNp.js} +9 -9
- package/dist/{animationData-DZnytjR7.cjs → animationData-BIfCWFVI.cjs} +1 -1
- package/dist/{array-mkPvdkqz.js → array-Cq7rTgXG.js} +2 -2
- package/dist/{array-CsVIMexm.cjs → array-b4FP8aZn.cjs} +1 -1
- package/dist/{iconfont-sA0TqvpZ.js → iconfont-1_Xg-HNl.js} +2 -2
- package/dist/{iconfont-B2jKfn1c.cjs → iconfont-Brcrml_b.cjs} +1 -1
- package/dist/{index-BdoWr55z.js → index-2MJjXq7j.js} +22 -19
- package/dist/{index-DunWx7gk.js → index-6F8WEiYt.js} +3 -3
- package/dist/{index-BawiQHQM.js → index-6J4fvuHJ.js} +5 -5
- package/dist/{index-BAgQCn1y.cjs → index-B3s_4mdp.cjs} +1 -1
- package/dist/{index-BLXYg9Gs.js → index-B9XXiADi.js} +5 -5
- package/dist/index-BGECN58Q.cjs +1 -0
- package/dist/{index-CUqOGOM4.js → index-BXG4Yb5F.js} +1 -1
- package/dist/{index-BIOzO44u.js → index-BfE8W0rM.js} +1 -1
- package/dist/{index-6A1xf0Gs.cjs → index-Bi-Hgx5I.cjs} +1 -1
- package/dist/{index-DjQZE_pv.cjs → index-Bme2fgY2.cjs} +1 -1
- package/dist/{index-B-zqezDR.cjs → index-Br_V6DEt.cjs} +1 -1
- package/dist/{index-4M7aervZ.cjs → index-Bs0IeOGt.cjs} +1 -1
- package/dist/{index-DVNrIedZ.js → index-C6SCoM0U.js} +1 -1
- package/dist/{index-Duh5yc_7.js → index-CDwjVO-f.js} +11 -11
- package/dist/{index-D_FAvCkR.cjs → index-CKGcC7Sl.cjs} +1 -1
- package/dist/{index-Do_4Y2BA.js → index-CM9d4w9b.js} +935 -924
- package/dist/{index-BcGarjC7.js → index-CMSFCx0H.js} +2 -2
- package/dist/{index-fv_bHYEK.cjs → index-CORFgvAn.cjs} +1 -1
- package/dist/{index-DI5DRRI8.cjs → index-CQPp7ebN.cjs} +1 -1
- package/dist/{index-CK_bms-m.js → index-CZ9IolXA.js} +245 -243
- package/dist/{index-CaubJFHG.cjs → index-CmjpPvm7.cjs} +1 -1
- package/dist/{index-DgW_swZz.cjs → index-CqCzv-z2.cjs} +1 -1
- package/dist/{index-Dq9ppmM1.js → index-Cqh1Z_rw.js} +4 -4
- package/dist/{index-DXiQ5JKb.js → index-CvYPprNL.js} +1128 -1150
- package/dist/{index-CX2C-kjD.cjs → index-CxUHJyzF.cjs} +1 -1
- package/dist/{index-ajVsMnUs.js → index-CyuAoOEv.js} +9 -9
- package/dist/{index-DZ3LdxA8.cjs → index-D3JrrrRS.cjs} +1 -1
- package/dist/{index-CBHRkOa4.js → index-D9Aj2jkk.js} +1 -1
- package/dist/{index-C6nEcr6G.js → index-DMRIbCVi.js} +1 -1
- package/dist/{index-BkJkmkcq.cjs → index-DN3lLfOK.cjs} +1 -1
- package/dist/{index-CF3dfQ01.cjs → index-DNbT4lhP.cjs} +1 -1
- package/dist/{index-DA4aTMB5.js → index-DO71W01m.js} +1 -1
- package/dist/{index-YhC-PbE3.js → index-DOF9o3os.js} +1 -1
- package/dist/{index-ChdWnuTS.cjs → index-DUHVLIj4.cjs} +1 -1
- package/dist/{index-CRvxI1hr.cjs → index-DVFgpAHw.cjs} +1 -1
- package/dist/{index-BoVvgAUF.cjs → index-DYTa3_UA.cjs} +1 -1
- package/dist/index-Dac7flbp.cjs +1 -0
- package/dist/index-DaeE5po7.cjs +1 -0
- package/dist/{index-DwblLa_P.cjs → index-DcP7YN6o.cjs} +1 -1
- package/dist/{index-BDOF1BPC.cjs → index-DmCKmSZ8.cjs} +1 -1
- package/dist/{index-CF9id9ro.cjs → index-DoFO6pNf.cjs} +13 -13
- package/dist/{index-Ce_gZ72y.js → index-DpnFkInY.js} +119 -115
- package/dist/{index-vPR31-Zk.js → index-DwyFMS6t.js} +2 -2
- package/dist/{index-MHgc1J83.cjs → index-DyjHw7Aq.cjs} +1 -1
- package/dist/{index-DmLuog-V.js → index-ELz-W-bk.js} +3 -3
- package/dist/{index-GbPoL1UR.js → index-Ia_qBF1W.js} +2 -2
- package/dist/{index-RhIBaFyU.cjs → index-RZNNLVDX.cjs} +1 -1
- package/dist/{index-3F5KjCbv.cjs → index-TzEEZML5.cjs} +1 -1
- package/dist/{index-DG0upY6_.js → index-bYz-38Pg.js} +2 -2
- package/dist/{index-DNnfnoYc.cjs → index-bkkSLeCW.cjs} +1 -1
- package/dist/{index-BhEeRp0f.js → index-cak-MWxh.js} +2 -2
- package/dist/{index-DLiM284R.cjs → index-d6OMvbbf.cjs} +1 -1
- package/dist/{index-BIHEqwHC.js → index-eaVFuuQY.js} +1 -1
- package/dist/{index-DuXxVHLY.js → index-i5E9fwgK.js} +2 -2
- package/dist/{index-ClCw6ykP.js → index-mexa9g7P.js} +2 -2
- package/dist/{index-BqPYebkC.js → index-yCgi-cE_.js} +2 -2
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-53RGRguQ.cjs +37 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DVp62_ZP.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DE66pEiw.js} +13674 -13601
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CHavLvPk.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-6dwbeVvZ.cjs} +32 -32
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BL1cikD3.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CR3BgnHp.js} +1077 -1072
- package/dist/index.vue_vue_type_style_index_0_scoped_46e2f5ea_lang-C7mPL9em.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_46e2f5ea_lang-lQ5Z8rzq.js +256 -0
- package/dist/{index.vue_vue_type_style_index_1_lang-CChX6Zmx.js → index.vue_vue_type_style_index_1_lang-B2AZ-uBp.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_1_lang-B5nfyDvl.cjs → index.vue_vue_type_style_index_1_lang-B4xPEmq7.cjs} +1 -1
- package/dist/{main-CIXVap1M.js → main-BV2OQjAQ.js} +4 -4
- package/dist/{main-e1Q2-l7w.cjs → main-CBFaoDu5.cjs} +1 -1
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +10 -10
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +11 -11
- package/dist/{threeModel-cKQrxO3d.js → threeModel-aUrTN1iR.js} +4 -4
- package/dist/{threeModel-UBx8eTMe.cjs → threeModel-gEf2z_O_.cjs} +1 -1
- package/dist/{threePreview-D35fdkMP.js → threePreview-BlLP3fdq.js} +3 -3
- package/dist/{threePreview-BAJ00HhJ.cjs → threePreview-DP22q4N7.cjs} +1 -1
- package/dist/{threeSceneView-BZenUkiZ.js → threeSceneView-VUC2kd3Y.js} +11 -11
- package/dist/{threeSceneView-OEime_CV.cjs → threeSceneView-yEuULwHw.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-zeiEQd6_.js → threeSceneViewForCPMPIP-BnzoymFs.js} +9 -9
- package/dist/{threeSceneViewForCPMPIP-C044dPvs.cjs → threeSceneViewForCPMPIP-ClXb0-Vx.cjs} +1 -1
- package/dist/{threeTrackPathView-CHosxM5O.js → threeTrackPathView-BfEMI8TE.js} +4 -4
- package/dist/{threeTrackPathView-DdZ_W87m.cjs → threeTrackPathView-CNZxWCSD.cjs} +1 -1
- package/dist/{threeViewerHost-Co0U6v_d.js → threeViewerHost-BPoG1mR3.js} +2091 -2127
- package/dist/{threeViewerHost-Ba-SeQ6m.cjs → threeViewerHost-Yk0yIs7L.cjs} +36 -36
- package/dist/{urdfTree-DkWqLWnt.cjs → urdfTree-Br4ILtBO.cjs} +1 -1
- package/dist/{urdfTree-CtpNr38F.js → urdfTree-W_JRFTfP.js} +1 -1
- package/dist/{workpieceTreePanel-DimwJSXC.js → workpieceTreePanel-B9KXsBHy.js} +5 -5
- package/dist/{workpieceTreePanel-BPsnvq9b.cjs → workpieceTreePanel-CCTEZMHn.cjs} +1 -1
- package/package.json +1 -1
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/index-Ch_Cm24f.cjs +0 -1
- package/dist/index-Ck3lmJpc.cjs +0 -1
- package/dist/index-aTpWvup6.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DF-onWE-.cjs +0 -37
- package/dist/index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-B60JZATD.js +0 -195
- package/dist/index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-zIOhigw2.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("vue"),be=require("./index-BpPyaNFa.cjs"),u=require("./index-C8qRkCgn.cjs"),qe=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-6dwbeVvZ.cjs"),oe=require("./index-CxUHJyzF.cjs"),Fe=require("./index-CmjpPvm7.cjs"),Re=require("vue-router"),b=require("./index-9hspBVrQ.cjs"),we=require("./index-DaeE5po7.cjs"),Ke=require("./index-B3s_4mdp.cjs"),R=a.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DoFO6pNf.cjs")).then(C=>C.index));R.install=C=>{C.component("ssMenu",R)};const ie={__name:"index",props:{name:String},setup(C){const U=C,w=a.computed(()=>u.ElIcons[U.name]);return a.onMounted(()=>{}),(q,K)=>{const c=a.resolveComponent("el-icon");return a.openBlock(),a.createBlock(c,null,{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(w.value)))]),_:1})}}};function ne(C="menu"){return{name:C,components:{SvgIcon:be.SvgIcon,ssMenu:R,DynamicIcon:ie,ssDialog:Fe.ssDialog},setup(U,{emit:w}){const q=a.defineProps({mode:{type:String,default:"vertical"}}),K=a.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),c=oe.useMenuState(),j=oe.useModelComp(u.pinia),$=a.ref(0),S=Re.useRouter(),{asideMenus:ce,menuTriggerType:pe,platform:fe}=u.storeToRefs(c),he=a.computed(()=>q==null?void 0:q.mode),z=s=>s==null?void 0:s.map(e=>{var t,l;return!(e!=null&&e.children)||((t=e==null?void 0:e.children)==null?void 0:t.length)===0?e.config=K.value:e!=null&&e.children&&((l=e==null?void 0:e.children)==null?void 0:l.length)>0&&(e.children=z(e.children)),e}),H=a.computed(()=>{let s=[...ce.value];if((s==null?void 0:s.length)===0)return S.push("/"),[];const r=Ce(s,ye.value);return r.isFlag||(s=r==null?void 0:r.data),s=s==null?void 0:s.map(e=>{var t,l;return!(e!=null&&e.children)||((t=e==null?void 0:e.children)==null?void 0:t.length)===0?e.config=K.value:e!=null&&e.children&&((l=e==null?void 0:e.children)==null?void 0:l.length)>0&&(e.children=z(e.children)),e}),s}),de=async(s,r)=>{j.setRouteToChildPath(""),c.setMenuTriggerType("click"),c.setActiveMenuPath(s==null?void 0:s.path),c.setActiveAsideMenu(s),s.isRouter?S.push(s.path):S.push("/"),w("node-click",s,r)},ue=async s=>{const r=u.findNodeByPropInTree(H.value,"path",s);c.setActiveAsideMenu(r),j.setRouteToChildPath(""),pe.value==="click"?$.value===1?c.setActiveMenuPath(sessionStorage.getItem("pageKey")):c.setActiveMenuPath(s):(c.setMenuTriggerType("click"),c.setActiveMenuPath(s)),s!=null&&s.startsWith("/")?S.push(s):S.push("/"),$.value++},ve=s=>{c.setActiveMenuPath(s)},D=s=>{const r=document.documentElement;s==null||s.forEach(e=>{r.style.setProperty(e.name,e.value)})};a.onMounted(()=>{$.value=1});const ye=a.computed(()=>{const s=sessionStorage.getItem("authority");return s?JSON.parse(s):[]});a.watch(()=>fe.value,s=>{s==="browser"?D(b.browserVerticalMenuClasses):s==="client"?(D(b.clientHorizontalMenuClasses),D(b.clientVerticalMenuClasses)):s==="three"&&(D(b.threeHorizontalMenuClasses),D(b.threeVerticalMenuClasses))},{immediate:!0});const ge=(s,r)=>{function e(t){t==null||t.forEach(l=>{var d,_;const i=(d=l==null?void 0:l.path)!=null&&d.startsWith("/")?(_=l==null?void 0:l.path)==null?void 0:_.substring(1):l==null?void 0:l.path;l.show=r==null?void 0:r.some(g=>g==null?void 0:g.includes(i)),l.children&&e(l.children)})}return e(s),s},Ce=(s,r)=>{if(Array.isArray(r)){const e=Array.from(new Set(r==null?void 0:r.map(t=>t.substring(0,t.lastIndexOf("/")))));return{data:ge(s,e),isFlag:!1}}else return{isFlag:(r==null?void 0:r.toUpperCase())==="SUPERADMIN"}},y=a.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),_e=s=>we.getComponent(s),Ie=a.ref({}),Me=a.ref([]),m=a.ref({}),A=a.ref({}),De=s=>{switch(s){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},W=a.ref({}),Ae=s=>{c.setCacheInputMenu({type:y.type,data:s}),c.setIsRefreshMenus(!0)},J=(s,r,e=0)=>{let t=s;return t!=null&&t.every(l=>Array.isArray(l))&&(t!=null&&t.every(l=>Array.isArray(l)&&l.length===1)?t=t==null?void 0:t.filter(l=>(l==null?void 0:l[0])!==(r==null?void 0:r[e])):t=t==null?void 0:t.map(l=>{if(l!=null&&l.find(i=>i===(r==null?void 0:r[e]))&&(r==null?void 0:r.length)!==1){let i=u.cloneDeep(r),d=l==null?void 0:l.filter(n=>n!==(i==null?void 0:i[e])),_=l==null?void 0:l.findIndex(n=>n===(i==null?void 0:i[e])),g=e+1,p=J(d,i,g);p!=null&&p.every(n=>Array.isArray(n)&&(n==null?void 0:n.length)===1)?p=p==null?void 0:p.map(n=>n==null?void 0:n[0]):p=p==null?void 0:p[0],p!=null&&p.some(n=>Array.isArray(n))?l=l==null?void 0:l.map((n,F)=>(F===_+1&&(n=p),n)):l=[l==null?void 0:l[0],p]}return l})),t},ke=async(s,r,e)=>{var t,l,i,d,_,g,p,n,F,L,O,G,Q,X,Y,Z;if(r!=="create"){if(r!=="update"){if(r==="delete"){let I=await u.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:e==null?void 0:e.path}}),x=await u.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),v=(l=(t=x==null?void 0:x.data)==null?void 0:t.result)==null?void 0:l[0],k=(i=v==null?void 0:v.value)==null?void 0:i.pageData;if(k.compData=(d=k.compData)==null?void 0:d.map(h=>{var f;return(h==null?void 0:h.key)==="menuContents"&&(h.contents=J(h.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"))),h}),await u.updateInsofDataApi({id:v==null?void 0:v.id,value:{pageData:k}}),((g=(_=I==null?void 0:I.data)==null?void 0:_.result)==null?void 0:g.length)>0){let h=(n=(p=I==null?void 0:I.data)==null?void 0:p.result)==null?void 0:n.map(f=>f==null?void 0:f.id);await u.batchDeleteInsofDataApi({ids:h})}else{let h=await qe.getItemData((O=(L=(F=e==null?void 0:e.path)==null?void 0:F.split("/"))==null?void 0:L.filter((M,B)=>{var T,P;return B!==((P=(T=e==null?void 0:e.path)==null?void 0:T.split("/"))==null?void 0:P.length)-1}))==null?void 0:O.join("/"),sessionStorage.getItem("systemKey"),""),f=[];h==null||h.forEach(M=>{var T,P,V,N,ee,se,le;let B=(N=(V=(P=(T=M==null?void 0:M.compData)==null?void 0:T.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:P.contents)==null?void 0:V[0])==null?void 0:N.prop;(le=(se=(ee=M==null?void 0:M.compData)==null?void 0:ee.find(o=>(o==null?void 0:o.key)==="tableContents"))==null?void 0:se.contents)==null||le.forEach(o=>{var re,te,ae;(o==null?void 0:o.length)>1?(o==null?void 0:o[1])===(e==null?void 0:e.title)&&f.push((re=o==null?void 0:o[0])==null?void 0:re.id):((te=o==null?void 0:o[0])==null?void 0:te[B])===(e==null?void 0:e.title)&&f.push((ae=o==null?void 0:o[0])==null?void 0:ae.id)})}),(f==null?void 0:f.length)>0&&await u.batchDeleteInsofDataApi({ids:f})}}}}c.setUpdateMenuStatus(!1),await Ke.verifyStructureDataToStore(),c.setActiveMenuPath((X=(Q=(G=e==null?void 0:e.path)==null?void 0:G.split("/"))==null?void 0:Q.filter((I,x)=>{var v,k;return x!==((k=(v=e==null?void 0:e.path)==null?void 0:v.split("/"))==null?void 0:k.length)-1}))==null?void 0:X.join("/")),c.setActiveTopMenuPath((Z=(Y=e==null?void 0:e.path)==null?void 0:Y.split("/"))==null?void 0:Z[0]),c.setIsRefreshMenus(!1),c.setIsRefreshMenus(!0)},Se=async(s,r)=>{y.type=De(r==null?void 0:r.operateType),await ke(r,y.type,s),A.value=s,W.value=r},me=()=>{y.show=!1},xe=s=>s==null?void 0:s.filter(r=>r.allowInherit),Te=()=>{var e,t,l,i,d;let s;y.type==="create"&&(s=((e=A.value)==null?void 0:e.path)+"/"+m.value[(t=m.value)==null?void 0:t.prop]),y.type==="update"&&(s=(l=A.value)==null?void 0:l.path);const r={...A.value,config:xe((i=A.value)==null?void 0:i.config),children:[],childMenus:[],title:m.value[(d=m.value)==null?void 0:d.prop],path:s};console.log("clickSubmitForm",W.value,A.value,r),Ae(r),y.show=!1},Pe=s=>{var e,t;const r=(e=s==null?void 0:s.contents)==null?void 0:e.find(l=>l.key==="formContent");r&&(m.value=(t=r==null?void 0:r.contents)==null?void 0:t.reduce((l,i)=>(l[i.key]=i.value,l.prop=i.key,l),{}))},E=a.ref(!1);return{isCollapse:E,handleMenuCollapse:()=>{E.value=!E.value},handleCompChange:Pe,dialogForm:Ie,dialogRenderComps:Me,getComponents:_e,clickSubmitForm:Te,dialogInfo:y,beforeDialogDestroy:me,clickMenuIcon:Se,mode:he,renderMenuList:H,clickMenu:de,openMenu:ue,closeMenu:ve,changeMenuStyle:D}}}}const $e=a.defineComponent(ne());exports._sfc_main=$e;exports._sfc_main$1=ie;exports.setComponent=ne;exports.ssMenu=R;
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { defineAsyncComponent as we, computed as w, onMounted as ne, resolveComponent as Re, createBlock as te, openBlock as oe, withCtx as xe, resolveDynamicComponent as Ke, defineComponent as Ee, defineProps as Be, ref as u, watch as Ue, reactive as je } from "vue";
|
|
2
|
+
import { S as ze } from "./index-BHtNKL1L.js";
|
|
3
|
+
import { bO as He, p as Oe, s as We, bN as Je, g as ie, d as Le, e as ce, c as $e } from "./index-DsSA-OiE.js";
|
|
4
|
+
import { g as qe } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CR3BgnHp.js";
|
|
5
|
+
import { u as Ge, a as Qe } from "./index-DpnFkInY.js";
|
|
6
|
+
import { s as Xe } from "./index-D9Aj2jkk.js";
|
|
7
|
+
import { useRouter as Ye } from "vue-router";
|
|
8
|
+
import { a as Ze, e as Ve, f as Ne, g as es, h as ss } from "./index-CAPx0_D4.js";
|
|
9
|
+
import { g as as } from "./index-CyuAoOEv.js";
|
|
10
|
+
import { v as ls } from "./index-BXG4Yb5F.js";
|
|
11
|
+
const U = we(() => import("./index-CM9d4w9b.js").then((g) => g.j));
|
|
12
|
+
U.install = (g) => {
|
|
13
|
+
g.component("ssMenu", U);
|
|
14
|
+
};
|
|
15
|
+
const rs = {
|
|
16
|
+
__name: "index",
|
|
17
|
+
props: {
|
|
18
|
+
name: String
|
|
19
|
+
},
|
|
20
|
+
setup(g) {
|
|
21
|
+
const j = g, R = w(() => He[j.name]);
|
|
22
|
+
return ne(() => {
|
|
23
|
+
}), (P, x) => {
|
|
24
|
+
const c = Re("el-icon");
|
|
25
|
+
return oe(), te(c, null, {
|
|
26
|
+
default: xe(() => [
|
|
27
|
+
(oe(), te(Ke(R.value)))
|
|
28
|
+
]),
|
|
29
|
+
_: 1
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
function ts(g = "menu") {
|
|
35
|
+
return {
|
|
36
|
+
name: g,
|
|
37
|
+
components: {
|
|
38
|
+
SvgIcon: ze,
|
|
39
|
+
ssMenu: U,
|
|
40
|
+
DynamicIcon: rs,
|
|
41
|
+
ssDialog: Xe
|
|
42
|
+
},
|
|
43
|
+
setup(j, { emit: R }) {
|
|
44
|
+
const P = Be({
|
|
45
|
+
mode: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "vertical"
|
|
48
|
+
}
|
|
49
|
+
}), x = u([
|
|
50
|
+
{
|
|
51
|
+
allowInherit: !1,
|
|
52
|
+
operateType: "复制新增",
|
|
53
|
+
operateIcon: "CopyAddMenu"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
allowInherit: !1,
|
|
57
|
+
operateType: "删除",
|
|
58
|
+
operateIcon: "DeleteMenu"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
allowInherit: !1,
|
|
62
|
+
operateType: "修改菜单名",
|
|
63
|
+
operateIcon: "FixedMenu"
|
|
64
|
+
}
|
|
65
|
+
]), c = Ge(), z = Qe(Oe), K = u(0), S = Ye(), { asideMenus: pe, menuTriggerType: fe, platform: he } = We(c), de = w(() => P == null ? void 0 : P.mode), H = (s) => s == null ? void 0 : s.map((e) => {
|
|
66
|
+
var r, a;
|
|
67
|
+
return !(e != null && e.children) || ((r = e == null ? void 0 : e.children) == null ? void 0 : r.length) === 0 ? e.config = x.value : e != null && e.children && ((a = e == null ? void 0 : e.children) == null ? void 0 : a.length) > 0 && (e.children = H(e.children)), e;
|
|
68
|
+
}), O = w(() => {
|
|
69
|
+
let s = [...pe.value];
|
|
70
|
+
if ((s == null ? void 0 : s.length) === 0)
|
|
71
|
+
return S.push("/"), [];
|
|
72
|
+
const l = Ce(s, ge.value);
|
|
73
|
+
return l.isFlag || (s = l == null ? void 0 : l.data), s = s == null ? void 0 : s.map((e) => {
|
|
74
|
+
var r, a;
|
|
75
|
+
return !(e != null && e.children) || ((r = e == null ? void 0 : e.children) == null ? void 0 : r.length) === 0 ? e.config = x.value : e != null && e.children && ((a = e == null ? void 0 : e.children) == null ? void 0 : a.length) > 0 && (e.children = H(e.children)), e;
|
|
76
|
+
}), s;
|
|
77
|
+
}), ve = async (s, l) => {
|
|
78
|
+
z.setRouteToChildPath(""), c.setMenuTriggerType("click"), c.setActiveMenuPath(s == null ? void 0 : s.path), c.setActiveAsideMenu(s), s.isRouter ? S.push(s.path) : S.push("/"), R("node-click", s, l);
|
|
79
|
+
}, ye = async (s) => {
|
|
80
|
+
const l = Je(O.value, "path", s);
|
|
81
|
+
c.setActiveAsideMenu(l), z.setRouteToChildPath(""), fe.value === "click" ? K.value === 1 ? c.setActiveMenuPath(sessionStorage.getItem("pageKey")) : c.setActiveMenuPath(s) : (c.setMenuTriggerType("click"), c.setActiveMenuPath(s)), s != null && s.startsWith("/") ? S.push(s) : S.push("/"), K.value++;
|
|
82
|
+
}, ue = (s) => {
|
|
83
|
+
c.setActiveMenuPath(s);
|
|
84
|
+
}, M = (s) => {
|
|
85
|
+
const l = document.documentElement;
|
|
86
|
+
s == null || s.forEach((e) => {
|
|
87
|
+
l.style.setProperty(e.name, e.value);
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
ne(() => {
|
|
91
|
+
K.value = 1;
|
|
92
|
+
});
|
|
93
|
+
const ge = w(() => {
|
|
94
|
+
const s = sessionStorage.getItem("authority");
|
|
95
|
+
return s ? JSON.parse(s) : [];
|
|
96
|
+
});
|
|
97
|
+
Ue(
|
|
98
|
+
() => he.value,
|
|
99
|
+
(s) => {
|
|
100
|
+
s === "browser" ? M(Ze) : s === "client" ? (M(Ve), M(Ne)) : s === "three" && (M(es), M(ss));
|
|
101
|
+
},
|
|
102
|
+
{ immediate: !0 }
|
|
103
|
+
);
|
|
104
|
+
const me = (s, l) => {
|
|
105
|
+
function e(r) {
|
|
106
|
+
r == null || r.forEach((a) => {
|
|
107
|
+
var h, m;
|
|
108
|
+
const o = (h = a == null ? void 0 : a.path) != null && h.startsWith("/") ? (m = a == null ? void 0 : a.path) == null ? void 0 : m.substring(1) : a == null ? void 0 : a.path;
|
|
109
|
+
a.show = l == null ? void 0 : l.some((y) => y == null ? void 0 : y.includes(o)), a.children && e(a.children);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return e(s), s;
|
|
113
|
+
}, Ce = (s, l) => {
|
|
114
|
+
if (Array.isArray(l)) {
|
|
115
|
+
const e = Array.from(new Set(l == null ? void 0 : l.map((r) => r.substring(0, r.lastIndexOf("/")))));
|
|
116
|
+
return {
|
|
117
|
+
data: me(s, e),
|
|
118
|
+
isFlag: !1
|
|
119
|
+
};
|
|
120
|
+
} else
|
|
121
|
+
return {
|
|
122
|
+
isFlag: (l == null ? void 0 : l.toUpperCase()) === "SUPERADMIN"
|
|
123
|
+
};
|
|
124
|
+
}, v = je({
|
|
125
|
+
show: !1,
|
|
126
|
+
title: "菜单配置",
|
|
127
|
+
width: "30%",
|
|
128
|
+
type: "create"
|
|
129
|
+
}), Ie = (s) => as(s), Me = u({}), Ae = u([]), k = u({}), A = u({}), De = (s) => {
|
|
130
|
+
switch (s) {
|
|
131
|
+
case "复制新增":
|
|
132
|
+
return "create";
|
|
133
|
+
case "修改菜单名":
|
|
134
|
+
return "update";
|
|
135
|
+
case "删除":
|
|
136
|
+
return "delete";
|
|
137
|
+
}
|
|
138
|
+
}, W = u({}), Se = (s) => {
|
|
139
|
+
c.setCacheInputMenu({
|
|
140
|
+
type: v.type,
|
|
141
|
+
data: s
|
|
142
|
+
}), c.setIsRefreshMenus(!0);
|
|
143
|
+
}, J = (s, l, e = 0) => {
|
|
144
|
+
let r = s;
|
|
145
|
+
return r != null && r.every((a) => Array.isArray(a)) && (r != null && r.every((a) => Array.isArray(a) && a.length === 1) ? r = r == null ? void 0 : r.filter((a) => (a == null ? void 0 : a[0]) !== (l == null ? void 0 : l[e])) : r = r == null ? void 0 : r.map((a) => {
|
|
146
|
+
if (a != null && a.find((o) => o === (l == null ? void 0 : l[e])) && (l == null ? void 0 : l.length) !== 1) {
|
|
147
|
+
let o = $e(l), h = a == null ? void 0 : a.filter((i) => i !== (o == null ? void 0 : o[e])), m = a == null ? void 0 : a.findIndex((i) => i === (o == null ? void 0 : o[e])), y = e + 1, n = J(h, o, y);
|
|
148
|
+
n != null && n.every((i) => Array.isArray(i) && (i == null ? void 0 : i.length) === 1) ? n = n == null ? void 0 : n.map((i) => i == null ? void 0 : i[0]) : n = n == null ? void 0 : n[0], n != null && n.some((i) => Array.isArray(i)) ? a = a == null ? void 0 : a.map((i, F) => (F === m + 1 && (i = n), i)) : a = [a == null ? void 0 : a[0], n];
|
|
149
|
+
}
|
|
150
|
+
return a;
|
|
151
|
+
})), r;
|
|
152
|
+
}, ke = async (s, l, e) => {
|
|
153
|
+
var r, a, o, h, m, y, n, i, F, L, $, q, G, Q, X, Y;
|
|
154
|
+
if (l !== "create") {
|
|
155
|
+
if (l !== "update") {
|
|
156
|
+
if (l === "delete") {
|
|
157
|
+
let C = await ie({
|
|
158
|
+
key: {
|
|
159
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
160
|
+
pageKey: e == null ? void 0 : e.path
|
|
161
|
+
}
|
|
162
|
+
}), _ = await ie({
|
|
163
|
+
key: {
|
|
164
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
165
|
+
pageKey: "menu"
|
|
166
|
+
}
|
|
167
|
+
}), d = (a = (r = _ == null ? void 0 : _.data) == null ? void 0 : r.result) == null ? void 0 : a[0], D = (o = d == null ? void 0 : d.value) == null ? void 0 : o.pageData;
|
|
168
|
+
if (D.compData = (h = D.compData) == null ? void 0 : h.map((f) => {
|
|
169
|
+
var p;
|
|
170
|
+
return (f == null ? void 0 : f.key) === "menuContents" && (f.contents = J(f.contents, (p = e == null ? void 0 : e.path) == null ? void 0 : p.split("/"))), f;
|
|
171
|
+
}), await Le({
|
|
172
|
+
id: d == null ? void 0 : d.id,
|
|
173
|
+
value: {
|
|
174
|
+
pageData: D
|
|
175
|
+
}
|
|
176
|
+
}), ((y = (m = C == null ? void 0 : C.data) == null ? void 0 : m.result) == null ? void 0 : y.length) > 0) {
|
|
177
|
+
let f = (i = (n = C == null ? void 0 : C.data) == null ? void 0 : n.result) == null ? void 0 : i.map((p) => p == null ? void 0 : p.id);
|
|
178
|
+
await ce({
|
|
179
|
+
ids: f
|
|
180
|
+
});
|
|
181
|
+
} else {
|
|
182
|
+
let f = await qe(($ = (L = (F = e == null ? void 0 : e.path) == null ? void 0 : F.split("/")) == null ? void 0 : L.filter((I, B) => {
|
|
183
|
+
var T, b;
|
|
184
|
+
return B !== ((b = (T = e == null ? void 0 : e.path) == null ? void 0 : T.split("/")) == null ? void 0 : b.length) - 1;
|
|
185
|
+
})) == null ? void 0 : $.join("/"), sessionStorage.getItem("systemKey"), ""), p = [];
|
|
186
|
+
f == null || f.forEach((I) => {
|
|
187
|
+
var T, b, Z, V, N, ee, se;
|
|
188
|
+
let B = (V = (Z = (b = (T = I == null ? void 0 : I.compData) == null ? void 0 : T.find((t) => (t == null ? void 0 : t.key) === "header")) == null ? void 0 : b.contents) == null ? void 0 : Z[0]) == null ? void 0 : V.prop;
|
|
189
|
+
(se = (ee = (N = I == null ? void 0 : I.compData) == null ? void 0 : N.find((t) => (t == null ? void 0 : t.key) === "tableContents")) == null ? void 0 : ee.contents) == null || se.forEach((t) => {
|
|
190
|
+
var ae, le, re;
|
|
191
|
+
(t == null ? void 0 : t.length) > 1 ? (t == null ? void 0 : t[1]) === (e == null ? void 0 : e.title) && p.push((ae = t == null ? void 0 : t[0]) == null ? void 0 : ae.id) : ((le = t == null ? void 0 : t[0]) == null ? void 0 : le[B]) === (e == null ? void 0 : e.title) && p.push((re = t == null ? void 0 : t[0]) == null ? void 0 : re.id);
|
|
192
|
+
});
|
|
193
|
+
}), (p == null ? void 0 : p.length) > 0 && await ce({
|
|
194
|
+
ids: p
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
c.setUpdateMenuStatus(!1), await ls(), c.setActiveMenuPath((Q = (G = (q = e == null ? void 0 : e.path) == null ? void 0 : q.split("/")) == null ? void 0 : G.filter((C, _) => {
|
|
201
|
+
var d, D;
|
|
202
|
+
return _ !== ((D = (d = e == null ? void 0 : e.path) == null ? void 0 : d.split("/")) == null ? void 0 : D.length) - 1;
|
|
203
|
+
})) == null ? void 0 : Q.join("/")), c.setActiveTopMenuPath((Y = (X = e == null ? void 0 : e.path) == null ? void 0 : X.split("/")) == null ? void 0 : Y[0]), c.setIsRefreshMenus(!1), c.setIsRefreshMenus(!0);
|
|
204
|
+
}, _e = async (s, l) => {
|
|
205
|
+
v.type = De(l == null ? void 0 : l.operateType), await ke(l, v.type, s), A.value = s, W.value = l;
|
|
206
|
+
}, Te = () => {
|
|
207
|
+
v.show = !1;
|
|
208
|
+
}, be = (s) => s == null ? void 0 : s.filter((l) => l.allowInherit), Pe = () => {
|
|
209
|
+
var e, r, a, o, h;
|
|
210
|
+
let s;
|
|
211
|
+
v.type === "create" && (s = ((e = A.value) == null ? void 0 : e.path) + "/" + k.value[(r = k.value) == null ? void 0 : r.prop]), v.type === "update" && (s = (a = A.value) == null ? void 0 : a.path);
|
|
212
|
+
const l = {
|
|
213
|
+
...A.value,
|
|
214
|
+
//是否继承父菜单的配置
|
|
215
|
+
config: be((o = A.value) == null ? void 0 : o.config),
|
|
216
|
+
children: [],
|
|
217
|
+
childMenus: [],
|
|
218
|
+
title: k.value[(h = k.value) == null ? void 0 : h.prop],
|
|
219
|
+
path: s
|
|
220
|
+
};
|
|
221
|
+
console.log("clickSubmitForm", W.value, A.value, l), Se(l), v.show = !1;
|
|
222
|
+
}, Fe = (s) => {
|
|
223
|
+
var e, r;
|
|
224
|
+
const l = (e = s == null ? void 0 : s.contents) == null ? void 0 : e.find((a) => a.key === "formContent");
|
|
225
|
+
l && (k.value = (r = l == null ? void 0 : l.contents) == null ? void 0 : r.reduce((a, o) => (a[o.key] = o.value, a.prop = o.key, a), {}));
|
|
226
|
+
}, E = u(!1);
|
|
227
|
+
return {
|
|
228
|
+
isCollapse: E,
|
|
229
|
+
handleMenuCollapse: () => {
|
|
230
|
+
E.value = !E.value;
|
|
231
|
+
},
|
|
232
|
+
handleCompChange: Fe,
|
|
233
|
+
dialogForm: Me,
|
|
234
|
+
dialogRenderComps: Ae,
|
|
235
|
+
getComponents: Ie,
|
|
236
|
+
clickSubmitForm: Pe,
|
|
237
|
+
dialogInfo: v,
|
|
238
|
+
beforeDialogDestroy: Te,
|
|
239
|
+
clickMenuIcon: _e,
|
|
240
|
+
mode: de,
|
|
241
|
+
renderMenuList: O,
|
|
242
|
+
clickMenu: ve,
|
|
243
|
+
openMenu: ye,
|
|
244
|
+
closeMenu: ue,
|
|
245
|
+
changeMenuStyle: M
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
const gs = Ee(ts());
|
|
251
|
+
export {
|
|
252
|
+
gs as _,
|
|
253
|
+
rs as a,
|
|
254
|
+
U as b,
|
|
255
|
+
ts as s
|
|
256
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { S as Y3, O as t1, M as n1 } from "./MTLLoader-
|
|
2
|
-
import { bD as D2, am as G2, a7 as a1, a8 as O1, a9 as U1, V as _3, O as q3, ay as _1, S as P2, ai as j1, C as o1, Q as U3, aG as C1, bE as $2, J as V3, aP as J3, w as C3, ab as J2, K as O3, aQ as D1, P as T1, aE as W2, D as K2, ad as Y2, F as X2, E as Z2, U as j3, af as G1, aM as H1, aO as Q2, _ as c1, aU as T3, aH as e6, ax as r1, aA as t6, z as N3, a0 as P1, aB as n6, aF as s6, as as W3, au as E1, bF as i6, bG as a6, bH as V1, bI as o6, bJ as r6, bK as c6, bL as l6, bM as $1, bN as d6, bO as h6, N as u6, bP as f6, av as J1, aD as W1, Y as p6, B as m6, ak as B1, bQ as b6 } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
3
|
-
import { d as g6 } from "./threeViewerHost-
|
|
1
|
+
import { S as Y3, O as t1, M as n1 } from "./MTLLoader-6dpEXEoM.js";
|
|
2
|
+
import { bD as D2, am as G2, a7 as a1, a8 as O1, a9 as U1, V as _3, O as q3, ay as _1, S as P2, ai as j1, C as o1, Q as U3, aG as C1, bE as $2, J as V3, aP as J3, w as C3, ab as J2, K as O3, aQ as D1, P as T1, aE as W2, D as K2, ad as Y2, F as X2, E as Z2, U as j3, af as G1, aM as H1, aO as Q2, _ as c1, aU as T3, aH as e6, ax as r1, aA as t6, z as N3, a0 as P1, aB as n6, aF as s6, as as W3, au as E1, bF as i6, bG as a6, bH as V1, bI as o6, bJ as r6, bK as c6, bL as l6, bM as $1, bN as d6, bO as h6, N as u6, bP as f6, av as J1, aD as W1, Y as p6, B as m6, ak as B1, bQ as b6 } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CR3BgnHp.js";
|
|
3
|
+
import { d as g6 } from "./threeViewerHost-BPoG1mR3.js";
|
|
4
4
|
import { b as s1, s as y6, p as w6 } from "./index-DsSA-OiE.js";
|
|
5
5
|
import { ref as v6 } from "vue";
|
|
6
|
-
import { a as z6 } from "./index-
|
|
6
|
+
import { a as z6 } from "./index-DpnFkInY.js";
|
|
7
7
|
class q1 extends D2 {
|
|
8
8
|
/**
|
|
9
9
|
* Constructs a new TGA loader.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const T3=require("./MTLLoader-Bd8gswVO.cjs"),a=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CHavLvPk.cjs"),u2=require("./threeViewerHost-Ba-SeQ6m.cjs"),q3=require("./index-C8qRkCgn.cjs"),f2=require("vue"),p2=require("./index-CX2C-kjD.cjs");class u1 extends a.DataTextureLoader{constructor(_){super(_)}parse(_){function P(x){switch(x.image_type){case $:case V:if(x.colormap_length>256||x.colormap_size!==24||x.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case h:case o:case z:case y:if(x.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case h3:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+x.image_type)}if(x.width<=0||x.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(x.pixel_size!==8&&x.pixel_size!==16&&x.pixel_size!==24&&x.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+x.pixel_size)}function R(x,o3,i3,Q,u3){let Z,s3;const W=i3.pixel_size>>3,D=i3.width*i3.height*W;if(o3&&(s3=u3.subarray(Q,Q+=i3.colormap_length*(i3.colormap_size>>3))),x){Z=new Uint8Array(D);let S,M,B,a3=0;const v=new Uint8Array(W);for(;a3<D;)if(S=u3[Q++],M=(S&127)+1,S&128){for(B=0;B<W;++B)v[B]=u3[Q++];for(B=0;B<M;++B)Z.set(v,a3+B*W);a3+=W*M}else{for(M*=W,B=0;B<M;++B)Z[a3+B]=u3[Q++];a3+=M}}else Z=u3.subarray(Q,Q+=o3?i3.width*i3.height:D);return{pixel_data:Z,palettes:s3}}function l(x,o3,i3,Q,u3,Z,s3,W,D){const S=D;let M,B=0,a3,v;const K=G.width;for(v=o3;v!==Q;v+=i3)for(a3=u3;a3!==s3;a3+=Z,B++)M=W[B],x[(a3+K*v)*4+3]=255,x[(a3+K*v)*4+2]=S[M*3+0],x[(a3+K*v)*4+1]=S[M*3+1],x[(a3+K*v)*4+0]=S[M*3+2];return x}function N(x,o3,i3,Q,u3,Z,s3,W){let D,S=0,M,B;const a3=G.width;for(B=o3;B!==Q;B+=i3)for(M=u3;M!==s3;M+=Z,S+=2)D=W[S+0]+(W[S+1]<<8),x[(M+a3*B)*4+0]=(D&31744)>>7,x[(M+a3*B)*4+1]=(D&992)>>2,x[(M+a3*B)*4+2]=(D&31)<<3,x[(M+a3*B)*4+3]=D&32768?0:255;return x}function J(x,o3,i3,Q,u3,Z,s3,W){let D=0,S,M;const B=G.width;for(M=o3;M!==Q;M+=i3)for(S=u3;S!==s3;S+=Z,D+=3)x[(S+B*M)*4+3]=255,x[(S+B*M)*4+2]=W[D+0],x[(S+B*M)*4+1]=W[D+1],x[(S+B*M)*4+0]=W[D+2];return x}function F(x,o3,i3,Q,u3,Z,s3,W){let D=0,S,M;const B=G.width;for(M=o3;M!==Q;M+=i3)for(S=u3;S!==s3;S+=Z,D+=4)x[(S+B*M)*4+2]=W[D+0],x[(S+B*M)*4+1]=W[D+1],x[(S+B*M)*4+0]=W[D+2],x[(S+B*M)*4+3]=W[D+3];return x}function X(x,o3,i3,Q,u3,Z,s3,W){let D,S=0,M,B;const a3=G.width;for(B=o3;B!==Q;B+=i3)for(M=u3;M!==s3;M+=Z,S++)D=W[S],x[(M+a3*B)*4+0]=D,x[(M+a3*B)*4+1]=D,x[(M+a3*B)*4+2]=D,x[(M+a3*B)*4+3]=255;return x}function l3(x,o3,i3,Q,u3,Z,s3,W){let D=0,S,M;const B=G.width;for(M=o3;M!==Q;M+=i3)for(S=u3;S!==s3;S+=Z,D+=2)x[(S+B*M)*4+0]=W[D+0],x[(S+B*M)*4+1]=W[D+0],x[(S+B*M)*4+2]=W[D+0],x[(S+B*M)*4+3]=W[D+1];return x}function d3(x,o3,i3,Q,u3){let Z,s3,W,D,S,M;switch((G.flags&p)>>f){default:case I:Z=0,W=1,S=o3,s3=0,D=1,M=i3;break;case L:Z=0,W=1,S=o3,s3=i3-1,D=-1,M=-1;break;case O:Z=o3-1,W=-1,S=-1,s3=0,D=1,M=i3;break;case g:Z=o3-1,W=-1,S=-1,s3=i3-1,D=-1,M=-1;break}if(Y)switch(G.pixel_size){case 8:X(x,s3,D,M,Z,W,S,Q);break;case 16:l3(x,s3,D,M,Z,W,S,Q);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(G.pixel_size){case 8:l(x,s3,D,M,Z,W,S,Q,u3);break;case 16:N(x,s3,D,M,Z,W,S,Q);break;case 24:J(x,s3,D,M,Z,W,S,Q);break;case 32:F(x,s3,D,M,Z,W,S,Q);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return x}const h3=0,$=1,h=2,o=3,V=9,z=10,y=11,p=48,f=4,L=0,g=1,I=2,O=3;if(_.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let u=0;const b=new Uint8Array(_),G={id_length:b[u++],colormap_type:b[u++],image_type:b[u++],colormap_index:b[u++]|b[u++]<<8,colormap_length:b[u++]|b[u++]<<8,colormap_size:b[u++],origin:[b[u++]|b[u++]<<8,b[u++]|b[u++]<<8],width:b[u++]|b[u++]<<8,height:b[u++]|b[u++]<<8,pixel_size:b[u++],flags:b[u++]};if(P(G),G.id_length+u>_.length)throw new Error("THREE.TGALoader: No data.");u+=G.id_length;let U=!1,H=!1,Y=!1;switch(G.image_type){case V:U=!0,H=!0;break;case $:H=!0;break;case z:U=!0;break;case h:break;case y:U=!0,Y=!0;break;case o:Y=!0;break}const A3=new Uint8Array(G.width*G.height*4),g3=R(U,H,G,u,b);return d3(A3,G.width,G.height,g3.pixel_data,g3.palettes),{data:A3,width:G.width,height:G.height,flipY:!0,generateMipmaps:!0,minFilter:a.LinearMipmapLinearFilter}}}class m2 extends a.Loader{load(_,P,R,l){const N=this,J=N.path===""?a.LoaderUtils.extractUrlBase(_):N.path,F=new a.FileLoader(N.manager);F.setPath(N.path),F.setRequestHeader(N.requestHeader),F.setWithCredentials(N.withCredentials),F.load(_,function(X){try{P(N.parse(X,J))}catch(l3){l?l(l3):console.error(l3),N.manager.itemError(_)}},R,l)}parse(_,P){function R(t,e){const i=[],n=t.childNodes;for(let s=0,r=n.length;s<r;s++){const c=n[s];c.nodeName===e&&i.push(c)}return i}function l(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return i}function N(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseFloat(e[n]);return i}function J(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseInt(e[n]);return i}function F(t){return t.substring(1)}function X(){return"three_default_"+d2++}function l3(t){return Object.keys(t).length===0}function d3(t){return{unit:h3(R(t,"unit")[0]),upAxis:$(R(t,"up_axis")[0])}}function h3(t){return t!==void 0&&t.hasAttribute("meter")===!0?parseFloat(t.getAttribute("meter")):1}function $(t){return t!==void 0?t.textContent:"Y_UP"}function h(t,e,i,n){const s=R(t,e)[0];if(s!==void 0){const r=R(s,i);for(let c=0;c<r.length;c++)n(r[c])}}function o(t,e){for(const i in t){const n=t[i];n.build=e(t[i])}}function V(t,e){return t.build!==void 0||(t.build=e(t)),t.build}function z(t){const e={sources:{},samplers:{},channels:{}};let i=!1;for(let n=0,s=t.childNodes.length;n<s;n++){const r=t.childNodes[n];if(r.nodeType!==1)continue;let c;switch(r.nodeName){case"source":c=r.getAttribute("id"),e.sources[c]=j3(r);break;case"sampler":c=r.getAttribute("id"),e.samplers[c]=y(r);break;case"channel":c=r.getAttribute("target"),e.channels[c]=p(r);break;case"animation":z(r),i=!0;break;default:console.log(r)}}i===!1&&(j.animations[t.getAttribute("id")||a.MathUtils.generateUUID()]=e)}function y(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=F(s.getAttribute("source")),c=s.getAttribute("semantic");e.inputs[c]=r;break}}return e}function p(t){const e={};let n=t.getAttribute("target").split("/");const s=n.shift();let r=n.shift();const c=r.indexOf("(")!==-1,A=r.indexOf(".")!==-1;if(A)n=r.split("."),r=n.shift(),e.member=n.shift();else if(c){const m=r.split("(");r=m.shift();for(let w=0;w<m.length;w++)m[w]=parseInt(m[w].replace(/\)/,""));e.indices=m}return e.id=s,e.sid=r,e.arraySyntax=c,e.memberSyntax=A,e.sampler=F(t.getAttribute("source")),e}function f(t){const e=[],i=t.channels,n=t.samplers,s=t.sources;for(const r in i)if(i.hasOwnProperty(r)){const c=i[r],A=n[c.sampler],m=A.inputs.INPUT,w=A.inputs.OUTPUT,T=s[m],d=s[w],C=g(c,T,d);G(C,e)}return e}function L(t){return V(j.animations[t],f)}function g(t,e,i){const n=j.nodes[t.id],s=B3(n.id),r=n.transforms[t.sid],c=n.matrix.clone().transpose();let A,m,w,T,d,C;const k={};switch(r){case"matrix":for(w=0,T=e.array.length;w<T;w++)if(A=e.array[w],m=w*i.stride,k[A]===void 0&&(k[A]={}),t.arraySyntax===!0){const m3=i.array[m],c3=t.indices[0]+4*t.indices[1];k[A][c3]=m3}else for(d=0,C=i.stride;d<C;d++)k[A][d]=i.array[m+d];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',r);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',r);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',r);break}const q=I(k,c);return{name:s.uuid,keyframes:q}}function I(t,e){const i=[];for(const s in t)i.push({time:parseFloat(s),value:t[s]});i.sort(n);for(let s=0;s<16;s++)U(i,s,e.elements[s]);return i;function n(s,r){return s.time-r.time}}const O=new a.Vector3,u=new a.Vector3,b=new a.Quaternion;function G(t,e){const i=t.keyframes,n=t.name,s=[],r=[],c=[],A=[];for(let m=0,w=i.length;m<w;m++){const T=i[m],d=T.time,C=T.value;N3.fromArray(C).transpose(),N3.decompose(O,b,u),s.push(d),r.push(O.x,O.y,O.z),c.push(b.x,b.y,b.z,b.w),A.push(u.x,u.y,u.z)}return r.length>0&&e.push(new a.VectorKeyframeTrack(n+".position",s,r)),c.length>0&&e.push(new a.QuaternionKeyframeTrack(n+".quaternion",s,c)),A.length>0&&e.push(new a.VectorKeyframeTrack(n+".scale",s,A)),e}function U(t,e,i){let n,s=!0,r,c;for(r=0,c=t.length;r<c;r++)n=t[r],n.value[e]===void 0?n.value[e]=null:s=!1;if(s===!0)for(r=0,c=t.length;r<c;r++)n=t[r],n.value[e]=i;else H(t,e)}function H(t,e){let i,n;for(let s=0,r=t.length;s<r;s++){const c=t[s];if(c.value[e]===null){if(i=Y(t,s,e),n=A3(t,s,e),i===null){c.value[e]=n.value[e];continue}if(n===null){c.value[e]=i.value[e];continue}g3(c,i,n,e)}}}function Y(t,e,i){for(;e>=0;){const n=t[e];if(n.value[i]!==null)return n;e--}return null}function A3(t,e,i){for(;e<t.length;){const n=t[e];if(n.value[i]!==null)return n;e++}return null}function g3(t,e,i,n){if(i.time-e.time===0){t.value[n]=e.value[n];return}t.value[n]=(t.time-e.time)*(i.value[n]-e.value[n])/(i.time-e.time)+e.value[n]}function x(t){const e={name:t.getAttribute("id")||"default",start:parseFloat(t.getAttribute("start")||0),end:parseFloat(t.getAttribute("end")||0),animations:[]};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_animation":e.animations.push(F(s.getAttribute("url")));break}}j.clips[t.getAttribute("id")]=e}function o3(t){const e=[],i=t.name,n=t.end-t.start||-1,s=t.animations;for(let r=0,c=s.length;r<c;r++){const A=L(s[r]);for(let m=0,w=A.length;m<w;m++)e.push(A[m])}return new a.AnimationClip(i,n,e)}function i3(t){return V(j.clips[t],o3)}function Q(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"skin":e.id=F(s.getAttribute("source")),e.skin=u3(s);break;case"morph":e.id=F(s.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}j.controllers[t.getAttribute("id")]=e}function u3(t){const e={sources:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"bind_shape_matrix":e.bindShapeMatrix=N(s.textContent);break;case"source":const r=s.getAttribute("id");e.sources[r]=j3(s);break;case"joints":e.joints=Z(s);break;case"vertex_weights":e.vertexWeights=s3(s);break}}return e}function Z(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=s.getAttribute("semantic"),c=F(s.getAttribute("source"));e.inputs[r]=c;break}}return e}function s3(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=s.getAttribute("semantic"),c=F(s.getAttribute("source")),A=parseInt(s.getAttribute("offset"));e.inputs[r]={id:c,offset:A};break;case"vcount":e.vcount=J(s.textContent);break;case"v":e.v=J(s.textContent);break}}return e}function W(t){const e={id:t.id},i=j.geometries[e.id];return t.skin!==void 0&&(e.skin=D(t.skin),i.sources.skinIndices=e.skin.indices,i.sources.skinWeights=e.skin.weights),e}function D(t){const i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},n=t.sources,s=t.vertexWeights,r=s.vcount,c=s.v,A=s.inputs.JOINT.offset,m=s.inputs.WEIGHT.offset,w=t.sources[t.joints.inputs.JOINT],T=t.sources[t.joints.inputs.INV_BIND_MATRIX],d=n[s.inputs.WEIGHT.id].array;let C=0,k,q,E;for(k=0,E=r.length;k<E;k++){const c3=r[k],t3=[];for(q=0;q<c3;q++){const n3=c[C+A],H3=c[C+m],k3=d[H3];t3.push({index:n3,weight:k3}),C+=2}for(t3.sort(m3),q=0;q<4;q++){const n3=t3[q];n3!==void 0?(i.indices.array.push(n3.index),i.weights.array.push(n3.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}for(t.bindShapeMatrix?i.bindMatrix=new a.Matrix4().fromArray(t.bindShapeMatrix).transpose():i.bindMatrix=new a.Matrix4().identity(),k=0,E=w.array.length;k<E;k++){const c3=w.array[k],t3=new a.Matrix4().fromArray(T.array,k*T.stride).transpose();i.joints.push({name:c3,boneInverse:t3})}return i;function m3(c3,t3){return t3.weight-c3.weight}}function S(t){return V(j.controllers[t],W)}function M(t){const e={init_from:R(t,"init_from")[0].textContent};j.images[t.getAttribute("id")]=e}function B(t){return t.build!==void 0?t.build:t.init_from}function a3(t){const e=j.images[t];return e!==void 0?V(e,B):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",t),null)}function v(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"profile_COMMON":e.profile=K(s);break}}j.effects[t.getAttribute("id")]=e}function K(t){const e={surfaces:{},samplers:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"newparam":e3(s,e);break;case"technique":e.technique=r3(s);break;case"extra":e.extra=p3(s);break}}return e}function e3(t,e){const i=t.getAttribute("sid");for(let n=0,s=t.childNodes.length;n<s;n++){const r=t.childNodes[n];if(r.nodeType===1)switch(r.nodeName){case"surface":e.surfaces[i]=f3(r);break;case"sampler2D":e.samplers[i]=x3(r);break}}}function f3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"init_from":e.init_from=s.textContent;break}}return e}function x3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"source":e.source=s.textContent;break}}return e}function r3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"constant":case"lambert":case"blinn":case"phong":e.type=s.nodeName,e.parameters=z3(s);break;case"extra":e.extra=p3(s);break}}return e}function z3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":e[s.nodeName]=L3(s);break;case"transparent":e[s.nodeName]={opaque:s.hasAttribute("opaque")?s.getAttribute("opaque"):"A_ONE",data:L3(s)};break}}return e}function L3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":e[s.nodeName]=N(s.textContent);break;case"float":e[s.nodeName]=parseFloat(s.textContent);break;case"texture":e[s.nodeName]={id:s.getAttribute("texture"),extra:b3(s)};break}}return e}function b3(t){const e={technique:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"extra":M3(s,e);break}}return e}function M3(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":y3(s,e);break}}}function y3(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":e.technique[s.nodeName]=parseFloat(s.textContent);break;case"wrapU":case"wrapV":s.textContent.toUpperCase()==="TRUE"?e.technique[s.nodeName]=1:s.textContent.toUpperCase()==="FALSE"?e.technique[s.nodeName]=0:e.technique[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=R3(s);break}}}function p3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":e.technique=C3(s);break}}return e}function C3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"double_sided":e[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=R3(s);break}}return e}function R3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"texture":e[s.nodeName]={id:s.getAttribute("texture"),texcoord:s.getAttribute("texcoord"),extra:b3(s)};break}}return e}function W3(t){return t}function y1(t){return V(j.effects[t],W3)}function w1(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_effect":e.url=F(s.getAttribute("url"));break}}j.materials[t.getAttribute("id")]=e}function v1(t){let e,i=t.slice((t.lastIndexOf(".")-1>>>0)+2);switch(i=i.toLowerCase(),i){case"tga":e=P3;break;default:e=l1}return e}function J3(t){const e=y1(t.url),i=e.profile.technique;let n;switch(i.type){case"phong":case"blinn":n=new a.MeshPhongMaterial;break;case"lambert":n=new a.MeshLambertMaterial;break;default:n=new a.MeshBasicMaterial;break}n.name=t.name||"";function s(m,w=null){const T=e.profile.samplers[m.id];let d=null;if(T!==void 0){const C=e.profile.surfaces[T.source];d=a3(C.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),d=a3(m.id);if(d!==null){const C=v1(d);if(C!==void 0){const k=C.load(d),q=m.extra;if(q!==void 0&&q.technique!==void 0&&l3(q.technique)===!1){const E=q.technique;k.wrapS=E.wrapU?a.RepeatWrapping:a.ClampToEdgeWrapping,k.wrapT=E.wrapV?a.RepeatWrapping:a.ClampToEdgeWrapping,k.offset.set(E.offsetU||0,E.offsetV||0),k.repeat.set(E.repeatU||1,E.repeatV||1)}else k.wrapS=a.RepeatWrapping,k.wrapT=a.RepeatWrapping;return w!==null&&(k.colorSpace=w),k}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",d),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",m.id),null}const r=i.parameters;for(const m in r){const w=r[m];switch(m){case"diffuse":w.color&&n.color.fromArray(w.color),w.texture&&(n.map=s(w.texture,a.SRGBColorSpace));break;case"specular":w.color&&n.specular&&n.specular.fromArray(w.color),w.texture&&(n.specularMap=s(w.texture));break;case"bump":w.texture&&(n.normalMap=s(w.texture));break;case"ambient":w.texture&&(n.lightMap=s(w.texture,a.SRGBColorSpace));break;case"shininess":w.float&&n.shininess&&(n.shininess=w.float);break;case"emission":w.color&&n.emissive&&n.emissive.fromArray(w.color),w.texture&&(n.emissiveMap=s(w.texture,a.SRGBColorSpace));break}}a.ColorManagement.colorSpaceToWorking(n.color,a.SRGBColorSpace),n.specular&&a.ColorManagement.colorSpaceToWorking(n.specular,a.SRGBColorSpace),n.emissive&&a.ColorManagement.colorSpaceToWorking(n.emissive,a.SRGBColorSpace);let c=r.transparent,A=r.transparency;if(A===void 0&&c&&(A={float:1}),c===void 0&&A&&(c={opaque:"A_ONE",data:{color:[1,1,1,1]}}),c&&A)if(c.data.texture)n.transparent=!0;else{const m=c.data.color;switch(c.opaque){case"A_ONE":n.opacity=m[3]*A.float;break;case"RGB_ZERO":n.opacity=1-m[0]*A.float;break;case"A_ZERO":n.opacity=1-m[3]*A.float;break;case"RGB_ONE":n.opacity=m[0]*A.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',c.opaque)}n.opacity<1&&(n.transparent=!0)}if(i.extra!==void 0&&i.extra.technique!==void 0){const m=i.extra.technique;for(const w in m){const T=m[w];switch(w){case"double_sided":n.side=T===1?a.DoubleSide:a.FrontSide;break;case"bump":n.normalMap=s(T.texture),n.normalScale=new a.Vector2(1,1);break}}}return n}function z1(t){return V(j.materials[t],J3)}function M1(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"optics":e.optics=x1(s);break}}j.cameras[t.getAttribute("id")]=e}function x1(t){for(let e=0;e<t.childNodes.length;e++){const i=t.childNodes[e];switch(i.nodeName){case"technique_common":return A1(i)}}return{}}function A1(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"perspective":case"orthographic":e.technique=n.nodeName,e.parameters=L1(n);break}}return e}function L1(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":e[n.nodeName]=parseFloat(n.textContent);break}}return e}function K3(t){let e;switch(t.optics.technique){case"perspective":e=new a.PerspectiveCamera(t.optics.parameters.yfov,t.optics.parameters.aspect_ratio,t.optics.parameters.znear,t.optics.parameters.zfar);break;case"orthographic":let i=t.optics.parameters.ymag,n=t.optics.parameters.xmag;const s=t.optics.parameters.aspect_ratio;n=n===void 0?i*s:n,i=i===void 0?n/s:i,n*=.5,i*=.5,e=new a.OrthographicCamera(-n,n,i,-i,t.optics.parameters.znear,t.optics.parameters.zfar);break;default:e=new a.PerspectiveCamera;break}return e.name=t.name||"",e}function k1(t){const e=j.cameras[t];return e!==void 0?V(e,K3):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",t),null)}function N1(t){let e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique_common":e=C1(s);break}}j.lights[t.getAttribute("id")]=e}function C1(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"directional":case"point":case"spot":case"ambient":e.technique=s.nodeName,e.parameters=_1(s)}}return e}function _1(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":const r=N(s.textContent);e.color=new a.Color().fromArray(r),a.ColorManagement.colorSpaceToWorking(e.color,a.SRGBColorSpace);break;case"falloff_angle":e.falloffAngle=parseFloat(s.textContent);break;case"quadratic_attenuation":const c=parseFloat(s.textContent);e.distance=c?Math.sqrt(1/c):0;break}}return e}function Y3(t){let e;switch(t.technique){case"directional":e=new a.DirectionalLight;break;case"point":e=new a.PointLight;break;case"spot":e=new a.SpotLight;break;case"ambient":e=new a.AmbientLight;break}return t.parameters.color&&e.color.copy(t.parameters.color),t.parameters.distance&&(e.distance=t.parameters.distance),e}function T1(t){const e=j.lights[t];return e!==void 0?V(e,Y3):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",t),null)}function H1(t){const e={name:t.getAttribute("name"),sources:{},vertices:{},primitives:[]},i=R(t,"mesh")[0];if(i!==void 0){for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;const r=s.getAttribute("id");switch(s.nodeName){case"source":e.sources[r]=j3(s);break;case"vertices":e.vertices=E1(s);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",s.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":e.primitives.push(B1(s));break;default:console.log(s)}}j.geometries[t.getAttribute("id")]=e}}function j3(t){const e={array:[],stride:3};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"float_array":e.array=N(n.textContent);break;case"Name_array":e.array=l(n.textContent);break;case"technique_common":const s=R(n,"accessor")[0];s!==void 0&&(e.stride=parseInt(s.getAttribute("stride")));break}}return e}function E1(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];n.nodeType===1&&(e[n.getAttribute("semantic")]=F(n.getAttribute("source")))}return e}function B1(t){const e={type:t.nodeName,material:t.getAttribute("material"),count:parseInt(t.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=F(s.getAttribute("source")),c=s.getAttribute("semantic"),A=parseInt(s.getAttribute("offset")),m=parseInt(s.getAttribute("set")),w=m>0?c+m:c;e.inputs[w]={id:r,offset:A},e.stride=Math.max(e.stride,A+1),c==="TEXCOORD"&&(e.hasUV=!0);break;case"vcount":e.vcount=J(s.textContent);break;case"p":e.p=J(s.textContent);break}}return e}function V1(t){const e={};for(let i=0;i<t.length;i++){const n=t[i];e[n.type]===void 0&&(e[n.type]=[]),e[n.type].push(n)}return e}function S1(t){let e=0;for(let i=0,n=t.length;i<n;i++)t[i].hasUV===!0&&e++;e>0&&e<t.length&&(t.uvsNeedsFix=!0)}function X3(t){const e={},i=t.sources,n=t.vertices,s=t.primitives;if(s.length===0)return{};const r=V1(s);for(const c in r){const A=r[c];S1(A),e[c]=q1(A,i,n)}return e}function q1(t,e,i){const n={},s={array:[],stride:0},r={array:[],stride:0},c={array:[],stride:0},A={array:[],stride:0},m={array:[],stride:0},w={array:[],stride:4},T={array:[],stride:4},d=new a.BufferGeometry,C=[];let k=0;for(let q=0;q<t.length;q++){const E=t[q],m3=E.inputs;let c3=0;switch(E.type){case"lines":case"linestrips":c3=E.count*2;break;case"triangles":c3=E.count*3;break;case"polylist":for(let t3=0;t3<E.count;t3++){const n3=E.vcount[t3];switch(n3){case 3:c3+=3;break;case 4:c3+=6;break;default:c3+=(n3-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",E.type)}d.addGroup(k,c3,q),k+=c3,E.material&&C.push(E.material);for(const t3 in m3){const n3=m3[t3];switch(t3){case"VERTEX":for(const H3 in i){const k3=i[H3];switch(H3){case"POSITION":const V3=s.array.length;if(_3(E,e[k3],n3.offset,s.array),s.stride=e[k3].stride,e.skinWeights&&e.skinIndices&&(_3(E,e.skinIndices,n3.offset,w.array),_3(E,e.skinWeights,n3.offset,T.array)),E.hasUV===!1&&t.uvsNeedsFix===!0){const h2=(s.array.length-V3)/s.stride;for(let h1=0;h1<h2;h1++)c.array.push(0,0)}break;case"NORMAL":_3(E,e[k3],n3.offset,r.array),r.stride=e[k3].stride;break;case"COLOR":_3(E,e[k3],n3.offset,m.array),m.stride=e[k3].stride;break;case"TEXCOORD":_3(E,e[k3],n3.offset,c.array),c.stride=e[k3].stride;break;case"TEXCOORD1":_3(E,e[k3],n3.offset,A.array),c.stride=e[k3].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',H3)}}break;case"NORMAL":_3(E,e[n3.id],n3.offset,r.array),r.stride=e[n3.id].stride;break;case"COLOR":_3(E,e[n3.id],n3.offset,m.array,!0),m.stride=e[n3.id].stride;break;case"TEXCOORD":_3(E,e[n3.id],n3.offset,c.array),c.stride=e[n3.id].stride;break;case"TEXCOORD1":_3(E,e[n3.id],n3.offset,A.array),A.stride=e[n3.id].stride;break}}}return s.array.length>0&&d.setAttribute("position",new a.Float32BufferAttribute(s.array,s.stride)),r.array.length>0&&d.setAttribute("normal",new a.Float32BufferAttribute(r.array,r.stride)),m.array.length>0&&d.setAttribute("color",new a.Float32BufferAttribute(m.array,m.stride)),c.array.length>0&&d.setAttribute("uv",new a.Float32BufferAttribute(c.array,c.stride)),A.array.length>0&&d.setAttribute("uv1",new a.Float32BufferAttribute(A.array,A.stride)),w.array.length>0&&d.setAttribute("skinIndex",new a.Float32BufferAttribute(w.array,w.stride)),T.array.length>0&&d.setAttribute("skinWeight",new a.Float32BufferAttribute(T.array,T.stride)),n.data=d,n.type=t[0].type,n.materialKeys=C,n}function _3(t,e,i,n,s=!1){const r=t.p,c=t.stride,A=t.vcount;function m(d){let C=r[d+i]*T;const k=C+T;for(;C<k;C++)n.push(w[C]);if(s){const q=n.length-T-1;F3.setRGB(n[q+0],n[q+1],n[q+2],a.SRGBColorSpace),n[q+0]=F3.r,n[q+1]=F3.g,n[q+2]=F3.b}}const w=e.array,T=e.stride;if(t.vcount!==void 0){let d=0;for(let C=0,k=A.length;C<k;C++){const q=A[C];if(q===4){const E=d+c*0,m3=d+c*1,c3=d+c*2,t3=d+c*3;m(E),m(m3),m(t3),m(m3),m(c3),m(t3)}else if(q===3){const E=d+c*0,m3=d+c*1,c3=d+c*2;m(E),m(m3),m(c3)}else if(q>4)for(let E=1,m3=q-2;E<=m3;E++){const c3=d+c*0,t3=d+c*E,n3=d+c*(E+1);m(c3),m(t3),m(n3)}d+=c*q}}else for(let d=0,C=r.length;d<C;d+=c)m(d)}function Z3(t){return V(j.geometries[t],X3)}function R1(t){const e={name:t.getAttribute("name")||"",joints:{},links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":O1(n,e);break}}j.kinematicsModels[t.getAttribute("id")]=e}function F1(t){return t.build!==void 0?t.build:t}function I1(t){return V(j.kinematicsModels[t],F1)}function O1(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"joint":e.joints[n.getAttribute("sid")]=U1(n);break;case"link":e.links.push(Q3(n));break}}}function U1(t){let e;for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"prismatic":case"revolute":e=j1(n);break}}return e}function j1(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",axis:new a.Vector3,limits:{min:0,max:0},type:t.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=N(n.textContent);e.axis.fromArray(s);break;case"limits":const r=n.getElementsByTagName("max")[0],c=n.getElementsByTagName("min")[0];e.limits.max=parseFloat(r.textContent),e.limits.min=parseFloat(c.textContent);break}}return e.limits.min>=e.limits.max&&(e.static=!0),e.middlePosition=(e.limits.min+e.limits.max)/2,e}function Q3(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",attachments:[],transforms:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"attachment_full":e.attachments.push(D1(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(e1(n));break}}return e}function D1(t){const e={joint:t.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"link":e.links.push(Q3(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(e1(n));break}}return e}function e1(t){const e={type:t.nodeName},i=N(t.textContent);switch(e.type){case"matrix":e.obj=new a.Matrix4,e.obj.fromArray(i).transpose();break;case"translate":e.obj=new a.Vector3,e.obj.fromArray(i);break;case"rotate":e.obj=new a.Vector3,e.obj.fromArray(i),e.angle=a.MathUtils.degToRad(i[3]);break}return e}function G1(t){const e={name:t.getAttribute("name")||"",rigidBodies:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"rigid_body":e.rigidBodies[n.getAttribute("name")]={},P1(n,e.rigidBodies[n.getAttribute("name")]);break}}j.physicsModels[t.getAttribute("id")]=e}function P1(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":$1(n,e);break}}}function $1(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"inertia":e.inertia=N(n.textContent);break;case"mass":e.mass=N(n.textContent)[0];break}}}function W1(t){const e={bindJointAxis:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"bind_joint_axis":e.bindJointAxis.push(J1(n));break}}j.kinematicsScenes[F(t.getAttribute("url"))]=e}function J1(t){const e={target:t.getAttribute("target").split("/").pop()};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=n.getElementsByTagName("param")[0];e.axis=s.textContent;const r=e.axis.split("inst_").pop().split("axis")[0];e.jointIndex=r.substring(0,r.length-1);break}}return e}function K1(t){return t.build!==void 0?t.build:t}function Y1(t){return V(j.kinematicsScenes[t],K1)}function X1(){const t=Object.keys(j.kinematicsModels)[0],e=Object.keys(j.kinematicsScenes)[0],i=Object.keys(j.visualScenes)[0];if(t===void 0||e===void 0)return;const n=I1(t),s=Y1(e),r=o1(i),c=s.bindJointAxis,A={};for(let T=0,d=c.length;T<d;T++){const C=c[T],k=w3.querySelector('[sid="'+C.target+'"]');if(k){const q=k.parentElement;m(C.jointIndex,q)}}function m(T,d){const C=d.getAttribute("name"),k=n.joints[T];r.traverse(function(q){q.name===C&&(A[T]={object:q,transforms:Z1(d),joint:k,position:k.zeroPosition})})}const w=new a.Matrix4;d1={joints:n&&n.joints,getJointValue:function(T){const d=A[T];if(d)return d.position;console.warn("THREE.ColladaLoader: Joint "+T+" doesn't exist.")},setJointValue:function(T,d){const C=A[T];if(C){const k=C.joint;if(d>k.limits.max||d<k.limits.min)console.warn("THREE.ColladaLoader: Joint "+T+" value "+d+" outside of limits (min: "+k.limits.min+", max: "+k.limits.max+").");else if(k.static)console.warn("THREE.ColladaLoader: Joint "+T+" is static.");else{const q=C.object,E=k.axis,m3=C.transforms;N3.identity();for(let c3=0;c3<m3.length;c3++){const t3=m3[c3];if(t3.sid&&t3.sid.indexOf(T)!==-1)switch(k.type){case"revolute":N3.multiply(w.makeRotationAxis(E,a.MathUtils.degToRad(d)));break;case"prismatic":N3.multiply(w.makeTranslation(E.x*d,E.y*d,E.z*d));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+k.type);break}else switch(t3.type){case"matrix":N3.multiply(t3.obj);break;case"translate":N3.multiply(w.makeTranslation(t3.obj.x,t3.obj.y,t3.obj.z));break;case"scale":N3.scale(t3.obj);break;case"rotate":N3.multiply(w.makeRotationAxis(t3.obj,t3.angle));break}}q.matrix.copy(N3),q.matrix.decompose(q.position,q.quaternion,q.scale),A[T].position=d}}else console.log("THREE.ColladaLoader: "+T+" does not exist.")}}}function Z1(t){const e=[],i=w3.querySelector('[id="'+t.id+'"]');for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;let r,c;switch(s.nodeName){case"matrix":r=N(s.textContent);const A=new a.Matrix4().fromArray(r).transpose();e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:A});break;case"translate":case"scale":r=N(s.textContent),c=new a.Vector3().fromArray(r),e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:c});break;case"rotate":r=N(s.textContent),c=new a.Vector3().fromArray(r);const m=a.MathUtils.degToRad(r[3]);e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:c,angle:m});break}}return e}function Q1(t){const e=t.getElementsByTagName("node");for(let i=0;i<e.length;i++){const n=e[i];n.hasAttribute("id")===!1&&n.setAttribute("id",X())}}const N3=new a.Matrix4,E3=new a.Vector3;function D3(t){const e={name:t.getAttribute("name")||"",type:t.getAttribute("type"),id:t.getAttribute("id"),sid:t.getAttribute("sid"),matrix:new a.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType!==1)continue;let s;switch(n.nodeName){case"node":e.nodes.push(n.getAttribute("id")),D3(n);break;case"instance_camera":e.instanceCameras.push(F(n.getAttribute("url")));break;case"instance_controller":e.instanceControllers.push(t1(n));break;case"instance_light":e.instanceLights.push(F(n.getAttribute("url")));break;case"instance_geometry":e.instanceGeometries.push(t1(n));break;case"instance_node":e.instanceNodes.push(F(n.getAttribute("url")));break;case"matrix":s=N(n.textContent),e.matrix.multiply(N3.fromArray(s).transpose()),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"translate":s=N(n.textContent),E3.fromArray(s),e.matrix.multiply(N3.makeTranslation(E3.x,E3.y,E3.z)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"rotate":s=N(n.textContent);const r=a.MathUtils.degToRad(s[3]);e.matrix.multiply(N3.makeRotationAxis(E3.fromArray(s),r)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"scale":s=N(n.textContent),e.matrix.scale(E3.fromArray(s)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"extra":break;default:console.log(n)}}return s1(e.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",e.id):j.nodes[e.id]=e,e}function t1(t){const e={id:F(t.getAttribute("url")),materials:{},skeletons:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"bind_material":const s=n.getElementsByTagName("instance_material");for(let r=0;r<s.length;r++){const c=s[r],A=c.getAttribute("symbol"),m=c.getAttribute("target");e.materials[A]=F(m)}break;case"skeleton":e.skeletons.push(F(n.textContent));break}}return e}function e2(t,e){const i=[],n=[];let s,r,c;for(s=0;s<t.length;s++){const w=t[s];let T;if(s1(w))T=B3(w),n1(T,e,i);else if(a2(w)){const C=j.visualScenes[w].children;for(let k=0;k<C.length;k++){const q=C[k];if(q.type==="JOINT"){const E=B3(q.id);n1(E,e,i)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",w)}for(s=0;s<e.length;s++)for(r=0;r<i.length;r++)if(c=i[r],c.bone.name===e[s].name){n[s]=c,c.processed=!0;break}for(s=0;s<i.length;s++)c=i[s],c.processed===!1&&(n.push(c),c.processed=!0);const A=[],m=[];for(s=0;s<n.length;s++)c=n[s],A.push(c.bone),m.push(c.boneInverse);return new a.Skeleton(A,m)}function n1(t,e,i){t.traverse(function(n){if(n.isBone===!0){let s;for(let r=0;r<e.length;r++){const c=e[r];if(c.name===n.name){s=c.boneInverse;break}}s===void 0&&(s=new a.Matrix4),i.push({bone:n,boneInverse:s,processed:!1})}})}function t2(t){const e=[],i=t.matrix,n=t.nodes,s=t.type,r=t.instanceCameras,c=t.instanceControllers,A=t.instanceLights,m=t.instanceGeometries,w=t.instanceNodes;for(let d=0,C=n.length;d<C;d++)e.push(B3(n[d]));for(let d=0,C=r.length;d<C;d++){const k=k1(r[d]);k!==null&&e.push(k.clone())}for(let d=0,C=c.length;d<C;d++){const k=c[d],q=S(k.id),E=Z3(q.id),m3=i1(E,k.materials),c3=k.skeletons,t3=q.skin.joints,n3=e2(c3,t3);for(let H3=0,k3=m3.length;H3<k3;H3++){const V3=m3[H3];V3.isSkinnedMesh&&(V3.bind(n3,q.skin.bindMatrix),V3.normalizeSkinWeights()),e.push(V3)}}for(let d=0,C=A.length;d<C;d++){const k=T1(A[d]);k!==null&&e.push(k.clone())}for(let d=0,C=m.length;d<C;d++){const k=m[d],q=Z3(k.id),E=i1(q,k.materials);for(let m3=0,c3=E.length;m3<c3;m3++)e.push(E[m3])}for(let d=0,C=w.length;d<C;d++)e.push(B3(w[d]).clone());let T;if(n.length===0&&e.length===1)T=e[0];else{T=s==="JOINT"?new a.Bone:new a.Group;for(let d=0;d<e.length;d++)T.add(e[d])}return T.name=s==="JOINT"?t.sid:t.name,T.matrix.copy(i),T.matrix.decompose(T.position,T.quaternion,T.scale),T}const n2=new a.MeshBasicMaterial({name:a.Loader.DEFAULT_MATERIAL_NAME,color:16711935});function i2(t,e){const i=[];for(let n=0,s=t.length;n<s;n++){const r=e[t[n]];r===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",t[n]),i.push(n2)):i.push(z1(r))}return i}function i1(t,e){const i=[];for(const n in t){const s=t[n],r=i2(s.materialKeys,e);if(r.length===0&&(n==="lines"||n==="linestrips"?r.push(new a.LineBasicMaterial):r.push(new a.MeshPhongMaterial)),n==="lines"||n==="linestrips")for(let w=0,T=r.length;w<T;w++){const d=r[w];if(d.isMeshPhongMaterial===!0||d.isMeshLambertMaterial===!0){const C=new a.LineBasicMaterial;C.color.copy(d.color),C.opacity=d.opacity,C.transparent=d.transparent,r[w]=C}}const c=s.data.attributes.skinIndex!==void 0,A=r.length===1?r[0]:r;let m;switch(n){case"lines":m=new a.LineSegments(s.data,A);break;case"linestrips":m=new a.Line(s.data,A);break;case"triangles":case"polylist":c?m=new a.SkinnedMesh(s.data,A):m=new a.Mesh(s.data,A);break}i.push(m)}return i}function s1(t){return j.nodes[t]!==void 0}function B3(t){return V(j.nodes[t],t2)}function s2(t){const e={name:t.getAttribute("name"),children:[]};Q1(t);const i=R(t,"node");for(let n=0;n<i.length;n++)e.children.push(D3(i[n]));j.visualScenes[t.getAttribute("id")]=e}function a1(t){const e=new a.Group;e.name=t.name;const i=t.children;for(let n=0;n<i.length;n++){const s=i[n];e.add(B3(s.id))}return e}function a2(t){return j.visualScenes[t]!==void 0}function o1(t){return V(j.visualScenes[t],a1)}function o2(t){const e=R(t,"instance_visual_scene")[0];return o1(F(e.getAttribute("url")))}function r2(){const t=j.clips;if(l3(t)===!0){if(l3(j.animations)===!1){const e=[];for(const i in j.animations){const n=L(i);for(let s=0,r=n.length;s<r;s++)e.push(n[s])}I3.push(new a.AnimationClip("default",-1,e))}}else for(const e in t)I3.push(i3(e))}function c2(t){let e="";const i=[t];for(;i.length;){const n=i.shift();n.nodeType===Node.TEXT_NODE?e+=n.textContent:(e+=`
|
|
1
|
+
"use strict";const T3=require("./MTLLoader-DVChBUrC.cjs"),a=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-6dwbeVvZ.cjs"),u2=require("./threeViewerHost-Yk0yIs7L.cjs"),q3=require("./index-C8qRkCgn.cjs"),f2=require("vue"),p2=require("./index-CxUHJyzF.cjs");class u1 extends a.DataTextureLoader{constructor(_){super(_)}parse(_){function P(x){switch(x.image_type){case $:case V:if(x.colormap_length>256||x.colormap_size!==24||x.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case h:case o:case z:case y:if(x.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case h3:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+x.image_type)}if(x.width<=0||x.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(x.pixel_size!==8&&x.pixel_size!==16&&x.pixel_size!==24&&x.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+x.pixel_size)}function R(x,o3,i3,Q,u3){let Z,s3;const W=i3.pixel_size>>3,D=i3.width*i3.height*W;if(o3&&(s3=u3.subarray(Q,Q+=i3.colormap_length*(i3.colormap_size>>3))),x){Z=new Uint8Array(D);let S,M,B,a3=0;const v=new Uint8Array(W);for(;a3<D;)if(S=u3[Q++],M=(S&127)+1,S&128){for(B=0;B<W;++B)v[B]=u3[Q++];for(B=0;B<M;++B)Z.set(v,a3+B*W);a3+=W*M}else{for(M*=W,B=0;B<M;++B)Z[a3+B]=u3[Q++];a3+=M}}else Z=u3.subarray(Q,Q+=o3?i3.width*i3.height:D);return{pixel_data:Z,palettes:s3}}function l(x,o3,i3,Q,u3,Z,s3,W,D){const S=D;let M,B=0,a3,v;const K=G.width;for(v=o3;v!==Q;v+=i3)for(a3=u3;a3!==s3;a3+=Z,B++)M=W[B],x[(a3+K*v)*4+3]=255,x[(a3+K*v)*4+2]=S[M*3+0],x[(a3+K*v)*4+1]=S[M*3+1],x[(a3+K*v)*4+0]=S[M*3+2];return x}function N(x,o3,i3,Q,u3,Z,s3,W){let D,S=0,M,B;const a3=G.width;for(B=o3;B!==Q;B+=i3)for(M=u3;M!==s3;M+=Z,S+=2)D=W[S+0]+(W[S+1]<<8),x[(M+a3*B)*4+0]=(D&31744)>>7,x[(M+a3*B)*4+1]=(D&992)>>2,x[(M+a3*B)*4+2]=(D&31)<<3,x[(M+a3*B)*4+3]=D&32768?0:255;return x}function J(x,o3,i3,Q,u3,Z,s3,W){let D=0,S,M;const B=G.width;for(M=o3;M!==Q;M+=i3)for(S=u3;S!==s3;S+=Z,D+=3)x[(S+B*M)*4+3]=255,x[(S+B*M)*4+2]=W[D+0],x[(S+B*M)*4+1]=W[D+1],x[(S+B*M)*4+0]=W[D+2];return x}function F(x,o3,i3,Q,u3,Z,s3,W){let D=0,S,M;const B=G.width;for(M=o3;M!==Q;M+=i3)for(S=u3;S!==s3;S+=Z,D+=4)x[(S+B*M)*4+2]=W[D+0],x[(S+B*M)*4+1]=W[D+1],x[(S+B*M)*4+0]=W[D+2],x[(S+B*M)*4+3]=W[D+3];return x}function X(x,o3,i3,Q,u3,Z,s3,W){let D,S=0,M,B;const a3=G.width;for(B=o3;B!==Q;B+=i3)for(M=u3;M!==s3;M+=Z,S++)D=W[S],x[(M+a3*B)*4+0]=D,x[(M+a3*B)*4+1]=D,x[(M+a3*B)*4+2]=D,x[(M+a3*B)*4+3]=255;return x}function l3(x,o3,i3,Q,u3,Z,s3,W){let D=0,S,M;const B=G.width;for(M=o3;M!==Q;M+=i3)for(S=u3;S!==s3;S+=Z,D+=2)x[(S+B*M)*4+0]=W[D+0],x[(S+B*M)*4+1]=W[D+0],x[(S+B*M)*4+2]=W[D+0],x[(S+B*M)*4+3]=W[D+1];return x}function d3(x,o3,i3,Q,u3){let Z,s3,W,D,S,M;switch((G.flags&p)>>f){default:case I:Z=0,W=1,S=o3,s3=0,D=1,M=i3;break;case L:Z=0,W=1,S=o3,s3=i3-1,D=-1,M=-1;break;case O:Z=o3-1,W=-1,S=-1,s3=0,D=1,M=i3;break;case g:Z=o3-1,W=-1,S=-1,s3=i3-1,D=-1,M=-1;break}if(Y)switch(G.pixel_size){case 8:X(x,s3,D,M,Z,W,S,Q);break;case 16:l3(x,s3,D,M,Z,W,S,Q);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(G.pixel_size){case 8:l(x,s3,D,M,Z,W,S,Q,u3);break;case 16:N(x,s3,D,M,Z,W,S,Q);break;case 24:J(x,s3,D,M,Z,W,S,Q);break;case 32:F(x,s3,D,M,Z,W,S,Q);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return x}const h3=0,$=1,h=2,o=3,V=9,z=10,y=11,p=48,f=4,L=0,g=1,I=2,O=3;if(_.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let u=0;const b=new Uint8Array(_),G={id_length:b[u++],colormap_type:b[u++],image_type:b[u++],colormap_index:b[u++]|b[u++]<<8,colormap_length:b[u++]|b[u++]<<8,colormap_size:b[u++],origin:[b[u++]|b[u++]<<8,b[u++]|b[u++]<<8],width:b[u++]|b[u++]<<8,height:b[u++]|b[u++]<<8,pixel_size:b[u++],flags:b[u++]};if(P(G),G.id_length+u>_.length)throw new Error("THREE.TGALoader: No data.");u+=G.id_length;let U=!1,H=!1,Y=!1;switch(G.image_type){case V:U=!0,H=!0;break;case $:H=!0;break;case z:U=!0;break;case h:break;case y:U=!0,Y=!0;break;case o:Y=!0;break}const A3=new Uint8Array(G.width*G.height*4),g3=R(U,H,G,u,b);return d3(A3,G.width,G.height,g3.pixel_data,g3.palettes),{data:A3,width:G.width,height:G.height,flipY:!0,generateMipmaps:!0,minFilter:a.LinearMipmapLinearFilter}}}class m2 extends a.Loader{load(_,P,R,l){const N=this,J=N.path===""?a.LoaderUtils.extractUrlBase(_):N.path,F=new a.FileLoader(N.manager);F.setPath(N.path),F.setRequestHeader(N.requestHeader),F.setWithCredentials(N.withCredentials),F.load(_,function(X){try{P(N.parse(X,J))}catch(l3){l?l(l3):console.error(l3),N.manager.itemError(_)}},R,l)}parse(_,P){function R(t,e){const i=[],n=t.childNodes;for(let s=0,r=n.length;s<r;s++){const c=n[s];c.nodeName===e&&i.push(c)}return i}function l(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return i}function N(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseFloat(e[n]);return i}function J(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseInt(e[n]);return i}function F(t){return t.substring(1)}function X(){return"three_default_"+d2++}function l3(t){return Object.keys(t).length===0}function d3(t){return{unit:h3(R(t,"unit")[0]),upAxis:$(R(t,"up_axis")[0])}}function h3(t){return t!==void 0&&t.hasAttribute("meter")===!0?parseFloat(t.getAttribute("meter")):1}function $(t){return t!==void 0?t.textContent:"Y_UP"}function h(t,e,i,n){const s=R(t,e)[0];if(s!==void 0){const r=R(s,i);for(let c=0;c<r.length;c++)n(r[c])}}function o(t,e){for(const i in t){const n=t[i];n.build=e(t[i])}}function V(t,e){return t.build!==void 0||(t.build=e(t)),t.build}function z(t){const e={sources:{},samplers:{},channels:{}};let i=!1;for(let n=0,s=t.childNodes.length;n<s;n++){const r=t.childNodes[n];if(r.nodeType!==1)continue;let c;switch(r.nodeName){case"source":c=r.getAttribute("id"),e.sources[c]=j3(r);break;case"sampler":c=r.getAttribute("id"),e.samplers[c]=y(r);break;case"channel":c=r.getAttribute("target"),e.channels[c]=p(r);break;case"animation":z(r),i=!0;break;default:console.log(r)}}i===!1&&(j.animations[t.getAttribute("id")||a.MathUtils.generateUUID()]=e)}function y(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=F(s.getAttribute("source")),c=s.getAttribute("semantic");e.inputs[c]=r;break}}return e}function p(t){const e={};let n=t.getAttribute("target").split("/");const s=n.shift();let r=n.shift();const c=r.indexOf("(")!==-1,A=r.indexOf(".")!==-1;if(A)n=r.split("."),r=n.shift(),e.member=n.shift();else if(c){const m=r.split("(");r=m.shift();for(let w=0;w<m.length;w++)m[w]=parseInt(m[w].replace(/\)/,""));e.indices=m}return e.id=s,e.sid=r,e.arraySyntax=c,e.memberSyntax=A,e.sampler=F(t.getAttribute("source")),e}function f(t){const e=[],i=t.channels,n=t.samplers,s=t.sources;for(const r in i)if(i.hasOwnProperty(r)){const c=i[r],A=n[c.sampler],m=A.inputs.INPUT,w=A.inputs.OUTPUT,T=s[m],d=s[w],C=g(c,T,d);G(C,e)}return e}function L(t){return V(j.animations[t],f)}function g(t,e,i){const n=j.nodes[t.id],s=B3(n.id),r=n.transforms[t.sid],c=n.matrix.clone().transpose();let A,m,w,T,d,C;const k={};switch(r){case"matrix":for(w=0,T=e.array.length;w<T;w++)if(A=e.array[w],m=w*i.stride,k[A]===void 0&&(k[A]={}),t.arraySyntax===!0){const m3=i.array[m],c3=t.indices[0]+4*t.indices[1];k[A][c3]=m3}else for(d=0,C=i.stride;d<C;d++)k[A][d]=i.array[m+d];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',r);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',r);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',r);break}const q=I(k,c);return{name:s.uuid,keyframes:q}}function I(t,e){const i=[];for(const s in t)i.push({time:parseFloat(s),value:t[s]});i.sort(n);for(let s=0;s<16;s++)U(i,s,e.elements[s]);return i;function n(s,r){return s.time-r.time}}const O=new a.Vector3,u=new a.Vector3,b=new a.Quaternion;function G(t,e){const i=t.keyframes,n=t.name,s=[],r=[],c=[],A=[];for(let m=0,w=i.length;m<w;m++){const T=i[m],d=T.time,C=T.value;N3.fromArray(C).transpose(),N3.decompose(O,b,u),s.push(d),r.push(O.x,O.y,O.z),c.push(b.x,b.y,b.z,b.w),A.push(u.x,u.y,u.z)}return r.length>0&&e.push(new a.VectorKeyframeTrack(n+".position",s,r)),c.length>0&&e.push(new a.QuaternionKeyframeTrack(n+".quaternion",s,c)),A.length>0&&e.push(new a.VectorKeyframeTrack(n+".scale",s,A)),e}function U(t,e,i){let n,s=!0,r,c;for(r=0,c=t.length;r<c;r++)n=t[r],n.value[e]===void 0?n.value[e]=null:s=!1;if(s===!0)for(r=0,c=t.length;r<c;r++)n=t[r],n.value[e]=i;else H(t,e)}function H(t,e){let i,n;for(let s=0,r=t.length;s<r;s++){const c=t[s];if(c.value[e]===null){if(i=Y(t,s,e),n=A3(t,s,e),i===null){c.value[e]=n.value[e];continue}if(n===null){c.value[e]=i.value[e];continue}g3(c,i,n,e)}}}function Y(t,e,i){for(;e>=0;){const n=t[e];if(n.value[i]!==null)return n;e--}return null}function A3(t,e,i){for(;e<t.length;){const n=t[e];if(n.value[i]!==null)return n;e++}return null}function g3(t,e,i,n){if(i.time-e.time===0){t.value[n]=e.value[n];return}t.value[n]=(t.time-e.time)*(i.value[n]-e.value[n])/(i.time-e.time)+e.value[n]}function x(t){const e={name:t.getAttribute("id")||"default",start:parseFloat(t.getAttribute("start")||0),end:parseFloat(t.getAttribute("end")||0),animations:[]};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_animation":e.animations.push(F(s.getAttribute("url")));break}}j.clips[t.getAttribute("id")]=e}function o3(t){const e=[],i=t.name,n=t.end-t.start||-1,s=t.animations;for(let r=0,c=s.length;r<c;r++){const A=L(s[r]);for(let m=0,w=A.length;m<w;m++)e.push(A[m])}return new a.AnimationClip(i,n,e)}function i3(t){return V(j.clips[t],o3)}function Q(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"skin":e.id=F(s.getAttribute("source")),e.skin=u3(s);break;case"morph":e.id=F(s.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}j.controllers[t.getAttribute("id")]=e}function u3(t){const e={sources:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"bind_shape_matrix":e.bindShapeMatrix=N(s.textContent);break;case"source":const r=s.getAttribute("id");e.sources[r]=j3(s);break;case"joints":e.joints=Z(s);break;case"vertex_weights":e.vertexWeights=s3(s);break}}return e}function Z(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=s.getAttribute("semantic"),c=F(s.getAttribute("source"));e.inputs[r]=c;break}}return e}function s3(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=s.getAttribute("semantic"),c=F(s.getAttribute("source")),A=parseInt(s.getAttribute("offset"));e.inputs[r]={id:c,offset:A};break;case"vcount":e.vcount=J(s.textContent);break;case"v":e.v=J(s.textContent);break}}return e}function W(t){const e={id:t.id},i=j.geometries[e.id];return t.skin!==void 0&&(e.skin=D(t.skin),i.sources.skinIndices=e.skin.indices,i.sources.skinWeights=e.skin.weights),e}function D(t){const i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},n=t.sources,s=t.vertexWeights,r=s.vcount,c=s.v,A=s.inputs.JOINT.offset,m=s.inputs.WEIGHT.offset,w=t.sources[t.joints.inputs.JOINT],T=t.sources[t.joints.inputs.INV_BIND_MATRIX],d=n[s.inputs.WEIGHT.id].array;let C=0,k,q,E;for(k=0,E=r.length;k<E;k++){const c3=r[k],t3=[];for(q=0;q<c3;q++){const n3=c[C+A],H3=c[C+m],k3=d[H3];t3.push({index:n3,weight:k3}),C+=2}for(t3.sort(m3),q=0;q<4;q++){const n3=t3[q];n3!==void 0?(i.indices.array.push(n3.index),i.weights.array.push(n3.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}for(t.bindShapeMatrix?i.bindMatrix=new a.Matrix4().fromArray(t.bindShapeMatrix).transpose():i.bindMatrix=new a.Matrix4().identity(),k=0,E=w.array.length;k<E;k++){const c3=w.array[k],t3=new a.Matrix4().fromArray(T.array,k*T.stride).transpose();i.joints.push({name:c3,boneInverse:t3})}return i;function m3(c3,t3){return t3.weight-c3.weight}}function S(t){return V(j.controllers[t],W)}function M(t){const e={init_from:R(t,"init_from")[0].textContent};j.images[t.getAttribute("id")]=e}function B(t){return t.build!==void 0?t.build:t.init_from}function a3(t){const e=j.images[t];return e!==void 0?V(e,B):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",t),null)}function v(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"profile_COMMON":e.profile=K(s);break}}j.effects[t.getAttribute("id")]=e}function K(t){const e={surfaces:{},samplers:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"newparam":e3(s,e);break;case"technique":e.technique=r3(s);break;case"extra":e.extra=p3(s);break}}return e}function e3(t,e){const i=t.getAttribute("sid");for(let n=0,s=t.childNodes.length;n<s;n++){const r=t.childNodes[n];if(r.nodeType===1)switch(r.nodeName){case"surface":e.surfaces[i]=f3(r);break;case"sampler2D":e.samplers[i]=x3(r);break}}}function f3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"init_from":e.init_from=s.textContent;break}}return e}function x3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"source":e.source=s.textContent;break}}return e}function r3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"constant":case"lambert":case"blinn":case"phong":e.type=s.nodeName,e.parameters=z3(s);break;case"extra":e.extra=p3(s);break}}return e}function z3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":e[s.nodeName]=L3(s);break;case"transparent":e[s.nodeName]={opaque:s.hasAttribute("opaque")?s.getAttribute("opaque"):"A_ONE",data:L3(s)};break}}return e}function L3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":e[s.nodeName]=N(s.textContent);break;case"float":e[s.nodeName]=parseFloat(s.textContent);break;case"texture":e[s.nodeName]={id:s.getAttribute("texture"),extra:b3(s)};break}}return e}function b3(t){const e={technique:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"extra":M3(s,e);break}}return e}function M3(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":y3(s,e);break}}}function y3(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":e.technique[s.nodeName]=parseFloat(s.textContent);break;case"wrapU":case"wrapV":s.textContent.toUpperCase()==="TRUE"?e.technique[s.nodeName]=1:s.textContent.toUpperCase()==="FALSE"?e.technique[s.nodeName]=0:e.technique[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=R3(s);break}}}function p3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":e.technique=C3(s);break}}return e}function C3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"double_sided":e[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=R3(s);break}}return e}function R3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"texture":e[s.nodeName]={id:s.getAttribute("texture"),texcoord:s.getAttribute("texcoord"),extra:b3(s)};break}}return e}function W3(t){return t}function y1(t){return V(j.effects[t],W3)}function w1(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_effect":e.url=F(s.getAttribute("url"));break}}j.materials[t.getAttribute("id")]=e}function v1(t){let e,i=t.slice((t.lastIndexOf(".")-1>>>0)+2);switch(i=i.toLowerCase(),i){case"tga":e=P3;break;default:e=l1}return e}function J3(t){const e=y1(t.url),i=e.profile.technique;let n;switch(i.type){case"phong":case"blinn":n=new a.MeshPhongMaterial;break;case"lambert":n=new a.MeshLambertMaterial;break;default:n=new a.MeshBasicMaterial;break}n.name=t.name||"";function s(m,w=null){const T=e.profile.samplers[m.id];let d=null;if(T!==void 0){const C=e.profile.surfaces[T.source];d=a3(C.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),d=a3(m.id);if(d!==null){const C=v1(d);if(C!==void 0){const k=C.load(d),q=m.extra;if(q!==void 0&&q.technique!==void 0&&l3(q.technique)===!1){const E=q.technique;k.wrapS=E.wrapU?a.RepeatWrapping:a.ClampToEdgeWrapping,k.wrapT=E.wrapV?a.RepeatWrapping:a.ClampToEdgeWrapping,k.offset.set(E.offsetU||0,E.offsetV||0),k.repeat.set(E.repeatU||1,E.repeatV||1)}else k.wrapS=a.RepeatWrapping,k.wrapT=a.RepeatWrapping;return w!==null&&(k.colorSpace=w),k}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",d),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",m.id),null}const r=i.parameters;for(const m in r){const w=r[m];switch(m){case"diffuse":w.color&&n.color.fromArray(w.color),w.texture&&(n.map=s(w.texture,a.SRGBColorSpace));break;case"specular":w.color&&n.specular&&n.specular.fromArray(w.color),w.texture&&(n.specularMap=s(w.texture));break;case"bump":w.texture&&(n.normalMap=s(w.texture));break;case"ambient":w.texture&&(n.lightMap=s(w.texture,a.SRGBColorSpace));break;case"shininess":w.float&&n.shininess&&(n.shininess=w.float);break;case"emission":w.color&&n.emissive&&n.emissive.fromArray(w.color),w.texture&&(n.emissiveMap=s(w.texture,a.SRGBColorSpace));break}}a.ColorManagement.colorSpaceToWorking(n.color,a.SRGBColorSpace),n.specular&&a.ColorManagement.colorSpaceToWorking(n.specular,a.SRGBColorSpace),n.emissive&&a.ColorManagement.colorSpaceToWorking(n.emissive,a.SRGBColorSpace);let c=r.transparent,A=r.transparency;if(A===void 0&&c&&(A={float:1}),c===void 0&&A&&(c={opaque:"A_ONE",data:{color:[1,1,1,1]}}),c&&A)if(c.data.texture)n.transparent=!0;else{const m=c.data.color;switch(c.opaque){case"A_ONE":n.opacity=m[3]*A.float;break;case"RGB_ZERO":n.opacity=1-m[0]*A.float;break;case"A_ZERO":n.opacity=1-m[3]*A.float;break;case"RGB_ONE":n.opacity=m[0]*A.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',c.opaque)}n.opacity<1&&(n.transparent=!0)}if(i.extra!==void 0&&i.extra.technique!==void 0){const m=i.extra.technique;for(const w in m){const T=m[w];switch(w){case"double_sided":n.side=T===1?a.DoubleSide:a.FrontSide;break;case"bump":n.normalMap=s(T.texture),n.normalScale=new a.Vector2(1,1);break}}}return n}function z1(t){return V(j.materials[t],J3)}function M1(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"optics":e.optics=x1(s);break}}j.cameras[t.getAttribute("id")]=e}function x1(t){for(let e=0;e<t.childNodes.length;e++){const i=t.childNodes[e];switch(i.nodeName){case"technique_common":return A1(i)}}return{}}function A1(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"perspective":case"orthographic":e.technique=n.nodeName,e.parameters=L1(n);break}}return e}function L1(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":e[n.nodeName]=parseFloat(n.textContent);break}}return e}function K3(t){let e;switch(t.optics.technique){case"perspective":e=new a.PerspectiveCamera(t.optics.parameters.yfov,t.optics.parameters.aspect_ratio,t.optics.parameters.znear,t.optics.parameters.zfar);break;case"orthographic":let i=t.optics.parameters.ymag,n=t.optics.parameters.xmag;const s=t.optics.parameters.aspect_ratio;n=n===void 0?i*s:n,i=i===void 0?n/s:i,n*=.5,i*=.5,e=new a.OrthographicCamera(-n,n,i,-i,t.optics.parameters.znear,t.optics.parameters.zfar);break;default:e=new a.PerspectiveCamera;break}return e.name=t.name||"",e}function k1(t){const e=j.cameras[t];return e!==void 0?V(e,K3):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",t),null)}function N1(t){let e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique_common":e=C1(s);break}}j.lights[t.getAttribute("id")]=e}function C1(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"directional":case"point":case"spot":case"ambient":e.technique=s.nodeName,e.parameters=_1(s)}}return e}function _1(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":const r=N(s.textContent);e.color=new a.Color().fromArray(r),a.ColorManagement.colorSpaceToWorking(e.color,a.SRGBColorSpace);break;case"falloff_angle":e.falloffAngle=parseFloat(s.textContent);break;case"quadratic_attenuation":const c=parseFloat(s.textContent);e.distance=c?Math.sqrt(1/c):0;break}}return e}function Y3(t){let e;switch(t.technique){case"directional":e=new a.DirectionalLight;break;case"point":e=new a.PointLight;break;case"spot":e=new a.SpotLight;break;case"ambient":e=new a.AmbientLight;break}return t.parameters.color&&e.color.copy(t.parameters.color),t.parameters.distance&&(e.distance=t.parameters.distance),e}function T1(t){const e=j.lights[t];return e!==void 0?V(e,Y3):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",t),null)}function H1(t){const e={name:t.getAttribute("name"),sources:{},vertices:{},primitives:[]},i=R(t,"mesh")[0];if(i!==void 0){for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;const r=s.getAttribute("id");switch(s.nodeName){case"source":e.sources[r]=j3(s);break;case"vertices":e.vertices=E1(s);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",s.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":e.primitives.push(B1(s));break;default:console.log(s)}}j.geometries[t.getAttribute("id")]=e}}function j3(t){const e={array:[],stride:3};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"float_array":e.array=N(n.textContent);break;case"Name_array":e.array=l(n.textContent);break;case"technique_common":const s=R(n,"accessor")[0];s!==void 0&&(e.stride=parseInt(s.getAttribute("stride")));break}}return e}function E1(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];n.nodeType===1&&(e[n.getAttribute("semantic")]=F(n.getAttribute("source")))}return e}function B1(t){const e={type:t.nodeName,material:t.getAttribute("material"),count:parseInt(t.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=F(s.getAttribute("source")),c=s.getAttribute("semantic"),A=parseInt(s.getAttribute("offset")),m=parseInt(s.getAttribute("set")),w=m>0?c+m:c;e.inputs[w]={id:r,offset:A},e.stride=Math.max(e.stride,A+1),c==="TEXCOORD"&&(e.hasUV=!0);break;case"vcount":e.vcount=J(s.textContent);break;case"p":e.p=J(s.textContent);break}}return e}function V1(t){const e={};for(let i=0;i<t.length;i++){const n=t[i];e[n.type]===void 0&&(e[n.type]=[]),e[n.type].push(n)}return e}function S1(t){let e=0;for(let i=0,n=t.length;i<n;i++)t[i].hasUV===!0&&e++;e>0&&e<t.length&&(t.uvsNeedsFix=!0)}function X3(t){const e={},i=t.sources,n=t.vertices,s=t.primitives;if(s.length===0)return{};const r=V1(s);for(const c in r){const A=r[c];S1(A),e[c]=q1(A,i,n)}return e}function q1(t,e,i){const n={},s={array:[],stride:0},r={array:[],stride:0},c={array:[],stride:0},A={array:[],stride:0},m={array:[],stride:0},w={array:[],stride:4},T={array:[],stride:4},d=new a.BufferGeometry,C=[];let k=0;for(let q=0;q<t.length;q++){const E=t[q],m3=E.inputs;let c3=0;switch(E.type){case"lines":case"linestrips":c3=E.count*2;break;case"triangles":c3=E.count*3;break;case"polylist":for(let t3=0;t3<E.count;t3++){const n3=E.vcount[t3];switch(n3){case 3:c3+=3;break;case 4:c3+=6;break;default:c3+=(n3-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",E.type)}d.addGroup(k,c3,q),k+=c3,E.material&&C.push(E.material);for(const t3 in m3){const n3=m3[t3];switch(t3){case"VERTEX":for(const H3 in i){const k3=i[H3];switch(H3){case"POSITION":const V3=s.array.length;if(_3(E,e[k3],n3.offset,s.array),s.stride=e[k3].stride,e.skinWeights&&e.skinIndices&&(_3(E,e.skinIndices,n3.offset,w.array),_3(E,e.skinWeights,n3.offset,T.array)),E.hasUV===!1&&t.uvsNeedsFix===!0){const h2=(s.array.length-V3)/s.stride;for(let h1=0;h1<h2;h1++)c.array.push(0,0)}break;case"NORMAL":_3(E,e[k3],n3.offset,r.array),r.stride=e[k3].stride;break;case"COLOR":_3(E,e[k3],n3.offset,m.array),m.stride=e[k3].stride;break;case"TEXCOORD":_3(E,e[k3],n3.offset,c.array),c.stride=e[k3].stride;break;case"TEXCOORD1":_3(E,e[k3],n3.offset,A.array),c.stride=e[k3].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',H3)}}break;case"NORMAL":_3(E,e[n3.id],n3.offset,r.array),r.stride=e[n3.id].stride;break;case"COLOR":_3(E,e[n3.id],n3.offset,m.array,!0),m.stride=e[n3.id].stride;break;case"TEXCOORD":_3(E,e[n3.id],n3.offset,c.array),c.stride=e[n3.id].stride;break;case"TEXCOORD1":_3(E,e[n3.id],n3.offset,A.array),A.stride=e[n3.id].stride;break}}}return s.array.length>0&&d.setAttribute("position",new a.Float32BufferAttribute(s.array,s.stride)),r.array.length>0&&d.setAttribute("normal",new a.Float32BufferAttribute(r.array,r.stride)),m.array.length>0&&d.setAttribute("color",new a.Float32BufferAttribute(m.array,m.stride)),c.array.length>0&&d.setAttribute("uv",new a.Float32BufferAttribute(c.array,c.stride)),A.array.length>0&&d.setAttribute("uv1",new a.Float32BufferAttribute(A.array,A.stride)),w.array.length>0&&d.setAttribute("skinIndex",new a.Float32BufferAttribute(w.array,w.stride)),T.array.length>0&&d.setAttribute("skinWeight",new a.Float32BufferAttribute(T.array,T.stride)),n.data=d,n.type=t[0].type,n.materialKeys=C,n}function _3(t,e,i,n,s=!1){const r=t.p,c=t.stride,A=t.vcount;function m(d){let C=r[d+i]*T;const k=C+T;for(;C<k;C++)n.push(w[C]);if(s){const q=n.length-T-1;F3.setRGB(n[q+0],n[q+1],n[q+2],a.SRGBColorSpace),n[q+0]=F3.r,n[q+1]=F3.g,n[q+2]=F3.b}}const w=e.array,T=e.stride;if(t.vcount!==void 0){let d=0;for(let C=0,k=A.length;C<k;C++){const q=A[C];if(q===4){const E=d+c*0,m3=d+c*1,c3=d+c*2,t3=d+c*3;m(E),m(m3),m(t3),m(m3),m(c3),m(t3)}else if(q===3){const E=d+c*0,m3=d+c*1,c3=d+c*2;m(E),m(m3),m(c3)}else if(q>4)for(let E=1,m3=q-2;E<=m3;E++){const c3=d+c*0,t3=d+c*E,n3=d+c*(E+1);m(c3),m(t3),m(n3)}d+=c*q}}else for(let d=0,C=r.length;d<C;d+=c)m(d)}function Z3(t){return V(j.geometries[t],X3)}function R1(t){const e={name:t.getAttribute("name")||"",joints:{},links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":O1(n,e);break}}j.kinematicsModels[t.getAttribute("id")]=e}function F1(t){return t.build!==void 0?t.build:t}function I1(t){return V(j.kinematicsModels[t],F1)}function O1(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"joint":e.joints[n.getAttribute("sid")]=U1(n);break;case"link":e.links.push(Q3(n));break}}}function U1(t){let e;for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"prismatic":case"revolute":e=j1(n);break}}return e}function j1(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",axis:new a.Vector3,limits:{min:0,max:0},type:t.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=N(n.textContent);e.axis.fromArray(s);break;case"limits":const r=n.getElementsByTagName("max")[0],c=n.getElementsByTagName("min")[0];e.limits.max=parseFloat(r.textContent),e.limits.min=parseFloat(c.textContent);break}}return e.limits.min>=e.limits.max&&(e.static=!0),e.middlePosition=(e.limits.min+e.limits.max)/2,e}function Q3(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",attachments:[],transforms:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"attachment_full":e.attachments.push(D1(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(e1(n));break}}return e}function D1(t){const e={joint:t.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"link":e.links.push(Q3(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(e1(n));break}}return e}function e1(t){const e={type:t.nodeName},i=N(t.textContent);switch(e.type){case"matrix":e.obj=new a.Matrix4,e.obj.fromArray(i).transpose();break;case"translate":e.obj=new a.Vector3,e.obj.fromArray(i);break;case"rotate":e.obj=new a.Vector3,e.obj.fromArray(i),e.angle=a.MathUtils.degToRad(i[3]);break}return e}function G1(t){const e={name:t.getAttribute("name")||"",rigidBodies:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"rigid_body":e.rigidBodies[n.getAttribute("name")]={},P1(n,e.rigidBodies[n.getAttribute("name")]);break}}j.physicsModels[t.getAttribute("id")]=e}function P1(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":$1(n,e);break}}}function $1(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"inertia":e.inertia=N(n.textContent);break;case"mass":e.mass=N(n.textContent)[0];break}}}function W1(t){const e={bindJointAxis:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"bind_joint_axis":e.bindJointAxis.push(J1(n));break}}j.kinematicsScenes[F(t.getAttribute("url"))]=e}function J1(t){const e={target:t.getAttribute("target").split("/").pop()};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=n.getElementsByTagName("param")[0];e.axis=s.textContent;const r=e.axis.split("inst_").pop().split("axis")[0];e.jointIndex=r.substring(0,r.length-1);break}}return e}function K1(t){return t.build!==void 0?t.build:t}function Y1(t){return V(j.kinematicsScenes[t],K1)}function X1(){const t=Object.keys(j.kinematicsModels)[0],e=Object.keys(j.kinematicsScenes)[0],i=Object.keys(j.visualScenes)[0];if(t===void 0||e===void 0)return;const n=I1(t),s=Y1(e),r=o1(i),c=s.bindJointAxis,A={};for(let T=0,d=c.length;T<d;T++){const C=c[T],k=w3.querySelector('[sid="'+C.target+'"]');if(k){const q=k.parentElement;m(C.jointIndex,q)}}function m(T,d){const C=d.getAttribute("name"),k=n.joints[T];r.traverse(function(q){q.name===C&&(A[T]={object:q,transforms:Z1(d),joint:k,position:k.zeroPosition})})}const w=new a.Matrix4;d1={joints:n&&n.joints,getJointValue:function(T){const d=A[T];if(d)return d.position;console.warn("THREE.ColladaLoader: Joint "+T+" doesn't exist.")},setJointValue:function(T,d){const C=A[T];if(C){const k=C.joint;if(d>k.limits.max||d<k.limits.min)console.warn("THREE.ColladaLoader: Joint "+T+" value "+d+" outside of limits (min: "+k.limits.min+", max: "+k.limits.max+").");else if(k.static)console.warn("THREE.ColladaLoader: Joint "+T+" is static.");else{const q=C.object,E=k.axis,m3=C.transforms;N3.identity();for(let c3=0;c3<m3.length;c3++){const t3=m3[c3];if(t3.sid&&t3.sid.indexOf(T)!==-1)switch(k.type){case"revolute":N3.multiply(w.makeRotationAxis(E,a.MathUtils.degToRad(d)));break;case"prismatic":N3.multiply(w.makeTranslation(E.x*d,E.y*d,E.z*d));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+k.type);break}else switch(t3.type){case"matrix":N3.multiply(t3.obj);break;case"translate":N3.multiply(w.makeTranslation(t3.obj.x,t3.obj.y,t3.obj.z));break;case"scale":N3.scale(t3.obj);break;case"rotate":N3.multiply(w.makeRotationAxis(t3.obj,t3.angle));break}}q.matrix.copy(N3),q.matrix.decompose(q.position,q.quaternion,q.scale),A[T].position=d}}else console.log("THREE.ColladaLoader: "+T+" does not exist.")}}}function Z1(t){const e=[],i=w3.querySelector('[id="'+t.id+'"]');for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;let r,c;switch(s.nodeName){case"matrix":r=N(s.textContent);const A=new a.Matrix4().fromArray(r).transpose();e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:A});break;case"translate":case"scale":r=N(s.textContent),c=new a.Vector3().fromArray(r),e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:c});break;case"rotate":r=N(s.textContent),c=new a.Vector3().fromArray(r);const m=a.MathUtils.degToRad(r[3]);e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:c,angle:m});break}}return e}function Q1(t){const e=t.getElementsByTagName("node");for(let i=0;i<e.length;i++){const n=e[i];n.hasAttribute("id")===!1&&n.setAttribute("id",X())}}const N3=new a.Matrix4,E3=new a.Vector3;function D3(t){const e={name:t.getAttribute("name")||"",type:t.getAttribute("type"),id:t.getAttribute("id"),sid:t.getAttribute("sid"),matrix:new a.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType!==1)continue;let s;switch(n.nodeName){case"node":e.nodes.push(n.getAttribute("id")),D3(n);break;case"instance_camera":e.instanceCameras.push(F(n.getAttribute("url")));break;case"instance_controller":e.instanceControllers.push(t1(n));break;case"instance_light":e.instanceLights.push(F(n.getAttribute("url")));break;case"instance_geometry":e.instanceGeometries.push(t1(n));break;case"instance_node":e.instanceNodes.push(F(n.getAttribute("url")));break;case"matrix":s=N(n.textContent),e.matrix.multiply(N3.fromArray(s).transpose()),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"translate":s=N(n.textContent),E3.fromArray(s),e.matrix.multiply(N3.makeTranslation(E3.x,E3.y,E3.z)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"rotate":s=N(n.textContent);const r=a.MathUtils.degToRad(s[3]);e.matrix.multiply(N3.makeRotationAxis(E3.fromArray(s),r)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"scale":s=N(n.textContent),e.matrix.scale(E3.fromArray(s)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"extra":break;default:console.log(n)}}return s1(e.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",e.id):j.nodes[e.id]=e,e}function t1(t){const e={id:F(t.getAttribute("url")),materials:{},skeletons:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"bind_material":const s=n.getElementsByTagName("instance_material");for(let r=0;r<s.length;r++){const c=s[r],A=c.getAttribute("symbol"),m=c.getAttribute("target");e.materials[A]=F(m)}break;case"skeleton":e.skeletons.push(F(n.textContent));break}}return e}function e2(t,e){const i=[],n=[];let s,r,c;for(s=0;s<t.length;s++){const w=t[s];let T;if(s1(w))T=B3(w),n1(T,e,i);else if(a2(w)){const C=j.visualScenes[w].children;for(let k=0;k<C.length;k++){const q=C[k];if(q.type==="JOINT"){const E=B3(q.id);n1(E,e,i)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",w)}for(s=0;s<e.length;s++)for(r=0;r<i.length;r++)if(c=i[r],c.bone.name===e[s].name){n[s]=c,c.processed=!0;break}for(s=0;s<i.length;s++)c=i[s],c.processed===!1&&(n.push(c),c.processed=!0);const A=[],m=[];for(s=0;s<n.length;s++)c=n[s],A.push(c.bone),m.push(c.boneInverse);return new a.Skeleton(A,m)}function n1(t,e,i){t.traverse(function(n){if(n.isBone===!0){let s;for(let r=0;r<e.length;r++){const c=e[r];if(c.name===n.name){s=c.boneInverse;break}}s===void 0&&(s=new a.Matrix4),i.push({bone:n,boneInverse:s,processed:!1})}})}function t2(t){const e=[],i=t.matrix,n=t.nodes,s=t.type,r=t.instanceCameras,c=t.instanceControllers,A=t.instanceLights,m=t.instanceGeometries,w=t.instanceNodes;for(let d=0,C=n.length;d<C;d++)e.push(B3(n[d]));for(let d=0,C=r.length;d<C;d++){const k=k1(r[d]);k!==null&&e.push(k.clone())}for(let d=0,C=c.length;d<C;d++){const k=c[d],q=S(k.id),E=Z3(q.id),m3=i1(E,k.materials),c3=k.skeletons,t3=q.skin.joints,n3=e2(c3,t3);for(let H3=0,k3=m3.length;H3<k3;H3++){const V3=m3[H3];V3.isSkinnedMesh&&(V3.bind(n3,q.skin.bindMatrix),V3.normalizeSkinWeights()),e.push(V3)}}for(let d=0,C=A.length;d<C;d++){const k=T1(A[d]);k!==null&&e.push(k.clone())}for(let d=0,C=m.length;d<C;d++){const k=m[d],q=Z3(k.id),E=i1(q,k.materials);for(let m3=0,c3=E.length;m3<c3;m3++)e.push(E[m3])}for(let d=0,C=w.length;d<C;d++)e.push(B3(w[d]).clone());let T;if(n.length===0&&e.length===1)T=e[0];else{T=s==="JOINT"?new a.Bone:new a.Group;for(let d=0;d<e.length;d++)T.add(e[d])}return T.name=s==="JOINT"?t.sid:t.name,T.matrix.copy(i),T.matrix.decompose(T.position,T.quaternion,T.scale),T}const n2=new a.MeshBasicMaterial({name:a.Loader.DEFAULT_MATERIAL_NAME,color:16711935});function i2(t,e){const i=[];for(let n=0,s=t.length;n<s;n++){const r=e[t[n]];r===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",t[n]),i.push(n2)):i.push(z1(r))}return i}function i1(t,e){const i=[];for(const n in t){const s=t[n],r=i2(s.materialKeys,e);if(r.length===0&&(n==="lines"||n==="linestrips"?r.push(new a.LineBasicMaterial):r.push(new a.MeshPhongMaterial)),n==="lines"||n==="linestrips")for(let w=0,T=r.length;w<T;w++){const d=r[w];if(d.isMeshPhongMaterial===!0||d.isMeshLambertMaterial===!0){const C=new a.LineBasicMaterial;C.color.copy(d.color),C.opacity=d.opacity,C.transparent=d.transparent,r[w]=C}}const c=s.data.attributes.skinIndex!==void 0,A=r.length===1?r[0]:r;let m;switch(n){case"lines":m=new a.LineSegments(s.data,A);break;case"linestrips":m=new a.Line(s.data,A);break;case"triangles":case"polylist":c?m=new a.SkinnedMesh(s.data,A):m=new a.Mesh(s.data,A);break}i.push(m)}return i}function s1(t){return j.nodes[t]!==void 0}function B3(t){return V(j.nodes[t],t2)}function s2(t){const e={name:t.getAttribute("name"),children:[]};Q1(t);const i=R(t,"node");for(let n=0;n<i.length;n++)e.children.push(D3(i[n]));j.visualScenes[t.getAttribute("id")]=e}function a1(t){const e=new a.Group;e.name=t.name;const i=t.children;for(let n=0;n<i.length;n++){const s=i[n];e.add(B3(s.id))}return e}function a2(t){return j.visualScenes[t]!==void 0}function o1(t){return V(j.visualScenes[t],a1)}function o2(t){const e=R(t,"instance_visual_scene")[0];return o1(F(e.getAttribute("url")))}function r2(){const t=j.clips;if(l3(t)===!0){if(l3(j.animations)===!1){const e=[];for(const i in j.animations){const n=L(i);for(let s=0,r=n.length;s<r;s++)e.push(n[s])}I3.push(new a.AnimationClip("default",-1,e))}}else for(const e in t)I3.push(i3(e))}function c2(t){let e="";const i=[t];for(;i.length;){const n=i.shift();n.nodeType===Node.TEXT_NODE?e+=n.textContent:(e+=`
|
|
2
2
|
`,i.push(...n.childNodes))}return e.trim()}if(_.length===0)return{scene:new a.Scene};const r1=new DOMParser().parseFromString(_,"application/xml"),w3=R(r1,"COLLADA")[0],G3=r1.getElementsByTagName("parsererror")[0];if(G3!==void 0){const t=R(G3,"div")[0];let e;return t?e=t.textContent:e=c2(G3),console.error(`THREE.ColladaLoader: Failed to parse collada file.
|
|
3
3
|
`,e),null}const l2=w3.getAttribute("version");console.debug("THREE.ColladaLoader: File version",l2);const c1=d3(R(w3,"asset")[0]),l1=new a.TextureLoader(this.manager);l1.setPath(this.resourcePath||P).setCrossOrigin(this.crossOrigin);let P3;u1&&(P3=new u1(this.manager),P3.setPath(this.resourcePath||P));const F3=new a.Color,I3=[];let d1={},d2=0;const j={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};h(w3,"library_animations","animation",z),h(w3,"library_animation_clips","animation_clip",x),h(w3,"library_controllers","controller",Q),h(w3,"library_images","image",M),h(w3,"library_effects","effect",v),h(w3,"library_materials","material",w1),h(w3,"library_cameras","camera",M1),h(w3,"library_lights","light",N1),h(w3,"library_geometries","geometry",H1),h(w3,"library_nodes","node",D3),h(w3,"library_visual_scenes","visual_scene",s2),h(w3,"library_kinematics_models","kinematics_model",R1),h(w3,"library_physics_models","physics_model",G1),h(w3,"scene","instance_kinematics_scene",W1),o(j.animations,f),o(j.clips,o3),o(j.controllers,W),o(j.images,B),o(j.effects,W3),o(j.materials,J3),o(j.cameras,K3),o(j.lights,Y3),o(j.geometries,X3),o(j.visualScenes,a1),r2(),X1();const O3=o2(R(w3,"scene")[0]);return O3.animations=I3,c1.upAxis==="Z_UP"&&(console.warn("THREE.ColladaLoader: You are loading an asset with a Z-UP coordinate system. The loader just rotates the asset to transform it into Y-UP. The vertex data are not converted, see #24289."),O3.rotation.set(-Math.PI/2,0,0)),O3.scale.multiplyScalar(c1.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),I3},kinematics:d1,library:j,scene:O3}}}const $3=new a.Quaternion,f1=new a.Euler;function S3(v3){return v3?v3.trim().split(/\s+/g).map(_=>parseFloat(_)):[0,0,0]}function p1(v3,_,P=!1){P||v3.rotation.set(0,0,0),f1.set(_[0],_[1],_[2],"ZYX"),$3.setFromEuler(f1),$3.multiply(v3.quaternion),v3.quaternion.copy($3)}class g1{constructor(_){this.manager=_||a.DefaultLoadingManager,this.loadMeshCb=this.defaultMeshLoader.bind(this),this.parseVisual=!0,this.parseCollision=!1,this.packages="",this.workingPath="",this.fetchOptions={}}loadAsync(_){return new Promise((P,R)=>{this.load(_,P,null,R)})}load(_,P,R,l){const N=this.manager,J=a.LoaderUtils.extractUrlBase(_),F=this.manager.resolveURL(_);N.itemStart(F),fetch(F,this.fetchOptions).then(X=>{if(X.ok)return R&&R(null),X.text();throw new Error(`URDFLoader: Failed to load url '${F}' with error code ${X.status} : ${X.statusText}.`)}).then(X=>{const l3=this.parse(X,this.workingPath||J);P(l3),N.itemEnd(F)}).catch(X=>{l?l(X):console.error("URDFLoader: Error loading file.",X),N.itemError(F),N.itemEnd(F)})}parse(_,P=this.workingPath){const R=this.packages,l=this.loadMeshCb,N=this.parseVisual,J=this.parseCollision,F=this.manager,X={},l3={},d3={};function h3(p){if(!/^package:\/\//.test(p))return P?P+p:p;const[f,L]=p.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof R=="string")return R.endsWith(f)?R+"/"+L:R+"/"+f+"/"+L;if(R instanceof Function)return R(f)+"/"+L;if(typeof R=="object")return f in R?R[f]+"/"+L:(console.error(`URDFLoader : ${f} not found in provided package list.`),null)}function $(p){let f;p instanceof Document?f=[...p.children]:p instanceof Element?f=[p]:f=[...new DOMParser().parseFromString(p,"text/xml").children];const L=f.filter(g=>g.nodeName==="robot").pop();return h(L)}function h(p){const f=[...p.children],L=f.filter(U=>U.nodeName.toLowerCase()==="link"),g=f.filter(U=>U.nodeName.toLowerCase()==="joint"),I=f.filter(U=>U.nodeName.toLowerCase()==="material"),O=new a.URDFRobot;O.robotName=p.getAttribute("name"),O.urdfRobotNode=p,I.forEach(U=>{const H=U.getAttribute("name");d3[H]=z(U)});const u={},b={};L.forEach(U=>{const H=U.getAttribute("name"),Y=p.querySelector(`child[link="${H}"]`)===null;X[H]=V(U,u,b,Y?O:null)}),g.forEach(U=>{const H=U.getAttribute("name");l3[H]=o(U)}),O.joints=l3,O.links=X,O.colliders=b,O.visual=u;const G=Object.values(l3);return G.forEach(U=>{U instanceof a.URDFMimicJoint&&l3[U.mimicJoint].mimicJoints.push(U)}),G.forEach(U=>{const H=new Set,Y=A3=>{if(H.has(A3))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");H.add(A3),A3.mimicJoints.forEach(g3=>{Y(g3)})};Y(U)}),O.frames={...b,...u,...X,...l3},O}function o(p){const f=[...p.children],L=p.getAttribute("type");let g;const I=f.find(H=>H.nodeName.toLowerCase()==="mimic");I?(g=new a.URDFMimicJoint,g.mimicJoint=I.getAttribute("joint"),g.multiplier=parseFloat(I.getAttribute("multiplier")||1),g.offset=parseFloat(I.getAttribute("offset")||0)):g=new a.URDFJoint,g.urdfNode=p,g.name=p.getAttribute("name"),g.urdfName=g.name,g.jointType=L;let O=null,u=null,b=[0,0,0],G=[0,0,0];f.forEach(H=>{const Y=H.nodeName.toLowerCase();Y==="origin"?(b=S3(H.getAttribute("xyz")),G=S3(H.getAttribute("rpy"))):Y==="child"?u=X[H.getAttribute("link")]:Y==="parent"?O=X[H.getAttribute("link")]:Y==="limit"&&(g.limit.lower=parseFloat(H.getAttribute("lower")||g.limit.lower),g.limit.upper=parseFloat(H.getAttribute("upper")||g.limit.upper))}),O.add(g),g.add(u),p1(g,G),g.position.set(b[0],b[1],b[2]);const U=f.filter(H=>H.nodeName.toLowerCase()==="axis")[0];if(U){const H=U.getAttribute("xyz").split(/\s+/g).map(Y=>parseFloat(Y));g.axis=new a.Vector3(H[0],H[1],H[2]),g.axis.normalize()}return g}function V(p,f,L,g=null){g===null&&(g=new a.URDFLink);const I=[...p.children];return g.name=p.getAttribute("name"),g.urdfName=g.name,g.urdfNode=p,N&&I.filter(u=>u.nodeName.toLowerCase()==="visual").forEach(u=>{const b=y(u,d3);if(g.add(b),u.hasAttribute("name")){const G=u.getAttribute("name");b.name=G,b.urdfName=G,f[G]=b}}),J&&I.filter(u=>u.nodeName.toLowerCase()==="collision").forEach(u=>{const b=y(u);if(g.add(b),u.hasAttribute("name")){const G=u.getAttribute("name");b.name=G,b.urdfName=G,L[G]=b}}),g}function z(p){const f=[...p.children],L=new a.MeshPhongMaterial;return L.name=p.getAttribute("name")||"",f.forEach(g=>{const I=g.nodeName.toLowerCase();if(I==="color"){const O=g.getAttribute("rgba").split(/\s/g).map(u=>parseFloat(u));L.color.setRGB(O[0],O[1],O[2]),L.opacity=O[3],L.transparent=O[3]<1,L.depthWrite=!L.transparent}else if(I==="texture"){const O=g.getAttribute("filename");if(O){const u=new a.TextureLoader(F),b=h3(O);L.map=u.load(b),L.map.colorSpace=a.SRGBColorSpace}}}),L}function y(p,f={}){const L=p.nodeName.toLowerCase()==="collision",g=[...p.children];let I=null;const O=g.filter(b=>b.nodeName.toLowerCase()==="material")[0];if(O){const b=O.getAttribute("name");b&&b in f?I=f[b]:I=z(O)}else I=new a.MeshPhongMaterial;const u=L?new a.URDFCollider:new a.URDFVisual;return u.urdfNode=p,g.forEach(b=>{const G=b.nodeName.toLowerCase();if(G==="geometry"){const U=b.children[0].nodeName.toLowerCase();if(U==="mesh"){const H=b.children[0].getAttribute("filename"),Y=h3(H);if(Y!==null){const A3=b.children[0].getAttribute("scale");if(A3){const g3=S3(A3);u.scale.set(g3[0],g3[1],g3[2])}l(Y,F,(g3,x)=>{x?console.error("URDFLoader: Error loading mesh.",x):g3&&(g3 instanceof a.Mesh&&(g3.material=I),g3.position.set(0,0,0),g3.quaternion.identity(),u.add(g3))})}}else if(U==="box"){const H=new a.Mesh;H.geometry=new a.BoxGeometry(1,1,1),H.material=I;const Y=S3(b.children[0].getAttribute("size"));H.scale.set(Y[0],Y[1],Y[2]),u.add(H)}else if(U==="sphere"){const H=new a.Mesh;H.geometry=new a.SphereGeometry(1,30,30),H.material=I;const Y=parseFloat(b.children[0].getAttribute("radius"))||0;H.scale.set(Y,Y,Y),u.add(H)}else if(U==="cylinder"){const H=new a.Mesh;H.geometry=new a.CylinderGeometry(1,1,1,30),H.material=I;const Y=parseFloat(b.children[0].getAttribute("radius"))||0,A3=parseFloat(b.children[0].getAttribute("length"))||0;H.scale.set(Y,A3,Y),H.rotation.set(Math.PI/2,0,0),u.add(H)}}else if(G==="origin"){const U=S3(b.getAttribute("xyz")),H=S3(b.getAttribute("rpy"));u.position.set(U[0],U[1],U[2]),u.rotation.set(0,0,0),p1(u,H)}}),u}return $(_)}defaultMeshLoader(_,P,R){/\.stl$/i.test(_)?new T3.STLLoader(P).load(_,N=>{const J=new a.Mesh(N,new a.MeshPhongMaterial);R(J)}):/\.dae$/i.test(_)?new m2(P).load(_,N=>R(N.scene)):console.warn(`URDFLoader: Could not load model at ${_}.
|
|
4
4
|
No loader available`)}}class b2 extends a.Loader{constructor(_){super(_),this.littleEndian=!0}load(_,P,R,l){const N=this,J=new a.FileLoader(N.manager);J.setPath(N.path),J.setResponseType("arraybuffer"),J.setRequestHeader(N.requestHeader),J.setWithCredentials(N.withCredentials),J.load(_,function(F){try{P(N.parse(F))}catch(X){l?l(X):console.error(X),N.manager.itemError(_)}},R,l)}_getDataView(_,P,R,l){switch(R){case"F":return l===8?_.getFloat64(P,this.littleEndian):_.getFloat32(P,this.littleEndian);case"I":return l===1?_.getInt8(P):l===2?_.getInt16(P,this.littleEndian):_.getInt32(P,this.littleEndian);case"U":return l===1?_.getUint8(P):l===2?_.getUint16(P,this.littleEndian):_.getUint32(P,this.littleEndian)}}parse(_){function P(h,o){const V=h.length,z=new Uint8Array(o);let y=0,p=0,f,L,g;do if(f=h[y++],f<32){if(f++,p+f>o)throw new Error("Output buffer is not large enough");if(y+f>V)throw new Error("Invalid compressed data");do z[p++]=h[y++];while(--f)}else{if(L=f>>5,g=p-((f&31)<<8)-1,y>=V)throw new Error("Invalid compressed data");if(L===7&&(L+=h[y++],y>=V))throw new Error("Invalid compressed data");if(g-=h[y++],p+L+2>o)throw new Error("Output buffer is not large enough");if(g<0)throw new Error("Invalid compressed data");if(g>=p)throw new Error("Invalid compressed data");do z[p++]=z[g++];while(--L+2)}while(y<V);return z}function R(h){const o={},V=new Uint8Array(h);let z="",y="",p=0,f=!1;const L=V.length;for(;p<L&&f===!1;){const u=String.fromCharCode(V[p++]);u===`
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as _, watch as V, createElementBlock as C, createCommentVNode as I, openBlock as f, Fragment as le, renderList as se, createElementVNode as O, createBlock as Z, toDisplayString as v, resolveDynamicComponent as ue, onMounted as ce, onUnmounted as ie, createVNode as A } from "vue";
|
|
2
|
-
import { m as me, a as de, b as ye } from "./index-
|
|
2
|
+
import { m as me, a as de, b as ye } from "./index-B9XXiADi.js";
|
|
3
3
|
import { p as E, s as ee, c as k } from "./index-DsSA-OiE.js";
|
|
4
|
-
import { a as te, u as fe } from "./index-
|
|
5
|
-
import { g as ge } from "./index-
|
|
6
|
-
import { e as he, a as ke } from "./array-
|
|
4
|
+
import { a as te, u as fe } from "./index-DpnFkInY.js";
|
|
5
|
+
import { g as ge } from "./index-CyuAoOEv.js";
|
|
6
|
+
import { e as he, a as ke } from "./array-Cq7rTgXG.js";
|
|
7
7
|
import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const x = [
|
|
9
9
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-RZNNLVDX.cjs"),i=require("./index-C8qRkCgn.cjs"),T=require("./index-CxUHJyzF.cjs"),Z=require("./index-DaeE5po7.cjs"),G=require("./array-b4FP8aZn.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],v={key:0,class:"show-content"},ee={class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(E,{emit:j}){const t=E,x=j,h=T.useModelComp(i.pinia),{itemData:p}=i.storeToRefs(h),_=e.ref([]),C=e.ref([]),I=c=>{x("change",{wholeValue:_.value,editValue:c})},S=c=>{const g=i.cloneDeep(_.value),B=g==null?void 0:g.map((d,b)=>(b===(c==null?void 0:c.index)&&(d.compData=c==null?void 0:c.contents),d));_.value=B};e.watch(()=>p.value,()=>{var c;!p.value||((c=p.value)==null?void 0:c.length)===0||(C.value=p.value,_.value=p.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var g;if(((g=t==null?void 0:t.jsonContents)==null?void 0:g.length)>0){h.setOriginalData(t==null?void 0:t.jsonContents),h.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=G.expandStringToJson(t==null?void 0:t.content);h.setOriginalData(c),h.setItemData(c)},{deep:!0,immediate:!0});const w=c=>Z.getComponent(c);return(c,g)=>{var B;return((B=C.value)==null?void 0:B.length)>0?(e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(d,b)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:b},[e.createElementVNode("div",ee,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:b,onChange:I,index:b,onContentChange:S},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ne=K._export_sfc(te,[["__scopeId","data-v-1c04adc8"]]),oe={class:"add-model-content"},ae={key:0,class:"model-import-data"},re={class:"import-button"},le={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view ssComponent"},de={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(E,{emit:j}){const t=E,x=j,h=e.ref(""),p=e.ref([]),_=e.ref(0),C=T.useModelComp(i.pinia);T.useMenuState(i.pinia);const{itemData:I,originalData:S}=i.storeToRefs(C),w=e.ref(null),c=e.ref(0),g=e.ref(""),B=()=>{_.value=window.innerWidth},d=async r=>{var u;const a=(u=i.cloneDeep(r==null?void 0:r.wholeValue))==null?void 0:u.map(o=>{var f;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(f=o.compData)==null?void 0:f.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=G.arrayToNumberArray(k==null?void 0:k.contents)),k))),o});x("change",{originalContents:S.value,currentContents:r==null?void 0:r.wholeValue,editContent:r==null?void 0:r.editValue,stringContent:b(i.cloneDeep(r==null?void 0:r.wholeValue)),arrayToContents:a})},b=r=>{var u;let a=[];return(u=i.cloneDeep(r))==null||u.forEach(o=>{var f,k;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((f=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:f.key)+"="+o.name+"/r/n"),(k=o==null?void 0:o.compData)==null||k.forEach(n=>{var F,$,J,A,q,M,L,R,z,W,H,P;if(s!=null&&s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))if(!((F=n==null?void 0:n.contents)!=null&&F.length))a.push((($=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:$.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let m=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!m)return;if(Object.keys(m).includes("label")&&Object.keys(m).includes("key")&&Object.keys(m).includes("width"))if(((q=(A=n.contents)==null?void 0:A.filter(y=>y.width!==1))==null?void 0:q.length)===0){const y=(M=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:M.map(l=>({[l.label]:l.value}));a.push(((L=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(y)+"/r/n")}else{let y=[];(R=i.cloneDeep(n==null?void 0:n.contents))==null||R.reduce((l,D)=>{var U;return l[D.label]=D.key,((U=Object.keys(i.cloneDeep(l)))==null?void 0:U.length)>=D.width&&(y.push(i.cloneDeep(l)),l={}),l},{}),a.push(((z=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:z.key)+"="+JSON.stringify(y)+"/r/n")}else if(Object.keys(m).includes("label")){const y=(W=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:W.map(l=>l.label);a.push(((H=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:H.key)+"="+JSON.stringify(y)+"/r/n")}else a.push(((P=s==null?void 0:s.find(y=>(y==null?void 0:y.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},N=e.ref([]),Q=()=>{w.value.click()},X=r=>{const a=r.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{h.value=o.target.result,N.value=Y(o.target.result),c.value++}catch(f){console.error("解析失败:",f)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",B)}),e.onUnmounted(()=>{window.removeEventListener("resize",B)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{h.value=t==null?void 0:t.content,p.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var r;((r=N.value)==null?void 0:r.length)!==0&&(C.setOriginalData(N.value),C.setItemData(N.value))},{deep:!0,immediate:!0});const Y=r=>{let a=r.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const f=new Function(`return ${a}`)();if(Array.isArray(f)||typeof f=="object")return f;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(r,a)=>{var u;return e.openBlock(),e.createElementBlock("div",oe,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:w,accept:".txt",onChange:X,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:Q,class:"import-button-content"},"导入文件"),g.value?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:_.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:h.value,onChange:d,jsonContents:p.value,key:_.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=K._export_sfc(de,[["__scopeId","data-v-91ce80be"]]);exports.default=me;
|