doph-js 0.2.74 → 0.2.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dophJs.js +4 -1
- package/dist/dophJs.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/dophJs.js
CHANGED
|
@@ -2682,7 +2682,10 @@ const ls = new rs(), ds = { style: { display: "flex", "flex-direction": "column"
|
|
|
2682
2682
|
}
|
|
2683
2683
|
}), c = m(() => n.type === "password" ? "password" : "text"), u = m(() => n.scale), h = (R) => {
|
|
2684
2684
|
t("input", R), x();
|
|
2685
|
-
}, x = () =>
|
|
2685
|
+
}, x = () => {
|
|
2686
|
+
if (!(!n.form.fields || !n.form.fields[n.name].rules))
|
|
2687
|
+
return s.value = ls.validate(i.value, n.form.fields[n.name].rules), !!s.value;
|
|
2688
|
+
};
|
|
2686
2689
|
me(() => {
|
|
2687
2690
|
w();
|
|
2688
2691
|
});
|
package/dist/dophJs.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.DophJs={},f.Vue))})(this,function(f,e){"use strict";const Wn="",jn="",Xn="",Yn="",Un="",Y={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String,className:String},setup(t){const n=t,o=e.useSlots(),s=e.computed(()=>{const{className:c}=n;return c===void 0?"icon":["icon",c].join(" ")}),l=e.computed(()=>{const{color:c}=n;return c===void 0?null:c}),a=e.computed(()=>{const c=n.size??null;if(c!==void 0)return typeof c=="number"||/^\d+$/.test(c)?`${c}px`:c}),i=e.computed(()=>e.h("i",{class:s.value,style:{color:l.value,fontSize:a.value}},n.component?e.h(n.component):o));return(c,r)=>(e.openBlock(),e.createBlock(e.unref(i)))}},R={state:{},getters:{getIcon(t){return R.state[t]},getIcons(){return R.state}},mutations:{addIcon(t,n){R.state.name=n},addIcons(t){for(const n in t)t.hasOwnProperty(n)&&(R.state[n]=t[n])}}};function be(t){const n=t.value.getBoundingClientRect();let o=t.value,s=0,l=0;for(;o&&!isNaN(o.offsetLeft)&&!isNaN(o.offsetTop);)s+=o.offsetLeft-o.scrollLeft,l+=o.offsetTop-o.scrollTop,o=o.offsetParent;return{top:l,left:s,x:n.x,y:n.y,width:n.width,height:n.height}}function it(){function t(l){return l*Math.random()|0}function n(){return t(16).toString(16)}function o(l){let a="";for(let i=0;i<l;++i)a+=n();return a}function s(){return(t(16)&3|8).toString(16)}return o(8)+"-"+o(4)+"-4"+o(3)+"-"+s()+o(3)+"-"+o(12)}const qn="",W=(t,n)=>{const o=t.__vccOpts||t;for(const[s,l]of n)o[s]=l;return o},ct={key:0,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},dt=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],pt={key:1},mt={key:2,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},ft=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],H=W({__name:"DButton",props:{class:String,style:[String,Object],icon:String,scale:String,type:String,outline:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click","contextmenu"],setup(t,{expose:n,emit:o}){const s=t,l=e.useSlots(),a=e.ref(null),i=e.computed(()=>s.icon?R.getters.getIcon(s.icon):null),c=k=>{o("click",k)},r=k=>{o("contextmenu",k)},d=e.computed(()=>s.scale==="large"?"button-lg":s.scale==="small"?"button-sm":""),p=e.computed(()=>s.disabled?"disabled":""),u=k=>!!l[k],_=e.computed(()=>u("default")?"":s.scale==="large"?"d-button-lg-icon":s.scale==="small"?"d-button-sm-icon":"d-button-icon"),b=e.computed(()=>{const k=s.outline?"-outline":"";return s.type==="primary"?`button${k}-blue`:s.type==="success"?`button${k}-green`:s.type==="error"?`button${k}-red`:s.type==="warning"?`button${k}-orange`:s.type==="wait"?`button${k}-violet`:s.outline?`button${k}`:""});return n({elementSize:()=>be(a)}),(k,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button",[s.class,d.value,b.value,p.value].join(" ")])},[e.renderSlot(k.$slots,"default",{},void 0,!0),s.loading?(e.openBlock(),e.createElementBlock("svg",ct,dt)):e.createCommentVNode("",!0)],34)),i.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button button-ext",[s.class,d.value,_.value,b.value,p.value].join(" ")]),style:e.normalizeStyle(s.style)},[s.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:i.value,color:"inherit"},null,8,["component"])):e.createCommentVNode("",!0),e.unref(l).default?(e.openBlock(),e.createElementBlock("div",pt,[e.renderSlot(k.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),s.loading?(e.openBlock(),e.createElementBlock("svg",mt,ft)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-e5cd6ccd"]]),Jn="",ut={key:0,class:"d-input"},ht={key:0,class:"label"},gt=["type","placeholder"],yt={key:1,class:"d-input",style:{display:"flex","flex-direction":"column"}},_t={key:0,class:"label"},kt={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},bt={style:{flex:"1"}},Bt=["type","placeholder"],St={key:2,class:"d-input",style:{display:"flex","flex-direction":"column"}},wt={key:0,class:"label"},xt={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},Dt={style:{flex:"1"}},Ct=["type","placeholder"],$t=W({__name:"DInput",props:{label:String,placeholder:String,scale:String,modelValue:String,password:Boolean,pre:Object,post:Object,focus:Boolean},emits:["update:modelValue"],setup(t,{expose:n,emit:o}){const s=t,l=e.ref(null),a=e.computed(()=>s.scale==="small"?"d-input-small":s.scale==="large"?"d-input-large":""),i=e.computed({get:()=>s.modelValue,set:r=>{o("update:modelValue",r)}});e.onMounted(()=>{s.focus&&c()});const c=()=>{l.value.focus()};return n({focus:c}),(r,d)=>!s.post&&!s.pre?(e.openBlock(),e.createElementBlock("div",ut,[s.label?(e.openBlock(),e.createElementBlock("div",ht,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":d[0]||(d[0]=p=>i.value=p),type:s.password?"password":"text",class:e.normalizeClass(a.value),placeholder:s.placeholder,style:{width:"100%"}},null,10,gt),[[e.vModelDynamic,i.value]])])):s.post&&s.post.click&&!s.pre?(e.openBlock(),e.createElementBlock("div",yt,[s.label?(e.openBlock(),e.createElementBlock("div",_t,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",kt,[e.createElementVNode("div",bt,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:l,class:e.normalizeClass(["d-input-post-field",a.value]),"onUpdate:modelValue":d[1]||(d[1]=p=>i.value=p),type:s.password?"password":"text",placeholder:s.placeholder,style:{width:"100%"}},null,10,Bt),[[e.vModelDynamic,i.value]])]),s.post.label?(e.openBlock(),e.createBlock(H,{key:0,scale:s.scale,class:e.normalizeClass(["d-input-post-button",s.post.class]),onClick:s.post.click,icon:s.post.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.post.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:s.scale,class:e.normalizeClass(["d-input-post-button",s.post.class]),onClick:s.post.click,icon:s.post.icon},null,8,["scale","onClick","icon","class"]))])])):!s.post&&s.pre&&s.pre.click?(e.openBlock(),e.createElementBlock("div",St,[s.label?(e.openBlock(),e.createElementBlock("div",wt,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",xt,[s.pre.label?(e.openBlock(),e.createBlock(H,{key:0,scale:s.scale,class:e.normalizeClass(["d-input-pre-button",s.pre.class]),onClick:s.pre.click,icon:s.pre.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.pre.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:s.scale,class:e.normalizeClass(["d-input-pre-button",s.pre.class]),onClick:s.pre.click,icon:s.pre.icon},null,8,["scale","onClick","icon","class"])),e.createElementVNode("div",Dt,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:l,class:e.normalizeClass(["d-input-pre-field",a.value]),"onUpdate:modelValue":d[2]||(d[2]=p=>i.value=p),type:s.password?"password":"text",placeholder:s.placeholder,style:{width:"100%"}},null,10,Ct),[[e.vModelDynamic,i.value]])])])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-a972038a"]]),Be={__name:"DBadge",props:{scale:String,type:String,class:String,stress:{type:Boolean,default:!1}},setup(t){const n=t,o=e.computed(()=>n.scale==="large"?"badge-lg":n.scale==="small"?"badge-sm":""),s=e.computed(()=>{const l=n.stress?"-stress":"";return n.type==="primary"?`badge${l}-blue`:n.type==="success"?`badge${l}-green`:n.type==="error"?`badge${l}-red`:n.type==="warning"?`badge${l}-orange`:n.type==="wait"?`badge${l}-violet`:n.stress?`badge${l}-gray`:""});return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",[n.class,o.value,s.value].join(" ")])},[e.renderSlot(l.$slots,"default")],2))}},j="0px",Se={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(t){const n=t,o=r=>({height:r==null?void 0:r.style.height,width:r==null?void 0:r.style.width,position:r==null?void 0:r.style.position,visibility:r==null?void 0:r.style.visibility,overflow:r==null?void 0:r.style.overflow,paddingTop:r==null?void 0:r.style.paddingTop,paddingBottom:r==null?void 0:r.style.paddingBottom,borderTopWidth:r==null?void 0:r.style.borderTopWidth,borderBottomWidth:r==null?void 0:r.style.borderBottomWidth,marginTop:r==null?void 0:r.style.marginTop,marginBottom:r==null?void 0:r.style.marginBottom}),s=(r,d)=>{const{width:p}=getComputedStyle(r);r.style.width=p,r.style.position="absolute",r.style.visibility="hidden",r.style.height="";let{height:u}=getComputedStyle(r);return r.style.width=d.width,r.style.position=d.position,r.style.visibility=d.visibility,r.style.height=j,r.style.overflow="hidden",d.height&&d.height!==j?d.height:u},l=(r,d,p,u,_)=>{const b=r.animate(u,_);r.style.height=d.height,b.onfinish=()=>{r.style.overflow=d.overflow,p()}},a=(r,d)=>[{height:j,opacity:n.opacityClosed,paddingTop:j,paddingBottom:j,borderTopWidth:j,borderBottomWidth:j,marginTop:j,marginBottom:j},{height:r,opacity:n.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}],i=(r,d)=>{const p=r,u=o(p),_=s(p,u),b=a(_,u),D={duration:n.duration,easing:n.easingEnter};l(p,u,d,b,D)},c=(r,d)=>{const p=r,u=o(p),{height:_}=getComputedStyle(p);p.style.height=_,p.style.overflow="hidden";const b=a(_,u).reverse(),D={duration:n.duration,easing:n.easingLeave};l(p,u,d,b,D)};return(r,d)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:i,onLeave:c},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3}))}},K={data:void 0},re=t=>t.reduce((n,o)=>(n[o]=o)&&n,{}),I=re(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),Et=re(["copy","move","link","none"]),Tt=re(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),ie={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:t=>t in Et},effectAllowed:{validator:t=>t in Tt},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(t){const n=t,o=e.useSlots(),s=e.ref(!1),l=e.computed(()=>s&&n.transferData),a=e.computed(()=>({position:"fixed",top:"-1000px"})),i=(c,r)=>{const d=r.dataTransfer;if([I.dragenter,I.dragover].includes(c)&&n.dropEffect&&(d.dropEffect=n.dropEffect),c===I.dragstart){if(n.effectAllowed&&(d.effectAllowed=n.effectAllowed),n.image||o.image){let p;n.image?(p=new Image,p.src=n.image):o.image&&(p=o.image[0].elm),d.setDragImage&&d.setDragImage(p,n.imageXOffset,n.imageYOffset)}n.transferData!==void 0&&(K.data=n.transferData,r.dataTransfer.setData("text","")),s.value=!0}};return(c,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{draggable:n.draggable,onDrag:r[0]||(r[0]=d=>i(e.unref(I).drag,d)),onDragstart:r[1]||(r[1]=e.withModifiers(d=>i(e.unref(I).dragstart,d),["stop"])),onDragenter:r[2]||(r[2]=d=>i(e.unref(I).dragenter,d)),onDragleave:r[3]||(r[3]=d=>i(e.unref(I).dragleave,d)),onDragend:r[4]||(r[4]=d=>i(e.unref(I).dragend,d))},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{transferData:l.value}),t.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(a.value)},[e.renderSlot(c.$slots,"image",{transferData:l.value})],4)):e.renderSlot(c.$slots,"image",{key:1,transferData:l.value})]),_:3},40,["draggable"]))}},vn="",Nt=t=>(e.pushScopeId("data-v-40c7ab17"),t=t(),e.popScopeId(),t),Vt={key:0,style:{display:"none"}},Lt={key:1},It=[Nt(()=>e.createElementVNode("div",{class:"tree-divider"},null,-1))],Mt={key:2},zt={class:"tree-divider-header"},Rt={class:"item-title"},Ot={key:0,class:"tree-divider"},At={key:1},Ht={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},Ft={key:0,class:"sub-menu"},we=W({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array,search:String,component:Object},emits:["nodedrop","nodedragover","nodedragleave","nodeclick","nodecontext"],setup(t,{emit:n}){const o=t,s=e.ref(null),l=e.ref(!1),a=e.ref(!1),i=e.ref(!1),c=e.computed(()=>o.model.children&&o.model.children.length),r=e.computed(()=>(g.actions.isTreeExpanded(o.treeId)&&(o.model.expanded=o.model.expanded===void 0?!0:o.model.expanded),o.model.expanded)),d=x=>{n("nodeclick",{event:x,model:o.model})},p=x=>{n("nodeclick",x)},u=x=>{n("nodedrop",x)},_=x=>{n("nodecontext",x)},b=e.computed(()=>(g.actions.isItemSelected(o.treeId,o.model.id)?"selected":"")+(l.value?"node-over ":"")+(a.value?"node-top ":"")+(i.value?"node-bottom ":"")),D=e.computed(()=>o.search?!1:o.model.draggable===!0),k=x=>{let h=K.data;if(h===void 0||h.model===void 0)return l.value=!1,!1;if(h.model.id===o.model.id||g.actions.isChildOfParent(o.treeId,o.items,o.model.id,h.model.id)||g.actions.isParentOfChild(o.treeId,o.items,h.model.id,o.model.id))return l.value=!1,a.value=!1,i.value=!1,!1;if(!g.state.trees[o.treeId].transfer&&h.id!==o.treeId||!g.state.trees[o.treeId].dropInside&&!i.value&&!a.value)return!1;let $="";a.value?$="before":i.value?$="after":$="inside",n("nodedrop",{e:x,model:o.model,place:$}),(h.id===o.treeId||h.id!==o.treeId&&h.model.transfer)&&g.actions.moveTreeNode(h.id,o.treeId,o.items,h.model.id,o.model.id,$),l.value=!1,a.value=!1,i.value=!1},E=x=>{n("nodedragover",{e:x,model:o.model});let h=K.data;if(!o.model.droppable)return!1;if(h===void 0||h.model===void 0)return l.value=!0,!1;if(h.model.id===o.model.id||g.actions.isChildOfParent(o.treeId,o.items,o.model.id,h.model.id)||g.actions.isParentOfChild(o.treeId,o.items,h.model.id,o.model.id))return!1;const $=x.y,L=s.value.getBoundingClientRect().top,T=s.value.getBoundingClientRect().height,y=T/3;$>L&&$<=L+y?(l.value=!1,a.value=!0,i.value=!1):$<L+T&&$>=L+T-y?(l.value=!1,a.value=!1,i.value=!0):(l.value=g.state.trees[o.treeId].dropInside,a.value=!1,i.value=!1)},C=()=>{l.value=!1,a.value=!1,i.value=!1},S=e.computed(()=>o.model.title.startsWith("-")),w=e.computed(()=>{if(o.model.title.startsWith("-")){let[x,...h]=o.model.title.split(" ");return h=h.join(" "),h}return null});return(x,h)=>{const $=e.resolveComponent("d-tree-item",!0),L=e.resolveDirective("touch");return e.unref(g).actions.beforeItem(o.treeId,t.model)?S.value&&!w.value?(e.openBlock(),e.createElementBlock("li",Lt,It)):S.value&&w.value?(e.openBlock(),e.createElementBlock("li",Mt,[e.createElementVNode("div",zt,e.toDisplayString(e.unref(g).actions.renderTitle(o.treeId,w.value)),1)])):o.model.component?(e.openBlock(),e.createBlock(ie,{key:3,tag:"li",class:"tree-item-component","transfer-data":{id:o.treeId,model:o.model},draggable:D.value,onDrop:e.withModifiers(k,["stop"]),onDragenter:h[1]||(h[1]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(E,["prevent","stop"]),onDragleave:e.withModifiers(C,["prevent"])},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"node",ref:s,class:e.normalizeClass(b.value),onContextmenu:h[0]||(h[0]=e.withModifiers(T=>n("nodecontext",{e:T,model:o.model}),["prevent"]))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(G).getters.getComponent(o.model.component).component),e.normalizeProps(e.guardReactiveProps(e.unref(G).getters.getComponent(o.model.component).props)),null,16))],34)),[[L,d]])]),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])):(e.openBlock(),e.createBlock(ie,{key:4,tag:"li",class:"tree-item","transfer-data":{id:o.treeId,model:o.model},draggable:D.value,onDrop:e.withModifiers(k,["stop"]),onDragenter:h[3]||(h[3]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(E,["prevent","stop"]),onDragleave:e.withModifiers(C,["prevent"])},{default:e.withCtx(()=>{var T,y;return[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"node",ref:s,class:e.normalizeClass(b.value),onContextmenu:h[2]||(h[2]=e.withModifiers(N=>n("nodecontext",{e:N,model:o.model}),["prevent"]))},[e.createElementVNode("div",null,[o.model.icons&&o.model.icons.pre&&c.value&&!o.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:e.unref(R).getters.getIcon(o.model.icons.pre.component),size:18,color:o.model.icons.pre.color?o.model.icons.pre.color:"inherit",class:e.normalizeClass(r.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),o.model.icons&&o.model.icons.pre&&!c.value&&!o.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:1,component:e.unref(R).getters.getIcon(o.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(r.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),o.model.icons&&o.model.icons.icon&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:2,component:e.unref(R).getters.getIcon(o.model.icons.icon.component),color:o.model.icons.icon.color?o.model.icons.icon.color:"inherit",size:o.model.icons.icon.size?o.model.icons.icon.size:null,className:o.model.icons.icon.class?o.model.icons.icon.class:null},null,8,["component","color","size","className"])):e.createCommentVNode("",!0),e.createElementVNode("div",Rt,[S.value?(e.openBlock(),e.createElementBlock("div",Ot)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",At,e.toDisplayString(e.unref(g).actions.renderTitle(o.treeId,o.model.title)),1))])]),e.createElementVNode("div",Ht,[((T=o.model.badge)==null?void 0:T.value)!==void 0&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Be),{key:0,class:e.normalizeClass([(y=o.model.badge)==null?void 0:y.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),o.model.icons&&o.model.icons.post&&c.value&&!o.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:1,component:e.unref(R).getters.getIcon(o.model.icons.post.component),size:20,color:o.model.icons.post.color?o.model.icons.post.color:"inherit",class:e.normalizeClass(r.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],34)),[[L,d]]),e.createVNode(Se,null,{default:e.withCtx(()=>[c.value&&r.value&&!o.search?(e.openBlock(),e.createElementBlock("ul",Ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.model.children,N=>(e.openBlock(),e.createBlock($,{key:N.id,model:N,treeId:o.treeId,items:o.items,search:o.search,onNodeclick:p,onNodedrop:u,onNodecontext:_},null,8,["model","treeId","items","search"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])):(e.openBlock(),e.createElementBlock("li",Vt))}}},[["__scopeId","data-v-40c7ab17"]]);function xe(t){return t=t||new Map,{all:t,on(n,o){const s=t.get(n);s?s.push(o):t.set(n,[o])},off(n,o){const s=t.get(n);s&&(o?s.splice(s.indexOf(o)>>>0,1):t.set(n,[]))},emit(n,o){let s=t.get(n);s&&s.slice().map(l=>{l(o)}),s=t.get("*"),s&&s.slice().map(l=>{l(n,o)})}}}const M=xe(),g={state:e.reactive({trees:{}}),getters:{getItems(t){return g.state.trees[t].items},getItemsSelect(t){return g.state.trees[t].selected},getParentId(t,n,o,s="id",l="children",a={}){return o&&t&&(t.find(i=>i[s]===o?(a.found=n,i):g.getters.getParentId(i[l],i.id,o,s,l,a)),a.found)?a.found:!1}},mutations:{setTreeItems(t,n){g.state.trees[t].items=n},setItemSelect(t,n){g.state.trees[t].noSelect||(g.state.trees[t].multiSelect?g.state.trees[t].selected.includes(n.id)?g.state.trees[t].selected=g.state.trees[t].selected.filter(function(o){return o!==n.id}):g.state.trees[t].selected=[...g.state.trees[t].selected,n.id]:g.state.trees[t].selected=[n.id])}},actions:{initTreeStore(t,n,o,s,l,a,i,c=!0){g.state.trees[t]=[],g.state.trees[t].selected=[],g.state.trees[t].noSelect=n,g.state.trees[t].multiSelect=o,g.state.trees[t].expanded=s,g.state.trees[t].transfer=l,g.state.trees[t].renderTitle=a,g.state.trees[t].beforeItem=i,g.state.trees[t].dropInside=c},renderTitle(t,n){return g.state.trees[t].renderTitle?g.state.trees[t].renderTitle(n):n},beforeItem(t,n){return g.state.trees[t].beforeItem?g.state.trees[t].beforeItem(n):!0},isItemSelected(t,n){return g.state.trees[t].selected.includes(n)},toggleItem(t,n){n.expanded=n.expanded===void 0||!n.expanded,n.children&&n.children.length&&(n.expanded?M.emit(`expand-${t}`,{id:t,model:n}):M.emit(`collapse-${t}`,{id:t,model:n}))},isTreeExpanded(t){return g.state.trees[t].expanded},isChildOfParent(t,n,o,s){const l=g.actions.deepSearch(n,o);if(l&&l.children){for(let a=0;a<l.children.length;a++)if(l.children[a].id===s)return!0}return!1},isParentOfChild(t,n,o,s){const l=g.actions.deepSearch(n,o);return!!(l&&l.children&&g.actions.deepSearch(l.children,s))},deepSearch(t,n,o="id",s="children",l={}){return n&&t&&(t.find(a=>a[o]===n?(l.found=a,a):g.actions.deepSearch(a[s],n,o,s,l)),l.found)?l.found:!1},deepSearchByTitle(t,n,o="title",s="children",l=[]){if(n&&t&&(t.find(a=>{const i=new RegExp(n,"gi");a[o].toString().toLowerCase().match(i)!==null&&l.push(a),g.actions.deepSearchByTitle(a[s],n,o,s,l)}),l)){for(let a=0;a<l.length;a++);return l}return l},moveTreeNode(t,n,o,s,l,a){const i=g.actions.deleteTreeNode(o,s);g.actions.insertTreeNode(o,l,i,a),M.emit(`move-${n}`,{fromTreeId:t,toTreeId:n,moved:i==null?void 0:i.id,target:l,position:a})},insertTreeNode(t,n,o,s){if(t)for(let l=0;l<t.length;l++){if(t[l].id===n){let i=l;return s==="after"?(i++,t.splice(i,0,o)):s==="before"?t.splice(i,0,o):s==="inside"&&(Object.hasOwn(t[l],"children")||(t[l].children=[],t[l].opened=!0),t[l].children.splice(0,0,o)),t[l]}const a=this.insertTreeNode(t[l].children,n,o,s);if(a)return a}},deleteTreeNode(t,n){if(t)for(let o=0;o<t.length;o++){if(t[o].id===n){const l=t[o];return t.splice(o,1),l}const s=g.actions.deleteTreeNode(t[o].children,n);if(s)return s}}}},De={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(I),setup(t,{expose:n,emit:o}){let s=e.reactive({});const l=e.ref("false"),a=e.ref(null),i=new Set,c=e.computed(()=>l.value&&s),r=(p,u)=>{s=K.data,o(p,u,s),p===I.dragenter&&(i.size||u.target===a.value)&&i.add(u.target),p===I.dragleave&&i.delete(u.target),p===I.drop&&i.clear(),l.value=!!i.size};return n({elementSize:()=>be(a)}),(p,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{ref_key:"el",ref:a,onDragenter:u[0]||(u[0]=_=>r(e.unref(I).dragenter,_)),onDragleave:u[1]||(u[1]=_=>r(e.unref(I).dragleave,_)),onDragover:u[2]||(u[2]=e.withModifiers(_=>r(e.unref(I).dragover,_),["prevent"])),onDrop:u[3]||(u[3]=e.withModifiers(_=>r(e.unref(I).drop,_),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default",{transferData:c.value})]),_:3},544))}},ce={__name:"DMenu",props:{class:String,items:Array,style:[String,Object],noSelect:{type:Boolean,default:!0},renderItemTitle:Function,beforeItem:Function,bodyAsParent:{type:Boolean,default:!0}},emits:["select"],setup(t,{expose:n,emit:o}){const s=t;let l=e.ref(null),a=e.ref(!1);const i=()=>{M.emit("menu-show-request"),a.value=!0},c=()=>{var _;(_=l.value)==null||_.collapseAll(),a.value=!1},r=()=>a.value;M.on("menu-show-request",()=>{c()}),n({show:i,hide:c,elementSize:()=>l.value.elementSize(),isShowed:r,itemsCount:()=>l.value.itemsCount()});const u=_=>{o("select",_),_.model.children||c()};return(_,b)=>{const D=e.resolveDirective("click-outside");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.unref(a)?e.withDirectives((e.openBlock(),e.createBlock(de,{key:0,ref_key:"treeRef",ref:l,items:s.items,"no-select":s.noSelect,class:e.normalizeClass(s.class),style:e.normalizeStyle(s.style),onSelect:u,"render-title":s.renderItemTitle,"before-item":s.beforeItem},null,8,["items","no-select","class","style","render-title","before-item"])),[[D,()=>c()]]):e.createCommentVNode("",!0)])}}},Ce={__name:"DContextMenu",props:{items:Array,renderItemTitle:Function,beforeItem:Function},emits:["select"],setup(t,{expose:n,emit:o}){const s=t,l=e.ref(null),a=e.ref(0),i=e.ref(0),c=e.computed(()=>({left:a.value+"px",top:i.value+"px"})),r=p=>{l.value.show(),e.nextTick(()=>{const u=l.value.elementSize(),_=window.innerWidth,b=window.innerHeight;a.value=_-p.pageX<u.width?p.pageX-u.width:p.pageX,i.value=b-p.pageY<u.height?p.pageY-u.height:p.pageY,l.value.itemsCount()===0&&l.value.hide()})},d=p=>{o("select",p)};return n({show:r}),(p,u)=>(e.openBlock(),e.createBlock(ce,{ref_key:"dMenuRef",ref:l,onSelect:d,items:s.items,style:e.normalizeStyle(c.value),class:"context-menu","no-select":!0,"render-item-title":s.renderItemTitle,"before-item":s.beforeItem},null,8,["items","style","render-item-title","before-item"]))}},de={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:{type:Boolean,default:!0},dropInside:{type:Boolean,default:!0},renderTitle:Function,beforeItem:Function,search:String,context:Array,contextClick:{type:Function,default:()=>{}},contextBeforeClick:{type:Function,default:()=>!0}},emits:["select","collapse","expand","move","over","drop"],setup(t,{expose:n,emit:o}){const s=t,l=e.ref(null),a=e.ref(!1),i=e.ref(null),c=e.getCurrentInstance().uid;g.actions.initTreeStore(c,s.noSelect,s.multiSelect,s.expanded,s.transfer,s.renderTitle,s.beforeItem,s.dropInside);const r=(y,N)=>{console.log(y,N)};M.on(`expand-${c}`,y=>{o("expand",y)}),M.on(`collapse-${c}`,y=>{o("collapse",y)}),M.on(`move-${c}`,y=>{o("move",y)});const d=e.computed(()=>s.search?g.actions.deepSearchByTitle(s.items,s.search):s.items),p=(y=null)=>{g.mutations.setItemSelect(c,y.model),g.actions.toggleItem(c,y.model),o("select",y)},u=(y=null)=>{o("over",y)},_=(y=null)=>{o("drop",y)},b=()=>l.value.elementSize(),D=()=>{for(let y=0;y<s.items.length;y++)s.items[y].expanded=!0},k=()=>{for(let y=0;y<s.items.length;y++)s.items[y].expanded=!1},E=()=>c,C=y=>g.actions.deepSearch(s.items,y),S=y=>{C(y)&&g.mutations.setItemSelect(c,C(y))},w=y=>{s.contextClick({e:y.e,model:y.model,target:i.value})},x=y=>s.contextBeforeClick({model:y,target:i.value}),h=e.computed(()=>s.context),$=y=>(h.value&&(i.value=y.model,a.value.show(y.e)),!1),L=()=>T(d.value),T=y=>{let N=0;for(let m=0;m<y.length;m++)N+=g.actions.beforeItem(c,y[m])?1:0,y[m].children&&y[m].children.length>0&&(N+=T(y[m].children));return N};return n({elementSize:b,expandAll:D,collapseAll:k,getId:E,getNode:C,selectNode:S,itemsCount:L}),(y,N)=>(e.openBlock(),e.createBlock(De,{ref_key:"treeRef",ref:l,class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,m=>(e.openBlock(),e.createBlock(we,{key:m.id,model:m,treeId:e.unref(c),items:s.items,search:s.search,onNodeclick:p,onNodedragover:u,onNodedrop:_,onNodecontext:$},null,8,["model","treeId","items","search"]))),128)),h.value?(e.openBlock(),e.createBlock(Ce,{key:0,ref_key:"contextTreeRef",ref:a,items:h.value,onSelect:w,"before-item":x},null,8,["items"])):e.createCommentVNode("",!0)]),_:1},8,["onDrop"]))}},os="",Pt=W({__name:"DAccordion",props:{items:Array,renderTitle:Function,noSelect:{type:Boolean,default:!0}},emits:["move"],setup(t,{emit:n}){const o=t,s=l=>{n("move",l)};return(l,a)=>(e.openBlock(),e.createBlock(de,{class:"accordion",items:o.items,"no-select":o.noSelect,"render-title":o.renderTitle,"drop-inside":!1,onMove:s},null,8,["items","no-select","render-title"]))}},[["__scopeId","data-v-a724c500"]]),$e={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const n=t,o=e.computed(()=>{const{fixed:s,zIndex:l,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:d}=n,p=s?"fixed":"static",u=n.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${p};z-index:${l};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${d};`});return(s,l)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(o.value)},[e.renderSlot(s.$slots,"default")],4))}},Ee={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const n=t,o=e.computed(()=>{const{fixed:s,top:l,zIndex:a,minWidth:i,height:c,paddingLeft:r,transitionDuration:d,transitionTimingFunction:p}=n,u=s?"fixed":"static",_=n.useMinWidthLayout?`min-width: ${i}px;`:"";return`position:${u};top:${l}px;z-index:${a};${_}height:${c}px;padding-left:${r}px;transition-duration:${d}ms;transition-timing-function:${p};`});return(s,l)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(o.value)},[e.renderSlot(s.$slots,"default")],4))}},Te={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const n=t,o=e.computed(()=>{const{fixed:s,zIndex:l,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:d}=n,p=s?"fixed":"static",u=n.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${p};z-index:${l};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${d};`});return(s,l)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(o.value)},[e.renderSlot(s.$slots,"default")],4))}},Ne={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(t){const n=t,o=e.computed(()=>{const{zIndex:s,width:l,paddingTop:a,transitionDuration:i,transitionTimingFunction:c}=n;return`z-index:${s};width:${l}px;padding-top:${a}px;transition-duration:${i}ms;transition-timing-function:${c};`});return(s,l)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(o.value)},[e.renderSlot(s.$slots,"default")],4))}},Ve={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(t){const n=t,o=e.computed(()=>{const{paddingTop:s,paddingBottom:l,paddingLeft:a,transitionDuration:i,transitionTimingFunction:c}=n,r=`overflow:${n.overflowHidden?"hidden":"visible"};`;return`padding-top:${s}px;padding-bottom:${l}px;padding-left:${a}px;${r}transition-duration:${i}ms;transition-timing-function:${c};`});return(s,l)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(o.value),class:"d-layout-content"},[e.renderSlot(s.$slots,"default")],4))}};function Wt(t){const n=e.ref(0),o=e.computed(()=>`transform: translateX(${-n.value}px);`);let s=!1;function l(p){n.value=p}function a(){var p;const u=((p=document.scrollingElement)===null||p===void 0?void 0:p.scrollLeft)||0;l(u)}function i(){a()}function c(){document.addEventListener("scroll",a)}function r(){s&&document.removeEventListener("scroll",a)}function d(){i(),c(),s=!0}return e.watch(t,p=>{p?d():r()},{immediate:!0}),e.onUnmounted(()=>{r()}),o}const jt=1001,Xt=999,Yt=998,Ut={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse","sidebar-mask-click"],setup(t,{emit:n}){const o=t,s=e.computed(()=>o.useMinWidthLayout?`min-width:${o.minWidth}px;`:""),l=e.computed(()=>o.useMinWidthLayout&&(o.fixedHeaderAndTab||o.fixedFooter)),a=Wt(l),i=e.computed(()=>o.fixedHeaderAndTab?a.value:""),c=e.computed(()=>o.fixedFooter?a.value:""),r=e.computed(()=>{const{transitionDuration:h,transitionTimingFunction:$}=o;return{transitionDuration:h,transitionTimingFunction:$}}),d=e.computed(()=>o.mode==="vertical"),p=e.computed(()=>o.isMobile||d.value?1003:1e3),u=e.computed({get(){return o.sidebarCollapse},set(h){n("update:sidebar-collapse",h)}});function _(){n("sidebar-mask-click")}const b=e.computed(()=>o.isMobile&&!u.value),D=e.computed(()=>{const{transitionDuration:h,transitionTimingFunction:$}=o;return`background-color:${o.maskBg};transition-duration:${h}ms;transition-timing-function:${$};`}),k=e.computed(()=>{const{sidebarWidth:h,sidebarCollapsedWidth:$}=o,L=o.isMobile?0:$,T=u.value?L:h;return o.sidebarVisible?T:0}),E=e.computed(()=>o.isMobile?0:k.value),C=e.computed(()=>d.value?E.value:0),S=e.computed(()=>!o.isMobile&&!d.value&&o.headerVisible?o.headerHeight:0),w=e.computed(()=>{let h=0;return o.fixedHeaderAndTab&&(o.headerVisible&&(h+=o.headerHeight),o.tabVisible&&(h+=o.tabHeight)),h}),x=e.computed(()=>o.fixedFooter&&o.footerVisible?o.footerHeight:0);return(h,$)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(s.value)},[t.headerVisible?(e.openBlock(),e.createBlock($e,e.mergeProps({key:0},r.value,{fixed:t.fixedHeaderAndTab,"z-index":jt,"min-width":t.minWidth,height:t.headerHeight,"padding-left":C.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(h.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),t.tabVisible?(e.openBlock(),e.createBlock(Ee,e.mergeProps({key:1},r.value,{fixed:t.fixedHeaderAndTab,"z-index":Xt,"min-width":t.minWidth,top:t.headerHeight,height:t.tabHeight,"padding-left":E.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(h.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),t.sidebarVisible?(e.openBlock(),e.createBlock(Ne,e.mergeProps({key:2},r.value,{"z-index":p.value,width:k.value,"padding-top":S.value}),{default:e.withCtx(()=>[e.renderSlot(h.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(D.value),onClick:_},null,4)):e.createCommentVNode("",!0),e.createVNode(Ve,e.mergeProps(r.value,{"padding-top":w.value,"padding-bottom":x.value,"padding-left":E.value,"overflow-hidden":t.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),t.footerVisible?(e.openBlock(),e.createBlock(Te,e.mergeProps({key:4},r.value,{fixed:t.fixedFooter,"z-index":Yt,"min-width":t.minWidth,height:t.footerHeight,"padding-left":E.value,style:c.value}),{default:e.withCtx(()=>[e.renderSlot(h.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},U={state:e.reactive({theme:"dark"}),getters:{theme(){return U.state.theme}},mutations:{setTheme(t){U.state.theme=t,document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(t)}},actions:{toggleTheme(){U.state.theme=U.state.theme==="dark"?"light":"dark",document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(U.state.theme)}}},qt={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(t){const n=t;return U.mutations.setTheme(n.theme),(o,s)=>e.renderSlot(o.$slots,"default")}},ss="",Gt={__name:"DScrollProvider",props:{xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(t){const n=t;e.useCssVars(a=>({e35a6f9a:o.value,e35a6f98:s.value}));const o=e.computed(()=>n.xHide?"hidden":"visible"),s=e.computed(()=>n.yHide?"hidden":"visible"),l=a=>{document.body.classList.add(a),document.documentElement.classList.add(a),document.documentElement.classList.add("d-global-scroll")};return e.onMounted(()=>{l("colored-scroller")}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(a.$slots,"default")]))}},ls="",Zt=W({__name:"DScroll",props:{autoHide:{type:Boolean,default:!0},xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(t){const n=t;e.useCssVars(l=>({c07fa29a:o.value,c07fa298:s.value}));const o=e.computed(()=>n.xHide?"hidden":"visible"),s=e.computed(()=>n.yHide?"hidden":"visible");return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.autoHide?"d-scroll-hide":"d-scroll")},[e.renderSlot(l.$slots,"default",{},void 0,!0)],2))}},[["__scopeId","data-v-d50b3609"]]),Kt={class:"modal-content"},Jt={class:"modal-header"},Qt={class:"modal-title"},vt={class:"modal-body"},eo={class:"modal-footer"},pe={__name:"DModal",props:{show:Boolean,width:String,maxWidth:String},emits:["open","close"],setup(t,{expose:n,emit:o}){const s=t,l=e.ref(null),a=e.ref(!1);a.value=s==null?void 0:s.show;const i=()=>{a.value=!0,o("open",l)},c=()=>{a.value=!1,o("close",l)};return n({show:i,hide:c}),(r,d)=>{const p=e.resolveDirective("keydown");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[a.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:l,class:"modal"},[e.createElementVNode("div",{class:"modal-dialog",style:e.normalizeStyle({width:s.width,maxWidth:s.maxWidth})},[e.createElementVNode("div",Kt,[e.createElementVNode("div",Jt,[e.createElementVNode("h5",Qt,[e.renderSlot(r.$slots,"modal-title")])]),e.createElementVNode("div",vt,[e.renderSlot(r.$slots,"default")]),e.createElementVNode("div",eo,[e.renderSlot(r.$slots,"modal-footer")])])],4)])),[[p,c,"Escape"]]):e.createCommentVNode("",!0)]),_:3})])}}},q=e.shallowRef();function me(t){t===void 0&&(t=q.value.comp.returnValue()),q.value.resolve(t),q.value=null}function Le(t,n,o="default"){return new Promise(s=>{q.value={dialog:t,props:n,wrapper:o,resolve:s}})}var to=(t,n)=>{const o=t.__vccOpts||t;for(const[s,l]of n)o[s]=l;return o};const oo=e.defineComponent({name:"DialogWrapper",components:{},props:{name:{type:String,default:"default"},transitionAttrs:Object},setup(){const t=e.ref();return e.watch(t,()=>{q.value&&(q.value.comp=t.value)}),{dialogRef:q,dialogInstance:t}}});function no(t,n,o,s,l,a){return e.openBlock(),e.createBlock(e.Transition,e.normalizeProps(e.guardReactiveProps(t.transitionAttrs)),{default:e.withCtx(()=>[t.dialogRef&&t.dialogRef.wrapper===t.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.dialogRef.dialog),e.mergeProps({key:0},t.dialogRef.props,{ref:"dialogInstance"}),null,16)):e.createCommentVNode("",!0)]),_:1},16)}var so=to(oo,[["render",no]]);const lo={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Ie={__name:"DAlertDialog",props:{title:String,message:String},setup(t,{expose:n}){const o=t;return n({returnValue:()=>!0}),(l,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(pe,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",lo,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(me)())},{default:e.withCtx(()=>[e.createTextVNode("Закрыть")]),_:1})])]),_:1})]))}},ao={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Me={__name:"DConfirmDialog",props:{title:String,message:String},setup(t,{expose:n}){const o=t;return n({returnValue:()=>!0}),(l,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(pe,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",ao,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(me)())},{default:e.withCtx(()=>[e.createTextVNode("Да")]),_:1}),e.createVNode(H,{class:"button-red",onClick:a[1]||(a[1]=i=>e.unref(me)(!1))},{default:e.withCtx(()=>[e.createTextVNode("Нет")]),_:1})])]),_:1})]))}},ro={class:"dropdown"},io={__name:"DDropdown",props:{class:String,icon:{type:[String,null],default:null},items:Array,menuStyle:Object,renderItemTitle:Function,beforeItem:Function,type:String,bodyAsParent:{type:Boolean,default:!0}},emits:["select","click"],setup(t,{expose:n,emit:o}){const s=t,l=e.useSlots(),a=e.ref(null),i=e.ref(null),c=e.ref(0),r=e.ref(0),d=b=>{if(o("click",b),a.value.isShowed()){a.value.hide();return}a.value.show(),e.nextTick(()=>{const D=a.value.elementSize(),k=i.value.elementSize(),E=window.innerWidth,C=window.innerHeight;c.value=E-(k.x+k.width)<D.width?k.left-D.width+k.width:k.left,r.value=C-(k.y+k.height)<D.height?k.top-D.height-5:k.height+k.top+5})},p=b=>{o("select",b)},u=e.computed(()=>({left:c.value+"px",top:r.value+"px",position:s.bodyAsParent?"absolute":"fixed",...s.menuStyle}));n({show:d});const _=b=>!!l[b];return(b,D)=>(e.openBlock(),e.createElementBlock("div",ro,[_("default")?(e.openBlock(),e.createBlock(H,{key:0,ref_key:"buttonRef",ref:i,class:e.normalizeClass(s.class),icon:s.icon,onClick:e.withModifiers(d,["stop","prevent"]),type:s.type},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"default")]),_:3},8,["class","icon","onClick","type"])):(e.openBlock(),e.createBlock(H,{key:1,ref_key:"buttonRef",ref:i,class:e.normalizeClass(s.class),icon:s.icon,onClick:e.withModifiers(d,["stop","prevent"]),type:s.type},null,8,["class","icon","onClick","type"])),e.createVNode(ce,{ref_key:"dMenuRef",ref:a,items:s.items,class:"dropdown-menu",style:e.normalizeStyle(u.value),"no-select":!0,onSelect:p,"render-item-title":s.renderItemTitle,"before-item":s.beforeItem,"body-as-parent":s.bodyAsParent},null,8,["items","style","render-item-title","before-item","body-as-parent"])]))}},co={},po={class:"d-panel"};function mo(t,n){return e.openBlock(),e.createElementBlock("div",po,[e.renderSlot(t.$slots,"default")])}const ze=W(co,[["render",mo]]),fo={class:"card-header"},uo={class:"modal-title"},ho={class:"card-body"},go={class:"card-footer"},yo={__name:"DCard",setup(t){return(n,o)=>(e.openBlock(),e.createBlock(ze,{class:"d-card"},{default:e.withCtx(()=>[e.createElementVNode("div",fo,[e.createElementVNode("h5",uo,[e.renderSlot(n.$slots,"title")])]),e.createElementVNode("div",ho,[e.renderSlot(n.$slots,"default")]),e.createElementVNode("div",go,[e.renderSlot(n.$slots,"footer")])]),_:3}))}},_o=new Map;class ko{constructor(n,o,s){this.remaining=o,this.callback=n,this.notifyItem=s,this.resume()}pause(){clearTimeout(this.notifyItem.timer),this.remaining-=Date.now()-this.start}resume(){this.start=Date.now(),clearTimeout(this.notifyItem.timer),this.notifyItem.timer=setTimeout(this.callback,this.remaining)}}const fe="[-+]?[0-9]*.?[0-9]+",Re=[{name:"px",regexp:new RegExp(`^${fe}px$`)},{name:"%",regexp:new RegExp(`^${fe}%$`)},{name:"px",regexp:new RegExp(`^${fe}$`)}],bo=t=>{if(t==="auto")return{type:t,value:0};for(let n=0;n<Re.length;n++){const o=Re[n];if(o.regexp.test(t))return{type:o.name,value:parseFloat(t)}}return{type:"",value:t}},Bo=t=>{switch(typeof t){case"number":return{type:"px",value:t};case"string":return bo(t);default:return{type:"",value:t}}},Oe={x:new Set(["left","center","right"]),y:new Set(["top","bottom"])},So=(t=>()=>t++)(0),wo=t=>typeof t!="string"?[]:t.split(/\s+/gi).filter(Boolean),xo=t=>{typeof t=="string"&&(t=wo(t));let n=null,o=null;return t.forEach(s=>{Oe.y.has(s)&&(o=s),Oe.x.has(s)&&(n=s)}),{x:n,y:o}},ue={position:["top","right"],cssAnimation:"fade",velocityAnimation:{enter:t=>({height:[t.clientHeight,0],opacity:[1,0]}),leave:{height:0,opacity:[0,1]}}},Do={__name:"VelocityGroup",emits:["enter","leave","after-leave"],setup(t,{emit:n}){const o=(a,i)=>{n("enter",a,i)},s=(a,i)=>{n("leave",a,i)},l=()=>{n("after-leave")};return(a,i)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",css:!1,onEnter:o,onLeave:s,onAfterLeave:l},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},Co=Object.assign({inheritAttrs:!1},{__name:"CssGroup",props:{name:String},setup(t){const n=t;return(o,s)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",name:n.name},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["name"]))}}),$o=["data-id"],Eo=["onClick"],To=["innerHTML"],No=["innerHTML"],Vo={key:0,class:"d-notification-title"},Lo={class:"notification-content"},Io={__name:"DNotificationProvider",props:{group:{type:String,default:""},width:{type:[String,Number],default:300},reverse:{type:Boolean,default:!1},position:{type:[String,Array,null],default:ue.position},classes:{type:String,default:"d-notification"},animationType:{type:String,default:"css"},animation:{type:[String,Object],default:ue.velocityAnimation},animationName:{type:String,default:ue.cssAnimation},speed:{type:Number,default:300},duration:{type:Number,default:3e3},delay:{type:Number,default:0},max:{type:Number,default:1/0},ignoreDuplicates:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!0},pauseOnHover:{type:Boolean,default:!1},dangerouslySetInnerHtml:{type:Boolean,default:!1}},emits:["click","destroy","start"],setup(t,{emit:n}){const o=t,s={IDLE:0,DESTROYED:2},l=e.ref([]),a=e.ref(null),i=e.ref(_o.get("velocity")),c=e.computed(()=>o.animationType==="velocity"),r=e.computed(()=>c.value?Do:Co),d=e.computed(()=>l.value.filter(m=>m.state!==s.DESTROYED)),p=e.computed(()=>Bo(o.width)),u=e.computed(()=>{const{x:m,y:V}=xo(o.position),B=p.value.value,A=p.value.type,X={width:B+A};return V&&(X[V]="0px"),m&&(m==="center"?X.left=`calc(50% - ${+B/2}${A})`:X[m]="0px"),X}),_=e.computed(()=>"bottom"in u.value),b=m=>{n("click",m),o.closeOnClick&&x(m)},D=()=>{var m;o.pauseOnHover&&((m=a.value)==null||m.pause())},k=()=>{var m;o.pauseOnHover&&((m=a.value)==null||m.resume())},E=m=>{if(m.group||(m.group=""),m.data||(m.data={}),o.group!==m.group)return;if(m.clean||m.clear){$();return}const V=typeof m.duration=="number"?m.duration:o.duration,B=typeof m.speed=="number"?m.speed:o.speed,A=typeof m.ignoreDuplicates=="boolean"?m.ignoreDuplicates:o.ignoreDuplicates,{title:X,text:te,type:oe,data:ne,id:se}=m,P={id:se||So(),title:X,text:te,type:oe,state:s.IDLE,speed:B,length:V+2*B,data:ne};V>=0&&(a.value=new ko(()=>x(P),P.length,P));const le=o.reverse?!_.value:_.value;let Z=-1;const ae=d.value.some(J=>J.title===m.title&&J.text===m.text);(!A||!ae)&&(le?(l.value.push(P),n("start",P),d.value.length>o.max&&(Z=0)):(l.value.unshift(P),n("start",P),d.value.length>o.max&&(Z=d.value.length-1)),Z!==-1&&x(d.value[Z]))},C=m=>{h(m)},S=m=>["d-notification-template",o.classes,m.type||""],w=m=>c.value?void 0:{transition:`all ${m.speed}ms`},x=m=>{clearTimeout(m.timer),m.state=s.DESTROYED,N(),n("destroy",m)},h=m=>{const V=l.value.find(B=>B.id===m);V&&x(V)},$=()=>{d.value.forEach(x)},L=(m,V)=>{var A;const B=(A=o.animation)==null?void 0:A[m];return typeof B=="function"?B(V):B},T=(m,V)=>{if(!c.value)return;const B=L("enter",m);i.value(m,B,{duration:o.speed,complete:V})},y=(m,V)=>{if(!c.value)return;const B=L("leave",m);i.value(m,B,{duration:o.speed,complete:V})};function N(){l.value=l.value.filter(m=>m.state!==s.DESTROYED)}return e.onMounted(()=>{M.on("notification-add",E),M.on("notification-close",C)}),(m,V)=>(e.openBlock(),e.createElementBlock("div",{class:"d-notification-group",style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{name:t.animationName,onEnter:T,onLeave:y,onAfterLeave:N},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,B=>(e.openBlock(),e.createElementBlock("div",{key:B.id,class:"d-notification-wrapper",style:e.normalizeStyle(w(B)),"data-id":B.id,onMouseenter:D,onMouseleave:k},[e.renderSlot(m.$slots,"body",{class:e.normalizeClass([t.classes,B.type]),item:B,close:()=>x(B)},()=>[e.createElementVNode("div",{class:e.normalizeClass(S(B)),onClick:A=>b(B)},[t.dangerouslySetInnerHtml?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[B.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-notification-title",innerHTML:B.timer},null,8,To)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"notification-content",innerHTML:B.text},null,8,No)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.title?(e.openBlock(),e.createElementBlock("div",Vo,e.toDisplayString(B.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Lo,e.toDisplayString(B.text),1)],64))],10,Eo)])],44,$o))),128))]),_:3},40,["name"]))],4))}},Mo={class:"d-info-progress-icon-container"},zo={class:"d-info-progress-icon"},Ro={class:"d-info-progress-data-container"},Oo=["innerHTML"],Ao={__name:"DInfoProgress",props:{style:[String,Object],label:String,progress:Number,icon:String,type:String},emits:["click"],setup(t,{emit:n}){const o=t,s=e.computed(()=>o.icon?R.getters.getIcon(o.icon):null);return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-info-progress",o.type?`d-info-progress-${o.type}`:null]),style:e.normalizeStyle(o.style),onClick:a[0]||(a[0]=i=>{n("click",i)})},[e.createElementVNode("div",Mo,[e.createElementVNode("div",zo,[o.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:s.value,color:"inherit",size:17},null,8,["component"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Ro,[e.createElementVNode("div",{class:"d-info-progress-line",style:e.normalizeStyle("width: "+o.progress+"%;")},null,4),e.createElementVNode("div",{class:"d-info-progress-label",innerHTML:t.label},null,8,Oo)])],6))}},Ho={class:"d-checkbox"},Fo=["id","checked","disabled"],Po=["for"],Wo={__name:"DCheckbox",props:{label:String,modelValue:Boolean,disabled:{type:Boolean,default:!1},change:Function,checked:Boolean},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,l=e.getCurrentInstance().uid,a=e.computed({get:()=>o.modelValue,set:i=>{n("update:modelValue",i)}});return(i,c)=>(e.openBlock(),e.createElementBlock("div",Ho,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=r=>a.value=r),id:`i-${e.unref(l)}`,type:"checkbox",checked:o.checked,disabled:o.disabled,onChange:c[1]||(c[1]=(...r)=>o.change&&o.change(...r))},null,40,Fo),[[e.vModelCheckbox,a.value]]),e.createElementVNode("label",{for:`i-${e.unref(l)}`},e.toDisplayString(o.label),9,Po)]))}};async function Ae(t,n){return await Le(Me,{title:t,message:n})}async function He(t,n){return await Le(Ie,{title:t,message:n})}const jo={__name:"DDialogProvider",setup(t){return window.alert=He,window.confirm=Ae,(n,o)=>(e.openBlock(),e.createBlock(e.unref(so)))}},Xo={class:"d-select"},Yo={key:0,class:"label"},Uo=["value","selected","disabled"],qo={__name:"DSelect",props:{label:String,size:String,options:Array,modelValue:String,scale:String},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,s=e.computed(()=>o.scale?"d-select-"+o.scale:""),l=e.computed({get:()=>o.modelValue,set:a=>{n("update:modelValue",a)}});for(let a=0;a<o.options.length;a++)if(o.options[a].selected){l.value=o.options[a].value;break}return(a,i)=>(e.openBlock(),e.createElementBlock("div",Xo,[o.label?(e.openBlock(),e.createElementBlock("div",Yo,e.toDisplayString(o.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=c=>l.value=c),class:e.normalizeClass(s.value),style:e.normalizeStyle(o.size==="wide"?"width:100%":"")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,(c,r)=>(e.openBlock(),e.createElementBlock("option",{key:r,value:c.value,selected:c.selected,disabled:c.disabled},e.toDisplayString(c.label),9,Uo))),128))],6),[[e.vModelSelect,l.value]])]))}},Go=["title"],Zo=["title"],Ko={__name:"DTabLabel",props:{tab:Object},setup(t){const n=t;return(o,s)=>n.tab.label?(e.openBlock(),e.createElementBlock("span",{key:0,title:n.tab.title?n.tab.title:""},e.toDisplayString(n.tab.label),9,Go)):n.tab.icon?(e.openBlock(),e.createElementBlock("span",{key:1,title:n.tab.title?n.tab.title:""},[e.createVNode(e.unref(Y),{component:n.tab.icon},null,8,["component"])],8,Zo)):e.createCommentVNode("",!0)}},rs="",Jo={class:"d-tabs"},Qo=W({__name:"DTabs",props:{tabs:Array},setup(t){const n=t,o=e.toRef(n,"tabs"),s=e.ref(0),l=a=>{s.value=a};return(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Jo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(c,r)=>(e.openBlock(),e.createBlock(Ko,{index:r,tab:c,class:e.normalizeClass(["d-tab-title",r===s.value?"active":""]),onClick:d=>l(r)},null,8,["index","tab","class","onClick"]))),256))]),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value[s.value].component)))],1024))],64))}},[["__scopeId","data-v-c98761cd"]]),cs="",vo={class:"d-grid"},en=W({__name:"DGrid",props:{gap:{type:String,default:"1em"},colXs:{type:String,default:"repeat(1, 1fr)"},colSm:String,colMd:String,colLg:String,colXl:String,colXxl:String},setup(t){const n=t;e.useCssVars(p=>({"09eba472":r[0],"09eba434":r[1],"09eba3f6":r[2],"09eba3b8":r[3],"09eba37a":r[4],"09eba33c":r[5],"898eb2ac":n.gap}));const{colXs:o,colSm:s,colMd:l,colLg:a,colXl:i,colXxl:c}=e.toRefs(n),r=[o.value,s.value,l.value,a.value,i.value,c.value];let d=null;for(let p=0;p<r.length;p++)d||(d=r[0]),p>0&&(r[p]?d=r[p]:r[p]=d);return(p,u)=>(e.openBlock(),e.createElementBlock("div",vo,[e.renderSlot(p.$slots,"default",{},void 0,!0)]))}},[["__scopeId","data-v-b45e8130"]]),tn=["src","alt","title"],on={__name:"DImage",props:{src:String,srcFail:String,alt:String,title:String,width:String,height:String,radius:String},setup(t){const n=t,o=e.ref(null),s=new Image;return s.onload=()=>{o.value=s.src},s.onerror=()=>{o.value=n.srcFail},e.onMounted(()=>{s.src=n.src}),(l,a)=>o.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.value,alt:n.alt,title:n.title,style:e.normalizeStyle({width:n.width,height:n.height,borderRadius:n.radius})},null,12,tn)):e.createCommentVNode("",!0)}},ps="",nn={class:"d-textarea"},sn={key:0,class:"label"},ln=["rows","cols","placeholder"],an=W({__name:"DTextarea",props:{label:String,placeholder:String,scale:String,modelValue:String,rows:{type:Number,default:3},cols:{type:Number,default:null},focus:Boolean},emits:["update:modelValue"],setup(t,{expose:n,emit:o}){const s=t,l=e.ref(null),a=e.computed(()=>s.scale==="small"?"d-textarea-small":s.scale==="large"?"d-textarea-large":""),i=e.computed({get:()=>s.modelValue,set:r=>{o("update:modelValue",r)}});e.onMounted(()=>{s.focus&&c()});const c=()=>{l.value.focus()};return n({focus:c}),(r,d)=>(e.openBlock(),e.createElementBlock("div",nn,[s.label?(e.openBlock(),e.createElementBlock("div",sn,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":d[0]||(d[0]=p=>i.value=p),rows:s.rows,cols:s.cols,placeholder:s.placeholder,class:e.normalizeClass(a.value),style:{width:"100%"}},null,10,ln),[[e.vModelText,i.value]])]))}},[["__scopeId","data-v-0e805d5d"]]);class rn{constructor(n){this.fields=n}validate(){let n=!1;for(let o in this.fields)this.fields[o].ref.value.validate()===!0&&(n=!0);return!n}}class cn{validate(n,o="https"){return this._isValidURL(n)||(n=o+"://"+n),this._isValidURL(n)}message(n,o){let s="";switch(n){case"url":s=o;break}return s}_isValidURL(n){try{return new URL(n),!0}catch{return!1}}}const dn=new cn;class pn{validate(n=""){return n!==""}message(n){return n}}const mn=new pn;class fn{validate(n="",o=0){return n.length>=o}message(n){return n}}const un=new fn;class hn{validate(n="",o=0){return n.length<=o}message(n){return n}}const gn=new hn;class yn{validate(n){return/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(n)}message(n){return n}}const _n=new yn;class kn{validate(n){return!isNaN(parseFloat(n))&&!isNaN(n-0)}message(n){return n}}const bn=new kn,z={RulesUrl:dn,RulesRequired:mn,RulesMin:un,RulesMax:gn,RulesEmail:_n,RulesNumber:bn};class Bn{validate(n,o){var l,a,i,c,r,d,p,u,_,b,D,k,E,C;let s="";if(o){let S=!1;for(let w in o)if(!S)switch(w){case"url":s=z.RulesUrl.validate(n,"https")||n.length===0?"":z.RulesUrl.message("url",(l=o[w])!=null&&l.message?(a=o[w])==null?void 0:a.message:"url_incorrect"),S=s!=="";break;case"required":s=z.RulesRequired.validate(n)?"":z.RulesRequired.message((i=o[w])!=null&&i.message?(c=o[w])==null?void 0:c.message:"required"),S=s!=="";break;case"min":s=z.RulesMin.validate(n,(r=o[w])==null?void 0:r.value)?"":z.RulesMin.message((d=o[w])!=null&&d.message?(p=o[w])==null?void 0:p.message:"very_small"),S=s!=="";break;case"max":s=z.RulesMax.validate(n,(u=o[w])==null?void 0:u.value)?"":z.RulesMax.message((_=o[w])!=null&&_.message?(b=o[w])==null?void 0:b.message:"vary_large"),S=s!=="";break;case"email":s=z.RulesEmail.validate(n)?"":z.RulesMax.message((D=o[w])!=null&&D.message?(k=o[w])==null?void 0:k.message:"email_incorrect"),S=s!=="";break;case"number":s=z.RulesNumber.validate(n)?"":z.RulesNumber.message((E=o[w])!=null&&E.message?(C=o[w])==null?void 0:C.message:"number_incorrect"),S=s!=="";break}}return s}}const Sn=new Bn,wn={style:{display:"flex","flex-direction":"column"}},xn={key:0,class:"d-label"},Dn={key:0,class:"text-red"},Cn={style:{display:"flex","flex-direction":"row"}},$n={style:{flex:"1",position:"relative"}},En=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"})],-1)],Tn=["id","type","placeholder","disabled"],Nn=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"})],-1)],Vn={key:1,class:"d-help"},Ln={key:2,class:"d-error text-red"},In={__name:"DInputString",props:{form:Object,name:String,modelValue:String,label:String,error:String,help:String,placeholder:String,type:{type:String,default:"text"},pre:Object,post:Object,fieldRules:Object,scale:String,focus:Boolean,disabled:Boolean},emits:["update:modelValue","input"],setup(t,{expose:n,emit:o}){const s=t,l=e.ref(s.error),a=it(),i=e.ref(!1),c=e.ref(null);//!props.form ? ref(null) : props.form.fields[props.name].ref
|
|
2
|
-
const r=e.computed({get:()=>s.modelValue,set:C=>{o("update:modelValue",C)}}),d=e.computed(()=>s.type==="password"?"password":"text"),p=e.computed(()=>s.scale),u=C=>{o("input",C),_()},_=()=>(l.value=Sn.validate(r.value,s.form.fields[s.name].rules),!!l.value);e.onMounted(()=>{b()});const b=()=>{var C;(C=c.value)==null||C.focus()},D=()=>{r.value=""},k=C=>{i.value=C};return n({focus:b,setError:C=>{l.value=C},validate:_}),(C,S)=>{var w,x,h,$,L,T,y,N,m,V,B,A,X,te,oe,ne,se,P,le,Z,ae,_e,J,Ue,qe,Ge,Ze,Ke,Je,Qe,ve,et,tt,ot,nt,st,lt,at,rt;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-input-string",p.value])},[e.createElementVNode("div",wn,[s.label?(e.openBlock(),e.createElementBlock("div",xn,[e.createTextVNode(e.toDisplayString(s.label),1),(w=s.form)!=null&&w.fields[s.name].rules&&s.form.fields[s.name].rules.hasOwnProperty("required")?(e.openBlock(),e.createElementBlock("span",Dn,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Cn,[(h=(x=s.pre)==null?void 0:x.outside)!=null&&h.component?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["d-pre",s.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((L=($=s.pre)==null?void 0:$.outside)==null?void 0:L.component)))],2)):(y=(T=s.pre)==null?void 0:T.outside)!=null&&y.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["d-pre",s.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((m=(N=s.pre)==null?void 0:N.outside)==null?void 0:m.text),3)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",$n,[(B=(V=s.pre)==null?void 0:V.inside)!=null&&B.action&&((X=(A=s.pre)==null?void 0:A.inside)==null?void 0:X.action)==="clear"&&((te=r.value)==null?void 0:te.length)>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-pre-inside-button",onClick:D},En)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{id:e.unref(a),ref_key:"inputRef",ref:c,"onUpdate:modelValue":S[0]||(S[0]=ke=>r.value=ke),style:{width:"100%"},type:d.value,placeholder:s.placeholder,onInput:u,onFocus:S[1]||(S[1]=ke=>k(!0)),onFocusout:S[2]||(S[2]=ke=>k(!1)),class:e.normalizeClass([(ne=(oe=s.pre)==null?void 0:oe.outside)!=null&&ne.component||(P=(se=s.pre)==null?void 0:se.outside)!=null&&P.text?"has-pre":"",(Z=(le=s.post)==null?void 0:le.outside)!=null&&Z.component||(_e=(ae=s.post)==null?void 0:ae.outside)!=null&&_e.text?"has-post":"",(Ue=(J=s.pre)==null?void 0:J.inside)!=null&&Ue.action?"has-pre-inside-button":"",(Ge=(qe=s.post)==null?void 0:qe.inside)!=null&&Ge.action?"has-post-inside-button":"",i.value?"focused":""]),disabled:s.disabled},null,42,Tn),[[e.vModelDynamic,r.value]]),(Ke=(Ze=s.post)==null?void 0:Ze.inside)!=null&&Ke.action&&((Qe=(Je=s.post)==null?void 0:Je.inside)==null?void 0:Qe.action)==="clear"&&((ve=r.value)==null?void 0:ve.length)>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"d-post-inside-button",onClick:D},Nn)):e.createCommentVNode("",!0)]),(tt=(et=s.post)==null?void 0:et.outside)!=null&&tt.component?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["d-post",s.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((nt=(ot=s.post)==null?void 0:ot.outside)==null?void 0:nt.component)))],2)):(lt=(st=s.post)==null?void 0:st.outside)!=null&<.text?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["d-post",s.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((rt=(at=s.post)==null?void 0:at.outside)==null?void 0:rt.text),3)],2)):e.createCommentVNode("",!0)]),s.help?(e.openBlock(),e.createElementBlock("div",Vn,e.toDisplayString(s.help),1)):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",Ln,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0)])],2)}}},G={state:{},getters:{getComponent(t){return G.state[t]},getComponents(){return G.state}},mutations:{addComponent(t,n){G.state.name=n},addComponents(t){for(const n in t)t.hasOwnProperty(n)&&(G.state[n]=t[n])}}},he=t=>{typeof t=="string"&&(t={title:"",text:t}),typeof t=="object"&&M.emit("notification-add",t)};he.close=t=>{M.emit("notification-close",t)};const Mn=()=>({notify:he}),zn={mounted:function(t,n){t.clickOutsideEvent=function(o){t===o.target||t.contains(o.target)||n.value(o,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:function(t){document.removeEventListener("click",t.clickOutsideEvent)}},Rn={beforeMount(t,n){t._keydownCallback=o=>{o.key===n.arg&&n.value()},document.addEventListener("keydown",t._keydownCallback)},unmounted(t,n){document.removeEventListener("keydown",t._keydownCallback),delete t._keydownCallback}},On={beforeMount(t){t.focus()}};function Fe(t){return t.type.indexOf("mouse")!==-1?t.clientX:t.touches[0].clientX}function Pe(t){return t.type.indexOf("mouse")!==-1?t.clientY:t.touches[0].clientY}var An=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,n)}catch{}return t}(),Hn={disableClick:!1,tapTolerance:10,swipeTolerance:30,touchHoldTolerance:400,longTapTimeInterval:400,touchClass:"",dragFrequency:100,rollOverFrequency:100};function Q(t){var n=this.$$touchObj,o=t.type.indexOf("touch")>=0,s=t.type.indexOf("mouse")>=0,l=this;o&&(n.lastTouchStartTime=t.timeStamp),!(s&&n.lastTouchStartTime&&t.timeStamp-n.lastTouchStartTime<350)&&(n.touchStarted||(Ye(this),n.touchStarted=!0,n.touchMoved=!1,n.swipeOutBounded=!1,n.startX=Fe(t),n.startY=Pe(t),n.currentX=0,n.currentY=0,n.touchStartTime=t.timeStamp,n.hasSwipe=O(this,"swipe")||O(this,"swipe.left")||O(this,"swipe.right")||O(this,"swipe.top")||O(this,"swipe.bottom"),O(this,"hold")&&(n.touchHoldTimer=setTimeout(function(){n.touchHoldTimer=null,F(t,l,"hold")},n.options.touchHoldTolerance)),F(t,this,"press")))}function v(t){var n=this.$$touchObj,o=Fe(t),s=Pe(t),l=n.currentX!=o||n.currentY!=s;if(n.currentX=o,n.currentY=s,n.touchMoved){if(n.hasSwipe&&!n.swipeOutBounded){var i=n.options.swipeTolerance;n.swipeOutBounded=Math.abs(n.startX-n.currentX)>i&&Math.abs(n.startY-n.currentY)>i}}else{var a=n.options.tapTolerance;n.touchMoved=Math.abs(n.startX-n.currentX)>a||Math.abs(n.startY-n.currentY)>a,n.touchMoved&&(ye(n),F(t,this,"drag.once"))}if(O(this,"rollover")&&l){var c=t.timeStamp,r=n.options.rollOverFrequency;(n.touchRollTime==null||c>n.touchRollTime+r)&&(n.touchRollTime=c,F(t,this,"rollover"))}if(O(this,"drag")&&n.touchStarted&&n.touchMoved&&l){var c=t.timeStamp,r=n.options.dragFrequency;(n.touchDragTime==null||c>n.touchDragTime+r)&&(n.touchDragTime=c,F(t,this,"drag"))}}function We(){var t=this.$$touchObj;ye(t),ge(this),t.touchStarted=t.touchMoved=!1,t.startX=t.startY=0}function ee(t){var n=this.$$touchObj,o=t.type.indexOf("touch")>=0,s=t.type.indexOf("mouse")>=0;o&&(n.lastTouchEndTime=t.timeStamp);var l=o&&!n.touchHoldTimer;if(ye(n),n.touchStarted=!1,ge(this),!(s&&n.lastTouchEndTime&&t.timeStamp-n.lastTouchEndTime<350))if(F(t,this,"release"),n.touchMoved){if(n.hasSwipe&&!n.swipeOutBounded){var a=n.options.swipeTolerance,i,c=Math.abs(n.startY-n.currentY),r=Math.abs(n.startX-n.currentX);(c>a||r>a)&&(c>a?i=n.startY>n.currentY?"top":"bottom":i=n.startX>n.currentX?"left":"right",O(this,"swipe."+i)?F(t,this,"swipe."+i,i):F(t,this,"swipe",i))}}else if(O(this,"longtap")&&t.timeStamp-n.touchStartTime>n.options.longTapTimeInterval)t.cancelable&&t.preventDefault(),F(t,this,"longtap");else if(O(this,"hold")&&l){t.cancelable&&t.preventDefault();return}else F(t,this,"tap")}function je(){Ye(this)}function Xe(){ge(this)}function O(t,n){var o=t.$$touchObj.callbacks[n];return o!=null&&o.length>0}function F(t,n,o,s){var l=n.$$touchObj,a=l.callbacks[o];if(a==null||a.length===0)return null;for(var i=0;i<a.length;i++){var c=a[i];c.modifiers.stop&&t.stopPropagation(),c.modifiers.prevent&&t.preventDefault(),!(c.modifiers.self&&t.target!==t.currentTarget)&&typeof c.value=="function"&&(s?c.value(s,t):c.value(t))}}function Ye(t){var n=t.$$touchObj.options.touchClass;n&&t.classList.add(n)}function ge(t){var n=t.$$touchObj.options.touchClass;n&&t.classList.remove(n)}function ye(t){t.touchHoldTimer&&(clearTimeout(t.touchHoldTimer),t.touchHoldTimer=null)}function Fn(t,n){var o=t.$$touchObj||{callbacks:{},hasBindTouchEvents:!1,options:Hn};return n&&(o.options=Object.assign({},o.options,n)),t.$$touchObj=o,t.$$touchObj}const Pn={beforeMount:function(t,n){const o=Fn(t);let s=An?{passive:!0}:!1;const l=n.arg||"tap";switch(l){case"swipe":let a=n.modifiers;if(a.left||a.right||a.top||a.bottom){for(let i in n.modifiers)if(["left","right","top","bottom"].indexOf(i)>=0){let c="swipe."+i;o.callbacks[c]=o.callbacks[c]||[],o.callbacks[c].push(n)}}else o.callbacks.swipe=o.callbacks.swipe||[],o.callbacks.swipe.push(n);break;case"press":case"drag":n.modifiers.disablePassive&&(s=!1);default:o.callbacks[l]=o.callbacks[l]||[],o.callbacks[l].push(n)}o.hasBindTouchEvents||(t.addEventListener("touchstart",Q,s),t.addEventListener("touchmove",v,s),t.addEventListener("touchcancel",We),t.addEventListener("touchend",ee),o.options.disableClick||(t.addEventListener("mousedown",Q),t.addEventListener("mousemove",v),t.addEventListener("mouseup",ee),t.addEventListener("mouseenter",je),t.addEventListener("mouseleave",Xe)),o.hasBindTouchEvents=!0)},unmounted:function(t){t.removeEventListener("touchstart",Q),t.removeEventListener("touchmove",v),t.removeEventListener("touchcancel",We),t.removeEventListener("touchend",ee),t.$$touchObj&&!t.$$touchObj.options.disableClick&&(t.removeEventListener("mousedown",Q),t.removeEventListener("mousemove",v),t.removeEventListener("mouseup",ee),t.removeEventListener("mouseenter",je),t.removeEventListener("mouseleave",Xe)),delete t.$$touchObj}};f.DAccordion=Pt,f.DAlertDialog=Ie,f.DBadge=Be,f.DButton=H,f.DCard=yo,f.DCheckbox=Wo,f.DCollapse=Se,f.DComponentStore=G,f.DConfigProvider=qt,f.DConfirmDialog=Me,f.DContextMenu=Ce,f.DDialogProvider=jo,f.DDrag=ie,f.DDrop=De,f.DDropdown=io,f.DForm=rn,f.DGlobalStore=U,f.DGrid=en,f.DIcon=Y,f.DIconStore=R,f.DImage=on,f.DInfoProgress=Ao,f.DInput=$t,f.DInputString=In,f.DLayoutAdmin=Ut,f.DLayoutContent=Ve,f.DLayoutFooter=Te,f.DLayoutHeader=$e,f.DLayoutSidebar=Ne,f.DLayoutTab=Ee,f.DMenu=ce,f.DModal=pe,f.DNotificationProvider=Io,f.DPanel=ze,f.DScroll=Zt,f.DScrollProvider=Gt,f.DSelect=qo,f.DTabs=Qo,f.DTextarea=an,f.DTransferStore=K,f.DTree=de,f.DTreeItem=we,f.DTreeStore=g,f.Rules=z,f.alert=He,f.clickOutside=zn,f.confirm=Ae,f.emitter=M,f.eventsBus=xe,f.focus=On,f.keydown=Rn,f.notify=he,f.touch=Pn,f.useNotification=Mn,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
|
2
|
+
const r=e.computed({get:()=>s.modelValue,set:C=>{o("update:modelValue",C)}}),d=e.computed(()=>s.type==="password"?"password":"text"),p=e.computed(()=>s.scale),u=C=>{o("input",C),_()},_=()=>{if(!(!s.form.fields||!s.form.fields[s.name].rules))return l.value=Sn.validate(r.value,s.form.fields[s.name].rules),!!l.value};e.onMounted(()=>{b()});const b=()=>{var C;(C=c.value)==null||C.focus()},D=()=>{r.value=""},k=C=>{i.value=C};return n({focus:b,setError:C=>{l.value=C},validate:_}),(C,S)=>{var w,x,h,$,L,T,y,N,m,V,B,A,X,te,oe,ne,se,P,le,Z,ae,_e,J,Ue,qe,Ge,Ze,Ke,Je,Qe,ve,et,tt,ot,nt,st,lt,at,rt;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-input-string",p.value])},[e.createElementVNode("div",wn,[s.label?(e.openBlock(),e.createElementBlock("div",xn,[e.createTextVNode(e.toDisplayString(s.label),1),(w=s.form)!=null&&w.fields[s.name].rules&&s.form.fields[s.name].rules.hasOwnProperty("required")?(e.openBlock(),e.createElementBlock("span",Dn,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Cn,[(h=(x=s.pre)==null?void 0:x.outside)!=null&&h.component?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["d-pre",s.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((L=($=s.pre)==null?void 0:$.outside)==null?void 0:L.component)))],2)):(y=(T=s.pre)==null?void 0:T.outside)!=null&&y.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["d-pre",s.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((m=(N=s.pre)==null?void 0:N.outside)==null?void 0:m.text),3)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",$n,[(B=(V=s.pre)==null?void 0:V.inside)!=null&&B.action&&((X=(A=s.pre)==null?void 0:A.inside)==null?void 0:X.action)==="clear"&&((te=r.value)==null?void 0:te.length)>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-pre-inside-button",onClick:D},En)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{id:e.unref(a),ref_key:"inputRef",ref:c,"onUpdate:modelValue":S[0]||(S[0]=ke=>r.value=ke),style:{width:"100%"},type:d.value,placeholder:s.placeholder,onInput:u,onFocus:S[1]||(S[1]=ke=>k(!0)),onFocusout:S[2]||(S[2]=ke=>k(!1)),class:e.normalizeClass([(ne=(oe=s.pre)==null?void 0:oe.outside)!=null&&ne.component||(P=(se=s.pre)==null?void 0:se.outside)!=null&&P.text?"has-pre":"",(Z=(le=s.post)==null?void 0:le.outside)!=null&&Z.component||(_e=(ae=s.post)==null?void 0:ae.outside)!=null&&_e.text?"has-post":"",(Ue=(J=s.pre)==null?void 0:J.inside)!=null&&Ue.action?"has-pre-inside-button":"",(Ge=(qe=s.post)==null?void 0:qe.inside)!=null&&Ge.action?"has-post-inside-button":"",i.value?"focused":""]),disabled:s.disabled},null,42,Tn),[[e.vModelDynamic,r.value]]),(Ke=(Ze=s.post)==null?void 0:Ze.inside)!=null&&Ke.action&&((Qe=(Je=s.post)==null?void 0:Je.inside)==null?void 0:Qe.action)==="clear"&&((ve=r.value)==null?void 0:ve.length)>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"d-post-inside-button",onClick:D},Nn)):e.createCommentVNode("",!0)]),(tt=(et=s.post)==null?void 0:et.outside)!=null&&tt.component?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["d-post",s.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((nt=(ot=s.post)==null?void 0:ot.outside)==null?void 0:nt.component)))],2)):(lt=(st=s.post)==null?void 0:st.outside)!=null&<.text?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["d-post",s.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((rt=(at=s.post)==null?void 0:at.outside)==null?void 0:rt.text),3)],2)):e.createCommentVNode("",!0)]),s.help?(e.openBlock(),e.createElementBlock("div",Vn,e.toDisplayString(s.help),1)):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",Ln,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0)])],2)}}},G={state:{},getters:{getComponent(t){return G.state[t]},getComponents(){return G.state}},mutations:{addComponent(t,n){G.state.name=n},addComponents(t){for(const n in t)t.hasOwnProperty(n)&&(G.state[n]=t[n])}}},he=t=>{typeof t=="string"&&(t={title:"",text:t}),typeof t=="object"&&M.emit("notification-add",t)};he.close=t=>{M.emit("notification-close",t)};const Mn=()=>({notify:he}),zn={mounted:function(t,n){t.clickOutsideEvent=function(o){t===o.target||t.contains(o.target)||n.value(o,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:function(t){document.removeEventListener("click",t.clickOutsideEvent)}},Rn={beforeMount(t,n){t._keydownCallback=o=>{o.key===n.arg&&n.value()},document.addEventListener("keydown",t._keydownCallback)},unmounted(t,n){document.removeEventListener("keydown",t._keydownCallback),delete t._keydownCallback}},On={beforeMount(t){t.focus()}};function Fe(t){return t.type.indexOf("mouse")!==-1?t.clientX:t.touches[0].clientX}function Pe(t){return t.type.indexOf("mouse")!==-1?t.clientY:t.touches[0].clientY}var An=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,n)}catch{}return t}(),Hn={disableClick:!1,tapTolerance:10,swipeTolerance:30,touchHoldTolerance:400,longTapTimeInterval:400,touchClass:"",dragFrequency:100,rollOverFrequency:100};function Q(t){var n=this.$$touchObj,o=t.type.indexOf("touch")>=0,s=t.type.indexOf("mouse")>=0,l=this;o&&(n.lastTouchStartTime=t.timeStamp),!(s&&n.lastTouchStartTime&&t.timeStamp-n.lastTouchStartTime<350)&&(n.touchStarted||(Ye(this),n.touchStarted=!0,n.touchMoved=!1,n.swipeOutBounded=!1,n.startX=Fe(t),n.startY=Pe(t),n.currentX=0,n.currentY=0,n.touchStartTime=t.timeStamp,n.hasSwipe=O(this,"swipe")||O(this,"swipe.left")||O(this,"swipe.right")||O(this,"swipe.top")||O(this,"swipe.bottom"),O(this,"hold")&&(n.touchHoldTimer=setTimeout(function(){n.touchHoldTimer=null,F(t,l,"hold")},n.options.touchHoldTolerance)),F(t,this,"press")))}function v(t){var n=this.$$touchObj,o=Fe(t),s=Pe(t),l=n.currentX!=o||n.currentY!=s;if(n.currentX=o,n.currentY=s,n.touchMoved){if(n.hasSwipe&&!n.swipeOutBounded){var i=n.options.swipeTolerance;n.swipeOutBounded=Math.abs(n.startX-n.currentX)>i&&Math.abs(n.startY-n.currentY)>i}}else{var a=n.options.tapTolerance;n.touchMoved=Math.abs(n.startX-n.currentX)>a||Math.abs(n.startY-n.currentY)>a,n.touchMoved&&(ye(n),F(t,this,"drag.once"))}if(O(this,"rollover")&&l){var c=t.timeStamp,r=n.options.rollOverFrequency;(n.touchRollTime==null||c>n.touchRollTime+r)&&(n.touchRollTime=c,F(t,this,"rollover"))}if(O(this,"drag")&&n.touchStarted&&n.touchMoved&&l){var c=t.timeStamp,r=n.options.dragFrequency;(n.touchDragTime==null||c>n.touchDragTime+r)&&(n.touchDragTime=c,F(t,this,"drag"))}}function We(){var t=this.$$touchObj;ye(t),ge(this),t.touchStarted=t.touchMoved=!1,t.startX=t.startY=0}function ee(t){var n=this.$$touchObj,o=t.type.indexOf("touch")>=0,s=t.type.indexOf("mouse")>=0;o&&(n.lastTouchEndTime=t.timeStamp);var l=o&&!n.touchHoldTimer;if(ye(n),n.touchStarted=!1,ge(this),!(s&&n.lastTouchEndTime&&t.timeStamp-n.lastTouchEndTime<350))if(F(t,this,"release"),n.touchMoved){if(n.hasSwipe&&!n.swipeOutBounded){var a=n.options.swipeTolerance,i,c=Math.abs(n.startY-n.currentY),r=Math.abs(n.startX-n.currentX);(c>a||r>a)&&(c>a?i=n.startY>n.currentY?"top":"bottom":i=n.startX>n.currentX?"left":"right",O(this,"swipe."+i)?F(t,this,"swipe."+i,i):F(t,this,"swipe",i))}}else if(O(this,"longtap")&&t.timeStamp-n.touchStartTime>n.options.longTapTimeInterval)t.cancelable&&t.preventDefault(),F(t,this,"longtap");else if(O(this,"hold")&&l){t.cancelable&&t.preventDefault();return}else F(t,this,"tap")}function je(){Ye(this)}function Xe(){ge(this)}function O(t,n){var o=t.$$touchObj.callbacks[n];return o!=null&&o.length>0}function F(t,n,o,s){var l=n.$$touchObj,a=l.callbacks[o];if(a==null||a.length===0)return null;for(var i=0;i<a.length;i++){var c=a[i];c.modifiers.stop&&t.stopPropagation(),c.modifiers.prevent&&t.preventDefault(),!(c.modifiers.self&&t.target!==t.currentTarget)&&typeof c.value=="function"&&(s?c.value(s,t):c.value(t))}}function Ye(t){var n=t.$$touchObj.options.touchClass;n&&t.classList.add(n)}function ge(t){var n=t.$$touchObj.options.touchClass;n&&t.classList.remove(n)}function ye(t){t.touchHoldTimer&&(clearTimeout(t.touchHoldTimer),t.touchHoldTimer=null)}function Fn(t,n){var o=t.$$touchObj||{callbacks:{},hasBindTouchEvents:!1,options:Hn};return n&&(o.options=Object.assign({},o.options,n)),t.$$touchObj=o,t.$$touchObj}const Pn={beforeMount:function(t,n){const o=Fn(t);let s=An?{passive:!0}:!1;const l=n.arg||"tap";switch(l){case"swipe":let a=n.modifiers;if(a.left||a.right||a.top||a.bottom){for(let i in n.modifiers)if(["left","right","top","bottom"].indexOf(i)>=0){let c="swipe."+i;o.callbacks[c]=o.callbacks[c]||[],o.callbacks[c].push(n)}}else o.callbacks.swipe=o.callbacks.swipe||[],o.callbacks.swipe.push(n);break;case"press":case"drag":n.modifiers.disablePassive&&(s=!1);default:o.callbacks[l]=o.callbacks[l]||[],o.callbacks[l].push(n)}o.hasBindTouchEvents||(t.addEventListener("touchstart",Q,s),t.addEventListener("touchmove",v,s),t.addEventListener("touchcancel",We),t.addEventListener("touchend",ee),o.options.disableClick||(t.addEventListener("mousedown",Q),t.addEventListener("mousemove",v),t.addEventListener("mouseup",ee),t.addEventListener("mouseenter",je),t.addEventListener("mouseleave",Xe)),o.hasBindTouchEvents=!0)},unmounted:function(t){t.removeEventListener("touchstart",Q),t.removeEventListener("touchmove",v),t.removeEventListener("touchcancel",We),t.removeEventListener("touchend",ee),t.$$touchObj&&!t.$$touchObj.options.disableClick&&(t.removeEventListener("mousedown",Q),t.removeEventListener("mousemove",v),t.removeEventListener("mouseup",ee),t.removeEventListener("mouseenter",je),t.removeEventListener("mouseleave",Xe)),delete t.$$touchObj}};f.DAccordion=Pt,f.DAlertDialog=Ie,f.DBadge=Be,f.DButton=H,f.DCard=yo,f.DCheckbox=Wo,f.DCollapse=Se,f.DComponentStore=G,f.DConfigProvider=qt,f.DConfirmDialog=Me,f.DContextMenu=Ce,f.DDialogProvider=jo,f.DDrag=ie,f.DDrop=De,f.DDropdown=io,f.DForm=rn,f.DGlobalStore=U,f.DGrid=en,f.DIcon=Y,f.DIconStore=R,f.DImage=on,f.DInfoProgress=Ao,f.DInput=$t,f.DInputString=In,f.DLayoutAdmin=Ut,f.DLayoutContent=Ve,f.DLayoutFooter=Te,f.DLayoutHeader=$e,f.DLayoutSidebar=Ne,f.DLayoutTab=Ee,f.DMenu=ce,f.DModal=pe,f.DNotificationProvider=Io,f.DPanel=ze,f.DScroll=Zt,f.DScrollProvider=Gt,f.DSelect=qo,f.DTabs=Qo,f.DTextarea=an,f.DTransferStore=K,f.DTree=de,f.DTreeItem=we,f.DTreeStore=g,f.Rules=z,f.alert=He,f.clickOutside=zn,f.confirm=Ae,f.emitter=M,f.eventsBus=xe,f.focus=On,f.keydown=Rn,f.notify=he,f.touch=Pn,f.useNotification=Mn,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|