ss-component-new 1.2.92 → 1.2.94
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-B5xRp-vz.js → MTLLoader-BqMu0YKt.js} +1 -1
- package/dist/{MTLLoader-D80GV1WB.cjs → MTLLoader-zRjWtCnL.cjs} +1 -1
- package/dist/{OrbitControls-Dh9PyFO4.js → OrbitControls-CkSV-7e2.js} +1 -1
- package/dist/{OrbitControls-CqIpswqa.cjs → OrbitControls-uNfFrSzp.cjs} +1 -1
- package/dist/{animationData-BtND2VWy.cjs → animationData-BXJymBf1.cjs} +1 -1
- package/dist/{animationData-DZ0i7k1j.js → animationData-CC_EC9j-.js} +3 -3
- package/dist/{array-Ct6rQOAk.js → array-Cn-xxeGh.js} +1 -1
- package/dist/{array-BQH8ILpd.cjs → array-Dg-eQLeS.cjs} +1 -1
- package/dist/{dataUtil-DrslFFRT.cjs → dataUtil-BFP1At6d.cjs} +1 -1
- package/dist/{dataUtil-BS-wt9Xk.js → dataUtil-C4lMM2nY.js} +1 -1
- package/dist/{iconfont-0T5xTLj8.cjs → iconfont-BRM_rpi8.cjs} +1 -1
- package/dist/{iconfont-DN8mra_i.js → iconfont-CCGqXI2r.js} +2 -2
- package/dist/{index-DVMvlM3X.cjs → index--F1U6vAJ.cjs} +1 -1
- package/dist/{index-Q33CutvH.js → index-260Qu36O.js} +5 -5
- package/dist/{index-C_DIwBxS.cjs → index-2LVJybjB.cjs} +1 -1
- package/dist/{index-CfHIgB5C.js → index-3t_HapIu.js} +2 -2
- package/dist/{index-DJ14vVkb.js → index-6MBk7YsU.js} +2 -2
- package/dist/{index-BKaTMDZC.js → index-B-pYf4fC.js} +5 -5
- package/dist/index-BKYwhVDU.js +12164 -0
- package/dist/{index-BGvxk4QX.cjs → index-BL51CN92.cjs} +1 -1
- package/dist/{index-CZLI4UKD.js → index-BNWYMxbm.js} +1 -1
- package/dist/{index-CuchbMC7.cjs → index-BOsFRR22.cjs} +1 -1
- package/dist/{index-1gXFTnuu.js → index-BQgBL4mp.js} +19 -19
- package/dist/index-BRNs8_K6.cjs +1 -0
- package/dist/{index-CylLhQJV.cjs → index-BU95sZ0Y.cjs} +1 -1
- package/dist/{index-BooqzjWY.cjs → index-BWfzhlIb.cjs} +1 -1
- package/dist/{index-Dgdu_Hp_.js → index-BayQ6HRi.js} +1 -1
- package/dist/{index-NMPHjxEr.cjs → index-BcIzliCn.cjs} +1 -1
- package/dist/{index-CQ7UrLDv.js → index-BcJ5yKyA.js} +7 -7
- package/dist/{index-DkEISMpK.js → index-Bg0aEQlB.js} +1 -1
- package/dist/{index-D4EyLxA0.cjs → index-BjjK_8u-.cjs} +1 -1
- package/dist/{index-BtKhX2oM.js → index-Bl3fYYAV.js} +5 -5
- package/dist/{index-m_VPPkQD.cjs → index-C1Y17JEG.cjs} +1 -1
- package/dist/{index-B_KvjL9P.cjs → index-C64dGSqi.cjs} +1 -1
- package/dist/{index-DSmsp4fK.cjs → index-C8N3F3ec.cjs} +1 -1
- package/dist/{index-BvxyAOvM.js → index-CDNt_0sV.js} +2 -2
- package/dist/{index-BwaM5xSn.cjs → index-CSZdFHsD.cjs} +1 -1
- package/dist/{index-C1IhJdLY.cjs → index-CTh_Ncuz.cjs} +1 -1
- package/dist/{index-BeEVAZ15.cjs → index-CVAhcUed.cjs} +1 -1
- package/dist/{index-BdwtuRne.cjs → index-Cbmn26EX.cjs} +1 -1
- package/dist/{index-BprBzYZ5.cjs → index-CjspLKZN.cjs} +1 -1
- package/dist/{index-CRe-_A5B.cjs → index-Cus62ZeK.cjs} +1 -1
- package/dist/{index-CMb4s6NV.js → index-D0NuMuh5.js} +1 -1
- package/dist/{index-CZsCZbCY.js → index-D78TpO0w.js} +2 -2
- package/dist/{index-C7HjGMoA.js → index-D7s3P2jl.js} +3 -3
- package/dist/{index-CV7OZAqo.js → index-DEX2MMzx.js} +1 -1
- package/dist/{index-DQTbLJJt.js → index-DI0PUVaR.js} +2 -2
- package/dist/{index-91lUH3Vt.cjs → index-DMwTF1Hl.cjs} +1 -1
- package/dist/{index-bz_QKqhV.cjs → index-DNJpT0_O.cjs} +1 -1
- package/dist/{index-YxS-TBi2.js → index-DQ5DjIVG.js} +3 -3
- package/dist/{index-BjFqn1jw.js → index-DQFvXEIV.js} +2 -2
- package/dist/{index-CiNYm1fC.js → index-DQOvMRe3.js} +2 -2
- package/dist/{index-D_6peWlG.cjs → index-DY8hmk1Q.cjs} +1 -1
- package/dist/{index-CewrcECw.js → index-DbJoeUF-.js} +1 -1
- package/dist/{index-DZQ1Y80J.js → index-Df60duTb.js} +1 -1
- package/dist/{index-fN7eaisA.cjs → index-DlnbkEM7.cjs} +1 -1
- package/dist/{index-fbsH9PEh.js → index-Dm46N078.js} +1 -1
- package/dist/{index-C7Ks0zLC.js → index-FKHrqiVz.js} +7 -7
- package/dist/{index-DW_lU8F7.cjs → index-IemfeHbH.cjs} +1 -1
- package/dist/{index-C07slqLJ.js → index-SrN23_le.js} +4 -4
- package/dist/{index-BWhMaL3V.js → index-TGJkSdz2.js} +2 -2
- package/dist/{index-DwsI_FxR.js → index-c4KXPOVQ.js} +11 -11
- package/dist/{index-DavM6N4X.cjs → index-dme4eW3i.cjs} +1 -1
- package/dist/{index-Z2dyIgOs.cjs → index-eQzqwKhP.cjs} +1 -1
- package/dist/{index-BUYZ6Pzj.cjs → index-etoQsMTc.cjs} +1 -1
- package/dist/{index-CpYf3edW.cjs → index-fGeOwHSq.cjs} +1 -1
- package/dist/{index-C1aAW06_.js → index-h1B7tCqK.js} +350 -350
- package/dist/{index-CtOo2IDL.cjs → index-nSK480UF.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-qrHH3IDA.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CUBR2vja.js} +11 -11
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CjVqxeCk.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CYt_iRxB.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-QzgaFA5S.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B4a6duPj.cjs} +59 -59
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DEgtwZwW.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CdhgB7xx.js} +1648 -1643
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-9r-1e4S8.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-CVndK9Z1.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-IuoTm-WE.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-pPec6lo_.js} +5 -5
- package/dist/{index.vue_vue_type_style_index_1_lang-kYz8t0xw.js → index.vue_vue_type_style_index_1_lang-Bjoq8geZ.js} +852 -815
- package/dist/{index.vue_vue_type_style_index_1_lang-DnfCrXiN.cjs → index.vue_vue_type_style_index_1_lang-DBVG4Icj.cjs} +15 -15
- package/dist/{index.vue_vue_type_style_index_1_lang-DR71_XjN.cjs → index.vue_vue_type_style_index_1_lang-DSolTjJR.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-CDl_PU-6.js → index.vue_vue_type_style_index_1_lang-DeN-1hjz.js} +4 -4
- package/dist/{main-BxTLrfxf.cjs → main-BiNhUZSd.cjs} +1 -1
- package/dist/{main-D_3GSDl9.js → main-rwu2YuKn.js} +4 -4
- 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 +1 -1
- package/dist/ss-component.js +10 -10
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +11 -11
- package/dist/{threeModel-BKLggDE-.js → threeModel-B9va_TpV.js} +4 -4
- package/dist/{threeModel-D4-2rEpM.cjs → threeModel-CxKhN45R.cjs} +1 -1
- package/dist/{threePreview-oszvdj-G.js → threePreview-C_TwTZy-.js} +3 -3
- package/dist/{threePreview-QIurmOdU.cjs → threePreview-DDtKTkbQ.cjs} +1 -1
- package/dist/{threeSceneView-CaHI2V82.cjs → threeSceneView-Bkm_GCcO.cjs} +1 -1
- package/dist/{threeSceneView-BR1l9yTW.js → threeSceneView-D5zDhJoR.js} +10 -10
- package/dist/{threeSceneViewForCPMPIP-wZTvUhLm.js → threeSceneViewForCPMPIP-8I4MXfwL.js} +9 -9
- package/dist/{threeSceneViewForCPMPIP-DbvRq5YC.cjs → threeSceneViewForCPMPIP-BXDzBuqf.cjs} +1 -1
- package/dist/{threeTrackPathView-CAK5om32.js → threeTrackPathView-QDp-h2uJ.js} +4 -4
- package/dist/{threeTrackPathView-CF9ierHN.cjs → threeTrackPathView-UDhsLLJ8.cjs} +1 -1
- package/dist/{threeViewerHost-iajMfGA9.cjs → threeViewerHost-C1cS3BQx.cjs} +2 -2
- package/dist/{threeViewerHost-CeTJmyoE.js → threeViewerHost-Clyh4deQ.js} +3 -3
- package/dist/{urdfTree-DIyCunQo.js → urdfTree-CfBupHPQ.js} +1 -1
- package/dist/{urdfTree-CWwnorES.cjs → urdfTree-DTIOLiOJ.cjs} +1 -1
- package/dist/{workpieceTreePanel-YfDCHyA3.cjs → workpieceTreePanel-BDkiRWjc.cjs} +1 -1
- package/dist/{workpieceTreePanel-DC0GHh3g.js → workpieceTreePanel-IMs7wLsr.js} +5 -5
- package/package.json +1 -1
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/index-BYoEVm0h.cjs +0 -1
- package/dist/index-a_TWt7Sj.js +0 -12178
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";const h=require("./index-C8qRkCgn.cjs"),l=require("vue");function
|
|
1
|
+
"use strict";const h=require("./index-C8qRkCgn.cjs"),l=require("vue");function Qr(e){return e}function uo(e,n,t){switch(t.length){case 0:return e.call(n);case 1:return e.call(n,t[0]);case 2:return e.call(n,t[0],t[1]);case 3:return e.call(n,t[0],t[1],t[2])}return e.apply(n,t)}var co=800,fo=16,ho=Date.now;function po(e){var n=0,t=0;return function(){var r=ho(),i=fo-(r-t);if(t=r,i>0){if(++n>=co)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function yo(e){return function(){return e}}var go=h.defineProperty?function(e,n){return h.defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:yo(n),writable:!0})}:Qr,ei=po(go),yr=Math.max;function ti(e,n,t){return n=yr(n===void 0?e.length-1:n,0),function(){for(var r=arguments,i=-1,o=yr(r.length-n,0),a=Array(o);++i<o;)a[i]=r[n+i];i=-1;for(var s=Array(n+1);++i<n;)s[i]=r[i];return s[n]=t(a),uo(e,this,s)}}var gr=h.Symbol?h.Symbol.isConcatSpreadable:void 0;function vo(e){return h.isArray(e)||h.isArguments(e)||!!(gr&&e&&e[gr])}function Fn(e,n,t,r,i){var o=-1,a=e.length;for(t||(t=vo),i||(i=[]);++o<a;){var s=e[o];n>0&&t(s)?n>1?Fn(s,n-1,t,r,i):h.arrayPush(i,s):r||(i[i.length]=s)}return i}function ni(e){var n=e==null?0:e.length;return n?Fn(e,1):[]}function ri(e){return ei(ti(e,void 0,ni),e+"")}function mo(e,n){return e!=null&&n in Object(e)}function bo(e,n,t){n=h.castPath(n,e);for(var r=-1,i=n.length,o=!1;++r<i;){var a=h.toKey(n[r]);if(!(o=e!=null&&t(e,a)))break;e=e[a]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&h.isLength(i)&&h.isIndex(a,i)&&(h.isArray(e)||h.isArguments(e)))}function ii(e,n){return e!=null&&bo(e,n,mo)}function So(e,n,t){for(var r=-1,i=n.length,o={};++r<i;){var a=n[r],s=h.baseGet(e,a);t(s,a)&&h.baseSet(o,h.castPath(a,e),s)}return o}function Eo(e,n){return So(e,n,function(t,r){return ii(e,r)})}var oi=ri(function(e,n){return e==null?{}:Eo(e,n)});const St="update:modelValue",Tn="change",zt="input";function To(e,n,t,r){const i=t-n;return e/=r/2,e<1?i/2*e*e*e+n:i/2*((e-=2)*e*e+2)+n}const ai=e=>h.isClient?window.requestAnimationFrame(e):setTimeout(e,16),si=e=>h.isClient?window.cancelAnimationFrame(e):clearTimeout(e),wo=(e,n)=>{if(!h.isClient)return!1;const t={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(n)],r=h.getStyle(e,t);return["scroll","auto","overlay"].some(i=>r.includes(i))},Do=(e,n)=>{if(!h.isClient)return;let t=e;for(;t;){if([window,document,document.documentElement].includes(t))return window;if(wo(t,n))return t;t=t.parentNode}return t};let Bt;const li=e=>{var n;if(!h.isClient)return 0;if(Bt!==void 0)return Bt;const t=document.createElement("div");t.className=`${e}-scrollbar__wrap`,t.style.visibility="hidden",t.style.width="100px",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);const r=t.offsetWidth;t.style.overflow="scroll";const i=document.createElement("div");i.style.width="100%",t.appendChild(i);const o=i.offsetWidth;return(n=t.parentNode)==null||n.removeChild(t),Bt=r-o,Bt};function ko(e,n){if(!h.isClient)return;if(!n){e.scrollTop=0;return}const t=[];let r=n.offsetParent;for(;r!==null&&e!==r&&e.contains(r);)t.push(r),r=r.offsetParent;const i=n.offsetTop+t.reduce((c,u)=>c+u.offsetTop,0),o=i+n.offsetHeight,a=e.scrollTop,s=a+e.clientHeight;i<a?e.scrollTop=i:o>s&&(e.scrollTop=o-e.clientHeight)}function Ao(e,n,t,r,i){const o=Date.now();let a;const s=()=>{const u=Date.now()-o,f=To(u>r?r:u,n,t,r);h.isWindow(e)?e.scrollTo(window.pageXOffset,f):e.scrollTop=f,u<r?a=ai(s):h.isFunction(i)&&i()};return s(),()=>{a&&si(a)}}const Co=(e,n)=>h.isWindow(n)?e.ownerDocument.documentElement:n,Io=e=>h.isWindow(e)?window.scrollY:e.scrollTop;let we;const xo={height:"0",visibility:"hidden",overflow:h.isFirefox()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Bo=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],vr=e=>{const n=Number.parseFloat(e);return Number.isNaN(n)?e:n};function Mo(e){const n=window.getComputedStyle(e),t=n.getPropertyValue("box-sizing"),r=Number.parseFloat(n.getPropertyValue("padding-bottom"))+Number.parseFloat(n.getPropertyValue("padding-top")),i=Number.parseFloat(n.getPropertyValue("border-bottom-width"))+Number.parseFloat(n.getPropertyValue("border-top-width"));return{contextStyle:Bo.map(a=>[a,n.getPropertyValue(a)]),paddingSize:r,borderSize:i,boxSizing:t}}function mr(e,n=1,t){var r,i;we||(we=document.createElement("textarea"),((r=e.parentNode)!=null?r:document.body).appendChild(we));const{paddingSize:o,borderSize:a,boxSizing:s,contextStyle:c}=Mo(e);c.forEach(([d,g])=>we==null?void 0:we.style.setProperty(d,g)),Object.entries(xo).forEach(([d,g])=>we==null?void 0:we.style.setProperty(d,g,"important")),we.value=e.value||e.placeholder||"";let u=we.scrollHeight;const f={};s==="border-box"?u=u+a:s==="content-box"&&(u=u-o),we.value="";const p=we.scrollHeight-o;if(h.isNumber(n)){let d=p*n;s==="border-box"&&(d=d+o+a),u=Math.max(d,u),f.minHeight=`${d}px`}if(h.isNumber(t)){let d=p*t;s==="border-box"&&(d=d+o+a),u=Math.min(d,u)}return f.height=`${u}px`,(i=we.parentNode)==null||i.removeChild(we),we=void 0,f}const Ro=h.buildProps({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),ui=e=>oi(Ro,e),ci=h.buildProps({id:{type:String,default:void 0},size:h.useSizeProp,disabled:Boolean,modelValue:{type:h.definePropType([String,Number,Object]),default:""},modelModifiers:{type:h.definePropType(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:h.definePropType([Boolean,Object]),default:!1},autocomplete:{type:h.definePropType(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:h.iconPropType,default:h.circle_close_default},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:h.iconPropType},prefixIcon:{type:h.iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:h.definePropType([Object,Array,String]),default:()=>h.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...ui(["ariaLabel"]),inputmode:{type:h.definePropType(String),default:void 0},name:String}),No={[St]:e=>h.isString(e),input:e=>h.isString(e),change:e=>h.isString(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},Po=["class","style"],Oo=/^on[A-Z]/,fi=(e={})=>{const{excludeListeners:n=!1,excludeKeys:t}=e,r=l.computed(()=>((t==null?void 0:t.value)||[]).concat(Po)),i=l.getCurrentInstance();return i?l.computed(()=>{var o;return h.fromPairs(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([a])=>!r.value.includes(a)&&!(n&&Oo.test(a))))}):(h.debugWarn("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),l.computed(()=>({})))},wn={prefix:Math.floor(Math.random()*1e4),current:0},Vo=Symbol("elIdInjection"),hi=()=>l.getCurrentInstance()?l.inject(Vo,wn):wn,qt=e=>{const n=hi();!h.isClient&&n===wn&&h.debugWarn("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
|
2
2
|
usage: app.provide(ID_INJECTION_KEY, {
|
|
3
3
|
prefix: number,
|
|
4
4
|
current: number,
|
|
5
|
-
})`);const t=h.useGetDerivedNamespace();return h.computedEager(()=>l.unref(e)||`${t.value}-id-${n.prefix}-${n.current++}`)},tn=Symbol("formContextKey"),Ln=Symbol("formItemContextKey"),Kn=()=>{const e=l.inject(tn,void 0),n=l.inject(Ln,void 0);return{form:e,formItem:n}},fo=(e,{formItemContext:n,disableIdGeneration:t,disableIdManagement:r})=>{t||(t=l.ref(!1)),r||(r=l.ref(!1));const o=l.getCurrentInstance(),i=()=>{let u=o==null?void 0:o.parent;for(;u;){if(u.type.name==="ElFormItem")return!1;if(u.type.name==="ElLabelWrap")return!0;u=u.parent}return!1},a=l.ref();let s;const c=l.computed(()=>{var u;return!!(!(e.label||e.ariaLabel)&&n&&n.inputIds&&((u=n.inputIds)==null?void 0:u.length)<=1)});return l.onMounted(()=>{s=l.watch([l.toRef(e,"id"),t],([u,f])=>{const p=u??(f?void 0:qt().value);p!==a.value&&(n!=null&&n.removeInputId&&!i()&&(a.value&&n.removeInputId(a.value),!(r!=null&&r.value)&&!f&&p&&n.addInputId(p)),a.value=p)},{immediate:!0})}),l.onUnmounted(()=>{s&&s(),n!=null&&n.removeInputId&&a.value&&n.removeInputId(a.value)}),{isLabeledByFormItem:c,inputId:a}},ho=e=>{const n=l.getCurrentInstance();return l.computed(()=>{var t,r;return(r=(t=n==null?void 0:n.proxy)==null?void 0:t.$props)==null?void 0:r[e]})},Hn=(e,n={})=>{const t=l.ref(void 0),r=n.prop?t:ho("size"),o=n.global?t:h.useGlobalSize(),i=n.form?{size:void 0}:l.inject(tn,void 0),a=n.formItem?{size:void 0}:l.inject(Ln,void 0);return l.computed(()=>r.value||l.unref(e)||(a==null?void 0:a.size)||(i==null?void 0:i.size)||o.value||"")},nn=e=>{const n=ho("disabled"),t=l.inject(tn,void 0);return l.computed(()=>n.value||l.unref(e)||(t==null?void 0:t.disabled)||!1)},Fi='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',vr=e=>typeof Element>"u"?!1:e instanceof Element,Li=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,mr=e=>Array.from(e.querySelectorAll(Fi)).filter(n=>rn(n)&&Li(n)),rn=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},Ki=function(e,n,...t){let r;n.includes("mouse")||n.includes("click")?r="MouseEvents":n.includes("key")?r="KeyboardEvent":r="HTMLEvents";const o=document.createEvent(r);return o.initEvent(n,...t),e.dispatchEvent(o),e},po=e=>!e.getAttribute("aria-owns"),Hi=(e,n,t)=>{const{parentNode:r}=e;if(!r)return null;const o=r.querySelectorAll(t),i=Array.prototype.indexOf.call(o,e);return o[i+n]||null},_n=(e,n)=>{if(!e||!e.focus)return;let t=!1;vr(e)&&!rn(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),t=!0),e.focus(n),vr(e)&&t&&e.removeAttribute("tabindex")},_i=e=>{e&&(_n(e),!po(e)&&e.click())};function go(e,{disabled:n,beforeFocus:t,afterFocus:r,beforeBlur:o,afterBlur:i}={}){const a=l.getCurrentInstance(),{emit:s}=a,c=l.shallowRef(),u=l.ref(!1),f=y=>{const g=h.isFunction(t)?t(y):!1;l.unref(n)||u.value||g||(u.value=!0,s("focus",y),r==null||r())},p=y=>{var g;const b=h.isFunction(o)?o(y):!1;l.unref(n)||y.relatedTarget&&((g=c.value)!=null&&g.contains(y.relatedTarget))||b||(u.value=!1,s("blur",y),i==null||i())},d=y=>{var g,b;l.unref(n)||rn(y.target)||(g=c.value)!=null&&g.contains(document.activeElement)&&c.value!==document.activeElement||(b=e.value)==null||b.focus()};return l.watch([c,()=>l.unref(n)],([y,g])=>{y&&(g?y.removeAttribute("tabindex"):y.setAttribute("tabindex","-1"))}),h.useEventListener(c,"focus",f,!0),h.useEventListener(c,"blur",p,!0),h.useEventListener(c,"click",d,!0),{isFocused:u,wrapperRef:c,handleFocus:f,handleBlur:p}}const zi=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function yo({afterComposition:e,emit:n}){const t=l.ref(!1),r=s=>{n==null||n("compositionstart",s),t.value=!0},o=s=>{var c;n==null||n("compositionupdate",s);const u=(c=s.target)==null?void 0:c.value,f=u[u.length-1]||"";t.value=!zi(f)},i=s=>{n==null||n("compositionend",s),t.value&&(t.value=!1,l.nextTick(()=>e(s)))};return{isComposing:t,handleComposition:s=>{s.type==="compositionend"?i(s):o(s)},handleCompositionStart:r,handleCompositionUpdate:o,handleCompositionEnd:i}}function $i(e){let n;function t(){if(e.value==null)return;const{selectionStart:o,selectionEnd:i,value:a}=e.value;if(o==null||i==null)return;const s=a.slice(0,Math.max(0,o)),c=a.slice(Math.max(0,i));n={selectionStart:o,selectionEnd:i,value:a,beforeTxt:s,afterTxt:c}}function r(){if(e.value==null||n==null)return;const{value:o}=e.value,{beforeTxt:i,afterTxt:a,selectionStart:s}=n;if(i==null||a==null||s==null)return;let c=o.length;if(o.endsWith(a))c=o.length-a.length;else if(o.startsWith(i))c=i.length;else{const u=i[s-1],f=o.indexOf(u,s-1);f!==-1&&(c=f+1)}e.value.setSelectionRange(c,c)}return[t,r]}const vo="ElInput",Ui=l.defineComponent({name:vo,inheritAttrs:!1}),ji=l.defineComponent({...Ui,props:lo,emits:Ni,setup(e,{expose:n,emit:t}){const r=e,o=l.useAttrs(),i=uo(),a=l.useSlots(),s=l.computed(()=>[r.type==="textarea"?b.b():g.b(),g.m(d.value),g.is("disabled",y.value),g.is("exceed",M.value),{[g.b("group")]:a.prepend||a.append,[g.m("prefix")]:a.prefix||r.prefixIcon,[g.m("suffix")]:a.suffix||r.suffixIcon||r.clearable||r.showPassword,[g.bm("suffix","password-clear")]:$.value&&z.value,[g.b("hidden")]:r.type==="hidden"},o.class]),c=l.computed(()=>[g.e("wrapper"),g.is("focus",T.value)]),{form:u,formItem:f}=Kn(),{inputId:p}=fo(r,{formItemContext:f}),d=Hn(),y=nn(),g=h.useNamespace("input"),b=h.useNamespace("textarea"),v=l.shallowRef(),m=l.shallowRef(),S=l.ref(!1),A=l.ref(!1),E=l.ref(),C=l.shallowRef(r.inputStyle),w=l.computed(()=>v.value||m.value),{wrapperRef:D,isFocused:T,handleFocus:P,handleBlur:k}=go(w,{disabled:y,afterBlur(){var B;r.validateEvent&&((B=f==null?void 0:f.validate)==null||B.call(f,"blur").catch(Q=>h.debugWarn(Q)))}}),x=l.computed(()=>{var B;return(B=u==null?void 0:u.statusIcon)!=null?B:!1}),R=l.computed(()=>(f==null?void 0:f.validateState)||""),O=l.computed(()=>R.value&&h.ValidateComponentsMap[R.value]),G=l.computed(()=>A.value?h.view_default:h.hide_default),Z=l.computed(()=>[o.style]),J=l.computed(()=>[r.inputStyle,C.value,{resize:r.resize}]),N=l.computed(()=>h.isNil(r.modelValue)?"":String(r.modelValue)),$=l.computed(()=>r.clearable&&!y.value&&!r.readonly&&!!N.value&&(T.value||S.value)),z=l.computed(()=>r.showPassword&&!y.value&&!!N.value),X=l.computed(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!y.value&&!r.readonly&&!r.showPassword),K=l.computed(()=>N.value.length),M=l.computed(()=>!!X.value&&K.value>Number(r.maxlength)),V=l.computed(()=>!!a.suffix||!!r.suffixIcon||$.value||r.showPassword||X.value||!!R.value&&x.value),L=l.computed(()=>!!Object.keys(r.modelModifiers).length),[q,te]=$i(v);h.useResizeObserver(m,B=>{if(se(),!X.value||r.resize!=="both")return;const Q=B[0],{width:oe}=Q.contentRect;E.value={right:`calc(100% - ${oe+15+6}px)`}});const F=()=>{const{type:B,autosize:Q}=r;if(!(!h.isClient||B!=="textarea"||!m.value))if(Q){const oe=h.isObject$1(Q)?Q.minRows:void 0,Re=h.isObject$1(Q)?Q.maxRows:void 0,Oe=yr(m.value,oe,Re);C.value={overflowY:"hidden",...Oe},l.nextTick(()=>{m.value.offsetHeight,C.value=Oe})}else C.value={minHeight:yr(m.value).minHeight}},se=(B=>{let Q=!1;return()=>{var oe;if(Q||!r.autosize)return;((oe=m.value)==null?void 0:oe.offsetParent)===null||(setTimeout(B),Q=!0)}})(F),_=()=>{const B=w.value,Q=r.formatter?r.formatter(N.value):N.value;!B||B.value===Q||(B.value=Q)},fe=B=>{const{trim:Q,number:oe}=r.modelModifiers;return Q&&(B=B.trim()),oe&&(B=`${gr(B)}`),r.formatter&&r.parser&&(B=r.parser(B)),B},U=async B=>{if(he.value)return;const{lazy:Q}=r.modelModifiers;let{value:oe}=B.target;if(Q){t(zt,oe);return}if(oe=fe(oe),String(oe)===N.value){r.formatter&&_();return}q(),t(St,oe),t(zt,oe),await l.nextTick(),(r.formatter&&r.parser||!L.value)&&_(),te()},Te=async B=>{let{value:Q}=B.target;Q=fe(Q),r.modelModifiers.lazy&&t(St,Q),t(Tn,Q),await l.nextTick(),_()},{isComposing:he,handleCompositionStart:ne,handleCompositionUpdate:re,handleCompositionEnd:le}=yo({emit:t,afterComposition:U}),ve=()=>{A.value=!A.value},Ae=()=>{var B;return(B=w.value)==null?void 0:B.focus()},Ce=()=>{var B;return(B=w.value)==null?void 0:B.blur()},Me=B=>{S.value=!1,t("mouseleave",B)},W=B=>{S.value=!0,t("mouseenter",B)},ie=B=>{t("keydown",B)},me=()=>{var B;(B=w.value)==null||B.select()},pe=()=>{t(St,""),t(Tn,""),t("clear"),t(zt,"")};return l.watch(()=>r.modelValue,()=>{var B;l.nextTick(()=>F()),r.validateEvent&&((B=f==null?void 0:f.validate)==null||B.call(f,"change").catch(Q=>h.debugWarn(Q)))}),l.watch(N,B=>{if(!w.value)return;const{trim:Q,number:oe}=r.modelModifiers,Re=w.value.value,Oe=(oe||r.type==="number")&&!/^0\d/.test(Re)?`${gr(Re)}`:Re;Oe!==B&&(document.activeElement===w.value&&w.value.type!=="range"&&Q&&Oe.trim()===B||_())}),l.watch(()=>r.type,async()=>{await l.nextTick(),_(),F()}),l.onMounted(()=>{!r.formatter&&r.parser&&h.debugWarn(vo,"If you set the parser, you also need to set the formatter."),_(),l.nextTick(F)}),n({input:v,textarea:m,ref:w,textareaStyle:J,autosize:l.toRef(r,"autosize"),isComposing:he,focus:Ae,blur:Ce,select:me,clear:pe,resizeTextarea:F}),(B,Q)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass([l.unref(s),{[l.unref(g).bm("group","append")]:B.$slots.append,[l.unref(g).bm("group","prepend")]:B.$slots.prepend}]),style:l.normalizeStyle(l.unref(Z)),onMouseenter:W,onMouseleave:Me},[l.createCommentVNode(" input "),B.type!=="textarea"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createCommentVNode(" prepend slot "),B.$slots.prepend?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(l.unref(g).be("group","prepend"))},[l.renderSlot(B.$slots,"prepend")],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("div",{ref_key:"wrapperRef",ref:D,class:l.normalizeClass(l.unref(c))},[l.createCommentVNode(" prefix slot "),B.$slots.prefix||B.prefixIcon?(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(l.unref(g).e("prefix"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(g).e("prefix-inner"))},[l.renderSlot(B.$slots,"prefix"),B.prefixIcon?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:0,class:l.normalizeClass(l.unref(g).e("icon"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(B.prefixIcon)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],2)],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("input",l.mergeProps({id:l.unref(p),ref_key:"input",ref:v,class:l.unref(g).e("inner")},l.unref(i),{name:B.name,minlength:B.minlength,maxlength:B.maxlength,type:B.showPassword?A.value?"text":"password":B.type,disabled:l.unref(y),readonly:B.readonly,autocomplete:B.autocomplete,tabindex:B.tabindex,"aria-label":B.ariaLabel,placeholder:B.placeholder,style:B.inputStyle,form:B.form,autofocus:B.autofocus,role:B.containerRole,inputmode:B.inputmode,onCompositionstart:l.unref(ne),onCompositionupdate:l.unref(re),onCompositionend:l.unref(le),onInput:U,onChange:Te,onKeydown:ie}),null,16,["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode","onCompositionstart","onCompositionupdate","onCompositionend"]),l.createCommentVNode(" suffix slot "),l.unref(V)?(l.openBlock(),l.createElementBlock("span",{key:1,class:l.normalizeClass(l.unref(g).e("suffix"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(g).e("suffix-inner"))},[!l.unref($)||!l.unref(z)||!l.unref(X)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.renderSlot(B.$slots,"suffix"),B.suffixIcon?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:0,class:l.normalizeClass(l.unref(g).e("icon"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(B.suffixIcon)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],64)):l.createCommentVNode("v-if",!0),l.unref($)?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:1,class:l.normalizeClass([l.unref(g).e("icon"),l.unref(g).e("clear")]),onMousedown:l.withModifiers(l.unref(h.NOOP),["prevent"]),onClick:pe},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(B.clearIcon)))]),_:1},8,["class","onMousedown"])):l.createCommentVNode("v-if",!0),l.unref(z)?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:2,class:l.normalizeClass([l.unref(g).e("icon"),l.unref(g).e("password")]),onClick:ve,onMousedown:l.withModifiers(l.unref(h.NOOP),["prevent"]),onMouseup:l.withModifiers(l.unref(h.NOOP),["prevent"])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(G))))]),_:1},8,["class","onMousedown","onMouseup"])):l.createCommentVNode("v-if",!0),l.unref(X)?(l.openBlock(),l.createElementBlock("span",{key:3,class:l.normalizeClass([l.unref(g).e("count"),l.unref(g).is("outside",B.wordLimitPosition==="outside")])},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(g).e("count-inner"))},l.toDisplayString(l.unref(K))+" / "+l.toDisplayString(B.maxlength),3)],2)):l.createCommentVNode("v-if",!0),l.unref(R)&&l.unref(O)&&l.unref(x)?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:4,class:l.normalizeClass([l.unref(g).e("icon"),l.unref(g).e("validateIcon"),l.unref(g).is("loading",l.unref(R)==="validating")])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(O))))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],2)],2)):l.createCommentVNode("v-if",!0)],2),l.createCommentVNode(" append slot "),B.$slots.append?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(l.unref(g).be("group","append"))},[l.renderSlot(B.$slots,"append")],2)):l.createCommentVNode("v-if",!0)],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createCommentVNode(" textarea "),l.createElementVNode("textarea",l.mergeProps({id:l.unref(p),ref_key:"textarea",ref:m,class:[l.unref(b).e("inner"),l.unref(g).is("focus",l.unref(T))]},l.unref(i),{minlength:B.minlength,maxlength:B.maxlength,tabindex:B.tabindex,disabled:l.unref(y),readonly:B.readonly,autocomplete:B.autocomplete,style:l.unref(J),"aria-label":B.ariaLabel,placeholder:B.placeholder,form:B.form,autofocus:B.autofocus,rows:B.rows,role:B.containerRole,onCompositionstart:l.unref(ne),onCompositionupdate:l.unref(re),onCompositionend:l.unref(le),onInput:U,onFocus:l.unref(P),onBlur:l.unref(k),onChange:Te,onKeydown:ie}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),l.unref(X)?(l.openBlock(),l.createElementBlock("span",{key:0,style:l.normalizeStyle(E.value),class:l.normalizeClass([l.unref(g).e("count"),l.unref(g).is("outside",B.wordLimitPosition==="outside")])},l.toDisplayString(l.unref(K))+" / "+l.toDisplayString(B.maxlength),7)):l.createCommentVNode("v-if",!0)],64))],38))}});var qi=h._export_sfc(ji,[["__file","input.vue"]]);const mo=h.withInstall(qi),fn="focus-trap.focus-after-trapped",hn="focus-trap.focus-after-released",Wi="focus-trap.focusout-prevented",br={cancelable:!0,bubbles:!1},Gi={cancelable:!0,bubbles:!1},Sr="focusAfterTrapped",Er="focusAfterReleased",bo=Symbol("elFocusTrap"),zn=l.ref(),on=l.ref(0),$n=l.ref(0);let Mt=0;const So=e=>{const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n},Tr=(e,n)=>{for(const t of e)if(!Yi(t,n))return t},Yi=(e,n)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Zi=e=>{const n=So(e),t=Tr(n,e),r=Tr(n.reverse(),e);return[t,r]},Ji=e=>e instanceof HTMLInputElement&&"select"in e,Fe=(e,n)=>{if(e){const t=document.activeElement;_n(e,{preventScroll:!0}),$n.value=window.performance.now(),e!==t&&Ji(e)&&n&&e.select()}};function wr(e,n){const t=[...e],r=e.indexOf(n);return r!==-1&&t.splice(r,1),t}const Xi=()=>{let e=[];return{push:r=>{const o=e[0];o&&r!==o&&o.pause(),e=wr(e,r),e.unshift(r)},remove:r=>{var o,i;e=wr(e,r),(i=(o=e[0])==null?void 0:o.resume)==null||i.call(o)}}},Qi=(e,n=!1)=>{const t=document.activeElement;for(const r of e)if(Fe(r,n),document.activeElement!==t)return},kr=Xi(),ea=()=>on.value>$n.value,Rt=()=>{zn.value="pointer",on.value=window.performance.now()},Dr=()=>{zn.value="keyboard",on.value=window.performance.now()},ta=()=>(l.onMounted(()=>{Mt===0&&(document.addEventListener("mousedown",Rt),document.addEventListener("touchstart",Rt),document.addEventListener("keydown",Dr)),Mt++}),l.onBeforeUnmount(()=>{Mt--,Mt<=0&&(document.removeEventListener("mousedown",Rt),document.removeEventListener("touchstart",Rt),document.removeEventListener("keydown",Dr))}),{focusReason:zn,lastUserFocusTimestamp:on,lastAutomatedFocusTimestamp:$n}),Nt=e=>new CustomEvent(Wi,{...Gi,detail:e});let et=[];const Ar=e=>{h.getEventCode(e)===h.EVENT_CODE.esc&&et.forEach(t=>t(e))},na=e=>{l.onMounted(()=>{et.length===0&&document.addEventListener("keydown",Ar),h.isClient&&et.push(e)}),l.onBeforeUnmount(()=>{et=et.filter(n=>n!==e),et.length===0&&h.isClient&&document.removeEventListener("keydown",Ar)})},ra=l.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Sr,Er,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:n}){const t=l.ref();let r,o;const{focusReason:i}=ta();na(g=>{e.trapped&&!a.paused&&n("release-requested",g)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=g=>{if(!e.loop&&!e.trapped||a.paused)return;const{altKey:b,ctrlKey:v,metaKey:m,currentTarget:S,shiftKey:A}=g,{loop:E}=e,w=h.getEventCode(g)===h.EVENT_CODE.tab&&!b&&!v&&!m,D=document.activeElement;if(w&&D){const T=S,[P,k]=Zi(T);if(P&&k){if(!A&&D===k){const R=Nt({focusReason:i.value});n("focusout-prevented",R),R.defaultPrevented||(g.preventDefault(),E&&Fe(P,!0))}else if(A&&[P,T].includes(D)){const R=Nt({focusReason:i.value});n("focusout-prevented",R),R.defaultPrevented||(g.preventDefault(),E&&Fe(k,!0))}}else if(D===T){const R=Nt({focusReason:i.value});n("focusout-prevented",R),R.defaultPrevented||g.preventDefault()}}};l.provide(bo,{focusTrapRef:t,onKeydown:s}),l.watch(()=>e.focusTrapEl,g=>{g&&(t.value=g)},{immediate:!0}),l.watch([t],([g],[b])=>{g&&(g.addEventListener("keydown",s),g.addEventListener("focusin",f),g.addEventListener("focusout",p)),b&&(b.removeEventListener("keydown",s),b.removeEventListener("focusin",f),b.removeEventListener("focusout",p))});const c=g=>{n(Sr,g)},u=g=>n(Er,g),f=g=>{const b=l.unref(t);if(!b)return;const v=g.target,m=g.relatedTarget,S=v&&b.contains(v);e.trapped||m&&b.contains(m)||(r=m),S&&n("focusin",g),!a.paused&&e.trapped&&(S?o=v:Fe(o,!0))},p=g=>{const b=l.unref(t);if(!(a.paused||!b))if(e.trapped){const v=g.relatedTarget;!h.isNil(v)&&!b.contains(v)&&setTimeout(()=>{if(!a.paused&&e.trapped){const m=Nt({focusReason:i.value});n("focusout-prevented",m),m.defaultPrevented||Fe(o,!0)}},0)}else{const v=g.target;v&&b.contains(v)||n("focusout",g)}};async function d(){await l.nextTick();const g=l.unref(t);if(g){kr.push(a);const b=g.contains(document.activeElement)?r:document.activeElement;if(r=b,!g.contains(b)){const m=new Event(fn,br);g.addEventListener(fn,c),g.dispatchEvent(m),m.defaultPrevented||l.nextTick(()=>{let S=e.focusStartEl;h.isString(S)||(Fe(S),document.activeElement!==S&&(S="first")),S==="first"&&Qi(So(g),!0),(document.activeElement===b||S==="container")&&Fe(g)})}}}function y(){const g=l.unref(t);if(g){g.removeEventListener(fn,c);const b=new CustomEvent(hn,{...br,detail:{focusReason:i.value}});g.addEventListener(hn,u),g.dispatchEvent(b),!b.defaultPrevented&&(i.value=="keyboard"||!ea()||g.contains(document.activeElement))&&Fe(r??document.body),g.removeEventListener(hn,u),kr.remove(a),r=null,o=null}}return l.onMounted(()=>{e.trapped&&d(),l.watch(()=>e.trapped,g=>{g?d():y()})}),l.onBeforeUnmount(()=>{e.trapped&&y(),t.value&&(t.value.removeEventListener("keydown",s),t.value.removeEventListener("focusin",f),t.value.removeEventListener("focusout",p),t.value=void 0)}),{onKeydown:s}}});function oa(e,n,t,r,o,i){return l.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var Eo=h._export_sfc(ra,[["render",oa],["__file","focus-trap.vue"]]);const To=Symbol("buttonGroupContextKey"),wo=({from:e,replacement:n,scope:t,version:r,ref:o,type:i="API"},a)=>{l.watch(()=>l.unref(a),s=>{s&&h.debugWarn(t,`[${i}] ${e} is about to be deprecated in version ${r}, please use ${n} instead.
|
|
6
|
-
For more detail, please visit: ${
|
|
7
|
-
`)},{immediate:!0})},ia=(e,n)=>{wo({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},l.computed(()=>e.type==="text"));const t=l.inject(To,void 0),r=h.useGlobalConfig("button"),{form:o}=Kn(),i=Hn(l.computed(()=>t==null?void 0:t.size)),a=nn(),s=l.ref(),c=l.useSlots(),u=l.computed(()=>{var m;return e.type||(t==null?void 0:t.type)||((m=r.value)==null?void 0:m.type)||""}),f=l.computed(()=>{var m,S,A;return(A=(S=e.autoInsertSpace)!=null?S:(m=r.value)==null?void 0:m.autoInsertSpace)!=null?A:!1}),p=l.computed(()=>{var m,S,A;return(A=(S=e.plain)!=null?S:(m=r.value)==null?void 0:m.plain)!=null?A:!1}),d=l.computed(()=>{var m,S,A;return(A=(S=e.round)!=null?S:(m=r.value)==null?void 0:m.round)!=null?A:!1}),y=l.computed(()=>{var m,S,A;return(A=(S=e.text)!=null?S:(m=r.value)==null?void 0:m.text)!=null?A:!1}),g=l.computed(()=>e.tag==="button"?{ariaDisabled:a.value||e.loading,disabled:a.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),b=l.computed(()=>{var m;const S=(m=c.default)==null?void 0:m.call(c);if(f.value&&(S==null?void 0:S.length)===1){const A=S[0];if((A==null?void 0:A.type)===l.Text){const E=A.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(E.trim())}}return!1});return{_disabled:a,_size:i,_type:u,_ref:s,_props:g,_plain:p,_round:d,_text:y,shouldAddSpace:b,handleClick:m=>{if(a.value||e.loading){m.stopPropagation();return}e.nativeType==="reset"&&(o==null||o.resetFields()),n("click",m)}}},ko=["default","primary","success","warning","info","danger","text",""],aa=["button","submit","reset"],kn=h.buildProps({size:h.useSizeProp,disabled:Boolean,type:{type:String,values:ko,default:""},icon:{type:h.iconPropType},nativeType:{type:String,values:aa,default:"button"},loading:Boolean,loadingIcon:{type:h.iconPropType,default:()=>h.loading_default},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:h.definePropType([String,Object]),default:"button"}}),sa={click:e=>e instanceof MouseEvent};function de(e,n){la(e)&&(e="100%");var t=ua(e);return e=n===360?e:Math.min(n,Math.max(0,parseFloat(e))),t&&(e=parseInt(String(e*n),10)/100),Math.abs(e-n)<1e-6?1:(n===360?e=(e<0?e%n+n:e%n)/parseFloat(String(n)):e=e%n/parseFloat(String(n)),e)}function Pt(e){return Math.min(1,Math.max(0,e))}function la(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function ua(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Do(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ot(e){return e<=1?"".concat(Number(e)*100,"%"):e}function je(e){return e.length===1?"0"+e:String(e)}function ca(e,n,t){return{r:de(e,255)*255,g:de(n,255)*255,b:de(t,255)*255}}function Cr(e,n,t){e=de(e,255),n=de(n,255),t=de(t,255);var r=Math.max(e,n,t),o=Math.min(e,n,t),i=0,a=0,s=(r+o)/2;if(r===o)a=0,i=0;else{var c=r-o;switch(a=s>.5?c/(2-r-o):c/(r+o),r){case e:i=(n-t)/c+(n<t?6:0);break;case n:i=(t-e)/c+2;break;case t:i=(e-n)/c+4;break}i/=6}return{h:i,s:a,l:s}}function pn(e,n,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(n-e)*(6*t):t<1/2?n:t<2/3?e+(n-e)*(2/3-t)*6:e}function fa(e,n,t){var r,o,i;if(e=de(e,360),n=de(n,100),t=de(t,100),n===0)o=t,i=t,r=t;else{var a=t<.5?t*(1+n):t+n-t*n,s=2*t-a;r=pn(s,a,e+1/3),o=pn(s,a,e),i=pn(s,a,e-1/3)}return{r:r*255,g:o*255,b:i*255}}function Ir(e,n,t){e=de(e,255),n=de(n,255),t=de(t,255);var r=Math.max(e,n,t),o=Math.min(e,n,t),i=0,a=r,s=r-o,c=r===0?0:s/r;if(r===o)i=0;else{switch(r){case e:i=(n-t)/s+(n<t?6:0);break;case n:i=(t-e)/s+2;break;case t:i=(e-n)/s+4;break}i/=6}return{h:i,s:c,v:a}}function ha(e,n,t){e=de(e,360)*6,n=de(n,100),t=de(t,100);var r=Math.floor(e),o=e-r,i=t*(1-n),a=t*(1-o*n),s=t*(1-(1-o)*n),c=r%6,u=[t,a,i,i,s,t][c],f=[s,t,t,a,i,i][c],p=[i,i,s,t,t,a][c];return{r:u*255,g:f*255,b:p*255}}function xr(e,n,t,r){var o=[je(Math.round(e).toString(16)),je(Math.round(n).toString(16)),je(Math.round(t).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function pa(e,n,t,r,o){var i=[je(Math.round(e).toString(16)),je(Math.round(n).toString(16)),je(Math.round(t).toString(16)),je(da(r))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function da(e){return Math.round(parseFloat(e)*255).toString(16)}function Br(e){return ke(e)/255}function ke(e){return parseInt(e,16)}function ga(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Dn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ya(e){var n={r:0,g:0,b:0},t=1,r=null,o=null,i=null,a=!1,s=!1;return typeof e=="string"&&(e=ba(e)),typeof e=="object"&&(Ne(e.r)&&Ne(e.g)&&Ne(e.b)?(n=ca(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ne(e.h)&&Ne(e.s)&&Ne(e.v)?(r=Ot(e.s),o=Ot(e.v),n=ha(e.h,r,o),a=!0,s="hsv"):Ne(e.h)&&Ne(e.s)&&Ne(e.l)&&(r=Ot(e.s),i=Ot(e.l),n=fa(e.h,r,i),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=Do(t),{ok:a,format:e.format||s,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:t}}var va="[-\\+]?\\d+%?",ma="[-\\+]?\\d*\\.\\d+%?",He="(?:".concat(ma,")|(?:").concat(va,")"),dn="[\\s|\\(]+(".concat(He,")[,|\\s]+(").concat(He,")[,|\\s]+(").concat(He,")\\s*\\)?"),gn="[\\s|\\(]+(".concat(He,")[,|\\s]+(").concat(He,")[,|\\s]+(").concat(He,")[,|\\s]+(").concat(He,")\\s*\\)?"),xe={CSS_UNIT:new RegExp(He),rgb:new RegExp("rgb"+dn),rgba:new RegExp("rgba"+gn),hsl:new RegExp("hsl"+dn),hsla:new RegExp("hsla"+gn),hsv:new RegExp("hsv"+dn),hsva:new RegExp("hsva"+gn),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ba(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(Dn[e])e=Dn[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=xe.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=xe.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=xe.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=xe.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=xe.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=xe.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=xe.hex8.exec(e),t?{r:ke(t[1]),g:ke(t[2]),b:ke(t[3]),a:Br(t[4]),format:n?"name":"hex8"}:(t=xe.hex6.exec(e),t?{r:ke(t[1]),g:ke(t[2]),b:ke(t[3]),format:n?"name":"hex"}:(t=xe.hex4.exec(e),t?{r:ke(t[1]+t[1]),g:ke(t[2]+t[2]),b:ke(t[3]+t[3]),a:Br(t[4]+t[4]),format:n?"name":"hex8"}:(t=xe.hex3.exec(e),t?{r:ke(t[1]+t[1]),g:ke(t[2]+t[2]),b:ke(t[3]+t[3]),format:n?"name":"hex"}:!1)))))))))}function Ne(e){return!!xe.CSS_UNIT.exec(String(e))}var Ao=function(){function e(n,t){n===void 0&&(n=""),t===void 0&&(t={});var r;if(n instanceof e)return n;typeof n=="number"&&(n=ga(n)),this.originalInput=n;var o=ya(n);this.originalInput=n,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=t.format)!==null&&r!==void 0?r:o.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},e.prototype.getLuminance=function(){var n=this.toRgb(),t,r,o,i=n.r/255,a=n.g/255,s=n.b/255;return i<=.03928?t=i/12.92:t=Math.pow((i+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),.2126*t+.7152*r+.0722*o},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(n){return this.a=Do(n),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var n=this.toHsl().s;return n===0},e.prototype.toHsv=function(){var n=Ir(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}},e.prototype.toHsvString=function(){var n=Ir(this.r,this.g,this.b),t=Math.round(n.h*360),r=Math.round(n.s*100),o=Math.round(n.v*100);return this.a===1?"hsv(".concat(t,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(t,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var n=Cr(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}},e.prototype.toHslString=function(){var n=Cr(this.r,this.g,this.b),t=Math.round(n.h*360),r=Math.round(n.s*100),o=Math.round(n.l*100);return this.a===1?"hsl(".concat(t,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(t,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(n){return n===void 0&&(n=!1),xr(this.r,this.g,this.b,n)},e.prototype.toHexString=function(n){return n===void 0&&(n=!1),"#"+this.toHex(n)},e.prototype.toHex8=function(n){return n===void 0&&(n=!1),pa(this.r,this.g,this.b,this.a,n)},e.prototype.toHex8String=function(n){return n===void 0&&(n=!1),"#"+this.toHex8(n)},e.prototype.toHexShortString=function(n){return n===void 0&&(n=!1),this.a===1?this.toHexString(n):this.toHex8String(n)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var n=Math.round(this.r),t=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(n,", ").concat(t,", ").concat(r,")"):"rgba(".concat(n,", ").concat(t,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var n=function(t){return"".concat(Math.round(de(t,255)*100),"%")};return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var n=function(t){return Math.round(de(t,255)*100)};return this.a===1?"rgb(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%)"):"rgba(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var n="#"+xr(this.r,this.g,this.b,!1),t=0,r=Object.entries(Dn);t<r.length;t++){var o=r[t],i=o[0],a=o[1];if(n===a)return i}return!1},e.prototype.toString=function(n){var t=!!n;n=n??this.format;var r=!1,o=this.a<1&&this.a>=0,i=!t&&o&&(n.startsWith("hex")||n==="name");return i?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.l+=n/100,t.l=Pt(t.l),new e(t)},e.prototype.brighten=function(n){n===void 0&&(n=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(n/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(n/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(n/100)))),new e(t)},e.prototype.darken=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.l-=n/100,t.l=Pt(t.l),new e(t)},e.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},e.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},e.prototype.desaturate=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.s-=n/100,t.s=Pt(t.s),new e(t)},e.prototype.saturate=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.s+=n/100,t.s=Pt(t.s),new e(t)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(n){var t=this.toHsl(),r=(t.h+n)%360;return t.h=r<0?360+r:r,new e(t)},e.prototype.mix=function(n,t){t===void 0&&(t=50);var r=this.toRgb(),o=new e(n).toRgb(),i=t/100,a={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return new e(a)},e.prototype.analogous=function(n,t){n===void 0&&(n=6),t===void 0&&(t=30);var r=this.toHsl(),o=360/t,i=[this];for(r.h=(r.h-(o*n>>1)+720)%360;--n;)r.h=(r.h+o)%360,i.push(new e(r));return i},e.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new e(n)},e.prototype.monochromatic=function(n){n===void 0&&(n=6);for(var t=this.toHsv(),r=t.h,o=t.s,i=t.v,a=[],s=1/n;n--;)a.push(new e({h:r,s:o,v:i})),i=(i+s)%1;return a},e.prototype.splitcomplement=function(){var n=this.toHsl(),t=n.h;return[this,new e({h:(t+72)%360,s:n.s,l:n.l}),new e({h:(t+216)%360,s:n.s,l:n.l})]},e.prototype.onBackground=function(n){var t=this.toRgb(),r=new e(n).toRgb(),o=t.a+r.a*(1-t.a);return new e({r:(t.r*t.a+r.r*r.a*(1-t.a))/o,g:(t.g*t.a+r.g*r.a*(1-t.a))/o,b:(t.b*t.a+r.b*r.a*(1-t.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(n){for(var t=this.toHsl(),r=t.h,o=[this],i=360/n,a=1;a<n;a++)o.push(new e({h:(r+a*i)%360,s:t.s,l:t.l}));return o},e.prototype.equals=function(n){return this.toRgbString()===new e(n).toRgbString()},e}();function Ve(e,n=20){return e.mix("#141414",n).toString()}function Sa(e){const n=nn(),t=h.useNamespace("button");return l.computed(()=>{let r={},o=e.color;if(o){const i=o.match(/var\((.*?)\)/);i&&(o=window.getComputedStyle(window.document.documentElement).getPropertyValue(i[1]));const a=new Ao(o),s=e.dark?a.tint(20).toString():Ve(a,20);if(e.plain)r=t.cssVarBlock({"bg-color":e.dark?Ve(a,90):a.tint(90).toString(),"text-color":o,"border-color":e.dark?Ve(a,50):a.tint(50).toString(),"hover-text-color":`var(${t.cssVarName("color-white")})`,"hover-bg-color":o,"hover-border-color":o,"active-bg-color":s,"active-text-color":`var(${t.cssVarName("color-white")})`,"active-border-color":s}),n.value&&(r[t.cssVarBlockName("disabled-bg-color")]=e.dark?Ve(a,90):a.tint(90).toString(),r[t.cssVarBlockName("disabled-text-color")]=e.dark?Ve(a,50):a.tint(50).toString(),r[t.cssVarBlockName("disabled-border-color")]=e.dark?Ve(a,80):a.tint(80).toString());else{const c=e.dark?Ve(a,30):a.tint(30).toString(),u=a.isDark()?`var(${t.cssVarName("color-white")})`:`var(${t.cssVarName("color-black")})`;if(r=t.cssVarBlock({"bg-color":o,"text-color":u,"border-color":o,"hover-bg-color":c,"hover-text-color":u,"hover-border-color":c,"active-bg-color":s,"active-border-color":s}),n.value){const f=e.dark?Ve(a,50):a.tint(50).toString();r[t.cssVarBlockName("disabled-bg-color")]=f,r[t.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${t.cssVarName("color-white")})`,r[t.cssVarBlockName("disabled-border-color")]=f}}}return r})}const Ea=l.defineComponent({name:"ElButton"}),Ta=l.defineComponent({...Ea,props:kn,emits:sa,setup(e,{expose:n,emit:t}){const r=e,o=Sa(r),i=h.useNamespace("button"),{_ref:a,_size:s,_type:c,_disabled:u,_props:f,_plain:p,_round:d,_text:y,shouldAddSpace:g,handleClick:b}=ia(r,t),v=l.computed(()=>[i.b(),i.m(c.value),i.m(s.value),i.is("disabled",u.value),i.is("loading",r.loading),i.is("plain",p.value),i.is("round",d.value),i.is("circle",r.circle),i.is("text",y.value),i.is("link",r.link),i.is("has-bg",r.bg)]);return n({ref:a,size:s,type:c,disabled:u,shouldAddSpace:g}),(m,S)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(m.tag),l.mergeProps({ref_key:"_ref",ref:a},l.unref(f),{class:l.unref(v),style:l.unref(o),onClick:l.unref(b)}),{default:l.withCtx(()=>[m.loading?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[m.$slots.loading?l.renderSlot(m.$slots,"loading",{key:0}):(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:1,class:l.normalizeClass(l.unref(i).is("loading"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(m.loadingIcon)))]),_:1},8,["class"]))],64)):m.icon||m.$slots.icon?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:1},{default:l.withCtx(()=>[m.icon?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(m.icon),{key:0})):l.renderSlot(m.$slots,"icon",{key:1})]),_:3})):l.createCommentVNode("v-if",!0),m.$slots.default?(l.openBlock(),l.createElementBlock("span",{key:2,class:l.normalizeClass({[l.unref(i).em("text","expand")]:l.unref(g)})},[l.renderSlot(m.$slots,"default")],2)):l.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var wa=h._export_sfc(Ta,[["__file","button.vue"]]);const ka={size:kn.size,type:kn.type},Da=l.defineComponent({name:"ElButtonGroup"}),Aa=l.defineComponent({...Da,props:ka,setup(e){const n=e;l.provide(To,l.reactive({size:l.toRef(n,"size"),type:l.toRef(n,"type")}));const t=h.useNamespace("button");return(r,o)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(l.unref(t).b("group"))},[l.renderSlot(r.$slots,"default")],2))}});var Co=h._export_sfc(Aa,[["__file","button-group.vue"]]);const Io=h.withInstall(wa,{ButtonGroup:Co}),Ca=h.withNoopInstall(Co),Ia="utils/vue/vnode";var Et=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(Et||{});function xo(e){return l.isVNode(e)&&e.type===l.Fragment}function xa(e){return l.isVNode(e)&&e.type===l.Comment}function Ba(e){return l.isVNode(e)&&!xo(e)&&!xa(e)}const Ma=e=>{if(!l.isVNode(e))return h.debugWarn(Ia,"[getNormalizedProps] must be a VNode"),{};const n=e.props||{},t=(l.isVNode(e.type)?e.type.props:void 0)||{},r={};return Object.keys(t).forEach(o=>{h.hasOwn(t[o],"default")&&(r[o]=t[o].default)}),Object.keys(n).forEach(o=>{r[h.camelize(o)]=n[o]}),r},vt=e=>{const n=h.isArray$1(e)?e:[e],t=[];return n.forEach(r=>{var o;h.isArray$1(r)?t.push(...vt(r)):l.isVNode(r)&&((o=r.component)!=null&&o.subTree)?t.push(r,...vt(r.component.subTree)):l.isVNode(r)&&h.isArray$1(r.children)?t.push(...vt(r.children)):l.isVNode(r)&&r.shapeFlag===2?t.push(...vt(r.type())):t.push(r)}),t},Un=e=>{if(!e)return{onClick:h.NOOP,onMousedown:h.NOOP,onMouseup:h.NOOP};let n=!1,t=!1;return{onClick:a=>{n&&t&&e(a),n=t=!1},onMousedown:a=>{n=a.target===a.currentTarget},onMouseup:a=>{t=a.target===a.currentTarget}}},Ra=h.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:h.definePropType([String,Array,Object])},zIndex:{type:h.definePropType([String,Number])}}),Na={click:e=>e instanceof MouseEvent},Pa="overlay";var Oa=l.defineComponent({name:"ElOverlay",props:Ra,emits:Na,setup(e,{slots:n,emit:t}){const r=h.useNamespace(Pa),o=c=>{t("click",c)},{onClick:i,onMousedown:a,onMouseup:s}=Un(e.customMaskEvent?void 0:o);return()=>e.mask?l.createVNode("div",{class:[r.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:i,onMousedown:a,onMouseup:s},[l.renderSlot(n,"default")],Et.STYLE|Et.CLASS|Et.PROPS,["onClick","onMouseup","onMousedown"]):l.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[l.renderSlot(n,"default")])}});const Bo=Oa,Mo=(e,n,t,r)=>{const o={offsetX:0,offsetY:0},i=l.ref(!1),a=(d,y)=>{if(e.value){const{offsetX:g,offsetY:b}=o,v=e.value.getBoundingClientRect(),m=v.left,S=v.top,A=v.width,E=v.height,C=document.documentElement.clientWidth,w=document.documentElement.clientHeight,D=-m+g,T=-S+b,P=C-m-A+g,k=w-S-(E<w?E:0)+b;r!=null&&r.value||(d=Math.min(Math.max(d,D),P),y=Math.min(Math.max(y,T),k)),o.offsetX=d,o.offsetY=y,e.value.style.transform=`translate(${h.addUnit(d)}, ${h.addUnit(y)})`}},s=d=>{const y=d.clientX,g=d.clientY,{offsetX:b,offsetY:v}=o,m=A=>{i.value||(i.value=!0);const E=b+A.clientX-y,C=v+A.clientY-g;a(E,C)},S=()=>{i.value=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",S)};document.addEventListener("mousemove",m),document.addEventListener("mouseup",S)},c=()=>{n.value&&e.value&&(n.value.addEventListener("mousedown",s),window.addEventListener("resize",p))},u=()=>{n.value&&e.value&&(n.value.removeEventListener("mousedown",s),window.removeEventListener("resize",p))},f=()=>{o.offsetX=0,o.offsetY=0,e.value&&(e.value.style.transform="")},p=()=>{const{offsetX:d,offsetY:y}=o;a(d,y)};return l.onMounted(()=>{l.watchEffect(()=>{t.value?c():u()})}),l.onBeforeUnmount(()=>{u()}),{isDragging:i,resetPosition:f,updatePosition:p}},Ro=(e,n={})=>{l.isRef(e)||h.throwError("[useLockscreen]","You need to pass a ref param to this function");const t=n.ns||h.useNamespace("popup"),r=l.computed(()=>t.bm("parent","hidden"));let o=0,i=!1,a="0";const s=()=>{setTimeout(()=>{typeof document>"u"||i&&document&&(document.body.style.width=a,h.removeClass(document.body,r.value))},200)};l.watch(e,c=>{if(!c){s();return}i=!h.hasClass(document.body,r.value),i&&(a=document.body.style.width,h.addClass(document.body,r.value)),o=ao(t.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,f=h.getStyle(document.body,"overflowY");o>0&&(u||f==="scroll")&&i&&(document.body.style.width=`calc(100% - ${o}px)`)}),l.onScopeDispose(()=>s())},No=e=>["",...h.componentSizes].includes(e),An="_trap-focus-children",qe=[],Mr=e=>{if(qe.length===0)return;const n=h.getEventCode(e),t=qe[qe.length-1][An];if(t.length>0&&n===h.EVENT_CODE.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const r=e.shiftKey,o=e.target===t[0],i=e.target===t[t.length-1];o&&r&&(e.preventDefault(),t[t.length-1].focus()),i&&!r&&(e.preventDefault(),t[0].focus())}},Va={beforeMount(e){e[An]=mr(e),qe.push(e),qe.length<=1&&document.addEventListener("keydown",Mr)},updated(e){l.nextTick(()=>{e[An]=mr(e)})},unmounted(){qe.shift(),qe.length===0&&document.removeEventListener("keydown",Mr)}},Fa=l.defineComponent({name:"ElMessageBox",directives:{TrapFocus:Va},components:{ElButton:Io,ElFocusTrap:Eo,ElInput:mo,ElOverlay:Bo,ElIcon:h.ElIcon,...h.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:No},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:n}){const{locale:t,zIndex:r,ns:o,size:i}=h.useGlobalComponentSettings("message-box",l.computed(()=>e.buttonSize)),{t:a}=t,{nextZIndex:s}=r,c=l.ref(!1),u=l.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:l.markRaw(h.loading_default),cancelButtonLoadingIcon:l.markRaw(h.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:s()}),f=l.computed(()=>{const N=u.type;return{[o.bm("icon",N)]:N&&h.TypeComponentsMap[N]}}),p=qt(),d=qt(),y=l.computed(()=>{const N=u.type;return u.icon||N&&h.TypeComponentsMap[N]||""}),g=l.computed(()=>!!u.message),b=l.ref(),v=l.ref(),m=l.ref(),S=l.ref(),A=l.ref(),E=l.computed(()=>u.confirmButtonClass);l.watch(()=>u.inputValue,async N=>{await l.nextTick(),e.boxType==="prompt"&&N&&O()},{immediate:!0}),l.watch(()=>c.value,N=>{var $,z;N&&(e.boxType!=="prompt"&&(u.autofocus?m.value=(z=($=A.value)==null?void 0:$.$el)!=null?z:b.value:m.value=b.value),u.zIndex=s()),e.boxType==="prompt"&&(N?l.nextTick().then(()=>{var X;S.value&&S.value.$el&&(u.autofocus?m.value=(X=G())!=null?X:b.value:m.value=b.value)}):(u.editorErrorMessage="",u.validateError=!1))});const C=l.computed(()=>e.draggable),w=l.computed(()=>e.overflow),{isDragging:D}=Mo(b,v,C,w);l.onMounted(async()=>{await l.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",T)}),l.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",T)});function T(){c.value&&(c.value=!1,l.nextTick(()=>{u.action&&n("action",u.action)}))}const P=()=>{e.closeOnClickModal&&R(u.distinguishCancelAndClose?"close":"cancel")},k=Un(P),x=N=>{if(u.inputType!=="textarea")return N.preventDefault(),R("confirm")},R=N=>{var $;e.boxType==="prompt"&&N==="confirm"&&!O()||(u.action=N,u.beforeClose?($=u.beforeClose)==null||$.call(u,N,u,T):T())},O=()=>{if(e.boxType==="prompt"){const N=u.inputPattern;if(N&&!N.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;const $=u.inputValidator;if(h.isFunction($)){const z=$(u.inputValue);if(z===!1)return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;if(h.isString(z))return u.editorErrorMessage=z,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},G=()=>{var N,$;const z=(N=S.value)==null?void 0:N.$refs;return($=z==null?void 0:z.input)!=null?$:z==null?void 0:z.textarea},Z=()=>{R("close")},J=()=>{e.closeOnPressEscape&&Z()};return e.lockScroll&&Ro(c,{ns:o}),{...l.toRefs(u),ns:o,overlayEvent:k,visible:c,hasMessage:g,typeClass:f,contentId:p,inputId:d,btnSize:i,iconComponent:y,confirmButtonClasses:E,rootRef:b,focusStartRef:m,headerRef:v,inputRef:S,isDragging:D,confirmRef:A,doClose:T,handleClose:Z,onCloseRequested:J,handleWrapperClick:P,handleInputEnter:x,handleAction:R,t:a}}});function La(e,n,t,r,o,i){const a=l.resolveComponent("el-icon"),s=l.resolveComponent("el-input"),c=l.resolveComponent("el-button"),u=l.resolveComponent("el-focus-trap"),f=l.resolveComponent("el-overlay");return l.openBlock(),l.createBlock(l.Transition,{name:"fade-in-linear",onAfterLeave:p=>e.$emit("vanish"),persisted:""},{default:l.withCtx(()=>[l.withDirectives(l.createVNode(f,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:l.withCtx(()=>[l.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:l.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[l.createVNode(u,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:l.withCtx(()=>[l.createElementVNode("div",{ref:"rootRef",class:l.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:l.normalizeStyle(e.customStyle),tabindex:"-1",onClick:l.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(l.openBlock(),l.createElementBlock("div",{key:0,ref:"headerRef",class:l.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(l.openBlock(),l.createBlock(a,{key:0,class:l.normalizeClass([e.ns.e("status"),e.typeClass])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0),l.createElementVNode("span",null,l.toDisplayString(e.title),1)],2),e.showClose?(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:l.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:p=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:l.withKeys(l.withModifiers(p=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[l.createVNode(a,{class:l.normalizeClass(e.ns.e("close"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):l.createCommentVNode("v-if",!0)],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("div",{id:e.contentId,class:l.normalizeClass(e.ns.e("content"))},[l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(l.openBlock(),l.createBlock(a,{key:0,class:l.normalizeClass([e.ns.e("status"),e.typeClass])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0),e.hasMessage?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(e.ns.e("message"))},[l.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:l.toDisplayString(e.message)},null,8,["for","textContent"]))])],2)):l.createCommentVNode("v-if",!0)],2),l.withDirectives(l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("input"))},[l.createVNode(s,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":p=>e.inputValue=p,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:l.normalizeClass({invalid:e.validateError}),onKeydown:l.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("errormsg")),style:l.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},l.toDisplayString(e.editorErrorMessage),7)],2),[[l.vShow,e.showInput]])],10,["id"]),l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(l.openBlock(),l.createBlock(c,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:l.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:p=>e.handleAction("cancel"),onKeydown:l.withKeys(l.withModifiers(p=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):l.createCommentVNode("v-if",!0),l.withDirectives(l.createVNode(c,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:l.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:p=>e.handleAction("confirm"),onKeydown:l.withKeys(l.withModifiers(p=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[l.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[l.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var Ka=h._export_sfc(Fa,[["render",La],["__file","index.vue"]]);const kt=new Map,Ha=e=>{let n=document.body;return e.appendTo&&(h.isString(e.appendTo)&&(n=document.querySelector(e.appendTo)),h.isElement(e.appendTo)&&(n=e.appendTo),h.isElement(n)||(h.debugWarn("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),n=document.body)),n},_a=(e,n,t=null)=>{const r=l.createVNode(Ka,e,h.isFunction(e.message)||l.isVNode(e.message)?{default:h.isFunction(e.message)?e.message:()=>e.message}:null);return r.appContext=t,l.render(r,n),Ha(e).appendChild(n.firstElementChild),r.component},za=()=>document.createElement("div"),$a=(e,n)=>{const t=za();e.onVanish=()=>{l.render(null,t),kt.delete(o)},e.onAction=i=>{const a=kt.get(o);let s;e.showInput?s={value:o.inputValue,action:i}:s=i,e.callback?e.callback(s,r.proxy):i==="cancel"||i==="close"?e.distinguishCancelAndClose&&i!=="cancel"?a.reject("close"):a.reject("cancel"):a.resolve(s)};const r=_a(e,t,n),o=r.proxy;for(const i in e)h.hasOwn(e,i)&&!h.hasOwn(o.$props,i)&&(i==="closeIcon"&&h.isObject$1(e[i])?o[i]=l.markRaw(e[i]):o[i]=e[i]);return o.visible=!0,o};function dt(e,n=null){if(!h.isClient)return Promise.reject();let t;return h.isString(e)||l.isVNode(e)?e={message:e}:t=e.callback,new Promise((r,o)=>{const i=$a(e,n??dt._context);kt.set(i,{options:e,callback:t,resolve:r,reject:o})})}const Ua=["alert","confirm","prompt"],ja={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};Ua.forEach(e=>{dt[e]=qa(e)});function qa(e){return(n,t,r,o)=>{let i="";return h.isObject$1(t)?(r=t,i=""):h.isUndefined(t)?i="":i=t,dt(Object.assign({title:i,message:n,type:"",...ja[e]},r,{boxType:e}),o)}}dt.close=()=>{kt.forEach((e,n)=>{n.doClose()}),kt.clear()};dt._context=null;const Le=dt;Le.install=e=>{Le._context=e._context,e.config.globalProperties.$msgbox=Le,e.config.globalProperties.$messageBox=Le,e.config.globalProperties.$alert=Le.alert,e.config.globalProperties.$confirm=Le.confirm,e.config.globalProperties.$prompt=Le.prompt};const Po=Le,Wa=[],Ct=h.defineStore("menuState",{state:()=>({isRefreshMenus:!1,activeMenuStructureIds:[],cacheInputMenu:{},configMenu:{form:{},options:[],structure:[]},cacheStructures:[],rawMenus:[],menus:[],activeTopMenuPath:"",activeMenuPath:"",activeOldMenuPath:"",activeMainMenu:{},activeAsideMenu:{},activeMenuOpenPaths:[],systemKey:"",buttonTriggerType:"contentConfig",menuTriggerType:"open",permissionSideMenus:[],importLoading:!1,contentLoading:!1,asideMenuLoading:!1,asideMenus:[],platform:"browser",platName:"",childMenu:"",linkMenuInfo:null}),actions:{setLinkMenuInfo(e){this.linkMenuInfo=e},setAsideMenuLoading(e){this.asideMenuLoading=e},setCacheStructures(e){var t,r;const n=(t=this.cacheStructures)==null?void 0:t.map(o=>o.key);e?n!=null&&n.includes(e==null?void 0:e.key)?this.cacheStructures=(r=this.cacheStructures)==null?void 0:r.map(o=>o.key===(e==null?void 0:e.key)?{...o,data:e==null?void 0:e.data}:o):this.cacheStructures.push(e):this.cacheStructures=[]},setChildMenu(e){this.childMenu=e},async setConfigMenu(e){this.configMenu=e},setActiveMainMenu(e){this.activeMainMenu=e},setContentLoading(e){this.contentLoading=e},setActiveAsideMenu(e){this.activeAsideMenu=e},setActiveTopMenuPath(e){this.activeTopMenuPath=e},setCacheInputMenu(e){this.cacheInputMenu=e},setIsRefreshMenus(e){this.isRefreshMenus=e},setButtonTriggerType(e){this.buttonTriggerType=e},setAsideMenus(e){this.asideMenus=e},setMenus(e){this.menus=e},setPlatName(e){this.platName=e},setImportLoading(e){this.importLoading=e},setPlatform(e){this.platform=e},getPlatform(){return this.platform},setMenuTriggerType(e){this.menuTriggerType=e},setSystemKey(e){this.systemKey=e},setActiveMenuPath(e){!e&&e!==null||(this.activeOldMenuPath=h.cloneDeep(this.activeMenuPath),this.activeMenuPath=e)},setActiveMenuOpenPaths(e){this.activeMenuOpenPaths=e},setRawMenus(e){this.rawMenus=e,this.permissionSideMenus=Wa}}}),at=(e,n)=>Array.isArray(e)?e==null?void 0:e.map(r=>{var o,i,a,s,c,u;if(Array.isArray(r)?r=r:r=[r],(o=r==null?void 0:r.filter(f=>!(f!=null&&f.id)||typeof(f==null?void 0:f.id)=="string"))!=null&&o.every(f=>typeof f!="object"||f===null))return r;if((i=r==null?void 0:r.filter(f=>!(f!=null&&f.id)||typeof(f==null?void 0:f.id)=="string"))!=null&&i.some(f=>Array.isArray(f)))return r;{let f=[];if(f.push(r==null?void 0:r.find(p=>(p==null?void 0:p.id)&&typeof(p==null?void 0:p.id)=="number")),Array.isArray(n==null?void 0:n[0])){const p=(a=r==null?void 0:r.filter(d=>!(d!=null&&d.id)||typeof(d==null?void 0:d.id)=="string"))==null?void 0:a[0];(s=en(h.cloneDeep(n==null?void 0:n[0])))==null||s.forEach(d=>{f.push(p==null?void 0:p[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}else{const p=(c=r==null?void 0:r.filter(d=>!(d!=null&&d.id)||typeof(d==null?void 0:d.id)=="string"))==null?void 0:c[0];(u=en(h.cloneDeep(n)))==null||u.forEach(d=>{f.push(p==null?void 0:p[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}return f}}):void 0,Ga=e=>{try{return JSON.parse(e),!0}catch{return!1}},Rr=(e,n)=>h.isEqual(e,n),jn=h.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:"",multipleTableConst:"."}),actions:{setTableIndex(e){this.tableIndex=e},setTableShowThree(e){this.tableShowThree=e}}}),Ya=jn(h.pinia),{multipleTableConst:ge}=h.storeToRefs(Ya),We=e=>{let n=[];function t(o,i=""){Array.isArray(o)&&(o==null||o.forEach(a=>{Array.isArray(a)||(a=[a]),a==null||a.forEach(s=>{var c,u,f,p,d,y,g,b,v,m,S,A;if(!(s!=null&&s.children)||s.children.length===0)s.prop=i===""?s==null?void 0:s.prop:i+ge.value+((p=(c=s==null?void 0:s.prop)==null?void 0:c.split(ge.value))==null?void 0:p[((f=(u=s==null?void 0:s.prop)==null?void 0:u.split(ge.value))==null?void 0:f.length)-1]),n.push(s.prop);else{let E=i===""?i+((b=(d=s==null?void 0:s.prop)==null?void 0:d.split(ge.value))==null?void 0:b[((g=(y=s==null?void 0:s.prop)==null?void 0:y.split(ge.value))==null?void 0:g.length)-1]):i+ge.value+((A=(v=s==null?void 0:s.prop)==null?void 0:v.split(ge.value))==null?void 0:A[((S=(m=s==null?void 0:s.prop)==null?void 0:m.split(ge.value))==null?void 0:S.length)-1]);r(s.children,E)}})}))}function r(o,i=""){o==null||o.forEach(a=>{var s,c,u,f,p,d,y,g,b,v,m,S;if(!(a!=null&&a.children)||a.children.length===0)a.prop=i===""?a==null?void 0:a.prop:i+ge.value+((f=(s=a==null?void 0:a.prop)==null?void 0:s.split(ge.value))==null?void 0:f[((u=(c=a==null?void 0:a.prop)==null?void 0:c.split(ge.value))==null?void 0:u.length)-1]),n.push(a.prop);else{let A=i===""?i+((g=(p=a==null?void 0:a.prop)==null?void 0:p.split(ge.value))==null?void 0:g[((y=(d=a==null?void 0:a.prop)==null?void 0:d.split(ge.value))==null?void 0:y.length)-1]):i+ge.value+((S=(b=a==null?void 0:a.prop)==null?void 0:b.split(ge.value))==null?void 0:S[((m=(v=a==null?void 0:a.prop)==null?void 0:v.split(ge.value))==null?void 0:m.length)-1]);r(a.children,A)}})}return t(e),n},Za=(e,n,t)=>{var o;let r=(o=h.cloneDeep(e))==null?void 0:o.map(i=>(i=i.filter(a=>!(a!=null&&a.id)),i));return r=r==null?void 0:r.map(i=>{var a;return i=(a=i.map((s,c)=>{let u={};if(t!=null&&t.find(f=>f===n[c]))return u[n[c]]=s,u}))==null?void 0:a.filter(s=>s),i}),r},Ja=(e,n)=>{var a,s;const t=h.cloneDeep(e),r=(a=t==null?void 0:t.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:a.contents,o=(s=t==null?void 0:t.find(c=>(c==null?void 0:c.key)==="tableContents"))==null?void 0:s.contents;return Za(o,We(r).slice(0,We(r).length-1),n)},Xa=e=>{let n={};return e==null||e.forEach(t=>{n[t.key]=t.value}),n},Qa=async e=>{var t,r,o,i;let n="";if((r=(t=h.cloneDeep(e))==null?void 0:t.split("/"))==null||r.forEach((a,s)=>{var c,u;s!==((u=(c=h.cloneDeep(e))==null?void 0:c.split("/"))==null?void 0:u.length)-1&&(n=n===""?n+a:n+"/"+a)}),n!==""){let a="";const s=await $e(n,sessionStorage.getItem("systemKey"),"");(i=(o=s==null?void 0:s[0])==null?void 0:o.compData)==null||i.forEach(c=>{var u;(c==null?void 0:c.key)==="tableContents"&&((u=c==null?void 0:c.contents)==null||u.forEach((f,p)=>{if(p===0){let d=f==null?void 0:f.filter(y=>!(y!=null&&y.id));a=n+"/"+(d==null?void 0:d[0])}}))}),await wt(a,e)}},es=e=>{var o,i,a,s;const n=e;let t=[];n.compData=(o=n.compData)==null?void 0:o.filter(c=>(c==null?void 0:c.key)!=="tableContents"&&(c==null?void 0:c.key)!=="tableIndex");const r=(a=(i=h.cloneDeep(n.compData))==null?void 0:i.find(c=>(c==null?void 0:c.key)==="tableIndexColumn"))==null?void 0:a.contents;return(s=h.cloneDeep(n.compData))==null||s.forEach(c=>{if((c==null?void 0:c.key)!=="tableIndexColumn"&&(c==null?void 0:c.key)!=="header")t.push(c);else if((c==null?void 0:c.key)==="header"){let u=c.contents;r&&(u!=null&&u.every(f=>Array.isArray(f))?u==null||u[0].unshift({label:r}):u.unshift({label:r})),t.push({key:"header",contents:u})}}),n.compData=t,n},ts=e=>{var i,a,s,c,u;const n=(i=e.compData)==null?void 0:i.filter(f=>(f==null?void 0:f.key)==="tableContents"||(f==null?void 0:f.key)==="tableIndex"),t=(s=(a=n==null?void 0:n.find(f=>(f==null?void 0:f.key)==="tableIndex"))==null?void 0:a.contents)==null?void 0:s.map(f=>f.label),r=(c=n==null?void 0:n.find(f=>(f==null?void 0:f.key)==="tableContents"))==null?void 0:c.contents;let o=[];return(t==null?void 0:t.length)>0&&(r!=null&&r.every(f=>Array.isArray(f)))?o=t==null?void 0:t.map((f,p)=>r[p]?[f,...r[p]]:[f]):Array.isArray(r==null?void 0:r[0])&&((u=r==null?void 0:r[0])!=null&&u.every(f=>Array.isArray(f)))?o=r==null?void 0:r[0]:Array.isArray(r==null?void 0:r[0])?o=r:o.push(r),o},ns=e=>{const n=[];function t(r){!r||r.length===0||(n.push(r==null?void 0:r.map(o=>({label:o.label}))),r==null||r.forEach(o=>{o!=null&&o.children&&(o==null?void 0:o.children.length)>0&&t(o==null?void 0:o.children)}))}return t(e),n},rs=e=>{const n=[];function t(r,o=[]){!r||r.length===0||(n.push({key:o==null?void 0:o.filter(i=>!Array.isArray(i)),value:r}),r==null||r.forEach(i=>{i!=null&&i.some(a=>Array.isArray(a))&&t(i.find(a=>Array.isArray(a)),i)}))}return t(e),n},os=e=>{const n=[];function t(r){!r||r.length===0||(n.push(r==null?void 0:r.map(o=>o==null?void 0:o.filter(i=>!Array.isArray(i)))),r==null||r.forEach(o=>{o!=null&&o.some(i=>Array.isArray(i))&&t(o.find(i=>Array.isArray(i)))}))}return t(e),n},is=e=>{const n=[];function t(r){var o;!r||r.length===0||(r!=null&&r.every(i=>!Array.isArray(i))?n.push(r):(n.push((o=r==null?void 0:r.map(i=>i==null?void 0:i.filter(a=>!Array.isArray(a))))==null?void 0:o[0]),r==null||r.forEach(i=>{i!=null&&i.some(a=>Array.isArray(a))&&t(i.find(a=>Array.isArray(a)))})))}return t(e),n},as=(e,n)=>{let t;function r(o,i,a=1){var c;if(!o||o.length===0)return;const s=(c=h.cloneDeep(i))==null?void 0:c.map(u=>u==null?void 0:u.filter(f=>!Array.isArray(f)));return s!=null&&s.find(u=>Rr(u,o==null?void 0:o.key))?(i==null||i.forEach(u=>{!r(o,u.find(p=>Array.isArray(p)))&&Rr(u.filter(p=>!Array.isArray(p)),o==null?void 0:o.key)&&(t={type:a,contents:u.filter(p=>!Array.isArray(p))})}),!0):!1}return r(e,n,0),t},Nr=(e,n)=>{function t(r,o){return!r||r.length===0||r==null?void 0:r.map((a,s)=>{var u,f;let c=a;return c.unshift((u=o==null?void 0:o[s])==null?void 0:u.label),c.some(p=>Array.isArray(p))&&(c[c.length-1]=t(c.find(p=>Array.isArray(p)),(f=o==null?void 0:o[s])==null?void 0:f.children)),c})}return t(e,n)},ss=e=>{var t,r,o,i,a,s,c,u,f,p,d,y,g,b,v,m,S,A,E,C,w,D,T,P,k;const n=e;if((e==null?void 0:e.comp)==="Table"){if((o=(r=(t=e.compData)==null?void 0:t.find(x=>(x==null?void 0:x.key)==="tableIndex"))==null?void 0:r.contents)!=null&&o.every(x=>!(x!=null&&x.children))||!((i=e.compData)!=null&&i.find(x=>(x==null?void 0:x.key)==="tableIndex")))return((c=(s=(a=n.compData)==null?void 0:a.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:c.length)===1&&((d=(p=(f=(u=n.compData)==null?void 0:u.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:f.contents)==null?void 0:p[0])!=null&&d.every(x=>Array.isArray(x)))?(n.compData=(y=n.compData)==null?void 0:y.map(x=>{var R;return(x==null?void 0:x.key)==="tableContents"&&(x.contents=(R=x.contents)==null?void 0:R[0]),x}),[n]):[n];{let x=[];const R=n.compData,O=(g=h.cloneDeep(R))==null?void 0:g.find(K=>(K==null?void 0:K.key)==="tableIndexColumn"),G=(b=h.cloneDeep(R))==null?void 0:b.find(K=>(K==null?void 0:K.key)==="extraButton"),Z=(v=h.cloneDeep(R))==null?void 0:v.find(K=>(K==null?void 0:K.key)==="rowButton"),J=is((S=(m=h.cloneDeep(R))==null?void 0:m.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:S.contents),N=(A=h.cloneDeep(R))==null?void 0:A.find(K=>(K==null?void 0:K.key)==="tableIndex"),$=os((C=(E=h.cloneDeep(R))==null?void 0:E.find(K=>(K==null?void 0:K.key)==="tableContents"))==null?void 0:C.contents),z=Nr((D=(w=h.cloneDeep(R))==null?void 0:w.find(K=>(K==null?void 0:K.key)==="tableContents"))==null?void 0:D.contents,N==null?void 0:N.contents),X=rs(Nr((P=(T=h.cloneDeep(R))==null?void 0:T.find(K=>(K==null?void 0:K.key)==="tableContents"))==null?void 0:P.contents,N==null?void 0:N.contents));if(N)return(k=ns(N.contents))==null||k.forEach((K,M)=>{var L;let V=[];V.push({key:"tableIndex",contents:K}),V.push(O),V.push(G),V.push(Z),V.push({key:"tableContents",contents:$[M]}),V.push({key:"header",contents:J!=null&&J[M]?[J==null?void 0:J[M]]:[J==null?void 0:J[0]]}),x.push({comp:"Table",compData:V,name:"",parentTableContents:((L=as(X[M],z))==null?void 0:L.contents)??""})}),x}}else return[n]},ct=(e,n)=>{let t={};return Array.isArray(e)?e==null||e.forEach((r,o)=>{n!=null&&n[o]&&(t[n[o]]=r)}):[e].forEach((r,o)=>{t[n[o]]=r}),t},ls=e=>{var t,r;let n="";return(r=(t=h.cloneDeep(e))==null?void 0:t.split("/"))==null||r.forEach((o,i)=>{var a,s;i<((s=(a=h.cloneDeep(e))==null?void 0:a.split("/"))==null?void 0:s.length)-1&&(n=n===""?n+o:n+"/"+o)}),n},us=async e=>{const n=h.cloneDeep(e);let t=[],r=[];n==null||n.forEach(o=>{!(r!=null&&r.find(i=>(i==null?void 0:i.parentKey)===(o==null?void 0:o.parentKey)))&&(o==null?void 0:o.parentKey)!==""&&r.push(o)}),r=r==null?void 0:r.map(o=>{var i;return o.content=(i=o.content)==null?void 0:i.map(a=>{var s;return a.key={pageKey:(o==null?void 0:o.parentKey)??"",systemKey:((s=a.key)==null?void 0:s.systemKey)??"",version:1,type:"subStructure"},a}),o.content}),(r==null?void 0:r.length)>0&&(t=r==null?void 0:r.map(async o=>{let i;return(o==null?void 0:o.length)>0&&(i=await h.batchAddInsofDataApi({dataList:o})),i})),await Promise.all(t)},gt=h.defineStore("modelComp",{state:()=>({lockingPage:"",itemData:[],itemGridData:[],itemExtendData:{},originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[],systemPath:"",freshContent:!1,routeToChildPath:"",cacheUpdatingData:null,tableViewContents:[],activeItemIndex:-1,tableLoading:!1,pageMapState:{},payloadTypes:"data,structure,structureMethod,gridLayout,extend"}),actions:{setLockingPage(e){this.lockingPage=e},setPageMapState(e){this.pageMapState=e},setItemGridData(e){this.itemGridData=e},setItemExtendData(e){this.itemExtendData=e},setItemData(e){this.itemData=e},setTableLoading(e){this.tableLoading=e},setTableViewContents(e){this.tableViewContents=e},setCacheUpdatingData(e){this.cacheUpdatingData=e},setFreshContent(e){this.freshContent=e},setRouteToChildPath(e){this.routeToChildPath=e},setSubmitCurStructure(e){this.isSubmitCurStructure=e},setCurStructureCompIds(e){this.curStructureCompIds=e},setRefreshCurStructure(e){this.isRefreshCurStructure=e},setOriginalData(e){this.originalData=e},setExtraContents(e){this.extraContents=e},setNodeDev(e){this.nodeDev=e},setIsEdit(e){this.isEdit=e},setSystemPath(e){this.systemPath=e},setActiveItemIndex(e){this.activeItemIndex=e}}}),qn=h.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(e){this.routerPageStructures=e}}}),cs=Ct(h.pinia),{activeMenuPath:$t}=h.storeToRefs(cs),Oo=h.useLoginState(h.pinia),{structureData:fs,loginUserInfo:yn}=h.storeToRefs(Oo),hs=qn(h.pinia),{routerPageStructures:ps}=h.storeToRefs(hs),Wt=gt(h.pinia),ds=l.ref([{label:"角色名称",value:"",name:"roleName"}]),gs=l.ref([{label:"查询"},{label:"重置"}]),Pr=l.reactive({isFilter:!1,filterForm:{}}),ys=l.ref(!1),vs=e=>{Pr.isFilter=!0,Pr.filterForm=e},Vo=l.ref([]),Cn=l.ref([]),Fo=l.ref(""),ms=l.computed(()=>{var n,t,r,o,i;const e=(n=ps.value)==null?void 0:n.find(a=>{var s;return((s=a==null?void 0:a.comp)==null?void 0:s.toUpperCase())==="TABLE"});if(e){Fo.value=e.name,Cn.value=(o=(r=(t=e==null?void 0:e.compData)==null?void 0:t.find(s=>(s==null?void 0:s.key)==="header"))==null?void 0:r.contents)==null?void 0:o.filter(s=>(s==null?void 0:s.label)!=="操作");const a=(i=e==null?void 0:e.compData)==null?void 0:i.map(s=>{var c;if((s==null?void 0:s.key)==="rowButton"){let u=[];return it.value?u=[...s==null?void 0:s.contents,{label:"授权"}]:u=s==null?void 0:s.contents,{...s,contents:u}}return(s==null?void 0:s.key)==="header"?{...s,contents:(c=s==null?void 0:s.contents)==null?void 0:c.map(u=>{var f,p;return{...u,isTableColHidden:(f=u==null?void 0:u.prop)==null?void 0:f.includes("授权"),isFormColHidden:(p=u==null?void 0:u.prop)==null?void 0:p.includes("授权")}})}:s});return _o(a),a}return[]}),bs=e=>{Wt.setRefreshCurStructure(!1),Qn(e.singleContent,e.buttonName,sn.value,e==null?void 0:e.selectItems)},rt=l.ref({}),Wn=l.ref(),Dt=async(e,n,t)=>{var r,o;try{const i=await e(n);return((r=i==null?void 0:i.data)==null?void 0:r.code)===200?(t!=="查询"&&await Oo.setLogRecordAsync({type:t,data:n},$t.value),h.ElMessage.success("保存成功"),Wt.setRefreshCurStructure(!0),i.data.result||((o=i==null?void 0:i.data)==null?void 0:o.code)===200):null}catch(i){h.ElMessage.error(i)}finally{Wt.setCacheUpdatingData(null)}},Lo=(e,n)=>{const t=[];for(const r of e)n!=null&&n.has(r.path)&&t.push(r),r.children&&t.push(...Lo(r.children,n));return t},Ss=(e,n)=>{var t,r;try{const o=new Map(e==null?void 0:e.map(s=>[s.path,s.checkedButtons])),i=Lo(n,o),a=(t=i==null?void 0:i.filter(s=>{var c,u;return((c=s==null?void 0:s.checkedButtons)==null?void 0:c.length)===((u=s==null?void 0:s.renderButtons)==null?void 0:u.length)}))==null?void 0:t.map(s=>s==null?void 0:s.path);(r=Wn.value)==null||r.setCheckedKeys(a)}catch{throw new Error("数据显示处理失败")}},Es=(e,n)=>{const t=new Map(n==null?void 0:n.map(o=>[o.path,o.checkedButtons]));function r(o){var a,s;const i=(a=o==null?void 0:o.path)!=null&&a.startsWith("/")?(s=o==null?void 0:o.path)==null?void 0:s.substring(1):o==null?void 0:o.path;t.has(i)&&(o.checkedButtons=t.get(i)),o.children&&o.children.length>0&&o.children.forEach(r)}e.forEach(r)},Ko=e=>e==null?void 0:e.map(n=>{var r;const t={...n,checkedButtons:[]};return t.children&&((r=t.children)==null?void 0:r.length)>0&&(t.children=Ko(t.children)),t}),Gn=e=>{for(const n in e)if(Array.isArray(e[n]))return n;return""},Ho=e=>{const n=[];let t=0;for(;t<e.length;)if(typeof e[t]=="string"){const r={title:e[t]};t+1<e.length&&Array.isArray(e[t+1])?(r.children=Ho(e[t+1]),t+=2):t+=1,n.push(r)}return n},Yn=e=>{const n=[];let t=0;for(;t<(e==null?void 0:e.length);){const r={title:e==null?void 0:e[t]};t+1<(e==null?void 0:e.length)&&Array.isArray(e==null?void 0:e[t+1])?(r.children=Ho(e==null?void 0:e[t+1]),t+=2):t+=1,n.push(r)}return n},an=(e,n="",t=new Map)=>e==null?void 0:e.map(r=>{const o=n?`${n}/${r.title}`:r.title;if(t.has(o))return t.get(o);const i={...r,path:o};return r.children&&r.children.length>0&&(i.children=an(r.children,o,t)),t.set(o,i),i}),Zn=(e,n)=>e.reduce((t,r)=>{const o=r[n];return t[o]||(t[o]=[]),t[o].push(r),t},{}),Jn=e=>{const n=[];function t(r,o){!r.children||r.children.length===0?n.push({...r,parentPath:o||""}):r.children.forEach(i=>t(i,r.path||o))}return e.forEach(r=>t(r,"")),n},Xn=e=>Object.entries(e).map(([t,r])=>({path:t,checkedButtons:r==null?void 0:r.map(o=>o==null?void 0:o.path)})),Ts=e=>Object.prototype.toString.call(e)==="[object Object]"&&e!==null,ws=(e,n)=>{const t={},r=Array.isArray(e)?e==null?void 0:e.filter(o=>{var i;return!(Ts(o)&&((i=Object.keys(o))!=null&&i.includes("id")))}):null;return r&&(r==null||r.forEach((o,i)=>{var a;t[(a=n[i])==null?void 0:a.prop]=o})),t},ot=l.ref(""),_o=e=>{var i;const n=e==null?void 0:e.find(a=>(a==null?void 0:a.key)==="tableContents"),t=e==null?void 0:e.find(a=>(a==null?void 0:a.key)==="header");if(!n||!t)return"";const r=(i=n==null?void 0:n.contents)==null?void 0:i[0],o=ws(r,t==null?void 0:t.contents);ot.value=Gn(o)},ks=e=>{if(!Array.isArray(e))return!1;for(let n of e){if(typeof n!="object"||n===null||typeof n.path!="string"||!Array.isArray(n.checkedButtons))return!1;for(let t of n.checkedButtons)if(typeof t!="string")return!1}return!0},Ds=e=>{const n=[];for(const t in e)e[t].forEach(o=>{var c,u;const i=(c=o.path)!=null&&c.startsWith("/")?(u=o.path)==null?void 0:u.substring(1):o.path,a=i==null?void 0:i.split("/");let s=n;a.forEach(f=>{let p=s.find(d=>d.title===f);p||(p={title:f,path:o.path,children:[]},s.push(p)),s=p.children})});return n},As=e=>{const n={};return e.forEach(t=>{const{path:r,checkedButtons:o}=t,i=r,a=o.map(s=>({title:s.split("/").pop()||"",path:s,parentPath:i}));n[i]=a}),n},zo=e=>{let n=[];for(const t of e){let r=[t.title];if(t.children&&Array.isArray(t.children)){let o=zo(t.children);o.length>0&&r.push(o)}n.push(r)}return n},Cs=e=>{const n=[];for(const t of e){if(!Array.isArray(t)||t.length!==2)continue;const[r,o]=t,i=$o(o),a=n.indexOf(r);a===-1?n.push(r,i):n[a+1]=Uo(n[a+1],i)}return n},$o=e=>{const n=[];for(const t of e)if(Array.isArray(t)){if(t.length===1&&typeof t[0]=="string")n.push(t[0]);else if(t.length===2&&typeof t[0]=="string"){const[r,o]=t;n.push(r,$o(o))}}return n},Uo=(e,n)=>{const t=[...e];let r=0;for(;r<n.length;){const o=n[r];if(typeof o=="string"){const i=t.indexOf(o);i===-1?t.push(o,n[r+1]):t[i+1]=Uo(t[i+1],n[r+1]),r+=2}else t.push(o),r+=1}return t},Is=async(e,n)=>{var t;if(rt.value=h.cloneDeep(n),Wt.setRefreshCurStructure(!1),(t=st.value)==null||t.splice(0),e==="授权"){if(!ot.value){h.ElMessage.error("请正确定义角色权限");return}const r=ks(rt.value[ot.value]);let o;if(r)o=rt.value[ot.value];else{const i=Yn(rt.value[ot.value]),a=an(i),s=Jn(a),c=Zn(s,"parentPath");o=Xn(c)}if(!o||!Array.isArray(o)){h.ElMessage.error("权限数据处理出错了,请联系管理员");return}Ge.title=`【${n.角色名称}】授权`,Ge.show=!0,await l.nextTick(),Es(ft.value,o),Ss(o,ft.value)}},xs=()=>{Ge.show=!1},In=l.ref(),Bs=async e=>{const n=await Dt(h.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),t=n==null?void 0:n.map(r=>{var o;return{id:r.id,tableData:(o=r==null?void 0:r.value)==null?void 0:o.tableData}});return t==null?void 0:t.map(r=>{var o;if(Array.isArray(r==null?void 0:r.tableData)){let i={id:r.id};return(o=r==null?void 0:r.tableData)==null||o.forEach((a,s)=>{i[`a${s}`]=a}),i}else return{...r.tableData,id:r.id}})},At=(e,n)=>{let t={};if(n==null||n.forEach(r=>{r.label&&e&&(t[r.label]=(e==null?void 0:e[r==null?void 0:r.prop])??null)}),t!=null&&t.id){const{id:r,...o}=t;return o}return t},Ms=async(e,n)=>{var i,a;let t=[];Array.isArray(e)?t=h.cloneDeep(e):t=[h.cloneDeep(e)];const r=(i=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="string"))==null?void 0:i.map(s=>{var c,u,f,p,d;return{key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(c=$t.value)!=null&&c.startsWith("/")?(u=$t.value)==null?void 0:u.substring(1):$t.value,tableId:n,createUserId:(f=yn.value)==null?void 0:f.id,createUserOrg:((p=yn.value)==null?void 0:p.dept)||((d=yn.value)==null?void 0:d.部门名称)},value:{tableData:At(s,Cn.value)}}}),o=(a=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="number"))==null?void 0:a.map(s=>({id:s==null?void 0:s.id,value:{tableData:At(s,Cn.value)}}));r.length>0&&await Dt(h.batchAddInsofDataApi,{dataList:r},"新增"),o.length>0&&(await Dt(h.batchUpdateInsofDataApi,{dataList:o},"编辑"),Ge.show=!1)},Qn=async(e,n,t,r)=>{if(!(n!=null&&n.includes("删除")))await Ms(e,t);else{let o=[];n!=null&&n.includes("批量")?o=r&&(r==null?void 0:r.length)>0?r==null?void 0:r.map(i=>i==null?void 0:i.id):[]:o=[e==null?void 0:e.id],await Dt(h.batchDeleteInsofDataApi,{ids:o},"编辑")}},jo=e=>{let n=[];return e==null||e.forEach(t=>{var r;if(t.checkedButtons&&((r=t.checkedButtons)==null?void 0:r.length)>0){const o={path:t.path,checkedButtons:t.checkedButtons};n=n.concat(o)}t.children&&(n=n.concat(jo(t.children)))}),n},Rs=()=>{const e=jo(ft.value),n=As(e),t=Ds(n),r=zo(t),o=Cs(r);In.value={...rt.value,[ot.value]:o},l.nextTick(()=>{Qn(In.value,"编辑",sn.value)})},Ge=l.reactive({show:!1,title:"角色授权",width:"30%",draggable:!0}),Ns=({isPenultimate:e},n)=>{var t,r;return console.log("isPenultimate",e,n),((r=(t=n==null?void 0:n.data)==null?void 0:t.renderButtons)==null?void 0:r.length)>0?"is-penultimate":""},sn=l.ref(0),qo=async e=>{var r,o,i,a,s;let n;const t=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:e!=null&&e.startsWith("/")?e==null?void 0:e.substring(1):e}});return((r=t==null?void 0:t.data)==null?void 0:r.code)===200&&(o=t==null?void 0:t.data)!=null&&o.result&&((i=t==null?void 0:t.data)==null?void 0:i.result.length)>0&&(n=(s=(a=t==null?void 0:t.data.result)==null?void 0:a[0])==null?void 0:s.id,sn.value=n),n},ft=l.ref([]),Ps=l.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]),Os=(e,n)=>{var t;e.checkedButtons=n?(t=e.renderButtons)==null?void 0:t.map(r=>r.path):[]},st=l.ref([]),Vs=(e,n)=>{var t,r,o;n.checkedButtons=e,((t=n.checkedButtons)==null?void 0:t.length)===((r=n.renderButtons)==null?void 0:r.length)?st.value.push(n.path):(e==null?void 0:e.length)===0&&(st.value=(o=st.value)==null?void 0:o.filter(i=>i!==n.path))};l.watch(()=>st.value.length,()=>{var e;(e=Wn.value)==null||e.setCheckedKeys([...st.value])});l.watch(()=>Ge.show,e=>{e||(ft.value=Ko(ft.value))});const Wo=l.computed(()=>{var t;const e=(t=h.cloneDeep(fs.value))==null?void 0:t.filter(r=>{var o,i;return((i=(o=r==null?void 0:r.key)==null?void 0:o.pageKey)==null?void 0:i.toUpperCase())!=="MENU"});return[...e==null?void 0:e.map(r=>{var a,s,c,u,f,p,d,y;const o=/button/i;let i=(c=(s=(a=r==null?void 0:r.value)==null?void 0:a.pageData)==null?void 0:s.compData)==null?void 0:c.filter(g=>o.test(g==null?void 0:g.key));return i=Array.from(new Set(i==null?void 0:i.flatMap(g=>g.contents.map(b=>b.label)))),{path:(f=(u=r==null?void 0:r.key)==null?void 0:u.pageKey)!=null&&f.startsWith("/")?(d=(p=r==null?void 0:r.key)==null?void 0:p.pageKey)==null?void 0:d.substring(1):(y=r==null?void 0:r.key)==null?void 0:y.pageKey,buttons:i}}),...Go.value]}),Go=l.ref([]),Fs=(e,n,t)=>{const o=[e==null?void 0:e.find(i=>(i==null?void 0:i.title)===n)].flatMap(i=>i==null?void 0:i.children);return o==null?void 0:o.map(i=>{var a,s;return{path:(a=i==null?void 0:i.path)!=null&&a.startsWith("/")?(s=i==null?void 0:i.path)==null?void 0:s.substring(1):i==null?void 0:i.path,buttons:t}})},Or=(e,n)=>{var t;if(e.carryData){if(e.path==="系统管理/个人中心"){const o=["基本信息","上传头像","签名","修改密码"];return o==null?void 0:o.map(i=>{var a,s;return{title:i,path:(a=e==null?void 0:e.path)!=null&&a.startsWith("/")?((s=e==null?void 0:e.path)==null?void 0:s.substring(1))+"/"+i:e.path+"/"+i}})}if(!(n!=null&&n.buttons)||!Array.isArray(n==null?void 0:n.buttons))return[];const r=(t=n==null?void 0:n.buttons)!=null&&t.includes("查看")?n==null?void 0:n.buttons:["查看",...n==null?void 0:n.buttons];return r==null?void 0:r.map(o=>{var i,a;return{title:o,path:(i=e==null?void 0:e.path)!=null&&i.startsWith("/")?((a=e==null?void 0:e.path)==null?void 0:a.substring(1))+"/"+o:e.path+"/"+o}})}return[]},Yo=(e,n)=>{if(Array.isArray(e))return e==null?void 0:e.map(t=>{var i,a;const r=(i=t==null?void 0:t.path)!=null&&i.startsWith("/")?(a=t==null?void 0:t.path)==null?void 0:a.substring(1):t==null?void 0:t.path,o=n==null?void 0:n.find(s=>(s==null?void 0:s.path)===r);return t.children&&t.children.length>0?{...t,renderButtons:Or(t,o),checkedButtons:[],children:Yo(t.children,Wo.value)}:{...t,renderButtons:Or(t,o),checkedButtons:[]}})},Ls={comp:"Group",name:"/系统管理/角色管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:Vo.value,name:""}]}]},Ks=Object.freeze(Object.defineProperty({__proto__:null,addButtonsToTree:Yo,addPathToTree:an,authorizeDialog:Ge,buttonValue:gs,changedRow:In,clickRow:rt,clickRowButton:Is,clickSubmitAuthority:Rs,closeAuthorizeDialog:xs,compName:Fo,convertArrayToTree:Yn,convertIndexToLabel:At,customNodeClass:Ns,getActivePageStructureId:qo,getAuthorityKey:_o,getFirstArrayProperty:Gn,getLeafNodesRecursive:Jn,getPageDataAsync:Bs,groupByField:Zn,handleAddSysMenusButtons:Fs,handleItemDataChange:bs,handleNodeBtnChange:Vs,handleNodeCheckChange:Os,handleQueryChange:vs,handleRowAuthorityRender:Xn,handleSubmitAsync:Dt,isPageDataExist:ys,menuData:ft,menusButtons:Ps,pageData:Vo,pageDataFiltered:ms,queryFormData:ds,structureButtons:Wo,structureId:sn,submitTableAsyncByVerify:Qn,tempRolePageData:Ls,tempSysMenus:Go,treeRef:Wn},Symbol.toStringTag,{value:"Module"}));var Hs="0123456789abcdefghijklmnopqrstuvwxyz";function Pe(e){return Hs.charAt(e)}function _s(e,n){return e&n}function Vt(e,n){return e|n}function Vr(e,n){return e^n}function Fr(e,n){return e&~n}function zs(e){if(e==0)return-1;var n=0;return(e&65535)==0&&(e>>=16,n+=16),(e&255)==0&&(e>>=8,n+=8),(e&15)==0&&(e>>=4,n+=4),(e&3)==0&&(e>>=2,n+=2),(e&1)==0&&++n,n}function $s(e){for(var n=0;e!=0;)e&=e-1,++n;return n}var tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zo="=";function Gt(e){var n,t,r="";for(n=0;n+3<=e.length;n+=3)t=parseInt(e.substring(n,n+3),16),r+=tt.charAt(t>>6)+tt.charAt(t&63);for(n+1==e.length?(t=parseInt(e.substring(n,n+1),16),r+=tt.charAt(t<<2)):n+2==e.length&&(t=parseInt(e.substring(n,n+2),16),r+=tt.charAt(t>>2)+tt.charAt((t&3)<<4));(r.length&3)>0;)r+=Zo;return r}function Lr(e){var n="",t,r=0,o=0;for(t=0;t<e.length&&e.charAt(t)!=Zo;++t){var i=tt.indexOf(e.charAt(t));i<0||(r==0?(n+=Pe(i>>2),o=i&3,r=1):r==1?(n+=Pe(o<<2|i>>4),o=i&15,r=2):r==2?(n+=Pe(o),n+=Pe(i>>2),o=i&3,r=3):(n+=Pe(o<<2|i>>4),n+=Pe(i&15),r=0))}return r==1&&(n+=Pe(o<<2)),n}var Xe,Us={decode:function(e){var n;if(Xe===void 0){var t="0123456789ABCDEF",r=` \f
|
|
8
|
-
\r \u2028\u2029`;for(Xe={},n=0;n<16;++n)Xe[t.charAt(n)]=n;for(t=t.toLowerCase(),n=10;n<16;++n)Xe[t.charAt(n)]=n;for(n=0;n<r.length;++n)Xe[r.charAt(n)]=-1}var
|
|
9
|
-
\r \u2028\u2029`;for(Ue=Object.create(null),n=0;n<64;++n)Ue[t.charAt(n)]=n;for(Ue["-"]=62,Ue._=63,n=0;n<r.length;++n)Ue[r.charAt(n)]=-1}var
|
|
10
|
-
`;break;default:
|
|
11
|
-
`}
|
|
12
|
-
`,s="",c=n+1;c<t;++c){for(var u=this.get(c),f=c==t-1?
|
|
13
|
-
`;r/=2,
|
|
14
|
-
`,this.sub!==null){n+=" ";for(var r=0,o=this.sub.length;r<o;++r)t+=this.sub[r].toPrettyString(n)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(n){var t=n.get(),r=t&127;if(r==t)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(n.pos-1));if(r===0)return null;t=0;for(var o=0;o<r;++o)t=t*256+n.get();return t},e.prototype.getHexStringValue=function(){var n=this.toHexString(),t=this.header*2,r=this.length*2;return n.substr(t,r)},e.decode=function(n){var t;n instanceof vn?t=n:t=new vn(n,0);var r=new vn(t),o=new Kr(t),i=e.decodeLength(t),a=t.pos,s=a-r.pos,c=null,u=function(){var p=[];if(i!==null){for(var d=a+i;t.pos<d;)p[p.length]=e.decode(t);if(t.pos!=d)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var y=e.decode(t);if(y.tag.isEOC())break;p[p.length]=y}i=a-t.pos}catch(g){throw new Error("Exception while decoding undefined length content: "+g)}return p};if(o.tagConstructed)c=u();else if(o.isUniversal()&&(o.tagNumber==3||o.tagNumber==4))try{if(o.tagNumber==3&&t.get()!=0)throw new Error("BIT STRINGs with unused bits cannot encapsulate.");c=u();for(var f=0;f<c.length;++f)if(c[f].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch{c=null}if(c===null){if(i===null)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);t.pos=a+Math.abs(i)}return new e(r,s,i,o,c)},e}(),Kr=function(){function e(n){var t=n.get();if(this.tagClass=t>>6,this.tagConstructed=(t&32)!==0,this.tagNumber=t&31,this.tagNumber==31){var r=new mt;do t=n.get(),r.mulAdd(128,t&127);while(t&128);this.tagNumber=r.simplify()}}return e.prototype.isUniversal=function(){return this.tagClass===0},e.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},e}(),ze,Gs=0xdeadbeefcafe,Hr=(Gs&16777215)==15715070,be=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Ys=(1<<26)/be[be.length-1],Y=function(){function e(n,t,r){n!=null&&(typeof n=="number"?this.fromNumber(n,t,r):t==null&&typeof n!="string"?this.fromString(n,256):this.fromString(n,t))}return e.prototype.toString=function(n){if(this.s<0)return"-"+this.negate().toString(n);var t;if(n==16)t=4;else if(n==8)t=3;else if(n==2)t=1;else if(n==32)t=5;else if(n==4)t=2;else return this.toRadix(n);var r=(1<<t)-1,o,i=!1,a="",s=this.t,c=this.DB-s*this.DB%t;if(s-- >0)for(c<this.DB&&(o=this[s]>>c)>0&&(i=!0,a=Pe(o));s>=0;)c<t?(o=(this[s]&(1<<c)-1)<<t-c,o|=this[--s]>>(c+=this.DB-t)):(o=this[s]>>(c-=t)&r,c<=0&&(c+=this.DB,--s)),o>0&&(i=!0),i&&(a+=Pe(o));return i?a:"0"},e.prototype.negate=function(){var n=ee();return e.ZERO.subTo(this,n),n},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(n){var t=this.s-n.s;if(t!=0)return t;var r=this.t;if(t=r-n.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this[r]-n[r])!=0)return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Ft(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(n){var t=ee();return this.abs().divRemTo(n,null,t),this.s<0&&t.compareTo(e.ZERO)>0&&n.subTo(t,t),t},e.prototype.modPowInt=function(n,t){var r;return n<256||t.isEven()?r=new _r(t):r=new zr(t),this.exp(n,r)},e.prototype.clone=function(){var n=ee();return this.copyTo(n),n},e.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var n=this.t,t=[];t[0]=this.s;var r=this.DB-n*this.DB%8,o,i=0;if(n-- >0)for(r<this.DB&&(o=this[n]>>r)!=(this.s&this.DM)>>r&&(t[i++]=o|this.s<<this.DB-r);n>=0;)r<8?(o=(this[n]&(1<<r)-1)<<8-r,o|=this[--n]>>(r+=this.DB-8)):(o=this[n]>>(r-=8)&255,r<=0&&(r+=this.DB,--n)),(o&128)!=0&&(o|=-256),i==0&&(this.s&128)!=(o&128)&&++i,(i>0||o!=this.s)&&(t[i++]=o);return t},e.prototype.equals=function(n){return this.compareTo(n)==0},e.prototype.min=function(n){return this.compareTo(n)<0?this:n},e.prototype.max=function(n){return this.compareTo(n)>0?this:n},e.prototype.and=function(n){var t=ee();return this.bitwiseTo(n,_s,t),t},e.prototype.or=function(n){var t=ee();return this.bitwiseTo(n,Vt,t),t},e.prototype.xor=function(n){var t=ee();return this.bitwiseTo(n,Vr,t),t},e.prototype.andNot=function(n){var t=ee();return this.bitwiseTo(n,Fr,t),t},e.prototype.not=function(){for(var n=ee(),t=0;t<this.t;++t)n[t]=this.DM&~this[t];return n.t=this.t,n.s=~this.s,n},e.prototype.shiftLeft=function(n){var t=ee();return n<0?this.rShiftTo(-n,t):this.lShiftTo(n,t),t},e.prototype.shiftRight=function(n){var t=ee();return n<0?this.lShiftTo(-n,t):this.rShiftTo(n,t),t},e.prototype.getLowestSetBit=function(){for(var n=0;n<this.t;++n)if(this[n]!=0)return n*this.DB+zs(this[n]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var n=0,t=this.s&this.DM,r=0;r<this.t;++r)n+=$s(this[r]^t);return n},e.prototype.testBit=function(n){var t=Math.floor(n/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<n%this.DB)!=0},e.prototype.setBit=function(n){return this.changeBit(n,Vt)},e.prototype.clearBit=function(n){return this.changeBit(n,Fr)},e.prototype.flipBit=function(n){return this.changeBit(n,Vr)},e.prototype.add=function(n){var t=ee();return this.addTo(n,t),t},e.prototype.subtract=function(n){var t=ee();return this.subTo(n,t),t},e.prototype.multiply=function(n){var t=ee();return this.multiplyTo(n,t),t},e.prototype.divide=function(n){var t=ee();return this.divRemTo(n,t,null),t},e.prototype.remainder=function(n){var t=ee();return this.divRemTo(n,null,t),t},e.prototype.divideAndRemainder=function(n){var t=ee(),r=ee();return this.divRemTo(n,t,r),[t,r]},e.prototype.modPow=function(n,t){var r=n.bitLength(),o,i=Ke(1),a;if(r<=0)return i;r<18?o=1:r<48?o=3:r<144?o=4:r<768?o=5:o=6,r<8?a=new _r(t):t.isEven()?a=new Js(t):a=new zr(t);var s=[],c=3,u=o-1,f=(1<<o)-1;if(s[1]=a.convert(this),o>1){var p=ee();for(a.sqrTo(s[1],p);c<=f;)s[c]=ee(),a.mulTo(p,s[c-2],s[c]),c+=2}var d=n.t-1,y,g=!0,b=ee(),v;for(r=Ft(n[d])-1;d>=0;){for(r>=u?y=n[d]>>r-u&f:(y=(n[d]&(1<<r+1)-1)<<u-r,d>0&&(y|=n[d-1]>>this.DB+r-u)),c=o;(y&1)==0;)y>>=1,--c;if((r-=c)<0&&(r+=this.DB,--d),g)s[y].copyTo(i),g=!1;else{for(;c>1;)a.sqrTo(i,b),a.sqrTo(b,i),c-=2;c>0?a.sqrTo(i,b):(v=i,i=b,b=v),a.mulTo(b,s[y],i)}for(;d>=0&&(n[d]&1<<r)==0;)a.sqrTo(i,b),v=i,i=b,b=v,--r<0&&(r=this.DB-1,--d)}return a.revert(i)},e.prototype.modInverse=function(n){var t=n.isEven();if(this.isEven()&&t||n.signum()==0)return e.ZERO;for(var r=n.clone(),o=this.clone(),i=Ke(1),a=Ke(0),s=Ke(0),c=Ke(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!i.isEven()||!a.isEven())&&(i.addTo(this,i),a.subTo(n,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(n,a),a.rShiftTo(1,a);for(;o.isEven();)o.rShiftTo(1,o),t?((!s.isEven()||!c.isEven())&&(s.addTo(this,s),c.subTo(n,c)),s.rShiftTo(1,s)):c.isEven()||c.subTo(n,c),c.rShiftTo(1,c);r.compareTo(o)>=0?(r.subTo(o,r),t&&i.subTo(s,i),a.subTo(c,a)):(o.subTo(r,o),t&&s.subTo(i,s),c.subTo(a,c))}if(o.compareTo(e.ONE)!=0)return e.ZERO;if(c.compareTo(n)>=0)return c.subtract(n);if(c.signum()<0)c.addTo(n,c);else return c;return c.signum()<0?c.add(n):c},e.prototype.pow=function(n){return this.exp(n,new Zs)},e.prototype.gcd=function(n){var t=this.s<0?this.negate():this.clone(),r=n.s<0?n.negate():n.clone();if(t.compareTo(r)<0){var o=t;t=r,r=o}var i=t.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return t;for(i<a&&(a=i),a>0&&(t.rShiftTo(a,t),r.rShiftTo(a,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},e.prototype.isProbablePrime=function(n){var t,r=this.abs();if(r.t==1&&r[0]<=be[be.length-1]){for(t=0;t<be.length;++t)if(r[0]==be[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<be.length;){for(var o=be[t],i=t+1;i<be.length&&o<Ys;)o*=be[i++];for(o=r.modInt(o);t<i;)if(o%be[t++]==0)return!1}return r.millerRabin(n)},e.prototype.copyTo=function(n){for(var t=this.t-1;t>=0;--t)n[t]=this[t];n.t=this.t,n.s=this.s},e.prototype.fromInt=function(n){this.t=1,this.s=n<0?-1:0,n>0?this[0]=n:n<-1?this[0]=n+this.DV:this.t=0},e.prototype.fromString=function(n,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(n,t);return}this.t=0,this.s=0;for(var o=n.length,i=!1,a=0;--o>=0;){var s=r==8?+n[o]&255:Ur(n,o);if(s<0){n.charAt(o)=="-"&&(i=!0);continue}i=!1,a==0?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,a+=r,a>=this.DB&&(a-=this.DB)}r==8&&(+n[0]&128)!=0&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),i&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var n=this.s&this.DM;this.t>0&&this[this.t-1]==n;)--this.t},e.prototype.dlShiftTo=function(n,t){var r;for(r=this.t-1;r>=0;--r)t[r+n]=this[r];for(r=n-1;r>=0;--r)t[r]=0;t.t=this.t+n,t.s=this.s},e.prototype.drShiftTo=function(n,t){for(var r=n;r<this.t;++r)t[r-n]=this[r];t.t=Math.max(this.t-n,0),t.s=this.s},e.prototype.lShiftTo=function(n,t){for(var r=n%this.DB,o=this.DB-r,i=(1<<o)-1,a=Math.floor(n/this.DB),s=this.s<<r&this.DM,c=this.t-1;c>=0;--c)t[c+a+1]=this[c]>>o|s,s=(this[c]&i)<<r;for(var c=a-1;c>=0;--c)t[c]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(n,t){t.s=this.s;var r=Math.floor(n/this.DB);if(r>=this.t){t.t=0;return}var o=n%this.DB,i=this.DB-o,a=(1<<o)-1;t[0]=this[r]>>o;for(var s=r+1;s<this.t;++s)t[s-r-1]|=(this[s]&a)<<i,t[s-r]=this[s]>>o;o>0&&(t[this.t-r-1]|=(this.s&a)<<i),t.t=this.t-r,t.clamp()},e.prototype.subTo=function(n,t){for(var r=0,o=0,i=Math.min(n.t,this.t);r<i;)o+=this[r]-n[r],t[r++]=o&this.DM,o>>=this.DB;if(n.t<this.t){for(o-=n.s;r<this.t;)o+=this[r],t[r++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;r<n.t;)o-=n[r],t[r++]=o&this.DM,o>>=this.DB;o-=n.s}t.s=o<0?-1:0,o<-1?t[r++]=this.DV+o:o>0&&(t[r++]=o),t.t=r,t.clamp()},e.prototype.multiplyTo=function(n,t){var r=this.abs(),o=n.abs(),i=r.t;for(t.t=i+o.t;--i>=0;)t[i]=0;for(i=0;i<o.t;++i)t[i+r.t]=r.am(0,o[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=n.s&&e.ZERO.subTo(t,t)},e.prototype.squareTo=function(n){for(var t=this.abs(),r=n.t=2*t.t;--r>=0;)n[r]=0;for(r=0;r<t.t-1;++r){var o=t.am(r,t[r],n,2*r,0,1);(n[r+t.t]+=t.am(r+1,2*t[r],n,2*r+1,o,t.t-r-1))>=t.DV&&(n[r+t.t]-=t.DV,n[r+t.t+1]=1)}n.t>0&&(n[n.t-1]+=t.am(r,t[r],n,2*r,0,1)),n.s=0,n.clamp()},e.prototype.divRemTo=function(n,t,r){var o=n.abs();if(!(o.t<=0)){var i=this.abs();if(i.t<o.t){t!=null&&t.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=ee());var a=ee(),s=this.s,c=n.s,u=this.DB-Ft(o[o.t-1]);u>0?(o.lShiftTo(u,a),i.lShiftTo(u,r)):(o.copyTo(a),i.copyTo(r));var f=a.t,p=a[f-1];if(p!=0){var d=p*(1<<this.F1)+(f>1?a[f-2]>>this.F2:0),y=this.FV/d,g=(1<<this.F1)/d,b=1<<this.F2,v=r.t,m=v-f,S=t??ee();for(a.dlShiftTo(m,S),r.compareTo(S)>=0&&(r[r.t++]=1,r.subTo(S,r)),e.ONE.dlShiftTo(f,S),S.subTo(a,a);a.t<f;)a[a.t++]=0;for(;--m>=0;){var A=r[--v]==p?this.DM:Math.floor(r[v]*y+(r[v-1]+b)*g);if((r[v]+=a.am(0,A,r,m,0,f))<A)for(a.dlShiftTo(m,S),r.subTo(S,r);r[v]<--A;)r.subTo(S,r)}t!=null&&(r.drShiftTo(f,t),s!=c&&e.ZERO.subTo(t,t)),r.t=f,r.clamp(),u>0&&r.rShiftTo(u,r),s<0&&e.ZERO.subTo(r,r)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var n=this[0];if((n&1)==0)return 0;var t=n&3;return t=t*(2-(n&15)*t)&15,t=t*(2-(n&255)*t)&255,t=t*(2-((n&65535)*t&65535))&65535,t=t*(2-n*t%this.DV)%this.DV,t>0?this.DV-t:-t},e.prototype.isEven=function(){return(this.t>0?this[0]&1:this.s)==0},e.prototype.exp=function(n,t){if(n>4294967295||n<1)return e.ONE;var r=ee(),o=ee(),i=t.convert(this),a=Ft(n)-1;for(i.copyTo(r);--a>=0;)if(t.sqrTo(r,o),(n&1<<a)>0)t.mulTo(o,i,r);else{var s=r;r=o,o=s}return t.revert(r)},e.prototype.chunkSize=function(n){return Math.floor(Math.LN2*this.DB/Math.log(n))},e.prototype.toRadix=function(n){if(n==null&&(n=10),this.signum()==0||n<2||n>36)return"0";var t=this.chunkSize(n),r=Math.pow(n,t),o=Ke(r),i=ee(),a=ee(),s="";for(this.divRemTo(o,i,a);i.signum()>0;)s=(r+a.intValue()).toString(n).substr(1)+s,i.divRemTo(o,i,a);return a.intValue().toString(n)+s},e.prototype.fromRadix=function(n,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),o=Math.pow(t,r),i=!1,a=0,s=0,c=0;c<n.length;++c){var u=Ur(n,c);if(u<0){n.charAt(c)=="-"&&this.signum()==0&&(i=!0);continue}s=t*s+u,++a>=r&&(this.dMultiply(o),this.dAddOffset(s,0),a=0,s=0)}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),i&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(n,t,r){if(typeof t=="number")if(n<2)this.fromInt(1);else for(this.fromNumber(n,r),this.testBit(n-1)||this.bitwiseTo(e.ONE.shiftLeft(n-1),Vt,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>n&&this.subTo(e.ONE.shiftLeft(n-1),this);else{var o=[],i=n&7;o.length=(n>>3)+1,t.nextBytes(o),i>0?o[0]&=(1<<i)-1:o[0]=0,this.fromString(o,256)}},e.prototype.bitwiseTo=function(n,t,r){var o,i,a=Math.min(n.t,this.t);for(o=0;o<a;++o)r[o]=t(this[o],n[o]);if(n.t<this.t){for(i=n.s&this.DM,o=a;o<this.t;++o)r[o]=t(this[o],i);r.t=this.t}else{for(i=this.s&this.DM,o=a;o<n.t;++o)r[o]=t(i,n[o]);r.t=n.t}r.s=t(this.s,n.s),r.clamp()},e.prototype.changeBit=function(n,t){var r=e.ONE.shiftLeft(n);return this.bitwiseTo(r,t,r),r},e.prototype.addTo=function(n,t){for(var r=0,o=0,i=Math.min(n.t,this.t);r<i;)o+=this[r]+n[r],t[r++]=o&this.DM,o>>=this.DB;if(n.t<this.t){for(o+=n.s;r<this.t;)o+=this[r],t[r++]=o&this.DM,o>>=this.DB;o+=this.s}else{for(o+=this.s;r<n.t;)o+=n[r],t[r++]=o&this.DM,o>>=this.DB;o+=n.s}t.s=o<0?-1:0,o>0?t[r++]=o:o<-1&&(t[r++]=this.DV+o),t.t=r,t.clamp()},e.prototype.dMultiply=function(n){this[this.t]=this.am(0,n-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(n,t){if(n!=0){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=n;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(n,t,r){var o=Math.min(this.t+n.t,t);for(r.s=0,r.t=o;o>0;)r[--o]=0;for(var i=r.t-this.t;o<i;++o)r[o+this.t]=this.am(0,n[o],r,o,0,this.t);for(var i=Math.min(n.t,t);o<i;++o)this.am(0,n[o],r,o,0,t-o);r.clamp()},e.prototype.multiplyUpperTo=function(n,t,r){--t;var o=r.t=this.t+n.t-t;for(r.s=0;--o>=0;)r[o]=0;for(o=Math.max(t-this.t,0);o<n.t;++o)r[this.t+o-t]=this.am(t-o,n[o],r,0,0,this.t+o-t);r.clamp(),r.drShiftTo(1,r)},e.prototype.modInt=function(n){if(n<=0)return 0;var t=this.DV%n,r=this.s<0?n-1:0;if(this.t>0)if(t==0)r=this[0]%n;else for(var o=this.t-1;o>=0;--o)r=(t*r+this[o])%n;return r},e.prototype.millerRabin=function(n){var t=this.subtract(e.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var o=t.shiftRight(r);n=n+1>>1,n>be.length&&(n=be.length);for(var i=ee(),a=0;a<n;++a){i.fromInt(be[Math.floor(Math.random()*be.length)]);var s=i.modPow(o,this);if(s.compareTo(e.ONE)!=0&&s.compareTo(t)!=0){for(var c=1;c++<r&&s.compareTo(t)!=0;)if(s=s.modPowInt(2,this),s.compareTo(e.ONE)==0)return!1;if(s.compareTo(t)!=0)return!1}}return!0},e.prototype.square=function(){var n=ee();return this.squareTo(n),n},e.prototype.gcda=function(n,t){var r=this.s<0?this.negate():this.clone(),o=n.s<0?n.negate():n.clone();if(r.compareTo(o)<0){var i=r;r=o,o=i}var a=r.getLowestSetBit(),s=o.getLowestSetBit();if(s<0){t(r);return}a<s&&(s=a),s>0&&(r.rShiftTo(s,r),o.rShiftTo(s,o));var c=function(){(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),(a=o.getLowestSetBit())>0&&o.rShiftTo(a,o),r.compareTo(o)>=0?(r.subTo(o,r),r.rShiftTo(1,r)):(o.subTo(r,o),o.rShiftTo(1,o)),r.signum()>0?setTimeout(c,0):(s>0&&o.lShiftTo(s,o),setTimeout(function(){t(o)},0))};setTimeout(c,10)},e.prototype.fromNumberAsync=function(n,t,r,o){if(typeof t=="number")if(n<2)this.fromInt(1);else{this.fromNumber(n,r),this.testBit(n-1)||this.bitwiseTo(e.ONE.shiftLeft(n-1),Vt,this),this.isEven()&&this.dAddOffset(1,0);var i=this,a=function(){i.dAddOffset(2,0),i.bitLength()>n&&i.subTo(e.ONE.shiftLeft(n-1),i),i.isProbablePrime(t)?setTimeout(function(){o()},0):setTimeout(a,0)};setTimeout(a,0)}else{var s=[],c=n&7;s.length=(n>>3)+1,t.nextBytes(s),c>0?s[0]&=(1<<c)-1:s[0]=0,this.fromString(s,256)}},e}(),Zs=function(){function e(){}return e.prototype.convert=function(n){return n},e.prototype.revert=function(n){return n},e.prototype.mulTo=function(n,t,r){n.multiplyTo(t,r)},e.prototype.sqrTo=function(n,t){n.squareTo(t)},e}(),_r=function(){function e(n){this.m=n}return e.prototype.convert=function(n){return n.s<0||n.compareTo(this.m)>=0?n.mod(this.m):n},e.prototype.revert=function(n){return n},e.prototype.reduce=function(n){n.divRemTo(this.m,null,n)},e.prototype.mulTo=function(n,t,r){n.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(n,t){n.squareTo(t),this.reduce(t)},e}(),zr=function(){function e(n){this.m=n,this.mp=n.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<n.DB-15)-1,this.mt2=2*n.t}return e.prototype.convert=function(n){var t=ee();return n.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),n.s<0&&t.compareTo(Y.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(n){var t=ee();return n.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(n){for(;n.t<=this.mt2;)n[n.t++]=0;for(var t=0;t<this.m.t;++t){var r=n[t]&32767,o=r*this.mpl+((r*this.mph+(n[t]>>15)*this.mpl&this.um)<<15)&n.DM;for(r=t+this.m.t,n[r]+=this.m.am(0,o,n,t,0,this.m.t);n[r]>=n.DV;)n[r]-=n.DV,n[++r]++}n.clamp(),n.drShiftTo(this.m.t,n),n.compareTo(this.m)>=0&&n.subTo(this.m,n)},e.prototype.mulTo=function(n,t,r){n.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(n,t){n.squareTo(t),this.reduce(t)},e}(),Js=function(){function e(n){this.m=n,this.r2=ee(),this.q3=ee(),Y.ONE.dlShiftTo(2*n.t,this.r2),this.mu=this.r2.divide(n)}return e.prototype.convert=function(n){if(n.s<0||n.t>2*this.m.t)return n.mod(this.m);if(n.compareTo(this.m)<0)return n;var t=ee();return n.copyTo(t),this.reduce(t),t},e.prototype.revert=function(n){return n},e.prototype.reduce=function(n){for(n.drShiftTo(this.m.t-1,this.r2),n.t>this.m.t+1&&(n.t=this.m.t+1,n.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);n.compareTo(this.r2)<0;)n.dAddOffset(1,this.m.t+1);for(n.subTo(this.r2,n);n.compareTo(this.m)>=0;)n.subTo(this.m,n)},e.prototype.mulTo=function(n,t,r){n.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(n,t){n.squareTo(t),this.reduce(t)},e}();function ee(){return new Y(null)}function ue(e,n){return new Y(e,n)}var $r=typeof navigator<"u";$r&&Hr&&navigator.appName=="Microsoft Internet Explorer"?(Y.prototype.am=function(n,t,r,o,i,a){for(var s=t&32767,c=t>>15;--a>=0;){var u=this[n]&32767,f=this[n++]>>15,p=c*u+f*s;u=s*u+((p&32767)<<15)+r[o]+(i&1073741823),i=(u>>>30)+(p>>>15)+c*f+(i>>>30),r[o++]=u&1073741823}return i},ze=30):$r&&Hr&&navigator.appName!="Netscape"?(Y.prototype.am=function(n,t,r,o,i,a){for(;--a>=0;){var s=t*this[n++]+r[o]+i;i=Math.floor(s/67108864),r[o++]=s&67108863}return i},ze=26):(Y.prototype.am=function(n,t,r,o,i,a){for(var s=t&16383,c=t>>14;--a>=0;){var u=this[n]&16383,f=this[n++]>>14,p=c*u+f*s;u=s*u+((p&16383)<<14)+r[o]+i,i=(u>>28)+(p>>14)+c*f,r[o++]=u&268435455}return i},ze=28);Y.prototype.DB=ze;Y.prototype.DM=(1<<ze)-1;Y.prototype.DV=1<<ze;var er=52;Y.prototype.FV=Math.pow(2,er);Y.prototype.F1=er-ze;Y.prototype.F2=2*ze-er;var ln=[],yt,Ie;yt=48;for(Ie=0;Ie<=9;++Ie)ln[yt++]=Ie;yt=97;for(Ie=10;Ie<36;++Ie)ln[yt++]=Ie;yt=65;for(Ie=10;Ie<36;++Ie)ln[yt++]=Ie;function Ur(e,n){var t=ln[e.charCodeAt(n)];return t??-1}function Ke(e){var n=ee();return n.fromInt(e),n}function Ft(e){var n=1,t;return(t=e>>>16)!=0&&(e=t,n+=16),(t=e>>8)!=0&&(e=t,n+=8),(t=e>>4)!=0&&(e=t,n+=4),(t=e>>2)!=0&&(e=t,n+=2),(t=e>>1)!=0&&(e=t,n+=1),n}Y.ZERO=Ke(0);Y.ONE=Ke(1);var Xs=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(n){var t,r,o;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+n[t%n.length]&255,o=this.S[t],this.S[t]=this.S[r],this.S[r]=o;this.i=0,this.j=0},e.prototype.next=function(){var n;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,n=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=n,this.S[n+this.S[this.i]&255]},e}();function Qs(){return new Xs}var Xo=256,Lt,_e=null,Be;if(_e==null){_e=[],Be=0;var Kt=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var mn=new Uint32Array(256);for(window.crypto.getRandomValues(mn),Kt=0;Kt<mn.length;++Kt)_e[Be++]=mn[Kt]&255}var Ht=0,_t=function(e){if(Ht=Ht||0,Ht>=256||Be>=Xo){window.removeEventListener?window.removeEventListener("mousemove",_t,!1):window.detachEvent&&window.detachEvent("onmousemove",_t);return}try{var n=e.x+e.y;_e[Be++]=n&255,Ht+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",_t,!1):window.attachEvent&&window.attachEvent("onmousemove",_t))}function el(){if(Lt==null){for(Lt=Qs();Be<Xo;){var e=Math.floor(65536*Math.random());_e[Be++]=e&255}for(Lt.init(_e),Be=0;Be<_e.length;++Be)_e[Be]=0;Be=0}return Lt.next()}var Bn=function(){function e(){}return e.prototype.nextBytes=function(n){for(var t=0;t<n.length;++t)n[t]=el()},e}();function tl(e,n){if(n<e.length+22)return console.error("Message too long for RSA"),null;for(var t=n-e.length-6,r="",o=0;o<t;o+=2)r+="ff";var i="0001"+r+"00"+e;return ue(i,16)}function nl(e,n){if(n<e.length+11)return console.error("Message too long for RSA"),null;for(var t=[],r=e.length-1;r>=0&&n>0;){var o=e.charCodeAt(r--);o<128?t[--n]=o:o>127&&o<2048?(t[--n]=o&63|128,t[--n]=o>>6|192):(t[--n]=o&63|128,t[--n]=o>>6&63|128,t[--n]=o>>12|224)}t[--n]=0;for(var i=new Bn,a=[];n>2;){for(a[0]=0;a[0]==0;)i.nextBytes(a);t[--n]=a[0]}return t[--n]=2,t[--n]=0,new Y(t)}var rl=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(n){return n.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(n){if(this.p==null||this.q==null)return n.modPow(this.d,this.n);for(var t=n.mod(this.p).modPow(this.dmp1,this.p),r=n.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(r)<0;)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},e.prototype.setPublic=function(n,t){n!=null&&t!=null&&n.length>0&&t.length>0?(this.n=ue(n,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(n){var t=this.n.bitLength()+7>>3,r=nl(n,t);if(r==null)return null;var o=this.doPublic(r);if(o==null)return null;for(var i=o.toString(16),a=i.length,s=0;s<t*2-a;s++)i="0"+i;return i},e.prototype.setPrivate=function(n,t,r){n!=null&&t!=null&&n.length>0&&t.length>0?(this.n=ue(n,16),this.e=parseInt(t,16),this.d=ue(r,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(n,t,r,o,i,a,s,c){n!=null&&t!=null&&n.length>0&&t.length>0?(this.n=ue(n,16),this.e=parseInt(t,16),this.d=ue(r,16),this.p=ue(o,16),this.q=ue(i,16),this.dmp1=ue(a,16),this.dmq1=ue(s,16),this.coeff=ue(c,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(n,t){var r=new Bn,o=n>>1;this.e=parseInt(t,16);for(var i=new Y(t,16);;){for(;this.p=new Y(n-o,1,r),!(this.p.subtract(Y.ONE).gcd(i).compareTo(Y.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new Y(o,1,r),!(this.q.subtract(Y.ONE).gcd(i).compareTo(Y.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var a=this.p;this.p=this.q,this.q=a}var s=this.p.subtract(Y.ONE),c=this.q.subtract(Y.ONE),u=s.multiply(c);if(u.gcd(i).compareTo(Y.ONE)==0){this.n=this.p.multiply(this.q),this.d=i.modInverse(u),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(c),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(n){var t=ue(n,16),r=this.doPrivate(t);return r==null?null:ol(r,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(n,t,r){var o=new Bn,i=n>>1;this.e=parseInt(t,16);var a=new Y(t,16),s=this,c=function(){var u=function(){if(s.p.compareTo(s.q)<=0){var d=s.p;s.p=s.q,s.q=d}var y=s.p.subtract(Y.ONE),g=s.q.subtract(Y.ONE),b=y.multiply(g);b.gcd(a).compareTo(Y.ONE)==0?(s.n=s.p.multiply(s.q),s.d=a.modInverse(b),s.dmp1=s.d.mod(y),s.dmq1=s.d.mod(g),s.coeff=s.q.modInverse(s.p),setTimeout(function(){r()},0)):setTimeout(c,0)},f=function(){s.q=ee(),s.q.fromNumberAsync(i,1,o,function(){s.q.subtract(Y.ONE).gcda(a,function(d){d.compareTo(Y.ONE)==0&&s.q.isProbablePrime(10)?setTimeout(u,0):setTimeout(f,0)})})},p=function(){s.p=ee(),s.p.fromNumberAsync(n-i,1,o,function(){s.p.subtract(Y.ONE).gcda(a,function(d){d.compareTo(Y.ONE)==0&&s.p.isProbablePrime(10)?setTimeout(f,0):setTimeout(p,0)})})};setTimeout(p,0)};setTimeout(c,0)},e.prototype.sign=function(n,t,r){var o=il(r),i=o+t(n).toString(),a=tl(i,this.n.bitLength()/4);if(a==null)return null;var s=this.doPrivate(a);if(s==null)return null;var c=s.toString(16);return(c.length&1)==0?c:"0"+c},e.prototype.verify=function(n,t,r){var o=ue(t,16),i=this.doPublic(o);if(i==null)return null;var a=i.toString(16).replace(/^1f+00/,""),s=al(a);return s==r(n).toString()},e}();function ol(e,n){for(var t=e.toByteArray(),r=0;r<t.length&&t[r]==0;)++r;if(t.length-r!=n-1||t[r]!=2)return null;for(++r;t[r]!=0;)if(++r>=t.length)return null;for(var o="";++r<t.length;){var i=t[r]&255;i<128?o+=String.fromCharCode(i):i>191&&i<224?(o+=String.fromCharCode((i&31)<<6|t[r+1]&63),++r):(o+=String.fromCharCode((i&15)<<12|(t[r+1]&63)<<6|t[r+2]&63),r+=2)}return o}var Ut={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function il(e){return Ut[e]||""}function al(e){for(var n in Ut)if(Ut.hasOwnProperty(n)){var t=Ut[n],r=t.length;if(e.substr(0,r)==t)return e.substr(r)}return e}/*!
|
|
5
|
+
})`);const t=h.useGetDerivedNamespace();return h.computedEager(()=>l.unref(e)||`${t.value}-id-${n.prefix}-${n.current++}`)},tn=Symbol("formContextKey"),Ln=Symbol("formItemContextKey"),Kn=()=>{const e=l.inject(tn,void 0),n=l.inject(Ln,void 0);return{form:e,formItem:n}},pi=(e,{formItemContext:n,disableIdGeneration:t,disableIdManagement:r})=>{t||(t=l.ref(!1)),r||(r=l.ref(!1));const i=l.getCurrentInstance(),o=()=>{let u=i==null?void 0:i.parent;for(;u;){if(u.type.name==="ElFormItem")return!1;if(u.type.name==="ElLabelWrap")return!0;u=u.parent}return!1},a=l.ref();let s;const c=l.computed(()=>{var u;return!!(!(e.label||e.ariaLabel)&&n&&n.inputIds&&((u=n.inputIds)==null?void 0:u.length)<=1)});return l.onMounted(()=>{s=l.watch([l.toRef(e,"id"),t],([u,f])=>{const p=u??(f?void 0:qt().value);p!==a.value&&(n!=null&&n.removeInputId&&!o()&&(a.value&&n.removeInputId(a.value),!(r!=null&&r.value)&&!f&&p&&n.addInputId(p)),a.value=p)},{immediate:!0})}),l.onUnmounted(()=>{s&&s(),n!=null&&n.removeInputId&&a.value&&n.removeInputId(a.value)}),{isLabeledByFormItem:c,inputId:a}},di=e=>{const n=l.getCurrentInstance();return l.computed(()=>{var t,r;return(r=(t=n==null?void 0:n.proxy)==null?void 0:t.$props)==null?void 0:r[e]})},Hn=(e,n={})=>{const t=l.ref(void 0),r=n.prop?t:di("size"),i=n.global?t:h.useGlobalSize(),o=n.form?{size:void 0}:l.inject(tn,void 0),a=n.formItem?{size:void 0}:l.inject(Ln,void 0);return l.computed(()=>r.value||l.unref(e)||(a==null?void 0:a.size)||(o==null?void 0:o.size)||i.value||"")},nn=e=>{const n=di("disabled"),t=l.inject(tn,void 0);return l.computed(()=>n.value||l.unref(e)||(t==null?void 0:t.disabled)||!1)},Fo='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',br=e=>typeof Element>"u"?!1:e instanceof Element,Lo=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,Sr=e=>Array.from(e.querySelectorAll(Fo)).filter(n=>rn(n)&&Lo(n)),rn=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},Ko=function(e,n,...t){let r;n.includes("mouse")||n.includes("click")?r="MouseEvents":n.includes("key")?r="KeyboardEvent":r="HTMLEvents";const i=document.createEvent(r);return i.initEvent(n,...t),e.dispatchEvent(i),e},yi=e=>!e.getAttribute("aria-owns"),Ho=(e,n,t)=>{const{parentNode:r}=e;if(!r)return null;const i=r.querySelectorAll(t),o=Array.prototype.indexOf.call(i,e);return i[o+n]||null},_n=(e,n)=>{if(!e||!e.focus)return;let t=!1;br(e)&&!rn(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),t=!0),e.focus(n),br(e)&&t&&e.removeAttribute("tabindex")},_o=e=>{e&&(_n(e),!yi(e)&&e.click())};function gi(e,{disabled:n,beforeFocus:t,afterFocus:r,beforeBlur:i,afterBlur:o}={}){const a=l.getCurrentInstance(),{emit:s}=a,c=l.shallowRef(),u=l.ref(!1),f=g=>{const y=h.isFunction(t)?t(g):!1;l.unref(n)||u.value||y||(u.value=!0,s("focus",g),r==null||r())},p=g=>{var y;const b=h.isFunction(i)?i(g):!1;l.unref(n)||g.relatedTarget&&((y=c.value)!=null&&y.contains(g.relatedTarget))||b||(u.value=!1,s("blur",g),o==null||o())},d=g=>{var y,b;l.unref(n)||rn(g.target)||(y=c.value)!=null&&y.contains(document.activeElement)&&c.value!==document.activeElement||(b=e.value)==null||b.focus()};return l.watch([c,()=>l.unref(n)],([g,y])=>{g&&(y?g.removeAttribute("tabindex"):g.setAttribute("tabindex","-1"))}),h.useEventListener(c,"focus",f,!0),h.useEventListener(c,"blur",p,!0),h.useEventListener(c,"click",d,!0),{isFocused:u,wrapperRef:c,handleFocus:f,handleBlur:p}}const zo=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function vi({afterComposition:e,emit:n}){const t=l.ref(!1),r=s=>{n==null||n("compositionstart",s),t.value=!0},i=s=>{var c;n==null||n("compositionupdate",s);const u=(c=s.target)==null?void 0:c.value,f=u[u.length-1]||"";t.value=!zo(f)},o=s=>{n==null||n("compositionend",s),t.value&&(t.value=!1,l.nextTick(()=>e(s)))};return{isComposing:t,handleComposition:s=>{s.type==="compositionend"?o(s):i(s)},handleCompositionStart:r,handleCompositionUpdate:i,handleCompositionEnd:o}}function $o(e){let n;function t(){if(e.value==null)return;const{selectionStart:i,selectionEnd:o,value:a}=e.value;if(i==null||o==null)return;const s=a.slice(0,Math.max(0,i)),c=a.slice(Math.max(0,o));n={selectionStart:i,selectionEnd:o,value:a,beforeTxt:s,afterTxt:c}}function r(){if(e.value==null||n==null)return;const{value:i}=e.value,{beforeTxt:o,afterTxt:a,selectionStart:s}=n;if(o==null||a==null||s==null)return;let c=i.length;if(i.endsWith(a))c=i.length-a.length;else if(i.startsWith(o))c=o.length;else{const u=o[s-1],f=i.indexOf(u,s-1);f!==-1&&(c=f+1)}e.value.setSelectionRange(c,c)}return[t,r]}const mi="ElInput",Uo=l.defineComponent({name:mi,inheritAttrs:!1}),jo=l.defineComponent({...Uo,props:ci,emits:No,setup(e,{expose:n,emit:t}){const r=e,i=l.useAttrs(),o=fi(),a=l.useSlots(),s=l.computed(()=>[r.type==="textarea"?b.b():y.b(),y.m(d.value),y.is("disabled",g.value),y.is("exceed",M.value),{[y.b("group")]:a.prepend||a.append,[y.m("prefix")]:a.prefix||r.prefixIcon,[y.m("suffix")]:a.suffix||r.suffixIcon||r.clearable||r.showPassword,[y.bm("suffix","password-clear")]:$.value&&z.value,[y.b("hidden")]:r.type==="hidden"},i.class]),c=l.computed(()=>[y.e("wrapper"),y.is("focus",T.value)]),{form:u,formItem:f}=Kn(),{inputId:p}=pi(r,{formItemContext:f}),d=Hn(),g=nn(),y=h.useNamespace("input"),b=h.useNamespace("textarea"),v=l.shallowRef(),m=l.shallowRef(),S=l.ref(!1),A=l.ref(!1),E=l.ref(),C=l.shallowRef(r.inputStyle),w=l.computed(()=>v.value||m.value),{wrapperRef:k,isFocused:T,handleFocus:P,handleBlur:D}=gi(w,{disabled:g,afterBlur(){var B;r.validateEvent&&((B=f==null?void 0:f.validate)==null||B.call(f,"blur").catch(Q=>h.debugWarn(Q)))}}),x=l.computed(()=>{var B;return(B=u==null?void 0:u.statusIcon)!=null?B:!1}),R=l.computed(()=>(f==null?void 0:f.validateState)||""),O=l.computed(()=>R.value&&h.ValidateComponentsMap[R.value]),G=l.computed(()=>A.value?h.view_default:h.hide_default),Z=l.computed(()=>[i.style]),J=l.computed(()=>[r.inputStyle,C.value,{resize:r.resize}]),N=l.computed(()=>h.isNil(r.modelValue)?"":String(r.modelValue)),$=l.computed(()=>r.clearable&&!g.value&&!r.readonly&&!!N.value&&(T.value||S.value)),z=l.computed(()=>r.showPassword&&!g.value&&!!N.value),X=l.computed(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!g.value&&!r.readonly&&!r.showPassword),K=l.computed(()=>N.value.length),M=l.computed(()=>!!X.value&&K.value>Number(r.maxlength)),V=l.computed(()=>!!a.suffix||!!r.suffixIcon||$.value||r.showPassword||X.value||!!R.value&&x.value),L=l.computed(()=>!!Object.keys(r.modelModifiers).length),[q,te]=$o(v);h.useResizeObserver(m,B=>{if(se(),!X.value||r.resize!=="both")return;const Q=B[0],{width:ie}=Q.contentRect;E.value={right:`calc(100% - ${ie+15+6}px)`}});const F=()=>{const{type:B,autosize:Q}=r;if(!(!h.isClient||B!=="textarea"||!m.value))if(Q){const ie=h.isObject$1(Q)?Q.minRows:void 0,Re=h.isObject$1(Q)?Q.maxRows:void 0,Oe=mr(m.value,ie,Re);C.value={overflowY:"hidden",...Oe},l.nextTick(()=>{m.value.offsetHeight,C.value=Oe})}else C.value={minHeight:mr(m.value).minHeight}},se=(B=>{let Q=!1;return()=>{var ie;if(Q||!r.autosize)return;((ie=m.value)==null?void 0:ie.offsetParent)===null||(setTimeout(B),Q=!0)}})(F),_=()=>{const B=w.value,Q=r.formatter?r.formatter(N.value):N.value;!B||B.value===Q||(B.value=Q)},fe=B=>{const{trim:Q,number:ie}=r.modelModifiers;return Q&&(B=B.trim()),ie&&(B=`${vr(B)}`),r.formatter&&r.parser&&(B=r.parser(B)),B},U=async B=>{if(he.value)return;const{lazy:Q}=r.modelModifiers;let{value:ie}=B.target;if(Q){t(zt,ie);return}if(ie=fe(ie),String(ie)===N.value){r.formatter&&_();return}q(),t(St,ie),t(zt,ie),await l.nextTick(),(r.formatter&&r.parser||!L.value)&&_(),te()},Te=async B=>{let{value:Q}=B.target;Q=fe(Q),r.modelModifiers.lazy&&t(St,Q),t(Tn,Q),await l.nextTick(),_()},{isComposing:he,handleCompositionStart:ne,handleCompositionUpdate:re,handleCompositionEnd:le}=vi({emit:t,afterComposition:U}),ve=()=>{A.value=!A.value},Ae=()=>{var B;return(B=w.value)==null?void 0:B.focus()},Ce=()=>{var B;return(B=w.value)==null?void 0:B.blur()},Me=B=>{S.value=!1,t("mouseleave",B)},W=B=>{S.value=!0,t("mouseenter",B)},oe=B=>{t("keydown",B)},me=()=>{var B;(B=w.value)==null||B.select()},pe=()=>{t(St,""),t(Tn,""),t("clear"),t(zt,"")};return l.watch(()=>r.modelValue,()=>{var B;l.nextTick(()=>F()),r.validateEvent&&((B=f==null?void 0:f.validate)==null||B.call(f,"change").catch(Q=>h.debugWarn(Q)))}),l.watch(N,B=>{if(!w.value)return;const{trim:Q,number:ie}=r.modelModifiers,Re=w.value.value,Oe=(ie||r.type==="number")&&!/^0\d/.test(Re)?`${vr(Re)}`:Re;Oe!==B&&(document.activeElement===w.value&&w.value.type!=="range"&&Q&&Oe.trim()===B||_())}),l.watch(()=>r.type,async()=>{await l.nextTick(),_(),F()}),l.onMounted(()=>{!r.formatter&&r.parser&&h.debugWarn(mi,"If you set the parser, you also need to set the formatter."),_(),l.nextTick(F)}),n({input:v,textarea:m,ref:w,textareaStyle:J,autosize:l.toRef(r,"autosize"),isComposing:he,focus:Ae,blur:Ce,select:me,clear:pe,resizeTextarea:F}),(B,Q)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass([l.unref(s),{[l.unref(y).bm("group","append")]:B.$slots.append,[l.unref(y).bm("group","prepend")]:B.$slots.prepend}]),style:l.normalizeStyle(l.unref(Z)),onMouseenter:W,onMouseleave:Me},[l.createCommentVNode(" input "),B.type!=="textarea"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createCommentVNode(" prepend slot "),B.$slots.prepend?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(l.unref(y).be("group","prepend"))},[l.renderSlot(B.$slots,"prepend")],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("div",{ref_key:"wrapperRef",ref:k,class:l.normalizeClass(l.unref(c))},[l.createCommentVNode(" prefix slot "),B.$slots.prefix||B.prefixIcon?(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(l.unref(y).e("prefix"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(y).e("prefix-inner"))},[l.renderSlot(B.$slots,"prefix"),B.prefixIcon?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:0,class:l.normalizeClass(l.unref(y).e("icon"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(B.prefixIcon)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],2)],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("input",l.mergeProps({id:l.unref(p),ref_key:"input",ref:v,class:l.unref(y).e("inner")},l.unref(o),{name:B.name,minlength:B.minlength,maxlength:B.maxlength,type:B.showPassword?A.value?"text":"password":B.type,disabled:l.unref(g),readonly:B.readonly,autocomplete:B.autocomplete,tabindex:B.tabindex,"aria-label":B.ariaLabel,placeholder:B.placeholder,style:B.inputStyle,form:B.form,autofocus:B.autofocus,role:B.containerRole,inputmode:B.inputmode,onCompositionstart:l.unref(ne),onCompositionupdate:l.unref(re),onCompositionend:l.unref(le),onInput:U,onChange:Te,onKeydown:oe}),null,16,["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode","onCompositionstart","onCompositionupdate","onCompositionend"]),l.createCommentVNode(" suffix slot "),l.unref(V)?(l.openBlock(),l.createElementBlock("span",{key:1,class:l.normalizeClass(l.unref(y).e("suffix"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(y).e("suffix-inner"))},[!l.unref($)||!l.unref(z)||!l.unref(X)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.renderSlot(B.$slots,"suffix"),B.suffixIcon?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:0,class:l.normalizeClass(l.unref(y).e("icon"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(B.suffixIcon)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],64)):l.createCommentVNode("v-if",!0),l.unref($)?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:1,class:l.normalizeClass([l.unref(y).e("icon"),l.unref(y).e("clear")]),onMousedown:l.withModifiers(l.unref(h.NOOP),["prevent"]),onClick:pe},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(B.clearIcon)))]),_:1},8,["class","onMousedown"])):l.createCommentVNode("v-if",!0),l.unref(z)?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:2,class:l.normalizeClass([l.unref(y).e("icon"),l.unref(y).e("password")]),onClick:ve,onMousedown:l.withModifiers(l.unref(h.NOOP),["prevent"]),onMouseup:l.withModifiers(l.unref(h.NOOP),["prevent"])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(G))))]),_:1},8,["class","onMousedown","onMouseup"])):l.createCommentVNode("v-if",!0),l.unref(X)?(l.openBlock(),l.createElementBlock("span",{key:3,class:l.normalizeClass([l.unref(y).e("count"),l.unref(y).is("outside",B.wordLimitPosition==="outside")])},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(y).e("count-inner"))},l.toDisplayString(l.unref(K))+" / "+l.toDisplayString(B.maxlength),3)],2)):l.createCommentVNode("v-if",!0),l.unref(R)&&l.unref(O)&&l.unref(x)?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:4,class:l.normalizeClass([l.unref(y).e("icon"),l.unref(y).e("validateIcon"),l.unref(y).is("loading",l.unref(R)==="validating")])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(O))))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],2)],2)):l.createCommentVNode("v-if",!0)],2),l.createCommentVNode(" append slot "),B.$slots.append?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(l.unref(y).be("group","append"))},[l.renderSlot(B.$slots,"append")],2)):l.createCommentVNode("v-if",!0)],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createCommentVNode(" textarea "),l.createElementVNode("textarea",l.mergeProps({id:l.unref(p),ref_key:"textarea",ref:m,class:[l.unref(b).e("inner"),l.unref(y).is("focus",l.unref(T))]},l.unref(o),{minlength:B.minlength,maxlength:B.maxlength,tabindex:B.tabindex,disabled:l.unref(g),readonly:B.readonly,autocomplete:B.autocomplete,style:l.unref(J),"aria-label":B.ariaLabel,placeholder:B.placeholder,form:B.form,autofocus:B.autofocus,rows:B.rows,role:B.containerRole,onCompositionstart:l.unref(ne),onCompositionupdate:l.unref(re),onCompositionend:l.unref(le),onInput:U,onFocus:l.unref(P),onBlur:l.unref(D),onChange:Te,onKeydown:oe}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),l.unref(X)?(l.openBlock(),l.createElementBlock("span",{key:0,style:l.normalizeStyle(E.value),class:l.normalizeClass([l.unref(y).e("count"),l.unref(y).is("outside",B.wordLimitPosition==="outside")])},l.toDisplayString(l.unref(K))+" / "+l.toDisplayString(B.maxlength),7)):l.createCommentVNode("v-if",!0)],64))],38))}});var qo=h._export_sfc(jo,[["__file","input.vue"]]);const bi=h.withInstall(qo),fn="focus-trap.focus-after-trapped",hn="focus-trap.focus-after-released",Wo="focus-trap.focusout-prevented",Er={cancelable:!0,bubbles:!1},Go={cancelable:!0,bubbles:!1},Tr="focusAfterTrapped",wr="focusAfterReleased",Si=Symbol("elFocusTrap"),zn=l.ref(),on=l.ref(0),$n=l.ref(0);let Mt=0;const Ei=e=>{const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n},Dr=(e,n)=>{for(const t of e)if(!Yo(t,n))return t},Yo=(e,n)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Zo=e=>{const n=Ei(e),t=Dr(n,e),r=Dr(n.reverse(),e);return[t,r]},Jo=e=>e instanceof HTMLInputElement&&"select"in e,Fe=(e,n)=>{if(e){const t=document.activeElement;_n(e,{preventScroll:!0}),$n.value=window.performance.now(),e!==t&&Jo(e)&&n&&e.select()}};function kr(e,n){const t=[...e],r=e.indexOf(n);return r!==-1&&t.splice(r,1),t}const Xo=()=>{let e=[];return{push:r=>{const i=e[0];i&&r!==i&&i.pause(),e=kr(e,r),e.unshift(r)},remove:r=>{var i,o;e=kr(e,r),(o=(i=e[0])==null?void 0:i.resume)==null||o.call(i)}}},Qo=(e,n=!1)=>{const t=document.activeElement;for(const r of e)if(Fe(r,n),document.activeElement!==t)return},Ar=Xo(),ea=()=>on.value>$n.value,Rt=()=>{zn.value="pointer",on.value=window.performance.now()},Cr=()=>{zn.value="keyboard",on.value=window.performance.now()},ta=()=>(l.onMounted(()=>{Mt===0&&(document.addEventListener("mousedown",Rt),document.addEventListener("touchstart",Rt),document.addEventListener("keydown",Cr)),Mt++}),l.onBeforeUnmount(()=>{Mt--,Mt<=0&&(document.removeEventListener("mousedown",Rt),document.removeEventListener("touchstart",Rt),document.removeEventListener("keydown",Cr))}),{focusReason:zn,lastUserFocusTimestamp:on,lastAutomatedFocusTimestamp:$n}),Nt=e=>new CustomEvent(Wo,{...Go,detail:e});let et=[];const Ir=e=>{h.getEventCode(e)===h.EVENT_CODE.esc&&et.forEach(t=>t(e))},na=e=>{l.onMounted(()=>{et.length===0&&document.addEventListener("keydown",Ir),h.isClient&&et.push(e)}),l.onBeforeUnmount(()=>{et=et.filter(n=>n!==e),et.length===0&&h.isClient&&document.removeEventListener("keydown",Ir)})},ra=l.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Tr,wr,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:n}){const t=l.ref();let r,i;const{focusReason:o}=ta();na(y=>{e.trapped&&!a.paused&&n("release-requested",y)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=y=>{if(!e.loop&&!e.trapped||a.paused)return;const{altKey:b,ctrlKey:v,metaKey:m,currentTarget:S,shiftKey:A}=y,{loop:E}=e,w=h.getEventCode(y)===h.EVENT_CODE.tab&&!b&&!v&&!m,k=document.activeElement;if(w&&k){const T=S,[P,D]=Zo(T);if(P&&D){if(!A&&k===D){const R=Nt({focusReason:o.value});n("focusout-prevented",R),R.defaultPrevented||(y.preventDefault(),E&&Fe(P,!0))}else if(A&&[P,T].includes(k)){const R=Nt({focusReason:o.value});n("focusout-prevented",R),R.defaultPrevented||(y.preventDefault(),E&&Fe(D,!0))}}else if(k===T){const R=Nt({focusReason:o.value});n("focusout-prevented",R),R.defaultPrevented||y.preventDefault()}}};l.provide(Si,{focusTrapRef:t,onKeydown:s}),l.watch(()=>e.focusTrapEl,y=>{y&&(t.value=y)},{immediate:!0}),l.watch([t],([y],[b])=>{y&&(y.addEventListener("keydown",s),y.addEventListener("focusin",f),y.addEventListener("focusout",p)),b&&(b.removeEventListener("keydown",s),b.removeEventListener("focusin",f),b.removeEventListener("focusout",p))});const c=y=>{n(Tr,y)},u=y=>n(wr,y),f=y=>{const b=l.unref(t);if(!b)return;const v=y.target,m=y.relatedTarget,S=v&&b.contains(v);e.trapped||m&&b.contains(m)||(r=m),S&&n("focusin",y),!a.paused&&e.trapped&&(S?i=v:Fe(i,!0))},p=y=>{const b=l.unref(t);if(!(a.paused||!b))if(e.trapped){const v=y.relatedTarget;!h.isNil(v)&&!b.contains(v)&&setTimeout(()=>{if(!a.paused&&e.trapped){const m=Nt({focusReason:o.value});n("focusout-prevented",m),m.defaultPrevented||Fe(i,!0)}},0)}else{const v=y.target;v&&b.contains(v)||n("focusout",y)}};async function d(){await l.nextTick();const y=l.unref(t);if(y){Ar.push(a);const b=y.contains(document.activeElement)?r:document.activeElement;if(r=b,!y.contains(b)){const m=new Event(fn,Er);y.addEventListener(fn,c),y.dispatchEvent(m),m.defaultPrevented||l.nextTick(()=>{let S=e.focusStartEl;h.isString(S)||(Fe(S),document.activeElement!==S&&(S="first")),S==="first"&&Qo(Ei(y),!0),(document.activeElement===b||S==="container")&&Fe(y)})}}}function g(){const y=l.unref(t);if(y){y.removeEventListener(fn,c);const b=new CustomEvent(hn,{...Er,detail:{focusReason:o.value}});y.addEventListener(hn,u),y.dispatchEvent(b),!b.defaultPrevented&&(o.value=="keyboard"||!ea()||y.contains(document.activeElement))&&Fe(r??document.body),y.removeEventListener(hn,u),Ar.remove(a),r=null,i=null}}return l.onMounted(()=>{e.trapped&&d(),l.watch(()=>e.trapped,y=>{y?d():g()})}),l.onBeforeUnmount(()=>{e.trapped&&g(),t.value&&(t.value.removeEventListener("keydown",s),t.value.removeEventListener("focusin",f),t.value.removeEventListener("focusout",p),t.value=void 0)}),{onKeydown:s}}});function ia(e,n,t,r,i,o){return l.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var Ti=h._export_sfc(ra,[["render",ia],["__file","focus-trap.vue"]]);const wi=Symbol("buttonGroupContextKey"),Di=({from:e,replacement:n,scope:t,version:r,ref:i,type:o="API"},a)=>{l.watch(()=>l.unref(a),s=>{s&&h.debugWarn(t,`[${o}] ${e} is about to be deprecated in version ${r}, please use ${n} instead.
|
|
6
|
+
For more detail, please visit: ${i}
|
|
7
|
+
`)},{immediate:!0})},oa=(e,n)=>{Di({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},l.computed(()=>e.type==="text"));const t=l.inject(wi,void 0),r=h.useGlobalConfig("button"),{form:i}=Kn(),o=Hn(l.computed(()=>t==null?void 0:t.size)),a=nn(),s=l.ref(),c=l.useSlots(),u=l.computed(()=>{var m;return e.type||(t==null?void 0:t.type)||((m=r.value)==null?void 0:m.type)||""}),f=l.computed(()=>{var m,S,A;return(A=(S=e.autoInsertSpace)!=null?S:(m=r.value)==null?void 0:m.autoInsertSpace)!=null?A:!1}),p=l.computed(()=>{var m,S,A;return(A=(S=e.plain)!=null?S:(m=r.value)==null?void 0:m.plain)!=null?A:!1}),d=l.computed(()=>{var m,S,A;return(A=(S=e.round)!=null?S:(m=r.value)==null?void 0:m.round)!=null?A:!1}),g=l.computed(()=>{var m,S,A;return(A=(S=e.text)!=null?S:(m=r.value)==null?void 0:m.text)!=null?A:!1}),y=l.computed(()=>e.tag==="button"?{ariaDisabled:a.value||e.loading,disabled:a.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),b=l.computed(()=>{var m;const S=(m=c.default)==null?void 0:m.call(c);if(f.value&&(S==null?void 0:S.length)===1){const A=S[0];if((A==null?void 0:A.type)===l.Text){const E=A.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(E.trim())}}return!1});return{_disabled:a,_size:o,_type:u,_ref:s,_props:y,_plain:p,_round:d,_text:g,shouldAddSpace:b,handleClick:m=>{if(a.value||e.loading){m.stopPropagation();return}e.nativeType==="reset"&&(i==null||i.resetFields()),n("click",m)}}},ki=["default","primary","success","warning","info","danger","text",""],aa=["button","submit","reset"],Dn=h.buildProps({size:h.useSizeProp,disabled:Boolean,type:{type:String,values:ki,default:""},icon:{type:h.iconPropType},nativeType:{type:String,values:aa,default:"button"},loading:Boolean,loadingIcon:{type:h.iconPropType,default:()=>h.loading_default},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:h.definePropType([String,Object]),default:"button"}}),sa={click:e=>e instanceof MouseEvent};function de(e,n){la(e)&&(e="100%");var t=ua(e);return e=n===360?e:Math.min(n,Math.max(0,parseFloat(e))),t&&(e=parseInt(String(e*n),10)/100),Math.abs(e-n)<1e-6?1:(n===360?e=(e<0?e%n+n:e%n)/parseFloat(String(n)):e=e%n/parseFloat(String(n)),e)}function Pt(e){return Math.min(1,Math.max(0,e))}function la(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function ua(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Ai(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ot(e){return e<=1?"".concat(Number(e)*100,"%"):e}function je(e){return e.length===1?"0"+e:String(e)}function ca(e,n,t){return{r:de(e,255)*255,g:de(n,255)*255,b:de(t,255)*255}}function xr(e,n,t){e=de(e,255),n=de(n,255),t=de(t,255);var r=Math.max(e,n,t),i=Math.min(e,n,t),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var c=r-i;switch(a=s>.5?c/(2-r-i):c/(r+i),r){case e:o=(n-t)/c+(n<t?6:0);break;case n:o=(t-e)/c+2;break;case t:o=(e-n)/c+4;break}o/=6}return{h:o,s:a,l:s}}function pn(e,n,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(n-e)*(6*t):t<1/2?n:t<2/3?e+(n-e)*(2/3-t)*6:e}function fa(e,n,t){var r,i,o;if(e=de(e,360),n=de(n,100),t=de(t,100),n===0)i=t,o=t,r=t;else{var a=t<.5?t*(1+n):t+n-t*n,s=2*t-a;r=pn(s,a,e+1/3),i=pn(s,a,e),o=pn(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function Br(e,n,t){e=de(e,255),n=de(n,255),t=de(t,255);var r=Math.max(e,n,t),i=Math.min(e,n,t),o=0,a=r,s=r-i,c=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(n-t)/s+(n<t?6:0);break;case n:o=(t-e)/s+2;break;case t:o=(e-n)/s+4;break}o/=6}return{h:o,s:c,v:a}}function ha(e,n,t){e=de(e,360)*6,n=de(n,100),t=de(t,100);var r=Math.floor(e),i=e-r,o=t*(1-n),a=t*(1-i*n),s=t*(1-(1-i)*n),c=r%6,u=[t,a,o,o,s,t][c],f=[s,t,t,a,o,o][c],p=[o,o,s,t,t,a][c];return{r:u*255,g:f*255,b:p*255}}function Mr(e,n,t,r){var i=[je(Math.round(e).toString(16)),je(Math.round(n).toString(16)),je(Math.round(t).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function pa(e,n,t,r,i){var o=[je(Math.round(e).toString(16)),je(Math.round(n).toString(16)),je(Math.round(t).toString(16)),je(da(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function da(e){return Math.round(parseFloat(e)*255).toString(16)}function Rr(e){return De(e)/255}function De(e){return parseInt(e,16)}function ya(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var kn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ga(e){var n={r:0,g:0,b:0},t=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=ba(e)),typeof e=="object"&&(Ne(e.r)&&Ne(e.g)&&Ne(e.b)?(n=ca(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ne(e.h)&&Ne(e.s)&&Ne(e.v)?(r=Ot(e.s),i=Ot(e.v),n=ha(e.h,r,i),a=!0,s="hsv"):Ne(e.h)&&Ne(e.s)&&Ne(e.l)&&(r=Ot(e.s),o=Ot(e.l),n=fa(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=Ai(t),{ok:a,format:e.format||s,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:t}}var va="[-\\+]?\\d+%?",ma="[-\\+]?\\d*\\.\\d+%?",He="(?:".concat(ma,")|(?:").concat(va,")"),dn="[\\s|\\(]+(".concat(He,")[,|\\s]+(").concat(He,")[,|\\s]+(").concat(He,")\\s*\\)?"),yn="[\\s|\\(]+(".concat(He,")[,|\\s]+(").concat(He,")[,|\\s]+(").concat(He,")[,|\\s]+(").concat(He,")\\s*\\)?"),xe={CSS_UNIT:new RegExp(He),rgb:new RegExp("rgb"+dn),rgba:new RegExp("rgba"+yn),hsl:new RegExp("hsl"+dn),hsla:new RegExp("hsla"+yn),hsv:new RegExp("hsv"+dn),hsva:new RegExp("hsva"+yn),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ba(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(kn[e])e=kn[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=xe.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=xe.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=xe.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=xe.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=xe.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=xe.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=xe.hex8.exec(e),t?{r:De(t[1]),g:De(t[2]),b:De(t[3]),a:Rr(t[4]),format:n?"name":"hex8"}:(t=xe.hex6.exec(e),t?{r:De(t[1]),g:De(t[2]),b:De(t[3]),format:n?"name":"hex"}:(t=xe.hex4.exec(e),t?{r:De(t[1]+t[1]),g:De(t[2]+t[2]),b:De(t[3]+t[3]),a:Rr(t[4]+t[4]),format:n?"name":"hex8"}:(t=xe.hex3.exec(e),t?{r:De(t[1]+t[1]),g:De(t[2]+t[2]),b:De(t[3]+t[3]),format:n?"name":"hex"}:!1)))))))))}function Ne(e){return!!xe.CSS_UNIT.exec(String(e))}var Ci=function(){function e(n,t){n===void 0&&(n=""),t===void 0&&(t={});var r;if(n instanceof e)return n;typeof n=="number"&&(n=ya(n)),this.originalInput=n;var i=ga(n);this.originalInput=n,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=t.format)!==null&&r!==void 0?r:i.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},e.prototype.getLuminance=function(){var n=this.toRgb(),t,r,i,o=n.r/255,a=n.g/255,s=n.b/255;return o<=.03928?t=o/12.92:t=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*t+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(n){return this.a=Ai(n),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var n=this.toHsl().s;return n===0},e.prototype.toHsv=function(){var n=Br(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}},e.prototype.toHsvString=function(){var n=Br(this.r,this.g,this.b),t=Math.round(n.h*360),r=Math.round(n.s*100),i=Math.round(n.v*100);return this.a===1?"hsv(".concat(t,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(t,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var n=xr(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}},e.prototype.toHslString=function(){var n=xr(this.r,this.g,this.b),t=Math.round(n.h*360),r=Math.round(n.s*100),i=Math.round(n.l*100);return this.a===1?"hsl(".concat(t,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(t,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(n){return n===void 0&&(n=!1),Mr(this.r,this.g,this.b,n)},e.prototype.toHexString=function(n){return n===void 0&&(n=!1),"#"+this.toHex(n)},e.prototype.toHex8=function(n){return n===void 0&&(n=!1),pa(this.r,this.g,this.b,this.a,n)},e.prototype.toHex8String=function(n){return n===void 0&&(n=!1),"#"+this.toHex8(n)},e.prototype.toHexShortString=function(n){return n===void 0&&(n=!1),this.a===1?this.toHexString(n):this.toHex8String(n)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var n=Math.round(this.r),t=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(n,", ").concat(t,", ").concat(r,")"):"rgba(".concat(n,", ").concat(t,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var n=function(t){return"".concat(Math.round(de(t,255)*100),"%")};return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var n=function(t){return Math.round(de(t,255)*100)};return this.a===1?"rgb(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%)"):"rgba(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var n="#"+Mr(this.r,this.g,this.b,!1),t=0,r=Object.entries(kn);t<r.length;t++){var i=r[t],o=i[0],a=i[1];if(n===a)return o}return!1},e.prototype.toString=function(n){var t=!!n;n=n??this.format;var r=!1,i=this.a<1&&this.a>=0,o=!t&&i&&(n.startsWith("hex")||n==="name");return o?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.l+=n/100,t.l=Pt(t.l),new e(t)},e.prototype.brighten=function(n){n===void 0&&(n=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(n/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(n/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(n/100)))),new e(t)},e.prototype.darken=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.l-=n/100,t.l=Pt(t.l),new e(t)},e.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},e.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},e.prototype.desaturate=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.s-=n/100,t.s=Pt(t.s),new e(t)},e.prototype.saturate=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.s+=n/100,t.s=Pt(t.s),new e(t)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(n){var t=this.toHsl(),r=(t.h+n)%360;return t.h=r<0?360+r:r,new e(t)},e.prototype.mix=function(n,t){t===void 0&&(t=50);var r=this.toRgb(),i=new e(n).toRgb(),o=t/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(n,t){n===void 0&&(n=6),t===void 0&&(t=30);var r=this.toHsl(),i=360/t,o=[this];for(r.h=(r.h-(i*n>>1)+720)%360;--n;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new e(n)},e.prototype.monochromatic=function(n){n===void 0&&(n=6);for(var t=this.toHsv(),r=t.h,i=t.s,o=t.v,a=[],s=1/n;n--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var n=this.toHsl(),t=n.h;return[this,new e({h:(t+72)%360,s:n.s,l:n.l}),new e({h:(t+216)%360,s:n.s,l:n.l})]},e.prototype.onBackground=function(n){var t=this.toRgb(),r=new e(n).toRgb(),i=t.a+r.a*(1-t.a);return new e({r:(t.r*t.a+r.r*r.a*(1-t.a))/i,g:(t.g*t.a+r.g*r.a*(1-t.a))/i,b:(t.b*t.a+r.b*r.a*(1-t.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(n){for(var t=this.toHsl(),r=t.h,i=[this],o=360/n,a=1;a<n;a++)i.push(new e({h:(r+a*o)%360,s:t.s,l:t.l}));return i},e.prototype.equals=function(n){return this.toRgbString()===new e(n).toRgbString()},e}();function Ve(e,n=20){return e.mix("#141414",n).toString()}function Sa(e){const n=nn(),t=h.useNamespace("button");return l.computed(()=>{let r={},i=e.color;if(i){const o=i.match(/var\((.*?)\)/);o&&(i=window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));const a=new Ci(i),s=e.dark?a.tint(20).toString():Ve(a,20);if(e.plain)r=t.cssVarBlock({"bg-color":e.dark?Ve(a,90):a.tint(90).toString(),"text-color":i,"border-color":e.dark?Ve(a,50):a.tint(50).toString(),"hover-text-color":`var(${t.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":s,"active-text-color":`var(${t.cssVarName("color-white")})`,"active-border-color":s}),n.value&&(r[t.cssVarBlockName("disabled-bg-color")]=e.dark?Ve(a,90):a.tint(90).toString(),r[t.cssVarBlockName("disabled-text-color")]=e.dark?Ve(a,50):a.tint(50).toString(),r[t.cssVarBlockName("disabled-border-color")]=e.dark?Ve(a,80):a.tint(80).toString());else{const c=e.dark?Ve(a,30):a.tint(30).toString(),u=a.isDark()?`var(${t.cssVarName("color-white")})`:`var(${t.cssVarName("color-black")})`;if(r=t.cssVarBlock({"bg-color":i,"text-color":u,"border-color":i,"hover-bg-color":c,"hover-text-color":u,"hover-border-color":c,"active-bg-color":s,"active-border-color":s}),n.value){const f=e.dark?Ve(a,50):a.tint(50).toString();r[t.cssVarBlockName("disabled-bg-color")]=f,r[t.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${t.cssVarName("color-white")})`,r[t.cssVarBlockName("disabled-border-color")]=f}}}return r})}const Ea=l.defineComponent({name:"ElButton"}),Ta=l.defineComponent({...Ea,props:Dn,emits:sa,setup(e,{expose:n,emit:t}){const r=e,i=Sa(r),o=h.useNamespace("button"),{_ref:a,_size:s,_type:c,_disabled:u,_props:f,_plain:p,_round:d,_text:g,shouldAddSpace:y,handleClick:b}=oa(r,t),v=l.computed(()=>[o.b(),o.m(c.value),o.m(s.value),o.is("disabled",u.value),o.is("loading",r.loading),o.is("plain",p.value),o.is("round",d.value),o.is("circle",r.circle),o.is("text",g.value),o.is("link",r.link),o.is("has-bg",r.bg)]);return n({ref:a,size:s,type:c,disabled:u,shouldAddSpace:y}),(m,S)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(m.tag),l.mergeProps({ref_key:"_ref",ref:a},l.unref(f),{class:l.unref(v),style:l.unref(i),onClick:l.unref(b)}),{default:l.withCtx(()=>[m.loading?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[m.$slots.loading?l.renderSlot(m.$slots,"loading",{key:0}):(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:1,class:l.normalizeClass(l.unref(o).is("loading"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(m.loadingIcon)))]),_:1},8,["class"]))],64)):m.icon||m.$slots.icon?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:1},{default:l.withCtx(()=>[m.icon?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(m.icon),{key:0})):l.renderSlot(m.$slots,"icon",{key:1})]),_:3})):l.createCommentVNode("v-if",!0),m.$slots.default?(l.openBlock(),l.createElementBlock("span",{key:2,class:l.normalizeClass({[l.unref(o).em("text","expand")]:l.unref(y)})},[l.renderSlot(m.$slots,"default")],2)):l.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var wa=h._export_sfc(Ta,[["__file","button.vue"]]);const Da={size:Dn.size,type:Dn.type},ka=l.defineComponent({name:"ElButtonGroup"}),Aa=l.defineComponent({...ka,props:Da,setup(e){const n=e;l.provide(wi,l.reactive({size:l.toRef(n,"size"),type:l.toRef(n,"type")}));const t=h.useNamespace("button");return(r,i)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(l.unref(t).b("group"))},[l.renderSlot(r.$slots,"default")],2))}});var Ii=h._export_sfc(Aa,[["__file","button-group.vue"]]);const xi=h.withInstall(wa,{ButtonGroup:Ii}),Ca=h.withNoopInstall(Ii),Ia="utils/vue/vnode";var Et=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(Et||{});function Bi(e){return l.isVNode(e)&&e.type===l.Fragment}function xa(e){return l.isVNode(e)&&e.type===l.Comment}function Ba(e){return l.isVNode(e)&&!Bi(e)&&!xa(e)}const Ma=e=>{if(!l.isVNode(e))return h.debugWarn(Ia,"[getNormalizedProps] must be a VNode"),{};const n=e.props||{},t=(l.isVNode(e.type)?e.type.props:void 0)||{},r={};return Object.keys(t).forEach(i=>{h.hasOwn(t[i],"default")&&(r[i]=t[i].default)}),Object.keys(n).forEach(i=>{r[h.camelize(i)]=n[i]}),r},vt=e=>{const n=h.isArray$1(e)?e:[e],t=[];return n.forEach(r=>{var i;h.isArray$1(r)?t.push(...vt(r)):l.isVNode(r)&&((i=r.component)!=null&&i.subTree)?t.push(r,...vt(r.component.subTree)):l.isVNode(r)&&h.isArray$1(r.children)?t.push(...vt(r.children)):l.isVNode(r)&&r.shapeFlag===2?t.push(...vt(r.type())):t.push(r)}),t},Un=e=>{if(!e)return{onClick:h.NOOP,onMousedown:h.NOOP,onMouseup:h.NOOP};let n=!1,t=!1;return{onClick:a=>{n&&t&&e(a),n=t=!1},onMousedown:a=>{n=a.target===a.currentTarget},onMouseup:a=>{t=a.target===a.currentTarget}}},Ra=h.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:h.definePropType([String,Array,Object])},zIndex:{type:h.definePropType([String,Number])}}),Na={click:e=>e instanceof MouseEvent},Pa="overlay";var Oa=l.defineComponent({name:"ElOverlay",props:Ra,emits:Na,setup(e,{slots:n,emit:t}){const r=h.useNamespace(Pa),i=c=>{t("click",c)},{onClick:o,onMousedown:a,onMouseup:s}=Un(e.customMaskEvent?void 0:i);return()=>e.mask?l.createVNode("div",{class:[r.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:o,onMousedown:a,onMouseup:s},[l.renderSlot(n,"default")],Et.STYLE|Et.CLASS|Et.PROPS,["onClick","onMouseup","onMousedown"]):l.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[l.renderSlot(n,"default")])}});const Mi=Oa,Ri=(e,n,t,r)=>{const i={offsetX:0,offsetY:0},o=l.ref(!1),a=(d,g)=>{if(e.value){const{offsetX:y,offsetY:b}=i,v=e.value.getBoundingClientRect(),m=v.left,S=v.top,A=v.width,E=v.height,C=document.documentElement.clientWidth,w=document.documentElement.clientHeight,k=-m+y,T=-S+b,P=C-m-A+y,D=w-S-(E<w?E:0)+b;r!=null&&r.value||(d=Math.min(Math.max(d,k),P),g=Math.min(Math.max(g,T),D)),i.offsetX=d,i.offsetY=g,e.value.style.transform=`translate(${h.addUnit(d)}, ${h.addUnit(g)})`}},s=d=>{const g=d.clientX,y=d.clientY,{offsetX:b,offsetY:v}=i,m=A=>{o.value||(o.value=!0);const E=b+A.clientX-g,C=v+A.clientY-y;a(E,C)},S=()=>{o.value=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",S)};document.addEventListener("mousemove",m),document.addEventListener("mouseup",S)},c=()=>{n.value&&e.value&&(n.value.addEventListener("mousedown",s),window.addEventListener("resize",p))},u=()=>{n.value&&e.value&&(n.value.removeEventListener("mousedown",s),window.removeEventListener("resize",p))},f=()=>{i.offsetX=0,i.offsetY=0,e.value&&(e.value.style.transform="")},p=()=>{const{offsetX:d,offsetY:g}=i;a(d,g)};return l.onMounted(()=>{l.watchEffect(()=>{t.value?c():u()})}),l.onBeforeUnmount(()=>{u()}),{isDragging:o,resetPosition:f,updatePosition:p}},Ni=(e,n={})=>{l.isRef(e)||h.throwError("[useLockscreen]","You need to pass a ref param to this function");const t=n.ns||h.useNamespace("popup"),r=l.computed(()=>t.bm("parent","hidden"));let i=0,o=!1,a="0";const s=()=>{setTimeout(()=>{typeof document>"u"||o&&document&&(document.body.style.width=a,h.removeClass(document.body,r.value))},200)};l.watch(e,c=>{if(!c){s();return}o=!h.hasClass(document.body,r.value),o&&(a=document.body.style.width,h.addClass(document.body,r.value)),i=li(t.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,f=h.getStyle(document.body,"overflowY");i>0&&(u||f==="scroll")&&o&&(document.body.style.width=`calc(100% - ${i}px)`)}),l.onScopeDispose(()=>s())},Pi=e=>["",...h.componentSizes].includes(e),An="_trap-focus-children",qe=[],Nr=e=>{if(qe.length===0)return;const n=h.getEventCode(e),t=qe[qe.length-1][An];if(t.length>0&&n===h.EVENT_CODE.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const r=e.shiftKey,i=e.target===t[0],o=e.target===t[t.length-1];i&&r&&(e.preventDefault(),t[t.length-1].focus()),o&&!r&&(e.preventDefault(),t[0].focus())}},Va={beforeMount(e){e[An]=Sr(e),qe.push(e),qe.length<=1&&document.addEventListener("keydown",Nr)},updated(e){l.nextTick(()=>{e[An]=Sr(e)})},unmounted(){qe.shift(),qe.length===0&&document.removeEventListener("keydown",Nr)}},Fa=l.defineComponent({name:"ElMessageBox",directives:{TrapFocus:Va},components:{ElButton:xi,ElFocusTrap:Ti,ElInput:bi,ElOverlay:Mi,ElIcon:h.ElIcon,...h.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:Pi},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:n}){const{locale:t,zIndex:r,ns:i,size:o}=h.useGlobalComponentSettings("message-box",l.computed(()=>e.buttonSize)),{t:a}=t,{nextZIndex:s}=r,c=l.ref(!1),u=l.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:l.markRaw(h.loading_default),cancelButtonLoadingIcon:l.markRaw(h.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:s()}),f=l.computed(()=>{const N=u.type;return{[i.bm("icon",N)]:N&&h.TypeComponentsMap[N]}}),p=qt(),d=qt(),g=l.computed(()=>{const N=u.type;return u.icon||N&&h.TypeComponentsMap[N]||""}),y=l.computed(()=>!!u.message),b=l.ref(),v=l.ref(),m=l.ref(),S=l.ref(),A=l.ref(),E=l.computed(()=>u.confirmButtonClass);l.watch(()=>u.inputValue,async N=>{await l.nextTick(),e.boxType==="prompt"&&N&&O()},{immediate:!0}),l.watch(()=>c.value,N=>{var $,z;N&&(e.boxType!=="prompt"&&(u.autofocus?m.value=(z=($=A.value)==null?void 0:$.$el)!=null?z:b.value:m.value=b.value),u.zIndex=s()),e.boxType==="prompt"&&(N?l.nextTick().then(()=>{var X;S.value&&S.value.$el&&(u.autofocus?m.value=(X=G())!=null?X:b.value:m.value=b.value)}):(u.editorErrorMessage="",u.validateError=!1))});const C=l.computed(()=>e.draggable),w=l.computed(()=>e.overflow),{isDragging:k}=Ri(b,v,C,w);l.onMounted(async()=>{await l.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",T)}),l.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",T)});function T(){c.value&&(c.value=!1,l.nextTick(()=>{u.action&&n("action",u.action)}))}const P=()=>{e.closeOnClickModal&&R(u.distinguishCancelAndClose?"close":"cancel")},D=Un(P),x=N=>{if(u.inputType!=="textarea")return N.preventDefault(),R("confirm")},R=N=>{var $;e.boxType==="prompt"&&N==="confirm"&&!O()||(u.action=N,u.beforeClose?($=u.beforeClose)==null||$.call(u,N,u,T):T())},O=()=>{if(e.boxType==="prompt"){const N=u.inputPattern;if(N&&!N.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;const $=u.inputValidator;if(h.isFunction($)){const z=$(u.inputValue);if(z===!1)return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;if(h.isString(z))return u.editorErrorMessage=z,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},G=()=>{var N,$;const z=(N=S.value)==null?void 0:N.$refs;return($=z==null?void 0:z.input)!=null?$:z==null?void 0:z.textarea},Z=()=>{R("close")},J=()=>{e.closeOnPressEscape&&Z()};return e.lockScroll&&Ni(c,{ns:i}),{...l.toRefs(u),ns:i,overlayEvent:D,visible:c,hasMessage:y,typeClass:f,contentId:p,inputId:d,btnSize:o,iconComponent:g,confirmButtonClasses:E,rootRef:b,focusStartRef:m,headerRef:v,inputRef:S,isDragging:k,confirmRef:A,doClose:T,handleClose:Z,onCloseRequested:J,handleWrapperClick:P,handleInputEnter:x,handleAction:R,t:a}}});function La(e,n,t,r,i,o){const a=l.resolveComponent("el-icon"),s=l.resolveComponent("el-input"),c=l.resolveComponent("el-button"),u=l.resolveComponent("el-focus-trap"),f=l.resolveComponent("el-overlay");return l.openBlock(),l.createBlock(l.Transition,{name:"fade-in-linear",onAfterLeave:p=>e.$emit("vanish"),persisted:""},{default:l.withCtx(()=>[l.withDirectives(l.createVNode(f,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:l.withCtx(()=>[l.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:l.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[l.createVNode(u,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:l.withCtx(()=>[l.createElementVNode("div",{ref:"rootRef",class:l.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:l.normalizeStyle(e.customStyle),tabindex:"-1",onClick:l.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(l.openBlock(),l.createElementBlock("div",{key:0,ref:"headerRef",class:l.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(l.openBlock(),l.createBlock(a,{key:0,class:l.normalizeClass([e.ns.e("status"),e.typeClass])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0),l.createElementVNode("span",null,l.toDisplayString(e.title),1)],2),e.showClose?(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:l.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:p=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:l.withKeys(l.withModifiers(p=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[l.createVNode(a,{class:l.normalizeClass(e.ns.e("close"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):l.createCommentVNode("v-if",!0)],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("div",{id:e.contentId,class:l.normalizeClass(e.ns.e("content"))},[l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(l.openBlock(),l.createBlock(a,{key:0,class:l.normalizeClass([e.ns.e("status"),e.typeClass])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0),e.hasMessage?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(e.ns.e("message"))},[l.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:l.toDisplayString(e.message)},null,8,["for","textContent"]))])],2)):l.createCommentVNode("v-if",!0)],2),l.withDirectives(l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("input"))},[l.createVNode(s,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":p=>e.inputValue=p,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:l.normalizeClass({invalid:e.validateError}),onKeydown:l.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("errormsg")),style:l.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},l.toDisplayString(e.editorErrorMessage),7)],2),[[l.vShow,e.showInput]])],10,["id"]),l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(l.openBlock(),l.createBlock(c,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:l.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:p=>e.handleAction("cancel"),onKeydown:l.withKeys(l.withModifiers(p=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):l.createCommentVNode("v-if",!0),l.withDirectives(l.createVNode(c,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:l.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:p=>e.handleAction("confirm"),onKeydown:l.withKeys(l.withModifiers(p=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[l.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[l.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var Ka=h._export_sfc(Fa,[["render",La],["__file","index.vue"]]);const Dt=new Map,Ha=e=>{let n=document.body;return e.appendTo&&(h.isString(e.appendTo)&&(n=document.querySelector(e.appendTo)),h.isElement(e.appendTo)&&(n=e.appendTo),h.isElement(n)||(h.debugWarn("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),n=document.body)),n},_a=(e,n,t=null)=>{const r=l.createVNode(Ka,e,h.isFunction(e.message)||l.isVNode(e.message)?{default:h.isFunction(e.message)?e.message:()=>e.message}:null);return r.appContext=t,l.render(r,n),Ha(e).appendChild(n.firstElementChild),r.component},za=()=>document.createElement("div"),$a=(e,n)=>{const t=za();e.onVanish=()=>{l.render(null,t),Dt.delete(i)},e.onAction=o=>{const a=Dt.get(i);let s;e.showInput?s={value:i.inputValue,action:o}:s=o,e.callback?e.callback(s,r.proxy):o==="cancel"||o==="close"?e.distinguishCancelAndClose&&o!=="cancel"?a.reject("close"):a.reject("cancel"):a.resolve(s)};const r=_a(e,t,n),i=r.proxy;for(const o in e)h.hasOwn(e,o)&&!h.hasOwn(i.$props,o)&&(o==="closeIcon"&&h.isObject$1(e[o])?i[o]=l.markRaw(e[o]):i[o]=e[o]);return i.visible=!0,i};function dt(e,n=null){if(!h.isClient)return Promise.reject();let t;return h.isString(e)||l.isVNode(e)?e={message:e}:t=e.callback,new Promise((r,i)=>{const o=$a(e,n??dt._context);Dt.set(o,{options:e,callback:t,resolve:r,reject:i})})}const Ua=["alert","confirm","prompt"],ja={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};Ua.forEach(e=>{dt[e]=qa(e)});function qa(e){return(n,t,r,i)=>{let o="";return h.isObject$1(t)?(r=t,o=""):h.isUndefined(t)?o="":o=t,dt(Object.assign({title:o,message:n,type:"",...ja[e]},r,{boxType:e}),i)}}dt.close=()=>{Dt.forEach((e,n)=>{n.doClose()}),Dt.clear()};dt._context=null;const Le=dt;Le.install=e=>{Le._context=e._context,e.config.globalProperties.$msgbox=Le,e.config.globalProperties.$messageBox=Le,e.config.globalProperties.$alert=Le.alert,e.config.globalProperties.$confirm=Le.confirm,e.config.globalProperties.$prompt=Le.prompt};const Oi=Le,Wa=[],Ct=h.defineStore("menuState",{state:()=>({isRefreshMenus:!1,activeMenuStructureIds:[],cacheInputMenu:{},configMenu:{form:{},options:[],structure:[]},cacheStructures:[],rawMenus:[],menus:[],activeTopMenuPath:"",activeMenuPath:"",activeOldMenuPath:"",activeMainMenu:{},activeAsideMenu:{},activeMenuOpenPaths:[],systemKey:"",buttonTriggerType:"contentConfig",menuTriggerType:"open",permissionSideMenus:[],importLoading:!1,contentLoading:!1,asideMenuLoading:!1,asideMenus:[],platform:"browser",platName:"",childMenu:"",linkMenuInfo:null}),actions:{setLinkMenuInfo(e){this.linkMenuInfo=e},setAsideMenuLoading(e){this.asideMenuLoading=e},setCacheStructures(e){var t,r;const n=(t=this.cacheStructures)==null?void 0:t.map(i=>i.key);e?n!=null&&n.includes(e==null?void 0:e.key)?this.cacheStructures=(r=this.cacheStructures)==null?void 0:r.map(i=>i.key===(e==null?void 0:e.key)?{...i,data:e==null?void 0:e.data}:i):this.cacheStructures.push(e):this.cacheStructures=[]},setChildMenu(e){this.childMenu=e},async setConfigMenu(e){this.configMenu=e},setActiveMainMenu(e){this.activeMainMenu=e},setContentLoading(e){this.contentLoading=e},setActiveAsideMenu(e){this.activeAsideMenu=e},setActiveTopMenuPath(e){this.activeTopMenuPath=e},setCacheInputMenu(e){this.cacheInputMenu=e},setIsRefreshMenus(e){this.isRefreshMenus=e},setButtonTriggerType(e){this.buttonTriggerType=e},setAsideMenus(e){this.asideMenus=e},setMenus(e){this.menus=e},setPlatName(e){this.platName=e},setImportLoading(e){this.importLoading=e},setPlatform(e){this.platform=e},getPlatform(){return this.platform},setMenuTriggerType(e){this.menuTriggerType=e},setSystemKey(e){this.systemKey=e},setActiveMenuPath(e){!e&&e!==null||(this.activeOldMenuPath=h.cloneDeep(this.activeMenuPath),this.activeMenuPath=e)},setActiveMenuOpenPaths(e){this.activeMenuOpenPaths=e},setRawMenus(e){this.rawMenus=e,this.permissionSideMenus=Wa}}}),at=(e,n)=>Array.isArray(e)?e==null?void 0:e.map(r=>{var i,o,a,s,c,u;if(Array.isArray(r)?r=r:r=[r],(i=r==null?void 0:r.filter(f=>!(f!=null&&f.id)||typeof(f==null?void 0:f.id)=="string"))!=null&&i.every(f=>typeof f!="object"||f===null))return r;if((o=r==null?void 0:r.filter(f=>!(f!=null&&f.id)||typeof(f==null?void 0:f.id)=="string"))!=null&&o.some(f=>Array.isArray(f)))return r;{let f=[];if(f.push(r==null?void 0:r.find(p=>(p==null?void 0:p.id)&&typeof(p==null?void 0:p.id)=="number")),Array.isArray(n==null?void 0:n[0])){const p=(a=r==null?void 0:r.filter(d=>!(d!=null&&d.id)||typeof(d==null?void 0:d.id)=="string"))==null?void 0:a[0];(s=en(h.cloneDeep(n==null?void 0:n[0])))==null||s.forEach(d=>{f.push(p==null?void 0:p[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}else{const p=(c=r==null?void 0:r.filter(d=>!(d!=null&&d.id)||typeof(d==null?void 0:d.id)=="string"))==null?void 0:c[0];(u=en(h.cloneDeep(n)))==null||u.forEach(d=>{f.push(p==null?void 0:p[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}return f}}):void 0,Ga=e=>{try{return JSON.parse(e),!0}catch{return!1}},Pr=(e,n)=>h.isEqual(e,n),jn=h.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:"",multipleTableConst:"."}),actions:{setTableIndex(e){this.tableIndex=e},setTableShowThree(e){this.tableShowThree=e}}}),Ya=jn(h.pinia),{multipleTableConst:ye}=h.storeToRefs(Ya),We=e=>{let n=[];function t(i,o=""){Array.isArray(i)&&(i==null||i.forEach(a=>{Array.isArray(a)||(a=[a]),a==null||a.forEach(s=>{var c,u,f,p,d,g,y,b,v,m,S,A;if(!(s!=null&&s.children)||s.children.length===0)s.prop=o===""?s==null?void 0:s.prop:o+ye.value+((p=(c=s==null?void 0:s.prop)==null?void 0:c.split(ye.value))==null?void 0:p[((f=(u=s==null?void 0:s.prop)==null?void 0:u.split(ye.value))==null?void 0:f.length)-1]),n.push(s.prop);else{let E=o===""?o+((b=(d=s==null?void 0:s.prop)==null?void 0:d.split(ye.value))==null?void 0:b[((y=(g=s==null?void 0:s.prop)==null?void 0:g.split(ye.value))==null?void 0:y.length)-1]):o+ye.value+((A=(v=s==null?void 0:s.prop)==null?void 0:v.split(ye.value))==null?void 0:A[((S=(m=s==null?void 0:s.prop)==null?void 0:m.split(ye.value))==null?void 0:S.length)-1]);r(s.children,E)}})}))}function r(i,o=""){i==null||i.forEach(a=>{var s,c,u,f,p,d,g,y,b,v,m,S;if(!(a!=null&&a.children)||a.children.length===0)a.prop=o===""?a==null?void 0:a.prop:o+ye.value+((f=(s=a==null?void 0:a.prop)==null?void 0:s.split(ye.value))==null?void 0:f[((u=(c=a==null?void 0:a.prop)==null?void 0:c.split(ye.value))==null?void 0:u.length)-1]),n.push(a.prop);else{let A=o===""?o+((y=(p=a==null?void 0:a.prop)==null?void 0:p.split(ye.value))==null?void 0:y[((g=(d=a==null?void 0:a.prop)==null?void 0:d.split(ye.value))==null?void 0:g.length)-1]):o+ye.value+((S=(b=a==null?void 0:a.prop)==null?void 0:b.split(ye.value))==null?void 0:S[((m=(v=a==null?void 0:a.prop)==null?void 0:v.split(ye.value))==null?void 0:m.length)-1]);r(a.children,A)}})}return t(e),n},Za=(e,n,t)=>{var i;let r=(i=h.cloneDeep(e))==null?void 0:i.map(o=>(o=o.filter(a=>!(a!=null&&a.id)),o));return r=r==null?void 0:r.map(o=>{var a;return o=(a=o.map((s,c)=>{let u={};if(t!=null&&t.find(f=>f===n[c]))return u[n[c]]=s,u}))==null?void 0:a.filter(s=>s),o}),r},Ja=(e,n)=>{var a,s;const t=h.cloneDeep(e),r=(a=t==null?void 0:t.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:a.contents,i=(s=t==null?void 0:t.find(c=>(c==null?void 0:c.key)==="tableContents"))==null?void 0:s.contents;return Za(i,We(r).slice(0,We(r).length-1),n)},Xa=e=>{let n={};return e==null||e.forEach(t=>{n[t.key]=t.value}),n},Qa=async e=>{var t,r,i,o;let n="";if((r=(t=h.cloneDeep(e))==null?void 0:t.split("/"))==null||r.forEach((a,s)=>{var c,u;s!==((u=(c=h.cloneDeep(e))==null?void 0:c.split("/"))==null?void 0:u.length)-1&&(n=n===""?n+a:n+"/"+a)}),n!==""){let a="";const s=await $e(n,sessionStorage.getItem("systemKey"),"");(o=(i=s==null?void 0:s[0])==null?void 0:i.compData)==null||o.forEach(c=>{var u;(c==null?void 0:c.key)==="tableContents"&&((u=c==null?void 0:c.contents)==null||u.forEach((f,p)=>{if(p===0){let d=f==null?void 0:f.filter(g=>!(g!=null&&g.id));a=n+"/"+(d==null?void 0:d[0])}}))}),await wt(a,e)}},es=e=>{var i,o,a,s;const n=e;let t=[];n.compData=(i=n.compData)==null?void 0:i.filter(c=>(c==null?void 0:c.key)!=="tableContents"&&(c==null?void 0:c.key)!=="tableIndex");const r=(a=(o=h.cloneDeep(n.compData))==null?void 0:o.find(c=>(c==null?void 0:c.key)==="tableIndexColumn"))==null?void 0:a.contents;return(s=h.cloneDeep(n.compData))==null||s.forEach(c=>{if((c==null?void 0:c.key)!=="tableIndexColumn"&&(c==null?void 0:c.key)!=="header")t.push(c);else if((c==null?void 0:c.key)==="header"){let u=c.contents;r&&(u!=null&&u.every(f=>Array.isArray(f))?u==null||u[0].unshift({label:r}):u.unshift({label:r})),t.push({key:"header",contents:u})}}),n.compData=t,n},ts=e=>{var o,a,s,c,u;const n=(o=e.compData)==null?void 0:o.filter(f=>(f==null?void 0:f.key)==="tableContents"||(f==null?void 0:f.key)==="tableIndex"),t=(s=(a=n==null?void 0:n.find(f=>(f==null?void 0:f.key)==="tableIndex"))==null?void 0:a.contents)==null?void 0:s.map(f=>f.label),r=(c=n==null?void 0:n.find(f=>(f==null?void 0:f.key)==="tableContents"))==null?void 0:c.contents;let i=[];return(t==null?void 0:t.length)>0&&(r!=null&&r.every(f=>Array.isArray(f)))?i=t==null?void 0:t.map((f,p)=>r[p]?[f,...r[p]]:[f]):Array.isArray(r==null?void 0:r[0])&&((u=r==null?void 0:r[0])!=null&&u.every(f=>Array.isArray(f)))?i=r==null?void 0:r[0]:Array.isArray(r==null?void 0:r[0])?i=r:i.push(r),i},ns=e=>{const n=[];function t(r){!r||r.length===0||(n.push(r==null?void 0:r.map(i=>({label:i.label}))),r==null||r.forEach(i=>{i!=null&&i.children&&(i==null?void 0:i.children.length)>0&&t(i==null?void 0:i.children)}))}return t(e),n},rs=e=>{const n=[];function t(r,i=[]){!r||r.length===0||(n.push({key:i==null?void 0:i.filter(o=>!Array.isArray(o)),value:r}),r==null||r.forEach(o=>{o!=null&&o.some(a=>Array.isArray(a))&&t(o.find(a=>Array.isArray(a)),o)}))}return t(e),n},is=e=>{const n=[];function t(r){!r||r.length===0||(n.push(r==null?void 0:r.map(i=>i==null?void 0:i.filter(o=>!Array.isArray(o)))),r==null||r.forEach(i=>{i!=null&&i.some(o=>Array.isArray(o))&&t(i.find(o=>Array.isArray(o)))}))}return t(e),n},os=e=>{const n=[];function t(r){var i;!r||r.length===0||(r!=null&&r.every(o=>!Array.isArray(o))?n.push(r):(n.push((i=r==null?void 0:r.map(o=>o==null?void 0:o.filter(a=>!Array.isArray(a))))==null?void 0:i[0]),r==null||r.forEach(o=>{o!=null&&o.some(a=>Array.isArray(a))&&t(o.find(a=>Array.isArray(a)))})))}return t(e),n},as=(e,n)=>{let t;function r(i,o,a=1){var c;if(!i||i.length===0)return;const s=(c=h.cloneDeep(o))==null?void 0:c.map(u=>u==null?void 0:u.filter(f=>!Array.isArray(f)));return s!=null&&s.find(u=>Pr(u,i==null?void 0:i.key))?(o==null||o.forEach(u=>{!r(i,u.find(p=>Array.isArray(p)))&&Pr(u.filter(p=>!Array.isArray(p)),i==null?void 0:i.key)&&(t={type:a,contents:u.filter(p=>!Array.isArray(p))})}),!0):!1}return r(e,n,0),t},Or=(e,n)=>{function t(r,i){return!r||r.length===0||r==null?void 0:r.map((a,s)=>{var u,f;let c=a;return c.unshift((u=i==null?void 0:i[s])==null?void 0:u.label),c.some(p=>Array.isArray(p))&&(c[c.length-1]=t(c.find(p=>Array.isArray(p)),(f=i==null?void 0:i[s])==null?void 0:f.children)),c})}return t(e,n)},ss=e=>{var t,r,i,o,a,s,c,u,f,p,d,g,y,b,v,m,S,A,E,C,w,k,T,P,D;const n=e;if((e==null?void 0:e.comp)==="Table"){if((i=(r=(t=e.compData)==null?void 0:t.find(x=>(x==null?void 0:x.key)==="tableIndex"))==null?void 0:r.contents)!=null&&i.every(x=>!(x!=null&&x.children))||!((o=e.compData)!=null&&o.find(x=>(x==null?void 0:x.key)==="tableIndex")))return((c=(s=(a=n.compData)==null?void 0:a.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:c.length)===1&&((d=(p=(f=(u=n.compData)==null?void 0:u.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:f.contents)==null?void 0:p[0])!=null&&d.every(x=>Array.isArray(x)))?(n.compData=(g=n.compData)==null?void 0:g.map(x=>{var R;return(x==null?void 0:x.key)==="tableContents"&&(x.contents=(R=x.contents)==null?void 0:R[0]),x}),[n]):[n];{let x=[];const R=n.compData,O=(y=h.cloneDeep(R))==null?void 0:y.find(K=>(K==null?void 0:K.key)==="tableIndexColumn"),G=(b=h.cloneDeep(R))==null?void 0:b.find(K=>(K==null?void 0:K.key)==="extraButton"),Z=(v=h.cloneDeep(R))==null?void 0:v.find(K=>(K==null?void 0:K.key)==="rowButton"),J=os((S=(m=h.cloneDeep(R))==null?void 0:m.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:S.contents),N=(A=h.cloneDeep(R))==null?void 0:A.find(K=>(K==null?void 0:K.key)==="tableIndex"),$=is((C=(E=h.cloneDeep(R))==null?void 0:E.find(K=>(K==null?void 0:K.key)==="tableContents"))==null?void 0:C.contents),z=Or((k=(w=h.cloneDeep(R))==null?void 0:w.find(K=>(K==null?void 0:K.key)==="tableContents"))==null?void 0:k.contents,N==null?void 0:N.contents),X=rs(Or((P=(T=h.cloneDeep(R))==null?void 0:T.find(K=>(K==null?void 0:K.key)==="tableContents"))==null?void 0:P.contents,N==null?void 0:N.contents));if(N)return(D=ns(N.contents))==null||D.forEach((K,M)=>{var L;let V=[];V.push({key:"tableIndex",contents:K}),V.push(O),V.push(G),V.push(Z),V.push({key:"tableContents",contents:$[M]}),V.push({key:"header",contents:J!=null&&J[M]?[J==null?void 0:J[M]]:[J==null?void 0:J[0]]}),x.push({comp:"Table",compData:V,name:"",parentTableContents:((L=as(X[M],z))==null?void 0:L.contents)??""})}),x}}else return[n]},ct=(e,n)=>{let t={};return Array.isArray(e)?e==null||e.forEach((r,i)=>{n!=null&&n[i]&&(t[n[i]]=r)}):[e].forEach((r,i)=>{t[n[i]]=r}),t},ls=e=>{var t,r;let n="";return(r=(t=h.cloneDeep(e))==null?void 0:t.split("/"))==null||r.forEach((i,o)=>{var a,s;o<((s=(a=h.cloneDeep(e))==null?void 0:a.split("/"))==null?void 0:s.length)-1&&(n=n===""?n+i:n+"/"+i)}),n},us=async e=>{const n=h.cloneDeep(e);let t=[],r=[];n==null||n.forEach(i=>{!(r!=null&&r.find(o=>(o==null?void 0:o.parentKey)===(i==null?void 0:i.parentKey)))&&(i==null?void 0:i.parentKey)!==""&&r.push(i)}),r=r==null?void 0:r.map(i=>{var o;return i.content=(o=i.content)==null?void 0:o.map(a=>{var s;return a.key={pageKey:(i==null?void 0:i.parentKey)??"",systemKey:((s=a.key)==null?void 0:s.systemKey)??"",version:1,type:"subStructure"},a}),i.content}),(r==null?void 0:r.length)>0&&(t=r==null?void 0:r.map(async i=>{let o;return(i==null?void 0:i.length)>0&&(o=await h.batchAddInsofDataApi({dataList:i})),o})),await Promise.all(t)},yt=h.defineStore("modelComp",{state:()=>({lockingPage:"",itemData:[],itemGridData:[],itemExtendData:{},originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[],systemPath:"",freshContent:!1,routeToChildPath:"",cacheUpdatingData:null,tableViewContents:[],activeItemIndex:-1,tableLoading:!1,pageMapState:{},payloadTypes:"data,structure,structureMethod,gridLayout,extend"}),actions:{setLockingPage(e){this.lockingPage=e},setPageMapState(e){this.pageMapState=e},setItemGridData(e){this.itemGridData=e},setItemExtendData(e){this.itemExtendData=e},setItemData(e){this.itemData=e},setTableLoading(e){this.tableLoading=e},setTableViewContents(e){this.tableViewContents=e},setCacheUpdatingData(e){this.cacheUpdatingData=e},setFreshContent(e){this.freshContent=e},setRouteToChildPath(e){this.routeToChildPath=e},setSubmitCurStructure(e){this.isSubmitCurStructure=e},setCurStructureCompIds(e){this.curStructureCompIds=e},setRefreshCurStructure(e){this.isRefreshCurStructure=e},setOriginalData(e){this.originalData=e},setExtraContents(e){this.extraContents=e},setNodeDev(e){this.nodeDev=e},setIsEdit(e){this.isEdit=e},setSystemPath(e){this.systemPath=e},setActiveItemIndex(e){this.activeItemIndex=e}}}),qn=h.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(e){this.routerPageStructures=e}}}),cs=Ct(h.pinia),{activeMenuPath:$t}=h.storeToRefs(cs),Vi=h.useLoginState(h.pinia),{structureData:fs,loginUserInfo:gn}=h.storeToRefs(Vi),hs=qn(h.pinia),{routerPageStructures:ps}=h.storeToRefs(hs),Wt=yt(h.pinia),ds=l.ref([{label:"角色名称",value:"",name:"roleName"}]),ys=l.ref([{label:"查询"},{label:"重置"}]),Vr=l.reactive({isFilter:!1,filterForm:{}}),gs=l.ref(!1),vs=e=>{Vr.isFilter=!0,Vr.filterForm=e},Fi=l.ref([]),Cn=l.ref([]),Li=l.ref(""),ms=l.computed(()=>{var n,t,r,i,o;const e=(n=ps.value)==null?void 0:n.find(a=>{var s;return((s=a==null?void 0:a.comp)==null?void 0:s.toUpperCase())==="TABLE"});if(e){Li.value=e.name,Cn.value=(i=(r=(t=e==null?void 0:e.compData)==null?void 0:t.find(s=>(s==null?void 0:s.key)==="header"))==null?void 0:r.contents)==null?void 0:i.filter(s=>(s==null?void 0:s.label)!=="操作");const a=(o=e==null?void 0:e.compData)==null?void 0:o.map(s=>{var c;if((s==null?void 0:s.key)==="rowButton"){let u=[];return ot.value?u=[...s==null?void 0:s.contents,{label:"授权"}]:u=s==null?void 0:s.contents,{...s,contents:u}}return(s==null?void 0:s.key)==="header"?{...s,contents:(c=s==null?void 0:s.contents)==null?void 0:c.map(u=>{var f,p;return{...u,isTableColHidden:(f=u==null?void 0:u.prop)==null?void 0:f.includes("授权"),isFormColHidden:(p=u==null?void 0:u.prop)==null?void 0:p.includes("授权")}})}:s});return zi(a),a}return[]}),bs=e=>{Wt.setRefreshCurStructure(!1),Qn(e.singleContent,e.buttonName,sn.value,e==null?void 0:e.selectItems)},rt=l.ref({}),Wn=l.ref(),kt=async(e,n,t)=>{var r,i;try{const o=await e(n);return((r=o==null?void 0:o.data)==null?void 0:r.code)===200?(t!=="查询"&&await Vi.setLogRecordAsync({type:t,data:n},$t.value),h.ElMessage.success("保存成功"),Wt.setRefreshCurStructure(!0),o.data.result||((i=o==null?void 0:o.data)==null?void 0:i.code)===200):null}catch(o){h.ElMessage.error(o)}finally{Wt.setCacheUpdatingData(null)}},Ki=(e,n)=>{const t=[];for(const r of e)n!=null&&n.has(r.path)&&t.push(r),r.children&&t.push(...Ki(r.children,n));return t},Ss=(e,n)=>{var t,r;try{const i=new Map(e==null?void 0:e.map(s=>[s.path,s.checkedButtons])),o=Ki(n,i),a=(t=o==null?void 0:o.filter(s=>{var c,u;return((c=s==null?void 0:s.checkedButtons)==null?void 0:c.length)===((u=s==null?void 0:s.renderButtons)==null?void 0:u.length)}))==null?void 0:t.map(s=>s==null?void 0:s.path);(r=Wn.value)==null||r.setCheckedKeys(a)}catch{throw new Error("数据显示处理失败")}},Es=(e,n)=>{const t=new Map(n==null?void 0:n.map(i=>[i.path,i.checkedButtons]));function r(i){var a,s;const o=(a=i==null?void 0:i.path)!=null&&a.startsWith("/")?(s=i==null?void 0:i.path)==null?void 0:s.substring(1):i==null?void 0:i.path;t.has(o)&&(i.checkedButtons=t.get(o)),i.children&&i.children.length>0&&i.children.forEach(r)}e.forEach(r)},Hi=e=>e==null?void 0:e.map(n=>{var r;const t={...n,checkedButtons:[]};return t.children&&((r=t.children)==null?void 0:r.length)>0&&(t.children=Hi(t.children)),t}),Gn=e=>{for(const n in e)if(Array.isArray(e[n]))return n;return""},_i=e=>{const n=[];let t=0;for(;t<e.length;)if(typeof e[t]=="string"){const r={title:e[t]};t+1<e.length&&Array.isArray(e[t+1])?(r.children=_i(e[t+1]),t+=2):t+=1,n.push(r)}return n},Yn=e=>{const n=[];let t=0;for(;t<(e==null?void 0:e.length);){const r={title:e==null?void 0:e[t]};t+1<(e==null?void 0:e.length)&&Array.isArray(e==null?void 0:e[t+1])?(r.children=_i(e==null?void 0:e[t+1]),t+=2):t+=1,n.push(r)}return n},an=(e,n="",t=new Map)=>e==null?void 0:e.map(r=>{const i=n?`${n}/${r.title}`:r.title;if(t.has(i))return t.get(i);const o={...r,path:i};return r.children&&r.children.length>0&&(o.children=an(r.children,i,t)),t.set(i,o),o}),Zn=(e,n)=>e.reduce((t,r)=>{const i=r[n];return t[i]||(t[i]=[]),t[i].push(r),t},{}),Jn=e=>{const n=[];function t(r,i){!r.children||r.children.length===0?n.push({...r,parentPath:i||""}):r.children.forEach(o=>t(o,r.path||i))}return e.forEach(r=>t(r,"")),n},Xn=e=>Object.entries(e).map(([t,r])=>({path:t,checkedButtons:r==null?void 0:r.map(i=>i==null?void 0:i.path)})),Ts=e=>Object.prototype.toString.call(e)==="[object Object]"&&e!==null,ws=(e,n)=>{const t={},r=Array.isArray(e)?e==null?void 0:e.filter(i=>{var o;return!(Ts(i)&&((o=Object.keys(i))!=null&&o.includes("id")))}):null;return r&&(r==null||r.forEach((i,o)=>{var a;t[(a=n[o])==null?void 0:a.prop]=i})),t},it=l.ref(""),zi=e=>{var o;const n=e==null?void 0:e.find(a=>(a==null?void 0:a.key)==="tableContents"),t=e==null?void 0:e.find(a=>(a==null?void 0:a.key)==="header");if(!n||!t)return"";const r=(o=n==null?void 0:n.contents)==null?void 0:o[0],i=ws(r,t==null?void 0:t.contents);it.value=Gn(i)},Ds=e=>{if(!Array.isArray(e))return!1;for(let n of e){if(typeof n!="object"||n===null||typeof n.path!="string"||!Array.isArray(n.checkedButtons))return!1;for(let t of n.checkedButtons)if(typeof t!="string")return!1}return!0},ks=e=>{const n=[];for(const t in e)e[t].forEach(i=>{var c,u;const o=(c=i.path)!=null&&c.startsWith("/")?(u=i.path)==null?void 0:u.substring(1):i.path,a=o==null?void 0:o.split("/");let s=n;a.forEach(f=>{let p=s.find(d=>d.title===f);p||(p={title:f,path:i.path,children:[]},s.push(p)),s=p.children})});return n},As=e=>{const n={};return e.forEach(t=>{const{path:r,checkedButtons:i}=t,o=r,a=i.map(s=>({title:s.split("/").pop()||"",path:s,parentPath:o}));n[o]=a}),n},$i=e=>{let n=[];for(const t of e){let r=[t.title];if(t.children&&Array.isArray(t.children)){let i=$i(t.children);i.length>0&&r.push(i)}n.push(r)}return n},Cs=e=>{const n=[];for(const t of e){if(!Array.isArray(t)||t.length!==2)continue;const[r,i]=t,o=Ui(i),a=n.indexOf(r);a===-1?n.push(r,o):n[a+1]=ji(n[a+1],o)}return n},Ui=e=>{const n=[];for(const t of e)if(Array.isArray(t)){if(t.length===1&&typeof t[0]=="string")n.push(t[0]);else if(t.length===2&&typeof t[0]=="string"){const[r,i]=t;n.push(r,Ui(i))}}return n},ji=(e,n)=>{const t=[...e];let r=0;for(;r<n.length;){const i=n[r];if(typeof i=="string"){const o=t.indexOf(i);o===-1?t.push(i,n[r+1]):t[o+1]=ji(t[o+1],n[r+1]),r+=2}else t.push(i),r+=1}return t},Is=async(e,n)=>{var t;if(rt.value=h.cloneDeep(n),Wt.setRefreshCurStructure(!1),(t=st.value)==null||t.splice(0),e==="授权"){if(!it.value){h.ElMessage.error("请正确定义角色权限");return}const r=Ds(rt.value[it.value]);let i;if(r)i=rt.value[it.value];else{const o=Yn(rt.value[it.value]),a=an(o),s=Jn(a),c=Zn(s,"parentPath");i=Xn(c)}if(!i||!Array.isArray(i)){h.ElMessage.error("权限数据处理出错了,请联系管理员");return}Ge.title=`【${n.角色名称}】授权`,Ge.show=!0,await l.nextTick(),Es(ft.value,i),Ss(i,ft.value)}},xs=()=>{Ge.show=!1},In=l.ref(),Bs=async e=>{const n=await kt(h.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),t=n==null?void 0:n.map(r=>{var i;return{id:r.id,tableData:(i=r==null?void 0:r.value)==null?void 0:i.tableData}});return t==null?void 0:t.map(r=>{var i;if(Array.isArray(r==null?void 0:r.tableData)){let o={id:r.id};return(i=r==null?void 0:r.tableData)==null||i.forEach((a,s)=>{o[`a${s}`]=a}),o}else return{...r.tableData,id:r.id}})},At=(e,n)=>{let t={};if(n==null||n.forEach(r=>{r.label&&e&&(t[r.label]=(e==null?void 0:e[r==null?void 0:r.prop])??null)}),t!=null&&t.id){const{id:r,...i}=t;return i}return t},Ms=async(e,n)=>{var o,a;let t=[];Array.isArray(e)?t=h.cloneDeep(e):t=[h.cloneDeep(e)];const r=(o=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="string"))==null?void 0:o.map(s=>{var c,u,f,p,d;return{key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(c=$t.value)!=null&&c.startsWith("/")?(u=$t.value)==null?void 0:u.substring(1):$t.value,tableId:n,createUserId:(f=gn.value)==null?void 0:f.id,createUserOrg:((p=gn.value)==null?void 0:p.dept)||((d=gn.value)==null?void 0:d.部门名称)},value:{tableData:At(s,Cn.value)}}}),i=(a=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="number"))==null?void 0:a.map(s=>({id:s==null?void 0:s.id,value:{tableData:At(s,Cn.value)}}));r.length>0&&await kt(h.batchAddInsofDataApi,{dataList:r},"新增"),i.length>0&&(await kt(h.batchUpdateInsofDataApi,{dataList:i},"编辑"),Ge.show=!1)},Qn=async(e,n,t,r)=>{if(!(n!=null&&n.includes("删除")))await Ms(e,t);else{let i=[];n!=null&&n.includes("批量")?i=r&&(r==null?void 0:r.length)>0?r==null?void 0:r.map(o=>o==null?void 0:o.id):[]:i=[e==null?void 0:e.id],await kt(h.batchDeleteInsofDataApi,{ids:i},"编辑")}},qi=e=>{let n=[];return e==null||e.forEach(t=>{var r;if(t.checkedButtons&&((r=t.checkedButtons)==null?void 0:r.length)>0){const i={path:t.path,checkedButtons:t.checkedButtons};n=n.concat(i)}t.children&&(n=n.concat(qi(t.children)))}),n},Rs=()=>{const e=qi(ft.value),n=As(e),t=ks(n),r=$i(t),i=Cs(r);In.value={...rt.value,[it.value]:i},l.nextTick(()=>{Qn(In.value,"编辑",sn.value)})},Ge=l.reactive({show:!1,title:"角色授权",width:"30%",draggable:!0}),Ns=({isPenultimate:e},n)=>{var t,r;return console.log("isPenultimate",e,n),((r=(t=n==null?void 0:n.data)==null?void 0:t.renderButtons)==null?void 0:r.length)>0?"is-penultimate":""},sn=l.ref(0),Wi=async e=>{var r,i,o,a,s;let n;const t=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:e!=null&&e.startsWith("/")?e==null?void 0:e.substring(1):e}});return((r=t==null?void 0:t.data)==null?void 0:r.code)===200&&(i=t==null?void 0:t.data)!=null&&i.result&&((o=t==null?void 0:t.data)==null?void 0:o.result.length)>0&&(n=(s=(a=t==null?void 0:t.data.result)==null?void 0:a[0])==null?void 0:s.id,sn.value=n),n},ft=l.ref([]),Ps=l.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]),Os=(e,n)=>{var t;e.checkedButtons=n?(t=e.renderButtons)==null?void 0:t.map(r=>r.path):[]},st=l.ref([]),Vs=(e,n)=>{var t,r,i;n.checkedButtons=e,((t=n.checkedButtons)==null?void 0:t.length)===((r=n.renderButtons)==null?void 0:r.length)?st.value.push(n.path):(e==null?void 0:e.length)===0&&(st.value=(i=st.value)==null?void 0:i.filter(o=>o!==n.path))};l.watch(()=>st.value.length,()=>{var e;(e=Wn.value)==null||e.setCheckedKeys([...st.value])});l.watch(()=>Ge.show,e=>{e||(ft.value=Hi(ft.value))});const Gi=l.computed(()=>{var t;const e=(t=h.cloneDeep(fs.value))==null?void 0:t.filter(r=>{var i,o;return((o=(i=r==null?void 0:r.key)==null?void 0:i.pageKey)==null?void 0:o.toUpperCase())!=="MENU"});return[...e==null?void 0:e.map(r=>{var a,s,c,u,f,p,d,g;const i=/button/i;let o=(c=(s=(a=r==null?void 0:r.value)==null?void 0:a.pageData)==null?void 0:s.compData)==null?void 0:c.filter(y=>i.test(y==null?void 0:y.key));return o=Array.from(new Set(o==null?void 0:o.flatMap(y=>y.contents.map(b=>b.label)))),{path:(f=(u=r==null?void 0:r.key)==null?void 0:u.pageKey)!=null&&f.startsWith("/")?(d=(p=r==null?void 0:r.key)==null?void 0:p.pageKey)==null?void 0:d.substring(1):(g=r==null?void 0:r.key)==null?void 0:g.pageKey,buttons:o}}),...Yi.value]}),Yi=l.ref([]),Fs=(e,n,t)=>{const i=[e==null?void 0:e.find(o=>(o==null?void 0:o.title)===n)].flatMap(o=>o==null?void 0:o.children);return i==null?void 0:i.map(o=>{var a,s;return{path:(a=o==null?void 0:o.path)!=null&&a.startsWith("/")?(s=o==null?void 0:o.path)==null?void 0:s.substring(1):o==null?void 0:o.path,buttons:t}})},Fr=(e,n)=>{var t;if(e.carryData){if(e.path==="系统管理/个人中心"){const i=["基本信息","上传头像","签名","修改密码"];return i==null?void 0:i.map(o=>{var a,s;return{title:o,path:(a=e==null?void 0:e.path)!=null&&a.startsWith("/")?((s=e==null?void 0:e.path)==null?void 0:s.substring(1))+"/"+o:e.path+"/"+o}})}if(!(n!=null&&n.buttons)||!Array.isArray(n==null?void 0:n.buttons))return[];const r=(t=n==null?void 0:n.buttons)!=null&&t.includes("查看")?n==null?void 0:n.buttons:["查看",...n==null?void 0:n.buttons];return r==null?void 0:r.map(i=>{var o,a;return{title:i,path:(o=e==null?void 0:e.path)!=null&&o.startsWith("/")?((a=e==null?void 0:e.path)==null?void 0:a.substring(1))+"/"+i:e.path+"/"+i}})}return[]},Zi=(e,n)=>{if(Array.isArray(e))return e==null?void 0:e.map(t=>{var o,a;const r=(o=t==null?void 0:t.path)!=null&&o.startsWith("/")?(a=t==null?void 0:t.path)==null?void 0:a.substring(1):t==null?void 0:t.path,i=n==null?void 0:n.find(s=>(s==null?void 0:s.path)===r);return t.children&&t.children.length>0?{...t,renderButtons:Fr(t,i),checkedButtons:[],children:Zi(t.children,Gi.value)}:{...t,renderButtons:Fr(t,i),checkedButtons:[]}})},Ls={comp:"Group",name:"/系统管理/角色管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:Fi.value,name:""}]}]},Ks=Object.freeze(Object.defineProperty({__proto__:null,addButtonsToTree:Zi,addPathToTree:an,authorizeDialog:Ge,buttonValue:ys,changedRow:In,clickRow:rt,clickRowButton:Is,clickSubmitAuthority:Rs,closeAuthorizeDialog:xs,compName:Li,convertArrayToTree:Yn,convertIndexToLabel:At,customNodeClass:Ns,getActivePageStructureId:Wi,getAuthorityKey:zi,getFirstArrayProperty:Gn,getLeafNodesRecursive:Jn,getPageDataAsync:Bs,groupByField:Zn,handleAddSysMenusButtons:Fs,handleItemDataChange:bs,handleNodeBtnChange:Vs,handleNodeCheckChange:Os,handleQueryChange:vs,handleRowAuthorityRender:Xn,handleSubmitAsync:kt,isPageDataExist:gs,menuData:ft,menusButtons:Ps,pageData:Fi,pageDataFiltered:ms,queryFormData:ds,structureButtons:Gi,structureId:sn,submitTableAsyncByVerify:Qn,tempRolePageData:Ls,tempSysMenus:Yi,treeRef:Wn},Symbol.toStringTag,{value:"Module"}));var Hs="0123456789abcdefghijklmnopqrstuvwxyz";function Pe(e){return Hs.charAt(e)}function _s(e,n){return e&n}function Vt(e,n){return e|n}function Lr(e,n){return e^n}function Kr(e,n){return e&~n}function zs(e){if(e==0)return-1;var n=0;return(e&65535)==0&&(e>>=16,n+=16),(e&255)==0&&(e>>=8,n+=8),(e&15)==0&&(e>>=4,n+=4),(e&3)==0&&(e>>=2,n+=2),(e&1)==0&&++n,n}function $s(e){for(var n=0;e!=0;)e&=e-1,++n;return n}var tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ji="=";function Gt(e){var n,t,r="";for(n=0;n+3<=e.length;n+=3)t=parseInt(e.substring(n,n+3),16),r+=tt.charAt(t>>6)+tt.charAt(t&63);for(n+1==e.length?(t=parseInt(e.substring(n,n+1),16),r+=tt.charAt(t<<2)):n+2==e.length&&(t=parseInt(e.substring(n,n+2),16),r+=tt.charAt(t>>2)+tt.charAt((t&3)<<4));(r.length&3)>0;)r+=Ji;return r}function Hr(e){var n="",t,r=0,i=0;for(t=0;t<e.length&&e.charAt(t)!=Ji;++t){var o=tt.indexOf(e.charAt(t));o<0||(r==0?(n+=Pe(o>>2),i=o&3,r=1):r==1?(n+=Pe(i<<2|o>>4),i=o&15,r=2):r==2?(n+=Pe(i),n+=Pe(o>>2),i=o&3,r=3):(n+=Pe(i<<2|o>>4),n+=Pe(o&15),r=0))}return r==1&&(n+=Pe(i<<2)),n}var Xe,Us={decode:function(e){var n;if(Xe===void 0){var t="0123456789ABCDEF",r=` \f
|
|
8
|
+
\r \u2028\u2029`;for(Xe={},n=0;n<16;++n)Xe[t.charAt(n)]=n;for(t=t.toLowerCase(),n=10;n<16;++n)Xe[t.charAt(n)]=n;for(n=0;n<r.length;++n)Xe[r.charAt(n)]=-1}var i=[],o=0,a=0;for(n=0;n<e.length;++n){var s=e.charAt(n);if(s=="=")break;if(s=Xe[s],s!=-1){if(s===void 0)throw new Error("Illegal character at offset "+n);o|=s,++a>=2?(i[i.length]=o,o=0,a=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return i}},Ue,xn={decode:function(e){var n;if(Ue===void 0){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=`= \f
|
|
9
|
+
\r \u2028\u2029`;for(Ue=Object.create(null),n=0;n<64;++n)Ue[t.charAt(n)]=n;for(Ue["-"]=62,Ue._=63,n=0;n<r.length;++n)Ue[r.charAt(n)]=-1}var i=[],o=0,a=0;for(n=0;n<e.length;++n){var s=e.charAt(n);if(s=="=")break;if(s=Ue[s],s!=-1){if(s===void 0)throw new Error("Illegal character at offset "+n);o|=s,++a>=4?(i[i.length]=o>>16,i[i.length]=o>>8&255,i[i.length]=o&255,o=0,a=0):o<<=6}}switch(a){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=o>>10;break;case 3:i[i.length]=o>>16,i[i.length]=o>>8&255;break}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var n=xn.re.exec(e);if(n)if(n[1])e=n[1];else if(n[2])e=n[2];else throw new Error("RegExp out of sync");return xn.decode(e)}},Qe=1e13,mt=function(){function e(n){this.buf=[+n||0]}return e.prototype.mulAdd=function(n,t){var r=this.buf,i=r.length,o,a;for(o=0;o<i;++o)a=r[o]*n+t,a<Qe?t=0:(t=0|a/Qe,a-=t*Qe),r[o]=a;t>0&&(r[o]=t)},e.prototype.sub=function(n){var t=this.buf,r=t.length,i,o;for(i=0;i<r;++i)o=t[i]-n,o<0?(o+=Qe,n=1):n=0,t[i]=o;for(;t[t.length-1]===0;)t.pop()},e.prototype.toString=function(n){if((n||10)!=10)throw new Error("only base 10 is supported");for(var t=this.buf,r=t[t.length-1].toString(),i=t.length-2;i>=0;--i)r+=(Qe+t[i]).toString().substring(1);return r},e.prototype.valueOf=function(){for(var n=this.buf,t=0,r=n.length-1;r>=0;--r)t=t*Qe+n[r];return t},e.prototype.simplify=function(){var n=this.buf;return n.length==1?n[0]:this},e}(),Xi="…",js=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,qs=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function lt(e,n){return e.length>n&&(e=e.substring(0,n)+Xi),e}var vn=function(){function e(n,t){this.hexDigits="0123456789ABCDEF",n instanceof e?(this.enc=n.enc,this.pos=n.pos):(this.enc=n,this.pos=t)}return e.prototype.get=function(n){if(n===void 0&&(n=this.pos++),n>=this.enc.length)throw new Error("Requesting byte offset ".concat(n," on a stream of length ").concat(this.enc.length));return typeof this.enc=="string"?this.enc.charCodeAt(n):this.enc[n]},e.prototype.hexByte=function(n){return this.hexDigits.charAt(n>>4&15)+this.hexDigits.charAt(n&15)},e.prototype.hexDump=function(n,t,r){for(var i="",o=n;o<t;++o)if(i+=this.hexByte(this.get(o)),r!==!0)switch(o&15){case 7:i+=" ";break;case 15:i+=`
|
|
10
|
+
`;break;default:i+=" "}return i},e.prototype.isASCII=function(n,t){for(var r=n;r<t;++r){var i=this.get(r);if(i<32||i>176)return!1}return!0},e.prototype.parseStringISO=function(n,t){for(var r="",i=n;i<t;++i)r+=String.fromCharCode(this.get(i));return r},e.prototype.parseStringUTF=function(n,t){for(var r="",i=n;i<t;){var o=this.get(i++);o<128?r+=String.fromCharCode(o):o>191&&o<224?r+=String.fromCharCode((o&31)<<6|this.get(i++)&63):r+=String.fromCharCode((o&15)<<12|(this.get(i++)&63)<<6|this.get(i++)&63)}return r},e.prototype.parseStringBMP=function(n,t){for(var r="",i,o,a=n;a<t;)i=this.get(a++),o=this.get(a++),r+=String.fromCharCode(i<<8|o);return r},e.prototype.parseTime=function(n,t,r){var i=this.parseStringISO(n,t),o=(r?js:qs).exec(i);return o?(r&&(o[1]=+o[1],o[1]+=+o[1]<70?2e3:1900),i=o[1]+"-"+o[2]+"-"+o[3]+" "+o[4],o[5]&&(i+=":"+o[5],o[6]&&(i+=":"+o[6],o[7]&&(i+="."+o[7]))),o[8]&&(i+=" UTC",o[8]!="Z"&&(i+=o[8],o[9]&&(i+=":"+o[9]))),i):"Unrecognized time: "+i},e.prototype.parseInteger=function(n,t){for(var r=this.get(n),i=r>127,o=i?255:0,a,s="";r==o&&++n<t;)r=this.get(n);if(a=t-n,a===0)return i?-1:0;if(a>4){for(s=r,a<<=3;((+s^o)&128)==0;)s=+s<<1,--a;s="("+a+` bit)
|
|
11
|
+
`}i&&(r=r-256);for(var c=new mt(r),u=n+1;u<t;++u)c.mulAdd(256,this.get(u));return s+c.toString()},e.prototype.parseBitString=function(n,t,r){for(var i=this.get(n),o=(t-n-1<<3)-i,a="("+o+` bit)
|
|
12
|
+
`,s="",c=n+1;c<t;++c){for(var u=this.get(c),f=c==t-1?i:0,p=7;p>=f;--p)s+=u>>p&1?"1":"0";if(s.length>r)return a+lt(s,r)}return a+s},e.prototype.parseOctetString=function(n,t,r){if(this.isASCII(n,t))return lt(this.parseStringISO(n,t),r);var i=t-n,o="("+i+` byte)
|
|
13
|
+
`;r/=2,i>r&&(t=n+r);for(var a=n;a<t;++a)o+=this.hexByte(this.get(a));return i>r&&(o+=Xi),o},e.prototype.parseOID=function(n,t,r){for(var i="",o=new mt,a=0,s=n;s<t;++s){var c=this.get(s);if(o.mulAdd(128,c&127),a+=7,!(c&128)){if(i==="")if(o=o.simplify(),o instanceof mt)o.sub(80),i="2."+o.toString();else{var u=o<80?o<40?0:1:2;i=u+"."+(o-u*40)}else i+="."+o.toString();if(i.length>r)return lt(i,r);o=new mt,a=0}}return a>0&&(i+=".incomplete"),i},e}(),Ws=function(){function e(n,t,r,i,o){if(!(i instanceof _r))throw new Error("Invalid tag value.");this.stream=n,this.header=t,this.length=r,this.tag=i,this.sub=o}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(n){if(this.tag===void 0)return null;n===void 0&&(n=1/0);var t=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return this.sub!==null?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,n);switch(this.tag.tagNumber){case 1:return this.stream.get(t)===0?"false":"true";case 2:return this.stream.parseInteger(t,t+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+r,n);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,n);case 6:return this.stream.parseOID(t,t+r,n);case 16:case 17:return this.sub!==null?"("+this.sub.length+" elem)":"(no elem)";case 12:return lt(this.stream.parseStringUTF(t,t+r),n);case 18:case 19:case 20:case 21:case 22:case 26:return lt(this.stream.parseStringISO(t,t+r),n);case 30:return lt(this.stream.parseStringBMP(t,t+r),n);case 23:case 24:return this.stream.parseTime(t,t+r,this.tag.tagNumber==23)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(n){n===void 0&&(n="");var t=n+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":this.tag.isUniversal()&&(this.tag.tagNumber==3||this.tag.tagNumber==4)&&this.sub!==null&&(t+=" (encapsulates)"),t+=`
|
|
14
|
+
`,this.sub!==null){n+=" ";for(var r=0,i=this.sub.length;r<i;++r)t+=this.sub[r].toPrettyString(n)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(n){var t=n.get(),r=t&127;if(r==t)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(n.pos-1));if(r===0)return null;t=0;for(var i=0;i<r;++i)t=t*256+n.get();return t},e.prototype.getHexStringValue=function(){var n=this.toHexString(),t=this.header*2,r=this.length*2;return n.substr(t,r)},e.decode=function(n){var t;n instanceof vn?t=n:t=new vn(n,0);var r=new vn(t),i=new _r(t),o=e.decodeLength(t),a=t.pos,s=a-r.pos,c=null,u=function(){var p=[];if(o!==null){for(var d=a+o;t.pos<d;)p[p.length]=e.decode(t);if(t.pos!=d)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var g=e.decode(t);if(g.tag.isEOC())break;p[p.length]=g}o=a-t.pos}catch(y){throw new Error("Exception while decoding undefined length content: "+y)}return p};if(i.tagConstructed)c=u();else if(i.isUniversal()&&(i.tagNumber==3||i.tagNumber==4))try{if(i.tagNumber==3&&t.get()!=0)throw new Error("BIT STRINGs with unused bits cannot encapsulate.");c=u();for(var f=0;f<c.length;++f)if(c[f].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch{c=null}if(c===null){if(o===null)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);t.pos=a+Math.abs(o)}return new e(r,s,o,i,c)},e}(),_r=function(){function e(n){var t=n.get();if(this.tagClass=t>>6,this.tagConstructed=(t&32)!==0,this.tagNumber=t&31,this.tagNumber==31){var r=new mt;do t=n.get(),r.mulAdd(128,t&127);while(t&128);this.tagNumber=r.simplify()}}return e.prototype.isUniversal=function(){return this.tagClass===0},e.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},e}(),ze,Gs=0xdeadbeefcafe,zr=(Gs&16777215)==15715070,be=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Ys=(1<<26)/be[be.length-1],Y=function(){function e(n,t,r){n!=null&&(typeof n=="number"?this.fromNumber(n,t,r):t==null&&typeof n!="string"?this.fromString(n,256):this.fromString(n,t))}return e.prototype.toString=function(n){if(this.s<0)return"-"+this.negate().toString(n);var t;if(n==16)t=4;else if(n==8)t=3;else if(n==2)t=1;else if(n==32)t=5;else if(n==4)t=2;else return this.toRadix(n);var r=(1<<t)-1,i,o=!1,a="",s=this.t,c=this.DB-s*this.DB%t;if(s-- >0)for(c<this.DB&&(i=this[s]>>c)>0&&(o=!0,a=Pe(i));s>=0;)c<t?(i=(this[s]&(1<<c)-1)<<t-c,i|=this[--s]>>(c+=this.DB-t)):(i=this[s]>>(c-=t)&r,c<=0&&(c+=this.DB,--s)),i>0&&(o=!0),o&&(a+=Pe(i));return o?a:"0"},e.prototype.negate=function(){var n=ee();return e.ZERO.subTo(this,n),n},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(n){var t=this.s-n.s;if(t!=0)return t;var r=this.t;if(t=r-n.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this[r]-n[r])!=0)return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Ft(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(n){var t=ee();return this.abs().divRemTo(n,null,t),this.s<0&&t.compareTo(e.ZERO)>0&&n.subTo(t,t),t},e.prototype.modPowInt=function(n,t){var r;return n<256||t.isEven()?r=new $r(t):r=new Ur(t),this.exp(n,r)},e.prototype.clone=function(){var n=ee();return this.copyTo(n),n},e.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var n=this.t,t=[];t[0]=this.s;var r=this.DB-n*this.DB%8,i,o=0;if(n-- >0)for(r<this.DB&&(i=this[n]>>r)!=(this.s&this.DM)>>r&&(t[o++]=i|this.s<<this.DB-r);n>=0;)r<8?(i=(this[n]&(1<<r)-1)<<8-r,i|=this[--n]>>(r+=this.DB-8)):(i=this[n]>>(r-=8)&255,r<=0&&(r+=this.DB,--n)),(i&128)!=0&&(i|=-256),o==0&&(this.s&128)!=(i&128)&&++o,(o>0||i!=this.s)&&(t[o++]=i);return t},e.prototype.equals=function(n){return this.compareTo(n)==0},e.prototype.min=function(n){return this.compareTo(n)<0?this:n},e.prototype.max=function(n){return this.compareTo(n)>0?this:n},e.prototype.and=function(n){var t=ee();return this.bitwiseTo(n,_s,t),t},e.prototype.or=function(n){var t=ee();return this.bitwiseTo(n,Vt,t),t},e.prototype.xor=function(n){var t=ee();return this.bitwiseTo(n,Lr,t),t},e.prototype.andNot=function(n){var t=ee();return this.bitwiseTo(n,Kr,t),t},e.prototype.not=function(){for(var n=ee(),t=0;t<this.t;++t)n[t]=this.DM&~this[t];return n.t=this.t,n.s=~this.s,n},e.prototype.shiftLeft=function(n){var t=ee();return n<0?this.rShiftTo(-n,t):this.lShiftTo(n,t),t},e.prototype.shiftRight=function(n){var t=ee();return n<0?this.lShiftTo(-n,t):this.rShiftTo(n,t),t},e.prototype.getLowestSetBit=function(){for(var n=0;n<this.t;++n)if(this[n]!=0)return n*this.DB+zs(this[n]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var n=0,t=this.s&this.DM,r=0;r<this.t;++r)n+=$s(this[r]^t);return n},e.prototype.testBit=function(n){var t=Math.floor(n/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<n%this.DB)!=0},e.prototype.setBit=function(n){return this.changeBit(n,Vt)},e.prototype.clearBit=function(n){return this.changeBit(n,Kr)},e.prototype.flipBit=function(n){return this.changeBit(n,Lr)},e.prototype.add=function(n){var t=ee();return this.addTo(n,t),t},e.prototype.subtract=function(n){var t=ee();return this.subTo(n,t),t},e.prototype.multiply=function(n){var t=ee();return this.multiplyTo(n,t),t},e.prototype.divide=function(n){var t=ee();return this.divRemTo(n,t,null),t},e.prototype.remainder=function(n){var t=ee();return this.divRemTo(n,null,t),t},e.prototype.divideAndRemainder=function(n){var t=ee(),r=ee();return this.divRemTo(n,t,r),[t,r]},e.prototype.modPow=function(n,t){var r=n.bitLength(),i,o=Ke(1),a;if(r<=0)return o;r<18?i=1:r<48?i=3:r<144?i=4:r<768?i=5:i=6,r<8?a=new $r(t):t.isEven()?a=new Js(t):a=new Ur(t);var s=[],c=3,u=i-1,f=(1<<i)-1;if(s[1]=a.convert(this),i>1){var p=ee();for(a.sqrTo(s[1],p);c<=f;)s[c]=ee(),a.mulTo(p,s[c-2],s[c]),c+=2}var d=n.t-1,g,y=!0,b=ee(),v;for(r=Ft(n[d])-1;d>=0;){for(r>=u?g=n[d]>>r-u&f:(g=(n[d]&(1<<r+1)-1)<<u-r,d>0&&(g|=n[d-1]>>this.DB+r-u)),c=i;(g&1)==0;)g>>=1,--c;if((r-=c)<0&&(r+=this.DB,--d),y)s[g].copyTo(o),y=!1;else{for(;c>1;)a.sqrTo(o,b),a.sqrTo(b,o),c-=2;c>0?a.sqrTo(o,b):(v=o,o=b,b=v),a.mulTo(b,s[g],o)}for(;d>=0&&(n[d]&1<<r)==0;)a.sqrTo(o,b),v=o,o=b,b=v,--r<0&&(r=this.DB-1,--d)}return a.revert(o)},e.prototype.modInverse=function(n){var t=n.isEven();if(this.isEven()&&t||n.signum()==0)return e.ZERO;for(var r=n.clone(),i=this.clone(),o=Ke(1),a=Ke(0),s=Ke(0),c=Ke(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!o.isEven()||!a.isEven())&&(o.addTo(this,o),a.subTo(n,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(n,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),t?((!s.isEven()||!c.isEven())&&(s.addTo(this,s),c.subTo(n,c)),s.rShiftTo(1,s)):c.isEven()||c.subTo(n,c),c.rShiftTo(1,c);r.compareTo(i)>=0?(r.subTo(i,r),t&&o.subTo(s,o),a.subTo(c,a)):(i.subTo(r,i),t&&s.subTo(o,s),c.subTo(a,c))}if(i.compareTo(e.ONE)!=0)return e.ZERO;if(c.compareTo(n)>=0)return c.subtract(n);if(c.signum()<0)c.addTo(n,c);else return c;return c.signum()<0?c.add(n):c},e.prototype.pow=function(n){return this.exp(n,new Zs)},e.prototype.gcd=function(n){var t=this.s<0?this.negate():this.clone(),r=n.s<0?n.negate():n.clone();if(t.compareTo(r)<0){var i=t;t=r,r=i}var o=t.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return t;for(o<a&&(a=o),a>0&&(t.rShiftTo(a,t),r.rShiftTo(a,r));t.signum()>0;)(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},e.prototype.isProbablePrime=function(n){var t,r=this.abs();if(r.t==1&&r[0]<=be[be.length-1]){for(t=0;t<be.length;++t)if(r[0]==be[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<be.length;){for(var i=be[t],o=t+1;o<be.length&&i<Ys;)i*=be[o++];for(i=r.modInt(i);t<o;)if(i%be[t++]==0)return!1}return r.millerRabin(n)},e.prototype.copyTo=function(n){for(var t=this.t-1;t>=0;--t)n[t]=this[t];n.t=this.t,n.s=this.s},e.prototype.fromInt=function(n){this.t=1,this.s=n<0?-1:0,n>0?this[0]=n:n<-1?this[0]=n+this.DV:this.t=0},e.prototype.fromString=function(n,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(n,t);return}this.t=0,this.s=0;for(var i=n.length,o=!1,a=0;--i>=0;){var s=r==8?+n[i]&255:qr(n,i);if(s<0){n.charAt(i)=="-"&&(o=!0);continue}o=!1,a==0?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,a+=r,a>=this.DB&&(a-=this.DB)}r==8&&(+n[0]&128)!=0&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var n=this.s&this.DM;this.t>0&&this[this.t-1]==n;)--this.t},e.prototype.dlShiftTo=function(n,t){var r;for(r=this.t-1;r>=0;--r)t[r+n]=this[r];for(r=n-1;r>=0;--r)t[r]=0;t.t=this.t+n,t.s=this.s},e.prototype.drShiftTo=function(n,t){for(var r=n;r<this.t;++r)t[r-n]=this[r];t.t=Math.max(this.t-n,0),t.s=this.s},e.prototype.lShiftTo=function(n,t){for(var r=n%this.DB,i=this.DB-r,o=(1<<i)-1,a=Math.floor(n/this.DB),s=this.s<<r&this.DM,c=this.t-1;c>=0;--c)t[c+a+1]=this[c]>>i|s,s=(this[c]&o)<<r;for(var c=a-1;c>=0;--c)t[c]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(n,t){t.s=this.s;var r=Math.floor(n/this.DB);if(r>=this.t){t.t=0;return}var i=n%this.DB,o=this.DB-i,a=(1<<i)-1;t[0]=this[r]>>i;for(var s=r+1;s<this.t;++s)t[s-r-1]|=(this[s]&a)<<o,t[s-r]=this[s]>>i;i>0&&(t[this.t-r-1]|=(this.s&a)<<o),t.t=this.t-r,t.clamp()},e.prototype.subTo=function(n,t){for(var r=0,i=0,o=Math.min(n.t,this.t);r<o;)i+=this[r]-n[r],t[r++]=i&this.DM,i>>=this.DB;if(n.t<this.t){for(i-=n.s;r<this.t;)i+=this[r],t[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<n.t;)i-=n[r],t[r++]=i&this.DM,i>>=this.DB;i-=n.s}t.s=i<0?-1:0,i<-1?t[r++]=this.DV+i:i>0&&(t[r++]=i),t.t=r,t.clamp()},e.prototype.multiplyTo=function(n,t){var r=this.abs(),i=n.abs(),o=r.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o<i.t;++o)t[o+r.t]=r.am(0,i[o],t,o,0,r.t);t.s=0,t.clamp(),this.s!=n.s&&e.ZERO.subTo(t,t)},e.prototype.squareTo=function(n){for(var t=this.abs(),r=n.t=2*t.t;--r>=0;)n[r]=0;for(r=0;r<t.t-1;++r){var i=t.am(r,t[r],n,2*r,0,1);(n[r+t.t]+=t.am(r+1,2*t[r],n,2*r+1,i,t.t-r-1))>=t.DV&&(n[r+t.t]-=t.DV,n[r+t.t+1]=1)}n.t>0&&(n[n.t-1]+=t.am(r,t[r],n,2*r,0,1)),n.s=0,n.clamp()},e.prototype.divRemTo=function(n,t,r){var i=n.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t){t!=null&&t.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=ee());var a=ee(),s=this.s,c=n.s,u=this.DB-Ft(i[i.t-1]);u>0?(i.lShiftTo(u,a),o.lShiftTo(u,r)):(i.copyTo(a),o.copyTo(r));var f=a.t,p=a[f-1];if(p!=0){var d=p*(1<<this.F1)+(f>1?a[f-2]>>this.F2:0),g=this.FV/d,y=(1<<this.F1)/d,b=1<<this.F2,v=r.t,m=v-f,S=t??ee();for(a.dlShiftTo(m,S),r.compareTo(S)>=0&&(r[r.t++]=1,r.subTo(S,r)),e.ONE.dlShiftTo(f,S),S.subTo(a,a);a.t<f;)a[a.t++]=0;for(;--m>=0;){var A=r[--v]==p?this.DM:Math.floor(r[v]*g+(r[v-1]+b)*y);if((r[v]+=a.am(0,A,r,m,0,f))<A)for(a.dlShiftTo(m,S),r.subTo(S,r);r[v]<--A;)r.subTo(S,r)}t!=null&&(r.drShiftTo(f,t),s!=c&&e.ZERO.subTo(t,t)),r.t=f,r.clamp(),u>0&&r.rShiftTo(u,r),s<0&&e.ZERO.subTo(r,r)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var n=this[0];if((n&1)==0)return 0;var t=n&3;return t=t*(2-(n&15)*t)&15,t=t*(2-(n&255)*t)&255,t=t*(2-((n&65535)*t&65535))&65535,t=t*(2-n*t%this.DV)%this.DV,t>0?this.DV-t:-t},e.prototype.isEven=function(){return(this.t>0?this[0]&1:this.s)==0},e.prototype.exp=function(n,t){if(n>4294967295||n<1)return e.ONE;var r=ee(),i=ee(),o=t.convert(this),a=Ft(n)-1;for(o.copyTo(r);--a>=0;)if(t.sqrTo(r,i),(n&1<<a)>0)t.mulTo(i,o,r);else{var s=r;r=i,i=s}return t.revert(r)},e.prototype.chunkSize=function(n){return Math.floor(Math.LN2*this.DB/Math.log(n))},e.prototype.toRadix=function(n){if(n==null&&(n=10),this.signum()==0||n<2||n>36)return"0";var t=this.chunkSize(n),r=Math.pow(n,t),i=Ke(r),o=ee(),a=ee(),s="";for(this.divRemTo(i,o,a);o.signum()>0;)s=(r+a.intValue()).toString(n).substr(1)+s,o.divRemTo(i,o,a);return a.intValue().toString(n)+s},e.prototype.fromRadix=function(n,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),i=Math.pow(t,r),o=!1,a=0,s=0,c=0;c<n.length;++c){var u=qr(n,c);if(u<0){n.charAt(c)=="-"&&this.signum()==0&&(o=!0);continue}s=t*s+u,++a>=r&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0)}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),o&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(n,t,r){if(typeof t=="number")if(n<2)this.fromInt(1);else for(this.fromNumber(n,r),this.testBit(n-1)||this.bitwiseTo(e.ONE.shiftLeft(n-1),Vt,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>n&&this.subTo(e.ONE.shiftLeft(n-1),this);else{var i=[],o=n&7;i.length=(n>>3)+1,t.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},e.prototype.bitwiseTo=function(n,t,r){var i,o,a=Math.min(n.t,this.t);for(i=0;i<a;++i)r[i]=t(this[i],n[i]);if(n.t<this.t){for(o=n.s&this.DM,i=a;i<this.t;++i)r[i]=t(this[i],o);r.t=this.t}else{for(o=this.s&this.DM,i=a;i<n.t;++i)r[i]=t(o,n[i]);r.t=n.t}r.s=t(this.s,n.s),r.clamp()},e.prototype.changeBit=function(n,t){var r=e.ONE.shiftLeft(n);return this.bitwiseTo(r,t,r),r},e.prototype.addTo=function(n,t){for(var r=0,i=0,o=Math.min(n.t,this.t);r<o;)i+=this[r]+n[r],t[r++]=i&this.DM,i>>=this.DB;if(n.t<this.t){for(i+=n.s;r<this.t;)i+=this[r],t[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<n.t;)i+=n[r],t[r++]=i&this.DM,i>>=this.DB;i+=n.s}t.s=i<0?-1:0,i>0?t[r++]=i:i<-1&&(t[r++]=this.DV+i),t.t=r,t.clamp()},e.prototype.dMultiply=function(n){this[this.t]=this.am(0,n-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(n,t){if(n!=0){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=n;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(n,t,r){var i=Math.min(this.t+n.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(var o=r.t-this.t;i<o;++i)r[i+this.t]=this.am(0,n[i],r,i,0,this.t);for(var o=Math.min(n.t,t);i<o;++i)this.am(0,n[i],r,i,0,t-i);r.clamp()},e.prototype.multiplyUpperTo=function(n,t,r){--t;var i=r.t=this.t+n.t-t;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(t-this.t,0);i<n.t;++i)r[this.t+i-t]=this.am(t-i,n[i],r,0,0,this.t+i-t);r.clamp(),r.drShiftTo(1,r)},e.prototype.modInt=function(n){if(n<=0)return 0;var t=this.DV%n,r=this.s<0?n-1:0;if(this.t>0)if(t==0)r=this[0]%n;else for(var i=this.t-1;i>=0;--i)r=(t*r+this[i])%n;return r},e.prototype.millerRabin=function(n){var t=this.subtract(e.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var i=t.shiftRight(r);n=n+1>>1,n>be.length&&(n=be.length);for(var o=ee(),a=0;a<n;++a){o.fromInt(be[Math.floor(Math.random()*be.length)]);var s=o.modPow(i,this);if(s.compareTo(e.ONE)!=0&&s.compareTo(t)!=0){for(var c=1;c++<r&&s.compareTo(t)!=0;)if(s=s.modPowInt(2,this),s.compareTo(e.ONE)==0)return!1;if(s.compareTo(t)!=0)return!1}}return!0},e.prototype.square=function(){var n=ee();return this.squareTo(n),n},e.prototype.gcda=function(n,t){var r=this.s<0?this.negate():this.clone(),i=n.s<0?n.negate():n.clone();if(r.compareTo(i)<0){var o=r;r=i,i=o}var a=r.getLowestSetBit(),s=i.getLowestSetBit();if(s<0){t(r);return}a<s&&(s=a),s>0&&(r.rShiftTo(s,r),i.rShiftTo(s,i));var c=function(){(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),(a=i.getLowestSetBit())>0&&i.rShiftTo(a,i),r.compareTo(i)>=0?(r.subTo(i,r),r.rShiftTo(1,r)):(i.subTo(r,i),i.rShiftTo(1,i)),r.signum()>0?setTimeout(c,0):(s>0&&i.lShiftTo(s,i),setTimeout(function(){t(i)},0))};setTimeout(c,10)},e.prototype.fromNumberAsync=function(n,t,r,i){if(typeof t=="number")if(n<2)this.fromInt(1);else{this.fromNumber(n,r),this.testBit(n-1)||this.bitwiseTo(e.ONE.shiftLeft(n-1),Vt,this),this.isEven()&&this.dAddOffset(1,0);var o=this,a=function(){o.dAddOffset(2,0),o.bitLength()>n&&o.subTo(e.ONE.shiftLeft(n-1),o),o.isProbablePrime(t)?setTimeout(function(){i()},0):setTimeout(a,0)};setTimeout(a,0)}else{var s=[],c=n&7;s.length=(n>>3)+1,t.nextBytes(s),c>0?s[0]&=(1<<c)-1:s[0]=0,this.fromString(s,256)}},e}(),Zs=function(){function e(){}return e.prototype.convert=function(n){return n},e.prototype.revert=function(n){return n},e.prototype.mulTo=function(n,t,r){n.multiplyTo(t,r)},e.prototype.sqrTo=function(n,t){n.squareTo(t)},e}(),$r=function(){function e(n){this.m=n}return e.prototype.convert=function(n){return n.s<0||n.compareTo(this.m)>=0?n.mod(this.m):n},e.prototype.revert=function(n){return n},e.prototype.reduce=function(n){n.divRemTo(this.m,null,n)},e.prototype.mulTo=function(n,t,r){n.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(n,t){n.squareTo(t),this.reduce(t)},e}(),Ur=function(){function e(n){this.m=n,this.mp=n.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<n.DB-15)-1,this.mt2=2*n.t}return e.prototype.convert=function(n){var t=ee();return n.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),n.s<0&&t.compareTo(Y.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(n){var t=ee();return n.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(n){for(;n.t<=this.mt2;)n[n.t++]=0;for(var t=0;t<this.m.t;++t){var r=n[t]&32767,i=r*this.mpl+((r*this.mph+(n[t]>>15)*this.mpl&this.um)<<15)&n.DM;for(r=t+this.m.t,n[r]+=this.m.am(0,i,n,t,0,this.m.t);n[r]>=n.DV;)n[r]-=n.DV,n[++r]++}n.clamp(),n.drShiftTo(this.m.t,n),n.compareTo(this.m)>=0&&n.subTo(this.m,n)},e.prototype.mulTo=function(n,t,r){n.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(n,t){n.squareTo(t),this.reduce(t)},e}(),Js=function(){function e(n){this.m=n,this.r2=ee(),this.q3=ee(),Y.ONE.dlShiftTo(2*n.t,this.r2),this.mu=this.r2.divide(n)}return e.prototype.convert=function(n){if(n.s<0||n.t>2*this.m.t)return n.mod(this.m);if(n.compareTo(this.m)<0)return n;var t=ee();return n.copyTo(t),this.reduce(t),t},e.prototype.revert=function(n){return n},e.prototype.reduce=function(n){for(n.drShiftTo(this.m.t-1,this.r2),n.t>this.m.t+1&&(n.t=this.m.t+1,n.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);n.compareTo(this.r2)<0;)n.dAddOffset(1,this.m.t+1);for(n.subTo(this.r2,n);n.compareTo(this.m)>=0;)n.subTo(this.m,n)},e.prototype.mulTo=function(n,t,r){n.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(n,t){n.squareTo(t),this.reduce(t)},e}();function ee(){return new Y(null)}function ue(e,n){return new Y(e,n)}var jr=typeof navigator<"u";jr&&zr&&navigator.appName=="Microsoft Internet Explorer"?(Y.prototype.am=function(n,t,r,i,o,a){for(var s=t&32767,c=t>>15;--a>=0;){var u=this[n]&32767,f=this[n++]>>15,p=c*u+f*s;u=s*u+((p&32767)<<15)+r[i]+(o&1073741823),o=(u>>>30)+(p>>>15)+c*f+(o>>>30),r[i++]=u&1073741823}return o},ze=30):jr&&zr&&navigator.appName!="Netscape"?(Y.prototype.am=function(n,t,r,i,o,a){for(;--a>=0;){var s=t*this[n++]+r[i]+o;o=Math.floor(s/67108864),r[i++]=s&67108863}return o},ze=26):(Y.prototype.am=function(n,t,r,i,o,a){for(var s=t&16383,c=t>>14;--a>=0;){var u=this[n]&16383,f=this[n++]>>14,p=c*u+f*s;u=s*u+((p&16383)<<14)+r[i]+o,o=(u>>28)+(p>>14)+c*f,r[i++]=u&268435455}return o},ze=28);Y.prototype.DB=ze;Y.prototype.DM=(1<<ze)-1;Y.prototype.DV=1<<ze;var er=52;Y.prototype.FV=Math.pow(2,er);Y.prototype.F1=er-ze;Y.prototype.F2=2*ze-er;var ln=[],gt,Ie;gt=48;for(Ie=0;Ie<=9;++Ie)ln[gt++]=Ie;gt=97;for(Ie=10;Ie<36;++Ie)ln[gt++]=Ie;gt=65;for(Ie=10;Ie<36;++Ie)ln[gt++]=Ie;function qr(e,n){var t=ln[e.charCodeAt(n)];return t??-1}function Ke(e){var n=ee();return n.fromInt(e),n}function Ft(e){var n=1,t;return(t=e>>>16)!=0&&(e=t,n+=16),(t=e>>8)!=0&&(e=t,n+=8),(t=e>>4)!=0&&(e=t,n+=4),(t=e>>2)!=0&&(e=t,n+=2),(t=e>>1)!=0&&(e=t,n+=1),n}Y.ZERO=Ke(0);Y.ONE=Ke(1);var Xs=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(n){var t,r,i;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+n[t%n.length]&255,i=this.S[t],this.S[t]=this.S[r],this.S[r]=i;this.i=0,this.j=0},e.prototype.next=function(){var n;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,n=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=n,this.S[n+this.S[this.i]&255]},e}();function Qs(){return new Xs}var Qi=256,Lt,_e=null,Be;if(_e==null){_e=[],Be=0;var Kt=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var mn=new Uint32Array(256);for(window.crypto.getRandomValues(mn),Kt=0;Kt<mn.length;++Kt)_e[Be++]=mn[Kt]&255}var Ht=0,_t=function(e){if(Ht=Ht||0,Ht>=256||Be>=Qi){window.removeEventListener?window.removeEventListener("mousemove",_t,!1):window.detachEvent&&window.detachEvent("onmousemove",_t);return}try{var n=e.x+e.y;_e[Be++]=n&255,Ht+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",_t,!1):window.attachEvent&&window.attachEvent("onmousemove",_t))}function el(){if(Lt==null){for(Lt=Qs();Be<Qi;){var e=Math.floor(65536*Math.random());_e[Be++]=e&255}for(Lt.init(_e),Be=0;Be<_e.length;++Be)_e[Be]=0;Be=0}return Lt.next()}var Bn=function(){function e(){}return e.prototype.nextBytes=function(n){for(var t=0;t<n.length;++t)n[t]=el()},e}();function tl(e,n){if(n<e.length+22)return console.error("Message too long for RSA"),null;for(var t=n-e.length-6,r="",i=0;i<t;i+=2)r+="ff";var o="0001"+r+"00"+e;return ue(o,16)}function nl(e,n){if(n<e.length+11)return console.error("Message too long for RSA"),null;for(var t=[],r=e.length-1;r>=0&&n>0;){var i=e.charCodeAt(r--);i<128?t[--n]=i:i>127&&i<2048?(t[--n]=i&63|128,t[--n]=i>>6|192):(t[--n]=i&63|128,t[--n]=i>>6&63|128,t[--n]=i>>12|224)}t[--n]=0;for(var o=new Bn,a=[];n>2;){for(a[0]=0;a[0]==0;)o.nextBytes(a);t[--n]=a[0]}return t[--n]=2,t[--n]=0,new Y(t)}var rl=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(n){return n.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(n){if(this.p==null||this.q==null)return n.modPow(this.d,this.n);for(var t=n.mod(this.p).modPow(this.dmp1,this.p),r=n.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(r)<0;)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},e.prototype.setPublic=function(n,t){n!=null&&t!=null&&n.length>0&&t.length>0?(this.n=ue(n,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(n){var t=this.n.bitLength()+7>>3,r=nl(n,t);if(r==null)return null;var i=this.doPublic(r);if(i==null)return null;for(var o=i.toString(16),a=o.length,s=0;s<t*2-a;s++)o="0"+o;return o},e.prototype.setPrivate=function(n,t,r){n!=null&&t!=null&&n.length>0&&t.length>0?(this.n=ue(n,16),this.e=parseInt(t,16),this.d=ue(r,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(n,t,r,i,o,a,s,c){n!=null&&t!=null&&n.length>0&&t.length>0?(this.n=ue(n,16),this.e=parseInt(t,16),this.d=ue(r,16),this.p=ue(i,16),this.q=ue(o,16),this.dmp1=ue(a,16),this.dmq1=ue(s,16),this.coeff=ue(c,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(n,t){var r=new Bn,i=n>>1;this.e=parseInt(t,16);for(var o=new Y(t,16);;){for(;this.p=new Y(n-i,1,r),!(this.p.subtract(Y.ONE).gcd(o).compareTo(Y.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new Y(i,1,r),!(this.q.subtract(Y.ONE).gcd(o).compareTo(Y.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var a=this.p;this.p=this.q,this.q=a}var s=this.p.subtract(Y.ONE),c=this.q.subtract(Y.ONE),u=s.multiply(c);if(u.gcd(o).compareTo(Y.ONE)==0){this.n=this.p.multiply(this.q),this.d=o.modInverse(u),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(c),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(n){var t=ue(n,16),r=this.doPrivate(t);return r==null?null:il(r,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(n,t,r){var i=new Bn,o=n>>1;this.e=parseInt(t,16);var a=new Y(t,16),s=this,c=function(){var u=function(){if(s.p.compareTo(s.q)<=0){var d=s.p;s.p=s.q,s.q=d}var g=s.p.subtract(Y.ONE),y=s.q.subtract(Y.ONE),b=g.multiply(y);b.gcd(a).compareTo(Y.ONE)==0?(s.n=s.p.multiply(s.q),s.d=a.modInverse(b),s.dmp1=s.d.mod(g),s.dmq1=s.d.mod(y),s.coeff=s.q.modInverse(s.p),setTimeout(function(){r()},0)):setTimeout(c,0)},f=function(){s.q=ee(),s.q.fromNumberAsync(o,1,i,function(){s.q.subtract(Y.ONE).gcda(a,function(d){d.compareTo(Y.ONE)==0&&s.q.isProbablePrime(10)?setTimeout(u,0):setTimeout(f,0)})})},p=function(){s.p=ee(),s.p.fromNumberAsync(n-o,1,i,function(){s.p.subtract(Y.ONE).gcda(a,function(d){d.compareTo(Y.ONE)==0&&s.p.isProbablePrime(10)?setTimeout(f,0):setTimeout(p,0)})})};setTimeout(p,0)};setTimeout(c,0)},e.prototype.sign=function(n,t,r){var i=ol(r),o=i+t(n).toString(),a=tl(o,this.n.bitLength()/4);if(a==null)return null;var s=this.doPrivate(a);if(s==null)return null;var c=s.toString(16);return(c.length&1)==0?c:"0"+c},e.prototype.verify=function(n,t,r){var i=ue(t,16),o=this.doPublic(i);if(o==null)return null;var a=o.toString(16).replace(/^1f+00/,""),s=al(a);return s==r(n).toString()},e}();function il(e,n){for(var t=e.toByteArray(),r=0;r<t.length&&t[r]==0;)++r;if(t.length-r!=n-1||t[r]!=2)return null;for(++r;t[r]!=0;)if(++r>=t.length)return null;for(var i="";++r<t.length;){var o=t[r]&255;o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((o&31)<<6|t[r+1]&63),++r):(i+=String.fromCharCode((o&15)<<12|(t[r+1]&63)<<6|t[r+2]&63),r+=2)}return i}var Ut={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function ol(e){return Ut[e]||""}function al(e){for(var n in Ut)if(Ut.hasOwnProperty(n)){var t=Ut[n],r=t.length;if(e.substr(0,r)==t)return e.substr(r)}return e}/*!
|
|
15
15
|
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
|
16
16
|
Code licensed under the BSD License:
|
|
17
17
|
http://developer.yahoo.com/yui/license.html
|
|
18
18
|
version: 2.9.0
|
|
19
|
-
*/var ce={};ce.lang={extend:function(e,n,t){if(!n||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=n.prototype,n.prototype.constructor==Object.prototype.constructor&&(n.prototype.constructor=n),t){var
|
|
19
|
+
*/var ce={};ce.lang={extend:function(e,n,t){if(!n||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=n.prototype,n.prototype.constructor==Object.prototype.constructor&&(n.prototype.constructor=n),t){var i;for(i in t)e.prototype[i]=t[i];var o=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(s,c){for(i=0;i<a.length;i=i+1){var u=a[i],f=c[u];typeof f=="function"&&f!=Object.prototype[u]&&(s[u]=f)}})}catch{}o(e.prototype,t)}}};/**
|
|
20
20
|
* @fileOverview
|
|
21
21
|
* @name asn1-1.0.js
|
|
22
22
|
* @author Kenji Urushima kenji.urushima@gmail.com
|
|
23
23
|
* @version asn1 1.0.13 (2017-Jun-02)
|
|
24
24
|
* @since jsrsasign 2.1
|
|
25
25
|
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
|
|
26
|
-
*/var I={};(typeof I.asn1>"u"||!I.asn1)&&(I.asn1={});I.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var n=e.toString(16);return n.length%2==1&&(n="0"+n),n},this.bigIntToMinTwosComplementsHex=function(e){var n=e.toString(16);if(n.substr(0,1)!="-")n.length%2==1?n="0"+n:n.match(/^[0-7]/)||(n="00"+n);else{var t=n.substr(1),r=t.length;r%2==1?r+=1:n.match(/^[0-7]/)||(r+=2);for(var o="",i=0;i<r;i++)o+="f";var a=new Y(o,16),s=a.xor(e).add(Y.ONE);n=s.toString(16).replace(/^-/,"")}return n},this.getPEMStringFromHex=function(e,n){return hextopem(e,n)},this.newObject=function(e){var n=I,t=n.asn1,r=t.DERBoolean,o=t.DERInteger,i=t.DERBitString,a=t.DEROctetString,s=t.DERNull,c=t.DERObjectIdentifier,u=t.DEREnumerated,f=t.DERUTF8String,p=t.DERNumericString,d=t.DERPrintableString,y=t.DERTeletexString,g=t.DERIA5String,b=t.DERUTCTime,v=t.DERGeneralizedTime,m=t.DERSequence,S=t.DERSet,A=t.DERTaggedObject,E=t.ASN1Util.newObject,C=Object.keys(e);if(C.length!=1)throw"key of param shall be only one.";var w=C[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":")==-1)throw"undefined key: "+w;if(w=="bool")return new r(e[w]);if(w=="int")return new o(e[w]);if(w=="bitstr")return new i(e[w]);if(w=="octstr")return new a(e[w]);if(w=="null")return new s(e[w]);if(w=="oid")return new c(e[w]);if(w=="enum")return new u(e[w]);if(w=="utf8str")return new f(e[w]);if(w=="numstr")return new p(e[w]);if(w=="prnstr")return new d(e[w]);if(w=="telstr")return new y(e[w]);if(w=="ia5str")return new g(e[w]);if(w=="utctime")return new b(e[w]);if(w=="gentime")return new v(e[w]);if(w=="seq"){for(var D=e[w],T=[],P=0;P<D.length;P++){var k=E(D[P]);T.push(k)}return new m({array:T})}if(w=="set"){for(var D=e[w],T=[],P=0;P<D.length;P++){var k=E(D[P]);T.push(k)}return new S({array:T})}if(w=="tag"){var x=e[w];if(Object.prototype.toString.call(x)==="[object Array]"&&x.length==3){var R=E(x[2]);return new A({tag:x[0],explicit:x[1],obj:R})}else{var O={};if(x.explicit!==void 0&&(O.explicit=x.explicit),x.tag!==void 0&&(O.tag=x.tag),x.obj===void 0)throw"obj shall be specified for 'tag'.";return O.obj=E(x.obj),new A(O)}}},this.jsonToASN1HEX=function(e){var n=this.newObject(e);return n.getEncodedHex()}};I.asn1.ASN1Util.oidHexToInt=function(e){for(var o="",n=parseInt(e.substr(0,2),16),t=Math.floor(n/40),r=n%40,o=t+"."+r,i="",a=2;a<e.length;a+=2){var s=parseInt(e.substr(a,2),16),c=("00000000"+s.toString(2)).slice(-8);if(i=i+c.substr(1,7),c.substr(0,1)=="0"){var u=new Y(i,2);o=o+"."+u.toString(10),i=""}}return o};I.asn1.ASN1Util.oidIntToHex=function(e){var n=function(s){var c=s.toString(16);return c.length==1&&(c="0"+c),c},t=function(s){var c="",u=new Y(s,10),f=u.toString(2),p=7-f.length%7;p==7&&(p=0);for(var d="",y=0;y<p;y++)d+="0";f=d+f;for(var y=0;y<f.length-1;y+=7){var g=f.substr(y,7);y!=f.length-7&&(g="1"+g),c+=n(parseInt(g,2))}return c};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",o=e.split("."),i=parseInt(o[0])*40+parseInt(o[1]);r+=n(i),o.splice(0,2);for(var a=0;a<o.length;a++)r+=t(o[a]);return r};I.asn1.ASN1Object=function(){var e="";this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+e.length+",v="+this.hV;var n=this.hV.length/2,t=n.toString(16);if(t.length%2==1&&(t="0"+t),n<128)return t;var r=t.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+n.toString(16);var o=128+r;return o.toString(16)+t},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}};I.asn1.DERAbstractString=function(e){I.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(n){this.hTLV=null,this.isModified=!0,this.s=n,this.hV=stohex(this.s)},this.setStringHex=function(n){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e=="string"?this.setString(e):typeof e.str<"u"?this.setString(e.str):typeof e.hex<"u"&&this.setStringHex(e.hex))};ce.lang.extend(I.asn1.DERAbstractString,I.asn1.ASN1Object);I.asn1.DERAbstractTime=function(e){I.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(n){utc=n.getTime()+n.getTimezoneOffset()*6e4;var t=new Date(utc);return t},this.formatDate=function(n,t,r){var o=this.zeroPadding,i=this.localDateToUTC(n),a=String(i.getFullYear());t=="utc"&&(a=a.substr(2,2));var s=o(String(i.getMonth()+1),2),c=o(String(i.getDate()),2),u=o(String(i.getHours()),2),f=o(String(i.getMinutes()),2),p=o(String(i.getSeconds()),2),d=a+s+c+u+f+p;if(r===!0){var y=i.getMilliseconds();if(y!=0){var g=o(String(y),3);g=g.replace(/[0]+$/,""),d=d+"."+g}}return d+"Z"},this.zeroPadding=function(n,t){return n.length>=t?n:new Array(t-n.length+1).join("0")+n},this.getString=function(){return this.s},this.setString=function(n){this.hTLV=null,this.isModified=!0,this.s=n,this.hV=stohex(n)},this.setByDateValue=function(n,t,r,o,i,a){var s=new Date(Date.UTC(n,t-1,r,o,i,a,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}};ce.lang.extend(I.asn1.DERAbstractTime,I.asn1.ASN1Object);I.asn1.DERAbstractStructured=function(e){I.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(n){this.hTLV=null,this.isModified=!0,this.asn1Array=n},this.appendASN1Object=function(n){this.hTLV=null,this.isModified=!0,this.asn1Array.push(n)},this.asn1Array=new Array,typeof e<"u"&&typeof e.array<"u"&&(this.asn1Array=e.array)};ce.lang.extend(I.asn1.DERAbstractStructured,I.asn1.ASN1Object);I.asn1.DERBoolean=function(){I.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"};ce.lang.extend(I.asn1.DERBoolean,I.asn1.ASN1Object);I.asn1.DERInteger=function(e){I.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(n){this.hTLV=null,this.isModified=!0,this.hV=I.asn1.ASN1Util.bigIntToMinTwosComplementsHex(n)},this.setByInteger=function(n){var t=new Y(String(n),10);this.setByBigInteger(t)},this.setValueHex=function(n){this.hV=n},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e.bigint<"u"?this.setByBigInteger(e.bigint):typeof e.int<"u"?this.setByInteger(e.int):typeof e=="number"?this.setByInteger(e):typeof e.hex<"u"&&this.setValueHex(e.hex))};ce.lang.extend(I.asn1.DERInteger,I.asn1.ASN1Object);I.asn1.DERBitString=function(e){if(e!==void 0&&typeof e.obj<"u"){var n=I.asn1.ASN1Util.newObject(e.obj);e.hex="00"+n.getEncodedHex()}I.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,r){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var o="0"+t;this.hTLV=null,this.isModified=!0,this.hV=o+r},this.setByBinaryString=function(t){t=t.replace(/0+$/,"");var r=8-t.length%8;r==8&&(r=0);for(var o=0;o<=r;o++)t+="0";for(var i="",o=0;o<t.length-1;o+=8){var a=t.substr(o,8),s=parseInt(a,2).toString(16);s.length==1&&(s="0"+s),i+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+r+i},this.setByBooleanArray=function(t){for(var r="",o=0;o<t.length;o++)t[o]==!0?r+="1":r+="0";this.setByBinaryString(r)},this.newFalseArray=function(t){for(var r=new Array(t),o=0;o<t;o++)r[o]=!1;return r},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e=="string"&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):typeof e.hex<"u"?this.setHexValueIncludingUnusedBits(e.hex):typeof e.bin<"u"?this.setByBinaryString(e.bin):typeof e.array<"u"&&this.setByBooleanArray(e.array))};ce.lang.extend(I.asn1.DERBitString,I.asn1.ASN1Object);I.asn1.DEROctetString=function(e){if(e!==void 0&&typeof e.obj<"u"){var n=I.asn1.ASN1Util.newObject(e.obj);e.hex=n.getEncodedHex()}I.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"};ce.lang.extend(I.asn1.DEROctetString,I.asn1.DERAbstractString);I.asn1.DERNull=function(){I.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"};ce.lang.extend(I.asn1.DERNull,I.asn1.ASN1Object);I.asn1.DERObjectIdentifier=function(e){var n=function(r){var o=r.toString(16);return o.length==1&&(o="0"+o),o},t=function(r){var o="",i=new Y(r,10),a=i.toString(2),s=7-a.length%7;s==7&&(s=0);for(var c="",u=0;u<s;u++)c+="0";a=c+a;for(var u=0;u<a.length-1;u+=7){var f=a.substr(u,7);u!=a.length-7&&(f="1"+f),o+=n(parseInt(f,2))}return o};I.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(r){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueOidString=function(r){if(!r.match(/^[0-9.]+$/))throw"malformed oid string: "+r;var o="",i=r.split("."),a=parseInt(i[0])*40+parseInt(i[1]);o+=n(a),i.splice(0,2);for(var s=0;s<i.length;s++)o+=t(i[s]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=o},this.setValueName=function(r){var o=I.asn1.x509.OID.name2oid(r);if(o!=="")this.setValueOidString(o);else throw"DERObjectIdentifier oidName undefined: "+r},this.getFreshValueHex=function(){return this.hV},e!==void 0&&(typeof e=="string"?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):e.oid!==void 0?this.setValueOidString(e.oid):e.hex!==void 0?this.setValueHex(e.hex):e.name!==void 0&&this.setValueName(e.name))};ce.lang.extend(I.asn1.DERObjectIdentifier,I.asn1.ASN1Object);I.asn1.DEREnumerated=function(e){I.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(n){this.hTLV=null,this.isModified=!0,this.hV=I.asn1.ASN1Util.bigIntToMinTwosComplementsHex(n)},this.setByInteger=function(n){var t=new Y(String(n),10);this.setByBigInteger(t)},this.setValueHex=function(n){this.hV=n},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e.int<"u"?this.setByInteger(e.int):typeof e=="number"?this.setByInteger(e):typeof e.hex<"u"&&this.setValueHex(e.hex))};ce.lang.extend(I.asn1.DEREnumerated,I.asn1.ASN1Object);I.asn1.DERUTF8String=function(e){I.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"};ce.lang.extend(I.asn1.DERUTF8String,I.asn1.DERAbstractString);I.asn1.DERNumericString=function(e){I.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"};ce.lang.extend(I.asn1.DERNumericString,I.asn1.DERAbstractString);I.asn1.DERPrintableString=function(e){I.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"};ce.lang.extend(I.asn1.DERPrintableString,I.asn1.DERAbstractString);I.asn1.DERTeletexString=function(e){I.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"};ce.lang.extend(I.asn1.DERTeletexString,I.asn1.DERAbstractString);I.asn1.DERIA5String=function(e){I.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"};ce.lang.extend(I.asn1.DERIA5String,I.asn1.DERAbstractString);I.asn1.DERUTCTime=function(e){I.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(n){this.hTLV=null,this.isModified=!0,this.date=n,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return typeof this.date>"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},e!==void 0&&(e.str!==void 0?this.setString(e.str):typeof e=="string"&&e.match(/^[0-9]{12}Z$/)?this.setString(e):e.hex!==void 0?this.setStringHex(e.hex):e.date!==void 0&&this.setByDate(e.date))};ce.lang.extend(I.asn1.DERUTCTime,I.asn1.DERAbstractTime);I.asn1.DERGeneralizedTime=function(e){I.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(n){this.hTLV=null,this.isModified=!0,this.date=n,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},e!==void 0&&(e.str!==void 0?this.setString(e.str):typeof e=="string"&&e.match(/^[0-9]{14}Z$/)?this.setString(e):e.hex!==void 0?this.setStringHex(e.hex):e.date!==void 0&&this.setByDate(e.date),e.millis===!0&&(this.withMillis=!0))};ce.lang.extend(I.asn1.DERGeneralizedTime,I.asn1.DERAbstractTime);I.asn1.DERSequence=function(e){I.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var n="",t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];n+=r.getEncodedHex()}return this.hV=n,this.hV}};ce.lang.extend(I.asn1.DERSequence,I.asn1.DERAbstractStructured);I.asn1.DERSet=function(e){I.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var n=new Array,t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];n.push(r.getEncodedHex())}return this.sortFlag==!0&&n.sort(),this.hV=n.join(""),this.hV},typeof e<"u"&&typeof e.sortflag<"u"&&e.sortflag==!1&&(this.sortFlag=!1)};ce.lang.extend(I.asn1.DERSet,I.asn1.DERAbstractStructured);I.asn1.DERTaggedObject=function(e){I.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(n,t,r){this.hT=t,this.isExplicit=n,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e.tag<"u"&&(this.hT=e.tag),typeof e.explicit<"u"&&(this.isExplicit=e.explicit),typeof e.obj<"u"&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))};ce.lang.extend(I.asn1.DERTaggedObject,I.asn1.ASN1Object);var sl=function(){var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),jr=function(e){sl(n,e);function n(t){var r=e.call(this)||this;return t&&(typeof t=="string"?r.parseKey(t):(n.hasPrivateKeyProperty(t)||n.hasPublicKeyProperty(t))&&r.parsePropertiesFrom(t)),r}return n.prototype.parseKey=function(t){try{var r=0,o=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,a=i.test(t)?Us.decode(t):xn.unarmor(t),s=Ws.decode(a);if(s.sub.length===3&&(s=s.sub[2].sub[0]),s.sub.length===9){r=s.sub[1].getHexStringValue(),this.n=ue(r,16),o=s.sub[2].getHexStringValue(),this.e=parseInt(o,16);var c=s.sub[3].getHexStringValue();this.d=ue(c,16);var u=s.sub[4].getHexStringValue();this.p=ue(u,16);var f=s.sub[5].getHexStringValue();this.q=ue(f,16);var p=s.sub[6].getHexStringValue();this.dmp1=ue(p,16);var d=s.sub[7].getHexStringValue();this.dmq1=ue(d,16);var y=s.sub[8].getHexStringValue();this.coeff=ue(y,16)}else if(s.sub.length===2)if(s.sub[0].sub){var g=s.sub[1],b=g.sub[0];r=b.sub[0].getHexStringValue(),this.n=ue(r,16),o=b.sub[1].getHexStringValue(),this.e=parseInt(o,16)}else r=s.sub[0].getHexStringValue(),this.n=ue(r,16),o=s.sub[1].getHexStringValue(),this.e=parseInt(o,16);else return!1;return!0}catch{return!1}},n.prototype.getPrivateBaseKey=function(){var t={array:[new I.asn1.DERInteger({int:0}),new I.asn1.DERInteger({bigint:this.n}),new I.asn1.DERInteger({int:this.e}),new I.asn1.DERInteger({bigint:this.d}),new I.asn1.DERInteger({bigint:this.p}),new I.asn1.DERInteger({bigint:this.q}),new I.asn1.DERInteger({bigint:this.dmp1}),new I.asn1.DERInteger({bigint:this.dmq1}),new I.asn1.DERInteger({bigint:this.coeff})]},r=new I.asn1.DERSequence(t);return r.getEncodedHex()},n.prototype.getPrivateBaseKeyB64=function(){return Gt(this.getPrivateBaseKey())},n.prototype.getPublicBaseKey=function(){var t=new I.asn1.DERSequence({array:[new I.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new I.asn1.DERNull]}),r=new I.asn1.DERSequence({array:[new I.asn1.DERInteger({bigint:this.n}),new I.asn1.DERInteger({int:this.e})]}),o=new I.asn1.DERBitString({hex:"00"+r.getEncodedHex()}),i=new I.asn1.DERSequence({array:[t,o]});return i.getEncodedHex()},n.prototype.getPublicBaseKeyB64=function(){return Gt(this.getPublicBaseKey())},n.wordwrap=function(t,r){if(r=r||64,!t)return t;var o="(.{1,"+r+`})( +|$
|
|
27
|
-
?)|(.{1,`+r+"})";return t.match(RegExp(
|
|
26
|
+
*/var I={};(typeof I.asn1>"u"||!I.asn1)&&(I.asn1={});I.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var n=e.toString(16);return n.length%2==1&&(n="0"+n),n},this.bigIntToMinTwosComplementsHex=function(e){var n=e.toString(16);if(n.substr(0,1)!="-")n.length%2==1?n="0"+n:n.match(/^[0-7]/)||(n="00"+n);else{var t=n.substr(1),r=t.length;r%2==1?r+=1:n.match(/^[0-7]/)||(r+=2);for(var i="",o=0;o<r;o++)i+="f";var a=new Y(i,16),s=a.xor(e).add(Y.ONE);n=s.toString(16).replace(/^-/,"")}return n},this.getPEMStringFromHex=function(e,n){return hextopem(e,n)},this.newObject=function(e){var n=I,t=n.asn1,r=t.DERBoolean,i=t.DERInteger,o=t.DERBitString,a=t.DEROctetString,s=t.DERNull,c=t.DERObjectIdentifier,u=t.DEREnumerated,f=t.DERUTF8String,p=t.DERNumericString,d=t.DERPrintableString,g=t.DERTeletexString,y=t.DERIA5String,b=t.DERUTCTime,v=t.DERGeneralizedTime,m=t.DERSequence,S=t.DERSet,A=t.DERTaggedObject,E=t.ASN1Util.newObject,C=Object.keys(e);if(C.length!=1)throw"key of param shall be only one.";var w=C[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":")==-1)throw"undefined key: "+w;if(w=="bool")return new r(e[w]);if(w=="int")return new i(e[w]);if(w=="bitstr")return new o(e[w]);if(w=="octstr")return new a(e[w]);if(w=="null")return new s(e[w]);if(w=="oid")return new c(e[w]);if(w=="enum")return new u(e[w]);if(w=="utf8str")return new f(e[w]);if(w=="numstr")return new p(e[w]);if(w=="prnstr")return new d(e[w]);if(w=="telstr")return new g(e[w]);if(w=="ia5str")return new y(e[w]);if(w=="utctime")return new b(e[w]);if(w=="gentime")return new v(e[w]);if(w=="seq"){for(var k=e[w],T=[],P=0;P<k.length;P++){var D=E(k[P]);T.push(D)}return new m({array:T})}if(w=="set"){for(var k=e[w],T=[],P=0;P<k.length;P++){var D=E(k[P]);T.push(D)}return new S({array:T})}if(w=="tag"){var x=e[w];if(Object.prototype.toString.call(x)==="[object Array]"&&x.length==3){var R=E(x[2]);return new A({tag:x[0],explicit:x[1],obj:R})}else{var O={};if(x.explicit!==void 0&&(O.explicit=x.explicit),x.tag!==void 0&&(O.tag=x.tag),x.obj===void 0)throw"obj shall be specified for 'tag'.";return O.obj=E(x.obj),new A(O)}}},this.jsonToASN1HEX=function(e){var n=this.newObject(e);return n.getEncodedHex()}};I.asn1.ASN1Util.oidHexToInt=function(e){for(var i="",n=parseInt(e.substr(0,2),16),t=Math.floor(n/40),r=n%40,i=t+"."+r,o="",a=2;a<e.length;a+=2){var s=parseInt(e.substr(a,2),16),c=("00000000"+s.toString(2)).slice(-8);if(o=o+c.substr(1,7),c.substr(0,1)=="0"){var u=new Y(o,2);i=i+"."+u.toString(10),o=""}}return i};I.asn1.ASN1Util.oidIntToHex=function(e){var n=function(s){var c=s.toString(16);return c.length==1&&(c="0"+c),c},t=function(s){var c="",u=new Y(s,10),f=u.toString(2),p=7-f.length%7;p==7&&(p=0);for(var d="",g=0;g<p;g++)d+="0";f=d+f;for(var g=0;g<f.length-1;g+=7){var y=f.substr(g,7);g!=f.length-7&&(y="1"+y),c+=n(parseInt(y,2))}return c};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",i=e.split("."),o=parseInt(i[0])*40+parseInt(i[1]);r+=n(o),i.splice(0,2);for(var a=0;a<i.length;a++)r+=t(i[a]);return r};I.asn1.ASN1Object=function(){var e="";this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+e.length+",v="+this.hV;var n=this.hV.length/2,t=n.toString(16);if(t.length%2==1&&(t="0"+t),n<128)return t;var r=t.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+n.toString(16);var i=128+r;return i.toString(16)+t},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}};I.asn1.DERAbstractString=function(e){I.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(n){this.hTLV=null,this.isModified=!0,this.s=n,this.hV=stohex(this.s)},this.setStringHex=function(n){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e=="string"?this.setString(e):typeof e.str<"u"?this.setString(e.str):typeof e.hex<"u"&&this.setStringHex(e.hex))};ce.lang.extend(I.asn1.DERAbstractString,I.asn1.ASN1Object);I.asn1.DERAbstractTime=function(e){I.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(n){utc=n.getTime()+n.getTimezoneOffset()*6e4;var t=new Date(utc);return t},this.formatDate=function(n,t,r){var i=this.zeroPadding,o=this.localDateToUTC(n),a=String(o.getFullYear());t=="utc"&&(a=a.substr(2,2));var s=i(String(o.getMonth()+1),2),c=i(String(o.getDate()),2),u=i(String(o.getHours()),2),f=i(String(o.getMinutes()),2),p=i(String(o.getSeconds()),2),d=a+s+c+u+f+p;if(r===!0){var g=o.getMilliseconds();if(g!=0){var y=i(String(g),3);y=y.replace(/[0]+$/,""),d=d+"."+y}}return d+"Z"},this.zeroPadding=function(n,t){return n.length>=t?n:new Array(t-n.length+1).join("0")+n},this.getString=function(){return this.s},this.setString=function(n){this.hTLV=null,this.isModified=!0,this.s=n,this.hV=stohex(n)},this.setByDateValue=function(n,t,r,i,o,a){var s=new Date(Date.UTC(n,t-1,r,i,o,a,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}};ce.lang.extend(I.asn1.DERAbstractTime,I.asn1.ASN1Object);I.asn1.DERAbstractStructured=function(e){I.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(n){this.hTLV=null,this.isModified=!0,this.asn1Array=n},this.appendASN1Object=function(n){this.hTLV=null,this.isModified=!0,this.asn1Array.push(n)},this.asn1Array=new Array,typeof e<"u"&&typeof e.array<"u"&&(this.asn1Array=e.array)};ce.lang.extend(I.asn1.DERAbstractStructured,I.asn1.ASN1Object);I.asn1.DERBoolean=function(){I.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"};ce.lang.extend(I.asn1.DERBoolean,I.asn1.ASN1Object);I.asn1.DERInteger=function(e){I.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(n){this.hTLV=null,this.isModified=!0,this.hV=I.asn1.ASN1Util.bigIntToMinTwosComplementsHex(n)},this.setByInteger=function(n){var t=new Y(String(n),10);this.setByBigInteger(t)},this.setValueHex=function(n){this.hV=n},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e.bigint<"u"?this.setByBigInteger(e.bigint):typeof e.int<"u"?this.setByInteger(e.int):typeof e=="number"?this.setByInteger(e):typeof e.hex<"u"&&this.setValueHex(e.hex))};ce.lang.extend(I.asn1.DERInteger,I.asn1.ASN1Object);I.asn1.DERBitString=function(e){if(e!==void 0&&typeof e.obj<"u"){var n=I.asn1.ASN1Util.newObject(e.obj);e.hex="00"+n.getEncodedHex()}I.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,r){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var i="0"+t;this.hTLV=null,this.isModified=!0,this.hV=i+r},this.setByBinaryString=function(t){t=t.replace(/0+$/,"");var r=8-t.length%8;r==8&&(r=0);for(var i=0;i<=r;i++)t+="0";for(var o="",i=0;i<t.length-1;i+=8){var a=t.substr(i,8),s=parseInt(a,2).toString(16);s.length==1&&(s="0"+s),o+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+r+o},this.setByBooleanArray=function(t){for(var r="",i=0;i<t.length;i++)t[i]==!0?r+="1":r+="0";this.setByBinaryString(r)},this.newFalseArray=function(t){for(var r=new Array(t),i=0;i<t;i++)r[i]=!1;return r},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e=="string"&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):typeof e.hex<"u"?this.setHexValueIncludingUnusedBits(e.hex):typeof e.bin<"u"?this.setByBinaryString(e.bin):typeof e.array<"u"&&this.setByBooleanArray(e.array))};ce.lang.extend(I.asn1.DERBitString,I.asn1.ASN1Object);I.asn1.DEROctetString=function(e){if(e!==void 0&&typeof e.obj<"u"){var n=I.asn1.ASN1Util.newObject(e.obj);e.hex=n.getEncodedHex()}I.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"};ce.lang.extend(I.asn1.DEROctetString,I.asn1.DERAbstractString);I.asn1.DERNull=function(){I.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"};ce.lang.extend(I.asn1.DERNull,I.asn1.ASN1Object);I.asn1.DERObjectIdentifier=function(e){var n=function(r){var i=r.toString(16);return i.length==1&&(i="0"+i),i},t=function(r){var i="",o=new Y(r,10),a=o.toString(2),s=7-a.length%7;s==7&&(s=0);for(var c="",u=0;u<s;u++)c+="0";a=c+a;for(var u=0;u<a.length-1;u+=7){var f=a.substr(u,7);u!=a.length-7&&(f="1"+f),i+=n(parseInt(f,2))}return i};I.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(r){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueOidString=function(r){if(!r.match(/^[0-9.]+$/))throw"malformed oid string: "+r;var i="",o=r.split("."),a=parseInt(o[0])*40+parseInt(o[1]);i+=n(a),o.splice(0,2);for(var s=0;s<o.length;s++)i+=t(o[s]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(r){var i=I.asn1.x509.OID.name2oid(r);if(i!=="")this.setValueOidString(i);else throw"DERObjectIdentifier oidName undefined: "+r},this.getFreshValueHex=function(){return this.hV},e!==void 0&&(typeof e=="string"?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):e.oid!==void 0?this.setValueOidString(e.oid):e.hex!==void 0?this.setValueHex(e.hex):e.name!==void 0&&this.setValueName(e.name))};ce.lang.extend(I.asn1.DERObjectIdentifier,I.asn1.ASN1Object);I.asn1.DEREnumerated=function(e){I.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(n){this.hTLV=null,this.isModified=!0,this.hV=I.asn1.ASN1Util.bigIntToMinTwosComplementsHex(n)},this.setByInteger=function(n){var t=new Y(String(n),10);this.setByBigInteger(t)},this.setValueHex=function(n){this.hV=n},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e.int<"u"?this.setByInteger(e.int):typeof e=="number"?this.setByInteger(e):typeof e.hex<"u"&&this.setValueHex(e.hex))};ce.lang.extend(I.asn1.DEREnumerated,I.asn1.ASN1Object);I.asn1.DERUTF8String=function(e){I.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"};ce.lang.extend(I.asn1.DERUTF8String,I.asn1.DERAbstractString);I.asn1.DERNumericString=function(e){I.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"};ce.lang.extend(I.asn1.DERNumericString,I.asn1.DERAbstractString);I.asn1.DERPrintableString=function(e){I.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"};ce.lang.extend(I.asn1.DERPrintableString,I.asn1.DERAbstractString);I.asn1.DERTeletexString=function(e){I.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"};ce.lang.extend(I.asn1.DERTeletexString,I.asn1.DERAbstractString);I.asn1.DERIA5String=function(e){I.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"};ce.lang.extend(I.asn1.DERIA5String,I.asn1.DERAbstractString);I.asn1.DERUTCTime=function(e){I.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(n){this.hTLV=null,this.isModified=!0,this.date=n,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return typeof this.date>"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},e!==void 0&&(e.str!==void 0?this.setString(e.str):typeof e=="string"&&e.match(/^[0-9]{12}Z$/)?this.setString(e):e.hex!==void 0?this.setStringHex(e.hex):e.date!==void 0&&this.setByDate(e.date))};ce.lang.extend(I.asn1.DERUTCTime,I.asn1.DERAbstractTime);I.asn1.DERGeneralizedTime=function(e){I.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(n){this.hTLV=null,this.isModified=!0,this.date=n,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},e!==void 0&&(e.str!==void 0?this.setString(e.str):typeof e=="string"&&e.match(/^[0-9]{14}Z$/)?this.setString(e):e.hex!==void 0?this.setStringHex(e.hex):e.date!==void 0&&this.setByDate(e.date),e.millis===!0&&(this.withMillis=!0))};ce.lang.extend(I.asn1.DERGeneralizedTime,I.asn1.DERAbstractTime);I.asn1.DERSequence=function(e){I.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var n="",t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];n+=r.getEncodedHex()}return this.hV=n,this.hV}};ce.lang.extend(I.asn1.DERSequence,I.asn1.DERAbstractStructured);I.asn1.DERSet=function(e){I.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var n=new Array,t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];n.push(r.getEncodedHex())}return this.sortFlag==!0&&n.sort(),this.hV=n.join(""),this.hV},typeof e<"u"&&typeof e.sortflag<"u"&&e.sortflag==!1&&(this.sortFlag=!1)};ce.lang.extend(I.asn1.DERSet,I.asn1.DERAbstractStructured);I.asn1.DERTaggedObject=function(e){I.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(n,t,r){this.hT=t,this.isExplicit=n,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e.tag<"u"&&(this.hT=e.tag),typeof e.explicit<"u"&&(this.isExplicit=e.explicit),typeof e.obj<"u"&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))};ce.lang.extend(I.asn1.DERTaggedObject,I.asn1.ASN1Object);var sl=function(){var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Wr=function(e){sl(n,e);function n(t){var r=e.call(this)||this;return t&&(typeof t=="string"?r.parseKey(t):(n.hasPrivateKeyProperty(t)||n.hasPublicKeyProperty(t))&&r.parsePropertiesFrom(t)),r}return n.prototype.parseKey=function(t){try{var r=0,i=0,o=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,a=o.test(t)?Us.decode(t):xn.unarmor(t),s=Ws.decode(a);if(s.sub.length===3&&(s=s.sub[2].sub[0]),s.sub.length===9){r=s.sub[1].getHexStringValue(),this.n=ue(r,16),i=s.sub[2].getHexStringValue(),this.e=parseInt(i,16);var c=s.sub[3].getHexStringValue();this.d=ue(c,16);var u=s.sub[4].getHexStringValue();this.p=ue(u,16);var f=s.sub[5].getHexStringValue();this.q=ue(f,16);var p=s.sub[6].getHexStringValue();this.dmp1=ue(p,16);var d=s.sub[7].getHexStringValue();this.dmq1=ue(d,16);var g=s.sub[8].getHexStringValue();this.coeff=ue(g,16)}else if(s.sub.length===2)if(s.sub[0].sub){var y=s.sub[1],b=y.sub[0];r=b.sub[0].getHexStringValue(),this.n=ue(r,16),i=b.sub[1].getHexStringValue(),this.e=parseInt(i,16)}else r=s.sub[0].getHexStringValue(),this.n=ue(r,16),i=s.sub[1].getHexStringValue(),this.e=parseInt(i,16);else return!1;return!0}catch{return!1}},n.prototype.getPrivateBaseKey=function(){var t={array:[new I.asn1.DERInteger({int:0}),new I.asn1.DERInteger({bigint:this.n}),new I.asn1.DERInteger({int:this.e}),new I.asn1.DERInteger({bigint:this.d}),new I.asn1.DERInteger({bigint:this.p}),new I.asn1.DERInteger({bigint:this.q}),new I.asn1.DERInteger({bigint:this.dmp1}),new I.asn1.DERInteger({bigint:this.dmq1}),new I.asn1.DERInteger({bigint:this.coeff})]},r=new I.asn1.DERSequence(t);return r.getEncodedHex()},n.prototype.getPrivateBaseKeyB64=function(){return Gt(this.getPrivateBaseKey())},n.prototype.getPublicBaseKey=function(){var t=new I.asn1.DERSequence({array:[new I.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new I.asn1.DERNull]}),r=new I.asn1.DERSequence({array:[new I.asn1.DERInteger({bigint:this.n}),new I.asn1.DERInteger({int:this.e})]}),i=new I.asn1.DERBitString({hex:"00"+r.getEncodedHex()}),o=new I.asn1.DERSequence({array:[t,i]});return o.getEncodedHex()},n.prototype.getPublicBaseKeyB64=function(){return Gt(this.getPublicBaseKey())},n.wordwrap=function(t,r){if(r=r||64,!t)return t;var i="(.{1,"+r+`})( +|$
|
|
27
|
+
?)|(.{1,`+r+"})";return t.match(RegExp(i,"g")).join(`
|
|
28
28
|
`)},n.prototype.getPrivateKey=function(){var t=`-----BEGIN RSA PRIVATE KEY-----
|
|
29
29
|
`;return t+=n.wordwrap(this.getPrivateBaseKeyB64())+`
|
|
30
30
|
`,t+="-----END RSA PRIVATE KEY-----",t},n.prototype.getPublicKey=function(){var t=`-----BEGIN PUBLIC KEY-----
|
|
31
31
|
`;return t+=n.wordwrap(this.getPublicBaseKeyB64())+`
|
|
32
|
-
`,t+="-----END PUBLIC KEY-----",t},n.hasPublicKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")},n.hasPrivateKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},n.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},n}(rl),bn,ll=typeof process<"u"?(bn=process.env)===null||bn===void 0?void 0:bn.npm_package_version:void 0,un=function(){function e(n){n===void 0&&(n={}),n=n||{},this.default_key_size=n.default_key_size?parseInt(n.default_key_size,10):1024,this.default_public_exponent=n.default_public_exponent||"010001",this.log=n.log||!1,this.key=null}return e.prototype.setKey=function(n){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new jr(n)},e.prototype.setPrivateKey=function(n){this.setKey(n)},e.prototype.setPublicKey=function(n){this.setKey(n)},e.prototype.decrypt=function(n){try{return this.getKey().decrypt(Lr(n))}catch{return!1}},e.prototype.encrypt=function(n){try{return Gt(this.getKey().encrypt(n))}catch{return!1}},e.prototype.sign=function(n,t,r){try{return Gt(this.getKey().sign(n,t,r))}catch{return!1}},e.prototype.verify=function(n,t,r){try{return this.getKey().verify(n,Lr(t),r)}catch{return!1}},e.prototype.getKey=function(n){if(!this.key){if(this.key=new jr,n&&{}.toString.call(n)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,n);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=ll,e}();function ul(){const e=new un({default_key_size:"2048"});return{publicKey:e.getPublicKey(),privateKey:e.getPrivateKey()}}function bt(e,n){const t=new un;return t.setPublicKey(n),t.encrypt(e)||""}function tr(e,n){const t=new un;return t.setPrivateKey(n),t.decrypt(e)||""}function qr(){return typeof new un().encrypt=="function"}const Qo=h.useLoginState(h.pinia),{superAdminInfo:cl,cryptoInfo:Se,loginUserInfo:Sn}=h.storeToRefs(Qo),fl=Ct(h.pinia),{activeMenuPath:Tt}=h.storeToRefs(fl),Mn=gt(h.pinia),ht="123456",hl=qn(h.pinia),{routerPageStructures:pl}=h.storeToRefs(hl),nr=l.ref(0),dl=l.ref([{label:"用户名称",value:"",name:"userName"}]),it=l.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),gl=e=>{console.log("handleQueryChange",e)},Yt=l.ref([]),ei=l.ref(""),Zt=l.computed(()=>{var n,t,r,o,i;const e=(n=pl.value)==null?void 0:n.find(a=>{var s;return((s=a==null?void 0:a.comp)==null?void 0:s.toUpperCase())==="TABLE"});return e?(ei.value=e.name,Yt.value=(o=(r=(t=e==null?void 0:e.compData)==null?void 0:t.find(s=>(s==null?void 0:s.key)==="header"))==null?void 0:r.contents)==null?void 0:o.filter(s=>(s==null?void 0:s.label)!=="操作"),(i=e==null?void 0:e.compData)==null?void 0:i.map(s=>{var c;if((s==null?void 0:s.key)==="rowButton"){const u=[...s==null?void 0:s.contents,{label:"重置密码"}];return{...s,contents:u}}return(s==null?void 0:s.key)==="header"?{...s,contents:(c=s==null?void 0:s.contents)==null?void 0:c.map(u=>{var f,p,d,y;return{...u,isTableColHidden:((f=u==null?void 0:u.prop)==null?void 0:f.includes("头像"))||((p=u==null?void 0:u.prop)==null?void 0:p.includes("签名")),isFormColHidden:((d=u==null?void 0:u.prop)==null?void 0:d.includes("头像"))||((y=u==null?void 0:u.prop)==null?void 0:y.includes("签名"))}})}:s})):[]}),yl=e=>{Mn.setRefreshCurStructure(!1),cn(e.singleContent,e.buttonName,nr.value,e==null?void 0:e.selectItems)},Rn=l.ref(),vl=e=>{console.log("onDoubleClick",e)},ml=(e,n)=>{e==="重置密码"&&Po.confirm(`该操作将会重置【${(n==null?void 0:n.account)||(n==null?void 0:n.账号)}】的密码为【${ht}】,确认重置?`,"警告",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{Rn.value={...n,password:ht},cn(Rn.value,e,nr.value)}).catch(()=>{h.ElMessage.info("取消重置")})},bl=()=>{Jt(Tt.value).then(e=>{var t;const n=Array.isArray(e)&&(e==null?void 0:e.filter(r=>(r==null?void 0:r.account)!==cl.value.account));Zt.value=(t=Zt.value)==null?void 0:t.map(r=>r.key==="tableContents"?{...r,contents:n==null?void 0:n.map(o=>{var i;return{...o,password:tr(o==null?void 0:o.password,(i=Se==null?void 0:Se.value)==null?void 0:i.privateKey)}})}:r)})},pt=async(e,n,t)=>{var r,o;try{const i=await e(n);return((r=i==null?void 0:i.data)==null?void 0:r.code)===200?(t!=="查询"&&await Qo.setLogRecordAsync({type:t,data:n},Tt.value),h.ElMessage.success("保存成功"),Mn.setRefreshCurStructure(!0),i.data.result||((o=i==null?void 0:i.data)==null?void 0:o.code)===200):null}catch(i){h.ElMessage.error(i)}finally{Mn.setCacheUpdatingData(null)}},Sl=async(e,n)=>{var i,a;let t=[];Array.isArray(e)?t=h.cloneDeep(e):t=[h.cloneDeep(e)];const r=(i=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="string"))==null?void 0:i.map(s=>{var u,f,p,d,y,g,b;const c=At(s,Yt.value);return qr()&&c&&(!c.password&&it.value?c.password=bt(ht,(u=Se==null?void 0:Se.value)==null?void 0:u.publicKey):c.password&&it.value&&(c.password=bt(c==null?void 0:c.password,(f=Se==null?void 0:Se.value)==null?void 0:f.publicKey))),{key:{type:"data",layer:s==null?void 0:s.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(p=Tt.value)!=null&&p.startsWith("/")?(d=Tt.value)==null?void 0:d.substring(1):Tt.value,tableId:n,createUserId:(y=Sn.value)==null?void 0:y.id,createUserOrg:((g=Sn.value)==null?void 0:g.dept)||((b=Sn.value)==null?void 0:b.部门名称)},value:{tableData:c}}}),o=(a=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="number"))==null?void 0:a.map(s=>{var u,f;const c=At(s,Yt.value);return qr()&&c&&(!c.password&&it.value?c.password=bt(ht,(u=Se==null?void 0:Se.value)==null?void 0:u.publicKey):c.password&&it.value&&(c.password=bt(c==null?void 0:c.password,(f=Se==null?void 0:Se.value)==null?void 0:f.publicKey))),{id:s==null?void 0:s.id,value:{tableData:c}}});r.length>0&&await pt(h.batchAddInsofDataApi,{dataList:r},"新增"),o.length>0&&(await pt(h.batchUpdateInsofDataApi,{dataList:o},"编辑"),Ge.show=!1)},cn=async(e,n,t,r)=>{if(!(n!=null&&n.includes("删除")))await Sl(e,t);else{let o=[];n!=null&&n.includes("批量")?o=r&&(r==null?void 0:r.length)>0?r==null?void 0:r.map(i=>i==null?void 0:i.id):[]:o=[e==null?void 0:e.id],await pt(h.batchDeleteInsofDataApi,{ids:o},"编辑")}},Jt=async e=>{const n=await pt(h.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),t=n==null?void 0:n.map(r=>{var o,i;return{id:r.id,layer:(o=r.key)==null?void 0:o.layer,tableData:(i=r==null?void 0:r.value)==null?void 0:i.tableData}});return t==null?void 0:t.map(r=>{var o;if(!Array.isArray(r==null?void 0:r.tableData))return{...r.tableData,layer:(o=r.key)==null?void 0:o.layer,id:r.id}})},El={comp:"Group",name:"/系统管理/用户管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:Zt.value,name:""}]}]},Tl=Object.freeze(Object.defineProperty({__proto__:null,changedRow:Rn,clickRowButton:ml,columns:Yt,compName:ei,getPageDataAsync:Jt,handleItemDataChange:yl,handleQueryChange:gl,handleSubmitAsync:pt,loginUserIsSuper:it,onDoubleClick:vl,pageData:Zt,queryFormData:dl,refreshUserTableData:bl,resetPassword:ht,structureId:nr,submitTableAsyncByVerify:cn,tempUserPageData:El},Symbol.toStringTag,{value:"Module"})),It=h.defineStore("originalState",{state:()=>({originalPath:"^"}),actions:{}}),wl=gt(h.pinia),{routeToChildPath:Wr}=h.storeToRefs(wl),kl=h.useLoginState(h.pinia),{loginUserInfo:Xt,cryptoInfo:En}=h.storeToRefs(kl),Dl=It(h.pinia),{originalPath:Gr}=h.storeToRefs(Dl),Al=e=>{var n,t,r;return((t=(n=Xt.value)==null?void 0:n.layer)==null?void 0:t.toUpperCase())==="SUPERADMIN"?!0:((r=Xt.value)==null?void 0:r.account)===(e==null?void 0:e.account)},Cl=async(e,n,t)=>{const r=Jt("/系统管理/角色管理"),o=Jt("/系统管理/部门管理");return await Promise.all([r,o]).then(a=>{var u,f;const s=(u=a==null?void 0:a[0])==null?void 0:u.map(p=>({label:p==null?void 0:p.roleName,value:p==null?void 0:p.roleName})),c=(f=a==null?void 0:a[1])==null?void 0:f.map(p=>({label:p==null?void 0:p.deptName,value:p==null?void 0:p.deptName}));return e==null?void 0:e.map(p=>{var d;return{...p,compData:(d=p==null?void 0:p.compData)==null?void 0:d.map(y=>{var g,b;return(y==null?void 0:y.key)==="header"?{...y,contents:(g=y==null?void 0:y.contents)==null?void 0:g.map(v=>v.prop==="userDept"?{...v,options:c}:v.prop==="userRoles"?{...v,options:s}:v)}:(y==null?void 0:y.key)==="tableContents"?{...y,contents:(b=y==null?void 0:y.contents)==null?void 0:b.map(v=>{var m;return{...v,password:Al(v)?tr(v==null?void 0:v.password,(m=En==null?void 0:En.value)==null?void 0:m.privateKey):v==null?void 0:v.password}})}:y})}})})},Il=async(e,n)=>{const t=sessionStorage.getItem("authority"),r=JSON.parse(t||"");if(Array.isArray(r)){let o;Wr.value?o=Array.isArray(r)&&(r==null?void 0:r.filter(s=>(s==null?void 0:s.includes(e))||(s==null?void 0:s.includes(Wr.value)))):o=Array.isArray(r)&&(r==null?void 0:r.filter(s=>s==null?void 0:s.includes(e)));const i=o==null?void 0:o.map(s=>{var c;return((c=s==null?void 0:s.split("/"))==null?void 0:c.pop())||""});return n==null?void 0:n.map(s=>{var c;return{...s,compData:(c=s==null?void 0:s.compData)==null?void 0:c.map(u=>{var f;return(u==null?void 0:u.key)==="rowButton"||(u==null?void 0:u.key)==="extraButton"?{...u,contents:(f=u==null?void 0:u.contents)==null?void 0:f.filter(p=>i==null?void 0:i.includes(p==null?void 0:p.label))}:u})}})}else return typeof r=="string"&&(r==null?void 0:r.toUpperCase())==="SUPERADMIN"?e==="/系统管理/用户管理"?await Cl(n):n:[]},xl=(e,n)=>{var i,a,s,c;const t=(a=(i=n["系统管理/角色管理"])==null?void 0:i.filter(u=>{var f;return((f=u==null?void 0:u.key)==null?void 0:f.type)==="data"}))==null?void 0:a.map(u=>u.value.tableData),r=(c=(s=e==null?void 0:e.value)==null?void 0:s.tableData)==null?void 0:c.角色名称,o=t==null?void 0:t.find(u=>(u==null?void 0:u.角色名称)===r);return o==null?void 0:o.数据范围};var jt=(e=>(e[e.全部数据权限=0]="全部数据权限",e[e.本部门数据权限=1]="本部门数据权限",e[e.本部门及以下数据权限=2]="本部门及以下数据权限",e[e.仅本人数据权限=3]="仅本人数据权限",e[e.自定义数据权限=4]="自定义数据权限",e))(jt||{});const ti=(e,n,t)=>{var a,s,c,u;if(((c=(s=(a=Xt.value)==null?void 0:a.key)==null?void 0:s.layer)==null?void 0:c.toUpperCase())==="SUPERADMIN"||!t)return e;const r=(u=t==null?void 0:t["系统管理/用户管理"])==null?void 0:u.find(f=>{var p;return(f==null?void 0:f.id)===((p=Xt.value)==null?void 0:p.id)}),o=xl(r,t);if(!o)return e;switch(jt==null?void 0:jt[o]){case 0:return e;case 1:return n?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([p,d])=>{var b,v,m,S,A,E,C,w,D;const y=d==null?void 0:d[1],g=p[(p==null?void 0:p.length)-1]===Gr.value;return((v=(b=y==null?void 0:y.key)==null?void 0:b.createUserLayer)==null?void 0:v.toUpperCase())==="SUPERADMIN"||((m=y==null?void 0:y.key)==null?void 0:m.createUserOrg)===((A=(S=r==null?void 0:r.value)==null?void 0:S.tableData)==null?void 0:A.部门名称)||((E=y==null?void 0:y.key)==null?void 0:E.createUserOrg)===((w=(C=r==null?void 0:r.value)==null?void 0:C.tableData)==null?void 0:w.部门名称)&&((D=y==null?void 0:y.key)==null?void 0:D.createUserId)===(r==null?void 0:r.id)||g})):e==null?void 0:e.filter(f=>{var p,d,y,g,b,v,m,S,A;return((d=(p=f==null?void 0:f.key)==null?void 0:p.createUserLayer)==null?void 0:d.toUpperCase())==="SUPERADMIN"||((y=f==null?void 0:f.key)==null?void 0:y.createUserOrg)===((b=(g=r==null?void 0:r.value)==null?void 0:g.tableData)==null?void 0:b.部门名称)||((v=f==null?void 0:f.key)==null?void 0:v.createUserOrg)===((S=(m=r==null?void 0:r.value)==null?void 0:m.tableData)==null?void 0:S.部门名称)&&((A=f==null?void 0:f.key)==null?void 0:A.createUserId)===(r==null?void 0:r.id)});case 2:break;case 3:return n?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([p,d])=>{var b;const y=d==null?void 0:d[1],g=p[(p==null?void 0:p.length)-1]===Gr.value;return((b=y==null?void 0:y.key)==null?void 0:b.createUserId)===(r==null?void 0:r.id)||g})):e==null?void 0:e.filter(f=>{var p;return((p=f==null?void 0:f.key)==null?void 0:p.createUserId)===(r==null?void 0:r.id)})}},Nn=Ct(h.pinia),{activeMenuPath:Bl}=h.storeToRefs(Nn),Ye=gt(h.pinia),Ml=It(h.pinia),{originalPath:ni}=h.storeToRefs(Ml),{payloadTypes:Rl}=h.storeToRefs(Ye),Nl=async(e,n,t,r)=>{var g,b,v,m,S,A,E,C,w,D,T,P,k,x,R,O,G,Z,J,N,$,z,X,K,M,V,L,q,te,F,j,se,_,fe,U,Te,he;const o=(b=(g=e==null?void 0:e.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:g.contents)==null?void 0:b.find(ne=>ne==null?void 0:ne.columnPath);let i=(w=(C=(E=(A=(v=h.cloneDeep(o==null?void 0:o.columnPath))==null?void 0:v.split("["))==null?void 0:A[((S=(m=o==null?void 0:o.columnPath)==null?void 0:m.split("["))==null?void 0:S.length)-1])==null?void 0:E.split("]"))==null?void 0:C[0])==null?void 0:w.replaceAll("'",""),a=(T=(D=h.cloneDeep(o==null?void 0:o.columnPath))==null?void 0:D.split("['"+i+"']"))==null?void 0:T[0],s="",c="",u="";if(a.includes("[")){let ne=(R=(x=(k=(P=a==null?void 0:a.split("["))==null?void 0:P[1])==null?void 0:k.split("]"))==null?void 0:x[0])==null?void 0:R.split("/");c=a,s=(Z=(G=(O=a==null?void 0:a.split("["))==null?void 0:O[1])==null?void 0:G.split("]"))==null?void 0:Z[0];let re="";t==null||t.forEach(le=>{var ve,Ae,Ce,Me,W;((Ae=(ve=le==null?void 0:le.value)==null?void 0:ve.pageData)==null?void 0:Ae.name)===(ne==null?void 0:ne[0])&&((W=(Me=(Ce=le==null?void 0:le.value)==null?void 0:Ce.pageData)==null?void 0:Me.compData)==null||W.forEach(ie=>{var me;(ie==null?void 0:ie.key)==="formContent"&&((me=ie==null?void 0:ie.contents)==null||me.forEach(pe=>{var B;if((pe==null?void 0:pe.prop)===(ne==null?void 0:ne[1])){let Q=ui((B=h.cloneDeep(pe))==null?void 0:B.optionUrl,r);re=(pe==null?void 0:pe.value)||Q||""}}))}))}),u=re,a=((J=a==null?void 0:a.split("["))==null?void 0:J[0])+re}let f=[];const p=await h.getInsofDataApi({key:{pageKey:a,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}),d=await h.getInsofDataApi({key:{pageKey:Bl.value,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(n),type:"data"}}),y=[];if(($=(N=d==null?void 0:d.data)==null?void 0:N.result)==null||$.forEach(ne=>{y.push([{id:ne==null?void 0:ne.id},ne.value.tableData])}),Array.isArray((z=p==null?void 0:p.data)==null?void 0:z.result)&&((K=(X=p==null?void 0:p.data)==null?void 0:X.result)==null?void 0:K.length)>0){let ne;(V=(M=p==null?void 0:p.data)==null?void 0:M.result)!=null&&V.find(re=>{var le,ve;return((ve=(le=re==null?void 0:re.value)==null?void 0:le.pageData)==null?void 0:ve.name)===i})&&(ne=await((q=(L=p==null?void 0:p.data)==null?void 0:L.result)==null?void 0:q.map(async re=>{var le,ve,Ae,Ce,Me,W,ie,me,pe,B,Q,oe,Re,Oe,or,ir,ar,sr,lr,ur,cr,fr;if(((ve=(le=re==null?void 0:re.value)==null?void 0:le.pageData)==null?void 0:ve.name)===i){f=h.cloneDeep((Ce=(Ae=re==null?void 0:re.value)==null?void 0:Ae.pageData)==null?void 0:Ce.compData);const Je=await h.getInsofDataApi({key:{pageKey:a,systemKey:sessionStorage.getItem("systemKey"),tableId:re==null?void 0:re.id,type:"data"}});let xt;if(((W=(Me=Je==null?void 0:Je.data)==null?void 0:Me.result)==null?void 0:W.length)>0)xt=(me=(ie=Je==null?void 0:Je.data)==null?void 0:ie.result)==null?void 0:me.map(H=>{var hr;let ae=[];return ae.push({id:H==null?void 0:H.id}),ae.push((hr=H==null?void 0:H.value)==null?void 0:hr.tableData),ae}),f.push({key:"tableContents",contents:at(xt,(oe=(Q=(B=(pe=re==null?void 0:re.value)==null?void 0:pe.pageData)==null?void 0:B.compData)==null?void 0:Q.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:oe.contents)}),f.push({key:"contentTableId",contents:re==null?void 0:re.id});else{let H=await $e(a,sessionStorage.getItem("systemKey"),"");f=(Oe=(Re=H==null?void 0:H.find(ae=>(ae==null?void 0:ae.name)===i))==null?void 0:Re.compData)==null?void 0:Oe.filter(ae=>(ae==null?void 0:ae.key)!=="tableContents"),H=(ar=(ir=(or=H==null?void 0:H.find(ae=>(ae==null?void 0:ae.name)===i))==null?void 0:or.compData)==null?void 0:ir.find(ae=>(ae==null?void 0:ae.key)==="tableContents"))==null?void 0:ar.contents,xt=H,f.push({key:"tableContents",contents:at(xt,(ur=(lr=(sr=H==null?void 0:H.find(ae=>(ae==null?void 0:ae.name)===i))==null?void 0:sr.compData)==null?void 0:lr.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:ur.contents)}),f.push({key:"contentTableId",contents:(H==null?void 0:H.length)!==0?(fr=(cr=H==null?void 0:H.find(ae=>(ae==null?void 0:ae.name)===i))==null?void 0:cr.compData)==null?void 0:fr.id:re==null?void 0:re.id})}s!==""&&(f!=null&&f.find(H=>(H==null?void 0:H.key)==="pageColumn")&&(f=f==null?void 0:f.filter(H=>(H==null?void 0:H.key)!=="pageColumn")),f.push({key:"pageColumn",contents:c}),f!=null&&f.find(H=>(H==null?void 0:H.key)==="columnPath")&&(f=f==null?void 0:f.filter(H=>(H==null?void 0:H.key)!=="columnPath")),f.push({key:"columnPath",contents:s}),f!=null&&f.find(H=>(H==null?void 0:H.key)==="columnUsingPath")&&(f=f==null?void 0:f.filter(H=>(H==null?void 0:H.key)!=="columnUsingPath")),f.push({key:"columnUsingPath",contents:u}),f!=null&&f.find(H=>(H==null?void 0:H.key)==="pageGroup")&&(f=f==null?void 0:f.filter(H=>(H==null?void 0:H.key)!=="pageGroup")),f.push({key:"pageGroup",contents:i}))}})),await Promise.all(ne))}else{let ne="",re="";(te=a==null?void 0:a.split("/"))==null||te.forEach((W,ie)=>{var me;ie<((me=a==null?void 0:a.split("/"))==null?void 0:me.length)-1?ne=ne===""?ne+W:ne+"/"+W:re=W});let le=await $e(ne,sessionStorage.getItem("systemKey"),""),ve;(_=(se=(j=(F=le==null?void 0:le[0])==null?void 0:F.compData)==null?void 0:j.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:se.contents)==null||_.forEach((W,ie)=>{W!=null&&W.isMainKey&&(ve=ie)});let Ae=[];(he=(Te=(U=(fe=le==null?void 0:le[0])==null?void 0:fe.compData)==null?void 0:U.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:Te.contents)==null||he.forEach(W=>{W.find(ie=>ie===re)&&(ve||ve===0)&&Ae.push(W==null?void 0:W[ve])});let Ce=[],Me=await(Ae==null?void 0:Ae.map(async W=>{let ie=await $e(ne+ni.value+W,sessionStorage.getItem("systemKey"),""),me=ie==null?void 0:ie.find(pe=>(pe==null?void 0:pe.name)===i);Ce.push(me)}));await Promise.all(Me),Ce==null||Ce.forEach(W=>{var me,pe,B,Q;let ie=h.cloneDeep(W==null?void 0:W.compData);ie&&(ie=ie==null?void 0:ie.filter(oe=>(oe==null?void 0:oe.key)!=="tableContents"),ie.push({key:"tableContents",contents:at((pe=(me=W==null?void 0:W.compData)==null?void 0:me.find(oe=>(oe==null?void 0:oe.key)==="tableContents"))==null?void 0:pe.contents,(Q=(B=W==null?void 0:W.compData)==null?void 0:B.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:Q.contents)}),ie.push({key:"contentTableId",contents:W==null?void 0:W.id}),f.push(ie))})}return f},$e=async(e,n,t="",r=!1,o,i,a)=>{var v,m,S,A,E,C,w;let s,c=new WeakMap;a?c=a:(m=(v=(await h.getPageInsofDataApi({systemKey:n,type:Rl.value})).data.result)==null?void 0:v.filter(T=>{var P,k;return((P=T==null?void 0:T.key)==null?void 0:P.pageKey)!=="menu"&&((k=T==null?void 0:T.key)==null?void 0:k.pageKey)!=="secret"}))==null||m.forEach(T=>{c[T.key.pageKey]?c[T.key.pageKey]=[...c[T.key.pageKey],T]:c[T.key.pageKey]=[T]}),(!r||!o)&&(s=(S=c[e])==null?void 0:S.filter(D=>{var T;return((T=D==null?void 0:D.key)==null?void 0:T.parentTable)===t})),Ye.setPageMapState(c);const u=(A=c[e])==null?void 0:A.filter(D=>{var T;return((T=D==null?void 0:D.key)==null?void 0:T.type)==="structureMethod"}),f=s==null?void 0:s.map(D=>D.id);if(!f)return;let p=(E=c[e])==null?void 0:E.filter(D=>{var T,P,k,x;return((T=D==null?void 0:D.key)==null?void 0:T.type)==="data"&&(f.includes((P=D==null?void 0:D.key)==null?void 0:P.tableId)||f.includes((x=(k=D==null?void 0:D.key)==null?void 0:k.tableId)==null?void 0:x.toString()))});const d=c[e+ni.value]??[];(d==null?void 0:d.length)===0&&(p=ti(p,!1,c));let y=[];p==null||p.forEach(D=>{var k;const T=Array.isArray(D.value.tableData)?D.value.tableData:[D.value.tableData];T.unshift({id:D.id});const P=(k=D==null?void 0:D.key)==null?void 0:k.tableId;y!=null&&y.find(x=>(x==null?void 0:x.key)===P)?y=y==null?void 0:y.map(x=>((x==null?void 0:x.key)===P&&(x.contents=[...x.contents,T]),x)):y.push({key:P,contents:[T]})});let g=[];const b=await(s==null?void 0:s.map(async D=>{var x,R,O,G,Z,J,N,$,z,X,K,M,V,L,q,te;const T=D.value.pageData,P=D==null?void 0:D.id;let k=(x=h.cloneDeep(T==null?void 0:T.compData))==null?void 0:x.filter(F=>(F==null?void 0:F.key)!=="tableContents");if(k&&(k!=null&&k.find(F=>(F==null?void 0:F.key)==="header"))&&((O=(R=k==null?void 0:k.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:R.contents)!=null&&O.every(F=>!(F!=null&&F.columnPath)))){let F=at((G=y==null?void 0:y.find(U=>(U==null?void 0:U.key)===D.id))==null?void 0:G.contents,(Z=k==null?void 0:k.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:Z.contents),j=await Jl((J=k==null?void 0:k.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:J.contents,e,(N=k==null?void 0:k.find(U=>(U==null?void 0:U.key)==="tableFilter"))==null?void 0:N.contents,c);j!=null&&j.mainKeys&&k.push({key:"mainRouters",contents:j==null?void 0:j.mainKeys});let se=[],_=[];Array.isArray(j)&&(se=at(j,($=k==null?void 0:k.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:$.contents)),Array.isArray(j==null?void 0:j.tableContents)&&(_=at(j==null?void 0:j.tableContents,(z=k==null?void 0:k.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:z.contents));let fe=[...se,..._];Array.isArray(F)&&(F==null?void 0:F.length)>0&&(fe=[...fe,...F]),k.push({key:"tableContents",contents:fe}),k=k==null?void 0:k.map(U=>{var Te;return(U==null?void 0:U.key)==="header"&&(U.contents=(Te=U.contents)==null?void 0:Te.map(he=>((he==null?void 0:he.prop)===(j==null?void 0:j.mainKey)&&(he.isMainKey=!0),he))),U})}else k&&(k!=null&&k.find(F=>(F==null?void 0:F.key)==="header"))&&(k=await Nl(h.cloneDeep(k),P,s,c),T.tableId=(X=k==null?void 0:k.find(F=>(F==null?void 0:F.key)==="contentTableId"))==null?void 0:X.contents);if(T.id=D==null?void 0:D.id,T.isShow=(M=(K=D==null?void 0:D.value)==null?void 0:K.pageData)==null?void 0:M.isShow,T.compData=k,((V=D.key)==null?void 0:V.type)!=="method")(L=T==null?void 0:T.compData)!=null&&L.every(F=>Array.isArray(F))?((q=T==null?void 0:T.compData)==null?void 0:q.length)===0?g.push(T):(te=T==null?void 0:T.compData)==null||te.forEach((F,j)=>{let se;j===0?se={comp:T==null?void 0:T.comp,compData:F,id:T==null?void 0:T.id,name:T==null?void 0:T.name,isShow:T==null?void 0:T.isShow}:se={comp:T==null?void 0:T.comp,compData:F,id:T==null?void 0:T.id,name:"",isShow:T==null?void 0:T.isShow},g.push(se)}):g.push(T);else{let F;F={name:"",compData:[T],comp:"calculator"},g.push(F)}}));return await Promise.all(b),((C=u==null?void 0:u.map(D=>D.value.pageData))==null?void 0:C.filter(D=>Object.values(D).length>0).length)>0&&g.push({comp:"methodButton",name:"",compData:(w=u==null?void 0:u.map(D=>D.value.pageData))==null?void 0:w.filter(D=>Object.values(D).length>0)}),g=g.sort((D,T)=>D.id-T.id),i?g:await Il(e,g)},Pl=async e=>{await h.deleteInsofDataApi({id:e}),Ye.setTableLoading(!1)},Ol=async(e,n,t,r,o,i,a,s)=>{var p,d,y,g,b,v,m,S,A,E,C,w,D,T,P,k,x,R,O,G,Z,J,N,$;let c=((d=(p=a==null?void 0:a.content)==null?void 0:p[0])==null?void 0:d.id)??"",u=(y=s==null?void 0:s.param)==null?void 0:y.url,f;if(c!==""&&((g=a==null?void 0:a.content)==null?void 0:g.length)>1&&typeof((v=(b=a==null?void 0:a.content)==null?void 0:b[0])==null?void 0:v.id)!="string"){const z=await h.getInsofDataApi({id:c});let X=((E=(A=(S=(m=z==null?void 0:z.data)==null?void 0:m.result)==null?void 0:S[0])==null?void 0:A.key)==null?void 0:E.tableId)??"",K=((T=(D=(w=(C=z==null?void 0:z.data)==null?void 0:C.result)==null?void 0:w[0])==null?void 0:D.key)==null?void 0:T.pageKey)??"";const M=await h.createInsofDataApi({key:{type:e,pageKey:u||K||n,tableId:X||t,systemKey:r},value:{tableData:ct(o,(P=We(i))==null?void 0:P.filter(V=>V!=="操作"))}});((k=M==null?void 0:M.data)==null?void 0:k.code)===200?(f=(x=M==null?void 0:M.data)==null?void 0:x.result,h.ElMessage.success("保存成功")):h.ElMessage.error("保存响应失败"),Ye.setTableLoading(!1)}else{let z;if(a!=null&&a.parentTableId){let K=await h.getInsofDataApi({id:a==null?void 0:a.parentTableId});z=(Z=(G=(O=(R=K==null?void 0:K.data)==null?void 0:R.result)==null?void 0:O[0])==null?void 0:G.key)==null?void 0:Z.pageKey}const X=await h.createInsofDataApi({key:{type:e,pageKey:u||z||n,tableId:a!=null&&a.parentTableId?a==null?void 0:a.parentTableId:t,systemKey:r},value:{tableData:ct(o,(J=We(i))==null?void 0:J.filter(K=>K!=="操作"))}});((N=X==null?void 0:X.data)==null?void 0:N.code)===200?(f=($=X==null?void 0:X.data)==null?void 0:$.result,h.ElMessage.success("保存成功")):h.ElMessage.error("保存响应失败"),Ye.setTableLoading(!1)}return f},Vl=async(e,n,t,r,o,i,a)=>{var f,p,d,y,g,b,v,m,S,A,E,C;if(!r)return;const s=await h.getInsofDataApi({id:r});let c=((y=(d=(p=(f=s==null?void 0:s.data)==null?void 0:f.result)==null?void 0:p[0])==null?void 0:d.key)==null?void 0:y.tableId)??"",u=((m=(v=(b=(g=s==null?void 0:s.data)==null?void 0:g.result)==null?void 0:b[0])==null?void 0:v.key)==null?void 0:m.pageKey)??"";if(c&&c!==""){const w=await h.updateInsofDataApi({key:{type:e,pageKey:u,tableId:c,systemKey:o},value:{tableData:ct(i,(S=We(a))==null?void 0:S.filter(D=>D!=="操作"))},id:r});((A=w==null?void 0:w.data)==null?void 0:A.code)===200?h.ElMessage.success("保存成功"):h.ElMessage.error("保存响应失败"),Ye.setTableLoading(!1)}else{const w=await h.updateInsofDataApi({key:{type:e,pageKey:n,tableId:t,systemKey:o},value:{tableData:ct(i,(E=We(a))==null?void 0:E.filter(D=>D!=="操作"))},id:r});((C=w==null?void 0:w.data)==null?void 0:C.code)===200?h.ElMessage.success("保存成功"):h.ElMessage.error("保存响应失败"),Ye.setTableLoading(!1)}},Fl=async(e,n)=>{await h.updateInsofDataApi({value:{pageData:n},id:e})},Ll=async()=>{var e,n,t,r,o,i,a,s,c;try{const u=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),layer:"superAdmin"}});if(((e=u==null?void 0:u.data)==null?void 0:e.code)===200){const f=(o=(r=(t=(n=u==null?void 0:u.data)==null?void 0:n.result)==null?void 0:t[0])==null?void 0:r.key)==null?void 0:o.systemType;let p="browser";f==="制造系统"&&(p="client"),f==="三维系统"&&(p="three"),Nn.setPlatform(p),Nn.setPlatName(((c=(s=(a=(i=u==null?void 0:u.data)==null?void 0:i.result)==null?void 0:a[0])==null?void 0:s.key)==null?void 0:c.name)??"")}}catch(u){return Promise.reject(u)}},ut=l.ref(0),Pn=Ct(h.pinia),Kl=It(h.pinia),{originalPath:nt}=h.storeToRefs(Kl),Hl=h.useLoginState(h.pinia),_l=jn(h.pinia),{multipleTableConst:ye}=h.storeToRefs(_l),{loginUserInfo:Ee}=h.storeToRefs(Hl),{activeMenuPath:mu}=h.storeToRefs(Pn),On=gt(h.pinia),{pageMapState:Vn}=h.storeToRefs(On),De=nt.value,Qt=e=>e==null?void 0:e.map(t=>{var r;return ut.value++,Array.isArray(t)?Qt(t):{label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":(t==null?void 0:t.prop)??"a"+ut.value,width:(t==null?void 0:t.label)==="操作"?"200":t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!0,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??ut.value,type:(t==null?void 0:t.label)==="操作"?"operate":void 0,formType:(t==null?void 0:t.formType)??(t!=null&&t.groupSelect?"Select":""),isHidden:t==null?void 0:t.isHidden,options:(t==null?void 0:t.options)??[],children:Qt(t.children)??void 0,formMenuSelect:(t==null?void 0:t.formMenuSelect)??[],groupSelect:t!=null&&t.groupSelect?(r=t==null?void 0:t.groupSelect)==null?void 0:r.replaceAll('"',"").split(":"):[],isMainKey:(t==null?void 0:t.isMainKey)||!!(t!=null&&t.directiveLabel)}}),zl=e=>{const n=[];function t(r){if(Array.isArray(r))for(const o of r)!o.children||o.children.length===0?n.push(o):t(o.children)}return t(e),n},$l=e=>h.cloneDeep(e).map(t=>(Array.isArray(t)&&(t=t.map(r=>{var o;return Array.isArray(r)?r=Qt(r):(r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":(r==null?void 0:r.prop)??"a"+ut.value,width:(r==null?void 0:r.label)==="操作"?"200":r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??ut.value,type:(r==null?void 0:r.label)==="操作"?"operate":void 0,formType:(r==null?void 0:r.formType)??(r!=null&&r.groupSelect?"Select":""),isHidden:r==null?void 0:r.isHidden,options:(r==null?void 0:r.options)??[],children:Qt(r.children),formMenuSelect:(r==null?void 0:r.formMenuSelect)??[],groupSelect:r!=null&&r.groupSelect?(o=r==null?void 0:r.groupSelect)==null?void 0:o.replaceAll('"',"").split(":"):[],isMainKey:(r==null?void 0:r.isMainKey)||!!(r!=null&&r.directiveLabel)},ut.value++),r})),t)),en=e=>{function n(t,r=[],o=""){if(!t||t.length===0)return[];let i=r;return Array.isArray(t)&&(t==null||t.forEach(a=>{var s,c,u,f,p,d,y,g,b,v,m,S,A;if(a!=null&&a.children&&((s=a.children)==null?void 0:s.length)>0){let E=o===""?o+((p=(c=a==null?void 0:a.prop)==null?void 0:c.split(ye.value))==null?void 0:p[((f=(u=a==null?void 0:a.prop)==null?void 0:u.split(ye.value))==null?void 0:f.length)-1]):o+ye.value+((b=(d=a==null?void 0:a.prop)==null?void 0:d.split(ye.value))==null?void 0:b[((g=(y=a==null?void 0:a.prop)==null?void 0:y.split(ye.value))==null?void 0:g.length)-1]);i=n(a==null?void 0:a.children,i,E)}else o!==""&&(a.prop=o+ye.value+((A=(v=a==null?void 0:a.prop)==null?void 0:v.split(ye.value))==null?void 0:A[((S=(m=a==null?void 0:a.prop)==null?void 0:m.split(ye.value))==null?void 0:S.length)-1])),i.push(a)})),i}return n(e)},Ul=e=>{function n(t,r=[],o=""){if(!t||t.length===0)return[];let i=r;return Array.isArray(t)&&(i=t==null?void 0:t.map(a=>{var s,c,u,f,p,d,y,g,b,v,m,S,A;if(a!=null&&a.children&&((s=a.children)==null?void 0:s.length)>0){let E=o===""?o+((p=(c=a==null?void 0:a.prop)==null?void 0:c.split(ye.value))==null?void 0:p[((f=(u=a==null?void 0:a.prop)==null?void 0:u.split(ye.value))==null?void 0:f.length)-1]):o+ye.value+((b=(d=a==null?void 0:a.prop)==null?void 0:d.split(ye.value))==null?void 0:b[((g=(y=a==null?void 0:a.prop)==null?void 0:y.split(ye.value))==null?void 0:g.length)-1]);a.children=n(a==null?void 0:a.children,i,E)}else o!==""&&(a.prop=o+ye.value+((A=(v=a==null?void 0:a.prop)==null?void 0:v.split(ye.value))==null?void 0:A[((S=(m=a==null?void 0:a.prop)==null?void 0:m.split(ye.value))==null?void 0:S.length)-1]));return a})),i}return n(e)},jl=e=>{let n=h.cloneDeep(e);return n=n==null?void 0:n.map(t=>((t==null?void 0:t.type)==="Select"?t={label:t==null?void 0:t.label,prop:t==null?void 0:t.prop,name:t==null?void 0:t.name,type:t==null?void 0:t.type,value:(t==null?void 0:t.value)??"",optionUrl:{groupSelect:t==null?void 0:t.groupSelect,menuSelect:t==null?void 0:t.menuSelect,type:"Select",selectRelateType:t==null?void 0:t.selectRelateType,multiple:t==null?void 0:t.multiple}}:(t==null?void 0:t.type)==="Date"&&(t.value=!(t!=null&&t.value)&&(t==null?void 0:t.isNewDate)!==!1?new Date:t==null?void 0:t.value),t.label=t.prop||t.label,t)),n},ql=e=>{var n,t,r,o,i,a;if(((n=e==null?void 0:e.pageData)==null?void 0:n.comp)==="Form"){let s=(r=(t=e==null?void 0:e.pageData)==null?void 0:t.compData)==null?void 0:r.map(u=>{var f;return(u==null?void 0:u.key)==="formContent"&&(u.contents=(f=u.contents)==null?void 0:f.map(p=>((p==null?void 0:p.type)==="Date"&&(p.value=""),p))),u});return{pageData:{comp:(o=e==null?void 0:e.pageData)==null?void 0:o.comp,compData:s,name:(i=e==null?void 0:e.pageData)==null?void 0:i.name,isShow:(a=e==null?void 0:e.pageData)==null?void 0:a.isShow}}}else return e},Wl=(e,n)=>{var r,o,i,a,s,c,u,f,p;let t=(i=(o=(r=n==null?void 0:n.pageData)==null?void 0:r.compData)==null?void 0:o.find(d=>(d==null?void 0:d.key)==="formContent"))==null?void 0:i.contents;if(((a=e==null?void 0:e.pageData)==null?void 0:a.comp)==="Form"){let d=(c=(s=e==null?void 0:e.pageData)==null?void 0:s.compData)==null?void 0:c.map(g=>{var b;return(g==null?void 0:g.key)==="formContent"&&(g.contents=(b=g.contents)==null?void 0:b.map(v=>{var m;return v.value=(m=t==null?void 0:t.find(S=>(S==null?void 0:S.key)===(v==null?void 0:v.key)))==null?void 0:m.value,v})),g});return{pageData:{comp:(u=e==null?void 0:e.pageData)==null?void 0:u.comp,compData:d,name:(f=e==null?void 0:e.pageData)==null?void 0:f.name,isShow:(p=e==null?void 0:e.pageData)==null?void 0:p.isShow}}}else return e},wt=async(e,n,t,r,o)=>{var b,v,m,S,A,E,C,w,D,T,P,k,x,R,O,G,Z,J,N,$,z,X,K;let i=e;(i==null?void 0:i[(i==null?void 0:i.length)-1])!==De&&(i="",(v=(b=h.cloneDeep(e))==null?void 0:b.split(De))==null||v.forEach((M,V)=>{var L,q;V!==((q=(L=h.cloneDeep(e))==null?void 0:L.split(De))==null?void 0:q.length)-1&&(i=i===""?i+M:i+"/"+M)}),i=i+De);let a=[],s=await h.getInsofDataApi({key:{pageKey:e,systemKey:sessionStorage.getItem("systemKey")}});const c={data:{result:(S=(m=s==null?void 0:s.data)==null?void 0:m.result)==null?void 0:S.filter(M=>{var V;return((V=M==null?void 0:M.key)==null?void 0:V.type)==="structure"})}};let u;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==De&&(u={data:{result:(A=Vn.value[i])==null?void 0:A.filter(M=>{var V;return((V=M==null?void 0:M.key)==null?void 0:V.type)==="structure"})}},((C=(E=u==null?void 0:u.data)==null?void 0:E.result)==null?void 0:C.length)>0&&(u=(D=(w=h.cloneDeep(u))==null?void 0:w.data)==null?void 0:D.result));const f={data:{result:(T=Vn.value[i])==null?void 0:T.filter(M=>{var V;return((V=M==null?void 0:M.key)==null?void 0:V.type)==="structureMethod"})}},p={data:{result:(k=(P=s==null?void 0:s.data)==null?void 0:P.result)==null?void 0:k.filter(M=>{var V;return((V=M==null?void 0:M.key)==null?void 0:V.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==De){let M=(x=c==null?void 0:c.data)==null?void 0:x.result;if(!Array.isArray(u))return;u==null||u.forEach(V=>{var q,te,F,j,se;let L=(q=M==null?void 0:M.find(_=>{var fe,U,Te,he;return((U=(fe=V==null?void 0:V.value)==null?void 0:fe.pageData)==null?void 0:U.name)===((he=(Te=_==null?void 0:_.value)==null?void 0:Te.pageData)==null?void 0:he.name)}))==null?void 0:q.value;L?L=L:L=void 0,a.push({key:{pageKey:n,parentTable:((te=L==null?void 0:L.key)==null?void 0:te.parentTable)??"",systemKey:(F=V==null?void 0:V.key)==null?void 0:F.systemKey,type:((j=L==null?void 0:L.key)==null?void 0:j.type)??((se=V==null?void 0:V.key)==null?void 0:se.type),version:1},value:Wl(V==null?void 0:V.value,L)})})}else(O=(R=c==null?void 0:c.data)==null?void 0:R.result)==null||O.forEach(M=>{var V,L,q;a.push({key:{pageKey:n,parentTable:(V=M==null?void 0:M.key)==null?void 0:V.parentTable,systemKey:(L=M==null?void 0:M.key)==null?void 0:L.systemKey,type:(q=M==null?void 0:M.key)==null?void 0:q.type,version:1},value:ql(M==null?void 0:M.value)})});if((Z=(G=f==null?void 0:f.data)==null?void 0:G.result)==null||Z.forEach(M=>{var V,L;a.push({key:{pageKey:n,systemKey:(V=M==null?void 0:M.key)==null?void 0:V.systemKey,type:(L=M==null?void 0:M.key)==null?void 0:L.type,version:1},value:M==null?void 0:M.value})}),a=a==null?void 0:a.map(M=>{var V,L,q;return((L=(V=M==null?void 0:M.value)==null?void 0:V.pageData)==null?void 0:L.comp)==="Form"&&(M.value.pageData.compData=(q=M.value.pageData.compData)==null?void 0:q.map(te=>{var F;return(te==null?void 0:te.key)==="formContent"&&(te.contents=(F=te.contents)==null?void 0:F.map(j=>(t!=null&&t[j==null?void 0:j.key]&&(j==null?void 0:j.type)!=="Date"&&(j.value=t[j.key]),j))),te}),r&&M.value.pageData.compData.push({key:"parentFormPath",contents:r})),M}),(a==null?void 0:a.length)>0){let M;if(!o)M=a;else{const V=a==null?void 0:a.find(q=>{var te,F;return o==null?void 0:o.includes((F=(te=q==null?void 0:q.value)==null?void 0:te.pageData)==null?void 0:F.name)}),L=/^[A-Za-z]+$/;M=V?a==null?void 0:a.map(q=>{var te,F,j,se,_,fe;return o!=null&&o.includes((F=(te=q==null?void 0:q.value)==null?void 0:te.pageData)==null?void 0:F.name)?{...q,value:{pageData:{...(j=q==null?void 0:q.value)==null?void 0:j.pageData,compData:(fe=(_=(se=q==null?void 0:q.value)==null?void 0:se.pageData)==null?void 0:_.compData)==null?void 0:fe.map(U=>{var Te;return(U==null?void 0:U.key)==="formContent"?{...U,contents:(Te=U==null?void 0:U.contents)==null?void 0:Te.map(he=>L.test(he==null?void 0:he.prop)?he:{...he,value:""})}:U})}}}:q}):a}await h.batchAddInsofDataApi({dataList:M})}let d={};const y=await h.getInsofDataApi({key:{pageKey:n,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});((N=(J=c==null?void 0:c.data)==null?void 0:J.result)==null?void 0:N.length)>0&&((z=($=c==null?void 0:c.data)==null?void 0:$.result)==null||z.forEach(M=>{var V,L,q;d[M.id]=(q=(L=(V=y==null?void 0:y.data)==null?void 0:V.result)==null?void 0:L.find(te=>{var F,j,se,_;return((j=(F=te==null?void 0:te.value)==null?void 0:F.pageData)==null?void 0:j.name)===((_=(se=M==null?void 0:M.value)==null?void 0:se.pageData)==null?void 0:_.name)}))==null?void 0:q.id}));let g=[];(K=(X=p==null?void 0:p.data)==null?void 0:X.result)==null||K.forEach(M=>{var V,L,q;g.push({key:{pageKey:n,tableId:d[(V=M==null?void 0:M.key)==null?void 0:V.tableId],systemKey:(L=M==null?void 0:M.key)==null?void 0:L.systemKey,type:(q=M==null?void 0:M.key)==null?void 0:q.type},value:M==null?void 0:M.value})}),(g==null?void 0:g.length)>0&&await h.batchAddInsofDataApi({dataList:g})},ri=(e,n)=>{let t=h.cloneDeep(e);return t=t==null?void 0:t.map(o=>{var c,u,f;let i=[],a=[];for(let p in n)if(p!=null&&p.includes((u=(c=h.cloneDeep(o))==null?void 0:c.key)==null?void 0:u.pageKey)){let d=(f=n[p])==null?void 0:f.filter(y=>{var g,b,v;return((g=y==null?void 0:y.key)==null?void 0:g.type)==="data"&&((b=y==null?void 0:y.key)==null?void 0:b.tableId)===((v=h.cloneDeep(o))==null?void 0:v.id)});a=[...a,...d]}(a==null?void 0:a.length)>0&&(a==null||a.forEach(p=>{i.push(p.value.tableData)}));let s=h.cloneDeep(o).value.pageData.compData;return s.push({key:"tableContents",contents:i}),o.value.pageData.compData=s,o}),t},oi=(e,n)=>{if(!(e!=null&&e.includes("[")))return e;let t=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),r=n==null?void 0:n.map(i=>{var a;return(a=i==null?void 0:i.value)==null?void 0:a.pageData}),o="";return r==null||r.forEach(i=>{var a;(i==null?void 0:i.name)===(t==null?void 0:t[0])&&((a=i==null?void 0:i.compData)==null||a.forEach(s=>{var c;(s==null?void 0:s.key)==="header"&&((c=s==null?void 0:s.contents)==null||c.forEach((u,f)=>{(u==null?void 0:u.prop)===(t==null?void 0:t[1])&&(o=f)}))}))}),o},ii=(e,n)=>{if(!(e!=null&&e.includes("[")))return e;let t=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),r=n==null?void 0:n.map(i=>{var a;return(a=i==null?void 0:i.value)==null?void 0:a.pageData}),o="";return r==null||r.forEach(i=>{var a;(i==null?void 0:i.name)===(t==null?void 0:t[0])&&((a=i==null?void 0:i.compData)==null||a.forEach(s=>{var c;(s==null?void 0:s.key)==="formContent"&&((c=s==null?void 0:s.contents)==null||c.forEach(u=>{(u==null?void 0:u.prop)===(t==null?void 0:t[1])&&(o=u==null?void 0:u.value)}))}))}),o},Yr=(e,n,t,r)=>{var c,u,f;let o=(c=e==null?void 0:e[0])==null?void 0:c.formMenuSelect,i=e==null?void 0:e.map(p=>{var d,y;return(y=(d=p.groupSelect)==null?void 0:d.split(":"))==null?void 0:y[1]}),a="";o==null||o.forEach((p,d)=>{(o==null?void 0:o.length)-1!==d?a=a===""?a+p:a+"/"+p:a=a+De+p});let s=[];for(let p in n)if(p!=null&&p.includes(a)){let d=(u=n[p])==null?void 0:u.filter(y=>{var g,b;return((g=y==null?void 0:y.key)==null?void 0:g.type)==="structure"&&((b=y==null?void 0:y.key)==null?void 0:b.parentTable)===""});s=[...s,...d]}if((s==null?void 0:s.length)>0){let p=s==null?void 0:s.filter(v=>{var m,S,A;return((m=v==null?void 0:v.key)==null?void 0:m.pageKey)!==a&&((A=(S=v==null?void 0:v.value)==null?void 0:S.pageData)==null?void 0:A.comp)==="Form"}),d=s==null?void 0:s.filter(v=>{var m,S,A;return((m=v==null?void 0:v.key)==null?void 0:m.pageKey)!==a&&((A=(S=v==null?void 0:v.value)==null?void 0:S.pageData)==null?void 0:A.comp)==="Table"});d=ri(h.cloneDeep(d),n),p=[...h.cloneDeep(p),...d],p=p==null?void 0:p.map(v=>({[v.key.pageKey]:v}));let y=0;p=p.reduce((v,m)=>(Object.keys(m).forEach(S=>{v[S]||(v[S]=[],v[S].push({index:y})),v[S].push(m[S])}),y++,v),{});let g=(f=Object.values(p))==null?void 0:f.sort((v,m)=>{var E,C;let S=(E=v==null?void 0:v.find(w=>w==null?void 0:w.index))==null?void 0:E.index,A=(C=m==null?void 0:m.find(w=>w==null?void 0:w.index))==null?void 0:C.index;return S-A});p=g==null?void 0:g.map(v=>v==null?void 0:v.filter(m=>{var S,A,E,C;return!(m!=null&&m.index)&&(m==null?void 0:m.index)!==0&&!((A=(S=m==null?void 0:m.key)==null?void 0:S.pageKey)!=null&&A.includes("updateLoading"))&&!((C=(E=m==null?void 0:m.key)==null?void 0:E.pageKey)!=null&&C.includes("loading"))}));let b=[];if(p==null||p.forEach(v=>{var A,E,C,w,D,T,P,k,x,R;const m=v==null?void 0:v.find(O=>{var G,Z,J,N,$;return((Z=(G=O==null?void 0:O.value)==null?void 0:G.pageData)==null?void 0:Z.name)===(($=(N=(J=e==null?void 0:e[0])==null?void 0:J.groupSelect)==null?void 0:N.split(":"))==null?void 0:$[0])});let S=(D=(w=(C=(E=(A=h.cloneDeep(m))==null?void 0:A.value)==null?void 0:E.pageData)==null?void 0:C.compData)==null?void 0:w.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:D.contents;if(S){let O=[];i==null||i.forEach((G,Z)=>{var $,z,X,K,M,V;let J=v==null?void 0:v.find(L=>{var q,te,F,j,se;return((te=(q=L==null?void 0:L.value)==null?void 0:q.pageData)==null?void 0:te.name)===((se=(j=(F=e==null?void 0:e[Z])==null?void 0:F.groupSelect)==null?void 0:j.split(":"))==null?void 0:se[0])}),N=(M=(K=(X=(z=($=h.cloneDeep(J))==null?void 0:$.value)==null?void 0:z.pageData)==null?void 0:X.compData)==null?void 0:K.find(L=>(L==null?void 0:L.key)==="formContent"))==null?void 0:M.contents;N!=null&&N.find(L=>(L==null?void 0:L.key)===G)?O.push((V=N==null?void 0:N.find(L=>(L==null?void 0:L.key)===G))==null?void 0:V.value):O.push("")}),b.push(O)}else S=(R=(x=(k=(P=(T=h.cloneDeep(m))==null?void 0:T.value)==null?void 0:P.pageData)==null?void 0:k.compData)==null?void 0:x.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:R.contents,S==null||S.forEach(O=>{let G=[];i==null||i.forEach(Z=>{O!=null&&O[Z]&&G.push(O==null?void 0:O[Z])}),b.push(G)})}),(t==null?void 0:t.length)>0){let v={};t==null||t.forEach(m=>{var S;for(let A in m){let E=h.cloneDeep(A);if(!(E!=null&&E.includes("[")))(S=m[A])!=null&&S.includes("[")||(v[E]=m[A]);else{let C=ii(E,n[r]),w=oi(m[A],n[r]);v[C]=w}}});for(let m in v)b=b==null?void 0:b.filter(S=>S[v[m]]===m)}return b}},Gl=(e,n,t,r)=>{var s,c,u,f,p;let o=h.cloneDeep(e),i=n==null?void 0:n.map(d=>d==null?void 0:d.prop),a=[];for(let d in t)if(d!=null&&d.includes(o)){let y=(s=t[d])==null?void 0:s.filter(g=>{var b,v;return((b=g==null?void 0:g.key)==null?void 0:b.type)==="structure"&&((v=g==null?void 0:g.key)==null?void 0:v.parentTable)===""});a=[...a,...y]}if((a==null?void 0:a.length)>0){let d=a==null?void 0:a.filter(E=>{var C,w,D,T;return((C=E==null?void 0:E.key)==null?void 0:C.pageKey)!==o&&((D=(w=E==null?void 0:E.value)==null?void 0:w.pageData)==null?void 0:D.comp)==="Form"&&(E==null?void 0:E.key.pageKey.includes(o+De))&&!((T=E==null?void 0:E.key.pageKey)!=null&&T.includes("@"))}),y=a==null?void 0:a.filter(E=>{var C,w,D,T;return((C=E==null?void 0:E.key)==null?void 0:C.pageKey)!==o&&((D=(w=E==null?void 0:E.value)==null?void 0:w.pageData)==null?void 0:D.comp)==="Table"&&(E==null?void 0:E.key.pageKey.includes(o+De))&&!((T=E==null?void 0:E.key.pageKey)!=null&&T.includes("@"))});y=ri(h.cloneDeep(y),t),d=[...h.cloneDeep(d),...y],d=d==null?void 0:d.map(E=>({[E.key.pageKey]:E}));let g=0;d=d.reduce((E,C)=>(Object.keys(C).forEach(w=>{E[w]||(E[w]=[],E[w].push({index:g})),E[w].push(C[w])}),g++,E),{}),d=ti(d,!0,t);let b=(c=Object.values(d))==null?void 0:c.sort((E,C)=>{var T,P;let w=(T=E==null?void 0:E.find(k=>k==null?void 0:k.index))==null?void 0:T.index,D=(P=C==null?void 0:C.find(k=>k==null?void 0:k.index))==null?void 0:P.index;return w-D});d=b==null?void 0:b.map(E=>E==null?void 0:E.filter(C=>!(C!=null&&C.index)&&(C==null?void 0:C.index)!==0));let v=(u=h.cloneDeep(d))==null?void 0:u.filter(E=>E==null?void 0:E.find(C=>{var w,D,T,P;return((P=(w=C==null?void 0:C.key)==null?void 0:w.pageKey)==null?void 0:P[((T=(D=C==null?void 0:C.key)==null?void 0:D.pageKey)==null?void 0:T.length)-1])===De}));d=d==null?void 0:d.filter(E=>!(E!=null&&E.find(C=>{var w,D,T,P,k,x,R,O;return((P=(w=C==null?void 0:C.key)==null?void 0:w.pageKey)==null?void 0:P[((T=(D=C==null?void 0:C.key)==null?void 0:D.pageKey)==null?void 0:T.length)-1])===De||((x=(k=C==null?void 0:C.key)==null?void 0:k.pageKey)==null?void 0:x.includes("updateLoading"))||((O=(R=C==null?void 0:C.key)==null?void 0:R.pageKey)==null?void 0:O.includes("loading"))})));let m=[],S=[];(f=v==null?void 0:v[0])==null||f.forEach(E=>{var C,w,D,T,P;((w=(C=E==null?void 0:E.value)==null?void 0:C.pageData)==null?void 0:w.comp)==="Form"&&((P=(T=(D=E==null?void 0:E.value)==null?void 0:D.pageData)==null?void 0:T.compData)==null||P.forEach(k=>{(k==null?void 0:k.key)==="formContent"&&(S=[...S,...k==null?void 0:k.contents])}))});let A=(p=S==null?void 0:S.find(E=>(E==null?void 0:E.isMain)===!0))==null?void 0:p.key;if(d==null||d.forEach(E=>{let C=[];E==null||E.forEach(D=>{var T,P,k,x,R;((P=(T=D==null?void 0:D.value)==null?void 0:T.pageData)==null?void 0:P.comp)==="Form"&&((R=(x=(k=D==null?void 0:D.value)==null?void 0:k.pageData)==null?void 0:x.compData)==null||R.forEach(O=>{(O==null?void 0:O.key)==="formContent"&&(C=[...C,...O==null?void 0:O.contents])}))});let w={};i==null||i.forEach(D=>{let T=C==null?void 0:C.find(P=>(P==null?void 0:P.key)===D);T!=null&&T.prop&&(w[T.prop]=(T==null?void 0:T.value)??"")}),m.push(w)}),(r==null?void 0:r.length)>0){let E=[];r==null||r.forEach(C=>{var P,k,x,R,O,G,Z,J;let w={};for(let N in C){let $=h.cloneDeep(N);if(!($!=null&&$.includes("[")))C[N].toUpperCase()==="@LOGINUSER"?w[$]=((P=Ee.value)==null?void 0:P.姓名)||((k=Ee.value)==null?void 0:k.account)||((x=Ee.value)==null?void 0:x.账号)||((R=Ee.value)==null?void 0:R.姓名):(O=C[N])!=null&&O.includes("[")||(w[$]=C[N]);else{let z=ii($,t[e]),X=oi(C[N],t[e]);w[z]=X}}let D=[],T=0;for(let N in w)((G=w[N])==null?void 0:G[0])!=="!"?D=(Z=T>0?D:m)==null?void 0:Z.filter(z=>z[N]===w[N]):D=(J=T>0?D:m)==null?void 0:J.filter($=>{var z;return $[N]!==((z=w[N])==null?void 0:z.replaceAll("!",""))}),T=1;E=[...E,...D]}),m=[...new Set(E)]}return m=m==null?void 0:m.map(E=>Object.values(E)),{mainKey:A,tableContents:m}}},Yl=(e,n)=>{var o,i,a,s,c,u;let t=(i=(o=h.cloneDeep(e))==null?void 0:o.split("/"))==null?void 0:i[0],r=[];for(let f in n)if(f!=null&&f.includes(t)){let p=(a=n[f])==null?void 0:a.filter(d=>{var y,g;return((y=d==null?void 0:d.key)==null?void 0:y.type)==="structure"&&((g=d==null?void 0:d.key)==null?void 0:g.parentTable)===""});r=[...r,...p]}return(r==null?void 0:r.length)>0?!!((u=(c=(s=r==null?void 0:r.filter(p=>{var d;return((d=p==null?void 0:p.key)==null?void 0:d.pageKey)===t}))==null?void 0:s[0])==null?void 0:c.key)==null?void 0:u.parentPageKey):!0},Zl=async(e,n,t,r)=>{var a,s,c,u,f,p,d,y,g;let o=(s=(a=h.cloneDeep(e))==null?void 0:a.split("/"))==null?void 0:s[0],i=[];for(let b in r)if(b!=null&&b.includes(o)){let v=(c=r[b])==null?void 0:c.filter(m=>{var S,A;return((S=m==null?void 0:m.key)==null?void 0:S.type)==="structure"&&((A=m==null?void 0:m.key)==null?void 0:A.parentTable)===""});i=[...i,...v]}if((i==null?void 0:i.length)>0){let b=(p=(f=(u=i==null?void 0:i.filter(S=>{var A;return((A=S==null?void 0:S.key)==null?void 0:A.pageKey)===o}))==null?void 0:u[0])==null?void 0:f.key)==null?void 0:p.parentPageKey,v=[];if(b){for(let S in r)if(S!=null&&S.includes(b)){let A=(d=r[S])==null?void 0:d.filter(E=>{var C,w;return((C=E==null?void 0:E.key)==null?void 0:C.type)==="structure"&&((w=E==null?void 0:E.key)==null?void 0:w.parentTable)===""});v=[...v,...A]}}else v=i;let m="";if((v==null?void 0:v.length)>0){let S=[],A;A=(y=v==null?void 0:v.filter(k=>{var x,R,O,G,Z,J;return((O=(R=(x=k==null?void 0:k.key)==null?void 0:x.pageKey)==null?void 0:R.split("/"))==null?void 0:O[0])===b&&((J=(Z=(G=k==null?void 0:k.key)==null?void 0:G.pageKey)==null?void 0:Z.split("/"))==null?void 0:J.length)===2}))==null?void 0:y.map(k=>{var x;return(x=k==null?void 0:k.key)==null?void 0:x.pageKey}),A=[...new Set(A)],A=A==null?void 0:A.filter(k=>!k.includes(De));let E=(g=h.cloneDeep(A))==null?void 0:g.map(async k=>{var Z,J,N,$,z,X,K,M,V,L,q,te,F,j,se;let x=await $e(k,sessionStorage.getItem("systemKey"),"",!1,[],!1,r),R=($=(N=(J=(Z=h.cloneDeep(x))==null?void 0:Z[0])==null?void 0:J.compData)==null?void 0:N.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:$.contents,O=(L=(V=(M=(K=(X=(z=h.cloneDeep(x))==null?void 0:z[0])==null?void 0:X.compData)==null?void 0:K.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:M.contents)==null?void 0:V.filter(_=>(_==null?void 0:_.label)!=="操作"))==null?void 0:L.map(_=>_==null?void 0:_.prop),G=[];return(se=(j=(F=(te=(q=h.cloneDeep(x))==null?void 0:q[0])==null?void 0:te.compData)==null?void 0:F.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:j.contents)==null||se.forEach(_=>{(_==null?void 0:_.isMainKey)===!0&&(m=_==null?void 0:_.prop)}),R==null||R.forEach(_=>{let fe=ct(_,O);G.push(fe),S.push({key:fe==null?void 0:fe[m],routerContent:k})}),G}),C=await Promise.all(E),w=[];C==null||C.forEach(k=>{(k==null?void 0:k.length)>0&&(k==null||k.forEach(x=>{w.push(x)}))});let D=[];D=n==null?void 0:n.map(k=>{var R,O,G;let x={};for(let Z in k)k[Z].toUpperCase()==="@LOGINUSER"?x[Z]=((R=Ee.value)==null?void 0:R.姓名)||((O=Ee.value)==null?void 0:O.account)||((G=Ee.value)==null?void 0:G.账号):x[Z]=k[Z];return x});let T=[];w==null||w.forEach(k=>{let x=[];D==null||D.forEach(R=>{let O=[];for(let G in R)O.push(k[G]===R[G]);x.push(O)}),x.find(R=>R==null?void 0:R.every(O=>O===!0))&&T.push(k)});let P=[];return T==null||T.forEach(k=>{let x={};t==null||t.forEach(R=>{x[R.prop]=k[R.prop]??""}),P.push(x)}),P=P==null?void 0:P.map(k=>Object.values(k)),{mainKey:m,tableContents:P,mainKeys:S}}else return}else return},Jl=async(e,n,t,r)=>{var i,a,s,c;let o=(i=h.cloneDeep(e))==null?void 0:i.filter(u=>(u==null?void 0:u.label)!=="操作");if((t==null?void 0:t.length)>0&&(o!=null&&o.every(u=>!(u!=null&&u.formMenuSelect)))&&Yl(n,r)){let u=await Zl(n,t,o,r);return u&&((a=u==null?void 0:u.tableContents)==null?void 0:a.length)>0?u:[]}if(!(o!=null&&o.every(u=>{var f,p,d,y;return((f=u==null?void 0:u.formMenuSelect)==null?void 0:f.length)>0&&((d=(p=u==null?void 0:u.groupSelect)==null?void 0:p.split(":"))==null?void 0:d.length)>0||((y=u==null?void 0:u.formMenuGroup)==null?void 0:y.length)>0})))return Gl(n,o,r,t);if(o!=null&&o.every(u=>!(u!=null&&u.formMenuGroup)))return Yr(o,r,t,n);{let u=[];(c=(s=o==null?void 0:o[0])==null?void 0:s.formMenuGroup)==null||c.forEach((y,g)=>{let b=[];o==null||o.forEach(v=>{var m,S,A,E,C,w;b.push({columnPath:v==null?void 0:v.columnPath,formMenuSelect:(A=((m=v==null?void 0:v.formMenuGroup)==null?void 0:m[g])??((S=v==null?void 0:v.formMenuGroup)==null?void 0:S[0]))==null?void 0:A.formMenuSelect,groupSelect:(w=((E=v==null?void 0:v.formMenuGroup)==null?void 0:E[g])??((C=v==null?void 0:v.formMenuGroup)==null?void 0:C[0]))==null?void 0:w.groupSelect,isRoute:v==null?void 0:v.isRoute,label:v==null?void 0:v.label,prop:v==null?void 0:v.label})}),u.push(b)});let f=[],d=u==null?void 0:u.map(async y=>Yr(y,r,t,n));return d==null||d.forEach(y=>{y==null||y.forEach(g=>{f.push(g)})}),f}},Xl=async(e,n)=>{var a,s,c,u,f,p,d,y,g,b;let t=e+De+n,r=e,o=(s=(a=Vn.value[t])==null?void 0:a.filter(v=>{var m,S;return((m=v==null?void 0:v.key)==null?void 0:m.type)==="structure"&&((S=v==null?void 0:v.key)==null?void 0:S.parentTable)===""}))==null?void 0:s.map(v=>{var m;return(m=v==null?void 0:v.value)==null?void 0:m.pageData}),i={};(o==null?void 0:o.length)>0?(await wt(t,t+nt+`updateLoading${((c=Ee.value)==null?void 0:c.account)||((u=Ee.value)==null?void 0:u.账号)}`),On.setRouteToChildPath(r),Pn.setActiveMenuPath(t+nt+`updateLoading${((f=Ee.value)==null?void 0:f.account)||((p=Ee.value)==null?void 0:p.账号)}`)):(await wt(r+nt,t,i),await wt(t,t+nt+`updateLoading${((d=Ee.value)==null?void 0:d.account)||((y=Ee.value)==null?void 0:y.账号)}`),On.setRouteToChildPath(r),Pn.setActiveMenuPath(t+nt+`updateLoading${((g=Ee.value)==null?void 0:g.account)||((b=Ee.value)==null?void 0:b.账号)}`))},Ql=It(h.pinia),{originalPath:ai}=h.storeToRefs(Ql),eu=e=>e==null?void 0:e.map(t=>(t=li(t),t)),rr=async()=>{var t,r,o,i,a,s,c,u,f,p,d,y;let e;const n=await h.getInsofDataApi({key:{type:"structure",pageKey:"menu",systemKey:sessionStorage.getItem("systemKey")}});return(s=(a=(i=(o=(r=(t=n.data.result)==null?void 0:t[0])==null?void 0:r.value)==null?void 0:o.pageData)==null?void 0:i.compData)==null?void 0:a[0])!=null&&s.contents&&(e=eu((y=(d=(p=(f=(u=(c=n.data.result)==null?void 0:c[0])==null?void 0:u.value)==null?void 0:f.pageData)==null?void 0:p.compData)==null?void 0:d[0])==null?void 0:y.contents)),e},tu=e=>{var r,o,i;const n=(o=(r=e==null?void 0:e.compData)==null?void 0:r.find(a=>(a==null?void 0:a.key)==="header"))==null?void 0:o.contents;return{label:e==null?void 0:e.name,value:e==null?void 0:e.name,children:n!=null&&n.every(a=>!Array.isArray(a))?n==null?void 0:n.map(a=>({label:a==null?void 0:a.label,value:a==null?void 0:a.label})):(i=en(n==null?void 0:n[0]))==null?void 0:i.map(a=>({label:a==null?void 0:a.label,value:a==null?void 0:a.label}))}},si=async e=>{var o,i;let n="";(o=h.cloneDeep(e))==null||o.forEach(a=>{n=n===""?n+a:n+"/"+a});let t="";(i=h.cloneDeep(e))==null||i.forEach((a,s)=>{s!==(e==null?void 0:e.length)-1?t=t===""?t+a:t+"/"+a:t=t+ai.value+a});const r=await $e(n,sessionStorage.getItem("systemKey"),"");return r||await $e(t,sessionStorage.getItem("systemKey"),"")},nu=async e=>{var r,o,i;const n=await si(e);let t=[];return((r=n==null?void 0:n.data)==null?void 0:r.type)==="success"&&(t=(i=(o=n.data.result)==null?void 0:o.map(a=>a.value.pageData))==null?void 0:i.filter(a=>(a==null?void 0:a.comp)==="Table"),t=t==null?void 0:t.map(a=>tu(a))),t},ru=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"},{key:"富文本",value:"Quill"}],Ze=[{label:"输入框",value:"Input"},{label:"下拉框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"},{label:"富文本",value:"Quill"},{label:"链接跳转",value:"Link"}],ou=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze},{key:"originalContent",label:"初始值",type:"Input"},{key:"value",label:"固定值",type:"Input"},{key:"isFormColHidden",label:"是否隐藏",name:"是否隐藏",type:"radio",options:[{label:"否",value:!1},{label:"是",value:!0}],value:!1}],iu=async()=>{const e=await rr();return[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze},{key:"multiple",label:"多选",default:!1,type:"Switch"},{key:"originalContent",label:"初始值",type:"Select"},{key:"selectRelateType",label:"下拉绑定类型",type:"Select",options:[{label:"关联绑定列",value:"关联绑定列"},{label:"自定义绑定",value:"自定义绑定"}]},{key:"menuSelect",label:"菜单选项",type:"cascader",options:e},{key:"groupSelect",label:"组信息选项",type:"cascader",options:[]},{key:"contents",label:"选项值",type:"Input"}]},au=async()=>[{value:"",id:"v1",label:"菜单选项",name:"菜单选项",type:"cascader",contents:await rr()},{value:"",id:"v2",label:"组信息选项",name:"组信息选项",type:"cascader",contents:[]},{value:"",id:"v2",label:"选项值",name:"选项值",type:"Input",contents:[]}],su=l.computed(async()=>await iu()),lu=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze},{key:"originalContent",label:"初始值",type:"Date"},{key:"isNewDate",label:"当前时间",type:"Switch",value:!1}],uu=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze},{key:"value",label:"固定值",type:"Input"}],cu=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze},{key:"originalContent",label:"初始值",type:"Input"}],Zr=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze}],fu=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze}],hu=[{key:"Input",value:ou},{key:"Select",value:su},{key:"Date",value:lu},{key:"TextArea",value:cu},{key:"Upload",value:Zr},{key:"DragUpload",value:Zr},{key:"Quill",value:fu},{key:"Link",value:uu}],pu=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],du=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:pu},{key:"background",label:"颜色",type:"Color"}],gu=e=>{var t,r,o,i,a,s,c,u;let n=h.cloneDeep(e);if(((t=n==null?void 0:n.find(f=>(f==null?void 0:f.name)==="类型"))==null?void 0:t.type)==="Select"&&((i=(o=(r=h.cloneDeep(n))==null?void 0:r.find(f=>(f==null?void 0:f.name)==="选项值"))==null?void 0:o.value)==null?void 0:i.length)>0){const f=(u=(c=(s=(a=h.cloneDeep(n))==null?void 0:a.find(p=>(p==null?void 0:p.name)==="选项值"))==null?void 0:s.value)==null?void 0:c.split(","))==null?void 0:u.map(p=>({label:p,value:p}));n=n==null?void 0:n.map(p=>((p==null?void 0:p.name)==="初始值"&&(p.contents=f,p.value=(p==null?void 0:p.value)??""),p))}return n},li=e=>{var o;let n={};const t=(o=e==null?void 0:e.filter(i=>!Array.isArray(i)))==null?void 0:o[0];n.label=t,n.value=t;const r=e==null?void 0:e.filter(i=>Array.isArray(i));return r&&(r==null?void 0:r.length)>0&&(n.children=r==null?void 0:r.map(i=>li(i))),n},yu=async e=>{var i,a,s,c;let n=h.cloneDeep(e);const t=(i=e==null?void 0:e.find(u=>(u==null?void 0:u.name)==="下拉绑定类型"))==null?void 0:i.value,r=(a=e==null?void 0:e.find(u=>(u==null?void 0:u.name)==="类型"))==null?void 0:a.value,o=await au();return r==="Select"&&t===""?n=n==null?void 0:n.filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项"&&(u==null?void 0:u.name)!=="选项值"):r==="Select"&&t==="关联绑定列"?n!=null&&n.find(u=>(u==null?void 0:u.name)==="菜单选项"||(u==null?void 0:u.name)==="组信息选项")?n=(s=h.cloneDeep(n))==null?void 0:s.filter(u=>(u==null?void 0:u.name)!=="选项值"):n=[...h.cloneDeep(n),...o].filter(u=>(u==null?void 0:u.name)!=="选项值"):r==="Select"&&t==="自定义绑定"&&(n!=null&&n.find(u=>(u==null?void 0:u.name)==="选项值")?n=(c=h.cloneDeep(n))==null?void 0:c.filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项"):n=[...h.cloneDeep(n),...o].filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项")),n},vu=(e,n)=>{var r;let t=!1;return(r=h.cloneDeep(e))==null||r.forEach(o=>{var i;(o==null?void 0:o.key)==="formContent"&&((i=o==null?void 0:o.contents)==null||i.forEach(a=>{(a==null?void 0:a.key)===n?t=!0:t=t}))}),t},ui=(e,n)=>{var a,s,c,u,f;const t=h.cloneDeep(e);if(!t)return;let r="";(s=(a=h.cloneDeep(t))==null?void 0:a.menuSelect)==null||s.forEach(p=>{p!=null&&p.includes("[")?r=r+ai.value:r=r===""?r+p:r+"/"+p});const o=(c=n==null?void 0:n[r])==null?void 0:c.map(p=>{var d;return(d=p==null?void 0:p.value)==null?void 0:d.pageData});let i=o==null?void 0:o.filter(p=>{var d,y;return(p==null?void 0:p.name)===((y=(d=h.cloneDeep(t))==null?void 0:d.groupSelect)==null?void 0:y[0])});if((i==null?void 0:i.length)===1?i=i==null?void 0:i[0]:(u=h.cloneDeep(i))==null||u.forEach(p=>{var d,y;(p==null?void 0:p.comp)==="Form"&&vu(p==null?void 0:p.compData,(y=(d=h.cloneDeep(t))==null?void 0:d.groupSelect)==null?void 0:y[1])&&(i=p)}),(i==null?void 0:i.comp)==="Form"){let p="";return(f=i==null?void 0:i.compData)==null||f.forEach(d=>{var y;(d==null?void 0:d.key)==="formContent"&&((y=d==null?void 0:d.contents)==null||y.forEach(g=>{var b,v;(g==null?void 0:g.key)===((v=(b=h.cloneDeep(t))==null?void 0:b.groupSelect)==null?void 0:v[1])&&(g.type==="Select"&&!(g!=null&&g.value)?p=void 0:p=g==null?void 0:g.value)}))}),p}};exports.CHANGE_EVENT=Tn;exports.ElButton=Io;exports.ElButtonGroup=Ca;exports.ElFocusTrap=Eo;exports.ElInput=mo;exports.ElMessageBox=Po;exports.ElOverlay=Bo;exports.FOCUS_TRAP_INJECTION_KEY=bo;exports.FormButton=du;exports.FormContent=hu;exports.FormType=ru;exports.INPUT_EVENT=zt;exports.IsJson=Ga;exports.PatchFlags=Et;exports.State=Tl;exports.State$1=Ks;exports.TinyColor=Ao;exports.UPDATE_MODEL_EVENT=St;exports.addPathToTree=an;exports.addTableContents=Ol;exports.animateScrollTo=Ai;exports.baseFlatten=Fn;exports.buttonTypes=ko;exports.cAF=io;exports.convertArrayToTree=Yn;exports.copyAdd=Xl;exports.decryptData=tr;exports.deleteTableContents=Pl;exports.encryptData=bt;exports.fixFormContents=Fl;exports.fixTableContents=Vl;exports.flatRest=to;exports.flattedChildren=vt;exports.flatten=eo;exports.focusElement=_n;exports.focusNode=_i;exports.formContextKey=tn;exports.formItemContextKey=Ln;exports.formToOptionsContents=gu;exports.generateKeyPair=ul;exports.getActivePageStructureId=qo;exports.getAllLeafNodes=zl;exports.getColumnChild=en;exports.getColumnContents=We;exports.getFirstArrayProperty=Gn;exports.getFormContents=Xa;exports.getGradeColumns=$l;exports.getItemData=$e;exports.getLeafNodesRecursive=Jn;exports.getMenusContent=rr;exports.getNewColumnChild=Ul;exports.getNormalizedProps=Ma;exports.getParentConstruct=us;exports.getParentContents=Qa;exports.getParentKey=ls;exports.getScrollBarWidth=ao;exports.getScrollContainer=ki;exports.getScrollElement=Ci;exports.getScrollTop=Ii;exports.getSibling=Hi;exports.getTableFormToForm=jl;exports.getValueToObjectValue=ct;exports.groupByField=Zn;exports.handleRowAuthorityRender=Xn;exports.handleSubmitAsync=pt;exports.hasIn=no;exports.identity=Jr;exports.inputProps=lo;exports.isFocusable=rn;exports.isFragment=xo;exports.isLeaf=po;exports.isValidComponentSize=No;exports.isValidElementNode=Ba;exports.judgeContents=ui;exports.loadingConstruct=wt;exports.loadingSystemType=Ll;exports.menuToContentType=nu;exports.menuToParent=si;exports.methodTableToContent=Ja;exports.overRest=Qr;exports.pick=ro;exports.rAF=oo;exports.resetPassword=ht;exports.scrollIntoView=Di;exports.selectToBase=yu;exports.setToString=Xr;exports.submitTableAsyncByVerify=cn;exports.tableEveryContents=ss;exports.tableToContents=ts;exports.tableToStruct=es;exports.triggerEvent=Ki;exports.useAriaProps=so;exports.useAttrs=uo;exports.useAuthorityState=qn;exports.useComposition=yo;exports.useDeprecated=wo;exports.useDraggable=Mo;exports.useFocusController=go;exports.useFormDisabled=nn;exports.useFormItem=Kn;exports.useFormItemInputId=fo;exports.useFormSize=Hn;exports.useId=qt;exports.useIdInjection=co;exports.useLockscreen=Ro;exports.useMenuState=Ct;exports.useModelComp=gt;exports.useOriginalState=It;exports.useSameTarget=Un;exports.useTableComp=jn;
|
|
32
|
+
`,t+="-----END PUBLIC KEY-----",t},n.hasPublicKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")},n.hasPrivateKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},n.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},n}(rl),bn,ll=typeof process<"u"?(bn=process.env)===null||bn===void 0?void 0:bn.npm_package_version:void 0,un=function(){function e(n){n===void 0&&(n={}),n=n||{},this.default_key_size=n.default_key_size?parseInt(n.default_key_size,10):1024,this.default_public_exponent=n.default_public_exponent||"010001",this.log=n.log||!1,this.key=null}return e.prototype.setKey=function(n){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new Wr(n)},e.prototype.setPrivateKey=function(n){this.setKey(n)},e.prototype.setPublicKey=function(n){this.setKey(n)},e.prototype.decrypt=function(n){try{return this.getKey().decrypt(Hr(n))}catch{return!1}},e.prototype.encrypt=function(n){try{return Gt(this.getKey().encrypt(n))}catch{return!1}},e.prototype.sign=function(n,t,r){try{return Gt(this.getKey().sign(n,t,r))}catch{return!1}},e.prototype.verify=function(n,t,r){try{return this.getKey().verify(n,Hr(t),r)}catch{return!1}},e.prototype.getKey=function(n){if(!this.key){if(this.key=new Wr,n&&{}.toString.call(n)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,n);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=ll,e}();function ul(){const e=new un({default_key_size:"2048"});return{publicKey:e.getPublicKey(),privateKey:e.getPrivateKey()}}function bt(e,n){const t=new un;return t.setPublicKey(n),t.encrypt(e)||""}function tr(e,n){const t=new un;return t.setPrivateKey(n),t.decrypt(e)||""}function Gr(){return typeof new un().encrypt=="function"}const eo=h.useLoginState(h.pinia),{superAdminInfo:cl,cryptoInfo:Se,loginUserInfo:Sn}=h.storeToRefs(eo),fl=Ct(h.pinia),{activeMenuPath:Tt}=h.storeToRefs(fl),Mn=yt(h.pinia),ht="123456",hl=qn(h.pinia),{routerPageStructures:pl}=h.storeToRefs(hl),nr=l.ref(0),dl=l.ref([{label:"用户名称",value:"",name:"userName"}]),ot=l.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),yl=e=>{console.log("handleQueryChange",e)},Yt=l.ref([]),to=l.ref(""),Zt=l.computed(()=>{var n,t,r,i,o;const e=(n=pl.value)==null?void 0:n.find(a=>{var s;return((s=a==null?void 0:a.comp)==null?void 0:s.toUpperCase())==="TABLE"});return e?(to.value=e.name,Yt.value=(i=(r=(t=e==null?void 0:e.compData)==null?void 0:t.find(s=>(s==null?void 0:s.key)==="header"))==null?void 0:r.contents)==null?void 0:i.filter(s=>(s==null?void 0:s.label)!=="操作"),(o=e==null?void 0:e.compData)==null?void 0:o.map(s=>{var c;if((s==null?void 0:s.key)==="rowButton"){const u=[...s==null?void 0:s.contents,{label:"重置密码"}];return{...s,contents:u}}return(s==null?void 0:s.key)==="header"?{...s,contents:(c=s==null?void 0:s.contents)==null?void 0:c.map(u=>{var f,p,d,g;return{...u,isTableColHidden:((f=u==null?void 0:u.prop)==null?void 0:f.includes("头像"))||((p=u==null?void 0:u.prop)==null?void 0:p.includes("签名")),isFormColHidden:((d=u==null?void 0:u.prop)==null?void 0:d.includes("头像"))||((g=u==null?void 0:u.prop)==null?void 0:g.includes("签名"))}})}:s})):[]}),gl=e=>{Mn.setRefreshCurStructure(!1),cn(e.singleContent,e.buttonName,nr.value,e==null?void 0:e.selectItems)},Rn=l.ref(),vl=e=>{console.log("onDoubleClick",e)},ml=(e,n)=>{e==="重置密码"&&Oi.confirm(`该操作将会重置【${(n==null?void 0:n.account)||(n==null?void 0:n.账号)}】的密码为【${ht}】,确认重置?`,"警告",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{Rn.value={...n,password:ht},cn(Rn.value,e,nr.value)}).catch(()=>{h.ElMessage.info("取消重置")})},bl=()=>{Jt(Tt.value).then(e=>{var t;const n=Array.isArray(e)&&(e==null?void 0:e.filter(r=>(r==null?void 0:r.account)!==cl.value.account));Zt.value=(t=Zt.value)==null?void 0:t.map(r=>r.key==="tableContents"?{...r,contents:n==null?void 0:n.map(i=>{var o;return{...i,password:tr(i==null?void 0:i.password,(o=Se==null?void 0:Se.value)==null?void 0:o.privateKey)}})}:r)})},pt=async(e,n,t)=>{var r,i;try{const o=await e(n);return((r=o==null?void 0:o.data)==null?void 0:r.code)===200?(t!=="查询"&&await eo.setLogRecordAsync({type:t,data:n},Tt.value),h.ElMessage.success("保存成功"),Mn.setRefreshCurStructure(!0),o.data.result||((i=o==null?void 0:o.data)==null?void 0:i.code)===200):null}catch(o){h.ElMessage.error(o)}finally{Mn.setCacheUpdatingData(null)}},Sl=async(e,n)=>{var o,a;let t=[];Array.isArray(e)?t=h.cloneDeep(e):t=[h.cloneDeep(e)];const r=(o=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="string"))==null?void 0:o.map(s=>{var u,f,p,d,g,y,b;const c=At(s,Yt.value);return Gr()&&c&&(!c.password&&ot.value?c.password=bt(ht,(u=Se==null?void 0:Se.value)==null?void 0:u.publicKey):c.password&&ot.value&&(c.password=bt(c==null?void 0:c.password,(f=Se==null?void 0:Se.value)==null?void 0:f.publicKey))),{key:{type:"data",layer:s==null?void 0:s.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(p=Tt.value)!=null&&p.startsWith("/")?(d=Tt.value)==null?void 0:d.substring(1):Tt.value,tableId:n,createUserId:(g=Sn.value)==null?void 0:g.id,createUserOrg:((y=Sn.value)==null?void 0:y.dept)||((b=Sn.value)==null?void 0:b.部门名称)},value:{tableData:c}}}),i=(a=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="number"))==null?void 0:a.map(s=>{var u,f;const c=At(s,Yt.value);return Gr()&&c&&(!c.password&&ot.value?c.password=bt(ht,(u=Se==null?void 0:Se.value)==null?void 0:u.publicKey):c.password&&ot.value&&(c.password=bt(c==null?void 0:c.password,(f=Se==null?void 0:Se.value)==null?void 0:f.publicKey))),{id:s==null?void 0:s.id,value:{tableData:c}}});r.length>0&&await pt(h.batchAddInsofDataApi,{dataList:r},"新增"),i.length>0&&(await pt(h.batchUpdateInsofDataApi,{dataList:i},"编辑"),Ge.show=!1)},cn=async(e,n,t,r)=>{if(!(n!=null&&n.includes("删除")))await Sl(e,t);else{let i=[];n!=null&&n.includes("批量")?i=r&&(r==null?void 0:r.length)>0?r==null?void 0:r.map(o=>o==null?void 0:o.id):[]:i=[e==null?void 0:e.id],await pt(h.batchDeleteInsofDataApi,{ids:i},"编辑")}},Jt=async e=>{const n=await pt(h.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),t=n==null?void 0:n.map(r=>{var i,o;return{id:r.id,layer:(i=r.key)==null?void 0:i.layer,tableData:(o=r==null?void 0:r.value)==null?void 0:o.tableData}});return t==null?void 0:t.map(r=>{var i;if(!Array.isArray(r==null?void 0:r.tableData))return{...r.tableData,layer:(i=r.key)==null?void 0:i.layer,id:r.id}})},El={comp:"Group",name:"/系统管理/用户管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:Zt.value,name:""}]}]},Tl=Object.freeze(Object.defineProperty({__proto__:null,changedRow:Rn,clickRowButton:ml,columns:Yt,compName:to,getPageDataAsync:Jt,handleItemDataChange:gl,handleQueryChange:yl,handleSubmitAsync:pt,loginUserIsSuper:ot,onDoubleClick:vl,pageData:Zt,queryFormData:dl,refreshUserTableData:bl,resetPassword:ht,structureId:nr,submitTableAsyncByVerify:cn,tempUserPageData:El},Symbol.toStringTag,{value:"Module"})),It=h.defineStore("originalState",{state:()=>({originalPath:"^"}),actions:{}}),wl=yt(h.pinia),{routeToChildPath:Yr}=h.storeToRefs(wl),Dl=h.useLoginState(h.pinia),{loginUserInfo:Xt,cryptoInfo:En}=h.storeToRefs(Dl),kl=It(h.pinia),{originalPath:Zr}=h.storeToRefs(kl),Al=e=>{var n,t,r;return((t=(n=Xt.value)==null?void 0:n.layer)==null?void 0:t.toUpperCase())==="SUPERADMIN"?!0:((r=Xt.value)==null?void 0:r.account)===(e==null?void 0:e.account)},Cl=async(e,n,t)=>{const r=Jt("/系统管理/角色管理"),i=Jt("/系统管理/部门管理");return await Promise.all([r,i]).then(a=>{var u,f;const s=(u=a==null?void 0:a[0])==null?void 0:u.map(p=>({label:p==null?void 0:p.roleName,value:p==null?void 0:p.roleName})),c=(f=a==null?void 0:a[1])==null?void 0:f.map(p=>({label:p==null?void 0:p.deptName,value:p==null?void 0:p.deptName}));return e==null?void 0:e.map(p=>{var d;return{...p,compData:(d=p==null?void 0:p.compData)==null?void 0:d.map(g=>{var y,b;return(g==null?void 0:g.key)==="header"?{...g,contents:(y=g==null?void 0:g.contents)==null?void 0:y.map(v=>v.prop==="userDept"?{...v,options:c}:v.prop==="userRoles"?{...v,options:s}:v)}:(g==null?void 0:g.key)==="tableContents"?{...g,contents:(b=g==null?void 0:g.contents)==null?void 0:b.map(v=>{var m;return{...v,password:Al(v)?tr(v==null?void 0:v.password,(m=En==null?void 0:En.value)==null?void 0:m.privateKey):v==null?void 0:v.password}})}:g})}})})},Il=async(e,n)=>{const t=sessionStorage.getItem("authority"),r=JSON.parse(t||"");if(Array.isArray(r)){let i;Yr.value?i=Array.isArray(r)&&(r==null?void 0:r.filter(s=>(s==null?void 0:s.includes(e))||(s==null?void 0:s.includes(Yr.value)))):i=Array.isArray(r)&&(r==null?void 0:r.filter(s=>s==null?void 0:s.includes(e)));const o=i==null?void 0:i.map(s=>{var c;return((c=s==null?void 0:s.split("/"))==null?void 0:c.pop())||""});return n==null?void 0:n.map(s=>{var c;return{...s,compData:(c=s==null?void 0:s.compData)==null?void 0:c.map(u=>{var f;return(u==null?void 0:u.key)==="rowButton"||(u==null?void 0:u.key)==="extraButton"?{...u,contents:(f=u==null?void 0:u.contents)==null?void 0:f.filter(p=>o==null?void 0:o.includes(p==null?void 0:p.label))}:u})}})}else return typeof r=="string"&&(r==null?void 0:r.toUpperCase())==="SUPERADMIN"?e==="/系统管理/用户管理"?await Cl(n):n:[]},xl=(e,n)=>{var o,a,s,c;const t=(a=(o=n["系统管理/角色管理"])==null?void 0:o.filter(u=>{var f;return((f=u==null?void 0:u.key)==null?void 0:f.type)==="data"}))==null?void 0:a.map(u=>u.value.tableData),r=(c=(s=e==null?void 0:e.value)==null?void 0:s.tableData)==null?void 0:c.角色名称,i=t==null?void 0:t.find(u=>(u==null?void 0:u.角色名称)===r);return i==null?void 0:i.数据范围};var jt=(e=>(e[e.全部数据权限=0]="全部数据权限",e[e.本部门数据权限=1]="本部门数据权限",e[e.本部门及以下数据权限=2]="本部门及以下数据权限",e[e.仅本人数据权限=3]="仅本人数据权限",e[e.自定义数据权限=4]="自定义数据权限",e))(jt||{});const no=(e,n,t)=>{var a,s,c,u;if(((c=(s=(a=Xt.value)==null?void 0:a.key)==null?void 0:s.layer)==null?void 0:c.toUpperCase())==="SUPERADMIN"||!t)return e;const r=(u=t==null?void 0:t["系统管理/用户管理"])==null?void 0:u.find(f=>{var p;return(f==null?void 0:f.id)===((p=Xt.value)==null?void 0:p.id)}),i=xl(r,t);if(!i)return e;switch(jt==null?void 0:jt[i]){case 0:return e;case 1:return n?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([p,d])=>{var b,v,m,S,A,E,C,w,k;const g=d==null?void 0:d[1],y=p[(p==null?void 0:p.length)-1]===Zr.value;return((v=(b=g==null?void 0:g.key)==null?void 0:b.createUserLayer)==null?void 0:v.toUpperCase())==="SUPERADMIN"||((m=g==null?void 0:g.key)==null?void 0:m.createUserOrg)===((A=(S=r==null?void 0:r.value)==null?void 0:S.tableData)==null?void 0:A.部门名称)||((E=g==null?void 0:g.key)==null?void 0:E.createUserOrg)===((w=(C=r==null?void 0:r.value)==null?void 0:C.tableData)==null?void 0:w.部门名称)&&((k=g==null?void 0:g.key)==null?void 0:k.createUserId)===(r==null?void 0:r.id)||y})):e==null?void 0:e.filter(f=>{var p,d,g,y,b,v,m,S,A;return((d=(p=f==null?void 0:f.key)==null?void 0:p.createUserLayer)==null?void 0:d.toUpperCase())==="SUPERADMIN"||((g=f==null?void 0:f.key)==null?void 0:g.createUserOrg)===((b=(y=r==null?void 0:r.value)==null?void 0:y.tableData)==null?void 0:b.部门名称)||((v=f==null?void 0:f.key)==null?void 0:v.createUserOrg)===((S=(m=r==null?void 0:r.value)==null?void 0:m.tableData)==null?void 0:S.部门名称)&&((A=f==null?void 0:f.key)==null?void 0:A.createUserId)===(r==null?void 0:r.id)});case 2:break;case 3:return n?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([p,d])=>{var b;const g=d==null?void 0:d[1],y=p[(p==null?void 0:p.length)-1]===Zr.value;return((b=g==null?void 0:g.key)==null?void 0:b.createUserId)===(r==null?void 0:r.id)||y})):e==null?void 0:e.filter(f=>{var p;return((p=f==null?void 0:f.key)==null?void 0:p.createUserId)===(r==null?void 0:r.id)})}},Nn=Ct(h.pinia),{activeMenuPath:Bl}=h.storeToRefs(Nn),Ye=yt(h.pinia),Ml=It(h.pinia),{originalPath:ro}=h.storeToRefs(Ml),{payloadTypes:Rl}=h.storeToRefs(Ye),Nl=async(e,n,t,r)=>{var y,b,v,m,S,A,E,C,w,k,T,P,D,x,R,O,G,Z,J,N,$,z,X,K,M,V,L,q,te,F,j,se,_,fe,U,Te,he;const i=(b=(y=e==null?void 0:e.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:y.contents)==null?void 0:b.find(ne=>ne==null?void 0:ne.columnPath);let o=(w=(C=(E=(A=(v=h.cloneDeep(i==null?void 0:i.columnPath))==null?void 0:v.split("["))==null?void 0:A[((S=(m=i==null?void 0:i.columnPath)==null?void 0:m.split("["))==null?void 0:S.length)-1])==null?void 0:E.split("]"))==null?void 0:C[0])==null?void 0:w.replaceAll("'",""),a=(T=(k=h.cloneDeep(i==null?void 0:i.columnPath))==null?void 0:k.split("['"+o+"']"))==null?void 0:T[0],s="",c="",u="";if(a.includes("[")){let ne=(R=(x=(D=(P=a==null?void 0:a.split("["))==null?void 0:P[1])==null?void 0:D.split("]"))==null?void 0:x[0])==null?void 0:R.split("/");c=a,s=(Z=(G=(O=a==null?void 0:a.split("["))==null?void 0:O[1])==null?void 0:G.split("]"))==null?void 0:Z[0];let re="";t==null||t.forEach(le=>{var ve,Ae,Ce,Me,W;((Ae=(ve=le==null?void 0:le.value)==null?void 0:ve.pageData)==null?void 0:Ae.name)===(ne==null?void 0:ne[0])&&((W=(Me=(Ce=le==null?void 0:le.value)==null?void 0:Ce.pageData)==null?void 0:Me.compData)==null||W.forEach(oe=>{var me;(oe==null?void 0:oe.key)==="formContent"&&((me=oe==null?void 0:oe.contents)==null||me.forEach(pe=>{var B;if((pe==null?void 0:pe.prop)===(ne==null?void 0:ne[1])){let Q=or((B=h.cloneDeep(pe))==null?void 0:B.optionUrl,r);re=(pe==null?void 0:pe.value)||Q||""}}))}))}),u=re,a=((J=a==null?void 0:a.split("["))==null?void 0:J[0])+re}let f=[];const p=await h.getInsofDataApi({key:{pageKey:a,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}),d=await h.getInsofDataApi({key:{pageKey:Bl.value,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(n),type:"data"}}),g=[];if(($=(N=d==null?void 0:d.data)==null?void 0:N.result)==null||$.forEach(ne=>{g.push([{id:ne==null?void 0:ne.id},ne.value.tableData])}),Array.isArray((z=p==null?void 0:p.data)==null?void 0:z.result)&&((K=(X=p==null?void 0:p.data)==null?void 0:X.result)==null?void 0:K.length)>0){let ne;(V=(M=p==null?void 0:p.data)==null?void 0:M.result)!=null&&V.find(re=>{var le,ve;return((ve=(le=re==null?void 0:re.value)==null?void 0:le.pageData)==null?void 0:ve.name)===o})&&(ne=await((q=(L=p==null?void 0:p.data)==null?void 0:L.result)==null?void 0:q.map(async re=>{var le,ve,Ae,Ce,Me,W,oe,me,pe,B,Q,ie,Re,Oe,ar,sr,lr,ur,cr,fr,hr,pr;if(((ve=(le=re==null?void 0:re.value)==null?void 0:le.pageData)==null?void 0:ve.name)===o){f=h.cloneDeep((Ce=(Ae=re==null?void 0:re.value)==null?void 0:Ae.pageData)==null?void 0:Ce.compData);const Je=await h.getInsofDataApi({key:{pageKey:a,systemKey:sessionStorage.getItem("systemKey"),tableId:re==null?void 0:re.id,type:"data"}});let xt;if(((W=(Me=Je==null?void 0:Je.data)==null?void 0:Me.result)==null?void 0:W.length)>0)xt=(me=(oe=Je==null?void 0:Je.data)==null?void 0:oe.result)==null?void 0:me.map(H=>{var dr;let ae=[];return ae.push({id:H==null?void 0:H.id}),ae.push((dr=H==null?void 0:H.value)==null?void 0:dr.tableData),ae}),f.push({key:"tableContents",contents:at(xt,(ie=(Q=(B=(pe=re==null?void 0:re.value)==null?void 0:pe.pageData)==null?void 0:B.compData)==null?void 0:Q.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:ie.contents)}),f.push({key:"contentTableId",contents:re==null?void 0:re.id});else{let H=await $e(a,sessionStorage.getItem("systemKey"),"");f=(Oe=(Re=H==null?void 0:H.find(ae=>(ae==null?void 0:ae.name)===o))==null?void 0:Re.compData)==null?void 0:Oe.filter(ae=>(ae==null?void 0:ae.key)!=="tableContents"),H=(lr=(sr=(ar=H==null?void 0:H.find(ae=>(ae==null?void 0:ae.name)===o))==null?void 0:ar.compData)==null?void 0:sr.find(ae=>(ae==null?void 0:ae.key)==="tableContents"))==null?void 0:lr.contents,xt=H,f.push({key:"tableContents",contents:at(xt,(fr=(cr=(ur=H==null?void 0:H.find(ae=>(ae==null?void 0:ae.name)===o))==null?void 0:ur.compData)==null?void 0:cr.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:fr.contents)}),f.push({key:"contentTableId",contents:(H==null?void 0:H.length)!==0?(pr=(hr=H==null?void 0:H.find(ae=>(ae==null?void 0:ae.name)===o))==null?void 0:hr.compData)==null?void 0:pr.id:re==null?void 0:re.id})}s!==""&&(f!=null&&f.find(H=>(H==null?void 0:H.key)==="pageColumn")&&(f=f==null?void 0:f.filter(H=>(H==null?void 0:H.key)!=="pageColumn")),f.push({key:"pageColumn",contents:c}),f!=null&&f.find(H=>(H==null?void 0:H.key)==="columnPath")&&(f=f==null?void 0:f.filter(H=>(H==null?void 0:H.key)!=="columnPath")),f.push({key:"columnPath",contents:s}),f!=null&&f.find(H=>(H==null?void 0:H.key)==="columnUsingPath")&&(f=f==null?void 0:f.filter(H=>(H==null?void 0:H.key)!=="columnUsingPath")),f.push({key:"columnUsingPath",contents:u}),f!=null&&f.find(H=>(H==null?void 0:H.key)==="pageGroup")&&(f=f==null?void 0:f.filter(H=>(H==null?void 0:H.key)!=="pageGroup")),f.push({key:"pageGroup",contents:o}))}})),await Promise.all(ne))}else{let ne="",re="";(te=a==null?void 0:a.split("/"))==null||te.forEach((W,oe)=>{var me;oe<((me=a==null?void 0:a.split("/"))==null?void 0:me.length)-1?ne=ne===""?ne+W:ne+"/"+W:re=W});let le=await $e(ne,sessionStorage.getItem("systemKey"),""),ve;(_=(se=(j=(F=le==null?void 0:le[0])==null?void 0:F.compData)==null?void 0:j.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:se.contents)==null||_.forEach((W,oe)=>{W!=null&&W.isMainKey&&(ve=oe)});let Ae=[];(he=(Te=(U=(fe=le==null?void 0:le[0])==null?void 0:fe.compData)==null?void 0:U.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:Te.contents)==null||he.forEach(W=>{W.find(oe=>oe===re)&&(ve||ve===0)&&Ae.push(W==null?void 0:W[ve])});let Ce=[],Me=await(Ae==null?void 0:Ae.map(async W=>{let oe=await $e(ne+ro.value+W,sessionStorage.getItem("systemKey"),""),me=oe==null?void 0:oe.find(pe=>(pe==null?void 0:pe.name)===o);Ce.push(me)}));await Promise.all(Me),Ce==null||Ce.forEach(W=>{var me,pe,B,Q;let oe=h.cloneDeep(W==null?void 0:W.compData);oe&&(oe=oe==null?void 0:oe.filter(ie=>(ie==null?void 0:ie.key)!=="tableContents"),oe.push({key:"tableContents",contents:at((pe=(me=W==null?void 0:W.compData)==null?void 0:me.find(ie=>(ie==null?void 0:ie.key)==="tableContents"))==null?void 0:pe.contents,(Q=(B=W==null?void 0:W.compData)==null?void 0:B.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Q.contents)}),oe.push({key:"contentTableId",contents:W==null?void 0:W.id}),f.push(oe))})}return f},$e=async(e,n,t="",r=!1,i,o,a)=>{var v,m,S,A,E,C,w;let s,c=new WeakMap;a?c=a:(m=(v=(await h.getPageInsofDataApi({systemKey:n,type:Rl.value})).data.result)==null?void 0:v.filter(T=>{var P,D;return((P=T==null?void 0:T.key)==null?void 0:P.pageKey)!=="menu"&&((D=T==null?void 0:T.key)==null?void 0:D.pageKey)!=="secret"}))==null||m.forEach(T=>{c[T.key.pageKey]?c[T.key.pageKey]=[...c[T.key.pageKey],T]:c[T.key.pageKey]=[T]}),(!r||!i)&&(s=(S=c[e])==null?void 0:S.filter(k=>{var T;return((T=k==null?void 0:k.key)==null?void 0:T.parentTable)===t})),Ye.setPageMapState(c);const u=(A=c[e])==null?void 0:A.filter(k=>{var T;return((T=k==null?void 0:k.key)==null?void 0:T.type)==="structureMethod"}),f=s==null?void 0:s.map(k=>k.id);if(!f)return;let p=(E=c[e])==null?void 0:E.filter(k=>{var T,P,D,x;return((T=k==null?void 0:k.key)==null?void 0:T.type)==="data"&&(f.includes((P=k==null?void 0:k.key)==null?void 0:P.tableId)||f.includes((x=(D=k==null?void 0:k.key)==null?void 0:D.tableId)==null?void 0:x.toString()))});const d=c[e+ro.value]??[];(d==null?void 0:d.length)===0&&(p=no(p,!1,c));let g=[];p==null||p.forEach(k=>{var D;const T=Array.isArray(k.value.tableData)?k.value.tableData:[k.value.tableData];T.unshift({id:k.id});const P=(D=k==null?void 0:k.key)==null?void 0:D.tableId;g!=null&&g.find(x=>(x==null?void 0:x.key)===P)?g=g==null?void 0:g.map(x=>((x==null?void 0:x.key)===P&&(x.contents=[...x.contents,T]),x)):g.push({key:P,contents:[T]})});let y=[];const b=await(s==null?void 0:s.map(async k=>{var x,R,O,G,Z,J,N,$,z,X,K,M,V,L,q,te;const T=k.value.pageData,P=k==null?void 0:k.id;let D=(x=h.cloneDeep(T==null?void 0:T.compData))==null?void 0:x.filter(F=>(F==null?void 0:F.key)!=="tableContents");if(D&&(D!=null&&D.find(F=>(F==null?void 0:F.key)==="header"))&&((O=(R=D==null?void 0:D.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:R.contents)!=null&&O.every(F=>!(F!=null&&F.columnPath)))){let F=at((G=g==null?void 0:g.find(U=>(U==null?void 0:U.key)===k.id))==null?void 0:G.contents,(Z=D==null?void 0:D.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:Z.contents),j=await Jl((J=D==null?void 0:D.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:J.contents,e,(N=D==null?void 0:D.find(U=>(U==null?void 0:U.key)==="tableFilter"))==null?void 0:N.contents,c);j!=null&&j.mainKeys&&D.push({key:"mainRouters",contents:j==null?void 0:j.mainKeys});let se=[],_=[];Array.isArray(j)&&(se=at(j,($=D==null?void 0:D.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:$.contents)),Array.isArray(j==null?void 0:j.tableContents)&&(_=at(j==null?void 0:j.tableContents,(z=D==null?void 0:D.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:z.contents));let fe=[...se,..._];Array.isArray(F)&&(F==null?void 0:F.length)>0&&(fe=[...fe,...F]),D.push({key:"tableContents",contents:fe}),D=D==null?void 0:D.map(U=>{var Te;return(U==null?void 0:U.key)==="header"&&(U.contents=(Te=U.contents)==null?void 0:Te.map(he=>((he==null?void 0:he.prop)===(j==null?void 0:j.mainKey)&&(he.isMainKey=!0),he))),U})}else D&&(D!=null&&D.find(F=>(F==null?void 0:F.key)==="header"))&&(D=await Nl(h.cloneDeep(D),P,s,c),T.tableId=(X=D==null?void 0:D.find(F=>(F==null?void 0:F.key)==="contentTableId"))==null?void 0:X.contents);if(T.id=k==null?void 0:k.id,T.isShow=(M=(K=k==null?void 0:k.value)==null?void 0:K.pageData)==null?void 0:M.isShow,T.compData=D,((V=k.key)==null?void 0:V.type)!=="method")(L=T==null?void 0:T.compData)!=null&&L.every(F=>Array.isArray(F))?((q=T==null?void 0:T.compData)==null?void 0:q.length)===0?y.push(T):(te=T==null?void 0:T.compData)==null||te.forEach((F,j)=>{let se;j===0?se={comp:T==null?void 0:T.comp,compData:F,id:T==null?void 0:T.id,name:T==null?void 0:T.name,isShow:T==null?void 0:T.isShow}:se={comp:T==null?void 0:T.comp,compData:F,id:T==null?void 0:T.id,name:"",isShow:T==null?void 0:T.isShow},y.push(se)}):y.push(T);else{let F;F={name:"",compData:[T],comp:"calculator"},y.push(F)}}));return await Promise.all(b),((C=u==null?void 0:u.map(k=>k.value.pageData))==null?void 0:C.filter(k=>Object.values(k).length>0).length)>0&&y.push({comp:"methodButton",name:"",compData:(w=u==null?void 0:u.map(k=>k.value.pageData))==null?void 0:w.filter(k=>Object.values(k).length>0)}),y=y.sort((k,T)=>k.id-T.id),o?y:await Il(e,y)},Pl=async e=>{await h.deleteInsofDataApi({id:e}),Ye.setTableLoading(!1)},Ol=async(e,n,t,r,i,o,a,s)=>{var p,d,g,y,b,v,m,S,A,E,C,w,k,T,P,D,x,R,O,G,Z,J,N,$;let c=((d=(p=a==null?void 0:a.content)==null?void 0:p[0])==null?void 0:d.id)??"",u=(g=s==null?void 0:s.param)==null?void 0:g.url,f;if(c!==""&&((y=a==null?void 0:a.content)==null?void 0:y.length)>1&&typeof((v=(b=a==null?void 0:a.content)==null?void 0:b[0])==null?void 0:v.id)!="string"){const z=await h.getInsofDataApi({id:c});let X=((E=(A=(S=(m=z==null?void 0:z.data)==null?void 0:m.result)==null?void 0:S[0])==null?void 0:A.key)==null?void 0:E.tableId)??"",K=((T=(k=(w=(C=z==null?void 0:z.data)==null?void 0:C.result)==null?void 0:w[0])==null?void 0:k.key)==null?void 0:T.pageKey)??"";const M=await h.createInsofDataApi({key:{type:e,pageKey:u||K||n,tableId:X||t,systemKey:r},value:{tableData:ct(i,(P=We(o))==null?void 0:P.filter(V=>V!=="操作"))}});((D=M==null?void 0:M.data)==null?void 0:D.code)===200?(f=(x=M==null?void 0:M.data)==null?void 0:x.result,h.ElMessage.success("保存成功")):h.ElMessage.error("保存响应失败"),Ye.setTableLoading(!1)}else{let z;if(a!=null&&a.parentTableId){let K=await h.getInsofDataApi({id:a==null?void 0:a.parentTableId});z=(Z=(G=(O=(R=K==null?void 0:K.data)==null?void 0:R.result)==null?void 0:O[0])==null?void 0:G.key)==null?void 0:Z.pageKey}const X=await h.createInsofDataApi({key:{type:e,pageKey:u||z||n,tableId:a!=null&&a.parentTableId?a==null?void 0:a.parentTableId:t,systemKey:r},value:{tableData:ct(i,(J=We(o))==null?void 0:J.filter(K=>K!=="操作"))}});((N=X==null?void 0:X.data)==null?void 0:N.code)===200?(f=($=X==null?void 0:X.data)==null?void 0:$.result,h.ElMessage.success("保存成功")):h.ElMessage.error("保存响应失败"),Ye.setTableLoading(!1)}return f},Vl=async(e,n,t,r,i,o,a)=>{var f,p,d,g,y,b,v,m,S,A,E,C;if(!r)return;const s=await h.getInsofDataApi({id:r});let c=((g=(d=(p=(f=s==null?void 0:s.data)==null?void 0:f.result)==null?void 0:p[0])==null?void 0:d.key)==null?void 0:g.tableId)??"",u=((m=(v=(b=(y=s==null?void 0:s.data)==null?void 0:y.result)==null?void 0:b[0])==null?void 0:v.key)==null?void 0:m.pageKey)??"";if(c&&c!==""){const w=await h.updateInsofDataApi({key:{type:e,pageKey:u,tableId:c,systemKey:i},value:{tableData:ct(o,(S=We(a))==null?void 0:S.filter(k=>k!=="操作"))},id:r});((A=w==null?void 0:w.data)==null?void 0:A.code)===200?h.ElMessage.success("保存成功"):h.ElMessage.error("保存响应失败"),Ye.setTableLoading(!1)}else{const w=await h.updateInsofDataApi({key:{type:e,pageKey:n,tableId:t,systemKey:i},value:{tableData:ct(o,(E=We(a))==null?void 0:E.filter(k=>k!=="操作"))},id:r});((C=w==null?void 0:w.data)==null?void 0:C.code)===200?h.ElMessage.success("保存成功"):h.ElMessage.error("保存响应失败"),Ye.setTableLoading(!1)}},Fl=async(e,n)=>{await h.updateInsofDataApi({value:{pageData:n},id:e})},Ll=async()=>{var e,n,t,r,i,o,a,s,c;try{const u=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),layer:"superAdmin"}});if(((e=u==null?void 0:u.data)==null?void 0:e.code)===200){const f=(i=(r=(t=(n=u==null?void 0:u.data)==null?void 0:n.result)==null?void 0:t[0])==null?void 0:r.key)==null?void 0:i.systemType;let p="browser";f==="制造系统"&&(p="client"),f==="三维系统"&&(p="three"),Nn.setPlatform(p),Nn.setPlatName(((c=(s=(a=(o=u==null?void 0:u.data)==null?void 0:o.result)==null?void 0:a[0])==null?void 0:s.key)==null?void 0:c.name)??"")}}catch(u){return Promise.reject(u)}},ut=l.ref(0),Pn=Ct(h.pinia),Kl=It(h.pinia),{originalPath:nt}=h.storeToRefs(Kl),Hl=h.useLoginState(h.pinia),_l=jn(h.pinia),{multipleTableConst:ge}=h.storeToRefs(_l),{loginUserInfo:Ee}=h.storeToRefs(Hl),{activeMenuPath:Su}=h.storeToRefs(Pn),On=yt(h.pinia),{pageMapState:Vn}=h.storeToRefs(On),ke=nt.value,Qt=e=>e==null?void 0:e.map(t=>{var r;return ut.value++,Array.isArray(t)?Qt(t):{label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":(t==null?void 0:t.prop)??"a"+ut.value,width:(t==null?void 0:t.label)==="操作"?"200":t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!0,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??ut.value,type:(t==null?void 0:t.label)==="操作"?"operate":void 0,formType:(t==null?void 0:t.formType)??(t!=null&&t.groupSelect?"Select":""),isHidden:t==null?void 0:t.isHidden,options:(t==null?void 0:t.options)??[],children:Qt(t.children)??void 0,formMenuSelect:(t==null?void 0:t.formMenuSelect)??[],groupSelect:t!=null&&t.groupSelect?(r=t==null?void 0:t.groupSelect)==null?void 0:r.replaceAll('"',"").split(":"):[],isMainKey:(t==null?void 0:t.isMainKey)||!!(t!=null&&t.directiveLabel)}}),zl=e=>{const n=[];function t(r){if(Array.isArray(r))for(const i of r)!i.children||i.children.length===0?n.push(i):t(i.children)}return t(e),n},$l=e=>h.cloneDeep(e).map(t=>(Array.isArray(t)&&(t=t.map(r=>{var i;return Array.isArray(r)?r=Qt(r):(r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":(r==null?void 0:r.prop)??"a"+ut.value,width:(r==null?void 0:r.label)==="操作"?"200":r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??ut.value,type:(r==null?void 0:r.label)==="操作"?"operate":void 0,formType:(r==null?void 0:r.formType)??(r!=null&&r.groupSelect?"Select":""),isHidden:r==null?void 0:r.isHidden,options:(r==null?void 0:r.options)??[],children:Qt(r.children),formMenuSelect:(r==null?void 0:r.formMenuSelect)??[],groupSelect:r!=null&&r.groupSelect?(i=r==null?void 0:r.groupSelect)==null?void 0:i.replaceAll('"',"").split(":"):[],isMainKey:(r==null?void 0:r.isMainKey)||!!(r!=null&&r.directiveLabel)},ut.value++),r})),t)),en=e=>{function n(t,r=[],i=""){if(!t||t.length===0)return[];let o=r;return Array.isArray(t)&&(t==null||t.forEach(a=>{var s,c,u,f,p,d,g,y,b,v,m,S,A;if(a!=null&&a.children&&((s=a.children)==null?void 0:s.length)>0){let E=i===""?i+((p=(c=a==null?void 0:a.prop)==null?void 0:c.split(ge.value))==null?void 0:p[((f=(u=a==null?void 0:a.prop)==null?void 0:u.split(ge.value))==null?void 0:f.length)-1]):i+ge.value+((b=(d=a==null?void 0:a.prop)==null?void 0:d.split(ge.value))==null?void 0:b[((y=(g=a==null?void 0:a.prop)==null?void 0:g.split(ge.value))==null?void 0:y.length)-1]);o=n(a==null?void 0:a.children,o,E)}else i!==""&&(a.prop=i+ge.value+((A=(v=a==null?void 0:a.prop)==null?void 0:v.split(ge.value))==null?void 0:A[((S=(m=a==null?void 0:a.prop)==null?void 0:m.split(ge.value))==null?void 0:S.length)-1])),o.push(a)})),o}return n(e)},Ul=e=>{function n(t,r=[],i=""){if(!t||t.length===0)return[];let o=r;return Array.isArray(t)&&(o=t==null?void 0:t.map(a=>{var s,c,u,f,p,d,g,y,b,v,m,S,A;if(a!=null&&a.children&&((s=a.children)==null?void 0:s.length)>0){let E=i===""?i+((p=(c=a==null?void 0:a.prop)==null?void 0:c.split(ge.value))==null?void 0:p[((f=(u=a==null?void 0:a.prop)==null?void 0:u.split(ge.value))==null?void 0:f.length)-1]):i+ge.value+((b=(d=a==null?void 0:a.prop)==null?void 0:d.split(ge.value))==null?void 0:b[((y=(g=a==null?void 0:a.prop)==null?void 0:g.split(ge.value))==null?void 0:y.length)-1]);a.children=n(a==null?void 0:a.children,o,E)}else i!==""&&(a.prop=i+ge.value+((A=(v=a==null?void 0:a.prop)==null?void 0:v.split(ge.value))==null?void 0:A[((S=(m=a==null?void 0:a.prop)==null?void 0:m.split(ge.value))==null?void 0:S.length)-1]));return a})),o}return n(e)},jl=e=>{let n=h.cloneDeep(e);return n=n==null?void 0:n.map(t=>((t==null?void 0:t.type)==="Select"?t={label:t==null?void 0:t.label,prop:t==null?void 0:t.prop,name:t==null?void 0:t.name,type:t==null?void 0:t.type,value:(t==null?void 0:t.value)??"",optionUrl:{groupSelect:t==null?void 0:t.groupSelect,menuSelect:t==null?void 0:t.menuSelect,type:"Select",selectRelateType:t==null?void 0:t.selectRelateType,multiple:t==null?void 0:t.multiple}}:(t==null?void 0:t.type)==="Date"&&(t.value=!(t!=null&&t.value)&&(t==null?void 0:t.isNewDate)!==!1?new Date:t==null?void 0:t.value),t.label=t.prop||t.label,t)),n},ql=e=>{var n,t,r,i,o,a;if(((n=e==null?void 0:e.pageData)==null?void 0:n.comp)==="Form"){let s=(r=(t=e==null?void 0:e.pageData)==null?void 0:t.compData)==null?void 0:r.map(u=>{var f;return(u==null?void 0:u.key)==="formContent"&&(u.contents=(f=u.contents)==null?void 0:f.map(p=>((p==null?void 0:p.type)==="Date"&&(p.value=""),p))),u});return{pageData:{comp:(i=e==null?void 0:e.pageData)==null?void 0:i.comp,compData:s,name:(o=e==null?void 0:e.pageData)==null?void 0:o.name,isShow:(a=e==null?void 0:e.pageData)==null?void 0:a.isShow}}}else return e},Wl=(e,n)=>{var r,i,o,a,s,c,u,f,p;let t=(o=(i=(r=n==null?void 0:n.pageData)==null?void 0:r.compData)==null?void 0:i.find(d=>(d==null?void 0:d.key)==="formContent"))==null?void 0:o.contents;if(((a=e==null?void 0:e.pageData)==null?void 0:a.comp)==="Form"){let d=(c=(s=e==null?void 0:e.pageData)==null?void 0:s.compData)==null?void 0:c.map(y=>{var b;return(y==null?void 0:y.key)==="formContent"&&(y.contents=(b=y.contents)==null?void 0:b.map(v=>{var m;return v.value=(m=t==null?void 0:t.find(S=>(S==null?void 0:S.key)===(v==null?void 0:v.key)))==null?void 0:m.value,v})),y});return{pageData:{comp:(u=e==null?void 0:e.pageData)==null?void 0:u.comp,compData:d,name:(f=e==null?void 0:e.pageData)==null?void 0:f.name,isShow:(p=e==null?void 0:e.pageData)==null?void 0:p.isShow}}}else return e},wt=async(e,n,t,r,i)=>{var b,v,m,S,A,E,C,w,k,T,P,D,x,R,O,G,Z,J,N,$,z,X,K;let o=e;(o==null?void 0:o[(o==null?void 0:o.length)-1])!==ke&&(o="",(v=(b=h.cloneDeep(e))==null?void 0:b.split(ke))==null||v.forEach((M,V)=>{var L,q;V!==((q=(L=h.cloneDeep(e))==null?void 0:L.split(ke))==null?void 0:q.length)-1&&(o=o===""?o+M:o+"/"+M)}),o=o+ke);let a=[],s=await h.getInsofDataApi({key:{pageKey:e,systemKey:sessionStorage.getItem("systemKey")}});const c={data:{result:(S=(m=s==null?void 0:s.data)==null?void 0:m.result)==null?void 0:S.filter(M=>{var V;return((V=M==null?void 0:M.key)==null?void 0:V.type)==="structure"})}};let u;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==ke&&(u={data:{result:(A=Vn.value[o])==null?void 0:A.filter(M=>{var V;return((V=M==null?void 0:M.key)==null?void 0:V.type)==="structure"})}},((C=(E=u==null?void 0:u.data)==null?void 0:E.result)==null?void 0:C.length)>0&&(u=(k=(w=h.cloneDeep(u))==null?void 0:w.data)==null?void 0:k.result));const f={data:{result:(T=Vn.value[o])==null?void 0:T.filter(M=>{var V;return((V=M==null?void 0:M.key)==null?void 0:V.type)==="structureMethod"})}},p={data:{result:(D=(P=s==null?void 0:s.data)==null?void 0:P.result)==null?void 0:D.filter(M=>{var V;return((V=M==null?void 0:M.key)==null?void 0:V.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==ke){let M=(x=c==null?void 0:c.data)==null?void 0:x.result;if(!Array.isArray(u))return;u==null||u.forEach(V=>{var q,te,F,j,se;let L=(q=M==null?void 0:M.find(_=>{var fe,U,Te,he;return((U=(fe=V==null?void 0:V.value)==null?void 0:fe.pageData)==null?void 0:U.name)===((he=(Te=_==null?void 0:_.value)==null?void 0:Te.pageData)==null?void 0:he.name)}))==null?void 0:q.value;L?L=L:L=void 0,a.push({key:{pageKey:n,parentTable:((te=L==null?void 0:L.key)==null?void 0:te.parentTable)??"",systemKey:(F=V==null?void 0:V.key)==null?void 0:F.systemKey,type:((j=L==null?void 0:L.key)==null?void 0:j.type)??((se=V==null?void 0:V.key)==null?void 0:se.type),version:1},value:Wl(V==null?void 0:V.value,L)})})}else(O=(R=c==null?void 0:c.data)==null?void 0:R.result)==null||O.forEach(M=>{var V,L,q;a.push({key:{pageKey:n,parentTable:(V=M==null?void 0:M.key)==null?void 0:V.parentTable,systemKey:(L=M==null?void 0:M.key)==null?void 0:L.systemKey,type:(q=M==null?void 0:M.key)==null?void 0:q.type,version:1},value:ql(M==null?void 0:M.value)})});if((Z=(G=f==null?void 0:f.data)==null?void 0:G.result)==null||Z.forEach(M=>{var V,L;a.push({key:{pageKey:n,systemKey:(V=M==null?void 0:M.key)==null?void 0:V.systemKey,type:(L=M==null?void 0:M.key)==null?void 0:L.type,version:1},value:M==null?void 0:M.value})}),a=a==null?void 0:a.map(M=>{var V,L,q;return((L=(V=M==null?void 0:M.value)==null?void 0:V.pageData)==null?void 0:L.comp)==="Form"&&(M.value.pageData.compData=(q=M.value.pageData.compData)==null?void 0:q.map(te=>{var F;return(te==null?void 0:te.key)==="formContent"&&(te.contents=(F=te.contents)==null?void 0:F.map(j=>(t!=null&&t[j==null?void 0:j.key]&&(j==null?void 0:j.type)!=="Date"&&(j.value=t[j.key]),j))),te}),r&&M.value.pageData.compData.push({key:"parentFormPath",contents:r})),M}),(a==null?void 0:a.length)>0){let M;if(!i)M=a;else{const V=a==null?void 0:a.find(q=>{var te,F;return i==null?void 0:i.includes((F=(te=q==null?void 0:q.value)==null?void 0:te.pageData)==null?void 0:F.name)}),L=/^[A-Za-z]+$/;M=V?a==null?void 0:a.map(q=>{var te,F,j,se,_,fe;return i!=null&&i.includes((F=(te=q==null?void 0:q.value)==null?void 0:te.pageData)==null?void 0:F.name)?{...q,value:{pageData:{...(j=q==null?void 0:q.value)==null?void 0:j.pageData,compData:(fe=(_=(se=q==null?void 0:q.value)==null?void 0:se.pageData)==null?void 0:_.compData)==null?void 0:fe.map(U=>{var Te;return(U==null?void 0:U.key)==="formContent"?{...U,contents:(Te=U==null?void 0:U.contents)==null?void 0:Te.map(he=>L.test(he==null?void 0:he.prop)?he:{...he,value:""})}:U})}}}:q}):a}await h.batchAddInsofDataApi({dataList:M})}let d={};const g=await h.getInsofDataApi({key:{pageKey:n,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});((N=(J=c==null?void 0:c.data)==null?void 0:J.result)==null?void 0:N.length)>0&&((z=($=c==null?void 0:c.data)==null?void 0:$.result)==null||z.forEach(M=>{var V,L,q;d[M.id]=(q=(L=(V=g==null?void 0:g.data)==null?void 0:V.result)==null?void 0:L.find(te=>{var F,j,se,_;return((j=(F=te==null?void 0:te.value)==null?void 0:F.pageData)==null?void 0:j.name)===((_=(se=M==null?void 0:M.value)==null?void 0:se.pageData)==null?void 0:_.name)}))==null?void 0:q.id}));let y=[];(K=(X=p==null?void 0:p.data)==null?void 0:X.result)==null||K.forEach(M=>{var V,L,q;y.push({key:{pageKey:n,tableId:d[(V=M==null?void 0:M.key)==null?void 0:V.tableId],systemKey:(L=M==null?void 0:M.key)==null?void 0:L.systemKey,type:(q=M==null?void 0:M.key)==null?void 0:q.type},value:M==null?void 0:M.value})}),(y==null?void 0:y.length)>0&&await h.batchAddInsofDataApi({dataList:y})},io=(e,n)=>{let t=h.cloneDeep(e);return t=t==null?void 0:t.map(i=>{var c,u,f;let o=[],a=[];for(let p in n)if(p!=null&&p.includes((u=(c=h.cloneDeep(i))==null?void 0:c.key)==null?void 0:u.pageKey)){let d=(f=n[p])==null?void 0:f.filter(g=>{var y,b,v;return((y=g==null?void 0:g.key)==null?void 0:y.type)==="data"&&((b=g==null?void 0:g.key)==null?void 0:b.tableId)===((v=h.cloneDeep(i))==null?void 0:v.id)});a=[...a,...d]}(a==null?void 0:a.length)>0&&(a==null||a.forEach(p=>{o.push(p.value.tableData)}));let s=h.cloneDeep(i).value.pageData.compData;return s.push({key:"tableContents",contents:o}),i.value.pageData.compData=s,i}),t},oo=(e,n)=>{if(!(e!=null&&e.includes("[")))return e;let t=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),r=n==null?void 0:n.map(o=>{var a;return(a=o==null?void 0:o.value)==null?void 0:a.pageData}),i="";return r==null||r.forEach(o=>{var a;(o==null?void 0:o.name)===(t==null?void 0:t[0])&&((a=o==null?void 0:o.compData)==null||a.forEach(s=>{var c;(s==null?void 0:s.key)==="header"&&((c=s==null?void 0:s.contents)==null||c.forEach((u,f)=>{(u==null?void 0:u.prop)===(t==null?void 0:t[1])&&(i=f)}))}))}),i},ao=(e,n)=>{if(!(e!=null&&e.includes("[")))return e;let t=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),r=n==null?void 0:n.map(o=>{var a;return(a=o==null?void 0:o.value)==null?void 0:a.pageData}),i="";return r==null||r.forEach(o=>{var a;(o==null?void 0:o.name)===(t==null?void 0:t[0])&&((a=o==null?void 0:o.compData)==null||a.forEach(s=>{var c;(s==null?void 0:s.key)==="formContent"&&((c=s==null?void 0:s.contents)==null||c.forEach(u=>{(u==null?void 0:u.prop)===(t==null?void 0:t[1])&&(i=u==null?void 0:u.value)}))}))}),i},Jr=(e,n,t,r)=>{var c,u,f;let i=(c=e==null?void 0:e[0])==null?void 0:c.formMenuSelect,o=e==null?void 0:e.map(p=>{var d,g;return(g=(d=p.groupSelect)==null?void 0:d.split(":"))==null?void 0:g[1]}),a="";i==null||i.forEach((p,d)=>{(i==null?void 0:i.length)-1!==d?a=a===""?a+p:a+"/"+p:a=a+ke+p});let s=[];for(let p in n)if(p!=null&&p.includes(a)){let d=(u=n[p])==null?void 0:u.filter(g=>{var y,b;return((y=g==null?void 0:g.key)==null?void 0:y.type)==="structure"&&((b=g==null?void 0:g.key)==null?void 0:b.parentTable)===""});s=[...s,...d]}if((s==null?void 0:s.length)>0){let p=s==null?void 0:s.filter(v=>{var m,S,A;return((m=v==null?void 0:v.key)==null?void 0:m.pageKey)!==a&&((A=(S=v==null?void 0:v.value)==null?void 0:S.pageData)==null?void 0:A.comp)==="Form"}),d=s==null?void 0:s.filter(v=>{var m,S,A;return((m=v==null?void 0:v.key)==null?void 0:m.pageKey)!==a&&((A=(S=v==null?void 0:v.value)==null?void 0:S.pageData)==null?void 0:A.comp)==="Table"});d=io(h.cloneDeep(d),n),p=[...h.cloneDeep(p),...d],p=p==null?void 0:p.map(v=>({[v.key.pageKey]:v}));let g=0;p=p.reduce((v,m)=>(Object.keys(m).forEach(S=>{v[S]||(v[S]=[],v[S].push({index:g})),v[S].push(m[S])}),g++,v),{});let y=(f=Object.values(p))==null?void 0:f.sort((v,m)=>{var E,C;let S=(E=v==null?void 0:v.find(w=>w==null?void 0:w.index))==null?void 0:E.index,A=(C=m==null?void 0:m.find(w=>w==null?void 0:w.index))==null?void 0:C.index;return S-A});p=y==null?void 0:y.map(v=>v==null?void 0:v.filter(m=>{var S,A,E,C;return!(m!=null&&m.index)&&(m==null?void 0:m.index)!==0&&!((A=(S=m==null?void 0:m.key)==null?void 0:S.pageKey)!=null&&A.includes("updateLoading"))&&!((C=(E=m==null?void 0:m.key)==null?void 0:E.pageKey)!=null&&C.includes("loading"))}));let b=[];if(p==null||p.forEach(v=>{var A,E,C,w,k,T,P,D,x,R;const m=v==null?void 0:v.find(O=>{var G,Z,J,N,$;return((Z=(G=O==null?void 0:O.value)==null?void 0:G.pageData)==null?void 0:Z.name)===(($=(N=(J=e==null?void 0:e[0])==null?void 0:J.groupSelect)==null?void 0:N.split(":"))==null?void 0:$[0])});let S=(k=(w=(C=(E=(A=h.cloneDeep(m))==null?void 0:A.value)==null?void 0:E.pageData)==null?void 0:C.compData)==null?void 0:w.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:k.contents;if(S){let O=[];o==null||o.forEach((G,Z)=>{var $,z,X,K,M,V;let J=v==null?void 0:v.find(L=>{var q,te,F,j,se;return((te=(q=L==null?void 0:L.value)==null?void 0:q.pageData)==null?void 0:te.name)===((se=(j=(F=e==null?void 0:e[Z])==null?void 0:F.groupSelect)==null?void 0:j.split(":"))==null?void 0:se[0])}),N=(M=(K=(X=(z=($=h.cloneDeep(J))==null?void 0:$.value)==null?void 0:z.pageData)==null?void 0:X.compData)==null?void 0:K.find(L=>(L==null?void 0:L.key)==="formContent"))==null?void 0:M.contents;N!=null&&N.find(L=>(L==null?void 0:L.key)===G)?O.push((V=N==null?void 0:N.find(L=>(L==null?void 0:L.key)===G))==null?void 0:V.value):O.push("")}),b.push(O)}else S=(R=(x=(D=(P=(T=h.cloneDeep(m))==null?void 0:T.value)==null?void 0:P.pageData)==null?void 0:D.compData)==null?void 0:x.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:R.contents,S==null||S.forEach(O=>{let G=[];o==null||o.forEach(Z=>{O!=null&&O[Z]&&G.push(O==null?void 0:O[Z])}),b.push(G)})}),(t==null?void 0:t.length)>0){let v={};t==null||t.forEach(m=>{var S;for(let A in m){let E=h.cloneDeep(A);if(!(E!=null&&E.includes("[")))(S=m[A])!=null&&S.includes("[")||(v[E]=m[A]);else{let C=ao(E,n[r]),w=oo(m[A],n[r]);v[C]=w}}});for(let m in v)b=b==null?void 0:b.filter(S=>S[v[m]]===m)}return b}},Gl=(e,n,t,r)=>{var s,c,u,f,p;let i=h.cloneDeep(e),o=n==null?void 0:n.map(d=>d==null?void 0:d.prop),a=[];for(let d in t)if(d!=null&&d.includes(i)){let g=(s=t[d])==null?void 0:s.filter(y=>{var b,v;return((b=y==null?void 0:y.key)==null?void 0:b.type)==="structure"&&((v=y==null?void 0:y.key)==null?void 0:v.parentTable)===""});a=[...a,...g]}if((a==null?void 0:a.length)>0){let d=a==null?void 0:a.filter(E=>{var C,w,k,T;return((C=E==null?void 0:E.key)==null?void 0:C.pageKey)!==i&&((k=(w=E==null?void 0:E.value)==null?void 0:w.pageData)==null?void 0:k.comp)==="Form"&&(E==null?void 0:E.key.pageKey.includes(i+ke))&&!((T=E==null?void 0:E.key.pageKey)!=null&&T.includes("@"))}),g=a==null?void 0:a.filter(E=>{var C,w,k,T;return((C=E==null?void 0:E.key)==null?void 0:C.pageKey)!==i&&((k=(w=E==null?void 0:E.value)==null?void 0:w.pageData)==null?void 0:k.comp)==="Table"&&(E==null?void 0:E.key.pageKey.includes(i+ke))&&!((T=E==null?void 0:E.key.pageKey)!=null&&T.includes("@"))});g=io(h.cloneDeep(g),t),d=[...h.cloneDeep(d),...g],d=d==null?void 0:d.map(E=>({[E.key.pageKey]:E}));let y=0;d=d.reduce((E,C)=>(Object.keys(C).forEach(w=>{E[w]||(E[w]=[],E[w].push({index:y})),E[w].push(C[w])}),y++,E),{}),d=no(d,!0,t);let b=(c=Object.values(d))==null?void 0:c.sort((E,C)=>{var T,P;let w=(T=E==null?void 0:E.find(D=>D==null?void 0:D.index))==null?void 0:T.index,k=(P=C==null?void 0:C.find(D=>D==null?void 0:D.index))==null?void 0:P.index;return w-k});d=b==null?void 0:b.map(E=>E==null?void 0:E.filter(C=>!(C!=null&&C.index)&&(C==null?void 0:C.index)!==0));let v=(u=h.cloneDeep(d))==null?void 0:u.filter(E=>E==null?void 0:E.find(C=>{var w,k,T,P;return((P=(w=C==null?void 0:C.key)==null?void 0:w.pageKey)==null?void 0:P[((T=(k=C==null?void 0:C.key)==null?void 0:k.pageKey)==null?void 0:T.length)-1])===ke}));d=d==null?void 0:d.filter(E=>!(E!=null&&E.find(C=>{var w,k,T,P,D,x,R,O;return((P=(w=C==null?void 0:C.key)==null?void 0:w.pageKey)==null?void 0:P[((T=(k=C==null?void 0:C.key)==null?void 0:k.pageKey)==null?void 0:T.length)-1])===ke||((x=(D=C==null?void 0:C.key)==null?void 0:D.pageKey)==null?void 0:x.includes("updateLoading"))||((O=(R=C==null?void 0:C.key)==null?void 0:R.pageKey)==null?void 0:O.includes("loading"))})));let m=[],S=[];(f=v==null?void 0:v[0])==null||f.forEach(E=>{var C,w,k,T,P;((w=(C=E==null?void 0:E.value)==null?void 0:C.pageData)==null?void 0:w.comp)==="Form"&&((P=(T=(k=E==null?void 0:E.value)==null?void 0:k.pageData)==null?void 0:T.compData)==null||P.forEach(D=>{(D==null?void 0:D.key)==="formContent"&&(S=[...S,...D==null?void 0:D.contents])}))});let A=(p=S==null?void 0:S.find(E=>(E==null?void 0:E.isMain)===!0))==null?void 0:p.key;if(d==null||d.forEach(E=>{let C=[];E==null||E.forEach(k=>{var T,P,D,x,R;((P=(T=k==null?void 0:k.value)==null?void 0:T.pageData)==null?void 0:P.comp)==="Form"&&((R=(x=(D=k==null?void 0:k.value)==null?void 0:D.pageData)==null?void 0:x.compData)==null||R.forEach(O=>{(O==null?void 0:O.key)==="formContent"&&(C=[...C,...O==null?void 0:O.contents])}))});let w={};o==null||o.forEach(k=>{let T=C==null?void 0:C.find(P=>(P==null?void 0:P.key)===k);T!=null&&T.prop&&(w[T.prop]=(T==null?void 0:T.value)??"")}),m.push(w)}),(r==null?void 0:r.length)>0){let E=[];r==null||r.forEach(C=>{var P,D,x,R,O,G,Z,J;let w={};for(let N in C){let $=h.cloneDeep(N);if(!($!=null&&$.includes("[")))C[N].toUpperCase()==="@LOGINUSER"?w[$]=((P=Ee.value)==null?void 0:P.姓名)||((D=Ee.value)==null?void 0:D.account)||((x=Ee.value)==null?void 0:x.账号)||((R=Ee.value)==null?void 0:R.姓名):(O=C[N])!=null&&O.includes("[")||(w[$]=C[N]);else{let z=ao($,t[e]),X=oo(C[N],t[e]);w[z]=X}}let k=[],T=0;for(let N in w)((G=w[N])==null?void 0:G[0])!=="!"?k=(Z=T>0?k:m)==null?void 0:Z.filter(z=>z[N]===w[N]):k=(J=T>0?k:m)==null?void 0:J.filter($=>{var z;return $[N]!==((z=w[N])==null?void 0:z.replaceAll("!",""))}),T=1;E=[...E,...k]}),m=[...new Set(E)]}return m=m==null?void 0:m.map(E=>Object.values(E)),{mainKey:A,tableContents:m}}},Yl=(e,n)=>{var i,o,a,s,c,u;let t=(o=(i=h.cloneDeep(e))==null?void 0:i.split("/"))==null?void 0:o[0],r=[];for(let f in n)if(f!=null&&f.includes(t)){let p=(a=n[f])==null?void 0:a.filter(d=>{var g,y;return((g=d==null?void 0:d.key)==null?void 0:g.type)==="structure"&&((y=d==null?void 0:d.key)==null?void 0:y.parentTable)===""});r=[...r,...p]}return(r==null?void 0:r.length)>0?!!((u=(c=(s=r==null?void 0:r.filter(p=>{var d;return((d=p==null?void 0:p.key)==null?void 0:d.pageKey)===t}))==null?void 0:s[0])==null?void 0:c.key)==null?void 0:u.parentPageKey):!0},Zl=async(e,n,t,r)=>{var a,s,c,u,f,p,d,g,y;let i=(s=(a=h.cloneDeep(e))==null?void 0:a.split("/"))==null?void 0:s[0],o=[];for(let b in r)if(b!=null&&b.includes(i)){let v=(c=r[b])==null?void 0:c.filter(m=>{var S,A;return((S=m==null?void 0:m.key)==null?void 0:S.type)==="structure"&&((A=m==null?void 0:m.key)==null?void 0:A.parentTable)===""});o=[...o,...v]}if((o==null?void 0:o.length)>0){let b=(p=(f=(u=o==null?void 0:o.filter(S=>{var A;return((A=S==null?void 0:S.key)==null?void 0:A.pageKey)===i}))==null?void 0:u[0])==null?void 0:f.key)==null?void 0:p.parentPageKey,v=[];if(b){for(let S in r)if(S!=null&&S.includes(b)){let A=(d=r[S])==null?void 0:d.filter(E=>{var C,w;return((C=E==null?void 0:E.key)==null?void 0:C.type)==="structure"&&((w=E==null?void 0:E.key)==null?void 0:w.parentTable)===""});v=[...v,...A]}}else v=o;let m="";if((v==null?void 0:v.length)>0){let S=[],A;A=(g=v==null?void 0:v.filter(D=>{var x,R,O,G,Z,J;return((O=(R=(x=D==null?void 0:D.key)==null?void 0:x.pageKey)==null?void 0:R.split("/"))==null?void 0:O[0])===b&&((J=(Z=(G=D==null?void 0:D.key)==null?void 0:G.pageKey)==null?void 0:Z.split("/"))==null?void 0:J.length)===2}))==null?void 0:g.map(D=>{var x;return(x=D==null?void 0:D.key)==null?void 0:x.pageKey}),A=[...new Set(A)],A=A==null?void 0:A.filter(D=>!D.includes(ke));let E=(y=h.cloneDeep(A))==null?void 0:y.map(async D=>{var Z,J,N,$,z,X,K,M,V,L,q,te,F,j,se;let x=await $e(D,sessionStorage.getItem("systemKey"),"",!1,[],!1,r),R=($=(N=(J=(Z=h.cloneDeep(x))==null?void 0:Z[0])==null?void 0:J.compData)==null?void 0:N.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:$.contents,O=(L=(V=(M=(K=(X=(z=h.cloneDeep(x))==null?void 0:z[0])==null?void 0:X.compData)==null?void 0:K.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:M.contents)==null?void 0:V.filter(_=>(_==null?void 0:_.label)!=="操作"))==null?void 0:L.map(_=>_==null?void 0:_.prop),G=[];return(se=(j=(F=(te=(q=h.cloneDeep(x))==null?void 0:q[0])==null?void 0:te.compData)==null?void 0:F.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:j.contents)==null||se.forEach(_=>{(_==null?void 0:_.isMainKey)===!0&&(m=_==null?void 0:_.prop)}),R==null||R.forEach(_=>{let fe=ct(_,O);G.push(fe),S.push({key:fe==null?void 0:fe[m],routerContent:D})}),G}),C=await Promise.all(E),w=[];C==null||C.forEach(D=>{(D==null?void 0:D.length)>0&&(D==null||D.forEach(x=>{w.push(x)}))});let k=[];k=n==null?void 0:n.map(D=>{var R,O,G;let x={};for(let Z in D)D[Z].toUpperCase()==="@LOGINUSER"?x[Z]=((R=Ee.value)==null?void 0:R.姓名)||((O=Ee.value)==null?void 0:O.account)||((G=Ee.value)==null?void 0:G.账号):x[Z]=D[Z];return x});let T=[];w==null||w.forEach(D=>{let x=[];k==null||k.forEach(R=>{let O=[];for(let G in R)O.push(D[G]===R[G]);x.push(O)}),x.find(R=>R==null?void 0:R.every(O=>O===!0))&&T.push(D)});let P=[];return T==null||T.forEach(D=>{let x={};t==null||t.forEach(R=>{x[R.prop]=D[R.prop]??""}),P.push(x)}),P=P==null?void 0:P.map(D=>Object.values(D)),{mainKey:m,tableContents:P,mainKeys:S}}else return}else return},Jl=async(e,n,t,r)=>{var o,a,s,c;let i=(o=h.cloneDeep(e))==null?void 0:o.filter(u=>(u==null?void 0:u.label)!=="操作");if((t==null?void 0:t.length)>0&&(i!=null&&i.every(u=>!(u!=null&&u.formMenuSelect)))&&Yl(n,r)){let u=await Zl(n,t,i,r);return u&&((a=u==null?void 0:u.tableContents)==null?void 0:a.length)>0?u:[]}if(!(i!=null&&i.every(u=>{var f,p,d,g;return((f=u==null?void 0:u.formMenuSelect)==null?void 0:f.length)>0&&((d=(p=u==null?void 0:u.groupSelect)==null?void 0:p.split(":"))==null?void 0:d.length)>0||((g=u==null?void 0:u.formMenuGroup)==null?void 0:g.length)>0})))return Gl(n,i,r,t);if(i!=null&&i.every(u=>!(u!=null&&u.formMenuGroup)))return Jr(i,r,t,n);{let u=[];(c=(s=i==null?void 0:i[0])==null?void 0:s.formMenuGroup)==null||c.forEach((g,y)=>{let b=[];i==null||i.forEach(v=>{var m,S,A,E,C,w;b.push({columnPath:v==null?void 0:v.columnPath,formMenuSelect:(A=((m=v==null?void 0:v.formMenuGroup)==null?void 0:m[y])??((S=v==null?void 0:v.formMenuGroup)==null?void 0:S[0]))==null?void 0:A.formMenuSelect,groupSelect:(w=((E=v==null?void 0:v.formMenuGroup)==null?void 0:E[y])??((C=v==null?void 0:v.formMenuGroup)==null?void 0:C[0]))==null?void 0:w.groupSelect,isRoute:v==null?void 0:v.isRoute,label:v==null?void 0:v.label,prop:v==null?void 0:v.label})}),u.push(b)});let f=[],d=u==null?void 0:u.map(async g=>Jr(g,r,t,n));return d==null||d.forEach(g=>{g==null||g.forEach(y=>{f.push(y)})}),f}},Xl=async(e,n)=>{var a,s,c,u,f,p,d,g,y,b;let t=e+ke+n,r=e,i=(s=(a=Vn.value[t])==null?void 0:a.filter(v=>{var m,S;return((m=v==null?void 0:v.key)==null?void 0:m.type)==="structure"&&((S=v==null?void 0:v.key)==null?void 0:S.parentTable)===""}))==null?void 0:s.map(v=>{var m;return(m=v==null?void 0:v.value)==null?void 0:m.pageData}),o={};(i==null?void 0:i.length)>0?(await wt(t,t+nt+`updateLoading${((c=Ee.value)==null?void 0:c.account)||((u=Ee.value)==null?void 0:u.账号)}`),On.setRouteToChildPath(r),Pn.setActiveMenuPath(t+nt+`updateLoading${((f=Ee.value)==null?void 0:f.account)||((p=Ee.value)==null?void 0:p.账号)}`)):(await wt(r+nt,t,o),await wt(t,t+nt+`updateLoading${((d=Ee.value)==null?void 0:d.account)||((g=Ee.value)==null?void 0:g.账号)}`),On.setRouteToChildPath(r),Pn.setActiveMenuPath(t+nt+`updateLoading${((y=Ee.value)==null?void 0:y.account)||((b=Ee.value)==null?void 0:b.账号)}`))},Ql=It(h.pinia),{originalPath:rr}=h.storeToRefs(Ql),eu=e=>e==null?void 0:e.map(t=>(t=lo(t),t)),tu=(e,n,t)=>{let r="";const i=n==null?void 0:n.map(o=>{var a;return(a=o==null?void 0:o.value)==null?void 0:a.pageData});return i==null||i.forEach(o=>{var a;(o==null?void 0:o.name)===(e==null?void 0:e[0])&&((a=o==null?void 0:o.compData)==null||a.forEach(s=>{var c;(s==null?void 0:s.key)==="formContent"&&((c=s==null?void 0:s.contents)==null||c.forEach(u=>{var f;(u==null?void 0:u.prop)===(e==null?void 0:e[1])&&(r=(u==null?void 0:u.value)===""?or((f=h.cloneDeep(u))==null?void 0:f.optionUrl,t):u==null?void 0:u.value)}))}))}),r},nu=(e,n,t,r)=>{var s,c;let i="",o="";(s=h.cloneDeep(n))==null||s.forEach((u,f)=>{u!=null&&u.includes("[")?o=o+rr.value+e[f]:o=o===""?o+u:o+"/"+u});let a=(c=r[o])==null?void 0:c.map(u=>{var f;return(f=u==null?void 0:u.value)==null?void 0:f.pageData});return a==null||a.forEach(u=>{var f;(u==null?void 0:u.name)===(t==null?void 0:t[0])&&((f=u==null?void 0:u.compData)==null||f.forEach(p=>{var d;(p==null?void 0:p.key)==="formContent"&&((d=p==null?void 0:p.contents)==null||d.forEach(g=>{(g==null?void 0:g.prop)===(t==null?void 0:t[1])&&(i=g==null?void 0:g.value)}))}))}),i},ir=async()=>{var t,r,i,o,a,s,c,u,f,p,d,g;let e;const n=await h.getInsofDataApi({key:{type:"structure",pageKey:"menu",systemKey:sessionStorage.getItem("systemKey")}});return(s=(a=(o=(i=(r=(t=n.data.result)==null?void 0:t[0])==null?void 0:r.value)==null?void 0:i.pageData)==null?void 0:o.compData)==null?void 0:a[0])!=null&&s.contents&&(e=eu((g=(d=(p=(f=(u=(c=n.data.result)==null?void 0:c[0])==null?void 0:u.value)==null?void 0:f.pageData)==null?void 0:p.compData)==null?void 0:d[0])==null?void 0:g.contents)),e},ru=e=>{var r,i,o;const n=(i=(r=e==null?void 0:e.compData)==null?void 0:r.find(a=>(a==null?void 0:a.key)==="header"))==null?void 0:i.contents;return{label:e==null?void 0:e.name,value:e==null?void 0:e.name,children:n!=null&&n.every(a=>!Array.isArray(a))?n==null?void 0:n.map(a=>({label:a==null?void 0:a.label,value:a==null?void 0:a.label})):(o=en(n==null?void 0:n[0]))==null?void 0:o.map(a=>({label:a==null?void 0:a.label,value:a==null?void 0:a.label}))}},so=async e=>{var i,o;let n="";(i=h.cloneDeep(e))==null||i.forEach(a=>{n=n===""?n+a:n+"/"+a});let t="";(o=h.cloneDeep(e))==null||o.forEach((a,s)=>{s!==(e==null?void 0:e.length)-1?t=t===""?t+a:t+"/"+a:t=t+rr.value+a});const r=await $e(n,sessionStorage.getItem("systemKey"),"");return r||await $e(t,sessionStorage.getItem("systemKey"),"")},iu=async e=>{var r,i,o;const n=await so(e);let t=[];return((r=n==null?void 0:n.data)==null?void 0:r.type)==="success"&&(t=(o=(i=n.data.result)==null?void 0:i.map(a=>a.value.pageData))==null?void 0:o.filter(a=>(a==null?void 0:a.comp)==="Table"),t=t==null?void 0:t.map(a=>ru(a))),t},ou=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"},{key:"富文本",value:"Quill"}],Ze=[{label:"输入框",value:"Input"},{label:"下拉框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"},{label:"富文本",value:"Quill"},{label:"链接跳转",value:"Link"}],au=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze},{key:"originalContent",label:"初始值",type:"Input"},{key:"value",label:"固定值",type:"Input"},{key:"isFormColHidden",label:"是否隐藏",name:"是否隐藏",type:"radio",options:[{label:"否",value:!1},{label:"是",value:!0}],value:!1}],su=async()=>{const e=await ir();return[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze},{key:"multiple",label:"多选",default:!1,type:"Switch"},{key:"originalContent",label:"初始值",type:"Select"},{key:"selectRelateType",label:"下拉绑定类型",type:"Select",options:[{label:"关联绑定列",value:"关联绑定列"},{label:"自定义绑定",value:"自定义绑定"}]},{key:"menuSelect",label:"菜单选项",type:"cascader",options:e},{key:"groupSelect",label:"组信息选项",type:"cascader",options:[]},{key:"contents",label:"选项值",type:"Input"}]},lu=async()=>[{value:"",id:"v1",label:"菜单选项",name:"菜单选项",type:"cascader",contents:await ir()},{value:"",id:"v2",label:"组信息选项",name:"组信息选项",type:"cascader",contents:[]},{value:"",id:"v2",label:"选项值",name:"选项值",type:"Input",contents:[]}],uu=l.computed(async()=>await su()),cu=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze},{key:"originalContent",label:"初始值",type:"Date"},{key:"isNewDate",label:"当前时间",type:"Switch",value:!1}],fu=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze},{key:"value",label:"固定值",type:"Input"}],hu=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze},{key:"originalContent",label:"初始值",type:"Input"}],Xr=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze}],pu=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze}],du=[{key:"Input",value:au},{key:"Select",value:uu},{key:"Date",value:cu},{key:"TextArea",value:hu},{key:"Upload",value:Xr},{key:"DragUpload",value:Xr},{key:"Quill",value:pu},{key:"Link",value:fu}],yu=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],gu=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:yu},{key:"background",label:"颜色",type:"Color"}],vu=e=>{var t,r,i,o,a,s,c,u;let n=h.cloneDeep(e);if(((t=n==null?void 0:n.find(f=>(f==null?void 0:f.name)==="类型"))==null?void 0:t.type)==="Select"&&((o=(i=(r=h.cloneDeep(n))==null?void 0:r.find(f=>(f==null?void 0:f.name)==="选项值"))==null?void 0:i.value)==null?void 0:o.length)>0){const f=(u=(c=(s=(a=h.cloneDeep(n))==null?void 0:a.find(p=>(p==null?void 0:p.name)==="选项值"))==null?void 0:s.value)==null?void 0:c.split(","))==null?void 0:u.map(p=>({label:p,value:p}));n=n==null?void 0:n.map(p=>((p==null?void 0:p.name)==="初始值"&&(p.contents=f,p.value=(p==null?void 0:p.value)??""),p))}return n},lo=e=>{var i;let n={};const t=(i=e==null?void 0:e.filter(o=>!Array.isArray(o)))==null?void 0:i[0];n.label=t,n.value=t;const r=e==null?void 0:e.filter(o=>Array.isArray(o));return r&&(r==null?void 0:r.length)>0&&(n.children=r==null?void 0:r.map(o=>lo(o))),n},mu=async e=>{var o,a,s,c;let n=h.cloneDeep(e);const t=(o=e==null?void 0:e.find(u=>(u==null?void 0:u.name)==="下拉绑定类型"))==null?void 0:o.value,r=(a=e==null?void 0:e.find(u=>(u==null?void 0:u.name)==="类型"))==null?void 0:a.value,i=await lu();return r==="Select"&&t===""?n=n==null?void 0:n.filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项"&&(u==null?void 0:u.name)!=="选项值"):r==="Select"&&t==="关联绑定列"?n!=null&&n.find(u=>(u==null?void 0:u.name)==="菜单选项"||(u==null?void 0:u.name)==="组信息选项")?n=(s=h.cloneDeep(n))==null?void 0:s.filter(u=>(u==null?void 0:u.name)!=="选项值"):n=[...h.cloneDeep(n),...i].filter(u=>(u==null?void 0:u.name)!=="选项值"):r==="Select"&&t==="自定义绑定"&&(n!=null&&n.find(u=>(u==null?void 0:u.name)==="选项值")?n=(c=h.cloneDeep(n))==null?void 0:c.filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项"):n=[...h.cloneDeep(n),...i].filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项")),n},bu=(e,n)=>{var r;let t=!1;return(r=h.cloneDeep(e))==null||r.forEach(i=>{var o;(i==null?void 0:i.key)==="formContent"&&((o=i==null?void 0:i.contents)==null||o.forEach(a=>{(a==null?void 0:a.key)===n?t=!0:t=t}))}),t},or=(e,n)=>{var a,s,c,u,f;const t=h.cloneDeep(e);if(!t)return;let r="";(s=(a=h.cloneDeep(t))==null?void 0:a.menuSelect)==null||s.forEach(p=>{p!=null&&p.includes("[")?r=r+rr.value:r=r===""?r+p:r+"/"+p});const i=(c=n==null?void 0:n[r])==null?void 0:c.map(p=>{var d;return(d=p==null?void 0:p.value)==null?void 0:d.pageData});let o=i==null?void 0:i.filter(p=>{var d,g;return(p==null?void 0:p.name)===((g=(d=h.cloneDeep(t))==null?void 0:d.groupSelect)==null?void 0:g[0])});if((o==null?void 0:o.length)===1?o=o==null?void 0:o[0]:(u=h.cloneDeep(o))==null||u.forEach(p=>{var d,g;(p==null?void 0:p.comp)==="Form"&&bu(p==null?void 0:p.compData,(g=(d=h.cloneDeep(t))==null?void 0:d.groupSelect)==null?void 0:g[1])&&(o=p)}),(o==null?void 0:o.comp)==="Form"){let p="";return(f=o==null?void 0:o.compData)==null||f.forEach(d=>{var g;(d==null?void 0:d.key)==="formContent"&&((g=d==null?void 0:d.contents)==null||g.forEach(y=>{var b,v;(y==null?void 0:y.key)===((v=(b=h.cloneDeep(t))==null?void 0:b.groupSelect)==null?void 0:v[1])&&(y.type==="Select"&&!(y!=null&&y.value)?p=void 0:p=y==null?void 0:y.value)}))}),p}};exports.CHANGE_EVENT=Tn;exports.ElButton=xi;exports.ElButtonGroup=Ca;exports.ElFocusTrap=Ti;exports.ElInput=bi;exports.ElMessageBox=Oi;exports.ElOverlay=Mi;exports.FOCUS_TRAP_INJECTION_KEY=Si;exports.FormButton=gu;exports.FormContent=du;exports.FormType=ou;exports.INPUT_EVENT=zt;exports.IsJson=Ga;exports.PatchFlags=Et;exports.State=Tl;exports.State$1=Ks;exports.TinyColor=Ci;exports.UPDATE_MODEL_EVENT=St;exports.addPathToTree=an;exports.addTableContents=Ol;exports.animateScrollTo=Ao;exports.baseFlatten=Fn;exports.buttonTypes=ki;exports.cAF=si;exports.convertArrayToTree=Yn;exports.copyAdd=Xl;exports.decryptData=tr;exports.deleteTableContents=Pl;exports.encryptData=bt;exports.fixFormContents=Fl;exports.fixTableContents=Vl;exports.flatRest=ri;exports.flattedChildren=vt;exports.flatten=ni;exports.focusElement=_n;exports.focusNode=_o;exports.formContextKey=tn;exports.formItemContextKey=Ln;exports.formToOptionsContents=vu;exports.generateKeyPair=ul;exports.getActivePageStructureId=Wi;exports.getAllLeafNodes=zl;exports.getColumnChild=en;exports.getColumnContents=We;exports.getFindValue=tu;exports.getFirstArrayProperty=Gn;exports.getFormContents=Xa;exports.getGradeColumns=$l;exports.getItemData=$e;exports.getLeafNodesRecursive=Jn;exports.getMenusContent=ir;exports.getNewColumnChild=Ul;exports.getNewValue=nu;exports.getNormalizedProps=Ma;exports.getParentConstruct=us;exports.getParentContents=Qa;exports.getParentKey=ls;exports.getScrollBarWidth=li;exports.getScrollContainer=Do;exports.getScrollElement=Co;exports.getScrollTop=Io;exports.getSibling=Ho;exports.getTableFormToForm=jl;exports.getValueToObjectValue=ct;exports.groupByField=Zn;exports.handleRowAuthorityRender=Xn;exports.handleSubmitAsync=pt;exports.hasIn=ii;exports.identity=Qr;exports.inputProps=ci;exports.isFocusable=rn;exports.isFragment=Bi;exports.isLeaf=yi;exports.isValidComponentSize=Pi;exports.isValidElementNode=Ba;exports.judgeContents=or;exports.loadingConstruct=wt;exports.loadingSystemType=Ll;exports.menuToContentType=iu;exports.menuToParent=so;exports.methodTableToContent=Ja;exports.overRest=ti;exports.pick=oi;exports.rAF=ai;exports.resetPassword=ht;exports.scrollIntoView=ko;exports.selectToBase=mu;exports.setToString=ei;exports.submitTableAsyncByVerify=cn;exports.tableEveryContents=ss;exports.tableToContents=ts;exports.tableToStruct=es;exports.triggerEvent=Ko;exports.useAriaProps=ui;exports.useAttrs=fi;exports.useAuthorityState=qn;exports.useComposition=vi;exports.useDeprecated=Di;exports.useDraggable=Ri;exports.useFocusController=gi;exports.useFormDisabled=nn;exports.useFormItem=Kn;exports.useFormItemInputId=pi;exports.useFormSize=Hn;exports.useId=qt;exports.useIdInjection=hi;exports.useLockscreen=Ni;exports.useMenuState=Ct;exports.useModelComp=yt;exports.useOriginalState=It;exports.useSameTarget=Un;exports.useTableComp=jn;
|