dmx-admin-ui 1.2.119 → 1.2.200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{group-DYNFzkK_.js → group-CtJCPn7Z.js} +2 -2
- package/dist/{group-table-Dk7T2UmY.js → group-table-6shjuSCq.js} +2 -2
- package/dist/{group-tabs-CRAezcpV.js → group-tabs-D7qBBiaA.js} +2 -2
- package/dist/{group-tabs-plus-D46cx9Us.js → group-tabs-plus-B3HS1QiL.js} +2 -2
- package/dist/{index-DtvamYt7.js → index-Cs_0uD2A.js} +894 -889
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +21 -21
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
(function(ut,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue"),require("es-toolkit"),require("element-plus"),require("alova"),require("number-precision"),require("@vueuse/core"),require("echarts")):typeof define=="function"&&define.amd?define(["exports","vue","es-toolkit","element-plus","alova","number-precision","@vueuse/core","echarts"],s):(ut=typeof globalThis<"u"?globalThis:ut||self,s(ut.AdminUi={},ut.vue,ut.esToolkit,ut.elementPlus,ut.alova,ut.np,ut.core,ut.echarts))})(this,(function(ut,s,yo,we,bo,id,Co,sd){"use strict";function ad(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const vo=ad(sd);function ld(t){return Number.isSafeInteger(t)&&t>=0}function cd(t){return t!=null&&typeof t!="function"&&ld(t.length)}function Tn(t){return t==="__proto__"}function Es(t){switch(typeof t){case"number":case"symbol":return!1;case"string":return t.includes(".")||t.includes("[")||t.includes("]")}}function Do(t){return typeof t=="string"||typeof t=="symbol"?t:Object.is(t?.valueOf?.(),-0)?"-0":String(t)}function _s(t){if(t==null)return"";if(typeof t=="string")return t;if(Array.isArray(t))return t.map(_s).join(",");const n=String(t);return n==="0"&&Object.is(Number(t),-0)?"-0":n}function wo(t){if(Array.isArray(t))return t.map(Do);if(typeof t=="symbol")return[t];t=_s(t);const n=[],r=t.length;if(r===0)return n;let o=0,i="",a="",l=!1;for(t.charCodeAt(0)===46&&(n.push(""),o++);o<r;){const c=t[o];a?c==="\\"&&o+1<r?(o++,i+=t[o]):c===a?a="":i+=c:l?c==='"'||c==="'"?a=c:c==="]"?(l=!1,n.push(i),i=""):i+=c:c==="["?(l=!0,i&&(n.push(i),i="")):c==="."?i&&(n.push(i),i=""):i+=c,o++}return i&&n.push(i),n}function Yt(t,n,r){if(t==null)return r;switch(typeof n){case"string":{if(Tn(n))return r;const o=t[n];return o===void 0?Es(n)?Yt(t,wo(n),r):r:o}case"number":case"symbol":{typeof n=="number"&&(n=Do(n));const o=t[n];return o===void 0?r:o}default:{if(Array.isArray(n))return ud(t,n,r);if(Object.is(n?.valueOf(),-0)?n="-0":n=String(n),Tn(n))return r;const o=t[n];return o===void 0?r:o}}}function ud(t,n,r){if(n.length===0)return r;let o=t;for(let i=0;i<n.length;i++){if(o==null||Tn(n[i]))return r;o=o[n[i]]}return o===void 0?r:o}function As(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function xo(t){return t==null||typeof t!="object"&&typeof t!="function"}function dd(t,n){return t===n||Number.isNaN(t)&&Number.isNaN(n)}function Ns(t){return Object.getOwnPropertySymbols(t).filter(n=>Object.prototype.propertyIsEnumerable.call(t,n))}function Bo(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const fd="[object RegExp]",Ss="[object String]",Fs="[object Number]",Vs="[object Boolean]",Os="[object Arguments]",pd="[object Symbol]",hd="[object Date]",md="[object Map]",gd="[object Set]",yd="[object Array]",bd="[object ArrayBuffer]",Ts="[object Object]",Cd="[object DataView]",vd="[object Uint8Array]",Dd="[object Uint8ClampedArray]",wd="[object Uint16Array]",xd="[object Uint32Array]",Bd="[object Int8Array]",kd="[object Int16Array]",Ed="[object Int32Array]",_d="[object Float32Array]",Ad="[object Float64Array]";function ko(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Nd(t,n){return un(t,void 0,t,new Map,n)}function un(t,n,r,o=new Map,i=void 0){const a=i?.(t,n,r,o);if(a!==void 0)return a;if(xo(t))return t;if(o.has(t))return o.get(t);if(Array.isArray(t)){const l=new Array(t.length);o.set(t,l);for(let c=0;c<t.length;c++)l[c]=un(t[c],c,r,o,i);return Object.hasOwn(t,"index")&&(l.index=t.index),Object.hasOwn(t,"input")&&(l.input=t.input),l}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const l=new RegExp(t.source,t.flags);return l.lastIndex=t.lastIndex,l}if(t instanceof Map){const l=new Map;o.set(t,l);for(const[c,u]of t)l.set(c,un(u,c,r,o,i));return l}if(t instanceof Set){const l=new Set;o.set(t,l);for(const c of t)l.add(un(c,void 0,r,o,i));return l}if(typeof Buffer<"u"&&Buffer.isBuffer(t))return t.subarray();if(ko(t)){const l=new(Object.getPrototypeOf(t)).constructor(t.length);o.set(t,l);for(let c=0;c<t.length;c++)l[c]=un(t[c],c,r,o,i);return l}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const l=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return o.set(t,l),kt(l,t,r,o,i),l}if(typeof File<"u"&&t instanceof File){const l=new File([t],t.name,{type:t.type});return o.set(t,l),kt(l,t,r,o,i),l}if(typeof Blob<"u"&&t instanceof Blob){const l=new Blob([t],{type:t.type});return o.set(t,l),kt(l,t,r,o,i),l}if(t instanceof Error){const l=structuredClone(t);return o.set(t,l),l.message=t.message,l.name=t.name,l.stack=t.stack,l.cause=t.cause,l.constructor=t.constructor,kt(l,t,r,o,i),l}if(t instanceof Boolean){const l=new Boolean(t.valueOf());return o.set(t,l),kt(l,t,r,o,i),l}if(t instanceof Number){const l=new Number(t.valueOf());return o.set(t,l),kt(l,t,r,o,i),l}if(t instanceof String){const l=new String(t.valueOf());return o.set(t,l),kt(l,t,r,o,i),l}if(typeof t=="object"&&Sd(t)){const l=Object.create(Object.getPrototypeOf(t));return o.set(t,l),kt(l,t,r,o,i),l}return t}function kt(t,n,r=t,o,i){const a=[...Object.keys(n),...Ns(n)];for(let l=0;l<a.length;l++){const c=a[l],u=Object.getOwnPropertyDescriptor(t,c);(u==null||u.writable)&&(t[c]=un(n[c],c,r,o,i))}}function Sd(t){switch(Bo(t)){case Os:case yd:case bd:case Cd:case Vs:case hd:case _d:case Ad:case Bd:case kd:case Ed:case md:case Fs:case Ts:case fd:case gd:case Ss:case pd:case vd:case Dd:case wd:case xd:return!0;default:return!1}}function Fd(t,n){return Nd(t,(r,o,i,a)=>{if(typeof t=="object"){if(Bo(t)===Ts&&typeof t.constructor!="function"){const l={};return a.set(t,l),kt(l,t,i,a),l}switch(Object.prototype.toString.call(t)){case Fs:case Ss:case Vs:{const l=new t.constructor(t?.valueOf());return kt(l,t),l}case Os:{const l={};return kt(l,t),l.length=t.length,l[Symbol.iterator]=t[Symbol.iterator],l}default:return}}})}function js(t){return Fd(t)}const Vd=/^(?:0|[1-9]\d*)$/;function Ps(t,n=Number.MAX_SAFE_INTEGER){switch(typeof t){case"number":return Number.isInteger(t)&&t>=0&&t<n;case"symbol":return!1;case"string":return Vd.test(t)}}function Eo(t){return t!==null&&typeof t=="object"&&Bo(t)==="[object Arguments]"}function Od(t,n){let r;if(Array.isArray(n)?r=n:typeof n=="string"&&Es(n)&&t?.[n]==null?r=wo(n):r=[n],r.length===0)return!1;let o=t;for(let i=0;i<r.length;i++){const a=r[i];if((o==null||!Object.hasOwn(o,a))&&!((Array.isArray(o)||Eo(o))&&Ps(a)&&a<o.length))return!1;o=o[a]}return!0}function _o(t){return typeof t=="object"&&t!==null}function Td(t){return _o(t)&&cd(t)}function jd(t){return typeof t=="symbol"||t instanceof Symbol}const Pd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ld=/^\w*$/;function Md(t,n){return Array.isArray(t)?!1:typeof t=="number"||typeof t=="boolean"||t==null||jd(t)?!0:typeof t=="string"&&(Ld.test(t)||!Pd.test(t))||n!=null&&Object.hasOwn(n,t)}const zd=(t,n,r)=>{const o=t[n];(!(Object.hasOwn(t,n)&&dd(o,r))||r===void 0&&!(n in t))&&(t[n]=r)};function $d(t,n,r,o){if(t==null&&!As(t))return t;let i;Md(n,t)?i=[n]:Array.isArray(n)?i=n:i=wo(n);const a=r(Yt(t,i));let l=t;for(let c=0;c<i.length&&l!=null;c++){const u=Do(i[c]);if(Tn(u))continue;let d;if(c===i.length-1)d=a;else{const f=l[u],p=o?.(f,u,t);d=p!==void 0?p:As(f)?f:Ps(i[c+1])?[]:{}}zd(l,u,d),l=l[u]}return t}function dn(t,n,r){return $d(t,n,()=>r,()=>{})}function Id(){}function Ao(t){return ko(t)}function No(t){if(typeof t!="object"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!=="[object Object]"){const r=t[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable?!1:t.toString()===`[object ${r}]`}let n=t;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n}function Rd(t){if(xo(t))return t;if(Array.isArray(t)||ko(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);const n=Object.getPrototypeOf(t);if(n==null)return Object.assign(Object.create(n),t);const r=n.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const o=new r(t);return o.lastIndex=t.lastIndex,o}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let o;return t instanceof AggregateError?o=new r(t.errors,t.message,{cause:t.cause}):o=new r(t.message,{cause:t.cause}),o.stack=t.stack,Object.assign(o,t),o}if(typeof File<"u"&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if(typeof t=="object"){const o=Object.create(n);return Object.assign(o,t)}return t}function Hd(t,...n){const r=n.slice(0,-1),o=n[n.length-1];let i=t;for(let a=0;a<r.length;a++){const l=r[a];i=ir(i,l,o,new Map)}return i}function ir(t,n,r,o){if(xo(t)&&(t=Object(t)),n==null||typeof n!="object")return t;if(o.has(n))return Rd(o.get(n));if(o.set(n,t),Array.isArray(n)){n=n.slice();for(let a=0;a<n.length;a++)n[a]=n[a]??void 0}const i=[...Object.keys(n),...Ns(n)];for(let a=0;a<i.length;a++){const l=i[a];if(Tn(l))continue;let c=n[l],u=t[l];if(Eo(c)&&(c={...c}),Eo(u)&&(u={...u}),typeof Buffer<"u"&&Buffer.isBuffer(c)&&(c=js(c)),Array.isArray(c))if(Array.isArray(u)){const f=[],p=Reflect.ownKeys(u);for(let h=0;h<p.length;h++){const m=p[h];f[m]=u[m]}u=f}else if(Td(u)){const f=[];for(let p=0;p<u.length;p++)f[p]=u[p];u=f}else u=[];const d=r(u,c,l,t,n,o);d!==void 0?t[l]=d:Array.isArray(c)||_o(u)&&_o(c)&&(No(u)||No(c)||Ao(u)||Ao(c))?t[l]=ir(u,c,r,o):u==null&&No(c)?t[l]=ir({},c,r,o):u==null&&Ao(c)?t[l]=js(c):(u===void 0||c!==void 0)&&(t[l]=c)}return t}function So(t,...n){return Hd(t,...n,Id)}const Ud=(t,n="pid",r="id")=>{const o={},i={};t.forEach(d=>{i[d[r]]=d,o[d[n]]?o[d[n]].push(d[r]):o[d[n]]=[d[r]]});let a=[];const l=function(d,f){return i[d]?.[n]&&(f.push(i[d][n]),l(i[d][n],f)),f},c=function(d,f){const p=o[d];return p&&(f.push(...p),p.forEach(h=>{if(o[h])return c(h,f)})),f};function u(d){const f=i[d];f&&(a.push(f),(o[d]||[]).forEach(p=>{u(p)}))}(o[0]||[]).forEach(d=>{u(d)});for(let d=0;d<a.length;d++)a[d].pid?a[d].treePid=l(a[d].id,[]):a[d].treePid=[],a[d]._child=o[a[d].id]??[],a[d]._isParent=!!a[d]._child.length,a[d]._childs=c(a[d].id,[]);return a};s.reactive({table:{},limit:10,page:1,pageSizes:[],tree:!1}),s.reactive({limit:10,page:1});function Wd(t){const n={title:"数据列表",pageSizes:[10,15,30,50,100],pk:"id",page:1,limit:15,...globalThis._plugins?.table??{},...t};return n.tree&&!t.page&&(n.page=0),n}async function qd(t){const n=(g,y=!0,v=!1)=>{if(!g||!g.data)return{msg:g?.msg||"暂无数据",data:[],count:0};let D=g.data;v&&(D=Ud(D));const w=Object.keys(f);for(var b=0;b<D.length;b++)w.length>0&&w.forEach(x=>{D[b][x]=f[x](D[b][x])}),D[b].ROW_ON=!!D[b].ROW_ON||!1,D[b].ROW_KEY=D[b].ROW_KEY||D[b][p]||Math.random();return{data:D,count:g.count}},{limit:o,sort:i,where:a,page:l,url:c,data:u,cache:d,cellFmt:f,pk:p}=t;let h=null;const m={page:l,limit:o,where:a,sort:i};if(c){const{data:g=void 0,msg:y}=await $req.post(c,m,void 0,Number(d&&!0));if(!g)return{msg:y,data:[],count:0};h=g,h.msg=y}else typeof u=="function"?h=await u(m):u&&(h={data:u,count:u.length});return n(h,!1,t.tree)}const Kd=(t,n="数据",r={},o=null)=>{let i="";a(1);function a(l,c=[0,0,0]){l!=1&&(c[0]-c[1],l*c[1]-c[1]+1),$req.post(t,{where:r,page:l,id:c[2]}).then(function(u){u.code==0?typeof u.data[1]=="object"?(o&&u.data[1].forEach(d=>{o(d)}),$a.csv.export(u.data[0],u.data[1],(u.data[2]||n)+".csv")):(i=i+u.data[1],u.data[3]?a(Number(l)+1,u.data[3]):($a.csv.export(u.data[0],i,(u.data[2]||n)+".csv","text"),i="")):$msg.error(u.msg)})}},ne=(t,n)=>{const r=t.__vccOpts||t;for(const[o,i]of n)r[o]=i;return r},Jd={emits:["change"],props:{init:Object,disabled:Boolean,count:Number},data(){return{page:1,limit:10}},created(){this.page=this.init.page,this.limit=this.init.limit},watch:{limit:{handler(t){this.$emit("change","limit",t)}},page:{handler(t){this.$emit("change","page",t)}}}},Gd={class:"table-footer"},Yd={key:0};function Zd(t,n,r,o,i,a){const l=s.resolveComponent("el-pagination");return s.openBlock(),s.createElementBlock("div",Gd,[s.createElementVNode("div",null,[s.renderSlot(t.$slots,"left")]),r.init.page?(s.openBlock(),s.createElementBlock("div",Yd,[s.createVNode(l,{layout:"total,sizes,prev,pager,next,jumper",disabled:r.disabled,background:"",total:r.count,"current-page":i.page,"onUpdate:currentPage":n[0]||(n[0]=c=>i.page=c),"page-sizes":r.init.pageSizes,pageSize:i.limit,"onUpdate:pageSize":n[1]||(n[1]=c=>i.limit=c)},null,8,["disabled","total","current-page","page-sizes","pageSize"])])):s.createCommentVNode("",!0)])}const Xd=ne(Jd,[["render",Zd]]),Qd={key:0,class:"table-tool-footer"},ef={class:"color-primary"},tf={__name:"tableBatch",props:{checkAllChange:Function,batch:Array,tabs:Array,tabsIndex:Number,table:Object},setup(t){const{checkData:n,uniApi:r,config:o,pk:i}=s.inject("table"),a=l=>{const c=n.value.map(u=>u[i]);if(l.action=="del"){if(!o?.del?.url)return $msg.warning("del.url undefined");r(c,{},o.del.url)}else typeof l.action=="object"?r(c,l.action.data,l.action.api||l.action.url):typeof l.action=="function"?l.action(c,tableData.value,n.value):$msg.error("action undefined")};return(l,c)=>{const u=s.resolveComponent("el-link"),d=s.resolveComponent("el-button"),f=s.resolveComponent("el-popconfirm");return s.unref(n).length>0&&t.batch&&(t.tabs&&t.batch[0].constructor===Array?t.batch[t.tabsIndex].length:t.batch.length)?(s.openBlock(),s.createElementBlock("div",Qd,[s.createElementVNode("div",null,[c[2]||(c[2]=s.createTextVNode(" 已选择 ",-1)),s.createElementVNode("span",ef,s.toDisplayString(s.unref(n).length),1),c[3]||(c[3]=s.createTextVNode(" 条数据 ",-1)),s.createVNode(u,{type:"primary",onClick:c[0]||(c[0]=p=>t.checkAllChange(!1))},{default:s.withCtx(()=>[...c[1]||(c[1]=[s.createTextVNode("取消选择",-1)])]),_:1})]),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.tabs&&t.batch&&t.batch[0].constructor===Array?t.batch[t.tabsIndex]:t.batch,p=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[p.confirm?(s.openBlock(),s.createBlock(f,{key:0,title:`确定要将选中的数据${p.title}吗`,onConfirm:h=>a(p)},{reference:s.withCtx(()=>[s.createVNode(d,{type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(p.title),1)]),_:2},1024)]),_:2},1032,["title","onConfirm"])):(s.openBlock(),s.createBlock(d,{key:1,type:"primary",onClick:h=>a(p)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(p.title),1)]),_:2},1032,["onClick"]))],64))),256))])])):s.createCommentVNode("",!0)}}},nf={key:1,style:{"margin-bottom":"-12px","margin-top":"-6px"},id:"table-form-header"},rf={class:"overflow-hidden"},of={class:"dialog-footer"},sf=s.defineComponent({__name:"tableDialog",setup(t,{expose:n}){const r=s.inject("table"),o=s.ref(!1),i=s.ref({}),a=s.ref($config?.form?.btnText??"提交"),l=s.ref(0),c=s.useTemplateRef("formRef"),u=()=>{r.rowsIndex=-1};function d(h){i.value=h,l.value=(h.title||"")+(h.data.ROW_KEY||h.data.id||0),h?.confirmButton?.text&&(a.value=h.confirmButton.text),c.value?.setData(h.data,!0),o.value=!0}const f=()=>{c.value.fnSubmit()};function p(){o.value=!1}return n({show:d,close:p}),(h,m)=>{const g=s.resolveComponent("admin-form"),y=s.resolveComponent("el-scrollbar"),v=s.resolveComponent("el-button"),D=s.resolveComponent("el-dialog");return s.openBlock(),s.createBlock(D,{fullscreen:!!s.unref(i).fullscreen,"align-center":"","append-to-body":"",modelValue:s.unref(o),"onUpdate:modelValue":m[1]||(m[1]=w=>s.isRef(o)?o.value=w:null),"z-index":99,width:s.unref(i)?.width||"50%",onClose:u},{header:s.withCtx(()=>[s.unref(i).title!=="tabs"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(s.unref(i).title||"-"),1)],64)):(s.openBlock(),s.createElementBlock("div",nf))]),footer:s.withCtx(()=>[s.createElementVNode("span",of,[s.renderSlot(h.$slots,"form-bottom",{form:s.unref(i).form,data:s.unref(i).data},()=>[s.createVNode(v,{onClick:m[0]||(m[0]=w=>p())},{default:s.withCtx(()=>[...m[2]||(m[2]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(v,{type:"primary",onClick:f},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(s.unref(a)),1)]),_:1})])])]),default:s.withCtx(()=>[s.createElementVNode("div",rf,[s.createVNode(y,{height:"100%","max-height":"70vh"},{default:s.withCtx(()=>[s.unref(i).form?(s.openBlock(),s.createBlock(g,{data:s.unref(i).data,key:s.unref(l),ref_key:"formRef",ref:c,onSubmit:s.unref(r).dialogSubmit,beforeSubmit:s.unref(i).form.beforeSubmit,onChange:s.unref(i).form.change,onEnd:s.unref(i).form.end,init:s.unref(i).form,slot:s.unref(i).slot},null,8,["data","onSubmit","beforeSubmit","onChange","onEnd","init","slot"])):s.createCommentVNode("",!0)]),_:1})])]),_:3},8,["fullscreen","modelValue","width"])}}}),af={key:0,class:"cate-search bg-main pl pb mb-xs"},lf={class:"flex-center pt"},cf={key:0,class:"label px-sm"},uf=s.defineComponent({__name:"tableNav",setup(t){const{init:n,navChange:r}=s.inject("table"),o=s.ref(n.where??{});return(i,a)=>{const l=s.resolveComponent("el-radio-button"),c=s.resolveComponent("el-radio-group");return s.unref(n).cate?(s.openBlock(),s.createElementBlock("div",af,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(n).cate.cols,u=>(s.openBlock(),s.createElementBlock("div",lf,[u.title?(s.openBlock(),s.createElementBlock("div",cf,s.toDisplayString(u.title),1)):s.createCommentVNode("",!0),s.createVNode(c,{size:"small",modelValue:s.unref(o)[u.field],"onUpdate:modelValue":d=>s.unref(o)[u.field]=d,onChange:s.unref(r)},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.cols,(d,f)=>(s.openBlock(),s.createBlock(l,{value:f},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(d),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),256))])):s.createCommentVNode("",!0)}}}),df={name:"admin-table-tool",props:{init:Array,length:{type:Number,default:3}},emits:["change"],computed(){this.init||(this.init=[])},methods:{click(t,n){this.$emit("change",{index:n,...t})}}},ff={style:{cursor:"pointer",color:"#0D84FF"},class:"flex"},pf={style:{"text-align":"center"}},hf=["onClick"];function mf(t,n,r,o,i,a){const l=s.resolveComponent("el-link"),c=s.resolveComponent("el-popconfirm"),u=s.resolveComponent("el-divider"),d=s.resolveComponent("el-dropdown-item"),f=s.resolveComponent("el-dropdown-menu"),p=s.resolveComponent("el-dropdown");return s.openBlock(),s.createElementBlock(s.Fragment,null,[r.init?.length?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(r.init||[],(h,m)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[m<r.length&&r.init.length<=r.length||m<r.length-1&&r.init.length>r.length?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[h.confirm?(s.openBlock(),s.createBlock(c,{key:0,title:typeof h.confirm=="string"?h.confirm:"确认要执行"+h.title+"操作吗",onConfirm:g=>a.click(h,m)},{reference:s.withCtx(()=>[s.createVNode(l,{type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(h.title),1)]),_:2},1024)]),_:2},1032,["title","onConfirm"])):(s.openBlock(),s.createBlock(l,{key:1,type:"primary",onClick:g=>a.click(h,m)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(h.title),1)]),_:2},1032,["onClick"]))],64)):s.createCommentVNode("",!0),m<r.init.length-1&&m<r.length-1?(s.openBlock(),s.createBlock(u,{key:1,direction:"vertical"})):s.createCommentVNode("",!0)],64))),256)):s.createCommentVNode("",!0),r.init?.length>r.length?(s.openBlock(),s.createBlock(p,{key:1},{dropdown:s.withCtx(()=>[s.createVNode(f,null,{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.init,(h,m)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[m>r.length-2?(s.openBlock(),s.createBlock(d,{key:0},{default:s.withCtx(()=>[h.confirm?(s.openBlock(),s.createBlock(c,{key:0,title:typeof h.confirm=="string"?h.confirm:"确认要执行"+h.title+"操作吗",onConfirm:g=>a.click(h,m)},{reference:s.withCtx(()=>[s.createElementVNode("div",pf,s.toDisplayString(h.title),1)]),_:2},1032,["title","onConfirm"])):(s.openBlock(),s.createElementBlock("div",{key:1,style:{"text-align":"center"},onClick:g=>a.click(h,m)},s.toDisplayString(h.title),9,hf))]),_:2},1024)):s.createCommentVNode("",!0)],64))),256))]),_:1})]),default:s.withCtx(()=>[s.createElementVNode("span",ff,[s.createVNode(l,{type:"primary"},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("更多",-1)])]),_:1}),n[1]||(n[1]=s.createElementVNode("i",{class:"i-ri-arrow-down-s-line"},null,-1))])]),_:1})):s.createCommentVNode("",!0)],64)}const gf=ne(df,[["render",mf]]),yf={props:{init:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}}},data(){return{pk:"",titleName:"",imgName:""}},created(){const{pk:t="id",titleName:n="title",imgName:r="img"}=this.init;this.pk=t,this.titleName=n,this.imgName=r}},bf={class:"flex py-sm leading-tight max-w-200px"},Cf={class:"flex-col ml-sm flex-1 overflow-hidden"},vf={class:"font-md line-1"},Df={style:{color:"#F56C6C"}},wf={key:1,class:"flex-col ml-sm"},xf={class:"font-md op-70"};function Bf(t,n,r,o,i,a){const l=s.resolveComponent("a-image");return s.openBlock(),s.createElementBlock("div",bf,[i.pk&&r.data&&r.data[i.pk]?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[r.data[i.imgName]?(s.openBlock(),s.createBlock(l,{key:0,width:"36px",height:"36px",borderRadius:"36px",src:r.data[i.imgName],preview:!1,class:"img"},null,8,["src"])):s.createCommentVNode("",!0),s.createElementVNode("div",Cf,[s.createElementVNode("div",vf,s.toDisplayString(r.data[i.titleName]),1),s.createElementVNode("div",Df,"ID:"+s.toDisplayString(r.data[i.pk]),1)])],64)):(s.openBlock(),s.createElementBlock("div",wf,[s.createElementVNode("div",xf,s.toDisplayString(r.init?.error||"数据不存在"),1)]))])}const Ls=ne(yf,[["render",Bf]]),kf={components:{Tool:gf,imgInfo:Ls},props:{prop:Object,index:Number,colIndex:Number,item:Object,modelValue:{type:null}},inject:["table"],watch:{item:{handler(t){this.init.format&&this.setValue(t[this.init.field])}},modelValue(t){this.setValue(t)}},data(){return{key:0,init:{},loading:!1,component:null,type:"",toolBtns:[],switchProps:null,value:null}},computed:{formatValue(){let t=[];if(this.init.type==="status")return t=["--","info"],this.init.cols?t=this.init.cols[this.value]:this.value==0?t=["否","info"]:t=["是","primary"],t}},created(){const t=$config?.table?.shortcuts?.[this.prop.type];t?this.init=$a.object.deepMerge(t,this.prop,{type:t.type}):this.init=this.prop;let{type:n,component:r}=this.init;r?this.component=s.markRaw(r):typeof r=="string"&&(this.component=r),typeof n=="function"?this.type=n(this.item):this.type=n,this.setValue(this.modelValue),this.type==="switch"&&this.calculateSwitchProps()},methods:{calculateSwitchProps(){!this.init.cols&&[0,1,!0,!1].indexOf(this.value)>-1?this.switchProps={inactiveValue:this.init.cols?.[0]??(yo.isBoolean(this.value)?!1:0),activeValue:this.init.cols?.[1]??(yo.isBoolean(this.value)?!0:1),inactiveText:this.init.cols?.[2]??"否",activeText:this.init.cols?.[3]??"是",inlinePrompt:!0,disabled:!!this.init.disabled}:this.switchProps=null},setValue(t){typeof this.init.format=="function"?this.value=this.init.format(t,this.item):this.value=t},async doSwitch(t){this.loading=!1,await this.table.cellEdit({value:t},this.index,this.init)===!1&&(this.value=this.modelValue),this.loading=!1}}},Ef={key:1,class:"pl"},_f={key:1},Af={key:0,class:"tags"},Nf={key:0,class:"table-goods flex py-xs"},Sf={class:"flex-col ml-sm flex-1 overflow-hidden",style:{}},Ff={class:"line-1"},Vf={class:"text-color-regular"},Of={class:"color-danger"};function Tf(t,n,r,o,i,a){const l=s.resolveComponent("a-text-edit"),c=s.resolveComponent("el-checkbox"),u=s.resolveComponent("el-switch"),d=s.resolveComponent("tool"),f=s.resolveComponent("a-image"),p=s.resolveComponent("el-badge"),h=s.resolveComponent("el-tag"),m=s.resolveComponent("a-text-status"),g=s.resolveComponent("img-info"),y=s.resolveComponent("el-link"),v=s.resolveComponent("a-cate-text"),D=s.resolveComponent("a-time"),w=s.resolveComponent("a-region-text");return!i.type&&!i.component?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[i.init.edit?(s.openBlock(),s.createBlock(l,{key:0,onSave:n[0]||(n[0]=b=>{a.table.cellEdit(b,r.index,i.init)}),text:i.value},null,8,["text"])):a.table.init.tree&&r.colIndex===(a.table.init.treeIndex||0)&&(!r.item.pid||a.table.fnTreeShow(r.index)>=0)?(s.openBlock(),s.createElementBlock("div",{key:1,class:"flex items-center line-height click",onClick:n[1]||(n[1]=b=>a.table.fnTreeOn(r.index))},[s.createElementVNode("span",{style:s.normalizeStyle("padding-left:"+r.item.treePid.length*18+"px")},null,4),r.item._isParent?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["font-xl click size-5",a.table.treeOn.value.indexOf(r.item.id)>-1?"i-ri-arrow-down-s-fill":"i-ri-arrow-right-s-fill"])},null,2)):(s.openBlock(),s.createElementBlock("span",Ef)),s.createTextVNode(" "+s.toDisplayString(i.value),1)])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:2},[s.createTextVNode(s.toDisplayString(i.value),1)],64))],64)):i.type==="checkbox"?(s.openBlock(),s.createBlock(c,{key:1,value:r.index,checked:r.item.ROW_ON,modelValue:r.item.ROW_ON,"onUpdate:modelValue":n[2]||(n[2]=b=>r.item.ROW_ON=b)},null,8,["value","checked","modelValue"])):i.type==="switch"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:2},[i.switchProps?(s.openBlock(),s.createBlock(u,s.mergeProps({key:0,loading:i.loading,modelValue:i.value,"onUpdate:modelValue":n[3]||(n[3]=b=>i.value=b)},i.switchProps,{onChange:a.doSwitch}),null,16,["loading","modelValue","onChange"])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(i.value),1)],64))],64)):i.type==="tool"?(s.openBlock(),s.createBlock(d,{key:3,onChange:n[4]||(n[4]=b=>{a.table.rowAction(b,r.index,i.init)}),length:i.init.maxLength||3,init:a.table.getCellTool(i.init,r.item)},null,8,["length","init"])):i.type==="img"||i.type==="image"?(s.openBlock(),s.createBlock(f,{key:4,src:i.value,preview:!!i.init.preview,width:i.init.width||"40px",height:i.init.height||"40px",fit:"scale-down"},null,8,["src","preview","width","height"])):i.type==="imgs"||i.type==="images"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:5},[typeof i.value=="object"&&i.value?.length?(s.openBlock(),s.createBlock(p,{key:0,hidden:i.value?.length<=1,"badge-class":"imgs-badge",type:"primary",value:i.value?.length},{default:s.withCtx(()=>[s.createVNode(f,{src:i.value[0],preview:i.value,width:i.init.width||"40px",height:i.init.height||"40px",fit:"scale-down"},null,8,["src","preview","width","height"])]),_:1},8,["hidden","value"])):(s.openBlock(),s.createElementBlock("span",_f,"无"))],64)):i.type==="text"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:6},[i.init.cols?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(i.init.textClass)},s.toDisplayString(i.init.cols[i.value]||i.init.default),3)):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(i.init.textClass)},s.toDisplayString(i.value||i.init.default),3))],64)):i.type==="tags"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:7},[i.value||i.value===0?(s.openBlock(),s.createElementBlock("div",Af,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(typeof i.value=="object"?i.value:(i.value+"").split(","),b=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[i.init.cols?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[i.init.cols[b]?(s.openBlock(),s.createBlock(h,{key:0,type:i.init.tagsType??"primary",size:"small"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.init.cols[b]),1)]),_:2},1032,["type"])):s.createCommentVNode("",!0)],64)):(s.openBlock(),s.createBlock(h,{key:1,type:i.init.tagsType??"primary",size:"small"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(b),1)]),_:2},1032,["type"]))],64))),256))])):s.createCommentVNode("",!0)],64)):i.type==="status"?(s.openBlock(),s.createBlock(m,{key:8,status:a.formatValue[1]},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(a.formatValue[0]),1)]),_:1},8,["status"])):i.type==="img-info"?(s.openBlock(),s.createBlock(g,{key:9,init:i.init.init,data:r.item[i.init.field]},null,8,["init","data"])):i.type==="goods"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:10},[i.value&&typeof i.value=="object"?(s.openBlock(),s.createElementBlock("div",Nf,[s.createVNode(f,{height:"60px",width:"60px",lazy:"",fit:"cover",preview:!1,src:i.value.head_img},null,8,["src"]),s.createElementVNode("div",Sf,[s.createElementVNode("div",Ff,s.toDisplayString(i.value.title),1),s.createElementVNode("div",Vf,"价格:"+s.toDisplayString(i.value.price),1),s.createElementVNode("div",Of,"商品ID:"+s.toDisplayString(i.value.id),1)])])):s.createCommentVNode("",!0)],64)):i.type==="link"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:11},[i.init.on?(s.openBlock(),s.createBlock(y,{key:0,type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.value),1)]),_:1})):(s.openBlock(),s.createBlock(y,{key:1,type:"primary",onClick:n[5]||(n[5]=b=>t.$go.to(i.init.url,r.item))},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.value),1)]),_:1}))],64)):i.type==="cate"?(s.openBlock(),s.createBlock(v,s.mergeProps({key:12,modelValue:i.value,"onUpdate:modelValue":n[6]||(n[6]=b=>i.value=b),format:i.init.format,"show-num":i.init.showNum,type:i.init.cateType,color:i.init.cateColor,url:i.init.url},i.init.props),null,16,["modelValue","format","show-num","type","color","url"])):i.type==="times"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:13},[i.value&&i.value.constructor===Array?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createVNode(D,{date:i.value[0]},null,8,["date"]),n[8]||(n[8]=s.createTextVNode("~ ",-1)),s.createVNode(D,{date:i.value[1]},null,8,["date"])],64)):s.createCommentVNode("",!0)],64)):i.type==="time"?(s.openBlock(),s.createBlock(D,{key:i.value,format:i.init.format,date:i.value},null,8,["format","date"])):i.type==="region"?(s.openBlock(),s.createBlock(w,{key:15,code:i.value},null,8,["code"])):i.type==="index"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:16},[s.createTextVNode(s.toDisplayString(r.index+1),1)],64)):i.component?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.component),{key:17,modelValue:i.value,"onUpdate:modelValue":n[7]||(n[7]=b=>i.value=b)},null,8,["modelValue"])):s.createCommentVNode("",!0)}const jf=ne(kf,[["render",Tf]]),Pf={class:"table-main table-fixed border-collapse",cellspacing:"0",cellpadding:"0"},Lf=["width"],Mf={key:0},zf={class:"cell line-1"},$f={key:0},If=["onClick"],Rf={class:"sort"},Hf={key:0,class:"text-3 pl-sm",style:{color:"var(--el-color-info)"}},Uf={key:0,class:"cols-tool"},Wf=["colspan"],qf={class:"cols-tool-main"},Kf=["onClick"],Jf={__name:"main",props:{height:String,data:Array,init:Object},setup(t){const{onSort:n,sort:r,cellClick:o,tableData:i,checkData:a,fnTreeShow:l}=s.inject("table"),c=s.ref(-1),u=p=>{i.value.map(h=>{h.ROW_ON=p})},d=s.ref(),f={};return t.init.cols.forEach(p=>{p.type=="switch"&&(f[p.field]=h=>Number(h)||0)}),d.value=t.init.cols,s.watch(()=>i,(p={},h={})=>{console.log("watch tableData")}),(p,h)=>{const m=s.resolveComponent("el-checkbox"),g=s.resolveComponent("el-scrollbar");return s.openBlock(),s.createBlock(g,{"max-height":t.height},{default:s.withCtx(()=>[s.createElementVNode("table",Pf,[s.createElementVNode("colgroup",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(d.value,y=>(s.openBlock(),s.createElementBlock("col",{width:y.width},null,8,Lf))),256))]),t.init.header!==!1?(s.openBlock(),s.createElementBlock("thead",Mf,[s.createElementVNode("tr",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(d.value,y=>(s.openBlock(),s.createElementBlock("th",{class:s.normalizeClass([y.fixed?"fixed-"+y.fixed:""])},[s.createElementVNode("div",zf,[y.type=="checkbox"?(s.openBlock(),s.createElementBlock("div",$f,[(s.openBlock(),s.createBlock(m,{style:{height:"20px"},key:"all"+s.unref(a).length,indeterminate:s.unref(a).length!=s.unref(i).length&&s.unref(a).length!=0,checked:s.unref(a).length>0,onChange:u},null,8,["indeterminate","checked"]))])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[y.sort?(s.openBlock(),s.createElementBlock("div",{key:0,style:s.normalizeStyle({justifyContent:y.type=="tool"?"center":"left"}),class:"click",onClick:v=>s.unref(n)(y.field)},[s.createElementVNode("span",null,s.toDisplayString(y.title),1),s.createElementVNode("span",Rf,[s.createElementVNode("i",{class:s.normalizeClass(["i-ri-arrow-up-s-fill",{"color-primary!":s.unref(r)[y.field]=="asc"}])},null,2),s.createElementVNode("i",{class:s.normalizeClass(["i-ri-arrow-down-s-fill",{"color-primary!":s.unref(r)[y.field]=="desc"}])},null,2)])],12,If)):(s.openBlock(),s.createElementBlock("div",{key:1,style:s.normalizeStyle({justifyContent:y.type=="tool"?"center":"left"})},[s.createElementVNode("span",null,[s.createTextVNode(s.toDisplayString(y.title)+" ",1),y.subTitle?(s.openBlock(),s.createElementBlock("span",Hf,s.toDisplayString(y.subTitle),1)):s.createCommentVNode("",!0)])],4))],64))])],2))),256))])])):s.createCommentVNode("",!0),s.createElementVNode("tbody",{class:s.normalizeClass(t.init.class)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(i),(y,v)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:y.ROW_KEY},[p.$slots.colsTool?(s.openBlock(),s.createElementBlock("tr",Uf,[s.createElementVNode("td",{colspan:d.value.length},[s.createElementVNode("div",qf,[s.renderSlot(p.$slots,"colsTool",{key:v,row:y})])],8,Wf)])):s.createCommentVNode("",!0),s.createElementVNode("tr",{class:s.normalizeClass(["tr",{hover:c.value==v,isTool:t.init.colsTool}])},[!t.init.tree||t.init.tree&&(!y.pid||s.unref(l)(v)>=0)?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(d.value,(D,w)=>(s.openBlock(),s.createElementBlock("td",{class:s.normalizeClass([D.fixed?"fixed-"+D.fixed:""])},[s.createElementVNode("div",{class:s.normalizeClass(["cell",[D.class,D.on?"click":""]]),style:s.normalizeStyle({justifyContent:D.type=="tool"?"center":"start",color:D.color,fontWeight:D.fontWeight}),onClick:b=>s.unref(o)(D,v)},[D.slot===!0?s.renderSlot(p.$slots,"cols."+D.field,{key:v,row:y}):D.slot&&typeof D.slot=="string"?s.renderSlot(p.$slots,D.slot,{key:v,row:y}):(s.openBlock(),s.createBlock(jf,{key:2,prop:D,item:y,colIndex:w,index:v,"model-value":s.unref(Yt)(y,D.field)},null,8,["prop","item","colIndex","index","model-value"]))],14,Kf)],2))),256)):s.createCommentVNode("",!0)],2)],64))),128))],2)])]),_:3},8,["max-height"])}}},Gf=s.defineComponent({__name:"tableTabs",props:{modelValue:Number},setup(t){const n=s.ref(t.modelValue),{init:r,tabsChange:o,toolAction:i}=s.inject("table");return(a,l)=>{const c=s.resolveComponent("el-radio-button"),u=s.resolveComponent("el-radio-group"),d=s.resolveComponent("el-button");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.unref(r).tabs?(s.openBlock(),s.createBlock(u,{key:0,class:"mr table-el-radio-group",onChange:s.unref(o),modelValue:s.unref(n),"onUpdate:modelValue":l[0]||(l[0]=f=>s.isRef(n)?n.value=f:null)},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(r).tabs,(f,p)=>(s.openBlock(),s.createBlock(c,{value:p},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(f.title),1)]),_:2},1032,["value"]))),256))]),_:1},8,["onChange","modelValue"])):s.createCommentVNode("",!0),s.unref(r).tools?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(s.unref(r).tools,f=>(s.openBlock(),s.createBlock(d,{type:f.type??"primary",onClick:p=>s.unref(i)(f)},{default:s.withCtx(()=>[f.icon||f.action==="add"?(s.openBlock(),s.createElementBlock("i",{key:0,class:s.normalizeClass(f.icon||{add:"i-ri-add-line"}[f.action])},null,2)):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(f.title||{add:"添加"}[f.action]),1)]),_:2},1032,["type","onClick"]))),256)):s.createCommentVNode("",!0)],64)}}}),Yf={emits:["change"],props:{init:Object,data:Object},watch:{show(){this.resize(window.innerWidth)}},data(){return{span:{sm:24,md:12,lg:8,xl:6},sum:0,formData:{},changeData:{},offset:0,cols:[],limit:3,spread:!1,keyTime:0,right:!0}},created(){if(this.init?.span&&(this.span=this.init.span),!this.init?.cols)return;this.cols=this.init.cols,this.sum=this.init.cols.length;let t={};this.init.spread&&(this.spread=!0),this.cols.forEach(n=>{this.data&&this.data[n.field]?t[n.field]=this.data[n.field]:t[n.field]=n.value||"",t[n.field]||(n.type=="dates"||n.type=="datetimes"||n.type=="input-select"?t[n.field]=[]:t[n.field]="")}),this.formData=t},mounted(){this.resize(window.innerWidth),window.onresize=()=>{this.resize(window.innerWidth)}},methods:{onChange(t,n){t&&typeof t=="object"&&t.isJoin&&(n=t.field,t=t.data),this.changeData[n]=t},fnSearch(){this.$emit("change",this.changeData)},resetFields(){this.keyTime++;let t={};this.cols.forEach(function(n){n.type=="dates"||n.type=="datetimes"?t[n.field]=[]:t[n.field]=""}),this.changeData={},this.formData=t,this.$emit("change",{})},resize(t){if(this.right=!1,t>=1920)this.limit=3;else if(t>1200)this.limit=2;else if(t>992)this.limit=1;else{this.limit=1,this.right=!0;return}this.sum<=this.limit||t<992?this.offset=0:this.offset=24/(this.limit+1)*this.limit-this.sum%(this.limit+1)*24/(this.limit+1),this.offset!=0&&(this.right=!0)}}},Zf={key:1,class:"flex-col text-right line-height"},Xf={class:"op-70 text-3 pt-xs line-2"},Qf={class:""};function ep(t,n,r,o,i,a){const l=s.resolveComponent("a-inputs"),c=s.resolveComponent("el-form-item"),u=s.resolveComponent("el-col"),d=s.resolveComponent("el-button"),f=s.resolveComponent("el-link"),p=s.resolveComponent("el-row"),h=s.resolveComponent("el-form");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["admin-search",r.init.class])},[i.sum>0&&i.formData?(s.openBlock(),s.createBlock(h,{key:0,size:r.init.size,ref:"search",model:i.formData},{default:s.withCtx(()=>[s.createVNode(p,s.mergeProps({gutter:r.init.gutter??20},r.init.row),{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,(m,g)=>s.withDirectives((s.openBlock(),s.createBlock(u,s.mergeProps({ref_for:!0},m?.span??i.span),{default:s.withCtx(()=>[s.createVNode(c,{"label-width":m.title?r.init.labelWidth||m.labelWidth||90:20,prop:m.field,class:s.normalizeClass(m.class)},{label:s.withCtx(()=>[m.subTitle?(s.openBlock(),s.createElementBlock("div",Zf,[s.createElementVNode("span",null,s.toDisplayString(m.title),1),s.createElementVNode("span",Xf,s.toDisplayString(m.subTitle),1)])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(m.title),1)],64))]),default:s.withCtx(()=>[(s.openBlock(),s.createBlock(l,{size:r.init.size,style:{width:"100%"},index:g,key:m.field+"-"+g+"-"+i.keyTime,modelValue:i.formData[m.field],"onUpdate:modelValue":[y=>i.formData[m.field]=y,y=>a.onChange(y,m.field)],prop:m},null,8,["size","index","modelValue","onUpdate:modelValue","prop"]))]),_:2},1032,["label-width","prop","class"])]),_:2},1040)),[[s.vShow,g<i.limit||i.spread]])),256)),s.createVNode(u,s.mergeProps(r.init.btn?.span??i.span,{offset:i.spread?i.offset:0}),{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex w-full items-center mb-4.5",[{"justify-end":(i.spread||i.limit===1)&&i.right},r.init.btn?.class]])},[r.init?.btn?.reset!==!1?(s.openBlock(),s.createBlock(d,{key:0,onClick:n[0]||(n[0]=m=>a.resetFields())},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(r.init?.btn?.reset??"重置"),1)]),_:1})):s.createCommentVNode("",!0),s.createVNode(d,{type:"primary",onClick:n[1]||(n[1]=m=>a.fnSearch())},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(r.init.btn?.text??"查询"),1)]),_:1}),s.withDirectives(s.createElementVNode("div",Qf,[s.withDirectives(s.createVNode(f,{class:"ml",onClick:n[2]||(n[2]=m=>i.spread=!i.spread),type:"primary"},{default:s.withCtx(()=>[...n[4]||(n[4]=[s.createElementVNode("span",{class:"flex items-center"},[s.createTextVNode("更多查询"),s.createElementVNode("i",{class:"i-ri-arrow-down-s-line text-4"})],-1)])]),_:1},512),[[s.vShow,!i.spread]]),s.withDirectives(s.createVNode(f,{class:"ml",onClick:n[3]||(n[3]=m=>i.spread=!i.spread),type:"primary"},{default:s.withCtx(()=>[...n[5]||(n[5]=[s.createElementVNode("span",{class:"flex items-center"},[s.createTextVNode("收起"),s.createElementVNode("i",{class:"i-ri-arrow-up-s-line"})],-1)])]),_:1},512),[[s.vShow,i.spread]])],512),[[s.vShow,i.sum>i.limit]])],2)]),_:1},16,["offset"])]),_:1},16,["gutter"])]),_:1},8,["size","model"])):s.createCommentVNode("",!0)],2)}const Ms=ne(Yf,[["render",ep]]),Fo={table:{}},tp={class:"admin-table-page"},np={key:1,class:"mb bg-main h-19"},rp={class:"admin-table rounded-md"},op={key:0,class:"table-header"},ip={key:0,class:"left flex-1"},sp={key:1,class:"left"},ap={class:"right flex"},lp={key:3,class:"table-no-data"},cp=s.defineComponent({__name:"table",props:{init:Object},emits:["change"],setup(t,{expose:n,emit:r}){const o=A=>{const L={};for(const Y in A)if(Object.hasOwnProperty.call(A,Y)){const J=A[Y];Y.indexOf(".")>-1?dn(L,Y,J):L[Y]=J}return L},i=r,a=t,{proxy:l}=s.getCurrentInstance(),c=l.$route.path,u=Object.keys(l.$slots).filter(A=>["title","footer"].indexOf(A)===-1&&A.indexOf("form.")===-1),d=Wd(a.init);let{url:f="",title:p,success:h,sort:m={},pk:g,noPage:y=null,batch:v=null,tabs:D=null,cache:w}=d;const b={page:d.page,limit:d.limit};d.add&&!d.add?.title&&(d.add.title="添加"),d.edit&&!d.edit?.title&&(d.edit.title="编辑");let x=d.search?100:0;x=x+(p!==!1||l.$slots.title?52:0),x=x+(d.page||l.$slots.footer?56:0),x=x+(d.cate?60:0);const k=`calc(var(--main-height) - 24px - ${x}px)`,E=s.ref(0),B=s.ref({}),V=s.ref(d.where),T=s.ref(!0),P=s.ref([]),R=s.ref(0),I=s.ref("暂无数据"),U=s.ref(0),G=s.ref({}),W=s.ref(null),K=(A,L)=>{b[A]=L,ge()},X=A=>{E.value=A,B.value=D[A].where,P.value=[],b.page=1,ge()},oe=A=>{i("change",{type:"nav",data:A}),ge("nav")},re=(A,L=!1)=>{L&&U.value++,G.value=A,b.page=1,ge("search")},ie=A=>{re(A)},ce=d.name,Q=Fo.table[ce];if(Q&&(b.page=Q.page||b.page,b.limit=Q.limit||b.limit,m=Q.sort||m,G.value=Q.searchWhere||G.value,V.value=Q.where||V.value,E.value=Q.tabsIndex||0),s.onBeforeUnmount(()=>{if(ce){const A=ce===!0?f:ce;if(!A)return;Fo.table[A]={page:b.page,limit:b.limit,sort:m.value,searchWhere:G.value,where:V.value,tabsIndex:E.value}}}),!y&&l.$route.query){const A=$go.query(l.$route.query);G.value=A.where||{},E.value=A.tabs||0}D&&(B.value=D[E.value].where),m=s.ref(m);const xe=s.ref(-1),ge=async(A="init",L=!1)=>{T.value=!0;const Y={...B.value,...V.value,...G.value},{data:J,count:be,msg:z}=await qd({where:Y,page:b.page,limit:b.limit,sort:m.value,data:d.data,url:f,cache:w,cellFmt:Nt,pk:g,tree:d.tree});if(h&&h({data:J,count:be,msg:z}),z)return T.value=!1,I.value=z;P.value=J,R.value=be,T.value=!1},Je=(A=!0)=>P.value,Ge=(A=!0)=>{ge("reload",A)},Ne=A=>A.indexOf("http")>-1||typeof A=="function"||A.indexOf("/")>-1?A:d.url+"/"+A,Ce=(A,L={},Y="")=>{if(Y=Y||d?.edit?.url,!Y)return $msg.warning("url 未定义");if(A&&(L[g]=A),d.apiBefore&&typeof d.apiBefore=="function"){const J=d.apiBefore(Y,L);if(J===!1)return;if(typeof J=="string")return $msg.error(J);typeof J=="object"&&(L=J)}$req.post(Ne(Y),L,"处理中").then(J=>{J.code==0?(d.apiSuccess&&typeof d.apiSuccess=="function"&&d.apiSuccess("uniApi",L,Y),d.refresh!==!1&&ge(),$msg.success(J.msg)):$msg.error(J.msg)})},_e=(A,L=!1)=>{if(L!==!1)return m.value={},m.value[A]=L,ge();m.value[A]?m.value[A]==="asc"&&(L="desc"):L="asc",m.value={},L&&(m.value[A]=L),ge()},Me=s.computed(()=>P.value.filter(function(A){return A.ROW_ON})),nt=A=>{i("change",{type:"selection",data:A}),P.value.map(L=>{L.ROW_ON=A})},rt=(A,L)=>{typeof A.on=="function"?A.on(P.value[L],L):typeof A.on=="string"?Ye({action:A.on},L):Ye({action:A.on},L)},et=(A,L=-1,Y="")=>{L===-1&&(L=xe.value),L!==-1&&(P.value[L]={...P.value[L],...A},Y&&$msg.success(Y),xe.value=-1)},ot=(A,L,Y)=>{const J=Y.field;let be=Yt(P.value[L],J);if(!Od(P.value[L],J))return!1;let z=Ne(d.edit.url);Y.edit&&typeof Y.edit=="string"?z=Y.edit:Y.type=="switch"&&Y.url&&(z=Y.url);const ee=d.edit?.data??{};if(d.edit?.fields&&d.edit.fields.forEach(he=>{ee[he]=P.value[L][he]}),ee[g]=P.value[L][g],ee[J]=Y.valueformat?Y.valueformat(A.value):A.value,typeof z=="function")return z(ee,L);let ae=$loading("修改中");$req.post(z,o(ee)).then(he=>{ae.close(),he.code==0?(P.value[L]=dn(P.value[L],J,A.value),$msg.success("修改成功"),d.apiSuccess&&d.apiSuccess("cellEdit",L,ee),d.editUpdateTable&&ge()):(P.value[L]=dn(P.value[L],J,be),$msg.error(he.msg))})},Re=s.ref([]),mt=A=>{const L=P.value[A].treePid,Y=Re.value;return L.filter(function(be){return Y.indexOf(be)!==-1}).length-L.length},He=A=>{if(!P.value[A]._isParent)return;const L=P.value[A].id,Y=Re.value.indexOf(L);Y>-1?Re.value.splice(Y,1):Re.value.push(L)},ze=s.ref(),Dt=s.ref(),Nt={};if(d.cols||(d.cols=[]),d.cols.forEach(A=>{A.type=="checkbox"&&!A.width&&(A.width=40)}),v&&v.map(A=>{A.action==="del"&&(A.title=A.title||"删除",A.confirm===void 0&&(A.confirm=!0))}),D&&v){let A=[];D.forEach((L,Y)=>{A[Y]=v.filter(J=>J.tab===Y||typeof J.tab=="object"&&J.tab.indexOf(Y)>-1||!J.hasOwnProperty("tab"))}),v=A}const jt=(A,L)=>{if(typeof A.btn=="function")return A.btn(L);let Y=A.btn.filter(J=>J.tab===void 0||J.tab===E.value||typeof J.tab=="object"&&J.tab.indexOf(E.value)>-1);return Y?.map(J=>{!J.title&&typeof J.action=="string"&&(J.title={del:"删除",edit:"编辑",detail:"详情"}[J.action]||"",J.action==="del"&&J.confirm===void 0&&(J.confirm="确定要删除本条数据吗"))}),Y},ue={};async function le(A){ue[A.url]?ue[A.url].push(A):ue[A.url]=[A]}d.cols?.forEach(async A=>{A.type=="cate"&&A.url&&le(A)}),d.search?.cols&&d.search.cols.forEach(async A=>{["selects","select"].indexOf(A.type)>-1&&typeof A.url=="string"&&le(A)}),d.add?.cols&&d.add.cols.forEach(async A=>{["selects","select"].indexOf(A.type)>-1&&typeof A.url=="string"&&le(A)}),d.edit?.cols&&d.edit.cols.forEach(async A=>{["selects","select"].indexOf(A.type)>-1&&typeof A.url=="string"&&le(A)});const ve=Object.keys(ue);ve?.length?ve.forEach(async(A,L)=>{let Y=await $req.post(A);ue[A].forEach(J=>{J.url=Y.data}),L===ve.length-1&&(ze.value=d.search,ge())}):(ze.value=d.search,ge());const Ee=s.ref({}),Ue=(A,L,Y)=>{Y.cols.forEach(J=>{if(J.slot&&typeof J.slot!="function"){let be=typeof J.slot=="string"?J.slot:"form.cols."+J.field;l.$slots[be]&&(J.slot=l.$slots[be])}}),Y.url=Ne(Y.url),Ee.value={title:Y.title,width:Y.width,data:A,confirmButton:Y.confirmButton,form:{...Y,width:"100%",confirmButton:!1}},xe.value=L,W.value.show(Ee.value)},Ve=A=>{const{res:L,data:Y}=A;W.value.close();const J=Ee.value,be=P.value;L.code==0&&(J.form.success?J.form.success(Y,L.data):d.apiSuccess&&typeof d.apiSuccess=="function"&&d.apiSuccess("dialogSubmit",Y),xe.value>-1&&!d.tree&&!J.form.updateTable?be[xe.value]=So(be[xe.value],Y,{ROW_KEY:Math.random()}):d.refresh!==!1&&ge(),xe.value=-1)},Pe=async A=>{if(A.confirm){let L=A.confirm;if(typeof L=="function"){if(L()!==!0)return}else if(typeof L!="string"&&(L="确定要执行"+A.title+"操作?"),await $confirm(L)!="confirm")return}if(A.action=="add"){let L={};d.add?.data&&typeof d.add?.data=="function"?L=d.add.data():d.add?.data&&typeof d.add?.data=="object"&&(L=d.add.data),Ue(L,-1,{...d.edit,...d.add})}else if(typeof A.action=="object"&&A.action.type=="csv")Kd(A.action.url,A.action.name||"数据",A.action.where||{},A.action.format||null);else if(typeof A.action=="object"&&A.action.api){A.action.data||(A.action.data={});const L={...B.value,...V.value,...G.value,...A.action.data};Ce(0,L,A.action.api)}else typeof A.action=="object"?Ue({},-1,A.action):typeof A.action=="function"&&A.action()},Ye=async(A,L,Y={})=>{let J=P.value;if(!(Y.before&&Y.before(J[L],A)===!1))if(typeof A.action=="string")if(A.action=="edit")Ue(J[L],L,d.edit);else if(A.action=="del"){if(!d?.del?.url)return $msg.warning("del.url 未定义");let be={};d?.tree&&(be={child:[...J[L]._child],childs:[...J[L]._childs]}),Ce(J[L][g],be,d.del.url)}else if(A.action.indexOf("/")>-1){const be=A.action.split("?"),z={},ee=J[L];be[1]?(A.action=be[0],be[1].split(",").forEach(he=>{z[he]=ee[he]})):z[g]=ee[g],$go.to(A.action,z)}else $msg.error("error");else if(typeof A.action=="object"&&A.action.api)typeof A.action.api!="string"&&(A.action.api=d.edit.url),Ce(J[L][g],A.action.data,A.action.api);else if(typeof A.action=="object"&&typeof A.action.form=="function"){const be=await A.action.form(J[L],L);if(be.form)return Ue(be.data,L,be.form);Ue(J[L],L,be)}else typeof A.action=="object"?Ue(J[L],L,A.action):typeof A.action=="function"&&A.action(J[L],L)},Te=s.ref(!1),Le=(A=!0)=>{Te.value=A};s.watch(()=>l.$route.query,A=>{const L=l.$route.path;L!=c||!ze.value||(ze.value={...ze.value,spread:Dt.value?.spread},G.value=$go.query(A,"where"),b.page=Fo.table[L+"_page"]||1,U.value++,ge())});const Bt={getData:Je,search:re,init:d,treeOn:Re,cellEdit:ot,cellClick:rt,rowEdit:et,onSort:_e,sort:m,fnTreeShow:mt,fnTreeOn:He,setPageStatus:Le,checkAllChange:nt,navChange:oe,tabsChange:X,tableData:P,checkData:Me,reload:Ge,dialogForm:Ue,dialogSubmit:Ve,getCellTool:jt,rowAction:Ye,toolAction:Pe,uniApi:Ce,pk:g};return s.provide("table",Bt),n(Bt),(A,L)=>{const Y=s.resolveComponent("el-empty"),J=s.resolveDirective("loading");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(sf,{ref_key:"dialogRef",ref:W},null,512),s.createElementVNode("div",tp,[s.unref(d).cate?(s.openBlock(),s.createBlock(uf,{key:0})):s.createCommentVNode("",!0),s.unref(d).search&&!s.unref(ze)?(s.openBlock(),s.createElementBlock("div",np)):s.createCommentVNode("",!0),s.unref(ze)?(s.openBlock(),s.createBlock(Ms,{ref_key:"searchRef",ref:Dt,key:s.unref(U),init:s.unref(ze),data:s.unref(G),onChange:ie,class:s.normalizeClass(["mb bg-main pt-lg pr-lg rounded-md",s.unref(d).serachClass])},null,8,["init","data","class"])):s.createCommentVNode("",!0),s.createElementVNode("div",rp,[s.unref(d).title!==!1?(s.openBlock(),s.createElementBlock("div",op,[A.$slots.title?(s.openBlock(),s.createElementBlock("div",ip,[s.renderSlot(A.$slots,"title")])):(s.openBlock(),s.createElementBlock("div",sp,s.toDisplayString(s.unref(p)),1)),s.createElementVNode("div",ap,[s.createVNode(Gf,{modelValue:s.unref(E),"onUpdate:modelValue":L[0]||(L[0]=be=>s.isRef(E)?E.value=be:null)},null,8,["modelValue"])])])):s.createCommentVNode("",!0),A.$slots.default?s.renderSlot(A.$slots,"default",{key:1,data:s.unref(P),height:k}):s.withDirectives((s.openBlock(),s.createBlock(Jf,{key:2,init:t.init,data:s.unref(P),height:k},s.createSlots({_:2},[s.renderList(s.unref(u),be=>({name:be,fn:s.withCtx(({row:z,key:ee})=>[s.renderSlot(A.$slots,be,{key:ee,row:z})])}))]),1032,["init","data"])),[[J,s.unref(T)]]),!s.unref(d).hideEmpty&&s.unref(P).length==0&&!s.unref(T)?(s.openBlock(),s.createElementBlock("div",lp,[s.createVNode(Y,{"image-size":120,description:s.unref(I)},null,8,["description"])])):s.createCommentVNode("",!0),b.page||A.$slots.footer?(s.openBlock(),s.createBlock(Xd,{key:4,onChange:K,disabled:s.unref(Te),count:s.unref(R),init:{page:s.unref(d).page,limit:s.unref(d).limit,pageSizes:s.unref(d).pageSizes}},{left:s.withCtx(()=>[s.renderSlot(A.$slots,"footer",{data:s.unref(P)})]),_:3},8,["disabled","count","init"])):s.createCommentVNode("",!0)]),s.createVNode(tf,{checkAllChange:nt,batch:s.unref(d).batch,tabs:s.unref(D),"tabs-index":s.unref(E),"check-data":s.unref(Me)},null,8,["batch","tabs","tabs-index","check-data"])])],64)}}}),up={name:"input-select",emits:["update:modelValue"],props:{size:{type:String,default:""},group:{type:[Array,Boolean],default:!1},options:{type:Array,default:()=>[[">","大于"],["<","小于"],["=","等于"],["between","范围"]]}},data(){return{placeholder:"输入",value:"",value2:"",value3:[],groupValue:""}},created(){this.value2=this.options[0],this.groupValue=this.group[0],this.$watch("value2",()=>{this.change()}),this.$watch("groupValue",()=>{this.change()})},methods:{change(t){console.log("change",this.value2),this.group?this.$emit("update:modelValue",[this.groupValue[0],this.value2[0],this.value2[0]=="between"?this.value3:this.value]):this.$emit("update:modelValue",[this.value2[0],this.value2[0]=="between"?this.value3:this.value])}}},dp={class:"input-with-select flex pr"},fp={class:"flex justify-center pl",title:"下拉选择"},pp={class:"flex justify-center pl",title:"下拉选择"},hp={key:0,class:"flex pr-sm"};function mp(t,n,r,o,i,a){const l=s.resolveComponent("el-dropdown-item"),c=s.resolveComponent("el-dropdown-menu"),u=s.resolveComponent("el-dropdown"),d=s.resolveComponent("el-input");return s.openBlock(),s.createElementBlock("div",null,[s.createVNode(d,{class:s.normalizeClass(["input-with-select",i.value2[0]==="between"?"input-with-select-in":""]),modelValue:i.value,"onUpdate:modelValue":n[4]||(n[4]=f=>i.value=f),placeholder:i.placeholder,onChange:a.change,clearable:""},{prepend:s.withCtx(()=>[s.createElementVNode("div",dp,[r.group?(s.openBlock(),s.createBlock(u,{key:0,trigger:"click",onCommand:n[0]||(n[0]=f=>{this.groupValue=f})},{dropdown:s.withCtx(()=>[s.createVNode(c,null,{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.group,f=>(s.openBlock(),s.createBlock(l,{command:f},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(f[1]),1)]),_:2},1032,["command"]))),256))]),_:1})]),default:s.withCtx(()=>[s.createElementVNode("div",fp,[s.createElementVNode("span",null,s.toDisplayString(i.groupValue[1]),1),n[5]||(n[5]=s.createElementVNode("i",{class:"i-ri-arrow-down-s-line font-xl op-70"},null,-1))])]),_:1})):s.createCommentVNode("",!0),s.createVNode(u,{trigger:"click",onCommand:n[1]||(n[1]=f=>{this.value2=f})},{dropdown:s.withCtx(()=>[s.createVNode(c,null,{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.options,f=>(s.openBlock(),s.createBlock(l,{command:f},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(f[1]),1)]),_:2},1032,["command"]))),256))]),_:1})]),default:s.withCtx(()=>[s.createElementVNode("div",pp,[s.createElementVNode("span",null,s.toDisplayString(i.value2[1]),1),n[6]||(n[6]=s.createElementVNode("i",{class:"i-ri-arrow-down-s-line font-xl op-70"},null,-1))])]),_:1})])]),append:s.withCtx(()=>[i.value2[0]==="between"?(s.openBlock(),s.createElementBlock("div",hp,[s.createVNode(d,{size:r.size,placeholder:"输入",modelValue:i.value3[0],"onUpdate:modelValue":n[2]||(n[2]=f=>i.value3[0]=f),onChange:a.change},null,8,["size","modelValue","onChange"]),n[7]||(n[7]=s.createElementVNode("span",{class:"px-sm"},"~",-1)),s.createVNode(d,{size:r.size,placeholder:"输入",modelValue:i.value3[1],"onUpdate:modelValue":n[3]||(n[3]=f=>i.value3[1]=f),onChange:a.change},null,8,["size","modelValue","onChange"])])):s.createCommentVNode("",!0)]),_:1},8,["class","modelValue","placeholder","onChange"])])}const gp=ne(up,[["render",mp]]),yp={props:{placeholder:String,size:{type:String,default:""},modelValue:String,list:{type:[Array,Object],default:()=>[]}},data(){return{value:"",lists:[]}},created(){if(this.value=this.modelValue,Array.isArray(this.list))this.list.forEach(t=>{this.lists.push({value:t})});else if(this.list)for(let t in this.list)this.lists.push({label:this.list[t],value:t});this.$watch("value",function(t){this.$emit("update:modelValue",t)})},methods:{querySearch(t,n){const r=i=>a=>a.value.toLowerCase().indexOf(i.toLowerCase())===0,o=t?this.lists.filter(r(t)):this.lists;n(o)}}},bp={class:""},Cp={key:0,class:"pl-sm"};function vp(t,n,r,o,i,a){const l=s.resolveComponent("el-autocomplete");return s.openBlock(),s.createBlock(l,{modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=c=>i.value=c),"fetch-suggestions":a.querySearch,placeholder:r.placeholder||"输入"},{default:s.withCtx(({item:c})=>[s.createElementVNode("span",bp,s.toDisplayString(c.value),1),c.label?(s.openBlock(),s.createElementBlock("span",Cp,s.toDisplayString(c.label),1)):s.createCommentVNode("",!0)]),_:1},8,["modelValue","fetch-suggestions","placeholder"])}const Dp=ne(yp,[["render",vp]]);function zs(t){return t?(typeof t!="string"&&(t=URL.createObjectURL(t)),new Promise((n,r)=>{const o=document.createElement("video");o.src=t,o.setAttribute("crossOrigin","Anonymous");function i(){o.addEventListener("error",function(){n(null)}),o.addEventListener("loadedmetadata",function(){setTimeout(()=>{try{const a=o.videoWidth<750?1:750/o.videoWidth;o.width=parseInt(o.videoWidth*a),o.height=parseInt(o.videoHeight*a),o.currentTime=0,o.addEventListener("seeked",function(){const l=document.createElement("canvas");l.width=o.width,l.height=o.height,l.getContext("2d").drawImage(o,0,0,l.width,l.height),l.toBlob(u=>{const d=new File([u],"video.jpg");o.img=d,n({width:o.videoWidth,height:o.videoHeight,img:d,duration:parseInt(o.duration)})},"image/jpg")},{once:!0})}catch{n(null)}},100)})}window.WeixinJSBridge&&/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?window.WeixinJSBridge.invoke("getNetworkType",{},()=>{o.muted=!0,o.playsInline=!0,o["webkit-playsinline"]=!0,i(),o.play().then(()=>o.pause())}):i()})):Promise.reject("Please upload a video file.")}function wp(t){return t>1024?t/1024>1024?t/(1024*1024)>1024?(t/(1024*1024*1024)).toFixed(2)+"GB":(t/(1024*1024)).toFixed(2)+"MB":(t/1024).toFixed(2)+"KB":t.toFixed(2)+"B"}const $s={},xp={props:{accept:"",type:"",cate:{type:[Number,String],default:0},limit:{type:[Number,String],default:1}},data(){return{file:null,maxSize:1024*1024*1024,multiUploadSize:11*1024*1024,eachSize:10*1024*1024,progress:0,showProgress:!1,eachProgress:0,hashMd5:"",totalSize:0,loadedSize:0,successList:[]}},methods:{beforeUpload(t){if(t.type.indexOf(this.type)==-1)return $msg.error("文件格式错误"),!1;if(t.size>this.maxSize)return $msg.error(`文件不能大于${wp(this.maxSize)}`),!1},onExceed(t){t.length>this.limit&&$msg.error(`最多可以选择${this.limit}个文件`)},async httpRequest(t){const{multiUploadSize:n,splitUpload:r,singleUpload:o}=this,{file:i}=t;this.file=i;const a=this.signUpload;try{await a(i),this.$refs.upload.clearFiles()}catch(l){$msg.error(l),this.$refs.upload.clearFiles(),this.showProgress=!1,this.progress=0}},onUploadProgress(t,n){let r="default";n.get&&(r=n.get("uid")+"-"+n.get("chunk"));let o=$s[r]||0;this.loadedSize=this.loadedSize+t.loaded-o,$s[r]=t.loaded,this.progress=parseInt(this.loadedSize/this.totalSize*100),this.progress=this.progress>100?100:this.progress},async singleUpload(t){this.totalSize=t.size,this.showProgress=!0;let n=await this.postFile({file:t,uid:t.uid,name:t.name,fullSize:t.size,chunk:0,chunks:1});if(n.code==0)this.doSuccess(n);else return $msg.error(t.name+":上传失败")},async signUpload(t){this.totalSize=t.size,this.showProgress=!0;const n={type:this.type,name:t.name,size:t.size},r=await $req.post("upload/sign",n);if(r.code==0)await $req.upload(r.data.url,this.file,{onProgress:this.onUploadProgress}),this.validateFile({url:r.data.name});else return $msg.error(t.name+":授权失败")},async splitUpload(t){return await this.signUpload(t)},postFile(t){const n=new FormData;return n.append("cate",this.cate),n.append("type",this.type),n.append("file",t.file),n.append("chunk",t.chunk),n.append("name",t.name),n.append("uid",t.uid),n.append("chunks",t.chunks),n.append("fullSize",t.fullSize),t.chunk>0&&n.append("md5",t.md5),$req.upload("upload/doChunk",n,{onProgress:this.onUploadProgress,action:"POST"})},async doSuccess(t){if(this.showProgress=!1,this.progress=0,this.file?.type?.startsWith("video")){const n=await this.doVideoExt(t.data);n&&(t.data.extend=n)}this.$emit("success",t.data)},validateFile(t){return t.cate=this.cate,t.type=this.type,$req.post("upload/doChunks",t).then(n=>{n&&n.code==0?this.doSuccess(n):$msg.error(n.msg)})},async doVideoExt(t){const n=this.file,r=await zs(n);if(!r)return null;const o=new FormData;o.append("file",r.img),o.append("id",t.id),o.append("url",t.url),o.append("height",r.height),o.append("width",r.width),o.append("size",n.size),o.append("duration",r.duration);const i=await $req.upload("upload/doVideoExt",o);return this.file=null,i.code==0?i.data:null}}},Bp={class:"flex justify-center py"},kp={class:"flex flex-col justify-center w-full"},Ep={class:""},_p={class:""};function Ap(t,n,r,o,i,a){const l=s.resolveComponent("el-upload"),c=s.resolveComponent("el-progress"),u=s.resolveComponent("el-dialog");return s.openBlock(),s.createElementBlock("div",null,[s.createVNode(l,{class:"flex items-center",ref:"upload",onExceed:a.onExceed,"show-file-list":!1,accept:r.accept,multiple:r.limit!=1,"before-upload":a.beforeUpload,"http-request":a.httpRequest,limit:r.limit,action:"/",disabled:i.showProgress},{default:s.withCtx(()=>[s.renderSlot(t.$slots,"default")]),_:3},8,["onExceed","accept","multiple","before-upload","http-request","limit","disabled"]),s.createVNode(u,{"append-to-body":"","show-close":!1,"close-on-click-modal":!1,title:"正在上传",modelValue:i.showProgress,"onUpdate:modelValue":n[0]||(n[0]=d=>i.showProgress=d),width:"50%"},{default:s.withCtx(()=>[s.createElementVNode("div",Bp,[i.showProgress?(s.openBlock(),s.createBlock(c,{key:0,type:"circle",percentage:i.progress},{default:s.withCtx(({percentage:d})=>[s.createElementVNode("div",kp,[s.createElementVNode("span",Ep,s.toDisplayString(d)+"%",1),s.createElementVNode("span",_p,s.toDisplayString(d==100?"验证文件...":"上传中..."),1)])]),_:1},8,["percentage"])):s.createCommentVNode("",!0)])]),_:1},8,["modelValue"])])}const Is=ne(xp,[["render",Ap]]),Np={props:{type:{type:String,default:""},cate:{type:Number,default:0}},data(){return{cateCount:0,loading:!0,limit:50,page:1,cateId:0,cates:[]}},created(){this.cate&&(this.cateId=this.cate),$req.post($config.apis.media_box.cate,{type:this.type,limit:this.limit}).then(t=>{t.code==0&&t.data&&(console.log(t),this.cates=t.data,this.cateCount=t.count,this.loading=!1)})},methods:{cateEdit(t,n){$prompt(!1,"修改分组",{inputValue:n.title}).then(r=>{r.value!=n.title&&r.value&&$req.post($config.apis.media_box.cateEdit,{id:n.id,title:r.value}).then(o=>{o.code==0?(this.cates[t].title=r.value,this.$msg.success("修改成功")):this.$msg.error(o.msg)})})},cateDel(t,n){let r=this;this.$confirm(`确定要删除分组[${n.title}]吗?`,"删除分组").then(o=>{r.$req.post($config.apis.media_box.cateDel,{id:n.id}).then(i=>{i.code==0?(r.cates.splice(t,1),r.$msg.success("删除成功")):r.$msg.error(i.msg)})})},cateAdd(){$prompt(!1,"添加分组").then(t=>{t.value&&$req.post($config.apis.media_box.cateAdd,{title:t.value,type:this.type}).then(n=>{n.code==0?(this.cates.push(n.data),$msg.success("添加成功")):$msg.error(n.msg)})})},cateTab(t){this.cateId=t,this.$emit("change",t)},addCount(t=1){const n=this.cateId;this.cates.forEach(r=>{(r.id==n||r.id==0)&&(r.count=r.count+t)})},cateChange(t){this.cates=[],$req.post($config.apis.media_box.cate,{type:this.type,page:t,limit:this.limit}).then(n=>{n.code==0&&n.data&&(this.cates=n.data,this.cateCount=n.count)})}}},Sp={class:"dir-list"},Fp={class:"title"},Vp={key:0,style:{"margin-left":"-10px","margin-bottom":"10px"}},Op={class:"item"},Tp=["onClick"],jp={class:"left"},Pp={key:0,class:"tool"},Lp=["onClick"],Mp=["onClick"];function zp(t,n,r,o,i,a){const l=s.resolveComponent("el-pagination"),c=s.resolveComponent("el-tag"),u=s.resolveComponent("el-scrollbar"),d=s.resolveDirective("loading");return s.openBlock(),s.createElementBlock("div",Sp,[s.createElementVNode("div",Fp,[n[2]||(n[2]=s.createElementVNode("span",{class:"flex items-center"},[s.createElementVNode("i",{class:"i-ri-folders-line",style:{"padding-right":"4px"}}),s.createTextVNode("分组")],-1)),s.createElementVNode("span",{class:"flex",onClick:n[0]||(n[0]=f=>a.cateAdd())},[...n[1]||(n[1]=[s.createElementVNode("i",{class:"i-ri-add-line"},null,-1)])])]),i.cateCount>i.limit?(s.openBlock(),s.createElementBlock("div",Vp,[s.createVNode(l,{small:"",layout:"prev,pager,next","pager-count":5,total:i.cateCount,"page-size":i.limit,onCurrentChange:a.cateChange},null,8,["total","page-size","onCurrentChange"])])):s.createCommentVNode("",!0),s.withDirectives((s.openBlock(),s.createBlock(u,{style:{height:"500px"}},{default:s.withCtx(()=>[s.createElementVNode("div",Op,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cates,(f,p)=>(s.openBlock(),s.createElementBlock("div",{onClick:h=>a.cateTab(f.id),class:s.normalizeClass(i.cateId==f.id?"on":"")},[s.createElementVNode("span",jp,[s.createTextVNode(s.toDisplayString(f.title),1),f.is_sys==1?(s.openBlock(),s.createBlock(c,{key:0,size:"small"},{default:s.withCtx(()=>[...n[3]||(n[3]=[s.createTextVNode("系统",-1)])]),_:1})):s.createCommentVNode("",!0)]),f.is_sys==0?(s.openBlock(),s.createElementBlock("span",Pp,[s.createElementVNode("span",{onClick:h=>a.cateEdit(p,f)},"编辑",8,Lp),s.createElementVNode("span",{onClick:h=>a.cateDel(p,f)},"删除",8,Mp)])):s.createCommentVNode("",!0)],10,Tp))),256))])]),_:1})),[[d,i.loading]])])}const $p={name:"media-box",components:{BigUpload:Is,FileMenu:ne(Np,[["render",zp],["__scopeId","data-v-91c7ea1a"]])},props:{type:String,sum:{type:Number,default:1},cate:{type:Number,default:0}},data(){return{showImageViewer:!1,fileType:"video",videoShow:!1,videoUrl:"",videoBg:"",imageList:[],action:!1,limit:24,count:0,page:1,cateId:0,name:"",list:[],onList:[],onImgs:[]}},computed:{accept(){return this.fileType+"/*"},typeName(){return{video:"视频",audio:"音频",image:"图片",file:"文件"}[this.fileType]},canSum(){return this.action?20:this.sum}},created(){this.cate&&(this.cateId=this.cate),this.type&&(this.fileType=this.type),this.getList()},methods:{async command(t){if(t==="url"){const{value:n}=await this.$prompt(!1,`输入${this.typeName}链接`,{inputValue:"",inputPattern:/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/[\S]*)*\/?$/i,inputErrorMessage:"链接格式错误"});n&&await this.doAdd(n)}},async doAdd(t){const n=new FormData;if(this.fileType==="video"){const o=await zs(t);if(o)n.append("img",o.img),n.append("height",o.height),n.append("width",o.width),n.append("duration",o.duration);else return $msg.error("视频格式错误或视频不支持在你的网站播放")}n.append("url",t),n.append("type",this.fileType),n.append("dir",this.cateId),n.append("size",0);const r=await $req.upload("upload/doAdd",n);if(r.code==0)this.list.unshift(r.data),this.$refs.fileMenu.addCount(),$msg.success(data.name+":上传成功");else return $msg.error(r.msg),null},openFile(t){t.type=="image"?this.viewImg(t.url):this.videoPlay(t.url)},viewImg(t){this.imageList=[$fileUrl(t)],this.showImageViewer=!0},videoPlay(t=""){this.videoShow=!0,this.videoUrl=t},getDetail(){const t=this.onList;return this.list.filter(n=>t.indexOf(n.id)>-1)},getData(){if(this.action)return"请退出管理模式,再选择"+this.typeName;let t=JSON.parse(JSON.stringify(this.onImgs));return this.fnCancelCheck(),t},menuChange(t){this.cateId=t,this.name="",this.getList()},pageChange(t){this.page=t,this.getList()},getList(){$req.post($config.apis.media_box.list,{page:this.page,limit:24,dir:this.cateId,type:this.fileType,name:this.name}).then(t=>{t.data?.data&&(t=t.data),this.name&&(!t.data||t.data.length==0)&&$msg.info("没有搜索结果"),this.list=t.data,this.count=t.count})},fnAction(){this.action=!this.action,this.action||this.fnCancelCheck()},fnCancelCheck(){this.onList=[],this.onImgs=[],this.action=!1},doName(t,n){let r=this;this.$prompt(!1,"重命名",{inputValue:n.name}).then(o=>{o.value!=n.name&&o.value&&$req.post($config.apis.media_box.edit,{id:n.id,name:o.value}).then(i=>{i.code==0?(r.list[t].name=o.value,r.$msg.success(i.msg)):r.$msg.error(i.msg)})})},doDel(t,n){$req.post($config.apis.media_box.del,{id:n.id}).then(r=>{r.code==0?(this.list.splice(t,1),this.$refs.fileMenu.addCount(-1),$msg.success(r.msg)):$msg.error(r.msg)})},doDels(){let t=this;if(this.onList.length==0)return this.$msg.error("请选择"+typeName);$req.post($config.apis.media_box.del,{id:this.onList}).then(n=>{n.code==0?(t.onList.forEach(r=>{let o=t.list.findIndex(i=>i.id==r);t.list.splice(o,1)}),t.$refs.fileMenu.addCount(-this.onList.length),t.onList=[],t.onImgs=[],$msg.success(n.msg)):$msg.error(n.msg)})},doSearch(){$prompt(!1,"搜索"+this.typeName,{inputPlaceholder:"输入文件名称或关键词",confirmButtonText:"搜索"}).then(t=>{t.value&&t.value&&(this.name=t.value,this.getList())})},getCheck(t){return this.onList.indexOf(t)>-1},fnCheck(t,n,r){if(t){if(this.canSum<=this.onList.length)return this.$msg.error(`最多可以选择${this.sum}个${this.typeName}`);this.onList.push(n),this.onImgs.push(r)}else $a.array.remove(this.onList,n),$a.array.remove(this.onImgs,r)},onSuccess(t){t?(this.list.unshift(t),this.$refs.fileMenu.addCount(),this.$msg.success(t.name+":上传成功")):this.$msg.error(t.name+"上传失败:"+e.msg)}}},Ip=["src"],Rp={class:"dialog-footer"},Hp={class:"imgs-top flex justify-between pb-sm"},Up={class:"flex text-3"},Wp={key:1,class:"ml-xl flex"},qp={class:"flex"},Kp={class:"mr"},Jp={key:0,class:"mr"},Gp={class:"mr"},Yp={class:"flex items-center"},Zp={class:"file-box-body"},Xp={class:"list"},Qp={key:0,class:"no-file"},eh={class:"add"},th={key:0,class:"number"},nh={class:"box-bg"},rh=["onClick"],oh={key:0,class:"i-ri-eye-line"},ih={key:1,class:"i-ri-play-fill"},sh={key:4,class:"type-name flex-inline items-center gap-1"},ah={key:0,class:"i-ri-link pr-xs2"},lh=["title","onClick"],ch={class:"pages"};function uh(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("el-dialog"),u=s.resolveComponent("el-text"),d=s.resolveComponent("BigUpload"),f=s.resolveComponent("el-dropdown-item"),p=s.resolveComponent("el-dropdown-menu"),h=s.resolveComponent("el-dropdown"),m=s.resolveComponent("file-menu"),g=s.resolveComponent("el-link"),y=s.resolveComponent("el-checkbox"),v=s.resolveComponent("a-image"),D=s.resolveComponent("el-col"),w=s.resolveComponent("el-row"),b=s.resolveComponent("el-pagination"),x=s.resolveComponent("el-image-viewer");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",null,[s.createVNode(c,{modelValue:i.videoShow,"onUpdate:modelValue":n[1]||(n[1]=k=>i.videoShow=k),title:a.typeName,width:"600px",top:"15vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",Rp,[s.createVNode(l,{size:"small",onClick:n[0]||(n[0]=k=>i.videoShow=!1)},{default:s.withCtx(()=>[...n[5]||(n[5]=[s.createTextVNode("关闭",-1)])]),_:1})])]),default:s.withCtx(()=>[i.videoUrl&&i.videoShow?(s.openBlock(),s.createElementBlock("video",{key:0,src:t.$fileUrl(i.videoUrl),controls:"",style:s.normalizeStyle(`height:${{video:"400px",audio:"100px"}[this.fileType]};width: 100%;`)},null,12,Ip)):s.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),s.createElementVNode("div",Hp,[s.createElementVNode("div",Up,[n[8]||(n[8]=s.createTextVNode(" 已选择",-1)),s.createVNode(u,{class:"px-xs",type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.onList.length),1)]),_:1}),s.createTextVNode("个 最多可选择"+s.toDisplayString(a.canSum)+"个 ",1),i.onList.length?(s.openBlock(),s.createBlock(u,{key:0,class:"pl-xs",size:"small",type:"primary",onClick:n[2]||(n[2]=k=>a.fnCancelCheck())},{default:s.withCtx(()=>[...n[6]||(n[6]=[s.createTextVNode("取消选择",-1)])]),_:1})):s.createCommentVNode("",!0),i.name?(s.openBlock(),s.createElementBlock("div",Wp,[s.createElementVNode("span",null,"搜索关键词:"+s.toDisplayString(i.name),1),s.createVNode(u,{class:"pl-xs",type:"primary",size:"small",onClick:n[3]||(n[3]=k=>a.menuChange(i.cateId))},{default:s.withCtx(()=>[...n[7]||(n[7]=[s.createTextVNode("返回",-1)])]),_:1})])):s.createCommentVNode("",!0)]),s.createElementVNode("div",qp,[s.createElementVNode("div",Kp,[s.createVNode(l,{type:"",onClick:a.fnAction},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.action?"退出管理":"管理"),1)]),_:1},8,["onClick"])]),i.action?(s.openBlock(),s.createElementBlock("div",Jp,[s.createVNode(l,{type:i.onImgs.length==0?"":"danger",disabled:i.onImgs.length==0,onClick:a.doDels},{default:s.withCtx(()=>[...n[9]||(n[9]=[s.createTextVNode("批量删除",-1)])]),_:1},8,["type","disabled","onClick"])])):s.createCommentVNode("",!0),s.createElementVNode("div",Gp,[s.createVNode(l,{onClick:a.doSearch,type:"primary"},{default:s.withCtx(()=>[...n[10]||(n[10]=[s.createElementVNode("span",{class:"flex"},[s.createElementVNode("i",{class:"i-ri-search-line"}),s.createElementVNode("span",null,"搜索")],-1)])]),_:1},8,["onClick"])]),s.createVNode(h,{"split-button":"",type:"primary",onCommand:a.command},{dropdown:s.withCtx(()=>[s.createVNode(p,null,{default:s.withCtx(()=>[s.createVNode(f,{command:"url"},{default:s.withCtx(()=>[s.createTextVNode("通过链接添加"+s.toDisplayString(a.typeName),1)]),_:1})]),_:1})]),default:s.withCtx(()=>[s.createVNode(d,{accept:a.accept,type:i.fileType,cate:i.cateId,onSuccess:a.onSuccess,limit:r.sum},{default:s.withCtx(()=>[s.createElementVNode("span",Yp,[n[11]||(n[11]=s.createElementVNode("i",{class:"i-ri-upload-cloud-2-line"},null,-1)),s.createElementVNode("span",null,"上传"+s.toDisplayString(a.typeName),1)])]),_:1},8,["accept","type","cate","onSuccess","limit"])]),_:1},8,["onCommand"])])]),s.createElementVNode("div",Zp,[s.createVNode(m,{class:"bg-main-100",ref:"fileMenu",type:r.type,cate:i.cateId,onChange:a.menuChange},null,8,["type","cate","onChange"]),s.createElementVNode("div",Xp,[i.list.length==0?(s.openBlock(),s.createElementBlock("div",Qp,[n[13]||(n[13]=s.createElementVNode("div",{class:"op-50"},[s.createElementVNode("i",{class:"i-ri-folder-upload-line size-20"})],-1)),s.createElementVNode("div",eh,[s.createElementVNode("span",null,"暂无"+s.toDisplayString(a.typeName)+",",1),s.createVNode(d,{accept:a.accept,type:i.fileType,cate:i.cateId,onSuccess:a.onSuccess,limit:r.sum},{default:s.withCtx(()=>[s.createVNode(g,{type:"primary"},{default:s.withCtx(()=>[...n[12]||(n[12]=[s.createTextVNode("点击添加",-1)])]),_:1})]),_:1},8,["accept","type","cate","onSuccess","limit"])])])):s.createCommentVNode("",!0),s.createVNode(w,{gutter:12},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(k,E)=>(s.openBlock(),s.createBlock(D,{span:4},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["item",i.onList.indexOf(k.id)>-1?"on":""]),style:{"background-color":"url #f5f7fa"}},[(s.openBlock(),s.createBlock(y,{disabled:i.onList.length>=a.canSum&&!a.getCheck(k.id),key:i.onList.length+""+k.id,checked:a.getCheck(k.id),onChange:B=>{this.fnCheck(B,k.id,k.url)},class:"check"},null,8,["disabled","checked","onChange"])),i.onList.indexOf(k.id)>-1?(s.openBlock(),s.createElementBlock("div",th,s.toDisplayString(i.onList.indexOf(k.id)+1),1)):s.createCommentVNode("",!0),s.createElementVNode("div",nh,[s.createElementVNode("i",{class:s.normalizeClass({video:"ri-movie-2-line",audio:"ri-disc-line"}[i.fileType])},null,2)]),i.fileType=="video"&&k?.extend?.img?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["img",{mask:i.action}])},[s.createVNode(v,{src:k.extend.img},null,8,["src"])],2)):i.fileType=="image"?(s.openBlock(),s.createElementBlock("div",{key:2,class:s.normalizeClass(["img",{mask:i.action}])},[(s.openBlock(),s.createBlock(v,{src:k.url,key:k.id,process:"100"},null,8,["src"]))],2)):s.createCommentVNode("",!0),i.onList.indexOf(k.id)==-1?(s.openBlock(),s.createElementBlock("div",{key:3,onClick:B=>a.openFile(k),class:"view",title:"播放"},[k.type=="image"?(s.openBlock(),s.createElementBlock("i",oh)):(s.openBlock(),s.createElementBlock("i",ih))],8,rh)):s.createCommentVNode("",!0),k.file_type?(s.openBlock(),s.createElementBlock("div",sh,[k.url?.startsWith("http")?(s.openBlock(),s.createElementBlock("span",ah)):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(k.file_type),1)])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:"name line-1",title:k.name,onClick:B=>a.doName(E,k)},[s.createElementVNode("span",null,s.toDisplayString(k.name||"未命名"),1)],8,lh)],2)]),_:2},1024))),256))]),_:1})])]),s.createElementVNode("div",ch,[s.createVNode(b,{background:"",layout:"total,prev, pager,next",total:i.count,"page-size":i.limit,onCurrentChange:a.pageChange},null,8,["total","page-size","onCurrentChange"])])]),i.showImageViewer?(s.openBlock(),s.createBlock(x,{key:0,onClose:n[4]||(n[4]=k=>i.showImageViewer=!1),"url-list":i.imageList},null,8,["url-list"])):s.createCommentVNode("",!0)],64)}const sr=ne($p,[["render",uh],["__scopeId","data-v-bfa07b7d"]]),dh={components:{imgBox:sr},props:{size:{type:[Number,String],default:0},limit:{type:Number,default:5},cateId:{type:Number,default:0},tips:String,modelValue:Array|String,disabled:Boolean},data(){return{_disabled:!1,style:{width:"100px",height:"100px"},imgShow:!1,list:[]}},created(){if(this._disabled=this.$parent.disabled?!0:this.disabled,this.size){let t=this.size;typeof t=="string"&&(t={small:60,mini:40}[t]||100),t&&(this.style={width:t+"px",height:t+"px",fontSize:t+"px"})}this.modelValue&&(this.list=this.modelValue),this.$watch("list",function(t){this.$emit("update:modelValue",t)},{deep:!0})},methods:{del(t){this.list.splice(t,1)},add(){let t=this.$refs.imgbox.getData();if(typeof t=="string")return this.$msg.error(t);if(t.length==0)return this.$msg.error("请选择图片");this.list=this.list.concat(t),this.imgShow=!1}}},fh={class:"dialog-footer"},ph={class:"input-imgs"},hh=["onClick"],mh={class:"text-12px pt-xs op-50"},gh={key:0,class:"pl-sm color-primary"};function yh(t,n,r,o,i,a){const l=s.resolveComponent("img-box"),c=s.resolveComponent("el-button"),u=s.resolveComponent("el-dialog"),d=s.resolveComponent("a-image"),f=s.resolveComponent("a-draggable");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(u,{modelValue:i.imgShow,"onUpdate:modelValue":n[1]||(n[1]=p=>i.imgShow=p),title:"选择图片",width:"1080px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",fh,[s.createVNode(c,{onClick:n[0]||(n[0]=p=>i.imgShow=!1)},{default:s.withCtx(()=>[...n[3]||(n[3]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(c,{type:"primary",onClick:a.add},{default:s.withCtx(()=>[...n[4]||(n[4]=[s.createTextVNode("确认",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(l,{ref:"imgbox",type:"image",sum:r.limit-i.list.length,cate:r.cateId},null,8,["sum","cate"])]),_:1},8,["modelValue"]),s.createElementVNode("div",ph,[s.createVNode(f,{disabled:i._disabled,class:"list flex flex-wrap gap-sm",list:i.list,filter:".add"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(p,h)=>(s.openBlock(),s.createElementBlock("div",{class:"item",style:s.normalizeStyle(i.style),key:p},[s.createVNode(d,{preview:i.list,index:h,fit:"contain",src:p,process:"100"},null,8,["preview","index","src"]),s.withDirectives(s.createElementVNode("div",{class:"del",onClick:m=>a.del(h)},[...n[5]||(n[5]=[s.createElementVNode("i",{class:"i-ri-close-line"},null,-1)])],8,hh),[[s.vShow,!i._disabled]])],4))),128)),i.list.length<r.limit?s.withDirectives((s.openBlock(),s.createElementBlock("div",{key:0,class:"flex flex-col justify-center items-center text-100px size-100px add",style:s.normalizeStyle(i.style),onClick:n[2]||(n[2]=p=>i.imgShow=!0)},[...n[6]||(n[6]=[s.createElementVNode("i",{class:"i-ri-image-add-line"},null,-1),s.createElementVNode("span",null,"添加图片",-1)])],4)),[[s.vShow,!i._disabled]]):s.createCommentVNode("",!0)]),_:1},8,["disabled","list"]),s.withDirectives(s.createElementVNode("div",mh,[s.createTextVNode("拖拽可调整图片顺序,最多可上传"+s.toDisplayString(r.limit)+"张",1),r.tips?(s.openBlock(),s.createElementBlock("span",gh,"("+s.toDisplayString(r.tips)+")",1)):s.createCommentVNode("",!0)],512),[[s.vShow,!i._disabled]])])],64)}const Rs=ne(dh,[["render",yh],["__scopeId","data-v-8f11d9a0"]]),bh={emits:["clear","update:modelValue"],props:{btn:{type:Object,default:()=>({})},placeholder:{type:String,default:"输入"},readonly:Boolean,disabled:{type:[String,Boolean,Number],default:!1},clearable:{type:Boolean,default:!1},icon:{type:String,default:""},size:{type:String,default:""},props:Object,modelValue:{type:[String,Boolean,Number,Array],default:""}},data(){return{value:""}},watch:{modelValue(t){this.value=t}},created(){this.value=this.modelValue},methods:{async doClick(){if(this.disabled)return;const t=await this.btn.click(this.value);t!==void 0&&(this.value=t,this.$emit("update:modelValue",this.value))},async setValue(t){this.disabled||(this.value=t,this.$emit("update:modelValue",t))},async doClear(){this.$emit("clear"),this.$emit("update:modelValue",null)}}},Ch={class:"input-button"};function vh(t,n,r,o,i,a){const l=s.resolveComponent("el-input"),c=s.resolveComponent("el-button");return s.openBlock(),s.createElementBlock("div",Ch,[s.createVNode(l,s.mergeProps({size:r.size,clearable:r.clearable,onClear:a.doClear},r.props,{readonly:r.readonly,onChange:n[1]||(n[1]=u=>t.$emit("update:modelValue",u)),modelValue:i.value,"onUpdate:modelValue":n[2]||(n[2]=u=>i.value=u),placeholder:r.placeholder,disabled:!!r.disabled}),{prefix:s.withCtx(()=>[s.createElementVNode("i",{class:s.normalizeClass(r.icon)},null,2)]),suffix:s.withCtx(()=>[i.value&&r.readonly&&r.clearable?(s.openBlock(),s.createElementBlock("i",{key:0,onClick:n[0]||(n[0]=s.withModifiers(u=>a.doClear(),["stop"])),class:"i-ri-delete-bin-7-line font-md hover:color-red",title:"清空输入框"})):s.createCommentVNode("",!0)]),_:1},16,["size","clearable","onClear","readonly","modelValue","placeholder","disabled"]),s.createVNode(c,{size:r.size,class:"h-full",disabled:!!r.disabled,type:"primary",onClick:n[3]||(n[3]=u=>a.doClick())},{default:s.withCtx(()=>[r.btn.icon?(s.openBlock(),s.createElementBlock("i",{key:0,class:s.normalizeClass(["mr-xs",r.btn.icon])},null,2)):s.createCommentVNode("",!0),s.createTextVNode(" "+s.toDisplayString(r.btn.text),1)]),_:1},8,["size","disabled"])])}const Vo=ne(bh,[["render",vh]]),Dh={emits:["update:modelValue"],props:{modelValue:String},data(){return{list:[],url:""}},created(){this.url=this.modelValue,this.list=$config.urlBox.default},methods:{fnClick(t){this.url=t.url,this.$emit("update:modelValue",this.url)}}},wh={class:"list"},xh={class:"py"},Bh=["onClick"];function kh(t,n,r,o,i,a){const l=s.resolveComponent("el-col"),c=s.resolveComponent("el-row");return s.openBlock(),s.createElementBlock("div",wh,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,u=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",xh,s.toDisplayString(u.title),1),s.createVNode(c,{gutter:12},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.list,d=>(s.openBlock(),s.createBlock(l,{span:4},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["item click border p-sm flex items-center justify-center gap-1 hover:bg-primary-100",i.url==d.url?"bg-primary text-white":""]),onClick:f=>a.fnClick(d)},[n[0]||(n[0]=s.createElementVNode("i",{class:"i-ri-link"},null,-1)),s.createTextVNode(" "+s.toDisplayString(d.title),1)],10,Bh)]),_:2},1024))),256))]),_:2},1024)],64))),256))])}const Eh=ne(Dh,[["render",kh],["__scopeId","data-v-26dc73dc"]]),_h={emits:["update:modelValue"],props:{modelValue:String},data(){return{cateId:"goods",table:{},url:""}},watch:{url(t){this.$emit("update:modelValue",t)}},created(){this.url=this.modelValue,this.table={url:"goods",title:!1,where:{status:1},limit:10,serachClass:"w-600px mx-auto pl-100px pt-md! pb-0!",search:{span:{span:12},gutter:0,btn:{text:"搜索",align:"right",reset:!1},cols:[{field:"title",placeholder:"输入商品标题或ID"}]},cols:[{field:"title",title:"商品标题"},{field:"id",title:"商品ID",width:200},{field:"action",title:"选择",width:150,slot:!0}]}},methods:{fnClick(t){this.url=this.formatUrl(t)},formatUrl(t){return $config.urlBox?.goods?.valueFormat?$config.urlBox.goods.valueFormat(t):[this.cateId,t.url,t.title]},getData(){return this.url}}},Ah={style:{"--main-height":"calc(75vh + 36px)"}};function Nh(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("admin-table");return s.openBlock(),s.createElementBlock("div",Ah,[s.createVNode(c,{init:i.table},{"cols.action":s.withCtx(({row:u})=>[i.url==a.formatUrl(u)?(s.openBlock(),s.createBlock(l,{key:0,size:"small",type:"primary",disabled:""},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("已选",-1)])]),_:1})):(s.openBlock(),s.createBlock(l,{key:1,size:"small",type:"primary",onClick:d=>a.fnClick(u)},{default:s.withCtx(()=>[...n[1]||(n[1]=[s.createTextVNode("选择",-1)])]),_:1},8,["onClick"]))]),_:1},8,["init"])])}const Sh=ne(_h,[["render",Nh]]),Fh={emits:["update:modelValue"],props:{modelValue:String},data(){return{cateId:"goodsCate",table:{},url:""}},watch:{url(t){this.$emit("update:modelValue",t)}},created(){this.url=this.modelValue,this.table={url:"goodsCate",title:!1,page:!1,tree:!0,cols:[{field:"title",title:"分类名称"},{field:"id",title:"分类ID",width:300},{field:"action",title:"选择",width:150,slot:!0}]}},methods:{fnClick(t){this.url=this.formatUrl(t)},formatUrl(t){return $config.urlBox?.goodsCate?.valueFormat?$config.urlBox.goodsCate.valueFormat(t):[this.cateId,t.url,t.title]},getData(){return this.url}}};function Vh(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("admin-table");return s.openBlock(),s.createBlock(c,{init:i.table},{"cols.action":s.withCtx(({row:u})=>[i.url==a.formatUrl(u)?(s.openBlock(),s.createBlock(l,{key:0,size:"small",type:"primary",disabled:""},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("已选",-1)])]),_:1})):(s.openBlock(),s.createBlock(l,{key:1,size:"small",type:"primary",onClick:d=>a.fnClick(u)},{default:s.withCtx(()=>[...n[1]||(n[1]=[s.createTextVNode("选择",-1)])]),_:1},8,["onClick"]))]),_:1},8,["init"])}const Oh=ne(Fh,[["render",Vh]]),Th={emits:["update:modelValue"],props:{modelValue:String},data(){return{cateId:"article",table:{},url:""}},watch:{url(t){this.$emit("update:modelValue",t)}},created(){this.url=this.modelValue,this.table={url:"article",title:!1,limit:10,serachClass:"w-600px mx-auto pl-100px pt-md! pb-0!",search:{span:{span:12},gutter:0,btn:{text:"搜索",align:"right",reset:!1},cols:[{field:"title",placeholder:"输入文章标题或关键词"}]},cols:[{field:"title",title:"文章标题"},{field:"id",title:"文章ID",width:200},{field:"action",title:"选择",width:150,slot:!0}]}},methods:{fnClick(t){this.url=this.formatUrl(t)},formatUrl(t){return $config.urlBox?.article?.valueFormat?$config.urlBox.article.valueFormat(t):[this.cateId,t.url,t.title]},getData(){return this.url},fnDir(t){this.cateId=t}}},jh={style:{"--main-height":"calc(75vh + 36px)"}};function Ph(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("admin-table");return s.openBlock(),s.createElementBlock("div",jh,[s.createVNode(c,{init:i.table},{"cols.action":s.withCtx(({row:u})=>[i.url==a.formatUrl(u)?(s.openBlock(),s.createBlock(l,{key:0,size:"small",type:"primary",disabled:""},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("已选",-1)])]),_:1})):(s.openBlock(),s.createBlock(l,{key:1,size:"small",type:"primary",onClick:d=>a.fnClick(u)},{default:s.withCtx(()=>[...n[1]||(n[1]=[s.createTextVNode("选择",-1)])]),_:1},8,["onClick"]))]),_:1},8,["init"])])}const Lh=ne(Th,[["render",Ph]]),Mh={props:{modelValue:String|Array,url:String|Array},data(){return{value:""}},created(){typeof this.modelValue=="string"&&this.modelValue.indexOf("┆┊")===-1&&(this.value=this.modelValue)},methods:{update(t){this.$emit("update:modelValue",this.value)}}},zh={class:"pxl mxl flex justify-center"},$h={style:{width:"500px"}};function Ih(t,n,r,o,i,a){const l=s.resolveComponent("el-input");return s.openBlock(),s.createElementBlock("div",zh,[s.createElementVNode("div",$h,[s.createVNode(l,{placeholder:"输入链接",modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=c=>i.value=c),onInput:a.update},{prefix:s.withCtx(()=>[...n[1]||(n[1]=[s.createElementVNode("i",{class:"i-ri-link-m",style:{color:"#D9D9D9"}},null,-1)])]),_:1},8,["modelValue","onInput"])])])}const Rh=ne(Mh,[["render",Ih]]),Hh={emits:["update:modelValue"],props:{table:Object,id:String,valueFormat:Function,modelValue:String},data(){return{url:""}},watch:{url(t){this.$emit("update:modelValue",t)}},created(){this.url=this.modelValue},methods:{fnClick(t){this.url=this.formatUrl(t)},formatUrl(t){return this.valueFormat?this.valueFormat(t):this.id+"/"+t.id},getData(){return this.url}}},Uh={style:{"--main-height":"calc(75vh + 36px)"}};function Wh(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("admin-table");return s.openBlock(),s.createElementBlock("div",Uh,[r.table?(s.openBlock(),s.createBlock(c,{key:0,init:r.table},{"cols.action":s.withCtx(({row:u})=>[i.url==a.formatUrl(u)?(s.openBlock(),s.createBlock(l,{key:0,size:"small",type:"primary",disabled:""},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("已选",-1)])]),_:1})):(s.openBlock(),s.createBlock(l,{key:1,size:"small",type:"primary",onClick:d=>a.fnClick(u)},{default:s.withCtx(()=>[...n[1]||(n[1]=[s.createTextVNode("选择",-1)])]),_:1},8,["onClick"]))]),_:1},8,["init"])):s.createCommentVNode("",!0)])}const qh=ne(Hh,[["render",Wh]]),Kh={name:"url-box",emits:["change"],props:{modelValue:String},data(){return{cateId:"Base",cate:[],cateHistory:["Base"],url:""}},watch:{url(t){this.$emit("change",t)}},created(){const t=[{title:"预设页面",id:"Base",component:s.markRaw(Eh),show:$config.urlBox?.default},{title:"商品分类",id:"GoodsCate",component:s.markRaw(Oh),show:$config.urlBox?.goodsCate!==!1},{title:"商品链接",id:"Goods",component:s.markRaw(Sh),show:$config.urlBox?.goods!==!1},{title:"文章链接",id:"Article",component:s.markRaw(Lh),show:$config.urlBox?.article!==!1},{title:"自定义链接",id:"Diy",component:s.markRaw(Rh),show:$config.urlBox?.diy!==!1}];$config.urlBox?.list&&t.push(...$config.urlBox.list.map(n=>({component:s.markRaw(qh),show:n.show??!0,title:n.title,id:n.id,props:{id:n.id,table:n.table,valueFormat:n.valueFormat}}))),this.cate=t.filter(n=>n.show),this.url=this.url2str(this.modelValue)},methods:{url2str(t){let n="";if(t&&(typeof t=="string"&&t.indexOf("┆┊")>-1?t=t.split("┆┊"):n=t),t&&typeof t=="object"){let r=t[0];r=="goods"?n="[商品]"+t[2]:r=="goodsCate"?n="[商品分类]"+t[2]:r=="article"?n="[文章]"+t[2]:t[2]=="base"&&(n=t[2])}return n},getData(){return this.url},doTab(t){this.cateId=this.cate[t.index].id,this.cateHistory.indexOf(this.cateId)===-1&&this.cateHistory.push(this.cateId)}}},Jh={class:""},Gh={class:"pl-xs"};function Yh(t,n,r,o,i,a){const l=s.resolveComponent("el-tab-pane"),c=s.resolveComponent("el-tabs");return s.openBlock(),s.createElementBlock("div",Jh,[s.createVNode(c,{"tab-position":"left",onTabClick:a.doTab,style:{height:"100%"}},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cate,u=>(s.openBlock(),s.createBlock(l,{label:u.title},{default:s.withCtx(()=>[s.createElementVNode("div",Gh,[i.cateHistory.indexOf(u.id)>-1?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(u.component),s.mergeProps({key:0,ref_for:!0},u.props??{},{modelValue:i.url,"onUpdate:modelValue":n[0]||(n[0]=d=>i.url=d)}),null,16,["modelValue"])):s.createCommentVNode("",!0)])]),_:2},1032,["label"]))),256))]),_:1},8,["onTabClick"])])}const Hs=ne(Kh,[["render",Yh]]),Zh={emits:["update:modelValue","change"],components:{inputButton:Vo,urlBox:Hs},props:{size:String,modelValue:String},data(){return{show:!1,value:null}},computed:{inputUrl(){return this.url2str(this.modelValue)},url(){return this.url2str(this.value)}},created(){this.modelValue&&(this.value=this.modelValue)},methods:{close(){this.show=!1},change(t){this.value=t},url2str(t){let n="";if(t&&(typeof t=="string"&&t.indexOf("┆┊")>-1?t=t.split("┆┊"):n=t),t&&typeof t=="object"){let r=t[0];r=="goods"?n="[商品]"+t[2]:r=="goodsCate"?n="[商品分类]"+t[2]:r=="article"?n="[文章]"+t[2]:t[2]=="base"&&(n=t[2])}return n},update(){this.$emit("update:modelValue",this.value)},getData(){let t=this.$refs.urlbox.getData();t&&(this.value=t,this.update()),this.show=!1}}},Xh={style:{height:"75vh"}},Qh={class:"dialog-footer flex items-center justify-end"},em={key:0,class:"pr"};function tm(t,n,r,o,i,a){const l=s.resolveComponent("url-box"),c=s.resolveComponent("el-text"),u=s.resolveComponent("el-button"),d=s.resolveComponent("el-dialog"),f=s.resolveComponent("input-button");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(d,{modelValue:i.show,"onUpdate:modelValue":n[1]||(n[1]=p=>i.show=p),title:"选择链接",width:"1080px",top:"5vh","append-to-body":""},{footer:s.withCtx(()=>[s.createElementVNode("div",Qh,[a.url?(s.openBlock(),s.createElementBlock("div",em,[s.createVNode(c,{size:"small",class:"pr-xs"},{default:s.withCtx(()=>[...n[3]||(n[3]=[s.createTextVNode("已选链接:",-1)])]),_:1}),s.createVNode(c,{size:"small",type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(a.url),1)]),_:1})])):s.createCommentVNode("",!0),s.createVNode(u,{size:"small",onClick:n[0]||(n[0]=p=>a.close())},{default:s.withCtx(()=>[...n[4]||(n[4]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(u,{size:"small",type:"primary",onClick:a.getData},{default:s.withCtx(()=>[...n[5]||(n[5]=[s.createTextVNode("确认选择",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createElementVNode("div",Xh,[s.createVNode(l,{ref:"urlbox","model-value":i.value,onChange:a.change,style:{height:"100%"}},null,8,["model-value","onChange"])])]),_:1},8,["modelValue"]),(s.openBlock(),s.createBlock(f,{size:r.size,clearable:"",readonly:"",onClear:n[2]||(n[2]=p=>{i.value="",a.update()}),key:a.inputUrl,"model-value":a.inputUrl,icon:"i-ri-link-m",placeholder:"选择链接",btn:{text:"选择链接",click:()=>{i.show=!0}}},null,8,["size","model-value","btn"]))],64)}const nm=ne(Zh,[["render",tm]]),rm={components:{mediaBox:sr,BigUpload:Is},props:{type:String,modelValue:String,size:"",options:{type:Object,default:()=>({})},cate:{type:Number,default:0},limit:1},data(){return{videoShow:!1,fileType:"image",show:!1,value:""}},computed:{accept(){return this.fileType+"/*"},typeName(){return{video:"视频",audio:"音频",image:"图片",file:"文件"}[this.fileType]}},created(){this.value=this.modelValue,this.type&&(this.fileType=this.type)},methods:{onSuccess(t){t?(this.value=t.url,this.update(),this.$msg.success(t.name+":上传成功")):this.$msg.error(t.name+"上传失败:"+e.msg)},fndel(){this.value="",this.update()},update(){this.$emit("update:modelValue",this.value),this.$emit("change",this.value)},getFile(){let t=this.$refs.fileBox.getData();if(typeof t=="string")return this.$msg.error(t);if(t.length==0)return this.$msg.error("请选择"+this.typeName);this.value=t[0],this.show=!1,this.update()}}},om=["src"],im={class:"dialog-footer"},sm={class:"dialog-footer"},am={key:2,class:"i-ri-image-add-line size-30%"},lm={class:"input-button"},cm={key:0,class:"mt flex"},um={key:0,class:"bg-black/80 rounded-2xl flex justify-center items-center w-60 h-40"},RD={key:1};function dm(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("el-dialog"),u=s.resolveComponent("media-box"),d=s.resolveComponent("a-image"),f=s.resolveComponent("el-input"),p=s.resolveComponent("BigUpload");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(c,{modelValue:i.videoShow,"onUpdate:modelValue":n[1]||(n[1]=h=>i.videoShow=h),title:a.typeName,width:"600px",top:"15vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",im,[s.createVNode(l,{size:"small",onClick:n[0]||(n[0]=h=>i.videoShow=!1)},{default:s.withCtx(()=>[...n[10]||(n[10]=[s.createTextVNode("关闭",-1)])]),_:1})])]),default:s.withCtx(()=>[i.value&&i.videoShow?(s.openBlock(),s.createElementBlock("video",{key:0,src:t.$fileUrl(i.value),controls:"",style:s.normalizeStyle(`height:${{video:"400px",audio:"100px"}[i.fileType]};width: 100%;`)},null,12,om)):s.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),s.createVNode(c,{modelValue:i.show,"onUpdate:modelValue":n[3]||(n[3]=h=>i.show=h),title:"选择"+a.typeName,width:"1080px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",sm,[s.createVNode(l,{size:"small",onClick:n[2]||(n[2]=h=>i.show=!1)},{default:s.withCtx(()=>[...n[11]||(n[11]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(l,{size:"small",type:"primary",onClick:a.getFile},{default:s.withCtx(()=>[...n[12]||(n[12]=[s.createTextVNode("确认",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(u,{type:i.fileType,sum:r.limit,cate:r.cate,ref:"fileBox"},null,8,["type","sum","cate"])]),_:1},8,["modelValue","title"]),r.options?.plain?(s.openBlock(),s.createElementBlock("div",{key:0,class:"input-img-add group",style:s.normalizeStyle({width:r.options.width,height:r.options.height||r.options.width}),onClick:n[5]||(n[5]=h=>i.show=!0)},[i.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:"group-hover:flex hidden pos-absolute z-10 -top-3 -right-3 bg-primary rounded-full size-5 justify-center items-center hover:bg-red-6",title:"删除",onClick:n[4]||(n[4]=s.withModifiers((...h)=>a.fndel&&a.fndel(...h),["stop"]))},[...n[13]||(n[13]=[s.createElementVNode("i",{class:"i-ri-close-line bg-white"},null,-1)])])):s.createCommentVNode("",!0),i.value?(s.openBlock(),s.createBlock(d,{key:1,style:s.normalizeStyle({width:r.options.width,height:r.options.height||r.options.width}),fit:"contain",src:i.value},null,8,["style","src"])):(s.openBlock(),s.createElementBlock("i",am))],4)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createElementVNode("div",lm,[s.createVNode(f,{clearable:"",readonly:"",modelValue:i.value,"onUpdate:modelValue":n[7]||(n[7]=h=>i.value=h),placeholder:"选择"+a.typeName},{prefix:s.withCtx(()=>[s.createElementVNode("i",{class:s.normalizeClass(["line-height font-lg",{video:"ri-vidicon-line",audio:"ri-disc-line",image:"ri-image-line"}[i.fileType]]),style:{color:"#d9d9d9"}},null,2)]),suffix:s.withCtx(()=>[i.value?(s.openBlock(),s.createElementBlock("i",{key:0,onClick:n[6]||(n[6]=s.withModifiers((...h)=>a.fndel&&a.fndel(...h),["stop"])),class:"i-ri-delete-bin-7-line click font-md hover:color-red",title:"清空输入框"})):s.createCommentVNode("",!0)]),_:1},8,["modelValue","placeholder"]),r.options.direct?(s.openBlock(),s.createBlock(p,{key:0,accept:a.accept,type:i.fileType,cate:-1,limit:r.limit,onSuccess:a.onSuccess},{default:s.withCtx(()=>[s.createVNode(l,{style:{"margin-left":"-2px"},type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.value?"更换":"选择")+s.toDisplayString(a.typeName),1)]),_:1})]),_:1},8,["accept","type","limit","onSuccess"])):(s.openBlock(),s.createBlock(l,{key:1,style:{"margin-left":"-2px"},type:"primary",onClick:n[8]||(n[8]=h=>i.show=!0)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.value?"更换":"选择")+s.toDisplayString(a.typeName),1)]),_:1}))]),i.value?(s.openBlock(),s.createElementBlock("div",cm,[(i.fileType=="video",s.openBlock(),s.createElementBlock("div",um,[s.createElementVNode("div",{class:"i-ri-play-fill size-20 color-white/40 hover:color-white click",onClick:n[9]||(n[9]=h=>i.videoShow=!0)})]))])):s.createCommentVNode("",!0)],64))],64)}const fm=ne(rm,[["render",dm]]);let Oo=!1;const pm={name:"input-file",props:{modelValue:String,isSystem:{type:[String,Number,Boolean],default:!1},size:"",disabled:Boolean,url:{type:String,default:""},accept:{type:String,default:""},filename:{type:String,default:""}},data(){return{show:!1,value:"",percent:0,action:"",headers:{jwt:this.$cache.get("admin_jwt")}}},created(){this.value=this.modelValue,this.url?this.action=DMX.apiUrl+this.url:this.action=DMX.apiUrl+`admin.upload/upFile?name=${this.filename}&system=`+(this.isSystem?1:0)},methods:{onSuccess(t,n,r){this.$refs.upload.clearFiles(),Oo.close(),t.code==0?(this.value=t.data,this.$emit("update:modelValue",this.value),this.$msg.success("上传成功")):this.$msg.error(t.msg)},beforeUpload(t){Oo=this.$loading("上传中")},onError(t){return Oo.close(),this.$msg.error("上传失败")},onProgress(t){this.percent=parseInt(t.percent)}}},hm={class:"input-button"},mm={key:0,class:"mt-sm"};function gm(t,n,r,o,i,a){const l=s.resolveComponent("el-input"),c=s.resolveComponent("el-button"),u=s.resolveComponent("el-upload"),d=s.resolveComponent("el-progress");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",hm,[s.createVNode(l,{modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=f=>i.value=f),placeholder:"选择文件",readonly:""},{prefix:s.withCtx(()=>[...n[1]||(n[1]=[s.createElementVNode("i",{class:"i-ri-file-line",style:{color:"#d9d9d9"}},null,-1)])]),_:1},8,["modelValue"]),s.createVNode(u,{action:i.action,headers:i.headers,"on-success":a.onSuccess,onProgress:a.onProgress,"on-error":a.onError,accept:r.accept,"before-upload":a.beforeUpload,"show-file-list":!1,ref:"upload"},{default:s.withCtx(()=>[s.createVNode(c,{type:"primary"},{default:s.withCtx(()=>[...n[2]||(n[2]=[s.createTextVNode("选择文件",-1)])]),_:1})]),_:1},8,["action","headers","on-success","onProgress","on-error","accept","before-upload"])]),i.percent!=0&&i.percent!=100?(s.openBlock(),s.createElementBlock("div",mm,[s.createVNode(d,{percentage:i.percent},null,8,["percentage"])])):s.createCommentVNode("",!0)],64)}const ym=ne(pm,[["render",gm]]),bm={name:"input-md5",props:{type:{type:[Number,String],default:0},length:{type:[Number,String],default:32},disabled:{type:[String,Boolean],default:!1},modelValue:String},data(){return{value:""}},created(){this.value=this.modelValue,this.$watch("value",(t,n)=>{this.$emit("update:modelValue",this.value)})},methods:{getKey(){const t=[];let n=[];const r=this.type+"";r==0||r==""?n.push("0123456789abcdefghijklmnopqrstuvwxyz_-!@"):(r.indexOf("1")>-1&&n.push("0123456789"),r.indexOf("2")>-1&&n.push("abcdefghijklmnopqrstuvwxyz"),r.indexOf("3")>-1&&n.push("_-!@")),n=n.join();for(let o=0;o<this.length;o++)t[o]=n.substr(Math.floor(Math.random()*n.length),1);return t.join("")},doMd5(){return this.getKey()}}};function Cm(t,n,r,o,i,a){const l=s.resolveComponent("input-button");return s.openBlock(),s.createBlock(l,{modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=c=>i.value=c),clearable:"",icon:"i-ri-key-2-line",disabled:!!r.disabled,onClear:n[1]||(n[1]=c=>i.value=""),btn:{text:"随机生成",click:a.doMd5}},null,8,["modelValue","disabled","btn"])}const vm=ne(bm,[["render",Cm]]),Dm={emits:["change"],props:{init:{type:Object,default:()=>({})},modelValue:String|Array},data(){return{pk:"id",url:"",btn:{text:"搜索"},placeholder:"搜索",current:0,error:"没有搜索结果~",errorStatus:!1,value:"",list:[],onItems:{}}},created(){const{pk:t="id",titleName:n="title",imgName:r="img",url:o=""}=this.init;this.pk=t,this.url=o,this.titleName=n,this.imgName=r},methods:{getData(){return{value:this.current,detail:this.onItems}},fnClick(t){this.current=t[this.pk],this.onItems=t,this.$emit("change",{value:this.current,detail:this.onItems})},search(){if(!this.value)return this.$msg.info("请输入搜索内容");this.current=this.id=0,this.errorStatus=!1,this.getList()},getList(){if(!this.url)return $msg.error("no url");$req.post(this.url,{where:{[this.titleName]:this.value}}).then(t=>{t.code==0&&t.data.length>0?this.list=t.data:(this.list=[],this.$msg.info(t.msg||"没有相关搜索结果"),this.errorStatus=!0)})}}},wm={class:"search-box"},xm={key:0,class:"search-box-no-msg"},Bm={class:"search-box-list max-w-800px flex gap-sm flex-wrap mx-auto"},km=["onClick"],Em={class:"flex psm"},_m={class:"flex flex-col flex-1"},Am={key:0,class:"line-clamp-2"},Nm={class:"color-error pt-xs"};function Sm(t,n,r,o,i,a){const l=s.resolveComponent("input-button"),c=s.resolveComponent("a-image"),u=s.resolveComponent("el-scrollbar");return s.openBlock(),s.createElementBlock("div",wm,[s.createVNode(u,{class:"overflow-x-hidden w-full",height:"100%"},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["search-box-search","search-box-search-"+i.list.length])},[s.createVNode(l,{modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=d=>i.value=d),props:{clearable:!0},icon:"i-ri-search-line",placeholder:r.init.placeholder2??"选择",btn:{text:i.btn.text,click:d=>{d&&a.search()}}},null,8,["modelValue","placeholder","btn"])],2),i.errorStatus?(s.openBlock(),s.createElementBlock("div",xm,s.toDisplayString(i.error),1)):s.createCommentVNode("",!0),s.createElementVNode("div",Bm,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(d,f)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["item w-[calc(50%-0.875rem)] leading-tight",i.current==d[i.pk]?"on":""]),onClick:p=>a.fnClick(d)},[s.renderSlot(t.$slots,"item",{item:d},()=>[s.createElementVNode("div",Em,[d[t.imgName]?(s.openBlock(),s.createBlock(c,{key:0,class:"size-40px mr-sm",lazy:"",fit:"cover",preview:!1,src:d[t.imgName]},null,8,["src"])):s.createCommentVNode("",!0),s.createElementVNode("div",_m,[d[t.titleName]?(s.openBlock(),s.createElementBlock("span",Am,s.toDisplayString(d[t.titleName]),1)):s.createCommentVNode("",!0),s.createElementVNode("span",Nm,"ID:"+s.toDisplayString(d[i.pk]),1)])])],!0)],10,km))),256))])]),_:3})])}const Fm={components:{inBox:ne(Dm,[["render",Sm],["__scopeId","data-v-877e7b5a"]])},emits:["change","update:modelValue"],props:{data:Object,size:"",init:{type:Object,default:()=>({})},modelValue:String|Number},data(){return{pk:"",titleName:"",imgName:"",show:!1,icon:"",value:null,showValue:null,showData:null}},computed:{btnText(){let t="选择";return this.value&&(t="更换"),t+this.init.name}},created(){this.modelValue&&(this.showValue=this.value=this.modelValue);const{pk:t="id",titleName:n="title",imgName:r="img",icon:o="ri-git-commit-line"}=this.init;this.pk=t,this.icon=o,this.titleName=n,this.imgName=r,this.init.join&&this.data[this.init.join]&&(this.showData=this.data[this.init.join])},methods:{close(){this.show=!1},change(t){this.showValue=t.value},btnClick(t){this.show=!0},clear(){this.value=null,this.showData=null,this.$emit("update:modelValue",null),this.show=!1},getData(){let t=this.$refs.inBox.getData();if(t.value)this.value=t.value,this.$emit("update:modelValue",t.value),this.init.join&&(this.showData=t.detail,this.$emit("change",t.detail,this.init.join)),this.show=!1;else return this.$msg.info("没有选择数据")}}},Vm={class:"h-60vh w-full"},Om={class:"dialog-footer flex justify-end"},Tm={key:0,class:"pr"},jm={key:0,class:"mt-sm"},Pm={class:"flex-inline leading-none border rounded-xs pd"},Lm={key:0,class:"mr"},Mm={class:"flex-col"},zm={key:0,class:"line-clamp-2 pb-sm"},$m={key:1,class:"color-error"};function Im(t,n,r,o,i,a){const l=s.resolveComponent("inBox"),c=s.resolveComponent("el-text"),u=s.resolveComponent("el-button"),d=s.resolveComponent("el-dialog"),f=s.resolveComponent("input-button"),p=s.resolveComponent("a-image");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(d,{modelValue:i.show,"onUpdate:modelValue":n[1]||(n[1]=h=>i.show=h),title:"搜索"+r.init.name,width:"60%",top:"10vh"},{footer:s.withCtx(()=>[s.createElementVNode("div",Om,[i.showValue?(s.openBlock(),s.createElementBlock("div",Tm,[s.createVNode(c,{size:"small",class:"pr-xs"},{default:s.withCtx(()=>[s.createTextVNode("当前选择的"+s.toDisplayString(r.init.name)+":",1)]),_:1}),s.createVNode(c,{size:"small",type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.showValue),1)]),_:1})])):s.createCommentVNode("",!0),s.createVNode(u,{size:"small",type:"primary",onClick:a.getData},{default:s.withCtx(()=>[...n[3]||(n[3]=[s.createTextVNode("确认选择",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createElementVNode("div",Vm,[s.createVNode(l,{ref:"inBox",modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=h=>i.value=h),init:r.init,onChange:a.change,class:"h-60vh w-full"},{item:s.withCtx(({item:h})=>[s.renderSlot(t.$slots,"item",{item:h})]),_:3},8,["modelValue","init","onChange"])])]),_:3},8,["modelValue","title"]),(s.openBlock(),s.createBlock(f,{readonly:"",clearable:"",key:i.value,modelValue:i.value,"onUpdate:modelValue":n[2]||(n[2]=h=>i.value=h),icon:i.icon,placeholder:r.init.placeholder??"选择",btn:{text:a.btnText,click:a.btnClick},onClear:a.clear},null,8,["modelValue","icon","placeholder","btn","onClear"])),r.init.join&&i.showData?(s.openBlock(),s.createElementBlock("div",jm,[s.renderSlot(t.$slots,"info",{data:i.showData},()=>[s.createElementVNode("div",Pm,[i.showData[i.imgName]?(s.openBlock(),s.createElementBlock("div",Lm,[s.createVNode(p,{class:"size-36px",fit:"cover",preview:!1,src:i.showData[i.imgName]},null,8,["src"])])):s.createCommentVNode("",!0),s.createElementVNode("div",Mm,[i.showData[i.titleName]?(s.openBlock(),s.createElementBlock("div",zm,s.toDisplayString(i.showData[i.titleName]),1)):s.createCommentVNode("",!0),i.showData[i.pk]?(s.openBlock(),s.createElementBlock("div",$m,"ID:"+s.toDisplayString(i.showData[i.pk]),1)):s.createCommentVNode("",!0)])])])])):s.createCommentVNode("",!0)],64)}const Us=ne(Fm,[["render",Im]]);var To;typeof global>"u"?("ActiveXObject"in window&&console.error(`抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器
|
|
2
|
-
Sorry, wangEditor V5+ versions do not support IE browser.`),Ws(),qs()):global&&(!((To=global.navigator)===null||To===void 0)&&To.userAgent.match("QQBrowser"))&&(Ws(),qs());function Ws(){typeof globalThis>"u"&&(window.globalThis=window)}function qs(){typeof AggregateError>"u"&&(window.AggregateError=function(t,n){var r=new Error(n);return r.errors=t,r})}if(typeof global=="object"){var Rm=Object.getOwnPropertyDescriptor(global,"window");global.window&&!Rm.set||(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(t){return nodeCrypto.randomFillSync(t)}}),global.document!=null&&global.document.getElementsByTagName==null&&(global.document.getElementsByTagName=function(){return[]})}function Ks(t){return Object.prototype.toString.call(t)==="[object Object]"}function tt(t){var n,r;return Ks(t)!==!1&&((n=t.constructor)===void 0||Ks(r=n.prototype)!==!1&&r.hasOwnProperty("isPrototypeOf")!==!1)}function Et(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(i){return"'"+i+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Zt(t){return!!t&&!!t[bt]}function Xt(t){return!!t&&((function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var o=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===Jm})(t)||Array.isArray(t)||!!t[ra]||!!t.constructor[ra]||Po(t)||Lo(t))}function jn(t,n,r){r===void 0&&(r=!1),fn(t)===0?(r?Object.keys:Go)(t).forEach((function(o){r&&typeof o=="symbol"||n(o,t[o],t)})):t.forEach((function(o,i){return n(i,o,t)}))}function fn(t){var n=t[bt];return n?n.i>3?n.i-4:n.i:Array.isArray(t)?1:Po(t)?2:Lo(t)?3:0}function jo(t,n){return fn(t)===2?t.has(n):Object.prototype.hasOwnProperty.call(t,n)}function Js(t,n,r){var o=fn(t);o===2?t.set(n,r):o===3?(t.delete(n),t.add(r)):t[n]=r}function Po(t){return qm&&t instanceof Map}function Lo(t){return Km&&t instanceof Set}function Qt(t){return t.o||t.t}function Mo(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var n=Gm(t);delete n[bt];for(var r=Go(n),o=0;o<r.length;o++){var i=r[o],a=n[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),n)}function zo(t,n){return n===void 0&&(n=!1),$o(t)||Zt(t)||!Xt(t)||(fn(t)>1&&(t.set=t.add=t.clear=t.delete=Hm),Object.freeze(t),n&&jn(t,(function(r,o){return zo(o,!0)}),!0)),t}function Hm(){Et(2)}function $o(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Lt(t){var n=Ym[t];return n||Et(18,t),n}function Gs(){return Pn}function Io(t,n){n&&(Lt("Patches"),t.u=[],t.s=[],t.v=n)}function ar(t){Ro(t),t.p.forEach(Um),t.p=null}function Ro(t){t===Pn&&(Pn=t.l)}function Ys(t){return Pn={p:[],l:Pn,h:t,m:!0,_:0}}function Um(t){var n=t[bt];n.i===0||n.i===1?n.j():n.O=!0}function Ho(t,n){n._=n.p.length;var r=n.p[0],o=t!==void 0&&t!==r;return n.h.g||Lt("ES5").S(n,t,o),o?(r[bt].P&&(ar(n),Et(4)),Xt(t)&&(t=lr(n,t),n.l||cr(n,t)),n.u&&Lt("Patches").M(r[bt],t,n.u,n.s)):t=lr(n,r,[]),ar(n),n.u&&n.v(n.u,n.s),t!==na?t:void 0}function lr(t,n,r){if($o(n))return n;var o=n[bt];if(!o)return jn(n,(function(a,l){return Zs(t,o,n,a,l,r)}),!0),n;if(o.A!==t)return n;if(!o.P)return cr(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var i=o.i===4||o.i===5?o.o=Mo(o.k):o.o;jn(o.i===3?new Set(i):i,(function(a,l){return Zs(t,o,i,a,l,r)})),cr(t,i,!1),r&&t.u&&Lt("Patches").R(o,r,t.u,t.s)}return o.o}function Zs(t,n,r,o,i,a){if(Zt(i)){var l=lr(t,i,a&&n&&n.i!==3&&!jo(n.D,o)?a.concat(o):void 0);if(Js(r,o,l),!Zt(l))return;t.m=!1}if(Xt(i)&&!$o(i)){if(!t.h.F&&t._<1)return;lr(t,i),n&&n.A.l||cr(t,i)}}function cr(t,n,r){r===void 0&&(r=!1),t.h.F&&t.m&&zo(n,r)}function Uo(t,n){var r=t[bt];return(r?Qt(r):t)[n]}function Xs(t,n){if(n in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,n);if(o)return o;r=Object.getPrototypeOf(r)}}function Wo(t){t.P||(t.P=!0,t.l&&Wo(t.l))}function qo(t){t.o||(t.o=Mo(t.t))}function Ko(t,n,r){var o=Po(n)?Lt("MapSet").N(n,r):Lo(n)?Lt("MapSet").T(n,r):t.g?(function(i,a){var l=Array.isArray(i),c={i:l?1:0,A:a?a.A:Gs(),P:!1,I:!1,D:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=c,d=ur;l&&(u=[c],d=dr);var f=Proxy.revocable(u,d),p=f.revoke,h=f.proxy;return c.k=h,c.j=p,h})(n,r):Lt("ES5").J(n,r);return(r?r.A:Gs()).p.push(o),o}function Wm(t){return Zt(t)||Et(22,t),(function n(r){if(!Xt(r))return r;var o,i=r[bt],a=fn(r);if(i){if(!i.P&&(i.i<4||!Lt("ES5").K(i)))return i.t;i.I=!0,o=Qs(r,a),i.I=!1}else o=Qs(r,a);return jn(o,(function(l,c){i&&(function(u,d){return fn(u)===2?u.get(d):u[d]})(i.t,l)===c||Js(o,l,n(c))})),a===3?new Set(o):o})(t)}function Qs(t,n){switch(n){case 2:return new Map(t);case 3:return Array.from(t)}return Mo(t)}var ea,Pn,Jo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",qm=typeof Map<"u",Km=typeof Set<"u",ta=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",na=Jo?Symbol.for("immer-nothing"):((ea={})["immer-nothing"]=!0,ea),ra=Jo?Symbol.for("immer-draftable"):"__$immer_draftable",bt=Jo?Symbol.for("immer-state"):"__$immer_state",Jm=""+Object.prototype.constructor,Go=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Gm=Object.getOwnPropertyDescriptors||function(t){var n={};return Go(t).forEach((function(r){n[r]=Object.getOwnPropertyDescriptor(t,r)})),n},Ym={},ur={get:function(t,n){if(n===bt)return t;var r=Qt(t);if(!jo(r,n))return(function(i,a,l){var c,u=Xs(a,l);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(i.k):void 0})(t,r,n);var o=r[n];return t.I||!Xt(o)?o:o===Uo(t.t,n)?(qo(t),t.o[n]=Ko(t.A.h,o,t)):o},has:function(t,n){return n in Qt(t)},ownKeys:function(t){return Reflect.ownKeys(Qt(t))},set:function(t,n,r){var o=Xs(Qt(t),n);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var i=Uo(Qt(t),n),a=i?.[bt];if(a&&a.t===r)return t.o[n]=r,t.D[n]=!1,!0;if((function(l,c){return l===c?l!==0||1/l==1/c:l!=l&&c!=c})(r,i)&&(r!==void 0||jo(t.t,n)))return!0;qo(t),Wo(t)}return t.o[n]===r&&typeof r!="number"&&(r!==void 0||n in t.o)||(t.o[n]=r,t.D[n]=!0,!0)},deleteProperty:function(t,n){return Uo(t.t,n)!==void 0||n in t.t?(t.D[n]=!1,qo(t),Wo(t)):delete t.D[n],t.o&&delete t.o[n],!0},getOwnPropertyDescriptor:function(t,n){var r=Qt(t),o=Reflect.getOwnPropertyDescriptor(r,n);return o&&{writable:!0,configurable:t.i!==1||n!=="length",enumerable:o.enumerable,value:r[n]}},defineProperty:function(){Et(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Et(12)}},dr={};jn(ur,(function(t,n){dr[t]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}})),dr.deleteProperty=function(t,n){return ur.deleteProperty.call(this,t[0],n)},dr.set=function(t,n,r){return ur.set.call(this,t[0],n,r,t[0])};var Zm=(function(){function t(r){var o=this;this.g=ta,this.F=!0,this.produce=function(i,a,l){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var u=o;return function(m){var g=this;m===void 0&&(m=c);for(var y=arguments.length,v=Array(y>1?y-1:0),D=1;D<y;D++)v[D-1]=arguments[D];return u.produce(m,(function(w){var b;return(b=a).call.apply(b,[g,w].concat(v))}))}}var d;if(typeof a!="function"&&Et(6),l!==void 0&&typeof l!="function"&&Et(7),Xt(i)){var f=Ys(o),p=Ko(o,i,void 0),h=!0;try{d=a(p),h=!1}finally{h?ar(f):Ro(f)}return typeof Promise<"u"&&d instanceof Promise?d.then((function(m){return Io(f,l),Ho(m,f)}),(function(m){throw ar(f),m})):(Io(f,l),Ho(d,f))}if(!i||typeof i!="object")return(d=a(i))===na?void 0:(d===void 0&&(d=i),o.F&&zo(d,!0),d);Et(21,i)},this.produceWithPatches=function(i,a){return typeof i=="function"?function(u){for(var d=arguments.length,f=Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];return o.produceWithPatches(u,(function(h){return i.apply(void 0,[h].concat(f))}))}:[o.produce(i,a,(function(u,d){l=u,c=d})),l,c];var l,c},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var n=t.prototype;return n.createDraft=function(r){Xt(r)||Et(8),Zt(r)&&(r=Wm(r));var o=Ys(this),i=Ko(this,r,void 0);return i[bt].C=!0,Ro(o),i},n.finishDraft=function(r,o){var i=(r&&r[bt]).A;return Io(i,o),Ho(void 0,i)},n.setAutoFreeze=function(r){this.F=r},n.setUseProxies=function(r){r&&!ta&&Et(20),this.g=r},n.applyPatches=function(r,o){var i;for(i=o.length-1;i>=0;i--){var a=o[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(o=o.slice(i+1));var l=Lt("Patches").$;return Zt(r)?l(r,o):this.produce(r,(function(c){return l(c,o)}))},t})(),Ct=new Zm,fr=Ct.produce;Ct.produceWithPatches.bind(Ct),Ct.setAutoFreeze.bind(Ct),Ct.setUseProxies.bind(Ct),Ct.applyPatches.bind(Ct);var oa=Ct.createDraft.bind(Ct),ia=Ct.finishDraft.bind(Ct);function Vt(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var pr=new WeakMap,Ln=new WeakMap,sa=new WeakMap,aa=new WeakMap,la=new WeakMap,ca=new WeakMap;function ua(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function hr(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ua(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ua(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var Xm=()=>{var t={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:n=>{for(var r of C.pathRefs(t))Ag.transform(r,n);for(var o of C.pointRefs(t))Ng.transform(o,n);for(var i of C.rangeRefs(t))Fg.transform(i,n);var a=new Set,l=[],c=h=>{if(h){var m=h.join(",");a.has(m)||(a.add(m),l.push(h))}},u=pr.get(t)||[],d=Qm(n);for(var f of u)c(_.transform(f,n));for(var p of d)c(p);pr.set(t,l),O.transform(t,n),t.operations.push(n),C.normalize(t),n.type==="set_selection"&&(t.marks=null),Ln.get(t)||(Ln.set(t,!0),Promise.resolve().then((()=>{Ln.set(t,!1),t.onChange(),t.operations=[]})))},addMark:(n,r)=>{var{selection:o}=t;if(o)if(j.isExpanded(o))O.setNodes(t,{[n]:r},{match:q.isText,split:!0});else{var i=hr(hr({},C.marks(t)||{}),{},{[n]:r});t.marks=i,Ln.get(t)||t.onChange()}},deleteBackward:n=>{var{selection:r}=t;r&&j.isCollapsed(r)&&O.delete(t,{unit:n,reverse:!0})},deleteForward:n=>{var{selection:r}=t;r&&j.isCollapsed(r)&&O.delete(t,{unit:n})},deleteFragment:n=>{var{selection:r}=t;r&&j.isExpanded(r)&&O.delete(t,{reverse:n==="backward"})},getFragment:()=>{var{selection:n}=t;return n?H.fragment(t,n):[]},insertBreak:()=>{O.splitNodes(t,{always:!0})},insertFragment:n=>{O.insertFragment(t,n)},insertNode:n=>{O.insertNodes(t,n)},insertText:n=>{var{selection:r,marks:o}=t;if(r){if(o){var i=hr({text:n},o);O.insertNodes(t,i)}else O.insertText(t,n);t.marks=null}},normalizeNode:n=>{var[r,o]=n;if(!q.isText(r))if(te.isElement(r)&&r.children.length===0)O.insertNodes(t,{text:""},{at:o.concat(0),voids:!0});else for(var i=!C.isEditor(r)&&te.isElement(r)&&(t.isInline(r)||r.children.length===0||q.isText(r.children[0])||t.isInline(r.children[0])),a=0,l=0;l<r.children.length;l++,a++){var c=H.get(t,o);if(!q.isText(c)){var u=r.children[l],d=c.children[a-1],f=l===r.children.length-1;(q.isText(u)||te.isElement(u)&&t.isInline(u))!==i?(O.removeNodes(t,{at:o.concat(a),voids:!0}),a--):te.isElement(u)?t.isInline(u)&&(d!=null&&q.isText(d)?f&&(O.insertNodes(t,{text:""},{at:o.concat(a+1),voids:!0}),a++):(O.insertNodes(t,{text:""},{at:o.concat(a),voids:!0}),a++)):d!=null&&q.isText(d)&&(q.equals(u,d,{loose:!0})?(O.mergeNodes(t,{at:o.concat(a),voids:!0}),a--):d.text===""?(O.removeNodes(t,{at:o.concat(a-1),voids:!0}),a--):u.text===""&&(O.removeNodes(t,{at:o.concat(a),voids:!0}),a--))}}},removeMark:n=>{var{selection:r}=t;if(r)if(j.isExpanded(r))O.unsetNodes(t,n,{match:q.isText,split:!0});else{var o=hr({},C.marks(t)||{});delete o[n],t.marks=o,Ln.get(t)||t.onChange()}}};return t},Qm=t=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":var{path:n}=t;return _.levels(n);case"insert_node":var{node:r,path:o}=t,i=_.levels(o),a=q.isText(r)?[]:Array.from(H.nodes(r),(x=>{var[,k]=x;return o.concat(k)}));return[...i,...a];case"merge_node":var{path:l}=t;return[..._.ancestors(l),_.previous(l)];case"move_node":var{path:c,newPath:u}=t;if(_.equals(c,u))return[];var d=[],f=[];for(var p of _.ancestors(c)){var h=_.transform(p,t);d.push(h)}for(var m of _.ancestors(u)){var g=_.transform(m,t);f.push(g)}var y=f[f.length-1],v=u[u.length-1],D=y.concat(v);return[...d,...f,D];case"remove_node":var{path:w}=t;return[..._.ancestors(w)];case"split_node":var{path:b}=t;return[..._.levels(b),_.next(b)];default:return[]}};function Mt(t,n){if(t==null)return{};var r,o,i=(function(l,c){if(l==null)return{};var u,d,f={},p=Object.keys(l);for(d=0;d<p.length;d++)u=p[d],c.indexOf(u)>=0||(f[u]=l[u]);return f})(t,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o<a.length;o++)r=a[o],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var pe,Yo=function(t){var n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=!n,o=n?og(t):t,i=pe.None,a=pe.None,l=0,c=null;for(var u of o){var d=u.codePointAt(0);if(!d)break;var f=gg(u,d);if([i,a]=r?[a,f]:[f,i],pn(i,pe.ZWJ)&&pn(a,pe.ExtPict)&&!vg(r?t.substring(0,l):t.substring(0,t.length-l))||pn(i,pe.RI)&&pn(a,pe.RI)&&!(c=c!==null?!c:!!r||wg(t.substring(0,t.length-l)))||i!==pe.None&&a!==pe.None&&bg(i,a))break;l+=u.length}return l||1},eg=/\s/,tg=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,ng=/['\u2018\u2019]/,Zo=(t,n,r)=>{if(r){var o=t.length-n;return[t.slice(o,t.length),t.slice(0,o)]}return[t.slice(0,n),t.slice(n)]},rg=function t(n,r){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(eg.test(n))return!1;if(ng.test(n)){var i=Yo(r,o),[a,l]=Zo(r,i,o);if(t(a,l,o))return!0}return!tg.test(n)},og=function*(t){for(var n=t.length-1,r=0;r<t.length;r++){var o=t.charAt(n-r);if(sg(o.charCodeAt(0))){var i=t.charAt(n-r-1);if(ig(i.charCodeAt(0))){yield i+o,r++;continue}}yield o}},ig=t=>t>=55296&&t<=56319,sg=t=>t>=56320&&t<=57343;(function(t){t[t.None=0]="None",t[t.Extend=1]="Extend",t[t.ZWJ=2]="ZWJ",t[t.RI=4]="RI",t[t.Prepend=8]="Prepend",t[t.SpacingMark=16]="SpacingMark",t[t.L=32]="L",t[t.V=64]="V",t[t.T=128]="T",t[t.LV=256]="LV",t[t.LVT=512]="LVT",t[t.ExtPict=1024]="ExtPict",t[t.Any=2048]="Any"})(pe||(pe={}));var ag=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,lg=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,cg=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,ug=/^[\u1100-\u115F\uA960-\uA97C]$/,dg=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,fg=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,pg=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,hg=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,mg=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,gg=(t,n)=>{var r=pe.Any;return t.search(ag)!==-1&&(r|=pe.Extend),n===8205&&(r|=pe.ZWJ),n>=127462&&n<=127487&&(r|=pe.RI),t.search(lg)!==-1&&(r|=pe.Prepend),t.search(cg)!==-1&&(r|=pe.SpacingMark),t.search(ug)!==-1&&(r|=pe.L),t.search(dg)!==-1&&(r|=pe.V),t.search(fg)!==-1&&(r|=pe.T),t.search(pg)!==-1&&(r|=pe.LV),t.search(hg)!==-1&&(r|=pe.LVT),t.search(mg)!==-1&&(r|=pe.ExtPict),r};function pn(t,n){return!!(t&n)}var yg=[[pe.L,pe.L|pe.V|pe.LV|pe.LVT],[pe.LV|pe.V,pe.V|pe.T],[pe.LVT|pe.T,pe.T],[pe.Any,pe.Extend|pe.ZWJ],[pe.Any,pe.SpacingMark],[pe.Prepend,pe.Any],[pe.ZWJ,pe.ExtPict],[pe.RI,pe.RI]];function bg(t,n){return yg.findIndex((r=>pn(t,r[0])&&pn(n,r[1])))===-1}var Cg=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,vg=t=>t.search(Cg)!==-1,Dg=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,wg=t=>{var n=t.match(Dg);return n!==null&&n[0].length/2%2==1},da=t=>tt(t)&&H.isNodeList(t.children)&&!C.isEditor(t),te={isAncestor:t=>tt(t)&&H.isNodeList(t.children),isElement:da,isElementList:t=>Array.isArray(t)&&t.every((n=>te.isElement(n))),isElementProps:t=>t.children!==void 0,isElementType:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return da(t)&&t[r]===n},matches(t,n){for(var r in n)if(r!=="children"&&t[r]!==n[r])return!1;return!0}},xg=["text"],Bg=["text"];function fa(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function hn(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?fa(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fa(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var pa=new WeakMap,C={above(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:o="lowest",at:i=t.selection,match:a}=n;if(i){var l=C.path(t,i),c=o==="lowest";for(var[u,d]of C.levels(t,{at:l,voids:r,match:a,reverse:c}))if(!q.isText(u)&&!_.equals(l,d))return[u,d]}},addMark(t,n,r){t.addMark(n,r)},after(t,n){var r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i={anchor:C.point(t,n,{edge:"end"}),focus:C.end(t,[])},{distance:a=1}=o,l=0;for(var c of C.positions(t,hn(hn({},o),{},{at:i}))){if(l>a)break;l!==0&&(r=c),l++}return r},before(t,n){var r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i={anchor:C.start(t,[]),focus:C.point(t,n,{edge:"start"})},{distance:a=1}=o,l=0;for(var c of C.positions(t,hn(hn({},o),{},{at:i,reverse:!0}))){if(l>a)break;l!==0&&(r=c),l++}return r},deleteBackward(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=n;t.deleteBackward(r)},deleteForward(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=n;t.deleteForward(r)},deleteFragment(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{direction:r="forward"}=n;t.deleteFragment(r)},edges:(t,n)=>[C.start(t,n),C.end(t,n)],end:(t,n)=>C.point(t,n,{edge:"end"}),first(t,n){var r=C.path(t,n,{edge:"start"});return C.node(t,r)},fragment(t,n){var r=C.range(t,n);return H.fragment(t,r)},hasBlocks:(t,n)=>n.children.some((r=>C.isBlock(t,r))),hasInlines:(t,n)=>n.children.some((r=>q.isText(r)||C.isInline(t,r))),hasTexts:(t,n)=>n.children.every((r=>q.isText(r))),insertBreak(t){t.insertBreak()},insertFragment(t,n){t.insertFragment(n)},insertNode(t,n){t.insertNode(n)},insertText(t,n){t.insertText(n)},isBlock:(t,n)=>te.isElement(n)&&!t.isInline(n),isEditor(t){if(!tt(t))return!1;var n=pa.get(t);if(n!==void 0)return n;var r=typeof t.addMark=="function"&&typeof t.apply=="function"&&typeof t.deleteBackward=="function"&&typeof t.deleteForward=="function"&&typeof t.deleteFragment=="function"&&typeof t.insertBreak=="function"&&typeof t.insertFragment=="function"&&typeof t.insertNode=="function"&&typeof t.insertText=="function"&&typeof t.isInline=="function"&&typeof t.isVoid=="function"&&typeof t.normalizeNode=="function"&&typeof t.onChange=="function"&&typeof t.removeMark=="function"&&(t.marks===null||tt(t.marks))&&(t.selection===null||j.isRange(t.selection))&&H.isNodeList(t.children)&&Wt.isOperationList(t.operations);return pa.set(t,r),r},isEnd(t,n,r){var o=C.end(t,r);return ye.equals(n,o)},isEdge:(t,n,r)=>C.isStart(t,n,r)||C.isEnd(t,n,r),isEmpty(t,n){var{children:r}=n,[o]=r;return r.length===0||r.length===1&&q.isText(o)&&o.text===""&&!t.isVoid(n)},isInline:(t,n)=>te.isElement(n)&&t.isInline(n),isNormalizing(t){var n=sa.get(t);return n===void 0||n},isStart(t,n,r){if(n.offset!==0)return!1;var o=C.start(t,r);return ye.equals(n,o)},isVoid:(t,n)=>te.isElement(n)&&t.isVoid(n),last(t,n){var r=C.path(t,n,{edge:"end"});return C.node(t,r)},leaf(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=C.path(t,n,r);return[H.leaf(t,o),o]},*levels(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=t.selection,reverse:o=!1,voids:i=!1}=n,{match:a}=n;if(a==null&&(a=()=>!0),r){var l=[],c=C.path(t,r);for(var[u,d]of H.levels(t,c))if(a(u,d)&&(l.push([u,d]),!i&&C.isVoid(t,u)))break;o&&l.reverse(),yield*l}},marks(t){var{marks:n,selection:r}=t;if(!r)return null;if(n)return n;if(j.isExpanded(r)){var[o]=C.nodes(t,{match:q.isText});if(o){var[i]=o;return Mt(i,xg)}return{}}var{anchor:a}=r,{path:l}=a,[c]=C.leaf(t,l);if(a.offset===0){var u=C.previous(t,{at:l,match:q.isText}),d=C.above(t,{match:m=>C.isBlock(t,m)});if(u&&d){var[f,p]=u,[,h]=d;_.isAncestor(h,p)&&(c=f)}}return Mt(c,Bg)},next(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:o=!1}=n,{match:i,at:a=t.selection}=n;if(a){var l=C.after(t,a,{voids:o});if(l){var[,c]=C.last(t,[]),u=[l.path,c];if(_.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(_.isPath(a)){var[d]=C.parent(t,a);i=p=>d.children.includes(p)}else i=()=>!0;var[f]=C.nodes(t,{at:u,match:i,mode:r,voids:o});return f}}},node(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=C.path(t,n,r);return[H.get(t,o),o]},*nodes(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=t.selection,mode:o="all",universal:i=!1,reverse:a=!1,voids:l=!1}=n,{match:c}=n;if(c||(c=()=>!0),r){var u,d;if(kg.isSpan(r))u=r[0],d=r[1];else{var f=C.path(t,r,{edge:"start"}),p=C.path(t,r,{edge:"end"});u=a?p:f,d=a?f:p}var h,m=H.nodes(t,{reverse:a,from:u,to:d,pass:b=>{var[x]=b;return!l&&C.isVoid(t,x)}}),g=[];for(var[y,v]of m){var D=h&&_.compare(v,h[1])===0;if(o!=="highest"||!D){if(c(y,v))if(o==="lowest"&&D)h=[y,v];else{var w=o==="lowest"?h:[y,v];w&&(i?g.push(w):yield w),h=[y,v]}else if(i&&!D&&q.isText(y))return}}o==="lowest"&&h&&(i?g.push(h):yield h),i&&(yield*g)}},normalize(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1}=n,o=a=>pr.get(a)||[];if(C.isNormalizing(t)){if(r){var i=Array.from(H.nodes(t),(a=>{var[,l]=a;return l}));pr.set(t,i)}o(t).length!==0&&C.withoutNormalizing(t,(()=>{for(var a of o(t))if(H.has(t,a)){var l=C.node(t,a),[c,u]=l;te.isElement(c)&&c.children.length===0&&t.normalizeNode(l)}for(var d=42*o(t).length,f=0;o(t).length!==0;){if(f>d)throw new Error(`
|
|
1
|
+
(function(ut,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue"),require("es-toolkit"),require("element-plus"),require("alova"),require("number-precision"),require("@vueuse/core"),require("echarts")):typeof define=="function"&&define.amd?define(["exports","vue","es-toolkit","element-plus","alova","number-precision","@vueuse/core","echarts"],s):(ut=typeof globalThis<"u"?globalThis:ut||self,s(ut.AdminUi={},ut.vue,ut.esToolkit,ut.elementPlus,ut.alova,ut.np,ut.core,ut.echarts))})(this,(function(ut,s,yo,we,bo,id,Co,sd){"use strict";function ad(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const vo=ad(sd);function ld(t){return Number.isSafeInteger(t)&&t>=0}function cd(t){return t!=null&&typeof t!="function"&&ld(t.length)}function Tn(t){return t==="__proto__"}function Es(t){switch(typeof t){case"number":case"symbol":return!1;case"string":return t.includes(".")||t.includes("[")||t.includes("]")}}function Do(t){return typeof t=="string"||typeof t=="symbol"?t:Object.is(t?.valueOf?.(),-0)?"-0":String(t)}function _s(t){if(t==null)return"";if(typeof t=="string")return t;if(Array.isArray(t))return t.map(_s).join(",");const n=String(t);return n==="0"&&Object.is(Number(t),-0)?"-0":n}function wo(t){if(Array.isArray(t))return t.map(Do);if(typeof t=="symbol")return[t];t=_s(t);const n=[],r=t.length;if(r===0)return n;let o=0,i="",a="",l=!1;for(t.charCodeAt(0)===46&&(n.push(""),o++);o<r;){const c=t[o];a?c==="\\"&&o+1<r?(o++,i+=t[o]):c===a?a="":i+=c:l?c==='"'||c==="'"?a=c:c==="]"?(l=!1,n.push(i),i=""):i+=c:c==="["?(l=!0,i&&(n.push(i),i="")):c==="."?i&&(n.push(i),i=""):i+=c,o++}return i&&n.push(i),n}function Yt(t,n,r){if(t==null)return r;switch(typeof n){case"string":{if(Tn(n))return r;const o=t[n];return o===void 0?Es(n)?Yt(t,wo(n),r):r:o}case"number":case"symbol":{typeof n=="number"&&(n=Do(n));const o=t[n];return o===void 0?r:o}default:{if(Array.isArray(n))return ud(t,n,r);if(Object.is(n?.valueOf(),-0)?n="-0":n=String(n),Tn(n))return r;const o=t[n];return o===void 0?r:o}}}function ud(t,n,r){if(n.length===0)return r;let o=t;for(let i=0;i<n.length;i++){if(o==null||Tn(n[i]))return r;o=o[n[i]]}return o===void 0?r:o}function As(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function xo(t){return t==null||typeof t!="object"&&typeof t!="function"}function dd(t,n){return t===n||Number.isNaN(t)&&Number.isNaN(n)}function Ns(t){return Object.getOwnPropertySymbols(t).filter(n=>Object.prototype.propertyIsEnumerable.call(t,n))}function Bo(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const fd="[object RegExp]",Ss="[object String]",Fs="[object Number]",Vs="[object Boolean]",Os="[object Arguments]",pd="[object Symbol]",hd="[object Date]",md="[object Map]",gd="[object Set]",yd="[object Array]",bd="[object ArrayBuffer]",Ts="[object Object]",Cd="[object DataView]",vd="[object Uint8Array]",Dd="[object Uint8ClampedArray]",wd="[object Uint16Array]",xd="[object Uint32Array]",Bd="[object Int8Array]",kd="[object Int16Array]",Ed="[object Int32Array]",_d="[object Float32Array]",Ad="[object Float64Array]";function ko(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Nd(t,n){return un(t,void 0,t,new Map,n)}function un(t,n,r,o=new Map,i=void 0){const a=i?.(t,n,r,o);if(a!==void 0)return a;if(xo(t))return t;if(o.has(t))return o.get(t);if(Array.isArray(t)){const l=new Array(t.length);o.set(t,l);for(let c=0;c<t.length;c++)l[c]=un(t[c],c,r,o,i);return Object.hasOwn(t,"index")&&(l.index=t.index),Object.hasOwn(t,"input")&&(l.input=t.input),l}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const l=new RegExp(t.source,t.flags);return l.lastIndex=t.lastIndex,l}if(t instanceof Map){const l=new Map;o.set(t,l);for(const[c,u]of t)l.set(c,un(u,c,r,o,i));return l}if(t instanceof Set){const l=new Set;o.set(t,l);for(const c of t)l.add(un(c,void 0,r,o,i));return l}if(typeof Buffer<"u"&&Buffer.isBuffer(t))return t.subarray();if(ko(t)){const l=new(Object.getPrototypeOf(t)).constructor(t.length);o.set(t,l);for(let c=0;c<t.length;c++)l[c]=un(t[c],c,r,o,i);return l}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const l=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return o.set(t,l),kt(l,t,r,o,i),l}if(typeof File<"u"&&t instanceof File){const l=new File([t],t.name,{type:t.type});return o.set(t,l),kt(l,t,r,o,i),l}if(typeof Blob<"u"&&t instanceof Blob){const l=new Blob([t],{type:t.type});return o.set(t,l),kt(l,t,r,o,i),l}if(t instanceof Error){const l=structuredClone(t);return o.set(t,l),l.message=t.message,l.name=t.name,l.stack=t.stack,l.cause=t.cause,l.constructor=t.constructor,kt(l,t,r,o,i),l}if(t instanceof Boolean){const l=new Boolean(t.valueOf());return o.set(t,l),kt(l,t,r,o,i),l}if(t instanceof Number){const l=new Number(t.valueOf());return o.set(t,l),kt(l,t,r,o,i),l}if(t instanceof String){const l=new String(t.valueOf());return o.set(t,l),kt(l,t,r,o,i),l}if(typeof t=="object"&&Sd(t)){const l=Object.create(Object.getPrototypeOf(t));return o.set(t,l),kt(l,t,r,o,i),l}return t}function kt(t,n,r=t,o,i){const a=[...Object.keys(n),...Ns(n)];for(let l=0;l<a.length;l++){const c=a[l],u=Object.getOwnPropertyDescriptor(t,c);(u==null||u.writable)&&(t[c]=un(n[c],c,r,o,i))}}function Sd(t){switch(Bo(t)){case Os:case yd:case bd:case Cd:case Vs:case hd:case _d:case Ad:case Bd:case kd:case Ed:case md:case Fs:case Ts:case fd:case gd:case Ss:case pd:case vd:case Dd:case wd:case xd:return!0;default:return!1}}function Fd(t,n){return Nd(t,(r,o,i,a)=>{if(typeof t=="object"){if(Bo(t)===Ts&&typeof t.constructor!="function"){const l={};return a.set(t,l),kt(l,t,i,a),l}switch(Object.prototype.toString.call(t)){case Fs:case Ss:case Vs:{const l=new t.constructor(t?.valueOf());return kt(l,t),l}case Os:{const l={};return kt(l,t),l.length=t.length,l[Symbol.iterator]=t[Symbol.iterator],l}default:return}}})}function js(t){return Fd(t)}const Vd=/^(?:0|[1-9]\d*)$/;function Ps(t,n=Number.MAX_SAFE_INTEGER){switch(typeof t){case"number":return Number.isInteger(t)&&t>=0&&t<n;case"symbol":return!1;case"string":return Vd.test(t)}}function Eo(t){return t!==null&&typeof t=="object"&&Bo(t)==="[object Arguments]"}function Od(t,n){let r;if(Array.isArray(n)?r=n:typeof n=="string"&&Es(n)&&t?.[n]==null?r=wo(n):r=[n],r.length===0)return!1;let o=t;for(let i=0;i<r.length;i++){const a=r[i];if((o==null||!Object.hasOwn(o,a))&&!((Array.isArray(o)||Eo(o))&&Ps(a)&&a<o.length))return!1;o=o[a]}return!0}function _o(t){return typeof t=="object"&&t!==null}function Td(t){return _o(t)&&cd(t)}function jd(t){return typeof t=="symbol"||t instanceof Symbol}const Pd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ld=/^\w*$/;function Md(t,n){return Array.isArray(t)?!1:typeof t=="number"||typeof t=="boolean"||t==null||jd(t)?!0:typeof t=="string"&&(Ld.test(t)||!Pd.test(t))||n!=null&&Object.hasOwn(n,t)}const zd=(t,n,r)=>{const o=t[n];(!(Object.hasOwn(t,n)&&dd(o,r))||r===void 0&&!(n in t))&&(t[n]=r)};function $d(t,n,r,o){if(t==null&&!As(t))return t;let i;Md(n,t)?i=[n]:Array.isArray(n)?i=n:i=wo(n);const a=r(Yt(t,i));let l=t;for(let c=0;c<i.length&&l!=null;c++){const u=Do(i[c]);if(Tn(u))continue;let d;if(c===i.length-1)d=a;else{const f=l[u],p=o?.(f,u,t);d=p!==void 0?p:As(f)?f:Ps(i[c+1])?[]:{}}zd(l,u,d),l=l[u]}return t}function dn(t,n,r){return $d(t,n,()=>r,()=>{})}function Id(){}function Ao(t){return ko(t)}function No(t){if(typeof t!="object"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!=="[object Object]"){const r=t[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable?!1:t.toString()===`[object ${r}]`}let n=t;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n}function Rd(t){if(xo(t))return t;if(Array.isArray(t)||ko(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);const n=Object.getPrototypeOf(t);if(n==null)return Object.assign(Object.create(n),t);const r=n.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const o=new r(t);return o.lastIndex=t.lastIndex,o}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let o;return t instanceof AggregateError?o=new r(t.errors,t.message,{cause:t.cause}):o=new r(t.message,{cause:t.cause}),o.stack=t.stack,Object.assign(o,t),o}if(typeof File<"u"&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if(typeof t=="object"){const o=Object.create(n);return Object.assign(o,t)}return t}function Hd(t,...n){const r=n.slice(0,-1),o=n[n.length-1];let i=t;for(let a=0;a<r.length;a++){const l=r[a];i=ir(i,l,o,new Map)}return i}function ir(t,n,r,o){if(xo(t)&&(t=Object(t)),n==null||typeof n!="object")return t;if(o.has(n))return Rd(o.get(n));if(o.set(n,t),Array.isArray(n)){n=n.slice();for(let a=0;a<n.length;a++)n[a]=n[a]??void 0}const i=[...Object.keys(n),...Ns(n)];for(let a=0;a<i.length;a++){const l=i[a];if(Tn(l))continue;let c=n[l],u=t[l];if(Eo(c)&&(c={...c}),Eo(u)&&(u={...u}),typeof Buffer<"u"&&Buffer.isBuffer(c)&&(c=js(c)),Array.isArray(c))if(Array.isArray(u)){const f=[],p=Reflect.ownKeys(u);for(let h=0;h<p.length;h++){const m=p[h];f[m]=u[m]}u=f}else if(Td(u)){const f=[];for(let p=0;p<u.length;p++)f[p]=u[p];u=f}else u=[];const d=r(u,c,l,t,n,o);d!==void 0?t[l]=d:Array.isArray(c)||_o(u)&&_o(c)&&(No(u)||No(c)||Ao(u)||Ao(c))?t[l]=ir(u,c,r,o):u==null&&No(c)?t[l]=ir({},c,r,o):u==null&&Ao(c)?t[l]=js(c):(u===void 0||c!==void 0)&&(t[l]=c)}return t}function So(t,...n){return Hd(t,...n,Id)}const Ud=(t,n="pid",r="id")=>{const o={},i={};t.forEach(d=>{i[d[r]]=d,o[d[n]]?o[d[n]].push(d[r]):o[d[n]]=[d[r]]});let a=[];const l=function(d,f){return i[d]?.[n]&&(f.push(i[d][n]),l(i[d][n],f)),f},c=function(d,f){const p=o[d];return p&&(f.push(...p),p.forEach(h=>{if(o[h])return c(h,f)})),f};function u(d){const f=i[d];f&&(a.push(f),(o[d]||[]).forEach(p=>{u(p)}))}(o[0]||[]).forEach(d=>{u(d)});for(let d=0;d<a.length;d++)a[d].pid?a[d].treePid=l(a[d].id,[]):a[d].treePid=[],a[d]._child=o[a[d].id]??[],a[d]._isParent=!!a[d]._child.length,a[d]._childs=c(a[d].id,[]);return a};s.reactive({table:{},limit:10,page:1,pageSizes:[],tree:!1}),s.reactive({limit:10,page:1});function Wd(t){const n={title:"数据列表",pageSizes:[10,15,30,50,100],pk:"id",page:1,limit:15,...globalThis._plugins?.table??{},...t};return n.tree&&!t.page&&(n.page=0),n}async function qd(t){const n=(g,y=!0,v=!1)=>{if(!g||!g.data)return{msg:g?.msg||"暂无数据",data:[],count:0};let D=g.data;v&&(D=Ud(D));const w=Object.keys(f);for(var b=0;b<D.length;b++)w.length>0&&w.forEach(x=>{D[b][x]=f[x](D[b][x])}),D[b].ROW_ON=!!D[b].ROW_ON||!1,D[b].ROW_KEY=D[b].ROW_KEY||D[b][p]||Math.random();return{data:D,count:g.count}},{limit:o,sort:i,where:a,page:l,url:c,data:u,cache:d,cellFmt:f,pk:p}=t;let h=null;const m={page:l,limit:o,where:a,sort:i};if(c){const{data:g=void 0,msg:y}=await $req.post(c,m,void 0,Number(d&&!0));if(!g)return{msg:y,data:[],count:0};h=g,h.msg=y}else typeof u=="function"?h=await u(m):u&&(h={data:u,count:u.length});return n(h,!1,t.tree)}const Kd=(t,n="数据",r={},o=null)=>{let i="";a(1);function a(l,c=[0,0,0]){l!=1&&(c[0]-c[1],l*c[1]-c[1]+1),$req.post(t,{where:r,page:l,id:c[2]}).then(function(u){u.code==0?typeof u.data[1]=="object"?(o&&u.data[1].forEach(d=>{o(d)}),$a.csv.export(u.data[0],u.data[1],(u.data[2]||n)+".csv")):(i=i+u.data[1],u.data[3]?a(Number(l)+1,u.data[3]):($a.csv.export(u.data[0],i,(u.data[2]||n)+".csv","text"),i="")):$msg.error(u.msg)})}},ne=(t,n)=>{const r=t.__vccOpts||t;for(const[o,i]of n)r[o]=i;return r},Jd={emits:["change"],props:{init:Object,disabled:Boolean,count:Number},data(){return{page:1,limit:10}},created(){this.page=this.init.page,this.limit=this.init.limit},watch:{limit:{handler(t){this.$emit("change","limit",t)}},page:{handler(t){this.$emit("change","page",t)}}}},Gd={class:"table-footer"},Yd={key:0};function Zd(t,n,r,o,i,a){const l=s.resolveComponent("el-pagination");return s.openBlock(),s.createElementBlock("div",Gd,[s.createElementVNode("div",null,[s.renderSlot(t.$slots,"left")]),r.init.page?(s.openBlock(),s.createElementBlock("div",Yd,[s.createVNode(l,{layout:"total,sizes,prev,pager,next,jumper",disabled:r.disabled,background:"",total:r.count,"current-page":i.page,"onUpdate:currentPage":n[0]||(n[0]=c=>i.page=c),"page-sizes":r.init.pageSizes,pageSize:i.limit,"onUpdate:pageSize":n[1]||(n[1]=c=>i.limit=c)},null,8,["disabled","total","current-page","page-sizes","pageSize"])])):s.createCommentVNode("",!0)])}const Xd=ne(Jd,[["render",Zd]]),Qd={key:0,class:"table-tool-footer"},ef={class:"color-primary"},tf={__name:"tableBatch",props:{checkAllChange:Function,batch:Array,tabs:Array,tabsIndex:Number,table:Object},setup(t){const{checkData:n,uniApi:r,config:o,pk:i}=s.inject("table"),a=l=>{const c=n.value.map(u=>u[i]);if(l.action=="del"){if(!o?.del?.url)return $msg.warning("del.url undefined");r(c,{},o.del.url)}else typeof l.action=="object"?r(c,l.action.data,l.action.api||l.action.url):typeof l.action=="function"?l.action(c,tableData.value,n.value):$msg.error("action undefined")};return(l,c)=>{const u=s.resolveComponent("el-link"),d=s.resolveComponent("el-button"),f=s.resolveComponent("el-popconfirm");return s.unref(n).length>0&&t.batch&&(t.tabs&&t.batch[0].constructor===Array?t.batch[t.tabsIndex].length:t.batch.length)?(s.openBlock(),s.createElementBlock("div",Qd,[s.createElementVNode("div",null,[c[2]||(c[2]=s.createTextVNode(" 已选择 ",-1)),s.createElementVNode("span",ef,s.toDisplayString(s.unref(n).length),1),c[3]||(c[3]=s.createTextVNode(" 条数据 ",-1)),s.createVNode(u,{type:"primary",onClick:c[0]||(c[0]=p=>t.checkAllChange(!1))},{default:s.withCtx(()=>[...c[1]||(c[1]=[s.createTextVNode("取消选择",-1)])]),_:1})]),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.tabs&&t.batch&&t.batch[0].constructor===Array?t.batch[t.tabsIndex]:t.batch,p=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[p.confirm?(s.openBlock(),s.createBlock(f,{key:0,title:`确定要将选中的数据${p.title}吗`,onConfirm:h=>a(p)},{reference:s.withCtx(()=>[s.createVNode(d,{type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(p.title),1)]),_:2},1024)]),_:2},1032,["title","onConfirm"])):(s.openBlock(),s.createBlock(d,{key:1,type:"primary",onClick:h=>a(p)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(p.title),1)]),_:2},1032,["onClick"]))],64))),256))])])):s.createCommentVNode("",!0)}}},nf={key:1,style:{"margin-bottom":"-12px","margin-top":"-6px"},id:"table-form-header"},rf={class:"overflow-hidden"},of={class:"dialog-footer"},sf=s.defineComponent({__name:"tableDialog",setup(t,{expose:n}){const r=s.inject("table"),o=s.ref(!1),i=s.ref({}),a=s.ref($config?.form?.btnText??"提交"),l=s.ref(0),c=s.useTemplateRef("formRef"),u=()=>{r.rowsIndex=-1};function d(h){i.value=h,l.value=(h.title||"")+(h.data.ROW_KEY||h.data.id||0),h?.confirmButton?.text&&(a.value=h.confirmButton.text),c.value?.setData(h.data,!0),o.value=!0}const f=()=>{c.value.fnSubmit()};function p(){o.value=!1}return n({show:d,close:p}),(h,m)=>{const g=s.resolveComponent("admin-form"),y=s.resolveComponent("el-scrollbar"),v=s.resolveComponent("el-button"),D=s.resolveComponent("el-dialog");return s.openBlock(),s.createBlock(D,{fullscreen:!!s.unref(i).fullscreen,"align-center":"","append-to-body":"",modelValue:s.unref(o),"onUpdate:modelValue":m[1]||(m[1]=w=>s.isRef(o)?o.value=w:null),"z-index":99,width:s.unref(i)?.width||"50%",onClose:u},{header:s.withCtx(()=>[s.unref(i).title!=="tabs"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(s.unref(i).title||"-"),1)],64)):(s.openBlock(),s.createElementBlock("div",nf))]),footer:s.withCtx(()=>[s.createElementVNode("span",of,[s.renderSlot(h.$slots,"form-bottom",{form:s.unref(i).form,data:s.unref(i).data},()=>[s.createVNode(v,{onClick:m[0]||(m[0]=w=>p())},{default:s.withCtx(()=>[...m[2]||(m[2]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(v,{type:"primary",onClick:f},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(s.unref(a)),1)]),_:1})])])]),default:s.withCtx(()=>[s.createElementVNode("div",rf,[s.createVNode(y,{height:"100%","max-height":"70vh"},{default:s.withCtx(()=>[s.unref(i).form?(s.openBlock(),s.createBlock(g,{data:s.unref(i).data,key:s.unref(l),ref_key:"formRef",ref:c,onSubmit:s.unref(r).dialogSubmit,beforeSubmit:s.unref(i).form.beforeSubmit,onChange:s.unref(i).form.change,onEnd:s.unref(i).form.end,init:s.unref(i).form,slot:s.unref(i).slot},null,8,["data","onSubmit","beforeSubmit","onChange","onEnd","init","slot"])):s.createCommentVNode("",!0)]),_:1})])]),_:3},8,["fullscreen","modelValue","width"])}}}),af={key:0,class:"cate-search bg-main pl pb mb-xs"},lf={class:"flex-center pt"},cf={key:0,class:"label px-sm"},uf=s.defineComponent({__name:"tableNav",setup(t){const{init:n,navChange:r}=s.inject("table"),o=s.ref(n.where??{});return(i,a)=>{const l=s.resolveComponent("el-radio-button"),c=s.resolveComponent("el-radio-group");return s.unref(n).cate?(s.openBlock(),s.createElementBlock("div",af,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(n).cate.cols,u=>(s.openBlock(),s.createElementBlock("div",lf,[u.title?(s.openBlock(),s.createElementBlock("div",cf,s.toDisplayString(u.title),1)):s.createCommentVNode("",!0),s.createVNode(c,{size:"small",modelValue:s.unref(o)[u.field],"onUpdate:modelValue":d=>s.unref(o)[u.field]=d,onChange:s.unref(r)},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.cols,(d,f)=>(s.openBlock(),s.createBlock(l,{value:f},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(d),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),256))])):s.createCommentVNode("",!0)}}}),df={name:"admin-table-tool",props:{init:Array,length:{type:Number,default:3}},emits:["change"],computed(){this.init||(this.init=[])},methods:{click(t,n){this.$emit("change",{index:n,...t})}}},ff={style:{cursor:"pointer",color:"#0D84FF"},class:"flex"},pf={style:{"text-align":"center"}},hf=["onClick"];function mf(t,n,r,o,i,a){const l=s.resolveComponent("el-link"),c=s.resolveComponent("el-popconfirm"),u=s.resolveComponent("el-divider"),d=s.resolveComponent("el-dropdown-item"),f=s.resolveComponent("el-dropdown-menu"),p=s.resolveComponent("el-dropdown");return s.openBlock(),s.createElementBlock(s.Fragment,null,[r.init?.length?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(r.init||[],(h,m)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[m<r.length&&r.init.length<=r.length||m<r.length-1&&r.init.length>r.length?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[h.confirm?(s.openBlock(),s.createBlock(c,{key:0,title:typeof h.confirm=="string"?h.confirm:"确认要执行"+h.title+"操作吗",onConfirm:g=>a.click(h,m)},{reference:s.withCtx(()=>[s.createVNode(l,{type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(h.title),1)]),_:2},1024)]),_:2},1032,["title","onConfirm"])):(s.openBlock(),s.createBlock(l,{key:1,type:"primary",onClick:g=>a.click(h,m)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(h.title),1)]),_:2},1032,["onClick"]))],64)):s.createCommentVNode("",!0),m<r.init.length-1&&m<r.length-1?(s.openBlock(),s.createBlock(u,{key:1,direction:"vertical"})):s.createCommentVNode("",!0)],64))),256)):s.createCommentVNode("",!0),r.init?.length>r.length?(s.openBlock(),s.createBlock(p,{key:1},{dropdown:s.withCtx(()=>[s.createVNode(f,null,{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.init,(h,m)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[m>r.length-2?(s.openBlock(),s.createBlock(d,{key:0},{default:s.withCtx(()=>[h.confirm?(s.openBlock(),s.createBlock(c,{key:0,title:typeof h.confirm=="string"?h.confirm:"确认要执行"+h.title+"操作吗",onConfirm:g=>a.click(h,m)},{reference:s.withCtx(()=>[s.createElementVNode("div",pf,s.toDisplayString(h.title),1)]),_:2},1032,["title","onConfirm"])):(s.openBlock(),s.createElementBlock("div",{key:1,style:{"text-align":"center"},onClick:g=>a.click(h,m)},s.toDisplayString(h.title),9,hf))]),_:2},1024)):s.createCommentVNode("",!0)],64))),256))]),_:1})]),default:s.withCtx(()=>[s.createElementVNode("span",ff,[s.createVNode(l,{type:"primary"},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("更多",-1)])]),_:1}),n[1]||(n[1]=s.createElementVNode("i",{class:"i-ri-arrow-down-s-line"},null,-1))])]),_:1})):s.createCommentVNode("",!0)],64)}const gf=ne(df,[["render",mf]]),yf={props:{init:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}}},data(){return{pk:"",titleName:"",imgName:""}},created(){const{pk:t="id",titleName:n="title",imgName:r="img"}=this.init;this.pk=t,this.titleName=n,this.imgName=r}},bf={class:"flex py-sm leading-tight max-w-200px"},Cf={class:"flex-col ml-sm flex-1 overflow-hidden"},vf={class:"font-md line-1"},Df={style:{color:"#F56C6C"}},wf={key:1,class:"flex-col ml-sm"},xf={class:"font-md op-70"};function Bf(t,n,r,o,i,a){const l=s.resolveComponent("a-image");return s.openBlock(),s.createElementBlock("div",bf,[i.pk&&r.data&&r.data[i.pk]?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[r.data[i.imgName]?(s.openBlock(),s.createBlock(l,{key:0,width:"36px",height:"36px",borderRadius:"36px",src:r.data[i.imgName],preview:!1,class:"img"},null,8,["src"])):s.createCommentVNode("",!0),s.createElementVNode("div",Cf,[s.createElementVNode("div",vf,s.toDisplayString(r.data[i.titleName]),1),s.createElementVNode("div",Df,"ID:"+s.toDisplayString(r.data[i.pk]),1)])],64)):(s.openBlock(),s.createElementBlock("div",wf,[s.createElementVNode("div",xf,s.toDisplayString(r.init?.error||"数据不存在"),1)]))])}const Ls=ne(yf,[["render",Bf]]),kf={components:{Tool:gf,imgInfo:Ls},props:{prop:Object,index:Number,colIndex:Number,item:Object,modelValue:{type:null}},inject:["table"],watch:{item:{handler(t){this.init.format&&this.setValue(t[this.init.field])}},modelValue(t){this.setValue(t)}},data(){return{key:0,init:{},loading:!1,component:null,type:"",toolBtns:[],switchProps:null,value:null}},computed:{formatValue(){let t=[];if(this.init.type==="status")return t=["--","info"],this.init.cols?t=this.init.cols[this.value]:this.value==0?t=["否","info"]:t=["是","primary"],t}},created(){const t=$config?.table?.shortcuts?.[this.prop.type];t?this.init=$a.object.deepMerge(t,this.prop,{type:t.type}):this.init=this.prop;let{type:n,component:r}=this.init;r?this.component=s.markRaw(r):typeof r=="string"&&(this.component=r),typeof n=="function"?this.type=n(this.item):this.type=n,this.setValue(this.modelValue),this.type==="switch"&&this.calculateSwitchProps()},methods:{calculateSwitchProps(){!this.init.cols&&[0,1,!0,!1].indexOf(this.value)>-1?this.switchProps={inactiveValue:this.init.cols?.[0]??(yo.isBoolean(this.value)?!1:0),activeValue:this.init.cols?.[1]??(yo.isBoolean(this.value)?!0:1),inactiveText:this.init.cols?.[2]??"否",activeText:this.init.cols?.[3]??"是",inlinePrompt:!0,disabled:!!this.init.disabled}:this.switchProps=null},setValue(t){typeof this.init.format=="function"?this.value=this.init.format(t,this.item):this.value=t},async doSwitch(t){this.loading=!1,await this.table.cellEdit({value:t},this.index,this.init)===!1&&(this.value=this.modelValue),this.loading=!1}}},Ef={key:1,class:"pl"},_f={key:1},Af={key:0,class:"tags"},Nf={key:0,class:"table-goods flex py-xs"},Sf={class:"flex-col ml-sm flex-1 overflow-hidden",style:{}},Ff={class:"line-1"},Vf={class:"text-color-regular"},Of={class:"color-danger"};function Tf(t,n,r,o,i,a){const l=s.resolveComponent("a-text-edit"),c=s.resolveComponent("el-checkbox"),u=s.resolveComponent("el-switch"),d=s.resolveComponent("tool"),f=s.resolveComponent("a-image"),p=s.resolveComponent("el-badge"),h=s.resolveComponent("el-tag"),m=s.resolveComponent("a-text-status"),g=s.resolveComponent("img-info"),y=s.resolveComponent("el-link"),v=s.resolveComponent("a-cate-text"),D=s.resolveComponent("a-time"),w=s.resolveComponent("a-region-text");return!i.type&&!i.component?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[i.init.edit?(s.openBlock(),s.createBlock(l,{key:0,onSave:n[0]||(n[0]=b=>{a.table.cellEdit(b,r.index,i.init)}),text:i.value},null,8,["text"])):a.table.init.tree&&r.colIndex===(a.table.init.treeIndex||0)&&(!r.item.pid||a.table.fnTreeShow(r.index)>=0)?(s.openBlock(),s.createElementBlock("div",{key:1,class:"flex items-center line-height click",onClick:n[1]||(n[1]=b=>a.table.fnTreeOn(r.index))},[s.createElementVNode("span",{style:s.normalizeStyle("padding-left:"+r.item.treePid.length*18+"px")},null,4),r.item._isParent?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["font-xl click size-5",a.table.treeOn.value.indexOf(r.item.id)>-1?"i-ri-arrow-down-s-fill":"i-ri-arrow-right-s-fill"])},null,2)):(s.openBlock(),s.createElementBlock("span",Ef)),s.createTextVNode(" "+s.toDisplayString(i.value),1)])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:2},[s.createTextVNode(s.toDisplayString(i.value),1)],64))],64)):i.type==="checkbox"?(s.openBlock(),s.createBlock(c,{key:1,value:r.index,checked:r.item.ROW_ON,modelValue:r.item.ROW_ON,"onUpdate:modelValue":n[2]||(n[2]=b=>r.item.ROW_ON=b)},null,8,["value","checked","modelValue"])):i.type==="switch"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:2},[i.switchProps?(s.openBlock(),s.createBlock(u,s.mergeProps({key:0,loading:i.loading,modelValue:i.value,"onUpdate:modelValue":n[3]||(n[3]=b=>i.value=b)},i.switchProps,{onChange:a.doSwitch}),null,16,["loading","modelValue","onChange"])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(i.value),1)],64))],64)):i.type==="tool"?(s.openBlock(),s.createBlock(d,{key:3,onChange:n[4]||(n[4]=b=>{a.table.rowAction(b,r.index,i.init)}),length:i.init.maxLength||3,init:a.table.getCellTool(i.init,r.item)},null,8,["length","init"])):i.type==="img"||i.type==="image"?(s.openBlock(),s.createBlock(f,{key:4,src:i.value,preview:!!i.init.preview,width:i.init.width||"40px",height:i.init.height||"40px",fit:"scale-down"},null,8,["src","preview","width","height"])):i.type==="imgs"||i.type==="images"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:5},[typeof i.value=="object"&&i.value?.length?(s.openBlock(),s.createBlock(p,{key:0,hidden:i.value?.length<=1,"badge-class":"imgs-badge",type:"primary",value:i.value?.length},{default:s.withCtx(()=>[s.createVNode(f,{src:i.value[0],preview:i.value,width:i.init.width||"40px",height:i.init.height||"40px",fit:"scale-down"},null,8,["src","preview","width","height"])]),_:1},8,["hidden","value"])):(s.openBlock(),s.createElementBlock("span",_f,"无"))],64)):i.type==="text"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:6},[i.init.cols?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(i.init.textClass)},s.toDisplayString(i.init.cols[i.value]||i.init.default),3)):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(i.init.textClass)},s.toDisplayString(i.value||i.init.default),3))],64)):i.type==="tags"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:7},[i.value||i.value===0?(s.openBlock(),s.createElementBlock("div",Af,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(typeof i.value=="object"?i.value:(i.value+"").split(","),b=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[i.init.cols?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[i.init.cols[b]?(s.openBlock(),s.createBlock(h,{key:0,type:i.init.tagsType??"primary",size:"small"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.init.cols[b]),1)]),_:2},1032,["type"])):s.createCommentVNode("",!0)],64)):(s.openBlock(),s.createBlock(h,{key:1,type:i.init.tagsType??"primary",size:"small"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(b),1)]),_:2},1032,["type"]))],64))),256))])):s.createCommentVNode("",!0)],64)):i.type==="status"?(s.openBlock(),s.createBlock(m,{key:8,status:a.formatValue[1]},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(a.formatValue[0]),1)]),_:1},8,["status"])):i.type==="img-info"?(s.openBlock(),s.createBlock(g,{key:9,init:i.init.init,data:r.item[i.init.field]},null,8,["init","data"])):i.type==="goods"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:10},[i.value&&typeof i.value=="object"?(s.openBlock(),s.createElementBlock("div",Nf,[s.createVNode(f,{height:"60px",width:"60px",lazy:"",fit:"cover",preview:!1,src:i.value.head_img},null,8,["src"]),s.createElementVNode("div",Sf,[s.createElementVNode("div",Ff,s.toDisplayString(i.value.title),1),s.createElementVNode("div",Vf,"价格:"+s.toDisplayString(i.value.price),1),s.createElementVNode("div",Of,"商品ID:"+s.toDisplayString(i.value.id),1)])])):s.createCommentVNode("",!0)],64)):i.type==="link"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:11},[i.init.on?(s.openBlock(),s.createBlock(y,{key:0,type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.value),1)]),_:1})):(s.openBlock(),s.createBlock(y,{key:1,type:"primary",onClick:n[5]||(n[5]=b=>t.$go.to(i.init.url,r.item))},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.value),1)]),_:1}))],64)):i.type==="cate"?(s.openBlock(),s.createBlock(v,s.mergeProps({key:12,modelValue:i.value,"onUpdate:modelValue":n[6]||(n[6]=b=>i.value=b),format:i.init.format,"show-num":i.init.showNum,type:i.init.cateType,color:i.init.cateColor,url:i.init.url},i.init.props),null,16,["modelValue","format","show-num","type","color","url"])):i.type==="times"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:13},[i.value&&i.value.constructor===Array?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createVNode(D,{date:i.value[0]},null,8,["date"]),n[8]||(n[8]=s.createTextVNode("~ ",-1)),s.createVNode(D,{date:i.value[1]},null,8,["date"])],64)):s.createCommentVNode("",!0)],64)):i.type==="time"?(s.openBlock(),s.createBlock(D,{key:i.value,format:i.init.format,date:i.value},null,8,["format","date"])):i.type==="region"?(s.openBlock(),s.createBlock(w,{key:15,code:i.value},null,8,["code"])):i.type==="index"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:16},[s.createTextVNode(s.toDisplayString(r.index+1),1)],64)):i.component?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.component),{key:17,modelValue:i.value,"onUpdate:modelValue":n[7]||(n[7]=b=>i.value=b)},null,8,["modelValue"])):s.createCommentVNode("",!0)}const jf=ne(kf,[["render",Tf]]),Pf={class:"table-main table-fixed border-collapse",cellspacing:"0",cellpadding:"0"},Lf=["width"],Mf={key:0},zf={class:"cell line-1"},$f={key:0},If=["onClick"],Rf={class:"sort"},Hf={key:0,class:"text-3 pl-sm",style:{color:"var(--el-color-info)"}},Uf={key:0,class:"cols-tool"},Wf=["colspan"],qf={class:"cols-tool-main"},Kf=["onClick"],Jf={__name:"main",props:{height:String,data:Array,init:Object},setup(t){const{onSort:n,sort:r,cellClick:o,tableData:i,checkData:a,fnTreeShow:l}=s.inject("table"),c=s.ref(-1),u=p=>{i.value.map(h=>{h.ROW_ON=p})},d=s.ref(),f={};return t.init.cols.forEach(p=>{p.type=="switch"&&(f[p.field]=h=>Number(h)||0)}),d.value=t.init.cols,s.watch(()=>i,(p={},h={})=>{console.log("watch tableData")}),(p,h)=>{const m=s.resolveComponent("el-checkbox"),g=s.resolveComponent("el-scrollbar");return s.openBlock(),s.createBlock(g,{"max-height":t.height},{default:s.withCtx(()=>[s.createElementVNode("table",Pf,[s.createElementVNode("colgroup",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(d.value,y=>(s.openBlock(),s.createElementBlock("col",{width:y.width},null,8,Lf))),256))]),t.init.header!==!1?(s.openBlock(),s.createElementBlock("thead",Mf,[s.createElementVNode("tr",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(d.value,y=>(s.openBlock(),s.createElementBlock("th",{class:s.normalizeClass([y.fixed?"fixed-"+y.fixed:""])},[s.createElementVNode("div",zf,[y.type=="checkbox"?(s.openBlock(),s.createElementBlock("div",$f,[(s.openBlock(),s.createBlock(m,{style:{height:"20px"},key:"all"+s.unref(a).length,indeterminate:s.unref(a).length!=s.unref(i).length&&s.unref(a).length!=0,checked:s.unref(a).length>0,onChange:u},null,8,["indeterminate","checked"]))])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[y.sort?(s.openBlock(),s.createElementBlock("div",{key:0,style:s.normalizeStyle({justifyContent:y.type=="tool"?"center":"left"}),class:"click",onClick:v=>s.unref(n)(y.field)},[s.createElementVNode("span",null,s.toDisplayString(y.title),1),s.createElementVNode("span",Rf,[s.createElementVNode("i",{class:s.normalizeClass(["i-ri-arrow-up-s-fill",{"color-primary!":s.unref(r)[y.field]=="asc"}])},null,2),s.createElementVNode("i",{class:s.normalizeClass(["i-ri-arrow-down-s-fill",{"color-primary!":s.unref(r)[y.field]=="desc"}])},null,2)])],12,If)):(s.openBlock(),s.createElementBlock("div",{key:1,style:s.normalizeStyle({justifyContent:y.type=="tool"?"center":"left"})},[s.createElementVNode("span",null,[s.createTextVNode(s.toDisplayString(y.title)+" ",1),y.subTitle?(s.openBlock(),s.createElementBlock("span",Hf,s.toDisplayString(y.subTitle),1)):s.createCommentVNode("",!0)])],4))],64))])],2))),256))])])):s.createCommentVNode("",!0),s.createElementVNode("tbody",{class:s.normalizeClass(t.init.class)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(i),(y,v)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:y.ROW_KEY},[p.$slots.colsTool?(s.openBlock(),s.createElementBlock("tr",Uf,[s.createElementVNode("td",{colspan:d.value.length},[s.createElementVNode("div",qf,[s.renderSlot(p.$slots,"colsTool",{key:v,row:y})])],8,Wf)])):s.createCommentVNode("",!0),s.createElementVNode("tr",{class:s.normalizeClass(["tr",{hover:c.value==v,isTool:t.init.colsTool}])},[!t.init.tree||t.init.tree&&(!y.pid||s.unref(l)(v)>=0)?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(d.value,(D,w)=>(s.openBlock(),s.createElementBlock("td",{class:s.normalizeClass([D.fixed?"fixed-"+D.fixed:""])},[s.createElementVNode("div",{class:s.normalizeClass(["cell",[D.class,D.on?"click":""]]),style:s.normalizeStyle({justifyContent:D.type=="tool"?"center":"start",color:D.color,fontWeight:D.fontWeight}),onClick:b=>s.unref(o)(D,v)},[D.slot===!0?s.renderSlot(p.$slots,"cols."+D.field,{key:v,row:y}):D.slot&&typeof D.slot=="string"?s.renderSlot(p.$slots,D.slot,{key:v,row:y}):(s.openBlock(),s.createBlock(jf,{key:2,prop:D,item:y,colIndex:w,index:v,"model-value":s.unref(Yt)(y,D.field)},null,8,["prop","item","colIndex","index","model-value"]))],14,Kf)],2))),256)):s.createCommentVNode("",!0)],2)],64))),128))],2)])]),_:3},8,["max-height"])}}},Gf=s.defineComponent({__name:"tableTabs",props:{modelValue:Number},setup(t){const n=s.ref(t.modelValue),{init:r,tabsChange:o,toolAction:i}=s.inject("table");return(a,l)=>{const c=s.resolveComponent("el-radio-button"),u=s.resolveComponent("el-radio-group"),d=s.resolveComponent("el-button");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.unref(r).tabs?(s.openBlock(),s.createBlock(u,{key:0,class:"mr table-el-radio-group",onChange:s.unref(o),modelValue:s.unref(n),"onUpdate:modelValue":l[0]||(l[0]=f=>s.isRef(n)?n.value=f:null)},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(r).tabs,(f,p)=>(s.openBlock(),s.createBlock(c,{value:p},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(f.title),1)]),_:2},1032,["value"]))),256))]),_:1},8,["onChange","modelValue"])):s.createCommentVNode("",!0),s.unref(r).tools?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(s.unref(r).tools,f=>(s.openBlock(),s.createBlock(d,{type:f.type??"primary",onClick:p=>s.unref(i)(f)},{default:s.withCtx(()=>[f.icon||f.action==="add"?(s.openBlock(),s.createElementBlock("i",{key:0,class:s.normalizeClass(f.icon||{add:"i-ri-add-line"}[f.action])},null,2)):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(f.title||{add:"添加"}[f.action]),1)]),_:2},1032,["type","onClick"]))),256)):s.createCommentVNode("",!0)],64)}}}),Yf={emits:["change"],props:{init:Object,data:Object},watch:{show(){this.resize(window.innerWidth)}},data(){return{span:{sm:24,md:12,lg:8,xl:6},sum:0,formData:{},changeData:{},offset:0,cols:[],limit:3,spread:!1,keyTime:0,right:!0}},created(){if(this.init?.span&&(this.span=this.init.span),!this.init?.cols)return;this.cols=this.init.cols,this.sum=this.init.cols.length;let t={};this.init.spread&&(this.spread=!0),this.cols.forEach(n=>{this.data&&this.data[n.field]?t[n.field]=this.data[n.field]:t[n.field]=n.value||"",t[n.field]||(n.type=="dates"||n.type=="datetimes"||n.type=="input-select"?t[n.field]=[]:t[n.field]="")}),this.formData=t},mounted(){this.resize(window.innerWidth),window.onresize=()=>{this.resize(window.innerWidth)}},methods:{onChange(t,n){t&&typeof t=="object"&&t.isJoin&&(n=t.field,t=t.data),this.changeData[n]=t},fnSearch(){this.$emit("change",this.changeData)},resetFields(){this.keyTime++;let t={};this.cols.forEach(function(n){n.type=="dates"||n.type=="datetimes"?t[n.field]=[]:t[n.field]=""}),this.changeData={},this.formData=t,this.$emit("change",{})},resize(t){if(this.right=!1,t>=1920)this.limit=3;else if(t>1200)this.limit=2;else if(t>992)this.limit=1;else{this.limit=1,this.right=!0;return}this.sum<=this.limit||t<992?this.offset=0:this.offset=24/(this.limit+1)*this.limit-this.sum%(this.limit+1)*24/(this.limit+1),this.offset!=0&&(this.right=!0)}}},Zf={key:1,class:"flex-col text-right line-height"},Xf={class:"op-70 text-3 pt-xs line-2"},Qf={class:""};function ep(t,n,r,o,i,a){const l=s.resolveComponent("a-inputs"),c=s.resolveComponent("el-form-item"),u=s.resolveComponent("el-col"),d=s.resolveComponent("el-button"),f=s.resolveComponent("el-link"),p=s.resolveComponent("el-row"),h=s.resolveComponent("el-form");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["admin-search",r.init.class])},[i.sum>0&&i.formData?(s.openBlock(),s.createBlock(h,{key:0,size:r.init.size,ref:"search",model:i.formData},{default:s.withCtx(()=>[s.createVNode(p,s.mergeProps({gutter:r.init.gutter??20},r.init.row),{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,(m,g)=>s.withDirectives((s.openBlock(),s.createBlock(u,s.mergeProps({ref_for:!0},m?.span??i.span),{default:s.withCtx(()=>[s.createVNode(c,{"label-width":m.title?r.init.labelWidth||m.labelWidth||90:20,prop:m.field,class:s.normalizeClass(m.class)},{label:s.withCtx(()=>[m.subTitle?(s.openBlock(),s.createElementBlock("div",Zf,[s.createElementVNode("span",null,s.toDisplayString(m.title),1),s.createElementVNode("span",Xf,s.toDisplayString(m.subTitle),1)])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(m.title),1)],64))]),default:s.withCtx(()=>[(s.openBlock(),s.createBlock(l,{size:r.init.size,style:{width:"100%"},index:g,key:m.field+"-"+g+"-"+i.keyTime,modelValue:i.formData[m.field],"onUpdate:modelValue":[y=>i.formData[m.field]=y,y=>a.onChange(y,m.field)],prop:m},null,8,["size","index","modelValue","onUpdate:modelValue","prop"]))]),_:2},1032,["label-width","prop","class"])]),_:2},1040)),[[s.vShow,g<i.limit||i.spread]])),256)),s.createVNode(u,s.mergeProps(r.init.btn?.span??i.span,{offset:i.spread?i.offset:0}),{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex w-full items-center mb-4.5",[{"justify-end":(i.spread||i.limit===1)&&i.right},r.init.btn?.class]])},[r.init?.btn?.reset!==!1?(s.openBlock(),s.createBlock(d,{key:0,onClick:n[0]||(n[0]=m=>a.resetFields())},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(r.init?.btn?.reset??"重置"),1)]),_:1})):s.createCommentVNode("",!0),s.createVNode(d,{type:"primary",onClick:n[1]||(n[1]=m=>a.fnSearch())},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(r.init.btn?.text??"查询"),1)]),_:1}),s.withDirectives(s.createElementVNode("div",Qf,[s.withDirectives(s.createVNode(f,{class:"ml",onClick:n[2]||(n[2]=m=>i.spread=!i.spread),type:"primary"},{default:s.withCtx(()=>[...n[4]||(n[4]=[s.createElementVNode("span",{class:"flex items-center"},[s.createTextVNode("更多查询"),s.createElementVNode("i",{class:"i-ri-arrow-down-s-line text-4"})],-1)])]),_:1},512),[[s.vShow,!i.spread]]),s.withDirectives(s.createVNode(f,{class:"ml",onClick:n[3]||(n[3]=m=>i.spread=!i.spread),type:"primary"},{default:s.withCtx(()=>[...n[5]||(n[5]=[s.createElementVNode("span",{class:"flex items-center"},[s.createTextVNode("收起"),s.createElementVNode("i",{class:"i-ri-arrow-up-s-line"})],-1)])]),_:1},512),[[s.vShow,i.spread]])],512),[[s.vShow,i.sum>i.limit]])],2)]),_:1},16,["offset"])]),_:1},16,["gutter"])]),_:1},8,["size","model"])):s.createCommentVNode("",!0)],2)}const Ms=ne(Yf,[["render",ep]]),Fo={table:{}},tp={class:"admin-table-page"},np={key:1,class:"mb bg-main h-19"},rp={class:"admin-table rounded-md"},op={key:0,class:"table-header"},ip={key:0,class:"left flex-1"},sp={key:1,class:"left"},ap={class:"right flex"},lp={key:3,class:"table-no-data"},cp=s.defineComponent({__name:"table",props:{init:Object},emits:["change"],setup(t,{expose:n,emit:r}){const o=A=>{const L={};for(const Y in A)if(Object.hasOwnProperty.call(A,Y)){const J=A[Y];Y.indexOf(".")>-1?dn(L,Y,J):L[Y]=J}return L},i=r,a=t,{proxy:l}=s.getCurrentInstance(),c=l.$route.path,u=Object.keys(l.$slots).filter(A=>["title","footer"].indexOf(A)===-1&&A.indexOf("form.")===-1),d=Wd(a.init);let{url:f="",title:p,success:h,sort:m={},pk:g,noPage:y=null,batch:v=null,tabs:D=null,cache:w}=d;const b={page:d.page,limit:d.limit};d.add&&!d.add?.title&&(d.add.title="添加"),d.edit&&!d.edit?.title&&(d.edit.title="编辑");let x=d.search?100:0;x=x+(p!==!1||l.$slots.title?52:0),x=x+(d.page||l.$slots.footer?56:0),x=x+(d.cate?60:0);const k=`calc(var(--main-height) - 24px - ${x}px)`,E=s.ref(0),B=s.ref({}),V=s.ref(d.where),T=s.ref(!0),P=s.ref([]),R=s.ref(0),I=s.ref("暂无数据"),U=s.ref(0),G=s.ref({}),W=s.ref(null),K=(A,L)=>{b[A]=L,ge()},X=A=>{E.value=A,B.value=D[A].where,P.value=[],b.page=1,ge()},oe=A=>{i("change",{type:"nav",data:A}),ge("nav")},re=(A,L=!1)=>{L&&U.value++,G.value=A,b.page=1,ge("search")},ie=A=>{re(A)},ce=d.name,Q=Fo.table[ce];if(Q&&(b.page=Q.page||b.page,b.limit=Q.limit||b.limit,m=Q.sort||m,G.value=Q.searchWhere||G.value,V.value=Q.where||V.value,E.value=Q.tabsIndex||0),s.onBeforeUnmount(()=>{if(ce){const A=ce===!0?f:ce;if(!A)return;Fo.table[A]={page:b.page,limit:b.limit,sort:m.value,searchWhere:G.value,where:V.value,tabsIndex:E.value}}}),!y&&l.$route.query){const A=$go.query(l.$route.query);G.value=A.where||{},E.value=A.tabs||0}D&&(B.value=D[E.value].where),m=s.ref(m);const xe=s.ref(-1),ge=async(A="init",L=!1)=>{T.value=!0;const Y={...B.value,...V.value,...G.value},{data:J,count:be,msg:z}=await qd({where:Y,page:b.page,limit:b.limit,sort:m.value,data:d.data,url:f,cache:w,cellFmt:Nt,pk:g,tree:d.tree});if(h&&h({data:J,count:be,msg:z}),z)return T.value=!1,I.value=z;P.value=J,R.value=be,T.value=!1},Je=(A=!0)=>P.value,Ge=(A=!0)=>{ge("reload",A)},Ne=A=>A.indexOf("http")>-1||typeof A=="function"||A.indexOf("/")>-1?A:d.url+"/"+A,Ce=(A,L={},Y="")=>{if(Y=Y||d?.edit?.url,!Y)return $msg.warning("url 未定义");if(A&&(L[g]=A),d.apiBefore&&typeof d.apiBefore=="function"){const J=d.apiBefore(Y,L);if(J===!1)return;if(typeof J=="string")return $msg.error(J);typeof J=="object"&&(L=J)}$req.post(Ne(Y),L,"处理中").then(J=>{J.code==0?(d.apiSuccess&&typeof d.apiSuccess=="function"&&d.apiSuccess("uniApi",L,Y),d.refresh!==!1&&ge(),$msg.success(J.msg)):$msg.error(J.msg)})},_e=(A,L=!1)=>{if(L!==!1)return m.value={},m.value[A]=L,ge();m.value[A]?m.value[A]==="asc"&&(L="desc"):L="asc",m.value={},L&&(m.value[A]=L),ge()},Me=s.computed(()=>P.value.filter(function(A){return A.ROW_ON})),nt=A=>{i("change",{type:"selection",data:A}),P.value.map(L=>{L.ROW_ON=A})},rt=(A,L)=>{typeof A.on=="function"?A.on(P.value[L],L):typeof A.on=="string"?Ye({action:A.on},L):Ye({action:A.on},L)},et=(A,L=-1,Y="")=>{L===-1&&(L=xe.value),L!==-1&&(P.value[L]={...P.value[L],...A},Y&&$msg.success(Y),xe.value=-1)},ot=(A,L,Y)=>{const J=Y.field;let be=Yt(P.value[L],J);if(!Od(P.value[L],J))return!1;let z=Ne(d.edit.url);Y.edit&&typeof Y.edit=="string"?z=Y.edit:Y.type=="switch"&&Y.url&&(z=Y.url);const ee=d.edit?.data??{};if(d.edit?.fields&&d.edit.fields.forEach(he=>{ee[he]=P.value[L][he]}),ee[g]=P.value[L][g],ee[J]=Y.valueformat?Y.valueformat(A.value):A.value,typeof z=="function")return z(ee,L);let ae=$loading("修改中");$req.post(z,o(ee)).then(he=>{ae.close(),he.code==0?(P.value[L]=dn(P.value[L],J,A.value),$msg.success("修改成功"),d.apiSuccess&&d.apiSuccess("cellEdit",L,ee),d.editUpdateTable&&ge()):(P.value[L]=dn(P.value[L],J,be),$msg.error(he.msg))})},Re=s.ref([]),mt=A=>{const L=P.value[A].treePid,Y=Re.value;return L.filter(function(be){return Y.indexOf(be)!==-1}).length-L.length},He=A=>{if(!P.value[A]._isParent)return;const L=P.value[A].id,Y=Re.value.indexOf(L);Y>-1?Re.value.splice(Y,1):Re.value.push(L)},ze=s.ref(),Dt=s.ref(),Nt={};if(d.cols||(d.cols=[]),d.cols.forEach(A=>{A.type=="checkbox"&&!A.width&&(A.width=40)}),v&&v.map(A=>{A.action==="del"&&(A.title=A.title||"删除",A.confirm===void 0&&(A.confirm=!0))}),D&&v){let A=[];D.forEach((L,Y)=>{A[Y]=v.filter(J=>J.tab===Y||typeof J.tab=="object"&&J.tab.indexOf(Y)>-1||!J.hasOwnProperty("tab"))}),v=A}const jt=(A,L)=>{if(typeof A.btn=="function")return A.btn(L);let Y=A.btn.filter(J=>J.tab===void 0||J.tab===E.value||typeof J.tab=="object"&&J.tab.indexOf(E.value)>-1);return Y?.map(J=>{!J.title&&typeof J.action=="string"&&(J.title={del:"删除",edit:"编辑",detail:"详情"}[J.action]||"",J.action==="del"&&J.confirm===void 0&&(J.confirm="确定要删除本条数据吗"))}),Y},ue={};async function le(A){ue[A.url]?ue[A.url].push(A):ue[A.url]=[A]}d.cols?.forEach(async A=>{A.type=="cate"&&A.url&&le(A)}),d.search?.cols&&d.search.cols.forEach(async A=>{["selects","select"].indexOf(A.type)>-1&&typeof A.url=="string"&&le(A)}),d.add?.cols&&d.add.cols.forEach(async A=>{["selects","select"].indexOf(A.type)>-1&&typeof A.url=="string"&&le(A)}),d.edit?.cols&&d.edit.cols.forEach(async A=>{["selects","select"].indexOf(A.type)>-1&&typeof A.url=="string"&&le(A)});const ve=Object.keys(ue);ve?.length?ve.forEach(async(A,L)=>{let Y=await $req.post(A);ue[A].forEach(J=>{J.url=Y.data}),L===ve.length-1&&(ze.value=d.search,ge())}):(ze.value=d.search,ge());const Ee=s.ref({}),Ue=(A,L,Y)=>{Y.cols.forEach(J=>{if(J.slot&&typeof J.slot!="function"){let be=typeof J.slot=="string"?J.slot:"form.cols."+J.field;l.$slots[be]&&(J.slot=l.$slots[be])}}),Y.url=Ne(Y.url),Ee.value={title:Y.title,width:Y.width,data:A,confirmButton:Y.confirmButton,form:{...Y,width:"100%",confirmButton:!1}},xe.value=L,W.value.show(Ee.value)},Ve=A=>{const{res:L,data:Y}=A;W.value.close();const J=Ee.value,be=P.value;L.code==0&&(J.form.success?J.form.success(Y,L.data):d.apiSuccess&&typeof d.apiSuccess=="function"&&d.apiSuccess("dialogSubmit",Y),xe.value>-1&&!d.tree&&!J.form.updateTable?be[xe.value]=So(be[xe.value],Y,{ROW_KEY:Math.random()}):d.refresh!==!1&&ge(),xe.value=-1)},Pe=async A=>{if(A.confirm){let L=A.confirm;if(typeof L=="function"){if(L()!==!0)return}else if(typeof L!="string"&&(L="确定要执行"+A.title+"操作?"),await $confirm(L)!="confirm")return}if(A.action=="add"){let L={};d.add?.data&&typeof d.add?.data=="function"?L=d.add.data():d.add?.data&&typeof d.add?.data=="object"&&(L=d.add.data),Ue(L,-1,{...d.edit,...d.add})}else if(typeof A.action=="object"&&A.action.type=="csv")Kd(A.action.url,A.action.name||"数据",A.action.where||{},A.action.format||null);else if(typeof A.action=="object"&&A.action.api){A.action.data||(A.action.data={});const L={...B.value,...V.value,...G.value,...A.action.data};Ce(0,L,A.action.api)}else typeof A.action=="object"?Ue({},-1,A.action):typeof A.action=="function"&&A.action()},Ye=async(A,L,Y={})=>{let J=P.value;if(!(Y.before&&Y.before(J[L],A)===!1))if(typeof A.action=="string")if(A.action=="edit")Ue(J[L],L,d.edit);else if(A.action=="del"){if(!d?.del?.url)return $msg.warning("del.url 未定义");let be={};d?.tree&&(be={child:[...J[L]._child],childs:[...J[L]._childs]}),Ce(J[L][g],be,d.del.url)}else if(A.action.indexOf("/")>-1){const be=A.action.split("?"),z={},ee=J[L];be[1]?(A.action=be[0],be[1].split(",").forEach(he=>{z[he]=ee[he]})):z[g]=ee[g],$go.to(A.action,z)}else $msg.error("error");else if(typeof A.action=="object"&&A.action.api)typeof A.action.api!="string"&&(A.action.api=d.edit.url),Ce(J[L][g],A.action.data,A.action.api);else if(typeof A.action=="object"&&typeof A.action.form=="function"){const be=await A.action.form(J[L],L);if(be.form)return Ue(be.data,L,be.form);Ue(J[L],L,be)}else typeof A.action=="object"?Ue(J[L],L,A.action):typeof A.action=="function"&&A.action(J[L],L)},Te=s.ref(!1),Le=(A=!0)=>{Te.value=A};s.watch(()=>l.$route.query,A=>{const L=l.$route.path;L!=c||!ze.value||(ze.value={...ze.value,spread:Dt.value?.spread},G.value=$go.query(A,"where"),b.page=Fo.table[L+"_page"]||1,U.value++,ge())});const Bt={getData:Je,search:re,init:d,treeOn:Re,cellEdit:ot,cellClick:rt,rowEdit:et,onSort:_e,sort:m,fnTreeShow:mt,fnTreeOn:He,setPageStatus:Le,checkAllChange:nt,navChange:oe,tabsChange:X,tableData:P,checkData:Me,reload:Ge,dialogForm:Ue,dialogSubmit:Ve,getCellTool:jt,rowAction:Ye,toolAction:Pe,uniApi:Ce,pk:g};return s.provide("table",Bt),n(Bt),(A,L)=>{const Y=s.resolveComponent("el-empty"),J=s.resolveDirective("loading");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(sf,{ref_key:"dialogRef",ref:W},null,512),s.createElementVNode("div",tp,[s.unref(d).cate?(s.openBlock(),s.createBlock(uf,{key:0})):s.createCommentVNode("",!0),s.unref(d).search&&!s.unref(ze)?(s.openBlock(),s.createElementBlock("div",np)):s.createCommentVNode("",!0),s.unref(ze)?(s.openBlock(),s.createBlock(Ms,{ref_key:"searchRef",ref:Dt,key:s.unref(U),init:s.unref(ze),data:s.unref(G),onChange:ie,class:s.normalizeClass(["mb bg-main pt-lg pr-lg rounded-md",s.unref(d).serachClass])},null,8,["init","data","class"])):s.createCommentVNode("",!0),s.createElementVNode("div",rp,[s.unref(d).title!==!1?(s.openBlock(),s.createElementBlock("div",op,[A.$slots.title?(s.openBlock(),s.createElementBlock("div",ip,[s.renderSlot(A.$slots,"title")])):(s.openBlock(),s.createElementBlock("div",sp,s.toDisplayString(s.unref(p)),1)),s.createElementVNode("div",ap,[s.createVNode(Gf,{modelValue:s.unref(E),"onUpdate:modelValue":L[0]||(L[0]=be=>s.isRef(E)?E.value=be:null)},null,8,["modelValue"])])])):s.createCommentVNode("",!0),A.$slots.default?s.renderSlot(A.$slots,"default",{key:1,data:s.unref(P),height:k}):s.withDirectives((s.openBlock(),s.createBlock(Jf,{key:2,init:t.init,data:s.unref(P),height:k},s.createSlots({_:2},[s.renderList(s.unref(u),be=>({name:be,fn:s.withCtx(({row:z,key:ee})=>[s.renderSlot(A.$slots,be,{key:ee,row:z})])}))]),1032,["init","data"])),[[J,s.unref(T)]]),!s.unref(d).hideEmpty&&s.unref(P).length==0&&!s.unref(T)?(s.openBlock(),s.createElementBlock("div",lp,[s.createVNode(Y,{"image-size":120,description:s.unref(I)},null,8,["description"])])):s.createCommentVNode("",!0),b.page||A.$slots.footer?(s.openBlock(),s.createBlock(Xd,{key:4,onChange:K,disabled:s.unref(Te),count:s.unref(R),init:{page:s.unref(d).page,limit:s.unref(d).limit,pageSizes:s.unref(d).pageSizes}},{left:s.withCtx(()=>[s.renderSlot(A.$slots,"footer",{data:s.unref(P)})]),_:3},8,["disabled","count","init"])):s.createCommentVNode("",!0)]),s.createVNode(tf,{checkAllChange:nt,batch:s.unref(d).batch,tabs:s.unref(D),"tabs-index":s.unref(E),"check-data":s.unref(Me)},null,8,["batch","tabs","tabs-index","check-data"])])],64)}}}),up={name:"input-select",emits:["update:modelValue"],props:{size:{type:String,default:""},group:{type:[Array,Boolean],default:!1},options:{type:Array,default:()=>[[">","大于"],["<","小于"],["=","等于"],["between","范围"]]}},data(){return{placeholder:"输入",value:"",value2:"",value3:[],groupValue:""}},created(){this.value2=this.options[0],this.groupValue=this.group[0],this.$watch("value2",()=>{this.change()}),this.$watch("groupValue",()=>{this.change()})},methods:{change(t){console.log("change",this.value2),this.group?this.$emit("update:modelValue",[this.groupValue[0],this.value2[0],this.value2[0]=="between"?this.value3:this.value]):this.$emit("update:modelValue",[this.value2[0],this.value2[0]=="between"?this.value3:this.value])}}},dp={class:"input-with-select flex pr"},fp={class:"flex justify-center pl",title:"下拉选择"},pp={class:"flex justify-center pl",title:"下拉选择"},hp={key:0,class:"flex pr-sm"};function mp(t,n,r,o,i,a){const l=s.resolveComponent("el-dropdown-item"),c=s.resolveComponent("el-dropdown-menu"),u=s.resolveComponent("el-dropdown"),d=s.resolveComponent("el-input");return s.openBlock(),s.createElementBlock("div",null,[s.createVNode(d,{class:s.normalizeClass(["input-with-select",i.value2[0]==="between"?"input-with-select-in":""]),modelValue:i.value,"onUpdate:modelValue":n[4]||(n[4]=f=>i.value=f),placeholder:i.placeholder,onChange:a.change,clearable:""},{prepend:s.withCtx(()=>[s.createElementVNode("div",dp,[r.group?(s.openBlock(),s.createBlock(u,{key:0,trigger:"click",onCommand:n[0]||(n[0]=f=>{this.groupValue=f})},{dropdown:s.withCtx(()=>[s.createVNode(c,null,{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.group,f=>(s.openBlock(),s.createBlock(l,{command:f},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(f[1]),1)]),_:2},1032,["command"]))),256))]),_:1})]),default:s.withCtx(()=>[s.createElementVNode("div",fp,[s.createElementVNode("span",null,s.toDisplayString(i.groupValue[1]),1),n[5]||(n[5]=s.createElementVNode("i",{class:"i-ri-arrow-down-s-line font-xl op-70"},null,-1))])]),_:1})):s.createCommentVNode("",!0),s.createVNode(u,{trigger:"click",onCommand:n[1]||(n[1]=f=>{this.value2=f})},{dropdown:s.withCtx(()=>[s.createVNode(c,null,{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.options,f=>(s.openBlock(),s.createBlock(l,{command:f},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(f[1]),1)]),_:2},1032,["command"]))),256))]),_:1})]),default:s.withCtx(()=>[s.createElementVNode("div",pp,[s.createElementVNode("span",null,s.toDisplayString(i.value2[1]),1),n[6]||(n[6]=s.createElementVNode("i",{class:"i-ri-arrow-down-s-line font-xl op-70"},null,-1))])]),_:1})])]),append:s.withCtx(()=>[i.value2[0]==="between"?(s.openBlock(),s.createElementBlock("div",hp,[s.createVNode(d,{size:r.size,placeholder:"输入",modelValue:i.value3[0],"onUpdate:modelValue":n[2]||(n[2]=f=>i.value3[0]=f),onChange:a.change},null,8,["size","modelValue","onChange"]),n[7]||(n[7]=s.createElementVNode("span",{class:"px-sm"},"~",-1)),s.createVNode(d,{size:r.size,placeholder:"输入",modelValue:i.value3[1],"onUpdate:modelValue":n[3]||(n[3]=f=>i.value3[1]=f),onChange:a.change},null,8,["size","modelValue","onChange"])])):s.createCommentVNode("",!0)]),_:1},8,["class","modelValue","placeholder","onChange"])])}const gp=ne(up,[["render",mp]]),yp={props:{placeholder:String,size:{type:String,default:""},modelValue:String,list:{type:[Array,Object],default:()=>[]}},data(){return{value:"",lists:[]}},created(){if(this.value=this.modelValue,Array.isArray(this.list))this.list.forEach(t=>{this.lists.push({value:t})});else if(this.list)for(let t in this.list)this.lists.push({label:this.list[t],value:t});this.$watch("value",function(t){this.$emit("update:modelValue",t)})},methods:{querySearch(t,n){const r=i=>a=>a.value.toLowerCase().indexOf(i.toLowerCase())===0,o=t?this.lists.filter(r(t)):this.lists;n(o)}}},bp={class:""},Cp={key:0,class:"pl-sm"};function vp(t,n,r,o,i,a){const l=s.resolveComponent("el-autocomplete");return s.openBlock(),s.createBlock(l,{modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=c=>i.value=c),"fetch-suggestions":a.querySearch,placeholder:r.placeholder||"输入"},{default:s.withCtx(({item:c})=>[s.createElementVNode("span",bp,s.toDisplayString(c.value),1),c.label?(s.openBlock(),s.createElementBlock("span",Cp,s.toDisplayString(c.label),1)):s.createCommentVNode("",!0)]),_:1},8,["modelValue","fetch-suggestions","placeholder"])}const Dp=ne(yp,[["render",vp]]);function zs(t){return t?(typeof t!="string"&&(t=URL.createObjectURL(t)),new Promise((n,r)=>{const o=document.createElement("video");o.src=t,o.setAttribute("crossOrigin","Anonymous");function i(){o.addEventListener("error",function(){n(null)}),o.addEventListener("loadedmetadata",function(){setTimeout(()=>{try{const a=o.videoWidth<750?1:750/o.videoWidth;o.width=parseInt(o.videoWidth*a),o.height=parseInt(o.videoHeight*a),o.currentTime=0,o.addEventListener("seeked",function(){const l=document.createElement("canvas");l.width=o.width,l.height=o.height,l.getContext("2d").drawImage(o,0,0,l.width,l.height),l.toBlob(u=>{const d=new File([u],"video.jpg");o.img=d,n({width:o.videoWidth,height:o.videoHeight,img:d,duration:parseInt(o.duration)})},"image/jpg")},{once:!0})}catch{n(null)}},100)})}window.WeixinJSBridge&&/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?window.WeixinJSBridge.invoke("getNetworkType",{},()=>{o.muted=!0,o.playsInline=!0,o["webkit-playsinline"]=!0,i(),o.play().then(()=>o.pause())}):i()})):Promise.reject("Please upload a video file.")}function wp(t){return t>1024?t/1024>1024?t/(1024*1024)>1024?(t/(1024*1024*1024)).toFixed(2)+"GB":(t/(1024*1024)).toFixed(2)+"MB":(t/1024).toFixed(2)+"KB":t.toFixed(2)+"B"}const $s={},xp={props:{accept:"",type:"",cate:{type:[Number,String],default:0},limit:{type:[Number,String],default:1}},data(){return{file:null,maxSize:1024*1024*1024,multiUploadSize:11*1024*1024,eachSize:10*1024*1024,progress:0,showProgress:!1,eachProgress:0,hashMd5:"",totalSize:0,loadedSize:0,successList:[]}},methods:{beforeUpload(t){if(t.type.indexOf(this.type)==-1)return $msg.error("文件格式错误"),!1;if(t.size>this.maxSize)return $msg.error(`文件不能大于${wp(this.maxSize)}`),!1},onExceed(t){t.length>this.limit&&$msg.error(`最多可以选择${this.limit}个文件`)},async httpRequest(t){const{multiUploadSize:n,splitUpload:r,singleUpload:o}=this,{file:i}=t;this.file=i;const a=this.signUpload;try{await a(i),this.$refs.upload.clearFiles()}catch(l){$msg.error(l),this.$refs.upload.clearFiles(),this.showProgress=!1,this.progress=0}},onUploadProgress(t,n){let r="default";n.get&&(r=n.get("uid")+"-"+n.get("chunk"));let o=$s[r]||0;this.loadedSize=this.loadedSize+t.loaded-o,$s[r]=t.loaded,this.progress=parseInt(this.loadedSize/this.totalSize*100),this.progress=this.progress>100?100:this.progress},async singleUpload(t){this.totalSize=t.size,this.showProgress=!0;let n=await this.postFile({file:t,uid:t.uid,name:t.name,fullSize:t.size,chunk:0,chunks:1});if(n.code==0)this.doSuccess(n);else return $msg.error(t.name+":上传失败")},async signUpload(t){this.totalSize=t.size,this.showProgress=!0;const n={type:this.type,name:t.name,size:t.size},r=await $req.post("upload/sign",n);if(r.code==0)await $req.upload(r.data.url,this.file,{onProgress:this.onUploadProgress}),this.validateFile({url:r.data.name});else return $msg.error(t.name+":授权失败")},async splitUpload(t){return await this.signUpload(t)},postFile(t){const n=new FormData;return n.append("cate",this.cate),n.append("type",this.type),n.append("file",t.file),n.append("chunk",t.chunk),n.append("name",t.name),n.append("uid",t.uid),n.append("chunks",t.chunks),n.append("fullSize",t.fullSize),t.chunk>0&&n.append("md5",t.md5),$req.upload("upload/doChunk",n,{onProgress:this.onUploadProgress,action:"POST"})},async doSuccess(t){if(this.showProgress=!1,this.progress=0,this.file?.type?.startsWith("video")){const n=await this.doVideoExt(t.data);n&&(t.data.extend=n)}this.$emit("success",t.data)},validateFile(t){return t.cate=this.cate,t.type=this.type,$req.post("upload/doChunks",t).then(n=>{n&&n.code==0?this.doSuccess(n):$msg.error(n.msg)})},async doVideoExt(t){const n=this.file,r=await zs(n);if(!r)return null;const o=new FormData;o.append("file",r.img),o.append("id",t.id),o.append("url",t.url),o.append("height",r.height),o.append("width",r.width),o.append("size",n.size),o.append("duration",r.duration);const i=await $req.upload("upload/doVideoExt",o);return this.file=null,i.code==0?i.data:null}}},Bp={class:"flex justify-center py"},kp={class:"flex flex-col justify-center w-full"},Ep={class:""},_p={class:""};function Ap(t,n,r,o,i,a){const l=s.resolveComponent("el-upload"),c=s.resolveComponent("el-progress"),u=s.resolveComponent("el-dialog");return s.openBlock(),s.createElementBlock("div",null,[s.createVNode(l,{class:"flex items-center",ref:"upload",onExceed:a.onExceed,"show-file-list":!1,accept:r.accept,multiple:r.limit!=1,"before-upload":a.beforeUpload,"http-request":a.httpRequest,limit:r.limit,action:"/",disabled:i.showProgress},{default:s.withCtx(()=>[s.renderSlot(t.$slots,"default")]),_:3},8,["onExceed","accept","multiple","before-upload","http-request","limit","disabled"]),s.createVNode(u,{"append-to-body":"","show-close":!1,"close-on-click-modal":!1,title:"正在上传",modelValue:i.showProgress,"onUpdate:modelValue":n[0]||(n[0]=d=>i.showProgress=d),width:"50%"},{default:s.withCtx(()=>[s.createElementVNode("div",Bp,[i.showProgress?(s.openBlock(),s.createBlock(c,{key:0,type:"circle",percentage:i.progress},{default:s.withCtx(({percentage:d})=>[s.createElementVNode("div",kp,[s.createElementVNode("span",Ep,s.toDisplayString(d)+"%",1),s.createElementVNode("span",_p,s.toDisplayString(d==100?"验证文件...":"上传中..."),1)])]),_:1},8,["percentage"])):s.createCommentVNode("",!0)])]),_:1},8,["modelValue"])])}const Is=ne(xp,[["render",Ap]]),Np={props:{type:{type:String,default:""},cate:{type:Number,default:0}},data(){return{cateCount:0,loading:!0,limit:50,page:1,cateId:0,cates:[]}},created(){this.cate&&(this.cateId=this.cate),$req.post($config.apis.media_box.cate,{type:this.type,limit:this.limit}).then(t=>{t.code==0&&t.data&&(console.log(t),this.cates=t.data,this.cateCount=t.count,this.loading=!1)})},methods:{cateEdit(t,n){$prompt(!1,"修改分组",{inputValue:n.title}).then(r=>{r.value!=n.title&&r.value&&$req.post($config.apis.media_box.cateEdit,{id:n.id,title:r.value}).then(o=>{o.code==0?(this.cates[t].title=r.value,this.$msg.success("修改成功")):this.$msg.error(o.msg)})})},cateDel(t,n){let r=this;this.$confirm(`确定要删除分组[${n.title}]吗?`,"删除分组").then(o=>{r.$req.post($config.apis.media_box.cateDel,{id:n.id}).then(i=>{i.code==0?(r.cates.splice(t,1),r.$msg.success("删除成功")):r.$msg.error(i.msg)})})},cateAdd(){$prompt(!1,"添加分组").then(t=>{t.value&&$req.post($config.apis.media_box.cateAdd,{title:t.value,type:this.type}).then(n=>{n.code==0?(this.cates.push(n.data),$msg.success("添加成功")):$msg.error(n.msg)})})},cateTab(t){this.cateId=t,this.$emit("change",t)},addCount(t=1){const n=this.cateId;this.cates.forEach(r=>{(r.id==n||r.id==0)&&(r.count=r.count+t)})},cateChange(t){this.cates=[],$req.post($config.apis.media_box.cate,{type:this.type,page:t,limit:this.limit}).then(n=>{n.code==0&&n.data&&(this.cates=n.data,this.cateCount=n.count)})}}},Sp={class:"dir-list"},Fp={class:"title"},Vp={key:0,style:{"margin-left":"-10px","margin-bottom":"10px"}},Op={class:"item"},Tp=["onClick"],jp={class:"left"},Pp={key:0,class:"tool"},Lp=["onClick"],Mp=["onClick"];function zp(t,n,r,o,i,a){const l=s.resolveComponent("el-pagination"),c=s.resolveComponent("el-tag"),u=s.resolveComponent("el-scrollbar"),d=s.resolveDirective("loading");return s.openBlock(),s.createElementBlock("div",Sp,[s.createElementVNode("div",Fp,[n[2]||(n[2]=s.createElementVNode("span",{class:"flex items-center"},[s.createElementVNode("i",{class:"i-ri-folders-line",style:{"padding-right":"4px"}}),s.createTextVNode("分组")],-1)),s.createElementVNode("span",{class:"flex",onClick:n[0]||(n[0]=f=>a.cateAdd())},[...n[1]||(n[1]=[s.createElementVNode("i",{class:"i-ri-add-line"},null,-1)])])]),i.cateCount>i.limit?(s.openBlock(),s.createElementBlock("div",Vp,[s.createVNode(l,{small:"",layout:"prev,pager,next","pager-count":5,total:i.cateCount,"page-size":i.limit,onCurrentChange:a.cateChange},null,8,["total","page-size","onCurrentChange"])])):s.createCommentVNode("",!0),s.withDirectives((s.openBlock(),s.createBlock(u,{style:{height:"500px"}},{default:s.withCtx(()=>[s.createElementVNode("div",Op,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cates,(f,p)=>(s.openBlock(),s.createElementBlock("div",{onClick:h=>a.cateTab(f.id),class:s.normalizeClass(i.cateId==f.id?"on":"")},[s.createElementVNode("span",jp,[s.createTextVNode(s.toDisplayString(f.title),1),f.is_sys==1?(s.openBlock(),s.createBlock(c,{key:0,size:"small"},{default:s.withCtx(()=>[...n[3]||(n[3]=[s.createTextVNode("系统",-1)])]),_:1})):s.createCommentVNode("",!0)]),f.is_sys==0?(s.openBlock(),s.createElementBlock("span",Pp,[s.createElementVNode("span",{onClick:h=>a.cateEdit(p,f)},"编辑",8,Lp),s.createElementVNode("span",{onClick:h=>a.cateDel(p,f)},"删除",8,Mp)])):s.createCommentVNode("",!0)],10,Tp))),256))])]),_:1})),[[d,i.loading]])])}const $p={name:"media-box",components:{BigUpload:Is,FileMenu:ne(Np,[["render",zp],["__scopeId","data-v-91c7ea1a"]])},props:{type:String,sum:{type:Number,default:1},cate:{type:Number,default:0}},data(){return{showImageViewer:!1,fileType:"video",videoShow:!1,videoUrl:"",videoBg:"",imageList:[],action:!1,limit:24,count:0,page:1,cateId:0,name:"",list:[],onList:[],onImgs:[]}},computed:{accept(){return this.fileType+"/*"},typeName(){return{video:"视频",audio:"音频",image:"图片",file:"文件"}[this.fileType]},canSum(){return this.action?20:this.sum}},created(){this.cate&&(this.cateId=this.cate),this.type&&(this.fileType=this.type),this.getList()},methods:{async command(t){if(t==="url"){const{value:n}=await this.$prompt(!1,`输入${this.typeName}链接`,{inputValue:"",inputPattern:/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/[\S]*)*\/?$/i,inputErrorMessage:"链接格式错误"});n&&await this.doAdd(n)}},async doAdd(t){const n=new FormData;if(this.fileType==="video"){const o=await zs(t);if(o)n.append("img",o.img),n.append("height",o.height),n.append("width",o.width),n.append("duration",o.duration);else return $msg.error("视频格式错误或视频不支持在你的网站播放")}n.append("url",t),n.append("type",this.fileType),n.append("dir",this.cateId),n.append("size",0);const r=await $req.upload("upload/doAdd",n);if(r.code==0)this.list.unshift(r.data),this.$refs.fileMenu.addCount(),$msg.success(data.name+":上传成功");else return $msg.error(r.msg),null},openFile(t){t.type=="image"?this.viewImg(t.url):this.videoPlay(t.url)},viewImg(t){this.imageList=[$fileUrl(t)],this.showImageViewer=!0},videoPlay(t=""){this.videoShow=!0,this.videoUrl=t},getDetail(){const t=this.onList;return this.list.filter(n=>t.indexOf(n.id)>-1)},getData(){if(this.action)return"请退出管理模式,再选择"+this.typeName;let t=JSON.parse(JSON.stringify(this.onImgs));return this.fnCancelCheck(),t},menuChange(t){this.cateId=t,this.name="",this.getList()},pageChange(t){this.page=t,this.getList()},getList(){$req.post($config.apis.media_box.list,{page:this.page,limit:24,dir:this.cateId,type:this.fileType,name:this.name}).then(t=>{t.data?.data&&(t=t.data),this.name&&(!t.data||t.data.length==0)&&$msg.info("没有搜索结果"),this.list=t.data,this.count=t.count})},fnAction(){this.action=!this.action,this.action||this.fnCancelCheck()},fnCancelCheck(){this.onList=[],this.onImgs=[],this.action=!1},doName(t,n){let r=this;this.$prompt(!1,"重命名",{inputValue:n.name}).then(o=>{o.value!=n.name&&o.value&&$req.post($config.apis.media_box.edit,{id:n.id,name:o.value}).then(i=>{i.code==0?(r.list[t].name=o.value,r.$msg.success(i.msg)):r.$msg.error(i.msg)})})},doDel(t,n){$req.post($config.apis.media_box.del,{id:n.id}).then(r=>{r.code==0?(this.list.splice(t,1),this.$refs.fileMenu.addCount(-1),$msg.success(r.msg)):$msg.error(r.msg)})},doDels(){let t=this;if(this.onList.length==0)return this.$msg.error("请选择"+typeName);$req.post($config.apis.media_box.del,{id:this.onList}).then(n=>{n.code==0?(t.onList.forEach(r=>{let o=t.list.findIndex(i=>i.id==r);t.list.splice(o,1)}),t.$refs.fileMenu.addCount(-this.onList.length),t.onList=[],t.onImgs=[],$msg.success(n.msg)):$msg.error(n.msg)})},doSearch(){$prompt(!1,"搜索"+this.typeName,{inputPlaceholder:"输入文件名称或关键词",confirmButtonText:"搜索"}).then(t=>{t.value&&t.value&&(this.name=t.value,this.getList())})},getCheck(t){return this.onList.indexOf(t)>-1},fnCheck(t,n,r){if(t){if(this.canSum<=this.onList.length)return this.$msg.error(`最多可以选择${this.sum}个${this.typeName}`);this.onList.push(n),this.onImgs.push(r)}else $a.array.remove(this.onList,n),$a.array.remove(this.onImgs,r)},onSuccess(t){t?(this.list.unshift(t),this.$refs.fileMenu.addCount(),this.$msg.success(t.name+":上传成功")):this.$msg.error(t.name+"上传失败:"+e.msg)}}},Ip=["src"],Rp={class:"dialog-footer"},Hp={class:"imgs-top flex justify-between pb-sm"},Up={class:"flex text-3"},Wp={key:1,class:"ml-xl flex"},qp={class:"flex"},Kp={class:"mr"},Jp={key:0,class:"mr"},Gp={class:"mr"},Yp={class:"flex items-center"},Zp={class:"file-box-body"},Xp={class:"list"},Qp={key:0,class:"no-file"},eh={class:"add"},th={key:0,class:"number"},nh={class:"box-bg"},rh=["onClick"],oh={key:0,class:"i-ri-eye-line"},ih={key:1,class:"i-ri-play-fill"},sh={key:4,class:"type-name flex-inline items-center gap-1"},ah={key:0,class:"i-ri-link pr-xs2"},lh=["title","onClick"],ch={class:"pages"};function uh(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("el-dialog"),u=s.resolveComponent("el-text"),d=s.resolveComponent("BigUpload"),f=s.resolveComponent("el-dropdown-item"),p=s.resolveComponent("el-dropdown-menu"),h=s.resolveComponent("el-dropdown"),m=s.resolveComponent("file-menu"),g=s.resolveComponent("el-link"),y=s.resolveComponent("el-checkbox"),v=s.resolveComponent("a-image"),D=s.resolveComponent("el-col"),w=s.resolveComponent("el-row"),b=s.resolveComponent("el-pagination"),x=s.resolveComponent("el-image-viewer");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",null,[s.createVNode(c,{modelValue:i.videoShow,"onUpdate:modelValue":n[1]||(n[1]=k=>i.videoShow=k),title:a.typeName,width:"600px",top:"15vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",Rp,[s.createVNode(l,{size:"small",onClick:n[0]||(n[0]=k=>i.videoShow=!1)},{default:s.withCtx(()=>[...n[5]||(n[5]=[s.createTextVNode("关闭",-1)])]),_:1})])]),default:s.withCtx(()=>[i.videoUrl&&i.videoShow?(s.openBlock(),s.createElementBlock("video",{key:0,src:t.$fileUrl(i.videoUrl),controls:"",style:s.normalizeStyle(`height:${{video:"400px",audio:"100px"}[this.fileType]};width: 100%;`)},null,12,Ip)):s.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),s.createElementVNode("div",Hp,[s.createElementVNode("div",Up,[n[8]||(n[8]=s.createTextVNode(" 已选择",-1)),s.createVNode(u,{class:"px-xs",type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.onList.length),1)]),_:1}),s.createTextVNode("个 最多可选择"+s.toDisplayString(a.canSum)+"个 ",1),i.onList.length?(s.openBlock(),s.createBlock(u,{key:0,class:"pl-xs",size:"small",type:"primary",onClick:n[2]||(n[2]=k=>a.fnCancelCheck())},{default:s.withCtx(()=>[...n[6]||(n[6]=[s.createTextVNode("取消选择",-1)])]),_:1})):s.createCommentVNode("",!0),i.name?(s.openBlock(),s.createElementBlock("div",Wp,[s.createElementVNode("span",null,"搜索关键词:"+s.toDisplayString(i.name),1),s.createVNode(u,{class:"pl-xs",type:"primary",size:"small",onClick:n[3]||(n[3]=k=>a.menuChange(i.cateId))},{default:s.withCtx(()=>[...n[7]||(n[7]=[s.createTextVNode("返回",-1)])]),_:1})])):s.createCommentVNode("",!0)]),s.createElementVNode("div",qp,[s.createElementVNode("div",Kp,[s.createVNode(l,{type:"",onClick:a.fnAction},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.action?"退出管理":"管理"),1)]),_:1},8,["onClick"])]),i.action?(s.openBlock(),s.createElementBlock("div",Jp,[s.createVNode(l,{type:i.onImgs.length==0?"":"danger",disabled:i.onImgs.length==0,onClick:a.doDels},{default:s.withCtx(()=>[...n[9]||(n[9]=[s.createTextVNode("批量删除",-1)])]),_:1},8,["type","disabled","onClick"])])):s.createCommentVNode("",!0),s.createElementVNode("div",Gp,[s.createVNode(l,{onClick:a.doSearch,type:"primary"},{default:s.withCtx(()=>[...n[10]||(n[10]=[s.createElementVNode("span",{class:"flex"},[s.createElementVNode("i",{class:"i-ri-search-line"}),s.createElementVNode("span",null,"搜索")],-1)])]),_:1},8,["onClick"])]),s.createVNode(h,{"split-button":"",type:"primary",onCommand:a.command},{dropdown:s.withCtx(()=>[s.createVNode(p,null,{default:s.withCtx(()=>[s.createVNode(f,{command:"url"},{default:s.withCtx(()=>[s.createTextVNode("通过链接添加"+s.toDisplayString(a.typeName),1)]),_:1})]),_:1})]),default:s.withCtx(()=>[s.createVNode(d,{accept:a.accept,type:i.fileType,cate:i.cateId,onSuccess:a.onSuccess,limit:r.sum},{default:s.withCtx(()=>[s.createElementVNode("span",Yp,[n[11]||(n[11]=s.createElementVNode("i",{class:"i-ri-upload-cloud-2-line"},null,-1)),s.createElementVNode("span",null,"上传"+s.toDisplayString(a.typeName),1)])]),_:1},8,["accept","type","cate","onSuccess","limit"])]),_:1},8,["onCommand"])])]),s.createElementVNode("div",Zp,[s.createVNode(m,{class:"bg-main-100",ref:"fileMenu",type:r.type,cate:i.cateId,onChange:a.menuChange},null,8,["type","cate","onChange"]),s.createElementVNode("div",Xp,[i.list.length==0?(s.openBlock(),s.createElementBlock("div",Qp,[n[13]||(n[13]=s.createElementVNode("div",{class:"op-50"},[s.createElementVNode("i",{class:"i-ri-folder-upload-line size-20"})],-1)),s.createElementVNode("div",eh,[s.createElementVNode("span",null,"暂无"+s.toDisplayString(a.typeName)+",",1),s.createVNode(d,{accept:a.accept,type:i.fileType,cate:i.cateId,onSuccess:a.onSuccess,limit:r.sum},{default:s.withCtx(()=>[s.createVNode(g,{type:"primary"},{default:s.withCtx(()=>[...n[12]||(n[12]=[s.createTextVNode("点击添加",-1)])]),_:1})]),_:1},8,["accept","type","cate","onSuccess","limit"])])])):s.createCommentVNode("",!0),s.createVNode(w,{gutter:12},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(k,E)=>(s.openBlock(),s.createBlock(D,{span:4},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["item",i.onList.indexOf(k.id)>-1?"on":""]),style:{"background-color":"url #f5f7fa"}},[(s.openBlock(),s.createBlock(y,{disabled:i.onList.length>=a.canSum&&!a.getCheck(k.id),key:i.onList.length+""+k.id,checked:a.getCheck(k.id),onChange:B=>{this.fnCheck(B,k.id,k.url)},class:"check"},null,8,["disabled","checked","onChange"])),i.onList.indexOf(k.id)>-1?(s.openBlock(),s.createElementBlock("div",th,s.toDisplayString(i.onList.indexOf(k.id)+1),1)):s.createCommentVNode("",!0),s.createElementVNode("div",nh,[s.createElementVNode("i",{class:s.normalizeClass({video:"ri-movie-2-line",audio:"ri-disc-line"}[i.fileType])},null,2)]),i.fileType=="video"&&k?.extend?.img?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["img",{mask:i.action}])},[s.createVNode(v,{src:k.extend.img},null,8,["src"])],2)):i.fileType=="image"?(s.openBlock(),s.createElementBlock("div",{key:2,class:s.normalizeClass(["img",{mask:i.action}])},[(s.openBlock(),s.createBlock(v,{src:k.url,key:k.id,process:"100"},null,8,["src"]))],2)):s.createCommentVNode("",!0),i.onList.indexOf(k.id)==-1?(s.openBlock(),s.createElementBlock("div",{key:3,onClick:B=>a.openFile(k),class:"view",title:"播放"},[k.type=="image"?(s.openBlock(),s.createElementBlock("i",oh)):(s.openBlock(),s.createElementBlock("i",ih))],8,rh)):s.createCommentVNode("",!0),k.file_type?(s.openBlock(),s.createElementBlock("div",sh,[k.url?.startsWith("http")?(s.openBlock(),s.createElementBlock("span",ah)):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(k.file_type),1)])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:"name line-1",title:k.name,onClick:B=>a.doName(E,k)},[s.createElementVNode("span",null,s.toDisplayString(k.name||"未命名"),1)],8,lh)],2)]),_:2},1024))),256))]),_:1})])]),s.createElementVNode("div",ch,[s.createVNode(b,{background:"",layout:"total,prev, pager,next",total:i.count,"page-size":i.limit,onCurrentChange:a.pageChange},null,8,["total","page-size","onCurrentChange"])])]),i.showImageViewer?(s.openBlock(),s.createBlock(x,{key:0,onClose:n[4]||(n[4]=k=>i.showImageViewer=!1),"url-list":i.imageList},null,8,["url-list"])):s.createCommentVNode("",!0)],64)}const sr=ne($p,[["render",uh],["__scopeId","data-v-bfa07b7d"]]),dh={components:{imgBox:sr},props:{size:{type:[Number,String],default:0},limit:{type:Number,default:5},cateId:{type:Number,default:0},tips:String,modelValue:Array|String,disabled:Boolean},data(){return{_disabled:!1,style:{width:"100px",height:"100px"},imgShow:!1,list:[]}},created(){if(this._disabled=this.$parent.disabled?!0:this.disabled,this.size){let t=this.size;typeof t=="string"&&(t={small:60,mini:40}[t]||100),t&&(this.style={width:t+"px",height:t+"px",fontSize:t+"px"})}this.modelValue&&(this.list=this.modelValue),this.$watch("list",function(t){this.$emit("update:modelValue",t)},{deep:!0})},methods:{del(t){this.list.splice(t,1)},add(){let t=this.$refs.imgbox.getData();if(typeof t=="string")return this.$msg.error(t);if(t.length==0)return this.$msg.error("请选择图片");this.list=this.list.concat(t),this.imgShow=!1}}},fh={class:"dialog-footer"},ph={class:"input-imgs"},hh=["onClick"],mh={class:"text-12px pt-xs op-50"},gh={key:0,class:"pl-sm color-primary"};function yh(t,n,r,o,i,a){const l=s.resolveComponent("img-box"),c=s.resolveComponent("el-button"),u=s.resolveComponent("el-dialog"),d=s.resolveComponent("a-image"),f=s.resolveComponent("a-draggable");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(u,{modelValue:i.imgShow,"onUpdate:modelValue":n[1]||(n[1]=p=>i.imgShow=p),title:"选择图片",width:"1080px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",fh,[s.createVNode(c,{onClick:n[0]||(n[0]=p=>i.imgShow=!1)},{default:s.withCtx(()=>[...n[3]||(n[3]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(c,{type:"primary",onClick:a.add},{default:s.withCtx(()=>[...n[4]||(n[4]=[s.createTextVNode("确认",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(l,{ref:"imgbox",type:"image",sum:r.limit-i.list.length,cate:r.cateId},null,8,["sum","cate"])]),_:1},8,["modelValue"]),s.createElementVNode("div",ph,[s.createVNode(f,{disabled:i._disabled,class:"list flex flex-wrap gap-sm",list:i.list,filter:".add"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(p,h)=>(s.openBlock(),s.createElementBlock("div",{class:"item",style:s.normalizeStyle(i.style),key:p},[s.createVNode(d,{preview:i.list,index:h,fit:"contain",src:p,process:"100"},null,8,["preview","index","src"]),s.withDirectives(s.createElementVNode("div",{class:"del",onClick:m=>a.del(h)},[...n[5]||(n[5]=[s.createElementVNode("i",{class:"i-ri-close-line"},null,-1)])],8,hh),[[s.vShow,!i._disabled]])],4))),128)),i.list.length<r.limit?s.withDirectives((s.openBlock(),s.createElementBlock("div",{key:0,class:"flex flex-col justify-center items-center text-100px size-100px add",style:s.normalizeStyle(i.style),onClick:n[2]||(n[2]=p=>i.imgShow=!0)},[...n[6]||(n[6]=[s.createElementVNode("i",{class:"i-ri-image-add-line"},null,-1),s.createElementVNode("span",null,"添加图片",-1)])],4)),[[s.vShow,!i._disabled]]):s.createCommentVNode("",!0)]),_:1},8,["disabled","list"]),s.withDirectives(s.createElementVNode("div",mh,[s.createTextVNode("拖拽可调整图片顺序,最多可上传"+s.toDisplayString(r.limit)+"张",1),r.tips?(s.openBlock(),s.createElementBlock("span",gh,"("+s.toDisplayString(r.tips)+")",1)):s.createCommentVNode("",!0)],512),[[s.vShow,!i._disabled]])])],64)}const Rs=ne(dh,[["render",yh],["__scopeId","data-v-8f11d9a0"]]),bh={emits:["clear","update:modelValue"],props:{btn:{type:Object,default:()=>({})},placeholder:{type:String,default:"输入"},readonly:Boolean,disabled:{type:[String,Boolean,Number],default:!1},clearable:{type:Boolean,default:!1},icon:{type:String,default:""},size:{type:String,default:""},props:Object,modelValue:{type:[String,Boolean,Number,Array],default:""}},data(){return{value:""}},watch:{modelValue(t){this.value=t}},created(){this.value=this.modelValue},methods:{async doClick(){if(this.disabled)return;const t=await this.btn.click(this.value);t!==void 0&&(this.value=t,this.$emit("update:modelValue",this.value))},async setValue(t){this.disabled||(this.value=t,this.$emit("update:modelValue",t))},async doClear(){this.$emit("clear"),this.$emit("update:modelValue",null)}}},Ch={class:"input-button"};function vh(t,n,r,o,i,a){const l=s.resolveComponent("el-input"),c=s.resolveComponent("el-button");return s.openBlock(),s.createElementBlock("div",Ch,[s.createVNode(l,s.mergeProps({size:r.size,clearable:r.clearable,onClear:a.doClear},r.props,{readonly:r.readonly,onChange:n[1]||(n[1]=u=>t.$emit("update:modelValue",u)),modelValue:i.value,"onUpdate:modelValue":n[2]||(n[2]=u=>i.value=u),placeholder:r.placeholder,disabled:!!r.disabled}),{prefix:s.withCtx(()=>[s.createElementVNode("i",{class:s.normalizeClass(r.icon)},null,2)]),suffix:s.withCtx(()=>[i.value&&r.readonly&&r.clearable?(s.openBlock(),s.createElementBlock("i",{key:0,onClick:n[0]||(n[0]=s.withModifiers(u=>a.doClear(),["stop"])),class:"i-ri-delete-bin-7-line font-md hover:color-red",title:"清空输入框"})):s.createCommentVNode("",!0)]),_:1},16,["size","clearable","onClear","readonly","modelValue","placeholder","disabled"]),s.createVNode(c,{size:r.size,class:"h-full",disabled:!!r.disabled,type:"primary",onClick:n[3]||(n[3]=u=>a.doClick())},{default:s.withCtx(()=>[r.btn.icon?(s.openBlock(),s.createElementBlock("i",{key:0,class:s.normalizeClass(["mr-xs",r.btn.icon])},null,2)):s.createCommentVNode("",!0),s.createTextVNode(" "+s.toDisplayString(r.btn.text),1)]),_:1},8,["size","disabled"])])}const Vo=ne(bh,[["render",vh]]),Dh={emits:["update:modelValue"],props:{modelValue:String},data(){return{list:[],url:""}},created(){this.url=this.modelValue,this.list=$config.urlBox.default},methods:{fnClick(t){this.url=t.url,this.$emit("update:modelValue",this.url)}}},wh={class:"list"},xh={class:"py"},Bh=["onClick"];function kh(t,n,r,o,i,a){const l=s.resolveComponent("el-col"),c=s.resolveComponent("el-row");return s.openBlock(),s.createElementBlock("div",wh,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,u=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",xh,s.toDisplayString(u.title),1),s.createVNode(c,{gutter:12},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.list,d=>(s.openBlock(),s.createBlock(l,{span:4},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["item click border p-sm flex items-center justify-center gap-1 hover:bg-primary-100",i.url==d.url?"bg-primary text-white":""]),onClick:f=>a.fnClick(d)},[n[0]||(n[0]=s.createElementVNode("i",{class:"i-ri-link"},null,-1)),s.createTextVNode(" "+s.toDisplayString(d.title),1)],10,Bh)]),_:2},1024))),256))]),_:2},1024)],64))),256))])}const Eh=ne(Dh,[["render",kh],["__scopeId","data-v-26dc73dc"]]),_h={emits:["update:modelValue"],props:{modelValue:String},data(){return{cateId:"goods",table:{},url:""}},watch:{url(t){this.$emit("update:modelValue",t)}},created(){this.url=this.modelValue,this.table={url:"goods",title:!1,where:{status:1},limit:10,serachClass:"w-600px mx-auto pl-100px pt-md! pb-0!",search:{span:{span:12},gutter:0,btn:{text:"搜索",align:"right",reset:!1},cols:[{field:"title",placeholder:"输入商品标题或ID"}]},cols:[{field:"title",title:"商品标题"},{field:"id",title:"商品ID",width:200},{field:"action",title:"选择",width:150,slot:!0}]}},methods:{fnClick(t){this.url=this.formatUrl(t)},formatUrl(t){return $config.urlBox?.goods?.valueFormat?$config.urlBox.goods.valueFormat(t):[this.cateId,t.url,t.title]},getData(){return this.url}}},Ah={style:{"--main-height":"calc(75vh + 36px)"}};function Nh(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("admin-table");return s.openBlock(),s.createElementBlock("div",Ah,[s.createVNode(c,{init:i.table},{"cols.action":s.withCtx(({row:u})=>[i.url==a.formatUrl(u)?(s.openBlock(),s.createBlock(l,{key:0,size:"small",type:"primary",disabled:""},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("已选",-1)])]),_:1})):(s.openBlock(),s.createBlock(l,{key:1,size:"small",type:"primary",onClick:d=>a.fnClick(u)},{default:s.withCtx(()=>[...n[1]||(n[1]=[s.createTextVNode("选择",-1)])]),_:1},8,["onClick"]))]),_:1},8,["init"])])}const Sh=ne(_h,[["render",Nh]]),Fh={emits:["update:modelValue"],props:{modelValue:String},data(){return{cateId:"goodsCate",table:{},url:""}},watch:{url(t){this.$emit("update:modelValue",t)}},created(){this.url=this.modelValue,this.table={url:"goodsCate",title:!1,page:!1,tree:!0,cols:[{field:"title",title:"分类名称"},{field:"id",title:"分类ID",width:300},{field:"action",title:"选择",width:150,slot:!0}]}},methods:{fnClick(t){this.url=this.formatUrl(t)},formatUrl(t){return $config.urlBox?.goodsCate?.valueFormat?$config.urlBox.goodsCate.valueFormat(t):[this.cateId,t.url,t.title]},getData(){return this.url}}};function Vh(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("admin-table");return s.openBlock(),s.createBlock(c,{init:i.table},{"cols.action":s.withCtx(({row:u})=>[i.url==a.formatUrl(u)?(s.openBlock(),s.createBlock(l,{key:0,size:"small",type:"primary",disabled:""},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("已选",-1)])]),_:1})):(s.openBlock(),s.createBlock(l,{key:1,size:"small",type:"primary",onClick:d=>a.fnClick(u)},{default:s.withCtx(()=>[...n[1]||(n[1]=[s.createTextVNode("选择",-1)])]),_:1},8,["onClick"]))]),_:1},8,["init"])}const Oh=ne(Fh,[["render",Vh]]),Th={emits:["update:modelValue"],props:{modelValue:String},data(){return{cateId:"article",table:{},url:""}},watch:{url(t){this.$emit("update:modelValue",t)}},created(){this.url=this.modelValue,this.table={url:"article",title:!1,limit:10,serachClass:"w-600px mx-auto pl-100px pt-md! pb-0!",search:{span:{span:12},gutter:0,btn:{text:"搜索",align:"right",reset:!1},cols:[{field:"title",placeholder:"输入文章标题或关键词"}]},cols:[{field:"title",title:"文章标题"},{field:"id",title:"文章ID",width:200},{field:"action",title:"选择",width:150,slot:!0}]}},methods:{fnClick(t){this.url=this.formatUrl(t)},formatUrl(t){return $config.urlBox?.article?.valueFormat?$config.urlBox.article.valueFormat(t):[this.cateId,t.url,t.title]},getData(){return this.url},fnDir(t){this.cateId=t}}},jh={style:{"--main-height":"calc(75vh + 36px)"}};function Ph(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("admin-table");return s.openBlock(),s.createElementBlock("div",jh,[s.createVNode(c,{init:i.table},{"cols.action":s.withCtx(({row:u})=>[i.url==a.formatUrl(u)?(s.openBlock(),s.createBlock(l,{key:0,size:"small",type:"primary",disabled:""},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("已选",-1)])]),_:1})):(s.openBlock(),s.createBlock(l,{key:1,size:"small",type:"primary",onClick:d=>a.fnClick(u)},{default:s.withCtx(()=>[...n[1]||(n[1]=[s.createTextVNode("选择",-1)])]),_:1},8,["onClick"]))]),_:1},8,["init"])])}const Lh=ne(Th,[["render",Ph]]),Mh={props:{modelValue:String|Array,url:String|Array},data(){return{value:""}},created(){typeof this.modelValue=="string"&&this.modelValue.indexOf("┆┊")===-1&&(this.value=this.modelValue)},methods:{update(t){this.$emit("update:modelValue",this.value)}}},zh={class:"pxl mxl flex justify-center"},$h={style:{width:"500px"}};function Ih(t,n,r,o,i,a){const l=s.resolveComponent("el-input");return s.openBlock(),s.createElementBlock("div",zh,[s.createElementVNode("div",$h,[s.createVNode(l,{placeholder:"输入链接",modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=c=>i.value=c),onInput:a.update},{prefix:s.withCtx(()=>[...n[1]||(n[1]=[s.createElementVNode("i",{class:"i-ri-link-m",style:{color:"#D9D9D9"}},null,-1)])]),_:1},8,["modelValue","onInput"])])])}const Rh=ne(Mh,[["render",Ih]]),Hh={emits:["update:modelValue"],props:{table:Object,id:String,valueFormat:Function,modelValue:String},data(){return{url:""}},watch:{url(t){this.$emit("update:modelValue",t)}},created(){this.url=this.modelValue},methods:{fnClick(t){this.url=this.formatUrl(t)},formatUrl(t){return this.valueFormat?this.valueFormat(t):this.id+"/"+t.id},getData(){return this.url}}},Uh={style:{"--main-height":"calc(75vh + 36px)"}};function Wh(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("admin-table");return s.openBlock(),s.createElementBlock("div",Uh,[r.table?(s.openBlock(),s.createBlock(c,{key:0,init:r.table},{"cols.action":s.withCtx(({row:u})=>[i.url==a.formatUrl(u)?(s.openBlock(),s.createBlock(l,{key:0,size:"small",type:"primary",disabled:""},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("已选",-1)])]),_:1})):(s.openBlock(),s.createBlock(l,{key:1,size:"small",type:"primary",onClick:d=>a.fnClick(u)},{default:s.withCtx(()=>[...n[1]||(n[1]=[s.createTextVNode("选择",-1)])]),_:1},8,["onClick"]))]),_:1},8,["init"])):s.createCommentVNode("",!0)])}const qh=ne(Hh,[["render",Wh]]),Kh={name:"url-box",emits:["change"],props:{modelValue:String},data(){return{cateId:"Base",cate:[],cateHistory:["Base"],url:""}},watch:{url(t){this.$emit("change",t)}},created(){const t=[{title:"预设页面",id:"Base",component:s.markRaw(Eh),show:$config.urlBox?.default},{title:"商品分类",id:"GoodsCate",component:s.markRaw(Oh),show:$config.urlBox?.goodsCate!==!1},{title:"商品链接",id:"Goods",component:s.markRaw(Sh),show:$config.urlBox?.goods!==!1},{title:"文章链接",id:"Article",component:s.markRaw(Lh),show:$config.urlBox?.article!==!1},{title:"自定义链接",id:"Diy",component:s.markRaw(Rh),show:$config.urlBox?.diy!==!1}];$config.urlBox?.list&&t.push(...$config.urlBox.list.map(n=>({component:s.markRaw(qh),show:n.show??!0,title:n.title,id:n.id,props:{id:n.id,table:n.table,valueFormat:n.valueFormat}}))),this.cate=t.filter(n=>n.show),this.url=this.url2str(this.modelValue)},methods:{url2str(t){let n="";if(t&&(typeof t=="string"&&t.indexOf("┆┊")>-1?t=t.split("┆┊"):n=t),t&&typeof t=="object"){let r=t[0];r=="goods"?n="[商品]"+t[2]:r=="goodsCate"?n="[商品分类]"+t[2]:r=="article"?n="[文章]"+t[2]:t[2]=="base"&&(n=t[2])}return n},getData(){return this.url},doTab(t){this.cateId=this.cate[t.index].id,this.cateHistory.indexOf(this.cateId)===-1&&this.cateHistory.push(this.cateId)}}},Jh={class:""},Gh={class:"pl-xs"};function Yh(t,n,r,o,i,a){const l=s.resolveComponent("el-tab-pane"),c=s.resolveComponent("el-tabs");return s.openBlock(),s.createElementBlock("div",Jh,[s.createVNode(c,{"tab-position":"left",onTabClick:a.doTab,style:{height:"100%"}},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cate,u=>(s.openBlock(),s.createBlock(l,{label:u.title},{default:s.withCtx(()=>[s.createElementVNode("div",Gh,[i.cateHistory.indexOf(u.id)>-1?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(u.component),s.mergeProps({key:0,ref_for:!0},u.props??{},{modelValue:i.url,"onUpdate:modelValue":n[0]||(n[0]=d=>i.url=d)}),null,16,["modelValue"])):s.createCommentVNode("",!0)])]),_:2},1032,["label"]))),256))]),_:1},8,["onTabClick"])])}const Hs=ne(Kh,[["render",Yh]]),Zh={emits:["update:modelValue","change"],components:{inputButton:Vo,urlBox:Hs},props:{size:String,modelValue:String},data(){return{show:!1,value:null}},computed:{inputUrl(){return this.url2str(this.modelValue)},url(){return this.url2str(this.value)}},created(){this.modelValue&&(this.value=this.modelValue)},methods:{close(){this.show=!1},change(t){this.value=t},url2str(t){let n="";if(t&&(typeof t=="string"&&t.indexOf("┆┊")>-1?t=t.split("┆┊"):n=t),t&&typeof t=="object"){let r=t[0];r=="goods"?n="[商品]"+t[2]:r=="goodsCate"?n="[商品分类]"+t[2]:r=="article"?n="[文章]"+t[2]:t[2]=="base"&&(n=t[2])}return n},update(){this.$emit("update:modelValue",this.value)},getData(){let t=this.$refs.urlbox.getData();t&&(this.value=t,this.update()),this.show=!1}}},Xh={style:{height:"75vh"}},Qh={class:"dialog-footer flex items-center justify-end"},em={key:0,class:"pr"};function tm(t,n,r,o,i,a){const l=s.resolveComponent("url-box"),c=s.resolveComponent("el-text"),u=s.resolveComponent("el-button"),d=s.resolveComponent("el-dialog"),f=s.resolveComponent("input-button");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(d,{modelValue:i.show,"onUpdate:modelValue":n[1]||(n[1]=p=>i.show=p),title:"选择链接",width:"1080px",top:"5vh","append-to-body":""},{footer:s.withCtx(()=>[s.createElementVNode("div",Qh,[a.url?(s.openBlock(),s.createElementBlock("div",em,[s.createVNode(c,{size:"small",class:"pr-xs"},{default:s.withCtx(()=>[...n[3]||(n[3]=[s.createTextVNode("已选链接:",-1)])]),_:1}),s.createVNode(c,{size:"small",type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(a.url),1)]),_:1})])):s.createCommentVNode("",!0),s.createVNode(u,{size:"small",onClick:n[0]||(n[0]=p=>a.close())},{default:s.withCtx(()=>[...n[4]||(n[4]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(u,{size:"small",type:"primary",onClick:a.getData},{default:s.withCtx(()=>[...n[5]||(n[5]=[s.createTextVNode("确认选择",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createElementVNode("div",Xh,[s.createVNode(l,{ref:"urlbox","model-value":i.value,onChange:a.change,style:{height:"100%"}},null,8,["model-value","onChange"])])]),_:1},8,["modelValue"]),(s.openBlock(),s.createBlock(f,{size:r.size,clearable:"",readonly:"",onClear:n[2]||(n[2]=p=>{i.value="",a.update()}),key:a.inputUrl,"model-value":a.inputUrl,icon:"i-ri-link-m",placeholder:"选择链接",btn:{text:"选择链接",click:()=>{i.show=!0}}},null,8,["size","model-value","btn"]))],64)}const nm=ne(Zh,[["render",tm]]),rm={components:{mediaBox:sr,BigUpload:Is},props:{type:String,modelValue:String,size:"",options:{type:Object,default:()=>({})},cate:{type:Number,default:0},limit:1},data(){return{videoShow:!1,fileType:"image",show:!1,value:""}},computed:{accept(){return this.fileType+"/*"},typeName(){return{video:"视频",audio:"音频",image:"图片",file:"文件"}[this.fileType]}},created(){this.value=this.modelValue,this.type&&(this.fileType=this.type)},methods:{onSuccess(t){t?(this.value=t.url,this.update(),this.$msg.success(t.name+":上传成功")):this.$msg.error(t.name+"上传失败:"+e.msg)},fndel(){this.value="",this.update()},update(){this.$emit("update:modelValue",this.value),this.$emit("change",this.value)},getFile(){let t=this.$refs.fileBox.getData();if(typeof t=="string")return this.$msg.error(t);if(t.length==0)return this.$msg.error("请选择"+this.typeName);this.value=t[0],this.show=!1,this.update()}}},om=["src"],im={class:"dialog-footer"},sm={class:"dialog-footer"},am={key:2,class:"i-ri-image-add-line size-30%"},lm={class:"input-button"},cm={key:0,class:"mt flex"},um={key:0,class:"bg-black/80 rounded-2xl flex justify-center items-center w-60 h-40"},dm={key:1};function fm(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("el-dialog"),u=s.resolveComponent("media-box"),d=s.resolveComponent("a-image"),f=s.resolveComponent("el-input"),p=s.resolveComponent("BigUpload");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(c,{modelValue:i.videoShow,"onUpdate:modelValue":n[1]||(n[1]=h=>i.videoShow=h),title:a.typeName,width:"600px",top:"15vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",im,[s.createVNode(l,{size:"small",onClick:n[0]||(n[0]=h=>i.videoShow=!1)},{default:s.withCtx(()=>[...n[10]||(n[10]=[s.createTextVNode("关闭",-1)])]),_:1})])]),default:s.withCtx(()=>[i.value&&i.videoShow?(s.openBlock(),s.createElementBlock("video",{key:0,src:t.$fileUrl(i.value),controls:"",style:s.normalizeStyle(`height:${{video:"400px",audio:"100px"}[i.fileType]};width: 100%;`)},null,12,om)):s.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),s.createVNode(c,{modelValue:i.show,"onUpdate:modelValue":n[3]||(n[3]=h=>i.show=h),title:"选择"+a.typeName,width:"1080px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",sm,[s.createVNode(l,{size:"small",onClick:n[2]||(n[2]=h=>i.show=!1)},{default:s.withCtx(()=>[...n[11]||(n[11]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(l,{size:"small",type:"primary",onClick:a.getFile},{default:s.withCtx(()=>[...n[12]||(n[12]=[s.createTextVNode("确认",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(u,{type:i.fileType,sum:r.limit,cate:r.cate,ref:"fileBox"},null,8,["type","sum","cate"])]),_:1},8,["modelValue","title"]),r.options?.plain?(s.openBlock(),s.createElementBlock("div",{key:0,class:"input-img-add group",style:s.normalizeStyle({width:r.options.width,height:r.options.height||r.options.width}),onClick:n[5]||(n[5]=h=>i.show=!0)},[i.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:"group-hover:flex hidden pos-absolute z-10 -top-3 -right-3 bg-primary rounded-full size-5 justify-center items-center hover:bg-red-6",title:"删除",onClick:n[4]||(n[4]=s.withModifiers((...h)=>a.fndel&&a.fndel(...h),["stop"]))},[...n[13]||(n[13]=[s.createElementVNode("i",{class:"i-ri-close-line bg-white"},null,-1)])])):s.createCommentVNode("",!0),i.value?(s.openBlock(),s.createBlock(d,{key:1,style:s.normalizeStyle({width:r.options.width,height:r.options.height||r.options.width}),fit:"contain",src:i.value},null,8,["style","src"])):(s.openBlock(),s.createElementBlock("i",am))],4)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createElementVNode("div",lm,[s.createVNode(f,{clearable:"",readonly:"",modelValue:i.value,"onUpdate:modelValue":n[7]||(n[7]=h=>i.value=h),placeholder:"选择"+a.typeName},{prefix:s.withCtx(()=>[s.createElementVNode("i",{class:s.normalizeClass(["line-height font-lg",{video:"ri-vidicon-line",audio:"ri-disc-line",image:"ri-image-line"}[i.fileType]]),style:{color:"#d9d9d9"}},null,2)]),suffix:s.withCtx(()=>[i.value?(s.openBlock(),s.createElementBlock("i",{key:0,onClick:n[6]||(n[6]=s.withModifiers((...h)=>a.fndel&&a.fndel(...h),["stop"])),class:"i-ri-delete-bin-7-line click font-md hover:color-red",title:"清空输入框"})):s.createCommentVNode("",!0)]),_:1},8,["modelValue","placeholder"]),r.options.direct?(s.openBlock(),s.createBlock(p,{key:0,accept:a.accept,type:i.fileType,cate:-1,limit:r.limit,onSuccess:a.onSuccess},{default:s.withCtx(()=>[s.createVNode(l,{style:{"margin-left":"-2px"},type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.value?"更换":"选择")+s.toDisplayString(a.typeName),1)]),_:1})]),_:1},8,["accept","type","limit","onSuccess"])):(s.openBlock(),s.createBlock(l,{key:1,style:{"margin-left":"-2px"},type:"primary",onClick:n[8]||(n[8]=h=>i.show=!0)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.value?"更换":"选择")+s.toDisplayString(a.typeName),1)]),_:1}))]),i.value?(s.openBlock(),s.createElementBlock("div",cm,[i.fileType=="video"||i.fileType=="audio"?(s.openBlock(),s.createElementBlock("div",um,[s.createElementVNode("div",{class:"i-ri-play-fill size-20 color-white/40 hover:color-white click",onClick:n[9]||(n[9]=h=>i.videoShow=!0)})])):i.value?(s.openBlock(),s.createElementBlock("div",dm,[s.createVNode(d,{class:"img-grid-bg max-w-30 max-h-30 min-w-10 min-h-10",src:i.value},null,8,["src"])])):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0)],64))],64)}const pm=ne(rm,[["render",fm]]);let Oo=!1;const hm={name:"input-file",props:{modelValue:String,isSystem:{type:[String,Number,Boolean],default:!1},size:"",disabled:Boolean,url:{type:String,default:""},accept:{type:String,default:""},filename:{type:String,default:""}},data(){return{show:!1,value:"",percent:0,action:"",headers:{jwt:this.$cache.get("admin_jwt")}}},created(){this.value=this.modelValue,this.url?this.action=DMX.apiUrl+this.url:this.action=DMX.apiUrl+`admin.upload/upFile?name=${this.filename}&system=`+(this.isSystem?1:0)},methods:{onSuccess(t,n,r){this.$refs.upload.clearFiles(),Oo.close(),t.code==0?(this.value=t.data,this.$emit("update:modelValue",this.value),this.$msg.success("上传成功")):this.$msg.error(t.msg)},beforeUpload(t){Oo=this.$loading("上传中")},onError(t){return Oo.close(),this.$msg.error("上传失败")},onProgress(t){this.percent=parseInt(t.percent)}}},mm={class:"input-button"},gm={key:0,class:"mt-sm"};function ym(t,n,r,o,i,a){const l=s.resolveComponent("el-input"),c=s.resolveComponent("el-button"),u=s.resolveComponent("el-upload"),d=s.resolveComponent("el-progress");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",mm,[s.createVNode(l,{modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=f=>i.value=f),placeholder:"选择文件",readonly:""},{prefix:s.withCtx(()=>[...n[1]||(n[1]=[s.createElementVNode("i",{class:"i-ri-file-line",style:{color:"#d9d9d9"}},null,-1)])]),_:1},8,["modelValue"]),s.createVNode(u,{action:i.action,headers:i.headers,"on-success":a.onSuccess,onProgress:a.onProgress,"on-error":a.onError,accept:r.accept,"before-upload":a.beforeUpload,"show-file-list":!1,ref:"upload"},{default:s.withCtx(()=>[s.createVNode(c,{type:"primary"},{default:s.withCtx(()=>[...n[2]||(n[2]=[s.createTextVNode("选择文件",-1)])]),_:1})]),_:1},8,["action","headers","on-success","onProgress","on-error","accept","before-upload"])]),i.percent!=0&&i.percent!=100?(s.openBlock(),s.createElementBlock("div",gm,[s.createVNode(d,{percentage:i.percent},null,8,["percentage"])])):s.createCommentVNode("",!0)],64)}const bm=ne(hm,[["render",ym]]),Cm={name:"input-md5",props:{type:{type:[Number,String],default:0},length:{type:[Number,String],default:32},disabled:{type:[String,Boolean],default:!1},modelValue:String},data(){return{value:""}},created(){this.value=this.modelValue,this.$watch("value",(t,n)=>{this.$emit("update:modelValue",this.value)})},methods:{getKey(){const t=[];let n=[];const r=this.type+"";r==0||r==""?n.push("0123456789abcdefghijklmnopqrstuvwxyz_-!@"):(r.indexOf("1")>-1&&n.push("0123456789"),r.indexOf("2")>-1&&n.push("abcdefghijklmnopqrstuvwxyz"),r.indexOf("3")>-1&&n.push("_-!@")),n=n.join();for(let o=0;o<this.length;o++)t[o]=n.substr(Math.floor(Math.random()*n.length),1);return t.join("")},doMd5(){return this.getKey()}}};function vm(t,n,r,o,i,a){const l=s.resolveComponent("input-button");return s.openBlock(),s.createBlock(l,{modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=c=>i.value=c),clearable:"",icon:"i-ri-key-2-line",disabled:!!r.disabled,onClear:n[1]||(n[1]=c=>i.value=""),btn:{text:"随机生成",click:a.doMd5}},null,8,["modelValue","disabled","btn"])}const Dm=ne(Cm,[["render",vm]]),wm={emits:["change"],props:{init:{type:Object,default:()=>({})},modelValue:String|Array},data(){return{pk:"id",url:"",btn:{text:"搜索"},placeholder:"搜索",current:0,error:"没有搜索结果~",errorStatus:!1,value:"",list:[],onItems:{}}},created(){const{pk:t="id",titleName:n="title",imgName:r="img",url:o=""}=this.init;this.pk=t,this.url=o,this.titleName=n,this.imgName=r},methods:{getData(){return{value:this.current,detail:this.onItems}},fnClick(t){this.current=t[this.pk],this.onItems=t,this.$emit("change",{value:this.current,detail:this.onItems})},search(){if(!this.value)return this.$msg.info("请输入搜索内容");this.current=this.id=0,this.errorStatus=!1,this.getList()},getList(){if(!this.url)return $msg.error("no url");$req.post(this.url,{where:{[this.titleName]:this.value}}).then(t=>{t.code==0&&t.data.length>0?this.list=t.data:(this.list=[],this.$msg.info(t.msg||"没有相关搜索结果"),this.errorStatus=!0)})}}},xm={class:"search-box"},Bm={key:0,class:"search-box-no-msg"},km={class:"search-box-list max-w-800px flex gap-sm flex-wrap mx-auto"},Em=["onClick"],_m={class:"flex psm"},Am={class:"flex flex-col flex-1"},Nm={key:0,class:"line-clamp-2"},Sm={class:"color-error pt-xs"};function Fm(t,n,r,o,i,a){const l=s.resolveComponent("input-button"),c=s.resolveComponent("a-image"),u=s.resolveComponent("el-scrollbar");return s.openBlock(),s.createElementBlock("div",xm,[s.createVNode(u,{class:"overflow-x-hidden w-full",height:"100%"},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["search-box-search","search-box-search-"+i.list.length])},[s.createVNode(l,{modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=d=>i.value=d),props:{clearable:!0},icon:"i-ri-search-line",placeholder:r.init.placeholder2??"选择",btn:{text:i.btn.text,click:d=>{d&&a.search()}}},null,8,["modelValue","placeholder","btn"])],2),i.errorStatus?(s.openBlock(),s.createElementBlock("div",Bm,s.toDisplayString(i.error),1)):s.createCommentVNode("",!0),s.createElementVNode("div",km,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(d,f)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["item w-[calc(50%-0.875rem)] leading-tight",i.current==d[i.pk]?"on":""]),onClick:p=>a.fnClick(d)},[s.renderSlot(t.$slots,"item",{item:d},()=>[s.createElementVNode("div",_m,[d[t.imgName]?(s.openBlock(),s.createBlock(c,{key:0,class:"size-40px mr-sm",lazy:"",fit:"cover",preview:!1,src:d[t.imgName]},null,8,["src"])):s.createCommentVNode("",!0),s.createElementVNode("div",Am,[d[t.titleName]?(s.openBlock(),s.createElementBlock("span",Nm,s.toDisplayString(d[t.titleName]),1)):s.createCommentVNode("",!0),s.createElementVNode("span",Sm,"ID:"+s.toDisplayString(d[i.pk]),1)])])],!0)],10,Em))),256))])]),_:3})])}const Vm={components:{inBox:ne(wm,[["render",Fm],["__scopeId","data-v-877e7b5a"]])},emits:["change","update:modelValue"],props:{data:Object,size:"",init:{type:Object,default:()=>({})},modelValue:String|Number},data(){return{pk:"",titleName:"",imgName:"",show:!1,icon:"",value:null,showValue:null,showData:null}},computed:{btnText(){let t="选择";return this.value&&(t="更换"),t+this.init.name}},created(){this.modelValue&&(this.showValue=this.value=this.modelValue);const{pk:t="id",titleName:n="title",imgName:r="img",icon:o="ri-git-commit-line"}=this.init;this.pk=t,this.icon=o,this.titleName=n,this.imgName=r,this.init.join&&this.data[this.init.join]&&(this.showData=this.data[this.init.join])},methods:{close(){this.show=!1},change(t){this.showValue=t.value},btnClick(t){this.show=!0},clear(){this.value=null,this.showData=null,this.$emit("update:modelValue",null),this.show=!1},getData(){let t=this.$refs.inBox.getData();if(t.value)this.value=t.value,this.$emit("update:modelValue",t.value),this.init.join&&(this.showData=t.detail,this.$emit("change",t.detail,this.init.join)),this.show=!1;else return this.$msg.info("没有选择数据")}}},Om={class:"h-60vh w-full"},Tm={class:"dialog-footer flex justify-end"},jm={key:0,class:"pr"},Pm={key:0,class:"mt-sm"},Lm={class:"flex-inline leading-none border rounded-xs pd"},Mm={key:0,class:"mr"},zm={class:"flex-col"},$m={key:0,class:"line-clamp-2 pb-sm"},Im={key:1,class:"color-error"};function Rm(t,n,r,o,i,a){const l=s.resolveComponent("inBox"),c=s.resolveComponent("el-text"),u=s.resolveComponent("el-button"),d=s.resolveComponent("el-dialog"),f=s.resolveComponent("input-button"),p=s.resolveComponent("a-image");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(d,{modelValue:i.show,"onUpdate:modelValue":n[1]||(n[1]=h=>i.show=h),title:"搜索"+r.init.name,width:"60%",top:"10vh"},{footer:s.withCtx(()=>[s.createElementVNode("div",Tm,[i.showValue?(s.openBlock(),s.createElementBlock("div",jm,[s.createVNode(c,{size:"small",class:"pr-xs"},{default:s.withCtx(()=>[s.createTextVNode("当前选择的"+s.toDisplayString(r.init.name)+":",1)]),_:1}),s.createVNode(c,{size:"small",type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.showValue),1)]),_:1})])):s.createCommentVNode("",!0),s.createVNode(u,{size:"small",type:"primary",onClick:a.getData},{default:s.withCtx(()=>[...n[3]||(n[3]=[s.createTextVNode("确认选择",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createElementVNode("div",Om,[s.createVNode(l,{ref:"inBox",modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=h=>i.value=h),init:r.init,onChange:a.change,class:"h-60vh w-full"},{item:s.withCtx(({item:h})=>[s.renderSlot(t.$slots,"item",{item:h})]),_:3},8,["modelValue","init","onChange"])])]),_:3},8,["modelValue","title"]),(s.openBlock(),s.createBlock(f,{readonly:"",clearable:"",key:i.value,modelValue:i.value,"onUpdate:modelValue":n[2]||(n[2]=h=>i.value=h),icon:i.icon,placeholder:r.init.placeholder??"选择",btn:{text:a.btnText,click:a.btnClick},onClear:a.clear},null,8,["modelValue","icon","placeholder","btn","onClear"])),r.init.join&&i.showData?(s.openBlock(),s.createElementBlock("div",Pm,[s.renderSlot(t.$slots,"info",{data:i.showData},()=>[s.createElementVNode("div",Lm,[i.showData[i.imgName]?(s.openBlock(),s.createElementBlock("div",Mm,[s.createVNode(p,{class:"size-36px",fit:"cover",preview:!1,src:i.showData[i.imgName]},null,8,["src"])])):s.createCommentVNode("",!0),s.createElementVNode("div",zm,[i.showData[i.titleName]?(s.openBlock(),s.createElementBlock("div",$m,s.toDisplayString(i.showData[i.titleName]),1)):s.createCommentVNode("",!0),i.showData[i.pk]?(s.openBlock(),s.createElementBlock("div",Im,"ID:"+s.toDisplayString(i.showData[i.pk]),1)):s.createCommentVNode("",!0)])])])])):s.createCommentVNode("",!0)],64)}const Us=ne(Vm,[["render",Rm]]);var To;typeof global>"u"?("ActiveXObject"in window&&console.error(`抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器
|
|
2
|
+
Sorry, wangEditor V5+ versions do not support IE browser.`),Ws(),qs()):global&&(!((To=global.navigator)===null||To===void 0)&&To.userAgent.match("QQBrowser"))&&(Ws(),qs());function Ws(){typeof globalThis>"u"&&(window.globalThis=window)}function qs(){typeof AggregateError>"u"&&(window.AggregateError=function(t,n){var r=new Error(n);return r.errors=t,r})}if(typeof global=="object"){var Hm=Object.getOwnPropertyDescriptor(global,"window");global.window&&!Hm.set||(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(t){return nodeCrypto.randomFillSync(t)}}),global.document!=null&&global.document.getElementsByTagName==null&&(global.document.getElementsByTagName=function(){return[]})}function Ks(t){return Object.prototype.toString.call(t)==="[object Object]"}function tt(t){var n,r;return Ks(t)!==!1&&((n=t.constructor)===void 0||Ks(r=n.prototype)!==!1&&r.hasOwnProperty("isPrototypeOf")!==!1)}function Et(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(i){return"'"+i+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Zt(t){return!!t&&!!t[bt]}function Xt(t){return!!t&&((function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var o=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===Gm})(t)||Array.isArray(t)||!!t[ra]||!!t.constructor[ra]||Po(t)||Lo(t))}function jn(t,n,r){r===void 0&&(r=!1),fn(t)===0?(r?Object.keys:Go)(t).forEach((function(o){r&&typeof o=="symbol"||n(o,t[o],t)})):t.forEach((function(o,i){return n(i,o,t)}))}function fn(t){var n=t[bt];return n?n.i>3?n.i-4:n.i:Array.isArray(t)?1:Po(t)?2:Lo(t)?3:0}function jo(t,n){return fn(t)===2?t.has(n):Object.prototype.hasOwnProperty.call(t,n)}function Js(t,n,r){var o=fn(t);o===2?t.set(n,r):o===3?(t.delete(n),t.add(r)):t[n]=r}function Po(t){return Km&&t instanceof Map}function Lo(t){return Jm&&t instanceof Set}function Qt(t){return t.o||t.t}function Mo(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var n=Ym(t);delete n[bt];for(var r=Go(n),o=0;o<r.length;o++){var i=r[o],a=n[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),n)}function zo(t,n){return n===void 0&&(n=!1),$o(t)||Zt(t)||!Xt(t)||(fn(t)>1&&(t.set=t.add=t.clear=t.delete=Um),Object.freeze(t),n&&jn(t,(function(r,o){return zo(o,!0)}),!0)),t}function Um(){Et(2)}function $o(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Lt(t){var n=Zm[t];return n||Et(18,t),n}function Gs(){return Pn}function Io(t,n){n&&(Lt("Patches"),t.u=[],t.s=[],t.v=n)}function ar(t){Ro(t),t.p.forEach(Wm),t.p=null}function Ro(t){t===Pn&&(Pn=t.l)}function Ys(t){return Pn={p:[],l:Pn,h:t,m:!0,_:0}}function Wm(t){var n=t[bt];n.i===0||n.i===1?n.j():n.O=!0}function Ho(t,n){n._=n.p.length;var r=n.p[0],o=t!==void 0&&t!==r;return n.h.g||Lt("ES5").S(n,t,o),o?(r[bt].P&&(ar(n),Et(4)),Xt(t)&&(t=lr(n,t),n.l||cr(n,t)),n.u&&Lt("Patches").M(r[bt],t,n.u,n.s)):t=lr(n,r,[]),ar(n),n.u&&n.v(n.u,n.s),t!==na?t:void 0}function lr(t,n,r){if($o(n))return n;var o=n[bt];if(!o)return jn(n,(function(a,l){return Zs(t,o,n,a,l,r)}),!0),n;if(o.A!==t)return n;if(!o.P)return cr(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var i=o.i===4||o.i===5?o.o=Mo(o.k):o.o;jn(o.i===3?new Set(i):i,(function(a,l){return Zs(t,o,i,a,l,r)})),cr(t,i,!1),r&&t.u&&Lt("Patches").R(o,r,t.u,t.s)}return o.o}function Zs(t,n,r,o,i,a){if(Zt(i)){var l=lr(t,i,a&&n&&n.i!==3&&!jo(n.D,o)?a.concat(o):void 0);if(Js(r,o,l),!Zt(l))return;t.m=!1}if(Xt(i)&&!$o(i)){if(!t.h.F&&t._<1)return;lr(t,i),n&&n.A.l||cr(t,i)}}function cr(t,n,r){r===void 0&&(r=!1),t.h.F&&t.m&&zo(n,r)}function Uo(t,n){var r=t[bt];return(r?Qt(r):t)[n]}function Xs(t,n){if(n in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,n);if(o)return o;r=Object.getPrototypeOf(r)}}function Wo(t){t.P||(t.P=!0,t.l&&Wo(t.l))}function qo(t){t.o||(t.o=Mo(t.t))}function Ko(t,n,r){var o=Po(n)?Lt("MapSet").N(n,r):Lo(n)?Lt("MapSet").T(n,r):t.g?(function(i,a){var l=Array.isArray(i),c={i:l?1:0,A:a?a.A:Gs(),P:!1,I:!1,D:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=c,d=ur;l&&(u=[c],d=dr);var f=Proxy.revocable(u,d),p=f.revoke,h=f.proxy;return c.k=h,c.j=p,h})(n,r):Lt("ES5").J(n,r);return(r?r.A:Gs()).p.push(o),o}function qm(t){return Zt(t)||Et(22,t),(function n(r){if(!Xt(r))return r;var o,i=r[bt],a=fn(r);if(i){if(!i.P&&(i.i<4||!Lt("ES5").K(i)))return i.t;i.I=!0,o=Qs(r,a),i.I=!1}else o=Qs(r,a);return jn(o,(function(l,c){i&&(function(u,d){return fn(u)===2?u.get(d):u[d]})(i.t,l)===c||Js(o,l,n(c))})),a===3?new Set(o):o})(t)}function Qs(t,n){switch(n){case 2:return new Map(t);case 3:return Array.from(t)}return Mo(t)}var ea,Pn,Jo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Km=typeof Map<"u",Jm=typeof Set<"u",ta=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",na=Jo?Symbol.for("immer-nothing"):((ea={})["immer-nothing"]=!0,ea),ra=Jo?Symbol.for("immer-draftable"):"__$immer_draftable",bt=Jo?Symbol.for("immer-state"):"__$immer_state",Gm=""+Object.prototype.constructor,Go=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ym=Object.getOwnPropertyDescriptors||function(t){var n={};return Go(t).forEach((function(r){n[r]=Object.getOwnPropertyDescriptor(t,r)})),n},Zm={},ur={get:function(t,n){if(n===bt)return t;var r=Qt(t);if(!jo(r,n))return(function(i,a,l){var c,u=Xs(a,l);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(i.k):void 0})(t,r,n);var o=r[n];return t.I||!Xt(o)?o:o===Uo(t.t,n)?(qo(t),t.o[n]=Ko(t.A.h,o,t)):o},has:function(t,n){return n in Qt(t)},ownKeys:function(t){return Reflect.ownKeys(Qt(t))},set:function(t,n,r){var o=Xs(Qt(t),n);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var i=Uo(Qt(t),n),a=i?.[bt];if(a&&a.t===r)return t.o[n]=r,t.D[n]=!1,!0;if((function(l,c){return l===c?l!==0||1/l==1/c:l!=l&&c!=c})(r,i)&&(r!==void 0||jo(t.t,n)))return!0;qo(t),Wo(t)}return t.o[n]===r&&typeof r!="number"&&(r!==void 0||n in t.o)||(t.o[n]=r,t.D[n]=!0,!0)},deleteProperty:function(t,n){return Uo(t.t,n)!==void 0||n in t.t?(t.D[n]=!1,qo(t),Wo(t)):delete t.D[n],t.o&&delete t.o[n],!0},getOwnPropertyDescriptor:function(t,n){var r=Qt(t),o=Reflect.getOwnPropertyDescriptor(r,n);return o&&{writable:!0,configurable:t.i!==1||n!=="length",enumerable:o.enumerable,value:r[n]}},defineProperty:function(){Et(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Et(12)}},dr={};jn(ur,(function(t,n){dr[t]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}})),dr.deleteProperty=function(t,n){return ur.deleteProperty.call(this,t[0],n)},dr.set=function(t,n,r){return ur.set.call(this,t[0],n,r,t[0])};var Xm=(function(){function t(r){var o=this;this.g=ta,this.F=!0,this.produce=function(i,a,l){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var u=o;return function(m){var g=this;m===void 0&&(m=c);for(var y=arguments.length,v=Array(y>1?y-1:0),D=1;D<y;D++)v[D-1]=arguments[D];return u.produce(m,(function(w){var b;return(b=a).call.apply(b,[g,w].concat(v))}))}}var d;if(typeof a!="function"&&Et(6),l!==void 0&&typeof l!="function"&&Et(7),Xt(i)){var f=Ys(o),p=Ko(o,i,void 0),h=!0;try{d=a(p),h=!1}finally{h?ar(f):Ro(f)}return typeof Promise<"u"&&d instanceof Promise?d.then((function(m){return Io(f,l),Ho(m,f)}),(function(m){throw ar(f),m})):(Io(f,l),Ho(d,f))}if(!i||typeof i!="object")return(d=a(i))===na?void 0:(d===void 0&&(d=i),o.F&&zo(d,!0),d);Et(21,i)},this.produceWithPatches=function(i,a){return typeof i=="function"?function(u){for(var d=arguments.length,f=Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];return o.produceWithPatches(u,(function(h){return i.apply(void 0,[h].concat(f))}))}:[o.produce(i,a,(function(u,d){l=u,c=d})),l,c];var l,c},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var n=t.prototype;return n.createDraft=function(r){Xt(r)||Et(8),Zt(r)&&(r=qm(r));var o=Ys(this),i=Ko(this,r,void 0);return i[bt].C=!0,Ro(o),i},n.finishDraft=function(r,o){var i=(r&&r[bt]).A;return Io(i,o),Ho(void 0,i)},n.setAutoFreeze=function(r){this.F=r},n.setUseProxies=function(r){r&&!ta&&Et(20),this.g=r},n.applyPatches=function(r,o){var i;for(i=o.length-1;i>=0;i--){var a=o[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(o=o.slice(i+1));var l=Lt("Patches").$;return Zt(r)?l(r,o):this.produce(r,(function(c){return l(c,o)}))},t})(),Ct=new Xm,fr=Ct.produce;Ct.produceWithPatches.bind(Ct),Ct.setAutoFreeze.bind(Ct),Ct.setUseProxies.bind(Ct),Ct.applyPatches.bind(Ct);var oa=Ct.createDraft.bind(Ct),ia=Ct.finishDraft.bind(Ct);function Vt(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var pr=new WeakMap,Ln=new WeakMap,sa=new WeakMap,aa=new WeakMap,la=new WeakMap,ca=new WeakMap;function ua(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function hr(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ua(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ua(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var Qm=()=>{var t={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:n=>{for(var r of C.pathRefs(t))Ng.transform(r,n);for(var o of C.pointRefs(t))Sg.transform(o,n);for(var i of C.rangeRefs(t))Vg.transform(i,n);var a=new Set,l=[],c=h=>{if(h){var m=h.join(",");a.has(m)||(a.add(m),l.push(h))}},u=pr.get(t)||[],d=eg(n);for(var f of u)c(_.transform(f,n));for(var p of d)c(p);pr.set(t,l),O.transform(t,n),t.operations.push(n),C.normalize(t),n.type==="set_selection"&&(t.marks=null),Ln.get(t)||(Ln.set(t,!0),Promise.resolve().then((()=>{Ln.set(t,!1),t.onChange(),t.operations=[]})))},addMark:(n,r)=>{var{selection:o}=t;if(o)if(j.isExpanded(o))O.setNodes(t,{[n]:r},{match:q.isText,split:!0});else{var i=hr(hr({},C.marks(t)||{}),{},{[n]:r});t.marks=i,Ln.get(t)||t.onChange()}},deleteBackward:n=>{var{selection:r}=t;r&&j.isCollapsed(r)&&O.delete(t,{unit:n,reverse:!0})},deleteForward:n=>{var{selection:r}=t;r&&j.isCollapsed(r)&&O.delete(t,{unit:n})},deleteFragment:n=>{var{selection:r}=t;r&&j.isExpanded(r)&&O.delete(t,{reverse:n==="backward"})},getFragment:()=>{var{selection:n}=t;return n?H.fragment(t,n):[]},insertBreak:()=>{O.splitNodes(t,{always:!0})},insertFragment:n=>{O.insertFragment(t,n)},insertNode:n=>{O.insertNodes(t,n)},insertText:n=>{var{selection:r,marks:o}=t;if(r){if(o){var i=hr({text:n},o);O.insertNodes(t,i)}else O.insertText(t,n);t.marks=null}},normalizeNode:n=>{var[r,o]=n;if(!q.isText(r))if(te.isElement(r)&&r.children.length===0)O.insertNodes(t,{text:""},{at:o.concat(0),voids:!0});else for(var i=!C.isEditor(r)&&te.isElement(r)&&(t.isInline(r)||r.children.length===0||q.isText(r.children[0])||t.isInline(r.children[0])),a=0,l=0;l<r.children.length;l++,a++){var c=H.get(t,o);if(!q.isText(c)){var u=r.children[l],d=c.children[a-1],f=l===r.children.length-1;(q.isText(u)||te.isElement(u)&&t.isInline(u))!==i?(O.removeNodes(t,{at:o.concat(a),voids:!0}),a--):te.isElement(u)?t.isInline(u)&&(d!=null&&q.isText(d)?f&&(O.insertNodes(t,{text:""},{at:o.concat(a+1),voids:!0}),a++):(O.insertNodes(t,{text:""},{at:o.concat(a),voids:!0}),a++)):d!=null&&q.isText(d)&&(q.equals(u,d,{loose:!0})?(O.mergeNodes(t,{at:o.concat(a),voids:!0}),a--):d.text===""?(O.removeNodes(t,{at:o.concat(a-1),voids:!0}),a--):u.text===""&&(O.removeNodes(t,{at:o.concat(a),voids:!0}),a--))}}},removeMark:n=>{var{selection:r}=t;if(r)if(j.isExpanded(r))O.unsetNodes(t,n,{match:q.isText,split:!0});else{var o=hr({},C.marks(t)||{});delete o[n],t.marks=o,Ln.get(t)||t.onChange()}}};return t},eg=t=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":var{path:n}=t;return _.levels(n);case"insert_node":var{node:r,path:o}=t,i=_.levels(o),a=q.isText(r)?[]:Array.from(H.nodes(r),(x=>{var[,k]=x;return o.concat(k)}));return[...i,...a];case"merge_node":var{path:l}=t;return[..._.ancestors(l),_.previous(l)];case"move_node":var{path:c,newPath:u}=t;if(_.equals(c,u))return[];var d=[],f=[];for(var p of _.ancestors(c)){var h=_.transform(p,t);d.push(h)}for(var m of _.ancestors(u)){var g=_.transform(m,t);f.push(g)}var y=f[f.length-1],v=u[u.length-1],D=y.concat(v);return[...d,...f,D];case"remove_node":var{path:w}=t;return[..._.ancestors(w)];case"split_node":var{path:b}=t;return[..._.levels(b),_.next(b)];default:return[]}};function Mt(t,n){if(t==null)return{};var r,o,i=(function(l,c){if(l==null)return{};var u,d,f={},p=Object.keys(l);for(d=0;d<p.length;d++)u=p[d],c.indexOf(u)>=0||(f[u]=l[u]);return f})(t,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o<a.length;o++)r=a[o],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var pe,Yo=function(t){var n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=!n,o=n?ig(t):t,i=pe.None,a=pe.None,l=0,c=null;for(var u of o){var d=u.codePointAt(0);if(!d)break;var f=yg(u,d);if([i,a]=r?[a,f]:[f,i],pn(i,pe.ZWJ)&&pn(a,pe.ExtPict)&&!Dg(r?t.substring(0,l):t.substring(0,t.length-l))||pn(i,pe.RI)&&pn(a,pe.RI)&&!(c=c!==null?!c:!!r||xg(t.substring(0,t.length-l)))||i!==pe.None&&a!==pe.None&&Cg(i,a))break;l+=u.length}return l||1},tg=/\s/,ng=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,rg=/['\u2018\u2019]/,Zo=(t,n,r)=>{if(r){var o=t.length-n;return[t.slice(o,t.length),t.slice(0,o)]}return[t.slice(0,n),t.slice(n)]},og=function t(n,r){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(tg.test(n))return!1;if(rg.test(n)){var i=Yo(r,o),[a,l]=Zo(r,i,o);if(t(a,l,o))return!0}return!ng.test(n)},ig=function*(t){for(var n=t.length-1,r=0;r<t.length;r++){var o=t.charAt(n-r);if(ag(o.charCodeAt(0))){var i=t.charAt(n-r-1);if(sg(i.charCodeAt(0))){yield i+o,r++;continue}}yield o}},sg=t=>t>=55296&&t<=56319,ag=t=>t>=56320&&t<=57343;(function(t){t[t.None=0]="None",t[t.Extend=1]="Extend",t[t.ZWJ=2]="ZWJ",t[t.RI=4]="RI",t[t.Prepend=8]="Prepend",t[t.SpacingMark=16]="SpacingMark",t[t.L=32]="L",t[t.V=64]="V",t[t.T=128]="T",t[t.LV=256]="LV",t[t.LVT=512]="LVT",t[t.ExtPict=1024]="ExtPict",t[t.Any=2048]="Any"})(pe||(pe={}));var lg=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,cg=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,ug=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,dg=/^[\u1100-\u115F\uA960-\uA97C]$/,fg=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,pg=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,hg=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,mg=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,gg=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,yg=(t,n)=>{var r=pe.Any;return t.search(lg)!==-1&&(r|=pe.Extend),n===8205&&(r|=pe.ZWJ),n>=127462&&n<=127487&&(r|=pe.RI),t.search(cg)!==-1&&(r|=pe.Prepend),t.search(ug)!==-1&&(r|=pe.SpacingMark),t.search(dg)!==-1&&(r|=pe.L),t.search(fg)!==-1&&(r|=pe.V),t.search(pg)!==-1&&(r|=pe.T),t.search(hg)!==-1&&(r|=pe.LV),t.search(mg)!==-1&&(r|=pe.LVT),t.search(gg)!==-1&&(r|=pe.ExtPict),r};function pn(t,n){return!!(t&n)}var bg=[[pe.L,pe.L|pe.V|pe.LV|pe.LVT],[pe.LV|pe.V,pe.V|pe.T],[pe.LVT|pe.T,pe.T],[pe.Any,pe.Extend|pe.ZWJ],[pe.Any,pe.SpacingMark],[pe.Prepend,pe.Any],[pe.ZWJ,pe.ExtPict],[pe.RI,pe.RI]];function Cg(t,n){return bg.findIndex((r=>pn(t,r[0])&&pn(n,r[1])))===-1}var vg=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,Dg=t=>t.search(vg)!==-1,wg=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,xg=t=>{var n=t.match(wg);return n!==null&&n[0].length/2%2==1},da=t=>tt(t)&&H.isNodeList(t.children)&&!C.isEditor(t),te={isAncestor:t=>tt(t)&&H.isNodeList(t.children),isElement:da,isElementList:t=>Array.isArray(t)&&t.every((n=>te.isElement(n))),isElementProps:t=>t.children!==void 0,isElementType:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return da(t)&&t[r]===n},matches(t,n){for(var r in n)if(r!=="children"&&t[r]!==n[r])return!1;return!0}},Bg=["text"],kg=["text"];function fa(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function hn(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?fa(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fa(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var pa=new WeakMap,C={above(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:o="lowest",at:i=t.selection,match:a}=n;if(i){var l=C.path(t,i),c=o==="lowest";for(var[u,d]of C.levels(t,{at:l,voids:r,match:a,reverse:c}))if(!q.isText(u)&&!_.equals(l,d))return[u,d]}},addMark(t,n,r){t.addMark(n,r)},after(t,n){var r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i={anchor:C.point(t,n,{edge:"end"}),focus:C.end(t,[])},{distance:a=1}=o,l=0;for(var c of C.positions(t,hn(hn({},o),{},{at:i}))){if(l>a)break;l!==0&&(r=c),l++}return r},before(t,n){var r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i={anchor:C.start(t,[]),focus:C.point(t,n,{edge:"start"})},{distance:a=1}=o,l=0;for(var c of C.positions(t,hn(hn({},o),{},{at:i,reverse:!0}))){if(l>a)break;l!==0&&(r=c),l++}return r},deleteBackward(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=n;t.deleteBackward(r)},deleteForward(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=n;t.deleteForward(r)},deleteFragment(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{direction:r="forward"}=n;t.deleteFragment(r)},edges:(t,n)=>[C.start(t,n),C.end(t,n)],end:(t,n)=>C.point(t,n,{edge:"end"}),first(t,n){var r=C.path(t,n,{edge:"start"});return C.node(t,r)},fragment(t,n){var r=C.range(t,n);return H.fragment(t,r)},hasBlocks:(t,n)=>n.children.some((r=>C.isBlock(t,r))),hasInlines:(t,n)=>n.children.some((r=>q.isText(r)||C.isInline(t,r))),hasTexts:(t,n)=>n.children.every((r=>q.isText(r))),insertBreak(t){t.insertBreak()},insertFragment(t,n){t.insertFragment(n)},insertNode(t,n){t.insertNode(n)},insertText(t,n){t.insertText(n)},isBlock:(t,n)=>te.isElement(n)&&!t.isInline(n),isEditor(t){if(!tt(t))return!1;var n=pa.get(t);if(n!==void 0)return n;var r=typeof t.addMark=="function"&&typeof t.apply=="function"&&typeof t.deleteBackward=="function"&&typeof t.deleteForward=="function"&&typeof t.deleteFragment=="function"&&typeof t.insertBreak=="function"&&typeof t.insertFragment=="function"&&typeof t.insertNode=="function"&&typeof t.insertText=="function"&&typeof t.isInline=="function"&&typeof t.isVoid=="function"&&typeof t.normalizeNode=="function"&&typeof t.onChange=="function"&&typeof t.removeMark=="function"&&(t.marks===null||tt(t.marks))&&(t.selection===null||j.isRange(t.selection))&&H.isNodeList(t.children)&&Wt.isOperationList(t.operations);return pa.set(t,r),r},isEnd(t,n,r){var o=C.end(t,r);return ye.equals(n,o)},isEdge:(t,n,r)=>C.isStart(t,n,r)||C.isEnd(t,n,r),isEmpty(t,n){var{children:r}=n,[o]=r;return r.length===0||r.length===1&&q.isText(o)&&o.text===""&&!t.isVoid(n)},isInline:(t,n)=>te.isElement(n)&&t.isInline(n),isNormalizing(t){var n=sa.get(t);return n===void 0||n},isStart(t,n,r){if(n.offset!==0)return!1;var o=C.start(t,r);return ye.equals(n,o)},isVoid:(t,n)=>te.isElement(n)&&t.isVoid(n),last(t,n){var r=C.path(t,n,{edge:"end"});return C.node(t,r)},leaf(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=C.path(t,n,r);return[H.leaf(t,o),o]},*levels(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=t.selection,reverse:o=!1,voids:i=!1}=n,{match:a}=n;if(a==null&&(a=()=>!0),r){var l=[],c=C.path(t,r);for(var[u,d]of H.levels(t,c))if(a(u,d)&&(l.push([u,d]),!i&&C.isVoid(t,u)))break;o&&l.reverse(),yield*l}},marks(t){var{marks:n,selection:r}=t;if(!r)return null;if(n)return n;if(j.isExpanded(r)){var[o]=C.nodes(t,{match:q.isText});if(o){var[i]=o;return Mt(i,Bg)}return{}}var{anchor:a}=r,{path:l}=a,[c]=C.leaf(t,l);if(a.offset===0){var u=C.previous(t,{at:l,match:q.isText}),d=C.above(t,{match:m=>C.isBlock(t,m)});if(u&&d){var[f,p]=u,[,h]=d;_.isAncestor(h,p)&&(c=f)}}return Mt(c,kg)},next(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:o=!1}=n,{match:i,at:a=t.selection}=n;if(a){var l=C.after(t,a,{voids:o});if(l){var[,c]=C.last(t,[]),u=[l.path,c];if(_.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(_.isPath(a)){var[d]=C.parent(t,a);i=p=>d.children.includes(p)}else i=()=>!0;var[f]=C.nodes(t,{at:u,match:i,mode:r,voids:o});return f}}},node(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=C.path(t,n,r);return[H.get(t,o),o]},*nodes(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=t.selection,mode:o="all",universal:i=!1,reverse:a=!1,voids:l=!1}=n,{match:c}=n;if(c||(c=()=>!0),r){var u,d;if(Eg.isSpan(r))u=r[0],d=r[1];else{var f=C.path(t,r,{edge:"start"}),p=C.path(t,r,{edge:"end"});u=a?p:f,d=a?f:p}var h,m=H.nodes(t,{reverse:a,from:u,to:d,pass:b=>{var[x]=b;return!l&&C.isVoid(t,x)}}),g=[];for(var[y,v]of m){var D=h&&_.compare(v,h[1])===0;if(o!=="highest"||!D){if(c(y,v))if(o==="lowest"&&D)h=[y,v];else{var w=o==="lowest"?h:[y,v];w&&(i?g.push(w):yield w),h=[y,v]}else if(i&&!D&&q.isText(y))return}}o==="lowest"&&h&&(i?g.push(h):yield h),i&&(yield*g)}},normalize(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1}=n,o=a=>pr.get(a)||[];if(C.isNormalizing(t)){if(r){var i=Array.from(H.nodes(t),(a=>{var[,l]=a;return l}));pr.set(t,i)}o(t).length!==0&&C.withoutNormalizing(t,(()=>{for(var a of o(t))if(H.has(t,a)){var l=C.node(t,a),[c,u]=l;te.isElement(c)&&c.children.length===0&&t.normalizeNode(l)}for(var d=42*o(t).length,f=0;o(t).length!==0;){if(f>d)throw new Error(`
|
|
3
3
|
Could not completely normalize the editor after `.concat(d,` iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.
|
|
4
|
-
`));var p=o(t).pop();if(H.has(t,p)){var h=C.node(t,p);t.normalizeNode(h)}f++}}))}},parent(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=C.path(t,n,r),i=_.parent(o);return C.node(t,i)},path(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:o,edge:i}=r;if(_.isPath(n)){if(i==="start"){var[,a]=H.first(t,n);n=a}else if(i==="end"){var[,l]=H.last(t,n);n=l}}return j.isRange(n)&&(n=i==="start"?j.start(n):i==="end"?j.end(n):_.common(n.anchor.path,n.focus.path)),ye.isPoint(n)&&(n=n.path),o!=null&&(n=n.slice(0,o)),n},hasPath:(t,n)=>H.has(t,n),pathRef(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:o="forward"}=r,i={current:n,affinity:o,unref(){var{current:a}=i;return C.pathRefs(t).delete(i),i.current=null,a}};return C.pathRefs(t).add(i),i},pathRefs(t){var n=aa.get(t);return n||(n=new Set,aa.set(t,n)),n},point(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:o="start"}=r;if(_.isPath(n)){var i;if(o==="end"){var[,a]=H.last(t,n);i=a}else{var[,l]=H.first(t,n);i=l}var c=H.get(t,i);if(!q.isText(c))throw new Error("Cannot get the ".concat(o," point in the node at path [").concat(n,"] because it has no ").concat(o," text node."));return{path:i,offset:o==="end"?c.text.length:0}}if(j.isRange(n)){var[u,d]=j.edges(n);return o==="start"?u:d}return n},pointRef(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:o="forward"}=r,i={current:n,affinity:o,unref(){var{current:a}=i;return C.pointRefs(t).delete(i),i.current=null,a}};return C.pointRefs(t).add(i),i},pointRefs(t){var n=la.get(t);return n||(n=new Set,la.set(t,n)),n},*positions(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=t.selection,unit:o="offset",reverse:i=!1,voids:a=!1}=n;if(r){var l=C.range(t,r),[c,u]=j.edges(l),d=i?u:c,f=!1,p="",h=0,m=0,g=0;for(var[y,v]of C.nodes(t,{at:r,reverse:i,voids:a})){if(te.isElement(y)){if(!a&&t.isVoid(y)){yield C.start(t,v);continue}if(t.isInline(y))continue;if(C.hasInlines(t,y)){var D=_.isAncestor(v,u.path)?u:C.end(t,v),w=_.isAncestor(v,c.path)?c:C.start(t,v);p=C.string(t,{anchor:w,focus:D},{voids:a}),f=!0}}if(q.isText(y)){var b=_.equals(v,d.path);for(b?(m=i?d.offset:y.text.length-d.offset,g=d.offset):(m=y.text.length,g=i?m:0),(b||f||o==="offset")&&(yield{path:v,offset:g},f=!1);;){if(h===0){if(p==="")break;h=x(p,o,i),p=Zo(p,h,i)[1]}if(g=i?g-h:g+h,(m-=h)<0){h=-m;break}h=0,yield{path:v,offset:g}}}}}function x(k,E,B){return E==="character"?Yo(k,B):E==="word"?(function(V){for(var T=arguments.length>1&&arguments[1]!==void 0&&arguments[1],P=0,R=!1;V.length>0;){var I=Yo(V,T),[U,G]=Zo(V,I,T);if(rg(U,G,T))R=!0,P+=I;else{if(R)break;P+=I}V=G}return P})(k,B):E==="line"||E==="block"?k.length:1}},previous(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:o=!1}=n,{match:i,at:a=t.selection}=n;if(a){var l=C.before(t,a,{voids:o});if(l){var[,c]=C.first(t,[]),u=[l.path,c];if(_.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(_.isPath(a)){var[d]=C.parent(t,a);i=p=>d.children.includes(p)}else i=()=>!0;var[f]=C.nodes(t,{reverse:!0,at:u,match:i,mode:r,voids:o});return f}}},range:(t,n,r)=>j.isRange(n)&&!r?n:{anchor:C.start(t,n),focus:C.end(t,r||n)},rangeRef(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:o="forward"}=r,i={current:n,affinity:o,unref(){var{current:a}=i;return C.rangeRefs(t).delete(i),i.current=null,a}};return C.rangeRefs(t).add(i),i},rangeRefs(t){var n=ca.get(t);return n||(n=new Set,ca.set(t,n)),n},removeMark(t,n){t.removeMark(n)},setNormalizing(t,n){sa.set(t,n)},start:(t,n)=>C.point(t,n,{edge:"start"}),string(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:o=!1}=r,i=C.range(t,n),[a,l]=j.edges(i),c="";for(var[u,d]of C.nodes(t,{at:i,match:q.isText,voids:o})){var f=u.text;_.equals(d,l.path)&&(f=f.slice(0,l.offset)),_.equals(d,a.path)&&(f=f.slice(a.offset)),c+=f}return c},unhangRange(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:o=!1}=r,[i,a]=j.edges(n);if(i.offset!==0||a.offset!==0||j.isCollapsed(n))return n;var l=C.above(t,{at:a,match:h=>C.isBlock(t,h)}),c=l?l[1]:[],u={anchor:C.start(t,[]),focus:a},d=!0;for(var[f,p]of C.nodes(t,{at:u,match:q.isText,reverse:!0,voids:o}))if(d)d=!1;else if(f.text!==""||_.isBefore(p,c)){a={path:p,offset:f.text.length};break}return{anchor:i,focus:a}},void(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return C.above(t,hn(hn({},n),{},{match:r=>C.isVoid(t,r)}))},withoutNormalizing(t,n){var r=C.isNormalizing(t);C.setNormalizing(t,!1);try{n()}finally{C.setNormalizing(t,r)}C.normalize(t)}},kg={isSpan:t=>Array.isArray(t)&&t.length===2&&t.every(_.isPath)},Eg=["children"],_g=["text"],ha=new WeakMap,H={ancestor(t,n){var r=H.get(t,n);if(q.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(n,"] because it refers to a text node instead: ").concat(r));return r},*ancestors(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var o of _.ancestors(n,r)){var i=[H.ancestor(t,o),o];yield i}},child(t,n){if(q.isText(t))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(t)));var r=t.children[n];if(r==null)throw new Error("Cannot get child at index `".concat(n,"` in node: ").concat(JSON.stringify(t)));return r},*children(t,n){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{reverse:o=!1}=r,i=H.ancestor(t,n),{children:a}=i,l=o?a.length-1:0;o?l>=0:l<a.length;){var c=H.child(i,l),u=n.concat(l);yield[c,u],l=o?l-1:l+1}},common(t,n,r){var o=_.common(n,r);return[H.get(t,o),o]},descendant(t,n){var r=H.get(t,n);if(C.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(n,"] because it refers to the root editor node instead: ").concat(r));return r},*descendants(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,o]of H.nodes(t,n))o.length!==0&&(yield[r,o])},*elements(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,o]of H.nodes(t,n))te.isElement(r)&&(yield[r,o])},extractProps:t=>te.isAncestor(t)?Mt(t,Eg):Mt(t,_g),first(t,n){for(var r=n.slice(),o=H.get(t,r);o&&!q.isText(o)&&o.children.length!==0;)o=o.children[0],r.push(0);return[o,r]},fragment(t,n){if(q.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(t)));var r=fr({children:t.children},(o=>{var[i,a]=j.edges(n),l=H.nodes(o,{reverse:!0,pass:h=>{var[,m]=h;return!j.includes(n,m)}});for(var[,c]of l){if(!j.includes(n,c)){var u=H.parent(o,c),d=c[c.length-1];u.children.splice(d,1)}if(_.equals(c,a.path)){var f=H.leaf(o,c);f.text=f.text.slice(0,a.offset)}if(_.equals(c,i.path)){var p=H.leaf(o,c);p.text=p.text.slice(i.offset)}}C.isEditor(o)&&(o.selection=null)}));return r.children},get(t,n){for(var r=t,o=0;o<n.length;o++){var i=n[o];if(q.isText(r)||!r.children[i])throw new Error("Cannot find a descendant at path [".concat(n,"] in node: ").concat(JSON.stringify(t)));r=r.children[i]}return r},has(t,n){for(var r=t,o=0;o<n.length;o++){var i=n[o];if(q.isText(r)||!r.children[i])return!1;r=r.children[i]}return!0},isNode:t=>q.isText(t)||te.isElement(t)||C.isEditor(t),isNodeList(t){if(!Array.isArray(t))return!1;var n=ha.get(t);if(n!==void 0)return n;var r=t.every((o=>H.isNode(o)));return ha.set(t,r),r},last(t,n){for(var r=n.slice(),o=H.get(t,r);o&&!q.isText(o)&&o.children.length!==0;){var i=o.children.length-1;o=o.children[i],r.push(i)}return[o,r]},leaf(t,n){var r=H.get(t,n);if(!q.isText(r))throw new Error("Cannot get the leaf node at path [".concat(n,"] because it refers to a non-leaf node: ").concat(r));return r},*levels(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var o of _.levels(n,r)){var i=H.get(t,o);yield[i,o]}},matches:(t,n)=>te.isElement(t)&&te.isElementProps(n)&&te.matches(t,n)||q.isText(t)&&q.isTextProps(n)&&q.matches(t,n),*nodes(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{pass:r,reverse:o=!1}=n,{from:i=[],to:a}=n,l=new Set,c=[],u=t;!a||!(o?_.isBefore(c,a):_.isAfter(c,a));)if(l.has(u)||(yield[u,c]),l.has(u)||q.isText(u)||u.children.length===0||r!=null&&r([u,c])!==!1){if(c.length===0)break;if(!o){var d=_.next(c);if(H.has(t,d)){c=d,u=H.get(t,c);continue}}o&&c[c.length-1]!==0?(c=_.previous(c),u=H.get(t,c)):(c=_.parent(c),u=H.get(t,c),l.add(u))}else{l.add(u);var f=o?u.children.length-1:0;_.isAncestor(c,i)&&(f=i[c.length]),c=c.concat(f),u=H.get(t,c)}},parent(t,n){var r=_.parent(n),o=H.get(t,r);if(q.isText(o))throw new Error("Cannot get the parent of path [".concat(n,"] because it does not exist in the root."));return o},string:t=>q.isText(t)?t.text:t.children.map(H.string).join(""),*texts(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,o]of H.nodes(t,n))q.isText(r)&&(yield[r,o])}};function ma(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function We(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ma(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ma(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var Wt={isNodeOperation:t=>Wt.isOperation(t)&&t.type.endsWith("_node"),isOperation(t){if(!tt(t))return!1;switch(t.type){case"insert_node":case"remove_node":return _.isPath(t.path)&&H.isNode(t.node);case"insert_text":case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&_.isPath(t.path);case"merge_node":return typeof t.position=="number"&&_.isPath(t.path)&&tt(t.properties);case"move_node":return _.isPath(t.path)&&_.isPath(t.newPath);case"set_node":return _.isPath(t.path)&&tt(t.properties)&&tt(t.newProperties);case"set_selection":return t.properties===null&&j.isRange(t.newProperties)||t.newProperties===null&&j.isRange(t.properties)||tt(t.properties)&&tt(t.newProperties);case"split_node":return _.isPath(t.path)&&typeof t.position=="number"&&tt(t.properties);default:return!1}},isOperationList:t=>Array.isArray(t)&&t.every((n=>Wt.isOperation(n))),isSelectionOperation:t=>Wt.isOperation(t)&&t.type.endsWith("_selection"),isTextOperation:t=>Wt.isOperation(t)&&t.type.endsWith("_text"),inverse(t){switch(t.type){case"insert_node":return We(We({},t),{},{type:"remove_node"});case"insert_text":return We(We({},t),{},{type:"remove_text"});case"merge_node":return We(We({},t),{},{type:"split_node",path:_.previous(t.path)});case"move_node":var{newPath:n,path:r}=t;if(_.equals(n,r))return t;if(_.isSibling(r,n))return We(We({},t),{},{path:n,newPath:r});var o=_.transform(r,t),i=_.transform(_.next(r),t);return We(We({},t),{},{path:o,newPath:i});case"remove_node":return We(We({},t),{},{type:"insert_node"});case"remove_text":return We(We({},t),{},{type:"insert_text"});case"set_node":var{properties:a,newProperties:l}=t;return We(We({},t),{},{properties:l,newProperties:a});case"set_selection":var{properties:c,newProperties:u}=t;return We(We({},t),{},c==null?{properties:u,newProperties:null}:u==null?{properties:null,newProperties:c}:{properties:u,newProperties:c});case"split_node":return We(We({},t),{},{type:"merge_node",path:_.next(t.path)})}}},_={ancestors(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=n,o=_.levels(t,n);return o=r?o.slice(1):o.slice(0,-1)},common(t,n){for(var r=[],o=0;o<t.length&&o<n.length;o++){var i=t[o];if(i!==n[o])break;r.push(i)}return r},compare(t,n){for(var r=Math.min(t.length,n.length),o=0;o<r;o++){if(t[o]<n[o])return-1;if(t[o]>n[o])return 1}return 0},endsAfter(t,n){var r=t.length-1,o=t.slice(0,r),i=n.slice(0,r),a=t[r],l=n[r];return _.equals(o,i)&&a>l},endsAt(t,n){var r=t.length,o=t.slice(0,r),i=n.slice(0,r);return _.equals(o,i)},endsBefore(t,n){var r=t.length-1,o=t.slice(0,r),i=n.slice(0,r),a=t[r],l=n[r];return _.equals(o,i)&&a<l},equals:(t,n)=>t.length===n.length&&t.every(((r,o)=>r===n[o])),hasPrevious:t=>t[t.length-1]>0,isAfter:(t,n)=>_.compare(t,n)===1,isAncestor:(t,n)=>t.length<n.length&&_.compare(t,n)===0,isBefore:(t,n)=>_.compare(t,n)===-1,isChild:(t,n)=>t.length===n.length+1&&_.compare(t,n)===0,isCommon:(t,n)=>t.length<=n.length&&_.compare(t,n)===0,isDescendant:(t,n)=>t.length>n.length&&_.compare(t,n)===0,isParent:(t,n)=>t.length+1===n.length&&_.compare(t,n)===0,isPath:t=>Array.isArray(t)&&(t.length===0||typeof t[0]=="number"),isSibling(t,n){if(t.length!==n.length)return!1;var r=t.slice(0,-1),o=n.slice(0,-1);return t[t.length-1]!==n[n.length-1]&&_.equals(r,o)},levels(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=n,o=[],i=0;i<=t.length;i++)o.push(t.slice(0,i));return r&&o.reverse(),o},next(t){if(t.length===0)throw new Error("Cannot get the next path of a root path [".concat(t,"], because it has no next index."));var n=t[t.length-1];return t.slice(0,-1).concat(n+1)},parent(t){if(t.length===0)throw new Error("Cannot get the parent path of the root path [".concat(t,"]."));return t.slice(0,-1)},previous(t){if(t.length===0)throw new Error("Cannot get the previous path of a root path [".concat(t,"], because it has no previous index."));var n=t[t.length-1];if(n<=0)throw new Error("Cannot get the previous path of a first child path [".concat(t,"] because it would result in a negative index."));return t.slice(0,-1).concat(n-1)},relative(t,n){if(!_.isAncestor(n,t)&&!_.equals(t,n))throw new Error("Cannot get the relative path of [".concat(t,"] inside ancestor [").concat(n,"], because it is not above or equal to the path."));return t.slice(n.length)},transform(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return fr(t,(o=>{var{affinity:i="forward"}=r;if(t&&t?.length!==0){if(o===null)return null;switch(n.type){case"insert_node":var{path:a}=n;(_.equals(a,o)||_.endsBefore(a,o)||_.isAncestor(a,o))&&(o[a.length-1]+=1);break;case"remove_node":var{path:l}=n;if(_.equals(l,o)||_.isAncestor(l,o))return null;_.endsBefore(l,o)&&(o[l.length-1]-=1);break;case"merge_node":var{path:c,position:u}=n;_.equals(c,o)||_.endsBefore(c,o)?o[c.length-1]-=1:_.isAncestor(c,o)&&(o[c.length-1]-=1,o[c.length]+=u);break;case"split_node":var{path:d,position:f}=n;if(_.equals(d,o)){if(i==="forward")o[o.length-1]+=1;else if(i!=="backward")return null}else _.endsBefore(d,o)?o[d.length-1]+=1:_.isAncestor(d,o)&&t[d.length]>=f&&(o[d.length-1]+=1,o[d.length]-=f);break;case"move_node":var{path:p,newPath:h}=n;if(_.equals(p,h))return;if(_.isAncestor(p,o)||_.equals(p,o)){var m=h.slice();return _.endsBefore(p,h)&&p.length<h.length&&(m[p.length-1]-=1),m.concat(o.slice(p.length))}_.isSibling(p,h)&&(_.isAncestor(h,o)||_.equals(h,o))?_.endsBefore(p,o)?o[p.length-1]-=1:o[p.length-1]+=1:_.endsBefore(h,o)||_.equals(h,o)||_.isAncestor(h,o)?(_.endsBefore(p,o)&&(o[p.length-1]-=1),o[h.length-1]+=1):_.endsBefore(p,o)&&(_.equals(h,o)&&(o[h.length-1]+=1),o[p.length-1]-=1)}}}))}},Ag={transform(t,n){var{current:r,affinity:o}=t;if(r!=null){var i=_.transform(r,n,{affinity:o});t.current=i,i==null&&t.unref()}}};function ga(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function ya(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ga(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ga(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var ye={compare(t,n){var r=_.compare(t.path,n.path);return r===0?t.offset<n.offset?-1:t.offset>n.offset?1:0:r},isAfter:(t,n)=>ye.compare(t,n)===1,isBefore:(t,n)=>ye.compare(t,n)===-1,equals:(t,n)=>t.offset===n.offset&&_.equals(t.path,n.path),isPoint:t=>tt(t)&&typeof t.offset=="number"&&_.isPath(t.path),transform(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return fr(t,(o=>{if(o===null)return null;var{affinity:i="forward"}=r,{path:a,offset:l}=o;switch(n.type){case"insert_node":case"move_node":o.path=_.transform(a,n,r);break;case"insert_text":_.equals(n.path,a)&&n.offset<=l&&(o.offset+=n.text.length);break;case"merge_node":_.equals(n.path,a)&&(o.offset+=n.position),o.path=_.transform(a,n,r);break;case"remove_text":_.equals(n.path,a)&&n.offset<=l&&(o.offset-=Math.min(l-n.offset,n.text.length));break;case"remove_node":if(_.equals(n.path,a)||_.isAncestor(n.path,a))return null;o.path=_.transform(a,n,r);break;case"split_node":if(_.equals(n.path,a)){if(n.position===l&&i==null)return null;(n.position<l||n.position===l&&i==="forward")&&(o.offset-=n.position,o.path=_.transform(a,n,ya(ya({},r),{},{affinity:"forward"})))}else o.path=_.transform(a,n,r)}}))}},Ng={transform(t,n){var{current:r,affinity:o}=t;if(r!=null){var i=ye.transform(r,n,{affinity:o});t.current=i,i==null&&t.unref()}}},Sg=["anchor","focus"];function ba(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}var j={edges(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=n,{anchor:o,focus:i}=t;return j.isBackward(t)===r?[o,i]:[i,o]},end(t){var[,n]=j.edges(t);return n},equals:(t,n)=>ye.equals(t.anchor,n.anchor)&&ye.equals(t.focus,n.focus),includes(t,n){if(j.isRange(n)){if(j.includes(t,n.anchor)||j.includes(t,n.focus))return!0;var[r,o]=j.edges(t),[i,a]=j.edges(n);return ye.isBefore(r,i)&&ye.isAfter(o,a)}var[l,c]=j.edges(t),u=!1,d=!1;return ye.isPoint(n)?(u=ye.compare(n,l)>=0,d=ye.compare(n,c)<=0):(u=_.compare(n,l.path)>=0,d=_.compare(n,c.path)<=0),u&&d},intersection(t,n){var r=Mt(t,Sg),[o,i]=j.edges(t),[a,l]=j.edges(n),c=ye.isBefore(o,a)?a:o,u=ye.isBefore(i,l)?i:l;return ye.isBefore(u,c)?null:(function(d){for(var f=1;f<arguments.length;f++){var p=arguments[f]!=null?arguments[f]:{};f%2?ba(Object(p),!0).forEach((function(h){Vt(d,h,p[h])})):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):ba(Object(p)).forEach((function(h){Object.defineProperty(d,h,Object.getOwnPropertyDescriptor(p,h))}))}return d})({anchor:c,focus:u},r)},isBackward(t){var{anchor:n,focus:r}=t;return ye.isAfter(n,r)},isCollapsed(t){var{anchor:n,focus:r}=t;return ye.equals(n,r)},isExpanded:t=>!j.isCollapsed(t),isForward:t=>!j.isBackward(t),isRange:t=>tt(t)&&ye.isPoint(t.anchor)&&ye.isPoint(t.focus),*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[n]=j.edges(t);return n},transform(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return fr(t,(o=>{if(o===null)return null;var i,a,{affinity:l="inward"}=r;if(l==="inward"){var c=j.isCollapsed(o);j.isForward(o)?(i="forward",a=c?i:"backward"):(i="backward",a=c?i:"forward")}else l==="outward"?j.isForward(o)?(i="backward",a="forward"):(i="forward",a="backward"):(i=l,a=l);var u=ye.transform(o.anchor,n,{affinity:i}),d=ye.transform(o.focus,n,{affinity:a});if(!u||!d)return null;o.anchor=u,o.focus=d}))}},Fg={transform(t,n){var{current:r,affinity:o}=t;if(r!=null){var i=j.transform(r,n,{affinity:o});t.current=i,i==null&&t.unref()}}},Ca=(t,n)=>{for(var r in t){var o=t[r],i=n[r];if(tt(o)&&tt(i)){if(!Ca(o,i))return!1}else if(Array.isArray(o)&&Array.isArray(i)){if(o.length!==i.length)return!1;for(var a=0;a<o.length;a++)if(o[a]!==i[a])return!1}else if(o!==i)return!1}for(var l in n)if(t[l]===void 0&&n[l]!==void 0)return!1;return!0},Vg=["text"],Og=["anchor","focus"];function va(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function zt(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?va(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):va(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var q={equals(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:o=!1}=r;function i(a){return Mt(a,Vg)}return Ca(o?i(t):t,o?i(n):n)},isText:t=>tt(t)&&typeof t.text=="string",isTextList:t=>Array.isArray(t)&&t.every((n=>q.isText(n))),isTextProps:t=>t.text!==void 0,matches(t,n){for(var r in n)if(r!=="text"&&(!t.hasOwnProperty(r)||t[r]!==n[r]))return!1;return!0},decorations(t,n){var r=[zt({},t)];for(var o of n){var i=Mt(o,Og),[a,l]=j.edges(o),c=[],u=0;for(var d of r){var{length:f}=d.text,p=u;if(u+=f,a.offset<=p&&l.offset>=u)Object.assign(d,i),c.push(d);else if(a.offset!==l.offset&&(a.offset===u||l.offset===p)||a.offset>u||l.offset<p||l.offset===p&&p!==0)c.push(d);else{var h=d,m=void 0,g=void 0;if(l.offset<u){var y=l.offset-p;g=zt(zt({},h),{},{text:h.text.slice(y)}),h=zt(zt({},h),{},{text:h.text.slice(0,y)})}if(a.offset>p){var v=a.offset-p;m=zt(zt({},h),{},{text:h.text.slice(0,v)}),h=zt(zt({},h),{},{text:h.text.slice(v)})}Object.assign(h,i),m&&c.push(m),c.push(h),g&&c.push(g)}}r=c}return r}};function Da(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function Mn(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Da(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Da(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var Tg={transform(t,n){t.children=oa(t.children);var r=t.selection&&oa(t.selection);try{r=((o,i,a)=>{switch(a.type){case"insert_node":var{path:l,node:c}=a,u=H.parent(o,l),d=l[l.length-1];if(d>u.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(l,"] because the destination is past the end of the node."));if(u.children.splice(d,0,c),i)for(var[f,p]of j.points(i))i[p]=ye.transform(f,a);break;case"insert_text":var{path:h,offset:m,text:g}=a;if(g.length===0)break;var y=H.leaf(o,h),v=y.text.slice(0,m),D=y.text.slice(m);if(y.text=v+g+D,i)for(var[w,b]of j.points(i))i[b]=ye.transform(w,a);break;case"merge_node":var{path:x}=a,k=H.get(o,x),E=_.previous(x),B=H.get(o,E),V=H.parent(o,x),T=x[x.length-1];if(q.isText(k)&&q.isText(B))B.text+=k.text;else{if(q.isText(k)||q.isText(B))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(x,"] to nodes of different interfaces: ").concat(k," ").concat(B));B.children.push(...k.children)}if(V.children.splice(T,1),i)for(var[P,R]of j.points(i))i[R]=ye.transform(P,a);break;case"move_node":var{path:I,newPath:U}=a;if(_.isAncestor(I,U))throw new Error("Cannot move a path [".concat(I,"] to new path [").concat(U,"] because the destination is inside itself."));var G=H.get(o,I),W=H.parent(o,I),K=I[I.length-1];W.children.splice(K,1);var X=_.transform(I,a),oe=H.get(o,_.parent(X)),re=X[X.length-1];if(oe.children.splice(re,0,G),i)for(var[ie,ce]of j.points(i))i[ce]=ye.transform(ie,a);break;case"remove_node":var{path:Q}=a,xe=Q[Q.length-1];if(H.parent(o,Q).children.splice(xe,1),i)for(var[ge,Je]of j.points(i)){var Ge=ye.transform(ge,a);if(i!=null&&Ge!=null)i[Je]=Ge;else{var Ne=void 0,Ce=void 0;for(var[_e,Me]of H.texts(o)){if(_.compare(Me,Q)!==-1){Ce=[_e,Me];break}Ne=[_e,Me]}var nt=!1;Ne&&Ce&&(nt=_.equals(Ce[1],Q)?!_.hasPrevious(Ce[1]):_.common(Ne[1],Q).length<_.common(Ce[1],Q).length),Ne&&!nt?(ge.path=Ne[1],ge.offset=Ne[0].text.length):Ce?(ge.path=Ce[1],ge.offset=0):i=null}}break;case"remove_text":var{path:rt,offset:et,text:ot}=a;if(ot.length===0)break;var Re=H.leaf(o,rt),mt=Re.text.slice(0,et),He=Re.text.slice(et+ot.length);if(Re.text=mt+He,i)for(var[ze,Dt]of j.points(i))i[Dt]=ye.transform(ze,a);break;case"set_node":var{path:Nt,properties:jt,newProperties:ue}=a;if(Nt.length===0)throw new Error("Cannot set properties on the root node!");var le=H.get(o,Nt);for(var ve in ue){if(ve==="children"||ve==="text")throw new Error('Cannot set the "'.concat(ve,'" property of nodes!'));var Ee=ue[ve];Ee==null?delete le[ve]:le[ve]=Ee}for(var Ue in jt)ue.hasOwnProperty(Ue)||delete le[Ue];break;case"set_selection":var{newProperties:Ve}=a;if(Ve==null)i=Ve;else{if(i==null){if(!j.isRange(Ve))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(Ve)," when there is no current selection."));i=Mn({},Ve)}for(var Pe in Ve){var Ye=Ve[Pe];if(Ye==null){if(Pe==="anchor"||Pe==="focus")throw new Error('Cannot remove the "'.concat(Pe,'" selection property'));delete i[Pe]}else i[Pe]=Ye}}break;case"split_node":var{path:Te,position:Le,properties:Bt}=a;if(Te.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Te,"] because the root node cannot be split."));var A,L=H.get(o,Te),Y=H.parent(o,Te),J=Te[Te.length-1];if(q.isText(L)){var be=L.text.slice(0,Le),z=L.text.slice(Le);L.text=be,A=Mn(Mn({},Bt),{},{text:z})}else{var ee=L.children.slice(0,Le),ae=L.children.slice(Le);L.children=ee,A=Mn(Mn({},Bt),{},{children:ae})}if(Y.children.splice(J+1,0,A),i)for(var[he,Se]of j.points(i))i[Se]=ye.transform(he,a)}return i})(t,r,n)}finally{t.children=ia(t.children),t.selection=r?Zt(r)?ia(r):r:null}}},jg=["text"],Pg=["children"];function wa(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function xa(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?wa(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wa(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var Lg={insertNodes(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};C.withoutNormalizing(t,(()=>{var{hanging:o=!1,voids:i=!1,mode:a="lowest"}=r,{at:l,match:c,select:u}=r;if(H.isNode(n)&&(n=[n]),n.length!==0){var[d]=n;if(l||(l=t.selection?t.selection:t.children.length>0?C.end(t,[]):[0],u=!0),u==null&&(u=!1),j.isRange(l))if(o||(l=C.unhangRange(t,l)),j.isCollapsed(l))l=l.anchor;else{var[,f]=j.edges(l),p=C.pointRef(t,f);O.delete(t,{at:l}),l=p.unref()}if(ye.isPoint(l)){c==null&&(c=q.isText(d)?E=>q.isText(E):t.isInline(d)?E=>q.isText(E)||C.isInline(t,E):E=>C.isBlock(t,E));var[h]=C.nodes(t,{at:l.path,match:c,mode:a,voids:i});if(!h)return;var[,m]=h,g=C.pathRef(t,m),y=C.isEnd(t,l,m);O.splitNodes(t,{at:l,match:c,mode:a,voids:i});var v=g.unref();l=y?_.next(v):v}var D=_.parent(l),w=l[l.length-1];if(i||!C.void(t,{at:D})){for(var b of n){var x=D.concat(w);w++,t.apply({type:"insert_node",path:x,node:b}),l=_.next(l)}if(l=_.previous(l),u){var k=C.end(t,l);k&&O.select(t,k)}}}}))},liftNodes(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C.withoutNormalizing(t,(()=>{var{at:r=t.selection,mode:o="lowest",voids:i=!1}=n,{match:a}=n;if(a==null&&(a=_.isPath(r)?mn(t,r):b=>C.isBlock(t,b)),r){var l=C.nodes(t,{at:r,match:a,mode:o,voids:i}),c=Array.from(l,(b=>{var[,x]=b;return C.pathRef(t,x)}));for(var u of c){var d=u.unref();if(d.length<2)throw new Error("Cannot lift node at a path [".concat(d,"] because it has a depth of less than `2`."));var f=C.node(t,_.parent(d)),[p,h]=f,m=d[d.length-1],{length:g}=p.children;if(g===1){var y=_.next(h);O.moveNodes(t,{at:d,to:y,voids:i}),O.removeNodes(t,{at:h,voids:i})}else if(m===0)O.moveNodes(t,{at:d,to:h,voids:i});else if(m===g-1){var v=_.next(h);O.moveNodes(t,{at:d,to:v,voids:i})}else{var D=_.next(d),w=_.next(h);O.splitNodes(t,{at:D,voids:i}),O.moveNodes(t,{at:d,to:w,voids:i})}}}}))},mergeNodes(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C.withoutNormalizing(t,(()=>{var{match:r,at:o=t.selection}=n,{hanging:i=!1,voids:a=!1,mode:l="lowest"}=n;if(o){if(r==null)if(_.isPath(o)){var[c]=C.parent(t,o);r=T=>c.children.includes(T)}else r=T=>C.isBlock(t,T);if(!i&&j.isRange(o)&&(o=C.unhangRange(t,o)),j.isRange(o))if(j.isCollapsed(o))o=o.anchor;else{var[,u]=j.edges(o),d=C.pointRef(t,u);O.delete(t,{at:o}),o=d.unref(),n.at==null&&O.select(t,o)}var[f]=C.nodes(t,{at:o,match:r,voids:a,mode:l}),p=C.previous(t,{at:o,match:r,voids:a,mode:l});if(f&&p){var[h,m]=f,[g,y]=p;if(m.length!==0&&y.length!==0){var v,D,w=_.next(y),b=_.common(m,y),x=_.isSibling(m,y),k=Array.from(C.levels(t,{at:m}),(T=>{var[P]=T;return P})).slice(b.length).slice(0,-1),E=C.above(t,{at:m,mode:"highest",match:T=>k.includes(T)&&Ba(t,T)}),B=E&&C.pathRef(t,E[1]);if(q.isText(h)&&q.isText(g)){var V=Mt(h,jg);D=g.text.length,v=V}else{if(!te.isElement(h)||!te.isElement(g))throw new Error("Cannot merge the node at path [".concat(m,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(h)," ").concat(JSON.stringify(g)));V=Mt(h,Pg),D=g.children.length,v=V}x||O.moveNodes(t,{at:m,to:w,voids:a}),B&&O.removeNodes(t,{at:B.current,voids:a}),te.isElement(g)&&C.isEmpty(t,g)||q.isText(g)&&g.text===""&&y[y.length-1]!==0?O.removeNodes(t,{at:y,voids:a}):t.apply({type:"merge_node",path:w,position:D,properties:v}),B&&B.unref()}}}}))},moveNodes(t,n){C.withoutNormalizing(t,(()=>{var{to:r,at:o=t.selection,mode:i="lowest",voids:a=!1}=n,{match:l}=n;if(o){l==null&&(l=_.isPath(o)?mn(t,o):m=>C.isBlock(t,m));var c=C.pathRef(t,r),u=C.nodes(t,{at:o,match:l,mode:i,voids:a}),d=Array.from(u,(m=>{var[,g]=m;return C.pathRef(t,g)}));for(var f of d){var p=f.unref(),h=c.current;p.length!==0&&t.apply({type:"move_node",path:p,newPath:h}),c.current&&_.isSibling(h,p)&&_.isAfter(h,p)&&(c.current=_.next(c.current))}c.unref()}}))},removeNodes(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C.withoutNormalizing(t,(()=>{var{hanging:r=!1,voids:o=!1,mode:i="lowest"}=n,{at:a=t.selection,match:l}=n;if(a){l==null&&(l=_.isPath(a)?mn(t,a):h=>C.isBlock(t,h)),!r&&j.isRange(a)&&(a=C.unhangRange(t,a));var c=C.nodes(t,{at:a,match:l,mode:i,voids:o}),u=Array.from(c,(h=>{var[,m]=h;return C.pathRef(t,m)}));for(var d of u){var f=d.unref();if(f){var[p]=C.node(t,f);t.apply({type:"remove_node",path:f,node:p})}}}}))},setNodes(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};C.withoutNormalizing(t,(()=>{var{match:o,at:i=t.selection}=r,{hanging:a=!1,mode:l="lowest",split:c=!1,voids:u=!1}=r;if(i){if(o==null&&(o=_.isPath(i)?mn(t,i):k=>C.isBlock(t,k)),!a&&j.isRange(i)&&(i=C.unhangRange(t,i)),c&&j.isRange(i)){if(j.isCollapsed(i)&&C.leaf(t,i.anchor)[0].text.length>0)return;var d=C.rangeRef(t,i,{affinity:"inward"}),[f,p]=j.edges(i),h=l==="lowest"?"lowest":"highest",m=C.isEnd(t,p,p.path);O.splitNodes(t,{at:p,match:o,mode:h,voids:u,always:!m});var g=C.isStart(t,f,f.path);O.splitNodes(t,{at:f,match:o,mode:h,voids:u,always:!g}),i=d.unref(),r.at==null&&O.select(t,i)}for(var[y,v]of C.nodes(t,{at:i,match:o,mode:l,voids:u})){var D={},w={};if(v.length!==0){var b=!1;for(var x in n)x!=="children"&&x!=="text"&&n[x]!==y[x]&&(b=!0,y.hasOwnProperty(x)&&(D[x]=y[x]),n[x]!=null&&(w[x]=n[x]));b&&t.apply({type:"set_node",path:v,properties:D,newProperties:w})}}}}))},splitNodes(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C.withoutNormalizing(t,(()=>{var{mode:r="lowest",voids:o=!1}=n,{match:i,at:a=t.selection,height:l=0,always:c=!1}=n;if(i==null&&(i=G=>C.isBlock(t,G)),j.isRange(a)&&(a=Mg(t,a)),_.isPath(a)){var u=a,d=C.point(t,u),[f]=C.parent(t,u);i=G=>G===f,l=d.path.length-u.length+1,a=d,c=!0}if(a){var p=C.pointRef(t,a,{affinity:"backward"}),[h]=C.nodes(t,{at:a,match:i,mode:r,voids:o});if(h){var m=C.void(t,{at:a,mode:"highest"});if(!o&&m){var[g,y]=m;if(te.isElement(g)&&t.isInline(g)){var v=C.after(t,y);if(!v){var D=_.next(y);O.insertNodes(t,{text:""},{at:D,voids:o}),v=C.point(t,D)}a=v,c=!0}l=a.path.length-y.length+1,c=!0}var w=C.pointRef(t,a),b=a.path.length-l,[,x]=h,k=a.path.slice(0,b),E=l===0?a.offset:a.path[b]+0;for(var[B,V]of C.levels(t,{at:k,reverse:!0,voids:o})){var T=!1;if(V.length<x.length||V.length===0||!o&&C.isVoid(t,B))break;var P=p.current,R=C.isEnd(t,P,V);if(c||!p||!C.isEdge(t,P,V)){T=!0;var I=H.extractProps(B);t.apply({type:"split_node",path:V,position:E,properties:I})}E=V[V.length-1]+(T||R?1:0)}if(n.at==null){var U=w.current||C.end(t,[]);O.select(t,U)}p.unref(),w.unref()}}}))},unsetNodes(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(n)||(n=[n]);var o={};for(var i of n)o[i]=null;O.setNodes(t,o,r)},unwrapNodes(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C.withoutNormalizing(t,(()=>{var{mode:r="lowest",split:o=!1,voids:i=!1}=n,{at:a=t.selection,match:l}=n;if(a){l==null&&(l=_.isPath(a)?mn(t,a):h=>C.isBlock(t,h)),_.isPath(a)&&(a=C.range(t,a));var c=j.isRange(a)?C.rangeRef(t,a):null,u=C.nodes(t,{at:a,match:l,mode:r,voids:i}),d=Array.from(u,(h=>{var[,m]=h;return C.pathRef(t,m)})).reverse(),f=function(h){var m=h.unref(),[g]=C.node(t,m),y=C.range(t,m);o&&c&&(y=j.intersection(c.current,y)),O.liftNodes(t,{at:y,match:v=>te.isAncestor(g)&&g.children.includes(v),voids:i})};for(var p of d)f(p);c&&c.unref()}}))},wrapNodes(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};C.withoutNormalizing(t,(()=>{var{mode:o="lowest",split:i=!1,voids:a=!1}=r,{match:l,at:c=t.selection}=r;if(c){if(l==null&&(l=_.isPath(c)?mn(t,c):t.isInline(n)?v=>C.isInline(t,v)||q.isText(v):v=>C.isBlock(t,v)),i&&j.isRange(c)){var[u,d]=j.edges(c),f=C.rangeRef(t,c,{affinity:"inward"});O.splitNodes(t,{at:d,match:l,voids:a}),O.splitNodes(t,{at:u,match:l,voids:a}),c=f.unref(),r.at==null&&O.select(t,c)}var p=Array.from(C.nodes(t,{at:c,match:t.isInline(n)?v=>C.isBlock(t,v):v=>C.isEditor(v),mode:"lowest",voids:a}));for(var[,h]of p){var m=j.isRange(c)?j.intersection(c,C.range(t,h)):c;if(m){var g=Array.from(C.nodes(t,{at:m,match:l,mode:o,voids:a}));if(g.length>0){var y=(function(){var[v]=g,D=g[g.length-1],[,w]=v,[,b]=D;if(w.length===0&&b.length===0)return"continue";var x=_.equals(w,b)?_.parent(w):_.common(w,b),k=C.range(t,w,b),E=C.node(t,x),[B]=E,V=x.length+1,T=_.next(b.slice(0,V)),P=xa(xa({},n),{},{children:[]});O.insertNodes(t,P,{at:T,voids:a}),O.moveNodes(t,{at:k,match:R=>te.isAncestor(B)&&B.children.includes(R),to:T.concat(0),voids:a})})();if(y==="continue")continue}}}}}))}},Ba=(t,n)=>{if(te.isElement(n)){var r=n;return!!C.isVoid(t,n)||r.children.length===1&&Ba(t,r.children[0])}return!C.isEditor(n)},Mg=(t,n)=>{if(j.isCollapsed(n))return n.anchor;var[,r]=j.edges(n),o=C.pointRef(t,r);return O.delete(t,{at:n}),o.unref()},mn=(t,n)=>{var[r]=C.node(t,n);return o=>o===r};function ka(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function Ea(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ka(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ka(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var zg={collapse(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=n,{selection:o}=t;if(o){if(r==="anchor")O.select(t,o.anchor);else if(r==="focus")O.select(t,o.focus);else if(r==="start"){var[i]=j.edges(o);O.select(t,i)}else if(r==="end"){var[,a]=j.edges(o);O.select(t,a)}}},deselect(t){var{selection:n}=t;n&&t.apply({type:"set_selection",properties:n,newProperties:null})},move(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=t,{distance:o=1,unit:i="character",reverse:a=!1}=n,{edge:l=null}=n;if(r){l==="start"&&(l=j.isBackward(r)?"focus":"anchor"),l==="end"&&(l=j.isBackward(r)?"anchor":"focus");var{anchor:c,focus:u}=r,d={distance:o,unit:i},f={};if(l==null||l==="anchor"){var p=a?C.before(t,c,d):C.after(t,c,d);p&&(f.anchor=p)}if(l==null||l==="focus"){var h=a?C.before(t,u,d):C.after(t,u,d);h&&(f.focus=h)}O.setSelection(t,f)}},select(t,n){var{selection:r}=t;if(n=C.range(t,n),r)O.setSelection(t,n);else{if(!j.isRange(n))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(JSON.stringify(n)));t.apply({type:"set_selection",properties:r,newProperties:n})}},setPoint(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:o}=t,{edge:i="both"}=r;if(o){i==="start"&&(i=j.isBackward(o)?"focus":"anchor"),i==="end"&&(i=j.isBackward(o)?"anchor":"focus");var{anchor:a,focus:l}=o,c=i==="anchor"?a:l;O.setSelection(t,{[i==="anchor"?"anchor":"focus"]:Ea(Ea({},c),n)})}},setSelection(t,n){var{selection:r}=t,o={},i={};if(r){for(var a in n)(a==="anchor"&&n.anchor!=null&&!ye.equals(n.anchor,r.anchor)||a==="focus"&&n.focus!=null&&!ye.equals(n.focus,r.focus)||a!=="anchor"&&a!=="focus"&&n[a]!==r[a])&&(o[a]=r[a],i[a]=n[a]);Object.keys(o).length>0&&t.apply({type:"set_selection",properties:o,newProperties:i})}}},$g={delete(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C.withoutNormalizing(t,(()=>{var{reverse:r=!1,unit:o="character",distance:i=1,voids:a=!1}=n,{at:l=t.selection,hanging:c=!1}=n;if(l){if(j.isRange(l)&&j.isCollapsed(l)&&(l=l.anchor),ye.isPoint(l)){var u=C.void(t,{at:l,mode:"highest"});if(!a&&u){var[,d]=u;l=d}else{var f={unit:o,distance:i};l={anchor:l,focus:r?C.before(t,l,f)||C.start(t,[]):C.after(t,l,f)||C.end(t,[])},c=!0}}if(_.isPath(l))O.removeNodes(t,{at:l,voids:a});else if(!j.isCollapsed(l)){if(!c){var[,p]=j.edges(l),h=C.end(t,[]);ye.equals(p,h)||(l=C.unhangRange(t,l,{voids:a}))}var[m,g]=j.edges(l),y=C.above(t,{match:Ce=>C.isBlock(t,Ce),at:m,voids:a}),v=C.above(t,{match:Ce=>C.isBlock(t,Ce),at:g,voids:a}),D=y&&v&&!_.equals(y[1],v[1]),w=_.equals(m.path,g.path),b=a?null:C.void(t,{at:m,mode:"highest"}),x=a?null:C.void(t,{at:g,mode:"highest"});if(b){var k=C.before(t,m);k&&y&&_.isAncestor(y[1],k.path)&&(m=k)}if(x){var E=C.after(t,g);E&&v&&_.isAncestor(v[1],E.path)&&(g=E)}var B,V=[];for(var T of C.nodes(t,{at:l,voids:a})){var[P,R]=T;B&&_.compare(R,B)===0||(!a&&C.isVoid(t,P)||!_.isCommon(R,m.path)&&!_.isCommon(R,g.path))&&(V.push(T),B=R)}var I=Array.from(V,(Ce=>{var[,_e]=Ce;return C.pathRef(t,_e)})),U=C.pointRef(t,m),G=C.pointRef(t,g);if(!w&&!b){var W=U.current,[K]=C.leaf(t,W),{path:X}=W,{offset:oe}=m,re=K.text.slice(oe);re.length>0&&t.apply({type:"remove_text",path:X,offset:oe,text:re})}for(var ie of I){var ce=ie.unref();O.removeNodes(t,{at:ce,voids:a})}if(!x){var Q=G.current,[xe]=C.leaf(t,Q),{path:ge}=Q,Je=w?m.offset:0,Ge=xe.text.slice(Je,g.offset);Ge.length>0&&t.apply({type:"remove_text",path:ge,offset:Je,text:Ge})}!w&&D&&G.current&&U.current&&O.mergeNodes(t,{at:G.current,hanging:!0,voids:a});var Ne=r?U.unref()||G.unref():G.unref()||U.unref();n.at==null&&Ne&&O.select(t,Ne)}}}))},insertFragment(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};C.withoutNormalizing(t,(()=>{var{hanging:o=!1,voids:i=!1}=r,{at:a=t.selection}=r;if(n.length&&a){if(j.isRange(a))if(o||(a=C.unhangRange(t,a)),j.isCollapsed(a))a=a.anchor;else{var[,l]=j.edges(a);if(!i&&C.void(t,{at:l}))return;var c=C.pointRef(t,l);O.delete(t,{at:a}),a=c.unref()}else _.isPath(a)&&(a=C.start(t,a));if(i||!C.void(t,{at:a})){var u=C.above(t,{at:a,match:Q=>C.isInline(t,Q),mode:"highest",voids:i});if(u){var[,d]=u;C.isEnd(t,a,d)?a=C.after(t,d):C.isStart(t,a,d)&&(a=C.before(t,d))}var f=C.above(t,{match:Q=>C.isBlock(t,Q),at:a,voids:i}),[,p]=f,h=C.isStart(t,a,p),m=C.isEnd(t,a,p),g=h&&m,y=!h||h&&m,v=!m,[,D]=H.first({children:n},[]),[,w]=H.last({children:n},[]),b=[],x=Q=>{var[xe,ge]=Q;return ge.length!==0&&(!!g||!(y&&_.isAncestor(ge,D)&&te.isElement(xe)&&!t.isVoid(xe)&&!t.isInline(xe))&&!(v&&_.isAncestor(ge,w)&&te.isElement(xe)&&!t.isVoid(xe)&&!t.isInline(xe)))};for(var k of H.nodes({children:n},{pass:x}))x(k)&&b.push(k);var E=[],B=[],V=[],T=!0,P=!1;for(var[R]of b)te.isElement(R)&&!t.isInline(R)?(T=!1,P=!0,B.push(R)):T?E.push(R):V.push(R);var[I]=C.nodes(t,{at:a,match:Q=>q.isText(Q)||C.isInline(t,Q),mode:"highest",voids:i}),[,U]=I,G=C.isStart(t,a,U),W=C.isEnd(t,a,U),K=C.pathRef(t,m?_.next(p):p),X=C.pathRef(t,W?_.next(U):U),oe=C.pathRef(t,p);O.splitNodes(t,{at:a,match:Q=>P?C.isBlock(t,Q):q.isText(Q)||C.isInline(t,Q),mode:P?"lowest":"highest",voids:i});var re=C.pathRef(t,!G||G&&W?_.next(U):U);if(O.insertNodes(t,E,{at:re.current,match:Q=>q.isText(Q)||C.isInline(t,Q),mode:"highest",voids:i}),g&&B.length&&O.delete(t,{at:oe.unref(),voids:i}),O.insertNodes(t,B,{at:K.current,match:Q=>C.isBlock(t,Q),mode:"lowest",voids:i}),O.insertNodes(t,V,{at:X.current,match:Q=>q.isText(Q)||C.isInline(t,Q),mode:"highest",voids:i}),!r.at){var ie;ie=V.length>0?_.previous(X.current):B.length>0?_.previous(K.current):_.previous(re.current);var ce=C.end(t,ie);O.select(t,ce)}re.unref(),K.unref(),X.unref()}}}))},insertText(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};C.withoutNormalizing(t,(()=>{var{voids:o=!1}=r,{at:i=t.selection}=r;if(i){if(_.isPath(i)&&(i=C.range(t,i)),j.isRange(i))if(j.isCollapsed(i))i=i.anchor;else{var a=j.end(i);if(!o&&C.void(t,{at:a}))return;var l=C.pointRef(t,a);O.delete(t,{at:i,voids:o}),i=l.unref(),O.setSelection(t,{anchor:i,focus:i})}if(o||!C.void(t,{at:i})){var{path:c,offset:u}=i;n.length>0&&t.apply({type:"insert_text",path:c,offset:u,text:n})}}}))}};function _a(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function mr(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?_a(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_a(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var O=mr(mr(mr(mr({},Tg),Lg),zg),$g),Ig={isHistory:t=>tt(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Wt.isOperationList(t.redos[0].operations))&&(t.undos.length===0||Wt.isOperationList(t.undos[0].operations))},Xo=new WeakMap,zn=new WeakMap,en={isHistoryEditor:t=>Ig.isHistory(t.history)&&C.isEditor(t),isMerging:t=>zn.get(t),isSaving:t=>Xo.get(t),redo(t){t.redo()},undo(t){t.undo()},withMerging(t,n){var r=en.isMerging(t);zn.set(t,!0),n(),zn.set(t,r)},withoutMerging(t,n){var r=en.isMerging(t);zn.set(t,!1),n(),zn.set(t,r)},withoutSaving(t,n){var r=en.isSaving(t);Xo.set(t,!1),n(),Xo.set(t,r)}},Rg=t=>{var n=t,{apply:r}=n;return n.history={undos:[],redos:[]},n.redo=()=>{var{history:o}=n,{redos:i}=o;if(i.length>0){var a=i[i.length-1];a.selectionBefore&&O.setSelection(n,a.selectionBefore),en.withoutSaving(n,(()=>{C.withoutNormalizing(n,(()=>{for(var l of a.operations)n.apply(l)}))})),o.redos.pop(),n.writeHistory("undos",a)}},n.undo=()=>{var{history:o}=n,{undos:i}=o;if(i.length>0){var a=i[i.length-1];en.withoutSaving(n,(()=>{C.withoutNormalizing(n,(()=>{var l=a.operations.map(Wt.inverse).reverse();for(var c of l)n.apply(c);a.selectionBefore&&O.setSelection(n,a.selectionBefore)}))})),n.writeHistory("redos",a),o.undos.pop()}},n.apply=o=>{var{operations:i,history:a}=n,{undos:l}=a,c=l[l.length-1],u=c&&c.operations[c.operations.length-1],d=en.isSaving(n),f=en.isMerging(n);if(d==null&&(d=Ug(o)),d){if(f==null&&(f=c!=null&&(i.length!==0||Hg(o,u))),c&&f)c.operations.push(o);else{var p={operations:[o],selectionBefore:n.selection};n.writeHistory("undos",p)}for(;l.length>100;)l.shift();a.redos=[]}r(o)},n.writeHistory=(o,i)=>{n.history[o].push(i)},n},Hg=(t,n)=>!(!n||t.type!=="insert_text"||n.type!=="insert_text"||t.offset!==n.offset+n.text.length||!_.equals(t.path,n.path))||!(!n||t.type!=="remove_text"||n.type!=="remove_text"||t.offset+t.text.length!==n.offset||!_.equals(t.path,n.path)),Ug=(t,n)=>t.type!=="set_selection",Qo=function(t,n){return Qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},Qo(t,n)};function De(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}Qo(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var me=function(){return me=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++)for(var i in n=arguments[r])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},me.apply(this,arguments)};function gn(t,n,r,o){return new(r||(r=Promise))((function(i,a){function l(d){try{u(o.next(d))}catch(f){a(f)}}function c(d){try{u(o.throw(d))}catch(f){a(f)}}function u(d){var f;d.done?i(d.value):(f=d.value,f instanceof r?f:new r((function(p){p(f)}))).then(l,c)}u((o=o.apply(t,[])).next())}))}function yn(t,n){var r,o,i,a,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(u){return function(d){return(function(f){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,f[0]&&(l=0)),l;)try{if(r=1,o&&(i=2&f[0]?o.return:f[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,f[1])).done)return i;switch(o=0,i&&(f=[2&f[0],i.value]),f[0]){case 0:case 1:i=f;break;case 4:return l.label++,{value:f[1],done:!1};case 5:l.label++,o=f[1],f=[0];continue;case 7:f=l.ops.pop(),l.trys.pop();continue;default:if(i=l.trys,!((i=i.length>0&&i[i.length-1])||f[0]!==6&&f[0]!==2)){l=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){l.label=f[1];break}if(f[0]===6&&l.label<i[1]){l.label=i[1],i=f;break}if(i&&l.label<i[2]){l.label=i[2],l.ops.push(f);break}i[2]&&l.ops.pop(),l.trys.pop();continue}f=n.call(t,l)}catch(p){f=[6,p],o=0}finally{r=i=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}})([u,d])}}}function at(t){var n=typeof Symbol=="function"&&Symbol.iterator,r=n&&t[n],o=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o,i,a=r.call(t),l=[];try{for(;(n===void 0||n-- >0)&&!(o=a.next()).done;)l.push(o.value)}catch(c){i={error:c}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return l}function ke(t,n,r){if(arguments.length===2)for(var o,i=0,a=n.length;i<a;i++)!o&&i in n||(o||(o=Array.prototype.slice.call(n,0,i)),o[i]=n[i]);return t.concat(o||Array.prototype.slice.call(n))}typeof SuppressedError=="function"&&SuppressedError;var qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Aa,ei={exports:{}},Na,Sa,Wg=(Aa||(Aa=1,(function(t,n){var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Boolean]",l="[object Date]",c="[object Function]",u="[object GeneratorFunction]",d="[object Map]",f="[object Number]",p="[object Object]",h="[object Promise]",m="[object RegExp]",g="[object Set]",y="[object String]",v="[object Symbol]",D="[object WeakMap]",w="[object ArrayBuffer]",b="[object DataView]",x="[object Float32Array]",k="[object Float64Array]",E="[object Int8Array]",B="[object Int16Array]",V="[object Int32Array]",T="[object Uint8Array]",P="[object Uint8ClampedArray]",R="[object Uint16Array]",I="[object Uint32Array]",U=/\w*$/,G=/^\[object .+?Constructor\]$/,W=/^(?:0|[1-9]\d*)$/,K={};K[i]=K["[object Array]"]=K[w]=K[b]=K[a]=K[l]=K[x]=K[k]=K[E]=K[B]=K[V]=K[d]=K[f]=K[p]=K[m]=K[g]=K[y]=K[v]=K[T]=K[P]=K[R]=K[I]=!0,K["[object Error]"]=K[c]=K[D]=!1;var X=typeof qe=="object"&&qe&&qe.Object===Object&&qe,oe=typeof self=="object"&&self&&self.Object===Object&&self,re=X||oe||Function("return this")(),ie=n&&!n.nodeType&&n,ce=ie&&t&&!t.nodeType&&t,Q=ce&&ce.exports===ie;function xe(N,M){return N.set(M[0],M[1]),N}function ge(N,M){return N.add(M),N}function Je(N,M,Z,de){for(var it=-1,gt=N?N.length:0;++it<gt;)Z=M(Z,N[it],it,N);return Z}function Ge(N){var M=!1;if(N!=null&&typeof N.toString!="function")try{M=!!(N+"")}catch{}return M}function Ne(N){var M=-1,Z=Array(N.size);return N.forEach((function(de,it){Z[++M]=[it,de]})),Z}function Ce(N,M){return function(Z){return N(M(Z))}}function _e(N){var M=-1,Z=Array(N.size);return N.forEach((function(de){Z[++M]=de})),Z}var Me,nt=Array.prototype,rt=Function.prototype,et=Object.prototype,ot=re["__core-js_shared__"],Re=(Me=/[^.]+$/.exec(ot&&ot.keys&&ot.keys.IE_PROTO||""))?"Symbol(src)_1."+Me:"",mt=rt.toString,He=et.hasOwnProperty,ze=et.toString,Dt=RegExp("^"+mt.call(He).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Nt=Q?re.Buffer:void 0,jt=re.Symbol,ue=re.Uint8Array,le=Ce(Object.getPrototypeOf,Object),ve=Object.create,Ee=et.propertyIsEnumerable,Ue=nt.splice,Ve=Object.getOwnPropertySymbols,Pe=Nt?Nt.isBuffer:void 0,Ye=Ce(Object.keys,Object),Te=Vn(re,"DataView"),Le=Vn(re,"Map"),Bt=Vn(re,"Promise"),A=Vn(re,"Set"),L=Vn(re,"WeakMap"),Y=Vn(Object,"create"),J=cn(Te),be=cn(Le),z=cn(Bt),ee=cn(A),ae=cn(L),he=jt?jt.prototype:void 0,Se=he?he.valueOf:void 0;function $e(N){var M=-1,Z=N?N.length:0;for(this.clear();++M<Z;){var de=N[M];this.set(de[0],de[1])}}function Ze(N){var M=-1,Z=N?N.length:0;for(this.clear();++M<Z;){var de=N[M];this.set(de[0],de[1])}}function St(N){var M=-1,Z=N?N.length:0;for(this.clear();++M<Z;){var de=N[M];this.set(de[0],de[1])}}function Pt(N){this.__data__=new Ze(N)}function po(N,M){var Z=Bs(N)||(function(st){return(function(ct){return(function(Rt){return!!Rt&&typeof Rt=="object"})(ct)&&ed(ct)})(st)&&He.call(st,"callee")&&(!Ee.call(st,"callee")||ze.call(st)==i)})(N)?(function(st,ct){for(var Rt=-1,Ht=Array(st);++Rt<st;)Ht[Rt]=ct(Rt);return Ht})(N.length,String):[],de=Z.length,it=!!de;for(var gt in N)!He.call(N,gt)||it&&(gt=="length"||zD(gt,de))||Z.push(gt);return Z}function Gu(N,M,Z){var de=N[M];He.call(N,M)&&Qu(de,Z)&&(Z!==void 0||M in N)||(N[M]=Z)}function ho(N,M){for(var Z=N.length;Z--;)if(Qu(N[Z][0],M))return Z;return-1}function ws(N,M,Z,de,it,gt,st){var ct;if(de&&(ct=gt?de(N,it,gt,st):de(N)),ct!==void 0)return ct;if(!go(N))return N;var Rt=Bs(N);if(Rt){if(ct=(function(fe){var Be=fe.length,Xe=fe.constructor(Be);return Be&&typeof fe[0]=="string"&&He.call(fe,"index")&&(Xe.index=fe.index,Xe.input=fe.input),Xe})(N),!M)return(function(fe,Be){var Xe=-1,Ft=fe.length;for(Be||(Be=Array(Ft));++Xe<Ft;)Be[Xe]=fe[Xe];return Be})(N,ct)}else{var Ht=ln(N),nd=Ht==c||Ht==u;if($D(N))return(function(fe,Be){if(Be)return fe.slice();var Xe=new fe.constructor(fe.length);return fe.copy(Xe),Xe})(N,M);if(Ht==p||Ht==i||nd&&!gt){if(Ge(N))return gt?N:{};if(ct=(function(fe){return typeof fe.constructor!="function"||Xu(fe)?{}:go(Be=le(fe))?ve(Be):{};var Be})(nd?{}:N),!M)return(function(fe,Be){return Yu(fe,Zu(fe),Be)})(N,(function(fe,Be){return fe&&Yu(Be,ks(Be),fe)})(ct,N))}else{if(!K[Ht])return gt?N:{};ct=(function(fe,Be,Xe,Ft){var rr,On=fe.constructor;switch(Be){case w:return xs(fe);case a:case l:return new On(+fe);case b:return(function(Ae,yt){var Ut=yt?xs(Ae.buffer):Ae.buffer;return new Ae.constructor(Ut,Ae.byteOffset,Ae.byteLength)})(fe,Ft);case x:case k:case E:case B:case V:case T:case P:case R:case I:return(function(Ae,yt){var Ut=yt?xs(Ae.buffer):Ae.buffer;return new Ae.constructor(Ut,Ae.byteOffset,Ae.length)})(fe,Ft);case d:return(function(Ae,yt,Ut){var or=yt?Ut(Ne(Ae),!0):Ne(Ae);return Je(or,xe,new Ae.constructor)})(fe,Ft,Xe);case f:case y:return new On(fe);case m:return(function(Ae){var yt=new Ae.constructor(Ae.source,U.exec(Ae));return yt.lastIndex=Ae.lastIndex,yt})(fe);case g:return(function(Ae,yt,Ut){var or=yt?Ut(_e(Ae),!0):_e(Ae);return Je(or,ge,new Ae.constructor)})(fe,Ft,Xe);case v:return rr=fe,Se?Object(Se.call(rr)):{}}})(N,Ht,ws,M)}}st||(st=new Pt);var rd=st.get(N);if(rd)return rd;if(st.set(N,ct),!Rt)var od=Z?(function(fe){return(function(Be,Xe,Ft){var rr=Xe(Be);return Bs(Be)?rr:(function(On,Ae){for(var yt=-1,Ut=Ae.length,or=On.length;++yt<Ut;)On[or+yt]=Ae[yt];return On})(rr,Ft(Be))})(fe,ks,Zu)})(N):ks(N);return(function(fe,Be){for(var Xe=-1,Ft=fe?fe.length:0;++Xe<Ft&&Be(fe[Xe],Xe,fe)!==!1;);})(od||N,(function(fe,Be){od&&(fe=N[Be=fe]),Gu(ct,Be,ws(fe,M,Z,de,Be,N,st))})),ct}function MD(N){return!(!go(N)||(M=N,Re&&Re in M))&&(td(N)||Ge(N)?Dt:G).test(cn(N));var M}function xs(N){var M=new N.constructor(N.byteLength);return new ue(M).set(new ue(N)),M}function Yu(N,M,Z,de){Z||(Z={});for(var it=-1,gt=M.length;++it<gt;){var st=M[it];Gu(Z,st,N[st])}return Z}function mo(N,M){var Z,de,it=N.__data__;return((de=typeof(Z=M))=="string"||de=="number"||de=="symbol"||de=="boolean"?Z!=="__proto__":Z===null)?it[typeof M=="string"?"string":"hash"]:it.map}function Vn(N,M){var Z=(function(de,it){return de?.[it]})(N,M);return MD(Z)?Z:void 0}$e.prototype.clear=function(){this.__data__=Y?Y(null):{}},$e.prototype.delete=function(N){return this.has(N)&&delete this.__data__[N]},$e.prototype.get=function(N){var M=this.__data__;if(Y){var Z=M[N];return Z===r?void 0:Z}return He.call(M,N)?M[N]:void 0},$e.prototype.has=function(N){var M=this.__data__;return Y?M[N]!==void 0:He.call(M,N)},$e.prototype.set=function(N,M){return this.__data__[N]=Y&&M===void 0?r:M,this},Ze.prototype.clear=function(){this.__data__=[]},Ze.prototype.delete=function(N){var M=this.__data__,Z=ho(M,N);return!(Z<0||(Z==M.length-1?M.pop():Ue.call(M,Z,1),0))},Ze.prototype.get=function(N){var M=this.__data__,Z=ho(M,N);return Z<0?void 0:M[Z][1]},Ze.prototype.has=function(N){return ho(this.__data__,N)>-1},Ze.prototype.set=function(N,M){var Z=this.__data__,de=ho(Z,N);return de<0?Z.push([N,M]):Z[de][1]=M,this},St.prototype.clear=function(){this.__data__={hash:new $e,map:new(Le||Ze),string:new $e}},St.prototype.delete=function(N){return mo(this,N).delete(N)},St.prototype.get=function(N){return mo(this,N).get(N)},St.prototype.has=function(N){return mo(this,N).has(N)},St.prototype.set=function(N,M){return mo(this,N).set(N,M),this},Pt.prototype.clear=function(){this.__data__=new Ze},Pt.prototype.delete=function(N){return this.__data__.delete(N)},Pt.prototype.get=function(N){return this.__data__.get(N)},Pt.prototype.has=function(N){return this.__data__.has(N)},Pt.prototype.set=function(N,M){var Z=this.__data__;if(Z instanceof Ze){var de=Z.__data__;if(!Le||de.length<199)return de.push([N,M]),this;Z=this.__data__=new St(de)}return Z.set(N,M),this};var Zu=Ve?Ce(Ve,Object):function(){return[]},ln=function(N){return ze.call(N)};function zD(N,M){return!!(M=M??o)&&(typeof N=="number"||W.test(N))&&N>-1&&N%1==0&&N<M}function Xu(N){var M=N&&N.constructor;return N===(typeof M=="function"&&M.prototype||et)}function cn(N){if(N!=null){try{return mt.call(N)}catch{}try{return N+""}catch{}}return""}function Qu(N,M){return N===M||N!=N&&M!=M}(Te&&ln(new Te(new ArrayBuffer(1)))!=b||Le&&ln(new Le)!=d||Bt&&ln(Bt.resolve())!=h||A&&ln(new A)!=g||L&&ln(new L)!=D)&&(ln=function(N){var M=ze.call(N),Z=M==p?N.constructor:void 0,de=Z?cn(Z):void 0;if(de)switch(de){case J:return b;case be:return d;case z:return h;case ee:return g;case ae:return D}return M});var Bs=Array.isArray;function ed(N){return N!=null&&(function(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=o})(N.length)&&!td(N)}var $D=Pe||function(){return!1};function td(N){var M=go(N)?ze.call(N):"";return M==c||M==u}function go(N){var M=typeof N;return!!N&&(M=="object"||M=="function")}function ks(N){return ed(N)?po(N):(function(M){if(!Xu(M))return Ye(M);var Z=[];for(var de in Object(M))He.call(M,de)&&de!="constructor"&&Z.push(de);return Z})(N)}t.exports=function(N){return ws(N,!0,!0)}})(ei,ei.exports)),ei.exports),Fa=qt(Wg),qg=(function(){if(Sa)return Na;Sa=1;var t=9007199254740991,n="[object Arguments]",r="[object Function]",o="[object GeneratorFunction]",i=/^(?:0|[1-9]\d*)$/;function a(B,V){for(var T=-1,P=B?B.length:0;++T<P&&V(B[T],T,B)!==!1;);return B}var l,c,u=Object.prototype,d=u.hasOwnProperty,f=u.toString,p=u.propertyIsEnumerable,h=(l=Object.keys,c=Object,function(B){return l(c(B))});function m(B,V){var T=b(B)||(function(U){return(function(G){return(function(W){return!!W&&typeof W=="object"})(G)&&x(G)})(U)&&d.call(U,"callee")&&(!p.call(U,"callee")||f.call(U)==n)})(B)?(function(U,G){for(var W=-1,K=Array(U);++W<U;)K[W]=G(W);return K})(B.length,String):[],P=T.length,R=!!P;for(var I in B)!d.call(B,I)||R&&(I=="length"||w(I,P))||T.push(I);return T}var g,y=(g=function(B,V){return B&&v(B,V,k)},function(B,V){if(B==null)return B;if(!x(B))return g(B,V);for(var T=B.length,P=-1,R=Object(B);++P<T&&V(R[P],P,R)!==!1;);return B}),v=function(B,V,T){for(var P=-1,R=Object(B),I=T(B),U=I.length;U--;){var G=I[++P];if(V(R[G],G,R)===!1)break}return B};function D(B){if(T=(V=B)&&V.constructor,P=typeof T=="function"&&T.prototype||u,V!==P)return h(B);var V,T,P,R=[];for(var I in Object(B))d.call(B,I)&&I!="constructor"&&R.push(I);return R}function w(B,V){return!!(V=V??t)&&(typeof B=="number"||i.test(B))&&B>-1&&B%1==0&&B<V}var b=Array.isArray;function x(B){return B!=null&&(function(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=t})(B.length)&&!(function(V){var T=(function(P){var R=typeof P;return!!P&&(R=="object"||R=="function")})(V)?f.call(V):"";return T==r||T==o})(B)}function k(B){return x(B)?m(B):D(B)}function E(B){return B}return Na=function(B,V){return(b(B)?a:y)(B,typeof V=="function"?V:E)}})(),Va=qt(qg),Oa={},dt={CREATED:"created",DESTROYED:"destroyed",CHANGE:"change",SCROLL:"scroll",FULLSCREEN:"fullscreen",UNFULLSCREEN:"unFullScreen"},$n={};function Kg(t,n){var r=t.key,o=t.factory,i=t.config,a=me(me({},i),n||{});if($n[r]!=null)throw new Error("Duplicated key '".concat(r,"' in menu items"));$n[r]=o,(function(l,c){c!=null&&(Oa[l]=c)})(r,a)}var ti=new WeakMap,ni=new WeakMap,ri=new WeakMap,gr=new WeakMap,oi=new WeakMap,yr=new WeakMap,ii=new WeakMap,si=new WeakMap,br=new WeakMap,Ta=new WeakMap,ja=new WeakMap,Pa=new WeakMap,La=new WeakMap,In=new WeakMap,bn=new WeakMap,ai=new WeakMap,Cr=new WeakMap,li=new WeakMap,vr=new WeakMap,Dr=new WeakMap,Ma=new WeakMap,tn=new WeakMap,ci=new WeakMap,za=new WeakMap,ui=new WeakMap,Jg=function(t){var n=t;return n.getAllMenuKeys=function(){var r=[];for(var o in $n)r.push(o);return r},n.getConfig=function(){var r=Ta.get(n);if(r==null)throw new Error("Can not get editor config");return r},n.getMenuConfig=function(r){var o=n.getConfig().MENU_CONF;return(o===void 0?{}:o)[r]||{}},n.alert=function(r,o){o===void 0&&(o="info");var i=n.getConfig().customAlert;i&&i(r,o)},n},Ia=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function Ra(t){return t!==null&&typeof t=="object"&&"constructor"in t&&t.constructor===Object}function di(t,n){t===void 0&&(t={}),n===void 0&&(n={}),Object.keys(n).forEach((function(r){t[r]===void 0?t[r]=n[r]:Ra(n[r])&&Ra(t[r])&&Object.keys(n[r]).length>0&&di(t[r],n[r])}))}var Ha={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Rn(){var t=typeof document<"u"?document:{};return di(t,Ha),t}var Gg={document:Ha,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(t){return typeof setTimeout>"u"?(t(),null):setTimeout(t,0)},cancelAnimationFrame:function(t){typeof setTimeout<"u"&&clearTimeout(t)}};function nn(){var t=typeof window<"u"?window:{};return di(t,Gg),t}function fi(t){return fi=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},fi(t)}function wr(t,n){return wr=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},wr(t,n)}function pi(t,n,r){return pi=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch{return!1}})()?Reflect.construct:function(o,i,a){var l=[null];l.push.apply(l,i);var c=new(Function.bind.apply(o,l));return a&&wr(c,a.prototype),c},pi.apply(null,arguments)}function hi(t){var n=typeof Map=="function"?new Map:void 0;return hi=function(r){if(r===null||!(function(i){return Function.toString.call(i).indexOf("[native code]")!==-1})(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(n!==void 0){if(n.has(r))return n.get(r);n.set(r,o)}function o(){return pi(r,arguments,fi(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),wr(o,r)},hi(t)}var Kt=(function(t){var n,r;function o(i){var a,l,c;return a=t.call.apply(t,[this].concat(i))||this,l=(function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u})(a),c=l.__proto__,Object.defineProperty(l,"__proto__",{get:function(){return c},set:function(u){c.__proto__=u}}),a}return r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,o})(hi(Array));function xr(t){t===void 0&&(t=[]);var n=[];return t.forEach((function(r){Array.isArray(r)?n.push.apply(n,xr(r)):n.push(r)})),n}function Ua(t,n){return Array.prototype.filter.call(t,n)}function F(t,n){var r=nn(),o=Rn(),i=[];if(!n&&t instanceof Kt)return t;if(!t)return new Kt(i);if(typeof t=="string"){var a=t.trim();if(a.indexOf("<")>=0&&a.indexOf(">")>=0){var l="div";a.indexOf("<li")===0&&(l="ul"),a.indexOf("<tr")===0&&(l="tbody"),a.indexOf("<td")!==0&&a.indexOf("<th")!==0||(l="tr"),a.indexOf("<tbody")===0&&(l="table"),a.indexOf("<option")===0&&(l="select");var c=o.createElement(l);c.innerHTML=a;for(var u=0;u<c.childNodes.length;u+=1)i.push(c.childNodes[u])}else i=(function(d,f){if(typeof d!="string")return[d];for(var p=[],h=f.querySelectorAll(d),m=0;m<h.length;m+=1)p.push(h[m]);return p})(t.trim(),n||o)}else if(t.nodeType||t===r||t===o)i.push(t);else if(Array.isArray(t)){if(t instanceof Kt)return t;i=t}return new Kt((function(d){for(var f=[],p=0;p<d.length;p+=1)f.indexOf(d[p])===-1&&f.push(d[p]);return f})(i))}function Br(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=xr(n.map((function(i){return i.split(" ")})));return this.forEach((function(i){var a;(a=i.classList).add.apply(a,o)})),this}function kr(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=xr(n.map((function(i){return i.split(" ")})));return this.forEach((function(i){var a;(a=i.classList).remove.apply(a,o)})),this}function Er(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=xr(n.map((function(i){return i.split(" ")})));return Ua(this,(function(i){return o.filter((function(a){return i.classList.contains(a)})).length>0})).length>0}function Cn(t,n){if(arguments.length===1&&typeof t=="string")return this[0]?this[0].getAttribute(t):void 0;for(var r=0;r<this.length;r+=1)if(arguments.length===2)this[r].setAttribute(t,n);else for(var o in t)this[r][o]=t[o],this[r].setAttribute(o,t[o]);return this}function _r(t){for(var n=0;n<this.length;n+=1)this[n].removeAttribute(t);return this}function Ar(){var t=this[0];if(t){var n,r={};if(t.dataset)for(var o in t.dataset)r[o]=t.dataset[o];else for(var i=0;i<t.attributes.length;i+=1){var a=t.attributes[i];a.name.indexOf("data-")>=0&&(r[n=a.name.split("data-")[1],n.toLowerCase().replace(/-(.)/g,(function(c,u){return u.toUpperCase()}))]=a.value)}for(var l in r)r[l]==="false"?r[l]=!1:r[l]==="true"?r[l]=!0:parseFloat(r[l])===1*r[l]&&(r[l]*=1);return r}}function Nr(t){if(t===void 0){var n=this[0];if(!n)return;if(n.multiple&&n.nodeName.toLowerCase()==="select"){for(var r=[],o=0;o<n.selectedOptions.length;o+=1)r.push(n.selectedOptions[o].value);return r}return n.value}for(var i=0;i<this.length;i+=1){var a=this[i];if(Array.isArray(t)&&a.multiple&&a.nodeName.toLowerCase()==="select")for(var l=0;l<a.options.length;l+=1)a.options[l].selected=t.indexOf(a.options[l].value)>=0;else a.value=t}return this}function Sr(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0],i=n[1],a=n[2],l=n[3];function c(y){var v=y.target;if(v){var D=y.target.dom7EventData||[];if(D.indexOf(y)<0&&D.unshift(y),F(v).is(i))a.apply(v,D);else for(var w=F(v).parents(),b=0;b<w.length;b+=1)F(w[b]).is(i)&&a.apply(w[b],D)}}function u(y){var v=y&&y.target&&y.target.dom7EventData||[];v.indexOf(y)<0&&v.unshift(y),a.apply(this,v)}typeof n[1]=="function"&&(o=n[0],a=n[1],l=n[2],i=void 0),l||(l=!1);for(var d,f=o.split(" "),p=0;p<this.length;p+=1){var h=this[p];if(i)for(d=0;d<f.length;d+=1){var m=f[d];h.dom7LiveListeners||(h.dom7LiveListeners={}),h.dom7LiveListeners[m]||(h.dom7LiveListeners[m]=[]),h.dom7LiveListeners[m].push({listener:a,proxyListener:c}),h.addEventListener(m,c,l)}else for(d=0;d<f.length;d+=1){var g=f[d];h.dom7Listeners||(h.dom7Listeners={}),h.dom7Listeners[g]||(h.dom7Listeners[g]=[]),h.dom7Listeners[g].push({listener:a,proxyListener:u}),h.addEventListener(g,u,l)}}return this}function Wa(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0],i=n[1],a=n[2],l=n[3];typeof n[1]=="function"&&(o=n[0],a=n[1],l=n[2],i=void 0),l||(l=!1);for(var c=o.split(" "),u=0;u<c.length;u+=1)for(var d=c[u],f=0;f<this.length;f+=1){var p=this[f],h=void 0;if(!i&&p.dom7Listeners?h=p.dom7Listeners[d]:i&&p.dom7LiveListeners&&(h=p.dom7LiveListeners[d]),h&&h.length)for(var m=h.length-1;m>=0;m-=1){var g=h[m];a&&g.listener===a||a&&g.listener&&g.listener.dom7proxy&&g.listener.dom7proxy===a?(p.removeEventListener(d,g.proxyListener,l),h.splice(m,1)):a||(p.removeEventListener(d,g.proxyListener,l),h.splice(m,1))}}return this}function Fr(){var t=nn();return this[0]===t?t.innerWidth:this.length>0?parseFloat(this.css("width")):null}function Vr(){var t=nn();return this[0]===t?t.innerHeight:this.length>0?parseFloat(this.css("height")):null}function qa(){if(this.length>0){var t=nn(),n=Rn(),r=this[0],o=r.getBoundingClientRect(),i=n.body,a=r.clientTop||i.clientTop||0,l=r.clientLeft||i.clientLeft||0,c=r===t?t.scrollY:r.scrollTop,u=r===t?t.scrollX:r.scrollLeft;return{top:o.top+c-a,left:o.left+u-l}}return null}function Or(){for(var t=0;t<this.length;t+=1)this[t].style.display="none";return this}function Tr(){for(var t=nn(),n=0;n<this.length;n+=1){var r=this[n];r.style.display==="none"&&(r.style.display=""),t.getComputedStyle(r,null).getPropertyValue("display")==="none"&&(r.style.display="block")}return this}function jr(t,n){var r,o=nn();if(arguments.length===1){if(typeof t!="string"){for(r=0;r<this.length;r+=1)for(var i in t)this[r].style[i]=t[i];return this}if(this[0])return o.getComputedStyle(this[0],null).getPropertyValue(t)}if(arguments.length===2&&typeof t=="string"){for(r=0;r<this.length;r+=1)this[r].style[t]=n;return this}return this}function Ka(t){return t?(this.forEach((function(n,r){t.apply(n,[n,r])})),this):this}function Ja(t){return F(Ua(this,t))}function Pr(t){if(t===void 0)return this[0]?this[0].innerHTML:null;for(var n=0;n<this.length;n+=1)this[n].innerHTML=t;return this}function Lr(t){if(t===void 0)return this[0]?this[0].textContent.trim():null;for(var n=0;n<this.length;n+=1)this[n].textContent=t;return this}function Ga(t){var n,r,o=nn(),i=Rn(),a=this[0];if(!a||t===void 0)return!1;if(typeof t=="string"){if(a.matches)return a.matches(t);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(t);if(a.msMatchesSelector)return a.msMatchesSelector(t);for(n=F(t),r=0;r<n.length;r+=1)if(n[r]===a)return!0;return!1}if(t===i)return a===i;if(t===o)return a===o;if(t.nodeType||t instanceof Kt){for(n=t.nodeType?[t]:t,r=0;r<n.length;r+=1)if(n[r]===a)return!0;return!1}return!1}function vn(){for(var t,n=Rn(),r=0;r<arguments.length;r+=1){t=r<0||arguments.length<=r?void 0:arguments[r];for(var o=0;o<this.length;o+=1)if(typeof t=="string"){var i=n.createElement("div");for(i.innerHTML=t;i.firstChild;)this[o].appendChild(i.firstChild)}else if(t instanceof Kt)for(var a=0;a<t.length;a+=1)this[o].appendChild(t[a]);else this[o].appendChild(t)}return this}function Ya(t){var n,r,o=Rn();for(n=0;n<this.length;n+=1)if(typeof t=="string"){var i=o.createElement("div");for(i.innerHTML=t,r=i.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(i.childNodes[r],this[n].childNodes[0])}else if(t instanceof Kt)for(r=0;r<t.length;r+=1)this[n].insertBefore(t[r],this[n].childNodes[0]);else this[n].insertBefore(t,this[n].childNodes[0]);return this}function Mr(t){for(var n=[],r=0;r<this.length;r+=1)this[r].parentNode!==null&&(t?F(this[r].parentNode).is(t)&&n.push(this[r].parentNode):n.push(this[r].parentNode));return F(n)}function zr(t){for(var n=[],r=0;r<this.length;r+=1)for(var o=this[r].parentNode;o;)t?F(o).is(t)&&n.push(o):n.push(o),o=o.parentNode;return F(n)}function $r(t){for(var n=[],r=0;r<this.length;r+=1)for(var o=this[r].querySelectorAll(t),i=0;i<o.length;i+=1)n.push(o[i]);return F(n)}function Ir(t){for(var n=[],r=0;r<this.length;r+=1)for(var o=this[r].children,i=0;i<o.length;i+=1)t&&!F(o[i]).is(t)||n.push(o[i]);return F(n)}function Rr(){for(var t=0;t<this.length;t+=1)this[t].parentNode&&this[t].parentNode.removeChild(this[t]);return this}function Hr(){for(var t=0;t<this.length;t+=1){var n=this[t];if(n.nodeType===1){for(var r=0;r<n.childNodes.length;r+=1)n.childNodes[r].parentNode&&n.childNodes[r].parentNode.removeChild(n.childNodes[r]);n.textContent=""}}return this}F.fn=Kt.prototype;var Yg="resize scroll".split(" "),Dn,Ur=(Dn="focus",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n[0]===void 0){for(var o=0;o<this.length;o+=1)Yg.indexOf(Dn)<0&&(Dn in this[o]?this[o][Dn]():F(this[o]).trigger(Dn));return this}return this.on.apply(this,[Dn].concat(n))});const Zg=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let Xg=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((n,r)=>n+=(r&=63)<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r>62?"-":"_"),"");function wt(t){Promise.resolve().then(t)}var Ot,Hn=function(t){return Object.prototype.toString.call(t)};jr&&(F.fn.css=jr),vn&&(F.fn.append=vn),Br&&(F.fn.addClass=Br),kr&&(F.fn.removeClass=kr),Er&&(F.fn.hasClass=Er),Sr&&(F.fn.on=Sr),Ur&&(F.fn.focus=Ur),Cn&&(F.fn.attr=Cn),_r&&(F.fn.removeAttr=_r),Or&&(F.fn.hide=Or),Tr&&(F.fn.show=Tr),qa&&(F.fn.offset=qa),Fr&&(F.fn.width=Fr),Vr&&(F.fn.height=Vr),Mr&&(F.fn.parent=Mr),zr&&(F.fn.parents=zr),Ga&&(F.fn.is=Ga),Ar&&(F.fn.dataset=Ar),Nr&&(F.fn.val=Nr),Lr&&(F.fn.text=Lr),Pr&&(F.fn.html=Pr),Ir&&(F.fn.children=Ir),Rr&&(F.fn.remove=Rr),$r&&(F.fn.find=$r),Ka&&(F.fn.each=Ka),Hr&&(F.fn.empty=Hr),(function(t){t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(Ot||(Ot={}));var Qg=/\[object HTML([A-Z][a-z]*)*Element\]/,rn=function(t){return t!=null&&typeof t.nodeType=="number"},Za=function(t){return rn(t)&&t.nodeType===Ot.COMMENT_NODE},ft=function(t){return rn(t)&&t.nodeType===Ot.ELEMENT_NODE},Xa=function(t){return Hn(t)==="[object Selection]"},$t=function(t){return rn(t)&&t.nodeType===Ot.TEXT_NODE},mi=function(t){var n,r,o;return(n=window&&window.document.getElementById(t))!==null&&n!==void 0?n:window&&((o=(r=window.document.activeElement)===null||r===void 0?void 0:r.shadowRoot)===null||o===void 0?void 0:o.getElementById(t))||null},Qa=function(t,n,r){for(var o=t.childNodes,i=o[n],a=n,l=!1,c=!1;(Za(i)||ft(i)&&i.childNodes.length===0||ft(i)&&i.getAttribute("contenteditable")==="false")&&(!l||!c);)a>=o.length?(l=!0,a=n-1,r="backward"):a<0?(c=!0,a=n+1,r="forward"):(i=o[a],n=a,a+=r==="forward"?1:-1);return[i,n]},e0=function(t,n,r){return $(Qa(t,n,r),1)[0]},el=function(t){var n,r,o="";if($t(t)&&t.nodeValue)return t.nodeValue;if(ft(t)){try{for(var i=at(Array.from(t.childNodes)),a=i.next();!a.done;a=i.next()){var l=a.value;o+=el(l)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}var c=getComputedStyle(t).getPropertyValue("display");c!=="block"&&c!=="list"&&c!=="table-row"&&t.tagName!=="BR"||(o+=`
|
|
5
|
-
`)}return o};function tl(t,n){if(r=t,!
|
|
4
|
+
`));var p=o(t).pop();if(H.has(t,p)){var h=C.node(t,p);t.normalizeNode(h)}f++}}))}},parent(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=C.path(t,n,r),i=_.parent(o);return C.node(t,i)},path(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:o,edge:i}=r;if(_.isPath(n)){if(i==="start"){var[,a]=H.first(t,n);n=a}else if(i==="end"){var[,l]=H.last(t,n);n=l}}return j.isRange(n)&&(n=i==="start"?j.start(n):i==="end"?j.end(n):_.common(n.anchor.path,n.focus.path)),ye.isPoint(n)&&(n=n.path),o!=null&&(n=n.slice(0,o)),n},hasPath:(t,n)=>H.has(t,n),pathRef(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:o="forward"}=r,i={current:n,affinity:o,unref(){var{current:a}=i;return C.pathRefs(t).delete(i),i.current=null,a}};return C.pathRefs(t).add(i),i},pathRefs(t){var n=aa.get(t);return n||(n=new Set,aa.set(t,n)),n},point(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:o="start"}=r;if(_.isPath(n)){var i;if(o==="end"){var[,a]=H.last(t,n);i=a}else{var[,l]=H.first(t,n);i=l}var c=H.get(t,i);if(!q.isText(c))throw new Error("Cannot get the ".concat(o," point in the node at path [").concat(n,"] because it has no ").concat(o," text node."));return{path:i,offset:o==="end"?c.text.length:0}}if(j.isRange(n)){var[u,d]=j.edges(n);return o==="start"?u:d}return n},pointRef(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:o="forward"}=r,i={current:n,affinity:o,unref(){var{current:a}=i;return C.pointRefs(t).delete(i),i.current=null,a}};return C.pointRefs(t).add(i),i},pointRefs(t){var n=la.get(t);return n||(n=new Set,la.set(t,n)),n},*positions(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=t.selection,unit:o="offset",reverse:i=!1,voids:a=!1}=n;if(r){var l=C.range(t,r),[c,u]=j.edges(l),d=i?u:c,f=!1,p="",h=0,m=0,g=0;for(var[y,v]of C.nodes(t,{at:r,reverse:i,voids:a})){if(te.isElement(y)){if(!a&&t.isVoid(y)){yield C.start(t,v);continue}if(t.isInline(y))continue;if(C.hasInlines(t,y)){var D=_.isAncestor(v,u.path)?u:C.end(t,v),w=_.isAncestor(v,c.path)?c:C.start(t,v);p=C.string(t,{anchor:w,focus:D},{voids:a}),f=!0}}if(q.isText(y)){var b=_.equals(v,d.path);for(b?(m=i?d.offset:y.text.length-d.offset,g=d.offset):(m=y.text.length,g=i?m:0),(b||f||o==="offset")&&(yield{path:v,offset:g},f=!1);;){if(h===0){if(p==="")break;h=x(p,o,i),p=Zo(p,h,i)[1]}if(g=i?g-h:g+h,(m-=h)<0){h=-m;break}h=0,yield{path:v,offset:g}}}}}function x(k,E,B){return E==="character"?Yo(k,B):E==="word"?(function(V){for(var T=arguments.length>1&&arguments[1]!==void 0&&arguments[1],P=0,R=!1;V.length>0;){var I=Yo(V,T),[U,G]=Zo(V,I,T);if(og(U,G,T))R=!0,P+=I;else{if(R)break;P+=I}V=G}return P})(k,B):E==="line"||E==="block"?k.length:1}},previous(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:o=!1}=n,{match:i,at:a=t.selection}=n;if(a){var l=C.before(t,a,{voids:o});if(l){var[,c]=C.first(t,[]),u=[l.path,c];if(_.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(_.isPath(a)){var[d]=C.parent(t,a);i=p=>d.children.includes(p)}else i=()=>!0;var[f]=C.nodes(t,{reverse:!0,at:u,match:i,mode:r,voids:o});return f}}},range:(t,n,r)=>j.isRange(n)&&!r?n:{anchor:C.start(t,n),focus:C.end(t,r||n)},rangeRef(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:o="forward"}=r,i={current:n,affinity:o,unref(){var{current:a}=i;return C.rangeRefs(t).delete(i),i.current=null,a}};return C.rangeRefs(t).add(i),i},rangeRefs(t){var n=ca.get(t);return n||(n=new Set,ca.set(t,n)),n},removeMark(t,n){t.removeMark(n)},setNormalizing(t,n){sa.set(t,n)},start:(t,n)=>C.point(t,n,{edge:"start"}),string(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:o=!1}=r,i=C.range(t,n),[a,l]=j.edges(i),c="";for(var[u,d]of C.nodes(t,{at:i,match:q.isText,voids:o})){var f=u.text;_.equals(d,l.path)&&(f=f.slice(0,l.offset)),_.equals(d,a.path)&&(f=f.slice(a.offset)),c+=f}return c},unhangRange(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:o=!1}=r,[i,a]=j.edges(n);if(i.offset!==0||a.offset!==0||j.isCollapsed(n))return n;var l=C.above(t,{at:a,match:h=>C.isBlock(t,h)}),c=l?l[1]:[],u={anchor:C.start(t,[]),focus:a},d=!0;for(var[f,p]of C.nodes(t,{at:u,match:q.isText,reverse:!0,voids:o}))if(d)d=!1;else if(f.text!==""||_.isBefore(p,c)){a={path:p,offset:f.text.length};break}return{anchor:i,focus:a}},void(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return C.above(t,hn(hn({},n),{},{match:r=>C.isVoid(t,r)}))},withoutNormalizing(t,n){var r=C.isNormalizing(t);C.setNormalizing(t,!1);try{n()}finally{C.setNormalizing(t,r)}C.normalize(t)}},Eg={isSpan:t=>Array.isArray(t)&&t.length===2&&t.every(_.isPath)},_g=["children"],Ag=["text"],ha=new WeakMap,H={ancestor(t,n){var r=H.get(t,n);if(q.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(n,"] because it refers to a text node instead: ").concat(r));return r},*ancestors(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var o of _.ancestors(n,r)){var i=[H.ancestor(t,o),o];yield i}},child(t,n){if(q.isText(t))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(t)));var r=t.children[n];if(r==null)throw new Error("Cannot get child at index `".concat(n,"` in node: ").concat(JSON.stringify(t)));return r},*children(t,n){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{reverse:o=!1}=r,i=H.ancestor(t,n),{children:a}=i,l=o?a.length-1:0;o?l>=0:l<a.length;){var c=H.child(i,l),u=n.concat(l);yield[c,u],l=o?l-1:l+1}},common(t,n,r){var o=_.common(n,r);return[H.get(t,o),o]},descendant(t,n){var r=H.get(t,n);if(C.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(n,"] because it refers to the root editor node instead: ").concat(r));return r},*descendants(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,o]of H.nodes(t,n))o.length!==0&&(yield[r,o])},*elements(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,o]of H.nodes(t,n))te.isElement(r)&&(yield[r,o])},extractProps:t=>te.isAncestor(t)?Mt(t,_g):Mt(t,Ag),first(t,n){for(var r=n.slice(),o=H.get(t,r);o&&!q.isText(o)&&o.children.length!==0;)o=o.children[0],r.push(0);return[o,r]},fragment(t,n){if(q.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(t)));var r=fr({children:t.children},(o=>{var[i,a]=j.edges(n),l=H.nodes(o,{reverse:!0,pass:h=>{var[,m]=h;return!j.includes(n,m)}});for(var[,c]of l){if(!j.includes(n,c)){var u=H.parent(o,c),d=c[c.length-1];u.children.splice(d,1)}if(_.equals(c,a.path)){var f=H.leaf(o,c);f.text=f.text.slice(0,a.offset)}if(_.equals(c,i.path)){var p=H.leaf(o,c);p.text=p.text.slice(i.offset)}}C.isEditor(o)&&(o.selection=null)}));return r.children},get(t,n){for(var r=t,o=0;o<n.length;o++){var i=n[o];if(q.isText(r)||!r.children[i])throw new Error("Cannot find a descendant at path [".concat(n,"] in node: ").concat(JSON.stringify(t)));r=r.children[i]}return r},has(t,n){for(var r=t,o=0;o<n.length;o++){var i=n[o];if(q.isText(r)||!r.children[i])return!1;r=r.children[i]}return!0},isNode:t=>q.isText(t)||te.isElement(t)||C.isEditor(t),isNodeList(t){if(!Array.isArray(t))return!1;var n=ha.get(t);if(n!==void 0)return n;var r=t.every((o=>H.isNode(o)));return ha.set(t,r),r},last(t,n){for(var r=n.slice(),o=H.get(t,r);o&&!q.isText(o)&&o.children.length!==0;){var i=o.children.length-1;o=o.children[i],r.push(i)}return[o,r]},leaf(t,n){var r=H.get(t,n);if(!q.isText(r))throw new Error("Cannot get the leaf node at path [".concat(n,"] because it refers to a non-leaf node: ").concat(r));return r},*levels(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var o of _.levels(n,r)){var i=H.get(t,o);yield[i,o]}},matches:(t,n)=>te.isElement(t)&&te.isElementProps(n)&&te.matches(t,n)||q.isText(t)&&q.isTextProps(n)&&q.matches(t,n),*nodes(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{pass:r,reverse:o=!1}=n,{from:i=[],to:a}=n,l=new Set,c=[],u=t;!a||!(o?_.isBefore(c,a):_.isAfter(c,a));)if(l.has(u)||(yield[u,c]),l.has(u)||q.isText(u)||u.children.length===0||r!=null&&r([u,c])!==!1){if(c.length===0)break;if(!o){var d=_.next(c);if(H.has(t,d)){c=d,u=H.get(t,c);continue}}o&&c[c.length-1]!==0?(c=_.previous(c),u=H.get(t,c)):(c=_.parent(c),u=H.get(t,c),l.add(u))}else{l.add(u);var f=o?u.children.length-1:0;_.isAncestor(c,i)&&(f=i[c.length]),c=c.concat(f),u=H.get(t,c)}},parent(t,n){var r=_.parent(n),o=H.get(t,r);if(q.isText(o))throw new Error("Cannot get the parent of path [".concat(n,"] because it does not exist in the root."));return o},string:t=>q.isText(t)?t.text:t.children.map(H.string).join(""),*texts(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,o]of H.nodes(t,n))q.isText(r)&&(yield[r,o])}};function ma(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function We(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ma(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ma(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var Wt={isNodeOperation:t=>Wt.isOperation(t)&&t.type.endsWith("_node"),isOperation(t){if(!tt(t))return!1;switch(t.type){case"insert_node":case"remove_node":return _.isPath(t.path)&&H.isNode(t.node);case"insert_text":case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&_.isPath(t.path);case"merge_node":return typeof t.position=="number"&&_.isPath(t.path)&&tt(t.properties);case"move_node":return _.isPath(t.path)&&_.isPath(t.newPath);case"set_node":return _.isPath(t.path)&&tt(t.properties)&&tt(t.newProperties);case"set_selection":return t.properties===null&&j.isRange(t.newProperties)||t.newProperties===null&&j.isRange(t.properties)||tt(t.properties)&&tt(t.newProperties);case"split_node":return _.isPath(t.path)&&typeof t.position=="number"&&tt(t.properties);default:return!1}},isOperationList:t=>Array.isArray(t)&&t.every((n=>Wt.isOperation(n))),isSelectionOperation:t=>Wt.isOperation(t)&&t.type.endsWith("_selection"),isTextOperation:t=>Wt.isOperation(t)&&t.type.endsWith("_text"),inverse(t){switch(t.type){case"insert_node":return We(We({},t),{},{type:"remove_node"});case"insert_text":return We(We({},t),{},{type:"remove_text"});case"merge_node":return We(We({},t),{},{type:"split_node",path:_.previous(t.path)});case"move_node":var{newPath:n,path:r}=t;if(_.equals(n,r))return t;if(_.isSibling(r,n))return We(We({},t),{},{path:n,newPath:r});var o=_.transform(r,t),i=_.transform(_.next(r),t);return We(We({},t),{},{path:o,newPath:i});case"remove_node":return We(We({},t),{},{type:"insert_node"});case"remove_text":return We(We({},t),{},{type:"insert_text"});case"set_node":var{properties:a,newProperties:l}=t;return We(We({},t),{},{properties:l,newProperties:a});case"set_selection":var{properties:c,newProperties:u}=t;return We(We({},t),{},c==null?{properties:u,newProperties:null}:u==null?{properties:null,newProperties:c}:{properties:u,newProperties:c});case"split_node":return We(We({},t),{},{type:"merge_node",path:_.next(t.path)})}}},_={ancestors(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=n,o=_.levels(t,n);return o=r?o.slice(1):o.slice(0,-1)},common(t,n){for(var r=[],o=0;o<t.length&&o<n.length;o++){var i=t[o];if(i!==n[o])break;r.push(i)}return r},compare(t,n){for(var r=Math.min(t.length,n.length),o=0;o<r;o++){if(t[o]<n[o])return-1;if(t[o]>n[o])return 1}return 0},endsAfter(t,n){var r=t.length-1,o=t.slice(0,r),i=n.slice(0,r),a=t[r],l=n[r];return _.equals(o,i)&&a>l},endsAt(t,n){var r=t.length,o=t.slice(0,r),i=n.slice(0,r);return _.equals(o,i)},endsBefore(t,n){var r=t.length-1,o=t.slice(0,r),i=n.slice(0,r),a=t[r],l=n[r];return _.equals(o,i)&&a<l},equals:(t,n)=>t.length===n.length&&t.every(((r,o)=>r===n[o])),hasPrevious:t=>t[t.length-1]>0,isAfter:(t,n)=>_.compare(t,n)===1,isAncestor:(t,n)=>t.length<n.length&&_.compare(t,n)===0,isBefore:(t,n)=>_.compare(t,n)===-1,isChild:(t,n)=>t.length===n.length+1&&_.compare(t,n)===0,isCommon:(t,n)=>t.length<=n.length&&_.compare(t,n)===0,isDescendant:(t,n)=>t.length>n.length&&_.compare(t,n)===0,isParent:(t,n)=>t.length+1===n.length&&_.compare(t,n)===0,isPath:t=>Array.isArray(t)&&(t.length===0||typeof t[0]=="number"),isSibling(t,n){if(t.length!==n.length)return!1;var r=t.slice(0,-1),o=n.slice(0,-1);return t[t.length-1]!==n[n.length-1]&&_.equals(r,o)},levels(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=n,o=[],i=0;i<=t.length;i++)o.push(t.slice(0,i));return r&&o.reverse(),o},next(t){if(t.length===0)throw new Error("Cannot get the next path of a root path [".concat(t,"], because it has no next index."));var n=t[t.length-1];return t.slice(0,-1).concat(n+1)},parent(t){if(t.length===0)throw new Error("Cannot get the parent path of the root path [".concat(t,"]."));return t.slice(0,-1)},previous(t){if(t.length===0)throw new Error("Cannot get the previous path of a root path [".concat(t,"], because it has no previous index."));var n=t[t.length-1];if(n<=0)throw new Error("Cannot get the previous path of a first child path [".concat(t,"] because it would result in a negative index."));return t.slice(0,-1).concat(n-1)},relative(t,n){if(!_.isAncestor(n,t)&&!_.equals(t,n))throw new Error("Cannot get the relative path of [".concat(t,"] inside ancestor [").concat(n,"], because it is not above or equal to the path."));return t.slice(n.length)},transform(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return fr(t,(o=>{var{affinity:i="forward"}=r;if(t&&t?.length!==0){if(o===null)return null;switch(n.type){case"insert_node":var{path:a}=n;(_.equals(a,o)||_.endsBefore(a,o)||_.isAncestor(a,o))&&(o[a.length-1]+=1);break;case"remove_node":var{path:l}=n;if(_.equals(l,o)||_.isAncestor(l,o))return null;_.endsBefore(l,o)&&(o[l.length-1]-=1);break;case"merge_node":var{path:c,position:u}=n;_.equals(c,o)||_.endsBefore(c,o)?o[c.length-1]-=1:_.isAncestor(c,o)&&(o[c.length-1]-=1,o[c.length]+=u);break;case"split_node":var{path:d,position:f}=n;if(_.equals(d,o)){if(i==="forward")o[o.length-1]+=1;else if(i!=="backward")return null}else _.endsBefore(d,o)?o[d.length-1]+=1:_.isAncestor(d,o)&&t[d.length]>=f&&(o[d.length-1]+=1,o[d.length]-=f);break;case"move_node":var{path:p,newPath:h}=n;if(_.equals(p,h))return;if(_.isAncestor(p,o)||_.equals(p,o)){var m=h.slice();return _.endsBefore(p,h)&&p.length<h.length&&(m[p.length-1]-=1),m.concat(o.slice(p.length))}_.isSibling(p,h)&&(_.isAncestor(h,o)||_.equals(h,o))?_.endsBefore(p,o)?o[p.length-1]-=1:o[p.length-1]+=1:_.endsBefore(h,o)||_.equals(h,o)||_.isAncestor(h,o)?(_.endsBefore(p,o)&&(o[p.length-1]-=1),o[h.length-1]+=1):_.endsBefore(p,o)&&(_.equals(h,o)&&(o[h.length-1]+=1),o[p.length-1]-=1)}}}))}},Ng={transform(t,n){var{current:r,affinity:o}=t;if(r!=null){var i=_.transform(r,n,{affinity:o});t.current=i,i==null&&t.unref()}}};function ga(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function ya(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ga(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ga(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var ye={compare(t,n){var r=_.compare(t.path,n.path);return r===0?t.offset<n.offset?-1:t.offset>n.offset?1:0:r},isAfter:(t,n)=>ye.compare(t,n)===1,isBefore:(t,n)=>ye.compare(t,n)===-1,equals:(t,n)=>t.offset===n.offset&&_.equals(t.path,n.path),isPoint:t=>tt(t)&&typeof t.offset=="number"&&_.isPath(t.path),transform(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return fr(t,(o=>{if(o===null)return null;var{affinity:i="forward"}=r,{path:a,offset:l}=o;switch(n.type){case"insert_node":case"move_node":o.path=_.transform(a,n,r);break;case"insert_text":_.equals(n.path,a)&&n.offset<=l&&(o.offset+=n.text.length);break;case"merge_node":_.equals(n.path,a)&&(o.offset+=n.position),o.path=_.transform(a,n,r);break;case"remove_text":_.equals(n.path,a)&&n.offset<=l&&(o.offset-=Math.min(l-n.offset,n.text.length));break;case"remove_node":if(_.equals(n.path,a)||_.isAncestor(n.path,a))return null;o.path=_.transform(a,n,r);break;case"split_node":if(_.equals(n.path,a)){if(n.position===l&&i==null)return null;(n.position<l||n.position===l&&i==="forward")&&(o.offset-=n.position,o.path=_.transform(a,n,ya(ya({},r),{},{affinity:"forward"})))}else o.path=_.transform(a,n,r)}}))}},Sg={transform(t,n){var{current:r,affinity:o}=t;if(r!=null){var i=ye.transform(r,n,{affinity:o});t.current=i,i==null&&t.unref()}}},Fg=["anchor","focus"];function ba(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}var j={edges(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=n,{anchor:o,focus:i}=t;return j.isBackward(t)===r?[o,i]:[i,o]},end(t){var[,n]=j.edges(t);return n},equals:(t,n)=>ye.equals(t.anchor,n.anchor)&&ye.equals(t.focus,n.focus),includes(t,n){if(j.isRange(n)){if(j.includes(t,n.anchor)||j.includes(t,n.focus))return!0;var[r,o]=j.edges(t),[i,a]=j.edges(n);return ye.isBefore(r,i)&&ye.isAfter(o,a)}var[l,c]=j.edges(t),u=!1,d=!1;return ye.isPoint(n)?(u=ye.compare(n,l)>=0,d=ye.compare(n,c)<=0):(u=_.compare(n,l.path)>=0,d=_.compare(n,c.path)<=0),u&&d},intersection(t,n){var r=Mt(t,Fg),[o,i]=j.edges(t),[a,l]=j.edges(n),c=ye.isBefore(o,a)?a:o,u=ye.isBefore(i,l)?i:l;return ye.isBefore(u,c)?null:(function(d){for(var f=1;f<arguments.length;f++){var p=arguments[f]!=null?arguments[f]:{};f%2?ba(Object(p),!0).forEach((function(h){Vt(d,h,p[h])})):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):ba(Object(p)).forEach((function(h){Object.defineProperty(d,h,Object.getOwnPropertyDescriptor(p,h))}))}return d})({anchor:c,focus:u},r)},isBackward(t){var{anchor:n,focus:r}=t;return ye.isAfter(n,r)},isCollapsed(t){var{anchor:n,focus:r}=t;return ye.equals(n,r)},isExpanded:t=>!j.isCollapsed(t),isForward:t=>!j.isBackward(t),isRange:t=>tt(t)&&ye.isPoint(t.anchor)&&ye.isPoint(t.focus),*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[n]=j.edges(t);return n},transform(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return fr(t,(o=>{if(o===null)return null;var i,a,{affinity:l="inward"}=r;if(l==="inward"){var c=j.isCollapsed(o);j.isForward(o)?(i="forward",a=c?i:"backward"):(i="backward",a=c?i:"forward")}else l==="outward"?j.isForward(o)?(i="backward",a="forward"):(i="forward",a="backward"):(i=l,a=l);var u=ye.transform(o.anchor,n,{affinity:i}),d=ye.transform(o.focus,n,{affinity:a});if(!u||!d)return null;o.anchor=u,o.focus=d}))}},Vg={transform(t,n){var{current:r,affinity:o}=t;if(r!=null){var i=j.transform(r,n,{affinity:o});t.current=i,i==null&&t.unref()}}},Ca=(t,n)=>{for(var r in t){var o=t[r],i=n[r];if(tt(o)&&tt(i)){if(!Ca(o,i))return!1}else if(Array.isArray(o)&&Array.isArray(i)){if(o.length!==i.length)return!1;for(var a=0;a<o.length;a++)if(o[a]!==i[a])return!1}else if(o!==i)return!1}for(var l in n)if(t[l]===void 0&&n[l]!==void 0)return!1;return!0},Og=["text"],Tg=["anchor","focus"];function va(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function zt(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?va(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):va(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var q={equals(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:o=!1}=r;function i(a){return Mt(a,Og)}return Ca(o?i(t):t,o?i(n):n)},isText:t=>tt(t)&&typeof t.text=="string",isTextList:t=>Array.isArray(t)&&t.every((n=>q.isText(n))),isTextProps:t=>t.text!==void 0,matches(t,n){for(var r in n)if(r!=="text"&&(!t.hasOwnProperty(r)||t[r]!==n[r]))return!1;return!0},decorations(t,n){var r=[zt({},t)];for(var o of n){var i=Mt(o,Tg),[a,l]=j.edges(o),c=[],u=0;for(var d of r){var{length:f}=d.text,p=u;if(u+=f,a.offset<=p&&l.offset>=u)Object.assign(d,i),c.push(d);else if(a.offset!==l.offset&&(a.offset===u||l.offset===p)||a.offset>u||l.offset<p||l.offset===p&&p!==0)c.push(d);else{var h=d,m=void 0,g=void 0;if(l.offset<u){var y=l.offset-p;g=zt(zt({},h),{},{text:h.text.slice(y)}),h=zt(zt({},h),{},{text:h.text.slice(0,y)})}if(a.offset>p){var v=a.offset-p;m=zt(zt({},h),{},{text:h.text.slice(0,v)}),h=zt(zt({},h),{},{text:h.text.slice(v)})}Object.assign(h,i),m&&c.push(m),c.push(h),g&&c.push(g)}}r=c}return r}};function Da(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function Mn(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Da(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Da(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var jg={transform(t,n){t.children=oa(t.children);var r=t.selection&&oa(t.selection);try{r=((o,i,a)=>{switch(a.type){case"insert_node":var{path:l,node:c}=a,u=H.parent(o,l),d=l[l.length-1];if(d>u.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(l,"] because the destination is past the end of the node."));if(u.children.splice(d,0,c),i)for(var[f,p]of j.points(i))i[p]=ye.transform(f,a);break;case"insert_text":var{path:h,offset:m,text:g}=a;if(g.length===0)break;var y=H.leaf(o,h),v=y.text.slice(0,m),D=y.text.slice(m);if(y.text=v+g+D,i)for(var[w,b]of j.points(i))i[b]=ye.transform(w,a);break;case"merge_node":var{path:x}=a,k=H.get(o,x),E=_.previous(x),B=H.get(o,E),V=H.parent(o,x),T=x[x.length-1];if(q.isText(k)&&q.isText(B))B.text+=k.text;else{if(q.isText(k)||q.isText(B))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(x,"] to nodes of different interfaces: ").concat(k," ").concat(B));B.children.push(...k.children)}if(V.children.splice(T,1),i)for(var[P,R]of j.points(i))i[R]=ye.transform(P,a);break;case"move_node":var{path:I,newPath:U}=a;if(_.isAncestor(I,U))throw new Error("Cannot move a path [".concat(I,"] to new path [").concat(U,"] because the destination is inside itself."));var G=H.get(o,I),W=H.parent(o,I),K=I[I.length-1];W.children.splice(K,1);var X=_.transform(I,a),oe=H.get(o,_.parent(X)),re=X[X.length-1];if(oe.children.splice(re,0,G),i)for(var[ie,ce]of j.points(i))i[ce]=ye.transform(ie,a);break;case"remove_node":var{path:Q}=a,xe=Q[Q.length-1];if(H.parent(o,Q).children.splice(xe,1),i)for(var[ge,Je]of j.points(i)){var Ge=ye.transform(ge,a);if(i!=null&&Ge!=null)i[Je]=Ge;else{var Ne=void 0,Ce=void 0;for(var[_e,Me]of H.texts(o)){if(_.compare(Me,Q)!==-1){Ce=[_e,Me];break}Ne=[_e,Me]}var nt=!1;Ne&&Ce&&(nt=_.equals(Ce[1],Q)?!_.hasPrevious(Ce[1]):_.common(Ne[1],Q).length<_.common(Ce[1],Q).length),Ne&&!nt?(ge.path=Ne[1],ge.offset=Ne[0].text.length):Ce?(ge.path=Ce[1],ge.offset=0):i=null}}break;case"remove_text":var{path:rt,offset:et,text:ot}=a;if(ot.length===0)break;var Re=H.leaf(o,rt),mt=Re.text.slice(0,et),He=Re.text.slice(et+ot.length);if(Re.text=mt+He,i)for(var[ze,Dt]of j.points(i))i[Dt]=ye.transform(ze,a);break;case"set_node":var{path:Nt,properties:jt,newProperties:ue}=a;if(Nt.length===0)throw new Error("Cannot set properties on the root node!");var le=H.get(o,Nt);for(var ve in ue){if(ve==="children"||ve==="text")throw new Error('Cannot set the "'.concat(ve,'" property of nodes!'));var Ee=ue[ve];Ee==null?delete le[ve]:le[ve]=Ee}for(var Ue in jt)ue.hasOwnProperty(Ue)||delete le[Ue];break;case"set_selection":var{newProperties:Ve}=a;if(Ve==null)i=Ve;else{if(i==null){if(!j.isRange(Ve))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(Ve)," when there is no current selection."));i=Mn({},Ve)}for(var Pe in Ve){var Ye=Ve[Pe];if(Ye==null){if(Pe==="anchor"||Pe==="focus")throw new Error('Cannot remove the "'.concat(Pe,'" selection property'));delete i[Pe]}else i[Pe]=Ye}}break;case"split_node":var{path:Te,position:Le,properties:Bt}=a;if(Te.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Te,"] because the root node cannot be split."));var A,L=H.get(o,Te),Y=H.parent(o,Te),J=Te[Te.length-1];if(q.isText(L)){var be=L.text.slice(0,Le),z=L.text.slice(Le);L.text=be,A=Mn(Mn({},Bt),{},{text:z})}else{var ee=L.children.slice(0,Le),ae=L.children.slice(Le);L.children=ee,A=Mn(Mn({},Bt),{},{children:ae})}if(Y.children.splice(J+1,0,A),i)for(var[he,Se]of j.points(i))i[Se]=ye.transform(he,a)}return i})(t,r,n)}finally{t.children=ia(t.children),t.selection=r?Zt(r)?ia(r):r:null}}},Pg=["text"],Lg=["children"];function wa(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function xa(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?wa(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wa(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var Mg={insertNodes(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};C.withoutNormalizing(t,(()=>{var{hanging:o=!1,voids:i=!1,mode:a="lowest"}=r,{at:l,match:c,select:u}=r;if(H.isNode(n)&&(n=[n]),n.length!==0){var[d]=n;if(l||(l=t.selection?t.selection:t.children.length>0?C.end(t,[]):[0],u=!0),u==null&&(u=!1),j.isRange(l))if(o||(l=C.unhangRange(t,l)),j.isCollapsed(l))l=l.anchor;else{var[,f]=j.edges(l),p=C.pointRef(t,f);O.delete(t,{at:l}),l=p.unref()}if(ye.isPoint(l)){c==null&&(c=q.isText(d)?E=>q.isText(E):t.isInline(d)?E=>q.isText(E)||C.isInline(t,E):E=>C.isBlock(t,E));var[h]=C.nodes(t,{at:l.path,match:c,mode:a,voids:i});if(!h)return;var[,m]=h,g=C.pathRef(t,m),y=C.isEnd(t,l,m);O.splitNodes(t,{at:l,match:c,mode:a,voids:i});var v=g.unref();l=y?_.next(v):v}var D=_.parent(l),w=l[l.length-1];if(i||!C.void(t,{at:D})){for(var b of n){var x=D.concat(w);w++,t.apply({type:"insert_node",path:x,node:b}),l=_.next(l)}if(l=_.previous(l),u){var k=C.end(t,l);k&&O.select(t,k)}}}}))},liftNodes(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C.withoutNormalizing(t,(()=>{var{at:r=t.selection,mode:o="lowest",voids:i=!1}=n,{match:a}=n;if(a==null&&(a=_.isPath(r)?mn(t,r):b=>C.isBlock(t,b)),r){var l=C.nodes(t,{at:r,match:a,mode:o,voids:i}),c=Array.from(l,(b=>{var[,x]=b;return C.pathRef(t,x)}));for(var u of c){var d=u.unref();if(d.length<2)throw new Error("Cannot lift node at a path [".concat(d,"] because it has a depth of less than `2`."));var f=C.node(t,_.parent(d)),[p,h]=f,m=d[d.length-1],{length:g}=p.children;if(g===1){var y=_.next(h);O.moveNodes(t,{at:d,to:y,voids:i}),O.removeNodes(t,{at:h,voids:i})}else if(m===0)O.moveNodes(t,{at:d,to:h,voids:i});else if(m===g-1){var v=_.next(h);O.moveNodes(t,{at:d,to:v,voids:i})}else{var D=_.next(d),w=_.next(h);O.splitNodes(t,{at:D,voids:i}),O.moveNodes(t,{at:d,to:w,voids:i})}}}}))},mergeNodes(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C.withoutNormalizing(t,(()=>{var{match:r,at:o=t.selection}=n,{hanging:i=!1,voids:a=!1,mode:l="lowest"}=n;if(o){if(r==null)if(_.isPath(o)){var[c]=C.parent(t,o);r=T=>c.children.includes(T)}else r=T=>C.isBlock(t,T);if(!i&&j.isRange(o)&&(o=C.unhangRange(t,o)),j.isRange(o))if(j.isCollapsed(o))o=o.anchor;else{var[,u]=j.edges(o),d=C.pointRef(t,u);O.delete(t,{at:o}),o=d.unref(),n.at==null&&O.select(t,o)}var[f]=C.nodes(t,{at:o,match:r,voids:a,mode:l}),p=C.previous(t,{at:o,match:r,voids:a,mode:l});if(f&&p){var[h,m]=f,[g,y]=p;if(m.length!==0&&y.length!==0){var v,D,w=_.next(y),b=_.common(m,y),x=_.isSibling(m,y),k=Array.from(C.levels(t,{at:m}),(T=>{var[P]=T;return P})).slice(b.length).slice(0,-1),E=C.above(t,{at:m,mode:"highest",match:T=>k.includes(T)&&Ba(t,T)}),B=E&&C.pathRef(t,E[1]);if(q.isText(h)&&q.isText(g)){var V=Mt(h,Pg);D=g.text.length,v=V}else{if(!te.isElement(h)||!te.isElement(g))throw new Error("Cannot merge the node at path [".concat(m,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(h)," ").concat(JSON.stringify(g)));V=Mt(h,Lg),D=g.children.length,v=V}x||O.moveNodes(t,{at:m,to:w,voids:a}),B&&O.removeNodes(t,{at:B.current,voids:a}),te.isElement(g)&&C.isEmpty(t,g)||q.isText(g)&&g.text===""&&y[y.length-1]!==0?O.removeNodes(t,{at:y,voids:a}):t.apply({type:"merge_node",path:w,position:D,properties:v}),B&&B.unref()}}}}))},moveNodes(t,n){C.withoutNormalizing(t,(()=>{var{to:r,at:o=t.selection,mode:i="lowest",voids:a=!1}=n,{match:l}=n;if(o){l==null&&(l=_.isPath(o)?mn(t,o):m=>C.isBlock(t,m));var c=C.pathRef(t,r),u=C.nodes(t,{at:o,match:l,mode:i,voids:a}),d=Array.from(u,(m=>{var[,g]=m;return C.pathRef(t,g)}));for(var f of d){var p=f.unref(),h=c.current;p.length!==0&&t.apply({type:"move_node",path:p,newPath:h}),c.current&&_.isSibling(h,p)&&_.isAfter(h,p)&&(c.current=_.next(c.current))}c.unref()}}))},removeNodes(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C.withoutNormalizing(t,(()=>{var{hanging:r=!1,voids:o=!1,mode:i="lowest"}=n,{at:a=t.selection,match:l}=n;if(a){l==null&&(l=_.isPath(a)?mn(t,a):h=>C.isBlock(t,h)),!r&&j.isRange(a)&&(a=C.unhangRange(t,a));var c=C.nodes(t,{at:a,match:l,mode:i,voids:o}),u=Array.from(c,(h=>{var[,m]=h;return C.pathRef(t,m)}));for(var d of u){var f=d.unref();if(f){var[p]=C.node(t,f);t.apply({type:"remove_node",path:f,node:p})}}}}))},setNodes(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};C.withoutNormalizing(t,(()=>{var{match:o,at:i=t.selection}=r,{hanging:a=!1,mode:l="lowest",split:c=!1,voids:u=!1}=r;if(i){if(o==null&&(o=_.isPath(i)?mn(t,i):k=>C.isBlock(t,k)),!a&&j.isRange(i)&&(i=C.unhangRange(t,i)),c&&j.isRange(i)){if(j.isCollapsed(i)&&C.leaf(t,i.anchor)[0].text.length>0)return;var d=C.rangeRef(t,i,{affinity:"inward"}),[f,p]=j.edges(i),h=l==="lowest"?"lowest":"highest",m=C.isEnd(t,p,p.path);O.splitNodes(t,{at:p,match:o,mode:h,voids:u,always:!m});var g=C.isStart(t,f,f.path);O.splitNodes(t,{at:f,match:o,mode:h,voids:u,always:!g}),i=d.unref(),r.at==null&&O.select(t,i)}for(var[y,v]of C.nodes(t,{at:i,match:o,mode:l,voids:u})){var D={},w={};if(v.length!==0){var b=!1;for(var x in n)x!=="children"&&x!=="text"&&n[x]!==y[x]&&(b=!0,y.hasOwnProperty(x)&&(D[x]=y[x]),n[x]!=null&&(w[x]=n[x]));b&&t.apply({type:"set_node",path:v,properties:D,newProperties:w})}}}}))},splitNodes(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C.withoutNormalizing(t,(()=>{var{mode:r="lowest",voids:o=!1}=n,{match:i,at:a=t.selection,height:l=0,always:c=!1}=n;if(i==null&&(i=G=>C.isBlock(t,G)),j.isRange(a)&&(a=zg(t,a)),_.isPath(a)){var u=a,d=C.point(t,u),[f]=C.parent(t,u);i=G=>G===f,l=d.path.length-u.length+1,a=d,c=!0}if(a){var p=C.pointRef(t,a,{affinity:"backward"}),[h]=C.nodes(t,{at:a,match:i,mode:r,voids:o});if(h){var m=C.void(t,{at:a,mode:"highest"});if(!o&&m){var[g,y]=m;if(te.isElement(g)&&t.isInline(g)){var v=C.after(t,y);if(!v){var D=_.next(y);O.insertNodes(t,{text:""},{at:D,voids:o}),v=C.point(t,D)}a=v,c=!0}l=a.path.length-y.length+1,c=!0}var w=C.pointRef(t,a),b=a.path.length-l,[,x]=h,k=a.path.slice(0,b),E=l===0?a.offset:a.path[b]+0;for(var[B,V]of C.levels(t,{at:k,reverse:!0,voids:o})){var T=!1;if(V.length<x.length||V.length===0||!o&&C.isVoid(t,B))break;var P=p.current,R=C.isEnd(t,P,V);if(c||!p||!C.isEdge(t,P,V)){T=!0;var I=H.extractProps(B);t.apply({type:"split_node",path:V,position:E,properties:I})}E=V[V.length-1]+(T||R?1:0)}if(n.at==null){var U=w.current||C.end(t,[]);O.select(t,U)}p.unref(),w.unref()}}}))},unsetNodes(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(n)||(n=[n]);var o={};for(var i of n)o[i]=null;O.setNodes(t,o,r)},unwrapNodes(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C.withoutNormalizing(t,(()=>{var{mode:r="lowest",split:o=!1,voids:i=!1}=n,{at:a=t.selection,match:l}=n;if(a){l==null&&(l=_.isPath(a)?mn(t,a):h=>C.isBlock(t,h)),_.isPath(a)&&(a=C.range(t,a));var c=j.isRange(a)?C.rangeRef(t,a):null,u=C.nodes(t,{at:a,match:l,mode:r,voids:i}),d=Array.from(u,(h=>{var[,m]=h;return C.pathRef(t,m)})).reverse(),f=function(h){var m=h.unref(),[g]=C.node(t,m),y=C.range(t,m);o&&c&&(y=j.intersection(c.current,y)),O.liftNodes(t,{at:y,match:v=>te.isAncestor(g)&&g.children.includes(v),voids:i})};for(var p of d)f(p);c&&c.unref()}}))},wrapNodes(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};C.withoutNormalizing(t,(()=>{var{mode:o="lowest",split:i=!1,voids:a=!1}=r,{match:l,at:c=t.selection}=r;if(c){if(l==null&&(l=_.isPath(c)?mn(t,c):t.isInline(n)?v=>C.isInline(t,v)||q.isText(v):v=>C.isBlock(t,v)),i&&j.isRange(c)){var[u,d]=j.edges(c),f=C.rangeRef(t,c,{affinity:"inward"});O.splitNodes(t,{at:d,match:l,voids:a}),O.splitNodes(t,{at:u,match:l,voids:a}),c=f.unref(),r.at==null&&O.select(t,c)}var p=Array.from(C.nodes(t,{at:c,match:t.isInline(n)?v=>C.isBlock(t,v):v=>C.isEditor(v),mode:"lowest",voids:a}));for(var[,h]of p){var m=j.isRange(c)?j.intersection(c,C.range(t,h)):c;if(m){var g=Array.from(C.nodes(t,{at:m,match:l,mode:o,voids:a}));if(g.length>0){var y=(function(){var[v]=g,D=g[g.length-1],[,w]=v,[,b]=D;if(w.length===0&&b.length===0)return"continue";var x=_.equals(w,b)?_.parent(w):_.common(w,b),k=C.range(t,w,b),E=C.node(t,x),[B]=E,V=x.length+1,T=_.next(b.slice(0,V)),P=xa(xa({},n),{},{children:[]});O.insertNodes(t,P,{at:T,voids:a}),O.moveNodes(t,{at:k,match:R=>te.isAncestor(B)&&B.children.includes(R),to:T.concat(0),voids:a})})();if(y==="continue")continue}}}}}))}},Ba=(t,n)=>{if(te.isElement(n)){var r=n;return!!C.isVoid(t,n)||r.children.length===1&&Ba(t,r.children[0])}return!C.isEditor(n)},zg=(t,n)=>{if(j.isCollapsed(n))return n.anchor;var[,r]=j.edges(n),o=C.pointRef(t,r);return O.delete(t,{at:n}),o.unref()},mn=(t,n)=>{var[r]=C.node(t,n);return o=>o===r};function ka(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function Ea(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ka(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ka(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var $g={collapse(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=n,{selection:o}=t;if(o){if(r==="anchor")O.select(t,o.anchor);else if(r==="focus")O.select(t,o.focus);else if(r==="start"){var[i]=j.edges(o);O.select(t,i)}else if(r==="end"){var[,a]=j.edges(o);O.select(t,a)}}},deselect(t){var{selection:n}=t;n&&t.apply({type:"set_selection",properties:n,newProperties:null})},move(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=t,{distance:o=1,unit:i="character",reverse:a=!1}=n,{edge:l=null}=n;if(r){l==="start"&&(l=j.isBackward(r)?"focus":"anchor"),l==="end"&&(l=j.isBackward(r)?"anchor":"focus");var{anchor:c,focus:u}=r,d={distance:o,unit:i},f={};if(l==null||l==="anchor"){var p=a?C.before(t,c,d):C.after(t,c,d);p&&(f.anchor=p)}if(l==null||l==="focus"){var h=a?C.before(t,u,d):C.after(t,u,d);h&&(f.focus=h)}O.setSelection(t,f)}},select(t,n){var{selection:r}=t;if(n=C.range(t,n),r)O.setSelection(t,n);else{if(!j.isRange(n))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(JSON.stringify(n)));t.apply({type:"set_selection",properties:r,newProperties:n})}},setPoint(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:o}=t,{edge:i="both"}=r;if(o){i==="start"&&(i=j.isBackward(o)?"focus":"anchor"),i==="end"&&(i=j.isBackward(o)?"anchor":"focus");var{anchor:a,focus:l}=o,c=i==="anchor"?a:l;O.setSelection(t,{[i==="anchor"?"anchor":"focus"]:Ea(Ea({},c),n)})}},setSelection(t,n){var{selection:r}=t,o={},i={};if(r){for(var a in n)(a==="anchor"&&n.anchor!=null&&!ye.equals(n.anchor,r.anchor)||a==="focus"&&n.focus!=null&&!ye.equals(n.focus,r.focus)||a!=="anchor"&&a!=="focus"&&n[a]!==r[a])&&(o[a]=r[a],i[a]=n[a]);Object.keys(o).length>0&&t.apply({type:"set_selection",properties:o,newProperties:i})}}},Ig={delete(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C.withoutNormalizing(t,(()=>{var{reverse:r=!1,unit:o="character",distance:i=1,voids:a=!1}=n,{at:l=t.selection,hanging:c=!1}=n;if(l){if(j.isRange(l)&&j.isCollapsed(l)&&(l=l.anchor),ye.isPoint(l)){var u=C.void(t,{at:l,mode:"highest"});if(!a&&u){var[,d]=u;l=d}else{var f={unit:o,distance:i};l={anchor:l,focus:r?C.before(t,l,f)||C.start(t,[]):C.after(t,l,f)||C.end(t,[])},c=!0}}if(_.isPath(l))O.removeNodes(t,{at:l,voids:a});else if(!j.isCollapsed(l)){if(!c){var[,p]=j.edges(l),h=C.end(t,[]);ye.equals(p,h)||(l=C.unhangRange(t,l,{voids:a}))}var[m,g]=j.edges(l),y=C.above(t,{match:Ce=>C.isBlock(t,Ce),at:m,voids:a}),v=C.above(t,{match:Ce=>C.isBlock(t,Ce),at:g,voids:a}),D=y&&v&&!_.equals(y[1],v[1]),w=_.equals(m.path,g.path),b=a?null:C.void(t,{at:m,mode:"highest"}),x=a?null:C.void(t,{at:g,mode:"highest"});if(b){var k=C.before(t,m);k&&y&&_.isAncestor(y[1],k.path)&&(m=k)}if(x){var E=C.after(t,g);E&&v&&_.isAncestor(v[1],E.path)&&(g=E)}var B,V=[];for(var T of C.nodes(t,{at:l,voids:a})){var[P,R]=T;B&&_.compare(R,B)===0||(!a&&C.isVoid(t,P)||!_.isCommon(R,m.path)&&!_.isCommon(R,g.path))&&(V.push(T),B=R)}var I=Array.from(V,(Ce=>{var[,_e]=Ce;return C.pathRef(t,_e)})),U=C.pointRef(t,m),G=C.pointRef(t,g);if(!w&&!b){var W=U.current,[K]=C.leaf(t,W),{path:X}=W,{offset:oe}=m,re=K.text.slice(oe);re.length>0&&t.apply({type:"remove_text",path:X,offset:oe,text:re})}for(var ie of I){var ce=ie.unref();O.removeNodes(t,{at:ce,voids:a})}if(!x){var Q=G.current,[xe]=C.leaf(t,Q),{path:ge}=Q,Je=w?m.offset:0,Ge=xe.text.slice(Je,g.offset);Ge.length>0&&t.apply({type:"remove_text",path:ge,offset:Je,text:Ge})}!w&&D&&G.current&&U.current&&O.mergeNodes(t,{at:G.current,hanging:!0,voids:a});var Ne=r?U.unref()||G.unref():G.unref()||U.unref();n.at==null&&Ne&&O.select(t,Ne)}}}))},insertFragment(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};C.withoutNormalizing(t,(()=>{var{hanging:o=!1,voids:i=!1}=r,{at:a=t.selection}=r;if(n.length&&a){if(j.isRange(a))if(o||(a=C.unhangRange(t,a)),j.isCollapsed(a))a=a.anchor;else{var[,l]=j.edges(a);if(!i&&C.void(t,{at:l}))return;var c=C.pointRef(t,l);O.delete(t,{at:a}),a=c.unref()}else _.isPath(a)&&(a=C.start(t,a));if(i||!C.void(t,{at:a})){var u=C.above(t,{at:a,match:Q=>C.isInline(t,Q),mode:"highest",voids:i});if(u){var[,d]=u;C.isEnd(t,a,d)?a=C.after(t,d):C.isStart(t,a,d)&&(a=C.before(t,d))}var f=C.above(t,{match:Q=>C.isBlock(t,Q),at:a,voids:i}),[,p]=f,h=C.isStart(t,a,p),m=C.isEnd(t,a,p),g=h&&m,y=!h||h&&m,v=!m,[,D]=H.first({children:n},[]),[,w]=H.last({children:n},[]),b=[],x=Q=>{var[xe,ge]=Q;return ge.length!==0&&(!!g||!(y&&_.isAncestor(ge,D)&&te.isElement(xe)&&!t.isVoid(xe)&&!t.isInline(xe))&&!(v&&_.isAncestor(ge,w)&&te.isElement(xe)&&!t.isVoid(xe)&&!t.isInline(xe)))};for(var k of H.nodes({children:n},{pass:x}))x(k)&&b.push(k);var E=[],B=[],V=[],T=!0,P=!1;for(var[R]of b)te.isElement(R)&&!t.isInline(R)?(T=!1,P=!0,B.push(R)):T?E.push(R):V.push(R);var[I]=C.nodes(t,{at:a,match:Q=>q.isText(Q)||C.isInline(t,Q),mode:"highest",voids:i}),[,U]=I,G=C.isStart(t,a,U),W=C.isEnd(t,a,U),K=C.pathRef(t,m?_.next(p):p),X=C.pathRef(t,W?_.next(U):U),oe=C.pathRef(t,p);O.splitNodes(t,{at:a,match:Q=>P?C.isBlock(t,Q):q.isText(Q)||C.isInline(t,Q),mode:P?"lowest":"highest",voids:i});var re=C.pathRef(t,!G||G&&W?_.next(U):U);if(O.insertNodes(t,E,{at:re.current,match:Q=>q.isText(Q)||C.isInline(t,Q),mode:"highest",voids:i}),g&&B.length&&O.delete(t,{at:oe.unref(),voids:i}),O.insertNodes(t,B,{at:K.current,match:Q=>C.isBlock(t,Q),mode:"lowest",voids:i}),O.insertNodes(t,V,{at:X.current,match:Q=>q.isText(Q)||C.isInline(t,Q),mode:"highest",voids:i}),!r.at){var ie;ie=V.length>0?_.previous(X.current):B.length>0?_.previous(K.current):_.previous(re.current);var ce=C.end(t,ie);O.select(t,ce)}re.unref(),K.unref(),X.unref()}}}))},insertText(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};C.withoutNormalizing(t,(()=>{var{voids:o=!1}=r,{at:i=t.selection}=r;if(i){if(_.isPath(i)&&(i=C.range(t,i)),j.isRange(i))if(j.isCollapsed(i))i=i.anchor;else{var a=j.end(i);if(!o&&C.void(t,{at:a}))return;var l=C.pointRef(t,a);O.delete(t,{at:i,voids:o}),i=l.unref(),O.setSelection(t,{anchor:i,focus:i})}if(o||!C.void(t,{at:i})){var{path:c,offset:u}=i;n.length>0&&t.apply({type:"insert_text",path:c,offset:u,text:n})}}}))}};function _a(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,o)}return r}function mr(t){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?_a(Object(r),!0).forEach((function(o){Vt(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_a(Object(r)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))}))}return t}var O=mr(mr(mr(mr({},jg),Mg),$g),Ig),Rg={isHistory:t=>tt(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Wt.isOperationList(t.redos[0].operations))&&(t.undos.length===0||Wt.isOperationList(t.undos[0].operations))},Xo=new WeakMap,zn=new WeakMap,en={isHistoryEditor:t=>Rg.isHistory(t.history)&&C.isEditor(t),isMerging:t=>zn.get(t),isSaving:t=>Xo.get(t),redo(t){t.redo()},undo(t){t.undo()},withMerging(t,n){var r=en.isMerging(t);zn.set(t,!0),n(),zn.set(t,r)},withoutMerging(t,n){var r=en.isMerging(t);zn.set(t,!1),n(),zn.set(t,r)},withoutSaving(t,n){var r=en.isSaving(t);Xo.set(t,!1),n(),Xo.set(t,r)}},Hg=t=>{var n=t,{apply:r}=n;return n.history={undos:[],redos:[]},n.redo=()=>{var{history:o}=n,{redos:i}=o;if(i.length>0){var a=i[i.length-1];a.selectionBefore&&O.setSelection(n,a.selectionBefore),en.withoutSaving(n,(()=>{C.withoutNormalizing(n,(()=>{for(var l of a.operations)n.apply(l)}))})),o.redos.pop(),n.writeHistory("undos",a)}},n.undo=()=>{var{history:o}=n,{undos:i}=o;if(i.length>0){var a=i[i.length-1];en.withoutSaving(n,(()=>{C.withoutNormalizing(n,(()=>{var l=a.operations.map(Wt.inverse).reverse();for(var c of l)n.apply(c);a.selectionBefore&&O.setSelection(n,a.selectionBefore)}))})),n.writeHistory("redos",a),o.undos.pop()}},n.apply=o=>{var{operations:i,history:a}=n,{undos:l}=a,c=l[l.length-1],u=c&&c.operations[c.operations.length-1],d=en.isSaving(n),f=en.isMerging(n);if(d==null&&(d=Wg(o)),d){if(f==null&&(f=c!=null&&(i.length!==0||Ug(o,u))),c&&f)c.operations.push(o);else{var p={operations:[o],selectionBefore:n.selection};n.writeHistory("undos",p)}for(;l.length>100;)l.shift();a.redos=[]}r(o)},n.writeHistory=(o,i)=>{n.history[o].push(i)},n},Ug=(t,n)=>!(!n||t.type!=="insert_text"||n.type!=="insert_text"||t.offset!==n.offset+n.text.length||!_.equals(t.path,n.path))||!(!n||t.type!=="remove_text"||n.type!=="remove_text"||t.offset+t.text.length!==n.offset||!_.equals(t.path,n.path)),Wg=(t,n)=>t.type!=="set_selection",Qo=function(t,n){return Qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},Qo(t,n)};function De(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}Qo(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var me=function(){return me=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++)for(var i in n=arguments[r])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},me.apply(this,arguments)};function gn(t,n,r,o){return new(r||(r=Promise))((function(i,a){function l(d){try{u(o.next(d))}catch(f){a(f)}}function c(d){try{u(o.throw(d))}catch(f){a(f)}}function u(d){var f;d.done?i(d.value):(f=d.value,f instanceof r?f:new r((function(p){p(f)}))).then(l,c)}u((o=o.apply(t,[])).next())}))}function yn(t,n){var r,o,i,a,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(u){return function(d){return(function(f){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,f[0]&&(l=0)),l;)try{if(r=1,o&&(i=2&f[0]?o.return:f[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,f[1])).done)return i;switch(o=0,i&&(f=[2&f[0],i.value]),f[0]){case 0:case 1:i=f;break;case 4:return l.label++,{value:f[1],done:!1};case 5:l.label++,o=f[1],f=[0];continue;case 7:f=l.ops.pop(),l.trys.pop();continue;default:if(i=l.trys,!((i=i.length>0&&i[i.length-1])||f[0]!==6&&f[0]!==2)){l=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){l.label=f[1];break}if(f[0]===6&&l.label<i[1]){l.label=i[1],i=f;break}if(i&&l.label<i[2]){l.label=i[2],l.ops.push(f);break}i[2]&&l.ops.pop(),l.trys.pop();continue}f=n.call(t,l)}catch(p){f=[6,p],o=0}finally{r=i=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}})([u,d])}}}function at(t){var n=typeof Symbol=="function"&&Symbol.iterator,r=n&&t[n],o=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o,i,a=r.call(t),l=[];try{for(;(n===void 0||n-- >0)&&!(o=a.next()).done;)l.push(o.value)}catch(c){i={error:c}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return l}function ke(t,n,r){if(arguments.length===2)for(var o,i=0,a=n.length;i<a;i++)!o&&i in n||(o||(o=Array.prototype.slice.call(n,0,i)),o[i]=n[i]);return t.concat(o||Array.prototype.slice.call(n))}typeof SuppressedError=="function"&&SuppressedError;var qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Aa,ei={exports:{}},Na,Sa,qg=(Aa||(Aa=1,(function(t,n){var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Boolean]",l="[object Date]",c="[object Function]",u="[object GeneratorFunction]",d="[object Map]",f="[object Number]",p="[object Object]",h="[object Promise]",m="[object RegExp]",g="[object Set]",y="[object String]",v="[object Symbol]",D="[object WeakMap]",w="[object ArrayBuffer]",b="[object DataView]",x="[object Float32Array]",k="[object Float64Array]",E="[object Int8Array]",B="[object Int16Array]",V="[object Int32Array]",T="[object Uint8Array]",P="[object Uint8ClampedArray]",R="[object Uint16Array]",I="[object Uint32Array]",U=/\w*$/,G=/^\[object .+?Constructor\]$/,W=/^(?:0|[1-9]\d*)$/,K={};K[i]=K["[object Array]"]=K[w]=K[b]=K[a]=K[l]=K[x]=K[k]=K[E]=K[B]=K[V]=K[d]=K[f]=K[p]=K[m]=K[g]=K[y]=K[v]=K[T]=K[P]=K[R]=K[I]=!0,K["[object Error]"]=K[c]=K[D]=!1;var X=typeof qe=="object"&&qe&&qe.Object===Object&&qe,oe=typeof self=="object"&&self&&self.Object===Object&&self,re=X||oe||Function("return this")(),ie=n&&!n.nodeType&&n,ce=ie&&t&&!t.nodeType&&t,Q=ce&&ce.exports===ie;function xe(N,M){return N.set(M[0],M[1]),N}function ge(N,M){return N.add(M),N}function Je(N,M,Z,de){for(var it=-1,gt=N?N.length:0;++it<gt;)Z=M(Z,N[it],it,N);return Z}function Ge(N){var M=!1;if(N!=null&&typeof N.toString!="function")try{M=!!(N+"")}catch{}return M}function Ne(N){var M=-1,Z=Array(N.size);return N.forEach((function(de,it){Z[++M]=[it,de]})),Z}function Ce(N,M){return function(Z){return N(M(Z))}}function _e(N){var M=-1,Z=Array(N.size);return N.forEach((function(de){Z[++M]=de})),Z}var Me,nt=Array.prototype,rt=Function.prototype,et=Object.prototype,ot=re["__core-js_shared__"],Re=(Me=/[^.]+$/.exec(ot&&ot.keys&&ot.keys.IE_PROTO||""))?"Symbol(src)_1."+Me:"",mt=rt.toString,He=et.hasOwnProperty,ze=et.toString,Dt=RegExp("^"+mt.call(He).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Nt=Q?re.Buffer:void 0,jt=re.Symbol,ue=re.Uint8Array,le=Ce(Object.getPrototypeOf,Object),ve=Object.create,Ee=et.propertyIsEnumerable,Ue=nt.splice,Ve=Object.getOwnPropertySymbols,Pe=Nt?Nt.isBuffer:void 0,Ye=Ce(Object.keys,Object),Te=Vn(re,"DataView"),Le=Vn(re,"Map"),Bt=Vn(re,"Promise"),A=Vn(re,"Set"),L=Vn(re,"WeakMap"),Y=Vn(Object,"create"),J=cn(Te),be=cn(Le),z=cn(Bt),ee=cn(A),ae=cn(L),he=jt?jt.prototype:void 0,Se=he?he.valueOf:void 0;function $e(N){var M=-1,Z=N?N.length:0;for(this.clear();++M<Z;){var de=N[M];this.set(de[0],de[1])}}function Ze(N){var M=-1,Z=N?N.length:0;for(this.clear();++M<Z;){var de=N[M];this.set(de[0],de[1])}}function St(N){var M=-1,Z=N?N.length:0;for(this.clear();++M<Z;){var de=N[M];this.set(de[0],de[1])}}function Pt(N){this.__data__=new Ze(N)}function po(N,M){var Z=Bs(N)||(function(st){return(function(ct){return(function(Rt){return!!Rt&&typeof Rt=="object"})(ct)&&ed(ct)})(st)&&He.call(st,"callee")&&(!Ee.call(st,"callee")||ze.call(st)==i)})(N)?(function(st,ct){for(var Rt=-1,Ht=Array(st);++Rt<st;)Ht[Rt]=ct(Rt);return Ht})(N.length,String):[],de=Z.length,it=!!de;for(var gt in N)!He.call(N,gt)||it&&(gt=="length"||$D(gt,de))||Z.push(gt);return Z}function Gu(N,M,Z){var de=N[M];He.call(N,M)&&Qu(de,Z)&&(Z!==void 0||M in N)||(N[M]=Z)}function ho(N,M){for(var Z=N.length;Z--;)if(Qu(N[Z][0],M))return Z;return-1}function ws(N,M,Z,de,it,gt,st){var ct;if(de&&(ct=gt?de(N,it,gt,st):de(N)),ct!==void 0)return ct;if(!go(N))return N;var Rt=Bs(N);if(Rt){if(ct=(function(fe){var Be=fe.length,Xe=fe.constructor(Be);return Be&&typeof fe[0]=="string"&&He.call(fe,"index")&&(Xe.index=fe.index,Xe.input=fe.input),Xe})(N),!M)return(function(fe,Be){var Xe=-1,Ft=fe.length;for(Be||(Be=Array(Ft));++Xe<Ft;)Be[Xe]=fe[Xe];return Be})(N,ct)}else{var Ht=ln(N),nd=Ht==c||Ht==u;if(ID(N))return(function(fe,Be){if(Be)return fe.slice();var Xe=new fe.constructor(fe.length);return fe.copy(Xe),Xe})(N,M);if(Ht==p||Ht==i||nd&&!gt){if(Ge(N))return gt?N:{};if(ct=(function(fe){return typeof fe.constructor!="function"||Xu(fe)?{}:go(Be=le(fe))?ve(Be):{};var Be})(nd?{}:N),!M)return(function(fe,Be){return Yu(fe,Zu(fe),Be)})(N,(function(fe,Be){return fe&&Yu(Be,ks(Be),fe)})(ct,N))}else{if(!K[Ht])return gt?N:{};ct=(function(fe,Be,Xe,Ft){var rr,On=fe.constructor;switch(Be){case w:return xs(fe);case a:case l:return new On(+fe);case b:return(function(Ae,yt){var Ut=yt?xs(Ae.buffer):Ae.buffer;return new Ae.constructor(Ut,Ae.byteOffset,Ae.byteLength)})(fe,Ft);case x:case k:case E:case B:case V:case T:case P:case R:case I:return(function(Ae,yt){var Ut=yt?xs(Ae.buffer):Ae.buffer;return new Ae.constructor(Ut,Ae.byteOffset,Ae.length)})(fe,Ft);case d:return(function(Ae,yt,Ut){var or=yt?Ut(Ne(Ae),!0):Ne(Ae);return Je(or,xe,new Ae.constructor)})(fe,Ft,Xe);case f:case y:return new On(fe);case m:return(function(Ae){var yt=new Ae.constructor(Ae.source,U.exec(Ae));return yt.lastIndex=Ae.lastIndex,yt})(fe);case g:return(function(Ae,yt,Ut){var or=yt?Ut(_e(Ae),!0):_e(Ae);return Je(or,ge,new Ae.constructor)})(fe,Ft,Xe);case v:return rr=fe,Se?Object(Se.call(rr)):{}}})(N,Ht,ws,M)}}st||(st=new Pt);var rd=st.get(N);if(rd)return rd;if(st.set(N,ct),!Rt)var od=Z?(function(fe){return(function(Be,Xe,Ft){var rr=Xe(Be);return Bs(Be)?rr:(function(On,Ae){for(var yt=-1,Ut=Ae.length,or=On.length;++yt<Ut;)On[or+yt]=Ae[yt];return On})(rr,Ft(Be))})(fe,ks,Zu)})(N):ks(N);return(function(fe,Be){for(var Xe=-1,Ft=fe?fe.length:0;++Xe<Ft&&Be(fe[Xe],Xe,fe)!==!1;);})(od||N,(function(fe,Be){od&&(fe=N[Be=fe]),Gu(ct,Be,ws(fe,M,Z,de,Be,N,st))})),ct}function zD(N){return!(!go(N)||(M=N,Re&&Re in M))&&(td(N)||Ge(N)?Dt:G).test(cn(N));var M}function xs(N){var M=new N.constructor(N.byteLength);return new ue(M).set(new ue(N)),M}function Yu(N,M,Z,de){Z||(Z={});for(var it=-1,gt=M.length;++it<gt;){var st=M[it];Gu(Z,st,N[st])}return Z}function mo(N,M){var Z,de,it=N.__data__;return((de=typeof(Z=M))=="string"||de=="number"||de=="symbol"||de=="boolean"?Z!=="__proto__":Z===null)?it[typeof M=="string"?"string":"hash"]:it.map}function Vn(N,M){var Z=(function(de,it){return de?.[it]})(N,M);return zD(Z)?Z:void 0}$e.prototype.clear=function(){this.__data__=Y?Y(null):{}},$e.prototype.delete=function(N){return this.has(N)&&delete this.__data__[N]},$e.prototype.get=function(N){var M=this.__data__;if(Y){var Z=M[N];return Z===r?void 0:Z}return He.call(M,N)?M[N]:void 0},$e.prototype.has=function(N){var M=this.__data__;return Y?M[N]!==void 0:He.call(M,N)},$e.prototype.set=function(N,M){return this.__data__[N]=Y&&M===void 0?r:M,this},Ze.prototype.clear=function(){this.__data__=[]},Ze.prototype.delete=function(N){var M=this.__data__,Z=ho(M,N);return!(Z<0||(Z==M.length-1?M.pop():Ue.call(M,Z,1),0))},Ze.prototype.get=function(N){var M=this.__data__,Z=ho(M,N);return Z<0?void 0:M[Z][1]},Ze.prototype.has=function(N){return ho(this.__data__,N)>-1},Ze.prototype.set=function(N,M){var Z=this.__data__,de=ho(Z,N);return de<0?Z.push([N,M]):Z[de][1]=M,this},St.prototype.clear=function(){this.__data__={hash:new $e,map:new(Le||Ze),string:new $e}},St.prototype.delete=function(N){return mo(this,N).delete(N)},St.prototype.get=function(N){return mo(this,N).get(N)},St.prototype.has=function(N){return mo(this,N).has(N)},St.prototype.set=function(N,M){return mo(this,N).set(N,M),this},Pt.prototype.clear=function(){this.__data__=new Ze},Pt.prototype.delete=function(N){return this.__data__.delete(N)},Pt.prototype.get=function(N){return this.__data__.get(N)},Pt.prototype.has=function(N){return this.__data__.has(N)},Pt.prototype.set=function(N,M){var Z=this.__data__;if(Z instanceof Ze){var de=Z.__data__;if(!Le||de.length<199)return de.push([N,M]),this;Z=this.__data__=new St(de)}return Z.set(N,M),this};var Zu=Ve?Ce(Ve,Object):function(){return[]},ln=function(N){return ze.call(N)};function $D(N,M){return!!(M=M??o)&&(typeof N=="number"||W.test(N))&&N>-1&&N%1==0&&N<M}function Xu(N){var M=N&&N.constructor;return N===(typeof M=="function"&&M.prototype||et)}function cn(N){if(N!=null){try{return mt.call(N)}catch{}try{return N+""}catch{}}return""}function Qu(N,M){return N===M||N!=N&&M!=M}(Te&&ln(new Te(new ArrayBuffer(1)))!=b||Le&&ln(new Le)!=d||Bt&&ln(Bt.resolve())!=h||A&&ln(new A)!=g||L&&ln(new L)!=D)&&(ln=function(N){var M=ze.call(N),Z=M==p?N.constructor:void 0,de=Z?cn(Z):void 0;if(de)switch(de){case J:return b;case be:return d;case z:return h;case ee:return g;case ae:return D}return M});var Bs=Array.isArray;function ed(N){return N!=null&&(function(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=o})(N.length)&&!td(N)}var ID=Pe||function(){return!1};function td(N){var M=go(N)?ze.call(N):"";return M==c||M==u}function go(N){var M=typeof N;return!!N&&(M=="object"||M=="function")}function ks(N){return ed(N)?po(N):(function(M){if(!Xu(M))return Ye(M);var Z=[];for(var de in Object(M))He.call(M,de)&&de!="constructor"&&Z.push(de);return Z})(N)}t.exports=function(N){return ws(N,!0,!0)}})(ei,ei.exports)),ei.exports),Fa=qt(qg),Kg=(function(){if(Sa)return Na;Sa=1;var t=9007199254740991,n="[object Arguments]",r="[object Function]",o="[object GeneratorFunction]",i=/^(?:0|[1-9]\d*)$/;function a(B,V){for(var T=-1,P=B?B.length:0;++T<P&&V(B[T],T,B)!==!1;);return B}var l,c,u=Object.prototype,d=u.hasOwnProperty,f=u.toString,p=u.propertyIsEnumerable,h=(l=Object.keys,c=Object,function(B){return l(c(B))});function m(B,V){var T=b(B)||(function(U){return(function(G){return(function(W){return!!W&&typeof W=="object"})(G)&&x(G)})(U)&&d.call(U,"callee")&&(!p.call(U,"callee")||f.call(U)==n)})(B)?(function(U,G){for(var W=-1,K=Array(U);++W<U;)K[W]=G(W);return K})(B.length,String):[],P=T.length,R=!!P;for(var I in B)!d.call(B,I)||R&&(I=="length"||w(I,P))||T.push(I);return T}var g,y=(g=function(B,V){return B&&v(B,V,k)},function(B,V){if(B==null)return B;if(!x(B))return g(B,V);for(var T=B.length,P=-1,R=Object(B);++P<T&&V(R[P],P,R)!==!1;);return B}),v=function(B,V,T){for(var P=-1,R=Object(B),I=T(B),U=I.length;U--;){var G=I[++P];if(V(R[G],G,R)===!1)break}return B};function D(B){if(T=(V=B)&&V.constructor,P=typeof T=="function"&&T.prototype||u,V!==P)return h(B);var V,T,P,R=[];for(var I in Object(B))d.call(B,I)&&I!="constructor"&&R.push(I);return R}function w(B,V){return!!(V=V??t)&&(typeof B=="number"||i.test(B))&&B>-1&&B%1==0&&B<V}var b=Array.isArray;function x(B){return B!=null&&(function(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=t})(B.length)&&!(function(V){var T=(function(P){var R=typeof P;return!!P&&(R=="object"||R=="function")})(V)?f.call(V):"";return T==r||T==o})(B)}function k(B){return x(B)?m(B):D(B)}function E(B){return B}return Na=function(B,V){return(b(B)?a:y)(B,typeof V=="function"?V:E)}})(),Va=qt(Kg),Oa={},dt={CREATED:"created",DESTROYED:"destroyed",CHANGE:"change",SCROLL:"scroll",FULLSCREEN:"fullscreen",UNFULLSCREEN:"unFullScreen"},$n={};function Jg(t,n){var r=t.key,o=t.factory,i=t.config,a=me(me({},i),n||{});if($n[r]!=null)throw new Error("Duplicated key '".concat(r,"' in menu items"));$n[r]=o,(function(l,c){c!=null&&(Oa[l]=c)})(r,a)}var ti=new WeakMap,ni=new WeakMap,ri=new WeakMap,gr=new WeakMap,oi=new WeakMap,yr=new WeakMap,ii=new WeakMap,si=new WeakMap,br=new WeakMap,Ta=new WeakMap,ja=new WeakMap,Pa=new WeakMap,La=new WeakMap,In=new WeakMap,bn=new WeakMap,ai=new WeakMap,Cr=new WeakMap,li=new WeakMap,vr=new WeakMap,Dr=new WeakMap,Ma=new WeakMap,tn=new WeakMap,ci=new WeakMap,za=new WeakMap,ui=new WeakMap,Gg=function(t){var n=t;return n.getAllMenuKeys=function(){var r=[];for(var o in $n)r.push(o);return r},n.getConfig=function(){var r=Ta.get(n);if(r==null)throw new Error("Can not get editor config");return r},n.getMenuConfig=function(r){var o=n.getConfig().MENU_CONF;return(o===void 0?{}:o)[r]||{}},n.alert=function(r,o){o===void 0&&(o="info");var i=n.getConfig().customAlert;i&&i(r,o)},n},Ia=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function Ra(t){return t!==null&&typeof t=="object"&&"constructor"in t&&t.constructor===Object}function di(t,n){t===void 0&&(t={}),n===void 0&&(n={}),Object.keys(n).forEach((function(r){t[r]===void 0?t[r]=n[r]:Ra(n[r])&&Ra(t[r])&&Object.keys(n[r]).length>0&&di(t[r],n[r])}))}var Ha={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Rn(){var t=typeof document<"u"?document:{};return di(t,Ha),t}var Yg={document:Ha,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(t){return typeof setTimeout>"u"?(t(),null):setTimeout(t,0)},cancelAnimationFrame:function(t){typeof setTimeout<"u"&&clearTimeout(t)}};function nn(){var t=typeof window<"u"?window:{};return di(t,Yg),t}function fi(t){return fi=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},fi(t)}function wr(t,n){return wr=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},wr(t,n)}function pi(t,n,r){return pi=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch{return!1}})()?Reflect.construct:function(o,i,a){var l=[null];l.push.apply(l,i);var c=new(Function.bind.apply(o,l));return a&&wr(c,a.prototype),c},pi.apply(null,arguments)}function hi(t){var n=typeof Map=="function"?new Map:void 0;return hi=function(r){if(r===null||!(function(i){return Function.toString.call(i).indexOf("[native code]")!==-1})(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(n!==void 0){if(n.has(r))return n.get(r);n.set(r,o)}function o(){return pi(r,arguments,fi(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),wr(o,r)},hi(t)}var Kt=(function(t){var n,r;function o(i){var a,l,c;return a=t.call.apply(t,[this].concat(i))||this,l=(function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u})(a),c=l.__proto__,Object.defineProperty(l,"__proto__",{get:function(){return c},set:function(u){c.__proto__=u}}),a}return r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,o})(hi(Array));function xr(t){t===void 0&&(t=[]);var n=[];return t.forEach((function(r){Array.isArray(r)?n.push.apply(n,xr(r)):n.push(r)})),n}function Ua(t,n){return Array.prototype.filter.call(t,n)}function F(t,n){var r=nn(),o=Rn(),i=[];if(!n&&t instanceof Kt)return t;if(!t)return new Kt(i);if(typeof t=="string"){var a=t.trim();if(a.indexOf("<")>=0&&a.indexOf(">")>=0){var l="div";a.indexOf("<li")===0&&(l="ul"),a.indexOf("<tr")===0&&(l="tbody"),a.indexOf("<td")!==0&&a.indexOf("<th")!==0||(l="tr"),a.indexOf("<tbody")===0&&(l="table"),a.indexOf("<option")===0&&(l="select");var c=o.createElement(l);c.innerHTML=a;for(var u=0;u<c.childNodes.length;u+=1)i.push(c.childNodes[u])}else i=(function(d,f){if(typeof d!="string")return[d];for(var p=[],h=f.querySelectorAll(d),m=0;m<h.length;m+=1)p.push(h[m]);return p})(t.trim(),n||o)}else if(t.nodeType||t===r||t===o)i.push(t);else if(Array.isArray(t)){if(t instanceof Kt)return t;i=t}return new Kt((function(d){for(var f=[],p=0;p<d.length;p+=1)f.indexOf(d[p])===-1&&f.push(d[p]);return f})(i))}function Br(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=xr(n.map((function(i){return i.split(" ")})));return this.forEach((function(i){var a;(a=i.classList).add.apply(a,o)})),this}function kr(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=xr(n.map((function(i){return i.split(" ")})));return this.forEach((function(i){var a;(a=i.classList).remove.apply(a,o)})),this}function Er(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=xr(n.map((function(i){return i.split(" ")})));return Ua(this,(function(i){return o.filter((function(a){return i.classList.contains(a)})).length>0})).length>0}function Cn(t,n){if(arguments.length===1&&typeof t=="string")return this[0]?this[0].getAttribute(t):void 0;for(var r=0;r<this.length;r+=1)if(arguments.length===2)this[r].setAttribute(t,n);else for(var o in t)this[r][o]=t[o],this[r].setAttribute(o,t[o]);return this}function _r(t){for(var n=0;n<this.length;n+=1)this[n].removeAttribute(t);return this}function Ar(){var t=this[0];if(t){var n,r={};if(t.dataset)for(var o in t.dataset)r[o]=t.dataset[o];else for(var i=0;i<t.attributes.length;i+=1){var a=t.attributes[i];a.name.indexOf("data-")>=0&&(r[n=a.name.split("data-")[1],n.toLowerCase().replace(/-(.)/g,(function(c,u){return u.toUpperCase()}))]=a.value)}for(var l in r)r[l]==="false"?r[l]=!1:r[l]==="true"?r[l]=!0:parseFloat(r[l])===1*r[l]&&(r[l]*=1);return r}}function Nr(t){if(t===void 0){var n=this[0];if(!n)return;if(n.multiple&&n.nodeName.toLowerCase()==="select"){for(var r=[],o=0;o<n.selectedOptions.length;o+=1)r.push(n.selectedOptions[o].value);return r}return n.value}for(var i=0;i<this.length;i+=1){var a=this[i];if(Array.isArray(t)&&a.multiple&&a.nodeName.toLowerCase()==="select")for(var l=0;l<a.options.length;l+=1)a.options[l].selected=t.indexOf(a.options[l].value)>=0;else a.value=t}return this}function Sr(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0],i=n[1],a=n[2],l=n[3];function c(y){var v=y.target;if(v){var D=y.target.dom7EventData||[];if(D.indexOf(y)<0&&D.unshift(y),F(v).is(i))a.apply(v,D);else for(var w=F(v).parents(),b=0;b<w.length;b+=1)F(w[b]).is(i)&&a.apply(w[b],D)}}function u(y){var v=y&&y.target&&y.target.dom7EventData||[];v.indexOf(y)<0&&v.unshift(y),a.apply(this,v)}typeof n[1]=="function"&&(o=n[0],a=n[1],l=n[2],i=void 0),l||(l=!1);for(var d,f=o.split(" "),p=0;p<this.length;p+=1){var h=this[p];if(i)for(d=0;d<f.length;d+=1){var m=f[d];h.dom7LiveListeners||(h.dom7LiveListeners={}),h.dom7LiveListeners[m]||(h.dom7LiveListeners[m]=[]),h.dom7LiveListeners[m].push({listener:a,proxyListener:c}),h.addEventListener(m,c,l)}else for(d=0;d<f.length;d+=1){var g=f[d];h.dom7Listeners||(h.dom7Listeners={}),h.dom7Listeners[g]||(h.dom7Listeners[g]=[]),h.dom7Listeners[g].push({listener:a,proxyListener:u}),h.addEventListener(g,u,l)}}return this}function Wa(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0],i=n[1],a=n[2],l=n[3];typeof n[1]=="function"&&(o=n[0],a=n[1],l=n[2],i=void 0),l||(l=!1);for(var c=o.split(" "),u=0;u<c.length;u+=1)for(var d=c[u],f=0;f<this.length;f+=1){var p=this[f],h=void 0;if(!i&&p.dom7Listeners?h=p.dom7Listeners[d]:i&&p.dom7LiveListeners&&(h=p.dom7LiveListeners[d]),h&&h.length)for(var m=h.length-1;m>=0;m-=1){var g=h[m];a&&g.listener===a||a&&g.listener&&g.listener.dom7proxy&&g.listener.dom7proxy===a?(p.removeEventListener(d,g.proxyListener,l),h.splice(m,1)):a||(p.removeEventListener(d,g.proxyListener,l),h.splice(m,1))}}return this}function Fr(){var t=nn();return this[0]===t?t.innerWidth:this.length>0?parseFloat(this.css("width")):null}function Vr(){var t=nn();return this[0]===t?t.innerHeight:this.length>0?parseFloat(this.css("height")):null}function qa(){if(this.length>0){var t=nn(),n=Rn(),r=this[0],o=r.getBoundingClientRect(),i=n.body,a=r.clientTop||i.clientTop||0,l=r.clientLeft||i.clientLeft||0,c=r===t?t.scrollY:r.scrollTop,u=r===t?t.scrollX:r.scrollLeft;return{top:o.top+c-a,left:o.left+u-l}}return null}function Or(){for(var t=0;t<this.length;t+=1)this[t].style.display="none";return this}function Tr(){for(var t=nn(),n=0;n<this.length;n+=1){var r=this[n];r.style.display==="none"&&(r.style.display=""),t.getComputedStyle(r,null).getPropertyValue("display")==="none"&&(r.style.display="block")}return this}function jr(t,n){var r,o=nn();if(arguments.length===1){if(typeof t!="string"){for(r=0;r<this.length;r+=1)for(var i in t)this[r].style[i]=t[i];return this}if(this[0])return o.getComputedStyle(this[0],null).getPropertyValue(t)}if(arguments.length===2&&typeof t=="string"){for(r=0;r<this.length;r+=1)this[r].style[t]=n;return this}return this}function Ka(t){return t?(this.forEach((function(n,r){t.apply(n,[n,r])})),this):this}function Ja(t){return F(Ua(this,t))}function Pr(t){if(t===void 0)return this[0]?this[0].innerHTML:null;for(var n=0;n<this.length;n+=1)this[n].innerHTML=t;return this}function Lr(t){if(t===void 0)return this[0]?this[0].textContent.trim():null;for(var n=0;n<this.length;n+=1)this[n].textContent=t;return this}function Ga(t){var n,r,o=nn(),i=Rn(),a=this[0];if(!a||t===void 0)return!1;if(typeof t=="string"){if(a.matches)return a.matches(t);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(t);if(a.msMatchesSelector)return a.msMatchesSelector(t);for(n=F(t),r=0;r<n.length;r+=1)if(n[r]===a)return!0;return!1}if(t===i)return a===i;if(t===o)return a===o;if(t.nodeType||t instanceof Kt){for(n=t.nodeType?[t]:t,r=0;r<n.length;r+=1)if(n[r]===a)return!0;return!1}return!1}function vn(){for(var t,n=Rn(),r=0;r<arguments.length;r+=1){t=r<0||arguments.length<=r?void 0:arguments[r];for(var o=0;o<this.length;o+=1)if(typeof t=="string"){var i=n.createElement("div");for(i.innerHTML=t;i.firstChild;)this[o].appendChild(i.firstChild)}else if(t instanceof Kt)for(var a=0;a<t.length;a+=1)this[o].appendChild(t[a]);else this[o].appendChild(t)}return this}function Ya(t){var n,r,o=Rn();for(n=0;n<this.length;n+=1)if(typeof t=="string"){var i=o.createElement("div");for(i.innerHTML=t,r=i.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(i.childNodes[r],this[n].childNodes[0])}else if(t instanceof Kt)for(r=0;r<t.length;r+=1)this[n].insertBefore(t[r],this[n].childNodes[0]);else this[n].insertBefore(t,this[n].childNodes[0]);return this}function Mr(t){for(var n=[],r=0;r<this.length;r+=1)this[r].parentNode!==null&&(t?F(this[r].parentNode).is(t)&&n.push(this[r].parentNode):n.push(this[r].parentNode));return F(n)}function zr(t){for(var n=[],r=0;r<this.length;r+=1)for(var o=this[r].parentNode;o;)t?F(o).is(t)&&n.push(o):n.push(o),o=o.parentNode;return F(n)}function $r(t){for(var n=[],r=0;r<this.length;r+=1)for(var o=this[r].querySelectorAll(t),i=0;i<o.length;i+=1)n.push(o[i]);return F(n)}function Ir(t){for(var n=[],r=0;r<this.length;r+=1)for(var o=this[r].children,i=0;i<o.length;i+=1)t&&!F(o[i]).is(t)||n.push(o[i]);return F(n)}function Rr(){for(var t=0;t<this.length;t+=1)this[t].parentNode&&this[t].parentNode.removeChild(this[t]);return this}function Hr(){for(var t=0;t<this.length;t+=1){var n=this[t];if(n.nodeType===1){for(var r=0;r<n.childNodes.length;r+=1)n.childNodes[r].parentNode&&n.childNodes[r].parentNode.removeChild(n.childNodes[r]);n.textContent=""}}return this}F.fn=Kt.prototype;var Zg="resize scroll".split(" "),Dn,Ur=(Dn="focus",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n[0]===void 0){for(var o=0;o<this.length;o+=1)Zg.indexOf(Dn)<0&&(Dn in this[o]?this[o][Dn]():F(this[o]).trigger(Dn));return this}return this.on.apply(this,[Dn].concat(n))});const Xg=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let Qg=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((n,r)=>n+=(r&=63)<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r>62?"-":"_"),"");function wt(t){Promise.resolve().then(t)}var Ot,Hn=function(t){return Object.prototype.toString.call(t)};jr&&(F.fn.css=jr),vn&&(F.fn.append=vn),Br&&(F.fn.addClass=Br),kr&&(F.fn.removeClass=kr),Er&&(F.fn.hasClass=Er),Sr&&(F.fn.on=Sr),Ur&&(F.fn.focus=Ur),Cn&&(F.fn.attr=Cn),_r&&(F.fn.removeAttr=_r),Or&&(F.fn.hide=Or),Tr&&(F.fn.show=Tr),qa&&(F.fn.offset=qa),Fr&&(F.fn.width=Fr),Vr&&(F.fn.height=Vr),Mr&&(F.fn.parent=Mr),zr&&(F.fn.parents=zr),Ga&&(F.fn.is=Ga),Ar&&(F.fn.dataset=Ar),Nr&&(F.fn.val=Nr),Lr&&(F.fn.text=Lr),Pr&&(F.fn.html=Pr),Ir&&(F.fn.children=Ir),Rr&&(F.fn.remove=Rr),$r&&(F.fn.find=$r),Ka&&(F.fn.each=Ka),Hr&&(F.fn.empty=Hr),(function(t){t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(Ot||(Ot={}));var e0=/\[object HTML([A-Z][a-z]*)*Element\]/,rn=function(t){return t!=null&&typeof t.nodeType=="number"},Za=function(t){return rn(t)&&t.nodeType===Ot.COMMENT_NODE},ft=function(t){return rn(t)&&t.nodeType===Ot.ELEMENT_NODE},Xa=function(t){return Hn(t)==="[object Selection]"},$t=function(t){return rn(t)&&t.nodeType===Ot.TEXT_NODE},mi=function(t){var n,r,o;return(n=window&&window.document.getElementById(t))!==null&&n!==void 0?n:window&&((o=(r=window.document.activeElement)===null||r===void 0?void 0:r.shadowRoot)===null||o===void 0?void 0:o.getElementById(t))||null},Qa=function(t,n,r){for(var o=t.childNodes,i=o[n],a=n,l=!1,c=!1;(Za(i)||ft(i)&&i.childNodes.length===0||ft(i)&&i.getAttribute("contenteditable")==="false")&&(!l||!c);)a>=o.length?(l=!0,a=n-1,r="backward"):a<0?(c=!0,a=n+1,r="forward"):(i=o[a],n=a,a+=r==="forward"?1:-1);return[i,n]},t0=function(t,n,r){return $(Qa(t,n,r),1)[0]},el=function(t){var n,r,o="";if($t(t)&&t.nodeValue)return t.nodeValue;if(ft(t)){try{for(var i=at(Array.from(t.childNodes)),a=i.next();!a.done;a=i.next()){var l=a.value;o+=el(l)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}var c=getComputedStyle(t).getPropertyValue("display");c!=="block"&&c!=="list"&&c!=="table-row"&&t.tagName!=="BR"||(o+=`
|
|
5
|
+
`)}return o};function tl(t,n){if(r=t,!e0.test(Hn(r))||t.dataset.slateVoid!=="true")for(var r,o=t.childNodes,i=o.length;i-=1;){var a=o[i],l=a.nodeType;$t(a)?n(a,t):[Ot.ELEMENT_NODE,Ot.DOCUMENT_NODE,Ot.DOCUMENT_FRAGMENT_NODE].includes(l)&&tl(a,n)}}function nl(t){if(t.length===0)return"";var n=t[0];return n.nodeType!==Ot.ELEMENT_NODE?"":n.tagName.toLowerCase()}var n0=new RegExp(" ","g");function rl(t){return t.replace(n0," ")}var ol=["span","b","strong","i","em","s","strike","u","font","sub","sup"],il=[],Wr=[],qr={};function sl(t,n){var r=t.length;if(r){var o=t[r-1];if(q.isText(o)){var i=Object.keys(o);if(i.length===1&&i[0]==="text")return o.text+=n,!0}}return!1}function r0(t,n,r){return{type:"paragraph",children:[{text:F(t).text().replace(/\s+/gm," ")}]}}function gi(t,n){var r=(function(a,l){var c=[];if(a.attr("data-w-e-is-void")!=null)return c;var u=a[0].childNodes;return u.length===1&&u[0].nodeName==="BR"?(c.push({text:""}),c):(u.forEach((function(d){if(ft(d)){if(d.nodeName==="BR")return void(sl(c,`
|
|
6
6
|
`)||c.push({text:`
|
|
7
7
|
`}));var f=Wn(F(d),l);Array.isArray(f)?f.forEach((function(h){return c.push(h)})):c.push(f)}else if($t(d)){var p=d.textContent||"";if(p.trim()===""&&p.indexOf(`
|
|
8
|
-
`)>=0)return;p&&(p=rl(p),sl(c,p)||c.push({text:p}))}})),c)})(t,n),o=(function(a){for(var l in qr)if(a[0].matches(l))return qr[l];return
|
|
9
|
-
`));var r=t[0].textContent||"";r=(function(i){return i.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')})(r);var o={text:r=rl(r)};return Wr.forEach((function(i){o=i(t[0],o,n)})),o}function Wn(t,n){il.forEach((function(a){var l=a.selector,c=a.preParseHtml;t[0].matches(l)&&(t=F(c(t[0])))}));var r=nl(t);if(r==="span"){if(t.attr("data-w-e-type"))return gi(t,n);if(t[0].childNodes.length>1){var o=t[0].childNodes,i=(function(a,l){var c={text:""};return Wr.forEach((function(u){c=u(a[0],c,l)})),c})(F(t[0]),n);return Array.from(o).flatMap((function(a){var l=(function(c,u,d){var f=c[0];if(ft(f)){var p=Wn(c,d);return Array.isArray(p)?p.map((function(m){return me(me({},u),m)})):[me(me({},u),p)]}if(Za(f))return null;var h=$t(f)?{text:f.textContent||""}:Un(c,d);return[me(me({},u),h)]})(F(a),i,n);return l||[]}))}return Un(t,n)}return r==="code"?nl(t.parent())==="pre"?gi(t,n):Un(t,n):ol.includes(r)?t[0].childNodes.length>0&&t[0].childNodes[0].nodeType!==3?(o=t[0].childNodes,me(me({},Wn(F(o[0]),n)),Un(t,n))):Un(t,n):gi(t,n)}function al(t,n,r){var o=F(r);return!!o.attr(n)||(o.attr(n,"true"),t.on(dt.DESTROYED,(function(){o.removeAttr(n)})),!1)}function ll(t,n){n===void 0&&(n="");var r=[];n===""&&(n="<p><br></p>"),n.indexOf("<")!==0&&(n=n.split(/\n/).map((function(i){return"<p>".concat(i,"</p>")})).join(""));var o=F("<div>".concat(n,"</div>"));return Array.from(o.children()).forEach((function(i){var a=Wn(F(i),t);Array.isArray(a)?a.forEach((function(l){return r.push(l)})):r.push(a)})),r}function cl(t,n){return"w-e-element-".concat(t,"-").concat(n)}var yi=[],bi,ul,dl={};function r0(t,n,r){var o=r.isInline(t)?"span":"div";return"<".concat(o,">").concat(n,"</").concat(o,">")}function o0(t,n){var r=t.type,o=r===void 0?"":r,i=t.children,a=i===void 0?[]:i,l=C.isVoid(n,t),c="";l||(c=a.map((function(y){return hl(y,n)})).join(""));var u=(function(y){return dl[y]||r0})(o),d=u(t,c,n),f="";if(f=typeof d=="string"?d:d.html||"",l||yi.forEach((function(y){return f=y(t,f)})),typeof d=="string")return f;var p=d.prefix,h=p===void 0?"":p,m=d.suffix,g=m===void 0?"":m;return h&&(f=h+f),g&&(f+=g),f}var i0=(function(){if(ul)return bi;ul=1;var t=9007199254740991,n="[object Arguments]",r="[object Function]",o="[object GeneratorFunction]",i="[object Map]",a="[object Promise]",l="[object Set]",c="[object String]",u="[object WeakMap]",d="[object DataView]",f=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,h="\\ud800-\\udfff",m="\\u0300-\\u036f\\ufe20-\\ufe23",g="\\u20d0-\\u20f0",y="\\ufe0e\\ufe0f",v="["+h+"]",D="["+m+g+"]",w="\\ud83c[\\udffb-\\udfff]",b="[^"+h+"]",x="(?:\\ud83c[\\udde6-\\uddff]){2}",k="[\\ud800-\\udbff][\\udc00-\\udfff]",E="\\u200d",B="(?:"+D+"|"+w+")?",V="["+y+"]?",T=V+B+("(?:"+E+"(?:"+[b,x,k].join("|")+")"+V+B+")*"),P="(?:"+[b+D+"?",D,x,k,v].join("|")+")",R=RegExp(w+"(?="+w+")|"+P+T,"g"),I=RegExp("["+E+h+m+g+y+"]"),U=typeof qe=="object"&&qe&&qe.Object===Object&&qe,G=typeof self=="object"&&self&&self.Object===Object&&self,W=U||G||Function("return this")();function K(z,ee){return(function(ae,he){for(var Se=-1,$e=ae?ae.length:0,Ze=Array($e);++Se<$e;)Ze[Se]=he(ae[Se],Se,ae);return Ze})(ee,(function(ae){return z[ae]}))}function X(z){var ee=-1,ae=Array(z.size);return z.forEach((function(he,Se){ae[++ee]=[Se,he]})),ae}function oe(z){var ee=-1,ae=Array(z.size);return z.forEach((function(he){ae[++ee]=he})),ae}function re(z){return(function(ee){return I.test(ee)})(z)?(function(ee){return ee.match(R)||[]})(z):(function(ee){return ee.split("")})(z)}var ie,ce,Q,xe=Function.prototype,ge=Object.prototype,Je=W["__core-js_shared__"],Ge=(ie=/[^.]+$/.exec(Je&&Je.keys&&Je.keys.IE_PROTO||""))?"Symbol(src)_1."+ie:"",Ne=xe.toString,Ce=ge.hasOwnProperty,_e=ge.toString,Me=RegExp("^"+Ne.call(Ce).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nt=W.Symbol,rt=nt?nt.iterator:void 0,et=ge.propertyIsEnumerable,ot=(ce=Object.keys,Q=Object,function(z){return ce(Q(z))}),Re=Pe(W,"DataView"),mt=Pe(W,"Map"),He=Pe(W,"Promise"),ze=Pe(W,"Set"),Dt=Pe(W,"WeakMap"),Nt=Le(Re),jt=Le(mt),ue=Le(He),le=Le(ze),ve=Le(Dt);function Ee(z,ee){var ae=Bt(z)||(function(Ze){return(function(St){return J(St)&&A(St)})(Ze)&&Ce.call(Ze,"callee")&&(!et.call(Ze,"callee")||_e.call(Ze)==n)})(z)?(function(Ze,St){for(var Pt=-1,po=Array(Ze);++Pt<Ze;)po[Pt]=St(Pt);return po})(z.length,String):[],he=ae.length,Se=!!he;for(var $e in z)!Ce.call(z,$e)||Se&&($e=="length"||Te($e,he))||ae.push($e);return ae}function Ue(z){if(!Y(z)||(function(ae){return!!Ge&&Ge in ae})(z))return!1;var ee=L(z)||(function(ae){var he=!1;if(ae!=null&&typeof ae.toString!="function")try{he=!!(ae+"")}catch{}return he})(z)?Me:f;return ee.test(Le(z))}function Ve(z){if(ae=(ee=z)&&ee.constructor,he=typeof ae=="function"&&ae.prototype||ge,ee!==he)return ot(z);var ee,ae,he,Se=[];for(var $e in Object(z))Ce.call(z,$e)&&$e!="constructor"&&Se.push($e);return Se}function Pe(z,ee){var ae=(function(he,Se){return he?.[Se]})(z,ee);return Ue(ae)?ae:void 0}var Ye=function(z){return _e.call(z)};function Te(z,ee){return!!(ee=ee??t)&&(typeof z=="number"||p.test(z))&&z>-1&&z%1==0&&z<ee}function Le(z){if(z!=null){try{return Ne.call(z)}catch{}try{return z+""}catch{}}return""}(Re&&Ye(new Re(new ArrayBuffer(1)))!=d||mt&&Ye(new mt)!=i||He&&Ye(He.resolve())!=a||ze&&Ye(new ze)!=l||Dt&&Ye(new Dt)!=u)&&(Ye=function(z){var ee=_e.call(z),ae=ee=="[object Object]"?z.constructor:void 0,he=ae?Le(ae):void 0;if(he)switch(he){case Nt:return d;case jt:return i;case ue:return a;case le:return l;case ve:return u}return ee});var Bt=Array.isArray;function A(z){return z!=null&&(function(ee){return typeof ee=="number"&&ee>-1&&ee%1==0&&ee<=t})(z.length)&&!L(z)}function L(z){var ee=Y(z)?_e.call(z):"";return ee==r||ee==o}function Y(z){var ee=typeof z;return!!z&&(ee=="object"||ee=="function")}function J(z){return!!z&&typeof z=="object"}function be(z){return z?K(z,(function(ee){return A(ee)?Ee(ee):Ve(ee)})(z)):[]}return bi=function(z){if(!z)return[];if(A(z))return(function(ae){return typeof ae=="string"||!Bt(ae)&&J(ae)&&_e.call(ae)==c})(z)?re(z):(function(ae,he){var Se=-1,$e=ae.length;for(he||(he=Array($e));++Se<$e;)he[Se]=ae[Se];return he})(z);if(rt&&z[rt])return(function(ae){for(var he,Se=[];!(he=ae.next()).done;)Se.push(he.value);return Se})(z[rt]());var ee=Ye(z);return(ee==i?X:ee==l?oe:be)(z)},bi})(),fl=qt(i0),s0=0,pl=function(){this.id="".concat(s0++)},Ci=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),qn=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),wn=typeof navigator<"u"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),a0=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),l0=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),vi=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),Kn=!l0&&!a0&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",S={getWindow:function(t){var n=Ma.get(t);if(!n)throw new Error("Unable to find a host window element for this editor");return n},findKey:function(t,n){var r=Dr.get(n);return r||(r=new pl,Dr.set(n,r)),r},setNewKey:function(t){var n=new pl;Dr.set(t,n)},findPath:function(t,n){for(var r=[],o=n;;){var i=bn.get(o);if(i==null){if(C.isEditor(o))return r;break}var a=In.get(o);if(a==null)break;r.unshift(a),o=i}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(n)))},findDocumentOrShadowRoot:function(t){if(t.isDestroyed)return window.document;var n=S.toDOMNode(t,t),r=n.getRootNode();return Hn(r)!=="[object HTMLDocument]"&&!(function(o){return Hn(o)==="[object ShadowRoot]"})(r)||Reflect.get(r,"getSelection")==null?n.ownerDocument:r},getParentNode:function(t,n){return bn.get(n)||null},getParentsNodes:function(t,n){for(var r=[],o=n;o!==t&&o!=null;){var i=S.getParentNode(t,o);if(i==null)break;r.push(i),o=i}return r},getTopNode:function(t,n){var r=[S.findPath(t,n)[0]];return H.get(t,r)},toDOMNode:function(t,n){var r;if(C.isEditor(n))r=ai.get(t);else{var o=S.findKey(t,n);r=li.get(o)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(n)));return r},hasDOMNode:function(t,n,r){r===void 0&&(r={});var o,i=r.editable,a=i!==void 0&&i,l=S.toDOMNode(t,t);try{o=ft(n)?n:n.parentElement}catch(c){if(c instanceof Error&&!c.message.includes('Permission denied to access property "nodeType"'))throw c}return!!o&&(o.closest("[data-slate-editor]")===l&&(!a||o.isContentEditable||!!o.getAttribute("data-slate-zero-width"))||!!o.getAttribute("data-slate-string"))},toDOMRange:function(t,n){var r=n.anchor,o=n.focus,i=j.isBackward(n),a=S.toDOMPoint(t,r),l=j.isCollapsed(n)?a:S.toDOMPoint(t,o),c=S.getWindow(t).document.createRange(),u=$(i?l:a,2),d=u[0],f=u[1],p=$(i?a:l,2),h=p[0],m=p[1],g=!!(ft(d)?d:d.parentElement).getAttribute("data-slate-zero-width"),y=!!(ft(h)?h:h.parentElement).getAttribute("data-slate-zero-width");return c.setStart(d,g?1:f),c.setEnd(h,y?1:m),c},toDOMPoint:function(t,n){var r,o,i,a=$(C.node(t,n.path),1)[0],l=S.toDOMNode(t,a);C.void(t,{at:n})&&(n={path:n.path,offset:0});var c=Array.from(l.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var d=at(c),f=d.next();!f.done;f=d.next()){var p=f.value,h=p.childNodes[0];if(h!=null&&h.textContent!=null){var m=h.textContent.length,g=p.getAttribute("data-slate-length"),y=u+(g==null?m:parseInt(g,10));if(n.offset<=y){i=[h,Math.min(m,Math.max(0,n.offset-u))];break}u=y}}}catch(v){r={error:v}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(n)));return i},toSlateNode:function(t,n){var r=ft(n)?n:n.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var o=r?Cr.get(r):null;if(!o)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return o},findEventRange:function(t,n){"nativeEvent"in n&&(n=n.nativeEvent);var r=n.clientX,o=n.clientY,i=n.target;if(r==null||o==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));var a,l=S.toSlateNode(t,n.target),c=S.findPath(t,l);if(C.isVoid(t,l)){var u=i.getBoundingClientRect(),d=t.isInline(l)?r-u.left<u.left+u.width-r:o-u.top<u.top+u.height-o,f=C.point(t,c,{edge:d?"start":"end"}),p=d?C.before(t,f):C.after(t,f);if(p)return C.range(t,p)}var h=this.getWindow(t).document;if(h.caretRangeFromPoint)a=h.caretRangeFromPoint(r,o);else{var m=h.caretPositionFromPoint(r,o);m&&((a=h.createRange()).setStart(m.offsetNode,m.offset),a.setEnd(m.offsetNode,m.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));return S.toSlateRange(t,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(t,n,r){var o,i,a,l,c,u=r.exactMatch,d=r.suppressThrow;if((Xa(n)?n.anchorNode:n.startContainer)&&(Xa(n)?(o=n.anchorNode,i=n.anchorOffset,a=n.focusNode,l=n.focusOffset,c=vi&&window.document.activeElement&&window.document.activeElement.shadowRoot?n.anchorNode===n.focusNode&&n.anchorOffset===n.focusOffset:n.isCollapsed):(o=n.startContainer,i=n.startOffset,a=n.endContainer,l=n.endOffset,c=n.collapsed)),o==null||a==null||i==null||l==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(n));var f=S.toSlatePoint(t,[o,i],{exactMatch:u,suppressThrow:d});if(!f)return null;var p=c?f:S.toSlatePoint(t,[a,l],{exactMatch:u,suppressThrow:d});if(!p)return null;var h={anchor:f,focus:p};return j.isExpanded(h)&&j.isForward(h)&&ft(a)&&C.void(t,{at:h.focus,mode:"highest"})&&(h=C.unhangRange(t,h,{voids:!0})),h},toSlatePoint:function(t,n,r){var o,i=r.exactMatch,a=r.suppressThrow,l=$(i?n:(function(b){var x,k=$(b,2),E=k[0],B=k[1];if(ft(E)&&E.childNodes.length){var V=B===E.childNodes.length,T=V?B-1:B;for(E=(x=$(Qa(E,T,V?"backward":"forward"),2))[0],V=(T=x[1])<B;ft(E)&&E.childNodes.length;){var P=V?E.childNodes.length-1:0;E=e0(E,P,V?"backward":"forward")}B=V&&E.textContent!=null?E.textContent.length:0}return[E,B]})(n),2),c=l[0],u=l[1],d=c.parentNode,f=null,p=0;if(d){var h=d.closest('[data-slate-void="true"]'),m=d.closest("[data-slate-leaf]"),g=null,y=S.getWindow(t);if(m&&y.document.createRange){f=m.closest('[data-slate-node="text"]');var v=y.document.createRange();v.setStart(f,0),v.setEnd(c,u);var D=v.cloneContents();ke(ke([],$(fl(D.querySelectorAll("[data-slate-zero-width]"))),!1),$(fl(D.querySelectorAll("[contenteditable=false]"))),!1).forEach((function(b){b.parentNode.removeChild(b)})),p=D.textContent.length,g=f}else h&&((m=h.querySelector("[data-slate-leaf]"))?(f=m.closest('[data-slate-node="text"]'),p=(g=m).textContent.length,g.querySelectorAll("[data-slate-zero-width]").forEach((function(b){p-=b.textContent.length}))):p=1);g&&p===g.textContent.length&&(d.hasAttribute("data-slate-zero-width")||qn&&(!((o=g.textContent)===null||o===void 0)&&o.endsWith(`
|
|
10
|
-
`)))&&(p-=1)}if(!f){if(a)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(n))}var w=S.toSlateNode(t,f);return{path:S.findPath(t,w),offset:p}},hasRange:function(t,n){var r=n.anchor,o=n.focus;return C.hasPath(t,r.path)&&C.hasPath(t,o.path)},getNodeType:function(t){return te.isElement(t)?t.type:""},checkNodeType:function(t,n){return this.getNodeType(t)===n},getNodesStr:function(t){return t.map((function(n){return H.string(n)})).join("")},getSelectedElems:function(t){var n,r,o=[],i=C.nodes(t,{universal:!0});try{for(var a=at(i),l=a.next();!l.done;l=a.next()){var c=$(l.value,1)[0];te.isElement(c)&&o.push(c)}}catch(u){n={error:u}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},getSelectedNodeByType:function(t,n){var r=this,o=$(C.nodes(t,{match:function(a){return r.checkNodeType(a,n)},universal:!0}),1),i=o[0];return i==null?null:i[0]},getSelectedTextNode:function(t){var n=$(C.nodes(t,{match:function(o){return q.isText(o)},universal:!0}),1),r=n[0];return r==null?null:r[0]},isNodeSelected:function(t,n){var r=$(C.nodes(t,{match:function(i){return i===n},universal:!0}),1),o=r[0];return o!=null&&$(o,1)[0]===n},isSelectionAtLineEnd:function(t,n){var r=t.selection;return!!r&&(C.isEnd(t,r.anchor,n)||C.isEnd(t,r.focus,n))},getTextarea:function(t){var n=ti.get(t);if(n==null)throw new Error("Cannot find textarea instance by editor");return n},getToolbar:function(t){return gr.get(t)||null},getHoverbar:function(t){return yr.get(t)||null},normalizeContent:function(t){t.children.forEach((function(n,r){t.normalizeNode([n,[r]])}))},getLeftLengthOfMaxLength:function(t){var n=t.getConfig(),r=n.maxLength,o=n.onMaxLength;if(typeof r!="number"||r<=0)return 1/0;var i=r-t.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return i<=0&&o&&o(t),i},cleanExposedTexNodeInSelectionBlock:function(t){var n,r,o,i,a=S.getTextarea(t).$textArea,l=a?.[0].childNodes;if(l)try{for(var c=at(Array.from(l)),u=c.next();!u.done;u=c.next()){var d=u.value;if(!$t(d))break;d.remove()}}catch(y){n={error:y}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}var f=C.nodes(t,{match:function(y){return!(!te.isElement(y)||t.isInline(y))},universal:!0});try{for(var p=at(f),h=p.next();!h.done;h=p.next()){var m=h.value;if(m!=null){var g=m[0];tl(S.toDOMNode(t,g),(function(y,v){var D=F(v);D.attr("data-slate-string")||D.attr("data-slate-zero-width")||D.attr("data-w-e-reserve")||v.removeChild(y)}))}}}catch(y){o={error:y}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}},isLastNode:function(t,n){var r=t.children||[];return r[r.length-1]===n},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(t){var n,r,o=C.nodes(t,{match:function(c){return t.isVoid(c)}}),i=0;try{for(var a=at(o),l=a.next();!l.done;l=a.next())l.value&&(i+=1)}catch(c){n={error:c}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i>0},isSelectedEmptyParagraph:function(t){var n=t.selection;if(n==null||j.isExpanded(n))return!1;var r=S.getSelectedNodeByType(t,"paragraph");if(r===null)return!1;var o=r.children;return o.length===1&&(o[0].text===""||void 0)},isEmptyPath:function(t,n){var r=C.node(t,n);if(r==null)return!1;var o=$(r,1)[0].children;return o.length===1&&o[0].text===""}};function hl(t,n){return te.isElement(t)?
|
|
8
|
+
`)>=0)return;p&&(p=rl(p),sl(c,p)||c.push({text:p}))}})),c)})(t,n),o=(function(a){for(var l in qr)if(a[0].matches(l))return qr[l];return r0})(t),i=o(t[0],r,n);return Array.isArray(i)||(i=[i]),i.forEach((function(a){C.isVoid(n,a)||(r.length===0&&(a.children=[{text:t.text().replace(/\s+/gm," ")}]),Wr.forEach((function(l){a=l(t[0],a,n)})))})),i}function Un(t,n){t.parents("pre").length===0&&(t[0].innerHTML=t[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,`
|
|
9
|
+
`));var r=t[0].textContent||"";r=(function(i){return i.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')})(r);var o={text:r=rl(r)};return Wr.forEach((function(i){o=i(t[0],o,n)})),o}function Wn(t,n){il.forEach((function(a){var l=a.selector,c=a.preParseHtml;t[0].matches(l)&&(t=F(c(t[0])))}));var r=nl(t);if(r==="span"){if(t.attr("data-w-e-type"))return gi(t,n);if(t[0].childNodes.length>1){var o=t[0].childNodes,i=(function(a,l){var c={text:""};return Wr.forEach((function(u){c=u(a[0],c,l)})),c})(F(t[0]),n);return Array.from(o).flatMap((function(a){var l=(function(c,u,d){var f=c[0];if(ft(f)){var p=Wn(c,d);return Array.isArray(p)?p.map((function(m){return me(me({},u),m)})):[me(me({},u),p)]}if(Za(f))return null;var h=$t(f)?{text:f.textContent||""}:Un(c,d);return[me(me({},u),h)]})(F(a),i,n);return l||[]}))}return Un(t,n)}return r==="code"?nl(t.parent())==="pre"?gi(t,n):Un(t,n):ol.includes(r)?t[0].childNodes.length>0&&t[0].childNodes[0].nodeType!==3?(o=t[0].childNodes,me(me({},Wn(F(o[0]),n)),Un(t,n))):Un(t,n):gi(t,n)}function al(t,n,r){var o=F(r);return!!o.attr(n)||(o.attr(n,"true"),t.on(dt.DESTROYED,(function(){o.removeAttr(n)})),!1)}function ll(t,n){n===void 0&&(n="");var r=[];n===""&&(n="<p><br></p>"),n.indexOf("<")!==0&&(n=n.split(/\n/).map((function(i){return"<p>".concat(i,"</p>")})).join(""));var o=F("<div>".concat(n,"</div>"));return Array.from(o.children()).forEach((function(i){var a=Wn(F(i),t);Array.isArray(a)?a.forEach((function(l){return r.push(l)})):r.push(a)})),r}function cl(t,n){return"w-e-element-".concat(t,"-").concat(n)}var yi=[],bi,ul,dl={};function o0(t,n,r){var o=r.isInline(t)?"span":"div";return"<".concat(o,">").concat(n,"</").concat(o,">")}function i0(t,n){var r=t.type,o=r===void 0?"":r,i=t.children,a=i===void 0?[]:i,l=C.isVoid(n,t),c="";l||(c=a.map((function(y){return hl(y,n)})).join(""));var u=(function(y){return dl[y]||o0})(o),d=u(t,c,n),f="";if(f=typeof d=="string"?d:d.html||"",l||yi.forEach((function(y){return f=y(t,f)})),typeof d=="string")return f;var p=d.prefix,h=p===void 0?"":p,m=d.suffix,g=m===void 0?"":m;return h&&(f=h+f),g&&(f+=g),f}var s0=(function(){if(ul)return bi;ul=1;var t=9007199254740991,n="[object Arguments]",r="[object Function]",o="[object GeneratorFunction]",i="[object Map]",a="[object Promise]",l="[object Set]",c="[object String]",u="[object WeakMap]",d="[object DataView]",f=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,h="\\ud800-\\udfff",m="\\u0300-\\u036f\\ufe20-\\ufe23",g="\\u20d0-\\u20f0",y="\\ufe0e\\ufe0f",v="["+h+"]",D="["+m+g+"]",w="\\ud83c[\\udffb-\\udfff]",b="[^"+h+"]",x="(?:\\ud83c[\\udde6-\\uddff]){2}",k="[\\ud800-\\udbff][\\udc00-\\udfff]",E="\\u200d",B="(?:"+D+"|"+w+")?",V="["+y+"]?",T=V+B+("(?:"+E+"(?:"+[b,x,k].join("|")+")"+V+B+")*"),P="(?:"+[b+D+"?",D,x,k,v].join("|")+")",R=RegExp(w+"(?="+w+")|"+P+T,"g"),I=RegExp("["+E+h+m+g+y+"]"),U=typeof qe=="object"&&qe&&qe.Object===Object&&qe,G=typeof self=="object"&&self&&self.Object===Object&&self,W=U||G||Function("return this")();function K(z,ee){return(function(ae,he){for(var Se=-1,$e=ae?ae.length:0,Ze=Array($e);++Se<$e;)Ze[Se]=he(ae[Se],Se,ae);return Ze})(ee,(function(ae){return z[ae]}))}function X(z){var ee=-1,ae=Array(z.size);return z.forEach((function(he,Se){ae[++ee]=[Se,he]})),ae}function oe(z){var ee=-1,ae=Array(z.size);return z.forEach((function(he){ae[++ee]=he})),ae}function re(z){return(function(ee){return I.test(ee)})(z)?(function(ee){return ee.match(R)||[]})(z):(function(ee){return ee.split("")})(z)}var ie,ce,Q,xe=Function.prototype,ge=Object.prototype,Je=W["__core-js_shared__"],Ge=(ie=/[^.]+$/.exec(Je&&Je.keys&&Je.keys.IE_PROTO||""))?"Symbol(src)_1."+ie:"",Ne=xe.toString,Ce=ge.hasOwnProperty,_e=ge.toString,Me=RegExp("^"+Ne.call(Ce).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nt=W.Symbol,rt=nt?nt.iterator:void 0,et=ge.propertyIsEnumerable,ot=(ce=Object.keys,Q=Object,function(z){return ce(Q(z))}),Re=Pe(W,"DataView"),mt=Pe(W,"Map"),He=Pe(W,"Promise"),ze=Pe(W,"Set"),Dt=Pe(W,"WeakMap"),Nt=Le(Re),jt=Le(mt),ue=Le(He),le=Le(ze),ve=Le(Dt);function Ee(z,ee){var ae=Bt(z)||(function(Ze){return(function(St){return J(St)&&A(St)})(Ze)&&Ce.call(Ze,"callee")&&(!et.call(Ze,"callee")||_e.call(Ze)==n)})(z)?(function(Ze,St){for(var Pt=-1,po=Array(Ze);++Pt<Ze;)po[Pt]=St(Pt);return po})(z.length,String):[],he=ae.length,Se=!!he;for(var $e in z)!Ce.call(z,$e)||Se&&($e=="length"||Te($e,he))||ae.push($e);return ae}function Ue(z){if(!Y(z)||(function(ae){return!!Ge&&Ge in ae})(z))return!1;var ee=L(z)||(function(ae){var he=!1;if(ae!=null&&typeof ae.toString!="function")try{he=!!(ae+"")}catch{}return he})(z)?Me:f;return ee.test(Le(z))}function Ve(z){if(ae=(ee=z)&&ee.constructor,he=typeof ae=="function"&&ae.prototype||ge,ee!==he)return ot(z);var ee,ae,he,Se=[];for(var $e in Object(z))Ce.call(z,$e)&&$e!="constructor"&&Se.push($e);return Se}function Pe(z,ee){var ae=(function(he,Se){return he?.[Se]})(z,ee);return Ue(ae)?ae:void 0}var Ye=function(z){return _e.call(z)};function Te(z,ee){return!!(ee=ee??t)&&(typeof z=="number"||p.test(z))&&z>-1&&z%1==0&&z<ee}function Le(z){if(z!=null){try{return Ne.call(z)}catch{}try{return z+""}catch{}}return""}(Re&&Ye(new Re(new ArrayBuffer(1)))!=d||mt&&Ye(new mt)!=i||He&&Ye(He.resolve())!=a||ze&&Ye(new ze)!=l||Dt&&Ye(new Dt)!=u)&&(Ye=function(z){var ee=_e.call(z),ae=ee=="[object Object]"?z.constructor:void 0,he=ae?Le(ae):void 0;if(he)switch(he){case Nt:return d;case jt:return i;case ue:return a;case le:return l;case ve:return u}return ee});var Bt=Array.isArray;function A(z){return z!=null&&(function(ee){return typeof ee=="number"&&ee>-1&&ee%1==0&&ee<=t})(z.length)&&!L(z)}function L(z){var ee=Y(z)?_e.call(z):"";return ee==r||ee==o}function Y(z){var ee=typeof z;return!!z&&(ee=="object"||ee=="function")}function J(z){return!!z&&typeof z=="object"}function be(z){return z?K(z,(function(ee){return A(ee)?Ee(ee):Ve(ee)})(z)):[]}return bi=function(z){if(!z)return[];if(A(z))return(function(ae){return typeof ae=="string"||!Bt(ae)&&J(ae)&&_e.call(ae)==c})(z)?re(z):(function(ae,he){var Se=-1,$e=ae.length;for(he||(he=Array($e));++Se<$e;)he[Se]=ae[Se];return he})(z);if(rt&&z[rt])return(function(ae){for(var he,Se=[];!(he=ae.next()).done;)Se.push(he.value);return Se})(z[rt]());var ee=Ye(z);return(ee==i?X:ee==l?oe:be)(z)},bi})(),fl=qt(s0),a0=0,pl=function(){this.id="".concat(a0++)},Ci=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),qn=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),wn=typeof navigator<"u"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),l0=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),c0=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),vi=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),Kn=!c0&&!l0&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",S={getWindow:function(t){var n=Ma.get(t);if(!n)throw new Error("Unable to find a host window element for this editor");return n},findKey:function(t,n){var r=Dr.get(n);return r||(r=new pl,Dr.set(n,r)),r},setNewKey:function(t){var n=new pl;Dr.set(t,n)},findPath:function(t,n){for(var r=[],o=n;;){var i=bn.get(o);if(i==null){if(C.isEditor(o))return r;break}var a=In.get(o);if(a==null)break;r.unshift(a),o=i}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(n)))},findDocumentOrShadowRoot:function(t){if(t.isDestroyed)return window.document;var n=S.toDOMNode(t,t),r=n.getRootNode();return Hn(r)!=="[object HTMLDocument]"&&!(function(o){return Hn(o)==="[object ShadowRoot]"})(r)||Reflect.get(r,"getSelection")==null?n.ownerDocument:r},getParentNode:function(t,n){return bn.get(n)||null},getParentsNodes:function(t,n){for(var r=[],o=n;o!==t&&o!=null;){var i=S.getParentNode(t,o);if(i==null)break;r.push(i),o=i}return r},getTopNode:function(t,n){var r=[S.findPath(t,n)[0]];return H.get(t,r)},toDOMNode:function(t,n){var r;if(C.isEditor(n))r=ai.get(t);else{var o=S.findKey(t,n);r=li.get(o)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(n)));return r},hasDOMNode:function(t,n,r){r===void 0&&(r={});var o,i=r.editable,a=i!==void 0&&i,l=S.toDOMNode(t,t);try{o=ft(n)?n:n.parentElement}catch(c){if(c instanceof Error&&!c.message.includes('Permission denied to access property "nodeType"'))throw c}return!!o&&(o.closest("[data-slate-editor]")===l&&(!a||o.isContentEditable||!!o.getAttribute("data-slate-zero-width"))||!!o.getAttribute("data-slate-string"))},toDOMRange:function(t,n){var r=n.anchor,o=n.focus,i=j.isBackward(n),a=S.toDOMPoint(t,r),l=j.isCollapsed(n)?a:S.toDOMPoint(t,o),c=S.getWindow(t).document.createRange(),u=$(i?l:a,2),d=u[0],f=u[1],p=$(i?a:l,2),h=p[0],m=p[1],g=!!(ft(d)?d:d.parentElement).getAttribute("data-slate-zero-width"),y=!!(ft(h)?h:h.parentElement).getAttribute("data-slate-zero-width");return c.setStart(d,g?1:f),c.setEnd(h,y?1:m),c},toDOMPoint:function(t,n){var r,o,i,a=$(C.node(t,n.path),1)[0],l=S.toDOMNode(t,a);C.void(t,{at:n})&&(n={path:n.path,offset:0});var c=Array.from(l.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var d=at(c),f=d.next();!f.done;f=d.next()){var p=f.value,h=p.childNodes[0];if(h!=null&&h.textContent!=null){var m=h.textContent.length,g=p.getAttribute("data-slate-length"),y=u+(g==null?m:parseInt(g,10));if(n.offset<=y){i=[h,Math.min(m,Math.max(0,n.offset-u))];break}u=y}}}catch(v){r={error:v}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(n)));return i},toSlateNode:function(t,n){var r=ft(n)?n:n.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var o=r?Cr.get(r):null;if(!o)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return o},findEventRange:function(t,n){"nativeEvent"in n&&(n=n.nativeEvent);var r=n.clientX,o=n.clientY,i=n.target;if(r==null||o==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));var a,l=S.toSlateNode(t,n.target),c=S.findPath(t,l);if(C.isVoid(t,l)){var u=i.getBoundingClientRect(),d=t.isInline(l)?r-u.left<u.left+u.width-r:o-u.top<u.top+u.height-o,f=C.point(t,c,{edge:d?"start":"end"}),p=d?C.before(t,f):C.after(t,f);if(p)return C.range(t,p)}var h=this.getWindow(t).document;if(h.caretRangeFromPoint)a=h.caretRangeFromPoint(r,o);else{var m=h.caretPositionFromPoint(r,o);m&&((a=h.createRange()).setStart(m.offsetNode,m.offset),a.setEnd(m.offsetNode,m.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));return S.toSlateRange(t,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(t,n,r){var o,i,a,l,c,u=r.exactMatch,d=r.suppressThrow;if((Xa(n)?n.anchorNode:n.startContainer)&&(Xa(n)?(o=n.anchorNode,i=n.anchorOffset,a=n.focusNode,l=n.focusOffset,c=vi&&window.document.activeElement&&window.document.activeElement.shadowRoot?n.anchorNode===n.focusNode&&n.anchorOffset===n.focusOffset:n.isCollapsed):(o=n.startContainer,i=n.startOffset,a=n.endContainer,l=n.endOffset,c=n.collapsed)),o==null||a==null||i==null||l==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(n));var f=S.toSlatePoint(t,[o,i],{exactMatch:u,suppressThrow:d});if(!f)return null;var p=c?f:S.toSlatePoint(t,[a,l],{exactMatch:u,suppressThrow:d});if(!p)return null;var h={anchor:f,focus:p};return j.isExpanded(h)&&j.isForward(h)&&ft(a)&&C.void(t,{at:h.focus,mode:"highest"})&&(h=C.unhangRange(t,h,{voids:!0})),h},toSlatePoint:function(t,n,r){var o,i=r.exactMatch,a=r.suppressThrow,l=$(i?n:(function(b){var x,k=$(b,2),E=k[0],B=k[1];if(ft(E)&&E.childNodes.length){var V=B===E.childNodes.length,T=V?B-1:B;for(E=(x=$(Qa(E,T,V?"backward":"forward"),2))[0],V=(T=x[1])<B;ft(E)&&E.childNodes.length;){var P=V?E.childNodes.length-1:0;E=t0(E,P,V?"backward":"forward")}B=V&&E.textContent!=null?E.textContent.length:0}return[E,B]})(n),2),c=l[0],u=l[1],d=c.parentNode,f=null,p=0;if(d){var h=d.closest('[data-slate-void="true"]'),m=d.closest("[data-slate-leaf]"),g=null,y=S.getWindow(t);if(m&&y.document.createRange){f=m.closest('[data-slate-node="text"]');var v=y.document.createRange();v.setStart(f,0),v.setEnd(c,u);var D=v.cloneContents();ke(ke([],$(fl(D.querySelectorAll("[data-slate-zero-width]"))),!1),$(fl(D.querySelectorAll("[contenteditable=false]"))),!1).forEach((function(b){b.parentNode.removeChild(b)})),p=D.textContent.length,g=f}else h&&((m=h.querySelector("[data-slate-leaf]"))?(f=m.closest('[data-slate-node="text"]'),p=(g=m).textContent.length,g.querySelectorAll("[data-slate-zero-width]").forEach((function(b){p-=b.textContent.length}))):p=1);g&&p===g.textContent.length&&(d.hasAttribute("data-slate-zero-width")||qn&&(!((o=g.textContent)===null||o===void 0)&&o.endsWith(`
|
|
10
|
+
`)))&&(p-=1)}if(!f){if(a)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(n))}var w=S.toSlateNode(t,f);return{path:S.findPath(t,w),offset:p}},hasRange:function(t,n){var r=n.anchor,o=n.focus;return C.hasPath(t,r.path)&&C.hasPath(t,o.path)},getNodeType:function(t){return te.isElement(t)?t.type:""},checkNodeType:function(t,n){return this.getNodeType(t)===n},getNodesStr:function(t){return t.map((function(n){return H.string(n)})).join("")},getSelectedElems:function(t){var n,r,o=[],i=C.nodes(t,{universal:!0});try{for(var a=at(i),l=a.next();!l.done;l=a.next()){var c=$(l.value,1)[0];te.isElement(c)&&o.push(c)}}catch(u){n={error:u}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},getSelectedNodeByType:function(t,n){var r=this,o=$(C.nodes(t,{match:function(a){return r.checkNodeType(a,n)},universal:!0}),1),i=o[0];return i==null?null:i[0]},getSelectedTextNode:function(t){var n=$(C.nodes(t,{match:function(o){return q.isText(o)},universal:!0}),1),r=n[0];return r==null?null:r[0]},isNodeSelected:function(t,n){var r=$(C.nodes(t,{match:function(i){return i===n},universal:!0}),1),o=r[0];return o!=null&&$(o,1)[0]===n},isSelectionAtLineEnd:function(t,n){var r=t.selection;return!!r&&(C.isEnd(t,r.anchor,n)||C.isEnd(t,r.focus,n))},getTextarea:function(t){var n=ti.get(t);if(n==null)throw new Error("Cannot find textarea instance by editor");return n},getToolbar:function(t){return gr.get(t)||null},getHoverbar:function(t){return yr.get(t)||null},normalizeContent:function(t){t.children.forEach((function(n,r){t.normalizeNode([n,[r]])}))},getLeftLengthOfMaxLength:function(t){var n=t.getConfig(),r=n.maxLength,o=n.onMaxLength;if(typeof r!="number"||r<=0)return 1/0;var i=r-t.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return i<=0&&o&&o(t),i},cleanExposedTexNodeInSelectionBlock:function(t){var n,r,o,i,a=S.getTextarea(t).$textArea,l=a?.[0].childNodes;if(l)try{for(var c=at(Array.from(l)),u=c.next();!u.done;u=c.next()){var d=u.value;if(!$t(d))break;d.remove()}}catch(y){n={error:y}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}var f=C.nodes(t,{match:function(y){return!(!te.isElement(y)||t.isInline(y))},universal:!0});try{for(var p=at(f),h=p.next();!h.done;h=p.next()){var m=h.value;if(m!=null){var g=m[0];tl(S.toDOMNode(t,g),(function(y,v){var D=F(v);D.attr("data-slate-string")||D.attr("data-slate-zero-width")||D.attr("data-w-e-reserve")||v.removeChild(y)}))}}}catch(y){o={error:y}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}},isLastNode:function(t,n){var r=t.children||[];return r[r.length-1]===n},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(t){var n,r,o=C.nodes(t,{match:function(c){return t.isVoid(c)}}),i=0;try{for(var a=at(o),l=a.next();!l.done;l=a.next())l.value&&(i+=1)}catch(c){n={error:c}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i>0},isSelectedEmptyParagraph:function(t){var n=t.selection;if(n==null||j.isExpanded(n))return!1;var r=S.getSelectedNodeByType(t,"paragraph");if(r===null)return!1;var o=r.children;return o.length===1&&(o[0].text===""||void 0)},isEmptyPath:function(t,n){var r=C.node(t,n);if(r==null)return!1;var o=$(r,1)[0].children;return o.length===1&&o[0].text===""}};function hl(t,n){return te.isElement(t)?i0(t,n):(function(r,o){var i=r.text;if(i==null)throw new Error("Current node is not slate Text ".concat(JSON.stringify(r)));var a=i;a=(function(u){return u.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")})(a);var l=S.getParentsNodes(o,r).some((function(u){return S.getNodeType(u)==="pre"}));if(l||(a=a.replace(/\n\r|\r\n|\r|\n/g,"<br>")),l&&(a=a.replace(/ /g," ")),a===""){var c=S.getParentNode(null,r);if(!c||c.children.length!==0)return a;a="<br>"}return yi.forEach((function(u){return a=u(r,a)})),a})(t,n)}var ml=function(t,n){var r=(n.top+n.bottom)/2;return t.top<=r&&t.bottom>=r},gl=function(t,n,r){var o=S.toDOMRange(t,n).getBoundingClientRect(),i=S.toDOMRange(t,r).getBoundingClientRect();return ml(o,i)&&ml(i,o)};function yl(t,n){t.isInline(n)?(t.insertNode(n),n.type==="link"&&t.insertFragment([{text:""}])):O.insertNodes(t,n,{mode:"highest"})}var bl,Cl,vl,Dl,wl,xl,Bl,kl,El,_l,Al,Nl,Sl,Fl,Vl,Ol,Di,Tl,jl,Pl,Ll,Ml,zl,$l,wi,Il,Rl,Hl,xi,Ul,Wl,ql,Bi,Kl,Jl,Gl,Yl,Zl,Xl,Ql,u0=function(t){var n=t,r=n.onChange,o=n.insertText,i=n.apply,a=n.deleteBackward;return n.insertText=function(l){n.getConfig().readOnly||o(l)},n.apply=function(l){var c,u,d,f,p,h,m,g,y=[];switch(l.type){case"insert_text":case"remove_text":case"set_node":try{for(var v=at(C.levels(n,{at:l.path})),D=v.next();!D.done;D=v.next()){var w=$(D.value,2),b=w[0],x=w[1],k=S.findKey(n,b);y.push([x,k])}}catch(W){c={error:W}}finally{try{D&&!D.done&&(u=v.return)&&u.call(v)}finally{if(c)throw c.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var E=at(C.levels(n,{at:_.parent(l.path)})),B=E.next();!B.done;B=E.next()){var V=$(B.value,2);b=V[0],x=V[1],k=S.findKey(n,b),y.push([x,k])}}catch(W){d={error:W}}finally{try{B&&!B.done&&(f=E.return)&&f.call(E)}finally{if(d)throw d.error}}break;case"move_node":try{for(var T=at(C.levels(n,{at:_.common(_.parent(l.path),_.parent(l.newPath))})),P=T.next();!P.done;P=T.next()){var R=$(P.value,2);b=R[0],x=R[1],k=S.findKey(n,b),y.push([x,k])}}catch(W){p={error:W}}finally{try{P&&!P.done&&(h=T.return)&&h.call(T)}finally{if(p)throw p.error}}}i(l);try{for(var I=at(y),U=I.next();!U.done;U=I.next()){var G=$(U.value,2);x=G[0],k=G[1],b=$(C.node(n,x),1)[0],Dr.set(b,k)}}catch(W){m={error:W}}finally{try{U&&!U.done&&(g=I.return)&&g.call(I)}finally{if(m)throw m.error}}},n.deleteBackward=function(l){if(l!=="line")return a(l);if(t.selection&&j.isCollapsed(t.selection)){var c=C.above(t,{match:function(p){return C.isBlock(t,p)},at:t.selection});if(c){var u=$(c,2)[1],d=C.range(t,u,t.selection.anchor),f=(function(p,h){var m=C.range(p,j.end(h)),g=Array.from(C.positions(p,{at:h})),y=0,v=g.length,D=Math.floor(v/2);if(gl(p,C.range(p,g[y]),m))return C.range(p,g[y],m);if(g.length<2)return C.range(p,g[g.length-1],m);for(;D!==g.length&&D!==y;)gl(p,C.range(p,g[D]),m)?v=D:y=D,D=Math.floor((y+v)/2);return C.range(p,g[v],m)})(n,d);j.isCollapsed(f)||O.delete(t,{at:f})}}},n.onChange=function(){var l=n.selection;l!=null&&ci.set(n,l),n.emit("change"),r()},n.handleTab=function(){n.insertText(" ")},n.getHtml=function(){var l=n.children;return(l===void 0?[]:l).map((function(c){return hl(c,n)})).join("")},n.getText=function(){var l=n.children;return(l===void 0?[]:l).map((function(c){return H.string(c)})).join(`
|
|
11
11
|
`)},n.getSelectionText=function(){var l=n.selection;return l==null?"":C.string(t,l)},n.getElemsByType=function(l,c){var u,d;c===void 0&&(c=!1);var f=[],p=C.nodes(n,{at:[],universal:!0});try{for(var h=at(p),m=h.next();!m.done;m=h.next()){var g=$(m.value,1)[0];if(te.isElement(g)&&(c?g.type.indexOf(l)>=0:g.type===l)){var y=S.findKey(n,g),v=cl(g.type,y.id);f.push(me(me({},g),{id:v}))}}}catch(D){u={error:D}}finally{try{m&&!m.done&&(d=h.return)&&d.call(h)}finally{if(u)throw u.error}}return f},n.getElemsByTypePrefix=function(l){return n.getElemsByType(l,!0)},n.isEmpty=function(){var l=n.children,c=l===void 0?[]:l;if(c.length>1)return!1;var u=c[0];if(u==null)return!0;if(!te.isElement(u)||u.type!=="paragraph")return!1;var d=u.children,f=d===void 0?[]:d;if(f.length>1)return!1;var p=f[0];return p==null||q.isText(p)&&p.text===""},n.clear=function(){O.delete(n,{at:{anchor:C.start(n,[]),focus:C.end(n,[])}}),n.children.length===0&&O.insertNodes(n,[{type:"paragraph",children:[{text:""}]}])},n.getParentNode=function(l){return S.getParentNode(n,l)},n.dangerouslyInsertHtml=function(l,c){if(l===void 0&&(l=""),c===void 0&&(c=!1),l){var u=document.createElement("div");u.innerHTML=l;var d=Array.from(u.childNodes);if(d=d.filter((function(m){var g=m.nodeName;return!!$t(m)||!!ft(m)&&!Ia.has(g.toLowerCase())})),d.length!==0){var f=n.selection;if(f!=null){var p=null;S.isSelectedEmptyParagraph(n)&&!c&&(p=[f.focus.path[0]]),u.setAttribute("hidden","true"),document.body.appendChild(u);var h=0;d.forEach((function(m,g){var y=m.nodeName,v=m.textContent,D=v===void 0?"":v;if($t(m)){if(!D||!D.trim())return;n.insertNode({text:D})}else if(y!=="BR"){var w=m,b=!1;if(ol.includes(y.toLowerCase()))b=!0;else for(var x in qr)if(w.matches(x)){b=!0;break}if(b){var k=Wn(F(w),n);return Array.isArray(k)?(k.forEach((function(B){return yl(n,B)})),h+=1):(yl(n,k),h+=1),void(S.isSelectedVoidNode(n)&&n.move(1))}var E=window.getComputedStyle(w).display;!S.isSelectedEmptyParagraph(n)&&E.indexOf("inline")<0&&(g>=1&&(function(B){return"matches"in B&&/^[ou]l$/i.test(B.tagName)&&!B.hasAttribute("data-w-e-type")})(d[g-1])&&n.insertBreak(),n.insertBreak()),n.dangerouslyInsertHtml(w.innerHTML,!0)}else n.insertText(`
|
|
12
|
-
`)})),h&&p&&S.isEmptyPath(n,p)&&O.removeNodes(n,{at:p}),u.remove()}}}},n.setHtml=function(l){l===void 0&&(l="");var c=n.isDisabled(),u=n.isFocused(),d=JSON.stringify(n.selection);n.enable(),n.focus(),n.clear();var f=ll(n,l??"");if(O.insertFragment(n,f),u||(n.deselect(),n.blur()),c&&(n.deselect(),n.disable()),n.isFocused())try{n.select(JSON.parse(d))}catch{n.select(C.start(n,[]))}},n},
|
|
12
|
+
`)})),h&&p&&S.isEmptyPath(n,p)&&O.removeNodes(n,{at:p}),u.remove()}}}},n.setHtml=function(l){l===void 0&&(l="");var c=n.isDisabled(),u=n.isFocused(),d=JSON.stringify(n.selection);n.enable(),n.focus(),n.clear();var f=ll(n,l??"");if(O.insertFragment(n,f),u||(n.deselect(),n.blur()),c&&(n.deselect(),n.disable()),n.isFocused())try{n.select(JSON.parse(d))}catch{n.select(C.start(n,[]))}},n},d0=1,f0=function(t){var n=t;return n.id="wangEditor-".concat(d0++),n.isDestroyed=!1,n.isFullScreen=!1,n.focus=function(r){if(S.toDOMNode(n,n).focus({preventScroll:!0}),tn.set(n,!0),r){var o=C.end(n,[]);O.select(n,o)}else{var i=ci.get(n);i?O.select(n,i):O.select(n,C.start(n,[]))}},n.isFocused=function(){return!!tn.get(n)},n.blur=function(){S.toDOMNode(n,n).blur(),O.deselect(n),tn.set(n,!1)},n.updateView=function(){S.getTextarea(n).changeViewState();var r=S.getToolbar(n);r&&r.changeToolbarState();var o=S.getHoverbar(n);o&&o.changeHoverbarState()},n.destroy=function(){if(!n.isDestroyed){var r=S.getTextarea(n);r.destroy(),ti.delete(n),ni.delete(r);var o=S.getToolbar(n);o&&(o.destroy(),gr.delete(n),ri.delete(o));var i=S.getHoverbar(n);i&&(i.destroy(),yr.delete(n),oi.delete(i)),n.isDestroyed=!0,n.emit("destroyed")}},n.scrollToElem=function(r){if(!n.getConfig().scroll){var o="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return o+=`
|
|
13
13
|
You has disabled editor scroll, please do this yourself`,void console.warn(o)}var i=F("#".concat(r));if(i.length!==0){var a=i[0];if(!S.hasDOMNode(n,a))return o="Element (found by id is '".concat(r,"') is not in editor DOM"),o+=`
|
|
14
14
|
通过 id '`.concat(r,"' 找到的 element 不在 editor DOM 之内"),void console.error(o,a);var l=S.getTextarea(n),c=l.$textAreaContainer,u=l.$scroll,d=i.offset().top,f=c.offset().top;u[0].scrollBy({top:d-f,behavior:"smooth"})}},n.showProgressBar=function(r){r<1||S.getTextarea(n).changeProgress(r)},n.hidePanelOrModal=function(){var r=si.get(n);r?.forEach((function(o){return o.hide()}))},n.enable=function(){n.getConfig().readOnly=!1,n.updateView()},n.disable=function(){n.getConfig().readOnly=!0,n.updateView()},n.isDisabled=function(){return n.getConfig().readOnly},n.toDOMNode=function(r){return S.toDOMNode(n,r)},n.fullScreen=function(){if(!n.isFullScreen){var r=null,o=S.getToolbar(n);o&&(r=o.$box);var i=S.getTextarea(n).$box.parent();if(r&&r.parent()[0]!==i[0])throw new Error(`Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent
|
|
15
|
-
不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致`);i.addClass("w-e-full-screen-container");var a=i.css("z-index");i.attr("data-z-index",a.toString()),n.isFullScreen=!0,n.emit("fullScreen")}},n.unFullScreen=function(){if(n.isFullScreen){var r=S.getTextarea(n).$box.parent();setTimeout((function(){r.removeClass("w-e-full-screen-container"),n.isFullScreen=!1,n.emit("unFullScreen")}),200)}},n.getEditableContainer=function(){return S.getTextarea(n).$textAreaContainer[0]},n},ki={exports:{}},Ei={exports:{}};function ec(){return Cl?bl:(Cl=1,bl=function(t){return t!=null})}function
|
|
16
|
-
`:""})),$t(p)){var y=p.ownerDocument.createElement("span");y.style.whiteSpace="pre",y.appendChild(p),f.appendChild(y),p=y}var v=n.getFragment(),D=JSON.stringify(v),w=window.btoa(encodeURIComponent(D));p.setAttribute("data-slate-fragment",w),r.setData("application/x-slate-fragment",w);var b=f.ownerDocument.createElement("div");return b.appendChild(f),b.setAttribute("hidden","true"),f.ownerDocument.body.appendChild(b),r.setData("text/html",b.innerHTML),r.setData("text/plain",el(b)),f.ownerDocument.body.removeChild(b),r}}},n.insertData=function(r){return gn(void 0,void 0,void 0,(function(){var o,i,a,l,c,u,d,f,p,h,m,g,y,v,D;return yn(this,(function(w){switch(w.label){case 0:return(o=r.getData("application/x-slate-fragment"))?(i=decodeURIComponent(window.atob(o)),a=JSON.parse(i),n.insertFragment(a),[2]):(l=r.getData("text/plain"),c=r.getData("text/html"),wn?(u=(function(b){var x=b.match(/<img[^>]*src=["'](blob:[^"']+)["'][^>]*>/i);return x?x[1]:null})(c),u?[4,w0(u)]:[3,2]):[3,2]);case 1:(d=w.sent())&&(c='<img src="'.concat(d,'" alt="image.png">'),URL.revokeObjectURL(u)),w.label=2;case 2:if(c)return n.dangerouslyInsertHtml(c),[2];if(f=S.getLeftLengthOfMaxLength(n),l){p=l.split(/\n\r|\r\n|\r|\n/),h=!1;try{for(m=at(p),g=m.next();!g.done;g=m.next())y=g.value,h&&f>0&&O.splitNodes(n,{always:!0}),n.insertText(y),h=!0}catch(b){v={error:b}}finally{try{g&&!g.done&&(D=m.return)&&D.call(m)}finally{if(v)throw v.error}}}return[2]}}))}))},n},B0=function(t){var n=t,r=n.insertText,o=n.insertNode,i=n.insertFragment,a=n.dangerouslyInsertHtml;return n.insertText=function(l){if(n.getConfig().maxLength){var c=S.getLeftLengthOfMaxLength(n);c<=0||(c<l.length?r(l.slice(0,c)):r(l))}else r(l)},n.insertNode=function(l){if(n.getConfig().maxLength){var c=S.getLeftLengthOfMaxLength(n);c<=0||c<H.string(l).length||o(l)}else o(l)},n.insertFragment=function(l){if(n.getConfig().maxLength){if(l.length>0){var c=l[0];if(S.getLeftLengthOfMaxLength(n)<H.string(c).length)return;i([c]);for(var u=1;u<l.length;u+=1)n.insertNode(l[u])}}else i(l)},n.dangerouslyInsertHtml=function(l,c){if(l===void 0&&(l=""),c===void 0&&(c=!1),l)if(n.getConfig().maxLength){var u=S.getLeftLengthOfMaxLength(n);if(!(u<=0)){var d=document.createElement("div");d.innerHTML=l,u<Array.from(d.childNodes).reduce((function(f,p){var h=p.nodeName;return p?$t(p)?f+(p.textContent||""):ft(p)?Ia.has(h.toLowerCase())?f:f+(p.textContent||""):f:f}),"").length||a(l,c)}}else a(l,c)},n};function Ai(t){var n=S.getTextarea(t).$textAreaContainer,r=n.width(),o=n.height(),i=n.offset();return{top:i.top,left:i.left,width:r,height:o}}function Ni(t){var n={top:"0",left:"0"},r=t.selection;if(r==null)return n;var o=Ai(t);if(o==null)return n;var i=o.top,a=o.left,l=o.width,c=o.height,u=S.toDOMRange(t,r),d=u.getClientRects?u.getClientRects()[0]:null;if(d==null)return n;var f=d.height,p={},h=d.top-i,m=d.left-a;if(m>l/2){var g=l-m;p.right="".concat(g+5,"px")}else p.left="".concat(m+5,"px");if(h>c/2){var y=c-h;p.bottom="".concat(y+5,"px")}else{var v=h+f;v<0&&(v=0),p.top="".concat(v+5,"px")}return p}function Si(t,n,r){r===void 0&&(r="modal");var o={top:"0",left:"0"};if(t.selection==null)return o;var i=te.isElement(n)&&t.isVoid(n),a=te.isElement(n)&&t.isInline(n),l=vr.get(n);if(l==null)return o;var c=l.getBoundingClientRect(),u=c.top,d=c.left,f=c.height,p=c.width;if(i){var h=(function(B){var V=[];V.push(B);for(var T=0;V.length>0;){var P=V.pop();if(P==null||(T+=1)>1e4)break;var R=P.nodeName;if(P.nodeType===Ot.ELEMENT_NODE){var I=R.toLowerCase();if(Zg.includes(I)||I==="iframe"||I==="video")return P;var U=P.children||[],G=U.length;if(G)for(var W=G-1;W>=0;W-=1)V.push(U[W])}}return null})(l);if(h!=null){var m=h.getBoundingClientRect();u=m.top,f=m.height}}var g=Ai(t);if(g==null)return o;var y=g.top,v=g.left,D=g.width,w=g.height,b={},x=u-y,k=d-v;if(r==="bar")return b.left="".concat(k,"px"),x>40?b.bottom="".concat(w-x+5,"px"):b.top="".concat(x+f+5,"px"),b;if(r==="modal"){if(i?a?k>(D-p)/2?b.right="".concat(D-k+5,"px"):b.left="".concat(k+p+5,"px"):b.left="20px":b.left="".concat(k,"px"),i)(E=x)<0&&(E=0),b.top="".concat(E,"px");else if(x>(w-f)/2)b.bottom="".concat(w-x+5,"px");else{var E;(E=x+f)<0&&(E=0),b.top="".concat(E+5,"px")}return b}throw new Error("type '".concat(r,"' is invalid"))}function Fi(t,n){wt((function(){var r=Ai(t);if(r!=null){var o,i=r.top,a=r.left,l=r.width,c=r.height,u=n.offset(),d=u.top,f=u.left,p=n.width(),h=n.height(),m=d-i,g=f-a,y=n.attr("style");if(y.indexOf("top")>=0&&(o=m+h-c)>0){var v=n.css("top"),D=parseInt(v.toString(),10)-o;D<0&&(D=0),n.css("top","".concat(D,"px"))}if(y.indexOf("bottom")>=0&&d<0){var w=n.css("bottom"),b=parseInt(w.toString(),10)-Math.abs(d);n.css("bottom","".concat(b,"px"))}if(y.indexOf("left")>=0&&(o=g+p-l)>0){var x=n.css("left"),k=parseInt(x.toString(),10)-o;k<0&&(k=0),n.css("left","".concat(k,"px"))}if(y.indexOf("right")>=0&&f<0){var E=n.css("right"),B=parseInt(E.toString(),10)-Math.abs(f);n.css("right","".concat(B,"px"))}}}))}var Vi,nc,k0=function(t){var n=t;return n.select=function(r){O.select(n,r)},n.deselect=function(){var r=n.selection,o=S.findDocumentOrShadowRoot(n).getSelection();o&&o.rangeCount>0&&o.removeAllRanges(),r&&O.deselect(t)},n.move=function(r,o){o===void 0&&(o=!1),r&&(r<0||O.move(t,{distance:r,unit:"character",reverse:o}))},n.moveReverse=function(r){n.move(r,!0)},n.restoreSelection=function(){var r=ci.get(n);r!=null&&(n.focus(),O.select(n,r))},n.getSelectionPosition=function(){return Ni(n)},n.getNodePosition=function(r){return Si(n,r)},n.isSelectedAll=function(){var r=n.selection;if(r==null)return!1;var o=$(j.edges(r),2),i=o[0],a=o[1],l=$(C.edges(n,[]),2),c=l[0],u=l[1];return!(!ye.equals(i,c)||!ye.equals(a,u))},n.selectAll=function(){var r=C.start(n,[]),o=C.end(n,[]);O.select(n,{anchor:r,focus:o})},n},E0=(function(){if(nc)return Vi;nc=1;var t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,c=typeof qe=="object"&&qe&&qe.Object===Object&&qe,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),f=Object.prototype.toString,p=Math.max,h=Math.min,m=function(){return d.Date.now()};function g(v){var D=typeof v;return!!v&&(D=="object"||D=="function")}function y(v){if(typeof v=="number")return v;if((function(b){return typeof b=="symbol"||(function(x){return!!x&&typeof x=="object"})(b)&&f.call(b)==n})(v))return t;if(g(v)){var D=typeof v.valueOf=="function"?v.valueOf():v;v=g(D)?D+"":D}if(typeof v!="string")return v===0?v:+v;v=v.replace(r,"");var w=i.test(v);return w||a.test(v)?l(v.slice(2),w?2:8):o.test(v)?t:+v}return Vi=function(v,D,w){var b,x,k,E,B,V,T=0,P=!1,R=!1,I=!0;if(typeof v!="function")throw new TypeError("Expected a function");function U(oe){var re=b,ie=x;return b=x=void 0,T=oe,E=v.apply(ie,re)}function G(oe){var re=oe-V;return V===void 0||re>=D||re<0||R&&oe-T>=k}function W(){var oe=m();if(G(oe))return K(oe);B=setTimeout(W,(function(re){var ie=D-(re-V);return R?h(ie,k-(re-T)):ie})(oe))}function K(oe){return B=void 0,I&&b?U(oe):(b=x=void 0,E)}function X(){var oe=m(),re=G(oe);if(b=arguments,x=this,V=oe,re){if(B===void 0)return(function(ie){return T=ie,B=setTimeout(W,D),P?U(ie):E})(V);if(R)return B=setTimeout(W,D),U(V)}return B===void 0&&(B=setTimeout(W,D)),E}return D=y(D)||0,g(w)&&(P=!!w.leading,k=(R="maxWait"in w)?p(y(w.maxWait)||0,D):k,I="trailing"in w?!!w.trailing:I),X.cancel=function(){B!==void 0&&clearTimeout(B),T=0,b=V=x=B=void 0},X.flush=function(){return B===void 0?E:K(m())},X},Vi})(),rc=qt(E0);const _0={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,n){console&&console[t]&&console[t].apply(console,n)}};class Gr{constructor(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(n,r)}init(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||_0,this.options=r,this.debug=r.debug}log(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}warn(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}error(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"error","")}deprecate(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(n,r,o,i){return i&&!this.debug?null:(typeof n[0]=="string"&&(n[0]=`${o}${this.prefix} ${n[0]}`),this.logger[r](n))}create(n){return new Gr(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return(n=n||this.options).prefix=n.prefix||this.prefix,new Gr(this.logger,n)}}var Tt=new Gr;class Yr{constructor(){this.observers={}}on(n,r){return n.split(" ").forEach((o=>{this.observers[o]||(this.observers[o]=new Map);const i=this.observers[o].get(r)||0;this.observers[o].set(r,i+1)})),this}off(n,r){this.observers[n]&&(r?this.observers[n].delete(r):delete this.observers[n])}emit(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];this.observers[n]&&Array.from(this.observers[n].entries()).forEach((a=>{let[l,c]=a;for(let u=0;u<c;u++)l(...o)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((a=>{let[l,c]=a;for(let u=0;u<c;u++)l.apply(l,[n,...o])}))}}const Jn=()=>{let t,n;const r=new Promise(((o,i)=>{t=o,n=i}));return r.resolve=t,r.reject=n,r},oc=t=>t==null?"":""+t,A0=/###/g,ic=t=>t&&t.indexOf("###")>-1?t.replace(A0,"."):t,sc=t=>!t||typeof t=="string",Gn=(t,n,r)=>{const o=typeof n!="string"?n:n.split(".");let i=0;for(;i<o.length-1;){if(sc(t))return{};const a=ic(o[i]);!t[a]&&r&&(t[a]=new r),t=Object.prototype.hasOwnProperty.call(t,a)?t[a]:{},++i}return sc(t)?{}:{obj:t,k:ic(o[i])}},ac=(t,n,r)=>{const{obj:o,k:i}=Gn(t,n,Object);if(o!==void 0||n.length===1)return void(o[i]=r);let a=n[n.length-1],l=n.slice(0,n.length-1),c=Gn(t,l,Object);for(;c.obj===void 0&&l.length;)a=`${l[l.length-1]}.${a}`,l=l.slice(0,l.length-1),c=Gn(t,l,Object),c&&c.obj&&c.obj[`${c.k}.${a}`]!==void 0&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=r},Zr=(t,n)=>{const{obj:r,k:o}=Gn(t,n);if(r)return r[o]},lc=(t,n,r)=>{for(const o in n)o!=="__proto__"&&o!=="constructor"&&(o in t?typeof t[o]=="string"||t[o]instanceof String||typeof n[o]=="string"||n[o]instanceof String?r&&(t[o]=n[o]):lc(t[o],n[o],r):t[o]=n[o]);return t},xn=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var N0={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const S0=t=>typeof t=="string"?t.replace(/[&<>"'\/]/g,(n=>N0[n])):t,F0=[" ",",","?","!",";"],V0=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}(20),Oi=function(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[n])return t[n];const o=n.split(r);let i=t;for(let a=0;a<o.length;){if(!i||typeof i!="object")return;let l,c="";for(let u=a;u<o.length;++u)if(u!==a&&(c+=r),c+=o[u],l=i[c],l!==void 0){if(["string","number","boolean"].indexOf(typeof l)>-1&&u<o.length-1)continue;a+=u-a+1;break}i=l}return i},Xr=t=>t&&t.indexOf("_")>0?t.replace("_","-"):t;class cc extends Yr{constructor(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=n||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}removeNamespaces(n){const r=this.options.ns.indexOf(n);r>-1&&this.options.ns.splice(r,1)}getResource(n,r,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;n.indexOf(".")>-1?c=n.split("."):(c=[n,r],o&&(Array.isArray(o)?c.push(...o):typeof o=="string"&&a?c.push(...o.split(a)):c.push(o)));const u=Zr(this.data,c);return!u&&!r&&!o&&n.indexOf(".")>-1&&(n=c[0],r=c[1],o=c.slice(2).join(".")),u||!l||typeof o!="string"?u:Oi(this.data&&this.data[n]&&this.data[n][r],o,a)}addResource(n,r,o,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=[n,r];o&&(c=c.concat(l?o.split(l):o)),n.indexOf(".")>-1&&(c=n.split("."),i=r,r=c[1]),this.addNamespaces(r),ac(this.data,c,i),a.silent||this.emit("added",n,r,o,i)}addResources(n,r,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in o)(typeof o[a]=="string"||Array.isArray(o[a]))&&this.addResource(n,r,a,o[a],{silent:!0});i.silent||this.emit("added",n,r,o)}addResourceBundle(n,r,o,i,a){let l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[n,r];n.indexOf(".")>-1&&(c=n.split("."),i=o,o=r,r=c[1]),this.addNamespaces(r);let u=Zr(this.data,c)||{};l.skipCopy||(o=JSON.parse(JSON.stringify(o))),i?lc(u,o,a):u={...u,...o},ac(this.data,c,u),l.silent||this.emit("added",n,r,o)}removeResourceBundle(n,r){this.hasResourceBundle(n,r)&&delete this.data[n][r],this.removeNamespaces(r),this.emit("removed",n,r)}hasResourceBundle(n,r){return this.getResource(n,r)!==void 0}getResourceBundle(n,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(n,r)}:this.getResource(n,r)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const r=this.getDataByLanguage(n);return!!(r&&Object.keys(r)||[]).find((o=>r[o]&&Object.keys(r[o]).length>0))}toJSON(){return this.data}}var uc={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,n,r,o,i){return t.forEach((a=>{this.processors[a]&&(n=this.processors[a].process(n,r,o,i))})),n}};const dc={};class Qr extends Yr{constructor(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),((o,i,a)=>{o.forEach((l=>{i[l]&&(a[l]=i[l])}))})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Tt.create("translator")}changeLanguage(n){n&&(this.language=n)}exists(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(n==null)return!1;const o=this.resolve(n,r);return o&&o.res!==void 0}extractFromKey(n,r){let o=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const l=o&&n.indexOf(o)>-1,c=!(this.options.userDefinedKeySeparator||r.keySeparator||this.options.userDefinedNsSeparator||r.nsSeparator||((u,d,f)=>{d=d||"",f=f||"";const p=F0.filter((g=>d.indexOf(g)<0&&f.indexOf(g)<0));if(p.length===0)return!0;const h=V0.getRegExp(`(${p.map((g=>g==="?"?"\\?":g)).join("|")})`);let m=!h.test(u);if(!m){const g=u.indexOf(f);g>0&&!h.test(u.substring(0,g))&&(m=!0)}return m})(n,o,i));if(l&&!c){const u=n.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:n,namespaces:a};const d=n.split(o);(o!==i||o===i&&this.options.ns.indexOf(d[0])>-1)&&(a=d.shift()),n=d.join(i)}return typeof a=="string"&&(a=[a]),{key:n,namespaces:a}}translate(n,r,o){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),n==null)return"";Array.isArray(n)||(n=[String(n)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:l,namespaces:c}=this.extractFromKey(n[n.length-1],r),u=c[c.length-1],d=r.lng||this.language,f=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(f){const w=r.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${w}${l}`,usedKey:l,exactUsedKey:l,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${w}${l}`}return i?{res:l,usedKey:l,exactUsedKey:l,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:l}const p=this.resolve(n,r);let h=p&&p.res;const m=p&&p.usedKey||l,g=p&&p.exactUsedKey||l,y=Object.prototype.toString.apply(h),v=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject;if(D&&h&&typeof h!="string"&&typeof h!="boolean"&&typeof h!="number"&&["[object Number]","[object Function]","[object RegExp]"].indexOf(y)<0&&(typeof v!="string"||!Array.isArray(h))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,h,{...r,ns:c}):`key '${l} (${this.language})' returned an object instead of string.`;return i?(p.res=w,p.usedParams=this.getUsedParamsDetails(r),p):w}if(a){const w=Array.isArray(h),b=w?[]:{},x=w?g:m;for(const k in h)if(Object.prototype.hasOwnProperty.call(h,k)){const E=`${x}${a}${k}`;b[k]=this.translate(E,{...r,joinArrays:!1,ns:c}),b[k]===E&&(b[k]=h[k])}h=b}}else if(D&&typeof v=="string"&&Array.isArray(h))h=h.join(v),h&&(h=this.extendTranslation(h,n,r,o));else{let w=!1,b=!1;const x=r.count!==void 0&&typeof r.count!="string",k=Qr.hasDefaultValue(r),E=x?this.pluralResolver.getSuffix(d,r.count,r):"",B=r.ordinal&&x?this.pluralResolver.getSuffix(d,r.count,{ordinal:!1}):"",V=x&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),T=V&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${E}`]||r[`defaultValue${B}`]||r.defaultValue;!this.isValidLookup(h)&&k&&(w=!0,h=T),this.isValidLookup(h)||(b=!0,h=l);const P=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&b?void 0:h,R=k&&T!==h&&this.options.updateMissing;if(b||w||R){if(this.logger.log(R?"updateKey":"missingKey",d,u,l,R?T:h),a){const W=this.resolve(l,{...r,keySeparator:!1});W&&W.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let I=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let W=0;W<U.length;W++)I.push(U[W]);else this.options.saveMissingTo==="all"?I=this.languageUtils.toResolveHierarchy(r.lng||this.language):I.push(r.lng||this.language);const G=(W,K,X)=>{const oe=k&&X!==h?X:P;this.options.missingKeyHandler?this.options.missingKeyHandler(W,u,K,oe,R,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(W,u,K,oe,R,r),this.emit("missingKey",W,u,K,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?I.forEach((W=>{const K=this.pluralResolver.getSuffixes(W,r);V&&r[`defaultValue${this.options.pluralSeparator}zero`]&&K.indexOf(`${this.options.pluralSeparator}zero`)<0&&K.push(`${this.options.pluralSeparator}zero`),K.forEach((X=>{G([W],l+X,r[`defaultValue${X}`]||T)}))})):G(I,l,T))}h=this.extendTranslation(h,n,r,p,o),b&&h===l&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${l}`),(b||w)&&this.options.parseMissingKeyHandler&&(h=this.options.compatibilityAPI!=="v1"?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${l}`:l,w?h:void 0):this.options.parseMissingKeyHandler(h))}return i?(p.res=h,p.usedParams=this.getUsedParamsDetails(r),p):h}extendTranslation(n,r,o,i,a){var l=this;if(this.i18nFormat&&this.i18nFormat.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const d=typeof n=="string"&&(o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const h=n.match(this.interpolator.nestingRegexp);f=h&&h.length}let p=o.replace&&typeof o.replace!="string"?o.replace:o;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),n=this.interpolator.interpolate(n,p,o.lng||this.language||i.usedLng,o),d){const h=n.match(this.interpolator.nestingRegexp);f<(h&&h.length)&&(o.nest=!1)}!o.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(o.lng=this.language||i.usedLng),o.nest!==!1&&(n=this.interpolator.nest(n,(function(){for(var h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return a&&a[0]===m[0]&&!o.context?(l.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${r[0]}`),null):l.translate(...m,r)}),o)),o.interpolation&&this.interpolator.reset()}const c=o.postProcess||this.options.postProcess,u=typeof c=="string"?[c]:c;return n!=null&&u&&u.length&&o.applyPostProcessor!==!1&&(n=uc.handle(u,n,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),n}resolve(n){let r,o,i,a,l,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return typeof n=="string"&&(n=[n]),n.forEach((u=>{if(this.isValidLookup(r))return;const d=this.extractFromKey(u,c),f=d.key;o=f;let p=d.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const h=c.count!==void 0&&typeof c.count!="string",m=h&&!c.ordinal&&c.count===0&&this.pluralResolver.shouldUseIntlApi(),g=c.context!==void 0&&(typeof c.context=="string"||typeof c.context=="number")&&c.context!=="",y=c.lngs?c.lngs:this.languageUtils.toResolveHierarchy(c.lng||this.language,c.fallbackLng);p.forEach((v=>{this.isValidLookup(r)||(l=v,!dc[`${y[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(dc[`${y[0]}-${v}`]=!0,this.logger.warn(`key "${o}" for languages "${y.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach((D=>{if(this.isValidLookup(r))return;a=D;const w=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,f,D,v,c);else{let x;h&&(x=this.pluralResolver.getSuffix(D,c.count,c));const k=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(w.push(f+x),c.ordinal&&x.indexOf(E)===0&&w.push(f+x.replace(E,this.options.pluralSeparator)),m&&w.push(f+k)),g){const B=`${f}${this.options.contextSeparator}${c.context}`;w.push(B),h&&(w.push(B+x),c.ordinal&&x.indexOf(E)===0&&w.push(B+x.replace(E,this.options.pluralSeparator)),m&&w.push(B+k))}}let b;for(;b=w.pop();)this.isValidLookup(r)||(i=b,r=this.getResource(D,v,b,c))})))}))})),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:l}}isValidLookup(n){return!(n===void 0||!this.options.returnNull&&n===null||!this.options.returnEmptyString&&n==="")}getResource(n,r,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(n,r,o,i):this.resourceStore.getResource(n,r,o,i)}getUsedParamsDetails(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=n.replace&&typeof n.replace!="string";let i=o?n.replace:n;if(o&&n.count!==void 0&&(i.count=n.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!o){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(n){const r="defaultValue";for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&r===o.substring(0,12)&&n[o]!==void 0)return!0;return!1}}const Ti=t=>t.charAt(0).toUpperCase()+t.slice(1);class fc{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Tt.create("languageUtils")}getScriptPartFromCode(n){if(!(n=Xr(n))||n.indexOf("-")<0)return null;const r=n.split("-");return r.length===2?null:(r.pop(),r[r.length-1].toLowerCase()==="x"?null:this.formatLanguageCode(r.join("-")))}getLanguagePartFromCode(n){if(!(n=Xr(n))||n.indexOf("-")<0)return n;const r=n.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(n){if(typeof n=="string"&&n.indexOf("-")>-1){const r=["hans","hant","latn","cyrl","cans","mong","arab"];let o=n.split("-");return this.options.lowerCaseLng?o=o.map((i=>i.toLowerCase())):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Ti(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Ti(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=Ti(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}getBestMatchFromCodes(n){if(!n)return null;let r;return n.forEach((o=>{if(r)return;const i=this.formatLanguageCode(o);this.options.supportedLngs&&!this.isSupportedCode(i)||(r=i)})),!r&&this.options.supportedLngs&&n.forEach((o=>{if(r)return;const i=this.getLanguagePartFromCode(o);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find((a=>a===i?a:a.indexOf("-")<0&&i.indexOf("-")<0?void 0:a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1?a:void 0))})),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Array.isArray(n))return n;if(!r)return n.default||[];let o=n[r];return o||(o=n[this.getScriptPartFromCode(r)]),o||(o=n[this.formatLanguageCode(r)]),o||(o=n[this.getLanguagePartFromCode(r)]),o||(o=n.default),o||[]}toResolveHierarchy(n,r){const o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),i=[],a=l=>{l&&(this.isSupportedCode(l)?i.push(l):this.logger.warn(`rejecting language code not found in supportedLngs: ${l}`))};return typeof n=="string"&&(n.indexOf("-")>-1||n.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(n))):typeof n=="string"&&a(this.formatLanguageCode(n)),o.forEach((l=>{i.indexOf(l)<0&&a(this.formatLanguageCode(l))})),i}}let O0=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],T0={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const j0=["v1","v2","v3"],P0=["v4"],pc={zero:0,one:1,two:2,few:3,many:4,other:5};class L0{constructor(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=n,this.options=r,this.logger=Tt.create("pluralResolver"),this.options.compatibilityJSON&&!P0.includes(this.options.compatibilityJSON)||typeof Intl<"u"&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const o={};return O0.forEach((i=>{i.lngs.forEach((a=>{o[a]={numbers:i.nr,plurals:T0[i.fc]}}))})),o})(),this.pluralRulesCache={}}addRule(n,r){this.rules[n]=r}clearCache(){this.pluralRulesCache={}}getRule(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const o=Xr(n==="dev"?"en":n),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:o,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];const l=new Intl.PluralRules(o,{type:i});return this.pluralRulesCache[a]=l,l}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}needsPlural(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=this.getRule(n,r);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}getPluralFormsOfKey(n,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,o).map((i=>`${r}${i}`))}getSuffixes(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=this.getRule(n,r);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(((i,a)=>pc[i]-pc[a])).map((i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`)):o.numbers.map((i=>this.getSuffix(n,i,r))):[]}getSuffix(n,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(n,o);return i?this.shouldUseIntlApi()?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${n}`),"")}getSuffixRetroCompatible(n,r){const o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r));let i=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}shouldUseIntlApi(){return!j0.includes(this.options.compatibilityJSON)}}const hc=function(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],a=((l,c,u)=>{const d=Zr(l,u);return d!==void 0?d:Zr(c,u)})(t,n,r);return!a&&i&&typeof r=="string"&&(a=Oi(t,r,o),a===void 0&&(a=Oi(n,r,o))),a},ji=t=>t.replace(/\$/g,"$$$$");class M0{constructor(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Tt.create("interpolator"),this.options=n,this.format=n.interpolation&&n.interpolation.format||(r=>r),this.init(n)}init(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});const{escape:r,escapeValue:o,useRawValueToEscape:i,prefix:a,prefixEscaped:l,suffix:c,suffixEscaped:u,formatSeparator:d,unescapeSuffix:f,unescapePrefix:p,nestingPrefix:h,nestingPrefixEscaped:m,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:v,maxReplaces:D,alwaysFormat:w}=n.interpolation;this.escape=r!==void 0?r:S0,this.escapeValue=o===void 0||o,this.useRawValueToEscape=i!==void 0&&i,this.prefix=a?xn(a):l||"{{",this.suffix=c?xn(c):u||"}}",this.formatSeparator=d||",",this.unescapePrefix=f?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=h?xn(h):m||xn("$t("),this.nestingSuffix=g?xn(g):y||xn(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=D||1e3,this.alwaysFormat=w!==void 0&&w,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(r,o)=>r&&r.source===o?(r.lastIndex=0,r):new RegExp(o,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(n,r,o,i){let a,l,c;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=m=>{if(m.indexOf(this.formatSeparator)<0){const D=hc(r,u,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(D,void 0,o,{...i,...r,interpolationkey:m}):D}const g=m.split(this.formatSeparator),y=g.shift().trim(),v=g.join(this.formatSeparator).trim();return this.format(hc(r,u,y,this.options.keySeparator,this.options.ignoreJSONStructure),v,o,{...i,...r,interpolationkey:y})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,p=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>ji(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?ji(this.escape(m)):ji(m)}].forEach((m=>{for(c=0;a=m.regex.exec(n);){const g=a[1].trim();if(l=d(g),l===void 0)if(typeof f=="function"){const v=f(n,a,i);l=typeof v=="string"?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))l="";else{if(p){l=a[0];continue}this.logger.warn(`missed to pass in variable ${g} for interpolating ${n}`),l=""}else typeof l=="string"||this.useRawValueToEscape||(l=oc(l));const y=m.safeValue(l);if(n=n.replace(a[0],y),p?(m.regex.lastIndex+=l.length,m.regex.lastIndex-=a[0].length):m.regex.lastIndex=0,c++,c>=this.maxReplaces)break}})),n}nest(n,r){let o,i,a,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const c=(u,d)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const p=u.split(new RegExp(`${f}[ ]*{`));let h=`{${p[1]}`;u=p[0],h=this.interpolate(h,a);const m=h.match(/'/g),g=h.match(/"/g);(m&&m.length%2==0&&!g||g.length%2!=0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),d&&(a={...d,...a})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,y),`${u}${f}${h}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;o=this.nestingRegexp.exec(n);){let u=[];a={...l},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let d=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const f=o[1].split(this.formatSeparator).map((p=>p.trim()));o[1]=f.shift(),u=f,d=!0}if(i=r(c.call(this,o[1].trim(),a),a),i&&o[0]===n&&typeof i!="string")return i;typeof i!="string"&&(i=oc(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${n}`),i=""),d&&(i=u.reduce(((f,p)=>this.format(f,p,l.lng,{...l,interpolationkey:o[1].trim()})),i.trim())),n=n.replace(o[0],i),this.regexp.lastIndex=0}return n}}const Bn=t=>{const n={};return(r,o,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const l=o+JSON.stringify(a);let c=n[l];return c||(c=t(Xr(o),i),n[l]=c),c(r)}};class z0{constructor(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Tt.create("formatter"),this.options=n,this.formats={number:Bn(((r,o)=>{const i=new Intl.NumberFormat(r,{...o});return a=>i.format(a)})),currency:Bn(((r,o)=>{const i=new Intl.NumberFormat(r,{...o,style:"currency"});return a=>i.format(a)})),datetime:Bn(((r,o)=>{const i=new Intl.DateTimeFormat(r,{...o});return a=>i.format(a)})),relativetime:Bn(((r,o)=>{const i=new Intl.RelativeTimeFormat(r,{...o});return a=>i.format(a,o.range||"day")})),list:Bn(((r,o)=>{const i=new Intl.ListFormat(r,{...o});return a=>i.format(a)}))},this.init(n)}init(n){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(n,r){this.formats[n.toLowerCase().trim()]=r}addCached(n,r){this.formats[n.toLowerCase().trim()]=Bn(r)}format(n,r,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find((c=>c.indexOf(")")>-1))){const c=a.findIndex((u=>u.indexOf(")")>-1));a[0]=[a[0],...a.splice(1,c)].join(this.formatSeparator)}return a.reduce(((c,u)=>{const{formatName:d,formatOptions:f}=(p=>{let h=p.toLowerCase().trim();const m={};if(p.indexOf("(")>-1){const g=p.split("(");h=g[0].toLowerCase().trim();const y=g[1].substring(0,g[1].length-1);h==="currency"&&y.indexOf(":")<0?m.currency||(m.currency=y.trim()):h==="relativetime"&&y.indexOf(":")<0?m.range||(m.range=y.trim()):y.split(";").forEach((v=>{if(v){const[D,...w]=v.split(":"),b=w.join(":").trim().replace(/^'+|'+$/g,""),x=D.trim();m[x]||(m[x]=b),b==="false"&&(m[x]=!1),b==="true"&&(m[x]=!0),isNaN(b)||(m[x]=parseInt(b,10))}}))}return{formatName:h,formatOptions:m}})(u);if(this.formats[d]){let p=c;try{const h=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},m=h.locale||h.lng||i.locale||i.lng||o;p=this.formats[d](c,m,{...f,...i,...h})}catch(h){this.logger.warn(h)}return p}return this.logger.warn(`there was no format function for ${d}`),c}),n)}}class $0 extends Yr{constructor(n,r,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=n,this.store=r,this.services=o,this.languageUtils=o.languageUtils,this.options=i,this.logger=Tt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(o,i.backend,i)}queueLoad(n,r,o,i){const a={},l={},c={},u={};return n.forEach((d=>{let f=!0;r.forEach((p=>{const h=`${d}|${p}`;!o.reload&&this.store.hasResourceBundle(d,p)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?l[h]===void 0&&(l[h]=!0):(this.state[h]=1,f=!1,l[h]===void 0&&(l[h]=!0),a[h]===void 0&&(a[h]=!0),u[p]===void 0&&(u[p]=!0)))})),f||(c[d]=!0)})),(Object.keys(a).length||Object.keys(l).length)&&this.queue.push({pending:l,pendingCount:Object.keys(l).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(l),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(u)}}loaded(n,r,o){const i=n.split("|"),a=i[0],l=i[1];r&&this.emit("failedLoading",a,l,r),!r&&o&&this.store.addResourceBundle(a,l,o,void 0,void 0,{skipCopy:!0}),this.state[n]=r?-1:2,r&&o&&(this.state[n]=0);const c={};this.queue.forEach((u=>{((d,f,p)=>{const{obj:h,k:m}=Gn(d,f,Object);h[m]=h[m]||[],h[m].push(p)})(u.loaded,[a],l),((d,f)=>{d.pending[f]!==void 0&&(delete d.pending[f],d.pendingCount--)})(u,n),r&&u.errors.push(r),u.pendingCount!==0||u.done||(Object.keys(u.loaded).forEach((d=>{c[d]||(c[d]={});const f=u.loaded[d];f.length&&f.forEach((p=>{c[d][p]===void 0&&(c[d][p]=!0)}))})),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())})),this.emit("loaded",c),this.queue=this.queue.filter((u=>!u.done))}read(n,r,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,l=arguments.length>5?arguments[5]:void 0;if(!n.length)return l(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:n,ns:r,fcName:o,tried:i,wait:a,callback:l});this.readingCalls++;const c=(d,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}d&&f&&i<this.maxRetries?setTimeout((()=>{this.read.call(this,n,r,o,i+1,2*a,l)}),a):l(d,f)},u=this.backend[o].bind(this.backend);if(u.length!==2)return u(n,r,c);try{const d=u(n,r);d&&typeof d.then=="function"?d.then((f=>c(null,f))).catch(c):c(null,d)}catch(d){c(d)}}prepareLoading(n,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof n=="string"&&(n=this.languageUtils.toResolveHierarchy(n)),typeof r=="string"&&(r=[r]);const a=this.queueLoad(n,r,o,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach((l=>{this.loadOne(l)}))}load(n,r,o){this.prepareLoading(n,r,{},o)}reload(n,r,o){this.prepareLoading(n,r,{reload:!0},o)}loadOne(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const o=n.split("|"),i=o[0],a=o[1];this.read(i,a,"read",void 0,void 0,((l,c)=>{l&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,l),!l&&c&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,c),this.loaded(n,l,c)}))}saveMissing(n,r,o,i,a){let l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r))this.logger.warn(`did not save key "${o}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(o!=null&&o!==""){if(this.backend&&this.backend.create){const u={...l,isUpdate:a},d=this.backend.create.bind(this.backend);if(d.length<6)try{let f;f=d.length===5?d(n,r,o,i,u):d(n,r,o,i),f&&typeof f.then=="function"?f.then((p=>c(null,p))).catch(c):c(null,f)}catch(f){c(f)}else d(n,r,o,i,c,u)}n&&n[0]&&this.store.addResource(n[0],r,o,i)}}}const mc=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach((o=>{n[o]=r[o]}))}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),gc=t=>(typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),eo=()=>{};class Yn extends Yr{constructor(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;var o;if(super(),this.options=gc(n),this.services={},this.logger=Tt,this.modules={external:[]},o=this,Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach((i=>{typeof o[i]=="function"&&(o[i]=o[i].bind(o))})),r&&!this.isInitialized&&!n.isClone){if(!this.options.initImmediate)return this.init(n,r),this;setTimeout((()=>{this.init(n,r)}),0)}}init(){var n=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(o=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(typeof r.ns=="string"?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=mc();this.options={...i,...this.options,...gc(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const a=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){let u;this.modules.logger?Tt.init(a(this.modules.logger),this.options):Tt.init(null,this.options),this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=z0);const d=new fc(this.options);this.store=new cc(this.options.resources,this.options);const f=this.services;f.logger=Tt,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new L0(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!u||this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format||(f.formatter=a(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new M0(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new $0(a(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(function(p){for(var h=arguments.length,m=new Array(h>1?h-1:0),g=1;g<h;g++)m[g-1]=arguments[g];n.emit(p,...m)})),this.modules.languageDetector&&(f.languageDetector=a(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=a(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new Qr(this.services,this.options),this.translator.on("*",(function(p){for(var h=arguments.length,m=new Array(h>1?h-1:0),g=1;g<h;g++)m[g-1]=arguments[g];n.emit(p,...m)})),this.modules.external.forEach((p=>{p.init&&p.init(this)}))}if(this.format=this.options.interpolation.format,o||(o=eo),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((u=>{this[u]=function(){return n.store[u](...arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((u=>{this[u]=function(){return n.store[u](...arguments),n}}));const l=Jn(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),o(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:eo;const o=typeof n=="string"?n:this.language;if(typeof n=="function"&&(r=n),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=l=>{l&&l!=="cimode"&&this.services.languageUtils.toResolveHierarchy(l).forEach((c=>{c!=="cimode"&&i.indexOf(c)<0&&i.push(c)}))};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((l=>a(l))),this.options.preload&&this.options.preload.forEach((l=>a(l))),this.services.backendConnector.load(i,this.options.ns,(l=>{l||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),r(l)}))}else r(null)}reloadResources(n,r,o){const i=Jn();return typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=void 0),n||(n=this.languages),r||(r=this.options.ns),o||(o=eo),this.services.backendConnector.reload(n,r,(a=>{i.resolve(),o(a)})),i}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&uc.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(n&&this.languages&&!(["cimode","dev"].indexOf(n)>-1))for(let r=0;r<this.languages.length;r++){const o=this.languages[r];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}changeLanguage(n,r){var o=this;this.isLanguageChangingTo=n;const i=Jn();this.emit("languageChanging",n);const a=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},l=(u,d)=>{d?(a(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,i.resolve((function(){return o.t(...arguments)})),r&&r(u,(function(){return o.t(...arguments)}))},c=u=>{n||u||!this.services.languageDetector||(u=[]);const d=typeof u=="string"?u:this.services.languageUtils.getBestMatchFromCodes(u);d&&(this.language||a(d),this.translator.language||this.translator.changeLanguage(d),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(d)),this.loadResources(d,(f=>{l(f,d)}))};return n||!this.services.languageDetector||this.services.languageDetector.async?!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(n):c(this.services.languageDetector.detect()),i}getFixedT(n,r,o){var i=this;const a=function(l,c){let u;if(typeof c!="object"){for(var d=arguments.length,f=new Array(d>2?d-2:0),p=2;p<d;p++)f[p-2]=arguments[p];u=i.options.overloadTranslationOptionHandler([l,c].concat(f))}else u={...c};u.lng=u.lng||a.lng,u.lngs=u.lngs||a.lngs,u.ns=u.ns||a.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||o||a.keyPrefix);const h=i.options.keySeparator||".";let m;return m=u.keyPrefix&&Array.isArray(l)?l.map((g=>`${u.keyPrefix}${h}${g}`)):u.keyPrefix?`${u.keyPrefix}${h}${l}`:l,i.t(m,u)};return typeof n=="string"?a.lng=n:a.lngs=n,a.ns=r,a.keyPrefix=o,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const o=r.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const l=(c,u)=>{const d=this.services.backendConnector.state[`${c}|${u}`];return d===-1||d===0||d===2};if(r.precheck){const c=r.precheck(this,l);if(c!==void 0)return c}return!!this.hasResourceBundle(o,n)||!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!l(o,n)||i&&!l(a,n))}loadNamespaces(n,r){const o=Jn();return this.options.ns?(typeof n=="string"&&(n=[n]),n.forEach((i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)})),this.loadResources((i=>{o.resolve(),r&&r(i)})),o):(r&&r(),Promise.resolve())}loadLanguages(n,r){const o=Jn();typeof n=="string"&&(n=[n]);const i=this.options.preload||[],a=n.filter((l=>i.indexOf(l)<0&&this.services.languageUtils.isSupportedCode(l)));return a.length?(this.options.preload=i.concat(a),this.loadResources((l=>{o.resolve(),r&&r(l)})),o):(r&&r(),Promise.resolve())}dir(n){if(n||(n=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!n)return"rtl";const r=this.services&&this.services.languageUtils||new fc(mc());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(r.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new Yn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:eo;const o=n.forkResourceStore;o&&delete n.forkResourceStore;const i={...this.options,...n,isClone:!0},a=new Yn(i);return n.debug===void 0&&n.prefix===void 0||(a.logger=a.logger.clone(n)),["store","services","language"].forEach((l=>{a[l]=this[l]})),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},o&&(a.store=new cc(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Qr(a.services,i),a.translator.on("*",(function(l){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d<c;d++)u[d-1]=arguments[d];a.emit(l,...u)})),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ie=Yn.createInstance();Ie.createInstance=Yn.createInstance,Ie.createInstance,Ie.dir,Ie.init,Ie.loadResources,Ie.reloadResources,Ie.use,Ie.changeLanguage,Ie.getFixedT,Ie.t,Ie.exists,Ie.setDefaultNamespace,Ie.hasLoadedNamespace,Ie.loadNamespaces,Ie.loadLanguages;function kn(t,n){Ie.addResourceBundle(t,"translation",n,!0,!0)}function yc(t){return Ie.on("languageChanged",t),function(){return Ie.off("languageChanged",t)}}Ie.init({lng:"zh-CN",resources:{}});var se=Ie.t.bind(Ie);function to(t){if(t.removeAttr){t.removeAttr("width"),t.removeAttr("height"),t.removeAttr("fill"),t.removeAttr("class"),t.removeAttr("t"),t.removeAttr("p-id");var n=t.children();n.length&&to(n)}}function Pi(){return F('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function bc(){return F('<div class="w-e-bar-divider"></div>')}function Li(t,n,r,o,i){if(o===void 0&&(o=""),i===void 0&&(i=!1),n){if(o){var a=Ci?"cmd":"ctrl";o=o.replace("mod",a)}if(i)o&&(t.attr("data-tooltip",o),t.addClass("w-e-menu-tooltip-v5"),t.addClass("tooltip-right"));else{var l=o?"".concat(r,`
|
|
17
|
-
`).concat(o):r;t.attr("data-tooltip",l),t.addClass("w-e-menu-tooltip-v5")}}}var Mi=(function(){function t(n,r,o){o===void 0&&(o=!1);var i=this;this.$elem=F('<div class="w-e-bar-item"></div>'),this.$button=F('<button type="button"></button>'),this.disabled=!1,this.menu=r;var a=r.tag,l=r.width;if(a!=="button")throw new Error("Invalid tag '".concat(a,"', expected 'button'"));var c=r.title,u=r.hotkey,d=u===void 0?"":u,f=r.iconSvg,p=f===void 0?"":f,h=this.$button;if(p){var m=F(p);to(m),h.append(m)}else h.text(c);Li(h,p,c,d,o),o&&p&&h.append(F('<span class="title">'.concat(c,"</span>"))),l&&h.css("width","".concat(l,"px")),h.attr("data-menu-key",n),this.$elem.append(h),wt((function(){return i.init()}))}return t.prototype.init=function(){var n=this;this.setActive(),this.setDisabled(),this.$button.on("click",(function(r){r.preventDefault(),pt(n).hidePanelOrModal(),n.disabled||(n.exec(),n.onButtonClick())}))},t.prototype.exec=function(){var n=pt(this),r=this.menu,o=r.getValue(n);this.setIcon(),this.setTooltip(),r.exec(n,o)},t.prototype.setActive=function(){var n=pt(this),r=this.$button,o="active";this.menu.isActive(n)?r.addClass(o):r.removeClass(o)},t.prototype.setDisabled=function(){var n=pt(this),r=this.$button,o=this.menu.isDisabled(n);(n.selection==null||n.isDisabled())&&(o=!0),this.menu.alwaysEnable&&(o=!1);var i="disabled";o?r.addClass(i):r.removeClass(i),this.disabled=o},t.prototype.setIcon=function(){var n=pt(this),r=this.$button;if(this.menu.getIcon){var o=this.menu.getIcon(n);if(o){r.find("svg").remove();var i=F(o);to(i),r.append(i)}}},t.prototype.setTooltip=function(){var n=pt(this),r=this.$button;if(this.menu.getTitle){var o=this.menu.getTitle(n),i=this.menu.iconSvg;o&&i&&Li(r,i,o)}},t.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},t})(),I0=(function(t){function n(r,o,i){return i===void 0&&(i=!1),t.call(this,r,o,i)||this}return De(n,t),n.prototype.onButtonClick=function(){},n})(Mi),zi=(function(){function t(n){this.isShow=!1,this.showTime=0,this.record(n)}return t.prototype.record=function(n){var r=si.get(n);r==null&&(r=new Set,si.set(n,r)),r.add(this),br.set(this,n)},t.prototype.renderContent=function(n){var r=this.$elem;r.empty(),r.append(n);var o=this.genSelfElem();o&&r.append(o)},t.prototype.appendTo=function(n){var r=this.$elem;n.append(r)},t.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var n=br.get(this);n&&n.emit("modalOrPanelShow",this)}},t.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var n=br.get(this);n&&n.emit("modalOrPanelHide")}},t})(),R0=(function(t){function n(r){var o=t.call(this,r)||this;return o.type="dropPanel",o.$elem=F('<div class="w-e-drop-panel"></div>'),o}return De(n,t),n.prototype.genSelfElem=function(){return null},n})(zi),H0=(function(t){function n(r,o,i){i===void 0&&(i=!1);var a=t.call(this,r,o,i)||this;if(a.dropPanel=null,a.menu=o,o.showDropPanel){var l=Pi();a.$button.append(l)}return a}return De(n,t),n.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},n.prototype.handleDropPanel=function(){var r=this.menu;if(r.getPanelContentElem!=null){var o=pt(this);if(this.dropPanel==null){var i=new R0(o),a=r.getPanelContentElem(o);i.renderContent(a),i.appendTo(this.$elem),i.show(),this.dropPanel=i}else{var l=this.dropPanel;l.isShow?l.hide():(a=r.getPanelContentElem(o),l.renderContent(a),l.show())}var c=this.dropPanel;if(c.isShow){var u=this.$elem,d=u.offset().left,f=u.parents(".w-e-bar");d-f.offset().left>=f.width()/2?c.$elem.css({left:"none",right:"0"}):c.$elem.css({left:"0",right:"none"})}}},n})(Mi),U0=(function(t){function n(r,o){o===void 0&&(o=0);var i=t.call(this,r)||this;i.type="modal",i.$elem=F('<div class="w-e-modal"></div>'),i.width=0,o&&(i.width=o);var a=i.$elem;return a.on("click",(function(l){return l.stopPropagation()})),a.on("keyup",(function(l){l.code==="Escape"&&(i.hide(),r.restoreSelection())})),i}return De(n,t),n.prototype.genSelfElem=function(){var r=this,o=F('<span class="btn-close">'.concat('<svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg>',"</span>")),i=br.get(this);return o.on("click",(function(){r.hide(),i?.restoreSelection()})),o},n.prototype.setStyle=function(r){var o=this.width,i=this.$elem;i.attr("style",""),o&&i.css("width","".concat(o,"px")),i.css(r)},n})(zi);function $i(t,n,r){var o=F('<label class="babel-container"></label>');o.append("<span>".concat(t,"</span>"));var i=F('<input type="text" id="'.concat(n,'" placeholder="').concat("",'">'));return o.append(i),[o[0],i[0]]}function Cc(t,n){var r=F('<div class="button-container"></div>'),o=F('<button type="button" id="'.concat(t,'">').concat(n,"</button>"));return r.append(o),[r[0],o[0]]}var W0=(function(t){function n(r,o,i){i===void 0&&(i=!1);var a=t.call(this,r,o,i)||this;return a.$body=F("body"),a.modal=null,a.menu=o,a}return De(n,t),n.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},n.prototype.getPosition=function(){var r=pt(this),o=this.menu.getModalPositionNode(r);return te.isElement(o)?Si(r,o,"modal"):Ni(r)},n.prototype.handleModal=function(){var r=pt(this),o=this.menu;if(this.modal==null){var i=new U0(r,o.modalWidth);this.renderAndShowModal(i,!0),this.modal=i}else(i=this.modal).isShow?i.hide():this.renderAndShowModal(i,!1)},n.prototype.renderAndShowModal=function(r,o){o===void 0&&(o=!1);var i=pt(this),a=this.menu;if(a.getModalContentElem!=null){var l=S.getTextarea(i),c=S.getToolbar(i),u=(c?.getConfig()||{}).modalAppendToBody,d=a.getModalContentElem(i);if(r.renderContent(d),u)r.setStyle({left:"0",right:"0"});else{var f=this.getPosition();r.setStyle(f)}o&&(u?r.appendTo(this.$body):r.appendTo(l.$textAreaContainer)),r.show(),u||Fi(i,r.$elem),setTimeout((function(){i.blur()}))}},n})(Mi),q0=(function(t){function n(r,o){var i=t.call(this,r)||this;return i.type="selectList",i.$elem=F('<div class="w-e-select-list"></div>'),o&&i.$elem.css("width","".concat(o,"px")),i.$elem.on("click",(function(a){a.stopPropagation()})),i}return De(n,t),n.prototype.renderList=function(r){var o=this.$elem;o.empty();var i=F("<ul></ul>");r.forEach((function(a){var l=a.value,c=a.text,u=a.selected,d=a.styleForRenderMenuList,f=F('<li data-value="'.concat(l,'"></li>'));if(d&&f.css(d),u){var p=F('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');f.append(p),f.addClass("selected")}f.append(F('<span data-value="'.concat(l,'">').concat(c,"</span>"))),f.attr("title",c),i.append(f)})),o.append(i)},n.prototype.genSelfElem=function(){return null},n})(zi),K0=(function(){function t(n,r,o){o===void 0&&(o=!1);var i=this;this.$elem=F('<div class="w-e-bar-item"></div>'),this.$button=F('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var a=r.tag,l=r.title,c=r.width,u=r.iconSvg,d=u===void 0?"":u,f=r.hotkey,p=f===void 0?"":f;if(a!=="select")throw new Error("Invalid tag '".concat(a,"', expected 'select'"));var h=this.$button;c&&h.css("width","".concat(c,"px")),h.attr("data-menu-key",n),Li(h,d,l,p,o),this.$elem.append(h),this.menu=r,wt((function(){return i.init()}))}return t.prototype.init=function(){var n=this;this.setSelectedValue(),this.$button.on("click",(function(r){r.preventDefault(),pt(n).hidePanelOrModal(),n.trigger()}))},t.prototype.trigger=function(){var n=this,r=pt(this);if(!r.isDisabled()&&!this.disabled){var o=this.menu;if(this.selectList==null){this.selectList=new q0(r,o.selectPanelWidth);var i=this.selectList,a=o.getOptions(r);i.renderList(a),i.appendTo(this.$elem),i.show(),i.$elem.on("click","li",(function(l){var c=l.target;if(c!=null){l.preventDefault();var u=F(c).attr("data-value");n.onChange(u)}}))}else(i=this.selectList).isShow?i.hide():(a=o.getOptions(r),i.renderList(a),i.show())}},t.prototype.onChange=function(n){var r=pt(this),o=this.menu;o.exec&&o.exec(r,n)},t.prototype.setSelectedValue=function(){var n=pt(this),r=this.menu,o=r.getValue(n),i=(function(c,u){for(var d=c.length,f="",p=0;p<d;p++){var h=c[p];if(h.value===u){f=h.text;break}}return f})(r.getOptions(n),o.toString()),a=this.$button,l=Pi();a.empty(),a.text(i),a.append(l)},t.prototype.setDisabled=function(){var n=pt(this),r=this.menu.isDisabled(n),o=this.$button;(n.selection==null||n.isDisabled())&&(r=!0);var i="disabled";r?o.addClass(i):o.removeClass(i),this.disabled=r},t.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},t})(),vc=(function(){function t(n){this.$elem=F('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=F('<div class="w-e-bar-item-menus-container"></div>'),this.$button=F('<button type="button"></button>');var r=n.key,o=n.iconSvg,i=n.title,a=this.$elem,l=this.$button;if(o){var c=F(o);to(c),l.append(c)}else l.text(i);l.attr("data-menu-key",r);var u=Pi();l.append(u),a.append(l);var d=this.$container;a.append(d);var f=this.createObserver();this.observe(f)}return t.prototype.appendBarItem=function(n){var r=n.$elem;this.$container.append(r)},t.prototype.observe=function(n){var r=this.$container;n.observe(r[0],{childList:!0,subtree:!0,attributes:!0})},t.prototype.createObserver=function(){var n=this,r=this.$container,o=this.$button,i=new MutationObserver((function(){var a=r.find("button"),l=a.length;if(l!==0){var c=0;a.each((function(u){F(u).hasClass("disabled")&&c++})),i.disconnect(),c===l?o.addClass("disabled"):o.removeClass("disabled"),n.observe(i)}}));return i},t})(),Dc=new WeakMap;function pt(t){var n=ii.get(t);if(n==null)throw new Error("Can not get editor instance");return n}function wc(t,n,r){r===void 0&&(r=!1);var o=Dc.get(n);if(o)return o;var i=n.tag;if(i==="button"){var a=n.showDropPanel,l=n.showModal;o=a?new H0(t,n,r):l?new W0(t,n,r):new I0(t,n,r)}if(i==="select"&&(o=new K0(t,n,r)),o==null)throw new Error("Invalid tag in menu ".concat(JSON.stringify(n)));return Dc.set(n,o),o}function J0(t,n){var r=t.selection;return r!=null&&!j.isCollapsed(r)&&!S.getSelectedElems(t).some((function(o){if(t.isVoid(o))return!0;var i=o.type;return!!["pre","code","table"].includes(i)}))&&!!q.isText(n)}var xc,Bc,G0=(function(){function t(){var n=this;this.$elem=F('<div class="w-e-bar w-e-bar-hidden w-e-hover-bar"></div>'),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.lngListen=function(){},this.changeHoverbarState=rc((function(){var r=n.isShow,o=n.getSelectedNodeAndMenuKeys()||{},i=o.node,a=i===void 0?null:i,l=o.menuKeys,c=l===void 0?[]:l;a!=null&&n.changeItemsState(),!(a&&te.isElement(a)&&r&&n.isSamePath(a,n.prevSelectedNode))&&(n.hideAndClean(),a!=null&&(n.registerItems(c),n.setPosition(a),n.show()),n.prevSelectedNode=a)}),200),wt((function(){var r=n.getEditorInstance(),o=n.$elem;o.on("mousedown",(function(a){return a.preventDefault()}),{passive:!1}),S.getTextarea(r).$textAreaContainer.append(o),r.on(dt.CHANGE,n.changeHoverbarState);var i=n.hideAndClean.bind(n);r.on(dt.SCROLL,i),r.on(dt.FULLSCREEN,i),r.on(dt.UNFULLSCREEN,i)})),this.lngListen=yc((function(){n.menus={},n.hideAndClean(),n.getEditorInstance().deselect()}))}return t.prototype.getMenus=function(){return this.menus},t.prototype.hideAndClean=function(){var n=this.$elem;n.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],n.empty(),this.isShow=!1},t.prototype.checkPositionBottom=function(){var n=this.$elem,r=!1,o=typeof window<"u"?window.innerHeight:null;o&&o>=360&&o-n[0].getBoundingClientRect().bottom<360&&(r=!0),r?n.addClass("w-e-bar-bottom"):n.removeClass("w-e-bar-bottom")},t.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},t.prototype.changeItemsState=function(){var n=this;wt((function(){n.hoverbarItems.forEach((function(r){r.changeMenuState()}))}))},t.prototype.registerItems=function(n){var r=this,o=this.$elem;n.forEach((function(i){if(i!=="|")r.registerSingleItem(i);else{var a=bc();o.append(a)}}))},t.prototype.registerSingleItem=function(n){var r=this.getEditorInstance(),o=this.menus,i=o[n];if(i==null){var a=$n[n];if(a==null)throw new Error("Not found menu item factory by key '".concat(n,"'"));if(typeof a!="function")throw new Error("Menu item factory (key='".concat(n,"') is not a function"));i=a(),o[n]=i}var l=r.getMenuConfig(n);l&&l.iconSvg!==void 0&&(i.iconSvg=l.iconSvg);var c=wc(n,i);this.hoverbarItems.push(c),ii.set(c,r),this.$elem.append(c.$elem)},t.prototype.setPosition=function(n){var r=this.getEditorInstance(),o=this.$elem;if(o.attr("style",""),te.isElement(n)){var i=Si(r,n,"bar");return o.css(i),void Fi(r,o)}if(q.isText(n))return i=Ni(r),o.css(i),void Fi(r,o);throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},t.prototype.getSelectedNodeAndMenuKeys=function(){var n=this.getEditorInstance();if(n.selection==null)return null;var r=this.getHoverbarKeysConf(),o=null,i=[],a=function(c){var u=r[c],d=u.match,f=u.menuKeys,p=f===void 0?[]:f,h=d||function(y,v){return S.checkNodeType(v,c)},m=$(C.nodes(n,{match:function(y){return h(n,y)},universal:!0}),1),g=m[0];if(g!=null)return o=g[0],i=p,"break"};for(var l in r)if(a(l)==="break")break;return o==null||i.length===0?null:{node:o,menuKeys:i}},t.prototype.getEditorInstance=function(){var n=oi.get(this);if(n==null)throw new Error("Can not get editor instance");return n},t.prototype.getHoverbarKeysConf=function(){var n=this.getEditorInstance().getConfig().hoverbarKeys,r=n===void 0?{}:n,o=r.text;return o&&o.match==null&&(o.match=J0),r},t.prototype.isSamePath=function(n,r){if(n==null||r==null)return!1;var o=S.findPath(null,n),i=S.findPath(null,r);return _.equals(o,i)},t.prototype.destroy=function(){var n;this.changeHoverbarState.cancel(),this.$elem.remove(),(n=this.lngListen)===null||n===void 0||n.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},t})(),Y0=(function(){if(Bc)return xc;Bc=1;var t="Expected a function",n=NaN,r="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,u=typeof qe=="object"&&qe&&qe.Object===Object&&qe,d=typeof self=="object"&&self&&self.Object===Object&&self,f=u||d||Function("return this")(),p=Object.prototype.toString,h=Math.max,m=Math.min,g=function(){return f.Date.now()};function y(w,b,x){var k,E,B,V,T,P,R=0,I=!1,U=!1,G=!0;if(typeof w!="function")throw new TypeError(t);function W(ie){var ce=k,Q=E;return k=E=void 0,R=ie,V=w.apply(Q,ce)}function K(ie){var ce=ie-P;return P===void 0||ce>=b||ce<0||U&&ie-R>=B}function X(){var ie=g();if(K(ie))return oe(ie);T=setTimeout(X,(function(ce){var Q=b-(ce-P);return U?m(Q,B-(ce-R)):Q})(ie))}function oe(ie){return T=void 0,G&&k?W(ie):(k=E=void 0,V)}function re(){var ie=g(),ce=K(ie);if(k=arguments,E=this,P=ie,ce){if(T===void 0)return(function(Q){return R=Q,T=setTimeout(X,b),I?W(Q):V})(P);if(U)return T=setTimeout(X,b),W(P)}return T===void 0&&(T=setTimeout(X,b)),V}return b=D(b)||0,v(x)&&(I=!!x.leading,B=(U="maxWait"in x)?h(D(x.maxWait)||0,b):B,G="trailing"in x?!!x.trailing:G),re.cancel=function(){T!==void 0&&clearTimeout(T),R=0,k=P=E=T=void 0},re.flush=function(){return T===void 0?V:oe(g())},re}function v(w){var b=typeof w;return!!w&&(b=="object"||b=="function")}function D(w){if(typeof w=="number")return w;if((function(k){return typeof k=="symbol"||(function(E){return!!E&&typeof E=="object"})(k)&&p.call(k)==r})(w))return n;if(v(w)){var b=typeof w.valueOf=="function"?w.valueOf():w;w=v(b)?b+"":b}if(typeof w!="string")return w===0?w:+w;w=w.replace(o,"");var x=a.test(w);return x||l.test(w)?c(w.slice(2),x?2:8):i.test(w)?n:+w}return xc=function(w,b,x){var k=!0,E=!0;if(typeof w!="function")throw new TypeError(t);return v(x)&&(k="leading"in x?!!x.leading:k,E="trailing"in x?!!x.trailing:E),y(w,b,{leading:k,maxWait:b,trailing:E})}})(),kc=qt(Y0);function xt(t,n){return rn(n)&&S.hasDOMNode(t,n,{editable:!0})}function Ec(t,n){if(t.getConfig().readOnly)return!1;var r=En(t,n)&&S.toSlateNode(t,n);return C.isVoid(t,r)}function En(t,n){return rn(n)&&S.hasDOMNode(t,n)}const _c=t=>typeof t=="object"&&t!=null&&t.nodeType===1,Ac=(t,n)=>(!n||t!=="hidden")&&t!=="visible"&&t!=="clip",Ii=(t,n)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const r=getComputedStyle(t,null);return Ac(r.overflowY,n)||Ac(r.overflowX,n)||(o=>{const i=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(o);return!!i&&(i.clientHeight<o.scrollHeight||i.clientWidth<o.scrollWidth)})(t)}return!1},no=(t,n,r,o,i,a,l,c)=>a<t&&l>n||a>t&&l<n?0:a<=t&&c<=r||l>=n&&c>=r?a-t-o:l>n&&c<r||a<t&&c>r?l-n+i:0,Z0=t=>{const n=t.parentElement;return n??(t.getRootNode().host||null)},Nc=(t,n)=>{var r,o,i,a;if(typeof document>"u")return[];const{scrollMode:l,block:c,inline:u,boundary:d,skipOverflowHiddenElements:f}=n,p=typeof d=="function"?d:K=>K!==d;if(!_c(t))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,m=[];let g=t;for(;_c(g)&&p(g);){if(g=Z0(g),g===h){m.push(g);break}g!=null&&g===document.body&&Ii(g)&&!Ii(document.documentElement)||g!=null&&Ii(g,f)&&m.push(g)}const y=(o=(r=window.visualViewport)==null?void 0:r.width)!=null?o:innerWidth,v=(a=(i=window.visualViewport)==null?void 0:i.height)!=null?a:innerHeight,{scrollX:D,scrollY:w}=window,{height:b,width:x,top:k,right:E,bottom:B,left:V}=t.getBoundingClientRect(),{top:T,right:P,bottom:R,left:I}=(K=>{const X=window.getComputedStyle(K);return{top:parseFloat(X.scrollMarginTop)||0,right:parseFloat(X.scrollMarginRight)||0,bottom:parseFloat(X.scrollMarginBottom)||0,left:parseFloat(X.scrollMarginLeft)||0}})(t);let U=c==="start"||c==="nearest"?k-T:c==="end"?B+R:k+b/2-T+R,G=u==="center"?V+x/2-I+P:u==="end"?E+P:V-I;const W=[];for(let K=0;K<m.length;K++){const X=m[K],{height:oe,width:re,top:ie,right:ce,bottom:Q,left:xe}=X.getBoundingClientRect();if(l==="if-needed"&&k>=0&&V>=0&&B<=v&&E<=y&&k>=ie&&B<=Q&&V>=xe&&E<=ce)return W;const ge=getComputedStyle(X),Je=parseInt(ge.borderLeftWidth,10),Ge=parseInt(ge.borderTopWidth,10),Ne=parseInt(ge.borderRightWidth,10),Ce=parseInt(ge.borderBottomWidth,10);let _e=0,Me=0;const nt="offsetWidth"in X?X.offsetWidth-X.clientWidth-Je-Ne:0,rt="offsetHeight"in X?X.offsetHeight-X.clientHeight-Ge-Ce:0,et="offsetWidth"in X?X.offsetWidth===0?0:re/X.offsetWidth:0,ot="offsetHeight"in X?X.offsetHeight===0?0:oe/X.offsetHeight:0;if(h===X)_e=c==="start"?U:c==="end"?U-v:c==="nearest"?no(w,w+v,v,Ge,Ce,w+U,w+U+b,b):U-v/2,Me=u==="start"?G:u==="center"?G-y/2:u==="end"?G-y:no(D,D+y,y,Je,Ne,D+G,D+G+x,x),_e=Math.max(0,_e+w),Me=Math.max(0,Me+D);else{_e=c==="start"?U-ie-Ge:c==="end"?U-Q+Ce+rt:c==="nearest"?no(ie,Q,oe,Ge,Ce+rt,U,U+b,b):U-(ie+oe/2)+rt/2,Me=u==="start"?G-xe-Je:u==="center"?G-(xe+re/2)+nt/2:u==="end"?G-ce+Ne+nt:no(xe,ce,re,Je,Ne+nt,G,G+x,x);const{scrollLeft:Re,scrollTop:mt}=X;_e=ot===0?0:Math.max(0,Math.min(mt+_e/ot,X.scrollHeight-oe/ot+rt)),Me=et===0?0:Math.max(0,Math.min(Re+Me/et,X.scrollWidth-re/et+nt)),U+=mt-_e,G+=Re-Me}W.push({el:X,top:_e,left:Me})}return W},X0=t=>t===!1?{block:"end",inline:"nearest"}:(n=>n===Object(n)&&Object.keys(n).length!==0)(t)?t:{block:"start",inline:"nearest"};function Sc(t,n,r){r===void 0&&(r=!1);var o=n.selection,i=n.getConfig(),a=S.findDocumentOrShadowRoot(n).getSelection();if(a&&(!t.isComposing||r)&&n.isFocused()){var l=a.type!=="None";if(o||l){var c=ai.get(n),u=!1;if(c.contains(a.anchorNode)&&c.contains(a.focusNode)&&(u=!0),l&&u&&o){var d=S.toSlateRange(n,a,{exactMatch:!0,suppressThrow:!0});if(d&&j.equals(d,o)){var f=!0;if(j.isCollapsed(o)){var p=a.anchorNode,h=a.anchorOffset;if(p===c){var m=c.childNodes,g=void 0;(g=m[h])&&g.matches("table")&&(f=!1),(g=m[h-1])&&g.matches("table")&&(f=!1)}}if(f)return}}if(!o||S.hasRange(n,o)){t.isUpdatingSelection=!0;var y=o&&S.toDOMRange(n,o);if(y){j.isBackward(o)?a.setBaseAndExtent(y.endContainer,y.endOffset,y.startContainer,y.startOffset):a.setBaseAndExtent(y.startContainer,y.startOffset,y.endContainer,y.endOffset);var v=y.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")&&y.getBoundingClientRect){v.getBoundingClientRect=y.getBoundingClientRect.bind(y);var D=document.body;(function(w,b){if(!w.isConnected||!(E=>{let B=E;for(;B&&B.parentNode;){if(B.parentNode===document)return!0;B=B.parentNode instanceof ShadowRoot?B.parentNode.host:B.parentNode}return!1})(w))return;const x=(E=>{const B=window.getComputedStyle(E);return{top:parseFloat(B.scrollMarginTop)||0,right:parseFloat(B.scrollMarginRight)||0,bottom:parseFloat(B.scrollMarginBottom)||0,left:parseFloat(B.scrollMarginLeft)||0}})(w);if((E=>typeof E=="object"&&typeof E.behavior=="function")(b))return b.behavior(Nc(w,b));const k=typeof b=="boolean"||b==null?void 0:b.behavior;for(const{el:E,top:B,left:V}of Nc(w,X0(b))){const T=B-x.top+x.bottom,P=V-x.left+x.right;E.scroll({top:T,left:P,behavior:k})}})(v,{scrollMode:"if-needed",boundary:i.scroll?c.parentElement:D,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else a.removeAllRanges();setTimeout((function(){y&&qn&&c.focus(),t.isUpdatingSelection=!1}))}else n.selection=S.toSlateRange(n,a,{exactMatch:!1,suppressThrow:!1})}}}var Ri=new WeakMap,Fc=new WeakMap,Vc,_t={},ro=(function(){if(Vc)return _t;Vc=1,Object.defineProperty(_t,"__esModule",{value:!0});for(var t=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),n={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},r={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:t?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},o={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=1;i<20;i++)o["f"+i]=111+i;function a(f,p,h){p&&!("byKey"in p)&&(h=p,p=null),Array.isArray(f)||(f=[f]);var m=f.map((function(y){return l(y,p)})),g=function(y){return m.some((function(v){return c(v,y)}))};return h==null?g:g(h)}function l(f,p){var h=p&&p.byKey,m={},g=(f=f.replace("++","+add")).split("+"),y=g.length;for(var v in n)m[n[v]]=!1;var D=!0,w=!1,b=void 0;try{for(var x,k=g[Symbol.iterator]();!(D=(x=k.next()).done);D=!0){var E=x.value,B=E.endsWith("?")&&E.length>1;B&&(E=E.slice(0,-1));var V=d(E),T=n[V];if(E.length>1&&!T&&!r[E]&&!o[V])throw new TypeError('Unknown modifier: "'+E+'"');y!==1&&T||(h?m.key=V:m.which=u(E)),T&&(m[T]=!B||null)}}catch(P){w=!0,b=P}finally{try{!D&&k.return&&k.return()}finally{if(w)throw b}}return m}function c(f,p){for(var h in f){var m=f[h],g=void 0;if(m!=null&&((g=h==="key"&&p.key!=null?p.key.toLowerCase():h==="which"?m===91&&p.which===93?91:p.which:p[h])!=null||m!==!1)&&g!==m)return!1}return!0}function u(f){return f=d(f),o[f]||f.toUpperCase().charCodeAt(0)}function d(f){return f=f.toLowerCase(),f=r[f]||f}return _t.default=a,_t.isHotkey=a,_t.isCodeHotkey=function(f,p){return a(f,p)},_t.isKeyHotkey=function(f,p){return a(f,{byKey:!0},p)},_t.parseHotkey=l,_t.compareHotkey=c,_t.toKeyCode=u,_t.toKeyName=d,_t})(),Q0={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},e1={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},t1={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Fe=function(t){var n=Q0[t],r=e1[t],o=t1[t],i=n&&ro.isKeyHotkey(n),a=r&&ro.isKeyHotkey(r),l=o&&ro.isKeyHotkey(o);return function(c){return!(!i||!i(c))||!!(Ci&&a&&a(c))||!(Ci||!l||!l(c))}},Oe={isBold:Fe("bold"),isCompose:Fe("compose"),isMoveBackward:Fe("moveBackward"),isMoveForward:Fe("moveForward"),isDeleteBackward:Fe("deleteBackward"),isDeleteForward:Fe("deleteForward"),isDeleteLineBackward:Fe("deleteLineBackward"),isDeleteLineForward:Fe("deleteLineForward"),isDeleteWordBackward:Fe("deleteWordBackward"),isDeleteWordForward:Fe("deleteWordForward"),isExtendBackward:Fe("extendBackward"),isExtendForward:Fe("extendForward"),isExtendLineBackward:Fe("extendLineBackward"),isExtendLineForward:Fe("extendLineForward"),isItalic:Fe("italic"),isMoveLineBackward:Fe("moveLineBackward"),isMoveLineForward:Fe("moveLineForward"),isMoveWordBackward:Fe("moveWordBackward"),isMoveWordForward:Fe("moveWordForward"),isRedo:Fe("redo"),isSplitBlock:Fe("splitBlock"),isTransposeCharacter:Fe("transposeCharacter"),isUndo:Fe("undo"),isTab:Fe("tab"),isSelectAll:Fe("selectAll")};function Ke(t){t.preventDefault()}var n1={beforeinput:function(t,n,r){var o=t,i=r.getConfig().readOnly;if(Kn&&!i&&xt(r,o.target)){var a=r.selection,l=o.inputType,c=o.dataTransfer||o.data||void 0;if(l!=="insertCompositionText"&&l!=="deleteCompositionText"){if(o.preventDefault(),!l.startsWith("delete")||l.startsWith("deleteBy")){var u=$(o.getTargetRanges(),1)[0];if(u){var d=S.toSlateRange(r,u,{exactMatch:!1,suppressThrow:!1});a&&j.equals(a,d)||O.select(r,d)}}if(a&&j.isExpanded(a)){var f=S.getSelectedElems(r),p=f[0].type==="table",h=f[f.length-1].type!=="table-cell";if(p&&h)return;if(l.startsWith("delete")){var m=l.endsWith("Backward")?"backward":"forward";return void C.deleteFragment(r,{direction:m})}}switch(l){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":C.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":C.deleteForward(r);break;case"deleteContentBackward":C.deleteBackward(r);break;case"deleteEntireSoftLine":C.deleteBackward(r,{unit:"line"}),C.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":C.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":C.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":C.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":C.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":C.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":C.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":C.insertBreak(r);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if(l==="insertFromPaste"&&!ui.get(r))break;Hn(c)==="[object DataTransfer]"?r.insertData(c):typeof c=="string"&&C.insertText(r,c)}}}},blur:function(t,n,r){var o=t,i=n.isUpdatingSelection,a=n.latestElement;if(!r.getConfig().readOnly&&!i&&xt(r,o.target)){var l=S.findDocumentOrShadowRoot(r);if(a!==l.activeElement){var c=o.relatedTarget;if(!(c===S.toDOMNode(r,r)||ft(c)&&c.hasAttribute("data-slate-spacer"))){if(c!=null&&rn(c)&&S.hasDOMNode(r,c)){var u=S.toSlateNode(r,c);if(te.isElement(u)&&!r.isVoid(u))return}if(wn){var d=l.getSelection();d?.removeAllRanges()}tn.delete(r)}}}},focus:function(t,n,r){var o=S.toDOMNode(r,r),i=S.findDocumentOrShadowRoot(r);n.latestElement=i.activeElement,qn&&t.target!==o?o.focus():tn.set(r,!0)},click:function(t,n,r){if(!r.getConfig().readOnly&&En(r,t.target)&&rn(t.target)){var o=S.toSlateNode(r,t.target),i=S.findPath(r,o);if(C.hasPath(r,i)&&H.get(r,i)===o){var a=C.start(r,i),l=C.end(r,i),c=C.void(r,{at:a}),u=C.void(r,{at:l});if(c&&u&&_.equals(c[1],u[1])){var d=C.range(r,a);O.select(r,d)}}}},compositionstart:function(t,n,r){if(xt(r,t.target)){var o=r.selection;if(o&&j.isExpanded(o)&&(C.deleteFragment(r),Promise.resolve().then((function(){Sc(n,r,!0)}))),r.selection){var i=S.toDOMRange(r,r.selection).startContainer,a=i.textContent||"";Ri.set(r,a),Fc.set(r,i)}n.isComposing=!0,(function(l,c){var u;c.getConfig().placeholder&&c.isEmpty()&&l.showPlaceholder&&((u=l.$placeholder)===null||u===void 0||u.hide(),l.showPlaceholder=!1)})(n,r)}},compositionend:function(t,n,r){var o=t;if(xt(r,o.target)){n.isComposing=!1;var i=r.selection;if(i!=null){(vi||qn)&&S.cleanExposedTexNodeInSelectionBlock(r);for(var a=j.isBackward(i)?i.focus:i.anchor,l=$(C.node(r,[a.path[0]]),1)[0],c=0;c<a.path.length;c+=1){var u=$(C.node(r,a.path.slice(0,c+1)),1)[0];if(te.isElement(u)&&((wn||qn)&&u.type==="link"||u.type==="code")){S.setNewKey(l);break}}var d=o.data;if(d){if(r.getConfig().maxLength){var f=S.getLeftLengthOfMaxLength(r);if(f<d.length){var p=S.toDOMRange(r,i);p.startContainer.nodeType===Node.TEXT_NODE&&(p.startContainer.textContent=Ri.get(r)||""),f>0&&C.insertText(r,d.slice(0,f)),n.changeViewState()}else C.insertText(r,d)}else{var h=S.findDocumentOrShadowRoot(r).getSelection();h&&(function(m,g){if(j.isCollapsed(g)){var y=g.anchor,v=g.focus;if([2,3].includes(y.path.length)&&[2,3].includes(v.path.length)&&(y.offset===0||v.offset===0)){var D=C.node(m,y.path),w=y.offset===0?y.path:v.path,b=[w[0],w[1]-1];if(w[1]===0)return!1;var x=C.node(m,b);if(q.isText(x[0])&&q.isText(D[0]))return!0}}})(r,i)&&(r.selection=S.toSlateRange(r,h,{exactMatch:!1,suppressThrow:!1})),C.insertText(r,d)}wn||setTimeout((function(){var m=r.selection;if(m!=null){var g=Fc.get(r);g!=null&&S.toDOMRange(r,m).startContainer!==g&&(g.textContent=Ri.get(r)||"")}}))}}}},compositionupdate:function(t,n,r){xt(r,t.target)&&(n.isComposing=!0)},keydown:function(t,n,r){var o=t,i=r.selection;if(!r.getConfig().readOnly&&!n.isComposing&&xt(r,o.target)){if((function(l,c){var u=gr.get(l),d=u&&u.getMenus(),f=yr.get(l),p=f&&f.getMenus(),h=me(me({},d),p);for(var m in h){var g=h[m],y=g.hotkey;if(y&&ro.isHotkey(y,c)&&!g.isDisabled(l)){var v=g.getValue(l);g.exec(l,v)}}})(r,o),Oe.isTab(o))return Ke(o),void r.handleTab();if(Oe.isRedo(o))return Ke(o),void(typeof r.redo=="function"&&r.redo());if(Oe.isUndo(o))return Ke(o),void(typeof r.undo=="function"&&r.undo());if(Oe.isMoveLineBackward(o))return Ke(o),void O.move(r,{unit:"line",reverse:!0});if(Oe.isMoveLineForward(o))return Ke(o),void O.move(r,{unit:"line"});if(Oe.isExtendLineBackward(o))return Ke(o),void O.move(r,{unit:"line",edge:"focus",reverse:!0});if(Oe.isExtendLineForward(o))return Ke(o),void O.move(r,{unit:"line",edge:"focus"});if(Oe.isMoveBackward(o))return Ke(o),void(i&&j.isCollapsed(i)?O.move(r,{reverse:!0}):O.collapse(r,{edge:"start"}));if(Oe.isMoveForward(o))return Ke(o),void(i&&j.isCollapsed(i)?O.move(r):O.collapse(r,{edge:"end"}));if(Oe.isMoveWordBackward(o))return Ke(o),i&&j.isExpanded(i)&&O.collapse(r,{edge:"focus"}),void O.move(r,{unit:"word",reverse:!0});if(Oe.isMoveWordForward(o))return Ke(o),i&&j.isExpanded(i)&&O.collapse(r,{edge:"focus"}),void O.move(r,{unit:"word"});if(Oe.isSelectAll(o))return Ke(o),void r.selectAll();if(Kn){if((vi||wn)&&i&&(Oe.isDeleteBackward(o)||Oe.isDeleteForward(o))&&j.isCollapsed(i)){var a=H.parent(r,i.anchor.path);if(te.isElement(a)&&C.isVoid(r,a)&&C.isInline(r,a))return o.preventDefault(),void O.delete(r,{unit:"block"})}}else{if(Oe.isBold(o)||Oe.isItalic(o)||Oe.isTransposeCharacter(o))return void Ke(o);if(Oe.isSplitBlock(o))return Ke(o),void C.insertBreak(r);if(Oe.isDeleteBackward(o))return Ke(o),void(i&&j.isExpanded(i)?C.deleteFragment(r,{direction:"backward"}):C.deleteBackward(r));if(Oe.isDeleteForward(o))return Ke(o),void(i&&j.isExpanded(i)?C.deleteFragment(r,{direction:"forward"}):C.deleteForward(r));if(Oe.isDeleteLineBackward(o))return Ke(o),void(i&&j.isExpanded(i)?C.deleteFragment(r,{direction:"backward"}):C.deleteBackward(r,{unit:"line"}));if(Oe.isDeleteLineForward(o))return Ke(o),void(i&&j.isExpanded(i)?C.deleteFragment(r,{direction:"forward"}):C.deleteForward(r,{unit:"line"}));if(Oe.isDeleteWordBackward(o))return Ke(o),void(i&&j.isExpanded(i)?C.deleteFragment(r,{direction:"backward"}):C.deleteBackward(r,{unit:"word"}));if(Oe.isDeleteWordForward(o))return Ke(o),void(i&&j.isExpanded(i)?C.deleteFragment(r,{direction:"forward"}):C.deleteForward(r,{unit:"word"}))}}},keypress:function(t,n,r){if(!Kn&&!r.getConfig().readOnly&&xt(r,t.target)){t.preventDefault();var o=t.key;C.insertText(r,o)}},copy:function(t,n,r){var o=t;if(xt(r,o.target)){r.getConfig().readOnly||o.preventDefault();var i=o.clipboardData;i!=null&&r.setFragmentData(i)}},cut:function(t,n,r){var o=t,i=r.selection;if(!r.getConfig().readOnly&&(o.preventDefault(),xt(r,o.target))){var a=o.clipboardData;if(a!=null&&(r.setFragmentData(a),i))if(j.isExpanded(i))C.deleteFragment(r);else{var l=H.parent(r,i.anchor.path);C.isVoid(r,l)&&O.delete(r)}}},paste:function(t,n,r){ui.set(r,!0);var o=t;if(!r.getConfig().readOnly&&xt(r,o.target)){var i=r.getConfig().customPaste;if(i&&i(r,o)===!1)return void ui.set(r,!1);if(!Kn||(function(l){return l.clipboardData&&l.clipboardData.getData("text/plain")!==""&&l.clipboardData.types.length===1})(o)){o.preventDefault();var a=o.clipboardData;a!=null&&r.insertData(a)}}},dragover:function(t,n,r){if(En(r,t.target)){var o=S.toSlateNode(r,t.target);C.isVoid(r,o)&&t.preventDefault()}},dragstart:function(t,n,r){var o=t;if(En(r,o.target)&&!r.getConfig().readOnly){var i=S.toSlateNode(r,o.target),a=S.findPath(r,i);if(C.isVoid(r,i)||C.void(r,{at:a,voids:!0})){var l=C.range(r,a);O.select(r,l)}var c=o.dataTransfer;c!=null&&(n.isDraggingInternally=!0,r.setFragmentData(c))}},dragend:function(t,n,r){var o=t;r.getConfig().readOnly||n.isDraggingInternally&&En(r,o.target)&&(n.isDraggingInternally=!1)},drop:function(t,n,r){var o=t,i=o.dataTransfer;if(!r.getConfig().readOnly&&En(r,o.target)&&i!=null&&!(Kn&&wn&&i.files.length>0)){o.preventDefault();var a=r.selection,l=S.findEventRange(r,o);O.select(r,l),n.isDraggingInternally&&(a&&O.delete(r,{at:a}),n.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}};const r1={createElement:function(t,n){return document.createElement(t,n)},createElementNS:function(t,n,r){return document.createElementNS(t,n,r)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,n,r){t.insertBefore(n,r)},removeChild:function(t,n){t.removeChild(n)},appendChild:function(t,n){t.appendChild(n)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,n){t.textContent=n},getTextContent:function(t){return t.textContent},isElement:function(t){return t.nodeType===1},isText:function(t){return t.nodeType===3},isComment:function(t){return t.nodeType===8}};function Zn(t,n,r,o,i){return{sel:t,data:n,children:r,text:o,elm:i,key:n===void 0?void 0:n.key}}const Hi=Array.isArray;function oo(t){return typeof t=="string"||typeof t=="number"||t instanceof String||t instanceof Number}function Ui(t){return t===void 0}function vt(t){return t!==void 0}const Oc=Zn("",{},[],void 0,void 0);function Xn(t,n){var r,o;const i=t.key===n.key,a=((r=t.data)===null||r===void 0?void 0:r.is)===((o=n.data)===null||o===void 0?void 0:o.is);return t.sel===n.sel&&i&&a}function o1(t,n,r){var o;const i={};for(let a=n;a<=r;++a){const l=(o=t[a])===null||o===void 0?void 0:o.key;l!==void 0&&(i[l]=a)}return i}const i1=["create","update","remove","destroy","pre","post"];function s1(t,n){const r={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},o=r1;for(const p of i1)for(const h of t){const m=h[p];m!==void 0&&r[p].push(m)}function i(p){const h=p.id?"#"+p.id:"",m=p.getAttribute("class"),g=m?"."+m.split(" ").join("."):"";return Zn(o.tagName(p).toLowerCase()+h+g,{},[],void 0,p)}function a(p,h){return function(){if(--h==0){const m=o.parentNode(p);o.removeChild(m,p)}}}function l(p,h){var m,g;let y,v=p.data;if(v!==void 0){const b=(m=v.hook)===null||m===void 0?void 0:m.init;vt(b)&&(b(p),v=p.data)}const D=p.children,w=p.sel;if(w==="!")Ui(p.text)&&(p.text=""),p.elm=o.createComment(p.text);else if(w!==void 0){const b=w.indexOf("#"),x=w.indexOf(".",b),k=b>0?b:w.length,E=x>0?x:w.length,B=b!==-1||x!==-1?w.slice(0,Math.min(k,E)):w,V=p.elm=vt(v)&&vt(y=v.ns)?o.createElementNS(y,B,v):o.createElement(B,v);for(k<E&&V.setAttribute("id",w.slice(k+1,E)),x>0&&V.setAttribute("class",w.slice(E+1).replace(/\./g," ")),y=0;y<r.create.length;++y)r.create[y](Oc,p);if(Hi(D))for(y=0;y<D.length;++y){const P=D[y];P!=null&&o.appendChild(V,l(P,h))}else oo(p.text)&&o.appendChild(V,o.createTextNode(p.text));const T=p.data.hook;vt(T)&&((g=T.create)===null||g===void 0||g.call(T,Oc,p),T.insert&&h.push(p))}else p.elm=o.createTextNode(p.text);return p.elm}function c(p,h,m,g,y,v){for(;g<=y;++g){const D=m[g];D!=null&&o.insertBefore(p,l(D,v),h)}}function u(p){var h,m;const g=p.data;if(g!==void 0){(m=(h=g?.hook)===null||h===void 0?void 0:h.destroy)===null||m===void 0||m.call(h,p);for(let y=0;y<r.destroy.length;++y)r.destroy[y](p);if(p.children!==void 0)for(let y=0;y<p.children.length;++y){const v=p.children[y];v!=null&&typeof v!="string"&&u(v)}}}function d(p,h,m,g){for(var y,v;m<=g;++m){let D,w;const b=h[m];if(b!=null)if(vt(b.sel)){u(b),D=r.remove.length+1,w=a(b.elm,D);for(let k=0;k<r.remove.length;++k)r.remove[k](b,w);const x=(v=(y=b?.data)===null||y===void 0?void 0:y.hook)===null||v===void 0?void 0:v.remove;vt(x)?x(b,w):w()}else o.removeChild(p,b.elm)}}function f(p,h,m){var g,y,v,D,w;const b=(g=h.data)===null||g===void 0?void 0:g.hook;(y=b?.prepatch)===null||y===void 0||y.call(b,p,h);const x=h.elm=p.elm,k=p.children,E=h.children;if(p!==h){if(h.data!==void 0){for(let B=0;B<r.update.length;++B)r.update[B](p,h);(D=(v=h.data.hook)===null||v===void 0?void 0:v.update)===null||D===void 0||D.call(v,p,h)}Ui(h.text)?vt(k)&&vt(E)?k!==E&&(function(B,V,T,P){let R,I,U,G,W=0,K=0,X=V.length-1,oe=V[0],re=V[X],ie=T.length-1,ce=T[0],Q=T[ie];for(;W<=X&&K<=ie;)oe==null?oe=V[++W]:re==null?re=V[--X]:ce==null?ce=T[++K]:Q==null?Q=T[--ie]:Xn(oe,ce)?(f(oe,ce,P),oe=V[++W],ce=T[++K]):Xn(re,Q)?(f(re,Q,P),re=V[--X],Q=T[--ie]):Xn(oe,Q)?(f(oe,Q,P),o.insertBefore(B,oe.elm,o.nextSibling(re.elm)),oe=V[++W],Q=T[--ie]):Xn(re,ce)?(f(re,ce,P),o.insertBefore(B,re.elm,oe.elm),re=V[--X],ce=T[++K]):(R===void 0&&(R=o1(V,W,X)),I=R[ce.key],Ui(I)?o.insertBefore(B,l(ce,P),oe.elm):(U=V[I],U.sel!==ce.sel?o.insertBefore(B,l(ce,P),oe.elm):(f(U,ce,P),V[I]=void 0,o.insertBefore(B,U.elm,oe.elm))),ce=T[++K]);(W<=X||K<=ie)&&(W>X?(G=T[ie+1]==null?null:T[ie+1].elm,c(B,G,T,K,ie,P)):d(B,V,W,X))})(x,k,E,m):vt(E)?(vt(p.text)&&o.setTextContent(x,""),c(x,null,E,0,E.length-1,m)):vt(k)?d(x,k,0,k.length-1):vt(p.text)&&o.setTextContent(x,""):p.text!==h.text&&(vt(k)&&d(x,k,0,k.length-1),o.setTextContent(x,h.text)),(w=b?.postpatch)===null||w===void 0||w.call(b,p,h)}}return function(p,h){let m,g,y;const v=[];for(m=0;m<r.pre.length;++m)r.pre[m]();for((function(D){return D.sel!==void 0})(p)||(p=i(p)),Xn(p,h)?f(p,h,v):(g=p.elm,y=o.parentNode(g),l(h,v),y!==null&&(o.insertBefore(y,h.elm,o.nextSibling(g)),d(y,[p],0,0))),m=0;m<v.length;++m)v[m].data.hook.insert(v[m]);for(m=0;m<r.post.length;++m)r.post[m]();return h}}function Tc(t,n,r){if(t.ns="http://www.w3.org/2000/svg",r!=="foreignObject"&&n!==void 0)for(let o=0;o<n.length;++o){const i=n[o].data;i!==void 0&&Tc(i,n[o].children,n[o].sel)}}function ht(t,n,r){let o,i,a,l={};if(r!==void 0?(n!==null&&(l=n),Hi(r)?o=r:oo(r)?i=r.toString():r&&r.sel&&(o=[r])):n!=null&&(Hi(n)?o=n:oo(n)?i=n.toString():n&&n.sel?o=[n]:l=n),o!==void 0)for(a=0;a<o.length;++a)oo(o[a])&&(o[a]=Zn(void 0,void 0,void 0,o[a],void 0));return t[0]!=="s"||t[1]!=="v"||t[2]!=="g"||t.length!==3&&t[3]!=="."&&t[3]!=="#"||Tc(l,o,t),Zn(t,l,o,i,void 0)}function jc(t,n){let r;const o=n.elm;let i=t.data.attrs,a=n.data.attrs;if((i||a)&&i!==a){for(r in i=i||{},a=a||{},a){const l=a[r];i[r]!==l&&(l===!0?o.setAttribute(r,""):l===!1?o.removeAttribute(r):r.charCodeAt(0)!==120?o.setAttribute(r,l):r.charCodeAt(3)===58?o.setAttributeNS("http://www.w3.org/XML/1998/namespace",r,l):r.charCodeAt(5)===58?o.setAttributeNS("http://www.w3.org/1999/xlink",r,l):o.setAttribute(r,l))}for(r in i)r in a||o.removeAttribute(r)}}const a1={create:jc,update:jc};function Pc(t,n){let r,o;const i=n.elm;let a=t.data.class,l=n.data.class;if((a||l)&&a!==l){for(o in a=a||{},l=l||{},a)a[o]&&!Object.prototype.hasOwnProperty.call(l,o)&&i.classList.remove(o);for(o in l)r=l[o],r!==a[o]&&i.classList[r?"add":"remove"](o)}}const l1={create:Pc,update:Pc},Lc=/[A-Z]/g;function Mc(t,n){const r=n.elm;let o,i=t.data.dataset,a=n.data.dataset;if(!i&&!a||i===a)return;i=i||{},a=a||{};const l=r.dataset;for(o in i)a[o]||(l?o in l&&delete l[o]:r.removeAttribute("data-"+o.replace(Lc,"-$&").toLowerCase()));for(o in a)i[o]!==a[o]&&(l?l[o]=a[o]:r.setAttribute("data-"+o.replace(Lc,"-$&").toLowerCase(),a[o]))}const c1={create:Mc,update:Mc};function zc(t,n,r){if(typeof t=="function")t.call(n,r,n);else if(typeof t=="object")for(let o=0;o<t.length;o++)zc(t[o],n,r)}function u1(t,n){const r=t.type,o=n.data.on;o&&o[r]&&zc(o[r],n,t)}function Wi(t,n){const r=t.data.on,o=t.listener,i=t.elm,a=n&&n.data.on,l=n&&n.elm;let c;if(r!==a){if(r&&o)if(a)for(c in r)a[c]||i.removeEventListener(c,o,!1);else for(c in r)i.removeEventListener(c,o,!1);if(a){const u=n.listener=t.listener||function d(f){u1(f,d.vnode)};if(u.vnode=n,r)for(c in a)r[c]||l.addEventListener(c,u,!1);else for(c in a)l.addEventListener(c,u,!1)}}}const d1={create:Wi,update:Wi,destroy:Wi};function $c(t,n){let r,o,i;const a=n.elm;let l=t.data.props,c=n.data.props;if((l||c)&&l!==c)for(r in l=l||{},c=c||{},c)o=c[r],i=l[r],i===o||r==="value"&&a[r]===o||(a[r]=o)}const f1={create:$c,update:$c},Ic=typeof window<"u"&&window.requestAnimationFrame.bind(window)||setTimeout,p1=function(t){Ic((function(){Ic(t)}))};let qi=!1;function h1(t,n,r){p1((function(){t[n]=r}))}function Rc(t,n){let r,o;const i=n.elm;let a=t.data.style,l=n.data.style;if(!a&&!l||a===l)return;a=a||{},l=l||{};const c="delayed"in a;for(o in a)l[o]||(o[0]==="-"&&o[1]==="-"?i.style.removeProperty(o):i.style[o]="");for(o in l)if(r=l[o],o==="delayed"&&l.delayed)for(const u in l.delayed)r=l.delayed[u],c&&r===a.delayed[u]||h1(i.style,u,r);else o!=="remove"&&r!==a[o]&&(o[0]==="-"&&o[1]==="-"?i.style.setProperty(o,r):i.style[o]=r)}const m1={pre:function(){qi=!1},create:Rc,update:Rc,destroy:function(t){let n,r;const o=t.elm,i=t.data.style;if(i&&(n=i.destroy))for(r in n)o.style[r]=n[r]},remove:function(t,n){const r=t.data.style;if(!r||!r.remove)return void n();let o;qi||(t.elm.offsetLeft,qi=!0);const i=t.elm;let a=0;const l=r.remove;let c=0;const u=[];for(o in l)u.push(o),i.style[o]=l[o];const d=getComputedStyle(i)["transition-property"].split(", ");for(;a<d.length;++a)u.indexOf(d[a])!==-1&&c++;i.addEventListener("transitionend",(function(f){f.target===i&&--c,c===0&&n()}))}};function Hc(t,n){for(const r of t)r!=null&&r!==!1&&r!==""&&(Array.isArray(r)?Hc(r,n):typeof r=="string"||typeof r=="number"||typeof r=="boolean"?n.push(Zn(void 0,void 0,void 0,String(r),void 0)):n.push(r));return n}function je(t,n,...r){const o=Hc(r,[]);return typeof t=="function"?t(n,o):o.length===1&&!o[0].sel&&o[0].text?ht(t,n,o[0].text):ht(t,n,o)}var Uc,Wc;je||(je={});var g1=(function(){if(Wc)return Uc;Wc=1;var t,n="[object Symbol]",r=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i="\\ud800-\\udfff",a="\\u0300-\\u036f\\ufe20-\\ufe23",l="\\u20d0-\\u20f0",c="\\u2700-\\u27bf",u="a-z\\xdf-\\xf6\\xf8-\\xff",d="A-Z\\xc0-\\xd6\\xd8-\\xde",f="\\ufe0e\\ufe0f",p="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",h="['’]",m="["+i+"]",g="["+p+"]",y="["+a+l+"]",v="\\d+",D="["+c+"]",w="["+u+"]",b="[^"+i+p+v+c+u+d+"]",x="\\ud83c[\\udffb-\\udfff]",k="[^"+i+"]",E="(?:\\ud83c[\\udde6-\\uddff]){2}",B="[\\ud800-\\udbff][\\udc00-\\udfff]",V="["+d+"]",T="\\u200d",P="(?:"+w+"|"+b+")",R="(?:"+V+"|"+b+")",I="(?:['’](?:d|ll|m|re|s|t|ve))?",U="(?:['’](?:D|LL|M|RE|S|T|VE))?",G="(?:"+y+"|"+x+")?",W="["+f+"]?",K=W+G+("(?:"+T+"(?:"+[k,E,B].join("|")+")"+W+G+")*"),X="(?:"+[D,E,B].join("|")+")"+K,oe="(?:"+[k+y+"?",y,E,B,m].join("|")+")",re=RegExp(h,"g"),ie=RegExp(y,"g"),ce=RegExp(x+"(?="+x+")|"+oe+K,"g"),Q=RegExp([V+"?"+w+"+"+I+"(?="+[g,V,"$"].join("|")+")",R+"+"+U+"(?="+[g,V+P,"$"].join("|")+")",V+"?"+P+"+"+I,V+"+"+U,v,X].join("|"),"g"),xe=RegExp("["+T+i+a+l+f+"]"),ge=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Je=typeof qe=="object"&&qe&&qe.Object===Object&&qe,Ge=typeof self=="object"&&self&&self.Object===Object&&self,Ne=Je||Ge||Function("return this")(),Ce=(t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(ue){return t?.[ue]});function _e(ue){return xe.test(ue)}function Me(ue){return _e(ue)?(function(le){return le.match(ce)||[]})(ue):(function(le){return le.split("")})(ue)}var nt=Object.prototype.toString,rt=Ne.Symbol,et=rt?rt.prototype:void 0,ot=et?et.toString:void 0;function Re(ue){if(typeof ue=="string")return ue;if((function(ve){return typeof ve=="symbol"||(function(Ee){return!!Ee&&typeof Ee=="object"})(ve)&&nt.call(ve)==n})(ue))return ot?ot.call(ue):"";var le=ue+"";return le=="0"&&1/ue==-1/0?"-0":le}function mt(ue,le,ve){var Ee=ue.length;return ve=ve===void 0?Ee:ve,!le&&ve>=Ee?ue:(function(Ue,Ve,Pe){var Ye=-1,Te=Ue.length;Ve<0&&(Ve=-Ve>Te?0:Te+Ve),(Pe=Pe>Te?Te:Pe)<0&&(Pe+=Te),Te=Ve>Pe?0:Pe-Ve>>>0,Ve>>>=0;for(var Le=Array(Te);++Ye<Te;)Le[Ye]=Ue[Ye+Ve];return Le})(ue,le,ve)}function He(ue){return ue==null?"":Re(ue)}var ze,Dt,Nt=(ze=function(ue,le,ve){return le=le.toLowerCase(),ue+(ve?jt(He(le).toLowerCase()):le)},function(ue){return(function(le,ve,Ee){for(var Ue=-1,Ve=le?le.length:0;++Ue<Ve;)Ee=ve(Ee,le[Ue],Ue,le);return Ee})((function(le,ve){return le=He(le),ve===void 0?(function(Ee){return ge.test(Ee)})(le)?(function(Ee){return Ee.match(Q)||[]})(le):(function(Ee){return Ee.match(r)||[]})(le):le.match(ve)||[]})((function(le){return(le=He(le))&&le.replace(o,Ce).replace(ie,"")})(ue).replace(re,"")),ze,"")}),jt=(Dt="toUpperCase",function(ue){var le=_e(ue=He(ue))?Me(ue):void 0,ve=le?le[0]:ue.charAt(0),Ee=le?mt(le,1).join(""):ue.slice(1);return ve[Dt]()+Ee});return Uc=Nt})(),y1=qt(g1),b1=["props","attrs","style","dataset","on","hook"];function qc(t){var n=t.data,r=n===void 0?{}:n,o=t.children,i=o===void 0?[]:o;Object.keys(r).forEach((function(a){var l,c,u=r[a];if(a!=="key"){if(!b1.includes(a)){if(a.startsWith("data-")){var d=a.slice(5);return d=y1(d),(function(f,p){f.data==null&&(f.data={});var h=f.data;h.dataset==null&&(h.dataset={}),Object.assign(h.dataset,p)})(t,((l={})[d]=u,l)),void delete r[a]}(function(f,p){f.data==null&&(f.data={});var h=f.data;h.props==null&&(h.props={}),Object.assign(h.props,p)})(t,(c={},c[a]=u,c)),delete r[a]}}else t.key=u})),i.length>0&&i.forEach((function(a){typeof a!="string"&&qc(a)}))}var Ki=[],Kc={};function C1(t,n,r){return je(r.isInline(t)?"span":"div",null,n)}function v1(t,n){var r,o=S.findKey(n,t),i=n.isInline(t),a=C.isVoid(n,t),l=cl(t.type,o.id),c={id:l,key:o.id,"data-slate-node":"element","data-slate-inline":i},u=t.type,d=t.children,f=d===void 0?[]:d,p=(function(D){return Kc[D]||C1})(u);r=a?null:f.map((function(D,w){return Gi(D,w,t,n)}));var h=p(t,r,n);if(a){c["data-slate-void"]=!0;var m=i?"span":"div",g=$(H.texts(t),1),y=$(g[0],1)[0],v=je(m,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},Gi(y,0,t,n));h=je(m,{style:{position:"relative"}},h,v),In.set(y,0),bn.set(y,t)}return h.data==null&&(h.data={}),Object.assign(h.data,c),a||i||(h=(function(D,w){var b=w;return Ki.forEach((function(x){b=x(D,w)})),b})(t,h)),wt((function(){var D=mi(l);D!=null&&(li.set(o,D),vr.set(t,D),Cr.set(D,t))})),h}function Jc(t,n){return n===void 0&&(n=!1),je("span",{"data-slate-string":!0},n?t+`
|
|
18
|
-
`:t)}function Ji(t,n){return t===void 0&&(t=0),n===void 0&&(n=!1),je("span",{"data-slate-zero-width":n?"n":"z","data-slate-length":t},"\uFEFF",n?je("br",null):null)}function
|
|
19
|
-
`?Jc(x,!0):Jc(x):Ji(0,!0)})(h,m===u.length-1,t,n,r);return g=(function(y,v){var D=v;return Ki.forEach((function(w){D=w(y,D)})),D})(h,g),je("span",{"data-slate-leaf":!0},g)})),f=(a=o.id,"w-e-text-".concat(a)),p=je("span",{"data-slate-node":"text",id:f,key:o.id},d);return wt((function(){var h=mi(f);h!=null&&(li.set(o,h),vr.set(t,h),Cr.set(h,t))})),p}function Gi(t,n,r,o){return In.set(t,n),bn.set(t,r),te.isElement(t)?
|
|
15
|
+
不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致`);i.addClass("w-e-full-screen-container");var a=i.css("z-index");i.attr("data-z-index",a.toString()),n.isFullScreen=!0,n.emit("fullScreen")}},n.unFullScreen=function(){if(n.isFullScreen){var r=S.getTextarea(n).$box.parent();setTimeout((function(){r.removeClass("w-e-full-screen-container"),n.isFullScreen=!1,n.emit("unFullScreen")}),200)}},n.getEditableContainer=function(){return S.getTextarea(n).$textAreaContainer[0]},n},ki={exports:{}},Ei={exports:{}};function ec(){return Cl?bl:(Cl=1,bl=function(t){return t!=null})}function p0(){if(xl)return wl;xl=1;var t=(function(){if(Dl)return vl;Dl=1;var n=ec(),r={object:!0,function:!0,undefined:!0};return vl=function(o){return!!n(o)&&hasOwnProperty.call(r,typeof o)}})();return wl=function(n){if(!t(n))return!1;try{return!!n.constructor&&n.constructor.prototype===n}catch{return!1}}}function h0(){if(_l)return El;_l=1;var t=(function(){if(kl)return Bl;kl=1;var o=p0();return Bl=function(i){if(typeof i!="function"||!hasOwnProperty.call(i,"length"))return!1;try{if(typeof i.length!="number"||typeof i.call!="function"||typeof i.apply!="function")return!1}catch{return!1}return!o(i)}})(),n=/^\s*class[\s{/}]/,r=Function.prototype.toString;return El=function(o){return!!t(o)&&!n.test(r.call(o))}}function _i(){if(Tl)return Di;Tl=1;var t=(Ol?Vl:(Ol=1,Vl=function(){}))();return Di=function(n){return n!==t&&n!==null},Di}function m0(){return Ml||(Ml=1,Ll=(Fl?Sl:(Fl=1,Sl=function(){try{return Object.keys("primitive"),!0}catch{return!1}}))()?Object.keys:(function(){if(Pl)return jl;Pl=1;var t=_i(),n=Object.keys;return jl=function(r){return n(t(r)?Object(r):r)}})()),Ll}function g0(){if(Il)return wi;Il=1;var t=m0(),n=(function(){if($l)return zl;$l=1;var o=_i();return zl=function(i){if(!o(i))throw new TypeError("Cannot use null or undefined");return i}})(),r=Math.max;return wi=function(o,i){var a,l,c,u=r(arguments.length,2);for(o=Object(n(o)),c=function(d){try{o[d]=i[d]}catch(f){a||(a=f)}},l=1;l<u;++l)t(i=arguments[l]).forEach(c);if(a!==void 0)throw a;return o},wi}function y0(){return Hl?Rl:(Hl=1,Rl=(Nl||(Nl=1,Al=function(){var t,n=Object.assign;return typeof n=="function"&&(n(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}),Al)()?Object.assign:g0())}function b0(){return Gl||(Gl=1,Jl=(function(){if(ql)return Wl;ql=1;var t="razdwatrzy";return Wl=function(){return typeof t.contains=="function"&&t.contains("dwa")===!0&&t.contains("foo")===!1}})()()?String.prototype.contains:(function(){if(Kl)return Bi;Kl=1;var t=String.prototype.indexOf;return Bi=function(n){return t.call(this,n,arguments[1])>-1},Bi})()),Jl}function C0(){if(Yl)return Ei.exports;Yl=1;var t=ec(),n=h0(),r=y0(),o=(function(){if(Ul)return xi;Ul=1;var l=_i(),c=Array.prototype.forEach,u=Object.create;return xi=function(d){var f=u(null);return c.call(arguments,(function(p){l(p)&&(function(h,m){var g;for(g in h)m[g]=h[g]})(Object(p),f)})),f},xi})(),i=b0(),a=Ei.exports=function(l,c){var u,d,f,p,h;return arguments.length<2||typeof l!="string"?(p=c,c=l,l=null):p=arguments[2],t(l)?(u=i.call(l,"c"),d=i.call(l,"e"),f=i.call(l,"w")):(u=f=!0,d=!1),h={value:c,configurable:u,enumerable:d,writable:f},p?r(o(p),h):h};return a.gs=function(l,c,u){var d,f,p,h;return typeof l!="string"?(p=u,u=c,c=l,l=null):p=arguments[3],t(c)?n(c)?t(u)?n(u)||(p=u,u=void 0):u=void 0:(p=c,c=u=void 0):c=void 0,t(l)?(d=i.call(l,"c"),f=i.call(l,"e")):(d=!0,f=!1),h={get:c,set:u,configurable:d,enumerable:f},p?r(o(p),h):h},Ei.exports}var v0=(Ql||(Ql=1,(function(t,n){var r,o,i,a,l,c,u,d=C0(),f=(Xl||(Xl=1,Zl=function(w){if(typeof w!="function")throw new TypeError(w+" is not a function");return w}),Zl),p=Function.prototype.apply,h=Function.prototype.call,m=Object.create,g=Object.defineProperty,y=Object.defineProperties,v=Object.prototype.hasOwnProperty,D={configurable:!0,enumerable:!1,writable:!0};o=function(w,b){var x,k;return f(b),k=this,r.call(this,w,x=function(){i.call(k,w,x),p.call(b,this,arguments)}),x.__eeOnceListener__=b,this},i=function(w,b){var x,k,E,B;if(f(b),!v.call(this,"__ee__"))return this;if(!(x=this.__ee__)[w])return this;if(typeof(k=x[w])=="object")for(B=0;E=k[B];++B)E!==b&&E.__eeOnceListener__!==b||(k.length===2?x[w]=k[B?0:1]:k.splice(B,1));else k!==b&&k.__eeOnceListener__!==b||delete x[w];return this},a=function(w){var b,x,k,E,B;if(v.call(this,"__ee__")&&(E=this.__ee__[w]))if(typeof E=="object"){for(x=arguments.length,B=new Array(x-1),b=1;b<x;++b)B[b-1]=arguments[b];for(E=E.slice(),b=0;k=E[b];++b)p.call(k,this,B)}else switch(arguments.length){case 1:h.call(E,this);break;case 2:h.call(E,this,arguments[1]);break;case 3:h.call(E,this,arguments[1],arguments[2]);break;default:for(x=arguments.length,B=new Array(x-1),b=1;b<x;++b)B[b-1]=arguments[b];p.call(E,this,B)}},l={on:r=function(w,b){var x;return f(b),v.call(this,"__ee__")?x=this.__ee__:(x=D.value=m(null),g(this,"__ee__",D),D.value=null),x[w]?typeof x[w]=="object"?x[w].push(b):x[w]=[x[w],b]:x[w]=b,this},once:o,off:i,emit:a},c={on:d(r),once:d(o),off:d(i),emit:d(a)},u=y({},c),t.exports=n=function(w){return w==null?m(u):y(Object(w),c)},n.methods=l})(ki,ki.exports)),ki.exports),D0=qt(v0);function Kr(t){var n=za.get(t);return n==null&&(n=D0(),za.set(t,n)),n}var Jr=new WeakMap;function tc(t,n){var r=Jr.get(t);r==null&&(r=new Set,Jr.set(t,r)),r.add(n)}var w0=function(t){var n=t;return n.on=function(r,o){var i=Kr(n);if(i.on(r,o),r==="destroyed"&&tc(n,o),r!=="destroyed"){var a=function(){return i.off(r,o)};i.on("destroyed",a),tc(n,a)}},n.once=function(r,o){Kr(n).once(r,o)},n.off=function(r,o){Kr(n).off(r,o)},n.emit=function(r){for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];var a=Kr(n);if(a.emit.apply(a,ke([r],$(o),!1)),r==="destroyed"){var l=(function(c){return Jr.get(c)||new Set})(n);l.forEach((function(c){return a.off("destroyed",c)})),(function(c){Jr.set(c,new Set)})(n)}},n};function x0(t){return gn(this,void 0,void 0,(function(){var n,r,o;return yn(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,fetch(t)];case 1:if(!(n=i.sent()).ok)throw new Error("Failed to fetch blob URL");return[4,n.blob()];case 2:return r=i.sent(),[2,new Promise((function(a,l){var c=new FileReader;c.onloadend=function(){a(c.result)},c.onerror=function(){l(new Error("Failed to read blob as data URL"))},c.readAsDataURL(r)}))];case 3:return o=i.sent(),console.error(o),[2,null];case 4:return[2]}}))}))}var B0=function(t){var n=t;return n.setFragmentData=function(r){var o=n.selection;if(o){var i=$(j.edges(o),2),a=i[0],l=i[1],c=C.void(n,{at:a.path}),u=C.void(n,{at:l.path});if(!j.isCollapsed(o)||c){var d=S.toDOMRange(n,o),f=d.cloneContents(),p=f.childNodes[0];if(f.childNodes.forEach((function(x){x.textContent&&x.textContent.trim()!==""&&(p=x)})),u){var h=$(u,1)[0],m=d.cloneRange(),g=S.toDOMNode(n,h);m.setEndAfter(g),f=m.cloneContents()}if(c&&(p=f.querySelector("[data-slate-spacer]")),Array.from(f.querySelectorAll("[data-slate-zero-width]")).forEach((function(x){var k=x.getAttribute("data-slate-zero-width")==="n";x.textContent=k?`
|
|
16
|
+
`:""})),$t(p)){var y=p.ownerDocument.createElement("span");y.style.whiteSpace="pre",y.appendChild(p),f.appendChild(y),p=y}var v=n.getFragment(),D=JSON.stringify(v),w=window.btoa(encodeURIComponent(D));p.setAttribute("data-slate-fragment",w),r.setData("application/x-slate-fragment",w);var b=f.ownerDocument.createElement("div");return b.appendChild(f),b.setAttribute("hidden","true"),f.ownerDocument.body.appendChild(b),r.setData("text/html",b.innerHTML),r.setData("text/plain",el(b)),f.ownerDocument.body.removeChild(b),r}}},n.insertData=function(r){return gn(void 0,void 0,void 0,(function(){var o,i,a,l,c,u,d,f,p,h,m,g,y,v,D;return yn(this,(function(w){switch(w.label){case 0:return(o=r.getData("application/x-slate-fragment"))?(i=decodeURIComponent(window.atob(o)),a=JSON.parse(i),n.insertFragment(a),[2]):(l=r.getData("text/plain"),c=r.getData("text/html"),wn?(u=(function(b){var x=b.match(/<img[^>]*src=["'](blob:[^"']+)["'][^>]*>/i);return x?x[1]:null})(c),u?[4,x0(u)]:[3,2]):[3,2]);case 1:(d=w.sent())&&(c='<img src="'.concat(d,'" alt="image.png">'),URL.revokeObjectURL(u)),w.label=2;case 2:if(c)return n.dangerouslyInsertHtml(c),[2];if(f=S.getLeftLengthOfMaxLength(n),l){p=l.split(/\n\r|\r\n|\r|\n/),h=!1;try{for(m=at(p),g=m.next();!g.done;g=m.next())y=g.value,h&&f>0&&O.splitNodes(n,{always:!0}),n.insertText(y),h=!0}catch(b){v={error:b}}finally{try{g&&!g.done&&(D=m.return)&&D.call(m)}finally{if(v)throw v.error}}}return[2]}}))}))},n},k0=function(t){var n=t,r=n.insertText,o=n.insertNode,i=n.insertFragment,a=n.dangerouslyInsertHtml;return n.insertText=function(l){if(n.getConfig().maxLength){var c=S.getLeftLengthOfMaxLength(n);c<=0||(c<l.length?r(l.slice(0,c)):r(l))}else r(l)},n.insertNode=function(l){if(n.getConfig().maxLength){var c=S.getLeftLengthOfMaxLength(n);c<=0||c<H.string(l).length||o(l)}else o(l)},n.insertFragment=function(l){if(n.getConfig().maxLength){if(l.length>0){var c=l[0];if(S.getLeftLengthOfMaxLength(n)<H.string(c).length)return;i([c]);for(var u=1;u<l.length;u+=1)n.insertNode(l[u])}}else i(l)},n.dangerouslyInsertHtml=function(l,c){if(l===void 0&&(l=""),c===void 0&&(c=!1),l)if(n.getConfig().maxLength){var u=S.getLeftLengthOfMaxLength(n);if(!(u<=0)){var d=document.createElement("div");d.innerHTML=l,u<Array.from(d.childNodes).reduce((function(f,p){var h=p.nodeName;return p?$t(p)?f+(p.textContent||""):ft(p)?Ia.has(h.toLowerCase())?f:f+(p.textContent||""):f:f}),"").length||a(l,c)}}else a(l,c)},n};function Ai(t){var n=S.getTextarea(t).$textAreaContainer,r=n.width(),o=n.height(),i=n.offset();return{top:i.top,left:i.left,width:r,height:o}}function Ni(t){var n={top:"0",left:"0"},r=t.selection;if(r==null)return n;var o=Ai(t);if(o==null)return n;var i=o.top,a=o.left,l=o.width,c=o.height,u=S.toDOMRange(t,r),d=u.getClientRects?u.getClientRects()[0]:null;if(d==null)return n;var f=d.height,p={},h=d.top-i,m=d.left-a;if(m>l/2){var g=l-m;p.right="".concat(g+5,"px")}else p.left="".concat(m+5,"px");if(h>c/2){var y=c-h;p.bottom="".concat(y+5,"px")}else{var v=h+f;v<0&&(v=0),p.top="".concat(v+5,"px")}return p}function Si(t,n,r){r===void 0&&(r="modal");var o={top:"0",left:"0"};if(t.selection==null)return o;var i=te.isElement(n)&&t.isVoid(n),a=te.isElement(n)&&t.isInline(n),l=vr.get(n);if(l==null)return o;var c=l.getBoundingClientRect(),u=c.top,d=c.left,f=c.height,p=c.width;if(i){var h=(function(B){var V=[];V.push(B);for(var T=0;V.length>0;){var P=V.pop();if(P==null||(T+=1)>1e4)break;var R=P.nodeName;if(P.nodeType===Ot.ELEMENT_NODE){var I=R.toLowerCase();if(Xg.includes(I)||I==="iframe"||I==="video")return P;var U=P.children||[],G=U.length;if(G)for(var W=G-1;W>=0;W-=1)V.push(U[W])}}return null})(l);if(h!=null){var m=h.getBoundingClientRect();u=m.top,f=m.height}}var g=Ai(t);if(g==null)return o;var y=g.top,v=g.left,D=g.width,w=g.height,b={},x=u-y,k=d-v;if(r==="bar")return b.left="".concat(k,"px"),x>40?b.bottom="".concat(w-x+5,"px"):b.top="".concat(x+f+5,"px"),b;if(r==="modal"){if(i?a?k>(D-p)/2?b.right="".concat(D-k+5,"px"):b.left="".concat(k+p+5,"px"):b.left="20px":b.left="".concat(k,"px"),i)(E=x)<0&&(E=0),b.top="".concat(E,"px");else if(x>(w-f)/2)b.bottom="".concat(w-x+5,"px");else{var E;(E=x+f)<0&&(E=0),b.top="".concat(E+5,"px")}return b}throw new Error("type '".concat(r,"' is invalid"))}function Fi(t,n){wt((function(){var r=Ai(t);if(r!=null){var o,i=r.top,a=r.left,l=r.width,c=r.height,u=n.offset(),d=u.top,f=u.left,p=n.width(),h=n.height(),m=d-i,g=f-a,y=n.attr("style");if(y.indexOf("top")>=0&&(o=m+h-c)>0){var v=n.css("top"),D=parseInt(v.toString(),10)-o;D<0&&(D=0),n.css("top","".concat(D,"px"))}if(y.indexOf("bottom")>=0&&d<0){var w=n.css("bottom"),b=parseInt(w.toString(),10)-Math.abs(d);n.css("bottom","".concat(b,"px"))}if(y.indexOf("left")>=0&&(o=g+p-l)>0){var x=n.css("left"),k=parseInt(x.toString(),10)-o;k<0&&(k=0),n.css("left","".concat(k,"px"))}if(y.indexOf("right")>=0&&f<0){var E=n.css("right"),B=parseInt(E.toString(),10)-Math.abs(f);n.css("right","".concat(B,"px"))}}}))}var Vi,nc,E0=function(t){var n=t;return n.select=function(r){O.select(n,r)},n.deselect=function(){var r=n.selection,o=S.findDocumentOrShadowRoot(n).getSelection();o&&o.rangeCount>0&&o.removeAllRanges(),r&&O.deselect(t)},n.move=function(r,o){o===void 0&&(o=!1),r&&(r<0||O.move(t,{distance:r,unit:"character",reverse:o}))},n.moveReverse=function(r){n.move(r,!0)},n.restoreSelection=function(){var r=ci.get(n);r!=null&&(n.focus(),O.select(n,r))},n.getSelectionPosition=function(){return Ni(n)},n.getNodePosition=function(r){return Si(n,r)},n.isSelectedAll=function(){var r=n.selection;if(r==null)return!1;var o=$(j.edges(r),2),i=o[0],a=o[1],l=$(C.edges(n,[]),2),c=l[0],u=l[1];return!(!ye.equals(i,c)||!ye.equals(a,u))},n.selectAll=function(){var r=C.start(n,[]),o=C.end(n,[]);O.select(n,{anchor:r,focus:o})},n},_0=(function(){if(nc)return Vi;nc=1;var t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,c=typeof qe=="object"&&qe&&qe.Object===Object&&qe,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),f=Object.prototype.toString,p=Math.max,h=Math.min,m=function(){return d.Date.now()};function g(v){var D=typeof v;return!!v&&(D=="object"||D=="function")}function y(v){if(typeof v=="number")return v;if((function(b){return typeof b=="symbol"||(function(x){return!!x&&typeof x=="object"})(b)&&f.call(b)==n})(v))return t;if(g(v)){var D=typeof v.valueOf=="function"?v.valueOf():v;v=g(D)?D+"":D}if(typeof v!="string")return v===0?v:+v;v=v.replace(r,"");var w=i.test(v);return w||a.test(v)?l(v.slice(2),w?2:8):o.test(v)?t:+v}return Vi=function(v,D,w){var b,x,k,E,B,V,T=0,P=!1,R=!1,I=!0;if(typeof v!="function")throw new TypeError("Expected a function");function U(oe){var re=b,ie=x;return b=x=void 0,T=oe,E=v.apply(ie,re)}function G(oe){var re=oe-V;return V===void 0||re>=D||re<0||R&&oe-T>=k}function W(){var oe=m();if(G(oe))return K(oe);B=setTimeout(W,(function(re){var ie=D-(re-V);return R?h(ie,k-(re-T)):ie})(oe))}function K(oe){return B=void 0,I&&b?U(oe):(b=x=void 0,E)}function X(){var oe=m(),re=G(oe);if(b=arguments,x=this,V=oe,re){if(B===void 0)return(function(ie){return T=ie,B=setTimeout(W,D),P?U(ie):E})(V);if(R)return B=setTimeout(W,D),U(V)}return B===void 0&&(B=setTimeout(W,D)),E}return D=y(D)||0,g(w)&&(P=!!w.leading,k=(R="maxWait"in w)?p(y(w.maxWait)||0,D):k,I="trailing"in w?!!w.trailing:I),X.cancel=function(){B!==void 0&&clearTimeout(B),T=0,b=V=x=B=void 0},X.flush=function(){return B===void 0?E:K(m())},X},Vi})(),rc=qt(_0);const A0={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,n){console&&console[t]&&console[t].apply(console,n)}};class Gr{constructor(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(n,r)}init(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||A0,this.options=r,this.debug=r.debug}log(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}warn(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}error(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"error","")}deprecate(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(n,r,o,i){return i&&!this.debug?null:(typeof n[0]=="string"&&(n[0]=`${o}${this.prefix} ${n[0]}`),this.logger[r](n))}create(n){return new Gr(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return(n=n||this.options).prefix=n.prefix||this.prefix,new Gr(this.logger,n)}}var Tt=new Gr;class Yr{constructor(){this.observers={}}on(n,r){return n.split(" ").forEach((o=>{this.observers[o]||(this.observers[o]=new Map);const i=this.observers[o].get(r)||0;this.observers[o].set(r,i+1)})),this}off(n,r){this.observers[n]&&(r?this.observers[n].delete(r):delete this.observers[n])}emit(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];this.observers[n]&&Array.from(this.observers[n].entries()).forEach((a=>{let[l,c]=a;for(let u=0;u<c;u++)l(...o)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((a=>{let[l,c]=a;for(let u=0;u<c;u++)l.apply(l,[n,...o])}))}}const Jn=()=>{let t,n;const r=new Promise(((o,i)=>{t=o,n=i}));return r.resolve=t,r.reject=n,r},oc=t=>t==null?"":""+t,N0=/###/g,ic=t=>t&&t.indexOf("###")>-1?t.replace(N0,"."):t,sc=t=>!t||typeof t=="string",Gn=(t,n,r)=>{const o=typeof n!="string"?n:n.split(".");let i=0;for(;i<o.length-1;){if(sc(t))return{};const a=ic(o[i]);!t[a]&&r&&(t[a]=new r),t=Object.prototype.hasOwnProperty.call(t,a)?t[a]:{},++i}return sc(t)?{}:{obj:t,k:ic(o[i])}},ac=(t,n,r)=>{const{obj:o,k:i}=Gn(t,n,Object);if(o!==void 0||n.length===1)return void(o[i]=r);let a=n[n.length-1],l=n.slice(0,n.length-1),c=Gn(t,l,Object);for(;c.obj===void 0&&l.length;)a=`${l[l.length-1]}.${a}`,l=l.slice(0,l.length-1),c=Gn(t,l,Object),c&&c.obj&&c.obj[`${c.k}.${a}`]!==void 0&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=r},Zr=(t,n)=>{const{obj:r,k:o}=Gn(t,n);if(r)return r[o]},lc=(t,n,r)=>{for(const o in n)o!=="__proto__"&&o!=="constructor"&&(o in t?typeof t[o]=="string"||t[o]instanceof String||typeof n[o]=="string"||n[o]instanceof String?r&&(t[o]=n[o]):lc(t[o],n[o],r):t[o]=n[o]);return t},xn=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var S0={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const F0=t=>typeof t=="string"?t.replace(/[&<>"'\/]/g,(n=>S0[n])):t,V0=[" ",",","?","!",";"],O0=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}(20),Oi=function(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[n])return t[n];const o=n.split(r);let i=t;for(let a=0;a<o.length;){if(!i||typeof i!="object")return;let l,c="";for(let u=a;u<o.length;++u)if(u!==a&&(c+=r),c+=o[u],l=i[c],l!==void 0){if(["string","number","boolean"].indexOf(typeof l)>-1&&u<o.length-1)continue;a+=u-a+1;break}i=l}return i},Xr=t=>t&&t.indexOf("_")>0?t.replace("_","-"):t;class cc extends Yr{constructor(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=n||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}removeNamespaces(n){const r=this.options.ns.indexOf(n);r>-1&&this.options.ns.splice(r,1)}getResource(n,r,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;n.indexOf(".")>-1?c=n.split("."):(c=[n,r],o&&(Array.isArray(o)?c.push(...o):typeof o=="string"&&a?c.push(...o.split(a)):c.push(o)));const u=Zr(this.data,c);return!u&&!r&&!o&&n.indexOf(".")>-1&&(n=c[0],r=c[1],o=c.slice(2).join(".")),u||!l||typeof o!="string"?u:Oi(this.data&&this.data[n]&&this.data[n][r],o,a)}addResource(n,r,o,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=[n,r];o&&(c=c.concat(l?o.split(l):o)),n.indexOf(".")>-1&&(c=n.split("."),i=r,r=c[1]),this.addNamespaces(r),ac(this.data,c,i),a.silent||this.emit("added",n,r,o,i)}addResources(n,r,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in o)(typeof o[a]=="string"||Array.isArray(o[a]))&&this.addResource(n,r,a,o[a],{silent:!0});i.silent||this.emit("added",n,r,o)}addResourceBundle(n,r,o,i,a){let l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[n,r];n.indexOf(".")>-1&&(c=n.split("."),i=o,o=r,r=c[1]),this.addNamespaces(r);let u=Zr(this.data,c)||{};l.skipCopy||(o=JSON.parse(JSON.stringify(o))),i?lc(u,o,a):u={...u,...o},ac(this.data,c,u),l.silent||this.emit("added",n,r,o)}removeResourceBundle(n,r){this.hasResourceBundle(n,r)&&delete this.data[n][r],this.removeNamespaces(r),this.emit("removed",n,r)}hasResourceBundle(n,r){return this.getResource(n,r)!==void 0}getResourceBundle(n,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(n,r)}:this.getResource(n,r)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const r=this.getDataByLanguage(n);return!!(r&&Object.keys(r)||[]).find((o=>r[o]&&Object.keys(r[o]).length>0))}toJSON(){return this.data}}var uc={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,n,r,o,i){return t.forEach((a=>{this.processors[a]&&(n=this.processors[a].process(n,r,o,i))})),n}};const dc={};class Qr extends Yr{constructor(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),((o,i,a)=>{o.forEach((l=>{i[l]&&(a[l]=i[l])}))})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Tt.create("translator")}changeLanguage(n){n&&(this.language=n)}exists(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(n==null)return!1;const o=this.resolve(n,r);return o&&o.res!==void 0}extractFromKey(n,r){let o=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const l=o&&n.indexOf(o)>-1,c=!(this.options.userDefinedKeySeparator||r.keySeparator||this.options.userDefinedNsSeparator||r.nsSeparator||((u,d,f)=>{d=d||"",f=f||"";const p=V0.filter((g=>d.indexOf(g)<0&&f.indexOf(g)<0));if(p.length===0)return!0;const h=O0.getRegExp(`(${p.map((g=>g==="?"?"\\?":g)).join("|")})`);let m=!h.test(u);if(!m){const g=u.indexOf(f);g>0&&!h.test(u.substring(0,g))&&(m=!0)}return m})(n,o,i));if(l&&!c){const u=n.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:n,namespaces:a};const d=n.split(o);(o!==i||o===i&&this.options.ns.indexOf(d[0])>-1)&&(a=d.shift()),n=d.join(i)}return typeof a=="string"&&(a=[a]),{key:n,namespaces:a}}translate(n,r,o){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),n==null)return"";Array.isArray(n)||(n=[String(n)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:l,namespaces:c}=this.extractFromKey(n[n.length-1],r),u=c[c.length-1],d=r.lng||this.language,f=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(f){const w=r.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${w}${l}`,usedKey:l,exactUsedKey:l,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${w}${l}`}return i?{res:l,usedKey:l,exactUsedKey:l,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:l}const p=this.resolve(n,r);let h=p&&p.res;const m=p&&p.usedKey||l,g=p&&p.exactUsedKey||l,y=Object.prototype.toString.apply(h),v=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject;if(D&&h&&typeof h!="string"&&typeof h!="boolean"&&typeof h!="number"&&["[object Number]","[object Function]","[object RegExp]"].indexOf(y)<0&&(typeof v!="string"||!Array.isArray(h))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,h,{...r,ns:c}):`key '${l} (${this.language})' returned an object instead of string.`;return i?(p.res=w,p.usedParams=this.getUsedParamsDetails(r),p):w}if(a){const w=Array.isArray(h),b=w?[]:{},x=w?g:m;for(const k in h)if(Object.prototype.hasOwnProperty.call(h,k)){const E=`${x}${a}${k}`;b[k]=this.translate(E,{...r,joinArrays:!1,ns:c}),b[k]===E&&(b[k]=h[k])}h=b}}else if(D&&typeof v=="string"&&Array.isArray(h))h=h.join(v),h&&(h=this.extendTranslation(h,n,r,o));else{let w=!1,b=!1;const x=r.count!==void 0&&typeof r.count!="string",k=Qr.hasDefaultValue(r),E=x?this.pluralResolver.getSuffix(d,r.count,r):"",B=r.ordinal&&x?this.pluralResolver.getSuffix(d,r.count,{ordinal:!1}):"",V=x&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),T=V&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${E}`]||r[`defaultValue${B}`]||r.defaultValue;!this.isValidLookup(h)&&k&&(w=!0,h=T),this.isValidLookup(h)||(b=!0,h=l);const P=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&b?void 0:h,R=k&&T!==h&&this.options.updateMissing;if(b||w||R){if(this.logger.log(R?"updateKey":"missingKey",d,u,l,R?T:h),a){const W=this.resolve(l,{...r,keySeparator:!1});W&&W.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let I=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let W=0;W<U.length;W++)I.push(U[W]);else this.options.saveMissingTo==="all"?I=this.languageUtils.toResolveHierarchy(r.lng||this.language):I.push(r.lng||this.language);const G=(W,K,X)=>{const oe=k&&X!==h?X:P;this.options.missingKeyHandler?this.options.missingKeyHandler(W,u,K,oe,R,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(W,u,K,oe,R,r),this.emit("missingKey",W,u,K,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?I.forEach((W=>{const K=this.pluralResolver.getSuffixes(W,r);V&&r[`defaultValue${this.options.pluralSeparator}zero`]&&K.indexOf(`${this.options.pluralSeparator}zero`)<0&&K.push(`${this.options.pluralSeparator}zero`),K.forEach((X=>{G([W],l+X,r[`defaultValue${X}`]||T)}))})):G(I,l,T))}h=this.extendTranslation(h,n,r,p,o),b&&h===l&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${l}`),(b||w)&&this.options.parseMissingKeyHandler&&(h=this.options.compatibilityAPI!=="v1"?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${l}`:l,w?h:void 0):this.options.parseMissingKeyHandler(h))}return i?(p.res=h,p.usedParams=this.getUsedParamsDetails(r),p):h}extendTranslation(n,r,o,i,a){var l=this;if(this.i18nFormat&&this.i18nFormat.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const d=typeof n=="string"&&(o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const h=n.match(this.interpolator.nestingRegexp);f=h&&h.length}let p=o.replace&&typeof o.replace!="string"?o.replace:o;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),n=this.interpolator.interpolate(n,p,o.lng||this.language||i.usedLng,o),d){const h=n.match(this.interpolator.nestingRegexp);f<(h&&h.length)&&(o.nest=!1)}!o.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(o.lng=this.language||i.usedLng),o.nest!==!1&&(n=this.interpolator.nest(n,(function(){for(var h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return a&&a[0]===m[0]&&!o.context?(l.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${r[0]}`),null):l.translate(...m,r)}),o)),o.interpolation&&this.interpolator.reset()}const c=o.postProcess||this.options.postProcess,u=typeof c=="string"?[c]:c;return n!=null&&u&&u.length&&o.applyPostProcessor!==!1&&(n=uc.handle(u,n,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),n}resolve(n){let r,o,i,a,l,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return typeof n=="string"&&(n=[n]),n.forEach((u=>{if(this.isValidLookup(r))return;const d=this.extractFromKey(u,c),f=d.key;o=f;let p=d.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const h=c.count!==void 0&&typeof c.count!="string",m=h&&!c.ordinal&&c.count===0&&this.pluralResolver.shouldUseIntlApi(),g=c.context!==void 0&&(typeof c.context=="string"||typeof c.context=="number")&&c.context!=="",y=c.lngs?c.lngs:this.languageUtils.toResolveHierarchy(c.lng||this.language,c.fallbackLng);p.forEach((v=>{this.isValidLookup(r)||(l=v,!dc[`${y[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(dc[`${y[0]}-${v}`]=!0,this.logger.warn(`key "${o}" for languages "${y.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach((D=>{if(this.isValidLookup(r))return;a=D;const w=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,f,D,v,c);else{let x;h&&(x=this.pluralResolver.getSuffix(D,c.count,c));const k=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(w.push(f+x),c.ordinal&&x.indexOf(E)===0&&w.push(f+x.replace(E,this.options.pluralSeparator)),m&&w.push(f+k)),g){const B=`${f}${this.options.contextSeparator}${c.context}`;w.push(B),h&&(w.push(B+x),c.ordinal&&x.indexOf(E)===0&&w.push(B+x.replace(E,this.options.pluralSeparator)),m&&w.push(B+k))}}let b;for(;b=w.pop();)this.isValidLookup(r)||(i=b,r=this.getResource(D,v,b,c))})))}))})),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:l}}isValidLookup(n){return!(n===void 0||!this.options.returnNull&&n===null||!this.options.returnEmptyString&&n==="")}getResource(n,r,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(n,r,o,i):this.resourceStore.getResource(n,r,o,i)}getUsedParamsDetails(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=n.replace&&typeof n.replace!="string";let i=o?n.replace:n;if(o&&n.count!==void 0&&(i.count=n.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!o){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(n){const r="defaultValue";for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&r===o.substring(0,12)&&n[o]!==void 0)return!0;return!1}}const Ti=t=>t.charAt(0).toUpperCase()+t.slice(1);class fc{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Tt.create("languageUtils")}getScriptPartFromCode(n){if(!(n=Xr(n))||n.indexOf("-")<0)return null;const r=n.split("-");return r.length===2?null:(r.pop(),r[r.length-1].toLowerCase()==="x"?null:this.formatLanguageCode(r.join("-")))}getLanguagePartFromCode(n){if(!(n=Xr(n))||n.indexOf("-")<0)return n;const r=n.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(n){if(typeof n=="string"&&n.indexOf("-")>-1){const r=["hans","hant","latn","cyrl","cans","mong","arab"];let o=n.split("-");return this.options.lowerCaseLng?o=o.map((i=>i.toLowerCase())):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Ti(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Ti(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=Ti(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}getBestMatchFromCodes(n){if(!n)return null;let r;return n.forEach((o=>{if(r)return;const i=this.formatLanguageCode(o);this.options.supportedLngs&&!this.isSupportedCode(i)||(r=i)})),!r&&this.options.supportedLngs&&n.forEach((o=>{if(r)return;const i=this.getLanguagePartFromCode(o);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find((a=>a===i?a:a.indexOf("-")<0&&i.indexOf("-")<0?void 0:a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1?a:void 0))})),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Array.isArray(n))return n;if(!r)return n.default||[];let o=n[r];return o||(o=n[this.getScriptPartFromCode(r)]),o||(o=n[this.formatLanguageCode(r)]),o||(o=n[this.getLanguagePartFromCode(r)]),o||(o=n.default),o||[]}toResolveHierarchy(n,r){const o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),i=[],a=l=>{l&&(this.isSupportedCode(l)?i.push(l):this.logger.warn(`rejecting language code not found in supportedLngs: ${l}`))};return typeof n=="string"&&(n.indexOf("-")>-1||n.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(n))):typeof n=="string"&&a(this.formatLanguageCode(n)),o.forEach((l=>{i.indexOf(l)<0&&a(this.formatLanguageCode(l))})),i}}let T0=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],j0={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const P0=["v1","v2","v3"],L0=["v4"],pc={zero:0,one:1,two:2,few:3,many:4,other:5};class M0{constructor(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=n,this.options=r,this.logger=Tt.create("pluralResolver"),this.options.compatibilityJSON&&!L0.includes(this.options.compatibilityJSON)||typeof Intl<"u"&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const o={};return T0.forEach((i=>{i.lngs.forEach((a=>{o[a]={numbers:i.nr,plurals:j0[i.fc]}}))})),o})(),this.pluralRulesCache={}}addRule(n,r){this.rules[n]=r}clearCache(){this.pluralRulesCache={}}getRule(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const o=Xr(n==="dev"?"en":n),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:o,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];const l=new Intl.PluralRules(o,{type:i});return this.pluralRulesCache[a]=l,l}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}needsPlural(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=this.getRule(n,r);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}getPluralFormsOfKey(n,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,o).map((i=>`${r}${i}`))}getSuffixes(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=this.getRule(n,r);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(((i,a)=>pc[i]-pc[a])).map((i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`)):o.numbers.map((i=>this.getSuffix(n,i,r))):[]}getSuffix(n,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(n,o);return i?this.shouldUseIntlApi()?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${n}`),"")}getSuffixRetroCompatible(n,r){const o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r));let i=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}shouldUseIntlApi(){return!P0.includes(this.options.compatibilityJSON)}}const hc=function(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],a=((l,c,u)=>{const d=Zr(l,u);return d!==void 0?d:Zr(c,u)})(t,n,r);return!a&&i&&typeof r=="string"&&(a=Oi(t,r,o),a===void 0&&(a=Oi(n,r,o))),a},ji=t=>t.replace(/\$/g,"$$$$");class z0{constructor(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Tt.create("interpolator"),this.options=n,this.format=n.interpolation&&n.interpolation.format||(r=>r),this.init(n)}init(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});const{escape:r,escapeValue:o,useRawValueToEscape:i,prefix:a,prefixEscaped:l,suffix:c,suffixEscaped:u,formatSeparator:d,unescapeSuffix:f,unescapePrefix:p,nestingPrefix:h,nestingPrefixEscaped:m,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:v,maxReplaces:D,alwaysFormat:w}=n.interpolation;this.escape=r!==void 0?r:F0,this.escapeValue=o===void 0||o,this.useRawValueToEscape=i!==void 0&&i,this.prefix=a?xn(a):l||"{{",this.suffix=c?xn(c):u||"}}",this.formatSeparator=d||",",this.unescapePrefix=f?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=h?xn(h):m||xn("$t("),this.nestingSuffix=g?xn(g):y||xn(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=D||1e3,this.alwaysFormat=w!==void 0&&w,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(r,o)=>r&&r.source===o?(r.lastIndex=0,r):new RegExp(o,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(n,r,o,i){let a,l,c;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=m=>{if(m.indexOf(this.formatSeparator)<0){const D=hc(r,u,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(D,void 0,o,{...i,...r,interpolationkey:m}):D}const g=m.split(this.formatSeparator),y=g.shift().trim(),v=g.join(this.formatSeparator).trim();return this.format(hc(r,u,y,this.options.keySeparator,this.options.ignoreJSONStructure),v,o,{...i,...r,interpolationkey:y})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,p=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>ji(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?ji(this.escape(m)):ji(m)}].forEach((m=>{for(c=0;a=m.regex.exec(n);){const g=a[1].trim();if(l=d(g),l===void 0)if(typeof f=="function"){const v=f(n,a,i);l=typeof v=="string"?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))l="";else{if(p){l=a[0];continue}this.logger.warn(`missed to pass in variable ${g} for interpolating ${n}`),l=""}else typeof l=="string"||this.useRawValueToEscape||(l=oc(l));const y=m.safeValue(l);if(n=n.replace(a[0],y),p?(m.regex.lastIndex+=l.length,m.regex.lastIndex-=a[0].length):m.regex.lastIndex=0,c++,c>=this.maxReplaces)break}})),n}nest(n,r){let o,i,a,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const c=(u,d)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const p=u.split(new RegExp(`${f}[ ]*{`));let h=`{${p[1]}`;u=p[0],h=this.interpolate(h,a);const m=h.match(/'/g),g=h.match(/"/g);(m&&m.length%2==0&&!g||g.length%2!=0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),d&&(a={...d,...a})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,y),`${u}${f}${h}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;o=this.nestingRegexp.exec(n);){let u=[];a={...l},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let d=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const f=o[1].split(this.formatSeparator).map((p=>p.trim()));o[1]=f.shift(),u=f,d=!0}if(i=r(c.call(this,o[1].trim(),a),a),i&&o[0]===n&&typeof i!="string")return i;typeof i!="string"&&(i=oc(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${n}`),i=""),d&&(i=u.reduce(((f,p)=>this.format(f,p,l.lng,{...l,interpolationkey:o[1].trim()})),i.trim())),n=n.replace(o[0],i),this.regexp.lastIndex=0}return n}}const Bn=t=>{const n={};return(r,o,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const l=o+JSON.stringify(a);let c=n[l];return c||(c=t(Xr(o),i),n[l]=c),c(r)}};class $0{constructor(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Tt.create("formatter"),this.options=n,this.formats={number:Bn(((r,o)=>{const i=new Intl.NumberFormat(r,{...o});return a=>i.format(a)})),currency:Bn(((r,o)=>{const i=new Intl.NumberFormat(r,{...o,style:"currency"});return a=>i.format(a)})),datetime:Bn(((r,o)=>{const i=new Intl.DateTimeFormat(r,{...o});return a=>i.format(a)})),relativetime:Bn(((r,o)=>{const i=new Intl.RelativeTimeFormat(r,{...o});return a=>i.format(a,o.range||"day")})),list:Bn(((r,o)=>{const i=new Intl.ListFormat(r,{...o});return a=>i.format(a)}))},this.init(n)}init(n){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(n,r){this.formats[n.toLowerCase().trim()]=r}addCached(n,r){this.formats[n.toLowerCase().trim()]=Bn(r)}format(n,r,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find((c=>c.indexOf(")")>-1))){const c=a.findIndex((u=>u.indexOf(")")>-1));a[0]=[a[0],...a.splice(1,c)].join(this.formatSeparator)}return a.reduce(((c,u)=>{const{formatName:d,formatOptions:f}=(p=>{let h=p.toLowerCase().trim();const m={};if(p.indexOf("(")>-1){const g=p.split("(");h=g[0].toLowerCase().trim();const y=g[1].substring(0,g[1].length-1);h==="currency"&&y.indexOf(":")<0?m.currency||(m.currency=y.trim()):h==="relativetime"&&y.indexOf(":")<0?m.range||(m.range=y.trim()):y.split(";").forEach((v=>{if(v){const[D,...w]=v.split(":"),b=w.join(":").trim().replace(/^'+|'+$/g,""),x=D.trim();m[x]||(m[x]=b),b==="false"&&(m[x]=!1),b==="true"&&(m[x]=!0),isNaN(b)||(m[x]=parseInt(b,10))}}))}return{formatName:h,formatOptions:m}})(u);if(this.formats[d]){let p=c;try{const h=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},m=h.locale||h.lng||i.locale||i.lng||o;p=this.formats[d](c,m,{...f,...i,...h})}catch(h){this.logger.warn(h)}return p}return this.logger.warn(`there was no format function for ${d}`),c}),n)}}class I0 extends Yr{constructor(n,r,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=n,this.store=r,this.services=o,this.languageUtils=o.languageUtils,this.options=i,this.logger=Tt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(o,i.backend,i)}queueLoad(n,r,o,i){const a={},l={},c={},u={};return n.forEach((d=>{let f=!0;r.forEach((p=>{const h=`${d}|${p}`;!o.reload&&this.store.hasResourceBundle(d,p)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?l[h]===void 0&&(l[h]=!0):(this.state[h]=1,f=!1,l[h]===void 0&&(l[h]=!0),a[h]===void 0&&(a[h]=!0),u[p]===void 0&&(u[p]=!0)))})),f||(c[d]=!0)})),(Object.keys(a).length||Object.keys(l).length)&&this.queue.push({pending:l,pendingCount:Object.keys(l).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(l),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(u)}}loaded(n,r,o){const i=n.split("|"),a=i[0],l=i[1];r&&this.emit("failedLoading",a,l,r),!r&&o&&this.store.addResourceBundle(a,l,o,void 0,void 0,{skipCopy:!0}),this.state[n]=r?-1:2,r&&o&&(this.state[n]=0);const c={};this.queue.forEach((u=>{((d,f,p)=>{const{obj:h,k:m}=Gn(d,f,Object);h[m]=h[m]||[],h[m].push(p)})(u.loaded,[a],l),((d,f)=>{d.pending[f]!==void 0&&(delete d.pending[f],d.pendingCount--)})(u,n),r&&u.errors.push(r),u.pendingCount!==0||u.done||(Object.keys(u.loaded).forEach((d=>{c[d]||(c[d]={});const f=u.loaded[d];f.length&&f.forEach((p=>{c[d][p]===void 0&&(c[d][p]=!0)}))})),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())})),this.emit("loaded",c),this.queue=this.queue.filter((u=>!u.done))}read(n,r,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,l=arguments.length>5?arguments[5]:void 0;if(!n.length)return l(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:n,ns:r,fcName:o,tried:i,wait:a,callback:l});this.readingCalls++;const c=(d,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}d&&f&&i<this.maxRetries?setTimeout((()=>{this.read.call(this,n,r,o,i+1,2*a,l)}),a):l(d,f)},u=this.backend[o].bind(this.backend);if(u.length!==2)return u(n,r,c);try{const d=u(n,r);d&&typeof d.then=="function"?d.then((f=>c(null,f))).catch(c):c(null,d)}catch(d){c(d)}}prepareLoading(n,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof n=="string"&&(n=this.languageUtils.toResolveHierarchy(n)),typeof r=="string"&&(r=[r]);const a=this.queueLoad(n,r,o,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach((l=>{this.loadOne(l)}))}load(n,r,o){this.prepareLoading(n,r,{},o)}reload(n,r,o){this.prepareLoading(n,r,{reload:!0},o)}loadOne(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const o=n.split("|"),i=o[0],a=o[1];this.read(i,a,"read",void 0,void 0,((l,c)=>{l&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,l),!l&&c&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,c),this.loaded(n,l,c)}))}saveMissing(n,r,o,i,a){let l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r))this.logger.warn(`did not save key "${o}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(o!=null&&o!==""){if(this.backend&&this.backend.create){const u={...l,isUpdate:a},d=this.backend.create.bind(this.backend);if(d.length<6)try{let f;f=d.length===5?d(n,r,o,i,u):d(n,r,o,i),f&&typeof f.then=="function"?f.then((p=>c(null,p))).catch(c):c(null,f)}catch(f){c(f)}else d(n,r,o,i,c,u)}n&&n[0]&&this.store.addResource(n[0],r,o,i)}}}const mc=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach((o=>{n[o]=r[o]}))}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),gc=t=>(typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),eo=()=>{};class Yn extends Yr{constructor(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;var o;if(super(),this.options=gc(n),this.services={},this.logger=Tt,this.modules={external:[]},o=this,Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach((i=>{typeof o[i]=="function"&&(o[i]=o[i].bind(o))})),r&&!this.isInitialized&&!n.isClone){if(!this.options.initImmediate)return this.init(n,r),this;setTimeout((()=>{this.init(n,r)}),0)}}init(){var n=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(o=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(typeof r.ns=="string"?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=mc();this.options={...i,...this.options,...gc(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const a=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){let u;this.modules.logger?Tt.init(a(this.modules.logger),this.options):Tt.init(null,this.options),this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=$0);const d=new fc(this.options);this.store=new cc(this.options.resources,this.options);const f=this.services;f.logger=Tt,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new M0(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!u||this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format||(f.formatter=a(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new z0(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new I0(a(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(function(p){for(var h=arguments.length,m=new Array(h>1?h-1:0),g=1;g<h;g++)m[g-1]=arguments[g];n.emit(p,...m)})),this.modules.languageDetector&&(f.languageDetector=a(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=a(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new Qr(this.services,this.options),this.translator.on("*",(function(p){for(var h=arguments.length,m=new Array(h>1?h-1:0),g=1;g<h;g++)m[g-1]=arguments[g];n.emit(p,...m)})),this.modules.external.forEach((p=>{p.init&&p.init(this)}))}if(this.format=this.options.interpolation.format,o||(o=eo),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((u=>{this[u]=function(){return n.store[u](...arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((u=>{this[u]=function(){return n.store[u](...arguments),n}}));const l=Jn(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),o(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:eo;const o=typeof n=="string"?n:this.language;if(typeof n=="function"&&(r=n),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=l=>{l&&l!=="cimode"&&this.services.languageUtils.toResolveHierarchy(l).forEach((c=>{c!=="cimode"&&i.indexOf(c)<0&&i.push(c)}))};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((l=>a(l))),this.options.preload&&this.options.preload.forEach((l=>a(l))),this.services.backendConnector.load(i,this.options.ns,(l=>{l||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),r(l)}))}else r(null)}reloadResources(n,r,o){const i=Jn();return typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=void 0),n||(n=this.languages),r||(r=this.options.ns),o||(o=eo),this.services.backendConnector.reload(n,r,(a=>{i.resolve(),o(a)})),i}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&uc.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(n&&this.languages&&!(["cimode","dev"].indexOf(n)>-1))for(let r=0;r<this.languages.length;r++){const o=this.languages[r];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}changeLanguage(n,r){var o=this;this.isLanguageChangingTo=n;const i=Jn();this.emit("languageChanging",n);const a=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},l=(u,d)=>{d?(a(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,i.resolve((function(){return o.t(...arguments)})),r&&r(u,(function(){return o.t(...arguments)}))},c=u=>{n||u||!this.services.languageDetector||(u=[]);const d=typeof u=="string"?u:this.services.languageUtils.getBestMatchFromCodes(u);d&&(this.language||a(d),this.translator.language||this.translator.changeLanguage(d),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(d)),this.loadResources(d,(f=>{l(f,d)}))};return n||!this.services.languageDetector||this.services.languageDetector.async?!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(n):c(this.services.languageDetector.detect()),i}getFixedT(n,r,o){var i=this;const a=function(l,c){let u;if(typeof c!="object"){for(var d=arguments.length,f=new Array(d>2?d-2:0),p=2;p<d;p++)f[p-2]=arguments[p];u=i.options.overloadTranslationOptionHandler([l,c].concat(f))}else u={...c};u.lng=u.lng||a.lng,u.lngs=u.lngs||a.lngs,u.ns=u.ns||a.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||o||a.keyPrefix);const h=i.options.keySeparator||".";let m;return m=u.keyPrefix&&Array.isArray(l)?l.map((g=>`${u.keyPrefix}${h}${g}`)):u.keyPrefix?`${u.keyPrefix}${h}${l}`:l,i.t(m,u)};return typeof n=="string"?a.lng=n:a.lngs=n,a.ns=r,a.keyPrefix=o,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const o=r.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const l=(c,u)=>{const d=this.services.backendConnector.state[`${c}|${u}`];return d===-1||d===0||d===2};if(r.precheck){const c=r.precheck(this,l);if(c!==void 0)return c}return!!this.hasResourceBundle(o,n)||!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!l(o,n)||i&&!l(a,n))}loadNamespaces(n,r){const o=Jn();return this.options.ns?(typeof n=="string"&&(n=[n]),n.forEach((i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)})),this.loadResources((i=>{o.resolve(),r&&r(i)})),o):(r&&r(),Promise.resolve())}loadLanguages(n,r){const o=Jn();typeof n=="string"&&(n=[n]);const i=this.options.preload||[],a=n.filter((l=>i.indexOf(l)<0&&this.services.languageUtils.isSupportedCode(l)));return a.length?(this.options.preload=i.concat(a),this.loadResources((l=>{o.resolve(),r&&r(l)})),o):(r&&r(),Promise.resolve())}dir(n){if(n||(n=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!n)return"rtl";const r=this.services&&this.services.languageUtils||new fc(mc());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(r.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new Yn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:eo;const o=n.forkResourceStore;o&&delete n.forkResourceStore;const i={...this.options,...n,isClone:!0},a=new Yn(i);return n.debug===void 0&&n.prefix===void 0||(a.logger=a.logger.clone(n)),["store","services","language"].forEach((l=>{a[l]=this[l]})),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},o&&(a.store=new cc(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Qr(a.services,i),a.translator.on("*",(function(l){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d<c;d++)u[d-1]=arguments[d];a.emit(l,...u)})),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ie=Yn.createInstance();Ie.createInstance=Yn.createInstance,Ie.createInstance,Ie.dir,Ie.init,Ie.loadResources,Ie.reloadResources,Ie.use,Ie.changeLanguage,Ie.getFixedT,Ie.t,Ie.exists,Ie.setDefaultNamespace,Ie.hasLoadedNamespace,Ie.loadNamespaces,Ie.loadLanguages;function kn(t,n){Ie.addResourceBundle(t,"translation",n,!0,!0)}function yc(t){return Ie.on("languageChanged",t),function(){return Ie.off("languageChanged",t)}}Ie.init({lng:"zh-CN",resources:{}});var se=Ie.t.bind(Ie);function to(t){if(t.removeAttr){t.removeAttr("width"),t.removeAttr("height"),t.removeAttr("fill"),t.removeAttr("class"),t.removeAttr("t"),t.removeAttr("p-id");var n=t.children();n.length&&to(n)}}function Pi(){return F('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function bc(){return F('<div class="w-e-bar-divider"></div>')}function Li(t,n,r,o,i){if(o===void 0&&(o=""),i===void 0&&(i=!1),n){if(o){var a=Ci?"cmd":"ctrl";o=o.replace("mod",a)}if(i)o&&(t.attr("data-tooltip",o),t.addClass("w-e-menu-tooltip-v5"),t.addClass("tooltip-right"));else{var l=o?"".concat(r,`
|
|
17
|
+
`).concat(o):r;t.attr("data-tooltip",l),t.addClass("w-e-menu-tooltip-v5")}}}var Mi=(function(){function t(n,r,o){o===void 0&&(o=!1);var i=this;this.$elem=F('<div class="w-e-bar-item"></div>'),this.$button=F('<button type="button"></button>'),this.disabled=!1,this.menu=r;var a=r.tag,l=r.width;if(a!=="button")throw new Error("Invalid tag '".concat(a,"', expected 'button'"));var c=r.title,u=r.hotkey,d=u===void 0?"":u,f=r.iconSvg,p=f===void 0?"":f,h=this.$button;if(p){var m=F(p);to(m),h.append(m)}else h.text(c);Li(h,p,c,d,o),o&&p&&h.append(F('<span class="title">'.concat(c,"</span>"))),l&&h.css("width","".concat(l,"px")),h.attr("data-menu-key",n),this.$elem.append(h),wt((function(){return i.init()}))}return t.prototype.init=function(){var n=this;this.setActive(),this.setDisabled(),this.$button.on("click",(function(r){r.preventDefault(),pt(n).hidePanelOrModal(),n.disabled||(n.exec(),n.onButtonClick())}))},t.prototype.exec=function(){var n=pt(this),r=this.menu,o=r.getValue(n);this.setIcon(),this.setTooltip(),r.exec(n,o)},t.prototype.setActive=function(){var n=pt(this),r=this.$button,o="active";this.menu.isActive(n)?r.addClass(o):r.removeClass(o)},t.prototype.setDisabled=function(){var n=pt(this),r=this.$button,o=this.menu.isDisabled(n);(n.selection==null||n.isDisabled())&&(o=!0),this.menu.alwaysEnable&&(o=!1);var i="disabled";o?r.addClass(i):r.removeClass(i),this.disabled=o},t.prototype.setIcon=function(){var n=pt(this),r=this.$button;if(this.menu.getIcon){var o=this.menu.getIcon(n);if(o){r.find("svg").remove();var i=F(o);to(i),r.append(i)}}},t.prototype.setTooltip=function(){var n=pt(this),r=this.$button;if(this.menu.getTitle){var o=this.menu.getTitle(n),i=this.menu.iconSvg;o&&i&&Li(r,i,o)}},t.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},t})(),R0=(function(t){function n(r,o,i){return i===void 0&&(i=!1),t.call(this,r,o,i)||this}return De(n,t),n.prototype.onButtonClick=function(){},n})(Mi),zi=(function(){function t(n){this.isShow=!1,this.showTime=0,this.record(n)}return t.prototype.record=function(n){var r=si.get(n);r==null&&(r=new Set,si.set(n,r)),r.add(this),br.set(this,n)},t.prototype.renderContent=function(n){var r=this.$elem;r.empty(),r.append(n);var o=this.genSelfElem();o&&r.append(o)},t.prototype.appendTo=function(n){var r=this.$elem;n.append(r)},t.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var n=br.get(this);n&&n.emit("modalOrPanelShow",this)}},t.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var n=br.get(this);n&&n.emit("modalOrPanelHide")}},t})(),H0=(function(t){function n(r){var o=t.call(this,r)||this;return o.type="dropPanel",o.$elem=F('<div class="w-e-drop-panel"></div>'),o}return De(n,t),n.prototype.genSelfElem=function(){return null},n})(zi),U0=(function(t){function n(r,o,i){i===void 0&&(i=!1);var a=t.call(this,r,o,i)||this;if(a.dropPanel=null,a.menu=o,o.showDropPanel){var l=Pi();a.$button.append(l)}return a}return De(n,t),n.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},n.prototype.handleDropPanel=function(){var r=this.menu;if(r.getPanelContentElem!=null){var o=pt(this);if(this.dropPanel==null){var i=new H0(o),a=r.getPanelContentElem(o);i.renderContent(a),i.appendTo(this.$elem),i.show(),this.dropPanel=i}else{var l=this.dropPanel;l.isShow?l.hide():(a=r.getPanelContentElem(o),l.renderContent(a),l.show())}var c=this.dropPanel;if(c.isShow){var u=this.$elem,d=u.offset().left,f=u.parents(".w-e-bar");d-f.offset().left>=f.width()/2?c.$elem.css({left:"none",right:"0"}):c.$elem.css({left:"0",right:"none"})}}},n})(Mi),W0=(function(t){function n(r,o){o===void 0&&(o=0);var i=t.call(this,r)||this;i.type="modal",i.$elem=F('<div class="w-e-modal"></div>'),i.width=0,o&&(i.width=o);var a=i.$elem;return a.on("click",(function(l){return l.stopPropagation()})),a.on("keyup",(function(l){l.code==="Escape"&&(i.hide(),r.restoreSelection())})),i}return De(n,t),n.prototype.genSelfElem=function(){var r=this,o=F('<span class="btn-close">'.concat('<svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg>',"</span>")),i=br.get(this);return o.on("click",(function(){r.hide(),i?.restoreSelection()})),o},n.prototype.setStyle=function(r){var o=this.width,i=this.$elem;i.attr("style",""),o&&i.css("width","".concat(o,"px")),i.css(r)},n})(zi);function $i(t,n,r){var o=F('<label class="babel-container"></label>');o.append("<span>".concat(t,"</span>"));var i=F('<input type="text" id="'.concat(n,'" placeholder="').concat("",'">'));return o.append(i),[o[0],i[0]]}function Cc(t,n){var r=F('<div class="button-container"></div>'),o=F('<button type="button" id="'.concat(t,'">').concat(n,"</button>"));return r.append(o),[r[0],o[0]]}var q0=(function(t){function n(r,o,i){i===void 0&&(i=!1);var a=t.call(this,r,o,i)||this;return a.$body=F("body"),a.modal=null,a.menu=o,a}return De(n,t),n.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},n.prototype.getPosition=function(){var r=pt(this),o=this.menu.getModalPositionNode(r);return te.isElement(o)?Si(r,o,"modal"):Ni(r)},n.prototype.handleModal=function(){var r=pt(this),o=this.menu;if(this.modal==null){var i=new W0(r,o.modalWidth);this.renderAndShowModal(i,!0),this.modal=i}else(i=this.modal).isShow?i.hide():this.renderAndShowModal(i,!1)},n.prototype.renderAndShowModal=function(r,o){o===void 0&&(o=!1);var i=pt(this),a=this.menu;if(a.getModalContentElem!=null){var l=S.getTextarea(i),c=S.getToolbar(i),u=(c?.getConfig()||{}).modalAppendToBody,d=a.getModalContentElem(i);if(r.renderContent(d),u)r.setStyle({left:"0",right:"0"});else{var f=this.getPosition();r.setStyle(f)}o&&(u?r.appendTo(this.$body):r.appendTo(l.$textAreaContainer)),r.show(),u||Fi(i,r.$elem),setTimeout((function(){i.blur()}))}},n})(Mi),K0=(function(t){function n(r,o){var i=t.call(this,r)||this;return i.type="selectList",i.$elem=F('<div class="w-e-select-list"></div>'),o&&i.$elem.css("width","".concat(o,"px")),i.$elem.on("click",(function(a){a.stopPropagation()})),i}return De(n,t),n.prototype.renderList=function(r){var o=this.$elem;o.empty();var i=F("<ul></ul>");r.forEach((function(a){var l=a.value,c=a.text,u=a.selected,d=a.styleForRenderMenuList,f=F('<li data-value="'.concat(l,'"></li>'));if(d&&f.css(d),u){var p=F('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');f.append(p),f.addClass("selected")}f.append(F('<span data-value="'.concat(l,'">').concat(c,"</span>"))),f.attr("title",c),i.append(f)})),o.append(i)},n.prototype.genSelfElem=function(){return null},n})(zi),J0=(function(){function t(n,r,o){o===void 0&&(o=!1);var i=this;this.$elem=F('<div class="w-e-bar-item"></div>'),this.$button=F('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var a=r.tag,l=r.title,c=r.width,u=r.iconSvg,d=u===void 0?"":u,f=r.hotkey,p=f===void 0?"":f;if(a!=="select")throw new Error("Invalid tag '".concat(a,"', expected 'select'"));var h=this.$button;c&&h.css("width","".concat(c,"px")),h.attr("data-menu-key",n),Li(h,d,l,p,o),this.$elem.append(h),this.menu=r,wt((function(){return i.init()}))}return t.prototype.init=function(){var n=this;this.setSelectedValue(),this.$button.on("click",(function(r){r.preventDefault(),pt(n).hidePanelOrModal(),n.trigger()}))},t.prototype.trigger=function(){var n=this,r=pt(this);if(!r.isDisabled()&&!this.disabled){var o=this.menu;if(this.selectList==null){this.selectList=new K0(r,o.selectPanelWidth);var i=this.selectList,a=o.getOptions(r);i.renderList(a),i.appendTo(this.$elem),i.show(),i.$elem.on("click","li",(function(l){var c=l.target;if(c!=null){l.preventDefault();var u=F(c).attr("data-value");n.onChange(u)}}))}else(i=this.selectList).isShow?i.hide():(a=o.getOptions(r),i.renderList(a),i.show())}},t.prototype.onChange=function(n){var r=pt(this),o=this.menu;o.exec&&o.exec(r,n)},t.prototype.setSelectedValue=function(){var n=pt(this),r=this.menu,o=r.getValue(n),i=(function(c,u){for(var d=c.length,f="",p=0;p<d;p++){var h=c[p];if(h.value===u){f=h.text;break}}return f})(r.getOptions(n),o.toString()),a=this.$button,l=Pi();a.empty(),a.text(i),a.append(l)},t.prototype.setDisabled=function(){var n=pt(this),r=this.menu.isDisabled(n),o=this.$button;(n.selection==null||n.isDisabled())&&(r=!0);var i="disabled";r?o.addClass(i):o.removeClass(i),this.disabled=r},t.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},t})(),vc=(function(){function t(n){this.$elem=F('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=F('<div class="w-e-bar-item-menus-container"></div>'),this.$button=F('<button type="button"></button>');var r=n.key,o=n.iconSvg,i=n.title,a=this.$elem,l=this.$button;if(o){var c=F(o);to(c),l.append(c)}else l.text(i);l.attr("data-menu-key",r);var u=Pi();l.append(u),a.append(l);var d=this.$container;a.append(d);var f=this.createObserver();this.observe(f)}return t.prototype.appendBarItem=function(n){var r=n.$elem;this.$container.append(r)},t.prototype.observe=function(n){var r=this.$container;n.observe(r[0],{childList:!0,subtree:!0,attributes:!0})},t.prototype.createObserver=function(){var n=this,r=this.$container,o=this.$button,i=new MutationObserver((function(){var a=r.find("button"),l=a.length;if(l!==0){var c=0;a.each((function(u){F(u).hasClass("disabled")&&c++})),i.disconnect(),c===l?o.addClass("disabled"):o.removeClass("disabled"),n.observe(i)}}));return i},t})(),Dc=new WeakMap;function pt(t){var n=ii.get(t);if(n==null)throw new Error("Can not get editor instance");return n}function wc(t,n,r){r===void 0&&(r=!1);var o=Dc.get(n);if(o)return o;var i=n.tag;if(i==="button"){var a=n.showDropPanel,l=n.showModal;o=a?new U0(t,n,r):l?new q0(t,n,r):new R0(t,n,r)}if(i==="select"&&(o=new J0(t,n,r)),o==null)throw new Error("Invalid tag in menu ".concat(JSON.stringify(n)));return Dc.set(n,o),o}function G0(t,n){var r=t.selection;return r!=null&&!j.isCollapsed(r)&&!S.getSelectedElems(t).some((function(o){if(t.isVoid(o))return!0;var i=o.type;return!!["pre","code","table"].includes(i)}))&&!!q.isText(n)}var xc,Bc,Y0=(function(){function t(){var n=this;this.$elem=F('<div class="w-e-bar w-e-bar-hidden w-e-hover-bar"></div>'),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.lngListen=function(){},this.changeHoverbarState=rc((function(){var r=n.isShow,o=n.getSelectedNodeAndMenuKeys()||{},i=o.node,a=i===void 0?null:i,l=o.menuKeys,c=l===void 0?[]:l;a!=null&&n.changeItemsState(),!(a&&te.isElement(a)&&r&&n.isSamePath(a,n.prevSelectedNode))&&(n.hideAndClean(),a!=null&&(n.registerItems(c),n.setPosition(a),n.show()),n.prevSelectedNode=a)}),200),wt((function(){var r=n.getEditorInstance(),o=n.$elem;o.on("mousedown",(function(a){return a.preventDefault()}),{passive:!1}),S.getTextarea(r).$textAreaContainer.append(o),r.on(dt.CHANGE,n.changeHoverbarState);var i=n.hideAndClean.bind(n);r.on(dt.SCROLL,i),r.on(dt.FULLSCREEN,i),r.on(dt.UNFULLSCREEN,i)})),this.lngListen=yc((function(){n.menus={},n.hideAndClean(),n.getEditorInstance().deselect()}))}return t.prototype.getMenus=function(){return this.menus},t.prototype.hideAndClean=function(){var n=this.$elem;n.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],n.empty(),this.isShow=!1},t.prototype.checkPositionBottom=function(){var n=this.$elem,r=!1,o=typeof window<"u"?window.innerHeight:null;o&&o>=360&&o-n[0].getBoundingClientRect().bottom<360&&(r=!0),r?n.addClass("w-e-bar-bottom"):n.removeClass("w-e-bar-bottom")},t.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},t.prototype.changeItemsState=function(){var n=this;wt((function(){n.hoverbarItems.forEach((function(r){r.changeMenuState()}))}))},t.prototype.registerItems=function(n){var r=this,o=this.$elem;n.forEach((function(i){if(i!=="|")r.registerSingleItem(i);else{var a=bc();o.append(a)}}))},t.prototype.registerSingleItem=function(n){var r=this.getEditorInstance(),o=this.menus,i=o[n];if(i==null){var a=$n[n];if(a==null)throw new Error("Not found menu item factory by key '".concat(n,"'"));if(typeof a!="function")throw new Error("Menu item factory (key='".concat(n,"') is not a function"));i=a(),o[n]=i}var l=r.getMenuConfig(n);l&&l.iconSvg!==void 0&&(i.iconSvg=l.iconSvg);var c=wc(n,i);this.hoverbarItems.push(c),ii.set(c,r),this.$elem.append(c.$elem)},t.prototype.setPosition=function(n){var r=this.getEditorInstance(),o=this.$elem;if(o.attr("style",""),te.isElement(n)){var i=Si(r,n,"bar");return o.css(i),void Fi(r,o)}if(q.isText(n))return i=Ni(r),o.css(i),void Fi(r,o);throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},t.prototype.getSelectedNodeAndMenuKeys=function(){var n=this.getEditorInstance();if(n.selection==null)return null;var r=this.getHoverbarKeysConf(),o=null,i=[],a=function(c){var u=r[c],d=u.match,f=u.menuKeys,p=f===void 0?[]:f,h=d||function(y,v){return S.checkNodeType(v,c)},m=$(C.nodes(n,{match:function(y){return h(n,y)},universal:!0}),1),g=m[0];if(g!=null)return o=g[0],i=p,"break"};for(var l in r)if(a(l)==="break")break;return o==null||i.length===0?null:{node:o,menuKeys:i}},t.prototype.getEditorInstance=function(){var n=oi.get(this);if(n==null)throw new Error("Can not get editor instance");return n},t.prototype.getHoverbarKeysConf=function(){var n=this.getEditorInstance().getConfig().hoverbarKeys,r=n===void 0?{}:n,o=r.text;return o&&o.match==null&&(o.match=G0),r},t.prototype.isSamePath=function(n,r){if(n==null||r==null)return!1;var o=S.findPath(null,n),i=S.findPath(null,r);return _.equals(o,i)},t.prototype.destroy=function(){var n;this.changeHoverbarState.cancel(),this.$elem.remove(),(n=this.lngListen)===null||n===void 0||n.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},t})(),Z0=(function(){if(Bc)return xc;Bc=1;var t="Expected a function",n=NaN,r="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,u=typeof qe=="object"&&qe&&qe.Object===Object&&qe,d=typeof self=="object"&&self&&self.Object===Object&&self,f=u||d||Function("return this")(),p=Object.prototype.toString,h=Math.max,m=Math.min,g=function(){return f.Date.now()};function y(w,b,x){var k,E,B,V,T,P,R=0,I=!1,U=!1,G=!0;if(typeof w!="function")throw new TypeError(t);function W(ie){var ce=k,Q=E;return k=E=void 0,R=ie,V=w.apply(Q,ce)}function K(ie){var ce=ie-P;return P===void 0||ce>=b||ce<0||U&&ie-R>=B}function X(){var ie=g();if(K(ie))return oe(ie);T=setTimeout(X,(function(ce){var Q=b-(ce-P);return U?m(Q,B-(ce-R)):Q})(ie))}function oe(ie){return T=void 0,G&&k?W(ie):(k=E=void 0,V)}function re(){var ie=g(),ce=K(ie);if(k=arguments,E=this,P=ie,ce){if(T===void 0)return(function(Q){return R=Q,T=setTimeout(X,b),I?W(Q):V})(P);if(U)return T=setTimeout(X,b),W(P)}return T===void 0&&(T=setTimeout(X,b)),V}return b=D(b)||0,v(x)&&(I=!!x.leading,B=(U="maxWait"in x)?h(D(x.maxWait)||0,b):B,G="trailing"in x?!!x.trailing:G),re.cancel=function(){T!==void 0&&clearTimeout(T),R=0,k=P=E=T=void 0},re.flush=function(){return T===void 0?V:oe(g())},re}function v(w){var b=typeof w;return!!w&&(b=="object"||b=="function")}function D(w){if(typeof w=="number")return w;if((function(k){return typeof k=="symbol"||(function(E){return!!E&&typeof E=="object"})(k)&&p.call(k)==r})(w))return n;if(v(w)){var b=typeof w.valueOf=="function"?w.valueOf():w;w=v(b)?b+"":b}if(typeof w!="string")return w===0?w:+w;w=w.replace(o,"");var x=a.test(w);return x||l.test(w)?c(w.slice(2),x?2:8):i.test(w)?n:+w}return xc=function(w,b,x){var k=!0,E=!0;if(typeof w!="function")throw new TypeError(t);return v(x)&&(k="leading"in x?!!x.leading:k,E="trailing"in x?!!x.trailing:E),y(w,b,{leading:k,maxWait:b,trailing:E})}})(),kc=qt(Z0);function xt(t,n){return rn(n)&&S.hasDOMNode(t,n,{editable:!0})}function Ec(t,n){if(t.getConfig().readOnly)return!1;var r=En(t,n)&&S.toSlateNode(t,n);return C.isVoid(t,r)}function En(t,n){return rn(n)&&S.hasDOMNode(t,n)}const _c=t=>typeof t=="object"&&t!=null&&t.nodeType===1,Ac=(t,n)=>(!n||t!=="hidden")&&t!=="visible"&&t!=="clip",Ii=(t,n)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const r=getComputedStyle(t,null);return Ac(r.overflowY,n)||Ac(r.overflowX,n)||(o=>{const i=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(o);return!!i&&(i.clientHeight<o.scrollHeight||i.clientWidth<o.scrollWidth)})(t)}return!1},no=(t,n,r,o,i,a,l,c)=>a<t&&l>n||a>t&&l<n?0:a<=t&&c<=r||l>=n&&c>=r?a-t-o:l>n&&c<r||a<t&&c>r?l-n+i:0,X0=t=>{const n=t.parentElement;return n??(t.getRootNode().host||null)},Nc=(t,n)=>{var r,o,i,a;if(typeof document>"u")return[];const{scrollMode:l,block:c,inline:u,boundary:d,skipOverflowHiddenElements:f}=n,p=typeof d=="function"?d:K=>K!==d;if(!_c(t))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,m=[];let g=t;for(;_c(g)&&p(g);){if(g=X0(g),g===h){m.push(g);break}g!=null&&g===document.body&&Ii(g)&&!Ii(document.documentElement)||g!=null&&Ii(g,f)&&m.push(g)}const y=(o=(r=window.visualViewport)==null?void 0:r.width)!=null?o:innerWidth,v=(a=(i=window.visualViewport)==null?void 0:i.height)!=null?a:innerHeight,{scrollX:D,scrollY:w}=window,{height:b,width:x,top:k,right:E,bottom:B,left:V}=t.getBoundingClientRect(),{top:T,right:P,bottom:R,left:I}=(K=>{const X=window.getComputedStyle(K);return{top:parseFloat(X.scrollMarginTop)||0,right:parseFloat(X.scrollMarginRight)||0,bottom:parseFloat(X.scrollMarginBottom)||0,left:parseFloat(X.scrollMarginLeft)||0}})(t);let U=c==="start"||c==="nearest"?k-T:c==="end"?B+R:k+b/2-T+R,G=u==="center"?V+x/2-I+P:u==="end"?E+P:V-I;const W=[];for(let K=0;K<m.length;K++){const X=m[K],{height:oe,width:re,top:ie,right:ce,bottom:Q,left:xe}=X.getBoundingClientRect();if(l==="if-needed"&&k>=0&&V>=0&&B<=v&&E<=y&&k>=ie&&B<=Q&&V>=xe&&E<=ce)return W;const ge=getComputedStyle(X),Je=parseInt(ge.borderLeftWidth,10),Ge=parseInt(ge.borderTopWidth,10),Ne=parseInt(ge.borderRightWidth,10),Ce=parseInt(ge.borderBottomWidth,10);let _e=0,Me=0;const nt="offsetWidth"in X?X.offsetWidth-X.clientWidth-Je-Ne:0,rt="offsetHeight"in X?X.offsetHeight-X.clientHeight-Ge-Ce:0,et="offsetWidth"in X?X.offsetWidth===0?0:re/X.offsetWidth:0,ot="offsetHeight"in X?X.offsetHeight===0?0:oe/X.offsetHeight:0;if(h===X)_e=c==="start"?U:c==="end"?U-v:c==="nearest"?no(w,w+v,v,Ge,Ce,w+U,w+U+b,b):U-v/2,Me=u==="start"?G:u==="center"?G-y/2:u==="end"?G-y:no(D,D+y,y,Je,Ne,D+G,D+G+x,x),_e=Math.max(0,_e+w),Me=Math.max(0,Me+D);else{_e=c==="start"?U-ie-Ge:c==="end"?U-Q+Ce+rt:c==="nearest"?no(ie,Q,oe,Ge,Ce+rt,U,U+b,b):U-(ie+oe/2)+rt/2,Me=u==="start"?G-xe-Je:u==="center"?G-(xe+re/2)+nt/2:u==="end"?G-ce+Ne+nt:no(xe,ce,re,Je,Ne+nt,G,G+x,x);const{scrollLeft:Re,scrollTop:mt}=X;_e=ot===0?0:Math.max(0,Math.min(mt+_e/ot,X.scrollHeight-oe/ot+rt)),Me=et===0?0:Math.max(0,Math.min(Re+Me/et,X.scrollWidth-re/et+nt)),U+=mt-_e,G+=Re-Me}W.push({el:X,top:_e,left:Me})}return W},Q0=t=>t===!1?{block:"end",inline:"nearest"}:(n=>n===Object(n)&&Object.keys(n).length!==0)(t)?t:{block:"start",inline:"nearest"};function Sc(t,n,r){r===void 0&&(r=!1);var o=n.selection,i=n.getConfig(),a=S.findDocumentOrShadowRoot(n).getSelection();if(a&&(!t.isComposing||r)&&n.isFocused()){var l=a.type!=="None";if(o||l){var c=ai.get(n),u=!1;if(c.contains(a.anchorNode)&&c.contains(a.focusNode)&&(u=!0),l&&u&&o){var d=S.toSlateRange(n,a,{exactMatch:!0,suppressThrow:!0});if(d&&j.equals(d,o)){var f=!0;if(j.isCollapsed(o)){var p=a.anchorNode,h=a.anchorOffset;if(p===c){var m=c.childNodes,g=void 0;(g=m[h])&&g.matches("table")&&(f=!1),(g=m[h-1])&&g.matches("table")&&(f=!1)}}if(f)return}}if(!o||S.hasRange(n,o)){t.isUpdatingSelection=!0;var y=o&&S.toDOMRange(n,o);if(y){j.isBackward(o)?a.setBaseAndExtent(y.endContainer,y.endOffset,y.startContainer,y.startOffset):a.setBaseAndExtent(y.startContainer,y.startOffset,y.endContainer,y.endOffset);var v=y.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")&&y.getBoundingClientRect){v.getBoundingClientRect=y.getBoundingClientRect.bind(y);var D=document.body;(function(w,b){if(!w.isConnected||!(E=>{let B=E;for(;B&&B.parentNode;){if(B.parentNode===document)return!0;B=B.parentNode instanceof ShadowRoot?B.parentNode.host:B.parentNode}return!1})(w))return;const x=(E=>{const B=window.getComputedStyle(E);return{top:parseFloat(B.scrollMarginTop)||0,right:parseFloat(B.scrollMarginRight)||0,bottom:parseFloat(B.scrollMarginBottom)||0,left:parseFloat(B.scrollMarginLeft)||0}})(w);if((E=>typeof E=="object"&&typeof E.behavior=="function")(b))return b.behavior(Nc(w,b));const k=typeof b=="boolean"||b==null?void 0:b.behavior;for(const{el:E,top:B,left:V}of Nc(w,Q0(b))){const T=B-x.top+x.bottom,P=V-x.left+x.right;E.scroll({top:T,left:P,behavior:k})}})(v,{scrollMode:"if-needed",boundary:i.scroll?c.parentElement:D,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else a.removeAllRanges();setTimeout((function(){y&&qn&&c.focus(),t.isUpdatingSelection=!1}))}else n.selection=S.toSlateRange(n,a,{exactMatch:!1,suppressThrow:!1})}}}var Ri=new WeakMap,Fc=new WeakMap,Vc,_t={},ro=(function(){if(Vc)return _t;Vc=1,Object.defineProperty(_t,"__esModule",{value:!0});for(var t=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),n={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},r={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:t?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},o={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=1;i<20;i++)o["f"+i]=111+i;function a(f,p,h){p&&!("byKey"in p)&&(h=p,p=null),Array.isArray(f)||(f=[f]);var m=f.map((function(y){return l(y,p)})),g=function(y){return m.some((function(v){return c(v,y)}))};return h==null?g:g(h)}function l(f,p){var h=p&&p.byKey,m={},g=(f=f.replace("++","+add")).split("+"),y=g.length;for(var v in n)m[n[v]]=!1;var D=!0,w=!1,b=void 0;try{for(var x,k=g[Symbol.iterator]();!(D=(x=k.next()).done);D=!0){var E=x.value,B=E.endsWith("?")&&E.length>1;B&&(E=E.slice(0,-1));var V=d(E),T=n[V];if(E.length>1&&!T&&!r[E]&&!o[V])throw new TypeError('Unknown modifier: "'+E+'"');y!==1&&T||(h?m.key=V:m.which=u(E)),T&&(m[T]=!B||null)}}catch(P){w=!0,b=P}finally{try{!D&&k.return&&k.return()}finally{if(w)throw b}}return m}function c(f,p){for(var h in f){var m=f[h],g=void 0;if(m!=null&&((g=h==="key"&&p.key!=null?p.key.toLowerCase():h==="which"?m===91&&p.which===93?91:p.which:p[h])!=null||m!==!1)&&g!==m)return!1}return!0}function u(f){return f=d(f),o[f]||f.toUpperCase().charCodeAt(0)}function d(f){return f=f.toLowerCase(),f=r[f]||f}return _t.default=a,_t.isHotkey=a,_t.isCodeHotkey=function(f,p){return a(f,p)},_t.isKeyHotkey=function(f,p){return a(f,{byKey:!0},p)},_t.parseHotkey=l,_t.compareHotkey=c,_t.toKeyCode=u,_t.toKeyName=d,_t})(),e1={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},t1={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},n1={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Fe=function(t){var n=e1[t],r=t1[t],o=n1[t],i=n&&ro.isKeyHotkey(n),a=r&&ro.isKeyHotkey(r),l=o&&ro.isKeyHotkey(o);return function(c){return!(!i||!i(c))||!!(Ci&&a&&a(c))||!(Ci||!l||!l(c))}},Oe={isBold:Fe("bold"),isCompose:Fe("compose"),isMoveBackward:Fe("moveBackward"),isMoveForward:Fe("moveForward"),isDeleteBackward:Fe("deleteBackward"),isDeleteForward:Fe("deleteForward"),isDeleteLineBackward:Fe("deleteLineBackward"),isDeleteLineForward:Fe("deleteLineForward"),isDeleteWordBackward:Fe("deleteWordBackward"),isDeleteWordForward:Fe("deleteWordForward"),isExtendBackward:Fe("extendBackward"),isExtendForward:Fe("extendForward"),isExtendLineBackward:Fe("extendLineBackward"),isExtendLineForward:Fe("extendLineForward"),isItalic:Fe("italic"),isMoveLineBackward:Fe("moveLineBackward"),isMoveLineForward:Fe("moveLineForward"),isMoveWordBackward:Fe("moveWordBackward"),isMoveWordForward:Fe("moveWordForward"),isRedo:Fe("redo"),isSplitBlock:Fe("splitBlock"),isTransposeCharacter:Fe("transposeCharacter"),isUndo:Fe("undo"),isTab:Fe("tab"),isSelectAll:Fe("selectAll")};function Ke(t){t.preventDefault()}var r1={beforeinput:function(t,n,r){var o=t,i=r.getConfig().readOnly;if(Kn&&!i&&xt(r,o.target)){var a=r.selection,l=o.inputType,c=o.dataTransfer||o.data||void 0;if(l!=="insertCompositionText"&&l!=="deleteCompositionText"){if(o.preventDefault(),!l.startsWith("delete")||l.startsWith("deleteBy")){var u=$(o.getTargetRanges(),1)[0];if(u){var d=S.toSlateRange(r,u,{exactMatch:!1,suppressThrow:!1});a&&j.equals(a,d)||O.select(r,d)}}if(a&&j.isExpanded(a)){var f=S.getSelectedElems(r),p=f[0].type==="table",h=f[f.length-1].type!=="table-cell";if(p&&h)return;if(l.startsWith("delete")){var m=l.endsWith("Backward")?"backward":"forward";return void C.deleteFragment(r,{direction:m})}}switch(l){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":C.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":C.deleteForward(r);break;case"deleteContentBackward":C.deleteBackward(r);break;case"deleteEntireSoftLine":C.deleteBackward(r,{unit:"line"}),C.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":C.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":C.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":C.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":C.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":C.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":C.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":C.insertBreak(r);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if(l==="insertFromPaste"&&!ui.get(r))break;Hn(c)==="[object DataTransfer]"?r.insertData(c):typeof c=="string"&&C.insertText(r,c)}}}},blur:function(t,n,r){var o=t,i=n.isUpdatingSelection,a=n.latestElement;if(!r.getConfig().readOnly&&!i&&xt(r,o.target)){var l=S.findDocumentOrShadowRoot(r);if(a!==l.activeElement){var c=o.relatedTarget;if(!(c===S.toDOMNode(r,r)||ft(c)&&c.hasAttribute("data-slate-spacer"))){if(c!=null&&rn(c)&&S.hasDOMNode(r,c)){var u=S.toSlateNode(r,c);if(te.isElement(u)&&!r.isVoid(u))return}if(wn){var d=l.getSelection();d?.removeAllRanges()}tn.delete(r)}}}},focus:function(t,n,r){var o=S.toDOMNode(r,r),i=S.findDocumentOrShadowRoot(r);n.latestElement=i.activeElement,qn&&t.target!==o?o.focus():tn.set(r,!0)},click:function(t,n,r){if(!r.getConfig().readOnly&&En(r,t.target)&&rn(t.target)){var o=S.toSlateNode(r,t.target),i=S.findPath(r,o);if(C.hasPath(r,i)&&H.get(r,i)===o){var a=C.start(r,i),l=C.end(r,i),c=C.void(r,{at:a}),u=C.void(r,{at:l});if(c&&u&&_.equals(c[1],u[1])){var d=C.range(r,a);O.select(r,d)}}}},compositionstart:function(t,n,r){if(xt(r,t.target)){var o=r.selection;if(o&&j.isExpanded(o)&&(C.deleteFragment(r),Promise.resolve().then((function(){Sc(n,r,!0)}))),r.selection){var i=S.toDOMRange(r,r.selection).startContainer,a=i.textContent||"";Ri.set(r,a),Fc.set(r,i)}n.isComposing=!0,(function(l,c){var u;c.getConfig().placeholder&&c.isEmpty()&&l.showPlaceholder&&((u=l.$placeholder)===null||u===void 0||u.hide(),l.showPlaceholder=!1)})(n,r)}},compositionend:function(t,n,r){var o=t;if(xt(r,o.target)){n.isComposing=!1;var i=r.selection;if(i!=null){(vi||qn)&&S.cleanExposedTexNodeInSelectionBlock(r);for(var a=j.isBackward(i)?i.focus:i.anchor,l=$(C.node(r,[a.path[0]]),1)[0],c=0;c<a.path.length;c+=1){var u=$(C.node(r,a.path.slice(0,c+1)),1)[0];if(te.isElement(u)&&((wn||qn)&&u.type==="link"||u.type==="code")){S.setNewKey(l);break}}var d=o.data;if(d){if(r.getConfig().maxLength){var f=S.getLeftLengthOfMaxLength(r);if(f<d.length){var p=S.toDOMRange(r,i);p.startContainer.nodeType===Node.TEXT_NODE&&(p.startContainer.textContent=Ri.get(r)||""),f>0&&C.insertText(r,d.slice(0,f)),n.changeViewState()}else C.insertText(r,d)}else{var h=S.findDocumentOrShadowRoot(r).getSelection();h&&(function(m,g){if(j.isCollapsed(g)){var y=g.anchor,v=g.focus;if([2,3].includes(y.path.length)&&[2,3].includes(v.path.length)&&(y.offset===0||v.offset===0)){var D=C.node(m,y.path),w=y.offset===0?y.path:v.path,b=[w[0],w[1]-1];if(w[1]===0)return!1;var x=C.node(m,b);if(q.isText(x[0])&&q.isText(D[0]))return!0}}})(r,i)&&(r.selection=S.toSlateRange(r,h,{exactMatch:!1,suppressThrow:!1})),C.insertText(r,d)}wn||setTimeout((function(){var m=r.selection;if(m!=null){var g=Fc.get(r);g!=null&&S.toDOMRange(r,m).startContainer!==g&&(g.textContent=Ri.get(r)||"")}}))}}}},compositionupdate:function(t,n,r){xt(r,t.target)&&(n.isComposing=!0)},keydown:function(t,n,r){var o=t,i=r.selection;if(!r.getConfig().readOnly&&!n.isComposing&&xt(r,o.target)){if((function(l,c){var u=gr.get(l),d=u&&u.getMenus(),f=yr.get(l),p=f&&f.getMenus(),h=me(me({},d),p);for(var m in h){var g=h[m],y=g.hotkey;if(y&&ro.isHotkey(y,c)&&!g.isDisabled(l)){var v=g.getValue(l);g.exec(l,v)}}})(r,o),Oe.isTab(o))return Ke(o),void r.handleTab();if(Oe.isRedo(o))return Ke(o),void(typeof r.redo=="function"&&r.redo());if(Oe.isUndo(o))return Ke(o),void(typeof r.undo=="function"&&r.undo());if(Oe.isMoveLineBackward(o))return Ke(o),void O.move(r,{unit:"line",reverse:!0});if(Oe.isMoveLineForward(o))return Ke(o),void O.move(r,{unit:"line"});if(Oe.isExtendLineBackward(o))return Ke(o),void O.move(r,{unit:"line",edge:"focus",reverse:!0});if(Oe.isExtendLineForward(o))return Ke(o),void O.move(r,{unit:"line",edge:"focus"});if(Oe.isMoveBackward(o))return Ke(o),void(i&&j.isCollapsed(i)?O.move(r,{reverse:!0}):O.collapse(r,{edge:"start"}));if(Oe.isMoveForward(o))return Ke(o),void(i&&j.isCollapsed(i)?O.move(r):O.collapse(r,{edge:"end"}));if(Oe.isMoveWordBackward(o))return Ke(o),i&&j.isExpanded(i)&&O.collapse(r,{edge:"focus"}),void O.move(r,{unit:"word",reverse:!0});if(Oe.isMoveWordForward(o))return Ke(o),i&&j.isExpanded(i)&&O.collapse(r,{edge:"focus"}),void O.move(r,{unit:"word"});if(Oe.isSelectAll(o))return Ke(o),void r.selectAll();if(Kn){if((vi||wn)&&i&&(Oe.isDeleteBackward(o)||Oe.isDeleteForward(o))&&j.isCollapsed(i)){var a=H.parent(r,i.anchor.path);if(te.isElement(a)&&C.isVoid(r,a)&&C.isInline(r,a))return o.preventDefault(),void O.delete(r,{unit:"block"})}}else{if(Oe.isBold(o)||Oe.isItalic(o)||Oe.isTransposeCharacter(o))return void Ke(o);if(Oe.isSplitBlock(o))return Ke(o),void C.insertBreak(r);if(Oe.isDeleteBackward(o))return Ke(o),void(i&&j.isExpanded(i)?C.deleteFragment(r,{direction:"backward"}):C.deleteBackward(r));if(Oe.isDeleteForward(o))return Ke(o),void(i&&j.isExpanded(i)?C.deleteFragment(r,{direction:"forward"}):C.deleteForward(r));if(Oe.isDeleteLineBackward(o))return Ke(o),void(i&&j.isExpanded(i)?C.deleteFragment(r,{direction:"backward"}):C.deleteBackward(r,{unit:"line"}));if(Oe.isDeleteLineForward(o))return Ke(o),void(i&&j.isExpanded(i)?C.deleteFragment(r,{direction:"forward"}):C.deleteForward(r,{unit:"line"}));if(Oe.isDeleteWordBackward(o))return Ke(o),void(i&&j.isExpanded(i)?C.deleteFragment(r,{direction:"backward"}):C.deleteBackward(r,{unit:"word"}));if(Oe.isDeleteWordForward(o))return Ke(o),void(i&&j.isExpanded(i)?C.deleteFragment(r,{direction:"forward"}):C.deleteForward(r,{unit:"word"}))}}},keypress:function(t,n,r){if(!Kn&&!r.getConfig().readOnly&&xt(r,t.target)){t.preventDefault();var o=t.key;C.insertText(r,o)}},copy:function(t,n,r){var o=t;if(xt(r,o.target)){r.getConfig().readOnly||o.preventDefault();var i=o.clipboardData;i!=null&&r.setFragmentData(i)}},cut:function(t,n,r){var o=t,i=r.selection;if(!r.getConfig().readOnly&&(o.preventDefault(),xt(r,o.target))){var a=o.clipboardData;if(a!=null&&(r.setFragmentData(a),i))if(j.isExpanded(i))C.deleteFragment(r);else{var l=H.parent(r,i.anchor.path);C.isVoid(r,l)&&O.delete(r)}}},paste:function(t,n,r){ui.set(r,!0);var o=t;if(!r.getConfig().readOnly&&xt(r,o.target)){var i=r.getConfig().customPaste;if(i&&i(r,o)===!1)return void ui.set(r,!1);if(!Kn||(function(l){return l.clipboardData&&l.clipboardData.getData("text/plain")!==""&&l.clipboardData.types.length===1})(o)){o.preventDefault();var a=o.clipboardData;a!=null&&r.insertData(a)}}},dragover:function(t,n,r){if(En(r,t.target)){var o=S.toSlateNode(r,t.target);C.isVoid(r,o)&&t.preventDefault()}},dragstart:function(t,n,r){var o=t;if(En(r,o.target)&&!r.getConfig().readOnly){var i=S.toSlateNode(r,o.target),a=S.findPath(r,i);if(C.isVoid(r,i)||C.void(r,{at:a,voids:!0})){var l=C.range(r,a);O.select(r,l)}var c=o.dataTransfer;c!=null&&(n.isDraggingInternally=!0,r.setFragmentData(c))}},dragend:function(t,n,r){var o=t;r.getConfig().readOnly||n.isDraggingInternally&&En(r,o.target)&&(n.isDraggingInternally=!1)},drop:function(t,n,r){var o=t,i=o.dataTransfer;if(!r.getConfig().readOnly&&En(r,o.target)&&i!=null&&!(Kn&&wn&&i.files.length>0)){o.preventDefault();var a=r.selection,l=S.findEventRange(r,o);O.select(r,l),n.isDraggingInternally&&(a&&O.delete(r,{at:a}),n.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}};const o1={createElement:function(t,n){return document.createElement(t,n)},createElementNS:function(t,n,r){return document.createElementNS(t,n,r)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,n,r){t.insertBefore(n,r)},removeChild:function(t,n){t.removeChild(n)},appendChild:function(t,n){t.appendChild(n)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,n){t.textContent=n},getTextContent:function(t){return t.textContent},isElement:function(t){return t.nodeType===1},isText:function(t){return t.nodeType===3},isComment:function(t){return t.nodeType===8}};function Zn(t,n,r,o,i){return{sel:t,data:n,children:r,text:o,elm:i,key:n===void 0?void 0:n.key}}const Hi=Array.isArray;function oo(t){return typeof t=="string"||typeof t=="number"||t instanceof String||t instanceof Number}function Ui(t){return t===void 0}function vt(t){return t!==void 0}const Oc=Zn("",{},[],void 0,void 0);function Xn(t,n){var r,o;const i=t.key===n.key,a=((r=t.data)===null||r===void 0?void 0:r.is)===((o=n.data)===null||o===void 0?void 0:o.is);return t.sel===n.sel&&i&&a}function i1(t,n,r){var o;const i={};for(let a=n;a<=r;++a){const l=(o=t[a])===null||o===void 0?void 0:o.key;l!==void 0&&(i[l]=a)}return i}const s1=["create","update","remove","destroy","pre","post"];function a1(t,n){const r={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},o=o1;for(const p of s1)for(const h of t){const m=h[p];m!==void 0&&r[p].push(m)}function i(p){const h=p.id?"#"+p.id:"",m=p.getAttribute("class"),g=m?"."+m.split(" ").join("."):"";return Zn(o.tagName(p).toLowerCase()+h+g,{},[],void 0,p)}function a(p,h){return function(){if(--h==0){const m=o.parentNode(p);o.removeChild(m,p)}}}function l(p,h){var m,g;let y,v=p.data;if(v!==void 0){const b=(m=v.hook)===null||m===void 0?void 0:m.init;vt(b)&&(b(p),v=p.data)}const D=p.children,w=p.sel;if(w==="!")Ui(p.text)&&(p.text=""),p.elm=o.createComment(p.text);else if(w!==void 0){const b=w.indexOf("#"),x=w.indexOf(".",b),k=b>0?b:w.length,E=x>0?x:w.length,B=b!==-1||x!==-1?w.slice(0,Math.min(k,E)):w,V=p.elm=vt(v)&&vt(y=v.ns)?o.createElementNS(y,B,v):o.createElement(B,v);for(k<E&&V.setAttribute("id",w.slice(k+1,E)),x>0&&V.setAttribute("class",w.slice(E+1).replace(/\./g," ")),y=0;y<r.create.length;++y)r.create[y](Oc,p);if(Hi(D))for(y=0;y<D.length;++y){const P=D[y];P!=null&&o.appendChild(V,l(P,h))}else oo(p.text)&&o.appendChild(V,o.createTextNode(p.text));const T=p.data.hook;vt(T)&&((g=T.create)===null||g===void 0||g.call(T,Oc,p),T.insert&&h.push(p))}else p.elm=o.createTextNode(p.text);return p.elm}function c(p,h,m,g,y,v){for(;g<=y;++g){const D=m[g];D!=null&&o.insertBefore(p,l(D,v),h)}}function u(p){var h,m;const g=p.data;if(g!==void 0){(m=(h=g?.hook)===null||h===void 0?void 0:h.destroy)===null||m===void 0||m.call(h,p);for(let y=0;y<r.destroy.length;++y)r.destroy[y](p);if(p.children!==void 0)for(let y=0;y<p.children.length;++y){const v=p.children[y];v!=null&&typeof v!="string"&&u(v)}}}function d(p,h,m,g){for(var y,v;m<=g;++m){let D,w;const b=h[m];if(b!=null)if(vt(b.sel)){u(b),D=r.remove.length+1,w=a(b.elm,D);for(let k=0;k<r.remove.length;++k)r.remove[k](b,w);const x=(v=(y=b?.data)===null||y===void 0?void 0:y.hook)===null||v===void 0?void 0:v.remove;vt(x)?x(b,w):w()}else o.removeChild(p,b.elm)}}function f(p,h,m){var g,y,v,D,w;const b=(g=h.data)===null||g===void 0?void 0:g.hook;(y=b?.prepatch)===null||y===void 0||y.call(b,p,h);const x=h.elm=p.elm,k=p.children,E=h.children;if(p!==h){if(h.data!==void 0){for(let B=0;B<r.update.length;++B)r.update[B](p,h);(D=(v=h.data.hook)===null||v===void 0?void 0:v.update)===null||D===void 0||D.call(v,p,h)}Ui(h.text)?vt(k)&&vt(E)?k!==E&&(function(B,V,T,P){let R,I,U,G,W=0,K=0,X=V.length-1,oe=V[0],re=V[X],ie=T.length-1,ce=T[0],Q=T[ie];for(;W<=X&&K<=ie;)oe==null?oe=V[++W]:re==null?re=V[--X]:ce==null?ce=T[++K]:Q==null?Q=T[--ie]:Xn(oe,ce)?(f(oe,ce,P),oe=V[++W],ce=T[++K]):Xn(re,Q)?(f(re,Q,P),re=V[--X],Q=T[--ie]):Xn(oe,Q)?(f(oe,Q,P),o.insertBefore(B,oe.elm,o.nextSibling(re.elm)),oe=V[++W],Q=T[--ie]):Xn(re,ce)?(f(re,ce,P),o.insertBefore(B,re.elm,oe.elm),re=V[--X],ce=T[++K]):(R===void 0&&(R=i1(V,W,X)),I=R[ce.key],Ui(I)?o.insertBefore(B,l(ce,P),oe.elm):(U=V[I],U.sel!==ce.sel?o.insertBefore(B,l(ce,P),oe.elm):(f(U,ce,P),V[I]=void 0,o.insertBefore(B,U.elm,oe.elm))),ce=T[++K]);(W<=X||K<=ie)&&(W>X?(G=T[ie+1]==null?null:T[ie+1].elm,c(B,G,T,K,ie,P)):d(B,V,W,X))})(x,k,E,m):vt(E)?(vt(p.text)&&o.setTextContent(x,""),c(x,null,E,0,E.length-1,m)):vt(k)?d(x,k,0,k.length-1):vt(p.text)&&o.setTextContent(x,""):p.text!==h.text&&(vt(k)&&d(x,k,0,k.length-1),o.setTextContent(x,h.text)),(w=b?.postpatch)===null||w===void 0||w.call(b,p,h)}}return function(p,h){let m,g,y;const v=[];for(m=0;m<r.pre.length;++m)r.pre[m]();for((function(D){return D.sel!==void 0})(p)||(p=i(p)),Xn(p,h)?f(p,h,v):(g=p.elm,y=o.parentNode(g),l(h,v),y!==null&&(o.insertBefore(y,h.elm,o.nextSibling(g)),d(y,[p],0,0))),m=0;m<v.length;++m)v[m].data.hook.insert(v[m]);for(m=0;m<r.post.length;++m)r.post[m]();return h}}function Tc(t,n,r){if(t.ns="http://www.w3.org/2000/svg",r!=="foreignObject"&&n!==void 0)for(let o=0;o<n.length;++o){const i=n[o].data;i!==void 0&&Tc(i,n[o].children,n[o].sel)}}function ht(t,n,r){let o,i,a,l={};if(r!==void 0?(n!==null&&(l=n),Hi(r)?o=r:oo(r)?i=r.toString():r&&r.sel&&(o=[r])):n!=null&&(Hi(n)?o=n:oo(n)?i=n.toString():n&&n.sel?o=[n]:l=n),o!==void 0)for(a=0;a<o.length;++a)oo(o[a])&&(o[a]=Zn(void 0,void 0,void 0,o[a],void 0));return t[0]!=="s"||t[1]!=="v"||t[2]!=="g"||t.length!==3&&t[3]!=="."&&t[3]!=="#"||Tc(l,o,t),Zn(t,l,o,i,void 0)}function jc(t,n){let r;const o=n.elm;let i=t.data.attrs,a=n.data.attrs;if((i||a)&&i!==a){for(r in i=i||{},a=a||{},a){const l=a[r];i[r]!==l&&(l===!0?o.setAttribute(r,""):l===!1?o.removeAttribute(r):r.charCodeAt(0)!==120?o.setAttribute(r,l):r.charCodeAt(3)===58?o.setAttributeNS("http://www.w3.org/XML/1998/namespace",r,l):r.charCodeAt(5)===58?o.setAttributeNS("http://www.w3.org/1999/xlink",r,l):o.setAttribute(r,l))}for(r in i)r in a||o.removeAttribute(r)}}const l1={create:jc,update:jc};function Pc(t,n){let r,o;const i=n.elm;let a=t.data.class,l=n.data.class;if((a||l)&&a!==l){for(o in a=a||{},l=l||{},a)a[o]&&!Object.prototype.hasOwnProperty.call(l,o)&&i.classList.remove(o);for(o in l)r=l[o],r!==a[o]&&i.classList[r?"add":"remove"](o)}}const c1={create:Pc,update:Pc},Lc=/[A-Z]/g;function Mc(t,n){const r=n.elm;let o,i=t.data.dataset,a=n.data.dataset;if(!i&&!a||i===a)return;i=i||{},a=a||{};const l=r.dataset;for(o in i)a[o]||(l?o in l&&delete l[o]:r.removeAttribute("data-"+o.replace(Lc,"-$&").toLowerCase()));for(o in a)i[o]!==a[o]&&(l?l[o]=a[o]:r.setAttribute("data-"+o.replace(Lc,"-$&").toLowerCase(),a[o]))}const u1={create:Mc,update:Mc};function zc(t,n,r){if(typeof t=="function")t.call(n,r,n);else if(typeof t=="object")for(let o=0;o<t.length;o++)zc(t[o],n,r)}function d1(t,n){const r=t.type,o=n.data.on;o&&o[r]&&zc(o[r],n,t)}function Wi(t,n){const r=t.data.on,o=t.listener,i=t.elm,a=n&&n.data.on,l=n&&n.elm;let c;if(r!==a){if(r&&o)if(a)for(c in r)a[c]||i.removeEventListener(c,o,!1);else for(c in r)i.removeEventListener(c,o,!1);if(a){const u=n.listener=t.listener||function d(f){d1(f,d.vnode)};if(u.vnode=n,r)for(c in a)r[c]||l.addEventListener(c,u,!1);else for(c in a)l.addEventListener(c,u,!1)}}}const f1={create:Wi,update:Wi,destroy:Wi};function $c(t,n){let r,o,i;const a=n.elm;let l=t.data.props,c=n.data.props;if((l||c)&&l!==c)for(r in l=l||{},c=c||{},c)o=c[r],i=l[r],i===o||r==="value"&&a[r]===o||(a[r]=o)}const p1={create:$c,update:$c},Ic=typeof window<"u"&&window.requestAnimationFrame.bind(window)||setTimeout,h1=function(t){Ic((function(){Ic(t)}))};let qi=!1;function m1(t,n,r){h1((function(){t[n]=r}))}function Rc(t,n){let r,o;const i=n.elm;let a=t.data.style,l=n.data.style;if(!a&&!l||a===l)return;a=a||{},l=l||{};const c="delayed"in a;for(o in a)l[o]||(o[0]==="-"&&o[1]==="-"?i.style.removeProperty(o):i.style[o]="");for(o in l)if(r=l[o],o==="delayed"&&l.delayed)for(const u in l.delayed)r=l.delayed[u],c&&r===a.delayed[u]||m1(i.style,u,r);else o!=="remove"&&r!==a[o]&&(o[0]==="-"&&o[1]==="-"?i.style.setProperty(o,r):i.style[o]=r)}const g1={pre:function(){qi=!1},create:Rc,update:Rc,destroy:function(t){let n,r;const o=t.elm,i=t.data.style;if(i&&(n=i.destroy))for(r in n)o.style[r]=n[r]},remove:function(t,n){const r=t.data.style;if(!r||!r.remove)return void n();let o;qi||(t.elm.offsetLeft,qi=!0);const i=t.elm;let a=0;const l=r.remove;let c=0;const u=[];for(o in l)u.push(o),i.style[o]=l[o];const d=getComputedStyle(i)["transition-property"].split(", ");for(;a<d.length;++a)u.indexOf(d[a])!==-1&&c++;i.addEventListener("transitionend",(function(f){f.target===i&&--c,c===0&&n()}))}};function Hc(t,n){for(const r of t)r!=null&&r!==!1&&r!==""&&(Array.isArray(r)?Hc(r,n):typeof r=="string"||typeof r=="number"||typeof r=="boolean"?n.push(Zn(void 0,void 0,void 0,String(r),void 0)):n.push(r));return n}function je(t,n,...r){const o=Hc(r,[]);return typeof t=="function"?t(n,o):o.length===1&&!o[0].sel&&o[0].text?ht(t,n,o[0].text):ht(t,n,o)}var Uc,Wc;je||(je={});var y1=(function(){if(Wc)return Uc;Wc=1;var t,n="[object Symbol]",r=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i="\\ud800-\\udfff",a="\\u0300-\\u036f\\ufe20-\\ufe23",l="\\u20d0-\\u20f0",c="\\u2700-\\u27bf",u="a-z\\xdf-\\xf6\\xf8-\\xff",d="A-Z\\xc0-\\xd6\\xd8-\\xde",f="\\ufe0e\\ufe0f",p="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",h="['’]",m="["+i+"]",g="["+p+"]",y="["+a+l+"]",v="\\d+",D="["+c+"]",w="["+u+"]",b="[^"+i+p+v+c+u+d+"]",x="\\ud83c[\\udffb-\\udfff]",k="[^"+i+"]",E="(?:\\ud83c[\\udde6-\\uddff]){2}",B="[\\ud800-\\udbff][\\udc00-\\udfff]",V="["+d+"]",T="\\u200d",P="(?:"+w+"|"+b+")",R="(?:"+V+"|"+b+")",I="(?:['’](?:d|ll|m|re|s|t|ve))?",U="(?:['’](?:D|LL|M|RE|S|T|VE))?",G="(?:"+y+"|"+x+")?",W="["+f+"]?",K=W+G+("(?:"+T+"(?:"+[k,E,B].join("|")+")"+W+G+")*"),X="(?:"+[D,E,B].join("|")+")"+K,oe="(?:"+[k+y+"?",y,E,B,m].join("|")+")",re=RegExp(h,"g"),ie=RegExp(y,"g"),ce=RegExp(x+"(?="+x+")|"+oe+K,"g"),Q=RegExp([V+"?"+w+"+"+I+"(?="+[g,V,"$"].join("|")+")",R+"+"+U+"(?="+[g,V+P,"$"].join("|")+")",V+"?"+P+"+"+I,V+"+"+U,v,X].join("|"),"g"),xe=RegExp("["+T+i+a+l+f+"]"),ge=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Je=typeof qe=="object"&&qe&&qe.Object===Object&&qe,Ge=typeof self=="object"&&self&&self.Object===Object&&self,Ne=Je||Ge||Function("return this")(),Ce=(t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(ue){return t?.[ue]});function _e(ue){return xe.test(ue)}function Me(ue){return _e(ue)?(function(le){return le.match(ce)||[]})(ue):(function(le){return le.split("")})(ue)}var nt=Object.prototype.toString,rt=Ne.Symbol,et=rt?rt.prototype:void 0,ot=et?et.toString:void 0;function Re(ue){if(typeof ue=="string")return ue;if((function(ve){return typeof ve=="symbol"||(function(Ee){return!!Ee&&typeof Ee=="object"})(ve)&&nt.call(ve)==n})(ue))return ot?ot.call(ue):"";var le=ue+"";return le=="0"&&1/ue==-1/0?"-0":le}function mt(ue,le,ve){var Ee=ue.length;return ve=ve===void 0?Ee:ve,!le&&ve>=Ee?ue:(function(Ue,Ve,Pe){var Ye=-1,Te=Ue.length;Ve<0&&(Ve=-Ve>Te?0:Te+Ve),(Pe=Pe>Te?Te:Pe)<0&&(Pe+=Te),Te=Ve>Pe?0:Pe-Ve>>>0,Ve>>>=0;for(var Le=Array(Te);++Ye<Te;)Le[Ye]=Ue[Ye+Ve];return Le})(ue,le,ve)}function He(ue){return ue==null?"":Re(ue)}var ze,Dt,Nt=(ze=function(ue,le,ve){return le=le.toLowerCase(),ue+(ve?jt(He(le).toLowerCase()):le)},function(ue){return(function(le,ve,Ee){for(var Ue=-1,Ve=le?le.length:0;++Ue<Ve;)Ee=ve(Ee,le[Ue],Ue,le);return Ee})((function(le,ve){return le=He(le),ve===void 0?(function(Ee){return ge.test(Ee)})(le)?(function(Ee){return Ee.match(Q)||[]})(le):(function(Ee){return Ee.match(r)||[]})(le):le.match(ve)||[]})((function(le){return(le=He(le))&&le.replace(o,Ce).replace(ie,"")})(ue).replace(re,"")),ze,"")}),jt=(Dt="toUpperCase",function(ue){var le=_e(ue=He(ue))?Me(ue):void 0,ve=le?le[0]:ue.charAt(0),Ee=le?mt(le,1).join(""):ue.slice(1);return ve[Dt]()+Ee});return Uc=Nt})(),b1=qt(y1),C1=["props","attrs","style","dataset","on","hook"];function qc(t){var n=t.data,r=n===void 0?{}:n,o=t.children,i=o===void 0?[]:o;Object.keys(r).forEach((function(a){var l,c,u=r[a];if(a!=="key"){if(!C1.includes(a)){if(a.startsWith("data-")){var d=a.slice(5);return d=b1(d),(function(f,p){f.data==null&&(f.data={});var h=f.data;h.dataset==null&&(h.dataset={}),Object.assign(h.dataset,p)})(t,((l={})[d]=u,l)),void delete r[a]}(function(f,p){f.data==null&&(f.data={});var h=f.data;h.props==null&&(h.props={}),Object.assign(h.props,p)})(t,(c={},c[a]=u,c)),delete r[a]}}else t.key=u})),i.length>0&&i.forEach((function(a){typeof a!="string"&&qc(a)}))}var Ki=[],Kc={};function v1(t,n,r){return je(r.isInline(t)?"span":"div",null,n)}function D1(t,n){var r,o=S.findKey(n,t),i=n.isInline(t),a=C.isVoid(n,t),l=cl(t.type,o.id),c={id:l,key:o.id,"data-slate-node":"element","data-slate-inline":i},u=t.type,d=t.children,f=d===void 0?[]:d,p=(function(D){return Kc[D]||v1})(u);r=a?null:f.map((function(D,w){return Gi(D,w,t,n)}));var h=p(t,r,n);if(a){c["data-slate-void"]=!0;var m=i?"span":"div",g=$(H.texts(t),1),y=$(g[0],1)[0],v=je(m,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},Gi(y,0,t,n));h=je(m,{style:{position:"relative"}},h,v),In.set(y,0),bn.set(y,t)}return h.data==null&&(h.data={}),Object.assign(h.data,c),a||i||(h=(function(D,w){var b=w;return Ki.forEach((function(x){b=x(D,w)})),b})(t,h)),wt((function(){var D=mi(l);D!=null&&(li.set(o,D),vr.set(t,D),Cr.set(D,t))})),h}function Jc(t,n){return n===void 0&&(n=!1),je("span",{"data-slate-string":!0},n?t+`
|
|
18
|
+
`:t)}function Ji(t,n){return t===void 0&&(t=0),n===void 0&&(n=!1),je("span",{"data-slate-zero-width":n?"n":"z","data-slate-length":t},"\uFEFF",n?je("br",null):null)}function w1(t,n,r){if(t.text==null)throw new Error("Current node is not slate Text ".concat(JSON.stringify(t)));var o=S.findKey(r,t),i=r.getConfig().decorate;if(i==null)throw new Error("Can not get config.decorate");var a,l=S.findPath(r,t),c=i([t,l]),u=q.decorations(t,c),d=u.map((function(h,m){var g=(function(y,v,D,w,b){v===void 0&&(v=!1);var x=y.text,k=S.findPath(b,D),E=_.parent(k);if(C.isEditor(w))throw new Error("Text node ".concat(JSON.stringify(D)," parent is Editor"));return b.isVoid(w)?Ji(H.string(w).length):x!==""||w.children[w.children.length-1]!==D||b.isInline(w)||C.string(b,E)!==""?x===""?Ji():v&&x.slice(-1)===`
|
|
19
|
+
`?Jc(x,!0):Jc(x):Ji(0,!0)})(h,m===u.length-1,t,n,r);return g=(function(y,v){var D=v;return Ki.forEach((function(w){D=w(y,D)})),D})(h,g),je("span",{"data-slate-leaf":!0},g)})),f=(a=o.id,"w-e-text-".concat(a)),p=je("span",{"data-slate-node":"text",id:f,key:o.id},d);return wt((function(){var h=mi(f);h!=null&&(li.set(o,h),vr.set(t,h),Cr.set(h,t))})),p}function Gi(t,n,r,o){return In.set(t,n),bn.set(t,r),te.isElement(t)?D1(t,o):w1(t,r,o)}function x1(t,n){var r,o,i=t.$scroll,a=(r=t.id,"w-e-textarea-".concat(r)),l=n.getConfig(),c=l.readOnly,u=l.autoFocus,d=(function(D,w){return w===void 0&&(w=!1),ht("div#".concat(D),{props:{contentEditable:!w}})})(a,c),f=n.children||[];d.children=f.map((function(D,w){var b=Gi(D,w,n,n);return qc(b),b}));var p=ja.get(t);if(p==null&&(p=!0),p){var h=(function(D){return F(`<div
|
|
20
20
|
id="`.concat(D,`"
|
|
21
21
|
data-slate-editor
|
|
22
22
|
data-slate-node="value"
|
|
@@ -25,18 +25,18 @@ You has disabled editor scroll, please do this yourself`,void console.warn(o)}va
|
|
|
25
25
|
spellCheck="true"
|
|
26
26
|
autoCorrect="true"
|
|
27
27
|
autoCapitalize="true"
|
|
28
|
-
></div>`))})(a);i.append(h),t.$textArea=h,o=h[0],(g=
|
|
29
|
-
`).concat(E))}},D)})(i);Ta.set(d,f);var p=f.hoverbarKeys,h=p===void 0?{}:p;if(u.forEach((function(D){d=D(d)})),(function(D,w){var b=w.html,x=w.content;b!=null&&(D.children=ll(D,b)),x&&x.length&&(D.children=x),D.children.length===0&&(D.children=[{type:"paragraph",children:[{text:""}]}])})(d,{html:l,content:a}),r){var m=new
|
|
30
|
-
`).concat(Yc.heightWarning.en),{element:D,height:D.height()})}));var g=void 0;Object.keys(h).length>0&&(g=new
|
|
31
|
-
重复注册了菜单栏 menu '`).concat(n,"'"));var u=o.getMenuConfig(n);u&&u.iconSvg!==void 0&&(l.iconSvg=u.iconSvg);var d=wc(n,l,i);this.toolbarItems.push(d),ii.set(d,o),i?r.appendBarItem(d):r.$toolbar.append(d.$elem)},t.prototype.getEditorInstance=function(){var n=ri.get(this);if(n==null)throw new Error("Can not get editor instance");return n},t.prototype.destroy=function(){var n;this.$toolbar.remove(),(n=this.lngListen)===null||n===void 0||n.call(this),this.menus={},this.toolbarItems=[]},t})();function
|
|
28
|
+
></div>`))})(a);i.append(h),t.$textArea=h,o=h[0],(g=a1([c1,p1,g1,u1,f1,l1]))(o,d),ja.set(t,!1),Pa.set(t,g)}else{var m=La.get(t),g=Pa.get(t);if(m==null||g==null)return;o=m.elm,g(m,d)}if(o!=null||(o=mi(a))!=null){var y;if((p?u:n.isFocused())&&o.focus({preventScroll:!0}),p){var v=(y=o)&&y.ownerDocument&&y.ownerDocument.defaultView||null;v&&Ma.set(n,v)}ai.set(n,o),vr.set(n,o),Cr.set(o,n),La.set(t,d)}}var B1=1,k1=(function(){function t(n){var r=this;this.id=B1++,this.$textArea=null,this.$progressBar=F('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=F('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=kc((function(){var l=r.editorInstance;(function(c,u){var d=c.isComposing,f=c.isUpdatingSelection,p=c.isDraggingInternally;if(!(u.getConfig().readOnly||d||f||p)){var h=S.findDocumentOrShadowRoot(u),m=h.activeElement,g=S.toDOMNode(u,u),y=h.getSelection();if(m!==g)return tn.delete(u),void O.deselect(u);if(c.latestElement=m,tn.set(u,!0),!y)return O.deselect(u);var v=y.anchorNode,D=y.focusNode,w=xt(u,v)||Ec(u,v),b=xt(u,D)||Ec(u,D);if(w&&b){var x=S.toSlateRange(u,y,{exactMatch:!1,suppressThrow:!1});O.select(u,x)}}})(r,l)}),100);var o=F(n);if(o.length===0)throw new Error("Cannot find textarea DOM by selector '".concat(n,"'"));this.$box=o;var i=F('<div class="w-e-text-container"></div>');i.append(this.$progressBar),i.append(this.$maxLengthInfo),o.append(i);var a=F('<div class="w-e-scroll"></div>');i.append(a),this.$scroll=a,this.$textAreaContainer=i,wt((function(){var l=r.editorInstance,c=S.getWindow(l);c.document.addEventListener("selectionchange",r.onDOMSelectionChange),l.on(dt.DESTROYED,(function(){c.document.removeEventListener("selectionchange",r.onDOMSelectionChange)})),i.on("click",(function(){return l.hidePanelOrModal()})),l.on(dt.CHANGE,r.changeViewState.bind(r));var u=l.getConfig(),d=u.onChange,f=u.scroll;d&&l.on(dt.CHANGE,(function(){return d(l)})),f||(o.css("position","relative"),i.addClass("no-scroll")),r.onFocusAndOnBlur(),l.on(dt.CHANGE,r.changeMaxLengthInfo.bind(r)),r.bindEvent()}))}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){var n=ni.get(this);if(n==null)throw new Error("Can not get editor instance");return n},enumerable:!1,configurable:!0}),t.prototype.bindEvent=function(){var n=this,r=this.$textArea,o=this.$scroll,i=this.editorInstance;r!=null&&(Va(r1,(function(a,l){r.on(l,(function(c){a(c,n,i)}))})),i.getConfig().scroll&&(o.css("overflow-y","auto"),o.on("scroll",kc((function(){i.emit("scroll")}),100))))},t.prototype.onFocusAndOnBlur=function(){var n=this,r=this.editorInstance,o=r.getConfig(),i=o.onBlur,a=o.onFocus;this.latestEditorSelection=r.selection,r.on(dt.CHANGE,(function(){n.latestEditorSelection==null&&r.selection!=null?setTimeout((function(){return a&&a(r)})):n.latestEditorSelection!=null&&r.selection==null&&setTimeout((function(){return i&&i(r)})),n.latestEditorSelection=r.selection}))},t.prototype.changeMaxLengthInfo=function(){var n=this.editorInstance,r=n.getConfig().maxLength;if(r){var o=r-S.getLeftLengthOfMaxLength(n);this.$maxLengthInfo[0].innerHTML="".concat(o,"/").concat(r)}},t.prototype.changeProgress=function(n){var r=this.$progressBar;r.css("width","".concat(n,"%")),n>=100&&setTimeout((function(){r.hide(),r.css("width","0"),r.show()}),1e3)},t.prototype.changeViewState=function(){var n=this,r=this.editorInstance;x1(this,r),(function(o,i){var a,l=i.getConfig().placeholder;if(l){var c=i.isEmpty();if(c&&!o.showPlaceholder&&!o.isComposing){if(o.$placeholder==null){var u=F('<div class="w-e-text-placeholder">'.concat(l,"</div>"));o.$textAreaContainer.append(u),o.$placeholder=u}return o.$placeholder.show(),void(o.showPlaceholder=!0)}!c&&o.showPlaceholder&&((a=o.$placeholder)===null||a===void 0||a.hide(),o.showPlaceholder=!1)}})(this,r),wt((function(){Sc(n,r)}))},t.prototype.destroy=function(){this.$textAreaContainer.remove()},t})();function Gc(t,n,r,o){if(In.set(t,n),bn.set(t,r),te.isElement(t)){var i=t.children;if((i===void 0?[]:i).forEach((function(c,u){return Gc(c,u,t,o)})),C.isVoid(o,t)){var a=$(H.texts(t),1),l=$(a[0],1)[0];In.set(l,0),bn.set(l,t)}}}var E1=300,Yc={heightWarning:{en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"}};function _1(t){var n=t.selector,r=n===void 0?"":n,o=t.config,i=o===void 0?{}:o,a=t.content,l=t.html,c=t.plugins,u=c===void 0?[]:c,d=(function(D){return[B0,f0,Gg,u0,E0,w0,k0,Hg].reduce((function(w,b){return b(w)}),D)})(Qm());if(r&&(function(D,w){return al(D,"data-w-e-textarea",w)})(d,r))throw new Error("Repeated create editor by selector '".concat(r,"'"));var f=(function(D){D===void 0&&(D={});var w=Fa(Oa),b={},x=D.MENU_CONF,k=x===void 0?{}:x;return Va(w,(function(E,B){b[B]=me(me({},E),k[B]||{})})),delete D.MENU_CONF,me({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:b,hoverbarKeys:{},customAlert:function(E,B){window.alert("".concat(B,`:
|
|
29
|
+
`).concat(E))}},D)})(i);Ta.set(d,f);var p=f.hoverbarKeys,h=p===void 0?{}:p;if(u.forEach((function(D){d=D(d)})),(function(D,w){var b=w.html,x=w.content;b!=null&&(D.children=ll(D,b)),x&&x.length&&(D.children=x),D.children.length===0&&(D.children=[{type:"paragraph",children:[{text:""}]}])})(d,{html:l,content:a}),r){var m=new k1(r);ti.set(d,m),ni.set(m,d),m.changeViewState(),wt((function(){var D=m.$scroll;D!=null&&D.height()<E1&&console.warn("".concat(Yc.heightWarning.zh,`
|
|
30
|
+
`).concat(Yc.heightWarning.en),{element:D,height:D.height()})}));var g=void 0;Object.keys(h).length>0&&(g=new Y0,oi.set(g,d),yr.set(d,g)),d.on(dt.CHANGE,(function(){d.hidePanelOrModal()})),d.on(dt.SCROLL,(function(){d.hidePanelOrModal()}))}else d.children.forEach((function(D,w){return Gc(D,w,d,d)}));var y=f.onCreated,v=f.onDestroyed;return y&&d.on(dt.CREATED,(function(){return y(d)})),v&&d.on(dt.DESTROYED,(function(){return v(d)})),wt((function(){return d.emit("created")})),d}var A1=(function(){function t(n,r){var o=this;this.$toolbar=F('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=rc((function(){o.toolbarItems.forEach((function(l){l.changeMenuState()}))}),200),this.config=r;var i=F(n);if(i.length===0)throw new Error("Cannot find toolbar DOM by selector '".concat(n,"'"));this.$box=i;var a=this.$toolbar;a.on("mousedown",(function(l){return l.preventDefault()}),{passive:!1}),i.append(a),wt((function(){o.initToolbar(),o.lngListen=yc((function(){return o.initToolbar()})),o.getEditorInstance().on(dt.CHANGE,o.changeToolbarState)}))}return t.prototype.getMenus=function(){return this.menus},t.prototype.getConfig=function(){return this.config},t.prototype.initToolbar=function(){this.menus={};var n=this.$toolbar;n?.empty(),this.registerItems(),this.changeToolbarState()},t.prototype.registerItems=function(){var n=this,r="",o=this.$toolbar,i=this.config,a=i.toolbarKeys,l=a===void 0?[]:a,c=i.insertKeys,u=c===void 0?{index:0,keys:[]}:c,d=i.excludeKeys,f=d===void 0?[]:d,p=Fa(l);u.keys.length>0&&(typeof u.keys=="string"&&(u.keys=[u.keys]),u.keys.forEach((function(g,y){p.splice(u.index+y,0,g)})));var h=p.filter((function(g){var y=typeof g=="string"?g:g.key;return!f.includes(y)})),m=h.length;h.forEach((function(g,y){if(g==="|"){if(y===0||y+1===m||r==="|")return;var v=bc();return o.append(v),void(r=g)}if(typeof g=="string")return n.registerSingleItem(g,n),void(r=g);n.registerGroup(g),r="group"}))},t.prototype.registerGroup=function(n){var r=this,o=this.$toolbar,i=(function(d){return new vc(d)})(n),a=n.menuKeys,l=a===void 0?[]:a,c=this.config.excludeKeys,u=c===void 0?[]:c;l.forEach((function(d){u.includes(d)||r.registerSingleItem(d,i)})),o.append(i.$elem)},t.prototype.registerSingleItem=function(n,r){var o=this.getEditorInstance(),i=r instanceof vc,a=this.menus,l=a[n];if(l==null){var c=$n[n];if(c==null)throw new Error("Not found menu item factory by key '".concat(n,"'"));if(typeof c!="function")throw new Error("Menu item factory (key='".concat(n,"') is not a function"));l=c(),a[n]=l}else console.warn("Duplicated toolbar menu key '".concat(n,`'
|
|
31
|
+
重复注册了菜单栏 menu '`).concat(n,"'"));var u=o.getMenuConfig(n);u&&u.iconSvg!==void 0&&(l.iconSvg=u.iconSvg);var d=wc(n,l,i);this.toolbarItems.push(d),ii.set(d,o),i?r.appendBarItem(d):r.$toolbar.append(d.$elem)},t.prototype.getEditorInstance=function(){var n=ri.get(this);if(n==null)throw new Error("Can not get editor instance");return n},t.prototype.destroy=function(){var n;this.$toolbar.remove(),(n=this.lngListen)===null||n===void 0||n.call(this),this.menus={},this.toolbarItems=[]},t})();function N1(t,n){if(t==null)throw new Error("Cannot create toolbar, because editor is null");var r=n.selector,o=n.config,i=o===void 0?{}:o;if((function(c,u){return al(c,"data-w-e-toolbar",u)})(t,r))throw new Error("Repeated create toolbar by selector '".concat(r,"'"));var a=me({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},i||{}),l=new A1(r,a);return ri.set(l,t),gr.set(t,l),l}kn("en",{editor:{more:"More",justify:"Justify",indent:"Indent",image:"Image",video:"Video"}}),kn("zh-CN",{editor:{more:"更多",justify:"对齐",indent:"缩进",image:"图片",video:"视频"}}),kn("en",{common:{ok:"OK",delete:"Delete",enter:"Enter"},blockQuote:{title:"Quote"},codeBlock:{title:"Code block"},color:{color:"Font color",bgColor:"Back color",default:"Default color",clear:"Clear back color"},divider:{title:"Divider"},emotion:{title:"Emotion"},fontSize:{title:"Font size",default:"Default"},fontFamily:{title:"Font family",default:"Default"},fullScreen:{title:"Full screen",cancelTitle:"Cancel full screen"},header:{title:"Header",text:"Text"},image:{netImage:"Net image",delete:"Delete image",edit:"Edit image",editSize:"Edit size",viewLink:"View link",src:"Image src",desc:"Description",link:"Image link",ok:"Ok",width:"Width",height:"Height"},indent:{decrease:"Decrease",increase:"Increase"},justify:{left:"Left",right:"Right",center:"Center",justify:"Justify"},lineHeight:{title:"Line height",default:"Default"},link:{insert:"Insert link",text:"Link text",url:"Link source",unLink:"Unlink",edit:"Edit link",view:"View link"},textStyle:{bold:"Bold",clear:"Clear styles",code:"Inline code",italic:"Italic",sub:"Sub",sup:"Sup",through:"Through",underline:"Underline"},undo:{undo:"undo",redo:"Redo"},todo:{todo:"Todo"},formatPainter:{title:"Format Painter"}}),kn("zh-CN",{common:{ok:"确定",delete:"删除",enter:"回车"},blockQuote:{title:"引用"},codeBlock:{title:"代码块"},color:{color:"文字颜色",bgColor:"背景色",default:"默认颜色",clear:"清除背景色"},divider:{title:"分割线"},emotion:{title:"表情"},fontSize:{title:"字号",default:"默认字号"},fontFamily:{title:"字体",default:"默认字体"},fullScreen:{title:"全屏",cancelTitle:"取消全屏"},header:{title:"标题",text:"正文"},image:{netImage:"网络图片",delete:"删除图片",edit:"编辑图片",editSize:"修改尺寸",viewLink:"查看链接",src:"图片地址",desc:"图片描述",link:"图片链接",ok:"确定",width:"宽度",height:"高度"},indent:{decrease:"减少缩进",increase:"增加缩进"},justify:{left:"左对齐",right:"右对齐",center:"居中对齐",justify:"两端对齐"},lineHeight:{title:"行高",default:"默认行高"},link:{insert:"插入链接",text:"链接文本",url:"链接地址",unLink:"取消链接",edit:"修改链接",view:"查看链接"},textStyle:{bold:"粗体",clear:"清除格式",code:"行内代码",italic:"斜体",sub:"下标",sup:"上标",through:"删除线",underline:"下划线"},undo:{undo:"撤销",redo:"重做"},todo:{todo:"待办"},formatPainter:{title:"格式刷"}});var Zc='<svg viewBox="0 0 1024 1024"><path d="M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z"></path></svg>';function Yi(t){return F("<div>".concat(t,"</div>")).children().filter((function(n){return n.tagName!=="BR"})).length===0}function _n(t){return t.length===0?"":t[0].outerHTML}function io(t){return t.length?t[0].tagName.toLowerCase():""}function It(t,n){for(var r="",o=(t.attr("style")||"").split(";"),i=o.length,a=0;a<i;a+=1){var l=o[a];if(l){var c=l.split(":");c[0].trim()===n&&(r=c[1].trim())}}return r}jr&&(F.fn.css=jr),vn&&(F.fn.append=vn),Ya&&(F.fn.prepend=Ya),Br&&(F.fn.addClass=Br),kr&&(F.fn.removeClass=kr),Er&&(F.fn.hasClass=Er),Sr&&(F.fn.on=Sr),Wa&&(F.fn.off=Wa),Ur&&(F.fn.focus=Ur),Cn&&(F.fn.attr=Cn),_r&&(F.fn.removeAttr=_r),Or&&(F.fn.hide=Or),Tr&&(F.fn.show=Tr),zr&&(F.fn.parents=zr),Ar&&(F.fn.dataset=Ar),Nr&&(F.fn.val=Nr),Lr&&(F.fn.text=Lr),Pr&&(F.fn.html=Pr),Ir&&(F.fn.children=Ir),Rr&&(F.fn.remove=Rr),$r&&(F.fn.find=$r),Fr&&(F.fn.width=Fr),Vr&&(F.fn.height=Vr),Ja&&(F.fn.filter=Ja),Hr&&(F.fn.empty=Hr);var Xc=(function(){function t(){this.tag="button",this.showDropPanel=!0,this.$content=null}return t.prototype.exec=function(n,r){},t.prototype.getValue=function(n){var r=this.mark,o=C.marks(n);return o&&o[r]?o[r]:""},t.prototype.isActive=function(n){return!!this.getValue(n)},t.prototype.isDisabled=function(n){if(n.selection==null)return!0;var r=$(C.nodes(n,{match:function(o){return S.getNodeType(o)==="pre"||!!C.isVoid(n,o)},universal:!0}),1);return!!r[0]},t.prototype.getPanelContentElem=function(n){var r=this.mark;if(this.$content==null){var o=F('<ul class="w-e-panel-content-color"></ul>');o.on("click","li",(function(d){var f=d.target;if(f!=null&&(d.preventDefault(),n.selection!=null)){var p=F(f).attr("data-value");p==="0"?C.removeMark(n,r):C.addMark(n,r,p)}})),this.$content=o}var i=this.$content;if(i==null)return document.createElement("ul");i.empty();var a=this.getValue(n),l=n.getMenuConfig(r).colors;(l===void 0?[]:l).forEach((function(d){var f=F('<div class="color-block" data-value="'.concat(d,'"></div>'));f.css("background-color",d);var p=F('<li data-value="'.concat(d,'"></li>'));a===d&&p.addClass("active"),p.append(f),i.append(p)}));var c="";r==="color"&&(c=se("color.default")),r==="bgColor"&&(c=se("color.clear"));var u=F(`
|
|
32
32
|
<li data-value="0" class="clear">
|
|
33
33
|
`.concat('<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>',`
|
|
34
34
|
`).concat(c,`
|
|
35
35
|
</li>
|
|
36
|
-
`));return i.prepend(u),i[0]},t})(),N1=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("color.bgColor"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M510.030769 315.076923l84.676923 196.923077h-177.230769l76.8-196.923077h15.753846zM945.230769 157.538462v708.923076c0 43.323077-35.446154 78.769231-78.769231 78.769231H157.538462c-43.323077 0-78.769231-35.446154-78.769231-78.769231V157.538462c0-43.323077 35.446154-78.769231 78.769231-78.769231h708.923076c43.323077 0 78.769231 35.446154 78.769231 78.769231z m-108.307692 643.938461L600.615385 216.615385c-5.907692-11.815385-15.753846-19.692308-29.538462-19.692308h-139.815385c-11.815385 0-23.630769 7.876923-27.56923 19.692308l-216.615385 584.861538c-3.938462 11.815385 3.938462 25.6 17.723077 25.6h80.738462c11.815385 0 23.630769-9.846154 27.56923-21.661538l63.015385-175.261539h263.876923l68.923077 175.261539c3.938462 11.815385 15.753846 21.661538 27.569231 21.661538h80.738461c13.784615 0 23.630769-13.784615 19.692308-25.6z"></path></svg>',r.mark="bgColor",r}return De(n,t),n})(Xc),S1=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("color.color"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 864h896v96H64zM360.58 576h302.85l81.53 224h102.16L579.24 64H444.77L176.89 800h102.16l81.53-224zM512 159.96L628.49 480H395.52L512 159.96z"></path></svg>',r.mark="color",r}return De(n,t),n})(Xc),Qc=["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"],F1={selector:"font",preParseHtml:function(t){var n=F(t);if(io(n)!=="font")return t;var r=n.attr("color")||"";return r&&(n.removeAttr("color"),n.css("color",r)),n[0]}};function on(t,n){t.data==null&&(t.data={});var r=t.data;r.style==null&&(r.style={}),Object.assign(r.style,n)}var V1={renderStyle:function(t,n){var r=t,o=r.color,i=r.bgColor,a=n;return o&&on(a,{color:o}),i&&on(a,{backgroundColor:i}),a},styleToHtml:function(t,n){if(!q.isText(t))return n;var r,o=t,i=o.color,a=o.bgColor;return i||a?((Yi(n)||io(r=F(n))!=="span")&&(r=F("<span>".concat(n,"</span>"))),i&&r.css("color",i),a&&r.css("background-color",a),_n(r)):n},preParseHtml:[F1],parseStyleHtml:function(t,n,r){var o=F(t);if(!q.isText(n))return n;var i=n,a=It(o,"color");a&&(i.color=a);var l=It(o,"background-color");return l||(l=It(o,"background")),l&&(i.bgColor=l),i},menus:[{key:"color",factory:function(){return new S1},config:{colors:Qc}},{key:"bgColor",factory:function(){return new N1},config:{colors:Qc}}]},O1=(function(){function t(){this.title=se("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){var r=n.selection;return r==null||!!j.isExpanded(r)},t.prototype.exec=function(n,r){var o=n.selection;if(o!=null){var i=[o.anchor.path[0]];O.insertNodes(n,{type:"paragraph",children:[{text:""}]},{at:i}),n.select(C.start(n,i))}},t})(),T1={menus:[{key:"enter",factory:function(){return new O1}}]},j1={type:"divider",elemToHtml:function(t,n){return"<hr/>"}},P1=(function(){function t(){this.title=se("divider.title"),this.iconSvg='<svg viewBox="0 0 1092 1024"><path d="M0 51.2m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M819.2 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M409.6 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 870.4m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return n.selection==null||!!S.getSelectedElems(n).some((function(r){if(n.isVoid(r))return!0;var o=S.getNodeType(r);return o==="table"||o==="pre"}))},t.prototype.exec=function(n,r){S.isSelectedEmptyParagraph(n)&&O.removeNodes(n,{mode:"highest"}),O.insertNodes(n,{type:"divider",children:[{text:""}]},{mode:"highest"})},t})(),L1={renderElems:[{type:"divider",renderElem:function(t,n,r){return ht("div",{props:{contentEditable:!1,className:"w-e-textarea-divider"},dataset:{selected:S.isNodeSelected(r,t)?"true":""},style:{},on:{mousedown:function(o){return o.preventDefault()}}},[ht("hr")])}}],elemsToHtml:[j1],parseElemsHtml:[{selector:"hr:not([data-w-e-type])",parseElemHtml:function(t,n,r){return{type:"divider",children:[{text:""}]}}}],menus:[{key:"divider",factory:function(){return new P1}}],editorPlugin:function(t){var n=t.isVoid,r=t.normalizeNode,o=t;return o.isVoid=function(i){return i.type==="divider"||n(i)},o.normalizeNode=function(i){var a=$(i,2),l=a[0],c=a[1];if(S.getNodeType(l)!=="divider")return r([l,c]);S.isLastNode(o,l)&&O.insertNodes(o,S.genEmptyParagraph(),{at:[c[0]+1]})},o}},M1=(function(){function t(){this.title=se("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return t.prototype.exec=function(n,r){},t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){if(n.selection==null)return!0;var r=$(C.nodes(n,{match:function(o){return S.getNodeType(o)==="pre"||!!C.isVoid(n,o)},universal:!0}),1);return!!r[0]},t.prototype.getPanelContentElem=function(n){if(this.$content==null){var r=F('<ul class="w-e-panel-content-emotion"></ul>');r.on("click","li",(function(a){var l=a.target;if(l!=null){a.preventDefault();var c=F(l).text();n.insertText(c)}})),this.$content=r}var o=this.$content;if(o==null)return document.createElement("ul");o.empty();var i=n.getMenuConfig("emotion").emotions;return(i===void 0?[]:i).forEach((function(a){var l=F("<li>".concat(a,"</li>"));o.append(l)})),o[0]},t})(),z1={menus:[{key:"emotion",factory:function(){return new M1},config:{emotions:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏".split(" ")}}]},eu=(function(){function t(){this.tag="select",this.width=80}return t.prototype.isActive=function(n){return!1},t.prototype.getValue=function(n){var r=this.mark,o=C.marks(n);return o&&o[r]?o[r]:""},t.prototype.isDisabled=function(n){if(n.selection==null)return!0;var r=$(C.nodes(n,{match:function(o){return S.getNodeType(o)==="pre"||!!C.isVoid(n,o)},universal:!0}),1);return!!r[0]},t.prototype.exec=function(n,r){var o=this.mark;r?n.addMark(o,r):n.removeMark(o)},t})(),$1=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("fontFamily.title"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M956.788364 152.110545h-24.110546l23.924364 9.029819 0.186182 121.018181h-65.070546l-86.574545-130.048H566.551273v650.14691l130.048 64.977454v65.163636h-390.050909v-65.163636l129.954909-64.977454V152.110545H198.283636L111.429818 282.065455H46.545455V69.259636C46.545455 33.792 82.664727 22.062545 98.955636 22.062545h812.683637c23.738182 0 45.056 15.173818 45.056 41.053091V169.425455v-17.221819z"></path></svg>',r.mark="fontFamily",r.selectPanelWidth=150,r}return De(n,t),n.prototype.getOptions=function(r){var o=[],i=r.getMenuConfig(this.mark).fontFamilyList,a=i===void 0?[]:i;o.push({text:se("fontFamily.default"),value:""}),a.forEach((function(u){if(typeof u=="string")o.push({text:u,value:u,styleForRenderMenuList:{"font-family":u}});else if(typeof u=="object"){var d=u.name,f=u.value;o.push({text:d,value:f,styleForRenderMenuList:{"font-family":f}})}}));var l=this.getValue(r),c=!1;return o.forEach((function(u){u.value===l?(c=!0,u.selected=!0):u.selected=void 0})),c||typeof l!="string"||o.push({text:l,value:l,selected:!0}),o},n})(eu),I1=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("fontSize.title"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 512h384v128h-128V1024h-128V640h-128z m896-256H708.2496v768h-136.4992V256H320V128h640z"></path></svg>',r.mark="fontSize",r}return De(n,t),n.prototype.getOptions=function(r){var o=[],i=r.getMenuConfig(this.mark).fontSizeList,a=i===void 0?[]:i;o.push({text:se("fontSize.default"),value:""}),a.forEach((function(u){if(typeof u=="string")o.push({text:u,value:u});else if(typeof u=="object"){var d=u.name,f=u.value;o.push({text:d,value:f})}}));var l=this.getValue(r),c=!1;return o.forEach((function(u){u.value===l?(c=!0,u.selected=!0):u.selected=void 0})),c||typeof l!="string"||o.push({text:l,value:l,selected:!0}),o},n})(eu),R1={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"},H1={renderStyle:function(t,n){var r=t,o=r.fontSize,i=r.fontFamily,a=n;return o&&on(a,{fontSize:o}),i&&on(a,{fontFamily:i}),a},styleToHtml:function(t,n){if(!q.isText(t))return n;var r,o=t,i=o.fontSize,a=o.fontFamily;return i||a?((Yi(n)||io(r=F(n))!=="span")&&(r=F("<span>".concat(n,"</span>"))),i&&r.css("font-size",i),a&&r.css("font-family",a),_n(r)):n},preParseHtml:[{selector:"font",preParseHtml:function(t){var n=F(t);if(io(n)!=="font")return t;var r=n.attr("size")||"";r&&(n.removeAttr("size"),n.css("font-size",R1[r]));var o=n.attr("face")||"";return o&&(n.removeAttr("face"),n.css("font-family",o)),n[0]}}],parseStyleHtml:function(t,n,r){var o=F(t);if(!q.isText(n))return n;var i=n,a=It(o,"font-size");a&&(i.fontSize=a);var l=It(o,"font-family").replace(/"/g,"");return l&&(i.fontFamily=l),i},menus:[{key:"fontSize",factory:function(){return new I1},config:{fontSizeList:["12px",{name:"13px",value:"13px"},"14px","15px","16px","19px",{name:"22px",value:"22px"},"24px","29px","32px","40px","48px"]}},{key:"fontFamily",factory:function(){return new $1},config:{fontFamilyList:["黑体",{name:"仿宋",value:"仿宋"},"楷体","标楷体","华文仿宋","华文楷体",{name:"宋体",value:"宋体"},"微软雅黑","Arial","Tahoma","Verdana","Times New Roman","Courier New"]}}]},Zi=(function(){function t(){this.title=se("formatPainter.title"),this.iconSvg='<svg viewBox="0 0 24 24"><path d="M8 19.997v-5h2v5h9v-7H5v7zm-4-9h16v-3h-6v-4h-4v4H4zm-1 10v-8H2v-6a1 1 0 0 1 1-1h5v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v3h5a1 1 0 0 1 1 1v6h-1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1"/></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return t.attrs.isSelect},t.prototype.isDisabled=function(n){return!1},t.prototype.setFormatHtml=function(n){var r,o;if(n.getSelectionText().length){if(t.attrs.formatStyle){(function(d){var f=C.marks(d);f&&Object.keys(f).forEach((function(p){d.removeMark(p)}))})(n);try{for(var i=at(Object.entries(t.attrs.formatStyle)),a=i.next();!a.done;a=i.next()){var l=$(a.value,2),c=l[0],u=l[1];n.addMark(c,u)}}catch(d){r={error:d}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}}t.attrs.formatStyle=null,t.attrs.isSelect=!1}},t.prototype.exec=function(n){t.attrs.isSelect?(t.attrs.isSelect=!1,t.attrs.formatStyle=null):n.getSelectionText().length&&(t.attrs.formatStyle=C.marks(n),t.attrs.isSelect=!0),n.blur(),n.focus()},t.attrs={isSelect:!1,formatStyle:null},t})(),U1={menus:[{key:"formatPainter",factory:function(){return new Zi}}],editorPlugin:function(t){var n=new Zi,r=t.onChange,o=t,i=function(){n.setFormatHtml(o),document.removeEventListener("mouseup",i)};return o.onChange=function(){r(),Zi.attrs.isSelect&&(document.removeEventListener("mouseup",i),document.addEventListener("mouseup",i))},o}},W1=(function(){function t(){this.title=se("fullScreen.title"),this.iconSvg=Zc,this.tag="button",this.alwaysEnable=!0}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return n.isFullScreen},t.prototype.isDisabled=function(n){return!1},t.prototype.getIcon=function(n){return n.isFullScreen?Zc:'<svg t="1723361745825" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8705" width="200" height="200"><path d="M703.926857 362.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V128a42.642286 42.642286 0 1 1 85.357715 0v149.357714h149.357714c21.211429 0 38.765714 15.433143 42.057143 35.693715l0.585143 6.948571a42.642286 42.642286 0 0 1-42.642286 42.642286H703.926857zM703.926857 938.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V704c0-23.552 19.090286-42.642286 42.642286-42.642286h192.073143a42.642286 42.642286 0 1 1 0 85.284572l-149.357714 0.073143v149.284571c0 21.211429-15.506286 38.765714-35.84 42.130286l-6.875429 0.512zM319.853714 938.642286a42.642286 42.642286 0 0 1-42.642285-42.642286v-149.284571H127.853714a42.642286 42.642286 0 0 1-42.130285-35.84l-0.585143-6.875429c0-23.552 19.163429-42.642286 42.715428-42.642286h192c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286zM127.853714 362.642286a42.642286 42.642286 0 1 1 0-85.284572H277.211429V128c0-21.211429 15.433143-38.765714 35.766857-42.130286l6.875428-0.512c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286H127.853714z" fill="#333333" p-id="8706"></path></svg>'},t.prototype.getTitle=function(n){return n.isFullScreen?se("fullScreen.title"):se("fullScreen.cancelTitle")},t.prototype.exec=function(n,r){n.isFullScreen?n.unFullScreen():n.fullScreen()},t})(),q1={menus:[{key:"fullScreen",factory:function(){return new W1}}]};function An(t){return function(n,r){return"<h".concat(t,">").concat(r,"</h").concat(t,">")}}var K1={type:"header1",elemToHtml:An(1)},J1={type:"header2",elemToHtml:An(2)},G1={type:"header3",elemToHtml:An(3)},Y1={type:"header4",elemToHtml:An(4)},Z1={type:"header5",elemToHtml:An(5)},X1={type:"header6",elemToHtml:An(6)};function tu(t){var n=$(C.nodes(t,{match:function(i){return S.getNodeType(i).startsWith("header")},universal:!0}),1),r=n[0];if(r==null)return"paragraph";var o=$(r,1)[0];return S.getNodeType(o)}function nu(t){if(t.selection==null)return!0;var n=$(C.nodes(t,{match:function(r){var o=S.getNodeType(r);return o==="paragraph"||!!o.startsWith("header")},universal:!0,mode:"highest"}),1);return!n[0]}function ru(t,n){n&&O.setNodes(t,{type:n})}var Nn=(function(){function t(){this.tag="button"}return t.prototype.getValue=function(n){return tu(n)},t.prototype.isActive=function(n){return this.getValue(n)===this.type},t.prototype.isDisabled=function(n){return nu(n)},t.prototype.exec=function(n,r){var o=this.type;ru(n,r===o?"paragraph":o)},t})(),Q1=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title="H1",r.type="header1",r}return De(n,t),n})(Nn),ey=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title="H2",r.type="header2",r}return De(n,t),n})(Nn),ty=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title="H3",r.type="header3",r}return De(n,t),n})(Nn),ny=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title="H4",r.type="header4",r}return De(n,t),n})(Nn),ry=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title="H5",r.type="header5",r}return De(n,t),n})(Nn),oy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title="H6",r.type="header6",r}return De(n,t),n})(Nn),iy=(function(){function t(){this.title=se("header.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M960 960c-51.2 0-102.4-3.2-153.6-3.2-51.2 0-99.2 3.2-150.4 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 57.6-28.8 86.4-48 19.2-12.8 19.2-60.8 19.2-80v-224-19.2c-9.6-3.2-19.2-3.2-28.8-3.2H320c-9.6 0-19.2 0-28.8 3.2V780.8c0 22.4 0 80 22.4 92.8 28.8 19.2 96-6.4 96 44.8 0 16-9.6 41.6-28.8 41.6-54.4 0-105.6-3.2-160-3.2-48 0-96 3.2-147.2 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 51.2-28.8 80-48 19.2-12.8 19.2-60.8 19.2-83.2V294.4c0-28.8 3.2-115.2-22.4-131.2-25.6-16-86.4 9.6-86.4-41.6 0-16 6.4-41.6 28.8-41.6 51.2 0 105.6 3.2 156.8 3.2 48 0 96-3.2 144-3.2 19.2 0 28.8 22.4 28.8 41.6 0 48-57.6 25.6-83.2 41.6-19.2 12.8-19.2 73.6-19.2 92.8v201.6c6.4 3.2 16 3.2 22.4 3.2h400c6.4 0 12.8 0 22.4-3.2V256c0-22.4 0-80-19.2-92.8-28.8-16-86.4 6.4-86.4-41.6 0-16 9.6-41.6 28.8-41.6 51.2 0 99.2 3.2 150.4 3.2 48 0 99.2-3.2 147.2-3.2 19.2 0 28.8 22.4 28.8 41.6 0 51.2-57.6 25.6-86.4 41.6-19.2 12.8-19.2 70.4-19.2 92.8v537.6c0 19.2 0 67.2 19.2 80 28.8 19.2 89.6-6.4 89.6 44.8 0 19.2-6.4 41.6-28.8 41.6z"></path></svg>',this.tag="select",this.width=60}return t.prototype.getOptions=function(n){var r=[{value:"header1",text:"H1",styleForRenderMenuList:{"font-size":"32px","font-weight":"bold"}},{value:"header2",text:"H2",styleForRenderMenuList:{"font-size":"24px","font-weight":"bold"}},{value:"header3",text:"H3",styleForRenderMenuList:{"font-size":"18px","font-weight":"bold"}},{value:"header4",text:"H4",styleForRenderMenuList:{"font-size":"16px","font-weight":"bold"}},{value:"header5",text:"H5",styleForRenderMenuList:{"font-size":"13px","font-weight":"bold"}},{value:"header6",text:"H6",styleForRenderMenuList:{"font-size":"11px","font-weight":"bold"}},{value:"paragraph",text:se("header.text")}],o=this.getValue(n).toString();return r.forEach((function(i){i.value===o?i.selected=!0:i.selected=void 0})),r},t.prototype.isActive=function(n){return!1},t.prototype.getValue=function(n){return tu(n)},t.prototype.isDisabled=function(n){return nu(n)},t.prototype.exec=function(n,r){ru(n,r.toString())},t})(),sy={key:"headerSelect",factory:function(){return new iy}},ay={key:"header1",factory:function(){return new Q1}},ly={key:"header2",factory:function(){return new ey}},cy={key:"header3",factory:function(){return new ty}},uy={key:"header4",factory:function(){return new ny}},dy={key:"header5",factory:function(){return new ry}},fy={key:"header6",factory:function(){return new oy}};function Sn(t){return function(n,r,o){var i=F(n);return(r=r.filter((function(a){return!!q.isText(a)||!!o.isInline(a)}))).length===0&&(r=[{text:i.text().replace(/\s+/gm," ")}]),{type:"header".concat(t),children:r}}}var py={selector:"h1:not([data-w-e-type])",parseElemHtml:Sn(1)},hy={selector:"h2:not([data-w-e-type])",parseElemHtml:Sn(2)},my={selector:"h3:not([data-w-e-type])",parseElemHtml:Sn(3)},gy={selector:"h4:not([data-w-e-type])",parseElemHtml:Sn(4)},yy={selector:"h5:not([data-w-e-type])",parseElemHtml:Sn(5)},by={selector:"h6:not([data-w-e-type])",parseElemHtml:Sn(6)};function Fn(t){return function(n,r,o){return je("h".concat(t),null,r)}}var Cy={renderElems:[{type:"header1",renderElem:Fn(1)},{type:"header2",renderElem:Fn(2)},{type:"header3",renderElem:Fn(3)},{type:"header4",renderElem:Fn(4)},{type:"header5",renderElem:Fn(5)},{type:"header6",renderElem:Fn(6)}],elemsToHtml:[K1,J1,G1,Y1,Z1,X1],parseElemsHtml:[py,hy,my,gy,yy,by],menus:[sy,ay,ly,cy,uy,dy,fy],editorPlugin:function(t){var n=t.insertBreak,r=t;return r.insertBreak=function(){var o=$(C.nodes(r,{match:function(a){return S.getNodeType(a).startsWith("header")},universal:!0}),1),i=o[0];i&&S.isSelectionAtLineEnd(t,i[1])?O.insertNodes(r,{type:"paragraph",children:[{text:""}]},{mode:"highest"}):n()},r}},ou=(function(){function t(){this.tag="button"}return t.prototype.getValue=function(n){var r=$(C.nodes(n,{match:function(i){return!!i.indent},universal:!0}),1),o=r[0];return o==null?"":$(o,1)[0].indent||""},t.prototype.isActive=function(n){return!1},t.prototype.getMatchNode=function(n){var r=$(C.nodes(n,{match:function(i){var a=S.getNodeType(i);return a==="paragraph"||!!a.startsWith("header")},universal:!0,mode:"highest"}),1),o=r[0];return o==null?null:o[0]},t})(),vy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("indent.decrease"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z"></path></svg>',r}return De(n,t),n.prototype.isDisabled=function(r){var o=this.getMatchNode(r);return o==null||!o.indent},n.prototype.exec=function(r,o){O.setNodes(r,{indent:null},{match:function(i){return te.isElement(i)}})},n})(ou),Dy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("indent.increase"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',r.DEFAULT_INDENT_VALUE="2em",r}return De(n,t),n.prototype.isDisabled=function(r){var o=this.getMatchNode(r);return o==null||!!o.indent},n.prototype.getIndentValue=function(r){var o=this.getMatchNode(r);if(!o)return this.DEFAULT_INDENT_VALUE;var i=o.children.filter(q.isText)[0];if(!i||!i.fontSize)return this.DEFAULT_INDENT_VALUE;var a=i.fontSize,l=parseInt(i.fontSize,10),c=a.replace("".concat(l),"");return"".concat(2*l).concat(c)},n.prototype.exec=function(r,o){var i=this.getIndentValue(r);O.setNodes(r,{indent:i},{match:function(a){return te.isElement(a)},mode:"highest"})},n})(ou),wy={renderStyle:function(t,n){if(!te.isElement(t))return n;var r=t.indent,o=n;return r&&on(o,{textIndent:r}),o},styleToHtml:function(t,n){if(!te.isElement(t))return n;var r=t.indent;if(!r)return n;var o=F(n);return o.css("text-indent",r),_n(o)},preParseHtml:[{selector:"p,h1,h2,h3,h4,h5",preParseHtml:function(t){var n=F(t),r=It(n,"padding-left");return/\dem/.test(r)&&n.css("text-indent","2em"),/\dpx/.test(r)&&parseInt(r,10)%32==0&&n.css("text-indent","2em"),n[0]}}],parseStyleHtml:function(t,n,r){var o=F(t);if(!te.isElement(n))return n;var i=n,a=It(o,"text-indent"),l=parseInt(a,10);return a&&l>0&&(i.indent=a),i},menus:[{key:"indent",factory:function(){return new Dy}},{key:"delIndent",factory:function(){return new vy}}]},so=(function(){function t(){this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return n.selection==null||!!S.getSelectedElems(n).some((function(r){var o=r.type;return!(!C.isVoid(n,r)||!C.isBlock(n,r)||o==="video")||!!["pre","code"].includes(o)}))},t})(),xy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("justify.center"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',r}return De(n,t),n.prototype.exec=function(r,o){O.setNodes(r,{textAlign:"center"},{match:function(i){return te.isElement(i)&&!r.isInline(i)}})},n})(so),By=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("justify.justify"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>',r}return De(n,t),n.prototype.exec=function(r,o){O.setNodes(r,{textAlign:"justify"},{match:function(i){return te.isElement(i)&&!r.isInline(i)}})},n})(so),ky=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("justify.left"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',r}return De(n,t),n.prototype.exec=function(r,o){O.setNodes(r,{textAlign:"left"},{match:function(i){return te.isElement(i)&&!r.isInline(i)}})},n})(so),Ey=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("justify.right"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',r}return De(n,t),n.prototype.exec=function(r,o){O.setNodes(r,{textAlign:"right"},{match:function(i){return te.isElement(i)&&!r.isInline(i)}})},n})(so),_y={renderStyle:function(t,n){if(!te.isElement(t))return n;var r=t.textAlign,o=n;return r&&on(o,{textAlign:r}),o},styleToHtml:function(t,n){if(!te.isElement(t))return n;var r=t.textAlign;if(!r)return n;var o=F(n);return o.css("text-align",r),_n(o)},parseStyleHtml:function(t,n,r){var o=F(t);if(!te.isElement(n))return n;var i=n,a=It(o,"text-align");return a&&(i.textAlign=a),i},menus:[{key:"justifyLeft",factory:function(){return new ky}},{key:"justifyRight",factory:function(){return new Ey}},{key:"justifyCenter",factory:function(){return new xy}},{key:"justifyJustify",factory:function(){return new By}}]},Ay=(function(){function t(){this.title=se("lineHeight.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M964 788a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526zM198.93 144.306c6.668-5.798 16.774-5.094 22.573 1.574l122.26 140.582a16 16 0 0 1 3.927 10.5c0 8.836-7.164 16-16 16h-61.8a8 8 0 0 0-8 8v390.077h69.819a16 16 0 0 1 10.502 3.928c6.666 5.8 7.37 15.906 1.57 22.573L221.476 878.123a16 16 0 0 1-1.57 1.57c-6.668 5.8-16.774 5.097-22.574-1.57L75.051 737.538a16 16 0 0 1-3.928-10.5c0-8.837 7.163-16 16-16h69.822V312.96H87.127a16 16 0 0 1-10.502-3.928c-6.666-5.8-7.37-15.906-1.57-22.573l122.303-140.582a16 16 0 0 1 1.572-1.572zM964 465a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z m0-323a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z"></path></svg>',this.tag="select",this.width=80}return t.prototype.getOptions=function(n){var r=[],o=n.getMenuConfig("lineHeight").lineHeightList,i=o===void 0?[]:o;r.push({text:se("lineHeight.default"),value:""}),i.forEach((function(l){r.push({text:l,value:l})}));var a=this.getValue(n);return r.forEach((function(l){l.value===a?l.selected=!0:l.selected=void 0})),r},t.prototype.getMatchNode=function(n){var r=$(C.nodes(n,{match:function(i){var a=S.getNodeType(i);return!!a.startsWith("header")||!!["paragraph","blockquote","list-item"].includes(a)},universal:!0,mode:"highest"}),1),o=r[0];return o==null?null:o[0]},t.prototype.isActive=function(n){return!1},t.prototype.getValue=function(n){var r=this.getMatchNode(n);return r==null?"":te.isElement(r)&&r.lineHeight||""},t.prototype.isDisabled=function(n){return n.selection==null||this.getMatchNode(n)==null},t.prototype.exec=function(n,r){O.setNodes(n,{lineHeight:r.toString()},{mode:"highest"})},t})(),Ny={renderStyle:function(t,n){if(!te.isElement(t))return n;var r=t.lineHeight,o=n;return r&&on(o,{lineHeight:r}),o},styleToHtml:function(t,n){if(!te.isElement(t))return n;var r=t.lineHeight;if(!r)return n;var o=F(n);return o.css("line-height",r),_n(o)},parseStyleHtml:function(t,n,r){var o=F(t);if(!te.isElement(n))return n;var i=n,a=r.getMenuConfig("lineHeight").lineHeightList,l=a===void 0?[]:a,c=It(o,"line-height");return c&&l.includes(c)&&(i.lineHeight=c),i},menus:[{key:"lineHeight",factory:function(){return new Ay},config:{lineHeightList:["1","1.15","1.5","2","2.5","3"]}}]},Sy={type:"link",elemToHtml:function(t,n){var r=t,o=r.url,i=r.target,a=i===void 0?"_blank":i;return'<a href="'.concat(o,'" target="').concat(a,'">').concat(n,"</a>")}};function iu(t){return t===void 0&&(t="r"),"".concat(t,"-").concat(Xg())}function su(t){return t.replace(/</g,"<").replace(/>/g,">")}function au(t,n,r,o){return gn(this,void 0,void 0,(function(){var i,a;return yn(this,(function(l){switch(l.label){case 0:return(i=n.getMenuConfig(t).checkLink)?[4,i(r,o)]:[3,2];case 1:if(typeof(a=l.sent())=="string")return n.alert(a,"error"),[2,!1];if(a==null)return[2,!1];l.label=2;case 2:return[2,!0]}}))}))}function lu(t,n,r){return gn(this,void 0,void 0,(function(){var o;return yn(this,(function(i){switch(i.label){case 0:return(o=n.getMenuConfig(t).parseLinkUrl)?[4,o(r)]:[3,2];case 1:return[2,i.sent()];case 2:return[2,r]}}))}))}function Xi(t){return t.selection==null||!!S.getSelectedElems(t).some((function(n){var r=n.type;return!!t.isVoid(n)||!!["pre","code","link"].includes(r)}))}function Qi(t,n){return{type:"link",url:su(t),children:n?[{text:n}]:[]}}function cu(t,n,r){return gn(this,void 0,void 0,(function(){var o,i,a,l,c;return yn(this,(function(u){switch(u.label){case 0:return r?(n||(n=r),t.restoreSelection(),Xi(t)?[2]:[4,au("insertLink",t,n,r)]):[2];case 1:return u.sent()?[4,lu("insertLink",t,r)]:[2];case 2:if(o=u.sent(),(i=t.selection)==null)return[2];if(j.isCollapsed(i)){if((l=S.getLeftLengthOfMaxLength(t))<=0)return[2];t.insertText(" "),l<n.length+1&&(n=n.slice(0,l-1)),c=Qi(o,n),O.insertNodes(t,c),t.insertFragment([{text:" "}])}else if((a=C.string(t,i))!==n){if((l=S.getLeftLengthOfMaxLength(t))<=0)return[2];l<a.length-n.length&&(n=n.slice(0,l)),t.deleteFragment(),c=Qi(o,n),O.insertNodes(t,c)}else c=Qi(o),O.wrapNodes(t,c,{split:!0}),O.collapse(t,{edge:"end"});return[2]}}))}))}function uu(){return iu("w-e-update-link")}var Fy=(function(){function t(){this.title=se("link.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=uu(),this.buttonId=uu()}return t.prototype.getSelectedLinkElem=function(n){var r=S.getSelectedNodeByType(n,"link");return r??null},t.prototype.getValue=function(n){var r=this.getSelectedLinkElem(n);return r&&r.url||""},t.prototype.isActive=function(n){return!1},t.prototype.exec=function(n,r){},t.prototype.isDisabled=function(n){return n.selection==null||this.getSelectedLinkElem(n)==null},t.prototype.getModalPositionNode=function(n){return S.getSelectedNodeByType(n,"link")},t.prototype.getModalContentElem=function(n){var r=this.urlInputId,o=this.buttonId,i=$($i(se("link.url"),r),2),a=i[0],l=F(i[1]),c=$(Cc(o,se("common.ok")),1)[0];if(this.$content==null){var u=F("<div></div>");u.on("click","#".concat(o),(function(p){p.preventDefault(),n.restoreSelection();var h=S.getSelectedNodeByType(n,"link"),m=h?H.string(h):"",g=u.find("#".concat(r)).val();(function(y,v,D){gn(this,void 0,void 0,(function(){var w,b;return yn(this,(function(x){switch(x.label){case 0:return D?[4,au("editLink",y,v,D)]:[2];case 1:return x.sent()?[4,lu("editLink",y,D)]:[2];case 2:return w=x.sent(),b={url:su(w)},O.setNodes(y,b,{match:function(k){return S.checkNodeType(k,"link")}}),[2]}}))}))})(n,m,g),n.hidePanelOrModal()})),this.$content=u}var d=this.$content;d.empty(),d.append(a),d.append(c);var f=this.getValue(n);return l.val(f),setTimeout((function(){l.focus()})),d[0]},t})();function es(){return iu("w-e-insert-link")}var Vy=(function(){function t(){this.title=se("link.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=es(),this.urlInputId=es(),this.buttonId=es()}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.exec=function(n,r){},t.prototype.isDisabled=function(n){return Xi(n)},t.prototype.getModalPositionNode=function(n){return null},t.prototype.getModalContentElem=function(n){var r=n.selection,o=this,i=o.textInputId,a=o.urlInputId,l=o.buttonId,c=$($i(se("link.text"),i),2),u=c[0],d=F(c[1]),f=$($i(se("link.url"),a),2),p=f[0],h=F(f[1]),m=$(Cc(l,se("common.ok")),1)[0];if(this.$content==null){var g=F("<div></div>");g.on("click","#".concat(l),(function(D){D.preventDefault();var w=g.find("#".concat(i)).val(),b=g.find("#".concat(a)).val();cu(n,w,b),n.hidePanelOrModal()})),this.$content=g}var y=this.$content;if(y.empty(),y.append(u),y.append(p),y.append(m),r==null||j.isCollapsed(r))d.val("");else{var v=C.string(n,r);d.val(v)}return h.val(""),setTimeout((function(){d.focus()})),y[0]},t})(),Oy=(function(){function t(){this.title=se("link.unLink"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M608.16328 811.815036c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.347563 89.347564c-118.525421 118.523421-311.38448 118.531421-429.919901 0-118.527421-118.529421-118.527421-311.39048 0-429.917901l89.349564-89.349563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.195613 79.195613c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.349563 89.347564c-56.143726 56.145726-56.143726 147.49928 0 203.645005 56.143726 56.143726 147.49928 56.145726 203.647005 0l89.347564-89.347563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.193613 79.195613z m-113.135447-520.429459c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.347564-89.347564c56.143726-56.149726 147.49928-56.145726 203.647006 0 56.143726 56.145726 56.143726 147.49928 0 203.645006l-89.349564 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.195613 79.195613c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.349564-89.349563c118.529421-118.529421 118.529421-311.38848 0-429.917901-118.531421-118.527421-311.38848-118.527421-429.919901 0l-89.347563 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.193613 79.195613z m469.653707 718.556492l45.253779-45.253779c18.745908-18.745908 18.745908-49.13776 0-67.881669L127.195629 14.062931c-18.745908-18.745908-49.13776-18.745908-67.881669 0L14.058181 59.31871c-18.745908 18.745908-18.745908 49.13776 0 67.881669l882.74169 882.74169c18.745908 18.743908 49.13776 18.743908 67.881669 0z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return n.selection==null||S.getSelectedNodeByType(n,"link")==null},t.prototype.exec=function(n,r){this.isDisabled(n)||O.unwrapNodes(n,{match:function(o){return S.checkNodeType(o,"link")}})},t})(),Ty=(function(){function t(){this.title=se("link.view"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z" p-id="10909"></path><path d="M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z" p-id="10910"></path><path d="M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z"></path></svg>',this.tag="button"}return t.prototype.getSelectedLinkElem=function(n){var r=S.getSelectedNodeByType(n,"link");return r??null},t.prototype.getValue=function(n){var r=this.getSelectedLinkElem(n);return r&&r.url||""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return n.selection==null||this.getSelectedLinkElem(n)==null},t.prototype.exec=function(n,r){if(!this.isDisabled(n)){if(!r||typeof r!="string")throw new Error("View link failed, link url is '".concat(r,"'"));window.open(r,"_blank")}},t})(),du={checkLink:function(t,n){return!0},parseLinkUrl:function(t){return t}},jy={key:"insertLink",factory:function(){return new Vy},config:du},Py={key:"editLink",factory:function(){return new Fy},config:du},Ly={key:"unLink",factory:function(){return new Oy}},My={key:"viewLink",factory:function(){return new Ty}},ts,fu,zy={selector:"a:not([data-w-e-type])",parseElemHtml:function(t,n,r){var o=F(t);return(n=n.filter((function(i){return!!q.isText(i)||!!r.isInline(i)}))).length===0&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"link",url:o.attr("href")||"",target:o.attr("target")||"",children:n}}},$y=qt((function(){if(fu)return ts;fu=1,ts=function(o){if(typeof o!="string")return!1;var i=o.match(t);if(!i)return!1;var a=i[1];return a?!!(n.test(a)||r.test(a)):!1};var t=/^(?:\w+:)?\/\/(\S+)$/,n=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,r=/^[^\s\.]+\.\S{2,}$/;return ts})()),Iy={type:"link",renderElem:function(t,n,r){var o=t,i=o.url,a=o.target;return je("a",{href:i,target:a===void 0?"_blank":a},n)}},Ry={renderElems:[Iy],elemsToHtml:[Sy],parseElemsHtml:[zy],menus:[jy,Py,Ly,My],editorPlugin:function(t){var n=t.isInline,r=t.insertData,o=t.normalizeNode,i=t;return i.isInline=function(a){return a.type==="link"||n(a)},i.insertData=function(a){var l=a.getData("text/plain");if($y(l)){if(/<img[^>]+>/.test(a.getData("text/html")))r(a);else if(!Xi(i)){var c=i.selection;if(c!=null){var u=C.string(i,c);cu(i,u,l)}}}else r(a)},i.normalizeNode=function(a){var l=$(a,2),c=l[0],u=l[1];return S.getNodeType(c)!=="link"?o([c,u]):H.string(c)===""?O.removeNodes(i,{at:u}):o([c,u])},i}},Hy={selector:"p:not([data-w-e-type])",parseElemHtml:function(t,n,r){var o=F(t);return(n=n.filter((function(i){return!!q.isText(i)||!!r.isInline(i)}))).length===0&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:n}}};function pu(t){var n=$(C.nodes(t,{match:function(l){return t.children[0]===l},mode:"highest"}),1),r=n[0];if(r==null)return!1;var o=r[0];if(!te.isElement(o)||o.type==="paragraph"||H.string(o)!=="")return!1;var i=o.children,a=i===void 0?[]:i;return!!q.isText(a[0])&&(O.setNodes(t,{type:"paragraph"}),!0)}var Uy={type:"paragraph",renderElem:function(t,n,r){return je("p",null,n)}},Wy={renderElems:[Uy],elemsToHtml:[{type:"paragraph",elemToHtml:function(t,n){return n===""?"<p><br></p>":"<p>".concat(n,"</p>")}}],parseElemsHtml:[Hy],editorPlugin:function(t){var n=t.deleteBackward,r=t.deleteForward,o=t;return o.deleteBackward=function(i){pu(o)||n(i)},o.deleteForward=function(i){pu(o)||r(i)},o}};function hu(t,n){if(t.selection==null)return!0;var r=$(C.nodes(t,{match:function(o){return S.getNodeType(o)==="pre"||!!C.isVoid(t,o)},universal:!0}),1);return!!r[0]}function qy(t,n){Object.keys(n).forEach((function(r){r!=="text"&&C.removeMark(t,r)}))}var sn=(function(){function t(){this.marksNeedToRemove=[],this.tag="button"}return t.prototype.getValue=function(n){var r=this.mark,o=C.marks(n);if(o)return o[r];var i=$(C.nodes(n,{match:function(a){return a[r]===!0}}),1);return!!i[0]},t.prototype.isActive=function(n){return!!this.getValue(n)},t.prototype.isDisabled=function(n){return hu(n,this.mark)},t.prototype.exec=function(n,r){var o=this.mark,i=this.marksNeedToRemove;r?n.removeMark(o):(n.addMark(o,!0),i&&i.forEach((function(a){return n.removeMark(a)})))},t})(),Ky=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="bold",r.title=se("textStyle.bold"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M707.872 484.64A254.88 254.88 0 0 0 768 320c0-141.152-114.848-256-256-256H192v896h384c141.152 0 256-114.848 256-256a256.096 256.096 0 0 0-124.128-219.36zM384 192h101.504c55.968 0 101.504 57.408 101.504 128s-45.536 128-101.504 128H384V192z m159.008 640H384v-256h159.008c58.464 0 106.016 57.408 106.016 128s-47.552 128-106.016 128z"></path></svg>',r.hotkey="mod+b",r}return De(n,t),n})(sn),Jy=(function(){function t(){this.title=se("textStyle.clear"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M969.382408 288.738615l-319.401123-270.852152a67.074236 67.074236 0 0 0-96.459139 5.74922l-505.931379 574.922021a68.35184 68.35184 0 0 0-17.886463 47.910169 74.101061 74.101061 0 0 0 24.274486 47.910168l156.50655 132.232065h373.060512L975.131628 383.281347a67.074236 67.074236 0 0 0-5.74922-96.459139z m-440.134747 433.746725H264.144729l-90.071117-78.572676c-5.74922-5.74922-12.137243-12.137243-12.137243-17.886463a36.411728 36.411728 0 0 1 5.749221-24.274485l210.804741-240.828447 265.102932 228.691204z m-439.495945 180.781036h843.218964a60.047411 60.047411 0 1 1 0 120.733624H89.751716a60.047411 60.047411 0 1 1 0-120.733624z m0 0"></path></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return hu(n)},t.prototype.exec=function(n,r){var o,i,a=C.nodes(n,{match:function(u){return q.isText(u)},universal:!0});try{for(var l=at(a),c=l.next();!c.done;c=l.next())qy(n,c.value[0])}catch(u){o={error:u}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}},t})(),Gy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="code",r.title=se("textStyle.code"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M576 736l96 96 320-320L672 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224z"></path></svg>',r.hotkey="mod+e",r}return De(n,t),n})(sn),Yy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="italic",r.title=se("textStyle.italic"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z"></path></svg>',r.hotkey="mod+i",r}return De(n,t),n})(sn),Zy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="sub",r.marksNeedToRemove=["sup"],r.title=se("textStyle.sub"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 910.016v50.016h128v64h-192v-146.016l128-60V768h-128v-64h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',r.hotkey="",r}return De(n,t),n})(sn),Xy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="sup",r.marksNeedToRemove=["sub"],r.title=se("textStyle.sup"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 206.016v50.016h128v64h-192V174.016l128-60V64h-128V0h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',r.hotkey="",r}return De(n,t),n})(sn),Qy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="through",r.title=se("textStyle.through"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M1024 512v64h-234.496c27.52 38.496 42.496 82.688 42.496 128 0 70.88-36.672 139.04-100.576 186.976C672.064 935.488 594.144 960 512 960s-160.064-24.512-219.424-69.024C228.64 843.04 192 774.88 192 704h128c0 69.376 87.936 128 192 128s192-58.624 192-128-87.936-128-192-128H0v-64h299.52a385.984 385.984 0 0 1-6.944-5.024C228.64 459.04 192 390.88 192 320s36.672-139.04 100.576-186.976C351.936 88.512 429.856 64 512 64s160.064 24.512 219.424 69.024C795.328 180.96 832 249.12 832 320h-128c0-69.376-87.936-128-192-128s-192 58.624-192 128 87.936 128 192 128c78.976 0 154.048 22.688 212.48 64H1024z"></path></svg>',r.hotkey="mod+shift+x",r}return De(n,t),n})(sn),e2=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="underline",r.title=se("textStyle.underline"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 64l128 0 0 416c0 159.072-143.264 288-320 288s-320-128.928-320-288l0-416 128 0 0 416c0 40.16 18.24 78.688 51.36 108.512 36.896 33.216 86.848 51.488 140.64 51.488s103.744-18.304 140.64-51.488c33.12-29.792 51.36-68.352 51.36-108.512l0-416zM192 832l640 0 0 128-640 0z"></path></svg>',r.hotkey="mod+u",r}return De(n,t),n})(sn);function an(t,n){return t.length!==0&&(!!t[0].matches(n)||t.find(n).length>0)}function mu(t,n){var r=n,o=t,i=o.bold,a=o.italic,l=o.underline,c=o.code,u=o.through,d=o.sub,f=o.sup;return i&&(r="<strong>".concat(r,"</strong>")),c&&(r="<code>".concat(r,"</code>")),a&&(r="<em>".concat(r,"</em>")),l&&(r="<u>".concat(r,"</u>")),u&&(r="<s>".concat(r,"</s>")),d&&(r="<sub>".concat(r,"</sub>")),f&&(r="<sup>".concat(r,"</sup>")),r}var t2={renderStyle:function(t,n){var r=t,o=r.bold,i=r.italic,a=r.underline,l=r.code,c=r.through,u=r.sub,d=r.sup,f=n;return o&&(f=je("strong",null,f)),l&&(f=je("code",null,f)),i&&(f=je("em",null,f)),a&&(f=je("u",null,f)),c&&(f=je("s",null,f)),u&&(f=je("sub",null,f)),d&&(f=je("sup",null,f)),f},menus:[{key:"bold",factory:function(){return new Ky}},{key:"underline",factory:function(){return new e2}},{key:"italic",factory:function(){return new Yy}},{key:"through",factory:function(){return new Qy}},{key:"code",factory:function(){return new Gy}},{key:"sub",factory:function(){return new Zy}},{key:"sup",factory:function(){return new Xy}},{key:"clearStyle",factory:function(){return new Jy}}],styleToHtml:function(t,n){if(!q.isText(t))return n;if(Yi(n))return mu(t,n);var r=F(n),o=r.html();return o=mu(t,o),r.html(o),_n(r)},parseStyleHtml:function(t,n,r){var o=F(t);if(!q.isText(n))return n;var i=n;return an(o,"b,strong")&&(i.bold=!0),an(o,"i,em")&&(i.italic=!0),an(o,"u")&&(i.underline=!0),an(o,"s,strike")&&(i.through=!0),an(o,"sub")&&(i.sub=!0),an(o,"sup")&&(i.sup=!0),an(o,"code")&&(i.code=!0),i}},n2=(function(){function t(){this.title=se("undo.redo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0.00032 576a510.72 510.72 0 0 0 173.344 384l84.672-96A383.136 383.136 0 0 1 128.00032 576C128.00032 363.936 299.93632 192 512.00032 192c106.048 0 202.048 42.976 271.52 112.48L640.00032 448h384V64l-149.984 149.984A510.272 510.272 0 0 0 512.00032 64C229.21632 64 0.00032 293.216 0.00032 576z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return n.selection==null},t.prototype.exec=function(n,r){typeof n.redo=="function"&&n.redo()},t})(),r2=(function(){function t(){this.title=se("undo.undo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 64A510.272 510.272 0 0 0 149.984 213.984L0.032 64v384h384L240.512 304.48A382.784 382.784 0 0 1 512.032 192c212.064 0 384 171.936 384 384 0 114.688-50.304 217.632-130.016 288l84.672 96a510.72 510.72 0 0 0 173.344-384c0-282.784-229.216-512-512-512z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return n.selection==null},t.prototype.exec=function(n,r){typeof n.undo=="function"&&n.undo()},t})(),o2=[t2,V1,H1,wy,_y,Ny,L1,z1,Ry,Cy,Wy,U1,{menus:[{key:"redo",factory:function(){return new n2}},{key:"undo",factory:function(){return new r2}}]},q1,T1];kn("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),kn("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var ns=new WeakMap;function gu(t){var n,r=t.children||[],o=r.length;if(o===0)return"";for(var i=0;i<o&&!n;i+=1){var a=r[i];q.isText(a)&&(n=a)}return n==null?"":n.color||""}function yu(t,n,r){for(var o=n.type,i=(function(h,m){var g={};for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&m.indexOf(y)<0&&(g[y]=h[y]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var v=0;for(y=Object.getOwnPropertySymbols(h);v<y.length;v++)m.indexOf(y[v])<0&&Object.prototype.propertyIsEnumerable.call(h,y[v])&&(g[y[v]]=h[y[v]])}return g})(n,["type"]),a=r!==void 0?r:i.level||0,l=S.findPath(t,n),c=l;;){if(c.length===0||l[l.length-1]===0)return null;c=_.previous(c);var u=C.node(t,c);if(!u)return null;var d=$(u,1)[0],f=d.level,p=f===void 0?0:f;if(S.getNodeType(d)!==o)return null;if(p===a)return d}}function bu(t,n,r){var o=yu(t,n,r);return!!o&&o.ordered===n.ordered}var Cu=[],i2={type:"list-item",elemToHtml:function(t,n){var r="",o="",i=t.ordered,a=i!==void 0&&i?"ol":"ul",l=(function(h){var m=ns.get(h);if(m==null)return 0;var g=h,y=g.type,v=g.ordered,D=v!==void 0&&v,w=g.level,b=w===void 0?0:w,x=S.findPath(m,h);if(x[0]===0)return b+1;var k=_.previous(x),E=C.node(m,k);if(!E)return 0;var B=$(E,1)[0];if(S.getNodeType(B)!==y)return b+1;var V=B,T=V.ordered,P=T!==void 0&&T,R=V.level,I=R===void 0?0:R;return I<b?b-I:I>b?bu(m,h)?0:1:I===b?P===D?0:1:0})(t);if(l>0)for(var c=0;c<l;c+=1)r+="<".concat(a,">"),Cu.push(a);var u=(function(h){var m=ns.get(h);if(m==null)return 0;var g=h,y=g.type,v=g.ordered,D=v!==void 0&&v,w=g.level,b=w===void 0?0:w,x=S.findPath(m,h);if(x[0]===m.children.length-1)return b+1;var k=_.next(x),E=C.node(m,k);if(!E)return 0;var B=$(E,1)[0];if(S.getNodeType(B)!==y)return b+1;var V=B,T=V.ordered,P=T!==void 0&&T,R=V.level,I=R===void 0?0:R;return I<b?bu(m,B)?b-I:b-I+1:I>b?0:I===b?P===D?0:1:0})(t);if(u>0)for(c=0;c<u;c+=1){var d=Cu.pop();o+="</".concat(d,">")}var f=gu(t),p=f?' style="color:'.concat(f,'"'):"";return{html:"<li".concat(p,">").concat(n,"</li>"),prefix:r,suffix:o}}},vu=(function(){function t(){this.type="list-item",this.tag="button"}return t.prototype.getListNode=function(n){var r=this.type;return S.getSelectedNodeByType(n,r)},t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){var r=this.getListNode(n);if(r==null)return!1;var o=r.ordered;return(o!==void 0&&o)===this.ordered},t.prototype.isDisabled=function(n){return n.selection==null||!!S.getSelectedElems(n).some((function(r){if(C.isVoid(n,r)&&C.isBlock(n,r))return!0;var o=r.type;return!!["pre","code","table"].includes(o)}))},t.prototype.exec=function(n,r){this.isActive(n)?O.setNodes(n,{type:"paragraph",ordered:void 0,level:void 0}):O.setNodes(n,{type:"list-item",ordered:this.ordered,indent:void 0})},t})(),s2=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.ordered=!1,r.title=se("listModule.unOrderedList"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',r}return De(n,t),n})(vu),a2=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.ordered=!0,r.title=se("listModule.orderedList"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',r}return De(n,t),n})(vu),l2={key:"bulletedList",factory:function(){return new s2}},c2={key:"numberedList",factory:function(){return new a2}};function rs(t){return t.length?t[0].tagName.toLowerCase():""}vn&&(F.fn.append=vn),Cn&&(F.fn.attr=Cn),Mr&&(F.fn.parent=Mr);var u2={selector:"li:not([data-w-e-type])",parseElemHtml:function(t,n,r){var o=F(t);(n=n.filter((function(l){return!!q.isText(l)||!!r.isInline(l)}))).length===0&&(n=[{text:o.text().replace(/\s+/gm," ")}]);var i=(function(l){return rs(l.parent())==="ol"})(o),a=(function(l){for(var c=0,u=l.parent(),d=rs(u);d==="ul"||d==="ol";)d=rs(u=u.parent()),c+=1;return c-1})(o);return{type:"list-item",ordered:i,level:a,children:n}}},d2={selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(t,n,r){return n.flat(1/0)}};function Du(t){return C.nodes(t,{at:t.selection||void 0,match:function(n){return S.findPath(t,n).length===1}})}var f2={type:"list-item",renderElem:function(t,n,r){ns.set(t,r);var o=t,i=o.level,a=i===void 0?0:i,l=o.ordered,c=l!==void 0&&l,u={margin:"5px 0 5px ".concat(20*a,"px"),display:"flex",alignItems:"flex-start"},d="";if(c){var f=(function(p,h){var m=h,g=m.type,y=m.level,v=y===void 0?0:y,D=m.ordered,w=D!==void 0&&D,b=1,x=h,k=S.findPath(p,x);if(k[0]===0)return 1;for(;k[0]>0;){var E=_.previous(k),B=C.node(p,E);if(B==null)break;var V=B[0],T=V.level,P=T===void 0?0:T,R=V.type,I=V.ordered;if(R!==g||P<v)break;if(P===v){if(I!==w)break;b+=1}x=V,k=E}return b})(r,t);d="".concat(f,".")}else d=(function(p){p===void 0&&(p=0);var h="";switch(p){case 0:h="•";break;case 1:h="◦";break;default:h="▪"}return h})(a);return je("div",{style:u},je("span",{contentEditable:!1,style:{marginRight:"0.5em",color:gu(t)},"data-w-e-reserve":!0},d),je("span",{style:{flex:"1",wordBreak:"break-word"}},n))}},p2={renderElems:[f2],editorPlugin:function(t){var n=t.deleteBackward,r=t.handleTab,o=t.normalizeNode,i=t.insertBreak,a=t;return a.insertBreak=function(){var l=$(C.nodes(t,{match:function(u){return S.checkNodeType(u,"list-item")},universal:!0}),1),c=l[0];return c?c[0].children[0].text!==""?i():void O.setNodes(a,{type:"paragraph",ordered:void 0,level:void 0}):i()},a.deleteBackward=function(l){var c=a.selection;if(c!=null)if(j.isExpanded(c))n(l);else{var u=S.getSelectedNodeByType(a,"list-item");if(u!=null)if(c.focus.offset!==0)n(l);else{var d=u,f=d.level,p=f===void 0?0:f,h=d.ordered,m=h!==void 0&&h;if(p>0){var g=yu(t,u,p-1);g&&g.ordered!==m?O.setNodes(a,{level:p-1,ordered:!m}):O.setNodes(a,{level:p-1})}else O.setNodes(a,{type:"paragraph",ordered:void 0,level:void 0})}else n(l)}else n(l)},a.handleTab=function(){var l,c,u,d,f=a.selection;if(f!=null){if(j.isCollapsed(f)){var p=S.getSelectedNodeByType(a,"list-item");if(p==null)return void r();if(f.focus.offset===0){var h=p.level,m=h===void 0?0:h;return void O.setNodes(a,{level:m+1})}}if(j.isExpanded(f)){var g=0,y=!1;try{for(var v=at(Du(a)),D=v.next();!D.done;D=v.next()){var w=$(D.value,1)[0];S.getNodeType(w)==="list-item"?g+=1:y=!0}}catch(V){l={error:V}}finally{try{D&&!D.done&&(c=v.return)&&c.call(v)}finally{if(l)throw l.error}}if(y||g<=1)return void r();try{for(var b=at(Du(a)),x=b.next();!x.done;x=b.next()){var k=$(x.value,2),E=(w=k[0],k[1]),B=w.level;m=B===void 0?0:B,O.setNodes(a,{level:m+1},{at:E})}}catch(V){u={error:V}}finally{try{x&&!x.done&&(d=b.return)&&d.call(b)}finally{if(u)throw u.error}}}else r()}else r()},a.normalizeNode=function(l){var c=$(l,2),u=c[0],d=c[1],f=S.getNodeType(u);return f!=="bulleted-list"&&f!=="numbered-list"||O.unwrapNodes(a,{at:d}),o([u,d])},a},menus:[l2,c2],elemsToHtml:[i2],parseElemsHtml:[d2,u2]},Qe=(function(){function t(){throw new Error(`不能实例化
|
|
37
|
-
Can not construct a instance`)}return t.setEditorConfig=function(n){n===void 0&&(n={}),this.editorConfig=me(me({},this.editorConfig),n)},t.setSimpleEditorConfig=function(n){n===void 0&&(n={}),this.simpleEditorConfig=me(me({},this.simpleEditorConfig),n)},t.setToolbarConfig=function(n){n===void 0&&(n={}),this.toolbarConfig=me(me({},this.toolbarConfig),n)},t.setSimpleToolbarConfig=function(n){n===void 0&&(n={}),this.simpleToolbarConfig=me(me({},this.simpleToolbarConfig),n)},t.registerPlugin=function(n){this.plugins.push(n)},t.registerMenu=function(n,r){Kg(n,r)},t.registerRenderElem=function(n){var r,o,i;o=(r=n).type,i=r.renderElem,Kc[o||""]=i},t.registerRenderStyle=function(n){(function(r){Ki.push(r)})(n)},t.registerElemToHtml=function(n){(function(r){var o=r.type,i=r.elemToHtml;dl[o||""]=i})(n)},t.registerStyleToHtml=function(n){(function(r){yi.push(r)})(n)},t.registerPreParseHtml=function(n){var r;r=n,il.push(r)},t.registerParseElemHtml=function(n){(function(r){var o=r.selector,i=r.parseElemHtml;qr[o]=i})(n)},t.registerParseStyleHtml=function(n){(function(r){Wr.push(r)})(n)},t.registerModule=function(n){os(n)},t.editorConfig={},t.simpleEditorConfig={},t.toolbarConfig={},t.simpleToolbarConfig={},t.plugins=[],t})();function os(t){var n=t.menus,r=t.renderElems,o=t.renderStyle,i=t.elemsToHtml,a=t.styleToHtml,l=t.preParseHtml,c=t.parseElemsHtml,u=t.parseStyleHtml,d=t.editorPlugin;n&&n.forEach((function(f){return Qe.registerMenu(f)})),r&&r.forEach((function(f){return Qe.registerRenderElem(f)})),o&&Qe.registerRenderStyle(o),i&&i.forEach((function(f){return Qe.registerElemToHtml(f)})),a&&Qe.registerStyleToHtml(a),l&&l.forEach((function(f){return Qe.registerPreParseHtml(f)})),c&&c.forEach((function(f){return Qe.registerParseElemHtml(f)})),u&&Qe.registerParseStyleHtml(u),d&&Qe.registerPlugin(d)}o2.forEach((function(t){return os(t)})),os(p2);var h2='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',m2='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',g2='<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',wu={link:{menuKeys:["editLink","unLink","viewLink"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},divider:{menuKeys:["enter"]}},y2={hoverbarKeys:me(me({},wu),{text:{menuKeys:["formatPainter","headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};Qe.setEditorConfig(me({},y2));var b2={hoverbarKeys:wu};Qe.setSimpleEditorConfig(me({},b2));var C2={toolbarKeys:["headerSelect","|","bold","underline","italic",{key:"group-more-style",title:se("editor.more"),iconSvg:g2,menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList",{key:"group-justify",title:se("editor.justify"),iconSvg:m2,menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:se("editor.indent"),iconSvg:h2,menuKeys:["indent","delIndent"]},"|","emotion","divider","|","undo","redo","|","formatPainter","fullScreen"]};Qe.setToolbarConfig(C2);var v2={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};function D2(t){t===void 0&&(t={});var n=t.selector,r=n===void 0?"":n,o=t.content,i=o===void 0?[]:o,a=t.html,l=t.config,c=l===void 0?{}:l,u=t.mode,d=(u===void 0?"default":u)==="simple"?Qe.simpleEditorConfig:Qe.editorConfig,f=me(me({},d.hoverbarKeys||{}),c.hoverbarKeys||{});return E1({selector:r,config:me(me(me({},d),c),{hoverbarKeys:f}),content:i,html:a,plugins:Qe.plugins})}function w2(t){var n=t.selector,r=t.editor,o=t.config,i=o===void 0?{}:o;if(!n)throw new Error("Cannot find 'selector' when create toolbar");var a=Qe.toolbarConfig;return A1(r,{selector:n,config:me(me({},a),i)})}Qe.setSimpleToolbarConfig(v2);class x2{constructor(){this.title="播放视频",this.tag="button"}getValue(n){return!1}isActive(n){return!1}isDisabled(n){return!1}exec(n){const r=S.getSelectedNodeByType(n,"video");console.log(r);const{view:o}=n.getMenuConfig("video");o(r)}}class xu{constructor(n="video"){this.type=n,this.title={video:"删除视频",image:"删除图片"}[n]??"删除",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}getValue(n){return!1}isActive(n){return!1}isDisabled(n){return!1}exec(n){if(O.removeNodes(n,{match:r=>S.checkNodeType(r,this.type)}),n.children.length==0){const r={type:"paragraph",children:[{text:""}]};n.insertNode(r)}}}class B2{constructor(){this.title="删除当前空白选区",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M128.98158345 72.59909097L957.65651249 882.41883582a12.62483038 12.62483038 0 0 1 0.20199729 17.85782259l-44.11746977 45.14639344a12.62483038 12.62483038 0 0 1-17.85151016 0.20199728L665.328565 720.3097013H44.88127586a37.87449114 37.87449114 0 0 1-37.87449115-37.87449114V341.56478984a37.87449114 37.87449114 0 0 1 37.87449115-37.87449114h194.11939195L67.21460081 135.80530428a12.62483038 12.62483038 0 0 1-0.2083097-17.85151017l44.12378219-45.14639344a12.62483038 12.62483038 0 0 1 17.85151015-0.2083097zM979.11872414 303.69661111a37.87449114 37.87449114 0 0 1 37.87449115 37.87449114v340.87042032a37.87449114 37.87449114 0 0 1-37.87449115 37.87449114l-60.10050504-0.00631241-90.43166002-88.37381267H928.61940262V392.06411137h-345.49742066L492.69032193 303.6902987H979.11872414zM574.89690496 631.93588863L329.43864025 392.06411137H95.38059738v239.87177726h479.51630758z"></path></svg>'}getValue(n){return!1}isActive(n){return!1}isDisabled(n){if(n.selection==null||n.children.length===1)return!0;const r=S.getSelectedElems(n);return!(r.length==1&&r[0].type=="paragraph"&&r[0].children.length==1&&r[0].children[0].text=="")}exec(n){console.log(n.selection),O.removeNodes(n)}}class k2{constructor(){this.title="在当前选区上方输入内容",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M402.50684874 1007.33354475h564.71918286v-125.49315273h-439.22603161V405.8448679h339.70996129L465.25342362 3.38833024 62.79688595 405.8448679H402.50684874V1007.33354475z"></path></svg>'}getValue(n){return!1}isActive(n){return!1}isDisabled(n){return!1}exec(n){const r={type:"paragraph",children:[{text:""}]};O.insertNodes(n,r,{at:[n.selection.anchor.path[0]]})}}class E2{constructor(){this.title="在当前选区下方输入内容",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M396.97946691 2.76146536h565.5924011v125.68720121h-439.90520135v476.73155007h340.23525057L459.82306605 1008.25906783l-403.0788512-403.07885119H396.97946691V2.76146536z"></path></svg>'}getValue(n){return!1}isActive(n){return!1}isDisabled(n){}exec(n){const r={type:"paragraph",children:[{text:""}]};n.insertNode(r)}}const _2={key:"viewVideo",factory(){return new x2}},A2={key:"delVideo",factory(){return new xu("video")}},N2={key:"delImage",factory(){return new xu("image")}},S2={key:"insertBottom",factory(){return new E2}},F2={key:"insertTop",factory(){return new k2}},V2={key:"delEmpty",factory(){return new B2}};class O2{title="上传图片";iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>';tag="button";getValue(n){return""}isActive(n){return!1}isDisabled(n){return!1}getMenuConfig(n){return n.getMenuConfig("image")}exec(n,r){const{upload:o}=this.getMenuConfig(n);function i(a){const l={type:"image",src:a,children:[{text:""}]};n.insertNode(l)}o(i)}}const T2={key:"image",factory(){return new O2},config:{}};class j2{title="上传视频";playSvg='<svg viewBox="0 0 1024 1024"><path d="M870.2 466.333333l-618.666667-373.28a53.333333 53.333333 0 0 0-80.866666 45.666667v746.56a53.206667 53.206667 0 0 0 80.886666 45.666667l618.666667-373.28a53.333333 53.333333 0 0 0 0-91.333334z" fill="#ffffff" p-id="5959"></path></svg>';iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>';tag="button";getValue(n){return""}isActive(n){return!1}isDisabled(n){return!1}exec(n,r){const{upload:o}=n.getMenuConfig("video");function i(a){const l={type:"video",poster:a+".jpg",src:a,children:[{text:""}]};n.insertNode(l)}o(i)}}function P2(t,n,r){const{id:o}=S.findKey(t,n);return`w-e-video-container-${o}`}function L2(t,n,r,o){const{width:i,height:a}=o,l={};i&&(l.width=i),a&&(l.height=a);const c=P2(t,n),u=S.isNodeSelected(t,n),d=ht("div",{props:{className:"we-video-play i-ri-play-fill"}});return ht("div",{props:{contentEditable:!1,id:c,className:"w-e-video-container"+(u?" w-e-video-selected":"")},style:l},[r,d])}function M2(t,n,r){const{src:o,poster:i="",style:a={}}=t,{width:l="",height:c=""}=a,u={};u.width="100%",u.height="100%";const d=ht("img",{src:$fileUrl(i),style:u});return L2(r,t,d,{width:l,height:c})}const z2={type:"video",renderElem:M2};function $2(t,n){let{src:r="",poster:o="",width:i="auto",height:a="auto"}=t;const l=r.split(DMX.fileUrl);l[1]&&(r=l[1]);const c=o.split(DMX.fileUrl);return c[1]&&(o=c[1]),`<video poster="${o}" src="${r}" controls="true" width="${i}" height="${a}"></video>`}const I2={type:"video",elemToHtml:$2};function R2(t){const n=F(t);return{type:"video",src:$fileUrl(n.attr("src")),poster:$fileUrl(n.attr("poster"))||"",style:{width:n.attr("width")??"",height:n.attr("height")??""},children:[{text:""}]}}const H2={selector:"video",parseElemHtml:R2},U2={key:"video",factory(){return new j2},config:{}};function W2(t,n){let r=0;return function(){const o=Date.now();o-r>=n&&(t.apply(this,arguments),r=o)}}function Bu(t,n){let r="";const i=(t.attr("style")||"").split(";"),a=i.length;for(let l=0;l<a;l++){const c=i[l];if(c){const u=c.split(":");u[0].trim()===n&&(r=u[1].trim())}}return r}function ku(t,n){const{id:r}=S.findKey(t,n);return`w-e-image-container-${r}`}function q2(t,n,r,o){const{width:i,height:a}=o,l={};i&&(l.width=i),a&&(l.height=a);const c=ku(t,n);return ht("div",{props:{id:c,className:"w-e-image-container"},style:l},[r])}function K2(t,n,r,o){const i=ku(t,n),a=F("body"),{width:l,height:c}=o;let u=0,d=0,f=!1,p=null;function h(){const b=F(`#${i}`);if(b.length===0)throw new Error("Cannot find image container elem");return b}function m(b){p=h(),u=b;const x=p.find("img");if(x.length===0)throw new Error("Cannot find image elem");d=x.width(),x.height(),a.on("mousemove",g),a.on("mouseup",y);const k=S.getHoverbar(t);k&&k.hideAndClean()}const g=W2(b=>{b.preventDefault();const{clientX:x}=b,k=f?u-x:x-u,E=d+k;p!=null&&(E<=15||(p.css("width",`${E}px`),p.css("height","auto")))},50);function y(){if(a.off("mousemove",g),p==null)return;const b=p.width().toFixed(2),x=F(".w-e-text-container").width(),k={style:{...n.style,width:`${(b/x*100).toFixed(2)}%`,height:"auto"}};let E=S.findPath(t,n);console.log(k,E),O.setNodes(t,k,{at:S.findPath(t,n)}),a.off("mouseup",y)}const v={};return l&&(v.width=l),c&&(v.height=c),v.boxShadow="0 0 0 1px #B4D5FF",ht("div",{props:{id:i,contentEditable:!1,className:"w-e-image-container w-e-selected-image-container"},style:v,on:{mousedown:b=>{const x=F(b.target);x.hasClass("w-e-image-dragger")&&(b.preventDefault(),(x.hasClass("left-top")||x.hasClass("left-bottom"))&&(f=!0),m(b.clientX))}}},[r,ht("div",{props:{className:"w-e-image-dragger left-top"}}),ht("div",{props:{className:"w-e-image-dragger right-top"}}),ht("div",{props:{className:"w-e-image-dragger left-bottom"}}),ht("div",{props:{className:"w-e-image-dragger right-bottom"}})])}function J2(t,n,r){const{src:o,href:i="",style:a={}}=t,{width:l="",height:c=""}=a,u=S.isNodeSelected(r,t),d={};l&&(d.width="100%"),c&&(d.height="100%"),d.maxWidth=F(".w-e-text-container").width()+"px";const f=ht("img",{props:{src:o,draggable:!1,"data-href":i},style:d}),p=r.isDisabled();return u&&!p?K2(r,t,f,{width:l,height:c}):q2(r,t,f,{width:l,height:c})}const G2={type:"image",renderElem:J2},Y2={video:{menuKeys:["viewVideo","delVideo","insertBottom","insertTop"]},text:{menuKeys:["headerSelect","urlKey","bulletedList","|","bold","through","color","bgColor","clearStyle"]},link:{menuKeys:["linkUrlKey","unLink"]},image:{menuKeys:["imgUrlKey","delImage","insertBottom","insertTop"]}};class is{constructor(n){this.type=n,this.title="插入或修改链接",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button"}getValue(){return!1}isActive(){return!1}isDisabled(n){return this.type=="image"||this.type=="link"?!1:!!(n.selection==null||S.getSelectedElems(n).some(i=>{const{type:a}=i;if(n.isVoid(i)||["pre","code","link"].includes(a))return!0}))}exec(n){const r=S.getSelectedNodeByType(n,this.type);let o="";this.type=="image"?o=r.href:this.type=="link"?o=r.url:this.type=="text";const{exec:i=null}=n.getMenuConfig("linkUrlKey");i&&i(o)}}function Z2(t){let{src:n,href:r="",style:o={}}=t;const{width:i="",height:a=""}=o;let l="";return i&&(l+=`width: ${i};`),a&&(l+=`height: ${a};`),`<img src="${n}" data-href="${r}" style="${l}"/>`}const X2={type:"image",elemToHtml:Z2};function Q2(t){const n=F(t);let r=n.attr("data-href")||"";return r&&(r=decodeURIComponent(r)),{type:"image",src:$fileUrl(n.attr("src"))||"",href:r,style:{width:Bu(n,"width"),height:Bu(n,"height")},children:[{text:""}]}}const eb={selector:"img:not([data-w-e-type])",parseElemHtml:Q2},tb={key:"urlKey",factory(){return new is("text")}},nb={key:"linkUrlKey",factory(){return new is("link")}},rb={key:"imgUrlKey",factory(){return new is("image")}};function ob(t){const{isInline:n,isVoid:r,insertNode:o}=t,i=t;return i.isInline=a=>{const{type:l}=a;return l==="image"?!0:n(a)},i.isVoid=a=>{const{type:l}=a;return l==="image"||l==="video"?!0:r(a)},i}const ib={menus:[rb,tb,nb,T2,U2,A2,N2,_2,S2,F2,V2],renderElems:[G2,z2],parseElemsHtml:[eb,H2],elemsToHtml:[X2,I2],editorPlugin:ob};Qe.registerModule(ib);const sb={components:{mediaBox:sr,urlBox:Hs},props:{disabled:Boolean,placeholder:{type:String,default:"..."},modelValue:{type:String,default:""}},data(){return{mode:"phone",getFragment:null,editor:null,addFile:null,addUrl:null,fileShow:!1,fileType:"image",urlShow:!1,videoShow:!1,videoNodes:{},url:"",sum:10}},computed:{url2(){return this.url?this.$refs.urlbox.url2str(this.url):""},typeName(){return{video:"视频",audio:"音频",image:"图片",file:"文件"}[this.fileType]}},mounted(){this.init()},methods:{sethtml(t){},init(){const t=this,n={MENU_CONF:{}};n.hoverbarKeys=Y2,n.placeholder=this.placeholder,n.autoFocus=!1,n.onChange=i=>{this.$emit("update:modelValue",i.isEmpty()?"":i.getHtml())},n.onFocus=i=>{},n.MENU_CONF.image={upload(i){t.sum=5,t.fileType="image",t.fileShow=!0,t.addFile=i}},n.MENU_CONF.linkUrlKey={exec:i=>{this.urlShow=!0,setTimeout(()=>{this.url=i},200)}},n.MENU_CONF.video={upload(i){t.sum=1,t.fileType="video",t.fileShow=!0,t.addFile=i},view(i){t.videoNodes=i,t.videoShow=!0}};const r=D2({selector:this.$refs.wangEditor,config:n,html:typeof this.modelValue=="string"?this.modelValue:"",mode:"default"}),o={excludeKeys:["group-more-style","fontSize","fontFamily","insertLink"]};o.insertKeys={index:23,keys:["|","image","video","|","insertBottom","insertTop","delEmpty","|"]},w2({editor:r,selector:this.$refs.wangEditorToolbar,config:o}),this.editor=r},urlChange(t){this.url=t},fnUrlOk(){this.editor.restoreSelection();const t=this.$refs.urlbox.getData();if(S.getSelectedNodeByType(this.editor,"image"))O.setNodes(this.editor,{href:t},{match:r=>S.checkNodeType(r,"image")});else if(S.getSelectedNodeByType(this.editor,"link"))O.setNodes(this.editor,{url:t},{match:o=>S.checkNodeType(o,"link")});else{const o=this.editor.getSelectionText()||t;this.editor.dangerouslyInsertHtml(`<a href='${t}'>${o}</a>`)}this.urlShow=!1},fileOk(){const t=this,n=this.$refs.fileBox.getData();if(n.length==0)return this.$msg.error("请先选择"+this.typeName);n.forEach(function(r){console.log(r);let o=$fileUrl(r);t.addFile(o)}),this.fileShow=!1}}},ab={class:"pos-relative"},lb={class:"bg-black"},cb=["src"],ub={class:"dialog-footer"},db={class:"dialog-footer"},fb={class:"dialog-footer flex justify-end"},pb={class:"pr"},hb={class:"bg-main z-999 b-1 b-solid b-color-[--el-border-color]"},mb={class:"pos-absolute rounded-md overflow-hidden z-9 right-6 top-13 flex items-center *:hover:text-white *:hover:bg-primary *:bg-zinc-100 *:size-8 *:flex *:items-center *:justify-center"},gb={class:"b-0 b-b-1 b-solid b-color-[--el-border-color]",ref:"wangEditorToolbar"};function yb(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("el-dialog"),u=s.resolveComponent("mediaBox"),d=s.resolveComponent("url-box"),f=s.resolveComponent("el-text");return s.openBlock(),s.createElementBlock("div",ab,[s.createVNode(c,{modelValue:i.videoShow,"onUpdate:modelValue":n[1]||(n[1]=p=>i.videoShow=p),title:"播放视频",width:"540px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",ub,[s.createVNode(l,{size:"small",onClick:n[0]||(n[0]=p=>i.videoShow=!1)},{default:s.withCtx(()=>[...n[8]||(n[8]=[s.createTextVNode("关闭",-1)])]),_:1})])]),default:s.withCtx(()=>[s.createElementVNode("div",lb,[s.createElementVNode("video",{src:i.videoNodes.src,controls:"",width:"100%",height:"360px"},null,8,cb)])]),_:1},8,["modelValue"]),s.createVNode(c,{modelValue:i.fileShow,"onUpdate:modelValue":n[3]||(n[3]=p=>i.fileShow=p),title:"选择"+a.typeName,width:"1080px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",db,[s.createVNode(l,{size:"small",onClick:n[2]||(n[2]=p=>i.fileShow=!1)},{default:s.withCtx(()=>[...n[9]||(n[9]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(l,{size:"small",type:"primary",onClick:a.fileOk},{default:s.withCtx(()=>[...n[10]||(n[10]=[s.createTextVNode("确认",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[(s.openBlock(),s.createBlock(u,{ref:"fileBox",type:i.fileType,key:i.fileType,sum:i.sum},null,8,["type","sum"]))]),_:1},8,["modelValue","title"]),s.createVNode(c,{modelValue:i.urlShow,"onUpdate:modelValue":n[5]||(n[5]=p=>i.urlShow=p),title:"选择链接",width:"1080px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",fb,[s.createElementVNode("div",pb,[s.createVNode(f,{size:"small",class:"pr-xs"},{default:s.withCtx(()=>[...n[11]||(n[11]=[s.createTextVNode("当前链接",-1)])]),_:1}),s.createVNode(f,{size:"small",type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(a.url2),1)]),_:1})]),s.createVNode(l,{size:"small",onClick:n[4]||(n[4]=p=>i.urlShow=!1)},{default:s.withCtx(()=>[...n[12]||(n[12]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(l,{size:"small",type:"primary",onClick:a.fnUrlOk},{default:s.withCtx(()=>[...n[13]||(n[13]=[s.createTextVNode("确认",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(d,{onChange:a.urlChange,ref:"urlbox"},null,8,["onChange"])]),_:1},8,["modelValue"]),s.createElementVNode("div",hb,[s.createElementVNode("div",mb,[s.createElementVNode("div",{onClick:n[6]||(n[6]=p=>i.mode="pc"),class:s.normalizeClass({"text-primary":i.mode==="pc"})},[...n[14]||(n[14]=[s.createElementVNode("div",{class:"i-mdi-monitor click size-4"},null,-1)])],2),s.createElementVNode("div",{onClick:n[7]||(n[7]=p=>i.mode="phone"),class:s.normalizeClass({"text-primary":i.mode==="phone"})},[...n[15]||(n[15]=[s.createElementVNode("div",{class:"i-mdi-cellphone click text-lg"},null,-1)])],2)]),s.createElementVNode("div",gb,null,512),s.createElementVNode("div",{class:s.normalizeClass(["wangEditor min-h-100",i.mode==="phone"?"*:rounded-md *:w-120 *:mx-auto *:b-1 *:b-solid *:b-color-[--el-border-color]":""]),ref:"wangEditor"},null,2)])])}const Eu=ne(sb,[["render",yb]]),bb=Object.freeze(Object.defineProperty({__proto__:null,default:Eu},Symbol.toStringTag,{value:"Module"})),Cb={name:"a-image-text",emits:["change","update:modelValue"],components:{imgBox:sr},props:{modelValue:{type:[Array,Object],default:[]}},data(){return{imgShow:!1,sum:10,index:-1,list:[]}},created(){Array.isArray(this.modelValue)&&(this.list=this.modelValue),this.$watch("list",function(t){this.$emit("update:modelValue",t),this.$emit("change",t)},{deep:!0})},methods:{getData(){return this.list},addText(){const t=this;this.$prompt(!1,"添加文字",{inputType:"textarea"}).then(n=>{this.list.push({text:n.value}),setTimeout(function(){t.$refs.scrollbar.setScrollTop(9999)},200)})},addImage(){this.sum=10,this.imgShow=!0},editImage(t){this.sum=1,this.index=t,this.imgShow=!0},fnImgsOk(){const t=this,n=this.$refs.imgbox.getData();if(n.length==0)return this.$msg.error("请先选择图片");if(this.sum==1)this.list[this.index].image=n[0];else{for(let r=0;r<n.length;r++)this.list.push({image:n[r]});setTimeout(function(){t.$refs.scrollbar.setScrollTop(9999)},200)}this.imgShow=!1},editText(t){this.$prompt(!1,"修改文字",{inputValue:this.list[t].text,inputType:"textarea"}).then(n=>{this.list[t].text=n.value})}}},vb={class:"dialog-footer"},Db={class:"image-text"},wb={class:"box"},xb={key:0,class:"no-data"},Bb={key:0,class:"item text"},kb=["onClick"],Eb=["onClick"],_b={key:1,class:"item img"},Ab=["onClick"],Nb=["onClick"],Sb={class:"bottom"};function Fb(t,n,r,o,i,a){const l=s.resolveComponent("img-box"),c=s.resolveComponent("el-button"),u=s.resolveComponent("el-dialog"),d=s.resolveComponent("a-image"),f=s.resolveComponent("a-draggable"),p=s.resolveComponent("el-scrollbar");return s.openBlock(),s.createElementBlock("div",null,[s.createVNode(u,{modelValue:i.imgShow,"onUpdate:modelValue":n[1]||(n[1]=h=>i.imgShow=h),title:"选择图片",width:"1080px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",vb,[s.createVNode(c,{size:"small",onClick:n[0]||(n[0]=h=>i.imgShow=!1)},{default:s.withCtx(()=>[...n[4]||(n[4]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(c,{size:"small",type:"primary",onClick:a.fnImgsOk},{default:s.withCtx(()=>[...n[5]||(n[5]=[s.createTextVNode("确认",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(l,{type:"image",ref:"imgbox",sum:i.sum,cate:2},null,8,["sum"])]),_:1},8,["modelValue"]),s.createElementVNode("div",Db,[s.createElementVNode("div",wb,[s.createVNode(p,{ref:"scrollbar",height:"100%"},{default:s.withCtx(()=>[i.list.length==0?(s.openBlock(),s.createElementBlock("div",xb," 点击下方按钮添加图片或者文字 ")):s.createCommentVNode("",!0),s.createVNode(f,{class:"list",list:i.list,filter:".del"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(h,m)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[h.text?(s.openBlock(),s.createElementBlock("div",Bb,[s.createElementVNode("p",null,s.toDisplayString(h.text),1),s.createElementVNode("div",{class:"del",onClick:g=>i.list.splice(m,1)}," 删除 ",8,kb),s.createElementVNode("div",{class:"edit",onClick:g=>a.editText(m)}," 编辑 ",8,Eb)])):s.createCommentVNode("",!0),h.image?(s.openBlock(),s.createElementBlock("div",_b,[s.createVNode(d,{preview:!1,src:h.image,process:"400"},null,8,["src"]),s.createElementVNode("div",{class:"del",onClick:g=>i.list.splice(m,1)}," 删除 ",8,Ab),s.createElementVNode("div",{class:"edit",onClick:g=>a.editImage(m)}," 编辑 ",8,Nb)])):s.createCommentVNode("",!0)],64))),256))]),_:1},8,["list"])]),_:1},512)]),s.createElementVNode("div",Sb,[s.createElementVNode("div",{class:"item",onClick:n[2]||(n[2]=(...h)=>a.addText&&a.addText(...h))},[...n[6]||(n[6]=[s.createElementVNode("i",{class:"i-ri-text"},null,-1),s.createElementVNode("span",null,"文字",-1)])]),s.createElementVNode("div",{class:"item",onClick:n[3]||(n[3]=(...h)=>a.addImage&&a.addImage(...h))},[...n[7]||(n[7]=[s.createElementVNode("i",{class:"i-ri-image-add-line"},null,-1),s.createElementVNode("span",null,"图片",-1)])])])])])}const _u=ne(Cb,[["render",Fb],["__scopeId","data-v-a908f232"]]),Vb={props:{modelValue:Array|String|Number,remove:Array|String|Number,url:String|Array,disabled:Boolean,level:{type:Number,default:0},props:{type:Object,default:{}},placeholder:{type:String,default:"选择"}},data(){return{value:[],options:[],_props:{}}},created(){let t;if(this.url){if((this.props.emitPath||this.props.multiple)&&this.modelValue){t=(this.modelValue+"").split(",");for(let n=0;n<t.length;n++)t[n]=this.setNumber(t[n])}else t=this.setNumber(this.modelValue);if(this.value=t,this._props={value:"id",label:"title",checkStrictly:!0,emitPath:!1,...this.props},typeof this.url=="object")return Array.isArray(this.url)&&this.url.forEach(n=>{n.status===0&&(n.disabled=!0)}),this.options=this.composeTree(this.url);$req.post(this.url).then(n=>{n.code==0&&(n.data.constructor===Array&&n.data.forEach(r=>{r?.status===0&&(r.disabled=!0)}),this.options=this.composeTree(n.data))})}},methods:{setNumber(t){var n=/^\d+(\.\d+)?$/;return n.test(t)?Number(t):t},change(t){t&&t.constructor==Array?t=Array.from(new Set([].concat(...t))):t=t||0,this.$emit("update:modelValue",t),this._props.checkStrictly&&!this._props.multiple&&this.$refs.cascader.togglePopperVisible()},composeTree(t=[]){const n=[],r=this.remove,o=JSON.parse(JSON.stringify(t));if(t?.length&&typeof t[0]=="string")return t.forEach((l,c)=>{n.push({title:l,id:c})}),n;if(t&&t.constructor==Object){for(let l in t)n.push({title:t[l],id:l});return n}const i=function(l,c=1){return l==0?0:(o.forEach(u=>{u.id==l&&u.pid!=0&&i(u.pid,c++)}),c+1)};if(!Array.isArray(t))return n;const a={};return o.forEach(l=>{a[l.id]=l}),o.forEach(l=>{if((l.id==r||r instanceof Array&&r.indexOf(l.id)>-1||l.pid==r)&&r&&(l.disabled=!0),this.level==0||i(l.pid)<=this.level){const c=a[l.pid];c?(c.children||(c.children=[])).push(l):n.push(l)}}),n}}};function Ob(t,n,r,o,i,a){const l=s.resolveComponent("el-cascader");return r.url?(s.openBlock(),s.createBlock(l,{key:0,"validate-event":!1,ref:"cascader",modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=c=>i.value=c),options:i.options,clearable:!0,"collapse-tags":!0,"show-all-levels":!1,onChange:a.change,maxCollapseTags:i._props.maxCollapseTags||1,props:i._props,disabled:r.disabled,placeholder:r.placeholder,class:"w-full"},null,8,["modelValue","options","onChange","maxCollapseTags","props","disabled","placeholder"])):s.createCommentVNode("",!0)}const Au=ne(Vb,[["render",Ob]]),Tb={props:{modelValue:Array|String,add:{type:String,default:"添加"}},data(){return{tags:[]}},created(){Array.isArray(this.modelValue)&&(this.tags=this.modelValue)},methods:{fnEdit(t){const n=this.tags[t];$prompt(!1,"修改",{inputValue:n}).then(r=>{r.value!=n&&r.value&&(this.tags[t]=r.value)})},fnAdd(){$prompt(!1,"添加",{}).then(t=>{t.value&&t.value&&(this.tags.push(t.value),this.$emit("update:modelValue",this.tags))}).catch(()=>{})},fnClose(t){console.log(t),this.tags.splice(t,1),this.tags.length==0?this.$emit("update:modelValue",""):this.$emit("update:modelValue",this.tags)}}};function jb(t,n,r,o,i,a){const l=s.resolveComponent("el-tag"),c=s.resolveComponent("el-button"),u=s.resolveComponent("a-draggable");return i.tags?(s.openBlock(),s.createBlock(u,{key:0,class:"flex flex-wrap gap-10px",list:i.tags,filter:".add"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.tags,(d,f)=>(s.openBlock(),s.createBlock(l,{key:d,closable:"","disable-transitions":!1,onClose:()=>{a.fnClose(f)},onClick:s.withModifiers(p=>a.fnEdit(f),["stop"]),title:"点击修改"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(d),1)]),_:2},1032,["onClose","onClick"]))),128)),s.createVNode(c,{class:"add",size:"small",onClick:a.fnAdd},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(r.add),1)]),_:1},8,["onClick"])]),_:1},8,["list"])):s.createCommentVNode("",!0)}const Nu=ne(Tb,[["render",jb]]),Pb={name:"a-color-picker",props:{modelValue:String,tabindex:{type:[Number,String],default:0},colorFormat:{type:String,default:"rgb"},size:{type:String,default:"default"},showAlpha:{type:[Boolean,String,Number],default:!0},colors:{type:Array,default:["#ffffff","#409EFF","#F56C6C","#E6A23C","#ffd700","#67C23A","#00ced1","#9254de","#000000","#303133","#666666","#909399","#C0C4CC","#DCDFE6","#E4E7ED","#EBEEF5","#F2F6FC"]}},data(){return{value:"",showAlpha_:!0}},created(){this.showAlpha==0?this.showAlpha_=!1:this.showAlpha_=!!this.showAlpha,this.modelValue&&(this.value=this.modelValue)},methods:{show(){this.$refs.colorPicker.show()},change(t){this.$emit("update:modelValue",t)}}},Lb={class:"a-color-picker input-button w-full flex bg-main"};function Mb(t,n,r,o,i,a){const l=s.resolveComponent("el-input"),c=s.resolveComponent("el-color-picker");return s.openBlock(),s.createElementBlock("div",Lb,[s.createVNode(l,{readonly:"",size:r.size,modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=u=>i.value=u),placeholder:"点击右侧选择颜色"},{prefix:s.withCtx(()=>[...n[2]||(n[2]=[s.createElementVNode("div",{class:"color-icon"},[s.createElementVNode("i",{class:"i-ri-palette-line",style:{color:"#D9D9D9"}})],-1)])]),_:1},8,["size","modelValue"]),s.createElementVNode("div",null,[s.createVNode(c,{"color-format":r.colorFormat,ref:"colorPicker",tabindex:r.tabindex,onChange:a.change,modelValue:i.value,"onUpdate:modelValue":n[1]||(n[1]=u=>i.value=u),"show-alpha":i.showAlpha_,predefine:r.colors},null,8,["color-format","tabindex","onChange","modelValue","show-alpha","predefine"])])])}const Su=ne(Pb,[["render",Mb]]),zb={},$b={props:{zoom:{type:Number,default:15},mode:{type:String,default:""},search:String|Array,modelValue:String|Array},data(){return{map:{},point:[],show:!1,city:0,value:""}},created(){console.log("created"),this.modelValue&&typeof this.modelValue=="string"?this.value=this.modelValue.split(","):this.value=this.modelValue},mounted(){this.mode&&setTimeout(()=>{this.init()},100)},methods:{add(){const t=this;this.show=!0,setTimeout(()=>{t.init()},100)},init(){console.log("init");const t=this;this.map=new BMap.Map("container"),this.map.addEventListener("click",function(n){let r=n.point.lng.toFixed(6),o=n.point.lat.toFixed(6);t.point=[r,o],t.map.clearOverlays();let i=new BMap.Point(r,o);t.map.addOverlay(new BMap.Marker(i)),t.mode&&t.getData()}),this.map.addControl(new BMap.NavigationControl),this.map.addControl(new BMap.ScaleControl),this.map.addControl(new BMap.OverviewMapControl),this.map.enableScrollWheelZoom(!0),this.setMap(this.value)},clear(){this.$emit("update:modelValue","")},getData(){this.show=!1,this.value=this.point,this.$emit("update:modelValue",this.point.join(","))},setMap(t){if(t?.length===0&&(t=""),typeof t=="object"&&t?.length==2){const n=new BMap.Point(t[0],t[1]);this.map.clearOverlays(),this.map.addOverlay(new BMap.Marker(n)),this.map.centerAndZoom(n,this.zoom)}else this.map.centerAndZoom(new BMap.Point(116.41667,39.91667),7)},change(t,n){if(console.log(t,n),t?.length===0)return;let r="";t.length==1||t[0].indexOf("市")>-1?r=t[0]:r=t[1],r.endsWith("市")&&(r=r.slice(0,-1));let o=zb[r];o&&this.setMap(o)}}},Ib={class:"map"},Rb={class:"input"},Hb={class:"dialog-footer"},Ub={key:1,class:"map"},Wb={class:"input text-center bg-main"},qb={key:2,class:"input-button"};function Kb(t,n,r,o,i,a){const l=s.resolveComponent("a-region-picker"),c=s.resolveComponent("el-button"),u=s.resolveComponent("el-dialog"),d=s.resolveComponent("el-input");return s.openBlock(),s.createElementBlock("div",null,[r.mode?(s.openBlock(),s.createElementBlock("div",Ub,[s.createElementVNode("div",Wb,s.toDisplayString(r.modelValue),1),n[7]||(n[7]=s.createElementVNode("div",{id:"container"},null,-1))])):(s.openBlock(),s.createBlock(u,{key:0,modelValue:i.show,"onUpdate:modelValue":n[2]||(n[2]=f=>i.show=f),title:"选择地点",width:"1080px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",Hb,[s.createVNode(c,{onClick:n[1]||(n[1]=f=>i.show=!1)},{default:s.withCtx(()=>[...n[5]||(n[5]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(c,{type:"primary",onClick:a.getData},{default:s.withCtx(()=>[...n[6]||(n[6]=[s.createTextVNode("确认",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createElementVNode("div",Ib,[s.createElementVNode("div",Rb,[s.createVNode(l,{level:2,onChange:a.change,placeholder:"按城市查找",modelValue:i.city,"onUpdate:modelValue":n[0]||(n[0]=f=>i.city=f)},null,8,["onChange","modelValue"])]),n[4]||(n[4]=s.createElementVNode("div",{id:"container"},null,-1))])]),_:1},8,["modelValue"])),r.mode?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",qb,[s.createVNode(d,{modelValue:i.value,"onUpdate:modelValue":n[3]||(n[3]=f=>i.value=f),onClear:a.clear,clearable:"",placeholder:"选择坐标"},{prefix:s.withCtx(()=>[...n[8]||(n[8]=[s.createElementVNode("div",null,[s.createElementVNode("i",{class:"i-ri-map-pin-line op-70"})],-1)])]),_:1},8,["modelValue","onClear"]),s.createVNode(c,{style:{"margin-left":"-2px"},type:"primary",onClick:a.add},{default:s.withCtx(()=>[...n[9]||(n[9]=[s.createTextVNode("选择坐标",-1)])]),_:1},8,["onClick"])]))])}const ss=ne($b,[["render",Kb],["__scopeId","data-v-25afa672"]]),as=globalThis.dmxRegions??[],Jb={emits:["change","update:modelValue"],props:{disabled:Boolean,modelValue:Array|String|Number,checkStrictly:Boolean,placeholder:String,level:Boolean|String},data(){return{value:"",props:{emitPath:!1,checkStrictly:!!this.checkStrictly,children:"s",label:"n",value:"c"},region:as}},created(){this.modelValue&&typeof this.modelValue=="string"?this.value=this.modelValue*1:this.value=this.modelValue,this.level==2?this.region=this.setList(2):this.level==1?this.region=this.setList(1):this.region=as},methods:{setList(t){let n=[];return as.forEach(r=>{t===1?n.push({n:r.n,c:r.c}):r.s?n.push({n:r.n,c:r.c,s:r.s.map(o=>({n:o.n,c:o.c}))}):n.push({n:r.n,c:r.c,s:r.s})}),n},change(t){const n=this.$refs.cascader.getCheckedNodes()?.[0]?.pathLabels;this.$emit("update:modelValue",t),n&&this.$emit("change",n,t)}}};function Gb(t,n,r,o,i,a){const l=s.resolveComponent("el-cascader");return s.openBlock(),s.createElementBlock("div",null,[s.createVNode(l,{ref:"cascader",modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=c=>i.value=c),onChange:a.change,options:i.region,props:i.props,disabled:r.disabled,clearable:"",placeholder:r.placeholder||"选择"},null,8,["modelValue","onChange","options","props","disabled","placeholder"])])}const Fu=ne(Jb,[["render",Gb]]),ls=t=>t?Array.isArray(t)?typeof t[0]=="object"?t:t.map((n,r)=>({label:n,value:r})):typeof t=="object"?Object.keys(t).map(n=>({label:t[n],value:n})):[]:[],Yb={props:{node:Object,modelValue:void 0,size:""},render(){const{slot:t,row:n,index:r,value:o,oldData:i}=this.node;return t({row:n,index:r,value:o,oldData:i})},renderError(t,n){return t("pre",{style:{color:"red"}},n.stack)}},ao=t=>s.defineAsyncComponent(t),Zb=ao(()=>Promise.resolve().then(()=>tD)),Xb=ao(()=>Promise.resolve().then(()=>dD)),Qb=ao(()=>Promise.resolve().then(()=>CD)),eC=ao(()=>Promise.resolve().then(()=>FD)),Jt={media:fm,slot:Yb,"input-select":gp,"group-tabs-plus":Zb,"group-tabs":Xb,"group-table":Qb,group:eC,md5:vm,file:ym,"search-box":Us,"input-auto":Dp},Vu={input:{component:we.ElInput,props:(t,n)=>({type:"text",autocomplete:"off",readonly:t.readonly,clearable:t.clearable??!0,placeholder:t.placeholder||"输入"}),slots:t=>({prepend:t.pre?t.pre:null,append:t.unit?t.unit:null})},select:{component:we.ElSelect,props:(t,n)=>({placeholder:t.placeholder||"请选择"}),children:(t,n)=>n.selectCols.map(r=>({component:s.markRaw(we.ElOption),props:{label:r.label,value:r.value}}))},radio:{component:we.ElRadioGroup,props:(t,n)=>({}),children:(t,n)=>n.radioCols.map(r=>({component:s.markRaw(we.ElRadio),props:{value:r.value},children:r.label}))},"radio-button":{component:we.ElRadioGroup,props:(t,n)=>({}),children:(t,n)=>n.radioCols.map(r=>({component:s.markRaw(we.ElRadioButton),props:{value:r.value},children:r.label}))},checkbox:{component:we.ElCheckboxGroup,props:(t,n)=>({}),children:(t,n)=>n.checkboxCols.map(r=>({component:s.markRaw(we.ElCheckbox),props:{value:r.value},children:r.label}))},imgs:{component:Rs,props:(t,n)=>({limit:t.limit,cateId:t.cateId,tips:t.tips})},images:{component:Rs,props:(t,n)=>({limit:t.limit,"cate-id":t.cateId,tips:t.tips})},editor:{component:Eu,props:t=>({placeholder:t.placeholder})},"image-text":{component:_u,props:()=>({})},selects:{component:Au,props:(t,n)=>({placeholder:t.placeholder,url:t.url,remove:t.remove,level:t.level||0})},tags:{component:Nu,props:()=>({})},color:{component:Su,props:(t,n)=>({showAlpha:t.showAlpha,colorFormat:t.colorFormat})},map:{component:ss},pickerMap:{component:ss},region:{component:Fu,props:(t,n)=>({checkStrictly:t.checkStrictly,level:t.level})},url:{component:nm,props:()=>({})},time:{component:we.ElTimePicker,props:(t,n)=>({format:t.format||"HH:mm:ss",valueFormat:t.valueFormat||"HH:mm:ss",placeholder:"选择时间"})},times:{component:we.ElTimePicker,props:(t,n)=>({"start-placeholder":"开始时间","end-placeholder":"结束时间",format:"HH:mm:ss","value-format":"HH:mm:ss","is-range":!0,"range-separator":"~"})},date:{component:we.ElDatePicker,props:(t,n)=>({type:"date",placeholder:"选择日期","value-format":"YYYY-MM-DD"})},dates:{component:we.ElDatePicker,props:(t,n)=>({"start-placeholder":"开始日期","end-placeholder":"结束日期",type:"daterange","range-separator":"~",format:"YYYY-MM-DD","value-format":"X"})},datetime:{component:we.ElDatePicker,props:(t,n)=>({type:"datetime",placeholder:"选择时间",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss"})},datetimes:{component:we.ElDatePicker,props:(t,n)=>({"start-placeholder":"开始时间","end-placeholder":"结束时间",type:"datetimerange","range-separator":"~",format:t.format||"YYYY-MM-DD HH:mm:ss","value-format":"x"})},switch:{component:we.ElSwitch,props:(t,n)=>({"active-value":1,"inactive-value":0,"active-text":"是","inactive-text":"否","inline-prompt":!0})},slider:{component:we.ElSlider,props:(t,n)=>({size:"small",marks:t.marks,"show-input":t.showInput,min:t.min||0,max:t.max||100})},textarea:{component:we.ElInput,props:(t,n)=>({type:"textarea",autosize:{minRows:t.rows??1},maxlength:t.maxlength,"show-word-limit":!!t.maxlength,autocomplete:"off",placeholder:t.placeholder})},number:{component:we.ElInputNumber,props:(t,n)=>({style:"width: 120px",min:t.min||0,max:t.max,controls:t.controls??!0,placeholder:t.placeholder??"输入数字","controls-position":t.position??"right"})},password:{component:we.ElInput,props:(t,n)=>({type:"password",autocomplete:"off","show-password":!0,placeholder:t.placeholder||"输入密码"})},"input-button":{component:Vo,props:(t,n)=>({btn:t.btn,readonly:t.readonly,placeholder:t.placeholder,icon:t.icon})}},tC=(t,n)=>{const{init:r}=n;switch(t){case"slot":return{component:Jt.slot,props:{node:{slot:r.slot,index:n.index,value:n.value,row:n.row,oldData:n.oldData}}};case"media":return{component:Jt.media,props:{type:r.type==="img"?"image":r.type,limit:r.limit,cate:r.cate}};case"component":return{component:typeof r.component=="string"?n.components?.[r.component]:r.component,props:{init:r,formData:n.row,data:n.oldData}};case"search-box":return{component:Jt["search-box"],props:{init:r.init,data:n.oldData,onChange:n.joinChange}};case"input-auto":return{component:Jt["input-auto"],props:{list:r.list||[]}};case"input-select":return{component:Jt["input-select"],props:{options:r.options,group:r.group}};case"file":return{component:Jt.file,props:{isSystem:r.isSystem,url:r.url,filename:r.filename,accept:r.accept}};case"md5":return{component:Jt.md5,props:{length:r.length,type:r.md5type}};case"group-tabs":case"group-tabs-plus":case"group-table":case"group":return{component:Jt[t],props:{init:n.prop}};default:return null}},nC=s.defineComponent({name:"form-item",emits:["change","update:modelValue"],props:{index:Number,cols:Array,clearable:{type:Boolean,default:!0},size:{type:String,default:"default"},modelValue:[String,Object,Number,Array,Boolean,Function],join:Object,disabled:Boolean,row:{type:Object,default:()=>({})},oldData:{type:Object,default:()=>({})},prop:{type:[Object,Function],default:()=>({})}},setup(t,{emit:n}){const r=s.ref(null),o=s.ref(null),i=s.computed(()=>{let g=t.prop;const y=$config?.inputs?.shortcuts?.[g.type];return y?{...y,...g,type:y.type}:g}),a=s.computed(()=>i.value.size??t.size??"default");s.computed(()=>t.disabled!==void 0?t.disabled:typeof i.value.disabled=="function"?i.value.disabled(t.modelValue,t.row):!!i.value.disabled);const l=s.computed(()=>i.value.url?i.value.url?.map?.(g=>({label:g.title,value:g.id})):ls(i.value.cols)),c=s.computed(()=>i.value.cols?ls(i.value.cols):[{label:"是",value:!0},{label:"否",value:!1}]),u=s.computed(()=>ls(i.value.cols)),d=()=>{const g=i.value;return typeof g.slot=="function"?"slot":["image","img","video","audio"].includes(g.type)?"media":g.component?"component":g.type||"input"};console.log(i.value.disabled);const f=i.value.disabled,p=()=>{const g=i.value,{modelValue:y}=t;switch(g.type){case"switch":g.props?.activeValue===!0?r.value=!!y||!1:r.value=Number(y)||0;break;case"radio":r.value=y;break;case"checkbox":y&&typeof y=="string"&&y.includes(",")?r.value=y.split(","):y?r.value=y:r.value=[];break;default:(y||y===0)&&(r.value=y);break}},h=()=>{const g=d(),y={init:i.value,value:r.value,row:t.row,oldData:t.oldData,prop:t.prop,index:t.index,selectCols:l.value,radioCols:c.value,checkboxCols:u.value,components:$config?.inputs?.components,joinChange:m},v=tC(g,y);if(v){o.value={...v,component:s.markRaw(v.component)};return}const D=Vu[g]||Vu.input;D&&(o.value={component:s.markRaw(D.component),props:D.props?D.props(i.value,y):{},slots:D.slots?D.slots(i.value,y):null,children:D.children?D.children(i.value,y):null})},m=g=>{typeof i.value.format=="function"&&(g=i.value.format(g)),console.log("joinChange"),n("update:modelValue",g)};return s.onMounted(()=>{p(),h(),s.watch(r,g=>{let y=g;o.value.props.onChange||(typeof i.value.format=="function"&&(y=i.value.format(g)),n("update:modelValue",y))},{deep:!0})}),{size:a,internalValue:r,disabled:f,currentComponent:o}}}),rC={class:"dmx-input-item"};function oC(t,n,r,o,i,a){return s.openBlock(),s.createElementBlock("div",rC,[t.currentComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(t.currentComponent.component),s.mergeProps({key:0,modelValue:t.internalValue,"onUpdate:modelValue":n[0]||(n[0]=l=>t.internalValue=l),size:t.size,disabled:t.disabled},{...t.currentComponent.props,...t.prop.props||{}}),s.createSlots({default:s.withCtx(()=>[t.currentComponent.children?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(t.currentComponent.children,(l,c)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(l.component),s.mergeProps({key:c},{ref_for:!0},l.props),{default:s.withCtx(()=>[l.children?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(l.children),1)],64)):s.createCommentVNode("",!0)]),_:2},1040))),128)):s.createCommentVNode("",!0)]),_:2},[t.currentComponent.slots?.prepend?{name:"prepend",fn:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(t.currentComponent.slots.prepend),1)]),key:"0"}:void 0,t.currentComponent.slots?.append?{name:"append",fn:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(t.currentComponent.slots.append),1)]),key:"1"}:void 0]),1040,["modelValue","size","disabled"])):s.createCommentVNode("",!0)])}const cs=ne(nC,[["render",oC]]),lo=Object.freeze(Object.defineProperty({__proto__:null,default:cs},Symbol.toStringTag,{value:"Module"})),Ou=t=>{const n={};for(const r in t){const o=t[r];r.indexOf(".")>-1?dn(n,r,o):n[r]=o}return n},iC={name:"admin-form",components:{inputItem:cs,imgInfo:Ls},emits:["submit","change","end"],props:{init:{type:Object,default:()=>({})},size:String,disabled:Boolean,data:{type:Object,default:()=>({})},asyncData:Function|String|Object,showButton:{type:Boolean,default:!0},beforeSubmit:{type:Function,default:()=>!0},afterSubmit:{type:Function,default:()=>!0}},data(){return{_disabled:!1,width:"720px",gloKey:0,rules:{},loading:!0,tabsIndex:0,cols:[],colsHide:{},confirmButton:{},editData:{},change:{},hidden:{},linkages:{},rawData:{}}},created(){this.initializeForm()},methods:{initializeForm(){if(!this.init?.cols)return;this.setInitialValues(),this.processColumns();const t=this.asyncData||this.init.asyncData;t&&t.constructor===Function?t(this.setData):t&&t.constructor===Object?this.urlData(t):this.setData(this.init.data??this.data)},setInitialValues(){this.init?.tabs&&(this.tabsIndex=Object.keys(this.init.tabs)[0]),this.init.hidden&&typeof this.init.hidden=="object"&&(this.hidden=JSON.parse(JSON.stringify(this.init.hidden))),(this.init.disabled||this.disabled)&&(this._disabled=!0),this.init.width&&(this.width=this.init.width),this.init.confirmButton===!1?this.confirmButton=!1:this.init.confirmButton?this.confirmButton=this.init.confirmButton:this.confirmButton={text:this.init.buttonText??$config?.form?.btnText??"提交",disabled:!1}},processColumns(){this.init.cols.forEach(async(t,n)=>{if(typeof t=="function"&&(this.init.cols[n]=t=t(this.data)),typeof t.change=="function"&&Array.isArray(t.changeField)&&(this.linkages[t.field]=t),t.slot&&typeof t.slot!="function"){let r=typeof t.slot=="string"?t.slot:"cols."+t.field;this.$slots[r]&&(t.slot=this.$slots[r])}t.type=="selects"&&t.remove=="$row.id"&&(t.remove2={remove:this.data.id}),this.init.size&&!t.size&&(t.size=this.init.size),t.label!==void 0&&(t.title=t.label),t.component&&(t.component=s.markRaw(t.component))}),this.cols=this.init.cols},async btnAction(t){let n="";if(t.confirm===!0?n="确定要执行"+t.title+"操作?":t.confirm&&(n=t.confirm),!(n&&await $confirm(n)!="confirm")){if(!t.action)return $msg.error("action 未定义");t.action({...this.hidden,...this.editData},t)}},isIntersection(t,n){return typeof t!="object"||typeof n!="object"?0:t.filter(r=>n.some(o=>o===r))?.length},linkage(t,n=null){let r={};typeof t=="object"?r=t:r={[t]:n};for(const o in this.linkages)if(Object.hasOwnProperty.call(this.linkages,o)){const i=this.linkages[o];(o!=t&&(!i.changeField||i.changeField?.indexOf(t)>-1)||this.isIntersection(i.changeField,Object.keys(r)))&&i.change({data:r,form:this,input:this.$refs.inputItem?.filter(a=>a.prop.field===o)[0]})}},onChange(t,n){if(typeof t=="object"&&t?.__join){n=t.field,t=t.data;const r=this.cols.findIndex(o=>o.field===n);this.$refs.inputItem&&this.$refs.inputItem[r]&&(this.$refs.inputItem[r].value=t)}this.editData[n]=t,t!=this.rawData[n]?this.change[n]=t:delete this.change[n],Object.keys(this.linkages)?.length&&this.linkage(n,t),this.$emit("change",{[n]:t},this)},tabsChange(t){this.tabsIndex=t.paneName},setValue(t,n=!0){this.editData={...this.editData,...t},n&&this.gloKey++},hideField(t,n=!0){if(typeof t=="object")for(var r=0;r<t.length;r++)this.colsHide[t[r]]=n;else this.colsHide[t]=n},editCols(t,n){this.cols.forEach((r,o)=>{r.field==t&&(this.cols[o]={...r,...n})})},newData(){this.$req.removeCache(this.asyncData?.url),this.urlData(this.asyncData,!0)},urlData(t,n=!1){const r=this;let o={};t?.where?.constructor===Function?o=t.where(this.data):t?.where&&(o=t.where),$req.post(t.url,o,!1,t.cache||!1).then(function(i){i.code==0?(i.cache?r.$root.reload=r.newData:r.$root.reload=!1,n&&r.$msg.success("刷新成功"),r.setData(i.data)):r.$msg.error(i.msg)}).catch(i=>{console.error("Error fetching form data:",i),r.$msg.error("获取表单数据失败")})},setData(t,n=!1){this.rawData=t;let r={},o={};this.init.fields&&this.init.fields.forEach(i=>{r[i]=t[i],this.change[i]=t[i]}),this.cols.forEach(i=>{(i.hidden===!0||i.hidden==1||i.hidden?.(t[i.field],t))&&(this.colsHide[i.field]=!0),i.required?(o[i.field]=[{required:!0,message:`${i.title}不能为空`}],i.rules&&(i.rules.constructor===Array?o[i.field]=[...o[i.field],...i.rules]:i.rules.constructor===Object&&(o[i.field]=[...o[i.field],i.rules]))):i.rules&&(o[i.field]=i.rules);const a=Yt(t,i.field);typeof a<"u"&&a!==null&&i.type!="text"&&i.type!="hidden"?typeof i.format=="function"?r[i.field]=i.format(a):r[i.field]=JSON.parse(JSON.stringify(a)):i.type=="hidden"?this.hidden[i.field]=a??i.value:i.type!="text"&&(r[i.field]=(i.format?i.format(i.value):i.value)??"",i.value&&(this.change[i.field]=i.value)),r[i.field]||(["number","switch","slider"].indexOf(i.type)>-1?r[i.field]=0:["group","group-table","checkbox","image-text","times","datetimes","dates"].indexOf(i.type)>-1&&(i.type.indexOf("group")===-1||i.limit>1)&&(r[i.field]=[]))}),this.editData=r,this.rules=o,this.loading=!1,n&&this.gloKey++,this.$nextTick(()=>{this.linkage(t),this.$emit("end",this.getData(),this)})},getData(){return Ou({...this.hidden,...this.editData})},resetForm(){this.$refs.form&&this.$refs.form.resetFields()},doSubmit(t=!1){if(!this.init.url)return $msg.warning("url 未定义");t||(t=this.change);const n=Ou({...this.hidden,...t});if(typeof this.init.url=="function")return this.init.url(n);$req.post(this.init.url,n,this.init.loading||"提交中").then(r=>{this.$emit("submit",{data:n,res:r}),r.code==0?(this.asyncData?.cache&&$req.removeCache(this.asyncData.url),$msg.success(r.msg)):$msg.error(r.msg)}).catch(r=>{console.error("Error submitting form:",r),$msg.error("提交失败")})},fnSubmit(){if(Object.keys(this.change).length===0&&this.init.noChangeTip!==!1)return this.$msg.info("表单数据没有变化");this.$refs.form?.validate((t,n)=>{if(t){const r=this.beforeSubmit(this.init.noChangeTip===!1?this.editData:this.change,this.doSubmit);typeof r=="object"?this.doSubmit(r):r!==!1&&this.doSubmit(this.init.noChangeTip===!1?this.editData:!1)}else if(n){const r=Object.keys(n)[0];r&&n[r][0]&&$msg.error(n[r][0].message)}})}}},sC={key:0},aC=["innerHTML"];function lC(t,n,r,o,i,a){const l=s.resolveComponent("el-tab-pane"),c=s.resolveComponent("el-tabs"),u=s.resolveComponent("img-info"),d=s.resolveComponent("input-item"),f=s.resolveComponent("el-form-item"),p=s.resolveComponent("el-button"),h=s.resolveComponent("el-form");return s.openBlock(),s.createElementBlock("div",{class:"admin-form",style:s.normalizeStyle({"margin-bottom":r.init.buttonFixed?"42px":0,...r.init.style||{}})},[r.init.tabs?(s.openBlock(),s.createBlock(s.Teleport,{key:0,defer:"",disabled:r.init.title!=="tabs",to:"#table-form-header"},[s.createVNode(c,{class:"admin-form-tabs",onTabClick:a.tabsChange,modelValue:i.tabsIndex,"onUpdate:modelValue":n[0]||(n[0]=m=>i.tabsIndex=m)},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.init.tabs,(m,g)=>(s.openBlock(),s.createBlock(l,{name:g+"",label:m},null,8,["name","label"]))),256))]),_:1},8,["onTabClick","modelValue"])],8,["disabled"])):s.createCommentVNode("",!0),s.createVNode(h,{class:s.normalizeClass(["flex flex-wrap",{"admin-form__disabled":i._disabled}]),disabled:i._disabled,style:s.normalizeStyle("width:"+i.width),"label-position":r.init.labelPosition??"right",ref:"form","label-width":r.init.labelWidth||120,model:i.editData,rules:i.rules,size:r.size},{default:s.withCtx(()=>[i.loading?s.createCommentVNode("",!0):(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(i.cols,(m,g)=>(s.openBlock(),s.createElementBlock("div",{key:m.field,style:s.normalizeStyle({width:m.colWidth??i.width??"100%"})},[m.type!=="hidden"?s.withDirectives((s.openBlock(),s.createBlock(f,{required:m.required,label:m.title===!1?"":m.title+":","label-width":m.labelWidth??(m.title===!1?"0px":void 0),prop:m.field,style:{width:"100%"},key:i.gloKey},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex w-full",r.init.infoAlign=="right"?"items-center":"flex-col"])},[s.createElementVNode("div",{class:s.normalizeClass(["input",m.class])},[m.type=="text"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[m.textType=="user"?(s.openBlock(),s.createElementBlock("div",sC,[s.createVNode(u,{init:{error:"用户不存在",imgName:"user_header",titleName:"user_name"},data:i.rawData[m.field]},null,8,["data"])])):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(m.class?"":"text-color-primary")},s.toDisplayString(i.rawData[m.field]??m.value),3))],64)):(s.openBlock(),s.createBlock(d,{key:1,size:r.size??m.size,ref_for:!0,ref:"inputItem",disabled:r.disabled,clearable:r.init.clearable,rawData:i.rawData,row:i.editData,index:g,cols:i.cols,style:s.normalizeStyle(m.width?"width:"+m.width:""),modelValue:i.editData[m.field],prop:{...m,...m.remove2},"onUpdate:modelValue":y=>a.onChange(y,m.field)},null,8,["size","disabled","clearable","rawData","row","index","cols","style","modelValue","prop","onUpdate:modelValue"]))],2),m.info?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["text-sm flex op-70 gap-1",r.init.infoAlign=="right"?"pl-xs items-start":"pt-xs items-center"])},[n[1]||(n[1]=s.createElementVNode("i",{class:"i-ri-error-warning-line"},null,-1)),s.createElementVNode("div",{innerHTML:m.info},null,8,aC)],2)):s.createCommentVNode("",!0)],2)]),_:2},1032,["required","label","label-width","prop"])),[[s.vShow,!i.colsHide[m.field]&&(!r.init.tabs||!m.tab&&i.tabsIndex==0||m.tab==i.tabsIndex||typeof m.tab=="object"&&m.tab?.map(y=>y+"")?.indexOf?.(i.tabsIndex)>-1)]]):s.createCommentVNode("",!0)],4))),128)),r.showButton?(s.openBlock(),s.createBlock(f,{key:1,class:s.normalizeClass(["info-hide",{"form-btn":r.init.buttonFixed}])},{default:s.withCtx(()=>[i.loading?(s.openBlock(),s.createBlock(p,{key:0,loading:i.loading,type:"primary"},{default:s.withCtx(()=>[...n[2]||(n[2]=[s.createTextVNode("loading",-1)])]),_:1},8,["loading"])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[i.confirmButton?(s.openBlock(),s.createBlock(p,{key:0,disabled:i.confirmButton.disabled,type:"primary",onClick:a.fnSubmit},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.confirmButton.text),1)]),_:1},8,["disabled","onClick"])):s.createCommentVNode("",!0),r.init.resetButton?(s.openBlock(),s.createBlock(p,{key:1,onClick:a.resetForm},{default:s.withCtx(()=>[...n[3]||(n[3]=[s.createTextVNode("重置",-1)])]),_:1},8,["onClick"])):s.createCommentVNode("",!0),r.init.btns?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:2},s.renderList(r.init.btns,m=>(s.openBlock(),s.createBlock(p,{loading:i.loading,type:m.type?m.type:"primary",onClick:g=>a.btnAction(m)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(m.title),1)]),_:2},1032,["loading","type","onClick"]))),256)):s.createCommentVNode("",!0)],64))]),_:1},8,["class"])):s.createCommentVNode("",!0)]),_:1},8,["disabled","class","style","label-position","label-width","model","rules","size"])],4)}const cC=ne(iC,[["render",lC]]),uC={name:"data-api",props:{init:{type:Object}},data(){return{data:!1,empty:!1,loading:!1}},created(){this.getData()},methods:{onChange(t=null){this.getData(t)},async getData(t=null){this.loading=!0;const n=this.init;let r={};t?r=t:r=n.where;const o=await this.$req.post(n.url,r,n.cache||0);console.log(o),this.loading=!1,o.code==0?(this.data=o.data,n.back&&n.back(o)):n.empty!==!1&&(this.empty=n.empty||o?.msg||"加载失败")}}},dC={key:1},fC={key:2},pC={class:"op-70"};function hC(t,n,r,o,i,a){const l=s.resolveComponent("el-skeleton");return i.data?s.renderSlot(t.$slots,"default",{key:0,data:i.data}):i.loading?(s.openBlock(),s.createElementBlock("div",dC,[s.renderSlot(t.$slots,"loading",{},()=>[s.createVNode(l,{rows:2,animated:""})])])):i.empty?(s.openBlock(),s.createElementBlock("div",fC,[s.renderSlot(t.$slots,"error",{},()=>[s.createElementVNode("div",{class:"text-center flex col-center justify-center w-full",onClick:n[0]||(n[0]=c=>a.getData())},[s.createElementVNode("span",pC,s.toDisplayString(i.empty),1),n[1]||(n[1]=s.createTextVNode()),n[2]||(n[2]=s.createElementVNode("span",{class:"pl color-primary click"},"重试",-1))])])])):s.createCommentVNode("",!0)}const mC=ne(uC,[["render",hC]]),gC={props:{title:{type:String,default:"提示"},type:{type:String,default:"primary"}},data(){return{value:"",show:!1}},methods:{}},yC={class:"font-weight mb line-height"},bC={class:"text-color-primary"};function CC(t,n,r,o,i,a){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["a-tip","a-tip--"+r.type])},[s.createElementVNode("div",yC,[n[0]||(n[0]=s.createElementVNode("i",{class:"i-ri-information-line pr-xs"},null,-1)),s.createTextVNode(s.toDisplayString(r.title),1)]),s.createElementVNode("div",bC,[s.renderSlot(t.$slots,"default",{},void 0,!0)])],2)}const vC=ne(gC,[["render",CC],["__scopeId","data-v-b6ef9e08"]]),DC={name:"text-edit",props:{clickType:{type:String,default:"click"},defaultValue:String,hideIcon:Boolean,height:String,text:""},emits:["save","status"],watch:{show(t){this.$emit("status",t)}},data(){return{value:"",show:!1}},methods:{click(t){t.preventDefault(),this.show||(this.value=this.text,this.show=!0)},editSave(){if(this.text==this.value){this.show=!1;return}$confirm("确认要提交本次修改吗?","提示").then(t=>{this.show=!1,this.$emit("save",{value:this.value,oldValue:this.text})}).catch(t=>{this.show=!1})}}},wC={key:0},xC={key:1,class:"text flex"},BC={class:"line-2"},kC={key:0,class:"i-ri-quill-pen-line ml-xs"};function EC(t,n,r,o,i,a){const l=s.resolveDirective("focus");return s.openBlock(),s.createElementBlock("div",s.mergeProps({class:"text-edit"},{[s.toHandlerKey(r.clickType)]:n[2]||(n[2]=s.withModifiers((...c)=>a.click&&a.click(...c),["stop"]))}),[i.show?(s.openBlock(),s.createElementBlock("div",wC,[s.withDirectives(s.createElementVNode("textarea",{style:s.normalizeStyle({height:r.height}),onBlur:n[0]||(n[0]=c=>a.editSave()),"onUpdate:modelValue":n[1]||(n[1]=c=>i.value=c)},null,36),[[l],[s.vModelText,i.value]])])):(s.openBlock(),s.createElementBlock("div",xC,[s.createElementVNode("div",BC,s.toDisplayString(r.text??r.defaultValue),1),!r.hideIcon||!r.text?(s.openBlock(),s.createElementBlock("i",kC)):s.createCommentVNode("",!0)]))],16)}const _C=ne(DC,[["render",EC],["__scopeId","data-v-26e8acc4"]]),AC={props:{url:String|Array|Object,modelValue:String|Number|Array,type:{type:String,default:"primary"},size:{type:String,default:"small"},showNum:{type:Number,default:2},keyName:{type:String,default:"id"},titleName:{type:String,default:"title"},format:Function,color:String},data(){return{text:[]}},created(){const{keyName:t,titleName:n,url:r,modelValue:o,format:i}=this;if(!o&&o!=0||!r)return;let a=[];if(typeof o=="string"||typeof o=="number"?a=i?(i(o)+"").split(","):(o+"").split(","):a=o,a.length===0)return;function l(c){let u=[],d={};if(!c)return[];if(c.constructor==Array)for(const f of c)d[f[t]]=f[n];else d=c;for(const f of a)d[f]&&u.push(d[f]);return u}if(typeof r=="object")return this.text=l(r);$req.post(r).then(c=>{this.text=l(c.data)})}},NC={key:0,class:"cate-text overflow-hidden"},SC={class:"cate-show"};function FC(t,n,r,o,i,a){const l=s.resolveComponent("el-tag"),c=s.resolveComponent("el-popover");return i.text.length>0?(s.openBlock(),s.createElementBlock("div",NC,[i.text.length>r.showNum?(s.openBlock(),s.createBlock(c,{key:0,placement:"left",width:220,trigger:"hover"},{reference:s.withCtx(()=>[s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.showNum,u=>(s.openBlock(),s.createBlock(l,{size:r.size,color:r.color,type:r.type},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.text[u-1]),1)]),_:2},1032,["size","color","type"]))),256)),s.createVNode(l,{size:r.size,color:r.color,type:r.type},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("...",-1)])]),_:1},8,["size","color","type"])])]),default:s.withCtx(()=>[s.createElementVNode("div",SC,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.text,u=>(s.openBlock(),s.createBlock(l,{size:r.size,type:r.type},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(u),1)]),_:2},1032,["size","type"]))),256))])]),_:1})):(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(i.text,u=>(s.openBlock(),s.createBlock(l,{size:r.size,color:r.color,type:r.type},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(u),1)]),_:2},1032,["size","color","type"]))),256))])):s.createCommentVNode("",!0)}const VC=ne(AC,[["render",FC],["__scopeId","data-v-3c69ee7f"]]),OC={props:{date:{type:[Object,String,Number],default(){return"-"}},locale:{type:String,default:"zh"},threshold:{type:Array,default(){return[0,0]}},format:{type:String,default:void 0}},data(){return{text:""}},created(){this.text=$a.time.friendlyDate(this.date,{locale:this.locale,threshold:this.threshold,format:this.format})}};function TC(t,n,r,o,i,a){return s.openBlock(),s.createElementBlock("span",null,s.toDisplayString(i.text),1)}const jC=ne(OC,[["render",TC]]),PC={name:"a-image",props:{fit:{type:String,default:"contain"},src:String,width:{type:[String,Number]},height:{type:[String,Number]},background:String,borderRadius:String,css:String,process:"",lazy:{type:Boolean,default:!0},index:{type:Number,default:0},preview:{type:[Array,Boolean],default:!1}},data(){return{previewSrcList:[]}},methods:{addUnit(t){return typeof t=="number"?t+"px":t}},mounted(){typeof this.preview=="string"?this.previewSrcList=[this.url]:typeof this.preview=="object"&&(this.previewSrcList=this.preview.map(t=>this.$fileUrl(t,this.process)))},computed:{url(){return this.$fileUrl(this.src,this.process)}}};function LC(t,n,r,o,i,a){const l=s.resolveComponent("el-image");return s.openBlock(),s.createBlock(l,s.mergeProps({class:"a-image",fit:r.fit,"initial-index":r.index,"preview-src-list":i.previewSrcList,style:[{width:a.addUnit(r.width),height:a.addUnit(r.height),borderRadius:r.borderRadius,background:r.background},r.css],src:a.url},t.$attrs),{error:s.withCtx(()=>[...n[0]||(n[0]=[s.createElementVNode("div",{class:"image-slot min-w-10 min-h-10 bg-main-100"},[s.createElementVNode("i",{class:"i-ri-landscape-line"})],-1)])]),_:1},16,["fit","initial-index","preview-src-list","style","src"])}const MC=ne(PC,[["render",LC],["__scopeId","data-v-7b602c3b"]]),zC={name:"a-region-text",props:{code:String|Number},data(){return{text:""}},created(){this.text=$a.codeArea(this.code)}};function $C(t,n,r,o,i,a){return s.openBlock(),s.createElementBlock("span",null,s.toDisplayString(i.text),1)}const IC=ne(zC,[["render",$C]]),RC={name:"a-text-status",props:{status:{type:String,default:"info"}},data(){return{color:!1}},created(){this.status&&this.status.indexOf("#")===0&&(this.color=this.status)}},HC={class:"text-status"},UC={class:"text"};function WC(t,n,r,o,i,a){return s.openBlock(),s.createElementBlock("span",HC,[s.createElementVNode("span",{class:s.normalizeClass(["dot",i.color?"":"dot-"+r.status]),style:s.normalizeStyle("background-color:"+i.color)},null,6),s.createElementVNode("span",UC,[s.renderSlot(t.$slots,"default",{},void 0,!0)])])}const qC=ne(RC,[["render",WC],["__scopeId","data-v-99c2ca99"]]);function KC(t){const n=Object.create(null);return function(o){return n[o]||(n[o]=t(o))}}const JC=/-(\w)/g,Tu=KC(t=>t.replace(JC,(n,r)=>r?r.toUpperCase():""));function us(t){t.parentElement!==null&&t.parentElement.removeChild(t)}function ju(t,n,r){const o=r===0?t.children[0]:t.children[r-1].nextSibling;t.insertBefore(n,o)}function GC(t,n){return Object.values(t).indexOf(n)}function YC(t,n,r,o){if(!t)return[];const i=Object.values(t),a=n.length-o;return[...n].map((c,u)=>u>=a?i.length:i.indexOf(c))}function Pu(t,n){this.$nextTick(()=>this.$emit(t.toLowerCase(),n))}function ZC(t){return n=>{this.realList!==null&&this["onDrag"+t](n),Pu.call(this,t,n)}}function XC(t){return["transition-group","TransitionGroup"].includes(t)}function QC(t){if(!t||t.length!==1)return!1;const[{type:n}]=t;return n?XC(n.name):!1}function e4(t,n){return n?{...n.props,...n.attrs}:t}const ds=["Start","Add","Remove","Update","End"],fs=["Choose","Unchoose","Sort","Filter","Clone"],t4=["Move",...ds,...fs].map(t=>"on"+t);let ps=null;const n4={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:t=>t},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},r4={name:"a-draggable",inheritAttrs:!1,emits:["update:modelValue","move","change",...ds.map(t=>t.toLowerCase()),...fs.map(t=>t.toLowerCase())],props:n4,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const t=this.$slots.default?this.$slots.default():null,n=e4(this.$attrs,this.componentData);return t?(this.transitionMode=QC(t),s.h(this.getTag(),n,t)):s.h(this.getTag(),n,[])},created(){this.list!==null&&this.modelValue!==null&&console.error("list props are mutually exclusive! Please set one.")},mounted(){const t={};ds.forEach(i=>{t["on"+i]=ZC.call(this,i)}),fs.forEach(i=>{t["on"+i]=Pu.bind(this,i)});const n=Object.keys(this.$attrs).reduce((i,a)=>(i[Tu(a)]=this.$attrs[a],i),{}),r=Object.assign({},n,t,{onMove:(i,a)=>this.onDragMove(i,a)});!("draggable"in r)&&(r.draggable=">*");const o=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new Sortable(o,r),o.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(t){this.updateOptions(t)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?s.resolveComponent(this.component):this.tag},updateOptions(t){for(var n in t){const r=Tu(n);t4.indexOf(r)===-1&&this._sortable.option(r,t[n])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=YC(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(t){const n=GC(this.getChildrenNodes()||[],t);if(n===-1)return null;const r=this.realList[n];return{index:n,element:r}},emitChanges(t){this.$nextTick(()=>{this.$emit("change",t)})},alterList(t){if(this.list){t(this.list);return}const n=[...this.modelValue];t(n),this.$emit("update:modelValue",n)},spliceList(){const t=n=>n.splice(...arguments);this.alterList(t)},updatePosition(t,n){const r=o=>o.splice(n,0,o.splice(t,1)[0]);this.alterList(r)},getVmIndex(t){const n=this.visibleIndexes,r=n.length;return t>r-1?r:n[t]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(t){if(!this.noTransitionOnDrag||!this.transitionMode)return;var n=this.getChildrenNodes();n[t].data=null;const r=this.getComponent();r.children=[],r.kept=void 0},onDragStart(t){this.context=this.getUnderlyingVm(t.item),this.context&&(t.item._underlying_vm_=this.clone(this.context.element),ps=t.item)},onDragAdd(t){const n=t.item._underlying_vm_;if(n===void 0)return;us(t.item);const r=this.getVmIndex(t.newIndex);this.spliceList(r,0,n),this.computeIndexes();const o={element:n,newIndex:r};this.emitChanges({added:o})},onDragRemove(t){if(ju(this.$el,t.item,t.oldIndex),t.pullMode==="clone"){us(t.clone);return}if(!this.context)return;const n=this.context.index;this.spliceList(n,1);const r={element:this.context.element,oldIndex:n};this.resetTransitionData(n),this.emitChanges({removed:r})},onDragUpdate(t){us(t.item),ju(t.from,t.item,t.oldIndex);const n=this.context.index,r=this.getVmIndex(t.newIndex);this.updatePosition(n,r);const o={element:this.context.element,oldIndex:n,newIndex:r};this.emitChanges({moved:o})},updateProperty(t,n){t.hasOwnProperty(n)&&(t[n]+=this.headerOffset)},onDragMove(t,n){const r=this.move;if(!r||!this.realList)return!0;const o=this.getRelatedContextFromMoveEvent(t),i=this.context,a=this.computeFutureIndex(o,t);Object.assign(i,{futureIndex:a});const l=Object.assign({},t,{relatedContext:o,draggedContext:i});return r(l,n)},onDragEnd(){this.computeIndexes(),ps=null},getTrargetedComponent(t){return t.__draggable_component__},getRelatedContextFromMoveEvent({to:t,related:n}){const r=this.getTrargetedComponent(t);if(!r)return{component:r};const o=r.realList,i={list:o,component:r};if(t!==n&&o&&r.getUnderlyingVm){const a=r.getUnderlyingVm(n);if(a)return Object.assign(a,i)}return i},computeFutureIndex(t,n){const r=[...n.to.children].filter(l=>l.style.display!=="none");if(r.length===0)return 0;const o=r.indexOf(n.related),i=t.component.getVmIndex(o);return r.indexOf(ps)!==-1||!n.willInsertAfter?i:i+1}}},o4=s.defineAsyncComponent(()=>Promise.resolve().then(()=>LD)),i4=s.defineAsyncComponent(()=>Promise.resolve().then(()=>bb)),hs={AdminTable:cp,AdminForm:cC,DataApi:mC,ASearch:Ms,AInputs:cs,InputButton:Vo,ASearchBox:Us,ATip:vC,ATextEdit:_C,ACateText:VC,ACascader:Au,ATags:Nu,ATime:jC,AImage:MC,AImageText:_u,AColorPicker:Su,ARegionPicker:Fu,ARegionText:IC,ARegionMap:ss,ATextStatus:qC,ADraggable:r4,AChart:o4,AEditor:i4};function s4(t){for(const n in hs)t.component(n,hs[n])}const a4={install:s4,components:hs},l4={methods:{$getParent(t="",n=this,r=0){if(r>=20||!t||!n)return null;const o=n.$parent;return o?o.$options.name===t?o:(r++,this.$getParent(t,o,r)):null},$get(t=null){return $go.query(this.$route.query,t)}}},c4=function(...t){return t.reduce((n,r)=>So(n,r),{})},u4={urlBox:{default:[{title:"推荐",list:[{title:"首页",url:"/"}]}]},apis:{},form:{btnText:"提交"},table:{shortcuts:{user:{type:"img-info",init:{error:"用户不存在",imgName:"user_header",titleName:"user_name"}}}},inputs:{shortcuts:{user:{type:"search-box",init:{icon:"ri-user-line",name:"用户",join:"user",url:"__apis.user_search",imgName:"user_header",titleName:"user_name",placeholder:"请选择用户",placeholder2:"输入用户昵称或用户ID或手机号"}}}}};function d4(t){const n=yo.flattenObject(t);for(const r in n)if(typeof n[r]=="string"&&n[r].indexOf("__")===0){const o=n[r].replace("__","");dn(t,r,Yt(t,o))}}const f4=t=>{const n=c4(u4,t);return d4(n),n},p4=t=>{if(typeof document<"u")return window.getComputedStyle(document.getElementById("app")).getPropertyValue(t)},h4=(t="")=>{const n={};return n.primary=p4("--el-color-primary"),t?n[t]:n},co="_exptime",At="admin_",Qn={list:function(){const t=localStorage.length;let n=new Array;for(let r=0;r<t;r++){let o=localStorage.key(r);n[r]=o}return n},set:function(t,n,r=0){if(r){let o=Date.now();o=o/1e3+Number(r),localStorage.setItem(At+t+co,o+"")}localStorage.setItem(At+t,JSON.stringify(n))},remove:function(t){localStorage.removeItem(At+t),localStorage.removeItem(At+t+co)},clear:function(){localStorage.clear()},get:function(t,n=!1){let r=parseInt(localStorage.getItem(At+t+co));if(!localStorage.getItem(At+t))return!1;if(r&&r<Date.now()/1e3&&!n){localStorage.removeItem(At+t),localStorage.removeItem(At+t+co);return}else if(n&&r)return{data:JSON.parse(localStorage.getItem(At+t)),time:r};try{return JSON.parse(localStorage.getItem(At+t))}catch{return localStorage.getItem(At+t)}}},lt=t=>we.ElMessage(t);lt.info=t=>we.ElMessage(t),lt.success=t=>we.ElMessage({message:t,type:"success"}),lt.error=t=>we.ElMessage({message:t,type:"error"}),lt.warning=t=>we.ElMessage({message:t,type:"warning"}),lt.info=t=>we.ElMessage(t),lt.warning=t=>we.ElMessage({message:t,type:"warning"}),lt.confirm=(t,n="提示",r={})=>{let o={confirmButtonText:"确认",cancelButtonText:"取消",type:"warning",...r};return we.ElMessageBox.confirm(t,n,o)},lt.prompt=(t,n="提示",r={})=>{let o={confirmButtonText:"确认",cancelButtonText:"取消",...r};return we.ElMessageBox.prompt(t,n,o)},lt.loading=(t="加载中")=>(t===!0&&(t="加载中"),we.ElLoading.service({lock:!0,text:t,background:"rgba(0, 0, 0, 0.7)"}));function m4(t,n){if(!t)return{};let r={};return t?.jsonQuery?r=JSON.parse(t.jsonQuery):r=t,n?r[n]||null:r}class g4{data=null;router=null;query=m4;constructor(n){this.router=n}to(n,r=null){this.data=r;let o="";return n?.indexOf("http")===0?window.open(n):(r&&(o="?jsonQuery="+JSON.stringify(r)),n?.indexOf("/")!==0&&(n="/"+n),this.router.push(n+o))}}const ms="undefined",y4=Promise,b4=t=>y4.reject(t),gs=Object,Lu=void 0,C4=null,Mu=!0,ys=!1,v4=(t,n,r)=>JSON.stringify(t,n,r),D4=(t,n=0)=>setTimeout(t,n),zu=t=>clearTimeout(t),w4=(t,n)=>delete t[n],x4=t=>typeof t,B4=(t,n)=>t.includes(n);typeof window===ms&&(typeof process!==ms&&process.browser);const k4=t=>x4(t)==="string",E4=t=>gs.prototype.toString.call(t),_4=(t,n)=>t instanceof n,A4=t=>{const n=E4(t);return/^\[object (Blob|FormData|ReadableStream|URLSearchParams)\]$/i.test(n)||_4(t,ArrayBuffer)},N4=(t,...n)=>new t(...n),S4=t=>k4(t)||A4(t);function F4(t={}){return(n,r)=>{const o=r.config,i=o.timeout||0,a=new AbortController,{data:l,headers:c}=n,u=/content-type/i.test(gs.keys(c).join()),d=l&&l.toString()==="[object FormData]";!u&&!d&&(c["Content-Type"]="application/json; charset=UTF-8");const f=["",Lu,C4,ys];gs.keys(c).forEach(g=>{B4(f,c[g])&&w4(c,g)});const p=(t.customFetch||fetch)(n.url,{...o,method:n.type,signal:a.signal,body:S4(l)?l:v4(l)});let h,m=ys;return i>0&&(h=D4(()=>{m=Mu,a.abort()},i)),{response:()=>p.then(g=>(zu(h),g.clone()),g=>b4(m?N4(Error,"fetchError: network timeout"):g)),headers:()=>p.then(({headers:g})=>g,()=>({})),onDownload:async g=>{let y=ys;const v=await p.catch(()=>{y=Mu});if(!v)return;const{headers:D,body:w}=v.clone(),b=w?w.getReader():Lu,x=Number(D.get("Content-Length")||D.get("content-length")||0);if(x<=0)return;let k=0;if(b){const E=()=>b.read().then(({done:B,value:V=new Uint8Array})=>{if(B||y)y&&g(k,0);else return k+=V.byteLength,g(k,x),E()});E()}},onUpload(){console.error("fetch API does'nt support uploading progress. please consider to change `@alova/adapter-xhr` or `@alova/adapter-axios`")},abort:()=>{a.abort(),zu(h)}}}}let er="",uo,bs;function V4(t){t.responded||(t.responded={}),bs=t,er=t.baseURLPre||"",uo=bo.createAlova({requestAdapter:F4(),timeout:5e4,baseURL:t.baseURL,responded:{onSuccess:t.responded.onSuccess,onError:t.responded.onError,onComplete:async n=>{Cs&&Cs.close()}}})}let Cs=!1;function $u(t,n,r={}){const o=bs?.headers?.()||{},i=bs?.post?.auth();if(!i)return Promise.resolve(typeof i=="object"?i:{code:1001,msg:"请先登录"});const{loading:a=null,cache:l=0,headers:c={}}=r;if(Qn.get("REQ_"+t))return Promise.resolve({...Qn.get("REQ_"+t),cache:!0});a&&(Cs=lt.loading(a)),n&&(n=$a.object.removeEmptyValues(n,{removeEmptyStrings:!1,removeEmptyObjects:!1,removeEmptyArrays:!1}));const u={name:null,hitSource:null,cacheFor:null,headers:{...o,...c}};l&&typeof l=="number"&&(u.hitSource=RegExp(`^${t}/do`),u.cacheFor={mode:"restore",expire:60*1e3}),u.name=t;const d=uo.Post(t,n,u);return t.startsWith("http")&&(d.baseURL=""),d}const Iu=function(t,n=void 0){const r=uo.Get(t,n);return r.baseURL="",r};class O4{baseURL;constructor(n){er=n?.apiUrlPre||"",this.baseURL=n.baseURL,V4(n)}noLogin(n,r=void 0){return $u(er+n,r)}post(n,r=void 0,o=void 0,i=void 0){let a={};return o&&typeof o=="object"?a=o:(typeof r=="number"?(i=r,r=void 0):typeof r=="string"?(o=r,r=void 0):typeof o=="number"&&(i=o),a={loading:o,cache:i}),n.startsWith("http")?n=n:n=er+n,$u(n,r,a)}upload(n,r,o={}){let i=!1;return n.startsWith("http")?i=!0:n=this.baseURL+er+n,!i&&!Qn.get("admin_jwt")?Promise.resolve({code:1001,msg:"请先登录"}):new Promise((a,l)=>{const c=new XMLHttpRequest,{onProgress:u,onLoadStart:d,onLoadEnd:f,onError:p,onAbort:h,action:m="PUT",headers:g={}}=o;c.upload&&u&&c.upload.addEventListener("progress",y=>{y.lengthComputable&&u(y,r)}),c.addEventListener("loadstart",()=>d?.()),c.addEventListener("loadend",()=>f?.()),c.addEventListener("error",()=>{p?.(c.statusText),l(new Error(`上传失败: ${c.statusText}`))}),c.addEventListener("abort",()=>{h?.(),l(new Error("上传已取消"))}),c.addEventListener("load",()=>{c.status>=200&&c.status<300?a({data:c.response,status:c.status,statusText:c.statusText}):l(new Error(`HTTP ${c.status}: ${c.statusText}`))}),c.open(m,n,!0),i||c.setRequestHeader("jwt",Qn.get("admin_jwt")),m==="POST"?c.setRequestHeader("Content-Type","application/json"):c.setRequestHeader("Content-Type",r.type||"application/octet-stream"),c.send(r)})}query=Iu;get=Iu;instance=()=>uo;setCache=bo.setCache;create=bo.createAlova}const T4=function(t,n="复制成功"){if(!t){lt.error("无复制内容");return}const r=document.createElement("textarea");r.readOnly=!0,r.style.position="absolute",r.style.left="-9999px",r.value=t,document.body.appendChild(r),r.select(),r.setSelectionRange(0,r.value.length),document.execCommand("Copy")&<.success(n),document.body.removeChild(r)};function Gt(t,n=2){for(t+="";t.length<n;)t="0"+t;return t.slice(-n)}const j4={yyyy:t=>Gt(t.year,4),yy:t=>Gt(t.year),MM:t=>Gt(t.month),M:t=>t.month,dd:t=>Gt(t.day),d:t=>t.day,hh:t=>Gt(t.hour),h:t=>t.hour,mm:t=>Gt(t.minute),m:t=>t.minute,ss:t=>Gt(t.second),s:t=>t.second,SSS:t=>Gt(t.millisecond,3),S:t=>t.millisecond};function Ru(t){return/^\d+$/.test(t)&&(t+"").length==10&&(t=t*1e3),t instanceof Date?t:typeof t==="string"?t.indexOf("T")>-1?new Date(t):new Date(t.replace(/-/g,"/")):new Date(t)}function Hu(t,n="yyyy-MM-dd hh:mm:ss"){if(!t&&t!==0||(t=Ru(t),!t.getTime()))return"-";const r={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()},o=/yyyy|yy|MM|M|dd|d|hh|h|mm|m|ss|s|SSS|SS|S/;let i=!0,a=n;for(;i;)i=!1,a=a.replace(o,function(l){return i=!0,j4[l](r)});return a}function P4(t,{locale:n="zh",threshold:r=[6e4,36e5],format:o="yyyy-MM-dd hh:mm:ss"}){if(t==="-")return t;if(!t&&t!==0)return"";const i={zh:{year:"年",month:"月",day:"天",hour:"小时",minute:"分钟",second:"秒",ago:"前",later:"后",justNow:t.length==10?"今天":"刚刚",soon:"马上",template:"{num}{unit}{suffix}"},en:{year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",ago:"ago",later:"later",justNow:"just now",soon:"soon",template:"{num} {unit} {suffix}"}},a=i[n]||i.zh;let l=Ru(t),c=(l.getTime()||0)-Date.now(),u=Math.abs(c);if(u<r[0])return c<0?a.justNow:a.soon;if(u>=r[1])return Hu(l,o);let d,f,p=a.later;c<0&&(p=a.ago,c=-c);const h=Math.floor(c/1e3),m=Math.floor(h/60),g=Math.floor(m/60),y=Math.floor(g/24),v=Math.floor(y/30),D=Math.floor(v/12);switch(!0){case D>0:d=D,f=a.year;break;case v>0:d=v,f=a.month;break;case y>0:d=y,f=a.day;break;case g>0:d=g,f=a.hour;break;case m>0:d=m,f=a.minute;break;default:d=h,f=a.second;break}return n==="en"&&(d===1?d="a":f+="s"),a.template.replace(/{\s*num\s*}/g,d+"").replace(/{\s*unit\s*}/g,f).replace(/{\s*suffix\s*}/g,p)}const L4=(t,n="/")=>{const r=String(t),o=Number(r.slice(0,2));let i=Number(r.slice(0,4));const a=Number(t);r.length>6&&(i=Number(r.slice(0,6)));let l=[];return dmxRegions.forEach(c=>{c.c===o&&(l[0]=c.n,c.s?.length>0&&i>=1e3&&c.s.forEach(u=>{u.c===i&&(l[1]=u.n,u.s?.length>0&&a>=1e5&&u.s.forEach(d=>{d.c===a&&(l[2]=d.n)}))}))}),n===!0?l:l.join(n)};function M4(t,n,r,o="array"){if(t){(!r||typeof r!="string")&&(r="data.csv");let i;o=="array"?i=z4(t,n):i=$4(t,n);let a=URL.createObjectURL(i),l=document.createElement("a");l.href=a,l.download=r,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(a)}}function z4(t,n){let o=",",i=`\r
|
|
38
|
-
`,a=t.reduce((c,u)=>(c?c+o:"")+(u.title||u.column),"");if(Array.isArray(n)&&n.length>0){let c=t.map(u=>u.column);a=n.reduce((u,d)=>{let f=c.reduce((p,h)=>{if(d.hasOwnProperty(h)){let m=d[h];if(m!=null){let g=t.find(y=>y.column==h);if(g.formatter!=null&&typeof g.formatter=="function"&&(m=g.formatter(m)),m!=null)return m=m.toString().replace(new RegExp(i,"g")," "),m=new RegExp(o).test(m)?`"${m}"`:m,m=m+" ",p?p+o+m:p+m}return p?p+o:p+" "}else return p?p+o:p+" "},"");return u+i+f},a)}return new Blob(["\uFEFF"+a],{type:"text/csv;charset=utf-8;"})}function
|
|
36
|
+
`));return i.prepend(u),i[0]},t})(),S1=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("color.bgColor"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M510.030769 315.076923l84.676923 196.923077h-177.230769l76.8-196.923077h15.753846zM945.230769 157.538462v708.923076c0 43.323077-35.446154 78.769231-78.769231 78.769231H157.538462c-43.323077 0-78.769231-35.446154-78.769231-78.769231V157.538462c0-43.323077 35.446154-78.769231 78.769231-78.769231h708.923076c43.323077 0 78.769231 35.446154 78.769231 78.769231z m-108.307692 643.938461L600.615385 216.615385c-5.907692-11.815385-15.753846-19.692308-29.538462-19.692308h-139.815385c-11.815385 0-23.630769 7.876923-27.56923 19.692308l-216.615385 584.861538c-3.938462 11.815385 3.938462 25.6 17.723077 25.6h80.738462c11.815385 0 23.630769-9.846154 27.56923-21.661538l63.015385-175.261539h263.876923l68.923077 175.261539c3.938462 11.815385 15.753846 21.661538 27.569231 21.661538h80.738461c13.784615 0 23.630769-13.784615 19.692308-25.6z"></path></svg>',r.mark="bgColor",r}return De(n,t),n})(Xc),F1=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("color.color"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 864h896v96H64zM360.58 576h302.85l81.53 224h102.16L579.24 64H444.77L176.89 800h102.16l81.53-224zM512 159.96L628.49 480H395.52L512 159.96z"></path></svg>',r.mark="color",r}return De(n,t),n})(Xc),Qc=["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"],V1={selector:"font",preParseHtml:function(t){var n=F(t);if(io(n)!=="font")return t;var r=n.attr("color")||"";return r&&(n.removeAttr("color"),n.css("color",r)),n[0]}};function on(t,n){t.data==null&&(t.data={});var r=t.data;r.style==null&&(r.style={}),Object.assign(r.style,n)}var O1={renderStyle:function(t,n){var r=t,o=r.color,i=r.bgColor,a=n;return o&&on(a,{color:o}),i&&on(a,{backgroundColor:i}),a},styleToHtml:function(t,n){if(!q.isText(t))return n;var r,o=t,i=o.color,a=o.bgColor;return i||a?((Yi(n)||io(r=F(n))!=="span")&&(r=F("<span>".concat(n,"</span>"))),i&&r.css("color",i),a&&r.css("background-color",a),_n(r)):n},preParseHtml:[V1],parseStyleHtml:function(t,n,r){var o=F(t);if(!q.isText(n))return n;var i=n,a=It(o,"color");a&&(i.color=a);var l=It(o,"background-color");return l||(l=It(o,"background")),l&&(i.bgColor=l),i},menus:[{key:"color",factory:function(){return new F1},config:{colors:Qc}},{key:"bgColor",factory:function(){return new S1},config:{colors:Qc}}]},T1=(function(){function t(){this.title=se("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){var r=n.selection;return r==null||!!j.isExpanded(r)},t.prototype.exec=function(n,r){var o=n.selection;if(o!=null){var i=[o.anchor.path[0]];O.insertNodes(n,{type:"paragraph",children:[{text:""}]},{at:i}),n.select(C.start(n,i))}},t})(),j1={menus:[{key:"enter",factory:function(){return new T1}}]},P1={type:"divider",elemToHtml:function(t,n){return"<hr/>"}},L1=(function(){function t(){this.title=se("divider.title"),this.iconSvg='<svg viewBox="0 0 1092 1024"><path d="M0 51.2m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M819.2 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M409.6 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 870.4m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return n.selection==null||!!S.getSelectedElems(n).some((function(r){if(n.isVoid(r))return!0;var o=S.getNodeType(r);return o==="table"||o==="pre"}))},t.prototype.exec=function(n,r){S.isSelectedEmptyParagraph(n)&&O.removeNodes(n,{mode:"highest"}),O.insertNodes(n,{type:"divider",children:[{text:""}]},{mode:"highest"})},t})(),M1={renderElems:[{type:"divider",renderElem:function(t,n,r){return ht("div",{props:{contentEditable:!1,className:"w-e-textarea-divider"},dataset:{selected:S.isNodeSelected(r,t)?"true":""},style:{},on:{mousedown:function(o){return o.preventDefault()}}},[ht("hr")])}}],elemsToHtml:[P1],parseElemsHtml:[{selector:"hr:not([data-w-e-type])",parseElemHtml:function(t,n,r){return{type:"divider",children:[{text:""}]}}}],menus:[{key:"divider",factory:function(){return new L1}}],editorPlugin:function(t){var n=t.isVoid,r=t.normalizeNode,o=t;return o.isVoid=function(i){return i.type==="divider"||n(i)},o.normalizeNode=function(i){var a=$(i,2),l=a[0],c=a[1];if(S.getNodeType(l)!=="divider")return r([l,c]);S.isLastNode(o,l)&&O.insertNodes(o,S.genEmptyParagraph(),{at:[c[0]+1]})},o}},z1=(function(){function t(){this.title=se("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return t.prototype.exec=function(n,r){},t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){if(n.selection==null)return!0;var r=$(C.nodes(n,{match:function(o){return S.getNodeType(o)==="pre"||!!C.isVoid(n,o)},universal:!0}),1);return!!r[0]},t.prototype.getPanelContentElem=function(n){if(this.$content==null){var r=F('<ul class="w-e-panel-content-emotion"></ul>');r.on("click","li",(function(a){var l=a.target;if(l!=null){a.preventDefault();var c=F(l).text();n.insertText(c)}})),this.$content=r}var o=this.$content;if(o==null)return document.createElement("ul");o.empty();var i=n.getMenuConfig("emotion").emotions;return(i===void 0?[]:i).forEach((function(a){var l=F("<li>".concat(a,"</li>"));o.append(l)})),o[0]},t})(),$1={menus:[{key:"emotion",factory:function(){return new z1},config:{emotions:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏".split(" ")}}]},eu=(function(){function t(){this.tag="select",this.width=80}return t.prototype.isActive=function(n){return!1},t.prototype.getValue=function(n){var r=this.mark,o=C.marks(n);return o&&o[r]?o[r]:""},t.prototype.isDisabled=function(n){if(n.selection==null)return!0;var r=$(C.nodes(n,{match:function(o){return S.getNodeType(o)==="pre"||!!C.isVoid(n,o)},universal:!0}),1);return!!r[0]},t.prototype.exec=function(n,r){var o=this.mark;r?n.addMark(o,r):n.removeMark(o)},t})(),I1=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("fontFamily.title"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M956.788364 152.110545h-24.110546l23.924364 9.029819 0.186182 121.018181h-65.070546l-86.574545-130.048H566.551273v650.14691l130.048 64.977454v65.163636h-390.050909v-65.163636l129.954909-64.977454V152.110545H198.283636L111.429818 282.065455H46.545455V69.259636C46.545455 33.792 82.664727 22.062545 98.955636 22.062545h812.683637c23.738182 0 45.056 15.173818 45.056 41.053091V169.425455v-17.221819z"></path></svg>',r.mark="fontFamily",r.selectPanelWidth=150,r}return De(n,t),n.prototype.getOptions=function(r){var o=[],i=r.getMenuConfig(this.mark).fontFamilyList,a=i===void 0?[]:i;o.push({text:se("fontFamily.default"),value:""}),a.forEach((function(u){if(typeof u=="string")o.push({text:u,value:u,styleForRenderMenuList:{"font-family":u}});else if(typeof u=="object"){var d=u.name,f=u.value;o.push({text:d,value:f,styleForRenderMenuList:{"font-family":f}})}}));var l=this.getValue(r),c=!1;return o.forEach((function(u){u.value===l?(c=!0,u.selected=!0):u.selected=void 0})),c||typeof l!="string"||o.push({text:l,value:l,selected:!0}),o},n})(eu),R1=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("fontSize.title"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 512h384v128h-128V1024h-128V640h-128z m896-256H708.2496v768h-136.4992V256H320V128h640z"></path></svg>',r.mark="fontSize",r}return De(n,t),n.prototype.getOptions=function(r){var o=[],i=r.getMenuConfig(this.mark).fontSizeList,a=i===void 0?[]:i;o.push({text:se("fontSize.default"),value:""}),a.forEach((function(u){if(typeof u=="string")o.push({text:u,value:u});else if(typeof u=="object"){var d=u.name,f=u.value;o.push({text:d,value:f})}}));var l=this.getValue(r),c=!1;return o.forEach((function(u){u.value===l?(c=!0,u.selected=!0):u.selected=void 0})),c||typeof l!="string"||o.push({text:l,value:l,selected:!0}),o},n})(eu),H1={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"},U1={renderStyle:function(t,n){var r=t,o=r.fontSize,i=r.fontFamily,a=n;return o&&on(a,{fontSize:o}),i&&on(a,{fontFamily:i}),a},styleToHtml:function(t,n){if(!q.isText(t))return n;var r,o=t,i=o.fontSize,a=o.fontFamily;return i||a?((Yi(n)||io(r=F(n))!=="span")&&(r=F("<span>".concat(n,"</span>"))),i&&r.css("font-size",i),a&&r.css("font-family",a),_n(r)):n},preParseHtml:[{selector:"font",preParseHtml:function(t){var n=F(t);if(io(n)!=="font")return t;var r=n.attr("size")||"";r&&(n.removeAttr("size"),n.css("font-size",H1[r]));var o=n.attr("face")||"";return o&&(n.removeAttr("face"),n.css("font-family",o)),n[0]}}],parseStyleHtml:function(t,n,r){var o=F(t);if(!q.isText(n))return n;var i=n,a=It(o,"font-size");a&&(i.fontSize=a);var l=It(o,"font-family").replace(/"/g,"");return l&&(i.fontFamily=l),i},menus:[{key:"fontSize",factory:function(){return new R1},config:{fontSizeList:["12px",{name:"13px",value:"13px"},"14px","15px","16px","19px",{name:"22px",value:"22px"},"24px","29px","32px","40px","48px"]}},{key:"fontFamily",factory:function(){return new I1},config:{fontFamilyList:["黑体",{name:"仿宋",value:"仿宋"},"楷体","标楷体","华文仿宋","华文楷体",{name:"宋体",value:"宋体"},"微软雅黑","Arial","Tahoma","Verdana","Times New Roman","Courier New"]}}]},Zi=(function(){function t(){this.title=se("formatPainter.title"),this.iconSvg='<svg viewBox="0 0 24 24"><path d="M8 19.997v-5h2v5h9v-7H5v7zm-4-9h16v-3h-6v-4h-4v4H4zm-1 10v-8H2v-6a1 1 0 0 1 1-1h5v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v3h5a1 1 0 0 1 1 1v6h-1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1"/></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return t.attrs.isSelect},t.prototype.isDisabled=function(n){return!1},t.prototype.setFormatHtml=function(n){var r,o;if(n.getSelectionText().length){if(t.attrs.formatStyle){(function(d){var f=C.marks(d);f&&Object.keys(f).forEach((function(p){d.removeMark(p)}))})(n);try{for(var i=at(Object.entries(t.attrs.formatStyle)),a=i.next();!a.done;a=i.next()){var l=$(a.value,2),c=l[0],u=l[1];n.addMark(c,u)}}catch(d){r={error:d}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}}t.attrs.formatStyle=null,t.attrs.isSelect=!1}},t.prototype.exec=function(n){t.attrs.isSelect?(t.attrs.isSelect=!1,t.attrs.formatStyle=null):n.getSelectionText().length&&(t.attrs.formatStyle=C.marks(n),t.attrs.isSelect=!0),n.blur(),n.focus()},t.attrs={isSelect:!1,formatStyle:null},t})(),W1={menus:[{key:"formatPainter",factory:function(){return new Zi}}],editorPlugin:function(t){var n=new Zi,r=t.onChange,o=t,i=function(){n.setFormatHtml(o),document.removeEventListener("mouseup",i)};return o.onChange=function(){r(),Zi.attrs.isSelect&&(document.removeEventListener("mouseup",i),document.addEventListener("mouseup",i))},o}},q1=(function(){function t(){this.title=se("fullScreen.title"),this.iconSvg=Zc,this.tag="button",this.alwaysEnable=!0}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return n.isFullScreen},t.prototype.isDisabled=function(n){return!1},t.prototype.getIcon=function(n){return n.isFullScreen?Zc:'<svg t="1723361745825" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8705" width="200" height="200"><path d="M703.926857 362.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V128a42.642286 42.642286 0 1 1 85.357715 0v149.357714h149.357714c21.211429 0 38.765714 15.433143 42.057143 35.693715l0.585143 6.948571a42.642286 42.642286 0 0 1-42.642286 42.642286H703.926857zM703.926857 938.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V704c0-23.552 19.090286-42.642286 42.642286-42.642286h192.073143a42.642286 42.642286 0 1 1 0 85.284572l-149.357714 0.073143v149.284571c0 21.211429-15.506286 38.765714-35.84 42.130286l-6.875429 0.512zM319.853714 938.642286a42.642286 42.642286 0 0 1-42.642285-42.642286v-149.284571H127.853714a42.642286 42.642286 0 0 1-42.130285-35.84l-0.585143-6.875429c0-23.552 19.163429-42.642286 42.715428-42.642286h192c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286zM127.853714 362.642286a42.642286 42.642286 0 1 1 0-85.284572H277.211429V128c0-21.211429 15.433143-38.765714 35.766857-42.130286l6.875428-0.512c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286H127.853714z" fill="#333333" p-id="8706"></path></svg>'},t.prototype.getTitle=function(n){return n.isFullScreen?se("fullScreen.title"):se("fullScreen.cancelTitle")},t.prototype.exec=function(n,r){n.isFullScreen?n.unFullScreen():n.fullScreen()},t})(),K1={menus:[{key:"fullScreen",factory:function(){return new q1}}]};function An(t){return function(n,r){return"<h".concat(t,">").concat(r,"</h").concat(t,">")}}var J1={type:"header1",elemToHtml:An(1)},G1={type:"header2",elemToHtml:An(2)},Y1={type:"header3",elemToHtml:An(3)},Z1={type:"header4",elemToHtml:An(4)},X1={type:"header5",elemToHtml:An(5)},Q1={type:"header6",elemToHtml:An(6)};function tu(t){var n=$(C.nodes(t,{match:function(i){return S.getNodeType(i).startsWith("header")},universal:!0}),1),r=n[0];if(r==null)return"paragraph";var o=$(r,1)[0];return S.getNodeType(o)}function nu(t){if(t.selection==null)return!0;var n=$(C.nodes(t,{match:function(r){var o=S.getNodeType(r);return o==="paragraph"||!!o.startsWith("header")},universal:!0,mode:"highest"}),1);return!n[0]}function ru(t,n){n&&O.setNodes(t,{type:n})}var Nn=(function(){function t(){this.tag="button"}return t.prototype.getValue=function(n){return tu(n)},t.prototype.isActive=function(n){return this.getValue(n)===this.type},t.prototype.isDisabled=function(n){return nu(n)},t.prototype.exec=function(n,r){var o=this.type;ru(n,r===o?"paragraph":o)},t})(),ey=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title="H1",r.type="header1",r}return De(n,t),n})(Nn),ty=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title="H2",r.type="header2",r}return De(n,t),n})(Nn),ny=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title="H3",r.type="header3",r}return De(n,t),n})(Nn),ry=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title="H4",r.type="header4",r}return De(n,t),n})(Nn),oy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title="H5",r.type="header5",r}return De(n,t),n})(Nn),iy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title="H6",r.type="header6",r}return De(n,t),n})(Nn),sy=(function(){function t(){this.title=se("header.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M960 960c-51.2 0-102.4-3.2-153.6-3.2-51.2 0-99.2 3.2-150.4 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 57.6-28.8 86.4-48 19.2-12.8 19.2-60.8 19.2-80v-224-19.2c-9.6-3.2-19.2-3.2-28.8-3.2H320c-9.6 0-19.2 0-28.8 3.2V780.8c0 22.4 0 80 22.4 92.8 28.8 19.2 96-6.4 96 44.8 0 16-9.6 41.6-28.8 41.6-54.4 0-105.6-3.2-160-3.2-48 0-96 3.2-147.2 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 51.2-28.8 80-48 19.2-12.8 19.2-60.8 19.2-83.2V294.4c0-28.8 3.2-115.2-22.4-131.2-25.6-16-86.4 9.6-86.4-41.6 0-16 6.4-41.6 28.8-41.6 51.2 0 105.6 3.2 156.8 3.2 48 0 96-3.2 144-3.2 19.2 0 28.8 22.4 28.8 41.6 0 48-57.6 25.6-83.2 41.6-19.2 12.8-19.2 73.6-19.2 92.8v201.6c6.4 3.2 16 3.2 22.4 3.2h400c6.4 0 12.8 0 22.4-3.2V256c0-22.4 0-80-19.2-92.8-28.8-16-86.4 6.4-86.4-41.6 0-16 9.6-41.6 28.8-41.6 51.2 0 99.2 3.2 150.4 3.2 48 0 99.2-3.2 147.2-3.2 19.2 0 28.8 22.4 28.8 41.6 0 51.2-57.6 25.6-86.4 41.6-19.2 12.8-19.2 70.4-19.2 92.8v537.6c0 19.2 0 67.2 19.2 80 28.8 19.2 89.6-6.4 89.6 44.8 0 19.2-6.4 41.6-28.8 41.6z"></path></svg>',this.tag="select",this.width=60}return t.prototype.getOptions=function(n){var r=[{value:"header1",text:"H1",styleForRenderMenuList:{"font-size":"32px","font-weight":"bold"}},{value:"header2",text:"H2",styleForRenderMenuList:{"font-size":"24px","font-weight":"bold"}},{value:"header3",text:"H3",styleForRenderMenuList:{"font-size":"18px","font-weight":"bold"}},{value:"header4",text:"H4",styleForRenderMenuList:{"font-size":"16px","font-weight":"bold"}},{value:"header5",text:"H5",styleForRenderMenuList:{"font-size":"13px","font-weight":"bold"}},{value:"header6",text:"H6",styleForRenderMenuList:{"font-size":"11px","font-weight":"bold"}},{value:"paragraph",text:se("header.text")}],o=this.getValue(n).toString();return r.forEach((function(i){i.value===o?i.selected=!0:i.selected=void 0})),r},t.prototype.isActive=function(n){return!1},t.prototype.getValue=function(n){return tu(n)},t.prototype.isDisabled=function(n){return nu(n)},t.prototype.exec=function(n,r){ru(n,r.toString())},t})(),ay={key:"headerSelect",factory:function(){return new sy}},ly={key:"header1",factory:function(){return new ey}},cy={key:"header2",factory:function(){return new ty}},uy={key:"header3",factory:function(){return new ny}},dy={key:"header4",factory:function(){return new ry}},fy={key:"header5",factory:function(){return new oy}},py={key:"header6",factory:function(){return new iy}};function Sn(t){return function(n,r,o){var i=F(n);return(r=r.filter((function(a){return!!q.isText(a)||!!o.isInline(a)}))).length===0&&(r=[{text:i.text().replace(/\s+/gm," ")}]),{type:"header".concat(t),children:r}}}var hy={selector:"h1:not([data-w-e-type])",parseElemHtml:Sn(1)},my={selector:"h2:not([data-w-e-type])",parseElemHtml:Sn(2)},gy={selector:"h3:not([data-w-e-type])",parseElemHtml:Sn(3)},yy={selector:"h4:not([data-w-e-type])",parseElemHtml:Sn(4)},by={selector:"h5:not([data-w-e-type])",parseElemHtml:Sn(5)},Cy={selector:"h6:not([data-w-e-type])",parseElemHtml:Sn(6)};function Fn(t){return function(n,r,o){return je("h".concat(t),null,r)}}var vy={renderElems:[{type:"header1",renderElem:Fn(1)},{type:"header2",renderElem:Fn(2)},{type:"header3",renderElem:Fn(3)},{type:"header4",renderElem:Fn(4)},{type:"header5",renderElem:Fn(5)},{type:"header6",renderElem:Fn(6)}],elemsToHtml:[J1,G1,Y1,Z1,X1,Q1],parseElemsHtml:[hy,my,gy,yy,by,Cy],menus:[ay,ly,cy,uy,dy,fy,py],editorPlugin:function(t){var n=t.insertBreak,r=t;return r.insertBreak=function(){var o=$(C.nodes(r,{match:function(a){return S.getNodeType(a).startsWith("header")},universal:!0}),1),i=o[0];i&&S.isSelectionAtLineEnd(t,i[1])?O.insertNodes(r,{type:"paragraph",children:[{text:""}]},{mode:"highest"}):n()},r}},ou=(function(){function t(){this.tag="button"}return t.prototype.getValue=function(n){var r=$(C.nodes(n,{match:function(i){return!!i.indent},universal:!0}),1),o=r[0];return o==null?"":$(o,1)[0].indent||""},t.prototype.isActive=function(n){return!1},t.prototype.getMatchNode=function(n){var r=$(C.nodes(n,{match:function(i){var a=S.getNodeType(i);return a==="paragraph"||!!a.startsWith("header")},universal:!0,mode:"highest"}),1),o=r[0];return o==null?null:o[0]},t})(),Dy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("indent.decrease"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z"></path></svg>',r}return De(n,t),n.prototype.isDisabled=function(r){var o=this.getMatchNode(r);return o==null||!o.indent},n.prototype.exec=function(r,o){O.setNodes(r,{indent:null},{match:function(i){return te.isElement(i)}})},n})(ou),wy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("indent.increase"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',r.DEFAULT_INDENT_VALUE="2em",r}return De(n,t),n.prototype.isDisabled=function(r){var o=this.getMatchNode(r);return o==null||!!o.indent},n.prototype.getIndentValue=function(r){var o=this.getMatchNode(r);if(!o)return this.DEFAULT_INDENT_VALUE;var i=o.children.filter(q.isText)[0];if(!i||!i.fontSize)return this.DEFAULT_INDENT_VALUE;var a=i.fontSize,l=parseInt(i.fontSize,10),c=a.replace("".concat(l),"");return"".concat(2*l).concat(c)},n.prototype.exec=function(r,o){var i=this.getIndentValue(r);O.setNodes(r,{indent:i},{match:function(a){return te.isElement(a)},mode:"highest"})},n})(ou),xy={renderStyle:function(t,n){if(!te.isElement(t))return n;var r=t.indent,o=n;return r&&on(o,{textIndent:r}),o},styleToHtml:function(t,n){if(!te.isElement(t))return n;var r=t.indent;if(!r)return n;var o=F(n);return o.css("text-indent",r),_n(o)},preParseHtml:[{selector:"p,h1,h2,h3,h4,h5",preParseHtml:function(t){var n=F(t),r=It(n,"padding-left");return/\dem/.test(r)&&n.css("text-indent","2em"),/\dpx/.test(r)&&parseInt(r,10)%32==0&&n.css("text-indent","2em"),n[0]}}],parseStyleHtml:function(t,n,r){var o=F(t);if(!te.isElement(n))return n;var i=n,a=It(o,"text-indent"),l=parseInt(a,10);return a&&l>0&&(i.indent=a),i},menus:[{key:"indent",factory:function(){return new wy}},{key:"delIndent",factory:function(){return new Dy}}]},so=(function(){function t(){this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return n.selection==null||!!S.getSelectedElems(n).some((function(r){var o=r.type;return!(!C.isVoid(n,r)||!C.isBlock(n,r)||o==="video")||!!["pre","code"].includes(o)}))},t})(),By=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("justify.center"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',r}return De(n,t),n.prototype.exec=function(r,o){O.setNodes(r,{textAlign:"center"},{match:function(i){return te.isElement(i)&&!r.isInline(i)}})},n})(so),ky=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("justify.justify"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>',r}return De(n,t),n.prototype.exec=function(r,o){O.setNodes(r,{textAlign:"justify"},{match:function(i){return te.isElement(i)&&!r.isInline(i)}})},n})(so),Ey=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("justify.left"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',r}return De(n,t),n.prototype.exec=function(r,o){O.setNodes(r,{textAlign:"left"},{match:function(i){return te.isElement(i)&&!r.isInline(i)}})},n})(so),_y=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.title=se("justify.right"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',r}return De(n,t),n.prototype.exec=function(r,o){O.setNodes(r,{textAlign:"right"},{match:function(i){return te.isElement(i)&&!r.isInline(i)}})},n})(so),Ay={renderStyle:function(t,n){if(!te.isElement(t))return n;var r=t.textAlign,o=n;return r&&on(o,{textAlign:r}),o},styleToHtml:function(t,n){if(!te.isElement(t))return n;var r=t.textAlign;if(!r)return n;var o=F(n);return o.css("text-align",r),_n(o)},parseStyleHtml:function(t,n,r){var o=F(t);if(!te.isElement(n))return n;var i=n,a=It(o,"text-align");return a&&(i.textAlign=a),i},menus:[{key:"justifyLeft",factory:function(){return new Ey}},{key:"justifyRight",factory:function(){return new _y}},{key:"justifyCenter",factory:function(){return new By}},{key:"justifyJustify",factory:function(){return new ky}}]},Ny=(function(){function t(){this.title=se("lineHeight.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M964 788a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526zM198.93 144.306c6.668-5.798 16.774-5.094 22.573 1.574l122.26 140.582a16 16 0 0 1 3.927 10.5c0 8.836-7.164 16-16 16h-61.8a8 8 0 0 0-8 8v390.077h69.819a16 16 0 0 1 10.502 3.928c6.666 5.8 7.37 15.906 1.57 22.573L221.476 878.123a16 16 0 0 1-1.57 1.57c-6.668 5.8-16.774 5.097-22.574-1.57L75.051 737.538a16 16 0 0 1-3.928-10.5c0-8.837 7.163-16 16-16h69.822V312.96H87.127a16 16 0 0 1-10.502-3.928c-6.666-5.8-7.37-15.906-1.57-22.573l122.303-140.582a16 16 0 0 1 1.572-1.572zM964 465a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z m0-323a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z"></path></svg>',this.tag="select",this.width=80}return t.prototype.getOptions=function(n){var r=[],o=n.getMenuConfig("lineHeight").lineHeightList,i=o===void 0?[]:o;r.push({text:se("lineHeight.default"),value:""}),i.forEach((function(l){r.push({text:l,value:l})}));var a=this.getValue(n);return r.forEach((function(l){l.value===a?l.selected=!0:l.selected=void 0})),r},t.prototype.getMatchNode=function(n){var r=$(C.nodes(n,{match:function(i){var a=S.getNodeType(i);return!!a.startsWith("header")||!!["paragraph","blockquote","list-item"].includes(a)},universal:!0,mode:"highest"}),1),o=r[0];return o==null?null:o[0]},t.prototype.isActive=function(n){return!1},t.prototype.getValue=function(n){var r=this.getMatchNode(n);return r==null?"":te.isElement(r)&&r.lineHeight||""},t.prototype.isDisabled=function(n){return n.selection==null||this.getMatchNode(n)==null},t.prototype.exec=function(n,r){O.setNodes(n,{lineHeight:r.toString()},{mode:"highest"})},t})(),Sy={renderStyle:function(t,n){if(!te.isElement(t))return n;var r=t.lineHeight,o=n;return r&&on(o,{lineHeight:r}),o},styleToHtml:function(t,n){if(!te.isElement(t))return n;var r=t.lineHeight;if(!r)return n;var o=F(n);return o.css("line-height",r),_n(o)},parseStyleHtml:function(t,n,r){var o=F(t);if(!te.isElement(n))return n;var i=n,a=r.getMenuConfig("lineHeight").lineHeightList,l=a===void 0?[]:a,c=It(o,"line-height");return c&&l.includes(c)&&(i.lineHeight=c),i},menus:[{key:"lineHeight",factory:function(){return new Ny},config:{lineHeightList:["1","1.15","1.5","2","2.5","3"]}}]},Fy={type:"link",elemToHtml:function(t,n){var r=t,o=r.url,i=r.target,a=i===void 0?"_blank":i;return'<a href="'.concat(o,'" target="').concat(a,'">').concat(n,"</a>")}};function iu(t){return t===void 0&&(t="r"),"".concat(t,"-").concat(Qg())}function su(t){return t.replace(/</g,"<").replace(/>/g,">")}function au(t,n,r,o){return gn(this,void 0,void 0,(function(){var i,a;return yn(this,(function(l){switch(l.label){case 0:return(i=n.getMenuConfig(t).checkLink)?[4,i(r,o)]:[3,2];case 1:if(typeof(a=l.sent())=="string")return n.alert(a,"error"),[2,!1];if(a==null)return[2,!1];l.label=2;case 2:return[2,!0]}}))}))}function lu(t,n,r){return gn(this,void 0,void 0,(function(){var o;return yn(this,(function(i){switch(i.label){case 0:return(o=n.getMenuConfig(t).parseLinkUrl)?[4,o(r)]:[3,2];case 1:return[2,i.sent()];case 2:return[2,r]}}))}))}function Xi(t){return t.selection==null||!!S.getSelectedElems(t).some((function(n){var r=n.type;return!!t.isVoid(n)||!!["pre","code","link"].includes(r)}))}function Qi(t,n){return{type:"link",url:su(t),children:n?[{text:n}]:[]}}function cu(t,n,r){return gn(this,void 0,void 0,(function(){var o,i,a,l,c;return yn(this,(function(u){switch(u.label){case 0:return r?(n||(n=r),t.restoreSelection(),Xi(t)?[2]:[4,au("insertLink",t,n,r)]):[2];case 1:return u.sent()?[4,lu("insertLink",t,r)]:[2];case 2:if(o=u.sent(),(i=t.selection)==null)return[2];if(j.isCollapsed(i)){if((l=S.getLeftLengthOfMaxLength(t))<=0)return[2];t.insertText(" "),l<n.length+1&&(n=n.slice(0,l-1)),c=Qi(o,n),O.insertNodes(t,c),t.insertFragment([{text:" "}])}else if((a=C.string(t,i))!==n){if((l=S.getLeftLengthOfMaxLength(t))<=0)return[2];l<a.length-n.length&&(n=n.slice(0,l)),t.deleteFragment(),c=Qi(o,n),O.insertNodes(t,c)}else c=Qi(o),O.wrapNodes(t,c,{split:!0}),O.collapse(t,{edge:"end"});return[2]}}))}))}function uu(){return iu("w-e-update-link")}var Vy=(function(){function t(){this.title=se("link.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=uu(),this.buttonId=uu()}return t.prototype.getSelectedLinkElem=function(n){var r=S.getSelectedNodeByType(n,"link");return r??null},t.prototype.getValue=function(n){var r=this.getSelectedLinkElem(n);return r&&r.url||""},t.prototype.isActive=function(n){return!1},t.prototype.exec=function(n,r){},t.prototype.isDisabled=function(n){return n.selection==null||this.getSelectedLinkElem(n)==null},t.prototype.getModalPositionNode=function(n){return S.getSelectedNodeByType(n,"link")},t.prototype.getModalContentElem=function(n){var r=this.urlInputId,o=this.buttonId,i=$($i(se("link.url"),r),2),a=i[0],l=F(i[1]),c=$(Cc(o,se("common.ok")),1)[0];if(this.$content==null){var u=F("<div></div>");u.on("click","#".concat(o),(function(p){p.preventDefault(),n.restoreSelection();var h=S.getSelectedNodeByType(n,"link"),m=h?H.string(h):"",g=u.find("#".concat(r)).val();(function(y,v,D){gn(this,void 0,void 0,(function(){var w,b;return yn(this,(function(x){switch(x.label){case 0:return D?[4,au("editLink",y,v,D)]:[2];case 1:return x.sent()?[4,lu("editLink",y,D)]:[2];case 2:return w=x.sent(),b={url:su(w)},O.setNodes(y,b,{match:function(k){return S.checkNodeType(k,"link")}}),[2]}}))}))})(n,m,g),n.hidePanelOrModal()})),this.$content=u}var d=this.$content;d.empty(),d.append(a),d.append(c);var f=this.getValue(n);return l.val(f),setTimeout((function(){l.focus()})),d[0]},t})();function es(){return iu("w-e-insert-link")}var Oy=(function(){function t(){this.title=se("link.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=es(),this.urlInputId=es(),this.buttonId=es()}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.exec=function(n,r){},t.prototype.isDisabled=function(n){return Xi(n)},t.prototype.getModalPositionNode=function(n){return null},t.prototype.getModalContentElem=function(n){var r=n.selection,o=this,i=o.textInputId,a=o.urlInputId,l=o.buttonId,c=$($i(se("link.text"),i),2),u=c[0],d=F(c[1]),f=$($i(se("link.url"),a),2),p=f[0],h=F(f[1]),m=$(Cc(l,se("common.ok")),1)[0];if(this.$content==null){var g=F("<div></div>");g.on("click","#".concat(l),(function(D){D.preventDefault();var w=g.find("#".concat(i)).val(),b=g.find("#".concat(a)).val();cu(n,w,b),n.hidePanelOrModal()})),this.$content=g}var y=this.$content;if(y.empty(),y.append(u),y.append(p),y.append(m),r==null||j.isCollapsed(r))d.val("");else{var v=C.string(n,r);d.val(v)}return h.val(""),setTimeout((function(){d.focus()})),y[0]},t})(),Ty=(function(){function t(){this.title=se("link.unLink"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M608.16328 811.815036c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.347563 89.347564c-118.525421 118.523421-311.38448 118.531421-429.919901 0-118.527421-118.529421-118.527421-311.39048 0-429.917901l89.349564-89.349563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.195613 79.195613c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.349563 89.347564c-56.143726 56.145726-56.143726 147.49928 0 203.645005 56.143726 56.143726 147.49928 56.145726 203.647005 0l89.347564-89.347563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.193613 79.195613z m-113.135447-520.429459c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.347564-89.347564c56.143726-56.149726 147.49928-56.145726 203.647006 0 56.143726 56.145726 56.143726 147.49928 0 203.645006l-89.349564 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.195613 79.195613c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.349564-89.349563c118.529421-118.529421 118.529421-311.38848 0-429.917901-118.531421-118.527421-311.38848-118.527421-429.919901 0l-89.347563 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.193613 79.195613z m469.653707 718.556492l45.253779-45.253779c18.745908-18.745908 18.745908-49.13776 0-67.881669L127.195629 14.062931c-18.745908-18.745908-49.13776-18.745908-67.881669 0L14.058181 59.31871c-18.745908 18.745908-18.745908 49.13776 0 67.881669l882.74169 882.74169c18.745908 18.743908 49.13776 18.743908 67.881669 0z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return n.selection==null||S.getSelectedNodeByType(n,"link")==null},t.prototype.exec=function(n,r){this.isDisabled(n)||O.unwrapNodes(n,{match:function(o){return S.checkNodeType(o,"link")}})},t})(),jy=(function(){function t(){this.title=se("link.view"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z" p-id="10909"></path><path d="M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z" p-id="10910"></path><path d="M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z"></path></svg>',this.tag="button"}return t.prototype.getSelectedLinkElem=function(n){var r=S.getSelectedNodeByType(n,"link");return r??null},t.prototype.getValue=function(n){var r=this.getSelectedLinkElem(n);return r&&r.url||""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return n.selection==null||this.getSelectedLinkElem(n)==null},t.prototype.exec=function(n,r){if(!this.isDisabled(n)){if(!r||typeof r!="string")throw new Error("View link failed, link url is '".concat(r,"'"));window.open(r,"_blank")}},t})(),du={checkLink:function(t,n){return!0},parseLinkUrl:function(t){return t}},Py={key:"insertLink",factory:function(){return new Oy},config:du},Ly={key:"editLink",factory:function(){return new Vy},config:du},My={key:"unLink",factory:function(){return new Ty}},zy={key:"viewLink",factory:function(){return new jy}},ts,fu,$y={selector:"a:not([data-w-e-type])",parseElemHtml:function(t,n,r){var o=F(t);return(n=n.filter((function(i){return!!q.isText(i)||!!r.isInline(i)}))).length===0&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"link",url:o.attr("href")||"",target:o.attr("target")||"",children:n}}},Iy=qt((function(){if(fu)return ts;fu=1,ts=function(o){if(typeof o!="string")return!1;var i=o.match(t);if(!i)return!1;var a=i[1];return a?!!(n.test(a)||r.test(a)):!1};var t=/^(?:\w+:)?\/\/(\S+)$/,n=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,r=/^[^\s\.]+\.\S{2,}$/;return ts})()),Ry={type:"link",renderElem:function(t,n,r){var o=t,i=o.url,a=o.target;return je("a",{href:i,target:a===void 0?"_blank":a},n)}},Hy={renderElems:[Ry],elemsToHtml:[Fy],parseElemsHtml:[$y],menus:[Py,Ly,My,zy],editorPlugin:function(t){var n=t.isInline,r=t.insertData,o=t.normalizeNode,i=t;return i.isInline=function(a){return a.type==="link"||n(a)},i.insertData=function(a){var l=a.getData("text/plain");if(Iy(l)){if(/<img[^>]+>/.test(a.getData("text/html")))r(a);else if(!Xi(i)){var c=i.selection;if(c!=null){var u=C.string(i,c);cu(i,u,l)}}}else r(a)},i.normalizeNode=function(a){var l=$(a,2),c=l[0],u=l[1];return S.getNodeType(c)!=="link"?o([c,u]):H.string(c)===""?O.removeNodes(i,{at:u}):o([c,u])},i}},Uy={selector:"p:not([data-w-e-type])",parseElemHtml:function(t,n,r){var o=F(t);return(n=n.filter((function(i){return!!q.isText(i)||!!r.isInline(i)}))).length===0&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:n}}};function pu(t){var n=$(C.nodes(t,{match:function(l){return t.children[0]===l},mode:"highest"}),1),r=n[0];if(r==null)return!1;var o=r[0];if(!te.isElement(o)||o.type==="paragraph"||H.string(o)!=="")return!1;var i=o.children,a=i===void 0?[]:i;return!!q.isText(a[0])&&(O.setNodes(t,{type:"paragraph"}),!0)}var Wy={type:"paragraph",renderElem:function(t,n,r){return je("p",null,n)}},qy={renderElems:[Wy],elemsToHtml:[{type:"paragraph",elemToHtml:function(t,n){return n===""?"<p><br></p>":"<p>".concat(n,"</p>")}}],parseElemsHtml:[Uy],editorPlugin:function(t){var n=t.deleteBackward,r=t.deleteForward,o=t;return o.deleteBackward=function(i){pu(o)||n(i)},o.deleteForward=function(i){pu(o)||r(i)},o}};function hu(t,n){if(t.selection==null)return!0;var r=$(C.nodes(t,{match:function(o){return S.getNodeType(o)==="pre"||!!C.isVoid(t,o)},universal:!0}),1);return!!r[0]}function Ky(t,n){Object.keys(n).forEach((function(r){r!=="text"&&C.removeMark(t,r)}))}var sn=(function(){function t(){this.marksNeedToRemove=[],this.tag="button"}return t.prototype.getValue=function(n){var r=this.mark,o=C.marks(n);if(o)return o[r];var i=$(C.nodes(n,{match:function(a){return a[r]===!0}}),1);return!!i[0]},t.prototype.isActive=function(n){return!!this.getValue(n)},t.prototype.isDisabled=function(n){return hu(n,this.mark)},t.prototype.exec=function(n,r){var o=this.mark,i=this.marksNeedToRemove;r?n.removeMark(o):(n.addMark(o,!0),i&&i.forEach((function(a){return n.removeMark(a)})))},t})(),Jy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="bold",r.title=se("textStyle.bold"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M707.872 484.64A254.88 254.88 0 0 0 768 320c0-141.152-114.848-256-256-256H192v896h384c141.152 0 256-114.848 256-256a256.096 256.096 0 0 0-124.128-219.36zM384 192h101.504c55.968 0 101.504 57.408 101.504 128s-45.536 128-101.504 128H384V192z m159.008 640H384v-256h159.008c58.464 0 106.016 57.408 106.016 128s-47.552 128-106.016 128z"></path></svg>',r.hotkey="mod+b",r}return De(n,t),n})(sn),Gy=(function(){function t(){this.title=se("textStyle.clear"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M969.382408 288.738615l-319.401123-270.852152a67.074236 67.074236 0 0 0-96.459139 5.74922l-505.931379 574.922021a68.35184 68.35184 0 0 0-17.886463 47.910169 74.101061 74.101061 0 0 0 24.274486 47.910168l156.50655 132.232065h373.060512L975.131628 383.281347a67.074236 67.074236 0 0 0-5.74922-96.459139z m-440.134747 433.746725H264.144729l-90.071117-78.572676c-5.74922-5.74922-12.137243-12.137243-12.137243-17.886463a36.411728 36.411728 0 0 1 5.749221-24.274485l210.804741-240.828447 265.102932 228.691204z m-439.495945 180.781036h843.218964a60.047411 60.047411 0 1 1 0 120.733624H89.751716a60.047411 60.047411 0 1 1 0-120.733624z m0 0"></path></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return hu(n)},t.prototype.exec=function(n,r){var o,i,a=C.nodes(n,{match:function(u){return q.isText(u)},universal:!0});try{for(var l=at(a),c=l.next();!c.done;c=l.next())Ky(n,c.value[0])}catch(u){o={error:u}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}},t})(),Yy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="code",r.title=se("textStyle.code"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M576 736l96 96 320-320L672 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224z"></path></svg>',r.hotkey="mod+e",r}return De(n,t),n})(sn),Zy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="italic",r.title=se("textStyle.italic"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z"></path></svg>',r.hotkey="mod+i",r}return De(n,t),n})(sn),Xy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="sub",r.marksNeedToRemove=["sup"],r.title=se("textStyle.sub"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 910.016v50.016h128v64h-192v-146.016l128-60V768h-128v-64h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',r.hotkey="",r}return De(n,t),n})(sn),Qy=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="sup",r.marksNeedToRemove=["sub"],r.title=se("textStyle.sup"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 206.016v50.016h128v64h-192V174.016l128-60V64h-128V0h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',r.hotkey="",r}return De(n,t),n})(sn),e2=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="through",r.title=se("textStyle.through"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M1024 512v64h-234.496c27.52 38.496 42.496 82.688 42.496 128 0 70.88-36.672 139.04-100.576 186.976C672.064 935.488 594.144 960 512 960s-160.064-24.512-219.424-69.024C228.64 843.04 192 774.88 192 704h128c0 69.376 87.936 128 192 128s192-58.624 192-128-87.936-128-192-128H0v-64h299.52a385.984 385.984 0 0 1-6.944-5.024C228.64 459.04 192 390.88 192 320s36.672-139.04 100.576-186.976C351.936 88.512 429.856 64 512 64s160.064 24.512 219.424 69.024C795.328 180.96 832 249.12 832 320h-128c0-69.376-87.936-128-192-128s-192 58.624-192 128 87.936 128 192 128c78.976 0 154.048 22.688 212.48 64H1024z"></path></svg>',r.hotkey="mod+shift+x",r}return De(n,t),n})(sn),t2=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.mark="underline",r.title=se("textStyle.underline"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 64l128 0 0 416c0 159.072-143.264 288-320 288s-320-128.928-320-288l0-416 128 0 0 416c0 40.16 18.24 78.688 51.36 108.512 36.896 33.216 86.848 51.488 140.64 51.488s103.744-18.304 140.64-51.488c33.12-29.792 51.36-68.352 51.36-108.512l0-416zM192 832l640 0 0 128-640 0z"></path></svg>',r.hotkey="mod+u",r}return De(n,t),n})(sn);function an(t,n){return t.length!==0&&(!!t[0].matches(n)||t.find(n).length>0)}function mu(t,n){var r=n,o=t,i=o.bold,a=o.italic,l=o.underline,c=o.code,u=o.through,d=o.sub,f=o.sup;return i&&(r="<strong>".concat(r,"</strong>")),c&&(r="<code>".concat(r,"</code>")),a&&(r="<em>".concat(r,"</em>")),l&&(r="<u>".concat(r,"</u>")),u&&(r="<s>".concat(r,"</s>")),d&&(r="<sub>".concat(r,"</sub>")),f&&(r="<sup>".concat(r,"</sup>")),r}var n2={renderStyle:function(t,n){var r=t,o=r.bold,i=r.italic,a=r.underline,l=r.code,c=r.through,u=r.sub,d=r.sup,f=n;return o&&(f=je("strong",null,f)),l&&(f=je("code",null,f)),i&&(f=je("em",null,f)),a&&(f=je("u",null,f)),c&&(f=je("s",null,f)),u&&(f=je("sub",null,f)),d&&(f=je("sup",null,f)),f},menus:[{key:"bold",factory:function(){return new Jy}},{key:"underline",factory:function(){return new t2}},{key:"italic",factory:function(){return new Zy}},{key:"through",factory:function(){return new e2}},{key:"code",factory:function(){return new Yy}},{key:"sub",factory:function(){return new Xy}},{key:"sup",factory:function(){return new Qy}},{key:"clearStyle",factory:function(){return new Gy}}],styleToHtml:function(t,n){if(!q.isText(t))return n;if(Yi(n))return mu(t,n);var r=F(n),o=r.html();return o=mu(t,o),r.html(o),_n(r)},parseStyleHtml:function(t,n,r){var o=F(t);if(!q.isText(n))return n;var i=n;return an(o,"b,strong")&&(i.bold=!0),an(o,"i,em")&&(i.italic=!0),an(o,"u")&&(i.underline=!0),an(o,"s,strike")&&(i.through=!0),an(o,"sub")&&(i.sub=!0),an(o,"sup")&&(i.sup=!0),an(o,"code")&&(i.code=!0),i}},r2=(function(){function t(){this.title=se("undo.redo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0.00032 576a510.72 510.72 0 0 0 173.344 384l84.672-96A383.136 383.136 0 0 1 128.00032 576C128.00032 363.936 299.93632 192 512.00032 192c106.048 0 202.048 42.976 271.52 112.48L640.00032 448h384V64l-149.984 149.984A510.272 510.272 0 0 0 512.00032 64C229.21632 64 0.00032 293.216 0.00032 576z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return n.selection==null},t.prototype.exec=function(n,r){typeof n.redo=="function"&&n.redo()},t})(),o2=(function(){function t(){this.title=se("undo.undo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 64A510.272 510.272 0 0 0 149.984 213.984L0.032 64v384h384L240.512 304.48A382.784 382.784 0 0 1 512.032 192c212.064 0 384 171.936 384 384 0 114.688-50.304 217.632-130.016 288l84.672 96a510.72 510.72 0 0 0 173.344-384c0-282.784-229.216-512-512-512z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){return!1},t.prototype.isDisabled=function(n){return n.selection==null},t.prototype.exec=function(n,r){typeof n.undo=="function"&&n.undo()},t})(),i2=[n2,O1,U1,xy,Ay,Sy,M1,$1,Hy,vy,qy,W1,{menus:[{key:"redo",factory:function(){return new r2}},{key:"undo",factory:function(){return new o2}}]},K1,j1];kn("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),kn("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var ns=new WeakMap;function gu(t){var n,r=t.children||[],o=r.length;if(o===0)return"";for(var i=0;i<o&&!n;i+=1){var a=r[i];q.isText(a)&&(n=a)}return n==null?"":n.color||""}function yu(t,n,r){for(var o=n.type,i=(function(h,m){var g={};for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&m.indexOf(y)<0&&(g[y]=h[y]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var v=0;for(y=Object.getOwnPropertySymbols(h);v<y.length;v++)m.indexOf(y[v])<0&&Object.prototype.propertyIsEnumerable.call(h,y[v])&&(g[y[v]]=h[y[v]])}return g})(n,["type"]),a=r!==void 0?r:i.level||0,l=S.findPath(t,n),c=l;;){if(c.length===0||l[l.length-1]===0)return null;c=_.previous(c);var u=C.node(t,c);if(!u)return null;var d=$(u,1)[0],f=d.level,p=f===void 0?0:f;if(S.getNodeType(d)!==o)return null;if(p===a)return d}}function bu(t,n,r){var o=yu(t,n,r);return!!o&&o.ordered===n.ordered}var Cu=[],s2={type:"list-item",elemToHtml:function(t,n){var r="",o="",i=t.ordered,a=i!==void 0&&i?"ol":"ul",l=(function(h){var m=ns.get(h);if(m==null)return 0;var g=h,y=g.type,v=g.ordered,D=v!==void 0&&v,w=g.level,b=w===void 0?0:w,x=S.findPath(m,h);if(x[0]===0)return b+1;var k=_.previous(x),E=C.node(m,k);if(!E)return 0;var B=$(E,1)[0];if(S.getNodeType(B)!==y)return b+1;var V=B,T=V.ordered,P=T!==void 0&&T,R=V.level,I=R===void 0?0:R;return I<b?b-I:I>b?bu(m,h)?0:1:I===b?P===D?0:1:0})(t);if(l>0)for(var c=0;c<l;c+=1)r+="<".concat(a,">"),Cu.push(a);var u=(function(h){var m=ns.get(h);if(m==null)return 0;var g=h,y=g.type,v=g.ordered,D=v!==void 0&&v,w=g.level,b=w===void 0?0:w,x=S.findPath(m,h);if(x[0]===m.children.length-1)return b+1;var k=_.next(x),E=C.node(m,k);if(!E)return 0;var B=$(E,1)[0];if(S.getNodeType(B)!==y)return b+1;var V=B,T=V.ordered,P=T!==void 0&&T,R=V.level,I=R===void 0?0:R;return I<b?bu(m,B)?b-I:b-I+1:I>b?0:I===b?P===D?0:1:0})(t);if(u>0)for(c=0;c<u;c+=1){var d=Cu.pop();o+="</".concat(d,">")}var f=gu(t),p=f?' style="color:'.concat(f,'"'):"";return{html:"<li".concat(p,">").concat(n,"</li>"),prefix:r,suffix:o}}},vu=(function(){function t(){this.type="list-item",this.tag="button"}return t.prototype.getListNode=function(n){var r=this.type;return S.getSelectedNodeByType(n,r)},t.prototype.getValue=function(n){return""},t.prototype.isActive=function(n){var r=this.getListNode(n);if(r==null)return!1;var o=r.ordered;return(o!==void 0&&o)===this.ordered},t.prototype.isDisabled=function(n){return n.selection==null||!!S.getSelectedElems(n).some((function(r){if(C.isVoid(n,r)&&C.isBlock(n,r))return!0;var o=r.type;return!!["pre","code","table"].includes(o)}))},t.prototype.exec=function(n,r){this.isActive(n)?O.setNodes(n,{type:"paragraph",ordered:void 0,level:void 0}):O.setNodes(n,{type:"list-item",ordered:this.ordered,indent:void 0})},t})(),a2=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.ordered=!1,r.title=se("listModule.unOrderedList"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',r}return De(n,t),n})(vu),l2=(function(t){function n(){var r=t.apply(this,ke([],$(arguments),!1))||this;return r.ordered=!0,r.title=se("listModule.orderedList"),r.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',r}return De(n,t),n})(vu),c2={key:"bulletedList",factory:function(){return new a2}},u2={key:"numberedList",factory:function(){return new l2}};function rs(t){return t.length?t[0].tagName.toLowerCase():""}vn&&(F.fn.append=vn),Cn&&(F.fn.attr=Cn),Mr&&(F.fn.parent=Mr);var d2={selector:"li:not([data-w-e-type])",parseElemHtml:function(t,n,r){var o=F(t);(n=n.filter((function(l){return!!q.isText(l)||!!r.isInline(l)}))).length===0&&(n=[{text:o.text().replace(/\s+/gm," ")}]);var i=(function(l){return rs(l.parent())==="ol"})(o),a=(function(l){for(var c=0,u=l.parent(),d=rs(u);d==="ul"||d==="ol";)d=rs(u=u.parent()),c+=1;return c-1})(o);return{type:"list-item",ordered:i,level:a,children:n}}},f2={selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(t,n,r){return n.flat(1/0)}};function Du(t){return C.nodes(t,{at:t.selection||void 0,match:function(n){return S.findPath(t,n).length===1}})}var p2={type:"list-item",renderElem:function(t,n,r){ns.set(t,r);var o=t,i=o.level,a=i===void 0?0:i,l=o.ordered,c=l!==void 0&&l,u={margin:"5px 0 5px ".concat(20*a,"px"),display:"flex",alignItems:"flex-start"},d="";if(c){var f=(function(p,h){var m=h,g=m.type,y=m.level,v=y===void 0?0:y,D=m.ordered,w=D!==void 0&&D,b=1,x=h,k=S.findPath(p,x);if(k[0]===0)return 1;for(;k[0]>0;){var E=_.previous(k),B=C.node(p,E);if(B==null)break;var V=B[0],T=V.level,P=T===void 0?0:T,R=V.type,I=V.ordered;if(R!==g||P<v)break;if(P===v){if(I!==w)break;b+=1}x=V,k=E}return b})(r,t);d="".concat(f,".")}else d=(function(p){p===void 0&&(p=0);var h="";switch(p){case 0:h="•";break;case 1:h="◦";break;default:h="▪"}return h})(a);return je("div",{style:u},je("span",{contentEditable:!1,style:{marginRight:"0.5em",color:gu(t)},"data-w-e-reserve":!0},d),je("span",{style:{flex:"1",wordBreak:"break-word"}},n))}},h2={renderElems:[p2],editorPlugin:function(t){var n=t.deleteBackward,r=t.handleTab,o=t.normalizeNode,i=t.insertBreak,a=t;return a.insertBreak=function(){var l=$(C.nodes(t,{match:function(u){return S.checkNodeType(u,"list-item")},universal:!0}),1),c=l[0];return c?c[0].children[0].text!==""?i():void O.setNodes(a,{type:"paragraph",ordered:void 0,level:void 0}):i()},a.deleteBackward=function(l){var c=a.selection;if(c!=null)if(j.isExpanded(c))n(l);else{var u=S.getSelectedNodeByType(a,"list-item");if(u!=null)if(c.focus.offset!==0)n(l);else{var d=u,f=d.level,p=f===void 0?0:f,h=d.ordered,m=h!==void 0&&h;if(p>0){var g=yu(t,u,p-1);g&&g.ordered!==m?O.setNodes(a,{level:p-1,ordered:!m}):O.setNodes(a,{level:p-1})}else O.setNodes(a,{type:"paragraph",ordered:void 0,level:void 0})}else n(l)}else n(l)},a.handleTab=function(){var l,c,u,d,f=a.selection;if(f!=null){if(j.isCollapsed(f)){var p=S.getSelectedNodeByType(a,"list-item");if(p==null)return void r();if(f.focus.offset===0){var h=p.level,m=h===void 0?0:h;return void O.setNodes(a,{level:m+1})}}if(j.isExpanded(f)){var g=0,y=!1;try{for(var v=at(Du(a)),D=v.next();!D.done;D=v.next()){var w=$(D.value,1)[0];S.getNodeType(w)==="list-item"?g+=1:y=!0}}catch(V){l={error:V}}finally{try{D&&!D.done&&(c=v.return)&&c.call(v)}finally{if(l)throw l.error}}if(y||g<=1)return void r();try{for(var b=at(Du(a)),x=b.next();!x.done;x=b.next()){var k=$(x.value,2),E=(w=k[0],k[1]),B=w.level;m=B===void 0?0:B,O.setNodes(a,{level:m+1},{at:E})}}catch(V){u={error:V}}finally{try{x&&!x.done&&(d=b.return)&&d.call(b)}finally{if(u)throw u.error}}}else r()}else r()},a.normalizeNode=function(l){var c=$(l,2),u=c[0],d=c[1],f=S.getNodeType(u);return f!=="bulleted-list"&&f!=="numbered-list"||O.unwrapNodes(a,{at:d}),o([u,d])},a},menus:[c2,u2],elemsToHtml:[s2],parseElemsHtml:[f2,d2]},Qe=(function(){function t(){throw new Error(`不能实例化
|
|
37
|
+
Can not construct a instance`)}return t.setEditorConfig=function(n){n===void 0&&(n={}),this.editorConfig=me(me({},this.editorConfig),n)},t.setSimpleEditorConfig=function(n){n===void 0&&(n={}),this.simpleEditorConfig=me(me({},this.simpleEditorConfig),n)},t.setToolbarConfig=function(n){n===void 0&&(n={}),this.toolbarConfig=me(me({},this.toolbarConfig),n)},t.setSimpleToolbarConfig=function(n){n===void 0&&(n={}),this.simpleToolbarConfig=me(me({},this.simpleToolbarConfig),n)},t.registerPlugin=function(n){this.plugins.push(n)},t.registerMenu=function(n,r){Jg(n,r)},t.registerRenderElem=function(n){var r,o,i;o=(r=n).type,i=r.renderElem,Kc[o||""]=i},t.registerRenderStyle=function(n){(function(r){Ki.push(r)})(n)},t.registerElemToHtml=function(n){(function(r){var o=r.type,i=r.elemToHtml;dl[o||""]=i})(n)},t.registerStyleToHtml=function(n){(function(r){yi.push(r)})(n)},t.registerPreParseHtml=function(n){var r;r=n,il.push(r)},t.registerParseElemHtml=function(n){(function(r){var o=r.selector,i=r.parseElemHtml;qr[o]=i})(n)},t.registerParseStyleHtml=function(n){(function(r){Wr.push(r)})(n)},t.registerModule=function(n){os(n)},t.editorConfig={},t.simpleEditorConfig={},t.toolbarConfig={},t.simpleToolbarConfig={},t.plugins=[],t})();function os(t){var n=t.menus,r=t.renderElems,o=t.renderStyle,i=t.elemsToHtml,a=t.styleToHtml,l=t.preParseHtml,c=t.parseElemsHtml,u=t.parseStyleHtml,d=t.editorPlugin;n&&n.forEach((function(f){return Qe.registerMenu(f)})),r&&r.forEach((function(f){return Qe.registerRenderElem(f)})),o&&Qe.registerRenderStyle(o),i&&i.forEach((function(f){return Qe.registerElemToHtml(f)})),a&&Qe.registerStyleToHtml(a),l&&l.forEach((function(f){return Qe.registerPreParseHtml(f)})),c&&c.forEach((function(f){return Qe.registerParseElemHtml(f)})),u&&Qe.registerParseStyleHtml(u),d&&Qe.registerPlugin(d)}i2.forEach((function(t){return os(t)})),os(h2);var m2='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',g2='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',y2='<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',wu={link:{menuKeys:["editLink","unLink","viewLink"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},divider:{menuKeys:["enter"]}},b2={hoverbarKeys:me(me({},wu),{text:{menuKeys:["formatPainter","headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};Qe.setEditorConfig(me({},b2));var C2={hoverbarKeys:wu};Qe.setSimpleEditorConfig(me({},C2));var v2={toolbarKeys:["headerSelect","|","bold","underline","italic",{key:"group-more-style",title:se("editor.more"),iconSvg:y2,menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList",{key:"group-justify",title:se("editor.justify"),iconSvg:g2,menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:se("editor.indent"),iconSvg:m2,menuKeys:["indent","delIndent"]},"|","emotion","divider","|","undo","redo","|","formatPainter","fullScreen"]};Qe.setToolbarConfig(v2);var D2={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};function w2(t){t===void 0&&(t={});var n=t.selector,r=n===void 0?"":n,o=t.content,i=o===void 0?[]:o,a=t.html,l=t.config,c=l===void 0?{}:l,u=t.mode,d=(u===void 0?"default":u)==="simple"?Qe.simpleEditorConfig:Qe.editorConfig,f=me(me({},d.hoverbarKeys||{}),c.hoverbarKeys||{});return _1({selector:r,config:me(me(me({},d),c),{hoverbarKeys:f}),content:i,html:a,plugins:Qe.plugins})}function x2(t){var n=t.selector,r=t.editor,o=t.config,i=o===void 0?{}:o;if(!n)throw new Error("Cannot find 'selector' when create toolbar");var a=Qe.toolbarConfig;return N1(r,{selector:n,config:me(me({},a),i)})}Qe.setSimpleToolbarConfig(D2);class B2{constructor(){this.title="播放视频",this.tag="button"}getValue(n){return!1}isActive(n){return!1}isDisabled(n){return!1}exec(n){const r=S.getSelectedNodeByType(n,"video");console.log(r);const{view:o}=n.getMenuConfig("video");o(r)}}class xu{constructor(n="video"){this.type=n,this.title={video:"删除视频",image:"删除图片"}[n]??"删除",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}getValue(n){return!1}isActive(n){return!1}isDisabled(n){return!1}exec(n){if(O.removeNodes(n,{match:r=>S.checkNodeType(r,this.type)}),n.children.length==0){const r={type:"paragraph",children:[{text:""}]};n.insertNode(r)}}}class k2{constructor(){this.title="删除当前空白选区",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M128.98158345 72.59909097L957.65651249 882.41883582a12.62483038 12.62483038 0 0 1 0.20199729 17.85782259l-44.11746977 45.14639344a12.62483038 12.62483038 0 0 1-17.85151016 0.20199728L665.328565 720.3097013H44.88127586a37.87449114 37.87449114 0 0 1-37.87449115-37.87449114V341.56478984a37.87449114 37.87449114 0 0 1 37.87449115-37.87449114h194.11939195L67.21460081 135.80530428a12.62483038 12.62483038 0 0 1-0.2083097-17.85151017l44.12378219-45.14639344a12.62483038 12.62483038 0 0 1 17.85151015-0.2083097zM979.11872414 303.69661111a37.87449114 37.87449114 0 0 1 37.87449115 37.87449114v340.87042032a37.87449114 37.87449114 0 0 1-37.87449115 37.87449114l-60.10050504-0.00631241-90.43166002-88.37381267H928.61940262V392.06411137h-345.49742066L492.69032193 303.6902987H979.11872414zM574.89690496 631.93588863L329.43864025 392.06411137H95.38059738v239.87177726h479.51630758z"></path></svg>'}getValue(n){return!1}isActive(n){return!1}isDisabled(n){if(n.selection==null||n.children.length===1)return!0;const r=S.getSelectedElems(n);return!(r.length==1&&r[0].type=="paragraph"&&r[0].children.length==1&&r[0].children[0].text=="")}exec(n){console.log(n.selection),O.removeNodes(n)}}class E2{constructor(){this.title="在当前选区上方输入内容",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M402.50684874 1007.33354475h564.71918286v-125.49315273h-439.22603161V405.8448679h339.70996129L465.25342362 3.38833024 62.79688595 405.8448679H402.50684874V1007.33354475z"></path></svg>'}getValue(n){return!1}isActive(n){return!1}isDisabled(n){return!1}exec(n){const r={type:"paragraph",children:[{text:""}]};O.insertNodes(n,r,{at:[n.selection.anchor.path[0]]})}}class _2{constructor(){this.title="在当前选区下方输入内容",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M396.97946691 2.76146536h565.5924011v125.68720121h-439.90520135v476.73155007h340.23525057L459.82306605 1008.25906783l-403.0788512-403.07885119H396.97946691V2.76146536z"></path></svg>'}getValue(n){return!1}isActive(n){return!1}isDisabled(n){}exec(n){const r={type:"paragraph",children:[{text:""}]};n.insertNode(r)}}const A2={key:"viewVideo",factory(){return new B2}},N2={key:"delVideo",factory(){return new xu("video")}},S2={key:"delImage",factory(){return new xu("image")}},F2={key:"insertBottom",factory(){return new _2}},V2={key:"insertTop",factory(){return new E2}},O2={key:"delEmpty",factory(){return new k2}};class T2{title="上传图片";iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>';tag="button";getValue(n){return""}isActive(n){return!1}isDisabled(n){return!1}getMenuConfig(n){return n.getMenuConfig("image")}exec(n,r){const{upload:o}=this.getMenuConfig(n);function i(a){const l={type:"image",src:a,children:[{text:""}]};n.insertNode(l)}o(i)}}const j2={key:"image",factory(){return new T2},config:{}};class P2{title="上传视频";playSvg='<svg viewBox="0 0 1024 1024"><path d="M870.2 466.333333l-618.666667-373.28a53.333333 53.333333 0 0 0-80.866666 45.666667v746.56a53.206667 53.206667 0 0 0 80.886666 45.666667l618.666667-373.28a53.333333 53.333333 0 0 0 0-91.333334z" fill="#ffffff" p-id="5959"></path></svg>';iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>';tag="button";getValue(n){return""}isActive(n){return!1}isDisabled(n){return!1}exec(n,r){const{upload:o}=n.getMenuConfig("video");function i(a){const l={type:"video",poster:a+".jpg",src:a,children:[{text:""}]};n.insertNode(l)}o(i)}}function L2(t,n,r){const{id:o}=S.findKey(t,n);return`w-e-video-container-${o}`}function M2(t,n,r,o){const{width:i,height:a}=o,l={};i&&(l.width=i),a&&(l.height=a);const c=L2(t,n),u=S.isNodeSelected(t,n),d=ht("div",{props:{className:"we-video-play i-ri-play-fill"}});return ht("div",{props:{contentEditable:!1,id:c,className:"w-e-video-container"+(u?" w-e-video-selected":"")},style:l},[r,d])}function z2(t,n,r){const{src:o,poster:i="",style:a={}}=t,{width:l="",height:c=""}=a,u={};u.width="100%",u.height="100%";const d=ht("img",{src:$fileUrl(i),style:u});return M2(r,t,d,{width:l,height:c})}const $2={type:"video",renderElem:z2};function I2(t,n){let{src:r="",poster:o="",width:i="auto",height:a="auto"}=t;const l=r.split(DMX.fileUrl);l[1]&&(r=l[1]);const c=o.split(DMX.fileUrl);return c[1]&&(o=c[1]),`<video poster="${o}" src="${r}" controls="true" width="${i}" height="${a}"></video>`}const R2={type:"video",elemToHtml:I2};function H2(t){const n=F(t);return{type:"video",src:$fileUrl(n.attr("src")),poster:$fileUrl(n.attr("poster"))||"",style:{width:n.attr("width")??"",height:n.attr("height")??""},children:[{text:""}]}}const U2={selector:"video",parseElemHtml:H2},W2={key:"video",factory(){return new P2},config:{}};function q2(t,n){let r=0;return function(){const o=Date.now();o-r>=n&&(t.apply(this,arguments),r=o)}}function Bu(t,n){let r="";const i=(t.attr("style")||"").split(";"),a=i.length;for(let l=0;l<a;l++){const c=i[l];if(c){const u=c.split(":");u[0].trim()===n&&(r=u[1].trim())}}return r}function ku(t,n){const{id:r}=S.findKey(t,n);return`w-e-image-container-${r}`}function K2(t,n,r,o){const{width:i,height:a}=o,l={};i&&(l.width=i),a&&(l.height=a);const c=ku(t,n);return ht("div",{props:{id:c,className:"w-e-image-container"},style:l},[r])}function J2(t,n,r,o){const i=ku(t,n),a=F("body"),{width:l,height:c}=o;let u=0,d=0,f=!1,p=null;function h(){const b=F(`#${i}`);if(b.length===0)throw new Error("Cannot find image container elem");return b}function m(b){p=h(),u=b;const x=p.find("img");if(x.length===0)throw new Error("Cannot find image elem");d=x.width(),x.height(),a.on("mousemove",g),a.on("mouseup",y);const k=S.getHoverbar(t);k&&k.hideAndClean()}const g=q2(b=>{b.preventDefault();const{clientX:x}=b,k=f?u-x:x-u,E=d+k;p!=null&&(E<=15||(p.css("width",`${E}px`),p.css("height","auto")))},50);function y(){if(a.off("mousemove",g),p==null)return;const b=p.width().toFixed(2),x=F(".w-e-text-container").width(),k={style:{...n.style,width:`${(b/x*100).toFixed(2)}%`,height:"auto"}};let E=S.findPath(t,n);console.log(k,E),O.setNodes(t,k,{at:S.findPath(t,n)}),a.off("mouseup",y)}const v={};return l&&(v.width=l),c&&(v.height=c),v.boxShadow="0 0 0 1px #B4D5FF",ht("div",{props:{id:i,contentEditable:!1,className:"w-e-image-container w-e-selected-image-container"},style:v,on:{mousedown:b=>{const x=F(b.target);x.hasClass("w-e-image-dragger")&&(b.preventDefault(),(x.hasClass("left-top")||x.hasClass("left-bottom"))&&(f=!0),m(b.clientX))}}},[r,ht("div",{props:{className:"w-e-image-dragger left-top"}}),ht("div",{props:{className:"w-e-image-dragger right-top"}}),ht("div",{props:{className:"w-e-image-dragger left-bottom"}}),ht("div",{props:{className:"w-e-image-dragger right-bottom"}})])}function G2(t,n,r){const{src:o,href:i="",style:a={}}=t,{width:l="",height:c=""}=a,u=S.isNodeSelected(r,t),d={};l&&(d.width="100%"),c&&(d.height="100%"),d.maxWidth=F(".w-e-text-container").width()+"px";const f=ht("img",{props:{src:o,draggable:!1,"data-href":i},style:d}),p=r.isDisabled();return u&&!p?J2(r,t,f,{width:l,height:c}):K2(r,t,f,{width:l,height:c})}const Y2={type:"image",renderElem:G2},Z2={video:{menuKeys:["viewVideo","delVideo","insertBottom","insertTop"]},text:{menuKeys:["headerSelect","urlKey","bulletedList","|","bold","through","color","bgColor","clearStyle"]},link:{menuKeys:["linkUrlKey","unLink"]},image:{menuKeys:["imgUrlKey","delImage","insertBottom","insertTop"]}};class is{constructor(n){this.type=n,this.title="插入或修改链接",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button"}getValue(){return!1}isActive(){return!1}isDisabled(n){return this.type=="image"||this.type=="link"?!1:!!(n.selection==null||S.getSelectedElems(n).some(i=>{const{type:a}=i;if(n.isVoid(i)||["pre","code","link"].includes(a))return!0}))}exec(n){const r=S.getSelectedNodeByType(n,this.type);let o="";this.type=="image"?o=r.href:this.type=="link"?o=r.url:this.type=="text";const{exec:i=null}=n.getMenuConfig("linkUrlKey");i&&i(o)}}function X2(t){let{src:n,href:r="",style:o={}}=t;const{width:i="",height:a=""}=o;let l="";return i&&(l+=`width: ${i};`),a&&(l+=`height: ${a};`),`<img src="${n}" data-href="${r}" style="${l}"/>`}const Q2={type:"image",elemToHtml:X2};function eb(t){const n=F(t);let r=n.attr("data-href")||"";return r&&(r=decodeURIComponent(r)),{type:"image",src:$fileUrl(n.attr("src"))||"",href:r,style:{width:Bu(n,"width"),height:Bu(n,"height")},children:[{text:""}]}}const tb={selector:"img:not([data-w-e-type])",parseElemHtml:eb},nb={key:"urlKey",factory(){return new is("text")}},rb={key:"linkUrlKey",factory(){return new is("link")}},ob={key:"imgUrlKey",factory(){return new is("image")}};function ib(t){const{isInline:n,isVoid:r,insertNode:o}=t,i=t;return i.isInline=a=>{const{type:l}=a;return l==="image"?!0:n(a)},i.isVoid=a=>{const{type:l}=a;return l==="image"||l==="video"?!0:r(a)},i}const sb={menus:[ob,nb,rb,j2,W2,N2,S2,A2,F2,V2,O2],renderElems:[Y2,$2],parseElemsHtml:[tb,U2],elemsToHtml:[Q2,R2],editorPlugin:ib};Qe.registerModule(sb);const ab={components:{mediaBox:sr,urlBox:Hs},props:{disabled:Boolean,placeholder:{type:String,default:"..."},modelValue:{type:String,default:""}},data(){return{mode:"phone",getFragment:null,editor:null,addFile:null,addUrl:null,fileShow:!1,fileType:"image",urlShow:!1,videoShow:!1,videoNodes:{},url:"",sum:10}},computed:{url2(){return this.url?this.$refs.urlbox.url2str(this.url):""},typeName(){return{video:"视频",audio:"音频",image:"图片",file:"文件"}[this.fileType]}},mounted(){this.init()},methods:{sethtml(t){},init(){const t=this,n={MENU_CONF:{}};n.hoverbarKeys=Z2,n.placeholder=this.placeholder,n.autoFocus=!1,n.onChange=i=>{this.$emit("update:modelValue",i.isEmpty()?"":i.getHtml())},n.onFocus=i=>{},n.MENU_CONF.image={upload(i){t.sum=5,t.fileType="image",t.fileShow=!0,t.addFile=i}},n.MENU_CONF.linkUrlKey={exec:i=>{this.urlShow=!0,setTimeout(()=>{this.url=i},200)}},n.MENU_CONF.video={upload(i){t.sum=1,t.fileType="video",t.fileShow=!0,t.addFile=i},view(i){t.videoNodes=i,t.videoShow=!0}};const r=w2({selector:this.$refs.wangEditor,config:n,html:typeof this.modelValue=="string"?this.modelValue:"",mode:"default"}),o={excludeKeys:["group-more-style","fontSize","fontFamily","insertLink"]};o.insertKeys={index:23,keys:["|","image","video","|","insertBottom","insertTop","delEmpty","|"]},x2({editor:r,selector:this.$refs.wangEditorToolbar,config:o}),this.editor=r},urlChange(t){this.url=t},fnUrlOk(){this.editor.restoreSelection();const t=this.$refs.urlbox.getData();if(S.getSelectedNodeByType(this.editor,"image"))O.setNodes(this.editor,{href:t},{match:r=>S.checkNodeType(r,"image")});else if(S.getSelectedNodeByType(this.editor,"link"))O.setNodes(this.editor,{url:t},{match:o=>S.checkNodeType(o,"link")});else{const o=this.editor.getSelectionText()||t;this.editor.dangerouslyInsertHtml(`<a href='${t}'>${o}</a>`)}this.urlShow=!1},fileOk(){const t=this,n=this.$refs.fileBox.getData();if(n.length==0)return this.$msg.error("请先选择"+this.typeName);n.forEach(function(r){console.log(r);let o=$fileUrl(r);t.addFile(o)}),this.fileShow=!1}}},lb={class:"pos-relative"},cb={class:"bg-black"},ub=["src"],db={class:"dialog-footer"},fb={class:"dialog-footer"},pb={class:"dialog-footer flex justify-end"},hb={class:"pr"},mb={class:"bg-main z-999 b-1 b-solid b-color-[--el-border-color]"},gb={class:"pos-absolute rounded-md overflow-hidden z-9 right-6 top-13 flex items-center *:hover:text-white *:hover:bg-primary *:bg-zinc-100 *:size-8 *:flex *:items-center *:justify-center"},yb={class:"b-0 b-b-1 b-solid b-color-[--el-border-color]",ref:"wangEditorToolbar"};function bb(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("el-dialog"),u=s.resolveComponent("mediaBox"),d=s.resolveComponent("url-box"),f=s.resolveComponent("el-text");return s.openBlock(),s.createElementBlock("div",lb,[s.createVNode(c,{modelValue:i.videoShow,"onUpdate:modelValue":n[1]||(n[1]=p=>i.videoShow=p),title:"播放视频",width:"540px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",db,[s.createVNode(l,{size:"small",onClick:n[0]||(n[0]=p=>i.videoShow=!1)},{default:s.withCtx(()=>[...n[8]||(n[8]=[s.createTextVNode("关闭",-1)])]),_:1})])]),default:s.withCtx(()=>[s.createElementVNode("div",cb,[s.createElementVNode("video",{src:i.videoNodes.src,controls:"",width:"100%",height:"360px"},null,8,ub)])]),_:1},8,["modelValue"]),s.createVNode(c,{modelValue:i.fileShow,"onUpdate:modelValue":n[3]||(n[3]=p=>i.fileShow=p),title:"选择"+a.typeName,width:"1080px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",fb,[s.createVNode(l,{size:"small",onClick:n[2]||(n[2]=p=>i.fileShow=!1)},{default:s.withCtx(()=>[...n[9]||(n[9]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(l,{size:"small",type:"primary",onClick:a.fileOk},{default:s.withCtx(()=>[...n[10]||(n[10]=[s.createTextVNode("确认",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[(s.openBlock(),s.createBlock(u,{ref:"fileBox",type:i.fileType,key:i.fileType,sum:i.sum},null,8,["type","sum"]))]),_:1},8,["modelValue","title"]),s.createVNode(c,{modelValue:i.urlShow,"onUpdate:modelValue":n[5]||(n[5]=p=>i.urlShow=p),title:"选择链接",width:"1080px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",pb,[s.createElementVNode("div",hb,[s.createVNode(f,{size:"small",class:"pr-xs"},{default:s.withCtx(()=>[...n[11]||(n[11]=[s.createTextVNode("当前链接",-1)])]),_:1}),s.createVNode(f,{size:"small",type:"primary"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(a.url2),1)]),_:1})]),s.createVNode(l,{size:"small",onClick:n[4]||(n[4]=p=>i.urlShow=!1)},{default:s.withCtx(()=>[...n[12]||(n[12]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(l,{size:"small",type:"primary",onClick:a.fnUrlOk},{default:s.withCtx(()=>[...n[13]||(n[13]=[s.createTextVNode("确认",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(d,{onChange:a.urlChange,ref:"urlbox"},null,8,["onChange"])]),_:1},8,["modelValue"]),s.createElementVNode("div",mb,[s.createElementVNode("div",gb,[s.createElementVNode("div",{onClick:n[6]||(n[6]=p=>i.mode="pc"),class:s.normalizeClass({"text-primary":i.mode==="pc"})},[...n[14]||(n[14]=[s.createElementVNode("div",{class:"i-mdi-monitor click size-4"},null,-1)])],2),s.createElementVNode("div",{onClick:n[7]||(n[7]=p=>i.mode="phone"),class:s.normalizeClass({"text-primary":i.mode==="phone"})},[...n[15]||(n[15]=[s.createElementVNode("div",{class:"i-mdi-cellphone click text-lg"},null,-1)])],2)]),s.createElementVNode("div",yb,null,512),s.createElementVNode("div",{class:s.normalizeClass(["wangEditor min-h-100",i.mode==="phone"?"*:rounded-md *:w-120 *:mx-auto *:b-1 *:b-solid *:b-color-[--el-border-color]":""]),ref:"wangEditor"},null,2)])])}const Eu=ne(ab,[["render",bb]]),Cb=Object.freeze(Object.defineProperty({__proto__:null,default:Eu},Symbol.toStringTag,{value:"Module"})),vb={name:"a-image-text",emits:["change","update:modelValue"],components:{imgBox:sr},props:{modelValue:{type:[Array,Object],default:[]}},data(){return{imgShow:!1,sum:10,index:-1,list:[]}},created(){Array.isArray(this.modelValue)&&(this.list=this.modelValue),this.$watch("list",function(t){this.$emit("update:modelValue",t),this.$emit("change",t)},{deep:!0})},methods:{getData(){return this.list},addText(){const t=this;this.$prompt(!1,"添加文字",{inputType:"textarea"}).then(n=>{this.list.push({text:n.value}),setTimeout(function(){t.$refs.scrollbar.setScrollTop(9999)},200)})},addImage(){this.sum=10,this.imgShow=!0},editImage(t){this.sum=1,this.index=t,this.imgShow=!0},fnImgsOk(){const t=this,n=this.$refs.imgbox.getData();if(n.length==0)return this.$msg.error("请先选择图片");if(this.sum==1)this.list[this.index].image=n[0];else{for(let r=0;r<n.length;r++)this.list.push({image:n[r]});setTimeout(function(){t.$refs.scrollbar.setScrollTop(9999)},200)}this.imgShow=!1},editText(t){this.$prompt(!1,"修改文字",{inputValue:this.list[t].text,inputType:"textarea"}).then(n=>{this.list[t].text=n.value})}}},Db={class:"dialog-footer"},wb={class:"image-text"},xb={class:"box"},Bb={key:0,class:"no-data"},kb={key:0,class:"item text"},Eb=["onClick"],_b=["onClick"],Ab={key:1,class:"item img"},Nb=["onClick"],Sb=["onClick"],Fb={class:"bottom"};function Vb(t,n,r,o,i,a){const l=s.resolveComponent("img-box"),c=s.resolveComponent("el-button"),u=s.resolveComponent("el-dialog"),d=s.resolveComponent("a-image"),f=s.resolveComponent("a-draggable"),p=s.resolveComponent("el-scrollbar");return s.openBlock(),s.createElementBlock("div",null,[s.createVNode(u,{modelValue:i.imgShow,"onUpdate:modelValue":n[1]||(n[1]=h=>i.imgShow=h),title:"选择图片",width:"1080px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",Db,[s.createVNode(c,{size:"small",onClick:n[0]||(n[0]=h=>i.imgShow=!1)},{default:s.withCtx(()=>[...n[4]||(n[4]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(c,{size:"small",type:"primary",onClick:a.fnImgsOk},{default:s.withCtx(()=>[...n[5]||(n[5]=[s.createTextVNode("确认",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createVNode(l,{type:"image",ref:"imgbox",sum:i.sum,cate:2},null,8,["sum"])]),_:1},8,["modelValue"]),s.createElementVNode("div",wb,[s.createElementVNode("div",xb,[s.createVNode(p,{ref:"scrollbar",height:"100%"},{default:s.withCtx(()=>[i.list.length==0?(s.openBlock(),s.createElementBlock("div",Bb," 点击下方按钮添加图片或者文字 ")):s.createCommentVNode("",!0),s.createVNode(f,{class:"list",list:i.list,filter:".del"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(h,m)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[h.text?(s.openBlock(),s.createElementBlock("div",kb,[s.createElementVNode("p",null,s.toDisplayString(h.text),1),s.createElementVNode("div",{class:"del",onClick:g=>i.list.splice(m,1)}," 删除 ",8,Eb),s.createElementVNode("div",{class:"edit",onClick:g=>a.editText(m)}," 编辑 ",8,_b)])):s.createCommentVNode("",!0),h.image?(s.openBlock(),s.createElementBlock("div",Ab,[s.createVNode(d,{preview:!1,src:h.image,process:"400"},null,8,["src"]),s.createElementVNode("div",{class:"del",onClick:g=>i.list.splice(m,1)}," 删除 ",8,Nb),s.createElementVNode("div",{class:"edit",onClick:g=>a.editImage(m)}," 编辑 ",8,Sb)])):s.createCommentVNode("",!0)],64))),256))]),_:1},8,["list"])]),_:1},512)]),s.createElementVNode("div",Fb,[s.createElementVNode("div",{class:"item",onClick:n[2]||(n[2]=(...h)=>a.addText&&a.addText(...h))},[...n[6]||(n[6]=[s.createElementVNode("i",{class:"i-ri-text"},null,-1),s.createElementVNode("span",null,"文字",-1)])]),s.createElementVNode("div",{class:"item",onClick:n[3]||(n[3]=(...h)=>a.addImage&&a.addImage(...h))},[...n[7]||(n[7]=[s.createElementVNode("i",{class:"i-ri-image-add-line"},null,-1),s.createElementVNode("span",null,"图片",-1)])])])])])}const _u=ne(vb,[["render",Vb],["__scopeId","data-v-a908f232"]]),Ob={props:{modelValue:Array|String|Number,remove:Array|String|Number,url:String|Array,disabled:Boolean,level:{type:Number,default:0},props:{type:Object,default:{}},placeholder:{type:String,default:"选择"}},data(){return{value:[],options:[],_props:{}}},created(){let t;if(this.url){if((this.props.emitPath||this.props.multiple)&&this.modelValue){t=(this.modelValue+"").split(",");for(let n=0;n<t.length;n++)t[n]=this.setNumber(t[n])}else t=this.setNumber(this.modelValue);if(this.value=t,this._props={value:"id",label:"title",checkStrictly:!0,emitPath:!1,...this.props},typeof this.url=="object")return Array.isArray(this.url)&&this.url.forEach(n=>{n.status===0&&(n.disabled=!0)}),this.options=this.composeTree(this.url);$req.post(this.url).then(n=>{n.code==0&&(n.data.constructor===Array&&n.data.forEach(r=>{r?.status===0&&(r.disabled=!0)}),this.options=this.composeTree(n.data))})}},methods:{setNumber(t){var n=/^\d+(\.\d+)?$/;return n.test(t)?Number(t):t},change(t){t&&t.constructor==Array?t=Array.from(new Set([].concat(...t))):t=t||0,this.$emit("update:modelValue",t),this._props.checkStrictly&&!this._props.multiple&&this.$refs.cascader.togglePopperVisible()},composeTree(t=[]){const n=[],r=this.remove,o=JSON.parse(JSON.stringify(t));if(t?.length&&typeof t[0]=="string")return t.forEach((l,c)=>{n.push({title:l,id:c})}),n;if(t&&t.constructor==Object){for(let l in t)n.push({title:t[l],id:l});return n}const i=function(l,c=1){return l==0?0:(o.forEach(u=>{u.id==l&&u.pid!=0&&i(u.pid,c++)}),c+1)};if(!Array.isArray(t))return n;const a={};return o.forEach(l=>{a[l.id]=l}),o.forEach(l=>{if((l.id==r||r instanceof Array&&r.indexOf(l.id)>-1||l.pid==r)&&r&&(l.disabled=!0),this.level==0||i(l.pid)<=this.level){const c=a[l.pid];c?(c.children||(c.children=[])).push(l):n.push(l)}}),n}}};function Tb(t,n,r,o,i,a){const l=s.resolveComponent("el-cascader");return r.url?(s.openBlock(),s.createBlock(l,{key:0,"validate-event":!1,ref:"cascader",modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=c=>i.value=c),options:i.options,clearable:!0,"collapse-tags":!0,"show-all-levels":!1,onChange:a.change,maxCollapseTags:i._props.maxCollapseTags||1,props:i._props,disabled:r.disabled,placeholder:r.placeholder,class:"w-full"},null,8,["modelValue","options","onChange","maxCollapseTags","props","disabled","placeholder"])):s.createCommentVNode("",!0)}const Au=ne(Ob,[["render",Tb]]),jb={props:{modelValue:Array|String,add:{type:String,default:"添加"}},data(){return{tags:[]}},created(){Array.isArray(this.modelValue)&&(this.tags=this.modelValue)},methods:{fnEdit(t){const n=this.tags[t];$prompt(!1,"修改",{inputValue:n}).then(r=>{r.value!=n&&r.value&&(this.tags[t]=r.value)})},fnAdd(){$prompt(!1,"添加",{}).then(t=>{t.value&&t.value&&(this.tags.push(t.value),this.$emit("update:modelValue",this.tags))}).catch(()=>{})},fnClose(t){console.log(t),this.tags.splice(t,1),this.tags.length==0?this.$emit("update:modelValue",""):this.$emit("update:modelValue",this.tags)}}};function Pb(t,n,r,o,i,a){const l=s.resolveComponent("el-tag"),c=s.resolveComponent("el-button"),u=s.resolveComponent("a-draggable");return i.tags?(s.openBlock(),s.createBlock(u,{key:0,class:"flex flex-wrap gap-10px",list:i.tags,filter:".add"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.tags,(d,f)=>(s.openBlock(),s.createBlock(l,{key:d,closable:"","disable-transitions":!1,onClose:()=>{a.fnClose(f)},onClick:s.withModifiers(p=>a.fnEdit(f),["stop"]),title:"点击修改"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(d),1)]),_:2},1032,["onClose","onClick"]))),128)),s.createVNode(c,{class:"add",size:"small",onClick:a.fnAdd},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(r.add),1)]),_:1},8,["onClick"])]),_:1},8,["list"])):s.createCommentVNode("",!0)}const Nu=ne(jb,[["render",Pb]]),Lb={name:"a-color-picker",props:{modelValue:String,tabindex:{type:[Number,String],default:0},colorFormat:{type:String,default:"rgb"},size:{type:String,default:"default"},showAlpha:{type:[Boolean,String,Number],default:!0},colors:{type:Array,default:["#ffffff","#409EFF","#F56C6C","#E6A23C","#ffd700","#67C23A","#00ced1","#9254de","#000000","#303133","#666666","#909399","#C0C4CC","#DCDFE6","#E4E7ED","#EBEEF5","#F2F6FC"]}},data(){return{value:"",showAlpha_:!0}},created(){this.showAlpha==0?this.showAlpha_=!1:this.showAlpha_=!!this.showAlpha,this.modelValue&&(this.value=this.modelValue)},methods:{show(){this.$refs.colorPicker.show()},change(t){this.$emit("update:modelValue",t)}}},Mb={class:"a-color-picker input-button w-full flex bg-main"};function zb(t,n,r,o,i,a){const l=s.resolveComponent("el-input"),c=s.resolveComponent("el-color-picker");return s.openBlock(),s.createElementBlock("div",Mb,[s.createVNode(l,{readonly:"",size:r.size,modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=u=>i.value=u),placeholder:"点击右侧选择颜色"},{prefix:s.withCtx(()=>[...n[2]||(n[2]=[s.createElementVNode("div",{class:"color-icon"},[s.createElementVNode("i",{class:"i-ri-palette-line",style:{color:"#D9D9D9"}})],-1)])]),_:1},8,["size","modelValue"]),s.createElementVNode("div",null,[s.createVNode(c,{"color-format":r.colorFormat,ref:"colorPicker",tabindex:r.tabindex,onChange:a.change,modelValue:i.value,"onUpdate:modelValue":n[1]||(n[1]=u=>i.value=u),"show-alpha":i.showAlpha_,predefine:r.colors},null,8,["color-format","tabindex","onChange","modelValue","show-alpha","predefine"])])])}const Su=ne(Lb,[["render",zb]]),$b={},Ib={props:{zoom:{type:Number,default:15},mode:{type:String,default:""},search:String|Array,modelValue:String|Array},data(){return{map:{},point:[],show:!1,city:0,value:""}},created(){console.log("created"),this.modelValue&&typeof this.modelValue=="string"?this.value=this.modelValue.split(","):this.value=this.modelValue},mounted(){this.mode&&setTimeout(()=>{this.init()},100)},methods:{add(){const t=this;this.show=!0,setTimeout(()=>{t.init()},100)},init(){console.log("init");const t=this;this.map=new BMap.Map("container"),this.map.addEventListener("click",function(n){let r=n.point.lng.toFixed(6),o=n.point.lat.toFixed(6);t.point=[r,o],t.map.clearOverlays();let i=new BMap.Point(r,o);t.map.addOverlay(new BMap.Marker(i)),t.mode&&t.getData()}),this.map.addControl(new BMap.NavigationControl),this.map.addControl(new BMap.ScaleControl),this.map.addControl(new BMap.OverviewMapControl),this.map.enableScrollWheelZoom(!0),this.setMap(this.value)},clear(){this.$emit("update:modelValue","")},getData(){this.show=!1,this.value=this.point,this.$emit("update:modelValue",this.point.join(","))},setMap(t){if(t?.length===0&&(t=""),typeof t=="object"&&t?.length==2){const n=new BMap.Point(t[0],t[1]);this.map.clearOverlays(),this.map.addOverlay(new BMap.Marker(n)),this.map.centerAndZoom(n,this.zoom)}else this.map.centerAndZoom(new BMap.Point(116.41667,39.91667),7)},change(t,n){if(console.log(t,n),t?.length===0)return;let r="";t.length==1||t[0].indexOf("市")>-1?r=t[0]:r=t[1],r.endsWith("市")&&(r=r.slice(0,-1));let o=$b[r];o&&this.setMap(o)}}},Rb={class:"map"},Hb={class:"input"},Ub={class:"dialog-footer"},Wb={key:1,class:"map"},qb={class:"input text-center bg-main"},Kb={key:2,class:"input-button"};function Jb(t,n,r,o,i,a){const l=s.resolveComponent("a-region-picker"),c=s.resolveComponent("el-button"),u=s.resolveComponent("el-dialog"),d=s.resolveComponent("el-input");return s.openBlock(),s.createElementBlock("div",null,[r.mode?(s.openBlock(),s.createElementBlock("div",Wb,[s.createElementVNode("div",qb,s.toDisplayString(r.modelValue),1),n[7]||(n[7]=s.createElementVNode("div",{id:"container"},null,-1))])):(s.openBlock(),s.createBlock(u,{key:0,modelValue:i.show,"onUpdate:modelValue":n[2]||(n[2]=f=>i.show=f),title:"选择地点",width:"1080px",top:"5vh"},{footer:s.withCtx(()=>[s.createElementVNode("span",Ub,[s.createVNode(c,{onClick:n[1]||(n[1]=f=>i.show=!1)},{default:s.withCtx(()=>[...n[5]||(n[5]=[s.createTextVNode("取消",-1)])]),_:1}),s.createVNode(c,{type:"primary",onClick:a.getData},{default:s.withCtx(()=>[...n[6]||(n[6]=[s.createTextVNode("确认",-1)])]),_:1},8,["onClick"])])]),default:s.withCtx(()=>[s.createElementVNode("div",Rb,[s.createElementVNode("div",Hb,[s.createVNode(l,{level:2,onChange:a.change,placeholder:"按城市查找",modelValue:i.city,"onUpdate:modelValue":n[0]||(n[0]=f=>i.city=f)},null,8,["onChange","modelValue"])]),n[4]||(n[4]=s.createElementVNode("div",{id:"container"},null,-1))])]),_:1},8,["modelValue"])),r.mode?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",Kb,[s.createVNode(d,{modelValue:i.value,"onUpdate:modelValue":n[3]||(n[3]=f=>i.value=f),onClear:a.clear,clearable:"",placeholder:"选择坐标"},{prefix:s.withCtx(()=>[...n[8]||(n[8]=[s.createElementVNode("div",null,[s.createElementVNode("i",{class:"i-ri-map-pin-line op-70"})],-1)])]),_:1},8,["modelValue","onClear"]),s.createVNode(c,{style:{"margin-left":"-2px"},type:"primary",onClick:a.add},{default:s.withCtx(()=>[...n[9]||(n[9]=[s.createTextVNode("选择坐标",-1)])]),_:1},8,["onClick"])]))])}const ss=ne(Ib,[["render",Jb],["__scopeId","data-v-25afa672"]]),as=globalThis.dmxRegions??[],Gb={emits:["change","update:modelValue"],props:{disabled:Boolean,modelValue:Array|String|Number,checkStrictly:Boolean,placeholder:String,level:Boolean|String},data(){return{value:"",props:{emitPath:!1,checkStrictly:!!this.checkStrictly,children:"s",label:"n",value:"c"},region:as}},created(){this.modelValue&&typeof this.modelValue=="string"?this.value=this.modelValue*1:this.value=this.modelValue,this.level==2?this.region=this.setList(2):this.level==1?this.region=this.setList(1):this.region=as},methods:{setList(t){let n=[];return as.forEach(r=>{t===1?n.push({n:r.n,c:r.c}):r.s?n.push({n:r.n,c:r.c,s:r.s.map(o=>({n:o.n,c:o.c}))}):n.push({n:r.n,c:r.c,s:r.s})}),n},change(t){const n=this.$refs.cascader.getCheckedNodes()?.[0]?.pathLabels;this.$emit("update:modelValue",t),n&&this.$emit("change",n,t)}}};function Yb(t,n,r,o,i,a){const l=s.resolveComponent("el-cascader");return s.openBlock(),s.createElementBlock("div",null,[s.createVNode(l,{ref:"cascader",modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=c=>i.value=c),onChange:a.change,options:i.region,props:i.props,disabled:r.disabled,clearable:"",placeholder:r.placeholder||"选择"},null,8,["modelValue","onChange","options","props","disabled","placeholder"])])}const Fu=ne(Gb,[["render",Yb]]),ls=t=>t?Array.isArray(t)?typeof t[0]=="object"?t:t.map((n,r)=>({label:n,value:r})):typeof t=="object"?Object.keys(t).map(n=>({label:t[n],value:n})):[]:[],Zb={props:{node:Object,modelValue:void 0,size:""},render(){const{slot:t,row:n,index:r,value:o,oldData:i}=this.node;return t({row:n,index:r,value:o,oldData:i})},renderError(t,n){return t("pre",{style:{color:"red"}},n.stack)}},ao=t=>s.defineAsyncComponent(t),Xb=ao(()=>Promise.resolve().then(()=>nD)),Qb=ao(()=>Promise.resolve().then(()=>fD)),eC=ao(()=>Promise.resolve().then(()=>vD)),tC=ao(()=>Promise.resolve().then(()=>VD)),Jt={media:pm,slot:Zb,"input-select":gp,"group-tabs-plus":Xb,"group-tabs":Qb,"group-table":eC,group:tC,md5:Dm,file:bm,"search-box":Us,"input-auto":Dp},Vu={input:{component:we.ElInput,props:(t,n)=>({type:"text",autocomplete:"off",readonly:t.readonly,clearable:t.clearable??!0,placeholder:t.placeholder||"输入"}),slots:t=>({prepend:t.pre?t.pre:null,append:t.unit?t.unit:null})},select:{component:we.ElSelect,props:(t,n)=>({placeholder:t.placeholder||"请选择"}),children:(t,n)=>n.selectCols.map(r=>({component:s.markRaw(we.ElOption),props:{label:r.label,value:r.value}}))},radio:{component:we.ElRadioGroup,props:(t,n)=>({}),children:(t,n)=>n.radioCols.map(r=>({component:s.markRaw(we.ElRadio),props:{value:r.value},children:r.label}))},"radio-button":{component:we.ElRadioGroup,props:(t,n)=>({}),children:(t,n)=>n.radioCols.map(r=>({component:s.markRaw(we.ElRadioButton),props:{value:r.value},children:r.label}))},checkbox:{component:we.ElCheckboxGroup,props:(t,n)=>({}),children:(t,n)=>n.checkboxCols.map(r=>({component:s.markRaw(we.ElCheckbox),props:{value:r.value},children:r.label}))},imgs:{component:Rs,props:(t,n)=>({limit:t.limit,cateId:t.cateId,tips:t.tips})},images:{component:Rs,props:(t,n)=>({limit:t.limit,"cate-id":t.cateId,tips:t.tips})},editor:{component:Eu,props:t=>({placeholder:t.placeholder})},"image-text":{component:_u,props:()=>({})},selects:{component:Au,props:(t,n)=>({placeholder:t.placeholder,url:t.url,remove:t.remove,level:t.level||0})},tags:{component:Nu,props:()=>({})},color:{component:Su,props:(t,n)=>({showAlpha:t.showAlpha,colorFormat:t.colorFormat})},map:{component:ss},pickerMap:{component:ss},region:{component:Fu,props:(t,n)=>({checkStrictly:t.checkStrictly,level:t.level})},url:{component:nm,props:()=>({})},time:{component:we.ElTimePicker,props:(t,n)=>({format:t.format||"HH:mm:ss",valueFormat:t.valueFormat||"HH:mm:ss",placeholder:"选择时间"})},times:{component:we.ElTimePicker,props:(t,n)=>({"start-placeholder":"开始时间","end-placeholder":"结束时间",format:"HH:mm:ss","value-format":"HH:mm:ss","is-range":!0,"range-separator":"~"})},date:{component:we.ElDatePicker,props:(t,n)=>({type:"date",placeholder:"选择日期","value-format":"YYYY-MM-DD"})},dates:{component:we.ElDatePicker,props:(t,n)=>({"start-placeholder":"开始日期","end-placeholder":"结束日期",type:"daterange","range-separator":"~",format:"YYYY-MM-DD","value-format":"X"})},datetime:{component:we.ElDatePicker,props:(t,n)=>({type:"datetime",placeholder:"选择时间",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss"})},datetimes:{component:we.ElDatePicker,props:(t,n)=>({"start-placeholder":"开始时间","end-placeholder":"结束时间",type:"datetimerange","range-separator":"~",format:t.format||"YYYY-MM-DD HH:mm:ss","value-format":"x"})},switch:{component:we.ElSwitch,props:(t,n)=>({"active-value":1,"inactive-value":0,"active-text":"是","inactive-text":"否","inline-prompt":!0})},slider:{component:we.ElSlider,props:(t,n)=>({size:"small",marks:t.marks,"show-input":t.showInput,min:t.min||0,max:t.max||100})},textarea:{component:we.ElInput,props:(t,n)=>({type:"textarea",autosize:{minRows:t.rows??1},maxlength:t.maxlength,"show-word-limit":!!t.maxlength,autocomplete:"off",placeholder:t.placeholder})},number:{component:we.ElInputNumber,props:(t,n)=>({style:"width: 120px",min:t.min||0,max:t.max,controls:t.controls??!0,placeholder:t.placeholder??"输入数字","controls-position":t.position??"right"})},password:{component:we.ElInput,props:(t,n)=>({type:"password",autocomplete:"off","show-password":!0,placeholder:t.placeholder||"输入密码"})},"input-button":{component:Vo,props:(t,n)=>({btn:t.btn,readonly:t.readonly,placeholder:t.placeholder,icon:t.icon})}},nC=(t,n)=>{const{init:r}=n;switch(t){case"slot":return{component:Jt.slot,props:{node:{slot:r.slot,index:n.index,value:n.value,row:n.row,oldData:n.oldData}}};case"media":return{component:Jt.media,props:{type:r.type==="img"?"image":r.type,limit:r.limit,cate:r.cate}};case"component":return{component:typeof r.component=="string"?n.components?.[r.component]:r.component,props:{init:r,formData:n.row,data:n.oldData}};case"search-box":return{component:Jt["search-box"],props:{init:r.init,data:n.oldData,onChange:n.joinChange}};case"input-auto":return{component:Jt["input-auto"],props:{list:r.list||[]}};case"input-select":return{component:Jt["input-select"],props:{options:r.options,group:r.group}};case"file":return{component:Jt.file,props:{isSystem:r.isSystem,url:r.url,filename:r.filename,accept:r.accept}};case"md5":return{component:Jt.md5,props:{length:r.length,type:r.md5type}};case"group-tabs":case"group-tabs-plus":case"group-table":case"group":return{component:Jt[t],props:{init:n.prop}};default:return null}},rC=s.defineComponent({name:"form-item",emits:["change","update:modelValue"],props:{index:Number,cols:Array,clearable:{type:Boolean,default:!0},size:{type:String,default:"default"},modelValue:[String,Object,Number,Array,Boolean,Function],join:Object,disabled:Boolean,row:{type:Object,default:()=>({})},oldData:{type:Object,default:()=>({})},prop:{type:[Object,Function],default:()=>({})}},setup(t,{emit:n}){const r=s.ref(null),o=s.ref(null),i=s.computed(()=>{let g=t.prop;const y=$config?.inputs?.shortcuts?.[g.type];return y?{...y,...g,type:y.type}:g}),a=s.computed(()=>i.value.size??t.size??"default");s.computed(()=>t.disabled!==void 0?t.disabled:typeof i.value.disabled=="function"?i.value.disabled(t.modelValue,t.row):!!i.value.disabled);const l=s.computed(()=>i.value.url?i.value.url?.map?.(g=>({label:g.title,value:g.id})):ls(i.value.cols)),c=s.computed(()=>i.value.cols?ls(i.value.cols):[{label:"是",value:!0},{label:"否",value:!1}]),u=s.computed(()=>ls(i.value.cols)),d=()=>{const g=i.value;return typeof g.slot=="function"?"slot":["image","img","video","audio"].includes(g.type)?"media":g.component?"component":g.type||"input"};console.log(i.value.disabled);const f=i.value.disabled,p=()=>{const g=i.value,{modelValue:y}=t;switch(g.type){case"switch":g.props?.activeValue===!0?r.value=!!y||!1:r.value=Number(y)||0;break;case"radio":r.value=y;break;case"checkbox":y&&typeof y=="string"&&y.includes(",")?r.value=y.split(","):y?r.value=y:r.value=[];break;default:(y||y===0)&&(r.value=y);break}},h=()=>{const g=d(),y={init:i.value,value:r.value,row:t.row,oldData:t.oldData,prop:t.prop,index:t.index,selectCols:l.value,radioCols:c.value,checkboxCols:u.value,components:$config?.inputs?.components,joinChange:m},v=nC(g,y);if(v){o.value={...v,component:s.markRaw(v.component)};return}const D=Vu[g]||Vu.input;D&&(o.value={component:s.markRaw(D.component),props:D.props?D.props(i.value,y):{},slots:D.slots?D.slots(i.value,y):null,children:D.children?D.children(i.value,y):null})},m=g=>{typeof i.value.format=="function"&&(g=i.value.format(g)),console.log("joinChange"),n("update:modelValue",g)};return s.onMounted(()=>{p(),h(),s.watch(r,g=>{let y=g;o.value.props.onChange||(typeof i.value.format=="function"&&(y=i.value.format(g)),n("update:modelValue",y))},{deep:!0})}),{size:a,internalValue:r,disabled:f,currentComponent:o}}}),oC={class:"dmx-input-item"};function iC(t,n,r,o,i,a){return s.openBlock(),s.createElementBlock("div",oC,[t.currentComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(t.currentComponent.component),s.mergeProps({key:0,modelValue:t.internalValue,"onUpdate:modelValue":n[0]||(n[0]=l=>t.internalValue=l),size:t.size,disabled:t.disabled},{...t.currentComponent.props,...t.prop.props||{}}),s.createSlots({default:s.withCtx(()=>[t.currentComponent.children?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(t.currentComponent.children,(l,c)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(l.component),s.mergeProps({key:c},{ref_for:!0},l.props),{default:s.withCtx(()=>[l.children?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(l.children),1)],64)):s.createCommentVNode("",!0)]),_:2},1040))),128)):s.createCommentVNode("",!0)]),_:2},[t.currentComponent.slots?.prepend?{name:"prepend",fn:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(t.currentComponent.slots.prepend),1)]),key:"0"}:void 0,t.currentComponent.slots?.append?{name:"append",fn:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(t.currentComponent.slots.append),1)]),key:"1"}:void 0]),1040,["modelValue","size","disabled"])):s.createCommentVNode("",!0)])}const cs=ne(rC,[["render",iC]]),lo=Object.freeze(Object.defineProperty({__proto__:null,default:cs},Symbol.toStringTag,{value:"Module"})),Ou=t=>{const n={};for(const r in t){const o=t[r];r.indexOf(".")>-1?dn(n,r,o):n[r]=o}return n},sC={name:"admin-form",components:{inputItem:cs,imgInfo:Ls},emits:["submit","change","end"],props:{init:{type:Object,default:()=>({})},size:String,disabled:Boolean,data:{type:Object,default:()=>({})},asyncData:Function|String|Object,showButton:{type:Boolean,default:!0},beforeSubmit:{type:Function,default:()=>!0},afterSubmit:{type:Function,default:()=>!0}},data(){return{_disabled:!1,width:"720px",gloKey:0,rules:{},loading:!0,tabsIndex:0,cols:[],colsHide:{},confirmButton:{},editData:{},change:{},hidden:{},linkages:{},rawData:{}}},created(){this.initializeForm()},methods:{initializeForm(){if(!this.init?.cols)return;this.setInitialValues(),this.processColumns();const t=this.asyncData||this.init.asyncData;t&&t.constructor===Function?t(this.setData):t&&t.constructor===Object?this.urlData(t):this.setData(this.init.data??this.data)},setInitialValues(){this.init?.tabs&&(this.tabsIndex=Object.keys(this.init.tabs)[0]),this.init.hidden&&typeof this.init.hidden=="object"&&(this.hidden=JSON.parse(JSON.stringify(this.init.hidden))),(this.init.disabled||this.disabled)&&(this._disabled=!0),this.init.width&&(this.width=this.init.width),this.init.confirmButton===!1?this.confirmButton=!1:this.init.confirmButton?this.confirmButton=this.init.confirmButton:this.confirmButton={text:this.init.buttonText??$config?.form?.btnText??"提交",disabled:!1}},processColumns(){this.init.cols.forEach(async(t,n)=>{if(typeof t=="function"&&(this.init.cols[n]=t=t(this.data)),typeof t.change=="function"&&Array.isArray(t.changeField)&&(this.linkages[t.field]=t),t.slot&&typeof t.slot!="function"){let r=typeof t.slot=="string"?t.slot:"cols."+t.field;this.$slots[r]&&(t.slot=this.$slots[r])}t.type=="selects"&&t.remove=="$row.id"&&(t.remove2={remove:this.data.id}),this.init.size&&!t.size&&(t.size=this.init.size),t.label!==void 0&&(t.title=t.label),t.component&&(t.component=s.markRaw(t.component))}),this.cols=this.init.cols},async btnAction(t){let n="";if(t.confirm===!0?n="确定要执行"+t.title+"操作?":t.confirm&&(n=t.confirm),!(n&&await $confirm(n)!="confirm")){if(!t.action)return $msg.error("action 未定义");t.action({...this.hidden,...this.editData},t)}},isIntersection(t,n){return typeof t!="object"||typeof n!="object"?0:t.filter(r=>n.some(o=>o===r))?.length},linkage(t,n=null){let r={};typeof t=="object"?r=t:r={[t]:n};for(const o in this.linkages)if(Object.hasOwnProperty.call(this.linkages,o)){const i=this.linkages[o];(o!=t&&(!i.changeField||i.changeField?.indexOf(t)>-1)||this.isIntersection(i.changeField,Object.keys(r)))&&i.change({data:r,form:this,input:this.$refs.inputItem?.filter(a=>a.prop.field===o)[0]})}},onChange(t,n){if(typeof t=="object"&&t?.__join){n=t.field,t=t.data;const r=this.cols.findIndex(o=>o.field===n);this.$refs.inputItem&&this.$refs.inputItem[r]&&(this.$refs.inputItem[r].value=t)}this.editData[n]=t,t!=this.rawData[n]?this.change[n]=t:delete this.change[n],Object.keys(this.linkages)?.length&&this.linkage(n,t),this.$emit("change",{[n]:t},this)},tabsChange(t){this.tabsIndex=t.paneName},setValue(t,n=!0){this.editData={...this.editData,...t},n&&this.gloKey++},hideField(t,n=!0){if(typeof t=="object")for(var r=0;r<t.length;r++)this.colsHide[t[r]]=n;else this.colsHide[t]=n},editCols(t,n){this.cols.forEach((r,o)=>{r.field==t&&(this.cols[o]={...r,...n})})},newData(){this.$req.removeCache(this.asyncData?.url),this.urlData(this.asyncData,!0)},urlData(t,n=!1){const r=this;let o={};t?.where?.constructor===Function?o=t.where(this.data):t?.where&&(o=t.where),$req.post(t.url,o,!1,t.cache||!1).then(function(i){i.code==0?(i.cache?r.$root.reload=r.newData:r.$root.reload=!1,n&&r.$msg.success("刷新成功"),r.setData(i.data)):r.$msg.error(i.msg)}).catch(i=>{console.error("Error fetching form data:",i),r.$msg.error("获取表单数据失败")})},setData(t,n=!1){this.rawData=t;let r={},o={};this.init.fields&&this.init.fields.forEach(i=>{r[i]=t[i],this.change[i]=t[i]}),this.cols.forEach(i=>{(i.hidden===!0||i.hidden==1||i.hidden?.(t[i.field],t))&&(this.colsHide[i.field]=!0),i.required?(o[i.field]=[{required:!0,message:`${i.title}不能为空`}],i.rules&&(i.rules.constructor===Array?o[i.field]=[...o[i.field],...i.rules]:i.rules.constructor===Object&&(o[i.field]=[...o[i.field],i.rules]))):i.rules&&(o[i.field]=i.rules);const a=Yt(t,i.field);typeof a<"u"&&a!==null&&i.type!="text"&&i.type!="hidden"?typeof i.format=="function"?r[i.field]=i.format(a):r[i.field]=JSON.parse(JSON.stringify(a)):i.type=="hidden"?this.hidden[i.field]=a??i.value:i.type!="text"&&(r[i.field]=(i.format?i.format(i.value):i.value)??"",i.value&&(this.change[i.field]=i.value)),r[i.field]||(["number","switch","slider"].indexOf(i.type)>-1?r[i.field]=0:["group","group-table","checkbox","image-text","times","datetimes","dates"].indexOf(i.type)>-1&&(i.type.indexOf("group")===-1||i.limit>1)&&(r[i.field]=[]))}),this.editData=r,this.rules=o,this.loading=!1,n&&this.gloKey++,this.$nextTick(()=>{this.linkage(t),this.$emit("end",this.getData(),this)})},getData(){return Ou({...this.hidden,...this.editData})},resetForm(){this.$refs.form&&this.$refs.form.resetFields()},doSubmit(t=!1){if(!this.init.url)return $msg.warning("url 未定义");t||(t=this.change);const n=Ou({...this.hidden,...t});if(typeof this.init.url=="function")return this.init.url(n);$req.post(this.init.url,n,this.init.loading||"提交中").then(r=>{this.$emit("submit",{data:n,res:r}),r.code==0?(this.asyncData?.cache&&$req.removeCache(this.asyncData.url),$msg.success(r.msg)):$msg.error(r.msg)}).catch(r=>{console.error("Error submitting form:",r),$msg.error("提交失败")})},fnSubmit(){if(Object.keys(this.change).length===0&&this.init.noChangeTip!==!1)return this.$msg.info("表单数据没有变化");this.$refs.form?.validate((t,n)=>{if(t){const r=this.beforeSubmit(this.init.noChangeTip===!1?this.editData:this.change,this.doSubmit);typeof r=="object"?this.doSubmit(r):r!==!1&&this.doSubmit(this.init.noChangeTip===!1?this.editData:!1)}else if(n){const r=Object.keys(n)[0];r&&n[r][0]&&$msg.error(n[r][0].message)}})}}},aC={key:0},lC=["innerHTML"];function cC(t,n,r,o,i,a){const l=s.resolveComponent("el-tab-pane"),c=s.resolveComponent("el-tabs"),u=s.resolveComponent("img-info"),d=s.resolveComponent("input-item"),f=s.resolveComponent("el-form-item"),p=s.resolveComponent("el-button"),h=s.resolveComponent("el-form");return s.openBlock(),s.createElementBlock("div",{class:"admin-form",style:s.normalizeStyle({"margin-bottom":r.init.buttonFixed?"42px":0,...r.init.style||{}})},[r.init.tabs?(s.openBlock(),s.createBlock(s.Teleport,{key:0,defer:"",disabled:r.init.title!=="tabs",to:"#table-form-header"},[s.createVNode(c,{class:"admin-form-tabs",onTabClick:a.tabsChange,modelValue:i.tabsIndex,"onUpdate:modelValue":n[0]||(n[0]=m=>i.tabsIndex=m)},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.init.tabs,(m,g)=>(s.openBlock(),s.createBlock(l,{name:g+"",label:m},null,8,["name","label"]))),256))]),_:1},8,["onTabClick","modelValue"])],8,["disabled"])):s.createCommentVNode("",!0),s.createVNode(h,{class:s.normalizeClass(["flex flex-wrap",{"admin-form__disabled":i._disabled}]),disabled:i._disabled,style:s.normalizeStyle("width:"+i.width),"label-position":r.init.labelPosition??"right",ref:"form","label-width":r.init.labelWidth||120,model:i.editData,rules:i.rules,size:r.size},{default:s.withCtx(()=>[i.loading?s.createCommentVNode("",!0):(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(i.cols,(m,g)=>(s.openBlock(),s.createElementBlock("div",{key:m.field,style:s.normalizeStyle({width:m.colWidth??i.width??"100%"})},[m.type!=="hidden"?s.withDirectives((s.openBlock(),s.createBlock(f,{required:m.required,label:m.title===!1?"":m.title+":","label-width":m.labelWidth??(m.title===!1?"0px":void 0),prop:m.field,style:{width:"100%"},key:i.gloKey},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex w-full",r.init.infoAlign=="right"?"items-center":"flex-col"])},[s.createElementVNode("div",{class:s.normalizeClass(["input",m.class])},[m.type=="text"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[m.textType=="user"?(s.openBlock(),s.createElementBlock("div",aC,[s.createVNode(u,{init:{error:"用户不存在",imgName:"user_header",titleName:"user_name"},data:i.rawData[m.field]},null,8,["data"])])):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(m.class?"":"text-color-primary")},s.toDisplayString(i.rawData[m.field]??m.value),3))],64)):(s.openBlock(),s.createBlock(d,{key:1,size:r.size??m.size,ref_for:!0,ref:"inputItem",disabled:r.disabled,clearable:r.init.clearable,rawData:i.rawData,row:i.editData,index:g,cols:i.cols,style:s.normalizeStyle(m.width?"width:"+m.width:""),modelValue:i.editData[m.field],prop:{...m,...m.remove2},"onUpdate:modelValue":y=>a.onChange(y,m.field)},null,8,["size","disabled","clearable","rawData","row","index","cols","style","modelValue","prop","onUpdate:modelValue"]))],2),m.info?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["text-sm flex op-70 gap-1",r.init.infoAlign=="right"?"pl-xs items-start":"pt-xs items-center"])},[n[1]||(n[1]=s.createElementVNode("i",{class:"i-ri-error-warning-line"},null,-1)),s.createElementVNode("div",{innerHTML:m.info},null,8,lC)],2)):s.createCommentVNode("",!0)],2)]),_:2},1032,["required","label","label-width","prop"])),[[s.vShow,!i.colsHide[m.field]&&(!r.init.tabs||!m.tab&&i.tabsIndex==0||m.tab==i.tabsIndex||typeof m.tab=="object"&&m.tab?.map(y=>y+"")?.indexOf?.(i.tabsIndex)>-1)]]):s.createCommentVNode("",!0)],4))),128)),r.showButton?(s.openBlock(),s.createBlock(f,{key:1,class:s.normalizeClass(["info-hide",{"form-btn":r.init.buttonFixed}])},{default:s.withCtx(()=>[i.loading?(s.openBlock(),s.createBlock(p,{key:0,loading:i.loading,type:"primary"},{default:s.withCtx(()=>[...n[2]||(n[2]=[s.createTextVNode("loading",-1)])]),_:1},8,["loading"])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[i.confirmButton?(s.openBlock(),s.createBlock(p,{key:0,disabled:i.confirmButton.disabled,type:"primary",onClick:a.fnSubmit},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.confirmButton.text),1)]),_:1},8,["disabled","onClick"])):s.createCommentVNode("",!0),r.init.resetButton?(s.openBlock(),s.createBlock(p,{key:1,onClick:a.resetForm},{default:s.withCtx(()=>[...n[3]||(n[3]=[s.createTextVNode("重置",-1)])]),_:1},8,["onClick"])):s.createCommentVNode("",!0),r.init.btns?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:2},s.renderList(r.init.btns,m=>(s.openBlock(),s.createBlock(p,{loading:i.loading,type:m.type?m.type:"primary",onClick:g=>a.btnAction(m)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(m.title),1)]),_:2},1032,["loading","type","onClick"]))),256)):s.createCommentVNode("",!0)],64))]),_:1},8,["class"])):s.createCommentVNode("",!0)]),_:1},8,["disabled","class","style","label-position","label-width","model","rules","size"])],4)}const uC=ne(sC,[["render",cC]]),dC={name:"data-api",props:{init:{type:Object}},data(){return{data:!1,empty:!1,loading:!1}},created(){this.getData()},methods:{onChange(t=null){this.getData(t)},async getData(t=null){this.loading=!0;const n=this.init;let r={};t?r=t:r=n.where;const o=await this.$req.post(n.url,r,n.cache||0);console.log(o),this.loading=!1,o.code==0?(this.data=o.data,n.back&&n.back(o)):n.empty!==!1&&(this.empty=n.empty||o?.msg||"加载失败")}}},fC={key:1},pC={key:2},hC={class:"op-70"};function mC(t,n,r,o,i,a){const l=s.resolveComponent("el-skeleton");return i.data?s.renderSlot(t.$slots,"default",{key:0,data:i.data}):i.loading?(s.openBlock(),s.createElementBlock("div",fC,[s.renderSlot(t.$slots,"loading",{},()=>[s.createVNode(l,{rows:2,animated:""})])])):i.empty?(s.openBlock(),s.createElementBlock("div",pC,[s.renderSlot(t.$slots,"error",{},()=>[s.createElementVNode("div",{class:"text-center flex col-center justify-center w-full",onClick:n[0]||(n[0]=c=>a.getData())},[s.createElementVNode("span",hC,s.toDisplayString(i.empty),1),n[1]||(n[1]=s.createTextVNode()),n[2]||(n[2]=s.createElementVNode("span",{class:"pl color-primary click"},"重试",-1))])])])):s.createCommentVNode("",!0)}const gC=ne(dC,[["render",mC]]),yC={props:{title:{type:String,default:"提示"},type:{type:String,default:"primary"}},data(){return{value:"",show:!1}},methods:{}},bC={class:"font-weight mb line-height"},CC={class:"text-color-primary"};function vC(t,n,r,o,i,a){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["a-tip","a-tip--"+r.type])},[s.createElementVNode("div",bC,[n[0]||(n[0]=s.createElementVNode("i",{class:"i-ri-information-line pr-xs"},null,-1)),s.createTextVNode(s.toDisplayString(r.title),1)]),s.createElementVNode("div",CC,[s.renderSlot(t.$slots,"default",{},void 0,!0)])],2)}const DC=ne(yC,[["render",vC],["__scopeId","data-v-b6ef9e08"]]),wC={name:"text-edit",props:{clickType:{type:String,default:"click"},defaultValue:String,hideIcon:Boolean,height:String,text:""},emits:["save","status"],watch:{show(t){this.$emit("status",t)}},data(){return{value:"",show:!1}},methods:{click(t){t.preventDefault(),this.show||(this.value=this.text,this.show=!0)},editSave(){if(this.text==this.value){this.show=!1;return}$confirm("确认要提交本次修改吗?","提示").then(t=>{this.show=!1,this.$emit("save",{value:this.value,oldValue:this.text})}).catch(t=>{this.show=!1})}}},xC={key:0},BC={key:1,class:"text flex"},kC={class:"line-2"},EC={key:0,class:"i-ri-quill-pen-line ml-xs"};function _C(t,n,r,o,i,a){const l=s.resolveDirective("focus");return s.openBlock(),s.createElementBlock("div",s.mergeProps({class:"text-edit"},{[s.toHandlerKey(r.clickType)]:n[2]||(n[2]=s.withModifiers((...c)=>a.click&&a.click(...c),["stop"]))}),[i.show?(s.openBlock(),s.createElementBlock("div",xC,[s.withDirectives(s.createElementVNode("textarea",{style:s.normalizeStyle({height:r.height}),onBlur:n[0]||(n[0]=c=>a.editSave()),"onUpdate:modelValue":n[1]||(n[1]=c=>i.value=c)},null,36),[[l],[s.vModelText,i.value]])])):(s.openBlock(),s.createElementBlock("div",BC,[s.createElementVNode("div",kC,s.toDisplayString(r.text??r.defaultValue),1),!r.hideIcon||!r.text?(s.openBlock(),s.createElementBlock("i",EC)):s.createCommentVNode("",!0)]))],16)}const AC=ne(wC,[["render",_C],["__scopeId","data-v-26e8acc4"]]),NC={props:{url:String|Array|Object,modelValue:String|Number|Array,type:{type:String,default:"primary"},size:{type:String,default:"small"},showNum:{type:Number,default:2},keyName:{type:String,default:"id"},titleName:{type:String,default:"title"},format:Function,color:String},data(){return{text:[]}},created(){const{keyName:t,titleName:n,url:r,modelValue:o,format:i}=this;if(!o&&o!=0||!r)return;let a=[];if(typeof o=="string"||typeof o=="number"?a=i?(i(o)+"").split(","):(o+"").split(","):a=o,a.length===0)return;function l(c){let u=[],d={};if(!c)return[];if(c.constructor==Array)for(const f of c)d[f[t]]=f[n];else d=c;for(const f of a)d[f]&&u.push(d[f]);return u}if(typeof r=="object")return this.text=l(r);$req.post(r).then(c=>{this.text=l(c.data)})}},SC={key:0,class:"cate-text overflow-hidden"},FC={class:"cate-show"};function VC(t,n,r,o,i,a){const l=s.resolveComponent("el-tag"),c=s.resolveComponent("el-popover");return i.text.length>0?(s.openBlock(),s.createElementBlock("div",SC,[i.text.length>r.showNum?(s.openBlock(),s.createBlock(c,{key:0,placement:"left",width:220,trigger:"hover"},{reference:s.withCtx(()=>[s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(r.showNum,u=>(s.openBlock(),s.createBlock(l,{size:r.size,color:r.color,type:r.type},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.text[u-1]),1)]),_:2},1032,["size","color","type"]))),256)),s.createVNode(l,{size:r.size,color:r.color,type:r.type},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("...",-1)])]),_:1},8,["size","color","type"])])]),default:s.withCtx(()=>[s.createElementVNode("div",FC,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.text,u=>(s.openBlock(),s.createBlock(l,{size:r.size,type:r.type},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(u),1)]),_:2},1032,["size","type"]))),256))])]),_:1})):(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(i.text,u=>(s.openBlock(),s.createBlock(l,{size:r.size,color:r.color,type:r.type},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(u),1)]),_:2},1032,["size","color","type"]))),256))])):s.createCommentVNode("",!0)}const OC=ne(NC,[["render",VC],["__scopeId","data-v-3c69ee7f"]]),TC={props:{date:{type:[Object,String,Number],default(){return"-"}},locale:{type:String,default:"zh"},threshold:{type:Array,default(){return[0,0]}},format:{type:String,default:void 0}},data(){return{text:""}},created(){this.text=$a.time.friendlyDate(this.date,{locale:this.locale,threshold:this.threshold,format:this.format})}};function jC(t,n,r,o,i,a){return s.openBlock(),s.createElementBlock("span",null,s.toDisplayString(i.text),1)}const PC=ne(TC,[["render",jC]]),LC={name:"a-image",props:{fit:{type:String,default:"contain"},src:String,width:{type:[String,Number]},height:{type:[String,Number]},background:String,borderRadius:String,css:String,process:"",lazy:{type:Boolean,default:!0},index:{type:Number,default:0},preview:{type:[Array,Boolean],default:!1}},data(){return{previewSrcList:[]}},methods:{addUnit(t){return typeof t=="number"?t+"px":t}},mounted(){typeof this.preview=="string"?this.previewSrcList=[this.url]:typeof this.preview=="object"&&(this.previewSrcList=this.preview.map(t=>this.$fileUrl(t,this.process)))},computed:{url(){return this.$fileUrl(this.src,this.process)}}};function MC(t,n,r,o,i,a){const l=s.resolveComponent("el-image");return s.openBlock(),s.createBlock(l,s.mergeProps({class:"a-image",fit:r.fit,"initial-index":r.index,"preview-src-list":i.previewSrcList,style:[{width:a.addUnit(r.width),height:a.addUnit(r.height),borderRadius:r.borderRadius,background:r.background},r.css],src:a.url},t.$attrs),{error:s.withCtx(()=>[...n[0]||(n[0]=[s.createElementVNode("div",{class:"image-slot min-w-10 min-h-10 bg-main-100"},[s.createElementVNode("i",{class:"i-ri-landscape-line"})],-1)])]),_:1},16,["fit","initial-index","preview-src-list","style","src"])}const zC=ne(LC,[["render",MC],["__scopeId","data-v-7b602c3b"]]),$C={name:"a-region-text",props:{code:String|Number},data(){return{text:""}},created(){this.text=$a.codeArea(this.code)}};function IC(t,n,r,o,i,a){return s.openBlock(),s.createElementBlock("span",null,s.toDisplayString(i.text),1)}const RC=ne($C,[["render",IC]]),HC={name:"a-text-status",props:{status:{type:String,default:"info"}},data(){return{color:!1}},created(){this.status&&this.status.indexOf("#")===0&&(this.color=this.status)}},UC={class:"text-status"},WC={class:"text"};function qC(t,n,r,o,i,a){return s.openBlock(),s.createElementBlock("span",UC,[s.createElementVNode("span",{class:s.normalizeClass(["dot",i.color?"":"dot-"+r.status]),style:s.normalizeStyle("background-color:"+i.color)},null,6),s.createElementVNode("span",WC,[s.renderSlot(t.$slots,"default",{},void 0,!0)])])}const KC=ne(HC,[["render",qC],["__scopeId","data-v-99c2ca99"]]);function JC(t){const n=Object.create(null);return function(o){return n[o]||(n[o]=t(o))}}const GC=/-(\w)/g,Tu=JC(t=>t.replace(GC,(n,r)=>r?r.toUpperCase():""));function us(t){t.parentElement!==null&&t.parentElement.removeChild(t)}function ju(t,n,r){const o=r===0?t.children[0]:t.children[r-1].nextSibling;t.insertBefore(n,o)}function YC(t,n){return Object.values(t).indexOf(n)}function ZC(t,n,r,o){if(!t)return[];const i=Object.values(t),a=n.length-o;return[...n].map((c,u)=>u>=a?i.length:i.indexOf(c))}function Pu(t,n){this.$nextTick(()=>this.$emit(t.toLowerCase(),n))}function XC(t){return n=>{this.realList!==null&&this["onDrag"+t](n),Pu.call(this,t,n)}}function QC(t){return["transition-group","TransitionGroup"].includes(t)}function e4(t){if(!t||t.length!==1)return!1;const[{type:n}]=t;return n?QC(n.name):!1}function t4(t,n){return n?{...n.props,...n.attrs}:t}const ds=["Start","Add","Remove","Update","End"],fs=["Choose","Unchoose","Sort","Filter","Clone"],n4=["Move",...ds,...fs].map(t=>"on"+t);let ps=null;const r4={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:t=>t},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},o4={name:"a-draggable",inheritAttrs:!1,emits:["update:modelValue","move","change",...ds.map(t=>t.toLowerCase()),...fs.map(t=>t.toLowerCase())],props:r4,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const t=this.$slots.default?this.$slots.default():null,n=t4(this.$attrs,this.componentData);return t?(this.transitionMode=e4(t),s.h(this.getTag(),n,t)):s.h(this.getTag(),n,[])},created(){this.list!==null&&this.modelValue!==null&&console.error("list props are mutually exclusive! Please set one.")},mounted(){const t={};ds.forEach(i=>{t["on"+i]=XC.call(this,i)}),fs.forEach(i=>{t["on"+i]=Pu.bind(this,i)});const n=Object.keys(this.$attrs).reduce((i,a)=>(i[Tu(a)]=this.$attrs[a],i),{}),r=Object.assign({},n,t,{onMove:(i,a)=>this.onDragMove(i,a)});!("draggable"in r)&&(r.draggable=">*");const o=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new Sortable(o,r),o.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(t){this.updateOptions(t)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?s.resolveComponent(this.component):this.tag},updateOptions(t){for(var n in t){const r=Tu(n);n4.indexOf(r)===-1&&this._sortable.option(r,t[n])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=ZC(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(t){const n=YC(this.getChildrenNodes()||[],t);if(n===-1)return null;const r=this.realList[n];return{index:n,element:r}},emitChanges(t){this.$nextTick(()=>{this.$emit("change",t)})},alterList(t){if(this.list){t(this.list);return}const n=[...this.modelValue];t(n),this.$emit("update:modelValue",n)},spliceList(){const t=n=>n.splice(...arguments);this.alterList(t)},updatePosition(t,n){const r=o=>o.splice(n,0,o.splice(t,1)[0]);this.alterList(r)},getVmIndex(t){const n=this.visibleIndexes,r=n.length;return t>r-1?r:n[t]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(t){if(!this.noTransitionOnDrag||!this.transitionMode)return;var n=this.getChildrenNodes();n[t].data=null;const r=this.getComponent();r.children=[],r.kept=void 0},onDragStart(t){this.context=this.getUnderlyingVm(t.item),this.context&&(t.item._underlying_vm_=this.clone(this.context.element),ps=t.item)},onDragAdd(t){const n=t.item._underlying_vm_;if(n===void 0)return;us(t.item);const r=this.getVmIndex(t.newIndex);this.spliceList(r,0,n),this.computeIndexes();const o={element:n,newIndex:r};this.emitChanges({added:o})},onDragRemove(t){if(ju(this.$el,t.item,t.oldIndex),t.pullMode==="clone"){us(t.clone);return}if(!this.context)return;const n=this.context.index;this.spliceList(n,1);const r={element:this.context.element,oldIndex:n};this.resetTransitionData(n),this.emitChanges({removed:r})},onDragUpdate(t){us(t.item),ju(t.from,t.item,t.oldIndex);const n=this.context.index,r=this.getVmIndex(t.newIndex);this.updatePosition(n,r);const o={element:this.context.element,oldIndex:n,newIndex:r};this.emitChanges({moved:o})},updateProperty(t,n){t.hasOwnProperty(n)&&(t[n]+=this.headerOffset)},onDragMove(t,n){const r=this.move;if(!r||!this.realList)return!0;const o=this.getRelatedContextFromMoveEvent(t),i=this.context,a=this.computeFutureIndex(o,t);Object.assign(i,{futureIndex:a});const l=Object.assign({},t,{relatedContext:o,draggedContext:i});return r(l,n)},onDragEnd(){this.computeIndexes(),ps=null},getTrargetedComponent(t){return t.__draggable_component__},getRelatedContextFromMoveEvent({to:t,related:n}){const r=this.getTrargetedComponent(t);if(!r)return{component:r};const o=r.realList,i={list:o,component:r};if(t!==n&&o&&r.getUnderlyingVm){const a=r.getUnderlyingVm(n);if(a)return Object.assign(a,i)}return i},computeFutureIndex(t,n){const r=[...n.to.children].filter(l=>l.style.display!=="none");if(r.length===0)return 0;const o=r.indexOf(n.related),i=t.component.getVmIndex(o);return r.indexOf(ps)!==-1||!n.willInsertAfter?i:i+1}}},i4=s.defineAsyncComponent(()=>Promise.resolve().then(()=>MD)),s4=s.defineAsyncComponent(()=>Promise.resolve().then(()=>Cb)),hs={AdminTable:cp,AdminForm:uC,DataApi:gC,ASearch:Ms,AInputs:cs,InputButton:Vo,ASearchBox:Us,ATip:DC,ATextEdit:AC,ACateText:OC,ACascader:Au,ATags:Nu,ATime:PC,AImage:zC,AImageText:_u,AColorPicker:Su,ARegionPicker:Fu,ARegionText:RC,ARegionMap:ss,ATextStatus:KC,ADraggable:o4,AChart:i4,AEditor:s4};function a4(t){for(const n in hs)t.component(n,hs[n])}const l4={install:a4,components:hs},c4={methods:{$getParent(t="",n=this,r=0){if(r>=20||!t||!n)return null;const o=n.$parent;return o?o.$options.name===t?o:(r++,this.$getParent(t,o,r)):null},$get(t=null){return $go.query(this.$route.query,t)}}},u4=function(...t){return t.reduce((n,r)=>So(n,r),{})},d4={urlBox:{default:[{title:"推荐",list:[{title:"首页",url:"/"}]}]},apis:{},form:{btnText:"提交"},table:{shortcuts:{user:{type:"img-info",init:{error:"用户不存在",imgName:"user_header",titleName:"user_name"}}}},inputs:{shortcuts:{user:{type:"search-box",init:{icon:"ri-user-line",name:"用户",join:"user",url:"__apis.user_search",imgName:"user_header",titleName:"user_name",placeholder:"请选择用户",placeholder2:"输入用户昵称或用户ID或手机号"}}}}};function f4(t){const n=yo.flattenObject(t);for(const r in n)if(typeof n[r]=="string"&&n[r].indexOf("__")===0){const o=n[r].replace("__","");dn(t,r,Yt(t,o))}}const p4=t=>{const n=u4(d4,t);return f4(n),n},h4=t=>{if(typeof document<"u")return window.getComputedStyle(document.getElementById("app")).getPropertyValue(t)},m4=(t="")=>{const n={};return n.primary=h4("--el-color-primary"),t?n[t]:n},co="_exptime",At="admin_",Qn={list:function(){const t=localStorage.length;let n=new Array;for(let r=0;r<t;r++){let o=localStorage.key(r);n[r]=o}return n},set:function(t,n,r=0){if(r){let o=Date.now();o=o/1e3+Number(r),localStorage.setItem(At+t+co,o+"")}localStorage.setItem(At+t,JSON.stringify(n))},remove:function(t){localStorage.removeItem(At+t),localStorage.removeItem(At+t+co)},clear:function(){localStorage.clear()},get:function(t,n=!1){let r=parseInt(localStorage.getItem(At+t+co));if(!localStorage.getItem(At+t))return!1;if(r&&r<Date.now()/1e3&&!n){localStorage.removeItem(At+t),localStorage.removeItem(At+t+co);return}else if(n&&r)return{data:JSON.parse(localStorage.getItem(At+t)),time:r};try{return JSON.parse(localStorage.getItem(At+t))}catch{return localStorage.getItem(At+t)}}},lt=t=>we.ElMessage(t);lt.info=t=>we.ElMessage(t),lt.success=t=>we.ElMessage({message:t,type:"success"}),lt.error=t=>we.ElMessage({message:t,type:"error"}),lt.warning=t=>we.ElMessage({message:t,type:"warning"}),lt.info=t=>we.ElMessage(t),lt.warning=t=>we.ElMessage({message:t,type:"warning"}),lt.confirm=(t,n="提示",r={})=>{let o={confirmButtonText:"确认",cancelButtonText:"取消",type:"warning",...r};return we.ElMessageBox.confirm(t,n,o)},lt.prompt=(t,n="提示",r={})=>{let o={confirmButtonText:"确认",cancelButtonText:"取消",...r};return we.ElMessageBox.prompt(t,n,o)},lt.loading=(t="加载中")=>(t===!0&&(t="加载中"),we.ElLoading.service({lock:!0,text:t,background:"rgba(0, 0, 0, 0.7)"}));function g4(t,n){if(!t)return{};let r={};return t?.jsonQuery?r=JSON.parse(t.jsonQuery):r=t,n?r[n]||null:r}class y4{data=null;router=null;query=g4;constructor(n){this.router=n}to(n,r=null){this.data=r;let o="";return n?.indexOf("http")===0?window.open(n):(r&&(o="?jsonQuery="+JSON.stringify(r)),n?.indexOf("/")!==0&&(n="/"+n),this.router.push(n+o))}}const ms="undefined",b4=Promise,C4=t=>b4.reject(t),gs=Object,Lu=void 0,v4=null,Mu=!0,ys=!1,D4=(t,n,r)=>JSON.stringify(t,n,r),w4=(t,n=0)=>setTimeout(t,n),zu=t=>clearTimeout(t),x4=(t,n)=>delete t[n],B4=t=>typeof t,k4=(t,n)=>t.includes(n);typeof window===ms&&(typeof process!==ms&&process.browser);const E4=t=>B4(t)==="string",_4=t=>gs.prototype.toString.call(t),A4=(t,n)=>t instanceof n,N4=t=>{const n=_4(t);return/^\[object (Blob|FormData|ReadableStream|URLSearchParams)\]$/i.test(n)||A4(t,ArrayBuffer)},S4=(t,...n)=>new t(...n),F4=t=>E4(t)||N4(t);function V4(t={}){return(n,r)=>{const o=r.config,i=o.timeout||0,a=new AbortController,{data:l,headers:c}=n,u=/content-type/i.test(gs.keys(c).join()),d=l&&l.toString()==="[object FormData]";!u&&!d&&(c["Content-Type"]="application/json; charset=UTF-8");const f=["",Lu,v4,ys];gs.keys(c).forEach(g=>{k4(f,c[g])&&x4(c,g)});const p=(t.customFetch||fetch)(n.url,{...o,method:n.type,signal:a.signal,body:F4(l)?l:D4(l)});let h,m=ys;return i>0&&(h=w4(()=>{m=Mu,a.abort()},i)),{response:()=>p.then(g=>(zu(h),g.clone()),g=>C4(m?S4(Error,"fetchError: network timeout"):g)),headers:()=>p.then(({headers:g})=>g,()=>({})),onDownload:async g=>{let y=ys;const v=await p.catch(()=>{y=Mu});if(!v)return;const{headers:D,body:w}=v.clone(),b=w?w.getReader():Lu,x=Number(D.get("Content-Length")||D.get("content-length")||0);if(x<=0)return;let k=0;if(b){const E=()=>b.read().then(({done:B,value:V=new Uint8Array})=>{if(B||y)y&&g(k,0);else return k+=V.byteLength,g(k,x),E()});E()}},onUpload(){console.error("fetch API does'nt support uploading progress. please consider to change `@alova/adapter-xhr` or `@alova/adapter-axios`")},abort:()=>{a.abort(),zu(h)}}}}let er="",uo,bs;function O4(t){t.responded||(t.responded={}),bs=t,er=t.baseURLPre||"",uo=bo.createAlova({requestAdapter:V4(),timeout:5e4,baseURL:t.baseURL,responded:{onSuccess:t.responded.onSuccess,onError:t.responded.onError,onComplete:async n=>{Cs&&Cs.close()}}})}let Cs=!1;function $u(t,n,r={}){const o=bs?.headers?.()||{},i=bs?.post?.auth();if(!i)return Promise.resolve(typeof i=="object"?i:{code:1001,msg:"请先登录"});const{loading:a=null,cache:l=0,headers:c={}}=r;if(Qn.get("REQ_"+t))return Promise.resolve({...Qn.get("REQ_"+t),cache:!0});a&&(Cs=lt.loading(a)),n&&(n=$a.object.removeEmptyValues(n,{removeEmptyStrings:!1,removeEmptyObjects:!1,removeEmptyArrays:!1}));const u={name:null,hitSource:null,cacheFor:null,headers:{...o,...c}};l&&typeof l=="number"&&(u.hitSource=RegExp(`^${t}/do`),u.cacheFor={mode:"restore",expire:60*1e3}),u.name=t;const d=uo.Post(t,n,u);return t.startsWith("http")&&(d.baseURL=""),d}const Iu=function(t,n=void 0){const r=uo.Get(t,n);return r.baseURL="",r};class T4{baseURL;constructor(n){er=n?.apiUrlPre||"",this.baseURL=n.baseURL,O4(n)}noLogin(n,r=void 0){return $u(er+n,r)}post(n,r=void 0,o=void 0,i=void 0){let a={};return o&&typeof o=="object"?a=o:(typeof r=="number"?(i=r,r=void 0):typeof r=="string"?(o=r,r=void 0):typeof o=="number"&&(i=o),a={loading:o,cache:i}),n.startsWith("http")?n=n:n=er+n,$u(n,r,a)}upload(n,r,o={}){let i=!1;return n.startsWith("http")?i=!0:n=this.baseURL+er+n,!i&&!Qn.get("admin_jwt")?Promise.resolve({code:1001,msg:"请先登录"}):new Promise((a,l)=>{const c=new XMLHttpRequest,{onProgress:u,onLoadStart:d,onLoadEnd:f,onError:p,onAbort:h,action:m="PUT",headers:g={}}=o;c.upload&&u&&c.upload.addEventListener("progress",y=>{y.lengthComputable&&u(y,r)}),c.addEventListener("loadstart",()=>d?.()),c.addEventListener("loadend",()=>f?.()),c.addEventListener("error",()=>{p?.(c.statusText),l(new Error(`上传失败: ${c.statusText}`))}),c.addEventListener("abort",()=>{h?.(),l(new Error("上传已取消"))}),c.addEventListener("load",()=>{c.status>=200&&c.status<300?a({data:c.response,status:c.status,statusText:c.statusText}):l(new Error(`HTTP ${c.status}: ${c.statusText}`))}),c.open(m,n,!0),i||c.setRequestHeader("jwt",Qn.get("admin_jwt")),m==="POST"?c.setRequestHeader("Content-Type","application/json"):c.setRequestHeader("Content-Type",r.type||"application/octet-stream"),c.send(r)})}query=Iu;get=Iu;instance=()=>uo;setCache=bo.setCache;create=bo.createAlova}const j4=function(t,n="复制成功"){if(!t){lt.error("无复制内容");return}const r=document.createElement("textarea");r.readOnly=!0,r.style.position="absolute",r.style.left="-9999px",r.value=t,document.body.appendChild(r),r.select(),r.setSelectionRange(0,r.value.length),document.execCommand("Copy")&<.success(n),document.body.removeChild(r)};function Gt(t,n=2){for(t+="";t.length<n;)t="0"+t;return t.slice(-n)}const P4={yyyy:t=>Gt(t.year,4),yy:t=>Gt(t.year),MM:t=>Gt(t.month),M:t=>t.month,dd:t=>Gt(t.day),d:t=>t.day,hh:t=>Gt(t.hour),h:t=>t.hour,mm:t=>Gt(t.minute),m:t=>t.minute,ss:t=>Gt(t.second),s:t=>t.second,SSS:t=>Gt(t.millisecond,3),S:t=>t.millisecond};function Ru(t){return/^\d+$/.test(t)&&(t+"").length==10&&(t=t*1e3),t instanceof Date?t:typeof t==="string"?t.indexOf("T")>-1?new Date(t):new Date(t.replace(/-/g,"/")):new Date(t)}function Hu(t,n="yyyy-MM-dd hh:mm:ss"){if(!t&&t!==0||(t=Ru(t),!t.getTime()))return"-";const r={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()},o=/yyyy|yy|MM|M|dd|d|hh|h|mm|m|ss|s|SSS|SS|S/;let i=!0,a=n;for(;i;)i=!1,a=a.replace(o,function(l){return i=!0,P4[l](r)});return a}function L4(t,{locale:n="zh",threshold:r=[6e4,36e5],format:o="yyyy-MM-dd hh:mm:ss"}){if(t==="-")return t;if(!t&&t!==0)return"";const i={zh:{year:"年",month:"月",day:"天",hour:"小时",minute:"分钟",second:"秒",ago:"前",later:"后",justNow:t.length==10?"今天":"刚刚",soon:"马上",template:"{num}{unit}{suffix}"},en:{year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",ago:"ago",later:"later",justNow:"just now",soon:"soon",template:"{num} {unit} {suffix}"}},a=i[n]||i.zh;let l=Ru(t),c=(l.getTime()||0)-Date.now(),u=Math.abs(c);if(u<r[0])return c<0?a.justNow:a.soon;if(u>=r[1])return Hu(l,o);let d,f,p=a.later;c<0&&(p=a.ago,c=-c);const h=Math.floor(c/1e3),m=Math.floor(h/60),g=Math.floor(m/60),y=Math.floor(g/24),v=Math.floor(y/30),D=Math.floor(v/12);switch(!0){case D>0:d=D,f=a.year;break;case v>0:d=v,f=a.month;break;case y>0:d=y,f=a.day;break;case g>0:d=g,f=a.hour;break;case m>0:d=m,f=a.minute;break;default:d=h,f=a.second;break}return n==="en"&&(d===1?d="a":f+="s"),a.template.replace(/{\s*num\s*}/g,d+"").replace(/{\s*unit\s*}/g,f).replace(/{\s*suffix\s*}/g,p)}const M4=(t,n="/")=>{const r=String(t),o=Number(r.slice(0,2));let i=Number(r.slice(0,4));const a=Number(t);r.length>6&&(i=Number(r.slice(0,6)));let l=[];return dmxRegions.forEach(c=>{c.c===o&&(l[0]=c.n,c.s?.length>0&&i>=1e3&&c.s.forEach(u=>{u.c===i&&(l[1]=u.n,u.s?.length>0&&a>=1e5&&u.s.forEach(d=>{d.c===a&&(l[2]=d.n)}))}))}),n===!0?l:l.join(n)};function z4(t,n,r,o="array"){if(t){(!r||typeof r!="string")&&(r="data.csv");let i;o=="array"?i=$4(t,n):i=I4(t,n);let a=URL.createObjectURL(i),l=document.createElement("a");l.href=a,l.download=r,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(a)}}function $4(t,n){let o=",",i=`\r
|
|
38
|
+
`,a=t.reduce((c,u)=>(c?c+o:"")+(u.title||u.column),"");if(Array.isArray(n)&&n.length>0){let c=t.map(u=>u.column);a=n.reduce((u,d)=>{let f=c.reduce((p,h)=>{if(d.hasOwnProperty(h)){let m=d[h];if(m!=null){let g=t.find(y=>y.column==h);if(g.formatter!=null&&typeof g.formatter=="function"&&(m=g.formatter(m)),m!=null)return m=m.toString().replace(new RegExp(i,"g")," "),m=new RegExp(o).test(m)?`"${m}"`:m,m=m+" ",p?p+o+m:p+m}return p?p+o:p+" "}else return p?p+o:p+" "},"");return u+i+f},a)}return new Blob(["\uFEFF"+a],{type:"text/csv;charset=utf-8;"})}function I4(t,n){return new Blob(["\uFEFF"+t+n],{type:"text/csv;charset=utf-8;"})}const R4={export:z4},vs=(t,n={})=>{const{removeEmptyStrings:r=!0,removeNull:o=!0,removeUndefined:i=!0,removeEmptyObjects:a=!0,removeEmptyArrays:l=!0}=n;if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(d=>vs(d,n)).filter(d=>!(l&&Array.isArray(d)&&d.length===0));const c={};for(const[u,d]of Object.entries(t)){if(d===null&&o||d===void 0&&i||d===""&&r)continue;const f=vs(d,n);a&&typeof f=="object"&&!Array.isArray(f)&&Object.keys(f).length===0||l&&Array.isArray(f)&&f.length===0||(c[u]=f)}return c},H4={get:function(t,n,r){return Yt(t,n,r)},set:function(t,n,r){return dn(t,n,r)},deepMerge:function(...t){return t.reduce((n,r)=>So(n,r),{})},mapping:function(t,n=null){if(!n)return t;function r(i){const a={};for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const c=i[l];n[l]?a[n[l]]=c:a[l]=c}return a}let o;return Array.isArray(t)?(o=[],t.forEach(i=>{o.path(r(i))})):typeof t=="object"?o=r(t):o=t,o},removeEmptyValues:vs},tr={};tr.column=function(t,n){return t.map(function(r){return r[n]})},tr.addColumn=function(t,n,r){let o=t.length;for(var i=0;i<o;i++)t[i][n]=r},tr.removeColumn=function(t,n){let r=t.length;for(var o=0;o<r;o++)delete t[o][n]},tr.remove=function(t,n){var r=t.indexOf(n);return r>-1?t.splice(r,1):null};function U4(t=30){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}function W4(t,n){let r="";return $config.fileUrl?$config.fileUrl(t,n):(t&&(t.indexOf("://")>-1||t.startsWith("//")||t.startsWith("/assets")||t.startsWith("/static")||t.startsWith("data:")||t.startsWith("<svg")?r=t:r=dmx.fileUrl+t),r)}const Uu={array:tr,object:H4,sleep:U4,codeArea:M4,fileUrl:W4,time:{formatDate:Hu,friendlyDate:L4},csv:R4},Ds={};function q4(t,n,r){if(typeof t=="string"?window[t]:t){r();return}let i=Ds[n];if(!i){i=Ds[n]=[];const a=document.createElement("script");a.src=n,document.body.appendChild(a),a.onload=function(){i.forEach(l=>l()),delete Ds[n]}}i.push(r)}function K4(t,n){const r=t.config.globalProperties,{store:o=null,config:i,menu:a=null}=n,l={$menu:a,$a:Uu,$msg:lt,$loading:lt.loading,$confirm:lt.confirm,$prompt:lt.prompt,$cache:Qn,$copy:j4,$fileUrl:Uu.fileUrl,$config:p4(i),$theme:m4,$number:id,$req:new T4(n.req),$go:new y4(n.router),$store:o};l.$menu=a,r._plugins=n.pluigns,globalThis.loadjs=q4;for(const c in l)globalThis[c]=r[c]=l[c]}const J4={install:K4},G4={data(){return{init:{}}},methods:{edit2(t,n){const r=t.model;let o=[],i;r.forEach(l=>{let c={title:l.title,field:l.field,type:l.type,info:l.info};l.prop&&l.prop.forEach(u=>{let d=u.split(" ");c[d[0]]=d[1]}),o.push(c)}),t.type==2?i=t.max||20:i=1;const a={url:"doEdit",title:t.title,labelWidth:"0px",cols:[{field:"id",type:"hidden"},{type:"group",limit:i,field:"content",title:"",cols:o}]};this.$refs.table.dialogForm(t,n,a)}},created(){const t=(n,r)=>{n==4?r.hideField(["model","max","model3","cate"]):(r.hideField(["model3"]),r.hideField(["model","max"],!1))};this.init={url:"../dev/ad",title:"广告管理",edit:{url:"doEdit",end:(n,r)=>{t(n.type,r)},change:(n,r)=>{n.type!==void 0&&t(n.type,r)},cols:[{field:"id",type:"hidden"},{field:"title",title:"广告名称",required:!0},{field:"code",title:"广告编码",required:!0},{field:"cate",title:"上级编码",info:"如果是组合模型的子模型,请填写组合模型的编码 否则不用填写"},{field:"type",title:"数据类型",type:"radio",cols:[{label:"单组数据",value:1},{label:"多组数据",value:2},{label:"组合模型",value:4}],required:!0},{field:"model3",type:"textarea",rows:4,title:"广告模型",info:"json数据"},{field:"max",title:"最大数据量",type:"number",info:"只适用于[多组数据]类型"},{field:"model",type:"group",title:"广告模型",limit:10,cols:[{field:"title",title:"名称"},{field:"field",title:"字段"},{field:"type",title:"类型",type:"select",cols:{input:"文本",textarea:"多行文本",url:"链接",img:"图片",imgs:"多图",editor:"富文本",radio:"单选框",switch:"开关",tags:"多标签",audio:"音频",video:"视频",file:"文件",goods:"商品"}},{field:"info",title:"备注"},{field:"prop",type:"tags",title:"props"}]}]},add:{url:"doAdd"},del:{url:"doDel"},cols:[{field:"sort",title:"排序",edit:!0},{field:"title",title:"广告名称"},{field:"id",title:"广告ID"},{field:"code",title:"广告标识"},{field:"cate",title:"上级编码"},{field:"type",title:"数据类型",type:"text",cols:{1:"单组数据",2:"多组数据",4:"组合模型"}},{field:"content",title:"内容"},{field:"status",title:"是否启用",type:"switch"},{type:"tool",title:"操作",width:200,btn:[{title:"编辑",action:this.edit2},{title:"配置",action:"edit"},{action:"del"}]}],tools:[{title:"添加",type:"primary",action:"add"}]}}};function Y4(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return s.openBlock(),s.createBlock(l,{init:i.init,ref:"table"},null,8,["init"])}const Z4=Object.freeze(Object.defineProperty({__proto__:null,default:ne(G4,[["render",Y4],["__scopeId","data-v-6bb6e19c"]])},Symbol.toStringTag,{value:"Module"})),X4={};function Q4(t,n){return"Index"}const ev=Object.freeze(Object.defineProperty({__proto__:null,default:ne(X4,[["render",Q4]])},Symbol.toStringTag,{value:"Module"})),tv={class:"w-full bg-main pd"},nv={key:1},rv=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"index",setup(t){const n=s.ref(null),r=s.ref(null),{width:o}=Co.useElementSize(document.getElementById("app")),{height:i}=Co.useElementSize(document.getElementById("app")),{height:a}=Co.useElementSize(r),l=s.computed(()=>i.value-44-96-a.value),c=[{title:"序号",key:"index",dataKey:"index",width:60,sortable:!0},{title:"内容",dataKey:"name"}],u=y=>{p(y)},d=s.ref([]),f=s.ref("先选择要查看的日志文件"),p=y=>{$req.post("dev.log/index",{where:y}).then(v=>{d.value=v.data,f.value=v.msg})},h=s.ref({key:"index",order:"asc"}),m=y=>{d.value=d.value.reverse(),h.value=y},g={cols:[{field:"file",title:"文件",type:"selects",url:"dev.log/cate",props:{emitPath:!0,checkStrictly:!1}},{field:"time",title:"时间",type:"times"},{field:"text",title:"关键字"}]};return(y,v)=>{const D=s.resolveComponent("a-search"),w=s.resolveComponent("el-table-v2"),b=s.resolveComponent("el-empty");return s.openBlock(),s.createElementBlock("div",{class:"w-full",ref_key:"el",ref:n},[s.createElementVNode("div",{class:"bg-main mb-sm pt w-full",ref_key:"searchEl",ref:r},[s.createVNode(D,{onChange:u,init:g})],512),s.createElementVNode("div",tv,[s.unref(d)?.length>0?(s.openBlock(),s.createBlock(w,{key:0,"sort-by":s.unref(h),onColumnSort:m,columns:c,data:s.unref(d),"row-height":40,width:s.unref(o)-210,height:s.unref(l)},null,8,["sort-by","data","width","height"])):(s.openBlock(),s.createElementBlock("div",nv,[s.createVNode(b,{description:s.unref(f)},null,8,["description"])]))])],512)}}}},Symbol.toStringTag,{value:"Module"})),ov={data(){return{table:{}}},created(){const t=function(){if(!$menu)return $msg.error("menu error");$req.post("../dev/menu/doSync",{menu:$menu}).then(n=>{n.code==0?this.$refs.table.reload(!0):$msg.error(n.msg)})};this.table={url:"../dev/menu",title:"权限列表",page:!1,tree:!0,cols:[{field:"title",title:"菜单名称",width:300},{field:"path",title:"路径"},{field:"role",title:"权限",type:"tags"}],tools:[{title:"同步菜单",type:"primary",action:t}]}}};function iv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return s.openBlock(),s.createBlock(l,{ref:"table",init:i.table},null,8,["init"])}const sv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(ov,[["render",iv]])},Symbol.toStringTag,{value:"Module"})),av={data(){return{init:{url:"/api/admin/msg",data:{is_msg:1,sms_id:"SMS_478945053",sms_tpl:"尊敬的${name} ,服务人员已接单,请在公众号内查看订单详情",info:`服务项目 {{thing2.DATA}}
|
|
39
39
|
服务人员 {{thing3.DATA}}
|
|
40
40
|
预约时间 {{time7.DATA}}
|
|
41
41
|
服务地址 {{thing6.DATA}}
|
|
42
|
-
工单号 {{character_string1.DATA}}`},tabs:["基础设置","站内信","短信","微信公众号"],cols:[{field:"is_msg",title:"站内信",type:"radio-button",cols:[{label:"开启",value:1},{label:"关闭",value:0},{label:"禁用",value:-1}]},{field:"is_mp",title:"微信公众号",type:"radio-button",cols:[{label:"开启",value:1},{label:"关闭",value:0},{label:"禁用",value:-1}]},{field:"is_sms",title:"短信",type:"radio-button",cols:[{label:"开启",value:1},{label:"关闭",value:0},{label:"禁用",value:-1}]},{field:"sort",title:"模版配置",type:"group",limit:10,labelWidth:"70px",cols:[{field:"tmp",title:"变量名称",inputWidth:"33%"},{field:"sys",title:"系统变量",inputWidth:"33%"},{field:"tmp",title:"公众号变量",inputWidth:"33%"}]},{field:"msg",title:"站内信模版",type:"textarea",tab:1},{field:"sms_id",title:"短信ID",tab:2},{field:"sms_tpl",title:"短信模版",type:"textarea",tab:2,disabled:!0},{field:"id",title:"公众号模版编号",type:"number",tab:3},{field:"id",title:"公众号模版ID",tab:3},{field:"info",title:"模版",type:"textarea",tab:3}]}}}},av={class:"pd bg-main"};function lv(t,n,r,o,i,a){const l=s.resolveComponent("admin-form");return s.openBlock(),s.createElementBlock("div",av,[s.createVNode(l,{class:"bg-main",init:i.init},null,8,["init"])])}const cv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(sv,[["render",lv]])},Symbol.toStringTag,{value:"Module"})),uv={data(){return{init:{}}},created(){this.init={url:"dev.msg",title:"消息设置",edit:{url:"doEdit",title:"tabs",tabs:["基础设置","站内信","短信","微信公众号"],cols:[{field:"id",type:"hidden"},{field:"title",title:"消息名称"},{field:"type",title:"消息类型",type:"radio",cols:["通知用户","通知平台"]},{field:"code",title:"消息编码",colWidth:"50%"},{field:"sort",title:"排序",type:"number",colWidth:"25%"},{field:"is_msg",title:"站内信",type:"radio",tab:1,cols:[{label:"开启",value:1},{label:"关闭",value:0},{label:"禁用",value:-1}]},{field:"is_sms",title:"短信",type:"radio",tab:2,cols:[{label:"开启",value:1},{label:"关闭",value:0},{label:"禁用",value:-1}]},{field:"is_mp",title:"微信公众号",type:"radio",tab:3,cols:[{label:"开启",value:1},{label:"关闭",value:0},{label:"禁用",value:-1}]},{field:"mapping",title:"变量映射",type:"group-table",limit:10,cols:[{field:"title",title:"变量名称",inputWidth:"25%"},{field:"sys",title:"系统变量",inputWidth:"25%"},{field:"msg",title:"站内信变量",inputWidth:"25%"},{field:"mp",title:"公众号变量",inputWidth:"25%"},{field:"sms",title:"手机变量",inputWidth:"25%"}]},{field:"msg_data.tpl",title:"站内信模版",type:"textarea",rows:3,tab:1,changeField:["is_msg"],change:t=>{const{input:n,data:r}=t;n.disabled=r.is_msg==-1}},{field:"sms_data.id",title:"短信ID",tab:2,changeField:["is_sms"],change:t=>{const{input:n,data:r}=t;n.disabled=r.is_sms==-1}},{field:"sms_data.tpl",title:"短信模版",type:"textarea",rows:3,tab:2,changeField:["is_sms"],change:t=>{const{input:n,data:r}=t;n.disabled=r.is_sms==-1}},{field:"mp_data.code",title:"模版编号",tab:3,changeField:["is_mp"],change:t=>{const{input:n,data:r}=t;n.disabled=r.is_mp==-1}},{field:"mp_data.id",title:"模版ID",tab:3,changeField:["is_mp"],change:t=>{const{input:n,data:r}=t;n.disabled=r.is_mp==-1}}]},del:{url:"doDel"},add:{url:"doAdd",title:"tabs"},cols:[{type:"checkbox",width:60},{field:"id",title:"ID",width:60,sort:!0},{field:"sort",title:"排序",width:60,edit:!0},{field:"title",title:"消息名称",edit:!0},{field:"code",title:"消息代码",edit:!0},{field:"info",title:"消息说明",edit:!0},{field:"type",title:"通知类型",type:"text",cols:{0:"通知用户",1:"通知平台"}},{field:"is_msg",title:"站内信",type:"status",cols:{"-1":["禁用","end"],0:["关闭","info"],1:["开启","primary"]},width:100},{field:"is_mp",title:"公众号",type:"status",cols:{"-1":["禁用","end"],0:["关闭","info"],1:["开启","primary"]},width:100},{field:"is_sms",title:"短信",type:"status",cols:{"-1":["禁用","end"],0:["关闭","info"],1:["开启","primary"]},width:100},{field:"mark",title:"备注",edit:!0},{type:"tool",title:"操作",width:100,btn:[{title:"修改",action:"edit"}]}],tools:[{title:"同步微信模板消息",type:"default",action:"wxsync"},{action:"add"}],search:{cols:[{field:"title",title:"消息名称",placeholder:"输入关键词"},{field:"code",title:"消息代码"},{field:"id",title:"消息ID"}]}}}};function dv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return s.openBlock(),s.createBlock(l,{init:i.init},null,8,["init"])}const fv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(uv,[["render",dv]])},Symbol.toStringTag,{value:"Module"})),pv={data(){return{cateValue:"",table:!1}},created(){this.$req.post("../dev/setting/cate").then(t=>{this.loadData(t.data)})},methods:{change(t){this.cateValue=t.data},loadData(t){const n={url:"doEdit",title:"插件配置",cols:[{field:"id",type:"hidden"},{field:"tips",title:"说明",value:"非开发者禁止操作!!!",type:"text"},{field:"type",title:"数据类型",type:"radio",cols:[{label:"单行数据",value:0},{label:"单组数据",value:1},{label:"多组数据",value:2}],required:!0},{field:"max",title:"最大数据量",type:"number",info:"只适用于[多组数据]类型"},{field:"model",type:"group",title:"数据模型",limit:20,cols:[{field:"title",inputWidth:"33.33%",title:"名称"},{field:"field",inputWidth:"33.33%",title:"字段"},{field:"type",title:"类型",type:"input-auto",inputWidth:"33.33%",list:{input:"文本",textarea:"多行文本",url:"链接",img:"图片",imgs:"多图","image-text":"图文编辑器",editor:"富文本",radio:"单选框",checkbox:"多选框",switch:"开关",tags:"多标签",color:"颜色选择器",file:"文件",md5:"随机秘钥"}},{field:"info",title:"提示"},{field:"prop",type:"tags",title:"props"}]}]};this.table={url:"../dev/plugins",title:"插件列表",cate:{cols:[{title:"",field:"tag",cols:{"":"全部",...t}}]},where:{tag:""},del:{url:"doDel"},edit:{url:"doEdit",title:"参数修改",noChangeTip:!1,cols:[{field:"id",type:"hidden"},{field:"tag",title:"分组",type:"select",cols:t,required:!0},{field:"title",title:"名称",required:!0},{field:"code",title:"编码",required:!0}]},add:{url:"doAdd",title:"参数添加",data:{tag:s.computed(()=>this.cateValue)}},cols:[{field:"sort",title:"排序",edit:!0},{field:"title",title:"名称"},{field:"code",title:"编码"},{field:"tag",title:"分组",type:"text",sort:!0,cols:t},{field:"type",title:"类型",type:"text",cols:{0:"单行数据",1:"单组数据",2:"多组数据"}},{field:"is_open",title:"前端调用",type:"switch"},{field:"status",title:"是否启用",type:"switch"},{type:"tool",title:"操作",width:200,btn:[{action:"edit"},{title:"配置",action:n},{action:"del"}]}],search:{cols:[{field:"title",title:"参数名称"}]},tools:[{title:"添加",type:"primary",action:"add"}]}}}};function hv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return i.table?(s.openBlock(),s.createBlock(l,{key:0,onChange:a.change,ref:"table",init:i.table},null,8,["onChange","init"])):s.createCommentVNode("",!0)}const mv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(pv,[["render",hv]])},Symbol.toStringTag,{value:"Module"})),gv={data(){return{table:!1}},created(){this.loadData()},methods:{loadData(){this.table={url:"redis",title:"redis",del:{url:"dodel"},edit:{url:"doedit",title:"参数修改",cols:[{field:"id",type:"hidden"},{field:"sort",title:"排序",edit:!0},{field:"uid",type:"switch",title:"是否需要登录"},{field:"type",title:"数据类型",type:"radio",cols:[{label:"普通数据",value:0},{label:"树形数据",value:1}],required:!0},{field:"action",type:"group",title:"控制模型",limit:1,info:"控制模型中字段(id,uid除外)必须在数据模型中存在",cols:[{field:"search",title:"搜索字段",type:"tags"},{field:"table",title:"列表字段",type:"tags"},{field:"form",title:"表单字段",type:"tags"},{field:"sort",title:"排序字段",type:"tags",info:"默认排序规则 id desc"}]}]},add:{url:"doAdd",title:"添加"},search:{cols:[{field:"title",title:"名称"}]},cols:[{field:"key",title:"key",width:300},{field:"type",title:"类型",width:100},{field:"value",title:"值",slot:!0},{type:"tool",title:"操作",width:200,btn:[{action:"edit"},{action:"del"}]}],tools:[{action:"add"}]}}}},yv={class:"w-1000px break-words"};function bv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return i.table?(s.openBlock(),s.createBlock(l,{key:0,ref:"table",init:i.table},{"cols.value":s.withCtx(({row:c})=>[s.createElementVNode("div",yv,s.toDisplayString(c.value),1)]),_:1},8,["init"])):s.createCommentVNode("",!0)}const Cv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(gv,[["render",bv]])},Symbol.toStringTag,{value:"Module"})),vv={data(){return{table:{}}},created(){this.table={url:"../dev/setting_cate",title:"参数分组",page:!1,del:{url:"doDel"},edit:{url:"doEdit",title:"修改",cols:[{field:"id",type:"hidden"},{field:"title",title:"名称",required:!0},{field:"code",title:"编码",required:!0},{field:"width",type:"number",title:"表单宽度"},{field:"cate",type:"tags",title:"表单分组"},{field:"sort",title:"排序"}]},add:{url:"doAdd"},cols:[{field:"sort",title:"排序",width:150,edit:!0},{field:"title",title:"名称",width:300},{field:"code",title:"编码"},{field:"width",format:t=>t||"-",title:"表单宽度"},{field:"cate",title:"表单分组"},{field:"status",title:"是否显示在设置中心",type:"switch"},{type:"tool",title:"操作",width:200,btn:[{title:"编辑",action:"edit"}]}],tools:[{title:"添加",icon:"el-icon-plus",type:"primary",action:"add"}]}}};function Dv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return s.openBlock(),s.createBlock(l,{init:i.table},null,8,["init"])}const wv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(vv,[["render",Dv]])},Symbol.toStringTag,{value:"Module"})),xv={data(){return{cateValue:"",table:!1}},created(){this.$req.post("../dev/setting/cate").then(t=>{this.loadData(t.data)})},methods:{change(t){this.cateValue=t.data},loadData(t){const n={url:"doEdit",title:"参数配置",cols:[{field:"id",type:"hidden"},{field:"tips",title:"说明",value:"非开发者禁止操作!!!",type:"text"},{field:"type",title:"数据类型",type:"radio",cols:[{label:"单行数据",value:0},{label:"单组数据",value:1},{label:"多组数据",value:2}],required:!0},{field:"max",title:"最大数据量",type:"number",info:"只适用于[多组数据]类型"},{field:"model",type:"group",title:"数据模型",limit:20,cols:[{field:"title",inputWidth:"33.33%",title:"名称"},{field:"field",inputWidth:"33.33%",title:"字段"},{field:"type",title:"类型",type:"input-auto",inputWidth:"33.33%",list:{input:"文本",textarea:"多行文本",url:"链接",img:"图片",imgs:"多图","image-text":"图文编辑器",editor:"富文本",radio:"单选框",checkbox:"多选框",switch:"开关",tags:"多标签",color:"颜色选择器",file:"文件",md5:"随机秘钥"}},{field:"info",title:"提示"},{field:"prop",type:"tags",title:"props"}]}]};this.table={url:"../dev/setting",title:"参数列表",cate:{cols:[{title:"",field:"tag",cols:{"":"全部",...t}}]},where:{tag:""},del:{url:"doDel"},edit:{url:"doEdit",title:"参数修改",noChangeTip:!1,cols:[{field:"id",type:"hidden"},{field:"tag",title:"分组",type:"select",cols:t,required:!0},{field:"title",title:"名称",required:!0},{field:"code",title:"编码",required:!0}]},add:{url:"doAdd",title:"参数添加",data:{tag:s.computed(()=>this.cateValue)}},cols:[{field:"sort",title:"排序",edit:!0},{field:"title",title:"名称"},{field:"code",title:"编码"},{field:"tag",title:"分组",type:"text",sort:!0,cols:t},{field:"type",title:"类型",type:"text",cols:{0:"单行数据",1:"单组数据",2:"多组数据"}},{field:"is_open",title:"前端调用",type:"switch"},{field:"status",title:"是否启用",type:"switch"},{type:"tool",title:"操作",width:200,btn:[{action:"edit"},{title:"配置",action:n},{action:"del"}]}],search:{cols:[{field:"title",title:"参数名称"}]},tools:[{title:"添加",type:"primary",action:"add"}]}}}};function Bv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return i.table?(s.openBlock(),s.createBlock(l,{key:0,onChange:a.change,ref:"table",init:i.table},null,8,["onChange","init"])):s.createCommentVNode("",!0)}const kv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(xv,[["render",Bv]])},Symbol.toStringTag,{value:"Module"})),Ev={data(){return{table:!1,id:0}},created(){const t=this.$get(),n=this;if(!t.id)return this.$msg.error("非法操作");this.id=t.id,this.$req.post("setting.table_list/info",{id:t.id}).then(function(r){n.loadData(r.data)})},methods:{loadData(t){const n=this;t.form.forEach(r=>{r.data_type==="number"&&(r.format=Number)}),this.table={url:"setting.table_list",title:t.title||"数据列表",where:{type_id:n.id},edit:{url:"setting.table_list/doedit",title:"修改",updateTable:!0,cols:[{field:"id",type:"hidden"},{field:"type_id",type:"hidden",value:t.id},{field:"type",type:"hidden",value:t.code}].concat(t.form)},del:{url:"setting.table_list/dodel"},add:{url:"setting.table_list/doadd",title:"添加"},cols:t.table.concat([{type:"tool",title:"操作",width:200,btn:[{title:"编辑",action:"edit"},{title:"删除",action:"del",confirm:!0}]}]),tools:[{title:"添加",icon:"ri-add-line",type:"primary",action:"add"}],search:{cols:t.search},batch:[{title:"批量删除",action:"$batch.del",confirm:!0}]}}}};function _v(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return i.table?(s.openBlock(),s.createBlock(l,{key:0,init:i.table,ref:"table"},null,8,["init"])):s.createCommentVNode("",!0)}const Av=Object.freeze(Object.defineProperty({__proto__:null,default:ne(Ev,[["render",_v]])},Symbol.toStringTag,{value:"Module"})),Nv={data(){return{table:!1}},created(){this.loadData()},methods:{loadData(){this.table={url:"../dev/table",title:"参数列表",del:{url:"dodel"},edit:{url:"doedit",title:"参数修改",cols:[{field:"id",type:"hidden"},{field:"sort",title:"排序",edit:!0},{field:"name",title:"标识"},{field:"title",title:"备注"},{field:"uid",type:"switch",title:"是否需要登录"},{field:"type",title:"数据类型",type:"radio",cols:[{label:"普通数据",value:0},{label:"树形数据",value:1}],required:!0},{field:"action",type:"group",title:"控制模型",limit:1,info:"控制模型中字段(id,uid除外)必须在数据模型中存在",cols:[{field:"search",title:"搜索字段",type:"tags"},{field:"table",title:"列表字段",type:"tags"},{field:"form",title:"表单字段",type:"tags"},{field:"sort",title:"排序字段",type:"tags",info:"默认排序规则 id desc"}]},{field:"model",type:"group",title:"数据模型",limit:32,info:"数据模型 不得使用id,type_id,uid字段,系统预设默认值 $add_time 创建时间,$edit_time 修改时间,$ip 客户端IP",cols:[{field:"title",title:"名称",inputWidth:"33.33%"},{field:"field",title:"字段",inputWidth:"33.33%"},{field:"default",title:"默认值",inputWidth:"33.33%"},{field:"type",title:"输入类型",inputWidth:"33.33%",type:"select",cols:{input:"文本",textarea:"多行文本",url:"链接",img:"图片",imgs:"多图",editor:"富文本",select:"下拉框",selects:"多级下拉框",radio:"单选框",switch:"开关",tags:"多标签",file:"文件",datetime:"时间",region:"地址",date:"日期",goods:"商品"}},{field:"info",inputWidth:"66.66%",title:"备注"},{field:"data_type",title:"数据类型",inputWidth:"33.33%",type:"radio",cols:{default:"默认",number:"数字"}},{field:"prop",type:"tags",inputWidth:"66.66%",title:"props"}]}]},add:{url:"doAdd",title:"添加"},search:{cols:[{field:"title",title:"名称"}]},cols:[{field:"sort",title:"排序",edit:!0},{field:"id",title:"ID"},{field:"name",title:"标识"},{field:"title",title:"名称"},{field:"status",title:"是否启用",type:"switch"},{type:"tool",title:"操作",width:200,btn:[{title:"数据列表",action:"/dev/setting/tablelist"},{action:"edit"},{action:"del"}]}],tools:[{action:"add"}]}}}};function Sv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return i.table?(s.openBlock(),s.createBlock(l,{key:0,ref:"table",init:i.table},null,8,["init"])):s.createCommentVNode("",!0)}const Fv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(Nv,[["render",Sv]])},Symbol.toStringTag,{value:"Module"})),Wu=[{title:"权限管理",path:"dev/menu"},{title:"广告管理",path:"dev/ad/index"},{title:"参数管理",list:[{title:"参数列表",path:"dev/setting/index"},{title:"参数分组",path:"dev/setting/cate"}]},{title:"超级表单",path:"dev/table/index"},{title:"插件管理",path:"dev/plugins/index"}],qu=Object.assign({"./dev/ad/index.vue":Y4,"./dev/index.vue":Q4,"./dev/log/index.vue":nv,"./dev/menu.vue":iv,"./dev/msg/detail.vue":cv,"./dev/msg/index.vue":fv,"./dev/plugins/index.vue":mv,"./dev/redis/index.vue":Cv,"./dev/setting/cate.vue":wv,"./dev/setting/index.vue":kv,"./dev/setting/tablelist.vue":Av,"./dev/table/index.vue":Fv}),Ku={};for(const t in qu){const n=t.slice(2,-4).split("/").join("");Ku[n]=qu[t].default}const Vv={components:Ku,data(){return{component:"dev/ad/index",menu:Wu}},methods:{menuClick(t){this.component=t.index}},computed:{menuOn(){let t={};for(const n of Wu)if(n.path==this.$route.path){t=n;break}else if(n.list&&(t=n.list.filter(r=>r.path===this.$route.path)[0],t))break;return t}}},Ov={class:"flex h-full w-full",style:{"--menu-width":"180px","--main-height":"calc(100vh - 300 px)"}},Tv={class:"w-180px h-full bg-main"},jv={class:"text-center font-bold flex items-center justify-between px h-12 leading-12"},Pv={class:"flex-1 mx"},Lv={class:"w-full overflow-x-hidden max-h-[calc(100vh-80px)]"};function Mv(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("el-menu-item"),u=s.resolveComponent("el-sub-menu"),d=s.resolveComponent("el-menu");return s.openBlock(),s.createElementBlock("div",Ov,[s.createElementVNode("div",Tv,[s.createVNode(d,{"default-active":i.component},{default:s.withCtx(()=>[s.createElementVNode("div",jv,[n[2]||(n[2]=s.createTextVNode(" 开发者 ",-1)),s.createVNode(l,{size:"small",onClick:n[0]||(n[0]=f=>t.$router.back())},{default:s.withCtx(()=>[...n[1]||(n[1]=[s.createTextVNode("返回",-1)])]),_:1})]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.menu,f=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[f.list?(s.openBlock(),s.createBlock(u,{key:0,index:f.title},{title:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(f.title),1)]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.list,p=>(s.openBlock(),s.createBlock(c,{onClick:a.menuClick,index:p.path,route:p.path},{title:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(p.title),1)]),_:2},1032,["onClick","index","route"]))),256))]),_:2},1032,["index"])):(s.openBlock(),s.createBlock(c,{key:1,onClick:a.menuClick,index:f.path},{title:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(f.title),1)]),_:2},1032,["onClick","index"]))],64))),256))]),_:1},8,["default-active"])]),s.createElementVNode("div",Pv,[s.createElementVNode("div",Lv,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.component.split("/").join(""))))])])])}const zv=ne(Vv,[["render",Mv]]),Ju=(t,n)=>{K4.install(t,n),a4.install(t),t.mixin(l4),t.directive("focus",{mounted(r){r.focus()}})},$v={install:Ju};function Iv(t,n){if(n<=0||n>=t.length)return[...t];const r=[...t];return[r[n],r[n-1]]=[r[n-1],r[n]],r}function Rv(t,n){if(n<0||n>=t.length-1)return[...t];const r=[...t];return[r[n],r[n+1]]=[r[n+1],r[n]],r}const Hv={name:"group-tabs-plus",components:{inputItem:s.defineAsyncComponent(()=>Promise.resolve().then(()=>lo))},emits:["change","update:modelValue"],props:{init:Object,size:{type:String,default:""},modelValue:Array},data(){return{tab:0,dataType:"Array",limit:4,key:1,alignTop:!1,list:[],cols:[]}},created(){this.init.cols&&(Array.isArray(this.init.cols)?this.cols=this.init.cols:typeof this.init.cols=="object"&&(this.cols=[this.init.cols]),this.init.size&&this.cols.forEach(t=>{t.size=this.init.size}),this.init.alignTop&&(this.alignTop=!0),this.init.limit>1&&(this.limit=this.init.limit),this.modelValue&&this.modelValue.constructor.name==="Object"?(this.dataType="Object",this.list=[this.modelValue]):this.modelValue&&this.modelValue.constructor.name==="Array"&&(this.list=this.modelValue),this.limit===1&&(this.dataType="Object",this.modelValue||(this.list=[{}])),this.$watch("list",function(t,n){this.dataType==="Object"&&(t=t[0]),this.$emit("update:modelValue",t),this.$emit("change",t)},{deep:!0}))},methods:{change(){this.key++},moveDown(){this.list=Rv(this.list,this.tab),this.tab=this.tab+1,this.key++},moveUp(){this.list=Iv(this.list,this.tab),this.tab=this.tab-1,this.key++},removeTab(){this.list.splice(this.tab,1),this.tab=this.list.length-1},addTab(){if(this.list.length>=this.limit)return $msg.info("只能添加"+this.limit+"条数据");this.list.push({}),this.tab=this.list.length-1}}},Uv={class:"group-tabs-plus pb bg-main"},Wv={class:"flex justify-between pr pb-3 b-b"},qv={class:"flex justify-end"},Kv={class:"input-group-item"},Jv={class:"item"},Gv={class:"input w-full"},Yv={class:"input-item-input"},Zv={key:0,class:"input-item-info text-3 op-70 pt-xs leading-15"},Xv={class:"flex justify-end mt mr"},Qv={key:0,class:"flex justify-center py"};function eD(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("inputItem"),u=s.resolveComponent("el-tab-pane"),d=s.resolveComponent("el-tabs");return s.openBlock(),s.createElementBlock("div",Uv,[s.createVNode(d,{class:"group-tabs-plus-tabs",type:"card",modelValue:i.tab,"onUpdate:modelValue":n[0]||(n[0]=f=>i.tab=f)},{default:s.withCtx(()=>[s.createElementVNode("div",Wv,[s.createElementVNode("div",qv,[i.tab>0?(s.openBlock(),s.createBlock(l,{key:0,type:"default",size:"small",onClick:a.moveUp},{default:s.withCtx(()=>[...n[1]||(n[1]=[s.createTextVNode("前移",-1)])]),_:1},8,["onClick"])):s.createCommentVNode("",!0),i.tab>=0&&i.tab<i.list.length-1?(s.openBlock(),s.createBlock(l,{key:1,type:"default",size:"small",onClick:a.moveDown},{default:s.withCtx(()=>[...n[2]||(n[2]=[s.createTextVNode("后移",-1)])]),_:1},8,["onClick"])):s.createCommentVNode("",!0)]),s.createVNode(l,{type:"primary",size:"small",plain:"",onClick:a.addTab},{default:s.withCtx(()=>[s.createTextVNode("添加数据("+s.toDisplayString(i.list.length)+"/"+s.toDisplayString(i.limit)+")",1)]),_:1},8,["onClick"])]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(f,p)=>(s.openBlock(),s.createBlock(u,{label:"数据/"+(p+1),name:p},{default:s.withCtx(()=>[s.createElementVNode("div",Kv,[s.createElementVNode("div",Jv,[s.createElementVNode("div",Gv,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,h=>(s.openBlock(),s.createElementBlock("div",{class:"input-item",style:s.normalizeStyle({width:h.inputWidth?h.inputWidth:"100%"})},[s.createElementVNode("div",{class:s.normalizeClass(["input-item-box",r.init.alignTop?"flex flex-col gap-2 *:w-full!":"text-right"])},[h.title?(s.openBlock(),s.createElementBlock("div",{key:0,class:"input-item-title",style:s.normalizeStyle(`width:${h.labelWidth||r.init.labelWidth};`)},s.toDisplayString(h.title)+": ",5)):s.createCommentVNode("",!0),s.createElementVNode("div",Yv,[h.field?(s.openBlock(),s.createBlock(c,{key:i.key,modelValue:i.list[p][h.field],"onUpdate:modelValue":m=>i.list[p][h.field]=m,index:p,prop:h},null,8,["modelValue","onUpdate:modelValue","index","prop"])):s.createCommentVNode("",!0)])],2),h.info?(s.openBlock(),s.createElementBlock("div",Zv,[n[3]||(n[3]=s.createElementVNode("i",{class:"i-ri-error-warning-line"},null,-1)),s.createTextVNode(" "+s.toDisplayString(h.info),1)])):s.createCommentVNode("",!0)],4))),256))])])]),s.createElementVNode("div",Xv,[s.createVNode(l,{type:"danger",size:"small",plain:"",onClick:a.removeTab},{default:s.withCtx(()=>[...n[4]||(n[4]=[s.createTextVNode("删除此项",-1)])]),_:1},8,["onClick"])])]),_:2},1032,["label","name"]))),256))]),_:1},8,["modelValue"]),i.list.length===0?(s.openBlock(),s.createElementBlock("div",Qv,"点击右上方按钮添加数据")):s.createCommentVNode("",!0)])}const tD=Object.freeze(Object.defineProperty({__proto__:null,default:ne(Hv,[["render",eD]])},Symbol.toStringTag,{value:"Module"})),nD={name:"group-tabs",components:{inputItem:s.defineAsyncComponent(()=>Promise.resolve().then(()=>lo))},emits:["change","update:modelValue"],props:{init:Object,size:{type:String,default:""},modelValue:Array|Object},data(){return{tabs:[],dataType:"Array",limit:1,key:1,alignTop:!1,list:[],cols:[]}},created(){this.init.tabs&&typeof this.init.tabs=="function"?this.tabs=this.init.tabs(this.modelValue):this.init.tabs&&(this.tabs=this.init.tabs),this.init.cols&&(Array.isArray(this.init.cols)?this.cols=this.init.cols:typeof this.init.cols=="object"&&(this.cols=[this.init.cols]),this.init.size&&this.cols.forEach(t=>{t.size=this.init.size}),this.init.alignTop&&(this.alignTop=!0),this.init.limit>1&&(this.limit=this.init.limit),this.modelValue&&this.modelValue.constructor.name==="Object"?(this.dataType="Object",this.list=[this.modelValue]):this.modelValue&&this.modelValue.constructor.name==="Array"&&(this.list=this.modelValue),this.limit===1&&(this.dataType="Object",this.modelValue||(this.list=[{}])),this.$watch("list",function(t,n){this.dataType==="Object"&&(t=t[0]),this.$emit("update:modelValue",t),this.$emit("change",t)},{deep:!0}))},methods:{change(){this.key++},del(t){this.list.splice(t,1),this.key++},add(){this.list.push({})}}},rD={class:"group-tabs"},oD={class:"input-group-item"},iD={class:"item"},sD={class:"input w-full"},aD={class:"input-item-box"},lD={class:"input-item-input"},cD={key:0,class:"input-item-info text-3 op-70 pt-xs leading-15"};function uD(t,n,r,o,i,a){const l=s.resolveComponent("inputItem"),c=s.resolveComponent("el-tab-pane"),u=s.resolveComponent("el-tabs");return s.openBlock(),s.createElementBlock("div",rD,[s.createVNode(u,{type:"border-card"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.tabs,(d,f)=>(s.openBlock(),s.createBlock(c,{label:d.label},{default:s.withCtx(()=>[s.createElementVNode("div",oD,[s.createElementVNode("div",iD,[s.createElementVNode("div",sD,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,p=>(s.openBlock(),s.createElementBlock("div",{class:"input-item",style:s.normalizeStyle({width:p.inputWidth?p.inputWidth:"100%"})},[s.createElementVNode("div",aD,[p.title?(s.openBlock(),s.createElementBlock("div",{key:0,class:"input-item-title",style:s.normalizeStyle(`width:${p.labelWidth||r.init.labelWidth};`)},s.toDisplayString(p.title)+": ",5)):s.createCommentVNode("",!0),s.createElementVNode("div",lD,[p.field?(s.openBlock(),s.createBlock(l,{key:0,modelValue:r.modelValue[d.value||f][p.field],"onUpdate:modelValue":h=>r.modelValue[d.value||f][p.field]=h,index:f,prop:p},null,8,["modelValue","onUpdate:modelValue","index","prop"])):i.cols.length===1?(s.openBlock(),s.createBlock(l,{key:1,modelValue:r.modelValue[d.value||f],"onUpdate:modelValue":h=>r.modelValue[d.value||f]=h,index:f,prop:p},null,8,["modelValue","onUpdate:modelValue","index","prop"])):s.createCommentVNode("",!0)])]),p.info?(s.openBlock(),s.createElementBlock("div",cD,[n[0]||(n[0]=s.createElementVNode("i",{class:"i-ri-error-warning-line"},null,-1)),s.createTextVNode(" "+s.toDisplayString(p.info),1)])):s.createCommentVNode("",!0)],4))),256))])])])]),_:2},1032,["label"]))),256))]),_:1})])}const dD=Object.freeze(Object.defineProperty({__proto__:null,default:ne(nD,[["render",uD]])},Symbol.toStringTag,{value:"Module"})),fD={name:"form-group",components:{inputItem:s.defineAsyncComponent(()=>Promise.resolve().then(()=>lo))},emits:["change","update:modelValue"],props:{size:{type:String,default:""},init:Object,modelValue:Array|Object},data(){return{dataType:"Array",limit:1,key:1,list:[],cols:[]}},created(){this.cols=this.init.cols;const t=this.cols.filter(r=>!r.width).length,n=`calc(${(100/t).toFixed(1)+"%"} - ${(80/t).toFixed(1)+"px"})`;this.init.size&&this.cols.forEach(r=>{r.size=this.init.size,r.width||(r.width=n)}),this.init.limit>1&&(this.limit=this.init.limit),this.modelValue&&this.modelValue.constructor.name==="Object"?(this.dataType="Object",this.list=[this.modelValue]):this.modelValue&&this.modelValue.constructor.name==="Array"?this.list=this.modelValue:this.limit===1&&(this.dataType="Object"),this.$watch("list",function(r,o){this.dataType==="Object"&&(r=r[0]),this.$emit("update:modelValue",r),this.$emit("change",r)},{deep:!0})},methods:{change(){this.key++},change2(t,n,r){r.field?this.list[n][r.field]=t:this.list[n]=t},del(t){this.list.splice(t,1),this.key++},add(){this.list.push({})}}},pD={class:"input-group-table"},hD={align:"left"},mD={style:{"line-height":"1.2"}},gD=["onClick"],yD={class:"text-3 op-70 pl-sm"};function bD(t,n,r,o,i,a){const l=s.resolveComponent("el-tooltip"),c=s.resolveComponent("inputItem");return s.openBlock(),s.createElementBlock("div",pD,[s.createElementVNode("table",null,[s.createElementVNode("colgroup",null,[n[1]||(n[1]=s.createElementVNode("col",{width:40},null,-1)),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,u=>(s.openBlock(),s.createElementBlock("col",{style:s.normalizeStyle({width:u.width})},null,4))),256)),n[2]||(n[2]=s.createElementVNode("col",{width:40},null,-1))]),s.createElementVNode("thead",null,[s.createElementVNode("tr",null,[n[4]||(n[4]=s.createElementVNode("th",null,null,-1)),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,u=>(s.openBlock(),s.createElementBlock("th",hD,[s.createElementVNode("div",mD,[s.createTextVNode(s.toDisplayString(u.title)+" ",1),u.info?(s.openBlock(),s.createBlock(l,{key:0,content:u.info,placement:"bottom",effect:"light"},{default:s.withCtx(()=>[...n[3]||(n[3]=[s.createElementVNode("i",{class:"i-ri-question-line op-70"},null,-1)])]),_:1},8,["content"])):s.createCommentVNode("",!0)])]))),256)),n[5]||(n[5]=s.createElementVNode("th",{align:"right"},null,-1))])]),(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.limit>1?"a-draggable":"span"),s.mergeProps({tag:"tbody"},i.limit>1?{filter:".del",handle:".sort",list:i.list,onChange:a.change}:{}),{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(u,d)=>(s.openBlock(),s.createElementBlock("tr",null,[n[7]||(n[7]=s.createElementVNode("td",null,[s.createElementVNode("div",{class:"sort op-70",title:"拖动排序"},[s.createElementVNode("i",{class:"i-ri-menu-line"})])],-1)),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,f=>(s.openBlock(),s.createElementBlock("td",null,[(s.openBlock(),s.createBlock(c,{clearable:f.clearable??r.init.clearable??!1,cols:i.cols,index:d,key:i.key,prop:f,"onUpdate:modelValue":p=>a.change2(p,d,f),"model-value":f.field?u[f.field]:u},null,8,["clearable","cols","index","prop","onUpdate:modelValue","model-value"]))]))),256)),s.createElementVNode("td",null,[s.createElementVNode("div",{title:"删除",class:"del op-70 flex",onClick:f=>a.del(d)},[...n[6]||(n[6]=[s.createElementVNode("i",{class:"i-ri-delete-bin-line"},null,-1)])],8,gD)])]))),256))]),_:1},16))]),i.list.length<i.limit?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["add flex justify-center items-center info-hide",{"add-small":r.init.size==="small"}]),onClick:n[0]||(n[0]=(...u)=>a.add&&a.add(...u))},[n[8]||(n[8]=s.createElementVNode("i",{class:"i-ri-add-line font-xl"},null,-1)),n[9]||(n[9]=s.createElementVNode("span",null,"添加数据",-1)),s.createElementVNode("span",yD,"("+s.toDisplayString(i.list.length)+"/"+s.toDisplayString(i.limit)+")",1)],2)):s.createCommentVNode("",!0)])}const CD=Object.freeze(Object.defineProperty({__proto__:null,default:ne(fD,[["render",bD],["__scopeId","data-v-ffa2bfb0"]])},Symbol.toStringTag,{value:"Module"})),vD={name:"form-group",components:{inputItem:s.defineAsyncComponent(()=>Promise.resolve().then(()=>lo))},emits:["change","update:modelValue"],props:{init:Object,size:{type:String,default:""},modelValue:Array|Object},data(){return{config:{text:"添加数据"},dataType:"Array",limit:1,key:1,alignTop:!1,list:[],cols:[]}},created(){this.cols=this.init.cols,(this.init.size||this.size)&&this.cols.forEach(t=>{t.size=this.init.size||this.size}),this.init.alignTop&&(this.alignTop=!0),this.init.config&&(this.config=this.init.config),this.init.limit>1&&(this.limit=this.init.limit),this.modelValue&&this.modelValue.constructor.name==="Object"?(this.dataType="Object",this.list=[this.modelValue]):this.modelValue&&this.modelValue.constructor.name==="Array"&&(this.list=this.modelValue),this.limit===1&&(this.dataType="Object",this.modelValue||(this.list=[{}])),this.$watch("list",function(t,n){this.dataType==="Object"&&(t=t[0]),this.$emit("update:modelValue",t),this.$emit("change",t)},{deep:!0})},methods:{change(){this.key++},change2(t,n,r){r.field?this.list[n][r.field]=t:this.list[n]=t},del(t){this.list.splice(t,1),this.key++},add(){this.list.push({})}}},DD={class:"input-group-item"},wD={key:0,class:"sort",title:"拖动排序"},xD={class:"item"},BD={class:"input w-full"},kD={key:0,class:"input-item-title break-all"},ED={class:"input-item-input"},_D={key:0,class:"input-item-info text-3 op-70 pt-xs",style:{"line-height":"1.5"}},AD=["onClick"],ND={class:"text-3 op-70 pl-sm"};function SD(t,n,r,o,i,a){const l=s.resolveComponent("inputItem");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["input-group",i.limit==1?"input-group-one":""])},[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.limit>1?"a-draggable":"span"),s.normalizeProps(s.guardReactiveProps(i.limit>1?{filter:".del",handle:".sort",list:i.list,onChange:a.change}:{})),{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(c,u)=>(s.openBlock(),s.createElementBlock("div",DD,[i.limit!=1?(s.openBlock(),s.createElementBlock("div",wD,[...n[1]||(n[1]=[s.createElementVNode("i",{class:"i-ri-menu-line"},null,-1)])])):s.createCommentVNode("",!0),s.createElementVNode("div",xD,[s.createElementVNode("div",BD,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,d=>(s.openBlock(),s.createElementBlock("div",{class:"input-item",style:s.normalizeStyle({width:d.inputWidth?d.inputWidth:"100%"})},[s.createElementVNode("div",{class:s.normalizeClass(["input-item-box",{"input-item-box-h":i.alignTop}])},[d.title?(s.openBlock(),s.createElementBlock("div",kD,s.toDisplayString(d.title)+": ",1)):s.createCommentVNode("",!0),s.createElementVNode("div",ED,[(s.openBlock(),s.createBlock(l,{size:r.size,cols:i.cols,index:u,key:i.key,prop:d,"onUpdate:modelValue":f=>a.change2(f,u,d),"model-value":d.field?c[d.field]:c},null,8,["size","cols","index","prop","onUpdate:modelValue","model-value"]))])],2),d.info?(s.openBlock(),s.createElementBlock("div",_D,[n[2]||(n[2]=s.createElementVNode("i",{class:"i-ri-error-warning-line"},null,-1)),s.createTextVNode(" "+s.toDisplayString(d.info),1)])):s.createCommentVNode("",!0)],4))),256))]),i.limit!=1?(s.openBlock(),s.createElementBlock("div",{key:0,class:"del",onClick:d=>a.del(u)},[...n[3]||(n[3]=[s.createElementVNode("i",{class:"i-ri-close-line"},null,-1)])],8,AD)):s.createCommentVNode("",!0)])]))),256))]),_:1},16)),i.limit!=1&&i.list.length<i.limit?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["add flex justify-center items-center",{"add-small":r.init.size==="small"}]),onClick:n[0]||(n[0]=(...c)=>a.add&&a.add(...c))},[n[4]||(n[4]=s.createElementVNode("i",{class:"i-ri-add-line font-xl"},null,-1)),s.createElementVNode("span",null,s.toDisplayString(i.config.text),1),s.createElementVNode("span",ND,"("+s.toDisplayString(i.list.length)+"/"+s.toDisplayString(i.limit)+")",1)],2)):s.createCommentVNode("",!0)],2)}const FD=Object.freeze(Object.defineProperty({__proto__:null,default:ne(vD,[["render",SD],["__scopeId","data-v-840e2a2b"]])},Symbol.toStringTag,{value:"Module"})),VD={backgroundColor:"transparent",textStyle:{},title:{textStyle:{color:"#eeeeee"},subtextStyle:{color:"#aaaaaa"}},categoryAxis:{axisLine:{lineStyle:{color:"#eeeeee"}},axisTick:{lineStyle:{color:"#eeeeee"}},axisLabel:{color:"#eeeeee"},splitLine:{lineStyle:{color:["#aaaaaa"]}},splitArea:{show:!1,areaStyle:{color:["#eeeeee"]}}},valueAxis:{axisLine:{show:!0,lineStyle:{color:"#eeeeee"}},axisTick:{show:!0,lineStyle:{color:"#eeeeee"}},axisLabel:{show:!0,color:"#eeeeee"},splitLine:{show:!0,lineStyle:{color:["#aaaaaa"]}},splitArea:{show:!1,areaStyle:{color:["#eeeeee"]}}},legend:{textStyle:{color:"#eeeeee"}},tooltip:{axisPointer:{lineStyle:{color:"#eeeeee",width:"1"},crossStyle:{color:"#eeeeee",width:"1"}}},timeline:{lineStyle:{color:"#eeeeee",width:1},itemStyle:{color:"#dd6b66",borderWidth:1},controlStyle:{color:"#eeeeee",borderColor:"#eeeeee",borderWidth:.5},checkpointStyle:{color:"#e43c59",borderColor:"#c23531"},label:{color:"#eeeeee"},emphasis:{itemStyle:{color:"#a9334c"},controlStyle:{color:"#eeeeee",borderColor:"#eeeeee",borderWidth:.5},label:{color:"#eeeeee"}}},visualMap:{color:["#bf444c","#d88273","#f6efa6"]},dataZoom:{backgroundColor:"rgba(47,69,84,0)",dataBackgroundColor:"rgba(255,255,255,0.3)",fillerColor:"rgba(167,183,204,0.4)",handleColor:"#a7b7cc",handleSize:"100%",textStyle:{color:"#eeeeee"}},markPoint:{label:{color:"#eeeeee"},emphasis:{label:{color:"#eeeeee"}}}},fo={};function OD(t,n=.5){if(t.startsWith("rgba"))return t.replace(/[\d\.]+\)$/g,`${n})`);if(t.startsWith("rgb"))return t.replace("rgb","rgba").replace(")",`, ${n})`);if(t.startsWith("#")){if(t.length===4){const r=parseInt(t[1]+t[1],16),o=parseInt(t[2]+t[2],16),i=parseInt(t[3]+t[3],16);return`rgba(${r}, ${o}, ${i}, ${n})`}if(t.length===7){const r=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),i=parseInt(t.slice(5,7),16);return`rgba(${r}, ${o}, ${i}, ${n})`}if(t.length===9){const r=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),i=parseInt(t.slice(5,7),16),a=parseInt(t.slice(7,9),16)/255;return`rgba(${r}, ${o}, ${i}, ${a*n})`}}return t.startsWith("hsl")?t.startsWith("hsla")?t.replace(/[\d\.]+\)$/g,`${n})`):t.replace("hsl","hsla").replace(")",`, ${n})`):t.startsWith("hsla")?t.replace(/[\d\.]+\)$/g,`${n})`):t}const nr=(t=["#eee","#999"])=>(t=Array.isArray(t)?t:[OD(t,.7),t],{type:"linear",x:0,x2:0,y:0,y2:1,colorStops:[{offset:0,color:t[0]},{offset:1,color:t[1]}]}),TD=(t=-1)=>{const n=$store.theme+$store.dark;if(!fo[n]){const r=$store.theme,o={yellow:"#f59e0b",green:"#22c55e",purple:"#f43f5e",blue:"#3b82f6",red:"#f2140d"},i={yellow:"#eedd78",green:"#91ca8c",purple:"#e69d87",blue:"#73b9bc",red:"#dd6b66"};delete i[r],delete o[r];const a=[nr($theme("primary"))];if($store.dark){for(const l in i)a.push(nr(i[l]));for(const l in o)a.push(nr(o[l]))}else{for(const l in o)a.push(nr(o[l]));for(const l in i)a.push(nr(i[l]))}fo[n]=a}return t>-1?fo[n][t]:fo[n]},jD={class:"echarts"},PD={class:"chart-slot"},LD=Object.freeze(Object.defineProperty({__proto__:null,default:s.defineComponent({__name:"chart",props:{init:{type:Object,default:()=>({})},data:{type:[Boolean,Object],default:!1},type:String,asyncData:{type:[Function,String]}},setup(t){const n=t,r=s.ref(null),o=s.ref(!0),i=s.ref(null),a=()=>{const v=$store.dark?VD:{};return v.color=TD(),v},l={type:"bar",yAxisIndex:0,itemStyle:{borderRadius:[4,4,0,0]}},c={yAxisIndex:0,type:"line",smooth:!1},u=s.ref({}),d=(v,D)=>{D?.[0]&&typeof D?.[0]=="object"&&!Array.isArray(D[0])&&(v={...v,...D[0]});const{type:w="line"}=v;let b=v||{};if(b.tooltip===void 0&&(b.tooltip={trigger:"axis"}),b.mini)return b.grid=b.grid||{left:10,right:10,bottom:0,top:10},b.xAxis={show:!1,data:Array.isArray(D)?D.slice(1).map(x=>x[0]):Object.keys(D)},typeof b.color=="string"?b.color=[b.color]:typeof b.color=="number"&&(b.color=[a().color[b.color]]),b.yAxis={type:"value",show:!1},w=="line"?b.series={type:"line",areaStyle:{},smooth:!0}:b.series={type:"bar"},delete b.mini,b.series.data=Array.isArray(D)?D.slice(1).map(x=>x[1]):Object.values(D),b;if(b.grid===void 0&&(b.grid={top:0,left:0,right:0,bottom:80}),b.legend===void 0&&(b.legend={}),b.xAxis===void 0&&(b.xAxis={type:"category"}),b.yAxis===void 0&&(b.yAxis={}),b.series===void 0){const x=[];D[0].forEach((k,E)=>{if(E>0){const V=(typeof k=="object"?k.type:Array.isArray(w)?w[E-1]:w)==="bar"?l:c;k?.yAxisIndex&&(b.yAxis=[{},{}]),x.push({...V,...typeof k=="object"?k:{}})}}),b.series=x}return typeof D=="object"&&(D[0]=D[0].map(x=>typeof x=="object"?x.name:x),b.dataset={source:D}),console.log("series",b),b},f=v=>{n.init.type=="pie"?p(v):n.init.type=="map"?h(v):m(v)},p=v=>{let D=n.init;delete D.type,v?.[0]&&typeof v?.[0]=="object"&&!Array.isArray(v[0])&&(D={...n.init,...v[0]}),D.tooltip===void 0&&(D.tooltip={});const w=D.legend?"60%":"80%";if(v){if(D.series={type:"pie",radius:w,data:[],...D.series},!D.series.data.length&&Array.isArray(v))D.series.data=v.filter(b=>Array.isArray(b)).map(b=>({name:b[0],value:b[1]}));else if(!D.series.data.length&&typeof v=="object"){for(const b in v)if(Object.prototype.hasOwnProperty.call(v,b)){const x=v[b];D.series.data.push({value:x,name:b})}}}u.value=D,g()},h=async v=>{let D=0;v&&(D=v[0].value);let w=n.init,b=w.adcode||1e5,x={1e5:"china"}[b]||"map";const k=await $req.query(`https://geo.datav.aliyun.com/areas_v3/bound/${b}_full.json`),E=vo.init(i.value);w.visualMap={text:["高","低"],min:0,max:D,calculable:!0,orient:"horizontal",bottom:20,inRange:{color:["#ebf5ff","#409eff"]}},w.series={type:"map",map:x,label:{show:!0,color:"#999",fontSize:10},itemStyle:{areaColor:"#ecf5ff",borderColor:"#dddddd"}},w.series.data=v,vo.registerMap(x,k),E.setOption(w),r.value=E,o.value=!1},m=v=>{if(v[0]==="pie"||v?.[0]?.type==="pie")return p(v);u.value=n.type==="native"?n.init:d(n.init,v);try{g()}catch{}},g=()=>{const v=vo.init(i.value,a(),{renderer:"svg"});v.setOption(u.value),r.value=v,o.value=!1};s.watch(()=>[$store.dark,$store.theme],()=>{r.value&&r.value.setTheme(a())}),s.onMounted(()=>{n.asyncData&&typeof n.asyncData=="function"?n.asyncData(f):f(n.data)}),s.onUnmounted(()=>{r.value&&r.value.dispose(),window.removeEventListener("resize",y)});const y=()=>{r.value&&r.value.resize()};return window.addEventListener("resize",y),(v,D)=>{const w=s.resolveDirective("loading");return s.openBlock(),s.createElementBlock("div",jD,[s.withDirectives((s.openBlock(),s.createElementBlock("div",PD,[s.unref(o)?s.createCommentVNode("",!0):s.renderSlot(v.$slots,"default",{key:0})])),[[w,s.unref(o)]]),s.createElementVNode("div",{class:"chart-box",ref_key:"echartsRef",ref:i},null,512)])}}})},Symbol.toStringTag,{value:"Module"}));ut.adminDev=zv,ut.default=$v,ut.install=Ju,Object.defineProperties(ut,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
42
|
+
工单号 {{character_string1.DATA}}`},tabs:["基础设置","站内信","短信","微信公众号"],cols:[{field:"is_msg",title:"站内信",type:"radio-button",cols:[{label:"开启",value:1},{label:"关闭",value:0},{label:"禁用",value:-1}]},{field:"is_mp",title:"微信公众号",type:"radio-button",cols:[{label:"开启",value:1},{label:"关闭",value:0},{label:"禁用",value:-1}]},{field:"is_sms",title:"短信",type:"radio-button",cols:[{label:"开启",value:1},{label:"关闭",value:0},{label:"禁用",value:-1}]},{field:"sort",title:"模版配置",type:"group",limit:10,labelWidth:"70px",cols:[{field:"tmp",title:"变量名称",inputWidth:"33%"},{field:"sys",title:"系统变量",inputWidth:"33%"},{field:"tmp",title:"公众号变量",inputWidth:"33%"}]},{field:"msg",title:"站内信模版",type:"textarea",tab:1},{field:"sms_id",title:"短信ID",tab:2},{field:"sms_tpl",title:"短信模版",type:"textarea",tab:2,disabled:!0},{field:"id",title:"公众号模版编号",type:"number",tab:3},{field:"id",title:"公众号模版ID",tab:3},{field:"info",title:"模版",type:"textarea",tab:3}]}}}},lv={class:"pd bg-main"};function cv(t,n,r,o,i,a){const l=s.resolveComponent("admin-form");return s.openBlock(),s.createElementBlock("div",lv,[s.createVNode(l,{class:"bg-main",init:i.init},null,8,["init"])])}const uv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(av,[["render",cv]])},Symbol.toStringTag,{value:"Module"})),dv={data(){return{init:{}}},created(){this.init={url:"dev.msg",title:"消息设置",edit:{url:"doEdit",title:"tabs",tabs:["基础设置","站内信","短信","微信公众号"],cols:[{field:"id",type:"hidden"},{field:"title",title:"消息名称"},{field:"type",title:"消息类型",type:"radio",cols:["通知用户","通知平台"]},{field:"code",title:"消息编码",colWidth:"50%"},{field:"sort",title:"排序",type:"number",colWidth:"25%"},{field:"is_msg",title:"站内信",type:"radio",tab:1,cols:[{label:"开启",value:1},{label:"关闭",value:0},{label:"禁用",value:-1}]},{field:"is_sms",title:"短信",type:"radio",tab:2,cols:[{label:"开启",value:1},{label:"关闭",value:0},{label:"禁用",value:-1}]},{field:"is_mp",title:"微信公众号",type:"radio",tab:3,cols:[{label:"开启",value:1},{label:"关闭",value:0},{label:"禁用",value:-1}]},{field:"mapping",title:"变量映射",type:"group-table",limit:10,cols:[{field:"title",title:"变量名称",inputWidth:"25%"},{field:"sys",title:"系统变量",inputWidth:"25%"},{field:"msg",title:"站内信变量",inputWidth:"25%"},{field:"mp",title:"公众号变量",inputWidth:"25%"},{field:"sms",title:"手机变量",inputWidth:"25%"}]},{field:"msg_data.tpl",title:"站内信模版",type:"textarea",rows:3,tab:1,changeField:["is_msg"],change:t=>{const{input:n,data:r}=t;n.disabled=r.is_msg==-1}},{field:"sms_data.id",title:"短信ID",tab:2,changeField:["is_sms"],change:t=>{const{input:n,data:r}=t;n.disabled=r.is_sms==-1}},{field:"sms_data.tpl",title:"短信模版",type:"textarea",rows:3,tab:2,changeField:["is_sms"],change:t=>{const{input:n,data:r}=t;n.disabled=r.is_sms==-1}},{field:"mp_data.code",title:"模版编号",tab:3,changeField:["is_mp"],change:t=>{const{input:n,data:r}=t;n.disabled=r.is_mp==-1}},{field:"mp_data.id",title:"模版ID",tab:3,changeField:["is_mp"],change:t=>{const{input:n,data:r}=t;n.disabled=r.is_mp==-1}}]},del:{url:"doDel"},add:{url:"doAdd",title:"tabs"},cols:[{type:"checkbox",width:60},{field:"id",title:"ID",width:60,sort:!0},{field:"sort",title:"排序",width:60,edit:!0},{field:"title",title:"消息名称",edit:!0},{field:"code",title:"消息代码",edit:!0},{field:"info",title:"消息说明",edit:!0},{field:"type",title:"通知类型",type:"text",cols:{0:"通知用户",1:"通知平台"}},{field:"is_msg",title:"站内信",type:"status",cols:{"-1":["禁用","end"],0:["关闭","info"],1:["开启","primary"]},width:100},{field:"is_mp",title:"公众号",type:"status",cols:{"-1":["禁用","end"],0:["关闭","info"],1:["开启","primary"]},width:100},{field:"is_sms",title:"短信",type:"status",cols:{"-1":["禁用","end"],0:["关闭","info"],1:["开启","primary"]},width:100},{field:"mark",title:"备注",edit:!0},{type:"tool",title:"操作",width:100,btn:[{title:"修改",action:"edit"}]}],tools:[{title:"同步微信模板消息",type:"default",action:"wxsync"},{action:"add"}],search:{cols:[{field:"title",title:"消息名称",placeholder:"输入关键词"},{field:"code",title:"消息代码"},{field:"id",title:"消息ID"}]}}}};function fv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return s.openBlock(),s.createBlock(l,{init:i.init},null,8,["init"])}const pv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(dv,[["render",fv]])},Symbol.toStringTag,{value:"Module"})),hv={data(){return{cateValue:"",table:!1}},created(){this.$req.post("../dev/setting/cate").then(t=>{this.loadData(t.data)})},methods:{change(t){this.cateValue=t.data},loadData(t){const n={url:"doEdit",title:"插件配置",cols:[{field:"id",type:"hidden"},{field:"tips",title:"说明",value:"非开发者禁止操作!!!",type:"text"},{field:"type",title:"数据类型",type:"radio",cols:[{label:"单行数据",value:0},{label:"单组数据",value:1},{label:"多组数据",value:2}],required:!0},{field:"max",title:"最大数据量",type:"number",info:"只适用于[多组数据]类型"},{field:"model",type:"group",title:"数据模型",limit:20,cols:[{field:"title",inputWidth:"33.33%",title:"名称"},{field:"field",inputWidth:"33.33%",title:"字段"},{field:"type",title:"类型",type:"input-auto",inputWidth:"33.33%",list:{input:"文本",textarea:"多行文本",url:"链接",img:"图片",imgs:"多图","image-text":"图文编辑器",editor:"富文本",radio:"单选框",checkbox:"多选框",switch:"开关",tags:"多标签",color:"颜色选择器",file:"文件",md5:"随机秘钥"}},{field:"info",title:"提示"},{field:"prop",type:"tags",title:"props"}]}]};this.table={url:"../dev/plugins",title:"插件列表",cate:{cols:[{title:"",field:"tag",cols:{"":"全部",...t}}]},where:{tag:""},del:{url:"doDel"},edit:{url:"doEdit",title:"参数修改",noChangeTip:!1,cols:[{field:"id",type:"hidden"},{field:"tag",title:"分组",type:"select",cols:t,required:!0},{field:"title",title:"名称",required:!0},{field:"code",title:"编码",required:!0}]},add:{url:"doAdd",title:"参数添加",data:{tag:s.computed(()=>this.cateValue)}},cols:[{field:"sort",title:"排序",edit:!0},{field:"title",title:"名称"},{field:"code",title:"编码"},{field:"tag",title:"分组",type:"text",sort:!0,cols:t},{field:"type",title:"类型",type:"text",cols:{0:"单行数据",1:"单组数据",2:"多组数据"}},{field:"is_open",title:"前端调用",type:"switch"},{field:"status",title:"是否启用",type:"switch"},{type:"tool",title:"操作",width:200,btn:[{action:"edit"},{title:"配置",action:n},{action:"del"}]}],search:{cols:[{field:"title",title:"参数名称"}]},tools:[{title:"添加",type:"primary",action:"add"}]}}}};function mv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return i.table?(s.openBlock(),s.createBlock(l,{key:0,onChange:a.change,ref:"table",init:i.table},null,8,["onChange","init"])):s.createCommentVNode("",!0)}const gv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(hv,[["render",mv]])},Symbol.toStringTag,{value:"Module"})),yv={data(){return{table:!1}},created(){this.loadData()},methods:{loadData(){this.table={url:"redis",title:"redis",del:{url:"dodel"},edit:{url:"doedit",title:"参数修改",cols:[{field:"id",type:"hidden"},{field:"sort",title:"排序",edit:!0},{field:"uid",type:"switch",title:"是否需要登录"},{field:"type",title:"数据类型",type:"radio",cols:[{label:"普通数据",value:0},{label:"树形数据",value:1}],required:!0},{field:"action",type:"group",title:"控制模型",limit:1,info:"控制模型中字段(id,uid除外)必须在数据模型中存在",cols:[{field:"search",title:"搜索字段",type:"tags"},{field:"table",title:"列表字段",type:"tags"},{field:"form",title:"表单字段",type:"tags"},{field:"sort",title:"排序字段",type:"tags",info:"默认排序规则 id desc"}]}]},add:{url:"doAdd",title:"添加"},search:{cols:[{field:"title",title:"名称"}]},cols:[{field:"key",title:"key",width:300},{field:"type",title:"类型",width:100},{field:"value",title:"值",slot:!0},{type:"tool",title:"操作",width:200,btn:[{action:"edit"},{action:"del"}]}],tools:[{action:"add"}]}}}},bv={class:"w-1000px break-words"};function Cv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return i.table?(s.openBlock(),s.createBlock(l,{key:0,ref:"table",init:i.table},{"cols.value":s.withCtx(({row:c})=>[s.createElementVNode("div",bv,s.toDisplayString(c.value),1)]),_:1},8,["init"])):s.createCommentVNode("",!0)}const vv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(yv,[["render",Cv]])},Symbol.toStringTag,{value:"Module"})),Dv={data(){return{table:{}}},created(){this.table={url:"../dev/setting_cate",title:"参数分组",page:!1,del:{url:"doDel"},edit:{url:"doEdit",title:"修改",cols:[{field:"id",type:"hidden"},{field:"title",title:"名称",required:!0},{field:"code",title:"编码",required:!0},{field:"width",type:"number",title:"表单宽度"},{field:"cate",type:"tags",title:"表单分组"},{field:"sort",title:"排序"}]},add:{url:"doAdd"},cols:[{field:"sort",title:"排序",width:150,edit:!0},{field:"title",title:"名称",width:300},{field:"code",title:"编码"},{field:"width",format:t=>t||"-",title:"表单宽度"},{field:"cate",title:"表单分组"},{field:"status",title:"是否显示在设置中心",type:"switch"},{type:"tool",title:"操作",width:200,btn:[{title:"编辑",action:"edit"}]}],tools:[{title:"添加",icon:"el-icon-plus",type:"primary",action:"add"}]}}};function wv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return s.openBlock(),s.createBlock(l,{init:i.table},null,8,["init"])}const xv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(Dv,[["render",wv]])},Symbol.toStringTag,{value:"Module"})),Bv={data(){return{cateValue:"",table:!1}},created(){this.$req.post("../dev/setting/cate").then(t=>{this.loadData(t.data)})},methods:{change(t){this.cateValue=t.data},loadData(t){const n={url:"doEdit",title:"参数配置",cols:[{field:"id",type:"hidden"},{field:"tips",title:"说明",value:"非开发者禁止操作!!!",type:"text"},{field:"type",title:"数据类型",type:"radio",cols:[{label:"单行数据",value:0},{label:"单组数据",value:1},{label:"多组数据",value:2}],required:!0},{field:"max",title:"最大数据量",type:"number",info:"只适用于[多组数据]类型"},{field:"model",type:"group",title:"数据模型",limit:20,cols:[{field:"title",inputWidth:"33.33%",title:"名称"},{field:"field",inputWidth:"33.33%",title:"字段"},{field:"type",title:"类型",type:"input-auto",inputWidth:"33.33%",list:{input:"文本",textarea:"多行文本",url:"链接",img:"图片",imgs:"多图","image-text":"图文编辑器",editor:"富文本",radio:"单选框",checkbox:"多选框",switch:"开关",tags:"多标签",color:"颜色选择器",file:"文件",md5:"随机秘钥"}},{field:"info",title:"提示"},{field:"prop",type:"tags",title:"props"}]}]};this.table={url:"../dev/setting",title:"参数列表",cate:{cols:[{title:"",field:"tag",cols:{"":"全部",...t}}]},where:{tag:""},del:{url:"doDel"},edit:{url:"doEdit",title:"参数修改",noChangeTip:!1,cols:[{field:"id",type:"hidden"},{field:"tag",title:"分组",type:"select",cols:t,required:!0},{field:"title",title:"名称",required:!0},{field:"code",title:"编码",required:!0}]},add:{url:"doAdd",title:"参数添加",data:{tag:s.computed(()=>this.cateValue)}},cols:[{field:"sort",title:"排序",edit:!0},{field:"title",title:"名称"},{field:"code",title:"编码"},{field:"tag",title:"分组",type:"text",sort:!0,cols:t},{field:"type",title:"类型",type:"text",cols:{0:"单行数据",1:"单组数据",2:"多组数据"}},{field:"is_open",title:"前端调用",type:"switch"},{field:"status",title:"是否启用",type:"switch"},{type:"tool",title:"操作",width:200,btn:[{action:"edit"},{title:"配置",action:n},{action:"del"}]}],search:{cols:[{field:"title",title:"参数名称"}]},tools:[{title:"添加",type:"primary",action:"add"}]}}}};function kv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return i.table?(s.openBlock(),s.createBlock(l,{key:0,onChange:a.change,ref:"table",init:i.table},null,8,["onChange","init"])):s.createCommentVNode("",!0)}const Ev=Object.freeze(Object.defineProperty({__proto__:null,default:ne(Bv,[["render",kv]])},Symbol.toStringTag,{value:"Module"})),_v={data(){return{table:!1,id:0}},created(){const t=this.$get(),n=this;if(!t.id)return this.$msg.error("非法操作");this.id=t.id,this.$req.post("setting.table_list/info",{id:t.id}).then(function(r){n.loadData(r.data)})},methods:{loadData(t){const n=this;t.form.forEach(r=>{r.data_type==="number"&&(r.format=Number)}),this.table={url:"setting.table_list",title:t.title||"数据列表",where:{type_id:n.id},edit:{url:"setting.table_list/doedit",title:"修改",updateTable:!0,cols:[{field:"id",type:"hidden"},{field:"type_id",type:"hidden",value:t.id},{field:"type",type:"hidden",value:t.code}].concat(t.form)},del:{url:"setting.table_list/dodel"},add:{url:"setting.table_list/doadd",title:"添加"},cols:t.table.concat([{type:"tool",title:"操作",width:200,btn:[{title:"编辑",action:"edit"},{title:"删除",action:"del",confirm:!0}]}]),tools:[{title:"添加",icon:"ri-add-line",type:"primary",action:"add"}],search:{cols:t.search},batch:[{title:"批量删除",action:"$batch.del",confirm:!0}]}}}};function Av(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return i.table?(s.openBlock(),s.createBlock(l,{key:0,init:i.table,ref:"table"},null,8,["init"])):s.createCommentVNode("",!0)}const Nv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(_v,[["render",Av]])},Symbol.toStringTag,{value:"Module"})),Sv={data(){return{table:!1}},created(){this.loadData()},methods:{loadData(){this.table={url:"../dev/table",title:"参数列表",del:{url:"dodel"},edit:{url:"doedit",title:"参数修改",cols:[{field:"id",type:"hidden"},{field:"sort",title:"排序",edit:!0},{field:"name",title:"标识"},{field:"title",title:"备注"},{field:"uid",type:"switch",title:"是否需要登录"},{field:"type",title:"数据类型",type:"radio",cols:[{label:"普通数据",value:0},{label:"树形数据",value:1}],required:!0},{field:"action",type:"group",title:"控制模型",limit:1,info:"控制模型中字段(id,uid除外)必须在数据模型中存在",cols:[{field:"search",title:"搜索字段",type:"tags"},{field:"table",title:"列表字段",type:"tags"},{field:"form",title:"表单字段",type:"tags"},{field:"sort",title:"排序字段",type:"tags",info:"默认排序规则 id desc"}]},{field:"model",type:"group",title:"数据模型",limit:32,info:"数据模型 不得使用id,type_id,uid字段,系统预设默认值 $add_time 创建时间,$edit_time 修改时间,$ip 客户端IP",cols:[{field:"title",title:"名称",inputWidth:"33.33%"},{field:"field",title:"字段",inputWidth:"33.33%"},{field:"default",title:"默认值",inputWidth:"33.33%"},{field:"type",title:"输入类型",inputWidth:"33.33%",type:"select",cols:{input:"文本",textarea:"多行文本",url:"链接",img:"图片",imgs:"多图",editor:"富文本",select:"下拉框",selects:"多级下拉框",radio:"单选框",switch:"开关",tags:"多标签",file:"文件",datetime:"时间",region:"地址",date:"日期",goods:"商品"}},{field:"info",inputWidth:"66.66%",title:"备注"},{field:"data_type",title:"数据类型",inputWidth:"33.33%",type:"radio",cols:{default:"默认",number:"数字"}},{field:"prop",type:"tags",inputWidth:"66.66%",title:"props"}]}]},add:{url:"doAdd",title:"添加"},search:{cols:[{field:"title",title:"名称"}]},cols:[{field:"sort",title:"排序",edit:!0},{field:"id",title:"ID"},{field:"name",title:"标识"},{field:"title",title:"名称"},{field:"status",title:"是否启用",type:"switch"},{type:"tool",title:"操作",width:200,btn:[{title:"数据列表",action:"/dev/setting/tablelist"},{action:"edit"},{action:"del"}]}],tools:[{action:"add"}]}}}};function Fv(t,n,r,o,i,a){const l=s.resolveComponent("admin-table");return i.table?(s.openBlock(),s.createBlock(l,{key:0,ref:"table",init:i.table},null,8,["init"])):s.createCommentVNode("",!0)}const Vv=Object.freeze(Object.defineProperty({__proto__:null,default:ne(Sv,[["render",Fv]])},Symbol.toStringTag,{value:"Module"})),Wu=[{title:"权限管理",path:"dev/menu"},{title:"广告管理",path:"dev/ad/index"},{title:"参数管理",list:[{title:"参数列表",path:"dev/setting/index"},{title:"参数分组",path:"dev/setting/cate"}]},{title:"超级表单",path:"dev/table/index"},{title:"插件管理",path:"dev/plugins/index"}],qu=Object.assign({"./dev/ad/index.vue":Z4,"./dev/index.vue":ev,"./dev/log/index.vue":rv,"./dev/menu.vue":sv,"./dev/msg/detail.vue":uv,"./dev/msg/index.vue":pv,"./dev/plugins/index.vue":gv,"./dev/redis/index.vue":vv,"./dev/setting/cate.vue":xv,"./dev/setting/index.vue":Ev,"./dev/setting/tablelist.vue":Nv,"./dev/table/index.vue":Vv}),Ku={};for(const t in qu){const n=t.slice(2,-4).split("/").join("");Ku[n]=qu[t].default}const Ov={components:Ku,data(){return{component:"dev/ad/index",menu:Wu}},methods:{menuClick(t){this.component=t.index}},computed:{menuOn(){let t={};for(const n of Wu)if(n.path==this.$route.path){t=n;break}else if(n.list&&(t=n.list.filter(r=>r.path===this.$route.path)[0],t))break;return t}}},Tv={class:"flex h-full w-full",style:{"--menu-width":"180px","--main-height":"calc(100vh - 300 px)"}},jv={class:"w-180px h-full bg-main"},Pv={class:"text-center font-bold flex items-center justify-between px h-12 leading-12"},Lv={class:"flex-1 mx"},Mv={class:"w-full overflow-x-hidden max-h-[calc(100vh-80px)]"};function zv(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("el-menu-item"),u=s.resolveComponent("el-sub-menu"),d=s.resolveComponent("el-menu");return s.openBlock(),s.createElementBlock("div",Tv,[s.createElementVNode("div",jv,[s.createVNode(d,{"default-active":i.component},{default:s.withCtx(()=>[s.createElementVNode("div",Pv,[n[2]||(n[2]=s.createTextVNode(" 开发者 ",-1)),s.createVNode(l,{size:"small",onClick:n[0]||(n[0]=f=>t.$router.back())},{default:s.withCtx(()=>[...n[1]||(n[1]=[s.createTextVNode("返回",-1)])]),_:1})]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.menu,f=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[f.list?(s.openBlock(),s.createBlock(u,{key:0,index:f.title},{title:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(f.title),1)]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.list,p=>(s.openBlock(),s.createBlock(c,{onClick:a.menuClick,index:p.path,route:p.path},{title:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(p.title),1)]),_:2},1032,["onClick","index","route"]))),256))]),_:2},1032,["index"])):(s.openBlock(),s.createBlock(c,{key:1,onClick:a.menuClick,index:f.path},{title:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(f.title),1)]),_:2},1032,["onClick","index"]))],64))),256))]),_:1},8,["default-active"])]),s.createElementVNode("div",Lv,[s.createElementVNode("div",Mv,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.component.split("/").join(""))))])])])}const $v=ne(Ov,[["render",zv]]),Ju=(t,n)=>{J4.install(t,n),l4.install(t),t.mixin(c4),t.directive("focus",{mounted(r){r.focus()}})},Iv={install:Ju};function Rv(t,n){if(n<=0||n>=t.length)return[...t];const r=[...t];return[r[n],r[n-1]]=[r[n-1],r[n]],r}function Hv(t,n){if(n<0||n>=t.length-1)return[...t];const r=[...t];return[r[n],r[n+1]]=[r[n+1],r[n]],r}const Uv={name:"group-tabs-plus",components:{inputItem:s.defineAsyncComponent(()=>Promise.resolve().then(()=>lo))},emits:["change","update:modelValue"],props:{init:Object,size:{type:String,default:""},modelValue:Array},data(){return{tab:0,dataType:"Array",limit:4,key:1,alignTop:!1,list:[],cols:[]}},created(){this.init.cols&&(Array.isArray(this.init.cols)?this.cols=this.init.cols:typeof this.init.cols=="object"&&(this.cols=[this.init.cols]),this.init.size&&this.cols.forEach(t=>{t.size=this.init.size}),this.init.alignTop&&(this.alignTop=!0),this.init.limit>1&&(this.limit=this.init.limit),this.modelValue&&this.modelValue.constructor.name==="Object"?(this.dataType="Object",this.list=[this.modelValue]):this.modelValue&&this.modelValue.constructor.name==="Array"&&(this.list=this.modelValue),this.limit===1&&(this.dataType="Object",this.modelValue||(this.list=[{}])),this.$watch("list",function(t,n){this.dataType==="Object"&&(t=t[0]),this.$emit("update:modelValue",t),this.$emit("change",t)},{deep:!0}))},methods:{change(){this.key++},moveDown(){this.list=Hv(this.list,this.tab),this.tab=this.tab+1,this.key++},moveUp(){this.list=Rv(this.list,this.tab),this.tab=this.tab-1,this.key++},removeTab(){this.list.splice(this.tab,1),this.tab=this.list.length-1},addTab(){if(this.list.length>=this.limit)return $msg.info("只能添加"+this.limit+"条数据");this.list.push({}),this.tab=this.list.length-1}}},Wv={class:"group-tabs-plus pb bg-main"},qv={class:"flex justify-between pr pb-3 b-b"},Kv={class:"flex justify-end"},Jv={class:"input-group-item"},Gv={class:"item"},Yv={class:"input w-full"},Zv={class:"input-item-input"},Xv={key:0,class:"input-item-info text-3 op-70 pt-xs leading-15"},Qv={class:"flex justify-end mt mr"},eD={key:0,class:"flex justify-center py"};function tD(t,n,r,o,i,a){const l=s.resolveComponent("el-button"),c=s.resolveComponent("inputItem"),u=s.resolveComponent("el-tab-pane"),d=s.resolveComponent("el-tabs");return s.openBlock(),s.createElementBlock("div",Wv,[s.createVNode(d,{class:"group-tabs-plus-tabs",type:"card",modelValue:i.tab,"onUpdate:modelValue":n[0]||(n[0]=f=>i.tab=f)},{default:s.withCtx(()=>[s.createElementVNode("div",qv,[s.createElementVNode("div",Kv,[i.tab>0?(s.openBlock(),s.createBlock(l,{key:0,type:"default",size:"small",onClick:a.moveUp},{default:s.withCtx(()=>[...n[1]||(n[1]=[s.createTextVNode("前移",-1)])]),_:1},8,["onClick"])):s.createCommentVNode("",!0),i.tab>=0&&i.tab<i.list.length-1?(s.openBlock(),s.createBlock(l,{key:1,type:"default",size:"small",onClick:a.moveDown},{default:s.withCtx(()=>[...n[2]||(n[2]=[s.createTextVNode("后移",-1)])]),_:1},8,["onClick"])):s.createCommentVNode("",!0)]),s.createVNode(l,{type:"primary",size:"small",plain:"",onClick:a.addTab},{default:s.withCtx(()=>[s.createTextVNode("添加数据("+s.toDisplayString(i.list.length)+"/"+s.toDisplayString(i.limit)+")",1)]),_:1},8,["onClick"])]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(f,p)=>(s.openBlock(),s.createBlock(u,{label:"数据/"+(p+1),name:p},{default:s.withCtx(()=>[s.createElementVNode("div",Jv,[s.createElementVNode("div",Gv,[s.createElementVNode("div",Yv,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,h=>(s.openBlock(),s.createElementBlock("div",{class:"input-item",style:s.normalizeStyle({width:h.inputWidth?h.inputWidth:"100%"})},[s.createElementVNode("div",{class:s.normalizeClass(["input-item-box",r.init.alignTop?"flex flex-col gap-2 *:w-full!":"text-right"])},[h.title?(s.openBlock(),s.createElementBlock("div",{key:0,class:"input-item-title",style:s.normalizeStyle(`width:${h.labelWidth||r.init.labelWidth};`)},s.toDisplayString(h.title)+": ",5)):s.createCommentVNode("",!0),s.createElementVNode("div",Zv,[h.field?(s.openBlock(),s.createBlock(c,{key:i.key,modelValue:i.list[p][h.field],"onUpdate:modelValue":m=>i.list[p][h.field]=m,index:p,prop:h},null,8,["modelValue","onUpdate:modelValue","index","prop"])):s.createCommentVNode("",!0)])],2),h.info?(s.openBlock(),s.createElementBlock("div",Xv,[n[3]||(n[3]=s.createElementVNode("i",{class:"i-ri-error-warning-line"},null,-1)),s.createTextVNode(" "+s.toDisplayString(h.info),1)])):s.createCommentVNode("",!0)],4))),256))])])]),s.createElementVNode("div",Qv,[s.createVNode(l,{type:"danger",size:"small",plain:"",onClick:a.removeTab},{default:s.withCtx(()=>[...n[4]||(n[4]=[s.createTextVNode("删除此项",-1)])]),_:1},8,["onClick"])])]),_:2},1032,["label","name"]))),256))]),_:1},8,["modelValue"]),i.list.length===0?(s.openBlock(),s.createElementBlock("div",eD,"点击右上方按钮添加数据")):s.createCommentVNode("",!0)])}const nD=Object.freeze(Object.defineProperty({__proto__:null,default:ne(Uv,[["render",tD]])},Symbol.toStringTag,{value:"Module"})),rD={name:"group-tabs",components:{inputItem:s.defineAsyncComponent(()=>Promise.resolve().then(()=>lo))},emits:["change","update:modelValue"],props:{init:Object,size:{type:String,default:""},modelValue:Array|Object},data(){return{tabs:[],dataType:"Array",limit:1,key:1,alignTop:!1,list:[],cols:[]}},created(){this.init.tabs&&typeof this.init.tabs=="function"?this.tabs=this.init.tabs(this.modelValue):this.init.tabs&&(this.tabs=this.init.tabs),this.init.cols&&(Array.isArray(this.init.cols)?this.cols=this.init.cols:typeof this.init.cols=="object"&&(this.cols=[this.init.cols]),this.init.size&&this.cols.forEach(t=>{t.size=this.init.size}),this.init.alignTop&&(this.alignTop=!0),this.init.limit>1&&(this.limit=this.init.limit),this.modelValue&&this.modelValue.constructor.name==="Object"?(this.dataType="Object",this.list=[this.modelValue]):this.modelValue&&this.modelValue.constructor.name==="Array"&&(this.list=this.modelValue),this.limit===1&&(this.dataType="Object",this.modelValue||(this.list=[{}])),this.$watch("list",function(t,n){this.dataType==="Object"&&(t=t[0]),this.$emit("update:modelValue",t),this.$emit("change",t)},{deep:!0}))},methods:{change(){this.key++},del(t){this.list.splice(t,1),this.key++},add(){this.list.push({})}}},oD={class:"group-tabs"},iD={class:"input-group-item"},sD={class:"item"},aD={class:"input w-full"},lD={class:"input-item-box"},cD={class:"input-item-input"},uD={key:0,class:"input-item-info text-3 op-70 pt-xs leading-15"};function dD(t,n,r,o,i,a){const l=s.resolveComponent("inputItem"),c=s.resolveComponent("el-tab-pane"),u=s.resolveComponent("el-tabs");return s.openBlock(),s.createElementBlock("div",oD,[s.createVNode(u,{type:"border-card"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.tabs,(d,f)=>(s.openBlock(),s.createBlock(c,{label:d.label},{default:s.withCtx(()=>[s.createElementVNode("div",iD,[s.createElementVNode("div",sD,[s.createElementVNode("div",aD,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,p=>(s.openBlock(),s.createElementBlock("div",{class:"input-item",style:s.normalizeStyle({width:p.inputWidth?p.inputWidth:"100%"})},[s.createElementVNode("div",lD,[p.title?(s.openBlock(),s.createElementBlock("div",{key:0,class:"input-item-title",style:s.normalizeStyle(`width:${p.labelWidth||r.init.labelWidth};`)},s.toDisplayString(p.title)+": ",5)):s.createCommentVNode("",!0),s.createElementVNode("div",cD,[p.field?(s.openBlock(),s.createBlock(l,{key:0,modelValue:r.modelValue[d.value||f][p.field],"onUpdate:modelValue":h=>r.modelValue[d.value||f][p.field]=h,index:f,prop:p},null,8,["modelValue","onUpdate:modelValue","index","prop"])):i.cols.length===1?(s.openBlock(),s.createBlock(l,{key:1,modelValue:r.modelValue[d.value||f],"onUpdate:modelValue":h=>r.modelValue[d.value||f]=h,index:f,prop:p},null,8,["modelValue","onUpdate:modelValue","index","prop"])):s.createCommentVNode("",!0)])]),p.info?(s.openBlock(),s.createElementBlock("div",uD,[n[0]||(n[0]=s.createElementVNode("i",{class:"i-ri-error-warning-line"},null,-1)),s.createTextVNode(" "+s.toDisplayString(p.info),1)])):s.createCommentVNode("",!0)],4))),256))])])])]),_:2},1032,["label"]))),256))]),_:1})])}const fD=Object.freeze(Object.defineProperty({__proto__:null,default:ne(rD,[["render",dD]])},Symbol.toStringTag,{value:"Module"})),pD={name:"form-group",components:{inputItem:s.defineAsyncComponent(()=>Promise.resolve().then(()=>lo))},emits:["change","update:modelValue"],props:{size:{type:String,default:""},init:Object,modelValue:Array|Object},data(){return{dataType:"Array",limit:1,key:1,list:[],cols:[]}},created(){this.cols=this.init.cols;const t=this.cols.filter(r=>!r.width).length,n=`calc(${(100/t).toFixed(1)+"%"} - ${(80/t).toFixed(1)+"px"})`;this.init.size&&this.cols.forEach(r=>{r.size=this.init.size,r.width||(r.width=n)}),this.init.limit>1&&(this.limit=this.init.limit),this.modelValue&&this.modelValue.constructor.name==="Object"?(this.dataType="Object",this.list=[this.modelValue]):this.modelValue&&this.modelValue.constructor.name==="Array"?this.list=this.modelValue:this.limit===1&&(this.dataType="Object"),this.$watch("list",function(r,o){this.dataType==="Object"&&(r=r[0]),this.$emit("update:modelValue",r),this.$emit("change",r)},{deep:!0})},methods:{change(){this.key++},change2(t,n,r){r.field?this.list[n][r.field]=t:this.list[n]=t},del(t){this.list.splice(t,1),this.key++},add(){this.list.push({})}}},hD={class:"input-group-table"},mD={align:"left"},gD={style:{"line-height":"1.2"}},yD=["onClick"],bD={class:"text-3 op-70 pl-sm"};function CD(t,n,r,o,i,a){const l=s.resolveComponent("el-tooltip"),c=s.resolveComponent("inputItem");return s.openBlock(),s.createElementBlock("div",hD,[s.createElementVNode("table",null,[s.createElementVNode("colgroup",null,[n[1]||(n[1]=s.createElementVNode("col",{width:40},null,-1)),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,u=>(s.openBlock(),s.createElementBlock("col",{style:s.normalizeStyle({width:u.width})},null,4))),256)),n[2]||(n[2]=s.createElementVNode("col",{width:40},null,-1))]),s.createElementVNode("thead",null,[s.createElementVNode("tr",null,[n[4]||(n[4]=s.createElementVNode("th",null,null,-1)),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,u=>(s.openBlock(),s.createElementBlock("th",mD,[s.createElementVNode("div",gD,[s.createTextVNode(s.toDisplayString(u.title)+" ",1),u.info?(s.openBlock(),s.createBlock(l,{key:0,content:u.info,placement:"bottom",effect:"light"},{default:s.withCtx(()=>[...n[3]||(n[3]=[s.createElementVNode("i",{class:"i-ri-question-line op-70"},null,-1)])]),_:1},8,["content"])):s.createCommentVNode("",!0)])]))),256)),n[5]||(n[5]=s.createElementVNode("th",{align:"right"},null,-1))])]),(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.limit>1?"a-draggable":"span"),s.mergeProps({tag:"tbody"},i.limit>1?{filter:".del",handle:".sort",list:i.list,onChange:a.change}:{}),{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(u,d)=>(s.openBlock(),s.createElementBlock("tr",null,[n[7]||(n[7]=s.createElementVNode("td",null,[s.createElementVNode("div",{class:"sort op-70",title:"拖动排序"},[s.createElementVNode("i",{class:"i-ri-menu-line"})])],-1)),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,f=>(s.openBlock(),s.createElementBlock("td",null,[(s.openBlock(),s.createBlock(c,{clearable:f.clearable??r.init.clearable??!1,cols:i.cols,index:d,key:i.key,prop:f,"onUpdate:modelValue":p=>a.change2(p,d,f),"model-value":f.field?u[f.field]:u},null,8,["clearable","cols","index","prop","onUpdate:modelValue","model-value"]))]))),256)),s.createElementVNode("td",null,[s.createElementVNode("div",{title:"删除",class:"del op-70 flex",onClick:f=>a.del(d)},[...n[6]||(n[6]=[s.createElementVNode("i",{class:"i-ri-delete-bin-line"},null,-1)])],8,yD)])]))),256))]),_:1},16))]),i.list.length<i.limit?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["add flex justify-center items-center info-hide",{"add-small":r.init.size==="small"}]),onClick:n[0]||(n[0]=(...u)=>a.add&&a.add(...u))},[n[8]||(n[8]=s.createElementVNode("i",{class:"i-ri-add-line font-xl"},null,-1)),n[9]||(n[9]=s.createElementVNode("span",null,"添加数据",-1)),s.createElementVNode("span",bD,"("+s.toDisplayString(i.list.length)+"/"+s.toDisplayString(i.limit)+")",1)],2)):s.createCommentVNode("",!0)])}const vD=Object.freeze(Object.defineProperty({__proto__:null,default:ne(pD,[["render",CD],["__scopeId","data-v-ffa2bfb0"]])},Symbol.toStringTag,{value:"Module"})),DD={name:"form-group",components:{inputItem:s.defineAsyncComponent(()=>Promise.resolve().then(()=>lo))},emits:["change","update:modelValue"],props:{init:Object,size:{type:String,default:""},modelValue:Array|Object},data(){return{config:{text:"添加数据"},dataType:"Array",limit:1,key:1,alignTop:!1,list:[],cols:[]}},created(){this.cols=this.init.cols,(this.init.size||this.size)&&this.cols.forEach(t=>{t.size=this.init.size||this.size}),this.init.alignTop&&(this.alignTop=!0),this.init.config&&(this.config=this.init.config),this.init.limit>1&&(this.limit=this.init.limit),this.modelValue&&this.modelValue.constructor.name==="Object"?(this.dataType="Object",this.list=[this.modelValue]):this.modelValue&&this.modelValue.constructor.name==="Array"&&(this.list=this.modelValue),this.limit===1&&(this.dataType="Object",this.modelValue||(this.list=[{}])),this.$watch("list",function(t,n){this.dataType==="Object"&&(t=t[0]),this.$emit("update:modelValue",t),this.$emit("change",t)},{deep:!0})},methods:{change(){this.key++},change2(t,n,r){r.field?this.list[n][r.field]=t:this.list[n]=t},del(t){this.list.splice(t,1),this.key++},add(){this.list.push({})}}},wD={class:"input-group-item"},xD={key:0,class:"sort",title:"拖动排序"},BD={class:"item"},kD={class:"input w-full"},ED={key:0,class:"input-item-title break-all"},_D={class:"input-item-input"},AD={key:0,class:"input-item-info text-3 op-70 pt-xs",style:{"line-height":"1.5"}},ND=["onClick"],SD={class:"text-3 op-70 pl-sm"};function FD(t,n,r,o,i,a){const l=s.resolveComponent("inputItem");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["input-group",i.limit==1?"input-group-one":""])},[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.limit>1?"a-draggable":"span"),s.normalizeProps(s.guardReactiveProps(i.limit>1?{filter:".del",handle:".sort",list:i.list,onChange:a.change}:{})),{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.list,(c,u)=>(s.openBlock(),s.createElementBlock("div",wD,[i.limit!=1?(s.openBlock(),s.createElementBlock("div",xD,[...n[1]||(n[1]=[s.createElementVNode("i",{class:"i-ri-menu-line"},null,-1)])])):s.createCommentVNode("",!0),s.createElementVNode("div",BD,[s.createElementVNode("div",kD,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.cols,d=>(s.openBlock(),s.createElementBlock("div",{class:"input-item",style:s.normalizeStyle({width:d.inputWidth?d.inputWidth:"100%"})},[s.createElementVNode("div",{class:s.normalizeClass(["input-item-box",{"input-item-box-h":i.alignTop}])},[d.title?(s.openBlock(),s.createElementBlock("div",ED,s.toDisplayString(d.title)+": ",1)):s.createCommentVNode("",!0),s.createElementVNode("div",_D,[(s.openBlock(),s.createBlock(l,{size:r.size,cols:i.cols,index:u,key:i.key,prop:d,"onUpdate:modelValue":f=>a.change2(f,u,d),"model-value":d.field?c[d.field]:c},null,8,["size","cols","index","prop","onUpdate:modelValue","model-value"]))])],2),d.info?(s.openBlock(),s.createElementBlock("div",AD,[n[2]||(n[2]=s.createElementVNode("i",{class:"i-ri-error-warning-line"},null,-1)),s.createTextVNode(" "+s.toDisplayString(d.info),1)])):s.createCommentVNode("",!0)],4))),256))]),i.limit!=1?(s.openBlock(),s.createElementBlock("div",{key:0,class:"del",onClick:d=>a.del(u)},[...n[3]||(n[3]=[s.createElementVNode("i",{class:"i-ri-close-line"},null,-1)])],8,ND)):s.createCommentVNode("",!0)])]))),256))]),_:1},16)),i.limit!=1&&i.list.length<i.limit?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["add flex justify-center items-center",{"add-small":r.init.size==="small"}]),onClick:n[0]||(n[0]=(...c)=>a.add&&a.add(...c))},[n[4]||(n[4]=s.createElementVNode("i",{class:"i-ri-add-line font-xl"},null,-1)),s.createElementVNode("span",null,s.toDisplayString(i.config.text),1),s.createElementVNode("span",SD,"("+s.toDisplayString(i.list.length)+"/"+s.toDisplayString(i.limit)+")",1)],2)):s.createCommentVNode("",!0)],2)}const VD=Object.freeze(Object.defineProperty({__proto__:null,default:ne(DD,[["render",FD],["__scopeId","data-v-840e2a2b"]])},Symbol.toStringTag,{value:"Module"})),OD={backgroundColor:"transparent",textStyle:{},title:{textStyle:{color:"#eeeeee"},subtextStyle:{color:"#aaaaaa"}},categoryAxis:{axisLine:{lineStyle:{color:"#eeeeee"}},axisTick:{lineStyle:{color:"#eeeeee"}},axisLabel:{color:"#eeeeee"},splitLine:{lineStyle:{color:["#aaaaaa"]}},splitArea:{show:!1,areaStyle:{color:["#eeeeee"]}}},valueAxis:{axisLine:{show:!0,lineStyle:{color:"#eeeeee"}},axisTick:{show:!0,lineStyle:{color:"#eeeeee"}},axisLabel:{show:!0,color:"#eeeeee"},splitLine:{show:!0,lineStyle:{color:["#aaaaaa"]}},splitArea:{show:!1,areaStyle:{color:["#eeeeee"]}}},legend:{textStyle:{color:"#eeeeee"}},tooltip:{axisPointer:{lineStyle:{color:"#eeeeee",width:"1"},crossStyle:{color:"#eeeeee",width:"1"}}},timeline:{lineStyle:{color:"#eeeeee",width:1},itemStyle:{color:"#dd6b66",borderWidth:1},controlStyle:{color:"#eeeeee",borderColor:"#eeeeee",borderWidth:.5},checkpointStyle:{color:"#e43c59",borderColor:"#c23531"},label:{color:"#eeeeee"},emphasis:{itemStyle:{color:"#a9334c"},controlStyle:{color:"#eeeeee",borderColor:"#eeeeee",borderWidth:.5},label:{color:"#eeeeee"}}},visualMap:{color:["#bf444c","#d88273","#f6efa6"]},dataZoom:{backgroundColor:"rgba(47,69,84,0)",dataBackgroundColor:"rgba(255,255,255,0.3)",fillerColor:"rgba(167,183,204,0.4)",handleColor:"#a7b7cc",handleSize:"100%",textStyle:{color:"#eeeeee"}},markPoint:{label:{color:"#eeeeee"},emphasis:{label:{color:"#eeeeee"}}}},fo={};function TD(t,n=.5){if(t.startsWith("rgba"))return t.replace(/[\d\.]+\)$/g,`${n})`);if(t.startsWith("rgb"))return t.replace("rgb","rgba").replace(")",`, ${n})`);if(t.startsWith("#")){if(t.length===4){const r=parseInt(t[1]+t[1],16),o=parseInt(t[2]+t[2],16),i=parseInt(t[3]+t[3],16);return`rgba(${r}, ${o}, ${i}, ${n})`}if(t.length===7){const r=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),i=parseInt(t.slice(5,7),16);return`rgba(${r}, ${o}, ${i}, ${n})`}if(t.length===9){const r=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),i=parseInt(t.slice(5,7),16),a=parseInt(t.slice(7,9),16)/255;return`rgba(${r}, ${o}, ${i}, ${a*n})`}}return t.startsWith("hsl")?t.startsWith("hsla")?t.replace(/[\d\.]+\)$/g,`${n})`):t.replace("hsl","hsla").replace(")",`, ${n})`):t.startsWith("hsla")?t.replace(/[\d\.]+\)$/g,`${n})`):t}const nr=(t=["#eee","#999"])=>(t=Array.isArray(t)?t:[TD(t,.7),t],{type:"linear",x:0,x2:0,y:0,y2:1,colorStops:[{offset:0,color:t[0]},{offset:1,color:t[1]}]}),jD=(t=-1)=>{const n=$store.theme+$store.dark;if(!fo[n]){const r=$store.theme,o={yellow:"#f59e0b",green:"#22c55e",purple:"#f43f5e",blue:"#3b82f6",red:"#f2140d"},i={yellow:"#eedd78",green:"#91ca8c",purple:"#e69d87",blue:"#73b9bc",red:"#dd6b66"};delete i[r],delete o[r];const a=[nr($theme("primary"))];if($store.dark){for(const l in i)a.push(nr(i[l]));for(const l in o)a.push(nr(o[l]))}else{for(const l in o)a.push(nr(o[l]));for(const l in i)a.push(nr(i[l]))}fo[n]=a}return t>-1?fo[n][t]:fo[n]},PD={class:"echarts"},LD={class:"chart-slot"},MD=Object.freeze(Object.defineProperty({__proto__:null,default:s.defineComponent({__name:"chart",props:{init:{type:Object,default:()=>({})},data:{type:[Boolean,Object],default:!1},type:String,asyncData:{type:[Function,String]}},setup(t){const n=t,r=s.ref(null),o=s.ref(!0),i=s.ref(null),a=()=>{const v=$store.dark?OD:{};return v.color=jD(),v},l={type:"bar",yAxisIndex:0,itemStyle:{borderRadius:[4,4,0,0]}},c={yAxisIndex:0,type:"line",smooth:!1},u=s.ref({}),d=(v,D)=>{D?.[0]&&typeof D?.[0]=="object"&&!Array.isArray(D[0])&&(v={...v,...D[0]});const{type:w="line"}=v;let b=v||{};if(b.tooltip===void 0&&(b.tooltip={trigger:"axis"}),b.mini)return b.grid=b.grid||{left:10,right:10,bottom:0,top:10},b.xAxis={show:!1,data:Array.isArray(D)?D.slice(1).map(x=>x[0]):Object.keys(D)},typeof b.color=="string"?b.color=[b.color]:typeof b.color=="number"&&(b.color=[a().color[b.color]]),b.yAxis={type:"value",show:!1},w=="line"?b.series={type:"line",areaStyle:{},smooth:!0}:b.series={type:"bar"},delete b.mini,b.series.data=Array.isArray(D)?D.slice(1).map(x=>x[1]):Object.values(D),b;if(b.grid===void 0&&(b.grid={top:0,left:0,right:0,bottom:80}),b.legend===void 0&&(b.legend={}),b.xAxis===void 0&&(b.xAxis={type:"category"}),b.yAxis===void 0&&(b.yAxis={}),b.series===void 0){const x=[];D[0].forEach((k,E)=>{if(E>0){const V=(typeof k=="object"?k.type:Array.isArray(w)?w[E-1]:w)==="bar"?l:c;k?.yAxisIndex&&(b.yAxis=[{},{}]),x.push({...V,...typeof k=="object"?k:{}})}}),b.series=x}return typeof D=="object"&&(D[0]=D[0].map(x=>typeof x=="object"?x.name:x),b.dataset={source:D}),console.log("series",b),b},f=v=>{n.init.type=="pie"?p(v):n.init.type=="map"?h(v):m(v)},p=v=>{let D=n.init;delete D.type,v?.[0]&&typeof v?.[0]=="object"&&!Array.isArray(v[0])&&(D={...n.init,...v[0]}),D.tooltip===void 0&&(D.tooltip={});const w=D.legend?"60%":"80%";if(v){if(D.series={type:"pie",radius:w,data:[],...D.series},!D.series.data.length&&Array.isArray(v))D.series.data=v.filter(b=>Array.isArray(b)).map(b=>({name:b[0],value:b[1]}));else if(!D.series.data.length&&typeof v=="object"){for(const b in v)if(Object.prototype.hasOwnProperty.call(v,b)){const x=v[b];D.series.data.push({value:x,name:b})}}}u.value=D,g()},h=async v=>{let D=0;v&&(D=v[0].value);let w=n.init,b=w.adcode||1e5,x={1e5:"china"}[b]||"map";const k=await $req.query(`https://geo.datav.aliyun.com/areas_v3/bound/${b}_full.json`),E=vo.init(i.value);w.visualMap={text:["高","低"],min:0,max:D,calculable:!0,orient:"horizontal",bottom:20,inRange:{color:["#ebf5ff","#409eff"]}},w.series={type:"map",map:x,label:{show:!0,color:"#999",fontSize:10},itemStyle:{areaColor:"#ecf5ff",borderColor:"#dddddd"}},w.series.data=v,vo.registerMap(x,k),E.setOption(w),r.value=E,o.value=!1},m=v=>{if(v[0]==="pie"||v?.[0]?.type==="pie")return p(v);u.value=n.type==="native"?n.init:d(n.init,v);try{g()}catch{}},g=()=>{const v=vo.init(i.value,a(),{renderer:"svg"});v.setOption(u.value),r.value=v,o.value=!1};s.watch(()=>[$store.dark,$store.theme],()=>{r.value&&r.value.setTheme(a())}),s.onMounted(()=>{n.asyncData&&typeof n.asyncData=="function"?n.asyncData(f):f(n.data)}),s.onUnmounted(()=>{r.value&&r.value.dispose(),window.removeEventListener("resize",y)});const y=()=>{r.value&&r.value.resize()};return window.addEventListener("resize",y),(v,D)=>{const w=s.resolveDirective("loading");return s.openBlock(),s.createElementBlock("div",PD,[s.withDirectives((s.openBlock(),s.createElementBlock("div",LD,[s.unref(o)?s.createCommentVNode("",!0):s.renderSlot(v.$slots,"default",{key:0})])),[[w,s.unref(o)]]),s.createElementVNode("div",{class:"chart-box",ref_key:"echartsRef",ref:i},null,512)])}}})},Symbol.toStringTag,{value:"Module"}));ut.adminDev=$v,ut.default=Iv,ut.install=Ju,Object.defineProperties(ut,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|