vue-select-sides
Version:
select sides component for vue
4 lines • 105 kB
JavaScript
(function(i,Ue){typeof exports=="object"&&typeof module<"u"?module.exports=Ue(require("vue")):typeof define=="function"&&define.amd?define(["vue"],Ue):(i=typeof globalThis<"u"?globalThis:i||self,i.vueSelectSides=Ue(i.Vue))})(this,(function(i){"use strict";const Ue=(...e)=>{const t=e.filter(r=>typeof r=="string"),n=e.find(r=>typeof r=="function");return(r,s)=>{for(let l of t){let a=1;l[0]==="-"&&(a=-1,l=l.substring(1));let o=rn(r,l),u=rn(s,l);n&&(o=n(l,o),u=n(l,u));const d=o===void 0,h=u===void 0;if(!(d&&h)){if(d)return 1;if(h)return-1;if(o<u)return-1*a;if(o>u)return 1*a}}return 0}},rn=(e,t)=>t.split(".").reduce((n,r)=>n?.[r],e),Ee=e=>JSON.parse(JSON.stringify(e)),Oe=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),ht=(e,t)=>{let n=[];e.sortSelectedUp&&n.push("-selectedDefault"),e.orderBy&&(e.orderBy.toLowerCase()==="asc"&&n.push("label"),e.orderBy.toLowerCase()==="desc"&&n.push("-label"));const r=(s,l)=>s==="label"&&typeof l=="string"?Oe(l):l;return t.sort(Ue(...n,r)).map(s=>(s.children&&s.children.sort(Ue(...n,r)),s)),t},sn=(e,t)=>e.filter(n=>String(n)!==String(t)),_e=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},Yl={name:"v-select-all",display:"Select all",emits:["update-select-all"],props:{items:Array}};function xl(e,t,n,r,s,l){return i.openBlock(),i.createElementBlock("a",{href:"javascript:void(0)",onClick:t[0]||(t[0]=a=>e.$emit("update-select-all"))},i.toDisplayString(e.$t("selectAll")),1)}const an=_e(Yl,[["render",xl]]),jl={name:"v-deselect-all",display:"Deselect all",emits:["update-deselect-all"],props:{click:Function,items:Array}};function Kl(e,t,n,r,s,l){return i.openBlock(),i.createElementBlock("a",{href:"javascript:void(0)",onClick:t[0]||(t[0]=a=>e.$emit("update-deselect-all"))},i.toDisplayString(e.$t("deselectAll")),1)}const on=_e(jl,[["render",Kl]]),Xl={name:"v-search",display:"Search",props:["modelValue","placeholder"],emits:["update:modelValue"],beforeMount(){this.placeholder?this.thePlaceholder=this.placeholder:this.thePlaceholder=this.$t("searchPlaceholder")},watch:{inputVal(e){this.$emit("update:modelValue",e)}},data(){return{inputVal:this.value,thePlaceholder:""}}},Jl=["placeholder"];function Ql(e,t,n,r,s,l){return i.withDirectives((i.openBlock(),i.createElementBlock("input",{type:"text","onUpdate:modelValue":t[0]||(t[0]=a=>s.inputVal=a),placeholder:s.thePlaceholder},null,8,Jl)),[[i.vModelText,s.inputVal]])}const cn=_e(Xl,[["render",Ql]]),ql={name:"v-no-results",display:"No results",methods:{}},Zl={class:"no-results"};function zl(e,t,n,r,s,l){return i.openBlock(),i.createElementBlock("li",Zl,[i.createElementVNode("span",null,i.toDisplayString(e.$t("searchNoResult")),1)])}const er=_e(ql,[["render",zl]]),tr={name:"v-no-selection",display:"No selection",methods:{}},nr={class:"no-selection"};function lr(e,t,n,r,s,l){return i.openBlock(),i.createElementBlock("li",nr,[i.createElementVNode("span",null,i.toDisplayString(e.$t("searchParentSelected")),1)])}const rr={name:"v-list",display:"List",mounted(){},components:{"v-no-results":er,"v-no-selection":_e(tr,[["render",lr]])},props:{hasChildren:{type:Boolean},items:{type:Array},enableCounter:{type:Boolean,default:!0},type:{type:String},side:{type:String}},emits:["updated-item"],methods:{showNoResultParent(e){if(this.type==="grouped")return this.totalItems(e)===0&&!this.hasChildren;if(this.side==="left")return e.length===0||this.totalParentSelected(e)===e.length||e.length>0&&this.totalItems(e)===0;if(this.side==="right")return e.length===0||this.totalParentSelected(e)!==0&&e.length>0&&this.totalItems(e)===0},showNoSelection(e){if(this.type==="grouped")return this.totalParentSelected(e)===0&&this.hasChildren||e.length===0;if(this.side==="left")return!1;if(this.side==="right")return e.length!==0&&this.totalParentSelected(e)===0},showCounter(e){return this.enableCounter?!this.hasChildren&&e.totalChildrenSelected!==0:!1},showParent(e){return this.hasChildren?e.selected:e.visible},liClass(e,t){let n=[];return t&&n.push("is-parent"),e.selected&&n.push("active"),e.disabled&&n.push("is-disabled"),n},totalItems(e){return e.filter(function(t){return t.visible===!0}).length},totalParentSelected(e){return e.filter(function(t){return t.selected===!0}).length},toggleItem(e,t,n){if(e.disabled==!0)return!1;this.$emit("updated-item",e,t,!n)}},data(){return{}}},sr={class:"vss-list-ul"},ar=["onClick"],or={style:{}},cr={key:0,class:"vss-list-badge"},ir={key:0},ur=["onClick"];function fr(e,t,n,r,s,l){const a=i.resolveComponent("v-no-results"),o=i.resolveComponent("v-no-selection");return i.openBlock(),i.createElementBlock("ul",sr,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.items,(u,d)=>i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:d,onClick:h=>n.hasChildren?!1:l.toggleItem(u,{},u.selected),class:i.normalizeClass(l.liClass(u,n.hasChildren))},[i.createElementVNode("span",or,[i.createTextVNode(i.toDisplayString(u.label)+" ",1),l.showCounter(u)?(i.openBlock(),i.createElementBlock("small",cr,i.toDisplayString(u.totalChildrenSelected),1)):i.createCommentVNode("",!0)]),n.hasChildren?(i.openBlock(),i.createElementBlock("ul",ir,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.children,(h,L)=>i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:`${d}-${L}`,onClick:m=>l.toggleItem(h,u,h.selected),class:i.normalizeClass(l.liClass(h,!1))},[i.createElementVNode("span",null,i.toDisplayString(h.label),1)],10,ur)),[[i.vShow,h.visible]])),128)),i.withDirectives(i.createVNode(a,null,null,512),[[i.vShow,l.totalItems(u.children)===0]])])):i.createCommentVNode("",!0)],10,ar)),[[i.vShow,l.showParent(u)]])),128)),i.withDirectives(i.createVNode(o,null,null,512),[[i.vShow,l.showNoSelection(n.items)]]),i.withDirectives(i.createVNode(a,null,null,512),[[i.vShow,l.showNoResultParent(n.items)]])])}const un=_e(rr,[["render",fr]]),dr={name:"v-separator",display:"Separator"},_r={class:"vss-span"};function mr(e,t,n,r,s,l){return i.openBlock(),i.createElementBlock("div",_r," ‹ › ")}const fn=_e(dr,[["render",mr]]),pr={name:"v-total",display:"Total",props:{value:{type:Number}}},hr=["title"];function Er(e,t,n,r,s,l){return i.openBlock(),i.createElementBlock("span",{title:e.$t("totalSelected")},i.toDisplayString(n.value),9,hr)}const dn=_e(pr,[["render",Er]]),_n={emits:["update-selected"],watch:{modelValue(e,t){JSON.stringify(e)!==JSON.stringify(t)&&(this.dataSelected=e)},dataSelected(e,t){this.$emit("update-selected",e,t)},orderBy(){this.listLeft=ht(this,this.dataList),this.listRight=ht(this,this.dataList)},list(e){JSON.stringify(e)!==JSON.stringify(this.dataListOriginal)&&(this.prepareList(),this.prepareListLeft())}},props:{placeholderSearchLeft:{type:[String,Boolean]},placeholderSearchRight:{type:[String,Boolean]},type:{type:String},search:{type:Boolean},total:{type:Boolean},toggleAll:{type:Boolean},orderBy:{type:String},sortSelectedUp:{type:Boolean}}},gr={name:"grouped-select-sides",display:"Grouped select sides",mixins:[_n],components:{"v-select-all":an,"v-deselect-all":on,"v-search":cn,"v-separator":fn,"v-list":un,"v-total":dn},props:{list:{required:!0,type:[Array,Object]},modelValue:{type:Object,default:()=>({})}},methods:{updateLeftSelectAll(){let e=this;e.listLeft.map(t=>{t.visible===!0&&!t.disabled&&e.updateItem(t,{},!0)})},updateLeftDeselectAll(){let e=this;e.listLeft.map(t=>{t.visible===!0&&!t.disabled&&e.updateItem(t,{},!1)})},updateRightSelectAll(){let e=this;e.listRight.map(t=>{t.children.map(n=>{t.selected===!0&&!t.disabled&&e.updateItem(n,t,!0)})})},updateRightDeselectAll(){let e=this;e.listRight.map(t=>{t.children.map(n=>{t.selected===!0&&!t.disabled&&e.updateItem(n,t,!1)})})},updateItem(e,t,n){let r=Ee(this.dataSelected);Object.keys(t).length>0?(r[t.value]===void 0&&t.visible&&(r[t.value]=[]),n?e.visible&&r[t.value].indexOf(e.value)===-1&&r[t.value].push(e.value):e.visible&&(r[t.value]=sn(r[t.value],e.value))):n?r[e.value]===void 0&&(r[e.value]=[]):delete r[e.value],this.dataSelected=r},prepareList(){let e=this,t={};e.dataListOriginal=Ee(e.list);let n=Object.keys(e.modelValue),r=e.list.filter(s=>{let l=s.value,a=n.indexOf(l)>=0;return a?(s.selectedDefault=!0,t[l]=[]):s.selectedDefault=!1,s.children&&s.children.filter(o=>{let u=o.value;a&&(e.modelValue[l].indexOf(u)>=0?(o.selectedDefault=!0,t[l].push(u)):o.selectedDefault=!1)}),s});e.dataSelected=t,e.dataList=ht({sortSelectedUp:!0,orderBy:e.orderBy||"asc"},r)},prepareListLeft(){let e=this;this.listLeft=this.dataList.filter(t=>(t.visible=!0,t.children?(t.children=t.children.map(n=>(e.dataSelected[t.value]!==void 0&&(e.dataSelected[t.value].indexOf(n.value)>=0?n.selected=!0:n.selected=!1),n)),t.children):t))}},beforeMount(){this.prepareList()},mounted(){this.prepareListLeft()},computed:{totalChildrenSelected(){return Object.keys(this.dataSelected).map(e=>this.dataSelected[e].length).reduce((e,t)=>e+t,0)},filteredListL(){let e=this,t=Oe(this.searchL),n=Object.keys(this.dataSelected),r=Ee(this.listLeft);return r=r.filter(s=>{let l=Oe(s.label);return n.indexOf(s.value)>=0?s.selected=!0:s.selected=!1,l.includes(t)?s.visible=!0:s.visible=!1,s.children?(s.children=s.children.map(a=>(a.selected=!1,e.dataSelected[s.value]!==void 0&&(e.dataSelected[s.value].indexOf(a.value)>=0?a.selected=!0:a.selected=!1),a)),s.totalChildrenSelected=s.children.filter(function(a){return a.selected===!0}).length,s.children):s}),r},filteredListR(){let e=this,t=Oe(e.searchR),n=Ee(this.listLeft);return n=e.listRight.filter(function(s){return s.children?(s.children=s.children.map(l=>(Oe(l.label).includes(t)?l.visible=!0:l.visible=!1,e.dataSelected[s.value]!==void 0&&(e.dataSelected[s.value].indexOf(l.value)>=0?l.selected=!0:l.selected=!1),l)),s.children):s}),n}},watch:{filteredListL(e){this.listRight=e}},data(){return{dataList:[],dataListOriginal:[],dataSelected:{},listLeft:[],listRight:[],searchL:"",searchR:""}}},Nr={class:"vss-list"},Lr={class:"vss-inner-list"},Or={class:"vss-footer"},Tr={class:"vss-footer-bg"},br={key:1,class:"vss-footer-separator"},vr={class:"vss-list"},Sr={class:"vss-inner-list"},Ir={class:"vss-footer"},Ar={class:"vss-footer-bg"},yr={key:1,class:"vss-footer-separator"};function Pr(e,t,n,r,s,l){const a=i.resolveComponent("v-search"),o=i.resolveComponent("v-list"),u=i.resolveComponent("v-select-all"),d=i.resolveComponent("v-deselect-all"),h=i.resolveComponent("v-total"),L=i.resolveComponent("v-separator");return i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",Nr,[i.createElementVNode("div",Lr,[e.search?(i.openBlock(),i.createBlock(a,{key:0,placeholder:e.placeholderSearchLeft,class:"vss-list-search",modelValue:s.searchL,"onUpdate:modelValue":t[0]||(t[0]=m=>s.searchL=m)},null,8,["placeholder","modelValue"])):i.createCommentVNode("",!0),i.createVNode(o,{"has-children":!1,type:e.type,items:l.filteredListL,onUpdatedItem:l.updateItem},null,8,["type","items","onUpdatedItem"]),i.withDirectives(i.createElementVNode("div",Or,[i.createElementVNode("div",Tr,[i.createElementVNode("div",null,[e.toggleAll?(i.openBlock(),i.createBlock(u,{key:0,items:s.listLeft,onUpdateSelectAll:l.updateLeftSelectAll},null,8,["items","onUpdateSelectAll"])):i.createCommentVNode("",!0),e.toggleAll?(i.openBlock(),i.createElementBlock("div",br,"/")):i.createCommentVNode("",!0),e.toggleAll?(i.openBlock(),i.createBlock(d,{key:2,items:s.listLeft,onUpdateDeselectAll:l.updateLeftDeselectAll},null,8,["items","onUpdateDeselectAll"])):i.createCommentVNode("",!0)]),e.total?(i.openBlock(),i.createBlock(h,{key:0,value:Object.keys(s.dataSelected).length},null,8,["value"])):i.createCommentVNode("",!0)])],512),[[i.vShow,e.toggleAll||e.total]])])]),i.createVNode(L),i.createElementVNode("div",vr,[i.createElementVNode("div",Sr,[e.search?(i.openBlock(),i.createBlock(a,{key:0,placeholder:e.placeholderSearchRight,class:"vss-list-search",modelValue:s.searchR,"onUpdate:modelValue":t[1]||(t[1]=m=>s.searchR=m)},null,8,["placeholder","modelValue"])):i.createCommentVNode("",!0),i.createVNode(o,{"has-children":!0,type:e.type,items:l.filteredListR,onUpdatedItem:l.updateItem},null,8,["type","items","onUpdatedItem"]),i.withDirectives(i.createElementVNode("div",Ir,[i.createElementVNode("div",Ar,[i.createElementVNode("div",null,[e.toggleAll?(i.openBlock(),i.createBlock(u,{key:0,items:s.listRight,onUpdateSelectAll:l.updateRightSelectAll},null,8,["items","onUpdateSelectAll"])):i.createCommentVNode("",!0),e.toggleAll?(i.openBlock(),i.createElementBlock("div",yr,"/")):i.createCommentVNode("",!0),e.toggleAll?(i.openBlock(),i.createBlock(d,{key:2,items:s.listRight,onUpdateDeselectAll:l.updateRightDeselectAll},null,8,["items","onUpdateDeselectAll"])):i.createCommentVNode("",!0)]),e.total?(i.openBlock(),i.createBlock(h,{key:0,value:l.totalChildrenSelected},null,8,["value"])):i.createCommentVNode("",!0)])],512),[[i.vShow,e.toggleAll||e.total]])])])])}const Cr=_e(gr,[["render",Pr]]),kr={name:"mirror-select-sides",display:"Mirror select sides",mixins:[_n],components:{"v-select-all":an,"v-deselect-all":on,"v-search":cn,"v-separator":fn,"v-list":un,"v-total":dn},props:{list:{required:!0,type:[Array,Object]},modelValue:{type:Array,default:()=>[]}},methods:{updateLeftSelectAll(){let e=this;e.listLeft.map(t=>{t.visible===!0&&!t.disabled&&e.updateItem(t,{},!0)})},updateRightDeselectAll(){let e=this;this.dataSelected=[],e.listRight.map(t=>{t.visible===!0&&!t.disabled&&e.updateItem(t,{},!1)})},updateItem(e,t,n){let r=Ee(this.dataSelected);n?r.push(e.value):r=sn(r,e.value),this.dataSelected=r},prepareList(){this.dataListOriginal=Ee(this.list);let e=this,t=[],n=e.list.filter(r=>{let s=r.value;return e.modelValue.indexOf(s)>=0?(r.selectedDefault=!0,t.push(s)):r.selectedDefault=!1,r});e.dataSelected=t,e.dataList=ht(e,n)},prepareListLeft(){this.listLeft=this.dataList.filter(e=>(e.visible=!0,e))}},beforeMount(){this.prepareList()},mounted(){this.prepareListLeft()},computed:{filteredListL(){let e=Oe(this.searchL),t=this.dataSelected,n=Ee(this.listLeft);return n=n.filter(r=>{let s=Oe(r.label);return t.indexOf(r.value)>=0?(r.selected=!0,r.visible=!1):(r.selected=!1,r.visible=!0),s.includes(e)&&r.visible===!0?r.visible=!0:r.visible=!1,r}),n},filteredListR(){let e=this,t=Oe(e.searchR),n=this.dataSelected,r=Ee(e.listLeft);return r=r.filter(s=>{let l=Oe(s.label);return n.indexOf(s.value)>=0?(s.selected=!0,s.visible=!0):(s.selected=!1,s.visible=!1),l.includes(t)&&s.visible===!0?s.visible=!0:s.visible=!1,s}),r}},data(){return{dataList:[],dataListOriginal:[],dataSelected:[],listLeft:[],listRight:[],searchL:"",searchR:""}}},Rr={class:"vss-list"},Dr={class:"vss-inner-list"},Mr={class:"vss-footer"},Fr={class:"vss-footer-bg"},Vr={class:"vss-list"},Ur={class:"vss-inner-list"},$r={class:"vss-footer"},wr={class:"vss-footer-bg"};function Br(e,t,n,r,s,l){const a=i.resolveComponent("v-search"),o=i.resolveComponent("v-list"),u=i.resolveComponent("v-select-all"),d=i.resolveComponent("v-total"),h=i.resolveComponent("v-separator"),L=i.resolveComponent("v-deselect-all");return i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",Rr,[i.createElementVNode("div",Dr,[e.search?(i.openBlock(),i.createBlock(a,{key:0,placeholder:e.placeholderSearchLeft,class:"vss-list-search",modelValue:s.searchL,"onUpdate:modelValue":t[0]||(t[0]=m=>s.searchL=m)},null,8,["placeholder","modelValue"])):i.createCommentVNode("",!0),i.createVNode(o,{"enable-counter":!1,"has-children":!1,type:e.type,side:"left",items:l.filteredListL,onUpdatedItem:l.updateItem},null,8,["type","items","onUpdatedItem"]),i.withDirectives(i.createElementVNode("div",Mr,[i.createElementVNode("div",Fr,[i.createElementVNode("div",null,[e.toggleAll?(i.openBlock(),i.createBlock(u,{key:0,items:s.listLeft,onUpdateSelectAll:l.updateLeftSelectAll},null,8,["items","onUpdateSelectAll"])):i.createCommentVNode("",!0)]),e.total?(i.openBlock(),i.createBlock(d,{key:0,value:s.dataSelected.length},null,8,["value"])):i.createCommentVNode("",!0)])],512),[[i.vShow,e.toggleAll||e.total]])])]),i.createVNode(h),i.createElementVNode("div",Vr,[i.createElementVNode("div",Ur,[e.search?(i.openBlock(),i.createBlock(a,{key:0,placeholder:e.placeholderSearchRight,class:"vss-list-search",modelValue:s.searchR,"onUpdate:modelValue":t[1]||(t[1]=m=>s.searchR=m)},null,8,["placeholder","modelValue"])):i.createCommentVNode("",!0),i.createVNode(o,{"enable-counter":!1,"has-children":!1,type:e.type,side:"right",items:l.filteredListR,onUpdatedItem:l.updateItem},null,8,["type","items","onUpdatedItem"]),i.withDirectives(i.createElementVNode("div",$r,[i.createElementVNode("div",wr,[i.createElementVNode("div",null,[e.toggleAll?(i.openBlock(),i.createBlock(L,{key:0,items:s.listRight,onUpdateDeselectAll:l.updateRightDeselectAll},null,8,["items","onUpdateDeselectAll"])):i.createCommentVNode("",!0)])])],512),[[i.vShow,e.toggleAll||e.total]])])])])}const Wr={name:"vue-select-sides",display:"Core select sides",components:{"mirror-select-sides":_e(kr,[["render",Br]]),"grouped-select-sides":Cr},props:{list:{required:!0,type:[Array,Object]},type:{type:String,default:void 0},orderBy:{type:String,default:void 0},placeholderSearchLeft:{type:[String,Boolean],default:void 0},placeholderSearchRight:{type:[String,Boolean],default:void 0},sortSelectedUp:{type:Boolean,default:void 0},search:{type:Boolean,default:void 0},total:{type:Boolean,default:void 0},toggleAll:{type:Boolean,default:void 0},modelValue:{type:[Object,Array],default:void 0}},emits:["update:model-value"],watch:{list(e){this.listClone=Ee(e)},type(e){this.params.type=e},search(e){this.params.search=e},total(e){this.params.total=e},toggleAll(e){this.params.toggleAll=e},orderBy(e){this.params.orderBy=e},placeholderSearchLeft(e){this.params.placeholderSearchLeft=e},placeholderSearchRight(e){this.params.placeholderSearchRight=e},sortSelectedUp(e){this.params.sortSelectedUp=e}},methods:{updateSelected(e){this.$emit("update:model-value",e)},getComponent(){return this.params.type=="mirror"?"mirror-select-sides":"grouped-select-sides"},selectLocale(e){this.enabledLocales.indexOf(e)>=0&&(this.$i18n.locale=e)},setDefaultParams(){let e=this,t={type:e.type,orderBy:e.orderBy,placeholderSearchLeft:e.placeholderSearchLeft,placeholderSearchRight:e.placeholderSearchRight,sortSelectedUp:e.sortSelectedUp,search:e.search,total:e.total,toggleAll:e.toggleAll};Object.keys(t).forEach(n=>{let r=t[n];r===void 0?e.defaultOptions[n]!==void 0&&(e.params[n]=e.defaultOptions[n]):e.params[n]=r}),e.defaultOptions.locale!==void 0&&e.selectLocale(e.defaultOptions.locale)}},computed:{modelProp:{get(){return this.modelValue},set(e){this.$emit("update:model-value",e)}}},beforeMount(){this.setDefaultParams(),this.listClone=Ee(this.list)},data(){return{listClone:[],locale:"en_US",enabledLocales:["pt_BR","en_US","es_ES","fr_FR","tr_TR","pl_PL","cz_CZ","sk_SK"],params:{type:"mirror",orderBy:void 0,placeholderSearchLeft:!1,placeholderSearchRight:!1,sortSelectedUp:!1,search:!0,total:!0,toggleAll:!0}}}};function Gr(e,t,n,r,s,l){return i.openBlock(),i.createBlock(i.resolveDynamicComponent(l.getComponent()),{class:"vss",type:s.params.type,list:s.listClone,search:s.params.search,total:s.params.total,"toggle-all":s.params.toggleAll,"order-by":s.params.orderBy,"placeholder-search-left":s.params.placeholderSearchLeft,"placeholder-search-right":s.params.placeholderSearchRight,"sort-selected-up":s.params.sortSelectedUp,modelValue:l.modelProp,"onUpdate:modelValue":t[0]||(t[0]=a=>l.modelProp=a),onUpdateSelected:l.updateSelected},null,40,["type","list","search","total","toggle-all","order-by","placeholder-search-left","placeholder-search-right","sort-selected-up","modelValue","onUpdateSelected"])}const Ct=_e(Wr,[["render",Gr]]),Hr={selectAll:"Vybrat vše ",deselectAll:"Odebrat vše ",searchPlaceholder:"Hledej...",searchNoResult:"Žádný výsledek...",searchParentSelected:"Nic není vybráno...",totalSelected:"Spolu vybrané"},Yr={selectAll:"Select all",deselectAll:"Deselect all",searchPlaceholder:"Search...",searchNoResult:"No result...",searchParentSelected:"No items selected...",totalSelected:"Total items selected"},xr={selectAll:"Seleccionar todos",deselectAll:"Deseleccionar todos",searchPlaceholder:"Buscar...",searchNoResult:"Sin resultados...",searchParentSelected:"Ningún elemento seleccionado...",totalSelected:"Elementos seleccionados"},jr={selectAll:"Ajouter tout",deselectAll:"Supprimer tout",searchPlaceholder:"Recherche...",searchNoResult:"Pas de résultat...",searchParentSelected:"Sélection vide...",totalSelected:"Éléments sélectionnés"},Kr={selectAll:"Wybierz wszystko",deselectAll:"Wyczyść zaznaczenie",searchPlaceholder:"Szukaj...",searchNoResult:"Brak wyników...",searchParentSelected:"Nie wybrano żadnych elementów...",totalSelected:"Liczba wybranych elementów"},Xr={selectAll:"Selecionar todos",deselectAll:"Remover todos",searchPlaceholder:"Pesquisar...",searchNoResult:"Sem nenhum resultado...",searchParentSelected:"Nenhum item selecionado...",totalSelected:"Total de itens selecionados"},Jr={selectAll:"Vybrať všetko",deselectAll:"Odobrať všetko",searchPlaceholder:"Hľadaj...",searchNoResult:"Žiadny výsledok...",searchParentSelected:"Nič nie je vybrané...",totalSelected:"Spolu vybrané"},Qr={selectAll:"Hepsini Seç",deselectAll:"Hepsini Çıkar",searchPlaceholder:"Ara...",searchNoResult:"Sonuç Bulunamadı...",searchParentSelected:"Hiçbiri Seçilmedi...",totalSelected:"Hepsi Seçildi"};function z(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const mn={};function pn(e){mn[e]||(mn[e]=!0,z(e))}const me=typeof window<"u";let ce,Ce;if(process.env.NODE_ENV!=="production"){const e=me&&window.performance;e&&e.mark&&e.measure&&e.clearMarks&&e.clearMeasures&&(ce=t=>{e.mark(t)},Ce=(t,n,r)=>{e.measure(t,n,r),e.clearMarks(n),e.clearMarks(r)})}const qr=/\{([0-9a-zA-Z]+)\}/g;function kt(e,...t){return t.length===1&&w(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(qr,(n,r)=>t.hasOwnProperty(r)?t[r]:"")}const ge=(e,t=!1)=>t?Symbol.for(e):Symbol(e),Zr=(e,t,n)=>zr({l:e,k:t,s:n}),zr=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),q=e=>typeof e=="number"&&isFinite(e),es=e=>Ln(e)==="[object Date]",Se=e=>Ln(e)==="[object RegExp]",Et=e=>V(e)&&Object.keys(e).length===0,ne=Object.assign,ts=Object.create,Y=(e=null)=>ts(e);let hn;const Te=()=>hn||(hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Y());function En(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function gn(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function ns(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(r,s,l)=>`${s}="${gn(l)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(r,s,l)=>`${s}='${gn(l)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(process.env.NODE_ENV!=="production"&&z("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."),e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(r=>{e=e.replace(r,"$1javascript:")}),e}const ls=Object.prototype.hasOwnProperty;function pe(e,t){return ls.call(e,t)}const K=Array.isArray,x=e=>typeof e=="function",I=e=>typeof e=="string",U=e=>typeof e=="boolean",w=e=>e!==null&&typeof e=="object",rs=e=>w(e)&&x(e.then)&&x(e.catch),Nn=Object.prototype.toString,Ln=e=>Nn.call(e),V=e=>{if(!w(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t.constructor===Object},ss=e=>e==null?"":K(e)||V(e)&&e.toString===Nn?JSON.stringify(e,null,2):String(e);function as(e,t=""){return e.reduce((n,r,s)=>s===0?n+r:n+t+r,"")}const On=2;function os(e,t=0,n=e.length){const r=e.split(/\r?\n/);let s=0;const l=[];for(let a=0;a<r.length;a++)if(s+=r[a].length+1,s>=t){for(let o=a-On;o<=a+On||n>s;o++){if(o<0||o>=r.length)continue;const u=o+1;l.push(`${u}${" ".repeat(3-String(u).length)}| ${r[o]}`);const d=r[o].length;if(o===a){const h=t-(s-d)+1,L=Math.max(1,n>s?d-h:n-t);l.push(" | "+" ".repeat(h)+"^".repeat(L))}else if(o>a){if(n>s){const h=Math.max(Math.min(n-s,d),1);l.push(" | "+"^".repeat(h))}s+=d+1}}break}return l.join(`
`)}function gt(e){let t=e;return()=>++t}function Rt(){const e=new Map;return{events:e,on(n,r){const s=e.get(n);s&&s.push(r)||e.set(n,[r])},off(n,r){const s=e.get(n);s&&s.splice(s.indexOf(r)>>>0,1)},emit(n,r){(e.get(n)||[]).slice().map(s=>s(r)),(e.get("*")||[]).slice().map(s=>s(n,r))}}}const Nt=e=>!w(e)||K(e);function Lt(e,t){if(Nt(e)||Nt(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:r,des:s}=n.pop();Object.keys(r).forEach(l=>{l!=="__proto__"&&(w(r[l])&&!w(s[l])&&(s[l]=Array.isArray(r[l])?[]:Y()),Nt(s[l])||Nt(r[l])?s[l]=r[l]:n.push({src:r[l],des:s[l]}))})}}function cs(e,t,n){return{line:e,column:t,offset:n}}function Ot(e,t,n){return{start:e,end:t}}const is=/\{([0-9a-zA-Z]+)\}/g;function Tn(e,...t){return t.length===1&&us(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(is,(n,r)=>t.hasOwnProperty(r)?t[r]:"")}const bn=Object.assign,vn=e=>typeof e=="string",us=e=>e!==null&&typeof e=="object";function Sn(e,t=""){return e.reduce((n,r,s)=>s===0?n+r:n+t+r,"")}const Tt={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2},fs={[Tt.USE_MODULO_SYNTAX]:"Use modulo before '{{0}}'."};function ds(e,t,...n){const r=Tn(fs[e],...n||[]),s={message:String(r),code:e};return t&&(s.location=t),s}const F={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},_s={[F.EXPECTED_TOKEN]:"Expected token: '{0}'",[F.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[F.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[F.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[F.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[F.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[F.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[F.EMPTY_PLACEHOLDER]:"Empty placeholder",[F.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[F.INVALID_LINKED_FORMAT]:"Invalid linked format",[F.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[F.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[F.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[F.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[F.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[F.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function $e(e,t,n={}){const{domain:r,messages:s,args:l}=n,a=Tn((s||_s)[e]||"",...l||[]),o=new SyntaxError(String(a));return o.code=e,t&&(o.location=t),o.domain=r,o}function ms(e){throw e}const ps=/<\/?[\w\s="/.':;#-\/]+>/,hs=e=>ps.test(e),be=" ",Es="\r",re=`
`,gs="\u2028",Ns="\u2029";function Ls(e){const t=e;let n=0,r=1,s=1,l=0;const a=b=>t[b]===Es&&t[b+1]===re,o=b=>t[b]===re,u=b=>t[b]===Ns,d=b=>t[b]===gs,h=b=>a(b)||o(b)||u(b)||d(b),L=()=>n,m=()=>r,A=()=>s,k=()=>l,P=b=>a(b)||u(b)||d(b)?re:t[b],C=()=>P(n),M=()=>P(n+l);function R(){return l=0,h(n)&&(r++,s=0),a(n)&&n++,n++,s++,t[n]}function _(){return a(n+l)&&l++,l++,t[n+l]}function E(){n=0,r=1,s=1,l=0}function T(b=0){l=b}function g(){const b=n+l;for(;b!==n;)R();l=0}return{index:L,line:m,column:A,peekOffset:k,charAt:P,currentChar:C,currentPeek:M,next:R,peek:_,reset:E,resetPeek:T,skipToPeek:g}}const Ie=void 0,Os=".",In="'",Ts="tokenizer";function bs(e,t={}){const n=t.location!==!1,r=Ls(e),s=()=>r.index(),l=()=>cs(r.line(),r.column(),r.index()),a=l(),o=s(),u={currentType:14,offset:o,startLoc:a,endLoc:a,lastType:14,lastOffset:o,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},d=()=>u,{onError:h}=t;function L(c,f,N,...D){const Q=d();if(f.column+=N,f.offset+=N,h){const j=n?Ot(Q.startLoc,f):null,H=$e(c,j,{domain:Ts,args:D});h(H)}}function m(c,f,N){c.endLoc=l(),c.currentType=f;const D={type:f};return n&&(D.loc=Ot(c.startLoc,c.endLoc)),N!=null&&(D.value=N),D}const A=c=>m(c,14);function k(c,f){return c.currentChar()===f?(c.next(),f):(L(F.EXPECTED_TOKEN,l(),0,f),"")}function P(c){let f="";for(;c.currentPeek()===be||c.currentPeek()===re;)f+=c.currentPeek(),c.peek();return f}function C(c){const f=P(c);return c.skipToPeek(),f}function M(c){if(c===Ie)return!1;const f=c.charCodeAt(0);return f>=97&&f<=122||f>=65&&f<=90||f===95}function R(c){if(c===Ie)return!1;const f=c.charCodeAt(0);return f>=48&&f<=57}function _(c,f){const{currentType:N}=f;if(N!==2)return!1;P(c);const D=M(c.currentPeek());return c.resetPeek(),D}function E(c,f){const{currentType:N}=f;if(N!==2)return!1;P(c);const D=c.currentPeek()==="-"?c.peek():c.currentPeek(),Q=R(D);return c.resetPeek(),Q}function T(c,f){const{currentType:N}=f;if(N!==2)return!1;P(c);const D=c.currentPeek()===In;return c.resetPeek(),D}function g(c,f){const{currentType:N}=f;if(N!==8)return!1;P(c);const D=c.currentPeek()===".";return c.resetPeek(),D}function b(c,f){const{currentType:N}=f;if(N!==9)return!1;P(c);const D=M(c.currentPeek());return c.resetPeek(),D}function y(c,f){const{currentType:N}=f;if(!(N===8||N===12))return!1;P(c);const D=c.currentPeek()===":";return c.resetPeek(),D}function v(c,f){const{currentType:N}=f;if(N!==10)return!1;const D=()=>{const j=c.currentPeek();return j==="{"?M(c.peek()):j==="@"||j==="%"||j==="|"||j===":"||j==="."||j===be||!j?!1:j===re?(c.peek(),D()):$(c,!1)},Q=D();return c.resetPeek(),Q}function X(c){P(c);const f=c.currentPeek()==="|";return c.resetPeek(),f}function ie(c){const f=P(c),N=c.currentPeek()==="%"&&c.peek()==="{";return c.resetPeek(),{isModulo:N,hasSpace:f.length>0}}function $(c,f=!0){const N=(Q=!1,j="",H=!1)=>{const p=c.currentPeek();return p==="{"?j==="%"?!1:Q:p==="@"||!p?j==="%"?!0:Q:p==="%"?(c.peek(),N(Q,"%",!0)):p==="|"?j==="%"||H?!0:!(j===be||j===re):p===be?(c.peek(),N(!0,be,H)):p===re?(c.peek(),N(!0,re,H)):!0},D=N();return f&&c.resetPeek(),D}function le(c,f){const N=c.currentChar();return N===Ie?Ie:f(N)?(c.next(),N):null}function et(c){const f=c.charCodeAt(0);return f>=97&&f<=122||f>=65&&f<=90||f>=48&&f<=57||f===95||f===36}function tt(c){return le(c,et)}function Le(c){const f=c.charCodeAt(0);return f>=97&&f<=122||f>=65&&f<=90||f>=48&&f<=57||f===95||f===36||f===45}function nt(c){return le(c,Le)}function lt(c){const f=c.charCodeAt(0);return f>=48&&f<=57}function rt(c){return le(c,lt)}function st(c){const f=c.charCodeAt(0);return f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102}function at(c){return le(c,st)}function de(c){let f="",N="";for(;f=rt(c);)N+=f;return N}function Ye(c){C(c);const f=c.currentChar();return f!=="%"&&L(F.EXPECTED_TOKEN,l(),0,f),c.next(),"%"}function xe(c){let f="";for(;;){const N=c.currentChar();if(N==="{"||N==="}"||N==="@"||N==="|"||!N)break;if(N==="%")if($(c))f+=N,c.next();else break;else if(N===be||N===re)if($(c))f+=N,c.next();else{if(X(c))break;f+=N,c.next()}else f+=N,c.next()}return f}function ot(c){C(c);let f="",N="";for(;f=nt(c);)N+=f;return c.currentChar()===Ie&&L(F.UNTERMINATED_CLOSING_BRACE,l(),0),N}function ct(c){C(c);let f="";return c.currentChar()==="-"?(c.next(),f+=`-${de(c)}`):f+=de(c),c.currentChar()===Ie&&L(F.UNTERMINATED_CLOSING_BRACE,l(),0),f}function it(c){return c!==In&&c!==re}function yt(c){C(c),k(c,"'");let f="",N="";for(;f=le(c,it);)f==="\\"?N+=ut(c):N+=f;const D=c.currentChar();return D===re||D===Ie?(L(F.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,l(),0),D===re&&(c.next(),k(c,"'")),N):(k(c,"'"),N)}function ut(c){const f=c.currentChar();switch(f){case"\\":case"'":return c.next(),`\\${f}`;case"u":return je(c,f,4);case"U":return je(c,f,6);default:return L(F.UNKNOWN_ESCAPE_SEQUENCE,l(),0,f),""}}function je(c,f,N){k(c,f);let D="";for(let Q=0;Q<N;Q++){const j=at(c);if(!j){L(F.INVALID_UNICODE_ESCAPE_SEQUENCE,l(),0,`\\${f}${D}${c.currentChar()}`);break}D+=j}return`\\${f}${D}`}function ft(c){return c!=="{"&&c!=="}"&&c!==be&&c!==re}function dt(c){C(c);let f="",N="";for(;f=le(c,ft);)N+=f;return N}function _t(c){let f="",N="";for(;f=tt(c);)N+=f;return N}function S(c){const f=N=>{const D=c.currentChar();return D==="{"||D==="%"||D==="@"||D==="|"||D==="("||D===")"||!D||D===be?N:(N+=D,c.next(),f(N))};return f("")}function W(c){C(c);const f=k(c,"|");return C(c),f}function mt(c,f){let N=null;switch(c.currentChar()){case"{":return f.braceNest>=1&&L(F.NOT_ALLOW_NEST_PLACEHOLDER,l(),0),c.next(),N=m(f,2,"{"),C(c),f.braceNest++,N;case"}":return f.braceNest>0&&f.currentType===2&&L(F.EMPTY_PLACEHOLDER,l(),0),c.next(),N=m(f,3,"}"),f.braceNest--,f.braceNest>0&&C(c),f.inLinked&&f.braceNest===0&&(f.inLinked=!1),N;case"@":return f.braceNest>0&&L(F.UNTERMINATED_CLOSING_BRACE,l(),0),N=Fe(c,f)||A(f),f.braceNest=0,N;default:{let Q=!0,j=!0,H=!0;if(X(c))return f.braceNest>0&&L(F.UNTERMINATED_CLOSING_BRACE,l(),0),N=m(f,1,W(c)),f.braceNest=0,f.inLinked=!1,N;if(f.braceNest>0&&(f.currentType===5||f.currentType===6||f.currentType===7))return L(F.UNTERMINATED_CLOSING_BRACE,l(),0),f.braceNest=0,pt(c,f);if(Q=_(c,f))return N=m(f,5,ot(c)),C(c),N;if(j=E(c,f))return N=m(f,6,ct(c)),C(c),N;if(H=T(c,f))return N=m(f,7,yt(c)),C(c),N;if(!Q&&!j&&!H)return N=m(f,13,dt(c)),L(F.INVALID_TOKEN_IN_PLACEHOLDER,l(),0,N.value),C(c),N;break}}return N}function Fe(c,f){const{currentType:N}=f;let D=null;const Q=c.currentChar();switch((N===8||N===9||N===12||N===10)&&(Q===re||Q===be)&&L(F.INVALID_LINKED_FORMAT,l(),0),Q){case"@":return c.next(),D=m(f,8,"@"),f.inLinked=!0,D;case".":return C(c),c.next(),m(f,9,".");case":":return C(c),c.next(),m(f,10,":");default:return X(c)?(D=m(f,1,W(c)),f.braceNest=0,f.inLinked=!1,D):g(c,f)||y(c,f)?(C(c),Fe(c,f)):b(c,f)?(C(c),m(f,12,_t(c))):v(c,f)?(C(c),Q==="{"?mt(c,f)||D:m(f,11,S(c))):(N===8&&L(F.INVALID_LINKED_FORMAT,l(),0),f.braceNest=0,f.inLinked=!1,pt(c,f))}}function pt(c,f){let N={type:14};if(f.braceNest>0)return mt(c,f)||A(f);if(f.inLinked)return Fe(c,f)||A(f);switch(c.currentChar()){case"{":return mt(c,f)||A(f);case"}":return L(F.UNBALANCED_CLOSING_BRACE,l(),0),c.next(),m(f,3,"}");case"@":return Fe(c,f)||A(f);default:{if(X(c))return N=m(f,1,W(c)),f.braceNest=0,f.inLinked=!1,N;const{isModulo:Q,hasSpace:j}=ie(c);if(Q)return j?m(f,0,xe(c)):m(f,4,Ye(c));if($(c))return m(f,0,xe(c));break}}return N}function ln(){const{currentType:c,offset:f,startLoc:N,endLoc:D}=u;return u.lastType=c,u.lastOffset=f,u.lastStartLoc=N,u.lastEndLoc=D,u.offset=s(),u.startLoc=l(),r.currentChar()===Ie?m(u,14):pt(r,u)}return{nextToken:ln,currentOffset:s,currentPosition:l,context:d}}const vs="parser",Ss=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Is(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(t||n,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function As(e={}){const t=e.location!==!1,{onError:n,onWarn:r}=e;function s(_,E,T,g,...b){const y=_.currentPosition();if(y.offset+=g,y.column+=g,n){const v=t?Ot(T,y):null,X=$e(E,v,{domain:vs,args:b});n(X)}}function l(_,E,T,g,...b){const y=_.currentPosition();if(y.offset+=g,y.column+=g,r){const v=t?Ot(T,y):null;r(ds(E,v,b))}}function a(_,E,T){const g={type:_};return t&&(g.start=E,g.end=E,g.loc={start:T,end:T}),g}function o(_,E,T,g){t&&(_.end=E,_.loc&&(_.loc.end=T))}function u(_,E){const T=_.context(),g=a(3,T.offset,T.startLoc);return g.value=E,o(g,_.currentOffset(),_.currentPosition()),g}function d(_,E){const T=_.context(),{lastOffset:g,lastStartLoc:b}=T,y=a(5,g,b);return y.index=parseInt(E,10),_.nextToken(),o(y,_.currentOffset(),_.currentPosition()),y}function h(_,E,T){const g=_.context(),{lastOffset:b,lastStartLoc:y}=g,v=a(4,b,y);return v.key=E,T===!0&&(v.modulo=!0),_.nextToken(),o(v,_.currentOffset(),_.currentPosition()),v}function L(_,E){const T=_.context(),{lastOffset:g,lastStartLoc:b}=T,y=a(9,g,b);return y.value=E.replace(Ss,Is),_.nextToken(),o(y,_.currentOffset(),_.currentPosition()),y}function m(_){const E=_.nextToken(),T=_.context(),{lastOffset:g,lastStartLoc:b}=T,y=a(8,g,b);return E.type!==12?(s(_,F.UNEXPECTED_EMPTY_LINKED_MODIFIER,T.lastStartLoc,0),y.value="",o(y,g,b),{nextConsumeToken:E,node:y}):(E.value==null&&s(_,F.UNEXPECTED_LEXICAL_ANALYSIS,T.lastStartLoc,0,he(E)),y.value=E.value||"",o(y,_.currentOffset(),_.currentPosition()),{node:y})}function A(_,E){const T=_.context(),g=a(7,T.offset,T.startLoc);return g.value=E,o(g,_.currentOffset(),_.currentPosition()),g}function k(_){const E=_.context(),T=a(6,E.offset,E.startLoc);let g=_.nextToken();if(g.type===9){const b=m(_);T.modifier=b.node,g=b.nextConsumeToken||_.nextToken()}switch(g.type!==10&&s(_,F.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,he(g)),g=_.nextToken(),g.type===2&&(g=_.nextToken()),g.type){case 11:g.value==null&&s(_,F.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,he(g)),T.key=A(_,g.value||"");break;case 5:g.value==null&&s(_,F.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,he(g)),T.key=h(_,g.value||"");break;case 6:g.value==null&&s(_,F.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,he(g)),T.key=d(_,g.value||"");break;case 7:g.value==null&&s(_,F.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,he(g)),T.key=L(_,g.value||"");break;default:{s(_,F.UNEXPECTED_EMPTY_LINKED_KEY,E.lastStartLoc,0);const b=_.context(),y=a(7,b.offset,b.startLoc);return y.value="",o(y,b.offset,b.startLoc),T.key=y,o(T,b.offset,b.startLoc),{nextConsumeToken:g,node:T}}}return o(T,_.currentOffset(),_.currentPosition()),{node:T}}function P(_){const E=_.context(),T=E.currentType===1?_.currentOffset():E.offset,g=E.currentType===1?E.endLoc:E.startLoc,b=a(2,T,g);b.items=[];let y=null,v=null;do{const $=y||_.nextToken();switch(y=null,$.type){case 0:$.value==null&&s(_,F.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,he($)),b.items.push(u(_,$.value||""));break;case 6:$.value==null&&s(_,F.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,he($)),b.items.push(d(_,$.value||""));break;case 4:v=!0;break;case 5:$.value==null&&s(_,F.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,he($)),b.items.push(h(_,$.value||"",!!v)),v&&(l(_,Tt.USE_MODULO_SYNTAX,E.lastStartLoc,0,he($)),v=null);break;case 7:$.value==null&&s(_,F.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,he($)),b.items.push(L(_,$.value||""));break;case 8:{const le=k(_);b.items.push(le.node),y=le.nextConsumeToken||null;break}}}while(E.currentType!==14&&E.currentType!==1);const X=E.currentType===1?E.lastOffset:_.currentOffset(),ie=E.currentType===1?E.lastEndLoc:_.currentPosition();return o(b,X,ie),b}function C(_,E,T,g){const b=_.context();let y=g.items.length===0;const v=a(1,E,T);v.cases=[],v.cases.push(g);do{const X=P(_);y||(y=X.items.length===0),v.cases.push(X)}while(b.currentType!==14);return y&&s(_,F.MUST_HAVE_MESSAGES_IN_PLURAL,T,0),o(v,_.currentOffset(),_.currentPosition()),v}function M(_){const E=_.context(),{offset:T,startLoc:g}=E,b=P(_);return E.currentType===14?b:C(_,T,g,b)}function R(_){const E=bs(_,bn({},e)),T=E.context(),g=a(0,T.offset,T.startLoc);return t&&g.loc&&(g.loc.source=_),g.body=M(E),e.onCacheKey&&(g.cacheKey=e.onCacheKey(_)),T.currentType!==14&&s(E,F.UNEXPECTED_LEXICAL_ANALYSIS,T.lastStartLoc,0,_[T.offset]||""),o(g,E.currentOffset(),E.currentPosition()),g}return{parse:R}}function he(e){if(e.type===14)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function ys(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:l=>(n.helpers.add(l),l)}}function An(e,t){for(let n=0;n<e.length;n++)Dt(e[n],t)}function Dt(e,t){switch(e.type){case 1:An(e.cases,t),t.helper("plural");break;case 2:An(e.items,t);break;case 6:{Dt(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function Ps(e,t={}){const n=ys(e);n.helper("normalize"),e.body&&Dt(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function Cs(e){const t=e.body;return t.type===2?yn(t):t.cases.forEach(n=>yn(n)),e}function yn(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=Sn(t);for(let n=0;n<e.items.length;n++){const r=e.items[n];(r.type===3||r.type===9)&&delete r.value}}}}const ks="minifier";function we(e){switch(e.t=e.type,e.type){case 0:{const t=e;we(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let r=0;r<n.length;r++)we(n[r]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let r=0;r<n.length;r++)we(n[r]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;we(t.key),t.k=t.key,delete t.key,t.modifier&&(we(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}default:throw $e(F.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:ks,args:[e.type]})}delete e.type}const Rs="parser";function Ds(e,t){const{filename:n,breakLineCode:r,needIndent:s}=t,l=t.location!==!1,a={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:s,indentLevel:0};l&&e.loc&&(a.source=e.loc.source);const o=()=>a;function u(P,C){a.code+=P}function d(P,C=!0){const M=C?r:"";u(s?M+" ".repeat(P):M)}function h(P=!0){const C=++a.indentLevel;P&&d(C)}function L(P=!0){const C=--a.indentLevel;P&&d(C)}function m(){d(a.indentLevel)}return{context:o,push:u,indent:h,deindent:L,newline:m,helper:P=>`_${P}`,needIndent:()=>a.needIndent}}function Ms(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Be(e,t.key),t.modifier?(e.push(", "),Be(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function Fs(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const s=t.items.length;for(let l=0;l<s&&(Be(e,t.items[l]),l!==s-1);l++)e.push(", ");e.deindent(r()),e.push("])")}function Vs(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const s=t.cases.length;for(let l=0;l<s&&(Be(e,t.cases[l]),l!==s-1);l++)e.push(", ");e.deindent(r()),e.push("])")}}function Us(e,t){t.body?Be(e,t.body):e.push("null")}function Be(e,t){const{helper:n}=e;switch(t.type){case 0:Us(e,t);break;case 1:Vs(e,t);break;case 2:Fs(e,t);break;case 6:Ms(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:throw $e(F.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:Rs,args:[t.type]})}}const $s=(e,t={})=>{const n=vn(t.mode)?t.mode:"normal",r=vn(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":`
`,l=t.needIndent?t.needIndent:n!=="arrow",a=e.helpers||[],o=Ds(e,{filename:r,breakLineCode:s,needIndent:l});o.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),o.indent(l),a.length>0&&(o.push(`const { ${Sn(a.map(h=>`${h}: _${h}`),", ")} } = ctx`),o.newline()),o.push("return "),Be(o,e),o.deindent(l),o.push("}"),delete e.helpers;const{code:u,map:d}=o.context();return{ast:e,code:u,map:d?d.toJSON():void 0}};function ws(e,t={}){const n=bn({},t),r=!!n.jit,s=!!n.minify,l=n.optimize==null?!0:n.optimize,o=As(n).parse(e);return r?(l&&Cs(o),s&&we(o),{ast:o,code:""}):(Ps(o,n),$s(o,n))}function Bs(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Te().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Te().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Te().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function ue(e){return w(e)&&Mt(e)===0&&(pe(e,"b")||pe(e,"body"))}const Pn=["b","body"];function Ws(e){return Ae(e,Pn)}const Cn=["c","cases"];function Gs(e){return Ae(e,Cn,[])}const kn=["s","static"];function Hs(e){return Ae(e,kn)}const Rn=["i","items"];function Ys(e){return Ae(e,Rn,[])}const Dn=["t","type"];function Mt(e){return Ae(e,Dn)}const Mn=["v","value"];function bt(e,t){const n=Ae(e,Mn);if(n!=null)return n;throw Xe(t)}const Fn=["m","modifier"];function xs(e){return Ae(e,Fn)}const Vn=["k","key"];function js(e){const t=Ae(e,Vn);if(t)return t;throw Xe(6)}function Ae(e,t,n){for(let r=0;r<t.length;r++){const s=t[r];if(pe(e,s)&&e[s]!=null)return e[s]}return n}const Un=[...Pn,...Cn,...kn,...Rn,...Vn,...Fn,...Mn,...Dn];function Xe(e){return new Error(`unhandled node type: ${e}`)}const ye=[];ye[0]={w:[0],i:[3,0],"[":[4],o:[7]},ye[1]={w:[1],".":[2],"[":[4],o:[7]},ye[2]={w:[2],i:[3,0],0:[3,0]},ye[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},ye[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},ye[5]={"'":[4,0],o:8,l:[5,0]},ye[6]={'"':[4,0],o:8,l:[6,0]};const Ks=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Xs(e){return Ks.test(e)}function Js(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function Qs(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function qs(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:Xs(t)?Js(t):"*"+t}function Zs(e){const t=[];let n=-1,r=0,s=0,l,a,o,u,d,h,L;const m=[];m[0]=()=>{a===void 0?a=o:a+=o},m[1]=()=>{a!==void 0&&(t.push(a),a=void 0)},m[2]=()=>{m[0](),s++},m[3]=()=>{if(s>0)s--,r=4,m[0]();else{if(s=0,a===void 0||(a=qs(a),a===!1))return!1;m[1]()}};function A(){const k=e[n+1];if(r===5&&k==="'"||r===6&&k==='"')return n++,o="\\"+k,m[0](),!0}for(;r!==null;)if(n++,l=e[n],!(l==="\\"&&A())){if(u=Qs(l),L=ye[r],d=L[u]||L.l||8,d===8||(r=d[0],d[1]!==void 0&&(h=m[d[1]],h&&(o=l,h()===!1))))return;if(r===7)return t}}const $n=new Map;function zs(e,t){return w(e)?e[t]:null}function ea(e,t){if(!w(e))return null;let n=$n.get(t);if(n||(n=Zs(t),n&&$n.set(t,n)),!n)return null;const r=n.length;let s=e,l=0;for(;l<r;){const a=n[l];if(Un.includes(a)&&ue(s))return null;const o=s[a];if(o===void 0||x(s))return null;s=o,l++}return s}const ta=e=>e,na=e=>"",la="text",ra=e=>e.length===0?"":as(e),sa=ss;function wn(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function aa(e){const t=q(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(q(e.named.count)||q(e.named.n))?q(e.named.count)?e.named.count:q(e.named.n)?e.named.n:t:t}function oa(e,t){t.count||(t.count=e),t.n||(t.n=e)}function ca(e={}){const t=e.locale,n=aa(e),r=w(e.pluralRules)&&I(t)&&x(e.pluralRules[t])?e.pluralRules[t]:wn,s=w(e.pluralRules)&&I(t)&&x(e.pluralRules[t])?wn:void 0,l=M=>M[r(n,M.length,s)],a=e.list||[],o=M=>a[M],u=e.named||Y();q(e.pluralIndex)&&oa(n,u);const d=M=>u[M];function h(M){const R=x(e.messages)?e.messages(M):w(e.messages)?e.messages[M]:!1;return R||(e.parent?e.parent.message(M):na)}const L=M=>e.modifiers?e.modifiers[M]:ta,m=V(e.processor)&&x(e.processor.normalize)?e.processor.normalize:ra,A=V(e.processor)&&x(e.processor.interpolate)?e.processor.interpolate:sa,k=V(e.processor)&&I(e.processor.type)?e.processor.type:la,C={list:o,named:d,plural:l,linked:(M,...R)=>{const[_,E]=R;let T="text",g="";R.length===1?w(_)?(g=_.modifier||g,T=_.type||T):I(_)&&(g=_||g):R.length===2&&(I(_)&&(g=_||g),I(E)&&(T=E||T));const b=h(M)(C),y=T==="vnode"&&K(b)&&g?b[0]:b;return g?L(g)(y,T):y},message:h,type:k,interpolate:A,normalize:m,values:ne(Y(),a,u)};return C}let Je=null;function ia(e){Je=e}function ua(e,t,n){Je&&Je.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const fa=da("function:translate");function da(e){return t=>Je&&Je.emit(e,t)}const Bn=Tt.__EXTEND_POINT__,ke=gt(Bn),se={NOT_FOUND_KEY:Bn,FALLBACK_TO_TRANSLATE:ke(),CANNOT_FORMAT_NUMBER:ke(),FALLBACK_TO_NUMBER_FORMAT:ke(),CANNOT_FORMAT_DATE:ke(),FALLBACK_TO_DATE_FORMAT:ke(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:ke(),__EXTEND_POINT__:ke()},_a={[se.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[se.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[se.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[se.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[se.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[se.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[se.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function Re(e,...t){return kt(_a[e],...t)}const Wn=F.__EXTEND_POINT__,De=gt(Wn),te={INVALID_ARGUMENT:Wn,INVALID_DATE_ARGUMENT:De(),INVALID_ISO_DATE_ARGUMENT:De(),NOT_SUPPORT_NON_STRING_MESSAGE:De(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:De(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:De(),NOT_SUPPORT_LOCALE_TYPE:De(),__EXTEND_POINT__:De()};function Ne(e){return $e(e,null,process.env.NODE_ENV!=="production"?{messages:ma}:void 0)}const ma={[te.INVALID_ARGUMENT]:"Invalid arguments",[te.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[te.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[te.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[te.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[te.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot