comp-hub 0.1.19 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.cjs +77 -0
- package/dist/index.js +1 -1
- package/dist/website/dist/assets/{atom-one-dark-k3s8nS4Q.js → atom-one-dark-B2H-r86L.js} +1 -1
- package/dist/website/dist/assets/{index-Gk0AmvhA.js → index-4kzrJosw.js} +1 -1
- package/dist/website/dist/assets/{index-BnJyLrXy.js → index-BfqhDZ1z.js} +1 -1
- package/dist/website/dist/assets/{index-eLdJqQqm.js → index-BrnVzb3E.js} +1 -1
- package/dist/website/dist/assets/{index-DCQCk6Lt.js → index-CPx4gS-Z.js} +1 -1
- package/dist/website/dist/assets/{index-BlL2Tdlj.js → index-CUKBRQJT.js} +1 -1
- package/dist/website/dist/assets/{index-B08_yIdo.js → index-Cfid4FBF.js} +1 -1
- package/dist/website/dist/assets/{index-D3Uaxo2f.js → index-D8NW2qZW.js} +1 -1
- package/dist/website/dist/assets/{index-Bg1sSD0h.js → index-DDURCXIZ.js} +1 -1
- package/dist/website/dist/assets/{index-BzYZrqYN.js → index-DNxTJC5Q.js} +1 -1
- package/dist/website/dist/assets/{index-BwfgYRqy.js → index-DS9olnsn.js} +1 -1
- package/dist/website/dist/assets/{index-B6bJejXz.js → index-DhTRF1Cu.js} +1 -1
- package/dist/website/dist/assets/{index-BPH0o3O-.js → index-DuJUC7Nj.js} +1 -1
- package/dist/website/dist/assets/{index-C5AGoQL2.js → index-J0Dg-l9h.js} +1 -1
- package/dist/website/dist/assets/{index-DxJFvPw9.css → index-XTZOLvZN.css} +1 -1
- package/dist/website/dist/assets/{index-BulG_yUH.js → index-YOgOWiS9.js} +1 -1
- package/dist/website/dist/assets/{index-BCju3w1f.js → index-cHbH7T5D.js} +12 -12
- package/dist/website/dist/assets/{index-BmdNO1MZ.js → index-nDiFvJw_.js} +1 -1
- package/dist/website/dist/assets/index-qsWrHMBc.js +1 -0
- package/dist/website/dist/assets/{index-CwOHeTUF.js → index-szn1X1M8.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-Cdma1D5V.js → index.vue_vue_type_script_setup_true_lang-BMtIwDs3.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-B6qjGW9b.js → index.vue_vue_type_script_setup_true_lang-C2jCrlom.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-DZI9cQ6F.js → index.vue_vue_type_script_setup_true_lang-Cj1ig2OS.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-CpnHQFlL.js → index.vue_vue_type_script_setup_true_lang-DaO9_LHy.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-mv_g4rJC.js → index.vue_vue_type_script_setup_true_lang-Deq2IwpY.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-BcrKTT6J.js → index.vue_vue_type_script_setup_true_lang-RtjuxFdx.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-KBVOs3Yx.js → index.vue_vue_type_script_setup_true_lang-mjupg3Z_.js} +3 -3
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-DZ8ULnqr.js → index.vue_vue_type_script_setup_true_lang-s3TpsvnW.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_style_index_0_lang-D5mLFRCT.js → index.vue_vue_type_style_index_0_lang-BVuL5ED4.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_style_index_0_lang-C9MO6ZTW.js → index.vue_vue_type_style_index_0_lang-CVT5yNeL.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_style_index_0_lang-DZzA4x8F.js → index.vue_vue_type_style_index_0_lang-Dhu78hQ_.js} +1 -1
- package/dist/website/dist/assets/{md5-gsIWVbtJ.js → md5-CejJMKeR.js} +1 -1
- package/dist/website/dist/assets/{moment-Q0xdD-i8.js → moment-DYVhN5eu.js} +1 -1
- package/dist/website/dist/assets/useCompEditStore-C3L6eIoz.js +1 -0
- package/dist/website/dist/assets/{useCompEditStore-Z_9v-nSk.css → useCompEditStore-Dca_66Tn.css} +1 -1
- package/dist/website/dist/assets/{useTeamHeaders-3AldZ0JH.js → useTeamHeaders-22mJVwWy.js} +1 -1
- package/dist/website/dist/assets/{v1Keyword-CTrvQOnq.js → v1Keyword-JxL-DecN.js} +1 -1
- package/dist/website/dist/assets/{v1Module-BPYVWmkw.js → v1Module-Clll6gmK.js} +1 -1
- package/dist/website/dist/index.html +2 -2
- package/package.json +6 -4
- package/bin/cli.js +0 -15
- package/dist/website/dist/assets/index-gOrnUHC4.js +0 -1
- package/dist/website/dist/assets/useCompEditStore-DxIY6W80.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as H,K as ee,M as te,r as f,B as O,o as h,w as c,c as A,F as ae,N as se,u as C,ad as oe,a as x,b,t as j,
|
|
1
|
+
import{d as H,K as ee,M as te,r as f,B as O,o as h,w as c,c as A,F as ae,N as se,u as C,ad as oe,a as x,b,t as j,bs as le,f as F,j as ne,bt as re,a6 as ie,k as S,m as L,W as ce,X as pe,ab as ue,aN as de,Z as me,ah as fe,bu as he,a8 as R,bv as N,E,al as Ce,bw as ve,af as _e,bx as ge,ao as Pe,aH as $,ax as ye,J as Ee,a5 as be}from"./index-cHbH7T5D.js";import{C as we,a as Ue,v as Te}from"./useCompEditStore-C3L6eIoz.js";import{b as De,l as Ie,m as Me}from"./index.vue_vue_type_script_setup_true_lang-DaO9_LHy.js";import{r as B,c as Se}from"./index-BfqhDZ1z.js";import{c as Oe}from"./index.vue_vue_type_style_index_0_lang-CVT5yNeL.js";import{u as xe}from"./useTeamHeaders-22mJVwWy.js";const Fe={class:"flex items-center justify-between"},ke=["title"],Ve=H({__name:"index",props:ee({options:{type:Array,default:()=>[]}},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(v){const{openCompPathInVscode:w,handlePath:_}=oe(),d=te(v,"modelValue"),U=v;function g(e){const r=U.options.find(u=>u.fullPath===e);r&&w(r.fullPath,"./comp.json")}function p(e){d.value=e}return(e,r)=>{const u=f("el-link"),T=f("el-option"),D=f("el-select");return h(),O(D,{"model-value":d.value,onChange:p,placeholder:"请选择要更新的文件夹"},{default:c(()=>[(h(!0),A(ae,null,se(v.options,i=>(h(),O(T,{key:i.value,label:C(_)(i.fullPath),value:i.value},{default:c(()=>[x("div",Fe,[x("span",{title:i.fullPath},j(C(_)(i.fullPath)),9,ke),b(u,{type:"primary",onClick:[r[0]||(r[0]=le(()=>{},["stop"])),k=>g(i.fullPath)],href:"javascript:void(0)"},{default:c(()=>[...r[1]||(r[1]=[F("在vs code中打开",-1)])]),_:1},8,["onClick"])])]),_:2},1032,["label","value"]))),128))]),_:1},8,["model-value"])}}}),Le={class:"px-2 flex flex-1 items-center"},je=H({__name:"index",emits:["updateSuccess"],setup(v,{expose:w,emit:_}){const d=_,{headers:U,teamId:g}=xe(),p=ne(re,!1),e=ie(be.COMP_EDIT_STORE),r=S(!1),u=S(!0),T=L(()=>{const a=e.selectedFolder?.basename,t=e.compDetail?.name;return a?`文件夹【${a}】`+e.compDialogFinalTitle:`组件离线更新【${t}】`}),D=L(()=>({title:T.value,fullscreen:p.value,top:"10vh",width:"70%"}));async function i(a){u.value=!0;try{const t=await he({compIds:[a]}),{compInfos:s}=t.data;if(s?.length){let o=s[0];if(s.length>1&&(o=await k(s),!o))return;e.setCompUpdateType(N.ONLINE),r.value=!0,e.setSelectedFolder(o),await M(a,o.path)}else{if(await R.confirm("组件不在本地,继续更新只能更新组件描述,预览配置等基础信息,是否继续?","提示",{type:"warning"}).catch(()=>{})!=="confirm")return;e.setCompUpdateType(N.OFFLINE),r.value=!0,await M(a)}}catch(t){console.error(t),E.error(t.message)}finally{u.value=!1}}async function k(a){const t=a.map(l=>({value:l.fullPathHash,label:l.fullPath,fullPath:l.fullPath})),s=S("");return await R({title:"请选择要更新的文件夹",customClass:"select-message",message:()=>ye(Ve,{modelValue:s.value,"onUpdate:modelValue":l=>s.value=l,options:t}),beforeClose:(l,m,P)=>{if(l==="confirm"){if(!s.value){E.error("请选择要更新的文件夹");return}P()}else P()}}).catch(()=>{})!=="confirm"?void 0:a.find(l=>l.fullPathHash===s.value)}function I(){r.value=!1}function Y(){e.$reset()}function W(a,t){const s=n=>{if(!n?.length||!a)return"";const l=Te(),m=Se(a,n);return`${Ee}/${m}?v=${l}`};return t.map(n=>({...n,activeTab:$.MINI,miniEntryUrl:s(n.miniPath),fullEntryUrl:s(n.fullPath)}))}function z(a,t){const s=new Map(a.map(({path:o,signedUrl:n})=>[o,n]));return t.map(o=>{const n=B(o.miniPath.at(-1)??""),l=B(o.fullPath?.at(-1)??"");return{...o,activeTab:$.MINI,miniEntryUrl:s.get(n)??"",fullEntryUrl:s.get(l)??""}})}async function M(a,t){e.setLoading(!0);const s=await De({compId:a}),{desc:o,previewConfigs:n,bgColor:l,dep:m,name:P,version:J,files:Z}=s.data||{};if(e.setCompDetail(s.data),e.setOnlineCompDep(m),e.setCompBgColor(l??"#fff"),e.setExtraInfo({description:o,name:P}),e.setEditCompId(a),e.setCompDialogType(Ce.EDIT),e.isOnlineUpdate&&t){const V=await Ie({compId:a}),y=await ve({compPath:t}),q=await _e({compPath:t}),{thirdParty:Q}=q.data;e.setCompDep(Q),e.setLocalCompHash(y.data.compHash),e.setRemoteCompHash(V.data.compHash),e.setPreviewCompList(W(t,n))}else{const y=Oe(a)().versionToFileAccessPath[J]??[];e.setSignedUrls(y),e.setPreviewCompList(z(y,n)),e.setCompDep(m),e.setDirectory(Ue(Z))}e.setLoading(!1)}function K({end:a}){const t=e.getCompSubmitParams();if(e.isOnlineUpdate)ge({compId:e.editCompId,...t,...g?{teamId:g}:{}}).then(()=>{E.success("更新成功"),d("updateSuccess",e.editCompId),I()}).finally(()=>{a()});else if(e.isOfflineUpdate){const{name:s,desc:o,bgColor:n,previewConfigs:l}=t;Me({compId:e.editCompId,name:s,desc:o,bgColor:n,previewConfigs:l},{headers:U}).then(()=>{E.success("更新成功"),d("updateSuccess",e.editCompId),I()}).finally(()=>{a()})}}async function X(){p.value=!p.value}async function G(){const a=e.editCompId,t=e.selectedFolder,s=e.compUpdateType;e.$reset(),await Pe(),e.setCompUpdateType(s),e.setSelectedFolder(t),M(a,t.path)}return w({open:i,close:I}),(a,t)=>{const s=f("el-link"),o=f("el-button"),n=ce("loading");return h(),O(fe,me({class:"comp-update-dialog",modelValue:r.value,"onUpdate:modelValue":t[0]||(t[0]=l=>r.value=l)},D.value,{"destroy-on-close":"","show-close":"",onClose:Y}),{footer:c(()=>[b(o,{onClick:X},{default:c(()=>[F(j(C(p)?"退出全屏":"全屏"),1)]),_:1})]),default:c(()=>[pe((h(),A("div",{class:ue(C(p)?"size-full":"h-[70vh]")},[b(we,{class:"h-full",onConfirmUpload:K},de({_:2},[C(e).isOnlineUpdate?{name:"toolbar",fn:c(()=>[x("div",Le,[b(s,{type:"primary",onClick:G},{default:c(()=>[...t[1]||(t[1]=[F("重新加载",-1)])]),_:1})])]),key:"0"}:void 0]),1024)],2)),[[n,u.value]])]),_:1},16,["modelValue"])}}});export{je as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aF as E}from"./index-
|
|
1
|
+
import{aF as E}from"./index-cHbH7T5D.js";var x={exports:{}},y={exports:{}},_;function H(){return _||(_=1,(function(){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l={rotl:function(f,i){return f<<i|f>>>32-i},rotr:function(f,i){return f<<32-i|f>>>i},endian:function(f){if(f.constructor==Number)return l.rotl(f,8)&16711935|l.rotl(f,24)&4278255360;for(var i=0;i<f.length;i++)f[i]=l.endian(f[i]);return f},randomBytes:function(f){for(var i=[];f>0;f--)i.push(Math.floor(Math.random()*256));return i},bytesToWords:function(f){for(var i=[],c=0,a=0;c<f.length;c++,a+=8)i[a>>>5]|=f[c]<<24-a%32;return i},wordsToBytes:function(f){for(var i=[],c=0;c<f.length*32;c+=8)i.push(f[c>>>5]>>>24-c%32&255);return i},bytesToHex:function(f){for(var i=[],c=0;c<f.length;c++)i.push((f[c]>>>4).toString(16)),i.push((f[c]&15).toString(16));return i.join("")},hexToBytes:function(f){for(var i=[],c=0;c<f.length;c+=2)i.push(parseInt(f.substr(c,2),16));return i},bytesToBase64:function(f){for(var i=[],c=0;c<f.length;c+=3)for(var a=f[c]<<16|f[c+1]<<8|f[c+2],h=0;h<4;h++)c*8+h*6<=f.length*8?i.push(d.charAt(a>>>6*(3-h)&63)):i.push("=");return i.join("")},base64ToBytes:function(f){f=f.replace(/[^A-Z0-9+\/]/ig,"");for(var i=[],c=0,a=0;c<f.length;a=++c%4)a!=0&&i.push((d.indexOf(f.charAt(c-1))&Math.pow(2,-2*a+8)-1)<<a*2|d.indexOf(f.charAt(c))>>>6-a*2);return i}};y.exports=l})()),y.exports}var B,S;function C(){if(S)return B;S=1;var d={utf8:{stringToBytes:function(l){return d.bin.stringToBytes(unescape(encodeURIComponent(l)))},bytesToString:function(l){return decodeURIComponent(escape(d.bin.bytesToString(l)))}},bin:{stringToBytes:function(l){for(var f=[],i=0;i<l.length;i++)f.push(l.charCodeAt(i)&255);return f},bytesToString:function(l){for(var f=[],i=0;i<l.length;i++)f.push(String.fromCharCode(l[i]));return f.join("")}}};return B=d,B}var T,A;function U(){if(A)return T;A=1,T=function(f){return f!=null&&(d(f)||l(f)||!!f._isBuffer)};function d(f){return!!f.constructor&&typeof f.constructor.isBuffer=="function"&&f.constructor.isBuffer(f)}function l(f){return typeof f.readFloatLE=="function"&&typeof f.slice=="function"&&d(f.slice(0,0))}return T}var q;function z(){return q||(q=1,(function(){var d=H(),l=C().utf8,f=U(),i=C().bin,c=function(a,h){a.constructor==String?h&&h.encoding==="binary"?a=i.stringToBytes(a):a=l.stringToBytes(a):f(a)?a=Array.prototype.slice.call(a,0):!Array.isArray(a)&&a.constructor!==Uint8Array&&(a=a.toString());for(var e=d.bytesToWords(a),g=a.length*8,t=1732584193,r=-271733879,u=-1732584194,n=271733878,o=0;o<e.length;o++)e[o]=(e[o]<<8|e[o]>>>24)&16711935|(e[o]<<24|e[o]>>>8)&4278255360;e[g>>>5]|=128<<g%32,e[(g+64>>>9<<4)+14]=g;for(var p=c._ff,v=c._gg,s=c._hh,F=c._ii,o=0;o<e.length;o+=16){var I=t,R=r,M=u,w=n;t=p(t,r,u,n,e[o+0],7,-680876936),n=p(n,t,r,u,e[o+1],12,-389564586),u=p(u,n,t,r,e[o+2],17,606105819),r=p(r,u,n,t,e[o+3],22,-1044525330),t=p(t,r,u,n,e[o+4],7,-176418897),n=p(n,t,r,u,e[o+5],12,1200080426),u=p(u,n,t,r,e[o+6],17,-1473231341),r=p(r,u,n,t,e[o+7],22,-45705983),t=p(t,r,u,n,e[o+8],7,1770035416),n=p(n,t,r,u,e[o+9],12,-1958414417),u=p(u,n,t,r,e[o+10],17,-42063),r=p(r,u,n,t,e[o+11],22,-1990404162),t=p(t,r,u,n,e[o+12],7,1804603682),n=p(n,t,r,u,e[o+13],12,-40341101),u=p(u,n,t,r,e[o+14],17,-1502002290),r=p(r,u,n,t,e[o+15],22,1236535329),t=v(t,r,u,n,e[o+1],5,-165796510),n=v(n,t,r,u,e[o+6],9,-1069501632),u=v(u,n,t,r,e[o+11],14,643717713),r=v(r,u,n,t,e[o+0],20,-373897302),t=v(t,r,u,n,e[o+5],5,-701558691),n=v(n,t,r,u,e[o+10],9,38016083),u=v(u,n,t,r,e[o+15],14,-660478335),r=v(r,u,n,t,e[o+4],20,-405537848),t=v(t,r,u,n,e[o+9],5,568446438),n=v(n,t,r,u,e[o+14],9,-1019803690),u=v(u,n,t,r,e[o+3],14,-187363961),r=v(r,u,n,t,e[o+8],20,1163531501),t=v(t,r,u,n,e[o+13],5,-1444681467),n=v(n,t,r,u,e[o+2],9,-51403784),u=v(u,n,t,r,e[o+7],14,1735328473),r=v(r,u,n,t,e[o+12],20,-1926607734),t=s(t,r,u,n,e[o+5],4,-378558),n=s(n,t,r,u,e[o+8],11,-2022574463),u=s(u,n,t,r,e[o+11],16,1839030562),r=s(r,u,n,t,e[o+14],23,-35309556),t=s(t,r,u,n,e[o+1],4,-1530992060),n=s(n,t,r,u,e[o+4],11,1272893353),u=s(u,n,t,r,e[o+7],16,-155497632),r=s(r,u,n,t,e[o+10],23,-1094730640),t=s(t,r,u,n,e[o+13],4,681279174),n=s(n,t,r,u,e[o+0],11,-358537222),u=s(u,n,t,r,e[o+3],16,-722521979),r=s(r,u,n,t,e[o+6],23,76029189),t=s(t,r,u,n,e[o+9],4,-640364487),n=s(n,t,r,u,e[o+12],11,-421815835),u=s(u,n,t,r,e[o+15],16,530742520),r=s(r,u,n,t,e[o+2],23,-995338651),t=F(t,r,u,n,e[o+0],6,-198630844),n=F(n,t,r,u,e[o+7],10,1126891415),u=F(u,n,t,r,e[o+14],15,-1416354905),r=F(r,u,n,t,e[o+5],21,-57434055),t=F(t,r,u,n,e[o+12],6,1700485571),n=F(n,t,r,u,e[o+3],10,-1894986606),u=F(u,n,t,r,e[o+10],15,-1051523),r=F(r,u,n,t,e[o+1],21,-2054922799),t=F(t,r,u,n,e[o+8],6,1873313359),n=F(n,t,r,u,e[o+15],10,-30611744),u=F(u,n,t,r,e[o+6],15,-1560198380),r=F(r,u,n,t,e[o+13],21,1309151649),t=F(t,r,u,n,e[o+4],6,-145523070),n=F(n,t,r,u,e[o+11],10,-1120210379),u=F(u,n,t,r,e[o+2],15,718787259),r=F(r,u,n,t,e[o+9],21,-343485551),t=t+I>>>0,r=r+R>>>0,u=u+M>>>0,n=n+w>>>0}return d.endian([t,r,u,n])};c._ff=function(a,h,e,g,t,r,u){var n=a+(h&e|~h&g)+(t>>>0)+u;return(n<<r|n>>>32-r)+h},c._gg=function(a,h,e,g,t,r,u){var n=a+(h&g|e&~g)+(t>>>0)+u;return(n<<r|n>>>32-r)+h},c._hh=function(a,h,e,g,t,r,u){var n=a+(h^e^g)+(t>>>0)+u;return(n<<r|n>>>32-r)+h},c._ii=function(a,h,e,g,t,r,u){var n=a+(e^(h|~g))+(t>>>0)+u;return(n<<r|n>>>32-r)+h},c._blocksize=16,c._digestsize=16,x.exports=function(a,h){if(a==null)throw new Error("Illegal argument "+a);var e=d.wordsToBytes(c(a,h));return h&&h.asBytes?e:h&&h.asString?i.bytesToString(e):d.bytesToHex(e)}})()),x.exports}var G=z();const W=E(G);export{W as m};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as As,m as Vs,i as Gs,l as js,y as zs,
|
|
1
|
+
import{d as As,m as Vs,i as Gs,l as js,y as zs,bJ as Ht,r as Ke,c as et,b as tt,w as le,p as st,a as Et,t as rt,F as Zs,N as $s,B as Ne,f as At,ai as Bs,o as re,aI as qs,a2 as Js,Z as Qs,by as Xs,v as Ks}from"./index-cHbH7T5D.js";const er={class:"base-form"},tr={key:0},sr={style:{"text-align":"right",width:"100%"}},rr=As({__name:"index",props:{config:{},initialData:{}},emits:["submit","reset"],setup(e,{expose:t,emit:s}){const r={showReset:!0,showSubmit:!0,submitText:"提交",resetText:"重置",rows:[]},a=e,n=Vs(()=>({...r,...a.config})),i=s,l=Gs("baseForm"),h=js({}),m=(H,K)=>{console.log("插槽更新表单值",H,K),h[H]=K},Y=async H=>{H.start();try{await l.value?.validate(),i("submit",{end:H.end,formData:Ht(h)})}catch(K){console.error(K),H.end()}},N=()=>{l.value?.resetFields(),i("reset")},I=()=>l.value?.validate(),Hs=()=>Ht(h);return zs(()=>a.initialData,async H=>{n.value.rows.forEach(({prop:K})=>{h[K]=H?.[K]}),l.value?.clearValidate()},{deep:!0,immediate:!0}),t({validate:I,resetFields:N,getFormData:Hs}),(H,K)=>{const Ut=Ke("el-form-item"),It=Ke("el-button"),Es=Ke("el-form");return re(),et("div",er,[tt(Es,{ref:"baseForm",model:h,rules:n.value.rules,"label-width":"auto"},{default:le(()=>[n.value.title?(re(),et("div",tr,[Et("h3",null,rt(n.value.title),1)])):st("",!0),(re(!0),et(Zs,null,$s(n.value.rows,(T,Xe)=>(re(),Ne(Ut,{key:Xe,label:T.label,prop:T.prop},{default:le(()=>[T.type==="slot"?qs(H.$slots,T.prop,{key:0,row:T,modelValue:h[T.prop],updateModelValue:xe=>m(T.prop,xe)},void 0,!0):(re(),Ne(Js(T.type),Qs({key:1,modelValue:h[T.prop],"onUpdate:modelValue":xe=>h[T.prop]=xe},{ref_for:!0},T.attributes||{},Xs(T.events||{})),null,16,["modelValue","onUpdate:modelValue"]))]),_:2},1032,["label","prop"]))),128)),tt(Ut,null,{default:le(()=>[Et("div",sr,[n.value.showReset?(re(),Ne(It,{key:0,onClick:N},{default:le(()=>[At(rt(n.value.resetText),1)]),_:1})):st("",!0),n.value.showSubmit?(re(),Ne(Bs,{key:1},{default:le(({instance:T,loading:Xe})=>[tt(It,{type:"primary",loading:Xe,onClick:xe=>Y(T)},{default:le(()=>[At(rt(n.value.submitText),1)]),_:1},8,["loading","onClick"])]),_:1})):st("",!0)])]),_:1})]),_:3},8,["model","rules"])])}}}),io=Ks(rr,[["__scopeId","data-v-0719b949"]]);var Bt;function u(){return Bt.apply(null,arguments)}function ar(e){Bt=e}function C(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function ie(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function w(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _t(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(w(e,t))return!1;return!0}function b(e){return e===void 0}function J(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Ye(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function qt(e,t){var s=[],r,a=e.length;for(r=0;r<a;++r)s.push(t(e[r],r));return s}function ee(e,t){for(var s in t)w(t,s)&&(e[s]=t[s]);return w(t,"toString")&&(e.toString=t.toString),w(t,"valueOf")&&(e.valueOf=t.valueOf),e}function V(e,t,s,r){return ks(e,t,s,r,!0).utc()}function nr(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function c(e){return e._pf==null&&(e._pf=nr()),e._pf}var lt;Array.prototype.some?lt=Array.prototype.some:lt=function(e){var t=Object(this),s=t.length>>>0,r;for(r=0;r<s;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function yt(e){var t=null,s=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=c(e),s=lt.call(t.parsedDateParts,function(a){return a!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&s),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function Ae(e){var t=V(NaN);return e!=null?ee(c(t),e):c(t).userInvalidated=!0,t}var Vt=u.momentProperties=[],at=!1;function wt(e,t){var s,r,a,n=Vt.length;if(b(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),b(t._i)||(e._i=t._i),b(t._f)||(e._f=t._f),b(t._l)||(e._l=t._l),b(t._strict)||(e._strict=t._strict),b(t._tzm)||(e._tzm=t._tzm),b(t._isUTC)||(e._isUTC=t._isUTC),b(t._offset)||(e._offset=t._offset),b(t._pf)||(e._pf=c(t)),b(t._locale)||(e._locale=t._locale),n>0)for(s=0;s<n;s++)r=Vt[s],a=t[r],b(a)||(e[r]=a);return e}function Oe(e){wt(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),at===!1&&(at=!0,u.updateOffset(this),at=!1)}function L(e){return e instanceof Oe||e!=null&&e._isAMomentObject!=null}function Jt(e){u.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function P(e,t){var s=!0;return ee(function(){if(u.deprecationHandler!=null&&u.deprecationHandler(null,e),s){var r=[],a,n,i,l=arguments.length;for(n=0;n<l;n++){if(a="",typeof arguments[n]=="object"){a+=`
|
|
2
2
|
[`+n+"] ";for(i in arguments[0])w(arguments[0],i)&&(a+=i+": "+arguments[0][i]+", ");a=a.slice(0,-2)}else a=arguments[n];r.push(a)}Jt(e+`
|
|
3
3
|
Arguments: `+Array.prototype.slice.call(r).join("")+`
|
|
4
4
|
`+new Error().stack),s=!1}return t.apply(this,arguments)},t)}var Gt={};function Qt(e,t){u.deprecationHandler!=null&&u.deprecationHandler(e,t),Gt[e]||(Jt(t),Gt[e]=!0)}u.suppressDeprecationWarnings=!1;u.deprecationHandler=null;function G(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function ir(e){var t,s;for(s in e)w(e,s)&&(t=e[s],G(t)?this[s]=t:this["_"+s]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function ut(e,t){var s=ee({},e),r;for(r in t)w(t,r)&&(ie(e[r])&&ie(t[r])?(s[r]={},ee(s[r],e[r]),ee(s[r],t[r])):t[r]!=null?s[r]=t[r]:delete s[r]);for(r in e)w(e,r)&&!w(t,r)&&ie(e[r])&&(s[r]=ee({},s[r]));return s}function kt(e){e!=null&&this.set(e)}var dt;Object.keys?dt=Object.keys:dt=function(e){var t,s=[];for(t in e)w(e,t)&&s.push(t);return s};var or={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function lr(e,t,s){var r=this._calendar[e]||this._calendar.sameElse;return G(r)?r.call(t,s):r}function A(e,t,s){var r=""+Math.abs(e),a=t-r.length,n=e>=0;return(n?s?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}var gt=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,We=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,nt={},fe={};function f(e,t,s,r){var a=r;typeof r=="string"&&(a=function(){return this[r]()}),e&&(fe[e]=a),t&&(fe[t[0]]=function(){return A(a.apply(this,arguments),t[1],t[2])}),s&&(fe[s]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function ur(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function dr(e){var t=e.match(gt),s,r;for(s=0,r=t.length;s<r;s++)fe[t[s]]?t[s]=fe[t[s]]:t[s]=ur(t[s]);return function(a){var n="",i;for(i=0;i<r;i++)n+=G(t[i])?t[i].call(a,e):t[i];return n}}function Re(e,t){return e.isValid()?(t=Xt(t,e.localeData()),nt[t]=nt[t]||dr(t),nt[t](e)):e.localeData().invalidDate()}function Xt(e,t){var s=5;function r(a){return t.longDateFormat(a)||a}for(We.lastIndex=0;s>=0&&We.test(e);)e=e.replace(We,r),We.lastIndex=0,s-=1;return e}var hr={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function fr(e){var t=this._longDateFormat[e],s=this._longDateFormat[e.toUpperCase()];return t||!s?t:(this._longDateFormat[e]=s.match(gt).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var cr="Invalid date";function mr(){return this._invalidDate}var _r="%d",yr=/\d{1,2}/;function wr(e){return this._ordinal.replace("%d",e)}var kr={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function gr(e,t,s,r){var a=this._relativeTime[s];return G(a)?a(e,t,s,r):a.replace(/%d/i,e)}function Sr(e,t){var s=this._relativeTime[e>0?"future":"past"];return G(s)?s(t):s.replace(/%s/i,t)}var jt={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function R(e){return typeof e=="string"?jt[e]||jt[e.toLowerCase()]:void 0}function St(e){var t={},s,r;for(r in e)w(e,r)&&(s=R(r),s&&(t[s]=e[r]));return t}var Mr={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function vr(e){var t=[],s;for(s in e)w(e,s)&&t.push({unit:s,priority:Mr[s]});return t.sort(function(r,a){return r.priority-a.priority}),t}var Kt=/\d/,x=/\d\d/,es=/\d{3}/,Mt=/\d{4}/,Ve=/[+-]?\d{6}/,M=/\d\d?/,ts=/\d\d\d\d?/,ss=/\d\d\d\d\d\d?/,Ge=/\d{1,3}/,vt=/\d{1,4}/,je=/[+-]?\d{1,6}/,_e=/\d+/,ze=/[+-]?\d+/,pr=/Z|[+-]\d\d:?\d\d/gi,Ze=/Z|[+-]\d\d(?::?\d\d)?/gi,Dr=/[+-]?\d+(\.\d{1,3})?/,Te=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ye=/^[1-9]\d?/,pt=/^([1-9]\d|\d)/,Le;Le={};function d(e,t,s){Le[e]=G(t)?t:function(r,a){return r&&s?s:t}}function Yr(e,t){return w(Le,e)?Le[e](t._strict,t._locale):new RegExp(Or(e))}function Or(e){return B(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,s,r,a,n){return s||r||a||n}))}function B(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function W(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function _(e){var t=+e,s=0;return t!==0&&isFinite(t)&&(s=W(t)),s}var ht={};function g(e,t){var s,r=t,a;for(typeof e=="string"&&(e=[e]),J(t)&&(r=function(n,i){i[t]=_(n)}),a=e.length,s=0;s<a;s++)ht[e[s]]=r}function be(e,t){g(e,function(s,r,a,n){a._w=a._w||{},t(s,a._w,a,n)})}function Tr(e,t,s){t!=null&&w(ht,e)&&ht[e](t,s._a,s,e)}function $e(e){return e%4===0&&e%100!==0||e%400===0}var O=0,Z=1,E=2,D=3,F=4,$=5,ne=6,br=7,xr=8;f("Y",0,0,function(){var e=this.year();return e<=9999?A(e,4):"+"+e});f(0,["YY",2],0,function(){return this.year()%100});f(0,["YYYY",4],0,"year");f(0,["YYYYY",5],0,"year");f(0,["YYYYYY",6,!0],0,"year");d("Y",ze);d("YY",M,x);d("YYYY",vt,Mt);d("YYYYY",je,Ve);d("YYYYYY",je,Ve);g(["YYYYY","YYYYYY"],O);g("YYYY",function(e,t){t[O]=e.length===2?u.parseTwoDigitYear(e):_(e)});g("YY",function(e,t){t[O]=u.parseTwoDigitYear(e)});g("Y",function(e,t){t[O]=parseInt(e,10)});function Se(e){return $e(e)?366:365}u.parseTwoDigitYear=function(e){return _(e)+(_(e)>68?1900:2e3)};var rs=we("FullYear",!0);function Nr(){return $e(this.year())}function we(e,t){return function(s){return s!=null?(as(this,e,s),u.updateOffset(this,t),this):Me(this,e)}}function Me(e,t){if(!e.isValid())return NaN;var s=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?s.getUTCMilliseconds():s.getMilliseconds();case"Seconds":return r?s.getUTCSeconds():s.getSeconds();case"Minutes":return r?s.getUTCMinutes():s.getMinutes();case"Hours":return r?s.getUTCHours():s.getHours();case"Date":return r?s.getUTCDate():s.getDate();case"Day":return r?s.getUTCDay():s.getDay();case"Month":return r?s.getUTCMonth():s.getMonth();case"FullYear":return r?s.getUTCFullYear():s.getFullYear();default:return NaN}}function as(e,t,s){var r,a,n,i,l;if(!(!e.isValid()||isNaN(s))){switch(r=e._d,a=e._isUTC,t){case"Milliseconds":return void(a?r.setUTCMilliseconds(s):r.setMilliseconds(s));case"Seconds":return void(a?r.setUTCSeconds(s):r.setSeconds(s));case"Minutes":return void(a?r.setUTCMinutes(s):r.setMinutes(s));case"Hours":return void(a?r.setUTCHours(s):r.setHours(s));case"Date":return void(a?r.setUTCDate(s):r.setDate(s));case"FullYear":break;default:return}n=s,i=e.month(),l=e.date(),l=l===29&&i===1&&!$e(n)?28:l,a?r.setUTCFullYear(n,i,l):r.setFullYear(n,i,l)}}function Wr(e){return e=R(e),G(this[e])?this[e]():this}function Pr(e,t){if(typeof e=="object"){e=St(e);var s=vr(e),r,a=s.length;for(r=0;r<a;r++)this[s[r].unit](e[s[r].unit])}else if(e=R(e),G(this[e]))return this[e](t);return this}function Rr(e,t){return(e%t+t)%t}var p;Array.prototype.indexOf?p=Array.prototype.indexOf:p=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Dt(e,t){if(isNaN(e)||isNaN(t))return NaN;var s=Rr(t,12);return e+=(t-s)/12,s===1?$e(e)?29:28:31-s%7%2}f("M",["MM",2],"Mo",function(){return this.month()+1});f("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});f("MMMM",0,0,function(e){return this.localeData().months(this,e)});d("M",M,ye);d("MM",M,x);d("MMM",function(e,t){return t.monthsShortRegex(e)});d("MMMM",function(e,t){return t.monthsRegex(e)});g(["M","MM"],function(e,t){t[Z]=_(e)-1});g(["MMM","MMMM"],function(e,t,s,r){var a=s._locale.monthsParse(e,r,s._strict);a!=null?t[Z]=a:c(s).invalidMonth=e});var Fr="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ns="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),is=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Cr=Te,Lr=Te;function Ur(e,t){return e?C(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||is).test(t)?"format":"standalone"][e.month()]:C(this._months)?this._months:this._months.standalone}function Ir(e,t){return e?C(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[is.test(t)?"format":"standalone"][e.month()]:C(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Hr(e,t,s){var r,a,n,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)n=V([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(n,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(n,"").toLocaleLowerCase();return s?t==="MMM"?(a=p.call(this._shortMonthsParse,i),a!==-1?a:null):(a=p.call(this._longMonthsParse,i),a!==-1?a:null):t==="MMM"?(a=p.call(this._shortMonthsParse,i),a!==-1?a:(a=p.call(this._longMonthsParse,i),a!==-1?a:null)):(a=p.call(this._longMonthsParse,i),a!==-1?a:(a=p.call(this._shortMonthsParse,i),a!==-1?a:null))}function Er(e,t,s){var r,a,n;if(this._monthsParseExact)return Hr.call(this,e,t,s);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=V([2e3,r]),s&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),!s&&!this._monthsParse[r]&&(n="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(n.replace(".",""),"i")),s&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(s&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!s&&this._monthsParse[r].test(e))return r}}function os(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=_(t);else if(t=e.localeData().monthsParse(t),!J(t))return e}var s=t,r=e.date();return r=r<29?r:Math.min(r,Dt(e.year(),s)),e._isUTC?e._d.setUTCMonth(s,r):e._d.setMonth(s,r),e}function ls(e){return e!=null?(os(this,e),u.updateOffset(this,!0),this):Me(this,"Month")}function Ar(){return Dt(this.year(),this.month())}function Vr(e){return this._monthsParseExact?(w(this,"_monthsRegex")||us.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(w(this,"_monthsShortRegex")||(this._monthsShortRegex=Cr),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Gr(e){return this._monthsParseExact?(w(this,"_monthsRegex")||us.call(this),e?this._monthsStrictRegex:this._monthsRegex):(w(this,"_monthsRegex")||(this._monthsRegex=Lr),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function us(){function e(h,m){return m.length-h.length}var t=[],s=[],r=[],a,n,i,l;for(a=0;a<12;a++)n=V([2e3,a]),i=B(this.monthsShort(n,"")),l=B(this.months(n,"")),t.push(i),s.push(l),r.push(l),r.push(i);t.sort(e),s.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function jr(e,t,s,r,a,n,i){var l;return e<100&&e>=0?(l=new Date(e+400,t,s,r,a,n,i),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,s,r,a,n,i),l}function ve(e){var t,s;return e<100&&e>=0?(s=Array.prototype.slice.call(arguments),s[0]=e+400,t=new Date(Date.UTC.apply(null,s)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ue(e,t,s){var r=7+t-s,a=(7+ve(e,0,r).getUTCDay()-t)%7;return-a+r-1}function ds(e,t,s,r,a){var n=(7+s-r)%7,i=Ue(e,r,a),l=1+7*(t-1)+n+i,h,m;return l<=0?(h=e-1,m=Se(h)+l):l>Se(e)?(h=e+1,m=l-Se(e)):(h=e,m=l),{year:h,dayOfYear:m}}function pe(e,t,s){var r=Ue(e.year(),t,s),a=Math.floor((e.dayOfYear()-r-1)/7)+1,n,i;return a<1?(i=e.year()-1,n=a+q(i,t,s)):a>q(e.year(),t,s)?(n=a-q(e.year(),t,s),i=e.year()+1):(i=e.year(),n=a),{week:n,year:i}}function q(e,t,s){var r=Ue(e,t,s),a=Ue(e+1,t,s);return(Se(e)-r+a)/7}f("w",["ww",2],"wo","week");f("W",["WW",2],"Wo","isoWeek");d("w",M,ye);d("ww",M,x);d("W",M,ye);d("WW",M,x);be(["w","ww","W","WW"],function(e,t,s,r){t[r.substr(0,1)]=_(e)});function zr(e){return pe(e,this._week.dow,this._week.doy).week}var Zr={dow:0,doy:6};function $r(){return this._week.dow}function Br(){return this._week.doy}function qr(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Jr(e){var t=pe(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}f("d",0,"do","day");f("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});f("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});f("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});f("e",0,0,"weekday");f("E",0,0,"isoWeekday");d("d",M);d("e",M);d("E",M);d("dd",function(e,t){return t.weekdaysMinRegex(e)});d("ddd",function(e,t){return t.weekdaysShortRegex(e)});d("dddd",function(e,t){return t.weekdaysRegex(e)});be(["dd","ddd","dddd"],function(e,t,s,r){var a=s._locale.weekdaysParse(e,r,s._strict);a!=null?t.d=a:c(s).invalidWeekday=e});be(["d","e","E"],function(e,t,s,r){t[r]=_(e)});function Qr(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Xr(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Yt(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Kr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),hs="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ea="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ta=Te,sa=Te,ra=Te;function aa(e,t){var s=C(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Yt(s,this._week.dow):e?s[e.day()]:s}function na(e){return e===!0?Yt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ia(e){return e===!0?Yt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function oa(e,t,s){var r,a,n,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)n=V([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(n,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(n,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(n,"").toLocaleLowerCase();return s?t==="dddd"?(a=p.call(this._weekdaysParse,i),a!==-1?a:null):t==="ddd"?(a=p.call(this._shortWeekdaysParse,i),a!==-1?a:null):(a=p.call(this._minWeekdaysParse,i),a!==-1?a:null):t==="dddd"?(a=p.call(this._weekdaysParse,i),a!==-1||(a=p.call(this._shortWeekdaysParse,i),a!==-1)?a:(a=p.call(this._minWeekdaysParse,i),a!==-1?a:null)):t==="ddd"?(a=p.call(this._shortWeekdaysParse,i),a!==-1||(a=p.call(this._weekdaysParse,i),a!==-1)?a:(a=p.call(this._minWeekdaysParse,i),a!==-1?a:null)):(a=p.call(this._minWeekdaysParse,i),a!==-1||(a=p.call(this._weekdaysParse,i),a!==-1)?a:(a=p.call(this._shortWeekdaysParse,i),a!==-1?a:null))}function la(e,t,s){var r,a,n;if(this._weekdaysParseExact)return oa.call(this,e,t,s);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=V([2e3,1]).day(r),s&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(n="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(n.replace(".",""),"i")),s&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(s&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(s&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!s&&this._weekdaysParse[r].test(e))return r}}function ua(e){if(!this.isValid())return e!=null?this:NaN;var t=Me(this,"Day");return e!=null?(e=Qr(e,this.localeData()),this.add(e-t,"d")):t}function da(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function ha(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Xr(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function fa(e){return this._weekdaysParseExact?(w(this,"_weekdaysRegex")||Ot.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(w(this,"_weekdaysRegex")||(this._weekdaysRegex=ta),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ca(e){return this._weekdaysParseExact?(w(this,"_weekdaysRegex")||Ot.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(w(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=sa),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ma(e){return this._weekdaysParseExact?(w(this,"_weekdaysRegex")||Ot.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(w(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ra),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ot(){function e(Y,N){return N.length-Y.length}var t=[],s=[],r=[],a=[],n,i,l,h,m;for(n=0;n<7;n++)i=V([2e3,1]).day(n),l=B(this.weekdaysMin(i,"")),h=B(this.weekdaysShort(i,"")),m=B(this.weekdays(i,"")),t.push(l),s.push(h),r.push(m),a.push(l),a.push(h),a.push(m);t.sort(e),s.sort(e),r.sort(e),a.sort(e),this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Tt(){return this.hours()%12||12}function _a(){return this.hours()||24}f("H",["HH",2],0,"hour");f("h",["hh",2],0,Tt);f("k",["kk",2],0,_a);f("hmm",0,0,function(){return""+Tt.apply(this)+A(this.minutes(),2)});f("hmmss",0,0,function(){return""+Tt.apply(this)+A(this.minutes(),2)+A(this.seconds(),2)});f("Hmm",0,0,function(){return""+this.hours()+A(this.minutes(),2)});f("Hmmss",0,0,function(){return""+this.hours()+A(this.minutes(),2)+A(this.seconds(),2)});function fs(e,t){f(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}fs("a",!0);fs("A",!1);function cs(e,t){return t._meridiemParse}d("a",cs);d("A",cs);d("H",M,pt);d("h",M,ye);d("k",M,ye);d("HH",M,x);d("hh",M,x);d("kk",M,x);d("hmm",ts);d("hmmss",ss);d("Hmm",ts);d("Hmmss",ss);g(["H","HH"],D);g(["k","kk"],function(e,t,s){var r=_(e);t[D]=r===24?0:r});g(["a","A"],function(e,t,s){s._isPm=s._locale.isPM(e),s._meridiem=e});g(["h","hh"],function(e,t,s){t[D]=_(e),c(s).bigHour=!0});g("hmm",function(e,t,s){var r=e.length-2;t[D]=_(e.substr(0,r)),t[F]=_(e.substr(r)),c(s).bigHour=!0});g("hmmss",function(e,t,s){var r=e.length-4,a=e.length-2;t[D]=_(e.substr(0,r)),t[F]=_(e.substr(r,2)),t[$]=_(e.substr(a)),c(s).bigHour=!0});g("Hmm",function(e,t,s){var r=e.length-2;t[D]=_(e.substr(0,r)),t[F]=_(e.substr(r))});g("Hmmss",function(e,t,s){var r=e.length-4,a=e.length-2;t[D]=_(e.substr(0,r)),t[F]=_(e.substr(r,2)),t[$]=_(e.substr(a))});function ya(e){return(e+"").toLowerCase().charAt(0)==="p"}var wa=/[ap]\.?m?\.?/i,ka=we("Hours",!0);function ga(e,t,s){return e>11?s?"pm":"PM":s?"am":"AM"}var ms={calendar:or,longDateFormat:hr,invalidDate:cr,ordinal:_r,dayOfMonthOrdinalParse:yr,relativeTime:kr,months:Fr,monthsShort:ns,week:Zr,weekdays:Kr,weekdaysMin:ea,weekdaysShort:hs,meridiemParse:wa},v={},ke={},De;function Sa(e,t){var s,r=Math.min(e.length,t.length);for(s=0;s<r;s+=1)if(e[s]!==t[s])return s;return r}function zt(e){return e&&e.toLowerCase().replace("_","-")}function Ma(e){for(var t=0,s,r,a,n;t<e.length;){for(n=zt(e[t]).split("-"),s=n.length,r=zt(e[t+1]),r=r?r.split("-"):null;s>0;){if(a=Be(n.slice(0,s).join("-")),a)return a;if(r&&r.length>=s&&Sa(n,r)>=s-1)break;s--}t++}return De}function va(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Be(e){var t=null,s;if(v[e]===void 0&&typeof module<"u"&&module&&module.exports&&va(e))try{t=De._abbr,s=require,s("./locale/"+e),se(t)}catch{v[e]=null}return v[e]}function se(e,t){var s;return e&&(b(t)?s=Q(e):s=bt(e,t),s?De=s:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),De._abbr}function bt(e,t){if(t!==null){var s,r=ms;if(t.abbr=e,v[e]!=null)Qt("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=v[e]._config;else if(t.parentLocale!=null)if(v[t.parentLocale]!=null)r=v[t.parentLocale]._config;else if(s=Be(t.parentLocale),s!=null)r=s._config;else return ke[t.parentLocale]||(ke[t.parentLocale]=[]),ke[t.parentLocale].push({name:e,config:t}),null;return v[e]=new kt(ut(r,t)),ke[e]&&ke[e].forEach(function(a){bt(a.name,a.config)}),se(e),v[e]}else return delete v[e],null}function pa(e,t){if(t!=null){var s,r,a=ms;v[e]!=null&&v[e].parentLocale!=null?v[e].set(ut(v[e]._config,t)):(r=Be(e),r!=null&&(a=r._config),t=ut(a,t),r==null&&(t.abbr=e),s=new kt(t),s.parentLocale=v[e],v[e]=s),se(e)}else v[e]!=null&&(v[e].parentLocale!=null?(v[e]=v[e].parentLocale,e===se()&&se(e)):v[e]!=null&&delete v[e]);return v[e]}function Q(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return De;if(!C(e)){if(t=Be(e),t)return t;e=[e]}return Ma(e)}function Da(){return dt(v)}function xt(e){var t,s=e._a;return s&&c(e).overflow===-2&&(t=s[Z]<0||s[Z]>11?Z:s[E]<1||s[E]>Dt(s[O],s[Z])?E:s[D]<0||s[D]>24||s[D]===24&&(s[F]!==0||s[$]!==0||s[ne]!==0)?D:s[F]<0||s[F]>59?F:s[$]<0||s[$]>59?$:s[ne]<0||s[ne]>999?ne:-1,c(e)._overflowDayOfYear&&(t<O||t>E)&&(t=E),c(e)._overflowWeeks&&t===-1&&(t=br),c(e)._overflowWeekday&&t===-1&&(t=xr),c(e).overflow=t),e}var Ya=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Oa=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ta=/Z|[+-]\d\d(?::?\d\d)?/,Pe=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],it=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ba=/^\/?Date\((-?\d+)/i,xa=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Na={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function _s(e){var t,s,r=e._i,a=Ya.exec(r)||Oa.exec(r),n,i,l,h,m=Pe.length,Y=it.length;if(a){for(c(e).iso=!0,t=0,s=m;t<s;t++)if(Pe[t][1].exec(a[1])){i=Pe[t][0],n=Pe[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(a[3]){for(t=0,s=Y;t<s;t++)if(it[t][1].exec(a[3])){l=(a[2]||" ")+it[t][0];break}if(l==null){e._isValid=!1;return}}if(!n&&l!=null){e._isValid=!1;return}if(a[4])if(Ta.exec(a[4]))h="Z";else{e._isValid=!1;return}e._f=i+(l||"")+(h||""),Wt(e)}else e._isValid=!1}function Wa(e,t,s,r,a,n){var i=[Pa(e),ns.indexOf(t),parseInt(s,10),parseInt(r,10),parseInt(a,10)];return n&&i.push(parseInt(n,10)),i}function Pa(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ra(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Fa(e,t,s){if(e){var r=hs.indexOf(e),a=new Date(t[0],t[1],t[2]).getDay();if(r!==a)return c(s).weekdayMismatch=!0,s._isValid=!1,!1}return!0}function Ca(e,t,s){if(e)return Na[e];if(t)return 0;var r=parseInt(s,10),a=r%100,n=(r-a)/100;return n*60+a}function ys(e){var t=xa.exec(Ra(e._i)),s;if(t){if(s=Wa(t[4],t[3],t[2],t[5],t[6],t[7]),!Fa(t[1],s,e))return;e._a=s,e._tzm=Ca(t[8],t[9],t[10]),e._d=ve.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),c(e).rfc2822=!0}else e._isValid=!1}function La(e){var t=ba.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(_s(e),e._isValid===!1)delete e._isValid;else return;if(ys(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:u.createFromInputFallback(e)}u.createFromInputFallback=P("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function de(e,t,s){return e??t??s}function Ua(e){var t=new Date(u.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Nt(e){var t,s,r=[],a,n,i;if(!e._d){for(a=Ua(e),e._w&&e._a[E]==null&&e._a[Z]==null&&Ia(e),e._dayOfYear!=null&&(i=de(e._a[O],a[O]),(e._dayOfYear>Se(i)||e._dayOfYear===0)&&(c(e)._overflowDayOfYear=!0),s=ve(i,0,e._dayOfYear),e._a[Z]=s.getUTCMonth(),e._a[E]=s.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=a[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[D]===24&&e._a[F]===0&&e._a[$]===0&&e._a[ne]===0&&(e._nextDay=!0,e._a[D]=0),e._d=(e._useUTC?ve:jr).apply(null,r),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[D]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==n&&(c(e).weekdayMismatch=!0)}}function Ia(e){var t,s,r,a,n,i,l,h,m;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(n=1,i=4,s=de(t.GG,e._a[O],pe(S(),1,4).year),r=de(t.W,1),a=de(t.E,1),(a<1||a>7)&&(h=!0)):(n=e._locale._week.dow,i=e._locale._week.doy,m=pe(S(),n,i),s=de(t.gg,e._a[O],m.year),r=de(t.w,m.week),t.d!=null?(a=t.d,(a<0||a>6)&&(h=!0)):t.e!=null?(a=t.e+n,(t.e<0||t.e>6)&&(h=!0)):a=n),r<1||r>q(s,n,i)?c(e)._overflowWeeks=!0:h!=null?c(e)._overflowWeekday=!0:(l=ds(s,r,a,n,i),e._a[O]=l.year,e._dayOfYear=l.dayOfYear)}u.ISO_8601=function(){};u.RFC_2822=function(){};function Wt(e){if(e._f===u.ISO_8601){_s(e);return}if(e._f===u.RFC_2822){ys(e);return}e._a=[],c(e).empty=!0;var t=""+e._i,s,r,a,n,i,l=t.length,h=0,m,Y;for(a=Xt(e._f,e._locale).match(gt)||[],Y=a.length,s=0;s<Y;s++)n=a[s],r=(t.match(Yr(n,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&c(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),h+=r.length),fe[n]?(r?c(e).empty=!1:c(e).unusedTokens.push(n),Tr(n,r,e)):e._strict&&!r&&c(e).unusedTokens.push(n);c(e).charsLeftOver=l-h,t.length>0&&c(e).unusedInput.push(t),e._a[D]<=12&&c(e).bigHour===!0&&e._a[D]>0&&(c(e).bigHour=void 0),c(e).parsedDateParts=e._a.slice(0),c(e).meridiem=e._meridiem,e._a[D]=Ha(e._locale,e._a[D],e._meridiem),m=c(e).era,m!==null&&(e._a[O]=e._locale.erasConvertYear(m,e._a[O])),Nt(e),xt(e)}function Ha(e,t,s){var r;return s==null?t:e.meridiemHour!=null?e.meridiemHour(t,s):(e.isPM!=null&&(r=e.isPM(s),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Ea(e){var t,s,r,a,n,i,l=!1,h=e._f.length;if(h===0){c(e).invalidFormat=!0,e._d=new Date(NaN);return}for(a=0;a<h;a++)n=0,i=!1,t=wt({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[a],Wt(t),yt(t)&&(i=!0),n+=c(t).charsLeftOver,n+=c(t).unusedTokens.length*10,c(t).score=n,l?n<r&&(r=n,s=t):(r==null||n<r||i)&&(r=n,s=t,i&&(l=!0));ee(e,s||t)}function Aa(e){if(!e._d){var t=St(e._i),s=t.day===void 0?t.date:t.day;e._a=qt([t.year,t.month,s,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),Nt(e)}}function Va(e){var t=new Oe(xt(ws(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function ws(e){var t=e._i,s=e._f;return e._locale=e._locale||Q(e._l),t===null||s===void 0&&t===""?Ae({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),L(t)?new Oe(xt(t)):(Ye(t)?e._d=t:C(s)?Ea(e):s?Wt(e):Ga(e),yt(e)||(e._d=null),e))}function Ga(e){var t=e._i;b(t)?e._d=new Date(u.now()):Ye(t)?e._d=new Date(t.valueOf()):typeof t=="string"?La(e):C(t)?(e._a=qt(t.slice(0),function(s){return parseInt(s,10)}),Nt(e)):ie(t)?Aa(e):J(t)?e._d=new Date(t):u.createFromInputFallback(e)}function ks(e,t,s,r,a){var n={};return(t===!0||t===!1)&&(r=t,t=void 0),(s===!0||s===!1)&&(r=s,s=void 0),(ie(e)&&_t(e)||C(e)&&e.length===0)&&(e=void 0),n._isAMomentObject=!0,n._useUTC=n._isUTC=a,n._l=s,n._i=e,n._f=t,n._strict=r,Va(n)}function S(e,t,s,r){return ks(e,t,s,r,!1)}var ja=P("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=S.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Ae()}),za=P("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=S.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Ae()});function gs(e,t){var s,r;if(t.length===1&&C(t[0])&&(t=t[0]),!t.length)return S();for(s=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](s))&&(s=t[r]);return s}function Za(){var e=[].slice.call(arguments,0);return gs("isBefore",e)}function $a(){var e=[].slice.call(arguments,0);return gs("isAfter",e)}var Ba=function(){return Date.now?Date.now():+new Date},ge=["year","quarter","month","week","day","hour","minute","second","millisecond"];function qa(e){var t,s=!1,r,a=ge.length;for(t in e)if(w(e,t)&&!(p.call(ge,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<a;++r)if(e[ge[r]]){if(s)return!1;parseFloat(e[ge[r]])!==_(e[ge[r]])&&(s=!0)}return!0}function Ja(){return this._isValid}function Qa(){return U(NaN)}function qe(e){var t=St(e),s=t.year||0,r=t.quarter||0,a=t.month||0,n=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,h=t.minute||0,m=t.second||0,Y=t.millisecond||0;this._isValid=qa(t),this._milliseconds=+Y+m*1e3+h*6e4+l*1e3*60*60,this._days=+i+n*7,this._months=+a+r*3+s*12,this._data={},this._locale=Q(),this._bubble()}function Fe(e){return e instanceof qe}function ft(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Xa(e,t,s){var r=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),n=0,i;for(i=0;i<r;i++)_(e[i])!==_(t[i])&&n++;return n+a}function Ss(e,t){f(e,0,0,function(){var s=this.utcOffset(),r="+";return s<0&&(s=-s,r="-"),r+A(~~(s/60),2)+t+A(~~s%60,2)})}Ss("Z",":");Ss("ZZ","");d("Z",Ze);d("ZZ",Ze);g(["Z","ZZ"],function(e,t,s){s._useUTC=!0,s._tzm=Pt(Ze,e)});var Ka=/([\+\-]|\d\d)/gi;function Pt(e,t){var s=(t||"").match(e),r,a,n;return s===null?null:(r=s[s.length-1]||[],a=(r+"").match(Ka)||["-",0,0],n=+(a[1]*60)+_(a[2]),n===0?0:a[0]==="+"?n:-n)}function Rt(e,t){var s,r;return t._isUTC?(s=t.clone(),r=(L(e)||Ye(e)?e.valueOf():S(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+r),u.updateOffset(s,!1),s):S(e).local()}function ct(e){return-Math.round(e._d.getTimezoneOffset())}u.updateOffset=function(){};function en(e,t,s){var r=this._offset||0,a;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Pt(Ze,e),e===null)return this}else Math.abs(e)<16&&!s&&(e=e*60);return!this._isUTC&&t&&(a=ct(this)),this._offset=e,this._isUTC=!0,a!=null&&this.add(a,"m"),r!==e&&(!t||this._changeInProgress?ps(this,U(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,u.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:ct(this)}function tn(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function sn(e){return this.utcOffset(0,e)}function rn(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(ct(this),"m")),this}function an(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Pt(pr,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function nn(e){return this.isValid()?(e=e?S(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function on(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ln(){if(!b(this._isDSTShifted))return this._isDSTShifted;var e={},t;return wt(e,this),e=ws(e),e._a?(t=e._isUTC?V(e._a):S(e._a),this._isDSTShifted=this.isValid()&&Xa(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function un(){return this.isValid()?!this._isUTC:!1}function dn(){return this.isValid()?this._isUTC:!1}function Ms(){return this.isValid()?this._isUTC&&this._offset===0:!1}var hn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,fn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function U(e,t){var s=e,r=null,a,n,i;return Fe(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:J(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(r=hn.exec(e))?(a=r[1]==="-"?-1:1,s={y:0,d:_(r[E])*a,h:_(r[D])*a,m:_(r[F])*a,s:_(r[$])*a,ms:_(ft(r[ne]*1e3))*a}):(r=fn.exec(e))?(a=r[1]==="-"?-1:1,s={y:ae(r[2],a),M:ae(r[3],a),w:ae(r[4],a),d:ae(r[5],a),h:ae(r[6],a),m:ae(r[7],a),s:ae(r[8],a)}):s==null?s={}:typeof s=="object"&&("from"in s||"to"in s)&&(i=cn(S(s.from),S(s.to)),s={},s.ms=i.milliseconds,s.M=i.months),n=new qe(s),Fe(e)&&w(e,"_locale")&&(n._locale=e._locale),Fe(e)&&w(e,"_isValid")&&(n._isValid=e._isValid),n}U.fn=qe.prototype;U.invalid=Qa;function ae(e,t){var s=e&&parseFloat(e.replace(",","."));return(isNaN(s)?0:s)*t}function Zt(e,t){var s={};return s.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(s.months,"M").isAfter(t)&&--s.months,s.milliseconds=+t-+e.clone().add(s.months,"M"),s}function cn(e,t){var s;return e.isValid()&&t.isValid()?(t=Rt(t,e),e.isBefore(t)?s=Zt(e,t):(s=Zt(t,e),s.milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0}}function vs(e,t){return function(s,r){var a,n;return r!==null&&!isNaN(+r)&&(Qt(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=s,s=r,r=n),a=U(s,r),ps(this,a,e),this}}function ps(e,t,s,r){var a=t._milliseconds,n=ft(t._days),i=ft(t._months);e.isValid()&&(r=r??!0,i&&os(e,Me(e,"Month")+i*s),n&&as(e,"Date",Me(e,"Date")+n*s),a&&e._d.setTime(e._d.valueOf()+a*s),r&&u.updateOffset(e,n||i))}var mn=vs(1,"add"),_n=vs(-1,"subtract");function Ds(e){return typeof e=="string"||e instanceof String}function yn(e){return L(e)||Ye(e)||Ds(e)||J(e)||kn(e)||wn(e)||e===null||e===void 0}function wn(e){var t=ie(e)&&!_t(e),s=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a,n,i=r.length;for(a=0;a<i;a+=1)n=r[a],s=s||w(e,n);return t&&s}function kn(e){var t=C(e),s=!1;return t&&(s=e.filter(function(r){return!J(r)&&Ds(e)}).length===0),t&&s}function gn(e){var t=ie(e)&&!_t(e),s=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],a,n;for(a=0;a<r.length;a+=1)n=r[a],s=s||w(e,n);return t&&s}function Sn(e,t){var s=e.diff(t,"days",!0);return s<-6?"sameElse":s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":"sameElse"}function Mn(e,t){arguments.length===1&&(arguments[0]?yn(arguments[0])?(e=arguments[0],t=void 0):gn(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var s=e||S(),r=Rt(s,this).startOf("day"),a=u.calendarFormat(this,r)||"sameElse",n=t&&(G(t[a])?t[a].call(this,s):t[a]);return this.format(n||this.localeData().calendar(a,this,S(s)))}function vn(){return new Oe(this)}function pn(e,t){var s=L(e)?e:S(e);return this.isValid()&&s.isValid()?(t=R(t)||"millisecond",t==="millisecond"?this.valueOf()>s.valueOf():s.valueOf()<this.clone().startOf(t).valueOf()):!1}function Dn(e,t){var s=L(e)?e:S(e);return this.isValid()&&s.isValid()?(t=R(t)||"millisecond",t==="millisecond"?this.valueOf()<s.valueOf():this.clone().endOf(t).valueOf()<s.valueOf()):!1}function Yn(e,t,s,r){var a=L(e)?e:S(e),n=L(t)?t:S(t);return this.isValid()&&a.isValid()&&n.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(a,s):!this.isBefore(a,s))&&(r[1]===")"?this.isBefore(n,s):!this.isAfter(n,s))):!1}function On(e,t){var s=L(e)?e:S(e),r;return this.isValid()&&s.isValid()?(t=R(t)||"millisecond",t==="millisecond"?this.valueOf()===s.valueOf():(r=s.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Tn(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function bn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function xn(e,t,s){var r,a,n;if(!this.isValid())return NaN;if(r=Rt(e,this),!r.isValid())return NaN;switch(a=(r.utcOffset()-this.utcOffset())*6e4,t=R(t),t){case"year":n=Ce(this,r)/12;break;case"month":n=Ce(this,r);break;case"quarter":n=Ce(this,r)/3;break;case"second":n=(this-r)/1e3;break;case"minute":n=(this-r)/6e4;break;case"hour":n=(this-r)/36e5;break;case"day":n=(this-r-a)/864e5;break;case"week":n=(this-r-a)/6048e5;break;default:n=this-r}return s?n:W(n)}function Ce(e,t){if(e.date()<t.date())return-Ce(t,e);var s=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(s,"months"),a,n;return t-r<0?(a=e.clone().add(s-1,"months"),n=(t-r)/(r-a)):(a=e.clone().add(s+1,"months"),n=(t-r)/(a-r)),-(s+n)||0}u.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";u.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Nn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Wn(e){if(!this.isValid())return null;var t=e!==!0,s=t?this.clone().utc():this;return s.year()<0||s.year()>9999?Re(s,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):G(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Re(s,"Z")):Re(s,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Pn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",s,r,a,n;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),s="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",n=t+'[")]',this.format(s+r+a+n)}function Rn(e){e||(e=this.isUtc()?u.defaultFormatUtc:u.defaultFormat);var t=Re(this,e);return this.localeData().postformat(t)}function Fn(e,t){return this.isValid()&&(L(e)&&e.isValid()||S(e).isValid())?U({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Cn(e){return this.from(S(),e)}function Ln(e,t){return this.isValid()&&(L(e)&&e.isValid()||S(e).isValid())?U({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Un(e){return this.to(S(),e)}function Ys(e){var t;return e===void 0?this._locale._abbr:(t=Q(e),t!=null&&(this._locale=t),this)}var Os=P("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Ts(){return this._locale}var Ie=1e3,ce=60*Ie,He=60*ce,bs=(365*400+97)*24*He;function me(e,t){return(e%t+t)%t}function xs(e,t,s){return e<100&&e>=0?new Date(e+400,t,s)-bs:new Date(e,t,s).valueOf()}function Ns(e,t,s){return e<100&&e>=0?Date.UTC(e+400,t,s)-bs:Date.UTC(e,t,s)}function In(e){var t,s;if(e=R(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?Ns:xs,e){case"year":t=s(this.year(),0,1);break;case"quarter":t=s(this.year(),this.month()-this.month()%3,1);break;case"month":t=s(this.year(),this.month(),1);break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=s(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=me(t+(this._isUTC?0:this.utcOffset()*ce),He);break;case"minute":t=this._d.valueOf(),t-=me(t,ce);break;case"second":t=this._d.valueOf(),t-=me(t,Ie);break}return this._d.setTime(t),u.updateOffset(this,!0),this}function Hn(e){var t,s;if(e=R(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?Ns:xs,e){case"year":t=s(this.year()+1,0,1)-1;break;case"quarter":t=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=s(this.year(),this.month()+1,1)-1;break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=He-me(t+(this._isUTC?0:this.utcOffset()*ce),He)-1;break;case"minute":t=this._d.valueOf(),t+=ce-me(t,ce)-1;break;case"second":t=this._d.valueOf(),t+=Ie-me(t,Ie)-1;break}return this._d.setTime(t),u.updateOffset(this,!0),this}function En(){return this._d.valueOf()-(this._offset||0)*6e4}function An(){return Math.floor(this.valueOf()/1e3)}function Vn(){return new Date(this.valueOf())}function Gn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function jn(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function zn(){return this.isValid()?this.toISOString():null}function Zn(){return yt(this)}function $n(){return ee({},c(this))}function Bn(){return c(this).overflow}function qn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}f("N",0,0,"eraAbbr");f("NN",0,0,"eraAbbr");f("NNN",0,0,"eraAbbr");f("NNNN",0,0,"eraName");f("NNNNN",0,0,"eraNarrow");f("y",["y",1],"yo","eraYear");f("y",["yy",2],0,"eraYear");f("y",["yyy",3],0,"eraYear");f("y",["yyyy",4],0,"eraYear");d("N",Ft);d("NN",Ft);d("NNN",Ft);d("NNNN",ii);d("NNNNN",oi);g(["N","NN","NNN","NNNN","NNNNN"],function(e,t,s,r){var a=s._locale.erasParse(e,r,s._strict);a?c(s).era=a:c(s).invalidEra=e});d("y",_e);d("yy",_e);d("yyy",_e);d("yyyy",_e);d("yo",li);g(["y","yy","yyy","yyyy"],O);g(["yo"],function(e,t,s,r){var a;s._locale._eraYearOrdinalRegex&&(a=e.match(s._locale._eraYearOrdinalRegex)),s._locale.eraYearOrdinalParse?t[O]=s._locale.eraYearOrdinalParse(e,a):t[O]=parseInt(e,10)});function Jn(e,t){var s,r,a,n=this._eras||Q("en")._eras;for(s=0,r=n.length;s<r;++s)switch(typeof n[s].since==="string"&&(a=u(n[s].since).startOf("day"),n[s].since=a.valueOf()),typeof n[s].until){case"undefined":n[s].until=1/0;break;case"string":a=u(n[s].until).startOf("day").valueOf(),n[s].until=a.valueOf();break}return n}function Qn(e,t,s){var r,a,n=this.eras(),i,l,h;for(e=e.toUpperCase(),r=0,a=n.length;r<a;++r)if(i=n[r].name.toUpperCase(),l=n[r].abbr.toUpperCase(),h=n[r].narrow.toUpperCase(),s)switch(t){case"N":case"NN":case"NNN":if(l===e)return n[r];break;case"NNNN":if(i===e)return n[r];break;case"NNNNN":if(h===e)return n[r];break}else if([i,l,h].indexOf(e)>=0)return n[r]}function Xn(e,t){var s=e.since<=e.until?1:-1;return t===void 0?u(e.since).year():u(e.since).year()+(t-e.offset)*s}function Kn(){var e,t,s,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),r[e].since<=s&&s<=r[e].until||r[e].until<=s&&s<=r[e].since)return r[e].name;return""}function ei(){var e,t,s,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),r[e].since<=s&&s<=r[e].until||r[e].until<=s&&s<=r[e].since)return r[e].narrow;return""}function ti(){var e,t,s,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),r[e].since<=s&&s<=r[e].until||r[e].until<=s&&s<=r[e].since)return r[e].abbr;return""}function si(){var e,t,s,r,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(s=a[e].since<=a[e].until?1:-1,r=this.clone().startOf("day").valueOf(),a[e].since<=r&&r<=a[e].until||a[e].until<=r&&r<=a[e].since)return(this.year()-u(a[e].since).year())*s+a[e].offset;return this.year()}function ri(e){return w(this,"_erasNameRegex")||Ct.call(this),e?this._erasNameRegex:this._erasRegex}function ai(e){return w(this,"_erasAbbrRegex")||Ct.call(this),e?this._erasAbbrRegex:this._erasRegex}function ni(e){return w(this,"_erasNarrowRegex")||Ct.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ft(e,t){return t.erasAbbrRegex(e)}function ii(e,t){return t.erasNameRegex(e)}function oi(e,t){return t.erasNarrowRegex(e)}function li(e,t){return t._eraYearOrdinalRegex||_e}function Ct(){var e=[],t=[],s=[],r=[],a,n,i,l,h,m=this.eras();for(a=0,n=m.length;a<n;++a)i=B(m[a].name),l=B(m[a].abbr),h=B(m[a].narrow),t.push(i),e.push(l),s.push(h),r.push(i),r.push(l),r.push(h);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}f(0,["gg",2],0,function(){return this.weekYear()%100});f(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Je(e,t){f(0,[e,e.length],0,t)}Je("gggg","weekYear");Je("ggggg","weekYear");Je("GGGG","isoWeekYear");Je("GGGGG","isoWeekYear");d("G",ze);d("g",ze);d("GG",M,x);d("gg",M,x);d("GGGG",vt,Mt);d("gggg",vt,Mt);d("GGGGG",je,Ve);d("ggggg",je,Ve);be(["gggg","ggggg","GGGG","GGGGG"],function(e,t,s,r){t[r.substr(0,2)]=_(e)});be(["gg","GG"],function(e,t,s,r){t[r]=u.parseTwoDigitYear(e)});function ui(e){return Ws.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function di(e){return Ws.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function hi(){return q(this.year(),1,4)}function fi(){return q(this.isoWeekYear(),1,4)}function ci(){var e=this.localeData()._week;return q(this.year(),e.dow,e.doy)}function mi(){var e=this.localeData()._week;return q(this.weekYear(),e.dow,e.doy)}function Ws(e,t,s,r,a){var n;return e==null?pe(this,r,a).year:(n=q(e,r,a),t>n&&(t=n),_i.call(this,e,t,s,r,a))}function _i(e,t,s,r,a){var n=ds(e,t,s,r,a),i=ve(n.year,0,n.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}f("Q",0,"Qo","quarter");d("Q",Kt);g("Q",function(e,t){t[Z]=(_(e)-1)*3});function yi(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}f("D",["DD",2],"Do","date");d("D",M,ye);d("DD",M,x);d("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});g(["D","DD"],E);g("Do",function(e,t){t[E]=_(e.match(M)[0])});var Ps=we("Date",!0);f("DDD",["DDDD",3],"DDDo","dayOfYear");d("DDD",Ge);d("DDDD",es);g(["DDD","DDDD"],function(e,t,s){s._dayOfYear=_(e)});function wi(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}f("m",["mm",2],0,"minute");d("m",M,pt);d("mm",M,x);g(["m","mm"],F);var ki=we("Minutes",!1);f("s",["ss",2],0,"second");d("s",M,pt);d("ss",M,x);g(["s","ss"],$);var gi=we("Seconds",!1);f("S",0,0,function(){return~~(this.millisecond()/100)});f(0,["SS",2],0,function(){return~~(this.millisecond()/10)});f(0,["SSS",3],0,"millisecond");f(0,["SSSS",4],0,function(){return this.millisecond()*10});f(0,["SSSSS",5],0,function(){return this.millisecond()*100});f(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});f(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});f(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});f(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});d("S",Ge,Kt);d("SS",Ge,x);d("SSS",Ge,es);var te,Rs;for(te="SSSS";te.length<=9;te+="S")d(te,_e);function Si(e,t){t[ne]=_(("0."+e)*1e3)}for(te="S";te.length<=9;te+="S")g(te,Si);Rs=we("Milliseconds",!1);f("z",0,0,"zoneAbbr");f("zz",0,0,"zoneName");function Mi(){return this._isUTC?"UTC":""}function vi(){return this._isUTC?"Coordinated Universal Time":""}var o=Oe.prototype;o.add=mn;o.calendar=Mn;o.clone=vn;o.diff=xn;o.endOf=Hn;o.format=Rn;o.from=Fn;o.fromNow=Cn;o.to=Ln;o.toNow=Un;o.get=Wr;o.invalidAt=Bn;o.isAfter=pn;o.isBefore=Dn;o.isBetween=Yn;o.isSame=On;o.isSameOrAfter=Tn;o.isSameOrBefore=bn;o.isValid=Zn;o.lang=Os;o.locale=Ys;o.localeData=Ts;o.max=za;o.min=ja;o.parsingFlags=$n;o.set=Pr;o.startOf=In;o.subtract=_n;o.toArray=Gn;o.toObject=jn;o.toDate=Vn;o.toISOString=Wn;o.inspect=Pn;typeof Symbol<"u"&&Symbol.for!=null&&(o[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});o.toJSON=zn;o.toString=Nn;o.unix=An;o.valueOf=En;o.creationData=qn;o.eraName=Kn;o.eraNarrow=ei;o.eraAbbr=ti;o.eraYear=si;o.year=rs;o.isLeapYear=Nr;o.weekYear=ui;o.isoWeekYear=di;o.quarter=o.quarters=yi;o.month=ls;o.daysInMonth=Ar;o.week=o.weeks=qr;o.isoWeek=o.isoWeeks=Jr;o.weeksInYear=ci;o.weeksInWeekYear=mi;o.isoWeeksInYear=hi;o.isoWeeksInISOWeekYear=fi;o.date=Ps;o.day=o.days=ua;o.weekday=da;o.isoWeekday=ha;o.dayOfYear=wi;o.hour=o.hours=ka;o.minute=o.minutes=ki;o.second=o.seconds=gi;o.millisecond=o.milliseconds=Rs;o.utcOffset=en;o.utc=sn;o.local=rn;o.parseZone=an;o.hasAlignedHourOffset=nn;o.isDST=on;o.isLocal=un;o.isUtcOffset=dn;o.isUtc=Ms;o.isUTC=Ms;o.zoneAbbr=Mi;o.zoneName=vi;o.dates=P("dates accessor is deprecated. Use date instead.",Ps);o.months=P("months accessor is deprecated. Use month instead",ls);o.years=P("years accessor is deprecated. Use year instead",rs);o.zone=P("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",tn);o.isDSTShifted=P("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ln);function pi(e){return S(e*1e3)}function Di(){return S.apply(null,arguments).parseZone()}function Fs(e){return e}var k=kt.prototype;k.calendar=lr;k.longDateFormat=fr;k.invalidDate=mr;k.ordinal=wr;k.preparse=Fs;k.postformat=Fs;k.relativeTime=gr;k.pastFuture=Sr;k.set=ir;k.eras=Jn;k.erasParse=Qn;k.erasConvertYear=Xn;k.erasAbbrRegex=ai;k.erasNameRegex=ri;k.erasNarrowRegex=ni;k.months=Ur;k.monthsShort=Ir;k.monthsParse=Er;k.monthsRegex=Gr;k.monthsShortRegex=Vr;k.week=zr;k.firstDayOfYear=Br;k.firstDayOfWeek=$r;k.weekdays=aa;k.weekdaysMin=ia;k.weekdaysShort=na;k.weekdaysParse=la;k.weekdaysRegex=fa;k.weekdaysShortRegex=ca;k.weekdaysMinRegex=ma;k.isPM=ya;k.meridiem=ga;function Ee(e,t,s,r){var a=Q(),n=V().set(r,t);return a[s](n,e)}function Cs(e,t,s){if(J(e)&&(t=e,e=void 0),e=e||"",t!=null)return Ee(e,t,s,"month");var r,a=[];for(r=0;r<12;r++)a[r]=Ee(e,r,s,"month");return a}function Lt(e,t,s,r){typeof e=="boolean"?(J(t)&&(s=t,t=void 0),t=t||""):(t=e,s=t,e=!1,J(t)&&(s=t,t=void 0),t=t||"");var a=Q(),n=e?a._week.dow:0,i,l=[];if(s!=null)return Ee(t,(s+n)%7,r,"day");for(i=0;i<7;i++)l[i]=Ee(t,(i+n)%7,r,"day");return l}function Yi(e,t){return Cs(e,t,"months")}function Oi(e,t){return Cs(e,t,"monthsShort")}function Ti(e,t,s){return Lt(e,t,s,"weekdays")}function bi(e,t,s){return Lt(e,t,s,"weekdaysShort")}function xi(e,t,s){return Lt(e,t,s,"weekdaysMin")}se("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,s=_(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+s}});u.lang=P("moment.lang is deprecated. Use moment.locale instead.",se);u.langData=P("moment.langData is deprecated. Use moment.localeData instead.",Q);var j=Math.abs;function Ni(){var e=this._data;return this._milliseconds=j(this._milliseconds),this._days=j(this._days),this._months=j(this._months),e.milliseconds=j(e.milliseconds),e.seconds=j(e.seconds),e.minutes=j(e.minutes),e.hours=j(e.hours),e.months=j(e.months),e.years=j(e.years),this}function Ls(e,t,s,r){var a=U(t,s);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function Wi(e,t){return Ls(this,e,t,1)}function Pi(e,t){return Ls(this,e,t,-1)}function $t(e){return e<0?Math.floor(e):Math.ceil(e)}function Ri(){var e=this._milliseconds,t=this._days,s=this._months,r=this._data,a,n,i,l,h;return e>=0&&t>=0&&s>=0||e<=0&&t<=0&&s<=0||(e+=$t(mt(s)+t)*864e5,t=0,s=0),r.milliseconds=e%1e3,a=W(e/1e3),r.seconds=a%60,n=W(a/60),r.minutes=n%60,i=W(n/60),r.hours=i%24,t+=W(i/24),h=W(Us(t)),s+=h,t-=$t(mt(h)),l=W(s/12),s%=12,r.days=t,r.months=s,r.years=l,this}function Us(e){return e*4800/146097}function mt(e){return e*146097/4800}function Fi(e){if(!this.isValid())return NaN;var t,s,r=this._milliseconds;if(e=R(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,s=this._months+Us(t),e){case"month":return s;case"quarter":return s/3;case"year":return s/12}else switch(t=this._days+Math.round(mt(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function X(e){return function(){return this.as(e)}}var Is=X("ms"),Ci=X("s"),Li=X("m"),Ui=X("h"),Ii=X("d"),Hi=X("w"),Ei=X("M"),Ai=X("Q"),Vi=X("y"),Gi=Is;function ji(){return U(this)}function zi(e){return e=R(e),this.isValid()?this[e+"s"]():NaN}function oe(e){return function(){return this.isValid()?this._data[e]:NaN}}var Zi=oe("milliseconds"),$i=oe("seconds"),Bi=oe("minutes"),qi=oe("hours"),Ji=oe("days"),Qi=oe("months"),Xi=oe("years");function Ki(){return W(this.days()/7)}var z=Math.round,he={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function eo(e,t,s,r,a){return a.relativeTime(t||1,!!s,e,r)}function to(e,t,s,r){var a=U(e).abs(),n=z(a.as("s")),i=z(a.as("m")),l=z(a.as("h")),h=z(a.as("d")),m=z(a.as("M")),Y=z(a.as("w")),N=z(a.as("y")),I=n<=s.ss&&["s",n]||n<s.s&&["ss",n]||i<=1&&["m"]||i<s.m&&["mm",i]||l<=1&&["h"]||l<s.h&&["hh",l]||h<=1&&["d"]||h<s.d&&["dd",h];return s.w!=null&&(I=I||Y<=1&&["w"]||Y<s.w&&["ww",Y]),I=I||m<=1&&["M"]||m<s.M&&["MM",m]||N<=1&&["y"]||["yy",N],I[2]=t,I[3]=+e>0,I[4]=r,eo.apply(null,I)}function so(e){return e===void 0?z:typeof e=="function"?(z=e,!0):!1}function ro(e,t){return he[e]===void 0?!1:t===void 0?he[e]:(he[e]=t,e==="s"&&(he.ss=t-1),!0)}function ao(e,t){if(!this.isValid())return this.localeData().invalidDate();var s=!1,r=he,a,n;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(s=e),typeof t=="object"&&(r=Object.assign({},he,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),a=this.localeData(),n=to(this,!s,r,a),s&&(n=a.pastFuture(+this,n)),a.postformat(n)}var ot=Math.abs;function ue(e){return(e>0)-(e<0)||+e}function Qe(){if(!this.isValid())return this.localeData().invalidDate();var e=ot(this._milliseconds)/1e3,t=ot(this._days),s=ot(this._months),r,a,n,i,l=this.asSeconds(),h,m,Y,N;return l?(r=W(e/60),a=W(r/60),e%=60,r%=60,n=W(s/12),s%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",h=l<0?"-":"",m=ue(this._months)!==ue(l)?"-":"",Y=ue(this._days)!==ue(l)?"-":"",N=ue(this._milliseconds)!==ue(l)?"-":"",h+"P"+(n?m+n+"Y":"")+(s?m+s+"M":"")+(t?Y+t+"D":"")+(a||r||e?"T":"")+(a?N+a+"H":"")+(r?N+r+"M":"")+(e?N+i+"S":"")):"P0D"}var y=qe.prototype;y.isValid=Ja;y.abs=Ni;y.add=Wi;y.subtract=Pi;y.as=Fi;y.asMilliseconds=Is;y.asSeconds=Ci;y.asMinutes=Li;y.asHours=Ui;y.asDays=Ii;y.asWeeks=Hi;y.asMonths=Ei;y.asQuarters=Ai;y.asYears=Vi;y.valueOf=Gi;y._bubble=Ri;y.clone=ji;y.get=zi;y.milliseconds=Zi;y.seconds=$i;y.minutes=Bi;y.hours=qi;y.days=Ji;y.weeks=Ki;y.months=Qi;y.years=Xi;y.humanize=ao;y.toISOString=Qe;y.toString=Qe;y.toJSON=Qe;y.locale=Ys;y.localeData=Ts;y.toIsoString=P("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qe);y.lang=Os;f("X",0,0,"unix");f("x",0,0,"valueOf");d("x",ze);d("X",Dr);g("X",function(e,t,s){s._d=new Date(parseFloat(e)*1e3)});g("x",function(e,t,s){s._d=new Date(_(e))});u.version="2.30.1";ar(S);u.fn=o;u.min=Za;u.max=$a;u.now=Ba;u.utc=V;u.unix=pi;u.months=Yi;u.isDate=Ye;u.locale=se;u.invalid=Ae;u.duration=U;u.isMoment=L;u.weekdays=Ti;u.parseZone=Di;u.localeData=Q;u.isDuration=Fe;u.monthsShort=Oi;u.weekdaysMin=xi;u.defineLocale=bt;u.updateLocale=pa;u.locales=Da;u.weekdaysShort=bi;u.normalizeUnits=R;u.relativeTimeRounding=so;u.relativeTimeThreshold=ro;u.calendarFormat=Sn;u.prototype=o;u.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};export{io as B,u as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as V,K as be,M as Ee,a6 as k,i as X,l as Ie,m as P,aV as re,r as y,c as A,ab as xe,b as p,a as C,w as a,bs as se,u as x,bC as fe,aH as R,f as N,ao as G,o as h,J as Q,a5 as M,v as te,aa as H,Y as we,F as q,N as K,E as ce,B as D,k as Y,y as j,bD as De,O as de,P as pe,ae as ue,ac as Se,z as Fe,p as W,Z as _e,aI as me,a1 as Pe,a2 as $e,t as F,n as Re,bE as Me,ap as Te,bF as Ae,bG as Ne,av as ke,bH as z,aN as Ve,a0 as Be,ai as ze,H as je,aq as He,a4 as Ge,Q as Ke,al as le,bI as ae,bv as he}from"./index-cHbH7T5D.js";import{c as ve,a as We,b as Ue,_ as Ye}from"./index.vue_vue_type_style_index_0_lang-CVT5yNeL.js";import{c as Z,r as ge,v as Oe,p as qe,h as Ce,l as Je,m as Xe}from"./index-BfqhDZ1z.js";import{m as Qe}from"./v1Module-Clll6gmK.js";const O=[];for(let s=0;s<256;++s)O.push((s+256).toString(16).slice(1));function Ze(s,e=0){return(O[s[e+0]]+O[s[e+1]]+O[s[e+2]]+O[s[e+3]]+"-"+O[s[e+4]]+O[s[e+5]]+"-"+O[s[e+6]]+O[s[e+7]]+"-"+O[s[e+8]]+O[s[e+9]]+"-"+O[s[e+10]]+O[s[e+11]]+O[s[e+12]]+O[s[e+13]]+O[s[e+14]]+O[s[e+15]]).toLowerCase()}let ie;const et=new Uint8Array(16);function tt(){if(!ie){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ie=crypto.getRandomValues.bind(crypto)}return ie(et)}const ot=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ye={randomUUID:ot};function nt(s,e,t){s=s||{};const n=s.random??s.rng?.()??tt();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Ze(n)}function ee(s,e,t){return ye.randomUUID&&!s?ye.randomUUID():nt(s)}const st={class:"flex justify-between items-center w-full"},lt={class:"flex justify-between items-center w-full"},at={class:"text-right"},it=V({__name:"Item",props:be({index:{type:Number,default:0}},{modelValue:{type:Object,default:()=>({id:"",desc:"",miniPath:[],fullPath:[],activeTab:R.MINI})},modelModifiers:{}}),emits:["update:modelValue"],setup(s,{expose:e}){const t=Ee(s,"modelValue"),n={value:"path",label:"name"},o=k(M.COMP_EDIT_STORE),i=X("form"),r=Ie({miniPath:[{required:!0,message:"请选择预览文件",trigger:"blur"}]}),m=P(()=>o.compCarouselIndex===f.value),c=P(()=>{const I=re(o.directory);return v(I),I}),f=P(()=>o.previewList.findIndex(I=>I._id===t.value._id)),l=P(()=>o.selectedFolder?.path);function u(){return i.value?.validate()}function v(I){Array.isArray(I)&&I.forEach(b=>{b.disabled=b.type==="file"&&!b.name.endsWith(".vue"),Array.isArray(b.children)&&b.children.length>0&&v(b.children)})}function w(I){t.value={...t.value,desc:I}}function T(){t.value._id&&o.delPreviewCompItemById(t.value._id)}function _(){const I=o.previewList.findIndex(b=>b._id===t.value._id);o.setCompCarouselIndex(I)}async function g(I){const b=I??[];let L="";if(b?.length){if(o.isOnlineUpdate||o.isAddComp){const U=Z(l.value,b);L=`${Q}/${U}`}else if(o.isOfflineUpdate&&o.editCompId){const $=ve(o.editCompId)().latestVersionToFileAccessPath,B=new Map($.map(({path:oe,signedUrl:ne})=>[oe,ne])),J=ge(b.at(-1)??"");L=B.get(J)??""}}t.value={...t.value,miniPath:b,miniEntryUrl:L},i.value&&(await G(),i.value.validateField("miniPath"))}function d(I){const b=I??[];let L="";if(b?.length){if(o.isOnlineUpdate||o.isAddComp){const U=Z(l.value,b);L=`${Q}/${U}`}else if(o.isOfflineUpdate&&o.editCompId){const $=ve(o.editCompId)().latestVersionToFileAccessPath,B=new Map($.map(({path:oe,signedUrl:ne})=>[oe,ne])),J=ge(b.at(-1)??"");L=B.get(J)??""}}t.value={...t.value,fullPath:b,fullEntryUrl:L}}function E(){t.value={...t.value,activeTab:R.MINI}}function S(){t.value={...t.value,activeTab:R.FULL}}return e({validateForm:u}),(I,b)=>{const L=y("el-cascader"),U=y("el-button"),$=y("el-form-item"),B=y("el-input"),J=y("el-form");return h(),A("div",{class:xe(["cursor-pointer p-[5px] rounded-sm overflow-auto border border-[#ccc]",{active:m.value}]),onClick:_},[p(J,{ref:"form",model:t.value,rules:r,"label-width":"auto"},{default:a(()=>[p($,{label:"小窗预览文件:",prop:s.index===0?"miniPath":""},{default:a(()=>[C("div",st,[p(L,{"model-value":t.value.miniPath,options:c.value,props:n,placeholder:"请选择预览文件",onChange:g,clearable:s.index!==0},null,8,["model-value","options","clearable"]),p(U,{class:"ml-2",type:t.value.activeTab===x(R).MINI?"primary":"info",icon:x(fe),circle:"",disabled:!m.value,onClick:se(E,["stop"])},null,8,["type","icon","disabled"])])]),_:1},8,["prop"]),p($,{label:"全屏预览文件:",prop:"fullPath"},{default:a(()=>[C("div",lt,[p(L,{"model-value":t.value.fullPath,options:c.value,props:n,placeholder:"请选择预览文件",onChange:d,clearable:""},null,8,["model-value","options"]),p(U,{class:"ml-2",type:t.value.activeTab===x(R).FULL?"primary":"info",icon:x(fe),circle:"",disabled:!m.value,onClick:se(S,["stop"])},null,8,["type","icon","disabled"])])]),_:1}),p($,{label:"备注说明:"},{default:a(()=>[p(B,{"model-value":t.value.desc,type:"textarea",onInput:w},null,8,["model-value"])]),_:1})]),_:1},8,["model","rules"]),C("div",at,[p(U,{type:"danger",onClick:se(T,["stop"]),disabled:s.index===0},{default:a(()=>[...b[0]||(b[0]=[N("删除",-1)])]),_:1},8,["disabled"])])],2)}}}),rt=te(it,[["__scopeId","data-v-0da40f38"]]),ct={class:"size-full overflow-auto flex flex-col gap-2 items-start"},dt={class:"flex-1 overflow-auto overflow-x-hidden size-full"},pt=V({__name:"index",setup(s){const e=k(M.COMP_EDIT_STORE),t=k(M.CALLBACKS),n=X("items");async function o(){if(e.previewList.length>=5){ce.error("最多添加5个预览入口");return}e.addPreviewCompItem({_id:ee(),miniPath:[],fullPath:[],activeTab:R.MINI,miniEntryUrl:"",fullEntryUrl:""}),await G(),e.setCompCarouselIndex(e.previewList.length-1)}function i(r){const{_id:m}=r;m&&e.updatePreviewCompItemById(m,r)}return t.set(H.CHECK_PREVIEW_LIST_FORM,()=>{n.value?.forEach(r=>{r?.validateForm()})}),(r,m)=>{const c=y("el-button");return h(),A("div",ct,[p(c,{type:"primary",onClick:o},{default:a(()=>[...m[0]||(m[0]=[N(" 添加预览入口 ",-1)])]),_:1}),C("div",dt,[p(we,{class:"size-full",isEmpty:!x(e).previewList.length,emptyDescription:"请添加预览入口"},{default:a(()=>[p(We,{"item-min-width":350},{default:a(()=>[(h(!0),A(q,null,K(x(e).previewList,(f,l)=>(h(),D(rt,{ref_for:!0,ref:"items",key:f._id,index:l,"model-value":f,"onUpdate:modelValue":i},null,8,["index","model-value"]))),128))]),_:1})]),_:1},8,["isEmpty"])])])}}}),ut={class:"size-full overflow-auto"},mt=V({__name:"ExtraInfo",setup(s){const e=k(M.COMP_EDIT_STORE),t=k(M.CALLBACKS),n=X("form"),o=Y(200),i={name:[{required:!0,validator:(l,u,v)=>{if(!u)return v(new Error("组件名称不能为空"));Oe(u)?v():v(new Error("组件名只能是「大驼峰(PascalCase)」或「短横线(kebab-case)」命名法"))},trigger:["blur"]}],description:[{required:!0,message:"请输入备注说明",trigger:"blur"},{min:3,max:o.value,message:`长度在 3 到 ${o.value} 个字符`,trigger:"blur"}]},r=P(()=>e.selectedFolder.basename);async function m(){await n.value?.validate()}function c(l){e.setExtraInfo({...e.extraInfo,description:l.trim()})}function f(l){e.setExtraInfo({...e.extraInfo,name:l.trim()})}return j(r,l=>{e.extraInfo.name||e.setExtraInfo({...e.extraInfo,name:l})},{immediate:!0}),t.set(H.CHECK_EXTRA_INFO_FORM,m),(l,u)=>{const v=y("el-input"),w=y("el-form-item");return h(),A("div",ut,[p(x(De),{ref:"form","label-width":"auto",model:x(e).extraInfo,rules:i},{default:a(()=>[p(w,{label:"组件名称:",prop:"name"},{default:a(()=>[p(v,{maxlength:50,"show-word-limit":"","model-value":x(e).extraInfo.name,placeholder:"请输入组件名称",onInput:f},null,8,["model-value"])]),_:1}),p(w,{label:"备注说明:",prop:"description"},{default:a(()=>[p(v,{maxlength:o.value,"show-word-limit":"","model-value":x(e).extraInfo.description,placeholder:"请输入备注,有助于组件市场检索",rows:4,type:"textarea",onInput:c},null,8,["maxlength","model-value"])]),_:1})]),_:1},8,["model"])])}}}),ft={class:"size-full flex justify-center items-center overflow-hidden"},_t=V({__name:"PanelMini",props:{bg:{},miniEntryUrl:{},dep:{},depToFile:{},signedUrls:{}},setup(s){const e=s,t=P(()=>({finalEntryUrl:e.miniEntryUrl,dep:e.dep,depToFile:e.depToFile,signedUrls:e.signedUrls,panelType:R.MINI}));return(n,o)=>(h(),A("div",ft,[C("div",{class:"border border-[#e4e7ed] rounded-md h-full max-h-[230px] w-[400px]",style:ue({backgroundColor:s.bg})},[p(Ue,de(pe(t.value)),null,16)],4)]))}}),ht=V({__name:"PanelFull",props:{bg:{},fullEntryUrl:{},dep:{},depToFile:{},signedUrls:{}},setup(s){const e=s,t=P(()=>({finalEntryUrl:e.fullEntryUrl,dep:e.dep,depToFile:e.depToFile,signedUrls:e.signedUrls,panelType:R.FULL}));return(n,o)=>(h(),A("div",{class:"flex-1 border border-[#e4e7ed] overflow-hidden rounded-md size-full",style:ue({backgroundColor:s.bg})},[p(Ue,de(pe(t.value)),null,16)],4))}}),vt={key:0,class:"flex-1"},gt={class:"size-full flex flex-col items-start bg-white overflow-hidden"},Ct={class:"custom-style flex w-full justify-center gap-[10px] items-center mb-[2px] mt-[5px] h-[30px]"},yt={class:"flex justify-end mt-auto"},bt={class:"text-xs"},Et=V({__name:"CompCarousel",setup(s){const e=Se(),t=Fe(),n=k(M.COMP_EDIT_STORE),o=X("carousel"),i=Y([{label:"小窗面板",value:R.MINI},{label:"全屏面板",value:R.FULL}]),r=Y({}),m=P(()=>({dep:n.compDep,depToFile:r.value,signedUrls:n.signedUrls})),c=P(()=>Object.keys(r.value||{}).length>0),f=P(()=>n.selectedFolder?.path);function l(_){return _===R.MINI?_t:ht}function u(_,g){_._id&&n.updatePreviewCompItemById(_._id,{..._,activeTab:g})}async function v(){const g=qe(n.compDep,t.deps).map(S=>S.name),d=await Qe({deps:g}),{entryNameToFile:E={}}=d.data;return E}function w(_){if(_?._id){if(_.activeTab===R.MINI&&_.miniPath?.length){const g=Z(f?.value||"",_.miniPath),d=g?`${Q}/${g}?v=${ee()}`:"";n.updatePreviewCompItemById(_._id,{..._,miniEntryUrl:d})}if(_.activeTab===R.FULL&&_.fullPath?.length){const g=Z(f?.value||"",_.fullPath||[]),d=g?`${Q}/${g}?v=${ee()}`:"";n.updatePreviewCompItemById(_._id,{..._,fullEntryUrl:d})}}}function T(_,g){_&&(n.setCompBgColor(_),g(_))}return j(()=>n.compCarouselIndex,async(_,g)=>{_===g||_===void 0||_!==o.value?.activeIndex&&o.value?.setActiveItem(_)}),j(()=>n.compDep,async()=>{r.value={},Object.keys(n.compDep||{}).length!==0&&(r.value=await v())},{immediate:!0}),(_,g)=>{const d=y("el-segmented"),E=y("el-button"),S=y("el-carousel-item"),I=y("el-carousel"),b=y("el-color-picker");return h(),D(Ye,{class:"size-full flex flex-col",bg:x(n).compBgColor},{default:a(({bg:L,updateColor:U})=>[c.value?(h(),A("div",vt,[p(I,_e({class:"size-full",ref:"carousel"},x(e),{trigger:"click",loop:!1}),{default:a(()=>[(h(!0),A(q,null,K(x(n).previewList,$=>(h(),D(S,{key:$._id,class:"size-full"},{default:a(()=>[C("div",gt,[C("div",Ct,[p(d,{"model-value":$.activeTab,onChange:B=>u($,B),size:"default",options:i.value},null,8,["model-value","onChange","options"]),x(n).isShowRefreshBtn?(h(),D(E,{key:0,circle:"",icon:"refreshLeft",onClick:B=>w($)},null,8,["onClick"])):W("",!0)]),(h(),D(Pe,null,[(h(),D($e(l($.activeTab)),_e({ref_for:!0},{miniEntryUrl:$.miniEntryUrl,fullEntryUrl:$.fullEntryUrl,bg:L,...m.value}),null,16))],1024))])]),_:2},1024))),128))]),_:2},1040)])):W("",!0),C("div",yt,[me(_.$slots,"toolbar",{},void 0,!0),C("div",bt,[g[0]||(g[0]=C("span",null,"背景板:",-1)),p(b,{modelValue:x(n).compBgColor,onChange:$=>T($,U),clearable:""},null,8,["modelValue","onChange"])])])]),_:3},8,["bg"])}}}),It=te(Et,[["__scopeId","data-v-808fd703"]]),xt={class:"size-full overflow-auto tree-container"},wt={class:"flex items-center gap-[50px]"},Dt=V({__name:"Dir",setup(s){const e={children:"children",label:"name"},t=k(M.COMP_EDIT_STORE),n=Y([]),o=P(()=>t.selectedFolder?.path);return j(()=>t.directory,i=>{n.value=re(i)},{deep:!0,immediate:!0}),(i,r)=>{const m=y("View"),c=y("el-icon"),f=y("router-link"),l=y("el-tree");return h(),A("div",xt,[p(l,{data:n.value,props:e},{default:a(({node:u,data:v})=>[C("div",wt,[C("span",null,F(u.label),1),u.label==="README.md"?(h(),D(f,{key:0,to:{name:"mdPreview",query:{mdPath:v?.path,compPath:o.value}},target:"_blank",class:"flex"},{default:a(()=>[p(c,null,{default:a(()=>[p(m)]),_:1})]),_:1},8,["to"])):W("",!0)])]),_:1},8,["data"])])}}}),Pt={class:"flex flex-col size-full overflow-auto"},$t={class:"flex flex-1 gap-[10px]"},Tt={class:"flex-1 border-[1px] rounded-sm border-[#ccc] p-[5px]"},At={class:"inline-block"},Ut={class:"flex-1 border-[1px] rounded-sm border-[#ccc] p-[5px]"},Ot={class:"inline-block"},Lt={class:"text-center"},St={class:"flex-1 border-[1px] rounded-sm border-[#ccc] p-[5px]"},Ft={class:"inline-block"},Rt={class:"flex"},Mt={class:"w-[300px]"},Nt={key:0},kt=V({__name:"Deps",setup(s){const e=k(M.COMP_EDIT_STORE),t=Y({}),n=P(()=>Ce(e.compDep)),o=P(()=>Ce(e.onlineCompDep)),i=P(()=>{const m={};return o.value.length===0&&e.isEditComp||n.value.forEach(c=>{const f={},l=o.value.find(u=>u.name===c.name);l?l.version!==c.version?(f.type="change",f.selectedVersion=t.value[c.name]||"",f.versions=[{version:c.version,type:"local"},{version:l.version,type:"online"}]):(f.selectedVersion=c.version,f.type="consistent"):(f.selectedVersion=c.version,f.type="add"),m[c.name]=f}),m});function r(m,c){t.value[m]=c}return j(()=>i.value,m=>{for(const c in m){const f=m[c];f.type!=="change"&&(t.value[c]=f.selectedVersion)}},{immediate:!0,deep:!0}),Re(()=>{e.setAffirmCompDep(re(t.value))}),(m,c)=>{const f=y("el-descriptions-item"),l=y("el-descriptions"),u=y("Bottom"),v=y("el-icon"),w=y("el-radio"),T=y("el-radio-group"),_=y("el-tag");return h(),A("div",Pt,[C("div",$t,[C("div",Tt,[C("div",null,[p(l,{title:"本地依赖",column:1,border:"","label-width":"auto"},{default:a(()=>[(h(!0),A(q,null,K(n.value,(g,d)=>(h(),D(f,{key:d},{label:a(()=>[C("div",At,F(g.name),1)]),default:a(()=>[N(" "+F(g.version),1)]),_:2},1024))),128))]),_:1})])]),C("div",Ut,[p(we,{isEmpty:Object.keys(o.value).length===0,class:"size-full"},{"empty-content":a(()=>[...c[0]||(c[0]=[C("div",{class:"size-full flex justify-center items-center text-[#999]"},"暂无数据!",-1)])]),default:a(()=>[p(l,{title:"线上依赖",column:1,border:"","label-width":"auto"},{default:a(()=>[(h(!0),A(q,null,K(o.value,(g,d)=>(h(),D(f,{key:d},{label:a(()=>[C("div",Ot,F(g.name),1)]),default:a(()=>[N(" "+F(g.version),1)]),_:2},1024))),128))]),_:1})]),_:1},8,["isEmpty"])])]),C("div",Lt,[p(v,{style:{"font-size":"34px"}},{default:a(()=>[p(u)]),_:1})]),C("div",St,[p(l,{title:"最终依赖",column:1,border:"","label-width":"auto"},{default:a(()=>[(h(!0),A(q,null,K(i.value,(g,d)=>(h(),D(f,{key:d},{label:a(()=>[C("div",Ft,F(d),1)]),default:a(()=>[C("div",Rt,[C("div",Mt,[g.versions?.length?(h(),D(T,{key:1,"model-value":g.selectedVersion,onChange:E=>r(d,E),size:"small",class:"ml-[10px]"},{default:a(()=>[(h(!0),A(q,null,K(g.versions,E=>(h(),D(w,{key:E.version,label:E.version},{default:a(()=>[C("span",null,F(E.type==="local"?"本地:":"线上:")+" "+F(E.version),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["model-value","onChange"])):(h(),A("span",Nt,F(g.selectedVersion),1))]),C("div",null,[g.type==="consistent"?(h(),D(_,{key:0,type:"info"},{default:a(()=>[...c[1]||(c[1]=[N("版本一致",-1)])]),_:1})):g.type==="change"?(h(),D(_,{key:1,type:"danger"},{default:a(()=>[...c[2]||(c[2]=[N("版本变化,请手动选择最终版本",-1)])]),_:1})):g.type==="add"?(h(),D(_,{key:2,type:"success"},{default:a(()=>[...c[3]||(c[3]=[N("新增依赖",-1)])]),_:1})):W("",!0)])])]),_:2},1024))),128))]),_:1})])])}}}),Vt={class:"flex items-center gap-[4px]"},Bt=V({__name:"VersionInput",props:be({disabled:{type:Boolean,default:!1}},{modelValue:{type:Object,default:()=>({major:"",minor:"",patch:""})},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const e=Ee(s,"modelValue");function t(n,o){e.value={...e.value,[o]:n}}return(n,o)=>{const i=y("el-input");return h(),A("div",Vt,[p(i,{"model-value":e.value.major,style:{width:"60px"},min:0,size:"small",type:"number",disabled:s.disabled,onInput:o[0]||(o[0]=r=>t(r,"major"))},null,8,["model-value","disabled"]),o[3]||(o[3]=C("span",null,".",-1)),p(i,{"model-value":e.value.minor,style:{width:"60px"},min:0,size:"small",type:"number",disabled:s.disabled,onInput:o[1]||(o[1]=r=>t(r,"minor"))},null,8,["model-value","disabled"]),o[4]||(o[4]=C("span",null,".",-1)),p(i,{"model-value":e.value.patch,style:{width:"60px"},min:0,size:"small",type:"number",disabled:s.disabled,onInput:o[2]||(o[2]=r=>t(r,"patch"))},null,8,["model-value","disabled"])])}}}),zt={class:"size-full overflow-auto"},jt={class:"flex gap-2 items-center"},Ht={key:0},Gt={class:"flex items-center gap-2"},Kt={class:"text-red-500"},Wt=V({__name:"index",setup(s){const e=k(M.COMP_EDIT_STORE),t=k(M.CALLBACKS),n=Y({major:"",minor:"",patch:""}),o=P(()=>e.selectedFolder?.path),i=P(()=>e.configStatus?.compJsonPath||""),r=P(()=>e.configStatus?.entryIndexPath||""),m=P(()=>e.configStatus?.errorMsg||""),c=async()=>{Me({compPath:o.value}).then(async()=>{const l=await Te({compPath:o.value});e.setOriginalDirectory(l.data),f(),ce.success("生成成功")})},f=async()=>{const l=await Ae({compPath:o.value});e.setConfigStatus(l.data)};return j(()=>o.value,async(l,u)=>{l===u||!l||f()},{immediate:!0}),j(()=>JSON.stringify(n.value),async(l,u)=>{if(l===u||!l)return;const{major:v,minor:w,patch:T}=n.value,_=["undefined","null"];if([v,w,T].some(E=>E===""||Je(E,_))){console.log("版本号格式错误");return}const d=`${v}.${w}.${T}`;await Ne({compPath:o.value,version:d}).then(()=>{f(),e.setLocalCompVersion(d)})},{immediate:!0,deep:!0}),j(()=>e.localCompVersion,(l,u)=>{if(l===u||!l)return;const[v="1",w="0",T="0"]=l.split(".");n.value={major:v,minor:w,patch:T}},{immediate:!0}),t.set(H.CHECK_COMP_CONFIG,f),(l,u)=>{const v=y("el-form-item"),w=y("el-button"),T=y("el-tag"),_=y("el-form");return h(),A("div",zt,[p(_,{"label-width":"auto"},{default:a(()=>[p(v,{label:"入口文件:"},{default:a(()=>[C("span",null,F(r.value),1)]),_:1}),p(v,{label:"配置文件:"},{default:a(()=>[C("div",jt,[i.value?(h(),A("span",Ht,F(i.value),1)):(h(),D(w,{key:1,onClick:c,size:"small"},{default:a(()=>[...u[1]||(u[1]=[N("生成",-1)])]),_:1})),m.value&&i.value?(h(),D(w,{key:2,onClick:c,size:"small"},{default:a(()=>[...u[2]||(u[2]=[N("重新生成",-1)])]),_:1})):W("",!0)])]),_:1}),p(v,{label:"版本号:"},{default:a(()=>[C("div",Gt,[p(Bt,{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=g=>n.value=g),disabled:!x(e).compFileIsChange},null,8,["modelValue","disabled"]),x(e).isNeedAddVersion?(h(),D(T,{key:0,type:"danger","disable-transitions":!0},{default:a(()=>[...u[3]||(u[3]=[N("文件内容改变,请增加版本号",-1)])]),_:1})):x(e).isVersionChangeButFileSame?(h(),D(T,{key:1,type:"danger","disable-transitions":!0},{default:a(()=>[...u[4]||(u[4]=[N("版本号改变,但文件内容未改变,请还原版本号",-1)])]),_:1})):W("",!0)])]),_:1}),m.value?(h(),D(v,{key:0,label:"错误信息:"},{default:a(()=>[C("span",Kt,F(m.value),1)]),_:1})):W("",!0)]),_:1})])}}}),Yt={class:"size-full overflow-auto"},qt=V({__name:"UpgradeLog",setup(s){const e=k(M.COMP_EDIT_STORE),t=k(M.CALLBACKS),n=Y(200),o=X("form"),i={upgradeLog:[{required:!0,message:"请填写更新说明",trigger:"blur"},{min:3,max:n.value,message:`长度在 3 到 ${n.value} 个字符`,trigger:"blur"}]};function r(c){e.setUpgradeInfo({...e.upgradeInfo,upgradeLog:c})}async function m(){await o.value?.validate()}return t.set(H.CHECK_UPGRADE_LOG_FORM,m),(c,f)=>{const l=y("el-input"),u=y("el-form-item");return h(),A("div",Yt,[p(x(De),{ref:"form","label-width":"auto",model:x(e).upgradeInfo,rules:i},{default:a(()=>[p(u,{label:"更新说明:",prop:"upgradeLog"},{default:a(()=>[p(l,{maxlength:n.value,"show-word-limit":"","model-value":x(e).upgradeInfo.upgradeLog,placeholder:"请填写更新说明",rows:4,type:"textarea",onInput:r},null,8,["maxlength","model-value"])]),_:1})]),_:1},8,["model"])])}}});function ao(s,e,t={}){const{idKey:n="id",childrenKey:o="children"}=t,i=Array.isArray(s)?s:[s],r=[],m=f=>{for(const l of f){if(l[n]===e)return c(l),!0;const u=l[o];if(u&&Array.isArray(u)&&u.length>0&&m(u))return!0}return!1},c=f=>{const l=f[o];l&&Array.isArray(l)&&l.length>0&&(r.push(...l),l.forEach(u=>c(u)))};return m(i),r}function Le(s,e){const t=e({...s});return t.children&&t.children.length>0&&(t.children=t.children.map(n=>Le(n,e))),t}function io(s,e,t={}){const{idKey:n="id",childrenKey:o="children"}=t,i=Array.isArray(s)?s:[s],r=(c,f)=>{for(const l of c){if(l[n]===e){const v={...l};return delete v[o],[v,...f]}const u=l[o];if(u&&Array.isArray(u)&&u.length>0){const v={...l};delete v[o];const w=r(u,[v,...f]);if(w)return w}}return null};return r(i,[])||[]}function ro(s){const e=new Map,t="\\";e.set(t,{name:"",path:t,type:"directory",children:[]}),s.forEach(i=>{const m=(i.path.startsWith("/")?i.path:`/${i.path}`).replace(/\//g,"\\"),c=m.split("\\").filter(T=>T);let f=t,l="";const u=c.slice(0,c.length-1);for(const T of u){if(l=l?`${l}\\${T}`:`\\${T}`,!e.has(l)){const _={name:T,path:l,type:"directory",children:[]};e.set(l,_),e.get(f).children.push(_)}f=l}const v=c[c.length-1];if(!v)throw new Error("文件名不能为空");const w={name:v,path:m,type:"file"};e.get(f)?.children?.push(w)});const n=i=>{i.sort((r,m)=>r.type!==m.type?r.type==="directory"?-1:1:r.name.localeCompare(m.name)),i.forEach(r=>{r.type==="directory"&&r.children&&n(r.children)})},o=e.get(t);return o.children&&n(o.children),o.children||[]}const Jt=V({__name:"index",props:{isDot:{type:Boolean,default:!1},offset:{type:Array,default:()=>[5,-5]}},setup(s){const e=s,t=P(()=>({"--offsetX":`${e.offset[0]}px`,"--offsetY":`${e.offset[1]}px`}));return(n,o)=>(h(),A("div",{class:xe(["inline relative",{dot:s.isDot}]),style:ue(t.value)},[me(n.$slots,"default",{},void 0,!0)],6))}}),Xt=te(Jt,[["__scopeId","data-v-5b42726d"]]),Qt={class:"bg-[#f5f7fa] bg-color"},Zt={class:"flex-1 overflow-hidden p-2"},eo={class:"flex justify-center p-2"},to=V({__name:"index",emits:["confirmUpload"],setup(s,{emit:e}){const t=e,n=ke(),o=k(M.COMP_EDIT_STORE),i=Ie(new Map);Ge(M.CALLBACKS,i);const r=P(()=>o.selectedFolder?.path),m=P(()=>[{label:"预览配置",value:z.PREVIEW,isDot:o.previewIsError,component:pt},{label:"基础信息",value:z.EXTRA,isDot:o.extraIsError,component:mt},{label:"配置检查",value:z.CONFIG,isDot:o.configIsError,component:Wt,visible:()=>o.isOnlineUpdate||o.isAddComp},{label:"组件依赖",value:z.DEPS,isDot:o.compDepIsError,component:kt,visible:()=>o.isOnlineUpdate||o.isAddComp},{label:"组件目录",value:z.DIR,component:Dt,visible:()=>o.isOnlineUpdate||o.isAddComp},{label:"更新说明",value:z.UPGRADE_LOG,isDot:o.upgradeLogIsError,component:qt,visible:()=>o.isShowUpgradeLogTab}]),c=P(()=>m.value.filter(d=>d.visible?.()??!0)),f=P(()=>c.value.find(E=>E.value===o.activeName)?.component||{render:()=>null});function l(d){o.setActiveName(d)}function u(d,E){typeof d=="number"&&d!==E&&o.setCompCarouselIndex(d)}async function v(){for(const d of i.keys())if(d.startsWith(H.GET_COMP_ERROR)&&i.get(d)?.())return!0;return!1}async function w(d){if(d.start(),o.configIsError){o.setActiveName(""),await G(),o.setActiveName(z.CONFIG),i.get(H.CHECK_COMP_CONFIG)?.(),d.end();return}if(await v()&&o.isOnlineUpdate){ce.error("请先处理编译错误"),d.end();return}if(o.previewIsError){o.setActiveName(""),await G(),o.setActiveName(z.PREVIEW),i.get(H.CHECK_PREVIEW_LIST_FORM)?.(),d.end();return}if(o.extraIsError){o.setActiveName(""),await G(),o.setActiveName(z.EXTRA),i.get(H.CHECK_EXTRA_INFO_FORM)?.(),d.end();return}if(o.compDepIsError){o.setActiveName(""),await G(),o.setActiveName(z.DEPS),d.end();return}if(o.upgradeLogIsError){o.setActiveName(""),await G(),o.setActiveName(z.UPGRADE_LOG),i.get(H.CHECK_UPGRADE_LOG_FORM)?.(),d.end();return}t("confirmUpload",{end:d.end})}async function T(){const d=await Ae({compPath:r.value});o.setConfigStatus(d.data)}function _(){const d=window.__GLOBAL_CONFIG__.srcPath,E=window.__GLOBAL_CONFIG__.sep,S=r.value?.replace(je.dirname,"").replaceAll("/",E),I=Le(o.originalDirectory,b=>(b.path=b.path.replace(`${d}${E}${S}`,""),b));I.children?.length&&o.setDirectory(I.children)}async function g(){const E=(o.originalDirectory.children||[]).find(L=>L.name==="comp.json");if(!E)return;const S=await He({filePath:E.path}),{content:I}=S.data,b=JSON.parse(I);o.setLocalCompVersion(b.version)}return j(()=>o.originalDirectory,async()=>{await g()},{immediate:!0,deep:!0}),j(()=>r.value,async(d,E)=>{if(d===E||!d)return;const S=await Te({compPath:r.value});o.setOriginalDirectory(S.data),_(),await T()},{immediate:!0}),(d,E)=>{const S=y("el-splitter-panel"),I=y("el-segmented"),b=y("el-button"),L=y("el-splitter");return h(),D(L,{class:"size-full",layout:"vertical"},{default:a(()=>[p(S,{class:"size-full border border-[#ccc] rounded-sm",size:"50%",min:300},{default:a(()=>[p(It,{arrow:"always",autoplay:!1,onChange:u},Ve({_:2},[K(x(n),(U,$)=>({name:$,fn:a(B=>[me(d.$slots,$,de(pe(B)),void 0,!0)])}))]),1024)]),_:3}),p(S,{class:"flex flex-col size-full border border-[#ccc] rounded-sm",collapsible:""},{default:a(()=>[C("div",Qt,[p(I,{"model-value":x(o).activeName,options:c.value,size:"default",onChange:l},{default:a(({item:U})=>[p(Xt,{"is-dot":U.isDot},{default:a(()=>[N(F(U.label),1)]),_:2},1032,["is-dot"])]),_:1},8,["model-value","options"])]),C("div",Zt,[p(Be,null,{default:a(()=>[(h(),D(Pe,null,[(h(),D($e(f.value)))],1024))]),_:1})]),C("div",eo,[p(ze,null,{default:a(({instance:U,loading:$})=>[p(b,{loading:$,type:"primary",onClick:B=>w(U),class:"w-[200px]",round:""},{default:a(()=>[N(F(x(o).compSubmitBtnText),1)]),_:1},8,["loading","onClick"])]),_:1})])]),_:1})]),_:3})}}}),co=te(to,[["__scopeId","data-v-e5ae0fd5"]]),po=s=>Ke(`compEdit_${s}`,{state:()=>({scopeId:s,extraInfo:{},upgradeInfo:{},previewList:[],compDep:[],onlineCompDep:[],affirmCompDep:{},activeName:"preview",compCarouselIndex:0,selectedFolder:{},directory:[],originalDirectory:{},compDialogType:"",editCompId:"",compBgColor:"#fff",configStatus:{},compDetail:{},localCompHash:"",remoteCompHash:"",localCompVersion:"",loading:!1,compUpdateType:"",signedUrls:[]}),getters:{isInitState:e=>e.compDialogType.trim()==="",isEditComp:e=>e.compDialogType===le.EDIT,isAddComp:e=>e.compDialogType===le.ADD,isOnlineUpdate:e=>e.compUpdateType===he.ONLINE,isOfflineUpdate:e=>e.compUpdateType===he.OFFLINE,isShowRefreshBtn(){return this.isOnlineUpdate||this.isAddComp},prodCompVersion:e=>e.compDetail?.version||"",versionCompareResult(){return!this.localCompVersion||!this.prodCompVersion?ae.GREATER:Xe(this.localCompVersion,this.prodCompVersion)},isNeedAddVersion(){return this.versionCompareResult!==1&&this.compFileIsChange&&this.isEditComp},compSubmitBtnText(){return this.isEditComp?"更新":this.isAddComp?"上传":""},compDialogFinalTitle(){return this.isEditComp?"组件更新预览":this.isAddComp?"组件上传预览":""},previewIsError(e){if(this.isInitState||this.loading)return!1;const t=e.previewList;return t[0]?.miniPath?.length?!t.length:!0},configIsException:e=>{const{errorMsg:t}=e.configStatus;return!!t},configIsError(){return this.isInitState||this.loading||this.isOfflineUpdate?!1:!!(this.isNeedAddVersion||this.configIsException||this.isVersionChangeButFileSame)},extraIsError(e){if(this.isInitState||this.loading)return!1;const t=e.extraInfo.name?.trim()||"";return(e.extraInfo?.description||"").length<3||!Oe(t)},compDepIsError(e){if(!e.onlineCompDep.length||this.isOfflineUpdate)return!1;let t=!1;return e.compDep.forEach(n=>{const o=e.onlineCompDep.find(r=>r.name===n.name),i=e.affirmCompDep[n.name]??e.affirmCompDep[n?.parent?.name??""];n?.version!==o?.version&&!i&&(t=!0)}),t},compFileIsChange:e=>e.localCompHash!==e.remoteCompHash,isVersionChangeButFileSame(){return this.versionCompareResult!==ae.SAME&&!this.compFileIsChange&&this.isEditComp},isShowUpgradeLogTab(e){return this.isInitState||this.loading?!1:!!(this.compFileIsChange&&e.editCompId)},upgradeLogIsError(e){if(this.isOfflineUpdate)return!1;const t=e.upgradeInfo?.upgradeLog||"",n=this.versionCompareResult===ae.GREATER;return(t.length||0)<3&&(this.compFileIsChange||n)&&this.isEditComp},affirmCompDepVersion:e=>e.compDep.map(t=>{const n=e.affirmCompDep[t.name],o=e.affirmCompDep[t?.parent?.name??""],i=n??o??t.version,r=t.parent?{parent:{...t.parent,version:i}}:{};return{...t,version:i,...r}})},actions:{setSignedUrls(e){this.$patch(t=>{t.signedUrls=e})},setCompUpdateType(e){this.$patch(t=>{t.compUpdateType=e})},setLocalCompVersion(e){this.$patch(t=>{t.localCompVersion=e})},setOriginalDirectory(e){this.$patch(t=>{t.originalDirectory=e})},setLoading(e){this.$patch(t=>{t.loading=e})},setLocalCompHash(e){this.$patch(t=>{t.localCompHash=e})},setRemoteCompHash(e){this.$patch(t=>{t.remoteCompHash=e})},setCompDetail(e){this.$patch(t=>{t.compDetail=e})},setUpgradeInfo(e){this.$patch(t=>{t.upgradeInfo=e})},setConfigStatus(e){this.$patch(t=>{t.configStatus=e})},setExtraInfo(e){this.$patch(t=>{t.extraInfo=e})},addPreviewCompItem(e){this.$patch(t=>{t.previewList.push(e)})},delPreviewCompItemById(e){this.$patch(t=>{t.previewList=t.previewList.filter(n=>n._id!==e)})},setPreviewCompList(e){this.$patch(t=>{t.previewList=e})},updatePreviewCompItemById(e,t){this.$patch(n=>{const o=n.previewList.findIndex(i=>i._id===e);o!==-1&&(n.previewList[o]=t)})},initPreviewCompList(){this.$patch(e=>{e.compDialogType===le.ADD&&(e.previewList=[{_id:ee(),miniPath:[],fullPath:[],activeTab:R.MINI,miniEntryUrl:"",fullEntryUrl:""}])})},setCompDep(e){this.$patch(t=>{t.compDep=e})},setOnlineCompDep(e){this.$patch(t=>{t.onlineCompDep=e})},setAffirmCompDep(e){this.$patch(t=>{t.affirmCompDep=e})},setActiveName(e){this.$patch(t=>{t.activeName=e})},setCompCarouselIndex(e){this.$patch(t=>{t.compCarouselIndex=e})},setSelectedFolder(e){this.$patch(t=>{t.selectedFolder=e})},setDirectory(e){this.$patch(t=>{t.directory=e})},setCompDialogType(e){this.$patch(t=>{t.compDialogType=e})},setEditCompId(e){this.$patch(t=>{t.editCompId=e})},setCompBgColor(e){this.$patch(t=>{t.compBgColor=e})},getCompSubmitParams(){const e=this.selectedFolder.path,{name:t,description:n}=this.extraInfo,o=this.previewList.map(m=>({miniPath:m.miniPath,fullPath:m.fullPath,desc:m?.desc||""})),i=this.upgradeInfo?.upgradeLog??"",r={...this.isEditComp?{upgradeDesc:i}:{}};return{compPath:e,dep:this.affirmCompDepVersion,name:t,desc:n,previewConfigs:o,bgColor:this.compBgColor,...r}}}});export{co as C,ro as a,po as c,io as f,ao as g,ee as v};
|
package/dist/website/dist/assets/{useCompEditStore-Z_9v-nSk.css → useCompEditStore-Dca_66Tn.css}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
.active[data-v-0da40f38]{border:1px solid #23b2c5;border-radius:8px}[data-v-808fd703] .el-carousel__container{height:100%}.dot[data-v-5b42726d]:after{content:"";position:absolute;top:0%;right:0%;transform:translate(var(--offsetX),var(--offsetY));width:7px;height:7px;border-radius:50%;background-color:#f5222d;border:1px solid #fff}[data-v-
|
|
1
|
+
.active[data-v-0da40f38]{border:1px solid #23b2c5;border-radius:8px}[data-v-808fd703] .el-carousel__container{height:100%}.dot[data-v-5b42726d]:after{content:"";position:absolute;top:0%;right:0%;transform:translate(var(--offsetX),var(--offsetY));width:7px;height:7px;border-radius:50%;background-color:#f5222d;border:1px solid #fff}[data-v-e5ae0fd5] .el-segmented__item-label{overflow:unset}.bg-color[data-v-e5ae0fd5]{box-shadow:0 4px 6px #0000001a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as t}from"./index-
|
|
1
|
+
import{G as t}from"./index-cHbH7T5D.js";function o(){const s=t(),{teamId:e}=s.params;return{headers:{"team-id":e},teamId:e}}export{o as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aA as r}from"./index-
|
|
1
|
+
import{aA as r}from"./index-cHbH7T5D.js";async function a(e,o){return r("/__remote__/api/v1/keyword/queryKeywordsComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...o||{}})}export{a as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as L,
|
|
1
|
+
import{Q as L,bU as l,aA as w}from"./index-cHbH7T5D.js";const y=(e,t)=>t.some(n=>e instanceof n);let p,E;function S(){return p||(p=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function T(){return E||(E=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const I=new WeakMap,h=new WeakMap,f=new WeakMap;function A(e){const t=new Promise((n,r)=>{const a=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{n(u(e.result)),a()},s=()=>{r(e.error),a()};e.addEventListener("success",i),e.addEventListener("error",s)});return f.set(t,e),t}function O(e){if(I.has(e))return;const t=new Promise((n,r)=>{const a=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{n(),a()},s=()=>{r(e.error||new DOMException("AbortError","AbortError")),a()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)});I.set(e,t)}let D={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return I.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return u(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function x(e){D=e(D)}function _(e){return T().includes(e)?function(...t){return e.apply(B(this),t),u(this.request)}:function(...t){return u(e.apply(B(this),t))}}function j(e){return typeof e=="function"?_(e):(e instanceof IDBTransaction&&O(e),y(e,S())?new Proxy(e,D):e)}function u(e){if(e instanceof IDBRequest)return A(e);if(h.has(e))return h.get(e);const t=j(e);return t!==e&&(h.set(e,t),f.set(t,e)),t}const B=e=>f.get(e);function v(e,t,{blocked:n,upgrade:r,blocking:a,terminated:i}={}){const s=indexedDB.open(e,t),d=u(s);return r&&s.addEventListener("upgradeneeded",o=>{r(u(s.result),o.oldVersion,o.newVersion,u(s.transaction),o)}),n&&s.addEventListener("blocked",o=>n(o.oldVersion,o.newVersion,o)),d.then(o=>{i&&o.addEventListener("close",()=>i()),a&&o.addEventListener("versionchange",c=>a(c.oldVersion,c.newVersion,c))}).catch(()=>{}),d}const N=["get","getKey","getAll","getAllKeys","count"],V=["put","add","delete","clear"],m=new Map;function P(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(m.get(t))return m.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,a=V.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(a||N.includes(n)))return;const i=async function(s,...d){const o=this.transaction(s,a?"readwrite":"readonly");let c=o.store;return r&&(c=c.index(d.shift())),(await Promise.all([c[n](...d),a&&o.done]))[0]};return m.set(t,i),i}x(e=>({...e,get:(t,n,r)=>P(t,n)||e.get(t,n,r),has:(t,n)=>!!P(t,n)||e.has(t,n)}));const k=["continue","continuePrimaryKey","advance"],M={},b=new WeakMap,C=new WeakMap,F={get(e,t){if(!k.includes(t))return e[t];let n=M[t];return n||(n=M[t]=function(...r){b.set(this,C.get(this)[t](...r))}),n}};async function*W(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,F);for(C.set(n,t),f.set(n,B(t));t;)yield n,t=await(b.get(n)||t.continue()),b.delete(n)}function g(e,t){return t===Symbol.asyncIterator&&y(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&y(e,[IDBIndex,IDBObjectStore])}x(e=>({...e,get(t,n,r){return g(t,n)?W:e.get(t,n,r)},has(t,n){return g(t,n)||e.has(t,n)}}));const K=L("indexedDB",{state:()=>({_instance:null}),actions:{setInstance(e){this.$patch(t=>{t._instance=e})},async open(e=1){if(this._instance)return this._instance;const t=await v(l.DB_NAME,e,{upgrade(n){n.objectStoreNames.contains(l.TABLE_NAME)||n.createObjectStore(l.TABLE_NAME,{keyPath:"hash",autoIncrement:!1}).createIndex("by-hash","hash")},blocked(){console.warn("IndexedDB 被其它标签页占用")}});return this.setInstance(t),t},async get(e,t){return(await this.open()).get(e,t)},async put(e,t){return(await this.open()).put(e,t)},async remove(e,t){return(await this.open()).delete(e,t)},close(){this._instance?.close(),this.setInstance(null)},async deleteDatabase(){if(this._instance){const e=this._instance.name;this.close(),indexedDB.deleteDatabase(e)}}}});async function R(e){return w("/api/v1/module/clearPreBuild",{method:"POST"})}async function z(e,t){return w("/api/v1/module/preBuild",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function G(e){return w("/api/v1/module/preBuildSize",{method:"POST"})}export{R as a,G as b,z as m,K as u};
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
<script src="/dist/js/vue2-sfc-loader.js"></script>
|
|
10
10
|
<script src="/dist/js/vue3-sfc-loader.js"></script>
|
|
11
11
|
|
|
12
|
-
<script type="module" crossorigin src="/dist/assets/index-
|
|
13
|
-
<link rel="stylesheet" crossorigin href="/dist/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/dist/assets/index-cHbH7T5D.js"></script>
|
|
13
|
+
<link rel="stylesheet" crossorigin href="/dist/assets/index-XTZOLvZN.css">
|
|
14
14
|
</head>
|
|
15
15
|
|
|
16
16
|
<body>
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comp-hub",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"bin": {
|
|
6
|
-
"comphub": "bin/cli.
|
|
6
|
+
"comphub": "bin/cli.cjs"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
|
-
"bin"
|
|
10
|
+
"bin",
|
|
11
|
+
"README.md"
|
|
11
12
|
],
|
|
12
13
|
"dependencies": {
|
|
14
|
+
"commander": "^14.0.2",
|
|
13
15
|
"esbuild": "^0.25.9"
|
|
14
16
|
},
|
|
15
17
|
"keywords": [
|
|
@@ -26,4 +28,4 @@
|
|
|
26
28
|
"volta": {
|
|
27
29
|
"node": "22.19.0"
|
|
28
30
|
}
|
|
29
|
-
}
|
|
31
|
+
}
|
package/bin/cli.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const path = require("path");
|
|
4
|
-
const { spawn } = require("child_process");
|
|
5
|
-
|
|
6
|
-
const appPkgPath = require.resolve("comp-hub/package.json");
|
|
7
|
-
const appRoot = path.dirname(appPkgPath);
|
|
8
|
-
const appEntry = path.join(appRoot, "dist/index.js");
|
|
9
|
-
|
|
10
|
-
// 获取命令行参数(排除 node 路径和当前文件路径)
|
|
11
|
-
// process.argv 结构:[node执行路径, 当前文件路径, ...用户传入的参数]
|
|
12
|
-
const args = process.argv.slice(2);
|
|
13
|
-
|
|
14
|
-
// 将参数传递给子进程
|
|
15
|
-
spawn("node", [appEntry, ...args], { stdio: "inherit", shell: true });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./index.vue_vue_type_script_setup_true_lang-KBVOs3Yx.js";import{d as a,c as o,b as t,o as s,v as n}from"./index-BCju3w1f.js";const c={class:"terminal-container"},_=a({__name:"index",setup(r){return(d,i)=>(s(),o("div",c,[t(e)]))}}),f=n(_,[["__scopeId","data-v-45a9da26"]]);export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as V,K as be,M as Ee,a6 as N,i as X,l as Ie,m as P,aW as re,r as y,c as U,ab as xe,b as p,a as C,w as l,bt as se,u as x,bD as fe,aH as R,f as k,ao as K,o as h,J as Q,a5 as M,v as te,aa as H,Y as we,F as J,N as G,E as ce,B as D,k as Y,y as j,bE as De,O as de,P as pe,ae as ue,ac as Le,z as Fe,p as W,Z as _e,aI as me,a1 as Pe,a2 as $e,t as F,n as Re,bF as Me,ap as Te,bG as Ae,bH as ke,av as Ne,bI as z,aN as Ve,a0 as Be,ai as ze,aQ as je,bJ as He,H as Ke,aq as Ge,a4 as We,Q as Ye,al as ae,bK as le,bw as he}from"./index-BCju3w1f.js";import{c as ve,a as Je,b as Ue,_ as qe}from"./index.vue_vue_type_style_index_0_lang-C9MO6ZTW.js";import{c as Z,r as ge,v as Se,p as Xe,h as Ce,l as Qe,m as Ze}from"./index-BnJyLrXy.js";import{m as et}from"./v1Module-BPYVWmkw.js";const O=[];for(let s=0;s<256;++s)O.push((s+256).toString(16).slice(1));function tt(s,e=0){return(O[s[e+0]]+O[s[e+1]]+O[s[e+2]]+O[s[e+3]]+"-"+O[s[e+4]]+O[s[e+5]]+"-"+O[s[e+6]]+O[s[e+7]]+"-"+O[s[e+8]]+O[s[e+9]]+"-"+O[s[e+10]]+O[s[e+11]]+O[s[e+12]]+O[s[e+13]]+O[s[e+14]]+O[s[e+15]]).toLowerCase()}let ie;const ot=new Uint8Array(16);function nt(){if(!ie){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ie=crypto.getRandomValues.bind(crypto)}return ie(ot)}const st=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ye={randomUUID:st};function at(s,e,t){s=s||{};const n=s.random??s.rng?.()??nt();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,tt(n)}function ee(s,e,t){return ye.randomUUID&&!s?ye.randomUUID():at(s)}const lt={class:"flex justify-between items-center w-full"},it={class:"flex justify-between items-center w-full"},rt={class:"text-right"},ct=V({__name:"Item",props:be({index:{type:Number,default:0}},{modelValue:{type:Object,default:()=>({id:"",desc:"",miniPath:[],fullPath:[],activeTab:R.MINI})},modelModifiers:{}}),emits:["update:modelValue"],setup(s,{expose:e}){const t=Ee(s,"modelValue"),n={value:"path",label:"name"},o=N(M.COMP_EDIT_STORE),i=X("form"),r=Ie({miniPath:[{required:!0,message:"请选择预览文件",trigger:"blur"}]}),m=P(()=>o.compCarouselIndex===f.value),c=P(()=>{const I=re(o.directory);return v(I),I}),f=P(()=>o.previewList.findIndex(I=>I._id===t.value._id)),a=P(()=>o.selectedFolder?.path);function u(){return i.value?.validate()}function v(I){Array.isArray(I)&&I.forEach(b=>{b.disabled=b.type==="file"&&!b.name.endsWith(".vue"),Array.isArray(b.children)&&b.children.length>0&&v(b.children)})}function w(I){t.value={...t.value,desc:I}}function T(){t.value._id&&o.delPreviewCompItemById(t.value._id)}function _(){const I=o.previewList.findIndex(b=>b._id===t.value._id);o.setCompCarouselIndex(I)}async function g(I){const b=I??[];let S="";if(b?.length){if(o.isOnlineUpdate||o.isAddComp){const A=Z(a.value,b);S=`${Q}/${A}`}else if(o.isOfflineUpdate&&o.editCompId){const $=ve(o.editCompId)().latestVersionToFileAccessPath,B=new Map($.map(({path:oe,signedUrl:ne})=>[oe,ne])),q=ge(b.at(-1)??"");S=B.get(q)??""}}t.value={...t.value,miniPath:b,miniEntryUrl:S},i.value&&(await K(),i.value.validateField("miniPath"))}function d(I){const b=I??[];let S="";if(b?.length){if(o.isOnlineUpdate||o.isAddComp){const A=Z(a.value,b);S=`${Q}/${A}`}else if(o.isOfflineUpdate&&o.editCompId){const $=ve(o.editCompId)().latestVersionToFileAccessPath,B=new Map($.map(({path:oe,signedUrl:ne})=>[oe,ne])),q=ge(b.at(-1)??"");S=B.get(q)??""}}t.value={...t.value,fullPath:b,fullEntryUrl:S}}function E(){t.value={...t.value,activeTab:R.MINI}}function L(){t.value={...t.value,activeTab:R.FULL}}return e({validateForm:u}),(I,b)=>{const S=y("el-cascader"),A=y("el-button"),$=y("el-form-item"),B=y("el-input"),q=y("el-form");return h(),U("div",{class:xe(["cursor-pointer p-[5px] rounded-sm overflow-auto border border-[#ccc]",{active:m.value}]),onClick:_},[p(q,{ref:"form",model:t.value,rules:r,"label-width":"auto"},{default:l(()=>[p($,{label:"小窗预览文件:",prop:s.index===0?"miniPath":""},{default:l(()=>[C("div",lt,[p(S,{"model-value":t.value.miniPath,options:c.value,props:n,placeholder:"请选择预览文件",onChange:g,clearable:s.index!==0},null,8,["model-value","options","clearable"]),p(A,{class:"ml-2",type:t.value.activeTab===x(R).MINI?"primary":"info",icon:x(fe),circle:"",disabled:!m.value,onClick:se(E,["stop"])},null,8,["type","icon","disabled"])])]),_:1},8,["prop"]),p($,{label:"全屏预览文件:",prop:"fullPath"},{default:l(()=>[C("div",it,[p(S,{"model-value":t.value.fullPath,options:c.value,props:n,placeholder:"请选择预览文件",onChange:d,clearable:""},null,8,["model-value","options"]),p(A,{class:"ml-2",type:t.value.activeTab===x(R).FULL?"primary":"info",icon:x(fe),circle:"",disabled:!m.value,onClick:se(L,["stop"])},null,8,["type","icon","disabled"])])]),_:1}),p($,{label:"备注说明:"},{default:l(()=>[p(B,{"model-value":t.value.desc,type:"textarea",onInput:w},null,8,["model-value"])]),_:1})]),_:1},8,["model","rules"]),C("div",rt,[p(A,{type:"danger",onClick:se(T,["stop"]),disabled:s.index===0},{default:l(()=>[...b[0]||(b[0]=[k("删除",-1)])]),_:1},8,["disabled"])])],2)}}}),dt=te(ct,[["__scopeId","data-v-0da40f38"]]),pt={class:"size-full overflow-auto flex flex-col gap-2 items-start"},ut={class:"flex-1 overflow-auto overflow-x-hidden size-full"},mt=V({__name:"index",setup(s){const e=N(M.COMP_EDIT_STORE),t=N(M.CALLBACKS),n=X("items");async function o(){if(e.previewList.length>=5){ce.error("最多添加5个预览入口");return}e.addPreviewCompItem({_id:ee(),miniPath:[],fullPath:[],activeTab:R.MINI,miniEntryUrl:"",fullEntryUrl:""}),await K(),e.setCompCarouselIndex(e.previewList.length-1)}function i(r){const{_id:m}=r;m&&e.updatePreviewCompItemById(m,r)}return t.set(H.CHECK_PREVIEW_LIST_FORM,()=>{n.value?.forEach(r=>{r?.validateForm()})}),(r,m)=>{const c=y("el-button");return h(),U("div",pt,[p(c,{type:"primary",onClick:o},{default:l(()=>[...m[0]||(m[0]=[k(" 添加预览入口 ",-1)])]),_:1}),C("div",ut,[p(we,{class:"size-full",isEmpty:!x(e).previewList.length,emptyDescription:"请添加预览入口"},{default:l(()=>[p(Je,{"item-min-width":350},{default:l(()=>[(h(!0),U(J,null,G(x(e).previewList,(f,a)=>(h(),D(dt,{ref_for:!0,ref:"items",key:f._id,index:a,"model-value":f,"onUpdate:modelValue":i},null,8,["index","model-value"]))),128))]),_:1})]),_:1},8,["isEmpty"])])])}}}),ft={class:"size-full overflow-auto"},_t=V({__name:"ExtraInfo",setup(s){const e=N(M.COMP_EDIT_STORE),t=N(M.CALLBACKS),n=X("form"),o=Y(200),i={name:[{required:!0,validator:(a,u,v)=>{if(!u)return v(new Error("组件名称不能为空"));Se(u)?v():v(new Error("组件名只能是「大驼峰(PascalCase)」或「短横线(kebab-case)」命名法"))},trigger:["blur"]}],description:[{required:!0,message:"请输入备注说明",trigger:"blur"},{min:3,max:o.value,message:`长度在 3 到 ${o.value} 个字符`,trigger:"blur"}]},r=P(()=>e.selectedFolder.basename);async function m(){await n.value?.validate()}function c(a){e.setExtraInfo({...e.extraInfo,description:a.trim()})}function f(a){e.setExtraInfo({...e.extraInfo,name:a.trim()})}return j(r,a=>{e.extraInfo.name||e.setExtraInfo({...e.extraInfo,name:a})},{immediate:!0}),t.set(H.CHECK_EXTRA_INFO_FORM,m),(a,u)=>{const v=y("el-input"),w=y("el-form-item");return h(),U("div",ft,[p(x(De),{ref:"form","label-width":"auto",model:x(e).extraInfo,rules:i},{default:l(()=>[p(w,{label:"组件名称:",prop:"name"},{default:l(()=>[p(v,{maxlength:50,"show-word-limit":"","model-value":x(e).extraInfo.name,placeholder:"请输入组件名称",onInput:f},null,8,["model-value"])]),_:1}),p(w,{label:"备注说明:",prop:"description"},{default:l(()=>[p(v,{maxlength:o.value,"show-word-limit":"","model-value":x(e).extraInfo.description,placeholder:"请输入备注,有助于组件市场检索",rows:4,type:"textarea",onInput:c},null,8,["maxlength","model-value"])]),_:1})]),_:1},8,["model"])])}}}),ht={class:"size-full flex justify-center items-center overflow-hidden"},vt=V({__name:"PanelMini",props:{bg:{},miniEntryUrl:{},dep:{},depToFile:{},signedUrls:{}},setup(s){const e=s,t=P(()=>({finalEntryUrl:e.miniEntryUrl,dep:e.dep,depToFile:e.depToFile,signedUrls:e.signedUrls,panelType:R.MINI}));return(n,o)=>(h(),U("div",ht,[C("div",{class:"border border-[#e4e7ed] rounded-md h-full max-h-[230px] w-[400px]",style:ue({backgroundColor:s.bg})},[p(Ue,de(pe(t.value)),null,16)],4)]))}}),gt=V({__name:"PanelFull",props:{bg:{},fullEntryUrl:{},dep:{},depToFile:{},signedUrls:{}},setup(s){const e=s,t=P(()=>({finalEntryUrl:e.fullEntryUrl,dep:e.dep,depToFile:e.depToFile,signedUrls:e.signedUrls,panelType:R.FULL}));return(n,o)=>(h(),U("div",{class:"flex-1 border border-[#e4e7ed] overflow-hidden rounded-md size-full",style:ue({backgroundColor:s.bg})},[p(Ue,de(pe(t.value)),null,16)],4))}}),Ct={key:0,class:"flex-1"},yt={class:"size-full flex flex-col items-start bg-white overflow-hidden"},bt={class:"custom-style flex w-full justify-center gap-[10px] items-center mb-[2px] mt-[5px] h-[30px]"},Et={class:"flex justify-end mt-auto"},It={class:"text-xs"},xt=V({__name:"CompCarousel",setup(s){const e=Le(),t=Fe(),n=N(M.COMP_EDIT_STORE),o=X("carousel"),i=Y([{label:"小窗面板",value:R.MINI},{label:"全屏面板",value:R.FULL}]),r=Y({}),m=P(()=>({dep:n.compDep,depToFile:r.value,signedUrls:n.signedUrls})),c=P(()=>Object.keys(r.value||{}).length>0),f=P(()=>n.selectedFolder?.path);function a(_){return _===R.MINI?vt:gt}function u(_,g){_._id&&n.updatePreviewCompItemById(_._id,{..._,activeTab:g})}async function v(){const g=Xe(n.compDep,t.deps).map(L=>L.name),d=await et({deps:g}),{entryNameToFile:E={}}=d.data;return E}function w(_){if(_?._id){if(_.activeTab===R.MINI&&_.miniPath?.length){const g=Z(f?.value||"",_.miniPath),d=g?`${Q}/${g}?v=${ee()}`:"";n.updatePreviewCompItemById(_._id,{..._,miniEntryUrl:d})}if(_.activeTab===R.FULL&&_.fullPath?.length){const g=Z(f?.value||"",_.fullPath||[]),d=g?`${Q}/${g}?v=${ee()}`:"";n.updatePreviewCompItemById(_._id,{..._,fullEntryUrl:d})}}}function T(_,g){_&&(n.setCompBgColor(_),g(_))}return j(()=>n.compCarouselIndex,async(_,g)=>{_===g||_===void 0||_!==o.value?.activeIndex&&o.value?.setActiveItem(_)}),j(()=>n.compDep,async()=>{r.value={},Object.keys(n.compDep||{}).length!==0&&(r.value=await v())},{immediate:!0}),(_,g)=>{const d=y("el-segmented"),E=y("el-button"),L=y("el-carousel-item"),I=y("el-carousel"),b=y("el-color-picker");return h(),D(qe,{class:"size-full flex flex-col",bg:x(n).compBgColor},{default:l(({bg:S,updateColor:A})=>[c.value?(h(),U("div",Ct,[p(I,_e({class:"size-full",ref:"carousel"},x(e),{trigger:"click",loop:!1}),{default:l(()=>[(h(!0),U(J,null,G(x(n).previewList,$=>(h(),D(L,{key:$._id,class:"size-full"},{default:l(()=>[C("div",yt,[C("div",bt,[p(d,{"model-value":$.activeTab,onChange:B=>u($,B),size:"default",options:i.value},null,8,["model-value","onChange","options"]),x(n).isShowRefreshBtn?(h(),D(E,{key:0,circle:"",icon:"refreshLeft",onClick:B=>w($)},null,8,["onClick"])):W("",!0)]),(h(),D(Pe,null,[(h(),D($e(a($.activeTab)),_e({ref_for:!0},{miniEntryUrl:$.miniEntryUrl,fullEntryUrl:$.fullEntryUrl,bg:S,...m.value}),null,16))],1024))])]),_:2},1024))),128))]),_:2},1040)])):W("",!0),C("div",Et,[me(_.$slots,"toolbar",{},void 0,!0),C("div",It,[g[0]||(g[0]=C("span",null,"背景板:",-1)),p(b,{modelValue:x(n).compBgColor,onChange:$=>T($,A),clearable:""},null,8,["modelValue","onChange"])])])]),_:3},8,["bg"])}}}),wt=te(xt,[["__scopeId","data-v-808fd703"]]),Dt={class:"size-full overflow-auto tree-container"},Pt={class:"flex items-center gap-[50px]"},$t=V({__name:"Dir",setup(s){const e={children:"children",label:"name"},t=N(M.COMP_EDIT_STORE),n=Y([]),o=P(()=>t.selectedFolder?.path);return j(()=>t.directory,i=>{n.value=re(i)},{deep:!0,immediate:!0}),(i,r)=>{const m=y("View"),c=y("el-icon"),f=y("router-link"),a=y("el-tree");return h(),U("div",Dt,[p(a,{data:n.value,props:e},{default:l(({node:u,data:v})=>[C("div",Pt,[C("span",null,F(u.label),1),u.label==="README.md"?(h(),D(f,{key:0,to:{name:"mdPreview",query:{mdPath:v?.path,compPath:o.value}},target:"_blank",class:"flex"},{default:l(()=>[p(c,null,{default:l(()=>[p(m)]),_:1})]),_:1},8,["to"])):W("",!0)])]),_:1},8,["data"])])}}}),Tt={class:"flex flex-col size-full overflow-auto"},At={class:"flex flex-1 gap-[10px]"},Ut={class:"flex-1 border-[1px] rounded-sm border-[#ccc] p-[5px]"},St={class:"inline-block"},Ot={class:"flex-1 border-[1px] rounded-sm border-[#ccc] p-[5px]"},Lt={class:"inline-block"},Ft={class:"text-center"},Rt={class:"flex-1 border-[1px] rounded-sm border-[#ccc] p-[5px]"},Mt={class:"inline-block"},kt={class:"flex"},Nt={class:"w-[300px]"},Vt={key:0},Bt=V({__name:"Deps",setup(s){const e=N(M.COMP_EDIT_STORE),t=Y({}),n=P(()=>Ce(e.compDep)),o=P(()=>Ce(e.onlineCompDep)),i=P(()=>{const m={};return o.value.length===0&&e.isEditComp||n.value.forEach(c=>{const f={},a=o.value.find(u=>u.name===c.name);a?a.version!==c.version?(f.type="change",f.selectedVersion=t.value[c.name]||"",f.versions=[{version:c.version,type:"local"},{version:a.version,type:"online"}]):(f.selectedVersion=c.version,f.type="consistent"):(f.selectedVersion=c.version,f.type="add"),m[c.name]=f}),m});function r(m,c){t.value[m]=c}return j(()=>i.value,m=>{for(const c in m){const f=m[c];f.type!=="change"&&(t.value[c]=f.selectedVersion)}},{immediate:!0,deep:!0}),Re(()=>{e.setAffirmCompDep(re(t.value))}),(m,c)=>{const f=y("el-descriptions-item"),a=y("el-descriptions"),u=y("Bottom"),v=y("el-icon"),w=y("el-radio"),T=y("el-radio-group"),_=y("el-tag");return h(),U("div",Tt,[C("div",At,[C("div",Ut,[C("div",null,[p(a,{title:"本地依赖",column:1,border:"","label-width":"auto"},{default:l(()=>[(h(!0),U(J,null,G(n.value,(g,d)=>(h(),D(f,{key:d},{label:l(()=>[C("div",St,F(g.name),1)]),default:l(()=>[k(" "+F(g.version),1)]),_:2},1024))),128))]),_:1})])]),C("div",Ot,[p(we,{isEmpty:Object.keys(o.value).length===0,class:"size-full"},{"empty-content":l(()=>[...c[0]||(c[0]=[C("div",{class:"size-full flex justify-center items-center text-[#999]"},"暂无数据!",-1)])]),default:l(()=>[p(a,{title:"线上依赖",column:1,border:"","label-width":"auto"},{default:l(()=>[(h(!0),U(J,null,G(o.value,(g,d)=>(h(),D(f,{key:d},{label:l(()=>[C("div",Lt,F(g.name),1)]),default:l(()=>[k(" "+F(g.version),1)]),_:2},1024))),128))]),_:1})]),_:1},8,["isEmpty"])])]),C("div",Ft,[p(v,{style:{"font-size":"34px"}},{default:l(()=>[p(u)]),_:1})]),C("div",Rt,[p(a,{title:"最终依赖",column:1,border:"","label-width":"auto"},{default:l(()=>[(h(!0),U(J,null,G(i.value,(g,d)=>(h(),D(f,{key:d},{label:l(()=>[C("div",Mt,F(d),1)]),default:l(()=>[C("div",kt,[C("div",Nt,[g.versions?.length?(h(),D(T,{key:1,"model-value":g.selectedVersion,onChange:E=>r(d,E),size:"small",class:"ml-[10px]"},{default:l(()=>[(h(!0),U(J,null,G(g.versions,E=>(h(),D(w,{key:E.version,label:E.version},{default:l(()=>[C("span",null,F(E.type==="local"?"本地:":"线上:")+" "+F(E.version),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["model-value","onChange"])):(h(),U("span",Vt,F(g.selectedVersion),1))]),C("div",null,[g.type==="consistent"?(h(),D(_,{key:0,type:"info"},{default:l(()=>[...c[1]||(c[1]=[k("版本一致",-1)])]),_:1})):g.type==="change"?(h(),D(_,{key:1,type:"danger"},{default:l(()=>[...c[2]||(c[2]=[k("版本变化,请手动选择最终版本",-1)])]),_:1})):g.type==="add"?(h(),D(_,{key:2,type:"success"},{default:l(()=>[...c[3]||(c[3]=[k("新增依赖",-1)])]),_:1})):W("",!0)])])]),_:2},1024))),128))]),_:1})])])}}}),zt={class:"flex items-center gap-[4px]"},jt=V({__name:"VersionInput",props:be({disabled:{type:Boolean,default:!1}},{modelValue:{type:Object,default:()=>({major:"",minor:"",patch:""})},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const e=Ee(s,"modelValue");function t(n,o){e.value={...e.value,[o]:n}}return(n,o)=>{const i=y("el-input");return h(),U("div",zt,[p(i,{"model-value":e.value.major,style:{width:"60px"},min:0,size:"small",type:"number",disabled:s.disabled,onInput:o[0]||(o[0]=r=>t(r,"major"))},null,8,["model-value","disabled"]),o[3]||(o[3]=C("span",null,".",-1)),p(i,{"model-value":e.value.minor,style:{width:"60px"},min:0,size:"small",type:"number",disabled:s.disabled,onInput:o[1]||(o[1]=r=>t(r,"minor"))},null,8,["model-value","disabled"]),o[4]||(o[4]=C("span",null,".",-1)),p(i,{"model-value":e.value.patch,style:{width:"60px"},min:0,size:"small",type:"number",disabled:s.disabled,onInput:o[2]||(o[2]=r=>t(r,"patch"))},null,8,["model-value","disabled"])])}}}),Ht={class:"size-full overflow-auto"},Kt={class:"flex gap-2 items-center"},Gt={key:0},Wt={class:"flex items-center gap-2"},Yt={class:"text-red-500"},Jt=V({__name:"index",setup(s){const e=N(M.COMP_EDIT_STORE),t=N(M.CALLBACKS),n=Y({major:"",minor:"",patch:""}),o=P(()=>e.selectedFolder?.path),i=P(()=>e.configStatus?.compJsonPath||""),r=P(()=>e.configStatus?.entryIndexPath||""),m=P(()=>e.configStatus?.errorMsg||""),c=async()=>{Me({compPath:o.value}).then(async()=>{const a=await Te({compPath:o.value});e.setOriginalDirectory(a.data),f(),ce.success("生成成功")})},f=async()=>{const a=await Ae({compPath:o.value});e.setConfigStatus(a.data)};return j(()=>o.value,async(a,u)=>{a===u||!a||f()},{immediate:!0}),j(()=>JSON.stringify(n.value),async(a,u)=>{if(a===u||!a)return;const{major:v,minor:w,patch:T}=n.value,_=["undefined","null"];if([v,w,T].some(E=>E===""||Qe(E,_))){console.log("版本号格式错误");return}const d=`${v}.${w}.${T}`;await ke({compPath:o.value,version:d}).then(()=>{f(),e.setLocalCompVersion(d)})},{immediate:!0,deep:!0}),j(()=>e.localCompVersion,(a,u)=>{if(a===u||!a)return;const[v="1",w="0",T="0"]=a.split(".");n.value={major:v,minor:w,patch:T}},{immediate:!0}),t.set(H.CHECK_COMP_CONFIG,f),(a,u)=>{const v=y("el-form-item"),w=y("el-button"),T=y("el-tag"),_=y("el-form");return h(),U("div",Ht,[p(_,{"label-width":"auto"},{default:l(()=>[p(v,{label:"入口文件:"},{default:l(()=>[C("span",null,F(r.value),1)]),_:1}),p(v,{label:"配置文件:"},{default:l(()=>[C("div",Kt,[i.value?(h(),U("span",Gt,F(i.value),1)):(h(),D(w,{key:1,onClick:c,size:"small"},{default:l(()=>[...u[1]||(u[1]=[k("生成",-1)])]),_:1})),m.value&&i.value?(h(),D(w,{key:2,onClick:c,size:"small"},{default:l(()=>[...u[2]||(u[2]=[k("重新生成",-1)])]),_:1})):W("",!0)])]),_:1}),p(v,{label:"版本号:"},{default:l(()=>[C("div",Wt,[p(jt,{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=g=>n.value=g),disabled:!x(e).compFileIsChange},null,8,["modelValue","disabled"]),x(e).isNeedAddVersion?(h(),D(T,{key:0,type:"danger","disable-transitions":!0},{default:l(()=>[...u[3]||(u[3]=[k("文件内容改变,请增加版本号",-1)])]),_:1})):x(e).isVersionChangeButFileSame?(h(),D(T,{key:1,type:"danger","disable-transitions":!0},{default:l(()=>[...u[4]||(u[4]=[k("版本号改变,但文件内容未改变,请还原版本号",-1)])]),_:1})):W("",!0)])]),_:1}),m.value?(h(),D(v,{key:0,label:"错误信息:"},{default:l(()=>[C("span",Yt,F(m.value),1)]),_:1})):W("",!0)]),_:1})])}}}),qt={class:"size-full overflow-auto"},Xt=V({__name:"UpgradeLog",setup(s){const e=N(M.COMP_EDIT_STORE),t=N(M.CALLBACKS),n=Y(200),o=X("form"),i={upgradeLog:[{required:!0,message:"请填写更新说明",trigger:"blur"},{min:3,max:n.value,message:`长度在 3 到 ${n.value} 个字符`,trigger:"blur"}]};function r(c){e.setUpgradeInfo({...e.upgradeInfo,upgradeLog:c})}async function m(){await o.value?.validate()}return t.set(H.CHECK_UPGRADE_LOG_FORM,m),(c,f)=>{const a=y("el-input"),u=y("el-form-item");return h(),U("div",qt,[p(x(De),{ref:"form","label-width":"auto",model:x(e).upgradeInfo,rules:i},{default:l(()=>[p(u,{label:"更新说明:",prop:"upgradeLog"},{default:l(()=>[p(a,{maxlength:n.value,"show-word-limit":"","model-value":x(e).upgradeInfo.upgradeLog,placeholder:"请填写更新说明",rows:4,type:"textarea",onInput:r},null,8,["maxlength","model-value"])]),_:1})]),_:1},8,["model"])])}}});function ro(s,e,t={}){const{idKey:n="id",childrenKey:o="children"}=t,i=Array.isArray(s)?s:[s],r=[],m=f=>{for(const a of f){if(a[n]===e)return c(a),!0;const u=a[o];if(u&&Array.isArray(u)&&u.length>0&&m(u))return!0}return!1},c=f=>{const a=f[o];a&&Array.isArray(a)&&a.length>0&&(r.push(...a),a.forEach(u=>c(u)))};return m(i),r}function Oe(s,e){const t=e({...s});return t.children&&t.children.length>0&&(t.children=t.children.map(n=>Oe(n,e))),t}function co(s,e,t={}){const{idKey:n="id",childrenKey:o="children"}=t,i=Array.isArray(s)?s:[s],r=(c,f)=>{for(const a of c){if(a[n]===e){const v={...a};return delete v[o],[v,...f]}const u=a[o];if(u&&Array.isArray(u)&&u.length>0){const v={...a};delete v[o];const w=r(u,[v,...f]);if(w)return w}}return null};return r(i,[])||[]}function po(s){const e=new Map,t="\\";e.set(t,{name:"",path:t,type:"directory",children:[]}),s.forEach(i=>{const m=(i.path.startsWith("/")?i.path:`/${i.path}`).replace(/\//g,"\\"),c=m.split("\\").filter(T=>T);let f=t,a="";const u=c.slice(0,c.length-1);for(const T of u){if(a=a?`${a}\\${T}`:`\\${T}`,!e.has(a)){const _={name:T,path:a,type:"directory",children:[]};e.set(a,_),e.get(f).children.push(_)}f=a}const v=c[c.length-1];if(!v)throw new Error("文件名不能为空");const w={name:v,path:m,type:"file"};e.get(f)?.children?.push(w)});const n=i=>{i.sort((r,m)=>r.type!==m.type?r.type==="directory"?-1:1:r.name.localeCompare(m.name)),i.forEach(r=>{r.type==="directory"&&r.children&&n(r.children)})},o=e.get(t);return o.children&&n(o.children),o.children||[]}const Qt=V({__name:"index",props:{isDot:{type:Boolean,default:!1},offset:{type:Array,default:()=>[5,-5]}},setup(s){const e=s,t=P(()=>({"--offsetX":`${e.offset[0]}px`,"--offsetY":`${e.offset[1]}px`}));return(n,o)=>(h(),U("div",{class:xe(["inline relative",{dot:s.isDot}]),style:ue(t.value)},[me(n.$slots,"default",{},void 0,!0)],6))}}),Zt=te(Qt,[["__scopeId","data-v-5b42726d"]]),eo={class:"bg-[#f5f7fa] bg-color"},to={class:"flex-1 overflow-hidden p-2"},oo={class:"flex justify-center p-2"},no=V({__name:"index",emits:["confirmUpload"],setup(s,{emit:e}){const t=e,n=Ne(),o=N(M.COMP_EDIT_STORE),i=Ie(new Map);We(M.CALLBACKS,i);const r=P(()=>o.selectedFolder?.path),m=P(()=>[{label:"预览配置",value:z.PREVIEW,isDot:o.previewIsError,component:mt},{label:"基础信息",value:z.EXTRA,isDot:o.extraIsError,component:_t},{label:"配置检查",value:z.CONFIG,isDot:o.configIsError,component:Jt,visible:()=>o.isOnlineUpdate||o.isAddComp},{label:"组件依赖",value:z.DEPS,isDot:o.compDepIsError,component:Bt,visible:()=>o.isOnlineUpdate||o.isAddComp},{label:"组件目录",value:z.DIR,component:$t,visible:()=>o.isOnlineUpdate||o.isAddComp},{label:"更新说明",value:z.UPGRADE_LOG,isDot:o.upgradeLogIsError,component:Xt,visible:()=>o.isShowUpgradeLogTab}]),c=P(()=>m.value.filter(d=>d.visible?.()??!0)),f=P(()=>c.value.find(E=>E.value===o.activeName)?.component||{render:()=>null});function a(d){o.setActiveName(d)}function u(d,E){typeof d=="number"&&d!==E&&o.setCompCarouselIndex(d)}async function v(){for(const d of i.keys())if(d.startsWith(H.GET_COMP_ERROR)&&i.get(d)?.())return!0;return!1}async function w(d){if(d.start(),o.configIsError){o.setActiveName(""),await K(),o.setActiveName(z.CONFIG),i.get(H.CHECK_COMP_CONFIG)?.(),d.end();return}if(await v()&&o.isOnlineUpdate){ce.error("请先处理编译错误"),d.end();return}if(o.previewIsError){o.setActiveName(""),await K(),o.setActiveName(z.PREVIEW),i.get(H.CHECK_PREVIEW_LIST_FORM)?.(),d.end();return}if(o.extraIsError){o.setActiveName(""),await K(),o.setActiveName(z.EXTRA),i.get(H.CHECK_EXTRA_INFO_FORM)?.(),d.end();return}if(o.compDepIsError){o.setActiveName(""),await K(),o.setActiveName(z.DEPS),d.end();return}if(o.upgradeLogIsError){o.setActiveName(""),await K(),o.setActiveName(z.UPGRADE_LOG),i.get(H.CHECK_UPGRADE_LOG_FORM)?.(),d.end();return}t("confirmUpload",{end:d.end})}async function T(){const d=await Ae({compPath:r.value});o.setConfigStatus(d.data)}async function _(){const[d,E]=await Promise.all([await je(),await He()]),{srcPath:L}=d.data,{pathSeparator:I}=E.data,b=r.value?.replace(Ke.dirname,"").replaceAll("/",I),S=Oe(o.originalDirectory,A=>(A.path=A.path.replace(`${L}${I}${b}`,""),A));S.children?.length&&o.setDirectory(S.children)}async function g(){const E=(o.originalDirectory.children||[]).find(S=>S.name==="comp.json");if(!E)return;const L=await Ge({filePath:E.path}),{content:I}=L.data,b=JSON.parse(I);o.setLocalCompVersion(b.version)}return j(()=>o.originalDirectory,async()=>{await g()},{immediate:!0,deep:!0}),j(()=>r.value,async(d,E)=>{if(d===E||!d)return;const L=await Te({compPath:r.value});o.setOriginalDirectory(L.data),await _(),await T()},{immediate:!0}),(d,E)=>{const L=y("el-splitter-panel"),I=y("el-segmented"),b=y("el-button"),S=y("el-splitter");return h(),D(S,{class:"size-full",layout:"vertical"},{default:l(()=>[p(L,{class:"size-full border border-[#ccc] rounded-sm",size:"50%",min:300},{default:l(()=>[p(wt,{arrow:"always",autoplay:!1,onChange:u},Ve({_:2},[G(x(n),(A,$)=>({name:$,fn:l(B=>[me(d.$slots,$,de(pe(B)),void 0,!0)])}))]),1024)]),_:3}),p(L,{class:"flex flex-col size-full border border-[#ccc] rounded-sm",collapsible:""},{default:l(()=>[C("div",eo,[p(I,{"model-value":x(o).activeName,options:c.value,size:"default",onChange:a},{default:l(({item:A})=>[p(Zt,{"is-dot":A.isDot},{default:l(()=>[k(F(A.label),1)]),_:2},1032,["is-dot"])]),_:1},8,["model-value","options"])]),C("div",to,[p(Be,null,{default:l(()=>[(h(),D(Pe,null,[(h(),D($e(f.value)))],1024))]),_:1})]),C("div",oo,[p(ze,null,{default:l(({instance:A,loading:$})=>[p(b,{loading:$,type:"primary",onClick:B=>w(A),class:"w-[200px]",round:""},{default:l(()=>[k(F(x(o).compSubmitBtnText),1)]),_:1},8,["loading","onClick"])]),_:1})])]),_:1})]),_:3})}}}),uo=te(no,[["__scopeId","data-v-3c18679e"]]),mo=s=>Ye(`compEdit_${s}`,{state:()=>({scopeId:s,extraInfo:{},upgradeInfo:{},previewList:[],compDep:[],onlineCompDep:[],affirmCompDep:{},activeName:"preview",compCarouselIndex:0,selectedFolder:{},directory:[],originalDirectory:{},compDialogType:"",editCompId:"",compBgColor:"#fff",configStatus:{},compDetail:{},localCompHash:"",remoteCompHash:"",localCompVersion:"",loading:!1,compUpdateType:"",signedUrls:[]}),getters:{isInitState:e=>e.compDialogType.trim()==="",isEditComp:e=>e.compDialogType===ae.EDIT,isAddComp:e=>e.compDialogType===ae.ADD,isOnlineUpdate:e=>e.compUpdateType===he.ONLINE,isOfflineUpdate:e=>e.compUpdateType===he.OFFLINE,isShowRefreshBtn(){return this.isOnlineUpdate||this.isAddComp},prodCompVersion:e=>e.compDetail?.version||"",versionCompareResult(){return!this.localCompVersion||!this.prodCompVersion?le.GREATER:Ze(this.localCompVersion,this.prodCompVersion)},isNeedAddVersion(){return this.versionCompareResult!==1&&this.compFileIsChange&&this.isEditComp},compSubmitBtnText(){return this.isEditComp?"更新":this.isAddComp?"上传":""},compDialogFinalTitle(){return this.isEditComp?"组件更新预览":this.isAddComp?"组件上传预览":""},previewIsError(e){if(this.isInitState||this.loading)return!1;const t=e.previewList;return t[0]?.miniPath?.length?!t.length:!0},configIsException:e=>{const{errorMsg:t}=e.configStatus;return!!t},configIsError(){return this.isInitState||this.loading||this.isOfflineUpdate?!1:!!(this.isNeedAddVersion||this.configIsException||this.isVersionChangeButFileSame)},extraIsError(e){if(this.isInitState||this.loading)return!1;const t=e.extraInfo.name?.trim()||"";return(e.extraInfo?.description||"").length<3||!Se(t)},compDepIsError(e){if(!e.onlineCompDep.length||this.isOfflineUpdate)return!1;let t=!1;return e.compDep.forEach(n=>{const o=e.onlineCompDep.find(r=>r.name===n.name),i=e.affirmCompDep[n.name]??e.affirmCompDep[n?.parent?.name??""];n?.version!==o?.version&&!i&&(t=!0)}),t},compFileIsChange:e=>e.localCompHash!==e.remoteCompHash,isVersionChangeButFileSame(){return this.versionCompareResult!==le.SAME&&!this.compFileIsChange&&this.isEditComp},isShowUpgradeLogTab(e){return this.isInitState||this.loading?!1:!!(this.compFileIsChange&&e.editCompId)},upgradeLogIsError(e){if(this.isOfflineUpdate)return!1;const t=e.upgradeInfo?.upgradeLog||"",n=this.versionCompareResult===le.GREATER;return(t.length||0)<3&&(this.compFileIsChange||n)&&this.isEditComp},affirmCompDepVersion:e=>e.compDep.map(t=>{const n=e.affirmCompDep[t.name],o=e.affirmCompDep[t?.parent?.name??""],i=n??o??t.version,r=t.parent?{parent:{...t.parent,version:i}}:{};return{...t,version:i,...r}})},actions:{setSignedUrls(e){this.$patch(t=>{t.signedUrls=e})},setCompUpdateType(e){this.$patch(t=>{t.compUpdateType=e})},setLocalCompVersion(e){this.$patch(t=>{t.localCompVersion=e})},setOriginalDirectory(e){this.$patch(t=>{t.originalDirectory=e})},setLoading(e){this.$patch(t=>{t.loading=e})},setLocalCompHash(e){this.$patch(t=>{t.localCompHash=e})},setRemoteCompHash(e){this.$patch(t=>{t.remoteCompHash=e})},setCompDetail(e){this.$patch(t=>{t.compDetail=e})},setUpgradeInfo(e){this.$patch(t=>{t.upgradeInfo=e})},setConfigStatus(e){this.$patch(t=>{t.configStatus=e})},setExtraInfo(e){this.$patch(t=>{t.extraInfo=e})},addPreviewCompItem(e){this.$patch(t=>{t.previewList.push(e)})},delPreviewCompItemById(e){this.$patch(t=>{t.previewList=t.previewList.filter(n=>n._id!==e)})},setPreviewCompList(e){this.$patch(t=>{t.previewList=e})},updatePreviewCompItemById(e,t){this.$patch(n=>{const o=n.previewList.findIndex(i=>i._id===e);o!==-1&&(n.previewList[o]=t)})},initPreviewCompList(){this.$patch(e=>{e.compDialogType===ae.ADD&&(e.previewList=[{_id:ee(),miniPath:[],fullPath:[],activeTab:R.MINI,miniEntryUrl:"",fullEntryUrl:""}])})},setCompDep(e){this.$patch(t=>{t.compDep=e})},setOnlineCompDep(e){this.$patch(t=>{t.onlineCompDep=e})},setAffirmCompDep(e){this.$patch(t=>{t.affirmCompDep=e})},setActiveName(e){this.$patch(t=>{t.activeName=e})},setCompCarouselIndex(e){this.$patch(t=>{t.compCarouselIndex=e})},setSelectedFolder(e){this.$patch(t=>{t.selectedFolder=e})},setDirectory(e){this.$patch(t=>{t.directory=e})},setCompDialogType(e){this.$patch(t=>{t.compDialogType=e})},setEditCompId(e){this.$patch(t=>{t.editCompId=e})},setCompBgColor(e){this.$patch(t=>{t.compBgColor=e})},getCompSubmitParams(){const e=this.selectedFolder.path,{name:t,description:n}=this.extraInfo,o=this.previewList.map(m=>({miniPath:m.miniPath,fullPath:m.fullPath,desc:m?.desc||""})),i=this.upgradeInfo?.upgradeLog??"",r={...this.isEditComp?{upgradeDesc:i}:{}};return{compPath:e,dep:this.affirmCompDepVersion,name:t,desc:n,previewConfigs:o,bgColor:this.compBgColor,...r}}}});export{uo as C,po as a,mo as c,co as f,ro as g,ee as v};
|