From 5bbcc0f03fda25c3a8aa64e0ea7b340536cb1fbc Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Tue, 26 Mar 2024 12:41:51 +0100 Subject: [PATCH] Update default compiled assets --- .../{chunk-common.03a4884d.js => chunk-common.125ad3b4.js} | 2 +- ...{chunk-vendors.4cfc4aa4.js => chunk-vendors.a40856e7.js} | 4 ++-- .../{main-buckets.56c5072c.js => main-buckets.a2cce1e2.js} | 2 +- twill-assets/assets/twill/twill-manifest.json | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) rename twill-assets/assets/twill/js/{chunk-common.03a4884d.js => chunk-common.125ad3b4.js} (89%) rename twill-assets/assets/twill/js/{chunk-vendors.4cfc4aa4.js => chunk-vendors.a40856e7.js} (96%) rename twill-assets/assets/twill/js/{main-buckets.56c5072c.js => main-buckets.a2cce1e2.js} (80%) diff --git a/twill-assets/assets/twill/js/chunk-common.03a4884d.js b/twill-assets/assets/twill/js/chunk-common.125ad3b4.js similarity index 89% rename from twill-assets/assets/twill/js/chunk-common.03a4884d.js rename to twill-assets/assets/twill/js/chunk-common.125ad3b4.js index 4f838c7b8..cc54a8d38 100644 --- a/twill-assets/assets/twill/js/chunk-common.03a4884d.js +++ b/twill-assets/assets/twill/js/chunk-common.125ad3b4.js @@ -1 +1 @@ -(self["webpackChunk_area17_twill"]=self["webpackChunk_area17_twill"]||[]).push([[640],{4836:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=4836,e.exports=t},9628:function(e,t,i){var s={"./BlockEditorItem.vue":8898,"./BlockEditorModel.js":296,"./BlockImage.vue":3436,"./BlockTable.vue":9980,"./BlockTitle.vue":488,"./BlockWysiwyg.vue":7626,"./Blocks.vue":1e3,"./BlocksList.js":6799};function a(e){var t=n(e);return i(t)}function n(e){if(!i.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}a.keys=function(){return Object.keys(s)},a.resolve=n,e.exports=a,a.id=9628},9924:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=9924,e.exports=t},4628:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=4628,e.exports=t},8754:function(e,t,i){"use strict";i.d(t,{c:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",{class:e.avatarClasses},[e.thumbnail?t("img",{attrs:{src:e.thumbnail,alt:e.name}}):e._e(),t("span",{staticClass:"avatar__letter"},[e._v(e._s(e.nameFirstLetter))])])},a=[],n={name:"A17Avatar",props:{name:{type:String,default:null},thumbnail:{type:String,default:null}},computed:{avatarClasses(){return["avatar",this.getBackgroundColor]},getBackgroundColor(){const e=["orange","blue","purple","red"],t=this.name.length%e.length;return"avatar--background-".concat(e[t])},nameFirstLetter(){return this.name.charAt(0)}}},o=n,r=i(2528),l=(0,r.c)(o,s,a,!1,null,"44a53510",null),d=l.exports},9271:function(e,t,i){"use strict";i.d(t,{c:function(){return m}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"browser"},[t("div",{staticClass:"browser__frame"},[t("div",{ref:"form",staticClass:"browser__header"},[e.multiSources?t("div",{staticClass:"browser__sources"},[t("a17-vselect",{staticClass:"browser__sources-select",attrs:{name:"sources",selected:e.currentEndpoint,options:e.endpoints,required:!0},on:{change:e.changeBrowserSource}})],1):e._e(),t("div",{staticClass:"browser__search"},[t("a17-filter",{on:{submit:e.submitFilter}},[e.browserNote?t("div",{attrs:{slot:"additional-actions"},slot:"additional-actions"},[t("span",{staticClass:"browser__note f--small"},[e._v(" "+e._s(e.browserNote)+" ")])]):e._e()])],1)]),t("div",{staticClass:"browser__inner"},[t("div",{ref:"list",staticClass:"browser__list"},[t("a17-itemlist",{attrs:{items:e.fullItems,keysToCheck:["id","edit"],selectedItems:e.selectedItems},on:{change:e.updateSelectedItems}})],1)]),t("div",{staticClass:"browser__footer"},[t("a17-button",{attrs:{type:"button",variant:"action"},on:{click:e.saveAndClose}},[e._v(e._s(e.browserTitle))]),t("span",{staticClass:"browser__size-infos"},[e._v(e._s(e.selectedItems.length)+" / "+e._s(e.max))])],1)])])},a=[],n=i(6036),o=i(624),r=i(7120),l=i(892),d=i(7300),c={name:"A17Browser",components:{"a17-filter":l.c,"a17-itemlist":d.c},props:{btnLabel:{type:String,default:"Insert"},btnMultiLabel:{type:String,default:"Insert files"},initialPage:{type:Number,default:1}},data(){return{maxPage:20,fullItems:[],listHeight:0,page:this.initialPage}},computed:{currentEndpoint(){return this.endpoints.find((e=>e.value===this.endpoint))},multiSources(){return this.endpoints.length>0},selectedItems:{get(){return this.selected[this.connector]||[]},set(e){this.$store.commit(o.ai.SAVE_ITEMS,e)}},...(0,n.ys)({connector:e=>e.browser.connector,max:e=>e.browser.max,endpoint:e=>e.browser.endpoint,endpointName:e=>e.browser.endpointName,endpoints:e=>e.browser.endpoints,browserTitle:e=>e.browser.title,browserNote:e=>e.browser.note,selected:e=>e.browser.selected})},methods:{updateSelectedItems(e){const t=this.multiSources?["id","endpointType"]:["id"],i=this.fullItems.some((i=>t.every((t=>i[t]===e[t]))));if(!i)return;const s=this.selectedItems.some((i=>t.every((t=>i[t]===e[t]))));if(s){const i=this.selectedItems.findIndex((i=>t.every((t=>i[t]===e[t]))));if(i<0)return;const s=[...this.selectedItems];s.splice(i,1),this.selectedItems=s}else{if(1===this.max&&this.clearSelectedItems(),this.selectedItems.length>=this.max&&this.max>0)return;this.selectedItems=[...this.selectedItems,e]}},getFormData(e){let t=(0,r.c)(e);return t?t.page=this.page:t={page:this.page},t},clearSelectedItems(){this.selectedItems=[]},clearFullItems(){this.fullItems.splice(0)},reloadList(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&(this.page=1);const t=this.$refs.form,i=this.$refs.list,s=this.getFormData(t);this.$http.get(this.endpoint,{params:s}).then((t=>{e&&this.clearFullItems(),this.fullItems.push(...t.data.data),this.$nextTick((()=>{this.listHeight!==i.scrollHeight&&(this.listHeight=i.scrollHeight,i.addEventListener("scroll",this.scrollToPaginate))}))}),(function(e){}))},submitFilter(){this.page=1,this.clearFullItems(),this.reloadList()},scrollToPaginate(){const e=this.$refs.list;e.scrollTop+e.clientHeight>this.listHeight-10&&(e.removeEventListener("scroll",this.scrollToPaginate),this.maxPage>this.page&&(this.page=this.page+1,this.reloadList()))},saveAndClose(){this.$store.commit(o.ai.SAVE_ITEMS,this.selectedItems),this.$parent.close()},changeBrowserSource(e){this.$store.commit(o.ai.UPDATE_BROWSER_ENDPOINT,e),this.reloadList(!0)}},mounted(){this.reloadList()}},u=c,h=i(2528),p=(0,h.c)(u,s,a,!1,null,"0de50c6f",null),m=p.exports},3032:function(e,t,i){"use strict";i.d(t,{c:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"dropdown",class:e.dropdownClasses,attrs:{"aria-title":e.title}},[e.fixed?t("div",{ref:"dropdown__cta"},[e._t("default")],2):e._t("default"),t("transition",{attrs:{name:"fade_move_dropdown"}},[e.active?t("div",{ref:"dropdown__position",staticClass:"dropdown__position"},[t("div",{staticClass:"dropdown__content",style:e.offsetStyle,attrs:{"data-dropdown-content":""}},[t("div",{staticClass:"dropdown__inner"},[e.arrow?t("span",{staticClass:"dropdown__arrow"}):e._e(),t("div",{staticClass:"dropdown__scroller",style:e.innerStyle},[e.title?t("span",{staticClass:"dropdown__title f--small"},[e._v(e._s(e.title))]):e._e(),e._t("dropdown__content")],2)])])]):e._e()])],2)},a=[],n={name:"A17Dropdown",props:{title:{type:String,default:""},position:{type:String,default:"bottom"},width:{type:String,default:"auto"},maxWidth:{type:Number,default:300},maxHeight:{type:Number,default:0},minWidth:{type:Number,default:0},arrow:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},offset:{type:Number,default:5},sideOffset:{type:Number,default:0},fixed:{type:Boolean,default:!1}},data:function(){return{currentPosition:this.position,currentHeight:100,currentMaxWidth:this.maxWidth,active:!1,originScrollPostion:null,scrollOffset:75}},computed:{dropdownClasses:function(){return{"dropdown--active":this.active,"dropdown--arrow":this.arrow,"dropdown--bottom":this.isPosition("bottom"),"dropdown--top":this.isPosition("top"),"dropdown--left":this.isPosition("left"),"dropdown--right":this.isPosition("right"),"dropdown--center":this.isPosition("center"),"dropdown--full":"full"===this.width,"dropdown--fixed":this.fixed}},offsetStyle:function(){return{"margin-top":this.isPosition("bottom")?this.offset+"px":"","margin-bottom":this.isPosition("top")?this.offset+"px":"",transform:this.sideOffset?"translateX("+this.sideOffset+"px)":"","max-width":this.currentMaxWidth>0&&"full"!==this.width?this.currentMaxWidth+"px":"","min-width":this.minWidth>0?this.minWidth+"px":""}},innerStyle:function(){return{"max-height":this.maxHeight>0?this.maxHeight+"px":"",overflow:this.maxHeight>0?"hidden":"","overflow-y":this.maxHeight>0?"scroll":""}}},methods:{isPosition:function(e){return-1!==this.currentPosition.indexOf(e)},reposition:function(){const e=this.$el.getBoundingClientRect().top+this.$el.offsetHeight+window.pageYOffset+this.offset,t=this.$el.getBoundingClientRect().top+window.pageYOffset-this.offset,i=window.pageYOffset+window.innerHeight;this.currentPosition!==this.position&&(this.currentPosition=this.position),this.isPosition("bottom")?e+this.currentHeight>i&&(this.currentPosition=this.currentPosition.replace(/bottom/i,"top")):this.isPosition("top")&&t-this.currentHeightwindow.innerWidth?window.innerWidth-e.left:this.maxWidth:this.isPosition("right")?this.currentMaxWidth=this.maxWidth+(window.innerWidth-e.right)>window.innerWidth?window.innerWidth-(window.innerWidth-e.right):this.maxWidth:this.currentMaxWidth=this.maxWidth>window.innerWidth?window.innerWidth:this.maxWidth},setFixedPosition:function(){const e=this.$refs.dropdown__cta.getBoundingClientRect();this.isPosition("top")?this.$refs.dropdown__position.style.bottom=Math.round(window.innerHeight-e.bottom+e.height)+"px":this.$refs.dropdown__position.style.top=Math.round(e.top+e.height)+"px",this.isPosition("left")?this.$refs.dropdown__position.style.left=Math.round(e.left)+"px":this.isPosition("right")?this.$refs.dropdown__position.style.right=Math.round(window.innerWidth-e.right)+"px":this.$refs.dropdown__position.style.left=Math.round(e.left+e.width/2)+"px"},closeFromDoc:function(e){const t=e.target;if("scroll"===e.type){if(this.$el.querySelector("[data-dropdown-content]").contains(t))return;const e=window.pageYOffset||document.documentElement.scrollTop;if(e>this.originScrollPostion-this.scrollOffset&&e{this.timer=null,this.active=!0,document.addEventListener("click",this.closeFromDoc,!1),document.addEventListener("touchend",this.closeFromDoc,!1),this.fixed&&(window.addEventListener("scroll",this.closeFromDoc,!0),this.originScrollPostion=window.pageYOffset||document.documentElement.scrollTop),this.$nextTick((function(){this.getHeight(),this.reposition(),this.setMaxWidth(),this.fixed&&this.setFixedPosition()})),this.$emit("open")}),1))},close:function(e){if(this.active){if(clearTimeout(this.timer),document.removeEventListener("click",this.closeFromDoc,!0),document.removeEventListener("touchend",this.closeFromDoc,!0),this.fixed)return window.removeEventListener("scroll",this.closeFromDoc,!0),this.originScrollPostion=null,this.active=!1,void this.$emit("close");setTimeout((()=>{this.active=!1,this.$emit("close")}),0)}},toggle:function(e){this.active?this.close():this.open()}}},o=n,r=i(2528),l=(0,r.c)(o,s,a,!1,null,"a897d080",null),d=l.exports},3820:function(e,t,i){"use strict";i.d(t,{c:function(){return c}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"fieldset",class:e.visibilityClasses},[e.title?t("header",{staticClass:"fieldset__header",class:e.activeClasses},[e.activeToggle?t("h3",{attrs:{role:"button","aria-expanded":e.visible?"true":"false"},on:{click:e.onClickVisibility}},[e._v(e._s(e.title)+" "),t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"dropdown_module"}})]):t("h3",[e._v(e._s(e.title))])]):t("header",{staticClass:"fieldset__header",class:e.activeClasses},[e._t("header")],2),t("div",{staticClass:"fieldset__content",attrs:{hidden:!e.visible||null,"aria-hidden":!e.visible||null}},[e._t("default")],2)])},a=[],n=i(6304),o={name:"A17Fieldset",mixins:[n.c],props:{open:{type:Boolean,default:!0},title:{default:""},activeToggle:{type:Boolean,default:!0}},computed:{activeClasses:function(){return{"fieldset--hoverable":this.activeToggle}}}},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,"5e017f1a",null),c=d.exports},892:function(e,t,i){"use strict";i.d(t,{c:function(){return h}});var s=function(){var e=this,t=e._self._c;return t("form",{ref:"form",staticClass:"filter",class:{"filter--opened":e.opened,"filter--single":!e.withNavigation,"filter--full":!e.withNavigation&&e.fullWidth,"filter--withHiddenFilters":e.withHiddenFilters},on:{submit:function(t){return t.preventDefault(),e.submitFilter.apply(null,arguments)}}},[t("div",{staticClass:"filter__inner"},[t("div",{staticClass:"filter__navigation"},[e._t("navigation")],2),t("div",{staticClass:"filter__search"},[t("input",{staticClass:"form__input form__input--small",attrs:{type:"search",name:"search",placeholder:e.placeholder},domProps:{value:e.searchValue},on:{input:e.onSearchInput}}),e.withHiddenFilters?t("a17-button",{staticClass:"filter__toggle",attrs:{variant:"ghost","aria-expanded":e.opened?"true":"false"},on:{click:e.toggleFilter}},[e._v(e._s(e.$trans("filter.toggle-label","Filter"))+" "),t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"dropdown_module"}})]):e._e(),e._t("additional-actions"),t("button",{staticClass:"visually-hidden",attrs:{"aria-hidden":"true",type:"submit"}},[e._v(e._s(e.$trans("filter.apply-btn","Apply")))])],2)]),t("transition",{attrs:{css:!1,duration:275},on:{"before-enter":e.beforeEnter,enter:e.enter,"before-leave":e.beforeLeave,leave:e.leave}},[e.withHiddenFilters?t("div",{directives:[{name:"show",rawName:"v-show",value:e.opened,expression:"opened"}],ref:"more",staticClass:"filter__more",attrs:{"aria-hidden":!e.opened||null}},[t("div",{ref:"moreInner",staticClass:"filter__moreInner"},[e._t("hidden-filters"),t("a17-button",{attrs:{variant:"ghost",type:"submit"}},[e._v(e._s(e.$trans("filter.apply-btn","Apply")))]),e.clearOption?t("a17-button",{attrs:{variant:"ghost",type:"button"},on:{click:e.clear}},[e._v(e._s(e.$trans("filter.clear-btn","Clear")))]):e._e()],2)]):e._e()])],1)},a=[],n=i(3336),o=i.n(n),r=i(7120),l={name:"A17Filter",props:{initialSearchValue:{type:String,default:""},placeholder:{type:String,default(){return this.$trans("filter.search-placeholder","Search")}},closed:{type:Boolean,default:!1},clearOption:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},data:function(){return{openable:!this.closed,open:!1,withHiddenFilters:!0,withNavigation:!0,searchValue:this.initialSearchValue,transitionTimeout:null}},computed:{opened:function(){return this.open&&this.openable}},watch:{closed:function(){this.openable=!this.closed},initialSearchValue:function(){this.searchValue=this.initialSearchValue}},methods:{getHeight:function(){return this.$refs.moreInner.clientHeight},beforeEnter:function(e){e.style.height="0px",e.style.overflow="hidden"},enter:function(e,t){this.resetHeight(),this.transitionTimeout&&clearTimeout(this.transitionTimeout),this.transitionTimeout=setTimeout((()=>{e.style.overflow="visible"}),275),window.addEventListener("resize",this._resize,!1)},beforeLeave:function(e){this.transitionTimeout&&clearTimeout(this.transitionTimeout),this.resetHeight(),e.style.overflow="hidden",window.removeEventListener("resize",this._resize)},leave:function(e,t){e.style.height="0px"},toggleFilter:function(){this.openable=!0,this.open=!this.open},submitFilter:function(){const e=(0,r.c)(this.$refs.form);this.$emit("submit",e)},onSearchInput:function(e){this.searchValue=e.target.value},clear:function(){this.searchValue="",this.$emit("clear")},resetHeight:function(){this.$refs.more&&(this.$refs.more.style.height=this.getHeight()+"px")},_resize:o()((function(){this.resetHeight()}),50)},beforeMount:function(){this.$slots.navigation||(this.withNavigation=!1),this.$slots["hidden-filters"]||(this.withHiddenFilters=!1)}},d=l,c=i(2528),u=(0,c.c)(d,s,a,!1,null,"5bb79734",null),h=u.exports},7300:function(e,t,i){"use strict";i.d(t,{c:function(){return h}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"itemlist"},[t("table",{staticClass:"itemlist__table"},[t("tbody",[e._l(e.itemsLoading,(function(i,s){return t("tr",{directives:[{name:"show",rawName:"v-show",value:!i.isReplacement,expression:"!item.isReplacement"}],key:i.id,staticClass:"itemlist__row"},[t("td",{staticClass:"itemlist__cell itemlist__cell--loading",class:{"itemlist__cell--error":i.error},attrs:{colspan:e.columnsNumber}},[i.error?t("span",{staticClass:"itemlist__progressError"},[e._v("Upload Error")]):t("span",{staticClass:"itemlist__progress"},[t("span",{staticClass:"itemlist__progressBar",style:e.loadingProgress(s)})])])])})),e._l(e.allItems,(function(i,s){return t("tr",{key:"".concat(i.endpointType,"_").concat(i.id),staticClass:"itemlist__row",class:{"s--picked":e.isSelected(i,e.keysToCheck),"s--disabled":i.disabled||!!e.replacingMediaIds[i.id]},on:{click:[function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.toggleSelection(i))},function(t){return t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.shiftToggleSelection(i)):null}]}},[i.isReplacement?i.isReplacement?[t("td",{staticClass:"itemlist__cell itemlist__cell--loading",class:{"itemlist__cell--error":i.error},attrs:{colspan:e.columnsNumber}},[i.error?t("span",{staticClass:"itemlist__progressError"},[e._v("Upload Error")]):t("span",{staticClass:"itemlist__progress"},[t("span",{staticClass:"itemlist__progressBar",style:e.loadingProgress(s,"allItems")})])])]:e._e():[i.hasOwnProperty("id")?t("td",{staticClass:"itemlist__cell itemlist__cell--btn"},[t("a17-checkbox",{attrs:{name:"item_list",value:i.endpointType+"_"+i.id,initialValue:e.checkedItems,theme:"bold",disabled:i.disabled}})],1):e._e(),i.hasOwnProperty("thumbnail")?t("td",{class:"itemlist__cell itemlist__cell--thumb ".concat("users"===i.endpointType?"itemlist__cell--thumb-rounded":"")},["users"===i.endpointType?[t("a17-avatar",{attrs:{name:i.name,thumbnail:i.thumbnail}})]:[t("img",{attrs:{src:i.thumbnail}})]],2):e._e(),i.hasOwnProperty("name")?t("td",{staticClass:"itemlist__cell itemlist__cell--name"},[i.hasOwnProperty("renderHtml")?t("div",{domProps:{innerHTML:e._s(i.name)}}):t("div",[e._v(e._s(i.name))])]):e._e(),e._l(e.extraColumns,(function(s,a){return t("td",{key:a,staticClass:"itemlist__cell",class:e.rowClass(s)},["size"===s?[e._v(e._s(e._f("uppercase")(i[s])))]:[e._v(e._s(i[s]))]],2)}))]],2)}))],2)])])},a=[],n=i(8754),o=i(6456),r=i(8884),l={name:"A17Itemlist",props:{keysToCheck:{type:Array,default:()=>["id"]}},components:{"a17-avatar":n.c},mixins:[o.c],filters:r.c,computed:{allItems:function(){return this.items.map((e=>{if(this.replacingMediaIds[e.id]){const t=this.itemsLoading.find((t=>t.replacementId===e.id));return t||e}return e}))},columnsNumber:function(){if(!this.items.length)return 0;let e=this.extraColumns.length;const t=this.items[0];return t.hasOwnProperty("id")&&e++,t.hasOwnProperty("name")&&e++,t.hasOwnProperty("thumbnail")&&e++,e},extraColumns:function(){if(!this.items.length)return[];const e=this.items[0];return Object.keys(e).filter((t=>!["id","name","thumbnail","src","original","edit","crop","deleteUrl","updateUrl","updateBulkUrl","deleteBulkUrl","endpointType","filesizeInMb"].includes(t)&&"string"===typeof e[t]))},checkedItems:function(){const e=[];return this.selectedItems.length&&this.selectedItems.forEach((function(t){e.push(t.endpointType+"_"+t.id)})),e}},methods:{rowClass:function(e){return"itemlist__cell--"+e},loadingProgress:function(e,t){const i=t?this[t]:this.itemsLoading;return{width:i[e].progress?i[e].progress+"%":"0%"}},getFirstLetter(e){return e.name.charAt(0)}}},d=l,c=i(2528),u=(0,c.c)(d,s,a,!1,null,"04a8279a",null),h=u.exports},7136:function(e,t,i){"use strict";i.d(t,{c:function(){return m}});var s=function(){var e=this,t=e._self._c;return e.languages.length>1?t("div",{staticClass:"languageManager"},[t("div",{staticClass:"languageManager__switcher"},[t("a17-langswitcher",{attrs:{"in-modal":!0,"all-published":!e.controlPublication}})],1),e.controlPublication?t("a17-dropdown",{ref:"languageManagerDropdown",staticClass:"languageManager__dropdown",attrs:{position:"bottom-right",clickable:!0}},[t("button",{staticClass:"languageManager__button",attrs:{type:"button"},on:{click:function(t){return e.$refs.languageManagerDropdown.toggle()}}},[e._v(" "+e._s(e.currentValue.length)+" "+e._s(e.$trans("lang-manager.published"))+" "),t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"dropdown_module"}})]),t("div",{staticClass:"languageManager__dropdown-content",attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[t("a17-checkboxgroup",{attrs:{name:"langManager",options:e.languages,selected:e.currentValue,min:1},on:{change:e.changeValue}})],1)]):e._e()],1):e._e()},a=[],n=i(6036),o=i(1200),r=i(6304),l=i(624),d=i(4564),c={name:"A17LangManager",mixins:[r.c,o.c],components:{"a17-langswitcher":d.c},props:{controlPublication:{type:Boolean,default:!0},value:{default:function(){return[]}}},computed:{currentValue:{get(){const e=[];return this.publishedLanguages.length&&this.publishedLanguages.forEach((function(t){e.push(t.value)})),e}},...(0,n.ys)({languages:e=>e.language.all}),...(0,n.gV)(["publishedLanguages"])},methods:{changeValue:function(e){this.$store.commit(l.cp.PUBLISH_LANG,e)}}},u=c,h=i(2528),p=(0,h.c)(u,s,a,!1,null,"06768eb6",null),m=p.exports},4564:function(e,t,i){"use strict";i.d(t,{c:function(){return h}});var s=function(){var e=this,t=e._self._c;return e.languages.length>1?t("div",{staticClass:"language",class:e.languageClass},[e.inModal?e._e():t("span",{staticClass:"language__label f--small"},[e._v(e._s(e.$trans("lang-switcher.edit-in")))]),t("span",{staticClass:"language__toolbar"},e._l(e.languages,(function(i){return t("button",{key:i.value,staticClass:"language__button",class:{selected:i.value===e.localeValue.value,published:i.published,"no-state":e.allPublished},attrs:{type:"button"},on:{click:function(t){return e.onClick(i.value)}}},[e._v(e._s(i.shortlabel))])})),0)]):e._e()},a=[],n=i(6036),o=i(1200),r=i(624),l={name:"A17Langswitcher",mixins:[o.c],props:{inModal:{type:Boolean,default:!1},toggleOnClick:{type:Boolean,default:!1},allPublished:{type:Boolean,default:!1}},computed:{languageClass(){return{"language--in-modal":this.inModal}},localeValue(){return this.$store.state.language.active},...(0,n.gV)(["publishedLanguages"])},methods:{onClick:function(e){this.$store.commit(r.cp.UPDATE_LANG,e)}}},d=l,c=i(2528),u=(0,c.c)(d,s,a,!1,null,"1131928c",null),h=u.exports},5256:function(e,t,i){"use strict";i.d(t,{c:function(){return p}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"modal",class:e.modalClasses,on:{mousedown:e.hide,touchend:function(t){return t.preventDefault(),e.hide.apply(null,arguments)}}},[t("transition",{attrs:{name:"fade_scale_modal"}},[e.active?t("div",{directives:[{name:"show",rawName:"v-show",value:!e.hidden,expression:"!hidden"}],staticClass:"modal__window",on:{mousedown:function(e){e.stopPropagation()},touchend:function(e){e.stopPropagation()}}},[e.modalTitle?t("header",{staticClass:"modal__header"},[e._v(" "+e._s(e.modalTitle)+" "),t("button",{staticClass:"modal__close",attrs:{type:"button"},on:{click:e.hide}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"close_modal"}})])]):e._e(),t("div",{staticClass:"modal__content"},[e._t("default")],2)]):e._e()])],1)},a=[],n=i(6036),o=i(400);const r=document.documentElement,l=o.c.modal;var d={name:"A17Modal",props:{title:{type:String,default:""},mode:{type:String,default:""},forceClose:{type:Boolean,default:!1},forceLock:{type:Boolean,default:!1}},data:function(){return{active:!1,hidden:!0,locked:!1,firstFocusableEl:null,lastFocusableEl:null}},computed:{modalTitle:function(){return""!==this.title?this.title:this.browserTitle},modalClasses:function(){return{"modal--active":this.active,"modal--hidden":this.hidden,"modal--tiny":"tiny"===this.mode,"modal--medium":"medium"===this.mode,"modal--wide":"wide"===this.mode}},...(0,n.ys)({browserTitle:e=>e.browser.title})},watch:{forceLock:function(){this.locked=this.forceLock}},methods:{open:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.active&&!this.hidden||(this.active=!0,this.hidden=!1,r.classList.add(l),this.bindKeyboard(),this.$nextTick((function(){if(e){const e='textarea, input:not([type="hidden"]), select, button[type="submit"]',t=this.$el.querySelectorAll(e),i=this.$el.querySelectorAll(e+', a, button[type="button"]');this.firstFocusableEl=this.$el.querySelector(".modal__close"),this.lastFocusableEl=i[i.length-1],t.length&&t[0].focus()}this.$emit("open")})))},mask:function(){r.classList.remove(l),this.unbindKeyboard(),this.$emit("close")},hide:function(){this.active&&(this.locked||(this.forceClose?this.close():(this.hidden=!0,this.mask())))},close:function(e){this.active&&(this.locked||(this.active=!1,this.$emit("close"),this.mask()))},bindKeyboard:function(){window.addEventListener("keyup",this.keyPressed),document.addEventListener("keydown",this.keyDown,!1)},unbindKeyboard:function(){window.removeEventListener("keyup",this.keyPressed),document.removeEventListener("keydown",this.keyDown)},keyPressed:function(e){27!==e.which&&27!==e.keyCode||(this.hide(),this.$emit("esc-key"))},keyDown:function(e){e.keyCode&&9===e.keyCode&&(e.shiftKey?document.activeElement.isEqualNode(this.firstFocusableEl)&&(this.lastFocusableEl.focus(),e.preventDefault()):document.activeElement.isEqualNode(this.lastFocusableEl)&&(this.firstFocusableEl.focus(),e.preventDefault()))}},beforeDestroy:function(){this.$el.parentNode&&(this.active&&this.unbindKeyboard(),this.$el.parentNode.removeChild(this.$el))}},c=d,u=i(2528),h=(0,u.c)(c,s,a,!1,null,"5d2936e8",null),p=h.exports},8108:function(e,t,i){"use strict";i.d(t,{c:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:"fade_spinner"},on:{"before-enter":e.beforeEnter,"after-enter":e.afterEnter,"before-leave":e.beforeLeave}},[t("div",{staticClass:"a17spinner"},[t("div",{staticClass:"a17spinner__anim",class:{"a17spinner__anim--visible":e.isVisible}},[t("span",{staticClass:"loader"},[t("span")])])])])},a=[],n={name:"A17Spinner",props:{visible:{type:Boolean,default:!1}},data:function(){return{isVisible:this.visible}},methods:{beforeEnter:function(e){this.isVisible=this.visible},afterEnter:function(e){this.isVisible=!0},beforeLeave:function(e){this.isVisible=!1}}},o=n,r=i(2528),l=(0,r.c)(o,s,a,!1,null,null,null),d=l.exports},6308:function(e,t,i){"use strict";i.d(t,{c:function(){return p}});var s=function(){var e=this,t=e._self._c;return t("a17-modal",{ref:"standalone-"+e.endpointName,staticClass:"modal--browser",attrs:{mode:"medium","force-close":!0},on:{close:e.closeModal}},[t("div",{staticClass:"browser"},[t("div",{staticClass:"browser__frame"},[t("div",{ref:"form",staticClass:"browser__header"},[e.multiSources?t("div",{staticClass:"browser__sources"},[t("a17-vselect",{staticClass:"browser__sources-select",attrs:{name:"sources",selected:e.currentEndpoint,options:e.endpoints,required:!0},on:{change:e.changeBrowserSource}})],1):e._e(),t("div",{staticClass:"browser__search"},[t("a17-filter",{on:{submit:e.submitFilter}},[e.browserNote?t("div",{attrs:{slot:"additional-actions"},slot:"additional-actions"},[t("span",{staticClass:"browser__note f--small"},[e._v(" "+e._s(e.browserNote)+" ")])]):e._e()])],1)]),t("div",{staticClass:"browser__inner"},[t("div",{ref:"list",staticClass:"browser__list"},[t("a17-itemlist",{attrs:{items:e.fullItems,keysToCheck:["id","edit"],selectedItems:e.selectedItems},on:{change:e.updateSelectedItems}})],1)]),t("div",{staticClass:"browser__footer"},[t("a17-button",{attrs:{type:"button",variant:"action"},on:{click:e.saveAndClose}},[e._v(e._s(e.browserTitle))]),t("span",{staticClass:"browser__size-infos"},[e._v(e._s(e.selectedItems.length)+" / "+e._s(e.max))])],1)])])])},a=[],n=i(7120),o=i(892),r=i(7300),l=i(5256),d={name:"A17StandaloneBrowser",components:{"a17-filter":o.c,"a17-itemlist":r.c,"a17-modal":l.c},props:{btnLabel:{type:String,default:"Insert"},btnMultiLabel:{type:String,default:"Insert files"},initialPage:{type:Number,default:1},open:{type:Boolean,default:!1},forRepeater:{type:Boolean,default:!1},endpoint:{type:Object,required:!1,default:null},endpointMultiple:{type:Array,required:!1,default:null},max:{type:Number,default:0}},data(){return{maxPage:20,fullItems:[],listHeight:0,page:this.initialPage,endpoints:[],endpointName:null,browserTitle:"Select",browserNote:null,currentSource:null,selected:[]}},computed:{currentEndpoint(){return this.endpoints.find((e=>e.value===this.currentSource))},multiSources(){return this.endpoints.length>1},selectedItems:{get(){return this.selected||[]},set(e){this.selected=e}}},watch:{open:function(e,t){e!==t&&(e?this.openModal():this.closeModal())}},methods:{openModal(){const e="standalone-"+this.endpointName;this.$refs[e].open()},closeModal(){const e="standalone-"+this.endpointName;this.$refs[e].close(),this.$emit("close")},updateSelectedItems(e){const t=this.multiSources?["id","endpointType"]:["id"],i=this.fullItems.some((i=>t.every((t=>i[t]===e[t]))));if(!i)return;const s=this.selectedItems.some((i=>t.every((t=>i[t]===e[t]))));if(s){const i=this.selectedItems.findIndex((i=>t.every((t=>i[t]===e[t]))));if(i<0)return;const s=[...this.selectedItems];s.splice(i,1),this.selectedItems=s}else{if(1===this.max&&this.clearSelectedItems(),this.selectedItems.length>=this.max&&this.max>0)return;this.selectedItems=[...this.selectedItems,e]}},getFormData(e){let t=(0,n.c)(e);return t?t.page=this.page:t={page:this.page},t.forRepeater=this.forRepeater,t},clearSelectedItems(){this.selectedItems=[]},clearFullItems(){this.fullItems.splice(0)},reloadList(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&(this.page=1);const t=this.$refs.form,i=this.getFormData(t);this.$http.get(this.currentEndpoint.value,{params:i}).then((t=>{e&&this.clearFullItems(),this.fullItems.push(...t.data.data),this.$nextTick((()=>{this.listHeight!==this.$refs.list.scrollHeight&&(this.listHeight=this.$refs.list.scrollHeight,this.$refs.list.addEventListener("scroll",this.scrollToPaginate))}))}),(function(e){}))},submitFilter(){this.page=1,this.clearFullItems(),this.reloadList()},scrollToPaginate(){const e=this.$refs.list;e.scrollTop+e.clientHeight>this.listHeight-10&&(e.removeEventListener("scroll",this.scrollToPaginate),this.maxPage>this.page&&(this.page=this.page+1,this.reloadList()))},saveAndClose(){this.$emit("selected",this.selectedItems),this.closeModal()},changeBrowserSource(e){this.currentSource=e.value,this.reloadList(!0)}},mounted(){this.openModal(),this.endpointMultiple?this.endpoints=this.endpointMultiple:this.endpoints=[this.endpoint],this.currentSource=this.endpoints[0].value,this.reloadList()}},c=d,u=i(2528),h=(0,u.c)(c,s,a,!1,null,"3ff94fa2",null),p=h.exports},6676:function(e,t,i){"use strict";i.d(t,{c:function(){return g}});var s=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,locale:e.locale,size:e.size,name:e.name,"label-for":e.uniqId,required:e.required},on:{localize:e.updateLocale}},[t("div",{staticClass:"input__field",class:e.textfieldClasses,attrs:{dir:e.dirLocale}},[e.hasPrefix?t("span",{staticClass:"input__prefix"},[e._v(e._s(e.prefix))]):e._e(),"textarea"===e.type?t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],ref:"clone",staticClass:"input__clone",attrs:{rows:e.rows,disabled:"true"},domProps:{value:e.value},on:{input:function(t){t.target.composing||(e.value=t.target.value)}}}):e._e(),"textarea"===e.type?t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],ref:"input",attrs:{name:e.name,id:e.uniqId,placeholder:e.placeholder,disabled:e.disabled,required:e.required,readonly:e.readonly,rows:e.rows,autofocus:e.autofocus},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:[function(t){t.target.composing||(e.value=t.target.value)},e.onInput]}}):e._e(),"number"===e.type?t("input",{ref:"input",attrs:{type:"number",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete,min:e.min,max:e.max,step:e.step},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),"text"===e.type?t("input",{ref:"input",attrs:{type:"text",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete,"x-mask":e.mask},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),"email"===e.type?t("input",{ref:"input",attrs:{type:"email",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete,pattern:"[^@\\s]+@[^@\\s]+\\.[^@\\s]+"},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),"password"===e.type?t("input",{ref:"input",attrs:{type:"password",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),"url"===e.type?t("input",{ref:"input",attrs:{type:"url",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),e.hasMaxlength?t("span",{staticClass:"input__limit f--tiny",class:e.limitClasses},[e._v(e._s(e.counter))]):e._e(),"email"===e.type?t("span",{class:e.validityClasses}):e._e()])])},a=[],n=i(3336),o=i.n(n),r=i(1308),l=i(5284),d=i(5272),c=i(1200),u=i(4992),h={name:"A17Textfield",mixins:[u.c,l.c,d.c,c.c,r.c],props:{name:{type:String,required:!0},type:{type:String,default:"text"},prefix:{type:String,default:""},maxlength:{type:Number,default:0},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:null},initialValue:{default:""},mask:{type:String,default:null},rows:{type:Number,default:5}},computed:{uniqId:function(e){return this.name+"-"+this.randKey},textfieldClasses:function(){return{"input__field--textarea":"textarea"===this.type,"input__field--small":"small"===this.size&&"textarea"===!this.type,"s--focus":this.focused,"s--disabled":this.disabled}},hasMaxlength:function(){return this.maxlength>0},hasPrefix:function(){return""!==this.prefix},displayedMaxlength:function(){return!!this.hasMaxlength&&this.maxlength},limitClasses:function(){return{"input__limit--red":this.counter<.1*this.maxlength}},validityClasses:function(){return["input__validity",!0===this.isFieldValid?"input__validity--valid":"",!1===this.isFieldValid?"input__validity--error":""]}},data:function(){return{value:this.initialValue,lastSavedValue:this.initialValue,focused:!1,isFieldValid:null,counter:0}},watch:{initialValue:function(){this.updateValue(this.initialValue)}},methods:{updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&this.updateValue(e)},updateValue:function(e){this.value=e,this.updateCounter(e)},updateAndSaveValue:function(e){this.updateValue(e),this.lastSavedValue=this.value,this.saveIntoStore()},updateCounter:function(e){this.maxlength>0&&(this.counter=this.maxlength-(e?e.toString().length:0))},onFocus:function(e){this.focused=!0,this.resizeTextarea(),this.$emit("focus")},onBlur:function(e){const t=e.target.value;this.updateAndSaveValue(t),this.focused=!1,this.$emit("blur",t)},onInput:function(e){this.preventSubmit(),this._onInputInternal(e)},_onInputInternal:o()((function(e){const t=e.target.value;this.updateAndSaveValue(t),this.checkFieldValidity(e.target),this.$emit("change",t),this.$emit("input",t),this.allowSubmit()}),250),resizeTextarea:function(){if("textarea"!==this.type)return;const e=this.$refs.clone,t=15;if(e){const i=e.scrollHeight;this.$refs.input.style.minHeight="".concat(i+t,"px")}},checkFieldValidity:function(e){let t=null,i=null;switch(e.type){case"email":if(e.value.length<1)return void(this.isFieldValid=null);t=e.pattern,i=RegExp(t),this.isFieldValid=i.test(this.value);break}}},mounted:function(){this.updateCounter(this.value),"textarea"===this.type&&(this.resizeTextarea(),this.$watch("value",this.resizeTextarea),this.$nextTick((function(){window.addEventListener("resize",this.resizeTextarea)})))},beforeDestroy(){"textarea"===this.type&&window.removeEventListener("resize",this.resizeTextarea)}},p=h,m=i(2528),f=(0,m.c)(p,s,a,!1,null,"9edd5ab6",null),g=f.exports},6216:function(e,t,i){"use strict";i.d(t,{c:function(){return T}});var s,a,n=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vselectOuter"},[t("a17-inputframe",{attrs:{error:e.error,label:e.label,note:e.note,size:e.size,name:e.name,"label-for":e.uniqId,required:e.required,"add-new":e.addNew}},[t("div",{staticClass:"vselect",class:e.vselectClasses},[t("div",{staticClass:"vselect__field"},[t("input",{attrs:{type:"hidden",name:e.name,id:e.uniqId},domProps:{value:e.inputValue}}),t("v-select",{attrs:{multiple:e.multiple,placeholder:e.placeholder,value:e.value,options:e.currentOptions,searchable:e.searchable,selectable:e.selectable,clearSearchOnSelect:e.clearSearchOnSelect,label:e.optionsLabel,taggable:e.taggable,pushTags:e.pushTags,transition:e.transition,requiredValue:e.required,maxHeight:e.maxHeight,disabled:e.disabled},on:{input:e.updateValue,search:e.getOptions}},[t("span",{attrs:{slot:"no-options"},slot:"no-options"},[e._v(e._s(e.emptyText))])])],1)])]),e.addNew?[t("a17-modal-add",{ref:"addModal",attrs:{name:e.name,"form-create":e.addNew,"modal-title":"Add new "+e.label}},[e._t("addModal")],2)]:e._e()],2)},o=[],r=i(3336),l=i.n(r),d=i(1596),c=i.n(d),u={extends:c(),props:{toggleSelectOption:{type:Boolean,default:!1},requiredValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data(){return{mutableValue:this.value}},computed:{showClearButton(){return!1}},methods:{maybeDeleteValue(){if(!this.requiredValue&&!this.$refs.search.value.length&&this.mutableValue)return this.multiple?this.mutableValue.pop():this.mutableValue=null},isOptionSelected(e){return void 0!==this.valueAsArray&&this.valueAsArray.some((t=>"object"===typeof t?this.optionObjectComparator(t,e):t===e||t===e[this.index]))}},mounted(){this.taggable&&this.$emit("search",this.search,this.toggleLoading)}},h=u,p=i(2528),m=(0,p.c)(h,s,a,!1,null,null,null),f=m.exports,g=i(248),_=i(1308),b=i(5272),v=i(4992),y={name:"A17VueSelect",mixins:[v.c,b.c,_.c,g.c],props:{placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},name:{type:String,default:""},transition:{type:String,default:"fade_move_dropdown"},multiple:{type:Boolean,default:!1},taggable:{type:Boolean,default:!1},pushTags:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},selectable:{type:Function,default:e=>{var t;return null===(t=e.selectable)||void 0===t||t}},clearSearchOnSelect:{type:Boolean,default:!0},selected:{default:null},emptyText:{default(){return this.$trans("select.empty-text","Sorry, no matching options.")}},options:{default:function(){return[]}},optionsLabel:{type:String,default:"label"},endpoint:{type:String,default:""},size:{type:String,default:""},required:{type:Boolean,default:!1},maxHeight:{type:String,default:"400px"}},components:{"v-select":f},data:function(){return{value:this.selected,currentOptions:this.options,ajaxUrl:this.endpoint}},watch:{options:function(e){this.currentOptions=this.options}},computed:{uniqId:function(e){return this.name+"-"+this.randKey},inputValue:{get:function(){if(this.value){if(this.multiple){if(Array.isArray(this.value))return"object"===typeof this.value[0]?this.value.map((e=>e.value)):this.value.join(",")}else if("object"===typeof this.value)return this.value.value;return this.value}return""},set:function(e){if(Array.isArray(e))if(this.taggable)this.value=e;else{this.value=[];for(const t in e){const i=this.options.filter((i=>i.value===e[t]));i[0]&&this.value.push(i[0])}}else this.value=this.options.find((t=>"number"===typeof t.value?t.value%1!==0?t.value===parseFloat(e):t.value===parseInt(e):t.value===String(e)))}},vselectClasses:function(){return[this.value?"vselect--has-value":"",this.multiple?"vselect--multiple":"vselect--single","small"===this.size?"vselect--small":"","large"===this.size?"vselect--large":"",this.error?"vselect--error":""]}},methods:{updateFromStore:function(e){this.inputValue=e},isAjax:function(){return""!==this.ajaxUrl},updateValue:function(e){if(this.multiple)this.value=[...new Set(e)];else if(e)this.value=e;else{const e=this.options.find((e=>"all"===e.value));this.value=null!==e&&void 0!==e?e:void 0}this.saveIntoStore(),this.$emit("change",e)},getOptions:l()((function(e,t){if(!this.isAjax())return!0;t(!0),this.$http.get(this.ajaxUrl,{params:{q:e}}).then((e=>{e.data.items&&e.data.items.length&&(this.taggable&&Array.isArray(this.value)?this.currentOptions=e.data.items.filter((e=>!this.value.includes(e))):this.currentOptions=e.data.items),t(!1)}),(function(e){t(!1)}))}),500)}},w=y,E=(0,p.c)(w,n,o,!1,null,null,null),T=E.exports},8898:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return u}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"block",class:e.blockClasses},[t("div",{staticClass:"block__header",on:{dblclick:function(t){return t.preventDefault(),e.toggleExpand()}}},[e.withHandle?t("span",{staticClass:"block__handle"}):e._e(),t("div",{staticClass:"block__toggle"},[e.withMoveDropdown&&e.withActions?t("a17-dropdown",{ref:e.moveDropdown,staticClass:"f--small",attrs:{position:"bottom-left",maxHeight:270}},[t("span",{staticClass:"block__counter f--tiny",on:{click:function(t){return e.$refs[e.moveDropdown].toggle()}}},[e._v(e._s(e.index+1))]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e._t("dropdown-numbers")],2)]):e.withActions?t("span",{staticClass:"block__counter f--tiny"},[e._v(e._s(e.index+1))]):e._e(),t("span",{staticClass:"block__title"},[e._v(e._s(e.blockTitle))])],1),e.withActions?t("div",{staticClass:"block__actions"},[e._t("block-actions"),e.withAddDropdown?t("a17-dropdown",{ref:e.addDropdown,attrs:{position:"bottom-right",maxHeight:430},on:{open:function(t){e.hover=!0},close:function(t){e.hover=!1}}},[t("a17-button",{attrs:{variant:"icon","data-action":""},on:{click:function(t){return e.$refs[e.addDropdown].toggle()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"add"}})]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e._t("dropdown-add")],2)],1):e._e(),t("a17-button",{attrs:{variant:"icon","data-action":"","aria-expanded":e.visible?"true":"false"},on:{click:function(t){return e.toggleExpand()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"expand"}})]),t("a17-dropdown",{ref:e.actionsDropdown,attrs:{position:"bottom-right"},on:{open:function(t){e.hover=!0},close:function(t){e.hover=!1}}},[t("a17-button",{attrs:{variant:"icon"},on:{click:function(t){return e.$refs[e.actionsDropdown].toggle()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"more-dots"}})]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e._t("dropdown-action")],2)],1)],2):e._e()]),e.visible?t("div",{staticClass:"block__content"},[t("".concat(e.block.type),e._b({key:"form_".concat(e.block.type,"_").concat(e.block.id),tag:"component",attrs:{name:e.componentName(e.block.id)}},"component",e.block.attributes,!1)),t("a17-inputframe",{attrs:{size:"small",label:"",name:"block.".concat(e.block.id)}})],1):e._e()])},a=[],n=i(6036),o=i(8884),r={name:"A17BlockEditorItem",props:{index:{type:Number,default:0},opened:{type:Boolean,default:!0},size:{type:String,default:""},block:{type:Object,default:()=>{}},withHandle:{type:Boolean,default:!0},withActions:{type:Boolean,default:!0}},data(){return{visible:!1,hover:!1,withMoveDropdown:!0,withAddDropdown:!0}},filters:o.c,computed:{titleFieldValue:function(){const e=this.blockFieldValue(this.block.titleField);return e?"object"===typeof e?e[this.currentLocale.value]:e:null},blockTitle:function(){const e=this.block.title||"",t=this.titleFieldValue||"",i=e&&t?" — ":"";let s;s=this.block.hideTitlePrefix?"".concat(t):"".concat(e).concat(i).concat(t);const a=document.createElement("div");return a.innerHTML=s,a.innerText},blockClasses(){return[this.visible?"block--open":"",this.hover?"block--focus":"",this.size?"block--".concat(this.size):""]},moveDropdown(){return"moveBlock".concat(this.index,"Dropdown")},actionsDropdown(){return"action".concat(this.block.id,"Dropdown")},addDropdown(){return"add".concat(this.block.id,"Dropdown")},...(0,n.ys)({currentLocale:e=>e.language.active}),...(0,n.gV)(["fieldValueByName"])},watch:{opened(){this.visible=this.opened}},created(){this.block.ui&&this.block.ui.isNew&&this.toggleExpand()},methods:{toggleExpand(){this.visible=!this.visible},componentName(e){return"blocks["+e+"]"},blockFieldName:function(e){return e?"blocks[".concat(this.block.id,"][").concat(e,"]"):""},blockFieldValue:function(e){if(!e)return null;const t=this.blockFieldName(e);return this.fieldValueByName(t)}},beforeMount(){this.$slots["dropdown-numbers"]||(this.withMoveDropdown=!1),this.$slots["dropdown-add"]||(this.withAddDropdown=!1)}},l=r,d=i(2528),c=(0,d.c)(l,s,a,!1,null,"5833e5ec",null),u=c.exports},3436:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return c}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"block__body"},[t("a17-inputframe",{attrs:{label:"Image",name:"medias.image"}},[t("a17-mediafield",{attrs:{name:e.fieldName("image"),"crop-context":"image"}})],1)],1)},a=[],n=i(580),o={name:"A17Image",mixins:[n.c]},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,null,null),c=d.exports},9980:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return c}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"block__body"},[t("a17-wysiwyg-tiptap",{attrs:{name:e.fieldName("html"),label:"Body",options:{modules:{toolbar:["table"],syntax:!1}},placeholder:"Insert your table",editSource:"true",inStore:"value"}})],1)},a=[],n=i(580),o={name:"A17Bodytable",mixins:[n.c]},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,null,null),c=d.exports},488:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return c}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"block__body"},[t("a17-locale",{attrs:{type:"a17-textfield",attributes:{label:"Title",name:e.fieldName("text"),type:"text",maxlength:250,inStore:"value"}}})],1)},a=[],n=i(580),o={name:"A17Title",mixins:[n.c]},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,null,null),c=d.exports},7626:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return c}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"block__body"},[t("a17-wysiwyg",{attrs:{name:e.fieldName("html"),inStore:"value"}})],1)},a=[],n=i(580),o={name:"A17Bodytext",mixins:[n.c]},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,null,null),c=d.exports},1e3:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return g}});var s=function(){var e=this,t=e._self._c;return t("a17-blocks-list",{attrs:{"editor-name":e.editorName},scopedSlots:e._u([{key:"default",fn:function(i){let{savedBlocks:s,availableBlocks:a,moveBlock:n,moveBlockToEditor:o,cloneBlock:r}=i;return[t("div",{staticClass:"blocks"},[t("draggable",e._b({staticClass:"blocks__container",attrs:{value:s,group:"blocks",move:e.handleOnMove},on:{end:function(t){return e.handleOnEnd(n,o)}}},"draggable",e.dragOptions,!1),[t("transition-group",{attrs:{name:"draggable_list",tag:"div"}},e._l(s,(function(i){return t("div",{key:i.id,staticClass:"blocks__item"},[t("a17-blockeditor-model",{attrs:{"editor-name":e.editorName,block:i},scopedSlots:e._u([{key:"default",fn:function(i){let{block:n,blockIndex:o,add:l,edit:d,move:c,remove:u,duplicate:h}=i;return[a.length?t("a17-blockeditor-item",{ref:"blockList",refInFor:!0,attrs:{block:n,index:o,opened:e.opened,"with-handle":!e.isSettings,"with-actions":!e.isSettings},on:{expand:e.setOpened}},[e._l(a,(function(i){return[t("button",{key:i.component,staticClass:"blocks__addButton",attrs:{slot:"dropdown-add",type:"button"},on:{click:function(t){return e.handleBlockAdd(l,i,o+1)}},slot:"dropdown-add"},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],staticClass:"blocks__icon",attrs:{symbol:i.icon}}),t("span",{staticClass:"blocks__title"},[e._v(e._s(i.title))])])]})),t("div",{attrs:{slot:"dropdown-action"},slot:"dropdown-action"},[e.opened?t("button",{attrs:{type:"button"},on:{click:function(t){return e.collapseAllBlocks()}}},[e._v(" "+e._s(e.$trans("fields.block-editor.collapse-all","Collapse all"))+" ")]):t("button",{attrs:{type:"button"},on:{click:function(t){return e.expandAllBlocks()}}},[e._v(" "+e._s(e.$trans("fields.block-editor.expand-all","Expand all"))+" ")]),e.editor&&!e.editorName.includes("|")?t("button",{attrs:{type:"button"},on:{click:function(t){return e.openInEditor(d,o,e.editorName)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.open-in-editor","Open in editor"))+" ")]):e._e(),t("button",{attrs:{type:"button"},on:{click:function(t){return e.handleClone(r,o,n)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.clone-block","Clone block"))+" ")]),t("button",{attrs:{type:"button"},on:{click:function(t){return e.handleDuplicateBlock(h)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.create-another","Create another"))+" ")]),t("button",{attrs:{type:"button"},on:{click:function(t){return e.handleDeleteBlock(u)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.delete","Delete"))+" ")])]),e._l(s.length,(function(i){return t("button",{key:i,attrs:{slot:"dropdown-numbers",type:"button"},on:{click:function(e){return c(i-1)}},slot:"dropdown-numbers"},[e._v(e._s(i)+" ")])}))],2):e._e()]}}],null,!0)})],1)})),0)],1),e.isSettings?e._e():t("div",{staticClass:"blocks__actions"},[a.length?t("a17-dropdown",{ref:"blocksDropdown",attrs:{position:"top-center",arrow:!0,offset:10,maxHeight:430}},[t("a17-button",{attrs:{size:"small",variant:"action"},on:{click:function(t){return e.$refs.blocksDropdown.toggle()}}},[e._v(e._s(e.trigger)+" ")]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e._l(a,(function(i){return[t("a17-blockeditor-model",{key:i.component,attrs:{"editor-name":e.editorName,block:i},scopedSlots:e._u([{key:"default",fn:function(s){let{add:a,block:n}=s;return[t("button",{key:i.component,staticClass:"blocks__addButton",attrs:{type:"button"},on:{click:function(t){return e.handleBlockAdd(a,n)}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],staticClass:"blocks__icon",attrs:{symbol:i.icon}}),t("span",{staticClass:"blocks__title"},[e._v(e._s(i.title))])])]}}],null,!0)})]}))],2)],1):e._e(),e.editorName.includes("|")?e._e():t("div",{staticClass:"blocks__secondaryActions"},[e.editor?t("a",{staticClass:"f--link f--link-underlined--o",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.openEditor(-1,e.editorName)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.open-in-editor","Open in editor"))+" ")]):e._e()])],1)],1)]}}])})},a=[],n=i(7052),o=i.n(n),r=i(6036),l=i(8898),d=i(296),c=i(6799),u=i(5522),h={name:"A17Blocks",components:{"a17-blockeditor-item":l["default"],"a17-blockeditor-model":d["default"],"a17-blocks-list":c["default"],draggable:o()},mixins:[u.Eh,u.y_],props:{trigger:{type:String,default:""},isSettings:{type:Boolean,required:!0},title:{type:String,default:""},editorName:{type:String,required:!0}},data(){return{opened:!0,handle:".block__handle"}},computed:{...(0,r.ys)({editor:e=>e.blocks.editor,editorNames:e=>e.blocks.editorNames}),...(0,r.gV)(["blocks","fieldsByBlockId","availableBlocks"])},methods:{setOpened:function(){const e=this.$refs.blockList&&this.$refs.blockList.every((e=>!e.visible));e&&(this.opened=!1)},collapseAllBlocks:function(){this.opened=!1},expandAllBlocks:function(){this.opened=!0},checkExpandBlocks(){void 0!==this.$refs.blockList[this.$refs.blockList.length-1]&&this.$refs.blockList[this.$refs.blockList.length-1].toggleExpand()},handleOnMove(e){const{draggedContext:t,relatedContext:i}=e,{index:s,element:a,futureIndex:n}=t,{element:o}=i;this.nextMove={block:a,editorName:o.name,newIndex:n,index:s}},handleOnEnd(e,t){if(!this.nextMove)return;const{block:i,editorName:s,newIndex:a,index:n}=this.nextMove;i.name!==s?this.checkIfBlockTypeIsAvailable(s,i.type)&&t&&t(i,s,n,a):e&&e({oldIndex:n,newIndex:a})},handleClone(e,t,i){e&&e({block:i,index:t+1}),this.$nextTick((()=>{this.checkExpandBlocks()}))},handleBlockAdd(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;e(t,i),this.$nextTick((()=>{this.checkExpandBlocks()}))},handleDuplicateBlock(e,t){e(t),this.$nextTick((()=>{this.checkExpandBlocks()}))},handleDeleteBlock(e,t){this.$root.$refs.warningContentEditor?this.$root.$refs.warningContentEditor.open((()=>{e(t),this.$nextTick((()=>{this.checkExpandBlocks()}))})):(e(t),this.$nextTick((()=>{this.checkExpandBlocks()})))},checkIfBlockTypeIsAvailable(e,t){const i=JSON.parse(JSON.stringify(this.availableBlocks(e))),s=i.map((e=>e.component));return-1!==s.indexOf(t)},openInEditor(e,t,i){e(),this.openEditor(t,i)}},mounted(){this.$nextTick((function(){this.$refs.blockList&&this.blocks(this.editorName)&&this.blocks(this.editorName).length<4&&this.$refs.blockList.forEach((e=>e.toggleExpand())),this.setOpened()}))}},p=h,m=i(2528),f=(0,m.c)(p,s,a,!1,null,"1f78636a",null),g=f.exports},6836:function(e,t,i){"use strict";i.d(t,{c:function(){return c}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"modalValidation"},[t("a17-inputframe",["create"===e.mode?[t("a17-button",{attrs:{type:"submit",name:"create",variant:"validate",disabled:e.isDisabled}},[e._v(e._s(e.$trans("modal.create.button","Create")))]),e.isDisabled?e._e():t("a17-button",{attrs:{type:"submit",name:"create-another",variant:"aslink-grey"},nativeOn:{click:function(e){return e.currentTarget.focus()}}},[t("span",[e._v(e._s(e.$trans("modal.create.create-another","Create and add another")))])])]:"update"===e.mode?t("a17-button",{attrs:{type:"submit",name:"update",variant:"validate",disabled:e.isDisabled}},[e._v(e._s(e.$trans("modal.update.button","Update")))]):t("a17-button",{attrs:{type:"submit",name:"done",variant:"validate",disabled:e.isDisabled}},[e._v(e._s(e.$trans("modal.done.button","Done")))])],2),e.activePublishState?t("label",{staticClass:"switcher__button",class:e.switcherClasses,attrs:{for:e.publishedName}},[e.isChecked?t("span",{staticClass:"switcher__label"},[e._v(e._s(e.textEnabled))]):e._e(),e.isChecked?e._e():t("span",{staticClass:"switcher__label"},[e._v(e._s(e.textDisabled))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.published,expression:"published"}],attrs:{type:"checkbox",disabled:e.disabled,name:e.publishedName,id:e.publishedName},domProps:{value:1,checked:Array.isArray(e.published)?e._i(e.published,1)>-1:e.published},on:{change:function(t){var i=e.published,s=t.target,a=!!s.checked;if(Array.isArray(i)){var n=1,o=e._i(i,n);s.checked?o<0&&(e.published=i.concat([n])):o>-1&&(e.published=i.slice(0,o).concat(i.slice(o+1)))}else e.published=a}}}),t("span",{staticClass:"switcher__switcher"})]):e._e()],1)},a=[],n=i(624),o={name:"A17ModalValidationButtons",props:{publishedName:{type:String,required:!1},disabled:{type:Boolean,default:!1},activePublishState:{type:Boolean,default:!1},isPublish:{type:Boolean,default:!1},isDisable:{type:Boolean,default:!1},mode:{type:String,default:"create"},textEnabled:{type:String,default:"Live"},textDisabled:{type:String,default:"Draft"}},data:function(){return{fields:!1,isDisabled:this.isDisable,published:this.isPublish}},watch:{published:function(e){this.$store.commit(n.tt.UPDATE_FORM_FIELD,{name:"published",value:e})}},computed:{switcherClasses:function(){return[this.isChecked?"switcher--active":""]},isChecked:function(){return this.published},checkedValue:{get:function(){return this.published},set:function(e){this.published=e}}},methods:{addListeners(){this.$nextTick((()=>{this.fields.forEach((e=>{e.removeEventListener("input",this.disable)})),this.fields=[...this.$parent.$el.querySelectorAll("input, textarea, select")],this.fields.forEach((e=>{e.addEventListener("input",(()=>{this.disable()}))}))}))},disable:function(){if(!this.fields)return this.isDisabled=!0,void this.$emit("disable",!0);const e=this.fields.filter((e=>e.getAttribute("required")));if(0===e.length)return this.isDisabled=!1,void this.$emit("disable",!1);const t=e.filter((function(e){return e.value.length>0}));if(t.length===e.length)return this.isDisabled=!1,void this.$emit("disable",!1);this.isDisabled=!0,this.$emit("disable",!0)}},mounted:function(){const e=this;this.fields=[...this.$parent.$el.querySelectorAll("input, textarea, select")],e.disable(),this.fields.length&&this.addListeners()},beforeDestroy:function(){const e=this;this.fields.length&&this.fields.forEach((function(t){t.removeEventListener("input",e.disable)}))}},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,"376dc8cc",null),c=d.exports},7980:function(e,t,i){"use strict";i.d(t,{c:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"paginate"},[t("p",{staticClass:"paginate__offset f--small"},[e._v(" "+e._s(e.$trans("listing.paginate.rows-per-page"))+" "),e.availableOffsets.length>1?[t("a17-dropdown",{ref:"paginateDropdown",attrs:{position:"bottom-right"}},[t("button",{staticClass:"paginate__button",on:{click:function(t){return e.$refs.paginateDropdown.toggle()}}},[e._v(e._s(e.newOffset))]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},e._l(e.availableOffsets,(function(i){return t("button",{key:i,class:{dropdown__active:i===e.newOffset},attrs:{type:"button"},on:{click:function(t){return e.changeOffset(i)}}},[e._v(e._s(i))])})),0)])]:[e._v(" "+e._s(e.newOffset)+" ")]],2),e.max>1?t("div",{staticClass:"paginate__pages"},[t("p",{staticClass:"paginate__current f--small"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.newPageFormat,expression:"newPageFormat"}],staticClass:"form__input paginate__input",attrs:{type:"number",maxlength:"4"},domProps:{value:e.newPageFormat},on:{blur:e.formatPage,input:function(t){t.target.composing||(e.newPageFormat=t.target.value)}}}),e._v(" of "+e._s(e.max))]),t("button",{staticClass:"paginate__prev",attrs:{type:"button",disabled:e.value<=e.min},on:{click:e.previousPage}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"pagination_left"}})]),t("button",{staticClass:"paginate__next",attrs:{type:"button",disabled:e.value>=e.max},on:{click:e.nextPage}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"pagination_right"}})])]):e._e()])},a=[],n={name:"A17Paginate",props:{value:{type:Number,required:!0},offset:{type:Number,default:60},availableOffsets:{type:Array,default:function(){return[]}},min:{type:Number,default:1},max:{type:Number,required:!0}},data(){return{newOffset:this.offset}},computed:{newPageFormat:{get:function(){return this.value},set:function(e){return parseInt(e)}}},methods:{formatPage:function(e){let t=e.target.value;t=""!==t?parseInt(t):1,t>this.max&&(t=this.max),t<1&&(t=1),e.target.value=t,t!==this.value&&this.$emit("changePage",t)},changeOffset:function(e){this.newOffset=e,this.$emit("changeOffset",parseInt(this.newOffset))},previousPage:function(){this.$emit("changePage",parseInt(this.value-1))},nextPage:function(){this.$emit("changePage",parseInt(this.value+1))}}},o=n,r=i(2528),l=(0,r.c)(o,s,a,!1,null,"7a3996c9",null),d=l.exports},7124:function(e,t,i){"use strict";var s=i(1448);const a=function(){const e=document.querySelectorAll("[data-medialib-btn]");function t(){window["TWILL"].vm&&window["TWILL"].vm.openFreeMediaLibrary()}e.length&&(0,s.c)(e,(function(e){e.addEventListener("click",(function(i){i.preventDefault(),t(),e.blur()}))}))};t.c=a},296:function(e,t,i){"use strict";i.r(t);var s=i(6036),a=i(7632),n=i(624);t["default"]={props:{block:{type:Object},editorName:{type:String,required:!0}},computed:{blockIndex(){return this.block?this.getBlockIndex(this.block,this.editorName):0},isActive(){return!!(this.block&&Object.keys(this.activeBlock).length>0)&&this.block.id===this.activeBlock.id},...(0,s.ys)({activeBlock:e=>e.blocks.active}),...(0,s.gV)({getBlockIndex:"blockIndex"})},methods:{add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;this.$store.commit(n.GC.ADD_BLOCK,{editorName:this.editorName,block:{id:this.setBlockID(),title:e.title,type:e.component,icon:e.icon,attributes:e.attributes},index:t})},edit(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.blockIndex;this.$store.commit(n.GC.ACTIVATE_BLOCK,{editorName:this.editorName,index:e})},unEdit(){this.$store.commit(n.GC.ACTIVATE_BLOCK,{editorName:this.editorName,index:-1})},move(e){this.blockIndex!==e&&this.$store.commit(n.GC.MOVE_BLOCK,{editorName:this.editorName,oldIndex:this.blockIndex,newIndex:e})},duplicate(){const e=Object.assign({},this.block);this.$store.commit(n.GC.DUPLICATE_BLOCK,{editorName:this.editorName,index:this.blockIndex,block:e,id:this.setBlockID()})},remove(){this.unEdit(),this.$store.commit(n.GC.DELETE_BLOCK,{editorName:this.editorName,index:this.blockIndex})},cloneBlock(){this.$store.dispatch(a.cp.DUPLICATE_BLOCK,{editorName:this.editorName,futureIndex:this.blockIndex+1,block:this.block,id:Date.now()+Math.floor(1e3*Math.random())})},setBlockID(){return Date.now()+Math.floor(1e3*Math.random())}},render(){return this.$scopedSlots.default({block:this.block,blockIndex:this.blockIndex,add:this.add,edit:this.edit,unEdit:this.unEdit,isActive:this.isActive,remove:this.remove,move:this.move,duplicate:this.duplicate,cloneBlock:this.cloneBlock})}}},6799:function(e,t,i){"use strict";i.r(t);var s=i(6036),a=i(7632),n=i(624);t["default"]={props:{editorName:{type:String,required:!0}},computed:{availableBlocks(){const e=this.editorName.split("|"),t=e[e.length-1];return this.getAvailableBlocks(t)},savedBlocks(){return this.blocks(this.editorName)},allSavedBlocks(){return this.used&&Object.keys(this.used).reduce(((e,t)=>e.concat(this.used[t])),[])},hasBlockActive(){return Object.keys(this.activeBlock).length>0},...(0,s.ys)({activeBlock:e=>e.blocks.active,used:e=>e.blocks.blocks,editorNames:e=>e.blocks.editorNames}),...(0,s.gV)({getAvailableBlocks:"availableBlocks",blocks:"blocks"})},methods:{reorderBlocks(e){this.$store.commit(n.GC.REORDER_BLOCKS,{editorName:this.editorName,value:e})},addBlock(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.$store.commit(n.GC.ADD_BLOCK,{editorName:t,block:{...e,type:e.type||e.component},index:i})},moveBlock(e){let{oldIndex:t,newIndex:i}=e;this.$store.commit(n.GC.MOVE_BLOCK,{editorName:this.editorName,oldIndex:t,newIndex:i})},moveBlockToEditor(e,t,i,s){this.$store.dispatch(a.cp.MOVE_BLOCK_TO_EDITOR,{block:e,editorName:t,index:i,futureIndex:s,id:Date.now()+Math.floor(1e3*Math.random())})},cloneBlock(e){let{block:t,index:i}=e;this.$store.dispatch(a.cp.DUPLICATE_BLOCK,{editorName:this.editorName,futureIndex:i,block:t,id:Date.now()+Math.floor(1e3*Math.random())})}},render(){return this.$scopedSlots.default({availableBlocks:this.availableBlocks,savedBlocks:this.savedBlocks,reorderBlocks:this.reorderBlocks,moveBlock:this.moveBlock,editorNames:this.editorNames,hasBlockActive:this.hasBlockActive,allSavedBlocks:this.allSavedBlocks,activeBlock:this.activeBlock,addBlock:this.addBlock,moveBlockToEditor:this.moveBlockToEditor,cloneBlock:this.cloneBlock})}}},4532:function(e,t,i){"use strict";i.d(t,{q_:function(){return Se},oD:function(){return Ee},G_:function(){return we},cp:function(){return Oe}});var s=function(){var e=this,t=e._self._c;return t("a17-dropdown",{ref:"rowSetupDropdown",attrs:{position:"bottom-right",fixed:!0}},[t("a17-button",{attrs:{variant:"icon"},on:{click:function(t){return e.$refs.rowSetupDropdown.toggle()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"more-dots"}})]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e.row.hasOwnProperty("permalink")?t("a",{attrs:{href:e.row["permalink"],target:"_blank"}},[e._v("View permalink")]):e._e(),e.row.hasOwnProperty("edit")&&!e.row.hasOwnProperty("deleted")&&e.row["edit"]?t("a",{attrs:{href:e.editUrl},on:{click:function(t){return e.preventEditInPlace(t)}}},[e._v(e._s(e.$trans("listing.dropdown.edit","Edit")))]):e._e(),e.row.hasOwnProperty("published")&&!e.row.hasOwnProperty("deleted")?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.update("published")}}},[e._v(e._s(e.row["published"]?e.$trans("listing.dropdown.unpublish","Unpublish"):e.$trans("listing.dropdown.publish","Publish")))]):e._e(),e.row.hasOwnProperty("featured")&&!e.row.hasOwnProperty("deleted")?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.update("featured")}}},[e._v(e._s(e.row["featured"]?e.$trans("listing.dropdown.unfeature","Unfeature"):e.$trans("listing.dropdown.feature","Feature")))]):e._e(),e.row.duplicate&&!e.row.hasOwnProperty("deleted")?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.duplicateRow.apply(null,arguments)}}},[e._v(e._s(e.$trans("listing.dropdown.duplicate","Duplicate")))]):e._e(),e.row.hasOwnProperty("deleted")?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.restoreRow.apply(null,arguments)}}},[e._v(e._s(e.$trans("listing.dropdown.restore","Restore")))]):e._e(),e.row.hasOwnProperty("deleted")&&e.row.hasOwnProperty("destroyable")?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.destroyRow.apply(null,arguments)}}},[e._v(e._s(e.$trans("listing.dropdown.destroy","Destroy")))]):e.row.delete&&!e.row.hasOwnProperty("deleted")?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.deleteRow.apply(null,arguments)}}},[e._v(e._s(e.$trans("listing.dropdown.delete","Delete")))]):e._e()])],1)},a=[],n=i(4768),o={name:"TableCellActions",mixins:[n.c],methods:{update:function(e){this.$emit("update",{row:this.row,col:e})}}},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,"13effc32",null),c=d.exports,u=function(){var e=this,t=e._self._c;return t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.toggleBulk.apply(null,arguments)}}},[t("a17-checkbox",{attrs:{name:"bulkEdit",value:e.value,initialValue:e.initialValue}})],1)},h=[],p={name:"A17TableCellBulk",mixins:[n.c],components:{},props:{value:{type:Number,required:!0},initialValue:{type:Array,required:!0}},methods:{toggleBulk:function(){this.update()}}},m=p,f=(0,l.c)(m,u,h,!1,null,"39bc7724",null),g=f.exports,_=function(){var e=this,t=e._self._c;return t("span",[e.formatDateLabel.length>0?t("span",{staticClass:"tablecell__datePub",class:{"s--expired":e.formatDateLabel===e.textExpired}},[e._v(" "+e._s(e._f("formatDatatableDate")(e.startDate))+" "),e.endDate?[e._v("- "+e._s(e._f("formatDatatableDate")(e.endDate)))]:e._e(),t("br"),t("span",[e._v(e._s(e.formatDateLabel))])],2):t("span",[e.startDate?[e._v(" "+e._s(e._f("formatDatatableDate")(e.startDate))+" ")]:[e._v(" — ")]],2)])},b=[],v=i(2360),y=i.n(v),w=i(8884),E={name:"A17TableCellDates",mixins:[n.c],data(){return{textExpired:this.$trans("publisher.expired"),textScheduled:this.$trans("publisher.scheduled")}},computed:{formatDateLabel:function(){let e="";const t=y()(this.startDate,new Date),i=this.endDate?y()(this.endDate,new Date):1;return this.startDate&&i<0?e=this.textExpired:t>0&&(e=this.textScheduled),e},startDate:function(){return this.row.hasOwnProperty("publish_start_date")?this.row.publish_start_date:""},endDate:function(){return this.row.hasOwnProperty("publish_end_date")?this.row.publish_end_date:""}},filters:w.c},T=E,k=(0,l.c)(T,_,b,!1,null,"01c55ed4",null),C=k.exports,A=function(e,t){return e("span",{staticClass:"tablecell__handle"})},x=[],S={name:"A17TableCellDraggable",mixins:[n.c]},L=S,D=(0,l.c)(L,A,x,!0,null,"5e2e3a3a",null),M=D.exports,I=function(){var e=this,t=e._self._c;return e.row.hasOwnProperty("featured")?t("span",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"tablecell__feature",class:{"tablecell__feature--active":e.row[e.colName]},attrs:{"data-tooltip-title":e.row.featured?"Unfeature":"Feature"},on:{click:function(t){return t.preventDefault(),e.toggleFeatured.apply(null,arguments)}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"star-feature_active"}}),t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"star-feature"}})]):e._e()},O=[],P={name:"A17TableCellFeatured",mixins:[n.c],methods:{toggleFeatured:function(){this.update()}}},B=P,R=(0,l.c)(B,I,O,!1,null,"4b9e917c",null),N=R.exports,F=function(){var e=this,t=e._self._c;return e.col.hasOwnProperty("html")?t("a17-table-cell-html",e._b({on:{update:e.update,editInPlace:e.editInPlace}},"a17-table-cell-html",e.childProps,!1)):t("span",[e._v(e._s(e.row[e.colName]))])},$=[],U=function(){var e=this,t=e._self._c;return t("span",{ref:"cell",staticClass:"tablecell__raw",domProps:{innerHTML:e._s(e.row[e.colName])}})},V=[],q={name:"A1TableCellHtml",mixins:[n.c],mounted(){const e=this.$refs.cell.querySelector('a[data-edit="true"]');e&&e.addEventListener("click",this.preventEditInPlace)}},W=q,H=(0,l.c)(W,U,V,!1,null,null,null),z=H.exports,K={name:"A17TableCellGeneric",mixins:[n.c],computed:{childProps:function(){return this.$props}},components:{"a17-table-cell-html":z}},j=K,G=(0,l.c)(j,F,$,!1,null,"5babcbdd",null),Y=G.exports,X=function(){var e=this,t=e._self._c;return t("span",[e._l(e.displayedLanguages,(function(i){return t("a",{key:i.value,staticClass:"tag tag--disabled",class:{"tag--enabled":i.published},attrs:{href:e.editWithLanguage(i)},on:{click:function(t){return e.editInPlace(t,i)}}},[e._v(" "+e._s(i.shortlabel)+" ")])})),e.languages.length>4?t("a",{staticClass:"more__languages f--small",attrs:{href:e.editWithLanguage(e.languages[0])},on:{click:function(t){return e.editInPlace(t,e.languages[0])}}},[e._v(" + "+e._s(e.languages.length-4)+" more ")]):e._e()],2)},J=[],Q={name:"A17TableCellLanguages",mixins:[n.c],props:{languages:{type:Array,default:function(){return[]}}},computed:{displayedLanguages:function(){return this.languages.slice(0,4)}},methods:{editWithLanguage:function(e){const t={};return t.lang=e.value,this.editWithQuery(t)},editWithQuery:function(e){const t=[];for(const s in e)e.hasOwnProperty(s)&&t.push(encodeURIComponent(s)+"="+encodeURIComponent(e[s]));const i=t.length?"?"+t.join("&"):"";return"#"!==this.editUrl?this.editUrl+i:this.editUrl},editInPlace:function(e,t){this.$emit("editInPlace",e,t)}}},Z=Q,ee=(0,l.c)(Z,X,J,!1,null,"9ab54676",null),te=ee.exports,ie=function(){var e=this,t=e._self._c;return t("span",{staticClass:"tablecell__nested-depth",style:e.cellWidth})},se=[],ae={name:"A17TableCellNested",mixins:[n.c],props:{depth:{type:Number,default:0},offset:{type:Number,default:0}},computed:{cellWidth(){return this.depth>0?{width:80*this.depth-20-this.offset+"px"}:""}}},ne=ae,oe=(0,l.c)(ne,ie,se,!1,null,"20294257",null),re=oe.exports,le=function(){var e=this,t=e._self._c;return e.row.hasOwnProperty("published")?t("span",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"tablecell__pubstate",class:{"tablecell__pubstate--live":e.row[e.colName]},attrs:{"data-tooltip-title":e.row.published?"Unpublish":"Publish"},on:{click:function(t){return t.preventDefault(),e.togglePublish.apply(null,arguments)}}}):e._e()},de=[],ce={name:"A17TableCellPublished",mixins:[n.c],methods:{togglePublish:function(){this.update()}}},ue=ce,he=(0,l.c)(ue,le,de,!1,null,"120b42fa",null),pe=he.exports,me=function(){var e=this,t=e._self._c;return t("div",{class:e.getThumbClasses},[t("a",{attrs:{href:!e.row.hasOwnProperty("deleted")&&e.editUrl},on:{click:function(t){!e.row.hasOwnProperty("deleted")&&e.preventEditInPlace(t)}}},["rounded"===e.col.variation?[t("a17-avatar",{attrs:{name:e.rowTitle,thumbnail:e.row[e.colName]}})]:[t("img",{attrs:{src:e.row[e.colName]}})]],2)])},fe=[],ge=i(8754),_e={name:"A17TableCellThumbNail",mixins:[n.c],components:{"a17-avatar":ge.c},computed:{rowTitle(){var e,t;return null!==(e=null!==(t=this.row.name)&&void 0!==t?t:this.row.title.replace(/<[^>]*>?/gm,""))&&void 0!==e?e:""},getThumbClasses(){return["tablecell__thumb",this.col.variation?"tablecell__thumb--".concat(this.col.variation):""]}}},be=_e,ve=(0,l.c)(be,me,fe,!1,null,"3311a7fc",null),ye=ve.exports;const we=["draggable","bulk","languages","featured","published","thumbnail","publish_start_date","nested"],Ee="a17-table-cell-",Te=c,ke=g,Ce=C,Ae=N,xe=M,Se=te,Le=pe,De=Y,Me=re,Ie=ye;var Oe={[Ee+"actions"]:Te,[Ee+"bulk"]:ke,[Ee+"publish_start_date"]:Ce,[Ee+"featured"]:Ae,[Ee+"draggable"]:xe,[Ee+"generic"]:De,[Ee+"languages"]:Se,[Ee+"published"]:Le,[Ee+"nested"]:Me,[Ee+"thumbnail"]:Ie}},9824:function(e,t,i){"use strict";var s=i(9016),a=i(580);const n=(e,t)=>!s["default"].options.components[e]&&s["default"].component(e,t),o=()=>{"undefined"!==typeof window["TWILL"].TWILL_BLOCKS_COMPONENTS&&window["TWILL"].TWILL_BLOCKS_COMPONENTS.map((e=>n(e,{template:"#"+e,mixins:[a.c]})));const e=e=>"a17-".concat(e.match(/\w+/)[0].replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()),t=i(4836);t.keys().map((i=>{const s=e(i.replace(/customs\//,""));return n(s,t(i).default)}));const o=i(9628);o.keys().map((t=>{const i=e(t);return n(i,o(t).default)}));const r=i(4628);r.keys().map((t=>{const i=e(t);return s["default"].component(i,r(t).default)}));const l=i(9924);l.keys().map((t=>{const i=e(t);return s["default"].component(i,l(t).default)}))};t.c=o},6760:function(e,t,i){"use strict";i.d(t,{c:function(){return A}});var s=i(9016),a=i(3948),n=function(){var e=this,t=e._self._c;return t("div",{staticClass:"container search",class:{"search--dashboard":"dashboard"===e.type}},["dashboard"===e.type?t("transition",{attrs:{name:"fade_search-overlay"}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.readyToShowResult,expression:"readyToShowResult"}],staticClass:"search__overlay",on:{click:e.toggleSearch}})]):e._e(),t("div",{staticClass:"search__input"},[t("input",{ref:"search",staticClass:"form__input",attrs:{type:"search",name:"search",autocomplete:"off",placeholder:e.placeholder},on:{input:e.onSearchInput}}),t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"search"}})]),t("transition",{attrs:{name:"fade_search-overlay"}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.readyToShowResult,expression:"readyToShowResult"}],staticClass:"search__results"},[t("ul",[e._l(e.searchResults,(function(i){return t("li",{key:i.id},[t("a",{staticClass:"search__result",attrs:{href:i.href}},[t("div",{staticClass:"search__cell search__cell--thumb hide--xsmall"},[t("figure",{staticClass:"search__thumb"},[t("img",{attrs:{src:i.thumbnail}})])]),t("div",{staticClass:"search__cell search__cell--pubstate hide--xsmall"},[t("span",{staticClass:"search__pubstate",class:{"search__pubstate--live":i.published}})]),t("div",{staticClass:"search__cell"},[t("span",{staticClass:"search__title"},[e._v(e._s(i.title))]),i.date?t("p",{staticClass:"f--note"},[e._v(" "+e._s(i.activity)+" "),t("timeago",{attrs:{"auto-update":1,datetime:new Date(i.date)}}),e._v(" by "+e._s(i.author)+" "),t("span",{staticClass:"search__type"},[e._v(e._s(i.type))])],1):e._e()])])])})),t("li",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],staticClass:"search__no-result"},[e._v(" "+e._s(e.$trans("dashboard.search.loading","Loading…"))+" ")]),t("li",{directives:[{name:"show",rawName:"v-show",value:e.readyToShowResult&&!e.searchResults.length&&!e.loading,expression:"readyToShowResult && !searchResults.length && !loading"}],staticClass:"search__no-result"},[e._v(" "+e._s(e.$trans("dashboard.search.no-result","No results found."))+" ")])],2)])])],1)},o=[],r=i(9899),l=i.n(r),d=i(3336),c=i.n(d),u=i(400);const h=document.documentElement,p=[u.c.search,u.c.overlay],m=l().CancelToken;let f=m.source();const g=document.querySelector(".header .header__title > a");let _;var b={name:"A17Search",props:{open:{type:Boolean,default:!1},opened:{type:Boolean,default:!1},placeholder:{type:String,default(){return this.$trans("dashboard.search-placeholder","Search everything…")}},endpoint:{type:String,default:null},type:{type:String,default:"header"}},data:function(){return{searchValue:"",loading:!1,readyToShowResult:!1,searchResults:[]}},watch:{open:function(){this.toggleSearch()},opened:function(){this.opened&&(_=this.$refs.search,_.focus())}},methods:{toggleSearch:function(){p.forEach((e=>{h.classList.toggle(e)})),this.open?document.addEventListener("keydown",this.handleKeyDown,!1):(this.$refs.search.blur(),this.searchResults=[],this.searchValue="",this.readyToShowResult=!1,document.removeEventListener("keydown",this.handleKeyDown,!1))},handleKeyDown:function(e){e.keyCode&&9===e.keyCode&&(e.shiftKey?document.activeElement.isEqualNode(g)&&(_.focus(),e.preventDefault()):document.activeElement.isEqualNode(_)&&(g.focus(),e.preventDefault()))},setLastFocusElement:function(){const e=this.searchResults.length;e?setTimeout((function(){_=document.querySelectorAll(".search__result")[e-1]}),1):_=this.$refs.search},fetchSearchResults:function(){const e=this,t={search:this.searchValue};this.loading?(f.cancel(),f=m.source()):this.loading=!0,this.readyToShowResult=!0,this.$http.get(this.endpoint,{params:t,cancelToken:f.token}).then((function(t){e.searchResults=t.data,e.loading=!1,e.setLastFocusElement()}),(function(t){l().isCancel(t)||(e.loading=!1)}))},onSearchInput:c()((function(e){this.searchValue=e.target.value,this.searchValue&&this.searchValue.length>0?("dashboard"===this.type&&p.forEach((e=>{h.classList.add(e)})),this.fetchSearchResults()):("dashboard"===this.type&&p.forEach((e=>{h.classList.remove(e)})),this.readyToShowResult=!1,this.searchResults=[],this.setLastFocusElement())}),300)}},v=b,y=i(2528),w=(0,y.c)(v,n,o,!1,null,"2e1cd2e2",null),E=w.exports;s["default"].use(a.c);const T="searchApp",k={el:"#searchApp",components:{"a17-search":E},props:{topSpacing:{type:Number,default:60}},data:function(){return{open:!1,opened:!1,top:this.topSpacing}},computed:{positionStyle:function(){return{top:this.top+"px"}}},methods:{afterAnimate:function(){this.opened=!0},toggleSearch:function(){this.open=!this.open,this.top=this.topSpacing-(window.pageYOffset||document.documentElement.scrollTop),this.open?document.addEventListener("keydown",this.handleKeyDown,!1):(this.opened=!1,document.removeEventListener("keydown",this.handleKeyDown,!1))},handleKeyDown:function(e){e.keyCode&&27===e.keyCode&&this.toggleSearch()}}},C=!!document.getElementById(T)&&new s["default"](k);var A=C},4540:function(e,t,i){"use strict";i.d(t,{c:function(){return v}});var s=i(9016),a=i(1448);const n=function(){let e=!1,t=!1,i=0;const s=document.documentElement,n=document.querySelector("[data-header-mobile]"),o=document.querySelector(".ham"),r=document.querySelectorAll("[data-ham-btn]"),l=document.querySelectorAll("[data-closenav-btn]"),d=document.querySelector(".a17"),c="s--nav";function u(){return!e&&(!t&&(e=!0,i=window.pageYOffset,s.classList.add(c),d.style.top="-"+i+"px",o.style.top="-"+i+"px",n.style.top="-"+i+"px",document.addEventListener("keydown",p,!1),t=!0,void(e=!1)))}function h(){return!e&&(!!t&&(e=!0,s.classList.remove(c),d.style.top="",o.style.top="",n.style.top="",document.removeEventListener("keydown",p,!1),window.scrollTo(0,i),i=0,t=!1,void(e=!1)))}function p(e){27===e.keyCode&&t&&h()}r.length&&(0,a.c)(r,(function(e){e.addEventListener("click",(function(i){t?h():u(),e.blur()}))})),l.length&&(0,a.c)(l,(function(e){e.addEventListener("click",(function(i){t&&h(),e.blur()}))}))};var o=n,r=i(3336),l=i.n(r);const d=function(){let e=0,t=!1;const i=167,s=document.documentElement,a="s--env";function n(){e=window.pageYOffset,t||window.requestAnimationFrame((function(){o()})),t=!0}function o(){e>i?s.classList.add(a):s.classList.remove(a),t=!1}window.addEventListener("scroll",(function(){n()})),window.addEventListener("resize",l()((function(){n()}))),n()};var c=d;const u=function(){const e=document.querySelector("[data-logout-form]");e&&document.body.addEventListener("click",(t=>{t.target.hasAttribute("data-logout-btn")&&(t.preventDefault(),e.submit())}))};var h=u,p=i(6760),m=i(7060),f=i.n(m),g=i(3624),_=i(1768);e=i.hmd(e);const b=function(){o(),c(),h()};e&&e.hot,g.c.plugin(_.cp),window.Alpine=g.c,g.c.start(),window["TWILL"]||(window["TWILL"]={}),window["TWILL"].vheader=new s["default"]({el:"#headerUser"}),window["TWILL"].vsearch=p.c,console.log("","Made with ".concat("TWILL"," - v").concat(window["TWILL"].version)),f()(window["TWILL"].STORE,window.STORE);var v=b},248:function(e,t,i){"use strict";var s=i(6036);t.c={props:{name:{type:String,default:""},addNew:{type:String,default:""},options:{type:Array,default:function(){return[]}}},computed:{fullOptions:function(){const e=this.optionsByName(this.name),t=this.options;return Array.isArray(e)&&e.forEach((function(e){const i=t.findIndex((t=>t.value===e.value));-1===i&&t.push(e)})),e.length?t:this.options},...(0,s.gV)(["optionsByName"])}}},580:function(e,t){"use strict";t.c={props:{name:{type:String,required:!0},isOpen:{type:Boolean,default:!1}},data:function(){return{opened:this.isOpen}},methods:{open:function(){this.opened=!0},fieldName:function(e){return this.name+"["+e+"]"},repeaterName:function(e){return this.name.replace("[","-").replace("]","")+"|"+e},nestedEditorName:function(e){return this.name.replace("[","-").replace("]","")+"|"+e}}}},4064:function(e,t){"use strict";t.c={props:{buckets:{type:Array,default:()=>[]},item:{type:Object},singleBucket:{type:Boolean,default:!0}},computed:{bucketClasses:function(){return{selected:"bucket"!==this.type&&this.inBuckets,single:this.singleBucket}}},methods:{addToBucket:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.bucket;this.$emit("add-to-bucket",this.item,e)},inBucketById:function(e){const t=this.buckets.findIndex((t=>t.id===e));if(-1===t)return;const i=this.buckets[t].children.find((e=>e.id===this.item.id&&e.content_type.value===this.item.content_type.value));return!!i},restrictedBySource:function(e){const t=this.buckets.find((t=>t.id===e));if(!t)return!1;if(!t.hasOwnProperty("acceptedSources"))return!0;if(0===t.acceptedSources.length)return!0;const i=this.item.content_type.value;return-1!==t.acceptedSources.findIndex((e=>e===i))}}}},7888:function(e,t,i){"use strict";var s=i(948),a=i.n(s);t.c={props:{min:{type:Number,default:0},max:{type:Number,default:0},disabled:{type:Boolean,default:!1},selected:{type:Array,default:function(){return[]}}},data:function(){return{currentValue:this.selected}},watch:{selected:function(e){this.currentValue=e}},computed:{checkedValue:{get:function(){return this.currentValue},set:function(e){a()(e,this.currentValue)||(this.currentValue=e,"undefined"!==typeof this.saveIntoStore&&this.saveIntoStore(e),this.$emit("change",e))}}},methods:{isMax:function(e){return e.length>this.max&&this.max>0},isMin:function(e){return e.length0}}}},844:function(e,t){"use strict";t.c={props:{aspectRatio:{type:Number,default:null},viewMode:{type:Number,default:2},cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},dragMode:{type:String,default:"crop"},rotatable:{type:Boolean,default:!1},scalable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1}},computed:{defaultCropsOpts:function(){return{aspectRatio:this.initAspectRatio,viewMode:this.viewMode,cropBoxResizable:this.cropBoxResizable,cropBoxMovable:this.cropBoxMovable,dragMode:this.dragMode,rotatable:this.rotatable,scalable:this.scalable,zoomable:this.zoomable,guides:!1,center:!1,checkCrossOrigin:!1,background:!1}}}}},9684:function(e,t){"use strict";t.c={props:{draggable:{type:Boolean,default:!0}},data:function(){return{animation:150,handle:".drag__handle",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",scrollSensitivity:30}},computed:{dragOptions:function(){return{animation:this.animation,handle:this.handle,ghostClass:this.ghostClass,chosenClass:this.chosenClass,dragClass:this.dragClass,scrollSensitivity:this.scrollSensitivity,disabled:!this.draggable}}}}},9285:function(e,t){"use strict";t.c={methods:{openEditor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.$root.$refs.editor&&this.$root.$refs.editor.open(e,t)}}}},1308:function(e,t,i){"use strict";var s=i(948),a=i.n(s),n=i(6036),o=i(624);t.c={props:{hasDefaultStore:{type:Boolean,default:!1},inModal:{type:Boolean,default:!1},inStore:{type:String,default:""},fieldName:{type:String,default:""}},computed:{storedValue:function(){return this.inModal?this.modalFieldValueByName(this.getFieldName()):this.fieldValueByName(this.getFieldName())},...(0,n.gV)(["fieldValueByName","modalFieldValueByName"]),...(0,n.ys)({submitting:e=>e.form.loading,fields:e=>e.form.fields,modalFields:e=>e.form.modalFields})},watch:{storedValue:function(e){if(""===this.inStore)return;const t=this[this.inStore],i=this.locale?e[this.locale.value]:e;a()(t,i)||"undefined"!==typeof this.updateFromStore&&this.updateFromStore(i)}},methods:{getFieldName:function(){return""!==this.fieldName?this.fieldName:this.name},saveIntoStore:function(e){if(""===this.inStore)return;let t="";t=e||this[this.inStore];const i={};i.name=this.getFieldName(),i.value=t,this.locale&&(i.locale=this.locale.value),this.inModal?this.$store.commit(o.tt.UPDATE_MODAL_FIELD,i):this.$store.commit(o.tt.UPDATE_FORM_FIELD,i)},preventSubmit:function(){this.$store.commit(o.tt.PREVENT_SUBMIT)},allowSubmit:function(){this.$store.commit(o.tt.ALLOW_SUBMIT)},destroyValue:function(){""!==this.inStore&&(this.inModal?this.$store.commit(o.tt.REMOVE_MODAL_FIELD,this.getFieldName()):this.$store.commit(o.tt.REMOVE_FORM_FIELD,this.getFieldName()))}},beforeMount:function(){const e=this.getFieldName();if(""===this.inStore)return;if(""===e)return;const t=this.inModal?this.modalFields:this.fields,i=t.filter((function(t){return t.name===e}));i.length?this.locale?this[this.inStore]=i[0].value[this.locale.value]:this[this.inStore]=i[0].value:this.hasDefaultStore&&this.saveIntoStore()}}},6960:function(e,t,i){"use strict";var s=i(6036),a=i(624),n=i(8884);t.c={filters:n.c,computed:{...(0,s.ys)({currentLocale:e=>e.language.active})},methods:{formatPermalink:function(e){const t=this.$refs.permalink;if(t&&e){let i="";e.value&&"string"===typeof e.value?i=e.value:"string"===typeof e&&(i=e);const s=this.$options.filters.slugify(i),n={name:t.attributes?t.attributes.name:t.name,value:s};e.locale?n.locale=e.locale:n.locale=this.currentLocale.value,this.$store.commit(a.tt.UPDATE_FORM_FIELD,n)}}}}},5522:function(e,t,i){"use strict";i.d(t,{m6:function(){return s},g$:function(){return o},aS:function(){return c},cr:function(){return p},Eh:function(){return m.c},y_:function(){return f.c},Qf:function(){return g.c},yH:function(){return _}});i(248),i(580);var s={props:{block:{type:Object,default:()=>{}},blockIndex:{type:Number,default:0},blocksLength:{type:Number,default:0}},methods:{selectBlock(){this.$emit("block:select")},unselectBlock(){this.$emit("block:unselect")},deleteBlock(){this.$emit("block:delete")},moveBlock(e){this.$emit("block:move",e)},cloneBlock(){this.$emit("block:clone")},toggleBlockDropdown(){this.blocksLength>1&&this.$refs.blockDropdown&&this.$refs.blockDropdown.toggle()}}},a=i(8316),n=i.n(a),o={props:{editorName:{type:String,required:!0},blocks:{type:Array,default:()=>[]},savedBlocksLength:{type:Number,default:0}},methods:{addAndEditBlock(e,t,i){let{block:s,index:a}=i;window["TWILL"].PREVSTATE=n()(this.$store.state),e(s,a),t(a)},saveBlock(e,t){window["TWILL"].hasOwnProperty("PREVSTATE")&&delete window["TWILL"].PREVSTATE,this.unselectBlock(e,t),this.$emit("block:save",t)},cancelBlock(e,t){window["TWILL"].hasOwnProperty("PREVSTATE")&&(console.warn("Store - Restore previous Store state"),this.$store.replaceState(window["TWILL"].PREVSTATE)),this.unselectBlock(e,t),this.$emit("block:cancel",t)},selectBlock(e,t){window["TWILL"].PREVSTATE=n()(this.$store.state),e(),this.$emit("block:select",t)},unselectBlock(e,t){e(),window["TWILL"].hasOwnProperty("PREVSTATE")&&delete window["TWILL"].PREVSTATE,this.$emit("block:unselect",t)},moveBlock(e){this.$emit("block:move",e)},cloneBlock(e){e(),this.$emit("block:clone")},deleteBlock(e){this.$root.$refs.warningContentEditor?this.$root.$refs.warningContentEditor.open((()=>{e(),this.$emit("block:delete")})):(e(),this.$emit("block:delete"))}}},r=(i(4064),i(7888),i(844),i(6036)),l=i(7632),d=i(624),c={props:{nested:{type:Boolean,default:!1},bulkeditable:{type:Boolean,default:!0},emptyMessage:{type:String,default:""}},computed:{rows:{get(){return this.$store.state.datatable.data},set(e){const t=this.rows.length!==e.length;this.$store.commit(d.ec.UPDATE_DATATABLE_DATA,e),this.saveNewTree(t)}},isEmpty:function(){return this.rows.length<=0},isEmptyDatable:function(){return{"datatable__table--empty":this.isEmpty}},...(0,r.ys)({columns:e=>e.datatable.columns}),...(0,r.gV)(["visibleColumns","hideableColumns","visibleColumnsNames"])},methods:{saveNewTree:function(e){const t=!!e||this.nested,i=t?l.cp.SET_DATATABLE_NESTED:l.cp.SET_DATATABLE,s=()=>{this.$store.commit(d.ec.UPDATE_DATATABLE_TRACKER,0),this.$store.dispatch(i)};e?(this.$store.commit(d.ec.UPDATE_DATATABLE_TRACKER,1),this.updateTracker>=2&&s()):s()}}},u=i(4532),h=i(1832),p={props:{index:{type:Number,default:0},row:{type:Object,default:function(){return{}}},columns:{type:Array,default:function(){return[]}}},computed:{editInModal:function(){return!!this.row.hasOwnProperty("editInModal")&&this.row.editInModal},editUrl:function(){return this.row.hasOwnProperty("edit")?this.row.edit:"#"},updateUrl:function(){return this.row.updateUrl?this.row.updateUrl:"#"},...(0,r.ys)({bulkIds:e=>e.datatable.bulk})},methods:{currentComponent(e){var t;return"object"===typeof e?u.oD+(null!==(t=e.specificType)&&void 0!==t?t:e.name.toLowerCase()):u.oD+e},currentComponentProps(e){const t={col:e||{},row:this.row,editUrl:this.editUrl,editInModal:Boolean(this.editInModal)};if(!e)return t;switch(e.name){case"bulk":t.value=this.row.id,t.initialValue=this.bulkIds;break;case"languages":t.languages=this.row.hasOwnProperty("languages")?this.row.languages:[],t.editUrl=this.editUrl;break;case"publish_start_date":t.startDate="",t.endDate="";break;default:break}return t},editInPlace:function(e){if(e.lang){const t=e.lang;this.$store.commit(d.cp.UPDATE_LANG,t.value)}if(this.editInModal){const e=this.editInModal;this.$store.commit(d.WI.UPDATE_MODAL_MODE,"update"),this.$store.commit(d.WI.UPDATE_MODAL_ACTION,this.updateUrl),this.$store.commit(d.tt.UPDATE_FORM_LOADING,!0),this.$store.dispatch(l.cp.REPLACE_FORM,e).then((()=>{this.$nextTick((function(){this.$root.$refs.editionModal&&this.$root.$refs.editionModal.open()}))}),(e=>{this.$store.commit(h.cp.SET_NOTIF,{message:"Your content can not be edited, please retry",variant:"error"})}))}},cellClasses:function(e,t){return{[t+"--icon"]:"featured"===e.name||"published"===e.name,[t+"--bulk"]:"bulk"===e.name,[t+"--thumb"]:"thumbnail"===e.name,[t+"--draggable"]:"draggable"===e.name,[t+"--languages"]:"languages"===e.name,[t+"--nested"]:"nested"===e.name,[t+"--nested--parent"]:"nested"===e.name&&0===this.nestedDepth}},isSpecificColumn:function(e){var t;return u.G_.includes(null!==(t=e.specificType)&&void 0!==t?t:e.name)},tableCellUpdate:function(e){switch(e.col){case"published":this.togglePublish(e.row);break;case"bulk":this.toggleBulk(e.row);break;case"featured":this.toggleFeatured(e.row);break}},toggleFeatured:function(e){e.hasOwnProperty("deleted")?this.$store.commit(h.cp.SET_NOTIF,{message:"You can’t feature/unfeature a deleted item, please restore it first.",variant:"error"}):this.$store.dispatch(l.cp.TOGGLE_FEATURE,e)},toggleBulk:function(e){this.$store.commit(d.ec.UPDATE_DATATABLE_BULK,e.id)},togglePublish:function(e){e.hasOwnProperty("deleted")?this.$store.commit(h.cp.SET_NOTIF,{message:"You can’t publish/unpublish a deleted item, please restore it first.",variant:"error"}):this.$store.dispatch(l.cp.TOGGLE_PUBLISH,e)},restoreRow:function(e){this.$store.dispatch(l.cp.RESTORE_ROW,e)},destroyRow:function(e){this.$root.$refs.warningDestroyRow?this.$root.$refs.warningDestroyRow.open((()=>{this.$store.dispatch(l.cp.DESTROY_ROW,e)})):this.$store.dispatch(l.cp.DESTROY_ROW,e)},deleteRow:function(e){this.$root.$refs.warningDeleteRow?this.$root.$refs.warningDeleteRow.open((()=>{this.$store.dispatch(l.cp.DELETE_ROW,e)})):this.$store.dispatch(l.cp.DELETE_ROW,e)},duplicateRow:function(e){this.$store.dispatch(l.cp.DUPLICATE_ROW,e)}}},m=i(9684),f=i(9285),g=i(6960),_=(i(1308),i(5284),i(5272),i(1200),i(6456),i(6716),{props:{nested:{type:Boolean,default:!1},maxDepth:{type:Number,default:1},depth:{type:Number,default:0},name:{type:String,default:"group1"},parentId:{type:Number,default:-1}},data(){return{currentElDepth:void 0}},computed:{updateTracker(){return this.$store.state.datatable.updateTracker},draggableGetComponentData:function(){return{props:{depth:this.depth}}}}});i(4992),i(4768),i(6304)},5284:function(e,t){"use strict";t.c={props:{autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},direction:{type:String,default:"auto"},name:{default:""},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"on"}}}},5272:function(e,t){"use strict";function i(e){const t=e.length;return e.reduce((function(e,i,s){return e+(s-1===t?", ":" and ")+i}))}t.c={props:{label:{type:String,default:""},labelFor:{type:String,default:""},size:{type:String,default:"large"},variant:{type:String,default:""},fixedErrorKey:{type:String},note:{type:String,default:""}},computed:{errorKey(){return this.fixedErrorKey?this.hasLocale?this.fixedErrorKey.replace("[",".").replace("]",""):this.fixedErrorKey:this.hasLocale?this.name.replace("[",".").replace("]",""):this.name},errorLocales(){if(!this.hasLocale)return[];const e=this.errorKey.substr(0,this.errorKey.indexOf(".")),t=[],i=this.$store.state.language.all.map((e=>e.value));return Object.keys(this.$store.state.form.errors).forEach((s=>{if(s.substr(0,s.indexOf("."))===e){const e=s.substr(s.indexOf(".")+1,s.length);i.includes(e)&&t.push(e)}}),[]),t},otherLocalesError(){return this.errorLocales.filter((e=>e!==this.currentLocale.value)).length},errorMessageLocales(){return i(this.errorLocales.map((e=>this.languages.find((t=>t.value===e)).label)))+" language"+(this.errorLocales.length>1?"s":"")+" missing details."},errorMessage(){return this.error?this.$store.state.form.errors[this.errorKey][0]:""},error(){return!!this.$store.state.form&&Object.keys(this.$store.state.form.errors).includes(this.errorKey)}}}},1200:function(e,t,i){"use strict";var s=i(6036);t.c={props:{locale:{default:null}},computed:{hasLocale:function(){return null!=this.locale},hasCurrentLocale:function(){return null!=this.currentLocale},isCurrentLocale:function(){return!this.hasLocale||!this.hasCurrentLocale||this.locale.value===this.currentLocale.value},isLocaleRTL:function(){const e=["ar","arc","dv","fa","ha","he","khw","ks","ku","ps","ur","yi"];return!!this.hasLocale&&e.includes(this.locale.shortlabel.toLowerCase())},dirLocale:function(){return this.direction&&"auto"!==this.direction?this.direction:this.isLocaleRTL?"rtl":"auto"},displayedLocale:function(){return!!this.hasLocale&&this.locale.shortlabel},...(0,s.ys)({currentLocale:e=>e.language.active,languages:e=>e.language.all})},methods:{onClickLocale:function(){this.$emit("localize",this.locale)},updateLocale:function(e){this.$emit("localize",e)}}}},6456:function(e,t,i){"use strict";var s=i(6036);t.c={props:{items:{type:Array,default:()=>[]},selectedItems:{type:Array,default:()=>[]},usedItems:{type:Array,default:()=>[]}},computed:{...(0,s.ys)({itemsLoading:e=>e.mediaLibrary.loading}),replacingMediaIds:function(){return this.itemsLoading.reduce(((e,t)=>(t.isReplacement&&(e[t.replacementId]=t.id),e)),{})}},methods:{isSelected:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["id"];return Boolean(this.selectedItems.find((i=>t.every((t=>i[t]===e[t])))))},isUsed:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["id"];return Boolean(this.usedItems.find((i=>t.every((t=>i[t]===e[t])))))},toggleSelection:function(e){this.$emit("change",e)},shiftToggleSelection:function(e){this.$emit("shiftChange",e,!0)}}}},6716:function(e,t,i){"use strict";var s=i(624);t.c={props:{type:{type:String,default:"image"}},methods:{openMediaLibrary:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.name,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.$store.commit(s.ol.UPDATE_MEDIA_CONNECTOR,t),this.$store.commit(s.ol.UPDATE_MEDIA_TYPE,this.type),this.$store.commit(s.ol.UPDATE_REPLACE_INDEX,i),this.$store.commit(s.ol.UPDATE_MEDIA_MAX,e),this.$store.commit(s.ol.UPDATE_MEDIA_MODE,!0),this.$store.commit(s.ol.UPDATE_MEDIA_FILESIZE_MAX,this.filesizeMax||0),this.$store.commit(s.ol.UPDATE_MEDIA_WIDTH_MIN,this.widthMin||0),this.$store.commit(s.ol.UPDATE_MEDIA_HEIGHT_MIN,this.heightMin||0),this.$root.$refs.mediaLibrary&&this.$root.$refs.mediaLibrary.open()}}}},4992:function(e,t){"use strict";t.c={data:function(){return{randKey:Date.now()+Math.floor(9999*Math.random())}}}},3462:function(e,t,i){"use strict";var s=i(6036);t.c={data:function(){return{shouldRetrySubmitWhenAllowed:!1}},computed:{...(0,s.ys)({isSubmitPrevented:e=>e.form.isSubmitPrevented})},watch:{isSubmitPrevented:function(e){!e&&this.shouldRetrySubmitWhenAllowed&&(this.shouldRetrySubmitWhenAllowed=!1,this.retrySubmit())}},methods:{retrySubmit:function(){this.submitForm?this.submitForm():this.submit&&this.submit()}}}},4768:function(e,t){"use strict";t.c={props:{col:{type:Object,default:()=>{}},row:{type:Object,default:()=>{}},editUrl:{type:String,default:"#"},editInModal:{type:Boolean,default:!1}},computed:{colName:function(){return this.col.hasOwnProperty("name")?this.col.name:""}},methods:{update:function(){this.$emit("update",{row:this.row,col:this.colName})},preventEditInPlace:function(e){this.editInModal&&e.preventDefault(),this.editInPlace()},editInPlace:function(e,t){this.$emit("editInPlace",{event:e,lang:t})},restoreRow:function(){this.$emit("restoreRow",this.row)},destroyRow:function(){this.$emit("destroyRow",this.row)},deleteRow:function(){this.$emit("deleteRow",this.row)},duplicateRow:function(){this.$emit("duplicateRow",this.row)}}}},6304:function(e,t){"use strict";t.c={props:{open:{type:Boolean,default:!1}},data:function(){return{visible:this.open}},computed:{visibilityClasses:function(){return{"s--open":this.visible}}},methods:{onClickVisibility:function(){this.visible=!this.visible,this.$emit("toggleVisibility",this.visible)}}}},3948:function(e,t,i){"use strict";i.d(t,{c:function(){return Sn}});var s,a,n=i(9899),o=i.n(n),r=i(9448),l=i.n(r),d=i(6452),c=i.n(d),u=i(6984),h=i(8754),p=function(){var e=this,t=e._self._c;return t("div",{staticClass:"browserField"},[e.buttonOnTop&&e.remainingItems?t("div",{staticClass:"browserField__trigger"},[t("a17-button",{attrs:{type:"button",disabled:e.disabled||e.connectedBrowserField&&0===e.connectedBrowserFieldItems.length,variant:"ghost"},on:{click:e.openBrowser}},[e._v(" "+e._s(e.addLabel)+" ")]),t("input",{attrs:{type:"hidden",name:e.name},domProps:{value:e.itemsIds}}),t("span",{staticClass:"browserField__note f--small"},[e._t("default")],2)],1):e._e(),e.items.length?t("table",{staticClass:"browserField__table"},[t("draggable",{attrs:{tag:"tbody",disabled:e.disabled},model:{value:e.items,callback:function(t){e.items=t},expression:"items"}},e._l(e.items,(function(i,s){return t("a17-browseritem",{key:i.endpointType+"_"+i.id,staticClass:"item__content",attrs:{name:"".concat(e.name,"_").concat(i.id),draggable:!e.disabled&&e.draggable,item:i,disabled:e.disabled,max:e.max,showType:e.endpoints.length>0},on:{delete:function(t){return e.deleteItem(s)}}})})),1)],1):e._e(),!e.buttonOnTop&&e.remainingItems?t("div",{staticClass:"browserField__trigger"},[t("a17-button",{attrs:{type:"button",disabled:e.disabled||e.connectedBrowserField&&0===e.connectedBrowserFieldItems.length,variant:"ghost"},on:{click:e.openBrowser}},[e._v(" "+e._s(e.addLabel)+" ")]),t("input",{attrs:{type:"hidden",name:e.name},domProps:{value:e.itemsIds}}),t("span",{staticClass:"browserField__note f--small"},[e._t("default")],2)],1):e._e()])},m=[],f=i(7052),g=i.n(f),_=i(6036),b=i(9684),v=i(624),y=function(){var e=this,t=e._self._c;return t("tr",{staticClass:"browserItem"},[e.draggable&&e.max>1?t("td",{staticClass:"browserItem__cell browserItem__cell--drag"},[t("div",{class:e.dragClasses})]):e._e(),e.hasThumbnail?t("td",{class:e.thumbnailClasses},[e.isUser?[t("a17-avatar",{attrs:{name:e.currentItem.name,thumbnail:e.currentItem.thumbnail}})]:[t("a",{attrs:{href:"#",target:"_blank"}},[t("img",{attrs:{src:e.currentItem.thumbnail}})])]],2):e._e(),t("td",{staticClass:"browserItem__cell browserItem__cell--name"},[t("a",{attrs:{href:e.currentItem.edit,target:"_blank"}},[e.currentItem.hasOwnProperty("renderHtml")?t("span",{staticClass:"f--link-underlined--o",domProps:{innerHTML:e._s(e.currentItem.name)}}):t("span",{staticClass:"f--link-underlined--o"},[e._v(e._s(e.currentItem.name))])]),t("input",{attrs:{type:"hidden",name:e.name},domProps:{value:e.currentItem.id}})]),e.currentItem.hasOwnProperty("endpointType")&&e.showType?t("td",{staticClass:"browserItem__cell browserItem__cell--type"},[t("span",[e._v(e._s(e.currentItem.endpointType))])]):e._e(),e.deletable?t("td",{staticClass:"browserItem__cell browserItem__cell--icon"},[e.disabled?e._e():t("a17-button",{staticClass:"bucket__action",attrs:{icon:"close"},on:{click:function(t){return e.deleteItem()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"close_icon"}})])],1):e._e()])},w=[],E={name:"A17BrowserItem",props:{name:{type:String,required:!0},draggable:{type:Boolean,default:!1},item:{type:Object,default:function(){return{}}},max:{type:Number,default:10},showType:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:function(){return{handle:".item__handle"}},computed:{hasThumbnail:function(){return Boolean(this.currentItem.hasOwnProperty("thumbnail"))},hasLargeThumbnail:function(){return this.hasThumbnail&&!this.isUser},isUser:function(){return Boolean("users"===this.currentItem.endpointType)},dragClasses:function(){return["drag__handle--drag",this.hasLargeThumbnail?"":"drag__handle--drag-small"]},thumbnailClasses:function(){return["browserItem__cell","browserItem__cell--thumb",this.isUser?"browserItem__cell--thumb-avatar":""]},currentItem:function(){return this.item},deletable:function(){return!this.currentItem.hasOwnProperty("deletable")||!0===this.currentItem.deletable}},methods:{deleteItem:function(){this.$emit("delete")}}},T=E,k=i(2528),C=(0,k.c)(T,y,w,!1,null,"19917f52",null),A=C.exports,x={name:"A17BrowserField",components:{"a17-browseritem":A,draggable:g()},mixins:[b.c],props:{name:{type:String,required:!0},modalTitle:{type:String,default:""},browserNote:{type:String,default:""},itemLabel:{type:String,default:"Item"},endpoint:{type:String,default:""},endpoints:{type:Array,default:()=>[]},draggable:{type:Boolean,default:!0},max:{type:Number,default:10},wide:{type:Boolean,default:!1},buttonOnTop:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},connectedBrowserField:{type:String,defautl:null}},data:function(){return{handle:".item__handle"}},computed:{remainingItems:function(){return this.max-this.items.length},addLabel:function(){return this.$trans("fields.browser.add-label","Add")+" "+this.itemLabel},browserTitle:function(){return""!==this.modalTitle?this.modalTitle:this.addLabel},items:{get(){return this.selectedBrowser.hasOwnProperty(this.name)&&this.selectedBrowser[this.name]||[]},set(e){this.$store.commit(v.ai.REORDER_ITEMS,{name:this.name,items:e})}},itemsIds:function(){return this.selectedItemsByIds[this.name]?this.selectedItemsByIds[this.name].join():""},connectedBrowserFieldItems:function(){return this.selectedBrowser[this.connectedBrowserField]||[]},...(0,_.ys)({selectedBrowser:e=>e.browser.selected}),...(0,_.gV)(["selectedItemsByIds"])},methods:{deleteAll:function(){this.$store.commit(v.ai.DESTROY_ITEMS,{name:this.name})},deleteItem:function(e){this.$store.commit(v.ai.DESTROY_ITEM,{name:this.name,index:e})},openBrowser:function(){if(this.$store.commit(v.ai.UPDATE_BROWSER_CONNECTOR,this.name),this.endpoints.length>0)this.$store.commit(v.ai.UPDATE_BROWSER_ENDPOINTS,this.endpoints);else{this.$store.commit(v.ai.DESTROY_BROWSER_ENDPOINTS);let e=this.endpoint;if(this.connectedBrowserFieldItems.length){let t="?";e.indexOf("?")>-1&&(t="&"),e=e+t+"connectedBrowserIds= "+encodeURIComponent(JSON.stringify(this.connectedBrowserFieldItems.map((e=>e.id))))}this.$store.commit(v.ai.UPDATE_BROWSER_ENDPOINT,{value:e,label:this.name})}this.$store.commit(v.ai.UPDATE_BROWSER_MAX,this.max),this.$store.commit(v.ai.UPDATE_BROWSER_TITLE,this.browserTitle),this.$store.commit(v.ai.UPDATE_BROWSER_NOTE,this.browserNote),this.wide?this.$root.$refs.browserWide.open(this.endpoints.length<=0):this.$root.$refs.browser.open(this.endpoints.length<=0)},destroyValue:function(){this.deleteAll()}},watch:{connectedBrowserFieldItems(e){this.connectedBrowserField&&0===e.length&&this.deleteAll()}}},S=x,L=(0,k.c)(S,p,m,!1,null,"0ddc4be5",null),D=L.exports,M={name:"A17Button",props:{el:{type:String,default:"button"},type:{type:String,default:"button"},href:{type:String,default:""},target:{type:String,default:""},download:{type:String,default:""},rel:{type:String,default:""},variant:{type:String,default:""},icon:{default:""},disabled:{type:Boolean,default:!1},size:{type:String,default:""}},computed:{buttonClasses:function(){const e=["button",this.size?"button--".concat(this.size):""];return this.variant&&this.variant.split(" ").forEach((t=>{e.push("button--".concat(t))})),this.icon&&e.push("button--icon button--".concat(this.icon)),e}},methods:{onClick:function(e){this.$emit("click")}},render:function(e){const t={class:this.buttonClasses,attrs:{},on:{click:e=>{this.onClick(e)}}};return"button"===this.el&&(t.attrs.type=this.type,this.disabled&&(t.attrs.disabled=this.disabled)),"a"===this.el&&this.href&&(t.attrs.href=this.href,this.target&&(t.attrs.target=this.target),this.download&&(t.attrs.download=this.download),this.rel&&(t.attrs.rel=this.rel)),e(this.el,t,this.$slots.default)}},I=M,O=(0,k.c)(I,s,a,!1,null,"59eeac35",null),P=O.exports,B=function(){var e=this,t=e._self._c;return t("div",{class:e.barClasses},[e._t("default")],2)},R=[],N={name:"A17Buttonbar",props:{type:{type:String,default:"button"},variant:{type:String,default:""}},computed:{barClasses:function(){return["buttonbar",this.variant?"buttonbar--".concat(this.variant):""]}}},F=N,$=(0,k.c)(F,B,R,!1,null,"7223fc6a",null),U=$.exports,V=function(){var e=this,t=e._self._c;return t("span",{staticClass:"checkbox"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.checkedValue,expression:"checkedValue"}],key:e.uniqId,staticClass:"checkbox__input",class:e.checkboxClasses,attrs:{type:"checkbox",name:e.name,id:e.uniqId,disabled:e.disabled},domProps:{value:e.value,checked:Array.isArray(e.checkedValue)?e._i(e.checkedValue,e.value)>-1:e.checkedValue},on:{change:function(t){var i=e.checkedValue,s=t.target,a=!!s.checked;if(Array.isArray(i)){var n=e.value,o=e._i(i,n);s.checked?o<0&&(e.checkedValue=i.concat([n])):o>-1&&(e.checkedValue=i.slice(0,o).concat(i.slice(o+1)))}else e.checkedValue=a}}}),t("label",{staticClass:"checkbox__label",attrs:{for:e.uniqId}},[e._v(e._s(e.label)+" "),t("span",{staticClass:"checkbox__icon"},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"check"}})])])])},q=[],W=i(4992),H={name:"A17Checkbox",mixins:[W.c],props:{value:{default:""},initialValue:{default:function(){return[]}},name:{type:String,default:""},theme:{type:String,default:""},label:{type:String,default:""},disabled:{type:Boolean,default:!1}},computed:{uniqId:function(e){return this.name+"_"+this.value+"-"+this.randKey},checkboxClasses:function(){return[this.theme?"checkbox__input--".concat(this.theme):""]},checkedValue:{get:function(){return this.initialValue},set:function(e){this.$emit("change",e)}}}},z=H,K=(0,k.c)(z,V,q,!1,null,"20e8e5e7",null),j=K.exports,G=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,name:e.name}},[t("ul",{staticClass:"checkboxGroup",class:e.checkboxClasses},e._l(e.options,(function(i){return t("li",{key:i.value,staticClass:"checkboxGroup__item"},[t("a17-checkbox",{attrs:{name:e.name,value:i.value,label:i.label,initialValue:e.currentValue,disabled:i.disabled||e.disabled},on:{change:e.changeValue}})],1)})),0)])},Y=[],X=i(948),J=i.n(X),Q=i(7888),Z=i(1308),ee=i(5272),te={name:"A17CheckboxGroup",props:{name:{type:String,default:""},inline:{type:Boolean,default:!1},options:{type:Array,default:function(){return[]}}},mixins:[ee.c,Q.c,Z.c],computed:{checkboxClasses:function(){return[this.inline?"checkboxGroup--inline":""]}},methods:{formatValue:function(e,t){const i=this;if(!e)return;if(!t)return;const s=this.isMax(e),a=this.isMin(e);(s||a)&&(J()(t,i.checkedValue)||(i.checkedValue=t))},updateFromStore:function(e){this.updateValue(e)},updateValue:function(e){this.checkedValue=e},changeValue:function(e){J()(e,this.currentValue)||this.updateValue(e)}},mounted:function(){this.max+this.min>0&&this.$watch("currentValue",this.formatValue,{immediate:!0})}},ie=te,se=(0,k.c)(ie,G,Y,!1,null,"3e53c5c2",null),ae=se.exports,ne=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,name:e.name,required:e.required}},[t("div",{staticClass:"form__field",class:e.textfieldClasses},[t("input",{attrs:{type:"text",placeholder:e.placeholder,name:e.name,id:e.name,disabled:e.disabled,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete,maxlength:"7"},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}),t("a17-dropdown",{ref:"colorDropdown",staticClass:"form__field--color",attrs:{position:"bottom-right",arrow:!0,offset:15,minWidth:300,clickable:!0,sideOffset:15},on:{close:e.saveIntoStore}},[t("span",{staticClass:"form__field--colorBtn",style:e.bcgStyle,on:{click:function(t){return e.$refs.colorDropdown.toggle()}}}),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[t("a17-colorpicker",{attrs:{color:e.value},on:{change:e.updateValueFromPicker}})],1)])],1)])},oe=[],re=function(){var e=this,t=e._self._c;return t("div",{staticClass:"colorpicker"},[t("div",{staticClass:"colorpicker__color"},[t("div",{ref:"satContainer",staticClass:"colorpicker__saturation",style:{background:e.bgColor},on:{mousedown:function(t){return e.handleMouseDown("saturation")}}},[t("div",{staticClass:"colorpicker__saturation--white"}),t("div",{staticClass:"colorpicker__saturation--black"}),t("div",{staticClass:"colorpicker__saturation-pointer",style:{top:e.satPointerTop,left:e.satPointerLeft}},[t("div",{staticClass:"colorpicker__saturation-circle"})])]),t("div",{staticClass:"colorpicker__hue colorpicker__hue--vertical"},[t("div",{ref:"hueContainer",staticClass:"colorpicker__hue-container",on:{mousedown:function(t){return e.handleMouseDown("hue")}}},[t("div",{staticClass:"colorpicker__hue-pointer",style:{top:e.huePointerTop,left:e.huePointerLeft}},[t("div",{staticClass:"colorpicker__hue-picker"})])])])])])},le=[],de=i(9212),ce=i.n(de),ue=i(3448),he={name:"a17ColorPicker",props:{color:{type:String,required:!0},direction:{type:String,default:"vertical"}},data:function(){return{currentColor:(0,ue.c)(this.color),currentColorHue:(0,ue.c)(this.color).toHsv().h,currentTarget:"",pullDirection:""}},computed:{bgColor(){return"hsl(".concat(this.currentColorHue,", 100%, 50%)")},satPointerTop(){return-100*this.currentColor.toHsv().v+1+100+"%"},satPointerLeft(){return 100*this.currentColor.toHsv().s+"%"},huePointerTop(){return"vertical"===this.direction?0===this.currentColorHue&&"right"===this.pullDirection?0:-100*this.currentColorHue/360+100+"%":0},huePointerLeft(){return"vertical"===this.direction?0:0===this.currentColorHue&&"right"===this.pullDirection?"100%":100*this.currentColorHue/360+"%"}},methods:{throttle:ce()(((e,t)=>{e(t)}),20,{leading:!0,trailing:!1}),satHandleChange(e,t){!t&&e.preventDefault();const i=this.$refs.satContainer;if(!i)return;const s=i.clientWidth,a=i.clientHeight,n=i.getBoundingClientRect().left+window.pageXOffset,o=i.getBoundingClientRect().top+window.pageYOffset,r=e.pageX||(e.touches?e.touches[0].pageX:0),l=e.pageY||(e.touches?e.touches[0].pageY:0);let d=r-n,c=l-o;d<0?d=0:d>s?d=s:c<0?c=0:c>a&&(c=a);const u=d/s;let h=-c/a+1;h=h>0?h:0,h=h>1?1:h,this.throttle(this.onChange,{h:this.currentColorHue,s:u,v:h,a:this.currentColor.toHsv().a})},hueHandleChange(e,t){!t&&e.preventDefault();const i=this.$refs.hueContainer,s=i.clientWidth,a=i.clientHeight,n=i.getBoundingClientRect().left+window.pageXOffset,o=i.getBoundingClientRect().top+window.pageYOffset,r=e.pageX||(e.touches?e.touches[0].pageX:0),l=e.pageY||(e.touches?e.touches[0].pageY:0),d=r-n,c=l-o;let u,h;"vertical"===this.direction?c<0?u=360:c>a?u=0:(h=-100*c/a+100,u=360*h/100):d<0?u=0:d>s?u=360:(h=100*d/s,u=360*h/100),this.currentColorHue!==u&&this.throttle(this.onChange,{h:u,s:this.currentColor.toHsl().s,l:this.currentColor.toHsl().l,a:this.currentColor.toHsl().a,source:"hsl"})},handleMouseDown(e){this.currentTarget=e,"saturation"===this.currentTarget?(window.addEventListener("mousemove",this.satHandleChange),window.addEventListener("mouseup",this.satHandleChange)):(window.addEventListener("mousemove",this.hueHandleChange),window.addEventListener("mouseup",this.hueHandleChange)),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){"saturation"===this.currentTarget?(window.removeEventListener("mousemove",this.satHandleChange),window.removeEventListener("mouseup",this.satHandleChange)):(window.removeEventListener("mousemove",this.hueHandleChange),window.removeEventListener("mouseup",this.hueHandleChange)),window.removeEventListener("mouseup",this.handleMouseUp)},onChange(e){this.currentColor=(0,ue.c)(e),this.currentColorHue=e.h,this.$emit("change",this.currentColor.toHexString())}}},pe=he,me=(0,k.c)(pe,re,le,!1,null,null,null),fe=me.exports,ge=i(5284),_e={name:"a17ColorField",mixins:[ge.c,ee.c,Z.c],props:{name:{type:String,required:!0},initialValue:{default:""},defaultValue:{default:""}},components:{"a17-colorpicker":fe},data:function(){return{focused:!1,value:this.initialValue}},mounted(){""===this.value&&""!==this.defaultValue&&this.updateValue(this.defaultValue)},computed:{bcgStyle:function(){return{"background-color":""!==this.value?this.value:"transparent"}},textfieldClasses:function(){return{"s--focus":this.focused,"s--disabled":this.disabled}}},methods:{updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&(this.value=e)},updateValueFromPicker:function(e){this.value!==e&&(this.value=e)},updateValue:function(e){this.value!==e&&(this.value=e,this.saveIntoStore())},onBlur:function(e){const t=e.target.value;this.updateValue(t),this.focused=!1},onFocus:function(){this.focused=!0},onInput:function(){}}},be=_e,ve=(0,k.c)(be,ne,oe,!1,null,"09f5e603",null),ye=ve.exports,we=function(){var e=this,t=e._self._c;return t("a17-inputframe",{staticClass:"datePicker",class:{"datePicker--static":e.staticMode,"datePicker--mobile":e.isMobile},attrs:{name:e.name,error:e.error,note:e.note,label:e.label,"label-for":e.uniqId,required:e.required}},[t("div",{ref:e.refs.flatPicker,staticClass:"datePicker__group"},[t("div",{staticClass:"form__field datePicker__field"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.date,expression:"date"}],attrs:{type:"text",name:e.name,id:e.uniqId,required:e.required,placeholder:e.placeHolder,"data-input":"",disabled:e.disabled},domProps:{value:e.date},on:{blur:e.onBlur,input:function(t){t.target.composing||(e.date=t.target.value)}}}),e.clear?t("a",{staticClass:"datePicker__reset",class:{"datePicker__reset--cleared":!e.date},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.onClear.apply(null,arguments)}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"close_icon"}})]):e._e()])])])},Ee=[],Te=i(4685),ke=i.n(Te),Ce=i(2112),Ae=i(8904),xe={name:"A17DatePicker",mixins:[W.c,ee.c,Z.c],props:{name:{type:String,default:"date"},required:{type:Boolean,default:!1},placeHolder:{type:String,default:""},allowInput:{type:Boolean,default:!1},enableTime:{type:Boolean,default:!1},noCalendar:{type:Boolean,default:!1},time_24hr:{type:Boolean,default:(0,Ae.Yt)()},altFormat:{type:String,default:null},inline:{type:Boolean,default:!1},initialValue:{type:String,default:null},hourIncrement:{type:Number,default:1},minuteIncrement:{type:Number,default:30},staticMode:{type:Boolean,default:!1},minDate:{type:String,default:null},maxDate:{type:String,default:null},disabled:{type:Boolean,default:!1},mode:{type:String,default:"single",validator:function(e){return"single"===e||"multiple"===e||"range"===e}},clear:{type:Boolean,default:!1}},data:function(){return{date:this.initialValue,isMobile:!1,flatPicker:null,refs:{flatPicker:"flatPicker"}}},computed:{uniqId:function(e){return this.name+"-"+this.randKey},altFormatComputed:function(){return null!==this.altFormat?this.altFormat:"F j, Y"+(this.enableTime?this.time_24hr||(0,Ae.Yt)()?" H:i":" h:i K":"")}},methods:{config:function(){const e=this,t={wrap:!0,altInput:!0,altFormat:e.altFormatComputed,dateFormat:e.enableTime?"Z":"Y-m-d",static:e.staticMode,appendTo:e.staticMode?e.$refs[e.refs.flatPicker]:void 0,enableTime:e.enableTime,noCalendar:e.noCalendar,time_24hr:e.time_24hr,inline:e.inline,allowInput:e.allowInput,mode:e.mode,minuteIncrement:e.minuteIncrement,hourIncrement:e.hourIncrement,minDate:e.minDate,altInputClass:"flatpickr-input form-control",maxDate:e.maxDate,parseDate:function(e,t){const i="yyyy-MM-dd HH:mm:ss";if(e.length===i.length)return ke()(e+"Z",i+"X",Date.UTC());const s="yyyy-MM-dd HH:mm";if(e.length===s.length)return ke()(e+"Z",i+"X",Date.UTC());const a="yyyy-MM-dd";return e.length===a.length?ke()(e,a,Date.UTC()):new Date(e)},onOpen:function(){setTimeout((function(){e.flatPicker.set("maxDate",e.maxDate),e.flatPicker.set("minDate",e.minDate),e.$emit("open",e.date)}),10)},onClose:function(t,i,s){e.$nextTick((function(){e.$emit("input",e.date),e.$emit("close",e.date),e.saveIntoStore()}))}},i=Ae.ob[(0,Ae.qe)()];return void 0!==i&&i.hasOwnProperty("flatpickr")&&(t.locale=i.flatpickr),t},updateFromStore:function(e){e!==this.date&&(this.date=e,this.flatPicker.setDate(e))},onInput:function(e){this.$emit("input",this.date)},onBlur:function(){this.$emit("blur",this.date)},onClear:function(){this.flatPicker.clear(),this.saveIntoStore(),this.$emit("input",this.date)}},mounted:function(){const e=this,t=e.$refs[e.refs.flatPicker],i=e.config();e.flatPicker=new Ce.c(t,i),this.isMobile=e.flatPicker.isMobile},beforeDestroy:function(){const e=this;e.flatPicker.destroy()}},Se=xe,Le=(0,k.c)(Se,we,Ee,!1,null,"05edd33b",null),De=Le.exports,Me=function(){var e=this,t=e._self._c;return t("a17-modal",{ref:"modal",staticClass:"modal--tiny modal--form modal--withintro",attrs:{title:e.modalTitle,forceClose:!0}},[e._t("default"),t("a17-inputframe",[t("a17-button",{staticClass:"dialog-confirm",attrs:{variant:"validate"}},[e._v(e._s(e.confirmLabel))]),e._v(" "),t("a17-button",{staticClass:"dialog-cancel",attrs:{variant:"aslink"}},[t("span",[e._v(e._s(e.cancelLabel))])])],1)],2)},Ie=[],Oe={name:"A17Dialog",props:{name:{type:String,default:""},modalTitle:{type:String,default:function(){return this.$trans("dialog.title")}},confirmLabel:{type:String,default:function(){return this.$trans("dialog.ok")}},cancelLabel:{type:String,default:function(){return this.$trans("dialog.cancel")}}},methods:{open:function(e){this.$refs.modal&&this.$refs.modal.open(),this.$nextTick((()=>{this.$el.querySelector(".dialog-confirm").addEventListener("click",(t=>{e(),this.close()})),this.$el.querySelector(".dialog-cancel").addEventListener("click",(e=>{this.close()}))}))},close:function(){this.$refs.modal&&this.$refs.modal.close()}}},Pe=Oe,Be=(0,k.c)(Pe,Me,Ie,!1,null,null,null),Re=Be.exports,Ne=i(3032),Fe=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,label:e.label,locale:e.locale,size:e.size,name:e.name,note:e.fieldNote},on:{localize:e.updateLocale}},[t("div",{staticClass:"fileField"},[e.buttonOnTop&&e.remainingItems?t("div",{staticClass:"fileField__trigger"},[t("input",{attrs:{type:"hidden",name:e.name},domProps:{value:e.itemsIds}}),t("a17-button",{attrs:{type:"button",variant:"ghost"},on:{click:function(t){return e.openMediaLibrary(e.remainingItems)}}},[e._v(e._s(e.addLabel))]),t("span",{staticClass:"fileField__note f--small"},[e._v(e._s(e.note))])],1):e._e(),e.items.length?t("table",{staticClass:"fileField__list"},[t("draggable",{attrs:{tag:"tbody"},model:{value:e.items,callback:function(t){e.items=t},expression:"items"}},e._l(e.items,(function(i,s){return t("a17-fileitem",{key:i.id,staticClass:"item__content",attrs:{name:"".concat(e.name,"_").concat(i.id),draggable:e.isDraggable,item:i},on:{delete:function(t){return e.deleteItem(s)}}})})),1)],1):e._e(),!e.buttonOnTop&&e.remainingItems?t("div",{staticClass:"fileField__trigger"},[t("input",{attrs:{type:"hidden",name:e.name},domProps:{value:e.itemsIds}}),t("a17-button",{attrs:{type:"button",variant:"ghost"},on:{click:function(t){return e.openMediaLibrary(e.remainingItems)}}},[e._v(e._s(e.addLabel))]),t("span",{staticClass:"fileField__note f--small"},[e._v(e._s(e.note))])],1):e._e()])])},$e=[],Ue=i(1200),Ve=i(6716),qe=function(){var e=this,t=e._self._c;return t("tr",{staticClass:"fileItem"},[e.draggable?t("td",{staticClass:"fileItem__cell fileItem__cell--drag"},[t("div",{staticClass:"drag__handle--drag"})]):e._e(),e.currentItem.hasOwnProperty("extension")?t("td",{staticClass:"fileItem__cell fileItem__cell--extension"},[t("a",{attrs:{href:"#",target:"_blank"}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:e.getSvgIconName()}})])]):e._e(),t("td",{staticClass:"fileItem__cell fileItem__cell--name"},[e.currentItem.hasOwnProperty("thumbnail")?t("span",[t("img",{attrs:{src:e.currentItem.thumbnail}})]):e._e(),t("a",{attrs:{href:e.currentItem.hasOwnProperty("original")?e.currentItem.original:"#",download:""}},[t("span",{staticClass:"f--link-underlined--o"},[e._v(e._s(e.currentItem.name))])]),t("input",{attrs:{type:"hidden",name:e.name},domProps:{value:e.currentItem.id}})]),e.currentItem.hasOwnProperty("size")?t("td",{staticClass:"fileItem__cell fileItem__cell--size"},[e._v(e._s(e.currentItem.size))]):e._e(),t("td",{staticClass:"fileItem__cell"},[t("a17-button",{staticClass:"bucket__action",attrs:{icon:"close"},on:{click:function(t){return e.deleteItem()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"close_icon"}})])],1)])},We=[];const He={img:{extensions:["gif","png","jpg"],icon:"img",display:"Image File",instructions:"Most Image files are natively recognized by your computer."},tiff:{extensions:["tiff","tif"],icon:"img",display:"TIFF Image",instructions:"To read TIFF images, you need Adobe Photoshop or similar."},eps:{extensions:["eps","ps"],icon:"eps",display:"Postscript File",instructions:"To read Postscript files, you need Adobe Illustrator or similar."},bmp:{extensions:["bmp"],icon:"img",display:"Bitmap Image",instructions:"To read Bitmap images, you need Adobe Photoshop or similar."},raw:{extensions:["3fr","arw","srf","sr2","bay","crw","cr2","cap","iiq","eip","dng","erf","fff","mef","mos","mrw","nef","nrw","orf","ptx","pef","pxn","r3d","raf","raw","rw2","rwz","k25","kdc","dcs","drf","x3f"],icon:"img",display:"RAW Image",instructions:"To read RAW images, you need Adobe Photoshop or similar."},indd:{extensions:["indd"],icon:"indd",display:"InDesign Document",instructions:"To read InDesign documents, you need Adobe InDesign or similar."},psd:{extensions:["psd"],icon:"psd",display:"Photoshop File",instructions:"To read Photoshop files, you need Adobe Photoshop or similar."},ai:{extensions:["ai"],icon:"ai",display:"Illustrator File",instructions:"To read Illustrator files, you need Adobe Illustrator or similar."},indb:{extensions:["indb"],icon:"indd",display:"InDesign Book",instructions:"To read InDesign books, you need Adobe InDesign or similar."},ase:{extensions:["ase"],icon:"ase",display:"Adobe Swatch File",instructions:"To read Swatch files, you need Adobe Creative Suite or similar."},snd:{extensions:["mp3","wav"],icon:"snd",display:"Audio File",instructions:"To listen to Audio files, you need Apple QuickTime, Windows Media Player or similar."},vid:{extensions:["avi","mov","mp4","mpg","mpeg","wmv","flv"],icon:"vid",display:"Movie File",instructions:"To watch Movie files, you need Apple QuickTime, Windows Media Player or similar."},fla:{extensions:["fla"],icon:"fla",display:"Flash Document",instructions:"To read Flash documents, you need Adobe Flash player."},swf:{extensions:["swf"],icon:"swf",display:"Flash Movie",instructions:"To read Flash movies, you need Adobe Flash player."},dcr:{extensions:["dcr"],icon:"dcr",display:"Shockwave Movie",instructions:"To read Shockwave movies, you need Adobe Flash player."},ae:{extensions:["ae","aep"],icon:"ae",display:"After Effect File",instructions:"To read After Effect files, you need Adobe After Effects."},pdf:{extensions:["pdf"],icon:"pdf",display:"PDF Document",instructions:"To read PDF documents, You need the free Adobe Acrobat Reader or similar."},doc:{extensions:["doc","docx"],icon:"doc",display:"Word Document",instructions:"To read Word documents, you need Microsoft Word or similar."},xls:{extensions:["xls","xlsx"],icon:"xls",display:"Excel Document",instructions:"To read Excel documents, you need Microsoft Excel, or similar."},ppt:{extensions:["ppt","pptx","pps"],icon:"ppt",display:"Powerpoint Document",instructions:"To read PowerPoint documents, you need Microsoft PowerPoint, or similar."},pages:{extensions:["pages"],icon:"pages",display:"Pages Document",instructions:"To read Pages documents, you need Apple iWorks."},numbers:{extensions:["numbers"],icon:"numbers",display:"Numbers Document",instructions:"To read Numbers documents, you need Apple iWorks."},key:{extensions:["key"],icon:"key",display:"Keynote Document",instructions:"To read Keynote Documents, you need Apple iWorks."},csv:{extensions:["csv"],icon:"sql",display:"CSV File",instructions:"CSV files can be opened with a spreadsheet application such as Microsoft Excel or similar."},txt:{extensions:["txt"],icon:"txt",display:"Text File",instructions:"To read TXT files, you need any standard text editor."},rtf:{extensions:["rtf"],icon:"txt",display:"Rich Text File",instructions:"To read RTF files, you need any standard text editor."},merlin:{extensions:["merlin","merlin2"],icon:"merlin",display:"Merlin File",instructions:"To read Merlin files, you need Merlin."},oplx:{extensions:["oplx"],icon:"merlin",display:"OmniPlan File",instructions:"To read OmniPlan files, you need OmniPlan."},zip:{extensions:["zip","str","tar","gz"],icon:"zip",display:"Archive",instructions:"Most archive formats are natively recognized by your computer."},dmg:{extensions:["dmg"],icon:"dmg",display:"DMG Installer",instructions:"DMG installers are disc images for Mac used for the installation of applications."},fnt:{extensions:["fnt","ttf","bmap","afm","otf"],icon:"fnt",display:"Font",instructions:"To open Font packages, you need a font manager application such as FontCreator on a PC or Font Book on a Mac."},suit:{extensions:["suit"],icon:"fnt",display:"Font Suitcase",instructions:"To open Font Suitcase, you need a Mac."},html:{extensions:["htm","html","rhtml"],icon:"html",display:"HTML File",instructions:"To read HTML files, you need a standard text editor."},css:{extensions:["css"],icon:"gen",display:"Stylesheet",instructions:"To read CSS files, you need a standard text editor."},php:{extensions:["php"],icon:"gen",display:"PHP File",instructions:"To read PHP files, you need a standard text editor."},yml:{extensions:["yml"],icon:"sql",display:"YAML File",instructions:"To read YAML files, you need a standard text editor."},sql:{extensions:["sql"],icon:"sql",display:"MySql Dump",instructions:"To read MySql Dump files, you need MySQL."},dir:{extensions:["dir"],icon:"dir",display:"Folder"},cut:{extensions:["cut"],icon:"cut",display:"Shortcut"},ftr:{extensions:["ftr"],icon:"ftr",display:"Feature"},pop:{extensions:["pop"],icon:"pop",display:"Popup Window"},link:{extensions:["net","link","com","fr","net","org","me","us","biz","mobi","info","es","de"],icon:"net",display:"Internet Location"},site:{extensions:["site"],icon:"site",display:"Mini Site"},slide:{extensions:["slide"],icon:"slide",display:"Slideshow"},rss:{extensions:["rss"],icon:"txt",display:"RSS Feed"}};var ze=He,Ke={name:"a17FileItem",props:{name:{type:String,required:!0},draggable:{type:Boolean,default:!1},item:{type:Object,default:function(){return{}}},itemLabel:{type:String,default:"Item"},endpoint:{type:String,default:""},max:{type:Number,default:10}},data:function(){return{handle:".item__handle"}},computed:{currentItem:function(){return this.item}},methods:{deleteItem:function(){this.$emit("delete")},getSvgIconName:function(){const e=this.currentItem.extension;if(ze.hasOwnProperty(e))return ze[e].icon;for(const t in ze){const i=ze[t].extensions.findIndex((t=>t===e));if(i>-1)return ze[t].icon}return"gen"}}},je=Ke,Ge=(0,k.c)(je,qe,We,!1,null,"5c6d6a95",null),Ye=Ge.exports,Xe={name:"A17FileField",components:{"a17-fileitem":Ye,draggable:g()},mixins:[b.c,Ve.c,Ue.c,ee.c],props:{type:{type:String,default:"file"},name:{type:String,required:!0},itemLabel:{type:String,default:"Item"},endpoint:{type:String,default:""},draggable:{type:Boolean,default:!0},max:{type:Number,default:1},note:{type:String,default:""},fieldNote:{type:String,default:""},filesizeMax:{type:Number,default:0},buttonOnTop:{type:Boolean,default:!1}},data:()=>({handle:".item__handle"}),computed:{remainingItems:function(){return this.max-this.items.length},items:{get(){return this.selectedFiles.hasOwnProperty(this.name)&&this.selectedFiles[this.name]||[]},set(e){this.$store.commit(v.ol.REORDER_MEDIAS,{name:this.name,medias:e})}},isDraggable:function(){return this.draggable&&this.items.length>1},itemsIds:function(){return this.selectedItemsByIds[this.name]?this.selectedItemsByIds[this.name].join():""},addLabel:function(){return this.$trans("fields.files.add-label","Add")+" "+this.itemLabel},...(0,_.ys)({selectedFiles:e=>e.mediaLibrary.selected}),...(0,_.gV)(["selectedItemsByIds"])},methods:{deleteAll:function(e){this.$store.commit(v.ol.DESTROY_MEDIAS,{name:this.name})},deleteItem:function(e){this.$store.commit(v.ol.DESTROY_SPECIFIC_MEDIA,{name:this.name,index:e})},destroyValue:function(){this.deleteAll()}}},Je=Xe,Qe=(0,k.c)(Je,Fe,$e,!1,null,"86ceea78",null),Ze=Qe.exports,et=function(){var e=this,t=e._self._c;return t("div",{staticClass:"form__input form__input--hidden"},[t("input",{attrs:{type:"hidden",name:e.name,id:e.uniqId},domProps:{value:e.value}})])},tt=[],it={name:"A17HiddenField",mixins:[W.c,ge.c,Z.c],props:{name:{type:String,required:!0},initialValue:{default:""}},computed:{uniqId:function(){return this.name+"-"+this.randKey}},data:function(){return{value:this.initialValue}},watch:{initialValue:function(){this.value=this.initialValue}},methods:{updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&(this.value=e)}}},st=it,at=(0,k.c)(st,et,tt,!1,null,null,null),nt=at.exports,ot=function(){var e=this,t=e._self._c;return t("a17-button",{directives:[{name:"tooltip",rawName:"v-tooltip"}],attrs:{variant:"icon",size:"smallIcon","data-tooltip-title":e.text,"data-tooltip-theme":"large","data-tooltip-placement":"right"}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"info"}})])},rt=[],lt={name:"A17Infotip",props:{text:{default:""}},computed:{},methods:{onClick:function(){this.$emit("click")}}},dt=lt,ct=(0,k.c)(dt,ot,rt,!1,null,"2da324be",null),ut=ct.exports,ht=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.isCurrentLocale,expression:"isCurrentLocale"}],staticClass:"input",class:e.textfieldClasses,attrs:{hidden:!e.isCurrentLocale||null}},[e.label?t("label",{staticClass:"input__label",attrs:{for:e.labelFor||e.name}},[e._v(" "+e._s(e.label)),e.required?t("span",{staticClass:"input__required"},[e._v("*")]):e._e(),e.hasLocale&&e.languages.length>1?t("span",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"input__lang",attrs:{"data-tooltip-title":e.$trans("fields.generic.switch-language")},on:{click:e.onClickLocale}},[e._v(e._s(e.displayedLocale))]):e._e(),e.note?t("span",{staticClass:"input__note f--small"},[e._v(e._s(e.note))]):e._e()]):e._e(),e.addNew?t("a",{staticClass:"input__add",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.openAddModal.apply(null,arguments)}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"add"}}),e._v(" "),t("span",{staticClass:"f--link-underlined--o"},[e._v("Add New")])]):e._e(),e._t("default"),e.error&&e.errorMessage?t("span",{staticClass:"input__errorMessage f--small",domProps:{innerHTML:e._s(e.errorMessage)}}):e._e(),e.otherLocalesError?t("span",{staticClass:"input__errorMessage f--small"},[e._v(e._s(e.errorMessageLocales))]):e._e()],2)},pt=[],mt={name:"A17InputFrame",mixins:[ge.c,ee.c,Ue.c],props:{addNew:{type:String,default:""}},computed:{textfieldClasses:function(){const e=["small"===this.size?"input--small":"",this.error?"input--error":"","input-wrapper-"+(this.name||this.labelFor)];return this.variant&&this.variant.split(" ").forEach((t=>{e.push("input--".concat(t))})),e}},methods:{openAddModal:function(){this.$parent.$refs.addModal&&this.$parent.$refs.addModal.open()}}},ft=mt,gt=(0,k.c)(ft,ht,pt,!1,null,"0d108f70",null),_t=gt.exports,bt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"locale"},[e.languages&&e.languages.length&&e.languages.length>0?e._l(e.languages,(function(i){return t("div",{key:i.value,staticClass:"locale__item"},[i.value===e.currentLocale.value||e.isCustomForm||e.keepInDom?t("".concat(e.type),e._b({ref:"field",refInFor:!0,tag:"component",attrs:{"data-lang":i.value,name:"".concat(e.attributes.name,"[").concat(i.value,"]"),fieldName:e.attributes.name,locale:i},on:{localize:e.updateLocale,change:function(t){return e.updateValue(i.value,...arguments)},blur:function(t){return e.$emit("blur")},focus:function(t){return e.$emit("focus")}}},"component",e.attributesPerLang(i.value),!1),[e._t("default")],2):e._e()],1)})):[t("".concat(e.type),e._b({ref:"field",tag:"component",attrs:{name:e.attributes.name},on:{change:function(t){return e.updateValue(!1,...arguments)},blur:function(t){return e.$emit("blur")},focus:function(t){return e.$emit("focus")}}},"component",e.attributesNoLang(),!1),[e._t("default")],2)]],2)},vt=[],yt=i(8316),wt=i.n(yt),Et={name:"A17Locale",props:{type:{type:String,default:"text"},keepInDom:{type:Boolean,default:!1},attributes:{type:Object,default:function(){return{}}},initialValues:{type:Object,default:function(){return{}}},isRequired:{type:Boolean,default:function(){return this.attributes.required||!1}}},computed:{...(0,_.ys)({currentLocale:e=>e.language.active,languages:e=>e.language.all})},data(){return{isCustomForm:!1}},mounted(){this.isCustomForm=void 0!==this.$root.$refs.customForm},methods:{attributesPerLang:function(e){const t=this.languages.find((t=>t.value===e)),i=wt()(this.attributes);return this.initialValues&&"object"===typeof this.initialValues&&this.initialValues[e]?i.initialValue=this.initialValues[e]:i.initialValue||(i.initialValue=""),i.required=!!t.published&&this.isRequired,i},attributesNoLang:function(){const e=wt()(this.attributes);return this.initialValue&&(e.initialValue=this.initialValue),e},updateLocale:function(e){this.$store.commit(v.cp.SWITCH_LANG,{oldValue:e}),this.$nextTick((function(){const e=this.$el.querySelector('[data-lang="'+this.currentLocale.value+'"]');if(e){const t=e.querySelector("input:not([disabled]), textarea:not([disabled]), select:not([disabled])");t&&t.focus()}})),this.$emit("localize",this.currentLocale)},updateValue:function(e,t){e?this.$emit("change",{locale:e,value:t}):this.$emit("change",{value:t})}}},Tt=Et,kt=(0,k.c)(Tt,bt,vt,!1,null,null,null),Ct=kt.exports,At=function(){var e=this,t=e._self._c;return t("a17-modal",{ref:"modal",attrs:{title:e.modalTitle,mode:"wide"},on:{open:e.opened}},[t("div",{staticClass:"medialibrary"},[t("div",{staticClass:"medialibrary__frame"},[t("div",{ref:"form",staticClass:"medialibrary__header"},[t("a17-filter",{attrs:{clearOption:!0},on:{submit:e.submitFilter,clear:e.clearFilters}},[e.types.length?t("ul",{staticClass:"secondarynav secondarynav--desktop",attrs:{slot:"navigation"},slot:"navigation"},e._l(e.types,(function(i){return t("li",{key:i.value,staticClass:"secondarynav__item",class:{"s--on":e.type===i.value,"s--disabled":e.type!==i.value&&e.strict}},[t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.updateType(i.value)}}},[t("span",{staticClass:"secondarynav__link"},[e._v(e._s(i.text))]),i.total>0?t("span",{staticClass:"secondarynav__number"},[e._v("("+e._s(i.total)+")")]):e._e()])])})),0):e._e(),t("div",{staticClass:"secondarynav secondarynav--mobile secondarynav--dropdown",attrs:{slot:"navigation"},slot:"navigation"},[t("a17-dropdown",{ref:"secondaryNavDropdown",attrs:{position:"bottom-left",width:"full",offset:0}},[e.selectedType?t("a17-button",{staticClass:"secondarynav__button",attrs:{variant:"dropdown-transparent",size:"small"},on:{click:function(t){return e.$refs.secondaryNavDropdown.toggle()}}},[t("span",{staticClass:"secondarynav__link"},[e._v(e._s(e.selectedType.text))]),t("span",{staticClass:"secondarynav__number"},[e._v(e._s(e.selectedType.total))])]):e._e(),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[t("ul",e._l(e.types,(function(i){return t("li",{key:i.value,staticClass:"secondarynav__item"},[t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.updateType(i.value)}}},[t("span",{staticClass:"secondarynav__link"},[e._v(e._s(i.text))]),t("span",{staticClass:"secondarynav__number"},[e._v(e._s(i.total))])])])})),0)])],1)],1),t("div",{attrs:{slot:"hidden-filters"},slot:"hidden-filters"},[t("a17-vselect",{ref:"filter",staticClass:"medialibrary__filter-item",attrs:{name:"tag",options:e.tags,placeholder:e.$trans("media-library.filter-select-label","Filter by tag"),searchable:!0,maxHeight:"175px"}}),t("a17-checkbox",{ref:"unused",staticClass:"medialibrary__filter-item",attrs:{name:"unused","initial-value":0,value:1,label:e.$trans("media-library.unused-filter-label","Show unused only")}})],1)])],1),t("div",{staticClass:"medialibrary__inner"},[t("div",{staticClass:"medialibrary__grid"},[t("aside",{staticClass:"medialibrary__sidebar"},[t("a17-mediasidebar",{attrs:{medias:e.selectedMedias,authorized:e.authorized,extraMetadatas:e.extraMetadatas,type:e.currentTypeObject,translatableMetadatas:e.translatableMetadatas},on:{clear:e.clearSelectedMedias,delete:e.deleteSelectedMedias,tagUpdated:e.reloadTags,triggerMediaReplace:e.replaceMedia}})],1),e.selectedMedias.length&&e.showInsert&&e.connector?t("footer",{staticClass:"medialibrary__footer"},[e.canInsert?t("a17-button",{attrs:{variant:"action"},on:{click:e.saveAndClose}},[e._v(e._s(e.btnLabel))]):t("a17-button",{attrs:{variant:"action",disabled:!0}},[e._v(e._s(e.btnLabel))])],1):e._e(),t("div",{ref:"list",staticClass:"medialibrary__list"},[e.authorized?t("a17-uploader",{ref:"uploader",attrs:{type:e.currentTypeObject},on:{loaded:e.addMedia,clear:e.clearSelectedMedias}}):e._e(),t("div",{staticClass:"medialibrary__list-items"},["file"===e.type?t("a17-itemlist",{attrs:{items:e.renderedMediaItems,"selected-items":e.selectedMedias,"used-items":e.usedMedias},on:{change:e.updateSelectedMedias,shiftChange:e.updateSelectedMedias}}):t("a17-mediagrid",{attrs:{items:e.renderedMediaItems,"selected-items":e.selectedMedias,"used-items":e.usedMedias},on:{change:e.updateSelectedMedias,shiftChange:e.updateSelectedMedias}}),e.loading?t("a17-spinner",{staticClass:"medialibrary__spinner"},[e._v("Loading…")]):e._e()],1)],1)])])])])])},xt=[],St=i(8108),Lt=i(7120),Dt=i(708),Mt=i(9812);const It="MEDIA-LIBRARY";var Ot={get(e,t,i,s){o().get(e,{params:t}).then((function(e){i&&"function"===typeof i&&i(e)}),(function(e){const t={message:"Media library get error.",value:e};(0,Mt.q)(It,t),s&&"function"===typeof s&&s(e)}))},update(e,t,i,s){o().put(e,t).then((function(e){i&&"function"===typeof i&&i(e)}),(function(e){const t={message:"Media library update error.",value:e};(0,Mt.q)(It,t),s&&"function"===typeof s&&s(e)}))},delete(e,t,i){o()["delete"](e).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Media library delete error.",value:e};(0,Mt.q)(It,t),i&&"function"===typeof i&&i(e)}))},bulkDelete(e,t,i,s){o().put(e,t).then((function(e){i&&"function"===typeof i&&i(e)}),(function(e){const t={message:"Media library bulk delete error.",value:e};(0,Mt.q)(It,t),s&&"function"===typeof s&&s(e)}))}},Pt=i(892),Bt=i(7300),Rt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mediagrid"},[e._l(e.itemsLoading,(function(i,s){return t("div",{directives:[{name:"show",rawName:"v-show",value:!i.isReplacement,expression:"!item.isReplacement"}],key:"mediaLoading_"+i.id,staticClass:"mediagrid__item"},[t("span",{staticClass:"mediagrid__button s--loading"},[i.error?t("span",{staticClass:"mediagrid__progressError"},[e._v("Upload Error")]):t("span",{staticClass:"mediagrid__progress"},[t("span",{staticClass:"mediagrid__progressBar",style:e.loadingProgress(s)})])])])})),e._l(e.items,(function(i){return t("div",{key:i.id,staticClass:"mediagrid__item",class:{"s--hasFilename":e.showFileName}},[t("span",{staticClass:"mediagrid__button",class:{"s--picked":e.isSelected(i),"s--used":e.isUsed(i)||!!e.replacingMediaIds[i.id],"s--disabled":i.disabled},on:{click:[function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:e.toggleSelection(i)},function(t){return t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:e.shiftToggleSelection(i):null}]}},[t("img",{staticClass:"mediagrid__img",attrs:{src:i.thumbnail}})]),e.showFileName?t("p",{staticClass:"mediagrid__name",attrs:{title:i.name}},[e._v(e._s(i.name))]):e._e()])}))],2)},Nt=[],Ft=i(6456),$t={name:"A17Mediagrid",mixins:[Ft.c],computed:{...(0,_.ys)({showFileName:e=>e.mediaLibrary.showFileName})},methods:{loadingProgress:function(e){return{width:this.itemsLoading[e].progress?this.itemsLoading[e].progress+"%":"0%"}}}},Ut=$t,Vt=(0,k.c)(Ut,Rt,Nt,!1,null,"3d6118b4",null),qt=Vt.exports,Wt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mediasidebar"},[e.mediasLoading.length?t("a17-mediasidebar-upload"):[t("div",{staticClass:"mediasidebar__inner",class:e.containerClasses},[e.hasMedia?e._e():t("p",{staticClass:"f--note"},[e._v(e._s(e.$trans("media-library.sidebar.empty-text","No file selected")))]),e.hasMultipleMedias?t("p",{staticClass:"mediasidebar__info"},[e._v(" "+e._s(e.medias.length)+" "+e._s(e.$trans("media-library.sidebar.files-selected","files selected"))+" "),t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.clear.apply(null,arguments)}}},[e._v(e._s(e.$trans("media-library.sidebar.clear","Clear")))])]):e._e(),e.hasSingleMedia?[e.isImage?t("img",{staticClass:"mediasidebar__img",attrs:{src:e.firstMedia.thumbnail,alt:e.firstMedia.original}}):e._e(),t("p",{staticClass:"mediasidebar__name"},[e._v(e._s(e.firstMedia.name))]),t("ul",{staticClass:"mediasidebar__metadatas"},[e.firstMedia.size?t("li",{staticClass:"f--small"},[e._v("File size: "+e._s(e._f("uppercase")(e.firstMedia.size)))]):e._e(),e.isImage&&e.firstMedia.width+e.firstMedia.height?t("li",{staticClass:"f--small"},[e._v(" "+e._s(e.$trans("media-library.sidebar.dimensions","Dimensions"))+": "+e._s(e.firstMedia.width)+" × "+e._s(e.firstMedia.height)+" ")]):e._e()])]:e._e(),e.hasMedia?t("a17-buttonbar",{staticClass:"mediasidebar__buttonbar"},[e.hasSingleMedia?t("a",{attrs:{href:e.firstMedia.original,download:""}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"download"}})]):e._e(),e.allowDelete&&e.authorized?t("button",{attrs:{type:"button"},on:{click:e.deleteSelectedMediasValidation}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"trash"}})]):t("button",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"button--disabled",attrs:{type:"button","data-tooltip-title":e.warningDeleteMessage}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"trash"}})]),e.hasSingleMedia?t("button",{attrs:{type:"button"},on:{click:e.replaceMedia}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"replace"}})]):e._e()]):e._e()],2),e.hasMedia?t("form",{ref:"form",staticClass:"mediasidebar__inner mediasidebar__form",on:{submit:e.submit}},[e.loading?t("span",{staticClass:"mediasidebar__loader"},[t("span",{staticClass:"loader loader--small"},[t("span")])]):e._e(),e.fieldsRemovedFromBulkEditing.includes("tags")?e._e():t("a17-vselect",{key:e.firstMedia.id+"-"+e.medias.length,attrs:{label:e.$trans("media-library.sidebar.tags"),name:"tags",multiple:!0,selected:e.hasMultipleMedias?e.sharedTags:e.firstMedia.tags,searchable:!0,emptyText:e.$trans("media-library.no-tags-found","Sorry, no tags found."),taggable:!0,pushTags:!0,size:"small",endpoint:e.type.tagsEndpoint,maxHeight:"175px"},on:{change:e.save}}),e.extraMetadatas.length&&e.isImage&&e.hasMultipleMedias&&!e.fieldsRemovedFromBulkEditing.includes("tags")?t("span",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"f--tiny f--note f--underlined",attrs:{"data-tooltip-title":"Remove this field if you do not want to update it on all selected medias","data-tooltip-theme":"default","data-tooltip-placement":"top"},on:{click:function(t){return e.removeFieldFromBulkEditing("tags")}}},[e._v("Remove from bulk edit")]):e._e(),e.hasMultipleMedias?[t("input",{attrs:{type:"hidden",name:"ids"},domProps:{value:e.mediasIds}})]:[t("input",{attrs:{type:"hidden",name:"id"},domProps:{value:e.firstMedia.id}}),e.translatableMetadatas.length>0?t("div",{staticClass:"mediasidebar__langswitcher"},[t("a17-langswitcher",{attrs:{"in-modal":!0,"all-published":!0}})],1):e._e(),e.isImage&&e.translatableMetadatas.includes("alt_text")?t("a17-locale",{attrs:{type:"a17-textfield",attributes:{label:e.$trans("media-library.sidebar.alt-text","Alt text"),name:"alt_text",type:"text",size:"small"},keepInDom:!0,initialValues:e.altValues},on:{focus:e.focus,blur:e.blur}}):e.isImage?t("a17-textfield",{attrs:{label:e.$trans("media-library.sidebar.alt-text","Alt text"),name:"alt_text",initialValue:e.firstMedia.metadatas.default.altText,size:"small"},on:{focus:e.focus,blur:e.blur}}):e._e(),e.useWysiwyg?[e.isImage&&e.translatableMetadatas.includes("caption")?t("a17-locale",{attrs:{type:"a17-wysiwyg",attributes:{options:e.wysiwygOptions,label:e.$trans("media-library.sidebar.caption","Caption"),name:"caption",size:"small"},keepInDom:!0,initialValues:e.captionValues},on:{focus:e.focus,blur:e.blur}}):e.isImage?t("a17-wysiwyg",{attrs:{type:"textarea",rows:1,size:"small",label:e.$trans("media-library.sidebar.caption","Caption"),name:"caption",options:e.wysiwygOptions,initialValue:e.firstMedia.metadatas.default.caption},on:{focus:e.focus,blur:e.blur}}):e._e()]:[e.isImage&&e.translatableMetadatas.includes("caption")?t("a17-locale",{attrs:{type:"a17-textfield",attributes:{type:"textarea",rows:1,label:e.$trans("media-library.sidebar.caption","Caption"),name:"caption",size:"small"},keepInDom:!0,initialValues:e.captionValues},on:{focus:e.focus,blur:e.blur}}):e.isImage?t("a17-textfield",{attrs:{type:"textarea",rows:1,size:"small",label:e.$trans("media-library.sidebar.caption","Caption"),name:"caption",initialValue:e.firstMedia.metadatas.default.caption},on:{focus:e.focus,blur:e.blur}}):e._e()],e._l(e.singleOnlyMetadatas,(function(i){return[!e.isImage||"text"!==i.type&&i.type||!e.translatableMetadatas.includes(i.name)?!e.isImage||"text"!==i.type&&i.type?e._e():t("a17-textfield",{key:i.name,attrs:{label:i.label,name:i.name,size:"small",initialValue:e.firstMedia.metadatas.default[i.name],type:"textarea",rows:1},on:{focus:e.focus,blur:e.blur}}):t("a17-locale",{key:i.name,attrs:{type:"a17-textfield",keepInDom:!0,attributes:{label:i.label,name:i.name,type:"textarea",rows:1,size:"small"},initialValues:e.firstMedia.metadatas.default[i.name]},on:{focus:e.focus,blur:e.blur}}),e.isImage&&"checkbox"===i.type?t("div",{key:i.name,staticClass:"mediasidebar__checkbox"},[t("a17-checkbox",{attrs:{label:i.label,name:i.name,initialValue:e.firstMedia.metadatas.default[i.name],value:1},on:{change:e.blur}})],1):e._e()]}))],e._l(e.singleAndMultipleMetadatas,(function(i){return[e.isImage&&("text"===i.type||!i.type)&&(e.hasMultipleMedias&&!e.fieldsRemovedFromBulkEditing.includes(i.name)||e.hasSingleMedia)&&e.translatableMetadatas.includes(i.name)?t("a17-locale",{key:i.name,attrs:{type:"a17-textfield",keepInDom:!0,attributes:{label:i.label,name:i.name,type:"textarea",rows:1,size:"small"},initialValues:e.sharedMetadata(i.name,"object")},on:{focus:e.focus,blur:e.blur}}):!e.isImage||"text"!==i.type&&i.type||!(e.hasMultipleMedias&&!e.fieldsRemovedFromBulkEditing.includes(i.name)||e.hasSingleMedia)?e._e():t("a17-textfield",{key:i.name,attrs:{label:i.label,name:i.name,size:"small",initialValue:e.sharedMetadata(i.name),type:"textarea",rows:1},on:{focus:e.focus,blur:e.blur}}),e.isImage&&"checkbox"===i.type&&(e.hasMultipleMedias&&!e.fieldsRemovedFromBulkEditing.includes(i.name)||e.hasSingleMedia)?t("div",{key:i.name,staticClass:"mediasidebar__checkbox"},[t("a17-checkbox",{key:i.name,attrs:{label:i.label,name:i.name,initialValue:e.sharedMetadata(i.name,"boolean"),value:1},on:{change:e.blur}})],1):e._e(),e.isImage&&e.hasMultipleMedias&&!e.fieldsRemovedFromBulkEditing.includes(i.name)?t("span",{directives:[{name:"tooltip",rawName:"v-tooltip"}],key:i.name,staticClass:"f--tiny f--note f--underlined",attrs:{"data-tooltip-title":"Remove this field if you do not want to update it on all selected medias","data-tooltip-theme":"default","data-tooltip-placement":"top"},on:{click:function(t){return e.removeFieldFromBulkEditing(i.name)}}},[e._v("Remove from bulk edit")]):e._e()]}))],2):e._e()],t("a17-modal",{ref:"warningDelete",staticClass:"modal--tiny modal--form modal--withintro",attrs:{title:"Warning Delete"}},[t("p",{staticClass:"modal--tiny-title"},[t("strong",[e._v(e._s(e.$trans("media-library.dialogs.delete.title","Are you sure ?")))])]),t("p",[e._v(e._s(e.warningDeleteMessage))]),t("a17-inputframe",[t("a17-button",{attrs:{variant:"validate"},on:{click:e.deleteSelectedMedias}},[e._v("Delete ("+e._s(e.mediasIdsToDelete.length)+") ")]),t("a17-button",{attrs:{variant:"aslink"},on:{click:function(t){return e.$refs.warningDelete.close()}}},[t("span",[e._v("Cancel")])])],1)],1)],2)},Ht=[],zt=i(4564),Kt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mediasidebar__inner mediasidebar__inner--single"},[t("p",{staticClass:"f--note"},[e._v("Uploading "+e._s(e.mediasLoading.length)+" file"+e._s(e.mediasLoading.length>1?"s":""))]),t("div",{staticClass:"mediasidebar__progress"},[t("span",{staticClass:"mediasidebar__progressBar",style:e.loadingProgress})]),t("div",{staticClass:"mediasidebar__loading"},e._l(e.mediasLoading,(function(i){return t("p",{key:i.id,staticClass:"f--small",class:{"s--error":i.error}},[i.error?t("span",{staticClass:"mediasidebar__errorMessage"},[e._v(e._s(i.errorMessage))]):e._e(),t("span",[e._v(e._s(i.name))]),e._v(" "),i.error?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.cancelUpload(i)}}},[e._v("Cancel")]):e._e()])})),0)])},jt=[],Gt={name:"A17MediaSidebarUpload",props:{selectedMedias:{default:function(){return[]}}},data:function(){return{updateInProgress:!1}},computed:{loadingProgress:function(){const e=-100+this.uploadProgress;return{transform:"translateX("+e+"%)"}},...(0,_.ys)({mediasLoading:e=>e.mediaLibrary.loading,uploadProgress:e=>e.mediaLibrary.uploadProgress})},methods:{cancelUpload:function(e){this.$store.commit(v.ol.DONE_UPLOAD_MEDIA,e)}}},Yt=Gt,Xt=(0,k.c)(Yt,Kt,jt,!1,null,"6a681c02",null),Jt=Xt.exports,Qt=i(8884),Zt={name:"A17MediaSidebar",components:{"a17-mediasidebar-upload":Jt,"a17-langswitcher":zt.c},props:{medias:{default:function(){return[]}},authorized:{type:Boolean,default:!1},type:{type:Object,required:!0},extraMetadatas:{type:Array,default(){return[]}},translatableMetadatas:{type:Array,default(){return[]}}},data:function(){return{loading:!1,focused:!1,previousSavedData:{},fieldsRemovedFromBulkEditing:[]}},filters:Qt.c,watch:{medias:function(){this.fieldsRemovedFromBulkEditing=[]}},computed:{firstMedia:function(){return this.hasMedia?this.medias[0]:null},hasMultipleMedias:function(){return this.medias.length>1},hasSingleMedia:function(){return 1===this.medias.length},hasMedia:function(){return this.medias.length>0},isImage:function(){return"image"===this.type.value},sharedTags:function(){return this.medias.map((e=>e.tags)).reduce(((e,t)=>e.filter((e=>t.includes(e)))))},sharedMetadata(){return(e,t)=>this.hasMultipleMedias?this.medias.map((t=>t.metadatas.default[e])).every(((e,t,i)=>Array.isArray(e)?e[0]==i[0]:e==i[0]))?this.firstMedia.metadatas.default[e]:"object"===t?{}:"boolean"!==t&&"":"object"===typeof this.firstMedia.metadatas.default[e]||"boolean"===t?this.firstMedia.metadatas.default[e]:{}},captionValues(){return"object"===typeof this.firstMedia.metadatas.default.caption?this.firstMedia.metadatas.default.caption:{}},altValues(){return"object"===typeof this.firstMedia.metadatas.default.altText?this.firstMedia.metadatas.default.altText:{}},mediasIds:function(){return this.medias.map((function(e){return e.id})).join(",")},mediasIdsToDelete:function(){return this.medias.filter((e=>e.deleteUrl)).map((e=>e.id))},mediasIdsToDeleteString:function(){return this.mediasIdsToDelete.join(",")},allowDelete:function(){return this.medias.every((e=>e.deleteUrl))||this.hasMultipleMedias&&!this.medias.every((e=>!e.deleteUrl))},warningDeleteMessage:function(){return this.allowDelete?this.hasMultipleMedias?this.$trans("media-library.dialogs.delete.allow-delete-multiple-medias","Some files are used and can't be deleted. Do you want to delete the others ?"):this.$trans("media-library.dialogs.delete.allow-delete-one-media","This file is used and can't be deleted. Do you want to delete the others ?"):this.hasMultipleMedias?this.$trans("media-library.dialogs.delete.dont-allow-delete-multiple-medias","This files are used and can't be deleted."):this.$trans("media-library.dialogs.delete.dont-allow-delete-one-media","This file is used and can't be deleted.")},containerClasses:function(){return{"mediasidebar__inner--multi":this.hasMultipleMedias,"mediasidebar__inner--single":this.hasSingleMedia}},singleAndMultipleMetadatas:function(){return this.extraMetadatas.filter((e=>e.multiple&&!this.translatableMetadatas.includes(e.name)))},singleOnlyMetadatas:function(){return this.extraMetadatas.filter((e=>!e.multiple||e.multiple&&this.translatableMetadatas.includes(e.name)))},...(0,_.ys)({mediasLoading:e=>e.mediaLibrary.loading,useWysiwyg:e=>e.mediaLibrary.config.useWysiwyg,wysiwygOptions:e=>e.mediaLibrary.config.wysiwygOptions})},methods:{replaceMedia:function(){this.$root.$refs.replaceWarningMediaLibrary?this.$root.$refs.replaceWarningMediaLibrary.open((()=>{this.triggerMediaReplace()})):this.triggerMediaReplace()},triggerMediaReplace:function(){this.$emit("triggerMediaReplace",{id:this.getMediaToReplaceId()})},deleteSelectedMediasValidation:function(){if(this.loading)return!1;this.mediasIdsToDelete.length===this.medias.length?this.$root.$refs.deleteWarningMediaLibrary?this.$root.$refs.deleteWarningMediaLibrary.open((()=>{this.deleteSelectedMedias()})):this.deleteSelectedMedias():this.$refs.warningDelete.open()},deleteSelectedMedias:function(){if(this.loading)return!1;this.loading=!0,this.hasMultipleMedias?Ot.bulkDelete(this.firstMedia.deleteBulkUrl,{ids:this.mediasIdsToDeleteString},(e=>{this.loading=!1,this.$emit("delete",this.mediasIdsToDelete),this.$refs.warningDelete.close()}),(e=>{this.$store.commit(v.gp.SET_NOTIF,{message:e.data.message,variant:"error"})})):Ot.delete(this.firstMedia.deleteUrl,(e=>{this.loading=!1,this.$emit("delete",this.mediasIdsToDelete),this.$refs.warningDelete.close()}),(e=>{this.$store.commit(v.gp.SET_NOTIF,{message:e.data.message,variant:"error"})}))},clear:function(){this.$emit("clear")},getFormData:function(e){return(0,Lt.c)(e)},getMediaToReplaceId:function(){return this.firstMedia.id},removeFieldFromBulkEditing:function(e){this.fieldsRemovedFromBulkEditing.push(e)},focus:function(){this.focused=!0},blur:function(){this.focused=!1,this.save();const e=this.$refs.form,t=this.getFormData(e);this.hasSingleMedia?(t.hasOwnProperty("alt_text")?this.firstMedia.metadatas.default.altText=t.alt_text:this.firstMedia.metadatas.default.altText="",t.hasOwnProperty("caption")?this.firstMedia.metadatas.default.caption=t.caption:this.firstMedia.metadatas.default.caption="",this.extraMetadatas.forEach((e=>{t.hasOwnProperty(e.name)?this.firstMedia.metadatas.default[e.name]=t[e.name]:this.firstMedia.metadatas.default[e.name]=""}))):this.singleAndMultipleMetadatas.forEach((e=>{t.hasOwnProperty(e.name)&&this.medias.forEach((i=>{i.metadatas.default[e.name]=t[e.name]}))}))},save:function(){this.$nextTick((()=>{const e=this.$refs.form;if(!e)return;const t=this.getFormData(e);J()(t,this.previousSavedData)||this.loading||(this.previousSavedData=t,this.update(e))}))},submit:function(e){e.preventDefault(),this.save()},update:function(e){if(this.loading)return;this.loading=!0;const t=this.getFormData(e);t.fieldsRemovedFromBulkEditing=this.fieldsRemovedFromBulkEditing;const i=this.hasMultipleMedias?this.firstMedia.updateBulkUrl:this.firstMedia.updateUrl;Ot.update(i,t,(e=>{this.loading=!1,e.data.tags&&this.$emit("tagUpdated",e.data.tags),this.hasMultipleMedias&&e.data.items&&this.medias.forEach((function(t){e.data.items.some((function(e){return e.id===t.id&&(t.tags=e.tags),e.id===t.id}))}))}),(e=>{this.loading=!1,e.data.message&&this.$store.commit(v.gp.SET_NOTIF,{message:e.data.message,variant:"error"})}))}}},ei=Zt,ti=(0,k.c)(ei,Wt,Ht,!1,null,"4f7e4b44",null),ii=ti.exports,si=function(){var e=this,t=e._self._c;return t("div",{staticClass:"uploader"},[t("div",{ref:"uploaderDropzone",staticClass:"uploader__dropzone"},[t("div",{ref:"uploaderBrowseButton",staticClass:"button"},[e._v(e._s(e.$trans("uploader.upload-btn-label","Add new")))]),t("div",{staticClass:"uploader__dropzone--desktop"},[e._v(e._s(e.$trans("uploader.dropzone-text","or drop new files here")))])])])},ai=[],ni=i(2628),oi=i.n(ni),ri=i(3072),li=i(5104),di=i(4588);const ci=i(9632),ui=/[\/\?<>\\:\*\|":]/g,hi=/[\x00-\x1f\x80-\x9f]/g,pi=/^\.+$/,mi=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,fi=/[\. ]+$/,gi=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"ŒŒ"},{base:"oe",letters:"œœ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],_i={};for(let Ln=0;Ln0&&(t="."+e.join(", .")),{allowedExtensions:e,acceptFiles:t,stopOnFirstInvalidFile:!1}}},methods:{initUploader:function(){const e=this.$refs.uploaderBrowseButton,t={debug:!0,maxConnections:5,button:e,retry:{enableAuto:!1},callbacks:{onSubmit:this._onSubmitCallback.bind(this),onProgress:this._onProgressCallback.bind(this),onError:this._onErrorCallback.bind(this),onComplete:this._onCompleteCallback.bind(this),onAllComplete:this._onAllCompleteCallback.bind(this),onStatusChange:this._onStatusChangeCallback.bind(this),onTotalProgress:this._onTotalProgressCallback.bind(this)},text:{fileInputTitle:"Browse..."},messages:{retryFailTooManyItemsError:"Retry failed - you have reached your file limit.",sizeError:"{file} is too large, maximum file size is {sizeLimit}.",tooManyItemsError:"Too many items ({netItems}) would be uploaded. Item limit is {itemLimit}.",typeError:"{file} has an invalid extension. Valid extension(s): {extensions}."}};this._uploader="s3"===this.uploaderConfig.endpointType?new li.c({options:{...t,validation:{...this.uploaderValidation},objectProperties:{key:e=>this.unique_folder_name+"/"+yi(this._uploader.methods.getName(e)),region:this.uploaderConfig.endpointRegion,bucket:this.uploaderConfig.endpointBucket,acl:this.uploaderConfig.acl},request:{endpoint:this.uploaderConfig.endpoint,accessKey:this.uploaderConfig.accessKey},signature:{endpoint:this.uploaderConfig.signatureEndpoint,version:4,customHeaders:{"X-CSRF-TOKEN":this.uploaderConfig.csrfToken}},uploadSuccess:{endpoint:this.uploaderConfig.successEndpoint,customHeaders:{"X-CSRF-TOKEN":this.uploaderConfig.csrfToken}}}}):"azure"===this.uploaderConfig.endpointType?new ri.c({options:{...t,validation:{...this.uploaderValidation},cors:{expected:!0,sendCredentials:!0},blobProperties:{name:e=>new Promise((t=>{t(this.unique_folder_name+"/"+yi(this._uploader.methods.getName(e)))}))},request:{endpoint:this.uploaderConfig.endpoint},signature:{endpoint:this.uploaderConfig.signatureEndpoint,version:4,customHeaders:{"X-CSRF-TOKEN":this.uploaderConfig.csrfToken}},uploadSuccess:{endpoint:this.uploaderConfig.successEndpoint,customHeaders:{"X-CSRF-TOKEN":this.uploaderConfig.csrfToken}}}}):new di.c({options:{...t,validation:{...this.uploaderValidation,sizeLimit:1048576*this.uploaderConfig.filesizeLimit},request:{endpoint:this.uploaderConfig.endpoint,customHeaders:{"X-CSRF-TOKEN":this.uploaderConfig.csrfToken}}}})},replaceMedia:function(e){this.media_to_replace_id=e;const t=this.$refs.uploaderBrowseButton.querySelectorAll('[name = "qqfile"]');t[Array.from(t).length-1].click()},loadingProgress:function(e){this.$store.commit(v.ol.PROGRESS_UPLOAD_MEDIA,e)},loadingFinished:function(e,t){this.$emit("loaded",t),this.$store.commit(v.ol.DONE_UPLOAD_MEDIA,e)},loadingError:function(e){this.$store.commit(v.ol.ERROR_UPLOAD_MEDIA,e)},uploadProgress:function(e){this.$store.commit(v.ol.PROGRESS_UPLOAD,e)},_onCompleteCallback(e,t,i,s){const a=this.loadingMedias.findIndex((t=>t.id===this._uploader.methods.getUuid(e)));i.success?this.loadingFinished(this.loadingMedias[a],i.media):this.loadingError(this.loadingMedias[a])},_onAllCompleteCallback(e,t){this.unique_folder_name=null,this.uploadProgress(0)},_onSubmitCallback(e,t){this.$emit("clear"),this.unique_folder_name=this.unique_folder_name||this.uploaderConfig.endpointRoot+oi().getUniqueId(),this._uploader.methods.setParams({unique_folder_name:this.unique_folder_name,media_to_replace_id:this.media_to_replace_id},e);const i=URL.createObjectURL(this._uploader.methods.getFile(e)),s=new Image;s.onload=()=>{this._uploader.methods.setParams({width:s.width,height:s.height,unique_folder_name:this.unique_folder_name,media_to_replace_id:this.media_to_replace_id},e),this.media_to_replace_id=null},s.src=i;const a={id:this._uploader.methods.getUuid(e),name:yi(t),progress:0,error:!1,errorMessage:null,isReplacement:!!this.media_to_replace_id,replacementId:this.media_to_replace_id};"file"===this.type.value&&(this.media_to_replace_id=null),this.loadingMedias.push(a),this.loadingProgress(a)},_onProgressCallback(e,t,i,s){const a=this.loadingMedias.findIndex((t=>t.id===this._uploader.methods.getUuid(e)));if(a>=0){const e=this.loadingMedias[a];e.progress=i/s*100||0,e.error=!1,this.loadingProgress(e)}},_onErrorCallback(e,t,i,s){const a=e?this.loadingMedias.findIndex((t=>t.id===this._uploader.methods.getUuid(e))):-1;if(a>=0)this.loadingMedias[a].errorMessage=i,this.loadingError(this.loadingMedias[a]);else{const s={id:e?this._uploader.methods.getUuid(e):Math.floor(1e3*Math.random()),name:yi(t),progress:0,error:!0,errorMessage:i};this.loadingMedias.push(s),this.loadingProgress(s),this.loadingError(this.loadingMedias[this.loadingMedias.length-1])}},_onStatusChangeCallback(e,t,i){if("retrying upload"===i){const t=this.loadingMedias.findIndex((function(t){return t.id===e}));if(t>=0){const e=this.loadingMedias[t];e.progress=0,e.error=!1,this.loadingProgress(e)}}},_onTotalProgressCallback(e,t){const i=Math.floor(e/t*100);this.uploadProgress(i)},_onDropError(e,t){console.error(e,t)},_onProcessingDroppedFilesComplete(e){this._uploader.methods.addFiles(e)}},watch:{type:function(){this._uploader&&this.initUploader()}},mounted(){this.initUploader();const e=this.$refs.uploaderDropzone;this._qqDropzone&&this._qqDropzone.dispose(),this._qqDropzone=new(oi().DragAndDrop)({dropZoneElements:[e],allowMultipleItems:!0,callbacks:{dropError:this._onDropError.bind(this),processingDroppedFilesComplete:this._onProcessingDroppedFilesComplete.bind(this)}})},beforeDestroy(){this._qqDropzone&&this._qqDropzone.dispose()}},Ei=wi,Ti=(0,k.c)(Ei,si,ai,!1,null,"f229897e",null),ki=Ti.exports,Ci={name:"A17Medialibrary",components:{"a17-filter":Pt.c,"a17-mediasidebar":ii,"a17-uploader":ki,"a17-mediagrid":qt,"a17-itemlist":Bt.c,"a17-spinner":St.c,"a17-checkbox":j},props:{modalTitlePrefix:{type:String,default:function(){return this.$trans("media-library.title","Media Library")}},btnLabelSingle:{type:String,default:function(){return this.$trans("media-library.insert","Insert")}},btnLabelUpdate:{type:String,default:function(){return this.$trans("media-library.update","Update")}},btnLabelMulti:{type:String,default:function(){return this.$trans("media-library.insert","Insert")}},initialPage:{type:Number,default:1},authorized:{type:Boolean,default:!1},showInsert:{type:Boolean,default:!0},extraMetadatas:{type:Array,default(){return[]}},translatableMetadatas:{type:Array,default(){return[]}}},data:function(){return{loading:!1,maxPage:20,mediaItems:[],selectedMedias:[],gridHeight:0,page:this.initialPage,tags:[],lastScrollTop:0,gridLoaded:!1}},computed:{renderedMediaItems:function(){return this.mediaItems.map((e=>(e.disabled=this.filesizeMax>0&&e.filesizeInMb>this.filesizeMax||this.widthMin>0&&e.width0&&e.heighte.value===this.type))},endpoint:function(){return this.currentTypeObject.endpoint},modalTitle:function(){return this.connector?this.indexToReplace>-1?this.modalTitlePrefix+" – "+this.btnLabelUpdate:this.selectedMedias.length>1?this.modalTitlePrefix+" – "+this.btnLabelMulti:this.modalTitlePrefix+" – "+this.btnLabelSingle:this.modalTitlePrefix},btnLabel:function(){let e=this.$trans("media-library.types.single."+this.type,this.type);return this.indexToReplace>-1?this.btnLabelUpdate+" "+e:(this.selectedMedias.length>1&&(e=this.$trans("media-library.types.multiple."+this.type,this.type)),this.btnLabelSingle+" "+e)},usedMedias:function(){return this.selected[this.connector]||[]},selectedType:function(){const e=this,t=e.types.filter((function(t){return t.value===e.type}));return t[0]},canInsert:function(){return!this.selectedMedias.some((e=>!!this.usedMedias.find((t=>t.id===e.id))))},...(0,_.ys)({connector:e=>e.mediaLibrary.connector,max:e=>e.mediaLibrary.max,filesizeMax:e=>e.mediaLibrary.filesizeMax,widthMin:e=>e.mediaLibrary.widthMin,heightMin:e=>e.mediaLibrary.heightMin,type:e=>e.mediaLibrary.type,types:e=>e.mediaLibrary.types,strict:e=>e.mediaLibrary.strict,selected:e=>e.mediaLibrary.selected,indexToReplace:e=>e.mediaLibrary.indexToReplace})},watch:{type:function(){this.clearMediaItems(),this.gridLoaded=!1}},methods:{replaceMedia:function(e){let{id:t}=e;this.$refs.uploader.replaceMedia(t)},open:function(){this.$refs.modal.open()},close:function(){this.$refs.modal.hide()},opened:function(){if(this.gridLoaded||this.reloadGrid(),this.listenScrollPosition(),this.selectedMedias=[],this.connector&&this.indexToReplace>-1){const e=this.selected[this.connector][this.indexToReplace];e&&this.selectedMedias.push(e)}},updateType:function(e){this.loading||this.strict||this.type!==e&&(this.$store.commit(v.ol.UPDATE_MEDIA_TYPE,e),this.submitFilter())},addMedia:function(e){const t=this.mediaItems.findIndex((function(t){return t.id===e.id}));if(t>-1){for(const t in this.selected)this.selected[t].forEach(((i,s)=>{if(e.id===i.id){const a=[];for(const t in i.crops)a[t]={height:e.height===i.height?i.crops[t].height:e.height,name:t,width:e.width===i.width?i.crops[t].width:e.width,x:e.width===i.width?i.crops[t].x:0,y:e.height===i.height?i.crops[t].y:0};this.$store.commit(v.ol.UPDATE_MEDIAS,{index:s,media:{...e,width:e.width===i.width?i.width:e.width,height:e.height===i.height?i.height:e.height,crops:a},mediaRole:t})}}));this.$set(this.mediaItems,t,e),this.selectedMedias.unshift(e)}else this.mediaItems.unshift(e),this.$store.commit(v.ol.INCREMENT_MEDIA_TYPE_TOTAL,this.type),this.updateSelectedMedias(e.id)},updateSelectedMedias:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=e.id,s=this.selectedMedias.filter((function(e){return e.id===i}));if(0===s.length){if(1===this.max&&this.clearSelectedMedias(),this.selectedMedias.length>=this.max&&this.max>0)return;if(t&&this.selectedMedias.length>0){const e=this.selectedMedias[this.selectedMedias.length-1],t=this.mediaItems.findIndex((t=>t.id===e.id)),s=this.mediaItems.findIndex((e=>e.id===i));if(-1===s&&-1===t)return;let a=null,n=null;t{if(this.selectedMedias.length>=this.max&&this.max>0)return;const t=this.selectedMedias.findIndex((t=>t.id===e.id));-1===t&&this.selectedMedias.push(e)}))}else{const e=this.mediaItems.filter((function(e){return e.id===i}));e.length&&this.selectedMedias.push(e[0])}}else this.selectedMedias=this.selectedMedias.filter((function(e){return e.id!==i}))},getFormData:function(e){let t=(0,Lt.c)(e);return t?t.page=this.page:t={page:this.page},t.type=this.type,Array.isArray(t.unused)&&t.unused.length&&(t.unused=t.unused[0]),t},clearFilters:function(){const e=this;if(this.$refs.filter&&(this.$refs.filter.value=null),this.$refs.unused){const e=this.$refs.unused.$el.querySelector("input");e&&e.checked&&e.click()}this.$nextTick((function(){e.submitFilter()}))},clearSelectedMedias:function(){this.selectedMedias.splice(0)},deleteSelectedMedias:function(e){let t=[];e&&e.length!==this.selectedMedias.length&&(t=this.selectedMedias.filter((e=>!e.deleteUrl))),e.forEach((()=>{this.$store.commit(v.ol.DECREMENT_MEDIA_TYPE_TOTAL,this.type)})),this.mediaItems=this.mediaItems.filter((e=>!this.selectedMedias.includes(e)||t.includes(e))),this.selectedMedias=t,this.mediaItems.length<=40&&this.reloadGrid()},clearMediaItems:function(){this.mediaItems.splice(0)},reloadGrid:function(){this.loading=!0;const e=this.$refs.form,t=this.getFormData(e);Ot.get(this.endpoint,t,(e=>{e.data.items.forEach((e=>{this.mediaItems.find((t=>t.id===e.id))||this.mediaItems.push(e)})),this.maxPage=e.data.maxPage||1,this.tags=e.data.tags||[],this.$store.commit(v.ol.UPDATE_MEDIA_TYPE_TOTAL,{type:this.type,total:e.data.total}),this.loading=!1,this.listenScrollPosition(),this.gridLoaded=!0}),(e=>{this.$store.commit(v.gp.SET_NOTIF,{message:e.data.message,variant:"error"})}))},reloadTags:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.tags=e},submitFilter:function(e){const t=this,i=this.$refs.list;this.page=1,this.clearMediaItems(),this.clearSelectedMedias(),0!==i.scrollTop?(0,Dt.c)({el:i,offset:0,easing:"easeOut",onComplete:function(){t.reloadGrid()}}):t.reloadGrid()},listenScrollPosition:function(){this.$nextTick((function(){if(!this.gridLoaded)return;const e=this.$refs.list;this.gridHeight!==e.scrollHeight&&e.addEventListener("scroll",this.scrollToPaginate)}))},scrollToPaginate:function(){if(!this.gridLoaded)return;const e=this.$refs.list,t=10;e.scrollTop>this.lastScrollTop&&e.scrollTop+e.offsetHeight>e.scrollHeight-t&&(e.removeEventListener("scroll",this.scrollToPaginate),this.maxPage>this.page?(this.page=this.page+1,this.reloadGrid()):this.gridHeight=e.scrollHeight),this.lastScrollTop=e.scrollTop},saveAndClose:function(){this.$store.commit(v.ol.SAVE_MEDIAS,this.selectedMedias),this.close()}}},Ai=Ci,xi=(0,k.c)(Ai,At,xt,!1,null,"aaf9470e",null),Si=xi.exports,Li=function(){var e=this,t=e._self._c;return t("div",{staticClass:"media",class:{"media--hoverable":e.hover,"media--slide":e.isSlide}},[t("div",{staticClass:"media__field"},[e.hasMedia?t("div",{staticClass:"media__info"},[t("div",{staticClass:"media__img"},[t("div",{staticClass:"media__imgFrame"},[t("div",{staticClass:"media__imgCentered",style:e.cropThumbnailStyle},[e.cropSrc&&e.showImg?t("img",{ref:"mediaImg",class:e.cropThumbnailClass,attrs:{src:e.cropSrc}}):e._e()]),e.disabled?e._e():t("div",{staticClass:"media__edit",on:{click:function(t){return e.openMediaLibrary(1,e.mediaKey,e.index)}}},[t("span",{staticClass:"media__edit--button"},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"edit"}})])])])]),e.disabled?e._e():t("ul",{staticClass:"media__metadatas"},[t("li",{staticClass:"media__name",on:{click:function(t){return e.openMediaLibrary(1,e.mediaKey,e.index)}}},[t("strong",{attrs:{title:e.media.name}},[e._v(e._s(e.media.name))])]),e.media.size?t("li",{staticClass:"f--small"},[e._v("File size: "+e._s(e._f("uppercase")(e.media.size)))]):e._e(),e.media.width+e.media.height?t("li",{staticClass:"f--small"},[e._v(e._s(e.$trans("fields.medias.original-dimensions"))+": "+e._s(e.media.width)+" × "+e._s(e.media.height)+" ")]):e._e(),e.cropInfos&&e.activeCrop?t("li",{staticClass:"f--small media__crop-link",on:{click:e.openCropMedia}},e._l(e.cropInfos,(function(i,s){return t("p",{key:s,staticClass:"f--small f--note hide--xsmall"},[t("span",{domProps:{innerHTML:e._s(i)}})])})),0):e._e(),t("li",{staticClass:"f--small"},[e.withAddInfo?t("a",{staticClass:"f--link-underlined--o",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.metadatasInfos.apply(null,arguments)}}},[e._v(e._s(e.metadatas.text))]):e._e()])]),e.disabled?e._e():t("a17-buttonbar",{staticClass:"media__actions"},[t("a",{attrs:{href:e.media.original,download:""}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"download"}})]),e.activeCrop?t("button",{attrs:{type:"button"},on:{click:e.openCropMedia}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"crop"}})]):e._e(),t("button",{attrs:{type:"button"},on:{click:e.deleteMediaClick}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"trash"}})])]),t("div",{staticClass:"media__actions-dropDown"},[t("a17-dropdown",{ref:"dropDown",attrs:{position:"right"}},[t("a17-button",{attrs:{size:"icon",variant:"icon"},on:{click:function(t){return e.$refs.dropDown.toggle()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"more-dots"}})]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[t("a",{attrs:{href:e.media.original,download:""}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"download"}}),e._v(e._s(e.$trans("fields.medias.download")))]),e.activeCrop?t("button",{attrs:{type:"button"},on:{click:e.openCropMedia}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"crop"}}),e._v(e._s(e.$trans("fields.medias.crop"))+" ")]):e._e(),t("button",{attrs:{type:"button"},on:{click:e.deleteMediaClick}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"trash"}}),e._v(e._s(e.$trans("fields.medias.delete")))])])],1)],1)],1):e._e(),e.hasMedia?e._e():t("a17-button",{attrs:{variant:"ghost",disabled:e.disabled},on:{click:e.openMediaLibrary}},[e._v(e._s(e.btnLabel))]),this.$slots.default?t("p",{staticClass:"media__note f--small"},[e._t("default")],2):e._e(),e.hasMedia&&e.withAddInfo?t("div",{staticClass:"media__metadatas--options",class:{"s--active":e.metadatas.active}},[t("a17-mediametadata",{attrs:{name:e.metadataName,label:e.$trans("fields.medias.alt-text","Alt Text"),id:"altText",media:e.media,maxlength:e.altTextMaxLength},on:{change:e.updateMetadata}}),e.withCaption?t("a17-mediametadata",{attrs:{wysiwyg:e.useWysiwyg,"wysiwyg-options":e.wysiwygOptions,type:"text",name:e.metadataName,label:e.$trans("fields.medias.caption","Caption"),id:"caption",media:e.media,maxlength:e.captionMaxLength},on:{change:e.updateMetadata}}):e._e(),e.withVideoUrl?t("a17-mediametadata",{attrs:{name:e.metadataName,label:e.$trans("fields.medias.video-url","Video URL (optional)"),id:"video",media:e.media},on:{change:e.updateMetadata}}):e._e(),e._l(e.extraMetadatas,(function(i){return[e.extraMetadatas.length>0?t("a17-mediametadata",{key:i.name,attrs:{type:i.type,name:e.metadataName,wysiwyg:i.wysiwyg||!1,"wysiwyg-options":i.wysiwygOptions||e.wysiwygOptions,label:i.label,id:i.name,media:e.media,maxlength:i.maxlength||0},on:{change:e.updateMetadata}}):e._e()]}))],2):e._e()],1),e.hasMedia&&e.activeCrop?t("a17-modal",{ref:e.cropModalName,staticClass:"modal--cropper",attrs:{forceClose:!0,title:e.$trans("fields.medias.crop-edit"),mode:"medium"}},[t("a17-cropper",{key:e.cropperKey,attrs:{media:e.media,aspectRatio:16/9,context:e.cropContext},on:{"crop-end":e.cropMedia}},[t("a17-button",{staticClass:"cropper__button",attrs:{variant:"action"},on:{click:function(t){return e.$refs[e.cropModalName].close()}}},[e._v(e._s(e.$trans("fields.medias.crop-save")))])],1)],1):e._e(),t("input",{attrs:{name:e.inputName,type:"hidden"},domProps:{value:JSON.stringify(e.media)}})],1)},Di=[],Mi=i(3932),Ii=i.n(Mi),Oi=function(){var e=this,t=e._self._c;return t("div",{staticClass:"cropper"},[t("header",{staticClass:"cropper__header"},[e.multiCrops?t("ul",{staticClass:"cropper__breakpoints"},e._l(e.cropOptions,(function(i,s,a){return t("li",{key:s,class:{"s--active":e.toggleBreakpoint===a},on:{click:function(t){return e.changeCrop(s,a)}}},[e._v(e._s(e._f("capitalize")(s)))])})),0):e._e()]),t("div",{staticClass:"cropper__content"},[t("div",{ref:"cropWrapper",staticClass:"cropper__wrapper"},[t("img",{ref:"cropImage",staticClass:"cropper__img",attrs:{src:e.currentMedia.medium||e.currentMedia.original,alt:e.currentMedia.name}})])]),t("footer",{staticClass:"cropper__footer"},[e.ratiosByContext.length>1?t("ul",{staticClass:"cropper__ratios"},e._l(e.ratiosByContext,(function(i){return t("li",{key:i.name,staticClass:"f--small",class:{"s--active":e.currentRatioName===i.name},on:{click:function(t){return e.changeRatio(i)}}},[e._v(e._s(e._f("capitalize")(i.name)))])})),0):e._e(),t("span",{staticClass:"cropper__values f--small hide--xsmall",class:e.cropperWarning},[e._v(e._s(e.cropValues.original.width)+" × "+e._s(e.cropValues.original.height))]),e._t("default")],2)])},Pi=[],Bi=i(3616),Ri=i.n(Bi),Ni=i(844);const Fi=(e,t,i)=>({x:Math.round(e.x*t.width/i.width),y:Math.round(e.y*t.height/i.height),width:Math.round(e.width*t.width/i.width),height:Math.round(e.height*t.height/i.height)});var $i={name:"a17Cropper",props:{media:{type:Object,default:()=>{}},context:{type:String,default:""}},mixins:[Ni.c],data:function(){return{cropper:null,currentMedia:this.media,currentCrop:Object.keys(this.media.crops)[0],toggleBreakpoint:0,cropValues:{natural:{width:null,height:null},original:{width:this.media.crops[Object.keys(this.media.crops)[0]].width,height:this.media.crops[Object.keys(this.media.crops)[0]].height}},minCropValues:{width:0,height:0},currentRatioName:this.media.crops[Object.keys(this.media.crops)[0]].name}},watch:{media:function(e){this.currentMedia=e}},computed:{cropOptions:function(){return this.allCrops.hasOwnProperty(this.context)?this.allCrops[this.context]:{}},crop:function(){return this.currentMedia.crops[this.currentCrop]||{}},multiCrops:function(){return Object.keys(this.cropOptions).length>1},ratiosByContext:function(){const e=this.cropOptions[this.currentCrop];return e||[]},cropperOpts:function(){return{...this.defaultCropsOpts,cropmove:()=>{this.updateCropperValues()},cropend:()=>{this.sendCropperValues()}}},cropperWarning:function(){return{cropper__warning:this.cropValues.original.widthe.mediaLibrary.crops})},filters:Qt.c,mounted:function(){const e=this.cropperOpts,t=this.$refs.cropImage,i=this.$refs.cropWrapper,s=new Image;s.addEventListener("load",(()=>{i.style.maxWidth=i.getBoundingClientRect().width+"px",i.style.minHeight=i.getBoundingClientRect().height+"px",this.cropper=new(Ri())(t,e)}),{once:!0,passive:!0,capture:!0}),s.src=this.currentMedia.medium||this.currentMedia.original,t.addEventListener("ready",(()=>{this.cropValues.natural.width=s.naturalWidth,this.cropValues.natural.height=s.naturalHeight,this.updateCrop()}),{once:!0,passive:!0,capture:!0})},methods:{initAspectRatio:function(){const e=this.ratiosByContext,t=e.find((e=>e.name===this.currentRatioName));if("undefined"!==typeof t&&t)return this.minCropValues.width=t.minValues?t.minValues.width:0,this.minCropValues.height=t.minValues?t.minValues.height:0,void this.cropper.setAspectRatio(t.ratio);this.cropper.setAspectRatio(this.aspectRatio)},changeCrop:function(e,t){this.currentCrop=e,this.currentRatioName=this.crop.name||this.cropOptions[e][0].name,this.toggleBreakpoint=t,this.updateCrop(),this.sendCropperValues()},changeRatio:function(e){this.currentRatioName=e.name,this.updateCrop(),this.sendCropperValues()},updateCrop:function(){this.initAspectRatio(),this.initCrop(),this.updateCropperValues()},updateCropperValues:function(){const e=this.cropper.getData(!0),t=this.toOriginalCrop(e);this.cropValues.original.width=t.width,this.cropValues.original.height=t.height},initCrop:function(){const e=this.toNaturalCrop(this.crop);this.cropper.setData({x:e.x}),this.cropper.setData({y:e.y}),this.cropper.setData({width:e.width}),this.cropper.setData({height:e.height})},test:function(){const e=this.toNaturalCrop({x:0,y:0,width:380,height:475});this.cropper.setAspectRatio(.8),this.cropper.setData(e)},sendCropperValues:function(){const e={values:{}};e.values[this.currentCrop]=this.toOriginalCrop(this.cropper.getData(!0)),e.values[this.currentCrop].name=this.currentRatioName,this.$emit("crop-end",e)},toNaturalCrop:function(e){return Fi(e,this.cropValues.natural,this.currentMedia)},toOriginalCrop:function(e){return Fi(e,this.currentMedia,this.cropValues.natural)}},beforeDestroy:function(){this.cropper.destroy()}},Ui=$i,Vi=(0,k.c)(Ui,Oi,Pi,!1,null,"4078e85d",null),qi=Vi.exports,Wi=function(){var e=this,t=e._self._c;return e.languages.length>1&&"text"===e.fieldType?t("a17-locale",{attrs:{type:e.wysiwyg?"a17-wysiwyg":"a17-textfield",initialValues:e.initialValues,attributes:e.attributes},on:{change:e.saveMetadata}}):"text"===e.fieldType&&e.wysiwyg?t("div",[t("a17-wysiwyg",{attrs:{options:e.wysiwygOptions,label:e.label,name:e.fieldName,type:e.fieldType,initialValue:e.initialValue,"in-store":"value",maxlength:e.maxlength},on:{change:e.saveMetadata}}),t("p",{staticClass:"f--note f--small",domProps:{innerHTML:e._s(e.placeholder)}})],1):"text"===e.fieldType?t("a17-textfield",{attrs:{label:e.label,name:e.fieldName,type:"text",placeholder:e.placeholder,initialValue:e.initialValue,"in-store":"value",maxlength:e.maxlength},on:{change:e.saveMetadata}}):"checkbox"===e.fieldType?t("div",{staticClass:"mediaMetadata__checkbox"},[t("a17-checkbox",{attrs:{label:e.label,name:e.fieldName,initialValue:e.initialValue,value:1,inStore:"value"},on:{change:e.saveMetadata}})],1):e._e()},Hi=[],zi={name:"A17MediaMetadata",props:{media:{type:Object,default:()=>{}},name:{type:String,required:!0},id:{type:String,required:!0},label:{type:String,required:!0},wysiwyg:{type:Boolean,default:!1},wysiwygOptions:{type:Object,required:!1,default:function(){return{}}},type:{type:String,required:!1},maxlength:{type:Number,required:!1,default:0}},data:function(){return{initialValues:{},initialValue:""}},computed:{fieldName:function(){return"".concat(this.name,"[").concat(this.id,"]")},fieldType:function(){return this.type?this.type:"text"},defaultMetadatas:function(){return this.media.hasOwnProperty("metadatas")&&this.media.metadatas.default[this.id]||!1},customMetadatas:function(){return this.media.hasOwnProperty("metadatas")&&this.media.metadatas.custom[this.id]||!1},attributes:function(){return{label:this.label,name:this.fieldName,type:"text",placeholder:this.placeholder,options:this.wysiwygOptions,inStore:"value",maxlength:this.maxlength}},placeholder:function(){return this.defaultMetadatas?"object"===typeof this.defaultMetadatas?this.defaultMetadatas.hasOwnProperty(this.currentLocale)?this.defaultMetadatas[this.currentLocale]:"":null!==this.defaultMetadatas?this.defaultMetadatas:"":""},...(0,_.ys)({languages:e=>e.language.all,currentLocale:e=>e.language.active.value})},methods:{saveMetadata:function(e){if(!e.locale){const t=e;e={value:t}}e.id=this.id,this.$emit("change",e)}},mounted:function(){const e={};let t="",i=0;this.languages.forEach((s=>{const a=s.value;if(this.customMetadatas){this.customMetadatas[a]?e[a]=this.customMetadatas[a]:!0!==this.customMetadatas&&"string"!==typeof this.customMetadatas||0!==i?e[a]="":(e[a]=this.customMetadatas,t=this.customMetadatas);const s={};s.name=this.fieldName,s.value=e[a],this.languages.length>1&&(s.locale=a),this.$store.commit(v.tt.UPDATE_FORM_FIELD,s)}i++})),this.initialValues=e,this.initialValue=t}},Ki=zi,ji=(0,k.c)(Ki,Wi,Hi,!1,null,"6c6bb80c",null),Gi=ji.exports,Yi={props:{withAddInfo:{type:Boolean,default:!0},withVideoUrl:{type:Boolean,default:!1},withCaption:{type:Boolean,default:!0},altTextMaxLength:{type:Number,default:0},captionMaxLength:{type:Number,default:0},note:{type:String,default:""},cropContext:{type:String,default:""},extraMetadatas:{type:Array,default(){return[]}}}};const Xi=-1!==navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("Chrome");var Ji={name:"A17Mediafield",components:{"a17-cropper":qi,"a17-mediametadata":Gi},mixins:[Ve.c,Yi],props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},btnLabel:{type:String,default(){return this.$trans("fields.medias.btn-label","Attach image")}},hover:{type:Boolean,default:!1},isSlide:{type:Boolean,default:!1},index:{type:Number,default:0},mediaContext:{type:String,default:""},activeCrop:{type:Boolean,default:!0},widthMin:{type:Number,default:0},heightMin:{type:Number,default:0}},data:function(){return{canvas:null,img:null,ctx:null,imgLoaded:!1,cropSrc:"",showImg:!1,isDestroyed:!1,naturalDim:{width:null,height:null},originalDim:{width:null,height:null},hasMediaChanged:!1,metadatas:{text:this.$trans("fields.medias.edit-info"),textOpen:this.$trans("fields.medias.edit-info"),textClose:this.$trans("fields.medias.edit-close"),active:!1}}},filters:Qt.c,computed:{...(0,_.ys)({useWysiwyg:e=>e.mediaLibrary.config.useWysiwyg,wysiwygOptions:e=>e.mediaLibrary.config.wysiwygOptions}),cropThumbnailStyle:function(){return this.showImg?{}:this.hasMedia&&this.media.crops?0===this.cropSrc.length?{}:{backgroundImage:"url(".concat(this.cropSrc,")")}:{}},cropThumbnailClass:function(){if(!this.hasMedia)return{};if(!this.media.crops)return{};const e=this.media.crops[Object.keys(this.media.crops)[0]];return{"media__img--landscape":e.width/e.height>=1,"media__img--portrait":e.width/e.height<1}},mediaKey:function(){return this.mediaContext.length>0?this.mediaContext:this.name},inputName:function(){let e=this.name;return this.name.indexOf("[")&&(e=this.name.replace("]","").replace("[","][")),"medias["+e+"]["+this.index+"]"},metadataName:function(){return"mediaMeta["+this.name+"]["+this.media.id+"]"},media:function(){return this.selectedMedias.hasOwnProperty(this.mediaKey)&&this.selectedMedias[this.mediaKey][this.index]||{}},cropInfos:function(){const e=[];if(this.media.crops)for(const t in this.media.crops)if(this.media.crops[t].width+this.media.crops[t].height){let i="";i+=this.media.crops[t].name+" "+this.$trans("fields.medias.crop-list")+": ",i+=this.media.crops[t].width+" × "+this.media.crops[t].height,e.push(i)}return e.length>0?e:null},hasMedia:function(){return Object.keys(this.media).length>0},cropperKey:function(){return"".concat(this.mediaKey,"-").concat(this.index,"_").concat(this.cropContext)},mediaHasCrop:function(){return this.media.crops},cropModalName:function(){return"".concat(name,"Modal")},...(0,_.ys)({selectedMedias:e=>e.mediaLibrary.selected,allCrops:e=>e.mediaLibrary.crops})},watch:{media:function(e,t){this.hasMediaChanged=e!==t,this.selectedMedias.hasOwnProperty(this.mediaKey)&&this.selectedMedias[this.mediaKey][this.index]&&(this.isDestroyed=!1)}},methods:{canvasCrop(){const e=this.media.crops[Object.keys(this.media.crops)[0]];if(!e)return;if(e.width+e.height===0)return void this.showDefaultThumbnail();let t=this.media.thumbnail;this.$nextTick((()=>{try{const i=Fi(e,this.naturalDim,this.originalDim),s=i.width,a=i.height;this.canvas.width=s,this.canvas.height=a,this.ctx.drawImage(this.img,i.x,i.y,s,a,0,0,s,a),t=this.canvas.toDataURL("image/png"),this.cropSrc!==t&&(this.showImg=!1,this.cropSrc=t)}catch(i){console.error(i),this.cropSrc!==t&&(this.showImg=!0,this.cropSrc=t)}}))},setDefaultCrops:function(){const e={},t=[];if(this.allCrops.hasOwnProperty(this.cropContext)){for(const i in this.allCrops[this.cropContext]){const s=this.allCrops[this.cropContext][i][0].ratio,a=this.media.width,n=this.media.height,o={x:a/2,y:n/2};let r=a,l=n;s>0&&s<1?(r=Math.floor(Math.min(n*s,a)),l=Math.floor(r/s)):s>=1&&(l=Math.floor(Math.min(a/s,n)),r=Math.floor(l*s));let d={x:0,y:0,width:r,height:l};d=Fi(d,this.naturalDim,this.originalDim),t.push(Ii().crop(this.img,{width:d.width,height:d.height,minScale:1}));const c=Math.floor(o.x-r/2),u=Math.floor(o.y-l/2);e[i]={},e[i].name=this.allCrops[this.cropContext][i][0].name||i,e[i].x=c,e[i].y=u,e[i].width=r,e[i].height=l}Promise.all(t).then((t=>{let i=0;t.forEach((t=>{const s={x:t.topCrop.x,y:t.topCrop.y,width:t.topCrop.width,height:t.topCrop.height},a=e[Object.keys(e)[i]],n=Fi(s,this.originalDim,this.naturalDim);a.x=n.x,a.y=n.y,a.width=n.width,a.height=n.height,i++})),this.cropMedia({values:e})}),(t=>{console.error(t),this.cropMedia({values:e})}))}else this.cropMedia({values:e})},cropMedia:function(e){e.key=this.mediaKey,e.index=this.index,this.$store.commit(v.ol.SET_MEDIA_CROP,e),this.img&&this.canvasCrop()},setNaturalDimensions:function(){this.img&&(this.naturalDim.width=this.img.naturalWidth,this.naturalDim.height=this.img.naturalHeight)},setOriginalDimensions:function(){this.media&&(this.originalDim.width=this.media.width,this.originalDim.height=this.media.height)},init:function(){this.showImg=!1;const e=()=>{this.setNaturalDimensions(),this.setOriginalDimensions(),this.mediaHasCrop?this.canvasCrop():this.setDefaultCrops()};this.hasMedia&&(this.cropSrc=this.media.thumbnail,this.initImg().then((()=>{e()}),(t=>{console.error(t),this.showDefaultThumbnail(),this.$nextTick((()=>{const t=this.$refs.mediaImg;t?(t.addEventListener("load",(()=>{this.img=t,e()}),{once:!0,passive:!0,capture:!0}),t.addEventListener("error",(e=>{console.error(e),this.showDefaultThumbnail()}))):(this.showImg=!1,this.cropSrc=this.media.thumbnail)}))})),this.hasMediaChanged=!1)},initImg:function(){return new Promise(((e,t)=>{this.img=new Image,Xi||(this.img.crossOrigin="Anonymous"),this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.img.addEventListener("load",(()=>{e()}),{once:!0,passive:!0,capture:!0}),this.img.addEventListener("error",(e=>{t(e)}));let i="?";this.media.thumbnail.indexOf("?")>-1&&(i="&"),this.img.src=this.media.thumbnail+i+"no-cache"}))},showDefaultThumbnail:function(){this.showImg=!0,this.hasMedia&&(this.cropSrc=this.media.thumbnail)},openCropMedia:function(){this.$refs[this.cropModalName].open()},deleteMediaClick:function(){this.isDestroyed=!0,this.deleteMedia()},deleteMedia:function(){this.$store.commit(v.ol.DESTROY_SPECIFIC_MEDIA,{name:this.mediaKey,index:this.index})},updateMetadata:function(e){this.$store.commit(v.ol.SET_MEDIA_METADATAS,{media:{context:this.mediaKey,index:this.index},value:e})},metadatasInfos:function(){this.metadatas.active=!this.metadatas.active,this.metadatas.text=this.metadatas.active?this.metadatas.textClose:this.metadatas.textOpen},destroyValue:function(){this.isSlide||this.isDestroyed||this.deleteMedia()}},beforeMount:function(){this.init()},beforeUpdate:function(){this.hasMediaChanged&&this.init()}},Qi=Ji,Zi=(0,k.c)(Qi,Li,Di,!1,null,"3f736376",null),es=Zi.exports,ts=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,label:e.label,locale:e.locale,size:e.size,note:e.note,name:e.name},on:{localize:e.updateLocale}},[e.max>1||0===e.max?t("a17-slideshow",{attrs:{name:e.name,cropContext:e.cropContext,max:e.max,required:e.required,buttonOnTop:e.buttonOnTop,withAddInfo:e.withAddInfo,withVideoUrl:e.withVideoUrl,withCaption:e.withCaption,altTextMaxLength:e.altTextMaxLength,captionMaxLength:e.captionMaxLength,extraMetadatas:e.extraMetadatas,disabled:e.disabled}},[e._t("default")],2):t("a17-mediafield",{attrs:{name:e.name,cropContext:e.cropContext,required:e.required,withAddInfo:e.withAddInfo,withVideoUrl:e.withVideoUrl,withCaption:e.withCaption,altTextMaxLength:e.altTextMaxLength,captionMaxLength:e.captionMaxLength,extraMetadatas:e.extraMetadatas,disabled:e.disabled}},[e._t("default")],2)],1)},is=[],ss={name:"A17MediafieldTranslated",mixins:[Ue.c,ee.c,Yi],props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},max:{type:Number,default:1},buttonOnTop:{type:Boolean,default:!1}}},as=ss,ns=(0,k.c)(as,ts,is,!1,null,null,null),os=ns.exports,rs=i(5256),ls=function(){var e=this,t=e._self._c;return t("div",{staticClass:"multiselectorOuter"},[t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,name:e.name,"add-new":e.addNew}},[t("div",{staticClass:"multiselector",class:e.gridClasses},[t("div",{staticClass:"multiselector__outer"},e._l(e.fullOptions,(function(i,s){return t("div",{key:s,staticClass:"multiselector__item",style:e.itemStyle},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.checkedValue,expression:"checkedValue"}],staticClass:"multiselector__checkbox",class:{"multiselector__checkbox--checked":e.checkedValue.includes(i.value)},attrs:{type:"checkbox",name:e.name+"["+e.randKey+"]",id:e.uniqId(i.value,s),disabled:i.disabled||e.disabled},domProps:{value:i.value,checked:Array.isArray(e.checkedValue)?e._i(e.checkedValue,i.value)>-1:e.checkedValue},on:{change:function(t){var s=e.checkedValue,a=t.target,n=!!a.checked;if(Array.isArray(s)){var o=i.value,r=e._i(s,o);a.checked?r<0&&(e.checkedValue=s.concat([o])):r>-1&&(e.checkedValue=s.slice(0,r).concat(s.slice(r+1)))}else e.checkedValue=n}}}),t("label",{staticClass:"multiselector__label",attrs:{for:e.uniqId(i.value,s)},on:{click:function(t){return t.preventDefault(),e.changeCheckbox(i.value)}}},[t("span",{staticClass:"multiselector__icon"},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"check"}})]),e._v(" "+e._s(i.label)+" ")]),t("span",{staticClass:"multiselector__bg"})])})),0)])]),e.addNew?[t("a17-modal-add",{ref:"addModal",attrs:{name:e.name,"form-create":e.addNew,"modal-title":"Add new "+e.label}},[e._t("addModal")],2)]:e._e()],2)},ds=[],cs=i(248),us={name:"A17Multiselect",mixins:[W.c,ee.c,Q.c,Z.c,cs.c],props:{grid:{type:Boolean,default:!0},columns:{type:Number,default:0},inline:{type:Boolean,default:!1},border:{type:Boolean,default:!1}},computed:{gridClasses:function(){return this.columns>=1?["multiselector--columns",this.grid?"multiselector--grid":""]:[this.grid?"multiselector--grid":"",this.inline?"multiselector--inline":"",this.border?"multiselector--border":""]},itemStyle:function(){return this.columns>=1?{width:"".concat(100/this.columns,"%")}:{}}},methods:{updateFromStore:function(e){J()(e,this.checkedValue)||(this.checkedValue=e)},changeCheckbox:function(e){const t=this.checkedValue.indexOf(e),i=this.checkedValue.slice();t>-1?i.splice(t,1):i.push(e);const s=this.isMax(i),a=this.isMin(i);s||a||(this.checkedValue=i)},uniqId:function(e,t){return this.name+"_"+e+"-"+this.randKey*(t+1)}}},hs=us,ps=(0,k.c)(hs,ls,ds,!1,null,"8819f42c",null),ms=ps.exports,fs=function(){var e=this,t=e._self._c;return t("span",{staticClass:"radio",class:e.customClass},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedValue,expression:"selectedValue"}],staticClass:"radio__input",attrs:{type:"radio",name:e.name,id:e.uniqId(e.value),disabled:e.disabled},domProps:{value:e.value,checked:e._q(e.selectedValue,e.value)},on:{change:function(t){e.selectedValue=e.value}}}),t("label",{staticClass:"radio__label",attrs:{for:e.uniqId(e.value)}},[e._v(e._s(e.label))])])},gs=[],_s={name:"A17Radio",mixins:[W.c],props:{customClass:{type:String,default:""},value:{default:""},name:{type:String,default:""},label:{type:String,default:""},initialValue:{default:""},disabled:{type:Boolean,default:!1}},data:function(){return{currentValue:this.initialValue}},computed:{selectedValue:{get:function(){return this.currentValue},set:function(e){this.currentValue=e,this.$emit("change",e)}}},methods:{uniqId:function(e){return this.name+"_"+e+"-"+this.randKey}}},bs=_s,vs=(0,k.c)(bs,fs,gs,!1,null,"6de2145c",null),ys=vs.exports,ws=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,name:e.name,"label-for":e.uniqId}},[t("ul",{staticClass:"radioGroup",class:e.radioClasses},e._l(e.radios,(function(i,s){return t("li",{key:s,staticClass:"radioGroup__item"},[t("a17-radio",{attrs:{customClass:"radio__"+e.radioClass+"--"+(s+1),name:e.name,value:i.value,label:i.label,initialValue:e.currentValue,disabled:i.disabled},on:{change:e.changeValue}})],1)})),0)])},Es=[],Ts={name:"A17CheckboxGroup",mixins:[W.c,ee.c,Z.c],props:{radioClass:{type:String,default:""},inline:{type:Boolean,default:!1},name:{type:String,default:""},label:{default:""},initialValue:{default:""},radios:{default:function(){return[]}}},data:function(){return{currentValue:this.initialValue}},computed:{uniqId:function(e){return this.name+"-"+this.randKey},radioClasses:function(){return[this.inline?"radioGroup--inline":""]}},methods:{updateFromStore:function(e){e!==this.currentValue&&this.updateValue(e)},updateValue:function(e){this.currentValue=e},changeValue:function(e){e!==this.currentValue&&(this.updateValue(e),this.$emit("change",this.currentValue),this.saveIntoStore(e))}}},ks=Ts,Cs=(0,k.c)(ks,ws,Es,!1,null,"35a49f72",null),As=Cs.exports,xs=function(){var e=this,t=e._self._c;return t("div",[t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,locale:e.locale,name:e.name,"label-for":e.uniqId,required:e.required,"add-new":e.addNew},on:{localize:e.updateLocale}},[t("span",{staticClass:"select__input",class:e.selectClasses},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedValue,expression:"selectedValue"}],attrs:{name:e.name,id:e.uniqId,disabled:e.disabled,required:e.required,readonly:e.readonly},on:{change:function(t){var i=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedValue=t.target.multiple?i:i[0]}}},e._l(e.fullOptions,(function(i,s){return t("option",{key:s,domProps:{value:i.value,innerHTML:e._s(i.label)}})})),0)])]),e.addNew?[t("a17-modal-add",{ref:"addModal",attrs:{name:e.name,"form-create":e.addNew,"modal-title":"Add new "+e.label}},[e._t("addModal")],2)]:e._e()],2)},Ss=[],Ls={name:"A17Select",mixins:[W.c,ge.c,ee.c,Ue.c,Z.c,cs.c],props:{size:{type:String,default:""},selected:{default:""},options:{default:function(){return[]}}},data:function(){return{value:this.selected}},computed:{uniqId:function(e){return this.name+"-"+this.randKey},selectClasses:function(){return["small"===this.size?"select__input--small":"","large"===this.size?"select__input--large":""]},selectedValue:{get:function(){return this.value},set:function(e){this.value=e,this.saveIntoStore(e),this.$emit("change",e)}}},methods:{updateFromStore:function(e){this.value=e}},mounted:function(){this.$emit("change",this.value)}},Ds=Ls,Ms=(0,k.c)(Ds,xs,Ss,!1,null,"467fbd52",null),Is=Ms.exports,Os=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,name:e.name}},[t("div",{staticClass:"singleCheckbox",class:e.wrapperClasses},[t("span",{staticClass:"checkbox"},[t("input",{staticClass:"checkbox__input",class:e.checkboxClasses,attrs:{type:"checkbox",value:"true",name:e.name+"["+e.randKey+"]",id:e.uniqId,disabled:e.disabled},domProps:{checked:e.checkedValue}}),t("label",{staticClass:"checkbox__label",attrs:{for:e.uniqId},on:{click:function(t){return t.preventDefault(),e.changeCheckbox.apply(null,arguments)}}},[e._v(e._s(e.label)+" "),t("span",{staticClass:"checkbox__icon"},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"check"}})]),e.note?t("span",{staticClass:"f--small checkbox__note"},[e._v(e._s(e.note))]):e._e()])])]),e.requireConfirmation?[t("a17-dialog",{ref:"warningConfirm",attrs:{"modal-title":"Confirm","confirm-label":"Confirm"}},[t("p",{staticClass:"modal--tiny-title"},[t("strong",[e._v(e._s(e.confirmTitleText))])]),t("p",[e._v(e._s(e.confirmMessageText))])])]:e._e()],2)},Ps=[],Bs={props:{requireConfirmation:{type:Boolean,default:!1},confirmMessageText:{type:String,default:"Are you sure you want to change this option ?"},confirmTitleText:{type:String,default:"Confirm selection"}}},Rs={name:"A17SingleCheckbox",mixins:[W.c,ee.c,Z.c,Bs],props:{name:{type:String,default:""},initialValue:{type:Boolean,default:!0},theme:{type:String,default:""},disabled:{type:Boolean,default:!1},border:{type:Boolean,default:!1}},data:function(){return{currentValue:this.initialValue}},computed:{uniqId:function(){return this.name+"_"+this.randKey},wrapperClasses:function(){return[this.border?"singleCheckbox--border":""]},checkboxClasses:function(){return[this.theme?"checkbox__input--".concat(this.theme):"",this.checkedValue?"checkbox__input--checked":""]},checkedValue:{get:function(){return this.currentValue},set:function(e){e!==this.currentValue&&(this.currentValue=e,"undefined"!==typeof this.saveIntoStore&&this.saveIntoStore(e),this.$emit("change",e))}}},methods:{updateFromStore:function(e){this.checkedValue=e},changeCheckbox:function(){this.requireConfirmation?this.$refs.warningConfirm.open((()=>{this.checkedValue=!this.checkedValue})):this.checkedValue=!this.checkedValue}}},Ns=Rs,Fs=(0,k.c)(Ns,Os,Ps,!1,null,"552b859e",null),$s=Fs.exports,Us=function(){var e=this,t=e._self._c;return t("div",{class:e.outerClasses},[t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,name:e.name,"add-new":e.addNew,variant:e.variantInput}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],attrs:{type:"hidden",name:e.name},domProps:{value:e.value},on:{input:function(t){t.target.composing||(e.value=t.target.value)}}}),t("div",{staticClass:"singleselector",class:e.gridClasses},[t("div",{staticClass:"singleselector__outer"},e._l(e.fullOptions,(function(i,s){return t("div",{key:s,staticClass:"singleselector__item",style:e.itemStyle},[t("input",{staticClass:"singleselector__radio",class:{"singleselector__radio--checked":i.value==e.selectedValue},attrs:{type:"radio",name:e.name+"["+e.randKey+"]",id:e.uniqId(i.value,s),disabled:i.disabled||e.disabled},domProps:{value:i.value}}),t("label",{staticClass:"singleselector__label",attrs:{for:e.uniqId(i.value,s)},on:{click:function(t){return t.preventDefault(),e.changeRadio(i.value)}}},[e._v(e._s(i.label))]),t("span",{staticClass:"singleselector__bg"})])})),0)])]),e.addNew?[t("a17-modal-add",{ref:"addModal",attrs:{name:e.name,"form-create":e.addNew,"modal-title":"Add new "+e.label}},[e._t("addModal")],2)]:e._e(),e.requireConfirmation?[t("a17-dialog",{ref:"warningConfirm",attrs:{"modal-title":"Confirm","confirm-label":"Confirm"}},[t("p",{staticClass:"modal--tiny-title"},[t("strong",[e._v(e._s(e.confirmTitleText))])]),t("p",[e._v(e._s(e.confirmMessageText))])])]:e._e()],2)},Vs=[],qs={name:"A17Singleselect",mixins:[W.c,ee.c,Z.c,cs.c,Bs],props:{name:{type:String,default:""},grid:{type:Boolean,default:!0},columns:{type:Number,default:0},inline:{type:Boolean,default:!0},inTable:{type:Boolean,default:!1},border:{type:Boolean,default:!1},selected:{default:""},options:{default:function(){return[]}},disabled:{type:Boolean,default:!1}},data:function(){return{value:this.selected}},computed:{variantInput:function(){return[this.inTable?"intable":""].join(" ")},outerClasses:function(){return["multiselectorOuter"]},gridClasses:function(){return this.columns>=1?["singleselector--columns",this.grid?"singleselector--grid":""]:[this.grid?"singleselector--grid":"",this.inline?"singleselector--inline":"",this.border?"singleselector--border":""]},itemStyle:function(){return this.columns>=1?{width:"".concat(100/this.columns,"%")}:{}},selectedValue:{get:function(){return this.value},set:function(e){e!==this.value&&(this.value=e,this.saveIntoStore(e),this.$emit("change",e))}}},methods:{updateFromStore:function(e){e!==this.value&&(this.value=e)},changeRadio:function(e){this.requireConfirmation?this.$refs.warningConfirm.open((()=>{this.selectedValue=e})):this.selectedValue=e},uniqId:function(e,t){return this.name+"_"+e+"-"+this.randKey*(t+1)}}},Ws=qs,Hs=(0,k.c)(Ws,Us,Vs,!1,null,"0406024e",null),zs=Hs.exports,Ks=function(){var e=this,t=e._self._c;return t("div",{staticClass:"multiselectorPermissions"},[e.searchable?t("div",{staticClass:"multiselectorPermissions__filter"},[t("a17-filter",{attrs:{"full-width":!0},on:{submit:e.submitFilter}},[e.groups.length&&e.listUser?t("div",{staticClass:"multiselectorPermissions__groups",attrs:{slot:"additional-actions"},slot:"additional-actions"},[t("a17-dropdown",{ref:"groupDropdown",staticClass:"multiselectorPermissions__dd",attrs:{position:"bottom-right",clickable:!0}},[t("button",{staticClass:"multiselectorPermissions__button",attrs:{type:"button"},on:{click:function(t){return e.$refs.groupDropdown.toggle()}}},[e._v("Groups")]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[t("a17-checkboxgroup",{attrs:{name:"permissionsGroups",selected:e.activeGroups,options:e.groups},on:{change:e.updateUserPermission}})],1)])],1):e._e()])],1):e._e(),t("div",{staticClass:"multiselectorPermissions__items"},[e._t("default"),e.empty?t("div",{staticClass:"multiselectorPermissions__empty",style:e.emptyStyle},[t("h4",[e._v(e._s(e.emptyMessage))])]):e._e(),e.allHidden?t("div",{staticClass:"multiselectorPermissions__empty",style:e.emptyStyle},[t("h4",[e._v(e._s(e.allHiddenMessage))])]):e._e()],2)])},js=[],Gs={name:"A17SingleSelectPermissions",components:{"a17-filter":Pt.c},props:{searchable:{type:Boolean,default:!0},listUser:{type:Boolean,default:!1},emptyMessage:{type:String,default:"No results found. Please try another search"},allHiddenMessage:{type:String,default:"Use the search box to find items"}},data:function(){return{empty:!1,allHidden:!1,activeGroups:[],emptyHeight:120}},computed:{emptyStyle:function(){return{height:this.emptyHeight+"px"}},...(0,_.gV)(["fieldsByName"]),...(0,_.ys)({groups:e=>e.permissions.groups,groupUserMapping:e=>e.permissions.groupUserMapping})},mounted(){if(!this.listUser){const e=this.$el.querySelectorAll("[data-singleselect-permissions-field]"),t="multiselectorPermissions__item--hidden";if(e.length){let i=0;e.forEach((e=>{const s=e.getAttribute("data-singleselect-permissions-field"),a=this.fieldsByName(s),n=a.length?a[0].value:"";n||(e.classList.add(t),i++)})),i===e.length&&(this.allHidden=!0)}}},methods:{submitFilter(e){const t=this.$el.querySelectorAll("[data-singleselect-permissions-filterable]"),i="multiselectorPermissions__item--hidden";t.length&&(this.emptyHeight=Math.max(120,t[0].parentElement.offsetHeight),this.empty=!0,this.allHidden=!1,t.forEach((t=>{const s=t.getAttribute("data-singleselect-permissions-filterable");if(e.search){const a=e.search;s.toUpperCase().includes(a.toUpperCase())?(t.classList.remove(i),this.empty=!1):t.classList.add(i)}else t.classList.remove(i),this.empty=!1})))},setUserPermission(e){const t={};t.name=e,t.value="view-item",this.$store.commit(v.tt.UPDATE_FORM_FIELD,t)},updateUserPermission(e){this.activeGroups=e,e.forEach((e=>{this.groupUserMapping[e]&&this.groupUserMapping[e].forEach((e=>{const t="user_".concat(e,"_permission"),i=this.fieldsByName(t);i.length&&""!==i[0].value&&"view-item"!==i[0].value||this.setUserPermission(t)}))}))}}},Ys=Gs,Xs=(0,k.c)(Ys,Ks,js,!1,null,"627613a1",null),Js=Xs.exports,Qs=function(){var e=this,t=e._self._c;return t("div",{staticClass:"slideshow"},[e.buttonOnTop&&e.remainingSlides>0?t("div",{staticClass:"slideshow__trigger"},[t("a17-button",{attrs:{disabled:e.disabled,type:"button",variant:"ghost"},on:{click:function(t){return e.openMediaLibrary(e.remainingSlides)}}},[e._v(e._s(e.addLabel))]),t("span",{staticClass:"slideshow__note f--small"},[e._t("default")],2)],1):e._e(),e.slides.length?t("draggable",e._b({staticClass:"slideshow__content",model:{value:e.slides,callback:function(t){e.slides=t},expression:"slides"}},"draggable",e.dragOptions,!1),[t("transition-group",{attrs:{name:"draggable_list",tag:"div"}},e._l(e.slides,(function(i,s){return t("div",{key:"".concat(i.id,"_").concat(s),staticClass:"slide"},[e.disabled?e._e():t("div",{staticClass:"slide__handle"},[t("div",{staticClass:"slide__handle--drag"})]),t("a17-mediafield",{staticClass:"slide__content",attrs:{name:"".concat(e.name,"_").concat(i.id),index:s,mediaContext:e.name,cropContext:e.cropContext,hover:e.hoverable,isSlide:!0,withAddInfo:e.withAddInfo,withCaption:e.withCaption,withVideoUrl:e.withVideoUrl,altTextMaxLength:e.altTextMaxLength,captionMaxLength:e.captionMaxLength,extraMetadatas:e.extraMetadatas,disabled:e.disabled}})],1)})),0)],1):e._e(),!e.buttonOnTop&&e.remainingSlides>0?t("div",{staticClass:"slideshow__trigger"},[t("a17-button",{attrs:{disabled:e.disabled,type:"button",variant:"ghost"},on:{click:function(t){return e.openMediaLibrary(e.remainingSlides)}}},[e._v(e._s(e.addLabel))]),t("span",{staticClass:"slideshow__note f--small"},[e._t("default")],2)],1):e._e()],1)},Zs=[],ea={name:"A17Slideshow",components:{draggable:g()},mixins:[b.c,Ve.c,Yi],props:{name:{type:String,required:!0},itemLabel:{type:String,default:"image"},max:{type:Number,default:10},buttonOnTop:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:function(){return{handle:".slide__handle",hoverable:!0}},computed:{remainingSlides:function(){return Math.max(0,this.max-this.slides.length)},addLabel:function(){const e=this.itemLabel+"s";return"Attach "+e},slides:{get(){return this.selectedMedias.hasOwnProperty(this.name)&&this.selectedMedias[this.name]||[]},set(e){this.$store.commit(v.ol.REORDER_MEDIAS,{name:this.name,medias:e})}},...(0,_.ys)({selectedMedias:e=>e.mediaLibrary.selected})},methods:{deleteSlideshow:function(){this.$store.commit(v.ol.DESTROY_MEDIAS,this.name)},destroyValue:function(){this.isSlide||this.isDestroyed||this.deleteMedia()}}},ta=ea,ia=(0,k.c)(ta,Qs,Zs,!1,null,"243f2bae",null),sa=ia.exports,aa=i(6676),na=i(6216),oa=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,locale:e.locale,size:e.size,name:e.name,required:e.required},on:{localize:e.updateLocale}},[t("div",{staticClass:"wysiwyg__outer",class:e.textfieldClasses},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],attrs:{name:e.name,type:"hidden"},domProps:{value:e.value},on:{input:function(t){t.target.composing||(e.value=t.target.value)}}}),e.editSource?[t("div",{directives:[{name:"show",rawName:"v-show",value:!e.activeSource,expression:"!activeSource"}],staticClass:"wysiwyg",class:e.textfieldClasses,attrs:{dir:e.dirLocale}},[t("div",{ref:"editorcontainer",staticClass:"wysiwyg__editor",class:{"wysiwyg__editor--limitHeight":e.limitHeight}},[t("div",{ref:"editor",staticClass:"wysiwyg__editor-inner"})]),e.shouldShowCounter?t("span",{staticClass:"wysiwyg__limit f--tiny",class:e.limitClasses},[e._v(e._s(e.counter))]):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:e.activeSource,expression:"activeSource"}],staticClass:"form__field form__field--textarea",attrs:{dir:e.dirLocale}},[t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],style:e.textareaHeight,attrs:{placeholder:e.placeholder,autofocus:e.autofocus},domProps:{value:e.value},on:{change:e.updateSourcecode,input:function(t){t.target.composing||(e.value=t.target.value)}}})]),t("a17-button",{staticClass:"wysiwyg__button",attrs:{variant:"ghost"},on:{click:e.toggleSourcecode}},[e._v("Source code")])]:[t("div",{staticClass:"wysiwyg",class:e.textfieldClasses,attrs:{dir:e.dirLocale}},[t("div",{ref:"editorcontainer",staticClass:"wysiwyg__editor",class:{"wysiwyg__editor--limitHeight":e.limitHeight}},[t("div",{ref:"editor",staticClass:"wysiwyg__editor-inner"})]),e.shouldShowCounter?t("span",{staticClass:"wysiwyg__limit f--tiny",class:e.limitClasses},[e._v(e._s(e.counter))]):e._e()])]],2)])},ra=[],la=i(3336),da=i.n(la),ca=i(124),ua=i.n(ca);function ha(e,t,i){return t=pa(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function pa(e){var t=ma(e,"string");return"symbol"==typeof t?t:String(t)}function ma(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}ua().debug("error");const fa=ua()["import"]("delta"),ga=ua()["import"]("blots/embed"),_a=ua()["import"]("blots/inline"),ba=ua()["import"]("formats/link"),va=ua()["import"]("blots/block/embed");class ya extends va{}ya.blotName="divider",ya.tagName="hr",ua().register(ya);class wa extends ga{length(){return 1}value(){return"\n"}insertInto(e,t){ga.prototype.insertInto.call(this,e,t)}}ha(wa,"blotName","softbreak"),ha(wa,"tagName","br"),ha(wa,"className","softbreak"),ua().register(wa);const Ea={key:13,shiftKey:!0,handler:function(e){const t=this.quill.getLeaf(e.index)[0],i=this.quill.getLeaf(e.index+1)[0];this.quill.insertEmbed(e.index,"softbreak",!0,"user"),null!==i&&t.parent===i.parent||this.quill.insertEmbed(e.index,"softbreak",!0,"user"),this.quill.setSelection(e.index+1,ua().sources.SILENT)}};function Ta(){const e=new fa;return e.insert({softbreak:""}),e}const ka={blotName:"anchor",tagName:"SPAN"};class Ca extends _a{static create(e){const t=super.create(e);return e=this.sanitize(e),t.setAttribute("id",e),t.className="ql-anchor",t}static sanitize(e){return e.replace(/\s+/g,"-").toLowerCase()}static formats(e){return e.getAttribute("id")}format(e,t){if(e!==this.statics.blotName||!t)return super.format(e,t);t=this.constructor.sanitize(t),this.domNode.setAttribute("id",t)}}Ca.blotName=ka.blotName,Ca.tagName=ka.tagName,ua().register(Ca);class Aa extends ba{static create(e){const t=super.create(e);e=this.sanitize(e),t.setAttribute("href",e);const i=/^((http|https|ftp):\/\/)/;if(i.test(e)||t.removeAttribute("target"),window["TWILL"].STORE.form.baseUrl){const i=new URL(window["TWILL"].STORE.form.baseUrl);e.startsWith(i.origin)&&t.removeAttribute("target")}return t}format(e,t){if(super.format(e,t),e!==this.statics.blotName||!t)return;const i=/^((http|https|ftp):\/\/)/;i.test(t)?window["TWILL"].STORE.form.baseUrl&&t.startsWith(window["TWILL"].STORE.form.baseUrl)?this.domNode.removeAttribute("target"):this.domNode.setAttribute("target","_blank"):this.domNode.removeAttribute("target")}}function xa(e){return''}ua().register(Aa);const Sa=ua()["import"]("ui/icons");Sa.bold=xa("bold"),Sa.italic=xa("italic"),Sa.anchor=xa("anchor"),Sa.link=xa("link"),Sa.header["1"]=xa("header"),Sa.header["2"]=xa("header-2"),Sa.header["3"]=xa("header-3"),Sa.header["4"]=xa("header-4"),Sa.header["5"]=xa("header-5"),Sa.header["6"]=xa("header-6"),Sa.divider=xa("hr");const La=["background","bold","color","font","code","italic","link","size","strike","script","underline","blockquote","header","indent","list","align","direction","code-block","formula","image","video","divider"];function Da(e){const t=[wa.blotName,ka.blotName];function i(e){t.indexOf(e)>-1||-1===La.indexOf(e)||t.push(e)}return e.forEach((e=>{if("object"===typeof e)for(const t in e)i(t);"string"===typeof e&&i(e)})),t}var Ma={Quill:ua(),lineBreak:{handle:Ea,clipboard:[wa.tagName,Ta]},getFormats:Da},Ia=i(512);const Oa="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/highlight.min.js";var Pa={name:"A17Wysiwyg",mixins:[ge.c,ee.c,Ue.c,Z.c],props:{editSource:{type:Boolean,default:!1},showCounter:{type:Boolean,default:!0},type:{type:String,default:"text"},prefix:{type:String,default:""},maxlength:{type:Number,default:0},initialValue:{default:""},limitHeight:{type:Boolean,default:!1},options:{type:Object,required:!1,default:function(){return{}}}},computed:{textareaHeight:function(){return{height:this.editorHeight}},textfieldClasses:function(){return{"wysiwyg__outer--limitHeight":this.limitHeight,"s--disabled":this.disabled,"s--focus":this.focused}},hasMaxlength:function(){return this.maxlength>0},shouldShowCounter:function(){return this.hasMaxlength&&this.showCounter},limitClasses:function(){return{"wysiwyg__limit--red":this.counter<.1*this.maxlength}},...(0,_.ys)({baseUrl:e=>e.form.baseUrl})},data:function(){return{value:this.initialValue,editorHeight:50,toolbarHeight:52,focused:!1,activeSource:!1,quill:null,counter:0,localOptions:{},defaultModules:{toolbar:["bold","italic","underline","link"],clipboard:{matchVisual:!1,matchers:[Ma.lineBreak.clipboard]},keyboard:{bindings:{lineBreak:Ma.lineBreak.handle}},syntax:!1}}},methods:{initQuill(e){if(this.quill=new Ma.Quill(this.$refs.editor,e),this.value&&this.updateEditor(this.value),this.quill.on("text-change",((e,t,i)=>{let s=this.$refs.editor.children[0].innerHTML;"


"===s&&(s=""),this.value=s,this.$emit("input",this.value),this.$emit("change",this.value),this.updateCounter(this.getTextLength()),"user"===i&&this.textUpdate()})),this.quill.on("selection-change",((e,t,i)=>{e?(this.focused=!0,this.$emit("focus")):(this.focused=!1,"user"===i&&this.saveIntoStore(),this.$emit("blur"))})),this.disabled&&this.quill.enable(!1),this.baseUrl){const e=this.quill.theme.tooltip,t=e.root;if(t){const e=t.querySelector("input[data-link]");e&&e.setAttribute("data-link",this.baseUrl)}}"rtl"===this.dirLocale&&(this.quill.format("direction","rtl"),this.quill.format("align","right")),this.hasMaxlength&&this.showCounter&&this.updateCounter(this.getTextLength()),this.$emit("ready",this.quill)},insertDivider(){const e=this.quill.getSelection(!0);e&&(this.quill.insertText(e.index,"\n"),this.quill.insertEmbed(e.index+1,"divider",!0),this.quill.setSelection(e.index+2))},anchorHandler(e){if(!0===e)e=prompt("Enter anchor:");else{const t=this.quill.getSelection(),i=this.quill.getFormat(t).anchor||"";e=prompt("Edit anchor:",i)}this.quill.format("anchor",e)},updateEditor:function(e){const t=this.quill.clipboard.convert(e);this.quill.setContents(t,"silent")},updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&(this.value=e,this.updateEditor(e))},textUpdate:function(){this.preventSubmit(),this._textUpdateInternal()},_textUpdateInternal:da()((function(){this.saveIntoStore(),this.allowSubmit()}),600),toggleSourcecode:function(){this.editorHeight=Math.max(50,this.$refs.editor.clientHeight)+this.toolbarHeight-1+"px",this.activeSource=!this.activeSource,this.updateSourcecode()},updateSourcecode:function(){this.updateEditor(this.value),this.saveIntoStore()},updateCounter:function(e){this.showCounter&&this.hasMaxlength&&(this.counter=this.maxlength-e)},getTextLength:function(){return this.quill.getLength()-(0===this.value.length?2:1)}},mounted:function(){if(this.quill)return;const e=JSON.parse(JSON.stringify(this.options));e.theme=e.theme||"snow",e.boundary=e.boundary||document.body,e.modules=e.modules||this.defaultModules;const t={container:void 0!==e.modules.toolbar?e.modules.toolbar:this.defaultModules.toolbar,handlers:{}};if(e.modules.clipboard=void 0!==e.modules.clipboard?e.modules.clipboard:this.defaultModules.clipboard,e.modules.keyboard=void 0!==e.modules.keyboard?e.modules.keyboard:this.defaultModules.keyboard,e.modules.syntax=void 0!==e.modules.syntax&&e.modules.syntax?{highlight:e=>hljs.highlightAuto(e).value}:this.defaultModules.syntax,e.placeholder=e.placeholder||this.placeholder,e.readOnly=void 0!==e.readOnly?e.readOnly:this.readonly,e.formats=Ma.getFormats(e.modules.toolbar),e.bounds=this.$refs.editor,e.scrollingContainer="html",t.container.includes("anchor")&&(t.handlers.anchor=this.anchorHandler),t.container.includes("divider")&&(t.handlers.divider=this.insertDivider),e.modules.toolbar=t,this.localOptions=e,e.modules.syntax&&"undefined"===typeof hljs){const t="highlight-js-script";(0,Ia.aU)(t,Oa,"text/javascript").then((()=>{this.initQuill(e)}))}else this.initQuill(e)},beforeDestroy(){this.quill=null}},Ba=Pa,Ra=(0,k.c)(Ba,oa,ra,!1,null,"dc784262",null),Na=Ra.exports,Fa=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,locale:e.locale,size:e.size,name:e.name,required:e.required},on:{localize:e.updateLocale}},[e.editor?t("div",{staticClass:"wysiwyg__outer"},[t("div",{directives:[{name:"show",rawName:"v-show",value:!e.activeSource,expression:"!activeSource"}],staticClass:"wysiwyg",class:e.textfieldClasses,attrs:{dir:e.dirLocale}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],attrs:{name:e.name,type:"hidden"},domProps:{value:e.value},on:{input:function(t){t.target.composing||(e.value=t.target.value)}}}),t("div",{ref:"editor",staticClass:"wysiwyg__editor"},[t("div",{staticClass:"wysiwyg__menubar"},[e.toolbar.header?[e.toolbar.header?t("wysiwyg-menu-bar-btn",{attrs:{icon:"paragraph",disabled:e.editor.isActive("paragraph"),isActive:e.editor.isActive("paragraph")},on:{"btn:click":function(t){e.editor.chain().focus().setParagraph().run()}}}):e._e(),e._l(e.headingOptions,(function(i){return t("wysiwyg-menu-bar-btn",{key:i,attrs:{icon:i>1?"header-".concat(i):"header",isActive:e.editor.isActive("heading",{level:i})},on:{"btn:click":function(t){e.editor.chain().focus().toggleHeading({level:i}).run()}}})}))]:e._e(),e.toolbar.bold?t("wysiwyg-menu-bar-btn",{attrs:{icon:"bold",isActive:e.editor.isActive("bold")},on:{"btn:click":function(t){e.editor.chain().focus().toggleBold().run()}}}):e._e(),e.toolbar.italic?t("wysiwyg-menu-bar-btn",{attrs:{icon:"italic",isActive:e.editor.isActive("italic")},on:{"btn:click":function(t){e.editor.chain().focus().toggleItalic().run()}}}):e._e(),e.toolbar.strike?t("wysiwyg-menu-bar-btn",{attrs:{icon:"strike",isActive:e.editor.isActive("strike")},on:{"btn:click":function(t){e.editor.chain().focus().toggleStrike().run()}}}):e._e(),e.toolbar.underline?t("wysiwyg-menu-bar-btn",{attrs:{icon:"underline",isActive:e.editor.isActive("underline")},on:{"btn:click":function(t){e.editor.chain().focus().toggleUnderline().run()}}}):e._e(),e.toolbar.hr?t("wysiwyg-menu-bar-btn",{attrs:{icon:"hr"},on:{"btn:click":function(t){e.editor.chain().focus().setHorizontalRule().run()}}}):e._e(),e.toolbar.link?t("wysiwyg-menu-bar-btn",{attrs:{icon:"link",isActive:e.editor.isActive("link")},on:{"btn:click":function(t){return e.openLinkWindow()}}}):e._e(),e.toolbar.link&&e.editor.isActive("link")?t("wysiwyg-menu-bar-btn",{attrs:{icon:"unlink",disabled:!e.editor.isActive("link"),isActive:e.editor.isActive("link")},on:{"btn:click":function(t){return e.removeLink()}}}):e._e(),e.toolbar.bullet?t("wysiwyg-menu-bar-btn",{attrs:{icon:"ul",isActive:e.editor.isActive("bulletList")},on:{"btn:click":function(t){e.editor.chain().focus().toggleBulletList().run()}}}):e._e(),e.toolbar.ordered?t("wysiwyg-menu-bar-btn",{attrs:{icon:"ol",isActive:e.editor.isActive("orderedList")},on:{"btn:click":function(t){e.editor.chain().focus().toggleOrderedList().run()}}}):e._e(),e.toolbar.blockquote?t("wysiwyg-menu-bar-btn",{attrs:{icon:"quote",isActive:e.editor.isActive("blockquote")},on:{"btn:click":function(t){e.editor.chain().focus().toggleBlockquote().run()}}}):e._e(),e.toolbar.codeBlock?t("wysiwyg-menu-bar-btn",{attrs:{icon:"code",isActive:e.editor.isActive("codeBlock")},on:{"btn:click":function(t){e.editor.chain().focus().toggleCodeBlock().run()}}}):e._e(),e.toolbar.code?t("wysiwyg-menu-bar-btn",{attrs:{icon:"code",isActive:e.editor.isActive("code")},on:{"btn:click":function(t){e.editor.chain().focus().setCode().run()}}}):e._e(),e.toolbar.align||e.toolbar["align-left"]?t("wysiwyg-menu-bar-btn",{attrs:{icon:"align_left",label:"align left",isActive:e.editor.isActive({textAlign:"left"})},on:{"btn:click":function(t){return e.setTextAlign("left")}}}):e._e(),e.toolbar.align||e.toolbar["align-center"]?t("wysiwyg-menu-bar-btn",{attrs:{icon:"align_center",label:"align center",isActive:e.editor.isActive({textAlign:"center"})},on:{"btn:click":function(t){return e.setTextAlign("center")}}}):e._e(),e.toolbar.align||e.toolbar["align-right"]?t("wysiwyg-menu-bar-btn",{attrs:{icon:"align_right",label:"align right",isActive:e.editor.isActive({textAlign:"right"})},on:{"btn:click":function(t){return e.setTextAlign("right")}}}):e._e(),e.toolbar.align||e.toolbar["align-justify"]?t("wysiwyg-menu-bar-btn",{attrs:{icon:"align_justify",label:"justify",isActive:e.editor.isActive({textAlign:"justify"})},on:{"btn:click":function(t){return e.setTextAlign("justify")}}}):e._e(),e.toolbar.table?t("wysiwyg-menu-bar-btn",{attrs:{icon:"table"},on:{"btn:click":function(t){e.editor.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}}}):e._e(),t("wysiwyg-menu-bar-btn",{attrs:{icon:"undo",disabled:!e.editor.can().undo()},on:{"btn:click":function(t){e.editor.chain().focus().undo().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"redo",disabled:!e.editor.can().redo()},on:{"btn:click":function(t){e.editor.chain().focus().redo().run()}}}),e.toolbar.table?[e.editor.isActive("table")?t("div",{staticClass:"wysiwyg__menubar-table-buttons"},[t("br"),t("wysiwyg-menu-bar-btn",{attrs:{icon:"delete_table"},on:{"btn:click":function(t){e.editor.chain().focus().deleteTable().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"add_col_before"},on:{"btn:click":function(t){e.editor.chain().focus().addColumnBefore().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"add_col_after"},on:{"btn:click":function(t){e.editor.chain().focus().addColumnAfter().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"delete_col"},on:{"btn:click":function(t){e.editor.chain().focus().deleteColumn().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"add_row_before"},on:{"btn:click":function(t){e.editor.chain().focus().addRowBefore().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"add_row_after"},on:{"btn:click":function(t){e.editor.chain().focus().addRowAfter().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"delete_row"},on:{"btn:click":function(t){e.editor.chain().focus().deleteRow().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"combine_cells"},on:{"btn:click":function(t){e.editor.chain().focus().mergeCells().run()}}})],1):e._e()]:e._e(),this.toolbar.wrappers?[t("br"),e._l(this.toolbar.wrappers,(function(i){return[t("wysiwyg-menu-bar-btn",{key:i.id,attrs:{"icon-url":i.icon,isActive:e.editor.isActive(i.class),label:i.label},on:{"btn:click":function(t){e.editor.commands["set"+i.id]()}}})]}))]:e._e()],2),t("div",{staticClass:"wysiwyg__contentWrapper",class:{"wysiwyg__contentWrapper--limitHeight":e.limitHeight},on:{click:function(t){e.editor.chain().focus()}}},[t("editor-content",{staticClass:"wysiwyg__content",attrs:{editor:e.editor}})],1)]),e.shouldShowCounter?t("span",{staticClass:"input__limit f--tiny",class:e.limitClasses},[e._v(e._s(e.counter))]):e._e()]),e.editSource?[t("div",{directives:[{name:"show",rawName:"v-show",value:e.activeSource,expression:"activeSource"}],staticClass:"form__field form__field--textarea"},[t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],style:e.textareaHeight,attrs:{placeholder:e.placeholder,autofocus:e.autofocus},domProps:{value:e.value},on:{change:e.updateSourcecode,input:function(t){t.target.composing||(e.value=t.target.value)}}})]),t("a17-button",{staticClass:"wysiwyg__button",attrs:{variant:"ghost"},on:{click:e.toggleSourcecode}},[e._v("Source code ")])]:e._e()],2):e._e(),e.browserIsOpen&&e.browserEndpoints?t("standalone-browser",{ref:"localbrowser",attrs:{"endpoint-multiple":e.browserEndpoints,max:1},on:{selected:e.setLinkFromBrowser,close:function(t){e.browserIsOpen=!1}}}):e._e(),t("a17-modal",{ref:"link-modal",staticClass:"modal--form modal--link",attrs:{title:e.$trans("wysiwyg.link_window.title","Edit link")}},[e.linkWindow?[t("a17-textfield",{attrs:{name:"link_text","initial-value":e.linkWindow.text,label:e.$trans("wysiwyg.link_window.text","Text to display")},model:{value:e.linkWindow.text,callback:function(t){e.$set(e.linkWindow,"text",t)},expression:"linkWindow.text"}}),t("a17-textfield",{attrs:{name:"link_link","initial-value":e.linkWindow.href,label:e.$trans("wysiwyg.link_window.link","Link"),placeholder:e.$trans("wysiwyg.link_window.link_placeholder","https://...")},model:{value:e.linkWindow.href,callback:function(t){e.$set(e.linkWindow,"href",t)},expression:"linkWindow.href"}}),t("div",[e.browserEndpoints?t("a17-button",{staticClass:"link-browser-link",attrs:{variant:"aslink-grey"},on:{click:function(t){e.browserIsOpen=!0}}},[e._v(" "+e._s(e.$trans("wysiwyg.link_window.internal_browser_link","Select internal content"))+" ")]):e._e()],1),t("a17-inputframe",{attrs:{name:"link-options"}},[t("a17-checkbox",{attrs:{name:"link_target","initial-value":e.linkWindow.target,value:"_blank",label:e.$trans("wysiwyg.link_window.open_in_new_window","Open in a new tab")},on:{change:function(t){e.linkWindow.target=t?"_blank":""}}}),e.linkWindow&&e.linkWindow.classList&&e.linkWindow.classList.length?t("div",{staticClass:"classList"},e._l(e.linkWindow.classList,(function(i,s){return t("a17-checkbox",{key:"link_class_".concat(s),attrs:{name:"link_class_".concat(s),"initial-value":e.linkWindow.classList[s].selected,value:e.linkWindow.classList[s].value,label:e.linkWindow.classList[s].label},on:{change:function(t){e.linkWindow.classList[s].selected=t}}})})),1):e._e()],1),t("div",{staticClass:"modalValidation"},[t("a17-button",{staticClass:"dialog-confirm",attrs:{variant:"validate",tabindex:"4"},on:{click:e.saveLink}},[e._v(" "+e._s(e.$trans("wysiwyg.link_window.save","Save"))+" ")]),t("a17-button",{staticClass:"dialog-cancel",attrs:{variant:"aslink-grey",tabindex:"5"},on:{click:function(t){return e.$refs["link-modal"].close()}}},[e._v(" "+e._s(e.$trans("wysiwyg.link_window.save","Cancel"))+" ")])],1)]:e._e()],2)],1)},$a=[],Ua=i(5120),Va=i(5168),qa=i(208),Wa=i(1232),Ha=i(9096),za=i(5879),Ka=i(4683),ja=i(2020),Ga=i(6308),Ya=function(){var e,t=this,i=t._self._c;return i("button",{class:{"is-active":t.isActive,"wysiwyg__menubar-button":t.icon||t.iconUrl},attrs:{disabled:t.disabled,type:"button",title:t.label},on:{click:t.handleClick}},[t.iconUrl?[i("img",{staticClass:"icon--custom",attrs:{src:t.iconUrl,alt:t.label}})]:t.icon?[i("span",{staticClass:"icon",class:"icon--wysiwyg_".concat(t.icon),attrs:{"aria-hidden":"true"}},[i("svg",[i("title",[t._v(t._s(null!==(e=t.label)&&void 0!==e?e:t.icon))]),i("use",{attrs:{"xlink:href":"#icon--wysiwyg_".concat(t.icon)}})])])]:[t._v(" "+t._s(t.label)+" ")]],2)},Xa=[],Ja={name:"WysiwygMenuBarButton",props:{icon:{type:String,required:!1},iconUrl:{type:String,required:!1},label:{type:String,required:!1},isActive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{handleClick(){this.$emit("btn:click")}}},Qa=Ja,Za=(0,k.c)(Qa,Ya,Xa,!1,null,"8e292938",null),en=Za.exports,tn=i(6772),sn=i(3704),an=i(2928),nn={name:"A17Wysiwyg",mixins:[ge.c,ee.c,Ue.c,Z.c],props:{editSource:{type:Boolean,default:!1},showCounter:{type:Boolean,default:!0},type:{type:String,default:"text"},prefix:{type:String,default:""},maxlength:{type:Number,default:0},initialValue:{default:""},browserEndpoints:{required:!1,default:null},classList:{required:!1,default:null},limitHeight:{type:Boolean,default:!1},options:{type:Object,required:!1,default:function(){return{modules:{}}}}},computed:{textareaHeight:function(){return{height:this.editorHeight}},textfieldClasses:function(){return{"s--disabled":this.disabled,"s--focus":this.focused}},hasMaxlength:function(){return this.maxlength>0},shouldShowCounter:function(){return this.hasMaxlength&&this.showCounter},limitClasses:function(){return{"input__limit--red":this.counter<.1*this.maxlength}},...(0,_.ys)({baseUrl:e=>e.form.baseUrl})},components:{EditorContent:Ua.C4,StandaloneBrowser:Ga.c,"wysiwyg-menu-bar-btn":en},data(){return{value:this.initialValue,editorHeight:50,toolbarHeight:52,toolbar:this.options.modules.toolbar?this.options.modules.toolbar.reduce(((e,t)=>t.list?(e[t.list]=!0,e):"object"===typeof t?{...e,...t}:(e[t]=!0,e)),{}):{bold:!0,italic:!0,underline:!0,link:!0},headingOptions:[],focused:!1,activeSource:!1,counter:0,editor:null,linkWindow:null,browserIsOpen:!1}},methods:{updateEditor:function(e){this.editor&&this.editor.commands.setContent(e)},updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&(this.value=e,this.updateEditor(e))},textUpdate:function(){this.preventSubmit(),this._textUpdateInternal()},_textUpdateInternal:da()((function(){this.saveIntoStore(),this.allowSubmit()}),600),toggleSourcecode:function(){this.editorHeight=Math.max(50,this.$refs.editor.clientHeight)+this.toolbarHeight-1+"px",this.activeSource=!this.activeSource,this.updateSourcecode()},updateSourcecode:function(){this.updateEditor(this.value),this.saveIntoStore()},updateCounter(){this.showCounter&&this.hasMaxlength&&(this.counter=this.maxlength-this.getTextLength())},getTextLength(){return this.editor.getHTML().replace(/<[^>]+>/g,"").length},openLinkWindow:function(){var e,t;this.editor.commands.extendMarkRange("link");const{ranges:i}=this.editor.state.selection,s=(0,Va.aM)(this.editor.state,"link");let a=!0,n=i[0].$from.pos,o=i[0].$to.pos;s.href&&(a=!1);let r=null,l=null;const d=this.editor.state.tr.doc,c=this.editor.getHTML().length;if(n===o){let e=!1,t=!1;while(!e&&n>0)e=0===n||" "===d.textBetween(n-1,n)," "===d.textBetween(n-1,n)?r=n:0===n&&(r=0),n-=1;while(!t&&o{var t;return e.selected=(null!==(t=s.class)&&void 0!==t?t:"").includes(e.value),e})):[]},this.$nextTick((()=>{this.$refs["link-modal"].open()}))},removeLink(){this.editor.chain().focus().extendMarkRange("link").unsetLink().run()},setLinkFromBrowser(e){this.linkWindow.href="#twillInternalLink::"+e[0].endpointType+"#"+e[0].id},saveLink(){this.linkWindow.text!==this.linkWindow.textOriginal&&(this.editor.commands.insertContentAt({from:this.linkWindow.from,to:this.linkWindow.to},this.linkWindow.text),this.editor.commands.setTextSelection({from:this.linkWindow.from,to:this.linkWindow.from+this.linkWindow.text.length})),this.linkWindow.newLink?this.editor.commands.setLink({href:this.linkWindow.href,target:this.linkWindow.target,class:this.linkWindow.classList.filter((e=>e.selected)).map((e=>e.value)).join(" ")}):this.editor.commands.updateAttributes("link",{href:this.linkWindow.href,target:this.linkWindow.target,class:this.linkWindow.classList.filter((e=>e.selected)).map((e=>e.value)).join(" ")}),this.$refs["link-modal"].close(),this.linkWindow=null},setTextAlign(e){this.editor.chain().focus().setTextAlign(e).run()}},beforeMount(){var e,t,i,s,a;this.toolbar.header&&(this.headingOptions=this.toolbar.header.filter((e=>"number"===typeof e)));const n=this.value||"",o=[an.M.configure({types:["heading","paragraph"]})];this.placeholder&&this.placeholder.length>0&&o.push(sn.I.configure({emptyNodeClass:"is-empty",emptyNodeText:this.placeHolder,showOnlyWhenEditable:!0})),this.toolbar.wrappers&&this.toolbar.wrappers.forEach((e=>{o.push(Va.a8.create({name:e.id,group:"block",marks:"_",atom:!0,content:"block+",addOptions(){return{HTMLAttributes:{class:e.className,"data-customwrapper":e.id,"data-customwrapper-label":e.label}}},parseHTML(){return[{tag:"div",getAttrs:t=>{t.getAttribute("data-customwrapper",e.id)}}]},renderHTML(e){let{HTMLAttributes:t}=e;return["div",(0,Va.Oo)(this.options.HTMLAttributes,t),0]},addCommands(){const t="set"+this.name,i={};return i[t]=()=>t=>{let{chain:i}=t;if(e.createElement)switch(e.createElement){case"ol":return i().toggleWrap(this.name).toggleOrderedList().run();case"ul":return i().toggleWrap(this.name).toggleBulletList().run()}return i().toggleWrap(this.name).run()},i}}))})),Object.keys(this.toolbar).forEach((e=>{switch(e){case"link":o.push(tn.cH.configure({openOnClick:!1}));break;case"underline":o.push(Wa.c);break;case"table":o.push(Ha.cp.configure({resizable:!1})),o.push(ja.c),o.push(Ka.c),o.push(za.c);break}})),o.push(qa.c.configure({orderedList:null!==(e=this.toolbar.ordered)&&void 0!==e&&e,bulletList:null!==(t=this.toolbar.bullet)&&void 0!==t&&t,listItem:this.toolbar.ordered||this.toolbar.bullet||!1,code:null!==(i=this.toolbar.code)&&void 0!==i&&i,codeBlock:null!==(s=this.toolbar.codeBlock)&&void 0!==s&&s,horizontalRule:null!==(a=this.toolbar.hr)&&void 0!==a&&a})),this.editor=new Ua.GW({content:n,extensions:o,onUpdate:e=>{let{editor:t}=e;this.value=t.getHTML(),this.textUpdate(),this.updateCounter()}}),this.updateCounter()},beforeUnmount(){this.editor.destroy()},beforeDestroy(){this.editor.destroy()}},on=nn,rn=(0,k.c)(on,Fa,$a,!1,null,"313dbf04",null),ln=rn.exports;function dn(e,t,i){return t=cn(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function cn(e){var t=un(e,"string");return"symbol"==typeof t?t:String(t)}function un(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const hn={target:"data-sticky-target",toptarget:"data-sticky-top",classContainer:"sticky",classFixed:"sticky__fixed",classAbs:"sticky__abs",classEnd:"sticky__scrolled",topOffset:0,offset:20};class pn{constructor(e,t){dn(this,"refresh",(()=>this._refresh())),dn(this,"dispose",(()=>this._dispose())),dn(this,"status","top"),dn(this,"ticking",!1),dn(this,"anchors",["Top","Bottom"]),dn(this,"lastScrollPos",0),dn(this,"prevScrollPos",-1),t={...hn,...t},this.target=null,this.toptarget=null,this.container=e,this.containerID=this.container.getAttribute("data-sticky-id"),this.options=t,this.options.target&&(this.target=this.container.querySelector("["+this.options.target+'="'+this.containerID+'"]')),this.options.toptarget&&(this.toptarget=this.container.querySelector("["+this.options.toptarget+'="'+this.containerID+'"]')),this.topMargin=this.container.hasAttribute("data-sticky-offset")?parseInt(this.container.getAttribute("data-sticky-offset")):this.options.offset,this.topOffset=this.container.hasAttribute("data-sticky-topoffset")?parseInt(this.container.getAttribute("data-sticky-topoffset")):this.options.topOffset,e.classList.add(this.options.classContainer),this._setEventListeners(),this._refresh()}_refresh(){if(!this.target)return!1;if(!this._isFullyVisible(this.target))return this._removePositionClass(),!1;const e=this.lastScrollPos,t=this.target.offsetHeight,i=this.container.offsetHeight,s=t+this.topMargin=a&&e=n&&(this._removePositionClass(),this.target.classList.add(this.options.classAbs),this.status="bottom"),e+window.innerHeight>=this.container.getBoundingClientRect().top+e+i?this.target.classList.add(this.options.classEnd):this.target.classList.remove(this.options.classEnd)),this}_isFullyVisible(e){return e.clientHeightthis._scroll())),window.removeEventListener("resize",(()=>this._resize())),this}_setEventListeners(){window.addEventListener("scroll",(()=>this._scroll())),window.addEventListener("resize",(()=>this._resize())),this._resize()}}const mn={};var fn={install(e){const t={options:mn,bind:function(e,i,s){const a=e._sticky=new pn(e,t.options);a._vueEl=e},componentUpdated:function(e,t,i){e._sticky.refresh()},inserted:function(e,t,i){},unbind:function(e,t,i){e._sticky.dispose()}};e.directive("sticky",t)}};function gn(e,t,i){const s=["icon"],a=t.expression||i.data.attrs.symbol;let n=e;"span"===i.tag&&(n=document.createElementNS("http://www.w3.org/2000/svg","svg"),e.appendChild(n)),s.push("icon--".concat(a)),s.forEach((function(t){e.classList.add(t)}));const o=document.createElementNS("http://www.w3.org/2000/svg","title");o.textContent=a,n.appendChild(o);const r="#icon--".concat(a),l=document.createElementNS("http://www.w3.org/2000/svg","use");l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),n.appendChild(l)}function _n(e){const t=e.querySelector("svg");t&&t.parentNode.removeChild(t);const i=e.className.split(" ").filter((function(e){return 0===e.indexOf("icon")}));i.forEach((function(t){e.classList.remove(t)}))}var bn={install(e){const t={bind(e,t,i){gn(e,t,i)},componentUpdated:function(e,t,i,s){_n(e),gn(e,t,i)},inserted:function(e,t,i){},unbind:function(e,t,i){}};e.directive("svg",t)}};function vn(e,t,i){return t=yn(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function yn(e){var t=wn(e,"string");return"symbol"==typeof t?t:String(t)}function wn(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const En={container:!1,delay:0,html:!1,budge:15,placement:"top",theme:"default",title:"",template:'',trigger:"hover focus",offset:0};class Tn{constructor(e,t){vn(this,"show",(()=>this._show(this.reference,this.options))),vn(this,"hide",(()=>this._hide())),vn(this,"dispose",(()=>this._dispose())),vn(this,"toggle",(()=>this._isOpen?this.hide():this.show())),vn(this,"innerSelector",".tooltip__inner"),vn(this,"_events",[]),vn(this,"_setTooltipNodeEvent",((e,t,i,s)=>{const a=e.relatedreference||e.toElement,n=i=>{const a=i.relatedreference||i.toElement;this._tooltipNode.removeEventListener(e.type,n),t.contains(a)||this._scheduleHide(t,s.delay,s,i)};return!!this._tooltipNode.contains(a)&&(this._tooltipNode.addEventListener(e.type,n),!0)})),t={...En,...t},this.reference=e,this.options=t;const i="string"===typeof t.trigger?t.trigger.split(" ").filter((e=>-1!==["click","hover","focus"].indexOf(e))):[];this._isOpen=!1,this._setEventListeners(e,i,t)}_create(e,t,i,s,a){if(this._tooltipNode)return this;const n=window.document.createElement("div");n.innerHTML=t.trim();const o=n.childNodes[0];o.id="tooltip--".concat(Math.random().toString(36).substr(2,10)),o.setAttribute("aria-hidden","false"),o.classList.add("tooltip--"+i);const r=n.querySelector(this.innerSelector);return 1===s.nodeType?a&&r.appendChild(s):a?r.innerHTML=s:r.innerText=s,o}_position(e,t,i){let s=0,a=0,n=t;const o=e.getBoundingClientRect();this._tooltipNode.classList.remove("tooltip--"+n);const r=Math.round(o.top-this._tooltipNode.offsetHeight-i),l=Math.round(o.top+o.height/2-this._tooltipNode.offsetHeight/2),d=Math.round(o.left+o.width+i),c=Math.round(o.top+o.height+i),u=Math.round(o.left-this._tooltipNode.offsetWidth-i),h=Math.round(o.left+o.width/2-this._tooltipNode.offsetWidth/2);"top"===t&&(s=h,a=r,n="top",s<10&&(s=10),a<0&&(a=c,n="bottom")),"top-right"===t&&(s=d,a=r,n="top",a<0&&(a=c,n="bottom")),"bottom"===t&&(s=h,a=c,n="bottom",s<10&&(s=10),a>0&&(a=r,n="top")),"right"===t&&(s=d,a=l,n="right"),"left"===t&&(s=u,a=l,n="left",s<0&&(s=d,n="right")),this._tooltipNode.style.left=s+"px",this._tooltipNode.style.top=a+"px",this._tooltipNode.classList.add("tooltip--"+n)}_show(e,t){if(this._isOpen&&!this._isOpening)return this;this._isOpen=!0;const i=e.getAttribute("data-tooltip-budge")||t.budge,s=e.getAttribute("data-tooltip-theme")||t.theme,a=e.getAttribute("data-tooltip-placement")||t.placement;if(this._tooltipNode)return this._tooltipNode.style.opacity="",this._tooltipNode.style.visibility="",this._tooltipNode.style.transition="opacity 0.3s",this._tooltipNode.setAttribute("aria-hidden","false"),this._position(e,a,i),this;const n=e.getAttribute("data-tooltip-title")||t.title,o=this._create(e,t.template,s,n,t.html);e.setAttribute("aria-describedby",o.id);const r=this._findContainer(t.container,e);return this._append(o,r),this._tooltipNode=o,this._position(e,a,i),this}_hide(){return this._isOpen?(this._isOpen=!1,this._tooltipNode.style.opacity="0",this._tooltipNode.style.visibility="hidden",this._tooltipNode.style.transition="",this._tooltipNode.setAttribute("aria-hidden","true"),this):this}_dispose(){return this._events.length&&(this._events.forEach((e=>{let{func:t,event:i}=e;this.reference.removeEventListener(i,t)})),this._events=[]),this._tooltipNode&&(this._hide(),this._tooltipNode.parentNode.removeChild(this._tooltipNode),this._tooltipNode=null),this}_findContainer(e,t){return"string"===typeof e?e=window.document.querySelector(e):!1===e&&(e=t.parentNode),e}_append(e,t){t.appendChild(e)}_setEventListeners(e,t,i){const s=[],a=[];t.forEach((e=>{switch(e){case"hover":s.push("mouseenter"),a.push("mouseleave");break;case"focus":s.push("focus"),a.push("blur");break;case"click":s.push("click"),a.push("click");break}})),s.forEach((t=>{const s=t=>{!0!==this._isOpening&&(t.usedByTooltip=!0,this._scheduleShow(e,i.delay,i,t))};this._events.push({event:t,func:s}),e.addEventListener(t,s)})),a.forEach((t=>{const s=t=>{!0!==t.usedByTooltip&&this._scheduleHide(e,i.delay,i,t)};this._events.push({event:t,func:s}),e.addEventListener(t,s)}))}_scheduleShow(e,t,i){this._isOpening=!0;const s=t&&t.show||t||0;s>0?window.setTimeout((()=>this._show(e,i)),s):this._show(e,i)}_scheduleHide(e,t,i,s){this._isOpening=!1;const a=t&&t.hide||t||0;window.setTimeout((()=>{if(!1!==this._isOpen&&document.body.contains(this._tooltipNode)){if("mouseleave"===s.type){const a=this._setTooltipNodeEvent(s,e,t,i);if(a)return}this._hide()}}),a)}}const kn={};var Cn={install(e){const t={options:kn,bind:function(e,i,s){if(!e._tooltip){const i=e._tooltip=new Tn(e,t.options);i._vueEl=e}},componentUpdated:function(e,i,s,a){if(e._tooltip){e._tooltip.dispose();const i=e._tooltip=new Tn(e,t.options);i._vueEl=e}},inserted:function(e,t,i){},unbind:function(e,t,i){e._tooltip&&e._tooltip.dispose()}};e.directive("tooltip",t)}};const An=!0,xn={install(e,t){e.component("a17-button",P),e.component("a17-infotip",ut),e.component("a17-slideshow",sa),e.component("a17-browserfield",D),e.component("a17-textfield",aa.c),e.component("a17-hiddenfield",nt),e.component("a17-wysiwyg",Na),e.component("a17-wysiwyg-tiptap",ln),e.component("a17-inputframe",_t),e.component("a17-mediafield",es),e.component("a17-mediafield-translated",os),e.component("a17-radio",ys),e.component("a17-radiogroup",As),e.component("a17-checkbox",j),e.component("a17-singlecheckbox",$s),e.component("a17-checkboxgroup",ae),e.component("a17-singleselect-permissions",Js),e.component("a17-multiselect",ms),e.component("a17-singleselect",zs),e.component("a17-select",Is),e.component("a17-vselect",na.c),e.component("a17-locale",Ct),e.component("a17-dropdown",Ne.c),e.component("a17-buttonbar",U),e.component("a17-modal",rs.c),e.component("a17-dialog",Re),e.component("a17-datepicker",De),e.component("a17-filefield",Ze),e.component("a17-colorfield",ye),e.component("a17-avatar",h.c),e.component("a17-medialibrary",Si),e.mixin({methods:{openFreeMediaLibrary:function(){this.$store.commit(v.ol.UPDATE_MEDIA_CONNECTOR,null),this.$store.commit(v.ol.RESET_MEDIA_TYPE),this.$store.commit(v.ol.UPDATE_REPLACE_INDEX,-1),this.$store.commit(v.ol.UPDATE_MEDIA_MAX,0),this.$store.commit(v.ol.UPDATE_MEDIA_FILESIZE_MAX,0),this.$store.commit(v.ol.UPDATE_MEDIA_WIDTH_MIN,0),this.$store.commit(v.ol.UPDATE_MEDIA_HEIGHT_MIN,0),this.$store.commit(v.ol.UPDATE_MEDIA_MODE,!1),this.$root.$refs.mediaLibrary&&this.$root.$refs.mediaLibrary.open()}}}),e.config.productionTip=An,e.config.devtools=!An,e.prototype.$http=o(),window.$trans=e.prototype.$trans=function(e,t){return l()(window["TWILL"].twillLocalization.lang,e,t)},o().defaults.headers.common["X-Requested-With"]="XMLHttpRequest",o().interceptors.response.use((e=>e),(e=>((0,Mt.q)("CONTENT",e),Promise.reject(e)))),e.use(u.cp,{name:"timeago",locale:window["TWILL"].twillLocalization.locale,locales:c()(Ae.ob,"date-fns")}),e.use(bn),e.use(Cn),e.use(fn)}};var Sn=xn},5572:function(e,t,i){"use strict";i.d(t,{c:function(){return h}});var s=function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:"move_down_notif"}},[e.show?t("div",{class:e.notifClasses,attrs:{role:"alert","aria-live":"polite","aria-atomic":"true"}},[t("div",{staticClass:"notif__inner"},[e.important?e._e():t("button",{staticClass:"notif__close",attrs:{type:"button","data-dismiss":"alert","aria-label":"alertClose"},on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.closeNotif.apply(null,arguments)}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"close_modal"}})]),t("span",{domProps:{innerHTML:e._s(e.message)}})])]):e._e()])},a=[],n=i(624),o={name:"A17Notification",props:{variant:{type:String,default:"success"},duration:{type:Number,default:3e3},important:{type:Boolean,default:!0},autoHide:{type:Boolean,default:!0}},data:function(){return{closed:!1,timer:null,css:"notif"}},computed:{message:function(){return this.$store.getters.notifByVariant(this.variant)},variantClass:function(){return"notif--".concat(this.variant)},notifClasses:function(){return this.css&&Array.isArray(this.css)?[...this.css,this.variantClass]:["notif",this.variantClass]},show:function(){return!this.closed&&!!this.message}},methods:{closeNotif:function(){this.closed=!0,this.clearNotification(),this.timer&&(clearTimeout(this.timer),this.timer=null)},clearNotification:function(){this.$store.commit(n.gp.CLEAR_NOTIF,this.variant)},autoClose:function(){null===this.timer&&(this.timer=setTimeout((()=>{this.closeNotif()}),this.duration))}},watch:{message:function(){this.message&&(this.closed=!1,this.autoHide&&this.autoClose())}}},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,null,null),c=d.exports;const u={install(e,t){e.mixin({methods:{notif:function(e){this.$store.commit(n.gp.SET_NOTIF,e)}}}),e.component("a17-notif",c)}};var h=u},7632:function(e,t,i){"use strict";const s="moveBlockToEditor",a="duplicateBlock",n="duplicateRepeater",o="getBucketsData",r="saveBuckets",l="getDatatableDatas",d="setDatatableNestedDatas",c="setDatatableDatas",u="togglePublishedData",h="deleteData",p="duplicateData",m="restoreData",f="destroyData",g="toggleFeaturedData",_="bulkPublishData",b="bulkFeatureData",v="bulkExportData",y="bulkDeleteData",w="bulkRestoreData",E="bulkDestroyData",T="replaceFormData",k="saveFormData",C="updateFormInListing",A="createFormInModal",x="getAllPreviews",S="getPreview",L="getRevisionContent",D="getCurrentContent",M="handleErrors";t.cp={HANDLE_ERRORS:M,GET_BUCKETS:o,SAVE_BUCKETS:r,GET_DATATABLE:l,SET_DATATABLE_NESTED:d,SET_DATATABLE:c,TOGGLE_PUBLISH:u,DELETE_ROW:h,DUPLICATE_ROW:p,RESTORE_ROW:m,DESTROY_ROW:f,TOGGLE_FEATURE:g,BULK_PUBLISH:_,BULK_FEATURE:b,BULK_EXPORT:v,BULK_DELETE:y,BULK_RESTORE:w,BULK_DESTROY:E,REPLACE_FORM:T,SAVE_FORM:k,UPDATE_FORM_IN_LISTING:C,CREATE_FORM_IN_MODAL:A,GET_ALL_PREVIEWS:x,GET_PREVIEW:S,GET_REVISION:L,GET_CURRENT:D,MOVE_BLOCK_TO_EDITOR:s,DUPLICATE_BLOCK:a,DUPLICATE_REPEATER:n}},7176:function(e,t,i){"use strict";i.d(t,{c:function(){return v}});var s=i(9016),a=i(6036),n=i(8316),o=i.n(n),r=i(7632),l=i(624);const d={crops:window["TWILL"].STORE.medias.crops||{},showFileName:window["TWILL"].STORE.medias.showFileName||!1,types:window["TWILL"].STORE.medias.types||[],type:"image",connector:null,max:0,filesizeMax:0,widthMin:0,heightMin:0,strict:!0,selected:window["TWILL"].STORE.medias.selected||{},config:window["TWILL"].STORE.medias.config||{useWysiwyg:!1,wysiwygOptions:{}},loading:[],uploadProgress:0,indexToReplace:-1},c={mediasByBlockId:e=>t=>{const i=Object.keys(e.selected).filter((e=>e.startsWith("blocks[".concat(t,"]")))),s={};return i.forEach((t=>s[t]=e.selected[t])),s}},u={[l.ol.UPDATE_MEDIA_TYPE_TOTAL](e,t){e.types=e.types.map((e=>(e.value===t.type&&(e.total=t.total),e)))},[l.ol.UPDATE_REPLACE_INDEX](e,t){e.indexToReplace=t},[l.ol.INCREMENT_MEDIA_TYPE_TOTAL](e,t){e.types=e.types.map((e=>(e.value===t&&(e.total=e.total+1),e)))},[l.ol.DECREMENT_MEDIA_TYPE_TOTAL](e,t){e.types=e.types.map((e=>(e.value===t&&(e.total=e.total-1),e)))},[l.ol.UPDATE_MEDIAS](e,t){let{mediaRole:i,index:a,media:n}=t;s["default"].set(e.selected[i],a,n)},[l.ol.SAVE_MEDIAS](e,t){if(e.connector){const i=e.connector,s=e.selected[i]&&e.selected[i].length;if(s&&e.indexToReplace>-1)e.selected[i].splice(e.indexToReplace,1,o()(t[0]));else if(s)t.forEach((function(t){e.selected[i].push(o()(t))}));else{const s={};s[i]=t,e.selected=Object.assign({},e.selected,s)}e.indexToReplace=-1}},[l.ol.DESTROY_SPECIFIC_MEDIA](e,t){e.selected[t.name]&&(e.selected[t.name].splice(t.index,1),0===e.selected[t.name].length&&s["default"].delete(e.selected,t.name)),e.connector=null},[l.ol.DESTROY_MEDIAS](e,t){e.selected[t]&&s["default"].delete(e.selected,t),e.connector=null},[l.ol.REORDER_MEDIAS](e,t){const i={};i[t.name]=t.medias,e.selected=Object.assign({},e.selected,i)},[l.ol.PROGRESS_UPLOAD_MEDIA](e,t){const i=e.loading.filter((e=>e.id===t.id));i.length?(i[0].error=!1,i[0].progress=t.progress):e.loading.unshift({id:t.id,name:t.name,progress:t.progress,replacementId:t.replacementId,isReplacement:t.isReplacement})},[l.ol.PROGRESS_UPLOAD](e,t){e.uploadProgress=t},[l.ol.DONE_UPLOAD_MEDIA](e,t){e.loading.forEach((function(i,s){i.id===t.id&&e.loading.splice(s,1)}))},[l.ol.ERROR_UPLOAD_MEDIA](e,t){e.loading.forEach((function(i,a){i.id===t.id&&(s["default"].set(e.loading[a],"progress",0),s["default"].set(e.loading[a],"error",!0),s["default"].set(e.loading[a],"errorMessage",t.errorMessage))}))},[l.ol.UPDATE_MEDIA_CONNECTOR](e,t){e.connector=t&&""!==t?t:null},[l.ol.UPDATE_MEDIA_MODE](e,t){e.strict=t},[l.ol.UPDATE_MEDIA_TYPE](e,t){t&&""!==t&&(e.type=t)},[l.ol.RESET_MEDIA_TYPE](e){e.type=e.types[0].value},[l.ol.UPDATE_MEDIA_MAX](e,t){e.max=Math.max(0,t)},[l.ol.UPDATE_MEDIA_FILESIZE_MAX](e,t){e.filesizeMax=Math.max(0,t)},[l.ol.UPDATE_MEDIA_WIDTH_MIN](e,t){e.widthMin=Math.max(0,t)},[l.ol.UPDATE_MEDIA_HEIGHT_MIN](e,t){e.heightMin=Math.max(0,t)},[l.ol.SET_MEDIA_METADATAS](e,t){const i=t.media.context,a=e.selected[i],n=t.value;function r(e){return n.locale?(e.metadatas.custom[n.id]||(e.metadatas.custom[n.id]={}),e.metadatas.custom[n.id][n.locale]=n.value):e.metadatas.custom[n.id]=n.value,e}if(t.media.hasOwnProperty("index")){const e=r(o()(a[t.media.index]));s["default"].set(a,t.media.index,e)}},[l.ol.DESTROY_MEDIA_CONNECTOR](e){e.connector=null},[l.ol.SET_MEDIA_CROP](e,t){const i=t.key,a=t.index,n=e.selected[i][a];function r(e){e.crops||(e.crops={});for(const i in t.values){const s={};s.name=t.values[i].name||i,s.x=t.values[i].x,s.y=t.values[i].y,s.width=t.values[i].width,s.height=t.values[i].height,e.crops[i]=s}return e}const l=r(o()(n));s["default"].set(e.selected[i],a,l)},[l.ol.ADD_MEDIAS](e,t){let{medias:i}=t;e.selected=Object.assign({},e.selected,i)}},h={async[r.cp.DUPLICATE_BLOCK](e,t){let{commit:i,getters:s}=e,{block:a,id:n}=t;const o={...s.mediasByBlockId(a.id)},r=Object.keys(o),d={};r.forEach((e=>d[e.replace(a.id,n)]=[...o[e]])),i(l.ol.ADD_MEDIAS,{medias:d})}};var p={state:d,getters:c,mutations:u,actions:h};const m={success:null,info:null,warning:null,error:null},f={notifByVariant:e=>t=>e[t],notified:e=>0===Object.keys(e).filter((t=>null!==e[t])).length},g={[l.gp.SET_NOTIF](e,t){e[t.variant]=t.message},[l.gp.CLEAR_NOTIF](e,t){e[t]&&(e[t]=null)}};var _={state:m,getters:f,mutations:g};s["default"].use(a.cp);const b=!1;var v=new a.cp.Store({modules:{notification:_,mediaLibrary:p},strict:b})},4884:function(e,t,i){"use strict";var s=i(9016),a=i(624);const n={options:{}},o={optionsByName(e){return t=>e.options[t]||[]}},r={[a.MD.EMPTY_OPTIONS](e,t){e.options[t]&&s["default"].delete(e.options,t)},[a.MD.UPDATE_OPTIONS](e,t){const i=t.name,a=t.options;let n=[];e.options[i]&&(n=e.options[i],s["default"].delete(e.options,i)),Array.isArray(a)&&a.forEach((function(e){const t=n.findIndex((t=>t.value===e.value));-1===t&&n.push(e)})),s["default"].set(e.options,i,n)}},l={};t.c={state:n,getters:o,mutations:r,actions:l}},8920:function(e,t,i){"use strict";var s=i(9016),a=i(7632),n=i(624);const o={connector:null,title:"Attach related resources",note:"",endpoint:"",endpointName:"",endpoints:[],max:0,selected:window["TWILL"].STORE.browser.selected||{}},r={selectedItemsByIds:e=>{const t=[];for(const i in e.selected)t[i]=e.selected[i].map((e=>"".concat(e.endpointType,"_").concat(e.id)));return t},browsersByBlockId:e=>t=>{const i=Object.keys(e.selected).filter((e=>e.startsWith("blocks[".concat(t,"]")))),s={};return i.forEach((t=>s[t]=e.selected[t])),s}},l={[n.ai.SAVE_ITEMS](e,t){if(e.connector)if(e.selected[e.connector]&&e.selected[e.connector].length)e.selected[e.connector]=t;else{const i={};i[e.connector]=t,e.selected=Object.assign({},e.selected,i)}},[n.ai.DESTROY_ITEMS](e,t){e.selected[t.name]&&s["default"].delete(e.selected,t.name)},[n.ai.DESTROY_ITEM](e,t){e.selected[t.name]&&(e.selected[t.name].splice(t.index,1),0===e.selected[t.name].length&&s["default"].delete(e.selected,t.name),e.connector=null)},[n.ai.REORDER_ITEMS](e,t){const i={};i[t.name]=t.items,e.selected=Object.assign({},e.selected,i)},[n.ai.UPDATE_BROWSER_MAX](e,t){e.max=Math.max(0,t)},[n.ai.UPDATE_BROWSER_CONNECTOR](e,t){t&&""!==t&&(e.connector=t)},[n.ai.UPDATE_BROWSER_TITLE](e,t){t&&""!==t&&(e.title=t)},[n.ai.UPDATE_BROWSER_NOTE](e,t){e.note=t},[n.ai.DESTROY_BROWSER_CONNECTOR](e){e.connector=null},[n.ai.UPDATE_BROWSER_ENDPOINT](e,t){t&&""!==t&&(e.endpoint=t.value,e.endpointName=t.label||"")},[n.ai.DESTROY_BROWSER_ENDPOINT](e){e.endpoint="",e.endpointName=""},[n.ai.UPDATE_BROWSER_ENDPOINTS](e,t){!t&&!t.length>0||(e.endpoints=t,e.endpoint=t[0].value,e.endpointName=t[0].label)},[n.ai.DESTROY_BROWSER_ENDPOINTS](e){e.endpoints=[]},[n.ai.ADD_BROWSERS](e,t){let{browsers:i}=t;e.selected=Object.assign({},e.selected,i)}},d={async[a.cp.DUPLICATE_BLOCK](e,t){let{commit:i,getters:s}=e,{block:a,id:o}=t;const r={...s.browsersByBlockId(a.id)},l=Object.keys(r),d={};l.forEach((e=>d[e.replace(a.id,o)]=[...r[e]])),i(n.ai.ADD_BROWSERS,{browsers:d})}};t.c={state:o,getters:r,mutations:l,actions:d}},7768:function(e,t,i){"use strict";i.d(t,{c:function(){return b}});var s=i(7632),a=i(4267),n=i(9899),o=i.n(n),r=i(9812),l=i(9480);const d="DATATABLE";var c={get(e,t){o().get(window["TWILL"].CMS_URLS.index,{params:e}).then((function(e){if(e.data.replaceUrl){const t=e.request.responseURL;(0,l.mw)(t)}if(t&&"function"===typeof t){const i={data:e.data.tableData?e.data.tableData:[],nav:e.data.tableMainFilters?e.data.tableMainFilters:[],maxPage:e.data.maxPage?e.data.maxPage:1};t(i)}}),(function(e){const t={message:"Get request error.",value:e};(0,r.q)(d,t)}))},togglePublished(e,t,i){o().put(window["TWILL"].CMS_URLS.publish,{id:e.id,active:e.published}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Publish request error.",value:e};(0,r.q)(d,t),i&&"function"===typeof i&&i(e.response)}))},toggleFeatured(e,t){o().put(window["TWILL"].CMS_URLS.feature,{id:e.id,active:e.featured}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Feature request error.",value:e};(0,r.q)(d,t)}))},delete(e,t){o()["delete"](e.delete).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Delete request error.",value:e};(0,r.q)(d,t)}))},restore(e,t){o().put(window["TWILL"].CMS_URLS.restore,{id:e.id}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Restore request error.",value:e};(0,r.q)(d,t)}))},destroy(e,t){o().put(window["TWILL"].CMS_URLS.forceDelete,{id:e.id}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Destroy request error.",value:e};(0,r.q)(d,t)}))},duplicate(e,t){o().put(e.duplicate).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Duplicate request error.",value:e};(0,r.q)(d,t)}))},reorder(e,t){o().post(window["TWILL"].CMS_URLS.reorder,{ids:e}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Reorder request error.",value:e};(0,r.q)(d,t)}))},bulkPublish(e,t){o().post(window["TWILL"].CMS_URLS.bulkPublish,{ids:e.ids,publish:e.toPublish}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Bulk publish request error.",value:e};(0,r.q)(d,t)}))},bulkFeature(e,t){o().post(window["TWILL"].CMS_URLS.bulkFeature,{ids:e.ids,feature:e.toFeature}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Bulk feature request error.",value:e};(0,r.q)(d,t)}))},bulkDelete(e,t){o().post(window["TWILL"].CMS_URLS.bulkDelete,{ids:e}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Bulk delete request error.",value:e};(0,r.q)(d,t)}))},bulkRestore(e,t){o().post(window["TWILL"].CMS_URLS.bulkRestore,{ids:e}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Bulk restore request error.",value:e};(0,r.q)(d,t)}))},bulkDestroy(e,t){o().post(window["TWILL"].CMS_URLS.bulkForceDelete,{ids:e}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Bulk destroy request error.",value:e};(0,r.q)(d,t)}))}},u=i(624);const h=(e,t,i)=>{e.forEach((e=>{e.id===t&&i(e),e.children&&h(e.children,t,i)}))},p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["id","children"],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";const s=JSON.parse(JSON.stringify(e));return s.forEach((e=>{for(const s in e)t.includes(s)||delete e[s],s===i&&(e[s]=p(e[s]))})),s},m={baseUrl:window["TWILL"].STORE.datatable.baseUrl||"",data:window["TWILL"].STORE.datatable.data||[],columns:window["TWILL"].STORE.datatable.columns||[],filter:window["TWILL"].STORE.datatable.filter||{},filtersNav:window["TWILL"].STORE.datatable.navigation||[],page:Number(window["TWILL"].STORE.datatable.page||1),maxPage:Number(window["TWILL"].STORE.datatable.maxPage||1),defaultMaxPage:Number(window["TWILL"].STORE.datatable.defaultMaxPage||1),offset:Number(window["TWILL"].STORE.datatable.offset||60),defaultOffset:Number(window["TWILL"].STORE.datatable.defaultOffset||60),sortKey:window["TWILL"].STORE.datatable.sortKey||"",sortDir:window["TWILL"].STORE.datatable.sortDir||"asc",bulk:[],localStorageKey:window["TWILL"].STORE.datatable.localStorageKey||window.location.pathname,loading:!1,updateTracker:0},f={dataIds:e=>e.data.map((e=>e.id)),hideableColumns:e=>e.columns.filter((e=>e.optional)),visibleColumns:e=>e.columns.filter((e=>e.visible)),visibleColumnsNames:e=>{const t=[];return e.columns.length&&e.columns.forEach((function(e){e.visible&&t.push(e.name)})),t}},g={[u.ec.UPDATE_DATATABLE_DATA](e,t){e.bulk=[],e.data=t},[u.ec.UPDATE_DATATABLE_BULK](e,t){e.bulk.indexOf(t)>-1?e.bulk=e.bulk.filter((function(e){return e!==t})):e.bulk.push(t)},[u.ec.REPLACE_DATATABLE_BULK](e,t){e.bulk=t},[u.ec.ADD_DATATABLE_COLUMN](e,t){e.columns.splice(t.index,0,t.data)},[u.ec.REMOVE_DATATABLE_COLUMN](e,t){e.columns.forEach((function(i,s){i.name===t&&e.columns.splice(s,1)}))},[u.ec.UPDATE_DATATABLE_FILTER](e,t){e.filter=Object.assign({},e.filter,t)},[u.ec.CLEAR_DATATABLE_FILTER](e){e.filter=Object.assign({},{search:"",status:e.filter.status})},[u.ec.UPDATE_DATATABLE_FILTER_STATUS](e,t){e.filter.status=t},[u.ec.UPDATE_DATATABLE_OFFSET](e,t){e.offset=t,(0,a.st)(e.localStorageKey+"_page-offset",e.offset)},[u.ec.UPDATE_DATATABLE_PAGE](e,t){e.page=t},[u.ec.UPDATE_DATATABLE_MAXPAGE](e,t){e.page>t&&(e.page=t),e.maxPage=t},[u.ec.UPDATE_DATATABLE_VISIBLITY](e,t){(0,a.st)(e.localStorageKey+"_columns-visible",JSON.stringify(t)),e.columns.forEach((function(e){for(let i=0;i=0&&(e.data[t].published="toggle"===s?!e.data[t].published:s)}function n(t){return e.data.findIndex((function(e,i){return e.id===t}))}if(Array.isArray(i))i.forEach((function(e){const t=n(e);a(t)})),e.bulk=[];else{const e=n(i);a(e)}},[u.ec.FEATURE_DATATABLE](e,t){const i=t.id,s=t.value;function a(t){t>=0&&(e.data[t].featured="toggle"===s?!e.data[t].featured:s)}function n(t){return e.data.findIndex((function(e,i){return e.id===t}))}if(Array.isArray(i))i.forEach((function(e){const t=n(e);a(t)})),e.bulk=[];else{const e=n(i);a(e)}},[u.ec.UPDATE_DATATABLE_LOADING](e,t){e.loading=!e.loading},[u.ec.UPDATE_DATATABLE_NESTED](e,t){h(e.data,t.parentId,(e=>{e.children=t.val}))},[u.ec.UPDATE_DATATABLE_TRACKER](e,t){e.updateTracker=t?e.updateTracker+1:0}},_={[s.cp.GET_DATATABLE](e){let{commit:t,state:i,getters:s}=e;if(!i.loading){t(u.ec.UPDATE_DATATABLE_LOADING,!0);const e={sortKey:i.sortKey,sortDir:i.sortDir,page:i.page,offset:i.offset,columns:s.visibleColumnsNames,filter:i.filter};c.get(e,(function(e){t(u.ec.UPDATE_DATATABLE_DATA,e.data),t(u.ec.UPDATE_DATATABLE_MAXPAGE,e.maxPage),t(u.ec.UPDATE_DATATABLE_NAV,e.nav),t(u.ec.UPDATE_DATATABLE_LOADING,!1)}))}},[s.cp.SET_DATATABLE_NESTED](e){let{commit:t,state:i,dispatch:s}=e;const a=p(i.data);c.reorder(a,(function(e){t(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant})}))},[s.cp.SET_DATATABLE](e){let{commit:t,state:i,dispatch:s}=e;const a=i.data.map((e=>e.id));c.reorder(a,(function(e){t(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant})}))},[s.cp.TOGGLE_PUBLISH](e,t){let{commit:i,state:a,dispatch:n}=e;c.togglePublished(t,(function(e){i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),n(s.cp.GET_DATATABLE)}),(function(e){i(u.gp.SET_NOTIF,{message:e.data.error.message,variant:"error"})}))},[s.cp.DELETE_ROW](e,t){let{commit:i,state:a,dispatch:n}=e;c.delete(t,(function(e){i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),n(s.cp.GET_DATATABLE)}))},[s.cp.DUPLICATE_ROW](e,t){let{commit:i,state:s,dispatch:a}=e;c.duplicate(t,(function(e){i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),e.data.hasOwnProperty("redirect")&&window.location.replace(e.data.redirect)}))},[s.cp.RESTORE_ROW](e,t){let{commit:i,state:a,dispatch:n}=e;c.restore(t,(function(e){i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),n(s.cp.GET_DATATABLE)}))},[s.cp.DESTROY_ROW](e,t){let{commit:i,state:a,dispatch:n}=e;c.destroy(t,(function(e){i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),n(s.cp.GET_DATATABLE)}))},[s.cp.BULK_PUBLISH](e,t){let{commit:i,state:a,dispatch:n}=e;c.bulkPublish({ids:a.bulk.join(),toPublish:t.toPublish},(function(e){i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),n(s.cp.GET_DATATABLE)}))},[s.cp.TOGGLE_FEATURE](e,t){let{commit:i,state:s}=e;c.toggleFeatured(t,(e=>{i(u.ec.FEATURE_DATATABLE,{id:t.id,value:"toggle"}),i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant})}))},[s.cp.BULK_FEATURE](e,t){let{commit:i,state:s}=e;c.bulkFeature({ids:s.bulk.join(),toFeature:t.toFeature},(function(e){i(u.ec.FEATURE_DATATABLE,{id:s.bulk,value:!0}),i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant})}))},[s.cp.BULK_DELETE](e){let{commit:t,state:i,dispatch:a}=e;c.bulkDelete(i.bulk.join(),(function(e){t(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),a(s.cp.GET_DATATABLE)}))},[s.cp.BULK_RESTORE](e){let{commit:t,state:i,dispatch:a}=e;c.bulkRestore(i.bulk.join(),(function(e){t(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),a(s.cp.GET_DATATABLE)}))},[s.cp.BULK_DESTROY](e){let{commit:t,state:i,dispatch:a}=e;c.bulkDestroy(i.bulk.join(),(function(e){t(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),a(s.cp.GET_DATATABLE)}))}};var b={state:m,getters:f,actions:_,mutations:g}},6660:function(e,t,i){"use strict";i.d(t,{c:function(){return b}});var s=i(8316),a=i.n(s),n=i(7632),o=i(4695),r=i(9899),l=i.n(r),d=i(9812);const c="FORM";var u={get(e,t,i){l().get(e).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Get request error.",value:e};(0,d.q)(c,t),i&&"function"===typeof i&&i(e)}))},post(e,t,i,s){l().post(e,t).then((function(e){i&&"function"===typeof i&&i(e)}),(function(e){const t={message:"Post request error.",value:e};(0,d.q)(c,t),s&&"function"===typeof s&&s(e)}))},put(e,t,i,s){l().put(e,t).then((function(e){i&&"function"===typeof i&&i(e)}),(function(e){const t={message:"Save request error.",value:e};(0,d.q)(c,t),s&&"function"===typeof s&&s(e)}))}},h=i(624);const p=(e,t)=>e.findIndex((e=>e.name===t.name)),m={loading:!1,type:"save",baseUrl:window["TWILL"].STORE.form.baseUrl||"",fields:window["TWILL"].STORE.form.fields||[],modalFields:[],saveUrl:window["TWILL"].STORE.form.saveUrl||"",previewUrl:window["TWILL"].STORE.form.previewUrl||"",restoreUrl:window["TWILL"].STORE.form.restoreUrl||"",blockPreviewUrl:window["TWILL"].STORE.form.blockPreviewUrl||"",errors:{},isCustom:window["TWILL"].STORE.form.isCustom||!1,reloadOnSuccess:window["TWILL"].STORE.form.reloadOnSuccess||!1,isSubmitPrevented:!1},f={fieldsByName(e){return t=>e.fields.filter((function(e){return e.name===t}))},fieldValueByName:(e,t)=>e=>t.fieldsByName(e).length?t.fieldsByName(e)[0].value:"",modalFieldsByName(e){return t=>e.modalFields.filter((function(e){return e.name===t}))},modalFieldValueByName:(e,t)=>e=>t.modalFieldsByName(e).length?t.modalFieldsByName(e)[0].value:"",fieldsByBlockId:e=>t=>e.fields.filter((e=>e.name.startsWith("blocks[".concat(t,"]"))))},g={[h.tt.UPDATE_FORM_PERMALINK](e,t){t&&""!==t&&(e.permalink=t)},[h.tt.PREVENT_SUBMIT](e){e.isSubmitPrevented=!0},[h.tt.ALLOW_SUBMIT](e){e.isSubmitPrevented=!1},[h.tt.EMPTY_FORM_FIELDS](e,t){e.fields=[]},[h.tt.ADD_FORM_FIELDS](e,t){e.fields=[...e.fields,...t]},[h.tt.REPLACE_FORM_FIELDS](e,t){e.fields=t},[h.tt.UPDATE_FORM_FIELD](e,t){let i=t.locale?{}:null;const s=p(e.fields,t);-1!==s&&(t.locale&&(i=e.fields[s].value||{}),e.fields.splice(s,1)),t.locale?i[t.locale]=t.value:i=t.value,e.fields.push({name:t.name,value:i})},[h.tt.REMOVE_FORM_FIELD](e,t){e.fields.forEach((function(i,s){i.name===t&&e.fields.splice(s,1)}))},[h.tt.DUPLICATE_BLOCK_FORM_FIELDS](e,t){let{fields:i,oldId:s,newId:n}=t;const o=[];i.forEach((e=>{o.push({name:e.name.replace(s,n),value:a()(e.value)})})),e.fields=[...e.fields,...o]},[h.tt.EMPTY_MODAL_FIELDS](e,t){e.modalFields=[]},[h.tt.REPLACE_MODAL_FIELDS](e,t){e.modalFields=t},[h.tt.UPDATE_MODAL_FIELD](e,t){let i=t.locale?{}:null;const s=p(e.modalFields,t);-1!==s&&(t.locale&&(i=e.modalFields[s].value),e.modalFields.splice(s,1)),t.locale?i[t.locale]=t.value:i=t.value,e.modalFields.push({name:t.name,value:i})},[h.tt.REMOVE_MODAL_FIELD](e,t){e.modalFields.forEach((function(i,s){i.name===t&&e.modalFields.splice(s,1)}))},[h.tt.UPDATE_FORM_LOADING](e,t){e.loading=t||!e.loading},[h.tt.SET_FORM_ERRORS](e,t){e.errors=t},[h.tt.CLEAR_FORM_ERRORS](e){e.errors=[]},[h.tt.UPDATE_FORM_SAVE_TYPE](e,t){e.type=t}},_={[n.cp.HANDLE_ERRORS](e,t){let{commit:i,state:s,getters:a,rootState:n}=e;const o=n.repeaters.repeaters;Object.keys(t).forEach((e=>{const i=e.split(".");if(i.length>=4){const s=i[0],a=i[1],n=i[2],r=i[3];if("repeaters"===s){const i=o[a][n].id,s="blocks[".concat(i,"][").concat(r,"]");t[s]=t[e]}}})),i(h.tt.SET_FORM_ERRORS,t)},[n.cp.REPLACE_FORM](e,t){let{commit:i,state:s,getters:a,rootState:o,dispatch:r}=e;return new Promise(((e,s)=>{i(h.tt.CLEAR_FORM_ERRORS),i(h.gp.CLEAR_NOTIF,"error"),u.get(t,(function(t){i(h.tt.UPDATE_FORM_LOADING,!1);const s=t.data;s.hasOwnProperty("languages")&&(i(h.cp.REPLACE_LANGUAGES,s.languages),delete s.languages),s.hasOwnProperty("revisions")&&(i(h.kP.UPDATE_REV_ALL,s.revisions),delete s.revisions),i(h.tt.REPLACE_FORM_FIELDS,s.fields),e()}),(function(e){i(h.tt.UPDATE_FORM_LOADING,!1),r(n.cp.HANDLE_ERRORS,e.response.data),s(e)}))}))},[n.cp.UPDATE_FORM_IN_LISTING](e,t){let{commit:i,state:s,getters:a,rootState:n}=e;return new Promise(((e,s)=>{i(h.tt.CLEAR_FORM_ERRORS),i(h.gp.CLEAR_NOTIF,"error");const a=Object.assign((0,o.iM)(n),{languages:n.language.all});u[t.method](t.endpoint,a,(function(s){i(h.tt.UPDATE_FORM_LOADING,!1),s.data.hasOwnProperty("redirect")&&t.redirect&&window.location.replace(s.data.redirect),i(h.gp.SET_NOTIF,{message:s.data.message,variant:s.data.variant}),e()}),(function(e){i(h.tt.UPDATE_FORM_LOADING,!1),i(h.tt.SET_FORM_ERRORS,e.response.data),i(h.gp.SET_NOTIF,{message:"Your submission could not be validated, please fix and retry",variant:"error"}),s(e)}))}))},[n.cp.CREATE_FORM_IN_MODAL](e,t){let{commit:i,state:s,getters:a,rootState:n}=e;return new Promise(((e,s)=>{i(h.tt.CLEAR_FORM_ERRORS),i(h.gp.CLEAR_NOTIF,"error");const a=Object.assign((0,o.HH)(n),{languages:n.language.all});u[t.method](t.endpoint,a,(function(s){i(h.tt.UPDATE_FORM_LOADING,!1),i(h.MD.UPDATE_OPTIONS,{name:t.name,options:s.data}),e()}),(function(e){i(h.tt.UPDATE_FORM_LOADING,!1),i(h.tt.SET_FORM_ERRORS,e.response.data),i(h.gp.SET_NOTIF,{message:"Your submission could not be validated, please fix and retry",variant:"error"}),s(e)}))}))},[n.cp.SAVE_FORM](e,t){let{commit:i,state:s,getters:a,rootState:r,dispatch:l}=e;i(h.tt.CLEAR_FORM_ERRORS),i(h.gp.CLEAR_NOTIF,"error"),i(h.tt.UPDATE_FORM_SAVE_TYPE,t);const d=(0,o.io)(r),c=r.publication.createWithoutModal?"post":"put";u[c](s.saveUrl,d,(function(e){i(h.tt.UPDATE_FORM_LOADING,!1),e.data.hasOwnProperty("redirect")&&window.location.replace(e.data.redirect),s.reloadOnSuccess&&window.location.reload(),i(h.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),i(h.wt.UPDATE_PUBLISH_SUBMIT),e.data.hasOwnProperty("revisions")&&i(h.kP.UPDATE_REV_ALL,e.data.revisions)}),(function(e){i(h.tt.UPDATE_FORM_LOADING,!1),e.response.data.hasOwnProperty("exception")?i(h.gp.SET_NOTIF,{message:"Your submission could not be processed.",variant:"error"}):(l(n.cp.HANDLE_ERRORS,e.response.data),i(h.gp.SET_NOTIF,{message:"Your submission could not be validated, please fix and retry",variant:"error"}))}))},async[n.cp.DUPLICATE_BLOCK](e,t){let{commit:i,getters:s}=e,{block:a,id:n}=t;const o=s.fieldsByBlockId(a.id);i(h.tt.DUPLICATE_BLOCK_FORM_FIELDS,{fields:o,oldId:a.id,newId:n})}};var b={state:m,getters:f,mutations:g,actions:_}},6188:function(e,t,i){"use strict";var s=i(624);const a={all:window["TWILL"].STORE.languages.all||[],initialAll:window["TWILL"].STORE.languages.all||[],active:window["TWILL"].STORE.languages.active||window["TWILL"].STORE.languages.all[0]||{}},n={publishedLanguages:e=>e.all.filter((e=>e.published))},o={[s.cp.SWITCH_LANG](e,t){let{oldValue:i}=t;function s(e){return e.value===i.value}const a=e.all.findIndex(s),n=a0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{message:"",value:null},r="";n&&"string"===typeof n&&(r="".concat("TWILL"," - [").concat(n,"]: "));const l=r+o.message,d=null!==(e=null!==(t=null===o||void 0===o||null===(i=o.value)||void 0===i||null===(i=i.response)||void 0===i?void 0:i.status)&&void 0!==t?t:null===o||void 0===o||null===(s=o.response)||void 0===s?void 0:s.status)&&void 0!==e?e:null;var c;(console.error(l),null!==o&&void 0!==o&&o.value&&null!==(a=o.value)&&void 0!==a&&a.response)&&console.error(null===(c=o.value.response)||void 0===c?void 0:c.data);401===d||419===d?window["TWILL"].vm.notif({message:'Your session has expired, please login in another tab. You can then continue working here.',variant:"warning"}):403===d&&window["TWILL"].vm.notif({message:"You don't have permission to perform this action.",variant:"warning"})}i.d(t,{q:function(){return s}})},8884:function(e,t,i){"use strict";i.d(t,{c:function(){return p}});var s=i(6204),a=i.n(s);const n={publishDateDisplayFormat:window["TWILL"].STORE.config.publishDateDisplayFormat},o={},r={},l={};var d={state:n,getters:o,mutations:r,actions:l},c=i(8904);function u(e,t){const s=c.ob[(0,c.qe)()];return a()(e,t,{locale:void 0!==s&&s.hasOwnProperty("date-fns")?s["date-fns"]:i(7800)})}const h={slugify:function(e){const t={",":"-","/":"-",":":"-",";":"-",_:"-","©":"(c)","·":"-","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","ā":"a","ă":"a","ą":"a","ć":"c","č":"c","ď":"d","ē":"e","ę":"e","ě":"e","ğ":"g","ģ":"g","ī":"i","ı":"i","ķ":"k","ļ":"l","ł":"l","ń":"n","ņ":"n","ň":"n","ő":"o","œ":"oe","ŕ":"r","ř":"r","ś":"s","ş":"s","š":"s","ť":"t","ū":"u","ů":"u","ű":"u","ź":"z","ż":"z","ž":"z","ǘ":"u","ǵ":"g","ǹ":"n","ș":"s","ț":"t","ΐ":"i","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","є":"ye","і":"i","ї":"yi","ґ":"g","ḧ":"h","ḿ":"m","ṕ":"p","ẃ":"w","ẍ":"x","ә":"a","ғ":"g","қ":"q","ң":"n","ө":"o","ұ":"u"},i=new RegExp(Object.keys(t).join("|"),"g");return e.toString().toLowerCase().trim().replace(/\s+/g,"-").replace(i,(e=>t[e])).replace(/&/g,"-and-").replace(/[^\w-]+/g,"-").replace(/--+/g,"-").replace(/(^-+)|(-+$)/,"")},prettierUrl:function(e){return e.replace(/^\/\/|^.*?:(\/\/)?/,"")},uppercase:function(e){return e||0===e?e.toString().toUpperCase():""},lowercase:function(e){return e||0===e?e.toString().toLowerCase():""},capitalize:function(e){return e?(e=e.toString(),e.charAt(0).toUpperCase()+e.slice(1)):""},formatDate:function(e){return e?u(e,"MMM, DD, YYYY, "+(0,c.sn)()):""},formatDateWithFormat:function(e,t){return e||(e=new Date),u(e,t)},formatDatatableDate:function(e){const t=d.state.publishDateDisplayFormat.length>0?d.state.publishDateDisplayFormat:"MMM DD, YYYY";return e||(e=new Date),u(e,t)},formatCalendarDate:function(e){const t="MMM, DD, YYYY, "+(0,c.sn)();return e||(e=new Date),u(e,t)}};var p=h},1448:function(e,t,i){"use strict";function s(e,t,i){for(let s=0;s0?e.files:!(!e.value||""===e.value)&&e.value);if(v(e))return!(!e.value||""===e.value)&&e.value;if(y(e))return e.value&&""!==e.value?e.value:!(!e.options||!e.options.length||""===e.options[0].value)&&e.options[0].value;if(w(e)){if(e.options&&e.options.length>0){const t=[];return u(e.options,(function(e){e.selected&&t.push(e.value)})),(i||!!t.length)&&t}return!1}return E(e)?e.value&&""!==e.value?e.value:!(!e.innerText||""===e.innerText)&&e.innerText:"undefined"!==typeof e.value&&((i||""!==e.value)&&e.value)}function A(e,t,i,s){const a=t[0];if(g(e))return!1!==i?(s[a]=i,i):void 0;if(_(e))return!1!==i?(s[a]||(s[a]=[]),s[a].push(i)):void 0;if(w(e)){if(!1===i)return;s[a]=i}return s[a]=i,i}function x(e,t,i,s){const a=t[0];return t.length>1?"[]"===a?(s[d(s)]={},x(e,t.splice(1,t.length),i,s[l(s)])):(s[a]&&c(s[a])>0||(s[a]={}),x(e,t.splice(1,t.length),i,s[a])):1===t.length?"[]"===a?(s[d(s)]=i,s):(A(e,t,i,s),s):void 0}function S(){let e,t,a,o=0;const r={};for(o=0;o1&&x(t,e,a||"",r)));const l=c(r);return l>0&&r}return h(e)}i.d(t,{c:function(){return s}})},4695:function(e,t,i){"use strict";i.d(t,{HH:function(){return p},Q9:function(){return l},gP:function(){return d},iM:function(){return h},io:function(){return m}});var s=i(656),a=i.n(s);const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.assign({},...Object.keys(e).map((i=>{if(t){if(o(i,t.id))return{[r(i,t.id)]:e[i]}}else if(!i.startsWith("blocks["))return{[i]:e[i]};return null})).filter((e=>e)))},o=(e,t)=>e.startsWith("blocks["+t+"]"),r=(e,t)=>{const i=e.replace("blocks["+t+"][","");return i.match(/]/gi).length>1?i.replace("]",""):i.slice(0,-1)},l=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=Object.keys(t.repeaters.repeaters),a=Object.assign({},...s.filter((t=>t.startsWith("blocks-"+e.id+"|"))).map((i=>({[i.replace("blocks-"+e.id+"|","")]:t.repeaters.repeaters[i].map((e=>l(e,t,!0)))})))),d=Object.keys(t.blocks.blocks),c=Object.assign({},...d.filter((t=>t.startsWith("blocks-"+e.id))).map((i=>({[i.replace("blocks-"+e.id+"|","")]:t.blocks.blocks[i].map((e=>l(e,t)))}))));return{id:e.id,type:e.type,is_repeater:i,editor_name:e.name,content:t.form.fields.filter((t=>o(t.name,e.id))).map((t=>({name:r(t.name,e.id),value:t.value}))).reduce(((e,t)=>(e[t.name]=t.value,e)),{}),medias:n(t.mediaLibrary.selected,e),browsers:n(t.browser.selected,e),blocks:{...a,...c}}},d=e=>a()(e.content)&&a()(e.browsers)&&a()(e.medias)&&a()(e.blocks),c=e=>Object.assign({},...Object.keys(e.repeaters.repeaters).filter((e=>!e.startsWith("blocks-"))).map((t=>({[t]:e.repeaters.repeaters[t].map((t=>{var i;const s=l(t,e),a=s.content;return delete s.content,delete s.type,a.id=t.id,a.repeater_target_id=null!==(i=t.repeater_target_id)&&void 0!==i?i:null,Object.assign(s,a)}))})))),u=e=>{const t={...e.blocks.blocks};return Object.keys(t).filter((e=>!e.startsWith("blocks-"))).map((i=>t[i].map((t=>(t.name=i,l(t,e)))))).flat()},h=e=>{const t=e.form.fields.filter((e=>!e.name.startsWith("blocks[")&&!e.name.startsWith("mediaMeta["))).reduce(((e,t)=>(e[t.name]=t.value,e)),{});return t},p=e=>{const t=e.form.modalFields.filter((e=>!e.name.startsWith("blocks[")&&!e.name.startsWith("mediaMeta["))).reduce(((e,t)=>(e[t.name]=t.value,e)),{});return t},m=e=>{const t=h(e),i=Object.assign(t,{cmsSaveType:e.form.type,published:e.publication.published,public:"public"===e.publication.visibility,publish_start_date:e.publication.startDate,publish_end_date:e.publication.endDate,languages:e.language.all,parent_id:e.parents.active,medias:n(e.mediaLibrary.selected),browsers:n(e.browser.selected),blocks:u(e),repeaters:c(e)});return i}},400:function(e,t){"use strict";t.c={modal:"s--modal",overlay:"s--overlay",editor:"s--in-editor",search:"s--search"}},512:function(e,t,i){"use strict";i.d(t,{aU:function(){return s}});const s=(e,t,i)=>new Promise(((s,a)=>{let n=document.getElementById(e);const o=()=>{n.removeEventListener("load",o),s()};n?n.addEventListener("load",o):(n=document.createElement("script"),n.setAttribute("id",e),n.type=i,n.onload=o,n.onerror=a,document.getElementsByTagName("head")[0].appendChild(n),n.src=t)}))},8904:function(e,t,i){"use strict";i.d(t,{Yt:function(){return w},ob:function(){return v},qe:function(){return y},sn:function(){return E}});var s=i(5252),a=i(6380),n=i(1828),o=i(5715),r=i(1584),l=i(9992),d=i(9880),c=i(4592),u=i(9464),h=i(4795),p=i(9312),m=i(7804),f=i(9252),g=i(2432),_=i(5540),b=i(2476);const v={en:{"date-fns":i(7800)},ar:{"date-fns":i(3324),flatpickr:s.Arabic},bs:{"date-fns":i(7800),flatpickr:a.Bosnian},cs:{"date-fns":i(6620),flatpickr:n.Czech},de:{"date-fns":i(5320),flatpickr:l.German},es:{"date-fns":i(3984),flatpickr:g.Spanish},fr:{"date-fns":i(7352),flatpickr:r.French},it:{"date-fns":i(2293),flatpickr:d.Italian},nl:{"date-fns":i(3172),flatpickr:o.Dutch},no:{"date-fns":i(7800),flatpickr:u.Norwegian},pl:{"date-fns":i(8224),flatpickr:h.Polish},pt:{"date-fns":i(3944),flatpickr:p.Portuguese},ru:{"date-fns":i(2648),flatpickr:m.Russian},sl:{"date-fns":i(456),flatpickr:f.Slovenian},tr:{"date-fns":i(4820),flatpickr:_.Turkish},uk:{"date-fns":i(7800),flatpickr:b.Ukrainian},"zh-Hans":{"date-fns":i(4828),flatpickr:c.Mandarin}};function y(){return window["TWILL"].twillLocalization.locale}function w(){return 2===new Intl.DateTimeFormat(y(),{hour:"numeric"}).formatToParts(new Date(2020,0,1,13)).find((e=>"hour"===e.type)).value.length}function E(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return w()||e?"HH:mm":"hh:mm A"}},9480:function(e,t,i){"use strict";i.d(t,{mw:function(){return l},sv:function(){return d}});const s="undefined"!==typeof window,a=(s&&function(){const e=window.navigator.userAgent;(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&window.history)}(),s&&window.performance&&window.performance.now?window.performance:Date);let n=o();function o(){return a.now().toFixed(3)}function r(e,t){const i=window.history;try{t?i.replaceState({key:n},"",e):(n=o(),i.pushState({key:n},"",e))}catch(s){window.location[t?"replace":"assign"](e)}}function l(e){r(e,!0)}function d(){return location.protocol+"//"+location.host+location.pathname}},708:function(e,t){"use strict";const i=function(e){const t={el:document,offset:0,duration:250,easing:"linear"},i=Date.now();let s=0,a=!1;const n={linear:function(e){return e},easeIn:function(e){return e*e*e},easeOut:function(e){return--e*e*e+1},easeInOut:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}},o=window.requestAnimationFrame;let r;for(const h in e)"undefined"!==typeof e[h]&&(t[h]=e[h]);function l(e,t){return ee.value===this.endpoint))},multiSources(){return this.endpoints.length>0},selectedItems:{get(){return this.selected[this.connector]||[]},set(e){this.$store.commit(o.ai.SAVE_ITEMS,e)}},...(0,n.ys)({connector:e=>e.browser.connector,max:e=>e.browser.max,endpoint:e=>e.browser.endpoint,endpointName:e=>e.browser.endpointName,endpoints:e=>e.browser.endpoints,browserTitle:e=>e.browser.title,browserNote:e=>e.browser.note,selected:e=>e.browser.selected})},methods:{updateSelectedItems(e){const t=this.multiSources?["id","endpointType"]:["id"],i=this.fullItems.some((i=>t.every((t=>i[t]===e[t]))));if(!i)return;const s=this.selectedItems.some((i=>t.every((t=>i[t]===e[t]))));if(s){const i=this.selectedItems.findIndex((i=>t.every((t=>i[t]===e[t]))));if(i<0)return;const s=[...this.selectedItems];s.splice(i,1),this.selectedItems=s}else{if(1===this.max&&this.clearSelectedItems(),this.selectedItems.length>=this.max&&this.max>0)return;this.selectedItems=[...this.selectedItems,e]}},getFormData(e){let t=(0,r.c)(e);return t?t.page=this.page:t={page:this.page},t},clearSelectedItems(){this.selectedItems=[]},clearFullItems(){this.fullItems.splice(0)},reloadList(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&(this.page=1);const t=this.$refs.form,i=this.$refs.list,s=this.getFormData(t);this.$http.get(this.endpoint,{params:s}).then((t=>{e&&this.clearFullItems(),this.fullItems.push(...t.data.data),this.$nextTick((()=>{this.listHeight!==i.scrollHeight&&(this.listHeight=i.scrollHeight,i.addEventListener("scroll",this.scrollToPaginate))}))}),(function(e){}))},submitFilter(){this.page=1,this.clearFullItems(),this.reloadList()},scrollToPaginate(){const e=this.$refs.list;e.scrollTop+e.clientHeight>this.listHeight-10&&(e.removeEventListener("scroll",this.scrollToPaginate),this.maxPage>this.page&&(this.page=this.page+1,this.reloadList()))},saveAndClose(){this.$store.commit(o.ai.SAVE_ITEMS,this.selectedItems),this.$parent.close()},changeBrowserSource(e){this.$store.commit(o.ai.UPDATE_BROWSER_ENDPOINT,e),this.reloadList(!0)}},mounted(){this.reloadList()}},u=c,h=i(2528),p=(0,h.c)(u,s,a,!1,null,"0de50c6f",null),m=p.exports},3032:function(e,t,i){"use strict";i.d(t,{c:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"dropdown",class:e.dropdownClasses,attrs:{"aria-title":e.title}},[e.fixed?t("div",{ref:"dropdown__cta"},[e._t("default")],2):e._t("default"),t("transition",{attrs:{name:"fade_move_dropdown"}},[e.active?t("div",{ref:"dropdown__position",staticClass:"dropdown__position"},[t("div",{staticClass:"dropdown__content",style:e.offsetStyle,attrs:{"data-dropdown-content":""}},[t("div",{staticClass:"dropdown__inner"},[e.arrow?t("span",{staticClass:"dropdown__arrow"}):e._e(),t("div",{staticClass:"dropdown__scroller",style:e.innerStyle},[e.title?t("span",{staticClass:"dropdown__title f--small"},[e._v(e._s(e.title))]):e._e(),e._t("dropdown__content")],2)])])]):e._e()])],2)},a=[],n={name:"A17Dropdown",props:{title:{type:String,default:""},position:{type:String,default:"bottom"},width:{type:String,default:"auto"},maxWidth:{type:Number,default:300},maxHeight:{type:Number,default:0},minWidth:{type:Number,default:0},arrow:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},offset:{type:Number,default:5},sideOffset:{type:Number,default:0},fixed:{type:Boolean,default:!1}},data:function(){return{currentPosition:this.position,currentHeight:100,currentMaxWidth:this.maxWidth,active:!1,originScrollPostion:null,scrollOffset:75}},computed:{dropdownClasses:function(){return{"dropdown--active":this.active,"dropdown--arrow":this.arrow,"dropdown--bottom":this.isPosition("bottom"),"dropdown--top":this.isPosition("top"),"dropdown--left":this.isPosition("left"),"dropdown--right":this.isPosition("right"),"dropdown--center":this.isPosition("center"),"dropdown--full":"full"===this.width,"dropdown--fixed":this.fixed}},offsetStyle:function(){return{"margin-top":this.isPosition("bottom")?this.offset+"px":"","margin-bottom":this.isPosition("top")?this.offset+"px":"",transform:this.sideOffset?"translateX("+this.sideOffset+"px)":"","max-width":this.currentMaxWidth>0&&"full"!==this.width?this.currentMaxWidth+"px":"","min-width":this.minWidth>0?this.minWidth+"px":""}},innerStyle:function(){return{"max-height":this.maxHeight>0?this.maxHeight+"px":"",overflow:this.maxHeight>0?"hidden":"","overflow-y":this.maxHeight>0?"scroll":""}}},methods:{isPosition:function(e){return-1!==this.currentPosition.indexOf(e)},reposition:function(){const e=this.$el.getBoundingClientRect().top+this.$el.offsetHeight+window.pageYOffset+this.offset,t=this.$el.getBoundingClientRect().top+window.pageYOffset-this.offset,i=window.pageYOffset+window.innerHeight;this.currentPosition!==this.position&&(this.currentPosition=this.position),this.isPosition("bottom")?e+this.currentHeight>i&&(this.currentPosition=this.currentPosition.replace(/bottom/i,"top")):this.isPosition("top")&&t-this.currentHeightwindow.innerWidth?window.innerWidth-e.left:this.maxWidth:this.isPosition("right")?this.currentMaxWidth=this.maxWidth+(window.innerWidth-e.right)>window.innerWidth?window.innerWidth-(window.innerWidth-e.right):this.maxWidth:this.currentMaxWidth=this.maxWidth>window.innerWidth?window.innerWidth:this.maxWidth},setFixedPosition:function(){const e=this.$refs.dropdown__cta.getBoundingClientRect();this.isPosition("top")?this.$refs.dropdown__position.style.bottom=Math.round(window.innerHeight-e.bottom+e.height)+"px":this.$refs.dropdown__position.style.top=Math.round(e.top+e.height)+"px",this.isPosition("left")?this.$refs.dropdown__position.style.left=Math.round(e.left)+"px":this.isPosition("right")?this.$refs.dropdown__position.style.right=Math.round(window.innerWidth-e.right)+"px":this.$refs.dropdown__position.style.left=Math.round(e.left+e.width/2)+"px"},closeFromDoc:function(e){const t=e.target;if("scroll"===e.type){if(this.$el.querySelector("[data-dropdown-content]").contains(t))return;const e=window.pageYOffset||document.documentElement.scrollTop;if(e>this.originScrollPostion-this.scrollOffset&&e{this.timer=null,this.active=!0,document.addEventListener("click",this.closeFromDoc,!1),document.addEventListener("touchend",this.closeFromDoc,!1),this.fixed&&(window.addEventListener("scroll",this.closeFromDoc,!0),this.originScrollPostion=window.pageYOffset||document.documentElement.scrollTop),this.$nextTick((function(){this.getHeight(),this.reposition(),this.setMaxWidth(),this.fixed&&this.setFixedPosition()})),this.$emit("open")}),1))},close:function(e){if(this.active){if(clearTimeout(this.timer),document.removeEventListener("click",this.closeFromDoc,!0),document.removeEventListener("touchend",this.closeFromDoc,!0),this.fixed)return window.removeEventListener("scroll",this.closeFromDoc,!0),this.originScrollPostion=null,this.active=!1,void this.$emit("close");setTimeout((()=>{this.active=!1,this.$emit("close")}),0)}},toggle:function(e){this.active?this.close():this.open()}}},o=n,r=i(2528),l=(0,r.c)(o,s,a,!1,null,"a897d080",null),d=l.exports},3820:function(e,t,i){"use strict";i.d(t,{c:function(){return c}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"fieldset",class:e.visibilityClasses},[e.title?t("header",{staticClass:"fieldset__header",class:e.activeClasses},[e.activeToggle?t("h3",{attrs:{role:"button","aria-expanded":e.visible?"true":"false"},on:{click:e.onClickVisibility}},[e._v(e._s(e.title)+" "),t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"dropdown_module"}})]):t("h3",[e._v(e._s(e.title))])]):t("header",{staticClass:"fieldset__header",class:e.activeClasses},[e._t("header")],2),t("div",{staticClass:"fieldset__content",attrs:{hidden:!e.visible||null,"aria-hidden":!e.visible||null}},[e._t("default")],2)])},a=[],n=i(6304),o={name:"A17Fieldset",mixins:[n.c],props:{open:{type:Boolean,default:!0},title:{default:""},activeToggle:{type:Boolean,default:!0}},computed:{activeClasses:function(){return{"fieldset--hoverable":this.activeToggle}}}},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,"5e017f1a",null),c=d.exports},892:function(e,t,i){"use strict";i.d(t,{c:function(){return h}});var s=function(){var e=this,t=e._self._c;return t("form",{ref:"form",staticClass:"filter",class:{"filter--opened":e.opened,"filter--single":!e.withNavigation,"filter--full":!e.withNavigation&&e.fullWidth,"filter--withHiddenFilters":e.withHiddenFilters},on:{submit:function(t){return t.preventDefault(),e.submitFilter.apply(null,arguments)}}},[t("div",{staticClass:"filter__inner"},[t("div",{staticClass:"filter__navigation"},[e._t("navigation")],2),t("div",{staticClass:"filter__search"},[t("input",{staticClass:"form__input form__input--small",attrs:{type:"search",name:"search",placeholder:e.placeholder},domProps:{value:e.searchValue},on:{input:e.onSearchInput}}),e.withHiddenFilters?t("a17-button",{staticClass:"filter__toggle",attrs:{variant:"ghost","aria-expanded":e.opened?"true":"false"},on:{click:e.toggleFilter}},[e._v(e._s(e.$trans("filter.toggle-label","Filter"))+" "),t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"dropdown_module"}})]):e._e(),e._t("additional-actions"),t("button",{staticClass:"visually-hidden",attrs:{"aria-hidden":"true",type:"submit"}},[e._v(e._s(e.$trans("filter.apply-btn","Apply")))])],2)]),t("transition",{attrs:{css:!1,duration:275},on:{"before-enter":e.beforeEnter,enter:e.enter,"before-leave":e.beforeLeave,leave:e.leave}},[e.withHiddenFilters?t("div",{directives:[{name:"show",rawName:"v-show",value:e.opened,expression:"opened"}],ref:"more",staticClass:"filter__more",attrs:{"aria-hidden":!e.opened||null}},[t("div",{ref:"moreInner",staticClass:"filter__moreInner"},[e._t("hidden-filters"),t("a17-button",{attrs:{variant:"ghost",type:"submit"}},[e._v(e._s(e.$trans("filter.apply-btn","Apply")))]),e.clearOption?t("a17-button",{attrs:{variant:"ghost",type:"button"},on:{click:e.clear}},[e._v(e._s(e.$trans("filter.clear-btn","Clear")))]):e._e()],2)]):e._e()])],1)},a=[],n=i(3336),o=i.n(n),r=i(7120),l={name:"A17Filter",props:{initialSearchValue:{type:String,default:""},placeholder:{type:String,default(){return this.$trans("filter.search-placeholder","Search")}},closed:{type:Boolean,default:!1},clearOption:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},data:function(){return{openable:!this.closed,open:!1,withHiddenFilters:!0,withNavigation:!0,searchValue:this.initialSearchValue,transitionTimeout:null}},computed:{opened:function(){return this.open&&this.openable}},watch:{closed:function(){this.openable=!this.closed},initialSearchValue:function(){this.searchValue=this.initialSearchValue}},methods:{getHeight:function(){return this.$refs.moreInner.clientHeight},beforeEnter:function(e){e.style.height="0px",e.style.overflow="hidden"},enter:function(e,t){this.resetHeight(),this.transitionTimeout&&clearTimeout(this.transitionTimeout),this.transitionTimeout=setTimeout((()=>{e.style.overflow="visible"}),275),window.addEventListener("resize",this._resize,!1)},beforeLeave:function(e){this.transitionTimeout&&clearTimeout(this.transitionTimeout),this.resetHeight(),e.style.overflow="hidden",window.removeEventListener("resize",this._resize)},leave:function(e,t){e.style.height="0px"},toggleFilter:function(){this.openable=!0,this.open=!this.open},submitFilter:function(){const e=(0,r.c)(this.$refs.form);this.$emit("submit",e)},onSearchInput:function(e){this.searchValue=e.target.value},clear:function(){this.searchValue="",this.$emit("clear")},resetHeight:function(){this.$refs.more&&(this.$refs.more.style.height=this.getHeight()+"px")},_resize:o()((function(){this.resetHeight()}),50)},beforeMount:function(){this.$slots.navigation||(this.withNavigation=!1),this.$slots["hidden-filters"]||(this.withHiddenFilters=!1)}},d=l,c=i(2528),u=(0,c.c)(d,s,a,!1,null,"5bb79734",null),h=u.exports},7300:function(e,t,i){"use strict";i.d(t,{c:function(){return h}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"itemlist"},[t("table",{staticClass:"itemlist__table"},[t("tbody",[e._l(e.itemsLoading,(function(i,s){return t("tr",{directives:[{name:"show",rawName:"v-show",value:!i.isReplacement,expression:"!item.isReplacement"}],key:i.id,staticClass:"itemlist__row"},[t("td",{staticClass:"itemlist__cell itemlist__cell--loading",class:{"itemlist__cell--error":i.error},attrs:{colspan:e.columnsNumber}},[i.error?t("span",{staticClass:"itemlist__progressError"},[e._v("Upload Error")]):t("span",{staticClass:"itemlist__progress"},[t("span",{staticClass:"itemlist__progressBar",style:e.loadingProgress(s)})])])])})),e._l(e.allItems,(function(i,s){return t("tr",{key:"".concat(i.endpointType,"_").concat(i.id),staticClass:"itemlist__row",class:{"s--picked":e.isSelected(i,e.keysToCheck),"s--disabled":i.disabled||!!e.replacingMediaIds[i.id]},on:{click:[function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.toggleSelection(i))},function(t){return t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.shiftToggleSelection(i)):null}]}},[i.isReplacement?i.isReplacement?[t("td",{staticClass:"itemlist__cell itemlist__cell--loading",class:{"itemlist__cell--error":i.error},attrs:{colspan:e.columnsNumber}},[i.error?t("span",{staticClass:"itemlist__progressError"},[e._v("Upload Error")]):t("span",{staticClass:"itemlist__progress"},[t("span",{staticClass:"itemlist__progressBar",style:e.loadingProgress(s,"allItems")})])])]:e._e():[i.hasOwnProperty("id")?t("td",{staticClass:"itemlist__cell itemlist__cell--btn"},[t("a17-checkbox",{attrs:{name:"item_list",value:i.endpointType+"_"+i.id,initialValue:e.checkedItems,theme:"bold",disabled:i.disabled}})],1):e._e(),i.hasOwnProperty("thumbnail")?t("td",{class:"itemlist__cell itemlist__cell--thumb ".concat("users"===i.endpointType?"itemlist__cell--thumb-rounded":"")},["users"===i.endpointType?[t("a17-avatar",{attrs:{name:i.name,thumbnail:i.thumbnail}})]:[t("img",{attrs:{src:i.thumbnail}})]],2):e._e(),i.hasOwnProperty("name")?t("td",{staticClass:"itemlist__cell itemlist__cell--name"},[i.hasOwnProperty("renderHtml")?t("div",{domProps:{innerHTML:e._s(i.name)}}):t("div",[e._v(e._s(i.name))])]):e._e(),e._l(e.extraColumns,(function(s,a){return t("td",{key:a,staticClass:"itemlist__cell",class:e.rowClass(s)},["size"===s?[e._v(e._s(e._f("uppercase")(i[s])))]:[e._v(e._s(i[s]))]],2)}))]],2)}))],2)])])},a=[],n=i(8754),o=i(6456),r=i(8884),l={name:"A17Itemlist",props:{keysToCheck:{type:Array,default:()=>["id"]}},components:{"a17-avatar":n.c},mixins:[o.c],filters:r.c,computed:{allItems:function(){return this.items.map((e=>{if(this.replacingMediaIds[e.id]){const t=this.itemsLoading.find((t=>t.replacementId===e.id));return t||e}return e}))},columnsNumber:function(){if(!this.items.length)return 0;let e=this.extraColumns.length;const t=this.items[0];return t.hasOwnProperty("id")&&e++,t.hasOwnProperty("name")&&e++,t.hasOwnProperty("thumbnail")&&e++,e},extraColumns:function(){if(!this.items.length)return[];const e=this.items[0];return Object.keys(e).filter((t=>!["id","name","thumbnail","src","original","edit","crop","deleteUrl","updateUrl","updateBulkUrl","deleteBulkUrl","endpointType","filesizeInMb"].includes(t)&&"string"===typeof e[t]))},checkedItems:function(){const e=[];return this.selectedItems.length&&this.selectedItems.forEach((function(t){e.push(t.endpointType+"_"+t.id)})),e}},methods:{rowClass:function(e){return"itemlist__cell--"+e},loadingProgress:function(e,t){const i=t?this[t]:this.itemsLoading;return{width:i[e].progress?i[e].progress+"%":"0%"}},getFirstLetter(e){return e.name.charAt(0)}}},d=l,c=i(2528),u=(0,c.c)(d,s,a,!1,null,"04a8279a",null),h=u.exports},7136:function(e,t,i){"use strict";i.d(t,{c:function(){return m}});var s=function(){var e=this,t=e._self._c;return e.languages.length>1?t("div",{staticClass:"languageManager"},[t("div",{staticClass:"languageManager__switcher"},[t("a17-langswitcher",{attrs:{"in-modal":!0,"all-published":!e.controlPublication}})],1),e.controlPublication?t("a17-dropdown",{ref:"languageManagerDropdown",staticClass:"languageManager__dropdown",attrs:{position:"bottom-right",clickable:!0}},[t("button",{staticClass:"languageManager__button",attrs:{type:"button"},on:{click:function(t){return e.$refs.languageManagerDropdown.toggle()}}},[e._v(" "+e._s(e.currentValue.length)+" "+e._s(e.$trans("lang-manager.published"))+" "),t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"dropdown_module"}})]),t("div",{staticClass:"languageManager__dropdown-content",attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[t("a17-checkboxgroup",{attrs:{name:"langManager",options:e.languages,selected:e.currentValue,min:1},on:{change:e.changeValue}})],1)]):e._e()],1):e._e()},a=[],n=i(6036),o=i(1200),r=i(6304),l=i(624),d=i(4564),c={name:"A17LangManager",mixins:[r.c,o.c],components:{"a17-langswitcher":d.c},props:{controlPublication:{type:Boolean,default:!0},value:{default:function(){return[]}}},computed:{currentValue:{get(){const e=[];return this.publishedLanguages.length&&this.publishedLanguages.forEach((function(t){e.push(t.value)})),e}},...(0,n.ys)({languages:e=>e.language.all}),...(0,n.gV)(["publishedLanguages"])},methods:{changeValue:function(e){this.$store.commit(l.cp.PUBLISH_LANG,e)}}},u=c,h=i(2528),p=(0,h.c)(u,s,a,!1,null,"06768eb6",null),m=p.exports},4564:function(e,t,i){"use strict";i.d(t,{c:function(){return h}});var s=function(){var e=this,t=e._self._c;return e.languages.length>1?t("div",{staticClass:"language",class:e.languageClass},[e.inModal?e._e():t("span",{staticClass:"language__label f--small"},[e._v(e._s(e.$trans("lang-switcher.edit-in")))]),t("span",{staticClass:"language__toolbar"},e._l(e.languages,(function(i){return t("button",{key:i.value,staticClass:"language__button",class:{selected:i.value===e.localeValue.value,published:i.published,"no-state":e.allPublished},attrs:{type:"button"},on:{click:function(t){return e.onClick(i.value)}}},[e._v(e._s(i.shortlabel))])})),0)]):e._e()},a=[],n=i(6036),o=i(1200),r=i(624),l={name:"A17Langswitcher",mixins:[o.c],props:{inModal:{type:Boolean,default:!1},toggleOnClick:{type:Boolean,default:!1},allPublished:{type:Boolean,default:!1}},computed:{languageClass(){return{"language--in-modal":this.inModal}},localeValue(){return this.$store.state.language.active},...(0,n.gV)(["publishedLanguages"])},methods:{onClick:function(e){this.$store.commit(r.cp.UPDATE_LANG,e)}}},d=l,c=i(2528),u=(0,c.c)(d,s,a,!1,null,"1131928c",null),h=u.exports},5256:function(e,t,i){"use strict";i.d(t,{c:function(){return p}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"modal",class:e.modalClasses,on:{mousedown:e.hide,touchend:function(t){return t.preventDefault(),e.hide.apply(null,arguments)}}},[t("transition",{attrs:{name:"fade_scale_modal"}},[e.active?t("div",{directives:[{name:"show",rawName:"v-show",value:!e.hidden,expression:"!hidden"}],staticClass:"modal__window",on:{mousedown:function(e){e.stopPropagation()},touchend:function(e){e.stopPropagation()}}},[e.modalTitle?t("header",{staticClass:"modal__header"},[e._v(" "+e._s(e.modalTitle)+" "),t("button",{staticClass:"modal__close",attrs:{type:"button"},on:{click:e.hide}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"close_modal"}})])]):e._e(),t("div",{staticClass:"modal__content"},[e._t("default")],2)]):e._e()])],1)},a=[],n=i(6036),o=i(400);const r=document.documentElement,l=o.c.modal;var d={name:"A17Modal",props:{title:{type:String,default:""},mode:{type:String,default:""},forceClose:{type:Boolean,default:!1},forceLock:{type:Boolean,default:!1}},data:function(){return{active:!1,hidden:!0,locked:!1,firstFocusableEl:null,lastFocusableEl:null}},computed:{modalTitle:function(){return""!==this.title?this.title:this.browserTitle},modalClasses:function(){return{"modal--active":this.active,"modal--hidden":this.hidden,"modal--tiny":"tiny"===this.mode,"modal--medium":"medium"===this.mode,"modal--wide":"wide"===this.mode}},...(0,n.ys)({browserTitle:e=>e.browser.title})},watch:{forceLock:function(){this.locked=this.forceLock}},methods:{open:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.active&&!this.hidden||(this.active=!0,this.hidden=!1,r.classList.add(l),this.bindKeyboard(),this.$nextTick((function(){if(e){const e='textarea, input:not([type="hidden"]), select, button[type="submit"]',t=this.$el.querySelectorAll(e),i=this.$el.querySelectorAll(e+', a, button[type="button"]');this.firstFocusableEl=this.$el.querySelector(".modal__close"),this.lastFocusableEl=i[i.length-1],t.length&&t[0].focus()}this.$emit("open")})))},mask:function(){r.classList.remove(l),this.unbindKeyboard(),this.$emit("close")},hide:function(){this.active&&(this.locked||(this.forceClose?this.close():(this.hidden=!0,this.mask())))},close:function(e){this.active&&(this.locked||(this.active=!1,this.$emit("close"),this.mask()))},bindKeyboard:function(){window.addEventListener("keyup",this.keyPressed),document.addEventListener("keydown",this.keyDown,!1)},unbindKeyboard:function(){window.removeEventListener("keyup",this.keyPressed),document.removeEventListener("keydown",this.keyDown)},keyPressed:function(e){27!==e.which&&27!==e.keyCode||(this.hide(),this.$emit("esc-key"))},keyDown:function(e){e.keyCode&&9===e.keyCode&&(e.shiftKey?document.activeElement.isEqualNode(this.firstFocusableEl)&&(this.lastFocusableEl.focus(),e.preventDefault()):document.activeElement.isEqualNode(this.lastFocusableEl)&&(this.firstFocusableEl.focus(),e.preventDefault()))}},beforeDestroy:function(){this.$el.parentNode&&(this.active&&this.unbindKeyboard(),this.$el.parentNode.removeChild(this.$el))}},c=d,u=i(2528),h=(0,u.c)(c,s,a,!1,null,"5d2936e8",null),p=h.exports},8108:function(e,t,i){"use strict";i.d(t,{c:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:"fade_spinner"},on:{"before-enter":e.beforeEnter,"after-enter":e.afterEnter,"before-leave":e.beforeLeave}},[t("div",{staticClass:"a17spinner"},[t("div",{staticClass:"a17spinner__anim",class:{"a17spinner__anim--visible":e.isVisible}},[t("span",{staticClass:"loader"},[t("span")])])])])},a=[],n={name:"A17Spinner",props:{visible:{type:Boolean,default:!1}},data:function(){return{isVisible:this.visible}},methods:{beforeEnter:function(e){this.isVisible=this.visible},afterEnter:function(e){this.isVisible=!0},beforeLeave:function(e){this.isVisible=!1}}},o=n,r=i(2528),l=(0,r.c)(o,s,a,!1,null,null,null),d=l.exports},6308:function(e,t,i){"use strict";i.d(t,{c:function(){return p}});var s=function(){var e=this,t=e._self._c;return t("a17-modal",{ref:"standalone-"+e.endpointName,staticClass:"modal--browser",attrs:{mode:"medium","force-close":!0},on:{close:e.closeModal}},[t("div",{staticClass:"browser"},[t("div",{staticClass:"browser__frame"},[t("div",{ref:"form",staticClass:"browser__header"},[e.multiSources?t("div",{staticClass:"browser__sources"},[t("a17-vselect",{staticClass:"browser__sources-select",attrs:{name:"sources",selected:e.currentEndpoint,options:e.endpoints,required:!0},on:{change:e.changeBrowserSource}})],1):e._e(),t("div",{staticClass:"browser__search"},[t("a17-filter",{on:{submit:e.submitFilter}},[e.browserNote?t("div",{attrs:{slot:"additional-actions"},slot:"additional-actions"},[t("span",{staticClass:"browser__note f--small"},[e._v(" "+e._s(e.browserNote)+" ")])]):e._e()])],1)]),t("div",{staticClass:"browser__inner"},[t("div",{ref:"list",staticClass:"browser__list"},[t("a17-itemlist",{attrs:{items:e.fullItems,keysToCheck:["id","edit"],selectedItems:e.selectedItems},on:{change:e.updateSelectedItems}})],1)]),t("div",{staticClass:"browser__footer"},[t("a17-button",{attrs:{type:"button",variant:"action"},on:{click:e.saveAndClose}},[e._v(e._s(e.browserTitle))]),t("span",{staticClass:"browser__size-infos"},[e._v(e._s(e.selectedItems.length)+" / "+e._s(e.max))])],1)])])])},a=[],n=i(7120),o=i(892),r=i(7300),l=i(5256),d={name:"A17StandaloneBrowser",components:{"a17-filter":o.c,"a17-itemlist":r.c,"a17-modal":l.c},props:{btnLabel:{type:String,default:"Insert"},btnMultiLabel:{type:String,default:"Insert files"},initialPage:{type:Number,default:1},open:{type:Boolean,default:!1},forRepeater:{type:Boolean,default:!1},endpoint:{type:Object,required:!1,default:null},endpointMultiple:{type:Array,required:!1,default:null},max:{type:Number,default:0}},data(){return{maxPage:20,fullItems:[],listHeight:0,page:this.initialPage,endpoints:[],endpointName:null,browserTitle:"Select",browserNote:null,currentSource:null,selected:[]}},computed:{currentEndpoint(){return this.endpoints.find((e=>e.value===this.currentSource))},multiSources(){return this.endpoints.length>1},selectedItems:{get(){return this.selected||[]},set(e){this.selected=e}}},watch:{open:function(e,t){e!==t&&(e?this.openModal():this.closeModal())}},methods:{openModal(){const e="standalone-"+this.endpointName;this.$refs[e].open()},closeModal(){const e="standalone-"+this.endpointName;this.$refs[e].close(),this.$emit("close")},updateSelectedItems(e){const t=this.multiSources?["id","endpointType"]:["id"],i=this.fullItems.some((i=>t.every((t=>i[t]===e[t]))));if(!i)return;const s=this.selectedItems.some((i=>t.every((t=>i[t]===e[t]))));if(s){const i=this.selectedItems.findIndex((i=>t.every((t=>i[t]===e[t]))));if(i<0)return;const s=[...this.selectedItems];s.splice(i,1),this.selectedItems=s}else{if(1===this.max&&this.clearSelectedItems(),this.selectedItems.length>=this.max&&this.max>0)return;this.selectedItems=[...this.selectedItems,e]}},getFormData(e){let t=(0,n.c)(e);return t?t.page=this.page:t={page:this.page},t.forRepeater=this.forRepeater,t},clearSelectedItems(){this.selectedItems=[]},clearFullItems(){this.fullItems.splice(0)},reloadList(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&(this.page=1);const t=this.$refs.form,i=this.getFormData(t);this.$http.get(this.currentEndpoint.value,{params:i}).then((t=>{e&&this.clearFullItems(),this.fullItems.push(...t.data.data),this.$nextTick((()=>{this.listHeight!==this.$refs.list.scrollHeight&&(this.listHeight=this.$refs.list.scrollHeight,this.$refs.list.addEventListener("scroll",this.scrollToPaginate))}))}),(function(e){}))},submitFilter(){this.page=1,this.clearFullItems(),this.reloadList()},scrollToPaginate(){const e=this.$refs.list;e.scrollTop+e.clientHeight>this.listHeight-10&&(e.removeEventListener("scroll",this.scrollToPaginate),this.maxPage>this.page&&(this.page=this.page+1,this.reloadList()))},saveAndClose(){this.$emit("selected",this.selectedItems),this.closeModal()},changeBrowserSource(e){this.currentSource=e.value,this.reloadList(!0)}},mounted(){this.openModal(),this.endpointMultiple?this.endpoints=this.endpointMultiple:this.endpoints=[this.endpoint],this.currentSource=this.endpoints[0].value,this.reloadList()}},c=d,u=i(2528),h=(0,u.c)(c,s,a,!1,null,"3ff94fa2",null),p=h.exports},6676:function(e,t,i){"use strict";i.d(t,{c:function(){return g}});var s=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,locale:e.locale,size:e.size,name:e.name,"label-for":e.uniqId,required:e.required},on:{localize:e.updateLocale}},[t("div",{staticClass:"input__field",class:e.textfieldClasses,attrs:{dir:e.dirLocale}},[e.hasPrefix?t("span",{staticClass:"input__prefix"},[e._v(e._s(e.prefix))]):e._e(),"textarea"===e.type?t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],ref:"clone",staticClass:"input__clone",attrs:{rows:e.rows,disabled:"true"},domProps:{value:e.value},on:{input:function(t){t.target.composing||(e.value=t.target.value)}}}):e._e(),"textarea"===e.type?t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],ref:"input",attrs:{name:e.name,id:e.uniqId,placeholder:e.placeholder,disabled:e.disabled,required:e.required,readonly:e.readonly,rows:e.rows,autofocus:e.autofocus},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:[function(t){t.target.composing||(e.value=t.target.value)},e.onInput]}}):e._e(),"number"===e.type?t("input",{ref:"input",attrs:{type:"number",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete,min:e.min,max:e.max,step:e.step},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),"text"===e.type?t("input",{ref:"input",attrs:{type:"text",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete,"x-mask":e.mask},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),"email"===e.type?t("input",{ref:"input",attrs:{type:"email",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete,pattern:"[^@\\s]+@[^@\\s]+\\.[^@\\s]+"},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),"password"===e.type?t("input",{ref:"input",attrs:{type:"password",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),"url"===e.type?t("input",{ref:"input",attrs:{type:"url",placeholder:e.placeholder,name:e.name,id:e.uniqId,disabled:e.disabled,maxlength:e.displayedMaxlength,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}):e._e(),e.hasMaxlength?t("span",{staticClass:"input__limit f--tiny",class:e.limitClasses},[e._v(e._s(e.counter))]):e._e(),"email"===e.type?t("span",{class:e.validityClasses}):e._e()])])},a=[],n=i(3336),o=i.n(n),r=i(1308),l=i(5284),d=i(5272),c=i(1200),u=i(4992),h={name:"A17Textfield",mixins:[u.c,l.c,d.c,c.c,r.c],props:{name:{type:String,required:!0},type:{type:String,default:"text"},prefix:{type:String,default:""},maxlength:{type:Number,default:0},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:null},initialValue:{default:""},mask:{type:String,default:null},rows:{type:Number,default:5}},computed:{uniqId:function(e){return this.name+"-"+this.randKey},textfieldClasses:function(){return{"input__field--textarea":"textarea"===this.type,"input__field--small":"small"===this.size&&"textarea"===!this.type,"s--focus":this.focused,"s--disabled":this.disabled}},hasMaxlength:function(){return this.maxlength>0},hasPrefix:function(){return""!==this.prefix},displayedMaxlength:function(){return!!this.hasMaxlength&&this.maxlength},limitClasses:function(){return{"input__limit--red":this.counter<.1*this.maxlength}},validityClasses:function(){return["input__validity",!0===this.isFieldValid?"input__validity--valid":"",!1===this.isFieldValid?"input__validity--error":""]}},data:function(){return{value:this.initialValue,lastSavedValue:this.initialValue,focused:!1,isFieldValid:null,counter:0}},watch:{initialValue:function(){this.updateValue(this.initialValue)}},methods:{updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&this.updateValue(e)},updateValue:function(e){this.value=e,this.updateCounter(e)},updateAndSaveValue:function(e){this.updateValue(e),this.lastSavedValue=this.value,this.saveIntoStore()},updateCounter:function(e){this.maxlength>0&&(this.counter=this.maxlength-(e?e.toString().length:0))},onFocus:function(e){this.focused=!0,this.resizeTextarea(),this.$emit("focus")},onBlur:function(e){const t=e.target.value;this.updateAndSaveValue(t),this.focused=!1,this.$emit("blur",t)},onInput:function(e){this.preventSubmit(),this._onInputInternal(e)},_onInputInternal:o()((function(e){const t=e.target.value;this.updateAndSaveValue(t),this.checkFieldValidity(e.target),this.$emit("change",t),this.$emit("input",t),this.allowSubmit()}),250),resizeTextarea:function(){if("textarea"!==this.type)return;const e=this.$refs.clone,t=15;if(e){const i=e.scrollHeight;this.$refs.input.style.minHeight="".concat(i+t,"px")}},checkFieldValidity:function(e){let t=null,i=null;switch(e.type){case"email":if(e.value.length<1)return void(this.isFieldValid=null);t=e.pattern,i=RegExp(t),this.isFieldValid=i.test(this.value);break}}},mounted:function(){this.updateCounter(this.value),"textarea"===this.type&&(this.resizeTextarea(),this.$watch("value",this.resizeTextarea),this.$nextTick((function(){window.addEventListener("resize",this.resizeTextarea)})))},beforeDestroy(){"textarea"===this.type&&window.removeEventListener("resize",this.resizeTextarea)}},p=h,m=i(2528),f=(0,m.c)(p,s,a,!1,null,"9edd5ab6",null),g=f.exports},6216:function(e,t,i){"use strict";i.d(t,{c:function(){return T}});var s,a,n=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vselectOuter"},[t("a17-inputframe",{attrs:{error:e.error,label:e.label,note:e.note,size:e.size,name:e.name,"label-for":e.uniqId,required:e.required,"add-new":e.addNew}},[t("div",{staticClass:"vselect",class:e.vselectClasses},[t("div",{staticClass:"vselect__field"},[t("input",{attrs:{type:"hidden",name:e.name,id:e.uniqId},domProps:{value:e.inputValue}}),t("v-select",{attrs:{multiple:e.multiple,placeholder:e.placeholder,value:e.value,options:e.currentOptions,searchable:e.searchable,selectable:e.selectable,clearSearchOnSelect:e.clearSearchOnSelect,label:e.optionsLabel,taggable:e.taggable,pushTags:e.pushTags,transition:e.transition,requiredValue:e.required,maxHeight:e.maxHeight,disabled:e.disabled},on:{input:e.updateValue,search:e.getOptions}},[t("span",{attrs:{slot:"no-options"},slot:"no-options"},[e._v(e._s(e.emptyText))])])],1)])]),e.addNew?[t("a17-modal-add",{ref:"addModal",attrs:{name:e.name,"form-create":e.addNew,"modal-title":"Add new "+e.label}},[e._t("addModal")],2)]:e._e()],2)},o=[],r=i(3336),l=i.n(r),d=i(1596),c=i.n(d),u={extends:c(),props:{toggleSelectOption:{type:Boolean,default:!1},requiredValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data(){return{mutableValue:this.value}},computed:{showClearButton(){return!1}},methods:{maybeDeleteValue(){if(!this.requiredValue&&!this.$refs.search.value.length&&this.mutableValue)return this.multiple?this.mutableValue.pop():this.mutableValue=null},isOptionSelected(e){return void 0!==this.valueAsArray&&this.valueAsArray.some((t=>"object"===typeof t?this.optionObjectComparator(t,e):t===e||t===e[this.index]))}},mounted(){this.taggable&&this.$emit("search",this.search,this.toggleLoading)}},h=u,p=i(2528),m=(0,p.c)(h,s,a,!1,null,null,null),f=m.exports,g=i(248),_=i(1308),b=i(5272),v=i(4992),y={name:"A17VueSelect",mixins:[v.c,b.c,_.c,g.c],props:{placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},name:{type:String,default:""},transition:{type:String,default:"fade_move_dropdown"},multiple:{type:Boolean,default:!1},taggable:{type:Boolean,default:!1},pushTags:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},selectable:{type:Function,default:e=>{var t;return null===(t=e.selectable)||void 0===t||t}},clearSearchOnSelect:{type:Boolean,default:!0},selected:{default:null},emptyText:{default(){return this.$trans("select.empty-text","Sorry, no matching options.")}},options:{default:function(){return[]}},optionsLabel:{type:String,default:"label"},endpoint:{type:String,default:""},size:{type:String,default:""},required:{type:Boolean,default:!1},maxHeight:{type:String,default:"400px"}},components:{"v-select":f},data:function(){return{value:this.selected,currentOptions:this.options,ajaxUrl:this.endpoint}},watch:{options:function(e){this.currentOptions=this.options}},computed:{uniqId:function(e){return this.name+"-"+this.randKey},inputValue:{get:function(){if(this.value){if(this.multiple){if(Array.isArray(this.value))return"object"===typeof this.value[0]?this.value.map((e=>e.value)):this.value.join(",")}else if("object"===typeof this.value)return this.value.value;return this.value}return""},set:function(e){if(Array.isArray(e))if(this.taggable)this.value=e;else{this.value=[];for(const t in e){const i=this.options.filter((i=>i.value===e[t]));i[0]&&this.value.push(i[0])}}else this.value=this.options.find((t=>"number"===typeof t.value?t.value%1!==0?t.value===parseFloat(e):t.value===parseInt(e):t.value===String(e)))}},vselectClasses:function(){return[this.value?"vselect--has-value":"",this.multiple?"vselect--multiple":"vselect--single","small"===this.size?"vselect--small":"","large"===this.size?"vselect--large":"",this.error?"vselect--error":""]}},methods:{updateFromStore:function(e){this.inputValue=e},isAjax:function(){return""!==this.ajaxUrl},updateValue:function(e){if(this.multiple)this.value=[...new Set(e)];else if(e)this.value=e;else{const e=this.options.find((e=>"all"===e.value));this.value=null!==e&&void 0!==e?e:void 0}this.saveIntoStore(),this.$emit("change",e)},getOptions:l()((function(e,t){if(!this.isAjax())return!0;t(!0),this.$http.get(this.ajaxUrl,{params:{q:e}}).then((e=>{e.data.items&&e.data.items.length&&(this.taggable&&Array.isArray(this.value)?this.currentOptions=e.data.items.filter((e=>!this.value.includes(e))):this.currentOptions=e.data.items),t(!1)}),(function(e){t(!1)}))}),500)}},w=y,E=(0,p.c)(w,n,o,!1,null,null,null),T=E.exports},8898:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return u}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"block",class:e.blockClasses},[t("div",{staticClass:"block__header",on:{dblclick:function(t){return t.preventDefault(),e.toggleExpand()}}},[e.withHandle?t("span",{staticClass:"block__handle"}):e._e(),t("div",{staticClass:"block__toggle"},[e.withMoveDropdown&&e.withActions?t("a17-dropdown",{ref:e.moveDropdown,staticClass:"f--small",attrs:{position:"bottom-left",maxHeight:270}},[t("span",{staticClass:"block__counter f--tiny",on:{click:function(t){return e.$refs[e.moveDropdown].toggle()}}},[e._v(e._s(e.index+1))]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e._t("dropdown-numbers")],2)]):e.withActions?t("span",{staticClass:"block__counter f--tiny"},[e._v(e._s(e.index+1))]):e._e(),t("span",{staticClass:"block__title"},[e._v(e._s(e.blockTitle))])],1),e.withActions?t("div",{staticClass:"block__actions"},[e._t("block-actions"),e.withAddDropdown?t("a17-dropdown",{ref:e.addDropdown,attrs:{position:"bottom-right",maxHeight:430},on:{open:function(t){e.hover=!0},close:function(t){e.hover=!1}}},[t("a17-button",{attrs:{variant:"icon","data-action":""},on:{click:function(t){return e.$refs[e.addDropdown].toggle()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"add"}})]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e._t("dropdown-add")],2)],1):e._e(),t("a17-button",{attrs:{variant:"icon","data-action":"","aria-expanded":e.visible?"true":"false"},on:{click:function(t){return e.toggleExpand()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"expand"}})]),t("a17-dropdown",{ref:e.actionsDropdown,attrs:{position:"bottom-right"},on:{open:function(t){e.hover=!0},close:function(t){e.hover=!1}}},[t("a17-button",{attrs:{variant:"icon"},on:{click:function(t){return e.$refs[e.actionsDropdown].toggle()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"more-dots"}})]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e._t("dropdown-action")],2)],1)],2):e._e()]),e.visible?t("div",{staticClass:"block__content"},[t("".concat(e.block.type),e._b({key:"form_".concat(e.block.type,"_").concat(e.block.id),tag:"component",attrs:{name:e.componentName(e.block.id)}},"component",e.block.attributes,!1)),t("a17-inputframe",{attrs:{size:"small",label:"",name:"block.".concat(e.block.id)}})],1):e._e()])},a=[],n=i(6036),o=i(8884),r={name:"A17BlockEditorItem",props:{index:{type:Number,default:0},opened:{type:Boolean,default:!0},size:{type:String,default:""},block:{type:Object,default:()=>{}},withHandle:{type:Boolean,default:!0},withActions:{type:Boolean,default:!0}},data(){return{visible:!1,hover:!1,withMoveDropdown:!0,withAddDropdown:!0}},filters:o.c,computed:{titleFieldValue:function(){const e=this.blockFieldValue(this.block.titleField);return e?"object"===typeof e?e[this.currentLocale.value]:e:null},blockTitle:function(){const e=this.block.title||"",t=this.titleFieldValue||"",i=e&&t?" — ":"";let s;s=this.block.hideTitlePrefix?"".concat(t):"".concat(e).concat(i).concat(t);const a=document.createElement("div");return a.innerHTML=s,a.innerText},blockClasses(){return[this.visible?"block--open":"",this.hover?"block--focus":"",this.size?"block--".concat(this.size):""]},moveDropdown(){return"moveBlock".concat(this.index,"Dropdown")},actionsDropdown(){return"action".concat(this.block.id,"Dropdown")},addDropdown(){return"add".concat(this.block.id,"Dropdown")},...(0,n.ys)({currentLocale:e=>e.language.active}),...(0,n.gV)(["fieldValueByName"])},watch:{opened(){this.visible=this.opened}},created(){this.block.ui&&this.block.ui.isNew&&this.toggleExpand()},methods:{toggleExpand(){this.visible=!this.visible},componentName(e){return"blocks["+e+"]"},blockFieldName:function(e){return e?"blocks[".concat(this.block.id,"][").concat(e,"]"):""},blockFieldValue:function(e){if(!e)return null;const t=this.blockFieldName(e);return this.fieldValueByName(t)}},beforeMount(){this.$slots["dropdown-numbers"]||(this.withMoveDropdown=!1),this.$slots["dropdown-add"]||(this.withAddDropdown=!1)}},l=r,d=i(2528),c=(0,d.c)(l,s,a,!1,null,"5833e5ec",null),u=c.exports},3436:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return c}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"block__body"},[t("a17-inputframe",{attrs:{label:"Image",name:"medias.image"}},[t("a17-mediafield",{attrs:{name:e.fieldName("image"),"crop-context":"image"}})],1)],1)},a=[],n=i(580),o={name:"A17Image",mixins:[n.c]},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,null,null),c=d.exports},9980:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return c}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"block__body"},[t("a17-wysiwyg-tiptap",{attrs:{name:e.fieldName("html"),label:"Body",options:{modules:{toolbar:["table"],syntax:!1}},placeholder:"Insert your table",editSource:"true",inStore:"value"}})],1)},a=[],n=i(580),o={name:"A17Bodytable",mixins:[n.c]},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,null,null),c=d.exports},488:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return c}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"block__body"},[t("a17-locale",{attrs:{type:"a17-textfield",attributes:{label:"Title",name:e.fieldName("text"),type:"text",maxlength:250,inStore:"value"}}})],1)},a=[],n=i(580),o={name:"A17Title",mixins:[n.c]},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,null,null),c=d.exports},7626:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return c}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"block__body"},[t("a17-wysiwyg",{attrs:{name:e.fieldName("html"),inStore:"value"}})],1)},a=[],n=i(580),o={name:"A17Bodytext",mixins:[n.c]},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,null,null),c=d.exports},1e3:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return g}});var s=function(){var e=this,t=e._self._c;return t("a17-blocks-list",{attrs:{"editor-name":e.editorName},scopedSlots:e._u([{key:"default",fn:function(i){let{savedBlocks:s,availableBlocks:a,moveBlock:n,moveBlockToEditor:o,cloneBlock:r}=i;return[t("div",{staticClass:"blocks"},[t("draggable",e._b({staticClass:"blocks__container",attrs:{value:s,group:"blocks",move:e.handleOnMove},on:{end:function(t){return e.handleOnEnd(n,o)}}},"draggable",e.dragOptions,!1),[t("transition-group",{attrs:{name:"draggable_list",tag:"div"}},e._l(s,(function(i){return t("div",{key:i.id,staticClass:"blocks__item"},[t("a17-blockeditor-model",{attrs:{"editor-name":e.editorName,block:i},scopedSlots:e._u([{key:"default",fn:function(i){let{block:n,blockIndex:o,add:l,edit:d,move:c,remove:u,duplicate:h}=i;return[a.length?t("a17-blockeditor-item",{ref:"blockList",refInFor:!0,attrs:{block:n,index:o,opened:e.opened,"with-handle":!e.isSettings,"with-actions":!e.isSettings},on:{expand:e.setOpened}},[e._l(a,(function(i){return[t("button",{key:i.component,staticClass:"blocks__addButton",attrs:{slot:"dropdown-add",type:"button"},on:{click:function(t){return e.handleBlockAdd(l,i,o+1)}},slot:"dropdown-add"},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],staticClass:"blocks__icon",attrs:{symbol:i.icon}}),t("span",{staticClass:"blocks__title"},[e._v(e._s(i.title))])])]})),t("div",{attrs:{slot:"dropdown-action"},slot:"dropdown-action"},[e.opened?t("button",{attrs:{type:"button"},on:{click:function(t){return e.collapseAllBlocks()}}},[e._v(" "+e._s(e.$trans("fields.block-editor.collapse-all","Collapse all"))+" ")]):t("button",{attrs:{type:"button"},on:{click:function(t){return e.expandAllBlocks()}}},[e._v(" "+e._s(e.$trans("fields.block-editor.expand-all","Expand all"))+" ")]),e.editor&&!e.editorName.includes("|")?t("button",{attrs:{type:"button"},on:{click:function(t){return e.openInEditor(d,o,e.editorName)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.open-in-editor","Open in editor"))+" ")]):e._e(),t("button",{attrs:{type:"button"},on:{click:function(t){return e.handleClone(r,o,n)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.clone-block","Clone block"))+" ")]),t("button",{attrs:{type:"button"},on:{click:function(t){return e.handleDuplicateBlock(h)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.create-another","Create another"))+" ")]),t("button",{attrs:{type:"button"},on:{click:function(t){return e.handleDeleteBlock(u)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.delete","Delete"))+" ")])]),e._l(s.length,(function(i){return t("button",{key:i,attrs:{slot:"dropdown-numbers",type:"button"},on:{click:function(e){return c(i-1)}},slot:"dropdown-numbers"},[e._v(e._s(i)+" ")])}))],2):e._e()]}}],null,!0)})],1)})),0)],1),e.isSettings?e._e():t("div",{staticClass:"blocks__actions"},[a.length?t("a17-dropdown",{ref:"blocksDropdown",attrs:{position:"top-center",arrow:!0,offset:10,maxHeight:430}},[t("a17-button",{attrs:{size:"small",variant:"action"},on:{click:function(t){return e.$refs.blocksDropdown.toggle()}}},[e._v(e._s(e.trigger)+" ")]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e._l(a,(function(i){return[t("a17-blockeditor-model",{key:i.component,attrs:{"editor-name":e.editorName,block:i},scopedSlots:e._u([{key:"default",fn:function(s){let{add:a,block:n}=s;return[t("button",{key:i.component,staticClass:"blocks__addButton",attrs:{type:"button"},on:{click:function(t){return e.handleBlockAdd(a,n)}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],staticClass:"blocks__icon",attrs:{symbol:i.icon}}),t("span",{staticClass:"blocks__title"},[e._v(e._s(i.title))])])]}}],null,!0)})]}))],2)],1):e._e(),e.editorName.includes("|")?e._e():t("div",{staticClass:"blocks__secondaryActions"},[e.editor?t("a",{staticClass:"f--link f--link-underlined--o",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.openEditor(-1,e.editorName)}}},[e._v(" "+e._s(e.$trans("fields.block-editor.open-in-editor","Open in editor"))+" ")]):e._e()])],1)],1)]}}])})},a=[],n=i(7052),o=i.n(n),r=i(6036),l=i(8898),d=i(296),c=i(6799),u=i(5522),h={name:"A17Blocks",components:{"a17-blockeditor-item":l["default"],"a17-blockeditor-model":d["default"],"a17-blocks-list":c["default"],draggable:o()},mixins:[u.Eh,u.y_],props:{trigger:{type:String,default:""},isSettings:{type:Boolean,required:!0},title:{type:String,default:""},editorName:{type:String,required:!0}},data(){return{opened:!0,handle:".block__handle"}},computed:{...(0,r.ys)({editor:e=>e.blocks.editor,editorNames:e=>e.blocks.editorNames}),...(0,r.gV)(["blocks","fieldsByBlockId","availableBlocks"])},methods:{setOpened:function(){const e=this.$refs.blockList&&this.$refs.blockList.every((e=>!e.visible));e&&(this.opened=!1)},collapseAllBlocks:function(){this.opened=!1},expandAllBlocks:function(){this.opened=!0},checkExpandBlocks(){void 0!==this.$refs.blockList[this.$refs.blockList.length-1]&&this.$refs.blockList[this.$refs.blockList.length-1].toggleExpand()},handleOnMove(e){const{draggedContext:t,relatedContext:i}=e,{index:s,element:a,futureIndex:n}=t,{element:o}=i;this.nextMove={block:a,editorName:o.name,newIndex:n,index:s}},handleOnEnd(e,t){if(!this.nextMove)return;const{block:i,editorName:s,newIndex:a,index:n}=this.nextMove;i.name!==s?this.checkIfBlockTypeIsAvailable(s,i.type)&&t&&t(i,s,n,a):e&&e({oldIndex:n,newIndex:a})},handleClone(e,t,i){e&&e({block:i,index:t+1}),this.$nextTick((()=>{this.checkExpandBlocks()}))},handleBlockAdd(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;e(t,i),this.$nextTick((()=>{this.checkExpandBlocks()}))},handleDuplicateBlock(e,t){e(t),this.$nextTick((()=>{this.checkExpandBlocks()}))},handleDeleteBlock(e,t){this.$root.$refs.warningContentEditor?this.$root.$refs.warningContentEditor.open((()=>{e(t),this.$nextTick((()=>{this.checkExpandBlocks()}))})):(e(t),this.$nextTick((()=>{this.checkExpandBlocks()})))},checkIfBlockTypeIsAvailable(e,t){const i=JSON.parse(JSON.stringify(this.availableBlocks(e))),s=i.map((e=>e.component));return-1!==s.indexOf(t)},openInEditor(e,t,i){e(),this.openEditor(t,i)}},mounted(){this.$nextTick((function(){this.$refs.blockList&&this.blocks(this.editorName)&&this.blocks(this.editorName).length<4&&this.$refs.blockList.forEach((e=>e.toggleExpand())),this.setOpened()}))}},p=h,m=i(2528),f=(0,m.c)(p,s,a,!1,null,"1f78636a",null),g=f.exports},6836:function(e,t,i){"use strict";i.d(t,{c:function(){return c}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"modalValidation"},[t("a17-inputframe",["create"===e.mode?[t("a17-button",{attrs:{type:"submit",name:"create",variant:"validate",disabled:e.isDisabled}},[e._v(e._s(e.$trans("modal.create.button","Create")))]),e.isDisabled?e._e():t("a17-button",{attrs:{type:"submit",name:"create-another",variant:"aslink-grey"},nativeOn:{click:function(e){return e.currentTarget.focus()}}},[t("span",[e._v(e._s(e.$trans("modal.create.create-another","Create and add another")))])])]:"update"===e.mode?t("a17-button",{attrs:{type:"submit",name:"update",variant:"validate",disabled:e.isDisabled}},[e._v(e._s(e.$trans("modal.update.button","Update")))]):t("a17-button",{attrs:{type:"submit",name:"done",variant:"validate",disabled:e.isDisabled}},[e._v(e._s(e.$trans("modal.done.button","Done")))])],2),e.activePublishState?t("label",{staticClass:"switcher__button",class:e.switcherClasses,attrs:{for:e.publishedName}},[e.isChecked?t("span",{staticClass:"switcher__label"},[e._v(e._s(e.textEnabled))]):e._e(),e.isChecked?e._e():t("span",{staticClass:"switcher__label"},[e._v(e._s(e.textDisabled))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.published,expression:"published"}],attrs:{type:"checkbox",disabled:e.disabled,name:e.publishedName,id:e.publishedName},domProps:{value:1,checked:Array.isArray(e.published)?e._i(e.published,1)>-1:e.published},on:{change:function(t){var i=e.published,s=t.target,a=!!s.checked;if(Array.isArray(i)){var n=1,o=e._i(i,n);s.checked?o<0&&(e.published=i.concat([n])):o>-1&&(e.published=i.slice(0,o).concat(i.slice(o+1)))}else e.published=a}}}),t("span",{staticClass:"switcher__switcher"})]):e._e()],1)},a=[],n=i(624),o={name:"A17ModalValidationButtons",props:{publishedName:{type:String,required:!1},disabled:{type:Boolean,default:!1},activePublishState:{type:Boolean,default:!1},isPublish:{type:Boolean,default:!1},isDisable:{type:Boolean,default:!1},mode:{type:String,default:"create"},textEnabled:{type:String,default:"Live"},textDisabled:{type:String,default:"Draft"}},data:function(){return{fields:!1,isDisabled:this.isDisable,published:this.isPublish}},watch:{published:function(e){this.$store.commit(n.tt.UPDATE_FORM_FIELD,{name:"published",value:e})}},computed:{switcherClasses:function(){return[this.isChecked?"switcher--active":""]},isChecked:function(){return this.published},checkedValue:{get:function(){return this.published},set:function(e){this.published=e}}},methods:{addListeners(){this.$nextTick((()=>{this.fields.forEach((e=>{e.removeEventListener("input",this.disable)})),this.fields=[...this.$parent.$el.querySelectorAll("input, textarea, select")],this.fields.forEach((e=>{e.addEventListener("input",(()=>{this.disable()}))}))}))},disable:function(){if(!this.fields)return this.isDisabled=!0,void this.$emit("disable",!0);const e=this.fields.filter((e=>e.getAttribute("required")));if(0===e.length)return this.isDisabled=!1,void this.$emit("disable",!1);const t=e.filter((function(e){return e.value.length>0}));if(t.length===e.length)return this.isDisabled=!1,void this.$emit("disable",!1);this.isDisabled=!0,this.$emit("disable",!0)}},mounted:function(){const e=this;this.fields=[...this.$parent.$el.querySelectorAll("input, textarea, select")],e.disable(),this.fields.length&&this.addListeners()},beforeDestroy:function(){const e=this;this.fields.length&&this.fields.forEach((function(t){t.removeEventListener("input",e.disable)}))}},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,"376dc8cc",null),c=d.exports},7980:function(e,t,i){"use strict";i.d(t,{c:function(){return d}});var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"paginate"},[t("p",{staticClass:"paginate__offset f--small"},[e._v(" "+e._s(e.$trans("listing.paginate.rows-per-page"))+" "),e.availableOffsets.length>1?[t("a17-dropdown",{ref:"paginateDropdown",attrs:{position:"bottom-right"}},[t("button",{staticClass:"paginate__button",on:{click:function(t){return e.$refs.paginateDropdown.toggle()}}},[e._v(e._s(e.newOffset))]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},e._l(e.availableOffsets,(function(i){return t("button",{key:i,class:{dropdown__active:i===e.newOffset},attrs:{type:"button"},on:{click:function(t){return e.changeOffset(i)}}},[e._v(e._s(i))])})),0)])]:[e._v(" "+e._s(e.newOffset)+" ")]],2),e.max>1?t("div",{staticClass:"paginate__pages"},[t("p",{staticClass:"paginate__current f--small"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.newPageFormat,expression:"newPageFormat"}],staticClass:"form__input paginate__input",attrs:{type:"number",maxlength:"4"},domProps:{value:e.newPageFormat},on:{blur:e.formatPage,input:function(t){t.target.composing||(e.newPageFormat=t.target.value)}}}),e._v(" of "+e._s(e.max))]),t("button",{staticClass:"paginate__prev",attrs:{type:"button",disabled:e.value<=e.min},on:{click:e.previousPage}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"pagination_left"}})]),t("button",{staticClass:"paginate__next",attrs:{type:"button",disabled:e.value>=e.max},on:{click:e.nextPage}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"pagination_right"}})])]):e._e()])},a=[],n={name:"A17Paginate",props:{value:{type:Number,required:!0},offset:{type:Number,default:60},availableOffsets:{type:Array,default:function(){return[]}},min:{type:Number,default:1},max:{type:Number,required:!0}},data(){return{newOffset:this.offset}},computed:{newPageFormat:{get:function(){return this.value},set:function(e){return parseInt(e)}}},methods:{formatPage:function(e){let t=e.target.value;t=""!==t?parseInt(t):1,t>this.max&&(t=this.max),t<1&&(t=1),e.target.value=t,t!==this.value&&this.$emit("changePage",t)},changeOffset:function(e){this.newOffset=e,this.$emit("changeOffset",parseInt(this.newOffset))},previousPage:function(){this.$emit("changePage",parseInt(this.value-1))},nextPage:function(){this.$emit("changePage",parseInt(this.value+1))}}},o=n,r=i(2528),l=(0,r.c)(o,s,a,!1,null,"7a3996c9",null),d=l.exports},7124:function(e,t,i){"use strict";var s=i(1448);const a=function(){const e=document.querySelectorAll("[data-medialib-btn]");function t(){window["TWILL"].vm&&window["TWILL"].vm.openFreeMediaLibrary()}e.length&&(0,s.c)(e,(function(e){e.addEventListener("click",(function(i){i.preventDefault(),t(),e.blur()}))}))};t.c=a},296:function(e,t,i){"use strict";i.r(t);var s=i(6036),a=i(7632),n=i(624);t["default"]={props:{block:{type:Object},editorName:{type:String,required:!0}},computed:{blockIndex(){return this.block?this.getBlockIndex(this.block,this.editorName):0},isActive(){return!!(this.block&&Object.keys(this.activeBlock).length>0)&&this.block.id===this.activeBlock.id},...(0,s.ys)({activeBlock:e=>e.blocks.active}),...(0,s.gV)({getBlockIndex:"blockIndex"})},methods:{add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;this.$store.commit(n.GC.ADD_BLOCK,{editorName:this.editorName,block:{id:this.setBlockID(),title:e.title,type:e.component,icon:e.icon,attributes:e.attributes},index:t})},edit(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.blockIndex;this.$store.commit(n.GC.ACTIVATE_BLOCK,{editorName:this.editorName,index:e})},unEdit(){this.$store.commit(n.GC.ACTIVATE_BLOCK,{editorName:this.editorName,index:-1})},move(e){this.blockIndex!==e&&this.$store.commit(n.GC.MOVE_BLOCK,{editorName:this.editorName,oldIndex:this.blockIndex,newIndex:e})},duplicate(){const e=Object.assign({},this.block);this.$store.commit(n.GC.DUPLICATE_BLOCK,{editorName:this.editorName,index:this.blockIndex,block:e,id:this.setBlockID()})},remove(){this.unEdit(),this.$store.commit(n.GC.DELETE_BLOCK,{editorName:this.editorName,index:this.blockIndex})},cloneBlock(){this.$store.dispatch(a.cp.DUPLICATE_BLOCK,{editorName:this.editorName,futureIndex:this.blockIndex+1,block:this.block,id:Date.now()+Math.floor(1e3*Math.random())})},setBlockID(){return Date.now()+Math.floor(1e3*Math.random())}},render(){return this.$scopedSlots.default({block:this.block,blockIndex:this.blockIndex,add:this.add,edit:this.edit,unEdit:this.unEdit,isActive:this.isActive,remove:this.remove,move:this.move,duplicate:this.duplicate,cloneBlock:this.cloneBlock})}}},6799:function(e,t,i){"use strict";i.r(t);var s=i(6036),a=i(7632),n=i(624);t["default"]={props:{editorName:{type:String,required:!0}},computed:{availableBlocks(){const e=this.editorName.split("|"),t=e[e.length-1];return this.getAvailableBlocks(t)},savedBlocks(){return this.blocks(this.editorName)},allSavedBlocks(){return this.used&&Object.keys(this.used).reduce(((e,t)=>e.concat(this.used[t])),[])},hasBlockActive(){return Object.keys(this.activeBlock).length>0},...(0,s.ys)({activeBlock:e=>e.blocks.active,used:e=>e.blocks.blocks,editorNames:e=>e.blocks.editorNames}),...(0,s.gV)({getAvailableBlocks:"availableBlocks",blocks:"blocks"})},methods:{reorderBlocks(e){this.$store.commit(n.GC.REORDER_BLOCKS,{editorName:this.editorName,value:e})},addBlock(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.$store.commit(n.GC.ADD_BLOCK,{editorName:t,block:{...e,type:e.type||e.component},index:i})},moveBlock(e){let{oldIndex:t,newIndex:i}=e;this.$store.commit(n.GC.MOVE_BLOCK,{editorName:this.editorName,oldIndex:t,newIndex:i})},moveBlockToEditor(e,t,i,s){this.$store.dispatch(a.cp.MOVE_BLOCK_TO_EDITOR,{block:e,editorName:t,index:i,futureIndex:s,id:Date.now()+Math.floor(1e3*Math.random())})},cloneBlock(e){let{block:t,index:i}=e;this.$store.dispatch(a.cp.DUPLICATE_BLOCK,{editorName:this.editorName,futureIndex:i,block:t,id:Date.now()+Math.floor(1e3*Math.random())})}},render(){return this.$scopedSlots.default({availableBlocks:this.availableBlocks,savedBlocks:this.savedBlocks,reorderBlocks:this.reorderBlocks,moveBlock:this.moveBlock,editorNames:this.editorNames,hasBlockActive:this.hasBlockActive,allSavedBlocks:this.allSavedBlocks,activeBlock:this.activeBlock,addBlock:this.addBlock,moveBlockToEditor:this.moveBlockToEditor,cloneBlock:this.cloneBlock})}}},4532:function(e,t,i){"use strict";i.d(t,{q_:function(){return Se},oD:function(){return Ee},G_:function(){return we},cp:function(){return Oe}});var s=function(){var e=this,t=e._self._c;return t("a17-dropdown",{ref:"rowSetupDropdown",attrs:{position:"bottom-right",fixed:!0}},[t("a17-button",{attrs:{variant:"icon"},on:{click:function(t){return e.$refs.rowSetupDropdown.toggle()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"more-dots"}})]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[e.row.hasOwnProperty("permalink")?t("a",{attrs:{href:e.row["permalink"],target:"_blank"}},[e._v("View permalink")]):e._e(),e.row.hasOwnProperty("edit")&&!e.row.hasOwnProperty("deleted")&&e.row["edit"]?t("a",{attrs:{href:e.editUrl},on:{click:function(t){return e.preventEditInPlace(t)}}},[e._v(e._s(e.$trans("listing.dropdown.edit","Edit")))]):e._e(),e.row.hasOwnProperty("published")&&!e.row.hasOwnProperty("deleted")?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.update("published")}}},[e._v(e._s(e.row["published"]?e.$trans("listing.dropdown.unpublish","Unpublish"):e.$trans("listing.dropdown.publish","Publish")))]):e._e(),e.row.hasOwnProperty("featured")&&!e.row.hasOwnProperty("deleted")?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.update("featured")}}},[e._v(e._s(e.row["featured"]?e.$trans("listing.dropdown.unfeature","Unfeature"):e.$trans("listing.dropdown.feature","Feature")))]):e._e(),e.row.duplicate&&!e.row.hasOwnProperty("deleted")?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.duplicateRow.apply(null,arguments)}}},[e._v(e._s(e.$trans("listing.dropdown.duplicate","Duplicate")))]):e._e(),e.row.hasOwnProperty("deleted")?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.restoreRow.apply(null,arguments)}}},[e._v(e._s(e.$trans("listing.dropdown.restore","Restore")))]):e._e(),e.row.hasOwnProperty("deleted")&&e.row.hasOwnProperty("destroyable")?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.destroyRow.apply(null,arguments)}}},[e._v(e._s(e.$trans("listing.dropdown.destroy","Destroy")))]):e.row.delete&&!e.row.hasOwnProperty("deleted")?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.deleteRow.apply(null,arguments)}}},[e._v(e._s(e.$trans("listing.dropdown.delete","Delete")))]):e._e()])],1)},a=[],n=i(4768),o={name:"TableCellActions",mixins:[n.c],methods:{update:function(e){this.$emit("update",{row:this.row,col:e})}}},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,"13effc32",null),c=d.exports,u=function(){var e=this,t=e._self._c;return t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.toggleBulk.apply(null,arguments)}}},[t("a17-checkbox",{attrs:{name:"bulkEdit",value:e.value,initialValue:e.initialValue}})],1)},h=[],p={name:"A17TableCellBulk",mixins:[n.c],components:{},props:{value:{type:Number,required:!0},initialValue:{type:Array,required:!0}},methods:{toggleBulk:function(){this.update()}}},m=p,f=(0,l.c)(m,u,h,!1,null,"39bc7724",null),g=f.exports,_=function(){var e=this,t=e._self._c;return t("span",[e.formatDateLabel.length>0?t("span",{staticClass:"tablecell__datePub",class:{"s--expired":e.formatDateLabel===e.textExpired}},[e._v(" "+e._s(e._f("formatDatatableDate")(e.startDate))+" "),e.endDate?[e._v("- "+e._s(e._f("formatDatatableDate")(e.endDate)))]:e._e(),t("br"),t("span",[e._v(e._s(e.formatDateLabel))])],2):t("span",[e.startDate?[e._v(" "+e._s(e._f("formatDatatableDate")(e.startDate))+" ")]:[e._v(" — ")]],2)])},b=[],v=i(2360),y=i.n(v),w=i(8884),E={name:"A17TableCellDates",mixins:[n.c],data(){return{textExpired:this.$trans("publisher.expired"),textScheduled:this.$trans("publisher.scheduled")}},computed:{formatDateLabel:function(){let e="";const t=y()(this.startDate,new Date),i=this.endDate?y()(this.endDate,new Date):1;return this.startDate&&i<0?e=this.textExpired:t>0&&(e=this.textScheduled),e},startDate:function(){return this.row.hasOwnProperty("publish_start_date")?this.row.publish_start_date:""},endDate:function(){return this.row.hasOwnProperty("publish_end_date")?this.row.publish_end_date:""}},filters:w.c},T=E,k=(0,l.c)(T,_,b,!1,null,"01c55ed4",null),C=k.exports,A=function(e,t){return e("span",{staticClass:"tablecell__handle"})},x=[],S={name:"A17TableCellDraggable",mixins:[n.c]},L=S,D=(0,l.c)(L,A,x,!0,null,"5e2e3a3a",null),M=D.exports,I=function(){var e=this,t=e._self._c;return e.row.hasOwnProperty("featured")?t("span",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"tablecell__feature",class:{"tablecell__feature--active":e.row[e.colName]},attrs:{"data-tooltip-title":e.row.featured?"Unfeature":"Feature"},on:{click:function(t){return t.preventDefault(),e.toggleFeatured.apply(null,arguments)}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"star-feature_active"}}),t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"star-feature"}})]):e._e()},O=[],P={name:"A17TableCellFeatured",mixins:[n.c],methods:{toggleFeatured:function(){this.update()}}},B=P,R=(0,l.c)(B,I,O,!1,null,"4b9e917c",null),N=R.exports,F=function(){var e=this,t=e._self._c;return e.col.hasOwnProperty("html")?t("a17-table-cell-html",e._b({on:{update:e.update,editInPlace:e.editInPlace}},"a17-table-cell-html",e.childProps,!1)):t("span",[e._v(e._s(e.row[e.colName]))])},$=[],U=function(){var e=this,t=e._self._c;return t("span",{ref:"cell",staticClass:"tablecell__raw",domProps:{innerHTML:e._s(e.row[e.colName])}})},V=[],q={name:"A1TableCellHtml",mixins:[n.c],mounted(){const e=this.$refs.cell.querySelector('a[data-edit="true"]');e&&e.addEventListener("click",this.preventEditInPlace)}},W=q,H=(0,l.c)(W,U,V,!1,null,null,null),z=H.exports,K={name:"A17TableCellGeneric",mixins:[n.c],computed:{childProps:function(){return this.$props}},components:{"a17-table-cell-html":z}},j=K,G=(0,l.c)(j,F,$,!1,null,"5babcbdd",null),Y=G.exports,X=function(){var e=this,t=e._self._c;return t("span",[e._l(e.displayedLanguages,(function(i){return t("a",{key:i.value,staticClass:"tag tag--disabled",class:{"tag--enabled":i.published},attrs:{href:e.editWithLanguage(i)},on:{click:function(t){return e.editInPlace(t,i)}}},[e._v(" "+e._s(i.shortlabel)+" ")])})),e.languages.length>4?t("a",{staticClass:"more__languages f--small",attrs:{href:e.editWithLanguage(e.languages[0])},on:{click:function(t){return e.editInPlace(t,e.languages[0])}}},[e._v(" + "+e._s(e.languages.length-4)+" more ")]):e._e()],2)},J=[],Q={name:"A17TableCellLanguages",mixins:[n.c],props:{languages:{type:Array,default:function(){return[]}}},computed:{displayedLanguages:function(){return this.languages.slice(0,4)}},methods:{editWithLanguage:function(e){const t={};return t.lang=e.value,this.editWithQuery(t)},editWithQuery:function(e){const t=[];for(const s in e)e.hasOwnProperty(s)&&t.push(encodeURIComponent(s)+"="+encodeURIComponent(e[s]));const i=t.length?"?"+t.join("&"):"";return"#"!==this.editUrl?this.editUrl+i:this.editUrl},editInPlace:function(e,t){this.$emit("editInPlace",e,t)}}},Z=Q,ee=(0,l.c)(Z,X,J,!1,null,"9ab54676",null),te=ee.exports,ie=function(){var e=this,t=e._self._c;return t("span",{staticClass:"tablecell__nested-depth",style:e.cellWidth})},se=[],ae={name:"A17TableCellNested",mixins:[n.c],props:{depth:{type:Number,default:0},offset:{type:Number,default:0}},computed:{cellWidth(){return this.depth>0?{width:80*this.depth-20-this.offset+"px"}:""}}},ne=ae,oe=(0,l.c)(ne,ie,se,!1,null,"20294257",null),re=oe.exports,le=function(){var e=this,t=e._self._c;return e.row.hasOwnProperty("published")?t("span",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"tablecell__pubstate",class:{"tablecell__pubstate--live":e.row[e.colName]},attrs:{"data-tooltip-title":e.row.published?"Unpublish":"Publish"},on:{click:function(t){return t.preventDefault(),e.togglePublish.apply(null,arguments)}}}):e._e()},de=[],ce={name:"A17TableCellPublished",mixins:[n.c],methods:{togglePublish:function(){this.update()}}},ue=ce,he=(0,l.c)(ue,le,de,!1,null,"120b42fa",null),pe=he.exports,me=function(){var e=this,t=e._self._c;return t("div",{class:e.getThumbClasses},[t("a",{attrs:{href:!e.row.hasOwnProperty("deleted")&&e.editUrl},on:{click:function(t){!e.row.hasOwnProperty("deleted")&&e.preventEditInPlace(t)}}},["rounded"===e.col.variation?[t("a17-avatar",{attrs:{name:e.rowTitle,thumbnail:e.row[e.colName]}})]:[t("img",{attrs:{src:e.row[e.colName]}})]],2)])},fe=[],ge=i(8754),_e={name:"A17TableCellThumbNail",mixins:[n.c],components:{"a17-avatar":ge.c},computed:{rowTitle(){var e,t;return null!==(e=null!==(t=this.row.name)&&void 0!==t?t:this.row.title.replace(/<[^>]*>?/gm,""))&&void 0!==e?e:""},getThumbClasses(){return["tablecell__thumb",this.col.variation?"tablecell__thumb--".concat(this.col.variation):""]}}},be=_e,ve=(0,l.c)(be,me,fe,!1,null,"3311a7fc",null),ye=ve.exports;const we=["draggable","bulk","languages","featured","published","thumbnail","publish_start_date","nested"],Ee="a17-table-cell-",Te=c,ke=g,Ce=C,Ae=N,xe=M,Se=te,Le=pe,De=Y,Me=re,Ie=ye;var Oe={[Ee+"actions"]:Te,[Ee+"bulk"]:ke,[Ee+"publish_start_date"]:Ce,[Ee+"featured"]:Ae,[Ee+"draggable"]:xe,[Ee+"generic"]:De,[Ee+"languages"]:Se,[Ee+"published"]:Le,[Ee+"nested"]:Me,[Ee+"thumbnail"]:Ie}},9824:function(e,t,i){"use strict";var s=i(9016),a=i(580);const n=(e,t)=>!s["default"].options.components[e]&&s["default"].component(e,t),o=()=>{"undefined"!==typeof window["TWILL"].TWILL_BLOCKS_COMPONENTS&&window["TWILL"].TWILL_BLOCKS_COMPONENTS.map((e=>n(e,{template:"#"+e,mixins:[a.c]})));const e=e=>"a17-".concat(e.match(/\w+/)[0].replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()),t=i(4836);t.keys().map((i=>{const s=e(i.replace(/customs\//,""));return n(s,t(i).default)}));const o=i(9628);o.keys().map((t=>{const i=e(t);return n(i,o(t).default)}));const r=i(4628);r.keys().map((t=>{const i=e(t);return s["default"].component(i,r(t).default)}));const l=i(9924);l.keys().map((t=>{const i=e(t);return s["default"].component(i,l(t).default)}))};t.c=o},6760:function(e,t,i){"use strict";i.d(t,{c:function(){return A}});var s=i(9016),a=i(3948),n=function(){var e=this,t=e._self._c;return t("div",{staticClass:"container search",class:{"search--dashboard":"dashboard"===e.type}},["dashboard"===e.type?t("transition",{attrs:{name:"fade_search-overlay"}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.readyToShowResult,expression:"readyToShowResult"}],staticClass:"search__overlay",on:{click:e.toggleSearch}})]):e._e(),t("div",{staticClass:"search__input"},[t("input",{ref:"search",staticClass:"form__input",attrs:{type:"search",name:"search",autocomplete:"off",placeholder:e.placeholder},on:{input:e.onSearchInput}}),t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"search"}})]),t("transition",{attrs:{name:"fade_search-overlay"}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.readyToShowResult,expression:"readyToShowResult"}],staticClass:"search__results"},[t("ul",[e._l(e.searchResults,(function(i){return t("li",{key:i.id},[t("a",{staticClass:"search__result",attrs:{href:i.href}},[t("div",{staticClass:"search__cell search__cell--thumb hide--xsmall"},[t("figure",{staticClass:"search__thumb"},[t("img",{attrs:{src:i.thumbnail}})])]),t("div",{staticClass:"search__cell search__cell--pubstate hide--xsmall"},[t("span",{staticClass:"search__pubstate",class:{"search__pubstate--live":i.published}})]),t("div",{staticClass:"search__cell"},[t("span",{staticClass:"search__title"},[e._v(e._s(i.title))]),i.date?t("p",{staticClass:"f--note"},[e._v(" "+e._s(i.activity)+" "),t("timeago",{attrs:{"auto-update":1,datetime:new Date(i.date)}}),e._v(" by "+e._s(i.author)+" "),t("span",{staticClass:"search__type"},[e._v(e._s(i.type))])],1):e._e()])])])})),t("li",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],staticClass:"search__no-result"},[e._v(" "+e._s(e.$trans("dashboard.search.loading","Loading…"))+" ")]),t("li",{directives:[{name:"show",rawName:"v-show",value:e.readyToShowResult&&!e.searchResults.length&&!e.loading,expression:"readyToShowResult && !searchResults.length && !loading"}],staticClass:"search__no-result"},[e._v(" "+e._s(e.$trans("dashboard.search.no-result","No results found."))+" ")])],2)])])],1)},o=[],r=i(9899),l=i.n(r),d=i(3336),c=i.n(d),u=i(400);const h=document.documentElement,p=[u.c.search,u.c.overlay],m=l().CancelToken;let f=m.source();const g=document.querySelector(".header .header__title > a");let _;var b={name:"A17Search",props:{open:{type:Boolean,default:!1},opened:{type:Boolean,default:!1},placeholder:{type:String,default(){return this.$trans("dashboard.search-placeholder","Search everything…")}},endpoint:{type:String,default:null},type:{type:String,default:"header"}},data:function(){return{searchValue:"",loading:!1,readyToShowResult:!1,searchResults:[]}},watch:{open:function(){this.toggleSearch()},opened:function(){this.opened&&(_=this.$refs.search,_.focus())}},methods:{toggleSearch:function(){p.forEach((e=>{h.classList.toggle(e)})),this.open?document.addEventListener("keydown",this.handleKeyDown,!1):(this.$refs.search.blur(),this.searchResults=[],this.searchValue="",this.readyToShowResult=!1,document.removeEventListener("keydown",this.handleKeyDown,!1))},handleKeyDown:function(e){e.keyCode&&9===e.keyCode&&(e.shiftKey?document.activeElement.isEqualNode(g)&&(_.focus(),e.preventDefault()):document.activeElement.isEqualNode(_)&&(g.focus(),e.preventDefault()))},setLastFocusElement:function(){const e=this.searchResults.length;e?setTimeout((function(){_=document.querySelectorAll(".search__result")[e-1]}),1):_=this.$refs.search},fetchSearchResults:function(){const e=this,t={search:this.searchValue};this.loading?(f.cancel(),f=m.source()):this.loading=!0,this.readyToShowResult=!0,this.$http.get(this.endpoint,{params:t,cancelToken:f.token}).then((function(t){e.searchResults=t.data,e.loading=!1,e.setLastFocusElement()}),(function(t){l().isCancel(t)||(e.loading=!1)}))},onSearchInput:c()((function(e){this.searchValue=e.target.value,this.searchValue&&this.searchValue.length>0?("dashboard"===this.type&&p.forEach((e=>{h.classList.add(e)})),this.fetchSearchResults()):("dashboard"===this.type&&p.forEach((e=>{h.classList.remove(e)})),this.readyToShowResult=!1,this.searchResults=[],this.setLastFocusElement())}),300)}},v=b,y=i(2528),w=(0,y.c)(v,n,o,!1,null,"2e1cd2e2",null),E=w.exports;s["default"].use(a.c);const T="searchApp",k={el:"#searchApp",components:{"a17-search":E},props:{topSpacing:{type:Number,default:60}},data:function(){return{open:!1,opened:!1,top:this.topSpacing}},computed:{positionStyle:function(){return{top:this.top+"px"}}},methods:{afterAnimate:function(){this.opened=!0},toggleSearch:function(){this.open=!this.open,this.top=this.topSpacing-(window.pageYOffset||document.documentElement.scrollTop),this.open?document.addEventListener("keydown",this.handleKeyDown,!1):(this.opened=!1,document.removeEventListener("keydown",this.handleKeyDown,!1))},handleKeyDown:function(e){e.keyCode&&27===e.keyCode&&this.toggleSearch()}}},C=!!document.getElementById(T)&&new s["default"](k);var A=C},4540:function(e,t,i){"use strict";i.d(t,{c:function(){return v}});var s=i(9016),a=i(1448);const n=function(){let e=!1,t=!1,i=0;const s=document.documentElement,n=document.querySelector("[data-header-mobile]"),o=document.querySelector(".ham"),r=document.querySelectorAll("[data-ham-btn]"),l=document.querySelectorAll("[data-closenav-btn]"),d=document.querySelector(".a17"),c="s--nav";function u(){return!e&&(!t&&(e=!0,i=window.pageYOffset,s.classList.add(c),d.style.top="-"+i+"px",o.style.top="-"+i+"px",n.style.top="-"+i+"px",document.addEventListener("keydown",p,!1),t=!0,void(e=!1)))}function h(){return!e&&(!!t&&(e=!0,s.classList.remove(c),d.style.top="",o.style.top="",n.style.top="",document.removeEventListener("keydown",p,!1),window.scrollTo(0,i),i=0,t=!1,void(e=!1)))}function p(e){27===e.keyCode&&t&&h()}r.length&&(0,a.c)(r,(function(e){e.addEventListener("click",(function(i){t?h():u(),e.blur()}))})),l.length&&(0,a.c)(l,(function(e){e.addEventListener("click",(function(i){t&&h(),e.blur()}))}))};var o=n,r=i(3336),l=i.n(r);const d=function(){let e=0,t=!1;const i=167,s=document.documentElement,a="s--env";function n(){e=window.pageYOffset,t||window.requestAnimationFrame((function(){o()})),t=!0}function o(){e>i?s.classList.add(a):s.classList.remove(a),t=!1}window.addEventListener("scroll",(function(){n()})),window.addEventListener("resize",l()((function(){n()}))),n()};var c=d;const u=function(){const e=document.querySelector("[data-logout-form]");e&&document.body.addEventListener("click",(t=>{t.target.hasAttribute("data-logout-btn")&&(t.preventDefault(),e.submit())}))};var h=u,p=i(6760),m=i(7060),f=i.n(m),g=i(3624),_=i(1768);e=i.hmd(e);const b=function(){o(),c(),h()};e&&e.hot,g.c.plugin(_.cp),window.Alpine=g.c,g.c.start(),window["TWILL"]||(window["TWILL"]={}),window["TWILL"].vheader=new s["default"]({el:"#headerUser"}),window["TWILL"].vsearch=p.c,console.log("","Made with ".concat("TWILL"," - v").concat(window["TWILL"].version)),f()(window["TWILL"].STORE,window.STORE);var v=b},248:function(e,t,i){"use strict";var s=i(6036);t.c={props:{name:{type:String,default:""},addNew:{type:String,default:""},options:{type:Array,default:function(){return[]}}},computed:{fullOptions:function(){const e=this.optionsByName(this.name),t=this.options;return Array.isArray(e)&&e.forEach((function(e){const i=t.findIndex((t=>t.value===e.value));-1===i&&t.push(e)})),e.length?t:this.options},...(0,s.gV)(["optionsByName"])}}},580:function(e,t){"use strict";t.c={props:{name:{type:String,required:!0},isOpen:{type:Boolean,default:!1}},data:function(){return{opened:this.isOpen}},methods:{open:function(){this.opened=!0},fieldName:function(e){return this.name+"["+e+"]"},repeaterName:function(e){return this.name.replace("[","-").replace("]","")+"|"+e},nestedEditorName:function(e){return this.name.replace("[","-").replace("]","")+"|"+e}}}},4064:function(e,t){"use strict";t.c={props:{buckets:{type:Array,default:()=>[]},item:{type:Object},singleBucket:{type:Boolean,default:!0}},computed:{bucketClasses:function(){return{selected:"bucket"!==this.type&&this.inBuckets,single:this.singleBucket}}},methods:{addToBucket:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.bucket;this.$emit("add-to-bucket",this.item,e)},inBucketById:function(e){const t=this.buckets.findIndex((t=>t.id===e));if(-1===t)return;const i=this.buckets[t].children.find((e=>e.id===this.item.id&&e.content_type.value===this.item.content_type.value));return!!i},restrictedBySource:function(e){const t=this.buckets.find((t=>t.id===e));if(!t)return!1;if(!t.hasOwnProperty("acceptedSources"))return!0;if(0===t.acceptedSources.length)return!0;const i=this.item.content_type.value;return-1!==t.acceptedSources.findIndex((e=>e===i))}}}},7888:function(e,t,i){"use strict";var s=i(948),a=i.n(s);t.c={props:{min:{type:Number,default:0},max:{type:Number,default:0},disabled:{type:Boolean,default:!1},selected:{type:Array,default:function(){return[]}}},data:function(){return{currentValue:this.selected}},watch:{selected:function(e){this.currentValue=e}},computed:{checkedValue:{get:function(){return this.currentValue},set:function(e){a()(e,this.currentValue)||(this.currentValue=e,"undefined"!==typeof this.saveIntoStore&&this.saveIntoStore(e),this.$emit("change",e))}}},methods:{isMax:function(e){return e.length>this.max&&this.max>0},isMin:function(e){return e.length0}}}},844:function(e,t){"use strict";t.c={props:{aspectRatio:{type:Number,default:null},viewMode:{type:Number,default:2},cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},dragMode:{type:String,default:"crop"},rotatable:{type:Boolean,default:!1},scalable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1}},computed:{defaultCropsOpts:function(){return{aspectRatio:this.initAspectRatio,viewMode:this.viewMode,cropBoxResizable:this.cropBoxResizable,cropBoxMovable:this.cropBoxMovable,dragMode:this.dragMode,rotatable:this.rotatable,scalable:this.scalable,zoomable:this.zoomable,guides:!1,center:!1,checkCrossOrigin:!1,background:!1}}}}},9684:function(e,t){"use strict";t.c={props:{draggable:{type:Boolean,default:!0}},data:function(){return{animation:150,handle:".drag__handle",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",scrollSensitivity:30}},computed:{dragOptions:function(){return{animation:this.animation,handle:this.handle,ghostClass:this.ghostClass,chosenClass:this.chosenClass,dragClass:this.dragClass,scrollSensitivity:this.scrollSensitivity,disabled:!this.draggable}}}}},9285:function(e,t){"use strict";t.c={methods:{openEditor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.$root.$refs.editor&&this.$root.$refs.editor.open(e,t)}}}},1308:function(e,t,i){"use strict";var s=i(948),a=i.n(s),n=i(6036),o=i(624);t.c={props:{hasDefaultStore:{type:Boolean,default:!1},inModal:{type:Boolean,default:!1},inStore:{type:String,default:""},fieldName:{type:String,default:""}},computed:{storedValue:function(){return this.inModal?this.modalFieldValueByName(this.getFieldName()):this.fieldValueByName(this.getFieldName())},...(0,n.gV)(["fieldValueByName","modalFieldValueByName"]),...(0,n.ys)({submitting:e=>e.form.loading,fields:e=>e.form.fields,modalFields:e=>e.form.modalFields})},watch:{storedValue:function(e){if(""===this.inStore)return;const t=this[this.inStore],i=this.locale?e[this.locale.value]:e;a()(t,i)||"undefined"!==typeof this.updateFromStore&&this.updateFromStore(i)}},methods:{getFieldName:function(){return""!==this.fieldName?this.fieldName:this.name},saveIntoStore:function(e){if(""===this.inStore)return;let t="";t=e||this[this.inStore];const i={};i.name=this.getFieldName(),i.value=t,this.locale&&(i.locale=this.locale.value),this.inModal?this.$store.commit(o.tt.UPDATE_MODAL_FIELD,i):this.$store.commit(o.tt.UPDATE_FORM_FIELD,i)},preventSubmit:function(){this.$store.commit(o.tt.PREVENT_SUBMIT)},allowSubmit:function(){this.$store.commit(o.tt.ALLOW_SUBMIT)},destroyValue:function(){""!==this.inStore&&(this.inModal?this.$store.commit(o.tt.REMOVE_MODAL_FIELD,this.getFieldName()):this.$store.commit(o.tt.REMOVE_FORM_FIELD,this.getFieldName()))}},beforeMount:function(){const e=this.getFieldName();if(""===this.inStore)return;if(""===e)return;const t=this.inModal?this.modalFields:this.fields,i=t.filter((function(t){return t.name===e}));i.length?this.locale?this[this.inStore]=i[0].value[this.locale.value]:this[this.inStore]=i[0].value:this.hasDefaultStore&&this.saveIntoStore()}}},6960:function(e,t,i){"use strict";var s=i(6036),a=i(624),n=i(8884);t.c={filters:n.c,computed:{...(0,s.ys)({currentLocale:e=>e.language.active})},methods:{formatPermalink:function(e){const t=this.$refs.permalink;if(t&&e){let i="";e.value&&"string"===typeof e.value?i=e.value:"string"===typeof e&&(i=e);const s=this.$options.filters.slugify(i),n={name:t.attributes?t.attributes.name:t.name,value:s};e.locale?n.locale=e.locale:n.locale=this.currentLocale.value,this.$store.commit(a.tt.UPDATE_FORM_FIELD,n)}}}}},5522:function(e,t,i){"use strict";i.d(t,{m6:function(){return s},g$:function(){return o},aS:function(){return c},cr:function(){return p},Eh:function(){return m.c},y_:function(){return f.c},Qf:function(){return g.c},yH:function(){return _}});i(248),i(580);var s={props:{block:{type:Object,default:()=>{}},blockIndex:{type:Number,default:0},blocksLength:{type:Number,default:0}},methods:{selectBlock(){this.$emit("block:select")},unselectBlock(){this.$emit("block:unselect")},deleteBlock(){this.$emit("block:delete")},moveBlock(e){this.$emit("block:move",e)},cloneBlock(){this.$emit("block:clone")},toggleBlockDropdown(){this.blocksLength>1&&this.$refs.blockDropdown&&this.$refs.blockDropdown.toggle()}}},a=i(8316),n=i.n(a),o={props:{editorName:{type:String,required:!0},blocks:{type:Array,default:()=>[]},savedBlocksLength:{type:Number,default:0}},methods:{addAndEditBlock(e,t,i){let{block:s,index:a}=i;window["TWILL"].PREVSTATE=n()(this.$store.state),e(s,a),t(a)},saveBlock(e,t){window["TWILL"].hasOwnProperty("PREVSTATE")&&delete window["TWILL"].PREVSTATE,this.unselectBlock(e,t),this.$emit("block:save",t)},cancelBlock(e,t){window["TWILL"].hasOwnProperty("PREVSTATE")&&(console.warn("Store - Restore previous Store state"),this.$store.replaceState(window["TWILL"].PREVSTATE)),this.unselectBlock(e,t),this.$emit("block:cancel",t)},selectBlock(e,t){window["TWILL"].PREVSTATE=n()(this.$store.state),e(),this.$emit("block:select",t)},unselectBlock(e,t){e(),window["TWILL"].hasOwnProperty("PREVSTATE")&&delete window["TWILL"].PREVSTATE,this.$emit("block:unselect",t)},moveBlock(e){this.$emit("block:move",e)},cloneBlock(e){e(),this.$emit("block:clone")},deleteBlock(e){this.$root.$refs.warningContentEditor?this.$root.$refs.warningContentEditor.open((()=>{e(),this.$emit("block:delete")})):(e(),this.$emit("block:delete"))}}},r=(i(4064),i(7888),i(844),i(6036)),l=i(7632),d=i(624),c={props:{nested:{type:Boolean,default:!1},bulkeditable:{type:Boolean,default:!0},emptyMessage:{type:String,default:""}},computed:{rows:{get(){return this.$store.state.datatable.data},set(e){const t=this.rows.length!==e.length;this.$store.commit(d.ec.UPDATE_DATATABLE_DATA,e),this.saveNewTree(t)}},isEmpty:function(){return this.rows.length<=0},isEmptyDatable:function(){return{"datatable__table--empty":this.isEmpty}},...(0,r.ys)({columns:e=>e.datatable.columns}),...(0,r.gV)(["visibleColumns","hideableColumns","visibleColumnsNames"])},methods:{saveNewTree:function(e){const t=!!e||this.nested,i=t?l.cp.SET_DATATABLE_NESTED:l.cp.SET_DATATABLE,s=()=>{this.$store.commit(d.ec.UPDATE_DATATABLE_TRACKER,0),this.$store.dispatch(i)};e?(this.$store.commit(d.ec.UPDATE_DATATABLE_TRACKER,1),this.updateTracker>=2&&s()):s()}}},u=i(4532),h=i(1832),p={props:{index:{type:Number,default:0},row:{type:Object,default:function(){return{}}},columns:{type:Array,default:function(){return[]}}},computed:{editInModal:function(){return!!this.row.hasOwnProperty("editInModal")&&this.row.editInModal},editUrl:function(){return this.row.hasOwnProperty("edit")?this.row.edit:"#"},updateUrl:function(){return this.row.updateUrl?this.row.updateUrl:"#"},...(0,r.ys)({bulkIds:e=>e.datatable.bulk})},methods:{currentComponent(e){var t;return"object"===typeof e?u.oD+(null!==(t=e.specificType)&&void 0!==t?t:e.name.toLowerCase()):u.oD+e},currentComponentProps(e){const t={col:e||{},row:this.row,editUrl:this.editUrl,editInModal:Boolean(this.editInModal)};if(!e)return t;switch(e.name){case"bulk":t.value=this.row.id,t.initialValue=this.bulkIds;break;case"languages":t.languages=this.row.hasOwnProperty("languages")?this.row.languages:[],t.editUrl=this.editUrl;break;case"publish_start_date":t.startDate="",t.endDate="";break;default:break}return t},editInPlace:function(e){if(e.lang){const t=e.lang;this.$store.commit(d.cp.UPDATE_LANG,t.value)}if(this.editInModal){const e=this.editInModal;this.$store.commit(d.WI.UPDATE_MODAL_MODE,"update"),this.$store.commit(d.WI.UPDATE_MODAL_ACTION,this.updateUrl),this.$store.commit(d.tt.UPDATE_FORM_LOADING,!0),this.$store.dispatch(l.cp.REPLACE_FORM,e).then((()=>{this.$nextTick((function(){this.$root.$refs.editionModal&&this.$root.$refs.editionModal.open()}))}),(e=>{this.$store.commit(h.cp.SET_NOTIF,{message:"Your content can not be edited, please retry",variant:"error"})}))}},cellClasses:function(e,t){return{[t+"--icon"]:"featured"===e.name||"published"===e.name,[t+"--bulk"]:"bulk"===e.name,[t+"--thumb"]:"thumbnail"===e.name,[t+"--draggable"]:"draggable"===e.name,[t+"--languages"]:"languages"===e.name,[t+"--nested"]:"nested"===e.name,[t+"--nested--parent"]:"nested"===e.name&&0===this.nestedDepth}},isSpecificColumn:function(e){var t;return u.G_.includes(null!==(t=e.specificType)&&void 0!==t?t:e.name)},tableCellUpdate:function(e){switch(e.col){case"published":this.togglePublish(e.row);break;case"bulk":this.toggleBulk(e.row);break;case"featured":this.toggleFeatured(e.row);break}},toggleFeatured:function(e){e.hasOwnProperty("deleted")?this.$store.commit(h.cp.SET_NOTIF,{message:"You can’t feature/unfeature a deleted item, please restore it first.",variant:"error"}):this.$store.dispatch(l.cp.TOGGLE_FEATURE,e)},toggleBulk:function(e){this.$store.commit(d.ec.UPDATE_DATATABLE_BULK,e.id)},togglePublish:function(e){e.hasOwnProperty("deleted")?this.$store.commit(h.cp.SET_NOTIF,{message:"You can’t publish/unpublish a deleted item, please restore it first.",variant:"error"}):this.$store.dispatch(l.cp.TOGGLE_PUBLISH,e)},restoreRow:function(e){this.$store.dispatch(l.cp.RESTORE_ROW,e)},destroyRow:function(e){this.$root.$refs.warningDestroyRow?this.$root.$refs.warningDestroyRow.open((()=>{this.$store.dispatch(l.cp.DESTROY_ROW,e)})):this.$store.dispatch(l.cp.DESTROY_ROW,e)},deleteRow:function(e){this.$root.$refs.warningDeleteRow?this.$root.$refs.warningDeleteRow.open((()=>{this.$store.dispatch(l.cp.DELETE_ROW,e)})):this.$store.dispatch(l.cp.DELETE_ROW,e)},duplicateRow:function(e){this.$store.dispatch(l.cp.DUPLICATE_ROW,e)}}},m=i(9684),f=i(9285),g=i(6960),_=(i(1308),i(5284),i(5272),i(1200),i(6456),i(6716),{props:{nested:{type:Boolean,default:!1},maxDepth:{type:Number,default:1},depth:{type:Number,default:0},name:{type:String,default:"group1"},parentId:{type:Number,default:-1}},data(){return{currentElDepth:void 0}},computed:{updateTracker(){return this.$store.state.datatable.updateTracker},draggableGetComponentData:function(){return{props:{depth:this.depth}}}}});i(4992),i(4768),i(6304)},5284:function(e,t){"use strict";t.c={props:{autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},direction:{type:String,default:"auto"},name:{default:""},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"on"}}}},5272:function(e,t){"use strict";function i(e){const t=e.length;return e.reduce((function(e,i,s){return e+(s-1===t?", ":" and ")+i}))}t.c={props:{label:{type:String,default:""},labelFor:{type:String,default:""},size:{type:String,default:"large"},variant:{type:String,default:""},fixedErrorKey:{type:String},note:{type:String,default:""}},computed:{errorKey(){return this.fixedErrorKey?this.hasLocale?this.fixedErrorKey.replace("[",".").replace("]",""):this.fixedErrorKey:this.hasLocale?this.name.replace("[",".").replace("]",""):this.name},errorLocales(){if(!this.hasLocale)return[];const e=this.errorKey.substr(0,this.errorKey.indexOf(".")),t=[],i=this.$store.state.language.all.map((e=>e.value));return Object.keys(this.$store.state.form.errors).forEach((s=>{if(s.substr(0,s.indexOf("."))===e){const e=s.substr(s.indexOf(".")+1,s.length);i.includes(e)&&t.push(e)}}),[]),t},otherLocalesError(){return this.errorLocales.filter((e=>e!==this.currentLocale.value)).length},errorMessageLocales(){return i(this.errorLocales.map((e=>this.languages.find((t=>t.value===e)).label)))+" language"+(this.errorLocales.length>1?"s":"")+" missing details."},errorMessage(){return this.error?this.$store.state.form.errors[this.errorKey][0]:""},error(){return!!this.$store.state.form&&Object.keys(this.$store.state.form.errors).includes(this.errorKey)}}}},1200:function(e,t,i){"use strict";var s=i(6036);t.c={props:{locale:{default:null}},computed:{hasLocale:function(){return null!=this.locale},hasCurrentLocale:function(){return null!=this.currentLocale},isCurrentLocale:function(){return!this.hasLocale||!this.hasCurrentLocale||this.locale.value===this.currentLocale.value},isLocaleRTL:function(){const e=["ar","arc","dv","fa","ha","he","khw","ks","ku","ps","ur","yi"];return!!this.hasLocale&&e.includes(this.locale.shortlabel.toLowerCase())},dirLocale:function(){return this.direction&&"auto"!==this.direction?this.direction:this.isLocaleRTL?"rtl":"auto"},displayedLocale:function(){return!!this.hasLocale&&this.locale.shortlabel},...(0,s.ys)({currentLocale:e=>e.language.active,languages:e=>e.language.all})},methods:{onClickLocale:function(){this.$emit("localize",this.locale)},updateLocale:function(e){this.$emit("localize",e)}}}},6456:function(e,t,i){"use strict";var s=i(6036);t.c={props:{items:{type:Array,default:()=>[]},selectedItems:{type:Array,default:()=>[]},usedItems:{type:Array,default:()=>[]}},computed:{...(0,s.ys)({itemsLoading:e=>e.mediaLibrary.loading}),replacingMediaIds:function(){return this.itemsLoading.reduce(((e,t)=>(t.isReplacement&&(e[t.replacementId]=t.id),e)),{})}},methods:{isSelected:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["id"];return Boolean(this.selectedItems.find((i=>t.every((t=>i[t]===e[t])))))},isUsed:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["id"];return Boolean(this.usedItems.find((i=>t.every((t=>i[t]===e[t])))))},toggleSelection:function(e){this.$emit("change",e)},shiftToggleSelection:function(e){this.$emit("shiftChange",e,!0)}}}},6716:function(e,t,i){"use strict";var s=i(624);t.c={props:{type:{type:String,default:"image"}},methods:{openMediaLibrary:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.name,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.$store.commit(s.ol.UPDATE_MEDIA_CONNECTOR,t),this.$store.commit(s.ol.UPDATE_MEDIA_TYPE,this.type),this.$store.commit(s.ol.UPDATE_REPLACE_INDEX,i),this.$store.commit(s.ol.UPDATE_MEDIA_MAX,e),this.$store.commit(s.ol.UPDATE_MEDIA_MODE,!0),this.$store.commit(s.ol.UPDATE_MEDIA_FILESIZE_MAX,this.filesizeMax||0),this.$store.commit(s.ol.UPDATE_MEDIA_WIDTH_MIN,this.widthMin||0),this.$store.commit(s.ol.UPDATE_MEDIA_HEIGHT_MIN,this.heightMin||0),this.$root.$refs.mediaLibrary&&this.$root.$refs.mediaLibrary.open()}}}},4992:function(e,t){"use strict";t.c={data:function(){return{randKey:Date.now()+Math.floor(9999*Math.random())}}}},3462:function(e,t,i){"use strict";var s=i(6036);t.c={data:function(){return{shouldRetrySubmitWhenAllowed:!1}},computed:{...(0,s.ys)({isSubmitPrevented:e=>e.form.isSubmitPrevented})},watch:{isSubmitPrevented:function(e){!e&&this.shouldRetrySubmitWhenAllowed&&(this.shouldRetrySubmitWhenAllowed=!1,this.retrySubmit())}},methods:{retrySubmit:function(){this.submitForm?this.submitForm():this.submit&&this.submit()}}}},4768:function(e,t){"use strict";t.c={props:{col:{type:Object,default:()=>{}},row:{type:Object,default:()=>{}},editUrl:{type:String,default:"#"},editInModal:{type:Boolean,default:!1}},computed:{colName:function(){return this.col.hasOwnProperty("name")?this.col.name:""}},methods:{update:function(){this.$emit("update",{row:this.row,col:this.colName})},preventEditInPlace:function(e){this.editInModal&&e.preventDefault(),this.editInPlace()},editInPlace:function(e,t){this.$emit("editInPlace",{event:e,lang:t})},restoreRow:function(){this.$emit("restoreRow",this.row)},destroyRow:function(){this.$emit("destroyRow",this.row)},deleteRow:function(){this.$emit("deleteRow",this.row)},duplicateRow:function(){this.$emit("duplicateRow",this.row)}}}},6304:function(e,t){"use strict";t.c={props:{open:{type:Boolean,default:!1}},data:function(){return{visible:this.open}},computed:{visibilityClasses:function(){return{"s--open":this.visible}}},methods:{onClickVisibility:function(){this.visible=!this.visible,this.$emit("toggleVisibility",this.visible)}}}},3948:function(e,t,i){"use strict";i.d(t,{c:function(){return Sn}});var s,a,n=i(9899),o=i.n(n),r=i(9448),l=i.n(r),d=i(6452),c=i.n(d),u=i(6984),h=i(8754),p=function(){var e=this,t=e._self._c;return t("div",{staticClass:"browserField"},[e.buttonOnTop&&e.remainingItems?t("div",{staticClass:"browserField__trigger"},[t("a17-button",{attrs:{type:"button",disabled:e.disabled||e.connectedBrowserField&&0===e.connectedBrowserFieldItems.length,variant:"ghost"},on:{click:e.openBrowser}},[e._v(" "+e._s(e.addLabel)+" ")]),t("input",{attrs:{type:"hidden",name:e.name},domProps:{value:e.itemsIds}}),t("span",{staticClass:"browserField__note f--small"},[e._t("default")],2)],1):e._e(),e.items.length?t("table",{staticClass:"browserField__table"},[t("draggable",{attrs:{tag:"tbody",disabled:e.disabled},model:{value:e.items,callback:function(t){e.items=t},expression:"items"}},e._l(e.items,(function(i,s){return t("a17-browseritem",{key:i.endpointType+"_"+i.id,staticClass:"item__content",attrs:{name:"".concat(e.name,"_").concat(i.id),draggable:!e.disabled&&e.draggable,item:i,disabled:e.disabled,max:e.max,showType:e.endpoints.length>0},on:{delete:function(t){return e.deleteItem(s)}}})})),1)],1):e._e(),!e.buttonOnTop&&e.remainingItems?t("div",{staticClass:"browserField__trigger"},[t("a17-button",{attrs:{type:"button",disabled:e.disabled||e.connectedBrowserField&&0===e.connectedBrowserFieldItems.length,variant:"ghost"},on:{click:e.openBrowser}},[e._v(" "+e._s(e.addLabel)+" ")]),t("input",{attrs:{type:"hidden",name:e.name},domProps:{value:e.itemsIds}}),t("span",{staticClass:"browserField__note f--small"},[e._t("default")],2)],1):e._e()])},m=[],f=i(7052),g=i.n(f),_=i(6036),b=i(9684),v=i(624),y=function(){var e=this,t=e._self._c;return t("tr",{staticClass:"browserItem"},[e.draggable&&e.max>1?t("td",{staticClass:"browserItem__cell browserItem__cell--drag"},[t("div",{class:e.dragClasses})]):e._e(),e.hasThumbnail?t("td",{class:e.thumbnailClasses},[e.isUser?[t("a17-avatar",{attrs:{name:e.currentItem.name,thumbnail:e.currentItem.thumbnail}})]:[t("a",{attrs:{href:"#",target:"_blank"}},[t("img",{attrs:{src:e.currentItem.thumbnail}})])]],2):e._e(),t("td",{staticClass:"browserItem__cell browserItem__cell--name"},[t("a",{attrs:{href:e.currentItem.edit,target:"_blank"}},[e.currentItem.hasOwnProperty("renderHtml")?t("span",{staticClass:"f--link-underlined--o",domProps:{innerHTML:e._s(e.currentItem.name)}}):t("span",{staticClass:"f--link-underlined--o"},[e._v(e._s(e.currentItem.name))])]),t("input",{attrs:{type:"hidden",name:e.name},domProps:{value:e.currentItem.id}})]),e.currentItem.hasOwnProperty("endpointType")&&e.showType?t("td",{staticClass:"browserItem__cell browserItem__cell--type"},[t("span",[e._v(e._s(e.currentItem.endpointType))])]):e._e(),e.deletable?t("td",{staticClass:"browserItem__cell browserItem__cell--icon"},[e.disabled?e._e():t("a17-button",{staticClass:"bucket__action",attrs:{icon:"close"},on:{click:function(t){return e.deleteItem()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"close_icon"}})])],1):e._e()])},w=[],E={name:"A17BrowserItem",props:{name:{type:String,required:!0},draggable:{type:Boolean,default:!1},item:{type:Object,default:function(){return{}}},max:{type:Number,default:10},showType:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:function(){return{handle:".item__handle"}},computed:{hasThumbnail:function(){return Boolean(this.currentItem.hasOwnProperty("thumbnail"))},hasLargeThumbnail:function(){return this.hasThumbnail&&!this.isUser},isUser:function(){return Boolean("users"===this.currentItem.endpointType)},dragClasses:function(){return["drag__handle--drag",this.hasLargeThumbnail?"":"drag__handle--drag-small"]},thumbnailClasses:function(){return["browserItem__cell","browserItem__cell--thumb",this.isUser?"browserItem__cell--thumb-avatar":""]},currentItem:function(){return this.item},deletable:function(){return!this.currentItem.hasOwnProperty("deletable")||!0===this.currentItem.deletable}},methods:{deleteItem:function(){this.$emit("delete")}}},T=E,k=i(2528),C=(0,k.c)(T,y,w,!1,null,"19917f52",null),A=C.exports,x={name:"A17BrowserField",components:{"a17-browseritem":A,draggable:g()},mixins:[b.c],props:{name:{type:String,required:!0},modalTitle:{type:String,default:""},browserNote:{type:String,default:""},itemLabel:{type:String,default:"Item"},endpoint:{type:String,default:""},endpoints:{type:Array,default:()=>[]},draggable:{type:Boolean,default:!0},max:{type:Number,default:10},wide:{type:Boolean,default:!1},buttonOnTop:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},connectedBrowserField:{type:String,defautl:null}},data:function(){return{handle:".item__handle"}},computed:{remainingItems:function(){return this.max-this.items.length},addLabel:function(){return this.$trans("fields.browser.add-label","Add")+" "+this.itemLabel},browserTitle:function(){return""!==this.modalTitle?this.modalTitle:this.addLabel},items:{get(){return this.selectedBrowser.hasOwnProperty(this.name)&&this.selectedBrowser[this.name]||[]},set(e){this.$store.commit(v.ai.REORDER_ITEMS,{name:this.name,items:e})}},itemsIds:function(){return this.selectedItemsByIds[this.name]?this.selectedItemsByIds[this.name].join():""},connectedBrowserFieldItems:function(){return this.selectedBrowser[this.connectedBrowserField]||[]},...(0,_.ys)({selectedBrowser:e=>e.browser.selected}),...(0,_.gV)(["selectedItemsByIds"])},methods:{deleteAll:function(){this.$store.commit(v.ai.DESTROY_ITEMS,{name:this.name})},deleteItem:function(e){this.$store.commit(v.ai.DESTROY_ITEM,{name:this.name,index:e})},openBrowser:function(){if(this.$store.commit(v.ai.UPDATE_BROWSER_CONNECTOR,this.name),this.endpoints.length>0)this.$store.commit(v.ai.UPDATE_BROWSER_ENDPOINTS,this.endpoints);else{this.$store.commit(v.ai.DESTROY_BROWSER_ENDPOINTS);let e=this.endpoint;if(this.connectedBrowserFieldItems.length){let t="?";e.indexOf("?")>-1&&(t="&"),e=e+t+"connectedBrowserIds= "+encodeURIComponent(JSON.stringify(this.connectedBrowserFieldItems.map((e=>e.id))))}this.$store.commit(v.ai.UPDATE_BROWSER_ENDPOINT,{value:e,label:this.name})}this.$store.commit(v.ai.UPDATE_BROWSER_MAX,this.max),this.$store.commit(v.ai.UPDATE_BROWSER_TITLE,this.browserTitle),this.$store.commit(v.ai.UPDATE_BROWSER_NOTE,this.browserNote),this.wide?this.$root.$refs.browserWide.open(this.endpoints.length<=0):this.$root.$refs.browser.open(this.endpoints.length<=0)},destroyValue:function(){this.deleteAll()}},watch:{connectedBrowserFieldItems(e){this.connectedBrowserField&&0===e.length&&this.deleteAll()}}},S=x,L=(0,k.c)(S,p,m,!1,null,"0ddc4be5",null),D=L.exports,M={name:"A17Button",props:{el:{type:String,default:"button"},type:{type:String,default:"button"},href:{type:String,default:""},target:{type:String,default:""},download:{type:String,default:""},rel:{type:String,default:""},variant:{type:String,default:""},icon:{default:""},disabled:{type:Boolean,default:!1},size:{type:String,default:""}},computed:{buttonClasses:function(){const e=["button",this.size?"button--".concat(this.size):""];return this.variant&&this.variant.split(" ").forEach((t=>{e.push("button--".concat(t))})),this.icon&&e.push("button--icon button--".concat(this.icon)),e}},methods:{onClick:function(e){this.$emit("click")}},render:function(e){const t={class:this.buttonClasses,attrs:{},on:{click:e=>{this.onClick(e)}}};return"button"===this.el&&(t.attrs.type=this.type,this.disabled&&(t.attrs.disabled=this.disabled)),"a"===this.el&&this.href&&(t.attrs.href=this.href,this.target&&(t.attrs.target=this.target),this.download&&(t.attrs.download=this.download),this.rel&&(t.attrs.rel=this.rel)),e(this.el,t,this.$slots.default)}},I=M,O=(0,k.c)(I,s,a,!1,null,"59eeac35",null),P=O.exports,B=function(){var e=this,t=e._self._c;return t("div",{class:e.barClasses},[e._t("default")],2)},R=[],N={name:"A17Buttonbar",props:{type:{type:String,default:"button"},variant:{type:String,default:""}},computed:{barClasses:function(){return["buttonbar",this.variant?"buttonbar--".concat(this.variant):""]}}},F=N,$=(0,k.c)(F,B,R,!1,null,"7223fc6a",null),U=$.exports,V=function(){var e=this,t=e._self._c;return t("span",{staticClass:"checkbox"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.checkedValue,expression:"checkedValue"}],key:e.uniqId,staticClass:"checkbox__input",class:e.checkboxClasses,attrs:{type:"checkbox",name:e.name,id:e.uniqId,disabled:e.disabled},domProps:{value:e.value,checked:Array.isArray(e.checkedValue)?e._i(e.checkedValue,e.value)>-1:e.checkedValue},on:{change:function(t){var i=e.checkedValue,s=t.target,a=!!s.checked;if(Array.isArray(i)){var n=e.value,o=e._i(i,n);s.checked?o<0&&(e.checkedValue=i.concat([n])):o>-1&&(e.checkedValue=i.slice(0,o).concat(i.slice(o+1)))}else e.checkedValue=a}}}),t("label",{staticClass:"checkbox__label",attrs:{for:e.uniqId}},[e._v(e._s(e.label)+" "),t("span",{staticClass:"checkbox__icon"},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"check"}})])])])},q=[],W=i(4992),H={name:"A17Checkbox",mixins:[W.c],props:{value:{default:""},initialValue:{default:function(){return[]}},name:{type:String,default:""},theme:{type:String,default:""},label:{type:String,default:""},disabled:{type:Boolean,default:!1}},computed:{uniqId:function(e){return this.name+"_"+this.value+"-"+this.randKey},checkboxClasses:function(){return[this.theme?"checkbox__input--".concat(this.theme):""]},checkedValue:{get:function(){return this.initialValue},set:function(e){this.$emit("change",e)}}}},z=H,K=(0,k.c)(z,V,q,!1,null,"20e8e5e7",null),j=K.exports,G=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,name:e.name}},[t("ul",{staticClass:"checkboxGroup",class:e.checkboxClasses},e._l(e.options,(function(i){return t("li",{key:i.value,staticClass:"checkboxGroup__item"},[t("a17-checkbox",{attrs:{name:e.name,value:i.value,label:i.label,initialValue:e.currentValue,disabled:i.disabled||e.disabled},on:{change:e.changeValue}})],1)})),0)])},Y=[],X=i(948),J=i.n(X),Q=i(7888),Z=i(1308),ee=i(5272),te={name:"A17CheckboxGroup",props:{name:{type:String,default:""},inline:{type:Boolean,default:!1},options:{type:Array,default:function(){return[]}}},mixins:[ee.c,Q.c,Z.c],computed:{checkboxClasses:function(){return[this.inline?"checkboxGroup--inline":""]}},methods:{formatValue:function(e,t){const i=this;if(!e)return;if(!t)return;const s=this.isMax(e),a=this.isMin(e);(s||a)&&(J()(t,i.checkedValue)||(i.checkedValue=t))},updateFromStore:function(e){this.updateValue(e)},updateValue:function(e){this.checkedValue=e},changeValue:function(e){J()(e,this.currentValue)||this.updateValue(e)}},mounted:function(){this.max+this.min>0&&this.$watch("currentValue",this.formatValue,{immediate:!0})}},ie=te,se=(0,k.c)(ie,G,Y,!1,null,"3e53c5c2",null),ae=se.exports,ne=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,name:e.name,required:e.required}},[t("div",{staticClass:"form__field",class:e.textfieldClasses},[t("input",{attrs:{type:"text",placeholder:e.placeholder,name:e.name,id:e.name,disabled:e.disabled,required:e.required,readonly:e.readonly,autofocus:e.autofocus,autocomplete:e.autocomplete,maxlength:"7"},domProps:{value:e.value},on:{focus:e.onFocus,blur:e.onBlur,input:e.onInput}}),t("a17-dropdown",{ref:"colorDropdown",staticClass:"form__field--color",attrs:{position:"bottom-right",arrow:!0,offset:15,minWidth:300,clickable:!0,sideOffset:15},on:{close:e.saveIntoStore}},[t("span",{staticClass:"form__field--colorBtn",style:e.bcgStyle,on:{click:function(t){return e.$refs.colorDropdown.toggle()}}}),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[t("a17-colorpicker",{attrs:{color:e.value},on:{change:e.updateValueFromPicker}})],1)])],1)])},oe=[],re=function(){var e=this,t=e._self._c;return t("div",{staticClass:"colorpicker"},[t("div",{staticClass:"colorpicker__color"},[t("div",{ref:"satContainer",staticClass:"colorpicker__saturation",style:{background:e.bgColor},on:{mousedown:function(t){return e.handleMouseDown("saturation")}}},[t("div",{staticClass:"colorpicker__saturation--white"}),t("div",{staticClass:"colorpicker__saturation--black"}),t("div",{staticClass:"colorpicker__saturation-pointer",style:{top:e.satPointerTop,left:e.satPointerLeft}},[t("div",{staticClass:"colorpicker__saturation-circle"})])]),t("div",{staticClass:"colorpicker__hue colorpicker__hue--vertical"},[t("div",{ref:"hueContainer",staticClass:"colorpicker__hue-container",on:{mousedown:function(t){return e.handleMouseDown("hue")}}},[t("div",{staticClass:"colorpicker__hue-pointer",style:{top:e.huePointerTop,left:e.huePointerLeft}},[t("div",{staticClass:"colorpicker__hue-picker"})])])])])])},le=[],de=i(9212),ce=i.n(de),ue=i(3448),he={name:"a17ColorPicker",props:{color:{type:String,required:!0},direction:{type:String,default:"vertical"}},data:function(){return{currentColor:(0,ue.c)(this.color),currentColorHue:(0,ue.c)(this.color).toHsv().h,currentTarget:"",pullDirection:""}},computed:{bgColor(){return"hsl(".concat(this.currentColorHue,", 100%, 50%)")},satPointerTop(){return-100*this.currentColor.toHsv().v+1+100+"%"},satPointerLeft(){return 100*this.currentColor.toHsv().s+"%"},huePointerTop(){return"vertical"===this.direction?0===this.currentColorHue&&"right"===this.pullDirection?0:-100*this.currentColorHue/360+100+"%":0},huePointerLeft(){return"vertical"===this.direction?0:0===this.currentColorHue&&"right"===this.pullDirection?"100%":100*this.currentColorHue/360+"%"}},methods:{throttle:ce()(((e,t)=>{e(t)}),20,{leading:!0,trailing:!1}),satHandleChange(e,t){!t&&e.preventDefault();const i=this.$refs.satContainer;if(!i)return;const s=i.clientWidth,a=i.clientHeight,n=i.getBoundingClientRect().left+window.pageXOffset,o=i.getBoundingClientRect().top+window.pageYOffset,r=e.pageX||(e.touches?e.touches[0].pageX:0),l=e.pageY||(e.touches?e.touches[0].pageY:0);let d=r-n,c=l-o;d<0?d=0:d>s?d=s:c<0?c=0:c>a&&(c=a);const u=d/s;let h=-c/a+1;h=h>0?h:0,h=h>1?1:h,this.throttle(this.onChange,{h:this.currentColorHue,s:u,v:h,a:this.currentColor.toHsv().a})},hueHandleChange(e,t){!t&&e.preventDefault();const i=this.$refs.hueContainer,s=i.clientWidth,a=i.clientHeight,n=i.getBoundingClientRect().left+window.pageXOffset,o=i.getBoundingClientRect().top+window.pageYOffset,r=e.pageX||(e.touches?e.touches[0].pageX:0),l=e.pageY||(e.touches?e.touches[0].pageY:0),d=r-n,c=l-o;let u,h;"vertical"===this.direction?c<0?u=360:c>a?u=0:(h=-100*c/a+100,u=360*h/100):d<0?u=0:d>s?u=360:(h=100*d/s,u=360*h/100),this.currentColorHue!==u&&this.throttle(this.onChange,{h:u,s:this.currentColor.toHsl().s,l:this.currentColor.toHsl().l,a:this.currentColor.toHsl().a,source:"hsl"})},handleMouseDown(e){this.currentTarget=e,"saturation"===this.currentTarget?(window.addEventListener("mousemove",this.satHandleChange),window.addEventListener("mouseup",this.satHandleChange)):(window.addEventListener("mousemove",this.hueHandleChange),window.addEventListener("mouseup",this.hueHandleChange)),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){"saturation"===this.currentTarget?(window.removeEventListener("mousemove",this.satHandleChange),window.removeEventListener("mouseup",this.satHandleChange)):(window.removeEventListener("mousemove",this.hueHandleChange),window.removeEventListener("mouseup",this.hueHandleChange)),window.removeEventListener("mouseup",this.handleMouseUp)},onChange(e){this.currentColor=(0,ue.c)(e),this.currentColorHue=e.h,this.$emit("change",this.currentColor.toHexString())}}},pe=he,me=(0,k.c)(pe,re,le,!1,null,null,null),fe=me.exports,ge=i(5284),_e={name:"a17ColorField",mixins:[ge.c,ee.c,Z.c],props:{name:{type:String,required:!0},initialValue:{default:""},defaultValue:{default:""}},components:{"a17-colorpicker":fe},data:function(){return{focused:!1,value:this.initialValue}},mounted(){""===this.value&&""!==this.defaultValue&&this.updateValue(this.defaultValue)},computed:{bcgStyle:function(){return{"background-color":""!==this.value?this.value:"transparent"}},textfieldClasses:function(){return{"s--focus":this.focused,"s--disabled":this.disabled}}},methods:{updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&(this.value=e)},updateValueFromPicker:function(e){this.value!==e&&(this.value=e)},updateValue:function(e){this.value!==e&&(this.value=e,this.saveIntoStore())},onBlur:function(e){const t=e.target.value;this.updateValue(t),this.focused=!1},onFocus:function(){this.focused=!0},onInput:function(){}}},be=_e,ve=(0,k.c)(be,ne,oe,!1,null,"09f5e603",null),ye=ve.exports,we=function(){var e=this,t=e._self._c;return t("a17-inputframe",{staticClass:"datePicker",class:{"datePicker--static":e.staticMode,"datePicker--mobile":e.isMobile},attrs:{name:e.name,error:e.error,note:e.note,label:e.label,"label-for":e.uniqId,required:e.required}},[t("div",{ref:e.refs.flatPicker,staticClass:"datePicker__group"},[t("div",{staticClass:"form__field datePicker__field"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.date,expression:"date"}],attrs:{type:"text",name:e.name,id:e.uniqId,required:e.required,placeholder:e.placeHolder,"data-input":"",disabled:e.disabled},domProps:{value:e.date},on:{blur:e.onBlur,input:function(t){t.target.composing||(e.date=t.target.value)}}}),e.clear?t("a",{staticClass:"datePicker__reset",class:{"datePicker__reset--cleared":!e.date},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.onClear.apply(null,arguments)}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"close_icon"}})]):e._e()])])])},Ee=[],Te=i(4685),ke=i.n(Te),Ce=i(2112),Ae=i(8904),xe={name:"A17DatePicker",mixins:[W.c,ee.c,Z.c],props:{name:{type:String,default:"date"},required:{type:Boolean,default:!1},placeHolder:{type:String,default:""},allowInput:{type:Boolean,default:!1},enableTime:{type:Boolean,default:!1},noCalendar:{type:Boolean,default:!1},time_24hr:{type:Boolean,default:(0,Ae.Yt)()},altFormat:{type:String,default:null},inline:{type:Boolean,default:!1},initialValue:{type:String,default:null},hourIncrement:{type:Number,default:1},minuteIncrement:{type:Number,default:30},staticMode:{type:Boolean,default:!1},minDate:{type:String,default:null},maxDate:{type:String,default:null},disabled:{type:Boolean,default:!1},mode:{type:String,default:"single",validator:function(e){return"single"===e||"multiple"===e||"range"===e}},clear:{type:Boolean,default:!1}},data:function(){return{date:this.initialValue,isMobile:!1,flatPicker:null,refs:{flatPicker:"flatPicker"}}},computed:{uniqId:function(e){return this.name+"-"+this.randKey},altFormatComputed:function(){return null!==this.altFormat?this.altFormat:"F j, Y"+(this.enableTime?this.time_24hr||(0,Ae.Yt)()?" H:i":" h:i K":"")}},methods:{config:function(){const e=this,t={wrap:!0,altInput:!0,altFormat:e.altFormatComputed,dateFormat:e.enableTime?"Z":"Y-m-d",static:e.staticMode,appendTo:e.staticMode?e.$refs[e.refs.flatPicker]:void 0,enableTime:e.enableTime,noCalendar:e.noCalendar,time_24hr:e.time_24hr,inline:e.inline,allowInput:e.allowInput,mode:e.mode,minuteIncrement:e.minuteIncrement,hourIncrement:e.hourIncrement,minDate:e.minDate,altInputClass:"flatpickr-input form-control",maxDate:e.maxDate,parseDate:function(e,t){const i="yyyy-MM-dd HH:mm:ss";if(e.length===i.length)return ke()(e+"Z",i+"X",Date.UTC());const s="yyyy-MM-dd HH:mm";if(e.length===s.length)return ke()(e+"Z",i+"X",Date.UTC());const a="yyyy-MM-dd";return e.length===a.length?ke()(e,a,Date.UTC()):new Date(e)},onOpen:function(){setTimeout((function(){e.flatPicker.set("maxDate",e.maxDate),e.flatPicker.set("minDate",e.minDate),e.$emit("open",e.date)}),10)},onClose:function(t,i,s){e.$nextTick((function(){e.$emit("input",e.date),e.$emit("close",e.date),e.saveIntoStore()}))}},i=Ae.ob[(0,Ae.qe)()];return void 0!==i&&i.hasOwnProperty("flatpickr")&&(t.locale=i.flatpickr),t},updateFromStore:function(e){e!==this.date&&(this.date=e,this.flatPicker.setDate(e))},onInput:function(e){this.$emit("input",this.date)},onBlur:function(){this.$emit("blur",this.date)},onClear:function(){this.flatPicker.clear(),this.saveIntoStore(),this.$emit("input",this.date)}},mounted:function(){const e=this,t=e.$refs[e.refs.flatPicker],i=e.config();e.flatPicker=new Ce.c(t,i),this.isMobile=e.flatPicker.isMobile},beforeDestroy:function(){const e=this;e.flatPicker.destroy()}},Se=xe,Le=(0,k.c)(Se,we,Ee,!1,null,"05edd33b",null),De=Le.exports,Me=function(){var e=this,t=e._self._c;return t("a17-modal",{ref:"modal",staticClass:"modal--tiny modal--form modal--withintro",attrs:{title:e.modalTitle,forceClose:!0}},[e._t("default"),t("a17-inputframe",[t("a17-button",{staticClass:"dialog-confirm",attrs:{variant:"validate"}},[e._v(e._s(e.confirmLabel))]),e._v(" "),t("a17-button",{staticClass:"dialog-cancel",attrs:{variant:"aslink"}},[t("span",[e._v(e._s(e.cancelLabel))])])],1)],2)},Ie=[],Oe={name:"A17Dialog",props:{name:{type:String,default:""},modalTitle:{type:String,default:function(){return this.$trans("dialog.title")}},confirmLabel:{type:String,default:function(){return this.$trans("dialog.ok")}},cancelLabel:{type:String,default:function(){return this.$trans("dialog.cancel")}}},methods:{open:function(e){this.$refs.modal&&this.$refs.modal.open(),this.$nextTick((()=>{this.$el.querySelector(".dialog-confirm").addEventListener("click",(t=>{e(),this.close()})),this.$el.querySelector(".dialog-cancel").addEventListener("click",(e=>{this.close()}))}))},close:function(){this.$refs.modal&&this.$refs.modal.close()}}},Pe=Oe,Be=(0,k.c)(Pe,Me,Ie,!1,null,null,null),Re=Be.exports,Ne=i(3032),Fe=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,label:e.label,locale:e.locale,size:e.size,name:e.name,note:e.fieldNote},on:{localize:e.updateLocale}},[t("div",{staticClass:"fileField"},[e.buttonOnTop&&e.remainingItems?t("div",{staticClass:"fileField__trigger"},[t("input",{attrs:{type:"hidden",name:e.name},domProps:{value:e.itemsIds}}),t("a17-button",{attrs:{type:"button",variant:"ghost"},on:{click:function(t){return e.openMediaLibrary(e.remainingItems)}}},[e._v(e._s(e.addLabel))]),t("span",{staticClass:"fileField__note f--small"},[e._v(e._s(e.note))])],1):e._e(),e.items.length?t("table",{staticClass:"fileField__list"},[t("draggable",{attrs:{tag:"tbody"},model:{value:e.items,callback:function(t){e.items=t},expression:"items"}},e._l(e.items,(function(i,s){return t("a17-fileitem",{key:i.id,staticClass:"item__content",attrs:{name:"".concat(e.name,"_").concat(i.id),draggable:e.isDraggable,item:i},on:{delete:function(t){return e.deleteItem(s)}}})})),1)],1):e._e(),!e.buttonOnTop&&e.remainingItems?t("div",{staticClass:"fileField__trigger"},[t("input",{attrs:{type:"hidden",name:e.name},domProps:{value:e.itemsIds}}),t("a17-button",{attrs:{type:"button",variant:"ghost"},on:{click:function(t){return e.openMediaLibrary(e.remainingItems)}}},[e._v(e._s(e.addLabel))]),t("span",{staticClass:"fileField__note f--small"},[e._v(e._s(e.note))])],1):e._e()])])},$e=[],Ue=i(1200),Ve=i(6716),qe=function(){var e=this,t=e._self._c;return t("tr",{staticClass:"fileItem"},[e.draggable?t("td",{staticClass:"fileItem__cell fileItem__cell--drag"},[t("div",{staticClass:"drag__handle--drag"})]):e._e(),e.currentItem.hasOwnProperty("extension")?t("td",{staticClass:"fileItem__cell fileItem__cell--extension"},[t("a",{attrs:{href:"#",target:"_blank"}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:e.getSvgIconName()}})])]):e._e(),t("td",{staticClass:"fileItem__cell fileItem__cell--name"},[e.currentItem.hasOwnProperty("thumbnail")?t("span",[t("img",{attrs:{src:e.currentItem.thumbnail}})]):e._e(),t("a",{attrs:{href:e.currentItem.hasOwnProperty("original")?e.currentItem.original:"#",download:""}},[t("span",{staticClass:"f--link-underlined--o"},[e._v(e._s(e.currentItem.name))])]),t("input",{attrs:{type:"hidden",name:e.name},domProps:{value:e.currentItem.id}})]),e.currentItem.hasOwnProperty("size")?t("td",{staticClass:"fileItem__cell fileItem__cell--size"},[e._v(e._s(e.currentItem.size))]):e._e(),t("td",{staticClass:"fileItem__cell"},[t("a17-button",{staticClass:"bucket__action",attrs:{icon:"close"},on:{click:function(t){return e.deleteItem()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"close_icon"}})])],1)])},We=[];const He={img:{extensions:["gif","png","jpg"],icon:"img",display:"Image File",instructions:"Most Image files are natively recognized by your computer."},tiff:{extensions:["tiff","tif"],icon:"img",display:"TIFF Image",instructions:"To read TIFF images, you need Adobe Photoshop or similar."},eps:{extensions:["eps","ps"],icon:"eps",display:"Postscript File",instructions:"To read Postscript files, you need Adobe Illustrator or similar."},bmp:{extensions:["bmp"],icon:"img",display:"Bitmap Image",instructions:"To read Bitmap images, you need Adobe Photoshop or similar."},raw:{extensions:["3fr","arw","srf","sr2","bay","crw","cr2","cap","iiq","eip","dng","erf","fff","mef","mos","mrw","nef","nrw","orf","ptx","pef","pxn","r3d","raf","raw","rw2","rwz","k25","kdc","dcs","drf","x3f"],icon:"img",display:"RAW Image",instructions:"To read RAW images, you need Adobe Photoshop or similar."},indd:{extensions:["indd"],icon:"indd",display:"InDesign Document",instructions:"To read InDesign documents, you need Adobe InDesign or similar."},psd:{extensions:["psd"],icon:"psd",display:"Photoshop File",instructions:"To read Photoshop files, you need Adobe Photoshop or similar."},ai:{extensions:["ai"],icon:"ai",display:"Illustrator File",instructions:"To read Illustrator files, you need Adobe Illustrator or similar."},indb:{extensions:["indb"],icon:"indd",display:"InDesign Book",instructions:"To read InDesign books, you need Adobe InDesign or similar."},ase:{extensions:["ase"],icon:"ase",display:"Adobe Swatch File",instructions:"To read Swatch files, you need Adobe Creative Suite or similar."},snd:{extensions:["mp3","wav"],icon:"snd",display:"Audio File",instructions:"To listen to Audio files, you need Apple QuickTime, Windows Media Player or similar."},vid:{extensions:["avi","mov","mp4","mpg","mpeg","wmv","flv"],icon:"vid",display:"Movie File",instructions:"To watch Movie files, you need Apple QuickTime, Windows Media Player or similar."},fla:{extensions:["fla"],icon:"fla",display:"Flash Document",instructions:"To read Flash documents, you need Adobe Flash player."},swf:{extensions:["swf"],icon:"swf",display:"Flash Movie",instructions:"To read Flash movies, you need Adobe Flash player."},dcr:{extensions:["dcr"],icon:"dcr",display:"Shockwave Movie",instructions:"To read Shockwave movies, you need Adobe Flash player."},ae:{extensions:["ae","aep"],icon:"ae",display:"After Effect File",instructions:"To read After Effect files, you need Adobe After Effects."},pdf:{extensions:["pdf"],icon:"pdf",display:"PDF Document",instructions:"To read PDF documents, You need the free Adobe Acrobat Reader or similar."},doc:{extensions:["doc","docx"],icon:"doc",display:"Word Document",instructions:"To read Word documents, you need Microsoft Word or similar."},xls:{extensions:["xls","xlsx"],icon:"xls",display:"Excel Document",instructions:"To read Excel documents, you need Microsoft Excel, or similar."},ppt:{extensions:["ppt","pptx","pps"],icon:"ppt",display:"Powerpoint Document",instructions:"To read PowerPoint documents, you need Microsoft PowerPoint, or similar."},pages:{extensions:["pages"],icon:"pages",display:"Pages Document",instructions:"To read Pages documents, you need Apple iWorks."},numbers:{extensions:["numbers"],icon:"numbers",display:"Numbers Document",instructions:"To read Numbers documents, you need Apple iWorks."},key:{extensions:["key"],icon:"key",display:"Keynote Document",instructions:"To read Keynote Documents, you need Apple iWorks."},csv:{extensions:["csv"],icon:"sql",display:"CSV File",instructions:"CSV files can be opened with a spreadsheet application such as Microsoft Excel or similar."},txt:{extensions:["txt"],icon:"txt",display:"Text File",instructions:"To read TXT files, you need any standard text editor."},rtf:{extensions:["rtf"],icon:"txt",display:"Rich Text File",instructions:"To read RTF files, you need any standard text editor."},merlin:{extensions:["merlin","merlin2"],icon:"merlin",display:"Merlin File",instructions:"To read Merlin files, you need Merlin."},oplx:{extensions:["oplx"],icon:"merlin",display:"OmniPlan File",instructions:"To read OmniPlan files, you need OmniPlan."},zip:{extensions:["zip","str","tar","gz"],icon:"zip",display:"Archive",instructions:"Most archive formats are natively recognized by your computer."},dmg:{extensions:["dmg"],icon:"dmg",display:"DMG Installer",instructions:"DMG installers are disc images for Mac used for the installation of applications."},fnt:{extensions:["fnt","ttf","bmap","afm","otf"],icon:"fnt",display:"Font",instructions:"To open Font packages, you need a font manager application such as FontCreator on a PC or Font Book on a Mac."},suit:{extensions:["suit"],icon:"fnt",display:"Font Suitcase",instructions:"To open Font Suitcase, you need a Mac."},html:{extensions:["htm","html","rhtml"],icon:"html",display:"HTML File",instructions:"To read HTML files, you need a standard text editor."},css:{extensions:["css"],icon:"gen",display:"Stylesheet",instructions:"To read CSS files, you need a standard text editor."},php:{extensions:["php"],icon:"gen",display:"PHP File",instructions:"To read PHP files, you need a standard text editor."},yml:{extensions:["yml"],icon:"sql",display:"YAML File",instructions:"To read YAML files, you need a standard text editor."},sql:{extensions:["sql"],icon:"sql",display:"MySql Dump",instructions:"To read MySql Dump files, you need MySQL."},dir:{extensions:["dir"],icon:"dir",display:"Folder"},cut:{extensions:["cut"],icon:"cut",display:"Shortcut"},ftr:{extensions:["ftr"],icon:"ftr",display:"Feature"},pop:{extensions:["pop"],icon:"pop",display:"Popup Window"},link:{extensions:["net","link","com","fr","net","org","me","us","biz","mobi","info","es","de"],icon:"net",display:"Internet Location"},site:{extensions:["site"],icon:"site",display:"Mini Site"},slide:{extensions:["slide"],icon:"slide",display:"Slideshow"},rss:{extensions:["rss"],icon:"txt",display:"RSS Feed"}};var ze=He,Ke={name:"a17FileItem",props:{name:{type:String,required:!0},draggable:{type:Boolean,default:!1},item:{type:Object,default:function(){return{}}},itemLabel:{type:String,default:"Item"},endpoint:{type:String,default:""},max:{type:Number,default:10}},data:function(){return{handle:".item__handle"}},computed:{currentItem:function(){return this.item}},methods:{deleteItem:function(){this.$emit("delete")},getSvgIconName:function(){const e=this.currentItem.extension;if(ze.hasOwnProperty(e))return ze[e].icon;for(const t in ze){const i=ze[t].extensions.findIndex((t=>t===e));if(i>-1)return ze[t].icon}return"gen"}}},je=Ke,Ge=(0,k.c)(je,qe,We,!1,null,"5c6d6a95",null),Ye=Ge.exports,Xe={name:"A17FileField",components:{"a17-fileitem":Ye,draggable:g()},mixins:[b.c,Ve.c,Ue.c,ee.c],props:{type:{type:String,default:"file"},name:{type:String,required:!0},itemLabel:{type:String,default:"Item"},endpoint:{type:String,default:""},draggable:{type:Boolean,default:!0},max:{type:Number,default:1},note:{type:String,default:""},fieldNote:{type:String,default:""},filesizeMax:{type:Number,default:0},buttonOnTop:{type:Boolean,default:!1}},data:()=>({handle:".item__handle"}),computed:{remainingItems:function(){return this.max-this.items.length},items:{get(){return this.selectedFiles.hasOwnProperty(this.name)&&this.selectedFiles[this.name]||[]},set(e){this.$store.commit(v.ol.REORDER_MEDIAS,{name:this.name,medias:e})}},isDraggable:function(){return this.draggable&&this.items.length>1},itemsIds:function(){return this.selectedItemsByIds[this.name]?this.selectedItemsByIds[this.name].join():""},addLabel:function(){return this.$trans("fields.files.add-label","Add")+" "+this.itemLabel},...(0,_.ys)({selectedFiles:e=>e.mediaLibrary.selected}),...(0,_.gV)(["selectedItemsByIds"])},methods:{deleteAll:function(e){this.$store.commit(v.ol.DESTROY_MEDIAS,{name:this.name})},deleteItem:function(e){this.$store.commit(v.ol.DESTROY_SPECIFIC_MEDIA,{name:this.name,index:e})},destroyValue:function(){this.deleteAll()}}},Je=Xe,Qe=(0,k.c)(Je,Fe,$e,!1,null,"86ceea78",null),Ze=Qe.exports,et=function(){var e=this,t=e._self._c;return t("div",{staticClass:"form__input form__input--hidden"},[t("input",{attrs:{type:"hidden",name:e.name,id:e.uniqId},domProps:{value:e.value}})])},tt=[],it={name:"A17HiddenField",mixins:[W.c,ge.c,Z.c],props:{name:{type:String,required:!0},initialValue:{default:""}},computed:{uniqId:function(){return this.name+"-"+this.randKey}},data:function(){return{value:this.initialValue}},watch:{initialValue:function(){this.value=this.initialValue}},methods:{updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&(this.value=e)}}},st=it,at=(0,k.c)(st,et,tt,!1,null,null,null),nt=at.exports,ot=function(){var e=this,t=e._self._c;return t("a17-button",{directives:[{name:"tooltip",rawName:"v-tooltip"}],attrs:{variant:"icon",size:"smallIcon","data-tooltip-title":e.text,"data-tooltip-theme":"large","data-tooltip-placement":"right"}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"info"}})])},rt=[],lt={name:"A17Infotip",props:{text:{default:""}},computed:{},methods:{onClick:function(){this.$emit("click")}}},dt=lt,ct=(0,k.c)(dt,ot,rt,!1,null,"2da324be",null),ut=ct.exports,ht=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.isCurrentLocale,expression:"isCurrentLocale"}],staticClass:"input",class:e.textfieldClasses,attrs:{hidden:!e.isCurrentLocale||null}},[e.label?t("label",{staticClass:"input__label",attrs:{for:e.labelFor||e.name}},[e._v(" "+e._s(e.label)),e.required?t("span",{staticClass:"input__required"},[e._v("*")]):e._e(),e.hasLocale&&e.languages.length>1?t("span",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"input__lang",attrs:{"data-tooltip-title":e.$trans("fields.generic.switch-language")},on:{click:e.onClickLocale}},[e._v(e._s(e.displayedLocale))]):e._e(),e.note?t("span",{staticClass:"input__note f--small"},[e._v(e._s(e.note))]):e._e()]):e._e(),e.addNew?t("a",{staticClass:"input__add",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.openAddModal.apply(null,arguments)}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"add"}}),e._v(" "),t("span",{staticClass:"f--link-underlined--o"},[e._v("Add New")])]):e._e(),e._t("default"),e.error&&e.errorMessage?t("span",{staticClass:"input__errorMessage f--small",domProps:{innerHTML:e._s(e.errorMessage)}}):e._e(),e.otherLocalesError?t("span",{staticClass:"input__errorMessage f--small"},[e._v(e._s(e.errorMessageLocales))]):e._e()],2)},pt=[],mt={name:"A17InputFrame",mixins:[ge.c,ee.c,Ue.c],props:{addNew:{type:String,default:""}},computed:{textfieldClasses:function(){const e=["small"===this.size?"input--small":"",this.error?"input--error":"","input-wrapper-"+(this.name||this.labelFor)];return this.variant&&this.variant.split(" ").forEach((t=>{e.push("input--".concat(t))})),e}},methods:{openAddModal:function(){this.$parent.$refs.addModal&&this.$parent.$refs.addModal.open()}}},ft=mt,gt=(0,k.c)(ft,ht,pt,!1,null,"0d108f70",null),_t=gt.exports,bt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"locale"},[e.languages&&e.languages.length&&e.languages.length>0?e._l(e.languages,(function(i){return t("div",{key:i.value,staticClass:"locale__item"},[i.value===e.currentLocale.value||e.isCustomForm||e.keepInDom?t("".concat(e.type),e._b({ref:"field",refInFor:!0,tag:"component",attrs:{"data-lang":i.value,name:"".concat(e.attributes.name,"[").concat(i.value,"]"),fieldName:e.attributes.name,locale:i},on:{localize:e.updateLocale,change:function(t){return e.updateValue(i.value,...arguments)},blur:function(t){return e.$emit("blur")},focus:function(t){return e.$emit("focus")}}},"component",e.attributesPerLang(i.value),!1),[e._t("default")],2):e._e()],1)})):[t("".concat(e.type),e._b({ref:"field",tag:"component",attrs:{name:e.attributes.name},on:{change:function(t){return e.updateValue(!1,...arguments)},blur:function(t){return e.$emit("blur")},focus:function(t){return e.$emit("focus")}}},"component",e.attributesNoLang(),!1),[e._t("default")],2)]],2)},vt=[],yt=i(8316),wt=i.n(yt),Et={name:"A17Locale",props:{type:{type:String,default:"text"},keepInDom:{type:Boolean,default:!1},attributes:{type:Object,default:function(){return{}}},initialValues:{type:Object,default:function(){return{}}},isRequired:{type:Boolean,default:function(){return this.attributes.required||!1}}},computed:{...(0,_.ys)({currentLocale:e=>e.language.active,languages:e=>e.language.all})},data(){return{isCustomForm:!1}},mounted(){this.isCustomForm=void 0!==this.$root.$refs.customForm},methods:{attributesPerLang:function(e){const t=this.languages.find((t=>t.value===e)),i=wt()(this.attributes);return this.initialValues&&"object"===typeof this.initialValues&&this.initialValues[e]?i.initialValue=this.initialValues[e]:i.initialValue||(i.initialValue=""),i.required=!!t.published&&this.isRequired,i},attributesNoLang:function(){const e=wt()(this.attributes);return this.initialValue&&(e.initialValue=this.initialValue),e},updateLocale:function(e){this.$store.commit(v.cp.SWITCH_LANG,{oldValue:e}),this.$nextTick((function(){const e=this.$el.querySelector('[data-lang="'+this.currentLocale.value+'"]');if(e){const t=e.querySelector("input:not([disabled]), textarea:not([disabled]), select:not([disabled])");t&&t.focus()}})),this.$emit("localize",this.currentLocale)},updateValue:function(e,t){e?this.$emit("change",{locale:e,value:t}):this.$emit("change",{value:t})}}},Tt=Et,kt=(0,k.c)(Tt,bt,vt,!1,null,null,null),Ct=kt.exports,At=function(){var e=this,t=e._self._c;return t("a17-modal",{ref:"modal",attrs:{title:e.modalTitle,mode:"wide"},on:{open:e.opened}},[t("div",{staticClass:"medialibrary"},[t("div",{staticClass:"medialibrary__frame"},[t("div",{ref:"form",staticClass:"medialibrary__header"},[t("a17-filter",{attrs:{clearOption:!0},on:{submit:e.submitFilter,clear:e.clearFilters}},[e.types.length?t("ul",{staticClass:"secondarynav secondarynav--desktop",attrs:{slot:"navigation"},slot:"navigation"},e._l(e.types,(function(i){return t("li",{key:i.value,staticClass:"secondarynav__item",class:{"s--on":e.type===i.value,"s--disabled":e.type!==i.value&&e.strict}},[t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.updateType(i.value)}}},[t("span",{staticClass:"secondarynav__link"},[e._v(e._s(i.text))]),i.total>0?t("span",{staticClass:"secondarynav__number"},[e._v("("+e._s(i.total)+")")]):e._e()])])})),0):e._e(),t("div",{staticClass:"secondarynav secondarynav--mobile secondarynav--dropdown",attrs:{slot:"navigation"},slot:"navigation"},[t("a17-dropdown",{ref:"secondaryNavDropdown",attrs:{position:"bottom-left",width:"full",offset:0}},[e.selectedType?t("a17-button",{staticClass:"secondarynav__button",attrs:{variant:"dropdown-transparent",size:"small"},on:{click:function(t){return e.$refs.secondaryNavDropdown.toggle()}}},[t("span",{staticClass:"secondarynav__link"},[e._v(e._s(e.selectedType.text))]),t("span",{staticClass:"secondarynav__number"},[e._v(e._s(e.selectedType.total))])]):e._e(),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[t("ul",e._l(e.types,(function(i){return t("li",{key:i.value,staticClass:"secondarynav__item"},[t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.updateType(i.value)}}},[t("span",{staticClass:"secondarynav__link"},[e._v(e._s(i.text))]),t("span",{staticClass:"secondarynav__number"},[e._v(e._s(i.total))])])])})),0)])],1)],1),t("div",{attrs:{slot:"hidden-filters"},slot:"hidden-filters"},[t("a17-vselect",{ref:"filter",staticClass:"medialibrary__filter-item",attrs:{name:"tag",options:e.tags,placeholder:e.$trans("media-library.filter-select-label","Filter by tag"),searchable:!0,maxHeight:"175px"}}),t("a17-checkbox",{ref:"unused",staticClass:"medialibrary__filter-item",attrs:{name:"unused","initial-value":0,value:1,label:e.$trans("media-library.unused-filter-label","Show unused only")}})],1)])],1),t("div",{staticClass:"medialibrary__inner"},[t("div",{staticClass:"medialibrary__grid"},[t("aside",{staticClass:"medialibrary__sidebar"},[t("a17-mediasidebar",{attrs:{medias:e.selectedMedias,authorized:e.authorized,extraMetadatas:e.extraMetadatas,type:e.currentTypeObject,translatableMetadatas:e.translatableMetadatas},on:{clear:e.clearSelectedMedias,delete:e.deleteSelectedMedias,tagUpdated:e.reloadTags,triggerMediaReplace:e.replaceMedia}})],1),e.selectedMedias.length&&e.showInsert&&e.connector?t("footer",{staticClass:"medialibrary__footer"},[e.canInsert?t("a17-button",{attrs:{variant:"action"},on:{click:e.saveAndClose}},[e._v(e._s(e.btnLabel))]):t("a17-button",{attrs:{variant:"action",disabled:!0}},[e._v(e._s(e.btnLabel))])],1):e._e(),t("div",{ref:"list",staticClass:"medialibrary__list"},[e.authorized?t("a17-uploader",{ref:"uploader",attrs:{type:e.currentTypeObject},on:{loaded:e.addMedia,clear:e.clearSelectedMedias}}):e._e(),t("div",{staticClass:"medialibrary__list-items"},["file"===e.type?t("a17-itemlist",{attrs:{items:e.renderedMediaItems,"selected-items":e.selectedMedias,"used-items":e.usedMedias},on:{change:e.updateSelectedMedias,shiftChange:e.updateSelectedMedias}}):t("a17-mediagrid",{attrs:{items:e.renderedMediaItems,"selected-items":e.selectedMedias,"used-items":e.usedMedias},on:{change:e.updateSelectedMedias,shiftChange:e.updateSelectedMedias}}),e.loading?t("a17-spinner",{staticClass:"medialibrary__spinner"},[e._v("Loading…")]):e._e()],1)],1)])])])])])},xt=[],St=i(8108),Lt=i(7120),Dt=i(708),Mt=i(9812);const It="MEDIA-LIBRARY";var Ot={get(e,t,i,s){o().get(e,{params:t}).then((function(e){i&&"function"===typeof i&&i(e)}),(function(e){const t={message:"Media library get error.",value:e};(0,Mt.q)(It,t),s&&"function"===typeof s&&s(e)}))},update(e,t,i,s){o().put(e,t).then((function(e){i&&"function"===typeof i&&i(e)}),(function(e){const t={message:"Media library update error.",value:e};(0,Mt.q)(It,t),s&&"function"===typeof s&&s(e)}))},delete(e,t,i){o()["delete"](e).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Media library delete error.",value:e};(0,Mt.q)(It,t),i&&"function"===typeof i&&i(e)}))},bulkDelete(e,t,i,s){o().put(e,t).then((function(e){i&&"function"===typeof i&&i(e)}),(function(e){const t={message:"Media library bulk delete error.",value:e};(0,Mt.q)(It,t),s&&"function"===typeof s&&s(e)}))}},Pt=i(892),Bt=i(7300),Rt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mediagrid"},[e._l(e.itemsLoading,(function(i,s){return t("div",{directives:[{name:"show",rawName:"v-show",value:!i.isReplacement,expression:"!item.isReplacement"}],key:"mediaLoading_"+i.id,staticClass:"mediagrid__item"},[t("span",{staticClass:"mediagrid__button s--loading"},[i.error?t("span",{staticClass:"mediagrid__progressError"},[e._v("Upload Error")]):t("span",{staticClass:"mediagrid__progress"},[t("span",{staticClass:"mediagrid__progressBar",style:e.loadingProgress(s)})])])])})),e._l(e.items,(function(i){return t("div",{key:i.id,staticClass:"mediagrid__item",class:{"s--hasFilename":e.showFileName}},[t("span",{staticClass:"mediagrid__button",class:{"s--picked":e.isSelected(i),"s--used":e.isUsed(i)||!!e.replacingMediaIds[i.id],"s--disabled":i.disabled},on:{click:[function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:e.toggleSelection(i)},function(t){return t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:e.shiftToggleSelection(i):null}]}},[t("img",{staticClass:"mediagrid__img",attrs:{src:i.thumbnail}})]),e.showFileName?t("p",{staticClass:"mediagrid__name",attrs:{title:i.name}},[e._v(e._s(i.name))]):e._e()])}))],2)},Nt=[],Ft=i(6456),$t={name:"A17Mediagrid",mixins:[Ft.c],computed:{...(0,_.ys)({showFileName:e=>e.mediaLibrary.showFileName})},methods:{loadingProgress:function(e){return{width:this.itemsLoading[e].progress?this.itemsLoading[e].progress+"%":"0%"}}}},Ut=$t,Vt=(0,k.c)(Ut,Rt,Nt,!1,null,"3d6118b4",null),qt=Vt.exports,Wt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mediasidebar"},[e.mediasLoading.length?t("a17-mediasidebar-upload"):[t("div",{staticClass:"mediasidebar__inner",class:e.containerClasses},[e.hasMedia?e._e():t("p",{staticClass:"f--note"},[e._v(e._s(e.$trans("media-library.sidebar.empty-text","No file selected")))]),e.hasMultipleMedias?t("p",{staticClass:"mediasidebar__info"},[e._v(" "+e._s(e.medias.length)+" "+e._s(e.$trans("media-library.sidebar.files-selected","files selected"))+" "),t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.clear.apply(null,arguments)}}},[e._v(e._s(e.$trans("media-library.sidebar.clear","Clear")))])]):e._e(),e.hasSingleMedia?[e.isImage?t("img",{staticClass:"mediasidebar__img",attrs:{src:e.firstMedia.thumbnail,alt:e.firstMedia.original}}):e._e(),t("p",{staticClass:"mediasidebar__name"},[e._v(e._s(e.firstMedia.name))]),t("ul",{staticClass:"mediasidebar__metadatas"},[e.firstMedia.size?t("li",{staticClass:"f--small"},[e._v("File size: "+e._s(e._f("uppercase")(e.firstMedia.size)))]):e._e(),e.isImage&&e.firstMedia.width+e.firstMedia.height?t("li",{staticClass:"f--small"},[e._v(" "+e._s(e.$trans("media-library.sidebar.dimensions","Dimensions"))+": "+e._s(e.firstMedia.width)+" × "+e._s(e.firstMedia.height)+" ")]):e._e()])]:e._e(),e.hasMedia?t("a17-buttonbar",{staticClass:"mediasidebar__buttonbar"},[e.hasSingleMedia?t("a",{attrs:{href:e.firstMedia.original,download:""}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"download"}})]):e._e(),e.allowDelete&&e.authorized?t("button",{attrs:{type:"button"},on:{click:e.deleteSelectedMediasValidation}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"trash"}})]):t("button",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"button--disabled",attrs:{type:"button","data-tooltip-title":e.warningDeleteMessage}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"trash"}})]),e.hasSingleMedia?t("button",{attrs:{type:"button"},on:{click:e.replaceMedia}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"replace"}})]):e._e()]):e._e()],2),e.hasMedia?t("form",{ref:"form",staticClass:"mediasidebar__inner mediasidebar__form",on:{submit:e.submit}},[e.loading?t("span",{staticClass:"mediasidebar__loader"},[t("span",{staticClass:"loader loader--small"},[t("span")])]):e._e(),e.fieldsRemovedFromBulkEditing.includes("tags")?e._e():t("a17-vselect",{key:e.firstMedia.id+"-"+e.medias.length,attrs:{label:e.$trans("media-library.sidebar.tags"),name:"tags",multiple:!0,selected:e.hasMultipleMedias?e.sharedTags:e.firstMedia.tags,searchable:!0,emptyText:e.$trans("media-library.no-tags-found","Sorry, no tags found."),taggable:!0,pushTags:!0,size:"small",endpoint:e.type.tagsEndpoint,maxHeight:"175px"},on:{change:e.save}}),e.extraMetadatas.length&&e.isImage&&e.hasMultipleMedias&&!e.fieldsRemovedFromBulkEditing.includes("tags")?t("span",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"f--tiny f--note f--underlined",attrs:{"data-tooltip-title":"Remove this field if you do not want to update it on all selected medias","data-tooltip-theme":"default","data-tooltip-placement":"top"},on:{click:function(t){return e.removeFieldFromBulkEditing("tags")}}},[e._v("Remove from bulk edit")]):e._e(),e.hasMultipleMedias?[t("input",{attrs:{type:"hidden",name:"ids"},domProps:{value:e.mediasIds}})]:[t("input",{attrs:{type:"hidden",name:"id"},domProps:{value:e.firstMedia.id}}),e.translatableMetadatas.length>0?t("div",{staticClass:"mediasidebar__langswitcher"},[t("a17-langswitcher",{attrs:{"in-modal":!0,"all-published":!0}})],1):e._e(),e.isImage&&e.translatableMetadatas.includes("alt_text")?t("a17-locale",{attrs:{type:"a17-textfield",attributes:{label:e.$trans("media-library.sidebar.alt-text","Alt text"),name:"alt_text",type:"text",size:"small"},keepInDom:!0,initialValues:e.altValues},on:{focus:e.focus,blur:e.blur}}):e.isImage?t("a17-textfield",{attrs:{label:e.$trans("media-library.sidebar.alt-text","Alt text"),name:"alt_text",initialValue:e.firstMedia.metadatas.default.altText,size:"small"},on:{focus:e.focus,blur:e.blur}}):e._e(),e.useWysiwyg?[e.isImage&&e.translatableMetadatas.includes("caption")?t("a17-locale",{attrs:{type:"a17-wysiwyg",attributes:{options:e.wysiwygOptions,label:e.$trans("media-library.sidebar.caption","Caption"),name:"caption",size:"small"},keepInDom:!0,initialValues:e.captionValues},on:{focus:e.focus,blur:e.blur}}):e.isImage?t("a17-wysiwyg",{attrs:{type:"textarea",rows:1,size:"small",label:e.$trans("media-library.sidebar.caption","Caption"),name:"caption",options:e.wysiwygOptions,initialValue:e.firstMedia.metadatas.default.caption},on:{focus:e.focus,blur:e.blur}}):e._e()]:[e.isImage&&e.translatableMetadatas.includes("caption")?t("a17-locale",{attrs:{type:"a17-textfield",attributes:{type:"textarea",rows:1,label:e.$trans("media-library.sidebar.caption","Caption"),name:"caption",size:"small"},keepInDom:!0,initialValues:e.captionValues},on:{focus:e.focus,blur:e.blur}}):e.isImage?t("a17-textfield",{attrs:{type:"textarea",rows:1,size:"small",label:e.$trans("media-library.sidebar.caption","Caption"),name:"caption",initialValue:e.firstMedia.metadatas.default.caption},on:{focus:e.focus,blur:e.blur}}):e._e()],e._l(e.singleOnlyMetadatas,(function(i){return[!e.isImage||"text"!==i.type&&i.type||!e.translatableMetadatas.includes(i.name)?!e.isImage||"text"!==i.type&&i.type?e._e():t("a17-textfield",{key:i.name,attrs:{label:i.label,name:i.name,size:"small",initialValue:e.firstMedia.metadatas.default[i.name],type:"textarea",rows:1},on:{focus:e.focus,blur:e.blur}}):t("a17-locale",{key:i.name,attrs:{type:"a17-textfield",keepInDom:!0,attributes:{label:i.label,name:i.name,type:"textarea",rows:1,size:"small"},initialValues:e.firstMedia.metadatas.default[i.name]},on:{focus:e.focus,blur:e.blur}}),e.isImage&&"checkbox"===i.type?t("div",{key:i.name,staticClass:"mediasidebar__checkbox"},[t("a17-checkbox",{attrs:{label:i.label,name:i.name,initialValue:e.firstMedia.metadatas.default[i.name],value:1},on:{change:e.blur}})],1):e._e()]}))],e._l(e.singleAndMultipleMetadatas,(function(i){return[e.isImage&&("text"===i.type||!i.type)&&(e.hasMultipleMedias&&!e.fieldsRemovedFromBulkEditing.includes(i.name)||e.hasSingleMedia)&&e.translatableMetadatas.includes(i.name)?t("a17-locale",{key:i.name,attrs:{type:"a17-textfield",keepInDom:!0,attributes:{label:i.label,name:i.name,type:"textarea",rows:1,size:"small"},initialValues:e.sharedMetadata(i.name,"object")},on:{focus:e.focus,blur:e.blur}}):!e.isImage||"text"!==i.type&&i.type||!(e.hasMultipleMedias&&!e.fieldsRemovedFromBulkEditing.includes(i.name)||e.hasSingleMedia)?e._e():t("a17-textfield",{key:i.name,attrs:{label:i.label,name:i.name,size:"small",initialValue:e.sharedMetadata(i.name),type:"textarea",rows:1},on:{focus:e.focus,blur:e.blur}}),e.isImage&&"checkbox"===i.type&&(e.hasMultipleMedias&&!e.fieldsRemovedFromBulkEditing.includes(i.name)||e.hasSingleMedia)?t("div",{key:i.name,staticClass:"mediasidebar__checkbox"},[t("a17-checkbox",{key:i.name,attrs:{label:i.label,name:i.name,initialValue:e.sharedMetadata(i.name,"boolean"),value:1},on:{change:e.blur}})],1):e._e(),e.isImage&&e.hasMultipleMedias&&!e.fieldsRemovedFromBulkEditing.includes(i.name)?t("span",{directives:[{name:"tooltip",rawName:"v-tooltip"}],key:i.name,staticClass:"f--tiny f--note f--underlined",attrs:{"data-tooltip-title":"Remove this field if you do not want to update it on all selected medias","data-tooltip-theme":"default","data-tooltip-placement":"top"},on:{click:function(t){return e.removeFieldFromBulkEditing(i.name)}}},[e._v("Remove from bulk edit")]):e._e()]}))],2):e._e()],t("a17-modal",{ref:"warningDelete",staticClass:"modal--tiny modal--form modal--withintro",attrs:{title:"Warning Delete"}},[t("p",{staticClass:"modal--tiny-title"},[t("strong",[e._v(e._s(e.$trans("media-library.dialogs.delete.title","Are you sure ?")))])]),t("p",[e._v(e._s(e.warningDeleteMessage))]),t("a17-inputframe",[t("a17-button",{attrs:{variant:"validate"},on:{click:e.deleteSelectedMedias}},[e._v("Delete ("+e._s(e.mediasIdsToDelete.length)+") ")]),t("a17-button",{attrs:{variant:"aslink"},on:{click:function(t){return e.$refs.warningDelete.close()}}},[t("span",[e._v("Cancel")])])],1)],1)],2)},Ht=[],zt=i(4564),Kt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mediasidebar__inner mediasidebar__inner--single"},[t("p",{staticClass:"f--note"},[e._v("Uploading "+e._s(e.mediasLoading.length)+" file"+e._s(e.mediasLoading.length>1?"s":""))]),t("div",{staticClass:"mediasidebar__progress"},[t("span",{staticClass:"mediasidebar__progressBar",style:e.loadingProgress})]),t("div",{staticClass:"mediasidebar__loading"},e._l(e.mediasLoading,(function(i){return t("p",{key:i.id,staticClass:"f--small",class:{"s--error":i.error}},[i.error?t("span",{staticClass:"mediasidebar__errorMessage"},[e._v(e._s(i.errorMessage))]):e._e(),t("span",[e._v(e._s(i.name))]),e._v(" "),i.error?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.cancelUpload(i)}}},[e._v("Cancel")]):e._e()])})),0)])},jt=[],Gt={name:"A17MediaSidebarUpload",props:{selectedMedias:{default:function(){return[]}}},data:function(){return{updateInProgress:!1}},computed:{loadingProgress:function(){const e=-100+this.uploadProgress;return{transform:"translateX("+e+"%)"}},...(0,_.ys)({mediasLoading:e=>e.mediaLibrary.loading,uploadProgress:e=>e.mediaLibrary.uploadProgress})},methods:{cancelUpload:function(e){this.$store.commit(v.ol.DONE_UPLOAD_MEDIA,e)}}},Yt=Gt,Xt=(0,k.c)(Yt,Kt,jt,!1,null,"6a681c02",null),Jt=Xt.exports,Qt=i(8884),Zt={name:"A17MediaSidebar",components:{"a17-mediasidebar-upload":Jt,"a17-langswitcher":zt.c},props:{medias:{default:function(){return[]}},authorized:{type:Boolean,default:!1},type:{type:Object,required:!0},extraMetadatas:{type:Array,default(){return[]}},translatableMetadatas:{type:Array,default(){return[]}}},data:function(){return{loading:!1,focused:!1,previousSavedData:{},fieldsRemovedFromBulkEditing:[]}},filters:Qt.c,watch:{medias:function(){this.fieldsRemovedFromBulkEditing=[]}},computed:{firstMedia:function(){return this.hasMedia?this.medias[0]:null},hasMultipleMedias:function(){return this.medias.length>1},hasSingleMedia:function(){return 1===this.medias.length},hasMedia:function(){return this.medias.length>0},isImage:function(){return"image"===this.type.value},sharedTags:function(){return this.medias.map((e=>e.tags)).reduce(((e,t)=>e.filter((e=>t.includes(e)))))},sharedMetadata(){return(e,t)=>this.hasMultipleMedias?this.medias.map((t=>t.metadatas.default[e])).every(((e,t,i)=>Array.isArray(e)?e[0]==i[0]:e==i[0]))?this.firstMedia.metadatas.default[e]:"object"===t?{}:"boolean"!==t&&"":"object"===typeof this.firstMedia.metadatas.default[e]||"boolean"===t?this.firstMedia.metadatas.default[e]:{}},captionValues(){return"object"===typeof this.firstMedia.metadatas.default.caption?this.firstMedia.metadatas.default.caption:{}},altValues(){return"object"===typeof this.firstMedia.metadatas.default.altText?this.firstMedia.metadatas.default.altText:{}},mediasIds:function(){return this.medias.map((function(e){return e.id})).join(",")},mediasIdsToDelete:function(){return this.medias.filter((e=>e.deleteUrl)).map((e=>e.id))},mediasIdsToDeleteString:function(){return this.mediasIdsToDelete.join(",")},allowDelete:function(){return this.medias.every((e=>e.deleteUrl))||this.hasMultipleMedias&&!this.medias.every((e=>!e.deleteUrl))},warningDeleteMessage:function(){return this.allowDelete?this.hasMultipleMedias?this.$trans("media-library.dialogs.delete.allow-delete-multiple-medias","Some files are used and can't be deleted. Do you want to delete the others ?"):this.$trans("media-library.dialogs.delete.allow-delete-one-media","This file is used and can't be deleted. Do you want to delete the others ?"):this.hasMultipleMedias?this.$trans("media-library.dialogs.delete.dont-allow-delete-multiple-medias","This files are used and can't be deleted."):this.$trans("media-library.dialogs.delete.dont-allow-delete-one-media","This file is used and can't be deleted.")},containerClasses:function(){return{"mediasidebar__inner--multi":this.hasMultipleMedias,"mediasidebar__inner--single":this.hasSingleMedia}},singleAndMultipleMetadatas:function(){return this.extraMetadatas.filter((e=>e.multiple&&!this.translatableMetadatas.includes(e.name)))},singleOnlyMetadatas:function(){return this.extraMetadatas.filter((e=>!e.multiple||e.multiple&&this.translatableMetadatas.includes(e.name)))},...(0,_.ys)({mediasLoading:e=>e.mediaLibrary.loading,useWysiwyg:e=>e.mediaLibrary.config.useWysiwyg,wysiwygOptions:e=>e.mediaLibrary.config.wysiwygOptions})},methods:{replaceMedia:function(){this.$root.$refs.replaceWarningMediaLibrary?this.$root.$refs.replaceWarningMediaLibrary.open((()=>{this.triggerMediaReplace()})):this.triggerMediaReplace()},triggerMediaReplace:function(){this.$emit("triggerMediaReplace",{id:this.getMediaToReplaceId()})},deleteSelectedMediasValidation:function(){if(this.loading)return!1;this.mediasIdsToDelete.length===this.medias.length?this.$root.$refs.deleteWarningMediaLibrary?this.$root.$refs.deleteWarningMediaLibrary.open((()=>{this.deleteSelectedMedias()})):this.deleteSelectedMedias():this.$refs.warningDelete.open()},deleteSelectedMedias:function(){if(this.loading)return!1;this.loading=!0,this.hasMultipleMedias?Ot.bulkDelete(this.firstMedia.deleteBulkUrl,{ids:this.mediasIdsToDeleteString},(e=>{this.loading=!1,this.$emit("delete",this.mediasIdsToDelete),this.$refs.warningDelete.close()}),(e=>{this.$store.commit(v.gp.SET_NOTIF,{message:e.data.message,variant:"error"})})):Ot.delete(this.firstMedia.deleteUrl,(e=>{this.loading=!1,this.$emit("delete",this.mediasIdsToDelete),this.$refs.warningDelete.close()}),(e=>{this.$store.commit(v.gp.SET_NOTIF,{message:e.data.message,variant:"error"})}))},clear:function(){this.$emit("clear")},getFormData:function(e){return(0,Lt.c)(e)},getMediaToReplaceId:function(){return this.firstMedia.id},removeFieldFromBulkEditing:function(e){this.fieldsRemovedFromBulkEditing.push(e)},focus:function(){this.focused=!0},blur:function(){this.focused=!1,this.save();const e=this.$refs.form,t=this.getFormData(e);this.hasSingleMedia?(t.hasOwnProperty("alt_text")?this.firstMedia.metadatas.default.altText=t.alt_text:this.firstMedia.metadatas.default.altText="",t.hasOwnProperty("caption")?this.firstMedia.metadatas.default.caption=t.caption:this.firstMedia.metadatas.default.caption="",this.extraMetadatas.forEach((e=>{t.hasOwnProperty(e.name)?this.firstMedia.metadatas.default[e.name]=t[e.name]:this.firstMedia.metadatas.default[e.name]=""}))):this.singleAndMultipleMetadatas.forEach((e=>{t.hasOwnProperty(e.name)&&this.medias.forEach((i=>{i.metadatas.default[e.name]=t[e.name]}))}))},save:function(){this.$nextTick((()=>{const e=this.$refs.form;if(!e)return;const t=this.getFormData(e);J()(t,this.previousSavedData)||this.loading||(this.previousSavedData=t,this.update(e))}))},submit:function(e){e.preventDefault(),this.save()},update:function(e){if(this.loading)return;this.loading=!0;const t=this.getFormData(e);t.fieldsRemovedFromBulkEditing=this.fieldsRemovedFromBulkEditing;const i=this.hasMultipleMedias?this.firstMedia.updateBulkUrl:this.firstMedia.updateUrl;Ot.update(i,t,(e=>{this.loading=!1,e.data.tags&&this.$emit("tagUpdated",e.data.tags),this.hasMultipleMedias&&e.data.items&&this.medias.forEach((function(t){e.data.items.some((function(e){return e.id===t.id&&(t.tags=e.tags),e.id===t.id}))}))}),(e=>{this.loading=!1,e.data.message&&this.$store.commit(v.gp.SET_NOTIF,{message:e.data.message,variant:"error"})}))}}},ei=Zt,ti=(0,k.c)(ei,Wt,Ht,!1,null,"4f7e4b44",null),ii=ti.exports,si=function(){var e=this,t=e._self._c;return t("div",{staticClass:"uploader"},[t("div",{ref:"uploaderDropzone",staticClass:"uploader__dropzone"},[t("div",{ref:"uploaderBrowseButton",staticClass:"button"},[e._v(e._s(e.$trans("uploader.upload-btn-label","Add new")))]),t("div",{staticClass:"uploader__dropzone--desktop"},[e._v(e._s(e.$trans("uploader.dropzone-text","or drop new files here")))])])])},ai=[],ni=i(2628),oi=i.n(ni),ri=i(3072),li=i(5104),di=i(4588);const ci=i(9632),ui=/[\/\?<>\\:\*\|":]/g,hi=/[\x00-\x1f\x80-\x9f]/g,pi=/^\.+$/,mi=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,fi=/[\. ]+$/,gi=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"ŒŒ"},{base:"oe",letters:"œœ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],_i={};for(let Ln=0;Ln0&&(t="."+e.join(", .")),{allowedExtensions:e,acceptFiles:t,stopOnFirstInvalidFile:!1}}},methods:{initUploader:function(){const e=this.$refs.uploaderBrowseButton,t={debug:!0,maxConnections:5,button:e,retry:{enableAuto:!1},callbacks:{onSubmit:this._onSubmitCallback.bind(this),onProgress:this._onProgressCallback.bind(this),onError:this._onErrorCallback.bind(this),onComplete:this._onCompleteCallback.bind(this),onAllComplete:this._onAllCompleteCallback.bind(this),onStatusChange:this._onStatusChangeCallback.bind(this),onTotalProgress:this._onTotalProgressCallback.bind(this)},text:{fileInputTitle:"Browse..."},messages:{retryFailTooManyItemsError:"Retry failed - you have reached your file limit.",sizeError:"{file} is too large, maximum file size is {sizeLimit}.",tooManyItemsError:"Too many items ({netItems}) would be uploaded. Item limit is {itemLimit}.",typeError:"{file} has an invalid extension. Valid extension(s): {extensions}."}};this._uploader="s3"===this.uploaderConfig.endpointType?new li.c({options:{...t,validation:{...this.uploaderValidation},objectProperties:{key:e=>this.unique_folder_name+"/"+yi(this._uploader.methods.getName(e)),region:this.uploaderConfig.endpointRegion,bucket:this.uploaderConfig.endpointBucket,acl:this.uploaderConfig.acl},request:{endpoint:this.uploaderConfig.endpoint,accessKey:this.uploaderConfig.accessKey},signature:{endpoint:this.uploaderConfig.signatureEndpoint,version:4,customHeaders:{"X-CSRF-TOKEN":this.uploaderConfig.csrfToken}},uploadSuccess:{endpoint:this.uploaderConfig.successEndpoint,customHeaders:{"X-CSRF-TOKEN":this.uploaderConfig.csrfToken}}}}):"azure"===this.uploaderConfig.endpointType?new ri.c({options:{...t,validation:{...this.uploaderValidation},cors:{expected:!0,sendCredentials:!0},blobProperties:{name:e=>new Promise((t=>{t(this.unique_folder_name+"/"+yi(this._uploader.methods.getName(e)))}))},request:{endpoint:this.uploaderConfig.endpoint},signature:{endpoint:this.uploaderConfig.signatureEndpoint,version:4,customHeaders:{"X-CSRF-TOKEN":this.uploaderConfig.csrfToken}},uploadSuccess:{endpoint:this.uploaderConfig.successEndpoint,customHeaders:{"X-CSRF-TOKEN":this.uploaderConfig.csrfToken}}}}):new di.c({options:{...t,validation:{...this.uploaderValidation,sizeLimit:1048576*this.uploaderConfig.filesizeLimit},request:{endpoint:this.uploaderConfig.endpoint,customHeaders:{"X-CSRF-TOKEN":this.uploaderConfig.csrfToken}}}})},replaceMedia:function(e){this.media_to_replace_id=e;const t=this.$refs.uploaderBrowseButton.querySelectorAll('[name = "qqfile"]');t[Array.from(t).length-1].click()},loadingProgress:function(e){this.$store.commit(v.ol.PROGRESS_UPLOAD_MEDIA,e)},loadingFinished:function(e,t){this.$emit("loaded",t),this.$store.commit(v.ol.DONE_UPLOAD_MEDIA,e)},loadingError:function(e){this.$store.commit(v.ol.ERROR_UPLOAD_MEDIA,e)},uploadProgress:function(e){this.$store.commit(v.ol.PROGRESS_UPLOAD,e)},_onCompleteCallback(e,t,i,s){const a=this.loadingMedias.findIndex((t=>t.id===this._uploader.methods.getUuid(e)));i.success?this.loadingFinished(this.loadingMedias[a],i.media):this.loadingError(this.loadingMedias[a])},_onAllCompleteCallback(e,t){this.unique_folder_name=null,this.uploadProgress(0)},_onSubmitCallback(e,t){this.$emit("clear"),this.unique_folder_name=this.unique_folder_name||this.uploaderConfig.endpointRoot+oi().getUniqueId(),this._uploader.methods.setParams({unique_folder_name:this.unique_folder_name,media_to_replace_id:this.media_to_replace_id},e);const i=URL.createObjectURL(this._uploader.methods.getFile(e)),s=new Image;s.onload=()=>{this._uploader.methods.setParams({width:s.width,height:s.height,unique_folder_name:this.unique_folder_name,media_to_replace_id:this.media_to_replace_id},e),this.media_to_replace_id=null},s.src=i;const a={id:this._uploader.methods.getUuid(e),name:yi(t),progress:0,error:!1,errorMessage:null,isReplacement:!!this.media_to_replace_id,replacementId:this.media_to_replace_id};"file"===this.type.value&&(this.media_to_replace_id=null),this.loadingMedias.push(a),this.loadingProgress(a)},_onProgressCallback(e,t,i,s){const a=this.loadingMedias.findIndex((t=>t.id===this._uploader.methods.getUuid(e)));if(a>=0){const e=this.loadingMedias[a];e.progress=i/s*100||0,e.error=!1,this.loadingProgress(e)}},_onErrorCallback(e,t,i,s){const a=e?this.loadingMedias.findIndex((t=>t.id===this._uploader.methods.getUuid(e))):-1;if(a>=0)this.loadingMedias[a].errorMessage=i,this.loadingError(this.loadingMedias[a]);else{const s={id:e?this._uploader.methods.getUuid(e):Math.floor(1e3*Math.random()),name:yi(t),progress:0,error:!0,errorMessage:i};this.loadingMedias.push(s),this.loadingProgress(s),this.loadingError(this.loadingMedias[this.loadingMedias.length-1])}},_onStatusChangeCallback(e,t,i){if("retrying upload"===i){const t=this.loadingMedias.findIndex((function(t){return t.id===e}));if(t>=0){const e=this.loadingMedias[t];e.progress=0,e.error=!1,this.loadingProgress(e)}}},_onTotalProgressCallback(e,t){const i=Math.floor(e/t*100);this.uploadProgress(i)},_onDropError(e,t){console.error(e,t)},_onProcessingDroppedFilesComplete(e){this._uploader.methods.addFiles(e)}},watch:{type:function(){this._uploader&&this.initUploader()}},mounted(){this.initUploader();const e=this.$refs.uploaderDropzone;this._qqDropzone&&this._qqDropzone.dispose(),this._qqDropzone=new(oi().DragAndDrop)({dropZoneElements:[e],allowMultipleItems:!0,callbacks:{dropError:this._onDropError.bind(this),processingDroppedFilesComplete:this._onProcessingDroppedFilesComplete.bind(this)}})},beforeDestroy(){this._qqDropzone&&this._qqDropzone.dispose()}},Ei=wi,Ti=(0,k.c)(Ei,si,ai,!1,null,"f229897e",null),ki=Ti.exports,Ci={name:"A17Medialibrary",components:{"a17-filter":Pt.c,"a17-mediasidebar":ii,"a17-uploader":ki,"a17-mediagrid":qt,"a17-itemlist":Bt.c,"a17-spinner":St.c,"a17-checkbox":j},props:{modalTitlePrefix:{type:String,default:function(){return this.$trans("media-library.title","Media Library")}},btnLabelSingle:{type:String,default:function(){return this.$trans("media-library.insert","Insert")}},btnLabelUpdate:{type:String,default:function(){return this.$trans("media-library.update","Update")}},btnLabelMulti:{type:String,default:function(){return this.$trans("media-library.insert","Insert")}},initialPage:{type:Number,default:1},authorized:{type:Boolean,default:!1},showInsert:{type:Boolean,default:!0},extraMetadatas:{type:Array,default(){return[]}},translatableMetadatas:{type:Array,default(){return[]}}},data:function(){return{loading:!1,maxPage:20,mediaItems:[],selectedMedias:[],gridHeight:0,page:this.initialPage,tags:[],lastScrollTop:0,gridLoaded:!1}},computed:{renderedMediaItems:function(){return this.mediaItems.map((e=>(e.disabled=this.filesizeMax>0&&e.filesizeInMb>this.filesizeMax||this.widthMin>0&&e.width0&&e.heighte.value===this.type))},endpoint:function(){return this.currentTypeObject.endpoint},modalTitle:function(){return this.connector?this.indexToReplace>-1?this.modalTitlePrefix+" – "+this.btnLabelUpdate:this.selectedMedias.length>1?this.modalTitlePrefix+" – "+this.btnLabelMulti:this.modalTitlePrefix+" – "+this.btnLabelSingle:this.modalTitlePrefix},btnLabel:function(){let e=this.$trans("media-library.types.single."+this.type,this.type);return this.indexToReplace>-1?this.btnLabelUpdate+" "+e:(this.selectedMedias.length>1&&(e=this.$trans("media-library.types.multiple."+this.type,this.type)),this.btnLabelSingle+" "+e)},usedMedias:function(){return this.selected[this.connector]||[]},selectedType:function(){const e=this,t=e.types.filter((function(t){return t.value===e.type}));return t[0]},canInsert:function(){return!this.selectedMedias.some((e=>!!this.usedMedias.find((t=>t.id===e.id))))},...(0,_.ys)({connector:e=>e.mediaLibrary.connector,max:e=>e.mediaLibrary.max,filesizeMax:e=>e.mediaLibrary.filesizeMax,widthMin:e=>e.mediaLibrary.widthMin,heightMin:e=>e.mediaLibrary.heightMin,type:e=>e.mediaLibrary.type,types:e=>e.mediaLibrary.types,strict:e=>e.mediaLibrary.strict,selected:e=>e.mediaLibrary.selected,indexToReplace:e=>e.mediaLibrary.indexToReplace})},watch:{type:function(){this.clearMediaItems(),this.gridLoaded=!1}},methods:{replaceMedia:function(e){let{id:t}=e;this.$refs.uploader.replaceMedia(t)},open:function(){this.$refs.modal.open()},close:function(){this.$refs.modal.hide()},opened:function(){if(this.gridLoaded||this.reloadGrid(),this.listenScrollPosition(),this.selectedMedias=[],this.connector&&this.indexToReplace>-1){const e=this.selected[this.connector][this.indexToReplace];e&&this.selectedMedias.push(e)}},updateType:function(e){this.loading||this.strict||this.type!==e&&(this.$store.commit(v.ol.UPDATE_MEDIA_TYPE,e),this.submitFilter())},addMedia:function(e){const t=this.mediaItems.findIndex((function(t){return t.id===e.id}));if(t>-1){for(const t in this.selected)this.selected[t].forEach(((i,s)=>{if(e.id===i.id){const a=[];for(const t in i.crops)a[t]={height:e.height===i.height?i.crops[t].height:e.height,name:t,width:e.width===i.width?i.crops[t].width:e.width,x:e.width===i.width?i.crops[t].x:0,y:e.height===i.height?i.crops[t].y:0};this.$store.commit(v.ol.UPDATE_MEDIAS,{index:s,media:{...e,width:e.width===i.width?i.width:e.width,height:e.height===i.height?i.height:e.height,crops:a},mediaRole:t})}}));this.$set(this.mediaItems,t,e),this.selectedMedias.unshift(e)}else this.mediaItems.unshift(e),this.$store.commit(v.ol.INCREMENT_MEDIA_TYPE_TOTAL,this.type),this.updateSelectedMedias(e.id)},updateSelectedMedias:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=e.id,s=this.selectedMedias.filter((function(e){return e.id===i}));if(0===s.length){if(1===this.max&&this.clearSelectedMedias(),this.selectedMedias.length>=this.max&&this.max>0)return;if(t&&this.selectedMedias.length>0){const e=this.selectedMedias[this.selectedMedias.length-1],t=this.mediaItems.findIndex((t=>t.id===e.id)),s=this.mediaItems.findIndex((e=>e.id===i));if(-1===s&&-1===t)return;let a=null,n=null;t{if(this.selectedMedias.length>=this.max&&this.max>0)return;const t=this.selectedMedias.findIndex((t=>t.id===e.id));-1===t&&this.selectedMedias.push(e)}))}else{const e=this.mediaItems.filter((function(e){return e.id===i}));e.length&&this.selectedMedias.push(e[0])}}else this.selectedMedias=this.selectedMedias.filter((function(e){return e.id!==i}))},getFormData:function(e){let t=(0,Lt.c)(e);return t?t.page=this.page:t={page:this.page},t.type=this.type,Array.isArray(t.unused)&&t.unused.length&&(t.unused=t.unused[0]),t},clearFilters:function(){const e=this;if(this.$refs.filter&&(this.$refs.filter.value=null),this.$refs.unused){const e=this.$refs.unused.$el.querySelector("input");e&&e.checked&&e.click()}this.$nextTick((function(){e.submitFilter()}))},clearSelectedMedias:function(){this.selectedMedias.splice(0)},deleteSelectedMedias:function(e){let t=[];e&&e.length!==this.selectedMedias.length&&(t=this.selectedMedias.filter((e=>!e.deleteUrl))),e.forEach((()=>{this.$store.commit(v.ol.DECREMENT_MEDIA_TYPE_TOTAL,this.type)})),this.mediaItems=this.mediaItems.filter((e=>!this.selectedMedias.includes(e)||t.includes(e))),this.selectedMedias=t,this.mediaItems.length<=40&&this.reloadGrid()},clearMediaItems:function(){this.mediaItems.splice(0)},reloadGrid:function(){this.loading=!0;const e=this.$refs.form,t=this.getFormData(e);Ot.get(this.endpoint,t,(e=>{e.data.items.forEach((e=>{this.mediaItems.find((t=>t.id===e.id))||this.mediaItems.push(e)})),this.maxPage=e.data.maxPage||1,this.tags=e.data.tags||[],this.$store.commit(v.ol.UPDATE_MEDIA_TYPE_TOTAL,{type:this.type,total:e.data.total}),this.loading=!1,this.listenScrollPosition(),this.gridLoaded=!0}),(e=>{this.$store.commit(v.gp.SET_NOTIF,{message:e.data.message,variant:"error"})}))},reloadTags:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.tags=e},submitFilter:function(e){const t=this,i=this.$refs.list;this.page=1,this.clearMediaItems(),this.clearSelectedMedias(),0!==i.scrollTop?(0,Dt.c)({el:i,offset:0,easing:"easeOut",onComplete:function(){t.reloadGrid()}}):t.reloadGrid()},listenScrollPosition:function(){this.$nextTick((function(){if(!this.gridLoaded)return;const e=this.$refs.list;this.gridHeight!==e.scrollHeight&&e.addEventListener("scroll",this.scrollToPaginate)}))},scrollToPaginate:function(){if(!this.gridLoaded)return;const e=this.$refs.list,t=10;e.scrollTop>this.lastScrollTop&&e.scrollTop+e.offsetHeight>e.scrollHeight-t&&(e.removeEventListener("scroll",this.scrollToPaginate),this.maxPage>this.page?(this.page=this.page+1,this.reloadGrid()):this.gridHeight=e.scrollHeight),this.lastScrollTop=e.scrollTop},saveAndClose:function(){this.$store.commit(v.ol.SAVE_MEDIAS,this.selectedMedias),this.close()}}},Ai=Ci,xi=(0,k.c)(Ai,At,xt,!1,null,"aaf9470e",null),Si=xi.exports,Li=function(){var e=this,t=e._self._c;return t("div",{staticClass:"media",class:{"media--hoverable":e.hover,"media--slide":e.isSlide}},[t("div",{staticClass:"media__field"},[e.hasMedia?t("div",{staticClass:"media__info"},[t("div",{staticClass:"media__img"},[t("div",{staticClass:"media__imgFrame"},[t("div",{staticClass:"media__imgCentered",style:e.cropThumbnailStyle},[e.cropSrc&&e.showImg?t("img",{ref:"mediaImg",class:e.cropThumbnailClass,attrs:{src:e.cropSrc}}):e._e()]),e.disabled?e._e():t("div",{staticClass:"media__edit",on:{click:function(t){return e.openMediaLibrary(1,e.mediaKey,e.index)}}},[t("span",{staticClass:"media__edit--button"},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"edit"}})])])])]),e.disabled?e._e():t("ul",{staticClass:"media__metadatas"},[t("li",{staticClass:"media__name",on:{click:function(t){return e.openMediaLibrary(1,e.mediaKey,e.index)}}},[t("strong",{attrs:{title:e.media.name}},[e._v(e._s(e.media.name))])]),e.media.size?t("li",{staticClass:"f--small"},[e._v("File size: "+e._s(e._f("uppercase")(e.media.size)))]):e._e(),e.media.width+e.media.height?t("li",{staticClass:"f--small"},[e._v(e._s(e.$trans("fields.medias.original-dimensions"))+": "+e._s(e.media.width)+" × "+e._s(e.media.height)+" ")]):e._e(),e.cropInfos&&e.activeCrop?t("li",{staticClass:"f--small media__crop-link",on:{click:e.openCropMedia}},e._l(e.cropInfos,(function(i,s){return t("p",{key:s,staticClass:"f--small f--note hide--xsmall"},[t("span",{domProps:{innerHTML:e._s(i)}})])})),0):e._e(),t("li",{staticClass:"f--small"},[e.withAddInfo?t("a",{staticClass:"f--link-underlined--o",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.metadatasInfos.apply(null,arguments)}}},[e._v(e._s(e.metadatas.text))]):e._e()])]),e.disabled?e._e():t("a17-buttonbar",{staticClass:"media__actions"},[t("a",{attrs:{href:e.media.original,download:""}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"download"}})]),e.activeCrop?t("button",{attrs:{type:"button"},on:{click:e.openCropMedia}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"crop"}})]):e._e(),t("button",{attrs:{type:"button"},on:{click:e.deleteMediaClick}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"trash"}})])]),t("div",{staticClass:"media__actions-dropDown"},[t("a17-dropdown",{ref:"dropDown",attrs:{position:"right"}},[t("a17-button",{attrs:{size:"icon",variant:"icon"},on:{click:function(t){return e.$refs.dropDown.toggle()}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"more-dots"}})]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[t("a",{attrs:{href:e.media.original,download:""}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"download"}}),e._v(e._s(e.$trans("fields.medias.download")))]),e.activeCrop?t("button",{attrs:{type:"button"},on:{click:e.openCropMedia}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"crop"}}),e._v(e._s(e.$trans("fields.medias.crop"))+" ")]):e._e(),t("button",{attrs:{type:"button"},on:{click:e.deleteMediaClick}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"trash"}}),e._v(e._s(e.$trans("fields.medias.delete")))])])],1)],1)],1):e._e(),e.hasMedia?e._e():t("a17-button",{attrs:{variant:"ghost",disabled:e.disabled},on:{click:e.openMediaLibrary}},[e._v(e._s(e.btnLabel))]),this.$slots.default?t("p",{staticClass:"media__note f--small"},[e._t("default")],2):e._e(),e.hasMedia&&e.withAddInfo?t("div",{staticClass:"media__metadatas--options",class:{"s--active":e.metadatas.active}},[t("a17-mediametadata",{attrs:{name:e.metadataName,label:e.$trans("fields.medias.alt-text","Alt Text"),id:"altText",media:e.media,maxlength:e.altTextMaxLength},on:{change:e.updateMetadata}}),e.withCaption?t("a17-mediametadata",{attrs:{wysiwyg:e.useWysiwyg,"wysiwyg-options":e.wysiwygOptions,type:"text",name:e.metadataName,label:e.$trans("fields.medias.caption","Caption"),id:"caption",media:e.media,maxlength:e.captionMaxLength},on:{change:e.updateMetadata}}):e._e(),e.withVideoUrl?t("a17-mediametadata",{attrs:{name:e.metadataName,label:e.$trans("fields.medias.video-url","Video URL (optional)"),id:"video",media:e.media},on:{change:e.updateMetadata}}):e._e(),e._l(e.extraMetadatas,(function(i){return[e.extraMetadatas.length>0?t("a17-mediametadata",{key:i.name,attrs:{type:i.type,name:e.metadataName,wysiwyg:i.wysiwyg||!1,"wysiwyg-options":i.wysiwygOptions||e.wysiwygOptions,label:i.label,id:i.name,media:e.media,maxlength:i.maxlength||0},on:{change:e.updateMetadata}}):e._e()]}))],2):e._e()],1),e.hasMedia&&e.activeCrop?t("a17-modal",{ref:e.cropModalName,staticClass:"modal--cropper",attrs:{forceClose:!0,title:e.$trans("fields.medias.crop-edit"),mode:"medium"}},[t("a17-cropper",{key:e.cropperKey,attrs:{media:e.media,aspectRatio:16/9,context:e.cropContext},on:{"crop-end":e.cropMedia}},[t("a17-button",{staticClass:"cropper__button",attrs:{variant:"action"},on:{click:function(t){return e.$refs[e.cropModalName].close()}}},[e._v(e._s(e.$trans("fields.medias.crop-save")))])],1)],1):e._e(),t("input",{attrs:{name:e.inputName,type:"hidden"},domProps:{value:JSON.stringify(e.media)}})],1)},Di=[],Mi=i(3932),Ii=i.n(Mi),Oi=function(){var e=this,t=e._self._c;return t("div",{staticClass:"cropper"},[t("header",{staticClass:"cropper__header"},[e.multiCrops?t("ul",{staticClass:"cropper__breakpoints"},e._l(e.cropOptions,(function(i,s,a){return t("li",{key:s,class:{"s--active":e.toggleBreakpoint===a},on:{click:function(t){return e.changeCrop(s,a)}}},[e._v(e._s(e._f("capitalize")(s)))])})),0):e._e()]),t("div",{staticClass:"cropper__content"},[t("div",{ref:"cropWrapper",staticClass:"cropper__wrapper"},[t("img",{ref:"cropImage",staticClass:"cropper__img",attrs:{src:e.currentMedia.medium||e.currentMedia.original,alt:e.currentMedia.name}})])]),t("footer",{staticClass:"cropper__footer"},[e.ratiosByContext.length>1?t("ul",{staticClass:"cropper__ratios"},e._l(e.ratiosByContext,(function(i){return t("li",{key:i.name,staticClass:"f--small",class:{"s--active":e.currentRatioName===i.name},on:{click:function(t){return e.changeRatio(i)}}},[e._v(e._s(e._f("capitalize")(i.name)))])})),0):e._e(),t("span",{staticClass:"cropper__values f--small hide--xsmall",class:e.cropperWarning},[e._v(e._s(e.cropValues.original.width)+" × "+e._s(e.cropValues.original.height))]),e._t("default")],2)])},Pi=[],Bi=i(3616),Ri=i.n(Bi),Ni=i(844);const Fi=(e,t,i)=>({x:Math.round(e.x*t.width/i.width),y:Math.round(e.y*t.height/i.height),width:Math.round(e.width*t.width/i.width),height:Math.round(e.height*t.height/i.height)});var $i={name:"a17Cropper",props:{media:{type:Object,default:()=>{}},context:{type:String,default:""}},mixins:[Ni.c],data:function(){return{cropper:null,currentMedia:this.media,currentCrop:Object.keys(this.media.crops)[0],toggleBreakpoint:0,cropValues:{natural:{width:null,height:null},original:{width:this.media.crops[Object.keys(this.media.crops)[0]].width,height:this.media.crops[Object.keys(this.media.crops)[0]].height}},minCropValues:{width:0,height:0},currentRatioName:this.media.crops[Object.keys(this.media.crops)[0]].name}},watch:{media:function(e){this.currentMedia=e}},computed:{cropOptions:function(){return this.allCrops.hasOwnProperty(this.context)?this.allCrops[this.context]:{}},crop:function(){return this.currentMedia.crops[this.currentCrop]||{}},multiCrops:function(){return Object.keys(this.cropOptions).length>1},ratiosByContext:function(){const e=this.cropOptions[this.currentCrop];return e||[]},cropperOpts:function(){return{...this.defaultCropsOpts,cropmove:()=>{this.updateCropperValues()},cropend:()=>{this.sendCropperValues()}}},cropperWarning:function(){return{cropper__warning:this.cropValues.original.widthe.mediaLibrary.crops})},filters:Qt.c,mounted:function(){const e=this.cropperOpts,t=this.$refs.cropImage,i=this.$refs.cropWrapper,s=new Image;s.addEventListener("load",(()=>{i.style.maxWidth=i.getBoundingClientRect().width+"px",i.style.minHeight=i.getBoundingClientRect().height+"px",this.cropper=new(Ri())(t,e)}),{once:!0,passive:!0,capture:!0}),s.src=this.currentMedia.medium||this.currentMedia.original,t.addEventListener("ready",(()=>{this.cropValues.natural.width=s.naturalWidth,this.cropValues.natural.height=s.naturalHeight,this.updateCrop()}),{once:!0,passive:!0,capture:!0})},methods:{initAspectRatio:function(){const e=this.ratiosByContext,t=e.find((e=>e.name===this.currentRatioName));if("undefined"!==typeof t&&t)return this.minCropValues.width=t.minValues?t.minValues.width:0,this.minCropValues.height=t.minValues?t.minValues.height:0,void this.cropper.setAspectRatio(t.ratio);this.cropper.setAspectRatio(this.aspectRatio)},changeCrop:function(e,t){this.currentCrop=e,this.currentRatioName=this.crop.name||this.cropOptions[e][0].name,this.toggleBreakpoint=t,this.updateCrop(),this.sendCropperValues()},changeRatio:function(e){this.currentRatioName=e.name,this.updateCrop(),this.sendCropperValues()},updateCrop:function(){this.initAspectRatio(),this.initCrop(),this.updateCropperValues()},updateCropperValues:function(){const e=this.cropper.getData(!0),t=this.toOriginalCrop(e);this.cropValues.original.width=t.width,this.cropValues.original.height=t.height},initCrop:function(){const e=this.toNaturalCrop(this.crop);this.cropper.setData({x:e.x}),this.cropper.setData({y:e.y}),this.cropper.setData({width:e.width}),this.cropper.setData({height:e.height})},test:function(){const e=this.toNaturalCrop({x:0,y:0,width:380,height:475});this.cropper.setAspectRatio(.8),this.cropper.setData(e)},sendCropperValues:function(){const e={values:{}};e.values[this.currentCrop]=this.toOriginalCrop(this.cropper.getData(!0)),e.values[this.currentCrop].name=this.currentRatioName,this.$emit("crop-end",e)},toNaturalCrop:function(e){return Fi(e,this.cropValues.natural,this.currentMedia)},toOriginalCrop:function(e){return Fi(e,this.currentMedia,this.cropValues.natural)}},beforeDestroy:function(){this.cropper.destroy()}},Ui=$i,Vi=(0,k.c)(Ui,Oi,Pi,!1,null,"4078e85d",null),qi=Vi.exports,Wi=function(){var e=this,t=e._self._c;return e.languages.length>1&&"text"===e.fieldType?t("a17-locale",{attrs:{type:e.wysiwyg?"a17-wysiwyg":"a17-textfield",initialValues:e.initialValues,attributes:e.attributes},on:{change:e.saveMetadata}}):"text"===e.fieldType&&e.wysiwyg?t("div",[t("a17-wysiwyg",{attrs:{options:e.wysiwygOptions,label:e.label,name:e.fieldName,type:e.fieldType,initialValue:e.initialValue,"in-store":"value",maxlength:e.maxlength},on:{change:e.saveMetadata}}),t("p",{staticClass:"f--note f--small",domProps:{innerHTML:e._s(e.placeholder)}})],1):"text"===e.fieldType?t("a17-textfield",{attrs:{label:e.label,name:e.fieldName,type:"text",placeholder:e.placeholder,initialValue:e.initialValue,"in-store":"value",maxlength:e.maxlength},on:{change:e.saveMetadata}}):"checkbox"===e.fieldType?t("div",{staticClass:"mediaMetadata__checkbox"},[t("a17-checkbox",{attrs:{label:e.label,name:e.fieldName,initialValue:e.initialValue,value:1,inStore:"value"},on:{change:e.saveMetadata}})],1):e._e()},Hi=[],zi={name:"A17MediaMetadata",props:{media:{type:Object,default:()=>{}},name:{type:String,required:!0},id:{type:String,required:!0},label:{type:String,required:!0},wysiwyg:{type:Boolean,default:!1},wysiwygOptions:{type:Object,required:!1,default:function(){return{}}},type:{type:String,required:!1},maxlength:{type:Number,required:!1,default:0}},data:function(){return{initialValues:{},initialValue:""}},computed:{fieldName:function(){return"".concat(this.name,"[").concat(this.id,"]")},fieldType:function(){return this.type?this.type:"text"},defaultMetadatas:function(){return this.media.hasOwnProperty("metadatas")&&this.media.metadatas.default[this.id]||!1},customMetadatas:function(){return this.media.hasOwnProperty("metadatas")&&this.media.metadatas.custom[this.id]||!1},attributes:function(){return{label:this.label,name:this.fieldName,type:"text",placeholder:this.placeholder,options:this.wysiwygOptions,inStore:"value",maxlength:this.maxlength}},placeholder:function(){return this.defaultMetadatas?"object"===typeof this.defaultMetadatas?this.defaultMetadatas.hasOwnProperty(this.currentLocale)?this.defaultMetadatas[this.currentLocale]:"":null!==this.defaultMetadatas?this.defaultMetadatas:"":""},...(0,_.ys)({languages:e=>e.language.all,currentLocale:e=>e.language.active.value})},methods:{saveMetadata:function(e){if(!e.locale){const t=e;e={value:t}}e.id=this.id,this.$emit("change",e)}},mounted:function(){const e={};let t="",i=0;this.languages.forEach((s=>{const a=s.value;if(this.customMetadatas){this.customMetadatas[a]?e[a]=this.customMetadatas[a]:!0!==this.customMetadatas&&"string"!==typeof this.customMetadatas||0!==i?e[a]="":(e[a]=this.customMetadatas,t=this.customMetadatas);const s={};s.name=this.fieldName,s.value=e[a],this.languages.length>1&&(s.locale=a),this.$store.commit(v.tt.UPDATE_FORM_FIELD,s)}i++})),this.initialValues=e,this.initialValue=t}},Ki=zi,ji=(0,k.c)(Ki,Wi,Hi,!1,null,"6c6bb80c",null),Gi=ji.exports,Yi={props:{withAddInfo:{type:Boolean,default:!0},withVideoUrl:{type:Boolean,default:!1},withCaption:{type:Boolean,default:!0},altTextMaxLength:{type:Number,default:0},captionMaxLength:{type:Number,default:0},note:{type:String,default:""},cropContext:{type:String,default:""},extraMetadatas:{type:Array,default(){return[]}}}};const Xi=-1!==navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("Chrome");var Ji={name:"A17Mediafield",components:{"a17-cropper":qi,"a17-mediametadata":Gi},mixins:[Ve.c,Yi],props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},btnLabel:{type:String,default(){return this.$trans("fields.medias.btn-label","Attach image")}},hover:{type:Boolean,default:!1},isSlide:{type:Boolean,default:!1},index:{type:Number,default:0},mediaContext:{type:String,default:""},activeCrop:{type:Boolean,default:!0},widthMin:{type:Number,default:0},heightMin:{type:Number,default:0}},data:function(){return{canvas:null,img:null,ctx:null,imgLoaded:!1,cropSrc:"",showImg:!1,isDestroyed:!1,naturalDim:{width:null,height:null},originalDim:{width:null,height:null},hasMediaChanged:!1,metadatas:{text:this.$trans("fields.medias.edit-info"),textOpen:this.$trans("fields.medias.edit-info"),textClose:this.$trans("fields.medias.edit-close"),active:!1}}},filters:Qt.c,computed:{...(0,_.ys)({useWysiwyg:e=>e.mediaLibrary.config.useWysiwyg,wysiwygOptions:e=>e.mediaLibrary.config.wysiwygOptions}),cropThumbnailStyle:function(){return this.showImg?{}:this.hasMedia&&this.media.crops?0===this.cropSrc.length?{}:{backgroundImage:"url(".concat(this.cropSrc,")")}:{}},cropThumbnailClass:function(){if(!this.hasMedia)return{};if(!this.media.crops)return{};const e=this.media.crops[Object.keys(this.media.crops)[0]];return{"media__img--landscape":e.width/e.height>=1,"media__img--portrait":e.width/e.height<1}},mediaKey:function(){return this.mediaContext.length>0?this.mediaContext:this.name},inputName:function(){let e=this.name;return this.name.indexOf("[")&&(e=this.name.replace("]","").replace("[","][")),"medias["+e+"]["+this.index+"]"},metadataName:function(){return"mediaMeta["+this.name+"]["+this.media.id+"]"},media:function(){return this.selectedMedias.hasOwnProperty(this.mediaKey)&&this.selectedMedias[this.mediaKey][this.index]||{}},cropInfos:function(){const e=[];if(this.media.crops)for(const t in this.media.crops)if(this.media.crops[t].width+this.media.crops[t].height){let i="";i+=this.media.crops[t].name+" "+this.$trans("fields.medias.crop-list")+": ",i+=this.media.crops[t].width+" × "+this.media.crops[t].height,e.push(i)}return e.length>0?e:null},hasMedia:function(){return Object.keys(this.media).length>0},cropperKey:function(){return"".concat(this.mediaKey,"-").concat(this.index,"_").concat(this.cropContext)},mediaHasCrop:function(){return this.media.crops},cropModalName:function(){return"".concat(name,"Modal")},...(0,_.ys)({selectedMedias:e=>e.mediaLibrary.selected,allCrops:e=>e.mediaLibrary.crops})},watch:{media:function(e,t){this.hasMediaChanged=e!==t,this.selectedMedias.hasOwnProperty(this.mediaKey)&&this.selectedMedias[this.mediaKey][this.index]&&(this.isDestroyed=!1)}},methods:{canvasCrop(){const e=this.media.crops[Object.keys(this.media.crops)[0]];if(!e)return;if(e.width+e.height===0)return void this.showDefaultThumbnail();let t=this.media.thumbnail;this.$nextTick((()=>{try{const i=Fi(e,this.naturalDim,this.originalDim),s=i.width,a=i.height;this.canvas.width=s,this.canvas.height=a,this.ctx.drawImage(this.img,i.x,i.y,s,a,0,0,s,a),t=this.canvas.toDataURL("image/png"),this.cropSrc!==t&&(this.showImg=!1,this.cropSrc=t)}catch(i){console.error(i),this.cropSrc!==t&&(this.showImg=!0,this.cropSrc=t)}}))},setDefaultCrops:function(){const e={},t=[];if(this.allCrops.hasOwnProperty(this.cropContext)){for(const i in this.allCrops[this.cropContext]){const s=this.allCrops[this.cropContext][i][0].ratio,a=this.media.width,n=this.media.height,o={x:a/2,y:n/2};let r=a,l=n;s>0&&s<1?(r=Math.floor(Math.min(n*s,a)),l=Math.floor(r/s)):s>=1&&(l=Math.floor(Math.min(a/s,n)),r=Math.floor(l*s));let d={x:0,y:0,width:r,height:l};d=Fi(d,this.naturalDim,this.originalDim),t.push(Ii().crop(this.img,{width:d.width,height:d.height,minScale:1}));const c=Math.floor(o.x-r/2),u=Math.floor(o.y-l/2);e[i]={},e[i].name=this.allCrops[this.cropContext][i][0].name||i,e[i].x=c,e[i].y=u,e[i].width=r,e[i].height=l}Promise.all(t).then((t=>{let i=0;t.forEach((t=>{const s={x:t.topCrop.x,y:t.topCrop.y,width:t.topCrop.width,height:t.topCrop.height},a=e[Object.keys(e)[i]],n=Fi(s,this.originalDim,this.naturalDim);a.x=n.x,a.y=n.y,a.width=n.width,a.height=n.height,i++})),this.cropMedia({values:e})}),(t=>{console.error(t),this.cropMedia({values:e})}))}else this.cropMedia({values:e})},cropMedia:function(e){e.key=this.mediaKey,e.index=this.index,this.$store.commit(v.ol.SET_MEDIA_CROP,e),this.img&&this.canvasCrop()},setNaturalDimensions:function(){this.img&&(this.naturalDim.width=this.img.naturalWidth,this.naturalDim.height=this.img.naturalHeight)},setOriginalDimensions:function(){this.media&&(this.originalDim.width=this.media.width,this.originalDim.height=this.media.height)},init:function(){this.showImg=!1;const e=()=>{this.setNaturalDimensions(),this.setOriginalDimensions(),this.mediaHasCrop?this.canvasCrop():this.setDefaultCrops()};this.hasMedia&&(this.cropSrc=this.media.thumbnail,this.initImg().then((()=>{e()}),(t=>{console.error(t),this.showDefaultThumbnail(),this.$nextTick((()=>{const t=this.$refs.mediaImg;t?(t.addEventListener("load",(()=>{this.img=t,e()}),{once:!0,passive:!0,capture:!0}),t.addEventListener("error",(e=>{console.error(e),this.showDefaultThumbnail()}))):(this.showImg=!1,this.cropSrc=this.media.thumbnail)}))})),this.hasMediaChanged=!1)},initImg:function(){return new Promise(((e,t)=>{this.img=new Image,Xi||(this.img.crossOrigin="Anonymous"),this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.img.addEventListener("load",(()=>{e()}),{once:!0,passive:!0,capture:!0}),this.img.addEventListener("error",(e=>{t(e)}));let i="?";this.media.thumbnail.indexOf("?")>-1&&(i="&"),this.img.src=this.media.thumbnail+i+"no-cache"}))},showDefaultThumbnail:function(){this.showImg=!0,this.hasMedia&&(this.cropSrc=this.media.thumbnail)},openCropMedia:function(){this.$refs[this.cropModalName].open()},deleteMediaClick:function(){this.isDestroyed=!0,this.deleteMedia()},deleteMedia:function(){this.$store.commit(v.ol.DESTROY_SPECIFIC_MEDIA,{name:this.mediaKey,index:this.index})},updateMetadata:function(e){this.$store.commit(v.ol.SET_MEDIA_METADATAS,{media:{context:this.mediaKey,index:this.index},value:e})},metadatasInfos:function(){this.metadatas.active=!this.metadatas.active,this.metadatas.text=this.metadatas.active?this.metadatas.textClose:this.metadatas.textOpen},destroyValue:function(){this.isSlide||this.isDestroyed||this.deleteMedia()}},beforeMount:function(){this.init()},beforeUpdate:function(){this.hasMediaChanged&&this.init()}},Qi=Ji,Zi=(0,k.c)(Qi,Li,Di,!1,null,"3f736376",null),es=Zi.exports,ts=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,label:e.label,locale:e.locale,size:e.size,note:e.note,name:e.name},on:{localize:e.updateLocale}},[e.max>1||0===e.max?t("a17-slideshow",{attrs:{name:e.name,cropContext:e.cropContext,max:e.max,required:e.required,buttonOnTop:e.buttonOnTop,withAddInfo:e.withAddInfo,withVideoUrl:e.withVideoUrl,withCaption:e.withCaption,altTextMaxLength:e.altTextMaxLength,captionMaxLength:e.captionMaxLength,extraMetadatas:e.extraMetadatas,disabled:e.disabled}},[e._t("default")],2):t("a17-mediafield",{attrs:{name:e.name,cropContext:e.cropContext,required:e.required,withAddInfo:e.withAddInfo,withVideoUrl:e.withVideoUrl,withCaption:e.withCaption,altTextMaxLength:e.altTextMaxLength,captionMaxLength:e.captionMaxLength,extraMetadatas:e.extraMetadatas,disabled:e.disabled}},[e._t("default")],2)],1)},is=[],ss={name:"A17MediafieldTranslated",mixins:[Ue.c,ee.c,Yi],props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},max:{type:Number,default:1},buttonOnTop:{type:Boolean,default:!1}}},as=ss,ns=(0,k.c)(as,ts,is,!1,null,null,null),os=ns.exports,rs=i(5256),ls=function(){var e=this,t=e._self._c;return t("div",{staticClass:"multiselectorOuter"},[t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,name:e.name,"add-new":e.addNew}},[t("div",{staticClass:"multiselector",class:e.gridClasses},[t("div",{staticClass:"multiselector__outer"},e._l(e.fullOptions,(function(i,s){return t("div",{key:s,staticClass:"multiselector__item",style:e.itemStyle},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.checkedValue,expression:"checkedValue"}],staticClass:"multiselector__checkbox",class:{"multiselector__checkbox--checked":e.checkedValue.includes(i.value)},attrs:{type:"checkbox",name:e.name+"["+e.randKey+"]",id:e.uniqId(i.value,s),disabled:i.disabled||e.disabled},domProps:{value:i.value,checked:Array.isArray(e.checkedValue)?e._i(e.checkedValue,i.value)>-1:e.checkedValue},on:{change:function(t){var s=e.checkedValue,a=t.target,n=!!a.checked;if(Array.isArray(s)){var o=i.value,r=e._i(s,o);a.checked?r<0&&(e.checkedValue=s.concat([o])):r>-1&&(e.checkedValue=s.slice(0,r).concat(s.slice(r+1)))}else e.checkedValue=n}}}),t("label",{staticClass:"multiselector__label",attrs:{for:e.uniqId(i.value,s)},on:{click:function(t){return t.preventDefault(),e.changeCheckbox(i.value)}}},[t("span",{staticClass:"multiselector__icon"},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"check"}})]),e._v(" "+e._s(i.label)+" ")]),t("span",{staticClass:"multiselector__bg"})])})),0)])]),e.addNew?[t("a17-modal-add",{ref:"addModal",attrs:{name:e.name,"form-create":e.addNew,"modal-title":"Add new "+e.label}},[e._t("addModal")],2)]:e._e()],2)},ds=[],cs=i(248),us={name:"A17Multiselect",mixins:[W.c,ee.c,Q.c,Z.c,cs.c],props:{grid:{type:Boolean,default:!0},columns:{type:Number,default:0},inline:{type:Boolean,default:!1},border:{type:Boolean,default:!1}},computed:{gridClasses:function(){return this.columns>=1?["multiselector--columns",this.grid?"multiselector--grid":""]:[this.grid?"multiselector--grid":"",this.inline?"multiselector--inline":"",this.border?"multiselector--border":""]},itemStyle:function(){return this.columns>=1?{width:"".concat(100/this.columns,"%")}:{}}},methods:{updateFromStore:function(e){J()(e,this.checkedValue)||(this.checkedValue=e)},changeCheckbox:function(e){const t=this.checkedValue.indexOf(e),i=this.checkedValue.slice();t>-1?i.splice(t,1):i.push(e);const s=this.isMax(i),a=this.isMin(i);s||a||(this.checkedValue=i)},uniqId:function(e,t){return this.name+"_"+e+"-"+this.randKey*(t+1)}}},hs=us,ps=(0,k.c)(hs,ls,ds,!1,null,"8819f42c",null),ms=ps.exports,fs=function(){var e=this,t=e._self._c;return t("span",{staticClass:"radio",class:e.customClass},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedValue,expression:"selectedValue"}],staticClass:"radio__input",attrs:{type:"radio",name:e.name,id:e.uniqId(e.value),disabled:e.disabled},domProps:{value:e.value,checked:e._q(e.selectedValue,e.value)},on:{change:function(t){e.selectedValue=e.value}}}),t("label",{staticClass:"radio__label",attrs:{for:e.uniqId(e.value)}},[e._v(e._s(e.label))])])},gs=[],_s={name:"A17Radio",mixins:[W.c],props:{customClass:{type:String,default:""},value:{default:""},name:{type:String,default:""},label:{type:String,default:""},initialValue:{default:""},disabled:{type:Boolean,default:!1}},data:function(){return{currentValue:this.initialValue}},computed:{selectedValue:{get:function(){return this.currentValue},set:function(e){this.currentValue=e,this.$emit("change",e)}}},methods:{uniqId:function(e){return this.name+"_"+e+"-"+this.randKey}}},bs=_s,vs=(0,k.c)(bs,fs,gs,!1,null,"6de2145c",null),ys=vs.exports,ws=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,name:e.name,"label-for":e.uniqId}},[t("ul",{staticClass:"radioGroup",class:e.radioClasses},e._l(e.radios,(function(i,s){return t("li",{key:s,staticClass:"radioGroup__item"},[t("a17-radio",{attrs:{customClass:"radio__"+e.radioClass+"--"+(s+1),name:e.name,value:i.value,label:i.label,initialValue:e.currentValue,disabled:i.disabled},on:{change:e.changeValue}})],1)})),0)])},Es=[],Ts={name:"A17CheckboxGroup",mixins:[W.c,ee.c,Z.c],props:{radioClass:{type:String,default:""},inline:{type:Boolean,default:!1},name:{type:String,default:""},label:{default:""},initialValue:{default:""},radios:{default:function(){return[]}}},data:function(){return{currentValue:this.initialValue}},computed:{uniqId:function(e){return this.name+"-"+this.randKey},radioClasses:function(){return[this.inline?"radioGroup--inline":""]}},methods:{updateFromStore:function(e){e!==this.currentValue&&this.updateValue(e)},updateValue:function(e){this.currentValue=e},changeValue:function(e){e!==this.currentValue&&(this.updateValue(e),this.$emit("change",this.currentValue),this.saveIntoStore(e))}}},ks=Ts,Cs=(0,k.c)(ks,ws,Es,!1,null,"35a49f72",null),As=Cs.exports,xs=function(){var e=this,t=e._self._c;return t("div",[t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,locale:e.locale,name:e.name,"label-for":e.uniqId,required:e.required,"add-new":e.addNew},on:{localize:e.updateLocale}},[t("span",{staticClass:"select__input",class:e.selectClasses},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedValue,expression:"selectedValue"}],attrs:{name:e.name,id:e.uniqId,disabled:e.disabled,required:e.required,readonly:e.readonly},on:{change:function(t){var i=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.selectedValue=t.target.multiple?i:i[0]}}},e._l(e.fullOptions,(function(i,s){return t("option",{key:s,domProps:{value:i.value,innerHTML:e._s(i.label)}})})),0)])]),e.addNew?[t("a17-modal-add",{ref:"addModal",attrs:{name:e.name,"form-create":e.addNew,"modal-title":"Add new "+e.label}},[e._t("addModal")],2)]:e._e()],2)},Ss=[],Ls={name:"A17Select",mixins:[W.c,ge.c,ee.c,Ue.c,Z.c,cs.c],props:{size:{type:String,default:""},selected:{default:""},options:{default:function(){return[]}}},data:function(){return{value:this.selected}},computed:{uniqId:function(e){return this.name+"-"+this.randKey},selectClasses:function(){return["small"===this.size?"select__input--small":"","large"===this.size?"select__input--large":""]},selectedValue:{get:function(){return this.value},set:function(e){this.value=e,this.saveIntoStore(e),this.$emit("change",e)}}},methods:{updateFromStore:function(e){this.value=e}},mounted:function(){this.$emit("change",this.value)}},Ds=Ls,Ms=(0,k.c)(Ds,xs,Ss,!1,null,"467fbd52",null),Is=Ms.exports,Os=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,name:e.name}},[t("div",{staticClass:"singleCheckbox",class:e.wrapperClasses},[t("span",{staticClass:"checkbox"},[t("input",{staticClass:"checkbox__input",class:e.checkboxClasses,attrs:{type:"checkbox",value:"true",name:e.name+"["+e.randKey+"]",id:e.uniqId,disabled:e.disabled},domProps:{checked:e.checkedValue}}),t("label",{staticClass:"checkbox__label",attrs:{for:e.uniqId},on:{click:function(t){return t.preventDefault(),e.changeCheckbox.apply(null,arguments)}}},[e._v(e._s(e.label)+" "),t("span",{staticClass:"checkbox__icon"},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"check"}})]),e.note?t("span",{staticClass:"f--small checkbox__note"},[e._v(e._s(e.note))]):e._e()])])]),e.requireConfirmation?[t("a17-dialog",{ref:"warningConfirm",attrs:{"modal-title":"Confirm","confirm-label":"Confirm"}},[t("p",{staticClass:"modal--tiny-title"},[t("strong",[e._v(e._s(e.confirmTitleText))])]),t("p",[e._v(e._s(e.confirmMessageText))])])]:e._e()],2)},Ps=[],Bs={props:{requireConfirmation:{type:Boolean,default:!1},confirmMessageText:{type:String,default:"Are you sure you want to change this option ?"},confirmTitleText:{type:String,default:"Confirm selection"}}},Rs={name:"A17SingleCheckbox",mixins:[W.c,ee.c,Z.c,Bs],props:{name:{type:String,default:""},initialValue:{type:Boolean,default:!0},theme:{type:String,default:""},disabled:{type:Boolean,default:!1},border:{type:Boolean,default:!1}},data:function(){return{currentValue:this.initialValue}},computed:{uniqId:function(){return this.name+"_"+this.randKey},wrapperClasses:function(){return[this.border?"singleCheckbox--border":""]},checkboxClasses:function(){return[this.theme?"checkbox__input--".concat(this.theme):"",this.checkedValue?"checkbox__input--checked":""]},checkedValue:{get:function(){return this.currentValue},set:function(e){e!==this.currentValue&&(this.currentValue=e,"undefined"!==typeof this.saveIntoStore&&this.saveIntoStore(e),this.$emit("change",e))}}},methods:{updateFromStore:function(e){this.checkedValue=e},changeCheckbox:function(){this.requireConfirmation?this.$refs.warningConfirm.open((()=>{this.checkedValue=!this.checkedValue})):this.checkedValue=!this.checkedValue}}},Ns=Rs,Fs=(0,k.c)(Ns,Os,Ps,!1,null,"552b859e",null),$s=Fs.exports,Us=function(){var e=this,t=e._self._c;return t("div",{class:e.outerClasses},[t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,name:e.name,"add-new":e.addNew,variant:e.variantInput}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],attrs:{type:"hidden",name:e.name},domProps:{value:e.value},on:{input:function(t){t.target.composing||(e.value=t.target.value)}}}),t("div",{staticClass:"singleselector",class:e.gridClasses},[t("div",{staticClass:"singleselector__outer"},e._l(e.fullOptions,(function(i,s){return t("div",{key:s,staticClass:"singleselector__item",style:e.itemStyle},[t("input",{staticClass:"singleselector__radio",class:{"singleselector__radio--checked":i.value==e.selectedValue},attrs:{type:"radio",name:e.name+"["+e.randKey+"]",id:e.uniqId(i.value,s),disabled:i.disabled||e.disabled},domProps:{value:i.value}}),t("label",{staticClass:"singleselector__label",attrs:{for:e.uniqId(i.value,s)},on:{click:function(t){return t.preventDefault(),e.changeRadio(i.value)}}},[e._v(e._s(i.label))]),t("span",{staticClass:"singleselector__bg"})])})),0)])]),e.addNew?[t("a17-modal-add",{ref:"addModal",attrs:{name:e.name,"form-create":e.addNew,"modal-title":"Add new "+e.label}},[e._t("addModal")],2)]:e._e(),e.requireConfirmation?[t("a17-dialog",{ref:"warningConfirm",attrs:{"modal-title":"Confirm","confirm-label":"Confirm"}},[t("p",{staticClass:"modal--tiny-title"},[t("strong",[e._v(e._s(e.confirmTitleText))])]),t("p",[e._v(e._s(e.confirmMessageText))])])]:e._e()],2)},Vs=[],qs={name:"A17Singleselect",mixins:[W.c,ee.c,Z.c,cs.c,Bs],props:{name:{type:String,default:""},grid:{type:Boolean,default:!0},columns:{type:Number,default:0},inline:{type:Boolean,default:!0},inTable:{type:Boolean,default:!1},border:{type:Boolean,default:!1},selected:{default:""},options:{default:function(){return[]}},disabled:{type:Boolean,default:!1}},data:function(){return{value:this.selected}},computed:{variantInput:function(){return[this.inTable?"intable":""].join(" ")},outerClasses:function(){return["multiselectorOuter"]},gridClasses:function(){return this.columns>=1?["singleselector--columns",this.grid?"singleselector--grid":""]:[this.grid?"singleselector--grid":"",this.inline?"singleselector--inline":"",this.border?"singleselector--border":""]},itemStyle:function(){return this.columns>=1?{width:"".concat(100/this.columns,"%")}:{}},selectedValue:{get:function(){return this.value},set:function(e){e!==this.value&&(this.value=e,this.saveIntoStore(e),this.$emit("change",e))}}},methods:{updateFromStore:function(e){e!==this.value&&(this.value=e)},changeRadio:function(e){this.requireConfirmation?this.$refs.warningConfirm.open((()=>{this.selectedValue=e})):this.selectedValue=e},uniqId:function(e,t){return this.name+"_"+e+"-"+this.randKey*(t+1)}}},Ws=qs,Hs=(0,k.c)(Ws,Us,Vs,!1,null,"0406024e",null),zs=Hs.exports,Ks=function(){var e=this,t=e._self._c;return t("div",{staticClass:"multiselectorPermissions"},[e.searchable?t("div",{staticClass:"multiselectorPermissions__filter"},[t("a17-filter",{attrs:{"full-width":!0},on:{submit:e.submitFilter}},[e.groups.length&&e.listUser?t("div",{staticClass:"multiselectorPermissions__groups",attrs:{slot:"additional-actions"},slot:"additional-actions"},[t("a17-dropdown",{ref:"groupDropdown",staticClass:"multiselectorPermissions__dd",attrs:{position:"bottom-right",clickable:!0}},[t("button",{staticClass:"multiselectorPermissions__button",attrs:{type:"button"},on:{click:function(t){return e.$refs.groupDropdown.toggle()}}},[e._v("Groups")]),t("div",{attrs:{slot:"dropdown__content"},slot:"dropdown__content"},[t("a17-checkboxgroup",{attrs:{name:"permissionsGroups",selected:e.activeGroups,options:e.groups},on:{change:e.updateUserPermission}})],1)])],1):e._e()])],1):e._e(),t("div",{staticClass:"multiselectorPermissions__items"},[e._t("default"),e.empty?t("div",{staticClass:"multiselectorPermissions__empty",style:e.emptyStyle},[t("h4",[e._v(e._s(e.emptyMessage))])]):e._e(),e.allHidden?t("div",{staticClass:"multiselectorPermissions__empty",style:e.emptyStyle},[t("h4",[e._v(e._s(e.allHiddenMessage))])]):e._e()],2)])},js=[],Gs={name:"A17SingleSelectPermissions",components:{"a17-filter":Pt.c},props:{searchable:{type:Boolean,default:!0},listUser:{type:Boolean,default:!1},emptyMessage:{type:String,default:"No results found. Please try another search"},allHiddenMessage:{type:String,default:"Use the search box to find items"}},data:function(){return{empty:!1,allHidden:!1,activeGroups:[],emptyHeight:120}},computed:{emptyStyle:function(){return{height:this.emptyHeight+"px"}},...(0,_.gV)(["fieldsByName"]),...(0,_.ys)({groups:e=>e.permissions.groups,groupUserMapping:e=>e.permissions.groupUserMapping})},mounted(){if(!this.listUser){const e=this.$el.querySelectorAll("[data-singleselect-permissions-field]"),t="multiselectorPermissions__item--hidden";if(e.length){let i=0;e.forEach((e=>{const s=e.getAttribute("data-singleselect-permissions-field"),a=this.fieldsByName(s),n=a.length?a[0].value:"";n||(e.classList.add(t),i++)})),i===e.length&&(this.allHidden=!0)}}},methods:{submitFilter(e){const t=this.$el.querySelectorAll("[data-singleselect-permissions-filterable]"),i="multiselectorPermissions__item--hidden";t.length&&(this.emptyHeight=Math.max(120,t[0].parentElement.offsetHeight),this.empty=!0,this.allHidden=!1,t.forEach((t=>{const s=t.getAttribute("data-singleselect-permissions-filterable");if(e.search){const a=e.search;s.toUpperCase().includes(a.toUpperCase())?(t.classList.remove(i),this.empty=!1):t.classList.add(i)}else t.classList.remove(i),this.empty=!1})))},setUserPermission(e){const t={};t.name=e,t.value="view-item",this.$store.commit(v.tt.UPDATE_FORM_FIELD,t)},updateUserPermission(e){this.activeGroups=e,e.forEach((e=>{this.groupUserMapping[e]&&this.groupUserMapping[e].forEach((e=>{const t="user_".concat(e,"_permission"),i=this.fieldsByName(t);i.length&&""!==i[0].value&&"view-item"!==i[0].value||this.setUserPermission(t)}))}))}}},Ys=Gs,Xs=(0,k.c)(Ys,Ks,js,!1,null,"627613a1",null),Js=Xs.exports,Qs=function(){var e=this,t=e._self._c;return t("div",{staticClass:"slideshow"},[e.buttonOnTop&&e.remainingSlides>0?t("div",{staticClass:"slideshow__trigger"},[t("a17-button",{attrs:{disabled:e.disabled,type:"button",variant:"ghost"},on:{click:function(t){return e.openMediaLibrary(e.remainingSlides)}}},[e._v(e._s(e.addLabel))]),t("span",{staticClass:"slideshow__note f--small"},[e._t("default")],2)],1):e._e(),e.slides.length?t("draggable",e._b({staticClass:"slideshow__content",model:{value:e.slides,callback:function(t){e.slides=t},expression:"slides"}},"draggable",e.dragOptions,!1),[t("transition-group",{attrs:{name:"draggable_list",tag:"div"}},e._l(e.slides,(function(i,s){return t("div",{key:"".concat(i.id,"_").concat(s),staticClass:"slide"},[e.disabled?e._e():t("div",{staticClass:"slide__handle"},[t("div",{staticClass:"slide__handle--drag"})]),t("a17-mediafield",{staticClass:"slide__content",attrs:{name:"".concat(e.name,"_").concat(i.id),index:s,mediaContext:e.name,cropContext:e.cropContext,hover:e.hoverable,isSlide:!0,withAddInfo:e.withAddInfo,withCaption:e.withCaption,withVideoUrl:e.withVideoUrl,altTextMaxLength:e.altTextMaxLength,captionMaxLength:e.captionMaxLength,extraMetadatas:e.extraMetadatas,disabled:e.disabled}})],1)})),0)],1):e._e(),!e.buttonOnTop&&e.remainingSlides>0?t("div",{staticClass:"slideshow__trigger"},[t("a17-button",{attrs:{disabled:e.disabled,type:"button",variant:"ghost"},on:{click:function(t){return e.openMediaLibrary(e.remainingSlides)}}},[e._v(e._s(e.addLabel))]),t("span",{staticClass:"slideshow__note f--small"},[e._t("default")],2)],1):e._e()],1)},Zs=[],ea={name:"A17Slideshow",components:{draggable:g()},mixins:[b.c,Ve.c,Yi],props:{name:{type:String,required:!0},itemLabel:{type:String,default:"image"},max:{type:Number,default:10},buttonOnTop:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:function(){return{handle:".slide__handle",hoverable:!0}},computed:{remainingSlides:function(){return Math.max(0,this.max-this.slides.length)},addLabel:function(){const e=this.itemLabel+"s";return"Attach "+e},slides:{get(){return this.selectedMedias.hasOwnProperty(this.name)&&this.selectedMedias[this.name]||[]},set(e){this.$store.commit(v.ol.REORDER_MEDIAS,{name:this.name,medias:e})}},...(0,_.ys)({selectedMedias:e=>e.mediaLibrary.selected})},methods:{deleteSlideshow:function(){this.$store.commit(v.ol.DESTROY_MEDIAS,this.name)},destroyValue:function(){this.isSlide||this.isDestroyed||this.deleteMedia()}}},ta=ea,ia=(0,k.c)(ta,Qs,Zs,!1,null,"243f2bae",null),sa=ia.exports,aa=i(6676),na=i(6216),oa=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,locale:e.locale,size:e.size,name:e.name,required:e.required},on:{localize:e.updateLocale}},[t("div",{staticClass:"wysiwyg__outer",class:e.textfieldClasses},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],attrs:{name:e.name,type:"hidden"},domProps:{value:e.value},on:{input:function(t){t.target.composing||(e.value=t.target.value)}}}),e.editSource?[t("div",{directives:[{name:"show",rawName:"v-show",value:!e.activeSource,expression:"!activeSource"}],staticClass:"wysiwyg",class:e.textfieldClasses,attrs:{dir:e.dirLocale}},[t("div",{ref:"editorcontainer",staticClass:"wysiwyg__editor",class:{"wysiwyg__editor--limitHeight":e.limitHeight}},[t("div",{ref:"editor",staticClass:"wysiwyg__editor-inner"})]),e.shouldShowCounter?t("span",{staticClass:"wysiwyg__limit f--tiny",class:e.limitClasses},[e._v(e._s(e.counter))]):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:e.activeSource,expression:"activeSource"}],staticClass:"form__field form__field--textarea",attrs:{dir:e.dirLocale}},[t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],style:e.textareaHeight,attrs:{placeholder:e.placeholder,autofocus:e.autofocus},domProps:{value:e.value},on:{change:e.updateSourcecode,input:function(t){t.target.composing||(e.value=t.target.value)}}})]),t("a17-button",{staticClass:"wysiwyg__button",attrs:{variant:"ghost"},on:{click:e.toggleSourcecode}},[e._v("Source code")])]:[t("div",{staticClass:"wysiwyg",class:e.textfieldClasses,attrs:{dir:e.dirLocale}},[t("div",{ref:"editorcontainer",staticClass:"wysiwyg__editor",class:{"wysiwyg__editor--limitHeight":e.limitHeight}},[t("div",{ref:"editor",staticClass:"wysiwyg__editor-inner"})]),e.shouldShowCounter?t("span",{staticClass:"wysiwyg__limit f--tiny",class:e.limitClasses},[e._v(e._s(e.counter))]):e._e()])]],2)])},ra=[],la=i(3336),da=i.n(la),ca=i(124),ua=i.n(ca);function ha(e,t,i){return t=pa(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function pa(e){var t=ma(e,"string");return"symbol"==typeof t?t:String(t)}function ma(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}ua().debug("error");const fa=ua()["import"]("delta"),ga=ua()["import"]("blots/embed"),_a=ua()["import"]("blots/inline"),ba=ua()["import"]("formats/link"),va=ua()["import"]("blots/block/embed");class ya extends va{}ya.blotName="divider",ya.tagName="hr",ua().register(ya);class wa extends ga{length(){return 1}value(){return"\n"}insertInto(e,t){ga.prototype.insertInto.call(this,e,t)}}ha(wa,"blotName","softbreak"),ha(wa,"tagName","br"),ha(wa,"className","softbreak"),ua().register(wa);const Ea={key:13,shiftKey:!0,handler:function(e){const t=this.quill.getLeaf(e.index)[0],i=this.quill.getLeaf(e.index+1)[0];this.quill.insertEmbed(e.index,"softbreak",!0,"user"),null!==i&&t.parent===i.parent||this.quill.insertEmbed(e.index,"softbreak",!0,"user"),this.quill.setSelection(e.index+1,ua().sources.SILENT)}};function Ta(){const e=new fa;return e.insert({softbreak:""}),e}const ka={blotName:"anchor",tagName:"SPAN"};class Ca extends _a{static create(e){const t=super.create(e);return e=this.sanitize(e),t.setAttribute("id",e),t.className="ql-anchor",t}static sanitize(e){return e.replace(/\s+/g,"-").toLowerCase()}static formats(e){return e.getAttribute("id")}format(e,t){if(e!==this.statics.blotName||!t)return super.format(e,t);t=this.constructor.sanitize(t),this.domNode.setAttribute("id",t)}}Ca.blotName=ka.blotName,Ca.tagName=ka.tagName,ua().register(Ca);class Aa extends ba{static create(e){const t=super.create(e);e=this.sanitize(e),t.setAttribute("href",e);const i=/^((http|https|ftp):\/\/)/;if(i.test(e)||t.removeAttribute("target"),window["TWILL"].STORE.form.baseUrl){const i=new URL(window["TWILL"].STORE.form.baseUrl);e.startsWith(i.origin)&&t.removeAttribute("target")}return t}format(e,t){if(super.format(e,t),e!==this.statics.blotName||!t)return;const i=/^((http|https|ftp):\/\/)/;i.test(t)?window["TWILL"].STORE.form.baseUrl&&t.startsWith(window["TWILL"].STORE.form.baseUrl)?this.domNode.removeAttribute("target"):this.domNode.setAttribute("target","_blank"):this.domNode.removeAttribute("target")}}function xa(e){return''}ua().register(Aa);const Sa=ua()["import"]("ui/icons");Sa.bold=xa("bold"),Sa.italic=xa("italic"),Sa.anchor=xa("anchor"),Sa.link=xa("link"),Sa.header["1"]=xa("header"),Sa.header["2"]=xa("header-2"),Sa.header["3"]=xa("header-3"),Sa.header["4"]=xa("header-4"),Sa.header["5"]=xa("header-5"),Sa.header["6"]=xa("header-6"),Sa.divider=xa("hr");const La=["background","bold","color","font","code","italic","link","size","strike","script","underline","blockquote","header","indent","list","align","direction","code-block","formula","image","video","divider"];function Da(e){const t=[wa.blotName,ka.blotName];function i(e){t.indexOf(e)>-1||-1===La.indexOf(e)||t.push(e)}return e.forEach((e=>{if("object"===typeof e)for(const t in e)i(t);"string"===typeof e&&i(e)})),t}var Ma={Quill:ua(),lineBreak:{handle:Ea,clipboard:[wa.tagName,Ta]},getFormats:Da},Ia=i(512);const Oa="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/highlight.min.js";var Pa={name:"A17Wysiwyg",mixins:[ge.c,ee.c,Ue.c,Z.c],props:{editSource:{type:Boolean,default:!1},showCounter:{type:Boolean,default:!0},type:{type:String,default:"text"},prefix:{type:String,default:""},maxlength:{type:Number,default:0},initialValue:{default:""},limitHeight:{type:Boolean,default:!1},options:{type:Object,required:!1,default:function(){return{}}}},computed:{textareaHeight:function(){return{height:this.editorHeight}},textfieldClasses:function(){return{"wysiwyg__outer--limitHeight":this.limitHeight,"s--disabled":this.disabled,"s--focus":this.focused}},hasMaxlength:function(){return this.maxlength>0},shouldShowCounter:function(){return this.hasMaxlength&&this.showCounter},limitClasses:function(){return{"wysiwyg__limit--red":this.counter<.1*this.maxlength}},...(0,_.ys)({baseUrl:e=>e.form.baseUrl})},data:function(){return{value:this.initialValue,editorHeight:50,toolbarHeight:52,focused:!1,activeSource:!1,quill:null,counter:0,localOptions:{},defaultModules:{toolbar:["bold","italic","underline","link"],clipboard:{matchVisual:!1,matchers:[Ma.lineBreak.clipboard]},keyboard:{bindings:{lineBreak:Ma.lineBreak.handle}},syntax:!1}}},methods:{initQuill(e){if(this.quill=new Ma.Quill(this.$refs.editor,e),this.value&&this.updateEditor(this.value),this.quill.on("text-change",((e,t,i)=>{let s=this.$refs.editor.children[0].innerHTML;"


"===s&&(s=""),this.value=s,this.$emit("input",this.value),this.$emit("change",this.value),this.updateCounter(this.getTextLength()),"user"===i&&this.textUpdate()})),this.quill.on("selection-change",((e,t,i)=>{e?(this.focused=!0,this.$emit("focus")):(this.focused=!1,"user"===i&&this.saveIntoStore(),this.$emit("blur"))})),this.disabled&&this.quill.enable(!1),this.baseUrl){const e=this.quill.theme.tooltip,t=e.root;if(t){const e=t.querySelector("input[data-link]");e&&e.setAttribute("data-link",this.baseUrl)}}"rtl"===this.dirLocale&&(this.quill.format("direction","rtl"),this.quill.format("align","right")),this.hasMaxlength&&this.showCounter&&this.updateCounter(this.getTextLength()),this.$emit("ready",this.quill)},insertDivider(){const e=this.quill.getSelection(!0);e&&(this.quill.insertText(e.index,"\n"),this.quill.insertEmbed(e.index+1,"divider",!0),this.quill.setSelection(e.index+2))},anchorHandler(e){if(!0===e)e=prompt("Enter anchor:");else{const t=this.quill.getSelection(),i=this.quill.getFormat(t).anchor||"";e=prompt("Edit anchor:",i)}this.quill.format("anchor",e)},updateEditor:function(e){const t=this.quill.clipboard.convert(e);this.quill.setContents(t,"silent")},updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&(this.value=e,this.updateEditor(e))},textUpdate:function(){this.preventSubmit(),this._textUpdateInternal()},_textUpdateInternal:da()((function(){this.saveIntoStore(),this.allowSubmit()}),600),toggleSourcecode:function(){this.editorHeight=Math.max(50,this.$refs.editor.clientHeight)+this.toolbarHeight-1+"px",this.activeSource=!this.activeSource,this.updateSourcecode()},updateSourcecode:function(){this.updateEditor(this.value),this.saveIntoStore()},updateCounter:function(e){this.showCounter&&this.hasMaxlength&&(this.counter=this.maxlength-e)},getTextLength:function(){return this.quill.getLength()-(0===this.value.length?2:1)}},mounted:function(){if(this.quill)return;const e=JSON.parse(JSON.stringify(this.options));e.theme=e.theme||"snow",e.boundary=e.boundary||document.body,e.modules=e.modules||this.defaultModules;const t={container:void 0!==e.modules.toolbar?e.modules.toolbar:this.defaultModules.toolbar,handlers:{}};if(e.modules.clipboard=void 0!==e.modules.clipboard?e.modules.clipboard:this.defaultModules.clipboard,e.modules.keyboard=void 0!==e.modules.keyboard?e.modules.keyboard:this.defaultModules.keyboard,e.modules.syntax=void 0!==e.modules.syntax&&e.modules.syntax?{highlight:e=>hljs.highlightAuto(e).value}:this.defaultModules.syntax,e.placeholder=e.placeholder||this.placeholder,e.readOnly=void 0!==e.readOnly?e.readOnly:this.readonly,e.formats=Ma.getFormats(e.modules.toolbar),e.bounds=this.$refs.editor,e.scrollingContainer="html",t.container.includes("anchor")&&(t.handlers.anchor=this.anchorHandler),t.container.includes("divider")&&(t.handlers.divider=this.insertDivider),e.modules.toolbar=t,this.localOptions=e,e.modules.syntax&&"undefined"===typeof hljs){const t="highlight-js-script";(0,Ia.aU)(t,Oa,"text/javascript").then((()=>{this.initQuill(e)}))}else this.initQuill(e)},beforeDestroy(){this.quill=null}},Ba=Pa,Ra=(0,k.c)(Ba,oa,ra,!1,null,"dc784262",null),Na=Ra.exports,Fa=function(){var e=this,t=e._self._c;return t("a17-inputframe",{attrs:{error:e.error,note:e.note,label:e.label,locale:e.locale,size:e.size,name:e.name,required:e.required},on:{localize:e.updateLocale}},[e.editor?t("div",{staticClass:"wysiwyg__outer"},[t("div",{directives:[{name:"show",rawName:"v-show",value:!e.activeSource,expression:"!activeSource"}],staticClass:"wysiwyg",class:e.textfieldClasses,attrs:{dir:e.dirLocale}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],attrs:{name:e.name,type:"hidden"},domProps:{value:e.value},on:{input:function(t){t.target.composing||(e.value=t.target.value)}}}),t("div",{ref:"editor",staticClass:"wysiwyg__editor"},[t("div",{staticClass:"wysiwyg__menubar"},[e.toolbar.header?[e.toolbar.header?t("wysiwyg-menu-bar-btn",{attrs:{icon:"paragraph",disabled:e.editor.isActive("paragraph"),isActive:e.editor.isActive("paragraph")},on:{"btn:click":function(t){e.editor.chain().focus().setParagraph().run()}}}):e._e(),e._l(e.headingOptions,(function(i){return t("wysiwyg-menu-bar-btn",{key:i,attrs:{icon:i>1?"header-".concat(i):"header",isActive:e.editor.isActive("heading",{level:i})},on:{"btn:click":function(t){e.editor.chain().focus().toggleHeading({level:i}).run()}}})}))]:e._e(),e.toolbar.bold?t("wysiwyg-menu-bar-btn",{attrs:{icon:"bold",isActive:e.editor.isActive("bold")},on:{"btn:click":function(t){e.editor.chain().focus().toggleBold().run()}}}):e._e(),e.toolbar.italic?t("wysiwyg-menu-bar-btn",{attrs:{icon:"italic",isActive:e.editor.isActive("italic")},on:{"btn:click":function(t){e.editor.chain().focus().toggleItalic().run()}}}):e._e(),e.toolbar.strike?t("wysiwyg-menu-bar-btn",{attrs:{icon:"strike",isActive:e.editor.isActive("strike")},on:{"btn:click":function(t){e.editor.chain().focus().toggleStrike().run()}}}):e._e(),e.toolbar.underline?t("wysiwyg-menu-bar-btn",{attrs:{icon:"underline",isActive:e.editor.isActive("underline")},on:{"btn:click":function(t){e.editor.chain().focus().toggleUnderline().run()}}}):e._e(),e.toolbar.hr?t("wysiwyg-menu-bar-btn",{attrs:{icon:"hr"},on:{"btn:click":function(t){e.editor.chain().focus().setHorizontalRule().run()}}}):e._e(),e.toolbar.link?t("wysiwyg-menu-bar-btn",{attrs:{icon:"link",isActive:e.editor.isActive("link")},on:{"btn:click":function(t){return e.openLinkWindow()}}}):e._e(),e.toolbar.link&&e.editor.isActive("link")?t("wysiwyg-menu-bar-btn",{attrs:{icon:"unlink",disabled:!e.editor.isActive("link"),isActive:e.editor.isActive("link")},on:{"btn:click":function(t){return e.removeLink()}}}):e._e(),e.toolbar.bullet?t("wysiwyg-menu-bar-btn",{attrs:{icon:"ul",isActive:e.editor.isActive("bulletList")},on:{"btn:click":function(t){e.editor.chain().focus().toggleBulletList().run()}}}):e._e(),e.toolbar.ordered?t("wysiwyg-menu-bar-btn",{attrs:{icon:"ol",isActive:e.editor.isActive("orderedList")},on:{"btn:click":function(t){e.editor.chain().focus().toggleOrderedList().run()}}}):e._e(),e.toolbar.blockquote?t("wysiwyg-menu-bar-btn",{attrs:{icon:"quote",isActive:e.editor.isActive("blockquote")},on:{"btn:click":function(t){e.editor.chain().focus().toggleBlockquote().run()}}}):e._e(),e.toolbar.codeBlock?t("wysiwyg-menu-bar-btn",{attrs:{icon:"code",isActive:e.editor.isActive("codeBlock")},on:{"btn:click":function(t){e.editor.chain().focus().toggleCodeBlock().run()}}}):e._e(),e.toolbar.code?t("wysiwyg-menu-bar-btn",{attrs:{icon:"code",isActive:e.editor.isActive("code")},on:{"btn:click":function(t){e.editor.chain().focus().setCode().run()}}}):e._e(),e.toolbar.align||e.toolbar["align-left"]?t("wysiwyg-menu-bar-btn",{attrs:{icon:"align_left",label:"align left",isActive:e.editor.isActive({textAlign:"left"})},on:{"btn:click":function(t){return e.setTextAlign("left")}}}):e._e(),e.toolbar.align||e.toolbar["align-center"]?t("wysiwyg-menu-bar-btn",{attrs:{icon:"align_center",label:"align center",isActive:e.editor.isActive({textAlign:"center"})},on:{"btn:click":function(t){return e.setTextAlign("center")}}}):e._e(),e.toolbar.align||e.toolbar["align-right"]?t("wysiwyg-menu-bar-btn",{attrs:{icon:"align_right",label:"align right",isActive:e.editor.isActive({textAlign:"right"})},on:{"btn:click":function(t){return e.setTextAlign("right")}}}):e._e(),e.toolbar.align||e.toolbar["align-justify"]?t("wysiwyg-menu-bar-btn",{attrs:{icon:"align_justify",label:"justify",isActive:e.editor.isActive({textAlign:"justify"})},on:{"btn:click":function(t){return e.setTextAlign("justify")}}}):e._e(),e.toolbar.table?t("wysiwyg-menu-bar-btn",{attrs:{icon:"table"},on:{"btn:click":function(t){e.editor.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}}}):e._e(),t("wysiwyg-menu-bar-btn",{attrs:{icon:"undo",disabled:!e.editor.can().undo()},on:{"btn:click":function(t){e.editor.chain().focus().undo().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"redo",disabled:!e.editor.can().redo()},on:{"btn:click":function(t){e.editor.chain().focus().redo().run()}}}),e.toolbar.table?[e.editor.isActive("table")?t("div",{staticClass:"wysiwyg__menubar-table-buttons"},[t("br"),t("wysiwyg-menu-bar-btn",{attrs:{icon:"delete_table"},on:{"btn:click":function(t){e.editor.chain().focus().deleteTable().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"add_col_before"},on:{"btn:click":function(t){e.editor.chain().focus().addColumnBefore().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"add_col_after"},on:{"btn:click":function(t){e.editor.chain().focus().addColumnAfter().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"delete_col"},on:{"btn:click":function(t){e.editor.chain().focus().deleteColumn().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"add_row_before"},on:{"btn:click":function(t){e.editor.chain().focus().addRowBefore().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"add_row_after"},on:{"btn:click":function(t){e.editor.chain().focus().addRowAfter().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"delete_row"},on:{"btn:click":function(t){e.editor.chain().focus().deleteRow().run()}}}),t("wysiwyg-menu-bar-btn",{attrs:{icon:"combine_cells"},on:{"btn:click":function(t){e.editor.chain().focus().mergeCells().run()}}})],1):e._e()]:e._e(),this.toolbar.wrappers?[t("br"),e._l(this.toolbar.wrappers,(function(i){return[t("wysiwyg-menu-bar-btn",{key:i.id,attrs:{"icon-url":i.icon,isActive:e.editor.isActive(i.class),label:i.label},on:{"btn:click":function(t){e.editor.commands["set"+i.id]()}}})]}))]:e._e()],2),t("div",{staticClass:"wysiwyg__contentWrapper",class:{"wysiwyg__contentWrapper--limitHeight":e.limitHeight},on:{click:function(t){e.editor.chain().focus()}}},[t("editor-content",{staticClass:"wysiwyg__content",attrs:{editor:e.editor}})],1)]),e.shouldShowCounter?t("span",{staticClass:"input__limit f--tiny",class:e.limitClasses},[e._v(e._s(e.counter))]):e._e()]),e.editSource?[t("div",{directives:[{name:"show",rawName:"v-show",value:e.activeSource,expression:"activeSource"}],staticClass:"form__field form__field--textarea"},[t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],style:e.textareaHeight,attrs:{placeholder:e.placeholder,autofocus:e.autofocus},domProps:{value:e.value},on:{change:e.updateSourcecode,input:function(t){t.target.composing||(e.value=t.target.value)}}})]),t("a17-button",{staticClass:"wysiwyg__button",attrs:{variant:"ghost"},on:{click:e.toggleSourcecode}},[e._v("Source code ")])]:e._e()],2):e._e(),e.browserIsOpen&&e.browserEndpoints?t("standalone-browser",{ref:"localbrowser",attrs:{"endpoint-multiple":e.browserEndpoints,max:1},on:{selected:e.setLinkFromBrowser,close:function(t){e.browserIsOpen=!1}}}):e._e(),t("a17-modal",{ref:"link-modal",staticClass:"modal--form modal--link",attrs:{title:e.$trans("wysiwyg.link_window.title","Edit link")}},[e.linkWindow?[t("a17-textfield",{attrs:{name:"link_text","initial-value":e.linkWindow.text,label:e.$trans("wysiwyg.link_window.text","Text to display")},model:{value:e.linkWindow.text,callback:function(t){e.$set(e.linkWindow,"text",t)},expression:"linkWindow.text"}}),t("a17-textfield",{attrs:{name:"link_link","initial-value":e.linkWindow.href,label:e.$trans("wysiwyg.link_window.link","Link"),placeholder:e.$trans("wysiwyg.link_window.link_placeholder","https://...")},model:{value:e.linkWindow.href,callback:function(t){e.$set(e.linkWindow,"href",t)},expression:"linkWindow.href"}}),t("div",[e.browserEndpoints?t("a17-button",{staticClass:"link-browser-link",attrs:{variant:"aslink-grey"},on:{click:function(t){e.browserIsOpen=!0}}},[e._v(" "+e._s(e.$trans("wysiwyg.link_window.internal_browser_link","Select internal content"))+" ")]):e._e()],1),t("a17-inputframe",{attrs:{name:"link-options"}},[t("a17-checkbox",{attrs:{name:"link_target","initial-value":e.linkWindow.target,value:"_blank",label:e.$trans("wysiwyg.link_window.open_in_new_window","Open in a new tab")},on:{change:function(t){e.linkWindow.target=t?"_blank":""}}}),e.linkWindow&&e.linkWindow.classList&&e.linkWindow.classList.length?t("div",{staticClass:"classList"},e._l(e.linkWindow.classList,(function(i,s){return t("a17-checkbox",{key:"link_class_".concat(s),attrs:{name:"link_class_".concat(s),"initial-value":e.linkWindow.classList[s].selected,value:e.linkWindow.classList[s].value,label:e.linkWindow.classList[s].label},on:{change:function(t){e.linkWindow.classList[s].selected=t}}})})),1):e._e()],1),t("div",{staticClass:"modalValidation"},[t("a17-button",{staticClass:"dialog-confirm",attrs:{variant:"validate",tabindex:"4"},on:{click:e.saveLink}},[e._v(" "+e._s(e.$trans("wysiwyg.link_window.save","Save"))+" ")]),t("a17-button",{staticClass:"dialog-cancel",attrs:{variant:"aslink-grey",tabindex:"5"},on:{click:function(t){return e.$refs["link-modal"].close()}}},[e._v(" "+e._s(e.$trans("wysiwyg.link_window.save","Cancel"))+" ")])],1)]:e._e()],2)],1)},$a=[],Ua=i(5120),Va=i(5168),qa=i(208),Wa=i(1232),Ha=i(9096),za=i(5879),Ka=i(4683),ja=i(2020),Ga=i(6308),Ya=function(){var e,t=this,i=t._self._c;return i("button",{class:{"is-active":t.isActive,"wysiwyg__menubar-button":t.icon||t.iconUrl},attrs:{disabled:t.disabled,type:"button",title:t.label},on:{click:t.handleClick}},[t.iconUrl?[i("img",{staticClass:"icon--custom",attrs:{src:t.iconUrl,alt:t.label}})]:t.icon?[i("span",{staticClass:"icon",class:"icon--wysiwyg_".concat(t.icon),attrs:{"aria-hidden":"true"}},[i("svg",[i("title",[t._v(t._s(null!==(e=t.label)&&void 0!==e?e:t.icon))]),i("use",{attrs:{"xlink:href":"#icon--wysiwyg_".concat(t.icon)}})])])]:[t._v(" "+t._s(t.label)+" ")]],2)},Xa=[],Ja={name:"WysiwygMenuBarButton",props:{icon:{type:String,required:!1},iconUrl:{type:String,required:!1},label:{type:String,required:!1},isActive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{handleClick(){this.$emit("btn:click")}}},Qa=Ja,Za=(0,k.c)(Qa,Ya,Xa,!1,null,"8e292938",null),en=Za.exports,tn=i(6772),sn=i(3704),an=i(2928),nn={name:"A17Wysiwyg",mixins:[ge.c,ee.c,Ue.c,Z.c],props:{editSource:{type:Boolean,default:!1},showCounter:{type:Boolean,default:!0},type:{type:String,default:"text"},prefix:{type:String,default:""},maxlength:{type:Number,default:0},initialValue:{default:""},browserEndpoints:{required:!1,default:null},classList:{required:!1,default:null},limitHeight:{type:Boolean,default:!1},options:{type:Object,required:!1,default:function(){return{modules:{}}}}},computed:{textareaHeight:function(){return{height:this.editorHeight}},textfieldClasses:function(){return{"s--disabled":this.disabled,"s--focus":this.focused}},hasMaxlength:function(){return this.maxlength>0},shouldShowCounter:function(){return this.hasMaxlength&&this.showCounter},limitClasses:function(){return{"input__limit--red":this.counter<.1*this.maxlength}},...(0,_.ys)({baseUrl:e=>e.form.baseUrl})},components:{EditorContent:Ua.C4,StandaloneBrowser:Ga.c,"wysiwyg-menu-bar-btn":en},data(){return{value:this.initialValue,editorHeight:50,toolbarHeight:52,toolbar:this.options.modules.toolbar?this.options.modules.toolbar.reduce(((e,t)=>t.list?(e[t.list]=!0,e):"object"===typeof t?{...e,...t}:(e[t]=!0,e)),{}):{bold:!0,italic:!0,underline:!0,link:!0},headingOptions:[],focused:!1,activeSource:!1,counter:0,editor:null,linkWindow:null,browserIsOpen:!1}},methods:{updateEditor:function(e){this.editor&&this.editor.commands.setContent(e)},updateFromStore:function(e){"undefined"===typeof e&&(e=""),this.value!==e&&(this.value=e,this.updateEditor(e))},textUpdate:function(){this.preventSubmit(),this._textUpdateInternal()},_textUpdateInternal:da()((function(){this.saveIntoStore(),this.allowSubmit()}),600),toggleSourcecode:function(){this.editorHeight=Math.max(50,this.$refs.editor.clientHeight)+this.toolbarHeight-1+"px",this.activeSource=!this.activeSource,this.updateSourcecode()},updateSourcecode:function(){this.updateEditor(this.value),this.saveIntoStore()},updateCounter(){this.showCounter&&this.hasMaxlength&&(this.counter=this.maxlength-this.getTextLength())},getTextLength(){return this.editor.getHTML().replace(/<[^>]+>/g,"").length},openLinkWindow:function(){var e,t;this.editor.commands.extendMarkRange("link");const{ranges:i}=this.editor.state.selection,s=(0,Va.aM)(this.editor.state,"link");let a=!0,n=i[0].$from.pos,o=i[0].$to.pos;s.href&&(a=!1);let r=null,l=null;const d=this.editor.state.tr.doc,c=this.editor.getHTML().length;if(n===o){let e=!1,t=!1;while(!e&&n>0)e=0===n||" "===d.textBetween(n-1,n)," "===d.textBetween(n-1,n)?r=n:0===n&&(r=0),n-=1;while(!t&&o{var t;return e.selected=(null!==(t=s.class)&&void 0!==t?t:"").includes(e.value),e})):[]},this.$nextTick((()=>{this.$refs["link-modal"].open()}))},removeLink(){this.editor.chain().focus().extendMarkRange("link").unsetLink().run()},setLinkFromBrowser(e){this.linkWindow.href="#twillInternalLink::"+e[0].endpointType+"#"+e[0].id},saveLink(){this.linkWindow.text!==this.linkWindow.textOriginal&&(this.editor.commands.insertContentAt({from:this.linkWindow.from,to:this.linkWindow.to},this.linkWindow.text),this.editor.commands.setTextSelection({from:this.linkWindow.from,to:this.linkWindow.from+this.linkWindow.text.length})),this.linkWindow.newLink?this.editor.commands.setLink({href:this.linkWindow.href,target:this.linkWindow.target,class:this.linkWindow.classList.filter((e=>e.selected)).map((e=>e.value)).join(" ")}):this.editor.commands.updateAttributes("link",{href:this.linkWindow.href,target:this.linkWindow.target,class:this.linkWindow.classList.filter((e=>e.selected)).map((e=>e.value)).join(" ")}),this.$refs["link-modal"].close(),this.linkWindow=null},setTextAlign(e){this.editor.chain().focus().setTextAlign(e).run()}},beforeMount(){var e,t,i,s,a;this.toolbar.header&&(this.headingOptions=this.toolbar.header.filter((e=>"number"===typeof e)));const n=this.value||"",o=[an.M.configure({types:["heading","paragraph"]})];this.placeholder&&this.placeholder.length>0&&o.push(sn.I.configure({emptyNodeClass:"is-empty",emptyNodeText:this.placeHolder,showOnlyWhenEditable:!0})),this.toolbar.wrappers&&this.toolbar.wrappers.forEach((e=>{o.push(Va.a8.create({name:e.id,group:"block",marks:"_",atom:!0,content:"block+",addOptions(){return{HTMLAttributes:{class:e.className,"data-customwrapper":e.id,"data-customwrapper-label":e.label}}},parseHTML(){return[{tag:"div",getAttrs:t=>{t.getAttribute("data-customwrapper",e.id)}}]},renderHTML(e){let{HTMLAttributes:t}=e;return["div",(0,Va.Oo)(this.options.HTMLAttributes,t),0]},addCommands(){const t="set"+this.name,i={};return i[t]=()=>t=>{let{chain:i}=t;if(e.createElement)switch(e.createElement){case"ol":return i().toggleWrap(this.name).toggleOrderedList().run();case"ul":return i().toggleWrap(this.name).toggleBulletList().run()}return i().toggleWrap(this.name).run()},i}}))})),Object.keys(this.toolbar).forEach((e=>{switch(e){case"link":o.push(tn.cH.configure({openOnClick:!1}));break;case"underline":o.push(Wa.c);break;case"table":o.push(Ha.cp.configure({resizable:!1})),o.push(ja.c),o.push(Ka.c),o.push(za.c);break}})),o.push(qa.c.configure({orderedList:null!==(e=this.toolbar.ordered)&&void 0!==e&&e,bulletList:null!==(t=this.toolbar.bullet)&&void 0!==t&&t,listItem:this.toolbar.ordered||this.toolbar.bullet||!1,code:null!==(i=this.toolbar.code)&&void 0!==i&&i,codeBlock:null!==(s=this.toolbar.codeBlock)&&void 0!==s&&s,horizontalRule:null!==(a=this.toolbar.hr)&&void 0!==a&&a})),this.editor=new Ua.GW({content:n,extensions:o,onUpdate:e=>{let{editor:t}=e;this.value=t.getHTML(),this.textUpdate(),this.updateCounter()}}),this.updateCounter()},beforeUnmount(){this.editor.destroy()},beforeDestroy(){this.editor.destroy()}},on=nn,rn=(0,k.c)(on,Fa,$a,!1,null,"313dbf04",null),ln=rn.exports;function dn(e,t,i){return t=cn(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function cn(e){var t=un(e,"string");return"symbol"==typeof t?t:String(t)}function un(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const hn={target:"data-sticky-target",toptarget:"data-sticky-top",classContainer:"sticky",classFixed:"sticky__fixed",classAbs:"sticky__abs",classEnd:"sticky__scrolled",topOffset:0,offset:20};class pn{constructor(e,t){dn(this,"refresh",(()=>this._refresh())),dn(this,"dispose",(()=>this._dispose())),dn(this,"status","top"),dn(this,"ticking",!1),dn(this,"anchors",["Top","Bottom"]),dn(this,"lastScrollPos",0),dn(this,"prevScrollPos",-1),t={...hn,...t},this.target=null,this.toptarget=null,this.container=e,this.containerID=this.container.getAttribute("data-sticky-id"),this.options=t,this.options.target&&(this.target=this.container.querySelector("["+this.options.target+'="'+this.containerID+'"]')),this.options.toptarget&&(this.toptarget=this.container.querySelector("["+this.options.toptarget+'="'+this.containerID+'"]')),this.topMargin=this.container.hasAttribute("data-sticky-offset")?parseInt(this.container.getAttribute("data-sticky-offset")):this.options.offset,this.topOffset=this.container.hasAttribute("data-sticky-topoffset")?parseInt(this.container.getAttribute("data-sticky-topoffset")):this.options.topOffset,e.classList.add(this.options.classContainer),this._setEventListeners(),this._refresh()}_refresh(){if(!this.target)return!1;if(!this._isFullyVisible(this.target))return this._removePositionClass(),!1;const e=this.lastScrollPos,t=this.target.offsetHeight,i=this.container.offsetHeight,s=t+this.topMargin=a&&e=n&&(this._removePositionClass(),this.target.classList.add(this.options.classAbs),this.status="bottom"),e+window.innerHeight>=this.container.getBoundingClientRect().top+e+i?this.target.classList.add(this.options.classEnd):this.target.classList.remove(this.options.classEnd)),this}_isFullyVisible(e){return e.clientHeightthis._scroll())),window.removeEventListener("resize",(()=>this._resize())),this}_setEventListeners(){window.addEventListener("scroll",(()=>this._scroll())),window.addEventListener("resize",(()=>this._resize())),this._resize()}}const mn={};var fn={install(e){const t={options:mn,bind:function(e,i,s){const a=e._sticky=new pn(e,t.options);a._vueEl=e},componentUpdated:function(e,t,i){e._sticky.refresh()},inserted:function(e,t,i){},unbind:function(e,t,i){e._sticky.dispose()}};e.directive("sticky",t)}};function gn(e,t,i){const s=["icon"],a=t.expression||i.data.attrs.symbol;let n=e;"span"===i.tag&&(n=document.createElementNS("http://www.w3.org/2000/svg","svg"),e.appendChild(n)),s.push("icon--".concat(a)),s.forEach((function(t){e.classList.add(t)}));const o=document.createElementNS("http://www.w3.org/2000/svg","title");o.textContent=a,n.appendChild(o);const r="#icon--".concat(a),l=document.createElementNS("http://www.w3.org/2000/svg","use");l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),n.appendChild(l)}function _n(e){const t=e.querySelector("svg");t&&t.parentNode.removeChild(t);const i=e.className.split(" ").filter((function(e){return 0===e.indexOf("icon")}));i.forEach((function(t){e.classList.remove(t)}))}var bn={install(e){const t={bind(e,t,i){gn(e,t,i)},componentUpdated:function(e,t,i,s){_n(e),gn(e,t,i)},inserted:function(e,t,i){},unbind:function(e,t,i){}};e.directive("svg",t)}};function vn(e,t,i){return t=yn(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function yn(e){var t=wn(e,"string");return"symbol"==typeof t?t:String(t)}function wn(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const En={container:!1,delay:0,html:!1,budge:15,placement:"top",theme:"default",title:"",template:'',trigger:"hover focus",offset:0};class Tn{constructor(e,t){vn(this,"show",(()=>this._show(this.reference,this.options))),vn(this,"hide",(()=>this._hide())),vn(this,"dispose",(()=>this._dispose())),vn(this,"toggle",(()=>this._isOpen?this.hide():this.show())),vn(this,"innerSelector",".tooltip__inner"),vn(this,"_events",[]),vn(this,"_setTooltipNodeEvent",((e,t,i,s)=>{const a=e.relatedreference||e.toElement,n=i=>{const a=i.relatedreference||i.toElement;this._tooltipNode.removeEventListener(e.type,n),t.contains(a)||this._scheduleHide(t,s.delay,s,i)};return!!this._tooltipNode.contains(a)&&(this._tooltipNode.addEventListener(e.type,n),!0)})),t={...En,...t},this.reference=e,this.options=t;const i="string"===typeof t.trigger?t.trigger.split(" ").filter((e=>-1!==["click","hover","focus"].indexOf(e))):[];this._isOpen=!1,this._setEventListeners(e,i,t)}_create(e,t,i,s,a){if(this._tooltipNode)return this;const n=window.document.createElement("div");n.innerHTML=t.trim();const o=n.childNodes[0];o.id="tooltip--".concat(Math.random().toString(36).substr(2,10)),o.setAttribute("aria-hidden","false"),o.classList.add("tooltip--"+i);const r=n.querySelector(this.innerSelector);return 1===s.nodeType?a&&r.appendChild(s):a?r.innerHTML=s:r.innerText=s,o}_position(e,t,i){let s=0,a=0,n=t;const o=e.getBoundingClientRect();this._tooltipNode.classList.remove("tooltip--"+n);const r=Math.round(o.top-this._tooltipNode.offsetHeight-i),l=Math.round(o.top+o.height/2-this._tooltipNode.offsetHeight/2),d=Math.round(o.left+o.width+i),c=Math.round(o.top+o.height+i),u=Math.round(o.left-this._tooltipNode.offsetWidth-i),h=Math.round(o.left+o.width/2-this._tooltipNode.offsetWidth/2);"top"===t&&(s=h,a=r,n="top",s<10&&(s=10),a<0&&(a=c,n="bottom")),"top-right"===t&&(s=d,a=r,n="top",a<0&&(a=c,n="bottom")),"bottom"===t&&(s=h,a=c,n="bottom",s<10&&(s=10),a>0&&(a=r,n="top")),"right"===t&&(s=d,a=l,n="right"),"left"===t&&(s=u,a=l,n="left",s<0&&(s=d,n="right")),this._tooltipNode.style.left=s+"px",this._tooltipNode.style.top=a+"px",this._tooltipNode.classList.add("tooltip--"+n)}_show(e,t){if(this._isOpen&&!this._isOpening)return this;this._isOpen=!0;const i=e.getAttribute("data-tooltip-budge")||t.budge,s=e.getAttribute("data-tooltip-theme")||t.theme,a=e.getAttribute("data-tooltip-placement")||t.placement;if(this._tooltipNode)return this._tooltipNode.style.opacity="",this._tooltipNode.style.visibility="",this._tooltipNode.style.transition="opacity 0.3s",this._tooltipNode.setAttribute("aria-hidden","false"),this._position(e,a,i),this;const n=e.getAttribute("data-tooltip-title")||t.title,o=this._create(e,t.template,s,n,t.html);e.setAttribute("aria-describedby",o.id);const r=this._findContainer(t.container,e);return this._append(o,r),this._tooltipNode=o,this._position(e,a,i),this}_hide(){return this._isOpen?(this._isOpen=!1,this._tooltipNode.style.opacity="0",this._tooltipNode.style.visibility="hidden",this._tooltipNode.style.transition="",this._tooltipNode.setAttribute("aria-hidden","true"),this):this}_dispose(){return this._events.length&&(this._events.forEach((e=>{let{func:t,event:i}=e;this.reference.removeEventListener(i,t)})),this._events=[]),this._tooltipNode&&(this._hide(),this._tooltipNode.parentNode.removeChild(this._tooltipNode),this._tooltipNode=null),this}_findContainer(e,t){return"string"===typeof e?e=window.document.querySelector(e):!1===e&&(e=t.parentNode),e}_append(e,t){t.appendChild(e)}_setEventListeners(e,t,i){const s=[],a=[];t.forEach((e=>{switch(e){case"hover":s.push("mouseenter"),a.push("mouseleave");break;case"focus":s.push("focus"),a.push("blur");break;case"click":s.push("click"),a.push("click");break}})),s.forEach((t=>{const s=t=>{!0!==this._isOpening&&(t.usedByTooltip=!0,this._scheduleShow(e,i.delay,i,t))};this._events.push({event:t,func:s}),e.addEventListener(t,s)})),a.forEach((t=>{const s=t=>{!0!==t.usedByTooltip&&this._scheduleHide(e,i.delay,i,t)};this._events.push({event:t,func:s}),e.addEventListener(t,s)}))}_scheduleShow(e,t,i){this._isOpening=!0;const s=t&&t.show||t||0;s>0?window.setTimeout((()=>this._show(e,i)),s):this._show(e,i)}_scheduleHide(e,t,i,s){this._isOpening=!1;const a=t&&t.hide||t||0;window.setTimeout((()=>{if(!1!==this._isOpen&&document.body.contains(this._tooltipNode)){if("mouseleave"===s.type){const a=this._setTooltipNodeEvent(s,e,t,i);if(a)return}this._hide()}}),a)}}const kn={};var Cn={install(e){const t={options:kn,bind:function(e,i,s){if(!e._tooltip){const i=e._tooltip=new Tn(e,t.options);i._vueEl=e}},componentUpdated:function(e,i,s,a){if(e._tooltip){e._tooltip.dispose();const i=e._tooltip=new Tn(e,t.options);i._vueEl=e}},inserted:function(e,t,i){},unbind:function(e,t,i){e._tooltip&&e._tooltip.dispose()}};e.directive("tooltip",t)}};const An=!0,xn={install(e,t){e.component("a17-button",P),e.component("a17-infotip",ut),e.component("a17-slideshow",sa),e.component("a17-browserfield",D),e.component("a17-textfield",aa.c),e.component("a17-hiddenfield",nt),e.component("a17-wysiwyg",Na),e.component("a17-wysiwyg-tiptap",ln),e.component("a17-inputframe",_t),e.component("a17-mediafield",es),e.component("a17-mediafield-translated",os),e.component("a17-radio",ys),e.component("a17-radiogroup",As),e.component("a17-checkbox",j),e.component("a17-singlecheckbox",$s),e.component("a17-checkboxgroup",ae),e.component("a17-singleselect-permissions",Js),e.component("a17-multiselect",ms),e.component("a17-singleselect",zs),e.component("a17-select",Is),e.component("a17-vselect",na.c),e.component("a17-locale",Ct),e.component("a17-dropdown",Ne.c),e.component("a17-buttonbar",U),e.component("a17-modal",rs.c),e.component("a17-dialog",Re),e.component("a17-datepicker",De),e.component("a17-filefield",Ze),e.component("a17-colorfield",ye),e.component("a17-avatar",h.c),e.component("a17-medialibrary",Si),e.mixin({methods:{openFreeMediaLibrary:function(){this.$store.commit(v.ol.UPDATE_MEDIA_CONNECTOR,null),this.$store.commit(v.ol.RESET_MEDIA_TYPE),this.$store.commit(v.ol.UPDATE_REPLACE_INDEX,-1),this.$store.commit(v.ol.UPDATE_MEDIA_MAX,0),this.$store.commit(v.ol.UPDATE_MEDIA_FILESIZE_MAX,0),this.$store.commit(v.ol.UPDATE_MEDIA_WIDTH_MIN,0),this.$store.commit(v.ol.UPDATE_MEDIA_HEIGHT_MIN,0),this.$store.commit(v.ol.UPDATE_MEDIA_MODE,!1),this.$root.$refs.mediaLibrary&&this.$root.$refs.mediaLibrary.open()}}}),e.config.productionTip=An,e.config.devtools=!An,e.prototype.$http=o(),window.$trans=e.prototype.$trans=function(e,t){return l()(window["TWILL"].twillLocalization.lang,e,t)},o().defaults.headers.common["X-Requested-With"]="XMLHttpRequest",o().interceptors.response.use((e=>e),(e=>((0,Mt.q)("CONTENT",e),Promise.reject(e)))),e.use(u.cp,{name:"timeago",locale:window["TWILL"].twillLocalization.locale,locales:c()(Ae.ob,"date-fns")}),e.use(bn),e.use(Cn),e.use(fn)}};var Sn=xn},5572:function(e,t,i){"use strict";i.d(t,{c:function(){return h}});var s=function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:"move_down_notif"}},[e.show?t("div",{class:e.notifClasses,attrs:{role:"alert","aria-live":"polite","aria-atomic":"true"}},[t("div",{staticClass:"notif__inner"},[e.important?e._e():t("button",{staticClass:"notif__close",attrs:{type:"button","data-dismiss":"alert","aria-label":"alertClose"},on:{click:function(t){return t.stopPropagation(),t.preventDefault(),e.closeNotif.apply(null,arguments)}}},[t("span",{directives:[{name:"svg",rawName:"v-svg"}],attrs:{symbol:"close_modal"}})]),t("span",{domProps:{innerHTML:e._s(e.message)}})])]):e._e()])},a=[],n=i(624),o={name:"A17Notification",props:{variant:{type:String,default:"success"},duration:{type:Number,default:3e3},important:{type:Boolean,default:!0},autoHide:{type:Boolean,default:!0}},data:function(){return{closed:!1,timer:null,css:"notif"}},computed:{message:function(){return this.$store.getters.notifByVariant(this.variant)},variantClass:function(){return"notif--".concat(this.variant)},notifClasses:function(){return this.css&&Array.isArray(this.css)?[...this.css,this.variantClass]:["notif",this.variantClass]},show:function(){return!this.closed&&!!this.message}},methods:{closeNotif:function(){this.closed=!0,this.clearNotification(),this.timer&&(clearTimeout(this.timer),this.timer=null)},clearNotification:function(){this.$store.commit(n.gp.CLEAR_NOTIF,this.variant)},autoClose:function(){null===this.timer&&(this.timer=setTimeout((()=>{this.closeNotif()}),this.duration))}},watch:{message:function(){this.message&&(this.closed=!1,this.autoHide&&this.autoClose())}}},r=o,l=i(2528),d=(0,l.c)(r,s,a,!1,null,null,null),c=d.exports;const u={install(e,t){e.mixin({methods:{notif:function(e){this.$store.commit(n.gp.SET_NOTIF,e)}}}),e.component("a17-notif",c)}};var h=u},7632:function(e,t,i){"use strict";const s="moveBlockToEditor",a="duplicateBlock",n="duplicateRepeater",o="getBucketsData",r="saveBuckets",l="getDatatableDatas",d="setDatatableNestedDatas",c="setDatatableDatas",u="togglePublishedData",h="deleteData",p="duplicateData",m="restoreData",f="destroyData",g="toggleFeaturedData",_="bulkPublishData",b="bulkFeatureData",v="bulkExportData",y="bulkDeleteData",w="bulkRestoreData",E="bulkDestroyData",T="replaceFormData",k="saveFormData",C="updateFormInListing",A="createFormInModal",x="getAllPreviews",S="getPreview",L="getRevisionContent",D="getCurrentContent",M="handleErrors";t.cp={HANDLE_ERRORS:M,GET_BUCKETS:o,SAVE_BUCKETS:r,GET_DATATABLE:l,SET_DATATABLE_NESTED:d,SET_DATATABLE:c,TOGGLE_PUBLISH:u,DELETE_ROW:h,DUPLICATE_ROW:p,RESTORE_ROW:m,DESTROY_ROW:f,TOGGLE_FEATURE:g,BULK_PUBLISH:_,BULK_FEATURE:b,BULK_EXPORT:v,BULK_DELETE:y,BULK_RESTORE:w,BULK_DESTROY:E,REPLACE_FORM:T,SAVE_FORM:k,UPDATE_FORM_IN_LISTING:C,CREATE_FORM_IN_MODAL:A,GET_ALL_PREVIEWS:x,GET_PREVIEW:S,GET_REVISION:L,GET_CURRENT:D,MOVE_BLOCK_TO_EDITOR:s,DUPLICATE_BLOCK:a,DUPLICATE_REPEATER:n}},7176:function(e,t,i){"use strict";i.d(t,{c:function(){return v}});var s=i(9016),a=i(6036),n=i(8316),o=i.n(n),r=i(7632),l=i(624);const d={crops:window["TWILL"].STORE.medias.crops||{},showFileName:window["TWILL"].STORE.medias.showFileName||!1,types:window["TWILL"].STORE.medias.types||[],type:"image",connector:null,max:0,filesizeMax:0,widthMin:0,heightMin:0,strict:!0,selected:window["TWILL"].STORE.medias.selected||{},config:window["TWILL"].STORE.medias.config||{useWysiwyg:!1,wysiwygOptions:{}},loading:[],uploadProgress:0,indexToReplace:-1},c={mediasByBlockId:e=>t=>{const i=Object.keys(e.selected).filter((e=>e.startsWith("blocks[".concat(t,"]")))),s={};return i.forEach((t=>s[t]=e.selected[t])),s}},u={[l.ol.UPDATE_MEDIA_TYPE_TOTAL](e,t){e.types=e.types.map((e=>(e.value===t.type&&(e.total=t.total),e)))},[l.ol.UPDATE_REPLACE_INDEX](e,t){e.indexToReplace=t},[l.ol.INCREMENT_MEDIA_TYPE_TOTAL](e,t){e.types=e.types.map((e=>(e.value===t&&(e.total=e.total+1),e)))},[l.ol.DECREMENT_MEDIA_TYPE_TOTAL](e,t){e.types=e.types.map((e=>(e.value===t&&(e.total=e.total-1),e)))},[l.ol.UPDATE_MEDIAS](e,t){let{mediaRole:i,index:a,media:n}=t;s["default"].set(e.selected[i],a,n)},[l.ol.SAVE_MEDIAS](e,t){if(e.connector){const i=e.connector,s=e.selected[i]&&e.selected[i].length;if(s&&e.indexToReplace>-1)e.selected[i].splice(e.indexToReplace,1,o()(t[0]));else if(s)t.forEach((function(t){e.selected[i].push(o()(t))}));else{const s={};s[i]=t,e.selected=Object.assign({},e.selected,s)}e.indexToReplace=-1}},[l.ol.DESTROY_SPECIFIC_MEDIA](e,t){e.selected[t.name]&&(e.selected[t.name].splice(t.index,1),0===e.selected[t.name].length&&s["default"].delete(e.selected,t.name)),e.connector=null},[l.ol.DESTROY_MEDIAS](e,t){e.selected[t]&&s["default"].delete(e.selected,t),e.connector=null},[l.ol.REORDER_MEDIAS](e,t){const i={};i[t.name]=t.medias,e.selected=Object.assign({},e.selected,i)},[l.ol.PROGRESS_UPLOAD_MEDIA](e,t){const i=e.loading.filter((e=>e.id===t.id));i.length?(i[0].error=!1,i[0].progress=t.progress):e.loading.unshift({id:t.id,name:t.name,progress:t.progress,replacementId:t.replacementId,isReplacement:t.isReplacement})},[l.ol.PROGRESS_UPLOAD](e,t){e.uploadProgress=t},[l.ol.DONE_UPLOAD_MEDIA](e,t){e.loading.forEach((function(i,s){i.id===t.id&&e.loading.splice(s,1)}))},[l.ol.ERROR_UPLOAD_MEDIA](e,t){e.loading.forEach((function(i,a){i.id===t.id&&(s["default"].set(e.loading[a],"progress",0),s["default"].set(e.loading[a],"error",!0),s["default"].set(e.loading[a],"errorMessage",t.errorMessage))}))},[l.ol.UPDATE_MEDIA_CONNECTOR](e,t){e.connector=t&&""!==t?t:null},[l.ol.UPDATE_MEDIA_MODE](e,t){e.strict=t},[l.ol.UPDATE_MEDIA_TYPE](e,t){t&&""!==t&&(e.type=t)},[l.ol.RESET_MEDIA_TYPE](e){e.type=e.types[0].value},[l.ol.UPDATE_MEDIA_MAX](e,t){e.max=Math.max(0,t)},[l.ol.UPDATE_MEDIA_FILESIZE_MAX](e,t){e.filesizeMax=Math.max(0,t)},[l.ol.UPDATE_MEDIA_WIDTH_MIN](e,t){e.widthMin=Math.max(0,t)},[l.ol.UPDATE_MEDIA_HEIGHT_MIN](e,t){e.heightMin=Math.max(0,t)},[l.ol.SET_MEDIA_METADATAS](e,t){const i=t.media.context,a=e.selected[i],n=t.value;function r(e){return n.locale?(e.metadatas.custom[n.id]||(e.metadatas.custom[n.id]={}),e.metadatas.custom[n.id][n.locale]=n.value):e.metadatas.custom[n.id]=n.value,e}if(t.media.hasOwnProperty("index")){const e=r(o()(a[t.media.index]));s["default"].set(a,t.media.index,e)}},[l.ol.DESTROY_MEDIA_CONNECTOR](e){e.connector=null},[l.ol.SET_MEDIA_CROP](e,t){const i=t.key,a=t.index,n=e.selected[i][a];function r(e){e.crops||(e.crops={});for(const i in t.values){const s={};s.name=t.values[i].name||i,s.x=t.values[i].x,s.y=t.values[i].y,s.width=t.values[i].width,s.height=t.values[i].height,e.crops[i]=s}return e}const l=r(o()(n));s["default"].set(e.selected[i],a,l)},[l.ol.ADD_MEDIAS](e,t){let{medias:i}=t;e.selected=Object.assign({},e.selected,i)}},h={async[r.cp.DUPLICATE_BLOCK](e,t){let{commit:i,getters:s}=e,{block:a,id:n}=t;const o={...s.mediasByBlockId(a.id)},r=Object.keys(o),d={};r.forEach((e=>d[e.replace(a.id,n)]=[...o[e]])),i(l.ol.ADD_MEDIAS,{medias:d})}};var p={state:d,getters:c,mutations:u,actions:h};const m={success:null,info:null,warning:null,error:null},f={notifByVariant:e=>t=>e[t],notified:e=>0===Object.keys(e).filter((t=>null!==e[t])).length},g={[l.gp.SET_NOTIF](e,t){e[t.variant]=t.message},[l.gp.CLEAR_NOTIF](e,t){e[t]&&(e[t]=null)}};var _={state:m,getters:f,mutations:g};s["default"].use(a.cp);const b=!1;var v=new a.cp.Store({modules:{notification:_,mediaLibrary:p},strict:b})},4884:function(e,t,i){"use strict";var s=i(9016),a=i(624);const n={options:{}},o={optionsByName(e){return t=>e.options[t]||[]}},r={[a.MD.EMPTY_OPTIONS](e,t){e.options[t]&&s["default"].delete(e.options,t)},[a.MD.UPDATE_OPTIONS](e,t){const i=t.name,a=t.options;let n=[];e.options[i]&&(n=e.options[i],s["default"].delete(e.options,i)),Array.isArray(a)&&a.forEach((function(e){const t=n.findIndex((t=>t.value===e.value));-1===t&&n.push(e)})),s["default"].set(e.options,i,n)}},l={};t.c={state:n,getters:o,mutations:r,actions:l}},8920:function(e,t,i){"use strict";var s=i(9016),a=i(7632),n=i(624);const o={connector:null,title:"Attach related resources",note:"",endpoint:"",endpointName:"",endpoints:[],max:0,selected:window["TWILL"].STORE.browser.selected||{}},r={selectedItemsByIds:e=>{const t=[];for(const i in e.selected)t[i]=e.selected[i].map((e=>"".concat(e.endpointType,"_").concat(e.id)));return t},browsersByBlockId:e=>t=>{const i=Object.keys(e.selected).filter((e=>e.startsWith("blocks[".concat(t,"]")))),s={};return i.forEach((t=>s[t]=e.selected[t])),s}},l={[n.ai.SAVE_ITEMS](e,t){if(e.connector)if(e.selected[e.connector]&&e.selected[e.connector].length)e.selected[e.connector]=t;else{const i={};i[e.connector]=t,e.selected=Object.assign({},e.selected,i)}},[n.ai.DESTROY_ITEMS](e,t){e.selected[t.name]&&s["default"].delete(e.selected,t.name)},[n.ai.DESTROY_ITEM](e,t){e.selected[t.name]&&(e.selected[t.name].splice(t.index,1),0===e.selected[t.name].length&&s["default"].delete(e.selected,t.name),e.connector=null)},[n.ai.REORDER_ITEMS](e,t){const i={};i[t.name]=t.items,e.selected=Object.assign({},e.selected,i)},[n.ai.UPDATE_BROWSER_MAX](e,t){e.max=Math.max(0,t)},[n.ai.UPDATE_BROWSER_CONNECTOR](e,t){t&&""!==t&&(e.connector=t)},[n.ai.UPDATE_BROWSER_TITLE](e,t){t&&""!==t&&(e.title=t)},[n.ai.UPDATE_BROWSER_NOTE](e,t){e.note=t},[n.ai.DESTROY_BROWSER_CONNECTOR](e){e.connector=null},[n.ai.UPDATE_BROWSER_ENDPOINT](e,t){t&&""!==t&&(e.endpoint=t.value,e.endpointName=t.label||"")},[n.ai.DESTROY_BROWSER_ENDPOINT](e){e.endpoint="",e.endpointName=""},[n.ai.UPDATE_BROWSER_ENDPOINTS](e,t){!t&&!t.length>0||(e.endpoints=t,e.endpoint=t[0].value,e.endpointName=t[0].label)},[n.ai.DESTROY_BROWSER_ENDPOINTS](e){e.endpoints=[]},[n.ai.ADD_BROWSERS](e,t){let{browsers:i}=t;e.selected=Object.assign({},e.selected,i)}},d={async[a.cp.DUPLICATE_BLOCK](e,t){let{commit:i,getters:s}=e,{block:a,id:o}=t;const r={...s.browsersByBlockId(a.id)},l=Object.keys(r),d={};l.forEach((e=>d[e.replace(a.id,o)]=[...r[e]])),i(n.ai.ADD_BROWSERS,{browsers:d})}};t.c={state:o,getters:r,mutations:l,actions:d}},7768:function(e,t,i){"use strict";i.d(t,{c:function(){return b}});var s=i(7632),a=i(4267),n=i(9899),o=i.n(n),r=i(9812),l=i(9480);const d="DATATABLE";var c={get(e,t){o().get(window["TWILL"].CMS_URLS.index,{params:e}).then((function(e){if(e.data.replaceUrl){const t=e.request.responseURL;(0,l.mw)(t)}if(t&&"function"===typeof t){const i={data:e.data.tableData?e.data.tableData:[],nav:e.data.tableMainFilters?e.data.tableMainFilters:[],maxPage:e.data.maxPage?e.data.maxPage:1};t(i)}}),(function(e){const t={message:"Get request error.",value:e};(0,r.q)(d,t)}))},togglePublished(e,t,i){o().put(window["TWILL"].CMS_URLS.publish,{id:e.id,active:e.published}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Publish request error.",value:e};(0,r.q)(d,t),i&&"function"===typeof i&&i(e.response)}))},toggleFeatured(e,t){o().put(window["TWILL"].CMS_URLS.feature,{id:e.id,active:e.featured}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Feature request error.",value:e};(0,r.q)(d,t)}))},delete(e,t){o()["delete"](e.delete).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Delete request error.",value:e};(0,r.q)(d,t)}))},restore(e,t){o().put(window["TWILL"].CMS_URLS.restore,{id:e.id}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Restore request error.",value:e};(0,r.q)(d,t)}))},destroy(e,t){o().put(window["TWILL"].CMS_URLS.forceDelete,{id:e.id}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Destroy request error.",value:e};(0,r.q)(d,t)}))},duplicate(e,t){o().put(e.duplicate).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Duplicate request error.",value:e};(0,r.q)(d,t)}))},reorder(e,t){o().post(window["TWILL"].CMS_URLS.reorder,{ids:e}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Reorder request error.",value:e};(0,r.q)(d,t)}))},bulkPublish(e,t){o().post(window["TWILL"].CMS_URLS.bulkPublish,{ids:e.ids,publish:e.toPublish}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Bulk publish request error.",value:e};(0,r.q)(d,t)}))},bulkFeature(e,t){o().post(window["TWILL"].CMS_URLS.bulkFeature,{ids:e.ids,feature:e.toFeature}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Bulk feature request error.",value:e};(0,r.q)(d,t)}))},bulkDelete(e,t){o().post(window["TWILL"].CMS_URLS.bulkDelete,{ids:e}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Bulk delete request error.",value:e};(0,r.q)(d,t)}))},bulkRestore(e,t){o().post(window["TWILL"].CMS_URLS.bulkRestore,{ids:e}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Bulk restore request error.",value:e};(0,r.q)(d,t)}))},bulkDestroy(e,t){o().post(window["TWILL"].CMS_URLS.bulkForceDelete,{ids:e}).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Bulk destroy request error.",value:e};(0,r.q)(d,t)}))}},u=i(624);const h=(e,t,i)=>{e.forEach((e=>{e.id===t&&i(e),e.children&&h(e.children,t,i)}))},p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["id","children"],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";const s=JSON.parse(JSON.stringify(e));return s.forEach((e=>{for(const s in e)t.includes(s)||delete e[s],s===i&&(e[s]=p(e[s]))})),s},m={baseUrl:window["TWILL"].STORE.datatable.baseUrl||"",data:window["TWILL"].STORE.datatable.data||[],columns:window["TWILL"].STORE.datatable.columns||[],filter:window["TWILL"].STORE.datatable.filter||{},filtersNav:window["TWILL"].STORE.datatable.navigation||[],page:Number(window["TWILL"].STORE.datatable.page||1),maxPage:Number(window["TWILL"].STORE.datatable.maxPage||1),defaultMaxPage:Number(window["TWILL"].STORE.datatable.defaultMaxPage||1),offset:Number(window["TWILL"].STORE.datatable.offset||60),defaultOffset:Number(window["TWILL"].STORE.datatable.defaultOffset||60),sortKey:window["TWILL"].STORE.datatable.sortKey||"",sortDir:window["TWILL"].STORE.datatable.sortDir||"asc",bulk:[],localStorageKey:window["TWILL"].STORE.datatable.localStorageKey||window.location.pathname,loading:!1,updateTracker:0},f={dataIds:e=>e.data.map((e=>e.id)),hideableColumns:e=>e.columns.filter((e=>e.optional)),visibleColumns:e=>e.columns.filter((e=>e.visible)),visibleColumnsNames:e=>{const t=[];return e.columns.length&&e.columns.forEach((function(e){e.visible&&t.push(e.name)})),t}},g={[u.ec.UPDATE_DATATABLE_DATA](e,t){e.bulk=[],e.data=t},[u.ec.UPDATE_DATATABLE_BULK](e,t){e.bulk.indexOf(t)>-1?e.bulk=e.bulk.filter((function(e){return e!==t})):e.bulk.push(t)},[u.ec.REPLACE_DATATABLE_BULK](e,t){e.bulk=t},[u.ec.ADD_DATATABLE_COLUMN](e,t){e.columns.splice(t.index,0,t.data)},[u.ec.REMOVE_DATATABLE_COLUMN](e,t){e.columns.forEach((function(i,s){i.name===t&&e.columns.splice(s,1)}))},[u.ec.UPDATE_DATATABLE_FILTER](e,t){e.filter=Object.assign({},e.filter,t)},[u.ec.CLEAR_DATATABLE_FILTER](e){e.filter=Object.assign({},{search:"",status:e.filter.status})},[u.ec.UPDATE_DATATABLE_FILTER_STATUS](e,t){e.filter.status=t},[u.ec.UPDATE_DATATABLE_OFFSET](e,t){e.offset=t,(0,a.st)(e.localStorageKey+"_page-offset",e.offset)},[u.ec.UPDATE_DATATABLE_PAGE](e,t){e.page=t},[u.ec.UPDATE_DATATABLE_MAXPAGE](e,t){e.page>t&&(e.page=t),e.maxPage=t},[u.ec.UPDATE_DATATABLE_VISIBLITY](e,t){(0,a.st)(e.localStorageKey+"_columns-visible",JSON.stringify(t)),e.columns.forEach((function(e){for(let i=0;i=0&&(e.data[t].published="toggle"===s?!e.data[t].published:s)}function n(t){return e.data.findIndex((function(e,i){return e.id===t}))}if(Array.isArray(i))i.forEach((function(e){const t=n(e);a(t)})),e.bulk=[];else{const e=n(i);a(e)}},[u.ec.FEATURE_DATATABLE](e,t){const i=t.id,s=t.value;function a(t){t>=0&&(e.data[t].featured="toggle"===s?!e.data[t].featured:s)}function n(t){return e.data.findIndex((function(e,i){return e.id===t}))}if(Array.isArray(i))i.forEach((function(e){const t=n(e);a(t)})),e.bulk=[];else{const e=n(i);a(e)}},[u.ec.UPDATE_DATATABLE_LOADING](e,t){e.loading=!e.loading},[u.ec.UPDATE_DATATABLE_NESTED](e,t){h(e.data,t.parentId,(e=>{e.children=t.val}))},[u.ec.UPDATE_DATATABLE_TRACKER](e,t){e.updateTracker=t?e.updateTracker+1:0}},_={[s.cp.GET_DATATABLE](e){let{commit:t,state:i,getters:s}=e;if(!i.loading){t(u.ec.UPDATE_DATATABLE_LOADING,!0);const e={sortKey:i.sortKey,sortDir:i.sortDir,page:i.page,offset:i.offset,columns:s.visibleColumnsNames,filter:JSON.stringify(i.filter)};c.get(e,(function(e){t(u.ec.UPDATE_DATATABLE_DATA,e.data),t(u.ec.UPDATE_DATATABLE_MAXPAGE,e.maxPage),t(u.ec.UPDATE_DATATABLE_NAV,e.nav),t(u.ec.UPDATE_DATATABLE_LOADING,!1)}))}},[s.cp.SET_DATATABLE_NESTED](e){let{commit:t,state:i,dispatch:s}=e;const a=p(i.data);c.reorder(a,(function(e){t(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant})}))},[s.cp.SET_DATATABLE](e){let{commit:t,state:i,dispatch:s}=e;const a=i.data.map((e=>e.id));c.reorder(a,(function(e){t(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant})}))},[s.cp.TOGGLE_PUBLISH](e,t){let{commit:i,state:a,dispatch:n}=e;c.togglePublished(t,(function(e){i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),n(s.cp.GET_DATATABLE)}),(function(e){i(u.gp.SET_NOTIF,{message:e.data.error.message,variant:"error"})}))},[s.cp.DELETE_ROW](e,t){let{commit:i,state:a,dispatch:n}=e;c.delete(t,(function(e){i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),n(s.cp.GET_DATATABLE)}))},[s.cp.DUPLICATE_ROW](e,t){let{commit:i,state:s,dispatch:a}=e;c.duplicate(t,(function(e){i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),e.data.hasOwnProperty("redirect")&&window.location.replace(e.data.redirect)}))},[s.cp.RESTORE_ROW](e,t){let{commit:i,state:a,dispatch:n}=e;c.restore(t,(function(e){i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),n(s.cp.GET_DATATABLE)}))},[s.cp.DESTROY_ROW](e,t){let{commit:i,state:a,dispatch:n}=e;c.destroy(t,(function(e){i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),n(s.cp.GET_DATATABLE)}))},[s.cp.BULK_PUBLISH](e,t){let{commit:i,state:a,dispatch:n}=e;c.bulkPublish({ids:a.bulk.join(),toPublish:t.toPublish},(function(e){i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),n(s.cp.GET_DATATABLE)}))},[s.cp.TOGGLE_FEATURE](e,t){let{commit:i,state:s}=e;c.toggleFeatured(t,(e=>{i(u.ec.FEATURE_DATATABLE,{id:t.id,value:"toggle"}),i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant})}))},[s.cp.BULK_FEATURE](e,t){let{commit:i,state:s}=e;c.bulkFeature({ids:s.bulk.join(),toFeature:t.toFeature},(function(e){i(u.ec.FEATURE_DATATABLE,{id:s.bulk,value:!0}),i(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant})}))},[s.cp.BULK_DELETE](e){let{commit:t,state:i,dispatch:a}=e;c.bulkDelete(i.bulk.join(),(function(e){t(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),a(s.cp.GET_DATATABLE)}))},[s.cp.BULK_RESTORE](e){let{commit:t,state:i,dispatch:a}=e;c.bulkRestore(i.bulk.join(),(function(e){t(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),a(s.cp.GET_DATATABLE)}))},[s.cp.BULK_DESTROY](e){let{commit:t,state:i,dispatch:a}=e;c.bulkDestroy(i.bulk.join(),(function(e){t(u.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),a(s.cp.GET_DATATABLE)}))}};var b={state:m,getters:f,actions:_,mutations:g}},6660:function(e,t,i){"use strict";i.d(t,{c:function(){return b}});var s=i(8316),a=i.n(s),n=i(7632),o=i(4695),r=i(9899),l=i.n(r),d=i(9812);const c="FORM";var u={get(e,t,i){l().get(e).then((function(e){t&&"function"===typeof t&&t(e)}),(function(e){const t={message:"Get request error.",value:e};(0,d.q)(c,t),i&&"function"===typeof i&&i(e)}))},post(e,t,i,s){l().post(e,t).then((function(e){i&&"function"===typeof i&&i(e)}),(function(e){const t={message:"Post request error.",value:e};(0,d.q)(c,t),s&&"function"===typeof s&&s(e)}))},put(e,t,i,s){l().put(e,t).then((function(e){i&&"function"===typeof i&&i(e)}),(function(e){const t={message:"Save request error.",value:e};(0,d.q)(c,t),s&&"function"===typeof s&&s(e)}))}},h=i(624);const p=(e,t)=>e.findIndex((e=>e.name===t.name)),m={loading:!1,type:"save",baseUrl:window["TWILL"].STORE.form.baseUrl||"",fields:window["TWILL"].STORE.form.fields||[],modalFields:[],saveUrl:window["TWILL"].STORE.form.saveUrl||"",previewUrl:window["TWILL"].STORE.form.previewUrl||"",restoreUrl:window["TWILL"].STORE.form.restoreUrl||"",blockPreviewUrl:window["TWILL"].STORE.form.blockPreviewUrl||"",errors:{},isCustom:window["TWILL"].STORE.form.isCustom||!1,reloadOnSuccess:window["TWILL"].STORE.form.reloadOnSuccess||!1,isSubmitPrevented:!1},f={fieldsByName(e){return t=>e.fields.filter((function(e){return e.name===t}))},fieldValueByName:(e,t)=>e=>t.fieldsByName(e).length?t.fieldsByName(e)[0].value:"",modalFieldsByName(e){return t=>e.modalFields.filter((function(e){return e.name===t}))},modalFieldValueByName:(e,t)=>e=>t.modalFieldsByName(e).length?t.modalFieldsByName(e)[0].value:"",fieldsByBlockId:e=>t=>e.fields.filter((e=>e.name.startsWith("blocks[".concat(t,"]"))))},g={[h.tt.UPDATE_FORM_PERMALINK](e,t){t&&""!==t&&(e.permalink=t)},[h.tt.PREVENT_SUBMIT](e){e.isSubmitPrevented=!0},[h.tt.ALLOW_SUBMIT](e){e.isSubmitPrevented=!1},[h.tt.EMPTY_FORM_FIELDS](e,t){e.fields=[]},[h.tt.ADD_FORM_FIELDS](e,t){e.fields=[...e.fields,...t]},[h.tt.REPLACE_FORM_FIELDS](e,t){e.fields=t},[h.tt.UPDATE_FORM_FIELD](e,t){let i=t.locale?{}:null;const s=p(e.fields,t);-1!==s&&(t.locale&&(i=e.fields[s].value||{}),e.fields.splice(s,1)),t.locale?i[t.locale]=t.value:i=t.value,e.fields.push({name:t.name,value:i})},[h.tt.REMOVE_FORM_FIELD](e,t){e.fields.forEach((function(i,s){i.name===t&&e.fields.splice(s,1)}))},[h.tt.DUPLICATE_BLOCK_FORM_FIELDS](e,t){let{fields:i,oldId:s,newId:n}=t;const o=[];i.forEach((e=>{o.push({name:e.name.replace(s,n),value:a()(e.value)})})),e.fields=[...e.fields,...o]},[h.tt.EMPTY_MODAL_FIELDS](e,t){e.modalFields=[]},[h.tt.REPLACE_MODAL_FIELDS](e,t){e.modalFields=t},[h.tt.UPDATE_MODAL_FIELD](e,t){let i=t.locale?{}:null;const s=p(e.modalFields,t);-1!==s&&(t.locale&&(i=e.modalFields[s].value),e.modalFields.splice(s,1)),t.locale?i[t.locale]=t.value:i=t.value,e.modalFields.push({name:t.name,value:i})},[h.tt.REMOVE_MODAL_FIELD](e,t){e.modalFields.forEach((function(i,s){i.name===t&&e.modalFields.splice(s,1)}))},[h.tt.UPDATE_FORM_LOADING](e,t){e.loading=t||!e.loading},[h.tt.SET_FORM_ERRORS](e,t){e.errors=t},[h.tt.CLEAR_FORM_ERRORS](e){e.errors=[]},[h.tt.UPDATE_FORM_SAVE_TYPE](e,t){e.type=t}},_={[n.cp.HANDLE_ERRORS](e,t){let{commit:i,state:s,getters:a,rootState:n}=e;const o=n.repeaters.repeaters;Object.keys(t).forEach((e=>{const i=e.split(".");if(i.length>=4){const s=i[0],a=i[1],n=i[2],r=i[3];if("repeaters"===s){const i=o[a][n].id,s="blocks[".concat(i,"][").concat(r,"]");t[s]=t[e]}}})),i(h.tt.SET_FORM_ERRORS,t)},[n.cp.REPLACE_FORM](e,t){let{commit:i,state:s,getters:a,rootState:o,dispatch:r}=e;return new Promise(((e,s)=>{i(h.tt.CLEAR_FORM_ERRORS),i(h.gp.CLEAR_NOTIF,"error"),u.get(t,(function(t){i(h.tt.UPDATE_FORM_LOADING,!1);const s=t.data;s.hasOwnProperty("languages")&&(i(h.cp.REPLACE_LANGUAGES,s.languages),delete s.languages),s.hasOwnProperty("revisions")&&(i(h.kP.UPDATE_REV_ALL,s.revisions),delete s.revisions),i(h.tt.REPLACE_FORM_FIELDS,s.fields),e()}),(function(e){i(h.tt.UPDATE_FORM_LOADING,!1),r(n.cp.HANDLE_ERRORS,e.response.data),s(e)}))}))},[n.cp.UPDATE_FORM_IN_LISTING](e,t){let{commit:i,state:s,getters:a,rootState:n}=e;return new Promise(((e,s)=>{i(h.tt.CLEAR_FORM_ERRORS),i(h.gp.CLEAR_NOTIF,"error");const a=Object.assign((0,o.iM)(n),{languages:n.language.all});u[t.method](t.endpoint,a,(function(s){i(h.tt.UPDATE_FORM_LOADING,!1),s.data.hasOwnProperty("redirect")&&t.redirect&&window.location.replace(s.data.redirect),i(h.gp.SET_NOTIF,{message:s.data.message,variant:s.data.variant}),e()}),(function(e){i(h.tt.UPDATE_FORM_LOADING,!1),i(h.tt.SET_FORM_ERRORS,e.response.data),i(h.gp.SET_NOTIF,{message:"Your submission could not be validated, please fix and retry",variant:"error"}),s(e)}))}))},[n.cp.CREATE_FORM_IN_MODAL](e,t){let{commit:i,state:s,getters:a,rootState:n}=e;return new Promise(((e,s)=>{i(h.tt.CLEAR_FORM_ERRORS),i(h.gp.CLEAR_NOTIF,"error");const a=Object.assign((0,o.HH)(n),{languages:n.language.all});u[t.method](t.endpoint,a,(function(s){i(h.tt.UPDATE_FORM_LOADING,!1),i(h.MD.UPDATE_OPTIONS,{name:t.name,options:s.data}),e()}),(function(e){i(h.tt.UPDATE_FORM_LOADING,!1),i(h.tt.SET_FORM_ERRORS,e.response.data),i(h.gp.SET_NOTIF,{message:"Your submission could not be validated, please fix and retry",variant:"error"}),s(e)}))}))},[n.cp.SAVE_FORM](e,t){let{commit:i,state:s,getters:a,rootState:r,dispatch:l}=e;i(h.tt.CLEAR_FORM_ERRORS),i(h.gp.CLEAR_NOTIF,"error"),i(h.tt.UPDATE_FORM_SAVE_TYPE,t);const d=(0,o.io)(r),c=r.publication.createWithoutModal?"post":"put";u[c](s.saveUrl,d,(function(e){i(h.tt.UPDATE_FORM_LOADING,!1),e.data.hasOwnProperty("redirect")&&window.location.replace(e.data.redirect),s.reloadOnSuccess&&window.location.reload(),i(h.gp.SET_NOTIF,{message:e.data.message,variant:e.data.variant}),i(h.wt.UPDATE_PUBLISH_SUBMIT),e.data.hasOwnProperty("revisions")&&i(h.kP.UPDATE_REV_ALL,e.data.revisions)}),(function(e){i(h.tt.UPDATE_FORM_LOADING,!1),e.response.data.hasOwnProperty("exception")?i(h.gp.SET_NOTIF,{message:"Your submission could not be processed.",variant:"error"}):(l(n.cp.HANDLE_ERRORS,e.response.data),i(h.gp.SET_NOTIF,{message:"Your submission could not be validated, please fix and retry",variant:"error"}))}))},async[n.cp.DUPLICATE_BLOCK](e,t){let{commit:i,getters:s}=e,{block:a,id:n}=t;const o=s.fieldsByBlockId(a.id);i(h.tt.DUPLICATE_BLOCK_FORM_FIELDS,{fields:o,oldId:a.id,newId:n})}};var b={state:m,getters:f,mutations:g,actions:_}},6188:function(e,t,i){"use strict";var s=i(624);const a={all:window["TWILL"].STORE.languages.all||[],initialAll:window["TWILL"].STORE.languages.all||[],active:window["TWILL"].STORE.languages.active||window["TWILL"].STORE.languages.all[0]||{}},n={publishedLanguages:e=>e.all.filter((e=>e.published))},o={[s.cp.SWITCH_LANG](e,t){let{oldValue:i}=t;function s(e){return e.value===i.value}const a=e.all.findIndex(s),n=a0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{message:"",value:null},r="";n&&"string"===typeof n&&(r="".concat("TWILL"," - [").concat(n,"]: "));const l=r+o.message,d=null!==(e=null!==(t=null===o||void 0===o||null===(i=o.value)||void 0===i||null===(i=i.response)||void 0===i?void 0:i.status)&&void 0!==t?t:null===o||void 0===o||null===(s=o.response)||void 0===s?void 0:s.status)&&void 0!==e?e:null;var c;(console.error(l),null!==o&&void 0!==o&&o.value&&null!==(a=o.value)&&void 0!==a&&a.response)&&console.error(null===(c=o.value.response)||void 0===c?void 0:c.data);401===d||419===d?window["TWILL"].vm.notif({message:'Your session has expired, please login in another tab. You can then continue working here.',variant:"warning"}):403===d&&window["TWILL"].vm.notif({message:"You don't have permission to perform this action.",variant:"warning"})}i.d(t,{q:function(){return s}})},8884:function(e,t,i){"use strict";i.d(t,{c:function(){return p}});var s=i(6204),a=i.n(s);const n={publishDateDisplayFormat:window["TWILL"].STORE.config.publishDateDisplayFormat},o={},r={},l={};var d={state:n,getters:o,mutations:r,actions:l},c=i(8904);function u(e,t){const s=c.ob[(0,c.qe)()];return a()(e,t,{locale:void 0!==s&&s.hasOwnProperty("date-fns")?s["date-fns"]:i(7800)})}const h={slugify:function(e){const t={",":"-","/":"-",":":"-",";":"-",_:"-","©":"(c)","·":"-","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","ā":"a","ă":"a","ą":"a","ć":"c","č":"c","ď":"d","ē":"e","ę":"e","ě":"e","ğ":"g","ģ":"g","ī":"i","ı":"i","ķ":"k","ļ":"l","ł":"l","ń":"n","ņ":"n","ň":"n","ő":"o","œ":"oe","ŕ":"r","ř":"r","ś":"s","ş":"s","š":"s","ť":"t","ū":"u","ů":"u","ű":"u","ź":"z","ż":"z","ž":"z","ǘ":"u","ǵ":"g","ǹ":"n","ș":"s","ț":"t","ΐ":"i","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","є":"ye","і":"i","ї":"yi","ґ":"g","ḧ":"h","ḿ":"m","ṕ":"p","ẃ":"w","ẍ":"x","ә":"a","ғ":"g","қ":"q","ң":"n","ө":"o","ұ":"u"},i=new RegExp(Object.keys(t).join("|"),"g");return e.toString().toLowerCase().trim().replace(/\s+/g,"-").replace(i,(e=>t[e])).replace(/&/g,"-and-").replace(/[^\w-]+/g,"-").replace(/--+/g,"-").replace(/(^-+)|(-+$)/,"")},prettierUrl:function(e){return e.replace(/^\/\/|^.*?:(\/\/)?/,"")},uppercase:function(e){return e||0===e?e.toString().toUpperCase():""},lowercase:function(e){return e||0===e?e.toString().toLowerCase():""},capitalize:function(e){return e?(e=e.toString(),e.charAt(0).toUpperCase()+e.slice(1)):""},formatDate:function(e){return e?u(e,"MMM, DD, YYYY, "+(0,c.sn)()):""},formatDateWithFormat:function(e,t){return e||(e=new Date),u(e,t)},formatDatatableDate:function(e){const t=d.state.publishDateDisplayFormat.length>0?d.state.publishDateDisplayFormat:"MMM DD, YYYY";return e||(e=new Date),u(e,t)},formatCalendarDate:function(e){const t="MMM, DD, YYYY, "+(0,c.sn)();return e||(e=new Date),u(e,t)}};var p=h},1448:function(e,t,i){"use strict";function s(e,t,i){for(let s=0;s0?e.files:!(!e.value||""===e.value)&&e.value);if(v(e))return!(!e.value||""===e.value)&&e.value;if(y(e))return e.value&&""!==e.value?e.value:!(!e.options||!e.options.length||""===e.options[0].value)&&e.options[0].value;if(w(e)){if(e.options&&e.options.length>0){const t=[];return u(e.options,(function(e){e.selected&&t.push(e.value)})),(i||!!t.length)&&t}return!1}return E(e)?e.value&&""!==e.value?e.value:!(!e.innerText||""===e.innerText)&&e.innerText:"undefined"!==typeof e.value&&((i||""!==e.value)&&e.value)}function A(e,t,i,s){const a=t[0];if(g(e))return!1!==i?(s[a]=i,i):void 0;if(_(e))return!1!==i?(s[a]||(s[a]=[]),s[a].push(i)):void 0;if(w(e)){if(!1===i)return;s[a]=i}return s[a]=i,i}function x(e,t,i,s){const a=t[0];return t.length>1?"[]"===a?(s[d(s)]={},x(e,t.splice(1,t.length),i,s[l(s)])):(s[a]&&c(s[a])>0||(s[a]={}),x(e,t.splice(1,t.length),i,s[a])):1===t.length?"[]"===a?(s[d(s)]=i,s):(A(e,t,i,s),s):void 0}function S(){let e,t,a,o=0;const r={};for(o=0;o1&&x(t,e,a||"",r)));const l=c(r);return l>0&&r}return h(e)}i.d(t,{c:function(){return s}})},4695:function(e,t,i){"use strict";i.d(t,{HH:function(){return p},Q9:function(){return l},gP:function(){return d},iM:function(){return h},io:function(){return m}});var s=i(656),a=i.n(s);const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.assign({},...Object.keys(e).map((i=>{if(t){if(o(i,t.id))return{[r(i,t.id)]:e[i]}}else if(!i.startsWith("blocks["))return{[i]:e[i]};return null})).filter((e=>e)))},o=(e,t)=>e.startsWith("blocks["+t+"]"),r=(e,t)=>{const i=e.replace("blocks["+t+"][","");return i.match(/]/gi).length>1?i.replace("]",""):i.slice(0,-1)},l=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=Object.keys(t.repeaters.repeaters),a=Object.assign({},...s.filter((t=>t.startsWith("blocks-"+e.id+"|"))).map((i=>({[i.replace("blocks-"+e.id+"|","")]:t.repeaters.repeaters[i].map((e=>l(e,t,!0)))})))),d=Object.keys(t.blocks.blocks),c=Object.assign({},...d.filter((t=>t.startsWith("blocks-"+e.id))).map((i=>({[i.replace("blocks-"+e.id+"|","")]:t.blocks.blocks[i].map((e=>l(e,t)))}))));return{id:e.id,type:e.type,is_repeater:i,editor_name:e.name,content:t.form.fields.filter((t=>o(t.name,e.id))).map((t=>({name:r(t.name,e.id),value:t.value}))).reduce(((e,t)=>(e[t.name]=t.value,e)),{}),medias:n(t.mediaLibrary.selected,e),browsers:n(t.browser.selected,e),blocks:{...a,...c}}},d=e=>a()(e.content)&&a()(e.browsers)&&a()(e.medias)&&a()(e.blocks),c=e=>Object.assign({},...Object.keys(e.repeaters.repeaters).filter((e=>!e.startsWith("blocks-"))).map((t=>({[t]:e.repeaters.repeaters[t].map((t=>{var i;const s=l(t,e),a=s.content;return delete s.content,delete s.type,a.id=t.id,a.repeater_target_id=null!==(i=t.repeater_target_id)&&void 0!==i?i:null,Object.assign(s,a)}))})))),u=e=>{const t={...e.blocks.blocks};return Object.keys(t).filter((e=>!e.startsWith("blocks-"))).map((i=>t[i].map((t=>(t.name=i,l(t,e)))))).flat()},h=e=>{const t=e.form.fields.filter((e=>!e.name.startsWith("blocks[")&&!e.name.startsWith("mediaMeta["))).reduce(((e,t)=>(e[t.name]=t.value,e)),{});return t},p=e=>{const t=e.form.modalFields.filter((e=>!e.name.startsWith("blocks[")&&!e.name.startsWith("mediaMeta["))).reduce(((e,t)=>(e[t.name]=t.value,e)),{});return t},m=e=>{const t=h(e),i=Object.assign(t,{cmsSaveType:e.form.type,published:e.publication.published,public:"public"===e.publication.visibility,publish_start_date:e.publication.startDate,publish_end_date:e.publication.endDate,languages:e.language.all,parent_id:e.parents.active,medias:n(e.mediaLibrary.selected),browsers:n(e.browser.selected),blocks:u(e),repeaters:c(e)});return i}},400:function(e,t){"use strict";t.c={modal:"s--modal",overlay:"s--overlay",editor:"s--in-editor",search:"s--search"}},512:function(e,t,i){"use strict";i.d(t,{aU:function(){return s}});const s=(e,t,i)=>new Promise(((s,a)=>{let n=document.getElementById(e);const o=()=>{n.removeEventListener("load",o),s()};n?n.addEventListener("load",o):(n=document.createElement("script"),n.setAttribute("id",e),n.type=i,n.onload=o,n.onerror=a,document.getElementsByTagName("head")[0].appendChild(n),n.src=t)}))},8904:function(e,t,i){"use strict";i.d(t,{Yt:function(){return w},ob:function(){return v},qe:function(){return y},sn:function(){return E}});var s=i(5252),a=i(6380),n=i(1828),o=i(5715),r=i(1584),l=i(9992),d=i(9880),c=i(4592),u=i(9464),h=i(4795),p=i(9312),m=i(7804),f=i(9252),g=i(2432),_=i(5540),b=i(2476);const v={en:{"date-fns":i(7800)},ar:{"date-fns":i(3324),flatpickr:s.Arabic},bs:{"date-fns":i(7800),flatpickr:a.Bosnian},cs:{"date-fns":i(6620),flatpickr:n.Czech},de:{"date-fns":i(5320),flatpickr:l.German},es:{"date-fns":i(3984),flatpickr:g.Spanish},fr:{"date-fns":i(7352),flatpickr:r.French},it:{"date-fns":i(2293),flatpickr:d.Italian},nl:{"date-fns":i(3172),flatpickr:o.Dutch},no:{"date-fns":i(7800),flatpickr:u.Norwegian},pl:{"date-fns":i(8224),flatpickr:h.Polish},pt:{"date-fns":i(3944),flatpickr:p.Portuguese},ru:{"date-fns":i(2648),flatpickr:m.Russian},sl:{"date-fns":i(456),flatpickr:f.Slovenian},tr:{"date-fns":i(4820),flatpickr:_.Turkish},uk:{"date-fns":i(7800),flatpickr:b.Ukrainian},"zh-Hans":{"date-fns":i(4828),flatpickr:c.Mandarin}};function y(){return window["TWILL"].twillLocalization.locale}function w(){return 2===new Intl.DateTimeFormat(y(),{hour:"numeric"}).formatToParts(new Date(2020,0,1,13)).find((e=>"hour"===e.type)).value.length}function E(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return w()||e?"HH:mm":"hh:mm A"}},9480:function(e,t,i){"use strict";i.d(t,{mw:function(){return l},sv:function(){return d}});const s="undefined"!==typeof window,a=(s&&function(){const e=window.navigator.userAgent;(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&window.history)}(),s&&window.performance&&window.performance.now?window.performance:Date);let n=o();function o(){return a.now().toFixed(3)}function r(e,t){const i=window.history;try{t?i.replaceState({key:n},"",e):(n=o(),i.pushState({key:n},"",e))}catch(s){window.location[t?"replace":"assign"](e)}}function l(e){r(e,!0)}function d(){return location.protocol+"//"+location.host+location.pathname}},708:function(e,t){"use strict";const i=function(e){const t={el:document,offset:0,duration:250,easing:"linear"},i=Date.now();let s=0,a=!1;const n={linear:function(e){return e},easeIn:function(e){return e*e*e},easeOut:function(e){return--e*e*e+1},easeInOut:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}},o=window.requestAnimationFrame;let r;for(const h in e)"undefined"!==typeof e[h]&&(t[h]=e[h]);function l(e,t){return e{let d=()=>r,f="";queueMicrotask((()=>{if(["function","dynamic"].includes(n)){let n=u(r);l((()=>{d=r=>{let o;return e.dontAutoEvaluateFunctions((()=>{n((e=>{o="function"===typeof e?e(r):e}),{scope:{$input:r,$money:s.bind({el:t})}})})),o},h(t,!1)}))}else h(t,!1);t._x_model&&t._x_model.set(t.value)}));const p=new AbortController;function h(e,t=!0){let n=e.value,r=d(n);if(!r||"false"===r)return!1;if(f.length-e.value.length===1)return f=e.value;let i=()=>{f=e.value=m(n,r)};t?o(e,r,(()=>{i()})):i()}function m(e,t){if(""===e)return"";let n=i(t,e),r=a(t,n);return r}c((()=>{p.abort()})),t.addEventListener("input",(()=>h(t)),{signal:p.signal,capture:!0}),t.addEventListener("blur",(()=>h(t,!1)),{signal:p.signal})})).before("model")}function o(e,t,n){let r=e.selectionStart,o=e.value;n();let s=o.slice(0,r),l=a(t,i(t,s)).length;e.setSelectionRange(l,l)}function i(e,t){let n=t,r="",o={9:/[0-9]/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},i="";for(let a=0;a{let n="",r=0;for(let o=e.length-1;o>=0;o--)e[o]!==t&&(3===r?(n=e[o]+t+n,r=0):n=e[o]+n,r++);return n},i=e.startsWith("-")?"-":"",a=e.replaceAll(new RegExp(`[^0-9\\${t}]`,"g"),""),s=Array.from({length:a.split(t)[0].length}).fill("9").join("");return s=`${i}${o(s,n)}`,r>0&&e.includes(t)&&(s+=`${t}`+"9".repeat(r)),queueMicrotask((()=>{this.el.value.endsWith(t)||this.el.value[this.el.selectionStart-1]===t&&this.el.setSelectionRange(this.el.selectionStart-1,this.el.selectionStart-1)})),s}n.d(t,{cp:function(){return l}});var l=r},2528:function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,s){var l,u="function"===typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=l):o&&(l=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(e,t){return l.call(t),c(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:u}}n.d(t,{c:function(){return r}})},3624:function(e,t,n){"use strict";n.d(t,{c:function(){return Co}});var r,o,i,a,s=!1,l=!1,u=[],c=-1;function d(e){f(e)}function f(e){u.includes(e)||u.push(e),h()}function p(e){let t=u.indexOf(e);-1!==t&&t>c&&u.splice(t,1)}function h(){l||s||(s=!0,queueMicrotask(m))}function m(){s=!1,l=!0;for(let e=0;ee.effect(t,{scheduler:e=>{g?d(e):e()}}),a=e.raw}function b(e){o=e}function q(e){let t=()=>{},n=n=>{let r=o(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach((e=>e()))}),e._x_effects.add(r),t=()=>{void 0!==r&&(e._x_effects.delete(r),i(r))},r};return[n,()=>{t()}]}function w(e,t){let n,r=!0,a=o((()=>{let o=e();JSON.stringify(o),r?n=o:queueMicrotask((()=>{t(o,n),n=o})),r=!1}));return()=>i(a)}function _(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function x(e,t){if("function"===typeof ShadowRoot&&e instanceof ShadowRoot)return void Array.from(e.children).forEach((e=>x(e,t)));let n=!1;if(t(e,(()=>n=!0)),n)return;let r=e.firstElementChild;while(r)x(r,t,!1),r=r.nextElementSibling}function S(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var k=!1;function C(){k&&S("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),k=!0,document.body||S("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `