diff --git a/.env.example b/.env.example index 38731ad..3319610 100644 --- a/.env.example +++ b/.env.example @@ -5,7 +5,7 @@ APP_ENV=local APP_KEY= # set debug to false in production APP_DEBUG=true -APP_URL=http://dev.shaark +APP_URL=http://127.0.0.1:8000 APP_TIMEZONE=Europe/Paris # "en", "fr", "de", "nl" or "ja" APP_LANG=en diff --git a/app/Http/Controllers/Api/Manage/UsersController.php b/app/Http/Controllers/Api/Manage/UsersController.php index f629343..6b5e5f9 100644 --- a/app/Http/Controllers/Api/Manage/UsersController.php +++ b/app/Http/Controllers/Api/Manage/UsersController.php @@ -80,9 +80,9 @@ class UsersController extends Controller $admin = User::isAdmin()->first(); if ($admin) { - Post::where('user_id', $id)->update('user_id', $admin->id); + Post::where('user_id', $id)->update(['user_id' => $admin->id]); } else { - Post::where('user_id', $id)->update('user_id', null); + Post::where('user_id', $id)->update(['user_id' => null]); } return response()->json([ diff --git a/changelog.md b/changelog.md index 6ee07ca..d8223ed 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Unreleased +## Fixed + +- Create and delete users ([#77](https://github.com/MarceauKa/shaark/issues/77), [#87](https://github.com/MarceauKa/shaark/issues/87)) + ## Changed - Default user email is now `shaark@example.com` diff --git a/public/js/app.js b/public/js/app.js index 7303a0d..f3e24df 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"+fAT":function(t,e,n){var r={"./components/AlbumCard.vue":"idfw","./components/AlbumForm.vue":"nBz4","./components/Background.vue":"iyXs","./components/CheckFeature.vue":"8/rJ","./components/ChestCard.vue":"MX7w","./components/ChestForm.vue":"0O8z","./components/ChestLines.vue":"0TP3","./components/Comment.vue":"G1fO","./components/Comments.vue":"TfHT","./components/Confirm.vue":"cNyC","./components/Flash.vue":"tEIc","./components/HealthChecks.vue":"KL6o","./components/LinkCard.vue":"kuJz","./components/LinkForm.vue":"ugYh","./components/Loader.vue":"S4HP","./components/ManageArchives.vue":"K3gU","./components/ManageTags.vue":"NyNk","./components/ManageWalls.vue":"LP8H","./components/Modal.vue":"uuIC","./components/PasswordGenerator.vue":"ZTJQ","./components/PreventBrowserUnload.vue":"vciP","./components/PurgeLogins.vue":"jPMG","./components/Search.vue":"JX/T","./components/Sharer.vue":"zV0C","./components/StoryCard.vue":"yDsy","./components/StoryForm.vue":"5lKZ","./components/TagLimiter.vue":"/j45","./components/Tags.vue":"4dkW","./components/TempSharing.vue":"FT2k","./components/UpdateNotifier.vue":"ui2e","./components/UserForm.vue":"bVTN","./components/Users.vue":"FOBs"};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id="+fAT"},"/j45":function(t,e,n){"use strict";n.r(e);var r={props:{limit:{type:Number,required:!1,default:10},selector:{type:String,required:!1,default:"a"}},data:function(){return{items:null,count:0,more:!1}},mounted:function(){this.items=$(".items > ".concat(this.selector)),this.count=this.items.length,this.hide()},methods:{show:function(){var t=this;this.more=!0,this.items.each((function(e){e+1>t.limit&&$(t.items[e]).removeClass("d-none")}))},hide:function(){var t=this;this.more=!1,this.items.each((function(e){e+1>t.limit&&$(t.items[e]).addClass("d-none")}))}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.count>0,expression:"count > 0"}]},[n("span",{staticClass:"items"},[t._t("default")],2),t._v(" "),t.count>t.limit&&!1===t.more?n("button",{staticClass:"btn btn-outline-secondary btn-sm mb-1",attrs:{type:"button"},on:{click:t.show}},[n("i",{staticClass:"fas fa-plus"}),t._v(" "+t._s(t.count-t.limit)+"\n ")]):t._e(),t._v(" "),t.count>t.limit&&!0===t.more?n("button",{staticClass:"btn btn-outline-secondary btn-sm mb-1",attrs:{type:"button"},on:{click:t.hide}},[n("i",{staticClass:"fas fa-minus"})]):t._e()])}),[],!1,null,null,null);e.default=o.exports},0:function(t,e,n){n("bUC5"),t.exports=n("pyCd")},"0O8z":function(t,e,n){"use strict";n.r(e);var r=n("YLgT"),i=n.n(r),o=n("1IHE"),a=n("0fPN"),s={mixins:[i.a,a.a,o.a],props:{chest:{type:Object,required:!1,default:function(){}}},data:function(){return{form:{title:"",content:[],is_pinned:!1,tags:[]},loading:!1}},mounted:function(){this.chest&&(this.form=this.chest),this.startAudit()},methods:{submit:function(t){var e=this;this.loading=!0,axios.request({method:this.chest?"PUT":"POST",url:this.chest?this.chest.url_update:"/api/chest",data:this.form}).then((function(n){switch(e.clearAudit(),e.$toasted.success(e.__("Saved")),t){case"view":window.location=n.data.post.url;break;case"new":window.location="/chest/create";break;case"edit":window.location="/chest/".concat(n.data.post.postable_id,"/edit")}})).catch((function(t){e.loading=!1,e.setFormError(t),e.setHttpError(t),e.toastHttpError(e.__("Can't save"))}))}}},l=n("KHd+"),c=Object(l.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--chest"},[n("div",{staticClass:"card-body"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"title"}},[t._v(t._s(t.__("Title")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.title,expression:"form.title"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("title")},attrs:{type:"text",id:"title",disabled:t.loading},domProps:{value:t.form.title},on:{input:function(e){e.target.composing||t.$set(t.form,"title",e.target.value)}}}),t._v(" "),t.hasFormError("title")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("title")))]):t._e()]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Content")))]),t._v(" "),n("chest-lines",{model:{value:t.form.content,callback:function(e){t.$set(t.form,"content",e)},expression:"form.content"}})],1),t._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_pinned,expression:"form.is_pinned"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_pinned",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_pinned)?t._i(t.form.is_pinned,null)>-1:t.form.is_pinned},on:{change:function(e){var n=t.form.is_pinned,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_pinned",n.concat([null])):o>-1&&t.$set(t.form,"is_pinned",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_pinned",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_pinned",dusk:"chest-form-pinned"}},[t._v(t._s(t.__("Is pinned?")))])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Tags")))]),t._v(" "),n("tags",{model:{value:t.form.tags,callback:function(e){t.$set(t.form,"tags",e)},expression:"form.tags"}})],1)]),t._v(" "),n("div",{staticClass:"card-footer"},[n("div",{staticClass:"btn-group"},[n("button",{staticClass:"btn btn-primary",class:{"btn-danger":t.hasChanged},attrs:{type:"button",disabled:t.loading,dusk:"chest-form-save"},on:{click:function(e){return e.preventDefault(),t.submit("edit")}}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Save"))+"\n ")]),t._v(" "),n("button",{staticClass:"btn btn-primary dropdown-toggle dropdown-toggle-split",class:{"btn-danger":t.hasChanged},attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}}),t._v(" "),n("div",{staticClass:"dropdown-menu"},[n("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.submit("view")}}},[t._v(t._s(t.__("Save & View")))]),t._v(" "),n("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.submit("new")}}},[t._v(t._s(t.__("Save & New")))])])]),t._v(" "),t.chest?n("a",{staticClass:"btn btn-outline-primary",attrs:{href:t.chest.permalink}},[t._v(t._s(t.__("View")))]):t._e()])])}),[],!1,null,null,null);e.default=c.exports},"0TP3":function(t,e,n){"use strict";n.r(e);var r=n("9B9B"),i={mixins:[n.n(r).a],props:{preview:{type:null|Object,required:!1,default:null}},data:function(){return{lines:[],types:{url:this.__("URL"),text:this.__("Text"),password:this.__("Secret"),code:this.__("Code")},line:{type:"text",name:"",value:""},drag:!1,dragOptions:{animation:200,group:"lines",disabled:!1,ghostClass:"ghost",forceFallback:!0}}},methods:{addLine:function(t){var e=this;this.line.type=t,this.lines.push(this.line),this.line={type:"text",name:"",value:""},this.$nextTick((function(){var t=e.$refs.form.querySelectorAll('.row-line input[name="value"]');t[t.length-1].focus()}))},deleteLine:function(t){this.lines.splice(this.lines.indexOf(t),1)},toggleShowPassword:function(t,e){var n=t.target.parentNode.parentNode.firstChild;n.type="password"===n.type?"text":"password",t.target.innerHTML="password"===n.type?this.__("Show"):this.__("Hide")},setPassword:function(t,e){e.value=t}},watch:{"$attrs.value":function(t){this.lines=t},lines:function(t){this.$emit("input",t)}}},o=n("KHd+"),a=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"chest-lines"},[t.preview?n("section",{ref:"preview",staticClass:"my-3"},t._l(t.preview,(function(e,r){return n("div",{staticClass:"row mb-3"},[n("div",{staticClass:"col-12"},[n("strong",[t._v(t._s(e.name))])]),t._v(" "),n("div",{staticClass:"col-12"},["url"===e.type?n("a",{attrs:{href:e.value,target:"_blank"}},[t._v(t._s(e.value))]):"password"===e.type?n("div",{staticClass:"input-group input-group-sm"},[n("input",{staticClass:"form-control",attrs:{type:"password",autocomplete:"off",readonly:""},domProps:{value:e.value}}),t._v(" "),n("div",{staticClass:"input-group-append"},[n("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:function(e){return t.toggleShowPassword(e,r)}}},[t._v(t._s(t.__("Show")))]),t._v(" "),n("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:function(n){return t.copyToClipboard(n,e.value)}}},[t._v(t._s(t.__("Copy")))])])]):"code"===e.type?n("pre",{staticClass:"border p-2"},[n("code",[t._v(t._s(e.value))])]):n("span",[t._v(t._s(e.value))])])])})),0):n("section",{ref:"form"},[n("draggable",t._b({attrs:{group:"lines",handle:".handle-order"},on:{start:function(e){t.drag=!0},end:function(e){t.drag=!1}},model:{value:t.lines,callback:function(e){t.lines=e},expression:"lines"}},"draggable",t.dragOptions,!1),[n("transition-group",{attrs:{type:"transition",tag:"div",name:t.drag?null:"flip-list"}},t._l(t.lines,(function(e,r){return n("div",{key:"item-"+r,staticClass:"form-group"},[n("div",{staticClass:"row row-line"},[n("div",{staticClass:"col-12 col-md-4"},[n("div",{staticClass:"input-group"},[n("div",{staticClass:"input-group-prepend"},[n("button",{staticClass:"btn btn-outline-secondary dropdown-toggle",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[t._v(t._s(t.types[e.type]))]),t._v(" "),n("div",{staticClass:"dropdown-menu"},t._l(t.types,(function(r,i){return n("a",{staticClass:"dropdown-item",class:{active:i===e.type},on:{click:function(t){t.preventDefault(),e.type=i}}},[t._v(t._s(r))])})),0)]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.name,expression:"item.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:t.__("Name")},domProps:{value:e.name},on:{input:function(n){n.target.composing||t.$set(e,"name",n.target.value)}}})])]),t._v(" "),n("div",{staticClass:"col-12 col-md-8"},[n("div",{staticClass:"input-group"},["code"===e.type?n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"item.value"}],staticClass:"form-control",attrs:{rows:"5",name:"value"},domProps:{value:e.value},on:{input:function(n){n.target.composing||t.$set(e,"value",n.target.value)}}}):n("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"item.value"}],staticClass:"form-control",attrs:{type:"text",name:"value",autocomplete:"off"},domProps:{value:e.value},on:{input:function(n){n.target.composing||t.$set(e,"value",n.target.value)}}}),t._v(" "),n("div",{staticClass:"input-group-append"},["password"===e.type?n("password-generator",{attrs:{original:e.value},on:{generated:function(n){return t.setPassword(n,e)}}}):t._e(),t._v(" "),n("confirm",{staticClass:"btn btn-outline-secondary",attrs:{tag:"button",text:"","text-confirm":""},on:{confirmed:function(n){return t.deleteLine(e)}}}),t._v(" "),n("button",{staticClass:"btn btn-outline-secondary handle-order",attrs:{type:"button"}},[n("i",{staticClass:"fas fa-arrows-alt"})])],1)])])])])})),0)],1),t._v(" "),n("div",{staticClass:"form-group text-right"},t._l(t.types,(function(e,r){return n("button",{staticClass:"btn btn-outline-secondary mr-1",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.addLine(r)}}},[t._v(t._s(t.__("Add"))+" "+t._s(e))])})),0)],1)])}),[],!1,null,null,null);e.default=a.exports},"0fPN":function(t,e,n){"use strict";e.a={data:function(){return{formErrors:{}}},methods:{setFormError:function(t){this.formErrors=t.response.data.errors},hasFormError:function(t){return this.formErrors.hasOwnProperty(t)},firstFormError:function(t){return this.hasFormError(t)?this.formErrors[t][0]:null},resetFormError:function(){this.formErrors={}}}}},"1IHE":function(t,e,n){"use strict";var r={data:function(){return{httpError:{}}},methods:{setHttpError:function(t){this.httpError=t.response.data.message||null},hasHttpError:function(t){return this.httpError},getHttpError:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.hasHttpError()?this.httpError:t},toastHttpError:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.getHttpError(t);this.$toasted.error(e)}}};e.a=r},"1dGX":function(t,e,n){"use strict";e.Any=n("y8fO"),e.Cc=n("p7ys"),e.Cf=n("b9EY"),e.P=n("fKCf"),e.Z=n("T8I8")},"4dkW":function(t,e,n){"use strict";n.r(e);var r={data:function(){return{options:[],loading:!1}},mounted:function(){this.fetch()},methods:{fetch:function(){var t=this;this.loading=!0,axios.get("/api/tags").then((function(e){t.loading=!1,t.options=e.data})).catch((function(e){t.loading=!1,t.$toasted.error(t.__("Can't fetch tags")),console.log(e)}))},select:function(t){this.$attrs.value.push(t),this.$emit("input",this.$attrs.value)},deselect:function(t){this.$attrs.value.splice(this.$attrs.value.indexOf(t),1),this.$emit("input",this.$attrs.value)},create:function(t){this.options.push(t),this.$attrs.value.push(t)}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("multiselect",{attrs:{value:t.$attrs.value,"tag-placeholder":t.__("Create tag"),selectLabel:t.__("Click to select"),deselectLabel:t.__("Click to select"),noOptions:t.__("No tag"),placeholder:t.__("Search or type a tag"),"open-direction":"bottom",options:t.options,multiple:!0,taggable:!0,loading:t.loading,closeOnSelect:!1},on:{tag:t.create,select:t.select,remove:t.deselect}})}),[],!1,null,null,null);e.default=o.exports},"5lKZ":function(t,e,n){"use strict";n.r(e);var r=n("YLgT"),i=n.n(r),o=n("0fPN"),a=n("1IHE"),s={mixins:[i.a,o.a,a.a],props:{story:{type:Object,required:!1,default:function(){}}},data:function(){return{form:{title:"",slug:"",content:"",is_private:!1,is_pinned:!1,tags:[]},loading:!1,editor:{minHeight:"300px",language:document.getElementsByTagName("html")[0].getAttribute("lang")||"en",useCommandShortcut:!0,useDefaultHTMLSanitizer:!0,usageStatistics:!1,hideModeSwitch:!0,toolbarItems:["heading","bold","italic","strike","divider","hr","quote","divider","ul","ol","task","indent","outdent","divider","table","image","link","divider","code","codeblock"]}}},mounted:function(){this.story&&(this.form=this.story),this.startAudit()},methods:{submit:function(t){var e=this;this.loading=!0,axios.request({method:this.story?"PUT":"POST",url:this.story?this.story.url_update:"/api/story",data:this.form}).then((function(n){switch(e.clearAudit(),e.$toasted.success(e.__("Saved")),t){case"view":window.location=n.data.post.url;break;case"new":window.location="/story/create";break;case"edit":window.location="/story/".concat(n.data.post.postable_id,"/edit")}})).catch((function(t){e.loading=!1,e.setFormError(t),e.setHttpError(t),e.toastHttpError(e.__("Can't save"))}))}},computed:{fullUrl:function(){return"".concat(window.location.origin,"/").concat(this.form.slug)}},watch:{"form.title":function(t){this.form.slug=t.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"")}}},l=n("KHd+"),c=Object(l.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--story"},[n("div",{staticClass:"card-body"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"title"}},[t._v(t._s(t.__("Title")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.title,expression:"form.title"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("title")},attrs:{type:"text",id:"title",disabled:t.loading},domProps:{value:t.form.title},on:{input:function(e){e.target.composing||t.$set(t.form,"title",e.target.value)}}}),t._v(" "),t.hasFormError("title")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("title")))]):t._e(),t._v(" "),n("p",{staticClass:"text-muted"},[n("small",[t._v(t._s(t.fullUrl))])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"content"}},[t._v(t._s(t.__("Content")))]),t._v(" "),n("editor",{attrs:{id:"content",height:"auto",previewStyle:"tab",options:t.editor},model:{value:t.form.content,callback:function(e){t.$set(t.form,"content",e)},expression:"form.content"}})],1),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-md-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_private,expression:"form.is_private"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_private",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_private)?t._i(t.form.is_private,null)>-1:t.form.is_private},on:{change:function(e){var n=t.form.is_private,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_private",n.concat([null])):o>-1&&t.$set(t.form,"is_private",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_private",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_private",dusk:"story-form-private"}},[t._v(t._s(t.__("Is private?")))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_pinned,expression:"form.is_pinned"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_pinned",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_pinned)?t._i(t.form.is_pinned,null)>-1:t.form.is_pinned},on:{change:function(e){var n=t.form.is_pinned,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_pinned",n.concat([null])):o>-1&&t.$set(t.form,"is_pinned",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_pinned",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_pinned",dusk:"story-form-pinned"}},[t._v(t._s(t.__("Is pinned?")))])])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Tags")))]),t._v(" "),n("tags",{model:{value:t.form.tags,callback:function(e){t.$set(t.form,"tags",e)},expression:"form.tags"}})],1)]),t._v(" "),n("div",{staticClass:"card-footer"},[n("div",{staticClass:"btn-group"},[n("button",{staticClass:"btn btn-primary",class:{"btn-danger":t.hasChanged},attrs:{type:"button",disabled:t.loading,dusk:"story-form-save"},on:{click:function(e){return e.preventDefault(),t.submit("edit")}}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Save"))+"\n ")]),t._v(" "),n("button",{staticClass:"btn btn-primary dropdown-toggle dropdown-toggle-split",class:{"btn-danger":t.hasChanged},attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}}),t._v(" "),n("div",{staticClass:"dropdown-menu"},[n("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.submit("view")}}},[t._v(t._s(t.__("Save & View")))]),t._v(" "),n("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.submit("new")}}},[t._v(t._s(t.__("Save & New")))])])]),t._v(" "),t.story?n("a",{staticClass:"btn btn-outline-primary",attrs:{href:t.story.url}},[t._v(t._s(t.__("View")))]):t._e()])])}),[],!1,null,null,null);e.default=c.exports},"8/rJ":function(t,e,n){"use strict";n.r(e);var r={mixins:[n("1IHE").a],props:{type:{type:String,required:!0},text:{type:String,required:!0}},data:function(){return{loading:!1,status:null}},methods:{check:function(){var t=this;this.loading=!0,axios.get("/api/manage/features/".concat(this.type)).then((function(e){t.status=e.data.status,t.clear()})).catch((function(e){t.status="fail",t.setHttpError(e),t.toastHttpError(t.__("Whoops!")),t.clear()}))},clear:function(){var t=this;this.loading=!1,setTimeout((function(){t.status=null}),5e3)}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{class:{"btn-outline-danger":"fail"===t.status,"btn-outline-success":"success"===t.status},attrs:{type:"button",disabled:t.loading},on:{click:t.check}},[t.loading||null!==t.status?"success"===t.status?n("span",[t._v(t._s(t.__("Success")))]):"fail"===t.status?n("span",[t._v(t._s(t.__("Fail")))]):n("span",[n("div",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status"}})]):n("span",[t._v(t._s(t.text))])])}),[],!1,null,null,null);e.default=o.exports},"8oxB":function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var t=s(f);u=!0;for(var e=c.length;e;){for(l=c,c=[];++d1)for(var n=1;n0&&document.getSelection().getRangeAt(0);r.select(),r.setSelectionRange(0,999999),document.execCommand("copy"),document.body.removeChild(r),a&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(a)),r.contentEditable=i,r.readOnly=o}}}},BEtg:function(t,e){t.exports=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}},FOBs:function(t,e,n){"use strict";n.r(e);var r={data:function(){return{users:[],loading:!1,creating:!1,editing:!1}},mounted:function(){this.fetch()},methods:{fetch:function(){var t=this;this.loading=!0,axios.get("/api/manage/users").then((function(e){t.loading=!1,t.users=e.data.data})).catch((function(e){t.loading=!1,t.$toasted.error(t.__("Unable to load users"))}))},remove:function(t){var e=this;this.loading=!0,axios.delete("/api/manage/users/".concat(t.id)).then((function(t){e.$toasted.success(e.__("Deleted")),e.fetch()})).catch((function(t){"error"===t.response.data.status?e.$toasted.error(t.response.data.message):e.$toasted.error(e.__("Can't delete")),e.loading=!1}))},add:function(){this.creating=!0,this.editing=!1},edit:function(t){this.creating=!1,this.editing=t},formSubmited:function(){this.creating=!1,this.editing=!1,this.fetch()}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card"},[n("div",{staticClass:"card-header d-flex justify-content-between align-items-center"},[n("span",[n("i",{staticClass:"fas fa-users mr-1"}),t._v(" "+t._s(t.__("Users")))]),t._v(" "),n("button",{staticClass:"btn btn-primary btn-sm text-white",on:{click:function(e){return t.add()}}},[t._v(t._s(t.__("Add user")))])]),t._v(" "),n("div",{staticClass:"card-body"},[n("loader",{attrs:{loading:t.loading}}),t._v(" "),t.loading?t._e():n("div",{staticClass:"table-responsive"},[n("table",{staticClass:"table table-borderless table-sm"},[n("thead",[n("tr",[n("th",[t._v(t._s(t.__("Name")))]),t._v(" "),n("th",[t._v(t._s(t.__("E-Mail Address")))]),t._v(" "),n("th",[t._v(t._s(t.__("Is admin?")))]),t._v(" "),n("th",[t._v("#")])])]),t._v(" "),n("tbody",t._l(t.users,(function(e){return n("tr",[n("td",[t._v(t._s(e.name))]),t._v(" "),n("td",[t._v(t._s(e.email))]),t._v(" "),n("td",[t._v(t._s(e.is_admin?t.__("Yes"):t.__("No")))]),t._v(" "),n("td",[n("button",{staticClass:"btn btn-info btn-sm text-white",on:{click:function(n){return t.edit(e)}}},[t._v(t._s(t.__("Edit")))]),t._v(" "),n("confirm",{staticClass:"btn btn-danger btn-sm text-white",attrs:{text:t.__("Delete"),"text-confirm":t.__("Confirm")},on:{confirmed:function(n){return t.remove(e)}}})],1)])})),0)])])],1),t._v(" "),t.creating||t.editing?n("div",{staticClass:"card-footer"},[n("user-form",{attrs:{user:t.editing},on:{submited:function(e){return t.formSubmited()}}})],1):t._e()])}),[],!1,null,null,null);e.default=o.exports},FT2k:function(t,e,n){"use strict";n.r(e);var r=n("1IHE"),i=n("9B9B"),o={mixins:[n.n(i).a,r.a],data:function(){return{loading:!1,open:!1,post:null,shares:[],form:{expiration:"hour"},expirations:[{key:"hour",name:"1 hour"},{key:"hours",name:"12 hours"},{key:"day",name:"1 day"},{key:"days",name:"3 days"},{key:"week",name:"1 week"},{key:"weeks",name:"2 weeks"},{key:"month",name:"1 month"}]}},mounted:function(){var t=this;this.$bus.$on("share",(function(e){t.post=e,t.open=!0,t.get()}))},methods:{get:function(){var t=this;axios.get(this.post.url_share).then((function(e){t.shares=e.data.shares})).catch((function(e){t.setHttpError(e),t.toastHttpError(t.__("Can't fetch shares"))}))},generate:function(){var t=this;this.loading=!0,axios.post(this.post.url_share,{expiration:this.form.expiration}).then((function(e){t.loading=!1,t.shares.unshift(e.data.share),t.$toasted.success(t.__("Link generated"))})).catch((function(e){t.loading=!1,t.setHttpError(e),t.toastHttpError(t.__("Unable to create link for this content"))}))}},watch:{open:function(t){!1===t&&(this.post=null,this.shares=[])}}},a=n("KHd+"),s=Object(a.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("modal",{attrs:{open:t.open,size:"lg"},on:{closed:function(e){t.open=!1}},scopedSlots:t._u([{key:"header",fn:function(){return[t._v(t._s(t.__("Temp sharing of :title",{title:t.post.title})))]},proxy:!0},{key:"content",fn:function(){return[n("h4",[t._v(t._s(t.__("Create link")))]),t._v(" "),n("p",[t._v(t._s(t.__("Content will be accessible even private until expiration.")))]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"expiration"}},[t._v(t._s(t.__("Link expires in")))]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.form.expiration,expression:"form.expiration"}],staticClass:"form-control custom-select",attrs:{name:"expiration",id:"expiration"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"expiration",e.target.multiple?n:n[0])}}},t._l(t.expirations,(function(e){return n("option",{domProps:{value:e.key}},[t._v(t._s(t.__(e.name)))])})),0)]),t._v(" "),n("div",{staticClass:"form-group"},[n("button",{staticClass:"btn btn-outline-primary",attrs:{type:"button",disabled:t.loading},on:{click:t.generate}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Generate"))+"\n ")])]),t._v(" "),n("h4",[t._v(t._s(t.__("Active links")))]),t._v(" "),t.shares.length>0?n("table",{staticClass:"table table-borderless table-sm"},[n("thead",[n("tr",[n("th",{staticClass:"w-75"},[t._v(t._s(t.__("URL")))]),t._v(" "),n("th",{staticClass:"w-25"},[t._v(t._s(t.__("Expiration")))])])]),t._v(" "),n("tbody",t._l(t.shares,(function(e){return n("tr",[n("td",[n("div",{staticClass:"input-group input-group-sm"},[n("input",{staticClass:"form-control",attrs:{type:"text"},domProps:{value:e.url}}),t._v(" "),n("div",{staticClass:"input-group-append"},[n("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:function(n){return t.copyToClipboard(n,e.url)}}},[t._v(t._s(t.__("Copy")))])])])]),t._v(" "),n("td",[t._v(t._s(e.expires_at))])])})),0)]):n("div",{staticClass:"alert alert-info"},[t._v(t._s(t.__("This content is not actually shared")))])]},proxy:!0}])})}),[],!1,null,null,null);e.default=s.exports},G1fO:function(t,e,n){"use strict";n.r(e);var r={props:{comment:{type:Object,required:!0}},computed:{unvisibleComment:function(){return this.isLogged()&&!1===this.comment.is_visible}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"comment"},[n("div",{staticClass:"d-flex justify-content-between"},[n("span",[t.unvisibleComment?n("i",{staticClass:"fas fa-exclamation-triangle mr-1"}):t._e(),t._v(" "),n("strong",[t._v(t._s(t.comment.name))]),t._v(" "),n("small",[t._v(t._s(t.comment.date_formated))])]),t._v(" "),n("span",[t.unvisibleComment?n("confirm",{staticClass:"text-info mr-1",attrs:{tag:"a",text:"","text-confirm":""},on:{confirmed:function(e){return t.$bus.$emit("moderate",t.comment)}}}):t._e(),t._v(" "),t.isLogged()?n("confirm",{staticClass:"text-info mr-1",attrs:{tag:"a",text:"","text-confirm":""},on:{confirmed:function(e){return t.$bus.$emit("delete",t.comment)}}}):t._e(),t._v(" "),n("a",{staticClass:"text-info",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.$bus.$emit("reply",t.comment)}}},[n("i",{staticClass:"fas fa-reply"})])],1)]),t._v(" "),n("p",{staticClass:"mb-0"},[t._v(t._s(t.comment.content))])]),t._v(" "),t._l(t.comment.comments,(function(e){return t.comment.comments.length>0?n("comment",{key:e.id,staticClass:"replies",attrs:{comment:e}}):t._e()}))],2)}),[],!1,null,null,null);e.default=o.exports},GYWy:function(t,e,n){(function(t,r){var i;!function(o){e&&e.nodeType,t&&t.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,l=2147483647,c=36,u=1,d=26,f=38,p=700,m=72,h=128,_="-",v=/^xn--/,g=/[^\x20-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=c-u,C=Math.floor,T=String.fromCharCode;function w(t){throw new RangeError(b[t])}function I(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function S(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+I((t=t.replace(E,".")).split("."),e).join(".")}function O(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=T((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=T(t)})).join("")}function R(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function A(t,e,n){var r=0;for(t=n?C(t/p):t>>1,t+=C(t/e);t>y*d>>1;r+=c)t=C(t/y);return C(r+(y+1)*t/(t+f))}function N(t){var e,n,r,i,o,a,s,f,p,v,g,E=[],b=t.length,y=0,T=h,I=m;for((n=t.lastIndexOf(_))<0&&(n=0),r=0;r=128&&w("not-basic"),E.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=b&&w("invalid-input"),((f=(g=t.charCodeAt(i++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:c)>=c||f>C((l-y)/a))&&w("overflow"),y+=f*a,!(f<(p=s<=I?u:s>=I+d?d:s-I));s+=c)a>C(l/(v=c-p))&&w("overflow"),a*=v;I=A(y-o,e=E.length+1,0==o),C(y/e)>l-T&&w("overflow"),T+=C(y/e),y%=e,E.splice(y++,0,T)}return D(E)}function k(t){var e,n,r,i,o,a,s,f,p,v,g,E,b,y,I,S=[];for(E=(t=O(t)).length,e=h,n=0,o=m,a=0;a=e&&gC((l-n)/(b=r+1))&&w("overflow"),n+=(s-e)*b,e=s,a=0;al&&w("overflow"),g==e){for(f=n,p=c;!(f<(v=p<=o?u:p>=o+d?d:p-o));p+=c)I=f-v,y=c-v,S.push(T(R(v+I%y,0))),f=C(I/y);S.push(T(R(f,0))),o=A(n,b,r==i),n=0,++r}++n,++e}return S.join("")}s={version:"1.4.1",ucs2:{decode:O,encode:D},decode:N,encode:k,toASCII:function(t){return S(t,(function(t){return g.test(t)?"xn--"+k(t):t}))},toUnicode:function(t){return S(t,(function(t){return v.test(t)?N(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return s}.call(e,n,e,t))||(t.exports=i)}()}).call(this,n("YuTi")(t),n("yLpj"))},HHJa:function(t,e){t.exports={methods:{isLogged:function(){return null!==this.user()},user:function(){return window.user||null}}}},"JX/T":function(t,e,n){"use strict";n.r(e);var r={props:{url:{type:String,required:!0}},data:function(){return{query:null,results:{},loading:!1,selected:null,history:[],focused:!1}},mounted:function(){var t=this;this.fetchHistory(),document.addEventListener("keydown",(function(e){-1!==["/"].indexOf(e.key)&&function(t){return"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName}(e)&&(e.preventDefault(),e.stopPropagation(),t.$refs.input.focus())}))},methods:{search:function(){var t=this;this.loading=!0,axios.post(this.url,{query:this.query}).then((function(e){t.loading=!1,200===e.status&&(t.results=e.data,t.selected=null,t.addHistory(t.query))})).catch((function(e){t.loading=!1,console.log(e)}))},hide:function(){this.query=null,this.results={},this.selected=null},choose:function(){this.selected&&this.displaySearchHistory&&(this.query=this.selected),this.selected&&this.hasResults&&(window.location=this.selected.url)},move:function(t){this.displaySearchHistory?this.moveIn(this.history,t):this.hasResults?this.moveIn(this.results.posts,t):this.selected=null},moveIn:function(t,e){var n=this.selected?t.indexOf(this.selected):null,r=t.length-1;"down"===e&&(this.selected=null===n||n===r?t[0]:t[n+1]),"up"===e&&(this.selected=null===n||0===n?t[r]:t[n-1])},fetchHistory:function(){var t=localStorage.getItem("searchHistory")||null;if(t)try{this.history=JSON.parse(t)}catch(t){console.log("Unable to parse search history from local storage")}},addHistory:function(t){!1!==this.hasResults&&-1===this.history.indexOf(t)&&(this.history.unshift(t),this.history=this.history.slice(0,5),localStorage.setItem("searchHistory",JSON.stringify(this.history)))}},computed:{hasResults:function(){return this.hasTagsResults||this.hasPostsResults},hasTagsResults:function(){return this.results.hasOwnProperty("tags")&&this.results.tags.length>0},hasPostsResults:function(){return this.results.hasOwnProperty("posts")&&this.results.posts.length>0},displaySearchHistory:function(){return this.history.length>0&&null===this.query&&this.focused},displayNoResultIndicator:function(){return null!==this.query&&this.query.length>=3&&!1===this.loading&&!1===this.hasResults}},watch:{query:_.debounce((function(t){t&&t.length>=3&&this.search(t),0===t.length&&this.hide()}),200)}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{staticClass:"form-inline"},[n("div",{staticClass:"search-input-wrapper"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.query,expression:"query"}],ref:"input",staticClass:"form-control",attrs:{type:"search",placeholder:t.__("Type / to search")},domProps:{value:t.query},on:{focus:function(e){t.focused=!0},blur:function(e){t.focused=!1},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.stopPropagation(),t.move("down"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.stopPropagation(),t.move("up"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),e.stopPropagation(),t.choose(e))}],input:function(e){e.target.composing||(t.query=e.target.value)}}}),t._v(" "),t.loading?n("div",{staticClass:"spinner-border spinner-border-sm text-info",attrs:{role:"status"}}):t._e(),t._v(" "),t.displayNoResultIndicator?n("span",{staticClass:"badge badge-info text-white",attrs:{role:"status"}},[t._v("\n "+t._s(t.__("No result"))+"\n ")]):t._e()]),t._v(" "),n("div",{directives:[{name:"on-clickaway",rawName:"v-on-clickaway",value:t.hide,expression:"hide"}],staticClass:"list-group results mt-1",class:{active:t.hasResults||t.displaySearchHistory}},[t._l(t.history,(function(e){return t.displaySearchHistory?n("a",{staticClass:"list-group-item list-group-item-action",class:{active:t.selected===e}},[n("span",[n("i",{staticClass:"fas fa-history fa-fw mr-1"}),t._v(" "+t._s(e))])]):t._e()})),t._v(" "),t.hasTagsResults?n("div",{staticClass:"list-group-item"},[n("div",[n("i",{staticClass:"fas fa-tags"}),t._v(" "+t._s(t.__("Tags")))]),t._v(" "),n("div",t._l(t.results.tags,(function(e){return n("a",{staticClass:"btn btn-primary btn-sm mr-1",attrs:{href:e.url}},[t._v("\n "+t._s(e.name)+"\n ")])})),0)]):t._e(),t._v(" "),t._l(t.results.posts,(function(e,r){return t.hasPostsResults?n("a",{staticClass:"list-group-item list-group-item-action",class:{active:t.selected===e},attrs:{href:e.url}},[n("div",[n("span",[t._v(t._s(e.type)+" —")]),t._v(" "),n("strong",[t._v(t._s(e.title))])]),t._v(" "),e.tags.length>0?n("div",t._l(e.tags,(function(e){return n("span",{staticClass:"badge badge-secondary mr-1"},[t._v(t._s(e))])})),0):t._e()]):t._e()}))],2)])}),[],!1,null,null,null);e.default=o.exports},K3gU:function(t,e,n){"use strict";n.r(e);var r={mixins:[n("1IHE").a],data:function(){return{archives:[],loading:!0}},mounted:function(){this.fetch()},methods:{fetch:function(){var t=this;this.loading=!0,axios.get("/api/manage/archives").then((function(e){t.archives=e.data,t.loading=!1})).catch((function(e){t.setHttpError(e),t.toastHttpError(t.__("Can't fetch archives"))}))},deleteArchive:function(t){var e=this;axios.delete(t.url_archive).then((function(t){e.$toasted.success(t.data.message),e.fetch()})).catch((function(t){e.setHttpError(t),e.toastHttpError(e.__("Whoops!"))}))}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card"},[n("div",{staticClass:"card-header"},[n("i",{staticClass:"fas fa-archive mr-1"}),t._v("\n "+t._s(t.__("Archives"))+"\n ")]),t._v(" "),t.loading?n("div",{staticClass:"card-body"},[n("loader",{attrs:{loading:t.loading}})],1):n("div",{staticClass:"card-body"},[0===t.archives.length?n("div",{staticClass:"alert alert-info"},[t._v("\n "+t._s(t.__("No archive"))+"\n ")]):n("div",{staticClass:"table-responsive"},[n("table",{staticClass:"table table-borderless table-sm"},[n("thead",[n("tr",[n("th",[t._v(t._s(t.__("Link")))]),t._v(" "),n("th",[t._v(t._s(t.__("Actions")))])])]),t._v(" "),n("tbody",t._l(t.archives,(function(e){return n("tr",[n("td",{staticClass:"align-middle"},[-1!==["pdf"].indexOf(e.extension)?n("span",[n("i",{staticClass:"fas fa-file-pdf mr-1"})]):-1!==["mp4","webm","mpeg","avi","mkv"].indexOf(e.extension)?n("span",[n("i",{staticClass:"fas fa-file-video mr-1"})]):-1!==["mp3","wav","flac"].indexOf(e.extension)?n("span",[n("i",{staticClass:"fas fa-file-audio mr-1"})]):n("span",[n("i",{staticClass:"fas fa-file mr-1"})]),t._v(" "),n("a",{attrs:{href:e.permalink}},[t._v("\n "+t._s(e.title.substr(0,40))+"\n "),e.title.lenght>=40?n("span",[t._v("...")]):t._e()]),t._v(" "),n("small",{staticClass:"text-muted"},[t._v(t._s(e.size))])]),t._v(" "),n("td",[n("div",{staticClass:"dropdown"},[n("button",{staticClass:"btn btn-outline-secondary btn-sm dropdown-toggle",attrs:{type:"button",id:"dropdownMenuButton","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[t._v("\n "+t._s(t.__("More"))+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[n("a",{staticClass:"dropdown-item",attrs:{href:e.url_download}},[n("i",{staticClass:"fas fa-file-download fa-fw mr-1"}),t._v(" "+t._s(t.__("Download"))+"\n ")]),t._v(" "),n("confirm",{staticClass:"dropdown-item",attrs:{text:" "+t.__("Delete"),"text-confirm":" "+t.__("Confirm")},on:{confirmed:function(n){return t.deleteArchive(e)}}})],1)])])])})),0)])])])])}),[],!1,null,null,null);e.default=o.exports},"KHd+":function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):i&&(l=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return r}))},KL6o:function(t,e,n){"use strict";n.r(e);var r={props:{enabled:{type:Boolean,required:!0},stats:{type:Object,required:!1,default:function(){}}},data:function(){return{types:[{type:"dead",name:this.__("Dead (4xx)"),loading:!1},{type:"error",name:this.__("Error (5xx)"),loading:!1},{type:"redirect",name:this.__("Redirect (3xx)"),loading:!1}],links:{dead:[],error:[],redirect:[]}}},mounted:function(){var t=this;this.types.forEach((function(e){t.fetch(e)}))},methods:{fetch:function(t){var e=this;0!==(this.stats[t.type]||0)&&(t.loading=!0,axios.get("/api/manage/links-health/".concat(t.type)).then((function(n){e.links[t.type]=n.data.data,t.loading=!1})).catch((function(e){t.loading=!1})))}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.enabled?n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-md-6 col-lg-4"},[n("div",{staticClass:"card mb-4"},[n("div",{staticClass:"card-body"},[n("small",{staticClass:"card-title font-weight-bold text-muted"},[t._v(t._s(t.__("Links watched")))]),t._v(" "),n("h3",{staticClass:"text-right text-capitalize"},[t._v(t._s(t.stats.total))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6 col-lg-4"},[n("div",{staticClass:"card mb-4"},[n("div",{staticClass:"card-body"},[n("small",{staticClass:"card-title font-weight-bold text-muted"},[t._v(t._s(t.__("Links not watched")))]),t._v(" "),n("h3",{staticClass:"text-right text-capitalize"},[t._v(t._s(t.stats.disabled))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6 col-lg-4"},[n("div",{staticClass:"card mb-4"},[n("div",{staticClass:"card-body"},[n("small",{staticClass:"card-title font-weight-bold text-muted"},[t._v(t._s(t.__("Live (2xx)")))]),t._v(" "),n("h3",{staticClass:"text-right text-capitalize",class:{"text-success":t.stats.live>0}},[t._v("\n "+t._s(t.stats.live)+"\n ")])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6 col-lg-4"},[n("div",{staticClass:"card mb-4"},[n("div",{staticClass:"card-body"},[n("small",{staticClass:"card-title font-weight-bold text-muted"},[t._v(t._s(t.__("Redirect (3xx)")))]),t._v(" "),n("h3",{staticClass:"text-right text-capitalize"},[t._v(t._s(t.stats.redirect))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6 col-lg-4"},[n("div",{staticClass:"card mb-4"},[n("div",{staticClass:"card-body"},[n("small",{staticClass:"card-title font-weight-bold text-muted"},[t._v(t._s(t.__("Dead (4xx)")))]),t._v(" "),n("h3",{staticClass:"text-right text-capitalize",class:{"text-danger":t.stats.dead>0}},[t._v("\n "+t._s(t.stats.dead)+"\n ")])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6 col-lg-4"},[n("div",{staticClass:"card mb-4"},[n("div",{staticClass:"card-body"},[n("small",{staticClass:"card-title font-weight-bold text-muted"},[t._v(t._s(t.__("Error (5xx)")))]),t._v(" "),n("h3",{staticClass:"text-right text-capitalize",class:{"text-danger":t.stats.error>0}},[t._v("\n "+t._s(t.stats.error)+"\n ")])])])])]):t._e(),t._v(" "),n("div",{staticClass:"card"},[n("div",{staticClass:"card-header"},[n("i",{staticClass:"fas fa-heartbeat mr-1"}),t._v("\n "+t._s(t.__("Links health"))+"\n ")]),t._v(" "),n("div",{staticClass:"card-body"},[t.enabled?n("div",t._l(t.types,(function(e){return n("div",[n("div",{staticClass:"card-title"},[t._v(t._s(e.name))]),t._v(" "),e.loading?n("div",{staticClass:"alert alert-info"},[t._v("\n "+t._s(t.__("Loading"))+"\n ")]):t._e(),t._v(" "),0===t.stats[e.type]?n("div",{staticClass:"alert alert-success"},[t._v("\n "+t._s(t.__("No problem found"))+"\n ")]):n("div",{staticClass:"table-responsive"},[n("table",{staticClass:"table table-borderless table-sm"},[n("thead",[n("tr",[n("th",[t._v(t._s(t.__("Link")))]),t._v(" "),n("th",[t._v(t._s(t.__("Status")))]),t._v(" "),n("th",[t._v(t._s(t.__("Last checked")))])])]),t._v(" "),n("tbody",t._l(t.links[e.type],(function(e){return n("tr",[n("td",{staticClass:"align-middle"},[n("a",{attrs:{href:e.permalink}},[t._v("\n "+t._s(e.title.substr(0,40))+"\n "),e.title.lenght>=40?n("span",[t._v("...")]):t._e()])]),t._v(" "),n("td",[t._v("\n "+t._s(e.http_status)+"\n ")]),t._v(" "),n("td",[t._v("\n "+t._s(e.http_checked_at_formated)+"\n ")])])})),0)])])])})),0):n("div",{staticClass:"alert alert-info mb-0"},[t._v("\n "+t._s(t.__("Health checks for links are disabled"))+"\n ")])])])])}),[],!1,null,null,null);e.default=o.exports},LP8H:function(t,e,n){"use strict";n.r(e);var r=n("1IHE"),i={mixins:[n("0fPN").a,r.a],data:function(){return{walls:[],loading:!0,open:!1,form:null}},mounted:function(){this.fetch()},methods:{fetch:function(){var t=this;this.loading=!0,axios.get("/api/manage/walls").then((function(e){t.walls=e.data,t.loading=!1})).catch((function(e){t.loading=!1,t.setHttpError(e),t.toastHttpError(t.__("Can't fetch walls"))}))},create:function(){this.form={title:"",slug:"",restrict_tags:[],restrict_cards:[],appearance:{columns:2,show_tags:!1,compact:!1},is_default:!1,is_private:!1},this.open=!0},edit:function(t){this.form=t,this.open=!0},submit:function(){var t=this,e=this.form.id?{title:this.form.title,slug:this.form.slug,appearance:this.form.appearance,is_default:this.form.is_default,is_private:this.form.is_private,restrict_tags:this.form.restrict_tags,restrict_cards:this.form.restrict_cards}:this.form;axios.request({method:this.form.id?"PUT":"POST",url:this.form.id?"/api/manage/walls/".concat(this.form.id):"/api/manage/walls",data:e}).then((function(e){t.open=!1,t.$toasted.success(t.__("Saved")),t.resetFormError(),window.location.reload()})).catch((function(e){t.setFormError(e),t.setHttpError(e),t.toastHttpError(t.__("Can't save"))}))},remove:function(t){var e=this;this.loading=!0,axios.delete("/api/manage/walls/".concat(t.id)).then((function(t){e.$toasted.success(e.__("Deleted")),window.location.reload()})).catch((function(t){e.loading=!1,e.setHttpError(t),e.toastHttpError(e.__("Can't delete"))}))},listRestrictions:function(t){return t&&t.length>0?t.join(", "):"-"}},watch:{"form.title":{handler:function(t){var e=t.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"");e!==this.form.slug&&(this.form.slug=e)},deep:!0}}},o=n("KHd+"),a=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card"},[n("div",{staticClass:"card-header d-flex justify-content-between align-items-center"},[n("span",[n("i",{staticClass:"fas fa-bookmark mr-1"}),t._v(" "+t._s(t.__("Walls"))+"\n ")]),t._v(" "),n("button",{staticClass:"btn btn-primary btn-sm text-white",on:{click:function(e){return e.preventDefault(),t.create(e)}}},[t._v(t._s(t.__("Add")))])]),t._v(" "),t.loading?n("div",{staticClass:"card-body"},[n("loader",{attrs:{loading:t.loading}})],1):n("div",{staticClass:"card-body"},[0===t.walls.length?n("div",{staticClass:"alert alert-info"},[t._v("\n "+t._s(t.__("No wall"))+"\n ")]):n("div",{staticClass:"table-responsive"},[n("table",{staticClass:"table table-borderless table-sm"},[n("thead",[n("tr",[t._m(0),t._v(" "),t._m(1),t._v(" "),n("th",[t._v(t._s(t.__("Name")))]),t._v(" "),n("th",[t._v(t._s(t.__("Tags")))]),t._v(" "),n("th",[t._v(t._s(t.__("Cards")))]),t._v(" "),n("th",[t._v(t._s(t.__("Actions")))])])]),t._v(" "),n("tbody",t._l(t.walls,(function(e){return n("tr",[e.is_default?n("td",[n("i",{staticClass:"fa fa-star"})]):n("td",[t._v("-")]),t._v(" "),e.is_private?n("td",[n("i",{staticClass:"fa fa-lock"})]):n("td",[t._v("-")]),t._v(" "),n("td",[t._v("\n "+t._s(e.title)+"\n ")]),t._v(" "),n("td",[t._v(t._s(t.listRestrictions(e.restrict_tags)))]),t._v(" "),n("td",[t._v(t._s(t.listRestrictions(e.restrict_cards)))]),t._v(" "),n("td",[n("div",{staticClass:"dropdown"},[n("button",{staticClass:"btn btn-outline-secondary btn-sm dropdown-toggle",attrs:{type:"button",id:"dropdownMenuButton","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[t._v("\n "+t._s(t.__("More"))+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[n("a",{staticClass:"dropdown-item",attrs:{href:"#"},on:{click:function(n){return n.preventDefault(),t.edit(e)}}},[n("i",{staticClass:"fas fa-pen-alt fa-fw mr-1"}),t._v(" "+t._s(t.__("Edit"))+"\n ")]),t._v(" "),n("confirm",{staticClass:"dropdown-item",attrs:{text:" "+t.__("Delete"),"text-confirm":" "+t.__("Confirm")},on:{confirmed:function(n){return t.remove(e)}}})],1)])])])})),0)])]),t._v(" "),n("modal",{attrs:{open:t.open},on:{closed:function(e){t.open=!1}},scopedSlots:t._u([{key:"header",fn:function(){return[t._v(t._s(t.form&&t.form.id?t.__("Edit"):t.__("Create")))]},proxy:!0},{key:"content",fn:function(){return[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"title"}},[t._v(t._s(t.__("Title")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.title,expression:"form.title"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("title")},attrs:{type:"text",id:"title",required:""},domProps:{value:t.form.title},on:{input:function(e){e.target.composing||t.$set(t.form,"title",e.target.value)}}}),t._v(" "),t.hasFormError("title")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("title")))]):t._e()]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"slug"}},[t._v(t._s(t.__("Slug")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.slug,expression:"form.slug"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("slug")},attrs:{type:"text",id:"slug",required:""},domProps:{value:t.form.slug},on:{input:function(e){e.target.composing||t.$set(t.form,"slug",e.target.value)}}}),t._v(" "),t.hasFormError("slug")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("slug")))]):t._e()]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Restrict tags")))]),t._v(" "),n("tags",{model:{value:t.form.restrict_tags,callback:function(e){t.$set(t.form,"restrict_tags",e)},expression:"form.restrict_tags"}})],1),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Restrict cards")))]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.form.restrict_cards,expression:"form.restrict_cards"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("restrict_cards")},attrs:{id:"restrict_cards",multiple:""},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"restrict_cards",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:"link"}},[t._v(t._s(t.__("Link")))]),t._v(" "),n("option",{attrs:{value:"story"}},[t._v(t._s(t.__("Story")))]),t._v(" "),n("option",{attrs:{value:"album"}},[t._v(t._s(t.__("Album")))]),t._v(" "),n("option",{attrs:{value:"chest"}},[t._v(t._s(t.__("Chest")))])]),t._v(" "),t.hasFormError("restrict_cards")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("restrict_cards")))]):t._e()]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Columns to show")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.appearance.columns,expression:"form.appearance.columns"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("columns")},attrs:{type:"number",id:"columns_count",step:"1",min:"1",max:"4"},domProps:{value:t.form.appearance.columns},on:{input:function(e){e.target.composing||t.$set(t.form.appearance,"columns",e.target.value)}}}),t._v(" "),t.hasFormError("columns")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("columns")))]):t._e()]),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.appearance.show_tags,expression:"form.appearance.show_tags"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"show_tags"},domProps:{checked:Array.isArray(t.form.appearance.show_tags)?t._i(t.form.appearance.show_tags,null)>-1:t.form.appearance.show_tags},on:{change:function(e){var n=t.form.appearance.show_tags,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form.appearance,"show_tags",n.concat([null])):o>-1&&t.$set(t.form.appearance,"show_tags",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form.appearance,"show_tags",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"show_tags"}},[t._v(t._s(t.__("Show tags")))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.appearance.compact,expression:"form.appearance.compact"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"compact"},domProps:{checked:Array.isArray(t.form.appearance.compact)?t._i(t.form.appearance.compact,null)>-1:t.form.appearance.compact},on:{change:function(e){var n=t.form.appearance.compact,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form.appearance,"compact",n.concat([null])):o>-1&&t.$set(t.form.appearance,"compact",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form.appearance,"compact",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"compact"}},[t._v(t._s(t.__("Compact cards list")))])])])])]),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_private,expression:"form.is_private"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_private",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_private)?t._i(t.form.is_private,null)>-1:t.form.is_private},on:{change:function(e){var n=t.form.is_private,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_private",n.concat([null])):o>-1&&t.$set(t.form,"is_private",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_private",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_private",dusk:"wall-form-private"}},[t._v(t._s(t.__("Is private?")))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_default,expression:"form.is_default"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_default",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_default)?t._i(t.form.is_default,null)>-1:t.form.is_default},on:{change:function(e){var n=t.form.is_default,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_default",n.concat([null])):o>-1&&t.$set(t.form,"is_default",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_default",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_default",dusk:"wall-form-private"}},[t._v(t._s(t.__("Is default?")))])])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("button",{staticClass:"btn btn-outline-primary",attrs:{type:"button",disabled:t.loading},on:{click:function(e){return e.preventDefault(),t.submit(e)}}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Save"))+"\n ")])])]},proxy:!0}],null,!1,3711445900)})],1)])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("th",[e("i",{staticClass:"fas fa-star"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("th",[e("i",{staticClass:"fas fa-lock"})])}],!1,null,null,null);e.default=a.exports},MX7w:function(t,e,n){"use strict";n.r(e);var r=n("9B9B"),i={mixins:[n.n(r).a],props:{single:{type:Boolean,required:!1,default:!1},chest:{type:Object,required:!0,default:function(){}}},data:function(){return{edit:!1}},methods:{remove:function(){var t=this;axios.delete(this.chest.url_delete).then((function(e){t.$toasted.success(t.__("Deleted")),t.single?window.location="/":window.location.reload()})).catch((function(e){t.$toasted.error(t.__("Can't delete"))}))},copyAll:function(t){var e="";this.chest.content.forEach((function(t){t.name&&(e+="".concat(t.name,": ")),e+="code"===t.type?"\n".concat(t.value,"\n"):"".concat(t.value,"\n")})),this.copyToClipboard(t,e)}}},o=n("KHd+"),a=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--chest mb-4",class:{"card-single":t.single,"card-index":!t.single}},[n("div",{staticClass:"card-body"},[n("h5",{staticClass:"card-title"},[t.chest.is_pinned&&!t.single?n("i",{staticClass:"fas fa-thumbtack fa-sm pr-1"}):t._e(),t._v(" "),n("span",[t._v(t._s(t.__("Chest")))]),t._v(" — "),n("a",{attrs:{href:t.chest.permalink}},[t._v(t._s(t.chest.title))])]),t._v(" "),n("div",{staticClass:"card-content"},[n("chest-lines",{attrs:{preview:t.chest.content}})],1),t._v(" "),t.chest.tags.length>0?n("p",{staticClass:"card-text mt-1"},t._l(t.chest.tags,(function(e){return n("a",{staticClass:"badge badge-secondary mr-1",attrs:{href:"/tag/"+e}},[t._v(t._s(e))])})),0):t._e()]),t._v(" "),n("div",{staticClass:"card-footer d-flex justify-content-between"},[n("span",[t.chest.is_private?n("i",{staticClass:"fas fa-lock pr-2"}):t._e(),t._v(t._s(t.chest.date_formated))]),t._v(" "),n("div",{staticClass:"dropdown"},[n("button",{staticClass:"btn btn-outline-dark btn-sm dropdown-toggle",attrs:{type:"button",id:"dropdownMenuButton","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",dusk:"chest-card-more"}},[t._v("\n "+t._s(t.__("More"))+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[n("a",{staticClass:"dropdown-item",attrs:{href:t.chest.permalink,dusk:"chest-card-permalink"}},[n("i",{staticClass:"fas fa-link fa-fw mr-1"}),t._v(" "+t._s(t.__("Permalink"))+"\n ")]),t._v(" "),n("button",{staticClass:"dropdown-item",attrs:{type:"button",dusk:"chest-card-copy"},on:{click:t.copyAll}},[n("i",{staticClass:"fas fa-copy fa-fw mr-1"}),t._v(" "+t._s(t.__("Copy all"))+"\n ")]),t._v(" "),t.chest.editable?n("h6",{staticClass:"dropdown-header"},[t._v(t._s(t.__("Manage")))]):t._e(),t._v(" "),t.chest.editable?n("a",{staticClass:"dropdown-item",attrs:{dusk:"chest-card-temp-share"},on:{click:function(e){return t.$bus.$emit("share",t.chest)}}},[n("i",{staticClass:"fas fa-share-square fa-fw mr-1"}),t._v(" "+t._s(t.__("Temp sharing"))+"\n ")]):t._e(),t._v(" "),t.chest.editable?n("a",{staticClass:"dropdown-item",attrs:{href:t.chest.url_edit,dusk:"chest-card-edit"}},[n("i",{staticClass:"fas fa-pen-alt fa-fw mr-1"}),t._v(" "+t._s(t.__("Edit"))+"\n ")]):t._e(),t._v(" "),t.chest.editable?n("confirm",{staticClass:"dropdown-item",attrs:{text:" "+t.__("Delete"),"text-confirm":" "+t.__("Confirm"),dusk:"chest-card-remove"},on:{confirmed:t.remove}}):t._e()],1)])])])}),[],!1,null,null,null);e.default=a.exports},NyNk:function(t,e,n){"use strict";n.r(e);var r={mixins:[n("1IHE").a],data:function(){return{tags:[],loading:!0,editing:null,edit:null}},mounted:function(){this.fetch()},methods:{fetch:function(){var t=this;this.loading=!0,axios.get("/api/manage/tags").then((function(e){t.tags=e.data,t.loading=!1})).catch((function(e){t.setHttpError(e),t.toastHttpError(t.__("Can't fetch tags"))}))},move:function(t,e){var n=this;"none"!==e&&confirm(this.__("All elements tagged :from will be moved to :to. Selected tag will be deleted. Are you sure?",{from:t,to:e}))&&(this.loading=!0,axios.post("/api/manage/tags/".concat(t,"/move/").concat(e)).then((function(r){n.$toasted.success(n.__("Elements tagged :from have been moved to :to.",{from:t,to:e})),n.fetch()})).catch((function(t){n.$toasted.error(n.__("Can't save"))})))},remove:function(t){var e=this;this.loading=!0,axios.delete("/api/manage/tags/".concat(t.name)).then((function(t){e.$toasted.success(e.__("Deleted")),e.fetch()})).catch((function(t){e.$toasted.error(e.__("Can't delete"))}))},rename:function(){var t=this;this.editing.name!==this.edit&&axios.put("/api/manage/tags/".concat(this.editing.name,"/rename/").concat(this.edit)).then((function(e){t.$toasted.success(t.__("Saved")),t.fetch()})).catch((function(e){t.$toasted.error(t.__("Can't save"))})),this.editing=null,this.edit=null}},watch:{editing:function(t){var e=this;null!==t&&this.$nextTick((function(){e.edit=t.name;var n="input#input".concat(t.id);document.querySelector(n).focus()})),this.edit=null}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card"},[n("div",{staticClass:"card-header"},[n("i",{staticClass:"fas fa-tags mr-1"}),t._v("\n "+t._s(t.__("Tags"))+"\n ")]),t._v(" "),t.loading?n("div",{staticClass:"card-body"},[n("loader",{attrs:{loading:t.loading}})],1):n("div",{staticClass:"card-body"},[0===t.tags.length?n("div",{staticClass:"alert alert-info"},[t._v("\n "+t._s(t.__("No tag"))+"\n ")]):n("div",{staticClass:"table-responsive"},[n("table",{staticClass:"table table-borderless table-sm"},[n("thead",[n("tr",[n("th",{staticClass:"w-25"},[t._v(t._s(t.__("Name")))]),t._v(" "),n("th",[t._v(t._s(t.__("Posts")))]),t._v(" "),n("th",{staticClass:"w-50"},[t._v(t._s(t.__("Actions")))])])]),t._v(" "),n("tbody",t._l(t.tags,(function(e){return n("tr",[n("td",{staticClass:"align-middle"},[null!==t.editing&&t.editing.id===e.id?n("div",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.edit,expression:"edit"}],staticClass:"form-control",attrs:{type:"text",id:"input"+e.id},domProps:{value:t.edit},on:{input:function(e){e.target.composing||(t.edit=e.target.value)}}})]):n("div",[n("a",{attrs:{href:"/tag/"+e.name}},[t._v(t._s(e.name))])])]),t._v(" "),n("td",{staticClass:"align-middle"},[t._v(t._s(e.posts_count))]),t._v(" "),n("td",{staticClass:"d-flex justify-content-between"},[null===t.editing||null!==t.editing&&t.editing.id!==e.id?n("button",{staticClass:"btn btn-outline-secondary btn-sm mr-1",attrs:{type:"button",disabled:null!==t.editing&&t.editing.id!==e.id},on:{click:function(n){n.preventDefault(),t.editing=e}}},[n("i",{staticClass:"fas fa-edit"})]):n("button",{staticClass:"btn btn-outline-secondary btn-sm mr-1",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.rename()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.rename())}}},[n("i",{staticClass:"fas fa-check"})]),t._v(" "),n("select",{staticClass:"form-control custom-select mr-1 w-auto flex-grow-1",attrs:{name:"tag",id:"tag"},on:{change:function(n){return t.move(e.name,n.target.value)}}},[n("option",{attrs:{value:"none"}},[t._v("-- "+t._s(t.__("Move"))+" --")]),t._v(" "),t._l(t.tags,(function(r){return e.name!==r.name?n("option",{domProps:{value:r.name,textContent:t._s(r.name)}}):t._e()}))],2),t._v(" "),n("confirm",{staticClass:"btn btn-danger btn-sm",attrs:{tag:"button",text:t.__("Delete"),"text-confirm":t.__("Confirm")},on:{confirmed:function(n){return t.remove(e)}}})],1)])})),0)])])])])}),[],!1,null,null,null);e.default=o.exports},S4HP:function(t,e,n){"use strict";n.r(e);var r={props:{loading:{type:Boolean,required:!1,default:!1}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this.$createElement,e=this._self._c||t;return this.loading?e("div",{staticClass:"d-flex align-content-center align-items-center"},[e("div",{staticClass:"spinner-grow mr-2",attrs:{role:"status"}}),this._v(" "),e("div",[this._v(this._s(this.__("Loading")))])]):this._e()}),[],!1,null,null,null);e.default=o.exports},T8I8:function(t,e){t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},TfHT:function(t,e,n){"use strict";n.r(e);var r=n("0fPN"),i=n("1IHE");function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"comment_id";return t.filter((function(t){return t[r]===n})).map((function(n){return a({},n,{comments:e.nested(t,n.id)})}))},removeReply:function(){this.comment.comment=null},initFromStorage:function(){var t=JSON.parse(localStorage.getItem("comment"));null!==t&&!1===this.isLogged()&&(this.comment.name=t.name||null,this.comment.email=t.email||null)},commentToStorage:function(){localStorage.setItem("comment",JSON.stringify({name:this.comment.name,email:this.comment.email}))},getRandomId:function(){return Math.floor(Math.random()*Math.floor(999999))}},watch:{"comment.comment":function(t){this.$refs.commentFormContent.focus()},"comment.name":_.debounce((function(t){this.commentToStorage()}),200),"comment.email":_.debounce((function(t){this.commentToStorage()}),200)},computed:{canAddComment:function(){return this.isLogged()||this.allowGuest},canSubmit:function(){var t=this.comment.content&&this.comment.content.length>=3,e=this.comment.captcha&&this.comment.captcha.length>0;return this.isLogged()?!0===t:!0===t&&!0===e}}},c=n("KHd+"),u=Object(c.a)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--comments"},[n("div",{staticClass:"card-header d-flex justify-content-between"},[t._v("\n "+t._s(t.__("Comments"))+"\n "),n("span",{staticClass:"d-block badge text-white",class:{"badge-info":t.count>0,"badge-default":0===t.count}},[t._v(t._s(t.count))])]),t._v(" "),n("div",{staticClass:"card-body"},[t.loading?n("loader",{attrs:{loading:t.loading}}):n("div",[0===t.comments.length?n("div",{staticClass:"alert alert-info mb-0"},[t._v(t._s(t.__("No comments")))]):t._e(),t._v(" "),t._l(t.comments,(function(t){return n("comment",{key:t.id,attrs:{comment:t}})}))],2)],1),t._v(" "),t.canAddComment?n("div",{staticClass:"card-footer"},[n("h5",{staticClass:"card-title d-flex justify-content-between flex-wrap"},[t._v("\n "+t._s(t.__("New comment"))+"\n "),t.comment.comment?n("small",[n("i",{staticClass:"fas fa-reply mr-1"}),t._v(" "+t._s(t.__("Replying to :name",{name:t.comment.comment.name}))+"\n ")]):t._e()]),t._v(" "),!1===t.isLogged()?n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.comment.name,expression:"comment.name"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("name")},attrs:{type:"text",placeholder:t.__("Name"),required:""},domProps:{value:t.comment.name},on:{input:function(e){e.target.composing||t.$set(t.comment,"name",e.target.value)}}}),t._v(" "),t.hasFormError("name")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("name")))]):t._e()])]),t._v(" "),n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.comment.email,expression:"comment.email"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("email")},attrs:{type:"email",placeholder:t.__("E-Mail Address"),required:""},domProps:{value:t.comment.email},on:{input:function(e){e.target.composing||t.$set(t.comment,"email",e.target.value)}}}),t._v(" "),t.hasFormError("email")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("email")))]):t._e()])])]):t._e(),t._v(" "),n("div",{staticClass:"form-group"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.comment.content,expression:"comment.content"}],ref:"commentFormContent",staticClass:"form-control",class:{"is-invalid":t.hasFormError("content")},attrs:{placeholder:t.__("Content"),required:""},domProps:{value:t.comment.content},on:{input:function(e){e.target.composing||t.$set(t.comment,"content",e.target.value)}}}),t._v(" "),t.hasFormError("content")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("content")))]):t._e()]),t._v(" "),n("div",{staticClass:"row"},[t.captcha&&!1===t.isLogged()?n("div",{staticClass:"col-12 col-md-8 mb-1 d-flex"},[n("img",{staticClass:"d-inline-block mr-md-1 mb-1 mb-md-0 mx-auto mx-md-0",staticStyle:{"border-radius":"1rem",width:"150px",height:"40px"},attrs:{src:t.captcha.img,alt:"Captcha"}}),t._v(" "),n("div",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.comment.captcha,expression:"comment.captcha"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("captcha")},attrs:{type:"text",placeholder:t.__("Captcha")},domProps:{value:t.comment.captcha},on:{input:function(e){e.target.composing||t.$set(t.comment,"captcha",e.target.value)}}}),t._v(" "),t.hasFormError("captcha")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("captcha")))]):t._e()])]):t._e(),t._v(" "),n("div",{staticClass:"col-12 col-md-4"},[n("button",{staticClass:"btn btn-primary btn-block",attrs:{type:"button",disabled:t.loading||!1===t.canSubmit},on:{click:function(e){return e.preventDefault(),t.submit(e)}}},[t._v(t._s(t.__("Save")))])])])]):t._e()])}),[],!1,null,null,null);e.default=u.exports},URgk:function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n("YBdB"),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n("yLpj"))},XHP3:function(t,e){t.exports={methods:{__:function(t,e){var n=window.i18n[t]?window.i18n[t]:t;return _.forEach(e,(function(t,e){n=n.replace(":"+e,t)})),n}}}},YBdB:function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,l=1,c={},u=!1,d=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){m(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){m(t.data)},r=function(t){o.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(t){var e=d.createElement("script");e.onreadystatechange=function(){m(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(m,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&m(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n0&&void 0!==arguments[0]?arguments[0]:16,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.alphabet(e),r=n.length,i="";i.length0&&void 0!==arguments[0])||arguments[0];return["abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ","1234567890","~!?@#$%&^_*+-=[]€,;:|()[]{}"].slice(0,t?4:3).join("")}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"btn-group",attrs:{role:"group"}},[t._m(0),t._v(" "),n("div",{staticClass:"dropdown-menu"},[n("h6",{staticClass:"dropdown-header"},[t._v(t._s(t.__("Alpha numeric with symbols")))]),t._v(" "),n("button",{staticClass:"dropdown-item",on:{click:function(e){return t.generate(8)}}},[t._v(t._s(t.__(":size chars",{size:8})))]),t._v(" "),n("button",{staticClass:"dropdown-item",on:{click:function(e){return t.generate(16)}}},[t._v(t._s(t.__(":size chars",{size:16})))]),t._v(" "),n("button",{staticClass:"dropdown-item",on:{click:function(e){return t.generate(24)}}},[t._v(t._s(t.__(":size chars",{size:24})))]),t._v(" "),n("h6",{staticClass:"dropdown-header"},[t._v(t._s(t.__("Alpha numeric only")))]),t._v(" "),n("button",{staticClass:"dropdown-item",on:{click:function(e){return t.generate(8,!1)}}},[t._v(t._s(t.__(":size chars",{size:8})))]),t._v(" "),n("button",{staticClass:"dropdown-item",on:{click:function(e){return t.generate(16,!1)}}},[t._v(t._s(t.__(":size chars",{size:16})))]),t._v(" "),n("button",{staticClass:"dropdown-item",on:{click:function(e){return t.generate(24,!1)}}},[t._v(t._s(t.__(":size chars",{size:24})))])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-outline-secondary border-right-0 dropdown-toggle",staticStyle:{"border-radius":"0"},attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[e("i",{staticClass:"fas fa-dice pr-1"})])}],!1,null,null,null);e.default=o.exports},b9EY:function(t,e){t.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},bUC5:function(t,e,n){"use strict";n.r(e);var r=n("XHP3"),i=n.n(r),o=n("HHJa"),a=n.n(o);function s(t){var e=new t;Object.defineProperties(e,{on:{get:function(){return this.$on.bind(this)}},once:{get:function(){return this.$once.bind(this)}},off:{get:function(){return this.$off.bind(this)}},emit:{get:function(){return this.$emit.bind(this)}}}),Object.defineProperty(t,"bus",{get:function(){return e}}),Object.defineProperty(t.prototype,"$bus",{get:function(){return e}})}"undefined"!=typeof window&&window.Vue&&window.Vue.use(s);var l=s,c=n("pl0M"),u=n.n(c),d=n("jl8+"),f=n.n(d),p=n("VH6O"),m=n.n(p),h=["load","change","stateChange","focus","blur"],_=["insertText","setValue","setMarkdown","setHtml","reset"],v={name:"TuiEditor",props:{previewStyle:{type:String},height:{type:String},value:{type:String},mode:{type:String},options:{type:Object},html:{type:String},visible:{type:Boolean,default:!0}},data:()=>({editor:null}),computed:{editorOptions(){const t=Object.assign({},this.options);return t.initialValue=this.value,t.initialEditType=this.mode,t.height=this.height,t.previewStyle=this.previewStyle,t}},watch:{previewStyle(t){this.editor.changePreviewStyle(t)},value(t,e){t!==e&&t!==this.editor.getValue()&&this.editor.setValue(t)},height(t){this.editor.height(t)},mode(t){this.editor.changeMode(t)},html(t){this.editor.setHtml(t),this.$emit("input",this.editor.getValue())},visible(t){t?this.editor.show():this.editor.hide()}},mounted(){const t={};h.forEach(e=>{t[e]=(...t)=>{this.$emit(e,...t)}});const e=Object.assign(this.editorOptions,{el:this.$refs.tuiEditor,events:t});this.editor=new m.a(e),this.$listeners.input&&this.editor.on("change",()=>{this.$emit("input",this.editor.getValue())})},destroyed(){h.forEach(t=>{this.editor.off(t)}),this.editor.remove()},methods:{invoke(t,...e){let n=null;return this.editor[t]&&(n=this.editor[t](...e),_.indexOf(t)>-1&&this.$emit("input",this.editor.getValue())),n}}},g=n("KHd+"),E=Object(g.a)(v,(function(){var t=this.$createElement;return(this._self._c||t)("div",{ref:"tuiEditor"})}),[],!1,null,null,null).exports,b={name:"TuiEditorViewer",props:{height:{type:String},value:{type:String},exts:{type:Array}},data:()=>({editor:null}),watch:{value(t,e){t!==e&&this.editor.setValue(t)}},mounted(){const t={};h.forEach(e=>{t[e]=(...t)=>{this.$emit(e,...t)}}),this.editor=m.a.factory({el:this.$refs.tuiEditorViewer,exts:this.exts,events:t,initialValue:this.value,height:this.height,viewer:!0})},destroyed(){h.forEach(t=>{this.editor.off(t)}),this.editor.remove()},methods:{invoke(t,...e){let n=null;return this.editor[t]&&(n=this.editor[t](...e)),n}}},y=Object(g.a)(b,(function(){var t=this.$createElement;return(this._self._c||t)("div",{ref:"tuiEditorViewer"})}),[],!1,null,null,null).exports,C=n("x9sl"),T=n("MQ60"),w=n.n(T),I=n("la7V"),S=n("EaH7");window._=n("LvDl");try{window.Popper=n("8L3F").default,window.$=window.jQuery=n("EVdn"),n("SYky")}catch(t){}window.axios=n("vDqi"),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var O=document.head.querySelector('meta[name="csrf-token"]');O?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=O.content:console.error("CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token");var D=document.head.querySelector('meta[name="api-token"]');D&&(window.axios.defaults.headers.common.Authorization="Bearer "+D.content),window.Vue=n("XuX8"),Vue.mixin(i.a),Vue.mixin(a.a),Vue.use(l),Vue.use(u.a,{position:"top-center",duration:5e3}),Vue.component("multiselect",f.a),Vue.component("editor",E),Vue.component("viewer",y),Vue.directive("on-clickaway",C.directive),Vue.component("draggable",w.a),Vue.use(I.default),Vue.use(S.default);var R=n("+fAT");R.keys().map((function(t){return Vue.component(t.split("/").pop().split(".")[0],R(t).default)}));new Vue({el:"#app",data:function(){return{pwa:!1,online:!0,prompt:null}},created:function(){var t=this;this.registerServiceWorker(),window.addEventListener("online",(function(){t.online=!0})),window.addEventListener("offline",(function(){t.online=!1})),window.addEventListener("beforeinstallprompt",(function(e){t.prompt=e}))},methods:{registerServiceWorker:function(){"serviceWorker"in navigator&&(navigator.serviceWorker.controller?this.pwa=!0:navigator.serviceWorker.register("sw.js",{scope:"/"}))},installPwa:function(t){var e=this;this.prompt.prompt(),this.prompt.userChoice.then((function(t){e.prompt=null}))}}})},bVTN:function(t,e,n){"use strict";n.r(e);var r=n("0fPN"),i={mixins:[r.a],props:{user:{type:Object|Boolean,required:!1,default:!1}},data:function(){return{form:{name:"",email:"",is_admin:!1,password:"",password_confirmation:""},loading:!1}},mounted:function(){this.user&&this.setUser(this.user)},methods:{submit:function(){var t=this;this.loading=!0,axios.request({method:this.user?"PUT":"POST",url:this.user?this.user.url_update:"/api/manage/users",data:this.form}).then((function(e){t.$toasted.success(t.__("Saved")),t.user?t.loading=!1:t.form={name:"",email:"",is_admin:!1,password:"",password_confirmation:""},t.resetFormError(),t.$emit("submited")})).catch((function(e){"error"===e.response.data.status?t.$toasted.error(e.response.data.message):t.$toasted.error(t.__("Can't save")),t.setFormError(e),t.loading=!1}))},setUser:function(t){this.form={name:"",email:"",is_admin:!1,password:"",password_confirmation:""},this.resetFormError(),t&&(this.form.name=t.name,this.form.email=t.email,this.form.is_admin=t.is_admin)}},watch:{user:function(t){this.setUser(t)}}},o=n("KHd+"),a=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"col-xs-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"name"}},[t._v(t._s(t.__("Name")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.name,expression:"form.name"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("name")},attrs:{type:"text",id:"name",disabled:t.loading},domProps:{value:t.form.name},on:{input:function(e){e.target.composing||t.$set(t.form,"name",e.target.value)}}}),t._v(" "),t.hasFormError("name")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("name")))]):t._e()])]),t._v(" "),n("div",{staticClass:"col-xs-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"email"}},[t._v(t._s(t.__("E-Mail Address")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.email,expression:"form.email"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("email")},attrs:{type:"text",id:"email",disabled:t.loading},domProps:{value:t.form.email},on:{input:function(e){e.target.composing||t.$set(t.form,"email",e.target.value)}}}),t._v(" "),t.hasFormError("email")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("email")))]):t._e()])])]),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-xs-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"password"}},[t._v(t._s(t.__("Password")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.password,expression:"form.password"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("password")},attrs:{type:"password",id:"password",disabled:t.loading},domProps:{value:t.form.password},on:{input:function(e){e.target.composing||t.$set(t.form,"password",e.target.value)}}}),t._v(" "),t.hasFormError("password")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("password")))]):t._e()])]),t._v(" "),n("div",{staticClass:"col-xs-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"password_confirmation"}},[t._v(t._s(t.__("Confirm Password")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.password_confirmation,expression:"form.password_confirmation"}],staticClass:"form-control",attrs:{type:"password",id:"password_confirmation",disabled:t.loading},domProps:{value:t.form.password_confirmation},on:{input:function(e){e.target.composing||t.$set(t.form,"password_confirmation",e.target.value)}}})])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_admin,expression:"form.is_admin"}],staticClass:"custom-control-input",class:{"is-invalid":t.hasFormError("is_admin")},attrs:{type:"checkbox",id:"is_admin",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_admin)?t._i(t.form.is_admin,null)>-1:t.form.is_admin},on:{change:function(e){var n=t.form.is_admin,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_admin",n.concat([null])):o>-1&&t.$set(t.form,"is_admin",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_admin",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_admin"}},[t._v(t._s(t.__("Is admin?")))])]),t._v(" "),n("span",{staticClass:"text-muted"},[t._v(t._s(t.__("Admin users can access settings and other users private content")))])]),t._v(" "),n("button",{staticClass:"btn btn-primary",attrs:{disabled:t.loading},on:{click:function(e){return e.preventDefault(),t.submit(e)}}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Save"))+"\n ")])])}),[],!1,null,null,null);e.default=a.exports},cNyC:function(t,e,n){"use strict";n.r(e);var r={props:{tag:{type:String,required:!1,default:"a"},text:{type:String,required:!1,default:"Click"},textConfirm:{type:String,required:!1,default:"Confirm"},duration:{type:Number,required:!1,default:2e3},href:{type:null|String,required:!1,default:null}},data:function(){return{clicked:!1}},methods:{click:function(){var t=this;if(this.clicked)return this.confirmed();this.clicked=!0,setTimeout((function(){t.clicked=!1}),this.duration)},confirmed:function(){this.href&&(window.location=this.href),this.$emit("confirmed")}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.tag,{tag:"component",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.click(e)}}},[t.clicked?n("span",{domProps:{innerHTML:t._s(t.textConfirm)}}):n("span",{domProps:{innerHTML:t._s(t.text)}})])}),[],!1,null,null,null);e.default=o.exports},fKCf:function(t,e){t.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},idfw:function(t,e,n){"use strict";n.r(e);var r={props:{single:{type:Boolean,required:!1,default:!1},album:{type:Object,required:!0,default:function(){}}},methods:{remove:function(){var t=this;axios.delete(this.album.url_delete).then((function(e){t.$toasted.success(t.__("Deleted")),t.single?window.location="/":window.location.reload()})).catch((function(e){t.$toasted.error(t.__("Can't delete"))}))}},computed:{images:function(){if(this.single)return this.album.images;var t=this.album.images.length,e=t>4?4:t;return this.album.images.slice(0,e)},imagesCols:function(){return this.single?{default:4,1e3:3,700:2,400:1}:{default:2}}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--album mb-4",class:{"card-single":t.single,"card-index":!t.single}},[n("div",{staticClass:"card-body"},[n("h5",{staticClass:"card-title"},[t.album.is_pinned&&!t.single?n("i",{staticClass:"fas fa-thumbtack fa-sm pr-1"}):t._e(),t._v(" "),n("span",[t._v(t._s(t.__("Album")))]),t._v(" — "),n("a",{attrs:{href:t.album.permalink}},[t._v(t._s(t.album.title))]),n("br")]),t._v(" "),n("p",{staticClass:"card-content",domProps:{innerHTML:t._s(t.album.content)}}),t._v(" "),t.images?n("masonry",{staticClass:"mb-1",attrs:{cols:t.imagesCols,gutter:5}},t._l(t.images,(function(e){return n("div",{key:e.name},[n("img",{directives:[{name:"img",rawName:"v-img",value:{src:e.url_full,group:t.album.permalink},expression:"{src: image.url_full, group: album.permalink}"}],staticClass:"img-fluid mb-1",attrs:{src:e.url_thumb||e.url_full,alt:e.name}})])})),0):t._e(),t._v(" "),!t.single&&t.album.images.length>4?n("p",{staticClass:"text-right small mb-0"},[n("i",{staticClass:"fas fa-plus mr-1"}),t._v(" "+t._s(t.album.images.length-t.images.length)+"\n ")]):t._e(),t._v(" "),t.album.tags.length>0?n("p",{staticClass:"card-text mt-1"},t._l(t.album.tags,(function(e){return n("a",{staticClass:"badge badge-secondary mr-1",attrs:{href:"/tag/"+e}},[t._v(t._s(e))])})),0):t._e()],1),t._v(" "),n("div",{staticClass:"card-footer d-flex justify-content-between"},[n("span",[t.album.is_private?n("i",{staticClass:"fas fa-lock pr-2"}):t._e(),t._v(t._s(t.album.date_formated))]),t._v(" "),n("div",{staticClass:"dropdown"},[n("button",{staticClass:"btn btn-outline-dark btn-sm dropdown-toggle",attrs:{type:"button",id:"dropdownMenuButton","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",dusk:"album-card-more"}},[t._v("\n "+t._s(t.__("More"))+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[n("a",{staticClass:"dropdown-item",attrs:{href:t.album.permalink,dusk:"album-card-permalink"}},[n("i",{staticClass:"fas fa-link fa-fw mr-1"}),t._v(" "+t._s(t.__("Permalink"))+"\n ")]),t._v(" "),t.album.url_download?n("a",{staticClass:"dropdown-item",attrs:{href:t.album.url_download,dusk:"album-card-download"}},[n("i",{staticClass:"fas fa-file-download fa-fw mr-1"}),t._v(" "+t._s(t.__("Download"))+"\n ")]):t._e(),t._v(" "),t.album.editable?n("h6",{staticClass:"dropdown-header"},[t._v(t._s(t.__("Manage")))]):t._e(),t._v(" "),t.album.editable?n("a",{staticClass:"dropdown-item",attrs:{dusk:"album-card-temp-share"},on:{click:function(e){return t.$bus.$emit("share",t.album)}}},[n("i",{staticClass:"fas fa-share-square fa-fw mr-1"}),t._v(" "+t._s(t.__("Temp sharing"))+"\n ")]):t._e(),t._v(" "),t.album.editable?n("a",{staticClass:"dropdown-item",attrs:{href:t.album.url_edit,dusk:"album-card-edit"}},[n("i",{staticClass:"fas fa-pen-alt fa-fw mr-1"}),t._v(" "+t._s(t.__("Edit"))+"\n ")]):t._e(),t._v(" "),t.album.editable?n("confirm",{staticClass:"dropdown-item",attrs:{text:" "+t.__("Delete"),"text-confirm":" "+t.__("Confirm"),dusk:"album-card-remove"},on:{confirmed:t.remove}}):t._e()],1)])])])}),[],!1,null,null,null);e.default=o.exports},iyXs:function(t,e,n){"use strict";n.r(e);var r={props:{name:{type:String,required:!0},values:{type:Object,required:!1,default:null}},data:function(){return{type:"image",original:null,gradient:{start:null,end:null,orientation:0},image:{base64:null}}},mounted:function(){this.values&&(this.type=this.values.type,"gradient"===this.type&&(this.gradient.start=this.values.start||null,this.gradient.end=this.values.end||null,this.gradient.orientation=this.values.orientation||90)),this.original=$("body").css("background-image")},methods:{handleFile:function(t){var e=this,n=t.target.files[0],r=new FileReader;!1!==n.type.match("image/*")&&(r.onload=function(){e.image.base64=r.result},r.readAsDataURL(n))},setBackground:function(){"none"===this.type&&$("body").css("background-image",""),"image"===this.type&&$("body").css({"background-image":this.backgroundImage,"background-size":"cover","background-repeat":"no-repeat","background-position":"center center"}),"gradient"===this.type&&$("body").css("background-image",this.backgroundGradient)}},computed:{backgroundGradient:function(){return this.gradient.start&&this.gradient.end?"linear-gradient(".concat(this.gradient.orientation,"deg, ").concat(this.gradient.start," 0%, ").concat(this.gradient.end," 100%)"):null},backgroundImage:function(){return this.image.base64?'url("'.concat(this.image.base64,'")'):null},data:function(){var t=JSON.stringify({type:"none"});return"gradient"===this.type&&this.backgroundGradient&&(t=JSON.stringify({type:"gradient",start:this.gradient.start,end:this.gradient.end,orientation:this.gradient.orientation})),"image"===this.type&&(this.backgroundImage||this.values.file)&&(t=JSON.stringify({type:"image",base64:this.image.base64||null})),t}},watch:{type:function(t){this.setBackground()},backgroundImage:function(t){this.setBackground()},backgroundGradient:function(t){this.setBackground()}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"form-group"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.type,expression:"type"}],staticClass:"form-control custom-select",attrs:{id:"type"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.type=e.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"none"}},[t._v(t._s(t.__("None")))]),t._v(" "),n("option",{attrs:{value:"image"}},[t._v(t._s(t.__("Image")))]),t._v(" "),n("option",{attrs:{value:"gradient"}},[t._v(t._s(t.__("Gradient")))])])]),t._v(" "),"image"===t.type?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"col-12"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-file"},[n("label",{staticClass:"custom-file-label",attrs:{for:"file","data-browse":t.__("Choose")}},[t._v(t._s(t.__("File")))]),t._v(" "),n("input",{staticClass:"custom-file-input",attrs:{type:"file",id:"file",accept:"image/*"},domProps:{value:t.image.name},on:{change:t.handleFile}})])])])])]):t._e(),t._v(" "),"gradient"===t.type?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"col-md-4"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"start"}},[t._v(t._s(t.__("Color #:number",{number:1})))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.gradient.start,expression:"gradient.start"}],staticClass:"form-control",attrs:{type:"color",id:"start"},domProps:{value:t.gradient.start},on:{input:function(e){e.target.composing||t.$set(t.gradient,"start",e.target.value)}}})])]),t._v(" "),n("div",{staticClass:"col-md-4"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"end"}},[t._v(t._s(t.__("Color #:number",{number:2})))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.gradient.end,expression:"gradient.end"}],staticClass:"form-control",attrs:{type:"color",id:"end"},domProps:{value:t.gradient.end},on:{input:function(e){e.target.composing||t.$set(t.gradient,"end",e.target.value)}}})])]),t._v(" "),n("div",{staticClass:"col-md-4"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"orientation"}},[t._v(t._s(t.__("Orientation")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.gradient.orientation,expression:"gradient.orientation"}],staticClass:"form-control",attrs:{type:"number",id:"orientation",min:"0",max:"360",step:"5"},domProps:{value:t.gradient.orientation},on:{input:function(e){e.target.composing||t.$set(t.gradient,"orientation",e.target.value)}}})])])])]):t._e(),t._v(" "),n("input",{attrs:{type:"hidden",name:t.name,id:"name"},domProps:{value:t.data}})])}),[],!1,null,null,null);e.default=o.exports},jPMG:function(t,e,n){"use strict";n.r(e);var r={props:{endpoint:{type:String,required:!0}},methods:{purge:function(){var t=this;axios.post(this.endpoint).then((function(e){t.$toasted.success(t.__("Logins history has been purged")),window.location.reload()})).catch((function(e){console.log(e),t.$toasted.error(t.__("Unable to purge logins history"))}))}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this.$createElement;return(this._self._c||t)("confirm",{attrs:{text:this.__("Purge"),"text-confirm":this.__("Confirm")},on:{confirmed:this.purge}})}),[],!1,null,null,null);e.default=o.exports},kuJz:function(t,e,n){"use strict";n.r(e);var r={props:{single:{type:Boolean,required:!1,default:!1},link:{type:Object,required:!0,default:function(){}}},methods:{remove:function(){var t=this;axios.delete(this.link.url_delete).then((function(e){t.$toasted.success(t.__("Deleted")),t.single?window.location="/":window.location.reload()})).catch((function(e){t.$toasted.error(t.__("Can't delete"))}))}},computed:{displayUrl:function(){var t=this.link.url;if(t.length>65){var e=t.substr(0,62);return"".concat(e,"...")}return t},waybackUrl:function(){return"https://web.archive.org/web/"+encodeURIComponent(this.link.url)}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--link mb-4",class:{"card-single":t.single,"card-index":!t.single}},[n("div",{staticClass:"card-body"},[n("h5",{staticClass:"card-title"},[t.link.is_pinned&&!t.single?n("i",{staticClass:"fas fa-thumbtack fa-sm pr-1"}):t._e(),t._v(" "),n("span",[t._v(t._s(t.__("Link")))]),t._v(" —\n "),n("a",{attrs:{href:t.link.permalink,title:t.link.title}},[t._v(t._s(t.link.title))]),n("br"),t._v(" "),n("a",{staticClass:"small text-muted",attrs:{href:t.link.url}},[t._v(t._s(t.displayUrl))])]),t._v(" "),t.link.http_status>=300?n("div",{class:"alert alert-"+t.link.http_status_color+" d-flex flex-column flex-lg-row justify-content-between align-items-center",attrs:{role:"alert"}},[n("span",[t._v(t._s(t.__("This link seems to be broken"))+" ("+t._s(t.link.http_status)+")")]),t._v(" "),t.link.http_checked_at_formated?n("small",[t._v(t._s(t.link.http_checked_at_formated))]):t._e()]):t._e(),t._v(" "),n("p",{staticClass:"card-content",domProps:{innerHTML:t._s(t.link.content)}}),t._v(" "),t.link.preview?n("div",{staticClass:"card-preview mb-1",domProps:{innerHTML:t._s(t.link.preview)}}):t._e(),t._v(" "),t.link.tags.length>0?n("p",{staticClass:"card-text mt-1"},t._l(t.link.tags,(function(e){return n("a",{staticClass:"badge badge-secondary mr-1",attrs:{href:"/tag/"+e}},[t._v(t._s(e))])})),0):t._e()]),t._v(" "),n("div",{staticClass:"card-footer d-flex justify-content-between align-items-center"},[n("span",[t.link.is_private?n("i",{staticClass:"fas fa-lock pr-2"}):t._e(),t._v(" "+t._s(t.link.date_formated)+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown"},[n("button",{staticClass:"btn btn-outline-dark btn-sm dropdown-toggle",attrs:{type:"button",id:"dropdownMenuButton","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",dusk:"link-card-more"}},[t._v("\n "+t._s(t.__("More"))+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[n("a",{staticClass:"dropdown-item",attrs:{href:t.link.permalink,dusk:"link-card-permalink"}},[n("i",{staticClass:"fas fa-link fa-fw mr-1"}),t._v(" "+t._s(t.__("Permalink"))+"\n ")]),t._v(" "),n("a",{staticClass:"dropdown-item",attrs:{href:t.waybackUrl,target:"_blank",dusk:"link-card-archiveorg-link"}},[n("i",{staticClass:"fas fa-history fa-fw mr-1"}),t._v(" "+t._s(t.__("View on archive.org"))+"\n ")]),t._v(" "),t.link.url_download?n("a",{staticClass:"dropdown-item",attrs:{href:t.link.url_download,dusk:"link-card-download-link"}},[n("i",{staticClass:"fas fa-file-download fa-fw mr-1"}),t._v(" "+t._s(t.__("Download"))+"\n ")]):t._e(),t._v(" "),t.link.editable?n("h6",{staticClass:"dropdown-header"},[t._v(t._s(t.__("Manage")))]):t._e(),t._v(" "),t.link.editable?n("a",{staticClass:"dropdown-item",attrs:{dusk:"link-card-temp-share"},on:{click:function(e){return t.$bus.$emit("share",t.link)}}},[n("i",{staticClass:"fas fa-share-square fa-fw mr-1"}),t._v(" "+t._s(t.__("Temp sharing"))+"\n ")]):t._e(),t._v(" "),t.link.editable?n("a",{staticClass:"dropdown-item",attrs:{href:t.link.url_edit,dusk:"link-card-edit"}},[n("i",{staticClass:"fas fa-pen-alt fa-fw mr-1"}),t._v(" "+t._s(t.__("Edit"))+"\n ")]):t._e(),t._v(" "),t.link.editable?n("confirm",{staticClass:"dropdown-item",attrs:{text:" "+t.__("Delete"),"text-confirm":" "+t.__("Confirm"),dusk:"link-card-remove"},on:{confirmed:t.remove}}):t._e()],1)])])])}),[],!1,null,null,null);e.default=o.exports},nBz4:function(t,e,n){"use strict";n.r(e);var r=n("YLgT"),i=n.n(r),o=n("0fPN"),a=n("1IHE"),s=n("FQHZ"),l={components:{FilePond:new(n.n(s).a)},mixins:[i.a,o.a,a.a],props:{album:{type:Object,required:!1,default:function(){}}},data:function(){return{form:{title:null,content:null,images:[],uploaded:[],is_private:!1,is_pinned:!1,tags:[]},loading:!1,drag:!1,dragOptions:{animation:200,group:"images",disabled:!1,ghostClass:"ghost",forceFallback:!0}}},mounted:function(){this.album&&(this.form=this.album,this.form.uploaded=[]),this.startAudit()},methods:{submit:function(t){var e=this;this.loading=!0,axios.request({method:this.album?"PUT":"POST",url:this.album?this.album.url_update:"/api/album",data:this.form}).then((function(n){switch(e.clearAudit(),e.$toasted.success(e.__("Saved")),t){case"view":window.location=n.data.post.url;break;case"new":window.location="/album/create";break;case"edit":window.location="/album/".concat(n.data.post.postable_id,"/edit")}})).catch((function(t){e.loading=!1,e.setFormError(t),e.setHttpError(t),e.toastHttpError(e.__("Can't save"))}))},initUpload:function(){Object(s.setOptions)({server:{url:"/api/album/upload",process:{headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content"),Authorization:"Bearer "+$('meta[name="api-token"]').attr("content")}}}})},handleFileProcess:function(t,e){null===t&&this.form.uploaded.push(e.serverId)},deleteImage:function(t){var e=this.form.images.indexOf(t);-1!==e&&(this.form.images.splice(e,1),this.updateImagesOrder())},startDragging:function(){this.drag=!0},endDragging:function(t){this.drag=!1,this.updateImagesOrder()},updateImagesOrder:function(){for(var t=this.form.images.length-1,e=0;e<=t;e++)this.form.images[e].order=e+1}}},c=n("KHd+"),u=Object(c.a)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--album"},[n("div",{staticClass:"card-body"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"title"}},[t._v(t._s(t.__("Title")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.title,expression:"form.title"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("title")},attrs:{type:"text",id:"title",disabled:t.loading,dusk:"album-form-title"},domProps:{value:t.form.title},on:{input:function(e){e.target.composing||t.$set(t.form,"title",e.target.value)}}}),t._v(" "),t.hasFormError("title")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("title")))]):t._e()]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"content"}},[t._v(t._s(t.__("Content")))]),t._v(" "),n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.form.content,expression:"form.content"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("content")},attrs:{id:"content",disabled:t.loading,dusk:"album-form-content"},domProps:{value:t.form.content},on:{input:function(e){e.target.composing||t.$set(t.form,"content",e.target.value)}}}),t._v(" "),t.hasFormError("content")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("content")))]):t._e()]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"content"}},[t._v(t._s(t.__("Images")))]),t._v(" "),n("file-pond",{ref:"pond",attrs:{"allow-multiple":!0,"allow-browse":!0,"allow-replace":!1,"allow-revert":!1,"instant-upload":!0,"label-idle":t.__("Drop files or click to choose"),"label-invalid-field":t.__("Invalid file"),"label-file-loading":t.__("Loading"),"label-file-processing":t.__("Loading"),"label-file-load-error":t.__("Fail"),"label-file-processing-error":t.__("Fail"),"label-file-processing-complete":t.__("Success"),"label-tap-to-cancel":t.__("Delete"),"label-tap-to-undo":t.__("Delete")},on:{init:t.initUpload,processfile:t.handleFileProcess}}),t._v(" "),t.form.images?n("div",[n("draggable",t._b({attrs:{group:"images",handle:".handle-order"},on:{start:t.startDragging,end:t.endDragging},model:{value:t.form.images,callback:function(e){t.$set(t.form,"images",e)},expression:"form.images"}},"draggable",t.dragOptions,!1),[n("transition-group",{attrs:{type:"transition",tag:"div",name:t.drag?null:"flip-list"}},t._l(t.form.images,(function(e){return n("figure",{key:"item-"+e.name,staticClass:"figure mr-2"},[n("img",{staticClass:"figure-img img-fluid rounded",staticStyle:{height:"100px"},attrs:{src:e.url_thumb||e.url_full}}),t._v(" "),n("figcaption",{staticClass:"figure-caption d-flex justify-content-center"},[n("button",{staticClass:"btn btn-sm btn-outline-secondary handle-order mr-1",attrs:{type:"button"}},[n("i",{staticClass:"fas fa-arrows-alt"})]),t._v(" "),n("confirm",{staticClass:"btn btn-sm btn-outline-secondary",attrs:{tag:"button",text:"","text-confirm":""},on:{confirmed:function(n){return t.deleteImage(e)}}})],1)])})),0)],1)],1):t._e()],1),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-md-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_private,expression:"form.is_private"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_private",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_private)?t._i(t.form.is_private,null)>-1:t.form.is_private},on:{change:function(e){var n=t.form.is_private,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_private",n.concat([null])):o>-1&&t.$set(t.form,"is_private",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_private",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_private",dusk:"album-form-private"}},[t._v(t._s(t.__("Is private?")))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_pinned,expression:"form.is_pinned"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_pinned",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_pinned)?t._i(t.form.is_pinned,null)>-1:t.form.is_pinned},on:{change:function(e){var n=t.form.is_pinned,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_pinned",n.concat([null])):o>-1&&t.$set(t.form,"is_pinned",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_pinned",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_pinned",dusk:"album-form-pinned"}},[t._v(t._s(t.__("Is pinned?")))])])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Tags")))]),t._v(" "),n("tags",{attrs:{dusk:"link-form-tags"},model:{value:t.form.tags,callback:function(e){t.$set(t.form,"tags",e)},expression:"form.tags"}})],1)]),t._v(" "),n("div",{staticClass:"card-footer d-flex justify-content-between"},[n("div",[n("div",{staticClass:"btn-group"},[n("button",{staticClass:"btn btn-primary",class:{"btn-danger":t.hasChanged},attrs:{type:"button",disabled:t.loading,dusk:"album-form-save"},on:{click:function(e){return e.preventDefault(),t.submit("edit")}}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Save"))+"\n ")]),t._v(" "),n("button",{staticClass:"btn btn-primary dropdown-toggle dropdown-toggle-split",class:{"btn-danger":t.hasChanged},attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}}),t._v(" "),n("div",{staticClass:"dropdown-menu"},[n("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.submit("view")}}},[t._v(t._s(t.__("Save & View")))]),t._v(" "),n("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.submit("new")}}},[t._v(t._s(t.__("Save & New")))])])]),t._v(" "),t.album?n("a",{staticClass:"btn btn-outline-primary",attrs:{href:t.album.permalink}},[t._v(t._s(t.__("View")))]):t._e()]),t._v(" "),t._t("actions")],2)])}),[],!1,null,null,null);e.default=u.exports},p7ys:function(t,e){t.exports=/[\0-\x1F\x7F-\x9F]/},pyCd:function(t,e){},tEIc:function(t,e,n){"use strict";n.r(e);var r={props:{message:{type:String,required:!0},type:{type:String,required:!1,default:"success"}},mounted:function(){this.message.length>0&&this.$toasted.show(this.message,{type:this.type})}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this.$createElement;return(this._self._c||t)("div")}),[],!1,null,null,null);e.default=o.exports},uB4Z:function(t,e,n){!function(e,n){"use strict";function r(t,e,n){this.root=this.currentNode=t,this.nodeType=e,this.filter=n||lt}function i(t){return t.nodeType===L&&!!ut[t.nodeName]}function o(t){switch(t.nodeType){case F:return ft;case L:case B:if(it&&ht.has(t))return ht.get(t);break;default:return dt}var e;return e=function(t,e){for(var n=t.length;n--;)if(!e(t[n]))return!1;return!0}(t.childNodes,a)?ct.test(t.nodeName)?ft:pt:mt,it&&ht.set(t,e),e}function a(t){return o(t)===ft}function s(t){return o(t)===pt}function l(t){return o(t)===mt}function c(t,e){var n=new r(e,U,s);return n.currentNode=t,n}function u(t,e){return(t=c(t,e).previousNode())!==e?t:null}function d(t,e){return(t=c(t,e).nextNode())!==e?t:null}function f(t,e){return!i(t)&&t.nodeType===e.nodeType&&t.nodeName===e.nodeName&&"A"!==t.nodeName&&t.className===e.className&&(!t.style&&!e.style||t.style.cssText===e.style.cssText)}function p(t,e,n){if(t.nodeName!==e)return!1;for(var r in n)if(t.getAttribute(r)!==n[r])return!1;return!0}function m(t,e,n,r){for(;t&&t!==e;){if(p(t,n,r))return t;t=t.parentNode}return null}function h(t,e){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function _(t){var e=t.nodeType;return e===L||e===B?t.childNodes.length:t.length||0}function v(t){var e=t.parentNode;return e&&e.removeChild(t),t}function g(t,e){var n=t.parentNode;n&&n.replaceChild(e,t)}function E(t){for(var e=t.ownerDocument.createDocumentFragment(),n=t.childNodes,r=n?n.length:0;r--;)e.appendChild(t.firstChild);return e}function b(t,e,r,i){var o,a,s,l=t.createElement(e);if(r instanceof Array&&(i=r,r=null),r)for(o in r)r[o]!==n&&l.setAttribute(o,r[o]);if(i)for(a=0,s=i.length;al?n.startOffset-=1:n.startOffset===l&&(n.startContainer=i,n.startOffset=_(i))),n.endContainer===e&&(n.endOffset>l?n.endOffset-=1:n.endOffset===l&&(n.endContainer=i,n.endOffset=_(i))),v(r),r.nodeType===F?i.appendData(r.data):c.push(E(r));else if(r.nodeType===L){for(o=c.length;o--;)r.appendChild(c.pop());t(r,n)}})(t,n),e.setStart(n.startContainer,n.startOffset),e.setEnd(n.endContainer,n.endOffset)}}function I(t){var e=t.nodeName;return"TD"===e||"TH"===e||"TR"===e||"TBODY"===e||"THEAD"===e}function S(t,e,n,r){var i,o,a,s=e;if(!I(t)||!I(e)){for(;(i=s.parentNode)&&i!==r&&i.nodeType===L&&1===i.childNodes.length;)s=i;v(s),a=t.childNodes.length,(o=t.lastChild)&&"BR"===o.nodeName&&(t.removeChild(o),a-=1),t.appendChild(E(e)),n.setStart(t,a),n.collapse(!0),w(t,n),X&&(o=t.lastChild)&&"BR"===o.nodeName&&t.removeChild(o)}}function O(t,e){var n,r,i=t.previousSibling,o=t.firstChild,a=t.ownerDocument,s="LI"===t.nodeName;if((!s||o&&/^[OU]L$/.test(o.nodeName))&&!I(t))if(i&&f(i,t)&&i.isContentEditable&&t.isContentEditable){if(!l(i)){if(!s)return;(r=b(a,"DIV")).appendChild(E(i)),i.appendChild(r)}v(t),n=!l(t),i.appendChild(E(t)),n&&C(i,e),o&&O(o,e)}else s&&(i=b(a,"DIV"),t.insertBefore(i,o),y(i,e))}function D(t){this.isShiftDown=t.shiftKey}function R(t,e,n){var r,i;if(t||(t={}),e)for(r in e)!n&&r in t||(i=e[r],t[r]=i&&i.constructor===Object?R(t[r],i,n):i);return t}function A(t,e){t.nodeType===M&&(t=t.body);var n,r=t.ownerDocument,i=r.defaultView;this._win=i,this._doc=r,this._root=t,this._events={},this._isFocused=!1,this._lastSelection=null,nt&&this.addEventListener("beforedeactivate",this.getSelection),this._hasZWS=!1,this._lastAnchorNode=null,this._lastFocusNode=null,this._path="",this._willUpdatePath=!1,"onselectionchange"in r?this.addEventListener("selectionchange",this._updatePathOnEvent):(this.addEventListener("keyup",this._updatePathOnEvent),this.addEventListener("mouseup",this._updatePathOnEvent)),this._undoIndex=-1,this._undoStack=[],this._undoStackLength=0,this._isInUndoState=!1,this._ignoreChange=!1,this._ignoreAllChanges=!1,rt?((n=new MutationObserver(this._docWasChanged.bind(this))).observe(t,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),this._mutation=n):this.addEventListener("keyup",this._keyUpDetectChange),this._restoreSelection=!1,this.addEventListener("blur",N),this.addEventListener("mousedown",k),this.addEventListener("touchstart",k),this.addEventListener("focus",x),this._awaitingPaste=!1,this.addEventListener(W?"beforecut":"cut",Qt),this.addEventListener("copy",Zt),this.addEventListener("keydown",D),this.addEventListener("keyup",D),this.addEventListener(W?"beforepaste":"paste",Jt),this.addEventListener("drop",te),this.addEventListener(X?"keypress":"keydown",kt),this._keyHandlers=Object.create(Ft),this.setConfig(e),W&&(i.Text.prototype.splitText=function(t){var e=this.ownerDocument.createTextNode(this.data.slice(t)),n=this.nextSibling,r=this.parentNode,i=this.length-t;return n?r.insertBefore(e,n):r.appendChild(e),i&&this.deleteData(t,i),e}),t.setAttribute("contenteditable","true");try{r.execCommand("enableObjectResizing",!1,"false"),r.execCommand("enableInlineTableEditing",!1,"false")}catch(t){}t.__squire__=this,this.setHTML("")}function N(){this._restoreSelection=!0}function k(){this._restoreSelection=!1}function x(){this._restoreSelection&&this.setSelection(this._lastSelection)}function P(t,e,n){var r,i;for(r=e.firstChild;r;r=i){if(i=r.nextSibling,a(r)){if(r.nodeType===F||"BR"===r.nodeName||"IMG"===r.nodeName){n.appendChild(r);continue}}else if(s(r)){n.appendChild(t.createDefaultBlock([P(t,r,t._doc.createDocumentFragment())]));continue}P(t,r,n)}return n}var L=1,F=3,M=9,B=11,U=1,G="​",q=e.defaultView,H=navigator.userAgent,$=/Android/.test(H),V=/iP(?:ad|hone|od)/.test(H),j=/Mac OS X/.test(H),z=/Windows NT/.test(H),Y=/Gecko\//.test(H),W=/Trident\/[456]\./.test(H),X=!!q.opera,K=/Edge\//.test(H),Q=!K&&/WebKit\//.test(H),Z=/Trident\/[4567]\./.test(H),J=j?"meta-":"ctrl-",tt=W||X,et=W||Q,nt=W,rt="undefined"!=typeof MutationObserver,it="undefined"!=typeof WeakMap,ot=/[^ \t\r\n]/,at=Array.prototype.indexOf;Object.create||(Object.create=function(t){var e=function(){};return e.prototype=t,new e});var st={1:1,2:2,3:4,8:128,9:256,11:1024},lt=function(){return!0};r.prototype.nextNode=function(){for(var t,e=this.currentNode,n=this.root,r=this.nodeType,i=this.filter;;){for(t=e.firstChild;!t&&e&&e!==n;)(t=e.nextSibling)||(e=e.parentNode);if(!t)return null;if(st[t.nodeType]&r&&i(t))return this.currentNode=t,t;e=t}},r.prototype.previousNode=function(){for(var t,e=this.currentNode,n=this.root,r=this.nodeType,i=this.filter;;){if(e===n)return null;if(t=e.previousSibling)for(;e=t.lastChild;)t=e;else t=e.parentNode;if(!t)return null;if(st[t.nodeType]&r&&i(t))return this.currentNode=t,t;e=t}},r.prototype.previousPONode=function(){for(var t,e=this.currentNode,n=this.root,r=this.nodeType,i=this.filter;;){for(t=e.lastChild;!t&&e&&e!==n;)(t=e.previousSibling)||(e=e.parentNode);if(!t)return null;if(st[t.nodeType]&r&&i(t))return this.currentNode=t,t;e=t}};var ct=/^(?:#text|A(?:BBR|CRONYM)?|B(?:R|D[IO])?|C(?:ITE|ODE)|D(?:ATA|EL|FN)|EM|FONT|I(?:FRAME|MG|NPUT|NS)?|KBD|Q|R(?:P|T|UBY)|S(?:AMP|MALL|PAN|TR(?:IKE|ONG)|U[BP])?|TIME|U|VAR|WBR)$/,ut={BR:1,HR:1,IFRAME:1,IMG:1,INPUT:1},dt=0,ft=1,pt=2,mt=3,ht=it?new WeakMap:null,_t=function(t,e){for(var n=t.childNodes;e&&t.nodeType===L;)e=(n=(t=n[e-1]).childNodes).length;return t},vt=function(t,e){if(t.nodeType===L){var n=t.childNodes;if(e-1,o=t.compareBoundaryPoints(1,r)<1;return!i&&!o}var a=t.compareBoundaryPoints(0,r)<1,s=t.compareBoundaryPoints(2,r)>-1;return a&&s},Tt=function(t){for(var e,n=t.startContainer,r=t.startOffset,o=t.endContainer,a=t.endOffset,s=!0;n.nodeType!==F&&(e=n.childNodes[r])&&!i(e);)n=e,r=0;if(a)for(;o.nodeType!==F;){if(!(e=o.childNodes[a-1])||i(e)){if(s&&e&&"BR"===e.nodeName){a-=1,s=!1;continue}break}a=_(o=e)}else for(;o.nodeType!==F&&(e=o.firstChild)&&!i(e);)o=e;t.collapsed?(t.setStart(o,a),t.setEnd(n,r)):(t.setStart(n,r),t.setEnd(o,a))},wt=function(t,e,n,r){var i,o=t.startContainer,a=t.startOffset,s=t.endContainer,l=t.endOffset,c=!0;for(e||(e=t.commonAncestorContainer),n||(n=e);!a&&o!==e&&o!==r;)i=o.parentNode,a=at.call(i.childNodes,o),o=i;for(;c&&s.nodeType!==F&&s.childNodes[l]&&"BR"===s.childNodes[l].nodeName&&(l+=1,c=!1),s!==n&&s!==r&&l===_(s);)i=s.parentNode,l=at.call(i.childNodes,s)+1,s=i;t.setStart(o,a),t.setEnd(s,l)},It=function(t,e){var n,r=t.startContainer;return a(r)?n=u(r,e):r!==e&&s(r)?n=r:n=d(n=_t(r,t.startOffset),e),n&&Ct(t,n,!0)?n:null},St=function(t,e){var n,r,i=t.endContainer;if(a(i))n=u(i,e);else if(i!==e&&s(i))n=i;else{if(!(n=vt(i,t.endOffset))||!h(e,n))for(n=e;r=n.lastChild;)n=r;n=u(n,e)}return n&&Ct(t,n,!0)?n:null},Ot=new r(null,4|U,(function(t){return t.nodeType===F?ot.test(t.data):"IMG"===t.nodeName})),Dt=function(t,e){var n,r=t.startContainer,i=t.startOffset;if(Ot.root=null,r.nodeType===F){if(i)return!1;n=r}else if((n=vt(r,i))&&!h(e,n)&&(n=null),!n&&((n=_t(r,i)).nodeType===F&&n.length))return!1;return Ot.currentNode=n,Ot.root=It(t,e),!Ot.previousNode()},Rt=function(t,e){var n,r=t.endContainer,i=t.endOffset;if(Ot.root=null,r.nodeType===F){if((n=r.data.length)&&i-1||!Y&&at.call(i,"text/plain")>-1&&at.call(i,"text/rtf")<0))return t.preventDefault(),void(!l&&(o=a.getData("text/html"))?this.insertHTML(o,!0):((o=a.getData("text/plain"))||(o=a.getData("text/uri-list")))&&this.insertPlainText(o,!0));this._awaitingPaste=!0;var p=this._doc.body,m=this.getSelection(),h=m.startContainer,_=m.startOffset,g=m.endContainer,E=m.endOffset,b=this.createElement("DIV",{contenteditable:"true",style:"position:fixed; overflow:hidden; top:0; right:100%; width:1px; height:1px;"});p.appendChild(b),m.selectNodeContents(b),this.setSelection(m),setTimeout((function(){try{f._awaitingPaste=!1;for(var t,e,n="",r=b;b=r;)r=b.nextSibling,v(b),(t=b.firstChild)&&t===b.lastChild&&"DIV"===t.nodeName&&(b=t),n+=b.innerHTML;e=f.createRange(h,_,g,E),f.setSelection(e),n&&f.insertHTML(n,!0)}catch(t){f.didError(t)}}),0)}},te=function(t){for(var e=t.dataTransfer.types,n=e.length,r=!1,i=!1;n--;)switch(e[n]){case"text/plain":r=!0;break;case"text/html":i=!0;break;default:return}(i||r)&&this.saveUndoState()},ee=A.prototype,ne=function(t,e,n){var r=n._doc,i=t?DOMPurify.sanitize(t,{ALLOW_UNKNOWN_PROTOCOLS:!0,WHOLE_DOCUMENT:!1,RETURN_DOM:!0,RETURN_DOM_FRAGMENT:!0}):null;return i?r.importNode(i,!0):r.createDocumentFragment()};ee.setConfig=function(t){return(t=R({blockTag:"DIV",blockAttributes:null,tagAttributes:{blockquote:null,ul:null,ol:null,li:null,a:null},classNames:{colour:"colour",fontFamily:"font",fontSize:"size",highlight:"highlight"},leafNodeNames:ut,undo:{documentSizeThreshold:-1,undoLimit:-1},isInsertedHTMLSanitized:!0,isSetHTMLSanitized:!0,sanitizeToDOMFragment:"undefined"!=typeof DOMPurify&&DOMPurify.isSupported?ne:null,willCutCopy:null},t,!0)).blockTag=t.blockTag.toUpperCase(),this._config=t,this},ee.createElement=function(t,e,n){return b(this._doc,t,e,n)},ee.createDefaultBlock=function(t){var e=this._config;return y(this.createElement(e.blockTag,e.blockAttributes,t),this._root)},ee.didError=function(t){console.log(t)},ee.getDocument=function(){return this._doc},ee.getRoot=function(){return this._root},ee.modifyDocument=function(t){var e=this._mutation;e&&(e.takeRecords().length&&this._docWasChanged(),e.disconnect()),this._ignoreAllChanges=!0,t(),this._ignoreAllChanges=!1,e&&(e.observe(this._root,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),this._ignoreChange=!1)};var re={pathChange:1,select:1,input:1,undoStateChange:1};ee.fireEvent=function(t,e){var n,r,i,o=this._events[t];if(/^(?:focus|blur)/.test(t))if(n=this._root===this._doc.activeElement,"focus"===t){if(!n||this._isFocused)return this;this._isFocused=!0}else{if(n||!this._isFocused)return this;this._isFocused=!1}if(o)for(e||(e={}),e.type!==t&&(e.type=t),r=(o=o.slice()).length;r--;){i=o[r];try{i.handleEvent?i.handleEvent(e):i.call(this,e)}catch(e){e.details="Squire: fireEvent error. Event type: "+t,this.didError(e)}}return this},ee.destroy=function(){var t,e=this._events;for(t in e)this.removeEventListener(t);this._mutation&&this._mutation.disconnect(),delete this._root.__squire__,this._undoIndex=-1,this._undoStack=[],this._undoStackLength=0},ee.handleEvent=function(t){this.fireEvent(t.type,t)},ee.addEventListener=function(t,e){var n=this._events[t],r=this._root;return e?(n||(n=this._events[t]=[],re[t]||("selectionchange"===t&&(r=this._doc),r.addEventListener(t,this,!0))),n.push(e),this):(this.didError({name:"Squire: addEventListener with null or undefined fn",message:"Event type: "+t}),this)},ee.removeEventListener=function(t,e){var n,r=this._events[t],i=this._root;if(r){if(e)for(n=r.length;n--;)r[n]===e&&r.splice(n,1);else r.length=0;r.length||(delete this._events[t],re[t]||("selectionchange"===t&&(i=this._doc),i.removeEventListener(t,this,!0)))}return this},ee.createRange=function(t,e,n,r){if(t instanceof this._win.Range)return t.cloneRange();var i=this._doc.createRange();return i.setStart(t,e),n?i.setEnd(n,r):i.setEnd(t,e),i},ee.getCursorPosition=function(t){if(!t&&!(t=this.getSelection())||!t.getBoundingClientRect)return null;var e,n,r=t.getBoundingClientRect();return r&&!r.top&&(this._ignoreChange=!0,(e=this._doc.createElement("SPAN")).textContent=G,gt(t,e),r=e.getBoundingClientRect(),(n=e.parentNode).removeChild(e),w(n,t)),r},ee._moveCursorTo=function(t){var e=this._root,n=this.createRange(e,t?0:e.childNodes.length);return Tt(n),this.setSelection(n),this},ee.moveCursorToStart=function(){return this._moveCursorTo(!0)},ee.moveCursorToEnd=function(){return this._moveCursorTo(!1)};var ie=function(t){return t._win.getSelection()||null};ee.setSelection=function(t){if(t)if(this._lastSelection=t,this._isFocused)if($&&!this._restoreSelection)N.call(this),this.blur(),this.focus();else{V&&this._win.focus();var e=ie(this);e&&(e.removeAllRanges(),e.addRange(t))}else N.call(this);return this},ee.getSelection=function(){var t,e,n,r,o=ie(this),a=this._root;return this._isFocused&&o&&o.rangeCount&&(e=(t=o.getRangeAt(0).cloneRange()).startContainer,n=t.endContainer,e&&i(e)&&t.setStartBefore(e),n&&i(n)&&t.setEndBefore(n)),t&&h(a,t.commonAncestorContainer)?this._lastSelection=t:h((r=(t=this._lastSelection).commonAncestorContainer).ownerDocument,r)||(t=null),t||(t=this.createRange(a.firstChild,0)),t},ee.getSelectedText=function(){var t=this.getSelection();if(!t||t.collapsed)return"";var e,n=new r(t.commonAncestorContainer,4|U,(function(e){return Ct(t,e,!0)})),i=t.startContainer,o=t.endContainer,s=n.currentNode=i,l="",c=!1;for(n.filter(s)||(s=n.nextNode());s;)s.nodeType===F?(e=s.data)&&/\S/.test(e)&&(s===o&&(e=e.slice(0,t.endOffset)),s===i&&(e=e.slice(t.startOffset)),l+=e,c=!0):("BR"===s.nodeName||c&&!a(s))&&(l+="\n",c=!1),s=n.nextNode();return l},ee.getPath=function(){return this._path};var oe=function(t,e){for(var n,i,o,s=new r(t,4);i=s.nextNode();)for(;(o=i.data.indexOf(G))>-1&&(!e||i.parentNode!==e);){if(1===i.length){do{(n=i.parentNode).removeChild(i),i=n,s.currentNode=n}while(a(i)&&!_(i));break}i.deleteData(o,1)}};ee._didAddZWS=function(){this._hasZWS=!0},ee._removeZWS=function(){this._hasZWS&&(oe(this._root),this._hasZWS=!1)},ee._updatePath=function(t,e){if(t){var n,r=t.startContainer,i=t.endContainer;(e||r!==this._lastAnchorNode||i!==this._lastFocusNode)&&(this._lastAnchorNode=r,this._lastFocusNode=i,n=r&&i?r===i?function t(e,n,r){var i,o,a,s,l,c="";return e&&e!==n&&(c=t(e.parentNode,n,r),e.nodeType===L&&(c+=(c?">":"")+e.nodeName,(i=e.id)&&(c+="#"+i),(o=e.className.trim())&&((a=o.split(/\s\s*/)).sort(),c+=".",c+=a.join(".")),(s=e.dir)&&(c+="[dir="+s+"]"),a&&(l=r.classNames,at.call(a,l.highlight)>-1&&(c+="[backgroundColor="+e.style.backgroundColor.replace(/ /g,"")+"]"),at.call(a,l.colour)>-1&&(c+="[color="+e.style.color.replace(/ /g,"")+"]"),at.call(a,l.fontFamily)>-1&&(c+="[fontFamily="+e.style.fontFamily.replace(/ /g,"")+"]"),at.call(a,l.fontSize)>-1&&(c+="[fontSize="+e.style.fontSize+"]")))),c}(i,this._root,this._config):"(selection)":"",this._path!==n&&(this._path=n,this.fireEvent("pathChange",{path:n}))),this.fireEvent(t.collapsed?"cursor":"select",{range:t})}},ee._updatePathOnEvent=function(t){var e=this;e._isFocused&&!e._willUpdatePath&&(e._willUpdatePath=!0,setTimeout((function(){e._willUpdatePath=!1,e._updatePath(e.getSelection())}),0))},ee.focus=function(){if(Z){try{this._root.setActive()}catch(t){}this.fireEvent("focus")}else this._root.focus();return this},ee.blur=function(){return this._root.blur(),Z&&this.fireEvent("blur"),this};var ae="squire-selection-end";ee._saveRangeToBookmark=function(t){var e,n=this.createElement("INPUT",{id:"squire-selection-start",type:"hidden"}),r=this.createElement("INPUT",{id:ae,type:"hidden"});gt(t,n),t.collapse(!1),gt(t,r),2&n.compareDocumentPosition(r)&&(n.id=ae,r.id="squire-selection-start",e=n,n=r,r=e),t.setStartAfter(n),t.setEndBefore(r)},ee._getRangeAndRemoveBookmark=function(t){var e=this._root,n=e.querySelector("#squire-selection-start"),r=e.querySelector("#"+ae);if(n&&r){var i=n.parentNode,o=r.parentNode,a=at.call(i.childNodes,n),s=at.call(o.childNodes,r);i===o&&(s-=1),v(n),v(r),t||(t=this._doc.createRange()),t.setStart(i,a),t.setEnd(o,s),w(i,t),i!==o&&w(o,t),t.collapsed&&((i=t.startContainer).nodeType===F&&((o=i.childNodes[t.startOffset])&&o.nodeType===F||(o=i.childNodes[t.startOffset-1]),o&&o.nodeType===F&&(t.setStart(o,0),t.collapse(!0))))}return t||null},ee._keyUpDetectChange=function(t){var e=t.keyCode;t.ctrlKey||t.metaKey||t.altKey||!(e<16||e>20)||!(e<33||e>45)||this._docWasChanged()},ee._docWasChanged=function(){if(it&&(ht=new WeakMap),!this._ignoreAllChanges){if(rt&&this._ignoreChange)return void(this._ignoreChange=!1);this._isInUndoState&&(this._isInUndoState=!1,this.fireEvent("undoStateChange",{canUndo:!0,canRedo:!1})),this.fireEvent("input")}},ee._recordUndoState=function(t,e){if(!this._isInUndoState||e){var n,r=this._undoIndex,i=this._undoStack,o=this._config.undo,a=o.documentSizeThreshold,s=o.undoLimit;e||(r+=1),r-1&&2*n.length>a&&s>-1&&r>s&&(i.splice(0,r-s),r=s,this._undoStackLength=s),i[r]=n,this._undoIndex=r,this._undoStackLength+=1,this._isInUndoState=!0}},ee.saveUndoState=function(t){return t===n&&(t=this.getSelection()),this._recordUndoState(t,this._isInUndoState),this._getRangeAndRemoveBookmark(t),this},ee.undo=function(){if(0!==this._undoIndex||!this._isInUndoState){this._recordUndoState(this.getSelection(),!1),this._undoIndex-=1,this._setHTML(this._undoStack[this._undoIndex]);var t=this._getRangeAndRemoveBookmark();t&&this.setSelection(t),this._isInUndoState=!0,this.fireEvent("undoStateChange",{canUndo:0!==this._undoIndex,canRedo:!0}),this.fireEvent("input")}return this},ee.redo=function(){var t=this._undoIndex,e=this._undoStackLength;if(t+1u&&d.splitText(u),d===s&&c&&(d=d.splitText(c),l===s&&(l=d,u-=c),s=d,c=0),g(d,i=this.createElement(t,e)),i.appendChild(d))}while(o.nextNode());l.nodeType!==F&&(d.nodeType===F?(l=d,u=d.length):(l=d.parentNode,u=1)),n=this.createRange(s,c,l,u)}return n},ee._removeFormat=function(t,e,n,r){this._saveRangeToBookmark(n);var i,o=this._doc;n.collapsed&&(et?(i=o.createTextNode(G),this._didAddZWS()):i=o.createTextNode(""),gt(n,i));for(var s=n.commonAncestorContainer;a(s);)s=s.parentNode;var l=n.startContainer,c=n.startOffset,u=n.endContainer,d=n.endOffset,f=[],m=function(t,e){if(!Ct(n,t,!1)){var r,i,o=t.nodeType===F;if(!Ct(n,t,!0))return void("INPUT"===t.nodeName||o&&!t.data||f.push([e,t]));if(o)t===u&&d!==t.length&&f.push([e,t.splitText(d)]),t===l&&c&&(t.splitText(c),f.push([e,t]));else for(r=t.firstChild;r;r=i)i=r.nextSibling,m(r,e)}},h=Array.prototype.filter.call(s.getElementsByTagName(t),(function(r){return Ct(n,r,!0)&&p(r,t,e)}));return r||h.forEach((function(t){m(t,t)})),f.forEach((function(t){var e=t[0].cloneNode(!1),n=t[1];g(n,e),e.appendChild(n)})),h.forEach((function(t){g(t,E(t))})),this._getRangeAndRemoveBookmark(n),i&&n.collapse(!1),w(s,n),n},ee.changeFormat=function(t,e,n,r){return n||(n=this.getSelection())?(this.saveUndoState(n),e&&(n=this._removeFormat(e.tag.toUpperCase(),e.attributes||{},n,r)),t&&(n=this._addFormat(t.tag.toUpperCase(),t.attributes||{},n)),this.setSelection(n),this._updatePath(n,!0),rt||this._docWasChanged(),this):this};var se={DT:"DD",DD:"DT",LI:"LI",PRE:"PRE"},le=function(t,e,n,r){var i=se[e.nodeName],o=null,a=T(n,r,e.parentNode,t._root),s=t._config;return i||(i=s.blockTag,o=s.blockAttributes),p(a,i,o)||(e=b(a.ownerDocument,i,o),a.dir&&(e.dir=a.dir),g(a,e),e.appendChild(E(a)),a=e),a};ee.forEachBlock=function(t,e,n){if(!n&&!(n=this.getSelection()))return this;e&&this.saveUndoState(n);var r=this._root,i=It(n,r),o=St(n,r);if(i&&o)do{if(t(i)||i===o)break}while(i=d(i,r));return e&&(this.setSelection(n),this._updatePath(n,!0),rt||this._docWasChanged()),this},ee.modifyBlocks=function(t,e){if(!e&&!(e=this.getSelection()))return this;this._recordUndoState(e,this._isInUndoState);var n,r=this._root;return At(e,r),wt(e,r,r,r),n=Et(e,r,r),gt(e,t.call(this,n)),e.endOffset]+|\([^\s()<>]+\))+(?:\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))|([\w\-.%+]+@(?:[\w\-]+\.)+[A-Z]{2,}\b)(?:\?[^&?\s]+=[^&?\s]+(?:&[^&?\s]+=[^&?\s]+)*)?/i;var pe=function(t,e,n){var i,o,a,s,l,c,u,d=t.ownerDocument,f=new r(t,4,(function(t){return!m(t,e,"A")})),p=n.linkRegExp,h=n._config.tagAttributes.a;if(p)for(;i=f.nextNode();)for(o=i.data,a=i.parentNode;s=p.exec(o);)c=(l=s.index)+s[0].length,l&&(u=d.createTextNode(o.slice(0,l)),a.insertBefore(u,i)),(u=n.createElement("A",R({href:s[1]?/^(?:ht|f)tps?:/i.test(s[1])?s[1]:"http://"+s[1]:"mailto:"+s[0]},h,!1))).textContent=o.slice(l,c),a.insertBefore(u,i),i.data=o=o.slice(c)};ee.insertHTML=function(t,e){var n,r,i,o,a,s,l,c=this._config,u=c.isInsertedHTMLSanitized?c.sanitizeToDOMFragment:null,f=this.getSelection(),p=this._doc;"function"==typeof u?o=u(t,e,this):(e&&(n=t.indexOf("\x3c!--StartFragment--\x3e"),r=t.lastIndexOf("\x3c!--EndFragment--\x3e"),n>-1&&r>-1&&(t=t.slice(n+20,r))),/<\/td>((?!<\/tr>)[\s\S])*$/i.test(t)&&(t=""+t+""),/<\/tr>((?!<\/table>)[\s\S])*$/i.test(t)&&(t=""+t+"
"),(i=this.createElement("DIV")).innerHTML=t,(o=p.createDocumentFragment()).appendChild(E(i))),this.saveUndoState(f);try{for(a=this._root,s=o,l={fragment:o,preventDefault:function(){this.defaultPrevented=!0},defaultPrevented:!1},pe(o,o,this),jt(o,c),Xt(o,a,!1),zt(o),o.normalize();s=d(s,o);)y(s,a);e&&this.fireEvent("willPaste",l),l.defaultPrevented||(yt(f,l.fragment,a),rt||this._docWasChanged(),f.collapse(!1),this._ensureBottomLine()),this.setSelection(f),this._updatePath(f,!0),e&&this.focus()}catch(t){this.didError(t)}return this};var me=function(t){return t.split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""")};ee.insertPlainText=function(t,e){var n=this.getSelection();if(n.collapsed&&m(n.startContainer,this._root,"PRE")){var r,i,o=n.startContainer,a=n.startOffset;return o&&o.nodeType===F||(r=this._doc.createTextNode(""),o.insertBefore(r,o.childNodes[a]),o=r,a=0),i={text:t,preventDefault:function(){this.defaultPrevented=!0},defaultPrevented:!1},e&&this.fireEvent("willPaste",i),i.defaultPrevented||(t=i.text,o.insertData(a,t),n.setStart(o,a+t.length),n.collapse(!0)),this.setSelection(n),this}var s,l,c,u,d=t.split("\n"),f=this._config,p=f.blockTag,h=f.blockAttributes,_="",v="<"+p;for(s in h)v+=" "+s+'="'+me(h[s])+'"';for(v+=">",l=0,c=d.length;l")+_;return this.insertHTML(d.join(""),e)};var he=function(t,e,n){return function(){return this[t](e,n),this.focus()}};ee.addStyles=function(t){if(t){var e=this._doc.documentElement.firstChild,n=this.createElement("STYLE",{type:"text/css"});n.appendChild(this._doc.createTextNode(t)),e.appendChild(n)}return this},ee.bold=he("changeFormat",{tag:"B"}),ee.italic=he("changeFormat",{tag:"I"}),ee.underline=he("changeFormat",{tag:"U"}),ee.strikethrough=he("changeFormat",{tag:"S"}),ee.subscript=he("changeFormat",{tag:"SUB"},{tag:"SUP"}),ee.superscript=he("changeFormat",{tag:"SUP"},{tag:"SUB"}),ee.removeBold=he("changeFormat",null,{tag:"B"}),ee.removeItalic=he("changeFormat",null,{tag:"I"}),ee.removeUnderline=he("changeFormat",null,{tag:"U"}),ee.removeStrikethrough=he("changeFormat",null,{tag:"S"}),ee.removeSubscript=he("changeFormat",null,{tag:"SUB"}),ee.removeSuperscript=he("changeFormat",null,{tag:"SUP"}),ee.makeLink=function(t,e){var n=this.getSelection();if(n.collapsed){var r=t.indexOf(":")+1;if(r)for(;"/"===t[r];)r+=1;gt(n,this._doc.createTextNode(t.slice(r)))}return e=R(R({href:t},e,!0),this._config.tagAttributes.a,!1),this.changeFormat({tag:"A",attributes:e},{tag:"A"},n),this.focus()},ee.removeLink=function(){return this.changeFormat(null,{tag:"A"},this.getSelection(),!0),this.focus()},ee.setFontFace=function(t){var e=this._config.classNames.fontFamily;return this.changeFormat(t?{tag:"SPAN",attributes:{class:e,style:"font-family: "+t+", sans-serif;"}}:null,{tag:"SPAN",attributes:{class:e}}),this.focus()},ee.setFontSize=function(t){var e=this._config.classNames.fontSize;return this.changeFormat(t?{tag:"SPAN",attributes:{class:e,style:"font-size: "+("number"==typeof t?t+"px":t)}}:null,{tag:"SPAN",attributes:{class:e}}),this.focus()},ee.setTextColour=function(t){var e=this._config.classNames.colour;return this.changeFormat(t?{tag:"SPAN",attributes:{class:e,style:"color:"+t}}:null,{tag:"SPAN",attributes:{class:e}}),this.focus()},ee.setHighlightColour=function(t){var e=this._config.classNames.highlight;return this.changeFormat(t?{tag:"SPAN",attributes:{class:e,style:"background-color:"+t}}:t,{tag:"SPAN",attributes:{class:e}}),this.focus()},ee.setTextAlignment=function(t){return this.forEachBlock((function(e){var n=e.className.split(/\s+/).filter((function(t){return!!t&&!/^align/.test(t)})).join(" ");t?(e.className=n+" align-"+t,e.style.textAlign=t):(e.className=n,e.style.textAlign="")}),!0),this.focus()},ee.setTextDirection=function(t){return this.forEachBlock((function(e){t?e.dir=t:e.removeAttribute("dir")}),!0),this.focus()};var _e=function(t){for(var e,n=this._root,i=this._doc,o=i.createDocumentFragment(),a=c(t,n);e=a.nextNode();){var s,l,u=e.querySelectorAll("BR"),d=[],f=u.length;for(s=0;s-1;)a.appendChild(l.createTextNode(o.slice(0,s))),a.appendChild(l.createElement("BR")),o=o.slice(s+1);i.parentNode.insertBefore(a,i),i.data=o}C(e,c),g(e,E(e))}return t};ee.code=function(){var t=this.getSelection();return t.collapsed||l(t.commonAncestorContainer)?this.modifyBlocks(_e,t):this.changeFormat({tag:"CODE",attributes:this._config.tagAttributes.code},null,t),this.focus()},ee.removeCode=function(){var t=this.getSelection();return m(t.commonAncestorContainer,this._root,"PRE")?this.modifyBlocks(ve,t):this.changeFormat(null,{tag:"CODE"},t),this.focus()},ee.toggleCode=function(){return this.hasFormat("PRE")||this.hasFormat("CODE")?this.removeCode():this.code(),this},ee.removeAllFormatting=function(t){if(!t&&!(t=this.getSelection())||t.collapsed)return this;for(var e=this._root,n=t.commonAncestorContainer;n&&!s(n);)n=n.parentNode;if(n||(At(t,e),n=e),n.nodeType===F)return this;this.saveUndoState(t),wt(t,n,n,e);for(var r,i,o=n.ownerDocument,a=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,d=o.createDocumentFragment(),f=o.createDocumentFragment(),p=T(c,u,n,e),m=T(a,l,n,e);m!==p;)r=m.nextSibling,d.appendChild(m),m=r;return P(this,d,f),f.normalize(),m=f.firstChild,r=f.lastChild,i=n.childNodes,m?(n.insertBefore(f,p),l=at.call(i,m),u=at.call(i,r)+1):u=l=at.call(i,p),t.setStart(n,l),t.setEnd(n,u),w(n,t),Tt(t),this.setSelection(t),this._updatePath(t,!0),this.focus()},ee.increaseQuoteLevel=he("modifyBlocks",(function(t){return this.createElement("BLOCKQUOTE",this._config.tagAttributes.blockquote,[t])})),ee.decreaseQuoteLevel=he("modifyBlocks",ce),ee.makeUnorderedList=he("modifyBlocks",(function(t){return de(this,t,"UL"),t})),ee.makeOrderedList=he("modifyBlocks",(function(t){return de(this,t,"OL"),t})),ee.removeList=he("modifyBlocks",(function(t){var e,n,r,i,o,a=t.querySelectorAll("UL, OL"),l=t.querySelectorAll("LI"),c=this._root;for(e=0,n=a.length;e-1:t.form.is_private},on:{change:function(e){var n=t.form.is_private,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_private",n.concat([null])):o>-1&&t.$set(t.form,"is_private",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_private",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_private",dusk:"link-form-private"}},[t._v(t._s(t.__("Is private?")))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-4"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_pinned,expression:"form.is_pinned"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_pinned",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_pinned)?t._i(t.form.is_pinned,null)>-1:t.form.is_pinned},on:{change:function(e){var n=t.form.is_pinned,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_pinned",n.concat([null])):o>-1&&t.$set(t.form,"is_pinned",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_pinned",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_pinned",dusk:"link-form-pinned"}},[t._v(t._s(t.__("Is pinned?")))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-4"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_watched,expression:"form.is_watched"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_watched",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_watched)?t._i(t.form.is_watched,null)>-1:t.form.is_watched},on:{change:function(e){var n=t.form.is_watched,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_watched",n.concat([null])):o>-1&&t.$set(t.form,"is_watched",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_watched",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_watched",dusk:"link-is-watched"}},[t._v(t._s(t.__("Monitor link's health?")))])])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Tags")))]),t._v(" "),n("tags",{attrs:{dusk:"link-form-tags"},model:{value:t.form.tags,callback:function(e){t.$set(t.form,"tags",e)},expression:"form.tags"}})],1)]),t._v(" "),n("div",{staticClass:"card-footer d-flex justify-content-between"},[n("div",[n("div",{staticClass:"btn-group"},[n("button",{staticClass:"btn btn-primary",class:{"btn-danger":t.hasChanged},attrs:{type:"button",disabled:t.loading,dusk:"link-form-save"},on:{click:function(e){return e.preventDefault(),t.submit("edit")}}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Save"))+"\n ")]),t._v(" "),n("button",{staticClass:"btn btn-primary dropdown-toggle dropdown-toggle-split",class:{"btn-danger":t.hasChanged},attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",dusk:"link-form-save-dropdown"}}),t._v(" "),n("div",{staticClass:"dropdown-menu"},[n("button",{staticClass:"dropdown-item",attrs:{type:"button",dusk:"link-form-save-view"},on:{click:function(e){return e.preventDefault(),t.submit("view")}}},[t._v(t._s(t.__("Save & View")))]),t._v(" "),n("button",{staticClass:"dropdown-item",attrs:{type:"button",dusk:"link-form-save-new"},on:{click:function(e){return e.preventDefault(),t.submit("new")}}},[t._v(t._s(t.__("Save & New")))])])]),t._v(" "),t.link?n("button",{staticClass:"btn btn-outline-primary",attrs:{type:"button"},on:{click:t.openArchive}},[t._v(t._s(t.__("Archive")))]):t._e(),t._v(" "),t.link?n("a",{staticClass:"btn btn-outline-primary",attrs:{href:t.link.permalink}},[t._v(t._s(t.__("View")))]):t._e()]),t._v(" "),t._t("actions")],2),t._v(" "),n("modal",{attrs:{open:t.archiving,size:"lg"},on:{closed:function(e){t.archiving=!1}},scopedSlots:t._u([{key:"header",fn:function(){return[t._v(t._s(t.__("Archive")))]},proxy:!0},{key:"content",fn:function(){return[n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-md-6"},[n("h4",[t._v(t._s(t.__("Current archive")))]),t._v(" "),t.archive.download?n("p",[n("a",{staticClass:"btn btn-sm btn-primary text-white btn-block",attrs:{href:t.link.url_download}},[t._v(t._s(t.__("Download")))]),t._v(" "),n("confirm",{staticClass:"btn btn-sm btn-danger text-white btn-block",attrs:{text:t.__("Delete"),"text-confirm":t.__("Confirm")},on:{confirmed:t.deleteArchive}})],1):n("div",{staticClass:"alert alert-info"},[t._v("\n "+t._s(t.__("Archive does not exist"))+"\n ")])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6"},[n("h4",[t._v(t._s(t.__("New archive")))]),t._v(" "),t.archive.providers.length>0?n("p",[-1!==t.archive.providers.indexOf("media")?n("button",{staticClass:"btn btn-sm btn-primary btn-block",attrs:{name:"type"},on:{click:function(e){return t.askArchive("media")}}},[t._v(t._s(t.__("Archive as Media")))]):t._e(),t._v(" "),-1!==t.archive.providers.indexOf("pdf")?n("button",{staticClass:"btn btn-sm btn-primary btn-block",attrs:{name:"type"},on:{click:function(e){return t.askArchive("pdf")}}},[t._v(t._s(t.__("Archive as PDF")))]):t._e()]):n("div",{staticClass:"alert alert-info"},[t._v("\n "+t._s(t.__("No provider found to archive this link"))+"\n ")])])])]},proxy:!0}])})],1)}),[],!1,null,null,null);e.default=c.exports},ui2e:function(t,e,n){"use strict";n.r(e);var r={props:{version:{type:Object,required:!0}},data:function(){return{open:!1}},mounted:function(){this.shouldShowNotification()&&this.notify()},methods:{notify:function(){var t=this;this.$toasted.info(this.__("New version :version available",{version:this.version.id}),{position:"bottom-right",action:[{text:this.__("View"),onClick:function(e,n){n.goAway(0),t.open=!0}},{text:this.__("Hide"),onClick:function(e,n){n.goAway(0),t.dismiss()}}]})},dismiss:function(){localStorage.setItem("hideNotifierUntil",this.getTimestamp()+600)},shouldShowNotification:function(){if(null===this.version||!1===this.version.is_new)return!1;var t=localStorage.getItem("hideNotifierUntil")||null;return!(t&&t>this.getTimestamp())},getTimestamp:function(){return Date.now()/1e3|0}},computed:{hasNewVersion:function(){return this.version&&this.version.is_new}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.hasNewVersion?n("modal",{attrs:{open:t.open,size:"lg"},on:{closed:function(e){t.open=!1}},scopedSlots:t._u([{key:"header",fn:function(){return[n("span",{staticClass:"badge badge-success"},[t._v("New")]),t._v(" "+t._s(t.version.id)+"\n ")]},proxy:!0},{key:"content",fn:function(){return[n("div",{domProps:{innerHTML:t._s(t.version.changelog)}})]},proxy:!0},{key:"footer",fn:function(){return[n("a",{staticClass:"btn btn-primary",attrs:{href:t.version.link,target:"_blank"}},[n("i",{staticClass:"fas fa-external-link-square-alt mr-1"}),t._v(" "+t._s(t.__("View"))+"\n ")])]},proxy:!0}],null,!1,481153869)}):t._e()],1)}),[],!1,null,null,null);e.default=o.exports},uuIC:function(t,e,n){"use strict";n.r(e);var r={props:{open:{type:Boolean,required:!1,default:!1},id:{type:String,required:!1,default:"modal"},size:{type:String,required:!1,default:""}},methods:{createModal:function(){var t=this;this.$nextTick((function(){var e=$("#".concat(t.id));e.modal({keyboard:!1,show:!0}),e.on("hidden.bs.modal",(function(e){t.deleteModal()})),t.$emit("opened")}))},deleteModal:function(){$("#".concat(this.id)).modal("dispose"),$("div.modal-backdrop").remove(),$("body.modal-open").removeClass("modal-open"),this.$emit("closed")}},watch:{open:function(t){!0===t?this.createModal():this.deleteModal()}},computed:{hasHeader:function(){return this.$slots.hasOwnProperty("header")},hasFooter:function(){return this.$slots.hasOwnProperty("footer")}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.open?n("div",{staticClass:"modal fade",attrs:{id:t.id,role:"dialog"}},[n("div",{staticClass:"modal-dialog modal-dialog-centered",class:{"modal-lg":"lg"===t.size,"modal-xl":"xl"===t.size,"modal-sm":"sm"===t.size},attrs:{role:"document"}},[n("div",{staticClass:"modal-content",class:{"border-0":!t.hasHeader&&!t.hasFooter}},[t.hasHeader?n("div",{staticClass:"modal-header"},[n("h5",{staticClass:"modal-title"},[t._t("header")],2),t._v(" "),t._m(0)]):t._e(),t._v(" "),n("div",{staticClass:"modal-body",class:{"p-0":!t.hasHeader&&!t.hasFooter}},[t._t("content")],2),t._v(" "),t.hasFooter?n("div",{staticClass:"modal-footer"},[t._t("footer")],2):t._e()])])]):t._e()}),[function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-label":"Close"}},[e("i",{staticClass:"fas fa-times"})])}],!1,null,null,null);e.default=o.exports},vciP:function(t,e,n){"use strict";n.r(e);var r={props:{prevent:{type:Boolean,required:!1,default:!0}},mounted:function(){var t=this;window.addEventListener("beforeunload",(function(e){!0===t.prevent&&(e.stopPropagation(),e.preventDefault(),e.returnValue="")}))}},i=n("KHd+"),o=Object(i.a)(r,void 0,void 0,!1,null,null,null);e.default=o.exports},wGJR:function(t,e,n){!function(t){"use strict";var e,n,r=function(t){return t instanceof HTMLElement},i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object.assign({},t),i=[],o=[],a=function(){return Object.assign({},r)},s=function(){var t=[].concat(i);return i.length=0,t},l=function(){var t=[].concat(o);o.length=0,t.forEach((function(t){var e=t.type,n=t.data;c(e,n)}))},c=function(t,e,n){n?o.push({type:t,data:e}):(p[t]&&p[t](e),i.push({type:t,data:e}))},u=function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:null;if(null===n)return t.getAttribute(e)||t.hasAttribute(e);t.setAttribute(e,n)},l="http://www.w3.org/2000/svg",c=["svg","path"],u=function(t){return c.includes(t)},d=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof e&&(n=e,e=null);var r=u(t)?document.createElementNS(l,t):document.createElement(t);return e&&(u(t)?s(r,"class",e):r.className=e),o(n,(function(t,e){s(r,t,e)})),r},f=function(t){return function(e,n){void 0!==n&&t.children[n]?t.insertBefore(e,t.children[n]):t.appendChild(e)}},p=function(t,e){return function(t,n){return void 0!==n?e.splice(n,0,t):e.push(t),t}},m=function(t,e){return function(n){return e.splice(e.indexOf(n),1),n.element.parentNode&&t.removeChild(n.element),n}},h=function(t,e,n,r){var i=n[0]||t.left,o=n[1]||t.top,a=i+t.width,s=o+t.height*(r[1]||1),l={element:Object.assign({},t),inner:{left:t.left,top:t.top,right:t.right,bottom:t.bottom},outer:{left:i,top:o,right:a,bottom:s}};return e.filter((function(t){return!t.isRectIgnored()})).map((function(t){return t.rect})).forEach((function(t){_(l.inner,Object.assign({},t.inner)),_(l.outer,Object.assign({},t.outer))})),v(l.inner),l.outer.bottom+=l.element.marginBottom,l.outer.right+=l.element.marginRight,v(l.outer),l},_=function(t,e){e.top+=t.top,e.right+=t.left,e.bottom+=t.top,e.left+=t.left,e.bottom>t.bottom&&(t.bottom=e.bottom),e.right>t.right&&(t.right=e.right)},v=function(t){t.width=t.right-t.left,t.height=t.bottom-t.top},g=function(t){return"number"==typeof t},E=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001;return Math.abs(t-e)0&&void 0!==arguments[0]?arguments[0]:{},e=t.stiffness,n=void 0===e?.5:e,r=t.damping,i=void 0===r?.75:r,o=t.mass,s=void 0===o?10:o,l=null,c=null,u=0,d=!1,f=function(){if(!d){if(!g(l)||!g(c))return d=!0,void(u=0);E(c+=u+=-(c-l)*n/s,l,u*=i)?(c=l,u=0,d=!0,m.onupdate(c),m.oncomplete(c)):m.onupdate(c)}},p=function(t){if(g(t)&&!g(c)&&(c=t),null===l&&(l=t,c=t),c===(l=t)||void 0===l)return d=!0,u=0,m.onupdate(c),void m.oncomplete(c);d=!1},m=a({interpolate:f,target:{set:p,get:function(){return l}},resting:{get:function(){return d}},onupdate:function(t){},oncomplete:function(t){}});return m},tween:function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.duration,i=void 0===r?500:r,o=n.easing,s=void 0===o?b:o,l=n.delay,c=void 0===l?0:l,u=null,d=!0,f=!1,p=null,m=function(n){d||null===p||(null===u&&(u=n),n-u=0?s(f?1-e:e):0)*p)):(t=1,e=f?0:1,h.onupdate(e*p),h.oncomplete(e*p),d=!0)))},h=a({interpolate:m,target:{get:function(){return f?0:p},set:function(t){if(null===p)return p=t,h.onupdate(t),void h.oncomplete(t);t3&&void 0!==arguments[3]&&arguments[3];(e=Array.isArray(e)?e:[e]).forEach((function(e){t.forEach((function(t){var i=t,o=function(){return n[t]},a=function(e){return n[t]=e};"object"==typeof t&&(i=t.key,o=t.getter||o,a=t.setter||a),e[i]&&!r||(e[i]={get:o,set:a})}))}))},w=function(t){return null!=t},I={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},S=function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!0;for(var n in e)if(e[n]!==t[n])return!0;return!1},O=function(t,e){var n=e.opacity,r=e.perspective,i=e.translateX,o=e.translateY,a=e.scaleX,s=e.scaleY,l=e.rotateX,c=e.rotateY,u=e.rotateZ,d=e.originX,f=e.originY,p=e.width,m=e.height,h="",_="";(w(d)||w(f))&&(_+="transform-origin: "+(d||0)+"px "+(f||0)+"px;"),w(r)&&(h+="perspective("+r+"px) "),(w(i)||w(o))&&(h+="translate3d("+(i||0)+"px, "+(o||0)+"px, 0) "),(w(a)||w(s))&&(h+="scale3d("+(w(a)?a:1)+", "+(w(s)?s:1)+", 1) "),w(u)&&(h+="rotateZ("+u+"rad) "),w(l)&&(h+="rotateX("+l+"rad) "),w(c)&&(h+="rotateY("+c+"rad) "),h.length&&(_+="transform:"+h+";"),w(n)&&(_+="opacity:"+n+";",0===n&&(_+="visibility:hidden;"),n<1&&(_+="pointer-events:none;")),w(m)&&(_+="height:"+m+"px;"),w(p)&&(_+="width:"+p+"px;");var v=t.elementCurrentStyle||"";_.length===v.length&&_===v||(t.style.cssText=_,t.elementCurrentStyle=_)},D={styles:function(t){var e=t.mixinConfig,n=t.viewProps,r=t.viewInternalAPI,i=t.viewExternalAPI,o=t.view,a=Object.assign({},n),s={};T(e,[r,i],n);var l=function(){return o.rect?h(o.rect,o.childViews,[n.translateX||0,n.translateY||0],[n.scaleX||0,n.scaleY||0]):null};return r.rect={get:l},i.rect={get:l},e.forEach((function(t){n[t]=void 0===a[t]?I[t]:a[t]})),{write:function(){if(S(s,n))return O(o.element,n),Object.assign(s,Object.assign({},n)),!0},destroy:function(){}}},listeners:function(t){t.mixinConfig,t.viewProps,t.viewInternalAPI;var e,n=t.viewExternalAPI,r=(t.viewState,t.view),i=[],o=(e=r.element,function(t,n){e.addEventListener(t,n)}),a=function(t){return function(e,n){t.removeEventListener(e,n)}}(r.element);return n.on=function(t,e){i.push({type:t,fn:e}),o(t,e)},n.off=function(t,e){i.splice(i.findIndex((function(n){return n.type===t&&n.fn===e})),1),a(t,e)},{write:function(){return!0},destroy:function(){i.forEach((function(t){a(t.type,t.fn)}))}}},animations:function(t){var e=t.mixinConfig,n=t.viewProps,r=t.viewInternalAPI,i=t.viewExternalAPI,a=(t.viewState,Object.assign({},n)),s=[];return o(e,(function(t,e){var o=C(e);o&&(o.onupdate=function(e){n[t]=e},o.target=a[t],T([{key:t,setter:function(t){o.target!==t&&(o.target=t)},getter:function(){return n[t]}}],[r,i],n,!0),s.push(o))})),{write:function(t){var e=!0;return s.forEach((function(n){n.resting||(e=!1),n.interpolate(t)})),e},destroy:function(){}}},apis:function(t){var e=t.mixinConfig,n=t.viewProps,r=t.viewExternalAPI;T(e,r,n)}},R=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.layoutCalculated||(t.paddingTop=parseInt(n.paddingTop,10)||0,t.marginTop=parseInt(n.marginTop,10)||0,t.marginRight=parseInt(n.marginRight,10)||0,t.marginBottom=parseInt(n.marginBottom,10)||0,t.marginLeft=parseInt(n.marginLeft,10)||0,e.layoutCalculated=!0),t.left=e.offsetLeft||0,t.top=e.offsetTop||0,t.width=e.offsetWidth||0,t.height=e.offsetHeight||0,t.right=t.left+t.width,t.bottom=t.top+t.height,t.scrollTop=e.scrollTop,t.hidden=null===e.offsetParent,t},A=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.tag,n=void 0===e?"div":e,r=t.name,i=void 0===r?null:r,o=t.attributes,s=void 0===o?{}:o,l=t.read,c=void 0===l?function(){}:l,u=t.write,_=void 0===u?function(){}:u,v=t.create,g=void 0===v?function(){}:v,E=t.destroy,b=void 0===E?function(){}:E,y=t.filterFrameActionsForChild,C=void 0===y?function(t,e){return e}:y,T=t.didCreateView,w=void 0===T?function(){}:T,I=t.didWriteView,S=void 0===I?function(){}:I,O=t.ignoreRect,A=void 0!==O&&O,N=t.ignoreRectUpdate,k=void 0!==N&&N,x=t.mixins,P=void 0===x?[]:x;return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=d(n,"filepond--"+i,s),o=window.getComputedStyle(r,null),l=R(),u=null,v=!1,E=[],y=[],T={},I={},O=[_],N=[c],x=[b],L=function(){return r},F=function(){return E.concat()},M=function(){return T},B=function(t){return function(e,n){return e(t,n)}},U=function(){return u||(u=h(l,E,[0,0],[1,1]))},G=function(){return o},q=function(){u=null,E.forEach((function(t){return t._read()})),!(k&&l.width&&l.height)&&R(l,r,o);var t={root:W,props:e,rect:l};N.forEach((function(e){return e(t)}))},H=function(t,n,r){var i=0===n.length;return O.forEach((function(o){!1===o({props:e,root:W,actions:n,timestamp:t,shouldOptimize:r})&&(i=!1)})),y.forEach((function(e){!1===e.write(t)&&(i=!1)})),E.filter((function(t){return!!t.element.parentNode})).forEach((function(e){e._write(t,C(e,n),r)||(i=!1)})),E.forEach((function(e,o){e.element.parentNode||(W.appendChild(e.element,o),e._read(),e._write(t,C(e,n),r),i=!1)})),v=i,S({props:e,root:W,actions:n,timestamp:t}),i},$=function(){y.forEach((function(t){return t.destroy()})),x.forEach((function(t){t({root:W,props:e})})),E.forEach((function(t){return t._destroy()}))},V={element:{get:L},style:{get:G},childViews:{get:F}},j=Object.assign({},V,{rect:{get:U},ref:{get:M},is:function(t){return i===t},appendChild:f(r),createChildView:B(t),linkView:function(t){return E.push(t),t},unlinkView:function(t){E.splice(E.indexOf(t),1)},appendChildView:p(0,E),removeChildView:m(r,E),registerWriter:function(t){return O.push(t)},registerReader:function(t){return N.push(t)},registerDestroyer:function(t){return x.push(t)},invalidateLayout:function(){return r.layoutCalculated=!1},dispatch:t.dispatch,query:t.query}),z={element:{get:L},childViews:{get:F},rect:{get:U},resting:{get:function(){return v}},isRectIgnored:function(){return A},_read:q,_write:H,_destroy:$},Y=Object.assign({},V,{rect:{get:function(){return l}}});Object.keys(P).sort((function(t,e){return"styles"===t?1:"styles"===e?-1:0})).forEach((function(t){var n=D[t]({mixinConfig:P[t],viewProps:e,viewState:I,viewInternalAPI:j,viewExternalAPI:z,view:a(Y)});n&&y.push(n)}));var W=a(j);g({root:W,props:e});var X=r.children.length;return E.forEach((function(t,e){W.appendChild(t.element,X+e)})),w(W),a(z)}},N=function(t,e){return function(n){var r=n.root,i=n.props,o=n.actions,a=void 0===o?[]:o,s=n.timestamp,l=n.shouldOptimize;a.filter((function(e){return t[e.type]})).forEach((function(e){return t[e.type]({root:r,props:i,action:e.data,timestamp:s,shouldOptimize:l})})),e&&e({root:r,props:i,actions:a,timestamp:s,shouldOptimize:l})}},k=function(t,e){return e.parentNode.insertBefore(t,e)},x=function(t,e){return e.parentNode.insertBefore(t,e.nextSibling)},P=function(t){return Array.isArray(t)},L=function(t){return null==t},F=function(t){return t.trim()},M=function(t){return""+t},B=function(t){return"boolean"==typeof t},U=function(t){return B(t)?t:"true"===t},G=function(t){return"string"==typeof t},q=function(t){return g(t)?t:G(t)?M(t).replace(/[a-z]+/gi,""):0},H=function(t){return parseInt(q(t),10)},$=function(t){return parseFloat(q(t))},V=function(t){return g(t)&&isFinite(t)&&Math.floor(t)===t},j=function(t){if(V(t))return t;var e=M(t).trim();return/MB$/i.test(e)?(e=e.replace(/MB$i/,"").trim(),1e3*H(e)*1e3):/KB/i.test(e)?(e=e.replace(/KB$i/,"").trim(),1e3*H(e)):H(e)},z=function(t){return"function"==typeof t},Y={process:"POST",patch:"PATCH",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},W=function(t,e,n,r,i){if(null===e)return null;if("function"==typeof e)return e;var o={url:"GET"===n||"PATCH"===n?"?"+t+"=":"",method:n,headers:i,withCredentials:!1,timeout:r,onload:null,ondata:null,onerror:null};if(G(e))return o.url=e,o;if(Object.assign(o,e),G(o.headers)){var a=o.headers.split(/:(.+)/);o.headers={header:a[0],value:a[1]}}return o.withCredentials=U(o.withCredentials),o},X=function(t){return"object"==typeof t&&null!==t},K=function(t){return P(t)?"array":function(t){return null===t}(t)?"null":V(t)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(t)?"bytes":function(t){return X(t)&&G(t.url)&&X(t.process)&&X(t.revert)&&X(t.restore)&&X(t.fetch)}(t)?"api":typeof t},Q={array:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return L(t)?[]:P(t)?t:M(t).split(e).map(F).filter((function(t){return t.length}))},boolean:U,int:function(t){return"bytes"===K(t)?j(t):H(t)},number:$,float:$,bytes:j,string:function(t){return z(t)?t:M(t)},function:function(t){return function(t){for(var e=self,n=t.split("."),r=null;r=n.shift();)if(!(e=e[r]))return null;return e}(t)},serverapi:function(t){return(n={}).url=G(e=t)?e:e.url||"",n.timeout=e.timeout?parseInt(e.timeout,10):0,n.headers=e.headers?e.headers:{},o(Y,(function(t){n[t]=W(t,e[t],Y[t],n.timeout,n.headers)})),n.remove=e.remove||null,delete n.headers,n;var e,n},object:function(t){try{return JSON.parse(t.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'))}catch(t){return null}}},Z=function(t,e,n){if(t===e)return t;var r,i=K(t);if(i!==n){var o=(r=t,Q[n](r));if(i=K(o),null===o)throw'Trying to assign value with incorrect type to "'+option+'", allowed type: "'+n+'"';t=o}return t},J=function(t){var e={};return o(t,(function(n){var r,i,o,a=t[n];e[n]=(r=a[0],i=a[1],o=r,{enumerable:!0,get:function(){return o},set:function(t){o=Z(t,r,i)}})})),a(e)},tt=function(t){return{items:[],listUpdateTimeout:null,itemUpdateTimeout:null,processingQueue:[],options:J(t)}},et=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return t.split(/(?=[A-Z])/).map((function(t){return t.toLowerCase()})).join(e)},nt=function(t,e){var n={};return o(e,(function(e){n[e]={get:function(){return t.getState().options[e]},set:function(n){t.dispatch("SET_"+et(e,"_").toUpperCase(),{value:n})}}})),n},rt=function(t){return function(e,n,r){var i={};return o(t,(function(t){var n=et(t,"_").toUpperCase();i["SET_"+n]=function(i){try{r.options[t]=i.value}catch(t){}e("DID_SET_"+n,{value:r.options[t]})}})),i}},it=function(t){return function(e){var n={};return o(t,(function(t){n["GET_"+et(t,"_").toUpperCase()]=function(n){return e.options[t]}})),n}},ot=1,at=2,st=3,lt=4,ct=5,ut=function(){return Math.random().toString(36).substr(2,9)},dt=function(t,e){return t.splice(e,1)},ft=function(){var t=[],e=function(e,n){dt(t,t.findIndex((function(t){return t.event===e&&(t.cb===n||!n)})))};return{fire:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;iBrowse',yt.STRING],labelInvalidField:["Field contains invalid files",yt.STRING],labelFileWaitingForSize:["Waiting for size",yt.STRING],labelFileSizeNotAvailable:["Size not available",yt.STRING],labelFileCountSingular:["file in list",yt.STRING],labelFileCountPlural:["files in list",yt.STRING],labelFileLoading:["Loading",yt.STRING],labelFileAdded:["Added",yt.STRING],labelFileLoadError:["Error during load",yt.STRING],labelFileRemoved:["Removed",yt.STRING],labelFileRemoveError:["Error during remove",yt.STRING],labelFileProcessing:["Uploading",yt.STRING],labelFileProcessingComplete:["Upload complete",yt.STRING],labelFileProcessingAborted:["Upload cancelled",yt.STRING],labelFileProcessingError:["Error during upload",yt.STRING],labelFileProcessingRevertError:["Error during revert",yt.STRING],labelTapToCancel:["tap to cancel",yt.STRING],labelTapToRetry:["tap to retry",yt.STRING],labelTapToUndo:["tap to undo",yt.STRING],labelButtonRemoveItem:["Remove",yt.STRING],labelButtonAbortItemLoad:["Abort",yt.STRING],labelButtonRetryItemLoad:["Retry",yt.STRING],labelButtonAbortItemProcessing:["Cancel",yt.STRING],labelButtonUndoItemProcessing:["Undo",yt.STRING],labelButtonRetryItemProcessing:["Retry",yt.STRING],labelButtonProcessItem:["Upload",yt.STRING],iconRemove:['',yt.STRING],iconProcess:['',yt.STRING],iconRetry:['',yt.STRING],iconUndo:['',yt.STRING],iconDone:['',yt.STRING],oninit:[null,yt.FUNCTION],onwarning:[null,yt.FUNCTION],onerror:[null,yt.FUNCTION],onactivatefile:[null,yt.FUNCTION],onaddfilestart:[null,yt.FUNCTION],onaddfileprogress:[null,yt.FUNCTION],onaddfile:[null,yt.FUNCTION],onprocessfilestart:[null,yt.FUNCTION],onprocessfileprogress:[null,yt.FUNCTION],onprocessfileabort:[null,yt.FUNCTION],onprocessfilerevert:[null,yt.FUNCTION],onprocessfile:[null,yt.FUNCTION],onprocessfiles:[null,yt.FUNCTION],onremovefile:[null,yt.FUNCTION],onpreparefile:[null,yt.FUNCTION],onupdatefiles:[null,yt.FUNCTION],beforeDropFile:[null,yt.FUNCTION],beforeAddFile:[null,yt.FUNCTION],beforeRemoveFile:[null,yt.FUNCTION],stylePanelLayout:[null,yt.STRING],stylePanelAspectRatio:[null,yt.STRING],styleItemPanelAspectRatio:[null,yt.STRING],styleButtonRemoveItemPosition:["left",yt.STRING],styleButtonProcessItemPosition:["right",yt.STRING],styleLoadIndicatorPosition:["right",yt.STRING],styleProgressIndicatorPosition:["right",yt.STRING],files:[[],yt.ARRAY]},Dt=function(t,e){return L(e)?t[0]||null:V(e)?t[e]||null:("object"==typeof e&&(e=e.id),t.find((function(t){return t.id===e}))||null)},Rt=function(t){if(L(t))return t;if(/:/.test(t)){var e=t.split(":");return e[1]/e[0]}return parseFloat(t)},At=function(t){return t.filter((function(t){return!t.archived}))},Nt={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4},kt=[vt.LOAD_ERROR,vt.PROCESSING_ERROR,vt.PROCESSING_REVERT_ERROR],xt=[vt.LOADING,vt.PROCESSING,vt.PROCESSING_QUEUED,vt.INIT],Pt=[vt.PROCESSING_COMPLETE],Lt=function(t){return kt.includes(t.status)},Ft=function(t){return xt.includes(t.status)},Mt=function(t){return Pt.includes(t.status)},Bt=function(t){return{GET_STATUS:function(){var e=At(t.items),n=Nt.EMPTY,r=Nt.ERROR,i=Nt.BUSY,o=Nt.IDLE,a=Nt.READY;return 0===e.length?n:e.some(Lt)?r:e.some(Ft)?i:e.some(Mt)?a:o},GET_ITEM:function(e){return Dt(t.items,e)},GET_ACTIVE_ITEM:function(e){return Dt(At(t.items),e)},GET_ACTIVE_ITEMS:function(){return At(t.items)},GET_ITEMS:function(){return t.items},GET_ITEM_NAME:function(e){var n=Dt(t.items,e);return n?n.filename:null},GET_ITEM_SIZE:function(e){var n=Dt(t.items,e);return n?n.fileSize:null},GET_STYLES:function(){return Object.keys(t.options).filter((function(t){return/^style/.test(t)})).map((function(e){return{name:e,value:t.options[e]}}))},GET_PANEL_ASPECT_RATIO:function(){return/circle/.test(t.options.stylePanelLayout)?1:Rt(t.options.stylePanelAspectRatio)},GET_ITEM_PANEL_ASPECT_RATIO:function(){return t.options.styleItemPanelAspectRatio},GET_ITEMS_BY_STATUS:function(e){return At(t.items).filter((function(t){return t.status===e}))},GET_TOTAL_ITEMS:function(){return At(t.items).length},IS_ASYNC:function(){return X(t.options.server)&&(X(t.options.server.process)||z(t.options.server.process))}}},Ut=function(t,e,n){return L(e)?null:void 0===n?(t.push(e),e):(r=n,i=0,o=t.length,function(t,e,n){t.splice(e,0,n)}(t,n=Math.max(Math.min(o,r),i),e),e);var r,i,o},Gt=function(t){return/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(t)},qt=function(t){return t.split("/").pop().split("?").shift()},Ht=function(t){return t.split(".").pop()},$t=function(t){if("string"!=typeof t)return"";var e=t.split("/").pop();return/svg/.test(e)?"svg":/zip|compressed/.test(e)?"zip":/plain/.test(e)?"txt":/msword/.test(e)?"doc":/[a-z]+/.test(e)?"jpeg"===e?"jpg":e:""},Vt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(e+t).slice(-e.length)},jt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return t.getFullYear()+"-"+Vt(t.getMonth()+1,"00")+"-"+Vt(t.getDate(),"00")+"_"+Vt(t.getHours(),"00")+"-"+Vt(t.getMinutes(),"00")+"-"+Vt(t.getSeconds(),"00")},zt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i="string"==typeof n?t.slice(0,t.size,n):t.slice(0,t.size,t.type);return i.lastModifiedDate=new Date,G(e)||(e=jt()),e&&null===r&&Ht(e)?i.name=e:(r=r||$t(i.type),i.name=e+(r?"."+r:"")),i},Yt=function(t,e){var n=window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(n){var r=new n;return r.append(t),r.getBlob(e)}return new Blob([t],{type:e})},Wt=function(t){return(/^data:(.+);/.exec(t)||[])[1]||null},Xt=function(t){var e=Wt(t);return function(t,e){for(var n=new ArrayBuffer(t.length),r=new Uint8Array(n),i=0;i=200&&a.status<300?r.onload(a):r.onerror(a)},a.onerror=function(){return r.onerror(a)},a.onabort=function(){i=!0,r.onabort()},a.ontimeout=function(){return r.ontimeout(a)},a.open(n.method,e,!0),V(n.timeout)&&(a.timeout=n.timeout),Object.keys(n.headers).forEach((function(t){var e=unescape(encodeURIComponent(n.headers[t]));a.setRequestHeader(t,e)})),n.responseType&&(a.responseType=n.responseType),n.withCredentials&&(a.withCredentials=!0),a.send(t),r},re=function(t,e,n,r){return{type:t,code:e,body:n,headers:r}},ie=function(t){return function(e){t(re("error",0,"Timeout",e.getAllResponseHeaders()))}},oe=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if("function"==typeof e)return e;if(!e||!G(e.url))return null;var n=e.onload||function(t){return t},r=e.onerror||function(t){return null};return function(i,o,a,s,l,c){var u=ne(i,t+e.url,Object.assign({},e,{responseType:"blob"}));return u.onload=function(t){var e=t.getAllResponseHeaders(),r=Jt(e).name||qt(i);o(re("load",t.status,zt(n(t.response),r),e))},u.onerror=function(t){a(re("error",t.status,r(t.response)||t.statusText,t.getAllResponseHeaders()))},u.onheaders=function(t){c(re("headers",t.status,null,t.getAllResponseHeaders()))},u.ontimeout=ie(a),u.onprogress=s,u.onabort=l,u}};function ae(t){this.wrapped=t}function se(t){var e,n;function r(e,n){try{var o=t[e](n),a=o.value,s=a instanceof ae;Promise.resolve(s?a.wrapped:a).then((function(t){s?r("next",t):i(o.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(t){i("throw",t)}}function i(t,i){switch(t){case"return":e.resolve({value:i,done:!0});break;case"throw":e.reject(i);break;default:e.resolve({value:i,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,i){return new Promise((function(o,a){var s={key:t,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(e=n=s,r(t,i))}))},"function"!=typeof t.return&&(this.return=void 0)}function le(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e=1||R()};return _.serverId?(w=function(t){_.aborted||(d.filter((function(e){return e.offsetr.chunkSize,p=d&&(f||r.chunkForce);if(i instanceof Blob&&p)return he(t,e,n,i,o,a,s,l,c,u,r);var m=e.ondata||function(t){return t},h=e.onload||function(t){return t},_=e.onerror||function(t){return null},v=new FormData;X(o)&&v.append(n,JSON.stringify(o)),(i instanceof Blob?[{name:null,file:i}]:i).forEach((function(t){v.append(n,t.file,null===t.name?t.file.name:""+t.name+t.file.name)}));var g=ne(m(v),t+e.url,e);return g.onload=function(t){a(re("load",t.status,h(t.response),t.getAllResponseHeaders()))},g.onerror=function(t){s(re("error",t.status,_(t.response)||t.statusText,t.getAllResponseHeaders()))},g.ontimeout=ie(s),g.onprogress=l,g.onabort=c,g}}},ve=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if("function"==typeof e)return e;if(!e||!G(e.url))return function(t,e){return e()};var n=e.onload||function(t){return t},r=e.onerror||function(t){return null};return function(i,o,a){var s=ne(i,t+e.url,e);return s.onload=function(t){o(re("load",t.status,n(t.response),t.getAllResponseHeaders()))},s.onerror=function(t){a(re("error",t.status,r(t.response)||t.statusText,t.getAllResponseHeaders()))},s.ontimeout=ie(a),s}},ge=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t+Math.random()*(e-t)},Ee=function(t){var e={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},n=function(){e.request&&(e.perceivedPerformanceUpdater.clear(),e.request.abort(),e.complete=!0)},r=Object.assign({},ft(),{process:function(n,i){var o=function(){0!==e.duration&&null!==e.progress&&r.fire("progress",r.getProgress())},a=function(){e.complete=!0,r.fire("load-perceived",e.response.body)};r.fire("start"),e.timestamp=Date.now(),e.perceivedPerformanceUpdater=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3&&void 0!==arguments[3]?arguments[3]:25),r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,i=null,o=Date.now(),a=function a(){var s=Date.now()-o,l=ge(n,r);s+l>e&&(l=s+l-e);var c=s/e;c>=1?t(1):(t(c),i=setTimeout(a,l))};return a(),{clear:function(){clearTimeout(i)}}}((function(t){e.perceivedProgress=t,e.perceivedDuration=Date.now()-e.timestamp,o(),e.response&&1===e.perceivedProgress&&!e.complete&&a()}),ge(750,1500)),e.request=t(n,i,(function(t){e.response=X(t)?t:{type:"load",code:200,body:""+t,headers:{}},e.duration=Date.now()-e.timestamp,e.progress=1,r.fire("load",e.response.body),1===e.perceivedProgress&&a()}),(function(t){e.perceivedPerformanceUpdater.clear(),r.fire("error",X(t)?t:{type:"error",code:0,body:""+t})}),(function(t,n,r){e.duration=Date.now()-e.timestamp,e.progress=t?n/r:null,o()}),(function(){e.perceivedPerformanceUpdater.clear(),r.fire("abort",e.response?e.response.body:null)}),(function(t){r.fire("transfer",t)}))},abort:n,getProgress:function(){return e.progress?Math.min(e.progress,e.perceivedProgress):null},getDuration:function(){return Math.min(e.duration,e.perceivedDuration)},reset:function(){n(),e.complete=!1,e.perceivedProgress=0,e.progress=0,e.timestamp=null,e.perceivedDuration=0,e.duration=0,e.request=null,e.response=null}});return r},be=function(t){return t.substr(0,t.lastIndexOf("."))||t},ye=function(t){var e=[t.name,t.size,t.type];return t instanceof Blob||Gt(t)?e[0]=t.name||jt():Gt(t)?(e[1]=t.length,e[2]=Wt(t)):G(t)&&(e[0]=qt(t),e[1]=0,e[2]="application/octet-stream"),{name:e[0],size:e[1],type:e[2]}},Ce=function(t){return!!(t instanceof File||t instanceof Blob&&t.name)},Te=function t(e){if(!X(e))return e;var n=P(e)?[]:{};for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];n[r]=i&&X(i)?t(i):i}return n},we=function(t,e){var n=function(t,e){return L(e)?0:G(e)?t.findIndex((function(t){return t.id===e})):-1}(t,e);if(!(n<0))return t[n]||null},Ie=function(t,e,n,r,i,o){var a=ne(null,t,{method:"GET",responseType:"blob"});return a.onload=function(n){var r=n.getAllResponseHeaders(),i=Jt(r).name||qt(t);e(re("load",n.status,zt(n.response,i),r))},a.onerror=function(t){n(re("error",t.status,t.statusText,t.getAllResponseHeaders()))},a.onheaders=function(t){o(re("headers",t.status,null,t.getAllResponseHeaders()))},a.ontimeout=ie(n),a.onprogress=r,a.onabort=i,a},Se=function(t){return 0===t.indexOf("//")&&(t=location.protocol+t),t.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]},Oe=function(t){return function(){return z(t)?t.apply(void 0,arguments):t}},De=function(t,e){clearTimeout(e.listUpdateTimeout),e.listUpdateTimeout=setTimeout((function(){t("DID_UPDATE_ITEMS",{items:At(e.items)})}),0)},Re=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},r=n.query,i=n.success,o=void 0===i?function(){}:i,a=n.failure,s=void 0===a?function(){}:a,l=Dt(t.items,r);l?e(l,o,s):s({error:re("error",0,"Item not found"),file:null})}},ke=function(t,e,n){return{ABORT_ALL:function(){At(n.items).forEach((function(t){t.freeze(),t.abortLoad(),t.abortProcessing()}))},DID_SET_FILES:function(e){var r=e.value,i=(void 0===r?[]:r).map((function(t){return{source:t.source?t.source:t,options:t.options}})),o=At(n.items);o.forEach((function(e){i.find((function(t){return t.source===e.source||t.source===e.file}))||t("REMOVE_ITEM",{query:e})})),o=At(n.items),i.forEach((function(e,n){o.find((function(t){return t.source===e.source||t.file===e.source}))||t("ADD_ITEM",Object.assign({},e,{interactionMethod:ct,index:n}))}))},DID_UPDATE_ITEM_METADATA:function(r){var i=r.id;clearTimeout(n.itemUpdateTimeout),n.itemUpdateTimeout=setTimeout((function(){var r=we(n.items,i);if(e("IS_ASYNC")){var o,a=function(){setTimeout((function(){t("REQUEST_ITEM_PROCESSING",{query:i})}),32)};return r.status===vt.PROCESSING_COMPLETE?(o=n.options.instantUpload,void r.revert(ve(n.options.server.url,n.options.server.revert),e("GET_FORCE_REVERT")).then(o?a:function(){}).catch((function(){}))):r.status===vt.PROCESSING?function(t){r.abortProcessing().then(t?a:function(){})}(n.options.instantUpload):void(n.options.instantUpload&&a())}Tt("SHOULD_PREPARE_OUTPUT",!1,{item:r,query:e}).then((function(e){e&&t("REQUEST_PREPARE_OUTPUT",{query:i,item:r,ready:function(e){t("DID_PREPARE_OUTPUT",{id:i,file:e})}},!0)}))}),0)},SORT:function(t){var e=t.compare;Ae(n,e)},ADD_ITEMS:function(n){var r=n.items,i=n.index,o=n.interactionMethod,a=n.success,s=void 0===a?function(){}:a,l=n.failure,c=void 0===l?function(){}:l,u=i;if(-1===i||void 0===i){var d=e("GET_ITEM_INSERT_LOCATION"),f=e("GET_TOTAL_ITEMS");u="before"===d?0:f}var p=e("GET_IGNORED_FILES"),m=r.filter((function(t){return Ce(t)?!p.includes(t.name.toLowerCase()):!L(t)})).map((function(e){return new Promise((function(n,r){t("ADD_ITEM",{interactionMethod:o,source:e.source||e,success:n,failure:r,index:u++,options:e.options||{}})}))}));Promise.all(m).then(s).catch(c)},ADD_ITEM:function(r){var i=r.source,o=r.index,s=void 0===o?-1:o,l=r.interactionMethod,c=r.success,u=void 0===c?function(){}:c,d=r.failure,f=void 0===d?function(){}:d,p=r.options,m=void 0===p?{}:p;if(L(i))f({error:re("error",0,"No source"),file:null});else if(!Ce(i)||!n.options.ignoredFiles.includes(i.name.toLowerCase())){if(!function(t){var e=At(t.items).length;if(!t.options.allowMultiple)return 0===e;var n=t.options.maxFiles;return null===n||e0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=ut(),i={archived:!1,frozen:!1,released:!1,source:null,file:n,serverFileReference:e,transferId:null,processingAborted:!1,status:e?vt.PROCESSING_COMPLETE:vt.INIT,activeLoader:null,activeProcessor:null},o=null,s={},l=function(t){return i.status=t},c=function(t){if(!i.released&&!i.frozen){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r=400&&e.code<500)return t("DID_THROW_ITEM_INVALID",{id:y,error:e,status:{main:r,sub:e.code+" ("+e.body+")"}}),void f({error:e,file:ht(E)});t("DID_THROW_ITEM_LOAD_ERROR",{id:y,error:e,status:{main:r,sub:n.options.labelTapToRetry}})})),E.on("load-file-error",(function(e){t("DID_THROW_ITEM_INVALID",{id:y,error:e.status,status:e.status}),f({error:e.status,file:ht(E)})})),E.on("load-abort",(function(){t("REMOVE_ITEM",{query:y})})),E.on("load-skip",(function(){t("COMPLETE_LOAD_ITEM",{query:y,item:E,data:{source:i,success:u}})})),E.on("load",(function(){var r=function(r){r?(E.on("metadata-update",(function(e){t("DID_UPDATE_ITEM_METADATA",{id:y,change:e})})),Tt("SHOULD_PREPARE_OUTPUT",!1,{item:E,query:e}).then((function(e){var r=function(){t("COMPLETE_LOAD_ITEM",{query:y,item:E,data:{source:i,success:u}}),De(t,n)};e?t("REQUEST_PREPARE_OUTPUT",{query:y,item:E,ready:function(e){t("DID_PREPARE_OUTPUT",{id:y,file:e}),r()}},!0):r()}))):t("REMOVE_ITEM",{query:y})};Tt("DID_LOAD_ITEM",E,{query:e,dispatch:t}).then((function(){Re(e("GET_BEFORE_ADD_FILE"),ht(E)).then(r)})).catch((function(){r(!1)}))})),E.on("process-start",(function(){t("DID_START_ITEM_PROCESSING",{id:y})})),E.on("process-progress",(function(e){t("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:y,progress:e})})),E.on("process-error",(function(e){t("DID_THROW_ITEM_PROCESSING_ERROR",{id:y,error:e,status:{main:Oe(n.options.labelFileProcessingError)(e),sub:n.options.labelTapToRetry}})})),E.on("process-revert-error",(function(e){t("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:y,error:e,status:{main:Oe(n.options.labelFileProcessingRevertError)(e),sub:n.options.labelTapToRetry}})})),E.on("process-complete",(function(e){t("DID_COMPLETE_ITEM_PROCESSING",{id:y,error:null,serverFileReference:e})})),E.on("process-abort",(function(){t("DID_ABORT_ITEM_PROCESSING",{id:y})})),E.on("process-revert",(function(){t("DID_REVERT_ITEM_PROCESSING",{id:y})})),t("DID_ADD_ITEM",{id:y,index:s,interactionMethod:l}),De(t,n);var C=n.options.server||{},T=C.url,w=C.load,I=C.restore,S=C.fetch;E.load(i,te(g===gt.INPUT?G(i)&&function(t){return(t.indexOf(":")>-1||t.indexOf("//")>-1)&&Se(location.href)!==Se(t)}(i)?oe(T,S):Ie:oe(T,g===gt.LIMBO?I:w)),(function(t,n,r){Tt("LOAD_FILE",t,{query:e}).then(n).catch(r)}))}},REQUEST_PREPARE_OUTPUT:function(t){var n=t.item,r=t.ready;n.archived||Tt("PREPARE_OUTPUT",n.file,{query:e,item:n}).then((function(t){Tt("COMPLETE_PREPARE_OUTPUT",t,{query:e,item:n}).then((function(t){n.archived||r(t)}))}))},COMPLETE_LOAD_ITEM:function(r){var i=r.item,o=r.data,a=o.success,s=o.source,l=e("GET_ITEM_INSERT_LOCATION");z(l)&&s&&Ae(n,l),t("DID_LOAD_ITEM",{id:i.id,error:null,serverFileReference:i.origin===gt.INPUT?null:s}),a(ht(i)),i.origin!==gt.LOCAL?i.origin!==gt.LIMBO?e("IS_ASYNC")&&n.options.instantUpload&&t("REQUEST_ITEM_PROCESSING",{query:i.id}):t("DID_COMPLETE_ITEM_PROCESSING",{id:i.id,error:null,serverFileReference:s}):t("DID_LOAD_LOCAL_ITEM",{id:i.id})},RETRY_ITEM_LOAD:Ne(n,(function(t){t.retryLoad()})),REQUEST_ITEM_PROCESSING:Ne(n,(function(r,i,o){if(r.status===vt.IDLE||r.status===vt.PROCESSING_ERROR)r.status!==vt.PROCESSING_QUEUED&&(r.requestProcessing(),t("DID_REQUEST_ITEM_PROCESSING",{id:r.id}),t("PROCESS_ITEM",{query:r,success:i,failure:o},!0));else{var a=function(){setTimeout((function(){t("REQUEST_ITEM_PROCESSING",{query:r,success:i,failure:o})}),32)};r.status===vt.PROCESSING_COMPLETE||r.status===vt.PROCESSING_REVERT_ERROR?r.revert(ve(n.options.server.url,n.options.server.revert),e("GET_FORCE_REVERT")).then(a).catch((function(){})):r.status===vt.PROCESSING&&r.abortProcessing().then(a)}})),PROCESS_ITEM:Ne(n,(function(r,i,o){var a=e("GET_MAX_PARALLEL_UPLOADS");if(e("GET_ITEMS_BY_STATUS",vt.PROCESSING).length!==a){if(r.status!==vt.PROCESSING){var s=function e(){var r=n.processingQueue.shift();if(r){var i=r.id,o=r.success,a=r.failure,s=Dt(n.items,i);s&&!s.archived?t("PROCESS_ITEM",{query:i,success:o,failure:a},!0):e()}};r.onOnce("process-complete",(function(){i(ht(r)),s(),e("GET_ITEMS_BY_STATUS",vt.PROCESSING_COMPLETE).length===n.items.length&&t("DID_COMPLETE_ITEM_PROCESSING_ALL")})),r.onOnce("process-error",(function(t){o({error:t,file:ht(r)}),s()}));var l=n.options;r.process(Ee(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return"function"==typeof e?function(){for(var t=arguments.length,i=new Array(t),o=0;or&&i-r<=.5&&(o=0),r>i&&r-i>=.5&&(o=0),function(t,e,n,r,i,o){var a=Le(t,e,n,i),s=Le(t,e,n,r);return["M",a.x,a.y,"A",n,n,0,o,0,s.x,s.y].join(" ")}(t,e,n,360*Math.min(.9999,r),360*Math.min(.9999,i),o)},Me=A({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:function(t){var e=t.root,n=t.props;n.spin=!1,n.progress=0,n.opacity=0;var r=d("svg");e.ref.path=d("path",{"stroke-width":2,"stroke-linecap":"round"}),r.appendChild(e.ref.path),e.ref.svg=r,e.appendChild(r)},write:function(t){var e=t.root,n=t.props;if(0!==n.opacity){n.align&&(e.element.dataset.align=n.align);var r=parseInt(s(e.ref.path,"stroke-width"),10),i=.5*e.rect.element.width,o=0,a=0;n.spin?(o=0,a=.5):(o=0,a=n.progress);var l=Fe(i,i,i-r,o,a);s(e.ref.path,"d",l),s(e.ref.path,"stroke-opacity",n.spin||n.progress>0?1:0)}},mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),Be=A({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:function(t){var e=t.root,n=t.props;e.element.innerHTML=(n.icon||"")+""+n.label+"",n.isDisabled=!1},write:function(t){var e=t.root,n=t.props,r=n.isDisabled,i=e.query("GET_DISABLED")||0===n.opacity;i&&!r?(n.isDisabled=!0,s(e.element,"disabled","disabled")):!i&&r&&(n.isDisabled=!1,e.element.removeAttribute("disabled"))}}),Ue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".";return(t=Math.round(Math.abs(t)))<1e3?t+" bytes":t0&&(e.height=e.ref.container.rect.element.height)),i&&(e.ref.panel.height=null),e.ref.panel.height=e.height},destroy:function(t){var e=t.root,n=t.props;e.element.removeEventListener("click",e.ref.handleClick),e.dispatch("RELEASE_ITEM",{query:n.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:"spring",scaleY:"spring",translateX:vn,translateY:vn,opacity:{type:"tween",duration:150}}}}),yn=function(t,e){if(e){var n=t.rect.element.width,r=t.childViews,i=r.length,o=null;if(0===i||e.topg){if(e.left3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;t.translateX=e,t.translateY=n,Date.now()>t.spawnDate&&(0===t.opacity&&Tn(t,e,n,r,i),t.scaleX=1,t.scaleY=1,t.opacity=1)},Tn=function(t,e,n,r,i){t.interactionMethod===ct?(t.translateX=null,t.translateX=e,t.translateY=null,t.translateY=n):t.interactionMethod===at?(t.translateX=null,t.translateX=e-20*r,t.translateY=null,t.translateY=n-10*i,t.scaleX=.8,t.scaleY=.8):t.interactionMethod===st?(t.translateY=null,t.translateY=n-30):t.interactionMethod===ot&&(t.translateX=null,t.translateX=e-30,t.translateY=null)},wn=N({DID_ADD_ITEM:function(t){var e=t.root,n=t.action,r=n.id,i=n.index,o=n.interactionMethod;e.ref.addIndex=i;var a=Date.now(),s=a,l=1;if(o!==ct){l=0;var c=e.query("GET_ITEM_INSERT_INTERVAL"),u=a-e.ref.lastItemSpanwDate;s=u3&&void 0!==arguments[3]?arguments[3]:"";n?s(t,e,r):t.removeAttribute(e)},Rn=function(t){var e=t.root,n=(t.action,e.query("GET_DISABLED")),r=e.query("GET_ALLOW_BROWSE"),i=n||!r;Dn(e.element,"disabled",i)},An=function(t){var e=t.root,n=e.element;e.query("GET_TOTAL_ITEMS")>0?(Dn(n,"required",!1),Dn(n,"name",!1)):(Dn(n,"name",!0,e.query("GET_NAME")),e.query("GET_CHECK_VALIDITY")&&n.setCustomValidity(""),e.query("GET_REQUIRED")&&Dn(n,"required",!0))},Nn=A({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:function(t){var e=t.root,n=t.props;e.element.id="filepond--browser-"+n.id,s(e.element,"name",e.query("GET_NAME")),s(e.element,"aria-controls","filepond--assistant-"+n.id),s(e.element,"aria-labelledby","filepond--drop-label-"+n.id),e.ref.handleChange=function(t){if(e.element.value){var r=Array.from(e.element.files);setTimeout((function(){n.onload(r),function(t){if(t&&""!==t.value){try{t.value=""}catch(t){}if(t.value){var e=xe("form"),n=t.parentNode,r=t.nextSibling;e.appendChild(t),e.reset(),r?n.insertBefore(t,r):n.appendChild(t)}}}(e.element)}),250)}},e.element.addEventListener("change",e.ref.handleChange)},destroy:function(t){var e=t.root;e.element.removeEventListener("change",e.ref.handleChange)},write:N({DID_LOAD_ITEM:An,DID_REMOVE_ITEM:An,DID_THROW_ITEM_INVALID:function(t){var e=t.root;e.query("GET_CHECK_VALIDITY")&&e.element.setCustomValidity(e.query("GET_LABEL_INVALID_FIELD"))},DID_SET_DISABLED:Rn,DID_SET_ALLOW_BROWSE:Rn,DID_SET_ALLOW_MULTIPLE:function(t){var e=t.root,n=t.action;Dn(e.element,"multiple",n.value)},DID_SET_ACCEPTED_FILE_TYPES:function(t){var e=t.root,n=t.action;Dn(e.element,"accept",!!n.value,n.value?n.value.join(","):"")},DID_SET_CAPTURE_METHOD:function(t){var e=t.root,n=t.action;Dn(e.element,"capture",!!n.value,!0===n.value?"":n.value)},DID_SET_REQUIRED:function(t){var e=t.root;t.action.value?0===e.query("GET_TOTAL_ITEMS")&&Dn(e.element,"required",!0):Dn(e.element,"required",!1)}})}),kn=13,xn=32,Pn=function(t,e){t.innerHTML=e;var n=t.querySelector(".filepond--label-action");return n&&s(n,"tabindex","0"),e},Ln=A({name:"drop-label",ignoreRect:!0,create:function(t){var e=t.root,n=t.props,r=xe("label");s(r,"for","filepond--browser-"+n.id),s(r,"id","filepond--drop-label-"+n.id),s(r,"aria-hidden","true"),e.ref.handleKeyDown=function(t){(t.keyCode===kn||t.keyCode===xn)&&(t.preventDefault(),e.ref.label.click())},e.ref.handleClick=function(t){t.target===r||r.contains(t.target)||e.ref.label.click()},r.addEventListener("keydown",e.ref.handleKeyDown),e.element.addEventListener("click",e.ref.handleClick),Pn(r,n.caption),e.appendChild(r),e.ref.label=r},destroy:function(t){var e=t.root;e.ref.label.addEventListener("keydown",e.ref.handleKeyDown),e.element.removeEventListener("click",e.ref.handleClick)},write:N({DID_SET_LABEL_IDLE:function(t){var e=t.root,n=t.action;Pn(e.ref.label,n.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),Fn=A({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),Mn=N({DID_DRAG:function(t){var e=t.root,n=t.action;e.ref.blob?(e.ref.blob.translateX=n.position.scopeLeft,e.ref.blob.translateY=n.position.scopeTop,e.ref.blob.scaleX=1,e.ref.blob.scaleY=1,e.ref.blob.opacity=1):function(t){var e=t.root,n=.5*e.rect.element.width,r=.5*e.rect.element.height;e.ref.blob=e.appendChildView(e.createChildView(Fn,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:n,translateY:r}))}({root:e})},DID_DROP:function(t){var e=t.root;e.ref.blob&&(e.ref.blob.scaleX=2.5,e.ref.blob.scaleY=2.5,e.ref.blob.opacity=0)},DID_END_DRAG:function(t){var e=t.root;e.ref.blob&&(e.ref.blob.opacity=0)}}),Bn=A({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:function(t){var e=t.root,n=t.props,r=t.actions;Mn({root:e,props:n,actions:r});var i=e.ref.blob;0===r.length&&i&&0===i.opacity&&(e.removeChildView(i),e.ref.blob=null)}}),Un=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],Gn=["css","csv","html","txt"],qn={zip:"zip|compressed",epub:"application/epub+zip"},Hn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t=t.toLowerCase(),Un.includes(t)?"image/"+("jpg"===t?"jpeg":"svg"===t?"svg+xml":t):Gn.includes(t)?"text/"+t:qn[t]||null},$n=function(t){return new Promise((function(e,n){var r=Jn(t);if(r.length&&!Vn(t))return e(r);jn(t).then(e)}))},Vn=function(t){return!!t.files&&t.files.length>0},jn=function(t){return new Promise((function(e,n){var r=(t.items?Array.from(t.items):[]).filter((function(t){return zn(t)})).map((function(t){return Yn(t)}));r.length?Promise.all(r).then((function(t){var n=[];t.forEach((function(t){n.push.apply(n,t)})),e(n.filter((function(t){return t})))})).catch(console.error):e(t.files?Array.from(t.files):[])}))},zn=function(t){if(Qn(t)){var e=Zn(t);if(e)return e.isFile||e.isDirectory}return"file"===t.kind},Yn=function(t){return new Promise((function(e,n){Kn(t)?Wn(Zn(t)).then(e).catch(n):e([t.getAsFile()])}))},Wn=function(t){return new Promise((function(e,n){var r=[],i=0,o=0,a=function(){0===o&&0===i&&e(r)};!function t(e){i++;var s=e.createReader();!function e(){s.readEntries((function(n){if(0===n.length)return i--,void a();n.forEach((function(e){e.isDirectory?t(e):(o++,e.file((function(t){r.push(Xn(t)),o--,a()})))})),e()}),n)}()}(t)}))},Xn=function(t){if(t.type.length)return t;var e=t.lastModifiedDate,n=t.name;return(t=t.slice(0,t.size,Hn(Ht(t.name)))).name=n,t.lastModifiedDate=e,t},Kn=function(t){return Qn(t)&&(Zn(t)||{}).isDirectory},Qn=function(t){return"webkitGetAsEntry"in t},Zn=function(t){return t.webkitGetAsEntry()},Jn=function(t){var e=[];try{if((e=er(t)).length)return e;e=tr(t)}catch(t){}return e},tr=function(t){var e=t.getData("url");return"string"==typeof e&&e.length?[e]:[]},er=function(t){var e=t.getData("text/html");if("string"==typeof e&&e.length){var n=e.match(/src\s*=\s*"(.+?)"/);if(n)return[n[1]]}return[]},nr=[],rr=function(t){return{pageLeft:t.pageX,pageTop:t.pageY,scopeLeft:t.offsetX||t.layerX,scopeTop:t.offsetY||t.layerY}},ir=function(t){var e=nr.find((function(e){return e.element===t}));if(e)return e;var n=or(t);return nr.push(n),n},or=function(t){var e=[],n={dragenter:cr,dragover:ur,dragleave:fr,drop:dr},r={};o(n,(function(n,i){r[n]=i(t,e),t.addEventListener(n,r[n],!1)}));var i={element:t,addListener:function(a){return e.push(a),function(){e.splice(e.indexOf(a),1),0===e.length&&(nr.splice(nr.indexOf(i),1),o(n,(function(e){t.removeEventListener(e,r[e],!1)})))}}};return i},ar=function(t,e){var n,r=function(t,e){return"elementFromPoint"in t||(t=document),t.elementFromPoint(e.x,e.y)}("getRootNode"in(n=e)?n.getRootNode():document,{x:t.pageX-window.pageXOffset,y:t.pageY-window.pageYOffset});return r===e||e.contains(r)},sr=null,lr=function(t,e){try{t.dropEffect=e}catch(t){}},cr=function(t,e){return function(t){t.preventDefault(),sr=t.target,e.forEach((function(e){var n=e.element,r=e.onenter;ar(t,n)&&(e.state="enter",r(rr(t)))}))}},ur=function(t,e){return function(t){t.preventDefault();var n=t.dataTransfer;$n(n).then((function(r){var i=!1;e.some((function(e){var o=e.filterElement,a=e.element,s=e.onenter,l=e.onexit,c=e.ondrag,u=e.allowdrop;lr(n,"copy");var d=u(r);if(d)if(ar(t,a)){if(i=!0,null===e.state)return e.state="enter",void s(rr(t));if(e.state="over",o&&!d)return void lr(n,"none");c(rr(t))}else o&&!i&&lr(n,"none"),e.state&&(e.state=null,l(rr(t)));else lr(n,"none")}))}))}},dr=function(t,e){return function(t){t.preventDefault();var n=t.dataTransfer;$n(n).then((function(n){e.forEach((function(e){var r=e.filterElement,i=e.element,o=e.ondrop,a=e.onexit,s=e.allowdrop;if(e.state=null,!r||ar(t,i))return s(n)?void o(rr(t),n):a(rr(t))}))}))}},fr=function(t,e){return function(t){sr===t.target&&e.forEach((function(e){var n=e.onexit;e.state=null,n(rr(t))}))}},pr=function(t,e,n){t.classList.add("filepond--hopper");var r=n.catchesDropsOnPage,i=n.requiresDropOnElement,o=n.filterItems,a=void 0===o?function(t){return t}:o,s=function(t,e,n){var r=ir(e),i={element:t,filterElement:n,state:null,ondrop:function(){},onenter:function(){},ondrag:function(){},onexit:function(){},onload:function(){},allowdrop:function(){}};return i.destroy=r.addListener(i),i}(t,r?document.documentElement:t,i),l="",c="";s.allowdrop=function(t){return e(a(t))},s.ondrop=function(t,n){var r=a(n);e(r)?(c="drag-drop",u.onload(r,t)):u.ondragend(t)},s.ondrag=function(t){u.ondrag(t)},s.onenter=function(t){c="drag-over",u.ondragstart(t)},s.onexit=function(t){c="drag-exit",u.ondragend(t)};var u={updateHopperState:function(){l!==c&&(t.dataset.hopperState=c,l=c)},onload:function(){},ondragstart:function(){},ondrag:function(){},ondragend:function(){},destroy:function(){s.destroy()}};return u},mr=!1,hr=[],_r=function(t){$n(t.clipboardData).then((function(t){t.length&&hr.forEach((function(e){return e(t)}))}))},vr=function(){var t=function(t){e.onload(t)},e={destroy:function(){var e;e=t,dt(hr,hr.indexOf(e)),0===hr.length&&(document.removeEventListener("paste",_r),mr=!1)},onload:function(){}};return function(t){hr.includes(t)||(hr.push(t),mr||(mr=!0,document.addEventListener("paste",_r)))}(t),e},gr=null,Er=null,br=[],yr=function(t,e){t.element.textContent=e},Cr=function(t,e,n){var r=t.query("GET_TOTAL_ITEMS");yr(t,n+" "+e+", "+r+" "+(1===r?t.query("GET_LABEL_FILE_COUNT_SINGULAR"):t.query("GET_LABEL_FILE_COUNT_PLURAL"))),clearTimeout(Er),Er=setTimeout((function(){!function(t){t.element.textContent=""}(t)}),1500)},Tr=function(t){return t.element.parentNode.contains(document.activeElement)},wr=function(t){var e=t.root,n=t.action,r=e.query("GET_ITEM",n.id).filename,i=e.query("GET_LABEL_FILE_PROCESSING_ABORTED");yr(e,r+" "+i)},Ir=function(t){var e=t.root,n=t.action,r=e.query("GET_ITEM",n.id).filename;yr(e,n.status.main+" "+r+" "+n.status.sub)},Sr=A({create:function(t){var e=t.root,n=t.props;e.element.id="filepond--assistant-"+n.id,s(e.element,"role","status"),s(e.element,"aria-live","polite"),s(e.element,"aria-relevant","additions")},ignoreRect:!0,ignoreRectUpdate:!0,write:N({DID_LOAD_ITEM:function(t){var e=t.root,n=t.action;if(Tr(e)){e.element.textContent="";var r=e.query("GET_ITEM",n.id);br.push(r.filename),clearTimeout(gr),gr=setTimeout((function(){Cr(e,br.join(", "),e.query("GET_LABEL_FILE_ADDED")),br.length=0}),750)}},DID_REMOVE_ITEM:function(t){var e=t.root,n=t.action;if(Tr(e)){var r=n.item;Cr(e,r.filename,e.query("GET_LABEL_FILE_REMOVED"))}},DID_COMPLETE_ITEM_PROCESSING:function(t){var e=t.root,n=t.action,r=e.query("GET_ITEM",n.id).filename,i=e.query("GET_LABEL_FILE_PROCESSING_COMPLETE");yr(e,r+" "+i)},DID_ABORT_ITEM_PROCESSING:wr,DID_REVERT_ITEM_PROCESSING:wr,DID_THROW_ITEM_REMOVE_ERROR:Ir,DID_THROW_ITEM_LOAD_ERROR:Ir,DID_THROW_ITEM_INVALID:Ir,DID_THROW_ITEM_PROCESSING_ERROR:Ir}),tag:"span",name:"assistant"}),Or=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return t.replace(new RegExp(e+".","g"),(function(t){return t.charAt(1).toUpperCase()}))},Dr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Date.now(),i=null;return function(){for(var o=arguments.length,a=new Array(o),s=0;s=0?1:0,m=o.find((function(t){return t.markedForRemoval&&t.opacity<.45}))?-1:0,h=o.length+p+m,_=Math.round(a/d);return 1===_?o.forEach((function(t){var r=t.rect.element.height+c;n+=r,e+=r*t.opacity})):(n=Math.ceil(h/_)*f,e=n),{visual:e,bounds:n}},Nr=function(t){var e=t.ref.measureHeight||null;return{cappedHeight:parseInt(t.style.maxHeight,10)||null,fixedHeight:0===e?null:e}},kr=function(t,e){var n=t.query("GET_ALLOW_REPLACE"),r=t.query("GET_ALLOW_MULTIPLE"),i=t.query("GET_TOTAL_ITEMS"),o=t.query("GET_MAX_FILES"),a=e.length;return!r&&a>1||!!(V(o=r?o:n?o:1)&&i+a>o)&&(t.dispatch("DID_THROW_MAX_FILES",{source:e,error:re("warning",0,"Max files")}),!0)},xr=function(t,e){var n=t.childViews[0];return yn(n,{left:e.scopeLeft-n.rect.element.left,top:e.scopeTop-(t.rect.outer.top+t.rect.element.marginTop+t.rect.element.scrollTop)})},Pr=function(t){var e=t.query("GET_ALLOW_DROP"),n=t.query("GET_DISABLED"),r=e&&!n;if(r&&!t.ref.hopper){var i=pr(t.element,(function(e){if(kr(t,e))return!1;var n=t.query("GET_BEFORE_DROP_FILE")||function(){return!0};return!t.query("GET_DROP_VALIDATION")||e.every((function(e){return wt("ALLOW_HOPPER_ITEM",e,{query:t.query}).every((function(t){return!0===t}))&&n(e)}))}),{filterItems:function(e){var n=t.query("GET_IGNORED_FILES");return e.filter((function(t){return!Ce(t)||!n.includes(t.name.toLowerCase())}))},catchesDropsOnPage:t.query("GET_DROP_ON_PAGE"),requiresDropOnElement:t.query("GET_DROP_ON_ELEMENT")});i.onload=function(e,n){t.dispatch("ADD_ITEMS",{items:e,index:xr(t.ref.list,n),interactionMethod:at}),t.dispatch("DID_DROP",{position:n}),t.dispatch("DID_END_DRAG",{position:n})},i.ondragstart=function(e){t.dispatch("DID_START_DRAG",{position:e})},i.ondrag=Dr((function(e){t.dispatch("DID_DRAG",{position:e})})),i.ondragend=function(e){t.dispatch("DID_END_DRAG",{position:e})},t.ref.hopper=i,t.ref.drip=t.appendChildView(t.createChildView(Bn))}else!r&&t.ref.hopper&&(t.ref.hopper.destroy(),t.ref.hopper=null,t.removeChildView(t.ref.drip))},Lr=function(t,e){var n=t.query("GET_ALLOW_BROWSE"),r=t.query("GET_DISABLED"),i=n&&!r;i&&!t.ref.browser?t.ref.browser=t.appendChildView(t.createChildView(Nn,Object.assign({},e,{onload:function(e){if(kr(t,e))return!1;t.dispatch("ADD_ITEMS",{items:e,index:-1,interactionMethod:st})}})),0):!i&&t.ref.browser&&(t.removeChildView(t.ref.browser),t.ref.browser=null)},Fr=function(t){var e=t.query("GET_ALLOW_PASTE"),n=t.query("GET_DISABLED"),r=e&&!n;r&&!t.ref.paster?(t.ref.paster=vr(),t.ref.paster.onload=function(e){t.dispatch("ADD_ITEMS",{items:e,index:-1,interactionMethod:lt})}):!r&&t.ref.paster&&(t.ref.paster.destroy(),t.ref.paster=null)},Mr=N({DID_SET_ALLOW_BROWSE:function(t){var e=t.root,n=t.props;Lr(e,n)},DID_SET_ALLOW_DROP:function(t){var e=t.root;Pr(e)},DID_SET_ALLOW_PASTE:function(t){var e=t.root;Fr(e)},DID_SET_DISABLED:function(t){var e=t.root,n=t.props;Pr(e),Fr(e),Lr(e,n),e.query("GET_DISABLED")?e.element.dataset.disabled="disabled":e.element.removeAttribute("data-disabled")}}),Br=A({name:"root",read:function(t){var e=t.root;e.ref.measure&&(e.ref.measureHeight=e.ref.measure.offsetHeight)},create:function(t){var e=t.root,n=t.props,r=e.query("GET_ID");r&&(e.element.id=r);var i=e.query("GET_CLASS_NAME");i&&i.split(" ").forEach((function(t){e.element.classList.add(t)})),e.ref.label=e.appendChildView(e.createChildView(Ln,Object.assign({},n,{translateY:null,caption:e.query("GET_LABEL_IDLE")}))),e.ref.list=e.appendChildView(e.createChildView(On,{translateY:null})),e.ref.panel=e.appendChildView(e.createChildView(_n,{name:"panel-root"})),e.ref.assistant=e.appendChildView(e.createChildView(Sr,Object.assign({},n))),e.ref.measure=xe("div"),e.ref.measure.style.height="100%",e.element.appendChild(e.ref.measure),e.ref.bounds=null,e.query("GET_STYLES").filter((function(t){return!L(t.value)})).map((function(t){var n=t.name,r=t.value;e.element.dataset[n]=r})),e.ref.widthPrevious=null,e.ref.widthUpdated=Dr((function(){e.ref.updateHistory=[],e.dispatch("DID_RESIZE_ROOT")}),250),e.ref.previousAspectRatio=null,e.ref.updateHistory=[]},write:function(t){var e=t.root,n=t.props,r=t.actions;if(Mr({root:e,props:n,actions:r}),r.filter((function(t){return/^DID_SET_STYLE_/.test(t.type)})).filter((function(t){return!L(t.data.value)})).map((function(t){var n=t.type,r=t.data,i=Or(n.substr(8).toLowerCase(),"_");e.element.dataset[i]=r.value,e.invalidateLayout()})),!e.rect.element.hidden){e.rect.element.width!==e.ref.widthPrevious&&(e.ref.widthPrevious=e.rect.element.width,e.ref.widthUpdated());var i=e.ref.bounds;i||(i=e.ref.bounds=Nr(e),e.element.removeChild(e.ref.measure),e.ref.measure=null);var o=e.ref,a=o.hopper,s=o.label,l=o.list,c=o.panel;a&&a.updateHopperState();var u=e.query("GET_PANEL_ASPECT_RATIO"),d=e.query("GET_ALLOW_MULTIPLE"),f=e.query("GET_TOTAL_ITEMS"),p=f===(d?e.query("GET_MAX_FILES")||1e6:1),m=r.find((function(t){return"DID_ADD_ITEM"===t.type}));if(p&&m){var h=m.data.interactionMethod;s.opacity=0,d?s.translateY=-40:h===ot?s.translateX=40:s.translateY=h===st?40:30}else p||(s.opacity=1,s.translateX=0,s.translateY=0);var _=Rr(e),v=Ar(e),g=s.rect.element.height,E=!d||p?0:g,b=p?l.rect.element.marginTop:0,y=0===f?0:l.rect.element.marginBottom,C=E+b+v.visual+y,T=E+b+v.bounds+y;if(l.translateY=Math.max(0,E-l.rect.element.marginTop)-_.top,u){var w=e.rect.element.width,I=w*u;u!==e.ref.previousAspectRatio&&(e.ref.previousAspectRatio=u,e.ref.updateHistory=[]);var S=e.ref.updateHistory;if(S.push(w),S.length>4)for(var O=S.length,D=O-10,R=0,A=O;A>=D;A--)if(S[A]===S[A-2]&&R++,R>=2)return;c.scalable=!1,c.height=I;var N=I-E-(y-_.bottom)-(p?b:0);v.visual>N?l.overflow=N:l.overflow=null,e.height=I}else if(i.fixedHeight){c.scalable=!1;var k=i.fixedHeight-E-(y-_.bottom)-(p?b:0);v.visual>k?l.overflow=k:l.overflow=null}else if(i.cappedHeight){var x=C>=i.cappedHeight,P=Math.min(i.cappedHeight,C);c.scalable=!0,c.height=x?P:P-_.top-_.bottom;var F=P-E-(y-_.bottom)-(p?b:0);C>i.cappedHeight&&v.visual>F?l.overflow=F:l.overflow=null,e.height=Math.min(i.cappedHeight,T-_.top-_.bottom)}else{var M=f>0?_.top+_.bottom:0;c.scalable=!0,c.height=Math.max(g,C-M),e.height=Math.max(g,T-M)}}},destroy:function(t){var e=t.root;e.ref.paster&&e.ref.paster.destroy(),e.ref.hopper&&e.ref.hopper.destroy()},mixins:{styles:["height"]}}),Ur=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=null,n=St(),r=i(tt(n),[Bt,it(n)],[ke,rt(n)]);r.dispatch("SET_OPTIONS",{options:t});var o=function(){document.hidden||r.dispatch("KICK")};document.addEventListener("visibilitychange",o);var s=null,l=!1,c=!1,u=null,d=null,f=function(){l||(l=!0),clearTimeout(s),s=setTimeout((function(){l=!1,u=null,d=null,c&&(c=!1,r.dispatch("DID_STOP_RESIZE"))}),500)};window.addEventListener("resize",f);var p=Br(r,{id:ut()}),m=!1,h=!1,_={_read:function(){l&&(d=window.innerWidth,u||(u=d),c||d===u||(r.dispatch("DID_START_RESIZE"),c=!0)),h&&m&&(m=null===p.element.offsetParent),m||(p._read(),h=p.rect.element.hidden)},_write:function(t){var e=r.processActionQueue().filter((function(t){return!/^SET_/.test(t.type)}));m&&!e.length||(y(e),m=p._write(t,e,c),_t(r.query("GET_ITEMS")),m&&r.processDispatchQueue())}},v=function(t){return function(e){var n={type:t};if(!e)return n;if(e.hasOwnProperty("error")&&(n.error=e.error?Object.assign({},e.error):null),e.status&&(n.status=Object.assign({},e.status)),e.file&&(n.output=e.file),e.source)n.file=e.source;else if(e.item||e.id){var i=e.item?e.item:r.query("GET_ITEM",e.id);n.file=i?ht(i):null}return e.items&&(n.items=e.items.map(ht)),/progress/.test(t)&&(n.progress=e.progress),n}},E={DID_DESTROY:v("destroy"),DID_INIT:v("init"),DID_THROW_MAX_FILES:v("warning"),DID_START_ITEM_LOAD:v("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:v("addfileprogress"),DID_LOAD_ITEM:v("addfile"),DID_THROW_ITEM_INVALID:[v("error"),v("addfile")],DID_THROW_ITEM_LOAD_ERROR:[v("error"),v("addfile")],DID_THROW_ITEM_REMOVE_ERROR:[v("error"),v("removefile")],DID_PREPARE_OUTPUT:v("preparefile"),DID_START_ITEM_PROCESSING:v("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:v("processfileprogress"),DID_ABORT_ITEM_PROCESSING:v("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:v("processfile"),DID_COMPLETE_ITEM_PROCESSING_ALL:v("processfiles"),DID_REVERT_ITEM_PROCESSING:v("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[v("error"),v("processfile")],DID_REMOVE_ITEM:v("removefile"),DID_UPDATE_ITEMS:v("updatefiles"),DID_ACTIVATE_ITEM:v("activatefile")},b=function(t){var e=Object.assign({pond:N},t);delete e.type,p.element.dispatchEvent(new CustomEvent("FilePond:"+t.type,{detail:e,bubbles:!0,cancelable:!0,composed:!0}));var n=[];t.hasOwnProperty("error")&&n.push(t.error),t.hasOwnProperty("file")&&n.push(t.file);var i=["type","error","file"];Object.keys(t).filter((function(t){return!i.includes(t)})).forEach((function(e){return n.push(t[e])})),N.fire.apply(N,[t.type].concat(n));var o=r.query("GET_ON"+t.type.toUpperCase());o&&o.apply(void 0,n)},y=function(t){t.length&&t.forEach((function(t){if(E[t.type]){var e=E[t.type];(Array.isArray(e)?e:[e]).forEach((function(e){setTimeout((function(){b(e(t.data))}),0)}))}}))},C=function(t){return r.dispatch("SET_OPTIONS",{options:t})},T=function(t){return r.query("GET_ACTIVE_ITEM",t)},w=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){S([{source:t,options:e}],{index:e.index}).then((function(t){return n(t&&t[0])})).catch(r)}))},I=function(t){return r.dispatch("REMOVE_ITEM",{query:t}),null===r.query("GET_ACTIVE_ITEM",t)},S=function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e={};o(St(),(function(t,n){e[t]=n[0]}));var n=Ur(Object.assign({},e,{},t));return n},qr=function(t){return Or(t.replace(/^data-/,""))},Hr=function t(e,n){o(n,(function(n,r){o(e,(function(t,i){var o=new RegExp(n);if(o.test(t)&&(delete e[t],!1!==r))if(G(r))e[r]=i;else{var a,s=r.group;X(r)&&!e[s]&&(e[s]={}),e[s][(a=t.replace(o,""),a.charAt(0).toLowerCase()+a.slice(1))]=i}})),r.mapping&&t(e[r.group],r.mapping)}))},$r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];o(t.attributes,(function(e){n.push(t.attributes[e])}));var r=n.filter((function(t){return t.name})).reduce((function(e,n){var r=s(t,n.name);return e[qr(n.name)]=r===n.name||r,e}),{});return Hr(r,e),r},Vr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};wt("SET_ATTRIBUTE_TO_OPTION_MAP",n);var r=Object.assign({},e),i=$r("FIELDSET"===t.nodeName?t.querySelector("input[type=file]"):t,n);Object.keys(i).forEach((function(t){X(i[t])?(X(r[t])||(r[t]={}),Object.assign(r[t],i[t])):r[t]=i[t]})),r.files=(e.files||[]).concat(Array.from(t.querySelectorAll("input:not([type=file])")).map((function(t){return{source:t.value,options:{type:t.dataset.type}}})));var o=Gr(r);return t.files&&Array.from(t.files).forEach((function(t){o.addFile(t)})),o.replaceElement(t),o},jr=function(){return r(arguments.length<=0?void 0:arguments[0])?Vr.apply(void 0,arguments):Gr.apply(void 0,arguments)},zr=["fire","_read","_write"],Yr=function(t){var e={};return pt(t,e,zr),e},Wr=function(t,e){return t.replace(/(?:{([a-zA-Z]+)})/g,(function(t,n){return e[n]}))},Xr=function(t){var e=new Blob(["(",t.toString(),")()"],{type:"application/javascript"}),n=URL.createObjectURL(e),r=new Worker(n);return{transfer:function(t,e){},post:function(t,e,n){var i=ut();r.onmessage=function(t){t.data.id===i&&e(t.data.message)},r.postMessage({id:i,message:t},n)},terminate:function(){r.terminate(),URL.revokeObjectURL(n)}}},Kr=function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=function(t){n(t)},r.src=t}))},Qr=function(t,e){var n=t.slice(0,t.size,t.type);return n.lastModifiedDate=t.lastModifiedDate,n.name=e,n},Zr=function(t){return Qr(t,t.name)},Jr=[],ti=function(t){if(!Jr.includes(t)){Jr.push(t);var e,n=t({addFilter:It,utils:{Type:yt,forin:o,isString:G,isFile:Ce,toNaturalFileSize:Ue,replaceInString:Wr,getExtensionFromFilename:Ht,getFilenameWithoutExtension:be,guesstimateMimeType:Hn,getFileFromBlob:zt,getFilenameFromURL:qt,createRoute:N,createWorker:Xr,createView:A,createItemAPI:ht,loadImage:Kr,copyFile:Zr,renameFile:Qr,createBlob:Yt,applyFilterChain:Tt,text:Pe,getNumericAspectRatioFromString:Rt},views:{fileActionButton:Be}});e=n.options,Object.assign(Ot,e)}},ei=(tn="undefined"!=typeof window&&void 0!==window.document&&!("[object OperaMini]"===Object.prototype.toString.call(window.operamini))&&"visibilityState"in document&&"Promise"in window&&"slice"in Blob.prototype&&"URL"in window&&"createObjectURL"in window.URL&&"performance"in window,function(){return tn}),ni={apps:[]},ri=function(){};if(t.Status={},t.FileStatus={},t.FileOrigin={},t.OptionTypes={},t.create=ri,t.destroy=ri,t.parse=ri,t.find=ri,t.registerPlugin=ri,t.getOptions=ri,t.setOptions=ri,ei()){!function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,r="__framePainter";if(window[r])return window[r].readers.push(t),void window[r].writers.push(e);window[r]={readers:[t],writers:[e]};var i=window[r],o=1e3/n,a=null,s=null,l=null,c=null,u=function(){document.hidden?(l=function(){return window.setTimeout((function(){return d(performance.now())}),o)},c=function(){return window.clearTimeout(s)}):(l=function(){return window.requestAnimationFrame(d)},c=function(){return window.cancelAnimationFrame(s)})};document.addEventListener("visibilitychange",(function(){c&&c(),u(),d(performance.now())}));var d=function t(e){s=l(t),a||(a=e);var n=e-a;n<=o||(a=e-n%o,i.readers.forEach((function(t){return t()})),i.writers.forEach((function(t){return t(e)})))};u(),d(performance.now())}((function(){ni.apps.forEach((function(t){return t._read()}))}),(function(t){ni.apps.forEach((function(e){return e._write(t)}))}));var ii=function e(){document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:ei,create:t.create,destroy:t.destroy,parse:t.parse,find:t.find,registerPlugin:t.registerPlugin,setOptions:t.setOptions}})),document.removeEventListener("DOMContentLoaded",e)};"loading"!==document.readyState?setTimeout((function(){return ii()}),0):document.addEventListener("DOMContentLoaded",ii);var oi=function(){return o(St(),(function(e,n){t.OptionTypes[e]=n[1]}))};t.Status=Object.assign({},Nt),t.FileOrigin=Object.assign({},gt),t.FileStatus=Object.assign({},vt),t.OptionTypes={},oi(),t.create=function(){var e=jr.apply(void 0,arguments);return e.on("destroy",t.destroy),ni.apps.push(e),Yr(e)},t.destroy=function(t){var e=ni.apps.findIndex((function(e){return e.isAttachedTo(t)}));return e>=0&&(ni.apps.splice(e,1)[0].restoreElement(),!0)},t.parse=function(e){return Array.from(e.querySelectorAll(".filepond")).filter((function(t){return!ni.apps.find((function(e){return e.isAttachedTo(t)}))})).map((function(e){return t.create(e)}))},t.find=function(t){var e=ni.apps.find((function(e){return e.isAttachedTo(t)}));return e?Yr(e):null},t.registerPlugin=function(){for(var t=arguments.length,e=new Array(t),n=0;n0?n("p",{staticClass:"card-text mt-1"},t._l(t.story.tags,(function(e){return n("a",{staticClass:"badge badge-secondary mr-1",attrs:{href:"/tag/"+e}},[t._v(t._s(e))])})),0):t._e()]),t._v(" "),n("div",{staticClass:"card-footer d-flex justify-content-between"},[n("span",[t.story.is_private?n("i",{staticClass:"fas fa-lock pr-2"}):t._e(),t._v(t._s(t.story.date_formated))]),t._v(" "),n("div",{staticClass:"dropdown"},[n("button",{staticClass:"btn btn-outline-dark btn-sm dropdown-toggle",attrs:{type:"button",id:"dropdownMenuButton","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",dusk:"story-card-more"}},[t._v("\n "+t._s(t.__("More"))+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[n("a",{staticClass:"dropdown-item",attrs:{href:t.story.url,dusk:"story-card-permalink"}},[n("i",{staticClass:"fas fa-link fa-fw mr-1"}),t._v(" "+t._s(t.__("Permalink"))+"\n ")]),t._v(" "),t.story.editable?n("h6",{staticClass:"dropdown-header"},[t._v(t._s(t.__("Manage")))]):t._e(),t._v(" "),t.story.editable?n("a",{staticClass:"dropdown-item",attrs:{dusk:"story-card-temp-share"},on:{click:function(e){return t.$bus.$emit("share",t.story)}}},[n("i",{staticClass:"fas fa-share-square fa-fw mr-1"}),t._v(" "+t._s(t.__("Temp sharing"))+"\n ")]):t._e(),t._v(" "),t.story.editable?n("a",{staticClass:"dropdown-item",attrs:{href:t.story.url_edit,dusk:"story-card-edit"}},[n("i",{staticClass:"fas fa-pen-alt fa-fw mr-1"}),t._v(" "+t._s(t.__("Edit"))+"\n ")]):t._e(),t._v(" "),t.story.editable?n("confirm",{staticClass:"dropdown-item",attrs:{text:" "+t.__("Delete"),"text-confirm":" "+t.__("Confirm"),dusk:"story-card-remove"},on:{confirmed:t.remove}}):t._e()],1)])])])}),[],!1,null,null,null);e.default=o.exports},yLpj:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},zV0C:function(t,e,n){"use strict";n.r(e);var r={props:{url:{type:String,required:!0}},data:function(){return{name:"Shaare",width:600,height:390}},mounted:function(){},computed:{options:function(){return"menubar=no,height=".concat(this.height,",width=").concat(this.width,",toolbar=no,scrollbars=no,status=no,dialog=1")},script:function(){return"javascript:(function(){var url=location.href; window.open('".concat(this.url,"?url=' + encodeURIComponent(url), '_blank', '").concat(this.options,"');})();")}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card"},[n("div",{staticClass:"card-body"},[n("h5",{staticClass:"card-title"},[t._v(t._s(t.__("Rapid share")))]),t._v(" "),n("p",{staticClass:"card-text"},[t._v(t._s(t.__("Configure your rapid share button and drag it to your bookmarks menu.")))]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"name"}},[t._v(t._s(t.__("Name")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"name"}],staticClass:"form-control",attrs:{type:"text",id:"name",maxlength:"40"},domProps:{value:t.name},on:{input:function(e){e.target.composing||(t.name=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"width"}},[t._v(t._s(t.__("Width")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.width,expression:"width"}],staticClass:"form-control",attrs:{type:"number",id:"width"},domProps:{value:t.width},on:{input:function(e){e.target.composing||(t.width=e.target.value)}}})])]),t._v(" "),n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"height"}},[t._v(t._s(t.__("Height")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.height,expression:"height"}],staticClass:"form-control",attrs:{type:"number",id:"height"},domProps:{value:t.height},on:{input:function(e){e.target.composing||(t.height=e.target.value)}}})])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Share button")))]),n("br"),t._v(" "),n("a",{staticClass:"btn btn-outline-primary",attrs:{href:t.script},domProps:{textContent:t._s(t.name)}})])])])}),[],!1,null,null,null);e.default=o.exports}},[[0,1,2]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"+fAT":function(t,e,n){var r={"./components/AlbumCard.vue":"idfw","./components/AlbumForm.vue":"nBz4","./components/Background.vue":"iyXs","./components/CheckFeature.vue":"8/rJ","./components/ChestCard.vue":"MX7w","./components/ChestForm.vue":"0O8z","./components/ChestLines.vue":"0TP3","./components/Comment.vue":"G1fO","./components/Comments.vue":"TfHT","./components/Confirm.vue":"cNyC","./components/Flash.vue":"tEIc","./components/HealthChecks.vue":"KL6o","./components/LinkCard.vue":"kuJz","./components/LinkForm.vue":"ugYh","./components/Loader.vue":"S4HP","./components/ManageArchives.vue":"K3gU","./components/ManageTags.vue":"NyNk","./components/ManageWalls.vue":"LP8H","./components/Modal.vue":"uuIC","./components/PasswordGenerator.vue":"ZTJQ","./components/PreventBrowserUnload.vue":"vciP","./components/PurgeLogins.vue":"jPMG","./components/Search.vue":"JX/T","./components/Sharer.vue":"zV0C","./components/StoryCard.vue":"yDsy","./components/StoryForm.vue":"5lKZ","./components/TagLimiter.vue":"/j45","./components/Tags.vue":"4dkW","./components/TempSharing.vue":"FT2k","./components/UpdateNotifier.vue":"ui2e","./components/UserForm.vue":"bVTN","./components/Users.vue":"FOBs"};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id="+fAT"},"/j45":function(t,e,n){"use strict";n.r(e);var r={props:{limit:{type:Number,required:!1,default:10},selector:{type:String,required:!1,default:"a"}},data:function(){return{items:null,count:0,more:!1}},mounted:function(){this.items=$(".items > ".concat(this.selector)),this.count=this.items.length,this.hide()},methods:{show:function(){var t=this;this.more=!0,this.items.each((function(e){e+1>t.limit&&$(t.items[e]).removeClass("d-none")}))},hide:function(){var t=this;this.more=!1,this.items.each((function(e){e+1>t.limit&&$(t.items[e]).addClass("d-none")}))}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.count>0,expression:"count > 0"}]},[n("span",{staticClass:"items"},[t._t("default")],2),t._v(" "),t.count>t.limit&&!1===t.more?n("button",{staticClass:"btn btn-outline-secondary btn-sm mb-1",attrs:{type:"button"},on:{click:t.show}},[n("i",{staticClass:"fas fa-plus"}),t._v(" "+t._s(t.count-t.limit)+"\n ")]):t._e(),t._v(" "),t.count>t.limit&&!0===t.more?n("button",{staticClass:"btn btn-outline-secondary btn-sm mb-1",attrs:{type:"button"},on:{click:t.hide}},[n("i",{staticClass:"fas fa-minus"})]):t._e()])}),[],!1,null,null,null);e.default=o.exports},0:function(t,e,n){n("bUC5"),t.exports=n("pyCd")},"0O8z":function(t,e,n){"use strict";n.r(e);var r=n("YLgT"),i=n.n(r),o=n("1IHE"),a=n("0fPN"),s={mixins:[i.a,a.a,o.a],props:{chest:{type:Object,required:!1,default:function(){}}},data:function(){return{form:{title:"",content:[],is_pinned:!1,tags:[]},loading:!1}},mounted:function(){this.chest&&(this.form=this.chest),this.startAudit()},methods:{submit:function(t){var e=this;this.loading=!0,axios.request({method:this.chest?"PUT":"POST",url:this.chest?this.chest.url_update:"/api/chest",data:this.form}).then((function(n){switch(e.clearAudit(),e.$toasted.success(e.__("Saved")),t){case"view":window.location=n.data.post.url;break;case"new":window.location="/chest/create";break;case"edit":window.location="/chest/".concat(n.data.post.postable_id,"/edit")}})).catch((function(t){e.loading=!1,e.setFormError(t),e.setHttpError(t),e.toastHttpError(e.__("Can't save"))}))}}},l=n("KHd+"),c=Object(l.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--chest"},[n("div",{staticClass:"card-body"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"title"}},[t._v(t._s(t.__("Title")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.title,expression:"form.title"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("title")},attrs:{type:"text",id:"title",disabled:t.loading},domProps:{value:t.form.title},on:{input:function(e){e.target.composing||t.$set(t.form,"title",e.target.value)}}}),t._v(" "),t.hasFormError("title")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("title")))]):t._e()]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Content")))]),t._v(" "),n("chest-lines",{model:{value:t.form.content,callback:function(e){t.$set(t.form,"content",e)},expression:"form.content"}})],1),t._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_pinned,expression:"form.is_pinned"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_pinned",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_pinned)?t._i(t.form.is_pinned,null)>-1:t.form.is_pinned},on:{change:function(e){var n=t.form.is_pinned,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_pinned",n.concat([null])):o>-1&&t.$set(t.form,"is_pinned",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_pinned",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_pinned",dusk:"chest-form-pinned"}},[t._v(t._s(t.__("Is pinned?")))])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Tags")))]),t._v(" "),n("tags",{model:{value:t.form.tags,callback:function(e){t.$set(t.form,"tags",e)},expression:"form.tags"}})],1)]),t._v(" "),n("div",{staticClass:"card-footer"},[n("div",{staticClass:"btn-group"},[n("button",{staticClass:"btn btn-primary",class:{"btn-danger":t.hasChanged},attrs:{type:"button",disabled:t.loading,dusk:"chest-form-save"},on:{click:function(e){return e.preventDefault(),t.submit("edit")}}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Save"))+"\n ")]),t._v(" "),n("button",{staticClass:"btn btn-primary dropdown-toggle dropdown-toggle-split",class:{"btn-danger":t.hasChanged},attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}}),t._v(" "),n("div",{staticClass:"dropdown-menu"},[n("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.submit("view")}}},[t._v(t._s(t.__("Save & View")))]),t._v(" "),n("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.submit("new")}}},[t._v(t._s(t.__("Save & New")))])])]),t._v(" "),t.chest?n("a",{staticClass:"btn btn-outline-primary",attrs:{href:t.chest.permalink}},[t._v(t._s(t.__("View")))]):t._e()])])}),[],!1,null,null,null);e.default=c.exports},"0TP3":function(t,e,n){"use strict";n.r(e);var r=n("9B9B"),i={mixins:[n.n(r).a],props:{preview:{type:null|Object,required:!1,default:null}},data:function(){return{lines:[],types:{url:this.__("URL"),text:this.__("Text"),password:this.__("Secret"),code:this.__("Code")},line:{type:"text",name:"",value:""},drag:!1,dragOptions:{animation:200,group:"lines",disabled:!1,ghostClass:"ghost",forceFallback:!0}}},methods:{addLine:function(t){var e=this;this.line.type=t,this.lines.push(this.line),this.line={type:"text",name:"",value:""},this.$nextTick((function(){var t=e.$refs.form.querySelectorAll('.row-line input[name="value"]');t[t.length-1].focus()}))},deleteLine:function(t){this.lines.splice(this.lines.indexOf(t),1)},toggleShowPassword:function(t,e){var n=t.target.parentNode.parentNode.firstChild;n.type="password"===n.type?"text":"password",t.target.innerHTML="password"===n.type?this.__("Show"):this.__("Hide")},setPassword:function(t,e){e.value=t}},watch:{"$attrs.value":function(t){this.lines=t},lines:function(t){this.$emit("input",t)}}},o=n("KHd+"),a=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"chest-lines"},[t.preview?n("section",{ref:"preview",staticClass:"my-3"},t._l(t.preview,(function(e,r){return n("div",{staticClass:"row mb-3"},[n("div",{staticClass:"col-12"},[n("strong",[t._v(t._s(e.name))])]),t._v(" "),n("div",{staticClass:"col-12"},["url"===e.type?n("a",{attrs:{href:e.value,target:"_blank"}},[t._v(t._s(e.value))]):"password"===e.type?n("div",{staticClass:"input-group input-group-sm"},[n("input",{staticClass:"form-control",attrs:{type:"password",autocomplete:"off",readonly:""},domProps:{value:e.value}}),t._v(" "),n("div",{staticClass:"input-group-append"},[n("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:function(e){return t.toggleShowPassword(e,r)}}},[t._v(t._s(t.__("Show")))]),t._v(" "),n("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:function(n){return t.copyToClipboard(n,e.value)}}},[t._v(t._s(t.__("Copy")))])])]):"code"===e.type?n("pre",{staticClass:"border p-2"},[n("code",[t._v(t._s(e.value))])]):n("span",[t._v(t._s(e.value))])])])})),0):n("section",{ref:"form"},[n("draggable",t._b({attrs:{group:"lines",handle:".handle-order"},on:{start:function(e){t.drag=!0},end:function(e){t.drag=!1}},model:{value:t.lines,callback:function(e){t.lines=e},expression:"lines"}},"draggable",t.dragOptions,!1),[n("transition-group",{attrs:{type:"transition",tag:"div",name:t.drag?null:"flip-list"}},t._l(t.lines,(function(e,r){return n("div",{key:"item-"+r,staticClass:"form-group"},[n("div",{staticClass:"row row-line"},[n("div",{staticClass:"col-12 col-md-4"},[n("div",{staticClass:"input-group"},[n("div",{staticClass:"input-group-prepend"},[n("button",{staticClass:"btn btn-outline-secondary dropdown-toggle",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[t._v(t._s(t.types[e.type]))]),t._v(" "),n("div",{staticClass:"dropdown-menu"},t._l(t.types,(function(r,i){return n("a",{staticClass:"dropdown-item",class:{active:i===e.type},on:{click:function(t){t.preventDefault(),e.type=i}}},[t._v(t._s(r))])})),0)]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.name,expression:"item.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:t.__("Name")},domProps:{value:e.name},on:{input:function(n){n.target.composing||t.$set(e,"name",n.target.value)}}})])]),t._v(" "),n("div",{staticClass:"col-12 col-md-8"},[n("div",{staticClass:"input-group"},["code"===e.type?n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"item.value"}],staticClass:"form-control",attrs:{rows:"5",name:"value"},domProps:{value:e.value},on:{input:function(n){n.target.composing||t.$set(e,"value",n.target.value)}}}):n("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"item.value"}],staticClass:"form-control",attrs:{type:"text",name:"value",autocomplete:"off"},domProps:{value:e.value},on:{input:function(n){n.target.composing||t.$set(e,"value",n.target.value)}}}),t._v(" "),n("div",{staticClass:"input-group-append"},["password"===e.type?n("password-generator",{attrs:{original:e.value},on:{generated:function(n){return t.setPassword(n,e)}}}):t._e(),t._v(" "),n("confirm",{staticClass:"btn btn-outline-secondary",attrs:{tag:"button",text:"","text-confirm":""},on:{confirmed:function(n){return t.deleteLine(e)}}}),t._v(" "),n("button",{staticClass:"btn btn-outline-secondary handle-order",attrs:{type:"button"}},[n("i",{staticClass:"fas fa-arrows-alt"})])],1)])])])])})),0)],1),t._v(" "),n("div",{staticClass:"form-group text-right"},t._l(t.types,(function(e,r){return n("button",{staticClass:"btn btn-outline-secondary mr-1",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.addLine(r)}}},[t._v(t._s(t.__("Add"))+" "+t._s(e))])})),0)],1)])}),[],!1,null,null,null);e.default=a.exports},"0fPN":function(t,e,n){"use strict";e.a={data:function(){return{formErrors:{}}},methods:{setFormError:function(t){this.formErrors=t.response.data.errors},hasFormError:function(t){return this.formErrors.hasOwnProperty(t)},firstFormError:function(t){return this.hasFormError(t)?this.formErrors[t][0]:null},resetFormError:function(){this.formErrors={}}}}},"1IHE":function(t,e,n){"use strict";var r={data:function(){return{httpError:{}}},methods:{setHttpError:function(t){this.httpError=t.response.data.message||null},hasHttpError:function(t){return this.httpError},getHttpError:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.hasHttpError()?this.httpError:t},toastHttpError:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.getHttpError(t);this.$toasted.error(e)}}};e.a=r},"1dGX":function(t,e,n){"use strict";e.Any=n("y8fO"),e.Cc=n("p7ys"),e.Cf=n("b9EY"),e.P=n("fKCf"),e.Z=n("T8I8")},"4dkW":function(t,e,n){"use strict";n.r(e);var r={data:function(){return{options:[],loading:!1}},mounted:function(){this.fetch()},methods:{fetch:function(){var t=this;this.loading=!0,axios.get("/api/tags").then((function(e){t.loading=!1,t.options=e.data})).catch((function(e){t.loading=!1,t.$toasted.error(t.__("Can't fetch tags")),console.log(e)}))},select:function(t){this.$attrs.value.push(t),this.$emit("input",this.$attrs.value)},deselect:function(t){this.$attrs.value.splice(this.$attrs.value.indexOf(t),1),this.$emit("input",this.$attrs.value)},create:function(t){this.options.push(t),this.$attrs.value.push(t)}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("multiselect",{attrs:{value:t.$attrs.value,"tag-placeholder":t.__("Create tag"),selectLabel:t.__("Click to select"),deselectLabel:t.__("Click to select"),noOptions:t.__("No tag"),placeholder:t.__("Search or type a tag"),"open-direction":"bottom",options:t.options,multiple:!0,taggable:!0,loading:t.loading,closeOnSelect:!1},on:{tag:t.create,select:t.select,remove:t.deselect}})}),[],!1,null,null,null);e.default=o.exports},"5lKZ":function(t,e,n){"use strict";n.r(e);var r=n("YLgT"),i=n.n(r),o=n("0fPN"),a=n("1IHE"),s={mixins:[i.a,o.a,a.a],props:{story:{type:Object,required:!1,default:function(){}}},data:function(){return{form:{title:"",slug:"",content:"",is_private:!1,is_pinned:!1,tags:[]},loading:!1,editor:{minHeight:"300px",language:document.getElementsByTagName("html")[0].getAttribute("lang")||"en",useCommandShortcut:!0,useDefaultHTMLSanitizer:!0,usageStatistics:!1,hideModeSwitch:!0,toolbarItems:["heading","bold","italic","strike","divider","hr","quote","divider","ul","ol","task","indent","outdent","divider","table","image","link","divider","code","codeblock"]}}},mounted:function(){this.story&&(this.form=this.story),this.startAudit()},methods:{submit:function(t){var e=this;this.loading=!0,axios.request({method:this.story?"PUT":"POST",url:this.story?this.story.url_update:"/api/story",data:this.form}).then((function(n){switch(e.clearAudit(),e.$toasted.success(e.__("Saved")),t){case"view":window.location=n.data.post.url;break;case"new":window.location="/story/create";break;case"edit":window.location="/story/".concat(n.data.post.postable_id,"/edit")}})).catch((function(t){e.loading=!1,e.setFormError(t),e.setHttpError(t),e.toastHttpError(e.__("Can't save"))}))}},computed:{fullUrl:function(){return"".concat(window.location.origin,"/").concat(this.form.slug)}},watch:{"form.title":function(t){this.form.slug=t.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"")}}},l=n("KHd+"),c=Object(l.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--story"},[n("div",{staticClass:"card-body"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"title"}},[t._v(t._s(t.__("Title")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.title,expression:"form.title"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("title")},attrs:{type:"text",id:"title",disabled:t.loading},domProps:{value:t.form.title},on:{input:function(e){e.target.composing||t.$set(t.form,"title",e.target.value)}}}),t._v(" "),t.hasFormError("title")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("title")))]):t._e(),t._v(" "),n("p",{staticClass:"text-muted"},[n("small",[t._v(t._s(t.fullUrl))])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"content"}},[t._v(t._s(t.__("Content")))]),t._v(" "),n("editor",{attrs:{id:"content",height:"auto",previewStyle:"tab",options:t.editor},model:{value:t.form.content,callback:function(e){t.$set(t.form,"content",e)},expression:"form.content"}})],1),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-md-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_private,expression:"form.is_private"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_private",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_private)?t._i(t.form.is_private,null)>-1:t.form.is_private},on:{change:function(e){var n=t.form.is_private,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_private",n.concat([null])):o>-1&&t.$set(t.form,"is_private",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_private",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_private",dusk:"story-form-private"}},[t._v(t._s(t.__("Is private?")))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_pinned,expression:"form.is_pinned"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_pinned",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_pinned)?t._i(t.form.is_pinned,null)>-1:t.form.is_pinned},on:{change:function(e){var n=t.form.is_pinned,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_pinned",n.concat([null])):o>-1&&t.$set(t.form,"is_pinned",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_pinned",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_pinned",dusk:"story-form-pinned"}},[t._v(t._s(t.__("Is pinned?")))])])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Tags")))]),t._v(" "),n("tags",{model:{value:t.form.tags,callback:function(e){t.$set(t.form,"tags",e)},expression:"form.tags"}})],1)]),t._v(" "),n("div",{staticClass:"card-footer"},[n("div",{staticClass:"btn-group"},[n("button",{staticClass:"btn btn-primary",class:{"btn-danger":t.hasChanged},attrs:{type:"button",disabled:t.loading,dusk:"story-form-save"},on:{click:function(e){return e.preventDefault(),t.submit("edit")}}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Save"))+"\n ")]),t._v(" "),n("button",{staticClass:"btn btn-primary dropdown-toggle dropdown-toggle-split",class:{"btn-danger":t.hasChanged},attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}}),t._v(" "),n("div",{staticClass:"dropdown-menu"},[n("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.submit("view")}}},[t._v(t._s(t.__("Save & View")))]),t._v(" "),n("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.submit("new")}}},[t._v(t._s(t.__("Save & New")))])])]),t._v(" "),t.story?n("a",{staticClass:"btn btn-outline-primary",attrs:{href:t.story.url}},[t._v(t._s(t.__("View")))]):t._e()])])}),[],!1,null,null,null);e.default=c.exports},"8/rJ":function(t,e,n){"use strict";n.r(e);var r={mixins:[n("1IHE").a],props:{type:{type:String,required:!0},text:{type:String,required:!0}},data:function(){return{loading:!1,status:null}},methods:{check:function(){var t=this;this.loading=!0,axios.get("/api/manage/features/".concat(this.type)).then((function(e){t.status=e.data.status,t.clear()})).catch((function(e){t.status="fail",t.setHttpError(e),t.toastHttpError(t.__("Whoops!")),t.clear()}))},clear:function(){var t=this;this.loading=!1,setTimeout((function(){t.status=null}),5e3)}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{class:{"btn-outline-danger":"fail"===t.status,"btn-outline-success":"success"===t.status},attrs:{type:"button",disabled:t.loading},on:{click:t.check}},[t.loading||null!==t.status?"success"===t.status?n("span",[t._v(t._s(t.__("Success")))]):"fail"===t.status?n("span",[t._v(t._s(t.__("Fail")))]):n("span",[n("div",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status"}})]):n("span",[t._v(t._s(t.text))])])}),[],!1,null,null,null);e.default=o.exports},"8oxB":function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var t=s(f);u=!0;for(var e=c.length;e;){for(l=c,c=[];++d1)for(var n=1;n0&&document.getSelection().getRangeAt(0);r.select(),r.setSelectionRange(0,999999),document.execCommand("copy"),document.body.removeChild(r),a&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(a)),r.contentEditable=i,r.readOnly=o}}}},BEtg:function(t,e){t.exports=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}},FOBs:function(t,e,n){"use strict";n.r(e);function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o={data:function(){return{users:[],loading:!1,creating:!1,editing:!1}},mounted:function(){this.fetch()},methods:{fetch:function(){var t=this;this.loading=!0,axios.get("/api/manage/users").then((function(e){t.loading=!1,t.users=e.data.data})).catch((function(e){t.loading=!1,t.$toasted.error(t.__("Unable to load users"))}))},remove:function(t){var e=this;this.loading=!0,axios.delete("/api/manage/users/".concat(t.id)).then((function(t){e.$toasted.success(e.__("Deleted")),e.fetch()})).catch((function(t){"error"===t.response.data.status?e.$toasted.error(t.response.data.message):e.$toasted.error(e.__("Can't delete")),e.loading=!1}))},add:function(){this.creating=!0,this.editing=!1},edit:function(t){this.creating=!1,this.editing=function(t){for(var e=1;e0?n("table",{staticClass:"table table-borderless table-sm"},[n("thead",[n("tr",[n("th",{staticClass:"w-75"},[t._v(t._s(t.__("URL")))]),t._v(" "),n("th",{staticClass:"w-25"},[t._v(t._s(t.__("Expiration")))])])]),t._v(" "),n("tbody",t._l(t.shares,(function(e){return n("tr",[n("td",[n("div",{staticClass:"input-group input-group-sm"},[n("input",{staticClass:"form-control",attrs:{type:"text"},domProps:{value:e.url}}),t._v(" "),n("div",{staticClass:"input-group-append"},[n("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:function(n){return t.copyToClipboard(n,e.url)}}},[t._v(t._s(t.__("Copy")))])])])]),t._v(" "),n("td",[t._v(t._s(e.expires_at))])])})),0)]):n("div",{staticClass:"alert alert-info"},[t._v(t._s(t.__("This content is not actually shared")))])]},proxy:!0}])})}),[],!1,null,null,null);e.default=s.exports},G1fO:function(t,e,n){"use strict";n.r(e);var r={props:{comment:{type:Object,required:!0}},computed:{unvisibleComment:function(){return this.isLogged()&&!1===this.comment.is_visible}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"comment"},[n("div",{staticClass:"d-flex justify-content-between"},[n("span",[t.unvisibleComment?n("i",{staticClass:"fas fa-exclamation-triangle mr-1"}):t._e(),t._v(" "),n("strong",[t._v(t._s(t.comment.name))]),t._v(" "),n("small",[t._v(t._s(t.comment.date_formated))])]),t._v(" "),n("span",[t.unvisibleComment?n("confirm",{staticClass:"text-info mr-1",attrs:{tag:"a",text:"","text-confirm":""},on:{confirmed:function(e){return t.$bus.$emit("moderate",t.comment)}}}):t._e(),t._v(" "),t.isLogged()?n("confirm",{staticClass:"text-info mr-1",attrs:{tag:"a",text:"","text-confirm":""},on:{confirmed:function(e){return t.$bus.$emit("delete",t.comment)}}}):t._e(),t._v(" "),n("a",{staticClass:"text-info",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.$bus.$emit("reply",t.comment)}}},[n("i",{staticClass:"fas fa-reply"})])],1)]),t._v(" "),n("p",{staticClass:"mb-0"},[t._v(t._s(t.comment.content))])]),t._v(" "),t._l(t.comment.comments,(function(e){return t.comment.comments.length>0?n("comment",{key:e.id,staticClass:"replies",attrs:{comment:e}}):t._e()}))],2)}),[],!1,null,null,null);e.default=o.exports},GYWy:function(t,e,n){(function(t,r){var i;!function(o){e&&e.nodeType,t&&t.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,l=2147483647,c=36,u=1,d=26,f=38,p=700,m=72,h=128,_="-",v=/^xn--/,g=/[^\x20-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=c-u,C=Math.floor,T=String.fromCharCode;function w(t){throw new RangeError(b[t])}function I(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function S(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+I((t=t.replace(E,".")).split("."),e).join(".")}function O(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=T((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=T(t)})).join("")}function R(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function A(t,e,n){var r=0;for(t=n?C(t/p):t>>1,t+=C(t/e);t>y*d>>1;r+=c)t=C(t/y);return C(r+(y+1)*t/(t+f))}function N(t){var e,n,r,i,o,a,s,f,p,v,g,E=[],b=t.length,y=0,T=h,I=m;for((n=t.lastIndexOf(_))<0&&(n=0),r=0;r=128&&w("not-basic"),E.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=b&&w("invalid-input"),((f=(g=t.charCodeAt(i++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:c)>=c||f>C((l-y)/a))&&w("overflow"),y+=f*a,!(f<(p=s<=I?u:s>=I+d?d:s-I));s+=c)a>C(l/(v=c-p))&&w("overflow"),a*=v;I=A(y-o,e=E.length+1,0==o),C(y/e)>l-T&&w("overflow"),T+=C(y/e),y%=e,E.splice(y++,0,T)}return D(E)}function k(t){var e,n,r,i,o,a,s,f,p,v,g,E,b,y,I,S=[];for(E=(t=O(t)).length,e=h,n=0,o=m,a=0;a=e&&gC((l-n)/(b=r+1))&&w("overflow"),n+=(s-e)*b,e=s,a=0;al&&w("overflow"),g==e){for(f=n,p=c;!(f<(v=p<=o?u:p>=o+d?d:p-o));p+=c)I=f-v,y=c-v,S.push(T(R(v+I%y,0))),f=C(I/y);S.push(T(R(f,0))),o=A(n,b,r==i),n=0,++r}++n,++e}return S.join("")}s={version:"1.4.1",ucs2:{decode:O,encode:D},decode:N,encode:k,toASCII:function(t){return S(t,(function(t){return g.test(t)?"xn--"+k(t):t}))},toUnicode:function(t){return S(t,(function(t){return v.test(t)?N(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return s}.call(e,n,e,t))||(t.exports=i)}()}).call(this,n("YuTi")(t),n("yLpj"))},HHJa:function(t,e){t.exports={methods:{isLogged:function(){return null!==this.user()},user:function(){return window.user||null}}}},"JX/T":function(t,e,n){"use strict";n.r(e);var r={props:{url:{type:String,required:!0}},data:function(){return{query:null,results:{},loading:!1,selected:null,history:[],focused:!1}},mounted:function(){var t=this;this.fetchHistory(),document.addEventListener("keydown",(function(e){-1!==["/"].indexOf(e.key)&&function(t){return"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName}(e)&&(e.preventDefault(),e.stopPropagation(),t.$refs.input.focus())}))},methods:{search:function(){var t=this;this.loading=!0,axios.post(this.url,{query:this.query}).then((function(e){t.loading=!1,200===e.status&&(t.results=e.data,t.selected=null,t.addHistory(t.query))})).catch((function(e){t.loading=!1,console.log(e)}))},hide:function(){this.query=null,this.results={},this.selected=null},choose:function(){this.selected&&this.displaySearchHistory&&(this.query=this.selected),this.selected&&this.hasResults&&(window.location=this.selected.url)},move:function(t){this.displaySearchHistory?this.moveIn(this.history,t):this.hasResults?this.moveIn(this.results.posts,t):this.selected=null},moveIn:function(t,e){var n=this.selected?t.indexOf(this.selected):null,r=t.length-1;"down"===e&&(this.selected=null===n||n===r?t[0]:t[n+1]),"up"===e&&(this.selected=null===n||0===n?t[r]:t[n-1])},fetchHistory:function(){var t=localStorage.getItem("searchHistory")||null;if(t)try{this.history=JSON.parse(t)}catch(t){console.log("Unable to parse search history from local storage")}},addHistory:function(t){!1!==this.hasResults&&-1===this.history.indexOf(t)&&(this.history.unshift(t),this.history=this.history.slice(0,5),localStorage.setItem("searchHistory",JSON.stringify(this.history)))}},computed:{hasResults:function(){return this.hasTagsResults||this.hasPostsResults},hasTagsResults:function(){return this.results.hasOwnProperty("tags")&&this.results.tags.length>0},hasPostsResults:function(){return this.results.hasOwnProperty("posts")&&this.results.posts.length>0},displaySearchHistory:function(){return this.history.length>0&&null===this.query&&this.focused},displayNoResultIndicator:function(){return null!==this.query&&this.query.length>=3&&!1===this.loading&&!1===this.hasResults}},watch:{query:_.debounce((function(t){t&&t.length>=3&&this.search(t),0===t.length&&this.hide()}),200)}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{staticClass:"form-inline"},[n("div",{staticClass:"search-input-wrapper"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.query,expression:"query"}],ref:"input",staticClass:"form-control",attrs:{type:"search",placeholder:t.__("Type / to search")},domProps:{value:t.query},on:{focus:function(e){t.focused=!0},blur:function(e){t.focused=!1},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.stopPropagation(),t.move("down"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.stopPropagation(),t.move("up"))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),e.stopPropagation(),t.choose(e))}],input:function(e){e.target.composing||(t.query=e.target.value)}}}),t._v(" "),t.loading?n("div",{staticClass:"spinner-border spinner-border-sm text-info",attrs:{role:"status"}}):t._e(),t._v(" "),t.displayNoResultIndicator?n("span",{staticClass:"badge badge-info text-white",attrs:{role:"status"}},[t._v("\n "+t._s(t.__("No result"))+"\n ")]):t._e()]),t._v(" "),n("div",{directives:[{name:"on-clickaway",rawName:"v-on-clickaway",value:t.hide,expression:"hide"}],staticClass:"list-group results mt-1",class:{active:t.hasResults||t.displaySearchHistory}},[t._l(t.history,(function(e){return t.displaySearchHistory?n("a",{staticClass:"list-group-item list-group-item-action",class:{active:t.selected===e}},[n("span",[n("i",{staticClass:"fas fa-history fa-fw mr-1"}),t._v(" "+t._s(e))])]):t._e()})),t._v(" "),t.hasTagsResults?n("div",{staticClass:"list-group-item"},[n("div",[n("i",{staticClass:"fas fa-tags"}),t._v(" "+t._s(t.__("Tags")))]),t._v(" "),n("div",t._l(t.results.tags,(function(e){return n("a",{staticClass:"btn btn-primary btn-sm mr-1",attrs:{href:e.url}},[t._v("\n "+t._s(e.name)+"\n ")])})),0)]):t._e(),t._v(" "),t._l(t.results.posts,(function(e,r){return t.hasPostsResults?n("a",{staticClass:"list-group-item list-group-item-action",class:{active:t.selected===e},attrs:{href:e.url}},[n("div",[n("span",[t._v(t._s(e.type)+" —")]),t._v(" "),n("strong",[t._v(t._s(e.title))])]),t._v(" "),e.tags.length>0?n("div",t._l(e.tags,(function(e){return n("span",{staticClass:"badge badge-secondary mr-1"},[t._v(t._s(e))])})),0):t._e()]):t._e()}))],2)])}),[],!1,null,null,null);e.default=o.exports},K3gU:function(t,e,n){"use strict";n.r(e);var r={mixins:[n("1IHE").a],data:function(){return{archives:[],loading:!0}},mounted:function(){this.fetch()},methods:{fetch:function(){var t=this;this.loading=!0,axios.get("/api/manage/archives").then((function(e){t.archives=e.data,t.loading=!1})).catch((function(e){t.setHttpError(e),t.toastHttpError(t.__("Can't fetch archives"))}))},deleteArchive:function(t){var e=this;axios.delete(t.url_archive).then((function(t){e.$toasted.success(t.data.message),e.fetch()})).catch((function(t){e.setHttpError(t),e.toastHttpError(e.__("Whoops!"))}))}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card"},[n("div",{staticClass:"card-header"},[n("i",{staticClass:"fas fa-archive mr-1"}),t._v("\n "+t._s(t.__("Archives"))+"\n ")]),t._v(" "),t.loading?n("div",{staticClass:"card-body"},[n("loader",{attrs:{loading:t.loading}})],1):n("div",{staticClass:"card-body"},[0===t.archives.length?n("div",{staticClass:"alert alert-info"},[t._v("\n "+t._s(t.__("No archive"))+"\n ")]):n("div",{staticClass:"table-responsive"},[n("table",{staticClass:"table table-borderless table-sm"},[n("thead",[n("tr",[n("th",[t._v(t._s(t.__("Link")))]),t._v(" "),n("th",[t._v(t._s(t.__("Actions")))])])]),t._v(" "),n("tbody",t._l(t.archives,(function(e){return n("tr",[n("td",{staticClass:"align-middle"},[-1!==["pdf"].indexOf(e.extension)?n("span",[n("i",{staticClass:"fas fa-file-pdf mr-1"})]):-1!==["mp4","webm","mpeg","avi","mkv"].indexOf(e.extension)?n("span",[n("i",{staticClass:"fas fa-file-video mr-1"})]):-1!==["mp3","wav","flac"].indexOf(e.extension)?n("span",[n("i",{staticClass:"fas fa-file-audio mr-1"})]):n("span",[n("i",{staticClass:"fas fa-file mr-1"})]),t._v(" "),n("a",{attrs:{href:e.permalink}},[t._v("\n "+t._s(e.title.substr(0,40))+"\n "),e.title.lenght>=40?n("span",[t._v("...")]):t._e()]),t._v(" "),n("small",{staticClass:"text-muted"},[t._v(t._s(e.size))])]),t._v(" "),n("td",[n("div",{staticClass:"dropdown"},[n("button",{staticClass:"btn btn-outline-secondary btn-sm dropdown-toggle",attrs:{type:"button",id:"dropdownMenuButton","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[t._v("\n "+t._s(t.__("More"))+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[n("a",{staticClass:"dropdown-item",attrs:{href:e.url_download}},[n("i",{staticClass:"fas fa-file-download fa-fw mr-1"}),t._v(" "+t._s(t.__("Download"))+"\n ")]),t._v(" "),n("confirm",{staticClass:"dropdown-item",attrs:{text:" "+t.__("Delete"),"text-confirm":" "+t.__("Confirm")},on:{confirmed:function(n){return t.deleteArchive(e)}}})],1)])])])})),0)])])])])}),[],!1,null,null,null);e.default=o.exports},"KHd+":function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):i&&(l=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return r}))},KL6o:function(t,e,n){"use strict";n.r(e);var r={props:{enabled:{type:Boolean,required:!0},stats:{type:Object,required:!1,default:function(){}}},data:function(){return{types:[{type:"dead",name:this.__("Dead (4xx)"),loading:!1},{type:"error",name:this.__("Error (5xx)"),loading:!1},{type:"redirect",name:this.__("Redirect (3xx)"),loading:!1}],links:{dead:[],error:[],redirect:[]}}},mounted:function(){var t=this;this.types.forEach((function(e){t.fetch(e)}))},methods:{fetch:function(t){var e=this;0!==(this.stats[t.type]||0)&&(t.loading=!0,axios.get("/api/manage/links-health/".concat(t.type)).then((function(n){e.links[t.type]=n.data.data,t.loading=!1})).catch((function(e){t.loading=!1})))}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.enabled?n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-md-6 col-lg-4"},[n("div",{staticClass:"card mb-4"},[n("div",{staticClass:"card-body"},[n("small",{staticClass:"card-title font-weight-bold text-muted"},[t._v(t._s(t.__("Links watched")))]),t._v(" "),n("h3",{staticClass:"text-right text-capitalize"},[t._v(t._s(t.stats.total))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6 col-lg-4"},[n("div",{staticClass:"card mb-4"},[n("div",{staticClass:"card-body"},[n("small",{staticClass:"card-title font-weight-bold text-muted"},[t._v(t._s(t.__("Links not watched")))]),t._v(" "),n("h3",{staticClass:"text-right text-capitalize"},[t._v(t._s(t.stats.disabled))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6 col-lg-4"},[n("div",{staticClass:"card mb-4"},[n("div",{staticClass:"card-body"},[n("small",{staticClass:"card-title font-weight-bold text-muted"},[t._v(t._s(t.__("Live (2xx)")))]),t._v(" "),n("h3",{staticClass:"text-right text-capitalize",class:{"text-success":t.stats.live>0}},[t._v("\n "+t._s(t.stats.live)+"\n ")])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6 col-lg-4"},[n("div",{staticClass:"card mb-4"},[n("div",{staticClass:"card-body"},[n("small",{staticClass:"card-title font-weight-bold text-muted"},[t._v(t._s(t.__("Redirect (3xx)")))]),t._v(" "),n("h3",{staticClass:"text-right text-capitalize"},[t._v(t._s(t.stats.redirect))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6 col-lg-4"},[n("div",{staticClass:"card mb-4"},[n("div",{staticClass:"card-body"},[n("small",{staticClass:"card-title font-weight-bold text-muted"},[t._v(t._s(t.__("Dead (4xx)")))]),t._v(" "),n("h3",{staticClass:"text-right text-capitalize",class:{"text-danger":t.stats.dead>0}},[t._v("\n "+t._s(t.stats.dead)+"\n ")])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6 col-lg-4"},[n("div",{staticClass:"card mb-4"},[n("div",{staticClass:"card-body"},[n("small",{staticClass:"card-title font-weight-bold text-muted"},[t._v(t._s(t.__("Error (5xx)")))]),t._v(" "),n("h3",{staticClass:"text-right text-capitalize",class:{"text-danger":t.stats.error>0}},[t._v("\n "+t._s(t.stats.error)+"\n ")])])])])]):t._e(),t._v(" "),n("div",{staticClass:"card"},[n("div",{staticClass:"card-header"},[n("i",{staticClass:"fas fa-heartbeat mr-1"}),t._v("\n "+t._s(t.__("Links health"))+"\n ")]),t._v(" "),n("div",{staticClass:"card-body"},[t.enabled?n("div",t._l(t.types,(function(e){return n("div",[n("div",{staticClass:"card-title"},[t._v(t._s(e.name))]),t._v(" "),e.loading?n("div",{staticClass:"alert alert-info"},[t._v("\n "+t._s(t.__("Loading"))+"\n ")]):t._e(),t._v(" "),0===t.stats[e.type]?n("div",{staticClass:"alert alert-success"},[t._v("\n "+t._s(t.__("No problem found"))+"\n ")]):n("div",{staticClass:"table-responsive"},[n("table",{staticClass:"table table-borderless table-sm"},[n("thead",[n("tr",[n("th",[t._v(t._s(t.__("Link")))]),t._v(" "),n("th",[t._v(t._s(t.__("Status")))]),t._v(" "),n("th",[t._v(t._s(t.__("Last checked")))])])]),t._v(" "),n("tbody",t._l(t.links[e.type],(function(e){return n("tr",[n("td",{staticClass:"align-middle"},[n("a",{attrs:{href:e.permalink}},[t._v("\n "+t._s(e.title.substr(0,40))+"\n "),e.title.lenght>=40?n("span",[t._v("...")]):t._e()])]),t._v(" "),n("td",[t._v("\n "+t._s(e.http_status)+"\n ")]),t._v(" "),n("td",[t._v("\n "+t._s(e.http_checked_at_formated)+"\n ")])])})),0)])])])})),0):n("div",{staticClass:"alert alert-info mb-0"},[t._v("\n "+t._s(t.__("Health checks for links are disabled"))+"\n ")])])])])}),[],!1,null,null,null);e.default=o.exports},LP8H:function(t,e,n){"use strict";n.r(e);var r=n("1IHE"),i={mixins:[n("0fPN").a,r.a],data:function(){return{walls:[],loading:!0,open:!1,form:null}},mounted:function(){this.fetch()},methods:{fetch:function(){var t=this;this.loading=!0,axios.get("/api/manage/walls").then((function(e){t.walls=e.data,t.loading=!1})).catch((function(e){t.loading=!1,t.setHttpError(e),t.toastHttpError(t.__("Can't fetch walls"))}))},create:function(){this.form={title:"",slug:"",restrict_tags:[],restrict_cards:[],appearance:{columns:2,show_tags:!1,compact:!1},is_default:!1,is_private:!1},this.open=!0},edit:function(t){this.form=t,this.open=!0},submit:function(){var t=this,e=this.form.id?{title:this.form.title,slug:this.form.slug,appearance:this.form.appearance,is_default:this.form.is_default,is_private:this.form.is_private,restrict_tags:this.form.restrict_tags,restrict_cards:this.form.restrict_cards}:this.form;axios.request({method:this.form.id?"PUT":"POST",url:this.form.id?"/api/manage/walls/".concat(this.form.id):"/api/manage/walls",data:e}).then((function(e){t.open=!1,t.$toasted.success(t.__("Saved")),t.resetFormError(),window.location.reload()})).catch((function(e){t.setFormError(e),t.setHttpError(e),t.toastHttpError(t.__("Can't save"))}))},remove:function(t){var e=this;this.loading=!0,axios.delete("/api/manage/walls/".concat(t.id)).then((function(t){e.$toasted.success(e.__("Deleted")),window.location.reload()})).catch((function(t){e.loading=!1,e.setHttpError(t),e.toastHttpError(e.__("Can't delete"))}))},listRestrictions:function(t){return t&&t.length>0?t.join(", "):"-"}},watch:{"form.title":{handler:function(t){var e=t.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"");e!==this.form.slug&&(this.form.slug=e)},deep:!0}}},o=n("KHd+"),a=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card"},[n("div",{staticClass:"card-header d-flex justify-content-between align-items-center"},[n("span",[n("i",{staticClass:"fas fa-bookmark mr-1"}),t._v(" "+t._s(t.__("Walls"))+"\n ")]),t._v(" "),n("button",{staticClass:"btn btn-primary btn-sm text-white",on:{click:function(e){return e.preventDefault(),t.create(e)}}},[t._v(t._s(t.__("Add")))])]),t._v(" "),t.loading?n("div",{staticClass:"card-body"},[n("loader",{attrs:{loading:t.loading}})],1):n("div",{staticClass:"card-body"},[0===t.walls.length?n("div",{staticClass:"alert alert-info"},[t._v("\n "+t._s(t.__("No wall"))+"\n ")]):n("div",{staticClass:"table-responsive"},[n("table",{staticClass:"table table-borderless table-sm"},[n("thead",[n("tr",[t._m(0),t._v(" "),t._m(1),t._v(" "),n("th",[t._v(t._s(t.__("Name")))]),t._v(" "),n("th",[t._v(t._s(t.__("Tags")))]),t._v(" "),n("th",[t._v(t._s(t.__("Cards")))]),t._v(" "),n("th",[t._v(t._s(t.__("Actions")))])])]),t._v(" "),n("tbody",t._l(t.walls,(function(e){return n("tr",[e.is_default?n("td",[n("i",{staticClass:"fa fa-star"})]):n("td",[t._v("-")]),t._v(" "),e.is_private?n("td",[n("i",{staticClass:"fa fa-lock"})]):n("td",[t._v("-")]),t._v(" "),n("td",[t._v("\n "+t._s(e.title)+"\n ")]),t._v(" "),n("td",[t._v(t._s(t.listRestrictions(e.restrict_tags)))]),t._v(" "),n("td",[t._v(t._s(t.listRestrictions(e.restrict_cards)))]),t._v(" "),n("td",[n("div",{staticClass:"dropdown"},[n("button",{staticClass:"btn btn-outline-secondary btn-sm dropdown-toggle",attrs:{type:"button",id:"dropdownMenuButton","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[t._v("\n "+t._s(t.__("More"))+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[n("a",{staticClass:"dropdown-item",attrs:{href:"#"},on:{click:function(n){return n.preventDefault(),t.edit(e)}}},[n("i",{staticClass:"fas fa-pen-alt fa-fw mr-1"}),t._v(" "+t._s(t.__("Edit"))+"\n ")]),t._v(" "),n("confirm",{staticClass:"dropdown-item",attrs:{text:" "+t.__("Delete"),"text-confirm":" "+t.__("Confirm")},on:{confirmed:function(n){return t.remove(e)}}})],1)])])])})),0)])]),t._v(" "),n("modal",{attrs:{open:t.open},on:{closed:function(e){t.open=!1}},scopedSlots:t._u([{key:"header",fn:function(){return[t._v(t._s(t.form&&t.form.id?t.__("Edit"):t.__("Create")))]},proxy:!0},{key:"content",fn:function(){return[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"title"}},[t._v(t._s(t.__("Title")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.title,expression:"form.title"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("title")},attrs:{type:"text",id:"title",required:""},domProps:{value:t.form.title},on:{input:function(e){e.target.composing||t.$set(t.form,"title",e.target.value)}}}),t._v(" "),t.hasFormError("title")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("title")))]):t._e()]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"slug"}},[t._v(t._s(t.__("Slug")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.slug,expression:"form.slug"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("slug")},attrs:{type:"text",id:"slug",required:""},domProps:{value:t.form.slug},on:{input:function(e){e.target.composing||t.$set(t.form,"slug",e.target.value)}}}),t._v(" "),t.hasFormError("slug")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("slug")))]):t._e()]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Restrict tags")))]),t._v(" "),n("tags",{model:{value:t.form.restrict_tags,callback:function(e){t.$set(t.form,"restrict_tags",e)},expression:"form.restrict_tags"}})],1),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Restrict cards")))]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.form.restrict_cards,expression:"form.restrict_cards"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("restrict_cards")},attrs:{id:"restrict_cards",multiple:""},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"restrict_cards",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:"link"}},[t._v(t._s(t.__("Link")))]),t._v(" "),n("option",{attrs:{value:"story"}},[t._v(t._s(t.__("Story")))]),t._v(" "),n("option",{attrs:{value:"album"}},[t._v(t._s(t.__("Album")))]),t._v(" "),n("option",{attrs:{value:"chest"}},[t._v(t._s(t.__("Chest")))])]),t._v(" "),t.hasFormError("restrict_cards")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("restrict_cards")))]):t._e()]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Columns to show")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.appearance.columns,expression:"form.appearance.columns"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("columns")},attrs:{type:"number",id:"columns_count",step:"1",min:"1",max:"4"},domProps:{value:t.form.appearance.columns},on:{input:function(e){e.target.composing||t.$set(t.form.appearance,"columns",e.target.value)}}}),t._v(" "),t.hasFormError("columns")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("columns")))]):t._e()]),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.appearance.show_tags,expression:"form.appearance.show_tags"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"show_tags"},domProps:{checked:Array.isArray(t.form.appearance.show_tags)?t._i(t.form.appearance.show_tags,null)>-1:t.form.appearance.show_tags},on:{change:function(e){var n=t.form.appearance.show_tags,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form.appearance,"show_tags",n.concat([null])):o>-1&&t.$set(t.form.appearance,"show_tags",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form.appearance,"show_tags",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"show_tags"}},[t._v(t._s(t.__("Show tags")))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.appearance.compact,expression:"form.appearance.compact"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"compact"},domProps:{checked:Array.isArray(t.form.appearance.compact)?t._i(t.form.appearance.compact,null)>-1:t.form.appearance.compact},on:{change:function(e){var n=t.form.appearance.compact,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form.appearance,"compact",n.concat([null])):o>-1&&t.$set(t.form.appearance,"compact",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form.appearance,"compact",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"compact"}},[t._v(t._s(t.__("Compact cards list")))])])])])]),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_private,expression:"form.is_private"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_private",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_private)?t._i(t.form.is_private,null)>-1:t.form.is_private},on:{change:function(e){var n=t.form.is_private,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_private",n.concat([null])):o>-1&&t.$set(t.form,"is_private",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_private",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_private",dusk:"wall-form-private"}},[t._v(t._s(t.__("Is private?")))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_default,expression:"form.is_default"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_default",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_default)?t._i(t.form.is_default,null)>-1:t.form.is_default},on:{change:function(e){var n=t.form.is_default,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_default",n.concat([null])):o>-1&&t.$set(t.form,"is_default",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_default",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_default",dusk:"wall-form-private"}},[t._v(t._s(t.__("Is default?")))])])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("button",{staticClass:"btn btn-outline-primary",attrs:{type:"button",disabled:t.loading},on:{click:function(e){return e.preventDefault(),t.submit(e)}}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Save"))+"\n ")])])]},proxy:!0}],null,!1,3711445900)})],1)])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("th",[e("i",{staticClass:"fas fa-star"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("th",[e("i",{staticClass:"fas fa-lock"})])}],!1,null,null,null);e.default=a.exports},MX7w:function(t,e,n){"use strict";n.r(e);var r=n("9B9B"),i={mixins:[n.n(r).a],props:{single:{type:Boolean,required:!1,default:!1},chest:{type:Object,required:!0,default:function(){}}},data:function(){return{edit:!1}},methods:{remove:function(){var t=this;axios.delete(this.chest.url_delete).then((function(e){t.$toasted.success(t.__("Deleted")),t.single?window.location="/":window.location.reload()})).catch((function(e){t.$toasted.error(t.__("Can't delete"))}))},copyAll:function(t){var e="";this.chest.content.forEach((function(t){t.name&&(e+="".concat(t.name,": ")),e+="code"===t.type?"\n".concat(t.value,"\n"):"".concat(t.value,"\n")})),this.copyToClipboard(t,e)}}},o=n("KHd+"),a=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--chest mb-4",class:{"card-single":t.single,"card-index":!t.single}},[n("div",{staticClass:"card-body"},[n("h5",{staticClass:"card-title"},[t.chest.is_pinned&&!t.single?n("i",{staticClass:"fas fa-thumbtack fa-sm pr-1"}):t._e(),t._v(" "),n("span",[t._v(t._s(t.__("Chest")))]),t._v(" — "),n("a",{attrs:{href:t.chest.permalink}},[t._v(t._s(t.chest.title))])]),t._v(" "),n("div",{staticClass:"card-content"},[n("chest-lines",{attrs:{preview:t.chest.content}})],1),t._v(" "),t.chest.tags.length>0?n("p",{staticClass:"card-text mt-1"},t._l(t.chest.tags,(function(e){return n("a",{staticClass:"badge badge-secondary mr-1",attrs:{href:"/tag/"+e}},[t._v(t._s(e))])})),0):t._e()]),t._v(" "),n("div",{staticClass:"card-footer d-flex justify-content-between"},[n("span",[t.chest.is_private?n("i",{staticClass:"fas fa-lock pr-2"}):t._e(),t._v(t._s(t.chest.date_formated))]),t._v(" "),n("div",{staticClass:"dropdown"},[n("button",{staticClass:"btn btn-outline-dark btn-sm dropdown-toggle",attrs:{type:"button",id:"dropdownMenuButton","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",dusk:"chest-card-more"}},[t._v("\n "+t._s(t.__("More"))+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[n("a",{staticClass:"dropdown-item",attrs:{href:t.chest.permalink,dusk:"chest-card-permalink"}},[n("i",{staticClass:"fas fa-link fa-fw mr-1"}),t._v(" "+t._s(t.__("Permalink"))+"\n ")]),t._v(" "),n("button",{staticClass:"dropdown-item",attrs:{type:"button",dusk:"chest-card-copy"},on:{click:t.copyAll}},[n("i",{staticClass:"fas fa-copy fa-fw mr-1"}),t._v(" "+t._s(t.__("Copy all"))+"\n ")]),t._v(" "),t.chest.editable?n("h6",{staticClass:"dropdown-header"},[t._v(t._s(t.__("Manage")))]):t._e(),t._v(" "),t.chest.editable?n("a",{staticClass:"dropdown-item",attrs:{dusk:"chest-card-temp-share"},on:{click:function(e){return t.$bus.$emit("share",t.chest)}}},[n("i",{staticClass:"fas fa-share-square fa-fw mr-1"}),t._v(" "+t._s(t.__("Temp sharing"))+"\n ")]):t._e(),t._v(" "),t.chest.editable?n("a",{staticClass:"dropdown-item",attrs:{href:t.chest.url_edit,dusk:"chest-card-edit"}},[n("i",{staticClass:"fas fa-pen-alt fa-fw mr-1"}),t._v(" "+t._s(t.__("Edit"))+"\n ")]):t._e(),t._v(" "),t.chest.editable?n("confirm",{staticClass:"dropdown-item",attrs:{text:" "+t.__("Delete"),"text-confirm":" "+t.__("Confirm"),dusk:"chest-card-remove"},on:{confirmed:t.remove}}):t._e()],1)])])])}),[],!1,null,null,null);e.default=a.exports},NyNk:function(t,e,n){"use strict";n.r(e);var r={mixins:[n("1IHE").a],data:function(){return{tags:[],loading:!0,editing:null,edit:null}},mounted:function(){this.fetch()},methods:{fetch:function(){var t=this;this.loading=!0,axios.get("/api/manage/tags").then((function(e){t.tags=e.data,t.loading=!1})).catch((function(e){t.setHttpError(e),t.toastHttpError(t.__("Can't fetch tags"))}))},move:function(t,e){var n=this;"none"!==e&&confirm(this.__("All elements tagged :from will be moved to :to. Selected tag will be deleted. Are you sure?",{from:t,to:e}))&&(this.loading=!0,axios.post("/api/manage/tags/".concat(t,"/move/").concat(e)).then((function(r){n.$toasted.success(n.__("Elements tagged :from have been moved to :to.",{from:t,to:e})),n.fetch()})).catch((function(t){n.$toasted.error(n.__("Can't save"))})))},remove:function(t){var e=this;this.loading=!0,axios.delete("/api/manage/tags/".concat(t.name)).then((function(t){e.$toasted.success(e.__("Deleted")),e.fetch()})).catch((function(t){e.$toasted.error(e.__("Can't delete"))}))},rename:function(){var t=this;this.editing.name!==this.edit&&axios.put("/api/manage/tags/".concat(this.editing.name,"/rename/").concat(this.edit)).then((function(e){t.$toasted.success(t.__("Saved")),t.fetch()})).catch((function(e){t.$toasted.error(t.__("Can't save"))})),this.editing=null,this.edit=null}},watch:{editing:function(t){var e=this;null!==t&&this.$nextTick((function(){e.edit=t.name;var n="input#input".concat(t.id);document.querySelector(n).focus()})),this.edit=null}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card"},[n("div",{staticClass:"card-header"},[n("i",{staticClass:"fas fa-tags mr-1"}),t._v("\n "+t._s(t.__("Tags"))+"\n ")]),t._v(" "),t.loading?n("div",{staticClass:"card-body"},[n("loader",{attrs:{loading:t.loading}})],1):n("div",{staticClass:"card-body"},[0===t.tags.length?n("div",{staticClass:"alert alert-info"},[t._v("\n "+t._s(t.__("No tag"))+"\n ")]):n("div",{staticClass:"table-responsive"},[n("table",{staticClass:"table table-borderless table-sm"},[n("thead",[n("tr",[n("th",{staticClass:"w-25"},[t._v(t._s(t.__("Name")))]),t._v(" "),n("th",[t._v(t._s(t.__("Posts")))]),t._v(" "),n("th",{staticClass:"w-50"},[t._v(t._s(t.__("Actions")))])])]),t._v(" "),n("tbody",t._l(t.tags,(function(e){return n("tr",[n("td",{staticClass:"align-middle"},[null!==t.editing&&t.editing.id===e.id?n("div",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.edit,expression:"edit"}],staticClass:"form-control",attrs:{type:"text",id:"input"+e.id},domProps:{value:t.edit},on:{input:function(e){e.target.composing||(t.edit=e.target.value)}}})]):n("div",[n("a",{attrs:{href:"/tag/"+e.name}},[t._v(t._s(e.name))])])]),t._v(" "),n("td",{staticClass:"align-middle"},[t._v(t._s(e.posts_count))]),t._v(" "),n("td",{staticClass:"d-flex justify-content-between"},[null===t.editing||null!==t.editing&&t.editing.id!==e.id?n("button",{staticClass:"btn btn-outline-secondary btn-sm mr-1",attrs:{type:"button",disabled:null!==t.editing&&t.editing.id!==e.id},on:{click:function(n){n.preventDefault(),t.editing=e}}},[n("i",{staticClass:"fas fa-edit"})]):n("button",{staticClass:"btn btn-outline-secondary btn-sm mr-1",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.rename()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.rename())}}},[n("i",{staticClass:"fas fa-check"})]),t._v(" "),n("select",{staticClass:"form-control custom-select mr-1 w-auto flex-grow-1",attrs:{name:"tag",id:"tag"},on:{change:function(n){return t.move(e.name,n.target.value)}}},[n("option",{attrs:{value:"none"}},[t._v("-- "+t._s(t.__("Move"))+" --")]),t._v(" "),t._l(t.tags,(function(r){return e.name!==r.name?n("option",{domProps:{value:r.name,textContent:t._s(r.name)}}):t._e()}))],2),t._v(" "),n("confirm",{staticClass:"btn btn-danger btn-sm",attrs:{tag:"button",text:t.__("Delete"),"text-confirm":t.__("Confirm")},on:{confirmed:function(n){return t.remove(e)}}})],1)])})),0)])])])])}),[],!1,null,null,null);e.default=o.exports},S4HP:function(t,e,n){"use strict";n.r(e);var r={props:{loading:{type:Boolean,required:!1,default:!1}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this.$createElement,e=this._self._c||t;return this.loading?e("div",{staticClass:"d-flex align-content-center align-items-center"},[e("div",{staticClass:"spinner-grow mr-2",attrs:{role:"status"}}),this._v(" "),e("div",[this._v(this._s(this.__("Loading")))])]):this._e()}),[],!1,null,null,null);e.default=o.exports},T8I8:function(t,e){t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},TfHT:function(t,e,n){"use strict";n.r(e);var r=n("0fPN"),i=n("1IHE");function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"comment_id";return t.filter((function(t){return t[r]===n})).map((function(n){return a({},n,{comments:e.nested(t,n.id)})}))},removeReply:function(){this.comment.comment=null},initFromStorage:function(){var t=JSON.parse(localStorage.getItem("comment"));null!==t&&!1===this.isLogged()&&(this.comment.name=t.name||null,this.comment.email=t.email||null)},commentToStorage:function(){localStorage.setItem("comment",JSON.stringify({name:this.comment.name,email:this.comment.email}))},getRandomId:function(){return Math.floor(Math.random()*Math.floor(999999))}},watch:{"comment.comment":function(t){this.$refs.commentFormContent.focus()},"comment.name":_.debounce((function(t){this.commentToStorage()}),200),"comment.email":_.debounce((function(t){this.commentToStorage()}),200)},computed:{canAddComment:function(){return this.isLogged()||this.allowGuest},canSubmit:function(){var t=this.comment.content&&this.comment.content.length>=3,e=this.comment.captcha&&this.comment.captcha.length>0;return this.isLogged()?!0===t:!0===t&&!0===e}}},c=n("KHd+"),u=Object(c.a)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--comments"},[n("div",{staticClass:"card-header d-flex justify-content-between"},[t._v("\n "+t._s(t.__("Comments"))+"\n "),n("span",{staticClass:"d-block badge text-white",class:{"badge-info":t.count>0,"badge-default":0===t.count}},[t._v(t._s(t.count))])]),t._v(" "),n("div",{staticClass:"card-body"},[t.loading?n("loader",{attrs:{loading:t.loading}}):n("div",[0===t.comments.length?n("div",{staticClass:"alert alert-info mb-0"},[t._v(t._s(t.__("No comments")))]):t._e(),t._v(" "),t._l(t.comments,(function(t){return n("comment",{key:t.id,attrs:{comment:t}})}))],2)],1),t._v(" "),t.canAddComment?n("div",{staticClass:"card-footer"},[n("h5",{staticClass:"card-title d-flex justify-content-between flex-wrap"},[t._v("\n "+t._s(t.__("New comment"))+"\n "),t.comment.comment?n("small",[n("i",{staticClass:"fas fa-reply mr-1"}),t._v(" "+t._s(t.__("Replying to :name",{name:t.comment.comment.name}))+"\n ")]):t._e()]),t._v(" "),!1===t.isLogged()?n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.comment.name,expression:"comment.name"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("name")},attrs:{type:"text",placeholder:t.__("Name"),required:""},domProps:{value:t.comment.name},on:{input:function(e){e.target.composing||t.$set(t.comment,"name",e.target.value)}}}),t._v(" "),t.hasFormError("name")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("name")))]):t._e()])]),t._v(" "),n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.comment.email,expression:"comment.email"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("email")},attrs:{type:"email",placeholder:t.__("E-Mail Address"),required:""},domProps:{value:t.comment.email},on:{input:function(e){e.target.composing||t.$set(t.comment,"email",e.target.value)}}}),t._v(" "),t.hasFormError("email")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("email")))]):t._e()])])]):t._e(),t._v(" "),n("div",{staticClass:"form-group"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.comment.content,expression:"comment.content"}],ref:"commentFormContent",staticClass:"form-control",class:{"is-invalid":t.hasFormError("content")},attrs:{placeholder:t.__("Content"),required:""},domProps:{value:t.comment.content},on:{input:function(e){e.target.composing||t.$set(t.comment,"content",e.target.value)}}}),t._v(" "),t.hasFormError("content")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("content")))]):t._e()]),t._v(" "),n("div",{staticClass:"row"},[t.captcha&&!1===t.isLogged()?n("div",{staticClass:"col-12 col-md-8 mb-1 d-flex"},[n("img",{staticClass:"d-inline-block mr-md-1 mb-1 mb-md-0 mx-auto mx-md-0",staticStyle:{"border-radius":"1rem",width:"150px",height:"40px"},attrs:{src:t.captcha.img,alt:"Captcha"}}),t._v(" "),n("div",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.comment.captcha,expression:"comment.captcha"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("captcha")},attrs:{type:"text",placeholder:t.__("Captcha")},domProps:{value:t.comment.captcha},on:{input:function(e){e.target.composing||t.$set(t.comment,"captcha",e.target.value)}}}),t._v(" "),t.hasFormError("captcha")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("captcha")))]):t._e()])]):t._e(),t._v(" "),n("div",{staticClass:"col-12 col-md-4"},[n("button",{staticClass:"btn btn-primary btn-block",attrs:{type:"button",disabled:t.loading||!1===t.canSubmit},on:{click:function(e){return e.preventDefault(),t.submit(e)}}},[t._v(t._s(t.__("Save")))])])])]):t._e()])}),[],!1,null,null,null);e.default=u.exports},URgk:function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n("YBdB"),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n("yLpj"))},XHP3:function(t,e){t.exports={methods:{__:function(t,e){var n=window.i18n[t]?window.i18n[t]:t;return _.forEach(e,(function(t,e){n=n.replace(":"+e,t)})),n}}}},YBdB:function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,l=1,c={},u=!1,d=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){m(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){m(t.data)},r=function(t){o.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(t){var e=d.createElement("script");e.onreadystatechange=function(){m(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(m,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&m(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n0&&void 0!==arguments[0]?arguments[0]:16,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.alphabet(e),r=n.length,i="";i.length0&&void 0!==arguments[0])||arguments[0];return["abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ","1234567890","~!?@#$%&^_*+-=[]€,;:|()[]{}"].slice(0,t?4:3).join("")}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"btn-group",attrs:{role:"group"}},[t._m(0),t._v(" "),n("div",{staticClass:"dropdown-menu"},[n("h6",{staticClass:"dropdown-header"},[t._v(t._s(t.__("Alpha numeric with symbols")))]),t._v(" "),n("button",{staticClass:"dropdown-item",on:{click:function(e){return t.generate(8)}}},[t._v(t._s(t.__(":size chars",{size:8})))]),t._v(" "),n("button",{staticClass:"dropdown-item",on:{click:function(e){return t.generate(16)}}},[t._v(t._s(t.__(":size chars",{size:16})))]),t._v(" "),n("button",{staticClass:"dropdown-item",on:{click:function(e){return t.generate(24)}}},[t._v(t._s(t.__(":size chars",{size:24})))]),t._v(" "),n("h6",{staticClass:"dropdown-header"},[t._v(t._s(t.__("Alpha numeric only")))]),t._v(" "),n("button",{staticClass:"dropdown-item",on:{click:function(e){return t.generate(8,!1)}}},[t._v(t._s(t.__(":size chars",{size:8})))]),t._v(" "),n("button",{staticClass:"dropdown-item",on:{click:function(e){return t.generate(16,!1)}}},[t._v(t._s(t.__(":size chars",{size:16})))]),t._v(" "),n("button",{staticClass:"dropdown-item",on:{click:function(e){return t.generate(24,!1)}}},[t._v(t._s(t.__(":size chars",{size:24})))])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-outline-secondary border-right-0 dropdown-toggle",staticStyle:{"border-radius":"0"},attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[e("i",{staticClass:"fas fa-dice pr-1"})])}],!1,null,null,null);e.default=o.exports},b9EY:function(t,e){t.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},bUC5:function(t,e,n){"use strict";n.r(e);var r=n("XHP3"),i=n.n(r),o=n("HHJa"),a=n.n(o);function s(t){var e=new t;Object.defineProperties(e,{on:{get:function(){return this.$on.bind(this)}},once:{get:function(){return this.$once.bind(this)}},off:{get:function(){return this.$off.bind(this)}},emit:{get:function(){return this.$emit.bind(this)}}}),Object.defineProperty(t,"bus",{get:function(){return e}}),Object.defineProperty(t.prototype,"$bus",{get:function(){return e}})}"undefined"!=typeof window&&window.Vue&&window.Vue.use(s);var l=s,c=n("pl0M"),u=n.n(c),d=n("jl8+"),f=n.n(d),p=n("VH6O"),m=n.n(p),h=["load","change","stateChange","focus","blur"],_=["insertText","setValue","setMarkdown","setHtml","reset"],v={name:"TuiEditor",props:{previewStyle:{type:String},height:{type:String},value:{type:String},mode:{type:String},options:{type:Object},html:{type:String},visible:{type:Boolean,default:!0}},data:()=>({editor:null}),computed:{editorOptions(){const t=Object.assign({},this.options);return t.initialValue=this.value,t.initialEditType=this.mode,t.height=this.height,t.previewStyle=this.previewStyle,t}},watch:{previewStyle(t){this.editor.changePreviewStyle(t)},value(t,e){t!==e&&t!==this.editor.getValue()&&this.editor.setValue(t)},height(t){this.editor.height(t)},mode(t){this.editor.changeMode(t)},html(t){this.editor.setHtml(t),this.$emit("input",this.editor.getValue())},visible(t){t?this.editor.show():this.editor.hide()}},mounted(){const t={};h.forEach(e=>{t[e]=(...t)=>{this.$emit(e,...t)}});const e=Object.assign(this.editorOptions,{el:this.$refs.tuiEditor,events:t});this.editor=new m.a(e),this.$listeners.input&&this.editor.on("change",()=>{this.$emit("input",this.editor.getValue())})},destroyed(){h.forEach(t=>{this.editor.off(t)}),this.editor.remove()},methods:{invoke(t,...e){let n=null;return this.editor[t]&&(n=this.editor[t](...e),_.indexOf(t)>-1&&this.$emit("input",this.editor.getValue())),n}}},g=n("KHd+"),E=Object(g.a)(v,(function(){var t=this.$createElement;return(this._self._c||t)("div",{ref:"tuiEditor"})}),[],!1,null,null,null).exports,b={name:"TuiEditorViewer",props:{height:{type:String},value:{type:String},exts:{type:Array}},data:()=>({editor:null}),watch:{value(t,e){t!==e&&this.editor.setValue(t)}},mounted(){const t={};h.forEach(e=>{t[e]=(...t)=>{this.$emit(e,...t)}}),this.editor=m.a.factory({el:this.$refs.tuiEditorViewer,exts:this.exts,events:t,initialValue:this.value,height:this.height,viewer:!0})},destroyed(){h.forEach(t=>{this.editor.off(t)}),this.editor.remove()},methods:{invoke(t,...e){let n=null;return this.editor[t]&&(n=this.editor[t](...e)),n}}},y=Object(g.a)(b,(function(){var t=this.$createElement;return(this._self._c||t)("div",{ref:"tuiEditorViewer"})}),[],!1,null,null,null).exports,C=n("x9sl"),T=n("MQ60"),w=n.n(T),I=n("la7V"),S=n("EaH7");window._=n("LvDl");try{window.Popper=n("8L3F").default,window.$=window.jQuery=n("EVdn"),n("SYky")}catch(t){}window.axios=n("vDqi"),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var O=document.head.querySelector('meta[name="csrf-token"]');O?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=O.content:console.error("CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token");var D=document.head.querySelector('meta[name="api-token"]');D&&(window.axios.defaults.headers.common.Authorization="Bearer "+D.content),window.Vue=n("XuX8"),Vue.mixin(i.a),Vue.mixin(a.a),Vue.use(l),Vue.use(u.a,{position:"top-center",duration:5e3}),Vue.component("multiselect",f.a),Vue.component("editor",E),Vue.component("viewer",y),Vue.directive("on-clickaway",C.directive),Vue.component("draggable",w.a),Vue.use(I.default),Vue.use(S.default);var R=n("+fAT");R.keys().map((function(t){return Vue.component(t.split("/").pop().split(".")[0],R(t).default)}));new Vue({el:"#app",data:function(){return{pwa:!1,online:!0,prompt:null}},created:function(){var t=this;this.registerServiceWorker(),window.addEventListener("online",(function(){t.online=!0})),window.addEventListener("offline",(function(){t.online=!1})),window.addEventListener("beforeinstallprompt",(function(e){t.prompt=e}))},methods:{registerServiceWorker:function(){"serviceWorker"in navigator&&(navigator.serviceWorker.controller?this.pwa=!0:navigator.serviceWorker.register("sw.js",{scope:"/"}))},installPwa:function(t){var e=this;this.prompt.prompt(),this.prompt.userChoice.then((function(t){e.prompt=null}))}}})},bVTN:function(t,e,n){"use strict";n.r(e);var r=n("0fPN"),i={mixins:[r.a],props:{editing:{type:Object|Boolean,required:!0,default:!1}},data:function(){return{form:{name:"",email:"",is_admin:!1,password:"",password_confirmation:""},loading:!1}},mounted:function(){!1!==this.editing&&this.setUser(this.editing)},methods:{submit:function(){var t=this;this.loading=!0;var e=!1!==this.editing;axios.request({method:e?"PUT":"POST",url:e?this.editing.url_update:"/api/manage/users",data:this.form}).then((function(e){t.$toasted.success(t.__("Saved")),t.editing?t.loading=!1:t.form={name:"",email:"",is_admin:!1,password:"",password_confirmation:""},t.resetFormError(),t.$emit("submited")})).catch((function(e){console.log(e),"error"===e.response.data.status?t.$toasted.error(e.response.data.message):t.$toasted.error(t.__("Can't save")),t.setFormError(e),t.loading=!1}))},setUser:function(t){this.form={name:"",email:"",is_admin:!1,password:"",password_confirmation:""},this.resetFormError(),t&&(this.form.name=t.name,this.form.email=t.email,this.form.is_admin=t.is_admin)}},watch:{editing:function(t){this.setUser(t)}}},o=n("KHd+"),a=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"col-xs-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"name"}},[t._v(t._s(t.__("Name")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.name,expression:"form.name"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("name")},attrs:{type:"text",id:"name",disabled:t.loading},domProps:{value:t.form.name},on:{input:function(e){e.target.composing||t.$set(t.form,"name",e.target.value)}}}),t._v(" "),t.hasFormError("name")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("name")))]):t._e()])]),t._v(" "),n("div",{staticClass:"col-xs-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"email"}},[t._v(t._s(t.__("E-Mail Address")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.email,expression:"form.email"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("email")},attrs:{type:"text",id:"email",disabled:t.loading},domProps:{value:t.form.email},on:{input:function(e){e.target.composing||t.$set(t.form,"email",e.target.value)}}}),t._v(" "),t.hasFormError("email")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("email")))]):t._e()])])]),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-xs-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"password"}},[t._v(t._s(t.__("Password")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.password,expression:"form.password"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("password")},attrs:{type:"password",id:"password",disabled:t.loading},domProps:{value:t.form.password},on:{input:function(e){e.target.composing||t.$set(t.form,"password",e.target.value)}}}),t._v(" "),t.hasFormError("password")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("password")))]):t._e()])]),t._v(" "),n("div",{staticClass:"col-xs-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"password_confirmation"}},[t._v(t._s(t.__("Confirm Password")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.password_confirmation,expression:"form.password_confirmation"}],staticClass:"form-control",attrs:{type:"password",id:"password_confirmation",disabled:t.loading},domProps:{value:t.form.password_confirmation},on:{input:function(e){e.target.composing||t.$set(t.form,"password_confirmation",e.target.value)}}})])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_admin,expression:"form.is_admin"}],staticClass:"custom-control-input",class:{"is-invalid":t.hasFormError("is_admin")},attrs:{type:"checkbox",id:"is_admin",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_admin)?t._i(t.form.is_admin,null)>-1:t.form.is_admin},on:{change:function(e){var n=t.form.is_admin,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_admin",n.concat([null])):o>-1&&t.$set(t.form,"is_admin",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_admin",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_admin"}},[t._v(t._s(t.__("Is admin?")))])]),t._v(" "),n("span",{staticClass:"text-muted"},[t._v(t._s(t.__("Admin users can access settings and other users private content")))])]),t._v(" "),n("button",{staticClass:"btn btn-primary",attrs:{disabled:t.loading},on:{click:function(e){return e.preventDefault(),t.submit(e)}}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Save"))+"\n ")])])}),[],!1,null,null,null);e.default=a.exports},cNyC:function(t,e,n){"use strict";n.r(e);var r={props:{tag:{type:String,required:!1,default:"a"},text:{type:String,required:!1,default:"Click"},textConfirm:{type:String,required:!1,default:"Confirm"},duration:{type:Number,required:!1,default:2e3},href:{type:null|String,required:!1,default:null}},data:function(){return{clicked:!1}},methods:{click:function(){var t=this;if(this.clicked)return this.confirmed();this.clicked=!0,setTimeout((function(){t.clicked=!1}),this.duration)},confirmed:function(){this.href&&(window.location=this.href),this.$emit("confirmed")}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.tag,{tag:"component",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.click(e)}}},[t.clicked?n("span",{domProps:{innerHTML:t._s(t.textConfirm)}}):n("span",{domProps:{innerHTML:t._s(t.text)}})])}),[],!1,null,null,null);e.default=o.exports},fKCf:function(t,e){t.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},idfw:function(t,e,n){"use strict";n.r(e);var r={props:{single:{type:Boolean,required:!1,default:!1},album:{type:Object,required:!0,default:function(){}}},methods:{remove:function(){var t=this;axios.delete(this.album.url_delete).then((function(e){t.$toasted.success(t.__("Deleted")),t.single?window.location="/":window.location.reload()})).catch((function(e){t.$toasted.error(t.__("Can't delete"))}))}},computed:{images:function(){if(this.single)return this.album.images;var t=this.album.images.length,e=t>4?4:t;return this.album.images.slice(0,e)},imagesCols:function(){return this.single?{default:4,1e3:3,700:2,400:1}:{default:2}}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--album mb-4",class:{"card-single":t.single,"card-index":!t.single}},[n("div",{staticClass:"card-body"},[n("h5",{staticClass:"card-title"},[t.album.is_pinned&&!t.single?n("i",{staticClass:"fas fa-thumbtack fa-sm pr-1"}):t._e(),t._v(" "),n("span",[t._v(t._s(t.__("Album")))]),t._v(" — "),n("a",{attrs:{href:t.album.permalink}},[t._v(t._s(t.album.title))]),n("br")]),t._v(" "),n("p",{staticClass:"card-content",domProps:{innerHTML:t._s(t.album.content)}}),t._v(" "),t.images?n("masonry",{staticClass:"mb-1",attrs:{cols:t.imagesCols,gutter:5}},t._l(t.images,(function(e){return n("div",{key:e.name},[n("img",{directives:[{name:"img",rawName:"v-img",value:{src:e.url_full,group:t.album.permalink},expression:"{src: image.url_full, group: album.permalink}"}],staticClass:"img-fluid mb-1",attrs:{src:e.url_thumb||e.url_full,alt:e.name}})])})),0):t._e(),t._v(" "),!t.single&&t.album.images.length>4?n("p",{staticClass:"text-right small mb-0"},[n("i",{staticClass:"fas fa-plus mr-1"}),t._v(" "+t._s(t.album.images.length-t.images.length)+"\n ")]):t._e(),t._v(" "),t.album.tags.length>0?n("p",{staticClass:"card-text mt-1"},t._l(t.album.tags,(function(e){return n("a",{staticClass:"badge badge-secondary mr-1",attrs:{href:"/tag/"+e}},[t._v(t._s(e))])})),0):t._e()],1),t._v(" "),n("div",{staticClass:"card-footer d-flex justify-content-between"},[n("span",[t.album.is_private?n("i",{staticClass:"fas fa-lock pr-2"}):t._e(),t._v(t._s(t.album.date_formated))]),t._v(" "),n("div",{staticClass:"dropdown"},[n("button",{staticClass:"btn btn-outline-dark btn-sm dropdown-toggle",attrs:{type:"button",id:"dropdownMenuButton","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",dusk:"album-card-more"}},[t._v("\n "+t._s(t.__("More"))+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[n("a",{staticClass:"dropdown-item",attrs:{href:t.album.permalink,dusk:"album-card-permalink"}},[n("i",{staticClass:"fas fa-link fa-fw mr-1"}),t._v(" "+t._s(t.__("Permalink"))+"\n ")]),t._v(" "),t.album.url_download?n("a",{staticClass:"dropdown-item",attrs:{href:t.album.url_download,dusk:"album-card-download"}},[n("i",{staticClass:"fas fa-file-download fa-fw mr-1"}),t._v(" "+t._s(t.__("Download"))+"\n ")]):t._e(),t._v(" "),t.album.editable?n("h6",{staticClass:"dropdown-header"},[t._v(t._s(t.__("Manage")))]):t._e(),t._v(" "),t.album.editable?n("a",{staticClass:"dropdown-item",attrs:{dusk:"album-card-temp-share"},on:{click:function(e){return t.$bus.$emit("share",t.album)}}},[n("i",{staticClass:"fas fa-share-square fa-fw mr-1"}),t._v(" "+t._s(t.__("Temp sharing"))+"\n ")]):t._e(),t._v(" "),t.album.editable?n("a",{staticClass:"dropdown-item",attrs:{href:t.album.url_edit,dusk:"album-card-edit"}},[n("i",{staticClass:"fas fa-pen-alt fa-fw mr-1"}),t._v(" "+t._s(t.__("Edit"))+"\n ")]):t._e(),t._v(" "),t.album.editable?n("confirm",{staticClass:"dropdown-item",attrs:{text:" "+t.__("Delete"),"text-confirm":" "+t.__("Confirm"),dusk:"album-card-remove"},on:{confirmed:t.remove}}):t._e()],1)])])])}),[],!1,null,null,null);e.default=o.exports},iyXs:function(t,e,n){"use strict";n.r(e);var r={props:{name:{type:String,required:!0},values:{type:Object,required:!1,default:null}},data:function(){return{type:"image",original:null,gradient:{start:null,end:null,orientation:0},image:{base64:null}}},mounted:function(){this.values&&(this.type=this.values.type,"gradient"===this.type&&(this.gradient.start=this.values.start||null,this.gradient.end=this.values.end||null,this.gradient.orientation=this.values.orientation||90)),this.original=$("body").css("background-image")},methods:{handleFile:function(t){var e=this,n=t.target.files[0],r=new FileReader;!1!==n.type.match("image/*")&&(r.onload=function(){e.image.base64=r.result},r.readAsDataURL(n))},setBackground:function(){"none"===this.type&&$("body").css("background-image",""),"image"===this.type&&$("body").css({"background-image":this.backgroundImage,"background-size":"cover","background-repeat":"no-repeat","background-position":"center center"}),"gradient"===this.type&&$("body").css("background-image",this.backgroundGradient)}},computed:{backgroundGradient:function(){return this.gradient.start&&this.gradient.end?"linear-gradient(".concat(this.gradient.orientation,"deg, ").concat(this.gradient.start," 0%, ").concat(this.gradient.end," 100%)"):null},backgroundImage:function(){return this.image.base64?'url("'.concat(this.image.base64,'")'):null},data:function(){var t=JSON.stringify({type:"none"});return"gradient"===this.type&&this.backgroundGradient&&(t=JSON.stringify({type:"gradient",start:this.gradient.start,end:this.gradient.end,orientation:this.gradient.orientation})),"image"===this.type&&(this.backgroundImage||this.values.file)&&(t=JSON.stringify({type:"image",base64:this.image.base64||null})),t}},watch:{type:function(t){this.setBackground()},backgroundImage:function(t){this.setBackground()},backgroundGradient:function(t){this.setBackground()}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"form-group"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.type,expression:"type"}],staticClass:"form-control custom-select",attrs:{id:"type"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.type=e.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"none"}},[t._v(t._s(t.__("None")))]),t._v(" "),n("option",{attrs:{value:"image"}},[t._v(t._s(t.__("Image")))]),t._v(" "),n("option",{attrs:{value:"gradient"}},[t._v(t._s(t.__("Gradient")))])])]),t._v(" "),"image"===t.type?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"col-12"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-file"},[n("label",{staticClass:"custom-file-label",attrs:{for:"file","data-browse":t.__("Choose")}},[t._v(t._s(t.__("File")))]),t._v(" "),n("input",{staticClass:"custom-file-input",attrs:{type:"file",id:"file",accept:"image/*"},domProps:{value:t.image.name},on:{change:t.handleFile}})])])])])]):t._e(),t._v(" "),"gradient"===t.type?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"col-md-4"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"start"}},[t._v(t._s(t.__("Color #:number",{number:1})))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.gradient.start,expression:"gradient.start"}],staticClass:"form-control",attrs:{type:"color",id:"start"},domProps:{value:t.gradient.start},on:{input:function(e){e.target.composing||t.$set(t.gradient,"start",e.target.value)}}})])]),t._v(" "),n("div",{staticClass:"col-md-4"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"end"}},[t._v(t._s(t.__("Color #:number",{number:2})))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.gradient.end,expression:"gradient.end"}],staticClass:"form-control",attrs:{type:"color",id:"end"},domProps:{value:t.gradient.end},on:{input:function(e){e.target.composing||t.$set(t.gradient,"end",e.target.value)}}})])]),t._v(" "),n("div",{staticClass:"col-md-4"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"orientation"}},[t._v(t._s(t.__("Orientation")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.gradient.orientation,expression:"gradient.orientation"}],staticClass:"form-control",attrs:{type:"number",id:"orientation",min:"0",max:"360",step:"5"},domProps:{value:t.gradient.orientation},on:{input:function(e){e.target.composing||t.$set(t.gradient,"orientation",e.target.value)}}})])])])]):t._e(),t._v(" "),n("input",{attrs:{type:"hidden",name:t.name,id:"name"},domProps:{value:t.data}})])}),[],!1,null,null,null);e.default=o.exports},jPMG:function(t,e,n){"use strict";n.r(e);var r={props:{endpoint:{type:String,required:!0}},methods:{purge:function(){var t=this;axios.post(this.endpoint).then((function(e){t.$toasted.success(t.__("Logins history has been purged")),window.location.reload()})).catch((function(e){console.log(e),t.$toasted.error(t.__("Unable to purge logins history"))}))}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this.$createElement;return(this._self._c||t)("confirm",{attrs:{text:this.__("Purge"),"text-confirm":this.__("Confirm")},on:{confirmed:this.purge}})}),[],!1,null,null,null);e.default=o.exports},kuJz:function(t,e,n){"use strict";n.r(e);var r={props:{single:{type:Boolean,required:!1,default:!1},link:{type:Object,required:!0,default:function(){}}},methods:{remove:function(){var t=this;axios.delete(this.link.url_delete).then((function(e){t.$toasted.success(t.__("Deleted")),t.single?window.location="/":window.location.reload()})).catch((function(e){t.$toasted.error(t.__("Can't delete"))}))}},computed:{displayUrl:function(){var t=this.link.url;if(t.length>65){var e=t.substr(0,62);return"".concat(e,"...")}return t},waybackUrl:function(){return"https://web.archive.org/web/"+encodeURIComponent(this.link.url)}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--link mb-4",class:{"card-single":t.single,"card-index":!t.single}},[n("div",{staticClass:"card-body"},[n("h5",{staticClass:"card-title"},[t.link.is_pinned&&!t.single?n("i",{staticClass:"fas fa-thumbtack fa-sm pr-1"}):t._e(),t._v(" "),n("span",[t._v(t._s(t.__("Link")))]),t._v(" —\n "),n("a",{attrs:{href:t.link.permalink,title:t.link.title}},[t._v(t._s(t.link.title))]),n("br"),t._v(" "),n("a",{staticClass:"small text-muted",attrs:{href:t.link.url}},[t._v(t._s(t.displayUrl))])]),t._v(" "),t.link.http_status>=300?n("div",{class:"alert alert-"+t.link.http_status_color+" d-flex flex-column flex-lg-row justify-content-between align-items-center",attrs:{role:"alert"}},[n("span",[t._v(t._s(t.__("This link seems to be broken"))+" ("+t._s(t.link.http_status)+")")]),t._v(" "),t.link.http_checked_at_formated?n("small",[t._v(t._s(t.link.http_checked_at_formated))]):t._e()]):t._e(),t._v(" "),n("p",{staticClass:"card-content",domProps:{innerHTML:t._s(t.link.content)}}),t._v(" "),t.link.preview?n("div",{staticClass:"card-preview mb-1",domProps:{innerHTML:t._s(t.link.preview)}}):t._e(),t._v(" "),t.link.tags.length>0?n("p",{staticClass:"card-text mt-1"},t._l(t.link.tags,(function(e){return n("a",{staticClass:"badge badge-secondary mr-1",attrs:{href:"/tag/"+e}},[t._v(t._s(e))])})),0):t._e()]),t._v(" "),n("div",{staticClass:"card-footer d-flex justify-content-between align-items-center"},[n("span",[t.link.is_private?n("i",{staticClass:"fas fa-lock pr-2"}):t._e(),t._v(" "+t._s(t.link.date_formated)+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown"},[n("button",{staticClass:"btn btn-outline-dark btn-sm dropdown-toggle",attrs:{type:"button",id:"dropdownMenuButton","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",dusk:"link-card-more"}},[t._v("\n "+t._s(t.__("More"))+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[n("a",{staticClass:"dropdown-item",attrs:{href:t.link.permalink,dusk:"link-card-permalink"}},[n("i",{staticClass:"fas fa-link fa-fw mr-1"}),t._v(" "+t._s(t.__("Permalink"))+"\n ")]),t._v(" "),n("a",{staticClass:"dropdown-item",attrs:{href:t.waybackUrl,target:"_blank",dusk:"link-card-archiveorg-link"}},[n("i",{staticClass:"fas fa-history fa-fw mr-1"}),t._v(" "+t._s(t.__("View on archive.org"))+"\n ")]),t._v(" "),t.link.url_download?n("a",{staticClass:"dropdown-item",attrs:{href:t.link.url_download,dusk:"link-card-download-link"}},[n("i",{staticClass:"fas fa-file-download fa-fw mr-1"}),t._v(" "+t._s(t.__("Download"))+"\n ")]):t._e(),t._v(" "),t.link.editable?n("h6",{staticClass:"dropdown-header"},[t._v(t._s(t.__("Manage")))]):t._e(),t._v(" "),t.link.editable?n("a",{staticClass:"dropdown-item",attrs:{dusk:"link-card-temp-share"},on:{click:function(e){return t.$bus.$emit("share",t.link)}}},[n("i",{staticClass:"fas fa-share-square fa-fw mr-1"}),t._v(" "+t._s(t.__("Temp sharing"))+"\n ")]):t._e(),t._v(" "),t.link.editable?n("a",{staticClass:"dropdown-item",attrs:{href:t.link.url_edit,dusk:"link-card-edit"}},[n("i",{staticClass:"fas fa-pen-alt fa-fw mr-1"}),t._v(" "+t._s(t.__("Edit"))+"\n ")]):t._e(),t._v(" "),t.link.editable?n("confirm",{staticClass:"dropdown-item",attrs:{text:" "+t.__("Delete"),"text-confirm":" "+t.__("Confirm"),dusk:"link-card-remove"},on:{confirmed:t.remove}}):t._e()],1)])])])}),[],!1,null,null,null);e.default=o.exports},nBz4:function(t,e,n){"use strict";n.r(e);var r=n("YLgT"),i=n.n(r),o=n("0fPN"),a=n("1IHE"),s=n("FQHZ"),l={components:{FilePond:new(n.n(s).a)},mixins:[i.a,o.a,a.a],props:{album:{type:Object,required:!1,default:function(){}}},data:function(){return{form:{title:null,content:null,images:[],uploaded:[],is_private:!1,is_pinned:!1,tags:[]},loading:!1,drag:!1,dragOptions:{animation:200,group:"images",disabled:!1,ghostClass:"ghost",forceFallback:!0}}},mounted:function(){this.album&&(this.form=this.album,this.form.uploaded=[]),this.startAudit()},methods:{submit:function(t){var e=this;this.loading=!0,axios.request({method:this.album?"PUT":"POST",url:this.album?this.album.url_update:"/api/album",data:this.form}).then((function(n){switch(e.clearAudit(),e.$toasted.success(e.__("Saved")),t){case"view":window.location=n.data.post.url;break;case"new":window.location="/album/create";break;case"edit":window.location="/album/".concat(n.data.post.postable_id,"/edit")}})).catch((function(t){e.loading=!1,e.setFormError(t),e.setHttpError(t),e.toastHttpError(e.__("Can't save"))}))},initUpload:function(){Object(s.setOptions)({server:{url:"/api/album/upload",process:{headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content"),Authorization:"Bearer "+$('meta[name="api-token"]').attr("content")}}}})},handleFileProcess:function(t,e){null===t&&this.form.uploaded.push(e.serverId)},deleteImage:function(t){var e=this.form.images.indexOf(t);-1!==e&&(this.form.images.splice(e,1),this.updateImagesOrder())},startDragging:function(){this.drag=!0},endDragging:function(t){this.drag=!1,this.updateImagesOrder()},updateImagesOrder:function(){for(var t=this.form.images.length-1,e=0;e<=t;e++)this.form.images[e].order=e+1}}},c=n("KHd+"),u=Object(c.a)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card card--album"},[n("div",{staticClass:"card-body"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"title"}},[t._v(t._s(t.__("Title")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.title,expression:"form.title"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("title")},attrs:{type:"text",id:"title",disabled:t.loading,dusk:"album-form-title"},domProps:{value:t.form.title},on:{input:function(e){e.target.composing||t.$set(t.form,"title",e.target.value)}}}),t._v(" "),t.hasFormError("title")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("title")))]):t._e()]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"content"}},[t._v(t._s(t.__("Content")))]),t._v(" "),n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.form.content,expression:"form.content"}],staticClass:"form-control",class:{"is-invalid":t.hasFormError("content")},attrs:{id:"content",disabled:t.loading,dusk:"album-form-content"},domProps:{value:t.form.content},on:{input:function(e){e.target.composing||t.$set(t.form,"content",e.target.value)}}}),t._v(" "),t.hasFormError("content")?n("span",{staticClass:"invalid-feedback"},[t._v(t._s(t.firstFormError("content")))]):t._e()]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"content"}},[t._v(t._s(t.__("Images")))]),t._v(" "),n("file-pond",{ref:"pond",attrs:{"allow-multiple":!0,"allow-browse":!0,"allow-replace":!1,"allow-revert":!1,"instant-upload":!0,"label-idle":t.__("Drop files or click to choose"),"label-invalid-field":t.__("Invalid file"),"label-file-loading":t.__("Loading"),"label-file-processing":t.__("Loading"),"label-file-load-error":t.__("Fail"),"label-file-processing-error":t.__("Fail"),"label-file-processing-complete":t.__("Success"),"label-tap-to-cancel":t.__("Delete"),"label-tap-to-undo":t.__("Delete")},on:{init:t.initUpload,processfile:t.handleFileProcess}}),t._v(" "),t.form.images?n("div",[n("draggable",t._b({attrs:{group:"images",handle:".handle-order"},on:{start:t.startDragging,end:t.endDragging},model:{value:t.form.images,callback:function(e){t.$set(t.form,"images",e)},expression:"form.images"}},"draggable",t.dragOptions,!1),[n("transition-group",{attrs:{type:"transition",tag:"div",name:t.drag?null:"flip-list"}},t._l(t.form.images,(function(e){return n("figure",{key:"item-"+e.name,staticClass:"figure mr-2"},[n("img",{staticClass:"figure-img img-fluid rounded",staticStyle:{height:"100px"},attrs:{src:e.url_thumb||e.url_full}}),t._v(" "),n("figcaption",{staticClass:"figure-caption d-flex justify-content-center"},[n("button",{staticClass:"btn btn-sm btn-outline-secondary handle-order mr-1",attrs:{type:"button"}},[n("i",{staticClass:"fas fa-arrows-alt"})]),t._v(" "),n("confirm",{staticClass:"btn btn-sm btn-outline-secondary",attrs:{tag:"button",text:"","text-confirm":""},on:{confirmed:function(n){return t.deleteImage(e)}}})],1)])})),0)],1)],1):t._e()],1),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-md-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_private,expression:"form.is_private"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_private",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_private)?t._i(t.form.is_private,null)>-1:t.form.is_private},on:{change:function(e){var n=t.form.is_private,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_private",n.concat([null])):o>-1&&t.$set(t.form,"is_private",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_private",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_private",dusk:"album-form-private"}},[t._v(t._s(t.__("Is private?")))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_pinned,expression:"form.is_pinned"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_pinned",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_pinned)?t._i(t.form.is_pinned,null)>-1:t.form.is_pinned},on:{change:function(e){var n=t.form.is_pinned,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_pinned",n.concat([null])):o>-1&&t.$set(t.form,"is_pinned",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_pinned",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_pinned",dusk:"album-form-pinned"}},[t._v(t._s(t.__("Is pinned?")))])])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Tags")))]),t._v(" "),n("tags",{attrs:{dusk:"link-form-tags"},model:{value:t.form.tags,callback:function(e){t.$set(t.form,"tags",e)},expression:"form.tags"}})],1)]),t._v(" "),n("div",{staticClass:"card-footer d-flex justify-content-between"},[n("div",[n("div",{staticClass:"btn-group"},[n("button",{staticClass:"btn btn-primary",class:{"btn-danger":t.hasChanged},attrs:{type:"button",disabled:t.loading,dusk:"album-form-save"},on:{click:function(e){return e.preventDefault(),t.submit("edit")}}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Save"))+"\n ")]),t._v(" "),n("button",{staticClass:"btn btn-primary dropdown-toggle dropdown-toggle-split",class:{"btn-danger":t.hasChanged},attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}}),t._v(" "),n("div",{staticClass:"dropdown-menu"},[n("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.submit("view")}}},[t._v(t._s(t.__("Save & View")))]),t._v(" "),n("button",{staticClass:"dropdown-item",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.submit("new")}}},[t._v(t._s(t.__("Save & New")))])])]),t._v(" "),t.album?n("a",{staticClass:"btn btn-outline-primary",attrs:{href:t.album.permalink}},[t._v(t._s(t.__("View")))]):t._e()]),t._v(" "),t._t("actions")],2)])}),[],!1,null,null,null);e.default=u.exports},p7ys:function(t,e){t.exports=/[\0-\x1F\x7F-\x9F]/},pyCd:function(t,e){},tEIc:function(t,e,n){"use strict";n.r(e);var r={props:{message:{type:String,required:!0},type:{type:String,required:!1,default:"success"}},mounted:function(){this.message.length>0&&this.$toasted.show(this.message,{type:this.type})}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this.$createElement;return(this._self._c||t)("div")}),[],!1,null,null,null);e.default=o.exports},uB4Z:function(t,e,n){!function(e,n){"use strict";function r(t,e,n){this.root=this.currentNode=t,this.nodeType=e,this.filter=n||lt}function i(t){return t.nodeType===L&&!!ut[t.nodeName]}function o(t){switch(t.nodeType){case F:return ft;case L:case B:if(it&&ht.has(t))return ht.get(t);break;default:return dt}var e;return e=function(t,e){for(var n=t.length;n--;)if(!e(t[n]))return!1;return!0}(t.childNodes,a)?ct.test(t.nodeName)?ft:pt:mt,it&&ht.set(t,e),e}function a(t){return o(t)===ft}function s(t){return o(t)===pt}function l(t){return o(t)===mt}function c(t,e){var n=new r(e,U,s);return n.currentNode=t,n}function u(t,e){return(t=c(t,e).previousNode())!==e?t:null}function d(t,e){return(t=c(t,e).nextNode())!==e?t:null}function f(t,e){return!i(t)&&t.nodeType===e.nodeType&&t.nodeName===e.nodeName&&"A"!==t.nodeName&&t.className===e.className&&(!t.style&&!e.style||t.style.cssText===e.style.cssText)}function p(t,e,n){if(t.nodeName!==e)return!1;for(var r in n)if(t.getAttribute(r)!==n[r])return!1;return!0}function m(t,e,n,r){for(;t&&t!==e;){if(p(t,n,r))return t;t=t.parentNode}return null}function h(t,e){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function _(t){var e=t.nodeType;return e===L||e===B?t.childNodes.length:t.length||0}function v(t){var e=t.parentNode;return e&&e.removeChild(t),t}function g(t,e){var n=t.parentNode;n&&n.replaceChild(e,t)}function E(t){for(var e=t.ownerDocument.createDocumentFragment(),n=t.childNodes,r=n?n.length:0;r--;)e.appendChild(t.firstChild);return e}function b(t,e,r,i){var o,a,s,l=t.createElement(e);if(r instanceof Array&&(i=r,r=null),r)for(o in r)r[o]!==n&&l.setAttribute(o,r[o]);if(i)for(a=0,s=i.length;al?n.startOffset-=1:n.startOffset===l&&(n.startContainer=i,n.startOffset=_(i))),n.endContainer===e&&(n.endOffset>l?n.endOffset-=1:n.endOffset===l&&(n.endContainer=i,n.endOffset=_(i))),v(r),r.nodeType===F?i.appendData(r.data):c.push(E(r));else if(r.nodeType===L){for(o=c.length;o--;)r.appendChild(c.pop());t(r,n)}})(t,n),e.setStart(n.startContainer,n.startOffset),e.setEnd(n.endContainer,n.endOffset)}}function I(t){var e=t.nodeName;return"TD"===e||"TH"===e||"TR"===e||"TBODY"===e||"THEAD"===e}function S(t,e,n,r){var i,o,a,s=e;if(!I(t)||!I(e)){for(;(i=s.parentNode)&&i!==r&&i.nodeType===L&&1===i.childNodes.length;)s=i;v(s),a=t.childNodes.length,(o=t.lastChild)&&"BR"===o.nodeName&&(t.removeChild(o),a-=1),t.appendChild(E(e)),n.setStart(t,a),n.collapse(!0),w(t,n),X&&(o=t.lastChild)&&"BR"===o.nodeName&&t.removeChild(o)}}function O(t,e){var n,r,i=t.previousSibling,o=t.firstChild,a=t.ownerDocument,s="LI"===t.nodeName;if((!s||o&&/^[OU]L$/.test(o.nodeName))&&!I(t))if(i&&f(i,t)&&i.isContentEditable&&t.isContentEditable){if(!l(i)){if(!s)return;(r=b(a,"DIV")).appendChild(E(i)),i.appendChild(r)}v(t),n=!l(t),i.appendChild(E(t)),n&&C(i,e),o&&O(o,e)}else s&&(i=b(a,"DIV"),t.insertBefore(i,o),y(i,e))}function D(t){this.isShiftDown=t.shiftKey}function R(t,e,n){var r,i;if(t||(t={}),e)for(r in e)!n&&r in t||(i=e[r],t[r]=i&&i.constructor===Object?R(t[r],i,n):i);return t}function A(t,e){t.nodeType===M&&(t=t.body);var n,r=t.ownerDocument,i=r.defaultView;this._win=i,this._doc=r,this._root=t,this._events={},this._isFocused=!1,this._lastSelection=null,nt&&this.addEventListener("beforedeactivate",this.getSelection),this._hasZWS=!1,this._lastAnchorNode=null,this._lastFocusNode=null,this._path="",this._willUpdatePath=!1,"onselectionchange"in r?this.addEventListener("selectionchange",this._updatePathOnEvent):(this.addEventListener("keyup",this._updatePathOnEvent),this.addEventListener("mouseup",this._updatePathOnEvent)),this._undoIndex=-1,this._undoStack=[],this._undoStackLength=0,this._isInUndoState=!1,this._ignoreChange=!1,this._ignoreAllChanges=!1,rt?((n=new MutationObserver(this._docWasChanged.bind(this))).observe(t,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),this._mutation=n):this.addEventListener("keyup",this._keyUpDetectChange),this._restoreSelection=!1,this.addEventListener("blur",N),this.addEventListener("mousedown",k),this.addEventListener("touchstart",k),this.addEventListener("focus",x),this._awaitingPaste=!1,this.addEventListener(W?"beforecut":"cut",Qt),this.addEventListener("copy",Zt),this.addEventListener("keydown",D),this.addEventListener("keyup",D),this.addEventListener(W?"beforepaste":"paste",Jt),this.addEventListener("drop",te),this.addEventListener(X?"keypress":"keydown",kt),this._keyHandlers=Object.create(Ft),this.setConfig(e),W&&(i.Text.prototype.splitText=function(t){var e=this.ownerDocument.createTextNode(this.data.slice(t)),n=this.nextSibling,r=this.parentNode,i=this.length-t;return n?r.insertBefore(e,n):r.appendChild(e),i&&this.deleteData(t,i),e}),t.setAttribute("contenteditable","true");try{r.execCommand("enableObjectResizing",!1,"false"),r.execCommand("enableInlineTableEditing",!1,"false")}catch(t){}t.__squire__=this,this.setHTML("")}function N(){this._restoreSelection=!0}function k(){this._restoreSelection=!1}function x(){this._restoreSelection&&this.setSelection(this._lastSelection)}function P(t,e,n){var r,i;for(r=e.firstChild;r;r=i){if(i=r.nextSibling,a(r)){if(r.nodeType===F||"BR"===r.nodeName||"IMG"===r.nodeName){n.appendChild(r);continue}}else if(s(r)){n.appendChild(t.createDefaultBlock([P(t,r,t._doc.createDocumentFragment())]));continue}P(t,r,n)}return n}var L=1,F=3,M=9,B=11,U=1,G="​",q=e.defaultView,H=navigator.userAgent,$=/Android/.test(H),V=/iP(?:ad|hone|od)/.test(H),j=/Mac OS X/.test(H),z=/Windows NT/.test(H),Y=/Gecko\//.test(H),W=/Trident\/[456]\./.test(H),X=!!q.opera,K=/Edge\//.test(H),Q=!K&&/WebKit\//.test(H),Z=/Trident\/[4567]\./.test(H),J=j?"meta-":"ctrl-",tt=W||X,et=W||Q,nt=W,rt="undefined"!=typeof MutationObserver,it="undefined"!=typeof WeakMap,ot=/[^ \t\r\n]/,at=Array.prototype.indexOf;Object.create||(Object.create=function(t){var e=function(){};return e.prototype=t,new e});var st={1:1,2:2,3:4,8:128,9:256,11:1024},lt=function(){return!0};r.prototype.nextNode=function(){for(var t,e=this.currentNode,n=this.root,r=this.nodeType,i=this.filter;;){for(t=e.firstChild;!t&&e&&e!==n;)(t=e.nextSibling)||(e=e.parentNode);if(!t)return null;if(st[t.nodeType]&r&&i(t))return this.currentNode=t,t;e=t}},r.prototype.previousNode=function(){for(var t,e=this.currentNode,n=this.root,r=this.nodeType,i=this.filter;;){if(e===n)return null;if(t=e.previousSibling)for(;e=t.lastChild;)t=e;else t=e.parentNode;if(!t)return null;if(st[t.nodeType]&r&&i(t))return this.currentNode=t,t;e=t}},r.prototype.previousPONode=function(){for(var t,e=this.currentNode,n=this.root,r=this.nodeType,i=this.filter;;){for(t=e.lastChild;!t&&e&&e!==n;)(t=e.previousSibling)||(e=e.parentNode);if(!t)return null;if(st[t.nodeType]&r&&i(t))return this.currentNode=t,t;e=t}};var ct=/^(?:#text|A(?:BBR|CRONYM)?|B(?:R|D[IO])?|C(?:ITE|ODE)|D(?:ATA|EL|FN)|EM|FONT|I(?:FRAME|MG|NPUT|NS)?|KBD|Q|R(?:P|T|UBY)|S(?:AMP|MALL|PAN|TR(?:IKE|ONG)|U[BP])?|TIME|U|VAR|WBR)$/,ut={BR:1,HR:1,IFRAME:1,IMG:1,INPUT:1},dt=0,ft=1,pt=2,mt=3,ht=it?new WeakMap:null,_t=function(t,e){for(var n=t.childNodes;e&&t.nodeType===L;)e=(n=(t=n[e-1]).childNodes).length;return t},vt=function(t,e){if(t.nodeType===L){var n=t.childNodes;if(e-1,o=t.compareBoundaryPoints(1,r)<1;return!i&&!o}var a=t.compareBoundaryPoints(0,r)<1,s=t.compareBoundaryPoints(2,r)>-1;return a&&s},Tt=function(t){for(var e,n=t.startContainer,r=t.startOffset,o=t.endContainer,a=t.endOffset,s=!0;n.nodeType!==F&&(e=n.childNodes[r])&&!i(e);)n=e,r=0;if(a)for(;o.nodeType!==F;){if(!(e=o.childNodes[a-1])||i(e)){if(s&&e&&"BR"===e.nodeName){a-=1,s=!1;continue}break}a=_(o=e)}else for(;o.nodeType!==F&&(e=o.firstChild)&&!i(e);)o=e;t.collapsed?(t.setStart(o,a),t.setEnd(n,r)):(t.setStart(n,r),t.setEnd(o,a))},wt=function(t,e,n,r){var i,o=t.startContainer,a=t.startOffset,s=t.endContainer,l=t.endOffset,c=!0;for(e||(e=t.commonAncestorContainer),n||(n=e);!a&&o!==e&&o!==r;)i=o.parentNode,a=at.call(i.childNodes,o),o=i;for(;c&&s.nodeType!==F&&s.childNodes[l]&&"BR"===s.childNodes[l].nodeName&&(l+=1,c=!1),s!==n&&s!==r&&l===_(s);)i=s.parentNode,l=at.call(i.childNodes,s)+1,s=i;t.setStart(o,a),t.setEnd(s,l)},It=function(t,e){var n,r=t.startContainer;return a(r)?n=u(r,e):r!==e&&s(r)?n=r:n=d(n=_t(r,t.startOffset),e),n&&Ct(t,n,!0)?n:null},St=function(t,e){var n,r,i=t.endContainer;if(a(i))n=u(i,e);else if(i!==e&&s(i))n=i;else{if(!(n=vt(i,t.endOffset))||!h(e,n))for(n=e;r=n.lastChild;)n=r;n=u(n,e)}return n&&Ct(t,n,!0)?n:null},Ot=new r(null,4|U,(function(t){return t.nodeType===F?ot.test(t.data):"IMG"===t.nodeName})),Dt=function(t,e){var n,r=t.startContainer,i=t.startOffset;if(Ot.root=null,r.nodeType===F){if(i)return!1;n=r}else if((n=vt(r,i))&&!h(e,n)&&(n=null),!n&&((n=_t(r,i)).nodeType===F&&n.length))return!1;return Ot.currentNode=n,Ot.root=It(t,e),!Ot.previousNode()},Rt=function(t,e){var n,r=t.endContainer,i=t.endOffset;if(Ot.root=null,r.nodeType===F){if((n=r.data.length)&&i-1||!Y&&at.call(i,"text/plain")>-1&&at.call(i,"text/rtf")<0))return t.preventDefault(),void(!l&&(o=a.getData("text/html"))?this.insertHTML(o,!0):((o=a.getData("text/plain"))||(o=a.getData("text/uri-list")))&&this.insertPlainText(o,!0));this._awaitingPaste=!0;var p=this._doc.body,m=this.getSelection(),h=m.startContainer,_=m.startOffset,g=m.endContainer,E=m.endOffset,b=this.createElement("DIV",{contenteditable:"true",style:"position:fixed; overflow:hidden; top:0; right:100%; width:1px; height:1px;"});p.appendChild(b),m.selectNodeContents(b),this.setSelection(m),setTimeout((function(){try{f._awaitingPaste=!1;for(var t,e,n="",r=b;b=r;)r=b.nextSibling,v(b),(t=b.firstChild)&&t===b.lastChild&&"DIV"===t.nodeName&&(b=t),n+=b.innerHTML;e=f.createRange(h,_,g,E),f.setSelection(e),n&&f.insertHTML(n,!0)}catch(t){f.didError(t)}}),0)}},te=function(t){for(var e=t.dataTransfer.types,n=e.length,r=!1,i=!1;n--;)switch(e[n]){case"text/plain":r=!0;break;case"text/html":i=!0;break;default:return}(i||r)&&this.saveUndoState()},ee=A.prototype,ne=function(t,e,n){var r=n._doc,i=t?DOMPurify.sanitize(t,{ALLOW_UNKNOWN_PROTOCOLS:!0,WHOLE_DOCUMENT:!1,RETURN_DOM:!0,RETURN_DOM_FRAGMENT:!0}):null;return i?r.importNode(i,!0):r.createDocumentFragment()};ee.setConfig=function(t){return(t=R({blockTag:"DIV",blockAttributes:null,tagAttributes:{blockquote:null,ul:null,ol:null,li:null,a:null},classNames:{colour:"colour",fontFamily:"font",fontSize:"size",highlight:"highlight"},leafNodeNames:ut,undo:{documentSizeThreshold:-1,undoLimit:-1},isInsertedHTMLSanitized:!0,isSetHTMLSanitized:!0,sanitizeToDOMFragment:"undefined"!=typeof DOMPurify&&DOMPurify.isSupported?ne:null,willCutCopy:null},t,!0)).blockTag=t.blockTag.toUpperCase(),this._config=t,this},ee.createElement=function(t,e,n){return b(this._doc,t,e,n)},ee.createDefaultBlock=function(t){var e=this._config;return y(this.createElement(e.blockTag,e.blockAttributes,t),this._root)},ee.didError=function(t){console.log(t)},ee.getDocument=function(){return this._doc},ee.getRoot=function(){return this._root},ee.modifyDocument=function(t){var e=this._mutation;e&&(e.takeRecords().length&&this._docWasChanged(),e.disconnect()),this._ignoreAllChanges=!0,t(),this._ignoreAllChanges=!1,e&&(e.observe(this._root,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),this._ignoreChange=!1)};var re={pathChange:1,select:1,input:1,undoStateChange:1};ee.fireEvent=function(t,e){var n,r,i,o=this._events[t];if(/^(?:focus|blur)/.test(t))if(n=this._root===this._doc.activeElement,"focus"===t){if(!n||this._isFocused)return this;this._isFocused=!0}else{if(n||!this._isFocused)return this;this._isFocused=!1}if(o)for(e||(e={}),e.type!==t&&(e.type=t),r=(o=o.slice()).length;r--;){i=o[r];try{i.handleEvent?i.handleEvent(e):i.call(this,e)}catch(e){e.details="Squire: fireEvent error. Event type: "+t,this.didError(e)}}return this},ee.destroy=function(){var t,e=this._events;for(t in e)this.removeEventListener(t);this._mutation&&this._mutation.disconnect(),delete this._root.__squire__,this._undoIndex=-1,this._undoStack=[],this._undoStackLength=0},ee.handleEvent=function(t){this.fireEvent(t.type,t)},ee.addEventListener=function(t,e){var n=this._events[t],r=this._root;return e?(n||(n=this._events[t]=[],re[t]||("selectionchange"===t&&(r=this._doc),r.addEventListener(t,this,!0))),n.push(e),this):(this.didError({name:"Squire: addEventListener with null or undefined fn",message:"Event type: "+t}),this)},ee.removeEventListener=function(t,e){var n,r=this._events[t],i=this._root;if(r){if(e)for(n=r.length;n--;)r[n]===e&&r.splice(n,1);else r.length=0;r.length||(delete this._events[t],re[t]||("selectionchange"===t&&(i=this._doc),i.removeEventListener(t,this,!0)))}return this},ee.createRange=function(t,e,n,r){if(t instanceof this._win.Range)return t.cloneRange();var i=this._doc.createRange();return i.setStart(t,e),n?i.setEnd(n,r):i.setEnd(t,e),i},ee.getCursorPosition=function(t){if(!t&&!(t=this.getSelection())||!t.getBoundingClientRect)return null;var e,n,r=t.getBoundingClientRect();return r&&!r.top&&(this._ignoreChange=!0,(e=this._doc.createElement("SPAN")).textContent=G,gt(t,e),r=e.getBoundingClientRect(),(n=e.parentNode).removeChild(e),w(n,t)),r},ee._moveCursorTo=function(t){var e=this._root,n=this.createRange(e,t?0:e.childNodes.length);return Tt(n),this.setSelection(n),this},ee.moveCursorToStart=function(){return this._moveCursorTo(!0)},ee.moveCursorToEnd=function(){return this._moveCursorTo(!1)};var ie=function(t){return t._win.getSelection()||null};ee.setSelection=function(t){if(t)if(this._lastSelection=t,this._isFocused)if($&&!this._restoreSelection)N.call(this),this.blur(),this.focus();else{V&&this._win.focus();var e=ie(this);e&&(e.removeAllRanges(),e.addRange(t))}else N.call(this);return this},ee.getSelection=function(){var t,e,n,r,o=ie(this),a=this._root;return this._isFocused&&o&&o.rangeCount&&(e=(t=o.getRangeAt(0).cloneRange()).startContainer,n=t.endContainer,e&&i(e)&&t.setStartBefore(e),n&&i(n)&&t.setEndBefore(n)),t&&h(a,t.commonAncestorContainer)?this._lastSelection=t:h((r=(t=this._lastSelection).commonAncestorContainer).ownerDocument,r)||(t=null),t||(t=this.createRange(a.firstChild,0)),t},ee.getSelectedText=function(){var t=this.getSelection();if(!t||t.collapsed)return"";var e,n=new r(t.commonAncestorContainer,4|U,(function(e){return Ct(t,e,!0)})),i=t.startContainer,o=t.endContainer,s=n.currentNode=i,l="",c=!1;for(n.filter(s)||(s=n.nextNode());s;)s.nodeType===F?(e=s.data)&&/\S/.test(e)&&(s===o&&(e=e.slice(0,t.endOffset)),s===i&&(e=e.slice(t.startOffset)),l+=e,c=!0):("BR"===s.nodeName||c&&!a(s))&&(l+="\n",c=!1),s=n.nextNode();return l},ee.getPath=function(){return this._path};var oe=function(t,e){for(var n,i,o,s=new r(t,4);i=s.nextNode();)for(;(o=i.data.indexOf(G))>-1&&(!e||i.parentNode!==e);){if(1===i.length){do{(n=i.parentNode).removeChild(i),i=n,s.currentNode=n}while(a(i)&&!_(i));break}i.deleteData(o,1)}};ee._didAddZWS=function(){this._hasZWS=!0},ee._removeZWS=function(){this._hasZWS&&(oe(this._root),this._hasZWS=!1)},ee._updatePath=function(t,e){if(t){var n,r=t.startContainer,i=t.endContainer;(e||r!==this._lastAnchorNode||i!==this._lastFocusNode)&&(this._lastAnchorNode=r,this._lastFocusNode=i,n=r&&i?r===i?function t(e,n,r){var i,o,a,s,l,c="";return e&&e!==n&&(c=t(e.parentNode,n,r),e.nodeType===L&&(c+=(c?">":"")+e.nodeName,(i=e.id)&&(c+="#"+i),(o=e.className.trim())&&((a=o.split(/\s\s*/)).sort(),c+=".",c+=a.join(".")),(s=e.dir)&&(c+="[dir="+s+"]"),a&&(l=r.classNames,at.call(a,l.highlight)>-1&&(c+="[backgroundColor="+e.style.backgroundColor.replace(/ /g,"")+"]"),at.call(a,l.colour)>-1&&(c+="[color="+e.style.color.replace(/ /g,"")+"]"),at.call(a,l.fontFamily)>-1&&(c+="[fontFamily="+e.style.fontFamily.replace(/ /g,"")+"]"),at.call(a,l.fontSize)>-1&&(c+="[fontSize="+e.style.fontSize+"]")))),c}(i,this._root,this._config):"(selection)":"",this._path!==n&&(this._path=n,this.fireEvent("pathChange",{path:n}))),this.fireEvent(t.collapsed?"cursor":"select",{range:t})}},ee._updatePathOnEvent=function(t){var e=this;e._isFocused&&!e._willUpdatePath&&(e._willUpdatePath=!0,setTimeout((function(){e._willUpdatePath=!1,e._updatePath(e.getSelection())}),0))},ee.focus=function(){if(Z){try{this._root.setActive()}catch(t){}this.fireEvent("focus")}else this._root.focus();return this},ee.blur=function(){return this._root.blur(),Z&&this.fireEvent("blur"),this};var ae="squire-selection-end";ee._saveRangeToBookmark=function(t){var e,n=this.createElement("INPUT",{id:"squire-selection-start",type:"hidden"}),r=this.createElement("INPUT",{id:ae,type:"hidden"});gt(t,n),t.collapse(!1),gt(t,r),2&n.compareDocumentPosition(r)&&(n.id=ae,r.id="squire-selection-start",e=n,n=r,r=e),t.setStartAfter(n),t.setEndBefore(r)},ee._getRangeAndRemoveBookmark=function(t){var e=this._root,n=e.querySelector("#squire-selection-start"),r=e.querySelector("#"+ae);if(n&&r){var i=n.parentNode,o=r.parentNode,a=at.call(i.childNodes,n),s=at.call(o.childNodes,r);i===o&&(s-=1),v(n),v(r),t||(t=this._doc.createRange()),t.setStart(i,a),t.setEnd(o,s),w(i,t),i!==o&&w(o,t),t.collapsed&&((i=t.startContainer).nodeType===F&&((o=i.childNodes[t.startOffset])&&o.nodeType===F||(o=i.childNodes[t.startOffset-1]),o&&o.nodeType===F&&(t.setStart(o,0),t.collapse(!0))))}return t||null},ee._keyUpDetectChange=function(t){var e=t.keyCode;t.ctrlKey||t.metaKey||t.altKey||!(e<16||e>20)||!(e<33||e>45)||this._docWasChanged()},ee._docWasChanged=function(){if(it&&(ht=new WeakMap),!this._ignoreAllChanges){if(rt&&this._ignoreChange)return void(this._ignoreChange=!1);this._isInUndoState&&(this._isInUndoState=!1,this.fireEvent("undoStateChange",{canUndo:!0,canRedo:!1})),this.fireEvent("input")}},ee._recordUndoState=function(t,e){if(!this._isInUndoState||e){var n,r=this._undoIndex,i=this._undoStack,o=this._config.undo,a=o.documentSizeThreshold,s=o.undoLimit;e||(r+=1),r-1&&2*n.length>a&&s>-1&&r>s&&(i.splice(0,r-s),r=s,this._undoStackLength=s),i[r]=n,this._undoIndex=r,this._undoStackLength+=1,this._isInUndoState=!0}},ee.saveUndoState=function(t){return t===n&&(t=this.getSelection()),this._recordUndoState(t,this._isInUndoState),this._getRangeAndRemoveBookmark(t),this},ee.undo=function(){if(0!==this._undoIndex||!this._isInUndoState){this._recordUndoState(this.getSelection(),!1),this._undoIndex-=1,this._setHTML(this._undoStack[this._undoIndex]);var t=this._getRangeAndRemoveBookmark();t&&this.setSelection(t),this._isInUndoState=!0,this.fireEvent("undoStateChange",{canUndo:0!==this._undoIndex,canRedo:!0}),this.fireEvent("input")}return this},ee.redo=function(){var t=this._undoIndex,e=this._undoStackLength;if(t+1u&&d.splitText(u),d===s&&c&&(d=d.splitText(c),l===s&&(l=d,u-=c),s=d,c=0),g(d,i=this.createElement(t,e)),i.appendChild(d))}while(o.nextNode());l.nodeType!==F&&(d.nodeType===F?(l=d,u=d.length):(l=d.parentNode,u=1)),n=this.createRange(s,c,l,u)}return n},ee._removeFormat=function(t,e,n,r){this._saveRangeToBookmark(n);var i,o=this._doc;n.collapsed&&(et?(i=o.createTextNode(G),this._didAddZWS()):i=o.createTextNode(""),gt(n,i));for(var s=n.commonAncestorContainer;a(s);)s=s.parentNode;var l=n.startContainer,c=n.startOffset,u=n.endContainer,d=n.endOffset,f=[],m=function(t,e){if(!Ct(n,t,!1)){var r,i,o=t.nodeType===F;if(!Ct(n,t,!0))return void("INPUT"===t.nodeName||o&&!t.data||f.push([e,t]));if(o)t===u&&d!==t.length&&f.push([e,t.splitText(d)]),t===l&&c&&(t.splitText(c),f.push([e,t]));else for(r=t.firstChild;r;r=i)i=r.nextSibling,m(r,e)}},h=Array.prototype.filter.call(s.getElementsByTagName(t),(function(r){return Ct(n,r,!0)&&p(r,t,e)}));return r||h.forEach((function(t){m(t,t)})),f.forEach((function(t){var e=t[0].cloneNode(!1),n=t[1];g(n,e),e.appendChild(n)})),h.forEach((function(t){g(t,E(t))})),this._getRangeAndRemoveBookmark(n),i&&n.collapse(!1),w(s,n),n},ee.changeFormat=function(t,e,n,r){return n||(n=this.getSelection())?(this.saveUndoState(n),e&&(n=this._removeFormat(e.tag.toUpperCase(),e.attributes||{},n,r)),t&&(n=this._addFormat(t.tag.toUpperCase(),t.attributes||{},n)),this.setSelection(n),this._updatePath(n,!0),rt||this._docWasChanged(),this):this};var se={DT:"DD",DD:"DT",LI:"LI",PRE:"PRE"},le=function(t,e,n,r){var i=se[e.nodeName],o=null,a=T(n,r,e.parentNode,t._root),s=t._config;return i||(i=s.blockTag,o=s.blockAttributes),p(a,i,o)||(e=b(a.ownerDocument,i,o),a.dir&&(e.dir=a.dir),g(a,e),e.appendChild(E(a)),a=e),a};ee.forEachBlock=function(t,e,n){if(!n&&!(n=this.getSelection()))return this;e&&this.saveUndoState(n);var r=this._root,i=It(n,r),o=St(n,r);if(i&&o)do{if(t(i)||i===o)break}while(i=d(i,r));return e&&(this.setSelection(n),this._updatePath(n,!0),rt||this._docWasChanged()),this},ee.modifyBlocks=function(t,e){if(!e&&!(e=this.getSelection()))return this;this._recordUndoState(e,this._isInUndoState);var n,r=this._root;return At(e,r),wt(e,r,r,r),n=Et(e,r,r),gt(e,t.call(this,n)),e.endOffset]+|\([^\s()<>]+\))+(?:\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))|([\w\-.%+]+@(?:[\w\-]+\.)+[A-Z]{2,}\b)(?:\?[^&?\s]+=[^&?\s]+(?:&[^&?\s]+=[^&?\s]+)*)?/i;var pe=function(t,e,n){var i,o,a,s,l,c,u,d=t.ownerDocument,f=new r(t,4,(function(t){return!m(t,e,"A")})),p=n.linkRegExp,h=n._config.tagAttributes.a;if(p)for(;i=f.nextNode();)for(o=i.data,a=i.parentNode;s=p.exec(o);)c=(l=s.index)+s[0].length,l&&(u=d.createTextNode(o.slice(0,l)),a.insertBefore(u,i)),(u=n.createElement("A",R({href:s[1]?/^(?:ht|f)tps?:/i.test(s[1])?s[1]:"http://"+s[1]:"mailto:"+s[0]},h,!1))).textContent=o.slice(l,c),a.insertBefore(u,i),i.data=o=o.slice(c)};ee.insertHTML=function(t,e){var n,r,i,o,a,s,l,c=this._config,u=c.isInsertedHTMLSanitized?c.sanitizeToDOMFragment:null,f=this.getSelection(),p=this._doc;"function"==typeof u?o=u(t,e,this):(e&&(n=t.indexOf("\x3c!--StartFragment--\x3e"),r=t.lastIndexOf("\x3c!--EndFragment--\x3e"),n>-1&&r>-1&&(t=t.slice(n+20,r))),/<\/td>((?!<\/tr>)[\s\S])*$/i.test(t)&&(t=""+t+""),/<\/tr>((?!<\/table>)[\s\S])*$/i.test(t)&&(t=""+t+"
"),(i=this.createElement("DIV")).innerHTML=t,(o=p.createDocumentFragment()).appendChild(E(i))),this.saveUndoState(f);try{for(a=this._root,s=o,l={fragment:o,preventDefault:function(){this.defaultPrevented=!0},defaultPrevented:!1},pe(o,o,this),jt(o,c),Xt(o,a,!1),zt(o),o.normalize();s=d(s,o);)y(s,a);e&&this.fireEvent("willPaste",l),l.defaultPrevented||(yt(f,l.fragment,a),rt||this._docWasChanged(),f.collapse(!1),this._ensureBottomLine()),this.setSelection(f),this._updatePath(f,!0),e&&this.focus()}catch(t){this.didError(t)}return this};var me=function(t){return t.split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""")};ee.insertPlainText=function(t,e){var n=this.getSelection();if(n.collapsed&&m(n.startContainer,this._root,"PRE")){var r,i,o=n.startContainer,a=n.startOffset;return o&&o.nodeType===F||(r=this._doc.createTextNode(""),o.insertBefore(r,o.childNodes[a]),o=r,a=0),i={text:t,preventDefault:function(){this.defaultPrevented=!0},defaultPrevented:!1},e&&this.fireEvent("willPaste",i),i.defaultPrevented||(t=i.text,o.insertData(a,t),n.setStart(o,a+t.length),n.collapse(!0)),this.setSelection(n),this}var s,l,c,u,d=t.split("\n"),f=this._config,p=f.blockTag,h=f.blockAttributes,_="",v="<"+p;for(s in h)v+=" "+s+'="'+me(h[s])+'"';for(v+=">",l=0,c=d.length;l")+_;return this.insertHTML(d.join(""),e)};var he=function(t,e,n){return function(){return this[t](e,n),this.focus()}};ee.addStyles=function(t){if(t){var e=this._doc.documentElement.firstChild,n=this.createElement("STYLE",{type:"text/css"});n.appendChild(this._doc.createTextNode(t)),e.appendChild(n)}return this},ee.bold=he("changeFormat",{tag:"B"}),ee.italic=he("changeFormat",{tag:"I"}),ee.underline=he("changeFormat",{tag:"U"}),ee.strikethrough=he("changeFormat",{tag:"S"}),ee.subscript=he("changeFormat",{tag:"SUB"},{tag:"SUP"}),ee.superscript=he("changeFormat",{tag:"SUP"},{tag:"SUB"}),ee.removeBold=he("changeFormat",null,{tag:"B"}),ee.removeItalic=he("changeFormat",null,{tag:"I"}),ee.removeUnderline=he("changeFormat",null,{tag:"U"}),ee.removeStrikethrough=he("changeFormat",null,{tag:"S"}),ee.removeSubscript=he("changeFormat",null,{tag:"SUB"}),ee.removeSuperscript=he("changeFormat",null,{tag:"SUP"}),ee.makeLink=function(t,e){var n=this.getSelection();if(n.collapsed){var r=t.indexOf(":")+1;if(r)for(;"/"===t[r];)r+=1;gt(n,this._doc.createTextNode(t.slice(r)))}return e=R(R({href:t},e,!0),this._config.tagAttributes.a,!1),this.changeFormat({tag:"A",attributes:e},{tag:"A"},n),this.focus()},ee.removeLink=function(){return this.changeFormat(null,{tag:"A"},this.getSelection(),!0),this.focus()},ee.setFontFace=function(t){var e=this._config.classNames.fontFamily;return this.changeFormat(t?{tag:"SPAN",attributes:{class:e,style:"font-family: "+t+", sans-serif;"}}:null,{tag:"SPAN",attributes:{class:e}}),this.focus()},ee.setFontSize=function(t){var e=this._config.classNames.fontSize;return this.changeFormat(t?{tag:"SPAN",attributes:{class:e,style:"font-size: "+("number"==typeof t?t+"px":t)}}:null,{tag:"SPAN",attributes:{class:e}}),this.focus()},ee.setTextColour=function(t){var e=this._config.classNames.colour;return this.changeFormat(t?{tag:"SPAN",attributes:{class:e,style:"color:"+t}}:null,{tag:"SPAN",attributes:{class:e}}),this.focus()},ee.setHighlightColour=function(t){var e=this._config.classNames.highlight;return this.changeFormat(t?{tag:"SPAN",attributes:{class:e,style:"background-color:"+t}}:t,{tag:"SPAN",attributes:{class:e}}),this.focus()},ee.setTextAlignment=function(t){return this.forEachBlock((function(e){var n=e.className.split(/\s+/).filter((function(t){return!!t&&!/^align/.test(t)})).join(" ");t?(e.className=n+" align-"+t,e.style.textAlign=t):(e.className=n,e.style.textAlign="")}),!0),this.focus()},ee.setTextDirection=function(t){return this.forEachBlock((function(e){t?e.dir=t:e.removeAttribute("dir")}),!0),this.focus()};var _e=function(t){for(var e,n=this._root,i=this._doc,o=i.createDocumentFragment(),a=c(t,n);e=a.nextNode();){var s,l,u=e.querySelectorAll("BR"),d=[],f=u.length;for(s=0;s-1;)a.appendChild(l.createTextNode(o.slice(0,s))),a.appendChild(l.createElement("BR")),o=o.slice(s+1);i.parentNode.insertBefore(a,i),i.data=o}C(e,c),g(e,E(e))}return t};ee.code=function(){var t=this.getSelection();return t.collapsed||l(t.commonAncestorContainer)?this.modifyBlocks(_e,t):this.changeFormat({tag:"CODE",attributes:this._config.tagAttributes.code},null,t),this.focus()},ee.removeCode=function(){var t=this.getSelection();return m(t.commonAncestorContainer,this._root,"PRE")?this.modifyBlocks(ve,t):this.changeFormat(null,{tag:"CODE"},t),this.focus()},ee.toggleCode=function(){return this.hasFormat("PRE")||this.hasFormat("CODE")?this.removeCode():this.code(),this},ee.removeAllFormatting=function(t){if(!t&&!(t=this.getSelection())||t.collapsed)return this;for(var e=this._root,n=t.commonAncestorContainer;n&&!s(n);)n=n.parentNode;if(n||(At(t,e),n=e),n.nodeType===F)return this;this.saveUndoState(t),wt(t,n,n,e);for(var r,i,o=n.ownerDocument,a=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,d=o.createDocumentFragment(),f=o.createDocumentFragment(),p=T(c,u,n,e),m=T(a,l,n,e);m!==p;)r=m.nextSibling,d.appendChild(m),m=r;return P(this,d,f),f.normalize(),m=f.firstChild,r=f.lastChild,i=n.childNodes,m?(n.insertBefore(f,p),l=at.call(i,m),u=at.call(i,r)+1):u=l=at.call(i,p),t.setStart(n,l),t.setEnd(n,u),w(n,t),Tt(t),this.setSelection(t),this._updatePath(t,!0),this.focus()},ee.increaseQuoteLevel=he("modifyBlocks",(function(t){return this.createElement("BLOCKQUOTE",this._config.tagAttributes.blockquote,[t])})),ee.decreaseQuoteLevel=he("modifyBlocks",ce),ee.makeUnorderedList=he("modifyBlocks",(function(t){return de(this,t,"UL"),t})),ee.makeOrderedList=he("modifyBlocks",(function(t){return de(this,t,"OL"),t})),ee.removeList=he("modifyBlocks",(function(t){var e,n,r,i,o,a=t.querySelectorAll("UL, OL"),l=t.querySelectorAll("LI"),c=this._root;for(e=0,n=a.length;e-1:t.form.is_private},on:{change:function(e){var n=t.form.is_private,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_private",n.concat([null])):o>-1&&t.$set(t.form,"is_private",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_private",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_private",dusk:"link-form-private"}},[t._v(t._s(t.__("Is private?")))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-4"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_pinned,expression:"form.is_pinned"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_pinned",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_pinned)?t._i(t.form.is_pinned,null)>-1:t.form.is_pinned},on:{change:function(e){var n=t.form.is_pinned,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_pinned",n.concat([null])):o>-1&&t.$set(t.form,"is_pinned",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_pinned",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_pinned",dusk:"link-form-pinned"}},[t._v(t._s(t.__("Is pinned?")))])])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-4"},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.is_watched,expression:"form.is_watched"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"is_watched",disabled:t.loading},domProps:{checked:Array.isArray(t.form.is_watched)?t._i(t.form.is_watched,null)>-1:t.form.is_watched},on:{change:function(e){var n=t.form.is_watched,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&t.$set(t.form,"is_watched",n.concat([null])):o>-1&&t.$set(t.form,"is_watched",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.form,"is_watched",i)}}}),t._v(" "),n("label",{staticClass:"custom-control-label",attrs:{for:"is_watched",dusk:"link-is-watched"}},[t._v(t._s(t.__("Monitor link's health?")))])])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Tags")))]),t._v(" "),n("tags",{attrs:{dusk:"link-form-tags"},model:{value:t.form.tags,callback:function(e){t.$set(t.form,"tags",e)},expression:"form.tags"}})],1)]),t._v(" "),n("div",{staticClass:"card-footer d-flex justify-content-between"},[n("div",[n("div",{staticClass:"btn-group"},[n("button",{staticClass:"btn btn-primary",class:{"btn-danger":t.hasChanged},attrs:{type:"button",disabled:t.loading,dusk:"link-form-save"},on:{click:function(e){return e.preventDefault(),t.submit("edit")}}},[t.loading?n("span",{staticClass:"spinner-grow spinner-grow-sm",attrs:{role:"status","aria-hidden":"true"}}):t._e(),t._v("\n "+t._s(t.__("Save"))+"\n ")]),t._v(" "),n("button",{staticClass:"btn btn-primary dropdown-toggle dropdown-toggle-split",class:{"btn-danger":t.hasChanged},attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",dusk:"link-form-save-dropdown"}}),t._v(" "),n("div",{staticClass:"dropdown-menu"},[n("button",{staticClass:"dropdown-item",attrs:{type:"button",dusk:"link-form-save-view"},on:{click:function(e){return e.preventDefault(),t.submit("view")}}},[t._v(t._s(t.__("Save & View")))]),t._v(" "),n("button",{staticClass:"dropdown-item",attrs:{type:"button",dusk:"link-form-save-new"},on:{click:function(e){return e.preventDefault(),t.submit("new")}}},[t._v(t._s(t.__("Save & New")))])])]),t._v(" "),t.link?n("button",{staticClass:"btn btn-outline-primary",attrs:{type:"button"},on:{click:t.openArchive}},[t._v(t._s(t.__("Archive")))]):t._e(),t._v(" "),t.link?n("a",{staticClass:"btn btn-outline-primary",attrs:{href:t.link.permalink}},[t._v(t._s(t.__("View")))]):t._e()]),t._v(" "),t._t("actions")],2),t._v(" "),n("modal",{attrs:{open:t.archiving,size:"lg"},on:{closed:function(e){t.archiving=!1}},scopedSlots:t._u([{key:"header",fn:function(){return[t._v(t._s(t.__("Archive")))]},proxy:!0},{key:"content",fn:function(){return[n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-md-6"},[n("h4",[t._v(t._s(t.__("Current archive")))]),t._v(" "),t.archive.download?n("p",[n("a",{staticClass:"btn btn-sm btn-primary text-white btn-block",attrs:{href:t.link.url_download}},[t._v(t._s(t.__("Download")))]),t._v(" "),n("confirm",{staticClass:"btn btn-sm btn-danger text-white btn-block",attrs:{text:t.__("Delete"),"text-confirm":t.__("Confirm")},on:{confirmed:t.deleteArchive}})],1):n("div",{staticClass:"alert alert-info"},[t._v("\n "+t._s(t.__("Archive does not exist"))+"\n ")])]),t._v(" "),n("div",{staticClass:"col-12 col-md-6"},[n("h4",[t._v(t._s(t.__("New archive")))]),t._v(" "),t.archive.providers.length>0?n("p",[-1!==t.archive.providers.indexOf("media")?n("button",{staticClass:"btn btn-sm btn-primary btn-block",attrs:{name:"type"},on:{click:function(e){return t.askArchive("media")}}},[t._v(t._s(t.__("Archive as Media")))]):t._e(),t._v(" "),-1!==t.archive.providers.indexOf("pdf")?n("button",{staticClass:"btn btn-sm btn-primary btn-block",attrs:{name:"type"},on:{click:function(e){return t.askArchive("pdf")}}},[t._v(t._s(t.__("Archive as PDF")))]):t._e()]):n("div",{staticClass:"alert alert-info"},[t._v("\n "+t._s(t.__("No provider found to archive this link"))+"\n ")])])])]},proxy:!0}])})],1)}),[],!1,null,null,null);e.default=c.exports},ui2e:function(t,e,n){"use strict";n.r(e);var r={props:{version:{type:Object,required:!0}},data:function(){return{open:!1}},mounted:function(){this.shouldShowNotification()&&this.notify()},methods:{notify:function(){var t=this;this.$toasted.info(this.__("New version :version available",{version:this.version.id}),{position:"bottom-right",action:[{text:this.__("View"),onClick:function(e,n){n.goAway(0),t.open=!0}},{text:this.__("Hide"),onClick:function(e,n){n.goAway(0),t.dismiss()}}]})},dismiss:function(){localStorage.setItem("hideNotifierUntil",this.getTimestamp()+600)},shouldShowNotification:function(){if(null===this.version||!1===this.version.is_new)return!1;var t=localStorage.getItem("hideNotifierUntil")||null;return!(t&&t>this.getTimestamp())},getTimestamp:function(){return Date.now()/1e3|0}},computed:{hasNewVersion:function(){return this.version&&this.version.is_new}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.hasNewVersion?n("modal",{attrs:{open:t.open,size:"lg"},on:{closed:function(e){t.open=!1}},scopedSlots:t._u([{key:"header",fn:function(){return[n("span",{staticClass:"badge badge-success"},[t._v("New")]),t._v(" "+t._s(t.version.id)+"\n ")]},proxy:!0},{key:"content",fn:function(){return[n("div",{domProps:{innerHTML:t._s(t.version.changelog)}})]},proxy:!0},{key:"footer",fn:function(){return[n("a",{staticClass:"btn btn-primary",attrs:{href:t.version.link,target:"_blank"}},[n("i",{staticClass:"fas fa-external-link-square-alt mr-1"}),t._v(" "+t._s(t.__("View"))+"\n ")])]},proxy:!0}],null,!1,481153869)}):t._e()],1)}),[],!1,null,null,null);e.default=o.exports},uuIC:function(t,e,n){"use strict";n.r(e);var r={props:{open:{type:Boolean,required:!1,default:!1},id:{type:String,required:!1,default:"modal"},size:{type:String,required:!1,default:""}},methods:{createModal:function(){var t=this;this.$nextTick((function(){var e=$("#".concat(t.id));e.modal({keyboard:!1,show:!0}),e.on("hidden.bs.modal",(function(e){t.deleteModal()})),t.$emit("opened")}))},deleteModal:function(){$("#".concat(this.id)).modal("dispose"),$("div.modal-backdrop").remove(),$("body.modal-open").removeClass("modal-open"),this.$emit("closed")}},watch:{open:function(t){!0===t?this.createModal():this.deleteModal()}},computed:{hasHeader:function(){return this.$slots.hasOwnProperty("header")},hasFooter:function(){return this.$slots.hasOwnProperty("footer")}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.open?n("div",{staticClass:"modal fade",attrs:{id:t.id,role:"dialog"}},[n("div",{staticClass:"modal-dialog modal-dialog-centered",class:{"modal-lg":"lg"===t.size,"modal-xl":"xl"===t.size,"modal-sm":"sm"===t.size},attrs:{role:"document"}},[n("div",{staticClass:"modal-content",class:{"border-0":!t.hasHeader&&!t.hasFooter}},[t.hasHeader?n("div",{staticClass:"modal-header"},[n("h5",{staticClass:"modal-title"},[t._t("header")],2),t._v(" "),t._m(0)]):t._e(),t._v(" "),n("div",{staticClass:"modal-body",class:{"p-0":!t.hasHeader&&!t.hasFooter}},[t._t("content")],2),t._v(" "),t.hasFooter?n("div",{staticClass:"modal-footer"},[t._t("footer")],2):t._e()])])]):t._e()}),[function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-label":"Close"}},[e("i",{staticClass:"fas fa-times"})])}],!1,null,null,null);e.default=o.exports},vciP:function(t,e,n){"use strict";n.r(e);var r={props:{prevent:{type:Boolean,required:!1,default:!0}},mounted:function(){var t=this;window.addEventListener("beforeunload",(function(e){!0===t.prevent&&(e.stopPropagation(),e.preventDefault(),e.returnValue="")}))}},i=n("KHd+"),o=Object(i.a)(r,void 0,void 0,!1,null,null,null);e.default=o.exports},wGJR:function(t,e,n){!function(t){"use strict";var e,n,r=function(t){return t instanceof HTMLElement},i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object.assign({},t),i=[],o=[],a=function(){return Object.assign({},r)},s=function(){var t=[].concat(i);return i.length=0,t},l=function(){var t=[].concat(o);o.length=0,t.forEach((function(t){var e=t.type,n=t.data;c(e,n)}))},c=function(t,e,n){n?o.push({type:t,data:e}):(p[t]&&p[t](e),i.push({type:t,data:e}))},u=function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:null;if(null===n)return t.getAttribute(e)||t.hasAttribute(e);t.setAttribute(e,n)},l="http://www.w3.org/2000/svg",c=["svg","path"],u=function(t){return c.includes(t)},d=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof e&&(n=e,e=null);var r=u(t)?document.createElementNS(l,t):document.createElement(t);return e&&(u(t)?s(r,"class",e):r.className=e),o(n,(function(t,e){s(r,t,e)})),r},f=function(t){return function(e,n){void 0!==n&&t.children[n]?t.insertBefore(e,t.children[n]):t.appendChild(e)}},p=function(t,e){return function(t,n){return void 0!==n?e.splice(n,0,t):e.push(t),t}},m=function(t,e){return function(n){return e.splice(e.indexOf(n),1),n.element.parentNode&&t.removeChild(n.element),n}},h=function(t,e,n,r){var i=n[0]||t.left,o=n[1]||t.top,a=i+t.width,s=o+t.height*(r[1]||1),l={element:Object.assign({},t),inner:{left:t.left,top:t.top,right:t.right,bottom:t.bottom},outer:{left:i,top:o,right:a,bottom:s}};return e.filter((function(t){return!t.isRectIgnored()})).map((function(t){return t.rect})).forEach((function(t){_(l.inner,Object.assign({},t.inner)),_(l.outer,Object.assign({},t.outer))})),v(l.inner),l.outer.bottom+=l.element.marginBottom,l.outer.right+=l.element.marginRight,v(l.outer),l},_=function(t,e){e.top+=t.top,e.right+=t.left,e.bottom+=t.top,e.left+=t.left,e.bottom>t.bottom&&(t.bottom=e.bottom),e.right>t.right&&(t.right=e.right)},v=function(t){t.width=t.right-t.left,t.height=t.bottom-t.top},g=function(t){return"number"==typeof t},E=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001;return Math.abs(t-e)0&&void 0!==arguments[0]?arguments[0]:{},e=t.stiffness,n=void 0===e?.5:e,r=t.damping,i=void 0===r?.75:r,o=t.mass,s=void 0===o?10:o,l=null,c=null,u=0,d=!1,f=function(){if(!d){if(!g(l)||!g(c))return d=!0,void(u=0);E(c+=u+=-(c-l)*n/s,l,u*=i)?(c=l,u=0,d=!0,m.onupdate(c),m.oncomplete(c)):m.onupdate(c)}},p=function(t){if(g(t)&&!g(c)&&(c=t),null===l&&(l=t,c=t),c===(l=t)||void 0===l)return d=!0,u=0,m.onupdate(c),void m.oncomplete(c);d=!1},m=a({interpolate:f,target:{set:p,get:function(){return l}},resting:{get:function(){return d}},onupdate:function(t){},oncomplete:function(t){}});return m},tween:function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.duration,i=void 0===r?500:r,o=n.easing,s=void 0===o?b:o,l=n.delay,c=void 0===l?0:l,u=null,d=!0,f=!1,p=null,m=function(n){d||null===p||(null===u&&(u=n),n-u=0?s(f?1-e:e):0)*p)):(t=1,e=f?0:1,h.onupdate(e*p),h.oncomplete(e*p),d=!0)))},h=a({interpolate:m,target:{get:function(){return f?0:p},set:function(t){if(null===p)return p=t,h.onupdate(t),void h.oncomplete(t);t3&&void 0!==arguments[3]&&arguments[3];(e=Array.isArray(e)?e:[e]).forEach((function(e){t.forEach((function(t){var i=t,o=function(){return n[t]},a=function(e){return n[t]=e};"object"==typeof t&&(i=t.key,o=t.getter||o,a=t.setter||a),e[i]&&!r||(e[i]={get:o,set:a})}))}))},w=function(t){return null!=t},I={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},S=function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!0;for(var n in e)if(e[n]!==t[n])return!0;return!1},O=function(t,e){var n=e.opacity,r=e.perspective,i=e.translateX,o=e.translateY,a=e.scaleX,s=e.scaleY,l=e.rotateX,c=e.rotateY,u=e.rotateZ,d=e.originX,f=e.originY,p=e.width,m=e.height,h="",_="";(w(d)||w(f))&&(_+="transform-origin: "+(d||0)+"px "+(f||0)+"px;"),w(r)&&(h+="perspective("+r+"px) "),(w(i)||w(o))&&(h+="translate3d("+(i||0)+"px, "+(o||0)+"px, 0) "),(w(a)||w(s))&&(h+="scale3d("+(w(a)?a:1)+", "+(w(s)?s:1)+", 1) "),w(u)&&(h+="rotateZ("+u+"rad) "),w(l)&&(h+="rotateX("+l+"rad) "),w(c)&&(h+="rotateY("+c+"rad) "),h.length&&(_+="transform:"+h+";"),w(n)&&(_+="opacity:"+n+";",0===n&&(_+="visibility:hidden;"),n<1&&(_+="pointer-events:none;")),w(m)&&(_+="height:"+m+"px;"),w(p)&&(_+="width:"+p+"px;");var v=t.elementCurrentStyle||"";_.length===v.length&&_===v||(t.style.cssText=_,t.elementCurrentStyle=_)},D={styles:function(t){var e=t.mixinConfig,n=t.viewProps,r=t.viewInternalAPI,i=t.viewExternalAPI,o=t.view,a=Object.assign({},n),s={};T(e,[r,i],n);var l=function(){return o.rect?h(o.rect,o.childViews,[n.translateX||0,n.translateY||0],[n.scaleX||0,n.scaleY||0]):null};return r.rect={get:l},i.rect={get:l},e.forEach((function(t){n[t]=void 0===a[t]?I[t]:a[t]})),{write:function(){if(S(s,n))return O(o.element,n),Object.assign(s,Object.assign({},n)),!0},destroy:function(){}}},listeners:function(t){t.mixinConfig,t.viewProps,t.viewInternalAPI;var e,n=t.viewExternalAPI,r=(t.viewState,t.view),i=[],o=(e=r.element,function(t,n){e.addEventListener(t,n)}),a=function(t){return function(e,n){t.removeEventListener(e,n)}}(r.element);return n.on=function(t,e){i.push({type:t,fn:e}),o(t,e)},n.off=function(t,e){i.splice(i.findIndex((function(n){return n.type===t&&n.fn===e})),1),a(t,e)},{write:function(){return!0},destroy:function(){i.forEach((function(t){a(t.type,t.fn)}))}}},animations:function(t){var e=t.mixinConfig,n=t.viewProps,r=t.viewInternalAPI,i=t.viewExternalAPI,a=(t.viewState,Object.assign({},n)),s=[];return o(e,(function(t,e){var o=C(e);o&&(o.onupdate=function(e){n[t]=e},o.target=a[t],T([{key:t,setter:function(t){o.target!==t&&(o.target=t)},getter:function(){return n[t]}}],[r,i],n,!0),s.push(o))})),{write:function(t){var e=!0;return s.forEach((function(n){n.resting||(e=!1),n.interpolate(t)})),e},destroy:function(){}}},apis:function(t){var e=t.mixinConfig,n=t.viewProps,r=t.viewExternalAPI;T(e,r,n)}},R=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.layoutCalculated||(t.paddingTop=parseInt(n.paddingTop,10)||0,t.marginTop=parseInt(n.marginTop,10)||0,t.marginRight=parseInt(n.marginRight,10)||0,t.marginBottom=parseInt(n.marginBottom,10)||0,t.marginLeft=parseInt(n.marginLeft,10)||0,e.layoutCalculated=!0),t.left=e.offsetLeft||0,t.top=e.offsetTop||0,t.width=e.offsetWidth||0,t.height=e.offsetHeight||0,t.right=t.left+t.width,t.bottom=t.top+t.height,t.scrollTop=e.scrollTop,t.hidden=null===e.offsetParent,t},A=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.tag,n=void 0===e?"div":e,r=t.name,i=void 0===r?null:r,o=t.attributes,s=void 0===o?{}:o,l=t.read,c=void 0===l?function(){}:l,u=t.write,_=void 0===u?function(){}:u,v=t.create,g=void 0===v?function(){}:v,E=t.destroy,b=void 0===E?function(){}:E,y=t.filterFrameActionsForChild,C=void 0===y?function(t,e){return e}:y,T=t.didCreateView,w=void 0===T?function(){}:T,I=t.didWriteView,S=void 0===I?function(){}:I,O=t.ignoreRect,A=void 0!==O&&O,N=t.ignoreRectUpdate,k=void 0!==N&&N,x=t.mixins,P=void 0===x?[]:x;return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=d(n,"filepond--"+i,s),o=window.getComputedStyle(r,null),l=R(),u=null,v=!1,E=[],y=[],T={},I={},O=[_],N=[c],x=[b],L=function(){return r},F=function(){return E.concat()},M=function(){return T},B=function(t){return function(e,n){return e(t,n)}},U=function(){return u||(u=h(l,E,[0,0],[1,1]))},G=function(){return o},q=function(){u=null,E.forEach((function(t){return t._read()})),!(k&&l.width&&l.height)&&R(l,r,o);var t={root:W,props:e,rect:l};N.forEach((function(e){return e(t)}))},H=function(t,n,r){var i=0===n.length;return O.forEach((function(o){!1===o({props:e,root:W,actions:n,timestamp:t,shouldOptimize:r})&&(i=!1)})),y.forEach((function(e){!1===e.write(t)&&(i=!1)})),E.filter((function(t){return!!t.element.parentNode})).forEach((function(e){e._write(t,C(e,n),r)||(i=!1)})),E.forEach((function(e,o){e.element.parentNode||(W.appendChild(e.element,o),e._read(),e._write(t,C(e,n),r),i=!1)})),v=i,S({props:e,root:W,actions:n,timestamp:t}),i},$=function(){y.forEach((function(t){return t.destroy()})),x.forEach((function(t){t({root:W,props:e})})),E.forEach((function(t){return t._destroy()}))},V={element:{get:L},style:{get:G},childViews:{get:F}},j=Object.assign({},V,{rect:{get:U},ref:{get:M},is:function(t){return i===t},appendChild:f(r),createChildView:B(t),linkView:function(t){return E.push(t),t},unlinkView:function(t){E.splice(E.indexOf(t),1)},appendChildView:p(0,E),removeChildView:m(r,E),registerWriter:function(t){return O.push(t)},registerReader:function(t){return N.push(t)},registerDestroyer:function(t){return x.push(t)},invalidateLayout:function(){return r.layoutCalculated=!1},dispatch:t.dispatch,query:t.query}),z={element:{get:L},childViews:{get:F},rect:{get:U},resting:{get:function(){return v}},isRectIgnored:function(){return A},_read:q,_write:H,_destroy:$},Y=Object.assign({},V,{rect:{get:function(){return l}}});Object.keys(P).sort((function(t,e){return"styles"===t?1:"styles"===e?-1:0})).forEach((function(t){var n=D[t]({mixinConfig:P[t],viewProps:e,viewState:I,viewInternalAPI:j,viewExternalAPI:z,view:a(Y)});n&&y.push(n)}));var W=a(j);g({root:W,props:e});var X=r.children.length;return E.forEach((function(t,e){W.appendChild(t.element,X+e)})),w(W),a(z)}},N=function(t,e){return function(n){var r=n.root,i=n.props,o=n.actions,a=void 0===o?[]:o,s=n.timestamp,l=n.shouldOptimize;a.filter((function(e){return t[e.type]})).forEach((function(e){return t[e.type]({root:r,props:i,action:e.data,timestamp:s,shouldOptimize:l})})),e&&e({root:r,props:i,actions:a,timestamp:s,shouldOptimize:l})}},k=function(t,e){return e.parentNode.insertBefore(t,e)},x=function(t,e){return e.parentNode.insertBefore(t,e.nextSibling)},P=function(t){return Array.isArray(t)},L=function(t){return null==t},F=function(t){return t.trim()},M=function(t){return""+t},B=function(t){return"boolean"==typeof t},U=function(t){return B(t)?t:"true"===t},G=function(t){return"string"==typeof t},q=function(t){return g(t)?t:G(t)?M(t).replace(/[a-z]+/gi,""):0},H=function(t){return parseInt(q(t),10)},$=function(t){return parseFloat(q(t))},V=function(t){return g(t)&&isFinite(t)&&Math.floor(t)===t},j=function(t){if(V(t))return t;var e=M(t).trim();return/MB$/i.test(e)?(e=e.replace(/MB$i/,"").trim(),1e3*H(e)*1e3):/KB/i.test(e)?(e=e.replace(/KB$i/,"").trim(),1e3*H(e)):H(e)},z=function(t){return"function"==typeof t},Y={process:"POST",patch:"PATCH",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},W=function(t,e,n,r,i){if(null===e)return null;if("function"==typeof e)return e;var o={url:"GET"===n||"PATCH"===n?"?"+t+"=":"",method:n,headers:i,withCredentials:!1,timeout:r,onload:null,ondata:null,onerror:null};if(G(e))return o.url=e,o;if(Object.assign(o,e),G(o.headers)){var a=o.headers.split(/:(.+)/);o.headers={header:a[0],value:a[1]}}return o.withCredentials=U(o.withCredentials),o},X=function(t){return"object"==typeof t&&null!==t},K=function(t){return P(t)?"array":function(t){return null===t}(t)?"null":V(t)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(t)?"bytes":function(t){return X(t)&&G(t.url)&&X(t.process)&&X(t.revert)&&X(t.restore)&&X(t.fetch)}(t)?"api":typeof t},Q={array:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return L(t)?[]:P(t)?t:M(t).split(e).map(F).filter((function(t){return t.length}))},boolean:U,int:function(t){return"bytes"===K(t)?j(t):H(t)},number:$,float:$,bytes:j,string:function(t){return z(t)?t:M(t)},function:function(t){return function(t){for(var e=self,n=t.split("."),r=null;r=n.shift();)if(!(e=e[r]))return null;return e}(t)},serverapi:function(t){return(n={}).url=G(e=t)?e:e.url||"",n.timeout=e.timeout?parseInt(e.timeout,10):0,n.headers=e.headers?e.headers:{},o(Y,(function(t){n[t]=W(t,e[t],Y[t],n.timeout,n.headers)})),n.remove=e.remove||null,delete n.headers,n;var e,n},object:function(t){try{return JSON.parse(t.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'))}catch(t){return null}}},Z=function(t,e,n){if(t===e)return t;var r,i=K(t);if(i!==n){var o=(r=t,Q[n](r));if(i=K(o),null===o)throw'Trying to assign value with incorrect type to "'+option+'", allowed type: "'+n+'"';t=o}return t},J=function(t){var e={};return o(t,(function(n){var r,i,o,a=t[n];e[n]=(r=a[0],i=a[1],o=r,{enumerable:!0,get:function(){return o},set:function(t){o=Z(t,r,i)}})})),a(e)},tt=function(t){return{items:[],listUpdateTimeout:null,itemUpdateTimeout:null,processingQueue:[],options:J(t)}},et=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return t.split(/(?=[A-Z])/).map((function(t){return t.toLowerCase()})).join(e)},nt=function(t,e){var n={};return o(e,(function(e){n[e]={get:function(){return t.getState().options[e]},set:function(n){t.dispatch("SET_"+et(e,"_").toUpperCase(),{value:n})}}})),n},rt=function(t){return function(e,n,r){var i={};return o(t,(function(t){var n=et(t,"_").toUpperCase();i["SET_"+n]=function(i){try{r.options[t]=i.value}catch(t){}e("DID_SET_"+n,{value:r.options[t]})}})),i}},it=function(t){return function(e){var n={};return o(t,(function(t){n["GET_"+et(t,"_").toUpperCase()]=function(n){return e.options[t]}})),n}},ot=1,at=2,st=3,lt=4,ct=5,ut=function(){return Math.random().toString(36).substr(2,9)},dt=function(t,e){return t.splice(e,1)},ft=function(){var t=[],e=function(e,n){dt(t,t.findIndex((function(t){return t.event===e&&(t.cb===n||!n)})))};return{fire:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;iBrowse',yt.STRING],labelInvalidField:["Field contains invalid files",yt.STRING],labelFileWaitingForSize:["Waiting for size",yt.STRING],labelFileSizeNotAvailable:["Size not available",yt.STRING],labelFileCountSingular:["file in list",yt.STRING],labelFileCountPlural:["files in list",yt.STRING],labelFileLoading:["Loading",yt.STRING],labelFileAdded:["Added",yt.STRING],labelFileLoadError:["Error during load",yt.STRING],labelFileRemoved:["Removed",yt.STRING],labelFileRemoveError:["Error during remove",yt.STRING],labelFileProcessing:["Uploading",yt.STRING],labelFileProcessingComplete:["Upload complete",yt.STRING],labelFileProcessingAborted:["Upload cancelled",yt.STRING],labelFileProcessingError:["Error during upload",yt.STRING],labelFileProcessingRevertError:["Error during revert",yt.STRING],labelTapToCancel:["tap to cancel",yt.STRING],labelTapToRetry:["tap to retry",yt.STRING],labelTapToUndo:["tap to undo",yt.STRING],labelButtonRemoveItem:["Remove",yt.STRING],labelButtonAbortItemLoad:["Abort",yt.STRING],labelButtonRetryItemLoad:["Retry",yt.STRING],labelButtonAbortItemProcessing:["Cancel",yt.STRING],labelButtonUndoItemProcessing:["Undo",yt.STRING],labelButtonRetryItemProcessing:["Retry",yt.STRING],labelButtonProcessItem:["Upload",yt.STRING],iconRemove:['',yt.STRING],iconProcess:['',yt.STRING],iconRetry:['',yt.STRING],iconUndo:['',yt.STRING],iconDone:['',yt.STRING],oninit:[null,yt.FUNCTION],onwarning:[null,yt.FUNCTION],onerror:[null,yt.FUNCTION],onactivatefile:[null,yt.FUNCTION],onaddfilestart:[null,yt.FUNCTION],onaddfileprogress:[null,yt.FUNCTION],onaddfile:[null,yt.FUNCTION],onprocessfilestart:[null,yt.FUNCTION],onprocessfileprogress:[null,yt.FUNCTION],onprocessfileabort:[null,yt.FUNCTION],onprocessfilerevert:[null,yt.FUNCTION],onprocessfile:[null,yt.FUNCTION],onprocessfiles:[null,yt.FUNCTION],onremovefile:[null,yt.FUNCTION],onpreparefile:[null,yt.FUNCTION],onupdatefiles:[null,yt.FUNCTION],beforeDropFile:[null,yt.FUNCTION],beforeAddFile:[null,yt.FUNCTION],beforeRemoveFile:[null,yt.FUNCTION],stylePanelLayout:[null,yt.STRING],stylePanelAspectRatio:[null,yt.STRING],styleItemPanelAspectRatio:[null,yt.STRING],styleButtonRemoveItemPosition:["left",yt.STRING],styleButtonProcessItemPosition:["right",yt.STRING],styleLoadIndicatorPosition:["right",yt.STRING],styleProgressIndicatorPosition:["right",yt.STRING],files:[[],yt.ARRAY]},Dt=function(t,e){return L(e)?t[0]||null:V(e)?t[e]||null:("object"==typeof e&&(e=e.id),t.find((function(t){return t.id===e}))||null)},Rt=function(t){if(L(t))return t;if(/:/.test(t)){var e=t.split(":");return e[1]/e[0]}return parseFloat(t)},At=function(t){return t.filter((function(t){return!t.archived}))},Nt={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4},kt=[vt.LOAD_ERROR,vt.PROCESSING_ERROR,vt.PROCESSING_REVERT_ERROR],xt=[vt.LOADING,vt.PROCESSING,vt.PROCESSING_QUEUED,vt.INIT],Pt=[vt.PROCESSING_COMPLETE],Lt=function(t){return kt.includes(t.status)},Ft=function(t){return xt.includes(t.status)},Mt=function(t){return Pt.includes(t.status)},Bt=function(t){return{GET_STATUS:function(){var e=At(t.items),n=Nt.EMPTY,r=Nt.ERROR,i=Nt.BUSY,o=Nt.IDLE,a=Nt.READY;return 0===e.length?n:e.some(Lt)?r:e.some(Ft)?i:e.some(Mt)?a:o},GET_ITEM:function(e){return Dt(t.items,e)},GET_ACTIVE_ITEM:function(e){return Dt(At(t.items),e)},GET_ACTIVE_ITEMS:function(){return At(t.items)},GET_ITEMS:function(){return t.items},GET_ITEM_NAME:function(e){var n=Dt(t.items,e);return n?n.filename:null},GET_ITEM_SIZE:function(e){var n=Dt(t.items,e);return n?n.fileSize:null},GET_STYLES:function(){return Object.keys(t.options).filter((function(t){return/^style/.test(t)})).map((function(e){return{name:e,value:t.options[e]}}))},GET_PANEL_ASPECT_RATIO:function(){return/circle/.test(t.options.stylePanelLayout)?1:Rt(t.options.stylePanelAspectRatio)},GET_ITEM_PANEL_ASPECT_RATIO:function(){return t.options.styleItemPanelAspectRatio},GET_ITEMS_BY_STATUS:function(e){return At(t.items).filter((function(t){return t.status===e}))},GET_TOTAL_ITEMS:function(){return At(t.items).length},IS_ASYNC:function(){return X(t.options.server)&&(X(t.options.server.process)||z(t.options.server.process))}}},Ut=function(t,e,n){return L(e)?null:void 0===n?(t.push(e),e):(r=n,i=0,o=t.length,function(t,e,n){t.splice(e,0,n)}(t,n=Math.max(Math.min(o,r),i),e),e);var r,i,o},Gt=function(t){return/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(t)},qt=function(t){return t.split("/").pop().split("?").shift()},Ht=function(t){return t.split(".").pop()},$t=function(t){if("string"!=typeof t)return"";var e=t.split("/").pop();return/svg/.test(e)?"svg":/zip|compressed/.test(e)?"zip":/plain/.test(e)?"txt":/msword/.test(e)?"doc":/[a-z]+/.test(e)?"jpeg"===e?"jpg":e:""},Vt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(e+t).slice(-e.length)},jt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return t.getFullYear()+"-"+Vt(t.getMonth()+1,"00")+"-"+Vt(t.getDate(),"00")+"_"+Vt(t.getHours(),"00")+"-"+Vt(t.getMinutes(),"00")+"-"+Vt(t.getSeconds(),"00")},zt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i="string"==typeof n?t.slice(0,t.size,n):t.slice(0,t.size,t.type);return i.lastModifiedDate=new Date,G(e)||(e=jt()),e&&null===r&&Ht(e)?i.name=e:(r=r||$t(i.type),i.name=e+(r?"."+r:"")),i},Yt=function(t,e){var n=window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(n){var r=new n;return r.append(t),r.getBlob(e)}return new Blob([t],{type:e})},Wt=function(t){return(/^data:(.+);/.exec(t)||[])[1]||null},Xt=function(t){var e=Wt(t);return function(t,e){for(var n=new ArrayBuffer(t.length),r=new Uint8Array(n),i=0;i=200&&a.status<300?r.onload(a):r.onerror(a)},a.onerror=function(){return r.onerror(a)},a.onabort=function(){i=!0,r.onabort()},a.ontimeout=function(){return r.ontimeout(a)},a.open(n.method,e,!0),V(n.timeout)&&(a.timeout=n.timeout),Object.keys(n.headers).forEach((function(t){var e=unescape(encodeURIComponent(n.headers[t]));a.setRequestHeader(t,e)})),n.responseType&&(a.responseType=n.responseType),n.withCredentials&&(a.withCredentials=!0),a.send(t),r},re=function(t,e,n,r){return{type:t,code:e,body:n,headers:r}},ie=function(t){return function(e){t(re("error",0,"Timeout",e.getAllResponseHeaders()))}},oe=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if("function"==typeof e)return e;if(!e||!G(e.url))return null;var n=e.onload||function(t){return t},r=e.onerror||function(t){return null};return function(i,o,a,s,l,c){var u=ne(i,t+e.url,Object.assign({},e,{responseType:"blob"}));return u.onload=function(t){var e=t.getAllResponseHeaders(),r=Jt(e).name||qt(i);o(re("load",t.status,zt(n(t.response),r),e))},u.onerror=function(t){a(re("error",t.status,r(t.response)||t.statusText,t.getAllResponseHeaders()))},u.onheaders=function(t){c(re("headers",t.status,null,t.getAllResponseHeaders()))},u.ontimeout=ie(a),u.onprogress=s,u.onabort=l,u}};function ae(t){this.wrapped=t}function se(t){var e,n;function r(e,n){try{var o=t[e](n),a=o.value,s=a instanceof ae;Promise.resolve(s?a.wrapped:a).then((function(t){s?r("next",t):i(o.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(t){i("throw",t)}}function i(t,i){switch(t){case"return":e.resolve({value:i,done:!0});break;case"throw":e.reject(i);break;default:e.resolve({value:i,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,i){return new Promise((function(o,a){var s={key:t,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(e=n=s,r(t,i))}))},"function"!=typeof t.return&&(this.return=void 0)}function le(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e=1||R()};return _.serverId?(w=function(t){_.aborted||(d.filter((function(e){return e.offsetr.chunkSize,p=d&&(f||r.chunkForce);if(i instanceof Blob&&p)return he(t,e,n,i,o,a,s,l,c,u,r);var m=e.ondata||function(t){return t},h=e.onload||function(t){return t},_=e.onerror||function(t){return null},v=new FormData;X(o)&&v.append(n,JSON.stringify(o)),(i instanceof Blob?[{name:null,file:i}]:i).forEach((function(t){v.append(n,t.file,null===t.name?t.file.name:""+t.name+t.file.name)}));var g=ne(m(v),t+e.url,e);return g.onload=function(t){a(re("load",t.status,h(t.response),t.getAllResponseHeaders()))},g.onerror=function(t){s(re("error",t.status,_(t.response)||t.statusText,t.getAllResponseHeaders()))},g.ontimeout=ie(s),g.onprogress=l,g.onabort=c,g}}},ve=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if("function"==typeof e)return e;if(!e||!G(e.url))return function(t,e){return e()};var n=e.onload||function(t){return t},r=e.onerror||function(t){return null};return function(i,o,a){var s=ne(i,t+e.url,e);return s.onload=function(t){o(re("load",t.status,n(t.response),t.getAllResponseHeaders()))},s.onerror=function(t){a(re("error",t.status,r(t.response)||t.statusText,t.getAllResponseHeaders()))},s.ontimeout=ie(a),s}},ge=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t+Math.random()*(e-t)},Ee=function(t){var e={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},n=function(){e.request&&(e.perceivedPerformanceUpdater.clear(),e.request.abort(),e.complete=!0)},r=Object.assign({},ft(),{process:function(n,i){var o=function(){0!==e.duration&&null!==e.progress&&r.fire("progress",r.getProgress())},a=function(){e.complete=!0,r.fire("load-perceived",e.response.body)};r.fire("start"),e.timestamp=Date.now(),e.perceivedPerformanceUpdater=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3&&void 0!==arguments[3]?arguments[3]:25),r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,i=null,o=Date.now(),a=function a(){var s=Date.now()-o,l=ge(n,r);s+l>e&&(l=s+l-e);var c=s/e;c>=1?t(1):(t(c),i=setTimeout(a,l))};return a(),{clear:function(){clearTimeout(i)}}}((function(t){e.perceivedProgress=t,e.perceivedDuration=Date.now()-e.timestamp,o(),e.response&&1===e.perceivedProgress&&!e.complete&&a()}),ge(750,1500)),e.request=t(n,i,(function(t){e.response=X(t)?t:{type:"load",code:200,body:""+t,headers:{}},e.duration=Date.now()-e.timestamp,e.progress=1,r.fire("load",e.response.body),1===e.perceivedProgress&&a()}),(function(t){e.perceivedPerformanceUpdater.clear(),r.fire("error",X(t)?t:{type:"error",code:0,body:""+t})}),(function(t,n,r){e.duration=Date.now()-e.timestamp,e.progress=t?n/r:null,o()}),(function(){e.perceivedPerformanceUpdater.clear(),r.fire("abort",e.response?e.response.body:null)}),(function(t){r.fire("transfer",t)}))},abort:n,getProgress:function(){return e.progress?Math.min(e.progress,e.perceivedProgress):null},getDuration:function(){return Math.min(e.duration,e.perceivedDuration)},reset:function(){n(),e.complete=!1,e.perceivedProgress=0,e.progress=0,e.timestamp=null,e.perceivedDuration=0,e.duration=0,e.request=null,e.response=null}});return r},be=function(t){return t.substr(0,t.lastIndexOf("."))||t},ye=function(t){var e=[t.name,t.size,t.type];return t instanceof Blob||Gt(t)?e[0]=t.name||jt():Gt(t)?(e[1]=t.length,e[2]=Wt(t)):G(t)&&(e[0]=qt(t),e[1]=0,e[2]="application/octet-stream"),{name:e[0],size:e[1],type:e[2]}},Ce=function(t){return!!(t instanceof File||t instanceof Blob&&t.name)},Te=function t(e){if(!X(e))return e;var n=P(e)?[]:{};for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];n[r]=i&&X(i)?t(i):i}return n},we=function(t,e){var n=function(t,e){return L(e)?0:G(e)?t.findIndex((function(t){return t.id===e})):-1}(t,e);if(!(n<0))return t[n]||null},Ie=function(t,e,n,r,i,o){var a=ne(null,t,{method:"GET",responseType:"blob"});return a.onload=function(n){var r=n.getAllResponseHeaders(),i=Jt(r).name||qt(t);e(re("load",n.status,zt(n.response,i),r))},a.onerror=function(t){n(re("error",t.status,t.statusText,t.getAllResponseHeaders()))},a.onheaders=function(t){o(re("headers",t.status,null,t.getAllResponseHeaders()))},a.ontimeout=ie(n),a.onprogress=r,a.onabort=i,a},Se=function(t){return 0===t.indexOf("//")&&(t=location.protocol+t),t.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]},Oe=function(t){return function(){return z(t)?t.apply(void 0,arguments):t}},De=function(t,e){clearTimeout(e.listUpdateTimeout),e.listUpdateTimeout=setTimeout((function(){t("DID_UPDATE_ITEMS",{items:At(e.items)})}),0)},Re=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},r=n.query,i=n.success,o=void 0===i?function(){}:i,a=n.failure,s=void 0===a?function(){}:a,l=Dt(t.items,r);l?e(l,o,s):s({error:re("error",0,"Item not found"),file:null})}},ke=function(t,e,n){return{ABORT_ALL:function(){At(n.items).forEach((function(t){t.freeze(),t.abortLoad(),t.abortProcessing()}))},DID_SET_FILES:function(e){var r=e.value,i=(void 0===r?[]:r).map((function(t){return{source:t.source?t.source:t,options:t.options}})),o=At(n.items);o.forEach((function(e){i.find((function(t){return t.source===e.source||t.source===e.file}))||t("REMOVE_ITEM",{query:e})})),o=At(n.items),i.forEach((function(e,n){o.find((function(t){return t.source===e.source||t.file===e.source}))||t("ADD_ITEM",Object.assign({},e,{interactionMethod:ct,index:n}))}))},DID_UPDATE_ITEM_METADATA:function(r){var i=r.id;clearTimeout(n.itemUpdateTimeout),n.itemUpdateTimeout=setTimeout((function(){var r=we(n.items,i);if(e("IS_ASYNC")){var o,a=function(){setTimeout((function(){t("REQUEST_ITEM_PROCESSING",{query:i})}),32)};return r.status===vt.PROCESSING_COMPLETE?(o=n.options.instantUpload,void r.revert(ve(n.options.server.url,n.options.server.revert),e("GET_FORCE_REVERT")).then(o?a:function(){}).catch((function(){}))):r.status===vt.PROCESSING?function(t){r.abortProcessing().then(t?a:function(){})}(n.options.instantUpload):void(n.options.instantUpload&&a())}Tt("SHOULD_PREPARE_OUTPUT",!1,{item:r,query:e}).then((function(e){e&&t("REQUEST_PREPARE_OUTPUT",{query:i,item:r,ready:function(e){t("DID_PREPARE_OUTPUT",{id:i,file:e})}},!0)}))}),0)},SORT:function(t){var e=t.compare;Ae(n,e)},ADD_ITEMS:function(n){var r=n.items,i=n.index,o=n.interactionMethod,a=n.success,s=void 0===a?function(){}:a,l=n.failure,c=void 0===l?function(){}:l,u=i;if(-1===i||void 0===i){var d=e("GET_ITEM_INSERT_LOCATION"),f=e("GET_TOTAL_ITEMS");u="before"===d?0:f}var p=e("GET_IGNORED_FILES"),m=r.filter((function(t){return Ce(t)?!p.includes(t.name.toLowerCase()):!L(t)})).map((function(e){return new Promise((function(n,r){t("ADD_ITEM",{interactionMethod:o,source:e.source||e,success:n,failure:r,index:u++,options:e.options||{}})}))}));Promise.all(m).then(s).catch(c)},ADD_ITEM:function(r){var i=r.source,o=r.index,s=void 0===o?-1:o,l=r.interactionMethod,c=r.success,u=void 0===c?function(){}:c,d=r.failure,f=void 0===d?function(){}:d,p=r.options,m=void 0===p?{}:p;if(L(i))f({error:re("error",0,"No source"),file:null});else if(!Ce(i)||!n.options.ignoredFiles.includes(i.name.toLowerCase())){if(!function(t){var e=At(t.items).length;if(!t.options.allowMultiple)return 0===e;var n=t.options.maxFiles;return null===n||e0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=ut(),i={archived:!1,frozen:!1,released:!1,source:null,file:n,serverFileReference:e,transferId:null,processingAborted:!1,status:e?vt.PROCESSING_COMPLETE:vt.INIT,activeLoader:null,activeProcessor:null},o=null,s={},l=function(t){return i.status=t},c=function(t){if(!i.released&&!i.frozen){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r=400&&e.code<500)return t("DID_THROW_ITEM_INVALID",{id:y,error:e,status:{main:r,sub:e.code+" ("+e.body+")"}}),void f({error:e,file:ht(E)});t("DID_THROW_ITEM_LOAD_ERROR",{id:y,error:e,status:{main:r,sub:n.options.labelTapToRetry}})})),E.on("load-file-error",(function(e){t("DID_THROW_ITEM_INVALID",{id:y,error:e.status,status:e.status}),f({error:e.status,file:ht(E)})})),E.on("load-abort",(function(){t("REMOVE_ITEM",{query:y})})),E.on("load-skip",(function(){t("COMPLETE_LOAD_ITEM",{query:y,item:E,data:{source:i,success:u}})})),E.on("load",(function(){var r=function(r){r?(E.on("metadata-update",(function(e){t("DID_UPDATE_ITEM_METADATA",{id:y,change:e})})),Tt("SHOULD_PREPARE_OUTPUT",!1,{item:E,query:e}).then((function(e){var r=function(){t("COMPLETE_LOAD_ITEM",{query:y,item:E,data:{source:i,success:u}}),De(t,n)};e?t("REQUEST_PREPARE_OUTPUT",{query:y,item:E,ready:function(e){t("DID_PREPARE_OUTPUT",{id:y,file:e}),r()}},!0):r()}))):t("REMOVE_ITEM",{query:y})};Tt("DID_LOAD_ITEM",E,{query:e,dispatch:t}).then((function(){Re(e("GET_BEFORE_ADD_FILE"),ht(E)).then(r)})).catch((function(){r(!1)}))})),E.on("process-start",(function(){t("DID_START_ITEM_PROCESSING",{id:y})})),E.on("process-progress",(function(e){t("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:y,progress:e})})),E.on("process-error",(function(e){t("DID_THROW_ITEM_PROCESSING_ERROR",{id:y,error:e,status:{main:Oe(n.options.labelFileProcessingError)(e),sub:n.options.labelTapToRetry}})})),E.on("process-revert-error",(function(e){t("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:y,error:e,status:{main:Oe(n.options.labelFileProcessingRevertError)(e),sub:n.options.labelTapToRetry}})})),E.on("process-complete",(function(e){t("DID_COMPLETE_ITEM_PROCESSING",{id:y,error:null,serverFileReference:e})})),E.on("process-abort",(function(){t("DID_ABORT_ITEM_PROCESSING",{id:y})})),E.on("process-revert",(function(){t("DID_REVERT_ITEM_PROCESSING",{id:y})})),t("DID_ADD_ITEM",{id:y,index:s,interactionMethod:l}),De(t,n);var C=n.options.server||{},T=C.url,w=C.load,I=C.restore,S=C.fetch;E.load(i,te(g===gt.INPUT?G(i)&&function(t){return(t.indexOf(":")>-1||t.indexOf("//")>-1)&&Se(location.href)!==Se(t)}(i)?oe(T,S):Ie:oe(T,g===gt.LIMBO?I:w)),(function(t,n,r){Tt("LOAD_FILE",t,{query:e}).then(n).catch(r)}))}},REQUEST_PREPARE_OUTPUT:function(t){var n=t.item,r=t.ready;n.archived||Tt("PREPARE_OUTPUT",n.file,{query:e,item:n}).then((function(t){Tt("COMPLETE_PREPARE_OUTPUT",t,{query:e,item:n}).then((function(t){n.archived||r(t)}))}))},COMPLETE_LOAD_ITEM:function(r){var i=r.item,o=r.data,a=o.success,s=o.source,l=e("GET_ITEM_INSERT_LOCATION");z(l)&&s&&Ae(n,l),t("DID_LOAD_ITEM",{id:i.id,error:null,serverFileReference:i.origin===gt.INPUT?null:s}),a(ht(i)),i.origin!==gt.LOCAL?i.origin!==gt.LIMBO?e("IS_ASYNC")&&n.options.instantUpload&&t("REQUEST_ITEM_PROCESSING",{query:i.id}):t("DID_COMPLETE_ITEM_PROCESSING",{id:i.id,error:null,serverFileReference:s}):t("DID_LOAD_LOCAL_ITEM",{id:i.id})},RETRY_ITEM_LOAD:Ne(n,(function(t){t.retryLoad()})),REQUEST_ITEM_PROCESSING:Ne(n,(function(r,i,o){if(r.status===vt.IDLE||r.status===vt.PROCESSING_ERROR)r.status!==vt.PROCESSING_QUEUED&&(r.requestProcessing(),t("DID_REQUEST_ITEM_PROCESSING",{id:r.id}),t("PROCESS_ITEM",{query:r,success:i,failure:o},!0));else{var a=function(){setTimeout((function(){t("REQUEST_ITEM_PROCESSING",{query:r,success:i,failure:o})}),32)};r.status===vt.PROCESSING_COMPLETE||r.status===vt.PROCESSING_REVERT_ERROR?r.revert(ve(n.options.server.url,n.options.server.revert),e("GET_FORCE_REVERT")).then(a).catch((function(){})):r.status===vt.PROCESSING&&r.abortProcessing().then(a)}})),PROCESS_ITEM:Ne(n,(function(r,i,o){var a=e("GET_MAX_PARALLEL_UPLOADS");if(e("GET_ITEMS_BY_STATUS",vt.PROCESSING).length!==a){if(r.status!==vt.PROCESSING){var s=function e(){var r=n.processingQueue.shift();if(r){var i=r.id,o=r.success,a=r.failure,s=Dt(n.items,i);s&&!s.archived?t("PROCESS_ITEM",{query:i,success:o,failure:a},!0):e()}};r.onOnce("process-complete",(function(){i(ht(r)),s(),e("GET_ITEMS_BY_STATUS",vt.PROCESSING_COMPLETE).length===n.items.length&&t("DID_COMPLETE_ITEM_PROCESSING_ALL")})),r.onOnce("process-error",(function(t){o({error:t,file:ht(r)}),s()}));var l=n.options;r.process(Ee(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return"function"==typeof e?function(){for(var t=arguments.length,i=new Array(t),o=0;or&&i-r<=.5&&(o=0),r>i&&r-i>=.5&&(o=0),function(t,e,n,r,i,o){var a=Le(t,e,n,i),s=Le(t,e,n,r);return["M",a.x,a.y,"A",n,n,0,o,0,s.x,s.y].join(" ")}(t,e,n,360*Math.min(.9999,r),360*Math.min(.9999,i),o)},Me=A({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:function(t){var e=t.root,n=t.props;n.spin=!1,n.progress=0,n.opacity=0;var r=d("svg");e.ref.path=d("path",{"stroke-width":2,"stroke-linecap":"round"}),r.appendChild(e.ref.path),e.ref.svg=r,e.appendChild(r)},write:function(t){var e=t.root,n=t.props;if(0!==n.opacity){n.align&&(e.element.dataset.align=n.align);var r=parseInt(s(e.ref.path,"stroke-width"),10),i=.5*e.rect.element.width,o=0,a=0;n.spin?(o=0,a=.5):(o=0,a=n.progress);var l=Fe(i,i,i-r,o,a);s(e.ref.path,"d",l),s(e.ref.path,"stroke-opacity",n.spin||n.progress>0?1:0)}},mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),Be=A({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:function(t){var e=t.root,n=t.props;e.element.innerHTML=(n.icon||"")+""+n.label+"",n.isDisabled=!1},write:function(t){var e=t.root,n=t.props,r=n.isDisabled,i=e.query("GET_DISABLED")||0===n.opacity;i&&!r?(n.isDisabled=!0,s(e.element,"disabled","disabled")):!i&&r&&(n.isDisabled=!1,e.element.removeAttribute("disabled"))}}),Ue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".";return(t=Math.round(Math.abs(t)))<1e3?t+" bytes":t0&&(e.height=e.ref.container.rect.element.height)),i&&(e.ref.panel.height=null),e.ref.panel.height=e.height},destroy:function(t){var e=t.root,n=t.props;e.element.removeEventListener("click",e.ref.handleClick),e.dispatch("RELEASE_ITEM",{query:n.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:"spring",scaleY:"spring",translateX:vn,translateY:vn,opacity:{type:"tween",duration:150}}}}),yn=function(t,e){if(e){var n=t.rect.element.width,r=t.childViews,i=r.length,o=null;if(0===i||e.topg){if(e.left3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;t.translateX=e,t.translateY=n,Date.now()>t.spawnDate&&(0===t.opacity&&Tn(t,e,n,r,i),t.scaleX=1,t.scaleY=1,t.opacity=1)},Tn=function(t,e,n,r,i){t.interactionMethod===ct?(t.translateX=null,t.translateX=e,t.translateY=null,t.translateY=n):t.interactionMethod===at?(t.translateX=null,t.translateX=e-20*r,t.translateY=null,t.translateY=n-10*i,t.scaleX=.8,t.scaleY=.8):t.interactionMethod===st?(t.translateY=null,t.translateY=n-30):t.interactionMethod===ot&&(t.translateX=null,t.translateX=e-30,t.translateY=null)},wn=N({DID_ADD_ITEM:function(t){var e=t.root,n=t.action,r=n.id,i=n.index,o=n.interactionMethod;e.ref.addIndex=i;var a=Date.now(),s=a,l=1;if(o!==ct){l=0;var c=e.query("GET_ITEM_INSERT_INTERVAL"),u=a-e.ref.lastItemSpanwDate;s=u3&&void 0!==arguments[3]?arguments[3]:"";n?s(t,e,r):t.removeAttribute(e)},Rn=function(t){var e=t.root,n=(t.action,e.query("GET_DISABLED")),r=e.query("GET_ALLOW_BROWSE"),i=n||!r;Dn(e.element,"disabled",i)},An=function(t){var e=t.root,n=e.element;e.query("GET_TOTAL_ITEMS")>0?(Dn(n,"required",!1),Dn(n,"name",!1)):(Dn(n,"name",!0,e.query("GET_NAME")),e.query("GET_CHECK_VALIDITY")&&n.setCustomValidity(""),e.query("GET_REQUIRED")&&Dn(n,"required",!0))},Nn=A({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:function(t){var e=t.root,n=t.props;e.element.id="filepond--browser-"+n.id,s(e.element,"name",e.query("GET_NAME")),s(e.element,"aria-controls","filepond--assistant-"+n.id),s(e.element,"aria-labelledby","filepond--drop-label-"+n.id),e.ref.handleChange=function(t){if(e.element.value){var r=Array.from(e.element.files);setTimeout((function(){n.onload(r),function(t){if(t&&""!==t.value){try{t.value=""}catch(t){}if(t.value){var e=xe("form"),n=t.parentNode,r=t.nextSibling;e.appendChild(t),e.reset(),r?n.insertBefore(t,r):n.appendChild(t)}}}(e.element)}),250)}},e.element.addEventListener("change",e.ref.handleChange)},destroy:function(t){var e=t.root;e.element.removeEventListener("change",e.ref.handleChange)},write:N({DID_LOAD_ITEM:An,DID_REMOVE_ITEM:An,DID_THROW_ITEM_INVALID:function(t){var e=t.root;e.query("GET_CHECK_VALIDITY")&&e.element.setCustomValidity(e.query("GET_LABEL_INVALID_FIELD"))},DID_SET_DISABLED:Rn,DID_SET_ALLOW_BROWSE:Rn,DID_SET_ALLOW_MULTIPLE:function(t){var e=t.root,n=t.action;Dn(e.element,"multiple",n.value)},DID_SET_ACCEPTED_FILE_TYPES:function(t){var e=t.root,n=t.action;Dn(e.element,"accept",!!n.value,n.value?n.value.join(","):"")},DID_SET_CAPTURE_METHOD:function(t){var e=t.root,n=t.action;Dn(e.element,"capture",!!n.value,!0===n.value?"":n.value)},DID_SET_REQUIRED:function(t){var e=t.root;t.action.value?0===e.query("GET_TOTAL_ITEMS")&&Dn(e.element,"required",!0):Dn(e.element,"required",!1)}})}),kn=13,xn=32,Pn=function(t,e){t.innerHTML=e;var n=t.querySelector(".filepond--label-action");return n&&s(n,"tabindex","0"),e},Ln=A({name:"drop-label",ignoreRect:!0,create:function(t){var e=t.root,n=t.props,r=xe("label");s(r,"for","filepond--browser-"+n.id),s(r,"id","filepond--drop-label-"+n.id),s(r,"aria-hidden","true"),e.ref.handleKeyDown=function(t){(t.keyCode===kn||t.keyCode===xn)&&(t.preventDefault(),e.ref.label.click())},e.ref.handleClick=function(t){t.target===r||r.contains(t.target)||e.ref.label.click()},r.addEventListener("keydown",e.ref.handleKeyDown),e.element.addEventListener("click",e.ref.handleClick),Pn(r,n.caption),e.appendChild(r),e.ref.label=r},destroy:function(t){var e=t.root;e.ref.label.addEventListener("keydown",e.ref.handleKeyDown),e.element.removeEventListener("click",e.ref.handleClick)},write:N({DID_SET_LABEL_IDLE:function(t){var e=t.root,n=t.action;Pn(e.ref.label,n.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),Fn=A({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),Mn=N({DID_DRAG:function(t){var e=t.root,n=t.action;e.ref.blob?(e.ref.blob.translateX=n.position.scopeLeft,e.ref.blob.translateY=n.position.scopeTop,e.ref.blob.scaleX=1,e.ref.blob.scaleY=1,e.ref.blob.opacity=1):function(t){var e=t.root,n=.5*e.rect.element.width,r=.5*e.rect.element.height;e.ref.blob=e.appendChildView(e.createChildView(Fn,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:n,translateY:r}))}({root:e})},DID_DROP:function(t){var e=t.root;e.ref.blob&&(e.ref.blob.scaleX=2.5,e.ref.blob.scaleY=2.5,e.ref.blob.opacity=0)},DID_END_DRAG:function(t){var e=t.root;e.ref.blob&&(e.ref.blob.opacity=0)}}),Bn=A({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:function(t){var e=t.root,n=t.props,r=t.actions;Mn({root:e,props:n,actions:r});var i=e.ref.blob;0===r.length&&i&&0===i.opacity&&(e.removeChildView(i),e.ref.blob=null)}}),Un=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],Gn=["css","csv","html","txt"],qn={zip:"zip|compressed",epub:"application/epub+zip"},Hn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t=t.toLowerCase(),Un.includes(t)?"image/"+("jpg"===t?"jpeg":"svg"===t?"svg+xml":t):Gn.includes(t)?"text/"+t:qn[t]||null},$n=function(t){return new Promise((function(e,n){var r=Jn(t);if(r.length&&!Vn(t))return e(r);jn(t).then(e)}))},Vn=function(t){return!!t.files&&t.files.length>0},jn=function(t){return new Promise((function(e,n){var r=(t.items?Array.from(t.items):[]).filter((function(t){return zn(t)})).map((function(t){return Yn(t)}));r.length?Promise.all(r).then((function(t){var n=[];t.forEach((function(t){n.push.apply(n,t)})),e(n.filter((function(t){return t})))})).catch(console.error):e(t.files?Array.from(t.files):[])}))},zn=function(t){if(Qn(t)){var e=Zn(t);if(e)return e.isFile||e.isDirectory}return"file"===t.kind},Yn=function(t){return new Promise((function(e,n){Kn(t)?Wn(Zn(t)).then(e).catch(n):e([t.getAsFile()])}))},Wn=function(t){return new Promise((function(e,n){var r=[],i=0,o=0,a=function(){0===o&&0===i&&e(r)};!function t(e){i++;var s=e.createReader();!function e(){s.readEntries((function(n){if(0===n.length)return i--,void a();n.forEach((function(e){e.isDirectory?t(e):(o++,e.file((function(t){r.push(Xn(t)),o--,a()})))})),e()}),n)}()}(t)}))},Xn=function(t){if(t.type.length)return t;var e=t.lastModifiedDate,n=t.name;return(t=t.slice(0,t.size,Hn(Ht(t.name)))).name=n,t.lastModifiedDate=e,t},Kn=function(t){return Qn(t)&&(Zn(t)||{}).isDirectory},Qn=function(t){return"webkitGetAsEntry"in t},Zn=function(t){return t.webkitGetAsEntry()},Jn=function(t){var e=[];try{if((e=er(t)).length)return e;e=tr(t)}catch(t){}return e},tr=function(t){var e=t.getData("url");return"string"==typeof e&&e.length?[e]:[]},er=function(t){var e=t.getData("text/html");if("string"==typeof e&&e.length){var n=e.match(/src\s*=\s*"(.+?)"/);if(n)return[n[1]]}return[]},nr=[],rr=function(t){return{pageLeft:t.pageX,pageTop:t.pageY,scopeLeft:t.offsetX||t.layerX,scopeTop:t.offsetY||t.layerY}},ir=function(t){var e=nr.find((function(e){return e.element===t}));if(e)return e;var n=or(t);return nr.push(n),n},or=function(t){var e=[],n={dragenter:cr,dragover:ur,dragleave:fr,drop:dr},r={};o(n,(function(n,i){r[n]=i(t,e),t.addEventListener(n,r[n],!1)}));var i={element:t,addListener:function(a){return e.push(a),function(){e.splice(e.indexOf(a),1),0===e.length&&(nr.splice(nr.indexOf(i),1),o(n,(function(e){t.removeEventListener(e,r[e],!1)})))}}};return i},ar=function(t,e){var n,r=function(t,e){return"elementFromPoint"in t||(t=document),t.elementFromPoint(e.x,e.y)}("getRootNode"in(n=e)?n.getRootNode():document,{x:t.pageX-window.pageXOffset,y:t.pageY-window.pageYOffset});return r===e||e.contains(r)},sr=null,lr=function(t,e){try{t.dropEffect=e}catch(t){}},cr=function(t,e){return function(t){t.preventDefault(),sr=t.target,e.forEach((function(e){var n=e.element,r=e.onenter;ar(t,n)&&(e.state="enter",r(rr(t)))}))}},ur=function(t,e){return function(t){t.preventDefault();var n=t.dataTransfer;$n(n).then((function(r){var i=!1;e.some((function(e){var o=e.filterElement,a=e.element,s=e.onenter,l=e.onexit,c=e.ondrag,u=e.allowdrop;lr(n,"copy");var d=u(r);if(d)if(ar(t,a)){if(i=!0,null===e.state)return e.state="enter",void s(rr(t));if(e.state="over",o&&!d)return void lr(n,"none");c(rr(t))}else o&&!i&&lr(n,"none"),e.state&&(e.state=null,l(rr(t)));else lr(n,"none")}))}))}},dr=function(t,e){return function(t){t.preventDefault();var n=t.dataTransfer;$n(n).then((function(n){e.forEach((function(e){var r=e.filterElement,i=e.element,o=e.ondrop,a=e.onexit,s=e.allowdrop;if(e.state=null,!r||ar(t,i))return s(n)?void o(rr(t),n):a(rr(t))}))}))}},fr=function(t,e){return function(t){sr===t.target&&e.forEach((function(e){var n=e.onexit;e.state=null,n(rr(t))}))}},pr=function(t,e,n){t.classList.add("filepond--hopper");var r=n.catchesDropsOnPage,i=n.requiresDropOnElement,o=n.filterItems,a=void 0===o?function(t){return t}:o,s=function(t,e,n){var r=ir(e),i={element:t,filterElement:n,state:null,ondrop:function(){},onenter:function(){},ondrag:function(){},onexit:function(){},onload:function(){},allowdrop:function(){}};return i.destroy=r.addListener(i),i}(t,r?document.documentElement:t,i),l="",c="";s.allowdrop=function(t){return e(a(t))},s.ondrop=function(t,n){var r=a(n);e(r)?(c="drag-drop",u.onload(r,t)):u.ondragend(t)},s.ondrag=function(t){u.ondrag(t)},s.onenter=function(t){c="drag-over",u.ondragstart(t)},s.onexit=function(t){c="drag-exit",u.ondragend(t)};var u={updateHopperState:function(){l!==c&&(t.dataset.hopperState=c,l=c)},onload:function(){},ondragstart:function(){},ondrag:function(){},ondragend:function(){},destroy:function(){s.destroy()}};return u},mr=!1,hr=[],_r=function(t){$n(t.clipboardData).then((function(t){t.length&&hr.forEach((function(e){return e(t)}))}))},vr=function(){var t=function(t){e.onload(t)},e={destroy:function(){var e;e=t,dt(hr,hr.indexOf(e)),0===hr.length&&(document.removeEventListener("paste",_r),mr=!1)},onload:function(){}};return function(t){hr.includes(t)||(hr.push(t),mr||(mr=!0,document.addEventListener("paste",_r)))}(t),e},gr=null,Er=null,br=[],yr=function(t,e){t.element.textContent=e},Cr=function(t,e,n){var r=t.query("GET_TOTAL_ITEMS");yr(t,n+" "+e+", "+r+" "+(1===r?t.query("GET_LABEL_FILE_COUNT_SINGULAR"):t.query("GET_LABEL_FILE_COUNT_PLURAL"))),clearTimeout(Er),Er=setTimeout((function(){!function(t){t.element.textContent=""}(t)}),1500)},Tr=function(t){return t.element.parentNode.contains(document.activeElement)},wr=function(t){var e=t.root,n=t.action,r=e.query("GET_ITEM",n.id).filename,i=e.query("GET_LABEL_FILE_PROCESSING_ABORTED");yr(e,r+" "+i)},Ir=function(t){var e=t.root,n=t.action,r=e.query("GET_ITEM",n.id).filename;yr(e,n.status.main+" "+r+" "+n.status.sub)},Sr=A({create:function(t){var e=t.root,n=t.props;e.element.id="filepond--assistant-"+n.id,s(e.element,"role","status"),s(e.element,"aria-live","polite"),s(e.element,"aria-relevant","additions")},ignoreRect:!0,ignoreRectUpdate:!0,write:N({DID_LOAD_ITEM:function(t){var e=t.root,n=t.action;if(Tr(e)){e.element.textContent="";var r=e.query("GET_ITEM",n.id);br.push(r.filename),clearTimeout(gr),gr=setTimeout((function(){Cr(e,br.join(", "),e.query("GET_LABEL_FILE_ADDED")),br.length=0}),750)}},DID_REMOVE_ITEM:function(t){var e=t.root,n=t.action;if(Tr(e)){var r=n.item;Cr(e,r.filename,e.query("GET_LABEL_FILE_REMOVED"))}},DID_COMPLETE_ITEM_PROCESSING:function(t){var e=t.root,n=t.action,r=e.query("GET_ITEM",n.id).filename,i=e.query("GET_LABEL_FILE_PROCESSING_COMPLETE");yr(e,r+" "+i)},DID_ABORT_ITEM_PROCESSING:wr,DID_REVERT_ITEM_PROCESSING:wr,DID_THROW_ITEM_REMOVE_ERROR:Ir,DID_THROW_ITEM_LOAD_ERROR:Ir,DID_THROW_ITEM_INVALID:Ir,DID_THROW_ITEM_PROCESSING_ERROR:Ir}),tag:"span",name:"assistant"}),Or=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return t.replace(new RegExp(e+".","g"),(function(t){return t.charAt(1).toUpperCase()}))},Dr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Date.now(),i=null;return function(){for(var o=arguments.length,a=new Array(o),s=0;s=0?1:0,m=o.find((function(t){return t.markedForRemoval&&t.opacity<.45}))?-1:0,h=o.length+p+m,_=Math.round(a/d);return 1===_?o.forEach((function(t){var r=t.rect.element.height+c;n+=r,e+=r*t.opacity})):(n=Math.ceil(h/_)*f,e=n),{visual:e,bounds:n}},Nr=function(t){var e=t.ref.measureHeight||null;return{cappedHeight:parseInt(t.style.maxHeight,10)||null,fixedHeight:0===e?null:e}},kr=function(t,e){var n=t.query("GET_ALLOW_REPLACE"),r=t.query("GET_ALLOW_MULTIPLE"),i=t.query("GET_TOTAL_ITEMS"),o=t.query("GET_MAX_FILES"),a=e.length;return!r&&a>1||!!(V(o=r?o:n?o:1)&&i+a>o)&&(t.dispatch("DID_THROW_MAX_FILES",{source:e,error:re("warning",0,"Max files")}),!0)},xr=function(t,e){var n=t.childViews[0];return yn(n,{left:e.scopeLeft-n.rect.element.left,top:e.scopeTop-(t.rect.outer.top+t.rect.element.marginTop+t.rect.element.scrollTop)})},Pr=function(t){var e=t.query("GET_ALLOW_DROP"),n=t.query("GET_DISABLED"),r=e&&!n;if(r&&!t.ref.hopper){var i=pr(t.element,(function(e){if(kr(t,e))return!1;var n=t.query("GET_BEFORE_DROP_FILE")||function(){return!0};return!t.query("GET_DROP_VALIDATION")||e.every((function(e){return wt("ALLOW_HOPPER_ITEM",e,{query:t.query}).every((function(t){return!0===t}))&&n(e)}))}),{filterItems:function(e){var n=t.query("GET_IGNORED_FILES");return e.filter((function(t){return!Ce(t)||!n.includes(t.name.toLowerCase())}))},catchesDropsOnPage:t.query("GET_DROP_ON_PAGE"),requiresDropOnElement:t.query("GET_DROP_ON_ELEMENT")});i.onload=function(e,n){t.dispatch("ADD_ITEMS",{items:e,index:xr(t.ref.list,n),interactionMethod:at}),t.dispatch("DID_DROP",{position:n}),t.dispatch("DID_END_DRAG",{position:n})},i.ondragstart=function(e){t.dispatch("DID_START_DRAG",{position:e})},i.ondrag=Dr((function(e){t.dispatch("DID_DRAG",{position:e})})),i.ondragend=function(e){t.dispatch("DID_END_DRAG",{position:e})},t.ref.hopper=i,t.ref.drip=t.appendChildView(t.createChildView(Bn))}else!r&&t.ref.hopper&&(t.ref.hopper.destroy(),t.ref.hopper=null,t.removeChildView(t.ref.drip))},Lr=function(t,e){var n=t.query("GET_ALLOW_BROWSE"),r=t.query("GET_DISABLED"),i=n&&!r;i&&!t.ref.browser?t.ref.browser=t.appendChildView(t.createChildView(Nn,Object.assign({},e,{onload:function(e){if(kr(t,e))return!1;t.dispatch("ADD_ITEMS",{items:e,index:-1,interactionMethod:st})}})),0):!i&&t.ref.browser&&(t.removeChildView(t.ref.browser),t.ref.browser=null)},Fr=function(t){var e=t.query("GET_ALLOW_PASTE"),n=t.query("GET_DISABLED"),r=e&&!n;r&&!t.ref.paster?(t.ref.paster=vr(),t.ref.paster.onload=function(e){t.dispatch("ADD_ITEMS",{items:e,index:-1,interactionMethod:lt})}):!r&&t.ref.paster&&(t.ref.paster.destroy(),t.ref.paster=null)},Mr=N({DID_SET_ALLOW_BROWSE:function(t){var e=t.root,n=t.props;Lr(e,n)},DID_SET_ALLOW_DROP:function(t){var e=t.root;Pr(e)},DID_SET_ALLOW_PASTE:function(t){var e=t.root;Fr(e)},DID_SET_DISABLED:function(t){var e=t.root,n=t.props;Pr(e),Fr(e),Lr(e,n),e.query("GET_DISABLED")?e.element.dataset.disabled="disabled":e.element.removeAttribute("data-disabled")}}),Br=A({name:"root",read:function(t){var e=t.root;e.ref.measure&&(e.ref.measureHeight=e.ref.measure.offsetHeight)},create:function(t){var e=t.root,n=t.props,r=e.query("GET_ID");r&&(e.element.id=r);var i=e.query("GET_CLASS_NAME");i&&i.split(" ").forEach((function(t){e.element.classList.add(t)})),e.ref.label=e.appendChildView(e.createChildView(Ln,Object.assign({},n,{translateY:null,caption:e.query("GET_LABEL_IDLE")}))),e.ref.list=e.appendChildView(e.createChildView(On,{translateY:null})),e.ref.panel=e.appendChildView(e.createChildView(_n,{name:"panel-root"})),e.ref.assistant=e.appendChildView(e.createChildView(Sr,Object.assign({},n))),e.ref.measure=xe("div"),e.ref.measure.style.height="100%",e.element.appendChild(e.ref.measure),e.ref.bounds=null,e.query("GET_STYLES").filter((function(t){return!L(t.value)})).map((function(t){var n=t.name,r=t.value;e.element.dataset[n]=r})),e.ref.widthPrevious=null,e.ref.widthUpdated=Dr((function(){e.ref.updateHistory=[],e.dispatch("DID_RESIZE_ROOT")}),250),e.ref.previousAspectRatio=null,e.ref.updateHistory=[]},write:function(t){var e=t.root,n=t.props,r=t.actions;if(Mr({root:e,props:n,actions:r}),r.filter((function(t){return/^DID_SET_STYLE_/.test(t.type)})).filter((function(t){return!L(t.data.value)})).map((function(t){var n=t.type,r=t.data,i=Or(n.substr(8).toLowerCase(),"_");e.element.dataset[i]=r.value,e.invalidateLayout()})),!e.rect.element.hidden){e.rect.element.width!==e.ref.widthPrevious&&(e.ref.widthPrevious=e.rect.element.width,e.ref.widthUpdated());var i=e.ref.bounds;i||(i=e.ref.bounds=Nr(e),e.element.removeChild(e.ref.measure),e.ref.measure=null);var o=e.ref,a=o.hopper,s=o.label,l=o.list,c=o.panel;a&&a.updateHopperState();var u=e.query("GET_PANEL_ASPECT_RATIO"),d=e.query("GET_ALLOW_MULTIPLE"),f=e.query("GET_TOTAL_ITEMS"),p=f===(d?e.query("GET_MAX_FILES")||1e6:1),m=r.find((function(t){return"DID_ADD_ITEM"===t.type}));if(p&&m){var h=m.data.interactionMethod;s.opacity=0,d?s.translateY=-40:h===ot?s.translateX=40:s.translateY=h===st?40:30}else p||(s.opacity=1,s.translateX=0,s.translateY=0);var _=Rr(e),v=Ar(e),g=s.rect.element.height,E=!d||p?0:g,b=p?l.rect.element.marginTop:0,y=0===f?0:l.rect.element.marginBottom,C=E+b+v.visual+y,T=E+b+v.bounds+y;if(l.translateY=Math.max(0,E-l.rect.element.marginTop)-_.top,u){var w=e.rect.element.width,I=w*u;u!==e.ref.previousAspectRatio&&(e.ref.previousAspectRatio=u,e.ref.updateHistory=[]);var S=e.ref.updateHistory;if(S.push(w),S.length>4)for(var O=S.length,D=O-10,R=0,A=O;A>=D;A--)if(S[A]===S[A-2]&&R++,R>=2)return;c.scalable=!1,c.height=I;var N=I-E-(y-_.bottom)-(p?b:0);v.visual>N?l.overflow=N:l.overflow=null,e.height=I}else if(i.fixedHeight){c.scalable=!1;var k=i.fixedHeight-E-(y-_.bottom)-(p?b:0);v.visual>k?l.overflow=k:l.overflow=null}else if(i.cappedHeight){var x=C>=i.cappedHeight,P=Math.min(i.cappedHeight,C);c.scalable=!0,c.height=x?P:P-_.top-_.bottom;var F=P-E-(y-_.bottom)-(p?b:0);C>i.cappedHeight&&v.visual>F?l.overflow=F:l.overflow=null,e.height=Math.min(i.cappedHeight,T-_.top-_.bottom)}else{var M=f>0?_.top+_.bottom:0;c.scalable=!0,c.height=Math.max(g,C-M),e.height=Math.max(g,T-M)}}},destroy:function(t){var e=t.root;e.ref.paster&&e.ref.paster.destroy(),e.ref.hopper&&e.ref.hopper.destroy()},mixins:{styles:["height"]}}),Ur=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=null,n=St(),r=i(tt(n),[Bt,it(n)],[ke,rt(n)]);r.dispatch("SET_OPTIONS",{options:t});var o=function(){document.hidden||r.dispatch("KICK")};document.addEventListener("visibilitychange",o);var s=null,l=!1,c=!1,u=null,d=null,f=function(){l||(l=!0),clearTimeout(s),s=setTimeout((function(){l=!1,u=null,d=null,c&&(c=!1,r.dispatch("DID_STOP_RESIZE"))}),500)};window.addEventListener("resize",f);var p=Br(r,{id:ut()}),m=!1,h=!1,_={_read:function(){l&&(d=window.innerWidth,u||(u=d),c||d===u||(r.dispatch("DID_START_RESIZE"),c=!0)),h&&m&&(m=null===p.element.offsetParent),m||(p._read(),h=p.rect.element.hidden)},_write:function(t){var e=r.processActionQueue().filter((function(t){return!/^SET_/.test(t.type)}));m&&!e.length||(y(e),m=p._write(t,e,c),_t(r.query("GET_ITEMS")),m&&r.processDispatchQueue())}},v=function(t){return function(e){var n={type:t};if(!e)return n;if(e.hasOwnProperty("error")&&(n.error=e.error?Object.assign({},e.error):null),e.status&&(n.status=Object.assign({},e.status)),e.file&&(n.output=e.file),e.source)n.file=e.source;else if(e.item||e.id){var i=e.item?e.item:r.query("GET_ITEM",e.id);n.file=i?ht(i):null}return e.items&&(n.items=e.items.map(ht)),/progress/.test(t)&&(n.progress=e.progress),n}},E={DID_DESTROY:v("destroy"),DID_INIT:v("init"),DID_THROW_MAX_FILES:v("warning"),DID_START_ITEM_LOAD:v("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:v("addfileprogress"),DID_LOAD_ITEM:v("addfile"),DID_THROW_ITEM_INVALID:[v("error"),v("addfile")],DID_THROW_ITEM_LOAD_ERROR:[v("error"),v("addfile")],DID_THROW_ITEM_REMOVE_ERROR:[v("error"),v("removefile")],DID_PREPARE_OUTPUT:v("preparefile"),DID_START_ITEM_PROCESSING:v("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:v("processfileprogress"),DID_ABORT_ITEM_PROCESSING:v("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:v("processfile"),DID_COMPLETE_ITEM_PROCESSING_ALL:v("processfiles"),DID_REVERT_ITEM_PROCESSING:v("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[v("error"),v("processfile")],DID_REMOVE_ITEM:v("removefile"),DID_UPDATE_ITEMS:v("updatefiles"),DID_ACTIVATE_ITEM:v("activatefile")},b=function(t){var e=Object.assign({pond:N},t);delete e.type,p.element.dispatchEvent(new CustomEvent("FilePond:"+t.type,{detail:e,bubbles:!0,cancelable:!0,composed:!0}));var n=[];t.hasOwnProperty("error")&&n.push(t.error),t.hasOwnProperty("file")&&n.push(t.file);var i=["type","error","file"];Object.keys(t).filter((function(t){return!i.includes(t)})).forEach((function(e){return n.push(t[e])})),N.fire.apply(N,[t.type].concat(n));var o=r.query("GET_ON"+t.type.toUpperCase());o&&o.apply(void 0,n)},y=function(t){t.length&&t.forEach((function(t){if(E[t.type]){var e=E[t.type];(Array.isArray(e)?e:[e]).forEach((function(e){setTimeout((function(){b(e(t.data))}),0)}))}}))},C=function(t){return r.dispatch("SET_OPTIONS",{options:t})},T=function(t){return r.query("GET_ACTIVE_ITEM",t)},w=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){S([{source:t,options:e}],{index:e.index}).then((function(t){return n(t&&t[0])})).catch(r)}))},I=function(t){return r.dispatch("REMOVE_ITEM",{query:t}),null===r.query("GET_ACTIVE_ITEM",t)},S=function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e={};o(St(),(function(t,n){e[t]=n[0]}));var n=Ur(Object.assign({},e,{},t));return n},qr=function(t){return Or(t.replace(/^data-/,""))},Hr=function t(e,n){o(n,(function(n,r){o(e,(function(t,i){var o=new RegExp(n);if(o.test(t)&&(delete e[t],!1!==r))if(G(r))e[r]=i;else{var a,s=r.group;X(r)&&!e[s]&&(e[s]={}),e[s][(a=t.replace(o,""),a.charAt(0).toLowerCase()+a.slice(1))]=i}})),r.mapping&&t(e[r.group],r.mapping)}))},$r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];o(t.attributes,(function(e){n.push(t.attributes[e])}));var r=n.filter((function(t){return t.name})).reduce((function(e,n){var r=s(t,n.name);return e[qr(n.name)]=r===n.name||r,e}),{});return Hr(r,e),r},Vr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};wt("SET_ATTRIBUTE_TO_OPTION_MAP",n);var r=Object.assign({},e),i=$r("FIELDSET"===t.nodeName?t.querySelector("input[type=file]"):t,n);Object.keys(i).forEach((function(t){X(i[t])?(X(r[t])||(r[t]={}),Object.assign(r[t],i[t])):r[t]=i[t]})),r.files=(e.files||[]).concat(Array.from(t.querySelectorAll("input:not([type=file])")).map((function(t){return{source:t.value,options:{type:t.dataset.type}}})));var o=Gr(r);return t.files&&Array.from(t.files).forEach((function(t){o.addFile(t)})),o.replaceElement(t),o},jr=function(){return r(arguments.length<=0?void 0:arguments[0])?Vr.apply(void 0,arguments):Gr.apply(void 0,arguments)},zr=["fire","_read","_write"],Yr=function(t){var e={};return pt(t,e,zr),e},Wr=function(t,e){return t.replace(/(?:{([a-zA-Z]+)})/g,(function(t,n){return e[n]}))},Xr=function(t){var e=new Blob(["(",t.toString(),")()"],{type:"application/javascript"}),n=URL.createObjectURL(e),r=new Worker(n);return{transfer:function(t,e){},post:function(t,e,n){var i=ut();r.onmessage=function(t){t.data.id===i&&e(t.data.message)},r.postMessage({id:i,message:t},n)},terminate:function(){r.terminate(),URL.revokeObjectURL(n)}}},Kr=function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=function(t){n(t)},r.src=t}))},Qr=function(t,e){var n=t.slice(0,t.size,t.type);return n.lastModifiedDate=t.lastModifiedDate,n.name=e,n},Zr=function(t){return Qr(t,t.name)},Jr=[],ti=function(t){if(!Jr.includes(t)){Jr.push(t);var e,n=t({addFilter:It,utils:{Type:yt,forin:o,isString:G,isFile:Ce,toNaturalFileSize:Ue,replaceInString:Wr,getExtensionFromFilename:Ht,getFilenameWithoutExtension:be,guesstimateMimeType:Hn,getFileFromBlob:zt,getFilenameFromURL:qt,createRoute:N,createWorker:Xr,createView:A,createItemAPI:ht,loadImage:Kr,copyFile:Zr,renameFile:Qr,createBlob:Yt,applyFilterChain:Tt,text:Pe,getNumericAspectRatioFromString:Rt},views:{fileActionButton:Be}});e=n.options,Object.assign(Ot,e)}},ei=(tn="undefined"!=typeof window&&void 0!==window.document&&!("[object OperaMini]"===Object.prototype.toString.call(window.operamini))&&"visibilityState"in document&&"Promise"in window&&"slice"in Blob.prototype&&"URL"in window&&"createObjectURL"in window.URL&&"performance"in window,function(){return tn}),ni={apps:[]},ri=function(){};if(t.Status={},t.FileStatus={},t.FileOrigin={},t.OptionTypes={},t.create=ri,t.destroy=ri,t.parse=ri,t.find=ri,t.registerPlugin=ri,t.getOptions=ri,t.setOptions=ri,ei()){!function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,r="__framePainter";if(window[r])return window[r].readers.push(t),void window[r].writers.push(e);window[r]={readers:[t],writers:[e]};var i=window[r],o=1e3/n,a=null,s=null,l=null,c=null,u=function(){document.hidden?(l=function(){return window.setTimeout((function(){return d(performance.now())}),o)},c=function(){return window.clearTimeout(s)}):(l=function(){return window.requestAnimationFrame(d)},c=function(){return window.cancelAnimationFrame(s)})};document.addEventListener("visibilitychange",(function(){c&&c(),u(),d(performance.now())}));var d=function t(e){s=l(t),a||(a=e);var n=e-a;n<=o||(a=e-n%o,i.readers.forEach((function(t){return t()})),i.writers.forEach((function(t){return t(e)})))};u(),d(performance.now())}((function(){ni.apps.forEach((function(t){return t._read()}))}),(function(t){ni.apps.forEach((function(e){return e._write(t)}))}));var ii=function e(){document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:ei,create:t.create,destroy:t.destroy,parse:t.parse,find:t.find,registerPlugin:t.registerPlugin,setOptions:t.setOptions}})),document.removeEventListener("DOMContentLoaded",e)};"loading"!==document.readyState?setTimeout((function(){return ii()}),0):document.addEventListener("DOMContentLoaded",ii);var oi=function(){return o(St(),(function(e,n){t.OptionTypes[e]=n[1]}))};t.Status=Object.assign({},Nt),t.FileOrigin=Object.assign({},gt),t.FileStatus=Object.assign({},vt),t.OptionTypes={},oi(),t.create=function(){var e=jr.apply(void 0,arguments);return e.on("destroy",t.destroy),ni.apps.push(e),Yr(e)},t.destroy=function(t){var e=ni.apps.findIndex((function(e){return e.isAttachedTo(t)}));return e>=0&&(ni.apps.splice(e,1)[0].restoreElement(),!0)},t.parse=function(e){return Array.from(e.querySelectorAll(".filepond")).filter((function(t){return!ni.apps.find((function(e){return e.isAttachedTo(t)}))})).map((function(e){return t.create(e)}))},t.find=function(t){var e=ni.apps.find((function(e){return e.isAttachedTo(t)}));return e?Yr(e):null},t.registerPlugin=function(){for(var t=arguments.length,e=new Array(t),n=0;n0?n("p",{staticClass:"card-text mt-1"},t._l(t.story.tags,(function(e){return n("a",{staticClass:"badge badge-secondary mr-1",attrs:{href:"/tag/"+e}},[t._v(t._s(e))])})),0):t._e()]),t._v(" "),n("div",{staticClass:"card-footer d-flex justify-content-between"},[n("span",[t.story.is_private?n("i",{staticClass:"fas fa-lock pr-2"}):t._e(),t._v(t._s(t.story.date_formated))]),t._v(" "),n("div",{staticClass:"dropdown"},[n("button",{staticClass:"btn btn-outline-dark btn-sm dropdown-toggle",attrs:{type:"button",id:"dropdownMenuButton","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",dusk:"story-card-more"}},[t._v("\n "+t._s(t.__("More"))+"\n ")]),t._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[n("a",{staticClass:"dropdown-item",attrs:{href:t.story.url,dusk:"story-card-permalink"}},[n("i",{staticClass:"fas fa-link fa-fw mr-1"}),t._v(" "+t._s(t.__("Permalink"))+"\n ")]),t._v(" "),t.story.editable?n("h6",{staticClass:"dropdown-header"},[t._v(t._s(t.__("Manage")))]):t._e(),t._v(" "),t.story.editable?n("a",{staticClass:"dropdown-item",attrs:{dusk:"story-card-temp-share"},on:{click:function(e){return t.$bus.$emit("share",t.story)}}},[n("i",{staticClass:"fas fa-share-square fa-fw mr-1"}),t._v(" "+t._s(t.__("Temp sharing"))+"\n ")]):t._e(),t._v(" "),t.story.editable?n("a",{staticClass:"dropdown-item",attrs:{href:t.story.url_edit,dusk:"story-card-edit"}},[n("i",{staticClass:"fas fa-pen-alt fa-fw mr-1"}),t._v(" "+t._s(t.__("Edit"))+"\n ")]):t._e(),t._v(" "),t.story.editable?n("confirm",{staticClass:"dropdown-item",attrs:{text:" "+t.__("Delete"),"text-confirm":" "+t.__("Confirm"),dusk:"story-card-remove"},on:{confirmed:t.remove}}):t._e()],1)])])])}),[],!1,null,null,null);e.default=o.exports},yLpj:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},zV0C:function(t,e,n){"use strict";n.r(e);var r={props:{url:{type:String,required:!0}},data:function(){return{name:"Shaare",width:600,height:390}},mounted:function(){},computed:{options:function(){return"menubar=no,height=".concat(this.height,",width=").concat(this.width,",toolbar=no,scrollbars=no,status=no,dialog=1")},script:function(){return"javascript:(function(){var url=location.href; window.open('".concat(this.url,"?url=' + encodeURIComponent(url), '_blank', '").concat(this.options,"');})();")}}},i=n("KHd+"),o=Object(i.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card"},[n("div",{staticClass:"card-body"},[n("h5",{staticClass:"card-title"},[t._v(t._s(t.__("Rapid share")))]),t._v(" "),n("p",{staticClass:"card-text"},[t._v(t._s(t.__("Configure your rapid share button and drag it to your bookmarks menu.")))]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"name"}},[t._v(t._s(t.__("Name")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"name"}],staticClass:"form-control",attrs:{type:"text",id:"name",maxlength:"40"},domProps:{value:t.name},on:{input:function(e){e.target.composing||(t.name=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"width"}},[t._v(t._s(t.__("Width")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.width,expression:"width"}],staticClass:"form-control",attrs:{type:"number",id:"width"},domProps:{value:t.width},on:{input:function(e){e.target.composing||(t.width=e.target.value)}}})])]),t._v(" "),n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"height"}},[t._v(t._s(t.__("Height")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.height,expression:"height"}],staticClass:"form-control",attrs:{type:"number",id:"height"},domProps:{value:t.height},on:{input:function(e){e.target.composing||(t.height=e.target.value)}}})])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",[t._v(t._s(t.__("Share button")))]),n("br"),t._v(" "),n("a",{staticClass:"btn btn-outline-primary",attrs:{href:t.script},domProps:{textContent:t._s(t.name)}})])])])}),[],!1,null,null,null);e.default=o.exports}},[[0,1,2]]]); \ No newline at end of file diff --git a/public/mix-manifest.json b/public/mix-manifest.json index c7950a1..1e8ff1c 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,5 +1,5 @@ { - "/js/app.js": "/js/app.js?id=29ae6a7c36dbf9021add", + "/js/app.js": "/js/app.js?id=6454f6e14b5042d95985", "/css/app.css": "/css/app.css?id=b8b03307e0cd699952d1", "/js/manifest.js": "/js/manifest.js?id=3c768977c2574a34506e", "/js/vendor.js": "/js/vendor.js?id=11a927bf070f02d1f22c" diff --git a/resources/js/components/UserForm.vue b/resources/js/components/UserForm.vue index f6a0a60..e9f8ff1 100644 --- a/resources/js/components/UserForm.vue +++ b/resources/js/components/UserForm.vue @@ -70,9 +70,9 @@ export default { ], props: { - user: { + editing: { type: Object|Boolean, - required: false, + required: true, default: false, } }, @@ -85,23 +85,24 @@ export default { }, mounted() { - if (this.user) { - this.setUser(this.user); + if (this.editing !== false) { + this.setUser(this.editing); } }, methods: { submit() { this.loading = true; + let editing = this.editing !== false; axios.request({ - method: this.user ? 'PUT' : 'POST', - url: this.user ? this.user.url_update : '/api/manage/users', + method: editing ? 'PUT' : 'POST', + url: editing ? this.editing.url_update : '/api/manage/users', data: this.form }).then(response => { this.$toasted.success(this.__("Saved")); - if (this.user) { + if (this.editing) { this.loading = false; } else { this.form = defaultUser(); @@ -110,6 +111,7 @@ export default { this.resetFormError(); this.$emit('submited'); }).catch(error => { + console.log(error) if (error.response.data.status === 'error') { this.$toasted.error(error.response.data.message); } else { @@ -134,7 +136,7 @@ export default { }, watch: { - user: function (value) { + editing(value) { this.setUser(value); } } diff --git a/resources/js/components/Users.vue b/resources/js/components/Users.vue index 89b4a72..6156f07 100644 --- a/resources/js/components/Users.vue +++ b/resources/js/components/Users.vue @@ -34,7 +34,7 @@ @@ -93,7 +93,7 @@ export default { edit(user) { this.creating = false; - this.editing = user; + this.editing = { ...user }; }, formSubmited() {