layers-design-system 3.0.13 → 3.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,13 +108,13 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:r,curr
108
108
 
109
109
  `,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
110
110
 
111
- `,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var u={placement:h1(n.placement),variation:TV(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:a,isFixed:n.options.strategy==="fixed"};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign({},n.styles.popper,IV(Object.assign({},u,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:i,roundOffsets:c})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,IV(Object.assign({},u,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}var A7e={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:I7e,data:{}};function O7e(e){var n=e.state;Object.keys(n.elements).forEach(function(o){var r=n.styles[o]||{},a=n.attributes[o]||{},l=n.elements[o];!ol(l)||!wi(l)||(Object.assign(l.style,r),Object.keys(a).forEach(function(i){var s=a[i];s===!1?l.removeAttribute(i):l.setAttribute(i,s===!0?"":s)}))})}function z7e(e){var n=e.state,o={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,o.popper),n.styles=o,n.elements.arrow&&Object.assign(n.elements.arrow.style,o.arrow),function(){Object.keys(n.elements).forEach(function(r){var a=n.elements[r],l=n.attributes[r]||{},i=Object.keys(n.styles.hasOwnProperty(r)?n.styles[r]:o[r]),s=i.reduce(function(c,d){return c[d]="",c},{});!ol(a)||!wi(a)||(Object.assign(a.style,s),Object.keys(l).forEach(function(c){a.removeAttribute(c)}))})}}var B7e={name:"applyStyles",enabled:!0,phase:"write",fn:O7e,effect:z7e,requires:["computeStyles"]},L7e=[x7e,S7e,A7e,B7e],V7e=k7e({defaultModifiers:L7e});function $7e(e,n,o){var r=h1(e),a=[Pc,Ru].indexOf(r)>=0?-1:1,l=typeof o=="function"?o(Object.assign({},n,{placement:e})):o,i=l[0],s=l[1];return i=i||0,s=(s||0)*a,[Pc,rh].indexOf(r)>=0?{x:s,y:i}:{x:i,y:s}}function j7e(e){var n=e.state,o=e.options,r=e.name,a=o.offset,l=a===void 0?[0,0]:a,i=r7e.reduce(function(u,f){return u[f]=$7e(f,n.rects,l),u},{}),s=i[n.placement],c=s.x,d=s.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=c,n.modifiersData.popperOffsets.y+=d),n.modifiersData[r]=i}var P7e={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:j7e};const[R7e,Fc]=Fe("popover"),F7e=["show","overlay","duration","teleport","overlayStyle","overlayClass","closeOnClickOverlay"],H7e={show:Boolean,theme:rt("light"),overlay:Boolean,actions:fo(),trigger:rt("click"),duration:We,showArrow:Le,placement:rt("bottom"),iconPrefix:String,overlayClass:Dn,overlayStyle:Object,closeOnClickAction:Le,closeOnClickOverlay:Le,closeOnClickOutside:Le,offset:{type:Array,default:()=>[0,8]},teleport:{type:[String,Object],default:"body"}};var U7e=t.defineComponent({name:R7e,props:H7e,emits:["select","touchstart","update:show"],setup(e,{emit:n,slots:o,attrs:r}){let a;const l=t.ref(),i=t.ref(),s=t.ref(),c=()=>({placement:e.placement,modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},bt({},P7e,{options:{offset:e.offset}})]}),d=()=>i.value&&s.value?V7e(i.value,s.value.popupRef.value,c()):null,u=()=>{t.nextTick(()=>{e.show&&(a?a.setOptions(c()):a=d())})},f=w=>n("update:show",w),p=()=>{e.trigger==="click"&&f(!e.show)},m=(w,N)=>{w.disabled||(n("select",w,N),e.closeOnClickAction&&f(!1))},g=()=>{e.show&&e.closeOnClickOutside&&(!e.overlay||e.closeOnClickOverlay)&&f(!1)},y=(w,N)=>o.action?o.action({action:w,index:N}):[w.icon&&t.createVNode(Ht,{name:w.icon,classPrefix:e.iconPrefix,class:Fc("action-icon")},null),t.createVNode("div",{class:[Fc("action-text"),PC]},[w.text])],b=(w,N)=>{const{icon:_,color:C,disabled:k,className:E}=w;return t.createVNode("div",{role:"menuitem",class:[Fc("action",{disabled:k,"with-icon":_}),E],style:{color:C},tabindex:k?void 0:0,"aria-disabled":k||void 0,onClick:()=>m(w,N)},[y(w,N)])};return t.onMounted(()=>{u(),t.watchEffect(()=>{var w;l.value=(w=s.value)==null?void 0:w.popupRef.value})}),t.onBeforeUnmount(()=>{a&&(a.destroy(),a=null)}),t.watch(()=>[e.show,e.offset,e.placement],u),vg([i,l],g,{eventName:"touchstart"}),()=>{var w;return t.createVNode(t.Fragment,null,[t.createVNode("span",{ref:i,class:Fc("wrapper"),onClick:p},[(w=o.reference)==null?void 0:w.call(o)]),t.createVNode(Xa,t.mergeProps({ref:s,class:Fc([e.theme]),position:"",transition:"van-popover-zoom",lockScroll:!1,"onUpdate:show":f},r,_n(e,F7e)),{default:()=>[e.showArrow&&t.createVNode("div",{class:Fc("arrow")},null),t.createVNode("div",{role:"menu",class:Fc("content")},[o.default?o.default():e.actions.map(b)])]})])}}});const Y7e=Xe(U7e),[W7e,I_]=Fe("progress"),Q7e={color:String,inactive:Boolean,pivotText:String,textColor:String,showPivot:Le,pivotColor:String,trackColor:String,strokeWidth:We,percentage:{type:We,default:0,validator:e=>e>=0&&e<=100}};var K7e=t.defineComponent({name:W7e,props:Q7e,setup(e){const n=t.computed(()=>e.inactive?void 0:e.color),o=()=>{const{textColor:r,pivotText:a,pivotColor:l,percentage:i}=e,s=a??`${i}%`;if(e.showPivot&&s){const c={color:r,left:`${+i}%`,transform:`translate(-${+i}%,-50%)`,background:l||n.value};return t.createVNode("span",{style:c,class:I_("pivot",{inactive:e.inactive})},[s])}};return()=>{const{trackColor:r,percentage:a,strokeWidth:l}=e,i={background:r,height:rn(l)},s={width:`${a}%`,background:n.value};return t.createVNode("div",{class:I_(),style:i},[t.createVNode("span",{class:I_("portion",{inactive:e.inactive}),style:s},null),o()])}}});const q7e=Xe(K7e),[G7e,ah,X7e]=Fe("pull-refresh"),AV=50,Z7e=["pulling","loosing","success"],J7e={disabled:Boolean,modelValue:Boolean,headHeight:ft(AV),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:We,successDuration:ft(500),animationDuration:ft(300)};var ePe=t.defineComponent({name:G7e,props:J7e,emits:["change","refresh","update:modelValue"],setup(e,{emit:n,slots:o}){let r;const a=t.ref(),l=t.ref(),i=ku(a),s=t.reactive({status:"normal",distance:0,duration:0}),c=zl(),d=()=>{if(e.headHeight!==AV)return{height:`${e.headHeight}px`}},u=()=>s.status!=="loading"&&s.status!=="success"&&!e.disabled,f=C=>{const k=+(e.pullDistance||e.headHeight);return C>k&&(C<k*2?C=k+(C-k)/2:C=k*1.5+(C-k*2)/4),Math.round(C)},p=(C,k)=>{const E=+(e.pullDistance||e.headHeight);s.distance=C,k?s.status="loading":C===0?s.status="normal":C<E?s.status="pulling":s.status="loosing",n("change",{status:s.status,distance:C})},m=()=>{const{status:C}=s;return C==="normal"?"":e[`${C}Text`]||X7e(C)},g=()=>{const{status:C,distance:k}=s;if(o[C])return o[C]({distance:k});const E=[];return Z7e.includes(C)&&E.push(t.createVNode("div",{class:ah("text")},[m()])),C==="loading"&&E.push(t.createVNode(Ga,{class:ah("loading")},{default:m})),E},y=()=>{s.status="success",setTimeout(()=>{p(0)},+e.successDuration)},b=C=>{r=ps(i.value)===0,r&&(s.duration=0,c.start(C))},w=C=>{u()&&b(C)},N=C=>{if(u()){r||b(C);const{deltaY:k}=c;c.move(C),r&&k.value>=0&&c.isVertical()&&(Fn(C),p(f(k.value)))}},_=()=>{r&&c.deltaY.value&&u()&&(s.duration=+e.animationDuration,s.status==="loosing"?(p(+e.headHeight,!0),n("update:modelValue",!0),t.nextTick(()=>n("refresh"))):p(0))};return t.watch(()=>e.modelValue,C=>{s.duration=+e.animationDuration,C?p(+e.headHeight,!0):o.success||e.successText?y():p(0,!1)}),no("touchmove",N,{target:l}),()=>{var C;const k={transitionDuration:`${s.duration}ms`,transform:s.distance?`translate3d(0,${s.distance}px, 0)`:""};return t.createVNode("div",{ref:a,class:ah()},[t.createVNode("div",{ref:l,class:ah("track"),style:k,onTouchstartPassive:w,onTouchend:_,onTouchcancel:_},[t.createVNode("div",{class:ah("head"),style:d()},[g()]),(C=o.default)==null?void 0:C.call(o)])])}}});const tPe=Xe(ePe),[nPe,g1]=Fe("rate");function oPe(e,n,o,r){return e>=n?{status:"full",value:1}:e+.5>=n&&o&&!r?{status:"half",value:.5}:e+1>=n&&o&&r?{status:"half",value:Math.round((e-n+1)*1e10)/1e10}:{status:"void",value:0}}const rPe={size:We,icon:rt("star"),color:String,count:ft(5),gutter:We,readonly:Boolean,disabled:Boolean,voidIcon:rt("star-o"),allowHalf:Boolean,voidColor:String,touchable:Le,iconPrefix:String,modelValue:Ol(0),disabledColor:String};var aPe=t.defineComponent({name:nPe,props:rPe,emits:["change","update:modelValue"],setup(e,{emit:n}){const o=zl(),[r,a]=Gg(),l=t.ref(),i=()=>e.readonly||e.disabled||!e.touchable,s=t.computed(()=>Array(+e.count).fill("").map((N,_)=>oPe(e.modelValue,_+1,e.allowHalf,e.readonly)));let c,d,u=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER;const p=()=>{d=Nn(l);const N=r.value.map(Nn);c=[],N.forEach((_,C)=>{u=Math.min(_.top,u),f=Math.max(_.top,f),e.allowHalf?c.push({score:C+.5,left:_.left,top:_.top,height:_.height},{score:C+1,left:_.left+_.width/2,top:_.top,height:_.height}):c.push({score:C+1,left:_.left,top:_.top,height:_.height})})},m=(N,_)=>{for(let C=c.length-1;C>0;C--)if(_>=d.top&&_<=d.bottom){if(N>c[C].left&&_>=c[C].top&&_<=c[C].top+c[C].height)return c[C].score}else{const k=_<d.top?u:f;if(N>c[C].left&&c[C].top===k)return c[C].score}return e.allowHalf?.5:1},g=N=>{!e.disabled&&!e.readonly&&N!==e.modelValue&&(n("update:modelValue",N),n("change",N))},y=N=>{i()||(o.start(N),p())},b=N=>{if(!i()&&(o.move(N),o.isHorizontal())){const{clientX:_,clientY:C}=N.touches[0];Fn(N),g(m(_,C))}},w=(N,_)=>{const{icon:C,size:k,color:E,count:T,gutter:S,voidIcon:D,disabled:v,voidColor:I,allowHalf:B,iconPrefix:$,disabledColor:F}=e,L=_+1,A=N.status==="full",P=N.status==="void",j=B&&N.value>0&&N.value<1;let O;S&&L!==+T&&(O={paddingRight:rn(S)});const z=R=>{p(),g(B?m(R.clientX,R.clientY):L)};return t.createVNode("div",{key:_,ref:a(_),role:"radio",style:O,class:g1("item"),tabindex:v?void 0:0,"aria-setsize":T,"aria-posinset":L,"aria-checked":!P,onClick:z},[t.createVNode(Ht,{size:k,name:A?C:D,class:g1("icon",{disabled:v,full:A}),color:v?F:A?E:I,classPrefix:$},null),j&&t.createVNode(Ht,{size:k,style:{width:N.value+"em"},name:P?D:C,class:g1("icon",["half",{disabled:v,full:!P}]),color:v?F:P?I:E,classPrefix:$},null)])};return fs(()=>e.modelValue),no("touchmove",b,{target:l}),()=>t.createVNode("div",{ref:l,role:"radiogroup",class:g1({readonly:e.readonly,disabled:e.disabled}),tabindex:e.disabled?void 0:0,"aria-disabled":e.disabled,"aria-readonly":e.readonly,onTouchstartPassive:y},[s.value.map(w)])}});const lPe=Xe(aPe),iPe=Xe(NVe),[sPe,lh,cPe]=Fe("search"),dPe=bt({},ZC,{label:String,shape:rt("square"),leftIcon:rt("search"),clearable:Le,actionText:String,background:String,showAction:Boolean});var uPe=t.defineComponent({name:sPe,props:dPe,emits:["blur","focus","clear","search","cancel","click-input","click-left-icon","click-right-icon","update:modelValue"],setup(e,{emit:n,slots:o,attrs:r}){const a=vu(),l=t.ref(),i=()=>{o.action||(n("update:modelValue",""),n("cancel"))},s=k=>{k.keyCode===13&&(Fn(k),n("search",e.modelValue))},c=()=>e.id||`${a}-input`,d=()=>{if(o.label||e.label)return t.createVNode("label",{class:lh("label"),for:c()},[o.label?o.label():e.label])},u=()=>{if(e.showAction){const k=e.actionText||cPe("cancel");return t.createVNode("div",{class:lh("action"),role:"button",tabindex:0,onClick:i},[o.action?o.action():k])}},f=()=>{var k;return(k=l.value)==null?void 0:k.blur()},p=()=>{var k;return(k=l.value)==null?void 0:k.focus()},m=k=>n("blur",k),g=k=>n("focus",k),y=k=>n("clear",k),b=k=>n("click-input",k),w=k=>n("click-left-icon",k),N=k=>n("click-right-icon",k),_=Object.keys(ZC),C=()=>{const k=bt({},r,_n(e,_),{id:c()}),E=T=>n("update:modelValue",T);return t.createVNode(Bl,t.mergeProps({ref:l,type:"search",class:lh("field"),border:!1,onBlur:m,onFocus:g,onClear:y,onKeypress:s,"onClick-input":b,"onClick-left-icon":w,"onClick-right-icon":N,"onUpdate:modelValue":E},k),_n(o,["left-icon","right-icon"]))};return tn({focus:p,blur:f}),()=>{var k;return t.createVNode("div",{class:lh({"show-action":e.showAction}),style:{background:e.background}},[(k=o.left)==null?void 0:k.call(o),t.createVNode("div",{class:lh("content",e.shape)},[d(),C()]),u()])}}});const fPe=Xe(uPe),pPe=[...UC,"round","closeOnPopstate","safeAreaInsetBottom"],OV={qq:"qq",link:"link-o",weibo:"weibo",qrcode:"qr",poster:"photo-o",wechat:"wechat","weapp-qrcode":"miniprogram-o","wechat-moments":"wechat-moments"},[hPe,rl,mPe]=Fe("share-sheet"),gPe=bt({},Su,{title:String,round:Le,options:fo(),cancelText:String,description:String,closeOnPopstate:Le,safeAreaInsetBottom:Le});var yPe=t.defineComponent({name:hPe,props:gPe,emits:["cancel","select","update:show"],setup(e,{emit:n,slots:o}){const r=p=>n("update:show",p),a=()=>{r(!1),n("cancel")},l=(p,m)=>n("select",p,m),i=()=>{const p=o.title?o.title():e.title,m=o.description?o.description():e.description;if(p||m)return t.createVNode("div",{class:rl("header")},[p&&t.createVNode("h2",{class:rl("title")},[p]),m&&t.createVNode("span",{class:rl("description")},[m])])},s=p=>OV[p]?t.createVNode("div",{class:rl("icon",[p])},[t.createVNode(Ht,{name:OV[p]||p},null)]):t.createVNode("img",{src:p,class:rl("image-icon")},null),c=(p,m)=>{const{name:g,icon:y,className:b,description:w}=p;return t.createVNode("div",{role:"button",tabindex:0,class:[rl("option"),b,Nr],onClick:()=>l(p,m)},[s(y),g&&t.createVNode("span",{class:rl("name")},[g]),w&&t.createVNode("span",{class:rl("option-description")},[w])])},d=(p,m)=>t.createVNode("div",{class:rl("options",{border:m})},[p.map(c)]),u=()=>{const{options:p}=e;return Array.isArray(p[0])?p.map((m,g)=>d(m,g!==0)):d(p)},f=()=>{var p;const m=(p=e.cancelText)!=null?p:mPe("cancel");if(o.cancel||m)return t.createVNode("button",{type:"button",class:rl("cancel"),onClick:a},[o.cancel?o.cancel():m])};return()=>t.createVNode(Xa,t.mergeProps({class:rl(),position:"bottom","onUpdate:show":r},_n(e,pPe)),{default:()=>[i(),u(),f()]})}});const bPe=Xe(yPe),[zV,MPe]=Fe("sidebar"),BV=Symbol(zV),wPe={modelValue:ft(0)};var CPe=t.defineComponent({name:zV,props:wPe,emits:["change","update:modelValue"],setup(e,{emit:n,slots:o}){const{linkChildren:r}=tr(BV),a=()=>+e.modelValue;return r({getActive:a,setActive:i=>{i!==a()&&(n("update:modelValue",i),n("change",i))}}),()=>{var i;return t.createVNode("div",{role:"tablist",class:MPe()},[(i=o.default)==null?void 0:i.call(o)])}}});const LV=Xe(CPe),[_Pe,VV]=Fe("sidebar-item"),NPe=bt({},ys,{dot:Boolean,title:String,badge:We,disabled:Boolean,badgeProps:Object});var kPe=t.defineComponent({name:_Pe,props:NPe,emits:["click"],setup(e,{emit:n,slots:o}){const r=$c(),{parent:a,index:l}=Po(BV);if(!a){process.env.NODE_ENV!=="production"&&console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");return}const i=()=>{e.disabled||(n("click",l.value),a.setActive(l.value),r())};return()=>{const{dot:s,badge:c,title:d,disabled:u}=e,f=l.value===a.getActive();return t.createVNode("div",{role:"tab",class:VV({select:f,disabled:u}),tabindex:u?void 0:0,"aria-selected":f,onClick:i},[t.createVNode(jc,t.mergeProps({dot:s,class:VV("text"),content:c},e.badgeProps),{default:()=>[o.title?o.title():d]})])}}});const $V=Xe(kPe),[EPe,ih]=Fe("skeleton"),jV="100%",xPe="60%",TPe={row:ft(0),title:Boolean,round:Boolean,avatar:Boolean,loading:Le,animate:Le,avatarSize:We,titleWidth:We,avatarShape:rt("round"),rowWidth:{type:[Number,String,Array],default:jV}};var SPe=t.defineComponent({name:EPe,inheritAttrs:!1,props:TPe,setup(e,{slots:n,attrs:o}){const r=()=>{if(e.avatar)return t.createVNode("div",{class:ih("avatar",e.avatarShape),style:hs(e.avatarSize)},null)},a=()=>{if(e.title)return t.createVNode("h3",{class:ih("title"),style:{width:rn(e.titleWidth)}},null)},l=s=>{const{rowWidth:c}=e;return c===jV&&s===+e.row-1?xPe:Array.isArray(c)?c[s]:c},i=()=>Array(+e.row).fill("").map((s,c)=>t.createVNode("div",{class:ih("row"),style:{width:rn(l(c))}},null));return()=>{var s;return e.loading?t.createVNode("div",t.mergeProps({class:ih({animate:e.animate,round:e.round})},o),[r(),t.createVNode("div",{class:ih("content")},[a(),i()])]):(s=n.default)==null?void 0:s.call(n)}}});const DPe=Xe(SPe),[vPe,sh]=Fe("slider"),IPe={min:ft(0),max:ft(100),step:ft(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:We,buttonSize:We,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};var APe=t.defineComponent({name:vPe,props:IPe,emits:["change","drag-end","drag-start","update:modelValue"],setup(e,{emit:n,slots:o}){let r,a,l;const i=t.ref(),s=t.ref(),c=t.ref(),d=zl(),u=t.computed(()=>Number(e.max)-Number(e.min)),f=t.computed(()=>{const I=e.vertical?"width":"height";return{background:e.inactiveColor,[I]:rn(e.barHeight)}}),p=I=>e.range&&Array.isArray(I),m=()=>{const{modelValue:I,min:B}=e;return p(I)?`${(I[1]-I[0])*100/u.value}%`:`${(I-Number(B))*100/u.value}%`},g=()=>{const{modelValue:I,min:B}=e;return p(I)?`${(I[0]-Number(B))*100/u.value}%`:"0%"},y=t.computed(()=>{const B={[e.vertical?"height":"width"]:m(),background:e.activeColor};c.value&&(B.transition="none");const $=()=>e.vertical?e.reverse?"bottom":"top":e.reverse?"right":"left";return B[$()]=g(),B}),b=I=>{const B=+e.min,$=+e.max,F=+e.step;I=To(I,B,$);const L=Math.round((I-B)/F)*F;return Y9(B,L)},w=(I,B)=>JSON.stringify(I)===JSON.stringify(B),N=I=>{var B,$;const F=(B=I[0])!=null?B:Number(e.min),L=($=I[1])!=null?$:Number(e.max);return F>L?[L,F]:[F,L]},_=(I,B)=>{p(I)?I=N(I).map(b):I=b(I),w(I,e.modelValue)||n("update:modelValue",I),B&&!w(I,l)&&n("change",I)},C=I=>{if(I.stopPropagation(),e.disabled||e.readonly)return;const{min:B,reverse:$,vertical:F,modelValue:L}=e,A=Nn(i),P=()=>F?$?A.bottom-I.clientY:I.clientY-A.top:$?A.right-I.clientX:I.clientX-A.left,j=F?A.height:A.width,O=Number(B)+P()/j*u.value;if(p(L)){const[z,R]=L,Y=(z+R)/2;O<=Y?_([O,R],!0):_([z,O],!0)}else _(O,!0)},k=I=>{e.disabled||e.readonly||(d.start(I),a=e.modelValue,p(a)?l=a.map(b):l=b(a),c.value="start")},E=I=>{if(e.disabled||e.readonly)return;c.value==="start"&&n("drag-start",I),Fn(I,!0),d.move(I),c.value="dragging";const B=Nn(i),$=e.vertical?d.deltaY.value:d.deltaX.value,F=e.vertical?B.height:B.width;let L=$/F*u.value;if(e.reverse&&(L=-L),p(l)){const A=e.reverse?1-r:r;a[A]=l[A]+L}else a=l+L;_(a)},T=I=>{e.disabled||e.readonly||(c.value==="dragging"&&(_(a,!0),n("drag-end",I)),c.value="")},S=I=>typeof I=="number"?sh("button-wrapper",["left","right"][I]):sh("button-wrapper",e.reverse?"left":"right"),D=(I,B)=>{if(typeof B=="number"){const $=o[B===0?"left-button":"right-button"];if($)return $({value:I})}return o.button?o.button({value:I}):t.createVNode("div",{class:sh("button"),style:hs(e.buttonSize)},null)},v=I=>{const B=typeof I=="number"?e.modelValue[I]:e.modelValue;return t.createVNode("div",{ref:s,role:"slider",class:S(I),tabindex:e.disabled?void 0:0,"aria-valuemin":e.min,"aria-valuenow":B,"aria-valuemax":e.max,"aria-disabled":e.disabled||void 0,"aria-readonly":e.readonly||void 0,"aria-orientation":e.vertical?"vertical":"horizontal",onTouchstartPassive:$=>{typeof I=="number"&&(r=I),k($)},onTouchend:T,onTouchcancel:T,onClick:BC},[D(B,I)])};return _(e.modelValue),fs(()=>e.modelValue),no("touchmove",E,{target:s}),()=>t.createVNode("div",{ref:i,style:f.value,class:sh({vertical:e.vertical,disabled:e.disabled}),onClick:C},[t.createVNode("div",{class:sh("bar"),style:y.value},[e.range?[v(0),v(1)]:v()])])}});const OPe=Xe(APe),[PV,zPe]=Fe("space"),BPe={align:String,direction:{type:String,default:"horizontal"},size:{type:[Number,String,Array],default:8},wrap:Boolean,fill:Boolean};function RV(e=[]){const n=[];return e.forEach(o=>{Array.isArray(o)?n.push(...o):o.type===t.Fragment?n.push(...RV(o.children)):n.push(o)}),n.filter(o=>{var r;return!(o&&(typeof Comment<"u"&&o.type===Comment||o.type===t.Fragment&&((r=o.children)==null?void 0:r.length)===0||o.type===Text&&o.children.trim()===""))})}var LPe=t.defineComponent({name:PV,props:BPe,setup(e,{slots:n}){const o=t.computed(()=>{var l;return(l=e.align)!=null?l:e.direction==="horizontal"?"center":""}),r=l=>typeof l=="number"?l+"px":l,a=l=>{const i={},s=`${r(Array.isArray(e.size)?e.size[0]:e.size)}`,c=`${r(Array.isArray(e.size)?e.size[1]:e.size)}`;return l?e.wrap?{marginBottom:c}:{}:(e.direction==="horizontal"&&(i.marginRight=s),(e.direction==="vertical"||e.wrap)&&(i.marginBottom=c),i)};return()=>{var l;const i=RV((l=n.default)==null?void 0:l.call(n));return t.createVNode("div",{class:[zPe({[e.direction]:e.direction,[`align-${o.value}`]:o.value,wrap:e.wrap,fill:e.fill})]},[i.map((s,c)=>t.createVNode("div",{key:`item-${c}`,class:`${PV}-item`,style:a(c===i.length-1)},[s]))])}}});const VPe=Xe(LPe),[FV,HV]=Fe("steps"),$Pe={active:ft(0),direction:rt("horizontal"),activeIcon:rt("checked"),iconPrefix:String,finishIcon:String,activeColor:String,inactiveIcon:String,inactiveColor:String},UV=Symbol(FV);var jPe=t.defineComponent({name:FV,props:$Pe,emits:["click-step"],setup(e,{emit:n,slots:o}){const{linkChildren:r}=tr(UV);return r({props:e,onClickStep:l=>n("click-step",l)}),()=>{var l;return t.createVNode("div",{class:HV([e.direction])},[t.createVNode("div",{class:HV("items")},[(l=o.default)==null?void 0:l.call(o)])])}}});const[PPe,Cs]=Fe("step");var RPe=t.defineComponent({name:PPe,setup(e,{slots:n}){const{parent:o,index:r}=Po(UV);if(!o){process.env.NODE_ENV!=="production"&&console.error("[Vant] <Step> must be a child component of <Steps>.");return}const a=o.props,l=()=>{const f=+a.active;return r.value<f?"finish":r.value===f?"process":"waiting"},i=()=>l()==="process",s=t.computed(()=>({background:l()==="finish"?a.activeColor:a.inactiveColor})),c=t.computed(()=>{if(i())return{color:a.activeColor};if(l()==="waiting")return{color:a.inactiveColor}}),d=()=>o.onClickStep(r.value),u=()=>{const{iconPrefix:f,finishIcon:p,activeIcon:m,activeColor:g,inactiveIcon:y}=a;return i()?n["active-icon"]?n["active-icon"]():t.createVNode(Ht,{class:Cs("icon","active"),name:m,color:g,classPrefix:f},null):l()==="finish"&&(p||n["finish-icon"])?n["finish-icon"]?n["finish-icon"]():t.createVNode(Ht,{class:Cs("icon","finish"),name:p,color:g,classPrefix:f},null):n["inactive-icon"]?n["inactive-icon"]():y?t.createVNode(Ht,{class:Cs("icon"),name:y,classPrefix:f},null):t.createVNode("i",{class:Cs("circle"),style:s.value},null)};return()=>{var f;const p=l();return t.createVNode("div",{class:[ms,Cs([a.direction,{[p]:p}])]},[t.createVNode("div",{class:Cs("title",{active:i()}),style:c.value,onClick:d},[(f=n.default)==null?void 0:f.call(n)]),t.createVNode("div",{class:Cs("circle-container"),onClick:d},[u()]),t.createVNode("div",{class:Cs("line"),style:s.value},null)])}}});const FPe=Xe(RPe),[HPe,y1]=Fe("stepper"),UPe=200,YPe=600,b1=(e,n)=>String(e)===String(n),WPe={min:ft(1),max:ft(1/0),name:ft(""),step:ft(1),theme:String,integer:Boolean,disabled:Boolean,showPlus:Le,showMinus:Le,showInput:Le,longPress:Le,allowEmpty:Boolean,modelValue:We,inputWidth:We,buttonSize:We,placeholder:String,disablePlus:Boolean,disableMinus:Boolean,disableInput:Boolean,beforeChange:Function,defaultValue:ft(1),decimalLength:We};var QPe=t.defineComponent({name:HPe,props:WPe,emits:["plus","blur","minus","focus","change","overlimit","update:modelValue"],setup(e,{emit:n}){const o=S=>{const{min:D,max:v,allowEmpty:I,decimalLength:B}=e;return I&&S===""||(S=$C(String(S),!e.integer),S=S===""?0:+S,S=Number.isNaN(S)?+D:S,S=Math.max(Math.min(+v,S),+D),Kt(B)&&(S=S.toFixed(+B))),S},r=()=>{var S;const D=(S=e.modelValue)!=null?S:e.defaultValue,v=o(D);return b1(v,e.modelValue)||n("update:modelValue",v),v};let a;const l=t.ref(),i=t.ref(r()),s=t.computed(()=>e.disabled||e.disableMinus||i.value<=+e.min),c=t.computed(()=>e.disabled||e.disablePlus||i.value>=+e.max),d=t.computed(()=>({width:rn(e.inputWidth),height:rn(e.buttonSize)})),u=t.computed(()=>hs(e.buttonSize)),f=()=>{const S=o(i.value);b1(S,i.value)||(i.value=S)},p=S=>{e.beforeChange?gs(e.beforeChange,{args:[S],done(){i.value=S}}):i.value=S},m=()=>{if(a==="plus"&&c.value||a==="minus"&&s.value){n("overlimit",a);return}const S=a==="minus"?-e.step:+e.step,D=o(Y9(+i.value,S));p(D),n(a)},g=S=>{const D=S.target,{value:v}=D,{decimalLength:I}=e;let B=$C(String(v),!e.integer);if(Kt(I)&&B.includes(".")){const F=B.split(".");B=`${F[0]}.${F[1].slice(0,+I)}`}e.beforeChange?D.value=String(i.value):b1(v,B)||(D.value=B);const $=B===String(+B);p($?+B:B)},y=S=>{var D;e.disableInput?(D=l.value)==null||D.blur():n("focus",S)},b=S=>{const D=S.target,v=o(D.value);D.value=String(v),i.value=v,t.nextTick(()=>{n("blur",S),F9()})};let w,N;const _=()=>{N=setTimeout(()=>{m(),_()},UPe)},C=()=>{e.longPress&&(w=!1,clearTimeout(N),N=setTimeout(()=>{w=!0,m(),_()},YPe))},k=S=>{e.longPress&&(clearTimeout(N),w&&Fn(S))},E=S=>{e.disableInput&&Fn(S)},T=S=>({onClick:D=>{Fn(D),a=S,m()},onTouchstartPassive:()=>{a=S,C()},onTouchend:k,onTouchcancel:k});return t.watch(()=>[e.max,e.min,e.integer,e.decimalLength],f),t.watch(()=>e.modelValue,S=>{b1(S,i.value)||(i.value=o(S))}),t.watch(i,S=>{n("update:modelValue",S),n("change",S,{name:e.name})}),fs(()=>e.modelValue),()=>t.createVNode("div",{role:"group",class:y1([e.theme])},[t.withDirectives(t.createVNode("button",t.mergeProps({type:"button",style:u.value,class:[y1("minus",{disabled:s.value}),{[Nr]:!s.value}],"aria-disabled":s.value||void 0},T("minus")),null),[[t.vShow,e.showMinus]]),t.withDirectives(t.createVNode("input",{ref:l,type:e.integer?"tel":"text",role:"spinbutton",class:y1("input"),value:i.value,style:d.value,disabled:e.disabled,readonly:e.disableInput,inputmode:e.integer?"numeric":"decimal",placeholder:e.placeholder,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":i.value,onBlur:b,onInput:g,onFocus:y,onMousedown:E},null),[[t.vShow,e.showInput]]),t.withDirectives(t.createVNode("button",t.mergeProps({type:"button",style:u.value,class:[y1("plus",{disabled:c.value}),{[Nr]:!c.value}],"aria-disabled":c.value||void 0},T("plus")),null),[[t.vShow,e.showPlus]])])}});const KPe=Xe(QPe),qPe=Xe(jPe),[GPe,al,XPe]=Fe("submit-bar"),ZPe={tip:String,label:String,price:Number,tipIcon:String,loading:Boolean,currency:rt("¥"),disabled:Boolean,textAlign:String,buttonText:String,buttonType:rt("danger"),buttonColor:String,suffixLabel:String,placeholder:Boolean,decimalLength:ft(2),safeAreaInsetBottom:Le};var JPe=t.defineComponent({name:GPe,props:ZPe,emits:["submit"],setup(e,{emit:n,slots:o}){const r=t.ref(),a=$g(r,al),l=()=>{const{price:u,label:f,currency:p,textAlign:m,suffixLabel:g,decimalLength:y}=e;if(typeof u=="number"){const b=(u/100).toFixed(+y).split("."),w=y?`.${b[1]}`:"";return t.createVNode("div",{class:al("text"),style:{textAlign:m}},[t.createVNode("span",null,[f||XPe("label")]),t.createVNode("span",{class:al("price")},[p,t.createVNode("span",{class:al("price-integer")},[b[0]]),w]),g&&t.createVNode("span",{class:al("suffix-label")},[g])])}},i=()=>{var u;const{tip:f,tipIcon:p}=e;if(o.tip||f)return t.createVNode("div",{class:al("tip")},[p&&t.createVNode(Ht,{class:al("tip-icon"),name:p},null),f&&t.createVNode("span",{class:al("tip-text")},[f]),(u=o.tip)==null?void 0:u.call(o)])},s=()=>n("submit"),c=()=>o.button?o.button():t.createVNode(kr,{round:!0,type:e.buttonType,text:e.buttonText,class:al("button",e.buttonType),color:e.buttonColor,loading:e.loading,disabled:e.disabled,onClick:s},null),d=()=>{var u,f;return t.createVNode("div",{ref:r,class:[al(),{"van-safe-area-bottom":e.safeAreaInsetBottom}]},[(u=o.top)==null?void 0:u.call(o),i(),t.createVNode("div",{class:al("bar")},[(f=o.default)==null?void 0:f.call(o),l(),c()])])};return()=>e.placeholder?a(d):d()}});const eRe=Xe(JPe),[tRe,A_]=Fe("swipe-cell"),nRe={name:ft(""),disabled:Boolean,leftWidth:We,rightWidth:We,beforeClose:Function,stopPropagation:Boolean};var oRe=t.defineComponent({name:tRe,props:nRe,emits:["open","close","click"],setup(e,{emit:n,slots:o}){let r,a,l;const i=t.ref(),s=t.ref(),c=t.ref(),d=t.reactive({offset:0,dragging:!1}),u=zl(),f=T=>T.value?Nn(T).width:0,p=t.computed(()=>Kt(e.leftWidth)?+e.leftWidth:f(s)),m=t.computed(()=>Kt(e.rightWidth)?+e.rightWidth:f(c)),g=T=>{d.offset=T==="left"?p.value:-m.value,r||(r=!0,n("open",{name:e.name,position:T}))},y=T=>{d.offset=0,r&&(r=!1,n("close",{name:e.name,position:T}))},b=T=>{const S=Math.abs(d.offset),D=.15,v=r?1-D:D,I=T==="left"?p.value:m.value;I&&S>I*v?g(T):y(T)},w=T=>{e.disabled||(l=d.offset,u.start(T))},N=T=>{if(e.disabled)return;const{deltaX:S}=u;u.move(T),u.isHorizontal()&&(a=!0,d.dragging=!0,(!r||S.value*l<0)&&Fn(T,e.stopPropagation),d.offset=To(S.value+l,-m.value,p.value))},_=()=>{d.dragging&&(d.dragging=!1,b(d.offset>0?"left":"right"),setTimeout(()=>{a=!1},0))},C=(T="outside")=>{n("click",T),r&&!a&&gs(e.beforeClose,{args:[{name:e.name,position:T}],done:()=>y(T)})},k=(T,S)=>D=>{S&&D.stopPropagation(),C(T)},E=(T,S)=>{const D=o[T];if(D)return t.createVNode("div",{ref:S,class:A_(T),onClick:k(T,!0)},[D()])};return tn({open:g,close:y}),vg(i,()=>C("outside"),{eventName:"touchstart"}),no("touchmove",N,{target:i}),()=>{var T;const S={transform:`translate3d(${d.offset}px, 0, 0)`,transitionDuration:d.dragging?"0s":".6s"};return t.createVNode("div",{ref:i,class:A_(),onClick:k("cell",a),onTouchstartPassive:w,onTouchend:_,onTouchcancel:_},[t.createVNode("div",{class:A_("wrapper"),style:S},[E("left",s),(T=o.default)==null?void 0:T.call(o),E("right",c)])])}}});const rRe=Xe(oRe),[YV,WV]=Fe("tabbar"),aRe={route:Boolean,fixed:Le,border:Le,zIndex:We,placeholder:Boolean,activeColor:String,beforeChange:Function,inactiveColor:String,modelValue:ft(0),safeAreaInsetBottom:{type:Boolean,default:null}},QV=Symbol(YV);var lRe=t.defineComponent({name:YV,props:aRe,emits:["change","update:modelValue"],setup(e,{emit:n,slots:o}){const r=t.ref(),{linkChildren:a}=tr(QV),l=$g(r,WV),i=()=>{var d;return(d=e.safeAreaInsetBottom)!=null?d:e.fixed},s=()=>{var d;const{fixed:u,zIndex:f,border:p}=e;return t.createVNode("div",{ref:r,role:"tablist",style:Vc(f),class:[WV({fixed:u}),{[Lg]:p,"van-safe-area-bottom":i()}]},[(d=o.default)==null?void 0:d.call(o)])};return a({props:e,setActive:(d,u)=>{gs(e.beforeChange,{args:[d],done(){n("update:modelValue",d),n("change",d),u()}})}}),()=>e.fixed&&e.placeholder?l(s):s()}});const iRe=Xe(lRe),[sRe,O_]=Fe("tabbar-item"),cRe=bt({},ys,{dot:Boolean,icon:String,name:We,badge:We,badgeProps:Object,iconPrefix:String});var dRe=t.defineComponent({name:sRe,props:cRe,emits:["click"],setup(e,{emit:n,slots:o}){const r=$c(),a=t.getCurrentInstance().proxy,{parent:l,index:i}=Po(QV);if(!l){process.env.NODE_ENV!=="production"&&console.error("[Vant] <TabbarItem> must be a child component of <Tabbar>.");return}const s=t.computed(()=>{var u;const{route:f,modelValue:p}=l.props;if(f&&"$route"in a){const{$route:m}=a,{to:g}=e,y=Pr(g)?g:{path:g};return!!m.matched.find(b=>{const w="path"in y&&y.path===b.path,N="name"in y&&y.name===b.name;return w||N})}return((u=e.name)!=null?u:i.value)===p}),c=u=>{var f;s.value||l.setActive((f=e.name)!=null?f:i.value,r),n("click",u)},d=()=>{if(o.icon)return o.icon({active:s.value});if(e.icon)return t.createVNode(Ht,{name:e.icon,classPrefix:e.iconPrefix},null)};return()=>{var u;const{dot:f,badge:p}=e,{activeColor:m,inactiveColor:g}=l.props,y=s.value?m:g;return t.createVNode("div",{role:"tab",class:O_({active:s.value}),style:{color:y},tabindex:0,"aria-selected":s.value,onClick:c},[t.createVNode(jc,t.mergeProps({dot:f,class:O_("icon"),content:p},e.badgeProps),{default:d}),t.createVNode("div",{class:O_("text")},[(u=o.default)==null?void 0:u.call(o,{active:s.value})])])}}});const uRe=Xe(dRe),[fRe,Fu]=Fe("tree-select"),pRe={max:ft(1/0),items:fo(),height:ft(300),selectedIcon:rt("success"),mainActiveIndex:ft(0),activeId:{type:[Number,String,Array],default:0}};var hRe=t.defineComponent({name:fRe,props:pRe,emits:["click-nav","click-item","update:activeId","update:mainActiveIndex"],setup(e,{emit:n,slots:o}){const r=d=>Array.isArray(e.activeId)?e.activeId.includes(d):e.activeId===d,a=d=>{const u=()=>{if(d.disabled)return;let f;if(Array.isArray(e.activeId)){f=e.activeId.slice();const p=f.indexOf(d.id);p!==-1?f.splice(p,1):f.length<e.max&&f.push(d.id)}else f=d.id;n("update:activeId",f),n("click-item",d)};return t.createVNode("div",{key:d.id,class:["van-ellipsis",Fu("item",{active:r(d.id),disabled:d.disabled})],onClick:u},[d.text,r(d.id)&&t.createVNode(Ht,{name:e.selectedIcon,class:Fu("selected")},null)])},l=d=>{n("update:mainActiveIndex",d)},i=d=>n("click-nav",d),s=()=>{const d=e.items.map(u=>t.createVNode($V,{dot:u.dot,title:u.text,badge:u.badge,class:[Fu("nav-item"),u.className],disabled:u.disabled,onClick:i},null));return t.createVNode(LV,{class:Fu("nav"),modelValue:e.mainActiveIndex,onChange:l},{default:()=>[d]})},c=()=>{if(o.content)return o.content();const d=e.items[+e.mainActiveIndex]||{};if(d.children)return d.children.map(a)};return()=>t.createVNode("div",{class:Fu(),style:{height:rn(e.height)}},[s(),t.createVNode("div",{class:Fu("content")},[c()])])}});const mRe=Xe(hRe),[gRe,lo,yRe]=Fe("uploader");function KV(e,n){return new Promise(o=>{if(n==="file"){o();return}const r=new FileReader;r.onload=a=>{o(a.target.result)},n==="dataUrl"?r.readAsDataURL(e):n==="text"&&r.readAsText(e)})}function qV(e,n){return Dg(e).some(o=>o.file?Cu(n)?n(o.file):o.file.size>n:!1)}function bRe(e,n){const o=[],r=[];return e.forEach(a=>{qV(a,n)?r.push(a):o.push(a)}),{valid:o,invalid:r}}const MRe=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i,wRe=e=>MRe.test(e);function GV(e){return e.isImage?!0:e.file&&e.file.type?e.file.type.indexOf("image")===0:e.url?wRe(e.url):typeof e.content=="string"?e.content.indexOf("data:image")===0:!1}var CRe=t.defineComponent({props:{name:We,item:to(Object),index:Number,imageFit:String,lazyLoad:Boolean,deletable:Boolean,previewSize:[Number,String,Array],beforeDelete:Function},emits:["delete","preview"],setup(e,{emit:n,slots:o}){const r=()=>{const{status:d,message:u}=e.item;if(d==="uploading"||d==="failed"){const f=d==="failed"?t.createVNode(Ht,{name:"close",class:lo("mask-icon")},null):t.createVNode(Ga,{class:lo("loading")},null),p=Kt(u)&&u!=="";return t.createVNode("div",{class:lo("mask")},[f,p&&t.createVNode("div",{class:lo("mask-message")},[u])])}},a=d=>{const{name:u,item:f,index:p,beforeDelete:m}=e;d.stopPropagation(),gs(m,{args:[f,{name:u,index:p}],done:()=>n("delete")})},l=()=>n("preview"),i=()=>{if(e.deletable&&e.item.status!=="uploading"){const d=o["preview-delete"];return t.createVNode("div",{role:"button",class:lo("preview-delete",{shadow:!d}),tabindex:0,"aria-label":yRe("delete"),onClick:a},[d?d():t.createVNode(Ht,{name:"cross",class:lo("preview-delete-icon")},null)])}},s=()=>{if(o["preview-cover"]){const{index:d,item:u}=e;return t.createVNode("div",{class:lo("preview-cover")},[o["preview-cover"](bt({index:d},u))])}},c=()=>{const{item:d,lazyLoad:u,imageFit:f,previewSize:p}=e;return GV(d)?t.createVNode(Xg,{fit:f,src:d.objectUrl||d.content||d.url,class:lo("preview-image"),width:Array.isArray(p)?p[0]:p,height:Array.isArray(p)?p[1]:p,lazyLoad:u,onClick:l},{default:s}):t.createVNode("div",{class:lo("file"),style:hs(e.previewSize)},[t.createVNode(Ht,{class:lo("file-icon"),name:"description"},null),t.createVNode("div",{class:[lo("file-name"),"van-ellipsis"]},[d.file?d.file.name:d.url]),s()])};return()=>t.createVNode("div",{class:lo("preview")},[c(),r(),i()])}});const _Re={name:ft(""),accept:rt("image/*"),capture:String,multiple:Boolean,disabled:Boolean,readonly:Boolean,lazyLoad:Boolean,maxCount:ft(1/0),imageFit:rt("cover"),resultType:rt("dataUrl"),uploadIcon:rt("photograph"),uploadText:String,deletable:Le,afterRead:Function,showUpload:Le,modelValue:fo(),beforeRead:Function,beforeDelete:Function,previewSize:[Number,String,Array],previewImage:Le,previewOptions:Object,previewFullImage:Le,maxSize:{type:[Number,String,Function],default:1/0}};var NRe=t.defineComponent({name:gRe,props:_Re,emits:["delete","oversize","click-upload","close-preview","click-preview","update:modelValue"],setup(e,{emit:n,slots:o}){const r=t.ref(),a=[],l=(C=e.modelValue.length)=>({name:e.name,index:C}),i=()=>{r.value&&(r.value.value="")},s=C=>{if(i(),qV(C,e.maxSize))if(Array.isArray(C)){const k=bRe(C,e.maxSize);if(C=k.valid,n("oversize",k.invalid,l()),!C.length)return}else{n("oversize",C,l());return}C=t.reactive(C),n("update:modelValue",[...e.modelValue,...Dg(C)]),e.afterRead&&e.afterRead(C,l())},c=C=>{const{maxCount:k,modelValue:E,resultType:T}=e;if(Array.isArray(C)){const S=+k-E.length;C.length>S&&(C=C.slice(0,S)),Promise.all(C.map(D=>KV(D,T))).then(D=>{const v=C.map((I,B)=>{const $={file:I,status:"",message:"",objectUrl:URL.createObjectURL(I)};return D[B]&&($.content=D[B]),$});s(v)})}else KV(C,T).then(S=>{const D={file:C,status:"",message:"",objectUrl:URL.createObjectURL(C)};S&&(D.content=S),s(D)})},d=C=>{const{files:k}=C.target;if(e.disabled||!k||!k.length)return;const E=k.length===1?k[0]:[].slice.call(k);if(e.beforeRead){const T=e.beforeRead(E,l());if(!T){i();return}if(DC(T)){T.then(S=>{c(S||E)}).catch(i);return}}c(E)};let u;const f=()=>n("close-preview"),p=C=>{if(e.previewFullImage){const k=e.modelValue.filter(GV),E=k.map(T=>(T.objectUrl&&!T.url&&T.status!=="failed"&&(T.url=T.objectUrl,a.push(T.url)),T.url)).filter(Boolean);u=eh(bt({images:E,startPosition:k.indexOf(C),onClose:f},e.previewOptions))}},m=()=>{u&&u.close()},g=(C,k)=>{const E=e.modelValue.slice(0);E.splice(k,1),n("update:modelValue",E),n("delete",C,l(k))},y=(C,k)=>{const E=["imageFit","deletable","previewSize","beforeDelete"],T=bt(_n(e,E),_n(C,E,!0));return t.createVNode(CRe,t.mergeProps({item:C,index:k,onClick:()=>n("click-preview",C,l(k)),onDelete:()=>g(C,k),onPreview:()=>p(C)},_n(e,["name","lazyLoad"]),T),_n(o,["preview-cover","preview-delete"]))},b=()=>{if(e.previewImage)return e.modelValue.map(y)},w=C=>n("click-upload",C),N=()=>{if(e.modelValue.length>=e.maxCount||!e.showUpload)return;const C=e.readonly?null:t.createVNode("input",{ref:r,type:"file",class:lo("input"),accept:e.accept,capture:e.capture,multiple:e.multiple,disabled:e.disabled,onChange:d},null);return o.default?t.createVNode("div",{class:lo("input-wrapper"),onClick:w},[o.default(),C]):t.createVNode("div",{class:lo("upload",{readonly:e.readonly}),style:hs(e.previewSize),onClick:w},[t.createVNode(Ht,{name:e.uploadIcon,class:lo("upload-icon")},null),e.uploadText&&t.createVNode("span",{class:lo("upload-text")},[e.uploadText]),C])},_=()=>{r.value&&!e.disabled&&r.value.click()};return t.onBeforeUnmount(()=>{a.forEach(C=>URL.revokeObjectURL(C))}),tn({chooseFile:_,closeImagePreview:m}),fs(()=>e.modelValue),()=>t.createVNode("div",{class:lo()},[t.createVNode("div",{class:lo("wrapper",{disabled:e.disabled})},[b(),N()])])}});const kRe=Xe(NRe),ERe="3.6.12";function xRe(e){[oL,FC,RBe,WC,W9e,sLe,bL,jc,kr,_Le,DLe,nVe,Ja,lVe,KL,hVe,wVe,SVe,OVe,$Ve,jVe,HVe,QVe,ZVe,r$e,b_,f$e,M$e,S$e,ao,V$e,H$e,U$e,rV,Bl,GC,K$e,Z$e,Ht,Xg,eh,fje,pje,bje,Ga,q9,_je,xje,Fr,jje,uL,Hje,Qje,Pg,Y7e,Xa,q7e,tPe,a_,o_,lPe,iPe,fPe,bPe,LV,$V,DPe,OPe,VPe,FPe,KPe,qPe,VL,eRe,u_,rRe,f_,t_,e1,iRe,uRe,h_,Qg,Er,mRe,kRe].forEach(o=>{o.install?e.use(o):o.name&&e.component(o.name,o)})}var TRe={install:xRe,version:ERe},M1={},w1={};Object.defineProperty(w1,"__esModule",{value:!0}),w1.errorHandler=void 0;function SRe(e){if(!e)return;const n={message:"Um problema aconteceu e foi enviado para análise",type:"error",retryable:!0};return!window.navigator.onLine||e.message==="Network Error"?(n.message="Parece que você está offline.",n.type="info",n):typeof e=="string"?(n.message=e,n.retryable=!1,n):e.response&&e.response.status&&e.response.status>=400&&e.response.status<500?(n.message="Algumas informações não foram atualizadas.",n.retryable=!1,n):(e.response&&e.response.status>=500&&(n.message="Ops, encontramos um erro. Tente novamente mais tarde."),n)}w1.errorHandler=SRe,function(e){var n=yn&&yn.__createBinding||(Object.create?function(r,a,l,i){i===void 0&&(i=l),Object.defineProperty(r,i,{enumerable:!0,get:function(){return a[l]}})}:function(r,a,l,i){i===void 0&&(i=l),r[i]=a[l]}),o=yn&&yn.__exportStar||function(r,a){for(var l in r)l!=="default"&&!a.hasOwnProperty(l)&&n(a,r,l)};Object.defineProperty(e,"__esModule",{value:!0}),o(w1,e)}(M1);const Edt="",xdt="",DRe={name:"TopicItem",props:{multipleTargets:{type:Boolean},depth:{type:Number,default:0},propagate:{type:Function},propagateIncludes:{type:Function},parentsTopic:{type:Array,default:()=>[]},isCheckedFunction:{type:Function},populateTopic:{type:Function},hasChildChecked:{type:Function},parentIncludes:{type:Array,default:()=>[]},includesMap:{type:Object},parentChecked:{type:Boolean},topic:{type:Object},disabled:{type:Boolean},checked:{type:Boolean},selectedTopicKind:{type:String}},data:function(){return{showIncludes:!1,fetchingIncludes:!1,initialFetching:!0,fetched:!1,error:!1,includes:[],includesMapData:{},generator:null,buffer:[],hasMore:!1,limit:30}},created(){this.generator=this.combinedGenerator(),this.includesMapData=this.includesMap},watch:{async showIncludes(e){e===!0&&this.fetched===!1&&(this.fetched=!0,await this.fetch(),this.initialFetching=!1)}},computed:{includesNoData(){return{group:"Esta turma ainda não tem alunos",tag:"Esta tag ainda não tem turmas"}[this.topic.kind]},isSelectedEntityKind(){return this.topic.kind===this.selectedTopicKind},chanShowCheckbox(){return this.multipleTargets||this.isSelectedEntityKind&&!this.multipleTargets}},methods:{async*fetchToGenerator(e,n=null){const o={id:this.topic.id,kind:e,limit:this.limit+1,page:0};n&&(o.groupContext=n);let{hits:r,total:a}=await this.populateTopic(o);for(;a>0;){if(r.length>0){yield r.shift(),a--;continue}o.page+=1,r=(await this.populateTopic(o)).hits}},async*combinedGenerator(){this.topic.kind==="group"?(yield*this.fetchToGenerator("group","member"),yield*this.fetchToGenerator("group","user")):this.topic.kind==="member"?yield*this.fetchToGenerator("member","user"):yield*this.fetchToGenerator("tag")},async fetchPage(){const e=this.limit;for(;this.buffer.length<e+1;){let n=await this.generator.next();if(n.value){this.buffer.push(n.value);continue}break}return{results:this.buffer.splice(0,e),hasMore:this.buffer.length>0}},async fetch(){const e=Lc(this.includes);this.fetchingIncludes=!0;try{const{results:n,hasMore:o}=await this.fetchPage();this.includes=[...e,...n],this.includesMapData={...this.includesMapData,[this.topic.id]:this.includes},this.$emit("includes",{topic:this.topic,includes:this.includes}),this.hasMore=o}catch(n){this.error=n,this.$notify({...M1.errorHandler("Erro ao carregar mais."),duration:1e4,position:"bottom",showClose:!0})}finally{this.fetchingIncludes=!1}},color(e){return this.disabled?"gray-50":{member:"purple",group:"aqua",user:"link",tag:"warning"}[e]||"lead"},icon(e){return{member:"uil-graduation-cap",group:"uil-users-alt",user:"uil-user",tag:"uil-tag-alt"}[e]},isChildChecked(e){return this.isCheckedFunction(e)||this.isCheckedFunction(this.topic)},expandableKind(){return["group","tag","member"].includes(this.topic.kind)},toggleShowIncludes(){this.expandableKind&&(this.showIncludes=!this.showIncludes)},updateSelectedTopics(e,n){this.$emit("input",{topic:e,value:n})},topicIncludedChanged(e,n){this.parentsTopic.some(this.isCheckedFunction)&&!n&&this.parentsTopic.filter(this.isCheckedFunction).forEach(r=>{var a;this.updateSelectedTopics(r,!1),(a=this.includesMap[r.id])==null||a.forEach(l=>{this.hasChildChecked(l)||this.updateSelectedTopics(l,!0)})}),this.updateSelectedTopics(e,n)}}},vRe={class:"topic-item-group"},IRe={key:0,class:"topic-chevron mr-2"},ARe={class:"topic-icon"},ORe={key:0},zRe={class:"l-d-flex l-align-items-center my-2",style:{"justify-content":"center",width:"100%",height:"40px"}},BRe={key:1},LRe={class:"no-data-includes l-text-regular gray-60--text"},VRe={key:1},$Re={key:0,class:"mx-3 my-3"};function jRe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-checkbox"),c=t.resolveComponent("LCircularLoader"),d=t.resolveComponent("TopicItem",!0),u=t.resolveComponent("l-button"),f=t.resolveComponent("l-transition-expand");return t.openBlock(),t.createElementBlock("div",vRe,[t.createElementVNode("div",{class:t.normalizeClass("topic-item-group-header depth-"+o.depth+" l-d-flex l-align-items-center pl-3"+(l.isSelectedEntityKind&&o.depth>0?" user-topic-item-group-header":""))},[t.createElementVNode("div",{class:"l-flex l-d-flex l-align-items-center",onClick:n[0]||(n[0]=t.withModifiers(p=>l.isSelectedEntityKind?null:l.toggleShowIncludes(),["stop"]))},[l.isSelectedEntityKind?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",IRe,[t.createVNode(i,{class:"gray-60--text",size:"24"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.showIncludes?"uil-angle-down":"uil-angle-right"),1)]),_:1})])),t.createElementVNode("div",ARe,[t.createElementVNode("div",{class:t.normalizeClass(["bg-icon",l.color(o.topic.kind)])},null,2),t.createVNode(i,{class:t.normalizeClass(l.color(o.topic.kind)+"--text")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon(o.topic.kind)),1)]),_:1},8,["class"])]),t.createElementVNode("div",{class:t.normalizeClass(["l-flex ml-2 mr-3 l-text-regular ellipsis-2",o.disabled?"gray-70--text":"lead-light--text"])},t.toDisplayString(o.topic.name),3)]),(t.openBlock(),t.createBlock(s,{disabled:o.disabled,checked:o.isCheckedFunction(o.topic),indeterminate:o.hasChildChecked(o.topic)&&!o.isCheckedFunction(o.topic),key:o.isCheckedFunction(o.topic),onChange:n[1]||(n[1]=p=>o.parentsTopic.length?l.topicIncludedChanged(o.topic,p):l.updateSelectedTopics(o.topic,p)),class:t.normalizeClass(["p-3",{"circular-checkbox":!o.multipleTargets}]),style:t.normalizeStyle({display:l.chanShowCheckbox?"block":"none"})},null,8,["disabled","checked","indeterminate","class","style"]))],2),n[8]||(n[8]=t.createElementVNode("hr",null,null,-1)),t.createVNode(f,null,{default:t.withCtx(()=>[e.showIncludes?(t.openBlock(),t.createElementBlock("div",ORe,[e.initialFetching?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",zRe,[t.createVNode(c,{width:40,height:40})]),n[5]||(n[5]=t.createElementVNode("hr",null,null,-1))],64)):(t.openBlock(),t.createElementBlock("div",BRe,[!e.includes.length&&!e.hasMore||e.error?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",LRe,t.toDisplayString(l.includesNoData),1),n[6]||(n[6]=t.createElementVNode("hr",null,null,-1))],64)):(t.openBlock(),t.createElementBlock("div",VRe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.includes,p=>(t.openBlock(),t.createBlock(d,{key:p.id,onInput:n[2]||(n[2]=m=>o.propagate(m)),onIncludes:n[3]||(n[3]=m=>o.propagateIncludes(m)),propagateIncludes:o.propagateIncludes,hasChildChecked:o.hasChildChecked,isCheckedFunction:l.isChildChecked,checked:l.isChildChecked(p),depth:o.depth+1,topic:p,selectedTopicKind:o.selectedTopicKind,parentsTopic:[...o.parentsTopic,o.topic],parentIncludes:e.includes,includesMap:e.includesMapData,parentChecked:o.checked,populateTopic:o.populateTopic,propagate:o.propagate,disabled:o.disabled,multipleTargets:o.multipleTargets},null,8,["propagateIncludes","hasChildChecked","isCheckedFunction","checked","depth","topic","selectedTopicKind","parentsTopic","parentIncludes","includesMap","parentChecked","populateTopic","propagate","disabled","multipleTargets"]))),128)),e.hasMore?(t.openBlock(),t.createElementBlock("div",$Re,[t.createVNode(u,{loading:e.fetchingIncludes,onClick:n[4]||(n[4]=p=>l.fetch()),plain:"",fill:""},{default:t.withCtx(()=>n[7]||(n[7]=[t.createTextVNode(" Carregar mais ")])),_:1},8,["loading"])])):t.createCommentVNode("",!0)]))]))])):t.createCommentVNode("",!0)]),_:1})])}const PRe=lt(DRe,[["render",jRe],["__scopeId","data-v-871ec2bc"]]),Tdt="",RRe={props:{term:{type:String}}},FRe={class:"l-d-flex l-align-items-center lead--text recent-topic"},HRe={class:"l-flex l-text-regular mx-2"};function URe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-button");return t.openBlock(),t.createElementBlock("div",FRe,[t.createVNode(i,{size:"16"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-history")])),_:1}),t.createElementVNode("div",HRe,t.toDisplayString(o.term),1),t.createVNode(s,{onClick:n[0]||(n[0]=t.withModifiers(c=>e.$emit("remove"),["stop"])),circle:"",icon:"uil-multiply",class:"border-none lead--text f-18 p-1"})])}const YRe=lt(RRe,[["render",URe],["__scopeId","data-v-a8c57ab5"]]),Sdt="",WRe={props:{query:{type:Object},typing:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasAnySelectedTopic:{type:Boolean,default:!1},kinds:{type:Array}},data:e=>{const n=wo.cloneDeep(e.query);return{localQuery:n,queryKind:n.kind}},computed:{filteredKinds(){return this.kinds.filter(e=>this.localQuery.q||!(e.value==="member"||e.value==="user"))}},watch:{queryKind:{handler(e){this.localQuery.kind=e},immediate:!0,deep:!0}},methods:{clearInput(){this.localQuery.q=null,this.updateQuery({target:{value:null}})},isSelected(e){return er(this.localQuery,"kind",null)===e},updateQuery(e){const n=er(e,"target.value",null);this.$emit("input",{q:n,kind:"*",page:0})},setInputClass(e){return"search-input-wrapper ml-2 l-flex"+" "+e},back(){this.$emit("close")},save(){this.$emit("save")}}},QRe={class:"app-navigation"},KRe={class:"search-topics-header l-d-flex l-align-items-center pl-2 pr-3"},qRe={key:0,class:"filter-kind l-d-flex px-3 pb-2"};function GRe(e,n,o,r,a,l){const i=t.resolveComponent("l-button"),s=t.resolveComponent("l-icon"),c=t.resolveComponent("l-radio-button"),d=t.resolveComponent("l-radio-group"),u=t.resolveComponent("l-linear-progress");return t.openBlock(),t.createElementBlock("div",QRe,[t.createElementVNode("div",KRe,[t.createVNode(i,{onClick:l.back,circle:"",icon:"uil-arrow-left",class:"border-none gray-70--text f-24 p-1"},null,8,["onClick"]),t.createElementVNode("div",{class:t.normalizeClass(l.setInputClass("blurred"))},[t.withDirectives(t.createElementVNode("input",{style:{width:"100%"},autocomplete:"off",placeholder:"Pesquisar","onUpdate:modelValue":n[0]||(n[0]=f=>e.localQuery.q=f),onFocus:n[1]||(n[1]=f=>l.setInputClass("focused")),onBlur:n[2]||(n[2]=f=>l.setInputClass("blurred")),onKeypress:n[3]||(n[3]=t.withKeys(f=>f.target.blur(),["enter"])),onInput:n[4]||(n[4]=(...f)=>l.updateQuery&&l.updateQuery(...f))},null,544),[[t.vModelText,e.localQuery.q]]),e.localQuery.q?(t.openBlock(),t.createBlock(s,{key:0,class:"lead-light--text cursor-pointer",onClick:l.clearInput,size:"16"},{default:t.withCtx(()=>n[6]||(n[6]=[t.createTextVNode(" uil-times ")])),_:1},8,["onClick"])):t.createCommentVNode("",!0)],2),t.createVNode(i,{disabled:!o.hasAnySelectedTopic,onClick:l.save,loading:o.loading||o.typing,type:"primary",class:"save-button bold l-d-flex l-align-items-center f-14 ml-2"},{default:t.withCtx(()=>n[7]||(n[7]=[t.createTextVNode(" Salvar ")])),_:1},8,["disabled","onClick","loading"])]),e.localQuery.q||o.query.kind!=="*"?(t.openBlock(),t.createElementBlock("div",qRe,[t.createVNode(d,{modelValue:e.queryKind,"onUpdate:modelValue":n[5]||(n[5]=f=>e.queryKind=f),class:"l-flex-nowrap",size:"small",separated:"",color:"lead-light"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.filteredKinds,f=>(t.openBlock(),t.createBlock(c,{key:f.value,label:f.value},{default:t.withCtx(()=>[f.icon?(t.openBlock(),t.createBlock(s,{key:0,color:l.isSelected(f.value)?"white":"lead-light",size:"13"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(f.icon),1)]),_:2},1032,["color"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(f.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),o.loading||o.typing?(t.openBlock(),t.createBlock(u,{key:1})):t.createCommentVNode("",!0)])}const XRe=lt(WRe,[["render",GRe],["__scopeId","data-v-06b36f9f"]]),XV=Symbol.for("GlobalStack"),ZV=class{static createStackInstance(n){if(console.warn(`[VueModals] No ModalStack was found for name "${n}". Using Modals without a stack instance causes one to be created as default at the end of the document body.`),this.globalStackInstances.get(n))return console.warn(`[VueModals] A ModalStack instance with the name "${n}" already exists. Returning stack.`),this.globalStackInstances.get(n);const o=document.createElement("aside");document.body.insertAdjacentElement("beforeend",o);const r=t.createApp(B_,{name:n});return r.mount(o),this.globalStackInstances.set(n,r),r}static stack(n="default"){if(n==="default"&&!this.globalStackInstances.has("default"))return this.createStackInstance("default");if(this.globalStackInstances.has(n))return this.globalStackInstances.get(n);throw new Error(`[VueModals] No stack instance found for name "${n??"default"}". Create a ModalStack instance with this name to use it.`)}static open(n){return this.stack(n.stack).push(n)}static registerStack(n,o){console.warn("register",n,o),this.globalStackInstances.has(n)?console.warn(`[VueModals] Multiple instances of ModalStack must have unique names. Duplicate name found for ModalStack "${n}".`):this.globalStackInstances.set(n,o)}static unregisterStack(n,o){console.warn("unregister",n,o),this.globalStackInstances.get(n)===o?this.globalStackInstances.delete(n):console.warn(`[VueModals] Could not unregister ModalStack because a duplicate name was found "${n}".`)}};ZV.globalStackInstances=window[XV]||(window[XV]=new Map);let Hu=ZV;const ZRe=t.defineComponent({props:{stack:{type:Array},index:{type:Number},modal:{type:Object},position:{type:String,default:"right"}},computed:{ensuredPosition(){return this.position==="left"?"left":"right"},depth(){const e=this.stack.filter(o=>{const r=o.options.position??"right";return o.options.layout==="drawer"&&r===this.ensuredPosition}),n=e.findIndex(o=>o===this.modal);return e.length-n-1}}}),z_=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},JRe=["position"];function eFe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("section",{layout:"drawer",position:e.ensuredPosition,style:t.normalizeStyle({"--depth":e.depth})},[t.renderSlot(e.$slots,"default")],12,JRe)}const tFe=z_(ZRe,[["render",eFe]]),nFe=t.defineComponent({computed:{classes(){return{center:!0}}},props:{stack:{type:Array},index:{type:Number},modal:{type:Object},showClose:{type:Object}}}),oFe={key:0,class:"header"},rFe={class:"content"};function aFe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("section",{layout:"dialog",class:t.normalizeClass(e.classes)},[e.showClose?(t.openBlock(),t.createElementBlock("div",oFe,[t.createElementVNode("button",{class:"close-button",onClick:n[0]||(n[0]=i=>e.$emit("close"))},"×")])):t.createCommentVNode("",!0),t.createElementVNode("div",rFe,[t.renderSlot(e.$slots,"default")]),n[1]||(n[1]=t.createElementVNode("div",{class:"footer"},null,-1))],2)}const lFe=z_(nFe,[["render",aFe]]);var iFe=1;const JV=Symbol("Reject"),e$=Symbol("Resolve"),ch=Symbol("Fulfilled"),sFe={drawer:tFe,dialog:lFe},cFe=t.defineComponent({name:"vue-modals-stack",data(){return{stack:[]}},created(){Hu.registerStack(this.name,this)},beforeUnmount(){Hu.unregisterStack(this.name,this)},methods:{getLayoutComponentFromModalLayout(e){return typeof e=="string"?sFe[e]??e:e},removeFromStack(e){const n=this.stack.findIndex(o=>o===e);n<0||this.stack.splice(n,1)},addToStack(e){this.stack.push(e)},push(e){const n=this.buildModal(e);return this.addToStack(n),n},close(e,n){return this.canClose(e)?(this.destroy(e,n),!0):!1},layoutForModal(e){const n=e.layout??e.options.layout??this.layout??"section",o=C1.app;if(typeof n=="string"){const r=o.component(n);if(r)return r}return n},canClose(e){var n;const o=new Event("beforeClose",{cancelable:!0});if(e.options.beforeClose&&(e.options.beforeClose(o),o.defaultPrevented))return!1;const r=(n=this.$refs[e.id])==null?void 0:n[0];return!(r&&typeof r.beforeClose=="function"&&(r.beforeClose(o),o.defaultPrevented)||!this.stack.filter(a=>a.options.parent===r).every(a=>this.canClose(a)))},destroy(e,n){e[ch]||(e[ch]=!0,e[JV](n??new Error("Modal closed"))),this.removeFromStack(e)},answer(e,n){e[ch]||(e[ch]=!0,e[e$](n)),this.removeFromStack(e)},pop(){if(this.stack.length){const e=this.stack[this.stack.length-1];if(this.close(e))return e}return null},popUntil(e){if(!(this.stack.findIndex(n=>e===n)<0))for(;this.stack.length>0;){const n=this.pop();if(n===e||n===null)return}},clear(){for(;this.stack.length;)this.destroy(this.stack[this.stack.length-1])},buildModal(e){var n;let o,r;const a=new Promise((l,i)=>{o=l,r=s=>"default"in e?l(e.default):i(s)});return!e.layout&&(n=e.component)!=null&&n.layout&&(e.layout=e.component.layout),e.parent&&t.onBeforeUnmount(()=>{this.destroy(a,new Error("Component was destroyed"))}),a.id=iFe++,a.stack=this,a.options=e,a.layout=this.layoutForModal(a),a.position=e.position,a[JV]=r,a[e$]=o,a[ch]=!1,a.close=l=>this.close(a,l),a.destroy=l=>this.destroy(a,l),a},onNameChanged(e,n){n&&Hu.unregisterStack(n,this),e&&Hu.registerStack(e,this)}},props:{name:{type:String,default:"default"},layout:{type:String,default:"drawer"}},watch:{name:[{handler:"onNameChanged"}]}}),dFe=["onClick"];function uFe(e,n,o,r,a,l){return t.openBlock(),t.createBlock(t.TransitionGroup,{tag:"div",stack:e.name,name:"modal"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.stack,(i,s)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:i.id},[i.options.hideOverlay?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(`z-index: ${1e3+s}`),class:t.normalizeClass(["vue-modals-overlay",{below:s<e.stack.length-1,far:s<e.stack.length-4}]),onClick:c=>i.options.clickToClose!==!1&&e.close(i)},null,14,dFe)),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.getLayoutComponentFromModalLayout(i.layout)),{"modal-id":i.id,modal:i,showClose:i.options.showClose,class:"vue-modals-layout",style:t.normalizeStyle(`z-index: ${1001+s}`),stack:e.stack,index:s,position:i.position,onClose:c=>e.close(i,c),onDestroy:c=>e.destroy(i,c),onAnswer:c=>e.answer(i,c)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.options.component),t.mergeProps({ref_for:!0,ref:i.id},i.options.props,{onClose:c=>e.close(i,c),onDestroy:c=>e.destroy(i,c),onAnswer:c=>e.answer(i,c)}),null,16,["onClose","onDestroy","onAnswer"]))]),_:2},1064,["modal-id","modal","showClose","style","stack","index","position","onClose","onDestroy","onAnswer"]))],64))),128))]),_:1},8,["stack"])}const B_=z_(cFe,[["render",uFe]]),C1={app:void 0,install(e){e.component("vue-modals-stack",B_),e.config.globalProperties.$modals=Hu,C1.app=e},Modals:Hu,ModalStack:B_};async function fFe(e){const n=window.LayersPortal?window.LayersPortal.platform:"shell";if(n==="shell"||n==="iframe"){const r=C1.Modals.stack().push({layout:"dialog",showClose:!1,component:Zw,props:{title:e.title,content:e.content,buttonCloseLabel:e.buttonCloseLabel,buttonConfirmLabel:e.buttonConfirmLabel}});try{return await r}catch{return!1}}return window.confirm(e.content||e.title)}async function pFe(){const e=C1.Modals.stack();window.history.go(1);const n=e.push({layout:"dialog",showClose:!1,component:Zw,props:{buttonCloseLabel:"Permanecer aqui",buttonConfirmLabel:"Descartar alterações",title:"Alterações não salvas",content:"Você quer mesmo sair? Existem alterações que não foram salvas. Se você sair, suas alterações serão perdidas."}});try{const o=await n;if(o)return o}catch{}}const hFe="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIwIiBoZWlnaHQ9IjE4MyIgdmlld0JveD0iMCAwIDIyMCAxODMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNODMuMjk5NCAxNjQuMjk4TDgzLjI5OSAxNjQuMjk4Qzc5LjA5NiAxNjYuMjIgNzUuMTk0NiAxNjguMDA1IDcxLjMxNDcgMTY5LjIxQzUxLjk2MDMgMTc1LjIyMyAzMS4wNjI2IDE3NS45MjIgMTAuMjk0OCAxNDguMjIxQy0xMC40NzI5IDEyMC41MTkgLTAuMzE2MjIyIDg0Ljk0NTQgNDUuMjkwOSA3MC4xOTEyQzU3LjIwOTMgNjYuMzM5IDYyLjgwOTQgNTcuNzI3NSA2OS41NjAzIDQ3LjM0NjFDNzYuNjg1MSAzNi4zODk5IDg1LjA5MTcgMjMuNDYyNSAxMDMuNTYgMTIuMDc4MkMxNTIuNTU1IC0xOC4xMTMzIDE5Ny4wODggMTAuNzYzNSAyMTUuODU4IDcxLjI3MTRDMjM0LjYyNyAxMzEuNzc5IDE4Ni43IDE1OS4xNDQgMTMwLjY3MiAxNTQuNDk4QzEwOC43MSAxNTIuNjc1IDk0Ljg2MzQgMTU5LjAwOSA4My4yO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TMgMTQxLjI5OCA0Ny4zOTVaIiBmaWxsPSIjMjYzMjM4Ii8+Cjwvc3ZnPgo=",Ddt="",mFe={tagName:"l-search-topics",name:"LSearchTopics",components:{TopicItemGroup:PRe,RecentTermSearched:YRe,SearchTopicsHeader:XRe,[WC.name]:WC},props:{multipleTargets:{type:Boolean,default:!0},canSendForAll:{type:Boolean,default:!1},searchTopics:{type:Function},populateTopic:{type:Function},alreadySelectedTopics:{type:Array},recentTopicsSearched:{type:Object},selectedTopicKind:{type:String,default:"user"}},data:function(){return{forAllTagChecked:!1,showSelected:!1,selectedTopics:[],includesMap:{},querySearchTopics:{q:null,kind:"*",page:0},searchedTopics:{tag:{hits:[],total:0},group:{hits:[],total:0},member:{hits:[],total:0},user:{hits:[],total:0}},total:0,kinds:["*","tag","group","member","user"],kindsIcons:{tag:"uil-tag-alt",group:"uil-users-alt",member:"uil-graduation-cap",user:"uil-user","*":""},typing:!1,loading:!1,loadingMore:!1}},watch:{selectedTopics(e){(!e||e.length===0)&&(this.showSelected=!1)},querySearchTopics(){!this.typing&&!this.loadingMore&&(this.typing=!0),this.searchDebounced()}},computed:{canShowSendForAll(){return this.canSendForAll&&!this.hasQuery&&this.multipleTargets},searchingSpan(){var e;return this.querySearchTopics.q?this.querySearchTopics.q:this.querySearchTopics.kind==="*"?"":(e=this.getKindNamePlural(this.querySearchTopics.kind))==null?void 0:e.toLowerCase()},hasQuery(){return this.querySearchTopics.q||this.querySearchTopics.kind!=="*"},showRecentSearchedTopics(){return this.recentTopicsSearched.data?this.recentTopicsSearched.data.length>0&&!this.hasQuery:!1},filteredSearchedTopics(){return{...this.searchedTopics,tag:{hits:this.searchedTopics.tag.hits.filter(e=>e.id!=="*"),total:this.searchedTopics.tag.total}}},forAllTag:{get(){return this.forAllTagChecked},set(e){const n=this.searchedTopics.tag.hits;if(this.selectedTopics&&this.selectedTopics.length&&this.selectedTopics.find(o=>o.id!=="*")&&e!=="confirm"){this.showForAllTagAlert().then(o=>{if(!o){this.forAllTagChecked=!1;return}const r=n.find(a=>a.id==="*");this.setSelectedTopics([r]),this.forAllTagChecked=!0});return}if(e=!!e,e&&this.searchedTopics&&n){const o=n.find(r=>r.id==="*");this.setSelectedTopics([o])}else this.setSelectedTopics([]);this.forAllTagChecked=e}},recentTopicsFiltered(){return Lc(this.recentTopicsSearched.data).reverse().slice(0,3)},topicsSummary(){if(!this.selectedTopics||!this.selectedTopics.length)return"";if(this.forAllTagChecked)return"Enviando para todos";const e=[];return this.kinds.filter(n=>n!=="*").forEach(n=>{var r,a;const o=JB(this.selectedTopics,{kind:n}).length;o===1?e.push(`1 ${(r=this.getKindName(n))==null?void 0:r.toLowerCase()}`):o>1&&e.push(`${o} ${(a=this.getKindNamePlural(n))==null?void 0:a.toLowerCase()}`)}),e.length?e.join(", "):null},hasAnySearchedTopic(){return this.total?this.total>0:null},headerKinds(){return this.kinds.filter(e=>e!=="tag"||this.canSendForAll).map(e=>({value:e,name:this.getKindNamePlural(e),icon:this.kindsIcons[e]}))},resultKinds(){return this.kinds.filter(n=>n!=="*").filter(n=>this.filteredSearchedTopics[n].total&&this.filteredSearchedTopics[n].hits.length)},totalLabel(){return this.total===1?"1 resultado encontrado":this.total+" resultados encontrados"},isAllEntities(){return this.querySearchTopics.kind==="*"}},async created(){this.loading=!0;try{const e=await this.searchTopics(this.querySearchTopics);this.searchedTopics=e.result,this.total=e.total}catch{this.$notify({...M1.errorHandler("Erro ao carregar o público alvo."),duration:1e4,position:"bottom",showClose:!0})}finally{this.loading=!1}this.selectedTopics=this.alreadySelectedTopics,this.selectedTopics&&this.selectedTopics.length&&this.selectedTopics.find(e=>e.id==="*"&&e.kind==="tag")&&this.multipleTargets&&(this.forAllTag=!0)},unmounted(){this.setSelectedTopics([])},methods:{searchDebounced:vOe(async function(){er(this.querySearchTopics,"q.length",null)>3&&this.recentTopicsSearched.push(this.querySearchTopics.q),await this.getSearchedTopics(this.querySearchTopics),this.typing=!1},500,{leading:!1,trailing:!0}),useRecentTermSearched(e){this.setQuerySearchTopics({q:e,kind:"*"})},updateIncludesMap({topic:e,includes:n}){this.includesMap[e.id]=n},hasChildChecked(e){const n=this.includesMap[e.id];return n?n.some(this.isChecked)||n.some(this.hasChildChecked):!1},getKindName(e,n="pt-br"){return{"pt-br":{"*":"Procurar em tudo",tag:"Marcador",group:"Turma",member:"Aluno",user:"Usuário"},"en-us":{"*":"Search all",tag:"Tag",group:"Group",member:"Member",user:"User"}}[n][e]},getKindNamePlural(e,n="pt-br"){return{"pt-br":{"*":"Procurar em tudo",tag:"Marcadores",group:"Turmas",member:"Alunos",user:"Usuários"},"en-us":{"*":"Search all",tag:"Tags",group:"Groups",member:"Members",user:"Users"}}[n][e]},async getSearchedTopics(e){this.loadingMore||(this.loading=!0);try{const n=await this.searchTopics(e);if(e.page>0){const o=Lc(this.searchedTopics);await Promise.all(o8e(n.result).map(r=>{o[r]||(o[r]={hits:[],total:null}),o[r].hits=[...o[r].hits,...n.result[r].hits]})),this.searchedTopics=o}else this.searchedTopics=n.result,this.total=n.total}catch{this.$notify({...M1.errorHandler("Erro ao buscar o público desejado."),duration:1e4,position:"bottom",showClose:!0})}finally{this.loading=!1,this.loadingMore=!1}},loadMore(){this.loadingMore=!0;const e=er(this.querySearchTopics,"page",0)+1,n=er(this.querySearchTopics,"q",null),o=er(this.querySearchTopics,"kind",null);this.setQuerySearchTopics({q:n,kind:o,page:e})},getTopicHits(e){return er(this.filteredSearchedTopics,`${e}.hits`,[])},getTopicTotal(e){return er(this.filteredSearchedTopics,`${e}.total`,[])},needShowMore(e){return this.getTopicTotal(e)>this.getTopicHits(e).length},isChecked(e){return this.forAllTagChecked?!0:this.selectedTopics.filter(n=>n.kind===e.kind&&n.id===e.id).length!==0},filterForKind(e){this.setQuerySearchTopics({q:this.querySearchTopics.q,kind:e,page:0})},setSelectedTopics(e){this.selectedTopics=e},removeFromRecentTopicsSearched(e){this.recentTopicsSearched.remove(e)},setQuerySearchTopics(e){this.querySearchTopics=e},async showForAllTagAlert(){const e=await fFe({title:"Você já selecionou alguns destinatários e eles serão substituídos pela tag todos.",buttonCloseLabel:"Cancelar",buttonConfirmLabel:"Continuar"});if(e)return e},addTopic(e){if(this.selectedTopics.filter(o=>o.id===e.id&&o.kind===e.kind).length===0){const o=Lc(this.selectedTopics);o.push(e),this.setSelectedTopics(o)}},removeTopic(e){const n=this.selectedTopics.findIndex(r=>r.id===e.id&&r.kind===e.kind);if(n==-1)return;const o=Lc(this.selectedTopics);o.splice(n,1),this.setSelectedTopics(o)},updateSelectedTopics({topic:e,value:n}){if(!this.multipleTargets)return n?this.setSelectedTopics([e]):this.setSelectedTopics([]);if(!n){this.removeTopic(e);return}this.addTopic(e)},onSave(){const e=this.selectedTopics.map(n=>({hash:n.hash,name:n.name,kind:n.kind,id:n.id}));this.$emit("answer",e)},async onClose(){const e=Lc(this.alreadySelectedTopics).map(a=>a.kind+a.id),n=Lc(this.selectedTopics).map(a=>a.kind+a.id);if($ze(n,e).length===0){this.$emit("close");return}await pFe()&&this.$emit("close")},onInput(e){this.querySearchTopics=e}}},gFe={class:"search-topics-page l-col l-d-flex column"},yFe={class:"px-0 py-2 l-container scroll-y l-flex-grow-1"},bFe={key:0,class:"gray-70--text searching-label mx-3"},MFe={key:1,class:"mb-5"},wFe={key:0,class:"recent-search mb-3 mx-3"},CFe={key:1,class:"topic-item-tag-for-all mx-3"},_Fe={key:2,class:"results-total mb-2 px-3"},NFe={key:0,class:"topic-kind-title gray-70--text mb-2 px-3"},kFe={key:1,class:"m-3"},EFe={key:2,class:"m-3"},xFe={key:2,style:{display:"flex","flex-direction":"column",height:"100%","align-items":"stretch"}},TFe={key:0,class:"topic-item-tag-for-all empty-tags-groups-for-all mx-3"},SFe={key:1,class:"empty-tags-groups-placeholder"},DFe={key:2,class:"not-found-result mx-3"},vFe={key:0,class:"selected-topics"},IFe={class:"ml-2 topics-selected-summary l-flex link--text"},AFe={class:"l-d-flex m-3 l-align-items-center"},OFe={class:"mx-3 mb-3"};function zFe(e,n,o,r,a,l){const i=t.resolveComponent("SearchTopicsHeader"),s=t.resolveComponent("RecentTermSearched"),c=t.resolveComponent("l-checkbox"),d=t.resolveComponent("TopicItemGroup"),u=t.resolveComponent("l-button"),f=t.resolveComponent("l-target-chip"),p=t.resolveComponent("van-action-sheet");return t.openBlock(),t.createElementBlock("div",gFe,[t.createVNode(i,{class:"drawer-search-topics-header",kinds:l.headerKinds,query:e.querySearchTopics,typing:e.typing,loading:e.loading,hasAnySelectedTopic:e.selectedTopics.length>0,onSave:l.onSave,onClose:l.onClose,onInput:l.onInput},null,8,["kinds","query","typing","loading","hasAnySelectedTopic","onSave","onClose","onInput"]),t.createElementVNode("div",yFe,[e.loading||e.typing?(t.openBlock(),t.createElementBlock("div",bFe," Procurando "+t.toDisplayString(l.searchingSpan)+"... ",1)):l.hasAnySearchedTopic?(t.openBlock(),t.createElementBlock("div",MFe,[l.showRecentSearchedTopics?(t.openBlock(),t.createElementBlock("div",wFe,[n[7]||(n[7]=t.createElementVNode("div",{class:"recent-search-title gray-70--text mb-2 l-text-regular"}," Buscas recentes ",-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.recentTopicsFiltered,(m,g)=>(t.openBlock(),t.createBlock(s,{onClick:y=>l.useRecentTermSearched(m),term:m,key:g,class:"mb-2 cursor-pointer",onRemove:y=>l.removeFromRecentTopicsSearched(m)},null,8,["onClick","term","onRemove"]))),128))])):t.createCommentVNode("",!0),l.canShowSendForAll?(t.openBlock(),t.createElementBlock("div",CFe,[n[8]||(n[8]=t.createElementVNode("div",{class:"l-flex lead-light--text l-text-regular"}," Enviar para todos ",-1)),t.createVNode(c,{modelValue:l.forAllTag,"onUpdate:modelValue":n[0]||(n[0]=m=>l.forAllTag=m)},null,8,["modelValue"])])):t.createCommentVNode("",!0),e.total>=1&&l.hasQuery?(t.openBlock(),t.createElementBlock("div",_Fe,t.toDisplayString(l.totalLabel),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.resultKinds,m=>(t.openBlock(),t.createElementBlock("div",{class:"topics-searched mb-3",key:m},[l.isAllEntities?(t.openBlock(),t.createElementBlock("h6",NFe,t.toDisplayString(l.getKindNamePlural(m))+" ("+t.toDisplayString(l.getTopicTotal(m))+") ",1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.getTopicHits(m),g=>(t.openBlock(),t.createBlock(d,{onInput:n[1]||(n[1]=y=>l.updateSelectedTopics(y)),onIncludes:l.updateIncludesMap,propagateIncludes:l.updateIncludesMap,propagate:l.updateSelectedTopics,hasChildChecked:l.hasChildChecked,topic:g,selectedTopicKind:o.selectedTopicKind,parentTopic:g,populateTopic:o.populateTopic,disabled:e.forAllTagChecked,checked:l.isChecked(g),isCheckedFunction:l.isChecked,multipleTargets:o.multipleTargets,key:g.id},null,8,["onIncludes","propagateIncludes","propagate","hasChildChecked","topic","selectedTopicKind","parentTopic","populateTopic","disabled","checked","isCheckedFunction","multipleTargets"]))),128)),l.isAllEntities&&l.needShowMore(m)?(t.openBlock(),t.createElementBlock("div",kFe,[t.createVNode(u,{loading:e.loading,onClick:g=>l.filterForKind(m),plain:"",fill:""},{default:t.withCtx(()=>{var g;return[t.createTextVNode(" Mostrar mais "+t.toDisplayString((g=l.getKindNamePlural(m))==null?void 0:g.toLowerCase()),1)]}),_:2},1032,["loading","onClick"])])):t.createCommentVNode("",!0),!l.isAllEntities&&l.needShowMore(m)?(t.openBlock(),t.createElementBlock("div",EFe,[t.createVNode(u,{class:"ma-3",loading:e.loadingMore,onClick:n[2]||(n[2]=g=>l.loadMore()),plain:"",fill:""},{default:t.withCtx(()=>n[9]||(n[9]=[t.createTextVNode(" Carregar mais ")])),_:1},8,["loading"])])):t.createCommentVNode("",!0)]))),128))])):(t.openBlock(),t.createElementBlock("div",xFe,[o.canSendForAll&&!this.hasQuery?(t.openBlock(),t.createElementBlock("div",TFe,[n[10]||(n[10]=t.createElementVNode("div",{class:"l-flex lead-light--text l-text-regular"}," Enviar para todos ",-1)),t.createVNode(c,{modelValue:l.forAllTag,"onUpdate:modelValue":n[3]||(n[3]=m=>l.forAllTag=m)},null,8,["modelValue"])])):t.createCommentVNode("",!0),e.querySearchTopics.q?!e.typing&&!e.loading?(t.openBlock(),t.createElementBlock("div",DFe,n[12]||(n[12]=[t.createElementVNode("h4",{class:"bold lead--text m-0"},"Não encontramos resultados",-1),t.createElementVNode("p",{class:"lead-light--text l-text-regular mt-3 mb-0"}," Tenha certeza que você está digitando uma palavra-chave correta ",-1)]))):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",SFe,n[11]||(n[11]=[t.createElementVNode("img",{alt:"Search Topics",src:hFe},null,-1),t.createElementVNode("div",{class:"empty-tags-groups-placeholder-text mt-2"},[t.createElementVNode("h3",null,"Busque por marcadores, turmas, alunos e usuários"),t.createElementVNode("span",{class:"text-small lead-light--text"}," Quando você tiver marcadores e turmas, eles aparecerão aqui. ")],-1)])))]))]),e.selectedTopics&&e.selectedTopics.length?(t.openBlock(),t.createElementBlock("div",vFe,[t.createElementVNode("button",{class:"selected-topics-button l-d-flex l-align-items-center",style:{padding:"0"},onClick:n[4]||(n[4]=m=>e.forAllTagChecked?l.forAllTag=!1:e.showSelected=!0)},[n[13]||(n[13]=t.createElementVNode("div",{class:"selected-topics-button-bg"},null,-1)),t.createElementVNode("div",IFe,t.toDisplayString(l.topicsSummary),1),t.createVNode(u,{class:"mr-2 bold link--text",type:"text"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.forAllTagChecked?"Limpar":"ver tudo"),1)]),_:1})]),t.createVNode(p,{show:e.showSelected,"onUpdate:show":n[6]||(n[6]=m=>e.showSelected=m),"lock-scroll":"",style:{"max-height":"500px","min-height":"180px"}},{default:t.withCtx(()=>[t.createElementVNode("div",AFe,[n[14]||(n[14]=t.createElementVNode("div",{class:"l-flex lead-light--text l-text-regular"}," Destinatários selecionados ",-1)),t.createVNode(u,{onClick:n[5]||(n[5]=m=>e.showSelected=!1),circle:"",icon:"uil-multiply",class:"border-none gray-70--text f-24 p-1"})]),t.createElementVNode("div",OFe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.selectedTopics,m=>(t.openBlock(),t.createBlock(f,{onRemove:g=>l.removeTopic(m),key:m.id,kind:m.kind,name:m.name,closeable:!0,class:"mr-2 mb-2"},null,8,["onRemove","kind","name"]))),128))])]),_:1},8,["show"])])):t.createCommentVNode("",!0)])}const BFe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(mFe,[["render",zFe],["__scopeId","data-v-24406b3f"]])},Symbol.toStringTag,{value:"Module"})),Idt="",LFe={name:"LSwitch",components:{ElSwitch:JM},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],methods:{onUpdateModelValue(e){this.$emit("update:modelValue",e)}}};function VFe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("el-switch");return t.openBlock(),t.createBlock(s,t.mergeProps(e.$attrs,{"model-value":o.modelValue,"onUpdate:modelValue":l.onUpdateModelValue,class:"l-switch"}),{"active-action":t.withCtx(()=>[t.createVNode(i,null,{default:t.withCtx(()=>n[0]||(n[0]=[t.createTextVNode("uil-check")])),_:1})]),"inactive-action":t.withCtx(()=>[t.createVNode(i,null,{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-times")])),_:1})]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16,["model-value","onUpdate:modelValue"])}const $Fe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(LFe,[["render",VFe],["__scopeId","data-v-e8ddf878"]])},Symbol.toStringTag,{value:"Module"}));/*!
111
+ `,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var u={placement:h1(n.placement),variation:TV(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:a,isFixed:n.options.strategy==="fixed"};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign({},n.styles.popper,IV(Object.assign({},u,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:i,roundOffsets:c})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,IV(Object.assign({},u,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}var A7e={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:I7e,data:{}};function O7e(e){var n=e.state;Object.keys(n.elements).forEach(function(o){var r=n.styles[o]||{},a=n.attributes[o]||{},l=n.elements[o];!ol(l)||!wi(l)||(Object.assign(l.style,r),Object.keys(a).forEach(function(i){var s=a[i];s===!1?l.removeAttribute(i):l.setAttribute(i,s===!0?"":s)}))})}function z7e(e){var n=e.state,o={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,o.popper),n.styles=o,n.elements.arrow&&Object.assign(n.elements.arrow.style,o.arrow),function(){Object.keys(n.elements).forEach(function(r){var a=n.elements[r],l=n.attributes[r]||{},i=Object.keys(n.styles.hasOwnProperty(r)?n.styles[r]:o[r]),s=i.reduce(function(c,d){return c[d]="",c},{});!ol(a)||!wi(a)||(Object.assign(a.style,s),Object.keys(l).forEach(function(c){a.removeAttribute(c)}))})}}var B7e={name:"applyStyles",enabled:!0,phase:"write",fn:O7e,effect:z7e,requires:["computeStyles"]},L7e=[x7e,S7e,A7e,B7e],V7e=k7e({defaultModifiers:L7e});function $7e(e,n,o){var r=h1(e),a=[Pc,Ru].indexOf(r)>=0?-1:1,l=typeof o=="function"?o(Object.assign({},n,{placement:e})):o,i=l[0],s=l[1];return i=i||0,s=(s||0)*a,[Pc,rh].indexOf(r)>=0?{x:s,y:i}:{x:i,y:s}}function j7e(e){var n=e.state,o=e.options,r=e.name,a=o.offset,l=a===void 0?[0,0]:a,i=r7e.reduce(function(u,f){return u[f]=$7e(f,n.rects,l),u},{}),s=i[n.placement],c=s.x,d=s.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=c,n.modifiersData.popperOffsets.y+=d),n.modifiersData[r]=i}var P7e={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:j7e};const[R7e,Fc]=Fe("popover"),F7e=["show","overlay","duration","teleport","overlayStyle","overlayClass","closeOnClickOverlay"],H7e={show:Boolean,theme:rt("light"),overlay:Boolean,actions:fo(),trigger:rt("click"),duration:We,showArrow:Le,placement:rt("bottom"),iconPrefix:String,overlayClass:Dn,overlayStyle:Object,closeOnClickAction:Le,closeOnClickOverlay:Le,closeOnClickOutside:Le,offset:{type:Array,default:()=>[0,8]},teleport:{type:[String,Object],default:"body"}};var U7e=t.defineComponent({name:R7e,props:H7e,emits:["select","touchstart","update:show"],setup(e,{emit:n,slots:o,attrs:r}){let a;const l=t.ref(),i=t.ref(),s=t.ref(),c=()=>({placement:e.placement,modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},bt({},P7e,{options:{offset:e.offset}})]}),d=()=>i.value&&s.value?V7e(i.value,s.value.popupRef.value,c()):null,u=()=>{t.nextTick(()=>{e.show&&(a?a.setOptions(c()):a=d())})},f=w=>n("update:show",w),p=()=>{e.trigger==="click"&&f(!e.show)},m=(w,N)=>{w.disabled||(n("select",w,N),e.closeOnClickAction&&f(!1))},g=()=>{e.show&&e.closeOnClickOutside&&(!e.overlay||e.closeOnClickOverlay)&&f(!1)},y=(w,N)=>o.action?o.action({action:w,index:N}):[w.icon&&t.createVNode(Ht,{name:w.icon,classPrefix:e.iconPrefix,class:Fc("action-icon")},null),t.createVNode("div",{class:[Fc("action-text"),PC]},[w.text])],b=(w,N)=>{const{icon:_,color:C,disabled:k,className:E}=w;return t.createVNode("div",{role:"menuitem",class:[Fc("action",{disabled:k,"with-icon":_}),E],style:{color:C},tabindex:k?void 0:0,"aria-disabled":k||void 0,onClick:()=>m(w,N)},[y(w,N)])};return t.onMounted(()=>{u(),t.watchEffect(()=>{var w;l.value=(w=s.value)==null?void 0:w.popupRef.value})}),t.onBeforeUnmount(()=>{a&&(a.destroy(),a=null)}),t.watch(()=>[e.show,e.offset,e.placement],u),vg([i,l],g,{eventName:"touchstart"}),()=>{var w;return t.createVNode(t.Fragment,null,[t.createVNode("span",{ref:i,class:Fc("wrapper"),onClick:p},[(w=o.reference)==null?void 0:w.call(o)]),t.createVNode(Xa,t.mergeProps({ref:s,class:Fc([e.theme]),position:"",transition:"van-popover-zoom",lockScroll:!1,"onUpdate:show":f},r,_n(e,F7e)),{default:()=>[e.showArrow&&t.createVNode("div",{class:Fc("arrow")},null),t.createVNode("div",{role:"menu",class:Fc("content")},[o.default?o.default():e.actions.map(b)])]})])}}});const Y7e=Xe(U7e),[W7e,I_]=Fe("progress"),Q7e={color:String,inactive:Boolean,pivotText:String,textColor:String,showPivot:Le,pivotColor:String,trackColor:String,strokeWidth:We,percentage:{type:We,default:0,validator:e=>e>=0&&e<=100}};var K7e=t.defineComponent({name:W7e,props:Q7e,setup(e){const n=t.computed(()=>e.inactive?void 0:e.color),o=()=>{const{textColor:r,pivotText:a,pivotColor:l,percentage:i}=e,s=a??`${i}%`;if(e.showPivot&&s){const c={color:r,left:`${+i}%`,transform:`translate(-${+i}%,-50%)`,background:l||n.value};return t.createVNode("span",{style:c,class:I_("pivot",{inactive:e.inactive})},[s])}};return()=>{const{trackColor:r,percentage:a,strokeWidth:l}=e,i={background:r,height:rn(l)},s={width:`${a}%`,background:n.value};return t.createVNode("div",{class:I_(),style:i},[t.createVNode("span",{class:I_("portion",{inactive:e.inactive}),style:s},null),o()])}}});const q7e=Xe(K7e),[G7e,ah,X7e]=Fe("pull-refresh"),AV=50,Z7e=["pulling","loosing","success"],J7e={disabled:Boolean,modelValue:Boolean,headHeight:ft(AV),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:We,successDuration:ft(500),animationDuration:ft(300)};var ePe=t.defineComponent({name:G7e,props:J7e,emits:["change","refresh","update:modelValue"],setup(e,{emit:n,slots:o}){let r;const a=t.ref(),l=t.ref(),i=ku(a),s=t.reactive({status:"normal",distance:0,duration:0}),c=zl(),d=()=>{if(e.headHeight!==AV)return{height:`${e.headHeight}px`}},u=()=>s.status!=="loading"&&s.status!=="success"&&!e.disabled,f=C=>{const k=+(e.pullDistance||e.headHeight);return C>k&&(C<k*2?C=k+(C-k)/2:C=k*1.5+(C-k*2)/4),Math.round(C)},p=(C,k)=>{const E=+(e.pullDistance||e.headHeight);s.distance=C,k?s.status="loading":C===0?s.status="normal":C<E?s.status="pulling":s.status="loosing",n("change",{status:s.status,distance:C})},m=()=>{const{status:C}=s;return C==="normal"?"":e[`${C}Text`]||X7e(C)},g=()=>{const{status:C,distance:k}=s;if(o[C])return o[C]({distance:k});const E=[];return Z7e.includes(C)&&E.push(t.createVNode("div",{class:ah("text")},[m()])),C==="loading"&&E.push(t.createVNode(Ga,{class:ah("loading")},{default:m})),E},y=()=>{s.status="success",setTimeout(()=>{p(0)},+e.successDuration)},b=C=>{r=ps(i.value)===0,r&&(s.duration=0,c.start(C))},w=C=>{u()&&b(C)},N=C=>{if(u()){r||b(C);const{deltaY:k}=c;c.move(C),r&&k.value>=0&&c.isVertical()&&(Fn(C),p(f(k.value)))}},_=()=>{r&&c.deltaY.value&&u()&&(s.duration=+e.animationDuration,s.status==="loosing"?(p(+e.headHeight,!0),n("update:modelValue",!0),t.nextTick(()=>n("refresh"))):p(0))};return t.watch(()=>e.modelValue,C=>{s.duration=+e.animationDuration,C?p(+e.headHeight,!0):o.success||e.successText?y():p(0,!1)}),no("touchmove",N,{target:l}),()=>{var C;const k={transitionDuration:`${s.duration}ms`,transform:s.distance?`translate3d(0,${s.distance}px, 0)`:""};return t.createVNode("div",{ref:a,class:ah()},[t.createVNode("div",{ref:l,class:ah("track"),style:k,onTouchstartPassive:w,onTouchend:_,onTouchcancel:_},[t.createVNode("div",{class:ah("head"),style:d()},[g()]),(C=o.default)==null?void 0:C.call(o)])])}}});const tPe=Xe(ePe),[nPe,g1]=Fe("rate");function oPe(e,n,o,r){return e>=n?{status:"full",value:1}:e+.5>=n&&o&&!r?{status:"half",value:.5}:e+1>=n&&o&&r?{status:"half",value:Math.round((e-n+1)*1e10)/1e10}:{status:"void",value:0}}const rPe={size:We,icon:rt("star"),color:String,count:ft(5),gutter:We,readonly:Boolean,disabled:Boolean,voidIcon:rt("star-o"),allowHalf:Boolean,voidColor:String,touchable:Le,iconPrefix:String,modelValue:Ol(0),disabledColor:String};var aPe=t.defineComponent({name:nPe,props:rPe,emits:["change","update:modelValue"],setup(e,{emit:n}){const o=zl(),[r,a]=Gg(),l=t.ref(),i=()=>e.readonly||e.disabled||!e.touchable,s=t.computed(()=>Array(+e.count).fill("").map((N,_)=>oPe(e.modelValue,_+1,e.allowHalf,e.readonly)));let c,d,u=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER;const p=()=>{d=Nn(l);const N=r.value.map(Nn);c=[],N.forEach((_,C)=>{u=Math.min(_.top,u),f=Math.max(_.top,f),e.allowHalf?c.push({score:C+.5,left:_.left,top:_.top,height:_.height},{score:C+1,left:_.left+_.width/2,top:_.top,height:_.height}):c.push({score:C+1,left:_.left,top:_.top,height:_.height})})},m=(N,_)=>{for(let C=c.length-1;C>0;C--)if(_>=d.top&&_<=d.bottom){if(N>c[C].left&&_>=c[C].top&&_<=c[C].top+c[C].height)return c[C].score}else{const k=_<d.top?u:f;if(N>c[C].left&&c[C].top===k)return c[C].score}return e.allowHalf?.5:1},g=N=>{!e.disabled&&!e.readonly&&N!==e.modelValue&&(n("update:modelValue",N),n("change",N))},y=N=>{i()||(o.start(N),p())},b=N=>{if(!i()&&(o.move(N),o.isHorizontal())){const{clientX:_,clientY:C}=N.touches[0];Fn(N),g(m(_,C))}},w=(N,_)=>{const{icon:C,size:k,color:E,count:T,gutter:S,voidIcon:D,disabled:v,voidColor:I,allowHalf:B,iconPrefix:$,disabledColor:F}=e,L=_+1,A=N.status==="full",P=N.status==="void",j=B&&N.value>0&&N.value<1;let O;S&&L!==+T&&(O={paddingRight:rn(S)});const z=R=>{p(),g(B?m(R.clientX,R.clientY):L)};return t.createVNode("div",{key:_,ref:a(_),role:"radio",style:O,class:g1("item"),tabindex:v?void 0:0,"aria-setsize":T,"aria-posinset":L,"aria-checked":!P,onClick:z},[t.createVNode(Ht,{size:k,name:A?C:D,class:g1("icon",{disabled:v,full:A}),color:v?F:A?E:I,classPrefix:$},null),j&&t.createVNode(Ht,{size:k,style:{width:N.value+"em"},name:P?D:C,class:g1("icon",["half",{disabled:v,full:!P}]),color:v?F:P?I:E,classPrefix:$},null)])};return fs(()=>e.modelValue),no("touchmove",b,{target:l}),()=>t.createVNode("div",{ref:l,role:"radiogroup",class:g1({readonly:e.readonly,disabled:e.disabled}),tabindex:e.disabled?void 0:0,"aria-disabled":e.disabled,"aria-readonly":e.readonly,onTouchstartPassive:y},[s.value.map(w)])}});const lPe=Xe(aPe),iPe=Xe(NVe),[sPe,lh,cPe]=Fe("search"),dPe=bt({},ZC,{label:String,shape:rt("square"),leftIcon:rt("search"),clearable:Le,actionText:String,background:String,showAction:Boolean});var uPe=t.defineComponent({name:sPe,props:dPe,emits:["blur","focus","clear","search","cancel","click-input","click-left-icon","click-right-icon","update:modelValue"],setup(e,{emit:n,slots:o,attrs:r}){const a=vu(),l=t.ref(),i=()=>{o.action||(n("update:modelValue",""),n("cancel"))},s=k=>{k.keyCode===13&&(Fn(k),n("search",e.modelValue))},c=()=>e.id||`${a}-input`,d=()=>{if(o.label||e.label)return t.createVNode("label",{class:lh("label"),for:c()},[o.label?o.label():e.label])},u=()=>{if(e.showAction){const k=e.actionText||cPe("cancel");return t.createVNode("div",{class:lh("action"),role:"button",tabindex:0,onClick:i},[o.action?o.action():k])}},f=()=>{var k;return(k=l.value)==null?void 0:k.blur()},p=()=>{var k;return(k=l.value)==null?void 0:k.focus()},m=k=>n("blur",k),g=k=>n("focus",k),y=k=>n("clear",k),b=k=>n("click-input",k),w=k=>n("click-left-icon",k),N=k=>n("click-right-icon",k),_=Object.keys(ZC),C=()=>{const k=bt({},r,_n(e,_),{id:c()}),E=T=>n("update:modelValue",T);return t.createVNode(Bl,t.mergeProps({ref:l,type:"search",class:lh("field"),border:!1,onBlur:m,onFocus:g,onClear:y,onKeypress:s,"onClick-input":b,"onClick-left-icon":w,"onClick-right-icon":N,"onUpdate:modelValue":E},k),_n(o,["left-icon","right-icon"]))};return tn({focus:p,blur:f}),()=>{var k;return t.createVNode("div",{class:lh({"show-action":e.showAction}),style:{background:e.background}},[(k=o.left)==null?void 0:k.call(o),t.createVNode("div",{class:lh("content",e.shape)},[d(),C()]),u()])}}});const fPe=Xe(uPe),pPe=[...UC,"round","closeOnPopstate","safeAreaInsetBottom"],OV={qq:"qq",link:"link-o",weibo:"weibo",qrcode:"qr",poster:"photo-o",wechat:"wechat","weapp-qrcode":"miniprogram-o","wechat-moments":"wechat-moments"},[hPe,rl,mPe]=Fe("share-sheet"),gPe=bt({},Su,{title:String,round:Le,options:fo(),cancelText:String,description:String,closeOnPopstate:Le,safeAreaInsetBottom:Le});var yPe=t.defineComponent({name:hPe,props:gPe,emits:["cancel","select","update:show"],setup(e,{emit:n,slots:o}){const r=p=>n("update:show",p),a=()=>{r(!1),n("cancel")},l=(p,m)=>n("select",p,m),i=()=>{const p=o.title?o.title():e.title,m=o.description?o.description():e.description;if(p||m)return t.createVNode("div",{class:rl("header")},[p&&t.createVNode("h2",{class:rl("title")},[p]),m&&t.createVNode("span",{class:rl("description")},[m])])},s=p=>OV[p]?t.createVNode("div",{class:rl("icon",[p])},[t.createVNode(Ht,{name:OV[p]||p},null)]):t.createVNode("img",{src:p,class:rl("image-icon")},null),c=(p,m)=>{const{name:g,icon:y,className:b,description:w}=p;return t.createVNode("div",{role:"button",tabindex:0,class:[rl("option"),b,Nr],onClick:()=>l(p,m)},[s(y),g&&t.createVNode("span",{class:rl("name")},[g]),w&&t.createVNode("span",{class:rl("option-description")},[w])])},d=(p,m)=>t.createVNode("div",{class:rl("options",{border:m})},[p.map(c)]),u=()=>{const{options:p}=e;return Array.isArray(p[0])?p.map((m,g)=>d(m,g!==0)):d(p)},f=()=>{var p;const m=(p=e.cancelText)!=null?p:mPe("cancel");if(o.cancel||m)return t.createVNode("button",{type:"button",class:rl("cancel"),onClick:a},[o.cancel?o.cancel():m])};return()=>t.createVNode(Xa,t.mergeProps({class:rl(),position:"bottom","onUpdate:show":r},_n(e,pPe)),{default:()=>[i(),u(),f()]})}});const bPe=Xe(yPe),[zV,MPe]=Fe("sidebar"),BV=Symbol(zV),wPe={modelValue:ft(0)};var CPe=t.defineComponent({name:zV,props:wPe,emits:["change","update:modelValue"],setup(e,{emit:n,slots:o}){const{linkChildren:r}=tr(BV),a=()=>+e.modelValue;return r({getActive:a,setActive:i=>{i!==a()&&(n("update:modelValue",i),n("change",i))}}),()=>{var i;return t.createVNode("div",{role:"tablist",class:MPe()},[(i=o.default)==null?void 0:i.call(o)])}}});const LV=Xe(CPe),[_Pe,VV]=Fe("sidebar-item"),NPe=bt({},ys,{dot:Boolean,title:String,badge:We,disabled:Boolean,badgeProps:Object});var kPe=t.defineComponent({name:_Pe,props:NPe,emits:["click"],setup(e,{emit:n,slots:o}){const r=$c(),{parent:a,index:l}=Po(BV);if(!a){process.env.NODE_ENV!=="production"&&console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");return}const i=()=>{e.disabled||(n("click",l.value),a.setActive(l.value),r())};return()=>{const{dot:s,badge:c,title:d,disabled:u}=e,f=l.value===a.getActive();return t.createVNode("div",{role:"tab",class:VV({select:f,disabled:u}),tabindex:u?void 0:0,"aria-selected":f,onClick:i},[t.createVNode(jc,t.mergeProps({dot:s,class:VV("text"),content:c},e.badgeProps),{default:()=>[o.title?o.title():d]})])}}});const $V=Xe(kPe),[EPe,ih]=Fe("skeleton"),jV="100%",xPe="60%",TPe={row:ft(0),title:Boolean,round:Boolean,avatar:Boolean,loading:Le,animate:Le,avatarSize:We,titleWidth:We,avatarShape:rt("round"),rowWidth:{type:[Number,String,Array],default:jV}};var SPe=t.defineComponent({name:EPe,inheritAttrs:!1,props:TPe,setup(e,{slots:n,attrs:o}){const r=()=>{if(e.avatar)return t.createVNode("div",{class:ih("avatar",e.avatarShape),style:hs(e.avatarSize)},null)},a=()=>{if(e.title)return t.createVNode("h3",{class:ih("title"),style:{width:rn(e.titleWidth)}},null)},l=s=>{const{rowWidth:c}=e;return c===jV&&s===+e.row-1?xPe:Array.isArray(c)?c[s]:c},i=()=>Array(+e.row).fill("").map((s,c)=>t.createVNode("div",{class:ih("row"),style:{width:rn(l(c))}},null));return()=>{var s;return e.loading?t.createVNode("div",t.mergeProps({class:ih({animate:e.animate,round:e.round})},o),[r(),t.createVNode("div",{class:ih("content")},[a(),i()])]):(s=n.default)==null?void 0:s.call(n)}}});const DPe=Xe(SPe),[vPe,sh]=Fe("slider"),IPe={min:ft(0),max:ft(100),step:ft(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:We,buttonSize:We,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};var APe=t.defineComponent({name:vPe,props:IPe,emits:["change","drag-end","drag-start","update:modelValue"],setup(e,{emit:n,slots:o}){let r,a,l;const i=t.ref(),s=t.ref(),c=t.ref(),d=zl(),u=t.computed(()=>Number(e.max)-Number(e.min)),f=t.computed(()=>{const I=e.vertical?"width":"height";return{background:e.inactiveColor,[I]:rn(e.barHeight)}}),p=I=>e.range&&Array.isArray(I),m=()=>{const{modelValue:I,min:B}=e;return p(I)?`${(I[1]-I[0])*100/u.value}%`:`${(I-Number(B))*100/u.value}%`},g=()=>{const{modelValue:I,min:B}=e;return p(I)?`${(I[0]-Number(B))*100/u.value}%`:"0%"},y=t.computed(()=>{const B={[e.vertical?"height":"width"]:m(),background:e.activeColor};c.value&&(B.transition="none");const $=()=>e.vertical?e.reverse?"bottom":"top":e.reverse?"right":"left";return B[$()]=g(),B}),b=I=>{const B=+e.min,$=+e.max,F=+e.step;I=To(I,B,$);const L=Math.round((I-B)/F)*F;return Y9(B,L)},w=(I,B)=>JSON.stringify(I)===JSON.stringify(B),N=I=>{var B,$;const F=(B=I[0])!=null?B:Number(e.min),L=($=I[1])!=null?$:Number(e.max);return F>L?[L,F]:[F,L]},_=(I,B)=>{p(I)?I=N(I).map(b):I=b(I),w(I,e.modelValue)||n("update:modelValue",I),B&&!w(I,l)&&n("change",I)},C=I=>{if(I.stopPropagation(),e.disabled||e.readonly)return;const{min:B,reverse:$,vertical:F,modelValue:L}=e,A=Nn(i),P=()=>F?$?A.bottom-I.clientY:I.clientY-A.top:$?A.right-I.clientX:I.clientX-A.left,j=F?A.height:A.width,O=Number(B)+P()/j*u.value;if(p(L)){const[z,R]=L,Y=(z+R)/2;O<=Y?_([O,R],!0):_([z,O],!0)}else _(O,!0)},k=I=>{e.disabled||e.readonly||(d.start(I),a=e.modelValue,p(a)?l=a.map(b):l=b(a),c.value="start")},E=I=>{if(e.disabled||e.readonly)return;c.value==="start"&&n("drag-start",I),Fn(I,!0),d.move(I),c.value="dragging";const B=Nn(i),$=e.vertical?d.deltaY.value:d.deltaX.value,F=e.vertical?B.height:B.width;let L=$/F*u.value;if(e.reverse&&(L=-L),p(l)){const A=e.reverse?1-r:r;a[A]=l[A]+L}else a=l+L;_(a)},T=I=>{e.disabled||e.readonly||(c.value==="dragging"&&(_(a,!0),n("drag-end",I)),c.value="")},S=I=>typeof I=="number"?sh("button-wrapper",["left","right"][I]):sh("button-wrapper",e.reverse?"left":"right"),D=(I,B)=>{if(typeof B=="number"){const $=o[B===0?"left-button":"right-button"];if($)return $({value:I})}return o.button?o.button({value:I}):t.createVNode("div",{class:sh("button"),style:hs(e.buttonSize)},null)},v=I=>{const B=typeof I=="number"?e.modelValue[I]:e.modelValue;return t.createVNode("div",{ref:s,role:"slider",class:S(I),tabindex:e.disabled?void 0:0,"aria-valuemin":e.min,"aria-valuenow":B,"aria-valuemax":e.max,"aria-disabled":e.disabled||void 0,"aria-readonly":e.readonly||void 0,"aria-orientation":e.vertical?"vertical":"horizontal",onTouchstartPassive:$=>{typeof I=="number"&&(r=I),k($)},onTouchend:T,onTouchcancel:T,onClick:BC},[D(B,I)])};return _(e.modelValue),fs(()=>e.modelValue),no("touchmove",E,{target:s}),()=>t.createVNode("div",{ref:i,style:f.value,class:sh({vertical:e.vertical,disabled:e.disabled}),onClick:C},[t.createVNode("div",{class:sh("bar"),style:y.value},[e.range?[v(0),v(1)]:v()])])}});const OPe=Xe(APe),[PV,zPe]=Fe("space"),BPe={align:String,direction:{type:String,default:"horizontal"},size:{type:[Number,String,Array],default:8},wrap:Boolean,fill:Boolean};function RV(e=[]){const n=[];return e.forEach(o=>{Array.isArray(o)?n.push(...o):o.type===t.Fragment?n.push(...RV(o.children)):n.push(o)}),n.filter(o=>{var r;return!(o&&(typeof Comment<"u"&&o.type===Comment||o.type===t.Fragment&&((r=o.children)==null?void 0:r.length)===0||o.type===Text&&o.children.trim()===""))})}var LPe=t.defineComponent({name:PV,props:BPe,setup(e,{slots:n}){const o=t.computed(()=>{var l;return(l=e.align)!=null?l:e.direction==="horizontal"?"center":""}),r=l=>typeof l=="number"?l+"px":l,a=l=>{const i={},s=`${r(Array.isArray(e.size)?e.size[0]:e.size)}`,c=`${r(Array.isArray(e.size)?e.size[1]:e.size)}`;return l?e.wrap?{marginBottom:c}:{}:(e.direction==="horizontal"&&(i.marginRight=s),(e.direction==="vertical"||e.wrap)&&(i.marginBottom=c),i)};return()=>{var l;const i=RV((l=n.default)==null?void 0:l.call(n));return t.createVNode("div",{class:[zPe({[e.direction]:e.direction,[`align-${o.value}`]:o.value,wrap:e.wrap,fill:e.fill})]},[i.map((s,c)=>t.createVNode("div",{key:`item-${c}`,class:`${PV}-item`,style:a(c===i.length-1)},[s]))])}}});const VPe=Xe(LPe),[FV,HV]=Fe("steps"),$Pe={active:ft(0),direction:rt("horizontal"),activeIcon:rt("checked"),iconPrefix:String,finishIcon:String,activeColor:String,inactiveIcon:String,inactiveColor:String},UV=Symbol(FV);var jPe=t.defineComponent({name:FV,props:$Pe,emits:["click-step"],setup(e,{emit:n,slots:o}){const{linkChildren:r}=tr(UV);return r({props:e,onClickStep:l=>n("click-step",l)}),()=>{var l;return t.createVNode("div",{class:HV([e.direction])},[t.createVNode("div",{class:HV("items")},[(l=o.default)==null?void 0:l.call(o)])])}}});const[PPe,Cs]=Fe("step");var RPe=t.defineComponent({name:PPe,setup(e,{slots:n}){const{parent:o,index:r}=Po(UV);if(!o){process.env.NODE_ENV!=="production"&&console.error("[Vant] <Step> must be a child component of <Steps>.");return}const a=o.props,l=()=>{const f=+a.active;return r.value<f?"finish":r.value===f?"process":"waiting"},i=()=>l()==="process",s=t.computed(()=>({background:l()==="finish"?a.activeColor:a.inactiveColor})),c=t.computed(()=>{if(i())return{color:a.activeColor};if(l()==="waiting")return{color:a.inactiveColor}}),d=()=>o.onClickStep(r.value),u=()=>{const{iconPrefix:f,finishIcon:p,activeIcon:m,activeColor:g,inactiveIcon:y}=a;return i()?n["active-icon"]?n["active-icon"]():t.createVNode(Ht,{class:Cs("icon","active"),name:m,color:g,classPrefix:f},null):l()==="finish"&&(p||n["finish-icon"])?n["finish-icon"]?n["finish-icon"]():t.createVNode(Ht,{class:Cs("icon","finish"),name:p,color:g,classPrefix:f},null):n["inactive-icon"]?n["inactive-icon"]():y?t.createVNode(Ht,{class:Cs("icon"),name:y,classPrefix:f},null):t.createVNode("i",{class:Cs("circle"),style:s.value},null)};return()=>{var f;const p=l();return t.createVNode("div",{class:[ms,Cs([a.direction,{[p]:p}])]},[t.createVNode("div",{class:Cs("title",{active:i()}),style:c.value,onClick:d},[(f=n.default)==null?void 0:f.call(n)]),t.createVNode("div",{class:Cs("circle-container"),onClick:d},[u()]),t.createVNode("div",{class:Cs("line"),style:s.value},null)])}}});const FPe=Xe(RPe),[HPe,y1]=Fe("stepper"),UPe=200,YPe=600,b1=(e,n)=>String(e)===String(n),WPe={min:ft(1),max:ft(1/0),name:ft(""),step:ft(1),theme:String,integer:Boolean,disabled:Boolean,showPlus:Le,showMinus:Le,showInput:Le,longPress:Le,allowEmpty:Boolean,modelValue:We,inputWidth:We,buttonSize:We,placeholder:String,disablePlus:Boolean,disableMinus:Boolean,disableInput:Boolean,beforeChange:Function,defaultValue:ft(1),decimalLength:We};var QPe=t.defineComponent({name:HPe,props:WPe,emits:["plus","blur","minus","focus","change","overlimit","update:modelValue"],setup(e,{emit:n}){const o=S=>{const{min:D,max:v,allowEmpty:I,decimalLength:B}=e;return I&&S===""||(S=$C(String(S),!e.integer),S=S===""?0:+S,S=Number.isNaN(S)?+D:S,S=Math.max(Math.min(+v,S),+D),Kt(B)&&(S=S.toFixed(+B))),S},r=()=>{var S;const D=(S=e.modelValue)!=null?S:e.defaultValue,v=o(D);return b1(v,e.modelValue)||n("update:modelValue",v),v};let a;const l=t.ref(),i=t.ref(r()),s=t.computed(()=>e.disabled||e.disableMinus||i.value<=+e.min),c=t.computed(()=>e.disabled||e.disablePlus||i.value>=+e.max),d=t.computed(()=>({width:rn(e.inputWidth),height:rn(e.buttonSize)})),u=t.computed(()=>hs(e.buttonSize)),f=()=>{const S=o(i.value);b1(S,i.value)||(i.value=S)},p=S=>{e.beforeChange?gs(e.beforeChange,{args:[S],done(){i.value=S}}):i.value=S},m=()=>{if(a==="plus"&&c.value||a==="minus"&&s.value){n("overlimit",a);return}const S=a==="minus"?-e.step:+e.step,D=o(Y9(+i.value,S));p(D),n(a)},g=S=>{const D=S.target,{value:v}=D,{decimalLength:I}=e;let B=$C(String(v),!e.integer);if(Kt(I)&&B.includes(".")){const F=B.split(".");B=`${F[0]}.${F[1].slice(0,+I)}`}e.beforeChange?D.value=String(i.value):b1(v,B)||(D.value=B);const $=B===String(+B);p($?+B:B)},y=S=>{var D;e.disableInput?(D=l.value)==null||D.blur():n("focus",S)},b=S=>{const D=S.target,v=o(D.value);D.value=String(v),i.value=v,t.nextTick(()=>{n("blur",S),F9()})};let w,N;const _=()=>{N=setTimeout(()=>{m(),_()},UPe)},C=()=>{e.longPress&&(w=!1,clearTimeout(N),N=setTimeout(()=>{w=!0,m(),_()},YPe))},k=S=>{e.longPress&&(clearTimeout(N),w&&Fn(S))},E=S=>{e.disableInput&&Fn(S)},T=S=>({onClick:D=>{Fn(D),a=S,m()},onTouchstartPassive:()=>{a=S,C()},onTouchend:k,onTouchcancel:k});return t.watch(()=>[e.max,e.min,e.integer,e.decimalLength],f),t.watch(()=>e.modelValue,S=>{b1(S,i.value)||(i.value=o(S))}),t.watch(i,S=>{n("update:modelValue",S),n("change",S,{name:e.name})}),fs(()=>e.modelValue),()=>t.createVNode("div",{role:"group",class:y1([e.theme])},[t.withDirectives(t.createVNode("button",t.mergeProps({type:"button",style:u.value,class:[y1("minus",{disabled:s.value}),{[Nr]:!s.value}],"aria-disabled":s.value||void 0},T("minus")),null),[[t.vShow,e.showMinus]]),t.withDirectives(t.createVNode("input",{ref:l,type:e.integer?"tel":"text",role:"spinbutton",class:y1("input"),value:i.value,style:d.value,disabled:e.disabled,readonly:e.disableInput,inputmode:e.integer?"numeric":"decimal",placeholder:e.placeholder,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":i.value,onBlur:b,onInput:g,onFocus:y,onMousedown:E},null),[[t.vShow,e.showInput]]),t.withDirectives(t.createVNode("button",t.mergeProps({type:"button",style:u.value,class:[y1("plus",{disabled:c.value}),{[Nr]:!c.value}],"aria-disabled":c.value||void 0},T("plus")),null),[[t.vShow,e.showPlus]])])}});const KPe=Xe(QPe),qPe=Xe(jPe),[GPe,al,XPe]=Fe("submit-bar"),ZPe={tip:String,label:String,price:Number,tipIcon:String,loading:Boolean,currency:rt("¥"),disabled:Boolean,textAlign:String,buttonText:String,buttonType:rt("danger"),buttonColor:String,suffixLabel:String,placeholder:Boolean,decimalLength:ft(2),safeAreaInsetBottom:Le};var JPe=t.defineComponent({name:GPe,props:ZPe,emits:["submit"],setup(e,{emit:n,slots:o}){const r=t.ref(),a=$g(r,al),l=()=>{const{price:u,label:f,currency:p,textAlign:m,suffixLabel:g,decimalLength:y}=e;if(typeof u=="number"){const b=(u/100).toFixed(+y).split("."),w=y?`.${b[1]}`:"";return t.createVNode("div",{class:al("text"),style:{textAlign:m}},[t.createVNode("span",null,[f||XPe("label")]),t.createVNode("span",{class:al("price")},[p,t.createVNode("span",{class:al("price-integer")},[b[0]]),w]),g&&t.createVNode("span",{class:al("suffix-label")},[g])])}},i=()=>{var u;const{tip:f,tipIcon:p}=e;if(o.tip||f)return t.createVNode("div",{class:al("tip")},[p&&t.createVNode(Ht,{class:al("tip-icon"),name:p},null),f&&t.createVNode("span",{class:al("tip-text")},[f]),(u=o.tip)==null?void 0:u.call(o)])},s=()=>n("submit"),c=()=>o.button?o.button():t.createVNode(kr,{round:!0,type:e.buttonType,text:e.buttonText,class:al("button",e.buttonType),color:e.buttonColor,loading:e.loading,disabled:e.disabled,onClick:s},null),d=()=>{var u,f;return t.createVNode("div",{ref:r,class:[al(),{"van-safe-area-bottom":e.safeAreaInsetBottom}]},[(u=o.top)==null?void 0:u.call(o),i(),t.createVNode("div",{class:al("bar")},[(f=o.default)==null?void 0:f.call(o),l(),c()])])};return()=>e.placeholder?a(d):d()}});const eRe=Xe(JPe),[tRe,A_]=Fe("swipe-cell"),nRe={name:ft(""),disabled:Boolean,leftWidth:We,rightWidth:We,beforeClose:Function,stopPropagation:Boolean};var oRe=t.defineComponent({name:tRe,props:nRe,emits:["open","close","click"],setup(e,{emit:n,slots:o}){let r,a,l;const i=t.ref(),s=t.ref(),c=t.ref(),d=t.reactive({offset:0,dragging:!1}),u=zl(),f=T=>T.value?Nn(T).width:0,p=t.computed(()=>Kt(e.leftWidth)?+e.leftWidth:f(s)),m=t.computed(()=>Kt(e.rightWidth)?+e.rightWidth:f(c)),g=T=>{d.offset=T==="left"?p.value:-m.value,r||(r=!0,n("open",{name:e.name,position:T}))},y=T=>{d.offset=0,r&&(r=!1,n("close",{name:e.name,position:T}))},b=T=>{const S=Math.abs(d.offset),D=.15,v=r?1-D:D,I=T==="left"?p.value:m.value;I&&S>I*v?g(T):y(T)},w=T=>{e.disabled||(l=d.offset,u.start(T))},N=T=>{if(e.disabled)return;const{deltaX:S}=u;u.move(T),u.isHorizontal()&&(a=!0,d.dragging=!0,(!r||S.value*l<0)&&Fn(T,e.stopPropagation),d.offset=To(S.value+l,-m.value,p.value))},_=()=>{d.dragging&&(d.dragging=!1,b(d.offset>0?"left":"right"),setTimeout(()=>{a=!1},0))},C=(T="outside")=>{n("click",T),r&&!a&&gs(e.beforeClose,{args:[{name:e.name,position:T}],done:()=>y(T)})},k=(T,S)=>D=>{S&&D.stopPropagation(),C(T)},E=(T,S)=>{const D=o[T];if(D)return t.createVNode("div",{ref:S,class:A_(T),onClick:k(T,!0)},[D()])};return tn({open:g,close:y}),vg(i,()=>C("outside"),{eventName:"touchstart"}),no("touchmove",N,{target:i}),()=>{var T;const S={transform:`translate3d(${d.offset}px, 0, 0)`,transitionDuration:d.dragging?"0s":".6s"};return t.createVNode("div",{ref:i,class:A_(),onClick:k("cell",a),onTouchstartPassive:w,onTouchend:_,onTouchcancel:_},[t.createVNode("div",{class:A_("wrapper"),style:S},[E("left",s),(T=o.default)==null?void 0:T.call(o),E("right",c)])])}}});const rRe=Xe(oRe),[YV,WV]=Fe("tabbar"),aRe={route:Boolean,fixed:Le,border:Le,zIndex:We,placeholder:Boolean,activeColor:String,beforeChange:Function,inactiveColor:String,modelValue:ft(0),safeAreaInsetBottom:{type:Boolean,default:null}},QV=Symbol(YV);var lRe=t.defineComponent({name:YV,props:aRe,emits:["change","update:modelValue"],setup(e,{emit:n,slots:o}){const r=t.ref(),{linkChildren:a}=tr(QV),l=$g(r,WV),i=()=>{var d;return(d=e.safeAreaInsetBottom)!=null?d:e.fixed},s=()=>{var d;const{fixed:u,zIndex:f,border:p}=e;return t.createVNode("div",{ref:r,role:"tablist",style:Vc(f),class:[WV({fixed:u}),{[Lg]:p,"van-safe-area-bottom":i()}]},[(d=o.default)==null?void 0:d.call(o)])};return a({props:e,setActive:(d,u)=>{gs(e.beforeChange,{args:[d],done(){n("update:modelValue",d),n("change",d),u()}})}}),()=>e.fixed&&e.placeholder?l(s):s()}});const iRe=Xe(lRe),[sRe,O_]=Fe("tabbar-item"),cRe=bt({},ys,{dot:Boolean,icon:String,name:We,badge:We,badgeProps:Object,iconPrefix:String});var dRe=t.defineComponent({name:sRe,props:cRe,emits:["click"],setup(e,{emit:n,slots:o}){const r=$c(),a=t.getCurrentInstance().proxy,{parent:l,index:i}=Po(QV);if(!l){process.env.NODE_ENV!=="production"&&console.error("[Vant] <TabbarItem> must be a child component of <Tabbar>.");return}const s=t.computed(()=>{var u;const{route:f,modelValue:p}=l.props;if(f&&"$route"in a){const{$route:m}=a,{to:g}=e,y=Pr(g)?g:{path:g};return!!m.matched.find(b=>{const w="path"in y&&y.path===b.path,N="name"in y&&y.name===b.name;return w||N})}return((u=e.name)!=null?u:i.value)===p}),c=u=>{var f;s.value||l.setActive((f=e.name)!=null?f:i.value,r),n("click",u)},d=()=>{if(o.icon)return o.icon({active:s.value});if(e.icon)return t.createVNode(Ht,{name:e.icon,classPrefix:e.iconPrefix},null)};return()=>{var u;const{dot:f,badge:p}=e,{activeColor:m,inactiveColor:g}=l.props,y=s.value?m:g;return t.createVNode("div",{role:"tab",class:O_({active:s.value}),style:{color:y},tabindex:0,"aria-selected":s.value,onClick:c},[t.createVNode(jc,t.mergeProps({dot:f,class:O_("icon"),content:p},e.badgeProps),{default:d}),t.createVNode("div",{class:O_("text")},[(u=o.default)==null?void 0:u.call(o,{active:s.value})])])}}});const uRe=Xe(dRe),[fRe,Fu]=Fe("tree-select"),pRe={max:ft(1/0),items:fo(),height:ft(300),selectedIcon:rt("success"),mainActiveIndex:ft(0),activeId:{type:[Number,String,Array],default:0}};var hRe=t.defineComponent({name:fRe,props:pRe,emits:["click-nav","click-item","update:activeId","update:mainActiveIndex"],setup(e,{emit:n,slots:o}){const r=d=>Array.isArray(e.activeId)?e.activeId.includes(d):e.activeId===d,a=d=>{const u=()=>{if(d.disabled)return;let f;if(Array.isArray(e.activeId)){f=e.activeId.slice();const p=f.indexOf(d.id);p!==-1?f.splice(p,1):f.length<e.max&&f.push(d.id)}else f=d.id;n("update:activeId",f),n("click-item",d)};return t.createVNode("div",{key:d.id,class:["van-ellipsis",Fu("item",{active:r(d.id),disabled:d.disabled})],onClick:u},[d.text,r(d.id)&&t.createVNode(Ht,{name:e.selectedIcon,class:Fu("selected")},null)])},l=d=>{n("update:mainActiveIndex",d)},i=d=>n("click-nav",d),s=()=>{const d=e.items.map(u=>t.createVNode($V,{dot:u.dot,title:u.text,badge:u.badge,class:[Fu("nav-item"),u.className],disabled:u.disabled,onClick:i},null));return t.createVNode(LV,{class:Fu("nav"),modelValue:e.mainActiveIndex,onChange:l},{default:()=>[d]})},c=()=>{if(o.content)return o.content();const d=e.items[+e.mainActiveIndex]||{};if(d.children)return d.children.map(a)};return()=>t.createVNode("div",{class:Fu(),style:{height:rn(e.height)}},[s(),t.createVNode("div",{class:Fu("content")},[c()])])}});const mRe=Xe(hRe),[gRe,lo,yRe]=Fe("uploader");function KV(e,n){return new Promise(o=>{if(n==="file"){o();return}const r=new FileReader;r.onload=a=>{o(a.target.result)},n==="dataUrl"?r.readAsDataURL(e):n==="text"&&r.readAsText(e)})}function qV(e,n){return Dg(e).some(o=>o.file?Cu(n)?n(o.file):o.file.size>n:!1)}function bRe(e,n){const o=[],r=[];return e.forEach(a=>{qV(a,n)?r.push(a):o.push(a)}),{valid:o,invalid:r}}const MRe=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i,wRe=e=>MRe.test(e);function GV(e){return e.isImage?!0:e.file&&e.file.type?e.file.type.indexOf("image")===0:e.url?wRe(e.url):typeof e.content=="string"?e.content.indexOf("data:image")===0:!1}var CRe=t.defineComponent({props:{name:We,item:to(Object),index:Number,imageFit:String,lazyLoad:Boolean,deletable:Boolean,previewSize:[Number,String,Array],beforeDelete:Function},emits:["delete","preview"],setup(e,{emit:n,slots:o}){const r=()=>{const{status:d,message:u}=e.item;if(d==="uploading"||d==="failed"){const f=d==="failed"?t.createVNode(Ht,{name:"close",class:lo("mask-icon")},null):t.createVNode(Ga,{class:lo("loading")},null),p=Kt(u)&&u!=="";return t.createVNode("div",{class:lo("mask")},[f,p&&t.createVNode("div",{class:lo("mask-message")},[u])])}},a=d=>{const{name:u,item:f,index:p,beforeDelete:m}=e;d.stopPropagation(),gs(m,{args:[f,{name:u,index:p}],done:()=>n("delete")})},l=()=>n("preview"),i=()=>{if(e.deletable&&e.item.status!=="uploading"){const d=o["preview-delete"];return t.createVNode("div",{role:"button",class:lo("preview-delete",{shadow:!d}),tabindex:0,"aria-label":yRe("delete"),onClick:a},[d?d():t.createVNode(Ht,{name:"cross",class:lo("preview-delete-icon")},null)])}},s=()=>{if(o["preview-cover"]){const{index:d,item:u}=e;return t.createVNode("div",{class:lo("preview-cover")},[o["preview-cover"](bt({index:d},u))])}},c=()=>{const{item:d,lazyLoad:u,imageFit:f,previewSize:p}=e;return GV(d)?t.createVNode(Xg,{fit:f,src:d.objectUrl||d.content||d.url,class:lo("preview-image"),width:Array.isArray(p)?p[0]:p,height:Array.isArray(p)?p[1]:p,lazyLoad:u,onClick:l},{default:s}):t.createVNode("div",{class:lo("file"),style:hs(e.previewSize)},[t.createVNode(Ht,{class:lo("file-icon"),name:"description"},null),t.createVNode("div",{class:[lo("file-name"),"van-ellipsis"]},[d.file?d.file.name:d.url]),s()])};return()=>t.createVNode("div",{class:lo("preview")},[c(),r(),i()])}});const _Re={name:ft(""),accept:rt("image/*"),capture:String,multiple:Boolean,disabled:Boolean,readonly:Boolean,lazyLoad:Boolean,maxCount:ft(1/0),imageFit:rt("cover"),resultType:rt("dataUrl"),uploadIcon:rt("photograph"),uploadText:String,deletable:Le,afterRead:Function,showUpload:Le,modelValue:fo(),beforeRead:Function,beforeDelete:Function,previewSize:[Number,String,Array],previewImage:Le,previewOptions:Object,previewFullImage:Le,maxSize:{type:[Number,String,Function],default:1/0}};var NRe=t.defineComponent({name:gRe,props:_Re,emits:["delete","oversize","click-upload","close-preview","click-preview","update:modelValue"],setup(e,{emit:n,slots:o}){const r=t.ref(),a=[],l=(C=e.modelValue.length)=>({name:e.name,index:C}),i=()=>{r.value&&(r.value.value="")},s=C=>{if(i(),qV(C,e.maxSize))if(Array.isArray(C)){const k=bRe(C,e.maxSize);if(C=k.valid,n("oversize",k.invalid,l()),!C.length)return}else{n("oversize",C,l());return}C=t.reactive(C),n("update:modelValue",[...e.modelValue,...Dg(C)]),e.afterRead&&e.afterRead(C,l())},c=C=>{const{maxCount:k,modelValue:E,resultType:T}=e;if(Array.isArray(C)){const S=+k-E.length;C.length>S&&(C=C.slice(0,S)),Promise.all(C.map(D=>KV(D,T))).then(D=>{const v=C.map((I,B)=>{const $={file:I,status:"",message:"",objectUrl:URL.createObjectURL(I)};return D[B]&&($.content=D[B]),$});s(v)})}else KV(C,T).then(S=>{const D={file:C,status:"",message:"",objectUrl:URL.createObjectURL(C)};S&&(D.content=S),s(D)})},d=C=>{const{files:k}=C.target;if(e.disabled||!k||!k.length)return;const E=k.length===1?k[0]:[].slice.call(k);if(e.beforeRead){const T=e.beforeRead(E,l());if(!T){i();return}if(DC(T)){T.then(S=>{c(S||E)}).catch(i);return}}c(E)};let u;const f=()=>n("close-preview"),p=C=>{if(e.previewFullImage){const k=e.modelValue.filter(GV),E=k.map(T=>(T.objectUrl&&!T.url&&T.status!=="failed"&&(T.url=T.objectUrl,a.push(T.url)),T.url)).filter(Boolean);u=eh(bt({images:E,startPosition:k.indexOf(C),onClose:f},e.previewOptions))}},m=()=>{u&&u.close()},g=(C,k)=>{const E=e.modelValue.slice(0);E.splice(k,1),n("update:modelValue",E),n("delete",C,l(k))},y=(C,k)=>{const E=["imageFit","deletable","previewSize","beforeDelete"],T=bt(_n(e,E),_n(C,E,!0));return t.createVNode(CRe,t.mergeProps({item:C,index:k,onClick:()=>n("click-preview",C,l(k)),onDelete:()=>g(C,k),onPreview:()=>p(C)},_n(e,["name","lazyLoad"]),T),_n(o,["preview-cover","preview-delete"]))},b=()=>{if(e.previewImage)return e.modelValue.map(y)},w=C=>n("click-upload",C),N=()=>{if(e.modelValue.length>=e.maxCount||!e.showUpload)return;const C=e.readonly?null:t.createVNode("input",{ref:r,type:"file",class:lo("input"),accept:e.accept,capture:e.capture,multiple:e.multiple,disabled:e.disabled,onChange:d},null);return o.default?t.createVNode("div",{class:lo("input-wrapper"),onClick:w},[o.default(),C]):t.createVNode("div",{class:lo("upload",{readonly:e.readonly}),style:hs(e.previewSize),onClick:w},[t.createVNode(Ht,{name:e.uploadIcon,class:lo("upload-icon")},null),e.uploadText&&t.createVNode("span",{class:lo("upload-text")},[e.uploadText]),C])},_=()=>{r.value&&!e.disabled&&r.value.click()};return t.onBeforeUnmount(()=>{a.forEach(C=>URL.revokeObjectURL(C))}),tn({chooseFile:_,closeImagePreview:m}),fs(()=>e.modelValue),()=>t.createVNode("div",{class:lo()},[t.createVNode("div",{class:lo("wrapper",{disabled:e.disabled})},[b(),N()])])}});const kRe=Xe(NRe),ERe="3.6.12";function xRe(e){[oL,FC,RBe,WC,W9e,sLe,bL,jc,kr,_Le,DLe,nVe,Ja,lVe,KL,hVe,wVe,SVe,OVe,$Ve,jVe,HVe,QVe,ZVe,r$e,b_,f$e,M$e,S$e,ao,V$e,H$e,U$e,rV,Bl,GC,K$e,Z$e,Ht,Xg,eh,fje,pje,bje,Ga,q9,_je,xje,Fr,jje,uL,Hje,Qje,Pg,Y7e,Xa,q7e,tPe,a_,o_,lPe,iPe,fPe,bPe,LV,$V,DPe,OPe,VPe,FPe,KPe,qPe,VL,eRe,u_,rRe,f_,t_,e1,iRe,uRe,h_,Qg,Er,mRe,kRe].forEach(o=>{o.install?e.use(o):o.name&&e.component(o.name,o)})}var TRe={install:xRe,version:ERe},M1={},w1={};Object.defineProperty(w1,"__esModule",{value:!0}),w1.errorHandler=void 0;function SRe(e){if(!e)return;const n={message:"Um problema aconteceu e foi enviado para análise",type:"error",retryable:!0};return!window.navigator.onLine||e.message==="Network Error"?(n.message="Parece que você está offline.",n.type="info",n):typeof e=="string"?(n.message=e,n.retryable=!1,n):e.response&&e.response.status&&e.response.status>=400&&e.response.status<500?(n.message="Algumas informações não foram atualizadas.",n.retryable=!1,n):(e.response&&e.response.status>=500&&(n.message="Ops, encontramos um erro. Tente novamente mais tarde."),n)}w1.errorHandler=SRe,function(e){var n=yn&&yn.__createBinding||(Object.create?function(r,a,l,i){i===void 0&&(i=l),Object.defineProperty(r,i,{enumerable:!0,get:function(){return a[l]}})}:function(r,a,l,i){i===void 0&&(i=l),r[i]=a[l]}),o=yn&&yn.__exportStar||function(r,a){for(var l in r)l!=="default"&&!a.hasOwnProperty(l)&&n(a,r,l)};Object.defineProperty(e,"__esModule",{value:!0}),o(w1,e)}(M1);const Edt="",xdt="",DRe={name:"TopicItem",props:{multipleTargets:{type:Boolean},depth:{type:Number,default:0},propagate:{type:Function},propagateIncludes:{type:Function},parentsTopic:{type:Array,default:()=>[]},isCheckedFunction:{type:Function},populateTopic:{type:Function},hasChildChecked:{type:Function},parentIncludes:{type:Array,default:()=>[]},includesMap:{type:Object},parentChecked:{type:Boolean},topic:{type:Object},disabled:{type:Boolean},checked:{type:Boolean},selectedTopicKind:{type:String}},data:function(){return{showIncludes:!1,fetchingIncludes:!1,initialFetching:!0,fetched:!1,error:!1,includes:[],includesMapData:{},generator:null,buffer:[],hasMore:!1,limit:30}},created(){this.generator=this.combinedGenerator(),this.includesMapData=this.includesMap},watch:{async showIncludes(e){e===!0&&this.fetched===!1&&(this.fetched=!0,await this.fetch(),this.initialFetching=!1)}},computed:{includesNoData(){return{group:"Esta turma ainda não tem alunos",tag:"Esta tag ainda não tem turmas"}[this.topic.kind]},isSelectedEntityKind(){return this.topic.kind===this.selectedTopicKind},chanShowCheckbox(){return this.multipleTargets||this.isSelectedEntityKind&&!this.multipleTargets}},methods:{async*fetchToGenerator(e,n=null){const o={id:this.topic.id,kind:e,limit:this.limit+1,page:0};n&&(o.groupContext=n);let{hits:r,total:a}=await this.populateTopic(o);for(;a>0;){if(r.length>0){yield r.shift(),a--;continue}o.page+=1,r=(await this.populateTopic(o)).hits}},async*combinedGenerator(){this.topic.kind==="group"?(yield*this.fetchToGenerator("group","member"),yield*this.fetchToGenerator("group","user")):this.topic.kind==="member"?yield*this.fetchToGenerator("member","user"):yield*this.fetchToGenerator("tag")},async fetchPage(){const e=this.limit;for(;this.buffer.length<e+1;){let n=await this.generator.next();if(n.value){this.buffer.push(n.value);continue}break}return{results:this.buffer.splice(0,e),hasMore:this.buffer.length>0}},async fetch(){const e=Lc(this.includes);this.fetchingIncludes=!0;try{const{results:n,hasMore:o}=await this.fetchPage();this.includes=[...e,...n],this.includesMapData={...this.includesMapData,[this.topic.id]:this.includes},this.$emit("includes",{topic:this.topic,includes:this.includes}),this.hasMore=o}catch(n){this.error=n,this.$notify({...M1.errorHandler("Erro ao carregar mais."),duration:1e4,position:"bottom",showClose:!0})}finally{this.fetchingIncludes=!1}},color(e){return this.disabled?"gray-50":{member:"purple",group:"aqua",user:"link",tag:"warning"}[e]||"lead"},icon(e){return{member:"uil-graduation-cap",group:"uil-users-alt",user:"uil-user",tag:"uil-tag-alt"}[e]},isChildChecked(e){return this.isCheckedFunction(e)||this.isCheckedFunction(this.topic)},expandableKind(){return["group","tag","member"].includes(this.topic.kind)},toggleShowIncludes(){this.expandableKind&&(this.showIncludes=!this.showIncludes)},updateSelectedTopics(e,n){this.$emit("input",{topic:e,value:n})},topicIncludedChanged(e,n){this.parentsTopic.some(this.isCheckedFunction)&&!n&&this.parentsTopic.filter(this.isCheckedFunction).forEach(r=>{var a;this.updateSelectedTopics(r,!1),(a=this.includesMap[r.id])==null||a.forEach(l=>{this.hasChildChecked(l)||this.updateSelectedTopics(l,!0)})}),this.updateSelectedTopics(e,n)}}},vRe={class:"topic-item-group"},IRe={key:0,class:"topic-chevron mr-2"},ARe={class:"topic-icon"},ORe={key:0},zRe={class:"l-d-flex l-align-items-center my-2",style:{"justify-content":"center",width:"100%",height:"40px"}},BRe={key:1},LRe={class:"no-data-includes l-text-regular gray-60--text"},VRe={key:1},$Re={key:0,class:"mx-3 my-3"};function jRe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-checkbox"),c=t.resolveComponent("LCircularLoader"),d=t.resolveComponent("TopicItem",!0),u=t.resolveComponent("l-button"),f=t.resolveComponent("l-transition-expand");return t.openBlock(),t.createElementBlock("div",vRe,[t.createElementVNode("div",{class:t.normalizeClass("topic-item-group-header depth-"+o.depth+" l-d-flex l-align-items-center pl-3"+(l.isSelectedEntityKind&&o.depth>0?" user-topic-item-group-header":""))},[t.createElementVNode("div",{class:"l-flex l-d-flex l-align-items-center",onClick:n[0]||(n[0]=t.withModifiers(p=>l.isSelectedEntityKind?null:l.toggleShowIncludes(),["stop"]))},[l.isSelectedEntityKind?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",IRe,[t.createVNode(i,{class:"gray-60--text",size:"24"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.showIncludes?"uil-angle-down":"uil-angle-right"),1)]),_:1})])),t.createElementVNode("div",ARe,[t.createElementVNode("div",{class:t.normalizeClass(["bg-icon",l.color(o.topic.kind)])},null,2),t.createVNode(i,{class:t.normalizeClass(l.color(o.topic.kind)+"--text")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon(o.topic.kind)),1)]),_:1},8,["class"])]),t.createElementVNode("div",{class:t.normalizeClass(["l-flex ml-2 mr-3 l-text-regular ellipsis-2",o.disabled?"gray-70--text":"lead-light--text"])},t.toDisplayString(o.topic.name),3)]),(t.openBlock(),t.createBlock(s,{disabled:o.disabled,checked:o.isCheckedFunction(o.topic),indeterminate:o.hasChildChecked(o.topic)&&!o.isCheckedFunction(o.topic),key:o.isCheckedFunction(o.topic),onChange:n[1]||(n[1]=p=>o.parentsTopic.length?l.topicIncludedChanged(o.topic,p):l.updateSelectedTopics(o.topic,p)),class:t.normalizeClass(["p-3",{"circular-checkbox":!o.multipleTargets}]),style:t.normalizeStyle({display:l.chanShowCheckbox?"block":"none"})},null,8,["disabled","checked","indeterminate","class","style"]))],2),n[8]||(n[8]=t.createElementVNode("hr",null,null,-1)),t.createVNode(f,null,{default:t.withCtx(()=>[e.showIncludes?(t.openBlock(),t.createElementBlock("div",ORe,[e.initialFetching?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",zRe,[t.createVNode(c,{width:40,height:40})]),n[5]||(n[5]=t.createElementVNode("hr",null,null,-1))],64)):(t.openBlock(),t.createElementBlock("div",BRe,[!e.includes.length&&!e.hasMore||e.error?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",LRe,t.toDisplayString(l.includesNoData),1),n[6]||(n[6]=t.createElementVNode("hr",null,null,-1))],64)):(t.openBlock(),t.createElementBlock("div",VRe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.includes,p=>(t.openBlock(),t.createBlock(d,{key:p.id,onInput:n[2]||(n[2]=m=>o.propagate(m)),onIncludes:n[3]||(n[3]=m=>o.propagateIncludes(m)),propagateIncludes:o.propagateIncludes,hasChildChecked:o.hasChildChecked,isCheckedFunction:l.isChildChecked,checked:l.isChildChecked(p),depth:o.depth+1,topic:p,selectedTopicKind:o.selectedTopicKind,parentsTopic:[...o.parentsTopic,o.topic],parentIncludes:e.includes,includesMap:e.includesMapData,parentChecked:o.checked,populateTopic:o.populateTopic,propagate:o.propagate,disabled:o.disabled,multipleTargets:o.multipleTargets},null,8,["propagateIncludes","hasChildChecked","isCheckedFunction","checked","depth","topic","selectedTopicKind","parentsTopic","parentIncludes","includesMap","parentChecked","populateTopic","propagate","disabled","multipleTargets"]))),128)),e.hasMore?(t.openBlock(),t.createElementBlock("div",$Re,[t.createVNode(u,{loading:e.fetchingIncludes,onClick:n[4]||(n[4]=p=>l.fetch()),plain:"",fill:""},{default:t.withCtx(()=>n[7]||(n[7]=[t.createTextVNode(" Carregar mais ")])),_:1},8,["loading"])])):t.createCommentVNode("",!0)]))]))])):t.createCommentVNode("",!0)]),_:1})])}const PRe=lt(DRe,[["render",jRe],["__scopeId","data-v-871ec2bc"]]),Tdt="",RRe={props:{term:{type:String}}},FRe={class:"l-d-flex l-align-items-center lead--text recent-topic"},HRe={class:"l-flex l-text-regular mx-2"};function URe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-button");return t.openBlock(),t.createElementBlock("div",FRe,[t.createVNode(i,{size:"16"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-history")])),_:1}),t.createElementVNode("div",HRe,t.toDisplayString(o.term),1),t.createVNode(s,{onClick:n[0]||(n[0]=t.withModifiers(c=>e.$emit("remove"),["stop"])),circle:"",icon:"uil-multiply",class:"border-none lead--text f-18 p-1"})])}const YRe=lt(RRe,[["render",URe],["__scopeId","data-v-a8c57ab5"]]),Sdt="",WRe={props:{query:{type:Object},typing:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},hasAnySelectedTopic:{type:Boolean,default:!1},kinds:{type:Array}},data:e=>{const n=wo.cloneDeep(e.query);return{localQuery:n,queryKind:n.kind}},computed:{filteredKinds(){return this.kinds.filter(e=>this.localQuery.q||!(e.value==="member"||e.value==="user"))}},watch:{queryKind:{handler(e){this.localQuery={...this.localQuery,kind:e}},immediate:!0,deep:!0},localQuery:{handler(e){this.$emit("update:query",e)},deep:!0,immediate:!0}},methods:{clearInput(){this.updateQuery({target:{value:null}})},isSelected(e){return er(this.localQuery,"kind",null)===e},updateQuery(e){this.localQuery={...this.localQuery,q:er(e,"target.value",null)}},setInputClass(e){return"search-input-wrapper ml-2 l-flex"+" "+e},back(){this.$emit("close")},save(){this.$emit("save")}}},QRe={class:"app-navigation"},KRe={class:"search-topics-header l-d-flex l-align-items-center pl-2 pr-3"},qRe={key:0,class:"filter-kind l-d-flex px-3 pb-2"};function GRe(e,n,o,r,a,l){const i=t.resolveComponent("l-button"),s=t.resolveComponent("l-icon"),c=t.resolveComponent("l-radio-button"),d=t.resolveComponent("l-radio-group"),u=t.resolveComponent("l-linear-progress");return t.openBlock(),t.createElementBlock("div",QRe,[t.createElementVNode("div",KRe,[t.createVNode(i,{onClick:l.back,circle:"",icon:"uil-arrow-left",class:"border-none gray-70--text f-24 p-1"},null,8,["onClick"]),t.createElementVNode("div",{class:t.normalizeClass(l.setInputClass("blurred"))},[t.withDirectives(t.createElementVNode("input",{style:{width:"100%"},autocomplete:"off",placeholder:"Pesquisar","onUpdate:modelValue":n[0]||(n[0]=f=>e.localQuery.q=f),onFocus:n[1]||(n[1]=f=>l.setInputClass("focused")),onBlur:n[2]||(n[2]=f=>l.setInputClass("blurred")),onKeypress:n[3]||(n[3]=t.withKeys(f=>f.target.blur(),["enter"])),onInput:n[4]||(n[4]=(...f)=>l.updateQuery&&l.updateQuery(...f))},null,544),[[t.vModelText,e.localQuery.q]]),e.localQuery.q?(t.openBlock(),t.createBlock(s,{key:0,class:"lead-light--text cursor-pointer",onClick:l.clearInput,size:"16"},{default:t.withCtx(()=>n[6]||(n[6]=[t.createTextVNode(" uil-times ")])),_:1},8,["onClick"])):t.createCommentVNode("",!0)],2),t.createVNode(i,{disabled:!o.hasAnySelectedTopic,onClick:l.save,loading:o.loading||o.typing,type:"primary",class:"save-button bold l-d-flex l-align-items-center f-14 ml-2"},{default:t.withCtx(()=>n[7]||(n[7]=[t.createTextVNode(" Salvar ")])),_:1},8,["disabled","onClick","loading"])]),e.localQuery.q||o.query.kind!=="*"?(t.openBlock(),t.createElementBlock("div",qRe,[t.createVNode(d,{modelValue:e.queryKind,"onUpdate:modelValue":n[5]||(n[5]=f=>e.queryKind=f),class:"l-flex-nowrap",size:"small",separated:"",color:"lead-light"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.filteredKinds,f=>(t.openBlock(),t.createBlock(c,{key:f.value,label:f.value},{default:t.withCtx(()=>[f.icon?(t.openBlock(),t.createBlock(s,{key:0,color:l.isSelected(f.value)?"white":"lead-light",size:"13"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(f.icon),1)]),_:2},1032,["color"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(f.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),o.loading||o.typing?(t.openBlock(),t.createBlock(u,{key:1})):t.createCommentVNode("",!0)])}const XRe=lt(WRe,[["render",GRe],["__scopeId","data-v-4a29e69f"]]),XV=Symbol.for("GlobalStack"),ZV=class{static createStackInstance(n){if(console.warn(`[VueModals] No ModalStack was found for name "${n}". Using Modals without a stack instance causes one to be created as default at the end of the document body.`),this.globalStackInstances.get(n))return console.warn(`[VueModals] A ModalStack instance with the name "${n}" already exists. Returning stack.`),this.globalStackInstances.get(n);const o=document.createElement("aside");document.body.insertAdjacentElement("beforeend",o);const r=t.createApp(B_,{name:n});return r.mount(o),this.globalStackInstances.set(n,r),r}static stack(n="default"){if(n==="default"&&!this.globalStackInstances.has("default"))return this.createStackInstance("default");if(this.globalStackInstances.has(n))return this.globalStackInstances.get(n);throw new Error(`[VueModals] No stack instance found for name "${n??"default"}". Create a ModalStack instance with this name to use it.`)}static open(n){return this.stack(n.stack).push(n)}static registerStack(n,o){console.warn("register",n,o),this.globalStackInstances.has(n)?console.warn(`[VueModals] Multiple instances of ModalStack must have unique names. Duplicate name found for ModalStack "${n}".`):this.globalStackInstances.set(n,o)}static unregisterStack(n,o){console.warn("unregister",n,o),this.globalStackInstances.get(n)===o?this.globalStackInstances.delete(n):console.warn(`[VueModals] Could not unregister ModalStack because a duplicate name was found "${n}".`)}};ZV.globalStackInstances=window[XV]||(window[XV]=new Map);let Hu=ZV;const ZRe=t.defineComponent({props:{stack:{type:Array},index:{type:Number},modal:{type:Object},position:{type:String,default:"right"}},computed:{ensuredPosition(){return this.position==="left"?"left":"right"},depth(){const e=this.stack.filter(o=>{const r=o.options.position??"right";return o.options.layout==="drawer"&&r===this.ensuredPosition}),n=e.findIndex(o=>o===this.modal);return e.length-n-1}}}),z_=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},JRe=["position"];function eFe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("section",{layout:"drawer",position:e.ensuredPosition,style:t.normalizeStyle({"--depth":e.depth})},[t.renderSlot(e.$slots,"default")],12,JRe)}const tFe=z_(ZRe,[["render",eFe]]),nFe=t.defineComponent({computed:{classes(){return{center:!0}}},props:{stack:{type:Array},index:{type:Number},modal:{type:Object},showClose:{type:Object}}}),oFe={key:0,class:"header"},rFe={class:"content"};function aFe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("section",{layout:"dialog",class:t.normalizeClass(e.classes)},[e.showClose?(t.openBlock(),t.createElementBlock("div",oFe,[t.createElementVNode("button",{class:"close-button",onClick:n[0]||(n[0]=i=>e.$emit("close"))},"×")])):t.createCommentVNode("",!0),t.createElementVNode("div",rFe,[t.renderSlot(e.$slots,"default")]),n[1]||(n[1]=t.createElementVNode("div",{class:"footer"},null,-1))],2)}const lFe=z_(nFe,[["render",aFe]]);var iFe=1;const JV=Symbol("Reject"),e$=Symbol("Resolve"),ch=Symbol("Fulfilled"),sFe={drawer:tFe,dialog:lFe},cFe=t.defineComponent({name:"vue-modals-stack",data(){return{stack:[]}},created(){Hu.registerStack(this.name,this)},beforeUnmount(){Hu.unregisterStack(this.name,this)},methods:{getLayoutComponentFromModalLayout(e){return typeof e=="string"?sFe[e]??e:e},removeFromStack(e){const n=this.stack.findIndex(o=>o===e);n<0||this.stack.splice(n,1)},addToStack(e){this.stack.push(e)},push(e){const n=this.buildModal(e);return this.addToStack(n),n},close(e,n){return this.canClose(e)?(this.destroy(e,n),!0):!1},layoutForModal(e){const n=e.layout??e.options.layout??this.layout??"section",o=C1.app;if(typeof n=="string"){const r=o.component(n);if(r)return r}return n},canClose(e){var n;const o=new Event("beforeClose",{cancelable:!0});if(e.options.beforeClose&&(e.options.beforeClose(o),o.defaultPrevented))return!1;const r=(n=this.$refs[e.id])==null?void 0:n[0];return!(r&&typeof r.beforeClose=="function"&&(r.beforeClose(o),o.defaultPrevented)||!this.stack.filter(a=>a.options.parent===r).every(a=>this.canClose(a)))},destroy(e,n){e[ch]||(e[ch]=!0,e[JV](n??new Error("Modal closed"))),this.removeFromStack(e)},answer(e,n){e[ch]||(e[ch]=!0,e[e$](n)),this.removeFromStack(e)},pop(){if(this.stack.length){const e=this.stack[this.stack.length-1];if(this.close(e))return e}return null},popUntil(e){if(!(this.stack.findIndex(n=>e===n)<0))for(;this.stack.length>0;){const n=this.pop();if(n===e||n===null)return}},clear(){for(;this.stack.length;)this.destroy(this.stack[this.stack.length-1])},buildModal(e){var n;let o,r;const a=new Promise((l,i)=>{o=l,r=s=>"default"in e?l(e.default):i(s)});return!e.layout&&(n=e.component)!=null&&n.layout&&(e.layout=e.component.layout),e.parent&&t.onBeforeUnmount(()=>{this.destroy(a,new Error("Component was destroyed"))}),a.id=iFe++,a.stack=this,a.options=e,a.layout=this.layoutForModal(a),a.position=e.position,a[JV]=r,a[e$]=o,a[ch]=!1,a.close=l=>this.close(a,l),a.destroy=l=>this.destroy(a,l),a},onNameChanged(e,n){n&&Hu.unregisterStack(n,this),e&&Hu.registerStack(e,this)}},props:{name:{type:String,default:"default"},layout:{type:String,default:"drawer"}},watch:{name:[{handler:"onNameChanged"}]}}),dFe=["onClick"];function uFe(e,n,o,r,a,l){return t.openBlock(),t.createBlock(t.TransitionGroup,{tag:"div",stack:e.name,name:"modal"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.stack,(i,s)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:i.id},[i.options.hideOverlay?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(`z-index: ${1e3+s}`),class:t.normalizeClass(["vue-modals-overlay",{below:s<e.stack.length-1,far:s<e.stack.length-4}]),onClick:c=>i.options.clickToClose!==!1&&e.close(i)},null,14,dFe)),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.getLayoutComponentFromModalLayout(i.layout)),{"modal-id":i.id,modal:i,showClose:i.options.showClose,class:"vue-modals-layout",style:t.normalizeStyle(`z-index: ${1001+s}`),stack:e.stack,index:s,position:i.position,onClose:c=>e.close(i,c),onDestroy:c=>e.destroy(i,c),onAnswer:c=>e.answer(i,c)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.options.component),t.mergeProps({ref_for:!0,ref:i.id},i.options.props,{onClose:c=>e.close(i,c),onDestroy:c=>e.destroy(i,c),onAnswer:c=>e.answer(i,c)}),null,16,["onClose","onDestroy","onAnswer"]))]),_:2},1064,["modal-id","modal","showClose","style","stack","index","position","onClose","onDestroy","onAnswer"]))],64))),128))]),_:1},8,["stack"])}const B_=z_(cFe,[["render",uFe]]),C1={app:void 0,install(e){e.component("vue-modals-stack",B_),e.config.globalProperties.$modals=Hu,C1.app=e},Modals:Hu,ModalStack:B_};async function fFe(e){const n=window.LayersPortal?window.LayersPortal.platform:"shell";if(n==="shell"||n==="iframe"){const r=C1.Modals.stack().push({layout:"dialog",showClose:!1,component:Zw,props:{title:e.title,content:e.content,buttonCloseLabel:e.buttonCloseLabel,buttonConfirmLabel:e.buttonConfirmLabel}});try{return await r}catch{return!1}}return window.confirm(e.content||e.title)}async function pFe(){const e=C1.Modals.stack();window.history.go(1);const n=e.push({layout:"dialog",showClose:!1,component:Zw,props:{buttonCloseLabel:"Permanecer aqui",buttonConfirmLabel:"Descartar alterações",title:"Alterações não salvas",content:"Você quer mesmo sair? Existem alterações que não foram salvas. Se você sair, suas alterações serão perdidas."}});try{const o=await n;if(o)return o}catch{}}const hFe="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIwIiBoZWlnaHQ9IjE4MyIgdmlld0JveD0iMCAwIDIyMCAxODMiIGZp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MjY5IDEyNi4xODUgMzMuNjA2MUMxMzAuNDQ4IDMyLjE4NTMgMTM0LjM1NCAzNS41Njg1IDEyNi44MzMgNDQuMDA0NFoiIGZpbGw9IiMyNjMyMzgiLz4KPHBhdGggZD0iTTE0MC41MzYgMzcuOTg2NUMxMzUuNjQyIDM4Ljk2MDQgMTI2LjY2NSAzOS4wNTM4IDEyNS42NTEgMzMuMDU2NEMxMjUuMDA3IDI5LjAyMzcgMTMxLjIwMyAyOC4xMTY1IDEzMy4xMTkgMjkuNTE3QzEzNS4wNTYgMzAuOTc3NCAxMzkuMTIxIDMyLjc0NDkgMTQyLjQ5NiAzMy4zNDE4QzE0NS44NzEgMzMuOTM4NiAxNDcuODE4IDM2LjU0NzIgMTQwLjUzNiAzNy45ODY1WiIgZmlsbD0iIzI2MzIzOCIvPgo8cGF0aCBkPSJNMTQxLjI5OCA0Ny4zOTVMMTM4LjYxNSA0Ny4yMjM0QzEzOC42MTUgNDcuMjIzNCAxMzkuNjkzIDQ0LjA1MjUgMTM5LjAxNSA0MS43OTM4QzEzOC4zMzcgMzkuNTM1MSAxMzcuNTM0IDM3Ljg2MzggMTQxLjkzMSAzNy4wMDM2QzE0Ni4zNjYgMzYuMDYxOCAxNDkuNzg1IDM5Ljk2MTMgMTQxLjI5OCA0Ny4zOTVaIiBmaWxsPSIjMjYzMjM4Ii8+Cjwvc3ZnPgo=",Ddt="",mFe={tagName:"l-search-topics",name:"LSearchTopics",components:{TopicItemGroup:PRe,RecentTermSearched:YRe,SearchTopicsHeader:XRe,[WC.name]:WC},props:{multipleTargets:{type:Boolean,default:!0},canSendForAll:{type:Boolean,default:!1},searchTopics:{type:Function},populateTopic:{type:Function},alreadySelectedTopics:{type:Array},recentTopicsSearched:{type:Object},selectedTopicKind:{type:String,default:"user"}},data:function(){return{forAllTagChecked:!1,showSelected:!1,selectedTopics:[],includesMap:{},querySearchTopics:{q:null,kind:"*",page:0},searchedTopics:{tag:{hits:[],total:0},group:{hits:[],total:0},member:{hits:[],total:0},user:{hits:[],total:0}},total:0,kinds:["*","tag","group","member","user"],kindsIcons:{tag:"uil-tag-alt",group:"uil-users-alt",member:"uil-graduation-cap",user:"uil-user","*":""},typing:!1,loading:!1,loadingMore:!1}},watch:{selectedTopics(e){(!e||e.length===0)&&(this.showSelected=!1)},querySearchTopics(){!this.typing&&!this.loadingMore&&(this.typing=!0),this.searchDebounced()}},computed:{canShowSendForAll(){return this.canSendForAll&&!this.hasQuery&&this.multipleTargets},searchingSpan(){var e;return this.querySearchTopics.q?this.querySearchTopics.q:this.querySearchTopics.kind==="*"?"":(e=this.getKindNamePlural(this.querySearchTopics.kind))==null?void 0:e.toLowerCase()},hasQuery(){return this.querySearchTopics.q||this.querySearchTopics.kind!=="*"},showRecentSearchedTopics(){return this.recentTopicsSearched.data?this.recentTopicsSearched.data.length>0&&!this.hasQuery:!1},filteredSearchedTopics(){return{...this.searchedTopics,tag:{hits:this.searchedTopics.tag.hits.filter(e=>e.id!=="*"),total:this.searchedTopics.tag.total}}},forAllTag:{get(){return this.forAllTagChecked},set(e){const n=this.searchedTopics.tag.hits;if(this.selectedTopics&&this.selectedTopics.length&&this.selectedTopics.find(o=>o.id!=="*")&&e!=="confirm"){this.showForAllTagAlert().then(o=>{if(!o){this.forAllTagChecked=!1;return}const r=n.find(a=>a.id==="*");this.setSelectedTopics([r]),this.forAllTagChecked=!0});return}if(e=!!e,e&&this.searchedTopics&&n){const o=n.find(r=>r.id==="*");this.setSelectedTopics([o])}else this.setSelectedTopics([]);this.forAllTagChecked=e}},recentTopicsFiltered(){return Lc(this.recentTopicsSearched.data).reverse().slice(0,3)},topicsSummary(){if(!this.selectedTopics||!this.selectedTopics.length)return"";if(this.forAllTagChecked)return"Enviando para todos";const e=[];return this.kinds.filter(n=>n!=="*").forEach(n=>{var r,a;const o=JB(this.selectedTopics,{kind:n}).length;o===1?e.push(`1 ${(r=this.getKindName(n))==null?void 0:r.toLowerCase()}`):o>1&&e.push(`${o} ${(a=this.getKindNamePlural(n))==null?void 0:a.toLowerCase()}`)}),e.length?e.join(", "):null},hasAnySearchedTopic(){return this.total?this.total>0:null},headerKinds(){return this.kinds.filter(e=>e!=="tag"||this.canSendForAll).map(e=>({value:e,name:this.getKindNamePlural(e),icon:this.kindsIcons[e]}))},resultKinds(){return this.kinds.filter(n=>n!=="*").filter(n=>this.filteredSearchedTopics[n].total&&this.filteredSearchedTopics[n].hits.length)},totalLabel(){return this.total===1?"1 resultado encontrado":this.total+" resultados encontrados"},isAllEntities(){return this.querySearchTopics.kind==="*"}},async created(){this.loading=!0;try{const e=await this.searchTopics(this.querySearchTopics);this.searchedTopics=e.result,this.total=e.total}catch{this.$notify({...M1.errorHandler("Erro ao carregar o público alvo."),duration:1e4,position:"bottom",showClose:!0})}finally{this.loading=!1}this.selectedTopics=this.alreadySelectedTopics,this.selectedTopics&&this.selectedTopics.length&&this.selectedTopics.find(e=>e.id==="*"&&e.kind==="tag")&&this.multipleTargets&&(this.forAllTag=!0)},unmounted(){this.setSelectedTopics([])},methods:{searchDebounced:vOe(async function(){console.log(this.querySearchTopics),er(this.querySearchTopics,"q.length",null)>3&&this.recentTopicsSearched.push(this.querySearchTopics.q),await this.getSearchedTopics(this.querySearchTopics),this.typing=!1},500,{leading:!1,trailing:!0}),useRecentTermSearched(e){this.setQuerySearchTopics({q:e,kind:"*"})},updateIncludesMap({topic:e,includes:n}){this.includesMap[e.id]=n},hasChildChecked(e){const n=this.includesMap[e.id];return n?n.some(this.isChecked)||n.some(this.hasChildChecked):!1},getKindName(e,n="pt-br"){return{"pt-br":{"*":"Procurar em tudo",tag:"Marcador",group:"Turma",member:"Aluno",user:"Usuário"},"en-us":{"*":"Search all",tag:"Tag",group:"Group",member:"Member",user:"User"}}[n][e]},getKindNamePlural(e,n="pt-br"){return{"pt-br":{"*":"Procurar em tudo",tag:"Marcadores",group:"Turmas",member:"Alunos",user:"Usuários"},"en-us":{"*":"Search all",tag:"Tags",group:"Groups",member:"Members",user:"Users"}}[n][e]},async getSearchedTopics(e){this.loadingMore||(this.loading=!0);try{const n=await this.searchTopics(e);if(e.page>0){const o=Lc(this.searchedTopics);await Promise.all(o8e(n.result).map(r=>{o[r]||(o[r]={hits:[],total:null}),o[r].hits=[...o[r].hits,...n.result[r].hits]})),this.searchedTopics=o}else this.searchedTopics=n.result,this.total=n.total}catch{this.$notify({...M1.errorHandler("Erro ao buscar o público desejado."),duration:1e4,position:"bottom",showClose:!0})}finally{this.loading=!1,this.loadingMore=!1}},loadMore(){this.loadingMore=!0;const e=er(this.querySearchTopics,"page",0)+1,n=er(this.querySearchTopics,"q",null),o=er(this.querySearchTopics,"kind",null);this.setQuerySearchTopics({q:n,kind:o,page:e})},getTopicHits(e){return er(this.filteredSearchedTopics,`${e}.hits`,[])},getTopicTotal(e){return er(this.filteredSearchedTopics,`${e}.total`,[])},needShowMore(e){return this.getTopicTotal(e)>this.getTopicHits(e).length},isChecked(e){return this.forAllTagChecked?!0:this.selectedTopics.filter(n=>n.kind===e.kind&&n.id===e.id).length!==0},filterForKind(e){this.setQuerySearchTopics({q:this.querySearchTopics.q,kind:e,page:0})},setSelectedTopics(e){this.selectedTopics=e},removeFromRecentTopicsSearched(e){this.recentTopicsSearched.remove(e)},setQuerySearchTopics(e){this.querySearchTopics=e},async showForAllTagAlert(){const e=await fFe({title:"Você já selecionou alguns destinatários e eles serão substituídos pela tag todos.",buttonCloseLabel:"Cancelar",buttonConfirmLabel:"Continuar"});if(e)return e},addTopic(e){if(this.selectedTopics.filter(o=>o.id===e.id&&o.kind===e.kind).length===0){const o=Lc(this.selectedTopics);o.push(e),this.setSelectedTopics(o)}},removeTopic(e){const n=this.selectedTopics.findIndex(r=>r.id===e.id&&r.kind===e.kind);if(n==-1)return;const o=Lc(this.selectedTopics);o.splice(n,1),this.setSelectedTopics(o)},updateSelectedTopics({topic:e,value:n}){if(!this.multipleTargets)return n?this.setSelectedTopics([e]):this.setSelectedTopics([]);if(!n){this.removeTopic(e);return}this.addTopic(e)},onSave(){const e=this.selectedTopics.map(n=>({hash:n.hash,name:n.name,kind:n.kind,id:n.id}));this.$emit("answer",e)},async onClose(){const e=Lc(this.alreadySelectedTopics).map(a=>a.kind+a.id),n=Lc(this.selectedTopics).map(a=>a.kind+a.id);if($ze(n,e).length===0){this.$emit("close");return}await pFe()&&this.$emit("close")},onInput(e){this.querySearchTopics=e}}},gFe={class:"search-topics-page l-col l-d-flex column"},yFe={class:"px-0 py-2 l-container scroll-y l-flex-grow-1"},bFe={key:0,class:"gray-70--text searching-label mx-3"},MFe={key:1,class:"mb-5"},wFe={key:0,class:"recent-search mb-3 mx-3"},CFe={key:1,class:"topic-item-tag-for-all mx-3"},_Fe={key:2,class:"results-total mb-2 px-3"},NFe={key:0,class:"topic-kind-title gray-70--text mb-2 px-3"},kFe={key:1,class:"m-3"},EFe={key:2,class:"m-3"},xFe={key:2,style:{display:"flex","flex-direction":"column",height:"100%","align-items":"stretch"}},TFe={key:0,class:"topic-item-tag-for-all empty-tags-groups-for-all mx-3"},SFe={key:1,class:"empty-tags-groups-placeholder"},DFe={key:2,class:"not-found-result mx-3"},vFe={key:0,class:"selected-topics"},IFe={class:"ml-2 topics-selected-summary l-flex link--text"},AFe={class:"l-d-flex m-3 l-align-items-center"},OFe={class:"mx-3 mb-3"};function zFe(e,n,o,r,a,l){const i=t.resolveComponent("SearchTopicsHeader"),s=t.resolveComponent("RecentTermSearched"),c=t.resolveComponent("l-checkbox"),d=t.resolveComponent("TopicItemGroup"),u=t.resolveComponent("l-button"),f=t.resolveComponent("l-target-chip"),p=t.resolveComponent("van-action-sheet");return t.openBlock(),t.createElementBlock("div",gFe,[t.createVNode(i,{class:"drawer-search-topics-header",kinds:l.headerKinds,query:e.querySearchTopics,typing:e.typing,loading:e.loading,hasAnySelectedTopic:e.selectedTopics.length>0,onSave:l.onSave,onClose:l.onClose,"onUpdate:query":l.onInput},null,8,["kinds","query","typing","loading","hasAnySelectedTopic","onSave","onClose","onUpdate:query"]),t.createElementVNode("div",yFe,[e.loading||e.typing?(t.openBlock(),t.createElementBlock("div",bFe," Procurando "+t.toDisplayString(l.searchingSpan)+"... ",1)):l.hasAnySearchedTopic?(t.openBlock(),t.createElementBlock("div",MFe,[l.showRecentSearchedTopics?(t.openBlock(),t.createElementBlock("div",wFe,[n[7]||(n[7]=t.createElementVNode("div",{class:"recent-search-title gray-70--text mb-2 l-text-regular"}," Buscas recentes ",-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.recentTopicsFiltered,(m,g)=>(t.openBlock(),t.createBlock(s,{onClick:y=>l.useRecentTermSearched(m),term:m,key:g,class:"mb-2 cursor-pointer",onRemove:y=>l.removeFromRecentTopicsSearched(m)},null,8,["onClick","term","onRemove"]))),128))])):t.createCommentVNode("",!0),l.canShowSendForAll?(t.openBlock(),t.createElementBlock("div",CFe,[n[8]||(n[8]=t.createElementVNode("div",{class:"l-flex lead-light--text l-text-regular"}," Enviar para todos ",-1)),t.createVNode(c,{modelValue:l.forAllTag,"onUpdate:modelValue":n[0]||(n[0]=m=>l.forAllTag=m)},null,8,["modelValue"])])):t.createCommentVNode("",!0),e.total>=1&&l.hasQuery?(t.openBlock(),t.createElementBlock("div",_Fe,t.toDisplayString(l.totalLabel),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.resultKinds,m=>(t.openBlock(),t.createElementBlock("div",{class:"topics-searched mb-3",key:m},[l.isAllEntities?(t.openBlock(),t.createElementBlock("h6",NFe,t.toDisplayString(l.getKindNamePlural(m))+" ("+t.toDisplayString(l.getTopicTotal(m))+") ",1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.getTopicHits(m),g=>(t.openBlock(),t.createBlock(d,{onInput:n[1]||(n[1]=y=>l.updateSelectedTopics(y)),onIncludes:l.updateIncludesMap,propagateIncludes:l.updateIncludesMap,propagate:l.updateSelectedTopics,hasChildChecked:l.hasChildChecked,topic:g,selectedTopicKind:o.selectedTopicKind,parentTopic:g,populateTopic:o.populateTopic,disabled:e.forAllTagChecked,checked:l.isChecked(g),isCheckedFunction:l.isChecked,multipleTargets:o.multipleTargets,key:g.id},null,8,["onIncludes","propagateIncludes","propagate","hasChildChecked","topic","selectedTopicKind","parentTopic","populateTopic","disabled","checked","isCheckedFunction","multipleTargets"]))),128)),l.isAllEntities&&l.needShowMore(m)?(t.openBlock(),t.createElementBlock("div",kFe,[t.createVNode(u,{loading:e.loading,onClick:g=>l.filterForKind(m),plain:"",fill:""},{default:t.withCtx(()=>{var g;return[t.createTextVNode(" Mostrar mais "+t.toDisplayString((g=l.getKindNamePlural(m))==null?void 0:g.toLowerCase()),1)]}),_:2},1032,["loading","onClick"])])):t.createCommentVNode("",!0),!l.isAllEntities&&l.needShowMore(m)?(t.openBlock(),t.createElementBlock("div",EFe,[t.createVNode(u,{class:"ma-3",loading:e.loadingMore,onClick:n[2]||(n[2]=g=>l.loadMore()),plain:"",fill:""},{default:t.withCtx(()=>n[9]||(n[9]=[t.createTextVNode(" Carregar mais ")])),_:1},8,["loading"])])):t.createCommentVNode("",!0)]))),128))])):(t.openBlock(),t.createElementBlock("div",xFe,[o.canSendForAll&&!this.hasQuery?(t.openBlock(),t.createElementBlock("div",TFe,[n[10]||(n[10]=t.createElementVNode("div",{class:"l-flex lead-light--text l-text-regular"}," Enviar para todos ",-1)),t.createVNode(c,{modelValue:l.forAllTag,"onUpdate:modelValue":n[3]||(n[3]=m=>l.forAllTag=m)},null,8,["modelValue"])])):t.createCommentVNode("",!0),e.querySearchTopics.q?!e.typing&&!e.loading?(t.openBlock(),t.createElementBlock("div",DFe,n[12]||(n[12]=[t.createElementVNode("h4",{class:"bold lead--text m-0"},"Não encontramos resultados",-1),t.createElementVNode("p",{class:"lead-light--text l-text-regular mt-3 mb-0"}," Tenha certeza que você está digitando uma palavra-chave correta ",-1)]))):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",SFe,n[11]||(n[11]=[t.createElementVNode("img",{alt:"Search Topics",src:hFe},null,-1),t.createElementVNode("div",{class:"empty-tags-groups-placeholder-text mt-2"},[t.createElementVNode("h3",null,"Busque por marcadores, turmas, alunos e usuários"),t.createElementVNode("span",{class:"text-small lead-light--text"}," Quando você tiver marcadores e turmas, eles aparecerão aqui. ")],-1)])))]))]),e.selectedTopics&&e.selectedTopics.length?(t.openBlock(),t.createElementBlock("div",vFe,[t.createElementVNode("button",{class:"selected-topics-button l-d-flex l-align-items-center",style:{padding:"0"},onClick:n[4]||(n[4]=m=>e.forAllTagChecked?l.forAllTag=!1:e.showSelected=!0)},[n[13]||(n[13]=t.createElementVNode("div",{class:"selected-topics-button-bg"},null,-1)),t.createElementVNode("div",IFe,t.toDisplayString(l.topicsSummary),1),t.createVNode(u,{class:"mr-2 bold link--text",type:"text"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.forAllTagChecked?"Limpar":"ver tudo"),1)]),_:1})]),t.createVNode(p,{show:e.showSelected,"onUpdate:show":n[6]||(n[6]=m=>e.showSelected=m),"lock-scroll":"",style:{"max-height":"500px","min-height":"180px"}},{default:t.withCtx(()=>[t.createElementVNode("div",AFe,[n[14]||(n[14]=t.createElementVNode("div",{class:"l-flex lead-light--text l-text-regular"}," Destinatários selecionados ",-1)),t.createVNode(u,{onClick:n[5]||(n[5]=m=>e.showSelected=!1),circle:"",icon:"uil-multiply",class:"border-none gray-70--text f-24 p-1"})]),t.createElementVNode("div",OFe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.selectedTopics,m=>(t.openBlock(),t.createBlock(f,{onRemove:g=>l.removeTopic(m),key:m.id,kind:m.kind,name:m.name,closeable:!0,class:"mr-2 mb-2"},null,8,["onRemove","kind","name"]))),128))])]),_:1},8,["show"])])):t.createCommentVNode("",!0)])}const BFe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(mFe,[["render",zFe],["__scopeId","data-v-27e3684d"]])},Symbol.toStringTag,{value:"Module"})),Idt="",LFe={name:"LSwitch",components:{ElSwitch:JM},props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],methods:{onUpdateModelValue(e){this.$emit("update:modelValue",e)}}};function VFe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("el-switch");return t.openBlock(),t.createBlock(s,t.mergeProps(e.$attrs,{"model-value":o.modelValue,"onUpdate:modelValue":l.onUpdateModelValue,class:"l-switch"}),{"active-action":t.withCtx(()=>[t.createVNode(i,null,{default:t.withCtx(()=>n[0]||(n[0]=[t.createTextVNode("uil-check")])),_:1})]),"inactive-action":t.withCtx(()=>[t.createVNode(i,null,{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-times")])),_:1})]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16,["model-value","onUpdate:modelValue"])}const $Fe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(LFe,[["render",VFe],["__scopeId","data-v-e8ddf878"]])},Symbol.toStringTag,{value:"Module"}));/*!
112
112
  * mustache.js - Logic-less {{mustache}} templates with JavaScript
113
113
  * http://github.com/janl/mustache.js
114
114
  */var jFe=Object.prototype.toString,Uu=Array.isArray||function(n){return jFe.call(n)==="[object Array]"};function L_(e){return typeof e=="function"}function PFe(e){return Uu(e)?"array":typeof e}function V_(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function t$(e,n){return e!=null&&typeof e=="object"&&n in e}function RFe(e,n){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(n)}var FFe=RegExp.prototype.test;function HFe(e,n){return FFe.call(e,n)}var UFe=/\S/;function YFe(e){return!HFe(UFe,e)}var WFe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function QFe(e){return String(e).replace(/[&<>"'`=\/]/g,function(o){return WFe[o]})}var KFe=/\s*/,qFe=/\s+/,n$=/\s*=/,GFe=/\s*\}/,XFe=/#|\^|\/|>|\{|&|=|!/;function ZFe(e,n){if(!e)return[];var o=!1,r=[],a=[],l=[],i=!1,s=!1,c="",d=0;function u(){if(i&&!s)for(;l.length;)delete a[l.pop()];else l=[];i=!1,s=!1}var f,p,m;function g(S){if(typeof S=="string"&&(S=S.split(qFe,2)),!Uu(S)||S.length!==2)throw new Error("Invalid tags: "+S);f=new RegExp(V_(S[0])+"\\s*"),p=new RegExp("\\s*"+V_(S[1])),m=new RegExp("\\s*"+V_("}"+S[1]))}g(n||ua.tags);for(var y=new dh(e),b,w,N,_,C,k;!y.eos();){if(b=y.pos,N=y.scanUntil(f),N)for(var E=0,T=N.length;E<T;++E)_=N.charAt(E),YFe(_)?(l.push(a.length),c+=_):(s=!0,o=!0,c+=" "),a.push(["text",_,b,b+1]),b+=1,_===`
115
115
  `&&(u(),c="",d=0,o=!1);if(!y.scan(f))break;if(i=!0,w=y.scan(XFe)||"name",y.scan(KFe),w==="="?(N=y.scanUntil(n$),y.scan(n$),y.scanUntil(p)):w==="{"?(N=y.scanUntil(m),y.scan(GFe),y.scanUntil(p),w="&"):N=y.scanUntil(p),!y.scan(p))throw new Error("Unclosed tag at "+y.pos);if(w==">"?C=[w,N,b,y.pos,c,d,o]:C=[w,N,b,y.pos],d++,a.push(C),w==="#"||w==="^")r.push(C);else if(w==="/"){if(k=r.pop(),!k)throw new Error('Unopened section "'+N+'" at '+b);if(k[1]!==N)throw new Error('Unclosed section "'+k[1]+'" at '+b)}else w==="name"||w==="{"||w==="&"?s=!0:w==="="&&g(N)}if(u(),k=r.pop(),k)throw new Error('Unclosed section "'+k[1]+'" at '+y.pos);return eHe(JFe(a))}function JFe(e){for(var n=[],o,r,a=0,l=e.length;a<l;++a)o=e[a],o&&(o[0]==="text"&&r&&r[0]==="text"?(r[1]+=o[1],r[3]=o[3]):(n.push(o),r=o));return n}function eHe(e){for(var n=[],o=n,r=[],a,l,i=0,s=e.length;i<s;++i)switch(a=e[i],a[0]){case"#":case"^":o.push(a),r.push(a),o=a[4]=[];break;case"/":l=r.pop(),l[5]=a[2],o=r.length>0?r[r.length-1][4]:n;break;default:o.push(a)}return n}function dh(e){this.string=e,this.tail=e,this.pos=0}dh.prototype.eos=function(){return this.tail===""},dh.prototype.scan=function(n){var o=this.tail.match(n);if(!o||o.index!==0)return"";var r=o[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r},dh.prototype.scanUntil=function(n){var o=this.tail.search(n),r;switch(o){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,o),this.tail=this.tail.substring(o)}return this.pos+=r.length,r};function Yu(e,n){this.view=e,this.cache={".":this.view},this.parent=n}Yu.prototype.push=function(n){return new Yu(n,this)},Yu.prototype.lookup=function(n){var o=this.cache,r;if(o.hasOwnProperty(n))r=o[n];else{for(var a=this,l,i,s,c=!1;a;){if(n.indexOf(".")>0)for(l=a.view,i=n.split("."),s=0;l!=null&&s<i.length;)s===i.length-1&&(c=t$(l,i[s])||RFe(l,i[s])),l=l[i[s++]];else l=a.view[n],c=t$(a.view,n);if(c){r=l;break}a=a.parent}o[n]=r}return L_(r)&&(r=r.call(this.view)),r};function or(){this.templateCache={_cache:{},set:function(n,o){this._cache[n]=o},get:function(n){return this._cache[n]},clear:function(){this._cache={}}}}or.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()},or.prototype.parse=function(n,o){var r=this.templateCache,a=n+":"+(o||ua.tags).join(":"),l=typeof r<"u",i=l?r.get(a):void 0;return i==null&&(i=ZFe(n,o),l&&r.set(a,i)),i},or.prototype.render=function(n,o,r,a){var l=this.getConfigTags(a),i=this.parse(n,l),s=o instanceof Yu?o:new Yu(o,void 0);return this.renderTokens(i,s,r,n,a)},or.prototype.renderTokens=function(n,o,r,a,l){for(var i="",s,c,d,u=0,f=n.length;u<f;++u)d=void 0,s=n[u],c=s[0],c==="#"?d=this.renderSection(s,o,r,a,l):c==="^"?d=this.renderInverted(s,o,r,a,l):c===">"?d=this.renderPartial(s,o,r,l):c==="&"?d=this.unescapedValue(s,o):c==="name"?d=this.escapedValue(s,o,l):c==="text"&&(d=this.rawValue(s)),d!==void 0&&(i+=d);return i},or.prototype.renderSection=function(n,o,r,a,l){var i=this,s="",c=o.lookup(n[1]);function d(p){return i.render(p,o,r,l)}if(c){if(Uu(c))for(var u=0,f=c.length;u<f;++u)s+=this.renderTokens(n[4],o.push(c[u]),r,a,l);else if(typeof c=="object"||typeof c=="string"||typeof c=="number")s+=this.renderTokens(n[4],o.push(c),r,a,l);else if(L_(c)){if(typeof a!="string")throw new Error("Cannot use higher-order sections without the original template");c=c.call(o.view,a.slice(n[3],n[5]),d),c!=null&&(s+=c)}else s+=this.renderTokens(n[4],o,r,a,l);return s}},or.prototype.renderInverted=function(n,o,r,a,l){var i=o.lookup(n[1]);if(!i||Uu(i)&&i.length===0)return this.renderTokens(n[4],o,r,a,l)},or.prototype.indentPartial=function(n,o,r){for(var a=o.replace(/[^ \t]/g,""),l=n.split(`
116
116
  `),i=0;i<l.length;i++)l[i].length&&(i>0||!r)&&(l[i]=a+l[i]);return l.join(`
117
- `)},or.prototype.renderPartial=function(n,o,r,a){if(r){var l=this.getConfigTags(a),i=L_(r)?r(n[1]):r[n[1]];if(i!=null){var s=n[6],c=n[5],d=n[4],u=i;c==0&&d&&(u=this.indentPartial(i,d,s));var f=this.parse(u,l);return this.renderTokens(f,o,r,u,a)}}},or.prototype.unescapedValue=function(n,o){var r=o.lookup(n[1]);if(r!=null)return r},or.prototype.escapedValue=function(n,o,r){var a=this.getConfigEscape(r)||ua.escape,l=o.lookup(n[1]);if(l!=null)return typeof l=="number"&&a===ua.escape?String(l):a(l)},or.prototype.rawValue=function(n){return n[1]},or.prototype.getConfigTags=function(n){return Uu(n)?n:n&&typeof n=="object"?n.tags:void 0},or.prototype.getConfigEscape=function(n){if(n&&typeof n=="object"&&!Uu(n))return n.escape};var ua={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){uh.templateCache=e},get templateCache(){return uh.templateCache}},uh=new or;ua.clearCache=function(){return uh.clearCache()},ua.parse=function(n,o){return uh.parse(n,o)},ua.render=function(n,o,r,a){if(typeof n!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+PFe(n)+'" was given as the first argument for mustache#render(template, view, partials)');return uh.render(n,o,r,a)},ua.escape=QFe,ua.Scanner=dh,ua.Context=Yu,ua.Writer=or;const tHe={props:["value","schema","entity"],methods:{hasRouterLink(){return er(this.schema,"options.routerLink")},getRouterLink(){const e=er(this.schema,"options.routerLink");return ua.render(e,this.entity)}}},nHe={key:1};function oHe(e,n,o,r,a,l){const i=t.resolveComponent("router-link");return e.$options.methods.hasRouterLink(e.props)?(t.openBlock(),t.createBlock(i,{key:0,to:e.$options.methods.getRouterLink(e.props)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.value),1)]),_:1},8,["to"])):(t.openBlock(),t.createElementBlock("span",nHe,t.toDisplayString(o.value),1))}const rHe=lt(tHe,[["render",oHe]]),aHe={props:["value","schema"],methods:{formatValue(e){return e}}};function lHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value)),1)}const iHe=lt(aHe,[["render",lHe]]),sHe={props:["value","schema"],methods:{formatValue(e){return isNaN(e)||e===null||e===void 0?"-":Number(e/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}}};function cHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value)),1)}const dHe=lt(sHe,[["render",cHe]]),uHe={props:["value","schema"]},fHe=["href"];function pHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("a",{target:"_blank",href:`mailto:${o.value}`},t.toDisplayString(o.value),9,fHe)}const hHe=lt(uHe,[["render",pHe]]),mHe={props:["value","schema"],methods:{formatValue(e,n){if(!e)return"-";const o=er(n,"options.format","dd/MM/yyyy hh:mm:ss");return Ge(e).format(o)}}};function gHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value,o.schema)),1)}const yHe=lt(mHe,[["render",gHe]]),o$={};o$.register=function(){hr.register({type:"String"},"default",rHe),hr.register({type:"Date"},"default",yHe),hr.register({type:"Number"},"default",iHe),hr.register({format:"Amount"},"default",dHe),hr.register({format:"Email"},"default",hHe)};const Odt="",bHe={props:{perPage:Number,pagesCount:Number,totalCount:Number,columnSpecs:{type:Array},includedIds:{type:Array},excludedIds:{type:Array},selectable:Boolean,clickable:Boolean,multiselect:Boolean,page:Object},data(e){return{checked:this.computeChecked(e)}},emits:["selected","click-item"],computed:{includedAll(){return this.includedIds.toString()==="*"},estimatedRows(){return this.page&&this.pagesCount>1&&this.page.index>=this.pagesCount-1?this.totalCount%this.perPage:this.perPage}},methods:{getColumnComponent(e){return e.component},getColumnValue(e,n){return er(e,n.path)},computeChecked(e){const n=e||this;if(!n.page||!n.page.data)return[];let o=n.includedIds,r=n.excludedIds,a=n.includedAll;return n.page.data.map(l=>a&&!r.includes(l.id)||o.includes(l.id))}},watch:{includedAll(){this.checked=this.computeChecked(this)},includedIds(){this.checked=this.computeChecked(this)},excludedIds(){this.checked=this.computeChecked(this)}}},MHe={class:"l-table-tbody"},wHe={key:"selector",class:"l-table-cell l-table-column-selector"},CHe=["onClick"],_He={key:"selector",class:"l-table-cell l-table-column-selector"},NHe={key:"selector",class:"l-table-cell l-table-column-selector"};function kHe(e,n,o,r,a,l){const i=t.resolveComponent("l-checkbox");return t.openBlock(),t.createElementBlock("tbody",MHe,[o.page&&o.page.loaded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.page.data,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c,class:t.normalizeClass({"l-table-selected":a.checked[c]})},[o.selectable?(t.openBlock(),t.createElementBlock("td",wHe,[t.createVNode(i,{modelValue:a.checked[c],"onUpdate:modelValue":d=>a.checked[c]=d,class:"l-table-selector",type:o.multiselect?"checkbox":"radio",onChange:()=>e.$emit("selected",{key:s.id,selected:e.$event})},null,8,["modelValue","onUpdate:modelValue","type","onChange"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}${o.clickable?" cursor-pointer":""}`]),onClick:f=>e.$emit("click-item",s)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.getColumnComponent(d)),{value:l.getColumnValue(s,d),schema:d,entity:s},null,8,["value","schema","entity"]))],10,CHe))),128))],2))),128)):o.page&&o.page.loading?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(l.estimatedRows,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[o.selectable?(t.openBlock(),t.createElementBlock("td",_He,[t.createVNode(i,{disabled:"",class:"l-table-selector",type:o.multiselect?"checkbox":"radio",value:l.includedAll},null,8,["type","value"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}`])},n[0]||(n[0]=[t.createElementVNode("span",{class:"l-table-skeleton"},null,-1)]),2))),128))]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(l.estimatedRows,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[o.selectable?(t.openBlock(),t.createElementBlock("td",NHe,[t.createVNode(i,{disabled:"",class:"l-table-selector",type:o.multiselect?"checkbox":"radio",checked:l.includedAll},null,8,["type","checked"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}`])},n[1]||(n[1]=[t.createElementVNode("span",{class:"l-table-skeleton error"},null,-1)]),2))),128))]))),128))])}const EHe=lt(bHe,[["render",kHe]]),zdt="",xHe={props:{title:String,maxWidth:{type:Number,default:null},minWidth:{type:Number,default:50}},data(){return{dragging:!1,deltaX:0}},computed:{handleStyle(){return this.dragging?{transform:`translateX(${this.deltaX}px)`}:null}},methods:{currentWidth(){return this.$el.parentElement.getBoundingClientRect().width},limitDeltaX(e){let n=this.currentWidth();return this.limitWidth(n+e)-n},limitWidth(e){return e?this.maxWidth&&this.maxWidth<e?this.maxWidth:this.minWidth&&this.minWidth>e?this.minWidth:e:null},resize(e){this.$emit("resize",this.limitWidth(e))},drag(e){this.dragging||this.unregisterDocumentHandlers();let n=e.clientX-this.dragStartClientX;this.deltaX=this.limitDeltaX(n),console.log("drag",this.deltaX)},dragStart(e){this.registerDocumentHandlers(),this.deltaX=0,this.dragging=!0,this.dragStartClientX=e.clientX,console.log("dragStart",e)},dragEnd(e){if(this.deltaX){let n=this.currentWidth()+this.deltaX;this.resize(n)}this.unregisterDocumentHandlers(),this.deltaX=0,this.dragging=!1,this.dragStartClientX=0,console.log("dragEnd",e)},registerDocumentHandlers(){this.unregisterDocumentHandlers(),this._documentMouseMove=e=>this.drag(e),this._documentMouseUp=e=>this.dragEnd(e),document.body.style.cursor="col-resize",document.addEventListener("mousemove",this._documentMouseMove),document.addEventListener("mouseup",this._documentMouseUp),document.onselectstart=()=>!1,document.ondragstart=()=>!1},unregisterDocumentHandlers(){document.removeEventListener("mousemove",this._documentMouseMove),document.removeEventListener("mouseup",this._documentMouseUp),document.body.style.cursor="",document.onselectstart=null,document.ondragstart=null}}};function THe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["mt-handle",a.dragging?"dragging":""]),style:t.normalizeStyle(l.handleStyle),onDblclick:n[0]||(n[0]=i=>l.resize(null)),onMousedown:n[1]||(n[1]=(...i)=>l.dragStart&&l.dragStart(...i))},null,38)}const SHe=lt(xHe,[["render",THe]]),Bdt="",DHe={components:{LTableHeaderResizer:SHe},props:{spec:{type:Object}},emits:["spec:update"],data:e=>({localSpec:e.spec}),computed:{resizable(){return this.localSpec.field&&this.localSpec.field.resizable},reordable(){return!0},icon(){return this.$L.Icons.get(this.localSpec.field)}},methods:{resizeColumn(e,n){e.width=n},toggleSorting(e){let n=this.localSpec.column.sortDirection,o="asc";n?n.toLowerCase()==="asc"&&(o="desc"):o="asc",this.$emit("sort",{direction:o,cumulative:e})}},watch:{localSpec:{handler(e){this.$emit("spec:update",e)},deep:!0}}},vHe={key:1,class:"l-table-header-cell-content"};function IHe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-tooltip"),c=t.resolveComponent("LTableHeaderResizer");return t.openBlock(),t.createElementBlock("th",{class:"l-table-header-cell l-table-cell",style:t.normalizeStyle({"--l-table-col-width":o.spec.column.width?`${o.spec.column.width}px`:"auto"})},[o.spec.sortable?(t.openBlock(),t.createElementBlock("a",{key:0,href:"#",class:t.normalizeClass(["l-table-header-cell-content",[o.spec.column.sortDirection?"active":null,`l-table-header-align-${o.spec.align}`]]),onClick:n[0]||(n[0]=t.withModifiers(d=>l.toggleSorting(),["prevent"]))},[t.createVNode(s,{key:"tooltip",disabled:!o.spec.description,content:o.spec.description,placement:"top","open-delay":600,offset:0},{default:t.withCtx(()=>[t.createElementVNode("span",null,[l.icon?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-header-icon"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createTextVNode("   "+t.toDisplayString(o.spec.title),1)])]),_:1},8,["disabled","content"]),t.createElementVNode("i",{class:t.normalizeClass(["l-table-sorter-icon uil uil-arrow-down",`l-table-sorter-${o.spec.column.sortDirection||"default"}`])},null,2)],2)):(t.openBlock(),t.createElementBlock("span",vHe,[t.createVNode(s,{disabled:!o.spec.description,content:o.spec.description,placement:"top","open-delay":600,offset:0},{default:t.withCtx(()=>[t.createElementVNode("span",null,[l.icon?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-header-icon"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createTextVNode("   "+t.toDisplayString(o.spec.title),1)])]),_:1},8,["disabled","content"])])),n[2]||(n[2]=t.createElementVNode("span",{style:{width:"12px"}},null,-1)),l.resizable?(t.openBlock(),t.createBlock(c,{key:2,onResize:n[1]||(n[1]=d=>l.resizeColumn(o.spec.column,d))})):t.createCommentVNode("",!0)],4)}const AHe=lt(DHe,[["render",IHe]]),Ldt="",OHe={props:["loading"]};function zHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-header-loader",{loading:o.loading}])},null,2)}const BHe=lt(OHe,[["render",zHe]]),Vdt="",LHe={components:{LTableHeaderCell:AHe,LTableHeaderLoader:BHe},props:{columnSpecs:{type:Array},loading:{type:Boolean,default:!1},includedIds:{type:Array},excludedIds:{type:Array},total:{type:Number},selectable:{type:Boolean},multiselect:{type:Boolean}},data:e=>({localColumnSpecs:e.columnSpecs}),emits:["columnSpecs:update","selected"],computed:{selectedEverything(){let e=this.includedIds.length===this.total&&this.total>0,n=this.includedIds.toString()==="*"&&this.excludedIds.length==0;return e||n},selectedNothing(){return this.includedIds.length===0},selectedSomethings(){return!this.selectedNothing&&!this.selectedEverything}},methods:{changeSpecSort(e,{direction:n,cumulative:o}){if(o){let a=this.localColumnSpecs.reduce((l,i)=>Math.max(l,i.column.sortOrder),0)+1;e.column.sortOrder=a,e.column.sortDirection=n}else{for(let r of this.localColumnSpecs)r.column.sortOrder=null,r.column.sortDirection=null;e.column.sortOrder=1,e.column.sortDirection=n}},syncSpec(e){let n=this.localColumnSpecs.findIndex(o=>o.field===e.field);this.localColumnSpecs.splice(n,1,e)},changeSelection(e){this.$emit("selected",{key:"*",selected:e})}},watch:{localColumnSpecs:{handler(e){this.$emit("columnSpecs:update",e)},deep:!0}}},VHe={class:"l-table-header"},$He={key:0,scope:"col",class:"l-table-header-cell l-table-cell l-table-column-selector"},jHe={class:"l-table-header-extras"},PHe={colspan:"999"};function RHe(e,n,o,r,a,l){const i=t.resolveComponent("l-checkbox"),s=t.resolveComponent("LTableHeaderCell"),c=t.resolveComponent("LTableHeaderLoader");return t.openBlock(),t.createElementBlock("thead",VHe,[t.createElementVNode("tr",null,[o.selectable?(t.openBlock(),t.createElementBlock("th",$He,[o.multiselect?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-selector",type:"checkbox",value:l.selectedEverything,indeterminate:l.selectedSomethings,onChange:n[0]||(n[0]=d=>l.changeSelection(d))},null,8,["value","indeterminate"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createBlock(s,{key:u,spec:d,"onSpec:update":l.syncSpec,onSort:f=>l.changeSpecSort(d,f),ref_for:!0,ref:"headers"},null,8,["spec","onSpec:update","onSort"]))),128))]),t.createElementVNode("tr",jHe,[t.createElementVNode("td",PHe,[t.createVNode(c,{loading:o.loading},null,8,["loading"]),n[1]||(n[1]=t.createElementVNode("div",{class:"l-table-header-shadow-top"},null,-1))])])])}const FHe=lt(LHe,[["render",RHe]]),$dt="",HHe={},UHe={class:"l-table-endspace"};function YHe(e,n){return t.openBlock(),t.createElementBlock("div",UHe)}const WHe=lt(HHe,[["render",YHe]]),jdt="",QHe={props:{loading:Boolean,automatic:Boolean},mounted(){this.intersectionObserver=new IntersectionObserver(([e])=>{e&&e.isIntersecting&&this.automatic&&this.$emit("appeared")}),this.intersectionObserver.observe(this.$el)},unmounted(){this.intersectionObserver&&this.intersectionObserver.disconnect()}};function KHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-loadmore",{loading:o.loading}]),onClick:n[0]||(n[0]=i=>e.$emit("click"))},n[1]||(n[1]=[t.createElementVNode("a",{href:"#",class:"l-table-loadmore-link"},"Carregar mais",-1)]),2)}const qHe=lt(QHe,[["render",KHe]]),Pdt="",GHe=2e3,XHe={name:"LTableReloader",data(){return{canReload:!0}},methods:{reload(){this.canReload=!1,this.$emit("reload"),setTimeout(()=>this.canReload=!0,GHe)}}},ZHe={class:"l-table-reloader"},JHe={class:"l-table-reloader-content"};function eUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-button");return t.openBlock(),t.createElementBlock("div",ZHe,[t.createElementVNode("div",JHe,[t.createVNode(i,{size:"22"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-cloud-exclamation")])),_:1}),n[3]||(n[3]=t.createElementVNode("span",{style:{"margin-left":"8px",flex:"1 1"}},"Algumas informações não puderam ser carregadas.",-1)),t.createVNode(s,{size:"mini",onClick:n[0]||(n[0]=c=>l.reload())},{default:t.withCtx(()=>n[2]||(n[2]=[t.createTextVNode("Recarregar")])),_:1})])])}const tUe=lt(XHe,[["render",eUe]]),Rdt="",nUe={props:{height:{type:Number}}},oUe={class:"l-table-spacer"};function rUe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("tbody",oUe,[t.createElementVNode("tr",{style:t.normalizeStyle({height:`${o.height}px`})},n[0]||(n[0]=[t.createElementVNode("td",{class:"l-table-spacer-bg",colspan:"999"},null,-1)]),4)])}const aUe=lt(nUe,[["render",rUe]]);var lUe=T9;function iUe(e){var n=e==null?0:e.length;return n?lUe(e,1):[]}var sUe=iUe;const cUe=qn(sUe);function dUe(){}var uUe=dUe,$_=CB,fUe=uUe,pUe=lC,hUe=1/0,mUe=$_&&1/pUe(new $_([,-0]))[1]==hUe?function(e){return new $_(e)}:fUe,gUe=mUe,yUe=rC,bUe=_9,MUe=N9,wUe=aC,CUe=gUe,_Ue=lC,NUe=200;function kUe(e,n,o){var r=-1,a=bUe,l=e.length,i=!0,s=[],c=s;if(o)i=!1,a=MUe;else if(l>=NUe){var d=n?null:CUe(e);if(d)return _Ue(d);i=!1,a=wUe,c=new yUe}else c=n?[]:s;e:for(;++r<l;){var u=e[r],f=n?n(u):u;if(u=o||u!==0?u:0,i&&f===f){for(var p=c.length;p--;)if(c[p]===f)continue e;n&&c.push(f),s.push(u)}else a(c,f,o)||(c!==s&&c.push(f),s.push(u))}return s}var EUe=kUe,xUe=EUe;function TUe(e){return e&&e.length?xUe(e):[]}var SUe=TUe;const DUe=qn(SUe);function vUe({key:e,selected:n},o){let{loadedPages:r,allowInvertedSelection:a,includedIds:l,excludedIds:i,multiselect:s,itemToId:c=m=>m}=o;if(!e===void 0||e===null)return{includedIds:l,excludedIds:i};if(e==="*"){if(l.splice(0,l.length),i.splice(0,i.length),n&&s&&a&&l.push("*"),n&&s&&!a){let m=cUe(r.filter(y=>y.data).map(y=>y.data));l=DUe(m.map(y=>c(y)))}return{includedIds:l,excludedIds:i}}let u=l.includes("*"),f=l.includes(e),p=i.includes(e);if(s||(l.splice(0,l.length),i.splice(0,i.length)),u&&s){if(n&&p){let m=i.indexOf(e);i.splice(m,1)}!n&&!p&&s&&i.push(e)}else if(n&&!f&&(s?l.push(e):l=[e]),!n&&f){let m=l.indexOf(e);l.splice(m,1)}return{includedIds:l,excludedIds:i}}function IUe({pagesCount:e,currentPage:n,endingAdjacents:o=1,adjacents:r=2,next:a=!0,previous:l=!0,last:i=!1,first:s=!1,fixedWidth:c=!0}){const d=[];if(!e)return d;const u=c?o*2+r*2+3:o*2+1;if(e<=u)for(let f=0;f<e;f++)d.push(f);else{let f=0;for(let y=0;y<Math.min(o,e);y++)d.push(f=y);let p=o+r*2,m=r,g=r;c&&n<p&&(g+=p-n),c&&e-n-1<p&&(m+=p-(e-n-1));for(let y=Math.max(f+1,n-m);y<Math.min(n+g+1,e);y++)f+2===y&&d.push(f=f+1),f+1!==y&&d.push("...1"),d.push(f=y);for(let y=Math.max(f+1,e-o);y<e;y++)f+2===y&&d.push(f=f+1),f+1!==y&&d.push("...2"),d.push(f=y)}return l&&d.unshift("<"),a&&d.push(">"),s&&d.unshift("<<"),i&&d.push(">>"),d}const Fdt="",AUe={name:"LTablePagination",props:{pagesCount:Number,totalCount:Number,currentPage:{type:Number,default:2}},computed:{visiblePages(){return this.totalCount?IUe({pagesCount:this.pagesCount,currentPage:this.currentPage,adjacents:1,endingAdjacents:1,fixedWidth:!0}):["...1"]}},methods:{clicked(e){typeof e=="number"?this.goto(parseInt(e)):e==="<"?this.goto(this.currentPage-1):e===">"?this.goto(this.currentPage+1):e==="<<"?this.goto(0):e===">>"&&this.goto(this.pagesCount-1)},goto(e){this.currentPage!=e&&(e=Math.max(0,Math.min(e,this.pagesCount-1)),this.$emit("goto",e))}}},OUe={class:"l-table-pagination"},zUe=["onClick"];function BUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon");return t.openBlock(),t.createElementBlock("div",OUe,[t.createVNode(t.TransitionGroup,{tag:"div",class:"l-table-pagination-pages",name:"l-table-pagination-transition"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.visiblePages,s=>(t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["l-table-pagination-page-item",{active:s==o.currentPage}]),key:s,onClick:c=>l.clicked(s)},[s==="<"?(t.openBlock(),t.createBlock(i,{key:0,size:"20"},{default:t.withCtx(()=>n[0]||(n[0]=[t.createTextVNode("uil-angle-left")])),_:1})):s===">"?(t.openBlock(),t.createBlock(i,{key:1,size:"20"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-angle-right")])),_:1})):s==="...1"||s==="...2"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(" ... ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createTextVNode(t.toDisplayString(s+1),1)],64))],10,zUe))),128))]),_:1})])}const LUe=lt(AUe,[["render",BUe]]),Hdt="";o$.register();const VUe=100,$Ue=3e4,jUe=3,PUe="scrollBehavior"in document.documentElement.style,RUe={name:"LTable",tagName:"l-table",components:{LTableHeader:FHe,LTableBody:EHe,LTableReloader:tUe,LTableLoadMore:qHe,LTableEndspace:WHe,LTableBodySpacer:aUe,LTablePagination:LUe},props:{rows:{type:Array},primaryKey:{type:String,default:"id"},fetch:{type:Function},columns:{type:Array},pagination:{type:Boolean,default:!1},display:{type:String,enum:["all","more","paged"],default:"all"},autoLoadMore:{type:Boolean,default:!1},schema:{type:Object,required:!0},selectable:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},multiselect:{type:Boolean,default:!0},allowInvertedSelection:{type:Boolean,default:!0},rowHeight:{type:Number,default:32},borderTick:{type:Number,default:1},snapToPageOnMore:{type:Boolean,default:!0},stickyColumnLeft:{type:Boolean,default:!1},recycle:{type:Boolean,default:!0},limitPerPage:{type:Number,default:50}},emits:["loading","changeSelection","click-item"],mounted(){this.computeVisibleRows()},data(e){let n=[];return e.columns.length&&(n=e.columns.map(o=>this.buildColumnSpec(o))),{fetching:0,headerHeight:56,nonce:0,id:0,extraRows:15,lastComputedOffsetY:0,includedIds:[],excludedIds:[],scrollAtTop:!0,scrollAtLeft:!0,totalCount:0,firstPage:null,currentPage:null,lastPage:null,loadedPages:[],columnSpecs:n}},watch:{totalCount(e){this.$emit("changeSelection",{includedIds:this.includedIds,excludedIds:this.excludedIds,selectionCount:this.selectionCount,totalCount:e})},somePageIsLoading(e){this.$emit("loading",e)}},computed:{perPage(){return Number(this.limitPerPage)},pagesCount(){return Math.floor(this.totalCount/this.perPage)+1},selectionCount(){return this.includedIds.toString()==="*"?this.totalCount-this.excludedIds.length:this.includedIds.length},lastLoadedPage(){return this.loadedPages.length},isLoadMoreVisible(){return this.display==="more"&&this.lastLoadedPage<this.pagesCount},isPaginationVisible(){return(this.display==="page"||!!this.pagination)&&this.display!=="more"&&this.pagesCount!==null},isLeftColumnSticky(){return this.stickyColumnLeft||this.columns&&this.columns[0]&&this.columns[0].sticky},usingRecycledLayout(){return this.display!=="paged"&&this.recycle},hasVisibleFailedPages(){for(let e=this.firstPageRendered;e<=this.lastPageRendered;e++)if(this.loadedPages[e]&&this.loadedPages[e].failed)return!0;return!1},firstPageRendered(){return!this.usingRecycledLayout&&this.display!=="paged"?0:this.firstPage},lastPageRendered(){return this.display==="paged"?this.firstPage:this.usingRecycledLayout?this.lastPage:Math.max(0,this.lastLoadedPage-1)},visiblePages(){let e=[];for(let n=this.firstPageRendered;n<=this.lastPageRendered;n++){let o=this.loadedPages[n]||{index:n};e.push(o)}return e},contentStyle(){return{"--l-table-primary-color":"#2F8AF5","--l-table-warning-color":"#fd3a57","--l-table-bg-color":"white","--l-table-header-height":`${this.headerHeight}px`,"--l-table-header-text-color":"#232B34","--l-table-header-border-color":"#E8E8E8","--l-table-skeleton-height":`${Math.min(this.rowHeight-8,8)}px`,"--l-table-loader-height":"3px","--l-table-loader-color":"var(--l-table-primary-color)","--l-table-row-height":`${this.rowHeight}px`,"--l-table-cell-padding":"0 8px","--l-table-row-hover-color":"#fafbfd","--l-table-row-selected-color":"#eef5fa","--l-table-row-selected-hover-color":"#e6f0f8","--l-table-border-color":"#D3DAE6","--l-table-border-tick":`${this.borderTick}px`,"--l-table-selector-width":`${this.selectable?Math.min(this.headerHeight,this.rowHeight):0}px`,"--l-table-loadmore-height":"46px","--l-table-pagination-height":"48px","--l-table-pagination-color":"var(--l-table-primary-color)","--l-table-pagination-bg-color":"white","--l-table-reloader-margin":"16px","--l-table-endspace-bg-color":"#f5f5f5","--l-table-link-color":"var(--l-table-primary-color)"}},contentClasses(){return{"l-table-at-top":this.scrollAtTop,"l-table-at-left":this.scrollAtLeft,"l-table-sticky-column-left":this.isLeftColumnSticky}},spacing(){let e=0,n=0,o=this.display,r=this.totalCount;return o==="more"&&(r=this.loadedPages.length*this.perPage),(o==="all"||o==="more")&&(e=this.firstPageRendered*this.perPage*this.rowHeight,n=Math.max(0,(r-(this.lastPageRendered+1)*this.perPage)*this.rowHeight)),{top:Math.max(0,e),bottom:Math.max(0,n)}},rect(){return this.$refs.container.getBoundingClientRect()},somePageIsLoading(){return this.loadedPages.map(e=>e.loading).some(e=>e)}},methods:{itemToId(e){return e?this.primaryKey?e[this.primaryKey]:e:null},scrollTo(e=0,n){let o="auto";if(n){let r=this.$refs.container.scrollTop,a=this.perPage*this.rowHeight+1;o=Math.abs(r-e)<a?"smooth":"auto"}this.$refs.container.scrollTo({top:e,behavior:o})},gotoPage(e,n){if(e=Math.max(0,Math.min(this.pagesCount,e)),this.display==="paged"){this.setViewablePages(e,e,e),this.scrollTo(0,!0);return}this.display==="more"?this.setViewablePages(e-1,e,e):this.setViewablePages(e,e,e);let o=e*this.rowHeight*this.perPage;this.scrollTo(o,n)},async loadMore(e){let n=this.loadedPages[this.loadedPages.length-1];if(!n||n.loading)return!1;let o=this.loadedPages.length;this.setViewablePages(this.firstPage,o),e&&this.snapToPageOnMore&&PUe&&setTimeout(()=>this.gotoPage(o,!0),100)},reload(){this.id++,this.fetching=0,this.firstPage=null,this.lastPage=null,this.totalCount=null,this.loadedPages=[],this.includedIds=[],this.excludedIds=[],this.gotoPage(0),this.computeVisibleRows()},reloadFailedPages(){let e=0;for(let n=this.firstPageRendered;n<=this.lastPageRendered&&!(!(!this.loadedPages[n]||!this.loadedPages[n].failed)&&(this.loadedPages[n]=null,this.fetchPage(n),++e>=jUe));n++);},onScroll(){if(!(this.getScrollSpeed()>$Ue)&&!this._scrollDebounce)return this.computeVisibleRows();clearTimeout(this._scrollDebounce),this._scrollDebounce=setTimeout(()=>{this.computeVisibleRows(),this._scrollDebounce=null},VUe)},getScrollSpeed(){let e=this._lastOffsetY||0,n=this._lastOffsetYTime||0,o=this._lastOffsetY=this.$refs.container.scrollTop,r=this._lastOffsetYTime=Date.now();return Math.abs(1e3*(e-o)/(r-n))},computeVisibleRows(){let e=this.$refs.container.scrollTop,n=this.$refs.container.scrollLeft,o=this.lastComputedOffsetY;this.scrollAtTop=e===0,this.scrollAtLeft=n===0;let r=Math.abs(o-e);if(e>2&&o>2&&r<150||(this.lastComputedOffsetY=e,this.display==="paged"))return;let l=this.rect.height-this.headerHeight,i=Math.max(0,Math.floor(e/this.rowHeight)),s=Math.ceil(l/this.rowHeight),c=i+s,d=this.extraRows,u=this.perPage,f=Math.floor((i-d)/this.perPage),p=Math.floor((c+d)/u),m=p>=this.pagesCount-1?s:s/2,g=Math.floor((i+m)/this.perPage);if(this.display==="more"){for(f=Math.min(f,this.lastLoadedPage);!this.loadedPages[f]&&f>0;)f--;for(p=Math.max(p,f);!this.loadedPages[p]&&p>f&&p>0;)p--}this.setViewablePages(f,p,g)},setViewablePages(e=0,n=0,o=0){this.display==="paged"&&(n=e),e=Math.min(Math.max(e,0),this.pagesCount-1),n=Math.min(Math.max(n,e),this.pagesCount-1),o=Math.min(n,Math.max(e,o||0));let r=e!==this.firstPage||n!==this.lastPage;this.firstPage=e,this.lastPage=n,this.currentPage=o,r&&this.scheduleFeching()},buildColumnSpec(e){if(!this.schema.fields)throw new Error("Missing schema.fields!");const n=this.schema.fields.find(r=>r.path===e.path);if(!n)throw new Error(`Missing field schema for path ${e.path}`);const o=this.$L.FieldTypeComponents.get(n,"default");return Object.assign({},n,{width:e.width||null,sortable:n?n.sortable:!1,sticky:n&&n.sticky||e.sticky||!1,align:n&&n.align||"left",column:e,field:n,component:o})},handleColumnSpecsUpdate(e){this.columnSpecs=e},changeSelection({key:e,selected:n}){const{includedIds:o,excludedIds:r}=vUe({key:e,selected:n},this);this.includedIds=o,this.excludedIds=r,this.$nextTick(()=>{this.$emit("changeSelection",{includedIds:this.includedIds,excludedIds:this.excludedIds,selectionCount:this.selectionCount,totalCount:this.totalCount})})},scheduleFeching(){for(let e=this.firstPage;e<=this.lastPage;e++)this.fetchPage(e)},async fetchPage(e){let n=this.loadedPages[e];if(n)return n;n=this.loadedPages[e]={id:this.id,index:e,startedAt:Date.now(),duration:null,loading:!0,loaded:!1,failed:!1,error:null,data:null};try{this.fetching++;const{hits:o,total:r}=await this.resolvePageData(e);Object.assign(n,{duration:Date.now()-n.startedAt,loading:!1,loaded:!0,data:o});let a=this.loadedPages.indexOf(n)>=0;r!==void 0&&a&&(this.totalCount=r)}catch(o){console.error("LTable","Failed to call `fetch` callback",o),Object.assign(n,{loading:!1,failed:!0,error:o.toString()})}finally{this.id===n.id&&this.fetching--}return n},async resolvePageData(e){if(this.rows){let n=this.perPage,o=e*n;return{data:this.rows.slice(o,o+n),total:this.rows.length}}else{if(this.fetch)return await this.fetch({page:e,offset:e*this.perPage,limit:this.perPage,schema:this.schema,columns:this.columns,perPage:this.perPage,primaryKey:this.primaryKey});throw new Error("Cannot discover data. Either `rows` or `fetch` property must be assigned to table")}}}},FUe={class:"l-table-table",border:"0"};function HUe(e,n,o,r,a,l){const i=t.resolveComponent("LTableHeader"),s=t.resolveComponent("LTableBodySpacer"),c=t.resolveComponent("LTableBody"),d=t.resolveComponent("LTableLoadMore"),u=t.resolveComponent("LTableEndspace"),f=t.resolveComponent("LTableReloader"),p=t.resolveComponent("LTablePagination");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-container",l.contentClasses]),ref:"container",style:t.normalizeStyle(l.contentStyle),onScroll:n[7]||(n[7]=(...m)=>l.onScroll&&l.onScroll(...m))},[t.createElementVNode("table",FUe,[n[8]||(n[8]=t.createElementVNode("caption",{style:{display:"none"}}," Table Header ",-1)),t.createVNode(i,{height:a.headerHeight,selectable:o.selectable,columnSpecs:a.columnSpecs,loading:!!a.fetching,total:a.totalCount,includedIds:a.includedIds,excludedIds:a.excludedIds,multiselect:o.multiselect,onSelected:n[0]||(n[0]=m=>l.changeSelection(m)),"onColumnSpecs:update":l.handleColumnSpecsUpdate},null,8,["height","selectable","columnSpecs","loading","total","includedIds","excludedIds","multiselect","onColumnSpecs:update"]),t.createVNode(s,{height:l.spacing.top},null,8,["height"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.visiblePages,m=>(t.openBlock(),t.createBlock(c,{key:m.index,page:m,perPage:l.perPage,pagesCount:l.pagesCount,totalCount:a.totalCount,selectable:o.selectable,clickable:o.clickable,columnSpecs:a.columnSpecs,includedIds:a.includedIds,excludedIds:a.excludedIds,multiselect:o.multiselect,onClickItem:n[1]||(n[1]=g=>e.$emit("click-item",g)),onSelected:n[2]||(n[2]=g=>l.changeSelection(g))},null,8,["page","perPage","pagesCount","totalCount","selectable","clickable","columnSpecs","includedIds","excludedIds","multiselect"]))),128)),t.createVNode(s,{height:l.spacing.bottom},null,8,["height"])]),l.isLoadMoreVisible?(t.openBlock(),t.createBlock(d,{key:0,onClick:n[3]||(n[3]=m=>l.loadMore(!0)),onAppeared:n[4]||(n[4]=m=>l.loadMore()),automatic:o.autoLoadMore},null,8,["automatic"])):t.createCommentVNode("",!0),t.createVNode(u),t.createVNode(t.Transition,{name:"scale-up"},{default:t.withCtx(()=>[l.hasVisibleFailedPages?(t.openBlock(),t.createBlock(f,{key:0,onReload:n[5]||(n[5]=m=>l.reloadFailedPages())})):t.createCommentVNode("",!0)]),_:1}),l.isPaginationVisible?(t.openBlock(),t.createBlock(p,{key:1,currentPage:a.currentPage,pagesCount:l.pagesCount,totalCount:a.totalCount,onGoto:n[6]||(n[6]=m=>l.gotoPage(m))},null,8,["currentPage","pagesCount","totalCount"])):t.createCommentVNode("",!0)],38)}const UUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(RUe,[["render",HUe]])},Symbol.toStringTag,{value:"Module"})),Ydt="",YUe={name:"LTabs",components:{ElTabs:bw},methods:{calcPaneInstances(e=!1){if(this.$slots.default){const o=this.$slots.default.filter(a=>a.tag&&a.componentOptions&&a.componentOptions.Ctor.options.tagName==="l-tab-pane").map(({componentInstance:a})=>a),r=!(o.length===this.panes.length&&o.every((a,l)=>a===this.panes[l]));(e||r)&&(this.panes=o)}else this.panes.length!==0&&(this.panes=[])}},data(){return{panes:[]}}};function WUe(e,n,o,r,a,l){const i=t.resolveComponent("el-tabs");return t.openBlock(),t.createBlock(i,t.normalizeProps(t.guardReactiveProps(e.$attrs)),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16)}const QUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(YUe,[["render",WUe],["__scopeId","data-v-66db6dd7"]])},Symbol.toStringTag,{value:"Module"})),KUe={tagName:"l-target-chip",name:"LTargetChip",props:{kind:{type:String,required:!0},closeable:{type:Boolean,default:!1},name:{type:String,required:!0},count:{type:Number}},computed:{color:function(){return{member:"purple",group:"aqua",user:"link",tag:"warning",community:"danger",role:"lead-light"}[this.kind]||"lead"},icon:function(){return{member:"uil-graduation-cap",group:"uil-users-alt",user:"uil-user",tag:"uil-tag-alt",role:"uil-user",community:"uil-channel"}[this.kind]}}},qUe={class:"l-d-flex l-align-items"};function GUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-chip");return t.openBlock(),t.createBlock(s,{style:{height:"24px"},bold:"",fill:"",color:l.color,icon:l.icon},{default:t.withCtx(()=>[t.createElementVNode("div",qUe,[t.createTextVNode(t.toDisplayString(o.count)+" "+t.toDisplayString(o.name)+" ",1),o.closeable?(t.openBlock(),t.createBlock(i,{key:0,onClick:n[0]||(n[0]=c=>e.$emit("remove")),class:"l-d-flex l-align-items-center ml-1 mr-0",style:{cursor:"pointer"},size:"15"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode(" uis-times-circle ")])),_:1})):t.createCommentVNode("",!0)])]),_:1},8,["color","icon"])}const XUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(KUe,[["render",GUe]])},Symbol.toStringTag,{value:"Module"})),Kdt="",ZUe={tagName:"l-target-input",name:"LTargetInput",props:{topics:{type:Array,required:!0},limit:{type:Number,default:3},editable:{type:Boolean,default:!1}},computed:{topicsToShow(){return this.topics.slice(0,this.limit)},moreTopicsText(){const e=this.topics.length-this.limit>1;return`+ ${this.topics.length-this.limit} destinatário`+(e?"s":"")}}};function JUe(e,n,o,r,a,l){const i=t.resolveComponent("l-target-chip"),s=t.resolveComponent("l-chip");return o.topics&&o.topics.length?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass("l-target-input"+(o.editable?" editable":""))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.topicsToShow,c=>(t.openBlock(),t.createBlock(i,{kind:c.kind,name:c.name,key:c.id,class:"mr-2 mb-2"},null,8,["kind","name"]))),128)),o.topics.length>this.limit?(t.openBlock(),t.createBlock(s,{key:0,color:"purple",class:"mb-2",fill:"","hide-icon":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.moreTopicsText),1)]),_:1})):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)}const eYe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(ZUe,[["render",JUe],["__scopeId","data-v-1da7433b"]])},Symbol.toStringTag,{value:"Module"}));function So(e){this.content=e}So.prototype={constructor:So,find:function(e){for(var n=0;n<this.content.length;n+=2)if(this.content[n]===e)return n;return-1},get:function(e){var n=this.find(e);return n==-1?void 0:this.content[n+1]},update:function(e,n,o){var r=o&&o!=e?this.remove(o):this,a=r.find(e),l=r.content.slice();return a==-1?l.push(o||e,n):(l[a+1]=n,o&&(l[a]=o)),new So(l)},remove:function(e){var n=this.find(e);if(n==-1)return this;var o=this.content.slice();return o.splice(n,2),new So(o)},addToStart:function(e,n){return new So([e,n].concat(this.remove(e).content))},addToEnd:function(e,n){var o=this.remove(e).content.slice();return o.push(e,n),new So(o)},addBefore:function(e,n,o){var r=this.remove(n),a=r.content.slice(),l=r.find(e);return a.splice(l==-1?a.length:l,0,n,o),new So(a)},forEach:function(e){for(var n=0;n<this.content.length;n+=2)e(this.content[n],this.content[n+1])},prepend:function(e){return e=So.from(e),e.size?new So(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=So.from(e),e.size?new So(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var n=this;e=So.from(e);for(var o=0;o<e.content.length;o+=2)n=n.remove(e.content[o]);return n},toObject:function(){var e={};return this.forEach(function(n,o){e[n]=o}),e},get size(){return this.content.length>>1}},So.from=function(e){if(e instanceof So)return e;var n=[];if(e)for(var o in e)n.push(o,e[o]);return new So(n)};function r$(e,n,o){for(let r=0;;r++){if(r==e.childCount||r==n.childCount)return e.childCount==n.childCount?null:o;let a=e.child(r),l=n.child(r);if(a==l){o+=a.nodeSize;continue}if(!a.sameMarkup(l))return o;if(a.isText&&a.text!=l.text){for(let i=0;a.text[i]==l.text[i];i++)o++;return o}if(a.content.size||l.content.size){let i=r$(a.content,l.content,o+1);if(i!=null)return i}o+=a.nodeSize}}function a$(e,n,o,r){for(let a=e.childCount,l=n.childCount;;){if(a==0||l==0)return a==l?null:{a:o,b:r};let i=e.child(--a),s=n.child(--l),c=i.nodeSize;if(i==s){o-=c,r-=c;continue}if(!i.sameMarkup(s))return{a:o,b:r};if(i.isText&&i.text!=s.text){let d=0,u=Math.min(i.text.length,s.text.length);for(;d<u&&i.text[i.text.length-d-1]==s.text[s.text.length-d-1];)d++,o--,r--;return{a:o,b:r}}if(i.content.size||s.content.size){let d=a$(i.content,s.content,o-1,r-1);if(d)return d}o-=c,r-=c}}class Ye{constructor(n,o){if(this.content=n,this.size=o||0,o==null)for(let r=0;r<n.length;r++)this.size+=n[r].nodeSize}nodesBetween(n,o,r,a=0,l){for(let i=0,s=0;s<o;i++){let c=this.content[i],d=s+c.nodeSize;if(d>n&&r(c,a+s,l||null,i)!==!1&&c.content.size){let u=s+1;c.nodesBetween(Math.max(0,n-u),Math.min(c.content.size,o-u),r,a+u)}s=d}}descendants(n){this.nodesBetween(0,this.size,n)}textBetween(n,o,r,a){let l="",i=!0;return this.nodesBetween(n,o,(s,c)=>{let d=s.isText?s.text.slice(Math.max(n,c)-c,o-c):s.isLeaf?a?typeof a=="function"?a(s):a:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&d||s.isTextblock)&&r&&(i?i=!1:l+=r),l+=d},0),l}append(n){if(!n.size)return this;if(!this.size)return n;let o=this.lastChild,r=n.firstChild,a=this.content.slice(),l=0;for(o.isText&&o.sameMarkup(r)&&(a[a.length-1]=o.withText(o.text+r.text),l=1);l<n.content.length;l++)a.push(n.content[l]);return new Ye(a,this.size+n.size)}cut(n,o=this.size){if(n==0&&o==this.size)return this;let r=[],a=0;if(o>n)for(let l=0,i=0;i<o;l++){let s=this.content[l],c=i+s.nodeSize;c>n&&((i<n||c>o)&&(s.isText?s=s.cut(Math.max(0,n-i),Math.min(s.text.length,o-i)):s=s.cut(Math.max(0,n-i-1),Math.min(s.content.size,o-i-1))),r.push(s),a+=s.nodeSize),i=c}return new Ye(r,a)}cutByIndex(n,o){return n==o?Ye.empty:n==0&&o==this.content.length?this:new Ye(this.content.slice(n,o))}replaceChild(n,o){let r=this.content[n];if(r==o)return this;let a=this.content.slice(),l=this.size+o.nodeSize-r.nodeSize;return a[n]=o,new Ye(a,l)}addToStart(n){return new Ye([n].concat(this.content),this.size+n.nodeSize)}addToEnd(n){return new Ye(this.content.concat(n),this.size+n.nodeSize)}eq(n){if(this.content.length!=n.content.length)return!1;for(let o=0;o<this.content.length;o++)if(!this.content[o].eq(n.content[o]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(n){let o=this.content[n];if(!o)throw new RangeError("Index "+n+" out of range for "+this);return o}maybeChild(n){return this.content[n]||null}forEach(n){for(let o=0,r=0;o<this.content.length;o++){let a=this.content[o];n(a,r,o),r+=a.nodeSize}}findDiffStart(n,o=0){return r$(this,n,o)}findDiffEnd(n,o=this.size,r=n.size){return a$(this,n,o,r)}findIndex(n,o=-1){if(n==0)return _1(0,n);if(n==this.size)return _1(this.content.length,n);if(n>this.size||n<0)throw new RangeError(`Position ${n} outside of fragment (${this})`);for(let r=0,a=0;;r++){let l=this.child(r),i=a+l.nodeSize;if(i>=n)return i==n||o>0?_1(r+1,i):_1(r,a);a=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(n=>n.toJSON()):null}static fromJSON(n,o){if(!o)return Ye.empty;if(!Array.isArray(o))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ye(o.map(n.nodeFromJSON))}static fromArray(n){if(!n.length)return Ye.empty;let o,r=0;for(let a=0;a<n.length;a++){let l=n[a];r+=l.nodeSize,a&&l.isText&&n[a-1].sameMarkup(l)?(o||(o=n.slice(0,a)),o[o.length-1]=l.withText(o[o.length-1].text+l.text)):o&&o.push(l)}return new Ye(o||n,r)}static from(n){if(!n)return Ye.empty;if(n instanceof Ye)return n;if(Array.isArray(n))return this.fromArray(n);if(n.attrs)return new Ye([n],n.nodeSize);throw new RangeError("Can not convert "+n+" to a Fragment"+(n.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ye.empty=new Ye([],0);const j_={index:0,offset:0};function _1(e,n){return j_.index=e,j_.offset=n,j_}function N1(e,n){if(e===n)return!0;if(!(e&&typeof e=="object")||!(n&&typeof n=="object"))return!1;let o=Array.isArray(e);if(Array.isArray(n)!=o)return!1;if(o){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!N1(e[r],n[r]))return!1}else{for(let r in e)if(!(r in n)||!N1(e[r],n[r]))return!1;for(let r in n)if(!(r in e))return!1}return!0}let mn=class aE{constructor(n,o){this.type=n,this.attrs=o}addToSet(n){let o,r=!1;for(let a=0;a<n.length;a++){let l=n[a];if(this.eq(l))return n;if(this.type.excludes(l.type))o||(o=n.slice(0,a));else{if(l.type.excludes(this.type))return n;!r&&l.type.rank>this.type.rank&&(o||(o=n.slice(0,a)),o.push(this),r=!0),o&&o.push(l)}}return o||(o=n.slice()),r||o.push(this),o}removeFromSet(n){for(let o=0;o<n.length;o++)if(this.eq(n[o]))return n.slice(0,o).concat(n.slice(o+1));return n}isInSet(n){for(let o=0;o<n.length;o++)if(this.eq(n[o]))return!0;return!1}eq(n){return this==n||this.type==n.type&&N1(this.attrs,n.attrs)}toJSON(){let n={type:this.type.name};for(let o in this.attrs){n.attrs=this.attrs;break}return n}static fromJSON(n,o){if(!o)throw new RangeError("Invalid input for Mark.fromJSON");let r=n.marks[o.type];if(!r)throw new RangeError(`There is no mark type ${o.type} in this schema`);let a=r.create(o.attrs);return r.checkAttrs(a.attrs),a}static sameSet(n,o){if(n==o)return!0;if(n.length!=o.length)return!1;for(let r=0;r<n.length;r++)if(!n[r].eq(o[r]))return!1;return!0}static setFrom(n){if(!n||Array.isArray(n)&&n.length==0)return aE.none;if(n instanceof aE)return[n];let o=n.slice();return o.sort((r,a)=>r.type.rank-a.type.rank),o}};mn.none=[];class k1 extends Error{}class ct{constructor(n,o,r){this.content=n,this.openStart=o,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(n,o){let r=i$(this.content,n+this.openStart,o);return r&&new ct(r,this.openStart,this.openEnd)}removeBetween(n,o){return new ct(l$(this.content,n+this.openStart,o+this.openStart),this.openStart,this.openEnd)}eq(n){return this.content.eq(n.content)&&this.openStart==n.openStart&&this.openEnd==n.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let n={content:this.content.toJSON()};return this.openStart>0&&(n.openStart=this.openStart),this.openEnd>0&&(n.openEnd=this.openEnd),n}static fromJSON(n,o){if(!o)return ct.empty;let r=o.openStart||0,a=o.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ct(Ye.fromJSON(n,o.content),r,a)}static maxOpen(n,o=!0){let r=0,a=0;for(let l=n.firstChild;l&&!l.isLeaf&&(o||!l.type.spec.isolating);l=l.firstChild)r++;for(let l=n.lastChild;l&&!l.isLeaf&&(o||!l.type.spec.isolating);l=l.lastChild)a++;return new ct(n,r,a)}}ct.empty=new ct(Ye.empty,0,0);function l$(e,n,o){let{index:r,offset:a}=e.findIndex(n),l=e.maybeChild(r),{index:i,offset:s}=e.findIndex(o);if(a==n||l.isText){if(s!=o&&!e.child(i).isText)throw new RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(o))}if(r!=i)throw new RangeError("Removing non-flat range");return e.replaceChild(r,l.copy(l$(l.content,n-a-1,o-a-1)))}function i$(e,n,o,r){let{index:a,offset:l}=e.findIndex(n),i=e.maybeChild(a);if(l==n||i.isText)return r&&!r.canReplace(a,a,o)?null:e.cut(0,n).append(o).append(e.cut(n));let s=i$(i.content,n-l-1,o);return s&&e.replaceChild(a,i.copy(s))}function tYe(e,n,o){if(o.openStart>e.depth)throw new k1("Inserted content deeper than insertion position");if(e.depth-o.openStart!=n.depth-o.openEnd)throw new k1("Inconsistent open depths");return s$(e,n,o,0)}function s$(e,n,o,r){let a=e.index(r),l=e.node(r);if(a==n.index(r)&&r<e.depth-o.openStart){let i=s$(e,n,o,r+1);return l.copy(l.content.replaceChild(a,i))}else if(o.content.size)if(!o.openStart&&!o.openEnd&&e.depth==r&&n.depth==r){let i=e.parent,s=i.content;return Uc(i,s.cut(0,e.parentOffset).append(o.content).append(s.cut(n.parentOffset)))}else{let{start:i,end:s}=nYe(o,e);return Uc(l,d$(e,i,s,n,r))}else return Uc(l,E1(e,n,r))}function c$(e,n){if(!n.type.compatibleContent(e.type))throw new k1("Cannot join "+n.type.name+" onto "+e.type.name)}function P_(e,n,o){let r=e.node(o);return c$(r,n.node(o)),r}function Hc(e,n){let o=n.length-1;o>=0&&e.isText&&e.sameMarkup(n[o])?n[o]=e.withText(n[o].text+e.text):n.push(e)}function fh(e,n,o,r){let a=(n||e).node(o),l=0,i=n?n.index(o):a.childCount;e&&(l=e.index(o),e.depth>o?l++:e.textOffset&&(Hc(e.nodeAfter,r),l++));for(let s=l;s<i;s++)Hc(a.child(s),r);n&&n.depth==o&&n.textOffset&&Hc(n.nodeBefore,r)}function Uc(e,n){return e.type.checkContent(n),e.copy(n)}function d$(e,n,o,r,a){let l=e.depth>a&&P_(e,n,a+1),i=r.depth>a&&P_(o,r,a+1),s=[];return fh(null,e,a,s),l&&i&&n.index(a)==o.index(a)?(c$(l,i),Hc(Uc(l,d$(e,n,o,r,a+1)),s)):(l&&Hc(Uc(l,E1(e,n,a+1)),s),fh(n,o,a,s),i&&Hc(Uc(i,E1(o,r,a+1)),s)),fh(r,null,a,s),new Ye(s)}function E1(e,n,o){let r=[];if(fh(null,e,o,r),e.depth>o){let a=P_(e,n,o+1);Hc(Uc(a,E1(e,n,o+1)),r)}return fh(n,null,o,r),new Ye(r)}function nYe(e,n){let o=n.depth-e.openStart,a=n.node(o).copy(e.content);for(let l=o-1;l>=0;l--)a=n.node(l).copy(Ye.from(a));return{start:a.resolveNoCache(e.openStart+o),end:a.resolveNoCache(a.content.size-e.openEnd-o)}}class ph{constructor(n,o,r){this.pos=n,this.path=o,this.parentOffset=r,this.depth=o.length/3-1}resolveDepth(n){return n==null?this.depth:n<0?this.depth+n:n}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(n){return this.path[this.resolveDepth(n)*3]}index(n){return this.path[this.resolveDepth(n)*3+1]}indexAfter(n){return n=this.resolveDepth(n),this.index(n)+(n==this.depth&&!this.textOffset?0:1)}start(n){return n=this.resolveDepth(n),n==0?0:this.path[n*3-1]+1}end(n){return n=this.resolveDepth(n),this.start(n)+this.node(n).content.size}before(n){if(n=this.resolveDepth(n),!n)throw new RangeError("There is no position before the top-level node");return n==this.depth+1?this.pos:this.path[n*3-1]}after(n){if(n=this.resolveDepth(n),!n)throw new RangeError("There is no position after the top-level node");return n==this.depth+1?this.pos:this.path[n*3-1]+this.path[n*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let n=this.parent,o=this.index(this.depth);if(o==n.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=n.child(o);return r?n.child(o).cut(r):a}get nodeBefore(){let n=this.index(this.depth),o=this.pos-this.path[this.path.length-1];return o?this.parent.child(n).cut(0,o):n==0?null:this.parent.child(n-1)}posAtIndex(n,o){o=this.resolveDepth(o);let r=this.path[o*3],a=o==0?0:this.path[o*3-1]+1;for(let l=0;l<n;l++)a+=r.child(l).nodeSize;return a}marks(){let n=this.parent,o=this.index();if(n.content.size==0)return mn.none;if(this.textOffset)return n.child(o).marks;let r=n.maybeChild(o-1),a=n.maybeChild(o);if(!r){let s=r;r=a,a=s}let l=r.marks;for(var i=0;i<l.length;i++)l[i].type.spec.inclusive===!1&&(!a||!l[i].isInSet(a.marks))&&(l=l[i--].removeFromSet(l));return l}marksAcross(n){let o=this.parent.maybeChild(this.index());if(!o||!o.isInline)return null;let r=o.marks,a=n.parent.maybeChild(n.index());for(var l=0;l<r.length;l++)r[l].type.spec.inclusive===!1&&(!a||!r[l].isInSet(a.marks))&&(r=r[l--].removeFromSet(r));return r}sharedDepth(n){for(let o=this.depth;o>0;o--)if(this.start(o)<=n&&this.end(o)>=n)return o;return 0}blockRange(n=this,o){if(n.pos<this.pos)return n.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==n.pos?1:0);r>=0;r--)if(n.pos<=this.end(r)&&(!o||o(this.node(r))))return new x1(this,n,r);return null}sameParent(n){return this.pos-this.parentOffset==n.pos-n.parentOffset}max(n){return n.pos>this.pos?n:this}min(n){return n.pos<this.pos?n:this}toString(){let n="";for(let o=1;o<=this.depth;o++)n+=(n?"/":"")+this.node(o).type.name+"_"+this.index(o-1);return n+":"+this.parentOffset}static resolve(n,o){if(!(o>=0&&o<=n.content.size))throw new RangeError("Position "+o+" out of range");let r=[],a=0,l=o;for(let i=n;;){let{index:s,offset:c}=i.content.findIndex(l),d=l-c;if(r.push(i,s,a+c),!d||(i=i.child(s),i.isText))break;l=d-1,a+=c+1}return new ph(o,r,l)}static resolveCached(n,o){let r=u$.get(n);if(r)for(let l=0;l<r.elts.length;l++){let i=r.elts[l];if(i.pos==o)return i}else u$.set(n,r=new oYe);let a=r.elts[r.i]=ph.resolve(n,o);return r.i=(r.i+1)%rYe,a}}class oYe{constructor(){this.elts=[],this.i=0}}const rYe=12,u$=new WeakMap;class x1{constructor(n,o,r){this.$from=n,this.$to=o,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const aYe=Object.create(null);let Yc=class lE{constructor(n,o,r,a=mn.none){this.type=n,this.attrs=o,this.marks=a,this.content=r||Ye.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(n){return this.content.child(n)}maybeChild(n){return this.content.maybeChild(n)}forEach(n){this.content.forEach(n)}nodesBetween(n,o,r,a=0){this.content.nodesBetween(n,o,r,a,this)}descendants(n){this.nodesBetween(0,this.content.size,n)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(n,o,r,a){return this.content.textBetween(n,o,r,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(n){return this==n||this.sameMarkup(n)&&this.content.eq(n.content)}sameMarkup(n){return this.hasMarkup(n.type,n.attrs,n.marks)}hasMarkup(n,o,r){return this.type==n&&N1(this.attrs,o||n.defaultAttrs||aYe)&&mn.sameSet(this.marks,r||mn.none)}copy(n=null){return n==this.content?this:new lE(this.type,this.attrs,n,this.marks)}mark(n){return n==this.marks?this:new lE(this.type,this.attrs,this.content,n)}cut(n,o=this.content.size){return n==0&&o==this.content.size?this:this.copy(this.content.cut(n,o))}slice(n,o=this.content.size,r=!1){if(n==o)return ct.empty;let a=this.resolve(n),l=this.resolve(o),i=r?0:a.sharedDepth(o),s=a.start(i),d=a.node(i).content.cut(a.pos-s,l.pos-s);return new ct(d,a.depth-i,l.depth-i)}replace(n,o,r){return tYe(this.resolve(n),this.resolve(o),r)}nodeAt(n){for(let o=this;;){let{index:r,offset:a}=o.content.findIndex(n);if(o=o.maybeChild(r),!o)return null;if(a==n||o.isText)return o;n-=a+1}}childAfter(n){let{index:o,offset:r}=this.content.findIndex(n);return{node:this.content.maybeChild(o),index:o,offset:r}}childBefore(n){if(n==0)return{node:null,index:0,offset:0};let{index:o,offset:r}=this.content.findIndex(n);if(r<n)return{node:this.content.child(o),index:o,offset:r};let a=this.content.child(o-1);return{node:a,index:o-1,offset:r-a.nodeSize}}resolve(n){return ph.resolveCached(this,n)}resolveNoCache(n){return ph.resolve(this,n)}rangeHasMark(n,o,r){let a=!1;return o>n&&this.nodesBetween(n,o,l=>(r.isInSet(l.marks)&&(a=!0),!a)),a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let n=this.type.name;return this.content.size&&(n+="("+this.content.toStringInner()+")"),f$(this.marks,n)}contentMatchAt(n){let o=this.type.contentMatch.matchFragment(this.content,0,n);if(!o)throw new Error("Called contentMatchAt on a node with invalid content");return o}canReplace(n,o,r=Ye.empty,a=0,l=r.childCount){let i=this.contentMatchAt(n).matchFragment(r,a,l),s=i&&i.matchFragment(this.content,o);if(!s||!s.validEnd)return!1;for(let c=a;c<l;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(n,o,r,a){if(a&&!this.type.allowsMarks(a))return!1;let l=this.contentMatchAt(n).matchType(r),i=l&&l.matchFragment(this.content,o);return i?i.validEnd:!1}canAppend(n){return n.content.size?this.canReplace(this.childCount,this.childCount,n.content):this.type.compatibleContent(n.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let n=mn.none;for(let o=0;o<this.marks.length;o++){let r=this.marks[o];r.type.checkAttrs(r.attrs),n=r.addToSet(n)}if(!mn.sameSet(n,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(o=>o.type.name)}`);this.content.forEach(o=>o.check())}toJSON(){let n={type:this.type.name};for(let o in this.attrs){n.attrs=this.attrs;break}return this.content.size&&(n.content=this.content.toJSON()),this.marks.length&&(n.marks=this.marks.map(o=>o.toJSON())),n}static fromJSON(n,o){if(!o)throw new RangeError("Invalid input for Node.fromJSON");let r;if(o.marks){if(!Array.isArray(o.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=o.marks.map(n.markFromJSON)}if(o.type=="text"){if(typeof o.text!="string")throw new RangeError("Invalid text node in JSON");return n.text(o.text,r)}let a=Ye.fromJSON(n,o.content),l=n.nodeType(o.type).create(o.attrs,a,r);return l.type.checkAttrs(l.attrs),l}};Yc.prototype.text=void 0;class T1 extends Yc{constructor(n,o,r,a){if(super(n,o,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):f$(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(n,o){return this.text.slice(n,o)}get nodeSize(){return this.text.length}mark(n){return n==this.marks?this:new T1(this.type,this.attrs,this.text,n)}withText(n){return n==this.text?this:new T1(this.type,this.attrs,n,this.marks)}cut(n=0,o=this.text.length){return n==0&&o==this.text.length?this:this.withText(this.text.slice(n,o))}eq(n){return this.sameMarkup(n)&&this.text==n.text}toJSON(){let n=super.toJSON();return n.text=this.text,n}}function f$(e,n){for(let o=e.length-1;o>=0;o--)n=e[o].type.name+"("+n+")";return n}class Wc{constructor(n){this.validEnd=n,this.next=[],this.wrapCache=[]}static parse(n,o){let r=new lYe(n,o);if(r.next==null)return Wc.empty;let a=p$(r);r.next&&r.err("Unexpected trailing text");let l=pYe(fYe(a));return hYe(l,r),l}matchType(n){for(let o=0;o<this.next.length;o++)if(this.next[o].type==n)return this.next[o].next;return null}matchFragment(n,o=0,r=n.childCount){let a=this;for(let l=o;a&&l<r;l++)a=a.matchType(n.child(l).type);return a}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let n=0;n<this.next.length;n++){let{type:o}=this.next[n];if(!(o.isText||o.hasRequiredAttrs()))return o}return null}compatible(n){for(let o=0;o<this.next.length;o++)for(let r=0;r<n.next.length;r++)if(this.next[o].type==n.next[r].type)return!0;return!1}fillBefore(n,o=!1,r=0){let a=[this];function l(i,s){let c=i.matchFragment(n,r);if(c&&(!o||c.validEnd))return Ye.from(s.map(d=>d.createAndFill()));for(let d=0;d<i.next.length;d++){let{type:u,next:f}=i.next[d];if(!(u.isText||u.hasRequiredAttrs())&&a.indexOf(f)==-1){a.push(f);let p=l(f,s.concat(u));if(p)return p}}return null}return l(this,[])}findWrapping(n){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==n)return this.wrapCache[r+1];let o=this.computeWrapping(n);return this.wrapCache.push(n,o),o}computeWrapping(n){let o=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let a=r.shift(),l=a.match;if(l.matchType(n)){let i=[];for(let s=a;s.type;s=s.via)i.push(s.type);return i.reverse()}for(let i=0;i<l.next.length;i++){let{type:s,next:c}=l.next[i];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in o)&&(!a.type||c.validEnd)&&(r.push({match:s.contentMatch,type:s,via:a}),o[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(n){if(n>=this.next.length)throw new RangeError(`There's no ${n}th edge in this content match`);return this.next[n]}toString(){let n=[];function o(r){n.push(r);for(let a=0;a<r.next.length;a++)n.indexOf(r.next[a].next)==-1&&o(r.next[a].next)}return o(this),n.map((r,a)=>{let l=a+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)l+=(i?", ":"")+r.next[i].type.name+"->"+n.indexOf(r.next[i].next);return l}).join(`
117
+ `)},or.prototype.renderPartial=function(n,o,r,a){if(r){var l=this.getConfigTags(a),i=L_(r)?r(n[1]):r[n[1]];if(i!=null){var s=n[6],c=n[5],d=n[4],u=i;c==0&&d&&(u=this.indentPartial(i,d,s));var f=this.parse(u,l);return this.renderTokens(f,o,r,u,a)}}},or.prototype.unescapedValue=function(n,o){var r=o.lookup(n[1]);if(r!=null)return r},or.prototype.escapedValue=function(n,o,r){var a=this.getConfigEscape(r)||ua.escape,l=o.lookup(n[1]);if(l!=null)return typeof l=="number"&&a===ua.escape?String(l):a(l)},or.prototype.rawValue=function(n){return n[1]},or.prototype.getConfigTags=function(n){return Uu(n)?n:n&&typeof n=="object"?n.tags:void 0},or.prototype.getConfigEscape=function(n){if(n&&typeof n=="object"&&!Uu(n))return n.escape};var ua={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){uh.templateCache=e},get templateCache(){return uh.templateCache}},uh=new or;ua.clearCache=function(){return uh.clearCache()},ua.parse=function(n,o){return uh.parse(n,o)},ua.render=function(n,o,r,a){if(typeof n!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+PFe(n)+'" was given as the first argument for mustache#render(template, view, partials)');return uh.render(n,o,r,a)},ua.escape=QFe,ua.Scanner=dh,ua.Context=Yu,ua.Writer=or;const tHe={props:["value","schema","entity"],methods:{hasRouterLink(){return er(this.schema,"options.routerLink")},getRouterLink(){const e=er(this.schema,"options.routerLink");return ua.render(e,this.entity)}}},nHe={key:1};function oHe(e,n,o,r,a,l){const i=t.resolveComponent("router-link");return e.$options.methods.hasRouterLink(e.props)?(t.openBlock(),t.createBlock(i,{key:0,to:e.$options.methods.getRouterLink(e.props)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.value),1)]),_:1},8,["to"])):(t.openBlock(),t.createElementBlock("span",nHe,t.toDisplayString(o.value),1))}const rHe=lt(tHe,[["render",oHe]]),aHe={props:["value","schema"],methods:{formatValue(e){return e}}};function lHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value)),1)}const iHe=lt(aHe,[["render",lHe]]),sHe={props:["value","schema"],methods:{formatValue(e){return isNaN(e)||e===null||e===void 0?"-":Number(e/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}}};function cHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value)),1)}const dHe=lt(sHe,[["render",cHe]]),uHe={props:["value","schema"]},fHe=["href"];function pHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("a",{target:"_blank",href:`mailto:${o.value}`},t.toDisplayString(o.value),9,fHe)}const hHe=lt(uHe,[["render",pHe]]),mHe={props:["value","schema"],methods:{formatValue(e,n){if(!e)return"-";const o=er(n,"options.format","dd/MM/yyyy hh:mm:ss");return Ge(e).format(o)}}};function gHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value,o.schema)),1)}const yHe=lt(mHe,[["render",gHe]]),o$={};o$.register=function(){hr.register({type:"String"},"default",rHe),hr.register({type:"Date"},"default",yHe),hr.register({type:"Number"},"default",iHe),hr.register({format:"Amount"},"default",dHe),hr.register({format:"Email"},"default",hHe)};const Odt="",bHe={props:{perPage:Number,pagesCount:Number,totalCount:Number,columnSpecs:{type:Array},includedIds:{type:Array},excludedIds:{type:Array},selectable:Boolean,clickable:Boolean,multiselect:Boolean,page:Object},data(e){return{checked:this.computeChecked(e)}},emits:["selected","click-item"],computed:{includedAll(){return this.includedIds.toString()==="*"},estimatedRows(){return this.page&&this.pagesCount>1&&this.page.index>=this.pagesCount-1?this.totalCount%this.perPage:this.perPage}},methods:{getColumnComponent(e){return e.component},getColumnValue(e,n){return er(e,n.path)},computeChecked(e){const n=e||this;if(!n.page||!n.page.data)return[];let o=n.includedIds,r=n.excludedIds,a=n.includedAll;return n.page.data.map(l=>a&&!r.includes(l.id)||o.includes(l.id))}},watch:{includedAll(){this.checked=this.computeChecked(this)},includedIds(){this.checked=this.computeChecked(this)},excludedIds(){this.checked=this.computeChecked(this)}}},MHe={class:"l-table-tbody"},wHe={key:"selector",class:"l-table-cell l-table-column-selector"},CHe=["onClick"],_He={key:"selector",class:"l-table-cell l-table-column-selector"},NHe={key:"selector",class:"l-table-cell l-table-column-selector"};function kHe(e,n,o,r,a,l){const i=t.resolveComponent("l-checkbox");return t.openBlock(),t.createElementBlock("tbody",MHe,[o.page&&o.page.loaded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.page.data,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c,class:t.normalizeClass({"l-table-selected":a.checked[c]})},[o.selectable?(t.openBlock(),t.createElementBlock("td",wHe,[t.createVNode(i,{modelValue:a.checked[c],"onUpdate:modelValue":d=>a.checked[c]=d,class:"l-table-selector",type:o.multiselect?"checkbox":"radio",onChange:()=>e.$emit("selected",{key:s.id,selected:e.$event})},null,8,["modelValue","onUpdate:modelValue","type","onChange"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}${o.clickable?" cursor-pointer":""}`]),onClick:f=>e.$emit("click-item",s)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.getColumnComponent(d)),{value:l.getColumnValue(s,d),schema:d,entity:s},null,8,["value","schema","entity"]))],10,CHe))),128))],2))),128)):o.page&&o.page.loading?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(l.estimatedRows,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[o.selectable?(t.openBlock(),t.createElementBlock("td",_He,[t.createVNode(i,{disabled:"",class:"l-table-selector",type:o.multiselect?"checkbox":"radio",value:l.includedAll},null,8,["type","value"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}`])},n[0]||(n[0]=[t.createElementVNode("span",{class:"l-table-skeleton"},null,-1)]),2))),128))]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(l.estimatedRows,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[o.selectable?(t.openBlock(),t.createElementBlock("td",NHe,[t.createVNode(i,{disabled:"",class:"l-table-selector",type:o.multiselect?"checkbox":"radio",checked:l.includedAll},null,8,["type","checked"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}`])},n[1]||(n[1]=[t.createElementVNode("span",{class:"l-table-skeleton error"},null,-1)]),2))),128))]))),128))])}const EHe=lt(bHe,[["render",kHe]]),zdt="",xHe={props:{title:String,maxWidth:{type:Number,default:null},minWidth:{type:Number,default:50}},data(){return{dragging:!1,deltaX:0}},computed:{handleStyle(){return this.dragging?{transform:`translateX(${this.deltaX}px)`}:null}},methods:{currentWidth(){return this.$el.parentElement.getBoundingClientRect().width},limitDeltaX(e){let n=this.currentWidth();return this.limitWidth(n+e)-n},limitWidth(e){return e?this.maxWidth&&this.maxWidth<e?this.maxWidth:this.minWidth&&this.minWidth>e?this.minWidth:e:null},resize(e){this.$emit("resize",this.limitWidth(e))},drag(e){this.dragging||this.unregisterDocumentHandlers();let n=e.clientX-this.dragStartClientX;this.deltaX=this.limitDeltaX(n),console.log("drag",this.deltaX)},dragStart(e){this.registerDocumentHandlers(),this.deltaX=0,this.dragging=!0,this.dragStartClientX=e.clientX,console.log("dragStart",e)},dragEnd(e){if(this.deltaX){let n=this.currentWidth()+this.deltaX;this.resize(n)}this.unregisterDocumentHandlers(),this.deltaX=0,this.dragging=!1,this.dragStartClientX=0,console.log("dragEnd",e)},registerDocumentHandlers(){this.unregisterDocumentHandlers(),this._documentMouseMove=e=>this.drag(e),this._documentMouseUp=e=>this.dragEnd(e),document.body.style.cursor="col-resize",document.addEventListener("mousemove",this._documentMouseMove),document.addEventListener("mouseup",this._documentMouseUp),document.onselectstart=()=>!1,document.ondragstart=()=>!1},unregisterDocumentHandlers(){document.removeEventListener("mousemove",this._documentMouseMove),document.removeEventListener("mouseup",this._documentMouseUp),document.body.style.cursor="",document.onselectstart=null,document.ondragstart=null}}};function THe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["mt-handle",a.dragging?"dragging":""]),style:t.normalizeStyle(l.handleStyle),onDblclick:n[0]||(n[0]=i=>l.resize(null)),onMousedown:n[1]||(n[1]=(...i)=>l.dragStart&&l.dragStart(...i))},null,38)}const SHe=lt(xHe,[["render",THe]]),Bdt="",DHe={components:{LTableHeaderResizer:SHe},props:{spec:{type:Object}},emits:["spec:update"],data:e=>({localSpec:e.spec}),computed:{resizable(){return this.localSpec.field&&this.localSpec.field.resizable},reordable(){return!0},icon(){return this.$L.Icons.get(this.localSpec.field)}},methods:{resizeColumn(e,n){e.width=n},toggleSorting(e){let n=this.localSpec.column.sortDirection,o="asc";n?n.toLowerCase()==="asc"&&(o="desc"):o="asc",this.$emit("sort",{direction:o,cumulative:e})}},watch:{localSpec:{handler(e){this.$emit("spec:update",e)},deep:!0}}},vHe={key:1,class:"l-table-header-cell-content"};function IHe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-tooltip"),c=t.resolveComponent("LTableHeaderResizer");return t.openBlock(),t.createElementBlock("th",{class:"l-table-header-cell l-table-cell",style:t.normalizeStyle({"--l-table-col-width":o.spec.column.width?`${o.spec.column.width}px`:"auto"})},[o.spec.sortable?(t.openBlock(),t.createElementBlock("a",{key:0,href:"#",class:t.normalizeClass(["l-table-header-cell-content",[o.spec.column.sortDirection?"active":null,`l-table-header-align-${o.spec.align}`]]),onClick:n[0]||(n[0]=t.withModifiers(d=>l.toggleSorting(),["prevent"]))},[t.createVNode(s,{key:"tooltip",disabled:!o.spec.description,content:o.spec.description,placement:"top","open-delay":600,offset:0},{default:t.withCtx(()=>[t.createElementVNode("span",null,[l.icon?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-header-icon"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createTextVNode("   "+t.toDisplayString(o.spec.title),1)])]),_:1},8,["disabled","content"]),t.createElementVNode("i",{class:t.normalizeClass(["l-table-sorter-icon uil uil-arrow-down",`l-table-sorter-${o.spec.column.sortDirection||"default"}`])},null,2)],2)):(t.openBlock(),t.createElementBlock("span",vHe,[t.createVNode(s,{disabled:!o.spec.description,content:o.spec.description,placement:"top","open-delay":600,offset:0},{default:t.withCtx(()=>[t.createElementVNode("span",null,[l.icon?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-header-icon"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createTextVNode("   "+t.toDisplayString(o.spec.title),1)])]),_:1},8,["disabled","content"])])),n[2]||(n[2]=t.createElementVNode("span",{style:{width:"12px"}},null,-1)),l.resizable?(t.openBlock(),t.createBlock(c,{key:2,onResize:n[1]||(n[1]=d=>l.resizeColumn(o.spec.column,d))})):t.createCommentVNode("",!0)],4)}const AHe=lt(DHe,[["render",IHe]]),Ldt="",OHe={props:["loading"]};function zHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-header-loader",{loading:o.loading}])},null,2)}const BHe=lt(OHe,[["render",zHe]]),Vdt="",LHe={components:{LTableHeaderCell:AHe,LTableHeaderLoader:BHe},props:{columnSpecs:{type:Array},loading:{type:Boolean,default:!1},includedIds:{type:Array},excludedIds:{type:Array},total:{type:Number},selectable:{type:Boolean},multiselect:{type:Boolean}},data:e=>({localColumnSpecs:e.columnSpecs}),emits:["columnSpecs:update","selected"],computed:{selectedEverything(){let e=this.includedIds.length===this.total&&this.total>0,n=this.includedIds.toString()==="*"&&this.excludedIds.length==0;return e||n},selectedNothing(){return this.includedIds.length===0},selectedSomethings(){return!this.selectedNothing&&!this.selectedEverything}},methods:{changeSpecSort(e,{direction:n,cumulative:o}){if(o){let a=this.localColumnSpecs.reduce((l,i)=>Math.max(l,i.column.sortOrder),0)+1;e.column.sortOrder=a,e.column.sortDirection=n}else{for(let r of this.localColumnSpecs)r.column.sortOrder=null,r.column.sortDirection=null;e.column.sortOrder=1,e.column.sortDirection=n}},syncSpec(e){let n=this.localColumnSpecs.findIndex(o=>o.field===e.field);this.localColumnSpecs.splice(n,1,e)},changeSelection(e){this.$emit("selected",{key:"*",selected:e})}},watch:{localColumnSpecs:{handler(e){this.$emit("columnSpecs:update",e)},deep:!0}}},VHe={class:"l-table-header"},$He={key:0,scope:"col",class:"l-table-header-cell l-table-cell l-table-column-selector"},jHe={class:"l-table-header-extras"},PHe={colspan:"999"};function RHe(e,n,o,r,a,l){const i=t.resolveComponent("l-checkbox"),s=t.resolveComponent("LTableHeaderCell"),c=t.resolveComponent("LTableHeaderLoader");return t.openBlock(),t.createElementBlock("thead",VHe,[t.createElementVNode("tr",null,[o.selectable?(t.openBlock(),t.createElementBlock("th",$He,[o.multiselect?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-selector",type:"checkbox",value:l.selectedEverything,indeterminate:l.selectedSomethings,onChange:n[0]||(n[0]=d=>l.changeSelection(d))},null,8,["value","indeterminate"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createBlock(s,{key:u,spec:d,"onSpec:update":l.syncSpec,onSort:f=>l.changeSpecSort(d,f),ref_for:!0,ref:"headers"},null,8,["spec","onSpec:update","onSort"]))),128))]),t.createElementVNode("tr",jHe,[t.createElementVNode("td",PHe,[t.createVNode(c,{loading:o.loading},null,8,["loading"]),n[1]||(n[1]=t.createElementVNode("div",{class:"l-table-header-shadow-top"},null,-1))])])])}const FHe=lt(LHe,[["render",RHe]]),$dt="",HHe={},UHe={class:"l-table-endspace"};function YHe(e,n){return t.openBlock(),t.createElementBlock("div",UHe)}const WHe=lt(HHe,[["render",YHe]]),jdt="",QHe={props:{loading:Boolean,automatic:Boolean},mounted(){this.intersectionObserver=new IntersectionObserver(([e])=>{e&&e.isIntersecting&&this.automatic&&this.$emit("appeared")}),this.intersectionObserver.observe(this.$el)},unmounted(){this.intersectionObserver&&this.intersectionObserver.disconnect()}};function KHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-loadmore",{loading:o.loading}]),onClick:n[0]||(n[0]=i=>e.$emit("click"))},n[1]||(n[1]=[t.createElementVNode("a",{href:"#",class:"l-table-loadmore-link"},"Carregar mais",-1)]),2)}const qHe=lt(QHe,[["render",KHe]]),Pdt="",GHe=2e3,XHe={name:"LTableReloader",data(){return{canReload:!0}},methods:{reload(){this.canReload=!1,this.$emit("reload"),setTimeout(()=>this.canReload=!0,GHe)}}},ZHe={class:"l-table-reloader"},JHe={class:"l-table-reloader-content"};function eUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-button");return t.openBlock(),t.createElementBlock("div",ZHe,[t.createElementVNode("div",JHe,[t.createVNode(i,{size:"22"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-cloud-exclamation")])),_:1}),n[3]||(n[3]=t.createElementVNode("span",{style:{"margin-left":"8px",flex:"1 1"}},"Algumas informações não puderam ser carregadas.",-1)),t.createVNode(s,{size:"mini",onClick:n[0]||(n[0]=c=>l.reload())},{default:t.withCtx(()=>n[2]||(n[2]=[t.createTextVNode("Recarregar")])),_:1})])])}const tUe=lt(XHe,[["render",eUe]]),Rdt="",nUe={props:{height:{type:Number}}},oUe={class:"l-table-spacer"};function rUe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("tbody",oUe,[t.createElementVNode("tr",{style:t.normalizeStyle({height:`${o.height}px`})},n[0]||(n[0]=[t.createElementVNode("td",{class:"l-table-spacer-bg",colspan:"999"},null,-1)]),4)])}const aUe=lt(nUe,[["render",rUe]]);var lUe=T9;function iUe(e){var n=e==null?0:e.length;return n?lUe(e,1):[]}var sUe=iUe;const cUe=qn(sUe);function dUe(){}var uUe=dUe,$_=CB,fUe=uUe,pUe=lC,hUe=1/0,mUe=$_&&1/pUe(new $_([,-0]))[1]==hUe?function(e){return new $_(e)}:fUe,gUe=mUe,yUe=rC,bUe=_9,MUe=N9,wUe=aC,CUe=gUe,_Ue=lC,NUe=200;function kUe(e,n,o){var r=-1,a=bUe,l=e.length,i=!0,s=[],c=s;if(o)i=!1,a=MUe;else if(l>=NUe){var d=n?null:CUe(e);if(d)return _Ue(d);i=!1,a=wUe,c=new yUe}else c=n?[]:s;e:for(;++r<l;){var u=e[r],f=n?n(u):u;if(u=o||u!==0?u:0,i&&f===f){for(var p=c.length;p--;)if(c[p]===f)continue e;n&&c.push(f),s.push(u)}else a(c,f,o)||(c!==s&&c.push(f),s.push(u))}return s}var EUe=kUe,xUe=EUe;function TUe(e){return e&&e.length?xUe(e):[]}var SUe=TUe;const DUe=qn(SUe);function vUe({key:e,selected:n},o){let{loadedPages:r,allowInvertedSelection:a,includedIds:l,excludedIds:i,multiselect:s,itemToId:c=m=>m}=o;if(!e===void 0||e===null)return{includedIds:l,excludedIds:i};if(e==="*"){if(l.splice(0,l.length),i.splice(0,i.length),n&&s&&a&&l.push("*"),n&&s&&!a){let m=cUe(r.filter(y=>y.data).map(y=>y.data));l=DUe(m.map(y=>c(y)))}return{includedIds:l,excludedIds:i}}let u=l.includes("*"),f=l.includes(e),p=i.includes(e);if(s||(l.splice(0,l.length),i.splice(0,i.length)),u&&s){if(n&&p){let m=i.indexOf(e);i.splice(m,1)}!n&&!p&&s&&i.push(e)}else if(n&&!f&&(s?l.push(e):l=[e]),!n&&f){let m=l.indexOf(e);l.splice(m,1)}return{includedIds:l,excludedIds:i}}function IUe({pagesCount:e,currentPage:n,endingAdjacents:o=1,adjacents:r=2,next:a=!0,previous:l=!0,last:i=!1,first:s=!1,fixedWidth:c=!0}){const d=[];if(!e)return d;const u=c?o*2+r*2+3:o*2+1;if(e<=u)for(let f=0;f<e;f++)d.push(f);else{let f=0;for(let y=0;y<Math.min(o,e);y++)d.push(f=y);let p=o+r*2,m=r,g=r;c&&n<p&&(g+=p-n),c&&e-n-1<p&&(m+=p-(e-n-1));for(let y=Math.max(f+1,n-m);y<Math.min(n+g+1,e);y++)f+2===y&&d.push(f=f+1),f+1!==y&&d.push("...1"),d.push(f=y);for(let y=Math.max(f+1,e-o);y<e;y++)f+2===y&&d.push(f=f+1),f+1!==y&&d.push("...2"),d.push(f=y)}return l&&d.unshift("<"),a&&d.push(">"),s&&d.unshift("<<"),i&&d.push(">>"),d}const Fdt="",AUe={name:"LTablePagination",props:{pagesCount:Number,totalCount:Number,currentPage:{type:Number,default:2}},computed:{visiblePages(){return this.totalCount?IUe({pagesCount:this.pagesCount,currentPage:this.currentPage,adjacents:1,endingAdjacents:1,fixedWidth:!0}):["...1"]}},methods:{clicked(e){typeof e=="number"?this.goto(parseInt(e)):e==="<"?this.goto(this.currentPage-1):e===">"?this.goto(this.currentPage+1):e==="<<"?this.goto(0):e===">>"&&this.goto(this.pagesCount-1)},goto(e){this.currentPage!=e&&(e=Math.max(0,Math.min(e,this.pagesCount-1)),this.$emit("goto",e))}}},OUe={class:"l-table-pagination"},zUe=["onClick"];function BUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon");return t.openBlock(),t.createElementBlock("div",OUe,[t.createVNode(t.TransitionGroup,{tag:"div",class:"l-table-pagination-pages",name:"l-table-pagination-transition"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.visiblePages,s=>(t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["l-table-pagination-page-item",{active:s==o.currentPage}]),key:s,onClick:c=>l.clicked(s)},[s==="<"?(t.openBlock(),t.createBlock(i,{key:0,size:"20"},{default:t.withCtx(()=>n[0]||(n[0]=[t.createTextVNode("uil-angle-left")])),_:1})):s===">"?(t.openBlock(),t.createBlock(i,{key:1,size:"20"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-angle-right")])),_:1})):s==="...1"||s==="...2"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(" ... ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createTextVNode(t.toDisplayString(s+1),1)],64))],10,zUe))),128))]),_:1})])}const LUe=lt(AUe,[["render",BUe]]),Hdt="";o$.register();const VUe=100,$Ue=3e4,jUe=3,PUe="scrollBehavior"in document.documentElement.style,RUe={name:"LTable",tagName:"l-table",components:{LTableHeader:FHe,LTableBody:EHe,LTableReloader:tUe,LTableLoadMore:qHe,LTableEndspace:WHe,LTableBodySpacer:aUe,LTablePagination:LUe},props:{rows:{type:Array},primaryKey:{type:String,default:"id"},fetch:{type:Function},columns:{type:Array},pagination:{type:Boolean,default:!1},display:{type:String,enum:["all","more","paged"],default:"all"},autoLoadMore:{type:Boolean,default:!1},schema:{type:Object,required:!0},selectable:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},multiselect:{type:Boolean,default:!0},allowInvertedSelection:{type:Boolean,default:!0},rowHeight:{type:Number,default:32},borderTick:{type:Number,default:1},snapToPageOnMore:{type:Boolean,default:!0},stickyColumnLeft:{type:Boolean,default:!1},recycle:{type:Boolean,default:!0},limitPerPage:{type:Number,default:50}},emits:["loading","changeSelection","click-item"],mounted(){this.computeVisibleRows()},data(e){let n=[];return e.columns.length&&(n=e.columns.map(o=>this.buildColumnSpec(o))),{fetching:0,headerHeight:56,nonce:0,id:0,extraRows:15,lastComputedOffsetY:0,includedIds:[],excludedIds:[],scrollAtTop:!0,scrollAtLeft:!0,totalCount:0,firstPage:null,currentPage:null,lastPage:null,loadedPages:[],columnSpecs:n}},watch:{totalCount(e){this.$emit("changeSelection",{includedIds:this.includedIds,excludedIds:this.excludedIds,selectionCount:this.selectionCount,totalCount:e})},somePageIsLoading(e){this.$emit("loading",e)}},computed:{perPage(){return Number(this.limitPerPage)},pagesCount(){return Math.floor(this.totalCount/this.perPage)+1},selectionCount(){return this.includedIds.toString()==="*"?this.totalCount-this.excludedIds.length:this.includedIds.length},lastLoadedPage(){return this.loadedPages.length},isLoadMoreVisible(){return this.display==="more"&&this.lastLoadedPage<this.pagesCount},isPaginationVisible(){return(this.display==="page"||!!this.pagination)&&this.display!=="more"&&this.pagesCount!==null},isLeftColumnSticky(){return this.stickyColumnLeft||this.columns&&this.columns[0]&&this.columns[0].sticky},usingRecycledLayout(){return this.display!=="paged"&&this.recycle},hasVisibleFailedPages(){for(let e=this.firstPageRendered;e<=this.lastPageRendered;e++)if(this.loadedPages[e]&&this.loadedPages[e].failed)return!0;return!1},firstPageRendered(){return!this.usingRecycledLayout&&this.display!=="paged"?0:this.firstPage},lastPageRendered(){return this.display==="paged"?this.firstPage:this.usingRecycledLayout?this.lastPage:Math.max(0,this.lastLoadedPage-1)},visiblePages(){let e=[];for(let n=this.firstPageRendered;n<=this.lastPageRendered;n++){let o=this.loadedPages[n]||{index:n};e.push(o)}return e},contentStyle(){return{"--l-table-primary-color":"#2F8AF5","--l-table-warning-color":"#fd3a57","--l-table-bg-color":"white","--l-table-header-height":`${this.headerHeight}px`,"--l-table-header-text-color":"#232B34","--l-table-header-border-color":"#E8E8E8","--l-table-skeleton-height":`${Math.min(this.rowHeight-8,8)}px`,"--l-table-loader-height":"3px","--l-table-loader-color":"var(--l-table-primary-color)","--l-table-row-height":`${this.rowHeight}px`,"--l-table-cell-padding":"0 8px","--l-table-row-hover-color":"#fafbfd","--l-table-row-selected-color":"#eef5fa","--l-table-row-selected-hover-color":"#e6f0f8","--l-table-border-color":"#D3DAE6","--l-table-border-tick":`${this.borderTick}px`,"--l-table-selector-width":`${this.selectable?Math.min(this.headerHeight,this.rowHeight):0}px`,"--l-table-loadmore-height":"46px","--l-table-pagination-height":"48px","--l-table-pagination-color":"var(--l-table-primary-color)","--l-table-pagination-bg-color":"white","--l-table-reloader-margin":"16px","--l-table-endspace-bg-color":"#f5f5f5","--l-table-link-color":"var(--l-table-primary-color)"}},contentClasses(){return{"l-table-at-top":this.scrollAtTop,"l-table-at-left":this.scrollAtLeft,"l-table-sticky-column-left":this.isLeftColumnSticky}},spacing(){let e=0,n=0,o=this.display,r=this.totalCount;return o==="more"&&(r=this.loadedPages.length*this.perPage),(o==="all"||o==="more")&&(e=this.firstPageRendered*this.perPage*this.rowHeight,n=Math.max(0,(r-(this.lastPageRendered+1)*this.perPage)*this.rowHeight)),{top:Math.max(0,e),bottom:Math.max(0,n)}},rect(){return this.$refs.container.getBoundingClientRect()},somePageIsLoading(){return this.loadedPages.map(e=>e.loading).some(e=>e)}},methods:{itemToId(e){return e?this.primaryKey?e[this.primaryKey]:e:null},scrollTo(e=0,n){let o="auto";if(n){let r=this.$refs.container.scrollTop,a=this.perPage*this.rowHeight+1;o=Math.abs(r-e)<a?"smooth":"auto"}this.$refs.container.scrollTo({top:e,behavior:o})},gotoPage(e,n){if(e=Math.max(0,Math.min(this.pagesCount,e)),this.display==="paged"){this.setViewablePages(e,e,e),this.scrollTo(0,!0);return}this.display==="more"?this.setViewablePages(e-1,e,e):this.setViewablePages(e,e,e);let o=e*this.rowHeight*this.perPage;this.scrollTo(o,n)},async loadMore(e){let n=this.loadedPages[this.loadedPages.length-1];if(!n||n.loading)return!1;let o=this.loadedPages.length;this.setViewablePages(this.firstPage,o),e&&this.snapToPageOnMore&&PUe&&setTimeout(()=>this.gotoPage(o,!0),100)},reload(){this.id++,this.fetching=0,this.firstPage=null,this.lastPage=null,this.totalCount=null,this.loadedPages=[],this.includedIds=[],this.excludedIds=[],this.gotoPage(0),this.computeVisibleRows()},reloadFailedPages(){let e=0;for(let n=this.firstPageRendered;n<=this.lastPageRendered&&!(!(!this.loadedPages[n]||!this.loadedPages[n].failed)&&(this.loadedPages[n]=null,this.fetchPage(n),++e>=jUe));n++);},onScroll(){if(!(this.getScrollSpeed()>$Ue)&&!this._scrollDebounce)return this.computeVisibleRows();clearTimeout(this._scrollDebounce),this._scrollDebounce=setTimeout(()=>{this.computeVisibleRows(),this._scrollDebounce=null},VUe)},getScrollSpeed(){let e=this._lastOffsetY||0,n=this._lastOffsetYTime||0,o=this._lastOffsetY=this.$refs.container.scrollTop,r=this._lastOffsetYTime=Date.now();return Math.abs(1e3*(e-o)/(r-n))},computeVisibleRows(){let e=this.$refs.container.scrollTop,n=this.$refs.container.scrollLeft,o=this.lastComputedOffsetY;this.scrollAtTop=e===0,this.scrollAtLeft=n===0;let r=Math.abs(o-e);if(e>2&&o>2&&r<150||(this.lastComputedOffsetY=e,this.display==="paged"))return;let l=this.rect.height-this.headerHeight,i=Math.max(0,Math.floor(e/this.rowHeight)),s=Math.ceil(l/this.rowHeight),c=i+s,d=this.extraRows,u=this.perPage,f=Math.floor((i-d)/this.perPage),p=Math.floor((c+d)/u),m=p>=this.pagesCount-1?s:s/2,g=Math.floor((i+m)/this.perPage);if(this.display==="more"){for(f=Math.min(f,this.lastLoadedPage);!this.loadedPages[f]&&f>0;)f--;for(p=Math.max(p,f);!this.loadedPages[p]&&p>f&&p>0;)p--}this.setViewablePages(f,p,g)},setViewablePages(e=0,n=0,o=0){this.display==="paged"&&(n=e),e=Math.min(Math.max(e,0),this.pagesCount-1),n=Math.min(Math.max(n,e),this.pagesCount-1),o=Math.min(n,Math.max(e,o||0));let r=e!==this.firstPage||n!==this.lastPage;this.firstPage=e,this.lastPage=n,this.currentPage=o,r&&this.scheduleFeching()},buildColumnSpec(e){if(!this.schema.fields)throw new Error("Missing schema.fields!");const n=this.schema.fields.find(r=>r.path===e.path);if(!n)throw new Error(`Missing field schema for path ${e.path}`);const o=this.$L.FieldTypeComponents.get(n,"default");return Object.assign({},n,{width:e.width||null,sortable:n?n.sortable:!1,sticky:n&&n.sticky||e.sticky||!1,align:n&&n.align||"left",column:e,field:n,component:o})},handleColumnSpecsUpdate(e){this.columnSpecs=e},changeSelection({key:e,selected:n}){const{includedIds:o,excludedIds:r}=vUe({key:e,selected:n},this);this.includedIds=o,this.excludedIds=r,this.$nextTick(()=>{this.$emit("changeSelection",{includedIds:this.includedIds,excludedIds:this.excludedIds,selectionCount:this.selectionCount,totalCount:this.totalCount})})},scheduleFeching(){for(let e=this.firstPage;e<=this.lastPage;e++)this.fetchPage(e)},async fetchPage(e){let n=this.loadedPages[e];if(n)return n;n=this.loadedPages[e]={id:this.id,index:e,startedAt:Date.now(),duration:null,loading:!0,loaded:!1,failed:!1,error:null,data:null};try{this.fetching++;const{hits:o,total:r}=await this.resolvePageData(e);Object.assign(n,{duration:Date.now()-n.startedAt,loading:!1,loaded:!0,data:o});let a=this.loadedPages.indexOf(n)>=0;r!==void 0&&a&&(this.totalCount=r)}catch(o){console.error("LTable","Failed to call `fetch` callback",o),Object.assign(n,{loading:!1,failed:!0,error:o.toString()})}finally{this.id===n.id&&this.fetching--}return n},async resolvePageData(e){if(this.rows){let n=this.perPage,o=e*n;return{data:this.rows.slice(o,o+n),total:this.rows.length}}else{if(this.fetch)return await this.fetch({page:e,offset:e*this.perPage,limit:this.perPage,schema:this.schema,columns:this.columns,perPage:this.perPage,primaryKey:this.primaryKey});throw new Error("Cannot discover data. Either `rows` or `fetch` property must be assigned to table")}}}},FUe={class:"l-table-table",border:"0"};function HUe(e,n,o,r,a,l){const i=t.resolveComponent("LTableHeader"),s=t.resolveComponent("LTableBodySpacer"),c=t.resolveComponent("LTableBody"),d=t.resolveComponent("LTableLoadMore"),u=t.resolveComponent("LTableEndspace"),f=t.resolveComponent("LTableReloader"),p=t.resolveComponent("LTablePagination");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-container",l.contentClasses]),ref:"container",style:t.normalizeStyle(l.contentStyle),onScroll:n[7]||(n[7]=(...m)=>l.onScroll&&l.onScroll(...m))},[t.createElementVNode("table",FUe,[n[8]||(n[8]=t.createElementVNode("caption",{style:{display:"none"}}," Table Header ",-1)),t.createVNode(i,{height:a.headerHeight,selectable:o.selectable,columnSpecs:a.columnSpecs,loading:!!a.fetching,total:a.totalCount,includedIds:a.includedIds,excludedIds:a.excludedIds,multiselect:o.multiselect,onSelected:n[0]||(n[0]=m=>l.changeSelection(m)),"onColumnSpecs:update":l.handleColumnSpecsUpdate},null,8,["height","selectable","columnSpecs","loading","total","includedIds","excludedIds","multiselect","onColumnSpecs:update"]),t.createVNode(s,{height:l.spacing.top},null,8,["height"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.visiblePages,m=>(t.openBlock(),t.createBlock(c,{key:`${m.index}-${m.loading}-${m.loaded}`,page:m,perPage:l.perPage,pagesCount:l.pagesCount,totalCount:a.totalCount,selectable:o.selectable,clickable:o.clickable,columnSpecs:a.columnSpecs,includedIds:a.includedIds,excludedIds:a.excludedIds,multiselect:o.multiselect,onClickItem:n[1]||(n[1]=g=>e.$emit("click-item",g)),onSelected:n[2]||(n[2]=g=>l.changeSelection(g))},null,8,["page","perPage","pagesCount","totalCount","selectable","clickable","columnSpecs","includedIds","excludedIds","multiselect"]))),128)),t.createVNode(s,{height:l.spacing.bottom},null,8,["height"])]),l.isLoadMoreVisible?(t.openBlock(),t.createBlock(d,{key:0,onClick:n[3]||(n[3]=m=>l.loadMore(!0)),onAppeared:n[4]||(n[4]=m=>l.loadMore()),automatic:o.autoLoadMore},null,8,["automatic"])):t.createCommentVNode("",!0),t.createVNode(u),t.createVNode(t.Transition,{name:"scale-up"},{default:t.withCtx(()=>[l.hasVisibleFailedPages?(t.openBlock(),t.createBlock(f,{key:0,onReload:n[5]||(n[5]=m=>l.reloadFailedPages())})):t.createCommentVNode("",!0)]),_:1}),l.isPaginationVisible?(t.openBlock(),t.createBlock(p,{key:1,currentPage:a.currentPage,pagesCount:l.pagesCount,totalCount:a.totalCount,onGoto:n[6]||(n[6]=m=>l.gotoPage(m))},null,8,["currentPage","pagesCount","totalCount"])):t.createCommentVNode("",!0)],38)}const UUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(RUe,[["render",HUe]])},Symbol.toStringTag,{value:"Module"})),Ydt="",YUe={name:"LTabs",components:{ElTabs:bw},methods:{calcPaneInstances(e=!1){if(this.$slots.default){const o=this.$slots.default.filter(a=>a.tag&&a.componentOptions&&a.componentOptions.Ctor.options.tagName==="l-tab-pane").map(({componentInstance:a})=>a),r=!(o.length===this.panes.length&&o.every((a,l)=>a===this.panes[l]));(e||r)&&(this.panes=o)}else this.panes.length!==0&&(this.panes=[])}},data(){return{panes:[]}}};function WUe(e,n,o,r,a,l){const i=t.resolveComponent("el-tabs");return t.openBlock(),t.createBlock(i,t.normalizeProps(t.guardReactiveProps(e.$attrs)),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16)}const QUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(YUe,[["render",WUe],["__scopeId","data-v-66db6dd7"]])},Symbol.toStringTag,{value:"Module"})),KUe={tagName:"l-target-chip",name:"LTargetChip",props:{kind:{type:String,required:!0},closeable:{type:Boolean,default:!1},name:{type:String,required:!0},count:{type:Number}},computed:{color:function(){return{member:"purple",group:"aqua",user:"link",tag:"warning",community:"danger",role:"lead-light"}[this.kind]||"lead"},icon:function(){return{member:"uil-graduation-cap",group:"uil-users-alt",user:"uil-user",tag:"uil-tag-alt",role:"uil-user",community:"uil-channel"}[this.kind]}}},qUe={class:"l-d-flex l-align-items"};function GUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-chip");return t.openBlock(),t.createBlock(s,{style:{height:"24px"},bold:"",fill:"",color:l.color,icon:l.icon},{default:t.withCtx(()=>[t.createElementVNode("div",qUe,[t.createTextVNode(t.toDisplayString(o.count)+" "+t.toDisplayString(o.name)+" ",1),o.closeable?(t.openBlock(),t.createBlock(i,{key:0,onClick:n[0]||(n[0]=c=>e.$emit("remove")),class:"l-d-flex l-align-items-center ml-1 mr-0",style:{cursor:"pointer"},size:"15"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode(" uis-times-circle ")])),_:1})):t.createCommentVNode("",!0)])]),_:1},8,["color","icon"])}const XUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(KUe,[["render",GUe]])},Symbol.toStringTag,{value:"Module"})),Kdt="",ZUe={tagName:"l-target-input",name:"LTargetInput",props:{topics:{type:Array,required:!0},limit:{type:Number,default:3},editable:{type:Boolean,default:!1}},computed:{topicsToShow(){return this.topics.slice(0,this.limit)},moreTopicsText(){const e=this.topics.length-this.limit>1;return`+ ${this.topics.length-this.limit} destinatário`+(e?"s":"")}}};function JUe(e,n,o,r,a,l){const i=t.resolveComponent("l-target-chip"),s=t.resolveComponent("l-chip");return o.topics&&o.topics.length?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass("l-target-input"+(o.editable?" editable":""))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.topicsToShow,c=>(t.openBlock(),t.createBlock(i,{kind:c.kind,name:c.name,key:c.id,class:"mr-2 mb-2"},null,8,["kind","name"]))),128)),o.topics.length>this.limit?(t.openBlock(),t.createBlock(s,{key:0,color:"purple",class:"mb-2",fill:"","hide-icon":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.moreTopicsText),1)]),_:1})):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)}const eYe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(ZUe,[["render",JUe],["__scopeId","data-v-1da7433b"]])},Symbol.toStringTag,{value:"Module"}));function So(e){this.content=e}So.prototype={constructor:So,find:function(e){for(var n=0;n<this.content.length;n+=2)if(this.content[n]===e)return n;return-1},get:function(e){var n=this.find(e);return n==-1?void 0:this.content[n+1]},update:function(e,n,o){var r=o&&o!=e?this.remove(o):this,a=r.find(e),l=r.content.slice();return a==-1?l.push(o||e,n):(l[a+1]=n,o&&(l[a]=o)),new So(l)},remove:function(e){var n=this.find(e);if(n==-1)return this;var o=this.content.slice();return o.splice(n,2),new So(o)},addToStart:function(e,n){return new So([e,n].concat(this.remove(e).content))},addToEnd:function(e,n){var o=this.remove(e).content.slice();return o.push(e,n),new So(o)},addBefore:function(e,n,o){var r=this.remove(n),a=r.content.slice(),l=r.find(e);return a.splice(l==-1?a.length:l,0,n,o),new So(a)},forEach:function(e){for(var n=0;n<this.content.length;n+=2)e(this.content[n],this.content[n+1])},prepend:function(e){return e=So.from(e),e.size?new So(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=So.from(e),e.size?new So(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var n=this;e=So.from(e);for(var o=0;o<e.content.length;o+=2)n=n.remove(e.content[o]);return n},toObject:function(){var e={};return this.forEach(function(n,o){e[n]=o}),e},get size(){return this.content.length>>1}},So.from=function(e){if(e instanceof So)return e;var n=[];if(e)for(var o in e)n.push(o,e[o]);return new So(n)};function r$(e,n,o){for(let r=0;;r++){if(r==e.childCount||r==n.childCount)return e.childCount==n.childCount?null:o;let a=e.child(r),l=n.child(r);if(a==l){o+=a.nodeSize;continue}if(!a.sameMarkup(l))return o;if(a.isText&&a.text!=l.text){for(let i=0;a.text[i]==l.text[i];i++)o++;return o}if(a.content.size||l.content.size){let i=r$(a.content,l.content,o+1);if(i!=null)return i}o+=a.nodeSize}}function a$(e,n,o,r){for(let a=e.childCount,l=n.childCount;;){if(a==0||l==0)return a==l?null:{a:o,b:r};let i=e.child(--a),s=n.child(--l),c=i.nodeSize;if(i==s){o-=c,r-=c;continue}if(!i.sameMarkup(s))return{a:o,b:r};if(i.isText&&i.text!=s.text){let d=0,u=Math.min(i.text.length,s.text.length);for(;d<u&&i.text[i.text.length-d-1]==s.text[s.text.length-d-1];)d++,o--,r--;return{a:o,b:r}}if(i.content.size||s.content.size){let d=a$(i.content,s.content,o-1,r-1);if(d)return d}o-=c,r-=c}}class Ye{constructor(n,o){if(this.content=n,this.size=o||0,o==null)for(let r=0;r<n.length;r++)this.size+=n[r].nodeSize}nodesBetween(n,o,r,a=0,l){for(let i=0,s=0;s<o;i++){let c=this.content[i],d=s+c.nodeSize;if(d>n&&r(c,a+s,l||null,i)!==!1&&c.content.size){let u=s+1;c.nodesBetween(Math.max(0,n-u),Math.min(c.content.size,o-u),r,a+u)}s=d}}descendants(n){this.nodesBetween(0,this.size,n)}textBetween(n,o,r,a){let l="",i=!0;return this.nodesBetween(n,o,(s,c)=>{let d=s.isText?s.text.slice(Math.max(n,c)-c,o-c):s.isLeaf?a?typeof a=="function"?a(s):a:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&d||s.isTextblock)&&r&&(i?i=!1:l+=r),l+=d},0),l}append(n){if(!n.size)return this;if(!this.size)return n;let o=this.lastChild,r=n.firstChild,a=this.content.slice(),l=0;for(o.isText&&o.sameMarkup(r)&&(a[a.length-1]=o.withText(o.text+r.text),l=1);l<n.content.length;l++)a.push(n.content[l]);return new Ye(a,this.size+n.size)}cut(n,o=this.size){if(n==0&&o==this.size)return this;let r=[],a=0;if(o>n)for(let l=0,i=0;i<o;l++){let s=this.content[l],c=i+s.nodeSize;c>n&&((i<n||c>o)&&(s.isText?s=s.cut(Math.max(0,n-i),Math.min(s.text.length,o-i)):s=s.cut(Math.max(0,n-i-1),Math.min(s.content.size,o-i-1))),r.push(s),a+=s.nodeSize),i=c}return new Ye(r,a)}cutByIndex(n,o){return n==o?Ye.empty:n==0&&o==this.content.length?this:new Ye(this.content.slice(n,o))}replaceChild(n,o){let r=this.content[n];if(r==o)return this;let a=this.content.slice(),l=this.size+o.nodeSize-r.nodeSize;return a[n]=o,new Ye(a,l)}addToStart(n){return new Ye([n].concat(this.content),this.size+n.nodeSize)}addToEnd(n){return new Ye(this.content.concat(n),this.size+n.nodeSize)}eq(n){if(this.content.length!=n.content.length)return!1;for(let o=0;o<this.content.length;o++)if(!this.content[o].eq(n.content[o]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(n){let o=this.content[n];if(!o)throw new RangeError("Index "+n+" out of range for "+this);return o}maybeChild(n){return this.content[n]||null}forEach(n){for(let o=0,r=0;o<this.content.length;o++){let a=this.content[o];n(a,r,o),r+=a.nodeSize}}findDiffStart(n,o=0){return r$(this,n,o)}findDiffEnd(n,o=this.size,r=n.size){return a$(this,n,o,r)}findIndex(n,o=-1){if(n==0)return _1(0,n);if(n==this.size)return _1(this.content.length,n);if(n>this.size||n<0)throw new RangeError(`Position ${n} outside of fragment (${this})`);for(let r=0,a=0;;r++){let l=this.child(r),i=a+l.nodeSize;if(i>=n)return i==n||o>0?_1(r+1,i):_1(r,a);a=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(n=>n.toJSON()):null}static fromJSON(n,o){if(!o)return Ye.empty;if(!Array.isArray(o))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ye(o.map(n.nodeFromJSON))}static fromArray(n){if(!n.length)return Ye.empty;let o,r=0;for(let a=0;a<n.length;a++){let l=n[a];r+=l.nodeSize,a&&l.isText&&n[a-1].sameMarkup(l)?(o||(o=n.slice(0,a)),o[o.length-1]=l.withText(o[o.length-1].text+l.text)):o&&o.push(l)}return new Ye(o||n,r)}static from(n){if(!n)return Ye.empty;if(n instanceof Ye)return n;if(Array.isArray(n))return this.fromArray(n);if(n.attrs)return new Ye([n],n.nodeSize);throw new RangeError("Can not convert "+n+" to a Fragment"+(n.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ye.empty=new Ye([],0);const j_={index:0,offset:0};function _1(e,n){return j_.index=e,j_.offset=n,j_}function N1(e,n){if(e===n)return!0;if(!(e&&typeof e=="object")||!(n&&typeof n=="object"))return!1;let o=Array.isArray(e);if(Array.isArray(n)!=o)return!1;if(o){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!N1(e[r],n[r]))return!1}else{for(let r in e)if(!(r in n)||!N1(e[r],n[r]))return!1;for(let r in n)if(!(r in e))return!1}return!0}let mn=class aE{constructor(n,o){this.type=n,this.attrs=o}addToSet(n){let o,r=!1;for(let a=0;a<n.length;a++){let l=n[a];if(this.eq(l))return n;if(this.type.excludes(l.type))o||(o=n.slice(0,a));else{if(l.type.excludes(this.type))return n;!r&&l.type.rank>this.type.rank&&(o||(o=n.slice(0,a)),o.push(this),r=!0),o&&o.push(l)}}return o||(o=n.slice()),r||o.push(this),o}removeFromSet(n){for(let o=0;o<n.length;o++)if(this.eq(n[o]))return n.slice(0,o).concat(n.slice(o+1));return n}isInSet(n){for(let o=0;o<n.length;o++)if(this.eq(n[o]))return!0;return!1}eq(n){return this==n||this.type==n.type&&N1(this.attrs,n.attrs)}toJSON(){let n={type:this.type.name};for(let o in this.attrs){n.attrs=this.attrs;break}return n}static fromJSON(n,o){if(!o)throw new RangeError("Invalid input for Mark.fromJSON");let r=n.marks[o.type];if(!r)throw new RangeError(`There is no mark type ${o.type} in this schema`);let a=r.create(o.attrs);return r.checkAttrs(a.attrs),a}static sameSet(n,o){if(n==o)return!0;if(n.length!=o.length)return!1;for(let r=0;r<n.length;r++)if(!n[r].eq(o[r]))return!1;return!0}static setFrom(n){if(!n||Array.isArray(n)&&n.length==0)return aE.none;if(n instanceof aE)return[n];let o=n.slice();return o.sort((r,a)=>r.type.rank-a.type.rank),o}};mn.none=[];class k1 extends Error{}class ct{constructor(n,o,r){this.content=n,this.openStart=o,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(n,o){let r=i$(this.content,n+this.openStart,o);return r&&new ct(r,this.openStart,this.openEnd)}removeBetween(n,o){return new ct(l$(this.content,n+this.openStart,o+this.openStart),this.openStart,this.openEnd)}eq(n){return this.content.eq(n.content)&&this.openStart==n.openStart&&this.openEnd==n.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let n={content:this.content.toJSON()};return this.openStart>0&&(n.openStart=this.openStart),this.openEnd>0&&(n.openEnd=this.openEnd),n}static fromJSON(n,o){if(!o)return ct.empty;let r=o.openStart||0,a=o.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ct(Ye.fromJSON(n,o.content),r,a)}static maxOpen(n,o=!0){let r=0,a=0;for(let l=n.firstChild;l&&!l.isLeaf&&(o||!l.type.spec.isolating);l=l.firstChild)r++;for(let l=n.lastChild;l&&!l.isLeaf&&(o||!l.type.spec.isolating);l=l.lastChild)a++;return new ct(n,r,a)}}ct.empty=new ct(Ye.empty,0,0);function l$(e,n,o){let{index:r,offset:a}=e.findIndex(n),l=e.maybeChild(r),{index:i,offset:s}=e.findIndex(o);if(a==n||l.isText){if(s!=o&&!e.child(i).isText)throw new RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(o))}if(r!=i)throw new RangeError("Removing non-flat range");return e.replaceChild(r,l.copy(l$(l.content,n-a-1,o-a-1)))}function i$(e,n,o,r){let{index:a,offset:l}=e.findIndex(n),i=e.maybeChild(a);if(l==n||i.isText)return r&&!r.canReplace(a,a,o)?null:e.cut(0,n).append(o).append(e.cut(n));let s=i$(i.content,n-l-1,o);return s&&e.replaceChild(a,i.copy(s))}function tYe(e,n,o){if(o.openStart>e.depth)throw new k1("Inserted content deeper than insertion position");if(e.depth-o.openStart!=n.depth-o.openEnd)throw new k1("Inconsistent open depths");return s$(e,n,o,0)}function s$(e,n,o,r){let a=e.index(r),l=e.node(r);if(a==n.index(r)&&r<e.depth-o.openStart){let i=s$(e,n,o,r+1);return l.copy(l.content.replaceChild(a,i))}else if(o.content.size)if(!o.openStart&&!o.openEnd&&e.depth==r&&n.depth==r){let i=e.parent,s=i.content;return Uc(i,s.cut(0,e.parentOffset).append(o.content).append(s.cut(n.parentOffset)))}else{let{start:i,end:s}=nYe(o,e);return Uc(l,d$(e,i,s,n,r))}else return Uc(l,E1(e,n,r))}function c$(e,n){if(!n.type.compatibleContent(e.type))throw new k1("Cannot join "+n.type.name+" onto "+e.type.name)}function P_(e,n,o){let r=e.node(o);return c$(r,n.node(o)),r}function Hc(e,n){let o=n.length-1;o>=0&&e.isText&&e.sameMarkup(n[o])?n[o]=e.withText(n[o].text+e.text):n.push(e)}function fh(e,n,o,r){let a=(n||e).node(o),l=0,i=n?n.index(o):a.childCount;e&&(l=e.index(o),e.depth>o?l++:e.textOffset&&(Hc(e.nodeAfter,r),l++));for(let s=l;s<i;s++)Hc(a.child(s),r);n&&n.depth==o&&n.textOffset&&Hc(n.nodeBefore,r)}function Uc(e,n){return e.type.checkContent(n),e.copy(n)}function d$(e,n,o,r,a){let l=e.depth>a&&P_(e,n,a+1),i=r.depth>a&&P_(o,r,a+1),s=[];return fh(null,e,a,s),l&&i&&n.index(a)==o.index(a)?(c$(l,i),Hc(Uc(l,d$(e,n,o,r,a+1)),s)):(l&&Hc(Uc(l,E1(e,n,a+1)),s),fh(n,o,a,s),i&&Hc(Uc(i,E1(o,r,a+1)),s)),fh(r,null,a,s),new Ye(s)}function E1(e,n,o){let r=[];if(fh(null,e,o,r),e.depth>o){let a=P_(e,n,o+1);Hc(Uc(a,E1(e,n,o+1)),r)}return fh(n,null,o,r),new Ye(r)}function nYe(e,n){let o=n.depth-e.openStart,a=n.node(o).copy(e.content);for(let l=o-1;l>=0;l--)a=n.node(l).copy(Ye.from(a));return{start:a.resolveNoCache(e.openStart+o),end:a.resolveNoCache(a.content.size-e.openEnd-o)}}class ph{constructor(n,o,r){this.pos=n,this.path=o,this.parentOffset=r,this.depth=o.length/3-1}resolveDepth(n){return n==null?this.depth:n<0?this.depth+n:n}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(n){return this.path[this.resolveDepth(n)*3]}index(n){return this.path[this.resolveDepth(n)*3+1]}indexAfter(n){return n=this.resolveDepth(n),this.index(n)+(n==this.depth&&!this.textOffset?0:1)}start(n){return n=this.resolveDepth(n),n==0?0:this.path[n*3-1]+1}end(n){return n=this.resolveDepth(n),this.start(n)+this.node(n).content.size}before(n){if(n=this.resolveDepth(n),!n)throw new RangeError("There is no position before the top-level node");return n==this.depth+1?this.pos:this.path[n*3-1]}after(n){if(n=this.resolveDepth(n),!n)throw new RangeError("There is no position after the top-level node");return n==this.depth+1?this.pos:this.path[n*3-1]+this.path[n*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let n=this.parent,o=this.index(this.depth);if(o==n.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=n.child(o);return r?n.child(o).cut(r):a}get nodeBefore(){let n=this.index(this.depth),o=this.pos-this.path[this.path.length-1];return o?this.parent.child(n).cut(0,o):n==0?null:this.parent.child(n-1)}posAtIndex(n,o){o=this.resolveDepth(o);let r=this.path[o*3],a=o==0?0:this.path[o*3-1]+1;for(let l=0;l<n;l++)a+=r.child(l).nodeSize;return a}marks(){let n=this.parent,o=this.index();if(n.content.size==0)return mn.none;if(this.textOffset)return n.child(o).marks;let r=n.maybeChild(o-1),a=n.maybeChild(o);if(!r){let s=r;r=a,a=s}let l=r.marks;for(var i=0;i<l.length;i++)l[i].type.spec.inclusive===!1&&(!a||!l[i].isInSet(a.marks))&&(l=l[i--].removeFromSet(l));return l}marksAcross(n){let o=this.parent.maybeChild(this.index());if(!o||!o.isInline)return null;let r=o.marks,a=n.parent.maybeChild(n.index());for(var l=0;l<r.length;l++)r[l].type.spec.inclusive===!1&&(!a||!r[l].isInSet(a.marks))&&(r=r[l--].removeFromSet(r));return r}sharedDepth(n){for(let o=this.depth;o>0;o--)if(this.start(o)<=n&&this.end(o)>=n)return o;return 0}blockRange(n=this,o){if(n.pos<this.pos)return n.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==n.pos?1:0);r>=0;r--)if(n.pos<=this.end(r)&&(!o||o(this.node(r))))return new x1(this,n,r);return null}sameParent(n){return this.pos-this.parentOffset==n.pos-n.parentOffset}max(n){return n.pos>this.pos?n:this}min(n){return n.pos<this.pos?n:this}toString(){let n="";for(let o=1;o<=this.depth;o++)n+=(n?"/":"")+this.node(o).type.name+"_"+this.index(o-1);return n+":"+this.parentOffset}static resolve(n,o){if(!(o>=0&&o<=n.content.size))throw new RangeError("Position "+o+" out of range");let r=[],a=0,l=o;for(let i=n;;){let{index:s,offset:c}=i.content.findIndex(l),d=l-c;if(r.push(i,s,a+c),!d||(i=i.child(s),i.isText))break;l=d-1,a+=c+1}return new ph(o,r,l)}static resolveCached(n,o){let r=u$.get(n);if(r)for(let l=0;l<r.elts.length;l++){let i=r.elts[l];if(i.pos==o)return i}else u$.set(n,r=new oYe);let a=r.elts[r.i]=ph.resolve(n,o);return r.i=(r.i+1)%rYe,a}}class oYe{constructor(){this.elts=[],this.i=0}}const rYe=12,u$=new WeakMap;class x1{constructor(n,o,r){this.$from=n,this.$to=o,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const aYe=Object.create(null);let Yc=class lE{constructor(n,o,r,a=mn.none){this.type=n,this.attrs=o,this.marks=a,this.content=r||Ye.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(n){return this.content.child(n)}maybeChild(n){return this.content.maybeChild(n)}forEach(n){this.content.forEach(n)}nodesBetween(n,o,r,a=0){this.content.nodesBetween(n,o,r,a,this)}descendants(n){this.nodesBetween(0,this.content.size,n)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(n,o,r,a){return this.content.textBetween(n,o,r,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(n){return this==n||this.sameMarkup(n)&&this.content.eq(n.content)}sameMarkup(n){return this.hasMarkup(n.type,n.attrs,n.marks)}hasMarkup(n,o,r){return this.type==n&&N1(this.attrs,o||n.defaultAttrs||aYe)&&mn.sameSet(this.marks,r||mn.none)}copy(n=null){return n==this.content?this:new lE(this.type,this.attrs,n,this.marks)}mark(n){return n==this.marks?this:new lE(this.type,this.attrs,this.content,n)}cut(n,o=this.content.size){return n==0&&o==this.content.size?this:this.copy(this.content.cut(n,o))}slice(n,o=this.content.size,r=!1){if(n==o)return ct.empty;let a=this.resolve(n),l=this.resolve(o),i=r?0:a.sharedDepth(o),s=a.start(i),d=a.node(i).content.cut(a.pos-s,l.pos-s);return new ct(d,a.depth-i,l.depth-i)}replace(n,o,r){return tYe(this.resolve(n),this.resolve(o),r)}nodeAt(n){for(let o=this;;){let{index:r,offset:a}=o.content.findIndex(n);if(o=o.maybeChild(r),!o)return null;if(a==n||o.isText)return o;n-=a+1}}childAfter(n){let{index:o,offset:r}=this.content.findIndex(n);return{node:this.content.maybeChild(o),index:o,offset:r}}childBefore(n){if(n==0)return{node:null,index:0,offset:0};let{index:o,offset:r}=this.content.findIndex(n);if(r<n)return{node:this.content.child(o),index:o,offset:r};let a=this.content.child(o-1);return{node:a,index:o-1,offset:r-a.nodeSize}}resolve(n){return ph.resolveCached(this,n)}resolveNoCache(n){return ph.resolve(this,n)}rangeHasMark(n,o,r){let a=!1;return o>n&&this.nodesBetween(n,o,l=>(r.isInSet(l.marks)&&(a=!0),!a)),a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let n=this.type.name;return this.content.size&&(n+="("+this.content.toStringInner()+")"),f$(this.marks,n)}contentMatchAt(n){let o=this.type.contentMatch.matchFragment(this.content,0,n);if(!o)throw new Error("Called contentMatchAt on a node with invalid content");return o}canReplace(n,o,r=Ye.empty,a=0,l=r.childCount){let i=this.contentMatchAt(n).matchFragment(r,a,l),s=i&&i.matchFragment(this.content,o);if(!s||!s.validEnd)return!1;for(let c=a;c<l;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(n,o,r,a){if(a&&!this.type.allowsMarks(a))return!1;let l=this.contentMatchAt(n).matchType(r),i=l&&l.matchFragment(this.content,o);return i?i.validEnd:!1}canAppend(n){return n.content.size?this.canReplace(this.childCount,this.childCount,n.content):this.type.compatibleContent(n.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let n=mn.none;for(let o=0;o<this.marks.length;o++){let r=this.marks[o];r.type.checkAttrs(r.attrs),n=r.addToSet(n)}if(!mn.sameSet(n,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(o=>o.type.name)}`);this.content.forEach(o=>o.check())}toJSON(){let n={type:this.type.name};for(let o in this.attrs){n.attrs=this.attrs;break}return this.content.size&&(n.content=this.content.toJSON()),this.marks.length&&(n.marks=this.marks.map(o=>o.toJSON())),n}static fromJSON(n,o){if(!o)throw new RangeError("Invalid input for Node.fromJSON");let r;if(o.marks){if(!Array.isArray(o.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=o.marks.map(n.markFromJSON)}if(o.type=="text"){if(typeof o.text!="string")throw new RangeError("Invalid text node in JSON");return n.text(o.text,r)}let a=Ye.fromJSON(n,o.content),l=n.nodeType(o.type).create(o.attrs,a,r);return l.type.checkAttrs(l.attrs),l}};Yc.prototype.text=void 0;class T1 extends Yc{constructor(n,o,r,a){if(super(n,o,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):f$(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(n,o){return this.text.slice(n,o)}get nodeSize(){return this.text.length}mark(n){return n==this.marks?this:new T1(this.type,this.attrs,this.text,n)}withText(n){return n==this.text?this:new T1(this.type,this.attrs,n,this.marks)}cut(n=0,o=this.text.length){return n==0&&o==this.text.length?this:this.withText(this.text.slice(n,o))}eq(n){return this.sameMarkup(n)&&this.text==n.text}toJSON(){let n=super.toJSON();return n.text=this.text,n}}function f$(e,n){for(let o=e.length-1;o>=0;o--)n=e[o].type.name+"("+n+")";return n}class Wc{constructor(n){this.validEnd=n,this.next=[],this.wrapCache=[]}static parse(n,o){let r=new lYe(n,o);if(r.next==null)return Wc.empty;let a=p$(r);r.next&&r.err("Unexpected trailing text");let l=pYe(fYe(a));return hYe(l,r),l}matchType(n){for(let o=0;o<this.next.length;o++)if(this.next[o].type==n)return this.next[o].next;return null}matchFragment(n,o=0,r=n.childCount){let a=this;for(let l=o;a&&l<r;l++)a=a.matchType(n.child(l).type);return a}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let n=0;n<this.next.length;n++){let{type:o}=this.next[n];if(!(o.isText||o.hasRequiredAttrs()))return o}return null}compatible(n){for(let o=0;o<this.next.length;o++)for(let r=0;r<n.next.length;r++)if(this.next[o].type==n.next[r].type)return!0;return!1}fillBefore(n,o=!1,r=0){let a=[this];function l(i,s){let c=i.matchFragment(n,r);if(c&&(!o||c.validEnd))return Ye.from(s.map(d=>d.createAndFill()));for(let d=0;d<i.next.length;d++){let{type:u,next:f}=i.next[d];if(!(u.isText||u.hasRequiredAttrs())&&a.indexOf(f)==-1){a.push(f);let p=l(f,s.concat(u));if(p)return p}}return null}return l(this,[])}findWrapping(n){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==n)return this.wrapCache[r+1];let o=this.computeWrapping(n);return this.wrapCache.push(n,o),o}computeWrapping(n){let o=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let a=r.shift(),l=a.match;if(l.matchType(n)){let i=[];for(let s=a;s.type;s=s.via)i.push(s.type);return i.reverse()}for(let i=0;i<l.next.length;i++){let{type:s,next:c}=l.next[i];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in o)&&(!a.type||c.validEnd)&&(r.push({match:s.contentMatch,type:s,via:a}),o[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(n){if(n>=this.next.length)throw new RangeError(`There's no ${n}th edge in this content match`);return this.next[n]}toString(){let n=[];function o(r){n.push(r);for(let a=0;a<r.next.length;a++)n.indexOf(r.next[a].next)==-1&&o(r.next[a].next)}return o(this),n.map((r,a)=>{let l=a+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)l+=(i?", ":"")+r.next[i].type.name+"->"+n.indexOf(r.next[i].next);return l}).join(`
118
118
  `)}}Wc.empty=new Wc(!0);class lYe{constructor(n,o){this.string=n,this.nodeTypes=o,this.inline=null,this.pos=0,this.tokens=n.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(n){return this.next==n&&(this.pos++||!0)}err(n){throw new SyntaxError(n+" (in content expression '"+this.string+"')")}}function p$(e){let n=[];do n.push(iYe(e));while(e.eat("|"));return n.length==1?n[0]:{type:"choice",exprs:n}}function iYe(e){let n=[];do n.push(sYe(e));while(e.next&&e.next!=")"&&e.next!="|");return n.length==1?n[0]:{type:"seq",exprs:n}}function sYe(e){let n=uYe(e);for(;;)if(e.eat("+"))n={type:"plus",expr:n};else if(e.eat("*"))n={type:"star",expr:n};else if(e.eat("?"))n={type:"opt",expr:n};else if(e.eat("{"))n=cYe(e,n);else break;return n}function h$(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let n=Number(e.next);return e.pos++,n}function cYe(e,n){let o=h$(e),r=o;return e.eat(",")&&(e.next!="}"?r=h$(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:o,max:r,expr:n}}function dYe(e,n){let o=e.nodeTypes,r=o[n];if(r)return[r];let a=[];for(let l in o){let i=o[l];i.isInGroup(n)&&a.push(i)}return a.length==0&&e.err("No node type or group '"+n+"' found"),a}function uYe(e){if(e.eat("(")){let n=p$(e);return e.eat(")")||e.err("Missing closing paren"),n}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let n=dYe(e,e.next).map(o=>(e.inline==null?e.inline=o.isInline:e.inline!=o.isInline&&e.err("Mixing inline and block content"),{type:"name",value:o}));return e.pos++,n.length==1?n[0]:{type:"choice",exprs:n}}}function fYe(e){let n=[[]];return a(l(e,0),o()),n;function o(){return n.push([])-1}function r(i,s,c){let d={term:c,to:s};return n[i].push(d),d}function a(i,s){i.forEach(c=>c.to=s)}function l(i,s){if(i.type=="choice")return i.exprs.reduce((c,d)=>c.concat(l(d,s)),[]);if(i.type=="seq")for(let c=0;;c++){let d=l(i.exprs[c],s);if(c==i.exprs.length-1)return d;a(d,s=o())}else if(i.type=="star"){let c=o();return r(s,c),a(l(i.expr,c),c),[r(c)]}else if(i.type=="plus"){let c=o();return a(l(i.expr,s),c),a(l(i.expr,c),c),[r(c)]}else{if(i.type=="opt")return[r(s)].concat(l(i.expr,s));if(i.type=="range"){let c=s;for(let d=0;d<i.min;d++){let u=o();a(l(i.expr,c),u),c=u}if(i.max==-1)a(l(i.expr,c),c);else for(let d=i.min;d<i.max;d++){let u=o();r(c,u),a(l(i.expr,c),u),c=u}return[r(c)]}else{if(i.type=="name")return[r(s,void 0,i.value)];throw new Error("Unknown expr type")}}}}function m$(e,n){return n-e}function g$(e,n){let o=[];return r(n),o.sort(m$);function r(a){let l=e[a];if(l.length==1&&!l[0].term)return r(l[0].to);o.push(a);for(let i=0;i<l.length;i++){let{term:s,to:c}=l[i];!s&&o.indexOf(c)==-1&&r(c)}}}function pYe(e){let n=Object.create(null);return o(g$(e,0));function o(r){let a=[];r.forEach(i=>{e[i].forEach(({term:s,to:c})=>{if(!s)return;let d;for(let u=0;u<a.length;u++)a[u][0]==s&&(d=a[u][1]);g$(e,c).forEach(u=>{d||a.push([s,d=[]]),d.indexOf(u)==-1&&d.push(u)})})});let l=n[r.join(",")]=new Wc(r.indexOf(e.length-1)>-1);for(let i=0;i<a.length;i++){let s=a[i][1].sort(m$);l.next.push({type:a[i][0],next:n[s.join(",")]||o(s)})}return l}}function hYe(e,n){for(let o=0,r=[e];o<r.length;o++){let a=r[o],l=!a.validEnd,i=[];for(let s=0;s<a.next.length;s++){let{type:c,next:d}=a.next[s];i.push(c.name),l&&!(c.isText||c.hasRequiredAttrs())&&(l=!1),r.indexOf(d)==-1&&r.push(d)}l&&n.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function y$(e){let n=Object.create(null);for(let o in e){let r=e[o];if(!r.hasDefault)return null;n[o]=r.default}return n}function b$(e,n){let o=Object.create(null);for(let r in e){let a=n&&n[r];if(a===void 0){let l=e[r];if(l.hasDefault)a=l.default;else throw new RangeError("No value supplied for attribute "+r)}o[r]=a}return o}function M$(e,n,o,r){for(let a in n)if(!(a in e))throw new RangeError(`Unsupported attribute ${a} for ${o} of type ${a}`);for(let a in e){let l=e[a];l.validate&&l.validate(n[a])}}function w$(e,n){let o=Object.create(null);if(n)for(let r in n)o[r]=new gYe(e,r,n[r]);return o}let C$=class iU{constructor(n,o,r){this.name=n,this.schema=o,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=w$(n,r.attrs),this.defaultAttrs=y$(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||n=="text"),this.isText=n=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Wc.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(n){return this.groups.indexOf(n)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let n in this.attrs)if(this.attrs[n].isRequired)return!0;return!1}compatibleContent(n){return this==n||this.contentMatch.compatible(n.contentMatch)}computeAttrs(n){return!n&&this.defaultAttrs?this.defaultAttrs:b$(this.attrs,n)}create(n=null,o,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Yc(this,this.computeAttrs(n),Ye.from(o),mn.setFrom(r))}createChecked(n=null,o,r){return o=Ye.from(o),this.checkContent(o),new Yc(this,this.computeAttrs(n),o,mn.setFrom(r))}createAndFill(n=null,o,r){if(n=this.computeAttrs(n),o=Ye.from(o),o.size){let i=this.contentMatch.fillBefore(o);if(!i)return null;o=i.append(o)}let a=this.contentMatch.matchFragment(o),l=a&&a.fillBefore(Ye.empty,!0);return l?new Yc(this,n,o.append(l),mn.setFrom(r)):null}validContent(n){let o=this.contentMatch.matchFragment(n);if(!o||!o.validEnd)return!1;for(let r=0;r<n.childCount;r++)if(!this.allowsMarks(n.child(r).marks))return!1;return!0}checkContent(n){if(!this.validContent(n))throw new RangeError(`Invalid content for node ${this.name}: ${n.toString().slice(0,50)}`)}checkAttrs(n){M$(this.attrs,n,"node",this.name)}allowsMarkType(n){return this.markSet==null||this.markSet.indexOf(n)>-1}allowsMarks(n){if(this.markSet==null)return!0;for(let o=0;o<n.length;o++)if(!this.allowsMarkType(n[o].type))return!1;return!0}allowedMarks(n){if(this.markSet==null)return n;let o;for(let r=0;r<n.length;r++)this.allowsMarkType(n[r].type)?o&&o.push(n[r]):o||(o=n.slice(0,r));return o?o.length?o:mn.none:n}static compile(n,o){let r=Object.create(null);n.forEach((l,i)=>r[l]=new iU(l,o,i));let a=o.spec.topNode||"doc";if(!r[a])throw new RangeError("Schema is missing its top node type ('"+a+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let l in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function mYe(e,n,o){let r=o.split("|");return a=>{let l=a===null?"null":typeof a;if(r.indexOf(l)<0)throw new RangeError(`Expected value of type ${r} for attribute ${n} on type ${e}, got ${l}`)}}class gYe{constructor(n,o,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?mYe(n,o,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class S1{constructor(n,o,r,a){this.name=n,this.rank=o,this.schema=r,this.spec=a,this.attrs=w$(n,a.attrs),this.excluded=null;let l=y$(this.attrs);this.instance=l?new mn(this,l):null}create(n=null){return!n&&this.instance?this.instance:new mn(this,b$(this.attrs,n))}static compile(n,o){let r=Object.create(null),a=0;return n.forEach((l,i)=>r[l]=new S1(l,a++,o,i)),r}removeFromSet(n){for(var o=0;o<n.length;o++)n[o].type==this&&(n=n.slice(0,o).concat(n.slice(o+1)),o--);return n}isInSet(n){for(let o=0;o<n.length;o++)if(n[o].type==this)return n[o]}checkAttrs(n){M$(this.attrs,n,"mark",this.name)}excludes(n){return this.excluded.indexOf(n)>-1}}class _${constructor(n){this.linebreakReplacement=null,this.cached=Object.create(null);let o=this.spec={};for(let a in n)o[a]=n[a];o.nodes=So.from(n.nodes),o.marks=So.from(n.marks||{}),this.nodes=C$.compile(this.spec.nodes,this),this.marks=S1.compile(this.spec.marks,this);let r=Object.create(null);for(let a in this.nodes){if(a in this.marks)throw new RangeError(a+" can not be both a node and a mark");let l=this.nodes[a],i=l.spec.content||"",s=l.spec.marks;if(l.contentMatch=r[i]||(r[i]=Wc.parse(i,this.nodes)),l.inlineContent=l.contentMatch.inlineContent,l.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!l.isInline||!l.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=l}l.markSet=s=="_"?null:s?N$(this,s.split(" ")):s==""||!l.inlineContent?[]:null}for(let a in this.marks){let l=this.marks[a],i=l.spec.excludes;l.excluded=i==null?[l]:i==""?[]:N$(this,i.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(n,o=null,r,a){if(typeof n=="string")n=this.nodeType(n);else if(n instanceof C$){if(n.schema!=this)throw new RangeError("Node type from different schema used ("+n.name+")")}else throw new RangeError("Invalid node type: "+n);return n.createChecked(o,r,a)}text(n,o){let r=this.nodes.text;return new T1(r,r.defaultAttrs,n,mn.setFrom(o))}mark(n,o){return typeof n=="string"&&(n=this.marks[n]),n.create(o)}nodeFromJSON(n){return Yc.fromJSON(this,n)}markFromJSON(n){return mn.fromJSON(this,n)}nodeType(n){let o=this.nodes[n];if(!o)throw new RangeError("Unknown node type: "+n);return o}}function N$(e,n){let o=[];for(let r=0;r<n.length;r++){let a=n[r],l=e.marks[a],i=l;if(l)o.push(l);else for(let s in e.marks){let c=e.marks[s];(a=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(a)>-1)&&o.push(i=c)}if(!i)throw new SyntaxError("Unknown mark type: '"+n[r]+"'")}return o}function yYe(e){return e.tag!=null}function bYe(e){return e.style!=null}class _s{constructor(n,o){this.schema=n,this.rules=o,this.tags=[],this.styles=[];let r=this.matchedStyles=[];o.forEach(a=>{if(yYe(a))this.tags.push(a);else if(bYe(a)){let l=/[^=]*/.exec(a.style)[0];r.indexOf(l)<0&&r.push(l),this.styles.push(a)}}),this.normalizeLists=!this.tags.some(a=>{if(!/^(ul|ol)\b/.test(a.tag)||!a.node)return!1;let l=n.nodes[a.node];return l.contentMatch.matchType(l)})}parse(n,o={}){let r=new T$(this,o,!1);return r.addAll(n,mn.none,o.from,o.to),r.finish()}parseSlice(n,o={}){let r=new T$(this,o,!0);return r.addAll(n,mn.none,o.from,o.to),ct.maxOpen(r.finish())}matchTag(n,o,r){for(let a=r?this.tags.indexOf(r)+1:0;a<this.tags.length;a++){let l=this.tags[a];if(CYe(n,l.tag)&&(l.namespace===void 0||n.namespaceURI==l.namespace)&&(!l.context||o.matchesContext(l.context))){if(l.getAttrs){let i=l.getAttrs(n);if(i===!1)continue;l.attrs=i||void 0}return l}}}matchStyle(n,o,r,a){for(let l=a?this.styles.indexOf(a)+1:0;l<this.styles.length;l++){let i=this.styles[l],s=i.style;if(!(s.indexOf(n)!=0||i.context&&!r.matchesContext(i.context)||s.length>n.length&&(s.charCodeAt(n.length)!=61||s.slice(n.length+1)!=o))){if(i.getAttrs){let c=i.getAttrs(o);if(c===!1)continue;i.attrs=c||void 0}return i}}}static schemaRules(n){let o=[];function r(a){let l=a.priority==null?50:a.priority,i=0;for(;i<o.length;i++){let s=o[i];if((s.priority==null?50:s.priority)<l)break}o.splice(i,0,a)}for(let a in n.marks){let l=n.marks[a].spec.parseDOM;l&&l.forEach(i=>{r(i=S$(i)),i.mark||i.ignore||i.clearMark||(i.mark=a)})}for(let a in n.nodes){let l=n.nodes[a].spec.parseDOM;l&&l.forEach(i=>{r(i=S$(i)),i.node||i.ignore||i.mark||(i.node=a)})}return o}static fromSchema(n){return n.cached.domParser||(n.cached.domParser=new _s(n,_s.schemaRules(n)))}}const k$={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},MYe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},E$={ol:!0,ul:!0},D1=1,v1=2,hh=4;function x$(e,n,o){return n!=null?(n?D1:0)|(n==="full"?v1:0):e&&e.whitespace=="pre"?D1|v1:o&~hh}class I1{constructor(n,o,r,a,l,i){this.type=n,this.attrs=o,this.marks=r,this.solid=a,this.options=i,this.content=[],this.activeMarks=mn.none,this.match=l||(i&hh?null:n.contentMatch)}findWrapping(n){if(!this.match){if(!this.type)return[];let o=this.type.contentMatch.fillBefore(Ye.from(n));if(o)this.match=this.type.contentMatch.matchFragment(o);else{let r=this.type.contentMatch,a;return(a=r.findWrapping(n.type))?(this.match=r,a):null}}return this.match.findWrapping(n.type)}finish(n){if(!(this.options&D1)){let r=this.content[this.content.length-1],a;if(r&&r.isText&&(a=/[ \t\r\n\u000c]+$/.exec(r.text))){let l=r;r.text.length==a[0].length?this.content.pop():this.content[this.content.length-1]=l.withText(l.text.slice(0,l.text.length-a[0].length))}}let o=Ye.from(this.content);return!n&&this.match&&(o=o.append(this.match.fillBefore(Ye.empty,!0))),this.type?this.type.create(this.attrs,o,this.marks):o}inlineContext(n){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:n.parentNode&&!k$.hasOwnProperty(n.parentNode.nodeName.toLowerCase())}}class T${constructor(n,o,r){this.parser=n,this.options=o,this.isOpen=r,this.open=0;let a=o.topNode,l,i=x$(null,o.preserveWhitespace,0)|(r?hh:0);a?l=new I1(a.type,a.attrs,mn.none,!0,o.topMatch||a.type.contentMatch,i):r?l=new I1(null,null,mn.none,!0,null,i):l=new I1(n.schema.topNodeType,null,mn.none,!0,null,i),this.nodes=[l],this.find=o.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(n,o){n.nodeType==3?this.addTextNode(n,o):n.nodeType==1&&this.addElement(n,o)}addTextNode(n,o){let r=n.nodeValue,a=this.top;if(a.options&v1||a.inlineContext(n)||/[^ \t\r\n\u000c]/.test(r)){if(a.options&D1)a.options&v1?r=r.replace(/\r\n?/g,`
119
119
  `):r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=a.content[a.content.length-1],i=n.previousSibling;(!l||i&&i.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),o),this.findInText(n)}else this.findInside(n)}addElement(n,o,r){let a=n.nodeName.toLowerCase(),l;E$.hasOwnProperty(a)&&this.parser.normalizeLists&&wYe(n);let i=this.options.ruleFromNode&&this.options.ruleFromNode(n)||(l=this.parser.matchTag(n,this,r));if(i?i.ignore:MYe.hasOwnProperty(a))this.findInside(n),this.ignoreFallback(n,o);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(n=i.skip);let s,c=this.top,d=this.needsBlock;if(k$.hasOwnProperty(a))c.content.length&&c.content[0].isInline&&this.open&&(this.open--,c=this.top),s=!0,c.type||(this.needsBlock=!0);else if(!n.firstChild){this.leafFallback(n,o);return}let u=i&&i.skip?o:this.readStyles(n,o);u&&this.addAll(n,u),s&&this.sync(c),this.needsBlock=d}else{let s=this.readStyles(n,o);s&&this.addElementByRule(n,i,s,i.consuming===!1?l:void 0)}}leafFallback(n,o){n.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(n.ownerDocument.createTextNode(`
120
120
  `),o)}ignoreFallback(n,o){n.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),o)}readStyles(n,o){let r=n.style;if(r&&r.length)for(let a=0;a<this.parser.matchedStyles.length;a++){let l=this.parser.matchedStyles[a],i=r.getPropertyValue(l);if(i)for(let s=void 0;;){let c=this.parser.matchStyle(l,i,this,s);if(!c)break;if(c.ignore)return null;if(c.clearMark?o=o.filter(d=>!c.clearMark(d)):o=o.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)s=c;else break}}return o}addElementByRule(n,o,r,a){let l,i;if(o.node)if(i=this.parser.schema.nodes[o.node],i.isLeaf)this.insertNode(i.create(o.attrs),r)||this.leafFallback(n,r);else{let c=this.enter(i,o.attrs||null,r,o.preserveWhitespace);c&&(l=!0,r=c)}else{let c=this.parser.schema.marks[o.mark];r=r.concat(c.create(o.attrs))}let s=this.top;if(i&&i.isLeaf)this.findInside(n);else if(a)this.addElement(n,r,a);else if(o.getContent)this.findInside(n),o.getContent(n,this.parser.schema).forEach(c=>this.insertNode(c,r));else{let c=n;typeof o.contentElement=="string"?c=n.querySelector(o.contentElement):typeof o.contentElement=="function"?c=o.contentElement(n):o.contentElement&&(c=o.contentElement),this.findAround(n,c,!0),this.addAll(c,r),this.findAround(n,c,!1)}l&&this.sync(s)&&this.open--}addAll(n,o,r,a){let l=r||0;for(let i=r?n.childNodes[r]:n.firstChild,s=a==null?null:n.childNodes[a];i!=s;i=i.nextSibling,++l)this.findAtPoint(n,l),this.addDOM(i,o);this.findAtPoint(n,l)}findPlace(n,o){let r,a;for(let l=this.open;l>=0;l--){let i=this.nodes[l],s=i.findWrapping(n);if(s&&(!r||r.length>s.length)&&(r=s,a=i,!s.length)||i.solid)break}if(!r)return null;this.sync(a);for(let l=0;l<r.length;l++)o=this.enterInner(r[l],null,o,!1);return o}insertNode(n,o){if(n.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(o=this.enterInner(a,null,o))}let r=this.findPlace(n,o);if(r){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(n.type));let l=mn.none;for(let i of r.concat(n.marks))(a.type?a.type.allowsMarkType(i.type):D$(i.type,n.type))&&(l=i.addToSet(l));return a.content.push(n.mark(l)),!0}return!1}enter(n,o,r,a){let l=this.findPlace(n.create(o),r);return l&&(l=this.enterInner(n,o,r,!0,a)),l}enterInner(n,o,r,a=!1,l){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(n);let s=x$(n,l,i.options);i.options&hh&&i.content.length==0&&(s|=hh);let c=mn.none;return r=r.filter(d=>(i.type?i.type.allowsMarkType(d.type):D$(d.type,n))?(c=d.addToSet(c),!1):!0),this.nodes.push(new I1(n,o,c,a,null,s)),this.open++,r}closeExtra(n=!1){let o=this.nodes.length-1;if(o>this.open){for(;o>this.open;o--)this.nodes[o-1].content.push(this.nodes[o].finish(n));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(n){for(let o=this.open;o>=0;o--)if(this.nodes[o]==n)return this.open=o,!0;return!1}get currentPos(){this.closeExtra();let n=0;for(let o=this.open;o>=0;o--){let r=this.nodes[o].content;for(let a=r.length-1;a>=0;a--)n+=r[a].nodeSize;o&&n++}return n}findAtPoint(n,o){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==n&&this.find[r].offset==o&&(this.find[r].pos=this.currentPos)}findInside(n){if(this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&n.nodeType==1&&n.contains(this.find[o].node)&&(this.find[o].pos=this.currentPos)}findAround(n,o,r){if(n!=o&&this.find)for(let a=0;a<this.find.length;a++)this.find[a].pos==null&&n.nodeType==1&&n.contains(this.find[a].node)&&o.compareDocumentPosition(this.find[a].node)&(r?2:4)&&(this.find[a].pos=this.currentPos)}findInText(n){if(this.find)for(let o=0;o<this.find.length;o++)this.find[o].node==n&&(this.find[o].pos=this.currentPos-(n.nodeValue.length-this.find[o].offset))}matchesContext(n){if(n.indexOf("|")>-1)return n.split(/\s*\|\s*/).some(this.matchesContext,this);let o=n.split("/"),r=this.options.context,a=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),l=-(r?r.depth+1:0)+(a?0:1),i=(s,c)=>{for(;s>=0;s--){let d=o[s];if(d==""){if(s==o.length-1||s==0)continue;for(;c>=l;c--)if(i(s-1,c))return!0;return!1}else{let u=c>0||c==0&&a?this.nodes[c].type:r&&c>=l?r.node(c-l).type:null;if(!u||u.name!=d&&!u.isInGroup(d))return!1;c--}}return!0};return i(o.length-1,this.open)}textblockFromContext(){let n=this.options.context;if(n)for(let o=n.depth;o>=0;o--){let r=n.node(o).contentMatchAt(n.indexAfter(o)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let o in this.parser.schema.nodes){let r=this.parser.schema.nodes[o];if(r.isTextblock&&r.defaultAttrs)return r}}}function wYe(e){for(let n=e.firstChild,o=null;n;n=n.nextSibling){let r=n.nodeType==1?n.nodeName.toLowerCase():null;r&&E$.hasOwnProperty(r)&&o?(o.appendChild(n),n=o):r=="li"?o=n:r&&(o=null)}}function CYe(e,n){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,n)}function S$(e){let n={};for(let o in e)n[o]=e[o];return n}function D$(e,n){let o=n.schema.nodes;for(let r in o){let a=o[r];if(!a.allowsMarkType(e))continue;let l=[],i=s=>{l.push(s);for(let c=0;c<s.edgeCount;c++){let{type:d,next:u}=s.edge(c);if(d==n||l.indexOf(u)<0&&i(u))return!0}};if(i(a.contentMatch))return!0}}class Qc{constructor(n,o){this.nodes=n,this.marks=o}serializeFragment(n,o={},r){r||(r=R_(o).createDocumentFragment());let a=r,l=[];return n.forEach(i=>{if(l.length||i.marks.length){let s=0,c=0;for(;s<l.length&&c<i.marks.length;){let d=i.marks[c];if(!this.marks[d.type.name]){c++;continue}if(!d.eq(l[s][0])||d.type.spec.spanning===!1)break;s++,c++}for(;s<l.length;)a=l.pop()[1];for(;c<i.marks.length;){let d=i.marks[c++],u=this.serializeMark(d,i.isInline,o);u&&(l.push([d,a]),a.appendChild(u.dom),a=u.contentDOM||u.dom)}}a.appendChild(this.serializeNodeInner(i,o))}),r}serializeNodeInner(n,o){let{dom:r,contentDOM:a}=A1(R_(o),this.nodes[n.type.name](n),null,n.attrs);if(a){if(n.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(n.content,o,a)}return r}serializeNode(n,o={}){let r=this.serializeNodeInner(n,o);for(let a=n.marks.length-1;a>=0;a--){let l=this.serializeMark(n.marks[a],n.isInline,o);l&&((l.contentDOM||l.dom).appendChild(r),r=l.dom)}return r}serializeMark(n,o,r={}){let a=this.marks[n.type.name];return a&&A1(R_(r),a(n,o),null,n.attrs)}static renderSpec(n,o,r=null,a){return A1(n,o,r,a)}static fromSchema(n){return n.cached.domSerializer||(n.cached.domSerializer=new Qc(this.nodesFromSchema(n),this.marksFromSchema(n)))}static nodesFromSchema(n){let o=v$(n.nodes);return o.text||(o.text=r=>r.text),o}static marksFromSchema(n){return v$(n.marks)}}function v$(e){let n={};for(let o in e){let r=e[o].spec.toDOM;r&&(n[o]=r)}return n}function R_(e){return e.document||window.document}const I$=new WeakMap;function _Ye(e){let n=I$.get(e);return n===void 0&&I$.set(e,n=NYe(e)),n}function NYe(e){let n=null;function o(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")n||(n=[]),n.push(r);else for(let a=0;a<r.length;a++)o(r[a]);else for(let a in r)o(r[a])}return o(e),n}function A1(e,n,o,r){if(typeof n=="string")return{dom:e.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let a=n[0],l;if(typeof a!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(l=_Ye(r))&&l.indexOf(n)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i=a.indexOf(" ");i>0&&(o=a.slice(0,i),a=a.slice(i+1));let s,c=o?e.createElementNS(o,a):e.createElement(a),d=n[1],u=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){u=2;for(let f in d)if(d[f]!=null){let p=f.indexOf(" ");p>0?c.setAttributeNS(f.slice(0,p),f.slice(p+1),d[f]):c.setAttribute(f,d[f])}}for(let f=u;f<n.length;f++){let p=n[f];if(p===0){if(f<n.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else{let{dom:m,contentDOM:g}=A1(e,p,o,r);if(c.appendChild(m),g){if(s)throw new RangeError("Multiple content holes");s=g}}}return{dom:c,contentDOM:s}}const A$=65535,O$=Math.pow(2,16);function kYe(e,n){return e+n*O$}function z$(e){return e&A$}function EYe(e){return(e-(e&A$))/O$}const B$=1,L$=2,O1=4,V$=8;class F_{constructor(n,o,r){this.pos=n,this.delInfo=o,this.recover=r}get deleted(){return(this.delInfo&V$)>0}get deletedBefore(){return(this.delInfo&(B$|O1))>0}get deletedAfter(){return(this.delInfo&(L$|O1))>0}get deletedAcross(){return(this.delInfo&O1)>0}}class Hr{constructor(n,o=!1){if(this.ranges=n,this.inverted=o,!n.length&&Hr.empty)return Hr.empty}recover(n){let o=0,r=z$(n);if(!this.inverted)for(let a=0;a<r;a++)o+=this.ranges[a*3+2]-this.ranges[a*3+1];return this.ranges[r*3]+o+EYe(n)}mapResult(n,o=1){return this._map(n,o,!1)}map(n,o=1){return this._map(n,o,!0)}_map(n,o,r){let a=0,l=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let c=this.ranges[s]-(this.inverted?a:0);if(c>n)break;let d=this.ranges[s+l],u=this.ranges[s+i],f=c+d;if(n<=f){let p=d?n==c?-1:n==f?1:o:o,m=c+a+(p<0?0:u);if(r)return m;let g=n==(o<0?c:f)?null:kYe(s/3,n-c),y=n==c?L$:n==f?B$:O1;return(o<0?n!=c:n!=f)&&(y|=V$),new F_(m,y,g)}a+=u-d}return r?n+a:new F_(n+a,0,null)}touches(n,o){let r=0,a=z$(o),l=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let c=this.ranges[s]-(this.inverted?r:0);if(c>n)break;let d=this.ranges[s+l],u=c+d;if(n<=u&&s==a*3)return!0;r+=this.ranges[s+i]-d}return!1}forEach(n){let o=this.inverted?2:1,r=this.inverted?1:2;for(let a=0,l=0;a<this.ranges.length;a+=3){let i=this.ranges[a],s=i-(this.inverted?l:0),c=i+(this.inverted?0:l),d=this.ranges[a+o],u=this.ranges[a+r];n(s,s+d,c,c+u),l+=u-d}}invert(){return new Hr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(n){return n==0?Hr.empty:new Hr(n<0?[0,-n,0]:[0,0,n])}}Hr.empty=new Hr([]);class Wu{constructor(n=[],o,r=0,a=n.length){this.maps=n,this.mirror=o,this.from=r,this.to=a}slice(n=0,o=this.maps.length){return new Wu(this.maps,this.mirror,n,o)}copy(){return new Wu(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(n,o){this.to=this.maps.push(n),o!=null&&this.setMirror(this.maps.length-1,o)}appendMapping(n){for(let o=0,r=this.maps.length;o<n.maps.length;o++){let a=n.getMirror(o);this.appendMap(n.maps[o],a!=null&&a<o?r+a:void 0)}}getMirror(n){if(this.mirror){for(let o=0;o<this.mirror.length;o++)if(this.mirror[o]==n)return this.mirror[o+(o%2?-1:1)]}}setMirror(n,o){this.mirror||(this.mirror=[]),this.mirror.push(n,o)}appendMappingInverted(n){for(let o=n.maps.length-1,r=this.maps.length+n.maps.length;o>=0;o--){let a=n.getMirror(o);this.appendMap(n.maps[o].invert(),a!=null&&a>o?r-a-1:void 0)}}invert(){let n=new Wu;return n.appendMappingInverted(this),n}map(n,o=1){if(this.mirror)return this._map(n,o,!0);for(let r=this.from;r<this.to;r++)n=this.maps[r].map(n,o);return n}mapResult(n,o=1){return this._map(n,o,!1)}_map(n,o,r){let a=0;for(let l=this.from;l<this.to;l++){let i=this.maps[l],s=i.mapResult(n,o);if(s.recover!=null){let c=this.getMirror(l);if(c!=null&&c>l&&c<this.to){l=c,n=this.maps[c].recover(s.recover);continue}}a|=s.delInfo,n=s.pos}return r?n:new F_(n,a,null)}}const H_=Object.create(null);class Ro{getMap(){return Hr.empty}merge(n){return null}static fromJSON(n,o){if(!o||!o.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=H_[o.stepType];if(!r)throw new RangeError(`No step type ${o.stepType} defined`);return r.fromJSON(n,o)}static jsonID(n,o){if(n in H_)throw new RangeError("Duplicate use of step JSON ID "+n);return H_[n]=o,o.prototype.jsonID=n,o}}class Qn{constructor(n,o){this.doc=n,this.failed=o}static ok(n){return new Qn(n,null)}static fail(n){return new Qn(null,n)}static fromReplace(n,o,r,a){try{return Qn.ok(n.replace(o,r,a))}catch(l){if(l instanceof k1)return Qn.fail(l.message);throw l}}}function U_(e,n,o){let r=[];for(let a=0;a<e.childCount;a++){let l=e.child(a);l.content.size&&(l=l.copy(U_(l.content,n,l))),l.isInline&&(l=n(l,o,a)),r.push(l)}return Ye.fromArray(r)}class Ns extends Ro{constructor(n,o,r){super(),this.from=n,this.to=o,this.mark=r}apply(n){let o=n.slice(this.from,this.to),r=n.resolve(this.from),a=r.node(r.sharedDepth(this.to)),l=new ct(U_(o.content,(i,s)=>!i.isAtom||!s.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),a),o.openStart,o.openEnd);return Qn.fromReplace(n,this.from,this.to,l)}invert(){return new $l(this.from,this.to,this.mark)}map(n){let o=n.mapResult(this.from,1),r=n.mapResult(this.to,-1);return o.deleted&&r.deleted||o.pos>=r.pos?null:new Ns(o.pos,r.pos,this.mark)}merge(n){return n instanceof Ns&&n.mark.eq(this.mark)&&this.from<=n.to&&this.to>=n.from?new Ns(Math.min(this.from,n.from),Math.max(this.to,n.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(n,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ns(o.from,o.to,n.markFromJSON(o.mark))}}Ro.jsonID("addMark",Ns);class $l extends Ro{constructor(n,o,r){super(),this.from=n,this.to=o,this.mark=r}apply(n){let o=n.slice(this.from,this.to),r=new ct(U_(o.content,a=>a.mark(this.mark.removeFromSet(a.marks)),n),o.openStart,o.openEnd);return Qn.fromReplace(n,this.from,this.to,r)}invert(){return new Ns(this.from,this.to,this.mark)}map(n){let o=n.mapResult(this.from,1),r=n.mapResult(this.to,-1);return o.deleted&&r.deleted||o.pos>=r.pos?null:new $l(o.pos,r.pos,this.mark)}merge(n){return n instanceof $l&&n.mark.eq(this.mark)&&this.from<=n.to&&this.to>=n.from?new $l(Math.min(this.from,n.from),Math.max(this.to,n.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(n,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new $l(o.from,o.to,n.markFromJSON(o.mark))}}Ro.jsonID("removeMark",$l);class ks extends Ro{constructor(n,o){super(),this.pos=n,this.mark=o}apply(n){let o=n.nodeAt(this.pos);if(!o)return Qn.fail("No node at mark step's position");let r=o.type.create(o.attrs,null,this.mark.addToSet(o.marks));return Qn.fromReplace(n,this.pos,this.pos+1,new ct(Ye.from(r),0,o.isLeaf?0:1))}invert(n){let o=n.nodeAt(this.pos);if(o){let r=this.mark.addToSet(o.marks);if(r.length==o.marks.length){for(let a=0;a<o.marks.length;a++)if(!o.marks[a].isInSet(r))return new ks(this.pos,o.marks[a]);return new ks(this.pos,this.mark)}}return new Qu(this.pos,this.mark)}map(n){let o=n.mapResult(this.pos,1);return o.deletedAfter?null:new ks(o.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(n,o){if(typeof o.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ks(o.pos,n.markFromJSON(o.mark))}}Ro.jsonID("addNodeMark",ks);class Qu extends Ro{constructor(n,o){super(),this.pos=n,this.mark=o}apply(n){let o=n.nodeAt(this.pos);if(!o)return Qn.fail("No node at mark step's position");let r=o.type.create(o.attrs,null,this.mark.removeFromSet(o.marks));return Qn.fromReplace(n,this.pos,this.pos+1,new ct(Ye.from(r),0,o.isLeaf?0:1))}invert(n){let o=n.nodeAt(this.pos);return!o||!this.mark.isInSet(o.marks)?this:new ks(this.pos,this.mark)}map(n){let o=n.mapResult(this.pos,1);return o.deletedAfter?null:new Qu(o.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(n,o){if(typeof o.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Qu(o.pos,n.markFromJSON(o.mark))}}Ro.jsonID("removeNodeMark",Qu);class po extends Ro{constructor(n,o,r,a=!1){super(),this.from=n,this.to=o,this.slice=r,this.structure=a}apply(n){return this.structure&&Y_(n,this.from,this.to)?Qn.fail("Structure replace would overwrite content"):Qn.fromReplace(n,this.from,this.to,this.slice)}getMap(){return new Hr([this.from,this.to-this.from,this.slice.size])}invert(n){return new po(this.from,this.from+this.slice.size,n.slice(this.from,this.to))}map(n){let o=n.mapResult(this.from,1),r=n.mapResult(this.to,-1);return o.deletedAcross&&r.deletedAcross?null:new po(o.pos,Math.max(o.pos,r.pos),this.slice)}merge(n){if(!(n instanceof po)||n.structure||this.structure)return null;if(this.from+this.slice.size==n.from&&!this.slice.openEnd&&!n.slice.openStart){let o=this.slice.size+n.slice.size==0?ct.empty:new ct(this.slice.content.append(n.slice.content),this.slice.openStart,n.slice.openEnd);return new po(this.from,this.to+(n.to-n.from),o,this.structure)}else if(n.to==this.from&&!this.slice.openStart&&!n.slice.openEnd){let o=this.slice.size+n.slice.size==0?ct.empty:new ct(n.slice.content.append(this.slice.content),n.slice.openStart,this.slice.openEnd);return new po(n.from,this.to,o,this.structure)}else return null}toJSON(){let n={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(n.slice=this.slice.toJSON()),this.structure&&(n.structure=!0),n}static fromJSON(n,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new po(o.from,o.to,ct.fromJSON(n,o.slice),!!o.structure)}}Ro.jsonID("replace",po);class ho extends Ro{constructor(n,o,r,a,l,i,s=!1){super(),this.from=n,this.to=o,this.gapFrom=r,this.gapTo=a,this.slice=l,this.insert=i,this.structure=s}apply(n){if(this.structure&&(Y_(n,this.from,this.gapFrom)||Y_(n,this.gapTo,this.to)))return Qn.fail("Structure gap-replace would overwrite content");let o=n.slice(this.gapFrom,this.gapTo);if(o.openStart||o.openEnd)return Qn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,o.content);return r?Qn.fromReplace(n,this.from,this.to,r):Qn.fail("Content does not fit in gap")}getMap(){return new Hr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(n){let o=this.gapTo-this.gapFrom;return new ho(this.from,this.from+this.slice.size+o,this.from+this.insert,this.from+this.insert+o,n.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(n){let o=n.mapResult(this.from,1),r=n.mapResult(this.to,-1),a=this.from==this.gapFrom?o.pos:n.map(this.gapFrom,-1),l=this.to==this.gapTo?r.pos:n.map(this.gapTo,1);return o.deletedAcross&&r.deletedAcross||a<o.pos||l>r.pos?null:new ho(o.pos,r.pos,a,l,this.slice,this.insert,this.structure)}toJSON(){let n={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(n.slice=this.slice.toJSON()),this.structure&&(n.structure=!0),n}static fromJSON(n,o){if(typeof o.from!="number"||typeof o.to!="number"||typeof o.gapFrom!="number"||typeof o.gapTo!="number"||typeof o.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ho(o.from,o.to,o.gapFrom,o.gapTo,ct.fromJSON(n,o.slice),o.insert,!!o.structure)}}Ro.jsonID("replaceAround",ho);function Y_(e,n,o){let r=e.resolve(n),a=o-n,l=r.depth;for(;a>0&&l>0&&r.indexAfter(l)==r.node(l).childCount;)l--,a--;if(a>0){let i=r.node(l).maybeChild(r.indexAfter(l));for(;a>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,a--}}return!1}function xYe(e,n,o,r){let a=[],l=[],i,s;e.doc.nodesBetween(n,o,(c,d,u)=>{if(!c.isInline)return;let f=c.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let p=Math.max(d,n),m=Math.min(d+c.nodeSize,o),g=r.addToSet(f);for(let y=0;y<f.length;y++)f[y].isInSet(g)||(i&&i.to==p&&i.mark.eq(f[y])?i.to=m:a.push(i=new $l(p,m,f[y])));s&&s.to==p?s.to=m:l.push(s=new Ns(p,m,r))}}),a.forEach(c=>e.step(c)),l.forEach(c=>e.step(c))}function TYe(e,n,o,r){let a=[],l=0;e.doc.nodesBetween(n,o,(i,s)=>{if(!i.isInline)return;l++;let c=null;if(r instanceof S1){let d=i.marks,u;for(;u=r.isInSet(d);)(c||(c=[])).push(u),d=u.removeFromSet(d)}else r?r.isInSet(i.marks)&&(c=[r]):c=i.marks;if(c&&c.length){let d=Math.min(s+i.nodeSize,o);for(let u=0;u<c.length;u++){let f=c[u],p;for(let m=0;m<a.length;m++){let g=a[m];g.step==l-1&&f.eq(a[m].style)&&(p=g)}p?(p.to=d,p.step=l):a.push({style:f,from:Math.max(s,n),to:d,step:l})}}}),a.forEach(i=>e.step(new $l(i.from,i.to,i.style)))}function W_(e,n,o,r=o.contentMatch,a=!0){let l=e.doc.nodeAt(n),i=[],s=n+1;for(let c=0;c<l.childCount;c++){let d=l.child(c),u=s+d.nodeSize,f=r.matchType(d.type);if(!f)i.push(new po(s,u,ct.empty));else{r=f;for(let p=0;p<d.marks.length;p++)o.allowsMarkType(d.marks[p].type)||e.step(new $l(s,u,d.marks[p]));if(a&&d.isText&&o.whitespace!="pre"){let p,m=/\r?\n|\r/g,g;for(;p=m.exec(d.text);)g||(g=new ct(Ye.from(o.schema.text(" ",o.allowedMarks(d.marks))),0,0)),i.push(new po(s+p.index,s+p.index+p[0].length,g))}}s=u}if(!r.validEnd){let c=r.fillBefore(Ye.empty,!0);e.replace(s,s,new ct(c,0,0))}for(let c=i.length-1;c>=0;c--)e.step(i[c])}function SYe(e,n,o){return(n==0||e.canReplace(n,e.childCount))&&(o==e.childCount||e.canReplace(0,o))}function Ku(e){let o=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let a=e.$from.node(r),l=e.$from.index(r),i=e.$to.indexAfter(r);if(r<e.depth&&a.canReplace(l,i,o))return r;if(r==0||a.type.spec.isolating||!SYe(a,l,i))break}return null}function DYe(e,n,o){let{$from:r,$to:a,depth:l}=n,i=r.before(l+1),s=a.after(l+1),c=i,d=s,u=Ye.empty,f=0;for(let g=l,y=!1;g>o;g--)y||r.index(g)>0?(y=!0,u=Ye.from(r.node(g).copy(u)),f++):c--;let p=Ye.empty,m=0;for(let g=l,y=!1;g>o;g--)y||a.after(g+1)<a.end(g)?(y=!0,p=Ye.from(a.node(g).copy(p)),m++):d++;e.step(new ho(c,d,i,s,new ct(u.append(p),f,m),u.size-f,!0))}function Q_(e,n,o=null,r=e){let a=vYe(e,n),l=a&&IYe(r,n);return l?a.map($$).concat({type:n,attrs:o}).concat(l.map($$)):null}function $$(e){return{type:e,attrs:null}}function vYe(e,n){let{parent:o,startIndex:r,endIndex:a}=e,l=o.contentMatchAt(r).findWrapping(n);if(!l)return null;let i=l.length?l[0]:n;return o.canReplaceWith(r,a,i)?l:null}function IYe(e,n){let{parent:o,startIndex:r,endIndex:a}=e,l=o.child(r),i=n.contentMatch.findWrapping(l.type);if(!i)return null;let c=(i.length?i[i.length-1]:n).contentMatch;for(let d=r;c&&d<a;d++)c=c.matchType(o.child(d).type);return!c||!c.validEnd?null:i}function AYe(e,n,o){let r=Ye.empty;for(let i=o.length-1;i>=0;i--){if(r.size){let s=o[i].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Ye.from(o[i].type.create(o[i].attrs,r))}let a=n.start,l=n.end;e.step(new ho(a,l,a,l,new ct(r,0,0),o.length,!0))}function OYe(e,n,o,r,a){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let l=e.steps.length;e.doc.nodesBetween(n,o,(i,s)=>{let c=typeof a=="function"?a(i):a;if(i.isTextblock&&!i.hasMarkup(r,c)&&zYe(e.doc,e.mapping.slice(l).map(s),r)){let d=null;if(r.schema.linebreakReplacement){let m=r.whitespace=="pre",g=!!r.contentMatch.matchType(r.schema.linebreakReplacement);m&&!g?d=!1:!m&&g&&(d=!0)}d===!1&&P$(e,i,s,l),W_(e,e.mapping.slice(l).map(s,1),r,void 0,d===null);let u=e.mapping.slice(l),f=u.map(s,1),p=u.map(s+i.nodeSize,1);return e.step(new ho(f,p,f+1,p-1,new ct(Ye.from(r.create(c,null,i.marks)),0,0),1,!0)),d===!0&&j$(e,i,s,l),!1}})}function j$(e,n,o,r){n.forEach((a,l)=>{if(a.isText){let i,s=/\r?\n|\r/g;for(;i=s.exec(a.text);){let c=e.mapping.slice(r).map(o+1+l+i.index);e.replaceWith(c,c+1,n.type.schema.linebreakReplacement.create())}}})}function P$(e,n,o,r){n.forEach((a,l)=>{if(a.type==a.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(o+1+l);e.replaceWith(i,i+1,n.type.schema.text(`