commit cf01b5416812443603dc056ae86533f9d914df53 Author: yyx <15348303523@163.com> Date: Tue Jul 8 18:21:51 2025 +0800 h5_dist diff --git a/assets/HomeView-DIPMGO5S.js b/assets/HomeView-DIPMGO5S.js new file mode 100644 index 0000000..dee97f4 --- /dev/null +++ b/assets/HomeView-DIPMGO5S.js @@ -0,0 +1 @@ +import{Field as e,Icon as t,NavBar as n,__plugin_vue_export_helper_default as r,confirmConversionRefundRequest as i,getDashboard as a,getGroupsList as o,getOrderList as s,getOrderStatusList as c,getTemplatesList as l,getUserinfo as u,updatePayHash as d}from"./_plugin-vue_export-helper-X_5jfaNy.js";import{Fragment as f,createBaseVNode as p,createBlock as m,createCommentVNode as h,createElementBlock as g,createTextVNode as _,createVNode as v,isRef as y,onBeforeMount as b,onMounted as x,openBlock as S,ref as C,renderList as w,toDisplayString as T,unref as E,useRouter as D,withCtx as O}from"./index-DT5X53L9.js";import{Dialog as k}from"./style-DDb4fOVF.js";import{Button as A}from"./style-DP216q4j.js";import{Form as j,Tab as M,Tabs as N}from"./style-BajQcpZj.js";import"./use-tab-status-Cli6d94t.js";import{Tag as P}from"./style--gkGFdWK.js";import{CellGroup as F}from"./style-Dy1Y0HPX.js";import{List as I,Search as L}from"./style-CyTcmElE.js";import"./style-Zr6q4qxX.js";import{Pay_default as R}from"./Pay-DZHyDTrf.js";import"./esm-KccT1lBb.js";import{task_default as z}from"./task-BUgUmBKX.js";const B={class:`container`},V={__name:`fee-standards`,setup(e){let t=D(),n=C(`费用标准`),r=C(``),i=C([]),a=C([]),s=C(!1),c=C(!1),u=1,d=async()=>{let e=await l({page:u,per_page:10,name:r.value});console.log(`list`,e),u==1?a.value=e.data:a.value=a.value.concat(e.data),s.value=u*10>=e.total,u+=1,c.value=!1,console.log(`finished`,s,u)},h=()=>{u=1,d()};b(async()=>{let e=await o({});console.log(`onMounted`,e),i.value=[],e.data.map(e=>{i.value.push({label:e.tg_name,value:e.id,url:e.tg_url})})});let y=e=>{console.log(`goPage`,e),window.open(e)};return(e,t)=>{let n=L,o=P,l=I;return S(),g(`div`,B,[v(n,{modelValue:r.value,"onUpdate:modelValue":t[0]||=e=>r.value=e,placeholder:`请输入模板名称进行搜索`,onSearch:h,onClear:h},null,8,[`modelValue`]),v(l,{loading:c.value,"onUpdate:loading":t[1]||=e=>c.value=e,finished:s.value,"finished-text":`没有更多了`,onLoad:d},{default:O(()=>[(S(!0),g(f,null,w(a.value,e=>(S(),g(`div`,{key:e.id,class:`item`},[p(`div`,null,`模板名称:`+T(e.name),1),p(`div`,null,`模板类型:`+T(e.type===1?`预设模板`:`定制模板`),1),p(`div`,null,[t[2]||=p(`span`,null,`群组:`,-1),(S(!0),g(f,null,w(JSON.parse(e.group_ids),(e,t)=>(S(),m(o,{plain:``,type:`primary`,style:{"margin-right":`4px`},onClick:t=>y(i.value?.find(t=>t.value==e)?.url),key:t},{default:O(()=>[_(T(i.value?.find(t=>t.value==e)?.label),1)]),_:2},1032,[`onClick`]))),128))]),p(`div`,null,`频率:`+T(e.times)+`小时一次`,1),p(`div`,null,`周期:`+T(e.cycle)+`天`,1),p(`div`,null,`utsd金额:`+T(e.pay_usdt_amount),1),p(`div`,null,`创建时间:`+T(e.created_at),1)]))),128))]),_:1},8,[`loading`,`finished`])])}}};var H=r(V,[[`__scopeId`,`data-v-4c2985f5`]]);const U={class:`container`},W={class:`item-btns`},G={__name:`pay-records`,setup(t){let n=C(`费用标准`),r=C(``),a=C([]),o=C([]),l=C(!1),u=C(!1),y=C(!1),x=C({}),E=C(!1),D=C({}),M=1,N=async()=>{let e=await s({page:M,per_page:10,order_no:r.value});M==1?o.value=e.data:o.value=o.value.concat(e.data),l.value=M*10>=e.total,M+=1,u.value=!1},z=()=>{M=1,N()};b(async()=>{let e=await c({});a.value=[],e.map((e,t)=>{a.value.push({label:e,value:t})}),console.log(`onMounted`,a.value)});let B=e=>{if(e==0||e==6)return`primary`;if(e==2||e==5)return`success`;if(e==3||e==4||e==7||e==8)return`danger`;if(e==1)return`warning`},V=(e=``,t)=>{console.log(`handleConfrimPay`,x),d({order_id:x.value.id.toString(),hash:e}).then(e=>{M=1,N(),y.value=!1})},H=e=>{console.log(`payTask`,e),x.value=e,y.value=!0},G=e=>{D.value=e,E.value=!0},K=()=>{let e={id:D.value.id.toString(),refund_request_remark:D.value.refund_request_remark};i(e).then(e=>{E.value=!1,M=1,N()})};return(t,n)=>{let i=L,s=P,c=A,d=I,b=e,C=F,M=j,G=k;return S(),g(`div`,U,[v(i,{modelValue:r.value,"onUpdate:modelValue":n[0]||=e=>r.value=e,placeholder:`请输入订单ID进行搜索`,onSearch:z,onClear:z},null,8,[`modelValue`]),v(d,{loading:u.value,"onUpdate:loading":n[1]||=e=>u.value=e,finished:l.value,"finished-text":`没有更多了`,onLoad:N},{default:O(()=>[(S(!0),g(f,null,w(o.value,e=>(S(),g(`div`,{key:e.id,class:`item`},[p(`div`,null,`订单ID:`+T(e.order_no),1),p(`div`,null,`任务名称:`+T(e?.task?.title),1),p(`div`,null,`支付金额:`+T(e.pay_usdt_amount),1),p(`div`,null,[n[8]||=p(`span`,null,`订单状态:`,-1),v(s,{plain:``,type:B(e.status)},{default:O(()=>[_(T(a.value?.find(t=>t.value==e.status)?.label),1)]),_:2},1032,[`type`])]),p(`div`,null,`创建时间:`+T(e.created_at),1),p(`div`,W,[e.status==0||e.status==8?(S(),m(c,{key:0,type:`primary`,size:`small`,style:{"margin-left":`12px`},onClick:t=>H(e)},{default:O(()=>n[9]||=[_(`支付`)]),_:2,__:[9]},1032,[`onClick`])):h(``,!0)])]))),128))]),_:1},8,[`loading`,`finished`]),v(R,{showDialog:y.value,"onUpdate:showDialog":n[2]||=e=>y.value=e,current_order:x.value,"onUpdate:current_order":n[3]||=e=>x.value=e,onHandleConfrimPay:V},null,8,[`showDialog`,`current_order`]),v(G,{show:E.value,"onUpdate:show":n[7]||=e=>E.value=e,title:`退款申请`,"show-cancel-button":``,onConfirm:K},{default:O(()=>[v(M,null,{default:O(()=>[v(C,{inset:``},{default:O(()=>[v(b,{modelValue:D.value.order_no,"onUpdate:modelValue":n[4]||=e=>D.value.order_no=e,name:`订单ID`,label:`订单ID`,placeholder:`订单ID`,disabled:``},null,8,[`modelValue`]),v(b,{modelValue:D.value.pay_usdt_amount,"onUpdate:modelValue":n[5]||=e=>D.value.pay_usdt_amount=e,name:`订单金额`,label:`订单金额`,placeholder:`订单金额`,disabled:``},null,8,[`modelValue`]),v(b,{modelValue:D.value.refund_request_remark,"onUpdate:modelValue":n[6]||=e=>D.value.refund_request_remark=e,name:`退款原因`,label:`退款原因`,placeholder:`退款原因`},null,8,[`modelValue`])]),_:1})]),_:1})]),_:1},8,[`show`])])}}};var K=r(G,[[`__scopeId`,`data-v-1c5cbce5`]]);const q={__name:`index`,setup(e){let t=C(`a`),r=D(),i=()=>{r.back()};return(e,r)=>{let i=n,a=M,o=N;return S(),g(`div`,null,[v(i,{title:`支付管理`}),v(o,{active:t.value,"onUpdate:active":r[0]||=e=>t.value=e},{default:O(()=>[v(a,{title:`支付记录`,name:`a`},{default:O(()=>[v(K)]),_:1}),v(a,{title:`收费标准`,name:`b`},{default:O(()=>[v(H)]),_:1})]),_:1},8,[`active`])])}}};var J=q;const Y={class:`container`},X={class:`userinfo`},Z={class:`title`},Q={class:`title`},$={class:`title`},ee={class:`title`},te={class:`dashboard`},ne={class:`box`},re={class:`account`},ie={class:`box`},ae={class:`account`},oe={class:`box`},se={class:`account`},ce={class:`tool`},le={__name:`index`,setup(e){let r=D(),i=C({}),o=C({});x(async()=>{i.value=await u(),o.value=await a(),console.log(`userInfo`,i.value,o.value)});let s=()=>{r.push(`/h5/detail`)},c=e=>{r.push(e)};return(e,r)=>{let a=n,l=t;return S(),g(f,null,[v(a,{title:`用户信息`}),p(`div`,Y,[p(`div`,X,[p(`div`,Z,[r[3]||=_(`用户昵称:`),p(`span`,null,T(i.value.nikename),1)]),p(`div`,Q,[r[4]||=_(`Telegram ID:`),p(`span`,null,T(i.value.telegram_id),1)]),p(`div`,$,[r[5]||=_(`Telegram联系方式:`),p(`span`,null,T(i.value.telegram_tel),1)]),p(`div`,ee,[r[6]||=_(`Email:`),p(`span`,null,T(i.value.email),1)]),p(`div`,{class:`edit`,onClick:r[0]||=e=>s()},[v(l,{name:`edit`})])]),p(`div`,te,[p(`div`,ne,[p(`div`,re,T(o.value.taskCount),1),r[7]||=p(`div`,{class:`title`},`总任务数`,-1)]),r[10]||=p(`div`,{class:`shu`},null,-1),p(`div`,ie,[p(`div`,ae,T(o.value.orderMoney),1),r[8]||=p(`div`,{class:`title`},`USDT付款总额`,-1)]),r[11]||=p(`div`,{class:`shu`},null,-1),p(`div`,oe,[p(`div`,se,T(o.value.taskUnpayCount),1),r[9]||=p(`div`,{class:`title`},`待支付任务数`,-1)])]),p(`div`,ce,[p(`div`,{class:`tool-box`,onClick:r[1]||=e=>c(`/h5/mass_send`)},[p(`div`,null,[v(l,{name:`notes-o`,class:`icon`})]),r[12]||=p(`div`,{class:`title`},`群发记录`,-1)]),p(`div`,{class:`tool-box`,onClick:r[2]||=e=>c(`/h5/notice`)},[p(`div`,null,[v(l,{name:`other-pay`,class:`icon`})]),r[13]||=p(`div`,{class:`title`},`通知历史`,-1)])])])],64)}}};var ue=r(le,[[`__scopeId`,`data-v-2fecc0cf`]]);const de={class:`container`},fe={class:`footer`},pe={__name:`HomeView`,setup(e){let t=C(`a`),n=C(``),r=D(),i=e=>{console.log(e),t.value=e,localStorage.setItem(`activeName`,e)};return x(()=>{console.log(`HomeView`,localStorage.getItem(`activeName`)),n.value=localStorage.getItem(`customeraccessToken`),localStorage.getItem(`activeName`)&&(t.value=localStorage.getItem(`activeName`)),n.value||r.push(`/h5/login`)}),(e,n)=>{let r=M,a=N;return S(),g(`div`,de,[p(`div`,null,[E(t)==`a`?(S(),m(z,{key:0})):h(``,!0),E(t)==`b`?(S(),m(J,{key:1})):h(``,!0),E(t)==`c`?(S(),m(ue,{key:2})):h(``,!0),p(`div`,fe,[v(a,{active:E(t),"onUpdate:active":n[0]||=e=>y(t)?t.value=e:t=e,onChange:i},{default:O(()=>[v(r,{title:`任务管理`,name:`a`}),v(r,{title:`支付管理`,name:`b`}),v(r,{title:`用户管理`,name:`c`})]),_:1},8,[`active`])])])])}}};var me=r(pe,[[`__scopeId`,`data-v-ec25bcba`]]);export{me as default}; \ No newline at end of file diff --git a/assets/HomeView-DYbyNFtg.css b/assets/HomeView-DYbyNFtg.css new file mode 100644 index 0000000..bed71a7 --- /dev/null +++ b/assets/HomeView-DYbyNFtg.css @@ -0,0 +1 @@ +.container[data-v-4c2985f5]{padding-bottom:10px}.item[data-v-4c2985f5]{color:#666;background-color:#f7f8fa;border-radius:24px;margin:12px;padding:12px}.container[data-v-1c5cbce5]{padding-bottom:10px}.item[data-v-1c5cbce5]{background-color:#f7f8fa;border-radius:24px;margin:12px;padding:12px}.container[data-v-2fecc0cf]{height:100vh;padding-top:12px;background-color:#f5f8fa!important}.userinfo[data-v-2fecc0cf]{color:#666;background-color:#fff;border-radius:12px;margin:0 12px 12px;padding:12px;position:relative}.userinfo span[data-v-2fecc0cf]{color:#999}.userinfo .edit[data-v-2fecc0cf]{position:absolute;top:45%;right:12px}.dashboard[data-v-2fecc0cf]{text-align:center;background-color:#fff;border-radius:8px;justify-content:space-around;align-items:center;margin:12px;padding:12px;display:flex}.dashboard .shu[data-v-2fecc0cf]{background:#eee;width:1px;height:40px}.dashboard .account[data-v-2fecc0cf]{color:#666;font-weight:600}.dashboard .title[data-v-2fecc0cf]{color:#333}.tool[data-v-2fecc0cf]{text-align:center;background-color:#fff;border-radius:8px;flex-wrap:wrap;align-items:center;margin:12px;padding:12px;display:flex}.tool .tool-box[data-v-2fecc0cf]{width:30%}.tool .tool-box .icon[data-v-2fecc0cf]{font-size:20px}.tool .tool-box .title[data-v-2fecc0cf]{color:#999;font-size:12px}.footer[data-v-ec25bcba]{z-index:999;background-color:#fff;border-top:1px solid #eee;width:100%;height:50px;position:fixed;bottom:0;left:0} diff --git a/assets/Pay-D6hFHJ9k.css b/assets/Pay-D6hFHJ9k.css new file mode 100644 index 0000000..fa752e4 --- /dev/null +++ b/assets/Pay-D6hFHJ9k.css @@ -0,0 +1 @@ +.pay-code[data-v-f7a8890b]{text-align:center}.pay-code .pay-code-img[data-v-f7a8890b]{width:200px;height:200px;margin:20px 0}.pay-code .pay-hash[data-v-f7a8890b]{justify-content:center;align-items:center;display:flex}span[data-v-f7a8890b]{color:#999;font-size:12px}.dialog-footer[data-v-f7a8890b]{justify-content:flex-end;margin:12px;display:flex} diff --git a/assets/Pay-DZHyDTrf.js b/assets/Pay-DZHyDTrf.js new file mode 100644 index 0000000..5a9ea9a --- /dev/null +++ b/assets/Pay-DZHyDTrf.js @@ -0,0 +1 @@ +import{__plugin_vue_export_helper_default as e,getUsdtInfo as t,showSuccessToast as n}from"./_plugin-vue_export-helper-X_5jfaNy.js";import{createBaseVNode as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createTextVNode as s,createVNode as c,openBlock as l,reactive as u,ref as d,toDisplayString as f,watch as p,withCtx as m}from"./index-DT5X53L9.js";import{Dialog as h}from"./style-DDb4fOVF.js";import{Button as g}from"./style-DP216q4j.js";import{esm_default as _}from"./esm-KccT1lBb.js";var v=`/assets/pay-code-DPIhp-36.jpeg`;const y={class:`pay-code`},b={style:{margin:`10px 0`}},x={type:`danger`,style:{"font-size":`16px`,"font-weight":`600`}},S=[`src`],C={key:1,type:`warning`},w={key:0,style:{margin:`10px 0`}},T={type:`primary`,style:{"font-size":`16px`,"font-weight":`600`}},E={style:{margin:`0 10px`,color:`aqua`}},D={class:`dialog-footer`},O={__name:`Pay`,props:{showDialog:{type:Boolean,default:!1},current_order:{type:Object,default:{}}},emits:[`update:showDialog`,`handleConfrimPay`,`closePay`],setup(e,{emit:O}){let k=e;console.log(`props`,k);let A=d(!1),j=O,M=u({payCode:v,payHash:``}),N=async e=>{let{toClipboard:t}=_();try{console.log(`复制`,e),await t(e),n(`复制成功`)}catch(e){console.log(e)}};p(()=>k.showDialog,e=>{console.log(`showDialog`,k.showDialog),A.value=k.showDialog,k.showDialog&&(R(),V())});let P=d(``),F=d(!1),I=(e,t)=>{let n=new Date(t).getTime(),r=new Date().getTime(),i=n-r;i<=0&&(clearInterval(L),F.value=!1,P.value=``);let a=Math.floor(i%(1e3*60*60)/(1e3*60)),o=Math.floor(i%(1e3*60)/1e3);P.value=` ${a}分钟 ${o}秒`};var L=null;let R=()=>{clearInterval(L);let e=k.current_order.order_created_at,t=k.current_order.expired_at;new Date(e).getTime()I(e,t),1e3)):(F.value=!1,clearInterval(L))},z=()=>{M.hash=``,j(`update:showDialog`,!1),j(`closePay`)},B=()=>{j(`handleConfrimPay`),j(`update:showDialog`,!1)},V=()=>{t().then(e=>{M.payHash=e.USDT_ACCOUNT})};return(t,n)=>{let u=g,d=h;return l(),i(d,{show:A.value,"onUpdate:show":n[1]||=e=>A.value=e,title:`标题`,"show-cancel-button":``},{title:m(()=>n[2]||=[r(`div`,{class:`my-header`},[r(`div`,null,`充值网络USDT-TRC20`),r(`div`,{style:{"font-size":`12px`,color:`#999`}},`请选择TRC20网络充值,否则可能造成资产丢失`)],-1)]),footer:m(()=>[r(`div`,D,[c(u,{onClick:z,size:`small`,style:{"margin-right":`8px`}},{default:m(()=>n[7]||=[s(`关闭`)]),_:1,__:[7]}),F.value?(l(),i(u,{key:0,type:`primary`,size:`small`,onClick:B},{default:m(()=>n[8]||=[s(` 支付完成 `)]),_:1,__:[8]})):a(``,!0)])]),default:m(()=>[r(`div`,y,[r(`div`,b,[n[3]||=s(`支付金额:`),r(`span`,x,` $`+f(e.current_order.pay_usdt_amount),1)]),r(`div`,null,[F.value?(l(),o(`img`,{key:0,src:M.payCode,class:`pay-code-img`},null,8,S)):a(``,!0),F.value?a(``,!0):(l(),o(`span`,C,`订单已过期`))]),F.value?(l(),o(`div`,w,[n[4]||=r(`span`,null,`订单有效期:`,-1),r(`span`,T,f(P.value),1),n[5]||=r(`div`,null,[r(`span`,{type:`danger`},`超过有效期订单自动取消,请尽快完成支付`)],-1)])):a(``,!0),F.value?(l(),o(`div`,{key:1,onClick:n[0]||=e=>N(M.payHash)},[n[6]||=r(`div`,{style:{color:`#999`,"font-size":`12px`}},`钱包地址(点击复制): `,-1),r(`span`,E,f(M.payHash),1)])):a(``,!0)])]),_:1},8,[`show`])}}};var k=e(O,[[`__scopeId`,`data-v-f7a8890b`]]);export{k as Pay_default}; \ No newline at end of file diff --git a/assets/_plugin-vue_export-helper-D27PBWeY.css b/assets/_plugin-vue_export-helper-D27PBWeY.css new file mode 100644 index 0000000..4d50bb7 --- /dev/null +++ b/assets/_plugin-vue_export-helper-D27PBWeY.css @@ -0,0 +1 @@ +:root,:host{--van-cell-font-size:var(--van-font-size-md);--van-cell-line-height:24px;--van-cell-vertical-padding:10px;--van-cell-horizontal-padding:var(--van-padding-md);--van-cell-text-color:var(--van-text-color);--van-cell-background:var(--van-background-2);--van-cell-border-color:var(--van-border-color);--van-cell-active-color:var(--van-active-color);--van-cell-required-color:var(--van-danger-color);--van-cell-label-color:var(--van-text-color-2);--van-cell-label-font-size:var(--van-font-size-sm);--van-cell-label-line-height:var(--van-line-height-sm);--van-cell-label-margin-top:var(--van-padding-base);--van-cell-value-color:var(--van-text-color-2);--van-cell-value-font-size:inherit;--van-cell-icon-size:16px;--van-cell-right-icon-color:var(--van-gray-6);--van-cell-large-vertical-padding:var(--van-padding-sm);--van-cell-large-title-font-size:var(--van-font-size-lg);--van-cell-large-label-font-size:var(--van-font-size-md);--van-cell-large-value-font-size:inherit}.van-cell{box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding)var(--van-cell-horizontal-padding);color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background:var(--van-cell-background);display:flex;position:relative;overflow:hidden}.van-cell:after{box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-cell-border-color);position:absolute;transform:scaleY(.5)}.van-cell:last-child:after,.van-cell--borderless:after{display:none}.van-cell__label{margin-top:var(--van-cell-label-margin-top);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__title,.van-cell__value{flex:1}.van-cell__value{color:var(--van-cell-value-color);font-size:var(--van-cell-value-font-size);text-align:right;vertical-align:middle;word-wrap:break-word;position:relative;overflow:hidden}.van-cell__left-icon,.van-cell__right-icon{height:var(--van-cell-line-height);font-size:var(--van-cell-icon-size);line-height:var(--van-cell-line-height)}.van-cell__left-icon{margin-right:var(--van-padding-base)}.van-cell__right-icon{margin-left:var(--van-padding-base);color:var(--van-cell-right-icon-color)}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:var(--van-cell-active-color)}.van-cell--required{overflow:visible}.van-cell--required:before{left:var(--van-padding-xs);color:var(--van-cell-required-color);font-size:var(--van-cell-font-size);content:"*";position:absolute}.van-cell--center{align-items:center}.van-cell--large{padding-top:var(--van-cell-large-vertical-padding);padding-bottom:var(--van-cell-large-vertical-padding)}.van-cell--large .van-cell__title{font-size:var(--van-cell-large-title-font-size)}.van-cell--large .van-cell__label{font-size:var(--van-cell-large-label-font-size)}.van-cell--large .van-cell__value{font-size:var(--van-cell-large-value-font-size)}:root,:host{--van-field-label-width:6.2em;--van-field-label-color:var(--van-text-color);--van-field-label-margin-right:var(--van-padding-sm);--van-field-input-text-color:var(--van-text-color);--van-field-input-error-text-color:var(--van-danger-color);--van-field-input-disabled-text-color:var(--van-text-color-3);--van-field-placeholder-text-color:var(--van-text-color-3);--van-field-icon-size:18px;--van-field-clear-icon-size:18px;--van-field-clear-icon-color:var(--van-gray-5);--van-field-right-icon-color:var(--van-gray-6);--van-field-error-message-color:var(--van-danger-color);--van-field-error-message-font-size:12px;--van-field-text-area-min-height:60px;--van-field-word-limit-color:var(--van-gray-7);--van-field-word-limit-font-size:var(--van-font-size-sm);--van-field-word-limit-line-height:16px;--van-field-disabled-text-color:var(--van-text-color-3);--van-field-required-mark-color:var(--van-red)}.van-field{flex-wrap:wrap}.van-field__label{box-sizing:border-box;width:var(--van-field-label-width);margin-right:var(--van-field-label-margin-right);color:var(--van-field-label-color);text-align:left;word-wrap:break-word;flex:none}.van-field__label--center{text-align:center}.van-field__label--right{text-align:right}.van-field__label--top{text-align:left;width:100%;margin-bottom:var(--van-padding-base);overflow-wrap:break-word;display:flex}.van-field__label--required:before{color:var(--van-field-required-mark-color);content:"*";margin-right:2px}.van-field--disabled .van-field__label{color:var(--van-field-disabled-text-color)}.van-field__value{overflow:visible}.van-field__body{align-items:center;display:flex}.van-field__control{box-sizing:border-box;width:100%;min-width:0;color:var(--van-field-input-text-color);line-height:inherit;text-align:left;resize:none;-webkit-user-select:auto;user-select:auto;background-color:#0000;border:0;margin:0;padding:0;display:block}.van-field__control::placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control:read-only{cursor:default}.van-field__control:disabled{color:var(--van-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--van-field-input-disabled-text-color)}.van-field__control--center{text-align:center;justify-content:center}.van-field__control--right{text-align:right;justify-content:flex-end}.van-field__control--custom{min-height:var(--van-cell-line-height);align-items:center;display:flex}.van-field__control--error::-webkit-input-placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--error,.van-field__control--error::placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--min-height{min-height:var(--van-field-text-area-min-height)}.van-field__control[type=date],.van-field__control[type=time],.van-field__control[type=datetime-local]{min-height:var(--van-cell-line-height)}.van-field__control[type=search]{-webkit-appearance:none}.van-field__clear,.van-field__icon,.van-field__button,.van-field__right-icon{flex-shrink:0}.van-field__clear,.van-field__right-icon{margin-right:calc(var(--van-padding-xs)*-1);padding:0 var(--van-padding-xs);line-height:inherit}.van-field__clear{color:var(--van-field-clear-icon-color);font-size:var(--van-field-clear-icon-size);cursor:pointer}.van-field__left-icon .van-icon,.van-field__right-icon .van-icon{font-size:var(--van-field-icon-size);line-height:inherit;display:block}.van-field__left-icon{margin-right:var(--van-padding-base)}.van-field__right-icon{color:var(--van-field-right-icon-color)}.van-field__button{padding-left:var(--van-padding-xs)}.van-field__error-message{color:var(--van-field-error-message-color);font-size:var(--van-field-error-message-font-size);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{margin-top:var(--van-padding-base);color:var(--van-field-word-limit-color);font-size:var(--van-field-word-limit-font-size);line-height:var(--van-field-word-limit-line-height);text-align:right}:root,:host{--van-nav-bar-height:46px;--van-nav-bar-background:var(--van-background-2);--van-nav-bar-arrow-size:16px;--van-nav-bar-icon-color:var(--van-primary-color);--van-nav-bar-text-color:var(--van-primary-color);--van-nav-bar-title-font-size:var(--van-font-size-lg);--van-nav-bar-title-text-color:var(--van-text-color);--van-nav-bar-z-index:1;--van-nav-bar-disabled-opacity:var(--van-disabled-opacity)}.van-nav-bar{z-index:var(--van-nav-bar-z-index);line-height:var(--van-line-height-lg);text-align:center;background:var(--van-nav-bar-background);-webkit-user-select:none;user-select:none;position:relative}.van-nav-bar--fixed{width:100%;position:fixed;top:0;left:0}.van-nav-bar--safe-area-inset-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-nav-bar .van-icon{color:var(--van-nav-bar-icon-color)}.van-nav-bar__content{height:var(--van-nav-bar-height);align-items:center;display:flex;position:relative}.van-nav-bar__arrow{margin-right:var(--van-padding-base);font-size:var(--van-nav-bar-arrow-size)}.van-nav-bar__title{max-width:60%;color:var(--van-nav-bar-title-text-color);font-weight:var(--van-font-bold);font-size:var(--van-nav-bar-title-font-size);margin:0 auto}.van-nav-bar__left,.van-nav-bar__right{padding:0 var(--van-padding-md);font-size:var(--van-font-size-md);align-items:center;display:flex;position:absolute;top:0;bottom:0}.van-nav-bar__left--disabled,.van-nav-bar__right--disabled{cursor:not-allowed;opacity:var(--van-nav-bar-disabled-opacity)}.van-nav-bar__left{left:0}.van-nav-bar__right{right:0}.van-nav-bar__text{color:var(--van-nav-bar-text-color)} diff --git a/assets/_plugin-vue_export-helper-X_5jfaNy.js b/assets/_plugin-vue_export-helper-X_5jfaNy.js new file mode 100644 index 0000000..ef242e8 --- /dev/null +++ b/assets/_plugin-vue_export-helper-X_5jfaNy.js @@ -0,0 +1,6 @@ +import{Fragment as e,Teleport as t,Transition as n,computed as r,createApp as i,createTextVNode as a,createVNode as o,defineComponent as s,getCurrentInstance as c,inject as l,isRef as u,isVNode as d,mergeProps as f,nextTick as p,onActivated as m,onBeforeUnmount as h,onDeactivated as g,onMounted as _,onUnmounted as v,provide as ee,reactive as te,ref as y,unref as b,useRouter as ne,vShow as re,watch as x,watchEffect as ie,withDirectives as ae}from"./index-DT5X53L9.js";var oe=Object.create,se=Object.defineProperty,S=Object.getOwnPropertyDescriptor,ce=Object.getOwnPropertyNames,le=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty,de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fe=(e,t)=>{for(var n in t)se(e,n,{get:t[n],enumerable:!0})},pe=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ce(t),a=0,o=i.length,s;at[e]).bind(null,s),enumerable:!(r=S(t,s))||r.enumerable});return e},me=(e,t,n)=>(n=e==null?{}:oe(le(e)),pe(t||!e||!e.__esModule?se(n,`default`,{value:e,enumerable:!0}):n,e));function he(){}const C=Object.assign,w=typeof window<`u`,T=e=>typeof e==`object`&&!!e,E=e=>e!=null,ge=e=>typeof e==`function`,_e=e=>T(e)&&ge(e.then)&&ge(e.catch),ve=e=>typeof e==`number`||/^\d+(\.\d+)?$/.test(e),ye=()=>w?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1;function be(e,t){let n=t.split(`.`),r=e;return n.forEach(e=>{var t;r=T(r)?(t=r[e])??``:``}),r}function xe(e,t,n){return t.reduce((t,r)=>((!n||e[r]!==void 0)&&(t[r]=e[r]),t),{})}const Se=(e,t)=>JSON.stringify(e)===JSON.stringify(t),Ce=e=>Array.isArray(e)?e:[e],we=e=>e.reduce((e,t)=>e.concat(t),[]),D=null,O=[Number,String],k={type:Boolean,default:!0},Te=e=>({type:e,required:!0}),Ee=()=>({type:Array,default:()=>[]}),De=e=>({type:Number,default:e}),Oe=e=>({type:O,default:e}),A=e=>({type:String,default:e});var j=typeof window<`u`;function ke(e){return j?requestAnimationFrame(e):-1}function Ae(e){j&&cancelAnimationFrame(e)}function je(e){ke(()=>ke(e))}var Me=e=>e===window,Ne=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),Pe=e=>{let t=b(e);if(Me(t)){let e=t.innerWidth,n=t.innerHeight;return Ne(e,n)}return t?.getBoundingClientRect?t.getBoundingClientRect():Ne(0,0)};function Fe(e){let t=l(e,null);if(t){let e=c(),{link:n,unlink:i,internalChildren:a}=t;n(e),v(()=>i(e));let o=r(()=>a.indexOf(e));return{parent:t,index:o}}return{parent:null,index:y(-1)}}function Ie(e){let t=[],n=e=>{Array.isArray(e)&&e.forEach(e=>{var r;d(e)&&(t.push(e),(r=e.component)?.subTree&&(t.push(e.component.subTree),n(e.component.subTree.children)),e.children&&n(e.children))})};return n(e),t}var Le=(e,t)=>{let n=e.indexOf(t);return n===-1?e.findIndex(e=>t.key!==void 0&&t.key!==null&&e.type===t.type&&e.key===t.key):n};function Re(e,t,n){let r=Ie(e.subTree.children);n.sort((e,t)=>Le(r,e.vnode)-Le(r,t.vnode));let i=n.map(e=>e.proxy);t.sort((e,t)=>{let n=i.indexOf(e),r=i.indexOf(t);return n-r})}function ze(e){let t=te([]),n=te([]),r=c(),i=i=>{let a=e=>{e.proxy&&(n.push(e),t.push(e.proxy),Re(r,t,n))},o=e=>{let r=n.indexOf(e);t.splice(r,1),n.splice(r,1)};ee(e,Object.assign({link:a,unlink:o,children:t,internalChildren:n},i))};return{children:t,linkChildren:i}}var Be=1e3,Ve=60*Be,He=60*Ve,Ue=24*He;function We(e){let t;_(()=>{e(),p(()=>{t=!0})}),m(()=>{t&&e()})}function Ge(e,t,n={}){if(!j)return;let{target:r=window,passive:i=!1,capture:a=!1}=n,o=!1,s,c=n=>{if(o)return;let r=b(n);r&&!s&&(r.addEventListener(e,t,{capture:a,passive:i}),s=!0)},l=n=>{if(o)return;let r=b(n);r&&s&&(r.removeEventListener(e,t,a),s=!1)};v(()=>l(r)),g(()=>l(r)),We(()=>c(r));let d;return u(r)&&(d=x(r,(e,t)=>{l(t),c(e)})),()=>{d?.(),l(r),o=!0}}var Ke,qe;function Je(){if(!Ke&&(Ke=y(0),qe=y(0),j)){let e=()=>{Ke.value=window.innerWidth,qe.value=window.innerHeight};e(),window.addEventListener(`resize`,e,{passive:!0}),window.addEventListener(`orientationchange`,e,{passive:!0})}return{width:Ke,height:qe}}var Ye=/scroll|auto|overlay/i,Xe=j?window:void 0;function Ze(e){let t=1;return e.tagName!==`HTML`&&e.tagName!==`BODY`&&e.nodeType===t}function Qe(e,t=Xe){let n=e;for(;n&&n!==t&&Ze(n);){let{overflowY:e}=window.getComputedStyle(n);if(Ye.test(e))return n;n=n.parentNode}return t}function $e(e,t=Xe){let n=y();return _(()=>{e.value&&(n.value=Qe(e.value,t))}),n}var et;function tt(){if(!et&&(et=y(`visible`),j)){let e=()=>{et.value=document.hidden?`hidden`:`visible`};e(),window.addEventListener(`visibilitychange`,e)}return et}var nt=Symbol(`van-field`);function rt(e){let t=`scrollTop`in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function it(e,t){`scrollTop`in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function at(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function ot(e){it(window,e),it(document.body,e)}function st(e,t){if(e===window)return 0;let n=t?rt(t):at();return Pe(e).top+n}const ct=ye();function lt(){ct&&ot(at())}const ut=e=>e.stopPropagation();function dt(e,t){(typeof e.cancelable!=`boolean`||e.cancelable)&&e.preventDefault(),t&&ut(e)}function ft(e){let t=b(e);if(!t)return!1;let n=window.getComputedStyle(t),r=n.display===`none`,i=t.offsetParent===null&&n.position!==`fixed`;return r||i}const{width:pt,height:mt}=Je();function M(e){if(E(e))return ve(e)?`${e}px`:String(e)}function ht(e){if(E(e)){if(Array.isArray(e))return{width:M(e[0]),height:M(e[1])};let t=M(e);return{width:t,height:t}}}function gt(e){let t={};return e!==void 0&&(t.zIndex=+e),t}let _t;function vt(){if(!_t){let e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;_t=parseFloat(t)}return _t}function yt(e){return e=e.replace(/rem/g,``),+e*vt()}function bt(e){return e=e.replace(/vw/g,``),+e*pt.value/100}function xt(e){return e=e.replace(/vh/g,``),+e*mt.value/100}function St(e){if(typeof e==`number`)return e;if(w){if(e.includes(`rem`))return yt(e);if(e.includes(`vw`))return bt(e);if(e.includes(`vh`))return xt(e)}return parseFloat(e)}const Ct=/-(\w)/g,wt=e=>e.replace(Ct,(e,t)=>t.toUpperCase()),Tt=e=>e.replace(/([A-Z])/g,`-$1`).toLowerCase().replace(/^-/,``),Et=(e,t,n)=>Math.min(Math.max(e,t),n);function Dt(e,t,n){let r=e.indexOf(t);return r===-1?e:t===`-`&&r!==0?e.slice(0,r):e.slice(0,r+1)+e.slice(r).replace(n,``)}function Ot(e,t=!0,n=!0){e=t?Dt(e,`.`,/\./g):e.split(`.`)[0],e=n?Dt(e,`-`,/-/g):e.replace(/-/,``);let r=t?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(r,``)}const{hasOwnProperty:kt}=Object.prototype;function At(e,t,n){let r=t[n];E(r)&&(!kt.call(e,n)||!T(r)?e[n]=r:e[n]=jt(Object(e[n]),r))}function jt(e,t){return Object.keys(t).forEach(n=>{At(e,t,n)}),e}var Mt={name:`姓名`,tel:`电话`,save:`保存`,clear:`清空`,cancel:`取消`,confirm:`确认`,delete:`删除`,loading:`加载中...`,noCoupon:`暂无优惠券`,nameEmpty:`请填写姓名`,addContact:`添加联系人`,telInvalid:`请填写正确的电话`,vanCalendar:{end:`结束`,start:`开始`,title:`日期选择`,weekdays:[`日`,`一`,`二`,`三`,`四`,`五`,`六`],monthTitle:(e,t)=>`${e}\u5E74${t}\u6708`,rangePrompt:e=>`\u6700\u591A\u9009\u62E9 ${e} \u5929`},vanCascader:{select:`请选择`},vanPagination:{prev:`上一页`,next:`下一页`},vanPullRefresh:{pulling:`下拉即可刷新...`,loosing:`释放即可刷新...`},vanSubmitBar:{label:`合计:`},vanCoupon:{unlimited:`无门槛`,discount:e=>`${e}\u6298`,condition:e=>`\u6EE1${e}\u5143\u53EF\u7528`},vanCouponCell:{title:`优惠券`,count:e=>`${e}\u5F20\u53EF\u7528`},vanCouponList:{exchange:`兑换`,close:`不使用`,enable:`可用`,disabled:`不可用`,placeholder:`输入优惠码`},vanAddressEdit:{area:`地区`,areaEmpty:`请选择地区`,addressEmpty:`请填写详细地址`,addressDetail:`详细地址`,defaultAddress:`设为默认收货地址`},vanAddressList:{add:`新增地址`}};const Nt=y(`zh-CN`),Pt=te({"zh-CN":Mt}),Ft={messages(){return Pt[Nt.value]},use(e,t){Nt.value=e,this.add({[e]:t})},add(e={}){jt(Pt,e)}};var It=Ft;function Lt(e){let t=wt(e)+`.`;return(e,...n)=>{let r=It.messages(),i=be(r,t+e)||be(r,e);return ge(i)?i(...n):i}}function Rt(e,t){return t?typeof t==`string`?` ${e}--${t}`:Array.isArray(t)?t.reduce((t,n)=>t+Rt(e,n),``):Object.keys(t).reduce((n,r)=>n+(t[r]?Rt(e,r):``),``):``}function zt(e){return(t,n)=>(t&&typeof t!=`string`&&(n=t,t=``),t=t?`${e}__${t}`:e,`${t}${Rt(t,n)}`)}function N(e){let t=`van-${e}`;return[t,zt(t),Lt(t)]}const P=`van-hairline`,Bt=`${P}--top`,Vt=`${P}--left`,Ht=`${P}--right`,Ut=`${P}--bottom`,Wt=`${P}--surround`,Gt=`${P}--top-bottom`,Kt=`${P}-unset--top-bottom`,qt=`van-haptics-feedback`,Jt=Symbol(`van-form`),Yt=5;function Xt(e,{args:t=[],done:n,canceled:r,error:i}){if(e){let a=e.apply(null,t);_e(a)?a.then(e=>{e?n():r&&r()}).catch(i||he):a?n():r&&r()}else n()}function F(e){return e.install=t=>{let{name:n}=e;n&&(t.component(n,e),t.component(wt(`-${n}`),e))},e}const Zt=Symbol();function Qt(e){let t=l(Zt,null);t&&x(t,t=>{t&&e()})}const $t=(e,t)=>{let n=y(),r=()=>{n.value=Pe(e).height};return _(()=>{if(p(r),t)for(let e=1;e<=3;e++)setTimeout(r,100*e)}),Qt(()=>p(r)),x([pt,mt],r),n};function en(e,t){let n=$t(e,!0);return e=>o(`div`,{class:t(`placeholder`),style:{height:n.value?`${n.value}px`:void 0}},[e()])}function tn(e){let t=c();t&&C(t.proxy,e)}const nn={to:[String,Object],url:String,replace:Boolean};function rn({to:e,url:t,replace:n,$router:r}){e&&r?r[n?`replace`:`push`](e):t&&(n?location.replace(t):location.href=t)}function an(){let e=c().proxy;return()=>rn(e)}const[on,sn]=N(`badge`),cn={dot:Boolean,max:O,tag:A(`div`),color:String,offset:Array,content:O,showZero:k,position:A(`top-right`)};var ln=s({name:on,props:cn,setup(e,{slots:t}){let n=()=>{if(t.content)return!0;let{content:n,showZero:r}=e;return E(n)&&n!==``&&(r||n!==0&&n!==`0`)},i=()=>{let{dot:r,max:i,content:a}=e;if(!r&&n())return t.content?t.content():E(i)&&ve(a)&&+a>+i?`${i}+`:a},a=e=>e.startsWith(`-`)?e.replace(`-`,``):`-${e}`,s=r(()=>{let n={background:e.color};if(e.offset){let[r,i]=e.offset,{position:o}=e,[s,c]=o.split(`-`);t.default?(typeof i==`number`?n[s]=M(s===`top`?i:-i):n[s]=s===`top`?M(i):a(i),typeof r==`number`?n[c]=M(c===`left`?r:-r):n[c]=c===`left`?M(r):a(r)):(n.marginTop=M(i),n.marginLeft=M(r))}return n}),c=()=>{if(n()||e.dot)return o(`div`,{class:sn([e.position,{dot:e.dot,fixed:!!t.default}]),style:s.value},[i()])};return()=>{if(t.default){let{tag:n}=e;return o(n,{class:sn(`wrapper`)},{default:()=>[t.default(),c()]})}return c()}}});const un=F(ln);let dn=2e3;const fn=()=>++dn,pn=e=>{dn=e},[mn,hn]=N(`config-provider`),gn=Symbol(mn),_n={tag:A(`div`),theme:A(`light`),zIndex:Number,themeVars:Object,themeVarsDark:Object,themeVarsLight:Object,themeVarsScope:A(`local`),iconPrefix:String};function vn(e){return e.replace(/([a-zA-Z])(\d)/g,`$1-$2`)}function yn(e){let t={};return Object.keys(e).forEach(n=>{let r=vn(Tt(n));t[`--van-${r}`]=e[n]}),t}function bn(e={},t={}){Object.keys(e).forEach(n=>{e[n]!==t[n]&&document.documentElement.style.setProperty(n,e[n])}),Object.keys(t).forEach(t=>{e[t]||document.documentElement.style.removeProperty(t)})}var xn=s({name:mn,props:_n,setup(e,{slots:t}){let n=r(()=>yn(C({},e.themeVars,e.theme===`dark`?e.themeVarsDark:e.themeVarsLight)));if(w){let t=()=>{document.documentElement.classList.add(`van-theme-${e.theme}`)},r=(t=e.theme)=>{document.documentElement.classList.remove(`van-theme-${t}`)};x(()=>e.theme,(e,n)=>{n&&r(n),t()},{immediate:!0}),m(t),g(r),h(r),x(n,(t,n)=>{e.themeVarsScope===`global`&&bn(t,n)}),x(()=>e.themeVarsScope,(e,t)=>{t===`global`&&bn({},n.value),e===`global`&&bn(n.value,{})}),e.themeVarsScope===`global`&&bn(n.value,{})}return ee(gn,e),ie(()=>{e.zIndex!==void 0&&pn(e.zIndex)}),()=>o(e.tag,{class:hn(),style:e.themeVarsScope===`local`?n.value:void 0},{default:()=>{var e;return[(e=t.default)?.call(t)]}})}});const[Sn,Cn]=N(`icon`),wn=e=>e?.includes(`/`),Tn={dot:Boolean,tag:A(`i`),name:String,size:O,badge:O,color:String,badgeProps:Object,classPrefix:String};var En=s({name:Sn,props:Tn,setup(e,{slots:t}){let n=l(gn,null),i=r(()=>e.classPrefix||n?.iconPrefix||Cn());return()=>{let{tag:n,dot:r,name:a,size:s,badge:c,color:l}=e,u=wn(a);return o(un,f({dot:r,tag:n,class:[i.value,u?``:`${i.value}-${a}`],style:{color:l,fontSize:M(s)},content:c},e.badgeProps),{default:()=>{var e;return[(e=t.default)?.call(t),u&&o(`img`,{class:Cn(`image`),src:a},null)]}})}}});const I=F(En),[Dn,On]=N(`loading`),kn=Array(12).fill(null).map((e,t)=>o(`i`,{class:On(`line`,String(t+1))},null)),An=o(`svg`,{class:On(`circular`),viewBox:`25 25 50 50`},[o(`circle`,{cx:`50`,cy:`50`,r:`20`,fill:`none`},null)]),jn={size:O,type:A(`circular`),color:String,vertical:Boolean,textSize:O,textColor:String};var Mn=s({name:Dn,props:jn,setup(e,{slots:t}){let n=r(()=>C({color:e.color},ht(e.size))),i=()=>{let r=e.type===`spinner`?kn:An;return o(`span`,{class:On(`spinner`,e.type),style:n.value},[t.icon?t.icon():r])},a=()=>{var n;if(t.default)return o(`span`,{class:On(`text`),style:{fontSize:M(e.textSize),color:(n=e.textColor)??e.color}},[t.default()])};return()=>{let{type:t,vertical:n}=e;return o(`div`,{class:On([t,{vertical:n}]),"aria-live":`polite`,"aria-busy":!0},[i(),a()])}}});const Nn=F(Mn),Pn={show:Boolean,zIndex:O,overlay:k,duration:O,teleport:[String,Object],lockScroll:k,lazyRender:k,beforeClose:Function,overlayProps:Object,overlayStyle:Object,overlayClass:D,transitionAppear:Boolean,closeOnClickOverlay:k},Fn=Object.keys(Pn);function In(e,t){return e>t?`horizontal`:t>e?`vertical`:``}function Ln(){let e=y(0),t=y(0),n=y(0),r=y(0),i=y(0),a=y(0),o=y(``),s=y(!0),c=()=>o.value===`vertical`,l=()=>o.value===`horizontal`,u=()=>{n.value=0,r.value=0,i.value=0,a.value=0,o.value=``,s.value=!0},d=n=>{u(),e.value=n.touches[0].clientX,t.value=n.touches[0].clientY},f=c=>{let l=c.touches[0];n.value=(l.clientX<0?0:l.clientX)-e.value,r.value=l.clientY-t.value,i.value=Math.abs(n.value),a.value=Math.abs(r.value);let u=10;(!o.value||i.valueYt||a.value>Yt)&&(s.value=!1)};return{move:f,start:d,reset:u,startX:e,startY:t,deltaX:n,deltaY:r,offsetX:i,offsetY:a,direction:o,isVertical:c,isHorizontal:l,isTap:s}}let Rn=0;const zn=`van-overflow-hidden`;function Bn(e,t){let n=Ln(),r=`01`,i=`10`,a=t=>{n.move(t);let a=n.deltaY.value>0?i:r,o=Qe(t.target,e.value),{scrollHeight:s,offsetHeight:c,scrollTop:l}=o,u=`11`;l===0?u=c>=s?`00`:`01`:l+c>=s&&(u=`10`),u!==`11`&&n.isVertical()&&!(parseInt(u,2)&parseInt(a,2))&&dt(t,!0)},o=()=>{document.addEventListener(`touchstart`,n.start),document.addEventListener(`touchmove`,a,{passive:!1}),Rn||document.body.classList.add(zn),Rn++},s=()=>{Rn&&(document.removeEventListener(`touchstart`,n.start),document.removeEventListener(`touchmove`,a),Rn--,Rn||document.body.classList.remove(zn))},c=()=>t()&&o(),l=()=>t()&&s();We(c),g(l),h(l),x(t,e=>{e?o():s()})}function Vn(e){let t=y(!1);return x(e,e=>{e&&(t.value=e)},{immediate:!0}),e=>()=>t.value?e():null}const Hn=()=>{var e;let{scopeId:t}=(e=c())?.vnode||{};return t?{[t]:``}:null},[Un,Wn]=N(`overlay`),Gn={show:Boolean,zIndex:O,duration:O,className:D,lockScroll:k,lazyRender:k,customStyle:Object,teleport:[String,Object]};var Kn=s({name:Un,inheritAttrs:!1,props:Gn,setup(e,{attrs:r,slots:i}){let a=y(),s=Vn(()=>e.show||!e.lazyRender),c=t=>{e.lockScroll&&dt(t,!0)},l=s(()=>{var t;let n=C(gt(e.zIndex),e.customStyle);return E(e.duration)&&(n.animationDuration=`${e.duration}s`),ae(o(`div`,f({ref:a,style:n,class:[Wn(),e.className]},r),[(t=i.default)?.call(i)]),[[re,e.show]])});return Ge(`touchmove`,c,{target:a}),()=>{let r=o(n,{name:`van-fade`,appear:!0},{default:l});return e.teleport?o(t,{to:e.teleport},{default:()=>[r]}):r}}});const qn=F(Kn),Jn=C({},Pn,{round:Boolean,position:A(`center`),closeIcon:A(`cross`),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:A(`top-right`),destroyOnClose:Boolean,safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[Yn,Xn]=N(`popup`);var Zn=s({name:Yn,inheritAttrs:!1,props:Jn,emits:[`open`,`close`,`opened`,`closed`,`keydown`,`update:show`,`clickOverlay`,`clickCloseIcon`],setup(i,{emit:a,attrs:s,slots:c}){let l,u,d=y(),h=y(),v=Vn(()=>i.show||!i.lazyRender),te=r(()=>{let e={zIndex:d.value};if(E(i.duration)){let t=i.position===`center`?`animationDuration`:`transitionDuration`;e[t]=`${i.duration}s`}return e}),b=()=>{l||(l=!0,d.value=i.zIndex===void 0?fn():+i.zIndex,a(`open`))},ne=()=>{l&&Xt(i.beforeClose,{done(){l=!1,a(`close`),a(`update:show`,!1)}})},ie=e=>{a(`clickOverlay`,e),i.closeOnClickOverlay&&ne()},oe=()=>{if(i.overlay){let e=C({show:i.show,class:i.overlayClass,zIndex:d.value,duration:i.duration,customStyle:i.overlayStyle,role:i.closeOnClickOverlay?`button`:void 0,tabindex:i.closeOnClickOverlay?0:void 0},i.overlayProps);return o(qn,f(e,Hn(),{onClick:ie}),{default:c[`overlay-content`]})}},se=e=>{a(`clickCloseIcon`,e),ne()},S=()=>{if(i.closeable)return o(I,{role:`button`,tabindex:0,name:i.closeIcon,class:[Xn(`close-icon`,i.closeIconPosition),qt],classPrefix:i.iconPrefix,onClick:se},null)},ce,le=()=>{ce&&clearTimeout(ce),ce=setTimeout(()=>{a(`opened`)})},ue=()=>a(`closed`),de=e=>a(`keydown`,e),fe=v(()=>{var e;let{destroyOnClose:t,round:n,position:r,safeAreaInsetTop:a,safeAreaInsetBottom:l,show:u}=i;if(!(!u&&t))return ae(o(`div`,f({ref:h,style:te.value,role:`dialog`,tabindex:0,class:[Xn({round:n,[r]:r}),{"van-safe-area-top":a,"van-safe-area-bottom":l}],onKeydown:de},s,Hn()),[(e=c.default)?.call(c),S()]),[[re,u]])}),pe=()=>{let{position:e,transition:t,transitionAppear:r}=i,a=e===`center`?`van-fade`:`van-popup-slide-${e}`;return o(n,{name:t||a,appear:r,onAfterEnter:le,onAfterLeave:ue},{default:fe})};return x(()=>i.show,e=>{e&&!l&&(b(),s.tabindex===0&&p(()=>{var e;(e=h.value)==null||e.focus()})),!e&&l&&(l=!1,a(`close`))}),tn({popupRef:h}),Bn(h,()=>i.show&&i.lockScroll),Ge(`popstate`,()=>{i.closeOnPopstate&&(ne(),u=!1)}),_(()=>{i.show&&b()}),m(()=>{u&&(a(`update:show`,!0),u=!1)}),g(()=>{i.show&&i.teleport&&(ne(),u=!0)}),ee(Zt,()=>i.show),()=>i.teleport?o(t,{to:i.teleport},{default:()=>[oe(),pe()]}):o(e,null,[oe(),pe()])}});const Qn=F(Zn);let $n=0;function er(){let e=c(),{name:t=`unknown`}=e?.type||{};return`${t}-${++$n}`}const[tr,nr]=N(`cell`),rr={tag:A(`div`),icon:String,size:String,title:O,value:O,label:O,center:Boolean,isLink:Boolean,border:k,iconPrefix:String,valueClass:D,labelClass:D,titleClass:D,titleStyle:null,arrowDirection:String,required:{type:[Boolean,String],default:null},clickable:{type:Boolean,default:null}},ir=C({},rr,nn);var ar=s({name:tr,props:ir,setup(e,{slots:t}){let n=an(),r=()=>{let n=t.label||E(e.label);if(n)return o(`div`,{class:[nr(`label`),e.labelClass]},[t.label?t.label():e.label])},i=()=>{var n;if(t.title||E(e.title)){let i=(n=t.title)?.call(t);return Array.isArray(i)&&i.length===0?void 0:o(`div`,{class:[nr(`title`),e.titleClass],style:e.titleStyle},[i||o(`span`,null,[e.title]),r()])}},a=()=>{let n=t.value||t.default,r=n||E(e.value);if(r)return o(`div`,{class:[nr(`value`),e.valueClass]},[n?n():o(`span`,null,[e.value])])},s=()=>{if(t.icon)return t.icon();if(e.icon)return o(I,{name:e.icon,class:nr(`left-icon`),classPrefix:e.iconPrefix},null)},c=()=>{if(t[`right-icon`])return t[`right-icon`]();if(e.isLink){let t=e.arrowDirection&&e.arrowDirection!==`right`?`arrow-${e.arrowDirection}`:`arrow`;return o(I,{name:t,class:nr(`right-icon`)},null)}};return()=>{var r;let{tag:l,size:u,center:d,border:f,isLink:p,required:m}=e,h=(r=e.clickable)??p,g={center:d,required:!!m,clickable:h,borderless:!f};return u&&(g[u]=!!u),o(l,{class:nr(g),role:h?`button`:void 0,tabindex:h?0:void 0,onClick:n},{default:()=>{var e;return[s(),i(),a(),c(),(e=t.extra)?.call(t)]}})}}});const or=F(ar);function sr(e){return Array.isArray(e)?!e.length:e===0?!1:!e}function cr(e,t){if(sr(e)){if(t.required)return!1;if(t.validateEmpty===!1)return!0}return!(t.pattern&&!t.pattern.test(String(e)))}function lr(e,t){return new Promise(n=>{let r=t.validator(e,t);if(_e(r)){r.then(n);return}n(r)})}function ur(e,t){let{message:n}=t;return ge(n)?n(e,t):n||``}function dr({target:e}){e.composing=!0}function fr({target:e}){e.composing&&(e.composing=!1,e.dispatchEvent(new Event(`input`)))}function pr(e,t){let n=at();e.style.height=`auto`;let r=e.scrollHeight;if(T(t)){let{maxHeight:e,minHeight:n}=t;e!==void 0&&(r=Math.min(r,e)),n!==void 0&&(r=Math.max(r,n))}r&&(e.style.height=`${r}px`,ot(n))}function mr(e,t){return e===`number`&&(e=`text`,t??=`decimal`),e===`digit`&&(e=`tel`,t??=`numeric`),{type:e,inputmode:t}}function L(e){return[...e].length}function hr(e,t){return[...e].slice(0,t).join(``)}const[gr,R]=N(`field`),_r={id:String,name:String,leftIcon:String,rightIcon:String,autofocus:Boolean,clearable:Boolean,maxlength:O,max:Number,min:Number,formatter:Function,clearIcon:A(`clear`),modelValue:Oe(``),inputAlign:String,placeholder:String,autocomplete:String,autocapitalize:String,autocorrect:String,errorMessage:String,enterkeyhint:String,clearTrigger:A(`focus`),formatTrigger:A(`onChange`),spellcheck:{type:Boolean,default:null},error:{type:Boolean,default:null},disabled:{type:Boolean,default:null},readonly:{type:Boolean,default:null},inputmode:String},vr=C({},rr,_r,{rows:O,type:A(`text`),rules:Array,autosize:[Boolean,Object],labelWidth:O,labelClass:D,labelAlign:String,showWordLimit:Boolean,errorMessageAlign:String,colon:{type:Boolean,default:null}});var yr=s({name:gr,props:vr,emits:[`blur`,`focus`,`clear`,`keypress`,`clickInput`,`endValidate`,`startValidate`,`clickLeftIcon`,`clickRightIcon`,`update:modelValue`],setup(e,{emit:t,slots:n}){let i=er(),s=te({status:`unvalidated`,focused:!1,validateMessage:``}),c=y(),l=y(),u=y(),{parent:d}=Fe(Jt),m=()=>{var t;return String((t=e.modelValue)??``)},h=t=>{if(E(e[t]))return e[t];if(d&&E(d.props[t]))return d.props[t]},g=r(()=>{let t=h(`readonly`);if(e.clearable&&!t){let t=m()!==``,n=e.clearTrigger===`always`||e.clearTrigger===`focus`&&s.focused;return t&&n}return!1}),v=r(()=>u.value&&n.input?u.value():e.modelValue),b=r(()=>{var t;let n=h(`required`);return n===`auto`?(t=e.rules)?.some(e=>e.required):n}),ne=e=>e.reduce((e,t)=>e.then(()=>{if(s.status===`failed`)return;let{value:e}=v;if(t.formatter&&(e=t.formatter(e,t)),!cr(e,t)){s.status=`failed`,s.validateMessage=ur(e,t);return}if(t.validator)return sr(e)&&t.validateEmpty===!1?void 0:lr(e,t).then(n=>{n&&typeof n==`string`?(s.status=`failed`,s.validateMessage=n):n===!1&&(s.status=`failed`,s.validateMessage=ur(e,t))})}),Promise.resolve()),re=()=>{s.status=`unvalidated`,s.validateMessage=``},ie=()=>t(`endValidate`,{status:s.status,message:s.validateMessage}),ae=(n=e.rules)=>new Promise(r=>{re(),n?(t(`startValidate`),ne(n).then(()=>{s.status===`failed`?(r({name:e.name,message:s.validateMessage}),ie()):(s.status=`passed`,r(),ie())})):r()}),oe=t=>{if(d&&e.rules){let{validateTrigger:n}=d.props,r=Ce(n).includes(t),i=e.rules.filter(e=>e.trigger?Ce(e.trigger).includes(t):r);i.length&&ae(i)}},se=t=>{var n;let{maxlength:r}=e;if(E(r)&&L(t)>+r){let e=m();if(e&&L(e)===+r)return e;let i=(n=c.value)?.selectionEnd;if(s.focused&&i){let e=[...t],n=e.length-+r;return e.splice(i-n,n),e.join(``)}return hr(t,+r)}return t},S=(n,r=`onChange`)=>{var i,a;let o=n;n=se(n);let l=L(o)-L(n);if(e.type===`number`||e.type===`digit`){let t=e.type===`number`;if(n=Ot(n,t,t),r===`onBlur`&&n!==``&&(e.min!==void 0||e.max!==void 0)){let t=Et(+n,(i=e.min)??-1/0,(a=e.max)??1/0);+n!==t&&(n=t.toString())}}let u=0;if(e.formatter&&r===e.formatTrigger){let{formatter:t,maxlength:r}=e;if(n=t(n),E(r)&&L(n)>+r&&(n=hr(n,+r)),c.value&&s.focused){let{selectionEnd:e}=c.value,n=hr(o,e);u=L(t(n))-L(n)}}if(c.value&&c.value.value!==n)if(s.focused){let{selectionStart:e,selectionEnd:t}=c.value;if(c.value.value=n,E(e)&&E(t)){let r=L(n);l?(e-=l,t-=l):u&&(e+=u,t+=u),c.value.setSelectionRange(Math.min(e,r),Math.min(t,r))}}else c.value.value=n;n!==e.modelValue&&t(`update:modelValue`,n)},ce=e=>{e.target.composing||S(e.target.value)},le=()=>{var e;return(e=c.value)?.blur()},ue=()=>{var e;return(e=c.value)?.focus()},de=()=>{let t=c.value;e.type===`textarea`&&e.autosize&&t&&pr(t,e.autosize)},fe=e=>{s.focused=!0,t(`focus`,e),p(de),h(`readonly`)&&le()},pe=e=>{s.focused=!1,S(m(),`onBlur`),t(`blur`,e),!h(`readonly`)&&(oe(`onBlur`),p(de),lt())},me=e=>t(`clickInput`,e),he=e=>t(`clickLeftIcon`,e),C=e=>t(`clickRightIcon`,e),w=e=>{dt(e),t(`update:modelValue`,``),t(`clear`,e)},T=r(()=>{if(typeof e.error==`boolean`)return e.error;if(d&&d.props.showError&&s.status===`failed`)return!0}),ge=r(()=>{let e=h(`labelWidth`),t=h(`labelAlign`);if(e&&t!==`top`)return{width:M(e)}}),_e=n=>{let r=13;if(n.keyCode===r){let t=d&&d.props.submitOnEnter;!t&&e.type!==`textarea`&&dt(n),e.type===`search`&&le()}t(`keypress`,n)},ve=()=>e.id||`${i}-input`,ye=()=>s.status,be=()=>{let t=R(`control`,[h(`inputAlign`),{error:T.value,custom:!!n.input,"min-height":e.type===`textarea`&&!e.autosize}]);if(n.input)return o(`div`,{class:t,onClick:me},[n.input()]);let r={id:ve(),ref:c,name:e.name,rows:e.rows===void 0?void 0:+e.rows,class:t,disabled:h(`disabled`),readonly:h(`readonly`),autofocus:e.autofocus,placeholder:e.placeholder,autocomplete:e.autocomplete,autocapitalize:e.autocapitalize,autocorrect:e.autocorrect,enterkeyhint:e.enterkeyhint,spellcheck:e.spellcheck,"aria-labelledby":e.label?`${i}-label`:void 0,"data-allow-mismatch":`attribute`,onBlur:pe,onFocus:fe,onInput:ce,onClick:me,onChange:fr,onKeypress:_e,onCompositionend:fr,onCompositionstart:dr};return e.type===`textarea`?o(`textarea`,f(r,{inputmode:e.inputmode}),null):o(`input`,f(mr(e.type,e.inputmode),r),null)},xe=()=>{let t=n[`left-icon`];if(e.leftIcon||t)return o(`div`,{class:R(`left-icon`),onClick:he},[t?t():o(I,{name:e.leftIcon,classPrefix:e.iconPrefix},null)])},Se=()=>{let t=n[`right-icon`];if(e.rightIcon||t)return o(`div`,{class:R(`right-icon`),onClick:C},[t?t():o(I,{name:e.rightIcon,classPrefix:e.iconPrefix},null)])},we=()=>{if(e.showWordLimit&&e.maxlength){let t=L(m());return o(`div`,{class:R(`word-limit`)},[o(`span`,{class:R(`word-num`)},[t]),a(`/`),e.maxlength])}},D=()=>{if(d&&d.props.showErrorMessage===!1)return;let t=e.errorMessage||s.validateMessage;if(t){let e=n[`error-message`],r=h(`errorMessageAlign`);return o(`div`,{class:R(`error-message`,r)},[e?e({message:t}):t])}},O=()=>{let t=h(`labelWidth`),r=h(`labelAlign`),a=h(`colon`)?`:`:``;if(n.label)return[n.label(),a];if(e.label)return o(`label`,{id:`${i}-label`,for:n.input?void 0:ve(),"data-allow-mismatch":`attribute`,onClick:e=>{dt(e),ue()},style:r===`top`&&t?{width:M(t)}:void 0},[e.label+a])},k=()=>[o(`div`,{class:R(`body`)},[be(),g.value&&o(I,{ref:l,name:e.clearIcon,class:R(`clear`)},null),Se(),n.button&&o(`div`,{class:R(`button`)},[n.button()])]),we(),D()];return tn({blur:le,focus:ue,validate:ae,formValue:v,resetValidation:re,getValidationStatus:ye}),ee(nt,{customValue:u,resetValidation:re,validateWithTrigger:oe}),x(()=>e.modelValue,()=>{S(m()),re(),oe(`onChange`),p(de)}),_(()=>{S(m(),e.formatTrigger),p(de)}),Ge(`touchstart`,w,{target:r(()=>{var e;return(e=l.value)?.$el})}),()=>{let t=h(`disabled`),r=h(`labelAlign`),i=xe(),a=()=>{let e=O();return r===`top`?[i,e].filter(Boolean):e||[]};return o(or,{size:e.size,class:R({error:T.value,disabled:t,[`label-${r}`]:r}),center:e.center,border:e.border,isLink:e.isLink,clickable:e.clickable,titleStyle:ge.value,valueClass:R(`value`),titleClass:[R(`label`,[r,{required:b.value}]),e.labelClass],arrowDirection:e.arrowDirection},{icon:i&&r!==`top`?()=>i:null,title:a,value:k,extra:n.extra})}}});const br=F(yr);let xr=0;function Sr(e){e?(xr||document.body.classList.add(`van-toast--unclickable`),xr++):xr&&(xr--,xr||document.body.classList.remove(`van-toast--unclickable`))}const[Cr,z]=N(`toast`),wr=[`show`,`overlay`,`teleport`,`transition`,`overlayClass`,`overlayStyle`,`closeOnClickOverlay`,`zIndex`],Tr={icon:String,show:Boolean,type:A(`text`),overlay:Boolean,message:O,iconSize:O,duration:De(2e3),position:A(`middle`),teleport:[String,Object],wordBreak:String,className:D,iconPrefix:String,transition:A(`van-fade`),loadingType:String,forbidClick:Boolean,overlayClass:D,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean,zIndex:O};var Er=s({name:Cr,props:Tr,emits:[`update:show`],setup(e,{emit:t,slots:n}){let r,i=!1,a=()=>{let t=e.show&&e.forbidClick;i!==t&&(i=t,Sr(i))},s=e=>t(`update:show`,e),c=()=>{e.closeOnClick&&s(!1)},l=()=>clearTimeout(r),u=()=>{let{icon:t,type:n,iconSize:r,iconPrefix:i,loadingType:a}=e,s=t||n===`success`||n===`fail`;if(s)return o(I,{name:t||n,size:r,class:z(`icon`),classPrefix:i},null);if(n===`loading`)return o(Nn,{class:z(`loading`),size:r,type:a},null)},d=()=>{let{type:t,message:r}=e;if(n.message)return o(`div`,{class:z(`text`)},[n.message()]);if(E(r)&&r!==``)return t===`html`?o(`div`,{key:0,class:z(`text`),innerHTML:String(r)},null):o(`div`,{class:z(`text`)},[r])};return x(()=>[e.show,e.forbidClick],a),x(()=>[e.show,e.type,e.message,e.duration],()=>{l(),e.show&&e.duration>0&&(r=setTimeout(()=>{s(!1)},e.duration))}),_(a),v(a),()=>o(Qn,f({class:[z([e.position,e.wordBreak===`normal`?`break-normal`:e.wordBreak,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:c,onClosed:l,"onUpdate:show":s},xe(e,wr)),{default:()=>[u(),d()]})}});function Dr(){let e=te({show:!1}),t=t=>{e.show=t},n=n=>{C(e,n,{transitionAppear:!0}),t(!0)},r=()=>t(!1);return tn({open:n,close:r,toggle:t}),{open:n,close:r,state:e,toggle:t}}function Or(e){let t=i(e),n=document.createElement(`div`);return document.body.appendChild(n),{instance:t.mount(n),unmount(){t.unmount(),document.body.removeChild(n)}}}const kr={icon:``,type:`text`,message:``,className:``,overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:`body`,iconSize:void 0,iconPrefix:void 0,position:`middle`,transition:`van-fade`,forbidClick:!1,loadingType:void 0,overlayClass:``,overlayStyle:void 0,closeOnClick:!1,closeOnClickOverlay:!1};let B=[],Ar=!1,jr=C({},kr);const Mr=new Map;function Nr(e){return T(e)?e:{message:e}}function Pr(){let{instance:e,unmount:t}=Or({setup(){let n=y(``),{open:r,state:i,close:a,toggle:s}=Dr(),l=()=>{Ar&&(B=B.filter(t=>t!==e),t())},u=()=>{let e={onClosed:l,"onUpdate:show":s};return o(Er,f(i,e),null)};return x(n,e=>{i.message=e}),c().render=u,{open:r,close:a,message:n}}});return e}function Fr(){if(!B.length||Ar){let e=Pr();B.push(e)}return B[B.length-1]}function Ir(e={}){if(!w)return{};let t=Fr(),n=Nr(e);return t.open(C({},jr,Mr.get(n.type||jr.type),n)),t}const Lr=e=>t=>Ir(C({type:e},Nr(t))),Rr=Lr(`loading`),zr=Lr(`success`),Br=Lr(`fail`),[Vr,V]=N(`nav-bar`),Hr={title:String,fixed:Boolean,zIndex:O,border:k,leftText:String,rightText:String,leftDisabled:Boolean,rightDisabled:Boolean,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:k};var Ur=s({name:Vr,props:Hr,emits:[`clickLeft`,`clickRight`],setup(e,{emit:t,slots:n}){let r=y(),i=en(r,V),a=n=>{e.leftDisabled||t(`clickLeft`,n)},s=n=>{e.rightDisabled||t(`clickRight`,n)},c=()=>n.left?n.left():[e.leftArrow&&o(I,{class:V(`arrow`),name:`arrow-left`},null),e.leftText&&o(`span`,{class:V(`text`)},[e.leftText])],l=()=>n.right?n.right():o(`span`,{class:V(`text`)},[e.rightText]),u=()=>{let{title:t,fixed:i,border:u,zIndex:d}=e,f=gt(d),p=e.leftArrow||e.leftText||n.left,m=e.rightText||n.right;return o(`div`,{ref:r,style:f,class:[V({fixed:i}),{[Ut]:u,"van-safe-area-top":e.safeAreaInsetTop}]},[o(`div`,{class:V(`content`)},[p&&o(`div`,{class:[V(`left`,{disabled:e.leftDisabled}),e.clickable&&!e.leftDisabled?qt:``],onClick:a},[c()]),o(`div`,{class:[V(`title`),`van-ellipsis`]},[n.title?n.title():t]),m&&o(`div`,{class:[V(`right`,{disabled:e.rightDisabled}),e.clickable&&!e.rightDisabled?qt:``],onClick:s},[l()])])])};return()=>e.fixed&&e.placeholder?i(u):u()}});const Wr=F(Ur);function Gr(e,t){return function(){return e.apply(t,arguments)}}const{toString:Kr}=Object.prototype,{getPrototypeOf:qr}=Object,{iterator:Jr,toStringTag:Yr}=Symbol,Xr=(e=>t=>{let n=Kr.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),H=e=>(e=e.toLowerCase(),t=>Xr(t)===e),Zr=e=>t=>typeof t===e,{isArray:U}=Array,Qr=Zr(`undefined`);function $r(e){return e!==null&&!Qr(e)&&e.constructor!==null&&!Qr(e.constructor)&&W(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ei=H(`ArrayBuffer`);function ti(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ei(e.buffer),t}const ni=Zr(`string`),W=Zr(`function`),ri=Zr(`number`),ii=e=>typeof e==`object`&&!!e,ai=e=>e===!0||e===!1,oi=e=>{if(Xr(e)!==`object`)return!1;let t=qr(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Yr in e)&&!(Jr in e)},si=H(`Date`),ci=H(`File`),li=H(`Blob`),ui=H(`FileList`),di=e=>ii(e)&&W(e.pipe),fi=e=>{let t;return e&&(typeof FormData==`function`&&e instanceof FormData||W(e.append)&&((t=Xr(e))===`formdata`||t===`object`&&W(e.toString)&&e.toString()===`[object FormData]`))},pi=H(`URLSearchParams`),[mi,hi,gi,_i]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(H),vi=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function yi(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),U(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const G=(()=>typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global)(),xi=e=>!Qr(e)&&e!==G;function Si(){let{caseless:e}=xi(this)&&this||{},t={},n=(n,r)=>{let i=e&&bi(t,r)||r;oi(t[i])&&oi(n)?t[i]=Si(t[i],n):oi(n)?t[i]=Si({},n):U(n)?t[i]=n.slice():t[i]=n};for(let e=0,t=arguments.length;e(yi(t,(t,r)=>{n&&W(t)?e[r]=Gr(t,n):e[r]=t},{allOwnKeys:r}),e),wi=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ti=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,`super`,{value:t.prototype}),n&&Object.assign(e.prototype,n)},Ei=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&qr(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Di=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Oi=e=>{if(!e)return null;if(U(e))return e;let t=e.length;if(!ri(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},ki=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&qr(Uint8Array)),Ai=(e,t)=>{let n=e&&e[Jr],r=n.call(e),i;for(;(i=r.next())&&!i.done;){let n=i.value;t.call(e,n[0],n[1])}},ji=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Mi=H(`HTMLFormElement`),Ni=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Pi=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Fi=H(`RegExp`),Ii=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};yi(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Li=e=>{Ii(e,(t,n)=>{if(W(e)&&[`arguments`,`caller`,`callee`].indexOf(n)!==-1)return!1;let r=e[n];if(W(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Ri=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return U(e)?r(e):r(String(e).split(t)),n},zi=()=>{},Bi=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Vi(e){return!!(e&&W(e.append)&&e[Yr]===`FormData`&&e[Jr])}const Hi=e=>{let t=Array(10),n=(e,r)=>{if(ii(e)){if(t.indexOf(e)>=0)return;if(!(`toJSON`in e)){t[r]=e;let i=U(e)?[]:{};return yi(e,(e,t)=>{let a=n(e,r+1);!Qr(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},Ui=H(`AsyncFunction`),Wi=e=>e&&(ii(e)||W(e))&&W(e.then)&&W(e.catch),Gi=((e,t)=>e?setImmediate:t?((e,t)=>(G.addEventListener(`message`,({source:n,data:r})=>{n===G&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),G.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,W(G.postMessage)),Ki=typeof queueMicrotask<`u`?queueMicrotask.bind(G):typeof process<`u`&&process.nextTick||Gi,qi=e=>e!=null&&W(e[Jr]);var K={isArray:U,isArrayBuffer:ei,isBuffer:$r,isFormData:fi,isArrayBufferView:ti,isString:ni,isNumber:ri,isBoolean:ai,isObject:ii,isPlainObject:oi,isReadableStream:mi,isRequest:hi,isResponse:gi,isHeaders:_i,isUndefined:Qr,isDate:si,isFile:ci,isBlob:li,isRegExp:Fi,isFunction:W,isStream:di,isURLSearchParams:pi,isTypedArray:ki,isFileList:ui,forEach:yi,merge:Si,extend:Ci,trim:vi,stripBOM:wi,inherits:Ti,toFlatObject:Ei,kindOf:Xr,kindOfTest:H,endsWith:Di,toArray:Oi,forEachEntry:Ai,matchAll:ji,isHTMLForm:Mi,hasOwnProperty:Pi,hasOwnProp:Pi,reduceDescriptors:Ii,freezeMethods:Li,toObjectSet:Ri,toCamelCase:Ni,noop:zi,toFiniteNumber:Bi,findKey:bi,global:G,isContextDefined:xi,isSpecCompliantForm:Vi,toJSONObject:Hi,isAsyncFn:Ui,isThenable:Wi,setImmediate:Gi,asap:Ki,isIterable:qi};function Ji(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name=`AxiosError`,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}K.inherits(Ji,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const Yi=Ji.prototype,Xi={};[`ERR_BAD_OPTION_VALUE`,`ERR_BAD_OPTION`,`ECONNABORTED`,`ETIMEDOUT`,`ERR_NETWORK`,`ERR_FR_TOO_MANY_REDIRECTS`,`ERR_DEPRECATED`,`ERR_BAD_RESPONSE`,`ERR_BAD_REQUEST`,`ERR_CANCELED`,`ERR_NOT_SUPPORT`,`ERR_INVALID_URL`].forEach(e=>{Xi[e]={value:e}}),Object.defineProperties(Ji,Xi),Object.defineProperty(Yi,`isAxiosError`,{value:!0}),Ji.from=(e,t,n,r,i,a)=>{let o=Object.create(Yi);return K.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>e!==`isAxiosError`),Ji.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var q=Ji,Zi=null;function Qi(e){return K.isPlainObject(e)||K.isArray(e)}function $i(e){return K.endsWith(e,`[]`)?e.slice(0,-2):e}function ea(e,t,n){return e?e.concat(t).map(function(e,t){return e=$i(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function ta(e){return K.isArray(e)&&!e.some(Qi)}const na=K.toFlatObject(K,{},null,function(e){return/^is[A-Z]/.test(e)});function ra(e,t,n){if(!K.isObject(e))throw TypeError(`target must be an object`);t||=new(Zi||FormData),n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!K.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||u,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=s&&K.isSpecCompliantForm(t);if(!K.isFunction(i))throw TypeError(`visitor must be a function`);function l(e){if(e===null)return``;if(K.isDate(e))return e.toISOString();if(K.isBoolean(e))return e.toString();if(!c&&K.isBlob(e))throw new q(`Blob is not supported. Use a Buffer instead.`);return K.isArrayBuffer(e)||K.isTypedArray(e)?c&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function u(e,n,i){let s=e;if(e&&!i&&typeof e==`object`){if(K.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&ta(e)||(K.isFileList(e)||K.endsWith(n,`[]`))&&(s=K.toArray(e)))return n=$i(n),s.forEach(function(e,r){!(K.isUndefined(e)||e===null)&&t.append(o===!0?ea([n],r,a):o===null?n:n+`[]`,l(e))}),!1}return Qi(e)?!0:(t.append(ea(i,n,a),l(e)),!1)}let d=[],f=Object.assign(na,{defaultVisitor:u,convertValue:l,isVisitable:Qi});function p(e,n){if(!K.isUndefined(e)){if(d.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));d.push(e),K.forEach(e,function(e,r){let a=!(K.isUndefined(e)||e===null)&&i.call(t,e,K.isString(r)?r.trim():r,n,f);a===!0&&p(e,n?n.concat(r):[r])}),d.pop()}}if(!K.isObject(e))throw TypeError(`data must be an object`);return p(e),t}var ia=ra;function aa(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`,"%00":`\0`};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function oa(e,t){this._pairs=[],e&&ia(e,this,t)}const sa=oa.prototype;sa.append=function(e,t){this._pairs.push([e,t])},sa.toString=function(e){let t=e?function(t){return e.call(this,t,aa)}:aa;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};var ca=oa;function la(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`).replace(/%5B/gi,`[`).replace(/%5D/gi,`]`)}function ua(e,t,n){if(!t)return e;let r=n&&n.encode||la;K.isFunction(n)&&(n={serialize:n});let i=n&&n.serialize,a;if(a=i?i(t,n):K.isURLSearchParams(t)?t.toString():new ca(t,n).toString(r),a){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+a}return e}var da=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){K.forEach(this.handlers,function(t){t!==null&&e(t)})}},fa=da,pa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ma=typeof URLSearchParams<`u`?URLSearchParams:ca,ha=typeof FormData<`u`?FormData:null,ga=typeof Blob<`u`?Blob:null,_a={isBrowser:!0,classes:{URLSearchParams:ma,FormData:ha,Blob:ga},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},va={};fe(va,{hasBrowserEnv:()=>ya,hasStandardBrowserEnv:()=>xa,hasStandardBrowserWebWorkerEnv:()=>Sa,navigator:()=>ba,origin:()=>Ca});const ya=typeof window<`u`&&typeof document<`u`,ba=typeof navigator==`object`&&navigator||void 0,xa=ya&&(!ba||[`ReactNative`,`NativeScript`,`NS`].indexOf(ba.product)<0),Sa=(()=>typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`)(),Ca=ya&&window.location.href||`http://localhost`;var J={...va,..._a};function wa(e,t){return ia(e,new J.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return J.isNode&&K.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)}},t))}function Ta(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function Ea(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r=e.length;if(a=!a&&K.isArray(r)?r.length:a,s)return K.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o;(!r[a]||!K.isObject(r[a]))&&(r[a]=[]);let c=t(e,n,r[a],i);return c&&K.isArray(r[a])&&(r[a]=Ea(r[a])),!o}if(K.isFormData(e)&&K.isFunction(e.entries)){let n={};return K.forEachEntry(e,(e,r)=>{t(Ta(e),r,n,0)}),n}return null}var Oa=Da;function ka(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}const Aa={transitional:pa,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=K.isObject(e);i&&K.isHTMLForm(e)&&(e=new FormData(e));let a=K.isFormData(e);if(a)return r?JSON.stringify(Oa(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let o;if(i){if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return wa(e,this.formSerializer).toString();if((o=K.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let t=this.env&&this.env.FormData;return ia(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType(`application/json`,!1),ka(e)):e}],transformResponse:[function(e){let t=this.transitional||Aa.transitional,n=t&&t.forcedJSONParsing,r=this.responseType===`json`;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(n&&!this.responseType||r)){let n=t&&t.silentJSONParsing,i=!n&&r;try{return JSON.parse(e)}catch(e){if(i)throw e.name===`SyntaxError`?q.from(e,q.ERR_BAD_RESPONSE,this,null,this.response):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:J.classes.FormData,Blob:J.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};K.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`],e=>{Aa.headers[e]={}});var ja=Aa;const Ma=K.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]);var Na=e=>{let t={},n,r,i;return e&&e.split(` +`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&Ma[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};const Pa=Symbol(`internals`);function Fa(e){return e&&String(e).trim().toLowerCase()}function Ia(e){return e===!1||e==null?e:K.isArray(e)?e.map(Ia):String(e)}function La(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ra=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function za(e,t,n,r,i){if(K.isFunction(r))return r.call(this,t,n);if(i&&(t=n),K.isString(t)){if(K.isString(r))return t.indexOf(r)!==-1;if(K.isRegExp(r))return r.test(t)}}function Ba(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Va(e,t){let n=K.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var Ha=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=Fa(t);if(!i)throw Error(`header name must be a non-empty string`);let a=K.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=Ia(e))}let a=(e,t)=>K.forEach(e,(e,n)=>i(e,n,t));if(K.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(K.isString(e)&&(e=e.trim())&&!Ra(e))a(Na(e),t);else if(K.isObject(e)&&K.isIterable(e)){let n={},r,i;for(let t of e){if(!K.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?K.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=Fa(e),e){let n=K.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return La(e);if(K.isFunction(t))return t.call(this,e,n);if(K.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=Fa(e),e){let n=K.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||za(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=Fa(e),e){let i=K.findKey(n,e);i&&(!t||za(n,n[i],i,t))&&(delete n[i],r=!0)}}return K.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||za(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return K.forEach(this,(r,i)=>{let a=K.findKey(n,i);if(a){t[a]=Ia(r),delete t[i];return}let o=e?Ba(i):String(i).trim();o!==i&&delete t[i],t[o]=Ia(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return K.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&K.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(` +`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=this[Pa]=this[Pa]={accessors:{}},n=t.accessors,r=this.prototype;function i(e){let t=Fa(e);n[t]||(Va(r,e),n[t]=!0)}return K.isArray(e)?e.forEach(i):i(e),this}};Ha.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),K.reduceDescriptors(Ha.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),K.freezeMethods(Ha);var Y=Ha;function Ua(e,t){let n=this||ja,r=t||n,i=Y.from(r.headers),a=r.data;return K.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Wa(e){return!!(e&&e.__CANCEL__)}function Ga(e,t,n){q.call(this,e??`canceled`,q.ERR_CANCELED,t,n),this.name=`CanceledError`}K.inherits(Ga,q,{__CANCEL__:!0});var Ka=Ga;function qa(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new q(`Request failed with status code `+n.status,[q.ERR_BAD_REQUEST,q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ja(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function Ya(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o{n=r,i=null,a&&(clearTimeout(a),a=null),e.apply(null,t)},s=(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},c=()=>i&&o(i);return[s,c]}var Qa=Za;const $a=(e,t,n=3)=>{let r=0,i=Xa(50,250);return Qa(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,c=i(s),l=a<=o;r=a;let u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0};e(u)},n)},eo=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},to=e=>(...t)=>K.asap(()=>e(...t));var no=J.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,J.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(J.origin),J.navigator&&/(msie|trident)/i.test(J.navigator.userAgent)):()=>!0,ro=J.hasStandardBrowserEnv?{write(e,t,n,r,i,a){let o=[e+`=`+encodeURIComponent(t)];K.isNumber(n)&&o.push(`expires=`+new Date(n).toGMTString()),K.isString(r)&&o.push(`path=`+r),K.isString(i)&&o.push(`domain=`+i),a===!0&&o.push(`secure`),document.cookie=o.join(`; `)},read(e){let t=document.cookie.match(RegExp(`(^|;\\s*)(`+e+`)=([^;]*)`));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,``,Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function io(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ao(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function oo(e,t,n){let r=!io(t);return e&&(r||n==0)?ao(e,t):t}const so=e=>e instanceof Y?{...e}:e;function X(e,t){t||={};let n={};function r(e,t,n,r){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:r},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function i(e,t,n,i){if(K.isUndefined(t)){if(!K.isUndefined(e))return r(void 0,e,n,i)}else return r(e,t,n,i)}function a(e,t){if(!K.isUndefined(t))return r(void 0,t)}function o(e,t){if(K.isUndefined(t)){if(!K.isUndefined(e))return r(void 0,e)}else return r(void 0,t)}function s(n,i,a){if(a in t)return r(n,i);if(a in e)return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(so(e),so(t),n,!0)};return K.forEach(Object.keys(Object.assign({},e,t)),function(r){let a=c[r]||i,o=a(e[r],t[r],r);K.isUndefined(o)&&a!==s||(n[r]=o)}),n}var co=e=>{let t=X({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;t.headers=o=Y.from(o),t.url=ua(oo(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set(`Authorization`,`Basic `+btoa((s.username||``)+`:`+(s.password?unescape(encodeURIComponent(s.password)):``)));let c;if(K.isFormData(n)){if(J.hasStandardBrowserEnv||J.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){let[e,...t]=c?c.split(`;`).map(e=>e.trim()).filter(Boolean):[];o.setContentType([e||`multipart/form-data`,...t].join(`; `))}}if(J.hasStandardBrowserEnv&&(r&&K.isFunction(r)&&(r=r(t)),r||r!==!1&&no(t.url))){let e=i&&a&&ro.read(a);e&&o.set(i,e)}return t};const lo=typeof XMLHttpRequest<`u`;var uo=lo&&function(e){return new Promise(function(t,n){let r=co(e),i=r.data,a=Y.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=Y.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders()),i=!o||o===`text`||o===`json`?h.responseText:h.response,a={data:i,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};qa(function(e){t(e),m()},function(e){n(e),m()},a),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf(`file:`)===0)||setTimeout(g)},h.onabort=function(){h&&(n(new q(`Request aborted`,q.ECONNABORTED,e,h)),h=null)},h.onerror=function(){n(new q(`Network Error`,q.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||pa;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new q(t,i.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&K.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),K.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=$a(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=$a(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&(n(!t||t.type?new Ka(null,e,h):t),h.abort(),h=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Ja(r.url);if(_&&J.protocols.indexOf(_)===-1){n(new q(`Unsupported protocol `+_+`:`,q.ERR_BAD_REQUEST,e));return}h.send(i||null)})};const fo=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof q?t:new Ka(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new q(`timeout ${t} of ms exceeded`,q.ETIMEDOUT))},t),o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),e=null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>K.asap(o),s}};var po=fo;const mo=function*(e,t){let n=e.byteLength;if(!t||n{let i=ho(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;if(n){let e=a+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},vo=typeof fetch==`function`&&typeof Request==`function`&&typeof Response==`function`,yo=vo&&typeof ReadableStream==`function`,bo=vo&&(typeof TextEncoder==`function`?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),xo=(e,...t)=>{try{return!!e(...t)}catch{return!1}},So=yo&&xo(()=>{let e=!1,t=new Request(J.origin,{body:new ReadableStream,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`);return e&&!t}),Co=64*1024,wo=yo&&xo(()=>K.isReadableStream(new Response(``).body)),To={stream:wo&&(e=>e.body)};vo&&(e=>{[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(t=>{!To[t]&&(To[t]=K.isFunction(e[t])?e=>e[t]():(e,n)=>{throw new q(`Response type '${t}' is not supported`,q.ERR_NOT_SUPPORT,n)})})})(new Response);const Eo=async e=>{if(e==null)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e)){let t=new Request(J.origin,{method:`POST`,body:e});return(await t.arrayBuffer()).byteLength}if(K.isArrayBufferView(e)||K.isArrayBuffer(e))return e.byteLength;if(K.isURLSearchParams(e)&&(e+=``),K.isString(e))return(await bo(e)).byteLength},Do=async(e,t)=>{let n=K.toFiniteNumber(e.getContentLength());return n??Eo(t)};var Oo=vo&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:o,onDownloadProgress:s,onUploadProgress:c,responseType:l,headers:u,withCredentials:d=`same-origin`,fetchOptions:f}=co(e);l=l?(l+``).toLowerCase():`text`;let p=po([i,a&&a.toAbortSignal()],o),m,h=p&&p.unsubscribe&&(()=>{p.unsubscribe()}),g;try{if(c&&So&&n!==`get`&&n!==`head`&&(g=await Do(u,r))!==0){let e=new Request(t,{method:`POST`,body:r,duplex:`half`}),n;if(K.isFormData(r)&&(n=e.headers.get(`content-type`))&&u.setContentType(n),e.body){let[t,n]=eo(g,$a(to(c)));r=_o(e.body,Co,t,n)}}K.isString(d)||(d=d?`include`:`omit`);let i=`credentials`in Request.prototype;m=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:`half`,credentials:i?d:void 0});let a=await fetch(m,f),o=wo&&(l===`stream`||l===`response`);if(wo&&(s||o&&h)){let e={};[`status`,`statusText`,`headers`].forEach(t=>{e[t]=a[t]});let t=K.toFiniteNumber(a.headers.get(`content-length`)),[n,r]=s&&eo(t,$a(to(s),!0))||[];a=new Response(_o(a.body,Co,n,()=>{r&&r(),h&&h()}),e)}l||=`text`;let _=await To[K.findKey(To,l)||`text`](a,e);return!o&&h&&h(),await new Promise((t,n)=>{qa(t,n,{data:_,headers:Y.from(a.headers),status:a.status,statusText:a.statusText,config:e,request:m})})}catch(t){throw h&&h(),t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new q(`Network Error`,q.ERR_NETWORK,e,m),{cause:t.cause||t}):q.from(t,t&&t.code,e,m)}});const ko={http:Zi,xhr:uo,fetch:Oo};K.forEach(ko,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});const Ao=e=>`- ${e}`,jo=e=>K.isFunction(e)||e===null||e===!1;var Mo={getAdapter:e=>{e=K.isArray(e)?e:[e];let{length:t}=e,n,r,i={};for(let a=0;a`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`)),n=t?e.length>1?`since : +`+e.map(Ao).join(` +`):` `+Ao(e[0]):`as no adapter specified`;throw new q(`There is no suitable adapter to dispatch the request `+n,`ERR_NOT_SUPPORT`)}return r},adapters:ko};function No(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ka(null,e)}function Po(e){No(e),e.headers=Y.from(e.headers),e.data=Ua.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1);let t=Mo.getAdapter(e.adapter||ja.adapter);return t(e).then(function(t){return No(e),t.data=Ua.call(e,e.transformResponse,t),t.headers=Y.from(t.headers),t},function(t){return Wa(t)||(No(e),t&&t.response&&(t.response.data=Ua.call(e,e.transformResponse,t.response),t.response.headers=Y.from(t.response.headers))),Promise.reject(t)})}const Fo=`1.10.0`,Io={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Io[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});const Lo={};Io.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Fo+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new q(r(i,` has been removed`+(t?` in `+t:``)),q.ERR_DEPRECATED);return t&&!Lo[i]&&(Lo[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},Io.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Ro(e,t,n){if(typeof e!=`object`)throw new q(`options must be an object`,q.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=t[a];if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new q(`option `+a+` must be `+n,q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new q(`Unknown option `+a,q.ERR_BAD_OPTION)}}var zo={assertOptions:Ro,validators:Io};const Z=zo.validators;var Bo=class{constructor(e){this.defaults=e||{},this.interceptors={request:new fa,response:new fa}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack?t.stack.replace(/^.+\n/,``):``;try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,``))&&(e.stack+=` +`+n):e.stack=n}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=X(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&zo.assertOptions(n,{silentJSONParsing:Z.transitional(Z.boolean),forcedJSONParsing:Z.transitional(Z.boolean),clarifyTimeoutError:Z.transitional(Z.boolean)},!1),r!=null&&(K.isFunction(r)?t.paramsSerializer={serialize:r}:zo.assertOptions(r,{encode:Z.function,serialize:Z.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),zo.assertOptions(t,{baseUrl:Z.spelling(`baseURL`),withXsrfToken:Z.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&K.merge(i.common,i[t.method]);i&&K.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=Y.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){typeof e.runWhen==`function`&&e.runWhen(t)===!1||(s&&=e.synchronous,o.unshift(e.fulfilled,e.rejected))});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Po.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),d=e.length,l=Promise.resolve(t);u{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Ka(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t,n=new e(function(e){t=e});return{token:n,cancel:t}}},Uo=Ho;function Wo(e){return function(t){return e.apply(null,t)}}function Go(e){return K.isObject(e)&&e.isAxiosError===!0}const Ko={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ko).forEach(([e,t])=>{Ko[t]=e});var qo=Ko;function Jo(e){let t=new Vo(e),n=Gr(Vo.prototype.request,t);return K.extend(n,Vo.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Jo(X(e,t))},n}const Q=Jo(ja);Q.Axios=Vo,Q.CanceledError=Ka,Q.CancelToken=Uo,Q.isCancel=Wa,Q.VERSION=Fo,Q.toFormData=ia,Q.AxiosError=q,Q.Cancel=Q.CanceledError,Q.all=function(e){return Promise.all(e)},Q.spread=Wo,Q.isAxiosError=Go,Q.mergeConfig=X,Q.AxiosHeaders=Y,Q.formToJSON=e=>Oa(K.isHTMLForm(e)?new FormData(e):e),Q.getAdapter=Mo.getAdapter,Q.HttpStatusCode=qo,Q.default=Q;var Yo=Q;const Xo=ne(),Zo=Yo.create({baseURL:void 0,timeout:1e3*30,headers:{"Content-Type":`application/json`}}),Qo=e=>{let t={...e};return Object.entries(e||{}).map(([e,n])=>{n instanceof Date&&(t[e]=getTimestamp(n))}),t};Zo.interceptors.request.use(e=>{let t=localStorage.getItem(`customeraccessToken`);return e.method?.toLowerCase()===`get`&&(e.params&&=Qo(e.params)),t&&(e.headers.Authorization=`Bearer ${t}`),console.log(`config`,e),e},e=>(console.log(e),Promise.reject(e))),Zo.interceptors.response.use(e=>{let t=e.data;return t.code===200?t.data:(Br(t.msg),Promise.reject(t.msg))},e=>(console.log(`errror---------->`,e),e.status==401&&(Br(`登录已过期,请重新登录`),localStorage.removeItem(`customeraccessToken`),window.location.href=`/h5/login`,console.log(`router`)),Promise.reject(e)));var $=Zo;const $o=e=>$({url:`/api/tasks/list`,method:`get`,params:e}),es=e=>$({url:`/api/tasks/add`,method:`post`,data:e}),ts=e=>$({url:`/api/tasks/changeStatus`,method:`post`,data:e}),ns=e=>$({url:`/api/tasks/edit`,method:`post`,data:e}),rs=e=>$({url:`/api/tasks/delete`,method:`post`,data:e}),os=e=>$({url:`/api/groups/list`,method:`get`,params:e}),ss=e=>$({url:`/api/templates/list`,method:`get`,params:e}),cs=e=>$({url:`/api/robot/get-login-token`,method:`get`,params:e}),ls=e=>$({url:`/api/robot/check-login-token`,method:`post`,data:e}),us=e=>$({url:`/api/login`,method:`post`,data:e}),ds=e=>{let t=new FormData;return t.append(`file`,e),$({url:`/api/uploadImg`,method:`post`,data:t,headers:{"Content-Type":`multipart/form-data`}})},fs=e=>$({url:`/api/tasks/get-usd-info`,method:`get`,params:e}),ps=e=>$({url:`/api/tasks/updatePayHash`,method:`post`,data:e}),ms=e=>$({url:`/api/order/list`,method:`get`,params:e}),hs=e=>$({url:`/api/order/get-status-list`,method:`get`,params:e}),gs=e=>$({url:`/api/order/ConfirmConversionRefundRequest`,method:`post`,data:e}),_s=e=>$({url:`/api/getUserinfo`,method:`post`,data:e}),vs=e=>$({url:`/api/dashboard/index`,method:`get`,params:e}),ys=e=>$({url:`/api/updateinfo`,method:`post`,data:e}),bs=e=>$({url:`/api/send_log/list`,method:`get`,params:e}),xs=e=>$({url:`/api/message_log/list`,method:`get`,params:e}),Ss=e=>$({url:`/api/sensitiveWords/detect`,method:`post`,data:e});var Cs=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};export{Vt as BORDER_LEFT,Wt as BORDER_SURROUND,Bt as BORDER_TOP,Gt as BORDER_TOP_BOTTOM,Kt as BORDER_UNSET_TOP_BOTTOM,un as Badge,Jt as FORM_KEY,br as Field,qt as HAPTICS_FEEDBACK,I as Icon,Nn as Loading,Wr as NavBar,Qn as Popup,ys as UpdateInfo,de as __commonJSMin,Cs as __plugin_vue_export_helper_default,me as __toESM,es as addTask,M as addUnit,Xt as callInterceptor,Ae as cancelRaf,ts as changeStatus,ls as checkLoginToken,Ss as checkWord,Et as clamp,gs as confirmConversionRefundRequest,N as createNamespace,rs as delTask,je as doubleRaf,ns as editTask,C as extend,_r as fieldSharedProps,we as flat,vs as getDashboard,st as getElementTop,os as getGroupsList,cs as getLoginToken,bs as getMassSend,xs as getMessageLog,ms as getOrderList,hs as getOrderStatusList,rt as getScrollTop,$o as getTaskList,ss as getTemplatesList,fs as getUsdtInfo,_s as getUserinfo,gt as getZIndexStyle,w as inBrowser,E as isDef,ge as isFunction,ft as isHidden,Se as isSameValue,Ee as makeArrayProp,Oe as makeNumericProp,Te as makeRequiredProp,A as makeStringProp,Or as mountComponent,he as noop,O as numericProp,We as onMountedOrActivated,Qt as onPopupReopen,xe as pick,Fn as popupSharedPropKeys,Pn as popupSharedProps,dt as preventDefault,ke as raf,rn as route,nn as routeProps,ot as setRootScrollTop,it as setScrollTop,Br as showFailToast,zr as showSuccessToast,k as truthProp,St as unitToPx,D as unknownProp,ps as updatePayHash,ds as uploadFileApi,ze as useChildren,Ge as useEventListener,tn as useExpose,er as useId,tt as usePageVisibility,Fe as useParent,en as usePlaceholder,Dr as usePopupState,Pe as useRect,an as useRoute,Hn as useScopeId,$e as useScrollParent,Ln as useTouch,us as userLogin,mt as windowHeight,pt as windowWidth,F as withInstall}; \ No newline at end of file diff --git a/assets/add-Bi-FN_D_.css b/assets/add-Bi-FN_D_.css new file mode 100644 index 0000000..b270b9c --- /dev/null +++ b/assets/add-Bi-FN_D_.css @@ -0,0 +1 @@ +:root,:host{--van-picker-group-background:var(--van-background-2)}.van-picker-group{background:var(--van-picker-group-background)}.van-picker-group__tabs{margin-top:var(--van-padding-base)}.van-picker-group__tab-title{margin-right:16px}:root,:host{--van-picker-background:var(--van-background-2);--van-picker-toolbar-height:44px;--van-picker-title-font-size:var(--van-font-size-lg);--van-picker-title-line-height:var(--van-line-height-md);--van-picker-action-padding:0 var(--van-padding-md);--van-picker-action-font-size:var(--van-font-size-md);--van-picker-confirm-action-color:var(--van-primary-color);--van-picker-cancel-action-color:var(--van-text-color-2);--van-picker-option-font-size:var(--van-font-size-lg);--van-picker-option-padding:0 var(--van-padding-base);--van-picker-option-text-color:var(--van-text-color);--van-picker-option-disabled-opacity:.3;--van-picker-loading-icon-color:var(--van-primary-color);--van-picker-loading-mask-color:#ffffffe6;--van-picker-mask-color:linear-gradient(180deg,#ffffffe6,#fff6),linear-gradient(0deg,#ffffffe6,#fff6)}.van-theme-dark{--van-picker-loading-mask-color:#0009;--van-picker-mask-color:linear-gradient(180deg,#0009,#0000001a),linear-gradient(0deg,#0009,#0000001a)}.van-picker{background:var(--van-picker-background);-webkit-user-select:none;user-select:none;position:relative}.van-picker__toolbar{height:var(--van-picker-toolbar-height);justify-content:space-between;align-items:center;display:flex;position:relative}.van-picker__cancel,.van-picker__confirm{height:100%;padding:var(--van-picker-action-padding);font-size:var(--van-picker-action-font-size);background-color:#0000;border:none}.van-picker__confirm{color:var(--van-picker-confirm-action-color)}.van-picker__cancel{color:var(--van-picker-cancel-action-color)}.van-picker__title{color:var(--van-text-color);max-width:50%;font-weight:var(--van-font-bold);font-size:var(--van-picker-title-font-size);line-height:var(--van-picker-title-line-height);text-align:center;position:absolute;left:50%;transform:translate(-50%)}.van-picker__columns{cursor:-webkit-grab;cursor:grab;display:flex;position:relative}.van-picker__loading{z-index:3;color:var(--van-picker-loading-icon-color);background:var(--van-picker-loading-mask-color);justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.van-picker__frame{top:50%;right:var(--van-padding-md);left:var(--van-padding-md);z-index:2;pointer-events:none;position:absolute;transform:translateY(-50%)}.van-picker__mask{z-index:1;background-image:var(--van-picker-mask-color);pointer-events:none;background-position:top,bottom;background-repeat:no-repeat;width:100%;height:100%;position:absolute;top:0;left:0;transform:translateZ(0)}.van-picker-column{font-size:var(--van-picker-option-font-size);flex:1;overflow:hidden}.van-picker-column__wrapper{transition-timing-function:cubic-bezier(.23,1,.68,1)}.van-picker-column__item{padding:var(--van-picker-option-padding);color:var(--van-picker-option-text-color);justify-content:center;align-items:center;display:flex}.van-picker-column__item--disabled{cursor:not-allowed;opacity:var(--van-picker-option-disabled-opacity)}:root,:host{--w-e-textarea-bg-color:#fff;--w-e-textarea-color:#333;--w-e-textarea-border-color:#ccc;--w-e-textarea-slight-border-color:#e8e8e8;--w-e-textarea-slight-color:#d4d4d4;--w-e-textarea-slight-bg-color:#f5f2f0;--w-e-textarea-selected-border-color:#b4d5ff;--w-e-textarea-handler-bg-color:#4290f7;--w-e-toolbar-color:#595959;--w-e-toolbar-bg-color:#fff;--w-e-toolbar-active-color:#333;--w-e-toolbar-active-bg-color:#f1f1f1;--w-e-toolbar-disabled-color:#999;--w-e-toolbar-border-color:#e8e8e8;--w-e-modal-button-bg-color:#fafafa;--w-e-modal-button-border-color:#d9d9d9}.w-e-text-container *,.w-e-toolbar *{box-sizing:border-box;outline:none;margin:0;padding:0}.w-e-text-container blockquote,.w-e-text-container li,.w-e-text-container p,.w-e-text-container td,.w-e-text-container th,.w-e-toolbar *{line-height:1.5}.w-e-text-container{background-color:var(--w-e-textarea-bg-color);color:var(--w-e-textarea-color);height:100%;position:relative}.w-e-text-container .w-e-scroll{-webkit-overflow-scrolling:touch;height:100%}.w-e-text-container [data-slate-editor]{word-wrap:break-word;white-space:pre-wrap;border-top:1px solid #0000;outline:0;min-height:100%;padding:0 10px}.w-e-text-container [data-slate-editor] p{margin:15px 0}.w-e-text-container [data-slate-editor] h1,.w-e-text-container [data-slate-editor] h2,.w-e-text-container [data-slate-editor] h3,.w-e-text-container [data-slate-editor] h4,.w-e-text-container [data-slate-editor] h5{margin:20px 0}.w-e-text-container [data-slate-editor] img{cursor:default;min-width:20px;max-width:100%;min-height:20px;display:inline!important}.w-e-text-container [data-slate-editor] span{text-indent:0}.w-e-text-container [data-slate-editor] [data-selected=true]{box-shadow:0 0 0 2px var(--w-e-textarea-selected-border-color)}.w-e-text-placeholder{width:90%;font-style:italic;top:17px;left:10px}.w-e-max-length-info,.w-e-text-placeholder{color:var(--w-e-textarea-slight-color);pointer-events:none;-webkit-user-select:none;user-select:none;position:absolute}.w-e-max-length-info{bottom:.5em;right:1em}.w-e-bar{background-color:var(--w-e-toolbar-bg-color);color:var(--w-e-toolbar-color);padding:0 5px;font-size:14px}.w-e-bar svg{fill:var(--w-e-toolbar-color);width:14px;height:14px}.w-e-bar-show{display:flex}.w-e-bar-hidden{display:none}.w-e-hover-bar{border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;position:absolute;box-shadow:0 2px 5px #0000001f}.w-e-toolbar{flex-wrap:wrap;position:relative}.w-e-bar-divider{background-color:var(--w-e-toolbar-border-color);width:1px;height:40px;margin:0 5px;display:inline-flex}.w-e-bar-item{text-align:center;height:40px;padding:4px;display:flex;position:relative}.w-e-bar-item,.w-e-bar-item button{justify-content:center;align-items:center}.w-e-bar-item button{color:var(--w-e-toolbar-color);cursor:pointer;white-space:nowrap;background:0 0;border:none;height:32px;padding:0 8px;display:inline-flex;overflow:hidden}.w-e-bar-item button:hover{background-color:var(--w-e-toolbar-active-bg-color);color:var(--w-e-toolbar-active-color)}.w-e-bar-item button .title{margin-left:5px}.w-e-bar-item .active{background-color:var(--w-e-toolbar-active-bg-color);color:var(--w-e-toolbar-active-color)}.w-e-bar-item .disabled{color:var(--w-e-toolbar-disabled-color);cursor:not-allowed}.w-e-bar-item .disabled svg{fill:var(--w-e-toolbar-disabled-color)}.w-e-bar-item .disabled:hover{background-color:var(--w-e-toolbar-bg-color);color:var(--w-e-toolbar-disabled-color)}.w-e-bar-item .disabled:hover svg{fill:var(--w-e-toolbar-disabled-color)}.w-e-menu-tooltip-v5:before{background-color:var(--w-e-toolbar-active-color);color:var(--w-e-toolbar-bg-color);content:attr(data-tooltip);opacity:0;text-align:center;visibility:hidden;white-space:pre;z-index:1;border-radius:5px;padding:5px 10px;font-size:.75em;transition:opacity .6s;position:absolute;top:40px}.w-e-menu-tooltip-v5:after{border:5px solid #0000;border-bottom:5px solid var(--w-e-toolbar-active-color);content:"";opacity:0;visibility:hidden;transition:opacity .6s;position:absolute;top:30px}.w-e-menu-tooltip-v5:hover:after,.w-e-menu-tooltip-v5:hover:before{opacity:1;visibility:visible}.w-e-menu-tooltip-v5.tooltip-right:before{top:10px;left:100%}.w-e-menu-tooltip-v5.tooltip-right:after{border-bottom-color:#0000;border-left-color:#0000;border-right-color:var(--w-e-toolbar-active-color);border-top-color:#0000;margin-left:-10px;top:16px;left:100%}.w-e-bar-item-group .w-e-bar-item-menus-container{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);z-index:1;border-radius:3px;margin-top:40px;display:none;position:absolute;top:0;left:0;box-shadow:0 2px 10px #0000001f}.w-e-bar-item-group:hover .w-e-bar-item-menus-container{display:block}.w-e-select-list{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);z-index:1;border-radius:3px;min-width:100px;max-height:350px;margin-top:40px;position:absolute;top:0;left:0;overflow-y:auto;box-shadow:0 2px 10px #0000001f}.w-e-select-list ul{line-height:1;list-style:none}.w-e-select-list ul .selected{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-select-list ul li{cursor:pointer;text-align:left;white-space:nowrap;padding:7px 0 7px 25px;position:relative}.w-e-select-list ul li:hover{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-select-list ul li svg{margin-top:-7px;margin-left:5px;position:absolute;top:50%;left:0}.w-e-bar-bottom .w-e-select-list{bottom:0;top:inherit;margin-top:0;margin-bottom:40px}.w-e-drop-panel{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);z-index:1;border-radius:3px;min-width:200px;margin-top:40px;padding:10px;position:absolute;top:0;box-shadow:0 2px 10px #0000001f}.w-e-bar-bottom .w-e-drop-panel{bottom:0;top:inherit;margin-top:0;margin-bottom:40px}.w-e-modal{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);color:var(--w-e-toolbar-color);text-align:left;z-index:1;border-radius:3px;min-width:100px;min-height:40px;padding:20px 15px 0;font-size:14px;position:absolute;box-shadow:0 2px 10px #0000001f}.w-e-modal .btn-close{cursor:pointer;padding:5px;line-height:1;position:absolute;top:7px;right:8px}.w-e-modal .btn-close svg{fill:var(--w-e-toolbar-color);width:10px;height:10px}.w-e-modal .babel-container{margin-bottom:15px;display:block}.w-e-modal .babel-container span{margin-bottom:10px;display:block}.w-e-modal .button-container{margin-bottom:15px}.w-e-modal button{background-color:var(--w-e-modal-button-bg-color);border:1px solid var(--w-e-modal-button-border-color);color:var(--w-e-toolbar-color);cursor:pointer;text-align:center;touch-action:manipulation;-webkit-user-select:none;user-select:none;white-space:nowrap;border-radius:4px;height:32px;padding:4.5px 15px;font-weight:400;transition:all .3s cubic-bezier(.645,.045,.355,1)}.w-e-modal input[type=number],.w-e-modal input[type=text],.w-e-modal textarea{font-feature-settings:"tnum";background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-modal-button-border-color);color:var(--w-e-toolbar-color);font-variant:tabular-nums;border-radius:4px;width:100%;padding:4.5px 11px;transition:all .3s}.w-e-modal textarea{min-height:60px}body .w-e-modal,body .w-e-modal *{box-sizing:border-box}.w-e-progress-bar{background-color:var(--w-e-textarea-handler-bg-color);width:0;height:1px;transition:width .3s;position:absolute}.w-e-full-screen-container{position:fixed;flex-direction:column!important;width:100%!important;height:100%!important;margin:0!important;padding:0!important;display:flex!important;inset:0!important}.w-e-full-screen-container [data-w-e-textarea=true]{flex:1!important}.w-e-text-container [data-slate-editor] code{background-color:var(--w-e-textarea-slight-bg-color);border-radius:3px;padding:3px;font-family:monospace}.w-e-panel-content-color{text-align:left;width:230px;list-style:none}.w-e-panel-content-color li{border:1px solid var(--w-e-toolbar-bg-color);cursor:pointer;border-radius:3px;padding:2px;display:inline-block}.w-e-panel-content-color li:hover{border-color:var(--w-e-toolbar-color)}.w-e-panel-content-color li .color-block{border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;width:17px;height:17px}.w-e-panel-content-color .active{border-color:var(--w-e-toolbar-color)}.w-e-panel-content-color .clear{width:100%;margin-bottom:5px;line-height:1.5}.w-e-panel-content-color .clear svg{width:16px;height:16px;margin-bottom:-4px}.w-e-text-container [data-slate-editor] blockquote{background-color:var(--w-e-textarea-slight-bg-color);border-left:8px solid var(--w-e-textarea-selected-border-color);margin:10px 0;padding:10px;font-size:100%;line-height:1.5;display:block}.w-e-panel-content-emotion{text-align:left;width:300px;font-size:20px;list-style:none}.w-e-panel-content-emotion li{cursor:pointer;border-radius:3px;padding:0 5px;display:inline-block}.w-e-panel-content-emotion li:hover{background-color:var(--w-e-textarea-slight-bg-color)}.w-e-textarea-divider{border-radius:3px;margin:20px auto;padding:20px}.w-e-textarea-divider hr{background-color:var(--w-e-textarea-border-color);border:0;height:1px;display:block}.w-e-text-container [data-slate-editor] pre>code{background-color:var(--w-e-textarea-slight-bg-color);border:1px solid var(--w-e-textarea-slight-border-color);text-indent:0;border-radius:4px;padding:10px;font-size:14px;display:block}.w-e-text-container [data-slate-editor] .w-e-image-container{margin:0 3px;display:inline-block}.w-e-text-container [data-slate-editor] .w-e-image-container:hover{box-shadow:0 0 0 2px var(--w-e-textarea-selected-border-color)}.w-e-text-container [data-slate-editor] .w-e-selected-image-container{position:relative;overflow:hidden}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .w-e-image-dragger{background-color:var(--w-e-textarea-handler-bg-color);width:7px;height:7px;position:absolute}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .left-top{cursor:nwse-resize;top:0;left:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .right-top{cursor:nesw-resize;top:0;right:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .left-bottom{cursor:nesw-resize;bottom:0;left:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .right-bottom{cursor:nwse-resize;bottom:0;right:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container:hover,.w-e-text-container [contenteditable=false] .w-e-image-container:hover{box-shadow:none}.w-e-text-container [data-slate-editor] .table-container{border:1px dashed var(--w-e-textarea-border-color);border-radius:5px;width:100%;margin-top:10px;padding:10px;overflow-x:auto}.w-e-text-container [data-slate-editor] table{border-collapse:collapse}.w-e-text-container [data-slate-editor] table td,.w-e-text-container [data-slate-editor] table th{border:1px solid var(--w-e-textarea-border-color);text-align:left;min-width:30px;padding:3px 5px;line-height:1.5}.w-e-text-container [data-slate-editor] table th{background-color:var(--w-e-textarea-slight-bg-color);text-align:center;font-weight:700}.w-e-panel-content-table{background-color:var(--w-e-toolbar-bg-color)}.w-e-panel-content-table table{border-collapse:collapse}.w-e-panel-content-table td{border:1px solid var(--w-e-toolbar-border-color);cursor:pointer;width:20px;height:15px;padding:3px 5px}.w-e-panel-content-table td.active{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-textarea-video-container{border:1px dashed var(--w-e-textarea-border-color);text-align:center;background-image:linear-gradient(45deg,#eee 25%,#0000 0 75%,#eee 0,#eee),linear-gradient(45deg,#eee 25%,#fff 0 75%,#eee 0,#eee);background-position:0 0,10px 10px;background-size:20px 20px;border-radius:5px;margin:10px auto 0;padding:10px 0}.w-e-text-container [data-slate-editor] pre>code{word-wrap:normal;-webkit-hyphens:none;hyphens:none;tab-size:4;text-align:left;text-shadow:0 1px #fff;white-space:pre;word-break:normal;word-spacing:normal;margin:.5em 0;padding:1em;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;line-height:1.5;overflow:auto}.w-e-text-container [data-slate-editor] pre>code .token.cdata,.w-e-text-container [data-slate-editor] pre>code .token.comment,.w-e-text-container [data-slate-editor] pre>code .token.doctype,.w-e-text-container [data-slate-editor] pre>code .token.prolog{color:#708090}.w-e-text-container [data-slate-editor] pre>code .token.punctuation{color:#999}.w-e-text-container [data-slate-editor] pre>code .token.namespace{opacity:.7}.w-e-text-container [data-slate-editor] pre>code .token.boolean,.w-e-text-container [data-slate-editor] pre>code .token.constant,.w-e-text-container [data-slate-editor] pre>code .token.deleted,.w-e-text-container [data-slate-editor] pre>code .token.number,.w-e-text-container [data-slate-editor] pre>code .token.property,.w-e-text-container [data-slate-editor] pre>code .token.symbol,.w-e-text-container [data-slate-editor] pre>code .token.tag{color:#905}.w-e-text-container [data-slate-editor] pre>code .token.attr-name,.w-e-text-container [data-slate-editor] pre>code .token.builtin,.w-e-text-container [data-slate-editor] pre>code .token.char,.w-e-text-container [data-slate-editor] pre>code .token.inserted,.w-e-text-container [data-slate-editor] pre>code .token.selector,.w-e-text-container [data-slate-editor] pre>code .token.string{color:#690}.w-e-text-container [data-slate-editor] pre>code .language-css .token.string,.w-e-text-container [data-slate-editor] pre>code .style .token.string,.w-e-text-container [data-slate-editor] pre>code .token.entity,.w-e-text-container [data-slate-editor] pre>code .token.operator,.w-e-text-container [data-slate-editor] pre>code .token.url{color:#9a6e3a}.w-e-text-container [data-slate-editor] pre>code .token.atrule,.w-e-text-container [data-slate-editor] pre>code .token.attr-value,.w-e-text-container [data-slate-editor] pre>code .token.keyword{color:#07a}.w-e-text-container [data-slate-editor] pre>code .token.class-name,.w-e-text-container [data-slate-editor] pre>code .token.function{color:#dd4a68}.w-e-text-container [data-slate-editor] pre>code .token.important,.w-e-text-container [data-slate-editor] pre>code .token.regex,.w-e-text-container [data-slate-editor] pre>code .token.variable{color:#e90}.w-e-text-container [data-slate-editor] pre>code .token.bold,.w-e-text-container [data-slate-editor] pre>code .token.important{font-weight:700}.w-e-text-container [data-slate-editor] pre>code .token.italic{font-style:italic}.w-e-text-container [data-slate-editor] pre>code .token.entity{cursor:help}.footer[data-v-83b59f17]{width:calc(100vw - 24px);position:fixed;bottom:10px;left:12px}.footer .footer-button[data-v-83b59f17]{width:100%} diff --git a/assets/add-DBRjL4GS.js b/assets/add-DBRjL4GS.js new file mode 100644 index 0000000..ffb7aaa --- /dev/null +++ b/assets/add-DBRjL4GS.js @@ -0,0 +1,195 @@ +import{BORDER_UNSET_TOP_BOTTOM as e,Field as t,HAPTICS_FEEDBACK as n,Loading as r,NavBar as i,Popup as a,__plugin_vue_export_helper_default as o,addTask as s,checkWord as c,clamp as l,createNamespace as u,editTask as d,extend as f,flat as p,getGroupsList as m,getTemplatesList as h,isDef as g,isSameValue as _,makeArrayProp as v,makeNumericProp as y,makeRequiredProp as b,makeStringProp as x,numericProp as S,pick as C,preventDefault as w,showFailToast as T,showSuccessToast as ee,truthProp as E,unitToPx as te,updatePayHash as ne,uploadFileApi as re,useChildren as ie,useEventListener as D,useExpose as ae,useParent as oe,useTouch as O,withInstall as se}from"./_plugin-vue_export-helper-X_5jfaNy.js";import{Comment as ce,Fragment as le,computed as ue,createBaseVNode as de,createBlock as fe,createCommentVNode as pe,createElementBlock as me,createTextVNode as he,createVNode as k,defineComponent as ge,getCurrentInstance as _e,isRef as ve,mergeProps as ye,nextTick as be,onBeforeMount as xe,onBeforeUnmount as Se,onMounted as Ce,openBlock as we,reactive as Te,ref as Ee,shallowRef as De,toRaw as Oe,unref as ke,useRouter as Ae,watch as je,watchEffect as Me,withCtx as Ne}from"./index-DT5X53L9.js";import"./style-DDb4fOVF.js";import{Button as Pe}from"./style-DP216q4j.js";import{Form as Fe,Tab as Ie,Tabs as Le}from"./style-BajQcpZj.js";import"./use-tab-status-Cli6d94t.js";import{CellGroup as Re}from"./style-Dy1Y0HPX.js";import{Pay_default as ze}from"./Pay-DZHyDTrf.js";import"./esm-KccT1lBb.js";const[Be,Ve,He]=u(`picker`),Ue=e=>e.find(e=>!e.disabled)||e[0];function We(e,t){let n=e[0];if(n){if(Array.isArray(n))return`multiple`;if(t.children in n)return`cascade`}return`default`}function Ge(e,t){t=l(t,0,e.length);for(let n=t;n=0;n--)if(!e[n].disabled)return n;return 0}const Ke=(e,t,n)=>t!==void 0&&e.some(e=>e[n.value]===t);function qe(e,t,n){let r=e.findIndex(e=>e[n.value]===t),i=Ge(e,r);return e[i]}function Je(e,t,n){let r=[],i={[t.children]:e},a=0;for(;i&&i[t.children];){let e=i[t.children],o=n.value[a];if(i=g(o)?qe(e,o,t):void 0,!i&&e.length){let n=Ue(e)[t.value];i=qe(e,n,t)}a++,r.push(e)}return r}function Ye(e){let{transform:t}=window.getComputedStyle(e),n=t.slice(7,t.length-1).split(`, `)[5];return Number(n)}function Xe(e){return f({text:`text`,value:`value`,children:`children`},e)}const Ze=200,Qe=300,$e=15,[et,tt]=u(`picker-column`),nt=Symbol(et);var rt=ge({name:et,props:{value:S,fields:b(Object),options:v(),readonly:Boolean,allowHtml:Boolean,optionHeight:b(Number),swipeDuration:b(S),visibleOptionNum:b(S)},emits:[`change`,`clickOption`,`scrollInto`],setup(e,{emit:t,slots:n}){let r,i,a,o,s,c=Ee(),u=Ee(),d=Ee(0),f=Ee(0),p=O(),m=()=>e.options.length,h=()=>e.optionHeight*(e.visibleOptionNum-1)/2,g=n=>{let i=Ge(e.options,n),a=-i*e.optionHeight,o=()=>{i>m()-1&&(i=Ge(e.options,n));let r=e.options[i][e.fields.value];r!==e.value&&t(`change`,r)};r&&a!==d.value?s=o:o(),d.value=a},_=()=>e.readonly||!e.options.length,v=n=>{r||_()||(s=null,f.value=Ze,g(n),t(`clickOption`,e.options[n]))},y=t=>l(Math.round(-t/e.optionHeight),0,m()-1),b=ue(()=>y(d.value)),x=(t,n)=>{let r=Math.abs(t/n);t=d.value+r/.003*(t<0?-1:1);let i=y(t);f.value=+e.swipeDuration,g(i)},S=()=>{r=!1,f.value=0,s&&(s(),s=null)},C=e=>{if(!_()){if(p.start(e),r){let e=Ye(u.value);d.value=Math.min(0,e-h())}f.value=0,i=d.value,a=Date.now(),o=i,s=null}},T=n=>{if(_())return;p.move(n),p.isVertical()&&(r=!0,w(n,!0));let s=l(i+p.deltaY.value,-(m()*e.optionHeight),e.optionHeight),c=y(s);c!==b.value&&t(`scrollInto`,e.options[c]),d.value=s;let u=Date.now();u-a>Qe&&(a=u,o=s)},ee=()=>{if(_())return;let e=d.value-o,t=Date.now()-a,n=t$e;if(n){x(e,t);return}let i=y(d.value);f.value=Ze,g(i),setTimeout(()=>{r=!1},0)},E=()=>{let t={height:`${e.optionHeight}px`};return e.options.map((r,i)=>{let a=r[e.fields.text],{disabled:o}=r,s=r[e.fields.value],c={role:`button`,style:t,tabindex:o?-1:0,class:[tt(`item`,{disabled:o,selected:s===e.value}),r.className],onClick:()=>v(i)},l={class:`van-ellipsis`,[e.allowHtml?`innerHTML`:`textContent`]:a};return k(`li`,c,[n.option?n.option(r,i):k(`div`,l,null)])})};return oe(nt),ae({stopMomentum:S}),Me(()=>{let t=r?Math.floor(-d.value/e.optionHeight):e.options.findIndex(t=>t[e.fields.value]===e.value),n=Ge(e.options,t),i=-n*e.optionHeight;r&&nk(`div`,{ref:c,class:tt(),onTouchstartPassive:C,onTouchend:ee,onTouchcancel:ee},[k(`ul`,{ref:u,style:{transform:`translate3d(0, ${d.value+h()}px, 0)`,transitionDuration:`${f.value}ms`,transitionProperty:f.value?`all`:`none`},class:tt(`wrapper`),onTransitionend:S},[E()])])}});const[it]=u(`picker-toolbar`),at={title:String,cancelButtonText:String,confirmButtonText:String},ot=[`cancel`,`confirm`,`title`,`toolbar`],st=Object.keys(at);var ct=ge({name:it,props:at,emits:[`confirm`,`cancel`],setup(e,{emit:t,slots:r}){let i=()=>{if(r.title)return r.title();if(e.title)return k(`div`,{class:[Ve(`title`),`van-ellipsis`]},[e.title])},a=()=>t(`cancel`),o=()=>t(`confirm`),s=()=>{var t;let i=(t=e.cancelButtonText)??He(`cancel`);if(!(!r.cancel&&!i))return k(`button`,{type:`button`,class:[Ve(`cancel`),n],onClick:a},[r.cancel?r.cancel():i])},c=()=>{var t;let i=(t=e.confirmButtonText)??He(`confirm`);if(!(!r.confirm&&!i))return k(`button`,{type:`button`,class:[Ve(`confirm`),n],onClick:o},[r.confirm?r.confirm():i])};return()=>k(`div`,{class:Ve(`toolbar`)},[r.toolbar?r.toolbar():[s(),i(),c()]])}});const lt=(e,t)=>{let n=Ee(e());return je(e,e=>{e!==n.value&&(n.value=e)}),je(n,n=>{n!==e()&&t(n)}),n},[ut,dt]=u(`picker-group`),ft=Symbol(ut),pt=f({tabs:v(),activeTab:y(0),nextStepText:String,showToolbar:E},at);var mt=ge({name:ut,props:pt,emits:[`confirm`,`cancel`,`update:activeTab`],setup(e,{emit:t,slots:n}){let r=lt(()=>e.activeTab,e=>t(`update:activeTab`,e)),{children:i,linkChildren:a}=ie(ft);a();let o=()=>+r.value{o()?r.value=+r.value+1:t(`confirm`,i.map(e=>e.confirm()))},c=()=>t(`cancel`);return()=>{var t,i;let a=(i=(t=n.default)?.call(n))?.filter(e=>e.type!==ce).map(e=>e.type===le?e.children:e);a&&=p(a);let l=o()?e.nextStepText:e.confirmButtonText;return k(`div`,{class:dt()},[e.showToolbar?k(ct,{title:e.title,cancelButtonText:e.cancelButtonText,confirmButtonText:l,onConfirm:s,onCancel:c},C(n,ot)):null,k(Le,{active:r.value,"onUpdate:active":e=>r.value=e,class:dt(`tabs`),shrink:!0,animated:!0,lazyRender:!1},{default:()=>[e.tabs.map((e,t)=>k(Ie,{title:e,titleClass:dt(`tab-title`)},{default:()=>[a?.[t]]}))]})])}}});const ht=f({loading:Boolean,readonly:Boolean,allowHtml:Boolean,optionHeight:y(44),showToolbar:E,swipeDuration:y(1e3),visibleOptionNum:y(6)},at),gt=f({},ht,{columns:v(),modelValue:v(),toolbarPosition:x(`top`),columnsFieldNames:Object});var _t=ge({name:Be,props:gt,emits:[`confirm`,`cancel`,`change`,`scrollInto`,`clickOption`,`update:modelValue`],setup(t,{emit:n,slots:i}){let a=Ee(),o=Ee(t.modelValue.slice(0)),{parent:s}=oe(ft),{children:c,linkChildren:l}=ie(nt);l();let u=ue(()=>Xe(t.columnsFieldNames)),d=ue(()=>te(t.optionHeight)),p=ue(()=>We(t.columns,u.value)),m=ue(()=>{let{columns:e}=t;switch(p.value){case`multiple`:return e;case`cascade`:return Je(e,u.value,o);default:return[e]}}),h=ue(()=>m.value.some(e=>e.length)),g=ue(()=>m.value.map((e,t)=>qe(e,o.value[t],u.value))),v=ue(()=>m.value.map((e,t)=>e.findIndex(e=>e[u.value.value]===o.value[t]))),y=(e,t)=>{if(o.value[e]!==t){let n=o.value.slice(0);n[e]=t,o.value=n}},b=()=>({selectedValues:o.value.slice(0),selectedOptions:g.value,selectedIndexes:v.value}),x=(e,t)=>{y(t,e),p.value===`cascade`&&o.value.forEach((e,t)=>{let n=m.value[t];Ke(n,e,u.value)||y(t,n.length?n[0][u.value.value]:void 0)}),be(()=>{n(`change`,f({columnIndex:t},b()))})},S=(e,t)=>{let r={columnIndex:t,currentOption:e};n(`clickOption`,f(b(),r)),n(`scrollInto`,r)},T=()=>{c.forEach(e=>e.stopMomentum());let e=b();return be(()=>{let e=b();n(`confirm`,e)}),e},ee=()=>n(`cancel`,b()),E=()=>m.value.map((e,r)=>k(rt,{value:o.value[r],fields:u.value,options:e,readonly:t.readonly,allowHtml:t.allowHtml,optionHeight:d.value,swipeDuration:t.swipeDuration,visibleOptionNum:t.visibleOptionNum,onChange:e=>x(e,r),onClickOption:e=>S(e,r),onScrollInto:e=>{n(`scrollInto`,{currentOption:e,columnIndex:r})}},{option:i.option})),ne=t=>{if(h.value){let n={height:`${d.value}px`},r={backgroundSize:`100% ${(t-d.value)/2}px`};return[k(`div`,{class:Ve(`mask`),style:r},null),k(`div`,{class:[e,Ve(`frame`)],style:n},null)]}},re=()=>{let e=d.value*+t.visibleOptionNum,n={height:`${e}px`};return!t.loading&&!h.value&&i.empty?i.empty():k(`div`,{ref:a,class:Ve(`columns`),style:n},[E(),ne(e)])},O=()=>{if(t.showToolbar&&!s)return k(ct,ye(C(t,st),{onConfirm:T,onCancel:ee}),C(i,ot))},se=e=>{e.forEach((e,t)=>{e.length&&!Ke(e,o.value[t],u.value)&&y(t,Ue(e)[u.value.value])})};je(m,e=>se(e),{immediate:!0});let ce;je(()=>t.modelValue,e=>{!_(e,o.value)&&!_(e,ce)&&(o.value=e.slice(0),ce=e.slice(0)),t.modelValue.length===0&&se(m.value)},{deep:!0}),je(o,e=>{_(e,t.modelValue)||(ce=e.slice(0),n(`update:modelValue`,ce))},{immediate:!0}),D(`touchmove`,w,{target:a});let le=()=>g.value;return ae({confirm:T,getSelectedOptions:le}),()=>{var e,n;return k(`div`,{class:Ve()},[t.toolbarPosition===`top`?O():null,t.loading?k(r,{class:Ve(`loading`)},null):null,(e=i[`columns-top`])?.call(i),re(),(n=i[`columns-bottom`])?.call(i),t.toolbarPosition===`bottom`?O():null])}}});const vt=se(_t),yt={__name:`DateTime`,props:{showPicker:{type:Boolean},values:{type:String}},emits:[`changeValue`,`confirm`],setup(e,{emit:t}){let n={text:`value`,value:`values`,children:``},r=Te({isPicker:!1,columns:[],selectedValues:[]}),i=e,o=t;je(()=>i.showPicker,e=>{r.isPicker=e,r.columns=[],c()},{immediate:!0});function s(){}function c(){let e=i.values,t=new Date(e.replace(/-/g,`/`)),n=t.getTime(),a;a=i.values==``?new Date:new Date(n);let o=a.getFullYear(),s=a.getMonth(),c=a.getDate(),u=a.getHours(),d=a.getMinutes(),f=a.getSeconds(),p=[];p.values=[];let m=new Date().getFullYear();for(let e=m-10;e{let n=vt,i=a;return we(),fe(i,{show:r.isPicker,"onUpdate:show":t[1]||=e=>r.isPicker=e,position:`bottom`,round:``,onClose:u},{default:Ne(()=>[k(n,{ref:`picker`,title:`请选择时间`,columns:r.columns,onChange:s,onCancel:d,onConfirm:f,modelValue:r.selectedValues,"onUpdate:modelValue":t[0]||=e=>r.selectedValues=e},null,8,[`columns`,`modelValue`])]),_:1},8,[`show`])}}};var eee=yt,bt=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function xt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function St(e){var t={exports:{}};return e(t,t.exports),t.exports}var Ct,wt,Tt=function(e){return e&&e.Math==Math&&e},A=Tt(typeof globalThis==`object`&&globalThis)||Tt(typeof window==`object`&&window)||Tt(typeof self==`object`&&self)||Tt(typeof bt==`object`&&bt)||function(){return this}()||Function(`return this`)(),Et=Function.prototype,Dt=Et.apply,tee=Et.bind,Ot=Et.call,kt=typeof Reflect==`object`&&Reflect.apply||(tee?Ot.bind(Dt):function(){return Ot.apply(Dt,arguments)}),At=Function.prototype,jt=At.bind,Mt=At.call,Nt=jt&&jt.bind(Mt),Pt=jt?function(e){return e&&Nt(Mt,e)}:function(e){return e&&function(){return Mt.apply(e,arguments)}},Ft=function(e){return typeof e==`function`},It=function(e){try{return!!e()}catch{return!0}},Lt=!It(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Rt=Function.prototype.call,zt=Rt.bind?Rt.bind(Rt):function(){return Rt.apply(Rt,arguments)},Bt={}.propertyIsEnumerable,Vt=Object.getOwnPropertyDescriptor,nee=Vt&&!Bt.call({1:2},1)?function(e){var t=Vt(this,e);return!!t&&t.enumerable}:Bt,Ht={f:nee},Ut=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Wt=Pt({}.toString),Gt=Pt(``.slice),Kt=function(e){return Gt(Wt(e),8,-1)},qt=A.Object,ree=Pt(``.split),Jt=It(function(){return!qt(`z`).propertyIsEnumerable(0)})?function(e){return Kt(e)==`String`?ree(e,``):qt(e)}:qt,Yt=A.TypeError,Xt=function(e){if(e==null)throw Yt(`Can't call method on `+e);return e},Zt=function(e){return Jt(Xt(e))},Qt=function(e){return typeof e==`object`?e!==null:Ft(e)},$t={},en=function(e){return Ft(e)?e:void 0},tn=function(e,t){return arguments.length<2?en($t[e])||en(A[e]):$t[e]&&$t[e][t]||A[e]&&A[e][t]},nn=Pt({}.isPrototypeOf),rn=tn(`navigator`,`userAgent`)||``,an=A.process,on=A.Deno,sn=an&&an.versions||on&&on.version,cn=sn&&sn.v8;cn&&(wt=(Ct=cn.split(`.`))[0]>0&&Ct[0]<4?1:+(Ct[0]+Ct[1])),!wt&&rn&&(!(Ct=rn.match(/Edge\/(\d+)/))||Ct[1]>=74)&&(Ct=rn.match(/Chrome\/(\d+)/))&&(wt=+Ct[1]);var ln,un=wt,dn=!!Object.getOwnPropertySymbols&&!It(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&un&&un<41}),fn=dn&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,iee=A.Object,pn=fn?function(e){return typeof e==`symbol`}:function(e){var t=tn(`Symbol`);return Ft(t)&&nn(t.prototype,iee(e))},mn=A.String,hn=function(e){try{return mn(e)}catch{return`Object`}},gn=A.TypeError,_n=function(e){if(Ft(e))return e;throw gn(hn(e)+` is not a function`)},vn=function(e,t){var n=e[t];return n==null?void 0:_n(n)},yn=A.TypeError,aee=Object.defineProperty,bn=A[`__core-js_shared__`]||function(e,t){try{aee(A,e,{value:t,configurable:!0,writable:!0})}catch{A[e]=t}return t}(`__core-js_shared__`,{}),xn=St(function(e){(e.exports=function(e,t){return bn[e]||(bn[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.19.3`,mode:`pure`,copyright:`© 2021 Denis Pushkarev (zloirock.ru)`})}),oee=A.Object,Sn=function(e){return oee(Xt(e))},Cn=Pt({}.hasOwnProperty),wn=Object.hasOwn||function(e,t){return Cn(Sn(e),t)},Tn=0,En=Math.random(),Dn=Pt(1 .toString),On=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+Dn(++Tn+En,36)},kn=xn(`wks`),An=A.Symbol,jn=An&&An.for,see=fn?An:An&&An.withoutSetter||On,Mn=function(e){if(!wn(kn,e)||!dn&&typeof kn[e]!=`string`){var t=`Symbol.`+e;dn&&wn(An,e)?kn[e]=An[e]:kn[e]=fn&&jn?jn(t):see(t)}return kn[e]},cee=A.TypeError,lee=Mn(`toPrimitive`),uee=function(e,t){if(!Qt(e)||pn(e))return e;var n,r=vn(e,lee);if(r){if(t===void 0&&(t=`default`),n=zt(r,e,t),!Qt(n)||pn(n))return n;throw cee(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),function(e,t){var n,r;if(t===`string`&&Ft(n=e.toString)&&!Qt(r=zt(n,e))||Ft(n=e.valueOf)&&!Qt(r=zt(n,e))||t!==`string`&&Ft(n=e.toString)&&!Qt(r=zt(n,e)))return r;throw yn(`Can't convert object to primitive value`)}(e,t)},Nn=function(e){var t=uee(e,`string`);return pn(t)?t:t+``},Pn=A.document,dee=Qt(Pn)&&Qt(Pn.createElement),Fn=function(e){return dee?Pn.createElement(e):{}},In=!Lt&&!It(function(){return Object.defineProperty(Fn(`div`),`a`,{get:function(){return 7}}).a!=7}),Ln=Object.getOwnPropertyDescriptor,fee=Lt?Ln:function(e,t){if(e=Zt(e),t=Nn(t),In)try{return Ln(e,t)}catch{}if(wn(e,t))return Ut(!zt(Ht.f,e,t),e[t])},Rn={f:fee},pee=/#|\.prototype\./,zn=function(e,t){var n=hee[mee(e)];return n==_ee||n!=gee&&(Ft(t)?It(t):!!t)},mee=zn.normalize=function(e){return String(e).replace(pee,`.`).toLowerCase()},hee=zn.data={},gee=zn.NATIVE=`N`,_ee=zn.POLYFILL=`P`,vee=zn,Bn=Pt(Pt.bind),Vn=function(e,t){return _n(e),t===void 0?e:Bn?Bn(e,t):function(){return e.apply(t,arguments)}},yee=A.String,bee=A.TypeError,Hn=function(e){if(Qt(e))return e;throw bee(yee(e)+` is not an object`)},xee=A.TypeError,Un=Object.defineProperty,Wn=Lt?Un:function(e,t,n){if(Hn(e),t=Nn(t),Hn(n),In)try{return Un(e,t,n)}catch{}if(`get`in n||`set`in n)throw xee(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e},Gn={f:Wn},Kn=Lt?function(e,t,n){return Gn.f(e,t,Ut(1,n))}:function(e,t,n){return e[t]=n,e},qn=Rn.f,Jn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return kt(e,this,arguments)};return t.prototype=e.prototype,t},Yn=function(e,t){var n,r,i,a,o,s,c,l,u=e.target,d=e.global,f=e.stat,p=e.proto,m=d?A:f?A[u]:(A[u]||{}).prototype,h=d?$t:$t[u]||Kn($t,u,{})[u],g=h.prototype;for(i in t)n=!vee(d?i:u+(f?`.`:`#`)+i,e.forced)&&m&&wn(m,i),o=h[i],n&&(s=e.noTargetGet?(l=qn(m,i))&&l.value:m[i]),a=n&&s?s:t[i],n&&typeof o==typeof a||(c=e.bind&&n?Vn(a,A):e.wrap&&n?Jn(a):p&&Ft(a)?Pt(a):a,(e.sham||a&&a.sham||o&&o.sham)&&Kn(c,`sham`,!0),Kn(h,i,c),p&&(wn($t,r=u+`Prototype`)||Kn($t,r,{}),Kn($t[r],i,a),e.real&&g&&!g[i]&&Kn(g,i,a)))},Xn=xn(`keys`),Zn=function(e){return Xn[e]||(Xn[e]=On(e))},See=!It(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Qn=Zn(`IE_PROTO`),$n=A.Object,Cee=$n.prototype,er=See?$n.getPrototypeOf:function(e){var t=Sn(e);if(wn(t,Qn))return t[Qn];var n=t.constructor;return Ft(n)&&t instanceof n?n.prototype:t instanceof $n?Cee:null},wee=A.String,Tee=A.TypeError,tr=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=Pt(Object.getOwnPropertyDescriptor(Object.prototype,`__proto__`).set))(n,[]),t=n instanceof Array}catch{}return function(n,r){return Hn(n),function(e){if(typeof e==`object`||Ft(e))return e;throw Tee(`Can't set `+wee(e)+` as a prototype`)}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Eee=Math.ceil,Dee=Math.floor,nr=function(e){var t=+e;return t!=t||t===0?0:(t>0?Dee:Eee)(t)},rr=Math.max,ir=Math.min,ar=function(e,t){var n=nr(e);return n<0?rr(n+t,0):ir(n,t)},or=Math.min,sr=function(e){return(t=e.length)>0?or(nr(t),9007199254740991):0;var t},cr=function(e){return function(t,n,r){var i,a=Zt(t),o=sr(a),s=ar(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},lr={includes:cr(!0),indexOf:cr(!1)},ur={},dr=lr.indexOf,fr=Pt([].push),pr=function(e,t){var n,r=Zt(e),i=0,a=[];for(n in r)!wn(ur,n)&&wn(r,n)&&fr(a,n);for(;t.length>i;)wn(r,n=t[i++])&&(~dr(a,n)||fr(a,n));return a},mr=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],hr=mr.concat(`length`,`prototype`),gr=Object.getOwnPropertyNames||function(e){return pr(e,hr)},_r={f:gr},vr={f:Object.getOwnPropertySymbols},Oee=Pt([].concat),kee=tn(`Reflect`,`ownKeys`)||function(e){var t=_r.f(Hn(e)),n=vr.f;return n?Oee(t,n(e)):t},yr=Object.keys||function(e){return pr(e,mr)},Aee=Lt?Object.defineProperties:function(e,t){Hn(e);for(var n,r=Zt(t),i=yr(t),a=i.length,o=0;a>o;)Gn.f(e,n=i[o++],r[n]);return e},jee=tn(`document`,`documentElement`),br=Zn(`IE_PROTO`),xr=function(){},Sr=function(e){return``},Cr=function(e){e.write(Sr(``)),e.close();var t=e.parentWindow.Object;return e=null,t},wr=function(){try{ln=new ActiveXObject(`htmlfile`)}catch{}var e,t;wr=typeof document<`u`?document.domain&&ln?Cr(ln):((t=Fn(`iframe`)).style.display=`none`,jee.appendChild(t),t.src=`javascript:`,(e=t.contentWindow.document).open(),e.write(Sr(`document.F=Object`)),e.close(),e.F):Cr(ln);for(var n=mr.length;n--;)delete wr.prototype[mr[n]];return wr()};ur[br]=!0;var Tr=Object.create||function(e,t){var n;return e===null?n=wr():(xr.prototype=Hn(e),n=new xr,xr.prototype=null,n[br]=e),t===void 0?n:Aee(n,t)},Er=function(e,t,n){var r=Nn(t);r in e?Gn.f(e,r,Ut(0,n)):e[r]=n},Dr=A.Array,Or=Math.max,kr=function(e,t,n){for(var r=sr(e),i=ar(t,r),a=ar(n===void 0?r:n,r),o=Dr(Or(a-i,0)),s=0;ia;a++)if((s=g(e[a]))&&nn(ei,s))return s;return new $r(!1)}r=function(e,t){var n=arguments.length<2?Yr(e):t;if(_n(n))return Hn(zt(n,e));throw Xr(hn(e)+` is not iterable`)}(e,i)}for(c=r.next;!(l=zt(c,r)).done;){try{s=g(l.value)}catch(e){Zr(r,`throw`,e)}if(typeof s==`object`&&s&&nn(ei,s))return s}return new $r(!1)},ni=A.String,ri=function(e){if(qr(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return ni(e)},ii=function(e,t){return e===void 0?arguments.length<2?``:t:ri(e)},ai=!It(function(){var e=Error(`a`);return!(`stack`in e)||(Object.defineProperty(e,`stack`,Ut(1,7)),e.stack!==7)}),oi=Mn(`toStringTag`),si=A.Error,ci=[].push,li=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,i=nn(ui,this);tr?n=tr(new si(void 0),i?er(this):ui):(n=i?this:Tr(ui),Kn(n,oi,`Error`)),Kn(n,`message`,ii(t,``)),ai&&Kn(n,`stack`,Lr(n.stack,1)),Rr(n,r);var a=[];return ti(e,ci,{that:a}),Kn(n,`errors`,a),n};tr?tr(li,si):function(e,t){for(var n=kee(t),r=Gn.f,i=Rn.f,a=0;a=t.length?(e.target=void 0,{value:void 0,done:!0}):n==`keys`?{value:r,done:!1}:n==`values`?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},`values`),zr.Arguments=zr.Array;var Jee=Pt(``.charAt),Fi=Pt(``.charCodeAt),Yee=Pt(``.slice),Ii=function(e){return function(t,n){var r,i,a=ri(Xt(t)),o=nr(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=Fi(a,o))<55296||r>56319||o+1===s||(i=Fi(a,o+1))<56320||i>57343?e?Jee(a,o):r:e?Yee(a,o,o+2):i-56320+(r-55296<<10)+65536}},Xee={codeAt:Ii(!1),charAt:Ii(!0)}.charAt,Zee=Ci.set,Qee=Ci.getterFor(`String Iterator`);Pi(String,`String`,function(e){Zee(this,{type:`String Iterator`,string:ri(e),index:0})},function(){var e,t=Qee(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Xee(n,r),t.index+=e.length,{value:e,done:!1})});var $ee=$t.AggregateError,Li=Mn(`toStringTag`);for(var Ri in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var zi=A[Ri],Bi=zi&&zi.prototype;Bi&&qr(Bi)!==Li&&Kn(Bi,Li,Ri),zr[Ri]=zr.Array}var Vi,Hi,ete=$ee,Ui=function(e){return e&&e.Math==Math&&e},j=Ui(typeof globalThis==`object`&&globalThis)||Ui(typeof window==`object`&&window)||Ui(typeof self==`object`&&self)||Ui(typeof bt==`object`&&bt)||function(){return this}()||Function(`return this`)(),Wi=function(e){try{return!!e()}catch{return!0}},Gi=!Wi(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Ki=Function.prototype.call,qi=Ki.bind?Ki.bind(Ki):function(){return Ki.apply(Ki,arguments)},Ji={}.propertyIsEnumerable,Yi=Object.getOwnPropertyDescriptor,tte=Yi&&!Ji.call({1:2},1)?function(e){var t=Yi(this,e);return!!t&&t.enumerable}:Ji,nte={f:tte},Xi=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Zi=Function.prototype,Qi=Zi.bind,$i=Zi.call,rte=Qi&&Qi.bind($i),ea=Qi?function(e){return e&&rte($i,e)}:function(e){return e&&function(){return $i.apply(e,arguments)}},ite=ea({}.toString),ate=ea(``.slice),ta=function(e){return ate(ite(e),8,-1)},na=j.Object,ote=ea(``.split),ra=Wi(function(){return!na(`z`).propertyIsEnumerable(0)})?function(e){return ta(e)==`String`?ote(e,``):na(e)}:na,ste=j.TypeError,ia=function(e){if(e==null)throw ste(`Can't call method on `+e);return e},aa=function(e){return ra(ia(e))},oa=function(e){return typeof e==`function`},sa=function(e){return typeof e==`object`?e!==null:oa(e)},ca=function(e){return oa(e)?e:void 0},la=function(e,t){return arguments.length<2?ca(j[e]):j[e]&&j[e][t]},ua=ea({}.isPrototypeOf),da=la(`navigator`,`userAgent`)||``,fa=j.process,pa=j.Deno,ma=fa&&fa.versions||pa&&pa.version,ha=ma&&ma.v8;ha&&(Hi=(Vi=ha.split(`.`))[0]>0&&Vi[0]<4?1:+(Vi[0]+Vi[1])),!Hi&&da&&(!(Vi=da.match(/Edge\/(\d+)/))||Vi[1]>=74)&&(Vi=da.match(/Chrome\/(\d+)/))&&(Hi=+Vi[1]);var ga=Hi,_a=!!Object.getOwnPropertySymbols&&!Wi(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ga&&ga<41}),va=_a&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,cte=j.Object,ya=va?function(e){return typeof e==`symbol`}:function(e){var t=la(`Symbol`);return oa(t)&&ua(t.prototype,cte(e))},lte=j.String,ba=function(e){try{return lte(e)}catch{return`Object`}},ute=j.TypeError,xa=function(e){if(oa(e))return e;throw ute(ba(e)+` is not a function`)},Sa=function(e,t){var n=e[t];return n==null?void 0:xa(n)},dte=j.TypeError,fte=Object.defineProperty,Ca=function(e,t){try{fte(j,e,{value:t,configurable:!0,writable:!0})}catch{j[e]=t}return t},wa=j[`__core-js_shared__`]||Ca(`__core-js_shared__`,{}),Ta=St(function(e){(e.exports=function(e,t){return wa[e]||(wa[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.19.3`,mode:`global`,copyright:`© 2021 Denis Pushkarev (zloirock.ru)`})}),pte=j.Object,Ea=function(e){return pte(ia(e))},Da=ea({}.hasOwnProperty),Oa=Object.hasOwn||function(e,t){return Da(Ea(e),t)},ka=0,Aa=Math.random(),ja=ea(1 .toString),Ma=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+ja(++ka+Aa,36)},Na=Ta(`wks`),Pa=j.Symbol,Fa=Pa&&Pa.for,Ia=va?Pa:Pa&&Pa.withoutSetter||Ma,La=function(e){if(!Oa(Na,e)||!_a&&typeof Na[e]!=`string`){var t=`Symbol.`+e;_a&&Oa(Pa,e)?Na[e]=Pa[e]:Na[e]=va&&Fa?Fa(t):Ia(t)}return Na[e]},Ra=j.TypeError,za=La(`toPrimitive`),Ba=function(e,t){if(!sa(e)||ya(e))return e;var n,r=Sa(e,za);if(r){if(t===void 0&&(t=`default`),n=qi(r,e,t),!sa(n)||ya(n))return n;throw Ra(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),function(e,t){var n,r;if(t===`string`&&oa(n=e.toString)&&!sa(r=qi(n,e))||oa(n=e.valueOf)&&!sa(r=qi(n,e))||t!==`string`&&oa(n=e.toString)&&!sa(r=qi(n,e)))return r;throw dte(`Can't convert object to primitive value`)}(e,t)},Va=function(e){var t=Ba(e,`string`);return ya(t)?t:t+``},Ha=j.document,Ua=sa(Ha)&&sa(Ha.createElement),Wa=function(e){return Ua?Ha.createElement(e):{}},Ga=!Gi&&!Wi(function(){return Object.defineProperty(Wa(`div`),`a`,{get:function(){return 7}}).a!=7}),Ka=Object.getOwnPropertyDescriptor,qa=Gi?Ka:function(e,t){if(e=aa(e),t=Va(t),Ga)try{return Ka(e,t)}catch{}if(Oa(e,t))return Xi(!qi(nte.f,e,t),e[t])},Ja={f:qa},Ya=j.String,Xa=j.TypeError,Za=function(e){if(sa(e))return e;throw Xa(Ya(e)+` is not an object`)},Qa=j.TypeError,$a=Object.defineProperty,eo=Gi?$a:function(e,t,n){if(Za(e),t=Va(t),Za(n),Ga)try{return $a(e,t,n)}catch{}if(`get`in n||`set`in n)throw Qa(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e},to={f:eo},no=Gi?function(e,t,n){return to.f(e,t,Xi(1,n))}:function(e,t,n){return e[t]=n,e},ro=ea(Function.toString);oa(wa.inspectSource)||(wa.inspectSource=function(e){return ro(e)});var io,ao,oo,so=wa.inspectSource,co=j.WeakMap,mte=oa(co)&&/native code/.test(so(co)),lo=Ta(`keys`),uo=function(e){return lo[e]||(lo[e]=Ma(e))},fo={},po=j.TypeError,hte=j.WeakMap;if(mte||wa.state){var mo=wa.state||=new hte,gte=ea(mo.get),ho=ea(mo.has),_te=ea(mo.set);io=function(e,t){if(ho(mo,e))throw new po(`Object already initialized`);return t.facade=e,_te(mo,e,t),t},ao=function(e){return gte(mo,e)||{}},oo=function(e){return ho(mo,e)}}else{var go=uo(`state`);fo[go]=!0,io=function(e,t){if(Oa(e,go))throw new po(`Object already initialized`);return t.facade=e,no(e,go,t),t},ao=function(e){return Oa(e,go)?e[go]:{}},oo=function(e){return Oa(e,go)}}var _o={set:io,get:ao,has:oo,enforce:function(e){return oo(e)?ao(e):io(e,{})},getterFor:function(e){return function(t){var n;if(!sa(t)||(n=ao(t)).type!==e)throw po(`Incompatible receiver, `+e+` required`);return n}}},vo=Function.prototype,vte=Gi&&Object.getOwnPropertyDescriptor,yo=Oa(vo,`name`),bo={EXISTS:yo,PROPER:yo&&function(){}.name===`something`,CONFIGURABLE:yo&&(!Gi||Gi&&vte(vo,`name`).configurable)},xo=St(function(e){var t=bo.CONFIGURABLE,n=_o.get,r=_o.enforce,i=String(String).split(`String`);(e.exports=function(e,n,a,o){var s,c=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,u=!!o&&!!o.noTargetGet,d=o&&o.name!==void 0?o.name:n;oa(a)&&(String(d).slice(0,7)===`Symbol(`&&(d=`[`+String(d).replace(/^Symbol\(([^)]*)\)/,`$1`)+`]`),(!Oa(a,`name`)||t&&a.name!==d)&&no(a,`name`,d),(s=r(a)).source||(s.source=i.join(typeof d==`string`?d:``))),e===j?l?e[n]=a:Ca(n,a):(c?!u&&e[n]&&(l=!0):delete e[n],l?e[n]=a:no(e,n,a))})(Function.prototype,`toString`,function(){return oa(this)&&n(this).source||so(this)})}),yte=Math.ceil,bte=Math.floor,So=function(e){var t=+e;return t!=t||t===0?0:(t>0?bte:yte)(t)},xte=Math.max,Ste=Math.min,Co=function(e,t){var n=So(e);return n<0?xte(n+t,0):Ste(n,t)},Cte=Math.min,wo=function(e){return e>0?Cte(So(e),9007199254740991):0},To=function(e){return wo(e.length)},Eo=function(e){return function(t,n,r){var i,a=aa(t),o=To(a),s=Co(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},Do={includes:Eo(!0),indexOf:Eo(!1)}.indexOf,Oo=ea([].push),ko=function(e,t){var n,r=aa(e),i=0,a=[];for(n in r)!Oa(fo,n)&&Oa(r,n)&&Oo(a,n);for(;t.length>i;)Oa(r,n=t[i++])&&(~Do(a,n)||Oo(a,n));return a},Ao=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],jo=Ao.concat(`length`,`prototype`),Mo=Object.getOwnPropertyNames||function(e){return ko(e,jo)},No={f:Mo},Po={f:Object.getOwnPropertySymbols},Fo=ea([].concat),Io=la(`Reflect`,`ownKeys`)||function(e){var t=No.f(Za(e)),n=Po.f;return n?Fo(t,n(e)):t},Lo=function(e,t){for(var n=Io(t),r=to.f,i=Ja.f,a=0;ao;)to.f(e,n=i[o++],r[n]);return e},fs=la(`document`,`documentElement`),ps=uo(`IE_PROTO`),ms=function(){},hs=function(e){return``},gs=function(e){e.write(hs(``)),e.close();var t=e.parentWindow.Object;return e=null,t},_s=function(){try{Jo=new ActiveXObject(`htmlfile`)}catch{}var e,t;_s=typeof document<`u`?document.domain&&Jo?gs(Jo):((t=Wa(`iframe`)).style.display=`none`,fs.appendChild(t),t.src=`javascript:`,(e=t.contentWindow.document).open(),e.write(hs(`document.F=Object`)),e.close(),e.F):gs(Jo);for(var n=Ao.length;n--;)delete _s.prototype[Ao[n]];return _s()};fo[ps]=!0;var vs,ys,bs=Object.create||function(e,t){var n;return e===null?n=_s():(ms.prototype=Za(e),n=new ms,ms.prototype=null,n[ps]=e),t===void 0?n:ds(n,t)},xs=j.RegExp,Ss=Wi(function(){var e=xs(`.`,`s`);return!(e.dotAll&&e.exec(` +`)&&e.flags===`s`)}),Cs=j.RegExp,ws=Wi(function(){var e=Cs(`(?b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$c`)!==`bc`}),Ts=_o.get,Es=Ta(`native-string-replace`,String.prototype.replace),Ds=RegExp.prototype.exec,Os=Ds,ks=ea(``.charAt),As=ea(``.indexOf),js=ea(``.replace),Ms=ea(``.slice),Ns=(ys=/b*/g,qi(Ds,vs=/a/,`a`),qi(Ds,ys,`a`),vs.lastIndex!==0||ys.lastIndex!==0),Ps=ls.BROKEN_CARET,Fs=/()??/.exec(``)[1]!==void 0;(Ns||Fs||Ps||Ss||ws)&&(Os=function(e){var t,n,r,i,a,o,s,c=this,l=Ts(c),u=ts(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=qi(Os,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=Ps&&c.sticky,m=qi(ns,c),h=c.source,g=0,_=u;if(p&&(m=js(m,`y`,``),As(m,`g`)===-1&&(m+=`g`),_=Ms(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&ks(u,c.lastIndex-1)!==` +`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),Fs&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),Ns&&(r=c.lastIndex),i=qi(Ds,p?n:c,_),p?i?(i.input=Ms(i.input,g),i[0]=Ms(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Ns&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),Fs&&i&&i.length>1&&qi(Es,i[0],n,function(){for(a=1;a=s?e?``:void 0:(r=Bs(a,o))<55296||r>56319||o+1===s||(i=Bs(a,o+1))<56320||i>57343?e?zs(a,o):r:e?Vs(a,o,o+2):i-56320+(r-55296<<10)+65536}},Us={codeAt:Hs(!1),charAt:Hs(!0)},Ws=Us.charAt,Gs=function(e,t,n){return t+(n?Ws(e,t).length:1)},Ks=j.TypeError,qs=function(e,t){var n=e.exec;if(oa(n)){var r=qi(n,e,t);return r!==null&&Za(r),r}if(ta(e)===`RegExp`)return qi(Is,e,t);throw Ks(`RegExp#exec called on incompatible receiver`)};(function(e,t,n,r){var i=La(e),a=!Wi(function(){var t={};return t[i]=function(){return 7},``[e](t)!=7}),o=a&&!Wi(function(){var t=!1,n=/a/;return e===`split`&&((n={}).constructor={},n.constructor[Ls]=function(){return n},n.flags=``,n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](``),!t});if(!a||!o||n){var s=ea(/./[i]),c=t(i,``[e],function(e,t,n,r,i){var o=ea(e),c=t.exec;return c===Is||c===Rs.exec?a&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}});xo(String.prototype,e,c[0]),xo(Rs,i,c[1])}r&&no(Rs[i],`sham`,!0)})(`match`,function(e,t,n){return[function(t){var n=ia(this),r=t==null?void 0:Sa(t,e);return r?qi(r,t,n):new RegExp(t)[e](ts(n))},function(e){var r=Za(this),i=ts(e),a=n(t,r,i);if(a.done)return a.value;if(!r.global)return qs(r,i);var o=r.unicode;r.lastIndex=0;for(var s,c=[],l=0;(s=qs(r,i))!==null;){var u=ts(s[0]);c[l]=u,u===``&&(r.lastIndex=Gs(i,wo(r.lastIndex),o)),l++}return l===0?null:c}]}),Ko({global:!0},{globalThis:j});var Js=!Wi(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Ys=uo(`IE_PROTO`),Xs=j.Object,Zs=Xs.prototype,Qs=Js?Xs.getPrototypeOf:function(e){var t=Ea(e);if(Oa(t,Ys))return t[Ys];var n=t.constructor;return oa(n)&&t instanceof n?n.prototype:t instanceof Xs?Zs:null},$s=j.String,ec=j.TypeError,tc=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=ea(Object.getOwnPropertyDescriptor(Object.prototype,`__proto__`).set))(n,[]),t=n instanceof Array}catch{}return function(n,r){return Za(n),function(e){if(typeof e==`object`||oa(e))return e;throw ec(`Can't set `+$s(e)+` as a prototype`)}(r),t?e(n,r):n.__proto__=r,n}}():void 0),nc=j.Array,rc=Math.max,ic=ea(``.replace),ac=ea(``.split),oc=ea([].join),sc=String(Error(`zxcasd`).stack),cc=/\n\s*at [^:]*:[^\n]*/,lc=cc.test(sc),uc=/@[^\n]*\n/.test(sc)&&!/zxcasd/.test(sc),dc=function(e,t){if(typeof e!=`string`)return e;if(lc)for(;t--;)e=ic(e,cc,``);else if(uc)return oc(function(e,t,n){for(var r,i,a,o,s=To(e),c=Co(t,s),l=Co(n===void 0?s:n,s),u=nc(rc(l-c,0)),d=0;ca;a++)if((s=g(e[a]))&&ua(wc,s))return s;return new Cc(!1)}r=function(e,t){var n=arguments.length<2?yc(e):t;if(xa(n))return Za(qi(n,e));throw bc(ba(e)+` is not iterable`)}(e,i)}for(c=r.next;!(l=qi(c,r)).done;){try{s=g(l.value)}catch(e){xc(r,`throw`,e)}if(typeof s==`object`&&s&&ua(wc,s))return s}return new Cc(!1)},Ec=function(e,t){return e===void 0?arguments.length<2?``:t:ts(e)},Dc=!Wi(function(){var e=Error(`a`);return!(`stack`in e)||(Object.defineProperty(e,`stack`,Xi(1,7)),e.stack!==7)}),Oc=La(`toStringTag`),kc=j.Error,Ac=[].push,jc=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,i=ua(Mc,this);tc?n=tc(new kc(void 0),i?Qs(this):Mc):(n=i?this:bs(Mc),no(n,Oc,`Error`)),no(n,`message`,Ec(t,``)),Dc&&no(n,`stack`,dc(n.stack,1)),fc(n,r);var a=[];return Tc(e,Ac,{that:a}),no(n,`errors`,a),n};tc?tc(jc,kc):Lo(jc,kc);var Mc=jc.prototype=bs(kc.prototype,{constructor:Xi(1,jc),message:Xi(1,``),name:Xi(1,`AggregateError`)});Ko({global:!0},{AggregateError:jc});var Nc=La(`unscopables`),Pc=Array.prototype;Pc[Nc]??to.f(Pc,Nc,{configurable:!0,value:bs(null)});var Fc,Ic,Lc,Rc=function(e){Pc[Nc][e]=!0},zc=La(`iterator`),Bc=!1;[].keys&&(`next`in(Lc=[].keys())?(Ic=Qs(Qs(Lc)))!==Object.prototype&&(Fc=Ic):Bc=!0);var Vc=Fc==null||Wi(function(){var e={};return Fc[zc].call(e)!==e});Vc&&(Fc={}),oa(Fc[zc])||xo(Fc,zc,function(){return this});var Hc={IteratorPrototype:Fc,BUGGY_SAFARI_ITERATORS:Bc},Uc=to.f,Wc=La(`toStringTag`),Gc=function(e,t,n){e&&!Oa(e=n?e:e.prototype,Wc)&&Uc(e,Wc,{configurable:!0,value:t})},Kc=Hc.IteratorPrototype,qc=function(){return this},Jc=bo.PROPER,Yc=bo.CONFIGURABLE,Xc=Hc.IteratorPrototype,Zc=Hc.BUGGY_SAFARI_ITERATORS,Qc=La(`iterator`),$c=function(){return this},el=function(e,t,n,r,i,a,o){(function(e,t,n,r){var i=t+` Iterator`;e.prototype=bs(Kc,{next:Xi(+!r,n)}),Gc(e,i,!1),hc[i]=qc})(n,t,r);var s,c,l,u=function(e){if(e===i&&h)return h;if(!Zc&&e in p)return p[e];switch(e){case`keys`:case`values`:case`entries`:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+` Iterator`,f=!1,p=e.prototype,m=p[Qc]||p[`@@iterator`]||i&&p[i],h=!Zc&&m||u(i),g=t==`Array`&&p.entries||m;if(g&&(s=Qs(g.call(new e)))!==Object.prototype&&s.next&&(Qs(s)!==Xc&&(tc?tc(s,Xc):oa(s[Qc])||xo(s,Qc,$c)),Gc(s,d,!0)),Jc&&i==`values`&&m&&m.name!==`values`&&(Yc?no(p,`name`,`values`):(f=!0,h=function(){return qi(m,this)})),i)if(c={values:u(`values`),keys:a?h:u(`keys`),entries:u(`entries`)},o)for(l in c)(Zc||f||!(l in p))&&xo(p,l,c[l]);else Ko({target:t,proto:!0,forced:Zc||f},c);return p[Qc]!==h&&xo(p,Qc,h,{name:i}),hc[t]=h,c},tl=_o.set,nl=_o.getterFor(`Array Iterator`),rl=el(Array,`Array`,function(e,t){tl(this,{type:`Array Iterator`,target:aa(e),index:0,kind:t})},function(){var e=nl(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n==`keys`?{value:r,done:!1}:n==`values`?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},`values`);hc.Arguments=hc.Array,Rc(`keys`),Rc(`values`),Rc(`entries`);var wte=Us.charAt,Tte=_o.set,Ete=_o.getterFor(`String Iterator`);el(String,`String`,function(e){Tte(this,{type:`String Iterator`,string:ts(e),index:0})},function(){var e,t=Ete(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=wte(n,r),t.index+=e.length,{value:e,done:!1})});var il,al={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ol=Wa(`span`).classList,sl=ol&&ol.constructor&&ol.constructor.prototype,cl=sl===Object.prototype?void 0:sl,ll=La(`iterator`),ul=La(`toStringTag`),dl=rl.values,fl=function(e,t){if(e){if(e[ll]!==dl)try{no(e,ll,dl)}catch{e[ll]=dl}if(e[ul]||no(e,ul,t),al[t]){for(var n in rl)if(e[n]!==rl[n])try{no(e,n,rl[n])}catch{e[n]=rl[n]}}}};for(var pl in al)fl(j[pl]&&j[pl].prototype,pl);fl(cl,`DOMTokenList`),typeof global>`u`?(`ActiveXObject`in window&&console.error(`抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器 + Sorry, wangEditor V5+ versions do not support IE browser.`),ml(),hl()):global&&(il=global.navigator)!=null&&il.userAgent.match(`QQBrowser`)&&(ml(),hl());function ml(){typeof globalThis>`u`&&(window.globalThis=window)}function hl(){ete===void 0&&(window.AggregateError=function(e,t){var n=Error(t);return n.errors=e,n})}var gl,_l=Array.isArray||function(e){return Kt(e)==`Array`},vl=function(){},Dte=[],yl=tn(`Reflect`,`construct`),bl=/^\s*(?:class|function)\b/,Ote=Pt(bl.exec),kte=!bl.exec(vl),xl=function(e){if(!Ft(e))return!1;try{return yl(vl,Dte,e),!0}catch{return!1}},Ate=!yl||It(function(){var e;return xl(xl.call)||!xl(Object)||!xl(function(){e=!0})||e})?function(e){if(!Ft(e))return!1;switch(qr(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}return kte||!!Ote(bl,mi(e))}:xl,jte=Mn(`species`),Sl=A.Array,Cl=function(e,t){return new(function(e){var t;return _l(e)&&(t=e.constructor,(Ate(t)&&(t===Sl||_l(t.prototype))||Qt(t)&&(t=t[jte])===null)&&(t=void 0)),t===void 0?Sl:t}(e))(t===0?0:t)},Mte=Mn(`species`),wl=Mn(`isConcatSpreadable`),Tl=A.TypeError,Nte=un>=51||!It(function(){var e=[];return e[wl]=!1,e.concat()[0]!==e}),Pte=(gl=`concat`,un>=51||!It(function(){var e=[];return(e.constructor={})[Mte]=function(){return{foo:1}},e[gl](Boolean).foo!==1})),Fte=function(e){if(!Qt(e))return!1;var t=e[wl];return t===void 0?_l(e):!!t};Yn({target:`Array`,proto:!0,forced:!Nte||!Pte},{concat:function(e){var t,n,r,i,a,o=Sn(this),s=Cl(o,0),c=0;for(t=-1,r=arguments.length;t9007199254740991)throw Tl(`Maximum allowed index exceeded`);for(n=0;n=9007199254740991)throw Tl(`Maximum allowed index exceeded`);Er(s,c++,a)}return s.length=c,s}});var El=_r.f,Dl=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ol={f:function(e){return Dl&&Kt(e)==`Window`?function(e){try{return El(e)}catch{return kr(Dl)}}(e):El(Zt(e))}},Ite=Pt([].slice),kl={f:Mn},Lte=Gn.f,Al=function(e){var t=$t.Symbol||={};wn(t,e)||Lte(t,e,{value:kl.f(e)})},jl=Pt([].push),Ml=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,a=e==6,o=e==7,s=e==5||a;return function(c,l,u,d){for(var f,p,m=Sn(c),h=Jt(m),g=Vn(l,u),_=sr(h),v=0,y=d||Cl,b=t?y(c,_):n||o?y(c,0):void 0;_>v;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:jl(b,f)}else switch(e){case 4:return!1;case 7:jl(b,f)}return a?-1:r||i?i:b}},Nl={forEach:Ml(0),map:Ml(1),filter:Ml(2),some:Ml(3),every:Ml(4),find:Ml(5),findIndex:Ml(6),filterReject:Ml(7)}.forEach,Pl=Zn(`hidden`),Fl=Mn(`toPrimitive`),Rte=Ci.set,Il=Ci.getterFor(`Symbol`),Ll=Object.prototype,Rl=A.Symbol,zl=Rl&&Rl.prototype,Bl=A.TypeError,Vl=A.QObject,Hl=tn(`JSON`,`stringify`),Ul=Rn.f,Wl=Gn.f,Gl=Ol.f,zte=Ht.f,Kl=Pt([].push),ql=xn(`symbols`),Jl=xn(`op-symbols`),Yl=xn(`string-to-symbol-registry`),Xl=xn(`symbol-to-string-registry`),Bte=xn(`wks`),Zl=!Vl||!Vl.prototype||!Vl.prototype.findChild,Ql=Lt&&It(function(){return Tr(Wl({},`a`,{get:function(){return Wl(this,`a`,{value:7}).a}})).a!=7})?function(e,t,n){var r=Ul(Ll,t);r&&delete Ll[t],Wl(e,t,n),r&&e!==Ll&&Wl(Ll,t,r)}:Wl,$l=function(e,t){var n=ql[e]=Tr(zl);return Rte(n,{type:`Symbol`,tag:e,description:t}),Lt||(n.description=t),n},eu=function(e,t,n){e===Ll&&eu(Jl,t,n),Hn(e);var r=Nn(t);return Hn(n),wn(ql,r)?(n.enumerable?(wn(e,Pl)&&e[Pl][r]&&(e[Pl][r]=!1),n=Tr(n,{enumerable:Ut(0,!1)})):(wn(e,Pl)||Wl(e,Pl,Ut(1,{})),e[Pl][r]=!0),Ql(e,r,n)):Wl(e,r,n)},tu=function(e,t){Hn(e);var n=Zt(t),r=yr(n).concat(au(n));return Nl(r,function(t){Lt&&!zt(nu,n,t)||eu(e,t,n[t])}),e},nu=function(e){var t=Nn(e),n=zt(zte,this,t);return!(this===Ll&&wn(ql,t)&&!wn(Jl,t))&&(!(n||!wn(this,t)||!wn(ql,t)||wn(this,Pl)&&this[Pl][t])||n)},ru=function(e,t){var n=Zt(e),r=Nn(t);if(n!==Ll||!wn(ql,r)||wn(Jl,r)){var i=Ul(n,r);return!i||!wn(ql,r)||wn(n,Pl)&&n[Pl][r]||(i.enumerable=!0),i}},iu=function(e){var t=Gl(Zt(e)),n=[];return Nl(t,function(e){wn(ql,e)||wn(ur,e)||Kl(n,e)}),n},au=function(e){var t=e===Ll,n=Gl(t?Jl:Zt(e)),r=[];return Nl(n,function(e){!wn(ql,e)||t&&!wn(Ll,e)||Kl(r,ql[e])}),r};if(dn||(zl=(Rl=function(){if(nn(zl,this))throw Bl(`Symbol is not a constructor`);var e=arguments.length&&arguments[0]!==void 0?ri(arguments[0]):void 0,t=On(e),n=function(e){this===Ll&&zt(n,Jl,e),wn(this,Pl)&&wn(this[Pl],t)&&(this[Pl][t]=!1),Ql(this,t,Ut(1,e))};return Lt&&Zl&&Ql(Ll,t,{configurable:!0,set:n}),$l(t,e)}).prototype,Ei(zl,`toString`,function(){return Il(this).tag}),Ei(Rl,`withoutSetter`,function(e){return $l(On(e),e)}),Ht.f=nu,Gn.f=eu,Rn.f=ru,_r.f=Ol.f=iu,vr.f=au,kl.f=function(e){return $l(Mn(e),e)},Lt&&Wl(zl,`description`,{configurable:!0,get:function(){return Il(this).description}})),Yn({global:!0,wrap:!0,forced:!dn,sham:!dn},{Symbol:Rl}),Nl(yr(Bte),function(e){Al(e)}),Yn({target:`Symbol`,stat:!0,forced:!dn},{for:function(e){var t=ri(e);if(wn(Yl,t))return Yl[t];var n=Rl(t);return Yl[t]=n,Xl[n]=t,n},keyFor:function(e){if(!pn(e))throw Bl(e+` is not a symbol`);if(wn(Xl,e))return Xl[e]},useSetter:function(){Zl=!0},useSimple:function(){Zl=!1}}),Yn({target:`Object`,stat:!0,forced:!dn,sham:!Lt},{create:function(e,t){return t===void 0?Tr(e):tu(Tr(e),t)},defineProperty:eu,defineProperties:tu,getOwnPropertyDescriptor:ru}),Yn({target:`Object`,stat:!0,forced:!dn},{getOwnPropertyNames:iu,getOwnPropertySymbols:au}),Yn({target:`Object`,stat:!0,forced:It(function(){vr.f(1)})},{getOwnPropertySymbols:function(e){return vr.f(Sn(e))}}),Hl){var Vte=!dn||It(function(){var e=Rl();return Hl([e])!=`[null]`||Hl({a:e})!=`{}`||Hl(Object(e))!=`{}`});Yn({target:`JSON`,stat:!0,forced:Vte},{stringify:function(e,t,n){var r=Ite(arguments),i=t;if((Qt(t)||e!==void 0)&&!pn(e))return _l(t)||(t=function(e,t){if(Ft(i)&&(t=zt(i,this,e,t)),!pn(t))return t}),r[1]=t,kt(Hl,null,r)}})}if(!zl[Fl]){var Hte=zl.valueOf;Ei(zl,Fl,function(e){return zt(Hte,this)})}ji(Rl,`Symbol`),ur[Pl]=!0,Al(`asyncIterator`),Al(`hasInstance`),Al(`isConcatSpreadable`),Al(`iterator`),Al(`match`),Al(`matchAll`),Al(`replace`),Al(`search`),Al(`species`),Al(`split`),Al(`toPrimitive`),Al(`toStringTag`),Al(`unscopables`),ji(A.JSON,`JSON`,!0);var Ute=$t.Symbol;Al(`asyncDispose`),Al(`dispose`),Al(`matcher`),Al(`metadata`),Al(`observable`),Al(`patternMatch`),Al(`replaceAll`);var ou=Ute,Wte=kl.f(`iterator`),Gte=St(function(e){function t(n){return typeof ou==`function`&&typeof Wte==`symbol`?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&typeof ou==`function`&&e.constructor===ou&&e!==ou.prototype?`symbol`:typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}),Kte=xt(Gte),su=Ja.f,qte=Wi(function(){su(1)});if(Ko({target:`Object`,stat:!0,forced:!Gi||qte,sham:!Gi},{getOwnPropertyDescriptor:function(e,t){return su(aa(e),t)}}),(typeof global>`u`?`undefined`:Kte(global))===`object`){var Jte=Object.getOwnPropertyDescriptor(global,`window`);global.window&&!Jte.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(e){return nodeCrypto.randomFillSync(e)}}),global.document!=null&&global.document.getElementsByTagName==null&&(global.document.getElementsByTagName=function(){return[]})} +/*! +* is-plain-object +* +* Copyright (c) 2014-2017, Jon Schlinkert. +* Released under the MIT License. +*/function cu(e){return Object.prototype.toString.call(e)===`[object Object]`}function lu(e){var t,n;return!1!==cu(e)&&((t=e.constructor)===void 0||!1!==cu(n=t.prototype)&&!1!==n.hasOwnProperty(`isPrototypeOf`))}function uu(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:_u(e)?2:vu(e)?3:0}function hu(e,t){return mu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function gu(e,t,n){var r=mu(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function _u(e){return Qte&&e instanceof Map}function vu(e){return $te&&e instanceof Set}function yu(e){return e.o||e.t}function bu(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=tne(e);delete t[Gu];for(var n=Ku(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Yte),Object.freeze(e),t&&pu(e,function(e,t){return xu(t,!0)},!0)),e}function Yte(){uu(2)}function Su(e){return typeof e!=`object`||!e||Object.isFrozen(e)}function Cu(e){var t=nne[e];return t||uu(18,e),t}function wu(){return Bu}function Tu(e,t){t&&(Cu(`Patches`),e.u=[],e.s=[],e.v=t)}function Eu(e){Du(e),e.p.forEach(Xte),e.p=null}function Du(e){e===Bu&&(Bu=e.l)}function Ou(e){return Bu={p:[],l:Bu,h:e,m:!0,_:0}}function Xte(e){var t=e[Gu];t.i===0||t.i===1?t.j():t.O=!0}function ku(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Cu(`ES5`).S(t,e,r),r?(n[Gu].P&&(Eu(t),uu(4)),fu(e)&&(e=Au(t,e),t.l||Mu(t,e)),t.u&&Cu(`Patches`).M(n[Gu],e,t.u,t.s)):e=Au(t,n,[]),Eu(t),t.u&&t.v(t.u,t.s),e===Uu?void 0:e}function Au(e,t,n){if(Su(t))return t;var r=t[Gu];if(!r)return pu(t,function(i,a){return ju(e,r,t,i,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Mu(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=bu(r.k):r.o;pu(r.i===3?new Set(i):i,function(t,a){return ju(e,r,i,t,a,n)}),Mu(e,i,!1),n&&e.u&&Cu(`Patches`).R(r,n,e.u,e.s)}return r.o}function ju(e,t,n,r,i,a){if(du(i)){var o=Au(e,i,a&&t&&t.i!==3&&!hu(t.D,r)?a.concat(r):void 0);if(gu(n,r,o),!du(o))return;e.m=!1}if(fu(i)&&!Su(i)){if(!e.h.F&&e._<1)return;Au(e,i),t&&t.A.l||Mu(e,i)}}function Mu(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&xu(t,n)}function Nu(e,t){var n=e[Gu];return(n?yu(n):e)[t]}function Pu(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Fu(e){e.P||(e.P=!0,e.l&&Fu(e.l))}function Iu(e){e.o||=bu(e.t)}function Lu(e,t,n){var r=_u(t)?Cu(`MapSet`).N(t,n):vu(t)?Cu(`MapSet`).T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:wu(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,a=qu;n&&(i=[r],a=Ju);var o=Proxy.revocable(i,a),s=o.revoke,c=o.proxy;return r.k=c,r.j=s,c}(t,n):Cu(`ES5`).J(t,n);return(n?n.A:wu()).p.push(r),r}function Zte(e){return du(e)||uu(22,e),function e(t){if(!fu(t))return t;var n,r=t[Gu],i=mu(t);if(r){if(!r.P&&(r.i<4||!Cu(`ES5`).K(r)))return r.t;r.I=!0,n=Ru(t,i),r.I=!1}else n=Ru(t,i);return pu(n,function(t,i){r&&function(e,t){return mu(e)===2?e.get(t):e[t]}(r.t,t)===i||gu(n,t,e(i))}),i===3?new Set(n):n}(e)}function Ru(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return bu(e)}var zu,Bu,Vu=typeof Symbol<`u`&&typeof Symbol(`x`)==`symbol`,Qte=typeof Map<`u`,$te=typeof Set<`u`,Hu=typeof Proxy<`u`&&Proxy.revocable!==void 0&&typeof Reflect<`u`,Uu=Vu?Symbol.for(`immer-nothing`):((zu={})[`immer-nothing`]=!0,zu),Wu=Vu?Symbol.for(`immer-draftable`):`__$immer_draftable`,Gu=Vu?Symbol.for(`immer-state`):`__$immer_state`,ene=``+Object.prototype.constructor,Ku=typeof Reflect<`u`&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols===void 0?Object.getOwnPropertyNames:function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))},tne=Object.getOwnPropertyDescriptors||function(e){var t={};return Ku(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},nne={},qu={get:function(e,t){if(t===Gu)return e;var n=yu(e);if(!hu(n,t))return function(e,t,n){var r,i=Pu(t,n);return i?`value`in i?i.value:(r=i.get)?.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!fu(r)?r:r===Nu(e.t,t)?(Iu(e),e.o[t]=Lu(e.A.h,r,e)):r},has:function(e,t){return t in yu(e)},ownKeys:function(e){return Reflect.ownKeys(yu(e))},set:function(e,t,n){var r=Pu(yu(e),t);if(r?.set)return r.set.call(e.k,n),!0;if(!e.P){var i=Nu(yu(e),t),a=i?.[Gu];if(a&&a.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(function(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}(n,i)&&(n!==void 0||hu(e.t,t)))return!0;Iu(e),Fu(e)}return e.o[t]===n&&typeof n!=`number`&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return Nu(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,Iu(e),Fu(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=yu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!==`length`,enumerable:r.enumerable,value:n[t]}},defineProperty:function(){uu(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){uu(12)}},Ju={};pu(qu,function(e,t){Ju[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ju.deleteProperty=function(e,t){return qu.deleteProperty.call(this,e[0],t)},Ju.set=function(e,t,n){return qu.set.call(this,e[0],t,n,e[0])};var rne=function(){function e(e){var t=this;this.g=Hu,this.F=!0,this.produce=function(e,n,r){if(typeof e==`function`&&typeof n!=`function`){var i=n;n=e;var a=t;return function(e){var t=this;e===void 0&&(e=i);for(var r=arguments.length,o=Array(r>1?r-1:0),s=1;s1?r-1:0),a=1;a=0;n--){var r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=Cu(`Patches`).$;return du(e)?i(e,t):this.produce(e,function(e){return i(e,t)})},e}(),Yu=new rne,Xu=Yu.produce;Yu.produceWithPatches.bind(Yu),Yu.setAutoFreeze.bind(Yu),Yu.setUseProxies.bind(Yu),Yu.applyPatches.bind(Yu);var Zu=Yu.createDraft.bind(Yu),Qu=Yu.finishDraft.bind(Yu);function $u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ed=new WeakMap,td=new WeakMap,nd=new WeakMap,rd=new WeakMap,id=new WeakMap,ad=new WeakMap;function od(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sd(e){for(var t=1;t{var e={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:t=>{for(var n of P.pathRefs(e))Cne.transform(n,t);for(var r of P.pointRefs(e))wne.transform(r,t);for(var i of P.rangeRefs(e))Fd.transform(i,t);var a=new Set,o=[],s=e=>{if(e){var t=e.join(`,`);a.has(t)||(a.add(t),o.push(e))}},c=ed.get(e)||[],l=ane(t);for(var u of c)s(I.transform(u,t));for(var d of l)s(d);ed.set(e,o),B.transform(e,t),e.operations.push(t),P.normalize(e),t.type===`set_selection`&&(e.marks=null),td.get(e)||(td.set(e,!0),Promise.resolve().then(()=>{td.set(e,!1),e.onChange(),e.operations=[]}))},addMark:(t,n)=>{var{selection:r}=e;if(r)if(R.isExpanded(r))B.setNodes(e,{[t]:n},{match:z.isText,split:!0});else{var i=sd(sd({},P.marks(e)||{}),{},{[t]:n});e.marks=i,td.get(e)||e.onChange()}},deleteBackward:t=>{var{selection:n}=e;n&&R.isCollapsed(n)&&B.delete(e,{unit:t,reverse:!0})},deleteForward:t=>{var{selection:n}=e;n&&R.isCollapsed(n)&&B.delete(e,{unit:t})},deleteFragment:t=>{var{selection:n}=e;n&&R.isExpanded(n)&&B.delete(e,{reverse:t===`backward`})},getFragment:()=>{var{selection:t}=e;return t?F.fragment(e,t):[]},insertBreak:()=>{B.splitNodes(e,{always:!0})},insertFragment:t=>{B.insertFragment(e,t)},insertNode:t=>{B.insertNodes(e,t)},insertText:t=>{var{selection:n,marks:r}=e;if(n){if(r){var i=sd({text:t},r);B.insertNodes(e,i)}else B.insertText(e,t);e.marks=null}},normalizeNode:t=>{var[n,r]=t;if(!z.isText(n))if(N.isElement(n)&&n.children.length===0)B.insertNodes(e,{text:``},{at:r.concat(0),voids:!0});else for(var i=!P.isEditor(n)&&N.isElement(n)&&(e.isInline(n)||n.children.length===0||z.isText(n.children[0])||e.isInline(n.children[0])),a=0,o=0;o{var{selection:n}=e;if(n)if(R.isExpanded(n))B.unsetNodes(e,t,{match:z.isText,split:!0});else{var r=sd({},P.marks(e)||{});delete r[t],e.marks=r,td.get(e)||e.onChange()}}};return e},ane=e=>{switch(e.type){case`insert_text`:case`remove_text`:case`set_node`:var{path:t}=e;return I.levels(t);case`insert_node`:var{node:n,path:r}=e,i=I.levels(r),a=z.isText(n)?[]:Array.from(F.nodes(n),e=>{var[,t]=e;return r.concat(t)});return[...i,...a];case`merge_node`:var{path:o}=e;return[...I.ancestors(o),I.previous(o)];case`move_node`:var{path:s,newPath:c}=e;if(I.equals(s,c))return[];var l=[],u=[];for(var d of I.ancestors(s)){var f=I.transform(d,e);l.push(f)}for(var p of I.ancestors(c)){var m=I.transform(p,e);u.push(m)}var h=u[u.length-1],g=c[c.length-1],_=h.concat(g);return[...l,...u,_];case`remove_node`:var{path:v}=e;return[...I.ancestors(v)];case`split_node`:var{path:y}=e;return[...I.levels(y),I.next(y)];default:return[]}};function cd(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var M,ld=function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=!t,r=t?une(e):e,i=M.None,a=M.None,o=0,s=null;for(var c of r){var l=c.codePointAt(0);if(!l)break;var u=mne(c,l);if([i,a]=n?[a,u]:[u,i],yd(i,M.ZWJ)&&yd(a,M.ExtPict)&&!vne(n?e.substring(0,o):e.substring(0,e.length-o))||yd(i,M.RI)&&yd(a,M.RI)&&!(s=s===null?!!n||xd(e.substring(0,e.length-o)):!s)||i!==M.None&&a!==M.None&&gne(i,a))break;o+=c.length}return o||1},one=/\s/,sne=/[\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]/,cne=/['\u2018\u2019]/,ud=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},lne=function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(one.test(t))return!1;if(cne.test(t)){var i=ld(n,r),[a,o]=ud(n,i,r);if(e(a,o,r))return!0}return!sne.test(t)},une=function*(e){for(var t=e.length-1,n=0;ne>=55296&&e<=56319,dne=e=>e>=56320&&e<=57343;(function(e){e[e.None=0]=`None`,e[e.Extend=1]=`Extend`,e[e.ZWJ=2]=`ZWJ`,e[e.RI=4]=`RI`,e[e.Prepend=8]=`Prepend`,e[e.SpacingMark=16]=`SpacingMark`,e[e.L=32]=`L`,e[e.V=64]=`V`,e[e.T=128]=`T`,e[e.LV=256]=`LV`,e[e.LVT=512]=`LVT`,e[e.ExtPict=1024]=`ExtPict`,e[e.Any=2048]=`Any`})(M||={});var fd=/^(?:[\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])$/,pd=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,fne=/^(?:[\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])$/,pne=/^[\u1100-\u115F\uA960-\uA97C]$/,md=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,hd=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,gd=/^[\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]$/,_d=/^[\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]$/,vd=/^(?:[\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])$/,mne=(e,t)=>{var n=M.Any;return e.search(fd)!==-1&&(n|=M.Extend),t===8205&&(n|=M.ZWJ),t>=127462&&t<=127487&&(n|=M.RI),e.search(pd)!==-1&&(n|=M.Prepend),e.search(fne)!==-1&&(n|=M.SpacingMark),e.search(pne)!==-1&&(n|=M.L),e.search(md)!==-1&&(n|=M.V),e.search(hd)!==-1&&(n|=M.T),e.search(gd)!==-1&&(n|=M.LV),e.search(_d)!==-1&&(n|=M.LVT),e.search(vd)!==-1&&(n|=M.ExtPict),n};function yd(e,t){return(e&t)!=0}var hne=[[M.L,M.L|M.V|M.LV|M.LVT],[M.LV|M.V,M.V|M.T],[M.LVT|M.T,M.T],[M.Any,M.Extend|M.ZWJ],[M.Any,M.SpacingMark],[M.Prepend,M.Any],[M.ZWJ,M.ExtPict],[M.RI,M.RI]];function gne(e,t){return hne.findIndex(n=>yd(e,n[0])&&yd(t,n[1]))===-1}var _ne=/(?:[\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$/,vne=e=>e.search(_ne)!==-1,bd=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,xd=e=>{var t=e.match(bd);return t!==null&&t[0].length/2%2==1},Sd=e=>lu(e)&&F.isNodeList(e.children)&&!P.isEditor(e),N={isAncestor:e=>lu(e)&&F.isNodeList(e.children),isElement:Sd,isElementList:e=>Array.isArray(e)&&e.every(e=>N.isElement(e)),isElementProps:e=>e.children!==void 0,isElementType:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`type`;return Sd(e)&&e[n]===t},matches(e,t){for(var n in t)if(n!==`children`&&e[n]!==t[n])return!1;return!0}},Cd=[`text`],wd=[`text`];function Td(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ed(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},{voids:n=!1,mode:r=`lowest`,at:i=e.selection,match:a}=t;if(i){var o=P.path(e,i),s=r===`lowest`;for(var[c,l]of P.levels(e,{at:o,voids:n,match:a,reverse:s}))if(!z.isText(c)&&!I.equals(o,l))return[c,l]}},addMark(e,t,n){e.addMark(t,n)},after(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i={anchor:P.point(e,t,{edge:`end`}),focus:P.end(e,[])},{distance:a=1}=r,o=0;for(var s of P.positions(e,Ed(Ed({},r),{},{at:i}))){if(o>a)break;o!==0&&(n=s),o++}return n},before(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i={anchor:P.start(e,[]),focus:P.point(e,t,{edge:`start`})},{distance:a=1}=r,o=0;for(var s of P.positions(e,Ed(Ed({},r),{},{at:i,reverse:!0}))){if(o>a)break;o!==0&&(n=s),o++}return n},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n=`character`}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n=`character`}=t;e.deleteForward(n)},deleteFragment(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{direction:n=`forward`}=t;e.deleteFragment(n)},edges:(e,t)=>[P.start(e,t),P.end(e,t)],end:(e,t)=>P.point(e,t,{edge:`end`}),first(e,t){var n=P.path(e,t,{edge:`start`});return P.node(e,n)},fragment(e,t){var n=P.range(e,t);return F.fragment(e,n)},hasBlocks:(e,t)=>t.children.some(t=>P.isBlock(e,t)),hasInlines:(e,t)=>t.children.some(t=>z.isText(t)||P.isInline(e,t)),hasTexts:(e,t)=>t.children.every(e=>z.isText(e)),insertBreak(e){e.insertBreak()},insertFragment(e,t){e.insertFragment(t)},insertNode(e,t){e.insertNode(t)},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>N.isElement(t)&&!e.isInline(t),isEditor(e){if(!lu(e))return!1;var t=Dd.get(e);if(t!==void 0)return t;var n=typeof e.addMark==`function`&&typeof e.apply==`function`&&typeof e.deleteBackward==`function`&&typeof e.deleteForward==`function`&&typeof e.deleteFragment==`function`&&typeof e.insertBreak==`function`&&typeof e.insertFragment==`function`&&typeof e.insertNode==`function`&&typeof e.insertText==`function`&&typeof e.isInline==`function`&&typeof e.isVoid==`function`&&typeof e.normalizeNode==`function`&&typeof e.onChange==`function`&&typeof e.removeMark==`function`&&(e.marks===null||lu(e.marks))&&(e.selection===null||R.isRange(e.selection))&&F.isNodeList(e.children)&&jd.isOperationList(e.operations);return Dd.set(e,n),n},isEnd(e,t,n){var r=P.end(e,n);return L.equals(t,r)},isEdge:(e,t,n)=>P.isStart(e,t,n)||P.isEnd(e,t,n),isEmpty(e,t){var{children:n}=t,[r]=n;return n.length===0||n.length===1&&z.isText(r)&&r.text===``&&!e.isVoid(t)},isInline:(e,t)=>N.isElement(t)&&e.isInline(t),isNormalizing(e){var t=nd.get(e);return t===void 0||t},isStart(e,t,n){if(t.offset!==0)return!1;var r=P.start(e,n);return L.equals(t,r)},isVoid:(e,t)=>N.isElement(t)&&e.isVoid(t),last(e,t){var n=P.path(e,t,{edge:`end`});return P.node(e,n)},leaf(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=P.path(e,t,n);return[F.leaf(e,r),r]},*levels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,reverse:r=!1,voids:i=!1}=t,{match:a}=t;if(a??=()=>!0,n){var o=[],s=P.path(e,n);for(var[c,l]of F.levels(e,s))if(a(c,l)&&(o.push([c,l]),!i&&P.isVoid(e,c)))break;r&&o.reverse(),yield*o}},marks(e){var{marks:t,selection:n}=e;if(!n)return null;if(t)return t;if(R.isExpanded(n)){var[r]=P.nodes(e,{match:z.isText});if(r){var[i]=r;return cd(i,Cd)}return{}}var{anchor:a}=n,{path:o}=a,[s]=P.leaf(e,o);if(a.offset===0){var c=P.previous(e,{at:o,match:z.isText}),l=P.above(e,{match:t=>P.isBlock(e,t)});if(c&&l){var[u,d]=c,[,f]=l;I.isAncestor(f,d)&&(s=u)}}return cd(s,wd)},next(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n=`lowest`,voids:r=!1}=t,{match:i,at:a=e.selection}=t;if(a){var o=P.after(e,a,{voids:r});if(o){var[,s]=P.last(e,[]),c=[o.path,s];if(I.isPath(a)&&a.length===0)throw Error(`Cannot get the next node from the root node!`);if(i==null)if(I.isPath(a)){var[l]=P.parent(e,a);i=e=>l.children.includes(e)}else i=()=>!0;var[u]=P.nodes(e,{at:c,match:i,mode:n,voids:r});return u}}},node(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=P.path(e,t,n);return[F.get(e,r),r]},*nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,mode:r=`all`,universal:i=!1,reverse:a=!1,voids:o=!1}=t,{match:s}=t;if(s||=()=>!0,n){var c,l;if(bne.isSpan(n))c=n[0],l=n[1];else{var u=P.path(e,n,{edge:`start`}),d=P.path(e,n,{edge:`end`});c=a?d:u,l=a?u:d}var f,p=F.nodes(e,{reverse:a,from:c,to:l,pass:t=>{var[n]=t;return!o&&P.isVoid(e,n)}}),m=[];for(var[h,g]of p){var _=f&&I.compare(g,f[1])===0;if(r!==`highest`||!_){if(s(h,g))if(r===`lowest`&&_)f=[h,g];else{var v=r===`lowest`?f:[h,g];v&&(i?m.push(v):yield v),f=[h,g]}else if(i&&!_&&z.isText(h))return}}r===`lowest`&&f&&(i?m.push(f):yield f),i&&(yield*m)}},normalize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1}=t,r=e=>ed.get(e)||[];if(P.isNormalizing(e)){if(n){var i=Array.from(F.nodes(e),e=>{var[,t]=e;return t});ed.set(e,i)}r(e).length!==0&&P.withoutNormalizing(e,()=>{for(var t of r(e))if(F.has(e,t)){var n=P.node(e,t),[i,a]=n;N.isElement(i)&&i.children.length===0&&e.normalizeNode(n)}for(var o=42*r(e).length,s=0;r(e).length!==0;){if(s>o)throw Error(` + Could not completely normalize the editor after ${o} iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state. + `);var c=r(e).pop();if(F.has(e,c)){var l=P.node(e,c);e.normalizeNode(l)}s++}})}},parent(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=P.path(e,t,n),i=I.parent(r);return P.node(e,i)},path(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:r,edge:i}=n;if(I.isPath(t)){if(i===`start`){var[,a]=F.first(e,t);t=a}else if(i===`end`){var[,o]=F.last(e,t);t=o}}return R.isRange(t)&&(t=i===`start`?R.start(t):i===`end`?R.end(t):I.common(t.anchor.path,t.focus.path)),L.isPoint(t)&&(t=t.path),r!=null&&(t=t.slice(0,r)),t},hasPath:(e,t)=>F.has(e,t),pathRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r=`forward`}=n,i={current:t,affinity:r,unref(){var{current:t}=i;return P.pathRefs(e).delete(i),i.current=null,t}};return P.pathRefs(e).add(i),i},pathRefs(e){var t=rd.get(e);return t||(t=new Set,rd.set(e,t)),t},point(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:r=`start`}=n;if(I.isPath(t)){var i;if(r===`end`){var[,a]=F.last(e,t);i=a}else{var[,o]=F.first(e,t);i=o}var s=F.get(e,i);if(!z.isText(s))throw Error(`Cannot get the ${r} point in the node at path [${t}] because it has no ${r} text node.`);return{path:i,offset:r===`end`?s.text.length:0}}if(R.isRange(t)){var[c,l]=R.edges(t);return r===`start`?c:l}return t},pointRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r=`forward`}=n,i={current:t,affinity:r,unref(){var{current:t}=i;return P.pointRefs(e).delete(i),i.current=null,t}};return P.pointRefs(e).add(i),i},pointRefs(e){var t=id.get(e);return t||(t=new Set,id.set(e,t)),t},*positions(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,unit:r=`offset`,reverse:i=!1,voids:a=!1}=t;if(n){var o=P.range(e,n),[s,c]=R.edges(o),l=i?c:s,u=!1,d=``,f=0,p=0,m=0;for(var[h,g]of P.nodes(e,{at:n,reverse:i,voids:a})){if(N.isElement(h)){if(!a&&e.isVoid(h)){yield P.start(e,g);continue}if(e.isInline(h))continue;if(P.hasInlines(e,h)){var _=I.isAncestor(g,c.path)?c:P.end(e,g),v=I.isAncestor(g,s.path)?s:P.start(e,g);d=P.string(e,{anchor:v,focus:_},{voids:a}),u=!0}}if(z.isText(h)){var y=I.equals(g,l.path);for(y?(p=i?l.offset:h.text.length-l.offset,m=l.offset):(p=h.text.length,m=i?p:0),(y||u||r===`offset`)&&(yield{path:g,offset:m},u=!1);;){if(f===0){if(d===``)break;f=b(d,r,i),d=ud(d,f,i)[1]}if(m=i?m-f:m+f,(p-=f)<0){f=-p;break}f=0,yield{path:g,offset:m}}}}}function b(e,t,n){return t===`character`?ld(e,n):t===`word`?function(e){for(var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=0,r=!1;e.length>0;){var i=ld(e,t),[a,o]=ud(e,i,t);if(lne(a,o,t))r=!0,n+=i;else{if(r)break;n+=i}e=o}return n}(e,n):t===`line`||t===`block`?e.length:1}},previous(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n=`lowest`,voids:r=!1}=t,{match:i,at:a=e.selection}=t;if(a){var o=P.before(e,a,{voids:r});if(o){var[,s]=P.first(e,[]),c=[o.path,s];if(I.isPath(a)&&a.length===0)throw Error(`Cannot get the previous node from the root node!`);if(i==null)if(I.isPath(a)){var[l]=P.parent(e,a);i=e=>l.children.includes(e)}else i=()=>!0;var[u]=P.nodes(e,{reverse:!0,at:c,match:i,mode:n,voids:r});return u}}},range:(e,t,n)=>R.isRange(t)&&!n?t:{anchor:P.start(e,t),focus:P.end(e,n||t)},rangeRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r=`forward`}=n,i={current:t,affinity:r,unref(){var{current:t}=i;return P.rangeRefs(e).delete(i),i.current=null,t}};return P.rangeRefs(e).add(i),i},rangeRefs(e){var t=ad.get(e);return t||(t=new Set,ad.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){nd.set(e,t)},start:(e,t)=>P.point(e,t,{edge:`start`}),string(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,i=P.range(e,t),[a,o]=R.edges(i),s=``;for(var[c,l]of P.nodes(e,{at:i,match:z.isText,voids:r})){var u=c.text;I.equals(l,o.path)&&(u=u.slice(0,o.offset)),I.equals(l,a.path)&&(u=u.slice(a.offset)),s+=u}return s},unhangRange(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,[i,a]=R.edges(t);if(i.offset!==0||a.offset!==0||R.isCollapsed(t))return t;var o=P.above(e,{at:a,match:t=>P.isBlock(e,t)}),s=o?o[1]:[],c={anchor:P.start(e,[]),focus:a},l=!0;for(var[u,d]of P.nodes(e,{at:c,match:z.isText,reverse:!0,voids:r}))if(l)l=!1;else if(u.text!==``||I.isBefore(d,s)){a={path:d,offset:u.text.length};break}return{anchor:i,focus:a}},void(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return P.above(e,Ed(Ed({},t),{},{match:t=>P.isVoid(e,t)}))},withoutNormalizing(e,t){var n=P.isNormalizing(e);P.setNormalizing(e,!1);try{t()}finally{P.setNormalizing(e,n)}P.normalize(e)}},yne={isLocation:e=>I.isPath(e)||L.isPoint(e)||R.isRange(e)},bne={isSpan:e=>Array.isArray(e)&&e.length===2&&e.every(I.isPath)},xne=[`children`],Sne=[`text`],Od=new WeakMap,F={ancestor(e,t){var n=F.get(e,t);if(z.isText(n))throw Error(`Cannot get the ancestor node at path [${t}] because it refers to a text node instead: ${n}`);return n},*ancestors(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var r of I.ancestors(t,n)){var i=[F.ancestor(e,r),r];yield i}},child(e,t){if(z.isText(e))throw Error(`Cannot get the child of a text node: ${JSON.stringify(e)}`);var n=e.children[t];if(n==null)throw Error(`Cannot get child at index \`${t}\` in node: ${JSON.stringify(e)}`);return n},*children(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{reverse:r=!1}=n,i=F.ancestor(e,t),{children:a}=i,o=r?a.length-1:0;r?o>=0:o1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of F.nodes(e,t))r.length!==0&&(yield[n,r])},*elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of F.nodes(e,t))N.isElement(n)&&(yield[n,r])},extractProps:e=>N.isAncestor(e)?cd(e,xne):cd(e,Sne),first(e,t){for(var n=t.slice(),r=F.get(e,n);r&&!z.isText(r)&&r.children.length!==0;)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(z.isText(e))throw Error(`Cannot get a fragment starting from a root text node: ${JSON.stringify(e)}`);var n=Xu({children:e.children},e=>{var[n,r]=R.edges(t),i=F.nodes(e,{reverse:!0,pass:e=>{var[,n]=e;return!R.includes(t,n)}});for(var[,a]of i){if(!R.includes(t,a)){var o=F.parent(e,a),s=a[a.length-1];o.children.splice(s,1)}if(I.equals(a,r.path)){var c=F.leaf(e,a);c.text=c.text.slice(0,r.offset)}if(I.equals(a,n.path)){var l=F.leaf(e,a);l.text=l.text.slice(n.offset)}}P.isEditor(e)&&(e.selection=null)});return n.children},get(e,t){for(var n=e,r=0;rz.isText(e)||N.isElement(e)||P.isEditor(e),isNodeList(e){if(!Array.isArray(e))return!1;var t=Od.get(e);if(t!==void 0)return t;var n=e.every(e=>F.isNode(e));return Od.set(e,n),n},last(e,t){for(var n=t.slice(),r=F.get(e,n);r&&!z.isText(r)&&r.children.length!==0;){var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(e,t){var n=F.get(e,t);if(!z.isText(n))throw Error(`Cannot get the leaf node at path [${t}] because it refers to a non-leaf node: ${n}`);return n},*levels(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var r of I.levels(t,n)){var i=F.get(e,r);yield[i,r]}},matches:(e,t)=>N.isElement(e)&&N.isElementProps(t)&&N.matches(e,t)||z.isText(e)&&z.isTextProps(t)&&z.matches(e,t),*nodes(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{pass:n,reverse:r=!1}=t,{from:i=[],to:a}=t,o=new Set,s=[],c=e;!a||!(r?I.isBefore(s,a):I.isAfter(s,a));)if(o.has(c)||(yield[c,s]),o.has(c)||z.isText(c)||c.children.length===0||n!=null&&!1!==n([c,s])){if(s.length===0)break;if(!r){var l=I.next(s);if(F.has(e,l)){s=l,c=F.get(e,s);continue}}r&&s[s.length-1]!==0?(s=I.previous(s),c=F.get(e,s)):(s=I.parent(s),c=F.get(e,s),o.add(c))}else{o.add(c);var u=r?c.children.length-1:0;I.isAncestor(s,i)&&(u=i[s.length]),s=s.concat(u),c=F.get(e,s)}},parent(e,t){var n=I.parent(t),r=F.get(e,n);if(z.isText(r))throw Error(`Cannot get the parent of path [${t}] because it does not exist in the root.`);return r},string:e=>z.isText(e)?e.text:e.children.map(F.string).join(``),*texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of F.nodes(e,t))z.isText(n)&&(yield[n,r])}};function kd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ad(e){for(var t=1;tjd.isOperation(e)&&e.type.endsWith(`_node`),isOperation(e){if(!lu(e))return!1;switch(e.type){case`insert_node`:case`remove_node`:return I.isPath(e.path)&&F.isNode(e.node);case`insert_text`:case`remove_text`:return typeof e.offset==`number`&&typeof e.text==`string`&&I.isPath(e.path);case`merge_node`:return typeof e.position==`number`&&I.isPath(e.path)&&lu(e.properties);case`move_node`:return I.isPath(e.path)&&I.isPath(e.newPath);case`set_node`:return I.isPath(e.path)&&lu(e.properties)&&lu(e.newProperties);case`set_selection`:return e.properties===null&&R.isRange(e.newProperties)||e.newProperties===null&&R.isRange(e.properties)||lu(e.properties)&&lu(e.newProperties);case`split_node`:return I.isPath(e.path)&&typeof e.position==`number`&&lu(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every(e=>jd.isOperation(e)),isSelectionOperation:e=>jd.isOperation(e)&&e.type.endsWith(`_selection`),isTextOperation:e=>jd.isOperation(e)&&e.type.endsWith(`_text`),inverse(e){switch(e.type){case`insert_node`:return Ad(Ad({},e),{},{type:`remove_node`});case`insert_text`:return Ad(Ad({},e),{},{type:`remove_text`});case`merge_node`:return Ad(Ad({},e),{},{type:`split_node`,path:I.previous(e.path)});case`move_node`:var{newPath:t,path:n}=e;if(I.equals(t,n))return e;if(I.isSibling(n,t))return Ad(Ad({},e),{},{path:t,newPath:n});var r=I.transform(n,e),i=I.transform(I.next(n),e);return Ad(Ad({},e),{},{path:r,newPath:i});case`remove_node`:return Ad(Ad({},e),{},{type:`insert_node`});case`remove_text`:return Ad(Ad({},e),{},{type:`insert_text`});case`set_node`:var{properties:a,newProperties:o}=e;return Ad(Ad({},e),{},{properties:o,newProperties:a});case`set_selection`:var{properties:s,newProperties:c}=e;return Ad(Ad({},e),{},s==null?{properties:c,newProperties:null}:c==null?{properties:null,newProperties:s}:{properties:c,newProperties:s});case`split_node`:return Ad(Ad({},e),{},{type:`merge_node`,path:I.next(e.path)})}}},I={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=I.levels(e,t);return r=n?r.slice(1):r.slice(0,-1)},common(e,t){for(var n=[],r=0;rt[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),a=e[n],o=t[n];return I.equals(r,i)&&a>o},endsAt(e,t){var n=e.length,r=e.slice(0,n),i=t.slice(0,n);return I.equals(r,i)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),a=e[n],o=t[n];return I.equals(r,i)&&ae.length===t.length&&e.every((e,n)=>e===t[n]),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>I.compare(e,t)===1,isAncestor:(e,t)=>e.lengthI.compare(e,t)===-1,isChild:(e,t)=>e.length===t.length+1&&I.compare(e,t)===0,isCommon:(e,t)=>e.length<=t.length&&I.compare(e,t)===0,isDescendant:(e,t)=>e.length>t.length&&I.compare(e,t)===0,isParent:(e,t)=>e.length+1===t.length&&I.compare(e,t)===0,isPath:e=>Array.isArray(e)&&(e.length===0||typeof e[0]==`number`),isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&I.equals(n,r)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=[],i=0;i<=e.length;i++)r.push(e.slice(0,i));return n&&r.reverse(),r},next(e){if(e.length===0)throw Error(`Cannot get the next path of a root path [${e}], because it has no next index.`);var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},parent(e){if(e.length===0)throw Error(`Cannot get the parent path of the root path [${e}].`);return e.slice(0,-1)},previous(e){if(e.length===0)throw Error(`Cannot get the previous path of a root path [${e}], because it has no previous index.`);var t=e[e.length-1];if(t<=0)throw Error(`Cannot get the previous path of a first child path [${e}] because it would result in a negative index.`);return e.slice(0,-1).concat(t-1)},relative(e,t){if(!I.isAncestor(t,e)&&!I.equals(e,t))throw Error(`Cannot get the relative path of [${e}] inside ancestor [${t}], because it is not above or equal to the path.`);return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Xu(e,r=>{var{affinity:i=`forward`}=n;if(e&&e?.length!==0){if(r===null)return null;switch(t.type){case`insert_node`:var{path:a}=t;(I.equals(a,r)||I.endsBefore(a,r)||I.isAncestor(a,r))&&(r[a.length-1]+=1);break;case`remove_node`:var{path:o}=t;if(I.equals(o,r)||I.isAncestor(o,r))return null;I.endsBefore(o,r)&&--r[o.length-1];break;case`merge_node`:var{path:s,position:c}=t;I.equals(s,r)||I.endsBefore(s,r)?--r[s.length-1]:I.isAncestor(s,r)&&(--r[s.length-1],r[s.length]+=c);break;case`split_node`:var{path:l,position:u}=t;if(I.equals(l,r)){if(i===`forward`)r[r.length-1]+=1;else if(i!==`backward`)return null}else I.endsBefore(l,r)?r[l.length-1]+=1:I.isAncestor(l,r)&&e[l.length]>=u&&(r[l.length-1]+=1,r[l.length]-=u);break;case`move_node`:var{path:d,newPath:f}=t;if(I.equals(d,f))return;if(I.isAncestor(d,r)||I.equals(d,r)){var p=f.slice();return I.endsBefore(d,f)&&d.lengtht.offset?1:0:n},isAfter:(e,t)=>L.compare(e,t)===1,isBefore:(e,t)=>L.compare(e,t)===-1,equals:(e,t)=>e.offset===t.offset&&I.equals(e.path,t.path),isPoint:e=>lu(e)&&typeof e.offset==`number`&&I.isPath(e.path),transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Xu(e,e=>{if(e===null)return null;var{affinity:r=`forward`}=n,{path:i,offset:a}=e;switch(t.type){case`insert_node`:case`move_node`:e.path=I.transform(i,t,n);break;case`insert_text`:I.equals(t.path,i)&&t.offset<=a&&(e.offset+=t.text.length);break;case`merge_node`:I.equals(t.path,i)&&(e.offset+=t.position),e.path=I.transform(i,t,n);break;case`remove_text`:I.equals(t.path,i)&&t.offset<=a&&(e.offset-=Math.min(a-t.offset,t.text.length));break;case`remove_node`:if(I.equals(t.path,i)||I.isAncestor(t.path,i))return null;e.path=I.transform(i,t,n);break;case`split_node`:if(I.equals(t.path,i)){if(t.position===a&&r==null)return null;(t.position1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:i}=e;return R.isBackward(e)===n?[r,i]:[i,r]},end(e){var[,t]=R.edges(e);return t},equals:(e,t)=>L.equals(e.anchor,t.anchor)&&L.equals(e.focus,t.focus),includes(e,t){if(R.isRange(t)){if(R.includes(e,t.anchor)||R.includes(e,t.focus))return!0;var[n,r]=R.edges(e),[i,a]=R.edges(t);return L.isBefore(n,i)&&L.isAfter(r,a)}var[o,s]=R.edges(e),c=!1,l=!1;return L.isPoint(t)?(c=L.compare(t,o)>=0,l=L.compare(t,s)<=0):(c=I.compare(t,o.path)>=0,l=I.compare(t,s.path)<=0),c&&l},intersection(e,t){var n=cd(e,Tne),[r,i]=R.edges(e),[a,o]=R.edges(t),s=L.isBefore(r,a)?a:r,c=L.isBefore(i,o)?i:o;return L.isBefore(c,s)?null:function(e){for(var t=1;t!R.isCollapsed(e),isForward:e=>!R.isBackward(e),isRange:e=>lu(e)&&L.isPoint(e.anchor)&&L.isPoint(e.focus),*points(e){yield[e.anchor,`anchor`],yield[e.focus,`focus`]},start(e){var[t]=R.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Xu(e,e=>{if(e===null)return null;var r,i,{affinity:a=`inward`}=n;if(a===`inward`){var o=R.isCollapsed(e);R.isForward(e)?(r=`forward`,i=o?r:`backward`):(r=`backward`,i=o?r:`forward`)}else a===`outward`?R.isForward(e)?(r=`backward`,i=`forward`):(r=`forward`,i=`backward`):(r=a,i=a);var s=L.transform(e.anchor,t,{affinity:r}),c=L.transform(e.focus,t,{affinity:i});if(!s||!c)return null;e.anchor=s,e.focus=c})}},Fd={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var i=R.transform(n,t,{affinity:r});e.current=i,i??e.unref()}}},Id=(e,t)=>{for(var n in e){var r=e[n],i=t[n];if(lu(r)&&lu(i)){if(!Id(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function i(e){return cd(e,Ld)}return Id(r?i(e):e,r?i(t):t)},isText:e=>lu(e)&&typeof e.text==`string`,isTextList:e=>Array.isArray(e)&&e.every(e=>z.isText(e)),isTextProps:e=>e.text!==void 0,matches(e,t){for(var n in t)if(n!==`text`&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[Bd({},e)];for(var r of t){var i=cd(r,Rd),[a,o]=R.edges(r),s=[],c=0;for(var l of n){var{length:u}=l.text,d=c;if(c+=u,a.offset<=d&&o.offset>=c)Object.assign(l,i),s.push(l);else if(a.offset!==o.offset&&(a.offset===c||o.offset===d)||a.offset>c||o.offsetd){var g=a.offset-d;p=Bd(Bd({},f),{},{text:f.text.slice(0,g)}),f=Bd(Bd({},f),{},{text:f.text.slice(g)})}Object.assign(f,i),p&&s.push(p),s.push(f),m&&s.push(m)}}n=s}return n}};function Vd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hd(e){for(var t=1;t{switch(n.type){case`insert_node`:var{path:r,node:i}=n,a=F.parent(e,r),o=r[r.length-1];if(o>a.children.length)throw Error(`Cannot apply an "insert_node" operation at path [${r}] because the destination is past the end of the node.`);if(a.children.splice(o,0,i),t)for(var[s,c]of R.points(t))t[c]=L.transform(s,n);break;case`insert_text`:var{path:l,offset:u,text:d}=n;if(d.length===0)break;var f=F.leaf(e,l),p=f.text.slice(0,u),m=f.text.slice(u);if(f.text=p+d+m,t)for(var[h,g]of R.points(t))t[g]=L.transform(h,n);break;case`merge_node`:var{path:_}=n,v=F.get(e,_),y=I.previous(_),b=F.get(e,y),x=F.parent(e,_),S=_[_.length-1];if(z.isText(v)&&z.isText(b))b.text+=v.text;else{if(z.isText(v)||z.isText(b))throw Error(`Cannot apply a "merge_node" operation at path [${_}] to nodes of different interfaces: ${v} ${b}`);b.children.push(...v.children)}if(x.children.splice(S,1),t)for(var[C,w]of R.points(t))t[w]=L.transform(C,n);break;case`move_node`:var{path:T,newPath:ee}=n;if(I.isAncestor(T,ee))throw Error(`Cannot move a path [${T}] to new path [${ee}] because the destination is inside itself.`);var E=F.get(e,T),te=F.parent(e,T),ne=T[T.length-1];te.children.splice(ne,1);var re=I.transform(T,n),ie=F.get(e,I.parent(re)),D=re[re.length-1];if(ie.children.splice(D,0,E),t)for(var[ae,oe]of R.points(t))t[oe]=L.transform(ae,n);break;case`remove_node`:var{path:O}=n,se=O[O.length-1];if(F.parent(e,O).children.splice(se,1),t)for(var[ce,le]of R.points(t)){var ue=L.transform(ce,n);if(t!=null&&ue!=null)t[le]=ue;else{var de=void 0,fe=void 0;for(var[pe,me]of F.texts(e)){if(I.compare(me,O)!==-1){fe=[pe,me];break}de=[pe,me]}var he=!1;de&&fe&&(he=I.equals(fe[1],O)?!I.hasPrevious(fe[1]):I.common(de[1],O).length2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:a=`lowest`}=n,{at:o,match:s,select:c}=n;if(F.isNode(t)&&(t=[t]),t.length!==0){var[l]=t;if(o||(o=e.selection?e.selection:e.children.length>0?P.end(e,[]):[0],c=!0),c??=!1,R.isRange(o))if(r||(o=P.unhangRange(e,o)),R.isCollapsed(o))o=o.anchor;else{var[,u]=R.edges(o),d=P.pointRef(e,u);B.delete(e,{at:o}),o=d.unref()}if(L.isPoint(o)){s??=z.isText(l)?e=>z.isText(e):e.isInline(l)?t=>z.isText(t)||P.isInline(e,t):t=>P.isBlock(e,t);var[f]=P.nodes(e,{at:o.path,match:s,mode:a,voids:i});if(!f)return;var[,p]=f,m=P.pathRef(e,p),h=P.isEnd(e,o,p);B.splitNodes(e,{at:o,match:s,mode:a,voids:i});var g=m.unref();o=h?I.next(g):g}var _=I.parent(o),v=o[o.length-1];if(i||!P.void(e,{at:_})){for(var y of t){var b=_.concat(v);v++,e.apply({type:`insert_node`,path:b,node:y}),o=I.next(o)}if(o=I.previous(o),c){var x=P.end(e,o);x&&B.select(e,x)}}}})},liftNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:r=`lowest`,voids:i=!1}=t,{match:a}=t;if(a??=I.isPath(n)?Zd(e,n):t=>P.isBlock(e,t),n){var o=P.nodes(e,{at:n,match:a,mode:r,voids:i}),s=Array.from(o,t=>{var[,n]=t;return P.pathRef(e,n)});for(var c of s){var l=c.unref();if(l.length<2)throw Error(`Cannot lift node at a path [${l}] because it has a depth of less than \`2\`.`);var u=P.node(e,I.parent(l)),[d,f]=u,p=l[l.length-1],{length:m}=d.children;if(m===1){var h=I.next(f);B.moveNodes(e,{at:l,to:h,voids:i}),B.removeNodes(e,{at:f,voids:i})}else if(p===0)B.moveNodes(e,{at:l,to:f,voids:i});else if(p===m-1){var g=I.next(f);B.moveNodes(e,{at:l,to:g,voids:i})}else{var _=I.next(l),v=I.next(f);B.splitNodes(e,{at:_,voids:i}),B.moveNodes(e,{at:l,to:v,voids:i})}}}})},mergeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{match:n,at:r=e.selection}=t,{hanging:i=!1,voids:a=!1,mode:o=`lowest`}=t;if(r){if(n==null)if(I.isPath(r)){var[s]=P.parent(e,r);n=e=>s.children.includes(e)}else n=t=>P.isBlock(e,t);if(!i&&R.isRange(r)&&(r=P.unhangRange(e,r)),R.isRange(r))if(R.isCollapsed(r))r=r.anchor;else{var[,c]=R.edges(r),l=P.pointRef(e,c);B.delete(e,{at:r}),r=l.unref(),t.at??B.select(e,r)}var[u]=P.nodes(e,{at:r,match:n,voids:a,mode:o}),d=P.previous(e,{at:r,match:n,voids:a,mode:o});if(u&&d){var[f,p]=u,[m,h]=d;if(p.length!==0&&h.length!==0){var g,_,v=I.next(h),y=I.common(p,h),b=I.isSibling(p,h),x=Array.from(P.levels(e,{at:p}),e=>{var[t]=e;return t}).slice(y.length).slice(0,-1),S=P.above(e,{at:p,mode:`highest`,match:t=>x.includes(t)&&Yd(e,t)}),C=S&&P.pathRef(e,S[1]);if(z.isText(f)&&z.isText(m)){var w=cd(f,Wd);_=m.text.length,g=w}else{if(!N.isElement(f)||!N.isElement(m))throw Error(`Cannot merge the node at path [${p}] with the previous sibling because it is not the same kind: ${JSON.stringify(f)} ${JSON.stringify(m)}`);w=cd(f,Gd),_=m.children.length,g=w}b||B.moveNodes(e,{at:p,to:v,voids:a}),C&&B.removeNodes(e,{at:C.current,voids:a}),N.isElement(m)&&P.isEmpty(e,m)||z.isText(m)&&m.text===``&&h[h.length-1]!==0?B.removeNodes(e,{at:h,voids:a}):e.apply({type:`merge_node`,path:v,position:_,properties:g}),C&&C.unref()}}}})},moveNodes(e,t){P.withoutNormalizing(e,()=>{var{to:n,at:r=e.selection,mode:i=`lowest`,voids:a=!1}=t,{match:o}=t;if(r){o??=I.isPath(r)?Zd(e,r):t=>P.isBlock(e,t);var s=P.pathRef(e,n),c=P.nodes(e,{at:r,match:o,mode:i,voids:a}),l=Array.from(c,t=>{var[,n]=t;return P.pathRef(e,n)});for(var u of l){var d=u.unref(),f=s.current;d.length!==0&&e.apply({type:`move_node`,path:d,newPath:f}),s.current&&I.isSibling(f,d)&&I.isAfter(f,d)&&(s.current=I.next(s.current))}s.unref()}})},removeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:r=!1,mode:i=`lowest`}=t,{at:a=e.selection,match:o}=t;if(a){o??=I.isPath(a)?Zd(e,a):t=>P.isBlock(e,t),!n&&R.isRange(a)&&(a=P.unhangRange(e,a));var s=P.nodes(e,{at:a,match:o,mode:i,voids:r}),c=Array.from(s,t=>{var[,n]=t;return P.pathRef(e,n)});for(var l of c){var u=l.unref();if(u){var[d]=P.node(e,u);e.apply({type:`remove_node`,path:u,node:d})}}}})},setNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{match:r,at:i=e.selection}=n,{hanging:a=!1,mode:o=`lowest`,split:s=!1,voids:c=!1}=n;if(i){if(r??=I.isPath(i)?Zd(e,i):t=>P.isBlock(e,t),!a&&R.isRange(i)&&(i=P.unhangRange(e,i)),s&&R.isRange(i)){if(R.isCollapsed(i)&&P.leaf(e,i.anchor)[0].text.length>0)return;var l=P.rangeRef(e,i,{affinity:`inward`}),[u,d]=R.edges(i),f=o===`lowest`?`lowest`:`highest`,p=P.isEnd(e,d,d.path);B.splitNodes(e,{at:d,match:r,mode:f,voids:c,always:!p});var m=P.isStart(e,u,u.path);B.splitNodes(e,{at:u,match:r,mode:f,voids:c,always:!m}),i=l.unref(),n.at??B.select(e,i)}for(var[h,g]of P.nodes(e,{at:i,match:r,mode:o,voids:c})){var _={},v={};if(g.length!==0){var y=!1;for(var b in t)b!==`children`&&b!==`text`&&t[b]!==h[b]&&(y=!0,h.hasOwnProperty(b)&&(_[b]=h[b]),t[b]!=null&&(v[b]=t[b]));y&&e.apply({type:`set_node`,path:g,properties:_,newProperties:v})}}}})},splitNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{mode:n=`lowest`,voids:r=!1}=t,{match:i,at:a=e.selection,height:o=0,always:s=!1}=t;if(i??=t=>P.isBlock(e,t),R.isRange(a)&&(a=Xd(e,a)),I.isPath(a)){var c=a,l=P.point(e,c),[u]=P.parent(e,c);i=e=>e===u,o=l.path.length-c.length+1,a=l,s=!0}if(a){var d=P.pointRef(e,a,{affinity:`backward`}),[f]=P.nodes(e,{at:a,match:i,mode:n,voids:r});if(f){var p=P.void(e,{at:a,mode:`highest`});if(!r&&p){var[m,h]=p;if(N.isElement(m)&&e.isInline(m)){var g=P.after(e,h);if(!g){var _=I.next(h);B.insertNodes(e,{text:``},{at:_,voids:r}),g=P.point(e,_)}a=g,s=!0}o=a.path.length-h.length+1,s=!0}var v=P.pointRef(e,a),y=a.path.length-o,[,b]=f,x=a.path.slice(0,y),S=o===0?a.offset:a.path[y]+0;for(var[C,w]of P.levels(e,{at:x,reverse:!0,voids:r})){var T=!1;if(w.length2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var r={};for(var i of t)r[i]=null;B.setNodes(e,r,n)},unwrapNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{mode:n=`lowest`,split:r=!1,voids:i=!1}=t,{at:a=e.selection,match:o}=t;if(a){o??=I.isPath(a)?Zd(e,a):t=>P.isBlock(e,t),I.isPath(a)&&(a=P.range(e,a));var s=R.isRange(a)?P.rangeRef(e,a):null,c=P.nodes(e,{at:a,match:o,mode:n,voids:i}),l=Array.from(c,t=>{var[,n]=t;return P.pathRef(e,n)}).reverse(),u=function(t){var n=t.unref(),[a]=P.node(e,n),o=P.range(e,n);r&&s&&(o=R.intersection(s.current,o)),B.liftNodes(e,{at:o,match:e=>N.isAncestor(a)&&a.children.includes(e),voids:i})};for(var d of l)u(d);s&&s.unref()}})},wrapNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{mode:r=`lowest`,split:i=!1,voids:a=!1}=n,{match:o,at:s=e.selection}=n;if(s){if(o??=I.isPath(s)?Zd(e,s):e.isInline(t)?t=>P.isInline(e,t)||z.isText(t):t=>P.isBlock(e,t),i&&R.isRange(s)){var[c,l]=R.edges(s),u=P.rangeRef(e,s,{affinity:`inward`});B.splitNodes(e,{at:l,match:o,voids:a}),B.splitNodes(e,{at:c,match:o,voids:a}),s=u.unref(),n.at??B.select(e,s)}var d=Array.from(P.nodes(e,{at:s,match:e.isInline(t)?t=>P.isBlock(e,t):e=>P.isEditor(e),mode:`lowest`,voids:a}));for(var[,f]of d){var p=R.isRange(s)?R.intersection(s,P.range(e,f)):s;if(p){var m=Array.from(P.nodes(e,{at:p,match:o,mode:r,voids:a}));if(m.length>0){var h=function(){var[n]=m,r=m[m.length-1],[,i]=n,[,o]=r;if(i.length===0&&o.length===0)return`continue`;var s=I.equals(i,o)?I.parent(i):I.common(i,o),c=P.range(e,i,o),l=P.node(e,s),[u]=l,d=s.length+1,f=I.next(o.slice(0,d)),p=qd(qd({},t),{},{children:[]});B.insertNodes(e,p,{at:f,voids:a}),B.moveNodes(e,{at:c,match:e=>N.isAncestor(u)&&u.children.includes(e),to:f.concat(0),voids:a})}();if(h===`continue`)continue}}}}})}},Yd=(e,t)=>{if(N.isElement(t)){var n=t;return!!P.isVoid(e,t)||n.children.length===1&&Yd(e,n.children[0])}return!P.isEditor(t)},Xd=(e,t)=>{if(R.isCollapsed(t))return t.anchor;var[,n]=R.edges(t),r=P.pointRef(e,n);return B.delete(e,{at:t}),r.unref()},Zd=(e,t)=>{var[n]=P.node(e,t);return e=>e===n};function Qd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $d(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},{edge:n=`anchor`}=t,{selection:r}=e;if(r){if(n===`anchor`)B.select(e,r.anchor);else if(n===`focus`)B.select(e,r.focus);else if(n===`start`){var[i]=R.edges(r);B.select(e,i)}else if(n===`end`){var[,a]=R.edges(r);B.select(e,a)}}},deselect(e){var{selection:t}=e;t&&e.apply({type:`set_selection`,properties:t,newProperties:null})},move(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e,{distance:r=1,unit:i=`character`,reverse:a=!1}=t,{edge:o=null}=t;if(n){o===`start`&&(o=R.isBackward(n)?`focus`:`anchor`),o===`end`&&(o=R.isBackward(n)?`anchor`:`focus`);var{anchor:s,focus:c}=n,l={distance:r,unit:i},u={};if(o==null||o===`anchor`){var d=a?P.before(e,s,l):P.after(e,s,l);d&&(u.anchor=d)}if(o==null||o===`focus`){var f=a?P.before(e,c,l):P.after(e,c,l);f&&(u.focus=f)}B.setSelection(e,u)}},select(e,t){var{selection:n}=e;if(t=P.range(e,t),n)B.setSelection(e,t);else{if(!R.isRange(t))throw Error(`When setting the selection and the current selection is \`null\` you must provide at least an \`anchor\` and \`focus\`, but you passed: ${JSON.stringify(t)}`);e.apply({type:`set_selection`,properties:n,newProperties:t})}},setPoint(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:r}=e,{edge:i=`both`}=n;if(r){i===`start`&&(i=R.isBackward(r)?`focus`:`anchor`),i===`end`&&(i=R.isBackward(r)?`anchor`:`focus`);var{anchor:a,focus:o}=r,s=i===`anchor`?a:o;B.setSelection(e,{[i===`anchor`?`anchor`:`focus`]:$d($d({},s),t)})}},setSelection(e,t){var{selection:n}=e,r={},i={};if(n){for(var a in t)(a===`anchor`&&t.anchor!=null&&!L.equals(t.anchor,n.anchor)||a===`focus`&&t.focus!=null&&!L.equals(t.focus,n.focus)||a!==`anchor`&&a!==`focus`&&t[a]!==n[a])&&(r[a]=n[a],i[a]=t[a]);Object.keys(r).length>0&&e.apply({type:`set_selection`,properties:r,newProperties:i})}}},tf={delete(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{reverse:n=!1,unit:r=`character`,distance:i=1,voids:a=!1}=t,{at:o=e.selection,hanging:s=!1}=t;if(o){if(R.isRange(o)&&R.isCollapsed(o)&&(o=o.anchor),L.isPoint(o)){var c=P.void(e,{at:o,mode:`highest`});if(!a&&c){var[,l]=c;o=l}else{var u={unit:r,distance:i};o={anchor:o,focus:n?P.before(e,o,u)||P.start(e,[]):P.after(e,o,u)||P.end(e,[])},s=!0}}if(I.isPath(o))B.removeNodes(e,{at:o,voids:a});else if(!R.isCollapsed(o)){if(!s){var[,d]=R.edges(o),f=P.end(e,[]);L.equals(d,f)||(o=P.unhangRange(e,o,{voids:a}))}var[p,m]=R.edges(o),h=P.above(e,{match:t=>P.isBlock(e,t),at:p,voids:a}),g=P.above(e,{match:t=>P.isBlock(e,t),at:m,voids:a}),_=h&&g&&!I.equals(h[1],g[1]),v=I.equals(p.path,m.path),y=a?null:P.void(e,{at:p,mode:`highest`}),b=a?null:P.void(e,{at:m,mode:`highest`});if(y){var x=P.before(e,p);x&&h&&I.isAncestor(h[1],x.path)&&(p=x)}if(b){var S=P.after(e,m);S&&g&&I.isAncestor(g[1],S.path)&&(m=S)}var C,w=[];for(var T of P.nodes(e,{at:o,voids:a})){var[ee,E]=T;C&&I.compare(E,C)===0||(!a&&P.isVoid(e,ee)||!I.isCommon(E,p.path)&&!I.isCommon(E,m.path))&&(w.push(T),C=E)}var te=Array.from(w,t=>{var[,n]=t;return P.pathRef(e,n)}),ne=P.pointRef(e,p),re=P.pointRef(e,m);if(!v&&!y){var ie=ne.current,[D]=P.leaf(e,ie),{path:ae}=ie,{offset:oe}=p,O=D.text.slice(oe);O.length>0&&e.apply({type:`remove_text`,path:ae,offset:oe,text:O})}for(var se of te){var ce=se.unref();B.removeNodes(e,{at:ce,voids:a})}if(!b){var le=re.current,[ue]=P.leaf(e,le),{path:de}=le,fe=v?p.offset:0,pe=ue.text.slice(fe,m.offset);pe.length>0&&e.apply({type:`remove_text`,path:de,offset:fe,text:pe})}!v&&_&&re.current&&ne.current&&B.mergeNodes(e,{at:re.current,hanging:!0,voids:a});var me=n?ne.unref()||re.unref():re.unref()||ne.unref();t.at==null&&me&&B.select(e,me)}}})},insertFragment(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1}=n,{at:a=e.selection}=n;if(t.length&&a){if(R.isRange(a))if(r||(a=P.unhangRange(e,a)),R.isCollapsed(a))a=a.anchor;else{var[,o]=R.edges(a);if(!i&&P.void(e,{at:o}))return;var s=P.pointRef(e,o);B.delete(e,{at:a}),a=s.unref()}else I.isPath(a)&&(a=P.start(e,a));if(i||!P.void(e,{at:a})){var c=P.above(e,{at:a,match:t=>P.isInline(e,t),mode:`highest`,voids:i});if(c){var[,l]=c;P.isEnd(e,a,l)?a=P.after(e,l):P.isStart(e,a,l)&&(a=P.before(e,l))}var u=P.above(e,{match:t=>P.isBlock(e,t),at:a,voids:i}),[,d]=u,f=P.isStart(e,a,d),p=P.isEnd(e,a,d),m=f&&p,h=!f||f&&p,g=!p,[,_]=F.first({children:t},[]),[,v]=F.last({children:t},[]),y=[],b=t=>{var[n,r]=t;return r.length!==0&&(!!m||!(h&&I.isAncestor(r,_)&&N.isElement(n)&&!e.isVoid(n)&&!e.isInline(n))&&!(g&&I.isAncestor(r,v)&&N.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)))};for(var x of F.nodes({children:t},{pass:b}))b(x)&&y.push(x);var S=[],C=[],w=[],T=!0,ee=!1;for(var[E]of y)N.isElement(E)&&!e.isInline(E)?(T=!1,ee=!0,C.push(E)):T?S.push(E):w.push(E);var[te]=P.nodes(e,{at:a,match:t=>z.isText(t)||P.isInline(e,t),mode:`highest`,voids:i}),[,ne]=te,re=P.isStart(e,a,ne),ie=P.isEnd(e,a,ne),D=P.pathRef(e,p?I.next(d):d),ae=P.pathRef(e,ie?I.next(ne):ne),oe=P.pathRef(e,d);B.splitNodes(e,{at:a,match:t=>ee?P.isBlock(e,t):z.isText(t)||P.isInline(e,t),mode:ee?`lowest`:`highest`,voids:i});var O=P.pathRef(e,!re||re&&ie?I.next(ne):ne);if(B.insertNodes(e,S,{at:O.current,match:t=>z.isText(t)||P.isInline(e,t),mode:`highest`,voids:i}),m&&C.length&&B.delete(e,{at:oe.unref(),voids:i}),B.insertNodes(e,C,{at:D.current,match:t=>P.isBlock(e,t),mode:`lowest`,voids:i}),B.insertNodes(e,w,{at:ae.current,match:t=>z.isText(t)||P.isInline(e,t),mode:`highest`,voids:i}),!n.at){var se;se=w.length>0?I.previous(ae.current):C.length>0?I.previous(D.current):I.previous(O.current);var ce=P.end(e,se);B.select(e,ce)}O.unref(),D.unref(),ae.unref()}}})},insertText(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:i=e.selection}=n;if(i){if(I.isPath(i)&&(i=P.range(e,i)),R.isRange(i))if(R.isCollapsed(i))i=i.anchor;else{var a=R.end(i);if(!r&&P.void(e,{at:a}))return;var o=P.pointRef(e,a);B.delete(e,{at:i,voids:r}),i=o.unref(),B.setSelection(e,{anchor:i,focus:i})}if(r||!P.void(e,{at:i})){var{path:s,offset:c}=i;t.length>0&&e.apply({type:`insert_text`,path:s,offset:c,text:t})}}})}};function nf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rf(e){for(var t=1;t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}(e.length)&&!Ff(e)}function Ff(e){var t=If(e)?Sf.call(e):``;return t==`[object Function]`||t==`[object GeneratorFunction]`}function If(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function Lf(e){return!!e&&typeof e==`object`}function Qne(e){return e?Fne(e,function(e){return Pf(e)?Jne(e):Xne(e)}(e)):[]}var Rf=function(e){if(!e)return[];if(Pf(e))return function(e){return typeof e==`string`||!Nf(e)&&Lf(e)&&Sf.call(e)==`[object String]`}(e)?Rne(e):function(e,t){var n=-1,r=e.length;for(t||=Array(r);++n0&&Bf(e[n],t[n])})}var Vf={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 Hf(){var e=typeof document<`u`?document:{};return Bf(e,Vf),e}var Uf={document:Vf,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(e){return typeof setTimeout>`u`?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){typeof setTimeout<`u`&&clearTimeout(e)}};function Wf(){var e=typeof window<`u`?window:{};return Bf(e,Uf),e}function Gf(e){return Gf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Gf(e)}function Kf(e,t){return Kf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Kf(e,t)}function qf(){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}}function Jf(e,t,n){return Jf=qf()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Kf(i,n.prototype),i},Jf.apply(null,arguments)}function Yf(e){var t=typeof Map==`function`?new Map:void 0;return Yf=function(e){if(e===null||!function(e){return Function.toString.call(e).indexOf(`[native code]`)!==-1}(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Jf(e,arguments,Gf(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Kf(n,e)},Yf(e)}var Xf=function(e){var t,n;function r(t){var n,r,i;return n=e.call.apply(e,[this].concat(t))||this,r=function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(n),i=r.__proto__,Object.defineProperty(r,`__proto__`,{get:function(){return i},set:function(e){i.__proto__=e}}),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Yf(Array));function Zf(e){e===void 0&&(e=[]);var t=[];return e.forEach(function(e){Array.isArray(e)?t.push.apply(t,Zf(e)):t.push(e)}),t}function Qf(e,t){return Array.prototype.filter.call(e,t)}function V(e,t){var n=Wf(),r=Hf(),i=[];if(!t&&e instanceof Xf)return e;if(!e)return new Xf(i);if(typeof e==`string`){var a=e.trim();if(a.indexOf(`<`)>=0&&a.indexOf(`>`)>=0){var o=`div`;a.indexOf(`0}).length>0}function np(e,t){if(arguments.length===1&&typeof e==`string`)return this[0]?this[0].getAttribute(e):void 0;for(var n=0;n=0&&(n[t=a.name.split(`data-`)[1],t.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})]=a.value)}for(var o in n)n[o]===`false`?n[o]=!1:n[o]===`true`?n[o]=!0:parseFloat(n[o])===1*n[o]&&(n[o]*=1);return n}}function ap(e){if(e===void 0){var t=this[0];if(!t)return;if(t.multiple&&t.nodeName.toLowerCase()===`select`){for(var n=[],r=0;r=0;else a.value=e}return this}function op(){for(var e=arguments.length,t=Array(e),n=0;n=0;--p){var m=f[p];a&&m.listener===a||a&&m.listener&&m.listener.dom7proxy&&m.listener.dom7proxy===a?(d.removeEventListener(l,m.proxyListener,o),f.splice(p,1)):a||(d.removeEventListener(l,m.proxyListener,o),f.splice(p,1))}}return this}function cp(){var e=Wf();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css(`width`)):null}function lp(){var e=Wf();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css(`height`)):null}function up(){if(this.length>0){var e=Wf(),t=Hf(),n=this[0],r=n.getBoundingClientRect(),i=t.body,a=n.clientTop||i.clientTop||0,o=n.clientLeft||i.clientLeft||0,s=n===e?e.scrollY:n.scrollTop,c=n===e?e.scrollX:n.scrollLeft;return{top:r.top+s-a,left:r.left+c-o}}return null}function dp(){for(var e=0;e=0;--n)this[t].insertBefore(i.childNodes[n],this[t].childNodes[0])}else if(e instanceof Xf)for(n=0;n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}(e)?Ip.call(e):``;return t==`[object Function]`||t==jp}(e)}function Jp(e){return qp(e)?zp(e):Wp(e)}function Yp(e){return e}var Xp=function(e,t){return(Kp(e)?Np:Hp)(e,typeof t==`function`?t:Yp)};let Zp=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=63&n[e];t+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?`_`:`-`}return t};var Qp=/^\s+|\s+$/g,$p=/^[-+]0x[0-9a-f]+$/i,em=/^0b[01]+$/i,tm=/^0o[0-7]+$/i,nm=parseInt,$ne=typeof bt==`object`&&bt&&bt.Object===Object&&bt,ere=typeof self==`object`&&self&&self.Object===Object&&self,tre=$ne||ere||Function(`return this`)(),nre=Object.prototype.toString,rre=Math.max,ire=Math.min,rm=function(){return tre.Date.now()};function are(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(`Expected a function`);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n)}function m(e){return l=e,s=setTimeout(g,t),u?p(e):o}function h(e){var n=e-c;return c===void 0||n>=t||n<0||d&&e-l>=a}function g(){var e=rm();if(h(e))return _(e);s=setTimeout(g,function(e){var n=t-(e-c);return d?ire(n,a-(e-l)):n}(e))}function _(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function v(){var e=rm(),n=h(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return s=setTimeout(g,t),p(c)}return s===void 0&&(s=setTimeout(g,t)),o}return t=am(t)||0,im(n)&&(u=!!n.leading,a=(d=`maxWait`in n)?rre(am(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f),v.cancel=function(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0},v.flush=function(){return s===void 0?o:_(rm())},v}function im(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function am(e){if(typeof e==`number`)return e;if(function(e){return typeof e==`symbol`||function(e){return!!e&&typeof e==`object`}(e)&&nre.call(e)==`[object Symbol]`}(e))return NaN;if(im(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=im(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(Qp,``);var n=em.test(e);return n||tm.test(e)?nm(e.slice(2),n?2:8):$p.test(e)?NaN:+e}var om=function(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(`Expected a function`);return im(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),are(e,t,{leading:r,maxWait:t,trailing:i})};const ore={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,n){return document.createElementNS(e,t,n)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return e.nodeType===1},isText:function(e){return e.nodeType===3},isComment:function(e){return e.nodeType===8}};function sm(e,t,n,r,i){return{sel:e,data:t,children:n,text:r,elm:i,key:t===void 0?void 0:t.key}}const cm=Array.isArray;function lm(e){return typeof e==`string`||typeof e==`number`||e instanceof String||e instanceof Number}function um(e){return e===void 0}function dm(e){return e!==void 0}const fm=sm(``,{},[],void 0,void 0);function pm(e,t){var n,r;let i=e.key===t.key,a=(n=e.data)?.is===(r=t.data)?.is;return e.sel===t.sel&&i&&a}function sre(e,t,n){var r;let i={};for(let a=t;a<=n;++a){let t=(r=e[a])?.key;t!==void 0&&(i[t]=a)}return i}const cre=[`create`,`update`,`remove`,`destroy`,`pre`,`post`];function lre(e,t){let n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},r=t===void 0?ore:t;for(let t of cre)for(let r of e){let e=r[t];e!==void 0&&n[t].push(e)}function i(e){let t=e.id?`#`+e.id:``,n=e.getAttribute(`class`),i=n?`.`+n.split(` `).join(`.`):``;return sm(r.tagName(e).toLowerCase()+t+i,{},[],void 0,e)}function a(e,t){return function(){if(--t==0){let t=r.parentNode(e);r.removeChild(t,e)}}}function o(e,t){var i,a;let s,c=e.data;if(c!==void 0){let t=(i=c.hook)?.init;dm(t)&&(t(e),c=e.data)}let l=e.children,u=e.sel;if(u===`!`)um(e.text)&&(e.text=``),e.elm=r.createComment(e.text);else if(u!==void 0){let i=u.indexOf(`#`),d=u.indexOf(`.`,i),f=i>0?i:u.length,p=d>0?d:u.length,m=i!==-1||d!==-1?u.slice(0,Math.min(f,p)):u,h=e.elm=dm(c)&&dm(s=c.ns)?r.createElementNS(s,m,c):r.createElement(m,c);for(f0&&h.setAttribute(`class`,u.slice(p+1).replace(/\./g,` `)),s=0;sh?(f=n[v+1]==null?null:n[v+1].elm,s(e,f,n,m,v,i)):l(e,t,p,h))}(h,g,_,i):dm(_)?(dm(e.text)&&r.setTextContent(h,``),s(h,null,_,0,_.length-1,i)):dm(g)?l(h,g,0,g.length-1):dm(e.text)&&r.setTextContent(h,``):e.text!==t.text&&(dm(g)&&l(h,g,0,g.length-1),r.setTextContent(h,t.text)),(p=m?.postpatch)==null||p.call(m,e,t)}}return function(e,t){let a,s,c,d=[];for(a=0;a=r?e:function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r1;p&&(f=f.slice(0,-1));var m=eh(f),h=Ym[m];if(f.length>1&&!h&&!Xm[f]&&!Zm[m])throw TypeError(`Unknown modifier: "`+f+`"`);a!==1&&h||(n?r.key=m:r.which=Ure(f)),h&&(r[h]=!p||null)}}catch(e){c=!0,l=e}finally{try{!s&&d.return&&d.return()}finally{if(c)throw l}}return r}(e,t)}),i=function(e){return r.some(function(t){return function(e,t){for(var n in e){var r=e[n],i=void 0;if(r!=null&&((i=n===`key`&&t.key!=null?t.key.toLowerCase():n===`which`?r===91&&t.which===93?91:t.which:t[n])!=null||!1!==r)&&i!==r)return!1}return!0}(t,e)})};return n==null?i:i(n)}function Ure(e){return e=eh(e),Zm[e]||e.toUpperCase().charCodeAt(0)}function eh(e){return e=e.toLowerCase(),e=Xm[e]||e}var Wre=$m,th=function(e,t){return $m(e,{byKey:!0},t)},Gre=/^\s+|\s+$/g,Kre=/^[-+]0x[0-9a-f]+$/i,qre=/^0b[01]+$/i,Jre=/^0o[0-7]+$/i,Yre=parseInt,Xre=typeof bt==`object`&&bt&&bt.Object===Object&&bt,Zre=typeof self==`object`&&self&&self.Object===Object&&self,Qre=Xre||Zre||Function(`return this`)(),$re=Object.prototype.toString,eie=Math.max,tie=Math.min,nh=function(){return Qre.Date.now()};function rh(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function ih(e){if(typeof e==`number`)return e;if(function(e){return typeof e==`symbol`||function(e){return!!e&&typeof e==`object`}(e)&&$re.call(e)==`[object Symbol]`}(e))return NaN;if(rh(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=rh(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(Gre,``);var n=qre.test(e);return n||Jre.test(e)?Yre(e.slice(2),n?2:8):Kre.test(e)?NaN:+e}var ah,oh=function(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(`Expected a function`);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n)}function m(e){return l=e,s=setTimeout(g,t),u?p(e):o}function h(e){var n=e-c;return c===void 0||n>=t||n<0||d&&e-l>=a}function g(){var e=nh();if(h(e))return _(e);s=setTimeout(g,function(e){var n=t-(e-c);return d?tie(n,a-(e-l)):n}(e))}function _(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function v(){var e=nh(),n=h(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return s=setTimeout(g,t),p(c)}return s===void 0&&(s=setTimeout(g,t)),o}return t=ih(t)||0,rh(n)&&(u=!!n.leading,a=(d=`maxWait`in n)?eie(ih(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f),v.cancel=function(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0},v.flush=function(){return s===void 0?o:_(nh())},v},sh=St(function(e,t){var n=`__lodash_hash_undefined__`,r=9007199254740991,i=`[object Arguments]`,a=`[object Boolean]`,o=`[object Date]`,s=`[object Function]`,c=`[object GeneratorFunction]`,l=`[object Map]`,u=`[object Number]`,d=`[object Object]`,f=`[object Promise]`,p=`[object RegExp]`,m=`[object Set]`,h=`[object String]`,g=`[object Symbol]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,ee=`[object Uint8ClampedArray]`,E=`[object Uint16Array]`,te=`[object Uint32Array]`,ne=/\w*$/,re=/^\[object .+?Constructor\]$/,ie=/^(?:0|[1-9]\d*)$/,D={};D[i]=D[`[object Array]`]=D[v]=D[y]=D[a]=D[o]=D[b]=D[x]=D[S]=D[C]=D[w]=D[l]=D[u]=D[d]=D[p]=D[m]=D[h]=D[g]=D[T]=D[ee]=D[E]=D[te]=!0,D[`[object Error]`]=D[s]=D[_]=!1;var ae=typeof bt==`object`&&bt&&bt.Object===Object&&bt,oe=typeof self==`object`&&self&&self.Object===Object&&self,O=ae||oe||Function(`return this`)(),se=t&&!t.nodeType&&t,ce=se&&e&&!e.nodeType&&e,le=ce&&ce.exports===se;function ue(e,t){return e.set(t[0],t[1]),e}function de(e,t){return e.add(t),e}function fe(e,t,n,r){var i=-1,a=e?e.length:0;for(r&&a&&(n=e[++i]);++i-1},Ye.prototype.set=function(e,t){var n=this.__data__,r=et(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Xe.prototype.clear=function(){this.__data__={hash:new Je,map:new(Ie||Ye),string:new Je}},Xe.prototype.delete=function(e){return at(this,e).delete(e)},Xe.prototype.get=function(e){return at(this,e).get(e)},Xe.prototype.has=function(e){return at(this,e).has(e)},Xe.prototype.set=function(e,t){return at(this,e).set(e,t),this},Ze.prototype.clear=function(){this.__data__=new Ye},Ze.prototype.delete=function(e){return this.__data__.delete(e)},Ze.prototype.get=function(e){return this.__data__.get(e)},Ze.prototype.has=function(e){return this.__data__.has(e)},Ze.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ye){var r=n.__data__;if(!Ie||r.length<199)return r.push([e,t]),this;n=this.__data__=new Xe(r)}return n.set(e,t),this};var st=Me?he(Me,Object):function(){return[]},ct=function(e){return Ce.call(e)};function lt(e,t){return!!(t??=r)&&(typeof e==`number`||ie.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=r}(e.length)&&!gt(e)}var ht=Ne||function(){return!1};function gt(e){var t=_t(e)?Ce.call(e):``;return t==s||t==c}function _t(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function vt(e){return mt(e)?Qe(e):function(e){if(!ut(e))return Pe(e);var t=[];for(var n in Object(e))Se.call(e,n)&&n!=`constructor`&&t.push(n);return t}(e)}e.exports=function(e){return tt(e,!0,!0)}});function ch(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError(`attempted to use private field on non-instance`);return e}var nie=0;function rie(e){return`__private_`+ nie+++`_`+e}function iie(e,t,n){let r=[];return e.forEach(e=>typeof e==`string`?t[Symbol.split](e).forEach((e,t,i)=>{e!==``&&r.push(e),te===1?0:1},Array.isArray(e)?e.forEach(ch(this,ah)[ah],this):ch(this,ah)[ah](e)}translate(e,t){return this.translateArray(e,t).join(``)}translateArray(e,t){if(!function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(this.locale.strings,e))throw Error(`missing string: ${e}`);let n=this.locale.strings[e];if(typeof n==`object`){if(t&&t.smart_count!==void 0)return lh(n[this.locale.pluralize(t.smart_count)],t);throw Error(`Attempted to use a string with plural forms, but no value was given for %{smart_count}`)}return lh(n,t)}});function aie(e){if(e==null||!e.strings)return;let t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}var dh=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,i,a,o,s){var c=function(e){for(var n=t[e]?t[e]:[],r=e.indexOf(`:`),i=r===-1?[e]:[e.substring(0,r),e.substring(r+1)],a=Object.keys(t),o=0,s=a.length;ocrypto.getRandomValues(new Uint8Array(e)),ph=(e,t,n)=>{let r=(2<{let a=``;for(;;){let o=n(i),s=i;for(;s--;)if(a+=e[o[s]&r]||``,a.length===t)return a}}};var cie={nanoid:(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=63&n[e];t+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?`_`:`-`}return t},customAlphabet:(e,t)=>ph(e,t,fh),customRandom:ph,urlAlphabet:sie,random:fh},mh=function(e){if(typeof e!=`number`||isNaN(e))throw TypeError(`Expected a number, got `+typeof e);var t=e<0,n=[`B`,`KB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`];if(t&&(e=-e),e<1)return(t?`-`:``)+e+` B`;var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/1024**r);var i=n[r];return e>=10||e%1==0?(t?`-`:``)+e.toFixed(0)+` `+i:(t?`-`:``)+e.toFixed(1)+` `+i};function hh(e,t){this.text=e||=``,this.hasWild=~e.indexOf(`*`),this.separator=t,this.parts=e.split(t)}hh.prototype.match=function(e){var t,n,r=!0,i=this.parts,a=i.length;if(typeof e==`string`||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||``).split(this.separator),t=0;r&&t=2}return t?n(t.split(`;`)[0]):n},die=0;function fie(e){return`__private_`+ die+++`_`+e}var gh=fie(`publish`),_h=class{constructor(){Object.defineProperty(this,gh,{value:pie}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){let t={...this.state},n={...this.state,...e};this.state=n,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError(`attempted to use private field on non-instance`);return e}(this,gh)[gh](t,n,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}};function pie(){for(var e=arguments.length,t=Array(e),n=0;n{e(...t)})}_h.VERSION=`2.0.3`;var vh=function(e){let t=e.lastIndexOf(`.`);return t===-1||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}},yh={md:`text/markdown`,markdown:`text/markdown`,mp4:`video/mp4`,mp3:`audio/mp3`,svg:`image/svg+xml`,jpg:`image/jpeg`,png:`image/png`,gif:`image/gif`,heic:`image/heic`,heif:`image/heif`,yaml:`text/yaml`,yml:`text/yaml`,csv:`text/csv`,tsv:`text/tab-separated-values`,tab:`text/tab-separated-values`,avi:`video/x-msvideo`,mks:`video/x-matroska`,mkv:`video/x-matroska`,mov:`video/quicktime`,doc:`application/msword`,docm:`application/vnd.ms-word.document.macroenabled.12`,docx:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,dot:`application/msword`,dotm:`application/vnd.ms-word.template.macroenabled.12`,dotx:`application/vnd.openxmlformats-officedocument.wordprocessingml.template`,xla:`application/vnd.ms-excel`,xlam:`application/vnd.ms-excel.addin.macroenabled.12`,xlc:`application/vnd.ms-excel`,xlf:`application/x-xliff+xml`,xlm:`application/vnd.ms-excel`,xls:`application/vnd.ms-excel`,xlsb:`application/vnd.ms-excel.sheet.binary.macroenabled.12`,xlsm:`application/vnd.ms-excel.sheet.macroenabled.12`,xlsx:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,xlt:`application/vnd.ms-excel`,xltm:`application/vnd.ms-excel.template.macroenabled.12`,xltx:`application/vnd.openxmlformats-officedocument.spreadsheetml.template`,xlw:`application/vnd.ms-excel`,txt:`text/plain`,text:`text/plain`,conf:`text/plain`,log:`text/plain`,pdf:`application/pdf`,zip:`application/zip`,"7z":`application/x-7z-compressed`,rar:`application/x-rar-compressed`,tar:`application/x-tar`,gz:`application/gzip`,dmg:`application/x-apple-diskimage`};function bh(e){let t=``;return e.replace(/[^A-Z0-9]/gi,e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,`/`))+t}var mie=function(e){if(e??=typeof navigator<`u`?navigator.userAgent:null,!e)return!0;let t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;let n=t[1],[r,i]=n.split(`.`);return r=parseInt(r,10),i=parseInt(i,10),r<15||r===15&&i<15063||r>18||r===18&&i>=18218};function xh(e){return e<10?`0${e}`:e.toString()}var Sh=function(){let e=new Date;return`${xh(e.getHours())}:${xh(e.getMinutes())}:${xh(e.getSeconds())}`},Ch={justErrorsLogger:{debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=Array(e),n=0;n`u`&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});var Ph=class extends AggregateError{constructor(){super(...arguments),this.isRestriction=!0}},Fh=kh(`plugins`),Ih=kh(`storeUnsubscribe`),Lh=kh(`emitter`),Rh=kh(`preProcessors`),zh=kh(`uploaders`),Bh=kh(`postProcessors`),Vh=kh(`checkRestrictions`),Hh=kh(`checkMinNumberOfFiles`),Uh=kh(`checkRequiredMetaFieldsOnFile`),Wh=kh(`checkRequiredMetaFields`),Gh=kh(`showOrLogErrorAndThrow`),Kh=kh(`assertNewUploadAllowed`),qh=kh(`checkAndCreateFileStateObject`),Jh=kh(`startIfAutoProceed`),Yh=kh(`addListeners`),Xh=kh(`updateOnlineStatus`),Zh=kh(`createUpload`),Qh=kh(`getUpload`),$h=kh(`removeUpload`),eg=kh(`runUpload`);Eh=Symbol.for(`uppy test: getPlugins`),Dh=Symbol.for(`uppy test: createUpload`);var tg=class{constructor(e){Object.defineProperty(this,eg,{value:mg}),Object.defineProperty(this,$h,{value:pg}),Object.defineProperty(this,Qh,{value:fg}),Object.defineProperty(this,Zh,{value:dg}),Object.defineProperty(this,Yh,{value:ug}),Object.defineProperty(this,Jh,{value:lg}),Object.defineProperty(this,qh,{value:cg}),Object.defineProperty(this,Kh,{value:sg}),Object.defineProperty(this,Gh,{value:og}),Object.defineProperty(this,Wh,{value:ag}),Object.defineProperty(this,Uh,{value:ig}),Object.defineProperty(this,Hh,{value:rg}),Object.defineProperty(this,Vh,{value:ng}),Object.defineProperty(this,Fh,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,Ih,{writable:!0,value:void 0}),Object.defineProperty(this,Lh,{writable:!0,value:dh()}),Object.defineProperty(this,Rh,{writable:!0,value:new Set}),Object.defineProperty(this,zh,{writable:!0,value:new Set}),Object.defineProperty(this,Bh,{writable:!0,value:new Set}),Object.defineProperty(this,Xh,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=wh;let t={id:`uppy`,autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:{maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]},meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:new _h,logger:jh,infoTimeout:5e3};if(this.opts={...t,...e,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.",`warning`):e&&e.debug&&(this.opts.logger=Mh),this.log(`Using Core v${this.constructor.VERSION}`),this.opts.restrictions.allowedFileTypes&&this.opts.restrictions.allowedFileTypes!==null&&!Array.isArray(this.opts.restrictions.allowedFileTypes))throw TypeError("`restrictions.allowedFileTypes` must be an array");this.i18nInit(),this.calculateProgress=om(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:mie(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),U(this,Ih)[Ih]=this.store.subscribe((e,t,n)=>{this.emit(`state-update`,e,t,n),this.updateAll(t)}),this.opts.debug&&typeof window<`u`&&(window[this.opts.id]=this),U(this,Yh)[Yh]()}emit(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){let e=new uh([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(e=>{e.setOptions()}),this.setState()}resetProgress(){let e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach(r=>{let i={...t[r]};i.progress={...i.progress,...e},n[r]=i}),this.setState({files:n,totalProgress:0}),this.emit(`reset-progress`)}addPreProcessor(e){U(this,Rh)[Rh].add(e)}removePreProcessor(e){return U(this,Rh)[Rh].delete(e)}addPostProcessor(e){U(this,Bh)[Bh].add(e)}removePostProcessor(e){return U(this,Bh)[Bh].delete(e)}addUploader(e){U(this,zh)[zh].add(e)}removeUploader(e){return U(this,zh)[zh].delete(e)}setMeta(e){let t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach(t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}}),this.log(`Adding metadata:`),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){let n={...this.getState().files};if(!n[e])return void this.log(`Was trying to set metadata for a file that has been removed: `,e);let r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){let{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){let{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),i=r.filter(e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted}),a=r.filter(e=>!e.progress.uploadStarted),o=r.filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess),s=r.filter(e=>e.progress.uploadStarted),c=r.filter(e=>e.isPaused),l=r.filter(e=>e.progress.uploadComplete),u=r.filter(e=>e.error),d=i.filter(e=>!e.isPaused),f=r.filter(e=>e.progress.preprocess||e.progress.postprocess);return{newFiles:a,startedFiles:o,uploadStartedFiles:s,pausedFiles:c,completeFiles:l,erroredFiles:u,inProgressFiles:i,inProgressNotPausedFiles:d,processingFiles:f,isUploadStarted:s.length>0,isAllComplete:t===100&&l.length===r.length&&f.length===0,isAllErrored:!!n&&u.length===r.length,isAllPaused:i.length!==0&&c.length===i.length,isUploadInProgress:i.length>0,isSomeGhost:r.some(e=>e.isGhost)}}validateRestrictions(e,t){try{return U(this,Vh)[Vh](e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){let{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){U(this,Kh)[Kh](e);let{files:t}=this.getState(),n=U(this,qh)[qh](t,e);return t[n.id]&&t[n.id].isGhost&&(n={...t[n.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...t,[n.id]:n}}),this.emit(`file-added`,n),this.emit(`files-added`,[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),U(this,Jh)[Jh](),n.id}addFiles(e){U(this,Kh)[Kh]();let t={...this.getState().files},n=[],r=[];for(let i=0;i{this.emit(`file-added`,e)}),this.emit(`files-added`,n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach(e=>{this.log(`Added file: ${n[e].name}\n id: ${n[e].id}\n type: ${n[e].type}`)}),n.length>0&&U(this,Jh)[Jh](),r.length>0){let e=`Multiple errors occurred while adding files: +`;if(r.forEach(t=>{e+=`\n * ${t.message}`}),this.info({message:this.i18n(`addBulkFilesFailed`,{smart_count:r.length}),details:e},`error`,this.opts.infoTimeout),typeof AggregateError==`function`)throw AggregateError(r,e);{let t=Error(e);throw t.errors=r,t}}}removeFiles(e,t){let{files:n,currentUploads:r}=this.getState(),i={...n},a={...r},o=Object.create(null);function s(e){return o[e]===void 0}e.forEach(e=>{n[e]&&(o[e]=n[e],delete i[e])}),Object.keys(a).forEach(e=>{let t=r[e].fileIDs.filter(s);t.length===0?delete a[e]:a[e]={...r[e],fileIDs:t}});let c={currentUploads:a,files:i};Object.keys(i).length===0&&(c.allowNewUpload=!0,c.error=null,c.recoveredState=null),this.setState(c),this.calculateTotalProgress();let l=Object.keys(o);l.forEach(e=>{this.emit(`file-removed`,o[e],t)}),l.length>5?this.log(`Removed ${l.length} files`):this.log(`Removed files: ${l.join(`, `)}`)}removeFile(e,t){t===void 0&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;let t=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:t}),this.emit(`upload-pause`,e,t),t}pauseAll(){let e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{let n={...e[t],isPaused:!0};e[t]=n}),this.setState({files:e}),this.emit(`pause-all`)}resumeAll(){let e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{let n={...e[t],isPaused:!1,error:null};e[t]=n}),this.setState({files:e}),this.emit(`resume-all`)}retryAll(){let e={...this.getState().files},t=Object.keys(e).filter(t=>e[t].error);if(t.forEach(t=>{let n={...e[t],isPaused:!1,error:null};e[t]=n}),this.setState({files:e,error:null}),this.emit(`retry-all`,t),t.length===0)return Promise.resolve({successful:[],failed:[]});let n=U(this,Zh)[Zh](t,{forceAllowNewUpload:!0});return U(this,eg)[eg](n)}cancelAll(){this.emit(`cancel-all`);let{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,`cancel-all`),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit(`upload-retry`,e);let t=U(this,Zh)[Zh]([e],{forceAllowNewUpload:!0});return U(this,eg)[eg](t)}reset(){this.cancelAll()}logout(){this.iteratePlugins(e=>{e.provider&&e.provider.logout&&e.provider.logout()})}calculateProgress(e,t){if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);let n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){let e=this.getFiles().filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess);if(e.length===0)return this.emit(`progress`,0),void this.setState({totalProgress:0});let t=e.filter(e=>e.progress.bytesTotal!=null),n=e.filter(e=>e.progress.bytesTotal==null);if(t.length===0){let t=100*e.length,r=n.reduce((e,t)=>e+t.progress.percentage,0),i=Math.round(r/t*100);return void this.setState({totalProgress:i})}let r=t.reduce((e,t)=>e+t.progress.bytesTotal,0),i=r/t.length;r+=i*n.length;let a=0;t.forEach(e=>{a+=e.progress.bytesUploaded}),n.forEach(e=>{a+=i*(e.progress.percentage||0)/100});let o=r===0?0:Math.round(a/r*100);o>100&&(o=100),this.setState({totalProgress:o}),this.emit(`progress`,o)}updateOnlineStatus(){window.navigator.onLine===void 0||window.navigator.onLine?(this.emit(`is-online`),this.wasOffline&&(this.emit(`back-online`),this.info(this.i18n(`connectedToInternet`),`success`,3e3),this.wasOffline=!1)):(this.emit(`is-offline`),this.info(this.i18n(`noInternetConnection`),`error`,0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if(typeof e!=`function`)throw TypeError(`Expected a plugin class, but got ${e===null?`null`:typeof e}. Please verify that the plugin was imported and spelled correctly.`);let n=new e(this,t),r=n.id;if(!r)throw Error(`Your plugin must have an id`);if(!n.type)throw Error(`Your plugin must have a type`);let i=this.getPlugin(r);if(i){let e=`Already found a plugin named '${i.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in U(this,Fh)[Fh]?U(this,Fh)[Fh][n.type].push(n):U(this,Fh)[Fh][n.type]=[n],n.install(),this}getPlugin(e){for(let t of Object.values(U(this,Fh)[Fh])){let n=t.find(t=>t.id===e);if(n!=null)return n}}[Eh](e){return U(this,Fh)[Fh][e]}iteratePlugins(e){Object.values(U(this,Fh)[Fh]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit(`plugin-remove`,e),e.uninstall&&e.uninstall();let t=U(this,Fh)[Fh][e.type],n=t.findIndex(t=>t.id===e.id);n!==-1&&t.splice(n,1);let r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.reset(),U(this,Ih)[Ih](),this.iteratePlugins(e=>{this.removePlugin(e)}),typeof window<`u`&&window.removeEventListener&&(window.removeEventListener(`online`,U(this,Xh)[Xh]),window.removeEventListener(`offline`,U(this,Xh)[Xh]))}hideInfo(){let{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit(`info-hidden`)}info(e,t,n){t===void 0&&(t=`info`),n===void 0&&(n=3e3);let r=typeof e==`object`;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit(`info-visible`)}log(e,t){let{logger:n}=this.opts;switch(t){case`error`:n.error(e);break;case`warning`:n.warn(e);break;default:n.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?U(this,eg)[eg](e):(U(this,$h)[$h](e),Promise.reject(Error(`Nonexistent upload`)))}[Dh](){return U(this,Zh)[Zh](...arguments)}addResultData(e,t){if(!U(this,Qh)[Qh](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);let{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;(e=U(this,Fh)[Fh].uploader)!=null&&e.length||this.log(`No uploader type plugins are used`,`warning`);let{files:t}=this.getState(),n=this.opts.onBeforeUpload(t);return!1===n?Promise.reject(Error(`Not starting the upload because onBeforeUpload returned false`)):(n&&typeof n==`object`&&(t=n,this.setState({files:t})),Promise.resolve().then(()=>{U(this,Hh)[Hh](t),U(this,Wh)[Wh](t)}).catch(e=>{U(this,Gh)[Gh](e)}).then(()=>{let{currentUploads:e}=this.getState(),n=Object.values(e).flatMap(e=>e.fileIDs),r=[];Object.keys(t).forEach(e=>{let t=this.getFile(e);t.progress.uploadStarted||n.indexOf(e)!==-1||r.push(t.id)});let i=U(this,Zh)[Zh](r);return U(this,eg)[eg](i)}).catch(e=>{U(this,Gh)[Gh](e,{showInformer:!1})}))}};function ng(e,t){t===void 0&&(t=this.getFiles());let{maxFileSize:n,minFileSize:r,maxTotalFileSize:i,maxNumberOfFiles:a,allowedFileTypes:o}=this.opts.restrictions;if(a&&t.length+1>a)throw new Nh(`${this.i18n(`youCanOnlyUploadX`,{smart_count:a})}`);if(o&&!o.some(t=>t.indexOf(`/`)>-1?!!e.type&&uie(e.type.replace(/;.*?$/,``),t):!(t[0]!==`.`||!e.extension)&&e.extension.toLowerCase()===t.substr(1).toLowerCase())){let e=o.join(`, `);throw new Nh(this.i18n(`youCanOnlyUploadFileTypes`,{types:e}))}if(i&&e.size!=null){let n=0;if(n+=e.size,t.forEach(e=>{n+=e.size}),n>i)throw new Nh(this.i18n(`exceedsSize`,{size:mh(i),file:e.name}))}if(n&&e.size!=null&&e.size>n)throw new Nh(this.i18n(`exceedsSize`,{size:mh(n),file:e.name}));if(r&&e.size!=null&&e.size{let t=this.getFile(e);return U(this,Uh)[Uh](t)});if(t.length)throw new Ph(t,`${this.i18n(`missingRequiredMetaField`)}`)}function og(e,t){let{showInformer:n=!0,file:r=null,throwErr:i=!0}=t===void 0?{}:t,a=typeof e==`object`?e.message:e,o=typeof e==`object`&&e.details?e.details:``,s=a;if(o&&(s+=` ${o}`),e.isRestriction?(this.log(s),this.emit(`restriction-failed`,r,e)):this.log(s,`error`),n&&this.info({message:a,details:o},`error`,this.opts.infoTimeout),i)throw typeof e==`object`?e:Error(e)}function sg(e){let{allowNewUpload:t}=this.getState();!1===t&&U(this,Gh)[Gh](new Nh(this.i18n(`noMoreFilesAllowed`)),{file:e})}function cg(e,t){let n=function(e){var t;if(e.type)return e.type;let n=e.name?(t=vh(e.name).extension)?.toLowerCase():null;return n&&n in yh?yh[n]:`application/octet-stream`}(t),r=function(e,t){return t.name?t.name:e.split(`/`)[0]===`image`?`${e.split(`/`)[0]}.${e.split(`/`)[1]}`:`noname`}(n,t),i=vh(r).extension,a=!!t.isRemote,o=function(e){let t=`uppy`;return typeof e.name==`string`&&(t+=`-${bh(e.name.toLowerCase())}`),e.type!==void 0&&(t+=`-${e.type}`),e.meta&&typeof e.meta.relativePath==`string`&&(t+=`-${bh(e.meta.relativePath.toLowerCase())}`),e.data.size!==void 0&&(t+=`-${e.data.size}`),e.data.lastModified!==void 0&&(t+=`-${e.data.lastModified}`),t}({...t,type:n});if(this.checkIfFileAlreadyExists(o)){let e=new Nh(this.i18n(`noDuplicates`,{fileName:r}));U(this,Gh)[Gh](e,{file:t})}let s=t.meta||{};s.name=r,s.type=n;let c=Number.isFinite(t.data.size)?t.data.size:null,l={source:t.source||``,id:o,name:r,extension:i||``,meta:{...this.getState().meta,...s},type:n,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isRemote:a,remote:t.remote||``,preview:t.preview},u=this.opts.onBeforeFileAdded(l,e);!1===u?U(this,Gh)[Gh](new Nh(`Cannot add the file because onBeforeFileAdded returned false.`),{showInformer:!1,fileDescriptor:t}):typeof u==`object`&&u&&(l=u);try{let t=Object.keys(e).map(t=>e[t]);U(this,Vh)[Vh](l,t)}catch(e){U(this,Gh)[Gh](e,{file:l})}return l}function lg(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function ug(){let e=(e,t,n)=>{let r=e.message||`Unknown error`;e.details&&(r+=` ${e.details}`),this.setState({error:r}),t!=null&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on(`error`,e),this.on(`upload-error`,(t,n,r)=>{if(e(n,t,r),typeof n==`object`&&n.message){let e=Error(n.message);e.details=n.message,n.details&&(e.details+=` ${n.details}`),e.message=this.i18n(`failedToUpload`,{file:t.name}),U(this,Gh)[Gh](e,{throwErr:!1})}else U(this,Gh)[Gh](n,{throwErr:!1})}),this.on(`upload`,()=>{this.setState({error:null})}),this.on(`upload-started`,e=>{this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${e.id}`)}),this.on(`upload-progress`,this.calculateProgress),this.on(`upload-success`,(e,t)=>{if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);let n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:U(this,Bh)[Bh].size>0?{mode:`indeterminate`}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),e.size??this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()}),this.on(`preprocess-progress`,(e,t)=>{this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${e.id}`)}),this.on(`preprocess-complete`,e=>{if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);let t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})}),this.on(`postprocess-progress`,(e,t)=>{this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${e.id}`)}),this.on(`postprocess-complete`,e=>{if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);let t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})}),this.on(`restored`,()=>{this.calculateTotalProgress()}),this.on(`dashboard:file-edit-complete`,e=>{e&&U(this,Uh)[Uh](e)}),typeof window<`u`&&window.addEventListener&&(window.addEventListener(`online`,U(this,Xh)[Xh]),window.addEventListener(`offline`,U(this,Xh)[Xh]),setTimeout(U(this,Xh)[Xh],3e3))}function dg(e,t){t===void 0&&(t={});let{forceAllowNewUpload:n=!1}=t,{allowNewUpload:r,currentUploads:i}=this.getState();if(!r&&!n)throw Error(`Cannot create a new upload: already uploading.`);let a=Ah();return this.emit(`upload`,{id:a,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...i,[a]:{fileIDs:e,step:0,result:{}}}}),a}function fg(e){let{currentUploads:t}=this.getState();return t[e]}function pg(e){let t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function mg(e){let{currentUploads:t}=this.getState(),n=t[e],r=n.step||0,i=[...U(this,Rh)[Rh],...U(this,zh)[zh],...U(this,Bh)[Bh]];try{for(let a=r;a{let t=this.getFile(e);t&&t.progress.postprocess&&this.emit(`postprocess-complete`,t)});let r=n.fileIDs.map(e=>this.getFile(e)),i=r.filter(e=>!e.error),a=r.filter(e=>e.error);await this.addResultData(e,{successful:i,failed:a,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let a;return n&&(a=n.result,this.emit(`complete`,a),U(this,$h)[$h](e)),a??this.log(`Not setting result for an upload that has been removed: ${e}`),a}tg.VERSION=`2.1.3`;var hg=tg,gg=St(function(e,t){var n,r,i,a,o,s,c,l,u={},d=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(e,t){for(var n in t)e[n]=t[n];return e}function m(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,r){var i,a,o,s={};for(o in t)o==`key`?i=t[o]:o==`ref`?a=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?n.call(arguments,2):r),typeof e==`function`&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return g(e,s,i,a,null)}function g(e,t,n,a,o){var s={type:e,props:t,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++i};return o==null&&r.vnode!=null&&r.vnode(s),s}function _(e){return e.children}function v(e,t){this.props=e,this.context=t}function y(e,t){if(t==null)return e.__?y(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?g(h.type,h.props,h.key,null,h.__v):h)!=null){if(h.__=n,h.__b=n.__b+1,(m=S[f])===null||m&&h.key==m.key&&h.type===m.type)S[f]=void 0;else for(p=0;p2&&(s.children=arguments.length>3?n.call(arguments,2):r),g(e.type,s,i||e.key,a||e.ref,null)},t.createContext=function(e,t){var n={__c:t=`__cC`+ l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(x)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},t.createElement=h,t.createRef=function(){return{current:null}},t.h=h,t.hydrate=function e(t,n){se(t,n,e)},t.isValidElement=a,t.options=r,t.render=se,t.toChildArray=function e(t,n){return n||=[],t==null||typeof t==`boolean`||(Array.isArray(t)?t.some(function(t){e(t,n)}):n.push(t)),n}}),_g=function(e,t){return t===void 0&&(t=document),typeof e==`string`?t.querySelector(e):(n=e)?.nodeType===Node.ELEMENT_NODE?e:null;var n},vg=class{constructor(e,t){t===void 0&&(t={}),this.uppy=e,this.opts=t}getPluginState(){let{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){let{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){let e=new uh([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState()}addTarget(){throw Error(`Extend the addTarget method to add your plugin to another plugin's target`)}install(){}uninstall(){}render(){throw Error(`Extend the render method to add your plugin to a DOM element`)}update(){}afterUpdate(){}};function yg(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError(`attempted to use private field on non-instance`);return e}var bg=0;function xg(e){return`__private_`+ bg+++`_`+e}const{render:Sg}=gg;var Cg=xg(`updateUI`),wg=class e extends vg{constructor(){super(...arguments),Object.defineProperty(this,Cg,{writable:!0,value:void 0})}mount(t,n){let r=n.id,i=_g(t);if(i){this.isTargetDOMEl=!0;let e=document.createDocumentFragment();return yg(this,Cg)[Cg]=function(e){let t=null,n=null;return function(){for(var r=arguments.length,i=Array(r),a=0;a(t=null,e(...n))),t}}(t=>{this.uppy.getPlugin(this.id)&&(Sg(this.render(t),e),this.afterUpdate())}),this.uppy.log(`Installing ${r} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(i.innerHTML=``),Sg(this.render(this.uppy.getState()),e),this.el=e.firstElementChild,i.appendChild(e),this.onMount(),this.el}let a;if(typeof t==`object`&&t instanceof e)a=t;else if(typeof t==`function`){let e=t;this.uppy.iteratePlugins(t=>{if(t instanceof e)return a=t,!1})}if(a)return this.uppy.log(`Installing ${r} to ${a.id}`),this.parent=a,this.el=a.addTarget(n),this.onMount(),this.el;this.uppy.log(`Not installing ${r}`);let o=`Invalid target option given to ${r}.`;throw o+=typeof t==`function`?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the `},ix=function(e){e.write(rx(``)),e.close();var t=e.parentWindow.Object;return e=null,t},ax=function(){try{$b=new ActiveXObject(`htmlfile`)}catch{}var e,t;ax=typeof document<`u`?document.domain&&$b?ix($b):((t=Gv(`iframe`)).style.display=`none`,ex.appendChild(t),t.src=`javascript:`,(e=t.contentWindow.document).open(),e.write(rx(`document.F=Object`)),e.close(),e.F):ix($b);for(var n=Rb.length;n--;)delete ax.prototype[Rb[n]];return ax()};wy[tx]=!0;var ox=Object.create||function(e,t){var n;return e===null?n=ax():(nx.prototype=Yv(e),n=new nx,nx.prototype=null,n[tx]=e),t===void 0?n:Iie(n,t)},sx=Rv(`unscopables`),cx=Array.prototype;cx[sx]??fy.f(cx,sx,{configurable:!0,value:ox(null)});var lx=function(e){cx[sx][e]=!0},Lie=Fb.includes;Ub({target:`Array`,proto:!0},{includes:function(e){return Lie(this,e,arguments.length>1?arguments[1]:void 0)}}),lx(`includes`);var Rie=Rv(`match`),ux=function(e){var t;return Hv(e)&&((t=e[Rie])===void 0?By(e)==`RegExp`:!!t)},zie=W.TypeError,dx=function(e){if(ux(e))throw zie(`The method doesn't accept regular expressions`);return e},Bie=Rv(`match`),fx=function(e){var t=/./;try{`/./`[e](t)}catch{try{return t[Bie]=!1,`/./`[e](t)}catch{}}return!1},Vie=G(``.indexOf);Ub({target:`String`,proto:!0,forced:!fx(`includes`)},{includes:function(e){return!!~Vie(Yb(pv(this)),Yb(dx(e)),arguments.length>1?arguments[1]:void 0)}});var Hie=/"/g,Uie=G(``.replace);Ub({target:`String`,proto:!0,forced:jv(function(){var e=``.anchor(`"`);return e!==e.toLowerCase()||e.split(`"`).length>3})},{anchor:function(e){return t=e,n=Yb(pv(this)),r=``+n+``;var t,n,r}});var px=function(e,t,n){var r,i;Yv(e);try{if(!(r=ay(e,`return`))){if(t===`throw`)throw n;return n}r=Zv(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return Yv(r),n},Wie=function(e,t,n,r){try{return r?t(Yv(n)[0],n[1]):t(n)}catch(t){px(e,`throw`,t)}},mx={},Gie=Rv(`iterator`),Kie=Array.prototype,hx=function(e){return e!==void 0&&(mx.Array===e||Kie[Gie]===e)},gx=function(e,t,n){var r=ly(t);r in e?fy.f(e,r,py(0,n)):e[r]=n},qie=Rv(`iterator`),_x=function(e){if(e!=null)return ay(e,qie)||ay(e,`@@iterator`)||mx[Wy(e)]},Jie=W.TypeError,vx=function(e,t){var n=arguments.length<2?_x(e):t;if(iy(n))return Yv(Zv(n,e));throw Jie(ny(e)+` is not iterable`)},yx=W.Array,bx=Rv(`iterator`),xx=!1;try{var Yie=0,Sx={next:function(){return{done:!!Yie++}},return:function(){xx=!0}};Sx[bx]=function(){return this},Array.from(Sx,function(){throw 2})}catch{}var Cx=function(e,t){if(!t&&!xx)return!1;var n=!1;try{var r={};r[bx]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},Xie=!Cx(function(e){Array.from(e)});Ub({target:`Array`,stat:!0,forced:Xie},{from:function(e){var t=hv(e),n=hb(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Zy(i,r>2?arguments[2]:void 0));var o,s,c,l,u,d,f=_x(t),p=0;if(!f||this==yx&&hx(f))for(o=ob(t),s=n?new this(o):yx(o);o>p;p++)d=a?i(t[p],p):t[p],gx(s,p,d);else for(u=(l=vx(t,f)).next,s=n?new this:[];!(c=Zv(u,l)).done;p++)d=a?Wie(l,i,[c.value,p],!0):c.value,gx(s,p,d);return s.length=p,s}});var wx,Tx,Ex,Zie=G(``.charAt),Dx=G(``.charCodeAt),Qie=G(``.slice),Ox=function(e){return function(t,n){var r,i,a=Yb(pv(t)),o=rb(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=Dx(a,o))<55296||r>56319||o+1===s||(i=Dx(a,o+1))<56320||i>57343?e?Zie(a,o):r:e?Qie(a,o,o+2):i-56320+(r-55296<<10)+65536}},kx={codeAt:Ox(!1),charAt:Ox(!0)},$ie=!jv(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Ax=Cy(`IE_PROTO`),jx=W.Object,eae=jx.prototype,Mx=$ie?jx.getPrototypeOf:function(e){var t=hv(e);if(_v(t,Ax))return t[Ax];var n=t.constructor;return Sv(n)&&t instanceof n?n.prototype:t instanceof jx?eae:null},Nx=Rv(`iterator`),Px=!1;[].keys&&(`next`in(Ex=[].keys())?(Tx=Mx(Mx(Ex)))!==Object.prototype&&(wx=Tx):Px=!0);var tae=wx==null||jv(function(){var e={};return wx[Nx].call(e)!==e});tae&&(wx={}),Sv(wx[Nx])||Ly(wx,Nx,function(){return this});var Fx={IteratorPrototype:wx,BUGGY_SAFARI_ITERATORS:Px},nae=fy.f,Ix=Rv(`toStringTag`),Lx=function(e,t,n){e&&!_v(e=n?e:e.prototype,Ix)&&nae(e,Ix,{configurable:!0,value:t})},rae=Fx.IteratorPrototype,iae=function(){return this},aae=W.String,oae=W.TypeError,Rx=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=G(Object.getOwnPropertyDescriptor(Object.prototype,`__proto__`).set))(n,[]),t=n instanceof Array}catch{}return function(n,r){return Yv(n),function(e){if(typeof e==`object`||Sv(e))return e;throw oae(`Can't set `+aae(e)+` as a prototype`)}(r),t?e(n,r):n.__proto__=r,n}}():void 0),sae=Iy.PROPER,cae=Iy.CONFIGURABLE,zx=Fx.IteratorPrototype,Bx=Fx.BUGGY_SAFARI_ITERATORS,Vx=Rv(`iterator`),lae=function(){return this},Hx=function(e,t,n,r,i,a,o){(function(e,t,n,r){var i=t+` Iterator`;e.prototype=ox(rae,{next:py(1,n)}),Lx(e,i,!1),mx[i]=iae})(n,t,r);var s,c,l,u=function(e){if(e===i&&h)return h;if(!Bx&&e in p)return p[e];switch(e){case`keys`:case`values`:case`entries`:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+` Iterator`,f=!1,p=e.prototype,m=p[Vx]||p[`@@iterator`]||i&&p[i],h=!Bx&&m||u(i),g=t==`Array`&&p.entries||m;if(g&&(s=Mx(g.call(new e)))!==Object.prototype&&s.next&&(Mx(s)!==zx&&(Rx?Rx(s,zx):Sv(s[Vx])||Ly(s,Vx,lae)),Lx(s,d,!0)),sae&&i==`values`&&m&&m.name!==`values`&&(cae?my(p,`name`,`values`):(f=!0,h=function(){return Zv(m,this)})),i)if(c={values:u(`values`),keys:a?h:u(`keys`),entries:u(`entries`)},o)for(l in c)(Bx||f||!(l in p))&&Ly(p,l,c[l]);else Ub({target:t,proto:!0,forced:Bx||f},c);return p[Vx]!==h&&Ly(p,Vx,h,{name:i}),mx[t]=h,c},uae=kx.charAt,dae=My.set,fae=My.getterFor(`String Iterator`);Hx(String,`String`,function(e){dae(this,{type:`String Iterator`,string:Yb(e),index:0})},function(){var e,t=fae(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=uae(n,r),t.index+=e.length,{value:e,done:!1})});var Ux,pae=Mb.f,Wx=G(``.endsWith),mae=G(``.slice),hae=Math.min,Gx=fx(`endsWith`),gae=!(Gx||(Ux=pae(String.prototype,`endsWith`),!Ux||Ux.writable));Ub({target:`String`,proto:!0,forced:!gae&&!Gx},{endsWith:function(e){var t=Yb(pv(this));dx(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,i=n===void 0?r:hae(ab(n),r),a=Yb(e);return Wx?Wx(t,a,i):mae(t,i-a.length,i)===a}});var _ae=G([].join),vae=eb!=Object,yae=Sb(`join`,`,`);Ub({target:`Array`,proto:!0,forced:vae||!yae},{join:function(e){return _ae(Ab(this),e===void 0?`,`:e)}});var bae=Rv(`species`),Kx=function(e){return Av>=51||!jv(function(){var t=[];return(t.constructor={})[bae]=function(){return{foo:1}},t[e](Boolean).foo!==1})},xae=xb.map,Sae=Kx(`map`);Ub({target:`Array`,proto:!0,forced:!Sae},{map:function(e){return xae(this,e,arguments.length>1?arguments[1]:void 0)}});var qx=W.RegExp,Jx=jv(function(){var e=qx(`a`,`y`);return e.lastIndex=2,e.exec(`abcd`)!=null}),Cae=Jx||jv(function(){return!qx(`a`,`y`).sticky}),Yx={BROKEN_CARET:Jx||jv(function(){var e=qx(`^r`,`gy`);return e.lastIndex=2,e.exec(`str`)!=null}),MISSED_STICKY:Cae,UNSUPPORTED_Y:Jx},wae=W.RegExp,Xx=jv(function(){var e=wae(`.`,`s`);return!(e.dotAll&&e.exec(` +`)&&e.flags===`s`)}),Tae=W.RegExp,Zx=jv(function(){var e=Tae(`(?b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$c`)!==`bc`}),Eae=My.get,Dae=sv(`native-string-replace`,String.prototype.replace),Qx=RegExp.prototype.exec,$x=Qx,Oae=G(``.charAt),kae=G(``.indexOf),Aae=G(``.replace),eS=G(``.slice),tS=function(){var e=/a/,t=/b*/g;return Zv(Qx,e,`a`),Zv(Qx,t,`a`),e.lastIndex!==0||t.lastIndex!==0}(),nS=Yx.BROKEN_CARET,rS=/()??/.exec(``)[1]!==void 0;(tS||rS||nS||Xx||Zx)&&($x=function(e){var t,n,r,i,a,o,s,c=this,l=Eae(c),u=Yb(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=Zv($x,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=nS&&c.sticky,m=Zv(Xb,c),h=c.source,g=0,_=u;if(p&&(m=Aae(m,`y`,``),kae(m,`g`)===-1&&(m+=`g`),_=eS(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&Oae(u,c.lastIndex-1)!==` +`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),rS&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),tS&&(r=c.lastIndex),i=Zv(Qx,p?n:c,_),p?i?(i.input=eS(i.input,g),i[0]=eS(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:tS&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),rS&&i&&i.length>1&&Zv(Dae,i[0],n,function(){for(a=1;a]*>)/g,Lae=/\$([$&'`]|\d{1,2})/g,Rae=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,c=Lae;return i!==void 0&&(i=hv(i),c=Iae),Fae(a,c,function(a,c){var l;switch(fS(c,0)){case`$`:return`$`;case`&`:return e;case"`":return pS(t,0,n);case`'`:return pS(t,o);case`<`:l=i[pS(c,1,-1)];break;default:var u=+c;if(u===0)return a;if(u>s){var d=Pae(u/10);return d===0?a:d<=s?r[d-1]===void 0?fS(c,1):r[d-1]+fS(c,1):a}l=r[u-1]}return l===void 0?``:l})},zae=W.TypeError,mS=function(e,t){var n=e.exec;if(Sv(n)){var r=Zv(n,e,t);return r!==null&&Yv(r),r}if(By(e)===`RegExp`)return Zv(iS,e,t);throw zae(`RegExp#exec called on incompatible receiver`)},hS=Rv(`replace`),Bae=Math.max,Vae=Math.min,Hae=G([].concat),gS=G([].push),_S=G(``.indexOf),vS=G(``.slice),Uae=`a`.replace(/./,`$0`)===`$0`,yS=!!/./[hS]&&/./[hS](`a`,`$0`)===``;uS(`replace`,function(e,t,n){var r=yS?`$`:`$0`;return[function(e,n){var r=pv(this),i=e==null?void 0:ay(e,hS);return i?Zv(i,e,r,n):Zv(t,Yb(r),e,n)},function(e,i){var a=Yv(this),o=Yb(e);if(typeof i==`string`&&_S(i,r)===-1&&_S(i,`$<`)===-1){var s=n(t,a,o,i);if(s.done)return s.value}var c=Sv(i);c||(i=Yb(i));var l=a.global;if(l){var u=a.unicode;a.lastIndex=0}for(var d=[];;){var f=mS(a,o);if(f===null||(gS(d,f),!l))break;Yb(f[0])===``&&(a.lastIndex=dS(o,ab(a.lastIndex),u))}for(var p,m=``,h=0,g=0;g=h&&(m+=vS(o,h,v)+C,h=v+_.length)}return m+vS(o,h)}]},!!jv(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:`7`},e},``.replace(e,`$`)!==`7`})||!Uae||yS); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +var bS=function(e,t){return bS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},bS(e,t)};function xS(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);function n(){this.constructor=e}bS(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var SS=function(){return SS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function wS(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function TS(e,t){for(var n=0,r=t.length,i=e.length;n=t.length?(e.target=void 0,{value:void 0,done:!0}):n==`keys`?{value:r,done:!1}:n==`values`?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},`values`);mx.Arguments=mx.Array,lx(`keys`),lx(`values`),lx(`entries`);var OS=function(e,t,n){for(var r in t)Ly(e,r,t[r],n);return e},qae=W.Array,Jae=Math.max,kS=function(e,t,n){for(var r=ob(e),i=Nb(t,r),a=Nb(n===void 0?r:n,r),o=qae(Jae(a-i,0)),s=0;ia;a++)if((s=g(e[a]))&&Qv(LS,s))return s;return new IS(!1)}r=vx(e,i)}for(c=r.next;!(l=Zv(c,r)).done;){try{s=g(l.value)}catch(e){px(r,`throw`,e)}if(typeof s==`object`&&s&&Qv(LS,s))return s}return new IS(!1)},Qae=W.TypeError,zS=function(e,t){if(Qv(t,e))return e;throw Qae(`Incorrect invocation`)},BS=function(e,t,n){var r,i;return Rx&&Sv(r=t.constructor)&&r!==n&&Hv(i=r.prototype)&&i!==n.prototype&&Rx(e,i),e},VS=function(e,t,n){var r=e.indexOf(`Map`)!==-1,i=e.indexOf(`Weak`)!==-1,a=r?`set`:`add`,o=W[e],s=o&&o.prototype,c=o,l={},u=function(e){var t=G(s[e]);Ly(s,e,e==`add`?function(e){return t(this,e===0?0:e),this}:e==`delete`?function(e){return!(i&&!Hv(e))&&t(this,e===0?0:e)}:e==`get`?function(e){return i&&!Hv(e)?void 0:t(this,e===0?0:e)}:e==`has`?function(e){return!(i&&!Hv(e))&&t(this,e===0?0:e)}:function(e,n){return t(this,e===0?0:e,n),this})};if(Hb(e,!Sv(o)||!(i||s.forEach&&!jv(function(){new o().entries().next()}))))c=n.getConstructor(t,e,r,a),FS.enable();else if(Hb(e,!0)){var d=new c,f=d[a](i?{}:-0,1)!=d,p=jv(function(){d.has(1)}),m=Cx(function(e){new o(e)}),h=!i&&jv(function(){for(var e=new o,t=5;t--;)e[a](t,t);return!e.has(-0)});m||((c=t(function(e,t){zS(e,s);var n=BS(new o,e,c);return t!=null&&RS(t,n[a],{that:n,AS_ENTRIES:r}),n})).prototype=s,s.constructor=c),(p||h)&&(u(`delete`),u(`has`),r&&u(`get`)),(h||f)&&u(a),i&&s.clear&&delete s.clear}return l[e]=c,Ub({global:!0,forced:c!=o},l),Lx(c,e),i||n.setStrong(c,e,r),c},HS=FS.getWeakData,$ae=My.set,eoe=My.getterFor,toe=xb.find,noe=xb.findIndex,roe=G([].splice),ioe=0,US=function(e){return e.frozen||=new WS},WS=function(){this.entries=[]},GS=function(e,t){return toe(e.entries,function(e){return e[0]===t})};WS.prototype={get:function(e){var t=GS(this,e);if(t)return t[1]},has:function(e){return!!GS(this,e)},set:function(e,t){var n=GS(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=noe(this.entries,function(t){return t[0]===e});return~t&&roe(this.entries,t,1),!!~t}};var KS,qS={getConstructor:function(e,t,n,r){var i=e(function(e,i){zS(e,a),$ae(e,{type:t,id:ioe++,frozen:void 0}),i!=null&&RS(i,e[r],{that:e,AS_ENTRIES:n})}),a=i.prototype,o=eoe(t),s=function(e,t,n){var r=o(e),i=HS(Yv(t),!0);return!0===i?US(r).set(t,n):i[r.id]=n,e};return OS(a,{delete:function(e){var t=o(this);if(!Hv(e))return!1;var n=HS(e);return!0===n?US(t).delete(e):n&&_v(n,t.id)&&delete n[t.id]},has:function(e){var t=o(this);if(!Hv(e))return!1;var n=HS(e);return!0===n?US(t).has(e):n&&_v(n,t.id)}}),OS(a,n?{get:function(e){var t=o(this);if(Hv(e)){var n=HS(e);return!0===n?US(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},JS=My.enforce,aoe=!W.ActiveXObject&&`ActiveXObject`in W,YS=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},ooe=VS(`WeakMap`,YS,qS);if(xy&&aoe){KS=qS.getConstructor(YS,`WeakMap`,!0),FS.enable();var XS=ooe.prototype,ZS=G(XS.delete),QS=G(XS.has),$S=G(XS.get),eC=G(XS.set);OS(XS,{delete:function(e){if(Hv(e)&&!PS(e)){var t=JS(this);return t.frozen||=new KS,ZS(this,e)||t.frozen.delete(e)}return ZS(this,e)},has:function(e){if(Hv(e)&&!PS(e)){var t=JS(this);return t.frozen||=new KS,QS(this,e)||t.frozen.has(e)}return QS(this,e)},get:function(e){if(Hv(e)&&!PS(e)){var t=JS(this);return t.frozen||=new KS,QS(this,e)?$S(this,e):t.frozen.get(e)}return $S(this,e)},set:function(e,t){if(Hv(e)&&!PS(e)){var n=JS(this);n.frozen||=new KS,QS(this,e)?eC(this,e,t):n.frozen.set(e,t)}else eC(this,e,t);return this}})}var tC=Rv(`iterator`),nC=Rv(`toStringTag`),rC=DS.values,iC=function(e,t){if(e){if(e[tC]!==rC)try{my(e,tC,rC)}catch{e[tC]=rC}if(e[nC]||my(e,nC,t),Ky[t]){for(var n in DS)if(e[n]!==DS[n])try{my(e,n,DS[n])}catch{e[n]=DS[n]}}}};for(var aC in Ky)iC(W[aC]&&W[aC].prototype,aC);iC(Yy,`DOMTokenList`);var oC=new WeakMap,sC=new WeakMap,cC=new WeakMap,lC=new WeakMap,uC=new WeakMap,dC=new WeakMap,fC=new WeakMap,pC=new WeakMap,mC=new WeakMap,hC=new WeakMap,gC=new WeakMap,_C=new WeakMap,vC=new WeakMap,yC=new WeakMap,bC=new WeakMap,xC=new WeakMap,SC=new WeakMap,CC=new WeakMap,wC=new WeakMap,TC=new WeakMap,EC=new WeakMap,DC=new WeakMap,OC=new WeakMap,kC=new WeakMap,AC=new WeakMap,soe=xb.find,jC=!0;`find`in[]&&[,].find(function(){jC=!1}),Ub({target:`Array`,proto:!0,forced:jC},{find:function(e){return soe(this,e,arguments.length>1?arguments[1]:void 0)}}),lx(`find`),Ub({global:!0},{globalThis:W});const coe=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`isindex`,`keygen`,`link`,`menuitem`,`meta`,`nextid`,`param`,`source`,`track`,`wbr`];pp&&(V.fn.css=pp),yp&&(V.fn.append=yp),$f&&(V.fn.addClass=$f),ep&&(V.fn.removeClass=ep),tp&&(V.fn.hasClass=tp),op&&(V.fn.on=op),Ap&&(V.fn.focus=Ap),np&&(V.fn.attr=np),rp&&(V.fn.removeAttr=rp),dp&&(V.fn.hide=dp),fp&&(V.fn.show=fp),up&&(V.fn.offset=up),cp&&(V.fn.width=cp),lp&&(V.fn.height=lp),xp&&(V.fn.parent=xp),Sp&&(V.fn.parents=Sp),vp&&(V.fn.is=vp),ip&&(V.fn.dataset=ip),ap&&(V.fn.val=ap),_p&&(V.fn.text=_p),gp&&(V.fn.html=gp),wp&&(V.fn.children=wp),Tp&&(V.fn.remove=Tp),Cp&&(V.fn.find=Cp),mp&&(V.fn.each=mp),Ep&&(V.fn.empty=Ep);var MC,NC,PC=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},FC=function(e){return IC(e)&&e.nodeType===1},IC=function(e){var t=PC(e);return!!t&&e instanceof t.Node},LC=function(e){var t=e&&e.anchorNode&&PC(e.anchorNode);return!!t&&e instanceof t.Selection},RC=function(e){return IC(e)&&e.nodeType===3},zC=function(e){var t,n,r;return(t=window.document.getElementById(e))??((r=(n=window.document.activeElement)?.shadowRoot)?.getElementById(e)||null)},BC=function(e,t,n){for(var r,i=e.childNodes,a=i[t],o=t,s=!1,c=!1;(IC(r=a)&&r.nodeType===8||FC(a)&&a.childNodes.length===0||FC(a)&&a.getAttribute(`contenteditable`)===`false`)&&(!s||!c);)o>=i.length?(s=!0,o=t-1,n=`backward`):o<0?(c=!0,o=t+1,n=`forward`):(a=i[o],t=o,o+=n===`forward`?1:-1);return[a,t]},loe=function(e,t,n){return wS(BC(e,t,n),1)[0]},uoe=function e(t){var n,r,i=``;if(RC(t)&&t.nodeValue)return t.nodeValue;if(FC(t)){try{for(var a=CS(Array.from(t.childNodes)),o=a.next();!o.done;o=a.next())i+=e(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var s=getComputedStyle(t).getPropertyValue(`display`);s!==`block`&&s!==`list`&&s!==`table-row`&&t.tagName!==`BR`||(i+=` +`)}return i};function VC(e,t){if(!(e instanceof HTMLElement&&e.dataset.slateVoid===`true`))for(var n=e.childNodes,r=n.length;r--;){var i=n[r],a=i.nodeType;a==3?t(i,e):a!=1&&a!=9&&a!=11||VC(i,t)}}function HC(e){if(e.length===0)return``;var t=e[0];return t.nodeType===MC.ELEMENT_NODE?t.tagName.toLowerCase():``}(NC=MC||={})[NC.ELEMENT_NODE=1]=`ELEMENT_NODE`,NC[NC.TEXT_NODE=3]=`TEXT_NODE`,NC[NC.CDATA_SECTION_NODE=4]=`CDATA_SECTION_NODE`,NC[NC.PROCESSING_INSTRUCTION_NODE=7]=`PROCESSING_INSTRUCTION_NODE`,NC[NC.COMMENT_NODE=8]=`COMMENT_NODE`,NC[NC.DOCUMENT_NODE=9]=`DOCUMENT_NODE`,NC[NC.DOCUMENT_TYPE_NODE=10]=`DOCUMENT_TYPE_NODE`,NC[NC.DOCUMENT_FRAGMENT_NODE=11]=`DOCUMENT_FRAGMENT_NODE`,globalThis.navigator!==void 0&&globalThis.window!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&globalThis.window.MSStream;var UC=typeof navigator<`u`&&/Mac OS X/.test(navigator.userAgent),WC=typeof navigator<`u`&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);typeof navigator<`u`&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent);var GC=typeof navigator<`u`&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),doe=typeof navigator<`u`&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),foe=typeof navigator<`u`&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),KC=typeof navigator<`u`&&/Chrome/i.test(navigator.userAgent);typeof navigator<`u`&&/.*QQBrowser/.test(navigator.userAgent);var qC=!foe&&!doe&&typeof globalThis<`u`&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges==`function`,K={getWindow:function(e){var t=EC.get(e);if(!t)throw Error(`Unable to find a host window element for this editor`);return t},findKey:function(e,t){var n=TC.get(t);return n||(n=new ES,TC.set(t,n)),n},setNewKey:function(e){var t=new ES;TC.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var i=bC.get(r);if(i==null){if(P.isEditor(r))return n;break}var a=yC.get(r);if(a==null)break;n.unshift(a),r=i}throw Error(`Unable to find the path for Slate node: `+JSON.stringify(t))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=K.toDOMNode(e,e),n=t.getRootNode();return(n instanceof Document||n instanceof ShadowRoot)&&n.getSelection!=null?n:t.ownerDocument},getParentNode:function(e,t){return bC.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&r!=null;){var i=K.getParentNode(e,r);if(i==null)break;n.push(i),r=i}return n},getTopNode:function(e,t){var n=[K.findPath(e,t)[0]];return F.get(e,n)},toDOMNode:function(e,t){var n;if(P.isEditor(t))n=xC.get(e);else{var r=K.findKey(e,t);n=CC.get(r)}if(!n)throw Error(`Cannot resolve a DOM node from Slate node: `+JSON.stringify(t));return n},hasDOMNode:function(e,t,n){n===void 0&&(n={});var r,i=n.editable,a=i!==void 0&&i,o=K.toDOMNode(e,e);try{r=FC(t)?t:t.parentElement}catch(e){if(!e.message.includes(`Permission denied to access property "nodeType"`))throw e}return!!r&&r.closest(`[data-slate-editor]`)===o&&(!a||r.isContentEditable||!!r.getAttribute(`data-slate-zero-width`))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,i=R.isBackward(t),a=K.toDOMPoint(e,n),o=R.isCollapsed(t)?a:K.toDOMPoint(e,r),s=K.getWindow(e).document.createRange(),c=wS(i?o:a,2),l=c[0],u=c[1],d=wS(i?a:o,2),f=d[0],p=d[1],m=!!(FC(l)?l:l.parentElement).getAttribute(`data-slate-zero-width`),h=!!(FC(f)?f:f.parentElement).getAttribute(`data-slate-zero-width`);return s.setStart(l,m?1:u),s.setEnd(f,h?1:p),s},toDOMPoint:function(e,t){var n,r,i,a=wS(P.node(e,t.path),1)[0],o=K.toDOMNode(e,a);P.void(e,{at:t})&&(t={path:t.path,offset:0});var s=Array.from(o.querySelectorAll(`[data-slate-string], [data-slate-zero-width]`)),c=0;try{for(var l=CS(s),u=l.next();!u.done;u=l.next()){var d=u.value,f=d.childNodes[0];if(f!=null&&f.textContent!=null){var p=f.textContent.length,m=d.getAttribute(`data-slate-length`),h=c+(m==null?p:parseInt(m,10));if(t.offset<=h){i=[f,Math.min(p,Math.max(0,t.offset-c))];break}c=h}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(!i)throw Error(`Cannot resolve a DOM point from Slate point: `+JSON.stringify(t));return i},toSlateNode:function(e,t){var n=FC(t)?t:t.parentElement;n&&!n.hasAttribute(`data-slate-node`)&&(n=n.closest(`[data-slate-node]`));var r=n?SC.get(n):null;if(!r)throw Error(`Cannot resolve a Slate node from DOM node: `+n);return r},findEventRange:function(e,t){`nativeEvent`in t&&(t=t.nativeEvent);var n=t.clientX,r=t.clientY,i=t.target;if(n==null||r==null)throw Error(`Cannot resolve a Slate range from a DOM event: `+t);var a,o=K.toSlateNode(e,t.target),s=K.findPath(e,o);if(P.isVoid(e,o)){var c=i.getBoundingClientRect(),l=e.isInline(o)?n-c.left0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(t==null||R.isExpanded(t))return!1;var n=K.getSelectedNodeByType(e,`paragraph`);if(n===null)return!1;var r=n.children;return r.length===1&&(r[0].text===``||void 0)},isEmptyPath:function(e,t){var n=P.node(e,t);if(n==null)return!1;var r=wS(n,1)[0].children;return r.length===1&&r[0].text===``}},poe=1,JC={},YC={},moe=xb.filter,hoe=Kx(`filter`);Ub({target:`Array`,proto:!0,forced:!hoe},{filter:function(e){return moe(this,e,arguments.length>1?arguments[1]:void 0)}});var XC=` +\v\f\r \xA0               \u2028\u2029`,ZC=G(``.replace),QC=`[`+XC+`]`,goe=RegExp(`^`+QC+QC+`*`),_oe=RegExp(QC+QC+`*$`),$C=function(e){return function(t){var n=Yb(pv(t));return 1&e&&(n=ZC(n,goe,``)),2&e&&(n=ZC(n,_oe,``)),n}},voe={start:$C(1),end:$C(2),trim:$C(3)},yoe=Iy.PROPER,boe=voe.trim;Ub({target:`String`,proto:!0,forced:function(e){return jv(function(){return!!XC[e]()||`​…᠎`[e]()!==`​…᠎`||yoe&&XC[e].name!==e})}(`trim`)},{trim:function(){return boe(this)}});var ew=[],tw={};function xoe(e,t,n){var r=n.isInline(e)?`span`:`div`;return`<`+r+`>`+t+``}var nw,rw,iw,aw,ow=W.Promise,sw=Rv(`species`),cw=function(e){var t=wv(e),n=fy.f;Vv&&t&&!t[sw]&&n(t,sw,{configurable:!0,get:function(){return this}})},Soe=W.TypeError,Coe=Rv(`species`),lw=function(e,t){var n,r=Yv(e).constructor;return r===void 0||(n=Yv(r)[Coe])==null?t:function(e){if(hb(e))return e;throw Soe(ny(e)+` is not a constructor`)}(n)},uw=G([].slice),dw=/(?:ipad|iphone|ipod).*applewebkit/i.test(Tv),fw=By(W.process)==`process`,pw=W.setImmediate,mw=W.clearImmediate,woe=W.process,hw=W.Dispatch,Toe=W.Function,gw=W.MessageChannel,Eoe=W.String,_w=0,vw={};try{nw=W.location}catch{}var yw=function(e){if(_v(vw,e)){var t=vw[e];delete vw[e],t()}},bw=function(e){return function(){yw(e)}},xw=function(e){yw(e.data)},Sw=function(e){W.postMessage(Eoe(e),nw.protocol+`//`+nw.host)};pw&&mw||(pw=function(e){var t=uw(arguments,1);return vw[++_w]=function(){cS(Sv(e)?e:Toe(e),void 0,t)},rw(_w),_w},mw=function(e){delete vw[e]},fw?rw=function(e){woe.nextTick(bw(e))}:hw&&hw.now?rw=function(e){hw.now(bw(e))}:gw&&!dw?(aw=(iw=new gw).port2,iw.port1.onmessage=xw,rw=Zy(aw.postMessage,aw)):W.addEventListener&&Sv(W.postMessage)&&!W.importScripts&&nw&&nw.protocol!==`file:`&&!jv(Sw)?(rw=Sw,W.addEventListener(`message`,xw,!1)):rw=`onreadystatechange`in Gv(`script`)?function(e){ex.appendChild(Gv(`script`)).onreadystatechange=function(){ex.removeChild(this),yw(e)}}:function(e){setTimeout(bw(e),0)});var Cw,ww,Tw,Ew,Dw,Ow,kw,Aw,jw={set:pw,clear:mw},Doe=/ipad|iphone|ipod/i.test(Tv)&&W.Pebble!==void 0,Ooe=/web0s(?!.*chrome)/i.test(Tv),koe=Mb.f,Mw=jw.set,Nw=W.MutationObserver||W.WebKitMutationObserver,Pw=W.document,Fw=W.process,Iw=W.Promise,Lw=koe(W,`queueMicrotask`),Rw=Lw&&Lw.value;Rw||(Cw=function(){var e,t;for(fw&&(e=Fw.domain)&&e.exit();ww;){t=ww.fn,ww=ww.next;try{t()}catch(e){throw ww?Ew():Tw=void 0,e}}Tw=void 0,e&&e.enter()},dw||fw||Ooe||!Nw||!Pw?!Doe&&Iw&&Iw.resolve?((kw=Iw.resolve(void 0)).constructor=Iw,Aw=Zy(kw.then,kw),Ew=function(){Aw(Cw)}):fw?Ew=function(){Fw.nextTick(Cw)}:(Mw=Zy(Mw,W),Ew=function(){Mw(Cw)}):(Dw=!0,Ow=Pw.createTextNode(``),new Nw(Cw).observe(Ow,{characterData:!0}),Ew=function(){Ow.data=Dw=!Dw}));var zw,Bw,Vw,Hw,Uw=Rw||function(e){var t={fn:e,next:void 0};Tw&&(Tw.next=t),ww||(ww=t,Ew()),Tw=t},Aoe=function(e){var t,n;this.promise=new e(function(e,r){if(t!==void 0||n!==void 0)throw TypeError(`Bad Promise constructor`);t=e,n=r}),this.resolve=iy(t),this.reject=iy(n)},Ww={f:function(e){return new Aoe(e)}},Gw=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},joe=typeof window==`object`,Kw=jw.set,Moe=Rv(`species`),qw=`Promise`,Jw=My.getterFor(qw),Noe=My.set,Poe=My.getterFor(qw),Yw=ow&&ow.prototype,Xw=ow,Zw=Yw,Qw=W.TypeError,$w=W.document,eT=W.process,tT=Ww.f,nT=tT,Foe=!!($w&&$w.createEvent&&W.dispatchEvent),rT=Sv(W.PromiseRejectionEvent),iT=!1,aT=Hb(qw,function(){var e=yy(Xw),t=e!==String(Xw);if(!t&&Av===66)return!0;if(Av>=51&&/native code/.test(e))return!1;var n=new Xw(function(e){e(1)}),r=function(e){e(function(){},function(){})};return(n.constructor={})[Moe]=r,!(iT=n.then(function(){})instanceof r)||!t&&joe&&!rT}),oT=aT||!Cx(function(e){Xw.all(e).catch(function(){})}),sT=function(e){var t;return!(!Hv(e)||!Sv(t=e.then))&&t},cT=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;Uw(function(){for(var r=e.value,i=e.state==1,a=0;n.length>a;){var o,s,c,l=n[a++],u=i?l.ok:l.fail,d=l.resolve,f=l.reject,p=l.domain;try{u?(i||(e.rejection===2&&fT(e),e.rejection=1),!0===u?o=r:(p&&p.enter(),o=u(r),p&&(p.exit(),c=!0)),o===l.promise?f(Qw(`Promise-chain cycle`)):(s=sT(o))?Zv(s,o,d,f):d(o)):f(r)}catch(e){p&&!c&&p.exit(),f(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&uT(e)})}},lT=function(e,t,n){var r,i;Foe?((r=$w.createEvent(`Event`)).promise=t,r.reason=n,r.initEvent(e,!1,!0),W.dispatchEvent(r)):r={promise:t,reason:n},!rT&&(i=W[`on`+e])?i(r):e===`unhandledrejection`&&function(e,t){var n=W.console;n&&n.error&&(arguments.length==1?n.error(e):n.error(e,t))}(`Unhandled promise rejection`,n)},uT=function(e){Zv(Kw,W,function(){var t,n=e.facade,r=e.value;if(dT(e)&&(t=Gw(function(){fw?eT.emit(`unhandledRejection`,r,n):lT(`unhandledrejection`,n,r)}),e.rejection=fw||dT(e)?2:1,t.error))throw t.value})},dT=function(e){return e.rejection!==1&&!e.parent},fT=function(e){Zv(Kw,W,function(){var t=e.facade;fw?eT.emit(`rejectionHandled`,t):lT(`rejectionhandled`,t,e.value)})},pT=function(e,t,n){return function(r){e(t,r,n)}},mT=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,cT(e,!0))},hT=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Qw(`Promise can't be resolved itself`);var r=sT(t);r?Uw(function(){var n={done:!1};try{Zv(r,t,pT(hT,n,e),pT(mT,n,e))}catch(t){mT(n,t,e)}}):(e.value=t,e.state=1,cT(e,!1))}catch(t){mT({done:!1},t,e)}}};if(aT&&(Zw=(Xw=function(e){zS(this,Zw),iy(e),Zv(zw,this);var t=Jw(this);try{e(pT(hT,t),pT(mT,t))}catch(e){mT(t,e)}}).prototype,(zw=function(e){Noe(this,{type:qw,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=OS(Zw,{then:function(e,t){var n=Poe(this),r=n.reactions,i=tT(lw(this,Xw));return i.ok=!Sv(e)||e,i.fail=Sv(t)&&t,i.domain=fw?eT.domain:void 0,n.parent=!0,r[r.length]=i,n.state!=0&&cT(n,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),Bw=function(){var e=new zw,t=Jw(e);this.promise=e,this.resolve=pT(hT,t),this.reject=pT(mT,t)},Ww.f=tT=function(e){return e===Xw||e===Vw?new Bw(e):nT(e)},Sv(ow)&&Yw!==Object.prototype)){Hw=Yw.then,iT||(Ly(Yw,`then`,function(e,t){var n=this;return new Xw(function(e,t){Zv(Hw,n,e,t)}).then(e,t)},{unsafe:!0}),Ly(Yw,`catch`,Zw.catch,{unsafe:!0}));try{delete Yw.constructor}catch{}Rx&&Rx(Yw,Zw)}Ub({global:!0,wrap:!0,forced:aT},{Promise:Xw}),Lx(Xw,qw,!1),cw(qw),Vw=wv(qw),Ub({target:qw,stat:!0,forced:aT},{reject:function(e){var t=tT(this);return Zv(t.reject,void 0,e),t.promise}}),Ub({target:qw,stat:!0,forced:aT},{resolve:function(e){return function(e,t){if(Yv(e),Hv(t)&&t.constructor===e)return t;var n=Ww.f(e);return(0,n.resolve)(t),n.promise}(this,e)}}),Ub({target:qw,stat:!0,forced:oT},{all:function(e){var t=this,n=tT(t),r=n.resolve,i=n.reject,a=Gw(function(){var n=iy(t.resolve),a=[],o=0,s=1;RS(e,function(e){var c=o++,l=!1;s++,Zv(n,t,e).then(function(e){l||(l=!0,a[c]=e,--s||r(a))},i)}),--s||r(a)});return a.error&&i(a.value),n.promise},race:function(e){var t=this,n=tT(t),r=n.reject,i=Gw(function(){var i=iy(t.resolve);RS(e,function(e){Zv(i,t,e).then(n.resolve,r)})});return i.error&&r(i.value),n.promise}});var gT=Yx.UNSUPPORTED_Y,Ioe=Math.min,_T=[].push,Loe=G(/./.exec),vT=G(_T),yT=G(``.slice);function bT(e){Promise.resolve().then(e)}function xT(e,t){return N.isElement(e)?function(e,t){var n=e.type,r=n===void 0?``:n,i=e.children,a=i===void 0?[]:i,o=P.isVoid(t,e),s=``;o||(s=a.map(function(e){return xT(e,t)}).join(``));var c=function(e){return tw[e]||xoe}(r),l=c(e,s,t),u=``;if(u=typeof l==`string`?l:l.html||``,o||ew.forEach(function(t){return u=t(e,u)}),typeof l==`string`)return u;var d=l.prefix,f=d===void 0?``:d,p=l.suffix,m=p===void 0?``:p;return f&&(u=f+u),m&&(u+=m),u}(e,t):function(e,t){var n=e.text;if(n==null)throw Error(`Current node is not slate Text `+JSON.stringify(e));var r=n;r=function(e){return e.replace(/ {2}/g,`  `).replace(//g,`>`).replace(/®/g,`®`).replace(/©/g,`©`).replace(/™/g,`™`)}(r);var i=K.getParentsNodes(t,e).some(function(e){return K.getNodeType(e)===`pre`});if(i||(r=r.replace(/\r\n|\r|\n/g,`
`)),i&&(r=r.replace(/ /g,` `)),r===``){var a=K.getParentNode(null,e);if(!a||a.children.length!==0)return r;r=`
`}return ew.forEach(function(t){return r=t(e,r)}),r}(e,t)}function ST(e){return`w-e-element-`+e}uS(`split`,function(e,t,n){var r;return r=`abbc`.split(/(b)*/)[1]==`c`||`test`.split(/(?:)/,-1).length!=4||`ab`.split(/(?:ab)*/).length!=2||`.`.split(/(.?)(.?)/).length!=4||`.`.split(/()()/).length>1||``.split(/.?/).length?function(e,n){var r=Yb(pv(this)),i=n===void 0?4294967295:n>>>0;if(i===0)return[];if(e===void 0)return[r];if(!ux(e))return Zv(t,r,e,i);for(var a,o,s,c=[],l=(e.ignoreCase?`i`:``)+(e.multiline?`m`:``)+(e.unicode?`u`:``)+(e.sticky?`y`:``),u=0,d=new RegExp(e.source,l+`g`);(a=Zv(iS,d,r))&&!((o=d.lastIndex)>u&&(vT(c,yT(r,u,a.index)),a.length>1&&a.index=i));)d.lastIndex===a.index&&d.lastIndex++;return u===r.length?!s&&Loe(d,``)||vT(c,``):vT(c,yT(r,u)),c.length>i?kS(c,0,i):c}:`0`.split(void 0,0).length?function(e,n){return e===void 0&&n===0?[]:Zv(t,this,e,n)}:t,[function(t,n){var i=pv(this),a=t==null?void 0:ay(t,e);return a?Zv(a,t,i,n):Zv(r,Yb(i),t,n)},function(e,i){var a=Yv(this),o=Yb(e),s=n(r,a,o,i,r!==t);if(s.done)return s.value;var c=lw(a,RegExp),l=a.unicode,u=(a.ignoreCase?`i`:``)+(a.multiline?`m`:``)+(a.unicode?`u`:``)+(gT?`g`:`y`),d=new c(gT?`^(?:`+a.source+`)`:a,u),f=i===void 0?4294967295:i>>>0;if(f===0)return[];if(o.length===0)return mS(d,o)===null?[o]:[];for(var p=0,m=0,h=[];m=n},wT=function(e,t,n){var r=K.toDOMRange(e,t).getBoundingClientRect(),i=K.toDOMRange(e,n).getBoundingClientRect();return CT(r,i)&&CT(i,r)},TT=[`span`,`b`,`strong`,`i`,`em`,`s`,`strike`,`u`,`font`,`sub`,`sup`],ET=[],DT=[],OT={},Roe=fy.f,zoe=zb.f,Boe=My.enforce,Voe=Rv(`match`),kT=W.RegExp,AT=kT.prototype,Hoe=W.SyntaxError,Uoe=G(Xb),Woe=G(AT.exec),jT=G(``.charAt),MT=G(``.replace),NT=G(``.indexOf),Goe=G(``.slice),Koe=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,PT=/a/g,FT=/a/g,qoe=new kT(PT)!==PT,IT=Yx.MISSED_STICKY,Joe=Yx.UNSUPPORTED_Y,Yoe=Vv&&(!qoe||IT||Xx||Zx||jv(function(){return FT[Voe]=!1,kT(PT)!=PT||kT(FT)==FT||kT(PT,`i`)!=`/a/i`}));if(Hb(`RegExp`,Yoe)){for(var LT=function(e,t){var n,r,i,a,o,s,c=Qv(AT,this),l=ux(e),u=t===void 0,d=[],f=e;if(!c&&l&&u&&e.constructor===LT)return e;if((l||Qv(AT,e))&&(e=e.source,u&&(t=`flags`in f?f.flags:Uoe(f))),e=e===void 0?``:Yb(e),t=t===void 0?``:Yb(t),f=e,Xx&&`dotAll`in PT&&(r=!!t&&NT(t,`s`)>-1)&&(t=MT(t,/s/g,``)),n=t,IT&&`sticky`in PT&&(i=!!t&&NT(t,`y`)>-1)&&Joe&&(t=MT(t,/y/g,``)),Zx&&(a=function(e){for(var t,n=e.length,r=0,i=``,a=[],o={},s=!1,c=!1,l=0,u=``;r<=n;r++){if((t=jT(e,r))===`\\`)t+=jT(e,++r);else if(t===`]`)s=!1;else if(!s)switch(!0){case t===`[`:s=!0;break;case t===`(`:Woe(Koe,Goe(e,r+1))&&(r+=2,c=!0),i+=t,l++;continue;case t===`>`&&c:if(u===``||_v(o,u))throw new Hoe(`Invalid capture group name`);o[u]=!0,a[a.length]=[u,l],c=!1,u=``;continue}c?u+=t:i+=t}return[i,a]}(e),e=a[0],d=a[1]),o=BS(kT(e,t),c?this:AT,LT),(r||i||d.length)&&(s=Boe(o),r&&(s.dotAll=!0,s.raw=LT(function(e){for(var t,n=e.length,r=0,i=``,a=!1;r<=n;r++)(t=jT(e,r))===`\\`?i+=t+jT(e,++r):a||t!==`.`?(t===`[`?a=!0:t===`]`&&(a=!1),i+=t):i+=`[\\s\\S]`;return i}(e),n)),i&&(s.sticky=!0),d.length&&(s.groups=d)),e!==f)try{my(o,`source`,f===``?`(?:)`:f)}catch{}return o},Xoe=function(e){e in LT||Roe(LT,e,{configurable:!0,get:function(){return kT[e]},set:function(t){kT[e]=t}})},RT=zoe(kT),zT=0;RT.length>zT;)Xoe(RT[zT++]);AT.constructor=LT,LT.prototype=AT,Ly(W,`RegExp`,LT)}cw(`RegExp`);var Zoe=RegExp(`\xA0`,`g`);function BT(e){return e.replace(Zoe,` `)}function VT(e,t){var n=e.length;if(n){var r=e[n-1];if(z.isText(r)){var i=Object.keys(r);if(i.length===1&&i[0]===`text`)return r.text+=t,!0}}return!1}function HT(e,t,n){return{type:`paragraph`,children:[{text:V(e).text().replace(/\s+/gm,` `)}]}}function UT(e,t){var n=function(e,t){var n=[];if(e.attr(`data-w-e-is-void`)!=null)return n;var r=e[0].childNodes;return r.length===1&&r[0].nodeName===`BR`?(n.push({text:``}),n):(r.forEach(function(e){if(e.nodeType!==MC.ELEMENT_NODE){if(e.nodeType===MC.TEXT_NODE){var r=e.textContent||``;if(r.trim()===``&&r.indexOf(` +`)>=0)return;r&&(r=BT(r),VT(n,r)||n.push({text:r}))}}else{if(e.nodeName===`BR`)return void(VT(n,` +`)||n.push({text:` +`}));var i=GT(V(e),t);Array.isArray(i)?i.forEach(function(e){return n.push(e)}):n.push(i)}}),n)}(e,t),r=function(e){for(var t in OT)if(e[0].matches(t))return OT[t];return HT}(e),i=r(e[0],n,t);return Array.isArray(i)||(i=[i]),i.forEach(function(r){P.isVoid(t,r)||(n.length===0&&(r.children=[{text:e.text().replace(/\s+/gm,` `)}]),DT.forEach(function(n){r=n(e[0],r,t)}))}),i}function WT(e,t){e.parents(`pre`).length===0&&(e[0].innerHTML=e[0].innerHTML.replace(/\s+/gm,` `).replace(/
/g,` +`));var n=e[0].textContent||``;n=function(e){return e.replace(/ /g,` `).replace(/</g,`<`).replace(/>/g,`>`).replace(/®/g,`®`).replace(/©/g,`©`).replace(/™/g,`™`).replace(/"/g,`"`)}(n);var r={text:n=BT(n)};return DT.forEach(function(n){r=n(e[0],r,t)}),r}function GT(e,t){ET.forEach(function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=V(r(e[0])))});var n=HC(e);return n===`span`?e.attr(`data-w-e-type`)?UT(e,t):WT(e,t):n===`code`?HC(e.parent())===`pre`?UT(e,t):WT(e,t):TT.includes(n)?WT(e,t):UT(e,t)}function KT(e,t,n){var r=V(n);return!!r.attr(t)||(r.attr(t,`true`),e.on(`destroyed`,function(){r.removeAttr(t)}),!1)}function qT(e,t){t===void 0&&(t=``);var n=[];t===``&&(t=`


`),t.indexOf(`<`)!==0&&(t=t.split(/\n/).map(function(e){return`

`+e+`

`}).join(``));var r=V(`
`+t+`
`);return Array.from(r.children()).forEach(function(t){var r=GT(V(t),e);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}),n}var JT=fy.f,YT=FS.fastKey,XT=My.set,ZT=My.getterFor,QT={getConstructor:function(e,t,n,r){var i=e(function(e,i){zS(e,a),XT(e,{type:t,index:ox(null),first:void 0,last:void 0,size:0}),Vv||(e.size=0),i!=null&&RS(i,e[r],{that:e,AS_ENTRIES:n})}),a=i.prototype,o=ZT(t),s=function(e,t,n){var r,i,a=o(e),s=c(e,t);return s?s.value=n:(a.last=s={index:i=YT(t,!0),key:t,value:n,previous:r=a.last,next:void 0,removed:!1},a.first||=s,r&&(r.next=s),Vv?a.size++:e.size++,i!==`F`&&(a.index[i]=s)),e},c=function(e,t){var n,r=o(e),i=YT(t);if(i!==`F`)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return OS(a,{clear:function(){for(var e=o(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&=n.previous.next=void 0,delete t[n.index],n=n.next;e.first=e.last=void 0,Vv?e.size=0:this.size=0},delete:function(e){var t=this,n=o(t),r=c(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first==r&&(n.first=i),n.last==r&&(n.last=a),Vv?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=o(this),r=Zy(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!c(this,e)}}),OS(a,n?{get:function(e){var t=c(this,e);return t&&t.value},set:function(e,t){return s(this,e===0?0:e,t)}}:{add:function(e){return s(this,e=e===0?0:e,e)}}),Vv&&JT(a,`size`,{get:function(){return o(this).size}}),i},setStrong:function(e,t,n){var r=t+` Iterator`,i=ZT(t),a=ZT(r);Hx(e,t,function(e,t){XT(this,{type:r,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?t==`keys`?{value:n.key,done:!1}:t==`values`?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})},n?`entries`:`values`,!n,!0),cw(t)}};VS(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},QT);var $T=new Set([`doctype`,`!doctype`,`meta`,`script`,`style`,`link`,`frame`,`iframe`,`title`,`svg`]);function eE(e,t){e.isInline(t)?(e.insertNode(t),t.type===`link`&&e.insertFragment([{text:``}])):B.insertNodes(e,t,{mode:`highest`})}var tE=function(e){var t=e,n=t.insertText;return t.insertFragment,t.setFragmentData=function(e){var n=t.selection;if(n){var r=wS(R.edges(n),2),i=r[0],a=r[1],o=P.void(t,{at:i.path}),s=P.void(t,{at:a.path});if(!R.isCollapsed(n)||o){var c=K.toDOMRange(t,n),l=c.cloneContents(),u=l.childNodes[0];if(l.childNodes.forEach(function(e){e.textContent&&e.textContent.trim()!==``&&(u=e)}),s){var d=wS(s,1)[0],f=c.cloneRange(),p=K.toDOMNode(t,d);f.setEndAfter(p),l=f.cloneContents()}if(o&&(u=l.querySelector(`[data-slate-spacer]`)),Array.from(l.querySelectorAll(`[data-slate-zero-width]`)).forEach(function(e){var t=e.getAttribute(`data-slate-zero-width`)===`n`;e.textContent=t?` +`:``}),RC(u)){var m=u.ownerDocument.createElement(`span`);m.style.whiteSpace=`pre`,m.appendChild(u),l.appendChild(m),u=m}var h=t.getFragment(),g=JSON.stringify(h),_=window.btoa(encodeURIComponent(g));u.setAttribute(`data-slate-fragment`,_),e.setData(`application/x-slate-fragment`,_);var v=l.ownerDocument.createElement(`div`);return v.appendChild(l),v.setAttribute(`hidden`,`true`),l.ownerDocument.body.appendChild(v),e.setData(`text/html`,v.innerHTML),e.setData(`text/plain`,uoe(v)),l.ownerDocument.body.removeChild(v),e}}},t.insertData=function(e){var r,i,a=e.getData(`application/x-slate-fragment`);if(a){var o=decodeURIComponent(window.atob(a)),s=JSON.parse(o);t.insertFragment(s)}else{var c=e.getData(`text/plain`),l=e.getData(`text/html`);if(l)t.dangerouslyInsertHtml(l);else if(c){var u=c.split(/\r\n|\r|\n/),d=!1;try{for(var f=CS(u),p=f.next();!p.done;p=f.next()){var m=p.value;d&&B.splitNodes(t,{always:!0}),n(m),d=!0}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}}},t},nE=function(e){return e!=null},rE={object:!0,function:!0,undefined:!0},iE=/^\s*class[\s{/}]/,aE=Function.prototype.toString,oE=function(e){return!!function(e){if(typeof e!=`function`||!hasOwnProperty.call(e,`length`))return!1;try{if(typeof e.length!=`number`||typeof e.call!=`function`||typeof e.apply!=`function`)return!1}catch{return!1}return!function(e){if(!function(e){return!!nE(e)&&hasOwnProperty.call(rE,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch{return!1}}(e)}(e)&&!iE.test(aE.call(e))},sE=function(e){return e!=null},cE=Object.keys,lE=function(){try{return Object.keys(`primitive`),!0}catch{return!1}}()?Object.keys:function(e){return cE(sE(e)?Object(e):e)},uE=function(e){if(!sE(e))throw TypeError(`Cannot use null or undefined`);return e},dE=Math.max,fE=function(){var e,t=Object.assign;return typeof t==`function`&&(t(e={foo:`raz`},{bar:`dwa`},{trzy:`trzy`}),e.foo+e.bar+e.trzy===`razdwatrzy`)}()?Object.assign:function(e,t){var n,r,i,a=dE(arguments.length,2);for(e=Object(uE(e)),i=function(r){try{e[r]=t[r]}catch(e){n||=e}},r=1;r-1},yE=ev(function(e){var t=e.exports=function(e,t){var n,r,i,a,o;return arguments.length<2||typeof e!=`string`?(a=t,t=e,e=null):a=arguments[2],nE(e)?(n=vE.call(e,`c`),r=vE.call(e,`e`),i=vE.call(e,`w`)):(n=i=!0,r=!1),o={value:t,configurable:n,enumerable:r,writable:i},a?fE(gE(a),o):o};t.gs=function(e,t,n){var r,i,a,o;return typeof e==`string`?a=arguments[3]:(a=n,n=t,t=e,e=null),nE(t)?oE(t)?nE(n)?oE(n)||(a=n,n=void 0):n=void 0:(a=t,t=n=void 0):t=void 0,nE(e)?(r=vE.call(e,`c`),i=vE.call(e,`e`)):(r=!0,i=!1),o={get:t,set:n,configurable:r,enumerable:i},a?fE(gE(a),o):o}}),bE=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function`);return e},$oe=ev(function(e,t){var n,r,i,a,o,s,c,l=Function.prototype.apply,u=Function.prototype.call,d=Object.create,f=Object.defineProperty,p=Object.defineProperties,m=Object.prototype.hasOwnProperty,h={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n;return bE(t),m.call(this,`__ee__`)?n=this.__ee__:(n=h.value=d(null),f(this,`__ee__`,h),h.value=null),n[e]?typeof n[e]==`object`?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},r=function(e,t){var r,a;return bE(t),a=this,n.call(this,e,r=function(){i.call(a,e,r),l.call(t,this,arguments)}),r.__eeOnceListener__=t,this},i=function(e,t){var n,r,i,a;if(bE(t),!m.call(this,`__ee__`)||!(n=this.__ee__)[e])return this;if(typeof(r=n[e])==`object`)for(a=0;i=r[a];++a)i!==t&&i.__eeOnceListener__!==t||(r.length===2?n[e]=r[a?0:1]:r.splice(a,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},a=function(e){var t,n,r,i,a;if(m.call(this,`__ee__`)&&(i=this.__ee__[e]))if(typeof i==`object`){for(n=arguments.length,a=Array(n-1),t=1;to/2){var p=o-f;u.right=p+5+`px`}else u.left=f+5+`px`;if(d>s/2){var m=s-d;u.bottom=m+5+`px`}else{var h=d+l;h<0&&(h=0),u.top=h+5+`px`}return u}function EE(e,t,n){n===void 0&&(n=`modal`);var r={top:`0`,left:`0`};if(e.selection==null)return r;var i=N.isElement(t)&&e.isVoid(t),a=N.isElement(t)&&e.isInline(t),o=wC.get(t);if(o==null)return r;var s=o.getBoundingClientRect(),c=s.top,l=s.left,u=s.height,d=s.width;if(i){var f=function(e){var t=[];t.push(e);for(var n=0;t.length>0;){var r=t.pop();if(r==null||++n>1e4)break;var i=r.nodeName;if(r.nodeType===1){var a=i.toLowerCase();if(coe.includes(a)||a===`iframe`||a===`video`)return r;var o=r.children||[],s=o.length;if(s)for(var c=s-1;c>=0;c--)t.push(o[c])}}return null}(o);if(f!=null){var p=f.getBoundingClientRect();c=p.top,u=p.height}}var m=wE(e);if(m==null)return r;var h,g=m.top,_=m.left,v=m.width,y=m.height,b={},x=c-g,S=l-_;if(n===`bar`)return b.left=S+`px`,x>40?b.bottom=y-x+5+`px`:b.top=x+u+5+`px`,b;if(n===`modal`)return i?a?S>(v-d)/2?b.right=v-S+5+`px`:b.left=S+d+5+`px`:b.left=`20px`:b.left=S+`px`,i?((h=x)<0&&(h=0),b.top=h+`px`):x>(y-u)/2?b.bottom=y-x+5+`px`:((h=x+u)<0&&(h=0),b.top=h+5+`px`),b;throw Error(`type '`+n+`' is invalid`)}function DE(e,t){bT(function(){var n=wE(e);if(n!=null){var r,i=n.top,a=n.left,o=n.width,s=n.height,c=t.offset(),l=c.top,u=c.left,d=t.width(),f=t.height(),p=l-i,m=u-a,h=t.attr(`style`);if(h.indexOf(`top`)>=0&&(r=p+f-s)>0){var g=t.css(`top`),_=parseInt(g.toString())-r;_<0&&(_=0),t.css(`top`,_+`px`)}if(h.indexOf(`bottom`)>=0&&l<0){var v=t.css(`bottom`),y=parseInt(v.toString())-Math.abs(l);t.css(`bottom`,y+`px`)}if(h.indexOf(`left`)>=0&&(r=m+d-o)>0){var b=t.css(`left`),x=parseInt(b.toString())-r;x<0&&(x=0),t.css(`left`,x+`px`)}if(h.indexOf(`right`)>=0&&u<0){var S=t.css(`right`),C=parseInt(S.toString())-Math.abs(u);t.css(`right`,C+`px`)}}})}var nse=Kx(`slice`),rse=Rv(`species`),OE=W.Array,ise=Math.max;Ub({target:`Array`,proto:!0,forced:!nse},{slice:function(e,t){var n,r,i,a=Ab(this),o=ob(a),s=Nb(e,o),c=Nb(t===void 0?o:t,o);if(sb(a)&&(n=a.constructor,(hb(n)&&(n===OE||sb(n.prototype))||Hv(n)&&(n=n[rse])===null)&&(n=void 0),n===OE||n===void 0))return uw(a,s,c);for(r=new(n===void 0?OE:n)(ise(c-s,0)),i=0;s1?arguments[1]:void 0,t.length)),r=Yb(e);return kE?kE(t,r,n):ose(t,n,n+r.length)===r}});var jE=Object.assign,ME=Object.defineProperty,lse=G([].concat),NE=!jE||jv(function(){if(Vv&&jE({b:1},jE(ME({},`a`,{enumerable:!0,get:function(){ME(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(),r=`abcdefghijklmnopqrst`;return e[n]=7,r.split(``).forEach(function(e){t[e]=e}),jE({},e)[n]!=7||Wb(jE({},t)).join(``)!=r})?function(e,t){for(var n=hv(e),r=arguments.length,i=1,a=Bb.f,o=kb.f;r>i;)for(var s,c=eb(arguments[i++]),l=a?lse(Wb(c),a(c)):Wb(c),u=l.length,d=0;u>d;)s=l[d++],Vv&&!Zv(o,c,s)||(n[s]=c[s]);return n}:jE;Ub({target:`Object`,stat:!0,forced:Object.assign!==NE},{assign:NE});var use=[`props`,`attrs`,`style`,`dataset`,`on`,`hook`];function PE(e){var t=e.data,n=t===void 0?{}:t,r=e.children,i=r===void 0?[]:r;Object.keys(n).forEach(function(t){var r,i,a=n[t];if(t!==`key`){if(!use.includes(t)){if(t.startsWith(`data-`)){var o=t.slice(5);return o=Vre(o),function(e,t){e.data??={};var n=e.data;n.dataset??={},Object.assign(n.dataset,t)}(e,((r={})[o]=a,r)),void delete n[t]}(function(e,t){e.data??={};var n=e.data;n.props??={},Object.assign(n.props,t)})(e,(i={},i[t]=a,i)),delete n[t]}}else e.key=a}),i.length>0&&i.forEach(function(e){typeof e!=`string`&&PE(e)})}var FE=[],IE={};function dse(e,t,n){return H(n.isInline(e)?`span`:`div`,null,t)}function LE(e,t){return t===void 0&&(t=!1),H(`span`,{"data-slate-string":!0},t?e+` +`:e)}function RE(e,t){return e===void 0&&(e=0),t===void 0&&(t=!1),H(`span`,{"data-slate-zero-width":t?`n`:`z`,"data-slate-length":e},``,t?H(`br`,null):null)}function zE(e,t,n,r){return yC.set(e,t),bC.set(e,n),N.isElement(e)?function(e,t){var n,r=K.findKey(t,e),i=t.isInline(e),a=P.isVoid(t,e),o=ST(r.id),s={id:o,key:r.id,"data-slate-node":`element`,"data-slate-inline":i},c=e.type,l=e.children,u=l===void 0?[]:l,d=function(e){return IE[e]||dse}(c);n=a?null:u.map(function(n,r){return zE(n,r,e,t)});var f=d(e,n,t);if(a){s[`data-slate-void`]=!0;var p=i?`span`:`div`,m=wS(F.texts(e),1),h=wS(m[0],1)[0],g=H(p,{"data-slate-spacer":!0,style:{height:`0`,color:`transparent`,outline:`none`,position:`absolute`}},zE(h,0,e,t));f=H(p,{style:{position:`relative`}},f,g),yC.set(h,0),bC.set(h,e)}return f.data??={},Object.assign(f.data,s),a||i||(f=function(e,t){var n=t;return FE.forEach(function(r){n=r(e,t)}),n}(e,f)),bT(function(){var t=zC(o);t!=null&&(CC.set(r,t),wC.set(e,t),SC.set(t,e))}),f}(e,r):function(e,t,n){if(e.text==null)throw Error(`Current node is not slate Text `+JSON.stringify(e));var r=K.findKey(n,e),i=n.getConfig().decorate;if(i==null)throw Error(`Can not get config.decorate`);var a=K.findPath(n,e),o=i([e,a]),s=z.decorations(e,o),c=s.map(function(r,i){var a=function(e,t,n,r,i){t===void 0&&(t=!1);var a=e.text,o=K.findPath(i,n),s=I.parent(o);if(P.isEditor(r))throw Error(`Text node `+JSON.stringify(n)+` parent is Editor`);return i.isVoid(r)?RE(F.string(r).length):a!==``||r.children[r.children.length-1]!==n||i.isInline(r)||P.string(i,s)!==``?a===``?RE():t&&a.slice(-1)===` +`?LE(a,!0):LE(a):RE(0,!0)}(r,i===s.length-1,e,t,n);return a=function(e,t){var n=t;return FE.forEach(function(t){n=t(e,n)}),n}(r,a),H(`span`,{"data-slate-leaf":!0},a)}),l=function(e){return`w-e-text-`+e}(r.id),u=H(`span`,{"data-slate-node":`text`,id:l,key:r.id},c);return bT(function(){var t=zC(l);t!=null&&(CC.set(r,t),wC.set(e,t),SC.set(t,e))}),u}(e,n,r)}function fse(e,t){var n,r=e.$scroll,i=function(e){return`w-e-textarea-`+e}(e.id),a=t.getConfig(),o=a.readOnly,s=a.autoFocus,c=function(e,t){return t===void 0&&(t=!1),hm(`div#`+e,{props:{contentEditable:!t}})}(i,o),l=t.children||[];c.children=l.map(function(e,n){var r=zE(e,n,t,t);return PE(r),r});var u=gC.get(e);if(u??=!0,u){var d=function(e,t){return V(`
`)}(i);r.append(d),e.$textArea=d,n=d[0],(p=lre([dre,hre,_re,fre,mre,ure]))(n,c),gC.set(e,!1),_C.set(e,p)}else{var f=vC.get(e),p=_C.get(e);if(f==null||p==null)return;n=f.elm,p(f,c)}if(n!=null||(n=zC(i))!=null){if((u?s:t.isFocused())&&n.focus({preventScroll:!0}),u){var m=PC(n);m&&EC.set(t,m)}xC.set(t,n),wC.set(t,n),SC.set(n,t),vC.set(e,c)}}function BE(e){return typeof e==`object`&&!!e&&e.nodeType===1}function VE(e,t){return(!t||e!==`hidden`)&&e!==`visible`&&e!==`clip`}function HE(e,t){if(e.clientHeightt||a>e&&o=t&&s>=n?a-e-r:o>t&&sn?o-t+i:0}function WE(e,t){var n=window,r=t.scrollMode,i=t.block,a=t.inline,o=t.boundary,s=t.skipOverflowHiddenElements,c=typeof o==`function`?o:function(e){return e!==o};if(!BE(e))throw TypeError(`Invalid target`);for(var l=document.scrollingElement||document.documentElement,u=[],d=e;BE(d)&&c(d);){if((d=d.parentElement)===l){u.push(d);break}d!=null&&d===document.body&&HE(d)&&!HE(document.documentElement)||d!=null&&HE(d,s)&&u.push(d)}for(var f=n.visualViewport?n.visualViewport.width:innerWidth,p=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,g=e.getBoundingClientRect(),_=g.height,v=g.width,y=g.top,b=g.right,x=g.bottom,S=g.left,C=i===`start`||i===`nearest`?y:i===`end`?x:y+_/2,w=a===`center`?S+v/2:a===`end`?b:S,T=[],ee=0;ee=0&&S>=0&&x<=p&&b<=f&&y>=ie&&x<=ae&&S>=oe&&b<=D)return T;var O=getComputedStyle(E),se=parseInt(O.borderLeftWidth,10),ce=parseInt(O.borderTopWidth,10),le=parseInt(O.borderRightWidth,10),ue=parseInt(O.borderBottomWidth,10),de=0,fe=0,pe=`offsetWidth`in E?E.offsetWidth-E.clientWidth-se-le:0,me=`offsetHeight`in E?E.offsetHeight-E.clientHeight-ce-ue:0;if(l===E)de=i===`start`?C:i===`end`?C-p:i===`nearest`?UE(h,h+p,p,ce,ue,h+C,h+C+_,_):C-p/2,fe=a===`start`?w:a===`center`?w-f/2:a===`end`?w-f:UE(m,m+f,f,se,le,m+w,m+w+v,v),de=Math.max(0,de+h),fe=Math.max(0,fe+m);else{de=i===`start`?C-ie-ce:i===`end`?C-ae+ue+me:i===`nearest`?UE(ie,ae,ne,ce,ue+me,C,C+_,_):C-(ie+ne/2)+me/2,fe=a===`start`?w-oe-se:a===`center`?w-(oe+re/2)+pe/2:a===`end`?w-D+le+pe:UE(oe,D,re,se,le+pe,w,w+v,v);var he=E.scrollLeft,k=E.scrollTop;C+=k-(de=Math.max(0,Math.min(k+de,E.scrollHeight-ne+me))),w+=he-(fe=Math.max(0,Math.min(he+fe,E.scrollWidth-re+pe)))}T.push({el:E,top:de,left:fe})}return T}function GE(e){return e===Object(e)&&Object.keys(e).length!==0}function KE(e,t){return IC(t)&&K.hasDOMNode(e,t,{editable:!0})}function qE(e,t){if(e.getConfig().readOnly)return!1;var n=JE(e,t)&&K.toSlateNode(e,t);return P.isVoid(e,n)}function JE(e,t){return IC(t)&&K.hasDOMNode(e,t)}function YE(e,t,n){n===void 0&&(n=!1);var r=t.selection,i=t.getConfig(),a=K.findDocumentOrShadowRoot(t).getSelection();if(a&&(!e.isComposing||n)&&t.isFocused()){var o=a.type!==`None`;if(r||o){var s=xC.get(t),c=!1;if(s.contains(a.anchorNode)&&s.contains(a.focusNode)&&(c=!0),o&&c&&r){var l=K.toSlateRange(t,a,{exactMatch:!0,suppressThrow:!0});if(l&&R.equals(l,r)){var u=!0;if(R.isCollapsed(r)){var d=a.anchorNode,f=a.anchorOffset;if(d===s){var p=s.childNodes,m=void 0;(m=p[f])&&m.matches(`table`)&&(u=!1),(m=p[f-1])&&m.matches(`table`)&&(u=!1)}}if(u)return}}if(!r||K.hasRange(t,r)){e.isUpdatingSelection=!0;var h=r&&K.toDOMRange(t,r);if(h){R.isBackward(r)?a.setBaseAndExtent(h.endContainer,h.endOffset,h.startContainer,h.startOffset):a.setBaseAndExtent(h.startContainer,h.startOffset,h.endContainer,h.endOffset);var g=h.startContainer.parentElement;if(!g.closest(`[data-slate-spacer]`)){g.getBoundingClientRect=h.getBoundingClientRect.bind(h);var _=document.body;(function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(GE(t)&&typeof t.behavior==`function`)return t.behavior(n?[]:WE(e,t));if(!n){var r=function(e){return!1===e?{block:`end`,inline:`nearest`}:GE(e)?e:{block:`start`,inline:`nearest`}}(t);(function(e,t){t===void 0&&(t=`auto`);var n=`scrollBehavior`in document.body.style;e.forEach(function(e){var r=e.el,i=e.top,a=e.left;r.scroll&&n?r.scroll({top:i,left:a,behavior:t}):(r.scrollTop=i,r.scrollLeft=a)})})(WE(e,r),r.behavior)}})(g,{scrollMode:`if-needed`,boundary:i.scroll?s.parentElement:_,block:`end`,behavior:`smooth`}),delete g.getBoundingClientRect}}else a.removeAllRanges();setTimeout(function(){h&&WC&&s.focus(),e.isUpdatingSelection=!1})}else t.selection=K.toSlateRange(t,a,{exactMatch:!1,suppressThrow:!1})}}}var XE=new WeakMap,ZE=new WeakMap,pse={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`},mse={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`},QE={deleteWordBackward:`ctrl+shift?+backspace`,deleteWordForward:`ctrl+shift?+delete`,redo:[`ctrl+y`,`ctrl+shift+z`]},$E=function(e){var t=pse[e],n=mse[e],r=QE[e],i=t&&th(t),a=n&&th(n),o=r&&th(r);return function(e){return!(!i||!i(e))||!!(UC&&a&&a(e))||!(UC||!o||!o(e))}},eD={isBold:$E(`bold`),isCompose:$E(`compose`),isMoveBackward:$E(`moveBackward`),isMoveForward:$E(`moveForward`),isDeleteBackward:$E(`deleteBackward`),isDeleteForward:$E(`deleteForward`),isDeleteLineBackward:$E(`deleteLineBackward`),isDeleteLineForward:$E(`deleteLineForward`),isDeleteWordBackward:$E(`deleteWordBackward`),isDeleteWordForward:$E(`deleteWordForward`),isExtendBackward:$E(`extendBackward`),isExtendForward:$E(`extendForward`),isExtendLineBackward:$E(`extendLineBackward`),isExtendLineForward:$E(`extendLineForward`),isItalic:$E(`italic`),isMoveLineBackward:$E(`moveLineBackward`),isMoveLineForward:$E(`moveLineForward`),isMoveWordBackward:$E(`moveWordBackward`),isMoveWordForward:$E(`moveWordForward`),isRedo:$E(`redo`),isSplitBlock:$E(`splitBlock`),isTransposeCharacter:$E(`transposeCharacter`),isUndo:$E(`undo`),isTab:$E(`tab`),isSelectAll:$E(`selectAll`)};function tD(e){e.preventDefault()}var nD={beforeinput:function(e,t,n){var r=e,i=n.getConfig().readOnly;if(qC&&!i&&KE(n,r.target)){var a=n.selection,o=r.inputType,s=r.dataTransfer||r.data||void 0;if(o!==`insertCompositionText`&&o!==`deleteCompositionText`){if(r.preventDefault(),!o.startsWith(`delete`)||o.startsWith(`deleteBy`)){var c=wS(r.getTargetRanges(),1)[0];if(c){var l=K.toSlateRange(n,c,{exactMatch:!1,suppressThrow:!1});a&&R.equals(a,l)||B.select(n,l)}}if(a&&R.isExpanded(a)&&o.startsWith(`delete`)){var u=o.endsWith(`Backward`)?`backward`:`forward`;P.deleteFragment(n,{direction:u})}else switch(o){case`deleteByComposition`:case`deleteByCut`:case`deleteByDrag`:P.deleteFragment(n);break;case`deleteContent`:case`deleteContentForward`:P.deleteForward(n);break;case`deleteContentBackward`:P.deleteBackward(n);break;case`deleteEntireSoftLine`:P.deleteBackward(n,{unit:`line`}),P.deleteForward(n,{unit:`line`});break;case`deleteHardLineBackward`:P.deleteBackward(n,{unit:`block`});break;case`deleteSoftLineBackward`:P.deleteBackward(n,{unit:`line`});break;case`deleteHardLineForward`:P.deleteForward(n,{unit:`block`});break;case`deleteSoftLineForward`:P.deleteForward(n,{unit:`line`});break;case`deleteWordBackward`:P.deleteBackward(n,{unit:`word`});break;case`deleteWordForward`:P.deleteForward(n,{unit:`word`});break;case`insertLineBreak`:case`insertParagraph`:P.insertBreak(n);break;case`insertFromDrop`:case`insertFromPaste`:case`insertFromYank`:case`insertReplacementText`:case`insertText`:if(o===`insertFromPaste`&&!AC.get(n))break;s instanceof DataTransfer?n.insertData(s):typeof s==`string`&&P.insertText(n,s)}}}},blur:function(e,t,n){var r=e,i=t.isUpdatingSelection,a=t.latestElement;if(!n.getConfig().readOnly&&!i&&KE(n,r.target)){var o=K.findDocumentOrShadowRoot(n);if(a!==o.activeElement){var s=r.relatedTarget;if(!(s===K.toDOMNode(n,n)||FC(s)&&s.hasAttribute(`data-slate-spacer`))){if(s!=null&&IC(s)&&K.hasDOMNode(n,s)){var c=K.toSlateNode(n,s);if(N.isElement(c)&&!n.isVoid(c))return}if(GC){var l=o.getSelection();l?.removeAllRanges()}DC.delete(n)}}}},focus:function(e,t,n){var r=K.toDOMNode(n,n),i=K.findDocumentOrShadowRoot(n);t.latestElement=i.activeElement,WC&&e.target!==r?r.focus():DC.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&JE(n,e.target)&&IC(e.target)){var r=K.toSlateNode(n,e.target),i=K.findPath(n,r);if(P.hasPath(n,i)&&F.get(n,i)===r){var a=P.start(n,i),o=P.end(n,i),s=P.void(n,{at:a}),c=P.void(n,{at:o});if(s&&c&&I.equals(s[1],c[1])){var l=P.range(n,a);B.select(n,l)}}}},compositionstart:function(e,t,n){if(KE(n,e.target)){var r=n.selection;if(r&&R.isExpanded(r)&&(P.deleteFragment(n),Promise.resolve().then(function(){YE(t,n,!0)})),r&&R.isCollapsed(r)){var i=K.toDOMRange(n,r).startContainer,a=i.textContent||``;XE.set(n,a),ZE.set(n,i)}t.isComposing=!0,function(e,t){var n;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&((n=e.$placeholder)==null||n.hide(),e.showPlaceholder=!1)}(t,n)}},compositionend:function(e,t,n){var r=e;if(KE(n,r.target)){t.isComposing=!1;var i=n.selection;if(i!=null){(KC||WC)&&K.cleanExposedTexNodeInSelectionBlock(n);for(var a=R.isBackward(i)?i.focus:i.anchor,o=wS(P.node(n,[a.path[0]]),1)[0],s=0;s0&&P.insertText(n,l.slice(0,u)),t.changeViewState()):P.insertText(n,l)}else P.insertText(n,l);GC||setTimeout(function(){var e=n.selection;if(e!=null){var t=ZE.get(n);t!=null&&K.toDOMRange(n,e).startContainer!==t&&(t.textContent=XE.get(n)||``)}})}}}},compositionupdate:function(e,t,n){KE(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,i=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&KE(n,r.target)){if(function(e,t){var n=lC.get(e),r=n&&n.getMenus(),i=dC.get(e),a=i&&i.getMenus(),o=SS(SS({},r),a);for(var s in o){var c=o[s],l=c.hotkey;if(l&&Wre(l,t)&&!c.isDisabled(e)){var u=c.getValue(e);c.exec(e,u)}}}(n,r),eD.isTab(r))return tD(r),void n.handleTab();if(eD.isRedo(r))return tD(r),void(typeof n.redo==`function`&&n.redo());if(eD.isUndo(r))return tD(r),void(typeof n.undo==`function`&&n.undo());if(eD.isMoveLineBackward(r))return tD(r),void B.move(n,{unit:`line`,reverse:!0});if(eD.isMoveLineForward(r))return tD(r),void B.move(n,{unit:`line`});if(eD.isExtendLineBackward(r))return tD(r),void B.move(n,{unit:`line`,edge:`focus`,reverse:!0});if(eD.isExtendLineForward(r))return tD(r),void B.move(n,{unit:`line`,edge:`focus`});if(eD.isMoveBackward(r))return tD(r),void(i&&R.isCollapsed(i)?B.move(n,{reverse:!0}):B.collapse(n,{edge:`start`}));if(eD.isMoveForward(r))return tD(r),void(i&&R.isCollapsed(i)?B.move(n):B.collapse(n,{edge:`end`}));if(eD.isMoveWordBackward(r))return tD(r),i&&R.isExpanded(i)&&B.collapse(n,{edge:`focus`}),void B.move(n,{unit:`word`,reverse:!0});if(eD.isMoveWordForward(r))return tD(r),i&&R.isExpanded(i)&&B.collapse(n,{edge:`focus`}),void B.move(n,{unit:`word`});if(eD.isSelectAll(r))return tD(r),void n.selectAll();if(qC){if((KC||GC)&&i&&(eD.isDeleteBackward(r)||eD.isDeleteForward(r))&&R.isCollapsed(i)){var a=F.parent(n,i.anchor.path);if(N.isElement(a)&&P.isVoid(n,a)&&P.isInline(n,a))return r.preventDefault(),void B.delete(n,{unit:`block`})}}else{if(eD.isBold(r)||eD.isItalic(r)||eD.isTransposeCharacter(r))return void tD(r);if(eD.isSplitBlock(r))return tD(r),void P.insertBreak(n);if(eD.isDeleteBackward(r))return tD(r),void(i&&R.isExpanded(i)?P.deleteFragment(n,{direction:`backward`}):P.deleteBackward(n));if(eD.isDeleteForward(r))return tD(r),void(i&&R.isExpanded(i)?P.deleteFragment(n,{direction:`forward`}):P.deleteForward(n));if(eD.isDeleteLineBackward(r))return tD(r),void(i&&R.isExpanded(i)?P.deleteFragment(n,{direction:`backward`}):P.deleteBackward(n,{unit:`line`}));if(eD.isDeleteLineForward(r))return tD(r),void(i&&R.isExpanded(i)?P.deleteFragment(n,{direction:`forward`}):P.deleteForward(n,{unit:`line`}));if(eD.isDeleteWordBackward(r))return tD(r),void(i&&R.isExpanded(i)?P.deleteFragment(n,{direction:`backward`}):P.deleteBackward(n,{unit:`word`}));if(eD.isDeleteWordForward(r))return tD(r),void(i&&R.isExpanded(i)?P.deleteFragment(n,{direction:`forward`}):P.deleteForward(n,{unit:`word`}))}}},keypress:function(e,t,n){if(!qC&&!n.getConfig().readOnly&&KE(n,e.target)){e.preventDefault();var r=e.key;P.insertText(n,r)}},copy:function(e,t,n){var r=e;if(KE(n,r.target)){r.preventDefault();var i=r.clipboardData;i!=null&&n.setFragmentData(i)}},cut:function(e,t,n){var r=e,i=n.selection;if(!n.getConfig().readOnly&&KE(n,r.target)){r.preventDefault();var a=r.clipboardData;if(a!=null&&(n.setFragmentData(a),i))if(R.isExpanded(i))P.deleteFragment(n);else{var o=F.parent(n,i.anchor.path);P.isVoid(n,o)&&B.delete(n)}}},paste:function(e,t,n){AC.set(n,!0);var r=e;if(!n.getConfig().readOnly&&KE(n,r.target)){var i=n.getConfig().customPaste;if(i&&!1===i(n,r))return void AC.set(n,!1);if(!qC||function(e){return e.clipboardData&&e.clipboardData.getData(`text/plain`)!==``&&e.clipboardData.types.length===1}(r)){r.preventDefault();var a=r.clipboardData;a!=null&&n.insertData(a)}}},dragover:function(e,t,n){if(JE(n,e.target)){var r=K.toSlateNode(n,e.target);P.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(JE(n,r.target)&&!n.getConfig().readOnly){var i=K.toSlateNode(n,r.target),a=K.findPath(n,i);if(P.isVoid(n,i)||P.void(n,{at:a,voids:!0})){var o=P.range(n,a);B.select(n,o)}var s=r.dataTransfer;s!=null&&(t.isDraggingInternally=!0,n.setFragmentData(s))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&JE(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,i=r.dataTransfer;if(!n.getConfig().readOnly&&JE(n,r.target)&&i!=null&&!(qC&&GC&&i.files.length>0)){r.preventDefault();var a=n.selection,o=K.findEventRange(n,r);B.select(n,o),t.isDraggingInternally&&(a&&B.delete(n,{at:a}),t.isDraggingInternally=!1),n.insertData(i),n.isFocused()||n.focus()}}},rD=1,iD=function(){function e(e){var t=this;this.id=rD++,this.$textArea=null,this.$progressBar=V(`
`),this.$maxLengthInfo=V(`
`),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=om(function(){var e=t.editorInstance;(function(e,t){var n=e.isComposing,r=e.isUpdatingSelection,i=e.isDraggingInternally;if(!(t.getConfig().readOnly||n||r||i)){var a=K.findDocumentOrShadowRoot(t),o=a.activeElement,s=K.toDOMNode(t,t),c=a.getSelection();if(o===s?(e.latestElement=o,DC.set(t,!0)):DC.delete(t),!c)return B.deselect(t);var l=c.anchorNode,u=c.focusNode,d=KE(t,l)||qE(t,l),f=KE(t,u)||qE(t,u);if(d&&f){var p=K.toSlateRange(t,c,{exactMatch:!1,suppressThrow:!1});B.select(t,p)}else B.deselect(t)}})(t,e)},100);var n=V(e);if(n.length===0)throw Error(`Cannot find textarea DOM by selector '`+e+`'`);this.$box=n;var r=V(`
`);r.append(this.$progressBar),r.append(this.$maxLengthInfo),n.append(r);var i=V(`
`);r.append(i),this.$scroll=i,this.$textAreaContainer=r,bT(function(){var e=t.editorInstance,n=K.getWindow(e);n.document.addEventListener(`selectionchange`,t.onDOMSelectionChange),e.on(`destroyed`,function(){n.document.removeEventListener(`selectionchange`,t.onDOMSelectionChange)}),r.on(`click`,function(){return e.hidePanelOrModal()}),e.on(`change`,t.changeViewState.bind(t));var i=e.getConfig().onChange;i&&e.on(`change`,function(){return i(e)}),t.onFocusAndOnBlur(),e.on(`change`,t.changeMaxLengthInfo.bind(t)),t.bindEvent()})}return Object.defineProperty(e.prototype,`editorInstance`,{get:function(){var e=sC.get(this);if(e==null)throw Error(`Can not get editor instance`);return e},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;t!=null&&(Xp(nD,function(n,i){t.on(i,function(t){n(t,e,r)})}),r.getConfig().scroll&&(n.css(`overflow-y`,`auto`),n.on(`scroll`,om(function(){r.emit(`scroll`)},100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,i=n.onFocus;this.latestEditorSelection=t.selection,t.on(`change`,function(){e.latestEditorSelection==null&&t.selection!=null?setTimeout(function(){return i&&i(t)}):e.latestEditorSelection!=null&&t.selection==null&&setTimeout(function(){return r&&r(t)}),e.latestEditorSelection=t.selection})},e.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-K.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML=n+`/`+t}},e.prototype.changeProgress=function(e){var t=this.$progressBar;t.css(`width`,e+`%`),e>=100&&setTimeout(function(){t.hide(),t.css(`width`,`0`),t.show()},1e3)},e.prototype.changeViewState=function(){var e=this,t=this.editorInstance;fse(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var i=t.isEmpty();if(i&&!e.showPlaceholder&&!e.isComposing){if(e.$placeholder==null){var a=V(`
`+r+`
`);e.$textAreaContainer.append(a),e.$placeholder=a}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!i&&e.showPlaceholder&&((n=e.$placeholder)==null||n.hide(),e.showPlaceholder=!1)}}(this,t),bT(function(){YE(e,t)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function aD(e){e.removeAttr(`width`),e.removeAttr(`height`),e.removeAttr(`fill`),e.removeAttr(`class`),e.removeAttr(`t`),e.removeAttr(`p-id`);var t=e.children();t.length&&aD(t)}function oD(){return V(``)}function sD(){return V(`
`)}function cD(e,t,n,r,i){if(i===void 0&&(i=!1),t){if(r){var a=UC?`cmd`:`ctrl`;r=r.replace(`mod`,a)}if(i)r&&(e.attr(`data-tooltip`,r),e.addClass(`w-e-menu-tooltip-v5`),e.addClass(`tooltip-right`));else{var o=r?n+` +`+r:n;e.attr(`data-tooltip`,o),e.addClass(`w-e-menu-tooltip-v5`)}}}uS(`match`,function(e,t,n){return[function(t){var n=pv(this),r=t==null?void 0:ay(t,e);return r?Zv(r,t,n):new RegExp(t)[e](Yb(n))},function(e){var r=Yv(this),i=Yb(e),a=n(t,r,i);if(a.done)return a.value;if(!r.global)return mS(r,i);var o=r.unicode;r.lastIndex=0;for(var s,c=[],l=0;(s=mS(r,i))!==null;){var u=Yb(s[0]);c[l]=u,u===``&&(r.lastIndex=dS(i,ab(r.lastIndex),o)),l++}return l===0?null:c}]});var lD=function(){function e(e,t,n){var r=this;n===void 0&&(n=!1),this.$elem=V(`
`),this.$button=V(``),this.disabled=!1,this.menu=t;var i=t.tag,a=t.width;if(i!==`button`)throw Error(`Invalid tag '`+i+`', expected 'button'`);var o=t.title,s=t.hotkey,c=s===void 0?``:s,l=t.iconSvg,u=l===void 0?``:l,d=this.$button;if(u){var f=V(u);aD(f),d.append(f)}else d.text(o);cD(d,u,o,c,n),n&&u&&d.append(V(``+o+``)),a&&d.css(`width`,a+`px`),d.attr(`data-menu-key`,e),this.$elem.append(d),bT(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on(`click`,function(t){t.preventDefault(),SD(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())})},e.prototype.exec=function(){var e=SD(this),t=this.menu,n=t.getValue(e);t.exec(e,n)},e.prototype.setActive=function(){var e=SD(this),t=this.$button,n=`active`;this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=SD(this),t=this.$button,n=this.menu.isDisabled(e);(e.selection==null||e.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r=`disabled`;n?t.addClass(r):t.removeClass(r),this.disabled=n},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),uD=function(e){function t(t,n,r){return r===void 0&&(r=!1),e.call(this,t,n,r)||this}return xS(t,e),t.prototype.onButtonClick=function(){},t}(lD),dD=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=pC.get(e);t??(t=new Set,pC.set(e,t)),t.add(this),mC.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var n=this.genSelfElem();n&&t.append(n)},e.prototype.appendTo=function(e){var t=this.$elem;e.append(t)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=mC.get(this);e&&e.emit(`modalOrPanelShow`,this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=mC.get(this);e&&e.emit(`modalOrPanelHide`)}},e}(),fD=function(e){function t(t){var n=e.call(this,t)||this;return n.type=`dropPanel`,n.$elem=V(`
`),n}return xS(t,e),t.prototype.genSelfElem=function(){return null},t}(dD),pD=function(e){function t(t,n,r){r===void 0&&(r=!1);var i=e.call(this,t,n,r)||this;if(i.dropPanel=null,i.menu=n,n.showDropPanel){var a=oD();i.$button.append(a)}return i}return xS(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var e=this.menu;if(e.getPanelContentElem!=null){var t=SD(this);if(this.dropPanel==null){var n=new fD(t),r=e.getPanelContentElem(t);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var i=this.dropPanel;i.isShow?i.hide():(r=e.getPanelContentElem(t),i.renderContent(r),i.show())}var a=this.dropPanel;if(a.isShow){var o=this.$elem,s=o.offset().left,c=o.parents(`.w-e-bar`);s-c.offset().left>=c.width()/2?a.$elem.css({left:`none`,right:`0`}):a.$elem.css({left:`0`,right:`none`})}}},t}(lD),mD=function(e){function t(t,n){n===void 0&&(n=0);var r=e.call(this,t)||this;r.type=`modal`,r.$elem=V(`
`),r.width=0,n&&(r.width=n);var i=r.$elem;return i.on(`click`,function(e){return e.stopPropagation()}),i.on(`keyup`,function(e){e.code===`Escape`&&(r.hide(),t.restoreSelection())}),r}return xS(t,e),t.prototype.genSelfElem=function(){var e=this,t=V(``),n=mC.get(this);return t.on(`click`,function(){e.hide(),n?.restoreSelection()}),t},t.prototype.setStyle=function(e){var t=this.width,n=this.$elem;n.attr(`style`,``),t&&n.css(`width`,t+`px`),n.css(e)},t}(dD);function hD(e,t,n){var r=V(``);r.append(``+e+``);var i=V(``);return r.append(i),[r[0],i[0]]}function gD(e,t){var n=V(`
`),r=V(``);return n.append(r),[n[0],r[0]]}var _D=function(e){function t(t,n,r){r===void 0&&(r=!1);var i=e.call(this,t,n,r)||this;return i.$body=V(`body`),i.modal=null,i.menu=n,i}return xS(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=SD(this),t=this.menu.getModalPositionNode(e);return N.isElement(t)?EE(e,t,`modal`):TE(e)},t.prototype.handleModal=function(){var e=SD(this),t=this.menu;if(this.modal==null){var n=new mD(e,t.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else (n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)},t.prototype.renderAndShowModal=function(e,t){t===void 0&&(t=!1);var n=SD(this),r=this.menu;if(r.getModalContentElem!=null){var i=K.getTextarea(n),a=K.getToolbar(n),o=(a?.getConfig()||{}).modalAppendToBody,s=r.getModalContentElem(n);if(e.renderContent(s),o)e.setStyle({left:`0`,right:`0`});else{var c=this.getPosition();e.setStyle(c)}t&&(o?e.appendTo(this.$body):e.appendTo(i.$textAreaContainer)),e.show(),o||DE(n,e.$elem),setTimeout(function(){n.blur()})}},t}(lD),vD=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type=`selectList`,r.$elem=V(`
`),n&&r.$elem.css(`width`,n+`px`),r.$elem.on(`click`,function(e){e.stopPropagation()}),r}return xS(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=V(`
    `);e.forEach(function(e){var t=e.value,r=e.text,i=e.selected,a=e.styleForRenderMenuList,o=V(`
  • `);if(a&&o.css(a),i){var s=V(``);o.append(s),o.addClass(`selected`)}o.append(V(``+r+``)),o.attr(`title`,r),n.append(o)}),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(dD),yD=function(){function e(e,t,n){var r=this;n===void 0&&(n=!1),this.$elem=V(`
    `),this.$button=V(``),this.disabled=!1,this.selectList=null;var i=t.tag,a=t.title,o=t.width,s=t.iconSvg,c=s===void 0?``:s,l=t.hotkey,u=l===void 0?``:l;if(i!==`select`)throw Error(`Invalid tag '`+i+`', expected 'select'`);var d=this.$button;o&&d.css(`width`,o+`px`),d.attr(`data-menu-key`,e),cD(d,c,a,u,n),this.$elem.append(d),this.menu=t,bT(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on(`click`,function(t){t.preventDefault(),SD(e).hidePanelOrModal(),e.trigger()})},e.prototype.trigger=function(){var e=this,t=SD(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(this.selectList==null){this.selectList=new vD(t,n.selectPanelWidth);var r=this.selectList,i=n.getOptions(t);r.renderList(i),r.appendTo(this.$elem),r.show(),r.$elem.on(`click`,`li`,function(t){var n=t.target;if(n!=null){t.preventDefault();var r=V(n).attr(`data-value`);e.onChange(r)}})}else (r=this.selectList).isShow?r.hide():(i=n.getOptions(t),r.renderList(i),r.show())}},e.prototype.onChange=function(e){var t=SD(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=SD(this),t=this.menu,n=t.getValue(e),r=function(e,t){for(var n=e.length,r=``,i=0;i`),this.$container=V(`
    `),this.$button=V(``);var t=e.key,n=e.iconSvg,r=e.title,i=this.$elem,a=this.$button;if(n){var o=V(n);aD(o),a.append(o)}else a.text(r);a.attr(`data-menu-key`,t);var s=oD();a.append(s),i.append(a);var c=this.$container;i.append(c);var l=this.createObserver();this.observe(l)}return e.prototype.appendBarItem=function(e){var t=e.$elem;this.$container.append(t)},e.prototype.observe=function(e){var t=this.$container;e.observe(t[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var e=this,t=this.$container,n=this.$button,r=new MutationObserver(function(){var i=t.find(`button`),a=i.length;if(a!==0){var o=0;i.each(function(e){V(e).hasClass(`disabled`)&&o++}),r.disconnect(),o===a?n.addClass(`disabled`):n.removeClass(`disabled`),e.observe(r)}});return r},e}(),xD=new WeakMap;function SD(e){var t=fC.get(e);if(t==null)throw Error(`Can not get editor instance`);return t}function CD(e,t,n){n===void 0&&(n=!1);var r=xD.get(t);if(r)return r;var i=t.tag;if(i===`button`){var a=t.showDropPanel,o=t.showModal;r=a?new pD(e,t,n):o?new _D(e,t,n):new uD(e,t,n)}if(i===`select`&&(r=new yD(e,t,n)),r==null)throw Error(`Invalid tag in menu `+JSON.stringify(t));return xD.set(t,r),r}function wD(e,t){var n=e.selection;return n!=null&&!R.isCollapsed(n)&&!K.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=t.type;return!![`pre`,`code`,`table`].includes(n)||void 0})&&!!z.isText(t)}var TD=function(){function e(){var e=this;this.$elem=V(`
    `),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.changeHoverbarState=oh(function(){var t=e.isShow,n=e.getSelectedNodeAndMenuKeys()||{},r=n.node,i=r===void 0?null:r,a=n.menuKeys,o=a===void 0?[]:a;i!=null&&e.changeItemsState(),i&&N.isElement(i)&&t&&e.isSamePath(i,e.prevSelectedNode)||(e.hideAndClean(),i!=null&&(e.registerItems(o),e.setPosition(i),e.show()),e.prevSelectedNode=i)},200),bT(function(){var t=e.getEditorInstance(),n=e.$elem;n.on(`mousedown`,function(e){return e.preventDefault()},{passive:!1}),K.getTextarea(t).$textAreaContainer.append(n),t.on(`change`,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(`scroll`,r),t.on(`fullScreen`,r),t.on(`unFullScreen`,r)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.hideAndClean=function(){var e=this.$elem;e.removeClass(`w-e-bar-show`).addClass(`w-e-bar-hidden`),this.hoverbarItems=[],e.empty(),this.isShow=!1},e.prototype.checkPositionBottom=function(){var e=this.$elem,t=!1,n=window.innerHeight;n&&n>=360&&n-e[0].getBoundingClientRect().bottom<360&&(t=!0),t?e.addClass(`w-e-bar-bottom`):e.removeClass(`w-e-bar-bottom`)},e.prototype.show=function(){this.$elem.removeClass(`w-e-bar-hidden`).addClass(`w-e-bar-show`),this.isShow=!0,this.checkPositionBottom()},e.prototype.changeItemsState=function(){var e=this;bT(function(){e.hoverbarItems.forEach(function(e){e.changeMenuState()})})},e.prototype.registerItems=function(e){var t=this,n=this.$elem;e.forEach(function(e){if(e!==`|`)t.registerSingleItem(e);else{var r=sD();n.append(r)}})},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(r==null){var i=YC[e];if(i==null)throw Error(`Not found menu item factory by key '`+e+`'`);if(typeof i!=`function`)throw Error(`Menu item factory (key='`+e+`') is not a function`);r=i(),n[e]=r}var a=CD(e,r);this.hoverbarItems.push(a),fC.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),n=this.$elem;if(n.attr(`style`,``),N.isElement(e)){var r=EE(t,e,`bar`);return n.css(r),void DE(t,n)}if(z.isText(e))return r=TE(t),n.css(r),void DE(t,n);throw Error(`hoverbar.setPosition error, current selected node is not elem nor text`)},e.prototype.getSelectedNodeAndMenuKeys=function(){var e=this.getEditorInstance();if(e.selection==null)return null;var t=this.getHoverbarKeysConf(),n=null,r=[],i=function(i){var a=t[i],o=a.match,s=a.menuKeys,c=s===void 0?[]:s,l=o||function(e,t){return K.checkNodeType(t,i)},u=wS(P.nodes(e,{match:function(t){return l(e,t)},universal:!0}),1),d=u[0];if(d!=null)return n=d[0],r=c,`break`};for(var a in t)if(i(a)===`break`)break;return n==null||r.length===0?null:{node:n,menuKeys:r}},e.prototype.getEditorInstance=function(){var e=uC.get(this);if(e==null)throw Error(`Can not get editor instance`);return e},e.prototype.getHoverbarKeysConf=function(){var e=this.getEditorInstance().getConfig().hoverbarKeys,t=e===void 0?{}:e,n=t.text;return n&&n.match==null&&(n.match=wD),t},e.prototype.isSamePath=function(e,t){if(e==null||t==null)return!1;var n=K.findPath(null,e),r=K.findPath(null,t);return I.equals(n,r)},e.prototype.destroy=function(){this.changeHoverbarState.cancel(),this.$elem.remove(),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}();function ED(e,t,n,r){if(yC.set(e,t),bC.set(e,n),N.isElement(e)){var i=e.children;if((i===void 0?[]:i).forEach(function(t,n){return ED(t,n,e,r)}),P.isVoid(r,e)){var a=wS(F.texts(e),1),o=wS(a[0],1)[0];yC.set(o,0),bC.set(o,e)}}}function DD(e){var t=e.selector,n=t===void 0?``:t,r=e.config,i=r===void 0?{}:r,a=e.content,o=e.html,s=e.plugins,c=s===void 0?[]:s,l=(e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:e}=t,{redos:n}=e;if(n.length>0){var r=n[n.length-1];Jb.withoutSaving(t,()=>{P.withoutNormalizing(t,()=>{for(var e of r)t.apply(e)})}),e.redos.pop(),e.undos.push(r)}},t.undo=()=>{var{history:e}=t,{undos:n}=e;if(n.length>0){var r=n[n.length-1];Jb.withoutSaving(t,()=>{P.withoutNormalizing(t,()=>{var e=r.map(jd.inverse).reverse();for(var n of e)t.apply(n)})}),e.redos.push(r),e.undos.pop()}},t.apply=e=>{var{operations:r,history:i}=t,{undos:a}=i,o=a[a.length-1],s=o&&o[o.length-1],c=((e,t)=>!(!t||e.type!==`set_selection`||t.type!==`set_selection`))(e,s),l=Jb.isSaving(t),u=Jb.isMerging(t);if(l??=((e,t)=>e.type!==`set_selection`||e.properties!=null&&e.newProperties!=null)(e),l){if(u??=o!=null&&(r.length!==0||((e,t)=>e.type===`set_selection`||!(!t||e.type!==`insert_text`||t.type!==`insert_text`||e.offset!==t.offset+t.text.length||!I.equals(e.path,t.path))||!(!t||e.type!==`remove_text`||t.type!==`remove_text`||e.offset+e.text.length!==t.offset||!I.equals(e.path,t.path)))(e,s)||c),o&&u)c&&o.pop(),o.push(e);else{var d=[e];a.push(d)}for(;a.length>100;)a.shift();(e=>e.type!==`set_selection`)(e)&&(i.redos=[])}n(e)},t})(function(e){var t=e,n=t.insertText,r=t.insertNode,i=t.insertFragment,a=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var r=K.getLeftLengthOfMaxLength(t);r<=0||(r0&&r.removeAllRanges(),n&&B.deselect(e)},t.move=function(t,n){n===void 0&&(n=!1),t&&(t<0||B.move(e,{distance:t,unit:`character`,reverse:n}))},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=OC.get(t);e!=null&&(t.focus(),B.select(t,e))},t.getSelectionPosition=function(){return TE(t)},t.getNodePosition=function(e){return EE(t,e)},t.isSelectedAll=function(){var e=t.selection;if(e==null)return!1;var n=wS(R.edges(e),2),r=n[0],i=n[1],a=wS(P.edges(t,[]),2),o=a[0],s=a[1];return!(!L.equals(r,o)||!L.equals(i,s))},t.selectAll=function(){var e=P.start(t,[]),n=P.end(t,[]);B.select(t,{anchor:e,focus:n})},t}(function(e){var t=e,n=t.onChange,r=t.insertText,i=t.apply,a=t.deleteBackward;return t.insertText=function(e){t.getConfig().readOnly||r(e)},t.apply=function(e){var n,r,a,o,s,c,l,u,d=[];switch(e.type){case`insert_text`:case`remove_text`:case`set_node`:try{for(var f=CS(P.levels(t,{at:e.path})),p=f.next();!p.done;p=f.next()){var m=wS(p.value,2),h=m[0],g=m[1],_=K.findKey(t,h);d.push([g,_])}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}break;case`insert_node`:case`remove_node`:case`merge_node`:case`split_node`:try{for(var v=CS(P.levels(t,{at:I.parent(e.path)})),y=v.next();!y.done;y=v.next()){var b=wS(y.value,2);h=b[0],g=b[1],_=K.findKey(t,h),d.push([g,_])}}catch(e){a={error:e}}finally{try{y&&!y.done&&(o=v.return)&&o.call(v)}finally{if(a)throw a.error}}break;case`move_node`:try{for(var x=CS(P.levels(t,{at:I.common(I.parent(e.path),I.parent(e.newPath))})),S=x.next();!S.done;S=x.next()){var C=wS(S.value,2);h=C[0],g=C[1],_=K.findKey(t,h),d.push([g,_])}}catch(e){s={error:e}}finally{try{S&&!S.done&&(c=x.return)&&c.call(x)}finally{if(s)throw s.error}}}i(e);try{for(var w=CS(d),T=w.next();!T.done;T=w.next()){var ee=wS(T.value,2);g=ee[0],_=ee[1],h=wS(P.node(t,g),1)[0],TC.set(h,_)}}catch(e){l={error:e}}finally{try{T&&!T.done&&(u=w.return)&&u.call(w)}finally{if(l)throw l.error}}},t.deleteBackward=function(n){if(n!==`line`)return a(n);if(e.selection&&R.isCollapsed(e.selection)){var r=P.above(e,{match:function(t){return P.isBlock(e,t)},at:e.selection});if(r){var i=wS(r,2)[1],o=P.range(e,i,e.selection.anchor),s=function(e,t){var n=P.range(e,R.end(t)),r=Array.from(P.positions(e,{at:t})),i=0,a=r.length,o=Math.floor(a/2);if(wT(e,P.range(e,r[i]),n))return P.range(e,r[i],n);if(r.length<2)return P.range(e,r[r.length-1],n);for(;o!==r.length&&o!==i;)wT(e,P.range(e,r[o]),n)?a=o:i=o,o=Math.floor((i+a)/2);return P.range(e,r[a],n)}(t,o);R.isCollapsed(s)||B.delete(e,{at:s})}}},t.onChange=function(){var e=t.selection;e!=null&&OC.set(t,e),t.emit(`change`),n()},t.handleTab=function(){t.insertText(` `)},t.getHtml=function(){var e=t.children;return(e===void 0?[]:e).map(function(e){return xT(e,t)}).join(``)},t.getText=function(){var e=t.children;return(e===void 0?[]:e).map(function(e){return F.string(e)}).join(` +`)},t.getSelectionText=function(){var n=t.selection;return n==null?``:P.string(e,n)},t.getElemsByType=function(e,n){var r,i;n===void 0&&(n=!1);var a=[],o=P.nodes(t,{at:[],universal:!0});try{for(var s=CS(o),c=s.next();!c.done;c=s.next()){var l=wS(c.value,1)[0];if(N.isElement(l)&&(n?l.type.indexOf(e)>=0:l.type===e)){var u=ST(K.findKey(t,l).id);a.push(SS(SS({},l),{id:u}))}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return a},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,n=e===void 0?[]:e;if(n.length>1)return!1;var r=n[0];if(r==null)return!0;if(N.isElement(r)&&r.type===`paragraph`){var i=r.children,a=i===void 0?[]:i;if(a.length>1)return!1;var o=a[0];if(o==null||z.isText(o)&&o.text===``)return!0}return!1},t.clear=function(){B.delete(t,{at:{anchor:P.start(t,[]),focus:P.end(t,[])}}),t.children.length===0&&B.insertNodes(t,[{type:`paragraph`,children:[{text:``}]}])},t.getParentNode=function(e){return K.getParentNode(t,e)},t.dangerouslyInsertHtml=function(e,n){if(e===void 0&&(e=``),n===void 0&&(n=!1),e){var r=document.createElement(`div`);r.innerHTML=e;var i=Array.from(r.childNodes);if(i=i.filter(function(e){var t=e.nodeType,n=e.nodeName;return t===MC.TEXT_NODE||t===MC.ELEMENT_NODE&&!$T.has(n.toLowerCase())}),i.length!==0){var a=t.selection;if(a!=null){var o=null;K.isSelectedEmptyParagraph(t)&&!n&&(o=[a.focus.path[0]]),r.setAttribute(`hidden`,`true`),document.body.appendChild(r);var s=0;i.forEach(function(e){var n=e.nodeType,r=e.nodeName,i=e.textContent,a=i===void 0?``:i;if(n!==MC.TEXT_NODE)if(r!==`BR`){var o=e,c=!1;if(TT.includes(r.toLowerCase()))c=!0;else for(var l in OT)if(o.matches(l)){c=!0;break}if(c){var u=GT(V(o),t);return Array.isArray(u)?(u.forEach(function(e){return eE(t,e)}),s++):(eE(t,u),s++),void(K.isSelectedVoidNode(t)&&t.move(1))}var d=window.getComputedStyle(o).display;K.isSelectedEmptyParagraph(t)||d.indexOf(`inline`)<0&&t.insertBreak(),t.dangerouslyInsertHtml(o.innerHTML,!0)}else t.insertText(` +`);else{if(!a||!a.trim())return;t.insertNode({text:a})}}),s&&o&&K.isEmptyPath(t,o)&&B.removeNodes(t,{at:o}),r.remove()}}}},t.setHtml=function(e){e===void 0&&(e=``);var n=t.isDisabled(),r=t.isFocused(),i=JSON.stringify(t.selection);t.enable(),t.focus(),t.clear();var a=qT(t,e);if(B.insertFragment(t,a),r||(t.deselect(),t.blur()),n&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(i))}catch{t.select(P.start(t,[]))}},t}(function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in YC)e.push(t);return e},t.getConfig=function(){var e=hC.get(t);if(e==null)throw Error(`Can not get editor config`);return e},t.getMenuConfig=function(e){var n=t.getConfig().MENU_CONF;return(n===void 0?{}:n)[e]||{}},t.alert=function(e,n){n===void 0&&(n=`info`);var r=t.getConfig().customAlert;r&&r(e,n)},t}(function(e){var t=tE(ine());return t.id=`wangEditor-`+ poe++,t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(K.toDOMNode(t,t).focus({preventScroll:!0}),DC.set(t,!0),e){var n=P.end(t,[]);B.select(t,n)}else{var r=OC.get(t);r?B.select(t,r):B.select(t,P.start(t,[]))}},t.isFocused=function(){return!!DC.get(t)},t.blur=function(){K.toDOMNode(t,t).blur(),B.deselect(t),DC.set(t,!1)},t.updateView=function(){K.getTextarea(t).changeViewState();var e=K.getToolbar(t);e&&e.changeToolbarState();var n=K.getHoverbar(t);n&&n.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=K.getTextarea(t);e.destroy(),oC.delete(t),sC.delete(e);var n=K.getToolbar(t);n&&(n.destroy(),lC.delete(t),cC.delete(n));var r=K.getHoverbar(t);r&&(r.destroy(),dC.delete(t),uC.delete(r)),t.isDestroyed=!0,t.emit(`destroyed`)}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var n=`编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能`;return n+=` +You has disabled editor scroll, please do this yourself`,void console.warn(n)}var r=V(`#`+e);if(r.length!==0){var i=r[0];if(!K.hasDOMNode(t,i))return n=`Element (found by id is '`+e+`') is not in editor DOM`,n+=` + 通过 id '`+e+`' 找到的 element 不在 editor DOM 之内`,void console.error(n,i);var a=K.getTextarea(t),o=a.$textAreaContainer,s=a.$scroll,c=r.offset().top,l=o.offset().top;s[0].scrollBy({top:c-l,behavior:`smooth`})}},t.showProgressBar=function(e){e<1||K.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=pC.get(t);e?.forEach(function(e){return e.hide()})},t.enable=function(){t.getConfig().readOnly=!1,t.updateView()},t.disable=function(){t.getConfig().readOnly=!0,t.updateView()},t.isDisabled=function(){return t.getConfig().readOnly},t.toDOMNode=function(e){return K.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,n=K.getToolbar(t);n&&(e=n.$box);var r=K.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==r[0])throw Error(`Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent +不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致`);r.addClass(`w-e-full-screen-container`);var i=r.css(`z-index`);r.attr(`data-z-index`,i.toString()),t.isFullScreen=!0,t.emit(`fullScreen`)}},t.unFullScreen=function(){if(t.isFullScreen){var e=K.getTextarea(t).$box.parent();setTimeout(function(){e.removeClass(`w-e-full-screen-container`),t.isFullScreen=!1,t.emit(`unFullScreen`)},200)}},t.getEditableContainer=function(){return K.getTextarea(t).$textAreaContainer[0]},t}()))))));if(n&&function(e,t){return KT(e,`data-w-e-textarea`,t)}(l,n))throw Error(`Repeated create editor by selector '`+n+`'`);var u=function(e){e===void 0&&(e={});var t=sh(JC),n={},r=e.MENU_CONF,i=r===void 0?{}:r;return Xp(t,function(e,t){n[t]=SS(SS({},e),i[t]||{})}),delete e.MENU_CONF,SS({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},customAlert:function(e,t){window.alert(t+`: +`+e)}},e)}(i);hC.set(l,u);var d=u.hoverbarKeys,f=d===void 0?{}:d;if(c.forEach(function(e){l=e(l)}),o!=null&&(l.children=qT(l,o)),a&&a.length&&(l.children=a),l.children.length===0&&(l.children=[{type:`paragraph`,children:[{text:``}]}]),K.normalizeContent(l),n){var p=new iD(n);oC.set(l,p),sC.set(p,l),p.changeViewState(),bT(function(){var e=p.$scroll;e!=null&&e.height()<300&&console.warn(`编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常 +Textarea height < 300px . This may be cause modal and hoverbar position error`,e)});var m=void 0;Object.keys(f).length>0&&(m=new TD,uC.set(m,l),dC.set(l,m)),l.on(`change`,function(){l.hidePanelOrModal()}),l.on(`scroll`,function(){l.hidePanelOrModal()})}else l.children.forEach(function(e,t){return ED(e,t,l,l)});var h=u.onCreated,g=u.onDestroyed;return h&&l.on(`created`,function(){return h(l)}),g&&l.on(`destroyed`,function(){return g(l)}),bT(function(){return l.emit(`created`)}),l}var OD=Kx(`splice`),kD=W.TypeError,AD=Math.max,jD=Math.min;Ub({target:`Array`,proto:!0,forced:!OD},{splice:function(e,t){var n,r,i,a,o,s,c=hv(this),l=ob(c),u=Nb(e,l),d=arguments.length;if(d===0?n=r=0:d===1?(n=0,r=l-u):(n=d-2,r=jD(AD(rb(t),0),l-u)),l+n-r>9007199254740991)throw kD(`Maximum allowed length exceeded`);for(i=vb(c,r),a=0;al-r+n;a--)delete c[a-1]}else if(n>r)for(a=l-r;a>u;a--)s=a+n-1,(o=a+r-1)in c?c[s]=c[o]:delete c[s];for(a=0;a`),this.menus={},this.toolbarItems=[],this.config={},this.changeToolbarState=oh(function(){n.toolbarItems.forEach(function(e){e.changeMenuState()})},200),this.config=t;var r=V(e);if(r.length===0)throw Error(`Cannot find toolbar DOM by selector '`+e+`'`);this.$box=r;var i=this.$toolbar;i.on(`mousedown`,function(e){return e.preventDefault()},{passive:!1}),r.append(i),bT(function(){n.registerItems(),n.changeToolbarState(),n.getEditorInstance().on(`change`,n.changeToolbarState)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.registerItems=function(){var e=this,t=``,n=this.$toolbar,r=this.config,i=r.toolbarKeys,a=i===void 0?[]:i,o=r.insertKeys,s=o===void 0?{index:0,keys:[]}:o,c=r.excludeKeys,l=c===void 0?[]:c,u=sh(a);s.keys.length>0&&(typeof s.keys==`string`&&(s.keys=[s.keys]),s.keys.forEach(function(e,t){u.splice(s.index+t,0,e)}));var d=u.filter(function(e){if(typeof e==`string`){if(l.includes(e))return!1}else if(l.includes(e.key))return!1;return!0}),f=d.length;d.forEach(function(r,i){if(r===`|`){if(i===0||i+1===f||t===`|`)return;var a=sD();return n.append(a),void(t=r)}if(typeof r==`string`)return e.registerSingleItem(r,e),void(t=r);e.registerGroup(r),t=`group`})},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new bD(e)}(e),i=e.menuKeys,a=i===void 0?[]:i,o=this.config.excludeKeys,s=o===void 0?[]:o;a.forEach(function(e){s.includes(e)||t.registerSingleItem(e,r)}),n.append(r.$elem)},e.prototype.registerSingleItem=function(e,t){var n=this.getEditorInstance(),r=t instanceof bD,i=this.menus,a=i[e];if(a==null){var o=YC[e];if(o==null)throw Error(`Not found menu item factory by key '`+e+`'`);if(typeof o!=`function`)throw Error(`Menu item factory (key='`+e+`') is not a function`);a=o(),i[e]=a}else console.warn(`Duplicated toolbar menu key '`+e+`' +重复注册了菜单栏 menu '`+e+`'`);var s=CD(e,a,r);this.toolbarItems.push(s),fC.set(s,n),r?t.appendBarItem(s):t.$toolbar.append(s.$elem)},e.prototype.getEditorInstance=function(){var e=cC.get(this);if(e==null)throw Error(`Can not get editor instance`);return e},e.prototype.destroy=function(){this.$toolbar.remove(),this.menus={},this.toolbarItems=[]},e}(),ND=Iy.EXISTS,PD=fy.f,FD=Function.prototype,ID=G(FD.toString),LD=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,RD=G(LD.exec);function zD(e){var t=e.server,n=t===void 0?``:t,r=e.fieldName,i=r===void 0?``:r,a=e.maxFileSize,o=a===void 0?10485760:a,s=e.maxNumberOfFiles,c=s===void 0?100:s,l=e.meta,u=l===void 0?{}:l,d=e.metaWithUrl,f=d!==void 0&&d,p=e.headers,m=p===void 0?{}:p,h=e.withCredentials,g=h!==void 0&&h,_=e.timeout,v=_===void 0?1e4:_,y=e.onBeforeUpload,b=y===void 0?function(e){return e}:y,x=e.onSuccess,S=x===void 0?function(e,t){}:x,C=e.onError,w=C===void 0?function(e,t,n){console.error(e.name+` upload error`,t,n)}:C,T=e.onProgress,ee=T===void 0?function(e){}:T;if(!n)throw Error(`Cannot get upload server address +没有配置上传地址`);if(!i)throw Error(`Cannot get fieldName +没有配置 fieldName`);var E=n;f&&(E=function(e,t){var n=wS(e.split(`#`),2),r=n[0],i=n[1],a=[];Xp(t,function(e,t){a.push(t+`=`+e)});var o=a.join(`&`);return r=r.indexOf(`?`)>0?r+`&`+o:r+`?`+o,i?r+`#`+i:r}(E,u));var te=new Dg({onBeforeUpload:b,restrictions:{maxFileSize:o,maxNumberOfFiles:c},meta:u}).use(Q_,{endpoint:E,headers:m,formData:!0,fieldName:i,bundle:!0,withCredentials:g,timeout:v});return te.on(`upload-success`,function(e,t){var n=t.body,r=n===void 0?{}:n;try{S(e,r)}catch(e){console.error(`wangEditor upload file - onSuccess error`,e)}te.removeFile(e.id)}),te.on(`progress`,function(e){e<1||ee(e)}),te.on(`upload-error`,function(e,t,n){try{w(e,t,n)}catch(e){console.error(`wangEditor upload file - onError error`,e)}te.removeFile(e.id)}),te.on(`restriction-failed`,function(e,t){try{w(e,t)}catch(e){console.error(`wangEditor upload file - onError error`,e)}te.removeFile(e.id)}),te}function BD(e){return BD=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},BD(e)}function VD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HD(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};UD(this,e),this.init(t,n)}return GD(e,[{key:`init`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||`i18next:`,this.logger=e||ZD,this.options=t,this.debug=t.debug}},{key:`setDebug`,value:function(e){this.debug=e}},{key:`log`,value:function(){for(var e=arguments.length,t=Array(e),n=0;n1?t-1:0),r=1;r-1?e.replace(/###/g,`.`):e}function i(){return!e||typeof e==`string`}for(var a=typeof t==`string`?t.split(`.`):[].concat(t);a.length>1;){if(i())return{};var o=r(a.shift());!e[o]&&n&&(e[o]=new n),e=Object.prototype.hasOwnProperty.call(e,o)?e[o]:{}}return i()?{}:{obj:e,k:r(a.shift())}}function iO(e,t,n){var r=rO(e,t,Object);r.obj[r.k]=n}function aO(e,t){var n=rO(e,t),r=n.obj,i=n.k;if(r)return r[i]}function oO(e,t,n){var r=aO(e,n);return r===void 0?aO(t,n):r}function sO(e,t,n){for(var r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?typeof e[r]==`string`||e[r]instanceof String||typeof t[r]==`string`||t[r]instanceof String?n&&(e[r]=t[r]):sO(e[r],t[r],n):e[r]=t[r]);return e}function cO(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`)}var lO={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`};function uO(e){return typeof e==`string`?e.replace(/[&<>"'\/]/g,function(e){return lO[e]}):e}var dO=typeof window<`u`&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf(`MSIE`)>-1;function fO(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`.`;if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,a=0;aa+o;)o++,c=i[s=r.slice(a,a+o).join(n)];if(c===void 0)return;if(typeof c==`string`)return c;if(s&&typeof c[s]==`string`)return c[s];var l=r.slice(a+o).join(n);return l?fO(c,l,n):void 0}i=i[r[a]]}return i}}var pO=function(e){function t(e){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:[`translation`],defaultNS:`translation`};return UD(this,t),n=qD(this,JD(t).call(this)),dO&&$D.call(KD(n)),n.data=e||{},n.options=r,n.options.keySeparator===void 0&&(n.options.keySeparator=`.`),n.options.ignoreJSONStructure===void 0&&(n.options.ignoreJSONStructure=!0),n}return XD(t,$D),GD(t,[{key:`addNamespaces`,value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:`removeNamespaces`,value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:`getResource`,value:function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o=[e,t];n&&typeof n!=`string`&&(o=o.concat(n)),n&&typeof n==`string`&&(o=o.concat(i?n.split(i):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`));var s=aO(this.data,o);return s||!a||typeof n!=`string`?s:fO(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:`addResource`,value:function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},a=this.options.keySeparator;a===void 0&&(a=`.`);var o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(r=t,t=(o=e.split(`.`))[1]),this.addNamespaces(t),iO(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}},{key:`addResources`,value:function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var i in n)typeof n[i]!=`string`&&Object.prototype.toString.apply(n[i])!==`[object Array]`||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit(`added`,e,t,n)}},{key:`addResourceBundle`,value:function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},o=[e,t];e.indexOf(`.`)>-1&&(r=n,n=t,t=(o=e.split(`.`))[1]),this.addNamespaces(t);var s=aO(this.data,o)||{};r?sO(s,n,i):s=HD({},s,n),iO(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}},{key:`removeResourceBundle`,value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}},{key:`hasResourceBundle`,value:function(e,t){return this.getResource(e,t)!==void 0}},{key:`getResourceBundle`,value:function(e,t){return t||=this.options.defaultNS,this.options.compatibilityAPI===`v1`?HD({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:`getDataByLanguage`,value:function(e){return this.data[e]}},{key:`toJSON`,value:function(){return this.data}}]),t}(),mO={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var a=this;return e.forEach(function(e){a.processors[e]&&(t=a.processors[e].process(t,n,r,i))}),t}},hO={},gO=function(e){function t(e){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return UD(this,t),n=qD(this,JD(t).call(this)),dO&&$D.call(KD(n)),nO([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,KD(n)),n.options=r,n.options.keySeparator===void 0&&(n.options.keySeparator=`.`),n.logger=QD.create(`translator`),n}return XD(t,$D),GD(t,[{key:`changeLanguage`,value:function(e){e&&(this.language=e)}},{key:`exists`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;var n=this.resolve(e,t);return n&&n.res!==void 0}},{key:`extractFromKey`,value:function(e,t){var n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);var r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:i};var o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return typeof i==`string`&&(i=[i]),{key:e,namespaces:i}}},{key:`translate`,value:function(e,n,r){var i=this;if(BD(n)!==`object`&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||={},e==null)return``;Array.isArray(e)||(e=[String(e)]);var a=n.keySeparator===void 0?this.options.keySeparator:n.keySeparator,o=this.extractFromKey(e[e.length-1],n),s=o.key,c=o.namespaces,l=c[c.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()===`cimode`){if(d){var f=n.nsSeparator||this.options.nsSeparator;return l+f+s}return s}var p=this.resolve(e,n),m=p&&p.res,h=p&&p.usedKey||s,g=p&&p.exactUsedKey||s,_=Object.prototype.toString.apply(m),v=[`[object Number]`,`[object Function]`,`[object RegExp]`],y=n.joinArrays===void 0?this.options.joinArrays:n.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,x=typeof m!=`string`&&typeof m!=`boolean`&&typeof m!=`number`;if(b&&m&&x&&v.indexOf(_)<0&&(typeof y!=`string`||_!==`[object Array]`)){if(!n.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`),this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,m,HD({},n,{ns:c})):`key '${s} (${this.language})' returned an object instead of string.`;if(a){var S=_===`[object Array]`,C=S?[]:{},w=S?g:h;for(var T in m)if(Object.prototype.hasOwnProperty.call(m,T)){var ee=`${w}${a}${T}`;C[T]=this.translate(ee,HD({},n,{joinArrays:!1,ns:c})),C[T]===ee&&(C[T]=m[T])}m=C}}else if(b&&typeof y==`string`&&_===`[object Array]`)(m=m.join(y))&&(m=this.extendTranslation(m,e,n,r));else{var E=!1,te=!1,ne=n.count!==void 0&&typeof n.count!=`string`,re=t.hasDefaultValue(n),ie=ne?this.pluralResolver.getSuffix(u,n.count):``,D=n[`defaultValue${ie}`]||n.defaultValue;!this.isValidLookup(m)&&re&&(E=!0,m=D),this.isValidLookup(m)||(te=!0,m=s);var ae=n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,oe=ae&&te?void 0:m,O=re&&D!==m&&this.options.updateMissing;if(te||E||O){if(this.logger.log(O?`updateKey`:`missingKey`,u,l,s,O?D:m),a){var se=this.resolve(s,HD({},n,{keySeparator:!1}));se&&se.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.`)}var ce=[],le=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo===`fallback`&&le&&le[0])for(var ue=0;ue1&&arguments[1]!==void 0?arguments[1]:{};return typeof e==`string`&&(e=[e]),e.forEach(function(e){if(!o.isValidLookup(t)){var c=o.extractFromKey(e,s),l=c.key;n=l;var u=c.namespaces;o.options.fallbackNS&&(u=u.concat(o.options.fallbackNS));var d=s.count!==void 0&&typeof s.count!=`string`,f=s.context!==void 0&&(typeof s.context==`string`||typeof s.context==`number`)&&s.context!==``,p=s.lngs?s.lngs:o.languageUtils.toResolveHierarchy(s.lng||o.language,s.fallbackLng);u.forEach(function(e){o.isValidLookup(t)||(a=e,!hO[`${p[0]}-${e}`]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(a)&&(hO[`${p[0]}-${e}`]=!0,o.logger.warn(`key "${n}" for languages "${p.join(`, `)}" won't get resolved as namespace "${a}" 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!!!`)),p.forEach(function(n){if(!o.isValidLookup(t)){i=n;var a,c,u=l,p=[u];for(o.i18nFormat&&o.i18nFormat.addLookupKeys?o.i18nFormat.addLookupKeys(p,l,n,e,s):(d&&(a=o.pluralResolver.getSuffix(n,s.count)),d&&f&&p.push(u+a),f&&p.push(u+=`${o.options.contextSeparator}${s.context}`),d&&p.push(u+=a));c=p.pop();)o.isValidLookup(t)||(r=c,t=o.getResource(n,e,c,s))}}))})}}),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:a}}},{key:`isValidLookup`,value:function(e){return!(e===void 0||!this.options.returnNull&&e===null||!this.options.returnEmptyString&&e===``)}},{key:`getResource`,value:function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:`hasDefaultValue`,value:function(e){var t=`defaultValue`;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}]),t}();function _O(e){return e.charAt(0).toUpperCase()+e.slice(1)}var hse=function(){function e(t){UD(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=QD.create(`languageUtils`)}return GD(e,[{key:`getScriptPartFromCode`,value:function(e){if(!e||e.indexOf(`-`)<0)return null;var t=e.split(`-`);return t.length===2?null:(t.pop(),t[t.length-1].toLowerCase()===`x`?null:this.formatLanguageCode(t.join(`-`)))}},{key:`getLanguagePartFromCode`,value:function(e){if(!e||e.indexOf(`-`)<0)return e;var t=e.split(`-`);return this.formatLanguageCode(t[0])}},{key:`formatLanguageCode`,value:function(e){if(typeof e==`string`&&e.indexOf(`-`)>-1){var t=[`hans`,`hant`,`latn`,`cyrl`,`cans`,`mong`,`arab`],n=e.split(`-`);return this.options.lowerCaseLng?n=n.map(function(e){return e.toLowerCase()}):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=_O(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!==`sgn`&&n[2].length===2&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=_O(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=_O(n[2].toLowerCase()))),n.join(`-`)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:`isWhitelisted`,value:function(e){return this.logger.deprecate(`languageUtils.isWhitelisted`,`function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it's usage asap.`),this.isSupportedCode(e)}},{key:`isSupportedCode`,value:function(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:`getBestMatchFromCodes`,value:function(e){var t,n=this;return e?(e.forEach(function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find(function(e){if(e.indexOf(r)===0)return e})}}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t):null}},{key:`getFallbackCodes`,value:function(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),typeof e==`string`&&(e=[e]),Object.prototype.toString.apply(e)===`[object Array]`)return e;if(!t)return e.default||[];var n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}},{key:`toResolveHierarchy`,value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],a=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return typeof e==`string`&&e.indexOf(`-`)>-1?(this.options.load!==`languageOnly`&&a(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&a(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&a(this.getLanguagePartFromCode(e))):typeof e==`string`&&a(this.formatLanguageCode(e)),r.forEach(function(e){i.indexOf(e)<0&&a(n.formatLanguageCode(e))}),i}}]),e}(),gse=[{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`.split(`.`),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}],_se={1:function(e){return Number(e>1)},2:function(e){return Number(e!=1)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(e==1?0:e>=2&&e<=4?1:2)},7:function(e){return Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(e==1?0:e==2?1:e!=8&&e!=11?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(e==1?0:e==2?1:e<7?2:e<11?3:4)},11:function(e){return Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(e!==0)},14:function(e){return Number(e==1?0:e==2?1:e==3?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:e===0?2:1)},17:function(e){return Number(e==1||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(e==0?0:e==1?1:2)},19:function(e){return Number(e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(e==1?0:e==0||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3)}};function vse(){var e={};return gse.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:_se[t.fc]}})}),e}var yse=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};UD(this,e),this.languageUtils=t,this.options=n,this.logger=QD.create(`pluralResolver`),this.rules=vse()}return GD(e,[{key:`addRule`,value:function(e,t){this.rules[e]=t}},{key:`getRule`,value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:`needsPlural`,value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:`getPluralFormsOfKey`,value:function(e,t){return this.getSuffixes(e).map(function(e){return t+e})}},{key:`getSuffixes`,value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map(function(n){return t.getSuffix(e,n)}):[]}},{key:`getSuffix`,value:function(e,t){var n=this,r=this.getRule(e);if(r){var i=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),a=r.numbers[i];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(a===2?a=`plural`:a===1&&(a=``));var o=function(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON===`v1`?a===1?``:typeof a==`number`?`_plural_${a.toString()}`:o():this.options.compatibilityJSON===`v2`||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?o():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn(`no plural rule found for: ${e}`),``}}]),e}(),bse=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};UD(this,e),this.logger=QD.create(`interpolator`),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return GD(e,[{key:`init`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||={escapeValue:!0};var t=e.interpolation;this.escape=t.escape===void 0?uO:t.escape,this.escapeValue=t.escapeValue===void 0||t.escapeValue,this.useRawValueToEscape=t.useRawValueToEscape!==void 0&&t.useRawValueToEscape,this.prefix=t.prefix?cO(t.prefix):t.prefixEscaped||`{{`,this.suffix=t.suffix?cO(t.suffix):t.suffixEscaped||`}}`,this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||`,`,this.unescapePrefix=t.unescapeSuffix?``:t.unescapePrefix||`-`,this.unescapeSuffix=this.unescapePrefix?``:t.unescapeSuffix||``,this.nestingPrefix=t.nestingPrefix?cO(t.nestingPrefix):t.nestingPrefixEscaped||cO(`$t(`),this.nestingSuffix=t.nestingSuffix?cO(t.nestingSuffix):t.nestingSuffixEscaped||cO(`)`),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||`,`,this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=t.alwaysFormat!==void 0&&t.alwaysFormat,this.resetRegExp()}},{key:`reset`,value:function(){this.options&&this.init(this.options)}},{key:`resetRegExp`,value:function(){var e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,`g`);var t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,`g`);var n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,`g`)}},{key:`interpolate`,value:function(e,t,n,r){var i,a,o,s=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,`$$$$`)}var u=function(e){if(e.indexOf(s.formatSeparator)<0){var i=oO(t,c,e);return s.alwaysFormat?s.format(i,void 0,n,HD({},r,t,{interpolationkey:e})):i}var a=e.split(s.formatSeparator),o=a.shift().trim(),l=a.join(s.formatSeparator).trim();return s.format(oO(t,c,o),l,n,HD({},r,t,{interpolationkey:o}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p=[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?l(s.escape(e)):l(e)}}];return p.forEach(function(t){for(o=0;i=t.regex.exec(e);){if((a=u(i[1].trim()))===void 0)if(typeof d==`function`){var n=d(e,i,r);a=typeof n==`string`?n:``}else{if(f){a=i[0];continue}s.logger.warn(`missed to pass in variable ${i[1]} for interpolating ${e}`),a=``}else typeof a==`string`||s.useRawValueToEscape||(a=tO(a));var c=t.safeValue(a);if(e=e.replace(i[0],c),f?(t.regex.lastIndex+=c.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++o>=s.maxReplaces)break}}),e}},{key:`nest`,value:function(e,t){var n,r,i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=HD({},a);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(RegExp(`${n}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=(i=this.interpolate(i,o)).replace(/'/g,`"`);try{o=JSON.parse(i),t&&(o=HD({},t,o))}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return delete o.defaultValue,e}for(o.applyPostProcessor=!1,delete o.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],l=!1;if(n[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map(function(e){return e.trim()});n[1]=u.shift(),c=u,l=!0}if((r=t(s.call(this,n[1].trim(),o),o))&&n[0]===e&&typeof r!=`string`)return r;typeof r!=`string`&&(r=tO(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=``),l&&(r=c.reduce(function(e,t){return i.format(e,t,a.lng,HD({},a,{interpolationkey:n[1].trim()}))},r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),xse=function(e){function t(e,n,r){var i,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return UD(this,t),i=qD(this,JD(t).call(this)),dO&&$D.call(KD(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=a,i.logger=QD.create(`backendConnector`),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,a.backend,a),i}return XD(t,$D),GD(t,[{key:`queueLoad`,value:function(e,t,n,r){var i=this,a=[],o=[],s=[],c=[];return e.forEach(function(e){var r=!0;t.forEach(function(t){var s=`${e}|${t}`;!n.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(i.state[s]===1?o.indexOf(s)<0&&o.push(s):(i.state[s]=1,r=!1,o.indexOf(s)<0&&o.push(s),a.indexOf(s)<0&&a.push(s),c.indexOf(t)<0&&c.push(t)))}),r||s.push(e)}),(a.length||o.length)&&this.queue.push({pending:o,loaded:{},errors:[],callback:r}),{toLoad:a,pending:o,toLoadLanguages:s,toLoadNamespaces:c}}},{key:`loaded`,value:function(e,t,n){var r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),n&&this.store.addResourceBundle(i,a,n),this.state[e]=t?-1:2;var o={};this.queue.forEach(function(n){(function(e,t,n,r){var i=rO(e,t,Object),a=i.obj,o=i.k;a[o]=a[o]||[],a[o].push(n)})(n.loaded,[i],a),function(e,t){for(var n=e.indexOf(t);n!==-1;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),n.pending.length!==0||n.done||(Object.keys(n.loaded).forEach(function(e){o[e]||(o[e]=[]),n.loaded[e].length&&n.loaded[e].forEach(function(t){o[e].indexOf(t)<0&&o[e].push(t)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(function(e){return!e.done})}},{key:`read`,value:function(e,t,n){var r=this,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:350,o=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,function(s,c){s&&c&&i<5?setTimeout(function(){r.read.call(r,e,t,n,i+1,2*a,o)},a):o(s,c)}):o(null,{})}},{key:`prepareLoading`,value:function(e,t){var n=this,r=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 e==`string`&&(e=this.languageUtils.toResolveHierarchy(e)),typeof t==`string`&&(t=[t]);var a=this.queueLoad(e,t,r,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(function(e){n.loadOne(e)})}},{key:`load`,value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:`reload`,value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:`loadOne`,value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``,r=e.split(`|`),i=r[0],a=r[1];this.read(i,a,`read`,void 0,void 0,function(r,o){r&&t.logger.warn(`${n}loading namespace ${a} for language ${i} failed`,r),!r&&o&&t.logger.log(`${n}loaded namespace ${a} for language ${i}`,o),t.loaded(e,r,o)})}},{key:`saveMissing`,value:function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn(`did not save key "${n}" as the namespace "${t}" 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!!!`):n!=null&&n!==``&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,HD({},a,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}();function Sse(){return{debug:!1,initImmediate:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if(BD(e[1])===`object`&&(t=e[1]),typeof e[1]==`string`&&(t.defaultValue=e[1]),typeof e[2]==`string`&&(t.tDescription=e[2]),BD(e[2])===`object`||BD(e[3])===`object`){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!1}}}function vO(e){return typeof e.ns==`string`&&(e.ns=[e.ns]),typeof e.fallbackLng==`string`&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS==`string`&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf(`cimode`)<0&&(e.whitelist=e.whitelist.concat([`cimode`])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e}function yO(){}var Cse=function(e){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(UD(this,t),e=qD(this,JD(t).call(this)),dO&&$D.call(KD(e)),e.options=vO(n),e.services={},e.logger=QD,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),qD(e,KD(e));setTimeout(function(){e.init(n,r)},0)}return e}return XD(t,$D),GD(t,[{key:`init`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?typeof e==`function`?new e:e:null}if(typeof t==`function`&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate(`whitelist`,`option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.`),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate(`whitelist`,`options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.`),this.options=HD({},Sse(),this.options,vO(t)),this.format=this.options.interpolation.format,n||=yO,!this.options.isClone){this.modules.logger?QD.init(r(this.modules.logger),this.options):QD.init(null,this.options);var i=new hse(this.options);this.store=new pO(this.options.resources,this.options);var a=this.services;a.logger=QD,a.resourceStore=this.store,a.languageUtils=i,a.pluralResolver=new yse(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new bse(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new xse(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on(`*`,function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&o[0]!==`dev`&&(this.options.lng=o[0])}this.services.languageDetector||this.options.lng||this.logger.warn(`init: no languageDetector is used and no lng is defined`);var s=[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`];s.forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}});var c=[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`];c.forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}});var l=eO(),u=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn(`init: i18next is already initialized. You should call init just once!`),e.isInitialized=!0,e.options.isClone||e.logger.log(`initialized`,e.options),e.emit(`initialized`,e.options),l.resolve(r),n(t,r)};if(e.languages&&e.options.compatibilityAPI!==`v1`&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}},{key:`loadResources`,value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yO,r=n,i=typeof e==`string`?e:this.language;if(typeof e==`function`&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()===`cimode`)return r();var a=[],o=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){a.indexOf(e)<0&&a.push(e)})};if(i)o(i);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach(function(e){return o(e)})}this.options.preload&&this.options.preload.forEach(function(e){return o(e)}),this.services.backendConnector.load(a,this.options.ns,r)}else r(null)}},{key:`reloadResources`,value:function(e,t,n){var r=eO();return e||=this.languages,t||=this.options.ns,n||=yO,this.services.backendConnector.reload(e,t,function(e){r.resolve(),n(e)}),r}},{key:`use`,value:function(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&mO.addPostProcessor(e),e.type===`3rdParty`&&this.modules.external.push(e),this}},{key:`changeLanguage`,value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=eO();this.emit(`languageChanging`,e);var i=function(i){e||i||!n.services.languageDetector||(i=[]);var a=typeof i==`string`?i:n.services.languageUtils.getBestMatchFromCodes(i);a&&(n.language||(n.language=a,n.languages=n.services.languageUtils.toResolveHierarchy(a)),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,function(e){(function(e,i){i?(n.language=i,n.languages=n.services.languageUtils.toResolveHierarchy(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit(`languageChanged`,i),n.logger.log(`languageChanged`,i)):n.isLanguageChangingTo=void 0,r.resolve(function(){return n.t.apply(n,arguments)}),t&&t(e,function(){return n.t.apply(n,arguments)})})(e,a)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:`getFixedT`,value:function(e,t,n){var r=this,i=function e(t,i){var a;if(BD(i)!==`object`){for(var o=arguments.length,s=Array(o>2?o-2:0),c=2;c1&&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;var r=this.languages[0],i=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if(r.toLowerCase()===`cimode`)return!0;var o=function(e,n){var r=t.services.backendConnector.state[`${e}|${n}`];return r===-1||r===2};if(n.precheck){var s=n.precheck(this,o);if(s!==void 0)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!o(r,e)||i&&!o(a,e))}},{key:`loadNamespaces`,value:function(e,t){var n=this,r=eO();return this.options.ns?(typeof e==`string`&&(e=[e]),e.forEach(function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)}),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:`loadLanguages`,value:function(e,t){var n=eO();typeof e==`string`&&(e=[e]);var r=this.options.preload||[],i=e.filter(function(e){return r.indexOf(e)<0});return i.length?(this.options.preload=r.concat(i),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:`dir`,value:function(e){return e||=this.languages&&this.languages.length>0?this.languages[0]:this.language,e?`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`.split(`.`).indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?`rtl`:`ltr`:`rtl`}},{key:`createInstance`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:`cloneInstance`,value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yO,i=HD({},this.options,n,{isClone:!0}),a=new t(i),o=[`store`,`services`,`language`];return o.forEach(function(t){a[t]=e[t]}),a.services=HD({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new gO(a.services,a.options),a.translator.on(`*`,function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rv;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:OO(b,f)}else switch(e){case 4:return!1;case 7:OO(b,f)}return a?-1:r||i?i:b}},jse={forEach:kO(0),map:kO(1),filter:kO(2),some:kO(3),every:kO(4),find:kO(5),findIndex:kO(6),filterReject:kO(7)}.forEach,Mse=function(e,t){var n=[][e];return!!n&&Wi(function(){n.call(null,t||function(){throw 1},1)})}(`forEach`),AO=Mse?[].forEach:function(e){return jse(this,e,arguments.length>1?arguments[1]:void 0)},jO=function(e){if(e&&e.forEach!==AO)try{no(e,`forEach`,AO)}catch{e.forEach=AO}};for(var MO in al)al[MO]&&jO(j[MO]&&j[MO].prototype);jO(cl),xO(`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`},header:{title:`Header`,text:`Text`},image:{netImage:`Net image`,delete:`Delete image`,edit:`Edit image`,viewLink:`View link`,src:`Image src`,desc:`Description`,link:`Image link`},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`}}),xO(`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:`全屏`},header:{title:`标题`,text:`正文`},image:{netImage:`网络图片`,delete:`删除图片`,edit:`编辑图片`,viewLink:`查看链接`,src:`图片地址`,desc:`图片描述`,link:`图片链接`},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:`待办`}});var Nse={type:`paragraph`,renderElem:function(e,t,n){return H(`p`,null,t)}},NO=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function PO(e){var t={exports:{}};return e(t,t.exports),t.exports}var FO,IO,LO=function(e){return e&&e.Math==Math&&e},J=LO(typeof globalThis==`object`&&globalThis)||LO(typeof window==`object`&&window)||LO(typeof self==`object`&&self)||LO(typeof NO==`object`&&NO)||function(){return this}()||Function(`return this`)(),RO=function(e){try{return!!e()}catch{return!0}},zO=!RO(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),BO=Function.prototype.call,VO=BO.bind?BO.bind(BO):function(){return BO.apply(BO,arguments)},HO={}.propertyIsEnumerable,UO=Object.getOwnPropertyDescriptor,Pse=UO&&!HO.call({1:2},1)?function(e){var t=UO(this,e);return!!t&&t.enumerable}:HO,WO={f:Pse},GO=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},KO=Function.prototype,qO=KO.bind,JO=KO.call,Fse=qO&&qO.bind(JO),Y=qO?function(e){return e&&Fse(JO,e)}:function(e){return e&&function(){return JO.apply(e,arguments)}},Ise=Y({}.toString),Lse=Y(``.slice),YO=function(e){return Lse(Ise(e),8,-1)},XO=J.Object,Rse=Y(``.split),ZO=RO(function(){return!XO(`z`).propertyIsEnumerable(0)})?function(e){return YO(e)==`String`?Rse(e,``):XO(e)}:XO,zse=J.TypeError,QO=function(e){if(e==null)throw zse(`Can't call method on `+e);return e},$O=function(e){return ZO(QO(e))},ek=function(e){return typeof e==`function`},tk=function(e){return typeof e==`object`?e!==null:ek(e)},Bse=function(e){return ek(e)?e:void 0},nk=function(e,t){return arguments.length<2?Bse(J[e]):J[e]&&J[e][t]},rk=Y({}.isPrototypeOf),ik=nk(`navigator`,`userAgent`)||``,ak=J.process,ok=J.Deno,sk=ak&&ak.versions||ok&&ok.version,ck=sk&&sk.v8;ck&&(IO=(FO=ck.split(`.`))[0]>0&&FO[0]<4?1:+(FO[0]+FO[1])),!IO&&ik&&(!(FO=ik.match(/Edge\/(\d+)/))||FO[1]>=74)&&(FO=ik.match(/Chrome\/(\d+)/))&&(IO=+FO[1]);var lk=IO,uk=!!Object.getOwnPropertySymbols&&!RO(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&lk&&lk<41}),dk=uk&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Vse=J.Object,fk=dk?function(e){return typeof e==`symbol`}:function(e){var t=nk(`Symbol`);return ek(t)&&rk(t.prototype,Vse(e))},Hse=J.String,pk=function(e){try{return Hse(e)}catch{return`Object`}},Use=J.TypeError,mk=function(e){if(ek(e))return e;throw Use(pk(e)+` is not a function`)},hk=function(e,t){var n=e[t];return n==null?void 0:mk(n)},Wse=J.TypeError,Gse=Object.defineProperty,gk=function(e,t){try{Gse(J,e,{value:t,configurable:!0,writable:!0})}catch{J[e]=t}return t},_k=J[`__core-js_shared__`]||gk(`__core-js_shared__`,{}),vk=PO(function(e){(e.exports=function(e,t){return _k[e]||(_k[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.19.3`,mode:`global`,copyright:`© 2021 Denis Pushkarev (zloirock.ru)`})}),Kse=J.Object,yk=function(e){return Kse(QO(e))},qse=Y({}.hasOwnProperty),bk=Object.hasOwn||function(e,t){return qse(yk(e),t)},Jse=0,Yse=Math.random(),Xse=Y(1 .toString),xk=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+Xse(++Jse+Yse,36)},Sk=vk(`wks`),Ck=J.Symbol,wk=Ck&&Ck.for,Zse=dk?Ck:Ck&&Ck.withoutSetter||xk,Tk=function(e){if(!bk(Sk,e)||!uk&&typeof Sk[e]!=`string`){var t=`Symbol.`+e;uk&&bk(Ck,e)?Sk[e]=Ck[e]:Sk[e]=dk&&wk?wk(t):Zse(t)}return Sk[e]},Qse=J.TypeError,$se=Tk(`toPrimitive`),Ek=function(e){var t=function(e,t){if(!tk(e)||fk(e))return e;var n,r=hk(e,$se);if(r){if(t===void 0&&(t=`default`),n=VO(r,e,t),!tk(n)||fk(n))return n;throw Qse(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),function(e,t){var n,r;if(t===`string`&&ek(n=e.toString)&&!tk(r=VO(n,e))||ek(n=e.valueOf)&&!tk(r=VO(n,e))||t!==`string`&&ek(n=e.toString)&&!tk(r=VO(n,e)))return r;throw Wse(`Can't convert object to primitive value`)}(e,t)}(e,`string`);return fk(t)?t:t+``},Dk=J.document,ece=tk(Dk)&&tk(Dk.createElement),Ok=function(e){return ece?Dk.createElement(e):{}},kk=!zO&&!RO(function(){return Object.defineProperty(Ok(`div`),`a`,{get:function(){return 7}}).a!=7}),Ak=Object.getOwnPropertyDescriptor,jk={f:zO?Ak:function(e,t){if(e=$O(e),t=Ek(t),kk)try{return Ak(e,t)}catch{}if(bk(e,t))return GO(!VO(WO.f,e,t),e[t])}},tce=J.String,nce=J.TypeError,Mk=function(e){if(tk(e))return e;throw nce(tce(e)+` is not an object`)},rce=J.TypeError,Nk=Object.defineProperty,Pk={f:zO?Nk:function(e,t,n){if(Mk(e),t=Ek(t),Mk(n),kk)try{return Nk(e,t,n)}catch{}if(`get`in n||`set`in n)throw rce(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e}},Fk=zO?function(e,t,n){return Pk.f(e,t,GO(1,n))}:function(e,t,n){return e[t]=n,e},ice=Y(Function.toString);ek(_k.inspectSource)||(_k.inspectSource=function(e){return ice(e)});var Ik,Lk,Rk,zk=_k.inspectSource,Bk=J.WeakMap,ace=ek(Bk)&&/native code/.test(zk(Bk)),Vk=vk(`keys`),Hk=function(e){return Vk[e]||(Vk[e]=xk(e))},Uk={},Wk=J.TypeError,oce=J.WeakMap;if(ace||_k.state){var Gk=_k.state||=new oce,sce=Y(Gk.get),Kk=Y(Gk.has),cce=Y(Gk.set);Ik=function(e,t){if(Kk(Gk,e))throw new Wk(`Object already initialized`);return t.facade=e,cce(Gk,e,t),t},Lk=function(e){return sce(Gk,e)||{}},Rk=function(e){return Kk(Gk,e)}}else{var qk=Hk(`state`);Uk[qk]=!0,Ik=function(e,t){if(bk(e,qk))throw new Wk(`Object already initialized`);return t.facade=e,Fk(e,qk,t),t},Lk=function(e){return bk(e,qk)?e[qk]:{}},Rk=function(e){return bk(e,qk)}}var Jk={set:Ik,get:Lk,has:Rk,enforce:function(e){return Rk(e)?Lk(e):Ik(e,{})},getterFor:function(e){return function(t){var n;if(!tk(t)||(n=Lk(t)).type!==e)throw Wk(`Incompatible receiver, `+e+` required`);return n}}},Yk=Function.prototype,lce=zO&&Object.getOwnPropertyDescriptor,Xk=bk(Yk,`name`),Zk={EXISTS:Xk,PROPER:Xk&&function(){}.name===`something`,CONFIGURABLE:Xk&&(!zO||zO&&lce(Yk,`name`).configurable)},Qk=PO(function(e){var t=Zk.CONFIGURABLE,n=Jk.get,r=Jk.enforce,i=String(String).split(`String`);(e.exports=function(e,n,a,o){var s,c=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,u=!!o&&!!o.noTargetGet,d=o&&o.name!==void 0?o.name:n;ek(a)&&(String(d).slice(0,7)===`Symbol(`&&(d=`[`+String(d).replace(/^Symbol\(([^)]*)\)/,`$1`)+`]`),(!bk(a,`name`)||t&&a.name!==d)&&Fk(a,`name`,d),(s=r(a)).source||(s.source=i.join(typeof d==`string`?d:``))),e===J?l?e[n]=a:gk(n,a):(c?!u&&e[n]&&(l=!0):delete e[n],l?e[n]=a:Fk(e,n,a))})(Function.prototype,`toString`,function(){return ek(this)&&n(this).source||zk(this)})}),uce=Math.ceil,dce=Math.floor,$k=function(e){var t=+e;return t!=t||t===0?0:(t>0?dce:uce)(t)},eA=Math.max,tA=Math.min,nA=function(e,t){var n=$k(e);return n<0?eA(n+t,0):tA(n,t)},rA=Math.min,iA=function(e){return e>0?rA($k(e),9007199254740991):0},aA=function(e){return iA(e.length)},oA=function(e){return function(t,n,r){var i,a=$O(t),o=aA(a),s=nA(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},sA={includes:oA(!0),indexOf:oA(!1)},cA=sA.indexOf,lA=Y([].push),uA=function(e,t){var n,r=$O(e),i=0,a=[];for(n in r)!bk(Uk,n)&&bk(r,n)&&lA(a,n);for(;t.length>i;)bk(r,n=t[i++])&&(~cA(a,n)||lA(a,n));return a},dA=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],fA=dA.concat(`length`,`prototype`),pA={f:Object.getOwnPropertyNames||function(e){return uA(e,fA)}},mA={f:Object.getOwnPropertySymbols},hA=Y([].concat),gA=nk(`Reflect`,`ownKeys`)||function(e){var t=pA.f(Mk(e)),n=mA.f;return n?hA(t,n(e)):t},_A=function(e,t){for(var n=gA(t),r=Pk.f,i=jk.f,a=0;av;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:KA(b,f)}else switch(e){case 4:return!1;case 7:KA(b,f)}return a?-1:r||i?i:b}},JA={forEach:qA(0),map:qA(1),filter:qA(2),some:qA(3),every:qA(4),find:qA(5),findIndex:qA(6),filterReject:qA(7)},YA=Tk(`species`),XA=function(e){return lk>=51||!RO(function(){var t=[];return(t.constructor={})[YA]=function(){return{foo:1}},t[e](Boolean).foo!==1})},ZA=JA.filter;EA({target:`Array`,proto:!0,forced:!XA(`filter`)},{filter:function(e){return ZA(this,e,arguments.length>1?arguments[1]:void 0)}});var QA=AA?{}.toString:function(){return`[object `+PA(this)+`]`};AA||Qk(Object.prototype,`toString`,QA,{unsafe:!0});var $A,ej=J.String,tj=function(e){if(PA(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return ej(e)},nj=function(){var e=Mk(this),t=``;return e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),e.dotAll&&(t+=`s`),e.unicode&&(t+=`u`),e.sticky&&(t+=`y`),t},rj=J.RegExp,ij=RO(function(){var e=rj(`a`,`y`);return e.lastIndex=2,e.exec(`abcd`)!=null}),aj=ij||RO(function(){return!rj(`a`,`y`).sticky}),oj={BROKEN_CARET:ij||RO(function(){var e=rj(`^r`,`gy`);return e.lastIndex=2,e.exec(`str`)!=null}),MISSED_STICKY:aj,UNSUPPORTED_Y:ij},sj=Object.keys||function(e){return uA(e,dA)},cj=zO?Object.defineProperties:function(e,t){Mk(e);for(var n,r=$O(t),i=sj(t),a=i.length,o=0;a>o;)Pk.f(e,n=i[o++],r[n]);return e},lj=nk(`document`,`documentElement`),uj=Hk(`IE_PROTO`),dj=function(){},fj=function(e){return``},pj=function(e){e.write(fj(``)),e.close();var t=e.parentWindow.Object;return e=null,t},mj=function(){try{$A=new ActiveXObject(`htmlfile`)}catch{}var e,t;mj=typeof document<`u`?document.domain&&$A?pj($A):((t=Ok(`iframe`)).style.display=`none`,lj.appendChild(t),t.src=`javascript:`,(e=t.contentWindow.document).open(),e.write(fj(`document.F=Object`)),e.close(),e.F):pj($A);for(var n=dA.length;n--;)delete mj.prototype[dA[n]];return mj()};Uk[uj]=!0;var hj,gj,_j=Object.create||function(e,t){var n;return e===null?n=mj():(dj.prototype=Mk(e),n=new dj,dj.prototype=null,n[uj]=e),t===void 0?n:cj(n,t)},vj=J.RegExp,yj=RO(function(){var e=vj(`.`,`s`);return!(e.dotAll&&e.exec(` +`)&&e.flags===`s`)}),bj=J.RegExp,xj=RO(function(){var e=bj(`(?
    b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$c`)!==`bc`}),Sj=Jk.get,Cj=vk(`native-string-replace`,String.prototype.replace),wj=RegExp.prototype.exec,Tj=wj,Ej=Y(``.charAt),Dj=Y(``.indexOf),Oj=Y(``.replace),kj=Y(``.slice),Aj=(gj=/b*/g,VO(wj,hj=/a/,`a`),VO(wj,gj,`a`),hj.lastIndex!==0||gj.lastIndex!==0),jj=oj.BROKEN_CARET,Mj=/()??/.exec(``)[1]!==void 0;(Aj||Mj||jj||yj||xj)&&(Tj=function(e){var t,n,r,i,a,o,s,c=this,l=Sj(c),u=tj(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=VO(Tj,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=jj&&c.sticky,m=VO(nj,c),h=c.source,g=0,_=u;if(p&&(m=Oj(m,`y`,``),Dj(m,`g`)===-1&&(m+=`g`),_=kj(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&Ej(u,c.lastIndex-1)!==` +`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),Mj&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),Aj&&(r=c.lastIndex),i=VO(wj,p?n:c,_),p?i?(i.input=kj(i.input,g),i[0]=kj(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Aj&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),Mj&&i&&i.length>1&&VO(Cj,i[0],n,function(){for(a=1;a=s?e?``:void 0:(r=Uj(a,o))<55296||r>56319||o+1===s||(i=Uj(a,o+1))<56320||i>57343?e?Hj(a,o):r:e?Wj(a,o,o+2):i-56320+(r-55296<<10)+65536}},Kj=(Gj(!1),Gj(!0)),qj=function(e,t,n){return t+(n?Kj(e,t).length:1)},Jj=Math.floor,Yj=Y(``.charAt),Xj=Y(``.replace),Zj=Y(``.slice),Qj=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,$j=/\$([$&'`]|\d{1,2})/g,eM=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,c=$j;return i!==void 0&&(i=yk(i),c=Qj),Xj(a,c,function(a,c){var l;switch(Yj(c,0)){case`$`:return`$`;case`&`:return e;case"`":return Zj(t,0,n);case`'`:return Zj(t,o);case`<`:l=i[Zj(c,1,-1)];break;default:var u=+c;if(u===0)return a;if(u>s){var d=Jj(u/10);return d===0?a:d<=s?r[d-1]===void 0?Yj(c,1):r[d-1]+Yj(c,1):a}l=r[u-1]}return l===void 0?``:l})},tM=J.TypeError,nM=function(e,t){var n=e.exec;if(ek(n)){var r=VO(n,e,t);return r!==null&&Mk(r),r}if(YO(e)===`RegExp`)return VO(Nj,e,t);throw tM(`RegExp#exec called on incompatible receiver`)},rM=Tk(`replace`),iM=Math.max,aM=Math.min,oM=Y([].concat),sM=Y([].push),cM=Y(``.indexOf),lM=Y(``.slice),uM=`a`.replace(/./,`$0`)===`$0`,dM=!!/./[rM]&&/./[rM](`a`,`$0`)===``;Vj(`replace`,function(e,t,n){var r=dM?`$`:`$0`;return[function(e,n){var r=QO(this),i=e==null?void 0:hk(e,rM);return i?VO(i,e,r,n):VO(t,tj(r),e,n)},function(e,i){var a=Mk(this),o=tj(e);if(typeof i==`string`&&cM(i,r)===-1&&cM(i,`$<`)===-1){var s=n(t,a,o,i);if(s.done)return s.value}var c=ek(i);c||(i=tj(i));var l=a.global;if(l){var u=a.unicode;a.lastIndex=0}for(var d=[];;){var f=nM(a,o);if(f===null||(sM(d,f),!l))break;tj(f[0])===``&&(a.lastIndex=qj(o,iA(a.lastIndex),u))}for(var p,m=``,h=0,g=0;g=h&&(m+=lM(o,h,v)+C,h=v+_.length)}return m+lM(o,h)}]},!!RO(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:`7`},e},``.replace(e,`$`)!==`7`})||!uM||dM);var fM=Tk(`unscopables`),pM=Array.prototype;pM[fM]??Pk.f(pM,fM,{configurable:!0,value:_j(null)});var mM=function(e){pM[fM][e]=!0},hM=JA.find,gM=!0;`find`in[]&&[,].find(function(){gM=!1}),EA({target:`Array`,proto:!0,forced:gM},{find:function(e){return hM(this,e,arguments.length>1?arguments[1]:void 0)}}),mM(`find`);var _M=Tk(`match`),vM=function(e){var t;return tk(e)&&((t=e[_M])===void 0?YO(e)==`RegExp`:!!t)},yM=J.TypeError,bM=Tk(`species`),xM=function(e,t,n){var r=Ek(t);r in e?Pk.f(e,r,GO(0,n)):e[r]=n},SM=J.Array,CM=Math.max,wM=function(e,t,n){for(var r=aA(e),i=nA(t,r),a=nA(n===void 0?r:n,r),o=SM(CM(a-i,0)),s=0;i1||``.split(/.?/).length?function(e,n){var r=tj(QO(this)),i=n===void 0?4294967295:n>>>0;if(i===0)return[];if(e===void 0)return[r];if(!vM(e))return VO(t,r,e,i);for(var a,o,s,c=[],l=(e.ignoreCase?`i`:``)+(e.multiline?`m`:``)+(e.unicode?`u`:``)+(e.sticky?`y`:``),u=0,d=new RegExp(e.source,l+`g`);(a=VO(Nj,d,r))&&!((o=d.lastIndex)>u&&(kM(c,AM(r,u,a.index)),a.length>1&&a.index=i));)d.lastIndex===a.index&&d.lastIndex++;return u===r.length?!s&&OM(d,``)||kM(c,``):kM(c,AM(r,u)),c.length>i?wM(c,0,i):c}:`0`.split(void 0,0).length?function(e,n){return e===void 0&&n===0?[]:VO(t,this,e,n)}:t,[function(t,n){var i=QO(this),a=t==null?void 0:hk(t,e);return a?VO(a,t,i,n):VO(r,tj(i),t,n)},function(e,i){var a=Mk(this),o=tj(e),s=n(r,a,o,i,r!==t);if(s.done)return s.value;var c=function(e,t){var n,r=Mk(e).constructor;return r===void 0||(n=Mk(r)[bM])==null?t:function(e){if(HA(e))return e;throw yM(pk(e)+` is not a constructor`)}(n)}(a,RegExp),l=a.unicode,u=(a.ignoreCase?`i`:``)+(a.multiline?`m`:``)+(a.unicode?`u`:``)+(TM?`g`:`y`),d=new c(TM?`^(?:`+a.source+`)`:a,u),f=i===void 0?4294967295:i>>>0;if(f===0)return[];if(o.length===0)return nM(d,o)===null?[o]:[];for(var p=0,m=0,h=[];m`+e+``).children().filter(function(e){return e.tagName!==`BR`}).length===0}function VM(e){return e.length===0?``:e[0].outerHTML}function HM(e){return e.length?e[0].tagName.toLowerCase():``}function UM(e,t){for(var n=``,r=(e.attr(`style`)||``).split(`;`),i=r.length,a=0;a0&&i[i.length-1])||a[0]!==6&&a[0]!==2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function ZM(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function QM(e){var t=ZM(P.nodes(e,{match:function(t){return e.children[0]===t},mode:`highest`}),1)[0];if(t==null)return!1;var n=t[0];if(!N.isElement(n)||n.type===`paragraph`||F.string(n)!==``)return!1;var r=n.children,i=r===void 0?[]:r;return!!z.isText(i[0])&&(B.setNodes(e,{type:`paragraph`}),!0)}var $M={renderElems:[Nse],elemsToHtml:[{type:`paragraph`,elemToHtml:function(e,t){return t===``?`


    `:`

    `+t+`

    `}}],parseElemsHtml:[WM],editorPlugin:function(e){var t=e.deleteBackward,n=e.deleteForward;e.insertText,e.insertBreak;var r=e;return r.deleteBackward=function(e){QM(r)||t(e)},r.deleteForward=function(e){QM(r)||n(e)},r}},eN=/"/g,tN=Y(``.replace),nN=function(e,t,n,r){var i=tj(QO(e)),a=`<`+t;return n!==``&&(a+=` `+n+`="`+tN(tj(r),eN,`"`)+`"`),a+`>`+i+``},rN=function(e){return RO(function(){var t=``[e](`"`);return t!==t.toLowerCase()||t.split(`"`).length>3})};function iN(e,t){var n=t,r=e,i=r.bold,a=r.italic,o=r.underline;return i&&(n=``+n+``),r.code&&(n=``+n+``),a&&(n=``+n+``),o&&(n=``+n+``),r.through&&(n=``+n+``),r.sub&&(n=``+n+``),r.sup&&(n=``+n+``),n}function aN(e,t){return e.length!==0&&(!!e[0].matches(t)||e.find(t).length>0)}EA({target:`String`,proto:!0,forced:rN(`bold`)},{bold:function(){return nN(this,`b`,``,``)}}),EA({target:`String`,proto:!0,forced:rN(`italics`)},{italics:function(){return nN(this,`i`,``,``)}}),EA({target:`String`,proto:!0,forced:rN(`sub`)},{sub:function(){return nN(this,`sub`,``,``)}}),EA({target:`String`,proto:!0,forced:rN(`sup`)},{sup:function(){return nN(this,`sup`,``,``)}});var oN={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},sN=Ok(`span`).classList,cN=sN&&sN.constructor&&sN.constructor.prototype,lN=cN===Object.prototype?void 0:cN,uN=function(e,t){var n=[][e];return!!n&&RO(function(){n.call(null,t||function(){throw 1},1)})},dN=JA.forEach,fN=uN(`forEach`)?[].forEach:function(e){return dN(this,e,arguments.length>1?arguments[1]:void 0)},pN=function(e){if(e&&e.forEach!==fN)try{Fk(e,`forEach`,fN)}catch{e.forEach=fN}};for(var mN in oN)oN[mN]&&pN(J[mN]&&J[mN].prototype);function hN(e,t){return e.selection==null||!!ZM(P.nodes(e,{match:function(t){return K.getNodeType(t)===`pre`||!!P.isVoid(e,t)},universal:!0}),1)[0]}function gN(e,t){Object.keys(t).forEach(function(t){t!==`text`&&P.removeMark(e,t)})}pN(lN),EA({target:`Object`,stat:!0,forced:RO(function(){sj(1)})},{keys:function(e){return sj(yk(e))}});var _N=function(){function e(){this.marksNeedToRemove=[],this.tag=`button`}return e.prototype.getValue=function(e){var t=this.mark,n=P.marks(e);return n?n[t]:!!ZM(P.nodes(e,{match:function(e){return!0===e[t]}}),1)[0]},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){return hN(e,this.mark)},e.prototype.exec=function(e,t){var n=this.mark,r=this.marksNeedToRemove;t?e.removeMark(n):(e.addMark(n,!0),r&&r.forEach(function(t){return e.removeMark(t)}))},e}(),vN=``,yN=``,bN=``,xN=``,SN=``,CN=``,wN=``,TN=``,EN=``,DN=``,ON=``,kN=``,AN=``,jN=``,MN=``,NN=``,PN=``,FN=``,IN=``,LN=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.mark=`bold`,t.title=q(`textStyle.bold`),t.iconSvg=vN,t.hotkey=`mod+b`,t}return KM(t,e),t}(_N),RN=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.mark=`code`,t.title=q(`textStyle.code`),t.iconSvg=SN,t.hotkey=`mod+e`,t}return KM(t,e),t}(_N),zN=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.mark=`italic`,t.title=q(`textStyle.italic`),t.iconSvg=bN,t.hotkey=`mod+i`,t}return KM(t,e),t}(_N),BN=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.mark=`through`,t.title=q(`textStyle.through`),t.iconSvg=xN,t.hotkey=`mod+shift+x`,t}return KM(t,e),t}(_N),VN=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.mark=`underline`,t.title=q(`textStyle.underline`),t.iconSvg=yN,t.hotkey=`mod+u`,t}return KM(t,e),t}(_N),HN=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.mark=`sub`,t.marksNeedToRemove=[`sup`],t.title=q(`textStyle.sub`),t.iconSvg=IN,t.hotkey=``,t}return KM(t,e),t}(_N),UN=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.mark=`sup`,t.marksNeedToRemove=[`sub`],t.title=q(`textStyle.sup`),t.iconSvg=FN,t.hotkey=``,t}return KM(t,e),t}(_N),WN=function(){function e(){this.title=q(`textStyle.clear`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return hN(e)},e.prototype.exec=function(e,t){var n,r,i=P.nodes(e,{match:function(e){return z.isText(e)},universal:!0});try{for(var a=XM(i),o=a.next();!o.done;o=a.next())gN(e,o.value[0])}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},e}(),GN={renderStyle:function(e,t){var n=e,r=n.bold,i=n.italic,a=n.underline,o=n.code,s=n.through,c=n.sub,l=n.sup,u=t;return r&&(u=H(`strong`,null,u)),o&&(u=H(`code`,null,u)),i&&(u=H(`em`,null,u)),a&&(u=H(`u`,null,u)),s&&(u=H(`s`,null,u)),c&&(u=H(`sub`,null,u)),l&&(u=H(`sup`,null,u)),u},menus:[{key:`bold`,factory:function(){return new LN}},{key:`underline`,factory:function(){return new VN}},{key:`italic`,factory:function(){return new zN}},{key:`through`,factory:function(){return new BN}},{key:`code`,factory:function(){return new RN}},{key:`sub`,factory:function(){return new HN}},{key:`sup`,factory:function(){return new UN}},{key:`clearStyle`,factory:function(){return new WN}}],styleToHtml:function(e,t){if(!z.isText(e))return t;if(BM(t))return iN(e,t);var n=V(t);if(HM(n)===`br`)return iN(e,`
    `);var r=n.html();return r=iN(e,r),n.html(r),VM(n)},parseStyleHtml:function(e,t,n){var r=V(e);if(!z.isText(t))return t;var i=t;return aN(r,`b,strong`)&&(i.bold=!0),aN(r,`i,em`)&&(i.italic=!0),aN(r,`u`)&&(i.underline=!0),aN(r,`s,strike`)&&(i.through=!0),aN(r,`sub`)&&(i.sub=!0),aN(r,`sup`)&&(i.sup=!0),aN(r,`code`)&&(i.code=!0),i}};function KN(e){return function(t,n,r){return H(`h`+e,null,n)}}var qN={type:`header1`,renderElem:KN(1)},JN={type:`header2`,renderElem:KN(2)},YN={type:`header3`,renderElem:KN(3)},XN={type:`header4`,renderElem:KN(4)},ZN={type:`header5`,renderElem:KN(5)},QN=Zk.PROPER,$N=RegExp.prototype,eP=$N.toString,tP=Y(nj),nP=RO(function(){return eP.call({source:`a`,flags:`b`})!=`/a/b`}),rP=QN&&eP.name!=`toString`;(nP||rP)&&Qk(RegExp.prototype,`toString`,function(){var e=Mk(this),t=tj(e.source),n=e.flags;return`/`+t+`/`+tj(n===void 0&&rk($N,e)&&!(`flags`in $N)?tP(e):n)},{unsafe:!0});var iP,aP=J.TypeError,oP=function(e){if(vM(e))throw aP(`The method doesn't accept regular expressions`);return e},sP=Tk(`match`),cP=function(e){var t=/./;try{`/./`[e](t)}catch{try{return t[sP]=!1,`/./`[e](t)}catch{}}return!1},lP=jk.f,uP=Y(``.startsWith),dP=Y(``.slice),fP=Math.min,pP=cP(`startsWith`);function mP(e){var t=ZM(P.nodes(e,{match:function(e){return K.getNodeType(e).startsWith(`header`)},universal:!0}),1),n=t[0];if(n==null)return`paragraph`;var r=ZM(n,1)[0];return K.getNodeType(r)}function hP(e){return e.selection==null||!ZM(P.nodes(e,{match:function(e){var t=K.getNodeType(e);return t===`paragraph`||!!t.startsWith(`header`)},universal:!0,mode:`highest`}),1)[0]}function gP(e,t){t&&B.setNodes(e,{type:t})}EA({target:`String`,proto:!0,forced:!(!pP&&(iP=lP(String.prototype,`startsWith`),iP&&!iP.writable)||pP)},{startsWith:function(e){var t=tj(QO(this));oP(e);var n=iA(fP(arguments.length>1?arguments[1]:void 0,t.length)),r=tj(e);return uP?uP(t,r,n):dP(t,n,n+r.length)===r}});var _P=function(){function e(){this.title=q(`header.title`),this.iconSvg=``,this.tag=`select`,this.width=60}return e.prototype.getOptions=function(e){var t=[{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:`paragraph`,text:q(`header.text`)}],n=this.getValue(e).toString();return t.forEach(function(e){e.value===n?e.selected=!0:delete e.selected}),t},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){return mP(e)},e.prototype.isDisabled=function(e){return hP(e)},e.prototype.exec=function(e,t){gP(e,t.toString())},e}(),vP=function(){function e(){this.tag=`button`}return e.prototype.getValue=function(e){return mP(e)},e.prototype.isActive=function(e){return this.getValue(e)===this.type},e.prototype.isDisabled=function(e){return hP(e)},e.prototype.exec=function(e,t){var n=this.type;gP(e,t===n?`paragraph`:n)},e}(),yP=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=`H1`,t.type=`header1`,t}return KM(t,e),t}(vP),bP=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=`H2`,t.type=`header2`,t}return KM(t,e),t}(vP),fce=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=`H3`,t.type=`header3`,t}return KM(t,e),t}(vP),pce=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=`H4`,t.type=`header4`,t}return KM(t,e),t}(vP),mce=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=`H5`,t.type=`header5`,t}return KM(t,e),t}(vP),hce={key:`headerSelect`,factory:function(){return new _P}},gce={key:`header1`,factory:function(){return new yP}},_ce={key:`header2`,factory:function(){return new bP}},vce={key:`header3`,factory:function(){return new fce}},yce={key:`header4`,factory:function(){return new pce}},bce={key:`header5`,factory:function(){return new mce}};function xP(e){return function(t,n){return``+n+``}}function SP(e){return function(t,n,r){var i=V(t);return(n=n.filter(function(e){return!!z.isText(e)||!!r.isInline(e)})).length===0&&(n=[{text:i.text().replace(/\s+/gm,` `)}]),{type:`header`+e,children:n}}}var xce={renderElems:[qN,JN,YN,XN,ZN],elemsToHtml:[{type:`header1`,elemToHtml:xP(1)},{type:`header2`,elemToHtml:xP(2)},{type:`header3`,elemToHtml:xP(3)},{type:`header4`,elemToHtml:xP(4)},{type:`header5`,elemToHtml:xP(5)}],parseElemsHtml:[{selector:`h1:not([data-w-e-type])`,parseElemHtml:SP(1)},{selector:`h2:not([data-w-e-type])`,parseElemHtml:SP(2)},{selector:`h3:not([data-w-e-type])`,parseElemHtml:SP(3)},{selector:`h4:not([data-w-e-type])`,parseElemHtml:SP(4)},{selector:`h5:not([data-w-e-type])`,parseElemHtml:SP(5)}],menus:[hce,gce,_ce,vce,yce,bce],editorPlugin:function(e){var t=e.insertBreak;e.insertNode;var n=e;return n.insertBreak=function(){var r=ZM(P.nodes(n,{match:function(e){return K.getNodeType(e).startsWith(`header`)},universal:!0}),1)[0];r&&K.isSelectionAtLineEnd(e,r[1])?B.insertNodes(n,{type:`paragraph`,children:[{text:``}]},{mode:`highest`}):t()},n}},CP=Object.assign,wP=Object.defineProperty,Sce=Y([].concat),TP=!CP||RO(function(){if(zO&&CP({b:1},CP(wP({},`a`,{enumerable:!0,get:function(){wP(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(),r=`abcdefghijklmnopqrst`;return e[n]=7,r.split(``).forEach(function(e){t[e]=e}),CP({},e)[n]!=7||sj(CP({},t)).join(``)!=r})?function(e,t){for(var n=yk(e),r=arguments.length,i=1,a=mA.f,o=WO.f;r>i;)for(var s,c=ZO(arguments[i++]),l=a?Sce(sj(c),a(c)):sj(c),u=l.length,d=0;u>d;)s=l[d++],zO&&!VO(o,c,s)||(n[s]=c[s]);return n}:CP;function EP(e,t){e.data??={};var n=e.data;n.style??={},Object.assign(n.style,t)}EA({target:`Object`,stat:!0,forced:Object.assign!==TP},{assign:TP});var Cce={selector:`font`,preParseHtml:function(e){var t=V(e);if(HM(t)!==`font`)return e;var n=t.attr(`color`)||``;return n&&(t.removeAttr(`color`),t.css(`color`,n)),t[0]}},DP=function(){function e(){this.tag=`button`,this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){var t=this.mark,n=P.marks(e);return n&&n[t]?n[t]:``},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){return e.selection==null||!!ZM(P.nodes(e,{match:function(t){return K.getNodeType(t)===`pre`||!!P.isVoid(e,t)},universal:!0}),1)[0]},e.prototype.getPanelContentElem=function(e){var t=this.mark;if(this.$content==null){var n=V(`
      `);n.on(`click`,`li`,function(n){var r=n.target;if(r!=null&&(n.preventDefault(),e.selection!=null)){var i=V(r).attr(`data-value`);i===`0`?P.removeMark(e,t):P.addMark(e,t,i)}}),this.$content=n}var r=this.$content;if(r==null)return document.createElement(`ul`);r.empty();var i=this.getValue(e),a=e.getMenuConfig(t).colors;(a===void 0?[]:a).forEach(function(e){var t=V(`
      `);t.css(`background-color`,e);var n=V(`
    • `);i===e&&n.addClass(`active`),n.append(t),r.append(n)});var o=``;t===`color`&&(o=q(`color.default`)),t===`bgColor`&&(o=q(`color.clear`));var s=V(` +
    • + + `+o+` +
    • + `);return r.prepend(s),r[0]},e}(),wce=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=q(`color.color`),t.iconSvg=TN,t.mark=`color`,t}return KM(t,e),t}(DP),Tce=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=q(`color.bgColor`),t.iconSvg=EN,t.mark=`bgColor`,t}return KM(t,e),t}(DP),OP=`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)`.split(`.`),Ece={renderStyle:function(e,t){var n=e,r=n.color,i=n.bgColor,a=t;return r&&EP(a,{color:r}),i&&EP(a,{backgroundColor:i}),a},styleToHtml:function(e,t){if(!z.isText(e))return t;var n,r=e,i=r.color,a=r.bgColor;return i||a?((BM(t)||HM(n=V(t))!==`span`)&&(n=V(``+t+``)),i&&n.css(`color`,i),a&&n.css(`background-color`,a),VM(n)):t},preParseHtml:[Cce],parseStyleHtml:function(e,t,n){var r=V(e);if(!z.isText(t))return t;var i=t,a=UM(r,`color`);a&&(i.color=a);var o=UM(r,`background-color`);return o||=UM(r,`background`),o&&(i.bgColor=o),i},menus:[{key:`color`,factory:function(){return new wce},config:{colors:OP}},{key:`bgColor`,factory:function(){return new Tce},config:{colors:OP}}]},Dce=/^(?:\w+:)?\/\/(\S+)$/,Oce=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,kce=/^[^\s\.]+\.\S{2,}$/,Ace=sA.includes;function kP(e){return e===void 0&&(e=`r`),e+`-`+Zp()}function AP(e){return e.replace(//g,`>`)}function jP(e,t,n,r){return JM(this,void 0,void 0,function(){var i,a;return YM(this,function(o){switch(o.label){case 0:return(i=t.getMenuConfig(e).checkLink)?[4,i(n,r)]:[3,2];case 1:if(typeof(a=o.sent())==`string`)return t.alert(a,`error`),[2,!1];if(a==null)return[2,!1];o.label=2;case 2:return[2,!0]}})})}function MP(e,t,n){return JM(this,void 0,void 0,function(){var r;return YM(this,function(i){switch(i.label){case 0:return(r=t.getMenuConfig(e).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,i.sent()];case 2:return[2,n]}})})}function NP(e){return e.selection==null||!!K.getSelectedElems(e).some(function(t){var n=t.type;return!!e.isVoid(t)||!![`pre`,`code`,`link`].includes(n)||void 0})}function PP(e,t){return{type:`link`,url:AP(e),children:t?[{text:t}]:[]}}function FP(e,t,n){return JM(this,void 0,void 0,function(){var r,i,a;return YM(this,function(o){switch(o.label){case 0:return n?(t||=n,e.restoreSelection(),NP(e)?[2]:[4,jP(`insertLink`,e,t,n)]):[2];case 1:return o.sent()?[4,MP(`insertLink`,e,n)]:[2];case 2:return r=o.sent(),(i=e.selection)==null||(R.isCollapsed(i)?(e.insertText(` `),a=PP(r,t),B.insertNodes(e,a),e.insertFragment([{text:` `}])):P.string(e,i)===t?(a=PP(r),B.wrapNodes(e,a,{split:!0}),B.collapse(e,{edge:`end`})):(e.deleteFragment(),a=PP(r,t),B.insertNodes(e,a))),[2]}})})}EA({target:`Array`,proto:!0},{includes:function(e){return Ace(this,e,arguments.length>1?arguments[1]:void 0)}}),mM(`includes`);var jce={type:`link`,renderElem:function(e,t,n){var r=e,i=r.url,a=r.target;return H(`a`,{href:i,target:a===void 0?`_blank`:a},t)}},Mce={selector:`a:not([data-w-e-type])`,parseElemHtml:function(e,t,n){var r=V(e);return(t=t.filter(function(e){return!!z.isText(e)||!!n.isInline(e)})).length===0&&(t=[{text:r.text().replace(/\s+/gm,` `)}]),{type:`link`,url:r.attr(`href`)||``,target:r.attr(`target`)||``,children:t}}};function IP(){return kP(`w-e-insert-link`)}var Nce=function(){function e(){this.title=q(`link.insert`),this.iconSvg=``,this.tag=`button`,this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=IP(),this.urlInputId=IP(),this.buttonId=IP()}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return NP(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=e.selection,n=this,r=n.textInputId,i=n.urlInputId,a=n.buttonId,o=ZM(hD(q(`link.text`),r),2),s=o[0],c=V(o[1]),l=ZM(hD(q(`link.url`),i),2),u=l[0],d=V(l[1]),f=ZM(gD(a,q(`common.ok`)),1)[0];if(this.$content==null){var p=V(`
      `);p.on(`click`,`#`+a,function(t){t.preventDefault();var n=p.find(`#`+r).val(),a=p.find(`#`+i).val();FP(e,n,a),e.hidePanelOrModal()}),this.$content=p}var m=this.$content;if(m.empty(),m.append(s),m.append(u),m.append(f),t==null||R.isCollapsed(t))c.val(``);else{var h=P.string(e,t);c.val(h)}return d.val(``),setTimeout(function(){c.focus()}),m[0]},e}();function LP(){return kP(`w-e-update-link`)}var Pce=function(){function e(){this.title=q(`link.edit`),this.iconSvg=CN,this.tag=`button`,this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=LP(),this.buttonId=LP()}return e.prototype.getSelectedLinkElem=function(e){var t=K.getSelectedNodeByType(e,`link`);return t??null},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||``},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return e.selection==null||this.getSelectedLinkElem(e)==null},e.prototype.getModalPositionNode=function(e){return K.getSelectedNodeByType(e,`link`)},e.prototype.getModalContentElem=function(e){var t=this.urlInputId,n=this.buttonId,r=ZM(hD(q(`link.url`),t),2),i=r[0],a=V(r[1]),o=ZM(gD(n,q(`common.ok`)),1)[0];if(this.$content==null){var s=V(`
      `);s.on(`click`,`button`,function(n){n.preventDefault(),e.restoreSelection();var r=K.getSelectedNodeByType(e,`link`),i=r?F.string(r):``,a=s.find(`#`+t).val();(function(e,t,n){JM(this,void 0,void 0,function(){var r,i;return YM(this,function(a){switch(a.label){case 0:return n?[4,jP(`editLink`,e,t,n)]:[2];case 1:return a.sent()?[4,MP(`editLink`,e,n)]:[2];case 2:return r=a.sent(),i={url:AP(r)},B.setNodes(e,i,{match:function(e){return K.checkNodeType(e,`link`)}}),[2]}})})})(e,i,a),e.hidePanelOrModal()}),this.$content=s}var c=this.$content;c.empty(),c.append(i),c.append(o);var l=this.getValue(e);return a.val(l),setTimeout(function(){a.focus()}),c[0]},e}(),Fce=function(){function e(){this.title=q(`link.unLink`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return e.selection==null||K.getSelectedNodeByType(e,`link`)==null},e.prototype.exec=function(e,t){this.isDisabled(e)||B.unwrapNodes(e,{match:function(e){return K.checkNodeType(e,`link`)}})},e}(),Ice=function(){function e(){this.title=q(`link.view`),this.iconSvg=wN,this.tag=`button`}return e.prototype.getSelectedLinkElem=function(e){var t=K.getSelectedNodeByType(e,`link`);return t??null},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return e.selection==null||this.getSelectedLinkElem(e)==null},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||typeof t!=`string`)throw Error(`View link failed, link url is '`+t+`'`);window.open(t,`_blank`)}},e}(),RP={checkLink:function(e,t){return!0},parseLinkUrl:function(e){return e}},Lce={renderElems:[jce],elemsToHtml:[{type:`link`,elemToHtml:function(e,t){var n=e,r=n.url,i=n.target;return`
      `+t+``}}],parseElemsHtml:[Mce],menus:[{key:`insertLink`,factory:function(){return new Nce},config:RP},{key:`editLink`,factory:function(){return new Pce},config:RP},{key:`unLink`,factory:function(){return new Fce}},{key:`viewLink`,factory:function(){return new Ice}}],editorPlugin:function(e){var t=e.isInline,n=e.insertData,r=e.normalizeNode;e.insertNode,e.insertText;var i=e;return i.isInline=function(e){return e.type===`link`||t(e)},i.insertData=function(e){var t=e.getData(`text/plain`);if(function(e){if(typeof e!=`string`)return!1;var t=e.match(Dce);if(!t)return!1;var n=t[1];return!(!n||!Oce.test(n)&&!kce.test(n))}(t)){if(!NP(i)){var r=i.selection;if(r!=null){var a=P.string(i,r);FP(i,a,t)}}}else n(e)},i.normalizeNode=function(e){var t=ZM(e,2),n=t[0],a=t[1];return K.getNodeType(n)===`link`&&F.string(n)===``?B.removeNodes(i,{at:a}):r([n,a])},i}},Rce=Y(1 .valueOf),zce=J.RangeError,Bce=J.RangeError,zP=J.String,BP=Math.floor,VP=Y(function(e){var t=tj(QO(this)),n=``,r=$k(e);if(r<0||r==1/0)throw zce(`Wrong number of repetitions`);for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}),HP=Y(``.slice),UP=Y(1 .toFixed),WP=function(e,t,n){return t===0?n:t%2==1?WP(e,t-1,n*e):WP(e*e,t/2,n)},GP=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=BP(i/1e7)},KP=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=BP(r/t),r=r%t*1e7},qP=function(e){for(var t=6,n=``;--t>=0;)if(n!==``||t===0||e[t]!==0){var r=zP(e[t]);n=n===``?r:n+VP(`0`,7-r.length)+r}return n};function JP(e,t){return`w-e-image-container-`+K.findKey(e,t).id}EA({target:`Number`,proto:!0,forced:RO(function(){return UP(8e-5,3)!==`0.000`||UP(.9,0)!==`1`||UP(1.255,2)!==`1.25`||UP(0xde0b6b3a7640080,0)!==`1000000000000000128`})||!RO(function(){UP({})})},{toFixed:function(e){var t,n,r,i,a=Rce(this),o=$k(e),s=[0,0,0,0,0,0],c=``,l=`0`;if(o<0||o>20)throw Bce(`Incorrect fraction digits`);if(a!=a)return`NaN`;if(a<=-1e21||a>=1e21)return zP(a);if(a<0&&(c=`-`,a=-a),a>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(a*WP(2,69,1))-69)<0?a*WP(2,-t,1):a/WP(2,t,1),n*=4503599627370496,(t=52-t)>0){for(GP(s,0,n),r=o;r>=7;)GP(s,1e7,0),r-=7;for(GP(s,WP(10,r,1),0),r=t-1;r>=23;)KP(s,1<<23),r-=23;KP(s,1<0?c+((i=l.length)<=o?`0.`+VP(`0`,o-i)+l:HP(l,0,i-o)+`.`+HP(l,i-o)):c+l}});var Vce={type:`image`,renderElem:function(e,t,n){var r=e,i=r.src,a=r.alt,o=a===void 0?``:a,s=r.href,c=s===void 0?``:s,l=r.style,u=l===void 0?{}:l,d=u.width,f=d===void 0?``:d,p=u.height,m=p===void 0?``:p,h=K.isNodeSelected(n,e),g={};f&&(g.width=`100%`),m&&(g.height=`100%`);var _=H(`img`,{style:g,src:i,alt:o,"data-href":c}),v=n.isDisabled();return h&&!v?function(e,t,n,r){var i=V(`body`),a=JP(e,t),o=r.width,s=r.height,c=0,l=0,u=0,d=!1,f=null;function p(t){f=function(){var e=V(`#`+a);if(e.length===0)throw Error(`Cannot find image container elem`);return e}(),c=t;var n=f.find(`img`);if(n.length===0)throw Error(`Cannot find image elem`);l=n.width(),u=n.height(),i.on(`mousemove`,m),i.on(`mouseup`,h);var r=K.getHoverbar(e);r&&r.hideAndClean()}var m=om(function(e){e.preventDefault();var t=e.clientX,n=l+(d?c-t:t-c),r=u*(n/l);f!=null&&(n<=15||r<=15||(f.css(`width`,n+`px`),f.css(`height`,r+`px`)))},100);function h(n){if(i.off(`mousemove`,m),f!=null){var r=f.width().toFixed(2),a=f.height().toFixed(2),o={style:qM(qM({},t.style),{width:r+`px`,height:a+`px`})};B.setNodes(e,o,{at:K.findPath(e,t)}),i.off(`mouseup`,h)}}var g={};return o&&(g.width=o),s&&(g.height=s),H(`div`,{id:a,style:g,className:`w-e-image-container w-e-selected-image-container`,on:{mousedown:function(e){var t=V(e.target);t.hasClass(`w-e-image-dragger`)&&(e.preventDefault(),(t.hasClass(`left-top`)||t.hasClass(`left-bottom`))&&(d=!0),p(e.clientX))}}},n,H(`div`,{className:`w-e-image-dragger left-top`}),H(`div`,{className:`w-e-image-dragger right-top`}),H(`div`,{className:`w-e-image-dragger left-bottom`}),H(`div`,{className:`w-e-image-dragger right-bottom`}))}(n,e,_,{width:f,height:m}):function(e,t,n,r){var i=r.width,a=r.height,o={};return i&&(o.width=i),a&&(o.height=a),H(`div`,{id:JP(e,t),style:o,className:`w-e-image-container`},n)}(n,e,_,{width:f,height:m})}},Hce={selector:`img:not([data-w-e-type])`,parseElemHtml:function(e,t,n){var r=V(e),i=r.attr(`data-href`)||``;return i=decodeURIComponent(i),{type:`image`,src:r.attr(`src`)||``,alt:r.attr(`alt`)||``,href:i,style:{width:UM(r,`width`),height:UM(r,`height`)},children:[{text:``}]}}};function YP(e,t,n,r,i){return r===void 0&&(r=``),i===void 0&&(i=``),JM(this,void 0,void 0,function(){var a,o;return YM(this,function(s){switch(s.label){case 0:return(a=t.getMenuConfig(e).checkImage)?[4,a(n,r,i)]:[3,2];case 1:if(typeof(o=s.sent())==`string`)return t.alert(o,`error`),[2,!1];if(o==null)return[2,!1];s.label=2;case 2:return[2,!0]}})})}function XP(e,t,n){return JM(this,void 0,void 0,function(){var r;return YM(this,function(i){switch(i.label){case 0:return(r=t.getMenuConfig(e).parseImageSrc)?[4,r(n)]:[3,2];case 1:return[2,i.sent()];case 2:return[2,n]}})})}function ZP(e,t,n,r){return n===void 0&&(n=``),r===void 0&&(r=``),JM(this,void 0,void 0,function(){var i,a,o;return YM(this,function(s){switch(s.label){case 0:return[4,YP(`insertImage`,e,t,n,r)];case 1:return s.sent()?[4,XP(`insertImage`,e,t)]:[2];case 2:return i=s.sent(),a={type:`image`,src:AP(i),href:r,alt:n,style:{},children:[{text:``}]},e.selection===null&&e.restoreSelection(),K.getSelectedNodeByType(e,`image`)&&e.move(1),QP(e)||(B.insertNodes(e,a),(o=e.getMenuConfig(`insertImage`).onInsertedImage)&&o(a)),[2]}})})}function QP(e){var t=e.selection;return t==null||!R.isCollapsed(t)||!!ZM(P.nodes(e,{match:function(t){var n=K.getNodeType(t);return n===`code`||n===`pre`||n===`link`||n===`list-item`||!!n.startsWith(`header`)||n===`blockquote`||!!P.isVoid(e,t)},universal:!0}),1)[0]}function $P(){return kP(`w-e-insert-image`)}var Uce=function(){function e(){this.title=q(`image.netImage`),this.iconSvg=``,this.tag=`button`,this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=$P(),this.altInputId=$P(),this.hrefInputId=$P(),this.buttonId=$P()}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return QP(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,i=n.altInputId,a=n.hrefInputId,o=n.buttonId,s=ZM(hD(q(`image.src`),r),2),c=s[0],l=V(s[1]),u=ZM(hD(q(`image.desc`),i),2),d=u[0],f=V(u[1]),p=ZM(hD(q(`image.link`),a),2),m=p[0],h=V(p[1]),g=ZM(gD(o,q(`common.ok`)),1)[0];if(this.$content==null){var _=V(`
      `);_.on(`click`,`#`+o,function(n){n.preventDefault();var o=_.find(`#`+r).val().trim(),s=_.find(`#`+i).val().trim(),c=_.find(`#`+a).val().trim();t.insertImage(e,o,s,c),e.hidePanelOrModal()}),this.$content=_}var v=this.$content;return v.empty(),v.append(c),v.append(d),v.append(m),v.append(g),l.val(``),f.val(``),h.val(``),setTimeout(function(){l.focus()}),v[0]},e.prototype.insertImage=function(e,t,n,r){n===void 0&&(n=``),r===void 0&&(r=``),t&&(e.restoreSelection(),this.isDisabled(e)||ZP(e,t,n,r))},e}(),Wce=function(){function e(){this.title=q(`image.delete`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return e.selection==null||K.getSelectedNodeByType(e,`image`)==null},e.prototype.exec=function(e,t){this.isDisabled(e)||B.removeNodes(e,{match:function(e){return K.checkNodeType(e,`image`)}})},e}();function eF(){return kP(`w-e-edit-image`)}var Gce=function(){function e(){this.title=q(`image.edit`),this.iconSvg=CN,this.tag=`button`,this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=eF(),this.altInputId=eF(),this.hrefInputId=eF(),this.buttonId=eF()}return e.prototype.getValue=function(e){return``},e.prototype.getImageNode=function(e){return K.getSelectedNodeByType(e,`image`)},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return t==null||!R.isCollapsed(t)||K.getSelectedNodeByType(e,`image`)==null},e.prototype.getModalPositionNode=function(e){return this.getImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,i=n.altInputId,a=n.hrefInputId,o=n.buttonId,s=this.getImageNode(e);if(s==null)throw Error(`Not found selected image node`);var c=ZM(hD(q(`image.src`),r),2),l=c[0],u=V(c[1]),d=ZM(hD(q(`image.desc`),i),2),f=d[0],p=V(d[1]),m=ZM(hD(q(`image.link`),a),2),h=m[0],g=V(m[1]),_=ZM(gD(o,q(`common.ok`)),1)[0];if(this.$content==null){var v=V(`
      `);v.on(`click`,`#`+o,function(n){n.preventDefault();var o=v.find(`#`+r).val(),s=v.find(`#`+i).val(),c=v.find(`#`+a).val();t.updateImage(e,o,s,c),e.hidePanelOrModal()}),this.$content=v}var y=this.$content;y.empty(),y.append(l),y.append(f),y.append(h),y.append(_);var b=s,x=b.src,S=b.alt,C=S===void 0?``:S,w=b.href,T=w===void 0?``:w;return u.val(x),p.val(C),g.val(T),setTimeout(function(){u.focus()}),y[0]},e.prototype.updateImage=function(e,t,n,r,i){n===void 0&&(n=``),r===void 0&&(r=``),i===void 0&&(i={}),t&&(e.restoreSelection(),this.isDisabled(e)||function(e,t,n,r,i){n===void 0&&(n=``),r===void 0&&(r=``),i===void 0&&(i={}),JM(this,void 0,void 0,function(){var a,o,s,c,l,u;return YM(this,function(d){switch(d.label){case 0:return[4,YP(`editImage`,e,t,n,r)];case 1:return d.sent()?[4,XP(`editImage`,e,t)]:[2];case 2:return a=d.sent(),(o=K.getSelectedNodeByType(e,`image`))==null||(s=o.style,c={src:a,alt:n,href:r,style:qM(qM({},s===void 0?{}:s),i)},B.setNodes(e,c,{match:function(e){return K.checkNodeType(e,`image`)}}),l=K.getSelectedNodeByType(e,`image`),(u=e.getMenuConfig(`editImage`).onUpdatedImage)&&u(l)),[2]}})})}(e,t,n,r,i))},e}(),Kce=function(){function e(){this.title=q(`image.viewLink`),this.iconSvg=wN,this.tag=`button`}return e.prototype.getValue=function(e){var t=K.getSelectedNodeByType(e,`image`);return t&&t.href||``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return e.selection==null||!this.getValue(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||typeof t!=`string`)throw Error(`View image link failed, image.href is '`+t+`'`);window.open(t,`_blank`)}},e}(),tF=function(){function e(){this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.getSelectedNode=function(e){return K.getSelectedNodeByType(e,`image`)},e.prototype.isDisabled=function(e){return e.selection==null||this.getSelectedNode(e)==null},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.getSelectedNode(e);if(n!=null){var r=K.getHoverbar(e);r&&r.hideAndClean();var i=n.style,a={style:qM(qM({},i===void 0?{}:i),{width:this.value,height:``})};B.setNodes(e,a,{match:function(e){return K.checkNodeType(e,`image`)}})}}},e}(),qce=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=`30%`,t.value=`30%`,t}return KM(t,e),t}(tF),Jce=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=`50%`,t.value=`50%`,t}return KM(t,e),t}(tF),Yce=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=`100%`,t.value=`100%`,t}return KM(t,e),t}(tF),nF={onInsertedImage:function(e){},onUpdatedImage:function(e){},checkImage:function(e,t,n){return!0},parseImageSrc:function(e){return e}},Xce={renderElems:[Vce],elemsToHtml:[{type:`image`,elemToHtml:function(e,t){var n=e,r=n.src,i=n.alt,a=i===void 0?``:i,o=n.href,s=o===void 0?``:o,c=n.style,l=c===void 0?{}:c,u=l.width,d=u===void 0?``:u,f=l.height,p=f===void 0?``:f,m=``;return d&&(m+=`width: `+d+`;`),p&&(m+=`height: `+p+`;`),``+a+``}}],parseElemsHtml:[Hce],menus:[{key:`insertImage`,factory:function(){return new Uce},config:nF},{key:`deleteImage`,factory:function(){return new Wce}},{key:`editImage`,factory:function(){return new Gce},config:nF},{key:`viewImageLink`,factory:function(){return new Kce}},{key:`imageWidth30`,factory:function(){return new qce}},{key:`imageWidth50`,factory:function(){return new Jce}},{key:`imageWidth100`,factory:function(){return new Yce}}],editorPlugin:function(e){var t=e.isInline,n=e.isVoid;e.insertNode;var r=e;return r.isInline=function(e){return e.type===`image`||t(e)},r.isVoid=function(e){return e.type===`image`||n(e)},r}},Zce={type:`todo`,renderElem:function(e,t,n){var r=!1;n.isDisabled()&&(r=!0);var i=H(`div`,{style:{margin:`5px 0`}},H(`span`,{contentEditable:!1,style:{marginRight:`0.5em`}},H(`input`,{type:`checkbox`,checked:e.checked,disabled:r,on:{change:function(t){var r=K.findPath(n,e),i={checked:t.target.checked};B.setNodes(n,i,{at:r})}}})),H(`span`,null,t));return i}},Qce=function(){function e(){this.title=q(`todo.todo`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!!K.getSelectedNodeByType(e,`todo`)},e.prototype.isDisabled=function(e){return e.selection==null||!!K.getSelectedElems(e).some(function(t){if(P.isVoid(e,t)&&P.isBlock(e,t))return!0;var n=t.type;return!![`pre`,`table`,`list-item`].includes(n)||void 0})},e.prototype.exec=function(e,t){var n=this.isActive(e);B.setNodes(e,{type:n?`paragraph`:`todo`})},e}(),$ce={selector:`div[data-w-e-type="todo"]`,parseElemHtml:function(e,t,n){var r=V(e);(t=t.filter(function(e){return!!z.isText(e)||!!n.isInline(e)})).length===0&&(t=[{text:r.text().replace(/\s+/gm,` `)}]);var i=!1;return r.find(`input[type="checkbox"]`).attr(`checked`)!=null&&(i=!0),{type:`todo`,checked:i,children:t}}},ele={renderElems:[Zce],elemsToHtml:[{type:`todo`,elemToHtml:function(e,t){return`
      `+t+`
      `}}],preParseHtml:[{selector:`ul.w-e-todo`,preParseHtml:function(e){var t=V(e).find(`li`),n=V(`
      `),r=t.find(`input[type]`);return n.append(r),t.children()[0].remove(),n[0].innerHTML=n[0].innerHTML+t[0].innerHTML,n[0]}}],parseElemsHtml:[$ce],menus:[{key:`todo`,factory:function(){return new Qce}}],editorPlugin:function(e){var t=e.deleteBackward,n=e;return n.deleteBackward=function(n){var r=e.selection;if(r&&R.isCollapsed(r)){var i=K.getSelectedNodeByType(e,`todo`);if(i&&F.string(i).length===0)return void B.setNodes(e,{type:`paragraph`},{mode:`highest`})}t(n)},n}},tle={type:`blockquote`,renderElem:function(e,t,n){return H(`blockquote`,null,t)}},nle={selector:`blockquote:not([data-w-e-type])`,parseElemHtml:function(e,t,n){var r=V(e);return(t=t.filter(function(e){return!!z.isText(e)||!!n.isInline(e)})).length===0&&(t=[{text:r.text().replace(/\s+/gm,` `)}]),{type:`blockquote`,children:t}}},rle=function(){function e(){this.title=q(`blockQuote.title`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!!K.getSelectedNodeByType(e,`blockquote`)},e.prototype.isDisabled=function(e){return e.selection==null||!ZM(P.nodes(e,{match:function(e){var t=K.getNodeType(e);return t===`paragraph`||t===`blockquote`},universal:!0,mode:`highest`}),1)[0]},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.isActive(e)?`paragraph`:`blockquote`;B.setNodes(e,{type:n},{mode:`highest`})}},e}(),ile={key:`blockquote`,factory:function(){return new rle}},ale=Y([].slice),ole=XA(`slice`),sle=Tk(`species`),rF=J.Array,cle=Math.max;EA({target:`Array`,proto:!0,forced:!ole},{slice:function(e,t){var n,r,i,a=$O(this),o=aA(a),s=nA(e,o),c=nA(t===void 0?o:t,o);if(OA(a)&&(n=a.constructor,(HA(n)&&(n===rF||OA(n.prototype))||tk(n)&&(n=n[sle])===null)&&(n=void 0),n===rF||n===void 0))return ale(a,s,c);for(r=new(n===void 0?rF:n)(cle(c-s,0)),i=0;s`+t+``}}],parseElemsHtml:[nle],menus:[ile],editorPlugin:function(e){var t=e.insertBreak,n=e.insertText,r=e;return r.insertBreak=function(){var i=r.selection;if(i==null)return t();var a=ZM(P.nodes(e,{match:function(e){return K.checkNodeType(e,`blockquote`)},universal:!0}),1)[0];if(!a)return t();var o=a[0],s=K.findPath(e,o),c=P.end(e,s);if(L.equals(c,i.focus)){var l=F.string(o);if(l&&l.slice(-1)===` +`)return e.deleteBackward(`character`),void B.insertNodes(r,{type:`paragraph`,children:[{text:``}]},{mode:`highest`})}n(` +`)},r}},ule=function(){function e(){this.title=q(`emotion.title`),this.iconSvg=``,this.tag=`button`,this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return e.selection==null||!!ZM(P.nodes(e,{match:function(t){return K.getNodeType(t)===`pre`||!!P.isVoid(e,t)},universal:!0}),1)[0]},e.prototype.getPanelContentElem=function(e){if(this.$content==null){var t=V(`
        `);t.on(`click`,`li`,function(t){var n=t.target;if(n!=null){t.preventDefault();var r=V(n).text();e.insertText(r)}}),this.$content=t}var n=this.$content;if(n==null)return document.createElement(`ul`);n.empty();var r=e.getMenuConfig(`emotion`).emotions;return(r===void 0?[]:r).forEach(function(e){var t=V(`
      • `+e+`
      • `);n.append(t)}),n[0]},e}(),dle={menus:[{key:`emotion`,factory:function(){return new ule},config:{emotions:`😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏`.split(` `)}}]},fle={1:`12px`,2:`14px`,3:`16px`,4:`19px`,5:`24px`,6:`32px`,7:`48px`},ple={selector:`font`,preParseHtml:function(e){var t=V(e);if(HM(t)!==`font`)return e;var n=t.attr(`size`)||``;n&&(t.removeAttr(`size`),t.css(`font-size`,fle[n]));var r=t.attr(`face`)||``;return r&&(t.removeAttr(`face`),t.css(`font-family`,r)),t[0]}},mle=Y(``.indexOf);EA({target:`String`,proto:!0,forced:!cP(`includes`)},{includes:function(e){return!!~mle(tj(QO(this)),tj(oP(e)),arguments.length>1?arguments[1]:void 0)}});var iF,aF,oF=function(e){return e&&e.Math==Math&&e},sF=oF(typeof globalThis==`object`&&globalThis)||oF(typeof window==`object`&&window)||oF(typeof self==`object`&&self)||oF(typeof NO==`object`&&NO)||function(){return this}()||Function(`return this`)(),cF=Function.prototype,lF=cF.apply,hle=cF.bind,uF=cF.call,dF=typeof Reflect==`object`&&Reflect.apply||(hle?uF.bind(lF):function(){return uF.apply(lF,arguments)}),fF=Function.prototype,pF=fF.bind,mF=fF.call,gle=pF&&pF.bind(mF),hF=pF?function(e){return e&&gle(mF,e)}:function(e){return e&&function(){return mF.apply(e,arguments)}},gF=function(e){return typeof e==`function`},_F=function(e){try{return!!e()}catch{return!0}},vF=!_F(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),yF=Function.prototype.call,bF=yF.bind?yF.bind(yF):function(){return yF.apply(yF,arguments)},xF={}.propertyIsEnumerable,SF=Object.getOwnPropertyDescriptor,_le=SF&&!xF.call({1:2},1)?function(e){var t=SF(this,e);return!!t&&t.enumerable}:xF,CF={f:_le},wF=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},vle=hF({}.toString),yle=hF(``.slice),TF=function(e){return yle(vle(e),8,-1)},EF=sF.Object,ble=hF(``.split),DF=_F(function(){return!EF(`z`).propertyIsEnumerable(0)})?function(e){return TF(e)==`String`?ble(e,``):EF(e)}:EF,xle=sF.TypeError,OF=function(e){if(e==null)throw xle(`Can't call method on `+e);return e},kF=function(e){return DF(OF(e))},AF=function(e){return typeof e==`object`?e!==null:gF(e)},jF={},MF=function(e){return gF(e)?e:void 0},NF=function(e,t){return arguments.length<2?MF(jF[e])||MF(sF[e]):jF[e]&&jF[e][t]||sF[e]&&sF[e][t]},PF=hF({}.isPrototypeOf),FF=NF(`navigator`,`userAgent`)||``,IF=sF.process,LF=sF.Deno,RF=IF&&IF.versions||LF&&LF.version,zF=RF&&RF.v8;zF&&(aF=(iF=zF.split(`.`))[0]>0&&iF[0]<4?1:+(iF[0]+iF[1])),!aF&&FF&&(!(iF=FF.match(/Edge\/(\d+)/))||iF[1]>=74)&&(iF=FF.match(/Chrome\/(\d+)/))&&(aF=+iF[1]);var BF=aF,VF=!!Object.getOwnPropertySymbols&&!_F(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&BF&&BF<41}),HF=VF&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Sle=sF.Object,UF=HF?function(e){return typeof e==`symbol`}:function(e){var t=NF(`Symbol`);return gF(t)&&PF(t.prototype,Sle(e))},Cle=sF.String,wle=sF.TypeError,WF=function(e){if(gF(e))return e;throw wle(function(e){try{return Cle(e)}catch{return`Object`}}(e)+` is not a function`)},Tle=sF.TypeError,Ele=Object.defineProperty,GF=sF[`__core-js_shared__`]||function(e,t){try{Ele(sF,e,{value:t,configurable:!0,writable:!0})}catch{sF[e]=t}return t}(`__core-js_shared__`,{}),KF=PO(function(e){(e.exports=function(e,t){return GF[e]||(GF[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.19.3`,mode:`pure`,copyright:`© 2021 Denis Pushkarev (zloirock.ru)`})}),Dle=sF.Object,qF=function(e){return Dle(OF(e))},Ole=hF({}.hasOwnProperty),JF=Object.hasOwn||function(e,t){return Ole(qF(e),t)},kle=0,Ale=Math.random(),jle=hF(1 .toString),YF=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+jle(++kle+Ale,36)},XF=KF(`wks`),ZF=sF.Symbol,QF=ZF&&ZF.for,Mle=HF?ZF:ZF&&ZF.withoutSetter||YF,$F=function(e){if(!JF(XF,e)||!VF&&typeof XF[e]!=`string`){var t=`Symbol.`+e;VF&&JF(ZF,e)?XF[e]=ZF[e]:XF[e]=HF&&QF?QF(t):Mle(t)}return XF[e]},Nle=sF.TypeError,Ple=$F(`toPrimitive`),eI=function(e){var t=function(e,t){if(!AF(e)||UF(e))return e;var n,r,i=(n=e[Ple])==null?void 0:WF(n);if(i){if(t===void 0&&(t=`default`),r=bF(i,e,t),!AF(r)||UF(r))return r;throw Nle(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),function(e,t){var n,r;if(t===`string`&&gF(n=e.toString)&&!AF(r=bF(n,e))||gF(n=e.valueOf)&&!AF(r=bF(n,e))||t!==`string`&&gF(n=e.toString)&&!AF(r=bF(n,e)))return r;throw Tle(`Can't convert object to primitive value`)}(e,t)}(e,`string`);return UF(t)?t:t+``},tI=sF.document,Fle=AF(tI)&&AF(tI.createElement),nI=function(e){return Fle?tI.createElement(e):{}},rI=!vF&&!_F(function(){return Object.defineProperty(nI(`div`),`a`,{get:function(){return 7}}).a!=7}),iI=Object.getOwnPropertyDescriptor,aI={f:vF?iI:function(e,t){if(e=kF(e),t=eI(t),rI)try{return iI(e,t)}catch{}if(JF(e,t))return wF(!bF(CF.f,e,t),e[t])}},Ile=/#|\.prototype\./,oI=function(e,t){var n=Rle[Lle(e)];return n==Ble||n!=zle&&(gF(t)?_F(t):!!t)},Lle=oI.normalize=function(e){return String(e).replace(Ile,`.`).toLowerCase()},Rle=oI.data={},zle=oI.NATIVE=`N`,Ble=oI.POLYFILL=`P`,Vle=oI,sI=hF(hF.bind),cI=function(e,t){return WF(e),t===void 0?e:sI?sI(e,t):function(){return e.apply(t,arguments)}},Hle=sF.String,Ule=sF.TypeError,lI=function(e){if(AF(e))return e;throw Ule(Hle(e)+` is not an object`)},Wle=sF.TypeError,uI=Object.defineProperty,dI={f:vF?uI:function(e,t,n){if(lI(e),t=eI(t),lI(n),rI)try{return uI(e,t,n)}catch{}if(`get`in n||`set`in n)throw Wle(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e}},fI=vF?function(e,t,n){return dI.f(e,t,wF(1,n))}:function(e,t,n){return e[t]=n,e},Gle=aI.f,Kle=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return dF(e,this,arguments)};return t.prototype=e.prototype,t},pI=function(e,t){var n,r,i,a,o,s,c,l,u=e.target,d=e.global,f=e.stat,p=e.proto,m=d?sF:f?sF[u]:(sF[u]||{}).prototype,h=d?jF:jF[u]||fI(jF,u,{})[u],g=h.prototype;for(i in t)n=!Vle(d?i:u+(f?`.`:`#`)+i,e.forced)&&m&&JF(m,i),o=h[i],n&&(s=e.noTargetGet?(l=Gle(m,i))&&l.value:m[i]),a=n&&s?s:t[i],n&&typeof o==typeof a||(c=e.bind&&n?cI(a,sF):e.wrap&&n?Kle(a):p&&gF(a)?hF(a):a,(e.sham||a&&a.sham||o&&o.sham)&&fI(c,`sham`,!0),fI(h,i,c),p&&(JF(jF,r=u+`Prototype`)||fI(jF,r,{}),fI(jF[r],i,a),e.real&&g&&!g[i]&&fI(g,i,a)))},mI=Array.isArray||function(e){return TF(e)==`Array`},qle=Math.ceil,Jle=Math.floor,hI=function(e){var t=+e;return t!=t||t===0?0:(t>0?Jle:qle)(t)},Yle=Math.min,gI=function(e){return(t=e.length)>0?Yle(hI(t),9007199254740991):0;var t},_I=function(e,t,n){var r=eI(t);r in e?dI.f(e,r,wF(0,n)):e[r]=n},vI={};vI[$F(`toStringTag`)]=`z`;var yI=String(vI)===`[object z]`,Xle=$F(`toStringTag`),Zle=sF.Object,Qle=TF(function(){return arguments}())==`Arguments`,bI=yI?TF:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=Zle(e),Xle))==`string`?n:Qle?TF(t):(r=TF(t))==`Object`&&gF(t.callee)?`Arguments`:r},$le=hF(Function.toString);gF(GF.inspectSource)||(GF.inspectSource=function(e){return $le(e)});var xI=GF.inspectSource,SI=function(){},eue=[],CI=NF(`Reflect`,`construct`),wI=/^\s*(?:class|function)\b/,tue=hF(wI.exec),nue=!wI.exec(SI),TI=function(e){if(!gF(e))return!1;try{return CI(SI,eue,e),!0}catch{return!1}},rue=!CI||_F(function(){var e;return TI(TI.call)||!TI(Object)||!TI(function(){e=!0})||e})?function(e){if(!gF(e))return!1;switch(bI(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}return nue||!!tue(wI,xI(e))}:TI,iue=$F(`species`),EI=sF.Array,DI=function(e,t){return new(function(e){var t;return mI(e)&&(t=e.constructor,(rue(t)&&(t===EI||mI(t.prototype))||AF(t)&&(t=t[iue])===null)&&(t=void 0)),t===void 0?EI:t}(e))(t===0?0:t)},aue=$F(`species`),OI=$F(`isConcatSpreadable`),kI=sF.TypeError,oue=BF>=51||!_F(function(){var e=[];return e[OI]=!1,e.concat()[0]!==e}),sue=BF>=51||!_F(function(){var e=[];return(e.constructor={})[aue]=function(){return{foo:1}},e.concat(Boolean).foo!==1}),cue=function(e){if(!AF(e))return!1;var t=e[OI];return t===void 0?mI(e):!!t};pI({target:`Array`,proto:!0,forced:!oue||!sue},{concat:function(e){var t,n,r,i,a,o=qF(this),s=DI(o,0),c=0;for(t=-1,r=arguments.length;t9007199254740991)throw kI(`Maximum allowed index exceeded`);for(n=0;n=9007199254740991)throw kI(`Maximum allowed index exceeded`);_I(s,c++,a)}return s.length=c,s}});var AI,lue=sF.String,jI=function(e){if(bI(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return lue(e)},uue=Math.max,due=Math.min,MI=function(e,t){var n=hI(e);return n<0?uue(n+t,0):due(n,t)},NI=function(e){return function(t,n,r){var i,a=kF(t),o=gI(a),s=MI(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},fue={includes:NI(!0),indexOf:NI(!1)},PI={},pue=fue.indexOf,FI=hF([].push),II=function(e,t){var n,r=kF(e),i=0,a=[];for(n in r)!JF(PI,n)&&JF(r,n)&&FI(a,n);for(;t.length>i;)JF(r,n=t[i++])&&(~pue(a,n)||FI(a,n));return a},LI=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],RI=Object.keys||function(e){return II(e,LI)},mue=vF?Object.defineProperties:function(e,t){lI(e);for(var n,r=kF(t),i=RI(t),a=i.length,o=0;a>o;)dI.f(e,n=i[o++],r[n]);return e},hue=NF(`document`,`documentElement`),zI=KF(`keys`),BI=function(e){return zI[e]||(zI[e]=YF(e))},VI=BI(`IE_PROTO`),HI=function(){},UI=function(e){return``},WI=function(e){e.write(UI(``)),e.close();var t=e.parentWindow.Object;return e=null,t},GI=function(){try{AI=new ActiveXObject(`htmlfile`)}catch{}var e,t;GI=typeof document<`u`?document.domain&&AI?WI(AI):((t=nI(`iframe`)).style.display=`none`,hue.appendChild(t),t.src=`javascript:`,(e=t.contentWindow.document).open(),e.write(UI(`document.F=Object`)),e.close(),e.F):WI(AI);for(var n=LI.length;n--;)delete GI.prototype[LI[n]];return GI()};PI[VI]=!0;var KI,qI,JI,YI=Object.create||function(e,t){var n;return e===null?n=GI():(HI.prototype=lI(e),n=new HI,HI.prototype=null,n[VI]=e),t===void 0?n:mue(n,t)},gue=LI.concat(`length`,`prototype`),XI={f:Object.getOwnPropertyNames||function(e){return II(e,gue)}},_ue=sF.Array,vue=Math.max,ZI=XI.f,QI=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],$I={f:function(e){return QI&&TF(e)==`Window`?function(e){try{return ZI(e)}catch{return function(e,t,n){for(var r=gI(e),i=MI(void 0,r),a=MI(r,r),o=_ue(vue(a-i,0)),s=0;iv;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:fL(b,f)}else switch(e){case 4:return!1;case 7:fL(b,f)}return a?-1:r||i?i:b}},mL=[pL(0),pL(1),pL(2),pL(3),pL(4),pL(5),pL(6),pL(7)][0],hL=BI(`hidden`),gL=$F(`toPrimitive`),Due=dL.set,_L=dL.getterFor(`Symbol`),vL=Object.prototype,yL=sF.Symbol,bL=yL&&yL.prototype,xL=sF.TypeError,SL=sF.QObject,CL=NF(`JSON`,`stringify`),wL=aI.f,TL=dI.f,EL=$I.f,Oue=CF.f,DL=hF([].push),OL=KF(`symbols`),kL=KF(`op-symbols`),AL=KF(`string-to-symbol-registry`),jL=KF(`symbol-to-string-registry`),kue=KF(`wks`),ML=!SL||!SL.prototype||!SL.prototype.findChild,NL=vF&&_F(function(){return YI(TL({},`a`,{get:function(){return TL(this,`a`,{value:7}).a}})).a!=7})?function(e,t,n){var r=wL(vL,t);r&&delete vL[t],TL(e,t,n),r&&e!==vL&&TL(vL,t,r)}:TL,PL=function(e,t){var n=OL[e]=YI(bL);return Due(n,{type:`Symbol`,tag:e,description:t}),vF||(n.description=t),n},FL=function(e,t,n){e===vL&&FL(kL,t,n),lI(e);var r=eI(t);return lI(n),JF(OL,r)?(n.enumerable?(JF(e,hL)&&e[hL][r]&&(e[hL][r]=!1),n=YI(n,{enumerable:wF(0,!1)})):(JF(e,hL)||TL(e,hL,wF(1,{})),e[hL][r]=!0),NL(e,r,n)):TL(e,r,n)},IL=function(e,t){lI(e);var n=kF(t),r=RI(n).concat(BL(n));return mL(r,function(t){vF&&!bF(LL,n,t)||FL(e,t,n[t])}),e},LL=function(e){var t=eI(e),n=bF(Oue,this,t);return!(this===vL&&JF(OL,t)&&!JF(kL,t))&&(!(n||!JF(this,t)||!JF(OL,t)||JF(this,hL)&&this[hL][t])||n)},RL=function(e,t){var n=kF(e),r=eI(t);if(n!==vL||!JF(OL,r)||JF(kL,r)){var i=wL(n,r);return!i||!JF(OL,r)||JF(n,hL)&&n[hL][r]||(i.enumerable=!0),i}},zL=function(e){var t=EL(kF(e)),n=[];return mL(t,function(e){JF(OL,e)||JF(PI,e)||DL(n,e)}),n},BL=function(e){var t=e===vL,n=EL(t?kL:kF(e)),r=[];return mL(n,function(e){!JF(OL,e)||t&&!JF(vL,e)||DL(r,OL[e])}),r};if(VF||(bL=(yL=function(){if(PF(bL,this))throw xL(`Symbol is not a constructor`);var e=arguments.length&&arguments[0]!==void 0?jI(arguments[0]):void 0,t=YF(e),n=function(e){this===vL&&bF(n,kL,e),JF(this,hL)&&JF(this[hL],t)&&(this[hL][t]=!1),NL(this,t,wF(1,e))};return vF&&ML&&NL(vL,t,{configurable:!0,set:n}),PL(t,e)}).prototype,tL(bL,`toString`,function(){return _L(this).tag}),tL(yL,`withoutSetter`,function(e){return PL(YF(e),e)}),CF.f=LL,dI.f=FL,aI.f=RL,XI.f=$I.f=zL,eL.f=BL,nL.f=function(e){return PL($F(e),e)},vF&&TL(bL,`description`,{configurable:!0,get:function(){return _L(this).description}})),pI({global:!0,wrap:!0,forced:!VF,sham:!VF},{Symbol:yL}),mL(RI(kue),function(e){rL(e)}),pI({target:`Symbol`,stat:!0,forced:!VF},{for:function(e){var t=jI(e);if(JF(AL,t))return AL[t];var n=yL(t);return AL[t]=n,jL[n]=t,n},keyFor:function(e){if(!UF(e))throw xL(e+` is not a symbol`);if(JF(jL,e))return jL[e]},useSetter:function(){ML=!0},useSimple:function(){ML=!1}}),pI({target:`Object`,stat:!0,forced:!VF,sham:!vF},{create:function(e,t){return t===void 0?YI(e):IL(YI(e),t)},defineProperty:FL,defineProperties:IL,getOwnPropertyDescriptor:RL}),pI({target:`Object`,stat:!0,forced:!VF},{getOwnPropertyNames:zL,getOwnPropertySymbols:BL}),pI({target:`Object`,stat:!0,forced:_F(function(){eL.f(1)})},{getOwnPropertySymbols:function(e){return eL.f(qF(e))}}),CL){var Aue=!VF||_F(function(){var e=yL();return CL([e])!=`[null]`||CL({a:e})!=`{}`||CL(Object(e))!=`{}`});pI({target:`JSON`,stat:!0,forced:Aue},{stringify:function(e,t,n){var r=yue(arguments),i=t;if((AF(t)||e!==void 0)&&!UF(e))return mI(t)||(t=function(e,t){if(gF(i)&&(t=bF(i,this,e,t)),!UF(t))return t}),r[1]=t,dF(CL,null,r)}})}if(!bL[gL]){var jue=bL.valueOf;tL(bL,gL,function(e){return bF(jue,this)})}aL(yL,`Symbol`),PI[hL]=!0,rL(`asyncIterator`),rL(`hasInstance`),rL(`isConcatSpreadable`),rL(`iterator`),rL(`match`),rL(`matchAll`),rL(`replace`),rL(`search`),rL(`species`),rL(`split`),rL(`toPrimitive`),rL(`toStringTag`),rL(`unscopables`),aL(sF.JSON,`JSON`,!0);var VL,HL,UL,Mue=jF.Symbol,WL={},GL=Function.prototype,Nue=vF&&Object.getOwnPropertyDescriptor,KL=JF(GL,`name`),Pue={EXISTS:KL,PROPER:KL&&function(){}.name===`something`,CONFIGURABLE:KL&&(!vF||vF&&Nue(GL,`name`).configurable)},Fue=!_F(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),qL=BI(`IE_PROTO`),JL=sF.Object,Iue=JL.prototype,YL=Fue?JL.getPrototypeOf:function(e){var t=qF(e);if(JF(t,qL))return t[qL];var n=t.constructor;return gF(n)&&t instanceof n?n.prototype:t instanceof JL?Iue:null},XL=$F(`iterator`),ZL=!1;[].keys&&(`next`in(UL=[].keys())?(HL=YL(YL(UL)))!==Object.prototype&&(VL=HL):ZL=!0);var Lue=VL==null||_F(function(){var e={};return VL[XL].call(e)!==e});VL=Lue?{}:YI(VL),gF(VL[XL])||tL(VL,XL,function(){return this});var QL={IteratorPrototype:VL,BUGGY_SAFARI_ITERATORS:ZL},Rue=QL.IteratorPrototype,zue=function(){return this};sF.String,sF.TypeError,Object.setPrototypeOf||`__proto__`in{}&&function(){var e={};try{hF(Object.getOwnPropertyDescriptor(Object.prototype,`__proto__`).set)(e,[]),e instanceof Array}catch{}}();var Bue=Pue.PROPER,$L=QL.BUGGY_SAFARI_ITERATORS,eR=$F(`iterator`),Vue=function(){return this},tR=function(e,t,n,r,i,a,o){(function(e,t,n,r){var i=t+` Iterator`;e.prototype=YI(Rue,{next:wF(1,n)}),aL(e,i,!1,!0),WL[i]=zue})(n,t,r);var s,c,l,u=function(e){if(e===i&&h)return h;if(!$L&&e in p)return p[e];switch(e){case`keys`:case`values`:case`entries`:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+` Iterator`,f=!1,p=e.prototype,m=p[eR]||p[`@@iterator`]||i&&p[i],h=!$L&&m||u(i),g=t==`Array`&&p.entries||m;if(g&&(s=YL(g.call(new e)))!==Object.prototype&&s.next&&(aL(s,d,!0,!0),WL[d]=Vue),Bue&&i==`values`&&m&&m.name!==`values`&&(f=!0,h=function(){return bF(m,this)}),i)if(c={values:u(`values`),keys:a?h:u(`keys`),entries:u(`entries`)},o)for(l in c)($L||f||!(l in p))&&tL(p,l,c[l]);else pI({target:t,proto:!0,forced:$L||f},c);return o&&p[eR]!==h&&tL(p,eR,h,{name:i}),WL[t]=h,c},Hue=dL.set,Uue=dL.getterFor(`Array Iterator`);tR(Array,`Array`,function(e,t){Hue(this,{type:`Array Iterator`,target:kF(e),index:0,kind:t})},function(){var e=Uue(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n==`keys`?{value:r,done:!1}:n==`values`?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},`values`),WL.Arguments=WL.Array;var nR=$F(`toStringTag`);for(var rR in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var iR=sF[rR],aR=iR&&iR.prototype;aR&&bI(aR)!==nR&&fI(aR,nR,rR),WL[rR]=WL.Array}var Wue=Mue;rL(`asyncDispose`),rL(`dispose`),rL(`matcher`),rL(`metadata`),rL(`observable`),rL(`patternMatch`),rL(`replaceAll`);var oR=Wue,Gue=hF(``.charAt),sR=hF(``.charCodeAt),Kue=hF(``.slice),cR=function(e){return function(t,n){var r,i,a=jI(OF(t)),o=hI(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=sR(a,o))<55296||r>56319||o+1===s||(i=sR(a,o+1))<56320||i>57343?e?Gue(a,o):r:e?Kue(a,o,o+2):i-56320+(r-55296<<10)+65536}},que=(cR(!1),cR(!0)),Jue=dL.set,Yue=dL.getterFor(`String Iterator`);tR(String,`String`,function(e){Jue(this,{type:`String Iterator`,string:jI(e),index:0})},function(){var e,t=Yue(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=que(n,r),t.index+=e.length,{value:e,done:!1})});var Xue=nL.f(`iterator`),Zue=PO(function(e){function t(n){return typeof oR==`function`&&typeof Xue==`symbol`?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&typeof oR==`function`&&e.constructor===oR&&e!==oR.prototype?`symbol`:typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}),lR=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}(Zue),Que=Zk.EXISTS,$ue=Pk.f,uR=Function.prototype,ede=Y(uR.toString),dR=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,tde=Y(dR.exec);zO&&!Que&&$ue(uR,`name`,{configurable:!0,get:function(){try{return tde(dR,ede(this))[1]}catch{return``}}});var fR=function(){function e(){this.tag=`select`,this.width=80}return e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.mark,n=P.marks(e);return n&&n[t]?n[t]:``},e.prototype.isDisabled=function(e){return e.selection==null||(this.mark,!!ZM(P.nodes(e,{match:function(t){return K.getNodeType(t)===`pre`||!!P.isVoid(e,t)},universal:!0}),1)[0])},e.prototype.exec=function(e,t){var n=this.mark;t?e.addMark(n,t):e.removeMark(n)},e}(),nde=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=q(`fontSize.title`),t.iconSvg=DN,t.mark=`fontSize`,t}return KM(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontSizeList,r=n===void 0?[]:n;t.push({text:q(`fontSize.default`),value:``}),r.forEach(function(e){if(typeof e==`string`)t.push({text:e,value:e});else if(lR(e)===`object`){var n=e.name,r=e.value;t.push({text:n,value:r})}});var i=this.getValue(e);return t.forEach(function(e){e.value===i?e.selected=!0:delete e.selected}),t},t}(fR),rde=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=q(`fontFamily.title`),t.iconSvg=ON,t.mark=`fontFamily`,t.selectPanelWidth=150,t}return KM(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontFamilyList,r=n===void 0?[]:n;t.push({text:q(`fontFamily.default`),value:``}),r.forEach(function(e){if(typeof e==`string`)t.push({text:e,value:e,styleForRenderMenuList:{"font-family":e}});else if(lR(e)===`object`){var n=e.name,r=e.value;t.push({text:n,value:r,styleForRenderMenuList:{"font-family":r}})}});var i=this.getValue(e);return t.forEach(function(e){e.value===i?e.selected=!0:delete e.selected}),t},t}(fR),ide={renderStyle:function(e,t){var n=e,r=n.fontSize,i=n.fontFamily,a=t;return r&&EP(a,{fontSize:r}),i&&EP(a,{fontFamily:i}),a},styleToHtml:function(e,t){if(!z.isText(e))return t;var n,r=e,i=r.fontSize,a=r.fontFamily;return i||a?((BM(t)||HM(n=V(t))!==`span`)&&(n=V(``+t+``)),i&&n.css(`font-size`,i),a&&n.css(`font-family`,a),VM(n)):t},preParseHtml:[ple],parseStyleHtml:function(e,t,n){var r=V(e);if(!z.isText(t))return t;var i=t,a=n.getMenuConfig(`fontSize`).fontSizeList,o=a===void 0?[]:a,s=UM(r,`font-size`),c=o.find(function(e){return e.value&&e.value===s})||o.includes(s);s&&c&&(i.fontSize=s);var l=n.getMenuConfig(`fontFamily`).fontFamilyList,u=l===void 0?[]:l,d=UM(r,`font-family`).replace(/"/g,``),f=u.find(function(e){return e.value&&e.value===d})||u.includes(d);return d&&f&&(i.fontFamily=d),i},menus:[{key:`fontSize`,factory:function(){return new nde},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 rde},config:{fontFamilyList:[`黑体`,{name:`仿宋`,value:`仿宋`},`楷体`,`标楷体`,`华文仿宋`,`华文楷体`,{name:`宋体`,value:`宋体`},`微软雅黑`,`Arial`,`Tahoma`,`Verdana`,`Times New Roman`,`Courier New`]}}]},ade={selector:`p,h1,h2,h3,h4,h5`,preParseHtml:function(e){var t=V(e),n=UM(t,`padding-left`);return/\dem/.test(n)&&t.css(`text-indent`,`2em`),/\dpx/.test(n)&&parseInt(n,10)%32==0&&t.css(`text-indent`,`2em`),t[0]}},pR=function(){function e(){this.tag=`button`}return e.prototype.getValue=function(e){var t=ZM(P.nodes(e,{match:function(e){return!!e.indent},universal:!0}),1),n=t[0];return n==null?``:ZM(n,1)[0].indent||``},e.prototype.isActive=function(e){return!1},e.prototype.getMatchNode=function(e){var t=ZM(P.nodes(e,{match:function(e){var t=K.getNodeType(e);return t===`paragraph`||!!t.startsWith(`header`)},universal:!0,mode:`highest`}),1)[0];return t==null?null:t[0]},e}(),ode=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=q(`indent.decrease`),t.iconSvg=kN,t}return KM(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return t==null||!t.indent},t.prototype.exec=function(e,t){B.setNodes(e,{indent:null},{match:function(e){return N.isElement(e)}})},t}(pR),sde=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=q(`indent.increase`),t.iconSvg=AN,t}return KM(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return t==null||!!t.indent},t.prototype.exec=function(e,t){B.setNodes(e,{indent:`2em`},{match:function(e){return N.isElement(e)},mode:`highest`})},t}(pR),cde={renderStyle:function(e,t){if(!N.isElement(e))return t;var n=e.indent,r=t;return n&&EP(r,{textIndent:n}),r},styleToHtml:function(e,t){if(!N.isElement(e))return t;var n=e.indent;if(!n)return t;var r=V(t);return r.css(`text-indent`,n),VM(r)},preParseHtml:[ade],parseStyleHtml:function(e,t,n){var r=V(e);if(!N.isElement(t))return t;var i=t,a=UM(r,`text-indent`),o=parseInt(a,10);return a&&o>0&&(i.indent=a),i},menus:[{key:`indent`,factory:function(){return new sde}},{key:`delIndent`,factory:function(){return new ode}}]},mR=function(){function e(){this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.getMatchNode=function(e){var t=ZM(P.nodes(e,{match:function(e){var t=K.getNodeType(e);return t===`paragraph`||t===`blockquote`||!!t.startsWith(`header`)},universal:!0,mode:`highest`}),1)[0];return t==null?null:t[0]},e.prototype.isDisabled=function(e){return e.selection==null||!!K.getSelectedElems(e).some(function(t){if(P.isVoid(e,t)&&P.isBlock(e,t))return!0;var n=t.type;return!![`pre`,`code`].includes(n)||void 0})},e}(),lde=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=q(`justify.left`),t.iconSvg=jN,t}return KM(t,e),t.prototype.exec=function(e,t){B.setNodes(e,{textAlign:`left`},{match:function(t){return N.isElement(t)&&!e.isInline(t)}})},t}(mR),ude=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=q(`justify.right`),t.iconSvg=MN,t}return KM(t,e),t.prototype.exec=function(e,t){B.setNodes(e,{textAlign:`right`},{match:function(t){return N.isElement(t)&&!e.isInline(t)}})},t}(mR),dde=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=q(`justify.center`),t.iconSvg=NN,t}return KM(t,e),t.prototype.exec=function(e,t){B.setNodes(e,{textAlign:`center`},{match:function(t){return N.isElement(t)&&!e.isInline(t)}})},t}(mR),fde=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=q(`justify.justify`),t.iconSvg=PN,t}return KM(t,e),t.prototype.exec=function(e,t){B.setNodes(e,{textAlign:`justify`},{match:function(t){return N.isElement(t)&&!e.isInline(t)}})},t}(mR),pde={renderStyle:function(e,t){if(!N.isElement(e))return t;var n=e.textAlign,r=t;return n&&EP(r,{textAlign:n}),r},styleToHtml:function(e,t){if(!N.isElement(e))return t;var n=e.textAlign;if(!n)return t;var r=V(t);return r.css(`text-align`,n),VM(r)},parseStyleHtml:function(e,t,n){var r=V(e);if(!N.isElement(t))return t;var i=t,a=UM(r,`text-align`);return a&&(i.textAlign=a),i},menus:[{key:`justifyLeft`,factory:function(){return new lde}},{key:`justifyRight`,factory:function(){return new ude}},{key:`justifyCenter`,factory:function(){return new dde}},{key:`justifyJustify`,factory:function(){return new fde}}]},mde=function(){function e(){this.title=q(`lineHeight.title`),this.iconSvg=``,this.tag=`select`,this.width=80}return e.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(`lineHeight`).lineHeightList,r=n===void 0?[]:n;t.push({text:q(`lineHeight.default`),value:``}),r.forEach(function(e){t.push({text:e,value:e})});var i=this.getValue(e);return t.forEach(function(e){e.value===i?e.selected=!0:delete e.selected}),t},e.prototype.getMatchNode=function(e){var t=ZM(P.nodes(e,{match:function(e){var t=K.getNodeType(e);return!!t.startsWith(`header`)||!![`paragraph`,`blockquote`,`list-item`].includes(t)},universal:!0,mode:`highest`}),1)[0];return t==null?null:t[0]},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getMatchNode(e);return t==null?``:N.isElement(t)&&t.lineHeight||``},e.prototype.isDisabled=function(e){return e.selection==null||this.getMatchNode(e)==null},e.prototype.exec=function(e,t){B.setNodes(e,{lineHeight:t.toString()},{mode:`highest`})},e}(),hde={renderStyle:function(e,t){if(!N.isElement(e))return t;var n=e.lineHeight,r=t;return n&&EP(r,{lineHeight:n}),r},styleToHtml:function(e,t){if(!N.isElement(e))return t;var n=e.lineHeight;if(!n)return t;var r=V(t);return r.css(`line-height`,n),VM(r)},parseStyleHtml:function(e,t,n){var r=V(e);if(!N.isElement(t))return t;var i=t,a=n.getMenuConfig(`lineHeight`).lineHeightList,o=a===void 0?[]:a,s=UM(r,`line-height`);return s&&o.includes(s)&&(i.lineHeight=s),i},menus:[{key:`lineHeight`,factory:function(){return new mde},config:{lineHeightList:[`1`,`1.15`,`1.5`,`2`,`2.5`,`3`]}}]},gde=function(){function e(){this.title=q(`undo.redo`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return e.selection==null},e.prototype.exec=function(e,t){typeof e.redo==`function`&&e.redo()},e}(),_de=function(){function e(){this.title=q(`undo.undo`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return e.selection==null},e.prototype.exec=function(e,t){typeof e.undo==`function`&&e.undo()},e}(),vde={menus:[{key:`redo`,factory:function(){return new gde}},{key:`undo`,factory:function(){return new _de}}]},yde={type:`divider`,renderElem:function(e,t,n){return hm(`div`,{props:{contentEditable:!1,className:`w-e-textarea-divider`},dataset:{selected:K.isNodeSelected(n,e)?`true`:``},style:{},on:{mousedown:function(e){return e.preventDefault()}}},[hm(`hr`)])}},bde=function(){function e(){this.title=q(`divider.title`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return e.selection==null||!!K.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=K.getNodeType(t);return n===`table`||n===`pre`||void 0})},e.prototype.exec=function(e,t){B.insertNodes(e,{type:`divider`,children:[{text:``}]},{mode:`highest`})},e}(),xde={renderElems:[yde],elemsToHtml:[{type:`divider`,elemToHtml:function(e,t){return`
        `}}],parseElemsHtml:[{selector:`hr:not([data-w-e-type])`,parseElemHtml:function(e,t,n){return{type:`divider`,children:[{text:``}]}}}],menus:[{key:`divider`,factory:function(){return new bde}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return e.type===`divider`||t(e)},r.normalizeNode=function(e){var t=ZM(e,2),i=t[0],a=t[1];if(K.getNodeType(i)!==`divider`)return n([i,a]);K.isLastNode(r,i)&&B.insertNodes(r,K.genEmptyParagraph(),{at:[a[0]+1]})},r}},Sde=JA.map;EA({target:`Array`,proto:!0,forced:!XA(`map`)},{map:function(e){return Sde(this,e,arguments.length>1?arguments[1]:void 0)}});var Cde=Y([].join),wde=ZO!=Object,Tde=uN(`join`,`,`);EA({target:`Array`,proto:!0,forced:wde||!Tde},{join:function(e){return Cde($O(this),e===void 0?`,`:e)}});var Ede=function(){function e(){this.title=q(`codeBlock.title`),this.iconSvg=``,this.tag=`button`}return e.prototype.getSelectCodeElem=function(e){var t=K.getSelectedNodeByType(e,`code`);if(t==null)return null;var n=K.getParentNode(e,t);return n==null||K.getNodeType(n)!==`pre`?null:t},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);return t==null?``:t.language||``},e.prototype.isActive=function(e){return!!this.getSelectCodeElem(e)},e.prototype.isDisabled=function(e){if(e.selection==null)return!0;var t=K.getSelectedElems(e);return!!t.some(function(t){return e.isVoid(t)})||!t.some(function(e){var t=K.getNodeType(e);if(t===`pre`||t===`paragraph`)return!0})},e.prototype.exec=function(e,t){this.isActive(e)?this.changeToPlainText(e):this.changeToCodeBlock(e,t.toString())},e.prototype.changeToPlainText=function(e){var t=this.getSelectCodeElem(e);if(t!=null){var n=F.string(t);B.removeNodes(e,{mode:`highest`});var r=n.split(` +`).map(function(e){return{type:`paragraph`,children:[{text:e}]}});B.insertNodes(e,r,{mode:`highest`})}},e.prototype.changeToCodeBlock=function(e,t){var n,r,i=[],a=P.nodes(e,{match:function(t){return e.children.includes(t)},universal:!0});try{for(var o=XM(a),s=o.next();!s.done;s=o.next()){var c=ZM(s.value,1)[0];c&&i.push(F.string(c))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}B.removeNodes(e,{mode:`highest`});var l={type:`pre`,children:[{type:`code`,language:t,children:[{text:i.join(` +`)}]}]};B.insertNodes(e,l,{mode:`highest`})},e}(),Dde={key:`codeBlock`,factory:function(){return new Ede}};EA({target:`String`,proto:!0,forced:rN(`anchor`)},{anchor:function(e){return nN(this,`a`,`name`,e)}}),Vj(`match`,function(e,t,n){return[function(t){var n=QO(this),r=t==null?void 0:hk(t,e);return r?VO(r,t,n):new RegExp(t)[e](tj(n))},function(e){var r=Mk(this),i=tj(e),a=n(t,r,i);if(a.done)return a.value;if(!r.global)return nM(r,i);var o=r.unicode;r.lastIndex=0;for(var s,c=[],l=0;(s=nM(r,i))!==null;){var u=tj(s[0]);c[l]=u,u===``&&(r.lastIndex=qj(i,iA(r.lastIndex),o)),l++}return l===0?null:c}]});var Ode={type:`pre`,renderElem:function(e,t,n){return H(`pre`,null,t)}},kde={type:`code`,renderElem:function(e,t,n){return H(`code`,null,t)}},Ade={selector:`pre:not([data-w-e-type])`,parseElemHtml:function(e,t,n){var r=V(e);return(t=t.filter(function(e){return K.getNodeType(e)===`code`})).length===0&&(t=[{type:`code`,language:``,children:[{text:r[0].textContent||``}]}]),{type:`pre`,children:t.filter(function(e){return K.getNodeType(e)===`code`})}}},jde={menus:[Dde],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData;e.insertNode;var i=e;return i.insertBreak=function(){var e=K.getSelectedNodeByType(i,`code`);if(e!=null){var n=function(e,t){var n=t.selection;if(n==null)return``;var r=F.string(e),i=n.anchor.offset,a=r.slice(0,i).split(` +`),o=a.length;return o===0?``:a[o-1]}(e,i);if(n){var r=n.match(/^\s+/);if(r!=null&&r[0]!=null){var a=r[0];return void i.insertText(` +`+a)}}i.insertText(` +`)}else t()},i.normalizeNode=function(e){var t=ZM(e,2),r=t[0],a=t[1],o=K.getNodeType(r);return o===`code`&&a.length<=1&&B.setNodes(i,{type:`paragraph`},{at:a}),o===`pre`&&(K.isLastNode(i,r)&&B.insertNodes(i,K.genEmptyParagraph(),{at:[a[0]+1]}),K.getNodeType(r.children[0])!==`code`&&(B.unwrapNodes(i),B.setNodes(i,{type:`paragraph`},{mode:`highest`}))),n([r,a])},i.insertData=function(e){if(K.getSelectedNodeByType(i,`code`)!=null){var t=e.getData(`text/plain`);P.insertText(i,t)}else r(e)},i},renderElems:[Ode,kde],elemsToHtml:[{type:`code`,elemToHtml:function(e,t){return``+t+``}},{type:`pre`,elemToHtml:function(e,t){return`
        `+t+`
        `}}],preParseHtml:[{selector:`pre>code`,preParseHtml:function(e){var t=V(e);if(HM(t)!==`code`)return e;var n=t.find(`xmp`);if(n.length===0)return e;var r=n.text();return n.remove(),t.text(r),t[0]}}],parseElemsHtml:[{selector:`pre:not([data-w-e-type])>code`,parseElemHtml:function(e,t,n){return{type:`code`,language:``,children:[{text:V(e)[0].textContent||``}]}}},Ade]},Mde=function(){function e(){this.title=q(`fullScreen.title`),this.iconSvg=``,this.tag=`button`,this.alwaysEnable=!0}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return e.isFullScreen},e.prototype.isDisabled=function(e){return!1},e.prototype.exec=function(e,t){e.isFullScreen?e.unFullScreen():e.fullScreen()},e}(),Nde={menus:[{key:`fullScreen`,factory:function(){return new Mde}}]},Pde=function(){function e(){this.title=q(`common.enter`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return t==null||!!R.isExpanded(t)},e.prototype.exec=function(e,t){var n=e.selection;if(n!=null){var r=[n.anchor.path[0]];B.insertNodes(e,{type:`paragraph`,children:[{text:``}]},{at:r}),e.select(P.start(e,r))}},e}(),Fde=[GN,Ece,ide,cde,pde,hde,Xce,xde,dle,Lce,jde,lle,xce,$M,ele,vde,Nde,{menus:[{key:`enter`,factory:function(){return new Pde}}]}];xO(`en`,{listModule:{unOrderedList:`Unordered list`,orderedList:`Ordered list`}}),xO(`zh-CN`,{listModule:{unOrderedList:`无序列表`,orderedList:`有序列表`}});var hR=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function gR(e){var t={exports:{}};return e(t,t.exports),t.exports}var _R,vR,yR=function(e){return e&&e.Math==Math&&e},X=yR(typeof globalThis==`object`&&globalThis)||yR(typeof window==`object`&&window)||yR(typeof self==`object`&&self)||yR(typeof hR==`object`&&hR)||function(){return this}()||Function(`return this`)(),bR=Function.prototype,xR=bR.bind,SR=bR.call,Ide=xR&&xR.bind(SR),CR=xR?function(e){return e&&Ide(SR,e)}:function(e){return e&&function(){return SR.apply(e,arguments)}},wR=function(e){try{return!!e()}catch{return!0}},Lde=CR({}.toString),Rde=CR(``.slice),TR=function(e){return Rde(Lde(e),8,-1)},ER=X.Object,zde=CR(``.split),DR=wR(function(){return!ER(`z`).propertyIsEnumerable(0)})?function(e){return TR(e)==`String`?zde(e,``):ER(e)}:ER,Bde=X.TypeError,OR=function(e){if(e==null)throw Bde(`Can't call method on `+e);return e},kR=function(e){return DR(OR(e))},Vde=Object.defineProperty,AR=function(e,t){try{Vde(X,e,{value:t,configurable:!0,writable:!0})}catch{X[e]=t}return t},jR=X[`__core-js_shared__`]||AR(`__core-js_shared__`,{}),MR=gR(function(e){(e.exports=function(e,t){return jR[e]||(jR[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.19.3`,mode:`global`,copyright:`© 2021 Denis Pushkarev (zloirock.ru)`})}),Hde=X.Object,NR=function(e){return Hde(OR(e))},Ude=CR({}.hasOwnProperty),PR=Object.hasOwn||function(e,t){return Ude(NR(e),t)},Wde=0,Gde=Math.random(),Kde=CR(1 .toString),FR=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+Kde(++Wde+Gde,36)},IR=function(e){return typeof e==`function`},qde=function(e){return IR(e)?e:void 0},LR=function(e,t){return arguments.length<2?qde(X[e]):X[e]&&X[e][t]},RR=LR(`navigator`,`userAgent`)||``,zR=X.process,BR=X.Deno,VR=zR&&zR.versions||BR&&BR.version,HR=VR&&VR.v8;HR&&(vR=(_R=HR.split(`.`))[0]>0&&_R[0]<4?1:+(_R[0]+_R[1])),!vR&&RR&&(!(_R=RR.match(/Edge\/(\d+)/))||_R[1]>=74)&&(_R=RR.match(/Chrome\/(\d+)/))&&(vR=+_R[1]);var UR,WR=vR,GR=!!Object.getOwnPropertySymbols&&!wR(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&WR&&WR<41}),KR=GR&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,qR=MR(`wks`),JR=X.Symbol,YR=JR&&JR.for,XR=KR?JR:JR&&JR.withoutSetter||FR,ZR=function(e){if(!PR(qR,e)||!GR&&typeof qR[e]!=`string`){var t=`Symbol.`+e;GR&&PR(JR,e)?qR[e]=JR[e]:qR[e]=KR&&YR?YR(t):XR(t)}return qR[e]},QR=function(e){return typeof e==`object`?e!==null:IR(e)},$R=X.String,ez=X.TypeError,tz=function(e){if(QR(e))return e;throw ez($R(e)+` is not an object`)},nz=!wR(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),rz=X.document,iz=QR(rz)&&QR(rz.createElement),az=function(e){return iz?rz.createElement(e):{}},oz=!nz&&!wR(function(){return Object.defineProperty(az(`div`),`a`,{get:function(){return 7}}).a!=7}),sz=Function.prototype.call,cz=sz.bind?sz.bind(sz):function(){return sz.apply(sz,arguments)},lz=CR({}.isPrototypeOf),uz=X.Object,dz=KR?function(e){return typeof e==`symbol`}:function(e){var t=LR(`Symbol`);return IR(t)&&lz(t.prototype,uz(e))},fz=X.String,pz=function(e){try{return fz(e)}catch{return`Object`}},mz=X.TypeError,hz=function(e){if(IR(e))return e;throw mz(pz(e)+` is not a function`)},gz=function(e,t){var n=e[t];return n==null?void 0:hz(n)},_z=X.TypeError,vz=X.TypeError,yz=ZR(`toPrimitive`),bz=function(e){var t=function(e,t){if(!QR(e)||dz(e))return e;var n,r=gz(e,yz);if(r){if(t===void 0&&(t=`default`),n=cz(r,e,t),!QR(n)||dz(n))return n;throw vz(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),function(e,t){var n,r;if(t===`string`&&IR(n=e.toString)&&!QR(r=cz(n,e))||IR(n=e.valueOf)&&!QR(r=cz(n,e))||t!==`string`&&IR(n=e.toString)&&!QR(r=cz(n,e)))return r;throw _z(`Can't convert object to primitive value`)}(e,t)}(e,`string`);return dz(t)?t:t+``},xz=X.TypeError,Sz=Object.defineProperty,Cz={f:nz?Sz:function(e,t,n){if(tz(e),t=bz(t),tz(n),oz)try{return Sz(e,t,n)}catch{}if(`get`in n||`set`in n)throw xz(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e}},wz=Math.ceil,Tz=Math.floor,Ez=function(e){var t=+e;return t!=t||t===0?0:(t>0?Tz:wz)(t)},Dz=Math.max,Oz=Math.min,kz=function(e,t){var n=Ez(e);return n<0?Dz(n+t,0):Oz(n,t)},Az=Math.min,jz=function(e){return e>0?Az(Ez(e),9007199254740991):0},Mz=function(e){return jz(e.length)},Nz=function(e){return function(t,n,r){var i,a=kR(t),o=Mz(a),s=kz(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},Pz={includes:Nz(!0),indexOf:Nz(!1)},Fz={},Iz=Pz.indexOf,Lz=CR([].push),Rz=function(e,t){var n,r=kR(e),i=0,a=[];for(n in r)!PR(Fz,n)&&PR(r,n)&&Lz(a,n);for(;t.length>i;)PR(r,n=t[i++])&&(~Iz(a,n)||Lz(a,n));return a},zz=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],Bz=Object.keys||function(e){return Rz(e,zz)},Vz=nz?Object.defineProperties:function(e,t){tz(e);for(var n,r=kR(t),i=Bz(t),a=i.length,o=0;a>o;)Cz.f(e,n=i[o++],r[n]);return e},Hz=LR(`document`,`documentElement`),Uz=MR(`keys`),Wz=function(e){return Uz[e]||(Uz[e]=FR(e))},Gz=Wz(`IE_PROTO`),Kz=function(){},qz=function(e){return``},Jz=function(e){e.write(qz(``)),e.close();var t=e.parentWindow.Object;return e=null,t},Yz=function(){try{UR=new ActiveXObject(`htmlfile`)}catch{}var e,t;Yz=typeof document<`u`?document.domain&&UR?Jz(UR):((t=az(`iframe`)).style.display=`none`,Hz.appendChild(t),t.src=`javascript:`,(e=t.contentWindow.document).open(),e.write(qz(`document.F=Object`)),e.close(),e.F):Jz(UR);for(var n=zz.length;n--;)delete Yz.prototype[zz[n]];return Yz()};Fz[Gz]=!0;var Xz=Object.create||function(e,t){var n;return e===null?n=Yz():(Kz.prototype=tz(e),n=new Kz,Kz.prototype=null,n[Gz]=e),t===void 0?n:Vz(n,t)},Zz=ZR(`unscopables`),Qz=Array.prototype;Qz[Zz]??Cz.f(Qz,Zz,{configurable:!0,value:Xz(null)});var $z=function(e){Qz[Zz][e]=!0},eB={},tB=CR(Function.toString);IR(jR.inspectSource)||(jR.inspectSource=function(e){return tB(e)});var nB,rB,iB,aB=jR.inspectSource,oB=X.WeakMap,sB=IR(oB)&&/native code/.test(aB(oB)),cB=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},lB=nz?function(e,t,n){return Cz.f(e,t,cB(1,n))}:function(e,t,n){return e[t]=n,e},uB=X.TypeError,dB=X.WeakMap;if(sB||jR.state){var fB=jR.state||=new dB,pB=CR(fB.get),mB=CR(fB.has),hB=CR(fB.set);nB=function(e,t){if(mB(fB,e))throw new uB(`Object already initialized`);return t.facade=e,hB(fB,e,t),t},rB=function(e){return pB(fB,e)||{}},iB=function(e){return mB(fB,e)}}else{var gB=Wz(`state`);Fz[gB]=!0,nB=function(e,t){if(PR(e,gB))throw new uB(`Object already initialized`);return t.facade=e,lB(e,gB,t),t},rB=function(e){return PR(e,gB)?e[gB]:{}},iB=function(e){return PR(e,gB)}}var _B,vB,yB,bB={set:nB,get:rB,has:iB,enforce:function(e){return iB(e)?rB(e):nB(e,{})},getterFor:function(e){return function(t){var n;if(!QR(t)||(n=rB(t)).type!==e)throw uB(`Incompatible receiver, `+e+` required`);return n}}},xB={}.propertyIsEnumerable,SB=Object.getOwnPropertyDescriptor,CB={f:SB&&!xB.call({1:2},1)?function(e){var t=SB(this,e);return!!t&&t.enumerable}:xB},wB=Object.getOwnPropertyDescriptor,TB={f:nz?wB:function(e,t){if(e=kR(e),t=bz(t),oz)try{return wB(e,t)}catch{}if(PR(e,t))return cB(!cz(CB.f,e,t),e[t])}},EB=Function.prototype,DB=nz&&Object.getOwnPropertyDescriptor,OB=PR(EB,`name`),kB={EXISTS:OB,PROPER:OB&&function(){}.name===`something`,CONFIGURABLE:OB&&(!nz||nz&&DB(EB,`name`).configurable)},AB=gR(function(e){var t=kB.CONFIGURABLE,n=bB.get,r=bB.enforce,i=String(String).split(`String`);(e.exports=function(e,n,a,o){var s,c=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,u=!!o&&!!o.noTargetGet,d=o&&o.name!==void 0?o.name:n;IR(a)&&(String(d).slice(0,7)===`Symbol(`&&(d=`[`+String(d).replace(/^Symbol\(([^)]*)\)/,`$1`)+`]`),(!PR(a,`name`)||t&&a.name!==d)&&lB(a,`name`,d),(s=r(a)).source||(s.source=i.join(typeof d==`string`?d:``))),e===X?l?e[n]=a:AR(n,a):(c?!u&&e[n]&&(l=!0):delete e[n],l?e[n]=a:lB(e,n,a))})(Function.prototype,`toString`,function(){return IR(this)&&n(this).source||aB(this)})}),jB=zz.concat(`length`,`prototype`),MB={f:Object.getOwnPropertyNames||function(e){return Rz(e,jB)}},NB={f:Object.getOwnPropertySymbols},PB=CR([].concat),FB=LR(`Reflect`,`ownKeys`)||function(e){var t=MB.f(tz(e)),n=NB.f;return n?PB(t,n(e)):t},IB=function(e,t){for(var n=FB(t),r=Cz.f,i=TB.f,a=0;a=t.length?(e.target=void 0,{value:void 0,done:!0}):n==`keys`?{value:r,done:!1}:n==`values`?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},`values`);eB.Arguments=eB.Array,$z(`keys`),$z(`values`),$z(`entries`);var yV={};yV[ZR(`toStringTag`)]=`z`;var bV=String(yV)===`[object z]`,xV=ZR(`toStringTag`),SV=X.Object,CV=TR(function(){return arguments}())==`Arguments`,wV=bV?TR:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=SV(e),xV))==`string`?n:CV?TR(t):(r=TR(t))==`Object`&&IR(t.callee)?`Arguments`:r},TV=bV?{}.toString:function(){return`[object `+wV(this)+`]`};bV||AB(Object.prototype,`toString`,TV,{unsafe:!0});var EV=X.String,DV=function(e){if(wV(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return EV(e)},OV=CR(``.charAt),kV=CR(``.charCodeAt),AV=CR(``.slice),jV=function(e){return function(t,n){var r,i,a=DV(OR(t)),o=Ez(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=kV(a,o))<55296||r>56319||o+1===s||(i=kV(a,o+1))<56320||i>57343?e?OV(a,o):r:e?AV(a,o,o+2):i-56320+(r-55296<<10)+65536}},MV={codeAt:jV(!1),charAt:jV(!0)},NV=MV.charAt,PV=bB.set,FV=bB.getterFor(`String Iterator`);hV(String,`String`,function(e){PV(this,{type:`String Iterator`,string:DV(e),index:0})},function(){var e,t=FV(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=NV(n,r),t.index+=e.length,{value:e,done:!1})});var IV=function(e,t,n){for(var r in t)AB(e,r,t[r],n);return e},LV=X.Array,RV=Math.max,zV=MB.f,BV=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],VV={f:function(e){return BV&&TR(e)==`Window`?function(e){try{return zV(e)}catch{return function(e,t,n){for(var r,i,a,o,s=Mz(e),c=kz(void 0,s),l=kz(s,s),u=LV(RV(l-c,0)),d=0;ca;a++)if((s=_(e[a]))&&lz(rH,s))return s;return new nH(!1)}r=function(e,t){var n=arguments.length<2?QV(e):t;if(hz(n))return tz(cz(n,e));throw $V(pz(e)+` is not iterable`)}(e,i)}for(c=r.next;!(l=cz(c,r)).done;){try{s=_(l.value)}catch(e){eH(r,`throw`,e)}if(typeof s==`object`&&s&&lz(rH,s))return s}return new nH(!1)},aH=X.TypeError,oH=function(e,t){if(lz(t,e))return e;throw aH(`Incorrect invocation`)},sH=ZR(`iterator`),cH=!1;try{var lH=0,uH={next:function(){return{done:!!lH++}},return:function(){cH=!0}};uH[sH]=function(){return this},Array.from(uH,function(){throw 2})}catch{}var dH=Array.isArray||function(e){return TR(e)==`Array`},fH=function(){},pH=[],mH=LR(`Reflect`,`construct`),hH=/^\s*(?:class|function)\b/,gH=CR(hH.exec),_H=!hH.exec(fH),vH=function(e){if(!IR(e))return!1;try{return mH(fH,pH,e),!0}catch{return!1}},yH=!mH||wR(function(){var e;return vH(vH.call)||!vH(Object)||!vH(function(){e=!0})||e})?function(e){if(!IR(e))return!1;switch(wV(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}return _H||!!gH(hH,aB(e))}:vH,bH=ZR(`species`),xH=X.Array,SH=function(e,t){return new(function(e){var t;return dH(e)&&(t=e.constructor,(yH(t)&&(t===xH||dH(t.prototype))||QR(t)&&(t=t[bH])===null)&&(t=void 0)),t===void 0?xH:t}(e))(t===0?0:t)},CH=CR([].push),wH=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,a=e==6,o=e==7,s=e==5||a;return function(c,l,u,d){for(var f,p,m=NR(c),h=DR(m),g=JV(l,u),_=Mz(h),v=0,y=d||SH,b=t?y(c,_):n||o?y(c,0):void 0;_>v;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:CH(b,f)}else switch(e){case 4:return!1;case 7:CH(b,f)}return a?-1:r||i?i:b}},TH={forEach:wH(0),map:wH(1),filter:wH(2),some:wH(3),every:wH(4),find:wH(5),findIndex:wH(6),filterReject:wH(7)},EH=KV.getWeakData,DH=bB.set,OH=bB.getterFor,kH=TH.find,AH=TH.findIndex,jH=CR([].splice),MH=0,NH=function(e){return e.frozen||=new PH},PH=function(){this.entries=[]},FH=function(e,t){return kH(e.entries,function(e){return e[0]===t})};PH.prototype={get:function(e){var t=FH(this,e);if(t)return t[1]},has:function(e){return!!FH(this,e)},set:function(e,t){var n=FH(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=AH(this.entries,function(t){return t[0]===e});return~t&&jH(this.entries,t,1),!!~t}};var IH,LH={getConstructor:function(e,t,n,r){var i=e(function(e,i){oH(e,a),DH(e,{type:t,id:MH++,frozen:void 0}),i!=null&&iH(i,e[r],{that:e,AS_ENTRIES:n})}),a=i.prototype,o=OH(t),s=function(e,t,n){var r=o(e),i=EH(tz(t),!0);return!0===i?NH(r).set(t,n):i[r.id]=n,e};return IV(a,{delete:function(e){var t=o(this);if(!QR(e))return!1;var n=EH(e);return!0===n?NH(t).delete(e):n&&PR(n,t.id)&&delete n[t.id]},has:function(e){var t=o(this);if(!QR(e))return!1;var n=EH(e);return!0===n?NH(t).has(e):n&&PR(n,t.id)}}),IV(a,n?{get:function(e){var t=o(this);if(QR(e)){var n=EH(e);return!0===n?NH(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},RH=bB.enforce,zH=!X.ActiveXObject&&`ActiveXObject`in X,BH=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},VH=function(e,t,n){var r=e.indexOf(`Map`)!==-1,i=e.indexOf(`Weak`)!==-1,a=r?`set`:`add`,o=X[e],s=o&&o.prototype,c=o,l={},u=function(e){var t=CR(s[e]);AB(s,e,e==`add`?function(e){return t(this,e===0?0:e),this}:e==`delete`?function(e){return!(i&&!QR(e))&&t(this,e===0?0:e)}:e==`get`?function(e){return i&&!QR(e)?void 0:t(this,e===0?0:e)}:e==`has`?function(e){return!(i&&!QR(e))&&t(this,e===0?0:e)}:function(e,n){return t(this,e===0?0:e,n),this})};if(UB(e,!IR(o)||!(i||s.forEach&&!wR(function(){new o().entries().next()}))))c=n.getConstructor(t,e,r,a),KV.enable();else if(UB(e,!0)){var d=new c,f=d[a](i?{}:-0,1)!=d,p=wR(function(){d.has(1)}),m=function(e,t){if(!cH)return!1;var n=!1;try{var r={};r[sH]=function(){return{next:function(){return{done:n=!0}}}},function(e){new o(e)}(r)}catch{}return n}(),h=!i&&wR(function(){for(var e=new o,t=5;t--;)e[a](t,t);return!e.has(-0)});m||((c=t(function(e,t){oH(e,s);var n=function(e,t,n){var r,i;return cV&&IR(r=t.constructor)&&r!==n&&QR(i=r.prototype)&&i!==n.prototype&&cV(e,i),e}(new o,e,c);return t!=null&&iH(t,n[a],{that:n,AS_ENTRIES:r}),n})).prototype=s,s.constructor=c),(p||h)&&(u(`delete`),u(`has`),r&&u(`get`)),(h||f)&&u(a),i&&s.clear&&delete s.clear}return l[e]=c,GB({global:!0,forced:c!=o},l),rV(c,e),i||n.setStrong(c,e,r),c}(`WeakMap`,BH,LH);if(sB&&zH){IH=LH.getConstructor(BH,`WeakMap`,!0),KV.enable();var HH=VH.prototype,UH=CR(HH.delete),WH=CR(HH.has),GH=CR(HH.get),KH=CR(HH.set);IV(HH,{delete:function(e){if(QR(e)&&!WV(e)){var t=RH(this);return t.frozen||=new IH,UH(this,e)||t.frozen.delete(e)}return UH(this,e)},has:function(e){if(QR(e)&&!WV(e)){var t=RH(this);return t.frozen||=new IH,WH(this,e)||t.frozen.has(e)}return WH(this,e)},get:function(e){if(QR(e)&&!WV(e)){var t=RH(this);return t.frozen||=new IH,WH(this,e)?GH(this,e):t.frozen.get(e)}return GH(this,e)},set:function(e,t){if(QR(e)&&!WV(e)){var n=RH(this);n.frozen||=new IH,WH(this,e)?KH(this,e,t):n.frozen.set(e,t)}else KH(this,e,t);return this}})}var qH={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},JH=az(`span`).classList,YH=JH&&JH.constructor&&JH.constructor.prototype,XH=YH===Object.prototype?void 0:YH,ZH=ZR(`iterator`),QH=ZR(`toStringTag`),$H=vV.values,eU=function(e,t){if(e){if(e[ZH]!==$H)try{lB(e,ZH,$H)}catch{e[ZH]=$H}if(e[QH]||lB(e,QH,t),qH[t]){for(var n in vV)if(e[n]!==vV[n])try{lB(e,n,vV[n])}catch{e[n]=vV[n]}}}};for(var tU in qH)eU(X[tU]&&X[tU].prototype,tU);eU(XH,`DOMTokenList`);var nU=new WeakMap,rU={type:`list-item`,renderElem:function(e,t,n){nU.set(e,n);var r=e,i=r.level,a=i===void 0?0:i,o=r.ordered,s={margin:`5px 0 5px `+20*a+`px`},c=``;if(o!==void 0&&o){var l=function(e,t){var n=t,r=n.type,i=n.level,a=i===void 0?0:i,o=n.ordered,s=o!==void 0&&o;if(!s)return-1;var c=1,l=t,u=K.findPath(e,l);if(u[0]===0)return 1;for(;u[0]>0;){var d=I.previous(u),f=P.node(e,d);if(f==null)break;var p=f[0],m=p.level,h=m===void 0?0:m,g=p.type,_=p.ordered;if(g!==r||h=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function sU(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function cU(e){return P.nodes(e,{at:e.selection||void 0,match:function(t){return K.findPath(e,t).length===1}})}var lU=Pz.includes;GB({target:`Array`,proto:!0},{includes:function(e){return lU(this,e,arguments.length>1?arguments[1]:void 0)}}),$z(`includes`);var uU,dU,fU=function(){var e=tz(this),t=``;return e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),e.dotAll&&(t+=`s`),e.unicode&&(t+=`u`),e.sticky&&(t+=`y`),t},pU=X.RegExp,mU=wR(function(){var e=pU(`a`,`y`);return e.lastIndex=2,e.exec(`abcd`)!=null}),hU=mU||wR(function(){return!pU(`a`,`y`).sticky}),gU={BROKEN_CARET:mU||wR(function(){var e=pU(`^r`,`gy`);return e.lastIndex=2,e.exec(`str`)!=null}),MISSED_STICKY:hU,UNSUPPORTED_Y:mU},_U=X.RegExp,vU=wR(function(){var e=_U(`.`,`s`);return!(e.dotAll&&e.exec(` +`)&&e.flags===`s`)}),yU=X.RegExp,bU=wR(function(){var e=yU(`(?b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$c`)!==`bc`}),xU=bB.get,SU=MR(`native-string-replace`,String.prototype.replace),CU=RegExp.prototype.exec,wU=CU,TU=CR(``.charAt),EU=CR(``.indexOf),DU=CR(``.replace),OU=CR(``.slice),kU=(dU=/b*/g,cz(CU,uU=/a/,`a`),cz(CU,dU,`a`),uU.lastIndex!==0||dU.lastIndex!==0),AU=gU.BROKEN_CARET,jU=/()??/.exec(``)[1]!==void 0;(kU||jU||AU||vU||bU)&&(wU=function(e){var t,n,r,i,a,o,s,c=this,l=xU(c),u=DV(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=cz(wU,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=AU&&c.sticky,m=cz(fU,c),h=c.source,g=0,_=u;if(p&&(m=DU(m,`y`,``),EU(m,`g`)===-1&&(m+=`g`),_=OU(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&TU(u,c.lastIndex-1)!==` +`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),jU&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),kU&&(r=c.lastIndex),i=cz(CU,p?n:c,_),p?i?(i.input=OU(i.input,g),i[0]=OU(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:kU&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),jU&&i&&i.length>1&&cz(SU,i[0],n,function(){for(a=1;a`,FU=``,IU=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.ordered=!1,t.title=q(`listModule.unOrderedList`),t.iconSvg=PU,t}return aU(t,e),t}(NU),LU=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.ordered=!0,t.title=q(`listModule.orderedList`),t.iconSvg=FU,t}return aU(t,e),t}(NU),RU={key:`bulletedList`,factory:function(){return new IU}},zU={key:`numberedList`,factory:function(){return new LU}},BU=[],VU={type:`list-item`,elemToHtml:function(e,t){var n=``,r=``,i=e.ordered,a=i!==void 0&&i?`ol`:`ul`,o=function(e){var t=nU.get(e);if(t==null)return 0;var n=e,r=n.type,i=n.ordered,a=i!==void 0&&i,o=n.level,s=o===void 0?0:o,c=K.findPath(t,e);if(c[0]===0)return s+1;var l=I.previous(c),u=P.node(t,l);if(!u)return 0;var d=sU(u,1)[0];if(K.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,m=p!==void 0&&p,h=f.level,g=h===void 0?0:h;return gs?0:g===s?m===a?0:1:0}(e);if(o>0)for(var s=0;s`,BU.push(a);var c=function(e){var t=nU.get(e);if(t==null)return 0;var n=e,r=n.type,i=n.ordered,a=i!==void 0&&i,o=n.level,s=o===void 0?0:o,c=K.findPath(t,e);if(c[0]===t.children.length-1)return s+1;var l=I.next(c),u=P.node(t,l);if(!u)return 0;var d=sU(u,1)[0];if(K.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,m=p!==void 0&&p,h=f.level,g=h===void 0?0:h;return gs?0:g===s?m===a?0:1:0}(e);if(c>0)for(s=0;s`;return{html:`
      • `+t+`
      • `,prefix:n,suffix:r}}},HU=ZR(`species`),UU=TH.filter,WU=WR>=51||!wR(function(){var e=[];return(e.constructor={})[HU]=function(){return{foo:1}},e.filter(Boolean).foo!==1});GB({target:`Array`,proto:!0,forced:!WU},{filter:function(e){return UU(this,e,arguments.length>1?arguments[1]:void 0)}});var GU=Function.prototype,KU=GU.apply,qU=GU.bind,JU=GU.call,YU=typeof Reflect==`object`&&Reflect.apply||(qU?JU.bind(KU):function(){return JU.apply(KU,arguments)}),XU=(ZR(`species`),RegExp.prototype),ZU=MV.charAt,QU=function(e,t,n){return t+(n?ZU(e,t).length:1)},$U=Math.floor,eW=CR(``.charAt),tW=CR(``.replace),nW=CR(``.slice),rW=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,iW=/\$([$&'`]|\d{1,2})/g,aW=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,c=iW;return i!==void 0&&(i=NR(i),c=rW),tW(a,c,function(a,c){var l;switch(eW(c,0)){case`$`:return`$`;case`&`:return e;case"`":return nW(t,0,n);case`'`:return nW(t,o);case`<`:l=i[nW(c,1,-1)];break;default:var u=+c;if(u===0)return a;if(u>s){var d=$U(u/10);return d===0?a:d<=s?r[d-1]===void 0?eW(c,1):r[d-1]+eW(c,1):a}l=r[u-1]}return l===void 0?``:l})},oW=X.TypeError,sW=function(e,t){var n=e.exec;if(IR(n)){var r=cz(n,e,t);return r!==null&&tz(r),r}if(TR(e)===`RegExp`)return cz(MU,e,t);throw oW(`RegExp#exec called on incompatible receiver`)},cW=ZR(`replace`),lW=Math.max,uW=Math.min,dW=CR([].concat),fW=CR([].push),pW=CR(``.indexOf),mW=CR(``.slice),hW=`a`.replace(/./,`$0`)===`$0`,gW=!!/./[cW]&&/./[cW](`a`,`$0`)===``;(function(e,t,n,r){var i=ZR(e),a=!wR(function(){var t={};return t[i]=function(){return 7},``[e](t)!=7}),o=a&&!wR(function(){var e=!1,t=/a/;return t.exec=function(){return e=!0,null},t[i](``),!e});if(!a||!o||n){var s=CR(/./[i]),c=function(e,t,n){var r=gW?`$`:`$0`;return[function(e,n){var r=OR(this),i=e==null?void 0:gz(e,cW);return i?cz(i,e,r,n):cz(t,DV(r),e,n)},function(e,i){var a=tz(this),o=DV(e);if(typeof i==`string`&&pW(i,r)===-1&&pW(i,`$<`)===-1){var s=n(t,a,o,i);if(s.done)return s.value}var c=IR(i);c||(i=DV(i));var l=a.global;if(l){var u=a.unicode;a.lastIndex=0}for(var d=[];;){var f=sW(a,o);if(f===null||(fW(d,f),!l))break;DV(f[0])===``&&(a.lastIndex=QU(o,jz(a.lastIndex),u))}for(var p,m=``,h=0,g=0;g=h&&(m+=mW(o,h,v)+C,h=v+_.length)}return m+mW(o,h)}]}(0,``[e],function(e,t,n,r,i){var o=CR(e),c=t.exec;return c===MU||c===XU.exec?a&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}});AB(String.prototype,e,c[0]),AB(XU,i,c[1])}})(`replace`,0,!!wR(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:`7`},e},``.replace(e,`$
        `)!==`7`})||!hW||gW);var _W=X.TypeError,vW=function(e,t,n,r,i,a,o,s){for(var c,l,u=i,d=0,f=!!o&&JV(o,s);d0&&dH(c))l=Mz(c),u=vW(e,t,c,l,u,a-1)-1;else{if(u>=9007199254740991)throw _W(`Exceed the acceptable array length`);e[u]=c}u++}d++}return u},yW=vW;function bW(e){return e.length?e[0].tagName.toLowerCase():``}GB({target:`Array`,proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=NR(this),n=Mz(t),r=SH(t,0);return r.length=yW(r,t,t,n,0,e===void 0?1:Ez(e)),r}}),$z(`flat`),GB({global:!0},{globalThis:X}),yp&&(V.fn.append=yp),np&&(V.fn.attr=np),xp&&(V.fn.parent=xp);var xW={renderElems:[rU],editorPlugin:function(e){var t=e.deleteBackward,n=e.handleTab,r=e.normalizeNode,i=e;return i.deleteBackward=function(e){var n=i.selection;if(n!=null)if(R.isExpanded(n))t(e);else{var r=K.getSelectedNodeByType(i,`list-item`);if(r!=null)if(n.focus.offset!==0)t(e);else{var a=r.level,o=a===void 0?0:a;o>0?B.setNodes(i,{level:o-1}):B.setNodes(i,{type:`paragraph`,ordered:void 0,level:void 0})}else t(e)}else t(e)},i.handleTab=function(){var e,t,r,a,o=i.selection;if(o!=null){if(R.isCollapsed(o)){var s=K.getSelectedNodeByType(i,`list-item`);if(s==null)return void n();if(o.focus.offset===0){var c=s.level,l=c===void 0?0:c;return void B.setNodes(i,{level:l+1})}}if(R.isExpanded(o)){var u=0,d=!1;try{for(var f=oU(cU(i)),p=f.next();!p.done;p=f.next()){var m=sU(p.value,1)[0];K.getNodeType(m)===`list-item`?u++:d=!0}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}if(d||u<=1)return void n();try{for(var h=oU(cU(i)),g=h.next();!g.done;g=h.next()){var _=sU(g.value,2),v=(m=_[0],_[1]),y=m.level;l=y===void 0?0:y,B.setNodes(i,{level:l+1},{at:v})}}catch(e){r={error:e}}finally{try{g&&!g.done&&(a=h.return)&&a.call(h)}finally{if(r)throw r.error}}}else n()}else n()},i.normalizeNode=function(e){var t=sU(e,2),n=t[0],a=t[1],o=K.getNodeType(n);return o!==`bulleted-list`&&o!==`numbered-list`||B.unwrapNodes(i,{at:a}),r([n,a])},i},menus:[RU,zU],elemsToHtml:[VU],parseElemsHtml:[{selector:`ul:not([data-w-e-type]),ol:not([data-w-e-type])`,parseElemHtml:function(e,t,n){return t.flat(1/0)}},{selector:`li:not([data-w-e-type])`,parseElemHtml:function(e,t,n){var r=V(e);(t=t.filter(function(e){return!!z.isText(e)||!!n.isInline(e)})).length===0&&(t=[{text:r.text().replace(/\s+/gm,` `)}]);var i=function(e){return bW(e.parent())===`ol`}(r),a=function(e){for(var t=0,n=e.parent(),r=bW(n);r===`ul`||r===`ol`;)r=bW(n=n.parent()),t++;return t-1}(r);return{type:`list-item`,ordered:i,level:a,children:t}}}]},SW=St(function(e,t){var n=`__lodash_hash_undefined__`,r=9007199254740991,i=`[object Arguments]`,a=`[object Array]`,o=`[object Boolean]`,s=`[object Date]`,c=`[object Error]`,l=`[object Function]`,u=`[object Map]`,d=`[object Number]`,f=`[object Object]`,p=`[object Promise]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object Symbol]`,v=`[object WeakMap]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,C={};C[`[object Float32Array]`]=C[`[object Float64Array]`]=C[`[object Int8Array]`]=C[`[object Int16Array]`]=C[`[object Int32Array]`]=C[`[object Uint8Array]`]=C[`[object Uint8ClampedArray]`]=C[`[object Uint16Array]`]=C[`[object Uint32Array]`]=!0,C[i]=C[a]=C[y]=C[o]=C[b]=C[s]=C[c]=C[l]=C[u]=C[d]=C[f]=C[m]=C[h]=C[g]=C[v]=!1;var w=typeof bt==`object`&&bt&&bt.Object===Object&&bt,T=typeof self==`object`&&self&&self.Object===Object&&self,ee=w||T||Function(`return this`)(),E=t&&!t.nodeType&&t,te=E&&e&&!e.nodeType&&e,ne=te&&te.exports===E,re=ne&&w.process,ie=function(){try{return re&&re.binding&&re.binding(`util`)}catch{}}(),D=ie&&ie.isTypedArray;function ae(e,t){for(var n=-1,r=e==null?0:e.length;++ns))return!1;var l=a.get(e);if(l&&a.get(t))return l==t;var u=-1,d=!0,f=2&n?new Be:void 0;for(a.set(e,t),a.set(t,e);++u-1},Re.prototype.set=function(e,t){var n=this.__data__,r=Ue(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ze.prototype.clear=function(){this.size=0,this.__data__={hash:new Le,map:new(Te||Re),string:new Le}},ze.prototype.delete=function(e){var t=Ze(this,e).delete(e);return this.size-=t?1:0,t},ze.prototype.get=function(e){return Ze(this,e).get(e)},ze.prototype.has=function(e){return Ze(this,e).has(e)},ze.prototype.set=function(e,t){var n=Ze(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Be.prototype.add=Be.prototype.push=function(e){return this.__data__.set(e,n),this},Be.prototype.has=function(e){return this.__data__.has(e)},Ve.prototype.clear=function(){this.__data__=new Re,this.size=0},Ve.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ve.prototype.get=function(e){return this.__data__.get(e)},Ve.prototype.has=function(e){return this.__data__.has(e)},Ve.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Re){var r=n.__data__;if(!Te||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ze(r)}return n.set(e,t),this.size=n.size,this};var $e=xe?function(e){return e==null?[]:(e=Object(e),function(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=r}function lt(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function ut(e){return typeof e==`object`&&!!e}var dt=D?function(e){return function(t){return e(t)}}(D):function(e){return ut(e)&&ct(e.length)&&!!C[We(e)]};function ft(e){return(t=e)!=null&&ct(t.length)&&!st(t)?He(e):Je(e);var t}e.exports=function(e,t){return Ke(e,t)}});xO(`en`,{tableModule:{deleteCol:`Delete column`,deleteRow:`Delete row`,deleteTable:`Delete table`,widthAuto:`Width auto`,insertCol:`Insert column`,insertRow:`Insert row`,insertTable:`Insert table`,header:`Header`}}),xO(`zh-CN`,{tableModule:{deleteCol:`删除列`,deleteRow:`删除行`,deleteTable:`删除表格`,widthAuto:`宽度自适应`,insertCol:`插入列`,insertRow:`插入行`,insertTable:`插入表格`,header:`表头`}});var CW=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function wW(e){var t={exports:{}};return e(t,t.exports),t.exports}var TW,EW,DW=function(e){return e&&e.Math==Math&&e},OW=DW(typeof globalThis==`object`&&globalThis)||DW(typeof window==`object`&&window)||DW(typeof self==`object`&&self)||DW(typeof CW==`object`&&CW)||function(){return this}()||Function(`return this`)(),kW=function(e){try{return!!e()}catch{return!0}},AW=!kW(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),jW=Function.prototype.call,MW=jW.bind?jW.bind(jW):function(){return jW.apply(jW,arguments)},NW={}.propertyIsEnumerable,PW=Object.getOwnPropertyDescriptor,FW={f:PW&&!NW.call({1:2},1)?function(e){var t=PW(this,e);return!!t&&t.enumerable}:NW},IW=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},LW=Function.prototype,RW=LW.bind,zW=LW.call,BW=RW&&RW.bind(zW),VW=RW?function(e){return e&&BW(zW,e)}:function(e){return e&&function(){return zW.apply(e,arguments)}},HW=VW({}.toString),UW=VW(``.slice),WW=function(e){return UW(HW(e),8,-1)},GW=OW.Object,KW=VW(``.split),qW=kW(function(){return!GW(`z`).propertyIsEnumerable(0)})?function(e){return WW(e)==`String`?KW(e,``):GW(e)}:GW,JW=OW.TypeError,YW=function(e){if(e==null)throw JW(`Can't call method on `+e);return e},XW=function(e){return qW(YW(e))},ZW=function(e){return typeof e==`function`},QW=function(e){return typeof e==`object`?e!==null:ZW(e)},$W=function(e){return ZW(e)?e:void 0},eG=function(e,t){return arguments.length<2?$W(OW[e]):OW[e]&&OW[e][t]},tG=VW({}.isPrototypeOf),nG=eG(`navigator`,`userAgent`)||``,rG=OW.process,iG=OW.Deno,aG=rG&&rG.versions||iG&&iG.version,oG=aG&&aG.v8;oG&&(EW=(TW=oG.split(`.`))[0]>0&&TW[0]<4?1:+(TW[0]+TW[1])),!EW&&nG&&(!(TW=nG.match(/Edge\/(\d+)/))||TW[1]>=74)&&(TW=nG.match(/Chrome\/(\d+)/))&&(EW=+TW[1]);var sG=EW,cG=!!Object.getOwnPropertySymbols&&!kW(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&sG&&sG<41}),lG=cG&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,uG=OW.Object,dG=lG?function(e){return typeof e==`symbol`}:function(e){var t=eG(`Symbol`);return ZW(t)&&tG(t.prototype,uG(e))},fG=OW.String,pG=function(e){try{return fG(e)}catch{return`Object`}},mG=OW.TypeError,hG=function(e){if(ZW(e))return e;throw mG(pG(e)+` is not a function`)},gG=function(e,t){var n=e[t];return n==null?void 0:hG(n)},_G=OW.TypeError,vG=Object.defineProperty,yG=function(e,t){try{vG(OW,e,{value:t,configurable:!0,writable:!0})}catch{OW[e]=t}return t},bG=OW[`__core-js_shared__`]||yG(`__core-js_shared__`,{}),xG=wW(function(e){(e.exports=function(e,t){return bG[e]||(bG[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.19.3`,mode:`global`,copyright:`© 2021 Denis Pushkarev (zloirock.ru)`})}),SG=OW.Object,CG=function(e){return SG(YW(e))},wG=VW({}.hasOwnProperty),TG=Object.hasOwn||function(e,t){return wG(CG(e),t)},EG=0,DG=Math.random(),OG=VW(1 .toString),kG=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+OG(++EG+DG,36)},AG=xG(`wks`),jG=OW.Symbol,MG=jG&&jG.for,NG=lG?jG:jG&&jG.withoutSetter||kG,PG=function(e){if(!TG(AG,e)||!cG&&typeof AG[e]!=`string`){var t=`Symbol.`+e;cG&&TG(jG,e)?AG[e]=jG[e]:AG[e]=lG&&MG?MG(t):NG(t)}return AG[e]},FG=OW.TypeError,IG=PG(`toPrimitive`),LG=function(e){var t=function(e,t){if(!QW(e)||dG(e))return e;var n,r=gG(e,IG);if(r){if(t===void 0&&(t=`default`),n=MW(r,e,t),!QW(n)||dG(n))return n;throw FG(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),function(e,t){var n,r;if(t===`string`&&ZW(n=e.toString)&&!QW(r=MW(n,e))||ZW(n=e.valueOf)&&!QW(r=MW(n,e))||t!==`string`&&ZW(n=e.toString)&&!QW(r=MW(n,e)))return r;throw _G(`Can't convert object to primitive value`)}(e,t)}(e,`string`);return dG(t)?t:t+``},RG=OW.document,zG=QW(RG)&&QW(RG.createElement),BG=function(e){return zG?RG.createElement(e):{}},VG=!AW&&!kW(function(){return Object.defineProperty(BG(`div`),`a`,{get:function(){return 7}}).a!=7}),HG=Object.getOwnPropertyDescriptor,UG={f:AW?HG:function(e,t){if(e=XW(e),t=LG(t),VG)try{return HG(e,t)}catch{}if(TG(e,t))return IW(!MW(FW.f,e,t),e[t])}},WG=OW.String,GG=OW.TypeError,KG=function(e){if(QW(e))return e;throw GG(WG(e)+` is not an object`)},qG=OW.TypeError,JG=Object.defineProperty,YG={f:AW?JG:function(e,t,n){if(KG(e),t=LG(t),KG(n),VG)try{return JG(e,t,n)}catch{}if(`get`in n||`set`in n)throw qG(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e}},XG=AW?function(e,t,n){return YG.f(e,t,IW(1,n))}:function(e,t,n){return e[t]=n,e},ZG=VW(Function.toString);ZW(bG.inspectSource)||(bG.inspectSource=function(e){return ZG(e)});var QG,$G,eK,tK=bG.inspectSource,nK=OW.WeakMap,rK=ZW(nK)&&/native code/.test(tK(nK)),iK=xG(`keys`),aK=function(e){return iK[e]||(iK[e]=kG(e))},oK={},sK=OW.TypeError,cK=OW.WeakMap;if(rK||bG.state){var lK=bG.state||=new cK,uK=VW(lK.get),dK=VW(lK.has),fK=VW(lK.set);QG=function(e,t){if(dK(lK,e))throw new sK(`Object already initialized`);return t.facade=e,fK(lK,e,t),t},$G=function(e){return uK(lK,e)||{}},eK=function(e){return dK(lK,e)}}else{var pK=aK(`state`);oK[pK]=!0,QG=function(e,t){if(TG(e,pK))throw new sK(`Object already initialized`);return t.facade=e,XG(e,pK,t),t},$G=function(e){return TG(e,pK)?e[pK]:{}},eK=function(e){return TG(e,pK)}}var mK={set:QG,get:$G,has:eK,enforce:function(e){return eK(e)?$G(e):QG(e,{})},getterFor:function(e){return function(t){var n;if(!QW(t)||(n=$G(t)).type!==e)throw sK(`Incompatible receiver, `+e+` required`);return n}}},hK=Function.prototype,gK=AW&&Object.getOwnPropertyDescriptor,_K=TG(hK,`name`),vK={EXISTS:_K,PROPER:_K&&function(){}.name===`something`,CONFIGURABLE:_K&&(!AW||AW&&gK(hK,`name`).configurable)},yK=wW(function(e){var t=vK.CONFIGURABLE,n=mK.get,r=mK.enforce,i=String(String).split(`String`);(e.exports=function(e,n,a,o){var s,c=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,u=!!o&&!!o.noTargetGet,d=o&&o.name!==void 0?o.name:n;ZW(a)&&(String(d).slice(0,7)===`Symbol(`&&(d=`[`+String(d).replace(/^Symbol\(([^)]*)\)/,`$1`)+`]`),(!TG(a,`name`)||t&&a.name!==d)&&XG(a,`name`,d),(s=r(a)).source||(s.source=i.join(typeof d==`string`?d:``))),e===OW?l?e[n]=a:yG(n,a):(c?!u&&e[n]&&(l=!0):delete e[n],l?e[n]=a:XG(e,n,a))})(Function.prototype,`toString`,function(){return ZW(this)&&n(this).source||tK(this)})}),bK=Math.ceil,xK=Math.floor,SK=function(e){var t=+e;return t!=t||t===0?0:(t>0?xK:bK)(t)},CK=Math.max,wK=Math.min,TK=function(e,t){var n=SK(e);return n<0?CK(n+t,0):wK(n,t)},EK=Math.min,DK=function(e){return e>0?EK(SK(e),9007199254740991):0},OK=function(e){return DK(e.length)},kK=function(e){return function(t,n,r){var i,a=XW(t),o=OK(a),s=TK(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},AK=(kK(!0),kK(!1)),jK=VW([].push),MK=function(e,t){var n,r=XW(e),i=0,a=[];for(n in r)!TG(oK,n)&&TG(r,n)&&jK(a,n);for(;t.length>i;)TG(r,n=t[i++])&&(~AK(a,n)||jK(a,n));return a},NK=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],PK=NK.concat(`length`,`prototype`),FK={f:Object.getOwnPropertyNames||function(e){return MK(e,PK)}},IK={f:Object.getOwnPropertySymbols},LK=VW([].concat),RK=eG(`Reflect`,`ownKeys`)||function(e){var t=FK.f(KG(e)),n=IK.f;return n?LK(t,n(e)):t},zK=function(e,t){for(var n=RK(t),r=YG.f,i=UG.f,a=0;a3})},{anchor:function(e){return t=e,n=nq(YW(this)),r=``+n+``;var t,n,r}});var aq,oq=function(){var e=KG(this),t=``;return e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),e.dotAll&&(t+=`s`),e.unicode&&(t+=`u`),e.sticky&&(t+=`y`),t},sq=OW.RegExp,cq=kW(function(){var e=sq(`a`,`y`);return e.lastIndex=2,e.exec(`abcd`)!=null}),lq=cq||kW(function(){return!sq(`a`,`y`).sticky}),uq={BROKEN_CARET:cq||kW(function(){var e=sq(`^r`,`gy`);return e.lastIndex=2,e.exec(`str`)!=null}),MISSED_STICKY:lq,UNSUPPORTED_Y:cq},dq=Object.keys||function(e){return MK(e,NK)},fq=AW?Object.defineProperties:function(e,t){KG(e);for(var n,r=XW(t),i=dq(t),a=i.length,o=0;a>o;)YG.f(e,n=i[o++],r[n]);return e},pq=eG(`document`,`documentElement`),mq=aK(`IE_PROTO`),hq=function(){},gq=function(e){return``},_q=function(e){e.write(gq(``)),e.close();var t=e.parentWindow.Object;return e=null,t},vq=function(){try{aq=new ActiveXObject(`htmlfile`)}catch{}var e,t;vq=typeof document<`u`?document.domain&&aq?_q(aq):((t=BG(`iframe`)).style.display=`none`,pq.appendChild(t),t.src=`javascript:`,(e=t.contentWindow.document).open(),e.write(gq(`document.F=Object`)),e.close(),e.F):_q(aq);for(var n=NK.length;n--;)delete vq.prototype[NK[n]];return vq()};oK[mq]=!0;var yq,bq,xq=Object.create||function(e,t){var n;return e===null?n=vq():(hq.prototype=KG(e),n=new hq,hq.prototype=null,n[mq]=e),t===void 0?n:fq(n,t)},Sq=OW.RegExp,Cq=kW(function(){var e=Sq(`.`,`s`);return!(e.dotAll&&e.exec(` +`)&&e.flags===`s`)}),wq=OW.RegExp,Tq=kW(function(){var e=wq(`(?b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$c`)!==`bc`}),Eq=mK.get,Dq=xG(`native-string-replace`,String.prototype.replace),Oq=RegExp.prototype.exec,kq=Oq,Aq=VW(``.charAt),jq=VW(``.indexOf),Mq=VW(``.replace),Nq=VW(``.slice),Pq=(bq=/b*/g,MW(Oq,yq=/a/,`a`),MW(Oq,bq,`a`),yq.lastIndex!==0||bq.lastIndex!==0),Fq=uq.BROKEN_CARET,Iq=/()??/.exec(``)[1]!==void 0;(Pq||Iq||Fq||Cq||Tq)&&(kq=function(e){var t,n,r,i,a,o,s,c=this,l=Eq(c),u=nq(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=MW(kq,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=Fq&&c.sticky,m=MW(oq,c),h=c.source,g=0,_=u;if(p&&(m=Mq(m,`y`,``),jq(m,`g`)===-1&&(m+=`g`),_=Nq(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&Aq(u,c.lastIndex-1)!==` +`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),Iq&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),Pq&&(r=c.lastIndex),i=MW(Oq,p?n:c,_),p?i?(i.input=Nq(i.input,g),i[0]=Nq(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Pq&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),Iq&&i&&i.length>1&&MW(Dq,i[0],n,function(){for(a=1;a=51||!kW(function(){var t=[];return(t.constructor={})[Jq]=function(){return{foo:1}},t[e](Boolean).foo!==1})},Xq=VW([].slice),Zq=Yq(`slice`),Qq=PG(`species`),$q=OW.Array,eJ=Math.max;function tJ(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function nJ(e){var t=e.selection;if(t==null)return!1;var n=tJ(P.nodes(e,{match:function(e){return K.checkNodeType(e,`table-cell`)}}),1)[0];if(n){var r=tJ(n,2)[1],i=P.start(e,r);if(L.equals(t.anchor,i))return!0}return!1}function rJ(e,t){var n,r,i=P.nodes(e,{at:t,match:function(e){return K.getNodeType(e)===`table`}}),a=!1;try{for(var o=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}(i),s=o.next();!s.done;s=o.next())s.value,a=!0}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return a}JK({target:`Array`,proto:!0,forced:!Zq},{slice:function(e,t){var n,r,i,a=XW(this),o=OK(a),s=TK(e,o),c=TK(t===void 0?o:t,o);if(Rq(a)&&(n=a.constructor,(Kq(n)&&(n===$q||Rq(n.prototype))||QW(n)&&(n=n[Qq])===null)&&(n=void 0),n===$q||n===void 0))return Xq(a,s,c);for(r=new(n===void 0?$q:n)(eJ(c-s,0)),i=0;sv;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:cJ(b,f)}else switch(e){case 4:return!1;case 7:cJ(b,f)}return a?-1:r||i?i:b}},uJ={forEach:lJ(0),map:lJ(1),filter:lJ(2),some:lJ(3),every:lJ(4),find:lJ(5),findIndex:lJ(6),filterReject:lJ(7)},dJ=uJ.map;JK({target:`Array`,proto:!0,forced:!Yq(`map`)},{map:function(e){return dJ(this,e,arguments.length>1?arguments[1]:void 0)}});var fJ=XK?{}.toString:function(){return`[object `+eq(this)+`]`};function pJ(e){var t=e.children||[];return t.length===0?[]:(t[0]||{}).children||[]}function mJ(e){return pJ(e).every(function(e){return!!e.isHeader})}XK||yK(Object.prototype,`toString`,fJ,{unsafe:!0});var hJ=vK.PROPER,gJ=RegExp.prototype,_J=gJ.toString,vJ=VW(oq),yJ=kW(function(){return _J.call({source:`a`,flags:`b`})!=`/a/b`}),bJ=hJ&&_J.name!=`toString`;(yJ||bJ)&&yK(RegExp.prototype,`toString`,function(){var e=KG(this),t=nq(e.source),n=e.flags;return`/`+t+`/`+nq(n===void 0&&tG(gJ,e)&&!(`flags`in gJ)?vJ(e):n)},{unsafe:!0});var xJ=PG(`unscopables`),SJ=Array.prototype;SJ[xJ]??YG.f(SJ,xJ,{configurable:!0,value:xq(null)});var CJ=uJ.find,wJ=!0;`find`in[]&&[,].find(function(){wJ=!1}),JK({target:`Array`,proto:!0,forced:wJ},{find:function(e){return CJ(this,e,arguments.length>1?arguments[1]:void 0)}}),SJ[xJ].find=!0;var TJ=Function.prototype,EJ=TJ.apply,DJ=TJ.bind,OJ=TJ.call,kJ=typeof Reflect==`object`&&Reflect.apply||(DJ?OJ.bind(EJ):function(){return OJ.apply(EJ,arguments)}),AJ=PG(`species`),jJ=RegExp.prototype,MJ=function(e,t,n,r){var i=PG(e),a=!kW(function(){var t={};return t[i]=function(){return 7},``[e](t)!=7}),o=a&&!kW(function(){var t=!1,n=/a/;return e===`split`&&((n={}).constructor={},n.constructor[AJ]=function(){return n},n.flags=``,n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](``),!t});if(!a||!o||n){var s=VW(/./[i]),c=t(i,``[e],function(e,t,n,r,i){var o=VW(e),c=t.exec;return c===Lq||c===jJ.exec?a&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}});yK(String.prototype,e,c[0]),yK(jJ,i,c[1])}r&&XG(jJ[i],`sham`,!0)},NJ=PG(`match`),PJ=OW.TypeError,FJ=PG(`species`),IJ=VW(``.charAt),LJ=VW(``.charCodeAt),RJ=VW(``.slice),zJ=function(e){return function(t,n){var r,i,a=nq(YW(t)),o=SK(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=LJ(a,o))<55296||r>56319||o+1===s||(i=LJ(a,o+1))<56320||i>57343?e?IJ(a,o):r:e?RJ(a,o,o+2):i-56320+(r-55296<<10)+65536}},BJ=(zJ(!1),zJ(!0)),VJ=function(e,t,n){return t+(n?BJ(e,t).length:1)},HJ=OW.Array,UJ=Math.max,WJ=function(e,t,n){for(var r=OK(e),i=TK(t,r),a=TK(n===void 0?r:n,r),o=HJ(UJ(a-i,0)),s=0;i1||``.split(/.?/).length?function(e,n){var r,i,a=nq(YW(this)),o=n===void 0?4294967295:n>>>0;if(o===0)return[];if(e===void 0)return[a];if(!QW(r=e)||!((i=r[NJ])===void 0?WW(r)==`RegExp`:i))return MW(t,a,e,o);for(var s,c,l,u=[],d=(e.ignoreCase?`i`:``)+(e.multiline?`m`:``)+(e.unicode?`u`:``)+(e.sticky?`y`:``),f=0,p=new RegExp(e.source,d+`g`);(s=MW(Lq,p,a))&&!((c=p.lastIndex)>f&&(ZJ(u,QJ(a,f,s.index)),s.length>1&&s.index=o));)p.lastIndex===s.index&&p.lastIndex++;return f===a.length?!l&&XJ(p,``)||ZJ(u,``):ZJ(u,QJ(a,f)),u.length>o?WJ(u,0,o):u}:`0`.split(void 0,0).length?function(e,n){return e===void 0&&n===0?[]:MW(t,this,e,n)}:t,[function(t,n){var i=YW(this),a=t==null?void 0:gG(t,e);return a?MW(a,t,i,n):MW(r,nq(i),t,n)},function(e,i){var a=KG(this),o=nq(e),s=n(r,a,o,i,r!==t);if(s.done)return s.value;var c=function(e,t){var n,r=KG(e).constructor;return r===void 0||(n=KG(r)[FJ])==null?t:function(e){if(Kq(e))return e;throw PJ(pG(e)+` is not a constructor`)}(n)}(a,RegExp),l=a.unicode,u=(a.ignoreCase?`i`:``)+(a.multiline?`m`:``)+(a.unicode?`u`:``)+(qJ?`g`:`y`),d=new c(qJ?`^(?:`+a.source+`)`:a,u),f=i===void 0?4294967295:i>>>0;if(f===0)return[];if(o.length===0)return KJ(d,o)===null?[o]:[];for(var p=0,m=0,h=[];m=0,l=L.compare(i,s)<=0&&L.compare(i,o)>=0;return!!(c&&l&&I.equals(r.path.slice(0,3),i.path.slice(0,3)))}(n,e),i=e.width,a=i===void 0?`auto`:i,o=H(`div`,{className:`table-container`,"data-selected":K.isNodeSelected(n,e),on:{mousedown:function(t){if(t.target.tagName===`DIV`&&t.preventDefault(),!n.isDisabled()){var r=K.findPath(n,e),i=P.start(n,r),a=n.selection;(a==null||a.anchor.path[0]!==r[0])&&n.select(i)}}}},H(`table`,{width:a,contentEditable:r},H(`colgroup`,null,pJ(e).map(function(e){var t=e.width;return H(`col`,{width:t===void 0?`auto`:t})})),H(`tbody`,null,t)));return o}},vY={type:`table-row`,renderElem:function(e,t,n){return H(`tr`,null,t)}},yY={type:`table-cell`,renderElem:function(e,t,n){var r=function(e,t){var n=K.getParentNode(e,t);if(n==null)return!1;var r=K.getParentNode(e,n);return r!=null&&pJ(r).some(function(e){return e===t})}(n,e),i=e,a=i.colSpan,o=a===void 0?1:a,s=i.rowSpan,c=s===void 0?1:s,l=i.isHeader,u=l!==void 0&&l;if(!r)return H(`td`,{colSpan:o,rowSpan:c},t);var d=H(u?`th`:`td`,{colSpan:o,rowSpan:c,style:{borderRightWidth:`3px`},on:{mousemove:om(function(t){var r=this.elm;if(r!=null){var i=r.getBoundingClientRect(),a=i.left,o=i.width,s=i.top,c=i.height,l=t.clientX,u=t.clientY;lY||(l>a+o-5&&ls&&u1?arguments[1]:void 0)}});var SY=Math.floor,CY=VW(``.charAt),wY=VW(``.replace),TY=VW(``.slice),EY=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,DY=/\$([$&'`]|\d{1,2})/g,OY=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,c=DY;return i!==void 0&&(i=CG(i),c=EY),wY(a,c,function(a,c){var l;switch(CY(c,0)){case`$`:return`$`;case`&`:return e;case"`":return TY(t,0,n);case`'`:return TY(t,o);case`<`:l=i[TY(c,1,-1)];break;default:var u=+c;if(u===0)return a;if(u>s){var d=SY(u/10);return d===0?a:d<=s?r[d-1]===void 0?CY(c,1):r[d-1]+CY(c,1):a}l=r[u-1]}return l===void 0?``:l})},kY=PG(`replace`),AY=Math.max,jY=Math.min,MY=VW([].concat),NY=VW([].push),PY=VW(``.indexOf),FY=VW(``.slice),IY=`a`.replace(/./,`$0`)===`$0`,LY=!!/./[kY]&&/./[kY](`a`,`$0`)===``;MJ(`replace`,function(e,t,n){var r=LY?`$`:`$0`;return[function(e,n){var r=YW(this),i=e==null?void 0:gG(e,kY);return i?MW(i,e,r,n):MW(t,nq(r),e,n)},function(e,i){var a=KG(this),o=nq(e);if(typeof i==`string`&&PY(i,r)===-1&&PY(i,`$<`)===-1){var s=n(t,a,o,i);if(s.done)return s.value}var c=ZW(i);c||(i=nq(i));var l=a.global;if(l){var u=a.unicode;a.lastIndex=0}for(var d=[];;){var f=KJ(a,o);if(f===null||(NY(d,f),!l))break;nq(f[0])===``&&(a.lastIndex=VJ(o,DK(a.lastIndex),u))}for(var p,m=``,h=0,g=0;g=h&&(m+=FY(o,h,v)+C,h=v+_.length)}return m+FY(o,h)}]},!!kW(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:`7`},e},``.replace(e,`$`)!==`7`})||!IY||LY);var RY={selector:`td:not([data-w-e-type]),th:not([data-w-e-type])`,parseElemHtml:function(e,t,n){var r=V(e);(t=t.filter(function(e){return!!z.isText(e)||!!n.isInline(e)})).length===0&&(t=[{text:r.text().replace(/\s+/gm,` `)}]);var i=parseInt(r.attr(`colSpan`)||`1`),a=parseInt(r.attr(`rowSpan`)||`1`),o=r.attr(`width`)||`auto`;return{type:`table-cell`,isHeader:cY(r)===`th`,colSpan:i,rowSpan:a,width:o,children:t}}},zY={selector:`tr:not([data-w-e-type])`,parseElemHtml:function(e,t,n){return{type:`table-row`,children:t.filter(function(e){return K.getNodeType(e)===`table-cell`})}}},BY={selector:`table:not([data-w-e-type])`,parseElemHtml:function(e,t,n){var r=V(e),i=`auto`;return function(e,t){for(var n=``,r=(e.attr(`style`)||``).split(`;`),i=r.length,a=0;a`,this.tag=`button`,this.showDropPanel=!0,this.$content=null}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return t==null||!R.isCollapsed(t)||!!K.getSelectedElems(e).some(function(t){var n=K.getNodeType(t);return n===`pre`||n===`table`||n===`list-item`||!!e.isVoid(t)})},e.prototype.getPanelContentElem=function(e){var t=this;if(this.$content)return this.$content[0];for(var n=V(`
        `),r=V(`0 × 0`),i=V(`
        `),a=0;a<10;a++){for(var o=V(``),s=0;s<10;s++){var c=V(``);c.attr(`data-x`,s.toString()),c.attr(`data-y`,a.toString()),o.append(c),c.on(`mouseenter`,function(e){var t=e.target;if(t!=null){var n=V(t).dataset(),a=n.x,o=n.y;r[0].innerHTML=a+1+` × `+(o+1),i.children().each(function(e){V(e).children().each(function(e){var t=V(e),n=t.dataset(),r=n.x,i=n.y;r<=a&&i<=o?t.addClass(`active`):t.removeClass(`active`)})})}}),c.on(`click`,function(n){n.preventDefault();var r=n.target;if(r!=null){var i=V(r).dataset(),a=i.x,o=i.y;t.insertTable(e,o+1,a+1)}})}i.append(o)}return n.append(i),n.append(r),this.$content=n,n[0]},e.prototype.insertTable=function(e,t,n){var r=parseInt(t,10),i=parseInt(n,10);if(r&&i&&!(r<=0||i<=0)){K.isSelectedEmptyParagraph(e)&&B.removeNodes(e,{mode:`highest`});var a=function(e,t){for(var n=[],r=0;r`,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return e.selection==null||K.getSelectedNodeByType(e,`table`)==null},e.prototype.exec=function(e,t){this.isDisabled(e)||B.removeNodes(e,{mode:`highest`})},e}(),UY=function(){function e(){this.title=q(`tableModule.insertRow`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return t==null||!R.isCollapsed(t)||K.getSelectedNodeByType(e,`table`)==null},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=tJ(P.nodes(e,{match:function(e){return K.checkNodeType(e,`table-cell`)},universal:!0}),1),r=tJ(n[0],2),i=r[0],a=r[1],o=K.getParentNode(e,i),s=o?.children.length||0;if(s!==0){for(var c={type:`table-row`,children:[]},l=0;l`,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return t==null||!R.isCollapsed(t)||K.getSelectedNodeByType(e,`table-row`)==null},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=tJ(P.nodes(e,{match:function(e){return K.checkNodeType(e,`table-row`)},universal:!0}),1),r=tJ(n[0],2),i=r[0],a=r[1],o=K.getParentNode(e,i);(o?.children.length||0)<=1?B.removeNodes(e,{mode:`highest`}):B.removeNodes(e,{at:a})}},e}(),GY={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},KY=BG(`span`).classList,qY=KY&&KY.constructor&&KY.constructor.prototype,JY=qY===Object.prototype?void 0:qY,YY=uJ.forEach,XY=function(e,t){var n=[].forEach;return!!n&&kW(function(){n.call(null,function(){throw 1},1)})}(),ZY=XY?[].forEach:function(e){return YY(this,e,arguments.length>1?arguments[1]:void 0)},QY=function(e){if(e&&e.forEach!==ZY)try{XG(e,`forEach`,ZY)}catch{e.forEach=ZY}};for(var $Y in GY)GY[$Y]&&QY(OW[$Y]&&OW[$Y].prototype);QY(JY);var eX=function(){function e(){this.title=q(`tableModule.insertCol`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return t==null||!R.isCollapsed(t)||K.getSelectedNodeByType(e,`table`)==null},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=tJ(P.nodes(e,{match:function(e){return K.checkNodeType(e,`table-cell`)},universal:!0}),1),r=tJ(n[0],2),i=r[0],a=r[1],o=K.getParentNode(e,i);if(o!=null){var s=K.getParentNode(e,o);s!=null&&(s.children||[]).forEach(function(t,n){N.isElement(t)&&(t.children||[]).forEach(function(t){var r=K.findPath(e,t);if(r.length===a.length&&SW(r.slice(-1),a.slice(-1))){var i={type:`table-cell`,children:[{text:``}]};n===0&&mJ(s)&&(i.isHeader=!0),B.insertNodes(e,i,{at:r})}})})}}},e}(),tX=function(){function e(){this.title=q(`tableModule.deleteCol`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return t==null||!R.isCollapsed(t)||K.getSelectedNodeByType(e,`table-cell`)==null},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=tJ(P.nodes(e,{match:function(e){return K.checkNodeType(e,`table-cell`)},universal:!0}),1),r=tJ(n[0],2),i=r[0],a=r[1],o=K.getParentNode(e,i),s=o?.children.length||0;if(!o||s<=1)B.removeNodes(e,{mode:`highest`});else{var c=K.getParentNode(e,o);c!=null&&(c.children||[]).forEach(function(t){N.isElement(t)&&(t.children||[]).forEach(function(t){var n=K.findPath(e,t);n.length===a.length&&SW(n.slice(-1),a.slice(-1))&&B.removeNodes(e,{at:n})})})}}},e}(),nX=function(){function e(){this.title=q(`tableModule.header`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){var t=K.getSelectedNodeByType(e,`table`);return t!=null&&mJ(t)},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return t==null||!R.isCollapsed(t)||K.getSelectedNodeByType(e,`table`)==null},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=!t,r=K.getSelectedNodeByType(e,`table`);r!=null&&pJ(r).forEach(function(t){return B.setNodes(e,{isHeader:n},{at:K.findPath(e,t)})})}},e}(),rX=function(){function e(){this.title=q(`tableModule.widthAuto`),this.iconSvg=``,this.tag=`button`}return e.prototype.getValue=function(e){var t=K.getSelectedNodeByType(e,`table`);return t!=null&&t.width===`100%`},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return t==null||!R.isCollapsed(t)||K.getSelectedNodeByType(e,`table`)==null},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n={width:t?`auto`:`100%`};B.setNodes(e,n,{mode:`highest`})}},e}(),iX={renderElems:[_Y,vY,yY],elemsToHtml:[{type:`table`,elemToHtml:function(e,t){var n=e.width;return``+t+`
        `}},{type:`table-row`,elemToHtml:function(e,t){return``+t+``}},{type:`table-cell`,elemToHtml:function(e,t){var n=e,r=n.colSpan,i=r===void 0?1:r,a=n.rowSpan,o=a===void 0?1:a,s=n.isHeader,c=s!==void 0&&s,l=n.width,u=c?`th`:`td`;return`<`+u+` colSpan="`+i+`" rowSpan="`+o+`" width="`+(l===void 0?`auto`:l)+`">`+t+``}}],preParseHtml:[bY],parseElemsHtml:[RY,zY,BY],menus:[{key:`insertTable`,factory:function(){return new VY}},{key:`deleteTable`,factory:function(){return new HY}},{key:`insertTableRow`,factory:function(){return new UY}},{key:`deleteTableRow`,factory:function(){return new WY}},{key:`insertTableCol`,factory:function(){return new eX}},{key:`deleteTableCol`,factory:function(){return new tX}},{key:`tableHeader`,factory:function(){return new nX}},{key:`tableFullWidth`,factory:function(){return new rX}}],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward,r=e.deleteForward,i=e.normalizeNode,a=e.insertData,o=e.handleTab,s=e.selectAll,c=e;return c.insertBreak=function(){K.getSelectedNodeByType(c,`table`)==null?t():c.insertText(` +`)},c.deleteBackward=function(e){if(!nJ(c)){var t=c.selection;if(t){var r=P.before(c,t);if(r){var i=rJ(c,r),a=rJ(c,t);if(i&&!a)return}}n(e)}},c.handleTab=function(){var t;if(K.getSelectedNodeByType(c,`table`)){var n=P.above(e);K.checkNodeType(n[0],`table-cell`)&&B.select(e,n[1]);var r=P.next(e);if(r)r[0]&&r[0].text&&(r=(t=P.above(e,{at:r[1]}))??r),B.select(e,r[1]);else{var i=c.children||[],a=i.length;if(K.checkNodeType(i[a-1],`table`)){var s=K.genEmptyParagraph();B.insertNodes(c,s,{at:[a]}),c.handleTab()}}}else o()},c.deleteForward=function(e){nJ(c)||r(e)},c.normalizeNode=function(e){var t=tJ(e,2),n=t[0],r=t[1];if(K.getNodeType(n)!==`table`)return i([n,r]);if(K.isLastNode(c,n)){var a=K.genEmptyParagraph();B.insertNodes(c,a,{at:[r[0]+1]})}},c.insertData=function(e){if(K.getSelectedNodeByType(c,`table`)!=null){var t=e.getData(`text/plain`);t===` +`||/]+>/.test(e.getData(`text/html`))?a(e):P.insertText(c,t)}else a(e)},c.selectAll=function(){var e=c.selection;if(e!=null){var t=K.getSelectedNodeByType(c,`table-cell`);if(t!=null){var n=e.anchor,r=e.focus;if(I.equals(n.path.slice(0,3),r.path.slice(0,3)))if(F.string(t).length!==0){var i=K.findPath(c,t),a={anchor:P.start(c,i),focus:P.end(c,i)};c.select(a)}else s();else s()}else s()}else s()},c}};xO(`en`,{videoModule:{delete:`Delete`,uploadVideo:`Upload video`,insertVideo:`Insert video`,videoSrc:`Video source`,videoSrcPlaceHolder:`Video file url, or third-party